{"version":3,"sources":["webpack:///./src/config.js","webpack:///./src/shared/errors.js","webpack:///./src/shared/api.js","webpack:///./src/shared/services/AuthService.js","webpack:///./src/shared/utils/intlShape.js","webpack:///./src/shared/components/FormattedListValue.jsx","webpack:///./src/shared/services/HandleHttpError.js","webpack:///./src/shared/utils/dynamicSort.js","webpack:///./src/shared/services/ToastrService.js","webpack:///./src/shared/services/DataCacheService.js","webpack:///./src/shared/services/SignalRService.js","webpack:///./src/shared/components/Button.jsx","webpack:///./src/shared/utils/guid.js","webpack:///./src/shared/services/DocumentService.js","webpack:///./src/shared/components/registration/registrationHelpers.js","webpack:///./src/shared/utils/contentDispositionHelper.js","webpack:///./src/shared/utils/adminpulse.js","webpack:///./src/shared/services/ObjectDisplayService.js","webpack:///./src/shared/components/input/select/AutoComplete.jsx","webpack:///./src/shared/services/TranslateService.js","webpack:///./src/ajs/registrations/model/registration.js","webpack:///./src/shared/TenantConfigurationConstants.js","webpack:///./src/shared/components/registration/ResourceAutoComplete.jsx","webpack:///./src/ajs/invoicing/model/invoice.js","webpack:///./src/ajs/registrations/model/registrationGroup.js","webpack:///./src/shared/components/input/select/Item.jsx","webpack:///./src/shared/utils/mime.js","webpack:///./src/zendesk.js","webpack:///./src/shared/hooks/resource/useResourceTree.ts","webpack:///./src/ajs/settings/dialogs/placeholderDialog.html","webpack:///./src/shared/services/RequestLoadingAnimationService.js","webpack:///./src/ajs/notifications/model/notification.js","webpack:///./src/ajs/relations/dialogs/mailDocumentDialog.html","webpack:///./src/ajs/settings/dialogs/previewInvoiceTemplateDialog.html","webpack:///./src/ajs/common/directives/numberFormatDrv.js","webpack:///./src/ajs/employees/new/empNew.html","webpack:///./src/ajs/invoicing/wizard/invoiceFromScratch.html","webpack:///./src/ajs/settings/editMailTemplateSettings.html","webpack:///./src/ajs/common/directives/resetTaskAssignedToDialog.html","webpack:///./src/ajs/config/fields/configFieldDialog.html","webpack:///./src/ajs/employees/dialogs/deleteEmployeeDialog.html","webpack:///./src/ajs/employees/dialogs/undeleteEmployeeDialog.html","webpack:///./src/ajs/invoicing/dialogs/mailTemplateDialog.html","webpack:///./src/ajs/relations/dialogs/invoiceStreamBudgetDialog.html","webpack:///./src/ajs/relations/dialogs/plannedRegistrationDialog.html","webpack:///./src/ajs/relations/dialogs/amlSingleDocumentDialog.html","webpack:///./src/ajs/relations/dialogs/requestDocumentSignatureDialog.html","webpack:///./src/ajs/relations/dialogs/generateRelationDocumentDialog.html","webpack:///./src/ajs/profile/profile.html","webpack:///./src/ajs/authentication/403.html","webpack:///./src/ajs/relations/new/relNew.html","webpack:///./src/ajs/relations/detail/relationFile.html","webpack:///./src/ajs/employees/detail/employeeDetail.html","webpack:///./src/ajs/employees/overview/employeeOverview.html","webpack:///./src/ajs/employees/profiles/employeeProfileOverview.html","webpack:///./src/ajs/registrations/regDay.html","webpack:///./src/ajs/registrations/regOverview.html","webpack:///./src/ajs/registrations/resources/priceList.html","webpack:///./src/ajs/invoicing/overview/invoicingOverview.html","webpack:///./src/ajs/invoicing/draft/draftInvoiceOverview.html","webpack:///./src/ajs/invoicing/transaction/transactionOverview.html","webpack:///./src/ajs/translations/translate.html","webpack:///./src/ajs/translations/translateLabels.html","webpack:///./src/ajs/translations/translateLists.html","webpack:///./src/ajs/config/config.html","webpack:///./src/ajs/config/sections/sectionConfig.html","webpack:///./src/ajs/config/fields/fieldConfig.html","webpack:///./src/ajs/settings/company.html","webpack:///./src/ajs/settings/generalSettings.html","webpack:///./src/ajs/settings/mailTemplateSettings.html","webpack:///./src/ajs/settings/invoiceTextSettings.html","webpack:///./src/ajs/settings/taskTemplates.html","webpack:///./src/ajs/settings/reminderSettings.html","webpack:///./src/ajs/settings/license.html","webpack:///./src/ajs/settings/invoiceTemplates.html","webpack:///./src/ajs/menu.html","webpack:///./src/ajs/common/dialogs/yesNoDialog.html","webpack:///./src/ajs/common/dialogs/okCancelDialog.html","webpack:///./src/ajs/common/dialogs/yesNoCancelDialog.html","webpack:///./src/ajs/common/dialogs/availableRelationTagsDialog.html","webpack:///./src/ajs/common/dialogs/similarRelationDialog.html","webpack:///./src/ajs/common/dialogs/externalRelationSearchDialog.html","webpack:///./src/ajs/common/dialogs/relationWizardDialog.html","webpack:///./src/ajs/common/dialogs/calcDistanceDialog.html","webpack:///./src/ajs/common/dialogs/translateListItemDialog.html","webpack:///./src/ajs/common/dialogs/updateRegistrationsInternalPriceDialog.html","webpack:///./src/ajs/common/dialogs/shareItemDialog.html","webpack:///./src/ajs/common/dialogs/checkboxListDialog.html","webpack:///./src/ajs/common/dialogs/confirmChangesDialog.html","webpack:///./src/ajs/common/dialogs/stringInputDialog.html","webpack:///./src/ajs/common/directives/addressList.html","webpack:///./src/ajs/common/dialogs/invalidEmailWarningDialog.html","webpack:///./src/ajs/common/directives/addressListForm.html","webpack:///./src/ajs/common/directives/addressSelect.html","webpack:///./src/ajs/common/directives/affixerDrv.js","webpack:///./src/ajs/common/directives/calendar.html","webpack:///./src/ajs/common/directives/communicationList.html","webpack:///./src/ajs/common/directives/contactSelect.html","webpack:///./src/ajs/common/directives/dashboard.html","webpack:///./src/ajs/common/directives/dateScroller.html","webpack:///./src/ajs/common/directives/editableBoolSelectDrv.js","webpack:///./src/ajs/common/directives/editableCkeditorDrv.js","webpack:///./src/ajs/common/directives/editableCurrency.js","webpack:///./src/ajs/common/directives/editableLegalFormDrv.js","webpack:///./src/ajs/common/directives/focusOnChange.js","webpack:///./src/ajs/common/directives/generalMeeting.html","webpack:///./src/ajs/common/directives/numberFormat.html","webpack:///./src/ajs/common/directives/recentRelationsBar.html","webpack:///./src/ajs/common/directives/rowBlur.js","webpack:///./src/ajs/relations/dialogs/changeRelTypeDialog.html","webpack:///./src/ajs/common/directives/section.html","webpack:///./src/ajs/common/directives/subSection.html","webpack:///./src/ajs/relations/dialogs/employeeAccessDialog.html","webpack:///./src/ajs/common/directives/vatNumber.html","webpack:///./src/ajs/common/directives/vatNumberInputDrv.js","webpack:///./src/ajs/common/directives/editableEnumPickerDrv.js","webpack:///./src/ajs/common/FlyIn/flyIn.html","webpack:///./src/ajs/common/services/appSettingsSvc.js","webpack:///./src/ajs/common/table/filterPopupItemDrv.js","webpack:///./src/ajs/config/configRelevancy.html","webpack:///./src/ajs/config/fields/configValidator.html","webpack:///./src/ajs/config/sections/configAddSectionConfig.html","webpack:///./src/ajs/config/sections/configEditSectionConfig.html","webpack:///./src/ajs/config/sections/configSection.html","webpack:///./src/ajs/config/sections/configSubSection.html","webpack:///./src/ajs/employees/dialogs/createUserProfileDialog.html","webpack:///./src/ajs/employees/dialogs/employeeTimeTableDialog.html","webpack:///./src/ajs/employees/dialogs/employeeOvertimeDialog.html","webpack:///./src/ajs/employees/overview/selectPeriodDialog.html","webpack:///./src/ajs/employees/dialogs/addEmployeeProfileDialog.html","webpack:///./src/ajs/home/dashboardOwnCompanySelector.html","webpack:///./src/ajs/invoicing/dialogs/transactionDialog.html","webpack:///./src/ajs/invoicing/dialogs/draftInvoiceLineDialog.html","webpack:///./src/ajs/invoicing/dialogs/invoiceAuditDialog.html","webpack:///./src/ajs/invoicing/dialogs/batchMailInvoicesDialog.html","webpack:///./src/ajs/invoicing/dialogs/mailHistoryDialog.html","webpack:///./src/ajs/invoicing/dialogs/transactionPaymentDialog.html","webpack:///./src/ajs/invoicing/dialogs/invoicePaymentDialog.html","webpack:///./src/ajs/invoicing/dialogs/previewDraftInvoiceDialog.html","webpack:///./src/ajs/invoicing/dialogs/codaDialog.html","webpack:///./src/ajs/invoicing/dialogs/editInvoiceDialog.html","webpack:///./src/ajs/invoicing/dialogs/numberInvoicesDialog.html","webpack:///./src/ajs/invoicing/dialogs/deleteWithNeverInvoiceDialog.html","webpack:///./src/ajs/invoicing/dialogs/invoicingHistoryDialog.html","webpack:///./src/ajs/invoicing/dialogs/updateRegistrationRelationDialog.html","webpack:///./src/ajs/invoicing/dialogs/numberOn.html","webpack:///./src/ajs/invoicing/dialogs/transactionPaymentDialogCtrl.js","webpack:///./src/ajs/invoicing/draft/draftInvoiceRow.html","webpack:///./src/ajs/invoicing/sidebar/transactionBar.html","webpack:///./src/ajs/invoicing/sidebar/unpaidInvoiceBar.html","webpack:///./src/ajs/notifications/notificationBar.html","webpack:///./src/ajs/notifications/notificationSvc.js","webpack:///./src/ajs/notifications/notificationBanner.html","webpack:///./src/ajs/profile/dialogs/changePasswordDialog.html","webpack:///./src/ajs/profile/dialogs/changeUsernameDialog.html","webpack:///./src/ajs/profile/dialogs/enable2FADialog.html","webpack:///./src/ajs/profile/dialogs/disable2FADialog.html","webpack:///./src/ajs/registrations/dialogs/regEditGroupDialog.html","webpack:///./src/ajs/registrations/dialogs/registrationEditDialog.html","webpack:///./src/ajs/registrations/dialogs/absenceDialog.html","webpack:///./src/ajs/registrations/dialogs/newCategoryDialog.html","webpack:///./src/ajs/registrations/dialogs/newSubResourceDialog.html","webpack:///./src/ajs/registrations/dialogs/batchUpdateRegistrationFieldDialog.html","webpack:///./src/ajs/registrations/dialogs/deleteResourceCategoryDialog.html","webpack:///./src/ajs/registrations/dialogs/deleteResourceDialog.html","webpack:///./src/ajs/registrations/directives/registrationGroupInputDrv.js","webpack:///./src/ajs/registrations/directives/registrationGroupInput.html","webpack:///./src/ajs/relations/dialogs/invoiceMethodChangedDialog.html","webpack:///./src/ajs/relations/directives/fiscalCostList.html","webpack:///./src/ajs/relations/dialogs/fiscalCostDialog.html","webpack:///./src/ajs/relations/directives/fiscalDocumentList.html","webpack:///./src/ajs/relations/directives/fiscalInsuranceList.html","webpack:///./src/ajs/relations/dialogs/fiscalInsuranceDialog.html","webpack:///./src/ajs/relations/directives/fiscalLoanList.html","webpack:///./src/ajs/relations/dialogs/fiscalLoanDialog.html","webpack:///./src/ajs/relations/directives/fiscalRealEstateList.html","webpack:///./src/ajs/relations/dialogs/fiscalRealEstateDialog.html","webpack:///./src/ajs/relations/directives/fiscalVehicleList.html","webpack:///./src/ajs/relations/dialogs/fiscalVehicleDialog.html","webpack:///./src/ajs/relations/dialogs/fiscalYearDialog.html","webpack:///./src/ajs/relations/directives/invoiceStream.html","webpack:///./src/ajs/relations/dialogs/invoiceStreamScheduleDialog.html","webpack:///./src/ajs/relations/dialogs/authResourcesDialog.html","webpack:///./src/ajs/relations/dialogs/invoiceStreamSettingsDialog.html","webpack:///./src/ajs/relations/dialogs/billingSettingsDialog.html","webpack:///./src/ajs/relations/dialogs/addAssignmentDialog.html","webpack:///./src/ajs/relations/dialogs/deleteAssignmentDialog.html","webpack:///./src/ajs/relations/dialogs/editAssignmentDialog.html","webpack:///./src/ajs/relations/directives/invoicingVia.html","webpack:///./src/ajs/relations/directives/plannedRegistrations.html","webpack:///./src/ajs/relations/dialogs/plannedRegistrationScheduleDialog.html","webpack:///./src/ajs/relations/directives/relAmlDrv.js","webpack:///./src/ajs/relations/directives/relAml.html","webpack:///./src/ajs/relations/dialogs/amlDocumentDialog.html","webpack:///./src/ajs/relations/directives/relationFile.html","webpack:///./src/ajs/relations/dialogs/inviteRelationDirectDebitDialog.html","webpack:///./src/ajs/relations/dialogs/mollieDirectDebitDialog.html","webpack:///./src/ajs/relations/directives/relAuthorization.html","webpack:///./src/ajs/relations/directives/relEidWizard.html","webpack:///./src/ajs/relations/directives/relGeneratedDocuments.html","webpack:///./src/ajs/relations/dialogs/uploadRelationDocumentDialog.html","webpack:///./src/ajs/relations/directives/relReadEid.html","webpack:///./src/ajs/relations/dialogs/readEidDialog.html","webpack:///./src/ajs/relations/directives/relBankAccounts.html","webpack:///./src/ajs/relations/dialogs/addBankAccountDialog.html","webpack:///./src/ajs/relations/directives/relSearchBox.html","webpack:///./src/ajs/relations/directives/relTaskDashboard.html","webpack:///./src/ajs/relations/directives/relTaskScheduling.html","webpack:///./src/ajs/relations/dialogs/addCommonTaskSchedulesDialog.html","webpack:///./src/ajs/relations/dialogs/addTaskScheduleDialog.html","webpack:///./src/ajs/relations/dialogs/taskScheduleDeviationsDialog.html","webpack:///./src/ajs/relations/dialogs/plannedTasksDialog.html","webpack:///./src/ajs/relations/dialogs/taskScheduleChangeAssignmentDialog.html","webpack:///./src/ajs/relations/dialogs/editTaskScheduleRemarkDialog.html","webpack:///./src/ajs/relations/directives/relUbo.html","webpack:///./src/ajs/relations/directives/relWizard.html","webpack:///./src/ajs/relations/directives/relFieldSearch.html","webpack:///./src/ajs/relations/directives/linkedRelationsList.html","webpack:///./src/ajs/relations/dialogs/addRelationLinkDialog.html","webpack:///./src/ajs/relations/dialogs/editRelationLinkDialog.html","webpack:///./src/ajs/relations/dialogs/estoxConfirmationDialog.html","webpack:///./src/ajs/relations/directives/relTodos.html","webpack:///./src/ajs/relations/directives/relNaceCodes.html","webpack:///./src/ajs/settings/dialogs/companyBankAccountsDialog.html","webpack:///./src/ajs/settings/dialogs/addCompanyDialog.html","webpack:///./src/ajs/settings/dialogs/recognitionOptionsDialog.html","webpack:///./src/ajs/settings/dialogs/addEmailDomainDialog.html","webpack:///./src/ajs/settings/dialogs/emailDomainCnameInfoDialog.html","webpack:///./src/ajs/settings/dialogs/deleteInvoiceTextConfirmDialog.html","webpack:///./src/ajs/settings/dialogs/editTaskTemplateDialog.html","webpack:///./src/ajs/settings/dialogs/setPaymentProviderConfirmDialog.html","webpack:///./src/ajs/settings/dialogs/addTemporaryLicenseDialog.html","webpack:///./src/ajs/settings/dialogs/addInvoiceTemplateDialog.html","webpack:///./src/ajs/settings/dialogs/invoiceTextDialog.html","webpack:///./src/ajs/settings/dialogs/addTaskTemplateDialog.html","webpack:///./src/ajs/settings/dialogs/copyTaskTemplateDialog.html","webpack:///./src/ajs/settings/dialogs/addSubTaskTemplateDialog.html","webpack:///./src/ajs/settings/dialogs/addTaskPeriodicityDialog.html","webpack:///./src/ajs/settings/dialogs/copyTaskPeriodicityDialog.html","webpack:///./src/ajs/settings/dialogs/taskScheduleDialog.html","webpack:///./src/ajs/settings/dialogs/taskParameterDefinitionsDialog.html","webpack:///./src/ajs/settings/dialogs/exportTaskTemplateSnippetDialog.html","webpack:///./src/ajs/settings/dialogs/importTaskTemplateSnippetDialog.html","webpack:///./src/ajs/settings/dialogs/taskTemplateTagsDialog.html","webpack:///./src/ajs/settings/dialogs/taskTemplateRequiredDocumentTypesDialog.html","webpack:///./src/ajs/settings/dialogs/emailSignatureDialog.html","webpack:///./src/ajs/settings/dialogs/relationsUsingTaskPeriodicityDialog.html","webpack:///./src/ajs/settings/dialogs/deleteTaskPeriodicityLineDialog.html","webpack:///./src/ajs/settings/dialogs/taskParameterDefinitionOptionsDialog.html","webpack:///./src/ajs/settings/dialogs/addTaskParameterDefinitionDialog.html","webpack:///./src/ajs/settings/dialogs/addRelationFieldDefinitionDialog.html","webpack:///./src/ajs/settings/dialogs/mailEmailDomainCnameInfoDialog.html","webpack:///./src/ajs/settings/partials/bookyearSettings.html","webpack:///./src/ajs/assets/angularjs-ckeditor.js","webpack:///./src/shared/components/security/CanCreate.jsx","webpack:///./src/shared/components/security/CanDelete.jsx","webpack:///./src/shared/components/security/CanRead.jsx","webpack:///./src/shared/components/security/CanUpdate.jsx","webpack:///./src/shared/components/input/Checkbox.jsx","webpack:///./src/shared/components/security/showWhenPermission.jsx","webpack:///./src/shared/components/security/HasAssignments.jsx","webpack:///./src/shared/components/LoadingAnimation.jsx","webpack:///./src/shared/components/table/filters/filterMessages.js","webpack:///./src/shared/components/table/filters/ItemsFilter.jsx","webpack:///./src/shared/components/table/filters/SearchFilter.jsx","webpack:///./src/shared/components/table/filters/SelectFilter.jsx","webpack:///./src/shared/components/input/select/AutoCompleteWithoutInjectIntl.jsx","webpack:///./src/shared/components/input/UserSearchWithoutInjectIntl.jsx","webpack:///./src/shared/components/table/ColumnHeader.tsx","webpack:///./src/shared/components/table/filters/UserFilter.jsx","webpack:///./src/shared/components/table/ScrollableTable.jsx","webpack:///./src/shared/components/ZendeskHelp.jsx","webpack:///./src/shared/components/SimplePanel.tsx","webpack:///./src/shared/components/PopoverStickOnHover.jsx","webpack:///./src/shared/components/OkCancelModal.jsx","webpack:///./src/shared/components/CollapablePanel.jsx","webpack:///./src/shared/components/TranslatedFilePond.jsx","webpack:///./src/shared/services/userStorage.js","webpack:///./src/shared/components/input/FileUpload.jsx","webpack:///./src/ckeditorConfig.js","webpack:///./src/shared/utils/htmlHelpers.js","webpack:///./src/shared/components/RichTextEditor.jsx","webpack:///./src/shared/components/MimeIcon.jsx","webpack:///./src/shared/components/FileIcon.jsx","webpack:///./src/shared/components/YesNoModal.jsx","webpack:///./src/shared/components/Icons.jsx","webpack:///./src/shared/components/InlineAttachment.jsx","webpack:///./src/shared/services/DateFormatService.js","webpack:///./src/shared/components/input/DatePicker.jsx","webpack:///./src/shared/utils/validationHelpers.js","webpack:///./src/shared/components/RelationTypeIcon.jsx","webpack:///./src/shared/services/StateService.jsx","webpack:///./src/shared/components/RelationName.jsx","webpack:///./src/shared/services/RecentRelationsService.js","webpack:///./src/shared/components/input/RelationSearch.jsx","webpack:///./src/shared/components/input/TextSearch.jsx","webpack:///./src/shared/utils/dragEventHelpers.js","webpack:///./src/appInsights.js","webpack:///./src/shared/components/FixedTree.jsx","webpack:///./src/shared/components/DocumentTreeView.jsx","webpack:///./src/shared/components/DocumentSigningStatusIcon.jsx","webpack:///./src/shared/components/FormattedDateShort.jsx","webpack:///./src/shared/components/DocumentSelectorModal.jsx","webpack:///./src/shared/components/InputGroupWrapper.jsx","webpack:///./src/shared/components/EmailEditor.jsx","webpack:///./src/shared/components/email/PlaceholderModal.jsx","webpack:///./src/shared/components/KPIs.jsx","webpack:///./src/shared/components/KPI.jsx","webpack:///./src/shared/components/email/MultiRelationsMailModal.jsx","webpack:///./src/shared/components/email/SingleRelationMailModal.jsx","webpack:///./src/shared/services/EnumCacheService.js","webpack:///./src/shared/components/input/EnumSelect.jsx","webpack:///./src/modules/compliancy/comliancyMessages.js","webpack:///./src/modules/compliancy/MarkCompliancyInapplicableModal.jsx","webpack:///./src/modules/compliancy/CompliancyStatusIcon.jsx","webpack:///./src/shared/components/HoverToggle.jsx","webpack:///./src/modules/compliancy/CompliancyStatusToggle.jsx","webpack:///./src/shared/components/MenuItemWithSecurity.jsx","webpack:///./src/modules/compliancy/CompliancyGlobalActionsButton.jsx","webpack:///./src/shared/utils/sorters.js","webpack:///./src/modules/compliancy/getFieldIdForCompliancy.js","webpack:///./src/shared/components/input/multiselect/MultiSelectItem.jsx","webpack:///./src/modules/constants.ts","webpack:///./src/shared/components/CrmTypeButtonGroup.jsx","webpack:///./src/shared/components/input/CheckboxMenu.tsx","webpack:///./src/shared/components/input/CheckboxDropdownMenu.tsx","webpack:///./src/shared/components/input/multiselect/MultiSelect.jsx","webpack:///./src/shared/components/input/multiselect/CompanyMultiSelect.jsx","webpack:///./src/shared/components/input/multiselect/DataCacheMultiSelectHoc.jsx","webpack:///./src/shared/components/security/HasMultiCompany.jsx","webpack:///./src/shared/components/input/multiselect/LegalFormMultiSelect.jsx","webpack:///./src/shared/components/input/multiselect/EnumMultiSelect.jsx","webpack:///./src/shared/components/input/multiselect/TeamMultiSelect.jsx","webpack:///./src/shared/components/input/multiselect/EndFiscalYearMultiSelect.jsx","webpack:///./src/shared/components/input/multiselect/InvoiceScheduleTypeMultiSelect.jsx","webpack:///./src/shared/components/RelationTypeButtonGroup.jsx","webpack:///./src/shared/components/input/AssignmentTemplateSelector.jsx","webpack:///./src/shared/components/input/YearSelect.jsx","webpack:///./src/shared/components/input/UserSearch.jsx","webpack:///./src/shared/components/input/RelationUserSearch.jsx","webpack:///./src/shared/components/input/multiselect/YesNoSelect.jsx","webpack:///./src/shared/components/input/multiselect/RelationGroupMultiSelect.tsx","webpack:///./src/shared/components/input/EnumSelectV2.jsx","webpack:///./src/shared/messages/employeeProfileMessages.ts","webpack:///./src/shared/components/DynamicFilter.jsx","webpack:///./src/modules/relations/overview/relationOverviewMessages.js","webpack:///./src/modules/compliancy/CompliancyFilters.jsx","webpack:///./src/modules/compliancy/CompliancyContainer.jsx","webpack:///./src/shared/components/email/ForwardEmailModal.jsx","webpack:///./src/shared/components/dragAndDrop/DropZoneContainer.jsx","webpack:///./src/shared/components/dragAndDrop/withDropzone.jsx","webpack:///./src/shared/components/input/CheckboxList.jsx","webpack:///./src/shared/components/ShareItemModal.jsx","webpack:///./src/shared/components/CheckboxListModal.jsx","webpack:///./src/shared/utils/hiddenColumnsHelper.js","webpack:///./src/shared/components/registration/partials/FormGroupPart.jsx","webpack:///./src/shared/components/input/TimeInput.jsx","webpack:///./src/shared/components/DocumentSignatureRequestModal.jsx","webpack:///./src/modules/documents/modals/SharepointFolderTree.tsx","webpack:///./src/modules/documents/documentMessages.js","webpack:///./src/modules/documents/modals/SharepointModal.jsx","webpack:///./src/modules/documents/modals/ExtractZipModal.tsx","webpack:///./src/modules/documents/modals/SharepointFileSelector.tsx","webpack:///./src/modules/documents/modals/LinkFromSharepointModal.tsx","webpack:///./src/shared/components/CollapsableSidebar.tsx","webpack:///./src/shared/components/registration/resourceApi.js","webpack:///./src/shared/components/input/multiselect/TaskTagsMultiSelect.tsx","webpack:///./src/modules/tasks/taskMessages.js","webpack:///./src/modules/tasks/CreateToDoModal.jsx","webpack:///./src/shared/components/SearchRelation.jsx","webpack:///./src/shared/components/input/RelationListPicker.jsx","webpack:///./src/modules/documents/modals/UpdateDocumentRelationsModal.jsx","webpack:///./src/shared/components/Tag.jsx","webpack:///./src/modules/documents/DocumentGlobalActionsButton.jsx","webpack:///./src/modules/documents/modals/UpdateDocumentTagsModal.jsx","webpack:///./src/shared/messages/dateMessages.js","webpack:///./src/shared/components/input/DelayedDateRangePicker.jsx","webpack:///./src/shared/services/EmployeeFilterService.js","webpack:///./src/shared/utils/c.ts","webpack:///./src/shared/components/FilterSaveModal.tsx","webpack:///./src/shared/components/FilterSave.tsx","webpack:///./src/shared/components/FileViewers/error.jsx","webpack:///./src/modules/documents/DocumentFilters.jsx","webpack:///./src/shared/components/FileViewers/fileViewerMessages.js","webpack:///./src/shared/components/FileViewers/viewers/HtmlViewer.tsx","webpack:///./src/shared/components/FileViewers/WithFetching.jsx","webpack:///./src/shared/components/FileViewers/viewers/CsvViewer.jsx","webpack:///./src/shared/components/FileViewers/viewers/TextViewer.jsx","webpack:///./src/shared/components/FileViewers/viewers/PhotoViewer.jsx","webpack:///./src/shared/components/FileViewers/viewers/UnsupportedViewer.jsx","webpack:///./src/shared/components/FileViewers/viewers/VideoViewer.jsx","webpack:///./src/shared/components/FileViewers/viewers/EidViewer.jsx","webpack:///./src/shared/components/FileViewers/viewers/OutlookMsgViewer.jsx","webpack:///./src/shared/components/FileViewers/viewers/EmlViewer.jsx","webpack:///./src/shared/components/FileViewers/viewers/AudioViewer.jsx","webpack:///./src/shared/components/FileViewers/viewers/AdobeEmbedPdfViewer.js","webpack:///./src/shared/components/FileViewers/viewers/EmbeddableDocumentViewer.jsx","webpack:///./src/shared/components/FileViewers/FileViewer.jsx","webpack:///./src/shared/components/input/SimpleFileUpload.jsx","webpack:///./src/shared/components/FormattedDateTime.jsx","webpack:///./src/shared/providers/DataProvider.tsx","webpack:///./src/shared/components/email/ReplyToEmailModal.jsx","webpack:///./src/shared/components/registration/registrationMessages.js","webpack:///./src/shared/components/registration/partials/AssignmentFormGroup.jsx","webpack:///./src/shared/components/registration/partials/CostQuantityPart.jsx","webpack:///./src/shared/components/input/NumberInput.jsx","webpack:///./src/shared/components/registration/partials/DatePart.jsx","webpack:///./src/shared/components/registration/partials/DiscountPart.jsx","webpack:///./src/shared/components/registration/partials/TimeButtons.jsx","webpack:///./src/shared/components/registration/partials/DurationFormGroup.jsx","webpack:///./src/shared/components/input/DateInput.jsx","webpack:///./src/shared/components/registration/partials/DurationDaysInfoPart.jsx","webpack:///./src/shared/components/registration/partials/DurationDaysFormGroup.jsx","webpack:///./src/shared/components/registration/partials/DurationTypeFormGroup.jsx","webpack:///./src/shared/components/registration/partials/ReferenceYearPart.jsx","webpack:///./src/shared/components/registration/partials/HalfDayFormGroup.jsx","webpack:///./src/shared/components/registration/partials/InteractionFormGroup.jsx","webpack:///./src/shared/components/registration/partials/OwnCompanyRelationFormGroup.jsx","webpack:///./src/shared/components/FormattedCurrency.jsx","webpack:///./src/shared/components/registration/partials/PriceOptionsDropdown.jsx","webpack:///./src/shared/components/registration/partials/RelationFormGroup.jsx","webpack:///./src/shared/components/registration/partials/ResourceTypeRadioButtons.jsx","webpack:///./src/shared/components/input/OwnCompanyRelationSelect.jsx","webpack:///./src/shared/components/registration/partials/TaskFormGroup.jsx","webpack:///./src/shared/currencySymbols.js","webpack:///./src/shared/components/registration/partials/TotalAmountPart.jsx","webpack:///./src/shared/components/registration/partials/TravelQuantityPart.jsx","webpack:///./src/shared/components/registration/partials/UnitPricePart.jsx","webpack:///./src/shared/components/CurrencySymbol.jsx","webpack:///./src/shared/components/registration/vatPercentages.js","webpack:///./src/shared/components/input/VatRateTypeSelector.jsx","webpack:///./src/shared/components/registration/partials/VatPercentagePart.jsx","webpack:///./src/shared/components/registration/partials/AbsenceBalanceFormGroup.jsx","webpack:///./src/shared/components/registration/partials/UserFormGroup.jsx","webpack:///./src/shared/components/registration/RegistrationComponent.jsx","webpack:///./src/shared/components/input/filterInputs/FilterTaskTemplateSelect.tsx","webpack:///./src/shared/components/input/InvoiceStreamSelect.tsx","webpack:///./src/modules/tasks/CreateOneTimeTask.tsx","webpack:///./src/shared/hooks/task/useCreatePlannedTask.ts","webpack:///./src/modules/profile/accessTokens/scope/Scope.tsx","webpack:///./src/modules/profile/accessTokens/CreateAccessToken.tsx","webpack:///./src/shared/hooks/accessTokens/useGetClients.ts","webpack:///./src/shared/hooks/accessTokens/useGetScopes.ts","webpack:///./src/shared/hooks/accessTokens/useCreateAccessToken.ts","webpack:///./src/shared/utils/groupBy.ts","webpack:///./src/shared/providers/ModalProvider.tsx","webpack:///./src/shared/hooks/template/useSendTaskMail.ts","webpack:///./src/shared/hooks/emails/useCreateTaskMail.ts","webpack:///./src/shared/hooks/task/queryKey.ts","webpack:///./src/shared/hooks/accessTokens/queryKey.ts","webpack:///./src/shared/components/registration/RegistrationModal.jsx","webpack:///./src/shared/hooks/task/useGetTaskTemplates.ts","webpack:///./src/shared/utils/infiniteDataHelper.ts","webpack:///./src/modules/profile/accessTokens/accessTokenMessages.ts","webpack:///./src/shared/utils/nullable.js","webpack:///./src/shared/components/editable/EditableToggle.jsx","webpack:///./src/shared/components/editable/EditableTextArea.jsx","webpack:///./src/modules/tasks/TaskIcon.jsx","webpack:///./src/modules/tasks/TaskStatusIcon.jsx","webpack:///./src/modules/tasks/taskDetails/TaskDetailsParameterValue.jsx","webpack:///./src/modules/tasks/taskDetails/TaskDetailsRegistrations.jsx","webpack:///./src/modules/tasks/TaskAttachmentsPopover.tsx","webpack:///./src/modules/tasks/TaskStatusToggle.jsx","webpack:///./src/modules/tasks/taskDetails/TaskDetailsSubTasks.jsx","webpack:///./src/modules/tasks/taskDetails/TaskDetailsSentEmails.jsx","webpack:///./src/shared/components/editable/EditableAutoComplete.jsx","webpack:///./src/modules/documents/EditableDocumentTypeSelect.jsx","webpack:///./src/shared/components/security/HasFeature.jsx","webpack:///./src/modules/tasks/taskDetails/TaskDetailsDocuments.jsx","webpack:///./src/modules/tasks/taskDetails/TaskDetailsModal.jsx","webpack:///./src/modules/documents/details/EmailMetadataDetails.jsx","webpack:///./src/shared/components/input/TasksForMultipleRelationsSelector.jsx","webpack:///./src/modules/documents/details/DocumentAudits.tsx","webpack:///./src/modules/documents/details/DocumentDetailsModal.jsx","webpack:///./src/modules/documents/Dropzone.jsx","webpack:///./src/modules/documents/DocumentActionsButton.jsx","webpack:///./src/shared/components/StatusLabel.jsx","webpack:///./src/modules/documents/RecognitionStatus.jsx","webpack:///./src/shared/components/FormattedDayMonth.jsx","webpack:///./src/modules/relations/audit/components/AddressChange.jsx","webpack:///./src/shared/components/editable/EditableDatePicker.jsx","webpack:///./src/modules/relations/audit/components/FieldMessages.js","webpack:///./src/shared/components/input/TextInput.jsx","webpack:///./src/modules/documents/details/RelationImportModelDetail.jsx","webpack:///./src/modules/documents/EidDetail.jsx","webpack:///./src/modules/documents/RelationDocumentDetail.jsx","webpack:///./src/modules/documents/details/AuthorizationListDetail.jsx","webpack:///./src/modules/documents/details/RegistrationListDetail.jsx","webpack:///./src/modules/documents/DocumentDetailRow.jsx","webpack:///./src/shared/components/input/AddressInput.jsx","webpack:///./src/modules/documents/DocumentRow.jsx","webpack:///./src/modules/documents/modals/ChangeDocumentDateModal.jsx","webpack:///./src/modules/documents/modals/ChangeDocumentTypeModal.jsx","webpack:///./src/modules/documents/modals/SetIsPublicOnPortalModal.jsx","webpack:///./src/modules/documents/ProcessAuthorizationListModal.jsx","webpack:///./src/shared/components/input/DayMonthPicker.jsx","webpack:///./src/shared/components/editable/EditableDayMonthPicker.jsx","webpack:///./src/shared/components/editable/EditableSelect.jsx","webpack:///./src/modules/settings/InvoiceSchedules/invoiceScheduleMessages.js","webpack:///./src/shared/components/translations/TranslationHelper.js","webpack:///./src/shared/components/translations/TranslateListItem.jsx","webpack:///./src/modules/settings/InvoiceSchedules/InvoiceScheduleModal.jsx","webpack:///./src/modules/documents/ProcessRegistrationListModal.jsx","webpack:///./src/modules/documents/LinkRelationDocumentModal.jsx","webpack:///./src/modules/documents/modals/DownloadDocumentZipModal.jsx","webpack:///./src/modules/documents/details/AdvancedUploadModal.jsx","webpack:///./src/modules/documents/modals/SelectRelationModal.jsx","webpack:///./src/modules/documents/ForcedRelationMode.jsx","webpack:///./src/modules/documents/CheckoutReminderMode.jsx","webpack:///./src/modules/documents/DocumentsContainer.jsx","webpack:///./src/modules/documents/EmailRow.jsx","webpack:///./src/modules/documents/EmailGlobalActionsButton.jsx","webpack:///./src/modules/documents/EmailFilters.jsx","webpack:///./src/shared/utils/chartjsHelpers.js","webpack:///./src/modules/documents/EmailsContainer.jsx","webpack:///./src/modules/home/dashboardMessages.js","webpack:///./src/modules/home/dashboards/MonthlyRevenueDashboard.jsx","webpack:///./src/modules/home/dashboards/TopCustomerRevenueDashboard.jsx","webpack:///./src/modules/home/dashboards/ComplianceOverviewChart.jsx","webpack:///./src/modules/home/dashboards/CompliancePerTypeChart.jsx","webpack:///./src/modules/home/dashboards/ComplianceDashboard.jsx","webpack:///./src/modules/home/dashboards/RecentRelationsDashboard.jsx","webpack:///./src/modules/home/dashboards/SearchRelationDashboard.jsx","webpack:///./src/shared/components/editable/EditableTaskTagSelector.jsx","webpack:///./src/ajs/helpers.js","webpack:///./src/shared/utils/dateHelper.ts","webpack:///./src/modules/home/DashboardProvider.tsx","webpack:///./src/modules/home/dashboards/partials/DashboardTile.tsx","webpack:///./src/modules/home/dashboards/partials/DashboardTimeTile.tsx","webpack:///./src/modules/home/dashboards/TodoListDashboard.jsx","webpack:///./src/modules/tasks/taskboard/constants.ts","webpack:///./src/modules/home/dashboards/MyRegistrationsDashboard.jsx","webpack:///./src/shared/services/localStorageService.ts","webpack:///./src/modules/tasks/taskKpiMessages.ts","webpack:///./src/modules/home/dashboards/tasks/MultipleTaskKpiTiles.tsx","webpack:///./src/modules/home/dashboards/MyTaskKpiDashboard.tsx","webpack:///./src/shared/hooks/task/useGetTaskWidgetKPIs.ts","webpack:///./src/shared/components/loading/LoadingContainer.tsx","webpack:///./src/modules/home/dashboards/partials/DashboardTaskKpiTile.tsx","webpack:///./src/shared/components/ResourceName.jsx","webpack:///./src/modules/home/dashboards/partials/DashboardAbsenceTile.tsx","webpack:///./src/modules/home/dashboards/AbsenceDashboard.jsx","webpack:///./src/modules/home/dashboardsDefinitions.jsx","webpack:///./src/modules/home/dashboardHelpers.js","webpack:///./src/modules/home/dashboardLayoutService.js","webpack:///./src/modules/home/ResponsiveGridLayout.jsx","webpack:///./src/modules/home/HomeDashboardContainer.jsx","webpack:///./src/shared/components/ContactIcon.jsx","webpack:///./src/modules/interactions/interactionMessages.js","webpack:///./src/modules/interactions/RelationSummary.jsx","webpack:///./src/modules/interactions/InteractionTagMultiSelect.jsx","webpack:///./src/modules/interactions/InteractionFilters.jsx","webpack:///./src/modules/interactions/InteractionEvent.jsx","webpack:///./src/modules/interactions/CreateInteractionModal.jsx","webpack:///./src/modules/invoicing/toInvoice/RegistrationRemarkTooltip.jsx","webpack:///./src/modules/interactions/InteractionsContainer.jsx","webpack:///./src/modules/invoicing/invoicingMessages.js","webpack:///./src/shared/components/DynamicFilterDropdown.tsx","webpack:///./src/modules/invoicing/toInvoice/ToInvoiceDetail.jsx","webpack:///./src/shared/components/SavedFiltersButton.jsx","webpack:///./src/modules/invoicing/toInvoice/ToInvoiceGlobalActionsButton.jsx","webpack:///./src/modules/invoicing/toInvoice/ToInvoiceFilters.jsx","webpack:///./src/modules/invoicing/toInvoice/ToInvoiceContainer.jsx","webpack:///./src/shared/components/table/Column.jsx","webpack:///./src/shared/components/table/CollapsableTableRow.jsx","webpack:///./src/modules/jobs/JobStatus.tsx","webpack:///./src/modules/jobs/jobDetails/JobDetailUpdateTaskStatus.jsx","webpack:///./src/modules/jobs/jobDetails/JobDetailRelationFieldUpdate.jsx","webpack:///./src/modules/jobs/jobDetails/JobDetailCreateTaskSchedule.jsx","webpack:///./src/modules/jobs/jobDetails/JobDetailCreateRegistration.jsx","webpack:///./src/modules/jobs/jobDetails/JobDetailSetInvoiceSchedule.jsx","webpack:///./src/modules/jobs/jobDetails/JobDetailMailInvoices.jsx","webpack:///./src/modules/jobs/jobMessages.js","webpack:///./src/modules/jobs/jobDetails/JobDetailDeleteTaskSchedule.jsx","webpack:///./src/modules/jobs/jobDetails/JobDetailChangeTaskTags.jsx","webpack:///./src/modules/jobs/jobDetails/JobDetailSendRelationMail.jsx","webpack:///./src/modules/jobs/jobDetails/JobDetailPriceGridUpdate.jsx","webpack:///./src/modules/jobs/jobDetails/JobDetailReprocessInvoiceStreamSchedule.jsx","webpack:///./src/modules/jobs/jobDetails/JobDetailInitAbsenceCounter.jsx","webpack:///./src/modules/jobs/getLabelForJobEntity.js","webpack:///./src/modules/jobs/JobDetailContainer.jsx","webpack:///./src/modules/jobs/JobOverviewRow.jsx","webpack:///./src/shared/components/PeriodButtonGroup.jsx","webpack:///./src/modules/jobs/JobOverviewFilters.jsx","webpack:///./src/modules/notifications/NotificationRow.jsx","webpack:///./src/modules/jobs/JobOverviewContainer.jsx","webpack:///./src/modules/notifications/notificationMessages.js","webpack:///./src/modules/notifications/NotificationFilters.jsx","webpack:///./src/modules/notifications/NotificationOverviewContainer.jsx","webpack:///./src/shared/components/editable/EditableCompanyMultiSelect.jsx","webpack:///./src/modules/notifications/NotificationSettingsContainer.jsx","webpack:///./src/modules/pricegrids/priceGridMessages.js","webpack:///./src/modules/pricegrids/PriceGridNameModal.jsx","webpack:///./src/modules/pricegrids/RecalcRegistrationPriceModal.jsx","webpack:///./src/modules/pricegrids/PriceGridAmountModal.jsx","webpack:///./src/shared/components/editable/EditableCurrency.jsx","webpack:///./src/modules/pricegrids/PriceGridCell.jsx","webpack:///./src/modules/pricegrids/PriceGridSideBar.jsx","webpack:///./src/modules/pricegrids/PriceGrid.jsx","webpack:///./src/modules/relations/audit/components/FieldChange.jsx","webpack:///./src/modules/relations/audit/components/EnumChange.jsx","webpack:///./src/modules/relations/audit/components/RelationLinkChange.jsx","webpack:///./src/modules/relations/audit/components/UboLine.jsx","webpack:///./src/modules/relations/audit/components/AddressSettingChange.jsx","webpack:///./src/modules/pricegrids/PriceGridContainer.jsx","webpack:///./src/modules/relations/audit/components/RenderProperty.jsx","webpack:///./src/modules/relations/audit/components/RelationLinkProperty.jsx","webpack:///./src/modules/relations/audit/components/RelationCreated.jsx","webpack:///./src/modules/relations/audit/components/UboEnteredOnline.jsx","webpack:///./src/modules/relations/audit/components/AuthorizationChange.jsx","webpack:///./src/modules/relations/audit/components/AuthorizationPropertyChange.jsx","webpack:///./src/modules/relations/audit/components/Compliance.jsx","webpack:///./src/modules/relations/audit/components/BankAccountChange.jsx","webpack:///./src/modules/relations/audit/components/BankAccountPropertyChange.jsx","webpack:///./src/modules/relations/audit/components/InvoiceStreamChange.jsx","webpack:///./src/modules/relations/audit/components/InvoiceStreamPropertyChange.jsx","webpack:///./src/modules/relations/audit/RelationAuditContainer.jsx","webpack:///./src/shared/components/YearButtonGroup.jsx","webpack:///./src/shared/components/input/DelayedInput.jsx","webpack:///./src/modules/relations/budgets/budgetMessages.js","webpack:///./src/modules/relations/budgets/BudgetOverviewFilters.jsx","webpack:///./src/shared/components/editable/EditableNumber.jsx","webpack:///./src/modules/relations/budgets/budgetHelpers.js","webpack:///./src/modules/relations/budgets/BudgetGraph.jsx","webpack:///./src/shared/components/NavigateToState.jsx","webpack:///./src/modules/relations/budgets/BudgetRow.jsx","webpack:///./src/modules/relations/budgets/hooks/useRegistrationOverviewNavParams.tsx","webpack:///./src/modules/relations/budgets/GlobalActionsButton.jsx","webpack:///./src/modules/relations/budgets/modals/CopyBudgetModal.jsx","webpack:///./src/modules/relations/budgets/modals/UpdateBudgetAmountModal.jsx","webpack:///./src/modules/relations/budgets/modals/UpdateBudgetHoursModal.jsx","webpack:///./src/modules/relations/budgets/BigBudgetGraph.jsx","webpack:///./src/modules/relations/budgets/BudgetOverviewContainer.jsx","webpack:///./src/modules/relations/invoiceStreamOverview/invoiceStreamMessages.js","webpack:///./src/modules/relations/invoiceStreamOverview/InvoiceStreamRow.jsx","webpack:///./src/modules/relations/invoiceStreamOverview/InvoiceStreamGlobalActionsButton.jsx","webpack:///./src/modules/relations/invoiceStreamOverview/InvoiceStreamFilters.jsx","webpack:///./src/modules/relations/overview/modals/SetInvoiceScheduleModal.jsx","webpack:///./src/modules/relations/invoiceStreamOverview/modals/UpdateInvoiceStreamPriceGridModal.jsx","webpack:///./src/modules/relations/invoiceStreamOverview/modals/UpdateInvoiceStreamAmountModal.jsx","webpack:///./src/shared/components/input/AssignedToSelector.jsx","webpack:///./src/modules/relations/invoiceStreamOverview/modals/UpdateInvoiceStreamUserModal.jsx","webpack:///./src/modules/relations/invoiceStreamOverview/modals/ReprocessInvoiceStreamScheduleModal.jsx","webpack:///./src/modules/relations/invoiceStreamOverview/InvoiceStreamContainer.jsx","webpack:///./src/shared/components/ModalTitleZendeskHelp.jsx","webpack:///./src/shared/components/registration/BatchRegistrationModal.jsx","webpack:///./src/shared/components/BatchGenerateDocumentModal.jsx","webpack:///./src/modules/relations/overview/RelationOverviewRow.jsx","webpack:///./src/shared/components/UserName.jsx","webpack:///./src/modules/relations/overview/modals/UpdateTaskScheduleModal.jsx","webpack:///./src/modules/relations/overview/RelationOverviewFilters.jsx","webpack:///./src/modules/relations/overview/modals/UpdateRelationTeamModal.jsx","webpack:///./src/modules/relations/overview/modals/UpdateRelationTagsModal.jsx","webpack:///./src/modules/relations/overview/modals/UpdateRelationUserModal.jsx","webpack:///./src/modules/relations/overview/modals/SearchRelationsInPeppolNetworkModal.jsx","webpack:///./src/modules/relations/overview/GlobalActionsButton.jsx","webpack:///./src/modules/relations/overview/modals/FiscalReportModal.jsx","webpack:///./src/shared/components/input/CompanySelector.jsx","webpack:///./src/shared/components/input/LanguageSelect.jsx","webpack:///./src/modules/relations/overview/modals/UpdateRelationFieldModal.jsx","webpack:///./src/modules/relations/overview/modals/CreatePlannedTaskModal.jsx","webpack:///./src/shared/components/input/PriceGridSelector.jsx","webpack:///./src/modules/relations/overview/ExportButton.jsx","webpack:///./src/modules/relations/overview/modals/AddAssignmentModal.jsx","webpack:///./src/modules/relations/plannedRegistrationOverview/GlobalActionsButton.jsx","webpack:///./src/modules/relations/overview/RelationOverviewContainer.jsx","webpack:///./src/modules/relations/plannedRegistrationOverview/messages.js","webpack:///./src/modules/relations/plannedRegistrationOverview/PlannedRegistrationQuantity.jsx","webpack:///./src/modules/relations/plannedRegistrationOverview/PlannedRegistrationOverviewRow.jsx","webpack:///./src/modules/relations/plannedRegistrationOverview/PlannedRegistrationOverviewFilters.jsx","webpack:///./src/modules/relations/plannedRegistrationOverview/modals/CreatePlannedRegistrationsModal.jsx","webpack:///./src/modules/relations/plannedRegistrationOverview/modals/ChangePlannedRegistrationUserModal.jsx","webpack:///./src/modules/relations/plannedRegistrationOverview/PlannedRegistrationOverviewContainer.jsx","webpack:///./src/modules/relations/taskScheduleOverview/taskScheduleMessages.js","webpack:///./src/modules/relations/taskScheduleOverview/GlobalActionsButton.jsx","webpack:///./src/modules/relations/taskScheduleOverview/OverviewFilters.jsx","webpack:///./src/modules/relations/taskScheduleOverview/TaskScheduleOverviewContainer.jsx","webpack:///./src/modules/reporting/reportingMessages.js","webpack:///./src/modules/reporting/absencePerEmployee/HourColumn.jsx","webpack:///./src/modules/hrm/EmployeeTagMultiSelect.jsx","webpack:///./src/modules/reporting/absencePerEmployee/AbsencePerEmployeeFilters.jsx","webpack:///./src/modules/reporting/absencePerEmployee/DaysColumn.jsx","webpack:///./src/shared/components/input/MonthYearPicker.tsx","webpack:///./src/shared/components/input/multiselect/ResourceMultiSelect.tsx","webpack:///./src/modules/reporting/absencePerEmployee/AbsencePerEmployeeContainer.jsx","webpack:///./src/modules/reporting/absenceCalendar/AbsenceCalendarFilters.jsx","webpack:///./src/modules/reporting/absenceCalendar/AddAbsenceDropdownButton.jsx","webpack:///./src/modules/reporting/absenceCalendar/AbsenceCalendarContainer.jsx","webpack:///./src/modules/reporting/hoursPerEmployee/AddRegistrationDropdownButton.jsx","webpack:///./src/shared/components/registration/FillGapsRegistrationModal.jsx","webpack:///./src/shared/components/editable/EditableTimeInput.jsx","webpack:///./src/modules/reporting/hoursPerEmployee/HoursPerEmployeeReportHomeWorkingRow.jsx","webpack:///./src/shared/components/input/SimpleDatePicker.jsx","webpack:///./src/shared/components/ResourceTypeButtonGroup.jsx","webpack:///./src/modules/reporting/hoursPerEmployee/HoursPerEmployeeReportPeriods.jsx","webpack:///./src/modules/reporting/hoursPerEmployee/HoursPerEmployeeReportFilters.jsx","webpack:///./src/modules/reporting/hoursPerEmployee/HoursPerEmployeeReportDetailRow.jsx","webpack:///./src/modules/reporting/hoursPerEmployee/HoursPerEmployeeReportCell.jsx","webpack:///./src/modules/reporting/registrationsPer/ExportToExcelDropdown.jsx","webpack:///./src/modules/reporting/hoursPerEmployee/HoursPerEmployeeReportContainer.jsx","webpack:///./src/modules/reporting/invoicingHistory/InvoicingHistoryFilters.jsx","webpack:///./src/modules/reporting/invoicingHistory/InvoicingHistoryHelpers.jsx","webpack:///./src/modules/reporting/invoicingHistory/InvoicingHistoryVirtualTable.jsx","webpack:///./src/modules/reporting/invoicingHistory/InvoicingHistoryContainer.jsx","webpack:///./src/shared/components/ScrollArrow.jsx","webpack:///./src/modules/reporting/registrationsPer/GroupByFilter.jsx","webpack:///./src/modules/reporting/registrationsPer/RegistrationsPerReportFilters.jsx","webpack:///./src/modules/reporting/registrationsPer/InForfaitCheckbox.jsx","webpack:///./src/modules/reporting/registrationsPer/HoursColumnValue.jsx","webpack:///./src/modules/reporting/registrationsPer/AmountColumnValue.jsx","webpack:///./src/modules/reporting/registrationsPer/QuantityColumnValue.jsx","webpack:///./src/modules/reporting/registrationsPer/helpers.jsx","webpack:///./src/modules/reporting/registrationsPer/RegistrationsPerReportTable.jsx","webpack:///./src/modules/reporting/registrationsPer/RegistrationsPerReport.jsx","webpack:///./src/modules/reporting/registrationsPer/RegistrationsPerResourceCategoryContainer.jsx","webpack:///./src/modules/reporting/registrationsPer/RegistrationsPerTaskTemplateContainer.jsx","webpack:///./src/modules/reporting/registrationsPer/RegistrationsPerUserContainer.jsx","webpack:///./src/modules/reporting/registrationsPer/relation/RegistrationsPerRow.jsx","webpack:///./src/modules/reporting/registrationsPer/relation/RegistrationsPerRelationContainer.jsx","webpack:///./src/modules/reporting/relationRentability/RelationRentabilityFilters.jsx","webpack:///./src/modules/reporting/relationRentability/RelationRentabilityContainer.jsx","webpack:///./src/shared/components/editable/EditableTextbox.jsx","webpack:///./src/modules/settings/AssignmentTemplates/assignmentTemplateMessages.js","webpack:///./src/modules/settings/AssignmentTemplates/AddAssignmentTemplateModal.jsx","webpack:///./src/modules/settings/AssignmentTemplates/AddTaskTemplateModal.jsx","webpack:///./src/shared/components/translations/TranslateListItemModal.jsx","webpack:///./src/modules/settings/AssignmentTemplates/EditBlockedResourcesModal.jsx","webpack:///./src/modules/settings/AssignmentTemplates/AssignmentTemplateContainer.jsx","webpack:///./src/modules/settings/Tags/tagSettingsMessages.js","webpack:///./src/modules/settings/Tags/TaskTagOverview.jsx","webpack:///./src/modules/settings/Tags/RelationTagOverview.jsx","webpack:///./src/modules/settings/Documents/documentTypesService.js","webpack:///./src/modules/settings/Tags/Modals/EditDocumentTagTypesDialog.jsx","webpack:///./src/modules/settings/Tags/Modals/EditDocumentTypesTagDialog.jsx","webpack:///./src/modules/settings/Tags/DocumentTagConfiguration.jsx","webpack:///./src/modules/settings/Tags/InteractionTagOverview.jsx","webpack:///./src/modules/settings/Tags/RelationGroupOverview.jsx","webpack:///./src/modules/settings/Tags/EmployeeTagOverview.jsx","webpack:///./src/modules/settings/Tags/TagSettingsContainer.jsx","webpack:///./src/modules/settings/Documents/DocumentTreeConfiguration.jsx","webpack:///./src/modules/settings/DocumentTemplates/documentTemplateMessages.js","webpack:///./src/shared/utils/httpHelpers.js","webpack:///./src/shared/components/SecureImage.jsx","webpack:///./src/modules/settings/DocumentTemplates/PreviewDocumentTemplateModal.jsx","webpack:///./src/modules/settings/DocumentTemplates/AddDocumentTemplateModal.jsx","webpack:///./src/modules/settings/DocumentTemplates/PlaceholdersModal.jsx","webpack:///./src/modules/settings/DocumentTemplates/examples.ts","webpack:///./src/modules/settings/DocumentTemplates/DocumentTemplateExamples.jsx","webpack:///./src/modules/settings/DocumentTemplates/TaskPlaceholdersModal.jsx","webpack:///./src/modules/settings/InvoiceSchedules/InvoiceScheduleLinesTable.jsx","webpack:///./src/modules/settings/InvoiceSchedules/InvoiceSchedulesTable.jsx","webpack:///./src/modules/settings/DocumentTemplates/DocumentTemplateContainer.jsx","webpack:///./src/modules/settings/InvoiceSchedules/InvoiceSchedulesContainer.jsx","webpack:///./src/modules/settings/teams/teamMessages.js","webpack:///./src/modules/settings/teams/SelectEmployeeModal.jsx","webpack:///./src/modules/settings/WorkflowConfiguration/WorkflowConfigurationTable.jsx","webpack:///./src/modules/settings/teams/TeamsContainer.jsx","webpack:///./src/modules/settings/WorkflowConfiguration/workflowConfigurationMessages.js","webpack:///./src/modules/tasks/TaskTemplateFilter.jsx","webpack:///./src/modules/settings/WorkflowConfiguration/WorkflowConfigurationModal.jsx","webpack:///./src/modules/settings/WorkflowConfiguration/WorkflowConfigurationContainer.jsx","webpack:///./src/shared/components/charts/HorizontalBar.jsx","webpack:///./src/modules/tasks/dashboard/taskDashboardUtils.js","webpack:///./src/modules/tasks/dashboard/PercentagesDashboard.jsx","webpack:///./src/modules/tasks/dashboard/QuantitiesDashboard.jsx","webpack:///./src/shared/components/ClearButtonWrapper.jsx","webpack:///./src/modules/tasks/dashboard/TaskDashboardFilters.jsx","webpack:///./src/modules/tasks/dashboard/TaskDashboardContainer.jsx","webpack:///./src/modules/tasks/DynamicTaskFilter.jsx","webpack:///./src/modules/tasks/taskList/TaskListFilters.jsx","webpack:///./src/shared/components/editable/EditableUserSearch.jsx","webpack:///./src/modules/tasks/taskList/TaskListActionsButton.jsx","webpack:///./src/modules/tasks/taskList/TaskListRow.jsx","webpack:///./src/modules/tasks/taskList/TaskListGlobalActionsButton.jsx","webpack:///./src/modules/tasks/taskList/ChangeAssignedUserModal.jsx","webpack:///./src/modules/tasks/ChangeTaskDeadlineModal.jsx","webpack:///./src/modules/tasks/ChangeTaskTagsModal.jsx","webpack:///./src/modules/tasks/taskList/TaskListContainer.jsx","webpack:///./src/modules/tasks/ResetDeadlineModal.jsx","webpack:///./src/modules/tasks/ChangeSubtaskDeadlineModal.jsx","webpack:///./src/modules/tasks/taskOverview/ChangeMainTaskStatusModal.jsx","webpack:///./src/modules/tasks/taskOverview/TaskGlobalActionsButton.jsx","webpack:///./src/modules/tasks/ChangeTaskStatusModal.jsx","webpack:///./src/modules/tasks/taskOverview/TaskOverviewFilters.jsx","webpack:///./src/modules/tasks/taskOverview/TaskOverviewCell.jsx","webpack:///./src/modules/tasks/taskOverview/TaskOverviewRow.jsx","webpack:///./src/modules/tasks/taskOverview/TaskOverviewContainer.jsx","webpack:///./src/shared/components/registration/RegistrationFormTestContainer.jsx","webpack:///./src/modules/invoicing/intraCompany/hooks/useGetIntraCompanyOverview.ts","webpack:///./src/modules/invoicing/intraCompany/IntraCompanyDetails.tsx","webpack:///./src/modules/invoicing/intraCompany/IntraCompanyFilters.tsx","webpack:///./src/modules/invoicing/intraCompany/NoRelationWarningIcon.tsx","webpack:///./src/modules/invoicing/intraCompany/IntraCompanyTable.tsx","webpack:///./src/modules/invoicing/intraCompany/helpers.ts","webpack:///./src/shared/components/security/showWhenFeature.jsx","webpack:///./src/modules/invoicing/intraCompany/hooks/queryKey.ts","webpack:///./src/modules/invoicing/intraCompany/messages.ts","webpack:///./src/modules/invoicing/intraCompany/hooks/useRemoveDetailRow.ts","webpack:///./src/modules/invoicing/intraCompany/hooks/useToggleIntraCompanyBilling.ts","webpack:///./src/modules/invoicing/intraCompany/hooks/useBillRegistration.ts","webpack:///./src/modules/invoicing/intraCompany/hooks/useBillCompany.ts","webpack:///./src/modules/invoicing/intraCompany/hooks/useBatchToggleIntraCompanyBilling.ts","webpack:///./src/shared/components/input/select/Button.jsx","webpack:///./src/modules/invoicing/intraCompany/hooks/useBatchBill.ts","webpack:///./src/shared/hooks/useRowSelection.ts","webpack:///./src/modules/invoicing/intraCompany/IntraCompanyBillingContainer.tsx","webpack:///./src/modules/hrm/hrmMessages.js","webpack:///./src/modules/hrm/overview/AbsenceCounterCell.jsx","webpack:///./src/modules/hrm/overview/HrmOverviewRow.jsx","webpack:///./src/modules/hrm/overview/GlobalActionButton.jsx","webpack:///./src/modules/hrm/overview/HrmOverviewFilters.jsx","webpack:///./src/modules/hrm/modals/AbsenceCorrectionModal.jsx","webpack:///./src/modules/hrm/overview/HrmModals.jsx","webpack:///./src/modules/hrm/modals/BatchInitCounterModal.jsx","webpack:///./src/modules/registrations/modals/CreateTimerRegistrationModal.tsx","webpack:///./src/modules/hrm/overview/HrmOverviewContainer.jsx","webpack:///./src/shared/components/withIntl.jsx","webpack:///./src/modules/tasks/taskboard/kanban/constants.ts","webpack:///./src/shared/services/SharedWorkerPolyfill.ts","webpack:///./src/shared/services/TimerRegistrationService.ts","webpack:///./src/shared/providers/TaskTimerProvider.tsx","webpack:///./src/shared/hooks/task/useGetTimerRegistration.ts","webpack:///./src/shared/providers/AppProviders.tsx","webpack:///./src/modules/tasks/taskboard/kanban/task/ClosedTask.tsx","webpack:///./src/shared/hooks/task/useGetPlannedTaskRemark.ts","webpack:///./src/shared/hooks/task/registration/useCreateTaskTimeRegistration.ts","webpack:///./src/shared/hooks/task/useUpdateTaskStatus.ts","webpack:///./src/modules/tasks/taskboard/kanban/helper.ts","webpack:///./src/shared/hooks/task/useUpdateAssignedUser.ts","webpack:///./src/shared/hooks/task/useDeletePlannedTask.ts","webpack:///./src/shared/hooks/task/useGetTaskAttachments.ts","webpack:///./src/shared/hooks/task/useUpdateTaskDeadline.ts","webpack:///./src/modules/tasks/taskboard/kanban/task/TaskDropdownButton.tsx","webpack:///./src/shared/hooks/task/useGetTaskDocumentation.ts","webpack:///./src/modules/tasks/taskboard/kanban/task/SubTask.tsx","webpack:///./src/modules/tasks/taskboard/kanban/KanbanBoard.tsx","webpack:///./src/modules/tasks/taskboard/kanban/task/MainTask.tsx","webpack:///./src/modules/tasks/taskboard/kanban/task/OpenTask.tsx","webpack:///./src/modules/tasks/taskboard/kanban/task/TaskRow.tsx","webpack:///./src/modules/tasks/taskboard/partial/SortTaskComponent.tsx","webpack:///./src/modules/tasks/taskboard/TaskContainer.tsx","webpack:///./src/shared/hooks/task/useGetKPIs.ts","webpack:///./src/shared/components/input/filterInputs/FilterStatusSelect.tsx","webpack:///./src/shared/components/input/multiselect/TaskTemplateMultiSelect.tsx","webpack:///./src/shared/components/input/filterInputs/FilterSubtaskTemplateSelect.tsx","webpack:///./src/shared/hooks/task/useGetSubtaskTemplates.ts","webpack:///./src/shared/components/input/filterInputs/FilterPlannedTasksTagsMultiSelect.tsx","webpack:///./src/shared/hooks/task/useGetPlannedTaskTags.ts","webpack:///./src/shared/components/input/filterInputs/FilterResourceTagsMultiSelect.tsx","webpack:///./src/shared/hooks/task/useGetResourceTags.ts","webpack:///./src/shared/components/input/MultiSelectButtons.tsx","webpack:///./src/shared/components/input/filterInputs/FilterMyTeamsMultiSelect.tsx","webpack:///./src/shared/hooks/task/useGetMyTeams.ts","webpack:///./src/shared/components/input/filterInputs/FilterTaskPeriodicitySelect.tsx","webpack:///./src/shared/hooks/task/useGetTaskPeriodicity.ts","webpack:///./src/shared/components/input/filterInputs/FilterAssignmentTemplateSelector.tsx","webpack:///./src/shared/hooks/task/useGetAssignmentTemplates.ts","webpack:///./src/shared/components/FilterWrapper.tsx","webpack:///./src/modules/tasks/taskboard/partial/filters/TaskBoardKPIFilterButton.tsx","webpack:///./src/modules/tasks/taskboard/partial/filters/TaskBoardHeader.tsx","webpack:///./src/modules/profile/accessTokens/accessTokens.tsx","webpack:///./src/shared/hooks/accessTokens/useGetAccessTokens.ts","webpack:///./src/shared/hooks/accessTokens/useRevokeAccessToken.ts","webpack:///./src/shared/messages/appMessages.js","webpack:///./src/shared/components/editable/EditableEnumSelectV2.tsx","webpack:///./src/modules/tasks/taskboard/taskboardMessages.ts","webpack:///./src/shared/hooks/task/useGetPlannedTasks.ts","webpack:///./src/shared/components/input/filterInputs/FilterUserSearch.tsx","webpack:///./src/shared/components/input/filterInputs/FilterTaskTemplateMultiSelect.tsx","webpack:///./src/shared/components/input/filterInputs/FilterDelayedDateRangePicker.tsx","webpack:///./src/shared/components/input/filterInputs/FilterRelationSearch.tsx","webpack:///./src/shared/components/input/filterInputs/FilterEnumMultiSelect.tsx","webpack:///./src/shared/components/input/filterInputs/FilterLegalFormMultiSelect.tsx","webpack:///./src/shared/components/input/filterInputs/FilterCompanyMultiSelect.tsx","webpack:///./src/shared/components/input/filterInputs/FilterEndFiscalYearMultiSelect.tsx","webpack:///./src/shared/components/input/filterInputs/FilterRelationTypeButtons.tsx","webpack:///./src/shared/components/input/filterInputs/FilterToggleSelect.tsx","webpack:///./src/shared/components/input/filterInputs/FilterRelationGroupMultiSelect.tsx","webpack:///./src/shared/components/input/filterInputs/FilterReferenceYear.tsx","webpack:///./src/modules/tasks/taskboard/partial/filters/TaskboardFilterKPIs.tsx","webpack:///./src/modules/tasks/taskboard/TaskboardContainer.tsx","webpack:///./src/modules/relations/relationfile/InvoicedRelationsModal.jsx","webpack:///./src/modules/settings/TenantRoles/tenantRoleMessages.js","webpack:///./src/modules/settings/TenantRoles/TenantRoleConfigModal.jsx","webpack:///./src/modules/settings/TenantRoles/AddTenantRoleDropdownButton.jsx","webpack:///./src/modules/settings/TenantRoles/TenantRoleContainer.jsx","webpack:///./src/ajs/components.js","webpack:///./src/ajs/cloudXModule.js","webpack:///./src/ajs/common/commonServices.module.js","webpack:///./src/ajs/common/httpServices.module.js","webpack:///./src/ajs/common/table/table.module.js","webpack:///./src/ajs/invoicing/invoicing.module.js","webpack:///./src/ajs/notifications/notifications.module.js","webpack:///./src/ajs/registrations/registrations.module.js","webpack:///./src/ajs/relations/relations.module.js","webpack:///./src/ajs/settings/settings.module.js","webpack:///./src/ajs/taskflow/taskflow.module.js","webpack:///./src/ajs/translations/translations.module.js","webpack:///./src/ajs/menuDrv.js","webpack:///./src/ajs/templateInterceptorSvc.js","webpack:///./src/ajs/authentication/developmentOnly.js","webpack:///./src/ajs/collapsableSidebarCtrl.js","webpack:///./src/ajs/authentication/checkFeatureSvc.js","webpack:///./src/ajs/authentication/assignmentsEnabled.js","webpack:///./src/ajs/authentication/authInterceptorSvc.js","webpack:///./src/ajs/authentication/authService.js","webpack:///./src/ajs/authentication/checkSecuritySvc.js","webpack:///./src/ajs/authentication/checkInvoiceTeamAccessSvc.js","webpack:///./src/ajs/authentication/featureDrv.js","webpack:///./src/ajs/authentication/checkTenantConfigurationSvc.js","webpack:///./src/ajs/authentication/tenantConfigurationDrv.js","webpack:///./src/ajs/authentication/featureFilter.js","webpack:///./src/ajs/authentication/multiCompanyOnly.js","webpack:///./src/ajs/authentication/securityDrv.js","webpack:///./src/ajs/authentication/securityFilter.js","webpack:///./src/ajs/authentication/tenantConfigurationOrFeatureDrv.js","webpack:///./src/ajs/authentication/tenantConfigurationFilter.js","webpack:///./src/ajs/authentication/timeTablesEnabled.js","webpack:///./src/ajs/common/dialogs/calcDistanceDialogCtrl.js","webpack:///./src/ajs/common/dialogs/checkboxListDialogCtrl.js","webpack:///./src/ajs/common/dialogs/confirmChangesDialogCtrl.js","webpack:///./src/ajs/common/dialogs/dialogsSvc.js","webpack:///./src/ajs/common/dialogs/externalRelationSearchDialogCtrl.js","webpack:///./src/ajs/common/dialogs/okCancelDialogCtrl.js","webpack:///./src/ajs/common/dialogs/relationWizardDialogCtrl.js","webpack:///./src/ajs/common/dialogs/similarRelationDialogCtrl.js","webpack:///./src/ajs/common/dialogs/translateListItemDialogCtrl.js","webpack:///./src/ajs/common/dialogs/yesNoCancelDialogCtrl.js","webpack:///./src/ajs/common/dialogs/yesNoDialogCtrl.js","webpack:///./src/ajs/common/dialogs/updateRegistrationsInternalPriceDialogCtrl.js","webpack:///./src/ajs/common/dialogs/availableRelationTagsDialogCtrl.js","webpack:///./src/ajs/common/dialogs/invalidEmailWarningDialogCtrl.js","webpack:///./src/ajs/common/dialogs/stringInputDialogCtrl.js","webpack:///./src/ajs/common/dialogs/shareItemDialogCtrl.js","webpack:///./src/ajs/common/directives/addressListDrv.js","webpack:///./src/ajs/common/directives/addressListFormDrv.js","webpack:///./src/ajs/common/directives/addressSelectDrv.js","webpack:///./src/ajs/common/directives/assignmentTemplateTypeaheadDrv.js","webpack:///./src/ajs/common/directives/boolSelectDrv.js","webpack:///./src/ajs/common/directives/bootstrapSizeDrv.js","webpack:///./src/ajs/common/directives/calendarDrv.js","webpack:///./src/ajs/common/directives/checkAdvancedUpload.js","webpack:///./src/ajs/common/directives/checkboxDrv.js","webpack:///./src/ajs/common/directives/ckeditorDrv.js","webpack:///./src/ajs/common/directives/colorPreviewDrv.js","webpack:///./src/ajs/common/directives/communicationListDrv.js","webpack:///./src/ajs/common/directives/contactIconDrv.js","webpack:///./src/ajs/common/directives/contactSelectDrv.js","webpack:///./src/ajs/common/directives/convertToNumberDrv.js","webpack:///./src/ajs/common/directives/countryDrv.js","webpack:///./src/ajs/common/directives/countrySelectDrv.js","webpack:///./src/ajs/common/directives/countryPickerDrv.js","webpack:///./src/ajs/common/directives/countryTypeaheadDrv.js","webpack:///./src/ajs/common/directives/companySelectDrv.js","webpack:///./src/ajs/common/directives/companyPickerDrv.js","webpack:///./src/ajs/common/directives/configurationPickerDrv.js","webpack:///./src/ajs/common/directives/confirmOnExitDrv.js","webpack:///./src/ajs/common/directives/copyToClipboardButton.js","webpack:///./src/ajs/common/directives/crmTypeDrv.js","webpack:///./src/ajs/common/directives/currencyDrv.js","webpack:///./src/ajs/common/directives/currencySelectDrv.js","webpack:///./src/ajs/common/directives/currencyTypeaheadDrv.js","webpack:///./src/ajs/common/Filters/relationNameFilter.js","webpack:///./src/ajs/common/directives/dayMonthConverterDrv.js","webpack:///./src/ajs/common/directives/dashboardDrv.js","webpack:///./src/ajs/common/directives/datepickerLocaldateDrv.js","webpack:///./src/ajs/common/directives/dateScrollerDrv.js","webpack:///./src/ajs/common/directives/datetimepickerNeutralTimezoneDrv.js","webpack:///./src/ajs/common/directives/dayMonthPickerDrv.js","webpack:///./src/ajs/common/directives/documentsDropdownDrv.js","webpack:///./src/ajs/common/directives/documentTemplateSelectDrv.js","webpack:///./src/ajs/common/directives/eidUploadDrv.js","webpack:///./src/ajs/common/directives/elasticDrv.js","webpack:///./src/ajs/common/directives/emptyToNull.js","webpack:///./src/ajs/common/directives/endFiscalYearPickerDrv.js","webpack:///./src/ajs/common/directives/enumCheckboxSelectDrv.js","webpack:///./src/ajs/common/directives/enumDrv.js","webpack:///./src/ajs/common/directives/enumPickerDrv.js","webpack:///./src/ajs/common/directives/enumSelectDrv.js","webpack:///./src/ajs/common/directives/europeanOnly.js","webpack:///./src/ajs/common/directives/externalServiceLinkDrv.js","webpack:///./src/ajs/common/directives/noneEuropeanOnly.js","webpack:///./src/ajs/common/directives/fileDropzoneDrv.js","webpack:///./src/ajs/common/directives/fileUploadDrv.js","webpack:///./src/ajs/common/directives/savedFiltersButton.js","webpack:///./src/ajs/common/directives/focusThisDrv.js","webpack:///./src/ajs/common/directives/formKeyCommandsDrv.js","webpack:///./src/ajs/common/directives/genderXeditDrv.js","webpack:///./src/ajs/common/directives/generalMeetingDrv.js","webpack:///./src/ajs/common/directives/groupedTypeaheadDrv.js","webpack:///./src/ajs/common/directives/hoverDropDown.js","webpack:///./src/ajs/common/directives/imageLoaderDrv.js","webpack:///./src/ajs/common/directives/interactionTypeIconDrv.js","webpack:///./src/ajs/common/directives/international-phone-number.js","webpack:///./src/ajs/common/directives/invoiceExpiryDateDrv.js","webpack:///./src/ajs/common/directives/invoiceScheduleTypeCheckboxSelectDrv.js","webpack:///./src/ajs/common/directives/jurisdictionSelectDrv.js","webpack:///./src/ajs/common/directives/languageDrv.js","webpack:///./src/ajs/common/directives/languageSelectDrv.js","webpack:///./src/ajs/common/directives/legalFormPickerDrv.js","webpack:///./src/ajs/common/directives/legalFormSelectDrv.js","webpack:///./src/ajs/common/directives/legalFormTypeaheadDrv.js","webpack:///./src/ajs/common/directives/limitDigitsDrv.js","webpack:///./src/ajs/common/directives/moveCaretOnFocus.js","webpack:///./src/ajs/common/directives/myCurrentTimeDrv.js","webpack:///./src/ajs/common/directives/myDateDrv.js","webpack:///./src/ajs/common/directives/optionTypeaheadDropdownDrv.js","webpack:///./src/ajs/common/directives/optionXeditDrv.js","webpack:///./src/ajs/common/directives/percentageDrv.js","webpack:///./src/ajs/common/directives/postAddressFormDrv.js","webpack:///./src/ajs/common/directives/priceGridSelectDrv.js","webpack:///./src/ajs/common/directives/recentRelationsBarDrv.js","webpack:///./src/ajs/common/directives/relationTypeButtonGroupDrv.js","webpack:///./src/ajs/common/directives/relationIconDrv.js","webpack:///./src/ajs/common/directives/relationFreeTextInputDrv.js","webpack:///./src/ajs/common/directives/routeSelectDrv.js","webpack:///./src/ajs/common/directives/salutationDrv.js","webpack:///./src/ajs/common/directives/salutationSelectDrv.js","webpack:///./src/ajs/common/directives/sectionCtrl.js","webpack:///./src/ajs/common/directives/sectionDrv.js","webpack:///./src/ajs/common/directives/selectOnFocus.js","webpack:///./src/ajs/common/directives/sortHeaderDrv.js","webpack:///./src/ajs/common/directives/sortIcon.js","webpack:///./src/ajs/common/directives/subSectionDrv.js","webpack:///./src/ajs/common/directives/tagInputXeditDrv.js","webpack:///./src/ajs/common/directives/employeeTagInputXeditDrv.js","webpack:///./src/ajs/common/directives/tagPickerDrv.js","webpack:///./src/ajs/common/directives/tagSelectDrv.js","webpack:///./src/ajs/common/directives/taskStatusIconDrv.js","webpack:///./src/ajs/common/directives/taskStatusToggleDrv.js","webpack:///./src/ajs/common/directives/taskTemplatePickerDrv.js","webpack:///./src/ajs/common/directives/teamInputXeditDrv.js","webpack:///./src/ajs/common/directives/teamPickerDrv.js","webpack:///./src/ajs/common/directives/timeInputDrv.js","webpack:///./src/ajs/common/directives/timeInputXeditDrv.js","webpack:///./src/ajs/common/directives/timespanDatetimeDrv.js","webpack:///./src/ajs/common/directives/toggleCollapsedDrv.js","webpack:///./src/ajs/common/directives/toggleButtonDrv.js","webpack:///./src/ajs/common/directives/translateBtnDrv.js","webpack:///./src/ajs/common/directives/translateListItemDrv.js","webpack:///./src/ajs/common/directives/typeaheadDropdown.js","webpack:///./src/ajs/common/directives/uibSearchRelationDrv.js","webpack:///./src/ajs/common/directives/uiSelectOpenOnFocusDrv.js","webpack:///./src/ajs/common/directives/updateOnEnter.js","webpack:///./src/ajs/common/directives/userSelectDrv.js","webpack:///./src/ajs/common/directives/userSettingDrv.js","webpack:///./src/ajs/common/directives/userTypeaheadDrv.js","webpack:///./src/ajs/common/directives/vatNumberDrv.js","webpack:///./src/ajs/common/directives/vatPercentageDrv.js","webpack:///./src/ajs/common/directives/vatRateTypeSelect.js","webpack:///./src/ajs/common/directives/vatRateTypeXedit.js","webpack:///./src/ajs/common/directives/zendeskHelpDrv.js","webpack:///./src/ajs/common/directives/relationAdministrativeCostDrv.js","webpack:///./src/ajs/common/directives/relationSelectDrv.js","webpack:///./src/ajs/common/directives/relationGroupPickerDrv.js","webpack:///./src/ajs/common/directives/relationGroupSelectDrv.js","webpack:///./src/ajs/common/directives/relationGroupTypeaheadDrv.js","webpack:///./src/ajs/common/directives/resetTaskAssignedToDialogCtrl.js","webpack:///./src/ajs/common/directives/userPickerDrv.js","webpack:///./src/ajs/common/directives/enumPickerXeditDrv.js","webpack:///./src/ajs/common/directives/stringAsEnumListDrv.js","webpack:///./src/ajs/common/directives/yearSelectDrv.js","webpack:///./src/ajs/common/directives/naceCodeInputXeditDrv.js","webpack:///./src/ajs/common/directives/naceCodeDropdown.js","webpack:///./src/ajs/common/directives/spinner/loadingDrv.js","webpack:///./src/ajs/common/directives/spinner/loadingSmDrv.js","webpack:///./src/ajs/common/Filters/bAnd.js","webpack:///./src/ajs/common/Filters/bytesFilter.js","webpack:///./src/ajs/common/Filters/deviationFilter.js","webpack:///./src/ajs/common/Filters/dynNumberFilter.js","webpack:///./src/ajs/common/Filters/editFilter.js","webpack:///./src/ajs/common/Filters/ogmFilter.js","webpack:///./src/ajs/common/Filters/invoiceStreamNameFilter.js","webpack:///./src/ajs/common/Filters/isActiveFilter.js","webpack:///./src/ajs/common/Filters/isEmpty.js","webpack:///./src/ajs/common/Filters/joinByFilter.js","webpack:///./src/ajs/common/Filters/mimeIcon.js","webpack:///./src/ajs/common/Filters/nullDateFilter.js","webpack:///./src/ajs/common/Filters/ownCompanyNameFilter.js","webpack:///./src/ajs/common/Filters/percentageFilter.js","webpack:///./src/ajs/common/Filters/postAddressFilter.js","webpack:///./src/ajs/common/Filters/regResourceSearchFilter.js","webpack:///./src/ajs/common/Filters/regTaskNameFilter.js","webpack:///./src/ajs/common/Filters/resourceNameFilter.js","webpack:///./src/ajs/common/Filters/showAddressDataFilter.js","webpack:///./src/ajs/common/Filters/showContactDataFilter.js","webpack:///./src/shared/utils/signingStatusClassName.js","webpack:///./src/ajs/common/Filters/signingStatusIconFilter.js","webpack:///./src/ajs/common/Filters/similarFilter.js","webpack:///./src/ajs/common/Filters/timeFilter.js","webpack:///./src/ajs/common/Filters/timespanToDateFilter.js","webpack:///./src/ajs/common/Filters/translateListFilter.js","webpack:///./src/ajs/common/Filters/typeaheadHighlightFilter.js","webpack:///./src/ajs/common/Filters/userNameFilter.js","webpack:///./src/ajs/common/Filters/formatTimeFilter.js","webpack:///./src/ajs/common/Filters/vatRateTypeFilter.js","webpack:///./src/ajs/common/Filters/dateFormatFilters.js","webpack:///./src/ajs/common/Filters/sanitizeFilter.js","webpack:///./src/ajs/common/Filters/domPurify.js","webpack:///./src/ajs/common/Filters/parseJsonFilter.js","webpack:///./src/ajs/common/Filters/naceCodeNameFilter.js","webpack:///./src/ajs/common/Filters/newLineTextToRichTextFilter.js","webpack:///./src/ajs/common/FlyIn/FlyCtrl.js","webpack:///./src/ajs/common/FlyIn/flyInDrv.js","webpack:///./src/ajs/common/FlyIn/flySvc.js","webpack:///./src/ajs/common/httpServices/reminderHttpSvc.js","webpack:///./src/ajs/common/httpServices/templateHttpSvc.js","webpack:///./src/ajs/common/icons/todoIcon.js","webpack:///./src/ajs/common/icons/windowIcon.js","webpack:///./src/ajs/common/interceptors/loadingAnimationInterceptor.js","webpack:///./src/ajs/common/interceptors/errorHandler.js","webpack:///./src/ajs/common/services/appMessages.js","webpack:///./src/ajs/common/services/appUrlsSvc.js","webpack:///./src/ajs/common/services/commOutSvc.js","webpack:///./src/ajs/common/services/dataCacheSvc.js","webpack:///./src/ajs/common/services/enumCacheSvc.js","webpack:///./src/ajs/common/services/googleMapsSvc.js","webpack:///./src/ajs/invoicing/model/billableRegistration.js","webpack:///./src/ajs/invoicing/model/invoiceLine.js","webpack:///./src/ajs/invoicing/model/draftInvoice.js","webpack:///./src/ajs/common/services/loadingAnimationSvc.js","webpack:///./src/ajs/common/services/lockFactory.js","webpack:///./src/ajs/common/services/objectFactorySvc.js","webpack:///./src/ajs/common/services/openIbanSvc.js","webpack:///./src/ajs/common/services/optionsSvc.js","webpack:///./src/ajs/common/services/resourceFactorySvc.js","webpack:///./src/ajs/common/services/timerSvc.js","webpack:///./src/ajs/common/services/userDataSvc.js","webpack:///./src/ajs/common/services/validationSvc.js","webpack:///./src/ajs/common/services/zipCodes.js","webpack:///./src/ajs/common/services/insightsSvc.js","webpack:///./src/ajs/common/table/filterColumnDrv.js","webpack:///./src/ajs/common/table/scrollTableDrv.js","webpack:///./src/ajs/common/table/sortColumnDrv.js","webpack:///./src/ajs/common/table/tableDrv.js","webpack:///./src/ajs/common/table/tableRowDrv.js","webpack:///./src/ajs/common/validators/bindErrorsDrv.js","webpack:///./src/ajs/common/validators/compareTo.js","webpack:///./src/ajs/common/validators/helpers.js","webpack:///./src/ajs/common/validators/datepickerValidator.js","webpack:///./src/ajs/common/validators/ngModelErrorBinder.js","webpack:///./src/ajs/common/validators/validateDateField.js","webpack:///./src/ajs/common/validators/validateEmail.js","webpack:///./src/ajs/common/validators/validateMagicmail.js","webpack:///./src/ajs/common/validators/validateEnterpriseNumber.js","webpack:///./src/ajs/common/validators/validateIban.js","webpack:///./src/ajs/common/validators/validateNotNull.js","webpack:///./src/ajs/common/validators/validateNumberField.js","webpack:///./src/ajs/common/validators/validatePassword.js","webpack:///./src/ajs/common/validators/validateStructuredCommunication.js","webpack:///./src/ajs/common/validators/validateTextField.js","webpack:///./src/ajs/common/validators/validateVatNumber.js","webpack:///./src/ajs/common/validators/validateWebsite.js","webpack:///./src/ajs/config/configRelevancyDrv.js","webpack:///./src/ajs/config/fields/configFieldDialogCtrl.js","webpack:///./src/ajs/config/fields/configValidatorDrv.js","webpack:///./src/ajs/config/fields/fieldConfigCtrl.js","webpack:///./src/ajs/config/sections/configAddSectionConfigCtrl.js","webpack:///./src/ajs/config/sections/configEditSectionConfigCtrl.js","webpack:///./src/ajs/config/sections/configSectionCtrl.js","webpack:///./src/ajs/config/sections/configSectionDrv.js","webpack:///./src/ajs/config/sections/configSubSectionDrv.js","webpack:///./src/ajs/config/sections/sectionConfigCtrl.js","webpack:///./src/ajs/employees/detail/employeeDetailCtrl.js","webpack:///./src/ajs/employees/dialogs/createUserProfileDialogCtrl.js","webpack:///./src/ajs/employees/dialogs/addEmployeeProfileDialogCtrl.js","webpack:///./src/ajs/employees/dialogs/deleteEmployeeDialogCtrl.js","webpack:///./src/ajs/employees/dialogs/undeleteEmployeeDialogCtrl.js","webpack:///./src/ajs/employees/dialogs/employeeOvertimeDialogCtrl.js","webpack:///./src/ajs/employees/dialogs/employeeTimeTableDialogCtrl.js","webpack:///./src/ajs/employees/new/EmpNewCtrl.js","webpack:///./src/ajs/employees/overview/employeeOverviewCtrl.js","webpack:///./src/ajs/employees/overview/selectPeriodDialogCtrl.js","webpack:///./src/ajs/employees/services/licensingSvc.js","webpack:///./src/ajs/employees/profiles/employeeProfileOverviewCtrl.js","webpack:///./src/ajs/home/dashboardSvc.js","webpack:///./src/ajs/home/dashboardOwnCompanySelectorDrv.js","webpack:///./src/ajs/invoicing/dialogs/batchMailInvoicesDialogCtrl.js","webpack:///./src/ajs/invoicing/dialogs/codaDialog.js","webpack:///./src/ajs/invoicing/dialogs/deleteWithNeverInvoiceDialogCtrl.js","webpack:///./src/ajs/invoicing/dialogs/draftInvoiceLineDialogCtrl.js","webpack:///./src/ajs/invoicing/dialogs/editInvoiceDialogCtrl.js","webpack:///./src/ajs/invoicing/dialogs/invoiceDialogSvc.js","webpack:///./src/ajs/invoicing/dialogs/invoicePaymentDialogCtrl.js","webpack:///./src/ajs/invoicing/dialogs/invoiceAuditDialogCtrl.js","webpack:///./src/ajs/invoicing/dialogs/invoicingHistoryDialogCtrl.js","webpack:///./src/ajs/invoicing/dialogs/mailHistoryDialogCtrl.js","webpack:///./src/ajs/invoicing/dialogs/mailTemplateDialogCtrl.js","webpack:///./src/ajs/invoicing/dialogs/numberInvoicesDialogCtrl.js","webpack:///./src/ajs/invoicing/dialogs/numberOnDrv.js","webpack:///./src/ajs/invoicing/dialogs/previewDraftInvoiceDialogCtrl.js","webpack:///./src/ajs/invoicing/dialogs/transactionDialogCtrl.js","webpack:///./src/ajs/invoicing/dialogs/updateRegistrationRelationDialogCtrl.js","webpack:///./src/ajs/invoicing/draft/draftInvoiceOverviewCtrl.js","webpack:///./src/ajs/invoicing/draft/draftInvoiceRowDrv.js","webpack:///./src/ajs/invoicing/overview/invoicingOverviewCtrl.js","webpack:///./src/ajs/invoicing/model/transaction.js","webpack:///./src/ajs/invoicing/overview/invoiceStatusFilterDrv.js","webpack:///./src/ajs/invoicing/services/invoicingSvc.js","webpack:///./src/ajs/invoicing/services/moneyAccountHttpSvc.js","webpack:///./src/ajs/invoicing/services/transactionHttpSvc.js","webpack:///./src/ajs/invoicing/sidebar/transactionBarDrv.js","webpack:///./src/ajs/invoicing/sidebar/unpaidInvoiceBarDrv.js","webpack:///./src/ajs/invoicing/transaction/transactionOverviewCtrl.js","webpack:///./src/ajs/invoicing/wizard/invoiceFromScratchCtrl.js","webpack:///./src/ajs/notifications/notificationBarDrv.js","webpack:///./src/ajs/notifications/notificationBannerDrv.js","webpack:///./src/ajs/profile/profileCtrl.js","webpack:///./src/ajs/profile/dialogs/changePasswordDialogCtrl.js","webpack:///./src/ajs/profile/dialogs/changeUsernameDialogCtrl.js","webpack:///./src/ajs/profile/dialogs/enable2FADialog.js","webpack:///./src/ajs/profile/dialogs/disable2FADialog.js","webpack:///./src/ajs/registrations/regDayCtrl.js","webpack:///./src/ajs/registrations/regOverviewCtrl.js","webpack:///./src/ajs/registrations/dialogs/absenceDialogCtrl.js","webpack:///./src/ajs/registrations/dialogs/batchUpdateRegistrationFieldDialogCtrl.js","webpack:///./src/ajs/registrations/dialogs/deleteResourceCategoryDialogCtrl.js","webpack:///./src/ajs/registrations/dialogs/deleteResourceDialogCtrl.js","webpack:///./src/ajs/registrations/dialogs/newCategoryDialogCtrl.js","webpack:///./src/ajs/registrations/dialogs/regDialogsSvc.js","webpack:///./src/ajs/registrations/dialogs/regEditGroupDialogCtrl.js","webpack:///./src/ajs/registrations/dialogs/registrationEditDialogCtrl.js","webpack:///./src/ajs/registrations/dialogs/newSubResourceDialogCtrl.js","webpack:///./src/ajs/registrations/directives/editableResourceTypeahead.js","webpack:///./src/ajs/registrations/directives/priceOptionsDrv.js","webpack:///./src/ajs/registrations/directives/registrationInputDrv.js","webpack:///./src/ajs/registrations/directives/taskTypeahead.js","webpack:///./src/ajs/registrations/directives/resourceCrmTypeDrv.js","webpack:///./src/ajs/registrations/directives/resourceTypeahead.js","webpack:///./src/ajs/registrations/directives/timerRegistrationButtonDrv.js","webpack:///./src/ajs/registrations/directives/typeaheadCarla.js","webpack:///./src/ajs/registrations/resources/priceListCtrl.js","webpack:///./src/ajs/registrations/services/registrationService.js","webpack:///./src/ajs/registrations/services/priceService.js","webpack:///./src/ajs/relations/detail/relationFileCtrl.js","webpack:///./src/ajs/relations/dialogs/addAssignmentDialogCtrl.js","webpack:///./src/ajs/relations/dialogs/addBankAccountDialogCtrl.js","webpack:///./src/ajs/relations/dialogs/addCommonTaskSchedulesDialogCtrl.js","webpack:///./src/ajs/relations/dialogs/addRelationLinkDialogCtrl.js","webpack:///./src/ajs/relations/dialogs/addTaskScheduleDialogCtrl.js","webpack:///./src/ajs/relations/dialogs/amlDocumentDialogCtrl.js","webpack:///./src/ajs/relations/dialogs/amlSingleDocumentDialogCtrl.js","webpack:///./src/ajs/relations/dialogs/authResourcesDialogCtrl.js","webpack:///./src/ajs/relations/dialogs/billingSettingsDialogCtrl.js","webpack:///./src/ajs/relations/dialogs/changeRelTypeDialogCtrl.js","webpack:///./src/ajs/relations/dialogs/deleteAssignmentDialogCtrl.js","webpack:///./src/ajs/relations/dialogs/editAssignmentDialogCtrl.js","webpack:///./src/ajs/relations/dialogs/editRelationLinkDialogCtrl.js","webpack:///./src/ajs/relations/dialogs/editTaskScheduleRemarkDialogCtrl.js","webpack:///./src/ajs/relations/dialogs/employeeAccessDialogCtrl.js","webpack:///./src/ajs/relations/dialogs/fiscalYearDialogCtrl.js","webpack:///./src/ajs/relations/dialogs/fiscalCostDialogCtrl.js","webpack:///./src/ajs/relations/dialogs/fiscalInsuranceDialogCtrl.js","webpack:///./src/ajs/relations/dialogs/fiscalLoanDialogCtrl.js","webpack:///./src/ajs/relations/dialogs/fiscalRealEstateDialogCtrl.js","webpack:///./src/ajs/relations/dialogs/fiscalVehicleDialogCtrl.js","webpack:///./src/ajs/relations/dialogs/generateRelationDocumentDialogCtrl.js","webpack:///./src/ajs/relations/dialogs/invoiceMethodChangedDialogCtrl.js","webpack:///./src/ajs/relations/dialogs/invoiceStreamBudgetDialogCtrl.js","webpack:///./src/ajs/relations/dialogs/invoiceStreamScheduleDialogCtrl.js","webpack:///./src/ajs/relations/dialogs/invoiceStreamSettingsDialogCtrl.js","webpack:///./src/ajs/relations/dialogs/plannedRegistrationDialogCtrl.js","webpack:///./src/ajs/relations/dialogs/plannedRegistrationScheduleDialogCtrl.js","webpack:///./src/ajs/relations/dialogs/plannedTasksDialogCtrl.js","webpack:///./src/ajs/relations/dialogs/ReadEidDialogCtrl.js","webpack:///./src/ajs/relations/dialogs/mailDocumentDialogCtrl.js","webpack:///./src/ajs/relations/dialogs/taskScheduleChangeAssignmentDialogCtrl.js","webpack:///./src/ajs/relations/dialogs/uploadRelationDocumentDialogCtrl.js","webpack:///./src/ajs/relations/dialogs/requestDocumentSignatureDialogCtrl.js","webpack:///./src/ajs/relations/dialogs/estoxConfirmationDialogCtrl.js","webpack:///./src/ajs/relations/dialogs/inviteRelationDirectDebitDialogCtrl.js","webpack:///./src/ajs/relations/dialogs/mollieDirectDebitDialogCtrl.js","webpack:///./src/ajs/relations/dialogs/taskScheduleDeviationsDialogCtrl.js","webpack:///./src/ajs/relations/dialogs/invoicingViaRelationsDialogCtrl.js","webpack:///./src/ajs/relations/directives/fiscalCostListDrv.js","webpack:///./src/ajs/relations/directives/fiscalDocumentListDrv.js","webpack:///./src/ajs/relations/directives/fiscalInsuranceListDrv.js","webpack:///./src/ajs/relations/directives/fiscalLoanListDrv.js","webpack:///./src/ajs/relations/directives/fiscalRealEstateListDrv.js","webpack:///./src/ajs/relations/directives/fiscalVehicleListDrv.js","webpack:///./src/ajs/relations/directives/fiscalYearDialogButtonDrv.js","webpack:///./src/ajs/relations/directives/invoiceStreamDrv.js","webpack:///./src/ajs/relations/directives/invoicingViaDrv.js","webpack:///./src/ajs/relations/directives/plannedRegistrationsDrv.js","webpack:///./src/ajs/relations/directives/relationFileDrv.js","webpack:///./src/ajs/relations/directives/relAuthorizationDrv.js","webpack:///./src/ajs/relations/directives/relEidWizardDrv.js","webpack:///./src/ajs/relations/directives/relGeneratedDocumentsDrv.js","webpack:///./src/ajs/relations/directives/relTaskDashboardDrv.js","webpack:///./src/ajs/relations/directives/relReadEidDrv.js","webpack:///./src/ajs/relations/directives/relBudgetProgressbarDrv.js","webpack:///./src/ajs/relations/directives/relBankAccounts.js","webpack:///./src/ajs/relations/directives/relSearchBoxDrv.js","webpack:///./src/ajs/relations/directives/relTaskSchedulingDrv.js","webpack:///./src/ajs/relations/directives/relUboDrv.js","webpack:///./src/ajs/relations/directives/relWizardDrv.js","webpack:///./src/ajs/relations/directives/relFieldSearchDrv.js","webpack:///./src/ajs/relations/directives/linkedRelationsListDrv.js","webpack:///./src/ajs/relations/directives/pushShareholderInfoEstoxButtonDrv.js","webpack:///./src/ajs/relations/directives/searchRelationInPeppolButtonDrv.js","webpack:///./src/ajs/relations/directives/relTodosDrv.js","webpack:///./src/ajs/relations/directives/relNaceCodes.js","webpack:///./src/ajs/relations/new/RelNewCtrl.js","webpack:///./src/ajs/relations/Services/externalRelationHttpSvc.js","webpack:///./src/ajs/relations/Services/openNewAddressSvc.js","webpack:///./src/ajs/relations/Services/relBindSvc.js","webpack:///./src/ajs/relations/Services/relBudgetSvc.js","webpack:///./src/ajs/relations/Services/relPersistSvc.js","webpack:///./src/ajs/relations/Services/typeConversionSvc.js","webpack:///./src/ajs/relations/Services/recentRelationsSvc.js","webpack:///./src/ajs/settings/companyCtrl.js","webpack:///./src/ajs/settings/editMailTemplateSettingsCtrl.js","webpack:///./src/ajs/settings/generalSettingsCtrl.js","webpack:///./src/ajs/settings/invoiceTextSettingsCtrl.js","webpack:///./src/ajs/settings/mailTemplateSettingsCtrl.js","webpack:///./src/ajs/settings/reminderSettingsCtrl.js","webpack:///./src/ajs/settings/settingMenuCtrl.js","webpack:///./src/ajs/settings/taskTemplatesCtrl.js","webpack:///./src/ajs/settings/licenseCtrl.js","webpack:///./src/ajs/settings/invoiceTemplatesCtrl.js","webpack:///./src/ajs/settings/dialogs/addSubTaskTemplateDialogCtrl.js","webpack:///./src/ajs/settings/dialogs/addTaskPeriodicityDialogCtrl.js","webpack:///./src/ajs/settings/dialogs/addTaskTemplateDialogCtrl.js","webpack:///./src/ajs/settings/dialogs/addTemporaryLicenseDialogCtrl.js","webpack:///./src/ajs/settings/dialogs/previewInvoiceTemplateDialogCtrl.js","webpack:///./src/ajs/settings/dialogs/invoiceTextDialogCtrl.js","webpack:///./src/ajs/settings/dialogs/settingsDialogSvc.js","webpack:///./src/ajs/settings/dialogs/changeTwikeyAccountNumberDialogCtrl.js","webpack:///./src/ajs/settings/dialogs/copyTaskTemplateDialogCtrl.js","webpack:///./src/ajs/settings/dialogs/copyTaskPeriodicityDialogCtrl.js","webpack:///./src/ajs/settings/dialogs/deleteInvoiceTextConfirmDialogCtrl.js","webpack:///./src/ajs/settings/dialogs/deleteTaskPeriodicityLineDialogCtrl.js","webpack:///./src/ajs/settings/dialogs/placeholderDialogCtrl.js","webpack:///./src/ajs/settings/dialogs/addInvoiceTemplateDialogCtrl.js","webpack:///./src/ajs/settings/dialogs/setPaymentProviderConfirmDialogCtrl.js","webpack:///./src/ajs/settings/dialogs/taskScheduleDialogCtrl.js","webpack:///./src/ajs/settings/dialogs/taskParameterDefinitionsDialogCtrl.js","webpack:///./src/ajs/settings/dialogs/addTaskParameterDefinitionDialogCtrl.js","webpack:///./src/ajs/settings/dialogs/addCompanyDialogCtrl.js","webpack:///./src/ajs/settings/dialogs/relationsUsingTaskPeriodicityDialogCtrl.js","webpack:///./src/ajs/settings/dialogs/addRelationFieldDefinitionDialogCtrl.js","webpack:///./src/ajs/settings/dialogs/addEmailDomainDialogCtrl.js","webpack:///./src/ajs/settings/dialogs/emailDomainCnameInfoDialogCtrl.js","webpack:///./src/ajs/settings/dialogs/mailEmailDomainCnameInfoDialogCtrl.js","webpack:///./src/ajs/settings/dialogs/emailSignatureDialogCtrl.js","webpack:///./src/ajs/settings/dialogs/exportTaskTemplateSnippetDialogCtrl.js","webpack:///./src/ajs/translations/translateListsCtrl.js","webpack:///./src/ajs/settings/dialogs/importTaskTemplateSnippetDialogCtrl.js","webpack:///./src/ajs/settings/dialogs/recognitionOptionsDialogCtrl.js","webpack:///./src/ajs/settings/dialogs/taskTemplateTagsDialogCtrl.js","webpack:///./src/ajs/settings/dialogs/taskParameterDefinitionOptionsDialogCtrl.js","webpack:///./src/ajs/settings/dialogs/companyBankAccountsDialogCtrl.js","webpack:///./src/ajs/settings/dialogs/taskTemplateRequiredDocumentTypesDialogCtrl.js","webpack:///./src/ajs/settings/dialogs/editTaskTemplateDialogCtrl.js","webpack:///./src/ajs/settings/partials/bookyearSettingsDrv.js","webpack:///./src/ajs/taskflow/directives/assignedToSelectDrv.js","webpack:///./src/ajs/taskflow/directives/assignedToXeditDrv.js","webpack:///./src/ajs/taskflow/directives/editableAssignedToDrv.js","webpack:///./src/ajs/translations/translateLabelsCtrl.js","webpack:///./src/ajs/translations/translateSvc.js","webpack:///./src/ajs/jobs/jobSvc.js","webpack:///./src/index.js"],"names":["setValue","substitute","defaultValue","startsWith","endsWith","value","currentUrl","window","location","origin","environment","subdomain","local","development","dev","acceptance","acc","production","app","prd","toLowerCase","appUrls","identity","process","notifications","tasks","documents","documentsConverter","documentSigning","jobs","connect","connectApi","signalr","reporting","api","audit","interactions","storage","key","replace","config","inlineManualUrl","REACT_APP_INLINE_MANUAL_URL","appInsightsKey","REACT_APP_APP_INSIGHTS_KEY","buildVersion","Date","getTime","logLevel","buildType","version","googleApiKey","recaptchaKey","auth","authority","client_id","redirect_uri","response_type","scope","silent_redirect_uri","automaticSilentRenew","post_logout_redirect_uri","features","RequestError","Error","response","url","status","captureStackTrace","data","headers","NoConnectionError","instance","axios","create","baseURL","timeout","xhrCreations","defaults","paramsSerializer","params","qs","stringify","arrayFormat","xhrResolutions","updateStatus","RequestLoadingAnimationService","showSmallLoadingAnimation","hideSmallLoadingAnimation","interceptors","use","successRes","error","Promise","reject","request","requestConfig","token","AuthService","getToken","Authorization","isCancel","Object","prototype","hasOwnProperty","call","handleError","eventBus","publish","base","functionalities","Relation","RegistrationOwn","RegistrationOthers","Pricelist","InvoiceDraft","InvoiceFinal","CompanyOwn","Settings","TaskTemplates","InvoiceTransaction","Documents","Users","RentabilityReport","Tags","InteractionsOwn","InteractionsOthers","TaskSchedules","PlannedTask","Todo","IntraCompanyInvoice","FreeInvoiceCreditNote","RegistrationsPerReports","AbsenceReports","ChecklistInvoicingReport","AbsenceAndCounters","Teams","EmployeeInternalPrice","privileges","Read","Update","Create","Delete","All","Execute","Syneton","TypeForm","Budget","Eid","Compliancy","Peppol","Gmail","IntraCompanyBilling","ConnectOpenTheBox","CustomRoles","ReferenceYear","TaskflowBilling","parsePrivilege","privilege","keys","find","x","parseFunctionality","functionality","parseFeature","feature","this","user","manager","access_token","profile","Sid","GroupSid","Email","Name","signinSilent","then","role","result","Role","perms","split","forEach","perm","permission","length","parseInt","f","permissions","parsedFunctionality","WindowsSubAuthority","security","ex","su","TenantConfiguration","console","string","PropTypes","func","object","shape","any","funcReq","isRequired","intlFormatPropTypes","formatDate","formatTime","formatRelativeTime","formatNumber","formatPlural","formatMessage","intlShape","locale","timeZone","formats","messages","textComponent","defaultLocale","defaultFormats","onError","formatters","listItemMsg","list","id","fallback","defaultMessage","formatListValue","props","values","intl","FormattedListValue","PureComponent","propTypes","oneOfType","number","defaultProps","injectIntl","formatParameters","parameters","parametersEnumType","formattedParameters","i","parameter","Array","isArray","map","join","defineMessages","NoPermissionsForThisAction","SomethingWentWrong","TimeoutOccurred","message","type","unauthorizedMsg","ToastrService","Axios","code","ApplicationInsights","trackException","exception","generalErrorMsg","errorMessage","toString","indexOf","originalError","JSON","stringCompare","Intl","Collator","undefined","sensitivity","compare","valueCompare","a","b","dynamicSort","property","sortOrder","sortProp","substr","dynamicSortMultiple","sortFunctions","numberOfProperties","obj1","obj2","Success","ChangesSaved","success","title","content","onClick","toastr","options","onclick","preventDuplicates","closeButton","escapeHtml","timeOut","generalError","info","warning","changesSaved","dataCache","getUser","userId","userObject","guid1","systemUser","getDefaultCompanyForUser","employee","companyId","userID","company","defaultcompany","nameSort","getDataCache","setDataCache","cache","hasConnectPlatform","connectPlatform","connectPlatforms","companyIdToCheck","filter","hasUserConnectPlatform","configuredConnectPlatformsCommaSeparated","hasPortalConnectPlatform","getCompanySettings","companyObject","getDefaultCompany","assignmentsEnabled","timeTablesEnabled","employeeTimeTables","getUsers","isActive","hidden","u","name","firstName","lastName","email","languageCode","sort","getAllUsers","getUserName","getSystemUser","isBelgianTenantConfiguration","tenantConfiguration","getTenantConfiguration","getUserLanguage","getAbsenceRelationIdForUser","absenceRelationId","hubConnection","signalR","state","startupEventHandlers","connectionId","getAxiosConfig","getUserId","startConnection","post","resp","accessToken","accessKey","endpoint","accessTokenFactory","HubConnectionBuilder","withUrl","configureLogging","LogLevel","Warning","build","onclose","log","start","eventHandler","on","action","setTimeout","subscribe","push","unsubscribe","off","getConnectionId","Button","saving","shouldExecute","setState","e","buttonDOM","blur","showProgress","resolve","removeProgress","children","btnClassName","disabled","rest","buttonDisabled","showSpinner","ref","handleClick","className","classnames","Component","bool","emptyGuid","isGuid","test","empty","getDocumentTypeInfo","documentTypeInfo","get","DocumentEditorOpened","DocumentCouldNotBeOpenedMaybeDeleted","DocumentCheckout","DocumentCheckin","DocumentDiscardCheckout","DiscardCheckout","convertToPdfMimeTypes","DocumentService","download","versionId","filename","mimeType","documentId","VersionId","mime","responseType","open","TranslateService","getIntl","handleHttpError","openInApp","edit","language","checkout","checkin","discardCheckout","getTemplateCheckoutInfo","documentIds","getLink","getCheckedOutLink","getDetails","convertToPdf","lastIndexOf","contentDispositionHeader","adminpulse","getFileNameFromHeader","blob","Blob","FileSaver","saveAs","buffer","errorObject","arrayBufferToObject","convertAndSaveToPdf","desiredDocumentType","canConvertToPdf","getForbiddenDocumentTypes","forbidden","getWithoutRelationDocumentTypes","withoutRelations","resourceShape","oneOf","relationShape","invoiceStreamShape","assignmentId","assignmentName","assignmentTemplateId","priceShape","amount","registrationShape","source","date","instanceOf","invoiceStreamId","relation","resource","plannedTaskId","durationMinutes","fromMinutes","toMinutes","quantity","price","priceOptions","arrayOf","discountPercentage","isBillable","inForfait","totalAmount","vatPercentage","vatType","referenceYear","emptyRegistration","moment","utc","startOf","toDate","plannedTaskTemplateId","plannedTaskTemplateType","plannedTaskName","mainPlannedTaskId","mainTaskTemplateId","mainPlannedTaskName","durationType","durationDays","interactionType","interactionDescription","interactionTitle","createEmptyRegistration","initialValues","DataCacheService","tenantDefaults","resourceVATRate","getAssignmentTemplateId","createEmptyTimerRegistration","defaultOptions","showDate","showReferenceYear","showRelation","editableRelation","ownCompanyRelation","showAssignments","showTasks","resourceTypes","showFromUntil","showDuration","showQuantity","showPrice","showDiscount","showVat","showTotalAmount","showBillable","showInForfait","showInvoiceRemark","showInternalRemark","showInteraction","defaultDuration","showOtherUsers","crmTypes","isRegistrationValid","registration","optionOverrides","getRegistrationModalPropsForTask","task","orgRegistration","parentId","mainTaskId","resourceId","templateId","mainTaskName","mainTemplateId","year","defaultResourceId","registrationOptions","resourceMatchesFilters","crmType","resourceFilter","invoiceStreams","absenceRegistrationOptions","maxMinutes","actions","dateChanged","referenceYearChanged","fromMinutesChanged","toMinutesChanged","durationTypeChanged","durationMinutesChanged","durationDaysChanged","isAfternoonChanged","addDuration","roundDuration","unitPriceChanged","priceChanged","priceInfoChanged","setPriceOptions","discountChanged","vatPercentageChanged","calculateTotalAmount","totalAmountChanged","isBillableChanged","inForfaitChanged","remarkChanged","internalRemarkChanged","resourceChanged","resourceTypeChanged","interactionTypeChanged","interactionTitleChanged","interactionDescriptionChanged","interactionInit","taskChanged","relationChanged","assignmentChanged","executeAction","newToMinutes","newDuration","isAfternoon","Math","min","round","quantityChanged","parsedValue","Number","isNaN","parseFloat","newPrice","abs","vatRate","isFixedPrice","totalWithoutDiscount","newTotal","q","remark","internalRemark","absenceBalance","resourceProps","newValue","description","interactionId","orgInteraction","updateResource","crm","canCreateRegistrationForUser","hasPermission","getCurrentTime","now","getHours","getMinutes","getFilenameFromContentDispositionHeader","contentDisposition","needsEncodingFixup","toParamRegExp","attributePattern","flags","RegExp","textdecode","encoding","decoder","TextDecoder","fatal","bytes","from","c","charCodeAt","every","decode","Uint8Array","fixupEncoding","rfc2616unquote","parts","slice","quotindex","rfc5987decode","extvalue","encodingend","rfc2047decode","_","charset","text","hex","String","fromCharCode","atob","tmp","exec","unescape","contentDispositionRfc","matches","iter","match","n","quot","part","joinTime","hour","minute","roundAmount","initialAmount","roundingMethod","roundingDecimals","digits","max","factor","pow","ceil","floor","timeSpanRegex","minutesToTimeSpan","totalMinutes","withSeconds","sign","h","m","hoursToTimeSpan","totalHours","parseIntOrNull","intValue","ogmRegex","formatOGM","isValidVATNumber","countryCode","toUpperCase","isMod97Valid","isValidEnterpriseNumber","isValidPhoneNumber","isValidEmail","str","substring","toPercentage","total","percentage","rounded","toFixed","header","fileName","trim","arrayBuffer","bufferString","apply","parse","toCamel","o","newO","origKey","newKey","charAt","constructor","removeDuplicateSpaces","dayMonthDate","momentDate","isMoment","isSame","utcOffset","set","base64ToArrayBuffer","base64","binaryString","binaryLen","ascii","splitTimeArray","splitTimeObj","decimalParser","parsed","ciEquals","localeCompare","timeSpanToMinutes","calculateIndexedAmount","method","amountOrPercentage","warn","randomAmount","random","toDateOnly","ISO","toMomentDateOnly","roundAwayFromZero","EPSILON","roundToHalfDecimal","roundToSteps","mapSuggestedMailAddressInternal","translateListFunc","label","purposes","emailAddress","relationName","linkType","isMain","p","DefaultAssignment","mapResourceName","withoutCode","withoutCategoryPrefix","codePrefix","categoryId","categoryName","isDefault","mapInvoiceStreamName","stream","defaultName","mapAssignmentGroupName","mapRegTaskName","taskName","getShareItemNameForTask","parentName","templateName","parent","mapSuggestedMailAddress","address","mapSuggestedMailAddressAngularFilter","$filter","Search","LoadingProgress","ErrorLoadingData","NoItems","Clear","StartTypingToSearch","AutoComplete","event","onBlur","mode","relatedTarget","target","focus","inputElement","onFocus","debounce","newInputValue","loadFunc","loading","items","inputValue","hasError","debouncedLoadFunc","currentInputValue","stateMode","autoFocus","readOnly","propsContainer","classNames","placeholder","handleFocus","handleInputBlur","input","prevProps","loadOnInit","getInputProps","getToggleButtonProps","clearSelection","selectHighlightedItem","onClear","onChange","canClear","inputRef","isSmall","inputProps","hadFocus","includes","loadItems","onKeyDown","data-1p-ignore","dropdownButtonRef","isOpen","getMenuProps","selectedItem","highlightedIndex","getItemProps","filterFunc","renderItem","itemClassNameFunc","filteredItems","inputValueFoundInList","item","style","overflowX","index","isSelected","searchValue","errorLoadingData","initialSelectedItem","classname","renderInput","onSelectedItemChanged","onStateChange","handleStateChange","itemToString","downshiftProps","renderTypeahead","renderMenu","emptyLabel","initIntlObject","getLocale","translations","zendesk","setLocale","getTranslations","reduce","changeDoubleBracesToSingle","createIntl","$translate","isReady","$timeout","reloadListeners","getTranslationTable","initTranslateService","angularTranslate","angularTimeout","onReady","translate","getVersion","reload","lang","refresh","l","onLocaleChanged","onReload","listener","offReload","idx","splice","Registration","invoiceStream","resourceDescription","isBilled","neverInvoice","validate","validateTo","validateDuration","validateAmount","validateQuantity","validateDescription","invalidDescription","__defineGetter__","isOther","fromHour","fromMinute","toHour","__defineSetter__","setFromMinutes","setToMinutes","toMinute","durationHour","invalidTo","setDurationMinutes","durationMinute","invalidDuration","tempTotal","invalidQuantity","invalidAmount","getFractionSize","setVatRate","sum","prevTotal","add","minutes","initTime","setTaskFields","clearTaskFields","setTaskName","regTaskNameFilter","setResourceName","resourceNameFilter","group","invoiceNumber","invoiceId","invoiceStatus","reset","TenantConfigurationNetherlands","isDutchTenantConfiguration","resourceSearch","search","crmOthers","crmProspects","crmCustomers","isCurrent","model","crmOwnCompanies","blockedAssignmentTemplates","guid","ResourceAutoComplete","orgItems","small","useResourceTree","selectedResource","useMemo","useCallback","showCategory","level","highlightClassName","searchWords","textToHighlight","categoryLabel","Invoice","payments","exportErrors","billingErrors","angular","extend","expiryDate","dueAmount","isInvoice","paidAmount","hasErrors","sanitizer","dompurify","sanitize","RegistrationGroup","work","travel","cost","remarks","unique","setInteractionType","getPlannedTaskIds","fields","getPlannedTaskId","hasTask","setInteractionTypeAfterChange","hasValue","setInteractionDescription","setInteractionTitle","initDate","setRelation","setInteractionInfo","objectId","setUser","userName","setPart","toJson","pretty","fromJson","json","reg","w","t","getRegistrationsWithId","Item","active","isWord","isPdf","isExcel","isEditable","ext","defaultSettings","zIndex","helpCenter","suppress","messageButton","nl","fr","contactForm","tags","subject","chat","answerBot","talk","zE","webWidget","setUserInfo","tenantId","userEmail","createTicket","settings","__assign","assign","s","arguments","__spreadArray","to","pack","ar","concat","mapResourcesToTree","array","category","subResources","_a","setItems","module","exports","setSmallLoadingAnimation","Notification","recalcStatus","unread","self","jsonData","_unread","createDate","expireDate","el","_param","getNew","temp","update","remove","parseNumberFormat","format","elements","inBlock","isInteger","randomCounter","generateExample","yearFormat","counter","exampleDate","exampleCounter","setFullYear","getFullYear","examples","Yyyy","Yy","Mm","getMonth","padStart","Counter","directive","restrict","template","require","submit","cancel","startDate","firstNumber","showWarning","controller","$scope","$q","editMode","addPart","nr","hasCounter","copy","numberOfZeros","zerostring","startEdit","dragIndex","startDrag","ui","stopDrag","dragOver","dropEl","$","removeClass","addClass","findIndex","example","firstNumberExample","cancelEdit","clear","save","when","newVal","$window","link","$element","attributes","win","element","initOffset","offset","initWidth","outerWidth","initHeight","outerHeight","minTop","height","lastScrollTop","affixElement","pageYOffset","top","hasClass","innerHeight","position","css","resize","$on","unbind","bind","editableDirectiveFactory","directiveName","inputTpl","render","autosubmit","submitOnChange","$form","$submit","$data","convertNewlinesTextToRichText","attrs","eFormclass","editorEl","inputEl","removeAttr","addListeners","single","buttons","submitOnEnter","keyCode","shiftKey","$apply","ctrlKey","metaKey","attr","$cancel","ngModel","selector","focusOnChange","$viewChangeListeners","first","$parse","extBlur","focusedElement","rowBlur","field","maskOptions","clearOnBlur","formId","$id","$render","$viewValue","setFocus","changeFormState","$setViewValue","service","defaultCountry","defaultCurrency","relationListPageSize","dateOptions","dateFormat","dayNamesMin","monthNamesShort","changeYear","changeMonth","onChangeMonthYear","month","datepickerInst","day","selectedDay","datepicker","yearRange","currencyCode","getArray","defaultCompany","ready","$compile","$eval","cxFilterPopupItem","newEl","itemTemplate","itemExpression","append","invoicingSvc","transactionHttpSvc","flySvc","close","transaction","invoice","vm","loadUnpaidInvoices","retrieveUnpaidInvoices","ownCompanies","invoices","calcAmount","openAmount","showValidation","searchInvoice","searchUnpaidInvoices","clearInvoice","invoiceSearch","payment","candidates","inv","matchTransaction","modal","selectInvoice","invoiceLabel","customer","createPayment","factory","$state","$http","$rootScope","resourceFactorySvc","dialogsSvc","barVisible","taskId","combineNotifications","notification","trialDate","days","param","sortByProperty","countUnseen","cnt","markSeen","notificationIds","findAndUpdateNotification","markAllSeen","markExpired","doAction","hideNotifications","go","LinkType","relationId","relId","redirectUrl","jobId","connectUrl","connectPlatformInt","shareUrl","showNotifications","getTooltip","instant","disableNotificationType","showYesNoCancel","requests","put","shouldCreate","all","toggleNotifications","getTaskDetailId","closeTaskDetail","createNotificationHandler","actionFunc","SignalRService","notif","unshift","afterSave","onDateChanged","onTaskStatusChanged","registrationService","userData","checkSecurity","checkFeature","priceService","translateListFilter","invoiceStreamNameFilter","editReg","editRegCopy","workResources","travelResources","costResources","isReadOnly","btnDisabled","resources","plannedTasks","taskStatus","interactionAttachments","getInvoiceStreamLabel","ckeditorOptions","autoGrow_minHeight","$broadcast","resourceSelected","retrieveOnly","hasResource","getPrice","isResourceInForfait","translateResources","$watch","oldValue","retrieveResources","retrievePlannedTasks","resetTaskStatus","isWorkCollapsed","isTravelCollapsed","isCostsCollapsed","isRemarksCollapsed","isCommunicationCollapsed","userSettings","invoicesStreamId","ids","$promise","rel","checkIfResourcesMatchFilters","selectTask","selectResource","resourceRequest","$cancelRequest","resourcePromise","retrieveInteracationAttachments","cancelReg","saveReg","interactionModel","originalInteraction","emptyInteractionDescription","objectType","interactionSource","updatedReg","interaction","linkAttachments","calcDistance","showDistanceDialog","distance","toggleCollapse","prop","getTaskLabel","plannedTaskTemplateName","currentTaskIds","includeIds","orgMainTask","mainTaskIndex","mainTask","mainTaskLabel","mappedChildren","orgSubTask","subTaskIndex","subtaskLabel","order","childLabels","selectInvoiceStream","editreg","openRelationInNewWindow","stopPropagation","preventDefault","href","uploadAttachments","files","formData","FormData","file","deleteAttachment","attachment","showYesNo","documentLinks","documentType","linkId","recognizeTemporaryDocuments","downloadAttachment","isBlocked","inapplicable","rejected","setTaskStatus","updateTaskStatus","ensureDate","mapDocument","documentDate","documentStartDate","documentEndDate","amlDocumentTypes","amlDocumentTypesNL","amlDocumentTypesNoSignatureNeeded","saveRem","ModalService","forms","otherDocumentsRemarkForm","translatedDocumentTypes","documentTypes","documentTypesNoSignatureNeeded","statusDateOptions","startingDay","maxDate","documentUpdatedHandler","document","scannedDocumentId","some","documentCheckedoutHandler","documentEditLink","translateAndSortDocumentTypes","hasSigningProvider","documentSigningProvider","revisionRequired","exemptions","exemption","checked","smallBusinessExemption","oldExemptions","isAfter","saveExemptions","checkedEx","markRevisionOk","markingRevisionOk","eid","passport","totalRisk","customerRisk","activityRisk","locationRisk","transactionRisk","equals","$show","generateDocuments","showModal","controllerAs","locationChangeSuccess","inputs","generateDetailedRiskDocument","templateType","generateClientAcceptanceQuestionnaire","retrieveDocuments","y","onPreviewClosed","showPreview","activeDocumentId","onPreviewSaved","activeDocument","previewDocument","downloadDocument","asPdf","uploading","uploadDocuments","ignoreUploading","documentLinkType","replaceDocument","editDocument","deleteDocument","deleteSelectedDocuments","selectedDocuments","selected","editDocumentType","newType","canCheckout","dataCacheService","storageType","canCheckin","checkedOutByUserId","canDiscardCheckout","checkinDocument","onDiscardCheckout","openEditing","deregistration","checkoutDocument","openinApp","canEdit","markSigned","signingStatus","signingProvider","openEmailDocumentDialog","revokeSignatureRequest","signingId","signingPackageId","openSignatureDialog","openSignatureDialogForSelectedDocuments","selectedCount","ckeditorController","ctrls","ngModelController","onCKEvent","getData","setReadOnly","readonly","$observe","setImmediate","setData","noSnapshot","callback","fire","fn","$attrs","ckeditor","editorElement","readyDeferred","defer","hasAttribute","getAttribute","CKEDITOR","inline","applyListener","args","removeListener","promise","destroy","define","CanCreate","authService","CanDelete","CanRead","CanUpdate","Checkbox","extraClass","renderNullAsFalse","pointer","verticalAlign","margin5R","node","showWhenPermission","WrappedComponent","passThroughProps","hasAssignments","LoadingAnimation","ClearFilter","Filter","ItemsFilter","filterItems","initialFilteredItems","initialFilteredValues","onFilter","isFiltered","selectedItems","filterItem","margin","htmlFor","SearchFilter","initialValue","handleInputChange","onKeyPress","handleKeyPress","SelectFilter","selectedItemChanged","handleClear","AutoCompleteWithoutInjectIntl","mapUser","employeeId","getUserIdFromValue","getUserClassName","SearchEmployee","Unassigned","AssignedToMe","SystemUser","userShape","UserSearchWithoutInjectIntl","selectedUser","internalUsers","users","withUnassigned","withCurrentUser","unassignedId","withSystemUser","newUsers","initUsers","oldProps","usersChanged","valueChanged","hideClearButton","onUserChanged","isSelectFiltered","isItemsFiltered","sortClassName","sortKey","onSort","searchParams","_b","visible","_c","useIntl","isSearchFiltered","select","clickable","desc","trigger","rootClose","placement","overlay","filterParam","red","UserFilter","width","NoDataFound","ScrollableTable","page","pageSize","previousRequest","lastRequest","currentRequest","reloading","scrollKey","hasMoreData","root","getElementById","scrollHeight","loadMoreItems","defaultSearchParams","initialSearchParams","fetchOnMount","scrollTo","count","alteredSearchParams","retrieveItems","prevCount","newSearchParams","newSortKey","filterRequest","newFilter","body","click","noDataLabel","renderRow","tableClassName","useWindow","renderTBody","tbodyStyle","scrollParentRef","noHover","noDataFound","columns","numberOfColumns","pageStart","loadMore","hasMore","initialLoad","getScrollParent","loader","column","colSpan","getZendeskUrl","articleOrSection","culture","isSection","anchor","zendeskBaseUrl","mapCulture","OpenZendeskArticle","fallbackCulture","ZendeskHelp","article","bodyClass","PopoverStickOnHover","handleMouseEnter","handleMouseLeave","showPopover","delay","onMouseEnter","setTimeoutConst","clearTimeout","component","renderAsRichText","child","React","Children","cloneElement","onMouseLeave","_child","Fragment","Overlay","show","shouldUpdatePosition","dangerouslySetInnerHTML","__html","Ok","Cancel","OkCancelModal","fullScreen","onClose","onSave","size","okLabel","disableFullScreen","leftButton","onHoverSave","dismissOnClickOutsideModal","zendeskArticle","cancelDisabled","customClassName","onEnter","enforceFocus","backdrop","onHide","dialogClassName","Header","Title","Body","Footer","onMouseOver","CollapsablePanel","collapsed","collapseChanged","titleClass","in","FileIsTooLarge","DragDropFiles","Browse","FileWaitingForSize","FileSizeNotAvailable","Loading","FileLoadError","Uploading","FileProcessingComplete","FileProcessingAborted","FileProcessingError","TapToCancel","TapToRetry","TapToUndo","Remove","Abort","Retry","Undo","Upload","MaxFileSize","FileTypeNotAllowed","TranslatedFilePond","labelIdle","labelFileWaitingForSize","labelFileSizeNotAvailable","labelFileLoading","labelFileLoadError","labelFileProcessing","labelFileProcessingComplete","labelFileProcessingAborted","labelFileProcessingError","labelTapToCancel","labelTapToRetry","labelTapToUndo","labelButtonRemoveItem","labelButtonAbortItemLoad","labelButtonRetryItemLoad","labelButtonAbortItemProcessing","labelButtonUndoItemProcessing","labelButtonRetryItemProcessing","labelButtonProcessItem","labelMaxFileSize","filesize","labelMaxFileSizeExceeded","labelFileTypeNotAllowed","pondRef","getLabels","maxFileSize","credits","getStorageKey","storageKey","hashCode","getTenantId","FileUpload","doProcess","fieldName","metadata","load","progress","abort","retryOnUnauthorized","URL","URLSearchParams","XMLHttpRequest","setRequestHeader","upload","onprogress","lengthComputable","loaded","onload","errorResponse","responseText","send","onFileUploaded","removeSuccessfullAfter","fileId","pond","serverId","getMetadata","removeFile","onFileAdded","maxFiles","allowMultiple","server","getServerOptions","allowRevert","allowDrop","onprocessfile","onProcessFile","onaddfile","onAddFile","localStorage","userStorage","setItem","userKey","getItem","defaultFont","ckEditorDefaultFontStorageKey","ckEditorDefaultFontSizeStorageKey","defaultConfig","useDefaultFont","extraPlugins","entities","removePlugins","customConfig","autoGrow_maxHeight","font_defaultLabel","fontSize_defaultLabel","onCkEditorLoaded","plugins","addExternal","initializeCss","font","fontSize","addCss","allowHtml","WHOLE_DOCUMENT","USE_PROFILES","html","ALLOWED_TAGS","RichTextEditor","editor","isFreeEmail","ckeditorConfig","fullPage","fontName","commandData","newStyle","definition","triggerOnChange","noToolbar","MimeIcon","EmailAttachmentIcon","FileIcon","statusLabel","emailStatus","display","marginRight","textAnchor","alignmentBaseline","left","bottom","right","color","stroke","fill","strokeWidth","viewBox","d","Yes","No","YesNoModal","onNo","RegularEmailIcon","marginLeft","IconWarningSign","LeftArrowIcon","RightArrowIcon","SpinnerIcon","IndustryIcon","BriefcaseIcon","UserFaIcon","Restore","Copy","Add","Save","Edit","Download","Replace","History","IconPencil","tooltip","DeleteIcon","PaperPlaneIcon","FolderOpenIcon","UndoIcon","SaveIcon","ListIcon","InfoCircleIcon","CommentIcon","PaperclipIcon","ClockIcon","MainTaskIcon","SubTaskIcon","ToDoIcon","CopyIcon","DownloadIcon","LinkIcon","UrlIcon","WindowIcon","AddIcon","TagIcon","FolderIcon","UserIcon","DocumentIcon","EyeIcon","EmptyStarIcon","StarIcon","BookmarkIcon","PhoneIcon","NoteIcon","AppointmentIcon","MailIcon","EnvelopeIcon","UserCircleIcon","ReplaceIcon","ShareIcon","PdfIcon","DeleteAttachment","DeleteAttachmentConfirmationMsg","InlineAttachment","showDeleteModal","canDownload","onDelete","noDownload","showDeleteConfirmation","scanStatus","dateFormatService","correctFormatForConfiguration","dateWithTimeFormat","dateDayMonthFormat","dateLongFormat","delimiter","replaceAll","renderMonthElement","onMonthSelect","onYearSelect","justifyContent","months","years","validateMinimumDate","isSameOrAfter","minimumMoment","isBeforeToday","isBefore","isBeforeTomorrow","isBeforeLastYear","validateDateRange","endDate","startRequired","endRequired","isBeforeMinimum","isOutRange","rangeStart","rangeEnd","required","validateEndDate","falseFunc","isValidNumber","isEmptyHtmlField","emptyHtml","DatePicker","onDateChange","isValid","numberOfMonths","phrases","keepFocusOnInput","internalOnDateChange","hideKeyboardShortcutsPanel","displayFormat","getRelationIconClass","RelationTypeIcon","memo","withAngularState","StateService","StateServiceContext","Provider","injectStateService","Consumer","stateService","getRelationNameMapper","getRelationName","RelationName","enabled","tabIndex","onDeleteRelation","assignment","defaultAssignmentName","fullName","gotoRelationHref","gotoRelation","GoToRelation","DeleteRelation","recentRelations","createContext","gotoField","taskTemplateId","openPlannedTaskDetailModal","kpi","onlySubtasksForAssignedUser","userIsNextAssignedUser","deadlineFrom","deadlineUntil","filters","period","finalInvoiceStreamId","dateFrom","dateUntil","filterType","stateName","openMailModal","relationGroups","useStateService","ctx","useContext","stateServicePropType","displayName","isPerson","titleType","infix","appendLegalFormToName","translatedTitle","alias","filterRelations","relations","searchOptions","take","includeInactive","SearchRelation","RelationSearch","initialRelation","retrievingRelation","nameMapper","types","mapRelation","RecentRelationsService","setRelationStateFromInitialItem","changeOnInit","searchRelations","onRelationChanged","showAll","TextSearch","timer","triggerChange","stateValue","handleChange","handleKeyDown","getDragValue","dataTransfer","containsDragFormat","doNothing","FixedTree","Tree","appInsights","dontTrackUrls","trackEvent","trackPageView","trackPageViewPerformance","trackTrace","trackMetric","startTrackPage","stopTrackPage","startTrackEvent","stopTrackEvent","getter","findInitialNode","tagsToFind","tagId","found","newTagsToFind","findNodeById","tree","updateNode","nodeToFind","currentNode","updatedProps","getCollapsedState","saveCollapsedState","getCollapsedStateFromTree","leaf","undefinedFallback","DocumentSigningStatusIcon","signingFailedReason","FormattedDateShort","showTimeInTooltip","stringValue","toISOString","formatDateWithTime","AllDocuments","DocumentsWithoutTags","Folders","DropDocumentToAddTag","MoveOrCopyDocument","UploadFilesToSpecificFolder","DocumentTreeView","tagTree","tagList","showList","activeNode","dragOverNode","parentTags","collapsedState","lvl","mapTreeNode","onFilterChanged","updatedState","collapseNode","tag","dropEffect","noDrop","alwaysCopy","dragValue","onUploadDocument","allowUpload","force","selectNode","onDragOver","handleDragOver","onDragLeave","handleDragLeave","onDrop","handleDrop","initialTags","onTreeLoaded","activeNodeId","treeData","tagData","allDocumentsNode","treeNodes","allTagsNode","AllTags","tagNodes","noTagsNode","toggleState","dropinfo-cxdocument","dropinfo-files","paddingLeft","renderNode","handleTreeChanged","tagsToString","DocumentSelection","NoDocumentsFound","Type","DocumentDate","SearchDocuments","Ready","NrOfLinkedRelations","DocumentSelectorModal","treeviewReady","mainFilters","filterChanged","cancelToken","CancelToken","newDocuments","currentSearchParams","shouldBeSigned","initialFilters","isEqual","onDocumentsSelected","initRelation","overflow","filterDocumentsByTags","onTreeviewLoaded","loadDocuments","float","InputGroupWrapper","leftClassName","rightClassName","Subject","Attachments","SendTo","Cc","Bcc","ChooseDocumentInAdminPulse","DocumentDateLabel","EmailEditor","showDocumentSelectorModal","onTitleChanged","onContentChanged","attachmentUploadEndpoint","onAttachmentUploaded","attachments","onDeleteAttachment","onDocumentDateChanged","dateFocused","maxLength","focused","onFocusChange","block","isOutsideRange","newContent","base64Images","searchPlaceholders","terms","term","searchKeyGetter","searchKey","Placeholders","UseThesePlaceholdersInYourEmail","PlaceholderModal","placeholders","taskPlaceholders","taskPlaceholdersPromise","templateContext","normalPlaceholdersPromise","normalPlaceholders","taskTemplateName","retrievePlaceholders","hasTaskPlaceholders","filteredPlaceholders","filteredTaskPlaceholders","autoComplete","margin10B","taskParameter","filtered","KPIs","KPI","subtitle","titleClassName","subtitleClassName","EmailContentRequired","MsgEmailAttachmentUploadFailed","NoEmailTemplateFoundInLanguage","SendEmail","Template","NoTemplatesFound","ChooseTemplate","OpenEmailTemplates","Templates","PlaceholdersWillBeResolvedByAdminPulse","ClickHereToCreateFreeTextEmail","SendMailMakeSureAllFieldsAreFilledOut","DocumentsOfTheFollowingTypeWillBeLinkedIfPresent","freetTextMailContent","MultiRelationsMailModal","emails","emailAttachments","templates","showPlaceholderModal","autoLinkDocumentTypes","emailContext","renderEmailInput","selectedTemplate","isFormValid","invalidEmailBody","emailTemplateId","templateLanguageId","doc","mapAttachment","languages","documentUploadEndpoint","emailTitleChanged","onEditorStateChange","onDocumentUploaded","emailsCopy","emailAttachment","emailCollapseClicked","renderSingleEmail","languageCodes","loadEmailTemplates","emailTemplates","loadingTemplate","getTemplateAttachments","results","flat","form","createRef","retrieveEmailTemplates","current","reportValidity","closeModal","templateChanged","translation","goToEmailTemplates","renderMultipleEmails","enumCache","AddEmailAddress","RemoveEmailAddress","msgInvalidEmailAddress","SubjectBodyRecipientsAreRequired","msgTemplateNotInLanguage","templateNotFound","templateNotFoundCheckTaskTemplate","SingleRelationMailModal","cc","bcc","templatesPromise","emailAddressesPromise","addresses","addressId","mailTemplateId","retrieveTemplatedEmail","j","validateEmail","attachmentDocumentIds","emailLinkType","subTaskId","linkIds","recipients","templateNotAvailableInRelationLanguage","CanReadDocuments","childTaskIds","retrieveTaskDocumentsForTemplate","newTo","index2","newCc","newBcc","initializeModal","handleToChange","marginTop","handleCcChange","handleBccChange","renderFreeEmail","sortById","sortFunction","SelectAValue","NoValue","EnumSelect","selectedValue","allowNull","enumType","orderByLabel","selectedOption","selectedValueChanged","option","italic","RelationGlobalActionsTooltip","GlobalActions","Compliance","NoComplianciesFound","ResetFilters","CountRelationsSelected","SendEmailQueued","EmailSent","Actions","MarkAsInapplicable","MarkAsApplicable","ExportToExcel","ComplianceType","ToggleComplianceTypeApplicable","ComplianceMarkedAsInapplicable","NotApplicable","ComplianciesWillBeCalculatedInTheBackground","AMLEndScore","ExportToExcelStarted","MarkCompliancyInapplicableModal","complianceType","CompliancyStatusIcon","large","HoverToggle","CompliancyStatusToggle","onComplianceUpdated","statusInfo","statusInfoLoaded","loadingStatusInfo","compliancyStatus","compliancyType","onNavigateCompliance","canUpdate","Dropdown","loadStatusInfo","Tooltip","bsRole","Menu","MenuItem","eventKey","onSelect","onToggleInapplicable","MenuItemWithSecurity","CompliancyGlobalActionsButton","onSendEmail","onMarkComplianceTypeAsInapplicable","data-toggle","data-placement","bsSize","bsStyle","pullRight","crmTypeSortKey","crmTypeSorter","sortA","sortB","getFieldIdForCompliancy","compliancy","relationType","MultiSelectItem","onRemove","filterBehaviourOptions","CrmTypeButtonGroup","relType","selectedTypes","hiddenTypes","aria-label","activeElement","toggleRelationType","CheckboxMenu","forwardRef","onItemChanged","itemClassName","__rest","getOwnPropertySymbols","propertyIsEnumerable","rootCloseEvent","onRootClose","removeItem","caseSensitive","itemEquals","addItem","splitItems","itemsArray","selectedArray","OrFilter","AndFilter","MultiSelect","searchProps","availableItems","matchSorter","threshold","rankings","ACRONYM","currentValue","onCreateItem","popValue","trimmed","matchingItem","focusOnInput","onItemSelected","onFilterBehaviourChanged","newFilterBehaviour","filterBehaviour","and","or","closeMenu","onItemRemoved","getInput","withFilterBehaviour","onInputValueChange","handleInputValueChange","defaultHighlightedIndex","inputClassName","onInputChange","onInputKeyDown","handleBlur","hasItems","onWrapperClick","OwnCompanies","CompanyMultiSelect","selection","companies","selectableItems","dataCacheMultiSelectHoc","mapper","DataCacheMultiSelect","placeholderMessage","showWithoutOption","useState","useEffect","hasMultipleCompanies","HasMultiCompany","LegalForms","WithoutLegalForm","LegalFormMultiSelect","DataCacheMultiSelectHoc","legalForm","EnumMultiSelect","customItems","allItems","mounted","EnumCacheService","TeamMultiSelect","idProp","WithoutTeams","EmptyFiscalYear","EndFiscalYear","EndFiscalYearMultiSelect","setfiscalYears","fiscalYears","fiscalYear","InvoiceSchedules","NoInvoicingSchedule","WithInvoicingSchedule","InvoicingViaRelations","invoiceTypeKeys","0","1","2","InvoiceScheduleTypeMultiSelect","hideInvoicingVia","invoiceSchedulesPromise","invoicingTypes","invoiceSchedules","fixedItems","RelationTypeButtonGroup","relationTypes","AssignmentTemplate","AssignmentTemplateSelector","showDefaultAssignment","emptyObject","getTranslation","YearSelect","yearsInPast","yearsInFuture","currentYear","startYear","endYear","withoutOption","otherProps","extraValue","placeholderLabel","withoutOptionLabel","SearchUser","UserSearch","initialUserId","includeInactiveUsers","RelationUserSearch","YesNoSelect","WithoutRelationGroup","RelationGroups","EnumSelectV2","Responsible","Assistant","AssistantBackup","Associate","BillingUser","SeniorUser","FilterResponsible","FilterAssistant","FilterAssistantBackup","FilterAssociate","FilterBillingUser","FilterSeniorUser","getDynamicFiltersFromDefaultFilters","ignore","filterObjects","initDynamicFilters","dynamicFilters","visibleFilters","filterObject","defaultFilterObject","resetDynamicFilters","handleDynamicFiltersChanged","DynamicFilter","labels","employeeLabels","renderCustomFilter","relationUserSearchParams","labelsIdProp","collClass","legalForms","responsible","employeeProfileMessages","assistant","associate","assistantBackup","billingUser","seniorUser","assignedTo","AssignedTo","checkedOutUser","CheckedOutUser","splitMultiSelectItems","withLabels","selectedLabels","availableLabels","removeMultiSelectItem","addMultiSelectItem","WithLabels","filterBehaviours","withEmployeeLabels","WithEmployeeLabels","withoutLabels","WithoutLabels","withoutEmployeeLabels","WithoutEmployeeLabels","Sector","SocialSecretariat","NotFilledOut","SocialSecurityFund","AccountingSoftware","FinancialStatementScheme","NoFinancialStatementScheme","SendInvoiceStrategy","PeppolStatus","EmptyMixedTaxPayerVatDeductionMethod","MixedTaxPayerVatDeductionMethod","MixedTaxPayer","endFiscalYears","OtherSoftware","WithoutReferenceYear","EmployeeType","VatPeriodicity","CommunicationChannelSearch","icons","OnlyActiveRelations","CrmType","RelationType","OwnCompany","hasFeature","WithAssignments","WithTeams","StartDate","StartDateFrom","StartDateUntil","LastName","FirstName","Infix","Initials","Alias","Location","Phone","Active","Status","NoRelationsFound","Relations","VatPending","Export","ExportRelations","ExportAuthorizations","ExportLinkedRelations","ExportFiscalSections","ExportCommunicationChannels","ExportCommunicationSettings","VatOrEnterpriseNumber","DeleteRelationConfirmationMsg","RelationPutInactive","SetTaskSchedulingQueued","SetTaskScheduling","UpdateField","NaceCode","SelectAField","SelectAnEmployee","UpdateFieldQueued","SearchRelations","IncludeInactiveRelations","PaymentMethod","FilterLinkType","FilterLinkTypeReverse","LinkTypeReverse","NewRegistration","NewRegistrationsQueued","SetInvoiceSchedule","CreateTaskWithoutPlanning","CreateTaskQueued","OpenTimeline","AuditLog","AddOrRemoveTeams","AddTeamToRelationQueued","RemoveTeamFromRelationQueued","Action","Team","AddTeam","RemoveTeam","SelectATeam","UpdateRelationTeamNotInATeam","ClickHereToGoToTeamSettings","AdvanceFilters","HideFilters","ChooseDate","NotSubjectToVAT","EmptyVATPeriodicity","AddOrRemoveTags","RemoveTags","AddTags","EnterTag","AddTagsToRelationQueued","RemoveTagsFromRelationQueued","AddOrRemoveTaskSchedule","Deadline","StartPlanning","EndPlanning","TaskTemplate","Schedule","AddTaskSchedule","RemoveTaskSchedule","DeletePlannedTasks","DeletePlannedTasksTooltip","DeleteTaskScheduleQueued","SetInvoiceScheduleQueued","VatNumber","NationalNumber","FilterLanguage","Language","FilterCountry","Country","SelectYourFilters","SelectAll","Filters","MoreFilters","ColumnConfig","SelectOverviewColumns","CustomerCode","AccountingNumber","UniqueIdentifier","ShareRegister","ShareRegisterNotFilledOut","Jurisdiction","AddAssignment","BackgroundJobQueued","UpdateRelationUser","UpdateUserInPlannedTasks","RelationUserIsUnassignedWhichUserDoYouWantToAssignToTasks","GenerateDocuments","GenerateDocumentsQueued","KvkNumber","ObNumber","LbNumber","RsinNumber","BsnNumber","FiscalNumber","SearchOnPeppolNetwork","EndDate","TaskScheduleDeviation","ClickToConfigureDeviations","Task","ScheduleDeviation","defaultRelationFilters","amlEndScore","statusFilters","naceCodes","dynamicFiltersStorageKey","CompliancyFilters","linkTypes","onFilterChange","newFilters","selectedNaceCodes","availableNaceCodes","allDynamicFilters","Code","hasFilters","onResetFilters","countSelectedRelations","getRelationTypes","dropdownFilters","filterRelationTypes","renderDynamicFilter","Toggle","dynamicFilterChanged","ComplianceKPISubtitle","compliant","CompliancyContainer","obj","bodyParams","relationFilters","getSelectionParams","complianceKPIs","utils","ok","allSelected","urlParams","retrieveToken","sessionStorage","rows","complianceTypes","loadKPIs","row","complianceStatus","compliancies","isCurrentlySelected","itemsCopy","relationIds","selectAll","executeBatchAction","creatingReport","isGlobalActionsDisabled","successMessage","reloadCompliancies","showSendMailModal","showMarkComplianceTypeAsInapplicableModal","gotoJob","emailViewModel","showSendSingleRelationMailModal","Set","getSelectedRelationLanguages","relationLanguages","handleSelect","relationComplianceRemark","handleUpdateComplianceStatus","iconClicked","activeRelation","sessionFilters","sessionParams","compliancyUpdateHandler","getCountSelections","hasData","emailModel","sendEmailForSelectedRelations","MarkComplianceTypeInapplicableForRelations","sendEmail","filterByKpi","green","filtersChanged","resetFilters","getCountSelectionsFormatted","createExcelReport","handleSelectAll","mapAddresses","emailAddresses","SelectRelationToRetrieveAddresses","Forward","ForwardEmailModal","selectedRelation","emptyPromise","emailContentPromise","communicationSettingsPromise","forwardInfo","communicationSettings","main","findAddressesForType","err","purpose","medium","addr","getAddressesForRelation","DropzoneContainer","dragClasses","effectAllowed","classes","onDragEnter","handleDragEnter","withDropzone","CheckboxList","individualClassName","ShareItem","Remark","ItemWasShared","Share","ShareItemModal","selectedUsers","selectedAssignedTo","invalidUsers","notificationType","itemName","shareMessage","shareSubject","selectedItemsFormatted","r","fieldError","userRemoved","userAdded","minHeight","individualItemClassName","CheckboxListModal","sortByLabel","selectedTaskStatus","newItems","reloadItems","showSelectAll","handleItemChanged","initHiddenColumnsState","columnSelectionStorageKey","columnDefinitions","initColumns","columnsFromStorage","hiddenColumns","hideableColumns","visibleByDefault","columnStatus","generateColumnStatus","handleHiddenColumnsSelection","newHideableColumns","FormGroupPart","labelClassName","labelCols","inputCols","invalid","col","labelAlign","padNumber","numberValue","TimeInput","hourEmpty","minuteEmpty","hasFocus","hourInput","minuteInput","lastKeyPressWasArrow","padHours","inputNumber","onInputChanged","validTime","time","validHour","validMinute","newState","currentHour","currentMinute","resetInternalValue","autofocus","minHour","minMinute","maxHour","maxMinute","hourValue","onOutsideClick","handleOutsideClick","step","onHoursChanged","onHoursKeyDown","onMinuteChanged","SharepointFolderTree","subfolderSelected","siteId","driveId","onSelectedFolderChanged","setLoading","folderCache","setFolderCache","selectedFolders","setSelectedFolders","fetchFolders","_loop_1","selectedFolder","folderId","newSelectedFolders","folder","OnlyEmailsByAdminPulseCanBeResent","TheMailHasBeenSentAgain","ResendEmail","ResendEmailConfirmationMsg","MarkAsSigned","CreateRelation","UpdateRelation","Open","LinkToRelation","DeleteDocument","ShowAllDocumentsForRelation","EmailStatus","RemoveEmails","EmailGlobalActionsTooltip","DropzoneExplanation","AutoLinkDocumentsToCompanyExplanation","DocumentWillBeLinkedToCompanyAutomatically","DocumentWillBeLinkedToRelationAutomatically","Dropzone","ChooseRelationLinkDocument","UploadFilesToCurrentFolder","AllDocumentsSelected","AllEmailsSelected","CountEmailsSelected","FolderStructure","WithDocumentTags","WithoutDocumentTags","MsgDeleteDocumentSuccess","MsgDeleteDocumentError","MsgLinkRelationDocumentSuccess","MsgLinkRelationDocumentError","MsgRecognitionDocumentUploadError","MsgMarkSignedLetterSuccess","MsgMarkSignedLetterError","MsgCreateRelationSuccess","MsgCreateRelationError","MsgUpdateRelationSuccess","MsgUpdateRelationError","CreationDate","CreatedBy","AmountOfAuthorizations","AmountOfRelations","AmountOfRegistrations","UpdateAuthorizations","Importregistrationlist","ProcessAuthorizationList","CreateNewRelations","RemoveExpiredAuthorizations","ProcessAuthorizationListQueued","ProcessRegistrationListQueued","NotLinkedToARelation","NotLinkedToARelationShort","LinkedToMultipleRelations","LinkedToMultipleRelationsShort","DocumentGlobalActionsTooltip","GlobalActionStarted","AddOrRemoveRelations","AddRelations","RemoveRelations","DeleteSingleDocumentConfirmationMsg","DeleteMultipleDocumentsConfirmationMsg","RemoveDocuments","DownloadAsZip","DownloadZipWithFolderStructureYesNo","CountDocumentsSelected","SendByEmail","PleaseFilterOnRelationBeforeSendingEmail","PleaseMakeManualSelectionOfDocuments","DocumentWasMoved","SigningStatus","CreateNewToDo","DocumentIsPublicOnPortal","EnableOrDisableIsPublicOnPortal","IsPublicOnPortal","SendSignatureRequest","NoDocumentProviderConfigured","NoSignaturedFoundOnDocument","Signature","Signer","Mobile","ChooseEmployee","ChooseClient","Or","NoEmailAddress","NoPhone","SelfSignature","RequiredSignature","DocumentSigningRequestSent","DocumentSigningRequestFailed","TheDocumentNeedsToBeLinkedToARelationInOrderToSign","ChooseRelation","ClickToAddSignatureFieldsToDocumentOnEmptyPage","RevokeSignatureRequest","RevokeSignatureRequestConfirmationMsg","SignatureRequestRevoked","DocumentCreatedBy","NoRelationCandidatesFound","DeleteRelationLink","DeleteRelationLinkConfirmationMsg","RelationLinkDeleted","ChangeDocumentDate","InvalidDate","SendOn","DelayedSendingExplanation","Emails","Invoices","IncludeEmailsTooltip","IncludeInvoicesTooltip","IncludeAttachmentsTooltip","CreateMergedPdf","EmailTo","From","ToCcBcc","SystemEmailsCannotBeRemoved","NoEmailsFound","DocumentWasUploaded","UploadFilesToStartRecognition","DocumentDateWasModified","InvalidDocumentDate","ClickForAdvancedUpload","Content","NoDigitalSigningTemplateFound","AddSigner","RequiredEmailBodyAndSubject","Signers","DownloadAsPdf","RepresentativeOfRelation","SendViaEmail","SendAsPdf","SelectRelation","DocumentCouldNotBeConverted","OneOrMoreOfTheDocumentsCannotBeSigned","Time","DocumentSignatureRequestModal","noProviderConfigured","scheduledDate","scheduledTime","employeeCandidates","relationCandidates","retrieveDigitalSigningEmail","loadingEmail","initialBody","signers","signerId","signer","isSelfSignature","requiredSignature","signerIsSelfSignature","signingProvidersWithCustomEmail","appendSignaturesToDocument","signingRequest","emailSubject","emailBody","documentLanguage","initiator","getEmail","contentType","sending","updatedDocuments","false","canBeSigned","cannotSign","flatMap","relationCompanyIds","signaturesPromise","documentHasMarkers","retrieveSigningCandidates","encodeURIComponent","combinedDateTime","combineDateAndTime","hoursTime","minutesTime","hours","second","millisecond","noRelationsLinkedToDocument","paddingTop","paddingBottom","textAlign","borderCollapse","borderSpacing","data-translate","signerIdentifier","employeeChanged","padding","relationCandidateChanged","phone","roles","representative","representsRelation","marker","handleDateChange","handleTimeChange","newBody","__awaiter","thisArg","_arguments","P","generator","fulfilled","next","done","__generator","sent","trys","ops","g","verb","Symbol","iterator","v","op","TypeError","pop","InvalidType","SharePointFileWillBeMovedInBackground","SharePointFileMovedInBackground","PrefixFilenameWithDocumentDate","EditDocumentInSharePoint","DocumentCheckedOut","EmailLinkType","CheckoutBrowser","CheckoutApp","Checkin","DiscardCheckoutAction","ContinueEditing","CheckinDocument","MsgCheckinDocumentError","MsgCheckoutDocumentError","MsgDiscardCheckoutDocumentSuccess","MsgDiscardCheckoutDocumentError","ExtractZip","ExtractAndKeep","ExtractAndDelete","ExtractZipTitle","ExtractZipMessage","ProcessRegistrationList","DefaultRegistrationDate","CheckinDocumentConfirmationMsg","Reply","ReplyAll","MoveToSharepoint","LinkFromSharepoint","OpenInApp","SharepointSite","SharepointDrive","Folder","File","SharepointFileSuccessfullyMoved","CheckedOutSuccesfull","Duplicate","ChangeDocumentType","ForcedRelationModeCancelledMessage","CheckedOutDocumentsReminderMessage","SharepointModal","sites","setSites","foldersLoading","setFoldersLoading","sitesLoading","setSitesLoading","selectedSiteId","setSelectedSiteId","drivesLoading","setDrivesLoading","drives","setDrives","selectedDriveId","setSelectedDriveId","selectedFolderId","setSelectedFolderId","site","drive","ExtractZipModal","continueDisabled","setButtonsDisabled","onAccept","buttonsDisabled","extractAndKeepButton","SharepointFileSelector","selectedFileId","onFileSelected","setFiles","LinkFromSharepointModal","_d","_e","_f","_g","_h","_j","_k","setSelectedFileId","selectedFileName","_l","setSelectedFileName","finally","isCollapsed","setCollapsed","isLoading","setIsLoading","sidebar","mainView","translatedName","getInForfaitAndPrice","getInForfait","getLastRegistrationTime","fallbackStartTime","createOrUpdateInteraction","updatedInteraction","isPinned","newInteraction","TaskTagsMultiSelect","allowNew","canCreateTags","tagName","newTag","oldItems","RestoreOriginalDeadline","NoDeadline","CompletedDate","TaskStatus","DeadlineFrom","DeadlineUntil","NoTasksFound","SelectTask","TaskOverview","HideHistory","ShowHistory","EditDocument","Via","UpdateAssignedUserQueued","ChangeAssignedUser","User","Into","On","To","ThisMonth","NextMonth","ThisQuarter","NextQuarter","ThisYear","OpenInTaskboard","ShowDateDone","ShowDeadline","CountTasksSelected","ChangeTaskStatus","ChangeMainTaskStatus","ChangeSubtaskStatus","ChangeTodoStatus","ChangeDeadline","ChangeSubtaskDeadline","Subtask","SelectASubtask","AutomaticMailTooltip","UpdateTaskStatusQueued","Tasks","TaskList","TaskType","RegistratedTime","SubTask","AddRegistration","ModifiedAt","ModifiedBy","CreatedAt","AddOneTimeTask","SelectColumns","ThisTaskCannotBeOpenedInTaskBoard","AToDoCannotBeOpenedInTaskBoard","UseTaskTemplate","Description","TaskScheduleRemark","ToDoCreated","ToDo","ToDos","SubTasks","MainTasks","FilterOnToDos","FilterOnMainTasks","FilterOnSubTasks","MainTask","TimeRegistrations","NoRegistrationsForThisTask","CreateTimeRegistration","PauseTimer","StartTimer","CountRegistrationsForDuration","CountRegistrations","PriceListItem","NoPriceListItemsFound","Duration","Employee","ThisTaskHasCountSubTasks","Blocked","Block","Unblock","ViewTask","DeleteTask","DeleteMainTaskConfirmationMsg","DeleteTaskConfirmationMsg","TaskDeleted","ChangeTaskDeadline","UpdateTaskDeadlineQueued","OpenTaskDetails","Inapplicable","Quantity","DownloadAttachment","OpenDocument","Pending","AddDocument","TaskGlobalActionsTooltip","TaskDashboard","ChartType","ShowQuantitiesChart","ShowPercentagesChart","Quantities","Percentages","Total","FilterPeriodicity","NoPeriodicity","TaskOverviewNoTaskSelectedDescription","TaskOverviewNoTaskSelectedSelectTask","TasksAssignedTo","RelationsAssignedTo","ChooseTaskFirst","ShowParameters","FilledOut","SentEmails","Recipients","Preview","RelationLabels","Assignment","AllTasks","AllUsers","TasksWithoutTemplate","TaskCreatedOnLabel","FilterTaskTemplateNotFound","ResetDeadline","UpdateFor","MainTaskAndAllSubtasks","OnlyMainTask","SubTaskDeadlineResetInfo","MainTaskDeadlineResetInfo","SendMail","OpenMailHistory","TimeRegistrationIsNotPossibleTaskTypeCondition","NewTask","ItemFromPricelist","UserDefinedInTaskTemplate","MarkAsRejected","MarkAsNotRejected","Rejected","System","AddTaskTags","RemoveTaskTags","NoSignableDocumentsLinkedToTask","SelectDocuments","SendDocumentsLinkedToTaskOutForSignature","ShowTasksWhereSelectedUserIsNextInLine","ShowTasksWhereSelectedUserIsNextInLineTooltip","CreateToDoModal","touchedTaskName","touchedRelation","deadline","todo","taskLevel","initialRelationId","taskNameClassName","relationClassName","initialDocumentSelectorRelation","saveToDo","taskNameChanged","deadlineChanged","onTagsChanged","userChanged","onResourceChanged","handleDeleteDocument","handleDocumentsSelected","initialState","requestId","omitRelations","defaultSearchOptions","onLoaded","overrides","prepareFetch","fetch","AddRelation","RemoveRelation","RelationListPicker","changes","onAddRelation","selectedRelations","clearItems","setHighlightedIndex","setItemCount","onRemoveRelation","renderRelationInput","renderRelationRow","UpdateDocumentRelationsModal","selectedTags","isFormInvalid","actionChanged","addRelation","removeRelation","RemoveTag","Tag","removeTitle","aria-hidden","DocumentGlobalActionsButton","onUpdateTags","onUpdateRelations","onRemoveDocuments","onDownloadZip","onSendByEmail","onSetIsPublicOnPortal","onChangeDocumentDate","onCreateMergePdf","onSendSignatureRequest","onChangeDocumentType","UpdateDocumentTagsModal","availableTags","addTag","debouncedFindAndAddTag","retrieveTags","onTagValueChanged","onRemoveTag","DateFrom","DateUntil","Today","Yesterday","PreviousMonth","PreviousQuarter","ThisWeek","PreviousWeek","DelayedDateRangePicker","submitAfterChange","internalStartDate","internalEndDate","submitDates","onDatesChange","datePickerFocus","setDates","renderKey","startDatePlaceholderText","endDatePlaceholderText","startDateId","endDateId","showClearDates","customArrowIcon","handleDatesChange","focusedInput","setInputFocus","dateMessages","handleClose","minimumNights","momentPropTypes","momentObj","getStorage","lastUpdate","setStorage","findFilterIndex","screen","_i","Boolean","FilterSaveModal","setIsNameModalOpen","setModalFilter","isNameModalOpen","modalFilter","saveFilter","nameInput","SearchCriteriaNameInputTitle","SearchCriteriaNameInputMessage","SearchCriteriaNameInputPlaceholder","FilterSave","showSaveFilterModal","filtersObject","setFilter","updatedFilter","reloadSavedFilters","hasActiveFilters","savedFilters","setSavedFilters","hasSavedFilters","selectedFilter","getScreenFilters","SaveSearchCriteria","SelectSearchCriteria","filterId","savedFilter","ReplaceSearchCriteria","RenameSearchCriteria","DeleteSearchCriteria","deleteFilter","isLoaded","EmployeeFilterService","subtract","NoPreviewAvailableForThisDocument","defaultFilters","recognitionStatus","notLinkedToRelation","linkedToMultipleRelations","createdBy","withTags","withoutTags","includeEmails","includeAttachments","includeInvoices","DocumentFilters","endOf","debug","setPeriod","recognitionStatusses","emailStatusses","signingStatusses","relevantSigningStatuses","selectionCount","defaultBtnClass","selectedDocumentTypes","selectedRecognitionStatusses","selectedEmailStatusses","selectedSigningStatusses","withTagsSelection","withTagsAvailable","withoutTagsSelection","withoutTagsAvailable","filtersWithoutSortOptions","toggleNotLinkedtoRelation","toggleLinkedToMultipleRelations","onDocumentTypeFilterRemoved","onDocumentTypeFilterAdded","onRecognitionStatusFilterRemoved","onRecognitionStatusFilterAdded","onEmailStatusFilterRemoved","onEmailStatusFilterAdded","onSigningStatusFilterRemoved","onSigningStatusFilterAdded","onCreatedByChanged","setFilters","DateOfBirth","Nationality","Gender","PlaceOfBirth","Address","Male","Female","ExpiryDate","filePath","fetchedData","setFetchedData","sandbox","border","srcDoc","src","withFetching","xhr","createRequest","path","XDomainRequest","CsvViewer","CSV","cell","resizable","sortable","filterable","rowsCount","rowGetter","XmlViewer","beautified","beautify","PhotoViewer","crossOrigin","UnsupportedViewer","VideoViewer","visibility","renderLoading","controls","onCanPlay","kind","default","EidViewer","xml","xmlDoc","DOMParser","parseFromString","getElementsByTagName","cardInformation","childNodes","nodeValue","nationality","placeOfBirth","nationalNumber","gender","dateOfBirth","cardNumber","cardExpiryDate","street","zip","city","photo","parseEid","OutlookMsgViewer","emailHtml","retrieveMsgPreview","EmlViewer","retrievePreview","AudioViewer","AdobeEmbedPdfViewer","readyPromise","AdobeDC","addEventListener","adobeDCView","divId","viewerConfig","adobeEmbedConfig","clientId","View","previewFile","metaData","EmbeddableDocumentViewer","viewer","showPrintPDF","showZoomControl","showAnnotationTools","showLeftHandPanel","showPageControls","showDownloadPDF","enableFormFilling","showThumbnails","embedMode","pdfViewerRef","loadPDF","getExtensionFromName","lastDot","normalEmbeddedMimeTypes","FileViewer","currentMimeType","nextProps","oldDocumentType","oldMimeType","oldFilePath","oldFileName","newDocumentType","newMimeType","newFilePath","newFileName","container","clientHeight","clientWidth","isEmbeddableMimeType","extension","Driver","HtmlViewer","TextViewer","getDriver","unsupportedComponent","SimpleFileUpload","multiple","accept","onUpload","FormattedDateTime","getCurrentUserId","getCompanies","currentUserId","userLanguage","DataContext","ReplyToEmailModal","replyAll","useDataContext","Distance","SelectAnAssignment","What","SearchPriceListItem","DurationInDays","DurationInHours","HalfDay","Morning","Afternoon","Days","Hours","Price","Discount","VAT","SelectAVatPercentage","TotalExcl","Billable","InternalRemark","AddMinutes","RoundToNearest5","RoundToNearest10","RoundToNearestQuarter","RoundToNearestX","Until","Registered","InForfait","Cost","RegistrationDurationPerRelation","RegistrationQuantityPerRelation","DurationPerRelationMinimum1MinuteWarning","RegistrationOutsideWorkingHoursWarning","PerRelationLowerCase","CreatePhoneCallTooltip","CreateNoteTooltip","CreateMeetingReportTooltip","InvoiceRemark","RelationLanguage","RegistrationModified","CommunicationReportTitle","CommunicationReportDescription","TotalDuration","RemainingOvertimeHours","RemainingOvertimeHoursAfterSave","FillWith","RegTimeFromTo","ResourceFixedPriceTooltip","EditRegistration","AddAbsence","EditAbsence","AddRecuperation","EditRecuperation","AbsenceBalance","BalanceAfter","AssignmentFormGroup","streams","CostQuantityPart","NumberInput","invalidValue","val","noDecimals","markedError","DatePart","DiscountPart","discount","TimeButtons","addMinutes","roundMinutes","buttonClassName","DurationFormGroup","duration","DateInput","focusChanged","DurationDaysInfoPart","setInfo","lastInfo","requestToken","timeoutHandler","weekday","minuteToTime","DurationDaysFormGroup","DurationTypeFormGroup","ReferenceYearPart","HalfDayFormGroup","InteractionFormGroup","initialInteractionDescription","interactionTypes","Icon","OwnCompanyRelationFormGroup","FormattedCurrency","minimumFractionDigits","maximumFractionDigits","PriceOptionsDropdown","onPriceChanged","noCaret","RelationFormGroup","ResourceTypeRadioButtons","handleOnChange","NoOwnCompanyRelationsFound","OwnCompanyRelationSelect","allowedValues","taskSearch","isToDo","orange","TaskFormGroup","initialTask","retrieveTasks","onTaskChanged","currencySymbols","currencySymbol","TotalAmountPart","TravelQuantityPart","UnitPricePart","unitPrice","onUnitPriceChanged","showPriceOptions","CurrencySymbol","CurrencySymbols","vatPercentages","configuration","VatRateTypeSelector","interalValue","percentages","availableVatPercentages","VatPercentagePart","AbsenceBalanceFormGroup","balance","balanceDays","hoursInDay","maxDays","balanceAfter","errorMsg","UserFormGroup","RegistrationComponent","resourceType","hasPriceListPermission","defaultResource","onlyResource","priceInfo","useCounter","getResourceChangedObject","onAction","externalOptions","oldRegistration","invalidResource","isTime","showPriceInfo","focusRelationInput","showDurationInDays","showOwnCompanyRelation","onAssignmentChanged","alignLabel","TaskTemplateSelect","includeWithoutTemplate","useTemplateInCallback","useGetTaskTemplates","taskTemplates","InvoiceStreamSelect","queryClient","usersFromProps","usersFromDataCache","originalUsers","selectUserFromTaskTemplate","defaultTask","defaultTaskResourceId","setTask","setResources","setTouchedTaskName","setTouchedRelation","touchedTaskTemplate","_m","setTouchedTaskTemplate","touchedResource","_o","setTouchedResource","_p","setDateFocused","createPlannedTask","res","onSuccess","setQueryData","TaskQueryKey","PlannedTasks","oldData","insertNewMainTask","apiError","mutateAsync","useCreatePlannedTask","isTaskTemplate","_q","setIsTaskTemplate","taskTemplateClassName","taskResourceClassName","isTemplate","Scope","scopes","onScopeToggled","selectedScopes","setTokenRequest","tokenRequest","onScopeToggle","currentIndex","getKey","grouped","setShowModalInfo","useModalContext","clients","AccessTokenQueryKey","GetClients","retry","refetch","GetScopes","createdToken","setCreatedToken","createAccessToken","expires","useCreateAcccessToken","expiredFocused","setExpiredFocused","DefaultTokenRequest","CreateAccessToken","name_1","newToken","scopes_1","invalidateQueries","AccessTokens","TokenCreated","cursor","navigator","clipboard","writeText","Expires","Client","MyOffice","dataWithPrefix","prefix","previous","currentItem","UnselectAll","onTaskDetailModalSave","updatedTasks","previousTasks","getQueryData","newOrUpdatedTask","previousSubtask","updatedTasksQueryData","previousMainTasks","pages","isMainTask","previousMainTask","updatedMainTask","mapPropertiesAfterStatusChange","onTaskDetailModalClosed","onRegistrationCreated","onCloseTimeRegistration","onSaveEmail","sendTaskMailModel","createTaskEmail","emailId","templateID","sendTaskMail","onCloseModal","onOneTimeTaskCreated","onCloseOneTimeTask","childElements","showModalInfo","useSendTaskMail","useCreateTaskEmail","canEditTasks","canEditDocuments","modalType","checkboxListItems","onTaskMailModalSaved","taskColor","hasRemark","scheduleHasRemark","ModalContext","ModalType","TaskDetail","YesNo","TaskMail","TimeRegistration","OneTimeTask","CreatePat","DocumentDetail","RegistrationModal","saveRegistration","formattedDuration","isNew","initRegistration","hasRegistrationPermission","hasSavePermission","getModalTitle","doRegistrationAction","findTaskById","pageIndex","subTask","updateTask","updateFunc","findResult","RevokeAccessToken","RevokeAccessTokenConfirmation","AddToken","nullable","subRequirement","check","sub","EditableToggle","editValue","changeMode","handleCancel","handleSetValue","onSubmit","nativeEvent","stopImmediatePropagation","handleSubmit","callBack","prevMode","onModeChange","displayValue","handleValueChanged","setInputValue","registerInputRef","events","showEditMode","EditableTextArea","submitOnBlur","displayClassName","TaskIcon","TaskStatusIcon","fa","formatDurationToTime","TaskDetailRegistrations","historyActive","onShowHistory","registrations","hasCostRegistrations","hasTimeRegistrations","username","loadingAttachments","TaskDetailsParameterValue","otherSoftware","relationFieldType","valueNumeric","valueText","valueObject","renderOtherSoftware","parameterValueType","valueDate","valueBoolean","isDateInvalid","selectionItemsArray","selectionItems","onPaste","numericValue","pastedValue","clipboardData","computedParameterModifiedByUser","computedParameterType","renderRelationField","renderInputParameter","momentDurationFormatSetup","TaskStatusLabel","getNextStatus","TaskDetailsSubtasks","openTaskDetails","onTasksUpdated","subtask","onOpenDetail","strike","TaskDetailsSentEmails","recipient","wordBreak","changeStatusTitleMessages","TaskStatusToggle","newStatus","taskIds","debouncedRetrieveAttachments","retrieveAttachmentsForTaskIds","hasAttachments","retrieveAttachments","scheduleRemark","taskRemarkPromise","loadingRemark","scheduleRemarkPromise","taskRemark","newScheduleRemark","popoverHoverFocus","whiteSpace","marginBottom","retrieveRemark","initialRemark","initialScheduleRemark","showStatusLabel","onAddRegistration","extraInfo","canCreateRegistration","nextStatus","iconProps","statusTitle","changeStatus","displayFlex","renderAttachmentIcon","renderRemarkIcon","delayShow","delayHide","taskType","divider","EditableAutoComplete","EditableDocumentTypeSelect","selectedDocumentType","cancelled","forbiddenTypes","HasFeature","TaskDetailsDocuments","savingBeforeEmail","linkedDocumentsPromise","sentEmailsPromise","onOpenMailModal","tasksLinkedToAttachment","links","documentDetailId","previousIndex","nextIndex","MsgUploadAttachmentFailed","retrieveDocumentAndMails","showSendEmailButton","canRead","updateDocumentType","canRemove","getPreviousDocumentId","getNextDocumentId","onDocumentUpdated","mapTask","completedDate","getTaskName","parameterValues","mapParameterValues","EmailMetadataDetails","metadataJson","onResendEmail","onForward","direction","IncomingEmail","OutgoingEmail","wordWrap","replyTo","ReplyTo","reason","Reason","TaskDetailsModal","showHistory","focusedDateParameters","canEditAssignment","usersForUserSearch","retrieving","hasChanged","saveTask","taskHistory","originalTaskName","originalUserId","retrieveAssignments","addDefaultUserForSubtask","retrieveRegistrations","updatedTaskIndex","previousTask","classList","touchedUserId","invalidDeadline","parentResourceId","pv","prepareModelForSave","autoClose","updatedTask","addUpdatedTask","reopenTaskOrCloseModal","isSameAsMainTask","updatedParameter","parameterType","invalidParameter","previewComputedTaskParameters","hasSchedule","Id","allUsers","parentUserName","updated","scheduleId","taskScheduleId","context","showShareItemModal","createdByUser","enterModal","onTaskClick","statusChanged","originalDeadline","parameterDefinitionId","parameterValueChanged","updateScheduleRemark","taskStatusHistory","historyItem","timestamp","oldStatus","creationSource","getUsername","textTransform","handleTasksUpdated","TaskDetailsRegistrations","onlyUnique","DocumentAudits","parseDate","mom","parseBoolean","translatedFieldChange","originalValue","ChangedField","translatedEnumChange","translatedEnumType","ClearEnum","SetEnum","renderEnumChange","DocumentType","Value","RecognitionStatus","parseRelations","relationsDictionary","renderSingleTask","tasksDictionary","taskDeadline","ThisTaskWasDeleted","renderFieldChange","Filename","newTasks","oldTasks","addedTasks","deletedTasks","ATaskWasLinked","ATaskWasUnlinked","DocumentStartDate","DocumentEndDate","SigningDate","SigningRequestDate","SigningFailedReason","downloadVersion","blobVersionId","DownloadThisVersionOfTheDocument","creationDate","isDevelopment","isAcceptance","auditLines","setAuditLines","auditLogsAvailable","setAuditLogsAvailable","setHasMore","setRelationIds","setTaskIds","setHasError","usersDictionary","setUsersDictionary","setRelationsDictionary","setTasksDictionary","parentRef","setParentRef","loadNextPage","auditLogsReleaseDate","internalAuditLogsAvailable","newUsersDictionary","prev","uri","newRelationsDictionary","newTasksDictionary","reducedData","logLine","dateTime","allRelationIds","newSplitRelationIds","oldSplitRelationIds","allTaskIds","newSplitTaskIds","oldSplitTaskIds","groupedLogs","groups","groupKey","logs","renderSource","GenericDocumentRecognition","renderLogLine","DocumentCreated","DocumentContentModified","DocumentCheckedIn","DocumentCheckoutDiscarded","NoAuditLinesFound","DocumentAuditLogsNotAvailable","TasksForMultipleRelationsSelector","perStream","streamName","taskLabel","taskLabels","setStateFromInitialItem","AuditLogsForDocument","HideAuditLogs","ShowAuditLogs","PreviousDocument","NextDocument","ScannedDocument","DocumentIsPublicOnPortalExplanation","LinkToTask","DeleteTaskLink","DeleteTaskLinkConfirmationMsg","FileUnauthorized","ForceRelationModeInfo","CheckedOutReminderModeInfo","CheckedinSuccesfull","DiscardCheckoutSuccesfull","DocumentDetailsModal","documentLink","scannedDocument","documentTypesPromise","documentDetailsPromise","getDocumentLink","unauthorized","withoutRelationDocumentTypes","creationUser","creationUserId","showRelations","documentDetails","isRelationRequired","forceLinkingDocumentsToRelation","tasksPromise","scannedDocumentPromise","previousDocumentId","navigateDocument","nextDocumentId","getDocumentDetails","findOrCreateTag","filenameWithoutExtension","newFilename","showResendMailConfirmation","showForwardModal","onDeleteAttachmentRequested","activeAttachment","showRemoveAttachmentModal","docId","addTagToDocument","tasksCopy","showTaskDetailsModal","showCreateTodoModal","addTasks","taskToAdd","currentTasks","removeExistingRelations","deleteTaskLink","translated","onReplaceDocument","updatedDocument","onCheckinCheckout","MsgCheckoutDocumentSuccess","showCheckinDocumentModal","getAvailableTags","allowNavigation","onRemoveDocument","forceRelationMode","onShareItem","checkedoutReminderMode","activeTaskId","showReplyToEmailModal","showAuditLogs","filenameClassName","metadataComponent","getMetadataComponent","disableRelationPicker","canBeChangedToDocumentTypes","cannotBeChangedTo","canCreateTodo","canDelete","canBeReplaced","resendEmail","removeAttachment","onToDoCreated","pdf","onFilenameChanged","sourceFormatted","documentDateChanged","selectedDocumentTypeChanged","getSigningStatusClassName","isPublicOnPortal","taskid","showDeleteTaskLink","hideAddTasks","linkToTask","showAddTasks","navigatePreviousDocument","navigateNextDocument","replaceDocumentInternal","replacing","updateDocument","onAdvancedUpload","onLinkFromSharepoint","DocumentActionsButton","suggestedAction","otherActions","onDeleteDocument","onCreateTodo","onOpenSignatureRequestModal","onOpenRevokeSignatureRequestModal","onSendViaEmail","onSendToSharepoint","duplicate","onCheckinDocument","onCheckoutDocument","actionsInProgress","canForward","canSign","canRevokeSignatureRequest","dropdownRef","useRef","minWidth","icon","StatusLabel","danger","statuses","iconOnly","FormattedDayMonth","formatDayMonth","AddressChange","AddedFieldForCommunication","DeletedFieldForCommunication","ChangedFieldForCommunication","EditableDatePicker","isFocused","newMode","submitOnSelect","nullDisplayValue","dateValue","handleModeChange","showClearDate","reopenPickerOnClearDate","AddedLink","RemovedLink","ForRelationLinkWith","AddedAnUboSnapshotAt","DeletedAnUboSnapshotAt","UboSnapshotEnteredOnline","Estox","AuthorizationList","AddedCommunicationSetting","DeletedCommunicationSetting","ChangedCommunicationSetting","RelationCreated","AddedAuthorization","DeletedAuthorization","AuthorizationProperty","AuthorizationPropertyWithName","DeletedBankAccount","AddedBankAccount","BankAccountProperty","BankAccountWithDisplayValueProperty","NbbForeingAccountsDocument","AddedAssignment","DeletedAssignment","DefaultAssignmentProperty","AssignmentWithDisplayValueProperty","TextInput","asLabel","togglable","mask","isHidden","iconClass","RelationImportModelDetail","recognitionMeta","street1","box","zipCode","LegalForm","legalFormDescription","fiscalYearEnd","FiscalYearEnd","Link","companyowner","bankAccounts","BankAccount","bankAccountNumber","bic","EidDetail","RelationDocumentDetail","relationFirstName","relationAddress","AuthorizationListDetail","authorizationListDocument","numberOfAuthorizations","numberOfRelations","RegistrationListDetail","documentMeta","numberOfRegistrations","DocumentDetailRow","hasRelationImportModel","AddressInput","showForm","documentTypesWithDetails","DocumentRow","loadRecognitionMeta","onOpenDocumentDetails","handleSelection","onUpdateDocumentDate","onUpdateDocumentType","isCollapsable","totalColumns","columnNames","draggable","onDragStart","toggleCollapsed","borderRadius","ChangeDocumentDateModal","ChangeDocumentTypeModal","SetIsPublicOnPortalModal","setIsPublicOnPortal","ProcessAuthorizationListModal","createNewRelations","removeExpiredAuthorizations","handleAuthorizationList","parseValue","getDate","DayMonthPicker","outputType","daysInMonth","safeDay","oldDay","oldMonth","newDay","newMonth","monthFormat","submitValue","changeDay","monthInput","createMonthOptions","EditableDayMonthPicker","EditableSelect","bindToId","InvoiceScheduleType","RegistrationsUntil","AdvanceOrSettlement","Advance","Settlement","Amount","InvoiceText","InvoiceCreationDate","UnableToDeleteScheduleInUse","CreateInvoiceSchedule","EditInvoiceSchedule","InvoiceScheduleInUseWarning","AddLine","AddAdvanceLine","AddSettlementLine","NoScheduleLines","IsTaskflowBilling","HasTaskflowBilling","InvoiceScheduleChangedInvoiceCreationDateWarning","InvoiceScheduleChangedRegistrationsUntilWarning","InvoiceScheduleChangesQueued","InvoiceTextForExForfaitRegistrationInvoices","InvoiceTextForSettlementInvoices","retrieve","listName","listId","isTenantLanguage","orgValue","setKey","keyRequired","tr","handleTranslationChanged","translationShape","TranslateListItem","evt","onDefaultChanged","inputName","translationHelper","labelClass","inputClass","labelFunc","getLabelFunction","inputLabel","translationChanged","getInvoiceTextType","invoicingType","fixed","getDisplayValueForInvoiceText","line","invoiceTexts","invoiceTextId","altInvoiceTextId","calcEndOfMonth","lineSort","InvoiceScheduleModal","translatedTemplates","line1","diffMonths","eomDiff","lines","line2","line1Eom","line2Eom","clone","diff","diffDays","nextInvoiceDate","calcNextDate","lastLine","registrationsUntil","invoiceCreationDate","subtaskTemplateId","recursive","errors","validateLine","updateLine","isRemoved","mapped","inUse","lineErrors","taskTemplate","updateData","newSchedule","schedule","hasTaskflowBilling","retrieveTaskTemplates","invoiceTextOptions","dic","normalLines","taskflowLines","keyboard","updateTranslations","changeName","removeLine","subTasks","getSubTasks","addLine","ProcessRegistrationListModal","referenceDate","referenceDateFocused","handleRegistrationList","LinkRelationDocumentModal","linkDocumentToRelation","documentName","DownloadDocumentZipModal","useFolderStructure","prefixFilenameWithDocumentDate","AdvancedUpload","Close","AdvancedUploadModal","tagsPromise","forbiddenDocumentTypesPromise","touched","signingStatuses","margin20B","SelectRelationModal","ForcedRelationMode","onDocumentSaved","setDocuments","formattedDate","forceLinkingDocumentsToRelationFromDate","CheckoutReminderMode","shouldShowCheckoutReminders","DocumentsContainer","showPickRelationModal","showDocumentDetailsModal","showProcessAuthorizationListModal","showProcessYukiRegistrationListModal","showUpdateTagsModal","showUpdateRelationsModal","showRemoveBatchDocumentsModal","showDownloadZipModal","showSetPublicOnPortalModal","showChangeDocumentDateModal","showChangeDocumentTypeModal","showColumnSelectionModal","showMoveToSharepointModal","showLinkFromSharepointModal","showExtractZipModal","showToastrMessages","documentUpdateHandler","updateDocumentInState","meta","metaParams","translatedError","filePondFiles","addFiles","checkedOutDocumentLink","showDiscardCheckoutModal","requestNr","lastRequestNr","storageFilters","nextDocument","getNextDocument","nextDocument2","actionForDocument","documentToOpen","availableActions","showSelectRelationModal","activeRelations","showSendByEmailModal","selectedRelationId","selectedCompanyId","relationDocument","handleRecognizedDocumentAction","getDocumentAction","showSingleDeleteDocumentModal","showSignatureRequestModal","showRevokeSignatureRequestModal","showDeleteRelationLinkModal","activeRelationId","updateDocumentDate","documentTags","removeDocumentFromState","documentsCopy","signalRConnectionId","jobParameters","allParams","filterParams","viewModel","updatedDocumentData","emailOrSignatureRequest","distinctRelations","selectedCompany","movedInBackground","searchParamsFilters","otherSearchParams","hiddenColumnsState","actionType","msgSuccess","msgError","openLinkRelationModal","filterDocumentsByRelation","openProcessAuthorizationListModal","importRegistrationListHandler","handleExtractZip","handleExtractZipAction","documentsUpdateHandler","documentDeleteHandler","documentMovedToSharePointHandler","documentCheckedinHandler","documentDiscardCheckoutHandler","closeDetailModal","registrationListType","totalRows","showAdvancedUploadModal","getSelectedCompany","documentMovedToSharepoint","newDocument","documentLinkedToSharepoint","handleColumnSelection","getSelectionCountFormatted","openEmailOrSignatureModal","handleListDragOver","handleListDrop","withDropZone","EmailRow","char","addressCount","onResend","onReplyTo","onDoubleClick","textOverflow","sender","formattedAddresses","EmailGlobalActionsButton","emailLinkTypes","EmailFilters","numberTooltipLabel","dataset","currencyTooltipLabelWithInlt","percentageTooltipLabel","formattedValue","EmailsContainer","newEmails","activeEmail","showResendConfirmation","showReplyToModal","emailIds","emailCreatedHandler","emailStatusChangedHandler","onDetailModalClosed","checkCanSendEmail","loadEmails","RevenuePerMonth","MostValuableCustomers","MostValuableCustomersComparison","RecentRelations","FiscalYear","BilledLast3FiscalYears","BilledThisYear","SwitchToCurrentFiscalYear","SwitchToComparisonFiscalYears","CompliancePerCriterion","ComplianceOverview","SwitchToCompliancyOverviewForAllCustomers","SwitchToCompliancyPerType","MyTodos","MyRegistrations","OpenDetails","DeleteTodo","DeleteTodoConfirmationMsg","OpenTodosInTasklist","AddDashboard","EditLayout","SaveLayout","ResetToDefault","Overtime","MissingHours","AbsenceCounters","NoAbsencesFound","CounterBalanceStartValue","AbsenceWidgetWithoutCounterTooltip","ShowAbsencesInDays","MyTasksKpis","MyTasks","FilterTodos","ConfigureKpis","ErrorWhileRetrievingMyTaskKpis","NewConfigureYourTaskKpis","MyTasksFeatureHighlightTooltip","Chart","register","Legend","LinearScale","CategoryScale","BarElement","getDataSetColor","datasetIndex","getLabelColors","getMonthLabel","MonthlyRevenueDashboard","showComparison","setShowComparison","rawData","setRawData","chartData","setChartData","totals","setTotals","buildSingleYear","currentYearDataset","chartXLabels","datasets","lastIndex","reverse","xLabels","backgroundColor","borderColor","maxBarThickness","buildMultiYear","chartOptions","responsive","maintainAspectRatio","scales","grid","ticks","beginAtZero","legend","xPadding","yPadding","displayColors","callbacks","nodata","TopCustomerRevenueDashboard","getLabelForValue","onHover","chartElement","chartElements","ArcElement","ComplianceOverviewChart","pieData","setPieData","overallOk","overallSemiOk","overallNotOk","hoverBackgroundColor","hoverBorderColor","borderWidth","align","CompliancePerTypeChart","orderedCompliancies","complianceForTypes","partiallyOk","notOk","indexAxis","stacked","gridLines","ComplianceDashboard","showDetails","setShowDetails","RecentRelationsDashboard","nameCode","customerCode","uniqueIdentifier","DropDownMenu","innerComponent","SearchRelationDashboard","gotoState","EditableTaskTagSelector","internalValue","currentTags","currentTaskTagNames","invalidTags","renderDisplayValue","onAddTag","castJSON","Function","isObject","getHoursMinutesFromTime","DashboardProvider","companyIdStorageKey","updateCompanyId","taskKpi","taskKpiStorageKey","KPIOptions","updateTaskKpi","setEditMode","setCompanyId","setTaskKpi","DashboardContext","noClick","tileContent","overtime","missing","formattedOvertime","formattedMissingHours","TaskBoardFilterType","MyTasksWidgetKPIOptions","WithTagsStorageKey","mainStatus","taskLevels","initialParams","TodoListDashboard","currentModal","toDo","handleUpdateTasks","deadlineUtc","openModal","modalProps","withTagsFromStorage","withTagsChanged","openTaskList","closeDialogs","onCloseTaskDetail","deleteTodo","addParam","createElement","regex","toTime","trunc","re","valueOf","MyRegistrationsDashboard","showRegistrationModal","setRegistrationModal","reloadCount","setReloadCount","openRegOverview","gotoRegistrationOverview","today","overtimeToday","missingToday","yesterday","overtimeYesterday","missingYesterday","thisWeek","overtimeThisWeek","missingThisWeek","thisMonth","overtimeThisMonth","missingThisMonth","overtimeRemaining","setLocalStorageItem","getLocalStorageItem","getKpiMessage","mapping","formatMoment","momentValue","MultipleTaskKpiTiles","k","gotoTaskboard","configuredKpis","nextUserIsMe","getDeadlineFilter","useGetTaskWidgetKPIs","kpiData","kpiConfigurationsInStorage","LocalStorageKey","MyTasksWidgetConfiguredKpis","kipOptions","pastDeadline","deadlineOneWeek","deadlineTwoWeeks","deadlineThreeWeeks","kpiConfigurations","setKpiConfigurations","storageItems","PastDeadline","DeadlineOneWeek","DeadlineTwoWeeks","DeadlineThreeWeeks","DeadlineFourWeeks","deadlineThreeMonths","deadlineSixMonths","deadlineOneYear","OnlyCountTheTasksWhereIAmTheNextAssignedUser","blocked","deadlineFourWeeks","kpis","TaskWidgetKPI","signal","getKpiStyle","getResourceName","categoryTranslation","resourceTranslation","inDays","startValueDays","balanceHours","startValueHours","startValue","ResourceName","hideCode","AbsenceDashboard","InDaysStorageKey","setInDays","canReadFinalInvoice","read","definitions","minW","minH","maxW","maxH","Absences","valueInRange","validateLayouts","layouts","dashboards","newLayouts","breakpoint","generateFromKeys","getEnabledDashboards","breakpoints","lg","md","sm","xs","breakpointCols","defaultLayouts","findOpenPosition","layout","maxCols","B","xOverlap","A","yOverlap","parseCachedLayout","parseLayoutObject","cachedLayout","apiUrl","cleanItem","newlayout","cleanedLayout","bp","WidthProvider","cols","rowHeight","Responsive","getBreakpointFromWidth","compactType","verticalCompact","useCSSTransforms","dashboardParamsStorageKey","HomeDashboardContainer","oldLayouts","data-grid","onHideItem","updateParams","hiddenItems","onShowItem","dashboardContext","dl","layoutService","saveLayout","cancelLayout","renderHiddenItemsMenu","enableEditMode","initialCompanyId","initDashboards","storedLayout","renderCompanyFilter","renderToolbar","isDraggable","isResizable","onLayoutChange","onBreakpointChange","renderDashboards","ContactIcon","renderIcon","formatHref","CopyLinkToInteraction","PhoneCall","ValueCopiedToClipboard","Note","DeleteInteractionConfirmationMsg","ExportToPdf","LastSixMonths","Appointment","NoInteractionsFound","NewPhoneCall","NewNote","NewAppointment","Contacts","PhoneNumber","EnterpriseNumber","NoContactsPresentForRelation","DateMandatory","TitleOrDescriptionMandatory","DummyInteractionTitle","DummyInteractionDescription","Pin","RemovePin","Pinned","InteractionPinned","InteractionUnpinned","OpenEmail","LastModifiedBy","ShowInteractionsOfLinkedRelations","AttachmentDeleted","ToRecipient","ExportToPdfStarted","SendInPdfViaEmail","SomethingWentWrongWhileConvertingTheInteractionToPdf","ExportSearchResultsToPdf","RelationSummary","onOpenCreateInteractionDialog","onOpenCreateTodoDialog","eidPhotoUrl","enterpriseNumber","vatNumber","mobile","sector","linkedRelations","linkedRelation","isBorderNeeded","borderBottom","InteractionTagMultiSelect","showLinkedRelationInteractions","InteractionFilters","hasLinkedRelations","filtersToCompare","flex","filterInteractionTypes","getInteractionLabel","getInteractionIcon","gap","createDateChanged","toggleShowLinkedRelationInteractions","InteractionEvent","onlySenders","metaDataJson","lowercaseKeys","onEditInteraction","onInteractionChanged","onSaveInteraction","onDeleteInteraction","onEditCancel","onPinInteraction","onRemovePin","onOpenEmail","modifiedBy","showRelationName","onForwardEmail","onReplyToEmail","onExportToPdf","onCopyLinkToInteraction","isEmail","hasHtml","canViewDocuments","boxShadow","cardHeaderStyle","contentStyle","createdAt","editFocus","deletedAttachment","relationAlias","relationCrm","iconColor","getInteractionBorderColor","renderInteractionIcon","bubbleStyle","originalDescription","parseEmailMetaData","exportingToPdf","sendingViaEmail","CreateInteractionModal","newDateTime","showRegistrationForm","interactionDate","asMinutes","descriptionClassName","dateClassName","onCancel","saveInteraction","titleChanged","descriptionChanged","tagsChanged","RegistrationRemarkTooltip","fontStyle","InteractionsContainer","showDummyInteraction","interactionFilters","summaryToken","showSendEmailModal","loadInteractions","eidDocumentPhotoId","interactionIds","retrieveDocumentsForInteractions","localDate","originalTitle","originalDate","originalTags","sendUpdateRequest","addDocumentsToInteractionViewModel","linkDocumentsToInteraction","showCreateInteractionModal","showDeleteInteractionModal","activeInteraction","searchCriteria","forceLoad","activeInteractionType","pinnedInteractions","unpinnedInteractions","fileType","activeAttachments","change","showEmailDocumentModal","loadRelationSummary","interactionCreatedHandler","incomingSearchParams","refreshState","creatingPdf","increaseInfiniteScrollKey","noCustomFilters","onInteractionsLoaded","showTimeLine","showFilters","openCreateInteractionDialog","openCreateTodoModal","exportToPdf","lineColor","lineStyle","getDummyInteraction","allowEdit","exportSingleInteractionToPdf","copyLinkToInteraction","sendInteractionViaEmail","showDeleteInteractionConfirmation","replyAllParameter","handleInteractionChanged","onCreateInteraction","ShowInvoiceHistory","ToInvoice","InvoicingType","NextScheduleDate","RemoveRegistration","RemoveRegistrationConfirmationMsg","RegistrationMarkedAsNeverInvoice","NeverInvoiceRegistration","NeverInvoiceRegistrationConfirmationMsg","RegistrationAddedToInvoiceProposal","RegistrationRemoved","Totals","MakeInvoiceProposal","AddToInvoiceProposal","InvoiceAllRegistrations","InvoiceAllRegistrationsTooltip","ShowInRegistrationOverview","OpenInvoiceProposal","TotalAmount","TotalHours","RegistrationAmount","RegistrationIncludedInForfait","RegistrationExcludedFromForfait","ForfaitAmount","UnsettledAdvances","TotalToInvoiceAmount","ToInvoiceAmount","NrDraftInvoicedCreatedOrModified","ToInvoiceGlobalActionsTooltip","Processing","CountSelected","HasInvoicingVia","FixedAmount","Advances","OpenPdf","OpenInvoiceOverview","Registrations","Resource","UnitPrice","RegisteredBy","ToInvoiceDetail","nextSchedule","advances","onEditRegistration","onAddToDraftInvoice","onNeverInvoiceRegistration","onRemoveRegistration","addingToDraft","neverInvoicing","removing","invoiceText","documentPdfId","gotoInvoiceOverview","filtersEquals","filter1","filter2","ignoreFilters","object1","object2","SavedFiltersButton","showNameModal","currentTarget","onFiltersChanged","findSelectedFilter","currentFilters","closeSaveFilterModal","onDynamicFiltersChanged","showReset","dynamicFiltersItems","aria-haspopup","aria-expanded","selectFilter","replaceFilter","showRenameFilterModal","handleNameInputKeyDownEvent","ToInvoiceGlobalActionsButton","onAddToInvoiceProposal","vatPeriodicities","invoiceScheduleTypes","onlyActiveRelations","ToInvoiceFilters","labelCancelToken","labelEndpoint","employeeLabelCancelToken","employeeLabelEndpoint","countSelected","showCompanies","toInvoiceAmount","savedFilterChanged","formatFiltersForRequest","showColumn","inForfaitAmount","exForfaitAmount","hasDraft","fixedAmount","unsettledAdvances","editRegistrationOptions","SessionStorageKey","ToInvoiceContainer","toInvoiceFilters","retrieveTotals","allRelationsSelected","details","totalsToken","detail","showEditRegistrationModal","openRegistrationInvoiceStartDate","created","retrieveDetails","invoiceStreamIds","globalActionRunning","gotoDraftInvoices","refreshOpenRegistrationsForInvoiceStream","showDistance","showForfait","showInExForfait","showAdvances","isProcessing","rowDetail","nrOfColumns","invoiceDialogsSvc","relationTitle","hasInvoicingVia","nextScheduleDate","billSingleRelation","showInvoicingHistory","activeRegistration","activeInvoiceStreamId","billRegistration","showNeverInvoiceRegistrationModal","showRemoveRegistrationModal","getCountSelectedRelations","reloadInvoiceStream","i1","i2","updatedItem","updateRegistrationState","otherSessionParams","invoiceScheduleDate","invoiceScheduleDateFocused","hideDevPanel","draftInvoiceCreatedHandler","displaySettings","removeRegistration","neverInvoiceRegistration","onRegistrationModified","getCountSelectedRelationsFormatted","billMultipleRelations","handleSelectAllRelations","CollapsableTableRow","initialIsCollapsed","renderDetail","rowProps","toArray","JobDetailUpdateTaskStatus","job","sendEmailText","jobType","subtaskName","desiredStatus","JobDetailRelationFieldUpdate","fieldId","Field","JobDetailCreateTaskSchedule","periodicityId","planningStart","planningStop","JobDetailCreateRegistration","MinutesLowerCase","StartTime","startTime","JobDetailSetInvoiceSchedule","NoSchedule","LedgerAccount","ledgerAccount","OverrideExistingSchedule","overrideExistingSchedule","JobDetailMailInvoices","MailTemplate","NoJobsFound","JobType","JobStatus","CompletedAt","OpenDetail","Errors","JobDetails","CompletedItems","FailedItems","NumberOfItems","JobOverviewExplanation","Authorizations","Info","SkippedItems","OpenRelation","OpenInvoice","Document","Transaction","Transactions","DraftInvoice","DraftInvoices","PlannedRegistrations","PlannedRegistration","JobEntryStatus","SearchInfo","Employees","Year","CopyFromPreviousYear","AbsenceStartValue","OverrideIfCounterAlreadyExists","RemoveExistingCorrections","PriceGrid","Default","PriceProfile","Method","Percentage","PriceListItems","InvoiceSchedule","JobDetailDeleteTaskSchedule","deletePlannedTasks","JobDetailChangeTaskTags","JobDetailSendRelationMail","contentDocumentId","retrieveAttachmentInfo","loadEmailContent","JobDetailPriceGridUpdate","gridName","setGridName","profileName","setProfileName","updateAllPriceGrids","priceGridId","priceProfileId","JobDetailReprocessInvoiceStreamSchedule","invoiceSchedule","setInvoiceSchedule","invoiceScheduleId","JobDetailInitAbsenceCounter","fromPreviousYear","overrideExisting","removeCorrections","getLabelForJobEntity","isPlural","tryParseJSON","jsonString","JobOverviewRow","entityLabel","totalEntries","completedAt","JobDetailContainer","extraFilters","searchInfo","updateJob","entityId","entityType","goToRelationByInvoiceStream","parametersJson","infoDescription","renderEntity","renderInfo","parseErrorMessage","jobUpdateHandler","entityColumnLabel","getEntityColumnLabel","completedEntries","skippedEntries","failedEntries","renderJobDetail","getPeriodDateFromUntil","periodName","getPeriodStartEndDates","PeriodButtonGroup","hiddenPeriods","visiblePeriods","filteredPeriods","periods","localPeriod","allPeriods","pastToNowPeriods","pastToPrevMonth","jobStatus","entryStatus","JobOverviewFilters","defaultFiltersWithUser","isSupport","hasColumnFilters","NotificationRow","markRead","openTaskDialog","Text","DownloadFile","assignedBy","AssignedBy","completedBy","CompletedBy","MarkAsRead","JobOverviewContainer","overviewFilters","defaultFiltersWithUserId","Notifications","NotificationType","CreatedOn","Message","CreatedDateFrom","CreatedDateTo","OpenNotificationSettings","NotificationSettings","NotificationTypeSettings","NotificationTypeSettingsInfo","ReceiveNotificationsForAllRelations","OrOnlyIfYouAreAssignedAs","ReceiveNotificationsForAllRelationsOfCompanies","createDateFrom","createDateTo","notificationTypes","includeExpired","NotificationFilters","selectedNotificationTypes","onNotificationTypeFilterRemoved","onNotificationTypeFilterAdded","toggleInactive","NotificationOverviewContainer","notificationFilters","mapNotifications","state2","orgSearchParams","reloadNotificationsEventHandler","openSettings","EditableCompanyMultiSelect","companyIds","mapSettings","allRelations","relationResponsible","relationAssistant","relationAssistantBackup","relationAssociate","relationBillingUser","relationSeniorUser","NotificationSettingsContainer","profiles","updateSetting","selectedCompanies","relationsOfCompaniesCommaSeparated","currentlySelectedCompanies","relationsOfCompanies","updateAllRelations","groupedNotificationTypes","modified","categoriesCol1","categoriesCol2","hasMultiCompanies","ownCompaniesCol1","categories","half","ownCompaniesCol2","updateOwnCompanies","updateRelationProfile","updateNotificationSetting","CopyPriceGrid","CreatePriceGrid","ChangePriceGridName","DeletePriceGrid","DeletePriceGridConfirmationMsg","MakeDefaultPriceGrid","UpdateAmount","AllProfiles","AllCompanies","AllPriceGrids","WarningAllPriceGrids","CurrentPriceGrid","AllResources","ResourceCategory","RegistrationDateFrom","RecalculateRegistrationPrices","XRegistrationsWillBeUpdated","PriceGridGlobalActionsTooltip","OverrideManuallyChangedPrices","RecalcRegistrationPriceJobQueued","RoundingMethod","RoundTo","Digits","Example","PriceGridNameModal","RecalcRegistrationPriceModal","fromDate","overrideManualPrices","resourceCategoryId","priceGrids","registrationCount","retrieveCount","selectedResourceCategory","invalidResourceCategory","retrievingCount","gridId","grids","allResourceCategories","resourceCategories","updateFilter","PriceGridAmountModal","updateMethods","roundingMethods","selectedUpdateMethod","selectedRoundingMethod","selectedProfile","rounding","exampleAmount","generatedAmount","amountClassName","amountChanged","EditableCurrency","PriceGridCell","PriceGridSideBar","activeGrid","onChangeGrid","onDeleteGrid","onCopyGrid","onEditGrid","onSetDefault","resourceTypesProp","showUpdateAmountModal","showRecalcRegistrationPriceModal","MapPriceGridScreen","reloadGrid","rowId","colId","resourceProp","cells","selectedRow","allTimePriceGridsSelected","allTravelPriceGridsSelected","allCostPriceGridsSelected","handleSelectAllPriceGrids","handlePriceGridSelect","updateCell","defaultProfile","amountUpdate","resourceIds","oldGridId","updatePriceGridAmountBatch","getExampleAmount","mapProfileHeader","renderResourceType","FieldChange","renderFieldValue","salutations","booleanValue","dateTimeFormat","RenderProperty","EnumChange","RelationLinkChange","renderLinkType","UboLine","added","AddressSettingChange","isEnum","valueToDisplay","Medium","gridSort","PriceGridContainer","editGrid","deleteGrid","aGrid","updatedGrid","createGrid","changeGrid","copyGrid","setDefaultGrid","RelationLinkProperty","transformedLogLine","RelationId","UboEnteredOnline","AuthorizationChange","AuthorizationPropertyChange","ComplianceChange","BankAccountChange","iban","BankAccountPropertyChange","getInvoiceStreamName","AssignmentId","AssignmentName","AssignmentTemplateId","InvoiceStreamChange","InvoiceStreamPropertyChange","displayLogLine","invoiceStreamName","RelationAuditContainer","loadingTemplates","setLoadingData","setSalutations","setTemplates","setInvoiceSchedules","setPriceGrids","allLogs","setLogs","ownCompanyIds","setOwnCompanyIds","setInvoiceStreams","photoUrl","showAssignmentName","invoiceStreamDictionary","queryTemplateTypes","templatesById","schedulesById","priceGridsById","salutationObject","InvoiceRelationId","YearButtonGroup","yearFrom","yearUntil","generateYears","DelayedInput","query","setQuery","setSaving","BudgetOverview","Period","BudgetAmount","ActualAmount","RemainingAmount","BudgetAmountUsedPct","BudgetHours","ActualHours","RemainingHours","BudgetHoursUsedPct","WithBudget","WithoutBudget","DeleteBudget","DeleteBudgetMsg","AllBudgetsSelected","CountBudgetsSelected","UpdateBudgetAmount","UpdateAmountForYear","UpdateBudgetHours","UpdateHoursForYear","OverrideIfBudgetExists","UseForfaitAmountAsBudgetAmount","UseRegistrationAmountAsBudgetAmount","UseInvoiceAmountAsBudgetAmount","UseRegistrationHoursForBudget","UseAdvanceAmountAsBudgetAmount","NewAmount","NewQuantity","BudgetBasedOnYear","CopyBudgetToYear","CopyBudget","ShowInvoicingHistory","IncludeExForfaitRegistrations","FiltersForBudgetCalculations","BudgetSpreadOverPeriod","CopyBudgetYearFilterInfo","AddOrSubtractPercentage","OpenBudgetSettings","withBudget","budgetAmountUsed","budgetHoursUsed","BudgetOverviewFilters","labelPromise","withBudgetChanged","withoutBudgetChanged","EditableNumber","allowDecimals","charCode","getPercentageColorClass","pct","getUsedBudgetPercentage","budget","actual","getPercentageColorBgClass","getFomattedPercentage","makeCumulative","getRegistrationOverviewNavParams","calcSettings","merge","forfaitStatus","includeExForfait","includeInForfait","includeNotBillable","onlyNumberedInvoices","getDisplayProperties","amountUsed","budgetAmount","actualAmount","hoursUsed","budgetHours","actualHours","pbAmountClass","pbAmountStyle","pbHoursClass","pbHoursStyle","amountClass","hoursClass","BudgetGraph","actualPoints","ratio","budgetLineY","topPadding","expectedPoints","budgetLinePoints","preserveAspectRatio","xmlns","patternUnits","patternTransform","x1","y1","x2","y2","points","strokeDasharray","vectorEffect","NavigateToState","stateParams","useUrl","paramsToJson","getStateUrl","BudgetRow","hoursPct","budgetClass","onUpdateBudget","onDeleteBudget","canUpdateBudget","canViewAmounts","disableSelect","showBudgetGraphModal","regNavParams","budgetIncludeExForfait","budgetIncludeInForfait","budgetIncludeNotBillable","budgetOnlyNumberedInvoices","amountPct","remainingAmount","budgetAmountUsedPct","amountPerMonth","resourceTimeFilter","remainingHours","budgetHoursUsedPct","hoursPerMonth","GlobalActionsButton","onUpdateBudgetAmount","onUpdateBudgetHours","onCopyBudget","inProgress","UpdateBudgetAmountModal","overrideBudget","budgetYear","referenceYears","methodChanged","toggleCheckbox","LineElement","PointElement","annotationPlugin","BigBudgetGraph","dataLabel","annotation","annotations","budgetAnnotation","yMin","yMax","borderDash","borderDashOffset","drawTime","spreadAnnotation","BudgetOverviewContainer","searchToken","budgetFilters","newLines","updateViewModel","itemToDelete","getInvoiceStreamSelection","showUpdateBudgetAmountModal","showUpdateBudgetHoursModal","showCopyBudgetModal","budgets","getBudgetFilters","isAmount","graphModalData","closeBudgetGraphModal","updateInvoiceStreamAmountBatch","getYearFromFilters","updateInvoiceStreamHoursBatch","copyBudgetBatch","getCountSelectedRowsFormatted","doDelete","RelationStartDateFrom","RelationStartDateUntil","FixedAmountRegistrationMethod","AdvanceRegistrationMethod","NoInvoiceSchedule","SelectPriceGrid","AmountFrom","AmountTo","UpdateInvoiceStreamAmountConfirmation","MsgConfirmChange","OverrideManualInvoiceStreamScheduleChanges","InvoiceScheduleOverview","InvoicingVia","UpdateInvoiceStreamAmountWarning","UpdatePriceGrid","UpdatePriceGridOnSelectedRelations","UpdatePriceGridOnSelectedInvoiceStreams","UseRelationSetting","AlsoResetPriceGridOnSelectedInvoiceStreams","UpdateInvoiceStreamUser","UpdateUserForSelectedRelations","UpdateUserForSelectedInvoiceStreams","AlsoResetUserForSelectedInvoiceStreams","ReprocessInvoiceStreamSchedules","ProcessNextInvoiceStreamSchedule","InvoiceScheduleLine","BatchProcessNextScheduleConfirm","InvoiceStreamRow","onUpdateAmount","onUpdatePriceGrid","canUpdateRelation","viaRelation","invoiceScheduleName","fixedAmountRegistrationMethod","advanceRegistrationMethod","priceGrid","class","InvoiceStreamGlobalActionsButton","onSetInvoiceSchedule","onUpdateUser","onReprocessSchedule","onProcessNextSchedule","defaultInvoiceStreamFilters","amountFrom","amountTo","relationStartDateFrom","relationStartDateUntil","InvoiceStreamFilters","amountToOrFrom","handleAmountBlur","selectedPriceGrid","handleAmountKeyDown","InvoiceStreamStartDateInPastExplanation","SetInvoiceScheduleModal","schedules","translatedSchedules","selectedSchedule","defaultLedger","companySettings","fixedAmountLedgerAccount","advanceSettlementLedgerAccount","retrieveSchedules","planningStartFocused","planningStopFocused","showAmount","scheduleChanged","UpdateInvoiceStreamPriceGridModal","updateRelation","resetInvoiceStreams","showAdvancedOptions","updateRelationChanged","UpdateInvoiceStreamAmountModal","overrideManualChanges","Profiles","ResetToTemplateSetting","AssignedToSelector","assignedType","assignedUserId","assignedProfile","UpdateInvoiceStreamUserModal","updateTasks","updateTaskData","updateTaskModel","oldProfile","newProfile","newUserId","showAssignedToSelector","assignedToProfiles","profileChanged","assignedToChanged","ReprocessInvoiceStreamScheduleModal","invoiceScheduleLineId","previousDate","previousDateSort","lineTypeLabel","invoiceScheduleLine","fixedInvoiceSchedule","loadInvoiceSchedules","invoiceScheduleChanged","invoiceScheduleLineChanged","InvoiceStreamContainer","reloadInvoiceStreamOverivew","invoiceStreamFilters","newInvoiceStreams","showEditAmountConfirmationDialog","showSetInvoiceScheduleModal","showUpdatePriceGridModal","showUpdateUserModal","showReprocessScheduleModal","showProcessNextScheduleModal","updateInvoiceStreamHandler","priceGridPromise","invoiceScheduleIdFromFilter","setInvoiceScheduleSelectedRelations","priceGridModel","updateInvoiceStreamPriceGridBatch","updateInvoiceStreamUserBatch","reprocessSchedule","processNextSchedule","ModalTitleZendeskHelp","BatchRegistrationModal","fromTotalMinutesChanged","toMinutesTotal","fromMinutesTotal","hourInMinutes","convertHoursToMinutes","newHours","durationMinutesTotal","touchedDuration","calculateDurationPerRelation","selectedTask","durationPerRelationActive","totalDurationMinutes","totalDuration","employeeStartHour","workDayStartHour","employeeEndHour","workDayEndHour","durationClassName","durationPerRelation","surpassesCurrentDay","isSystemUser","onResourceTypeChanged","defaultChecked","fromHourChanged","fromMinutesInputChanged","durationHourInputChanged","durationMinutesInputChanged","startHour","endHour","TemplateType","NoTemplateForLanguage","ChooseDocumentTemplatePerLanguage","AddQrCode","ConvertToPdf","FileType","LinkDocumentTo","defaultTemplateTypes","templateTypesWithDocumentTypeDropdown","BatchGenerateDocumentModal","addQrCode","fileNameFormat","templateTypes","languageTemplates","allDocumentTemplates","langCode","oldTemplateType","documentTypesEnum","templateTypeEnum","documentTemplates","templateTypesInUse","templateTypeLabel","templatesForLang","has","subtasks","showTemplateTypeSelect","showTemplates","showDocumentTypeSelect","templateTypeChanged","selectableTemplates","getColumnDefinitions","available","streetNr","disableSorting","goToInteractions","associateUser","responsibleUser","assistantUser","assistantBackupUser","endFiscalYear","RelationOverviewRow","handleRelationSelect","showDeleteRelationConfirmation","restoreRelation","UserName","objectOf","UpdateTaskScheduleModal","scheduleDate","deviationsCollapsed","sortOnLabel","periodicities","selectedPeriodicity","retrievePossibleDeviationsForTemplate","deviations","periodicity","showScheduleDate","canCreate","periodicityChanged","deviation","subtaskTemplateName","communicationChannelSearchValue","linkTypeReverse","paymentmethods","teams","withoutTeams","financialStatementSchemes","shareRegisters","jurisdictions","sectors","socialSecretariats","socialSecurityFunds","accountingSoftware","sendInvoiceStrategy","peppolStatus","mixedTaxPayer","mixedTaxPayerVatDeductionMethod","startDateFrom","startDateUntil","withAssignments","RelationOverviewFilters","linkTypesReverse","assignmentTemplates","countries","teamsToken","assignmentTemplatesCancelToken","selectedPaymentMethods","availablePaymentMethods","selectedTeams","availableTeams","noWithoutTeam","selectedAssignments","availableAssignments","selectedShareRegisters","availableShareRegisters","selectedJurisdictions","availableJurisdictions","getTeams","getAssignmentTemplates","linktypes","shareRegister","specificCountryOptions","country","otherCountryOptions","combinedOptions","jurisdiction","UpdateRelationTeamModal","teamId","retrieveTeams","team","UpdateRelationTagsModal","cleanTagName","UpdateRelationUserModal","SearchRelationsInPeppolNetwork","SwitchInvoiceStrategyToPeppolIfFoundOnNetwork","SearchRelationsInPeppolNetworkModal","switchInvoiceStrategyIfFound","onUpdateTaskSchedule","onUpdateField","onCreateRegistration","onCreateTask","onSendMail","onUpdateTeam","onAddAssignment","onUpdateRelationUser","onGenerateDocuments","onSearchOnPeppolNetwork","FiscalReportInfo","FiscalCosts","FiscalLoans","FiscalVehicles","FiscalInsurances","FiscalRealEstates","fiscalSections","FiscalReportModal","loan","vehicle","insurance","realEstate","CompanySelector","LanguageSelect","UpdateRelationFieldModal","availableFields","getLegalForms","selectedField","setAvailableFields","fieldChanged","dateFormatted","UseAssignedToFromTemplate","DontAddTaskIfAlreadyExistsForRelation","CreatePlannedTaskModal","assignedUser","skipIfTaskAlreadyExists","templateUser","retrieveUsers","deadlineFocused","assignedUserChanged","PriceGridSelector","ExportButton","exporting","onCreateExcelReport","onCreateAuthorizationReport","onCreateLinkedRelationsReport","onCreateFiscalReport","onCreateCommunicationChannelReport","onCreateCommunicationSettingReport","Choose","NoAssignmentTemplates","RelationTypeMismatchWarning","AddAssignmentModal","assignmentTemplate","taskConfig","taskSchedules","assignmentTemplateRequest","taskConfigRequest","taskTemplatesRequest","invoiceScheduleRequest","taskPeriodicityId","removed","updatedValues","updateInvoiceSchedule","picker","invoiceScheduleData","retrieveAssignmentTemplates","appliesToCount","appliesToPerson","appliesToSoleProprietor","appliesToCompany","showRelationTypeMismatchWarning","hasInvoiceSchedule","showInvoiceScheduleAmount","invoicePlanningStart","setDatePickerFocus","invoicePlanningEnd","taskSchedule","ng-repeat","schedulePeriodicityChanged","updateSchedule","toggleSchedule","onCreatePlannedRegistrations","onRemovePlannedRegistrations","onChangeUser","hasWithoutFilter","AddPlannedRegistrations","RemovePlannedRegistrations","ChangeUser","CreateSingleRegistration","RelationOverviewContainer","showDeleteRelationModal","showUpdateTaskScheduleModal","showAddAssignmentModal","showUpdateRelationUserModal","showUpdateRelationFieldModal","showCreateRegistrationModal","showCreatePlannedTaskModal","handleReportResponse","handleReportError","modalParams","showFiscalReportModal","newLabels","newLabel","showUpdateRelationTeamModal","showUpdateRelationTagsModal","showGenerateDocumentsModal","showSearchRelationsInPeppolNetworkModal","batchRegistrationModel","goToNewRelation","newRelations","tagsCancelToken","deleteRelation","createTaskScheduleForSelectedRelations","removeTaskScheduleForSelectedRelations","createBatchRegistrations","updateRelationField","createTaskForSelectedRelations","updateRelationTeam","updateRelationTags","addAssignmentToSelectedRelations","determineRelationTypeForGlobalAction","updateRelationUser","createFiscalReport","createAuthorizationReport","createLinkedRelationsReport","createCommunicationChannelReport","createCommunicationSettingReport","openEmailModal","openGenerateDocumentsModal","PlannedRegistrationOverview","WithPriceListItem","WithoutPriceListItem","WithPlannedRegistrations","WithoutPlannedRegistrations","RelationCode","NextPlanningDate","PlanningStartStop","RemovePlannedRegistrationsConfirmationMsg","DayAndMonth","DayOfTheMonth","Day","ResourceType","Other","PlannedRegistrationQuantity","planning","PlannedRegistrationOverviewRow","showPrices","relationUniqueIdentifier","relationCode","scheduleName","nextPlanningDate","withCategoryId","withoutCategoryId","PlannedRegistrationOverviewFilters","withCategories","withoutCategories","withCategory","withoutCategory","CreatePlannedRegistrationsModal","numberOfLines","startDateFocused","endDateFocused","onScheduleChange","onDayMonthChange","updateModel","ChangePlannedRegistrationUserModal","PlannedRegistrationOverviewContainer","newRows","getFilterParams","showCreatePlannedRegistrationsModal","getPlannedRegistrationSelection","showRemovePlannedRegistrationsModal","showChangeUserModal","plannedRegistrations","getCountSelectedRows","batchCreatePlannedRegistrations","batchRemovePlannedRegistrations","batchSendMail","batchCreateSingleRegistration","batchChangeUser","TaskScheduleOverview","NextAnnualMeeting","WithoutSchedule","OpenTaskOverview","ExportTaskSchedules","WithoutRelationLabels","EndFirstFiscalYear","WithoutEndFirstFiscalYear","WithEndFirstFiscalYear","RecalculateTaskDeadlinesTitle","RecalculateTaskDeadlinesMsg","WithoutEndFiscalYear","WithEndFiscalYear","OverviewFilters","initialLinkType","linkTypeChanged","relationLabelsPromise","relationLabels","relationTags","withoutRelationTags","filterCrmTypes","getTaskTemplateColumnFilters","paramsStorageKey","TaskScheduleOverviewContainer","allRowsSelected","taskTemplateFilters","hasEndFirstFiscalYear","hasEndFirstFiscalYearFilter","hasEndFiscalYear","hasEndFiscalYearFilter","periodicityFilters","selectedColumns","selectedRows","createBatchActionModel","creatingAuthorizationReport","batchActionParameters","updateFiscalField","endFirstFiscalYear","fieldValue","recalcDeadlinesParams","fiscalYearsUpdated","onlyBasedOnFiscalYears","recalcSubtasks","recalcDeadlinesCount","showRecalcTaskDeadlinesDialog","getColumns","handleRowSelection","updateEndFirstFiscalYear","updateEndFiscalYear","nextAnnualMeeting","taskPeriodicityName","gotoTaskOverview","withoutScheduleFilterItem","getCountSelected","recalculateTaskDeadlines","getCountSelectedFormatted","createReport","handleSelectAllRows","handleUpdateTaskScheduleModalSave","InvoiceDateFrom","InvoiceDateUntil","WithEmployeeTags","RelationRentability","HourColumn","EmployeeTagMultiSelect","employeeType","onlyWithMissingHours","AbsencePerEmployeeFilters","showUsers","OnlyEmployeesWithMissingHours","DaysColumn","MonthYearPicker","innerValue","setInnerValue","monthOptions","oldYear","newYear","allResources","EnterResource","AbsencePerEmployeeContainer","report","getParams","reportToken","reportParams","eventParams","hasRegistrationOthersPermission","AbsenceColumn","employeeName","OpenRegistrationOverview","createRegistration","absence","expected","overtimeCorrection","recup","handleYearTimeTableUpdatedEvent","hasAbsences","AbsencePerEmployee","rowSpan","AbsenceHours","WorkedHours","FilledInHours","ExpectedHours","OvertimeHours","OvertimeCorrectionHours","RecuperationHours","NoDataForReport","MonthYearPickerOutputFormat","MonthYearPickerMonthFormat","MMMM","AbsenceCalendarFilters","canSeeAbsenceDetails","employeeTypes","onlyWithAbsences","OnlyEmployeesWithAbsences","AbsenceTypes","AddAbsenceDropdownButton","onOpenRegistrationModal","showOtherUser","showRecup","otherUserValues","SplitButton","toggleLabel","AddAbsenceFor","AddRecuperationFor","AbsenceCalendarContainer","dateColumns","resourceCount","resourceLookup","hasHolidays","isHoliday","ci","absences","dayStatus","holiday","ai","startInMorning","endInMorning","timeFrom","timeTo","AbsenceCalendar","openRegistrationModal","xi","renderEmployeeRow","Holiday","AddRegistrationDropdownButton","otherUserName","AddRegistrationFor","FillGapsRegistrationModal","gapInfo","totalTime","isRecup","reloadGapInfo","remainingOvertime","remainingOvertimeAfterSave","datesChanged","EditableTimeInput","HoursPerEmployeeReportDetailRow","toggleResources","showResources","onUpdateHomeWorkingHours","toggleFunction","groupNr","SimpleDatePicker","ResourceTypeButtonGroup","allowedTypes","SubtractOneMonth","AddOneMonth","CurrentMonth","CurrentYear","SubtractOneWeek","AddOneWeek","CurrentWeek","currentYearStart","currentYearEnd","currentMonth","currentMonthEnd","yearOffsets","HoursPerEmployeeReportPeriods","onChangeDate","groupBy","currentWeek","currentWeekEnd","dateUntilLastDay","getMaxDateUntil","HoursPerEmployeeReportDropdown","onToggleDetails","onChangeToDayView","onOpenFillGapsRegistrationModal","homeWorking","hasDetails","canSetHomeWorkingHours","HomeWorkingHoursTooltip","MissingHoursTooltip","ZoomInToDayView","FillPeriodWithWork","FillPeriodWithRecup","RegisterWorkingFromHome","ClearWorkingFromHome","teamCodes","groupByButtons","GroupByDay","GroupByWeek","GroupByMonth","GroupByYear","HoursPerEmployeeReportFilters","maxDateUntil","GroupBy","groupByChanged","fromDateChanged","untilDateChanged","ExportToExcelDropdown","createExcel","ExportDetailsToExcel","resourceTypesForDetailType","3","HoursPerEmployeeReportContainer","reportFilters","showFillGapsRegistrationModal","homeWorkingMinutes","totalHomeWorking","renderMonth","defaultPrevented","lastCol","firstCol","argDateFrom","argDateUntil","getDateRange","retrieveResourceDetails","resourceData","sharedProps","canEditHomeWorking","detailsRows","isCurrentUser","hasUpdateUsersPermission","totalExpected","worked","totalWorked","toggleResourceDetails","renderResourceDetails","totalAbsence","totalRecuperation","recuperation","totalMissing","totalOvertime","totalOvertimeCorrection","totalRemainingOvertimePeriod","remainingOvertimePeriod","RemainingOvertimeHoursPeriod","HoursPerEmployeeReportHomeWorkingRow","HomeWorkingHours","updateHomeWorkingHours","until","totalRemainingOvertime","DateFromRequired","showRemainingOvertime","dateRange","HoursPerEmployee","renderHeaderLabel","RemainingOvertimeHoursAll","toggleDetails","HoursPerEmployeeReportCell","changeToDayView","openFillGapsRegistrationModal","renderDetails","InvoicingHistoryFilters","invoicingtypes","selectedYear","emptyFrom","setYear","getRelationColumnValue","relationDisplayName","relationIsActive","getAssignmentColumnValue","HoursColumn","AmountColumn","DateColumn","defaultColumn","maxWidth","headerProps","getStyles","headerGroupProps","cellProps","InvoicingHistoryVirtualTable","monthColumns","accessor","originalRow","isVisible","invoicingScheduleId","invoicingScheduleName","None","LastInvoiceDate","Cell","lastInvoiceDate","NextScheduleAmount","nextScheduleAmount","FixedAmountOrAdvance","totalFixedAmount","DraftInvoiceAmount","totalDraftAmount","draftInvoiceAmount","Potential","totalPotential","potential","totalToInvoice","toInvoice","AvgAmountPerHour","toInvoiceHours","totalToInvoiceHours","avgAmountPerHour","BilledAmount","billedAmount","AvgAmountPerHourBilled","avgAmountPerHourBilled","TotalHoursAmount","totalHoursAmount","ToInvoiceHours","BilledHours","billedHours","amounts","subColumns","getTableProps","useTable","useBlockLayout","getTableBodyProps","headerGroups","footerGroups","prepareRow","totalColumnsWidth","RenderRow","columnIndex","rowIndex","getRowProps","getCellProps","clearAll","headerGroup","getHeaderGroupProps","getHeaderProps","getFooterGroupProps","getFooterProps","isScrolling","registerChild","scrollTop","onChildScroll","autoHeight","rowCount","rowRenderer","onScroll","CellMeasurerCache","defaultHeight","fixedWidth","BilledPerMonth","InvoicingHistoryContainer","isDetailsReport","sliding","InvoicingHistory","behavior","ScrollArrow","showScroll","checkScrollTop","removeEventListener","ResourceSubcategory","SubtaskTemplate","PlannedSubtask","Month","Details","RemoveGroup","AddGroup","GroupByFilter","detailsIdx","visibleGroups","selectedGroups","availableGroups","removeGroupTitle","aria-labelledby","addGroup","removeGroup","getParamsFromFilters","RegistrationsPerReportFilters","showDetail","groupsWithoutDetails","mainTaskTemplates","AllTaskTemplates","WithoutTemplate","reportKey","rootGroup","RegistrationDateUntil","FilterRegistrationUser","grps","showDetailsChanged","ShowDetails","InForfaitCheckbox","HoursColumnValue","AmountColumnValue","QuantityColumnValue","reportInfo","RegistrationsPerRelation","RegistrationsPerResourceCategory","RegistrationsPerTaskTemplate","RegistrationsPerUser","getNameColumnAccessor","rowType","getResourceTypeColumnValue","resourceName","isDefaultResource","getTaskTemplateColumnValue","NotRegisteredOnTask","getReferenceYearValue","getSubTaskTemplateColumnValue","subTaskTemplateId","NotRegisteredOnSubTask","getDetailColumnValue","registrationDate","getVisibleColumnsFromTotals","potentialQuantity","notBillableHours","notBillableQuantity","notBillableAmount","billedQuantity","billedInForfaitHours","billedInForfaitQuantity","billedInForfaitAmount","deletedHours","deletedQuantity","deletedAmount","neverInvoiceHours","neverInvoiceQuantity","neverInvoiceAmount","internalCost","canViewPriceList","canViewInternalPrice","canViewDraftInvoices","canViewFinalInvoices","notBillable","billed","inForfaitQuantity","deleted","priceListPermission","internalPricePermission","draftInvoicePermission","finalInvoicePermission","columnStatusShape","RegistrationsPerReportTable","lastGroup","registrationRemark","registrationInternalRemark","InvoiceStatus","registrationInvoiceStatus","InternalCost","NotBillable","Invoiced","InvoicedInForfait","Deleted","NeverInvoice","InvoicedMinusPotential","Margin","InvoicedMinusInternalCost","useFlexLayout","original","rowDepth","handleResize","disableHeight","onResize","RegistrationsPerReport","reportType","externalParams","setRows","setExporting","StoragePrefix","setMainTaskTemplates","totalRow","rowKey","RegistrationsPerResourceCategoryContainer","RegistrationsPerTaskTemplateContainer","RegistrationsPerUserContainer","QuantityColumn","RegistrationsPerRow","rowData","renderRelationName","renderAssignment","renderResourceCategory","renderResource","renderTaskTemplate","renderUserName","renderSimpleGroup","renderReferenceYear","renderOwnCompany","renderSubTaskTemplate","renderDetailColumn","registrationInForfait","potentialHours","potentialAmount","deltaHours","deltaQuantity","deltaAmount","isDetail","labelColspan","renderLabel","renderInForfaitCheckbox","showHours","showAmounts","showInternalPrice","ShowHoursStorageKey","RegistrationsPerRelationContainer","pagingKey","onShowHoursChanged","showHoursChanged","RelationRentabilityFilters","scheduleEndpoint","ShowHoursInsteadOfAmounts","init","RegisteredHours","AddedHours","RemovedHours","RegisteredCosts","BilledCosts","FreeLines","Turnover","Profit","Rentability","OpenRegisteredHours","OpenRegisteredCosts","NeverInvoiceRegisteredHours","NeverInvoiceRegisteredCosts","RelationRentabilityContainer","navigationProps","isHours","hoursValue","amountValue","renderHoursColumn","renderAmountColumn","renderHoursColumnWithNavigation","renderAmountColumnWithNavigation","relationEndDate","registeredHours","renderHoursOrAmountWithNavigation","registeredHoursAmount","invoiceDateFrom","invoiceDateUntil","renderHoursOrAmount","billedHoursAmount","inForfaitHours","inForfaitHoursAmount","addedHours","addedHoursAmount","removedHours","removedHoursAmount","registeredCosts","billedCosts","fixedAmounts","freeLines","turnover","profit","turnoverMinRegistered","openRegisteredHours","openRegisteredHoursAmount","openRegisteredCosts","neverInvoiceRegisteredHours","neverInvoiceRegisteredHoursAmount","neverInvoiceRegisteredCosts","TurnoverMinInternalCost","TurnoverMinRegistered","calculateTotal","EditableTextbox","AssignmentTemplates","AddAssignmentTemplate","AddTaskTemplate","TaskPeriodicity","NoDefault","SelectTaskTemplate","DefaultTaskPeriodicity","ChoosePeriodicityWhenCreatingAssignment","AppliesToPerson","AppliesToSoleProprietor","AppliesToCompany","DeleteAssignmentTemplate","DeleteAssignmentTemplateConfirmationMsg","ConfigureAllowResources","ConfigureAllowResourcesForDefaultAssignment","Allowed","AddAssignmentTemplateModal","updateTemplate","appliesToInvalid","AddTaskTemplateModal","per","Translate","TranslateListItemModal","showValidationErrors","tenantLanguage","loadTranslations","saveTranslations","EditBlockedResourcesModal","allChecked","assignmentTemplateName","filteredResources","onCheckboxAllClick","onCheckboxClick","showWhenAssignmentsEnabled","AssignmentTemplateContainer","showAddModal","deleteTemplate","addTaskTemplate","taskPeridodicityName","assignmentTaskTemplates","allTaskTemplates","mapAssignmentTemplateTaskTemplate","newTemplate","usedTemplates","updatedTaskTemplate","translationModal","loadTemplates","editBlockedResources","onDoubleClickCapture","openTranslateDialog","newId","updateTaskTemplate","deleteTaskTemplate","showAddTaskTemplateModal","appendTemplate","handleTranslationModalClosed","NrOfRelations","NrOfDocuments","NrOfEmployees","DeleteDocumentTag","DeleteDocumentTagConfirmationMsg","AddTag","TagAlreadyExists","DocumentTags","DocumentTypes","TaskTags","RelationTags","ApplyToDocumentTypes","SetIsPublicOnPortal","SetIsPublicOnPortalExplanation","InteractionTags","DeleteInteractionTagConfirmationMsg","DeleteTag","DeleteRelationTagConfirmationMsg","DeleteTaskTagConfirmationMsg","DeleteEmployeeTagConfirmationMsg","AddRelationGroup","DeleteRelationGroup","DeleteRelationGroupConfirmationMsg","RelationGroupAlreadyExists","EmployeeTags","TaskTagOverview","tagToDelete","documentCount","editTagName","deleteTag","RelationTagOverview","nrOfRelationsInUse","gotoRelationOverview","getDocumentTypes","documentTypeSettings","filteredDocumentTypes","enrichedDocumentTypes","docType","setting","SelectDocumentTypeToAdd","EditDocumentTagTypesDialog","selectedType","oldTypes","availableTypes","addType","removeType","SelectTagsToAdd","EditDocumentTypesTagDialog","allTags","selectedTag","documentTypeId","oldTags","documentTypeName","removeTag","tagShape","DocumentTagConfiguration","editTypesForTag","editTagsForType","newTypes","newTags","documentTypesWithoutCurrent","tab","tagLookup","tagsForType","typeLookup","canUpdateTags","canUpdateSettings","gotoDocuments","setTagIsPublicOnPortal","updateTagTypes","setDocumentTypeIsPublicOnPortal","updateDocumentTypeTags","InteractionTagOverview","RelationGroupOverview","newGroup","groupToDelete","editGroupName","deleteGroup","EmployeeTagOverview","nrOfEmployeesInUse","TagSettingsContainer","initialTab","routeNames","setTab","changeTab","deleteCollapsedStateRecursive","DocumentFolderStructure","DocumentTypesForX","ManageDocumentTypesForFolder","RestructureDocumentTree","RestructureDocumentTreeInfo","AddDocumentTypesToParentNodes","DocumentTreeConfiguration","addTagToNode","updatedTree","restructure","updateNodeRecursive","updatedProperties","deleteNodeRecursive","tagIds","tagNames","treeTagNames","otherTypes","tagTypes","addDocumentType","onMouseDown","deleteNode","updateToken","treeCopy","activeTeam","ignoreCollapsedTree","tagDocumentTypes","addTagToRoot","saveRestructure","cancelRestructure","startRestructure","handleAddDocumentType","removeDocumentType","DocumentTemplates","ExampleDocumentTemplates","AllTemplateTypes","AllLanguages","DocumentTemplateType","AddDocumentTemplate","DeleteTemplate","DeleteTemplateConfirmationMsg","AntiMoneyLaundering","ShowAvailablePlaceholders","PlaceholdersModalTitle","PlaceholdersModalInfo","SelectTemplateType","ErrorWhileLoadingPreview","RelationLinksPlaceholders","AuthorizationLetter","AssignmentLetter","Questionnaires","TaskPlaceholders","imageDataToBase64Url","httpResponse","reader","FileReader","onerror","readAsDataURL","SecureImage","other","imgUrl","setImgUrl","setError","PreviewDocumentTemplateModal","AddDocumentTemplateModal","multipleCompanies","newFile","setFile","acceptedFileTypes","PlaceholdersModal","filterTenantConfiguration","notConfiguration","noEmptyCategories","applyCategoryFilters","ExampleLanguageColumn","DocumentTemplateExamples","tenantLanguages","filteredExamples","getExamples","searchedExamples","searchExamples","getLanguages","TaskPlaceholdersModal","taskParameters","retrieveTaskParameters","filteredTaskParameters","searchFilter","taskTemplateChanged","cat","languageCodePropType","InvoiceScheduleLinesTable","invType","showDateColumns","showTaskColumns","subTaskTemplate","InvoiceSchedulesTable","onEditSchedule","onCopySchedule","onDeleteSchedule","onTranslate","isTaskflowBilling","linkedRelationPlaceholderUrls","en","invoiceTemplateTypes","DocumentTemplateContainer","showPlaceholdersModal","showTaskPlaceholdersModal","examplesCollapsed","loadingDocumentDetails","checkinTemplate","templateCheckoutInfo","blobId","templateIds","loadTemplateCheckoutInfo","setSessionParams","updateTemplateRow","activeTemplate","showPreviewModal","copiedTemplate","sourceTemplateIndex","updatedTemplates","isDocumentCheckedOut","isCheckedOut","isDocumentCheckedOutByCurrentUser","isCheckedOutByCurrentUser","removeCheckOutStatus","defaultLanguage","linkedRelationPlaceholderUrl","filteredTemplates","getFilteredTemplates","checkedOutUserId","checkedOutUserName","toggleExamples","previewTemplate","downloadTemplate","replaceTemplate","copyTemplate","setCheckoutInfo","InvoiceSchedulesContainer","modalSchedule","newSchedules","mapSchedule","invTextEndpoint","editScheduleId","openEditDialog","copySchedule","deleteSchedule","onModalClose","EmployeesInTeamX","CreateNewTeam","DeleteTeam","AddEmployee","EmployeeXAddedToTeamX","RemoveEmployeeFromTeam","RemoveEmployeeFromTeamMsg","EmployeeXRemovedFromTeamX","ViewEmployeesInTeamX","RemoveTeamXMsg","AddTeamToOtherTeamX","SelectATeamToViewItsEmployees","EmployeeInheritedTeamExplanation","RestructureTeams","RestructureTeamsInfo","CanViewInvoices","ChooseEmployeeToAddToTeamX","AllUsersAreAlreadyInThisTeam","SelectEmployeeModal","saveEmployee","WorkflowConfigurationTable","configurations","onEdit","onCopy","WorkflowType","RequireDocumentSigned","MarkAsBlocked","DaysBefore","DaysAfter","workflowType","TaskTemplateNotFoundProbablyDeleted","requireDocumentSigned","markAsBlocked","markAsInapplicable","DontChangeStatus","toleranceDaysBefore","toleranceDaysAfter","employeeSortFunc","TeamsContainer","newTeam","createTeam","activeDeleteTeam","showDeleteTeamModal","employees","retrieveEmployeesInTeam","showSelectEmployeeModal","showDeleteEmployeeModal","newTree","canViewInvoices","inheritedTeam","deleteTitle","onTeamSelected","AddTeamToOtherTeam","employeeID","activeEmployee","filteredUsers","addEmployeeToTeam","deleteEmployeeFromTeam","deleteTeam","addTeamToRoot","renderTeam","hasDraftInvoicePermission","toggleCanViewInvoices","WorkflowConfigurationListTitle","NewTaskStatus","ReferenceDate","LastDayOfVatPeriod","TaskflowAction","AllSubtasksWillBeSetToDoneIfYouDontSelectOne","GeneratedDocumentQrCodeScannedInfo","TaskTemplateFilter","onMainTaskTemplateChanged","subTaskTemplates","onSubTaskTemplateChanged","showSubtaskFilter","mainTaskTemplateClassName","subTaskTemplateClassName","mainTaskTemplateChanged","subTaskTemplateChanged","WorkflowConfigurationModal","configurationDto","serviceObject","workflow","selectedWorkflow","workflowConfiguration","workflowTypes","mappedWorkflows","showSubtaskDetails","showReferenceDate","workFlowTypeClassName","saveModal","selectedWorkflowChanged","WorkflowConfigurationContainer","configurationModal","showWorkflowConfigurationModal","workflowConfigurationEndpoint","taskTemplatesPromise","translatedConfigurations","mainTaskTranslation","subtaskTranslation","deleteConfiguration","saveConfiguration","ExtendedHorizontalBar","scale","onLabelClick","onElementClick","chartRef","getElementsAtEventForMode","intersect","mousePoint","getRelativePosition","getValueForPixel","handleChartClick","getStateParamsFromEvent","statusCode","getDatasetStatus","getStateParamsFromTask","datasetColors","statusCodes","minDeadline","maxDeadline","PercentagesDashboard","totalLabel","onOpenOverview","raw","dataIndex","footer","QuantitiesDashboard","ClearButtonWrapper","TaskDashboardFilters","endOfFiscalYearFrom","endOfFiscalYearUntil","endOfFiscalYearPeriod","retrievePeriodicities","translatedPeriodicities","setEndOfFiscalYearPeriod","retrieveTemplates","showPercentages","onChartTypeChange","periodChanged","sessionStorageKey","TaskDashboardContainer","periodicityName","sortValue","periodSort","updateSessionStorage","loadData","toggleDashboards","openOverview","DynamicTaskFilter","columnClassName","relationUserId","WithRelationLabels","EmptyAccountingSoftware","WithTaskLabels","WithoutTaskLabels","relationUsername","vatPeriodicity","financialStatementScheme","socialSecurityFund","socialSecretariat","TaskListFilters","taskStatuses","retrieveSubTasks","newTaskLevels","translatedSubtasks","countSelectedTasks","initialUser","selectedStatuses","filterTaskLevelChanged","getName","onStatusFilterRemoved","onStatusFilterAdded","EditableUserSearch","TaskListActionsButton","onOpenTask","onDeleteTask","TaskListRow","handleTaskSelection","onAddRegistrationClick","onShowTaskDetails","onRequestDeleteTask","onUpdateDeadline","showLinkButton","changeStatusTitle","modifiedAt","hide","TaskListGlobalActionsButton","onChangedAssignedUser","onChangeDeadline","onAddTaskTags","onRemoveTaskTags","hasTodos","hasTasks","canUpdateTasks","canUpdateTodo","canDeleteTasks","canDeleteTodo","ChangeAssignedUserModal","ChangeTaskDeadlineModal","ChangeTaskTagsModal","selectedSubtask","addTags","trimmedName","subtaskChanged","TaskListContainer","allTasksSelected","taskFilters","parentIndex","childIndex","parentHasAttachments","loadListToken","activeTask","selectedTasks","showCreateToDoModal","showDeleteTaskModal","taskUpdatedEventHandler","assignedToModel","showChangeAssignedUserModal","showChangeTaskDeadlineModal","emailDto","showBatchDeleteTaskModal","showChangeTagsModal","handleSendEmail","onUpdateTask","updateDeadline","updateUser","memoryTaskFilters","taskRemovedEventHandler","handleTaskHasAttachmentsMessage","getCountSelectedTasks","deleteTask","executeBatchActionChangeDeadline","executeBatchActionSendTaskRelationMail","executeBatchActionDeleteTasks","executeBatchActionChangeAssignedUser","executeBatchActionChangeTags","getCountSelectedTasksFormatted","openSendEmailModal","handleSelectAllTasks","ResetDeadlineModal","optionChanged","ChangeSubtaskDeadlineModal","subtaskId","ChangeMainTaskStatusModal","taskStatusChanged","TaskGlobalActionsButton","onChangeTaskStatus","onChangeTaskDeadline","onChangeSubtaskDeadline","onNewRegistration","onChangeMainTaskStatus","onResetDeadline","ChangeTaskStatusModal","showEmailEditor","taskstatuses","touchedTask","markAsRejected","newShowMailEditor","loadEmailTemplate","getAttachments","showMailCheckbox","taskClassName","taskstatus","handleSendMailClick","includeParameters","TaskOverviewFilters","displayMode","displayModeChanged","columnFilters","defaultFiltersForSaving","currentFiltersForSaving","includeParametersChanged","TaskOverviewCell","renderCellContent","TaskOverviewRow","parameterValue","onUpdateParameter","highlight","parameterDefinitions","renderSingleParameter","handleRowHighlight","statusValue","canSendSignatureRequest","renderTaskParameters","getRegObjectForCell","mapParent","stateTask","mapChild","createDOMPurify","addHook","setAttribute","TaskOverviewContainer","updatedItems","updatedRow","subTaskFilters","parameterFilters","taskTemplateDocumentation","documentation","orgTaskId","showChangeTaskStatusModal","showChangeMainTaskStatusModal","showChangeSubtaskDeadlineModal","showNewRegistrationModal","showResetDeadlineModal","mappedDisplayMode","onTaskDetailsClosed","retrieveTaskAttachments","signableDocuments","showSelectDocumentsModal","activeDocuments","sanitized","filtersFromSearchParams","subtaskMatch","taskHasAttachmentsChangedHandler","documentationPopover","openSendSignatureRequestModal","executeBatchActionDeleteTask","executeBatchActionTaskStatus","executeBatchActionChangeField","executeBatchActionSubtaskDeadline","executeBatchActionTaskRegistration","executeBatchActionGenerateDocuments","executeBatchActionResetDeadline","buildTitle","openChangeSubtaskStatusModal","onCreateReport","createParameterFilterObject","buildColumnTitle","RegistrationFormTestContainer","useGetIntraCompanyOverview","queryKey","IntraCompanyQueryKey","Overview","cancelQueries","relationCompanyId","userCompanyId","billingDisabled","setPage","toggleIntraCompanyBilling","pagedRegistrations","OriginalQuantity","BilledQuantity","IntraCompanyUnitPrice","IntraCompanyAmount","originalQuantity","intraCompanyUnitPrice","intraCompanyAmount","noIntraCompanyBilling","AddToIntraCompanyInvoice","registrationId","ShowMore","userCompanies","FromCompany","relationCompanies","ToCompany","onlyInvoicedRegistrations","OnlyInvoicedRegistrations","neverIntraCompany","ShowOnlyNeverIntraCompany","billNonBillable","BillNonBillableRegistrations","NoRelationConfiguredInCompany","onBillCompany","onToggleIntraCompanyBilling","onToggleSelected","onToggleAllSelected","ToRelation","userCompanyName","relationCompanyName","billedUnitPrice","showWhenFeature","MakeInvoiceProposals","DoNotIntraCompanyBillRegistrationConfirm","removeDetailRow","HandleHttpError","initPeriod","billCompany","isBillingCompany","batchBill","batchBillRunning","setSelected","stateFilters","combinedFilters","setDetails","hasAnySelected","toggleSelected","resetSelected","getSelected","old","onBatchBill","selectedLines","oldFilters","FilterResource","AbsenceCorrections","BalanceBefore","Mutation","AddCorrection","RemoveCorrection","DeleteCorrectionMsg","InitializeCounter","InitInHours","InitInDays","OpenEmployeeDetail","HoursInDay","ShowOnlyOpenAbsences","AbsenceCounterCell","counterInfo","onInitCounter","onDeleteCounter","onOpenRegistrationOverview","onOpenCounterDetails","currentUser","HrmOverviewRow","counters","onlyOpen","HrmOverviewFilters","inDaysChanged","resourceFilterChanged","AbsenceCorrectionModal","correction","absenceCounterId","correctionValue","reloadData","deleteCorrection","numberInputStyle","balanceBefore","mutation","correctionId","correctionValueChanged","removeCorrection","addCorrection","HrmModals","onCloseModals","BatchInitCounterModal","setRegistration","validationVisible","CreateTimerRegistration","HrmOverviewContainer","hrmFilters","handleUpdateCounter","modalName","closeModals","handleGlobalActionJobResult","initCounterGlobalAction","handleInitCounter","handleDeleteCounter","handleOpenRegOverview","withIntl","userCulture","initTranslations","handleReload","currency","currencyDisplay","getTaskColor","taskColors","blue","yellowOchre","purple","defaultItemType","defaultStates","defaultGroupType","states","isCollapsedByDefaultForGroups","areNewItemButtonsHidden","dragging","SharedWorkerSupported","globalThis","SharedWorkerPolyfill","opts","ActualWorker","SharedWorker","Worker","defineProperty","port","onmessage","enumerable","configurable","onmessageerror","postMessage","transfer","terminate","dispatchEvent","lastRegStorageKey","TimerRegistrationService","postMessageToWorker","worker","stopTimer","startTimer","setRegistrationId","createTimerRegistration","restartTimerRegistration","lastReg","stopTimerRegistration","pause","pauseTimerRegistration","handleWorkerMessage","doTimerTick","isRunning","getRunningRegistration","isPaused","isTimerRunningForSubTaskId","useGetTimerRegistration","processTimeRegistrationResult","timeRegistrationResult","isAffectedRegistration","msgTaskTimeRegistrationStarted","msgTimerRegistrationStarted","discarded","msgTaskTimeRegistrationDiscarded","msgTaskTimeRegistrationCreated","affectedRegistrations","affectedRegistration","taskTimeRegistrationUpdatedHandler","taskTimeRegistrationResult","e_1","startStopTimer","createStartTaskTimeRegistrationValues","e_2","runningRegistration","timerTaskId","msgNoResourceDefined","startStopTimerAfterStatusChange","taskTimeRegistrationMethod","AutomaticRegistration","Done","DefaultTime","Mail","AutomaticMail","InProgress","onSetTasks","allTasks","tsks","setTasks","TaskTimerContext","withModalProvider","withDataProvider","withQueryClient","client","withTaskTimerProvider","collapseTask","taskMessages","useGetPlannedTaskRemark","useCreateTaskTimeRegistration","createTaskTimeRegistration","useUpdateTaskStatus","useTaskTimerContext","onMutate","taskToUpdate","subTaskToUpdate","amountTotal","cloneDeep","extractIndexes","taskIndex","amountDone","children_1","updatedSubtasks","updatedSubtask","getKanbanBoardColumns","subTaskByStatusMap","itemIds","getSubTaskByStatusMap","subTasksByStatusArray","Map","useUpdateAssignedUser","updateAssignedUser","useDeletePlannedTask","delete","deletePlannedTask","useGetTaskAttachments","TaskAttachments","subtaskIds","useUpdateTaskDeadline","currentData","updateTaskDeadline","menuItems","CustomToggle","menuItem","useGetTaskDocumentation","TaskDocumentation","openMailDialog","taskTimeRegistration","msgNoRegistrationMadeDefaultTimeZero","OpenFormOnDone","openTimeRegistrationDialog","reloadColumns","shareItem","isDisabled","isDragging","loadDocumentation","setLoadDocumentation","loadRemark","setLoadRemark","loadAttachments","setLoadAttachments","loadingDocumentation","isTimerRunning","toggleBlockItem","toggleInapplicable","toggleRejected","deleteItem","canUpdateTask","remarkPopover","showTimerRunning","priority","alignItems","flexDirection","hasDocumentation","onOpenTaskDetails","taskToOpen","updatedColumns","setColumns","getColumn","droppableId","isDropDisabled","dropProvided","dropSnapshot","innerRef","droppableProps","background","isDraggingOver","itemId","draggableId","isDragDisabled","provided","snapshot","getElement","canCreateTask","onCreateSubTask","initialColumns","newSubTask","onTaskMailModalClosed","msgTaskEmailCancelled","draggableProps","dragHandleProps","draggableStyle","onDragEnd","destination","startColumn","finishColumn","movingItemId","newColumns","startIndex","finishIndex","prevStatus","startItemIds","newStartColumn","finishItemIds","newFinishColumn","Condition","msgTaskOfTypeConditionCannotBeSetInProgress","updateBoard","taskMgmtSendMailContent","taskMgmtSendMailTitle","onSetIsCollapsed","hasOpenTasks","toggleOpenTasks","useGetKPIs","StatusSelect","NotDone","TaskTemplateMultiSelect","SubtaskTemplateSelect","SubtaskTemplates","subtaskTemplates","PlannedTasksTagsMultiSelect","useGetPlannedTaskTags","behaviour","ResourceTagsMultiSelect","ResourceTags","useGetResourceTags","MultiSelectButtons","fullWith","MyTeamsMultiSelect","MyTeams","useGetMyTeams","allLabels","TaskPeriodicitySelect","taskPeriodicitys","useGetAssignmentTemplates","TaskBoardKPIFilterButton","TaskBoardFilters","activeFilters","TaskBoard","TaskBoardFilterKPIs","setActiveKPI","FilterWrapper","invisibleFilters","FilterRelationSearch","FilterUserSearch","isAlwaysVisible","FilterTaskTemplateMultiSelect","FilterStatusSelect","FilterDelayedDateRangePicker","startDateItem","endDateItem","startDatePlaceholder","endDatePlaceholder","FilterSubtaskTemplateSelect","taskTemplatesItem","subtaskStatus","SubtaskStatus","FilterTaskPeriodicitySelect","FilterEnumMultiSelect","FilterCompanyMultiSelect","FilterEndFiscalYearMultiSelect","FilterAssignmentTemplateSelector","FilterLegalFormMultiSelect","FilterResourceTagsMultiSelect","FilterRelationTypeButtons","FilterMyTeamsMultiSelect","FilterPlannedTasksTagsMultiSelect","FilterToggleSelect","updatedFilters","includeDoneTasksInThePast","IncludeDoneTasksInThePast","FilterRelationGroupMultiSelect","FilterReferenceYear","accessTokens","revokeAccessToken","useRevokeAccessToken","msgTaskTimeRegistrationStillRunning","queries","refetchOnWindowFocus","newData","newMainTask","newChild","CollapseAll","ExpandAll","filterSelectLabel","clearItem","extraFilterItems","showOnItem","setSelectedFilterItems","_setSelectedFilterItems","includedFilterKeys","bottomElement","filterSelectItems","selectedFilterItems","filterSelectList","includedFiltersObject","mainTasks","openTaskIds","taskIsUncollapsedBySubtask","setOpenTasks","pageParams","openTaskDetailForTaskInRoute","setOpenTaskDetailForTaskInRoute","stateProps","createTaskForRelation","TaskBoardContainer_OpenTaskIdsArray","setOpenTaskIds","useParametersFromRoute","setUseParametersFromRoute","filterFromState","storageString","setActiveFilters","cacheKey","pageParam","getNextPageParam","lastPage","allPages","notifyOnChangeProps","fetchNextPage","onRefetch","subTaskIds","taskboardMessages","defaultState","InvoicedRelations","InvoicedRelationsModal","sortDesc","initialSearchParameters","loadRelations","renderRelation","TenantRoles","Functionality","Write","UseAdvanceWritePermissions","EditTenantRole","CreateTenantRole","DeleteConfirmationTitle","DeleteRoleConfirmationMsg","CopyDefaultRole","hasPrivilege","emptyRole","writePrivilege","TenantRoleConfigModal","advancedWrite","rights","writeCnt","updateName","updateFunctionality","toggleAdvanceWrite","AddTenantRoleDropdownButton","onOpenEditModal","setRoles","oldRoles","TenantRoleContainer","editModal","roleToDelete","roleNameExists","copyRole","updateRole","deleteRole","componentsModule","react2angular","AppProviders","IntraCompanyBillingContainer","TaskboardContainer","CreateTimerRegistrationModal","AccessTokensContainer","components","$stateProvider","$urlRouterProvider","$urlMatcherFactoryProvider","$httpProvider","$translateProvider","tmhDynamicLocaleProvider","ipnConfig","uibDatepickerPopupConfig","uibDatepickerConfig","minicolorsProvider","buildversion","caseInsensitive","encode","is","pattern","abstract","optionsSvc","settingState","isReact","views","fromRelBindSvc","reloadOnSearch","$stateParams","squash","transformJsonParam","temporary","intraCompanyInvoiceId","showTransactions","templateHttpSvc","getTemplateWithContent","reminders","reminderHttpSvc","getReminders","dynamic","redirectTo","trans","otherwise","useStaticFilesLoader","suffix","useSanitizeValueStrategy","useLocalStorage","preferredLanguage","localeLocationPattern","useStorage","initialCountry","nationalMode","preferredCountries","altInputFormats","datepickerPopup","minDate","showWeeks","letterCase","run","$anchorScroll","editableOptions","editableThemes","$transitions","$location","isLoggedIn","getClaims","setAuthenticatedUserContext","startAuthentication","msg","actionLabel","actionParameter","proposal","numberOfTransactions","$current","transition","router","onStart","pendingRequests","toStateConfig","$to","urlService","plausible","inline_manual_player","manualReinit","hash","yOffset","relationFileHeader","offsetHeight","theme","cancelButtonTitle","submitButtonTitle","bs3","originalHrefFunction","stateOrName","registerPlugin","FilePondPluginFileValidateSize","FilePondPluginFileValidateType","loadingAnimationSvc","tmhDynamicLocale","relBindSvc","notificationSvc","jobSvc","recentRelationsSvc","insights","logOut","hasEid","connectWebUrl","zendeskUrl","inlineManualRoles","inlineManualLanguage","inlineManualPlayerData","createInlineManualPlayer","inlineManualTracking","uid","currentLanguage","setLanguage","tracking","_setMetadata","showPaymentMonitoring","buildNumber","initLanguage","setLang","isInitial","originalCode","newCode","setupBeamerWhatsNew","openRelation","openConnect","openMyTickets","innerWidth","insightsService","Beamer","beamer_config","user_firstname","user_lastname","segments","isEnvDevelopment","env","FEATURES","sb","toggleSidebar","showSidebar","hideSidebar","$injector","lockFactory","authInterceptorServiceFactory","withCredentials","getAuthorizationHeaderValue","responseError","rejection","notifyListeners","listeners","fnc","onLogout","onNewToken","addUserLoaded","expired","token_type","signinRedirect","completeAuthentication","signinRedirectCallback","signoutRedirect","addOnLogOut","addOnNewToken","PRIVILEGES","featureflags","parseFeatureParam","sec","isString","relationTeamAccessCode","relationTeamCode","BigInt","isc","FUNCTIONALITIES","SECURITY_HIDDEN_CLASS","parseSecurityParam","$parsed","parseSecurityPrivileges","permissionString","reqPerm","doCheck","destroyer","cxFeature","cxSecurity","checkTenantConfiguration","cxTenantConfiguration","googleMapsSvc","singleTravel","addRoute","getAddressString","travelOneWay","calculating","noRelAddress","noCompAddress","companyAddressPromise","relationAddressPromise","companyAddresses","relationAddresses","companyAddress","postAddress","canCalculate","calculate","employeeAddress","emplAddr","travelFromHome","flip","getDistanceMatrix","clearResult","getDescription","updateSettings","appMessages","selectAllChanged","itemChanged","showSaveButton","modalOptions","deferred","showOkCancel","showAvailableRelationTags","showSimilarRelations","similarRelations","showExternalRelationSearchDialog","searchTerm","searchProvider","showRelationWizard","wizardOptions","translateListItem","listid","updateInternalPrice","internalPrice","showCheckboxList","confirmChanges","showStringInput","externalRelationHttpSvc","canceller","comp","undelete","defaultChanged","updateRegistrations","noTags","removedTags","updatedTags","showDeleteDialog","addressList","objectFactorySvc","openNewAddressSvc","appSettings","stringEquals","s1","s2","ignoreCase","postAddressEquals","a1","a2","street2","notifyRefresh","isAddressValid","newAddress","newMedium","adding","cancelNew","getDefaultCountry","countryFieldId","addNewAddress","renewNewAddress","addressData","setAsMain","addressInList","toggleIncludeInMagicMail","includeInMagicMail","sortAddresses","mediumSort","zipcodes","getOptions","zipcodeChanged","$item","addressChanged","unSyncAddress","$invalid","addressReference","setIfOne","relFile","gotoAddresses","addressesFieldId","commOutSvc","noAddresses","loadingAddressesPromise","getAddresses","wrapAndSave","ReferenceFieldId","ValueId","openNewAddress","registerCallback","findOption","defaultAssignment","selectOnBlur","isDefined","selectOnExact","trueValue","falseValue","$parsers","$formatters","div","isAdvancedUpload","checkedFunc","$event","ckeOptions","showLabel","eClass","reloadAddresses","commList","newComm","addNewComm","commSetting","comm","showBillingError","fi","billingError","getErrorMsg","newBillingEmailComm","validationCheckedOnce","validateAgain","fromMedium","saveComm","submitNew","addrId","contactReference","contacts","linksSectionId","emptyArray1","emptyArray2","removeDefaultOption","valueId","contactsFrom","emptyString1","emptyString2","mapOptions","common","isCommon","getSuggestions","updateValue","findCountry","limit","showPlaceholderIfNull","elem","unloadEventHandler","$dirty","returnValue","confirmOnExit","preventStateChange","$setSubmitted","bindings","ctrl","enumCacheSvc","currencies","getOptionsWithDefault","selecting","beforeSave","titleCode","ignoreAlias","nameFieldId","infixFieldId","getFieldValue","firstNameFieldId","getTitleCode","aliasFieldId","titles","getObject","compactRelation","legalFormSalutationFieldId","codeFieldId","uniqueIdentifierFieldId","inputRegex","widgetList","hasAction","widget","dayMonthConverter","$setValidity","viewValue","setMinutes","getTimezoneOffset","modelValue","dt","uibDatepickerPopup","isDate","showUpload","onDeleteLink","showDocumentType","bindToController","uploadFiles","showEditIcon","fileExtension","sendDeleteDocumentRequest","sendDeleteDocumentLinkRequest","confirm","showMismatchWarning","documentTemplate","isMismatch","reloadTemplates","getDisplayValue","$watchGroup","readEidXml","firstNameOfficial","readXmlFromFile","readAsText","onloadend","readyState","DONE","processDragOverOrEnter","originalEvent","draggingClass","processDragLeaveOrEnd","inputId","inputWrapper","initialHeight","watchVisibility","expr","ngShow","ngHide","controllers","view2model","tmpValue","hideItems","translateLabels","setDisplayValue","initOnload","ddwOpen","toggleItem","clearSelected","toggleDropDown","eName","ctrlId","ngDisabled","nullLabel","extraId","extraLabel","emptyGuidLabel","displayFunc","displayValueIfNull","generateUrl","imgSource","businessNumberFieldId","vatNumberFieldId","kvkNumberFieldId","nationalIdNumberFieldId","nameValue","nationalIdNumberValue","kvkNumberValue","vatNumberValue","businessNumberValue","enterpriseNr","kvkNumber","nationalIdNumber","externalServiceLinkType","showInput","disableDrop","validType","isTypeValid","contains","checkSize","canDrag","validMimeTypes","fileDropzone","showAlert","fileTypeDesc","transclude","allow","singleFile","fileInput","previousFilters","calculateViewProps","currentJson","dynamicFiltersAllSelected","$filters","renameFilter","toggleAllDynamicFilters","toggleDynamicFilter","$doCheck","cxFocusThis","$attr","ngCancel","$valid","triggerHandler","onbeforesave","onaftersave","oncancel","isXeditable","xeditable","isFormOpen","gm","week","isSaturdayWorkDay","gmForm","undo","$rollbackViewValue","setDateType","orgOptions","groupProp","allowInvalidInitialItem","autoSelect","disabledtitle","showClearButton","iClass","getLabel","findSelected","isGroup","allowInvalid","seleted","$watchCollection","dropdownHover","insertAfter","constant","allowExtensions","autoFormat","autoHideDialCode","autoPlaceholder","customPlaceholder","geoIpLookup","numberType","onlyCountries","skipUtilScriptDownload","utilsScript","telInputPlugin","getNumber","intlOptions","handleWhatsSupposedToBeAnArray","intlTelInput","bindErrors","$modelValue","setNumber","setCountry","selectedCountry","getSelectedCountryData","dialCode","$validators","internationalPhoneNumber","addError","refreshErrors","$error","expiryDays","expiryType","invoiceTypes","limitDigits","newViewValue","caretPos","range","pos","createTextRange","move","selectionStart","setSelectionRange","moveCaretOnFocus","$interval","dateFilter","stopTime","updateTime","myCurrentTime","alert","isUndefined","noop","labelSeparator","labelHideCountry","hideStreet2","hideButtons","addressForm","iclass","$onChanges","relationNameFilter","createBtn","initByRelationById","showSearch","focusOn","selectRelation","openNewRelationDialog","deregisterTo","deregisterFrom","salutation","chosen","choosing","profileFromFieldId","relPersistSvc","section","getHelpArticleForField","textBoxMaxWidth","boolToStr","dayMonthOptions","minMode","maxMode","formatDayTitle","datepickerMode","formatMonthTitle","isNullDate","onToggle","loadSection","changeRelationType","reloadSections","showValidationError","submitUser","oldUserId","tasksForUser","forUser","result2","isSectionVisible","invoicingViaStream","getValueToCopy","showCopyButton","getFieldLabel","canSort","dir","predicate","disableCreate","loadTags","showAvailableTags","updatedTag","readValue","showOpenDetail","$ctrl","isTodo","updatedValue","setStatus","setBlocked","setInapplicable","setRejected","setNextStatus","hasNextStatus","onTaskModalClosed","showTaskModal","onTaskModalSaved","openTaskDetail","itemType","withoutTemplate","allowAllTeams","flatTeams","myTeams","invalidTag","addingTag","leftoverText","openAccessDialog","keyProperty","showWithoutTeams","loadTeams","objectAsModel","unit","getValue","watches","eMin","eMax","$parent","isHoursInput","cxTimeInputXedit","timeRegex","saveValue","collapsedKey","onInit","cxToggleCollapsed","$collapsed","defaultCollapsed","showDialog","translateLabel","inputRows","defaultRequired","maxlength","labelPrefix","isTextArea","terminal","relationResource","ignoreAliasGetter","$uibSearchCustomerRequest","$uibSearchCustomer","forInvoice","names","$select","toggle","onSelectCallback","ev","$commitViewValue","$setTouched","findUser","handleAfterSave","isInactiveUser","invalidUser","showUnassigned","showSystemUser","extraOptions","unassignedUser","allOptions","identifier","querySelector","vatForm","handleEsc","vatStringClick","vatString","inputMask","vat","vatTypes","setInternalValue","percentageFilter","getArticle","formatUrl","formattedUrl","administrativeCostMethod","administrativeCostAmount","withInvoiceStream","selectRecentRelation","recentRelationsToggle","getFiltered","reloadRecentRelations","showWithoutGroups","loadGroups","commitValue","hasTasksAssignedToOldUser","replaceAllUsers","showUserSelector","oldUserName","newUserName","oldUser","newUser","innerSave","valueArray","resetOptions","addCssClass","naceCode","loadingSpinner","originalContent","cxLoading","contents","cxLoadingSm","secondNumber","compareTo","sizes","decimals","dm","fraction","editSign","stripped","ignoreEmpty","$sce","separator","hideCountry","trustAs","HTML","currentId","defaultTenantLangauge","translatedInTenantLanguageTaskName","formatAddress","contactId","contactList","similar","value2","distArray","minimator","z","maxDistance","def","forceLanguage","statefulFilter","$stateful","$log","isSanitizePresent","matchItem","trustAsHtml","$templateCache","formatDateLong","naceCodeEntry","converted","flyArray","getFlyArray","removeFly","fly","clickAction","pauseHide","resumeHide","initialized","errCode","fieldLabel","getMessage","positionClass","addFly","withheld","solo","vibrate","executeToastrAction","titleParams","toastrDisplayMethod","toastrType","msgStringOrErrorCode","extendedTimeOut","errorCode","custom","titleMessage","contentMessage","contentParams","toastrTitle","toastrContent","baseUrl","handleSuccess","createReminder","reminder","updateReminder","removeReminder","reminderId","getTemplates","getTemplate","getContent","documentTagsPromise","promises","getPlaceholders","createTemplate","removeTemplate","createLanguage","validateLanguage","updateLanguage","removeLanguage","languageId","requestError","replaceErrors","getOwnPropertyNames","propName","cause","msgString","crmTypeKey","newCrmType","backendUrls","addressOrList","commonCountriesPerConfiguration","5","loadUserData","staticDataRequest","userDataRequest","systemUserName","commonCountries","createObjectFromArray","isDefaultCompany","loadNaceCodes","lock","naceCodeLanguage","translateListenerDestroyer","dataCacheCompany","paymentMonitoring","updateCompany","updatedCompany","oldCompany","updateAllCompanies","reloadLock","readyLock","backEndBuildVersion","$$state","_cache","configs","provider","$get","google","maps","googleMaps","travelModes","unitSystems","driving","TravelMode","DRIVING","bicycling","BICYCLING","transit","TRANSIT","walking","WALKING","metric","UnitSystem","METRIC","imperial","IMPERIAL","unitSystem","durationInTraffic","avoidHighways","avoidTolls","travelMode","origins","destinations","req","DistanceMatrixService","DistanceMatrixStatus","OK","ZERO_RESULTS","originAddresses","destinationAddresses","distanceText","durationText","originalResult","BillableRegistration","originalUnitPrice","originalDiscountPercentage","originalVatRate","originalVatType","originalBillable","billable","originalInForfait","displayTime","billedDiscountPercentage","billedVatRate","billedVatType","isInForfait","isModified","originalPrice","currentPrice","currentUnitPrice","currentDiscountPercentage","InvoiceLine","baseAmount","hasRegistrations","totalRegistrationHours","totalRegistrationAmount","subtotal","totalExVat","totalVat","totalInclVat","isRegQuantityModified","isRegUnitPriceModified","isRegDiscountModified","isRegVatRateModified","isRegModified","registrationsLoaded","addRegistration","deleteRegistration","regId","updateRegistration","invoiceExceptionCodes","dateToNumber","modifiedDate","companyErrors","relationErrors","invoiceErrors","companyExceptionCodes","relationExceptionCodes","parseBillingErrors","invoiceLines","deleteLine","lineId","findLine","hasLineType","lineType","isAdvance","canNumber","ignoreDate","loadingAnimation","showSmall","getLoadingAnimation","locks","isFunction","region","targetRelation","targetTypes","hasType","typesArray","isPrincipal","labelTo","getBic","zipCodes","optionsObject","stripObjectsToListIds","idPropName","baseList","idList","nameNL","nameFR","getDefault","$resource","wrapResponse","transformResponse","castResponse","transformRegistration","date2","convertDateStringsToDates","transform","milliseconds","dateTimeRegex","matchDate","dateRegex","convertDateToString","setDatePropsToISO","transformRequest","mailSuggestions","getAll","deleteFile","cancellable","getProfile","updateMyProfile","updateTeams","updateTags","updateProfile","setHidden","overview","setDefault","wizard","ignoreLoadingBar","updateDetails","shareholderGroups","linkInfo","toggleNeverInvoice","toggleBillable","toggleInForfait","calcDurationInDays","updateCategory","updatePrice","saveResource","saveCategory","deleteResource","deleteCategory","restoreResource","restoreCategory","subresources","setTags","changeType","sections","hrm","saveCompany","saveHrm","forgotPassword","changePassword","get2FA","enable2FA","disable2FA","changeUsername","topcustomerdebt","topcustomerbillable","topcustomerrevenue","billedpermonth","customerBillable","unnumber","credit","quickSend","getMail","sendMail","initEdit","commitEdit","export","markSent","markExported","clearExportStatus","linesReport","up","bill","billRegistrations","changeResource","recalculateDiscounts","bookyearInfo","domiciliation","pitRefund","hasDraftInvoices","clearActiveSchedule","getResources","saveResources","scheduleLines","transformDate","tickEvent","timerConfig","tick","notify","$emit","handler","localStorageService","relSections","relDashboard","validateType","noFlyIn","numTest","ibanString","firstFourChars","toTest","ibanReplaceLetters","mod","validVat","countryMatch","myString","regexString","guidRegex","validateFieldWithDef","valueToValidate","blockFlyIn","validators","passesValidation","validator","refValue","refMaxDate","toDateString","refMinDate","segmentsPromise","withoutMargin","table","safeKey","filterOptions","cxFilterColumn","isChanged","initPopup","propFilter","tableInfo","li","numberFilter","lesser","greater","filterSearch","setSearch","clearSearch","closePopup","clearFilter","filterPopupOpen","searchOnEnter","itemFilterChanged","compareFilterChanged","compareFilterKeyPress","compile","sortVisible","sortBy","prepend","cxSortColumn","pre","handlePromise","cxTable","bindTo","initSort","initParams","initializeParams","enablePaging","noResultMsg","paging","filterTable","clearRows","appendRows","stopPaging","getNextPage","currentParams","rowVar","cxTableRow","$errorTypes","$errorBinder","bindAttr","modelErrors","otherModelValue","$validate","minDateFallback","datepickerOptions","minDateOption","maxDateOption","fieldDef","maximum","minimum","ctry","notNull","validateNotNull","pwdLength","pwdCapital","pwdNonCapital","pwdNumber","pwdSpecial","structuredCommunication","minLength","regularExpression","valueWithoutPrefix","checkVAT","website","nullValue","transformBack","relevancy","none","output","typeOutput","typeAll","typeNone","setViewValue","toggleChecked","maxRelType","validatorTypes","inputMaskTypes","exceptionMessage","showValidators","deleteValidation","addValidation","showInputMasks","deleteInputMask","inputMasks","addInputMask","fieldType","getType","validatorType","numStep","dateMin","opened","dateMax","maxStringLength","minimumType","maximumType","editField","addField","sectionId","sectionConfig","completeness","countriesNot","changeField","tmpColumns","colIndex","newValues","oldValues","getRelevancyInfo","editConfig","licensingSvc","userRoles","licenseInfo","getLicenseInformation","currentEmployee","employeeProfiles","timeTable","reloadLicenseInformation","setEmployee","employeeStartDate","employeeEndDate","userRole","license","isTemporary","beginDate","beginDateWarning","endDateWarning","saveUser","empToSave","handleEmployeeResponse","saveEmployeeTeams","saveEmployeeTags","addUser","deleteEmployee","undeleteEmployee","deleteTimeTable","editTimeTable","editOvertime","translateEmailRemark","tenantRoles","defaultRoles","customRoleId","customRoleName","employeeEmail","userEnabled","userTravelFromHome","userTravelOneWay","employeeProfile","keepVisible","cached","licenceType","licenseInformation","licenses","licenseId","temporaryLicenses","availableLicenses","billPerLicense","beginDateOptions","endDateOptions","addMonths","setDuration","buyNewLicense","mapCorrection","refreshRemainingOvertime","resetModel","inputForm","$setPristine","$setUntouched","addRow","deleteRow","getValidationErrors","startMorning","endMorning","startAfternoon","endAfternoon","skipMorning","skipAfternoon","dayPrefix","prevStartDate","weekTotal","homeWorkingTotal","dayLabels","lineChanged","wasInvalid","startDateChanged","isTrial","emp","employeePhone","employeeInitials","employeeProfileResource","newLicense","licenseMonths","licenseChanged","defaultEmployeeProfile","employeeProfileId","submitNewEmp","newRelForm","agreedNewLicense","licBeginDateOptions","licEndDateOptions","overviewParamsStorageKey","includeInvisible","activeEmployeeFilter","userRoleId","mapEmployee","getLicenseInfo","teamsText","renderTeams","userResource","totalEmployees","usesSSO","lic","isFree","clearFilters","retrieveEmployees","hasFilter","reloadList","initialTableParams","includeRemoved","userConfirmed","toggleHidden","editEmployeeProfile","profileId","launchReport","createEmployeeReport","createOvertimeCorrectionsReport","openSelectPeriodModal","hiddenBySecurity","rebuildHiddenColumns","colspan","initHiddenColumns","openColumnConfigDialog","fromDateOpen","untilDateOpen","validPeriod","dateFiltersChanged","showError","topCustomerRevenue","billedPerMonth","topCustomerDebt","complianceStatistics","safeGetTopCustomerRevenue","safeGetBilledPerMonth","safeGetTopCustomerDebt","safeComplianceStatistics","getTopCustomerRevenue","reloadTopCustomerRevenue","getBilledPerMonth","reloadBilledPerMonth","getTopCustomerDebt","reloadTopCustomerDebt","getComplianceStatistics","reloadComplianceStatistics","dashboardSvc","companyChanged","batchParams","dialogSvc","collapsedLanguages","sendByPeppolIfStrategySetToPeppol","sendInvoiceTemplateId","contexts","contextLabel","refreshPreview","withoutContent","previews","preview","toggleLanguageCollapse","sendEmails","btnMessage","extraButtons","ledger","onlyUseDefaultLedgerForNewPriceListItems","resourceLedgerAccount","isFreeInvoice","invoiceType","lineTypeChanged","resourceCode","invoiceLineType","selectPrice","resultType","invoiceResource","editingCustomer","editCustomer","customerChanged","updateInvoice","id2","showTransactionDialog","newTransaction","editTransaction","newDraftInvoiceLine","invoiceAudit","batchMailInvoices","mailHistory","mailInvoice","mailReminder","newTransactionPayment","newInvoicePayment","previewDraftInvoice","finalize","uploadCODA","editInvoice","numberInvoices","bookyearinfos","invoicesOrCreditNotes","deleteWithNeverInvoice","updateRegistrationRelation","showAddToDraft","openIbanSvc","paymentType","mainBankAccount","companyIBAN","bankAccountNr","changePaymentType","getLinkableDocs","createTransaction","createLink","documentLabel","documentChanged","helpArticles","auditAction","articleNumber","relBudgetSvc","isCombined","getHistory","draftAmount","retrieveBudget","openInvoiceOverview","monthIndex","dates","getDateFilters","openDraftInvoices","endMonth","sentDate","sentOn","sentUser","showCc","showBcc","sentBy","previewMail","write","invoiceImage","loadingPreview","addressLabels","sendTo","generatePreview","isCreditNote","emailTemplatesPromise","cnEmailTemplatesPromise","invoiceEmailAttachmentOptions","invoiceEmailPromise","sendCreditNoteTemplateId","cnTemplates","getAddressLabel","previewError","addToAddress","last","addCcAddress","addBccAddress","emptyValid","uploadAttachment","newAttachments","numbering","sendMails","isFuture","numberZeroInvoices","autoSendInvoices","boundaryPreviousBookyear","lastInvoiceDatePreviousBookyear","boundaryCurrentBookyear","maxDateProp","lastCreditnoteDatePreviousBookyear","endDatePreviousBookyear","dateToNumberChanged","onChanged","todayText","clearText","numberText","cancelText","closeOnSelect","bookyear","setOptions","resetValue","setToday","clearNumber","showSaveButtons","invoicePreviewImage","downloadPdf","transactionIban","updateTransaction","addToDraftInvoice","emptyFilters","hasDateToNumber","draftInvoiceRemovedHandler","refreshProcessingInvoices","reloadProcessingInvoicesInfo","draftInvoiceResource","invoiceLineResource","detailRequests","sendingAll","numberingAll","bookyearInfos","initFilters","showAdvanceFilters","isMultiCompany","billingInformation","processingInvoicesInfo","getProcessingInvoicesInfo","bookyearInfoRequest","countVisibleExtraColumns","extraColumns","retrieveRequest","requestParams","tableParams","reloadKPIs","discountActive","discountAmount","transactionTypeActive","taxCategory","customerTaxCategory","isRemoving","removingStartDate","noReload","customerFilterChanged","cust","kpiRequest","dashboard","discountTypes","toggleDiscount","revertSelectedInvoices","getBatchSelectionParams","loadingGlobalAction","numberAll","errorCount","succeededCount","processed","movedToProcessing","lockInvoice","locked","updating","downloadDraftInvoice","hasAttachment","changeTransactionType","taxExemptionReason","customerTaxExemptionReason","changeIsInvoice","expandDetails","loadingDetails","detailsLoaded","full","deleteInvoiceRequest","neverSettleAdvances","reloadBillableRelations","deleteInvoice","hasSettledAdvances","discountType","canSend","currentDate","gotoInvoice","expand","reloadInvoice","finalizeInvoice","sendViaPeppol","fixErrors","toggleAdvanceFilters","totalInvoices","getBookyearInfo","getPreviousBookyear","getCurrentBookyear","lastInvoiceDateCurrentBookyear","lastCreditnoteDateCurrentBookyear","invoiceIds","createInvoiceReport","requestQueryParams","requestBody","exportRegistrations","canExportRegistrations","showInvoiceAudit","getBillingInformation","hasBillingInformation","showBillingInformation","hasParams","deleteInvoiceLineRequest","draftInvoiceLineResource","invoiceLineId","processServerResult","deleteDetailLineRequest","invoiceRegistrationResource","addInvoiceLine","deleteInvoiceLine","undoLine","updateLineVatRate","saveLine","moveLine","line3","addDetailLine","newDetailLines","saveDetailLine","validateDetailLine","submitDetailLine","deleteDetailLine","undoDetailLine","updateDetailVatRate","detailId","vatAmount","totalExclusive","totalInclusive","originalAmount","adjustedAmount","updatedLines","deletedRegistrationId","deletedLine","otherInvoiceId","resourcesCache","getResourcesForType","taskDetail","isPaid","invoiceDateTo","expiryDateFrom","expiryDateTo","sendStatus","exportStatus","peppolExportStatus","paymentMethod","deliveryFailed","withBillingErrors","pay","todayMin30","setTime","wizardType","isFileSaverSupported","switchInvoiceStrategyToPeppol","refreshTotalsRequest","refreshTotals","urlCompatibleFilters","completed","copyInvoice","creditInvoice","emptyFilter","notExported","downloadSeparatePdf","downloadInvoices","downloading","renderInvoiceDetail","includeNonBillableRegistrations","getSingleCompanyId","loadingExporter","onlyNotExportedInvoices","BASE_URL","containsAlreadyExportedInvoices","exportedUsingAdminConnect","exporterXml","sendInvoiceUseMailEditor","quickSending","p0","mergePdf","openingMergedPdf","batchMarkSent","markingSent","invoicesUpdatedHandler","batchMarkExported","markingExported","batchMarkPaid","markingPaid","batchClearExportStatus","clearingExportStatus","addPayment","otherId","referenceId","editPayment","updateLink","updatePayment","deletePayment","removeLink","removePayment","idx2","showEmailHistory","nrNotSentInvoices","invoicePaymentProvider","unnumberInvoice","hasPaymentProvider","goToInvoice","setHasAttachments","searchRelationOnPeppolNetwork","relationPeppolStatus","currentSendInvoiceStrategy","doSendInvoiceViaPeppol","invoiceUpdatedHandler","updatedInvoice","oldInvoice","createInvoiceLinesReport","selectedInvoiceCompanyIds","invoiceFilters","sendFilters","exportFilters","peppolFilters","billableRegistrations","transactions","unpaidInvoices","refreshAgain","takeNrOfInvoices","getBillableRelations","getTransactions","reloadTransactions","openTransactions","getUnpaidInvoices","reloadUnpaidInvoices","getAccounts","createCashRegister","account","createBankAccount","updateCashRegister","updateBankAccount","accountId","basePaymentUrl","transformArray","closed","closedTransactions","transId","matchAllTransactions","unarchiveTransaction","removeTransaction","paymentId","linkTransaction","filterStorageKey","transactionSources","autoLinkAttempted","dropObject","isClosed","batchDeleteTransactions","queryParams","togglePayments","showPayments","addTransaction","information","dropInvoice","canAutoLink","linkStatus","linkAll","linking","linkMsg","invNr","toggleClosed","companyFilterChanged","invoiceDateOpen","newCustomer","crmTypeDisabled","showKBO","getNotificationTemplateUrl","showMessage","bannerMessage","showUpdateMessage","updateHour","displayCustomMessage","checkIfBannerMessagePresentInLocalStorage","visibleUntil","showVcdmUpdateMessage","startTimeUtc","endTimeUtc","showVcdmEnglish","showVcdmFrench","showVcdmDutch","customMessage","textEn","textFr","textNl","isRealUser","refreshEmployee","enable2Fa","disable2Fa","oldPassword","newPassword","newPassword2","captcha","captchaAction","showCaptcha","grecaptcha","enterprise","sitekey","password","showPhoneNumber","employeeMobilePhone","backupPhone","appName","otpUrl","QrCreator","regDialogsSvc","defered","Hour","Minute","getNextRegistrationTime","registrationResource","sortStorageKey","filterBillable","isBusy","displayDetailsStorageKey","expectedWorkingMinutes","taskStatusCache","displayDetails","getTotalHours","getMissingHours","changeSorting","editRegistration","getDay","editAbsence","originalInteractionDescription","originalInteractionType","originalInteractionTitle","maxTime","createGroup","retrieveTaskStatus","newRegistration","createReg","editOnFail","newReg","resourceText","hasWork","sameDate","createAbsence","newAbsence","updateHomeWorkingMinutes","fillHomeWorkingMinutes","knownStateParams","$locale","filtersInitialised","canViewOthers","canEditOthers","systemUserId","retrieveEmployeeTags","getFilters","retrieveKpis","totalMinutesFormatted","billableAmount","billablePerHour","openRegCount","totalRowCount","selectableCount","initStateParams","hasStateParams","reloadRegistrations","editRegistrationGroup","isBetween","removeRegistrationFromDraft","removingFromDraft","updatedRegistration","addRegistrationToDraft","billedRegistration","oldRelationId","toggleCrmType","canSelect","batchUpdateField","boolValue","batchBillRegistrations","canEditTask","hasPlannedTaskPermission","hasTodoPermission","canSave","regResource","usedResources","isCost","taskData","mainData","subTemplateName","mainTemplateName","tasksWithTemplate","tasksWithoutTemplate","replaceWith","replacements","canCreateResource","canCreateAbsence","translationResult","showEditGroupDialog","showEditDialog","showAbsenceDialog","newRegistrationGroup","newCategory","newSubResource","deleteResourceCategory","emptyDescription","toggleDropdown","durationInDays","durationInDaysChanged","retrieveAbsenceCounter","absenceCounter","hideFromUntil","hideDuration","hidePriceDiscount","hideBillable","hideQuantity","hideRemarks","hideDate","hideInteractions","retrieveInteraction","loadResources","calculateDurationInDays","durationDaysInfo","durationDaysEndDate","calcDurationInDaysRequest","hoursInDays","maxDuration","interactionChanged","toggleMode","handleMenuToggle","crmTypeFilter","timerButtonCtrl","rejectFunc","tmr","subscription","refreshRunningRegistration","restart","stop","translateResource","trace","toggleResourceHistory","addCategory","showDeleteCategoryDialog","deleting","updateVatRate","addResource","updateForfaitStatus","updateCrmType","updateUseCounter","http","fromString","taskPlanningSection","editName","templateRequired","assignments","invoiceSteamId","resetShowScheduleDate","saveTaskSchedules","withErrors","planningError","sectionStatus","refreshSection","retrievingInfo","dpDateOpen","dpDateClosed","dpCap","bankAccountTypes","bank","bankName","bankAccountType","dateOpened","dateClosed","dateCap","fillBankInfo","bankForm","streamId","existingSchedules","notApplicableTemplates","scheduleExists","linkTypesHiddenFor","searchOptionsForLinkType","9","11","representedByWizardOptions","allowedRelTypes","representedBySearchOptions","relationSearchOptions","isNetherlandsConfiguration","netherlandsMate","netherlandsDirector","netherlandsAssociate","commonLinkTypes","selectedCommonLinkTypes","relationLink","extraValues","positions","partnershipTypes","marriageRegimes","popertyRights","propertyRight","loadShareholderGroups","showOtherCommonLinkTypes","excludeCurrentLinkType","commonLinkType","commonLinkTypeSelectionChanged","toRelation","validateRepresentedBy","invalidRepresentedBy","representedByRelation","validateIsPortalUser","isPortalUser","toRelationId","fromRelationId","transformed","createAsAdditionalCompanyOwnerPositions","createAsAdditionalLinkTypes","openNewRepresentedByDialog","votesChanged","sharesChanged","votes","shares","$httpParamSerializer","identificationTemplateId","beneficiaryTemplateId","derivedClientResearchTemplateId","riskTemplateId","companyTrusteesTemplateId","personTrusteesTemplateId","selectedTrustees","isNlTenant","hasCustomTags","amlStatus","identificationTemplates","beneficiaryTemplates","riskTemplates","companyTrusteesTemplates","personTrusteesTemplates","derivedClientResearchTemplates","templateTags","hasQrCodeTag","companyTrustees","companyTrusteesSelected","personTrustees","personTrusteesSelected","getStatus","trustees","getGenerateModel","oldTag","canGenerate","systemTemplate","loadingTags","generateAndEditDocuments","streamResource","useDefault","searchResource","invoicestream","hasInvoiceTeamAccess","invoiceTemplates","detailTemplates","creditNoteTemplates","invoiceTemplateMismatch","detailTemplateMismatch","creditNoteTemplateMismatch","autosendPaymentReminders","loadMismatchTemplate","checkMismatchTemplate","loadInvoiceTemplates","invoiceDocumentTemplateId","invoiceDetailDocumentTemplateId","creditNoteDocumentTemplateId","loadAddresses","loadPriceGrids","adminCostMethodChanged","showResetTaskUserModal","checkUserChanged","changedUsers","userProfiles","updateModels","userProfile","prevPromise","relTypeDisabled","countryDisabled","formReady","scheduleRequest","viaRelations","registrationRequest","isGMValid","gmType","mapLine","fiscalYearStart","generalMeeting","generalMeetingPostponed","invalidGM","invalidGMPostponed","reloadRelationData","history","getPostponedDateOptions","getGMDateOptions","getEFYDateOptions","retrieveHistory","newDate","mDate","fiscalYearId","recalcFiscalYearDeadlines","documentsAccessor","documentsChanged","onDocumentsChanged","realEstates","selectedRealEstate","setupViewModels","reference","professionalUsePercentage","endUser","vatDeductionPercentage","endUserName","realEstateId","endUserChanged","uploadNewDocuments","changed","creditInstitution","repaymentAmount","repaymentMonths","cadastralIncome","monthlyRent","parcelNumber","dateOfFirstUse","fuelType","brandAndModel","purchaseDate","saleDate","firstRegistrationDate","licensePlate","co2","co2WLTP","catalogValue","purchaseValue","hasEmptyTags","generating","validatingTemplate","desiredDocumentId","uuidv4","generate","downloadingPdf","preparingEmail","openEmailDialog","loadLinkedRelations","activeRelationLinks","mandateEndDate","representedBy","assignmentStartDate","emptyTags","removeAdvances","hasChanges","recalcYears","mapBudget","saveBudget","newBudget","deleteBudget","addBudget","percentageAmount","percentageHours","mapScheduleLine","invoiceTextType","isHistory","isCurrentSchedule","historyEnabled","showTaskInfo","streamAmount","showInvoiceTextInfo","hasLinesFromOlderSchedules","showInvoice","loadInvoiceTexts","ignoreDateCheck","reprocessLine","openTask","forInvoicingVia","isInvoicingVia","originalHasInvoicingVia","invTypeCnt","updateInvoiceStream","originalInvoicingType","loadSchedules","invoicingViaRelation","hasUnsettledAdvances","removeUnsettledAdvances","validateTemplate","invoicingViaRelationChanged","clearInvoicingVia","plannedReg","regType","planned","regSettings","startDateOptions","regTypeChanged","plannedRegistration","taskSaved","plannedTaskStatus","uploadEid","attachmentSigningStatusUpdates","taskModel","regModel","oldInvoiceStreamId","newInvoiceStreamId","signed","fileUploaded","scheduledHour","scheduledMinute","signingProvidersWithDelayedSending","setDate","setHours","delayedSendingEnabled","customEmailEnabled","signingCandidatesPromise","signingCandidates","refreshEmail","formatWithLeadingZero","containsSelfSignature","initAppendSignatures","addSigner","removeSigner","setSigner","creating","modalLoaded","getInvoicedRelations","cxRelFile","setRelationFile","relationFile","refreshOpenSections","showUploadSpinner","triggerChanged","$documents","isSaveNew","showInactiveLoans","isInactive","inactiveFilter","showInactiveVehicles","showFiscalYearsDialog","periodFrom","periodUntil","checkInvoiceTeamAccess","recalcInvTypeCnt","showInvoicingViaColumn","setDefaultStream","defaultStream","reloadBudget","loadBudgets","doDeleteActiveSchedule","updateFunction","fieldHadValue","deleteExistingLines","updatedModel","showPlannedSchedules","showAuthResources","showInvoiceStreamSettings","showBillingSettings","addAssignment","deleteAssignment","editAssignment","relStream","updatedRelStream","deleteActiveSchedule","deletingActiveSchedule","budgetFrom","budgetUntil","showBudgetDialog","invoicedRelations","showAllInvoicedRelations","showInvoicingVia","selectedInvoiceStream","mainInvoiceStream","hasInvoicingViaForMainInvoiceStream","hasMoreInvoicedRelations","seeAllInvoicedRelations","onShowAllInvoicedRelationsClosed","getInvoiceStreams","invoiceStreamChanged","mapPlanning","editRegTemplate","addPlannedRegistration","refreshCompliancy","compliance","sectionContainsField","lists","moreActionsRunning","companyWebEnabled","companyInfoEnabled","openTheBoxEnabled","estoxEnabled","kboEnabled","hasDapas","listeningOnDocumentUpdate","showCompliancy","showBudgetInfo","searchProviders","hasTwikey","hasMollie","hasGrub","getRelationKPIData","numberOfTasks","totalTasks","numberOfTodos","totalTodos","expiredTodos","allExpired","anyExpired","eidPhotoDocumentId","lastContactDate","findFieldInSections","mainSection","subSection","ss","fieldIdArg","retryCount","customAnchor","fieldInfo","sectionConfigKey","openSection","collapsedSections","goToSectionLinks","getAddress","filterEmpty","complianceUpdateHandler","relationDocumentProcessedHandler","getPhone","contactPhone","contactEmail","openInteractionsMailModal","getMobile","contactMobile","toggleDashboard","isDashboardCollapsed","calcCompleteness","missingFields","firstId","openSections","entries","refreshSections","gotoCompliancyField","openTwikeyContractTemplateModal","openMollieDirectDebitDialog","CreateExternalRelationInPartnerApplication","platform","toggleComplianceInapplicable","createDocument","uploadingFiles","fileInfo","numberOfDocuments","expandAllSections","loadSections","collapseAllSections","updateFromExternalProvider","actionName","updateFromEstox","updateFromCompanyWeb","updateFromCompanyInfo","updateFromOpenTheBox","updateFromKBO","updateFromConnectPlatform","showInvoiceHistory","disableCreateRegistration","getBudgetInfo","relationBudget","createTodo","onCreateTodoModalClosed","onCreateTodoModalSaved","linksFieldId","newAuth","showErrors","addNewAuth","newAuthForm","signedBy","validUntil","relTypes","setCardInfo","kbo","getWidgetClass","getWidgetValueClass","optionalKpis","originalDocumentId","documentDeletedHandler","uploadDocument","scanned","foreach","hasEidFeature","openEidDialog","countryEditorOpened","handleServerResponse","addBank","oldMain","setDomiciliation","setPitRefund","relSearch","goToRelation","keyUp","toggleExpand","valueClass","mapTaskSchedule","modalConfig","planNow","planningNow","editDeviations","showPlanning","changeAssignment","newInvoiceStream","editRemark","snapshotOverview","saveRemote","mapSnapshotLine","mapSnapshot","highlightRelation","showRelativePercentages","getDocumentInfo","documentInfo","setShowRelativePercentages","relativeSharesPercentage","relativeVotesPercentage","initializeOverview","snapshotDates","snapshots","latestSnapshot","currentSnapshotDate","setResponsibilityType","setOnlineSinceDate","updateSnapshot","executeVerification","creatingSnapshot","selfResponsibleForUbo","onlineSinceDate","removeDocument","oldDocumentId","markSnapshotEnteredOnline","markSnapshotRevisionOk","deleteSnapshot","snapshotDateChanged","uploadingDocument","uboResponsibilityType","userOptions","searching","defId","teamField","hasTeams","availableCompanies","companyDisabled","showEID","searchProvidersFormatted","setSearchCriteriaString","getWizardFields","inValid","focusFirstField","searchCriteriaString","getSimilarRelations","validateRequiredFields","filterFields","rsinNumber","bsnNumber","fieldsToSave","teamsField","externalRelationSearchResult","externalRelationSearchTerm","searchExternalRelation","officialName","searchProviderChanged","externalRelationSearch","openExternalRelationSearchDialog","selectionChanged","sourceType","externalRelationSearchInputKeyUp","doCreateRelation","relFileCtrl","extractFieldsFromSection","parentSections","mainSectionId","parentInfo","isList","lastSection","reloadFields","mapLink","linksPerType","rebuildLinksPerType","addRelationLink","openRelationLinkDetails","singleOtherLink","otherLinks","partnershipType","retrieveModel","retrievingModel","retrieveFromEstox","retrievingFromEstox","searchRelationInPeppolNetwork","mapStatus","originalTodo","statusResult","isPastDeadline","isNearingDeadline","mapTodo","onStatusChanged","todos","openTaskModal","requestParameters","naceCodeString","addNaceCode","newNaceCode","submitNewNaceCode","cancelPromise","openAddress","callBacks","openAddressFunction","callBackFunc","forceReload","defaultOpenSections","dataOnly","defaultOpen","updateFieldTypes","fieldTypes","clearCache","changeState","reloadState","sectionsToLoad","teamSecurityCode","loadedSections","maxBudgetUsed","maxPercentage","pbClass","pbPercentage","pbStyle","resourceFactory","fieldReqResource","fieldToSave","dateToSave","relationsUsingAccountingNr","relationsUsingCustomerCode","canUpdateInvoiceDiscounts","delFunc","doRemove","getRequiredFields","getSimilar","name2","fromDb","listOfFields","t2","toDb","activeCompany","ownCompanyRelations","notVatLiable","enterpriseNumberForm","profassnumber","setActiveCompany","handleKeyUp","submitVat","showSuccess","foundInKBO","ownCompanyRelationChanged","openBankAccountsDialog","showCreateCompanyModal","validation","filterTags","selectableDocumentTypes","unselectableDocumentTypes","loadSelectableDocumentTypes","templateContextChanged","taskParameterPlaceholders","sortLanguages","currentLang","saveLanguages","validateLanguages","mapValidationError","toggleOpen","gotoList","subTaskName","saveFirst","validating","navigateAway","addLanguage","filterLanguages","showPlaceholders","settingsDialogsSvc","exampleLanguage","documentSettings","absenceRelation","isProduction","savingComplianceSettings","hideLedgerSetting","minimumDateOptions","releaseDate","createdOn","companyUpdatedHandler","complianceSettings","complianceSettingsCol1","complianceSettingsCol2","attachResources","hrmSettings","VATPercentages","defaultTaskResource","openRecognitionOptions","magicMailAllowedRecognitionSenders","submitDocSettings","openCreateEmailDomain","suggestedEmailDomain","companyEmail","emailDomain","domain","openCnameInfoDialog","openDeleteEmailDomain","emailUseCustomFrom","verifyEmailDomain","verifying","customFromEnabled","registrationMinimumDate","absenceMinimumDate","templateSendInvoice","submitHrmSettings","propagateLedgerChanges","translateInvoiceText","translateAdminCostText","emailRemark","updateComplianceSetting","shouldTrack","getDefaultTranslationForEmployeeProfile","translateEmployeeProfile","absenceRelationChanged","editEmailSignatures","openEmailSignaturesDialog","displayReplyToType","displaySenderNameType","newInvoiceText","editInvoiceText","newItem","changeLanguage","deleteInvoiceText","saveFilters","contextChanged","applyFilters","clean","dueDateOffsetDays","frequencyDays","editing","saveNew","newReminder","newReminderForm","attachCostResource","costResource","costResourceId","mailTemplate","mailTemplates","uploadingSnippet","countPlannedTasksUpdated","updateTaskTemplates","showPropogateDialog","PropogateTemplateChanges","editTaskTemplate","copyTaskTemplate","newTask","addSubtask","addSubTaskTemplate","propagate","editSubTask","deleteSubTask","updatePriority","newPriority","moveSubtask","openTranslation","hasMailTypes","openTaskSchedules","periodicityCount","openParameterDefinitions","openTaskParameterDefinitions","parameterCount","exportSnippet","exportTaskTemplateSnippet","uploadSnippet","importTaskTemplateSnippet","taskResult","getTagsTooltip","getRequiredDocumentTypesTooltip","requiredDocumentTypes","openRequiredDocumentTypes","editTaskTemplateRequiredDocumentTypes","openTags","editTaskTemplateTags","emailTemplate","stackedLabelRegex","mapTmpLicense","handleInfoResponse","activateLicense","modules","nrLicenses","minNrLicenses","promoCode","billingPeriod","billingPeriods","totalLicenses","paymentInformation","licensePrices","perRelationPrice","bucketPrice","prices","quantityFrom","BucketsQuantityIncluded","quantityIncluded","p1","extraQuantity","extraAmount","extraPrice","nrBuckets","bucketSize","pricePerRelation","baseTranslationValues","extraTranslationValues","QuantityIncluded","Buckets","BucketSize","nextBillingPeriod","recalcTotals","changeBillingPeriod","basePrice","billPerRelation","billPerRelationBucket","reloadLicenseInfo","paymentProviderTranslated","changePaymentMethod","paymentProvider","nrLicensesChanged","addTempLicense","deleteTempLicense","CollapsedStorageKey","initialize","exampleTemplatesCollapsed","invoiceSampleTemplates","sampleTemplates","creditNoteSampleTemplates","showActionSpinner","showEditTemplate","mapTemplate","activeOnly","collapseExamples","editTemplate","showArrayBufferError","retrieveDocumentTemplates","filtersInStorage","tableFilters","invoiceTemplate","activateTemplate","activating","activationResult","activatedDocumentTemplate","activatedTemplate","deactivatedDocumentTemplate","deactivatedTemplate","documentTemplateId","documentUrl","sampleTemplateId","sampleTemplateType","previewExample","previewSample","downloadDocumentation","downloadSample","sample","openEdit","getDisabledStyles","deadlineDeviation","taskTypeChanged","propogateTemplateChanges","nextYear","deadlineDeviationFactor","planningDeviation","dayOfWeek","numberOfWeeks","dayMonth","planningDate","temporaryLicensePrice","regenerateInDraftInvoices","showInvoiceTextDialog","addTaskSchedule","copyTaskSchedule","accountDetails","accountNumber","templateUploaded","deleteLineCall","deleteTasks","planningButtonDisabled","lineTypes","fodUrl","getAllowedLineTypes","calcPlanningDate","isLocked","cleanupMonths","addNewLine","date1","addSchedule","translateSchedule","getPlanningDateOptions","planTasks","getCleanupMonthsLabel","getCleanupMonthsLabelForColumn","getCleanupMonthOptions","updateCleanupMonths","showReferenceYearOnLine","referenceYearTypePlaceholder","referenceYearType","addParameterContinuation","parameterDefinition","openDefinitionOptions","openNewParameterDefinitionDialog","openNewRelationFieldDefinitionDialog","deleteDefinition","parameterId","systemParameterValueTypes","systemParameterType","numeric","boolean","selectionList","systemParameterTypeChanged","systemParameter","computedParameterTypeChanged","computedParameter","addSelectionItem","onSelectionItemChanged","existingTypes","relationFieldTypeChanged","domainRequest","emailDomainResponse","verify","openEmailEditor","signatures","hasMails","hasParameters","hasPeriodicities","exportMails","exportPeriodicities","exportParameters","exportWorkflows","formatSource","taskPeriodicities","hasWorkflows","workflows","hasTimeResources","timeResources","hasCostResources","hasUsers","mailTemplateActions","canImport","originalId","importMailTemplates","importPeriodicities","importTaskParameters","importWorkflows","matchingUser","snippetImportId","nameCheckError","hasNewMailTemplates","checkNameCanceller","checkName","magicMailAllowedRecognitionSendersArray","addEmail","orgSelectedTags","removeSelectionItem","selectionItemUpdate","originalBankAccounts","bankAccountsToDelete","bankAccountsToUpdate","newBankAccounts","addBankAccount","deleteBankAccount","bankAccount","foundInToUpdate","foundInBankAccounts","newBankAccount","bankAccountChanged","setBankAccountAsMain","oldBankAccount","updatedBankAccounts","bankAccountId","deletedBankAccounts","orgSelectedDocumentTypes","documentTypesChanged","costParameterDefinitionId","costRegistrationUserId","isDocumentationEmpty","innerHTML","textContent","cleanValue","lowerBound","oValue","unassignedLabel","translateProfiles","getProfileLabel","prof","getUnassingedLabel","handleEmpty","isEmpty","toggleClass","translateSvc","fNotTranslated","fInvalidKeys","showModifiedDates","showScanInfo","showDefaultValue","allLanguages","selectedLanguages","filterTranslations","showNotScanned","lastScanned","containsLineEnd","inherited","reloadTranslations","addKey","prompt","lastModified","saveLabel","removeTranslation","removeLabel","fSimilar","fInherited","fListName","allTranslations","listNames","showKey","getLists","removeList","saveList","defs","runningJobs","existingJob","isJobRunning","protocol","oidc","Log","logger","setDefaultLevel","setLevel","UserManager","appendScript","async","script","appendChild","rej","clearStaleState","addAccessTokenExpired","addSilentRenewError","ccc","beamerConfig","product_id","lazy","user_email","user_id","configScript","urlScript","instrumentationKey","loadAppInsights","addTelemetryInitializer","envelope","baseType","baseData","tenant","setConfig","bootstrap","strictDi"],"mappings":"4FAIA,SAASA,EAASC,EAAYC,GAC5B,MAA0B,UAAtB,OAAOD,GAA2BA,EAAWE,WAAW,IAAtB,GAA+BF,EAAWG,SAAS,IAApB,EAE5DF,EAGmB,UAAxB,OAAOA,EAEF,CAACD,EAGkB,WAAxB,OAAOC,EAdM,WADGG,EAiBEJ,IAhBgB,MAAVI,GAA2B,OAAVA,GAAyB,CAAC,CAACA,EAoBjEJ,CACR,CAMD,IAAMK,EAAaC,OAAOC,SAASC,OAG7BC,EAAcV,EAAS,kBAAmB,OAApB,EAYtBW,EAVgB,CACpBC,MAAO,MACPC,YAAa,MACbC,IAAK,MACLC,WAAY,MACZC,IAAK,MACLC,WAAY,MACZC,IAAK,MACLC,IAAK,KARe,EAUUT,EAAYU,YAAZ,IAA8B,MAExDC,EAAU,CACdC,SAAUtB,EAAS,mBAAoBuB,iCAArB,EAClBC,cAAexB,EAAS,uBAAwBuB,yCAAzB,EACvBE,MAAOzB,EAAS,eAAgBuB,iCAAjB,EACfG,UAAW1B,EAAS,mBAAoBuB,qCAArB,EACnBI,mBAAoB3B,EAClB,8BACAuB,+CAF0B,EAI5BK,gBAAiB5B,EAAS,2BAA4BuB,6CAA7B,EACzBM,KAAM7B,EAAS,eAAgBuB,gCAAjB,EACdO,QAAS9B,EAAS,kBAAmBuB,oCAApB,EACjBQ,WAAY/B,EAAS,kBAAmBuB,8CAApB,EACpBS,QAAShC,EAAS,kBAAmBuB,mCAApB,EACjBU,UAA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mBACJE,eAAgB,wCACpB,EACAy+H,8BAA+B,CAC3B3+H,GAAI,gCACJE,eAAgB,sJACpB,EACA06H,mBAAoB,CAChB56H,GAAI,qBACJE,eAAgB,uBACpB,EACA8/F,MAAO,CACHhgG,GAAI,QACJE,eAAgB,OACpB,EACA44E,SAAU,CACN94E,GAAI,WACJE,eAAgB,UACpB,EACA07H,iCAAkC,CAC9B57H,GAAI,mCACJE,eAAgB,uCACpB,EACA8oD,SAAU,CACNhpD,GAAI,WACJE,eAAgB,UACpB,EACAo6H,kBAAmB,CACft6H,GAAI,oBACJE,eAAgB,mBACpB,EACArG,KAAM,CACFmG,GAAI,OACJE,eAAgB,MACpB,EACA62E,UAAW,CACP/2E,GAAI,YACJE,eAAgB,WACpB,EACAu7H,oBAAqB,CACjBz7H,GAAI,sBACJE,eAAgB,qBACpB,EACA4nD,IAAK,CACD9nD,GAAI,MACJE,eAAgB,KACpB,EACA6nD,GAAI,CACA/nD,GAAI,KACJE,eAAgB,IACpB,EACAouF,iBAAkB,CACdtuF,GAAI,mBACJE,eAAgB,kBACpB,EACAs7H,mBAAoB,CAChBx7H,GAAI,qBACJE,eAAgB,oBACpB,EACAq7H,YAAa,CACTv7H,GAAI,cACJE,eAAgB,aACpB,EACAm7H,kBAAmB,CACfr7H,GAAI,oBACJE,eAAgB,mBACpB,EACAo7H,gBAAiB,CACbt7H,GAAI,kBACJE,eAAgB,iBACpB,EACAw5D,aAAc,CACV15D,GAAI,eACJE,eAAgB,cACpB,EACAg6H,QAAS,CACLl6H,GAAI,UACJE,eAAgB,+BACpB,EACA+5H,UAAW,CACPj6H,GAAI,YACJE,eAAgB,4CACpB,EACAguF,cAAe,CACXluF,GAAI,gBACJE,eAAgB,eACpB,EACAk6H,aAAc,CACVp6H,GAAI,eACJE,eAAgB,cACpB,EACA46H,SAAU,CACN96H,GAAI,WACJE,eAAgB,UACpB,EACA45H,aAAc,CACV95H,GAAI,eACJE,eAAgB,+DACpB,EACAq+H,wBAAyB,CACrB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B,MAAO,wBACPgsB,aAAc,EACdrmC,aAAc,IAClB,EACA,CACIlR,IAAK,6EACLurB,MAAO,oBACPgsB,aAAc,EACdrmC,aAAc,IAClB,EACA,CACIlR,IAAK,uEACLurB,MAAO,eACPgsB,aAAc,EACdrmC,aAAc,IAClB,EACA,CACIlR,IAAK,+EACLurB,MAAO,qBACPgsB,aAAc,EACdrmC,aAAc,IAClB,EACA,CACIlR,IAAK,+EACLurB,MAAO,qBACPgsB,aAAc,EACdrmC,aAAc,IAClB,EACA,CACIlR,IAAK,0EACLurB,MAAO,kBACPgsB,aAAc,GACdrmC,aAAc,KACd4qN,iBAAkB,CAAC,EACvB,EACA,CACI97N,IAAK,6EACLurB,MAAO,kBACPgsB,aAAc,GACdrmC,aAAc,KACd85G,cAAe,CAAC,EACpB,EACA,CACIhrH,IAAK,oFACLurB,MAAO,yBACPgsB,aAAc,GACdrmC,aAAc,KACd85G,cAAe,CAAC,EACpB,EACA,CACIhrH,IAAK,0FACLurB,MAAO,2BACPgsB,aAAc,GACdrmC,aAAc,IAClB,EACA,CACIlR,IAAK,sFACLurB,MAAO,kCACPgsB,aAAc,GACdrmC,aAAc,KACd85G,cAAe,CAAC,EACpB,EACA,CACIhrH,IAAK,oGACLurB,MAAO,yCACPgsB,aAAc,GACdrmC,aAAc,KACd85G,cAAe,CAAC,EACpB,EAEA,CACIhrH,IAAK,oFACLurB,MAAO,0BACPgsB,aAAc,EACdrmC,aAAc,IAClB,EACA,CACIlR,IAAK,sFACLurB,MAAO,4BACPgsB,aAAc,EACdrmC,aAAc,IAClB,EACA,CACIlR,IAAK,gFACLurB,MAAO,oBACPgsB,aAAc,EACdrmC,aAAc,IAClB,EACA,CACIlR,IAAK,sEACLurB,MAAO,eACPgsB,aAAc,EACdrmC,aAAc,IAClB,EACA,CACIlR,IAAK,gFACLurB,MAAO,sBACPgsB,aAAc,EACdrmC,aAAc,IAClB,EACA,CACIlR,IAAK,kFACLurB,MAAO,wBACPgsB,aAAc,EACdrmC,aAAc,IAClB,EACA,CACIlR,IAAK,sFACLurB,MAAO,0BACPgsB,aAAc,GACdrmC,aAAc,IAClB,EACA,CACIlR,IAAK,2FACLurB,MAAO,6BACPgsB,aAAc,GACdrmC,aAAc,IAClB,EAEA,CACIlR,IAAK,gFACLurB,MAAO,sBACPgsB,aAAc,EACdrmC,aAAc,IAClB,EACA,CACIlR,IAAK,iFACLurB,MAAO,uBACPgsB,aAAc,EACdrmC,aAAc,IAClB,EACA,CACIlR,IAAK,4EACLurB,MAAO,kBACPgsB,aAAc,EACdrmC,aAAc,IAClB,EACA,CACIlR,IAAK,wEACLurB,MAAO,gBACPgsB,aAAc,EACdrmC,aAAc,IAClB,EACA,CACIlR,IAAK,kFACLurB,MAAO,wBACPgsB,aAAc,EACdrmC,aAAc,IAClB,EACA,CACIlR,IAAK,mFACLurB,MAAO,yBACPgsB,aAAc,EACdrmC,aAAc,IAClB,EACA,CACIlR,IAAK,8EACLurB,MAAO,oBACPgsB,aAAc,GACdrmC,aAAc,IAClB,EAER,EACA,CACIysB,SAAU,sBACVlyB,QAAS,GAAS8uN,oBAClBhsM,MAAO,CAEH,CACIvuB,IAAK,wHACLurB,MAAO,6BACPgsB,aAAc,GACdrmC,aAAc,IAClB,EACA,CACIlR,IAAK,4HACLurB,MAAO,iCACPgsB,aAAc,GACdrmC,aAAc,IAClB,EAEA,CACIlR,IAAK,yHACLurB,MAAO,gCACPgsB,aAAc,GACdrmC,aAAc,IAClB,EACA,CACIlR,IAAK,2IACLurB,MAAO,gDACPgsB,aAAc,GACdrmC,aAAc,IAClB,EAER,EACA,CACIysB,SAAU,mBACVlyB,QAAS,GAAS+uN,iBAClBsB,iBAAkB,CAAC,GACnBvtM,MAAO,CAEH,CACIvuB,IAAK,kJACLurB,MAAO,2DACPgsB,aAAc,EACdrmC,aAAc,IAClB,EACA,CACIlR,IAAK,kKACLurB,MAAO,qEACPgsB,aAAc,EACdrmC,aAAc,IAClB,EACA,CACIlR,IAAK,oIACLurB,MAA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B+0O,SAAS,oBAAqB,CACrDzsQ,OACAC,WAFqD,CAAvD,EAKAtE,IAAYqnV,UAAU,CACpBhjV,OACAC,WAFoB,CAAtB,EAKAwhV,IAAa,GAAD,OAAIxpV,KAAOnB,QAAQgB,QAAnB,iCAA0D2I,KAC9DooD,GACN,SAAAxtD,GACEuG,QAAQvG,MAAMA,CAAd,CACD,CAJH,EAOAq9O,IAAyB3zB,KAAzB,EAEAvyL,IAAQywT,UAAUj0S,SAAU,CAAC,UAAW,CACtCk0S,SAAU,EAD4B,CAAxC,GA9EAjjV,IAAQw2P,eAAe,CACrB/qP,MAAO,CACL/R,IAAK3D,OAAOC,SAASy2C,IADhB,CADc,CAAvB,CAkFH,CApFD,EAwGIz0C,KAAOC,iBAA8C,SAA3BD,KAAOC,iBACnCupV,IAAaxpV,KAAOC,eAAR,EAIdupV,IAAa,+CAAD,OACqCxpV,KAAOW,aAD5C,gCAEV,EAFU,EAIZ6oV,IACE,sFACA,EAFU,EAIZA,IAAa,iEAAkE,GAAM,EAAzE,EAEZA,IAAa,uDAAwD,EAAzD,EAEe,UAAvBxpV,KAAO9B,cACHC,EACmB,gBAAvB6B,KAAO9B,YACH,MACuB,eAAvB8B,KAAO9B,YACP,MACA,MAEN64C,SAASi3P,MAAT,qCACgC7vS,EADhC,sFAKA44C,SAASi3P,MACP,yIADF,E","file":"static/js/main.6b05bb86.chunk.js","sourcesContent":["function parseBoolean(value) {\n return value === 'false' || value === '0' || value === 'no' ? false : !!value;\n}\n\nfunction setValue(substitute, defaultValue) {\n if (typeof substitute === 'string' && substitute.startsWith('__') && substitute.endsWith('__')) {\n // still replacement tag, return default\n return defaultValue;\n }\n\n if (typeof defaultValue === 'number') {\n // Numbers\n return +substitute;\n }\n\n if (typeof defaultValue === 'boolean') {\n // Booleans\n return parseBoolean(substitute);\n }\n\n // string\n return substitute;\n}\n\n// Because we want to be able to use https://staging.adminpulse.be & https://app.adminpulse.be\n// Without having to rebuild our bundle, use the current window location URL as\n// API and app endpoint. This should work because the main API is hosted on the same endpoint as our\n// app which will be either staging.adminpulse.be or app.adminpulse.be\nconst currentUrl = window.location.origin;\n\nconst buildType = process.env.NODE_ENV;\nconst environment = setValue('__ENVIRONMENT__', 'local');\n\nconst domainMapping = {\n local: 'dev',\n development: 'dev',\n dev: 'dev',\n acceptance: 'acc',\n acc: 'acc',\n production: 'app',\n app: 'app',\n prd: 'app',\n};\nconst subdomain = domainMapping[environment.toLowerCase()] || 'app';\n\nconst appUrls = {\n identity: setValue('__IDENTITY_API__', process.env.REACT_APP_IDENTITY_API),\n notifications: setValue('__NOTIFICATION_API__', process.env.REACT_APP_NOTIFICATION_API),\n tasks: setValue('__TASK_API__', process.env.REACT_APP_TASK_API),\n documents: setValue('__DOCUMENT_API__', process.env.REACT_APP_DOCUMENT_API),\n documentsConverter: setValue(\n '__DOCUMENTS_CONVERTER_API__',\n process.env.REACT_APP_DOCUMENTS_CONVERTER_API,\n ),\n documentSigning: setValue('__DOCUMENT_SIGNING_API__', process.env.REACT_APP_DOCUMENT_SIGNING_API),\n jobs: setValue('__JOBS_API__', process.env.REACT_APP_JOBS_API),\n connect: setValue('__CONNECT_WEB__', process.env.REACT_APP_CONNECT_WEB),\n connectApi: setValue('__CONNECT_API__', process.env.REACT_APP_CONNECT_API),\n signalr: setValue('__SIGNALR_API__', process.env.REACT_APP_SIGNALR_API),\n reporting: setValue('__REPORTING_API__', process.env.REACT_APP_REPORTING_API),\n api: setValue('__ADMIN_PULSE_API__', process.env.REACT_APP_MAIN_API),\n audit: setValue('__AUDIT_API__', process.env.REACT_APP_AUDIT_API),\n interactions: setValue('__INTERACTIONS_API__', process.env.REACT_APP_INTERACTIONS_API),\n app: currentUrl,\n storage: `https://${subdomain}.adminpulse.be`, // Frontend storage\n};\n\nif (currentUrl.endsWith('.nl')) {\n for (const key in appUrls) {\n if (typeof appUrls[key] !== 'string' || key === 'identity') continue;\n\n appUrls[key] = appUrls[key].replace('.be', '.nl');\n }\n}\n\nconst config = {\n environment,\n inlineManualUrl: setValue('__inlineManualUrl__', process.env.REACT_APP_INLINE_MANUAL_URL),\n appInsightsKey: setValue('__appInsightsKey__', process.env.REACT_APP_APP_INSIGHTS_KEY),\n buildVersion: setValue('__BUILDVERSION__', `local_${new Date().getTime()}`),\n\n logLevel: process.env.REACT_APP_LOG_LEVEL || 'debug',\n buildType,\n version: process.env.BUILD_VERSION,\n googleApiKey: setValue('__GOOGLE_API_KEY__', process.env.REACT_APP_GOOGLE_API_KEY),\n appUrls,\n recaptchaKey: '6LeLPzEpAAAAAKr4K_NJN01df8c3QnOkKWR8sd0s', // this is not a secret\n auth: {\n authority: appUrls.identity,\n client_id: 'js',\n redirect_uri: `${appUrls.app}/Callback/Login`,\n response_type: 'id_token token',\n scope: 'openid profile api1',\n silent_redirect_uri: `${appUrls.app}/Callback/SilentLogin`,\n automaticSilentRenew: true,\n post_logout_redirect_uri: appUrls.app,\n },\n\n features: {\n // names should be lowercase\n },\n};\n\nexport default config;\n","export class RequestError extends Error {\n constructor(response, url) {\n super(`Bad server response [${response.status}]`);\n\n if (typeof Error.captureStackTrace === 'function') {\n Error.captureStackTrace(this, RequestError);\n }\n this.status = response.status;\n this.data = response.data;\n this.headers = response.headers;\n this.url = url;\n }\n}\n\nexport class NoConnectionError extends Error {\n constructor() {\n super('Connection to the server failed');\n if (typeof Error.captureStackTrace === 'function') {\n Error.captureStackTrace(this, NoConnectionError);\n }\n }\n}\n","// https://github.com/axios/axios (Promise based HTTP client for the browser and node.js)\nimport axios from 'axios';\nimport eventBus from 'pubsub-js';\nimport qs from 'qs';\nimport RequestLoadingAnimationService from '@/shared/services/RequestLoadingAnimationService';\nimport config from '../config';\nimport { RequestError, NoConnectionError } from './errors';\nimport AuthService from './services/AuthService';\n\nconst instance = axios.create({\n // paramsSerializer: {\n // indexes: null\n // },\n baseURL: config.appUrls.api,\n timeout: 50000,\n});\n\ninstance.defaults.paramsSerializer = params => qs.stringify(params, { arrayFormat: 'repeat' });\n\nlet xhrCreations = 0;\nlet xhrResolutions = 0;\n\nfunction isLoading() {\n return xhrResolutions < xhrCreations;\n}\nfunction updateStatus() {\n if (isLoading()) RequestLoadingAnimationService.showSmallLoadingAnimation();\n else RequestLoadingAnimationService.hideSmallLoadingAnimation();\n}\n\ninstance.interceptors.response.use(\n successRes => {\n xhrResolutions++;\n updateStatus();\n return successRes;\n },\n error => {\n xhrResolutions++;\n updateStatus();\n return Promise.reject(error);\n },\n);\n// Add a request log interceptor\ninstance.interceptors.request.use(requestConfig => {\n xhrCreations++;\n updateStatus();\n const token = AuthService.getToken();\n // this is required in order to make arrays work in querystrings on our backend API to transform\n // ownCompanies[]=1&ownCompanies[]=2 into ownCompanies=1&ownCompanies=2\n //requestConfig.paramsSerializer = params => qs.stringify(params, { arrayFormat: 'repeat' });\n requestConfig.headers.Authorization = `Bearer ${token}`;\n return requestConfig;\n});\n\n// Add error transform interceptor\ninstance.interceptors.response.use(\n response => response,\n error => {\n // Don't log cancelled requests\n if (axios.isCancel(error)) return Promise.reject(error);\n\n if (\n error.config &&\n Object.prototype.hasOwnProperty.call(error.config, 'handleError') &&\n error.config.handleError === true\n ) {\n // the error will be handled locally\n return Promise.reject(error);\n }\n\n if (error.response) {\n // The request was made and the server responded with a status code\n // that falls out of the range of 2xx\n eventBus.publish('error', new RequestError(error.response, error.config.url));\n } else if (error.request) {\n // The request was made but no response was received\n // Typically there is a network error or no internet connection\n // console.log(error.request);\n eventBus.publish('error', new NoConnectionError());\n } else {\n // Something happened in setting up the request that triggered an Error\n eventBus.publish('error', error);\n }\n\n return Promise.reject(error);\n },\n);\n\nexport default {\n base: instance,\n};\n","import eventBus from 'pubsub-js';\n\nexport const functionalities = {\n Relation: 1,\n RegistrationOwn: 2,\n RegistrationOthers: 4,\n Pricelist: 8,\n InvoiceDraft: 16,\n InvoiceFinal: 32,\n CompanyOwn: 64,\n Settings: 128,\n TaskTemplates: 256,\n InvoiceTransaction: 512,\n Documents: 1024,\n Users: 2048,\n RentabilityReport: 4096,\n Tags: 8192,\n InteractionsOwn: 16384,\n InteractionsOthers: 32768,\n TaskSchedules: 65536,\n PlannedTask: 131072,\n Todo: 262144,\n IntraCompanyInvoice: 524288,\n FreeInvoiceCreditNote: 1048576,\n RegistrationsPerReports: 2097152,\n AbsenceReports: 4194304,\n ChecklistInvoicingReport: 8388608,\n AbsenceAndCounters: 16777216,\n Teams: 33554432,\n EmployeeInternalPrice: 67108864,\n};\n\nexport const privileges = {\n Read: 1,\n Update: 2,\n Create: 4,\n Delete: 8,\n All: 15, // All crud actions\n Execute: 16,\n Syneton: 32,\n};\nexport const features = {\n // Unused1: 1,\n TypeForm: 2,\n Budget: 4,\n Eid: 8,\n Compliancy: 16,\n Peppol: 32,\n Gmail: 64,\n IntraCompanyBilling: 128,\n ConnectOpenTheBox: 256,\n CustomRoles: 512,\n ReferenceYear: 1024,\n TaskflowBilling: 2048,\n};\n\nconst parseTokenRole = role => {\n const perms = role.split(';');\n const result = {};\n perms.forEach(perm => {\n const permission = perm.split(':');\n if (permission.length !== 2) return;\n const functionality = parseInt(permission[0], 10);\n const privilege = parseInt(permission[1], 10);\n\n Object.keys(functionalities).forEach(key => {\n const f = functionalities[key];\n // eslint-disable-next-line no-bitwise\n if ((f & functionality) === f) {\n // eslint-disable-next-line no-bitwise\n result[f] = (result[f] || 0) | privilege;\n }\n });\n });\n\n return result;\n};\n\nexport const parsePrivilege = privilege => {\n if (typeof privilege === 'string') {\n const key = Object.keys(privileges).find(x => x.toLowerCase() === privilege.toLowerCase());\n return key ? privileges[key] : 0;\n }\n if (typeof privilege === 'number') return privilege;\n return 0;\n};\nexport const parseFunctionality = functionality => {\n if (typeof functionality === 'string') {\n const key = Object.keys(functionalities).find(\n x => x.toLowerCase() === functionality.toLowerCase(),\n );\n return key ? functionalities[key] : 0;\n }\n if (typeof functionality === 'number') return functionality;\n return 0;\n};\nexport const parseFeature = feature => {\n if (typeof feature === 'string') {\n const key = Object.keys(features).find(x => x.toLowerCase() === feature.toLowerCase());\n return key ? features[key] : 0;\n }\n if (typeof feature === 'number') return feature;\n return 0;\n};\n\nexport default class AuthService {\n user = {};\n manager = {};\n\n static setConfig(config) {\n this.user = config.user;\n this.manager = config.manager;\n }\n\n static getToken() {\n return this.user ? this.user.access_token : null;\n }\n\n static getUserId() {\n return this.user ? this.user.profile.Sid : null;\n }\n static getTenantId() {\n return this.user ? this.user.profile.GroupSid : null;\n }\n\n static getEmail() {\n return this.user ? this.user.profile.Email : null;\n }\n\n static getName() {\n return this.user ? this.user.profile.Name : null;\n }\n\n static getClaims() {\n return this.user ? this.user.profile : null;\n }\n\n static signinSilent() {\n return this.manager.signinSilent().then(user => {\n eventBus.publish('signinSilentCompleted', user);\n return user;\n });\n }\n\n static functionalities = functionalities;\n static privileges = privileges;\n\n static hasPermission({ functionality, privilege = privileges.All }) {\n if (!this.user || !this.user.profile || !this.user.profile.Role || !functionality) return false;\n const permissions = parseTokenRole(this.user.profile.Role);\n if (!permissions) return false;\n\n const parsedFunctionality = parseFunctionality(functionality);\n if (!permissions[parsedFunctionality]) return false;\n\n // eslint-disable-next-line no-bitwise\n return (permissions[parsedFunctionality] & parsePrivilege(privilege)) > 0;\n }\n\n static hasFeature(feature) {\n if (!this.user || !this.user.profile || !this.user.profile.WindowsSubAuthority || !feature)\n return false;\n const security = parseFeature(feature);\n let permissions = 0;\n\n try {\n permissions = parseInt(this.user.profile.WindowsSubAuthority);\n } catch (ex) {\n permissions = 0;\n }\n return (security & permissions) > 0; // eslint-disable-line no-bitwise\n }\n\n // Is support user?\n static isSupport() {\n if (!this.user || !this.user.profile) return false;\n return !!this.user.profile.su;\n }\n\n static tenantConfiguration() {\n if (!this.user || !this.user.profile) return null;\n try {\n return parseInt(this.user.profile.TenantConfiguration);\n } catch (ex) {\n console.error(ex);\n return null;\n }\n }\n}\n","import PropTypes from 'prop-types';\n// New version of react-intl doen't have the propTypes intlShape anymore\n// So we create our own based on the old version:\n// https://github.com/formatjs/formatjs/blob/2.x/src/types.js\nconst { string, func, object, shape, any } = PropTypes;\nconst funcReq = func.isRequired;\nconst intlConfigPropTypes = {\n locale: string,\n timeZone: string,\n formats: object,\n messages: object,\n textComponent: any,\n\n defaultLocale: string,\n defaultFormats: object,\n\n onError: func,\n};\nconst intlFormatPropTypes = {\n formatDate: funcReq,\n formatTime: funcReq,\n formatRelativeTime: funcReq,\n formatNumber: funcReq,\n formatPlural: funcReq,\n formatMessage: funcReq,\n};\nconst intlShape = shape({\n ...intlConfigPropTypes,\n ...intlFormatPropTypes,\n\n // eslint-disable-next-line react/forbid-prop-types\n formatters: object,\n});\n\nexport default intlShape;\n","import { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport { injectIntl, useIntl } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\n\nexport const listItemMsg = (list, id, fallback = '') => ({\n id: `${list}_${id}`.toLowerCase(),\n defaultMessage: fallback,\n });\n\nexport const formatListValue = props => {\n const { list, id, fallback, values, intl } = props;\n return intl.formatMessage(listItemMsg(list, id, fallback), values);\n};\n\nclass FormattedListValue extends PureComponent {\n render() {\n return formatListValue(this.props);\n }\n}\n\nFormattedListValue.propTypes = {\n list: PropTypes.string.isRequired,\n id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,\n fallback: PropTypes.string,\n values: PropTypes.shape({}),\n intl: intlShape.isRequired,\n};\nFormattedListValue.defaultProps = {\n fallback: '',\n values: {},\n};\n\nexport default injectIntl(FormattedListValue);\n","import Axios from 'axios';\nimport { ApplicationInsights } from '@microsoft/applicationinsights-web';\nimport { defineMessages } from 'react-intl';\n\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport ToastrService from './ToastrService';\n\nconst messages = defineMessages({\n NoPermissionsForThisAction: 'You dont have permissions for this action',\n SomethingWentWrong: 'Something went wrong. Please try again later',\n TimeoutOccurred: 'Timeout occurred',\n});\n\n// the translation key might contain a parameter in the form of \"Maximum length is {{p0}}\"\n// By default, the FormatMessage method expects a method with the name of the parameter as a property,\n// this method creates an object with properties p0, p1, p2, based on the amount of parameters that were passed\nconst formatParameters = (intl, parameters, parametersEnumType) => {\n let formattedParameters = {\n ...parameters,\n };\n\n if (parameters && parameters.length) {\n for (let i = 0; i < parameters.length; i++) {\n const parameter = parameters[i];\n\n formattedParameters = {\n ...formattedParameters,\n [`p${0}`]: parametersEnumType // if the parameters are of a specific enum type, we will translate it accordingly.\n ? Array.isArray(parameter)\n ? parameter.map(x => intl.formatMessage(listItemMsg(parametersEnumType, x))).join(', ')\n : intl.formatMessage(listItemMsg(parametersEnumType, parameter))\n : parameter,\n };\n }\n }\n\n return formattedParameters;\n};\n\nexport default intl => error => {\n if (!error) return Promise.reject();\n if (error.response && (error.response.status === 403 || error.response.status === 401)) {\n const unauthorizedMsg = intl.formatMessage(messages.NoPermissionsForThisAction);\n ToastrService.error(unauthorizedMsg);\n return Promise.reject();\n }\n // Ignore cancelled requests\n if (Axios.isCancel(error)) return;\n\n if (error.code === 'ECONNABORTED') {\n ApplicationInsights.trackException({ exception: error });\n const generalErrorMsg = intl.formatMessage(messages.TimeoutOccurred);\n ToastrService.error(generalErrorMsg);\n return Promise.reject(error.toString());\n }\n\n if (!error.code && error.response && error.response.data && !error.response.data.code) {\n // send exception to insights if its not a business exception\n if (error instanceof Error) {\n // error is a valid javascript Error, pass it to insights\n ApplicationInsights.trackException({ exception: error });\n } else {\n // Try to get message from toString\n let errorMessage = error.toString();\n\n if (errorMessage.indexOf('[object ') >= 0) errorMessage = null;\n ApplicationInsights.trackException(\n { exception: new Error(errorMessage || 'HttpError') },\n { originalError: JSON.stringify(error) },\n );\n }\n }\n\n console.error(error);\n if (error.response && error.response.data) {\n const {\n code = null,\n type = 'exceptioncode',\n parameters,\n parametersEnumType,\n } = error.response.data;\n\n const message = intl.formatMessage(\n {\n id: `${type}_${code}`.toLowerCase(),\n defaultMessage: intl.formatMessage(messages.SomethingWentWrong),\n },\n formatParameters(intl, parameters, parametersEnumType),\n );\n\n\n ToastrService.error(message);\n return Promise.reject(error.response.data);\n }\n\n if (error.code) {\n const type = error.type || 'exceptioncode';\n\n const message = intl.formatMessage(\n {\n id: `${type}_${error.code}`.toLowerCase(),\n defaultMessage: intl.formatMessage(messages.SomethingWentWrong),\n },\n formatParameters(intl, error.parameters, error.parametersEnumType),\n );\n ToastrService.error(message);\n return Promise.reject(error.code);\n }\n\n const generalErrorMsg = intl.formatMessage(messages.SomethingWentWrong);\n ToastrService.error(generalErrorMsg);\n return Promise.reject(error.toString());\n};\n","// Case insensitive compare\nconst stringCompare = new Intl.Collator(undefined, { sensitivity: 'base' }).compare;\nconst valueCompare = (a, b) => {\n if (typeof a === 'string' && typeof b === 'string') return stringCompare(a, b);\n if (a < b) return -1;\n if (a > b) return 1;\n return 0;\n};\n\nexport function dynamicSort(property) {\n if (!property) return valueCompare;\n let sortOrder = 1;\n let sortProp = property;\n if (sortProp[0] === '-') {\n sortOrder = -1;\n sortProp = sortProp.substr(1);\n }\n\n return (a, b) => {\n const result = valueCompare(a[sortProp], b[sortProp]);\n\n return result * sortOrder;\n };\n}\n\nexport function dynamicSortMultiple(...props) {\n const sortFunctions = props.map(dynamicSort);\n const numberOfProperties = sortFunctions.length;\n\n return (obj1, obj2) => {\n let i = 0;\n let result = 0;\n while (result === 0 && i < numberOfProperties) {\n result = sortFunctions[i](obj1, obj2);\n i += 1;\n }\n\n return result;\n };\n}\n// array.sort(dynamicSortMultiple(\"prop1\", \"prop2\"))\n","import { defineMessages } from 'react-intl';\nimport toastr from 'toastr';\n\nconst messages = defineMessages({\n Success: 'Success',\n ChangesSaved: 'Changes saved',\n SomethingWentWrong: 'Something went wrong',\n});\n\nconst ToastrService = {\n success(title, content, onClick = null) {\n if (!title && !content) title = 'Succes';\n if (onClick) {\n toastr.options.onclick = onClick;\n } else {\n toastr.options.onclick = null;\n }\n toastr.options.preventDuplicates = false;\n toastr.options.closeButton = true;\n toastr.options.escapeHtml = true;\n\n toastr.success(content, title, {\n timeOut: 8000,\n });\n },\n\n generalError(intl) {\n toastr.options.onclick = null;\n toastr.options.preventDuplicates = true;\n toastr.options.closeButton = true;\n toastr.options.escapeHtml = true;\n\n toastr.error(intl.formatMessage(messages.SomethingWentWrong), '', {\n timeOut: 8000,\n });\n },\n\n error(content) {\n toastr.options.onclick = null;\n toastr.options.preventDuplicates = true;\n toastr.options.closeButton = true;\n toastr.options.escapeHtml = true;\n\n toastr.error(content, '', {\n timeOut: 8000,\n });\n },\n\n info(content, title, onClick = null) {\n if (onClick) {\n toastr.options.onclick = onClick;\n } else {\n toastr.options.onclick = null;\n }\n toastr.options.preventDuplicates = true;\n toastr.options.closeButton = true;\n toastr.options.escapeHtml = true;\n\n toastr.info(content, title, {\n timeOut: 8000,\n });\n },\n warning(content, title, onClick) {\n if (onClick) {\n toastr.options.onclick = onClick;\n } else {\n toastr.options.onclick = null;\n }\n toastr.options.preventDuplicates = true;\n toastr.options.closeButton = true;\n toastr.options.escapeHtml = true;\n\n toastr.warning(content, title, {\n timeOut: 8000,\n });\n },\n\n changesSaved(intl, onClick, preventDuplicates = false) {\n let title = 'Success';\n let content = '';\n if (intl && typeof intl.formatMessage === 'function') {\n title = intl.formatMessage(messages.Success);\n content = intl.formatMessage(messages.ChangesSaved);\n }\n if (onClick) {\n toastr.options.onclick = onClick;\n } else {\n toastr.options.onclick = null;\n }\n toastr.options.preventDuplicates = preventDuplicates;\n toastr.options.closeButton = true;\n toastr.options.escapeHtml = true;\n\n toastr.success(content, title, {\n timeOut: 8000,\n });\n },\n};\n\nexport default ToastrService;\n","import { dynamicSort } from '../utils/dynamicSort';\nimport { guid1 } from '../utils/guid';\n\nlet dataCache;\n\nconst nameSort = dynamicSort('name');\n\nconst getUsers = () =>\n ((dataCache && dataCache.user) || [])\n .filter(x => x.isActive || !x.hidden)\n .map(u => ({\n id: u.userID,\n name: `${u.firstName} ${u.lastName}`,\n isActive: u.isActive,\n email: u.email,\n languageCode: u.languageCode,\n hidden: u.hidden,\n }))\n .sort(nameSort);\nconst getAllUsers = () =>\n ((dataCache && dataCache.user) || [])\n .map(u => ({\n id: u.userID,\n name: `${u.firstName} ${u.lastName}`,\n isActive: u.isActive,\n email: u.email,\n languageCode: u.languageCode,\n hidden: u.hidden,\n }))\n .sort(nameSort);\nconst getSystemUser = () => dataCache?.systemUser;\n\nconst getUser = userId => {\n if (!userId || typeof userId !== 'string' || !dataCache || !dataCache.userObject) return null;\n if (userId === guid1) return dataCache.systemUser;\n /* Faster lookup than getAllUsers().find */\n const user = dataCache.userObject[userId];\n return user || null;\n};\nconst getUserName = userId => {\n if (userId === guid1) return dataCache?.systemUser.name;\n const user = getUser(userId);\n if (!user) return null;\n return `${user.firstName} ${user.lastName}`;\n};\n\nconst getUserLanguage = userId => {\n const user = getUser(userId);\n if (!user) return null;\n return user.languageCode;\n};\nconst getDefaultCompanyForUser = (userId = null) => {\n if (!dataCache) return null;\n const employee = userId ? dataCache.user.find(x => x.userID === userId) : dataCache.employee;\n const companyId = employee?.companyId;\n const company = companyId\n ? dataCache.company.find(x => x.id === companyId)\n : dataCache.defaultcompany;\n return company;\n};\nexport default {\n getDataCache: () => dataCache,\n setDataCache(cache) {\n dataCache = cache;\n },\n hasConnectPlatform: (companyId, connectPlatform) => {\n const companyIdsToCheck = companyId ? [companyId] : Object.keys(dataCache.connectPlatforms);\n\n for (const companyIdToCheck of companyIdsToCheck) {\n if (\n dataCache.connectPlatforms[companyIdToCheck].filter(x => x === connectPlatform).length > 0\n ) {\n return true;\n }\n }\n\n return false;\n },\n hasUserConnectPlatform: (connectPlatform) => {\n if (!!dataCache.employee.configuredConnectPlatformsCommaSeparated && dataCache.employee.configuredConnectPlatformsCommaSeparated.split(',').filter(x => x === connectPlatform.toString()).length > 0){\n return true;\n }\n\n return false;\n },\n hasPortalConnectPlatform(companyId) {\n return this.hasConnectPlatform(companyId, 45);\n },\n getCompanySettings: companyId => {\n if (!dataCache) return {};\n const companyLookup = dataCache.companyObject && dataCache.companyObject[companyId]; // Use lookup object first (it's faster than a find)\n if (companyLookup) {\n return companyLookup;\n }\n if (!dataCache.company) return {};\n const company = dataCache.company && dataCache.company.find(x => x.id === companyId);\n return company;\n },\n getDefaultCompany: () => dataCache.defaultcompany,\n\n assignmentsEnabled: () => !!dataCache && dataCache.assignmentsEnabled,\n timeTablesEnabled: () => !!dataCache && dataCache.employeeTimeTables,\n getUsers,\n getUser,\n getAllUsers,\n getUserName,\n getSystemUser,\n isBelgianTenantConfiguration: () =>\n !dataCache\n ? true // fallback to true if datacache not ready yet\n : dataCache.tenantConfiguration === 0 || dataCache.tenantConfiguration === 1,\n getTenantConfiguration: () => !!dataCache && dataCache.tenantConfiguration,\n getUserLanguage,\n getDefaultCompanyForUser,\n getAbsenceRelationIdForUser: (userId = null) =>\n getDefaultCompanyForUser(userId)?.absenceRelationId,\n};\n","import axios from 'axios';\nimport log from 'loglevel';\nimport AuthService from './AuthService';\nimport config from '../../config';\n\nconst { signalR } = window;\n\nlet hubConnection;\nlet state = 'disconnected';\nconst startupEventHandlers = [];\nlet connectionId = null;\n\nfunction getAxiosConfig() {\n const configuration = {\n headers: {\n 'x-ms-signalr-userid': AuthService.getUserId(),\n Authorization: `Bearer ${AuthService.getToken()}`,\n },\n };\n return configuration;\n}\n\nfunction getConnectionInfo() {\n return axios\n .post(`${config.appUrls.signalr}/api/negotiate`, null, getAxiosConfig())\n .then(resp => resp.data);\n}\n\nfunction addUserToGroup() {\n return axios.post(\n `${config.appUrls.signalr}/api/addToGroup`,\n {\n connectionId,\n },\n getAxiosConfig(),\n );\n}\n\nconst startConnection = () => {\n getConnectionInfo()\n .then(info => {\n // make compatible with old and new SignalRConnectionInfo\n const accessToken = info.accessToken || info.accessKey;\n const url = info.url || info.endpoint;\n\n const options = {\n accessTokenFactory: () => accessToken,\n };\n\n hubConnection = new signalR.HubConnectionBuilder()\n .withUrl(url, options)\n .configureLogging(signalR.LogLevel.Warning) // signalR.LogLevel.Trace logs everything, including data transported between hub and client.\n .build();\n hubConnection.onclose(() => {\n state = 'disconnected';\n log.info('SignalR connection disconnected');\n startConnection();\n });\n\n state = 'connecting';\n\n hubConnection\n .start()\n .then(() => {\n ({ connectionId } = hubConnection);\n\n state = 'connected';\n\n addUserToGroup();\n\n if (startupEventHandlers.length > 0) {\n startupEventHandlers.map(eventHandler => {\n hubConnection.on(eventHandler.name, eventHandler.action);\n });\n }\n })\n .catch(error => {\n log.error(error);\n state = 'disconnected';\n // Try to reconnect after 5 seconds\n setTimeout(() => startConnection(), 5000);\n });\n })\n .catch(error => {\n log.error(error);\n state = 'disconnected';\n });\n};\n\nconst subscribe = (name, action) => {\n // If the connection was not yet established, add it to an array which will be used\n // To add event handlers to the connection when the connection succeeded\n if (state !== 'connected') {\n startupEventHandlers.push({\n name,\n action,\n });\n } else {\n hubConnection.on(name, action);\n }\n};\n\nconst unsubscribe = (name, action) => {\n if (hubConnection) {\n hubConnection.off(name, action);\n }\n};\n\nexport default {\n startConnection,\n subscribe,\n unsubscribe,\n getConnectionId: () => connectionId,\n};\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\n\nexport default class Button extends Component {\n shouldExecute = true;\n\n static propTypes = {\n showProgress: PropTypes.bool,\n };\n\n static defaultProps = {\n showProgress: false,\n };\n\n state = {\n saving: false,\n };\n componentWillUnmount() {\n this.shouldExecute = false;\n }\n handleClick(e) {\n this.buttonDOM.blur();\n const { onClick, showProgress } = this.props;\n\n if (showProgress) {\n this.setState(state => ({\n ...state,\n saving: true,\n }));\n }\n\n return Promise.resolve(onClick(e)).finally(() => this.removeProgress());\n }\n\n removeProgress = () => {\n // Prevent setting state on unmounted component\n if (!this.shouldExecute) return;\n this.setState(state => ({\n ...state,\n saving: false,\n }));\n };\n\n render() {\n const { children, btnClassName, onClick, showProgress, disabled, ...rest } = this.props;\n const { saving } = this.state;\n\n const buttonDisabled = disabled || (showProgress && saving);\n const showSpinner = showProgress && saving;\n\n return (\n {\n this.buttonDOM = buttonDOM;\n }}\n onClick={e => !buttonDisabled && this.handleClick(e)}\n className={classnames('btn btn-default', btnClassName)}\n disabled={buttonDisabled}\n {...rest}\n >\n {showSpinner && }\n {children}\n \n );\n }\n}\n","export const emptyGuid = '00000000-0000-0000-0000-000000000000';\nexport const guid1 = '11111111-1111-1111-1111-111111111111';\nexport const isGuid = value => {\n if (value == null || typeof value !== 'string' || value.length < 36) return false;\n return /^\\{?[a-fA-F0-9]{8}-([a-fA-F0-9]{4}-){3}[a-fA-F0-9]{12}\\}?$/.test(value);\n};\n\nexport default { empty: emptyGuid, isGuid };\n\n/*\nExamples\n\nimport guid from '.../guid';\nconst emptyGuid=guid.empty;\nif(guid.isGuid(emptyGuid))\n do something\n\n\nNamed import:\n\nimport {emtpyGuid,isGuid} from '.../guid';\nconst emptyGuid=emtpyGuid;\nif(isGuid(emptyGuid))\n do something\n*/\n","import FileSaver from 'file-saver';\nimport { defineMessages } from 'react-intl';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport TranslateService from '@/shared/services/TranslateService';\nimport adminpulse from '@/shared/utils/adminpulse';\nimport ToastrService from '@/shared/services/ToastrService';\nimport config from '../../config';\nimport api from '../api';\n\nconst messages = defineMessages({\n DocumentEditorOpened: 'The document editor will open in a new browser tab.',\n DocumentCouldNotBeOpenedMaybeDeleted:\n 'The document could not be downloaded, it might have been deleted.',\n DocumentCheckout:\n 'The document is being checked out and will open in a new browser tab or a client app.',\n DocumentCheckin: 'The document is being checked in.',\n DocumentDiscardCheckout: 'The document checkout is being discarded.',\n DiscardCheckout: 'The document checkout is being discarded.',\n});\n\nconst convertToPdfMimeTypes = [\n 'application/msword',\n 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\n 'application/vnd.openxmlformats-officedocument.wordprocessingml.template',\n 'application/vnd.ms-word.template.macroenabled.12',\n 'application/vnd.ms-word.document.macroenabled.12',\n 'application/vnd.ms-excel',\n 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n];\nlet documentTypeInfo = null;\n\nconst getDocumentTypeInfo = () => {\n if (documentTypeInfo === null) {\n documentTypeInfo = api.base\n .get(`${config.appUrls.documents}/api/documents/DocumentTypeInfo`)\n .then(({ data }) => data || []);\n }\n return Promise.resolve(documentTypeInfo);\n};\n\nconst DocumentService = {\n download(id, versionId, filename, mimeType) {\n if (versionId) {\n return api.base\n .post(\n `${config.appUrls.documents}/api/documents/DownloadDocumentLink`,\n {\n documentId: id,\n VersionId: versionId,\n filename,\n mime: mimeType,\n },\n {\n responseType: 'text',\n },\n )\n .then(\n ({ data }) => {\n window.open(data);\n },\n error => {\n if (error.response && error.response.status === 404) {\n ToastrService.error(\n TranslateService.getIntl().formatMessage(\n messages.DocumentCouldNotBeOpenedMaybeDeleted,\n ),\n );\n } else {\n handleHttpError(TranslateService.getIntl())(error);\n }\n },\n );\n }\n return api.base\n .get(`${config.appUrls.documents}/api/documents/DownloadDocumentLink/${id}`, {\n responseType: 'text',\n })\n .then(\n ({ data }) => {\n window.open(data);\n },\n error => {\n if (error.response && error.response.status === 404) {\n ToastrService.error(\n TranslateService.getIntl().formatMessage(\n messages.DocumentCouldNotBeOpenedMaybeDeleted,\n ),\n );\n } else {\n handleHttpError(TranslateService.getIntl())(error);\n }\n },\n );\n\n return api.base\n .get(url, {\n responseType: 'text',\n })\n .then(\n ({ data }) => {\n window.open(data);\n },\n error => {\n if (error.response && error.response.status === 404) {\n ToastrService.error(\n TranslateService.getIntl().formatMessage(\n messages.DocumentCouldNotBeOpenedMaybeDeleted,\n ),\n );\n } else {\n handleHttpError(TranslateService.getIntl())(error);\n }\n },\n );\n },\n openInApp(id) {\n return api.base\n .get(`${config.appUrls.documents}/api/documents/${id}/openinapp`, {\n responseType: 'text',\n })\n .then(\n ({ data }) => {\n window.open(data, '_blank');\n },\n error => {\n if (error.response && error.response.status === 404) {\n ToastrService.error(\n TranslateService.getIntl().formatMessage(\n messages.DocumentCouldNotBeOpenedMaybeDeleted,\n ),\n );\n } else {\n handleHttpError(TranslateService.getIntl())(error);\n }\n },\n );\n },\n edit(id, language) {\n ToastrService.info(TranslateService.getIntl().formatMessage(messages.DocumentEditorOpened));\n return api.base\n .get(`${config.appUrls.documents}/api/documents/EditDocumentLink/${id}/${language}`, {\n responseType: 'text',\n })\n .then(\n ({ data }) => {\n window.open(data);\n },\n error => {\n handleHttpError(TranslateService.getIntl())(error);\n },\n );\n },\n checkout(id, openInApp) {\n ToastrService.info(TranslateService.getIntl().formatMessage(messages.DocumentCheckout));\n return api.base\n .post(`${config.appUrls.documents}/api/documents/${id}/checkout?openinApp=${openInApp}`, {\n responseType: 'text',\n })\n .then(\n ({ data }) => {\n window.open(data);\n return data;\n },\n error => {\n handleHttpError(TranslateService.getIntl())(error);\n },\n );\n },\n checkin(id) {\n ToastrService.info(TranslateService.getIntl().formatMessage(messages.DocumentCheckin));\n return api.base\n .post(`${config.appUrls.documents}/api/documents/${id}/checkin`, {\n responseType: 'text',\n })\n .then(\n ({ data }) => data,\n error => {\n handleHttpError(TranslateService.getIntl())(error);\n },\n );\n },\n discardCheckout(id) {\n ToastrService.info(TranslateService.getIntl().formatMessage(messages.DiscardCheckout));\n return api.base\n .post(`${config.appUrls.documents}/api/documents/${id}/discardcheckout`, {\n responseType: 'text',\n })\n .then(\n ({ data }) => data,\n error => {\n handleHttpError(TranslateService.getIntl())(error);\n },\n );\n },\n getTemplateCheckoutInfo(documentIds) {\n return api.base\n .post(`${config.appUrls.documents}/api/documents/checkedoutstatus`, documentIds)\n .then(\n ({ data }) => {\n return data;\n },\n error => {\n handleHttpError(TranslateService.getIntl())(error);\n },\n );\n },\n open(id) {\n return api.base\n .get(`${config.appUrls.documents}/api/documents/opendocumentlink/${id}`, {\n responseType: 'text',\n })\n .then(\n ({ data }) => {\n window.open(data);\n },\n error => {\n if (error.response && error.response.status === 404) {\n ToastrService.error(\n TranslateService.getIntl().formatMessage(\n messages.DocumentCouldNotBeOpenedMaybeDeleted,\n ),\n );\n } else {\n handleHttpError(TranslateService.getIntl())(error);\n }\n },\n );\n },\n\n getLink(id) {\n return api.base\n .get(`${config.appUrls.documents}/api/documents/opendocumentlink/${id}`, {\n responseType: 'text',\n })\n .then(\n ({ data }) => data,\n error => {\n if (error.response && error.response.status === 404) {\n ToastrService.error(\n TranslateService.getIntl().formatMessage(\n messages.DocumentCouldNotBeOpenedMaybeDeleted,\n ),\n );\n } else {\n handleHttpError(TranslateService.getIntl())(error);\n }\n },\n );\n },\n getCheckedOutLink(id) {\n return api.base\n .get(`${config.appUrls.documents}/api/documents/checkedoutlink/${id}`, {\n responseType: 'text',\n })\n .then(\n ({ data }) => data,\n error => {\n if (error.response && error.response.status === 404) {\n ToastrService.error(\n TranslateService.getIntl().formatMessage(\n messages.DocumentCouldNotBeOpenedMaybeDeleted,\n ),\n );\n } else {\n handleHttpError(TranslateService.getIntl())(error);\n }\n },\n );\n },\n getDetails(id) {\n return api.base.get(`${config.appUrls.documents}/api/documents/details/${id}`).then(\n ({ data }) => data,\n error => {\n if (error.response && error.response.status === 404) {\n ToastrService.error(\n TranslateService.getIntl().formatMessage(messages.DocumentCouldNotBeOpenedMaybeDeleted),\n );\n } else {\n handleHttpError(TranslateService.getIntl())(error);\n }\n },\n );\n },\n\n convertToPdf(id, name) {\n return api.base\n .get(`${config.appUrls.documentsConverter}/api/convert/${id}/pdf`, {\n responseType: 'arraybuffer',\n })\n .then(\n ({ data, headers }) => {\n let filename = name;\n if (filename) {\n filename = `${filename.substr(0, filename.lastIndexOf('.'))}.pdf`;\n } else {\n const contentDispositionHeader = headers['content-disposition'];\n filename = adminpulse.getFileNameFromHeader(contentDispositionHeader);\n }\n if (!filename) filename = `${id.substr(0, 8)}.pdf`;\n\n const mime = headers['content-type'];\n\n const blob = new Blob([data], {\n type: mime,\n });\n FileSaver.saveAs(blob, filename);\n },\n error => {\n const buffer = error.data || error;\n const errorObject = adminpulse.arrayBufferToObject(buffer) || {};\n handleHttpError(TranslateService.getIntl())(errorObject);\n },\n );\n },\n\n // converts given documentId to pdf and saves it in document-sql store\n // desired document type can be passed to give new document a specific type, 15 = temporary document\n convertAndSaveToPdf(id, desiredDocumentType = 15) {\n return api.base\n .get(\n `${config.appUrls.documentsConverter}/api/convertandsave/${id}/pdf/${desiredDocumentType}`,\n )\n .then(\n ({ data }) => data,\n error => {\n handleHttpError(TranslateService.getIntl())(error);\n },\n );\n },\n\n canConvertToPdf(mime) {\n if (!mime || typeof mime !== 'string') return false;\n return convertToPdfMimeTypes.indexOf(mime.toLowerCase()) >= 0;\n },\n\n getForbiddenDocumentTypes: () => getDocumentTypeInfo().then(({ forbidden = [] }) => forbidden),\n getWithoutRelationDocumentTypes: () =>\n getDocumentTypeInfo().then(({ withoutRelations = [] }) => withoutRelations),\n};\n\nexport default DocumentService;\n","import moment from 'moment';\nimport PropTypes from 'prop-types';\n\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport AuthService from '@/shared/services/AuthService';\nimport { resourceFilter } from './ResourceAutoComplete';\n\nexport const resourceShape = PropTypes.shape({\n id: PropTypes.string,\n name: PropTypes.string,\n code: PropTypes.string,\n type: PropTypes.oneOf([0, 1, 2, 3, 4]),\n});\nexport const relationShape = PropTypes.shape({\n id: PropTypes.string.isRequired,\n});\nexport const invoiceStreamShape = PropTypes.shape({\n id: PropTypes.string.isRequired,\n assignmentId: PropTypes.string,\n assignmentName: PropTypes.string,\n assignmentTemplateId: PropTypes.string,\n});\nexport const priceShape = PropTypes.shape({\n id: PropTypes.string.isRequired,\n amount: PropTypes.number,\n});\nexport const registrationShape = PropTypes.shape({\n id: PropTypes.string,\n source: PropTypes.number,\n date: PropTypes.instanceOf(Date),\n type: PropTypes.oneOf([0, 1, 2, 3, 4]),\n invoiceStreamId: PropTypes.string,\n assignmentTemplateId: PropTypes.string,\n relation: relationShape,\n resource: resourceShape,\n plannedTaskId: PropTypes.string,\n durationMinutes: PropTypes.number,\n fromMinutes: PropTypes.number,\n toMinutes: PropTypes.number,\n quantity: PropTypes.number,\n amount: PropTypes.number,\n price: priceShape,\n priceOptions: PropTypes.arrayOf(priceShape),\n discountPercentage: PropTypes.number,\n isBillable: PropTypes.bool,\n inForfait: PropTypes.bool,\n totalAmount: PropTypes.number,\n vatPercentage: PropTypes.number,\n vatType: PropTypes.number,\n referenceYear: PropTypes.number,\n});\n\nexport const emptyRegistration = {\n source: 0,\n date: moment\n .utc()\n .startOf('day')\n .toDate(),\n type: 0,\n resource: null,\n\n plannedTaskId: null,\n plannedTaskTemplateId: null,\n plannedTaskTemplateType: null,\n plannedTaskName: null,\n mainPlannedTaskId: null,\n mainTaskTemplateId: null,\n mainPlannedTaskName: null,\n\n durationType: 0,\n durationMinutes: 0,\n durationDays: 0,\n fromMinutes: 0,\n toMinutes: 0,\n\n quantity: 0,\n\n amount: 0, // Unit price\n price: null, // Price object\n priceOptions: null, // Suggested price(s)\n discountPercentage: 0,\n\n isBillable: true,\n inForfait: null,\n totalAmount: 0,\n vatPercentage: 0.21,\n vatType: 0,\n\n interactionType: null,\n interactionDescription: null,\n interactionTitle: null,\n\n referenceYear: null,\n};\n\nexport const createEmptyRegistration = initialValues => {\n const cache = DataCacheService.getDataCache();\n const tenantDefaults = {};\n\n if (cache) {\n if (cache.defaultcompany && 'resourceVATRate' in cache.defaultcompany)\n tenantDefaults.vatPercentage = cache.defaultcompany.resourceVATRate;\n }\n if (initialValues && initialValues.date && typeof initialValues.date === 'string')\n initialValues.date = moment.utc(initialValues.date).toDate();\n\n if (\n initialValues &&\n typeof initialValues.assignmentTemplateId === 'undefined' &&\n initialValues.relation &&\n initialValues.invoiceStreamId\n ) {\n initialValues.assignmentTemplateId = getAssignmentTemplateId(\n initialValues.relation,\n initialValues.invoiceStreamId,\n );\n }\n return {\n ...emptyRegistration,\n date: moment\n .utc()\n .startOf('day')\n .toDate(),\n ...tenantDefaults,\n ...(initialValues || {}),\n };\n};\n\nexport const createEmptyTimerRegistration = initialValues =>\n createEmptyRegistration({ fromMinutes: 0, ...(initialValues || {}), source: 5, type: 0 });\n\nexport const defaultOptions = {\n showDate: true,\n showReferenceYear: true,\n showRelation: true,\n editableRelation: true,\n ownCompanyRelation: false,\n showAssignments: true,\n showTasks: true,\n resourceTypes: [], // Leave empty for only initial type\n showFromUntil: true,\n showDuration: true,\n showQuantity: true,\n showPrice: true,\n showDiscount: true,\n showVat: true,\n showTotalAmount: true,\n showBillable: true,\n showInForfait: true,\n showInvoiceRemark: true,\n showInternalRemark: true,\n showInteraction: true,\n defaultDuration: 0,\n showOtherUsers: true, //Show readonly username for other users (not for your own registrations)\n crmTypes: [],\n};\n\nexport const isRegistrationValid = (registration, optionOverrides) => {\n const options = { ...defaultOptions, ...(optionOverrides || {}) };\n if (!registration) return false;\n if (options.showRelation && options.editableRelation) {\n if (!registration.relation || !registration.relation.id) return false;\n if (!registration.invoiceStreamId) return false;\n }\n if (!registration.resource || !registration.resource.id) return false;\n if (\n registration.type === 0 &&\n options.showDuration &&\n (!registration.durationMinutes || registration.durationMinutes <= 0)\n )\n return false;\n if (\n (registration.type === 3 || registration.type === 4) &&\n options.showDuration &&\n (!registration.durationDays || registration.durationDays <= 0) &&\n (!registration.durationMinutes || registration.durationMinutes <= 0)\n )\n return false;\n\n if (\n (registration.type === 1 || registration.type === 2) &&\n options.showQuantity &&\n (!registration.quantity || registration.quantity <= 0)\n )\n return false;\n\n return true;\n};\nexport const createEmptyRegistrationFromTask = (task, otherRegistrationValues = {}) => {\n const {\n id: plannedTaskId,\n name: plannedTaskName,\n templateId: plannedTaskTemplateId,\n parentId,\n mainTaskId,\n mainTaskName: mainPlannedTaskName,\n mainTemplateId: mainTaskTemplateId,\n invoiceStreamId,\n assignmentTemplateId,\n relation,\n year,\n } = task;\n\n const mainPlannedTaskId = parentId || mainTaskId || null;\n return createEmptyRegistration({\n plannedTaskId,\n plannedTaskName,\n plannedTaskTemplateId,\n mainPlannedTaskId,\n mainPlannedTaskName,\n mainTaskTemplateId,\n invoiceStreamId,\n assignmentTemplateId,\n relation,\n referenceYear: !year || year < 2000 ? null : year,\n ...otherRegistrationValues,\n });\n};\n\nexport const getRegistrationModalPropsForTask = (task, orgRegistration) => {\n const { parentId, mainTaskId, resourceId, defaultDuration } = task;\n const mainPlannedTaskId = parentId || mainTaskId || null;\n const registration =\n orgRegistration && orgRegistration.id\n ? createEmptyRegistration(orgRegistration)\n : createEmptyRegistrationFromTask(task, orgRegistration);\n\n return {\n registration,\n mainTaskId: mainPlannedTaskId,\n defaultResourceId: resourceId,\n registrationOptions: {\n editableRelation: false,\n defaultDuration,\n resourceTypes: [0, 1], // Allow to switch between work and costs\n },\n };\n};\n\nexport const resourceMatchesFilters = (resource, crmType, assignmentTemplateId) => {\n return resourceFilter(resource, { crmType, assignmentTemplateId }, false);\n};\nconst getAssignmentTemplateId = (relation, invoiceStreamId) => {\n if (!relation || !invoiceStreamId || !relation.invoiceStreams) return null;\n return relation.invoiceStreams.find(x => x.id === invoiceStreamId)?.assignmentTemplateId;\n};\n\nexport const absenceRegistrationOptions = {\n showDate: true,\n showReferenceYear: false,\n showRelation: true,\n editableRelation: true,\n showAssignments: true,\n showTasks: false,\n showFromUntil: true,\n showDuration: true,\n showQuantity: false,\n showPrice: false,\n showDiscount: false,\n showVat: false,\n showTotalAmount: false,\n showBillable: false,\n showInForfait: false,\n showInvoiceRemark: false,\n showInternalRemark: true,\n showInteraction: false,\n};\n\nconst maxMinutes = 1439; // 23:59\n\nexport const actions = {\n dateChanged: 'dateChanged',\n referenceYearChanged: 'referenceYearChanged',\n fromMinutesChanged: 'fromMinutesChanged',\n toMinutesChanged: 'toMinutesChanged',\n durationTypeChanged: 'durationTypeChanged',\n durationMinutesChanged: 'durationMinutesChanged',\n durationDaysChanged: 'durationDaysChanged',\n isAfternoonChanged: 'isAfternoonChanged',\n addDuration: 'addDuration',\n roundDuration: 'roundDuration',\n unitPriceChanged: 'unitPriceChanged',\n priceChanged: 'priceChanged',\n priceInfoChanged: 'priceInfoChanged',\n setPriceOptions: 'setPriceOptions',\n discountChanged: 'discountChanged',\n vatPercentageChanged: 'vatPercentageChanged',\n calculateTotalAmount: 'calculateTotalAmount',\n totalAmountChanged: 'totalAmountChanged',\n isBillableChanged: 'isBillableChanged',\n inForfaitChanged: 'inForfaitChanged',\n remarkChanged: 'remarkChanged',\n internalRemarkChanged: 'internalRemarkChanged',\n resourceChanged: 'resourceChanged',\n resourceTypeChanged: 'resourceTypeChanged',\n interactionTypeChanged: 'interactionTypeChanged',\n interactionTitleChanged: 'interactionTitleChanged',\n interactionDescriptionChanged: 'interactionDescriptionChanged',\n interactionInit: 'interactionInit',\n taskChanged: 'taskChanged',\n relationChanged: 'relationChanged',\n assignmentChanged: 'assignmentChanged',\n};\nexport const executeAction = (registration, action, value) => {\n switch (action) {\n case actions.dateChanged: {\n const date = moment.utc(value).toDate();\n return {\n ...registration,\n date,\n };\n }\n case actions.referenceYearChanged: {\n let referenceYear = parseInt(value) || null;\n if (referenceYear !== null) {\n if (referenceYear < 2000) referenceYear = null;\n else if (referenceYear > 2200) referenceYear = moment.utc().year;\n }\n return {\n ...registration,\n referenceYear,\n };\n }\n case actions.fromMinutesChanged: {\n const { durationMinutes } = registration;\n\n const newToMinutes = value + durationMinutes;\n if (newToMinutes > maxMinutes) {\n return {\n ...registration,\n toMinutes: maxMinutes,\n fromMinutes: maxMinutes - durationMinutes,\n };\n }\n\n return {\n ...registration,\n toMinutes: newToMinutes,\n fromMinutes: value,\n };\n }\n case actions.toMinutesChanged: {\n const { fromMinutes } = registration;\n\n const newDuration = value - fromMinutes;\n return executeAction(\n {\n ...registration,\n toMinutes: value,\n durationMinutes: newDuration,\n },\n actions.calculateTotalAmount,\n );\n }\n case actions.durationTypeChanged: {\n return executeAction(\n {\n ...registration,\n durationType: value,\n durationDays: value ? 1 / value : 0,\n isAfternoon: false,\n },\n actions.calculateTotalAmount,\n );\n }\n case actions.isAfternoonChanged: {\n return executeAction({ ...registration, isAfternoon: !!value }, actions.calculateTotalAmount);\n }\n case actions.durationDaysChanged: {\n return executeAction(\n {\n ...registration,\n durationDays: value,\n },\n actions.calculateTotalAmount,\n );\n }\n case actions.durationMinutesChanged: {\n const { fromMinutes } = registration;\n\n const newToMinutes = fromMinutes + value;\n if (newToMinutes > maxMinutes) {\n return executeAction(\n {\n ...registration,\n toMinutes: maxMinutes,\n durationMinutes: maxMinutes - fromMinutes,\n },\n actions.calculateTotalAmount,\n );\n }\n return executeAction(\n {\n ...registration,\n toMinutes: newToMinutes,\n durationMinutes: value,\n },\n actions.calculateTotalAmount,\n );\n }\n case actions.addDuration: {\n const { durationMinutes = 0 } = registration;\n const newDuration = Math.min(durationMinutes + value, maxMinutes);\n return executeAction(registration, actions.durationMinutesChanged, newDuration);\n }\n case actions.roundDuration: {\n const { durationMinutes = 0 } = registration;\n const newDuration = Math.min(Math.round(durationMinutes / value, 10) * value, maxMinutes);\n return executeAction(registration, actions.durationMinutesChanged, newDuration);\n }\n case actions.quantityChanged: {\n const parsedValue = parseInt(value);\n return executeAction(\n { ...registration, quantity: Number.isNaN(parsedValue) ? null : parsedValue },\n actions.calculateTotalAmount,\n );\n }\n case actions.unitPriceChanged: {\n const parsedValue = parseFloat(value);\n const newPrice =\n !registration.price || registration.price.amount === parsedValue\n ? registration.price\n : null;\n return executeAction(\n {\n ...registration,\n amount: Number.isNaN(parsedValue) ? null : parsedValue,\n price: newPrice,\n },\n actions.calculateTotalAmount,\n );\n }\n case actions.priceChanged: {\n const { amount = 0 } = value || {};\n return executeAction(\n {\n ...registration,\n amount,\n price: value,\n },\n actions.calculateTotalAmount,\n );\n }\n case actions.discountChanged: {\n let parsedValue = parseFloat(value);\n if (Number.isNaN(parsedValue)) {\n parsedValue = null;\n } else {\n if (parsedValue < 0) parsedValue = Math.abs(parsedValue);\n if (parsedValue > 1) parsedValue = 1; // Max 100%\n }\n\n return executeAction(\n {\n ...registration,\n discountPercentage: parsedValue,\n },\n actions.calculateTotalAmount,\n );\n }\n case actions.vatPercentageChanged: {\n const { vatRate = null, vatType = null } = value || {};\n return {\n ...registration,\n vatPercentage: vatRate,\n vatType,\n };\n }\n case actions.totalAmountChanged: {\n const { type, quantity, durationMinutes, amount, isFixedPrice } = registration;\n if (type === 3 || type === 4) return registration;\n const q = isFixedPrice ? 1 : type === 0 ? (durationMinutes || 0) / 60 : quantity || 0;\n const totalWithoutDiscount = (q * (amount || 0)).round(2);\n let newTotal = (Math.abs(value) || 0).round(2);\n let discountPercentage = 0;\n\n if (newTotal > totalWithoutDiscount) {\n newTotal = totalWithoutDiscount;\n } else if (totalWithoutDiscount !== 0) {\n discountPercentage = ((totalWithoutDiscount - newTotal) / totalWithoutDiscount).round(2);\n }\n return {\n ...registration,\n totalAmount: newTotal,\n discountPercentage,\n };\n }\n case actions.calculateTotalAmount: {\n const {\n type,\n quantity,\n durationMinutes,\n amount,\n discountPercentage,\n isFixedPrice,\n } = registration;\n if (type === 3 || type === 4) return registration;\n\n const q = isFixedPrice ? 1 : type === 0 ? (durationMinutes || 0) / 60 : quantity || 0;\n\n return {\n ...registration,\n totalAmount: (q * (amount || 0) * (1 - (discountPercentage || 0))).round(2),\n };\n }\n case actions.isBillableChanged: {\n return { ...registration, isBillable: !!value };\n }\n case actions.inForfaitChanged: {\n return { ...registration, inForfait: !!value };\n }\n case actions.remarkChanged: {\n return { ...registration, remark: value || null };\n }\n case actions.internalRemarkChanged: {\n return { ...registration, internalRemark: value || null };\n }\n case actions.resourceTypeChanged: {\n const type = parseInt(value);\n return { ...registration, type, resource: null, price: null, inForfait: null };\n }\n case actions.resourceChanged: {\n const {\n resource,\n inForfait,\n priceOptions = null,\n absenceBalance = null,\n durationType = null,\n price,\n } = value;\n let resourceProps = {};\n if (resource !== null) {\n const { isBillable, vatPercentage, vatType, isFixedPrice } = resource;\n resourceProps = { isBillable, vatPercentage, vatType, isFixedPrice };\n }\n let { quantity } = registration;\n if (registration.type === 1 && quantity === 0) quantity = 1;\n\n let newValue = {\n ...registration,\n quantity,\n resource,\n inForfait,\n priceOptions,\n price: null,\n absenceBalance,\n\n ...resourceProps,\n };\n if (typeof price !== 'undefined')\n newValue = executeAction(newValue, actions.priceChanged, price);\n\n if (durationType !== null) {\n newValue = executeAction(newValue, actions.durationTypeChanged, durationType);\n }\n\n return newValue;\n }\n case actions.priceInfoChanged: {\n const { inForfait, priceOptions = null, price } = value;\n const newValue = {\n ...registration,\n inForfait,\n priceOptions,\n price: null,\n };\n if (typeof price === 'undefined') return newValue;\n return executeAction(newValue, actions.priceChanged, price);\n }\n case actions.setPriceOptions: {\n return {\n ...registration,\n priceOptions: value,\n };\n }\n case actions.interactionTypeChanged: {\n const type = parseInt(value, 10);\n return { ...registration, interactionType: Number.isNaN(type) ? null : type };\n }\n case actions.interactionTitleChanged: {\n let { interactionType } = registration;\n if (!value && !registration.interactionDescription) interactionType = null;\n if (value && (typeof interactionType === 'undefined' || interactionType === null))\n interactionType = 0;\n\n return { ...registration, interactionTitle: value || null, interactionType };\n }\n case actions.interactionDescriptionChanged: {\n let { interactionType } = registration;\n if (!value && !registration.interactionTitle) interactionType = null;\n if (value && (typeof interactionType === 'undefined' || interactionType === null))\n interactionType = 0;\n return { ...registration, interactionDescription: value || null, interactionType };\n }\n case actions.interactionInit: {\n const { interactionType = null, title = null, description = null, id = null } = value || {};\n return {\n ...registration,\n interactionType,\n interactionTitle: title,\n interactionDescription: description,\n interactionId: id,\n orgInteraction: value,\n };\n }\n case actions.taskChanged: {\n const {\n plannedTaskId = null,\n plannedTaskName = null,\n plannedTaskTemplateId = null,\n plannedTaskTemplateType = null,\n mainPlannedTaskId = null,\n mainPlannedTaskName = null,\n mainTaskTemplateId = null,\n updateResource = null,\n year = null,\n } = value && value.id ? value : {};\n\n const referenceYear = !year || year < 2000 ? null : year;\n\n const newValue = {\n ...registration,\n plannedTaskId,\n plannedTaskName,\n plannedTaskTemplateId,\n plannedTaskTemplateType,\n mainPlannedTaskId,\n mainPlannedTaskName,\n mainTaskTemplateId,\n referenceYear,\n };\n if (updateResource !== null) {\n // Select resource from task\n return executeAction(newValue, actions.resourceChanged, updateResource);\n }\n return newValue;\n }\n case actions.relationChanged: {\n // Select default invoicestream\n const invoiceStreamId = (value && value.invoiceStreamId) || null;\n const result = executeAction(\n {\n ...registration,\n relation: value || null,\n invoiceStreamId,\n assignmentTemplateId: getAssignmentTemplateId(value, invoiceStreamId),\n },\n actions.taskChanged,\n null,\n );\n if (\n result.relation &&\n result.resource &&\n !resourceMatchesFilters(result.resource, result.relation?.crm, result.assignmentTemplateId)\n )\n return executeAction(result, actions.resourceChanged, {\n resource: null,\n inForfait: null,\n priceOptions: null,\n price: null,\n });\n return result;\n }\n case actions.assignmentChanged: {\n const result = executeAction(\n {\n ...registration,\n invoiceStreamId: value || null,\n assignmentTemplateId: getAssignmentTemplateId(registration.relation, value || null),\n },\n actions.taskChanged,\n null,\n );\n if (\n result.relation &&\n result.resource &&\n !resourceMatchesFilters(result.resource, result.relation?.crm, result.assignmentTemplateId)\n )\n return executeAction(result, actions.resourceChanged, {\n resource: null,\n inForfait: null,\n priceOptions: null,\n price: null,\n });\n return result;\n }\n default:\n return registration;\n }\n};\n\nexport const canCreateRegistrationForUser = (userId = null) =>\n userId == null || AuthService.getUserId() === userId\n ? AuthService.hasPermission({ functionality: 'RegistrationOwn', privilege: 'Create' })\n : AuthService.hasPermission({ functionality: 'RegistrationOthers', privilege: 'Create' });\n\nexport const getCurrentTime = () => {\n const now = new Date();\n return now.getHours() * 60 + now.getMinutes();\n};\n","// Original file: https://github.com/Rob--W/open-in-browser/blob/master/extension/content-disposition.js\n// Fixed some linter errors\n/* eslint-disable */\n/**\n * Extract file name from the Content-Disposition HTTP response header.\n *\n * @param {string} contentDisposition\n * @return {string} Filename, if found in the Content-Disposition header.\n */\nexport default function getFilenameFromContentDispositionHeader(contentDisposition) {\n // This parser is designed to be tolerant and accepting of headers that do\n // not comply with the standard, but accepted by Firefox.\n\n let needsEncodingFixup = true;\n function toParamRegExp(attributePattern, flags) {\n return new RegExp(\n `(?:^|;)\\\\s*${attributePattern}\\\\s*=\\\\s*` +\n // Captures: value = token | quoted-string\n // (RFC 2616, section 3.6 and referenced by RFC 6266 4.1)\n `(` +\n `[^\";\\\\s][^;\\\\s]*` +\n `|` +\n `\"(?:[^\"\\\\\\\\]|\\\\\\\\\"?)+\"?` +\n `)`,\n flags,\n );\n }\n function textdecode(encoding, value) {\n if (encoding) {\n try {\n const decoder = new TextDecoder(encoding, { fatal: true });\n const bytes = Array.from(value, c => c.charCodeAt(0));\n if (bytes.every(code => code <= 0xff)) {\n value = decoder.decode(new Uint8Array(bytes));\n needsEncodingFixup = false;\n }\n } catch (e) {\n // TextDecoder constructor threw - unrecognized encoding.\n }\n }\n return value;\n }\n function fixupEncoding(value) {\n if (needsEncodingFixup && /[\\x80-\\xff]/.test(value)) {\n // Maybe multi-byte UTF-8.\n value = textdecode('utf-8', value);\n if (needsEncodingFixup) {\n // Try iso-8859-1 encoding.\n value = textdecode('iso-8859-1', value);\n }\n }\n return value;\n }\n function rfc2616unquote(value) {\n if (value.startsWith('\"')) {\n const parts = value.slice(1).split('\\\\\"');\n // Find the first unescaped \" and terminate there.\n for (let i = 0; i < parts.length; ++i) {\n const quotindex = parts[i].indexOf('\"');\n if (quotindex !== -1) {\n parts[i] = parts[i].slice(0, quotindex);\n parts.length = i + 1; // Truncates and stop the iteration.\n }\n parts[i] = parts[i].replace(/\\\\(.)/g, '$1');\n }\n value = parts.join('\"');\n }\n return value;\n }\n function rfc5987decode(extvalue) {\n // Decodes \"ext-value\" from RFC 5987.\n const encodingend = extvalue.indexOf(\"'\");\n if (encodingend === -1) {\n // Some servers send \"filename*=\" without encoding'language' prefix,\n // e.g. in https://github.com/Rob--W/open-in-browser/issues/26\n // Let's accept the value like Firefox (57) (Chrome 62 rejects it).\n return extvalue;\n }\n const encoding = extvalue.slice(0, encodingend);\n const langvalue = extvalue.slice(encodingend + 1);\n // Ignore language (RFC 5987 section 3.2.1, and RFC 6266 section 4.1 ).\n const value = langvalue.replace(/^[^']*'/, '');\n return textdecode(encoding, value);\n }\n function rfc2231getparam(contentDispositionRfc) {\n const matches = [];\n let match;\n // Iterate over all filename*n= and filename*n*= with n being an integer\n // of at least zero. Any non-zero number must not start with '0'.\n const iter = toParamRegExp('filename\\\\*((?!0\\\\d)\\\\d+)(\\\\*?)', 'ig');\n while ((match = iter.exec(contentDispositionRfc)) !== null) {\n let [, n, quot, part] = match;\n n = parseInt(n, 10);\n if (n in matches) {\n // Ignore anything after the invalid second filename*0.\n if (n === 0) break;\n continue;\n }\n matches[n] = [quot, part];\n }\n const parts = [];\n for (let n = 0; n < matches.length; ++n) {\n if (!(n in matches)) {\n // Numbers must be consecutive. Truncate when there is a hole.\n break;\n }\n let [quot, part] = matches[n];\n part = rfc2616unquote(part);\n if (quot) {\n part = unescape(part);\n if (n === 0) {\n part = rfc5987decode(part);\n }\n }\n parts.push(part);\n }\n return parts.join('');\n }\n\n function rfc2047decode(value) {\n // RFC 2047-decode the result. Firefox tried to drop support for it, but\n // backed out because some servers use it - https://bugzil.la/875615\n // Firefox's condition for decoding is here: https://searchfox.org/mozilla-central/rev/4a590a5a15e35d88a3b23dd6ac3c471cf85b04a8/netwerk/mime/nsMIMEHeaderParamImpl.cpp#742-748\n\n // We are more strict and only recognize RFC 2047-encoding if the value\n // starts with \"=?\", since then it is likely that the full value is\n // RFC 2047-encoded.\n\n // Firefox also decodes words even where RFC 2047 section 5 states:\n // \"An 'encoded-word' MUST NOT appear within a 'quoted-string'.\"\n\n // eslint-disable-next-line no-control-regex\n if (!value.startsWith('=?') || /[\\x00-\\x19\\x80-\\xff]/.test(value)) {\n return value;\n }\n // RFC 2047, section 2.4\n // encoded-word = \"=?\" charset \"?\" encoding \"?\" encoded-text \"?=\"\n // charset = token (but let's restrict to characters that denote a\n // possibly valid encoding).\n // encoding = q or b\n // encoded-text = any printable ASCII character other than ? or space.\n // ... but Firefox permits ? and space.\n return value.replace(\n /=\\?([\\w-]*)\\?([QqBb])\\?((?:[^?]|\\?(?!=))*)\\?=/g,\n (_, charset, encoding, text) => {\n if (encoding === 'q' || encoding === 'Q') {\n // RFC 2047 section 4.2.\n text = text.replace(/_/g, ' ');\n text = text.replace(/=([0-9a-fA-F]{2})/g, (_, hex) =>\n String.fromCharCode(parseInt(hex, 16)),\n );\n return textdecode(charset, text);\n } // else encoding is b or B - base64 (RFC 2047 section 4.1)\n try {\n text = atob(text);\n } catch (e) {\n // Ignore\n }\n return textdecode(charset, text);\n },\n );\n }\n\n // filename*=ext-value (\"ext-value\" from RFC 5987, referenced by RFC 6266).\n let tmp = toParamRegExp('filename\\\\*', 'i').exec(contentDisposition);\n let filename = null;\n if (tmp) {\n tmp = tmp[1];\n filename = rfc2616unquote(tmp);\n filename = unescape(filename);\n filename = rfc5987decode(filename);\n filename = rfc2047decode(filename);\n return fixupEncoding(filename);\n }\n\n // Continuations (RFC 2231 section 3, referenced by RFC 5987 section 3.1).\n // filename*n*=part\n // filename*n=part\n tmp = rfc2231getparam(contentDisposition);\n if (tmp) {\n // RFC 2047, section\n filename = rfc2047decode(tmp);\n return fixupEncoding(filename);\n }\n\n // filename=value (RFC 5987, section 4.1).\n tmp = toParamRegExp('filename', 'i').exec(contentDisposition);\n if (tmp) {\n tmp = tmp[1];\n filename = rfc2616unquote(tmp);\n filename = unescape(filename);\n filename = rfc2047decode(filename);\n return fixupEncoding(filename);\n }\n return '';\n}\n","import moment from 'moment';\nimport getFilenameFromContentDispositionHeader from './contentDispositionHelper';\n\nconst timeSpanRegex = /^([0-2]?[0-9]):([0-5]?[0-9])(:[0-5]?[0-9])?$/;\n// This method could be used by both the application as the Excel add-on.\n// As of december 2016, it is only implemented for Belgian VAT numbers.\nconst isValidVATNumber = (value, countryCode) => {\n if (!value) return false;\n switch (countryCode.toUpperCase()) {\n case 'BE':\n if (!/^BE [0-9]{4}[. ]?[0-9]{3}[. ]?[0-9]{3}$/.test(value)) return false;\n if (!this.isMod97Valid(value)) return false;\n return true;\n default:\n return true;\n }\n};\n// Does pretty much the same as the above function, but for enterprise numbers.\nconst isValidEnterpriseNumber = (value, countryCode) => {\n if (!value) return false;\n switch (countryCode.toUpperCase()) {\n case 'BE':\n if (!/^[0-9]{4}[. ]?[0-9]{3}[. ]?[0-9]{3}$/.test(value)) return false;\n if (!this.isMod97Valid(value)) return false;\n return true;\n default:\n return true;\n }\n};\n// Does a very simple check for now.\nconst isValidPhoneNumber = value => {\n if (!value) return false;\n if (!/^[0-9 +/()-.]{3,20}$/.test(value)) return false;\n return true;\n};\n// Check whether the email address is valid.\nconst isValidEmail = value =>\n /* eslint-disable*/\n /^(([^<>()[\\]\\\\.,;:\\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,}))$/.test(\n value.toLowerCase(),\n );\n// Performs a mod-97 check on the last two digits of the provided number.\nconst isMod97Valid = value => {\n const str = value.replace(/\\D/g, ''); // Remove all non-digits.\n const number = parseInt(str.substring(0, str.length - 2), 10);\n const check = parseInt(str.substring(str.length - 2), 10);\n return 97 - (number % 97) === check;\n};\n\nconst toPercentage = (value, total, roundDown = false) => {\n if (total === 0) return 0; // Wie deelt door nul is een snul\n\n const percentage = (value / total) * 100;\n const rounded = roundDown ? Math.floor(percentage) : percentage.toFixed(0);\n\n return parseFloat(rounded);\n};\nconst getFileNameFromHeader = header => {\n if (!header) return null;\n try {\n var fileName = getFilenameFromContentDispositionHeader(header);\n if (!!fileName) return fileName;\n } catch (e) {\n //ignore\n }\n //Old method\n var result = header\n .split(';')[1]\n .trim()\n .split('=')[1];\n return result.replace(/\"/g, '');\n};\n\nconst arrayBufferToObject = arrayBuffer => {\n if (!arrayBuffer) return null;\n const bufferString = String.fromCharCode.apply(null, new Uint8Array(arrayBuffer));\n if (bufferString) {\n const errorObject = JSON.parse(bufferString);\n return errorObject;\n }\n return {};\n};\n\nconst toCamel = o => {\n let newO;\n let origKey;\n let newKey;\n let value;\n if (o instanceof Array) {\n return o.map(value => {\n if (typeof value === 'object') {\n value = toCamel(value);\n }\n return value;\n });\n }\n newO = {};\n for (origKey in o) {\n if (o.hasOwnProperty(origKey)) {\n newKey = (origKey.charAt(0).toLowerCase() + origKey.slice(1) || origKey).toString();\n value = o[origKey];\n if (value instanceof Array || (value !== null && value.constructor === Object)) {\n value = toCamel(value);\n }\n newO[newKey] = value;\n }\n }\n\n return newO;\n};\nconst removeDuplicateSpaces = value => {\n if (!value) return value;\n return value.replace(/[ ]{2,}/g, ' ').trim();\n};\nconst dayMonthDate = date => {\n if (!date) return date;\n const toDate = !moment.isMoment(date);\n\n let momentDate = moment.utc(date);\n if (!momentDate.isSame(moment.utc(date).startOf('day'))) {\n //Force conversion to utc\n momentDate = moment(date)\n .utcOffset(0)\n .utc(true);\n }\n momentDate = momentDate.set('year', 2000);\n\n return toDate ? momentDate.toDate() : momentDate;\n};\nconst base64ToArrayBuffer = base64 => {\n var binaryString = window.atob(base64);\n var binaryLen = binaryString.length;\n var bytes = new Uint8Array(binaryLen);\n for (var i = 0; i < binaryLen; i++) {\n var ascii = binaryString.charCodeAt(i);\n bytes[i] = ascii;\n }\n return bytes;\n};\nconst splitTimeArray = totalMinutes => {\n if (Number.isNaN(totalMinutes)) return [0, 0];\n const hour = Math.floor(totalMinutes / 60);\n const minute = Math.abs(totalMinutes) % 60;\n return [hour, minute];\n};\nconst splitTimeObj = totalMinutes => {\n if (Number.isNaN(totalMinutes)) return { hour: 0, minute: 0 };\n const hour = Math.floor(totalMinutes / 60);\n const minute = Math.abs(totalMinutes) % 60;\n return { hour, minute };\n};\nconst joinTime = (hour, minute) => {\n const sign = hour < 0 ? -1 : 1;\n return Math.round(sign * (Math.abs(hour) || 0) * 60 + (minute || 0));\n};\nconst decimalParser = value => {\n if (value === null) return null;\n if (typeof value === 'undefined') return null;\n if (typeof value === 'number') return value;\n let parsed;\n if (typeof value === 'string') {\n parsed = Number.parseFloat(value.replace(',', '.'));\n } else {\n parsed = Number.parseFloat(value);\n }\n if (Number.isNaN(parsed)) return value;\n return parsed;\n};\n//Case insensitive equals for strings\nconst ciEquals = (a, b) => {\n return typeof a === 'string' && typeof b === 'string'\n ? a.localeCompare(b, undefined, { sensitivity: 'accent' }) === 0\n : a === b;\n};\nconst timeSpanToMinutes = value => {\n if (!value) return 0;\n var match = value.match(timeSpanRegex);\n if (!match) return 0;\n const hour = parseInt(match[1], 10);\n const minute = parseInt(match[2], 10);\n return joinTime(hour, minute);\n};\nexport const minutesToTimeSpan = (totalMinutes, withSeconds = false) => {\n var sign = totalMinutes < 0 ? '-' : '';\n var h = Math.floor(Math.abs(totalMinutes) / 60);\n var m = Math.abs(totalMinutes) % 60;\n return sign + h + ':' + (m < 10 ? '0' : '') + m + (withSeconds ? ':00' : '');\n};\nexport const hoursToTimeSpan = totalHours => {\n var totalMinutes = Math.round(totalHours * 60);\n return minutesToTimeSpan(totalMinutes);\n};\n\nconst roundAmount = (initialAmount, roundingMethod, roundingDecimals) => {\n const digits = Math.max(Math.min(roundingDecimals, 5), 0); //Should be a number between 0 and 5\n const factor = Math.pow(10, digits);\n switch (roundingMethod) {\n case 0: //Normal\n return Math.round(initialAmount * factor) / factor;\n case 1: //Round up\n return Math.ceil(initialAmount * factor) / factor;\n case 2: //Round down\n return Math.floor(initialAmount * factor) / factor;\n }\n return initialAmount;\n};\n\nconst roundAwayFromZero = value => {\n // toFixed(2) does not round correctly in some case\n // example:\n // base amount = 1.5\n // discount of 5%, so we multiple base with 0.95\n // in js this results in a taxable amount of 1.4249999999999998 because all numbers are floats)\n // but we want 1.43 as result (same as c# backend calculations)\n // https://stackoverflow.com/questions/11832914/how-to-round-to-at-most-2-decimal-places-if-necessary\n return Math.round((value + Number.EPSILON) * 100) / 100;\n};\n\nconst roundToHalfDecimal = value => {\n if (value === null || typeof value === 'undefined') return value;\n return (Math.sign(value) * Math.ceil(Math.abs(value) * 2)) / 2;\n};\nconst roundToSteps = (value, steps = 0.5) => {\n const factor = 1 / steps;\n if (value === null || typeof value === 'undefined') return value;\n return (Math.sign(value) * Math.ceil(Math.abs(value) * factor)) / factor;\n};\n\nconst calculateIndexedAmount = (\n initialAmount,\n method,\n amountOrPercentage,\n roundingMethod,\n roundingDecimals,\n) => {\n switch (method) {\n case 0: {\n //Percentage\n const percentage = amountOrPercentage / 100;\n const percentageAmount = initialAmount * percentage;\n return roundAmount(initialAmount + percentageAmount, roundingMethod, roundingDecimals);\n }\n case 1: {\n //AddFixedAmount\n return initialAmount + amountOrPercentage;\n }\n case 2: {\n //NewAmount (replace)\n return amountOrPercentage;\n }\n default: {\n console.warn('Unknown updateAmountMethod: ' + method);\n return initialAmount;\n }\n }\n};\nconst randomAmount = () => {\n return Math.round(Math.random() * 100000) / 100;\n};\n\nconst toDateOnly = value => {\n if (!value) return null;\n if (typeof value === 'string') return moment.utc(value.substr(0, 10)).toDate();\n if (value instanceof Date) return moment.utc(value.ISO()).toDate();\n return moment\n .utc(\n moment\n .utc(value)\n .toDate()\n .ISO(),\n )\n .toDate();\n};\nconst toMomentDateOnly = value => {\n if (!value) return null;\n if (typeof value === 'string') return moment.utc(value.substr(0, 10));\n if (value instanceof Date) return moment.utc(value.ISO());\n return moment.utc(\n moment\n .utc(value)\n .toDate()\n .ISO(),\n );\n};\n\nexport const parseIntOrNull = value => {\n if (value === null) return null;\n if (typeof value === 'undefined') return null;\n var intValue = parseInt(value);\n if (Number.isNaN(intValue)) return null;\n return intValue;\n};\n\nconst ogmRegex = /\\+*([0-9]{3})\\/?([0-9]{4})\\/?([0-9]{5})\\+*/g;\nexport const formatOGM = value => {\n if (!value || typeof value !== 'string') return value;\n return value.replace(ogmRegex, '+++$1/$2/$3+++');\n};\n\nconst adminpulse = {\n isValidVATNumber,\n isValidEnterpriseNumber,\n isValidPhoneNumber,\n isValidEmail,\n isMod97Valid,\n toPercentage,\n getFileNameFromHeader,\n arrayBufferToObject,\n toCamel,\n removeDuplicateSpaces,\n dayMonthDate,\n base64ToArrayBuffer,\n splitTimeArray,\n splitTimeObj,\n joinTime,\n decimalParser,\n ciEquals,\n timeSpanToMinutes,\n minutesToTimeSpan,\n hoursToTimeSpan,\n calculateIndexedAmount,\n roundAmount,\n randomAmount,\n toDateOnly,\n toMomentDateOnly,\n parseIntOrNull,\n roundAwayFromZero,\n roundToHalfDecimal,\n roundToSteps,\n};\n\nexport default adminpulse;\n","import { defineMessages } from 'react-intl';\n\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\n\nconst messages = defineMessages({\n DefaultAssignment: 'Default Assignment',\n});\n\nexport const mapResourceName = (\n resource,\n intl,\n withoutCode = false,\n withoutCategoryPrefix = false,\n) => {\n if (!resource) return '';\n const codePrefix = resource.code && !withoutCode ? `${resource.code} – ` : '';\n if (resource.categoryId && !withoutCategoryPrefix) {\n const categoryName = intl.formatMessage(\n listItemMsg('resourcecategory', resource.categoryId, resource.categoryName),\n );\n if (resource.isDefault) return `${codePrefix}${categoryName}`;\n return `${codePrefix}${categoryName}: ${intl.formatMessage(\n listItemMsg('resource', resource.id ?? resource.resourceId, resource.name),\n )}`;\n }\n return `${codePrefix}${intl.formatMessage(\n listItemMsg('resource', resource.id ?? resource.resourceId, resource.name),\n )}`;\n};\n\nexport const mapInvoiceStreamName = (stream, intl, defaultName = undefined) => {\n if (!stream) return '';\n if (!stream.assignmentId)\n return typeof defaultName !== 'undefined'\n ? defaultName\n : intl.formatMessage(messages.DefaultAssignment);\n\n if (!stream.assignmentTemplateId) return stream.assignmentName;\n return intl.formatMessage(\n listItemMsg('assignmenttemplate', stream.assignmentTemplateId, stream.assignmentName),\n );\n};\n\nexport const mapAssignmentGroupName = (assignmentTemplateId, assignmentName, intl) =>\n assignmentTemplateId\n ? intl.formatMessage(listItemMsg('assignmenttemplate', assignmentTemplateId, assignmentName))\n : assignmentName || intl.formatMessage(messages.DefaultAssignment);\n\nexport const mapRegTaskName = (task, intl) => {\n if (!task || !task.plannedTaskId) return '';\n let taskName = task.plannedTaskName || '';\n if (!taskName && task.plannedTaskTemplateId) {\n taskName = intl.formatMessage(listItemMsg('taskTemplate', task.plannedTaskTemplateId));\n }\n if (!task.mainPlannedTaskId || task.mainPlannedTaskId === task.plannedTaskId) {\n return taskName;\n }\n\n let mainTaskName = task.mainPlannedTaskName || '';\n if (!mainTaskName && task.mainTaskTemplateId) {\n mainTaskName = intl.formatMessage(listItemMsg('taskTemplate', task.mainTaskTemplateId));\n }\n\n return mainTaskName ? `${mainTaskName} - ${taskName}` : taskName;\n};\n\nexport const getShareItemNameForTask = (task, intl) => {\n if (!task) return null;\n const taskName =\n task.name ||\n intl.formatMessage(listItemMsg('tasktemplate', task.templateId, task.templateName));\n\n if (task.parent) {\n const parentName = getShareItemNameForTask(task.parent, intl);\n return parentName ? `${parentName} - ${taskName}` : taskName;\n }\n if (task.mainTaskId && task.mainTaskId !== task.id) {\n // tasklist\n if (task.mainTaskName) return `${task.mainTaskName} - ${taskName}`;\n if (task.mainTemplateId) {\n const parentName = intl.formatMessage(listItemMsg('tasktemplate', task.mainTemplateId));\n return parentName ? `${parentName} - ${taskName}` : taskName;\n }\n }\n\n return taskName;\n};\n\nconst mapSuggestedMailAddressInternal = (x, translateListFunc) => {\n if (!x) return '';\n if (!x.emailAddress) return '';\n let label = x.emailAddress;\n if (x.relationName) {\n label += ` - ${x.relationName}`;\n }\n if (x.linkType !== null && translateListFunc) {\n const linkType = translateListFunc('linkTypeTo', x.linkType, '');\n if (linkType) label += ` (${linkType})`;\n if (x.isMain) {\n // Main address for link\n label += ' ☆';\n }\n } else if (x.isMain) {\n // Main address for main relation\n label += ' 🟊';\n }\n if (x.purposes && x.purposes.length > 0 && translateListFunc) {\n const purposes = x.purposes.map(p => translateListFunc('purpose', p, '')).join(', ');\n label += ` [${purposes}]`;\n }\n return label;\n};\nconst intlTranslateFunc = intl => (list, id, fallback) =>\n intl.formatMessage(listItemMsg(list, id, fallback));\n\nconst angularFilterTranslateFunc = $filter => (list, id, fallback) =>\n $filter('translateList')(id, list, fallback);\n\nexport const mapSuggestedMailAddress = (address, intl) =>\n mapSuggestedMailAddressInternal(address, intlTranslateFunc(intl));\n\nexport const mapSuggestedMailAddressAngularFilter = (address, $filter) =>\n mapSuggestedMailAddressInternal(address, angularFilterTranslateFunc($filter));\n\nexport default {\n mapResourceName,\n mapInvoiceStreamName,\n mapRegTaskName,\n mapSuggestedMailAddress,\n mapSuggestedMailAddressAngularFilter,\n};\n","import React, { Component } from 'react';\nimport Downshift from 'downshift';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport debounce from 'lodash-es/debounce';\nimport { defineMessages, injectIntl } from 'react-intl';\nimport Button from '../../Button';\nimport Item from './Item';\n\nconst messages = defineMessages({\n Search: 'Search',\n LoadingProgress: 'Loading...',\n ErrorLoadingData: 'Error loading data',\n NoItems: 'No items',\n Clear: 'Clear',\n StartTypingToSearch: 'Start typing to search',\n});\n\nclass AutoComplete extends Component {\n hadFocus = false;\n\n static propTypes = {\n placeholder: PropTypes.string,\n onChange: PropTypes.func.isRequired,\n disabled: PropTypes.bool,\n emptyLabel: PropTypes.string,\n loadFunc: PropTypes.func,\n // Trigger load function when component is loaded (with empty value)\n loadOnInit: PropTypes.bool,\n initialSelectedItem: PropTypes.shape({\n key: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,\n label: PropTypes.string.isRequired,\n }),\n value: PropTypes.shape({\n key: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,\n label: PropTypes.string.isRequired,\n }),\n items: PropTypes.arrayOf(\n PropTypes.shape({\n key: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,\n label: PropTypes.string.isRequired,\n disabled: PropTypes.bool,\n }),\n ),\n autoFocus: PropTypes.bool,\n canClear: PropTypes.bool,\n isSmall: PropTypes.bool,\n\n /** can be auto, edit or readOnly. auto will make the input togglable between edit and readOnly */\n mode: PropTypes.string,\n /** Errormessage and indicator if element should render in error state */\n error: PropTypes.string,\n /** Handle onFocus events */\n onFocus: PropTypes.func,\n /** Handle onBlur events */\n onBlur: PropTypes.func,\n /** Callback that is called when user clears selection */\n onClear: PropTypes.func,\n /** Specify custom filter to search items */\n filterFunc: PropTypes.func,\n /** Specify custom classname for items */\n itemClassNameFunc: PropTypes.func /* (item)=>classname string or object */,\n };\n\n static defaultProps = {\n placeholder: null,\n disabled: false,\n value: null,\n emptyLabel: null,\n items: null,\n loadFunc: undefined,\n mode: 'auto',\n error: undefined,\n initialSelectedItem: undefined,\n autoFocus: false,\n canClear: true,\n loadOnInit: false,\n onFocus: () => {},\n onBlur: () => {},\n onClear: () => {},\n filterFunc: (item, inputValue) =>\n !inputValue || (item.label && item.label.toUpperCase().includes(inputValue.toUpperCase())),\n itemClassNameFunc: undefined,\n isSmall: false,\n };\n\n constructor(props) {\n super(props);\n const { items } = props;\n\n this.state = {\n inputValue: null,\n loading: false,\n hasError: false,\n items,\n mode: props.mode === 'auto' ? 'readOnly' : props.mode,\n currentInputValue: '',\n };\n }\n\n /* ----------------------------------------------------------------------------------- */\n\n renderInput() {\n const { mode: stateMode } = this.state;\n const { mode, value, intl, autoFocus } = this.props;\n const readOnly = stateMode !== 'edit';\n const className = classNames({\n 'TextInput--readOnly': readOnly,\n 'form-control TextInput--edit': !readOnly,\n 'TextInput--editable': mode === 'auto' && readOnly,\n });\n\n const propsContainer = {\n className,\n placeholder: intl.formatMessage(messages.Search),\n value: value ? value.label : '',\n readOnly,\n onFocus: this.handleFocus,\n onBlur: this.handleInputBlur,\n ref: input => {\n this.inputElement = input;\n },\n autoFocus,\n };\n\n return ;\n }\n\n handleInputBlur = event => {\n // Don't blur when the dropdown button is clicked\n if (event.relatedTarget && event.relatedTarget.id === 'dropdownButton') return;\n\n const { onBlur, mode, error } = this.props;\n\n if (error) {\n // When there is an error set focus back to input\n event.target.focus();\n return;\n }\n if (this.inputElement) {\n this.inputElement.blur();\n }\n\n this.setState(state => ({\n ...state,\n mode: mode === 'auto' ? 'readOnly' : mode,\n }));\n\n onBlur(event);\n };\n\n handleFocus = event => {\n const { onFocus, mode } = this.props;\n\n this.setState(state => ({\n ...state,\n mode: mode === 'auto' ? 'edit' : mode,\n }));\n\n onFocus(event);\n };\n\n componentDidUpdate(prevProps) {\n const { error, items } = this.props;\n\n if (prevProps.error !== error && error) {\n this.inputElement.focus();\n }\n\n if (prevProps.items !== items) {\n this.setState(state => ({\n ...state,\n items,\n }));\n }\n }\n componentDidMount() {\n const { loadFunc, loadOnInit } = this.props;\n if ((loadFunc, loadOnInit)) {\n const { inputValue } = this.state;\n this.setState({ loading: true });\n this.debouncedLoadFunc(inputValue);\n }\n }\n\n /* ----------------------------------------------------------------------------------- */\n\n renderTypeahead({ getInputProps, getToggleButtonProps, clearSelection, selectHighlightedItem }) {\n const {\n disabled,\n onClear,\n intl,\n placeholder,\n autoFocus,\n onChange,\n canClear,\n loadFunc,\n inputRef,\n isSmall,\n } = this.props;\n const { items } = this.state;\n this.hadFocus = false;\n\n const inputProps = getInputProps({\n placeholder: placeholder || intl.formatMessage(messages.Search),\n onBlur: this.handleInputBlur,\n onChange: e => {\n if (e.target.value === '') {\n clearSelection(); // Call downshift method\n onClear(); // Call props method to propogate to upper component\n if (loadFunc) {\n this.setState({ items: [] });\n }\n } else {\n const inputValueFoundInList =\n items && items.length > 0 && items.map(x => x.label).includes(e.target.value);\n if (!inputValueFoundInList && loadFunc) {\n this.loadItems(e.target.value);\n }\n }\n },\n onKeyDown: e => {\n if (e.key === 'Tab') {\n selectHighlightedItem();\n }\n },\n ref: input => {\n this.inputElement = input;\n },\n });\n\n return (\n
\n \n\n {/* if we cant clear the value, we want to always show a dropdown button so that another value can be selected */}\n {(!inputProps.value || !canClear) && (\n \n {\n this.dropdownButtonRef = buttonDOM;\n }}\n {...getToggleButtonProps()}\n >\n \n \n \n )}\n\n {!disabled && canClear && inputProps.value && (\n \n {\n clearSelection(); // Call downshift method\n onClear(); // Call props method to propogate to upper component\n onChange(null);\n }}\n >\n \n \n \n )}\n
\n );\n }\n\n renderMenu({ isOpen, getMenuProps, selectedItem, highlightedIndex, getItemProps, inputValue }) {\n const { items, loading, hasError } = this.state;\n const { loadFunc, intl, filterFunc, canClear, renderItem, itemClassNameFunc } = this.props;\n\n let filteredItems = items;\n\n const inputValueFoundInList =\n items && items.length > 0 && items.map(x => x.label).includes(inputValue);\n\n // if load function was passed, filtering is done by backend\n // otherwise, filter the items based on its label\n if (\n (isOpen &&\n items &&\n items.length > 0 &&\n !loadFunc &&\n // we dont want to filter the selection list when a value was selected and the clear button is not present (only a dropdown button to select another value)\n canClear) ||\n (!canClear && !inputValueFoundInList)\n ) {\n filteredItems = filteredItems.filter(item => filterFunc(item, inputValue));\n }\n\n return (\n
\n \n {isOpen &&\n filteredItems &&\n filteredItems.length > 0 &&\n filteredItems.map((item, index) => (\n \n ))}\n\n {isOpen && (\n \n {loading && intl.formatMessage(messages.LoadingProgress)}\n {!loading && hasError && intl.formatMessage(messages.errorLoadingData)}\n {!loading &&\n !hasError &&\n (!filteredItems || filteredItems.length < 1) &&\n inputValue &&\n intl.formatMessage(messages.NoItems)}\n {!loading &&\n !hasError &&\n (!filteredItems || filteredItems.length < 1) &&\n !inputValue &&\n intl.formatMessage(messages.StartTypingToSearch)}\n \n )}\n \n
\n );\n }\n\n // debounce makes sure that if this method is called again within 300 ms, only the last call is executed.\n // This is used to ignore user input when typing the next letter within 300 ms.\n debouncedLoadFunc = debounce(newInputValue => {\n const { loadFunc } = this.props;\n this.setState({ loading: true });\n loadFunc(newInputValue)\n .then(items => {\n this.setState(state => ({\n ...state,\n inputValue: newInputValue,\n loading: false,\n hasError: false,\n items,\n }));\n })\n .catch(() => {\n this.setState(state => ({\n ...state,\n inputValue: newInputValue,\n loading: false,\n hasError: true,\n }));\n });\n }, 1000);\n\n loadItems = newInputValue => {\n const { inputValue } = this.state;\n if (inputValue === newInputValue || !newInputValue) return;\n this.setState({ loading: true });\n this.debouncedLoadFunc(newInputValue);\n };\n\n onSelectedItemChanged(item) {\n const { onChange } = this.props;\n onChange(item);\n }\n\n render() {\n const { value, error, initialSelectedItem } = this.props;\n const { mode: stateMode } = this.state;\n const readOnly = stateMode !== 'edit';\n const classname = classNames({\n 'form-group': true,\n 'has-error has-feedback': error,\n 'has-feedback': !value,\n });\n\n if (readOnly) {\n return (\n
\n {this.renderInput()}\n
\n );\n }\n\n return (\n this.onSelectedItemChanged(selectedItem)}\n onStateChange={this.handleStateChange}\n initialSelectedItem={initialSelectedItem}\n selectedItem={value || initialSelectedItem || null}\n itemToString={item => (item ? item.label : '')}\n >\n {downshiftProps => (\n
\n {this.renderTypeahead(downshiftProps)}\n {this.renderMenu(downshiftProps)}\n
\n )}\n \n );\n }\n}\n\nexport default injectIntl(AutoComplete);\n","import { createIntl } from 'react-intl';\nimport zendesk from '@/zendesk';\n\nlet $translate = null;\n\nlet isReady = false;\nlet $timeout = null;\nlet version = 0;\nlet intl = null;\nconst reloadListeners = [];\n\nconst changeDoubleBracesToSingle = value => {\n if (!value) return value;\n if (value.indexOf('{') < 0 || value.indexOf('}') < 0) return value; // Check if there are braces, this is faster than doing the replace regex on all values.\n return value.replace(/\\{\\{\\s*([^}]+)\\s*\\}\\}/g, '{$1}');\n};\n\nconst getLocale = () => ($translate ? $translate.use() : '');\nconst getTranslations = locale => ($translate ? $translate.getTranslationTable(locale) : []);\n\nconst initIntlObject = () => {\n const locale = getLocale();\n\n zendesk.setLocale(locale);\n\n const translations = getTranslations(locale);\n\n const messages = Object.keys(translations).reduce((o, key) => {\n if (key.indexOf(' ') >= 0) return o; // Translation keys in react can't use spaces, so we filter them out to save some memory.\n // eslint-disable-next-line no-param-reassign\n o[key] = changeDoubleBracesToSingle(translations[key]); // See comment above function\n return o;\n }, {});\n\n intl = createIntl({ locale, messages });\n};\n\nexport const translate = message => {\n if (!intl) {\n console.warn('intl object is empty');\n }\n return intl.formatMessage(message);\n};\n\nexport const initTranslateService = (angularTranslate, angularTimeout) => {\n $translate = angularTranslate;\n $timeout = angularTimeout;\n\n if ($translate) {\n if ($translate.isReady()) {\n isReady = true;\n version += 1;\n initIntlObject();\n } else {\n // Still loading translations, wait for it to finish and then init translations\n $translate.onReady(() => {\n isReady = true;\n version += 1;\n initIntlObject();\n });\n }\n } else {\n isReady = false;\n }\n};\n\nconst reloadTranslations = lang => {\n if (!$timeout || !$translate) return;\n $timeout(() => {\n $translate.refresh(lang).then(() => {\n version += 1;\n reloadListeners.forEach(l => l(version));\n });\n }, 0);\n};\n\nexport default {\n isReady,\n translate,\n getIntl: () => intl,\n getVersion: () => version,\n reload: reloadTranslations,\n onLocaleChanged: initIntlObject,\n onReload: listener => reloadListeners.push(listener),\n offReload: listener => {\n const idx = reloadListeners.indexOf(listener);\n if (idx >= 0) reloadListeners.splice(idx, 1);\n },\n};\n","import moment from 'moment';\n\nexport function Registration(data) {\n //ejohn.org/blog/javascript-getters-and-setters\n // ReSharper disable MisuseOfOwnerFunctionThis\n this.date = new Date();\n this.relation = null;\n this.invoiceStreamId = null;\n this.invoiceStream = null;\n this.resource = null;\n this.type = null;\n this.resourceDescription = '';\n this.isBillable = true;\n this.inForfait = null;\n this.vatPercentage = 0.0;\n this.vatType = 0;\n this.remark = '';\n this.internalRemark = '';\n this.isBilled = false;\n this.interactionId = null;\n this.interactionType = null;\n this.interactionDescription = null;\n this.interactionTitle = null;\n this.neverInvoice = false;\n this.taskName = null;\n this.plannedTaskId = null;\n this.plannedTaskName = null;\n this.plannedTaskTemplateId = null;\n this.plannedTaskTemplateType = null;\n this.mainPlannedTaskId = null;\n this.mainPlannedTaskName = null;\n this.mainTaskTemplateId = null;\n this.referenceYear = null;\n this.isFixedPrice = false;\n\n this.validate = function() {\n return (\n this.validateTo() &&\n this.validateDuration() &&\n this.validateAmount &&\n this.validateQuantity() &&\n this.validateDescription()\n );\n };\n this.invalidDescription = false;\n\n this.__defineGetter__('hasResource', function() {\n return this.resource && this.resource.id;\n });\n\n this.__defineGetter__('resourceName', function() {\n if (!this.resource) return null;\n return (this.resource.isOther ? this.resourceDescription : null) || this.resource.name;\n });\n this.__defineGetter__('fullRemark', function() {\n return (this.remark || '') + ' ' + (this.internalRemark || '');\n });\n\n this.__defineGetter__('hasNoPrice', function() {\n return (this.resource || this.resourceDescription) && !this.price && !this.amount;\n });\n //From\n var fromHour = 0;\n var fromMinute = 0;\n this.__defineGetter__('fromHour', function() {\n return fromHour;\n });\n this.__defineSetter__('fromHour', function(value) {\n fromHour = value;\n if (value * 60 + fromMinute <= this.toMinutes) {\n this.durationMinutes = this.toMinutes - this.fromMinutes;\n }\n });\n this.__defineGetter__('fromMinute', function() {\n return fromMinute;\n });\n this.__defineSetter__('fromMinute', function(value) {\n fromMinute = value;\n if (fromHour * 60 + value <= this.toMinutes) {\n this.durationMinutes = this.toMinutes - this.fromMinutes;\n }\n });\n\n this.__defineGetter__('fromMinutes', function() {\n return fromHour * 60 + fromMinute;\n });\n this.setFromMinutes = function(value) {\n fromHour = parseInt(value / 60);\n fromMinute = parseInt(value - fromHour * 60);\n };\n this.__defineSetter__('fromMinutes', function(value) {\n if (this.fromMinutes !== value) this.setToMinutes(value + this.durationMinutes);\n this.setFromMinutes(value);\n });\n\n this.__defineGetter__('fromFormatted', function() {\n return fromHour + ':' + (fromMinute < 10 ? '0' : '') + fromMinute;\n });\n\n //To\n var toHour = 0;\n var toMinute = 0;\n this.invalidTo = false;\n\n this.__defineGetter__('toHour', function() {\n return toHour;\n });\n this.__defineSetter__('toHour', function(value) {\n toHour = value;\n //if (value * 60 + toMinute >= this.fromMinutes) {\n this.durationMinutes = this.toMinutes - this.fromMinutes;\n //}\n this.validateTo();\n });\n this.__defineGetter__('toMinute', function() {\n return toMinute;\n });\n this.__defineSetter__('toMinute', function(value) {\n toMinute = value;\n //if (toHour * 60 + value >= this.fromMinutes) {\n this.durationMinutes = this.toMinutes - this.fromMinutes;\n //}\n this.validateTo();\n });\n\n this.__defineGetter__('toMinutes', function() {\n return toHour * 60 + toMinute;\n });\n this.setToMinutes = function(value) {\n toHour = parseInt(value / 60);\n toMinute = parseInt(value - toHour * 60);\n this.validateTo();\n };\n this.__defineSetter__('toMinutes', function(value) {\n if (this.toMinutes !== value) this.setDurationMinutes(value - this.fromMinutes);\n this.setToMinutes(value);\n });\n\n this.__defineGetter__('toFormatted', function() {\n return toHour + ':' + (toMinute < 10 ? '0' : '') + toMinute;\n });\n\n this.validateTo = function() {\n this.invalidTo =\n this.type === 0 &&\n this.resource &&\n (!this.resource.isOther || !!this.resourceDescription) &&\n this.toMinutes <= this.fromMinutes; //To must exceed from.\n return !this.invalidTo;\n };\n\n //Duration\n var durationHour = 0;\n var durationMinute = 0;\n this.invalidDuration = false;\n\n this.__defineGetter__('durationHour', function() {\n return durationHour;\n });\n this.__defineSetter__('durationHour', function(value) {\n durationHour = value;\n this.toMinutes = this.fromMinutes + this.durationMinutes;\n if (this.validateDuration()) this.tempTotal = null;\n });\n\n this.__defineGetter__('durationMinute', function() {\n return durationMinute;\n });\n this.__defineSetter__('durationMinute', function(value) {\n durationMinute = value;\n this.toMinutes = this.fromMinutes + this.durationMinutes;\n if (this.validateDuration()) this.tempTotal = null;\n });\n\n this.__defineGetter__('durationMinutes', function() {\n return durationHour * 60 + durationMinute;\n });\n this.setDurationMinutes = function(value) {\n durationHour = parseInt(value / 60);\n durationMinute = parseInt(value - durationHour * 60);\n if (this.validateDuration()) this.tempTotal = null;\n };\n this.__defineSetter__('durationMinutes', function(value) {\n if (this.durationMinutes !== value) this.setToMinutes(this.fromMinutes + value);\n this.setDurationMinutes(value);\n });\n\n this.__defineGetter__('durationFormatted', function() {\n return durationHour + ':' + (durationMinute < 10 ? '0' : '') + durationMinute;\n });\n\n this.validateDuration = function() {\n this.invalidDuration =\n this.type === 0 && this.resource && this.toMinutes <= 0 && this.durationMinutes <= 0; //To nor duration.\n return !this.invalidDuration;\n };\n this.validateDescription = function() {\n let validateDescription = false;\n\n if (this.type === 0 && this.toMinutes > 0 && this.durationMinutes > 0) {\n validateDescription = true;\n }\n if ((this.type === 1 || this.type === 2) && this.amount > 0) {\n validateDescription = true;\n }\n\n if (!validateDescription) return true;\n\n this.invalidDescription = !this.resource || !this.resource.name;\n\n return !this.invalidDescription;\n };\n //Quantity\n var quantity = 0.0;\n this.invalidQuantity = false;\n\n this.__defineGetter__('quantity', function() {\n return quantity;\n });\n this.__defineSetter__('quantity', function(value) {\n quantity = value;\n if (this.validateQuantity()) this.tempTotal = null;\n });\n\n this.validateQuantity = function() {\n this.invalidQuantity = this.resource && this.quantity <= 0 && this.type === 1; //Required quantity.\n return !this.invalidQuantity;\n };\n\n //Amount\n var amount = 0.0;\n this.invalidAmount = false;\n\n this.__defineGetter__('amount', function() {\n return amount;\n });\n this.__defineSetter__('amount', function(value) {\n amount = value;\n if (this.price && this.price.amount !== amount) this.price = null;\n if (this.validateAmount()) this.tempTotal = null;\n });\n\n this.__defineGetter__('displayAmount', function() {\n return this.quantity > 0 ? this.amount : 0;\n });\n this.__defineSetter__('displayAmount', function(value) {\n this.amount = value;\n });\n\n this.__defineGetter__('fractionSize', function() {\n var n = amount ? amount.getFractionSize() : 0;\n return n > 2 ? n : 2;\n });\n\n this.validateAmount = function() {\n this.invalidAmount = this.resource && this.amount <= 0; //Required amount.\n return !this.invalidAmount;\n };\n\n //Price\n var price = null;\n var priceOptions = null;\n\n this.__defineGetter__('price', function() {\n return price;\n });\n this.__defineSetter__('price', function(value) {\n price = value;\n if (price) {\n this.amount = price.amount;\n }\n });\n\n //Amount\n var discountPercentage = 0.0;\n\n this.__defineGetter__('discountPercentage', function() {\n return discountPercentage;\n });\n this.__defineSetter__('discountPercentage', function(value) {\n discountPercentage = value;\n });\n\n //VAT percentage\n this.setVatRate = function(vatRate, vatType) {\n this.vatPercentage = vatRate;\n this.vatType = vatType;\n };\n\n //Total\n this.tempTotal = null;\n this.__defineGetter__('total', function() {\n if (this.tempTotal !== null) return this.tempTotal;\n var sum;\n if (this.type === 0 && this.isFixedPrice) {\n sum = this.amount;\n } else if (this.durationMinutes > 0) {\n sum = (parseFloat(this.durationMinutes) / 60) * this.amount;\n } else if (this.type == 1 && this.quantity < 0) {\n sum = this.amount;\n } else {\n sum = this.quantity * this.amount;\n }\n sum = sum * (1 - this.discountPercentage);\n\n return Math.round(sum * 100) / 100;\n });\n this.__defineSetter__('total', function(value) {\n var sum = Math.abs(parseFloat(value));\n if (isNaN(sum)) {\n this.tempTotal = '';\n return 0;\n }\n this.tempTotal = null;\n var quantity = 1;\n if (this.type === 0 && this.isFixedPrice) {\n quantity = 1;\n } else if (this.durationMinutes > 0) {\n quantity = this.durationMinutes / 60;\n } else if (this.quantity > 0) {\n quantity = this.quantity;\n }\n var prevTotal = quantity * this.amount;\n this.discountPercentage = prevTotal === 0 ? 0 : (prevTotal - sum) / (prevTotal * 1.0);\n //if (prevTotal >= sum) {\n\n //} else {\n // this.discountPercentage = 0;\n // this.amount = sum / quantity;\n //}\n });\n\n //Methods\n this.add = function(minutes) {\n if (this.toMinutes + minutes < 1440) {\n //1440 = 24h\n this.durationMinutes += minutes;\n }\n };\n\n this.round = function(minutes) {\n //stackoverflow.com/questions/4968250/how-to-round-time-to-the-nearest-quarter-hour-in-javascript\n this.durationMinutes = Math.round(this.durationMinutes / minutes, 10) * minutes;\n\n if (this.toHour > 23) {\n this.toHour = 23;\n this.toMinute = 59;\n }\n };\n\n this.initTime = function(fromHour, fromMinute, durationMinutes) {\n this.toMinutes = fromHour * 60 + fromMinute + durationMinutes;\n this.fromHour = fromHour; //Must be set after the to-time due to the validation.\n this.fromMinute = fromMinute;\n };\n\n this.setTaskFields = function({\n plannedTaskId = null,\n plannedTaskName = null,\n plannedTaskTemplateId = null,\n plannedTaskTemplateType = null,\n mainPlannedTaskId = null,\n mainPlannedTaskName = null,\n mainTaskTemplateId = null,\n year = null,\n } = {}) {\n this.plannedTaskId = plannedTaskId;\n this.plannedTaskName = plannedTaskName;\n this.plannedTaskTemplateId = plannedTaskTemplateId;\n this.plannedTaskTemplateType = plannedTaskTemplateType;\n this.mainPlannedTaskId = mainPlannedTaskId;\n this.mainPlannedTaskName = mainPlannedTaskName;\n this.mainTaskTemplateId = mainTaskTemplateId;\n this.referenceYear = !year || year < 2000 ? null : year;\n };\n this.clearTaskFields = function() {\n this.setTaskFields();\n };\n\n this.setTaskName = function(regTaskNameFilter) {\n if (!this.plannedTaskId) return;\n this.taskName = regTaskNameFilter(this);\n };\n\n this.setResourceName = function(resourceNameFilter) {\n if (!this.resource || !resourceNameFilter) return;\n this.resource.name = resourceNameFilter(this.resource);\n };\n\n this.translate = function($filter) {\n this.setResourceName($filter('resourceName'));\n this.setTaskName($filter('regTaskName'));\n };\n\n this.set = function(data) {\n if (data) {\n if (data.id) this.id = data.id;\n if (data.group) this.group = data.group;\n if (data.userId) this.userId = data.userId;\n if (data.user) this.user = data.user;\n if (data.date) this.date = moment.utc(data.date).toDate();\n if (data.relation) this.relation = data.relation;\n\n if (data.plannedTaskId) this.plannedTaskId = data.plannedTaskId;\n if (data.plannedTaskTemplateId) this.plannedTaskTemplateId = data.plannedTaskTemplateId;\n if (data.plannedTaskName) this.plannedTaskName = data.plannedTaskName;\n if (data.plannedTaskTemplateType) this.plannedTaskTemplateType = data.plannedTaskTemplateType;\n\n if (data.mainPlannedTaskId) this.mainPlannedTaskId = data.mainPlannedTaskId;\n if (data.mainTaskTemplateId) this.mainTaskTemplateId = data.mainTaskTemplateId;\n if (data.mainPlannedTaskName) this.mainPlannedTaskName = data.mainPlannedTaskName;\n if (data.taskName) this.taskName = data.taskName;\n\n if (data.invoiceStreamId) this.invoiceStreamId = data.invoiceStreamId;\n if (data.invoiceStream) this.invoiceStream = data.invoiceStream;\n if (typeof data.type !== 'undefined') this.type = data.type;\n if (typeof data.isFixedPrice !== 'undefined') this.isFixedPrice = data.isFixedPrice;\n if (data.resource) this.resource = data.resource;\n if (data.resourceDescription) this.resourceDescription = data.resourceDescription;\n if (typeof data.fromMinutes !== 'undefined') this.fromMinutes = data.fromMinutes;\n if (typeof data.toMinutes !== 'undefined') this.toMinutes = data.toMinutes;\n if (typeof data.durationMinutes !== 'undefined') this.durationMinutes = data.durationMinutes;\n if (data.price) this.price = data.price; //Before the amount is set.\n if (typeof data.amount !== 'undefined') this.amount = data.amount;\n if (typeof data.discountPercentage !== 'undefined')\n this.discountPercentage = data.discountPercentage;\n if (typeof data.quantity !== 'undefined') this.quantity = data.quantity;\n if (typeof data.isBillable !== 'undefined') this.isBillable = data.isBillable;\n if (typeof data.inForfait !== 'undefined') this.inForfait = data.inForfait;\n if (typeof data.vatPercentage !== 'undefined') this.vatPercentage = data.vatPercentage;\n if (typeof data.vatType !== 'undefined') this.vatType = data.vatType;\n if (typeof data.remark) this.remark = data.remark;\n if (typeof data.internalRemark) this.internalRemark = data.internalRemark;\n if (typeof data.isBilled !== 'undefined') this.isBilled = data.isBilled;\n if (typeof data.totalAmount !== 'undefined') this.totalAmount = data.totalAmount;\n if (typeof data.invoiceNumber !== 'undefined') this.invoiceNumber = data.invoiceNumber;\n if (typeof data.invoiceId !== 'undefined') this.invoiceId = data.invoiceId;\n if (typeof data.invoiceStatus !== 'undefined') this.invoiceStatus = data.invoiceStatus;\n if (typeof data.neverInvoice !== 'undefined') this.neverInvoice = data.neverInvoice;\n if (typeof data.interactionId !== 'undefined') this.interactionId = data.interactionId;\n if (typeof data.interactionType !== 'undefined') this.interactionType = data.interactionType;\n if (typeof data.interactionDescription !== 'undefined')\n this.interactionDescription = data.interactionDescription;\n if (typeof data.interactionTitle !== 'undefined')\n this.interactionTitle = data.interactionTitle;\n if (typeof data.referenceYear !== 'undefined') this.referenceYear = data.referenceYear;\n }\n };\n if (data) this.set(data);\n\n this.reset = function() {\n console.warn('Registration.Reset() should be used!');\n this.resource = null;\n this.resourceDescription = '';\n this.fromMinutes = 0;\n this.toMinutes = 0;\n this.durationMinutes = 0;\n this.amount = 0.0;\n this.quantity = 0.0;\n this.isBillable = false;\n this.inForfait = null;\n this.vatPercentage = 0.21;\n this.vatType = 0;\n this.price = null;\n this.priceOptions = null;\n this.totalAmount = 0.0;\n this.interactionType = null;\n this.interactionDescription = null;\n this.interactionTitle = null;\n this.isFixedPrice = false;\n };\n}\n","export const TenantConfigurationDefault = 1;\nexport const TenantConfigurationBelgium = 1;\nexport const TenantConfigurationNetherlands = 5;\n\nexport const isBelgianTenantConfiguration = tenantConfiguration =>\n tenantConfiguration === TenantConfigurationDefault ||\n tenantConfiguration === TenantConfigurationBelgium;\n\nexport const isDutchTenantConfiguration = tenantConfiguration =>\n tenantConfiguration === TenantConfigurationNetherlands;\n","import React, { useEffect, useState, useMemo, useCallback } from 'react';\nimport classnames from 'classnames';\nimport Highlighter from 'react-highlight-words';\n\nimport { mapResourceName } from '@/shared/services/ObjectDisplayService';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport AutoComplete from '../input/select/AutoComplete';\nimport useResourceTree from '@/shared/hooks/resource/useResourceTree';\nimport guid from '@/shared/utils/guid';\n\nexport const crmTypeFilter = (crmType, item, isCurrent) => {\n if (typeof crmType === 'undefined' || crmType === null) return true;\n if (isCurrent) return true; // Allow if set externally (tasks, existing reg)\n const { crmOthers = false, crmProspects = false, crmCustomers = false, crmOwnCompanies = false } =\n item?.model ?? item ?? {};\n // Crm type enabled\n if (crmType === 0 && crmOthers) return true;\n if (crmType === 2 && crmProspects) return true;\n if (crmType === 3 && crmCustomers) return true;\n if (crmType === 4 && crmOwnCompanies) return true;\n // None selected = All selected\n return !crmOthers && !crmProspects && !crmCustomers && !crmOwnCompanies;\n};\nexport const assignmentFilter = (assignmentTemplateId, item) => {\n if (typeof assignmentTemplateId === 'undefined') return true;\n if (!item.blockedAssignmentTemplates || item.blockedAssignmentTemplates.length === 0) return true;\n return item.blockedAssignmentTemplates.indexOf(assignmentTemplateId || guid.empty) < 0;\n};\nexport const resourceSearch = (item, searchValue) => {\n if (!searchValue) return true;\n if (!item) return false;\n if (!item.search) return false;\n return item.search.toUpperCase().indexOf(searchValue.toUpperCase()) >= 0;\n};\n\nexport const resourceFilter = (\n item,\n { searchValue, assignmentTemplateId, crmType } = {},\n isCurrent = false,\n) => {\n if (!resourceSearch(item, searchValue)) return false;\n if (!crmTypeFilter(crmType, item, isCurrent)) return false;\n return assignmentFilter(assignmentTemplateId, item);\n};\n\nconst ResourceAutoComplete = ({\n intl,\n items: orgItems,\n onChange,\n emptyLabel,\n disabled,\n value,\n small,\n crmType = null,\n assignmentTemplateId = undefined,\n ...rest\n}) => {\n const items = useResourceTree(orgItems, intl);\n\n const selectedResource = useMemo(\n () => (value && value.id ? items.find(x => x.id === value.id) : null),\n [items, value],\n );\n\n const renderItem = useCallback(\n (item, searchValue, index) => {\n const showCategory =\n item.level === 1 && (index === 0 || item.categoryId !== items[index - 1].categoryId);\n return (\n
\n {showCategory ? (\n
\n {searchValue ? (\n \n ) : (\n item.categoryLabel\n )}\n
\n ) : null}\n \n {searchValue ? (\n \n ) : (\n item.label\n )}\n
\n \n );\n },\n [items],\n );\n\n const filterFunc = useCallback(\n (item, searchValue) => {\n return resourceFilter(\n item,\n {\n searchValue,\n crmType,\n assignmentTemplateId,\n },\n value && value.id === item.id,\n );\n },\n [crmType, value, assignmentTemplateId],\n );\n\n return (\n onChange(e ? e.model : null)}\n value={selectedResource}\n mode=\"edit\"\n renderItem={renderItem}\n filterFunc={filterFunc}\n isSmall={small}\n disabled={disabled}\n {...rest}\n />\n );\n};\n\nexport default ResourceAutoComplete;\n","import moment from 'moment';\n\nexport function Invoice(data) {\n this.payments = [];\n this.exportErrors = [];\n\n if (data) {\n if (data.billingErrors) {\n try {\n var billingErrors = JSON.parse(data.billingErrors);\n if (billingErrors.length > 0) {\n billingErrors.map(error => {\n if (error.code === 11039) {\n this.exportErrors.push(error);\n }\n });\n }\n } catch (error) {\n console.error(error);\n }\n }\n angular.extend(this, data);\n }\n\n if (this.date && typeof this.date === 'string')\n this.date = new moment(this.date.substr(0, 10)).toDate();\n\n if (this.expiryDate && typeof this.expiryDate === 'string')\n this.expiryDate = new moment(this.expiryDate.substr(0, 10)).toDate();\n\n this.dueAmount = function() {\n if (this.amount < 0 && this.isInvoice) {\n return this.amount + this.paidAmount;\n }\n if (this.amount < 0 && this.paidAmount < 0 && !this.isInvoice) {\n return this.amount - this.paidAmount;\n }\n if (this.paidAmount < 0 && !this.isInvoice) {\n return this.amount + this.paidAmount;\n }\n\n return this.amount - this.paidAmount;\n };\n\n this.hasErrors = function() {\n if (this.exportErrors.length) return true;\n return false;\n };\n}\n","import { Registration } from './registration';\nimport dompurify from 'dompurify';\nconst sanitizer = dompurify.sanitize;\n\n//This class will be bound to the edit registration form.\nexport function RegistrationGroup() {\n this.work = new Registration({ type: 0, vatPercentage: 0.21, vatType: 0 });\n this.travel = new Registration({ type: 2, vatPercentage: 0.21, vatType: 0 });\n this.cost = new Registration({ type: 1, vatPercentage: 0.21, vatType: 0 });\n\n this.__defineGetter__('group', function() {\n var group = this.work.group;\n\n if (!group) group = this.travel.group;\n if (!group) group = this.cost.group;\n\n return group;\n });\n\n this.__defineGetter__('relation', function() {\n return this.work.relation;\n });\n this.__defineSetter__('relation', function(value) {\n this.work.relation = value;\n this.travel.relation = value;\n this.cost.relation = value;\n });\n\n this.__defineGetter__('invoiceStreamId', function() {\n return this.work.invoiceStreamId || this.cost.invoiceStreamId || this.travel.invoiceStreamId;\n });\n this.__defineSetter__('invoiceStreamId', function(value) {\n this.work.invoiceStreamId = value;\n this.travel.invoiceStreamId = value;\n this.cost.invoiceStreamId = value;\n });\n this.__defineGetter__('invoiceStream', function() {\n return this.work.invoiceStream || this.cost.invoiceStream || this.travel.invoiceStream;\n });\n this.__defineSetter__('invoiceStream', function(value) {\n this.work.invoiceStream = value;\n this.travel.invoiceStream = value;\n this.cost.invoiceStream = value;\n });\n\n this.__defineGetter__('remark', function() {\n var remarks = [];\n if (this.work.remark) remarks.push(this.work.remark);\n if (this.travel.remark) remarks.push(this.travel.remark);\n if (this.cost.remark) remarks.push(this.cost.remark);\n if (remarks.length === 0) return '';\n if (remarks.length === 1) return remarks[0];\n return remarks.unique().join('\\n');\n });\n this.__defineSetter__('remark', function(value) {\n this.work.remark = value;\n this.travel.remark = value;\n this.cost.remark = value;\n });\n\n this.__defineGetter__('internalRemark', function() {\n var remarks = [];\n if (this.work.internalRemark) remarks.push(this.work.internalRemark);\n if (this.travel.internalRemark) remarks.push(this.travel.internalRemark);\n if (this.cost.internalRemark) remarks.push(this.cost.internalRemark);\n if (remarks.length === 0) return '';\n if (remarks.length === 1) return remarks[0];\n return remarks.unique().join('\\n');\n });\n this.__defineSetter__('internalRemark', function(value) {\n this.work.internalRemark = value;\n this.travel.internalRemark = value;\n this.cost.internalRemark = value;\n });\n\n this.__defineGetter__('resourceText', function() {\n if (this.work.resource && !this.work.resource.isOther) return this.work.resource.name;\n if (this.work.resourceDescription !== '') return this.work.resourceDescription;\n if (this.cost.resource && !this.cost.resource.isOther) return this.cost.resource.name;\n if (this.cost.resourceDescription !== '') return this.cost.resourceDescription;\n if (this.travel.resource && !this.travel.resource.isOther) return this.travel.resource.name;\n\n return '';\n });\n\n this.__defineGetter__('isBillable', function() {\n return this.work.isBillable || this.travel.isBillable || this.cost.isBillable;\n });\n\n this.__defineGetter__('isBilled', function() {\n return this.work.isBilled || this.travel.isBilled || this.cost.isBilled;\n });\n\n this.__defineGetter__('hasWork', function() {\n return this.work && this.work.durationMinutes > 0;\n });\n\n this.__defineGetter__('hasCost', function() {\n return this.cost && this.cost.resource && this.cost.quantity !== 0;\n });\n this.__defineGetter__('date', function() {\n return this.work.date;\n });\n\n this.__defineSetter__('date', function(value) {\n this.work.date = value;\n this.travel.date = value;\n this.cost.date = value;\n });\n\n this.__defineGetter__('referenceYear', function() {\n return this.work.referenceYear || this.travel.referenceYear || this.cost.referenceYear;\n });\n this.__defineSetter__('referenceYear', function(value) {\n if (!value || value < 2000) {\n value = null;\n }\n\n this.work.referenceYear = value;\n this.travel.referenceYear = value;\n this.cost.referenceYear = value;\n });\n this.__defineGetter__('interactionId', function() {\n if (this.work.interactionId !== null) return this.work.interactionId;\n if (this.travel.interactionId !== null) return this.travel.interactionId;\n if (this.cost.interactionId !== null) return this.cost.interactionId;\n return null;\n });\n this.__defineSetter__('interactionId', function(value) {\n this.work.interactionId = value;\n this.travel.interactionId = value;\n this.cost.interactionId = value;\n });\n this.setInteractionType = function(value) {\n this.work.interactionType = value;\n this.travel.interactionType = value;\n this.cost.interactionType = value;\n };\n this.__defineGetter__('interactionType', function() {\n if (this.work.interactionType !== null) return this.work.interactionType;\n if (this.travel.interactionType !== null) return this.travel.interactionType;\n if (this.cost.interactionType !== null) return this.cost.interactionType;\n return null;\n });\n this.__defineSetter__('interactionType', this.setInteractionType);\n\n this.__defineGetter__('interactionDescription', function() {\n if (this.work.interactionDescription) return this.work.interactionDescription;\n if (this.travel.interactionDescription) return this.travel.interactionDescription;\n if (this.cost.interactionDescription) return this.cost.interactionDescription;\n\n return null;\n });\n this.__defineGetter__('interactionTitle', function() {\n if (this.work.interactionTitle) return this.work.interactionTitle;\n if (this.travel.interactionTitle) return this.travel.interactionTitle;\n if (this.cost.interactionTitle) return this.cost.interactionTitle;\n\n return null;\n });\n this.getPlannedTaskIds = function() {\n var result = [];\n if (this.work.plannedTaskId) result.push(this.work.plannedTaskId);\n if (this.work.mainPlannedTaskId) result.push(this.work.mainPlannedTaskId);\n if (this.travel.plannedTaskId) result.push(this.travel.plannedTaskId);\n if (this.travel.mainPlannedTaskId) result.push(this.travel.mainPlannedTaskId);\n if (this.cost.plannedTaskId) result.push(this.cost.plannedTaskId);\n if (this.cost.mainPlannedTaskId) result.push(this.cost.mainPlannedTaskId);\n return result;\n };\n this.clearTaskFields = function() {\n if (this.work) this.work.clearTaskFields();\n if (this.travel) this.travel.clearTaskFields();\n if (this.cost) this.cost.clearTaskFields();\n };\n this.setTaskFields = function(fields) {\n if (this.work) this.work.setTaskFields(fields);\n if (this.travel) this.travel.setTaskFields(fields);\n if (this.cost) this.cost.setTaskFields(fields);\n };\n this.getPlannedTaskId = function() {\n if (this.work.plannedTaskId) return this.work.plannedTaskId;\n if (this.travel.plannedTaskId) return this.travel.plannedTaskId;\n if (this.cost.plannedTaskId) return this.cost.plannedTaskId;\n return null;\n };\n this.hasTask = function() {\n return !!this.getPlannedTaskId();\n };\n this.__defineGetter__('taskName', function() {\n if (this.work.taskName) return this.work.taskName;\n if (this.travel.taskName) return this.travel.taskName;\n if (this.cost.taskName) return this.cost.taskName;\n\n return null;\n });\n\n this.setInteractionTypeAfterChange = function() {\n const hasValue = !!(this.interactionDescription || this.interactionTitle);\n if (hasValue && this.interactionType === null) {\n this.setInteractionType(0);\n } else if (!hasValue && this.interactionType !== null) {\n this.setInteractionType(null);\n }\n };\n this.setInteractionDescription = function(value) {\n // old interactions were created without HTML markup. In order to render them in our rich text editors, replace the newlines with break lines\n if (value && !value.includes('')) {\n value = value.replace(/\\n/g, '
');\n value = sanitizer(value);\n }\n\n this.work.interactionDescription = value;\n this.travel.interactionDescription = value;\n this.cost.interactionDescription = value;\n if (typeof value !== 'undefined') this.setInteractionTypeAfterChange();\n };\n this.__defineSetter__('interactionDescription', this.setInteractionDescription);\n\n this.setInteractionTitle = function(value) {\n this.work.interactionTitle = value;\n this.travel.interactionTitle = value;\n this.cost.interactionTitle = value;\n if (typeof value !== 'undefined') this.setInteractionTypeAfterChange();\n };\n this.__defineSetter__('interactionTitle', this.setInteractionTitle);\n\n this.initDate = function(value) {\n var date = null;\n if (this.work.group) date = this.work.date;\n if (!date && this.travel.group) date = this.travel.date;\n if (!date && this.cost.group) date = this.cost.date;\n if (!date) date = value;\n\n this.work.date = date;\n this.travel.date = date;\n this.cost.date = date;\n };\n this.setRelation = function() {\n var relation = this.work.relation;\n if (!relation) relation = this.travel.relation;\n if (!relation) relation = this.cost.relation;\n\n if (!this.work.relation) this.work.relation = relation;\n if (!this.travel.relation) this.travel.relation = relation;\n if (!this.cost.relation) this.cost.relation = relation;\n\n var invoiceStreamId = this.invoiceStreamId;\n if (invoiceStreamId) {\n if (!this.work.invoiceStreamId) this.work.invoiceStreamId = invoiceStreamId;\n if (!this.travel.invoiceStreamId) this.travel.invoiceStreamId = invoiceStreamId;\n if (!this.cost.invoiceStreamId) this.cost.invoiceStreamId = invoiceStreamId;\n }\n var invoiceStream = this.invoiceStream;\n if (!invoiceStream && invoiceStreamId && relation && relation.invoiceStreams) {\n //Get invoicestream from array in relation\n invoiceStream = relation.invoiceStreams.find(x => x.id === invoiceStreamId);\n }\n if (invoiceStream) {\n if (!this.work.invoiceStream) this.work.invoiceStream = invoiceStream;\n if (!this.travel.invoiceStream) this.travel.invoiceStream = invoiceStream;\n if (!this.cost.invoiceStream) this.cost.invoiceStream = invoiceStream;\n }\n };\n this.setInteractionInfo = function(data) {\n if (!data) return;\n if (data instanceof RegistrationGroup || data instanceof Registration) {\n if (!data.interactionId || data.group !== this.group) return;\n //Copy from other registration\n this.interactionId = data.interactionId;\n this.setInteractionType(data.interactionType);\n this.interactionTitle = data.interactionTitle;\n this.interactionDescription = data.interactionDescription;\n return;\n }\n\n if (\n data.objectId &&\n data.id &&\n (data.title || data.description) &&\n data.objectId === this.group\n ) {\n //InteractionDTO response\n this.interactionId = data.id;\n this.setInteractionType(data.interactionType);\n this.interactionTitle = data.title;\n this.interactionDescription = data.description;\n }\n };\n\n this.setUser = function(userId, userName) {\n this.work.userId = userId;\n this.travel.userId = userId;\n this.cost.userId = userId;\n if (userName) {\n this.work.user = userName;\n this.travel.user = userName;\n this.cost.user = userName;\n }\n };\n this.setResourceName = function(resourceNameFilter) {\n this.work.setResourceName(resourceNameFilter);\n this.travel.setResourceName(resourceNameFilter);\n this.cost.setResourceName(resourceNameFilter);\n };\n this.translate = function($filter) {\n this.work.translate($filter);\n this.travel.translate($filter);\n this.cost.translate($filter);\n };\n\n this.setPart = function(part) {\n if (!part || !part.resource) {\n console.warn('RegistrationGroup.setPart: part not provided or without resource.');\n return;\n }\n\n switch (part.resource.type) {\n case 1:\n this.cost.set(part);\n break;\n case 2:\n this.travel.set(part);\n break;\n default:\n this.work.set(part);\n break;\n }\n };\n\n this.toJson = function(pretty) {\n return angular.toJson(\n {\n work: this.work,\n travel: this.travel,\n cost: this.cost,\n },\n !!pretty,\n );\n };\n\n this.fromJson = function(json) {\n var reg = angular.fromJson(json);\n if (!reg) return;\n if (reg.work) this.work.set(reg.work);\n if (reg.travel) this.travel.set(reg.travel);\n if (reg.cost) this.cost.set(reg.cost);\n };\n\n this.validate = function() {\n var w = this.work.validate();\n var c = this.cost.validate();\n var t = this.travel.validate();\n\n return w && c && t; //Make sure all three are called.\n };\n\n //Split group into separate registrations\n this.getRegistrationsWithId = function() {\n const result = [];\n if (this.work && this.work.id) result.push(this.work);\n if (this.cost && this.cost.id) result.push(this.cost);\n if (this.travel && this.travel.id) result.push(this.travel);\n return result;\n };\n}\n","import React from 'react';\nimport classNames from 'classnames';\n\n// eslint-disable-next-line\nconst Item = ({\n item,\n index,\n isSelected,\n isActive,\n getItemProps,\n children,\n renderItem,\n searchValue,\n disabled,\n className,\n}) => (\n \n {(item && (renderItem ? renderItem(item, searchValue, index) : item.label)) || children}\n \n);\n\nexport default Item;\n","export const isWord = mime => {\n if (!mime) return false;\n if (mime.toLowerCase() === 'application/msword') return true;\n if (\n mime.toLowerCase() === 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'\n )\n return true;\n return false;\n};\nexport const isPdf = mime => mime && mime.toLowerCase() === 'application/pdf';\nexport const isExcel = mime => {\n if (!mime) return false;\n if (mime.toLowerCase() === 'application/vnd.ms-excel') return true;\n if (mime.toLowerCase() === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet')\n return true;\n return false;\n};\nexport const isEditable = (ext, mime) => {\n const includedExtensions = [\n 'doc',\n 'docx',\n 'dot',\n 'dotx',\n 'dotm',\n 'docm',\n 'rtf',\n 'xls',\n 'xlsx',\n 'xlsm',\n ];\n const includedMimeTypes = [\n 'application/msword',\n 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\n 'application/vnd.openxmlformats-officedocument.wordprocessingml.template',\n 'application/vnd.ms-word.template.macroenabled.12',\n 'application/vnd.ms-word.document.macroenabled.12',\n 'application/rtf',\n 'application/vnd.ms-excel',\n 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n ];\n return (\n includedExtensions.includes(ext.toLowerCase()) || includedMimeTypes.includes(mime.toLowerCase())\n );\n};\n\nexport default { isWord, isPdf, isEditable };\n","/* eslint-disable */\n\nimport { TenantConfigurationNetherlands } from './shared/TenantConfigurationConstants';\n\nconst defaultSettings = {\n zIndex: 999,\n helpCenter: {\n suppress: false,\n messageButton: {\n '*': 'Create a ticket',\n nl: 'Maak een supportticket',\n fr: 'Créer un ticket support',\n },\n },\n contactForm: {\n tags: ['adminpulse'],\n subject: true,\n },\n chat: {\n suppress: true,\n },\n answerBot: {\n suppress: true,\n },\n talk: {\n suppress: true,\n },\n};\n\nif (typeof window.zE === 'function') {\n window.zE('webWidget', 'updateSettings', { webWidget: defaultSettings });\n window.zE('webWidget', 'hide');\n window.zE('webWidget:on', 'close', function() {\n //Hide help button on close\n window.zE('webWidget', 'hide');\n });\n}\n\nconst setUserInfo = (tenantId, userName, userEmail, tenantConfiguration) => {\n if (!window.zE) return;\n\n var tags = ['adminpulse', `${tenantId}`];\n if (parseInt(tenantConfiguration) === TenantConfigurationNetherlands) {\n tags.push('ap-nl');\n }\n\n defaultSettings.contactForm.tags = tags;\n\n window.zE('webWidget', 'updateSettings', { webWidget: defaultSettings });\n window.zE('webWidget', 'prefill', {\n name: { value: userName, readOnly: true },\n email: { value: userEmail, readOnly: true },\n });\n};\n\nconst setLocale = locale => {\n if (!window.zE) return;\n if (locale === 'en-be') {\n locale = 'en-US'; // the zendesk articles were made in culture en-US so this is the locale we need to pass\n }\n window.zE('webWidget', 'setLocale', locale);\n};\n\nconst createTicket = () => {\n if (!window.zE) return;\n const settings = { ...defaultSettings };\n settings.helpCenter.suppress = true;\n\n window.zE('webWidget', 'updateSettings', { webWidget: settings });\n\n window.zE('webWidget', 'show');\n window.zE('webWidget', 'open');\n};\n\nexport default { setUserInfo, createTicket, setLocale };\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport { mapResourceName } from '@/shared/services/ObjectDisplayService';\nimport { dynamicSortMultiple } from '@/shared/utils/dynamicSort';\nimport { useEffect, useState } from 'react';\nexport var mapResourcesToTree = function (orgItems, intl) {\n if (!orgItems || !orgItems.length) {\n return [];\n }\n return orgItems\n .filter(function (x) { return x.isDefault && x.categoryId; })\n .reduce(function (array, category) {\n var categoryLabel = mapResourceName(category, intl);\n var subResources = orgItems\n .filter(function (s) { return !s.isDefault && s.categoryId && s.categoryId === category.categoryId; })\n .map(function (resource) {\n var label = mapResourceName(resource, intl, false, true);\n return __assign(__assign({}, resource), { id: resource.id, key: resource.id, model: resource, label: label, categoryLabel: categoryLabel, search: \"\".concat(categoryLabel, \";\").concat(label), level: 1, disabled: resource.disabled });\n });\n // const subResourcesLabels = subResources.map(x => x.label).join(';');\n return array.concat(__spreadArray([\n __assign(__assign({}, category), { id: category.id, key: category.id, model: category, label: categoryLabel, categoryLabel: categoryLabel, search: categoryLabel, level: 0, disabled: category.disabled })\n ], subResources, true));\n }, [])\n .sort(dynamicSortMultiple('categoryLabel', 'level', 'label'));\n};\nvar useResourceTree = function (orgItems, intl) {\n var _a = useState([]), items = _a[0], setItems = _a[1];\n useEffect(function () {\n setItems(mapResourcesToTree(orgItems, intl));\n }, [intl, orgItems]);\n return items;\n};\nexport default useResourceTree;\n","module.exports = \" \";","import eventBus from 'pubsub-js';\n\n// we use the event bus because the loading animation is displayed in an angularjs component and if we listen to the service directly it doesn't automatically update the animation ($scope.watch doesnt work)\nfunction setSmallLoadingAnimation(value) {\n eventBus.publish('showLoadingAnimationChanged', value);\n}\n\nfunction showSmallLoadingAnimation() {\n eventBus.publish('showLoadingAnimationChanged', true);\n}\n\nfunction hideSmallLoadingAnimation() {\n eventBus.publish('showLoadingAnimationChanged', false);\n}\n\nexport default {\n setSmallLoadingAnimation,\n showSmallLoadingAnimation,\n hideSmallLoadingAnimation,\n};\n","export function Notification(data) {\n var self = this;\n self.id = null;\n self.type = null;\n self.objectId = null;\n self.userId = null;\n self.createDate = new Date();\n self.expireDate = null;\n\n self.items = [];\n self.__defineGetter__('cnt', function() {\n return self.items.length;\n });\n\n var recalcStatus = function() {\n var unread = false;\n for (var i = 0; i < self.items.length; i++) {\n if (self.items[i].unread) unread = true;\n }\n\n self.unread = unread;\n };\n\n self.__defineGetter__('date', function() {\n return self.items.reduce(function(max, el) {\n return el.createDate > max ? el.createDate : max;\n }, new Date(1900, 0, 0));\n });\n\n var _unread = true;\n self.__defineGetter__('unread', function() {\n return _unread;\n });\n self.__defineSetter__('unread', function(value) {\n if (!value) for (var i = 0; i < self.items.length; i++) self.items[i].unread = false;\n _unread = value;\n });\n\n self.getNew = function() {\n return self.items.filter(function(item) {\n return item.unread;\n });\n };\n self.add = function(data) {\n if (!data) return;\n if (data.unread) {\n self.unread = true;\n }\n\n if (data.json) {\n var temp = JSON.parse(data.json);\n data = {\n ...data,\n ...temp,\n };\n }\n\n if (typeof data.createDate === 'string') data.createDate = new Date(data.createDate);\n if (typeof data.expireDate === 'string') data.expireDate = new Date(data.expireDate);\n self.items.push(data);\n };\n self.update = function(data) {\n for (var i = 0; i < self.items.length; i++)\n if (self.items[i].id === data.id) {\n if (typeof data.createDate === 'string') data.createDate = new Date(data.createDate);\n if (typeof data.expireDate === 'string') data.expireDate = new Date(data.expireDate);\n angular.extend(self.items[i], data);\n\n if (data.expireDate && data.expireDate < new Date()) {\n self.items.splice(i, 1);\n recalcStatus();\n break;\n }\n\n if (data.unread !== self.unread) recalcStatus();\n\n break;\n }\n };\n self.remove = function(data) {\n for (var i = 0; i < self.items.length; i++) {\n if (self.items[i].id === data.id) {\n self.items.splice(i, 1);\n recalcStatus();\n break;\n }\n }\n };\n\n var _param = null;\n self.__defineGetter__('param', function() {\n return _param;\n });\n self.__defineSetter__('param', function(value) {\n _param = value;\n });\n\n if (data) {\n if (typeof data.createDate === 'string') data.createDate = new Date(data.createDate);\n if (typeof data.expireDate === 'string') data.expireDate = new Date(data.expireDate);\n if (data.json) {\n var jsonData = JSON.parse(data.json);\n Object.assign(data, jsonData);\n }\n angular.extend(self, data);\n self.items.push(data);\n }\n}\n","module.exports = \"
\";","module.exports = \"
\";","import angular from 'angular';\nimport moment from 'moment';\n\nexport const parseNumberFormat = format => {\n const elements = [];\n if (!format) return elements;\n\n let part = '';\n let inBlock = false;\n for (let i = 0; i < format.length; i++) {\n //TFS 5732\n const c = format[i];\n\n if (!inBlock && c === '[') {\n inBlock = true;\n\n if (part !== '') {\n elements.push({ id: 'Text', t: part });\n part = '';\n }\n } else if (inBlock && c === ']') {\n inBlock = false;\n part = part.toLowerCase();\n\n switch (part) {\n case 'yyyy':\n elements.push({ id: 'Yyyy', n: 0 });\n break;\n case 'yy':\n elements.push({ id: 'Yy', n: 0 });\n break;\n case 'mm':\n elements.push({ id: 'Mm', n: 0 });\n break;\n default:\n var n = parseInt(part.replace('counter:n', '').trim());\n if (Number.isInteger(n)) {\n elements.push({ id: 'Counter', n: n });\n }\n break;\n }\n\n part = '';\n } else {\n part += c;\n }\n }\n if (part !== '') {\n elements.push({ id: 'Text', t: part });\n part = '';\n }\n return elements;\n};\nconst generateDateParts = date => ({\n Yyyy: date.getFullYear(),\n Yy: ('' + date.getFullYear()).substr(-2),\n Mm: ('' + (date.getMonth() + 1)).padStart(2, '0'),\n});\n\nconst randomCounter = Math.round(Math.random() * 500);\nexport const generateExample = (input, date, yearFormat, counter) => {\n if (!input) return null;\n let elements = [];\n //Format as string\n if (typeof input === 'string') elements = parseNumberFormat(input);\n //Format as array of elements\n else if (typeof input === 'object' && input.length) elements = input;\n else return null;\n\n const exampleDate = date ? moment.utc(date).toDate() : moment.utc().toDate();\n if (date && moment.utc(date).format('MM-DD') !== '01-01' && yearFormat === 3) {\n exampleDate.setFullYear(exampleDate.getFullYear() + 1);\n }\n const exampleCounter = parseInt(counter) || randomCounter;\n const examples = { ...generateDateParts(exampleDate), Counter: exampleCounter };\n\n return elements.reduce(function(result, el) {\n if (el.id === 'Text') return result + el.t;\n if (el.id === 'Counter') return result + ('' + examples[el.id]).padStart(el.n, '0');\n if (el.id !== 'Text' && el.id !== 'Counter') return result + examples[el.id];\n return result;\n }, '');\n};\n\nangular.module('cloudX').directive('cxNumberFormat', [\n function() {\n return {\n restrict: 'E',\n template: require('./numberFormat.html'),\n scope: {\n data: '=',\n submit: '&',\n cancel: '&',\n startDate: '=',\n firstNumber: '=',\n showWarning: '=',\n yearFormat: '=',\n },\n controller: [\n '$scope',\n '$q',\n function($scope, $q) {\n $scope.editMode = false;\n $scope.elements = [];\n $scope.saving = false;\n\n $scope.parts = [\n { id: 'Yy', n: 0 },\n { id: 'Yyyy', n: 0 },\n { id: 'Mm', n: 0 },\n { id: 'Counter', n: 0 },\n { id: 'Text', t: '' },\n ];\n $scope.addPart = function(nr) {\n if (nr !== 3 || !$scope.hasCounter())\n $scope.elements.push(angular.copy($scope.parts[nr]));\n };\n\n $scope.numberOfZeros = function(n) {\n var zerostring = '';\n for (var t = 0; t < n; t++) zerostring += '0';\n return zerostring;\n };\n\n $scope.startEdit = function() {\n $scope.editMode = true;\n $scope.elements = parseNumberFormat($scope.data);\n };\n $scope.dragIndex = null;\n $scope.startDrag = function(e, ui, index) {\n $scope.dragIndex = index;\n };\n $scope.stopDrag = function() {\n $scope.dragIndex = null;\n };\n $scope.dragOver = function(e, ui, index) {\n var dropEl = $(e.target);\n dropEl.removeClass('drop-left').removeClass('drop-right');\n if ($scope.dragIndex == null) return;\n if ($scope.dragIndex < index) dropEl.addClass('drop-right');\n if ($scope.dragIndex > index) dropEl.addClass('drop-left');\n };\n $scope.hasCounter = function() {\n return (\n $scope.elements.findIndex(function(el) {\n return el.id === 'Counter';\n }) >= 0\n );\n };\n\n $scope.example = function() {\n if (!$scope.editMode) return generateExample($scope.data, $scope.startDate, $scope.yearFormat);\n return generateExample($scope.elements, $scope.startDate, $scope.yearFormat);\n };\n $scope.firstNumberExample = function() {\n if (!$scope.editMode)\n return generateExample($scope.data, $scope.startDate, $scope.yearFormat, $scope.firstNumber);\n return generateExample($scope.elements, $scope.startDate, $scope.yearFormat, $scope.firstNumber);\n };\n\n $scope.cancelEdit = function() {\n $scope.editMode = false;\n $scope.cancel();\n };\n $scope.clear = function() {\n $scope.elements = [];\n };\n $scope.save = function() {\n var result = $scope.elements.reduce(function(result, el) {\n if (el.id === 'Text') return result + el.t;\n if (el.id === 'Counter') return result + ('[Counter:N' + (el.n || '0') + ']');\n if (el.id !== 'Text' && el.id !== 'Counter') return result + ('[' + el.id + ']');\n return result;\n }, '');\n\n $scope.saving = true;\n return $q.when($scope.submit({ newVal: result })).then(\n function(success) {\n $scope.saving = false;\n //Error. Local model will not be updated, form will not close\n if (typeof success === 'string') return;\n\n //Success. Local model will be updated automatically\n if (typeof success === 'undefined' || !!success) $scope.data = result;\n\n //Form will close\n $scope.editMode = false;\n },\n error => {\n $scope.saving = false;\n },\n );\n };\n },\n ],\n };\n },\n]);\n","module.exports = \"
1\\\">
\";","module.exports = \"

New invoice proposal from scratch

New credit note proposal from scratch

1\\\">

{{vm.invoice.customer | relationName}}

\";","module.exports = \"

{{ vm.template.context | translateList: 'templateContext' }}

{{tag.name}}{{$last?'':', '}}
{{type.name}}{{$last?'':', '}}
 {{ lang.languageCode | translateList: 'language':lang.languageCode }}

{{ lang.title }}

{{attachment.name}} {{attachment.name}} Not scanned Pending Virus found Error
\";","module.exports = \"
\";","module.exports = \"
\";","module.exports = \" \";","module.exports = \" \";","module.exports = \"
\";","module.exports = \"
\";","module.exports = \"
\";","module.exports = \" \";","module.exports = \"
\";","module.exports = \" \";","module.exports = \"
My Profile
{{vm.profile.userEmail}}
Access tokens
\";","module.exports = \"

Access denied

Choose an option below


  • Go Back
  • Contact your system administrator
  • Login with another user
\";","module.exports = \"
\";","module.exports = \"
\";","module.exports = \"
User

{{ vm.employee.userEmail }}

{{vm.userRole.customRoleName ||(vm.userRole.role | translateList: 'Role')}} {{vm.userRole.customRoleName ||(vm.userRole.role | translateList: 'Role')}}

{{ vm.overtimeRemaining.minuteToTime() }}

{{vm.employee.license.beginDate|formatDate}}{{vm.employee.license.endDate|formatDate}}

\";","module.exports = \"

{{vm.totalEmployees}}

{{vm.licenseInformation.totalLicenses}}

{{vm.licenseInformation.assignedLicenses}}

{{vm.licenseInformation.availableLicenses}}

{{vm.licenseInformation.totalTemporaryLicenses}}

{{vm.licenseInformation.assignedTemporaryLicenses}}

{{vm.licenseInformation.availableTemporaryLicenses}}

Name Phone Email Date of birth Price profile OwnCompany Team(s) Role(s) EmployeeType EmployeeNumber Employed since End date EmploymentStartDate EmploymentEndDate License Confirmed 2FA Reset VisibleInApplication Delete
{{employee.firstName}} {{employee.lastName}} {{employee.employeePhone}} {{employee.userEmail}} {{employee.employeeDateOfBirth | formatDate}} {{employee.employeeProfile.name}} Unassigned
{{role.customRoleName || (role.role | translateList:'role')}}
{{employee.employeeType | translateList:'employeeType'}} {{employee.employeeNumber}} {{employee.employeeStartDate | formatDate}} {{employee.endDate | formatDate}} {{employee.employmentStartDate | formatDate}} {{employee.employmentEndDate | formatDate}}
\";","module.exports = \"

Price profiles

Name Assigned employees Default Delete
{{employeeProfile.name}}
\";","module.exports = \"

{{vm.getTotalHours()| time}}

0}\\\" id=MissingHoursLabel> {{vm.getMissingHours()| time}}

0 || vm.homeWorkingMinutes>0)\\\">
0\\\">

{{item.work.fromFormatted}} – {{item.work.toFormatted}}
{{item.work.durationFormatted}} {{item.work.total|dynCurrency}}
{{item.relation | relationName}} – {{item.invoiceStream|invoiceStreamName}}
{{item.work.resourceName}}
{{item.cost.resourceName}}
{{item.cost.quantity | number:2}}
0\\\" class=registration-travel-resource> {{item.travel.resourceName}}
0\\\" class=registration-travel-quantity> {{item.travel.quantity | number:2}} km
0\\\" class=registration-travel-total>
{{item.taskName}}
{{item.remark}}
{{item.internalRemark}}
\";","module.exports = \"

{{ vm.totalMinutesFormatted }}

{{ vm.billablePerHour | dynCurrency: 2 }}

{{ vm.originalAmount | dynCurrency: 2 }}

{{ vm.billableAmount | dynCurrency: 2 }}

{{ vm.totalAmount | dynCurrency: 0 }}

-
-
\";","module.exports = \"
Type Code Name Base price Purchase price % VAT IsFixedPrice Billable In fixed amount Ledger account AllowedForCrmType Delete
No items
{{ category.vatPercentage | vatRateType:category.vatType}} > > >
0\\\">
Registration items
AllowedForCrmType
> > >
\";","module.exports = \"
/ OwnCompany
{{invoice.number}} {{invoice.number}} {{invoice.customer | relationName}} {{invoice.customer.customerCode}} {{invoice.customer.externalLink}} {{invoice.invoiceStream | invoiceStreamName:''}} {{invoice.companyName}} {{invoice.date | formatDate}} {{invoice.expiryDate | formatDate}} {{invoice.originalAmount | dynCurrency}} {{invoice.adjustedAmount | dynCurrency}} {{invoice.totalExclusive | dynCurrency}} {{invoice.amount | dynCurrency}} {{invoice.paidAmount | dynCurrency}} vm.todayMin30, 'red': invoice.dueAmount() > 0 && invoice.expiryDate < vm.todayMin30 }\\\" ng-click=vm.toggleDetails(invoice) ng-hide=vm.hiddenColumns.dueAmount ng-if=vm.showPaymentMonitoring() class=text-right> {{invoice.dueAmount() | dynCurrency}}
{{invoice.description}}
{{invoice.creditNoteBasedOn}}
 
{{invoice.taxCategory | translateList:'taxCategory'}}
 
{{invoice.taxExemptionReason}}
{{attachment.name}} {{attachment.name}}
{{payment.timestamp | formatDate}} {{payment.remark}} {{payment.remark}} {{payment.amount | dynCurrency}}
\";","module.exports = \"

{{vm.dashboard.draftTotalExclusive |dynCurrency:0}}

{{vm.dashboard.draftTotalInclusive |dynCurrency:0}}

{{vm.dashboard.intraCompanyTotal |dynCurrency:0}}

{{ vm.processingInvoicesInfo.count}}

 
InvoiceAbbr/ CreditNoteAbbr Customer RelationCode Assignment OwnCompany Subtotal AmountExVat AmountInclVat Date to number
InvoiceAbbr CreditNoteAbbr
{{invoice.customer | relationName}} {{invoice.customer.customerCode}} {{invoice.invoiceStream | invoiceStreamName:''}} {{invoice.companyName}} {{ invoice.exForfaitAmount | dynCurrency}} {{invoice.originalAmount | dynCurrency}} {{invoice.adjustedAmount | dynCurrency}} {{invoice.baseAmount | dynCurrency}} {{invoice.totalExclusive | dynCurrency}} {{invoice.totalInclusive | dynCurrency}} {{invoice.createDate | formatDate}} {{invoice.modifiedDate | formatDate}}
{{invoice.creditNoteBasedOn}}
: {{invoice.discountType | translateList:'discountType'}} {{invoice.discountAmount | number:2}} incl. excl. {{invoice.discountAmount | percentage:2}} {{invoice.discountLedger}}
{{invoice.taxExemptionReason}}
{{attachment.name}} {{attachment.name}} Not scanned Pending Virus found Error
\";","module.exports = \"
Creation date Transaction date Total amount Open amount Name IBAN BIC Description Link status
No items
{{trans.createdOn | formatDate}} {{trans.date | formatDate}} {{trans.amount | dynCurrency}} {{trans.openAmount() | dynCurrency}} {{trans.name}} {{trans.iban}} {{trans.bic}} {{trans.description}} {{trans.source | translateList:'TransactionSource'}}
InvoiceAbbr/ CreditNoteAbbr Invoice number Invoice date Invoice amount Payment date Payment amount Remark
InvoiceAbbr CreditNoteAbbr {{payment.invoiceNumber}} {{payment.invoiceDate | formatDate}} {{payment.invoiceAmount | dynCurrency}} {{payment.timestamp | formatDate}} {{payment.amount | dynCurrency}} {{payment.remark}}
\";","module.exports = \" \";","module.exports = \"
({{lang}}) ({{lang}})
{{::item.key}} {{::item.defaultValue}}
{{item[lang].value || item[lang].inherited || ' '}}
{{item[lang].lastModified | formatDate}} {{item.lastScanned | formatDate}} {{item.source}}
\";","module.exports = \"

({{lang}}) ({{lang}})
{{::item.list}} {{::item.key}} {{::item.defaultValue}}
{{item[lang].value || item[lang].inherited || ' '}}
{{item[lang].lastModified | formatDate}} {{::item.lastScanned | formatDate}} {{::item.source}}
\";","module.exports = \" \";","module.exports = \"
\";","module.exports = \"
Label Field type
{{field.label}} {{field.type | translateList:'fieldType'}}
\";","module.exports = \"
5\\\" class=margin10B>
{{activeCompany.name}}
{{activeCompany.enterpriseNumber}}
{{bankAccount.bankAccountNr}}
{{activeCompany.legalForm | translateList:'legalForm'}}
No VAT liability {{activeCompany.vatNumber}}
{{activeCompany.jurisdictionId | translateList:'jurisdiction'}}
{{activeCompany.professionalAssociation|translateList:'professionalAssociation'}}
\";","module.exports = \"
5\\\" class=margin10B>
{{selectedCompany.name}}
{{selectedCompany.enterpriseNumber}}
{{ settings.resourceVATRate | percentage: 2 }}

{{ settings.resourceVATRate | percentage: 2 }}

{{ settings.magicMailAddress }} {{ settings.magicMailAddress }}| {{ settings.magicMailAddress }}@dev-dev-acc-inbox.adminpulse.be

   

 | {{selectedCompany.name}}

{{ settings.emailRelationSenderNameType | translateList: 'emailSenderNameType' }} {{ settings.emailRelationSenderName }} {{ settings.emailRelationSenderName }}

 | {{selectedCompany.email}}

{{ settings.emailRelationSenderType | translateList: 'emailReplyToType' }}

{{ settings.emailRelationSender }} {{ settings.emailRelationSender }}

{{settings.emailRelationReplyToType | translateList: 'emailReplyToType'}}

{{ settings.emailRelationReplyTo }} {{ settings.emailRelationReplyTo }}

{{ settings.emailRelationCCType | translateList: 'emailReplyToType' }}

{{ settings.emailRelationCC }} {{ settings.emailRelationCC }}

{{ settings.emailRelationBCCType | translateList: 'emailReplyToType' }}

{{ settings.emailRelationBCC }} {{ settings.emailRelationBCC }}
{{ settings.resourceLedgerAccount }} {{ settings.resourceLedgerAccount }}
{{ settings.fixedAmountLedgerAccount }} {{ settings.fixedAmountLedgerAccount }}
{{ settings.advanceSettlementLedgerAccount }} {{ settings.advanceSettlementLedgerAccount }}
{{ settings.administrativeCostLedger }} {{ settings.administrativeCostLedger }}
{{ settings.discountLedger }} {{ settings.discountLedger }}
{{ settings.invoiceExpiryType | translateList: 'invoiceExpiryType' }}
{{ settings.paymentDays }} {{ settings.paymentDays }}
{{settings.paymentReference | translateList: 'invoicePaymentReference'}}
{{settings.invoiceExportStrategy | translateList: 'invoiceExportStrategy'}}
{{settings.eInvoiceExportFormat | translateList: 'eInvoiceExportFormat'}}
{{ settings.invoiceExportLineConsolidationStrategy | translateList: 'invoiceExportLineConsolidationStrategy' }}
{{ settings.administrativeCostMethod | translateList: 'administrativeCostMethod'}}
1\\\">
{{ settings.administrativeCostAmount | percentage}} {{ settings.administrativeCostAmount | dynCurrency:2:5}}
{{ settings.numberFormatYear | translateList: 'numberFormatYear'}}
{{ settings.autoNumberStrategy | translateList: 'InvoiceAutoNumberStrategy'}}
{{settings.billingLanguage | translateList: 'language'}}
{{settings.invoiceDetailType | translateList: 'invoiceDetailType'}}
{{settings.fixedAmountRegistrationMethod | translateList:'FixedAmountRegistrationMethod'}}
{{settings.advanceRegistrationMethod | translateList:'AdvanceRegistrationMethod'}}

None

{{ settings.sendInvoiceStrategy | translateList: 'sendInvoiceStrategy'}}
{{ settings.invoiceEmailAttachmentOptions | translateList: 'invoiceEmailAttachmentOptions'}}
{{settings.templateSendInvoice.id | translateList: 'template':settings.templateSendInvoice.name}} {{settings.templateSendInvoice.id | translateList: 'template':settings.templateSendInvoice.name}}
{{settings.templateSendCreditNote.id | translateList: 'template':settings.templateSendCreditNote.name}} {{settings.templateSendCreditNote.id | translateList: 'template':settings.templateSendCreditNote.name}}
{{ settings.emailInvoiceSenderNameType | translateList: 'emailSenderNameType' }} {{ settings.emailInvoiceSenderName }} {{ settings.emailInvoiceSenderName }}

{{ settings.emailInvoiceSenderType | translateList: 'emailReplyToType' }} {{ settings.emailInvoiceSender }} {{ settings.emailInvoiceSender }}

{{ settings.emailInvoiceReplyToType | translateList: 'emailReplyToType' }} {{ settings.emailReplyTo }} {{ settings.emailReplyTo }}
{{ settings.emailInvoiceCCType | translateList: 'emailReplyToType' }} {{ settings.emailInvoiceCC }} {{ settings.emailInvoiceCC }}
{{ settings.emailInvoiceBCCType | translateList: 'emailReplyToType' }} {{ settings.emailInvoiceBCC }} {{ settings.emailInvoiceBCC }}
{{ settings.templateFullPayment.id | translateList: 'template':settings.templateFullPayment.name}} {{settings.templateFullPayment.id | translateList: 'template':settings.templateFullPayment.name}}
{{settings.templatePartialPayment.id | translateList: 'template':settings.templatePartialPayment.name}} {{settings.templatePartialPayment.id | translateList: 'template':settings.templatePartialPayment.name}}
{{settings.taskTimeRegistrationMethod | translateList: 'taskTimeRegistrationMethod'}}
{{ settings.defaultTaskResource.name }} {{settings.defaultTaskResource.id | translateList: 'resource':settings.defaultTaskResource.name}}
{{ settings.emailTaskSenderNameType | translateList: 'emailSenderNameType' }} {{ settings.emailTaskSenderName }} {{ settings.emailTaskSenderName }}
{{ settings.emailTaskSenderType | translateList: 'emailReplyToType' }} {{ settings.emailTaskSender }} {{ settings.emailTaskSender }}
{{ settings.emailTaskReplyToType | translateList: 'emailReplyToType' }} {{ settings.emailTaskReplyTo }} {{ settings.emailTaskReplyTo }}
{{ settings.emailTaskCCType | translateList: 'emailReplyToType' }} {{ settings.emailTaskCC }} {{ settings.emailTaskCC }}
{{ settings.emailTaskBCCType | translateList: 'emailReplyToType' }} {{ settings.emailTaskBCC }} {{ settings.emailTaskCC }}

None

{{settings.documentSigningProvider | translateList: 'signingProvider'}}

{{settings.forceLinkingDocumentsToRelationFromDate | formatDate}} {{settings.forceLinkingDocumentsToRelationFromDate | formatDate}}
 
{{absenceRelation | relationName}} {{absenceRelation | relationName}}
{{hrmSettings.registrationMinimumDate | formatDate}} {{hrmSettings.registrationMinimumDate | formatDate}}
{{hrmSettings.absenceMinimumDate | formatDate}} {{hrmSettings.absenceMinimumDate | formatDate}}
\";","module.exports = \"

Template name Template Context Template Languages Actions
\";","module.exports = \"

Invoice text name Invoice text type Invoice text example ({{ vm.exampleLanguage }}) Actions
{{ item.id | translateList: 'invoiceText':item.name }} {{ item.type | translateList: 'invoiceTextType' }} {{ item.example }}
\";","module.exports = \"

{{ tasktemplate.id | translateList: 'tasktemplate':tasktemplate.name }} {{ tasktemplate.id | translateList: 'tasktemplate':tasktemplate.name }}
\";","module.exports = \"

Mail template Due date offset Frequency Actions
{{vm.templates[reminder.template]}} {{reminder.dueDateOffsetDays | number:0}} {{reminder.frequencyDays | number:0}}
Save Cancel
\";","module.exports = \"

{{ vm.licenseInformation.nextInvoice | formatDate}}

{{::vm.licenseInformation.nextBillingPeriod|translateList:'TenantBillingPeriod'}}

  Twikey

  multisafepay

{{ vm.paymentInformation.paymentAccount }}

{{ vm.licenseInformation.trialEnd | formatDate }}

0\\\">
0\\\"> {{price.count}} * {{price.price| dynCurrency: 0:2 }} {{(price.count*price.price)| dynCurrency: 0:2 }}
{{vm.licenseInformation.activeRelations}}
{{(vm.perRelationPrice.basePrice)| dynCurrency: 0:2 }}
0\\\"> {{vm.perRelationPrice.extraQuantity}} * {{vm.perRelationPrice.extraPrice| dynCurrency: 0:2 }} {{(vm.perRelationPrice.extraAmount)| dynCurrency: 0:2 }}

{{vm.licenseInformation.activeRelations}}
{{(vm.bucketPrice.basePrice)| dynCurrency: 0:2 }}
0\\\"> {{vm.bucketPrice.extraQuantity}} * {{vm.bucketPrice.pricePerRelation| dynCurrency: 0:2 }} {{(vm.bucketPrice.extraAmount)| dynCurrency: 0:2 }}

0\\\" class=form-group> (-{{ vm.discountPercentage | percentage: 0 }})
{{ vm.totalAmount | dynCurrency: 0:2 }}
{{ (vm.totalAmount*(vm.licenseInformation.billingPeriod===0?12:1)) | dynCurrency: 0:2 }}
{{ vm.totalAmount /12| dynCurrency: 0:2 }}

*

{{::lic.beginDate|formatDate}} {{::lic.endDate|formatDate}} {{::lic.userName}} {{::lic.userName}}
\";","module.exports = \"
Name Template type Language Own company Last modified Active Actions
{{item.name}} {{item.name}}
\";","module.exports = \" \";","module.exports = \" \";","module.exports = \"
\";","module.exports = \"
\";","module.exports = \" \";","module.exports = \" \";","module.exports = \"
\";","module.exports = \" \";","module.exports = \"
\";","module.exports = \"
\";","module.exports = \" \";","module.exports = \" \";","module.exports = \"
\";","module.exports = \"
\";","module.exports = \"
\";","module.exports = \"
  {{title}}
\";","module.exports = \" \";","module.exports = \"
\";","module.exports = \" \";","import angular from 'angular';\n\nangular.module('cloudX').directive('affixer', [\n '$window',\n function($window) {\n return {\n restrict: 'A',\n link: function($scope, $element, attributes) {\n var win = angular.element($window);\n var initOffset = $element.offset();\n var initWidth = $element.outerWidth();\n var initHeight = $element.outerHeight();\n var minTop = $('nav.navbar').height() + 20;\n var lastScrollTop = 0;\n\n function affixElement() {\n if ($window.pageYOffset > initOffset.top) {\n if (!$element.hasClass('affix')) {\n initHeight = $element.outerHeight();\n initWidth = $element.outerWidth();\n $element.css('top', minTop + 'px');\n $element.css('width', initWidth + 'px');\n $element.css('overflow', 'visible');\n $element.css('bottom', '0');\n } else if (initHeight > $window.innerHeight - minTop) {\n if (lastScrollTop > $window.pageYOffset) {\n if ($element.position().top < minTop) {\n $element.css(\n 'top',\n $element.position().top +\n (lastScrollTop - $window.pageYOffset) +\n 'px',\n );\n }\n } else {\n if (\n initHeight + $element.position().top >\n $window.innerHeight - minTop\n ) {\n $element.css(\n 'top',\n $element.position().top +\n (lastScrollTop - $window.pageYOffset) +\n 'px',\n );\n }\n }\n }\n $element.addClass('affix');\n } else {\n $element.removeClass('affix');\n $element.css('top', '');\n $element.css('width', '');\n $element.css('bottom', '');\n $element.css('overflow', '');\n }\n lastScrollTop = $window.pageYOffset;\n }\n\n function resize() {\n $element.removeClass('affix');\n affixElement();\n }\n\n $scope.$on('$destroy', function() {\n win.unbind('scroll', affixElement);\n win.unbind('resize', resize);\n });\n win.bind('scroll', affixElement);\n win.bind('resize', resize);\n },\n };\n },\n]);\n","module.exports = \"

  {{vm.currentDate | date:'MMMM yyyy' | uppercase}} 

ma di wo do vr za zo
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 1 2 3 4 5 6

{{vm.currentDate | date: 'fullDate'}}

{{item.from | date:'HH:mm'}} – {{item.until | date:'HH:mm'}}

{{item.customer}} – {{item.subject}}
{{item.location}}
\";","module.exports = \"
  {{title}}
{{comm.label}} {{comm.label}} {{comm.addressId | showAddressData:addresses}} {{comm.addressId | showAddressData:addresses}} {{comm.type | translateList:'emailType'}}
  First enter an address of this type...
\";","module.exports = \"
 
\";","module.exports = \"
0, 'radius4R' : $index===widgetList.length-1, 'radius4L' : $index===0, 'pointer':hasAction(widget)}\\\" ng-click=doAction(widget)>
0 && $index

{{widget.kpi | translateList : 'kpi'}}

{{widget.value}} {{widget.value | dynCurrency}}

\";","module.exports = \"

{{date | date: 'EEEE'}}

{{date | date: 'longDate'}}

\";","angular.module('cloudX').directive('editableBoolSelect', [\n 'editableDirectiveFactory',\n function(editableDirectiveFactory) {\n var dir = editableDirectiveFactory({\n directiveName: 'editableBoolSelect',\n inputTpl:\n '',\n render: function() {\n this.parent.render.call(this);\n },\n autosubmit: function() {\n var self = this;\n self.scope.submitOnChange = function() {\n self.scope.$form.$submit();\n };\n },\n });\n return dir;\n },\n]);\n","angular.module('cloudX').directive('editableCkeditor', [\n 'editableDirectiveFactory',\n '$timeout',\n function(editableDirectiveFactory, $timeout) {\n var dir = editableDirectiveFactory({\n directiveName: 'editableCkeditor',\n inputTpl:\n '',\n render: function() {\n this.parent.render.call(this);\n if (this.scope.$data) {\n this.scope.$data = this.convertNewlinesTextToRichText(this.scope.$data);\n }\n if (this.attrs.eFormclass) {\n this.editorEl.addClass(this.attrs.eFormclass);\n this.inputEl.removeAttr('formclass');\n }\n },\n convertNewlinesTextToRichText: function(content) {\n if (content && typeof content === 'string' && !content.includes('');\n }\n return content;\n },\n addListeners: function() {\n var self = this;\n self.parent.addListeners.call(self);\n // submit textarea by ctrl+enter even with buttons\n if (self.single && self.buttons !== 'no') {\n self.autosubmit();\n }\n },\n autosubmit: function() {\n var self = this;\n\n self.editorEl.on('keyup', function(e) {\n if (self.attrs.submitOnEnter) {\n if (e.keyCode === 13 && !e.shiftKey) {\n self.scope.$apply(function() {\n self.scope.$form.$submit();\n });\n }\n } else if (\n ((e.ctrlKey || e.metaKey) && e.keyCode === 13) ||\n (e.keyCode === 9 && self.editorEl.attr('blur') === 'submit')\n ) {\n self.scope.$apply(function() {\n self.scope.$form.$submit();\n });\n }\n });\n },\n });\n return dir;\n },\n]);\n","angular.module('cloudX').directive('editableCurrency', [\n 'editableDirectiveFactory',\n '$timeout',\n function(editableDirectiveFactory, $timeout) {\n var dir = editableDirectiveFactory({\n directiveName: 'editableCurrency',\n inputTpl:\n '',\n render: function() {\n this.parent.render.call(this);\n },\n autosubmit: function() {\n var self = this;\n self.scope.submitOnChange = function() {\n $timeout(function() {\n self.scope.$form.$submit();\n }, 100);\n };\n self.editorEl.on('keyup', function(e) {\n if (!self.single) {\n return;\n }\n switch (e.keyCode) {\n // hide on `escape` press\n case 27:\n self.scope.$apply(function() {\n self.scope.$form.$cancel();\n });\n break;\n }\n });\n },\n });\n return dir;\n },\n]);\n","angular.module('cloudX').directive('editableLegalForm', [\n 'editableDirectiveFactory',\n '$timeout',\n function(editableDirectiveFactory, $timeout) {\n var dir = editableDirectiveFactory({\n directiveName: 'editableLegalForm',\n inputTpl:\n '',\n render: function() {\n this.parent.render.call(this);\n },\n autosubmit: function() {\n var self = this;\n self.scope.submitOnChange = function() {\n $timeout(function() {\n self.scope.$form.$submit();\n }, 100);\n };\n self.editorEl.on('keyup', function(e) {\n if (!self.single) {\n return;\n }\n switch (e.keyCode) {\n // hide on `escape` press\n case 27:\n self.scope.$apply(function() {\n self.scope.$form.$cancel();\n });\n break;\n }\n });\n },\n });\n return dir;\n },\n]);\n","import angular from 'angular';\n\nangular.module('commonServices').directive('focusOnChange', [\n '$timeout',\n function($timeout) {\n return {\n require: 'ngModel',\n link: function(scope, element, attrs, ngModel) {\n if (!ngModel) return;\n var selector = attrs.focusOnChange;\n if (!selector) {\n console.warn('focusOnChange: no selector specified');\n return;\n }\n ngModel.$viewChangeListeners.push(function() {\n $timeout(function() {\n $(selector)\n .filter(':visible')\n .first()\n .focus();\n }, 100);\n });\n },\n };\n },\n]);\n","module.exports = \"
\";","module.exports = \"{{data}} : {{example()}}

[Yy] [Yyyy] [Mm] Counter #
Example {{example()}}
FirstNumber {{firstNumberExample()}}


\";","module.exports = \" \";","import angular from 'angular';\n\nangular.module('cloudX').directive('rowBlur', [\n '$timeout',\n '$parse',\n function($timeout, $parse) {\n return {\n restrict: 'A',\n link: function(scope, element, attrs) {\n if (!attrs.rowBlur) return;\n var extBlur = $parse(attrs.rowBlur);\n if (!extBlur) return;\n\n var focusedElement = null;\n var onFocus = function() {\n var self = this;\n if (focusedElement !== self) {\n focusedElement = self;\n $timeout(function() {\n if (!focusedElement) extBlur();\n }, 10);\n }\n };\n var onBlur = function() {\n focusedElement = null;\n };\n\n var elements = $('input,select,textarea', element);\n\n elements.on('focus', onFocus);\n elements.on('blur', onBlur);\n\n //Cleanup events if the element is destroyed\n element.on('$destroy', function() {\n elements.off('focus', onFocus);\n elements.off('blur', onBlur);\n focusedElement = null;\n });\n },\n };\n },\n]);\n","module.exports = \"
\";","module.exports = \"
  {{section.id | translateList:'section':section.label}}

\";","module.exports = \"
  {{section.id | translateList:'section':section.label}}

= 3\\\" class=row>

\";","module.exports = \"
\";","module.exports = \"
VAT pending No VAT liability = 2\\\">{{relation[field.id].value}}
\";","import angular from 'angular';\n\nangular.module('cloudX').directive('cxVatNumberInput', [\n '$timeout',\n function($timeout) {\n return {\n restrict: 'E',\n template:\n '' +\n '' +\n '' +\n '' +\n '' +\n '' +\n '' +\n '' +\n '' +\n '' +\n '' +\n '' +\n '' +\n '
' +\n '' +\n '' +\n '' +\n '
' +\n '' +\n '' +\n '' +\n '
' +\n '' +\n '' +\n '' +\n '
',\n scope: {\n field: '=',\n },\n replace: true,\n require: 'ngModel',\n link: function($scope, element, attrs, ngModel) {\n $scope.maskOptions = {\n clearOnBlur: false,\n };\n $scope.value = null;\n $scope.formId = $scope.$id;\n\n ngModel.$render = function() {\n if (ngModel.$viewValue === null) {\n $scope.status = -1;\n } else if (ngModel.$viewValue === 'VatPending') {\n $scope.status = 0;\n } else if (ngModel.$viewValue === '') {\n $scope.status = 1;\n } else {\n $scope.status = 2;\n $scope.value = ngModel.$viewValue;\n }\n };\n\n $scope.setFocus = function(id) {\n $('#' + id).focus();\n };\n\n $scope.changeFormState = function() {\n if ($scope.status === 0) {\n ngModel.$setViewValue('VatPending');\n } else if ($scope.status === 1) {\n ngModel.$setViewValue('');\n } else {\n $timeout(function() {\n if ($scope.value) $scope.setValue();\n $scope.setFocus('vatString');\n }, 50);\n }\n };\n $scope.setValue = function() {\n if ($scope.status === 2) ngModel.$setViewValue($scope.value);\n };\n },\n };\n },\n]);\n","angular.module('cloudX').directive('editableEnumPicker', [\n 'editableDirectiveFactory',\n '$timeout',\n function(editableDirectiveFactory, $timeout) {\n var dir = editableDirectiveFactory({\n directiveName: 'editableEnumPicker',\n inputTpl:\n '',\n render: function() {\n this.parent.render.call(this);\n },\n autosubmit: function() {\n var self = this;\n\n self.editorEl.on('keyup', function(e) {\n if (!self.single) {\n return;\n }\n switch (e.keyCode) {\n // hide on `escape` press\n case 27:\n self.scope.$apply(function() {\n self.scope.$form.$cancel();\n });\n break;\n }\n });\n },\n });\n return dir;\n },\n]);\n","module.exports = \"
×
{{item.title}}

\";","import angular from 'angular';\n\nangular.module('commonServices').service('appSettings', [\n 'dataCache',\n function(dataCache) {\n var data = {\n defaultCountry: 'BE',\n defaultCurrency: 'EUR',\n tenantConfiguration: 0,\n relationListPageSize: 50,\n // dateOptions are currently not in use, but might be used again\n dateOptions: {\n dateFormat: 'd/m/yy',\n dayNamesMin: ['Zo', 'Ma', 'Di', 'Wo', 'Do', 'Vr', 'Za'],\n monthNamesShort: [\n 'Jan',\n 'Feb',\n 'Maa',\n 'Apr',\n 'Mei',\n 'Jun',\n 'Jul',\n 'Aug',\n 'Sep',\n 'Okt',\n 'Nov',\n 'Dec',\n ],\n changeYear: true,\n changeMonth: true,\n onChangeMonthYear: function(year, month, datepickerInst) {\n var day = datepickerInst.selectedDay;\n $(this).datepicker('setDate', new Date(year, month - 1, day));\n },\n yearRange: '-80:+00',\n },\n };\n data.reload = function() {\n var company = dataCache.getDefaultCompany();\n data.defaultCountry = company.countryCode || 'BE';\n data.defaultCurrency = company.currencyCode;\n data.tenantConfiguration = dataCache.getArray('tenantConfiguration');\n data.defaultCompany = company.id;\n };\n dataCache.ready().then(data.reload);\n return data;\n },\n]);\n","import angular from 'angular';\n\nangular.module('cxTable').directive('cxFilterPopupItem', [\n '$compile',\n function($compile) {\n return {\n restrict: 'A',\n\n link: function(scope, el, attrs) {\n var options = scope.$eval(attrs.cxFilterPopupItem);\n var newEl = null;\n if (options.itemTemplate) {\n newEl = $(\n '',\n );\n } else if (options.itemExpression) {\n newEl = $('{{' + options.itemExpression + '}}');\n } else {\n newEl = $('{{item.value}}');\n }\n $compile(newEl)(scope);\n el.append(newEl);\n },\n };\n },\n]);\n","module.exports = \"
Crm typeRPEMZNP
{{::crm|translateList:'crmType'}}
\";","module.exports = \"

0\\\"/>
Fixed
Reference
Today
Fixed
Reference
Today
\";","module.exports = \" \";","module.exports = \"
\";","module.exports = \"
  {{section.label}}
{{config.fieldId|translateList:'field':fields[config.fieldId].label}}
Add
{{config.fieldId|translateList:'field':fields[config.fieldId].label}}
{{config.fieldId|translateList:'field':fields[config.fieldId].label}}
Add
Add
{{config.fieldId|translateList:'field':fields[config.fieldId].label}}
{{config.fieldId|translateList:'field':fields[config.fieldId].label}}
{{config.fieldId|translateList:'field':fields[config.fieldId].label}}
Add
Add
Add
\";","module.exports = \"
  {{section.label}}
{{fields[config.fieldId].label}}
Add
{{fields[config.fieldId].label}}
{{fields[config.fieldId].label}}
Add
Add
{{fields[config.fieldId].label}}
{{fields[config.fieldId].label}}
{{fields[config.fieldId].label}}
Add
Add
Add
\";","module.exports = \"
\";","module.exports = \"
\";","module.exports = \"
\";","module.exports = \" \";","module.exports = \"
\";","module.exports = \"
1\\\" class=margin10B>
\";","module.exports = \" \";","module.exports = \"
\";","module.exports = \"
\";","module.exports = \"
\";","module.exports = \"
\";","module.exports = \"
\";","module.exports = \"
\";","module.exports = \"
\";","module.exports = \"
\";","module.exports = \"
\";","module.exports = \" \";","module.exports = \" \";","module.exports = \"
\";","module.exports = \"
\";","module.exports = \"
{{vm.ngModel|formatDate}}
\";","import angular from 'angular';\nimport { Invoice } from '../model/invoice';\nimport moment from 'moment';\nangular\n .module('cxInvoicing')\n .controller('TransactionPaymentDialogCtrl', [\n '$element',\n 'invoicingSvc',\n 'transactionHttpSvc',\n 'flySvc',\n '$filter',\n 'close',\n 'transaction',\n 'invoice',\n transactionPaymentDialogCtrl,\n ]);\n\nfunction transactionPaymentDialogCtrl(\n $element,\n invoicingSvc,\n transactionHttpSvc,\n flySvc,\n $filter,\n close,\n transaction,\n invoice,\n) {\n var vm = this;\n vm.saving = false;\n if (!transaction || !transaction.id) {\n console.error('Transaction required');\n return;\n }\n\n vm.showValidation = false;\n\n vm.transaction = transaction;\n if (typeof vm.transaction.date === 'string')\n vm.transaction.date = new moment(vm.transaction.date.substr(0, 10)).toDate();\n\n vm.invoice = invoice;\n if (vm.invoice && !(vm.invoice instanceof Invoice)) {\n vm.invoice = new Invoice(vm.invoice);\n }\n vm.invoices = [];\n\n function loadUnpaidInvoices() {\n invoicingSvc\n .retrieveUnpaidInvoices(100, { ownCompanies: [vm.transaction.companyId] })\n .then(function(result) {\n vm.invoices = result;\n });\n }\n\n vm.searchInvoice = function(search) {\n if (!search) return vm.invoices;\n return invoicingSvc.searchUnpaidInvoices(search);\n };\n vm.clearInvoice = function() {\n vm.invoice = null;\n vm.invoiceSearch = null;\n };\n\n function calcAmount() {\n return vm.invoice && vm.invoice.dueAmount() < vm.transaction.openAmount()\n ? vm.invoice.dueAmount()\n : vm.transaction.openAmount();\n }\n vm.payment = {\n invoiceId: invoice ? invoice.id : null,\n amount: calcAmount().round(2),\n remark: vm.transaction.description || '',\n };\n\n if (!vm.invoice) {\n if (vm.transaction.matches && vm.transaction.candidates) {\n // Already matched via auto-link all\n if (vm.transaction.candidates.length) {\n vm.invoices = $.map(vm.transaction.candidates, function(inv) {\n return new Invoice(inv);\n });\n } else {\n loadUnpaidInvoices();\n }\n } else {\n loadUnpaidInvoices();\n transactionHttpSvc.matchTransaction(vm.transaction.id).then(function(result) {\n if (result && result.matches && result.matches.length) {\n var payment = null;\n if (result.matches.length === 1) {\n payment = result.matches[0];\n } else {\n payment = result.matches.find(function(p) {\n return p.amount === vm.transaction.amount;\n });\n }\n if (payment) vm.transaction.payments.push(payment);\n $element.modal('hide');\n close(payment, 500); //Matching was a success\n } else if (result && result.candidates && result.candidates.length) {\n vm.invoices = $.map(result.candidates, function(inv) {\n return new Invoice(inv);\n });\n }\n });\n }\n } else {\n loadUnpaidInvoices();\n }\n\n vm.selectInvoice = function(invoice) {\n if (!invoice || !invoice.id) return;\n if (invoice instanceof Invoice) {\n vm.invoice = invoice;\n } else {\n vm.invoice = new Invoice(invoice);\n }\n vm.payment.amount = calcAmount().round(2);\n };\n vm.invoiceLabel = function(item) {\n if (!item) return null;\n return (\n item.number +\n ': ' +\n $filter('relationName')(item.customer) +\n ' - ' +\n $filter('dynCurrency')(item.amount) +\n ' [' +\n $filter('formatDate')(item.date) +\n ']'\n );\n };\n\n vm.save = function() {\n if (vm.saving) return;\n vm.saving = true;\n vm.payment.invoiceId = vm.invoice.id;\n transactionHttpSvc.createPayment(vm.transaction.id, vm.payment).then(\n function(result) {\n if (result) {\n if (vm.transaction) vm.transaction.payments.push(result);\n }\n vm.saving = false;\n $element.modal('hide');\n close(result, 500);\n },\n function(error) {\n vm.saving = false;\n flySvc.error(error.data.code, error.data.parameters);\n },\n );\n };\n\n vm.cancel = function() {\n close(null, 500);\n };\n}\n","module.exports = \"0)\\\">
Description Comment Quantity UnitPrice Subtotal VatRate Discount Taxable amount OriginalAmount AdjustedAmount Ledger account
3 && line.type!==8 && line.type!==9\\\">{{ line.billedQuantity | dynNumber: 0:5 }} {{ line.billedUnitPrice | dynCurrency: 2:5 }} {{ line.baseAmount | dynCurrency }} {{ line.billedVatRate | vatRateType:line.billedVatType }} {{ line.billedVatRate | vatRateType:line.billedVatType }} 0% {{ line.billedDiscountPercentage | percentage }} {{ line.billedDiscountPercentage | percentage }} {{ line.totalExVat() | dynCurrency }} {{ line.originalAmount | dynCurrency }} {{ (line.baseAmount -line.originalAmount) | dynCurrency }}
line.type || line.type===9\\\"> =4 && line.type!==9\\\">
Registrations
Relation Employee Date =line.type || line.type===9\\\"> =line.type || line.type===9\\\"> Resource Comment Quantity UnitPrice TotalExVat VatRate Discount Internal comment
{{detail.customer | relationName}} - {{detail.invoiceStream | invoiceStreamName:''}} {{ vm.getUserName(detail.userId) }} {{::detail.date | formatDate}} {{ detail.resourceId|translateList:'Resource': detail.resource }} {{ detail.billedQuantity() | dynNumber: 0:5 }} {{ detail.billedUnitPrice() | dynCurrency }} {{ detail.billedAmount() | dynCurrency }} {{ detail.billedVatRate() | vatRateType: detail.billedVatType() }} 0%
{{ vm.getUserName(detail.userId) }} {{detail.resourceId|translateList:'Resource': detail.resource}} {{ detail.billedAmount() | dynCurrency }}
%
{{detail.customer | relationName}} {{ vm.getUserName(detail.userId) }} {{ detail.date | formatDate}} {{ detail.resourceId|translateList:'Resource': detail.resource }} {{ detail.remark }} {{ detail.displayTime() }} {{ detail.billedQuantity() | dynNumber: 0:5 }} {{ detail.billedUnitPrice() | dynCurrency: 2:5 }} {{ detail.billedAmount() | dynCurrency }} {{ detail.internalRemark }}
{{line.totalRegistrationHours()}} {{line.totalRegistrationAmount() | dynCurrency}}
=4 && line.type!==9) || !!vm.invoice.status || vm.invoice.invoiceType===6\\\" ng-click=\\\"!vm.invoice.locked && vm.addDetailLine(line);\\\"> Add detail line
Add invoice line Add credit line
\";","module.exports = \"
No open transactions
0?'positive':'negative'\\\" ng-model=item data-drag=\\\"{{('InvoiceFinal:c'|security)}}\\\" data-jqyoui-options=\\\"{revert:'invalid',helper:'clone'}\\\" jqyoui-draggable=\\\"{animate:true, placeholder: 'keep'}\\\">
{{item.name}} ({{item.iban}})
{{item.date | formatDate}}
{{item.amount | dynCurrency}}
{{item.openAmount() | dynCurrency}} ({{item.amount | dynCurrency}})
{{item.description}}
Link transaction
\";","module.exports = \"
No unpaid invoices
{{item.customer | relationName}}
{{item.number}}
{{item.date | formatDate}}
{{item.amount | dynCurrency}}
{{(item.dueAmount()) | dynCurrency}} ({{item.amount | dynCurrency}})
\";","module.exports = \"
  • 1\\\"> via {{item.source | translateList:'entitySourceType':item.source:item}}
    item.createDate\\\">
    item.createDate\\\">
    = item.createDate\\\"> {{ item.createDate | formatDate }}
\";","import angular from 'angular';\nimport { Notification } from './model/notification';\nimport SignalRService from '@/shared/services/SignalRService';\nimport moment from 'moment';\nimport { services } from 'angular-ui-router';\nimport DocumentService from '@/shared/services/DocumentService';\n\nangular\n .module('cxNotifications')\n .factory('notificationSvc', [\n '$state',\n '$q',\n '$http',\n '$rootScope',\n '$filter',\n 'appUrls',\n 'dataCache',\n '$translate',\n 'resourceFactorySvc',\n 'dialogsSvc',\n '$timeout',\n notificationSvc,\n ]);\n\nfunction notificationSvc(\n $state,\n $q,\n $http,\n $rootScope,\n $filter,\n appUrls,\n dataCache,\n $translate,\n resourceFactorySvc,\n dialogsSvc,\n $timeout,\n) {\n const service = {\n notifications: [],\n barVisible: false,\n taskId: null,\n };\n\n service.countUnseen = function () {\n return service.notifications.reduce(function (cnt, el) {\n return cnt + (el.unread ? 1 : 0);\n }, 0);\n };\n\n function combineNotifications(notifications) {\n service.notifications.clear();\n\n if (!notifications || !notifications.length) return;\n\n service.notifications = $.map(\n notifications.reduce(function (o, e, index) {\n if (e.json && typeof e.json === 'string') {\n try {\n const json = JSON.parse(e.json);\n e = {\n ...e,\n ...json,\n };\n } catch (error) {\n console.error(error);\n }\n }\n\n // dont group custom messages, connect info messages, because their content is different even tho they are the same type\n var combineNotification =\n e.type !== 500 &&\n e.type !== 900 &&\n e.type !== 901 &&\n e.type !== 1000 &&\n e.type !== 1001 &&\n e.type !== 1002;\n if (combineNotification) {\n if (!o[e.type]) {\n var notification = new Notification(e);\n if (notification.type === 400) {\n addTrialExpireDays(notification);\n }\n o[e.type] = notification;\n } else {\n o[e.type].add(e);\n if (e.createDate > o[e.type].createDate) o[e.type].createDate = e.createDate;\n }\n } else {\n var notification = new Notification(e);\n o[`${e.type}-${index}`] = notification;\n }\n\n return o;\n }, {}),\n function (value) {\n return value;\n },\n );\n service.notifications.sortByProperty('-createDate');\n }\n\n function reloadNotifications() {\n $http.get(appUrls.notifications + '/Api/Notifications/').then(function (response) {\n combineNotifications(response.data);\n });\n }\n\n function addTrialExpireDays(notification) {\n dataCache.ready().then(function () {\n var trialDate = dataCache.getArray('trialExpiryDate');\n if (typeof trialDate === 'string') trialDate = new moment(trialDate).toDate();\n\n var days = Math.floor((trialDate - moment.utc().startOf('day').toDate()) / 86400000);\n notification.param = days;\n });\n }\n\n function addJobParams(notification) {\n if ($translate.isReady()) setJobParams(notification);\n else $translate.onReady(() => setJobParams(notification));\n }\n\n function setJobParams(notification) {\n var jobParams = JSON.parse(notification.json);\n\n if (jobParams.jobType || jobParams.jobType === 0) {\n var jobType = $filter('translateList')(jobParams.jobType, 'jobtype');\n notification.jobType = jobType;\n }\n if (jobParams.jobStatus || jobParams.jobType === 0) {\n var jobStatus = $filter('translateList')(jobParams.jobStatus, 'jobstatus');\n notification.jobStatus = jobStatus;\n }\n }\n\n service.markSeen = function (notification) {\n if (!notification) return;\n\n var notificationIds =\n notification.items && notification.items.length > 1\n ? notification.items.map((x) => x.id)\n : [notification.id];\n\n if (!notification.unread) return;\n\n $http\n .post(appUrls.notifications + '/Api/Notifications/MarkSeen', notificationIds)\n .success(function (result) {\n notification.unread = false;\n if (notification.items && notification.items.length > 0) {\n notification.items.forEach(function (notification) {\n notification.unread = false;\n });\n } else {\n findAndUpdateNotification(notification);\n }\n })\n .error(function (error) {});\n };\n\n service.markAllSeen = function () {\n if (!service.notifications || service.notifications.length < 1) return;\n\n var notificationIds = [];\n\n service.notifications.forEach(function (notification) {\n notification.items.forEach(function (item) {\n notificationIds.push(item.id);\n });\n });\n\n $http\n .post(appUrls.notifications + '/Api/Notifications/MarkSeen', notificationIds)\n .success(function (result) {\n service.notifications.forEach(function (notification) {\n notification.unread = false;\n notification.items.forEach(function (item) {\n item.unread = false;\n });\n });\n })\n .error(function (error) {});\n };\n\n service.markExpired = function (notification) {\n if (!notification || !notification.items || notification.items.length < 1) return;\n var notificationIds = notification.items.map((x) => x.id);\n $http\n .post(appUrls.notifications + '/Api/Notifications/Expire', notificationIds)\n .success(function (result) {\n var idx = service.notifications.findIndex(function (el) {\n return el.id === notification.id;\n });\n if (idx >= 0) service.notifications.splice(idx, 1);\n })\n .error(function (error) {});\n };\n\n function openTaskDetailDialog(taskId) {\n service.taskId = { id: taskId };\n }\n\n service.doAction = function (item) {\n service.hideNotifications();\n service.markSeen(item);\n console.log(item);\n switch (item.type) {\n case 100:\n return $state.go('invoicing.draft');\n case 103:\n return $state.go('invoicing.overview');\n case 104:\n if (item.items && item.items.length === 1) {\n item = item.items[0];\n }\n const linkType = item.linkType || item.LinkType; // backwards compatbility for json serialization issue not respecting camelCase\n if (linkType === 0 || linkType === 1) {\n // send email failed: depending on the email link type, navigate to the correct screen\n return $state.go('invoicing.overview', {\n invoiceId: item.objectId,\n });\n }\n if (linkType === 2) {\n return $state.go('taskflow.taskboard', {\n relation: item.relation,\n });\n }\n if (linkType === 4) {\n return $state.go('interactions', {\n relationId: item.objectId,\n });\n }\n break;\n case 204:\n return $state.go('relations.import');\n case 200:\n case 201:\n case 202:\n case 203:\n case 205:\n case 206:\n case 207:\n case 208:\n case 209:\n case 210:\n case 211:\n case 212:\n case 213:\n case 214:\n case 215:\n case 216:\n case 217:\n case 218:\n case 219:\n case 221:\n case 222:\n return $state.go('relations.detail', {\n relId: item.objectId,\n });\n case 400: //Tenant expiring\n return $state.go('settings.license');\n //Custom URL\n case 500:\n if (item.redirectUrl) window.location = item.redirectUrl;\n break;\n case 501:\n if (item.info.taskId) openTaskDetailDialog(item.info.taskId);\n break;\n case 600:\n return $state.go('settings.license');\n case 700:\n return $state.go('jobs.detail', {\n jobId: item.objectId,\n });\n case 800:\n return $state.go('documents', {\n documentId: item.objectId,\n });\n case 801:\n DocumentService.download(item.objectId);\n break;\n case 900:\n case 901:\n const connectUrl = `${appUrls.connect}/home/notification?companyId=${item.companyId}&connectPlatform=${item.connectPlatformInt}`;\n window.open(connectUrl, '_blank');\n case 1000:\n case 1001:\n case 1002:\n case 1003:\n case 1004:\n const url = item.shareUrl;\n if (url) {\n window.open(url, '_blank');\n }\n break;\n case 1100:\n case 1101:\n case 1102:\n return $state.go('accessTokens');\n case 1200:\n return $state.go('employees.detail', {id: item.objectId});\n default:\n if (item.type >= 200 && item.type < 300) {\n return $state.go('relations.detail', {\n relId: item.objectId,\n });\n }\n service.showNotifications();\n\n return undefined;\n }\n };\n service.getTooltip = function () {\n if (!service.notifications.length) return '';\n var nr = service.countUnseen();\n if (nr === 1) return $translate.instant('1 new notification');\n if (nr > 1)\n return $translate.instant('{nr} new notifications', {\n nr: nr,\n });\n\n nr = service.notifications.length;\n if (nr === 1) return $translate.instant('1 notification');\n if (nr > 1)\n return $translate.instant('{nr} notifications', {\n nr: nr,\n });\n return '';\n };\n\n service.disableNotificationType = function (item) {\n if (!item) return;\n return dialogsSvc\n .showYesNoCancel('comfirmDisableNotificationType', 'msgConfirmDeleteNotificationsOfType')\n .then(\n function (result) {\n if (result === null) return false; // Cancel changes\n\n const requests = [\n $http.put(appUrls.notifications + '/Api/Settings/Type', {\n type: item.type,\n shouldCreate: false,\n }),\n ];\n\n if (result) {\n requests.push(service.markExpired(item));\n }\n return $q\n .all(requests)\n .success(() => {\n flySvc.success('msgConfirmChange');\n return true;\n })\n .error(function (error) {});\n },\n function () {\n return false; // Cancel changes\n },\n );\n };\n\n /*Toggle bar visibility */\n service.showNotifications = function () {\n service.barVisible = true;\n };\n service.hideNotifications = function () {\n service.barVisible = false;\n };\n service.toggleNotifications = function () {\n service.barVisible = !service.barVisible;\n };\n service.getTaskDetailId = function () {\n return service.taskId;\n };\n service.closeTaskDetail = function () {\n $timeout(() => {\n service.taskId = null;\n }, 0);\n };\n\n reloadNotifications();\n\n var addNotification = function (notification) {\n var notif = service.notifications.find(function (el) {\n return el.type === notification.type;\n });\n if (!notif) {\n service.notifications.unshift(new Notification(notification));\n } else {\n notif.add(notification);\n }\n };\n var findAndUpdateNotification = function (notification) {\n var idx = service.notifications.findIndex(function (el) {\n return el.type === notification.type;\n });\n if (idx >= 0) {\n service.notifications[idx].update(notification);\n if (service.notifications[idx].cnt === 0) service.notifications.splice(idx, 1);\n }\n };\n var findAndRemoveNotification = function (notification) {\n var idx = service.notifications.findIndex(function (el) {\n return el.type === notification.type;\n });\n if (idx >= 0) {\n service.notifications[idx].remove(notification);\n if (service.notifications[idx].cnt === 0) service.notifications.splice(idx, 1);\n }\n };\n\n const createNotificationHandler = function (actionFunc) {\n return function (notifications) {\n if (!notifications) return;\n if (typeof notifications === 'string' && notifications.indexOf('[') === 0)\n notifications = JSON.parse(notifications);\n if (angular.isArray(notifications)) {\n for (var i = 0; i < notifications.length; i++) actionFunc(notifications[i]);\n } else {\n //One object\n actionFunc(notifications);\n }\n };\n };\n\n SignalRService.subscribe('addNotifications', createNotificationHandler(addNotification));\n SignalRService.subscribe(\n 'updateNotifications',\n createNotificationHandler(findAndUpdateNotification),\n );\n SignalRService.subscribe(\n 'removeNotifications',\n createNotificationHandler(findAndRemoveNotification),\n );\n\n return service;\n}\n","module.exports = \"
\";","module.exports = \"
\";","module.exports = \"
\";","module.exports = \"
\";","module.exports = \"
\";","module.exports = \"
\";","module.exports = \" \";","module.exports = \" \";","module.exports = \"
\";","module.exports = \"
\";","module.exports = \" \";","module.exports = \" \";","module.exports = \" \";","import angular from 'angular';\nimport { RegistrationGroup } from '../model/registrationGroup';\nimport { dynamicSortMultiple } from '@/shared/utils/dynamicSort';\nimport moment from 'moment';\nimport DocumentService from '@/shared/services/DocumentService';\nimport { resourceMatchesFilters } from '@/shared/components/registration/registrationHelpers';\n\nangular.module('cxRegistrations').directive('cxRegistrationGroupInput', [\n function() {\n return {\n restrict: 'E',\n replace: true,\n template: require('./registrationGroupInput.html'),\n scope: {\n date: '=',\n value: '=',\n save: '&',\n afterSave: '&',\n cancel: '&',\n onDateChanged: '&dateChanged',\n onTaskStatusChanged: '&taskStatusChanged',\n },\n controller: [\n '$scope',\n 'dataCache',\n 'resourceFactorySvc',\n 'registrationService',\n 'dialogsSvc',\n 'userData',\n 'flySvc',\n 'checkSecurity',\n 'checkFeature',\n '$rootScope',\n 'priceService',\n 'resourceNameFilter',\n '$q',\n '$http',\n 'appUrls',\n 'translateListFilter',\n '$state',\n '$window',\n 'invoiceStreamNameFilter',\n function(\n $scope,\n dataCache,\n resourceFactorySvc,\n registrationService,\n dialogsSvc,\n userData,\n flySvc,\n checkSecurity,\n checkFeature,\n $rootScope,\n priceService,\n resourceNameFilter,\n $q,\n $http,\n appUrls,\n translateListFilter,\n $state,\n $window,\n invoiceStreamNameFilter,\n ) {\n $scope.registrationService = registrationService;\n\n $scope.editReg = null;\n $scope.editRegCopy = null;\n $scope.workResources = [];\n $scope.travelResources = [];\n $scope.costResources = [];\n $scope.isReadOnly = false;\n $scope.userId = dataCache.getArray('employee').userID;\n $scope.btnDisabled = false;\n $scope.resources = [];\n $scope.interactionType = null;\n $scope.plannedTasks = [];\n $scope.task = null;\n $scope.taskStatus = null;\n $scope.interactionAttachments = [];\n\n $scope.getInvoiceStreamLabel = invoiceStreamNameFilter;\n\n $scope.ckeditorOptions = {\n autoGrow_minHeight: 50,\n height: 50,\n };\n\n var reset = function() {\n //Restore registration object to state before editing\n if ($scope.editReg && $scope.editReg.group && $scope.editRegCopy)\n $scope.editReg.fromJson($scope.editRegCopy);\n $scope.editReg = null;\n $scope.editRegCopy = null;\n $scope.interactionAttachments = [];\n $scope.taskStatus = null;\n\n $scope.$broadcast('$cxFormClosing');\n };\n\n var resetCollapsed = function() {\n if (!$scope.editReg || !$scope.editReg.group) {\n var userSettings = userData.get('regInput', {\n isWorkCollapsed: false,\n isTravelCollapsed: true,\n isCostsCollapsed: true,\n isRemarksCollapsed: false,\n isCommunicationCollapsed: true,\n });\n\n $scope.isWorkCollapsed = userSettings.isWorkCollapsed;\n $scope.isTravelCollapsed = userSettings.isTravelCollapsed;\n $scope.isCostsCollapsed = userSettings.isCostsCollapsed;\n $scope.isRemarksCollapsed = userSettings.isRemarksCollapsed;\n $scope.isCommunicationCollapsed = userSettings.isCommunicationCollapsed;\n } else {\n $scope.isWorkCollapsed = !$scope.editReg.work.id;\n $scope.isTravelCollapsed = !$scope.editReg.travel.id;\n $scope.isCostsCollapsed = !$scope.editReg.cost.id;\n $scope.isRemarksCollapsed = !$scope.editReg.remark;\n $scope.isCommunicationCollapsed = true;\n }\n };\n\n var resourceSelected = function(registration, retrieveOnly) {\n registration.priceOptions = null;\n if (registration.hasResource && registration.resource.type === 3) {\n if (!retrieveOnly) {\n registration.quantity = 0.0;\n registration.price = null;\n registration.amount = 0.0;\n registration.discountPercentage = 0.0;\n registration.isBillable = false;\n registration.inForfait = null;\n registration.isFixedPrice = false;\n }\n } else if (registration.hasResource && !registration.resource.isOther) {\n // Only load price options when user has permissions\n if (checkSecurity('Pricelist:r')) {\n priceService\n .getPrice({\n category: registration.resource.categoryId,\n invoiceStream: registration.invoiceStreamId,\n user: registration.userId,\n })\n .then(function(price) {\n if (price) {\n registration.priceOptions = [price];\n if (!retrieveOnly && !registration.price) {\n registration.price = price;\n }\n if (!registration.group) {\n registration.price = price;\n }\n }\n });\n if (\n (!retrieveOnly || registration.inForfait === null) &&\n !!registration.invoiceStreamId\n ) {\n priceService\n .isResourceInForfait({\n resource: registration.resource.id,\n invoiceStream: registration.invoiceStreamId,\n })\n .then(function(inForfait) {\n registration.inForfait = inForfait;\n });\n }\n }\n\n if (!retrieveOnly) {\n if (\n (registration.resource.type === 1 || registration.resource.type === 2) &&\n registration.quantity === 0\n )\n registration.quantity = 1;\n registration.vatPercentage = registration.resource.vatPercentage;\n registration.vatType = registration.resource.vatType;\n registration.isBillable = registration.resource.isBillable;\n registration.isFixedPrice = registration.resource.isFixedPrice;\n //if (registration.type === 0 && registration.durationMinutes === 0) registration.durationMinute = 15; TFS 10935\n }\n } else if (!retrieveOnly) {\n registration.quantity = 0.0;\n registration.price = null;\n registration.amount = 0.0;\n registration.discountPercentage = 0.0;\n registration.isBillable = true;\n registration.isFixedPrice = false;\n }\n };\n\n //Watch the value attribute for changes\n $scope.$watch('value', function(newValue, oldValue) {\n reset();\n if (newValue) {\n $scope.editReg = newValue;\n $scope.editRegCopy = newValue.toJson(false);\n $scope.editReg.task = null;\n $scope.taskStatus = null;\n $scope.retrieveResources().then(function() {\n resourceSelected($scope.editReg.work, true);\n resourceSelected($scope.editReg.travel, true);\n resourceSelected($scope.editReg.cost, true);\n });\n $scope.retrievePlannedTasks().then(function() {\n const plannedTaskId = $scope.editReg.getPlannedTaskId();\n\n if (plannedTaskId) {\n $scope.editReg.task = $scope.plannedTasks.find(\n x => x.plannedTaskId === plannedTaskId,\n );\n $scope.resetTaskStatus();\n }\n });\n if ($scope.editReg.relation && !$scope.editReg.invoiceStreamId) {\n $scope.relationChanged();\n }\n var userId =\n $scope.editReg.work.userId ||\n $scope.editReg.travel.userId ||\n $scope.editReg.cost.userId;\n $scope.isReadOnly =\n !!userId && userId !== $scope.userId\n ? !checkSecurity('RegistrationOthers:u')\n : !checkSecurity('RegistrationOwn:u');\n } else {\n $scope.editReg = new RegistrationGroup();\n $scope.editReg.date = $scope.date;\n $scope.editRegCopy = null;\n $scope.isReadOnly = !checkSecurity('RegistrationOwn:c');\n }\n resetCollapsed();\n setTimeout(function() {\n $('#RelationField').focus();\n }, 250);\n });\n\n $scope.dateChanged = function() {\n if (!$scope.editReg.group) {\n // New registration\n $scope.date = $scope.editReg.date;\n $scope.onDateChanged({ date: $scope.date });\n }\n };\n\n $scope.relationChanged = function() {\n const relation = $scope.editReg.relation;\n var invoicesStreamId =\n relation && relation.invoiceStreamId && relation.id ? relation.invoiceStreamId : null;\n if (relation && relation.id && !invoicesStreamId) {\n //Recent relation selected. Retrieve relation again with invoice streams\n return resourceFactorySvc\n .get('relation')\n .ids(null, [relation.id])\n .$promise.then(\n ([rel] = []) => {\n if (rel && rel.id && rel.invoiceStreamId) {\n $scope.editReg.relation = rel;\n $scope.relationChanged();\n } else {\n $scope.editReg.relation = null;\n $scope.relationChanged();\n }\n },\n error => {\n flySvc.error(error);\n $scope.editReg.relation = null;\n $scope.relationChanged();\n },\n );\n }\n\n $scope.editReg.invoiceStreamId = invoicesStreamId;\n $scope.editReg.invoiceStream =\n (invoicesStreamId &&\n relation &&\n relation.invoiceStreams &&\n relation.invoiceStreams.find(x => x.id === invoicesStreamId)) ||\n null;\n $scope.editReg.work.inForfait = null;\n $scope.editReg.travel.inForfait = null;\n $scope.editReg.cost.inForfait = null;\n\n $scope.checkIfResourcesMatchFilters();\n $scope.selectTask(null, $scope.editReg?.referenceYear);\n\n $scope.retrievePlannedTasks();\n };\n\n $scope.checkIfResourcesMatchFilters = function() {\n const relation = $scope.editReg.relation;\n const invoiceStream = $scope.editReg.invoiceStream;\n if ($scope.editReg.work.resource) {\n if (\n !resourceMatchesFilters(\n $scope.editReg.work.resource,\n relation?.crm,\n invoiceStream?.assignmentTemplateId,\n )\n ) {\n $scope.editReg.work.resource = null;\n }\n resourceSelected($scope.editReg.work, true);\n }\n if ($scope.editReg.travel.resource) {\n if (\n !resourceMatchesFilters(\n $scope.editReg.travel.resource,\n relation?.crm,\n invoiceStream?.assignmentTemplateId,\n )\n ) {\n $scope.editReg.travel.resource = null;\n }\n resourceSelected($scope.editReg.travel, true);\n }\n if ($scope.editReg.cost.resource) {\n if (\n !resourceMatchesFilters(\n $scope.editReg.cost.resource,\n relation?.crm,\n invoiceStream?.assignmentTemplateId,\n )\n ) {\n $scope.editReg.cost.resource = null;\n }\n resourceSelected($scope.editReg.cost, true);\n }\n };\n\n $scope.selectResource = function(registration) {\n registration.price = null;\n resourceSelected(registration);\n };\n\n var translateResources = function() {\n $scope.resources = $scope.resources\n .map(item => ({ ...item, name: resourceNameFilter(item), code: item.code || '' }))\n .sort(dynamicSortMultiple('code', 'name'));\n };\n\n $scope.$on('$destroy', function() {\n $rootScope.$on('$translateChangeSuccess', translateResources);\n if ($scope.resourceRequest && $scope.resourceRequest.$cancelRequest)\n $scope.resourceRequest.$cancelRequest();\n });\n\n //Retrieves the resources after selecting a relation.\n $scope.resourcePromise = null;\n $scope.retrieveResources = function() {\n if ($scope.resourcePromise) return $scope.resourcePromise;\n\n $scope.resourceRequest = resourceFactorySvc.get('resource').reg(\n {\n type: -1,\n },\n function(data) {\n $scope.workResources = [];\n $scope.travelResources = [];\n $scope.costResources = [];\n $scope.resources = data;\n\n translateResources();\n\n if ($scope.resources) {\n for (var i = 0; i < $scope.resources.length; i++) {\n if ($scope.resources[i].type === 1) {\n $scope.costResources.push($scope.resources[i]);\n } else if ($scope.resources[i].type === 2) {\n $scope.travelResources.push($scope.resources[i]);\n } else if ($scope.resources[i].type === 0) {\n $scope.workResources.push($scope.resources[i]);\n }\n }\n }\n },\n );\n\n return ($scope.resourcePromise = $scope.resourceRequest.$promise);\n };\n $scope.$watch('editReg.interactionId', function() {\n $scope.retrieveInteracationAttachments();\n });\n\n $scope.$watch('editReg.work.date', function(newValue, oldValue) {\n $scope.retrieveResources().then(function() {\n if ($scope.editReg) {\n resourceSelected($scope.editReg.work, true);\n resourceSelected($scope.editReg.travel, true);\n resourceSelected($scope.editReg.cost, true);\n }\n });\n });\n\n $scope.cancelReg = function() {\n reset();\n $scope.value = null;\n $scope.cancel();\n };\n\n $scope.saveReg = function() {\n if ($scope.editReg && $scope.editReg.validate()) {\n $scope.btnDisabled = true;\n\n const interactionModel = createInteractionModel();\n const interactionId = $scope.editReg.interactionId;\n\n $scope\n .save({\n reg: $scope.editReg,\n })\n .then(updatedReg => {\n if (updatedReg) {\n //Create interaction\n try {\n if (interactionModel) {\n return createOrUpdateInteraction(interactionModel, updatedReg.group)\n .then(({ data: interaction }) => {\n if (interaction) {\n $scope.linkAttachments(interaction.id, updatedReg.relation.id);\n }\n })\n .then(() => updatedReg);\n } else if (interactionId) {\n //Interactioon exists but was not updated\n return $scope\n .linkAttachments(interactionId, updatedReg.relation.id)\n .then(() => updatedReg);\n }\n } catch (e) {\n console.error(e);\n }\n }\n return updatedReg;\n })\n .then(reg => {\n //Trigger event after save (close dialog/form)\n if (reg) $scope.afterSave({ reg });\n return reg;\n })\n .finally(function() {\n $scope.btnDisabled = false;\n });\n } else {\n flySvc.error('registrationFormContainsErrors');\n }\n };\n $scope.emptyInteractionDescription =\n '\\n\\n\\t\\n\\n\\n\\n';\n function createInteractionModel() {\n if (!$scope.editReg) return null;\n if ($scope.editReg.interactionType === null) return null;\n if (\n $scope.editReg.interactionTitle === null &&\n $scope.editReg.interactionDescription === null\n )\n return null;\n\n const interactionChanged =\n (!$scope.editReg.originalInteraction &&\n (($scope.editReg.interactionDescription &&\n $scope.editReg.interactionDescription !== $scope.emptyInteractionDescription) ||\n $scope.editReg.interactionTitle)) ||\n ($scope.editReg.originalInteraction &&\n (($scope.editReg.interactionDescription !=\n $scope.editReg.originalInteraction.description &&\n $scope.editReg.interactionDescription !== $scope.emptyInteractionDescription) ||\n $scope.editReg.interactionTitle != $scope.editReg.originalInteraction.title ||\n $scope.editReg.interactionType !=\n $scope.editReg.originalInteraction.interactionType ||\n $scope.editReg.originalInteraction.relationId != $scope.editReg.relation.id ||\n !moment($scope.editReg.originalInteraction.date).isSame(\n moment($scope.editReg.date),\n 'day',\n )));\n if (!interactionChanged) return null;\n if ($scope.editReg.interactionId) {\n //Update\n return {\n ...($scope.editReg.originalInteraction || {}),\n id: $scope.editReg.interactionId || null,\n description: $scope.editReg.interactionDescription,\n title: $scope.editReg.interactionTitle,\n interactionType: $scope.editReg.interactionType,\n title: $scope.editReg.interactionTitle,\n date: $scope.editReg.date,\n relationId: $scope.editReg.relation.id,\n };\n }\n return {\n description: $scope.editReg.interactionDescription,\n title: $scope.editReg.interactionTitle,\n interactionType: $scope.editReg.interactionType,\n date: $scope.editReg.date,\n relationId: $scope.editReg.relation.id,\n objectType: 1,\n objectId: $scope.editReg.group || null,\n interactionSource: 1,\n };\n }\n\n function createOrUpdateInteraction(model, group) {\n if (!model) return;\n if (model.id) {\n // update\n return $http.put(appUrls.interactions + '/api/interactions', model);\n } else {\n model.objectId = model.objectId || group;\n return $http.post(appUrls.interactions + '/api/interactions/create', model);\n }\n }\n\n $scope.calcDistance = function() {\n if (!$scope.editReg || !$scope.editReg.travel || !$scope.editReg.travel.relation.id)\n return;\n dialogsSvc\n .showDistanceDialog(\n $scope.editReg.travel.relation.id,\n $scope.editReg.travel.relation.companyId,\n )\n .then(function(result) {\n if (result) {\n if (result.distance) $scope.editReg.travel.quantity = result.distance;\n if (result.description) {\n $scope.editReg.remark =\n ($scope.editReg.remark ? $scope.editReg.remark + '\\n' : '') +\n result.description;\n }\n }\n });\n };\n\n $scope.toggleCollapse = function(prop) {\n $scope[prop] = !$scope[prop];\n if (!$scope.editReg || !$scope.editReg.group) {\n userData.set('regInput', {\n isWorkCollapsed: $scope.isWorkCollapsed,\n isTravelCollapsed: $scope.isTravelCollapsed,\n isCostsCollapsed: $scope.isCostsCollapsed,\n isRemarksCollapsed: $scope.isRemarksCollapsed,\n isCommunicationCollapsed: $scope.isCommunicationCollapsed,\n });\n }\n };\n\n $scope.setInteractionType = function(interactionType) {\n if ($scope.editReg.interactionType === interactionType) {\n $scope.editReg.interactionType = null;\n } else {\n $scope.editReg.interactionType = interactionType;\n }\n };\n\n $scope.getTaskLabel = task =>\n task.plannedTaskName ||\n (task.plannedTaskTemplateId\n ? translateListFilter(\n task.plannedTaskTemplateId,\n 'tasktemplate',\n task.plannedTaskTemplateName || '',\n )\n : '');\n\n $scope.retrievePlannedTasks = function() {\n $scope.plannedTasks = [];\n if (!$scope.editReg || !$scope.editReg.invoiceStreamId)\n return $q.when($scope.plannedTasks);\n\n const currentTaskIds = $scope.editReg.getPlannedTaskIds() || [];\n return $http\n .post(appUrls.tasks + '/api/PlannedTasks/ForRegistrations', {\n invoiceStreamId: $scope.editReg.invoiceStreamId,\n includeIds: currentTaskIds,\n })\n .then(function({ data }) {\n $scope.plannedTasks = data\n .reduce((array, orgMainTask, mainTaskIndex) => {\n const { children = null, ...mainTask } = orgMainTask;\n const mainTaskLabel = $scope.getTaskLabel(mainTask);\n const mappedChildren = (children || []).map((orgSubTask, subTaskIndex) => {\n const subtaskLabel = $scope.getTaskLabel(orgSubTask);\n return {\n ...orgSubTask,\n label: subtaskLabel,\n id: orgSubTask.plannedTaskId,\n search: `${mainTaskLabel};${subtaskLabel}`,\n level: 1,\n order: mainTaskIndex * 100 + (subTaskIndex + 1),\n };\n });\n\n const childLabels = mappedChildren.map(x => x.label).join(';');\n\n return array.concat([\n {\n ...mainTask,\n label: mainTaskLabel,\n id: mainTask.plannedTaskId,\n search: `${mainTaskLabel};${childLabels}`,\n level: 0,\n order: mainTaskIndex * 100,\n },\n ...mappedChildren,\n ]);\n }, [])\n .filter(x => !!x.label)\n .sort(dynamicSortMultiple('order', 'label'));\n return $scope.plannedTasks;\n });\n };\n\n $scope.selectTask = function(task, referenceYear) {\n if (task && task.id) {\n const {\n plannedTaskId,\n plannedTaskName,\n plannedTaskTemplateId,\n plannedTaskTemplateType,\n mainPlannedTaskId,\n mainPlannedTaskName,\n mainTaskTemplateId,\n resourceId,\n year,\n } = task;\n\n $scope.editReg.setTaskFields({\n plannedTaskId,\n plannedTaskName,\n plannedTaskTemplateId,\n plannedTaskTemplateType,\n mainPlannedTaskId,\n mainPlannedTaskName,\n mainTaskTemplateId,\n year,\n });\n\n if (resourceId && $scope.editReg.work) {\n const resource = $scope.workResources.find(x => x.id === resourceId);\n if (resource) {\n $scope.editReg.work.resource = resource;\n $scope.editReg.work.price = null;\n resourceSelected($scope.editReg.work, false);\n }\n }\n } else {\n $scope.editReg.clearTaskFields();\n $scope.editReg.task = null;\n $scope.editReg.referenceYear = referenceYear;\n }\n $scope.resetTaskStatus();\n };\n\n $scope.selectInvoiceStream = function() {\n $scope.editReg.invoiceStream =\n ($scope.editReg &&\n $scope.editReg.invoiceStreamId &&\n $scope.editReg.relation &&\n $scope.editReg.relation.invoiceStreams &&\n $scope.editReg.relation.invoiceStreams.find(\n x => x.id === $scope.editReg.invoiceStreamId,\n )) ||\n null;\n\n $scope.checkIfResourcesMatchFilters();\n $scope.selectTask(null, $scope.editreg?.referenceYear);\n $scope.retrievePlannedTasks();\n };\n\n $scope.openRelationInNewWindow = function(event) {\n event.stopPropagation();\n event.preventDefault();\n if (!$scope.editReg || !$scope.editReg.relation || !$scope.editReg.relation.id) return;\n const url = $state.href('relations.detail', { relId: $scope.editReg.relation.id });\n $window.open(url, '_blank');\n };\n $scope.retrieveInteracationAttachments = function() {\n if (!$scope.editReg || !$scope.editReg.interactionId || !checkSecurity('Documents:r')) {\n $scope.interactionAttachments = [];\n return;\n }\n $http\n .get(`${appUrls.documents}/api/documents/Links/${$scope.editReg.interactionId}/6`)\n .then(({ data }) => {\n $scope.interactionAttachments = data || [];\n });\n };\n $scope.uploadAttachments = function(files) {\n if ($scope.editReg.isBilled || $scope.isReadOnly || !$scope.editReg.relation.id) return;\n if (!files || files.length < 1) return;\n var formData = new FormData();\n files.forEach(function(file) {\n formData.append('data', file.data);\n });\n\n $http({\n method: 'POST',\n url: appUrls.documents + '/api/documents?documentType=15',\n headers: {\n 'Content-Type': undefined,\n },\n data: formData,\n })\n .success(function(result) {\n if (result && result.length > 0) {\n result.forEach(function(file) {\n $scope.interactionAttachments.push(file);\n });\n }\n })\n .error(function(error) {\n flySvc.error(error);\n return '';\n });\n };\n $scope.deleteAttachment = function(attachment) {\n dialogsSvc.showYesNo('comfirmDeleteTitle', 'confirmDeleteAttachment').then(function() {\n // the attachment is a new document that was uploaded. Delete the corresponding document\n const documentId = attachment.documentId || attachment.id;\n $http\n .delete(appUrls.documents + '/api/documents/' + documentId)\n .success(function(result) {\n var index = $scope.interactionAttachments.indexOf(attachment);\n if (index >= 0) $scope.interactionAttachments.splice(index, 1);\n })\n .error(function(error) {\n flySvc.error(error);\n return '';\n });\n });\n };\n\n $scope.linkAttachments = function(interactionId, relationId) {\n const documentLinks = [];\n\n $scope.interactionAttachments.forEach(attachment => {\n if (attachment.documentType !== 15) return;\n //Only link temp documents\n documentLinks.push({\n documentId: attachment.id,\n linkId: interactionId,\n linkType: 6,\n recognizeTemporaryDocuments: true,\n });\n\n if (relationId) {\n documentLinks.push({\n documentId: attachment.id,\n linkId: relationId,\n linkType: 3,\n });\n }\n\n //Set documentType to unkown\n attachment.documentType = -1;\n });\n if (documentLinks.length === 0) return $q.when([]);\n return $http.post(`${appUrls.documents}/api/documents/linksmultiple`, documentLinks);\n };\n $scope.downloadAttachment = function(attachment) {\n DocumentService.download(attachment.documentId || attachment.id);\n };\n $scope.resetTaskStatus = function() {\n if (!$scope.editReg || !$scope.editReg.task || !$scope.editReg.task.plannedTaskId) {\n $scope.taskStatus = null;\n return;\n }\n const { plannedTaskId, status, mainPlannedTaskId } = $scope.editReg.task;\n\n $scope.taskStatus = {\n id: plannedTaskId,\n status: Math.min(2, status),\n isBlocked: status === 3,\n inapplicable: status === 4,\n rejected: status === 6,\n parentId: plannedTaskId !== mainPlannedTaskId ? mainPlannedTaskId : null,\n };\n };\n $scope.setTaskStatus = function(data) {\n if (!data) return;\n $scope.onTaskStatusChanged({ value: data }); //Notify parent screen if task status was changed\n if (!$scope.editReg) return;\n const task = $scope.editReg.task;\n if (!task || !task.plannedTaskId) return;\n if (angular.isArray(data)) {\n data.forEach($scope.updateTaskStatus);\n return;\n }\n $scope.updateTaskStatus(data);\n };\n $scope.updateTaskStatus = function(data) {\n if (!data) return;\n const task = $scope.editReg.task;\n if (task.plannedTaskId !== data.id) return;\n if (data.isBlocked) {\n task.status = 3;\n } else if (data.inapplicable) {\n task.status = 4;\n } else if (data.rejected) {\n task.status = 6;\n } else if (data.status <= 2) {\n task.status = data.status;\n }\n $scope.resetTaskStatus();\n };\n },\n ],\n };\n },\n]);\n","module.exports = \"

{{editReg.work.user}}

1\\\">

%
%

km
%
%

%
%

0 && (!editReg.interactionDescription || editReg.interactionDescription===emptyInteractionDescription)\\\" ng-disabled=\\\"editReg.isBilled || isReadOnly || !editReg.relation.id\\\" placeholder=\\\"{{('Title' | translate)}}\\\"/>
\";","module.exports = \"
\";","module.exports = \"
  {{vm.field.id|translateList:'field'}}
0\\\">
{{item.type | translateList:'FiscalCostType'}} {{item.realEstateAddress}} {{item.reference}} {{item.endUser|relationName}}  {{item.professionalUsePercentage|percentage}} {{item.vatDeductionPercentage|percentage}}
\";","module.exports = \" \";","module.exports = \"
{{document.documentDate|formatDate}} {{document.name}} {{document.name}}
{{document.name}}
\";","module.exports = \"
  {{vm.field.id|translateList:'field'}}
0\\\">
{{item.type|translateList:'InsuranceType'}} {{item.realEstateAddress}} {{item.insuranceCompany}} {{item.reference}} {{item.endUser|relationName}}  {{item.professionalUsePercentage|percentage}} {{item.date|formatDate}}
\";","module.exports = \" \";","module.exports = \"
  {{vm.field.id|translateList:'field'}}
0\\\" ng-model=vm.showInactiveLoans label=\\\"{{'Show past loans' | translate}}\\\"> 0\\\">
{{item.creditInstitution}} {{item.startDate|formatDate}} {{item.endDate|formatDate}} {{item.reference}} {{item.purpose}} {{item.amount|dynCurrency:2}} {{item.repaymentAmount|dynCurrency:2}} {{item.repaymentMonths}}
\";","module.exports = \" \";","module.exports = \"
  {{vm.field.id|translateList:'field'}}
0\\\">
{{item.address}} {{item.owners}} {{item.realEstateType|translateList:'FiscalRealEstateType'}} {{item.ownershipType|translateList:'RealEstateOwnershipType'}} {{item.professionalUsePercentage|percentage}} {{item.vatDeductionPercentage|percentage}} {{item.cadastralIncome|dynCurrency:2}} {{item.monthlyRent|dynCurrency:2}} {{item.dateOfFirstUse|formatDate}}
\";","module.exports = \" \";","module.exports = \"
  {{vm.field.id|translateList:'field'}}
0\\\" ng-model=vm.showInactiveVehicles label=\\\"{{'Show vehicles with sale date' | translate}}\\\"> 0\\\">
{{item.type | translateList:'FiscalVehicleType'}} {{item.brandAndModel}} {{item.purchaseDate|formatDate}} {{item.licensePlate}} {{item.fuelType|translateList:'FuelType'}} {{item.fuelCard}} {{item.co2}} {{item.co2WLTP}} {{item.endUser|relationName}}  {{item.professionalUsePercentage|percentage}} {{item.vatDeductionPercentage|percentage}} {{item.taxDeductionPercentage|percentage}}
\";","module.exports = \" \";","module.exports = \"
\";","module.exports = \"
1\\\">
1\\\"> {{ stream.schedule.id | translateList: 'invoiceSchedule':stream.schedule.name }} {{stream.invoicingViaRelation | relationName}} - {{stream.invoicingViaStream | invoiceStreamName}} {{ stream.amount | dynCurrency: 2 }}
{{ budgets[stream.id].budgetAmount | dynCurrency: 2 }} {{ budgets[stream.id].budgetAmount | dynCurrency: 2 }}
{{ budgets[stream.id].budgetHours | dynNumber:2 }} {{ budgets[stream.id].budgetHours | dynNumber: 2 }}
{{ stream.startDate | formatDate}}  ‐ {{ stream.endDate | formatDate }}
\";","module.exports = \"
\";","module.exports = \"
\";","module.exports = \"
\";","module.exports = \"
\";","module.exports = \" \";","module.exports = \" \";","module.exports = \" \";","module.exports = \"
{{vm.selectedRelation | relationName}} {{vm.selectedRelation | relationName}}
{{vm.selectedInvoiceStream | invoiceStreamName}} {{vm.selectedInvoiceStream | invoiceStreamName}}
0\\\">
{{relation | relationName}} {{relation.invoiceStream | invoiceStreamName}} {{relation.invoicingViaStream | invoiceStreamName}}
See all
\";","module.exports = \"
Schedule Day Resource Quantity User In forfait Start planning Planning until 1\\\" data-translate=Assignment> NextPlanningDate
{{::planning.day}}/{{::planning.month}} {{planning.template.resource | resourceName}} {{planning.template.durationFormatted}} 0\\\"> {{planning.template.quantity | dynNumber}} {{planning.template.userName}} {{planning.endDate|formatDate}} Unlimited 1\\\"> {{planning.invoiceStream|invoiceStreamName}} {{planning.invoiceStream|invoiceStreamName}}
\";","module.exports = \"
\";","import angular from 'angular';\nimport moment from 'moment';\nimport DocumentService from '@/shared/services/DocumentService';\nimport SignalRService from '@/shared/services/SignalRService';\nimport { isWord, isPdf, isExcel } from '@/shared/utils/mime';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport { isDutchTenantConfiguration } from '@/shared/TenantConfigurationConstants';\nimport dataCacheService from '@/shared/services/DataCacheService';\nimport AuthService from '@/shared/services/AuthService';\n\nconst amlDocumentTypes = [24, 25, 10, 26, 27, 32, 82, 92];\nconst amlDocumentTypesNL = [24, 25, 10, 251, 252, 26, 27, 32, 82, 92, 80, 123, 136];\n\nconst amlDocumentTypesNoSignatureNeeded = [136];\n\nconst ensureDate = value => {\n if (!value) return null;\n if (typeof value === 'string') return new moment(value.substr(0, 10)).toDate();\n if (moment.isMoment(value)) return value.toDate();\n if (value instanceof Date) return value;\n return value;\n};\nconst mapDocument = ({\n createDate,\n documentDate,\n documentStartDate,\n documentEndDate,\n mime,\n ...other\n}) => ({\n ...other,\n mime,\n createDate: ensureDate(createDate),\n documentDate: ensureDate(documentDate),\n documentStartDate: ensureDate(documentStartDate),\n documentEndDate: ensureDate(documentEndDate),\n isPdf: isPdf(mime),\n isWord: isWord(mime),\n isExcel: isExcel(mime),\n});\n\nconst consolidateDocuments = documents => {\n return documents\n .filter(x => {\n if (!x.scannedDocumentId) return true;\n if (x.id === x.scannedDocumentId) return true;\n return !documents.some(y => y.id === x.scannedDocumentId);\n })\n .map(mapDocument);\n};\n\nangular.module('cxRelations').directive('cxRelAml', [\n function() {\n return {\n restrict: 'E',\n //replace: true,\n template: require('./relAml.html'),\n scope: {\n data: '=',\n field: '=',\n relation: '=',\n saveRem: '&save',\n disabled: '=?',\n },\n controller: [\n '$scope',\n '$q',\n 'ModalService',\n '$http',\n 'appUrls',\n 'flySvc',\n 'dialogsSvc',\n '$timeout',\n '$translate',\n 'dataCache',\n '$rootScope',\n 'translateListFilter',\n 'checkSecurity',\n function(\n $scope,\n $q,\n ModalService,\n $http,\n appUrls,\n flySvc,\n dialogsSvc,\n $timeout,\n $translate,\n dataCache,\n $rootScope,\n translateListFilter,\n checkSecurity,\n ) {\n $scope.forms = {\n otherDocumentsRemarkForm: null,\n };\n $scope.documents = [];\n $scope.translatedDocumentTypes = [];\n $scope.documentTypes = amlDocumentTypes;\n $scope.documentTypesNoSignatureNeeded = amlDocumentTypesNoSignatureNeeded;\n $scope.isDutchTenantConfiguration = false;\n $scope.statusDateOptions = {\n startingDay: 1,\n maxDate: moment\n .utc()\n .startOf('day')\n .toDate(),\n };\n\n const tenantConfiguration = dataCache.getArray('tenantConfiguration');\n if (tenantConfiguration === 5) {\n $scope.documentTypes = amlDocumentTypesNL;\n $scope.isDutchTenantConfiguration = true;\n }\n $scope.translateAndSortDocumentTypes = function() {\n $scope.translatedDocumentTypes = $scope.documentTypes\n .map(x => ({\n id: x,\n label: translateListFilter(x, 'DocumentType'),\n }))\n .sort(dynamicSort('label'));\n };\n $scope.translateAndSortDocumentTypes();\n\n const settings = dataCache.getCompanySettings($scope.relation.companyId);\n $scope.hasSigningProvider = settings && settings.documentSigningProvider !== 0;\n\n $scope.revisionRequired = false;\n $scope.$watch('data', function(newValue, oldValue) {\n $scope.exemptions = [\n {\n exemption: 0,\n checked: false,\n date: null,\n user: null,\n },\n ];\n $scope.revisionRequired = false;\n if (newValue && newValue.exemptions) {\n var smallBusinessExemption = newValue.exemptions.find(x => x.exemption === 0);\n if (smallBusinessExemption) {\n angular.extend($scope.exemptions[0], smallBusinessExemption, {\n checked: true,\n });\n }\n\n const oldExemptions = newValue.exemptions.filter(x => x.exemption !== 0);\n for (var i = 0; i < oldExemptions.length; i++) {\n $scope.exemptions.push({ ...oldExemptions[i], checked: true });\n }\n }\n\n if (newValue.expiryDate) {\n const expiryDate = moment(newValue.expiryDate);\n const now = moment();\n if (now.isAfter(expiryDate)) {\n $scope.revisionRequired = true;\n }\n\n if (now.add(30, 'days').isAfter(expiryDate)) {\n $scope.revisionRequired = true;\n }\n }\n });\n\n $scope.saveExemptions = function(ex, checked) {\n if (ex.exemption > 0) {\n // cant edit old AML data\n return;\n }\n var checkedEx = $scope.exemptions.filter(function(el) {\n return ex.exemption === el.exemption ? checked : el.checked;\n });\n return $scope.save('exemptions', checkedEx);\n };\n $scope.markRevisionOk = function() {\n $scope.markingRevisionOk = true;\n $http\n .put(appUrls.api + '/api/relation/MarkAssessmentOk?relationId=' + $scope.relation.id)\n .then(\n function(result) {\n $scope.markingRevisionOk = false;\n $scope.data = result.data;\n },\n function(error) {\n $scope.markingRevisionOk = false;\n flySvc.error(error.code, error.parameters);\n },\n );\n };\n $scope.save = function(field, $data) {\n $scope.saving = true;\n\n var model = angular.copy($scope.data);\n\n if (field === 'eidValue') {\n if (!model.eid) model.eid = {};\n model.eid.value = $data;\n } else if (field === 'eidExpiryDate') {\n if (!model.eid) model.eid = {};\n model.eid.expiryDate = $data;\n } else if (field === 'passportValue') {\n if (!model.passport) model.passport = {};\n model.passport.value = $data;\n } else if (field === 'passportExpiryDate') {\n if (!model.passport) model.passport = {};\n model.passport.expiryDate = $data;\n } else {\n model[field] = $data;\n }\n if (\n field === 'customerRisk' ||\n field === 'activityRisk' ||\n field === 'locationRisk' ||\n field === 'transactionRisk'\n ) {\n model.totalRisk = Math.max(\n model.customerRisk,\n model.activityRisk,\n model.locationRisk,\n model.transactionRisk,\n );\n }\n\n if (angular.equals($scope.data, model)) return false;\n return $q.when(\n $scope.saveRem({\n newValue: model,\n }),\n function(result) {\n $scope.saving = false;\n if (result) {\n $scope.data = result;\n }\n\n if (field === 'otherDocuments' && $data) {\n try {\n $('#AmlOtherDocumentsRemark')\n .scope()\n .$form.$show();\n } catch (e) {}\n }\n if (field === 'juristicStructure' && $data) {\n try {\n $('#AmlJuristicStructureRemark')\n .scope()\n .$form.$show();\n } catch (e) {}\n }\n return false;\n },\n function() {\n $scope.saving = false;\n return '';\n },\n );\n };\n $scope.generateDocuments = function() {\n ModalService.showModal({\n template: require('../dialogs/amlDocumentDialog.html'),\n controller: 'AmlDocumentDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n relation: $scope.relation,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n modal.close.then(function(result) {\n if (result && result.length) {\n $scope.documents = [...$scope.documents, ...result.map(mapDocument)];\n }\n });\n });\n };\n\n $scope.generateDetailedRiskDocument = function() {\n ModalService.showModal({\n template: require('../dialogs/amlSingleDocumentDialog.html'),\n controller: 'AmlSingleDocumentDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n relation: $scope.relation,\n templateType: 19,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n modal.close.then(function(result) {\n if (result) {\n $scope.documents = [...$scope.documents, mapDocument(result)];\n }\n });\n });\n };\n\n $scope.generateClientAcceptanceQuestionnaire = function() {\n ModalService.showModal({\n template: require('../dialogs/amlSingleDocumentDialog.html'),\n controller: 'AmlSingleDocumentDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n relation: $scope.relation,\n templateType: 20,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n modal.close.then(function(result) {\n if (result) {\n $scope.documents = [...$scope.documents, mapDocument(result)];\n }\n });\n });\n };\n\n $scope.retrieveDocuments = function() {\n if (!checkSecurity('Documents:r')) return;\n $http\n .get(`${appUrls.documents}/api/Documents/Links/${$scope.relation.id}/3/`, {\n params: { documentTypes: $scope.documentTypes },\n })\n .then(function(result) {\n $scope.documents = consolidateDocuments(result.data);\n });\n };\n $scope.retrieveDocuments();\n\n $scope.onPreviewClosed = () => {\n $timeout(function() {\n $scope.showPreview = false;\n $scope.activeDocumentId = null;\n }, 0);\n };\n\n $scope.onPreviewSaved = document => {\n $timeout(function() {\n $scope.showPreview = false;\n $scope.activeDocument = null;\n $scope.documents = $scope.documents.map(x => {\n if (x.id === document.id) {\n return {\n ...x,\n ...document,\n };\n }\n return x;\n });\n }, 0);\n };\n\n $scope.previewDocument = document => {\n $scope.activeDocument = document;\n $scope.showPreview = true;\n };\n\n $scope.downloadDocument = function(document, asPdf) {\n const { id: documentId, name, mime } = document;\n if (!documentId) return;\n\n if (!asPdf || isPdf(mime)) {\n //Normal download\n document.showSpinner = true;\n DocumentService.download(documentId).finally(() => {\n $timeout(function() {\n document.showSpinner = false;\n }, 0);\n });\n } else {\n document.showSpinner = true;\n //Convert to pdf\n DocumentService.convertToPdf(documentId, name).finally(() => {\n $timeout(function() {\n document.showSpinner = false;\n }, 0);\n });\n }\n };\n\n $scope.uploading = false;\n $scope.uploadDocuments = function(files, ignoreUploading) {\n if (!ignoreUploading && $scope.uploading) return;\n if (!files || files.length < 1 || !$scope.relation.id) return;\n $scope.uploading = true;\n\n var data = new FormData();\n files.forEach(file => {\n data.append('data', file.data);\n });\n\n $http({\n method: 'post',\n url: `${appUrls.documents}/api/Documents/`,\n params: {\n documentType: 24,\n documentLinkType: 3,\n linkId: $scope.relation.id,\n },\n headers: {\n 'Content-Type': undefined,\n },\n data: data,\n })\n .success(function(result) {\n if (!result) return;\n\n $scope.documents = [...$scope.documents, ...result.map(mapDocument)];\n flySvc.success();\n $scope.uploading = false;\n })\n .error(function(error) {\n flySvc.error(error);\n $scope.uploading = false;\n });\n };\n\n $scope.replaceDocument = function(files, document) {\n if (!files || files.length < 1) return;\n\n var data = new FormData();\n data.append('data', files[0].data);\n\n document.showSpinner = true;\n $http({\n method: 'post',\n url: `${appUrls.documents}/api/Documents/Replace`,\n params: { documentId: document.id },\n headers: {\n 'Content-Type': undefined,\n },\n data: data,\n })\n .success(function(result) {\n if (!result) return;\n angular.extend(document, mapDocument(result));\n flySvc.success();\n })\n .error(function(error) {\n flySvc.error(error);\n })\n .finally(function() {\n document.showSpinner = false;\n });\n };\n $scope.editDocument = function(document) {\n const language = $translate.use().split('-')[0];\n DocumentService.edit(document.id, language);\n };\n $scope.openInApp = function(document) {\n DocumentService.openInApp(document.id);\n };\n $scope.deleteDocument = function(document) {\n dialogsSvc.showYesNo('comfirmDeleteTitle', 'msgConfirmDeleteDocument').then(function() {\n document.showSpinner = true;\n $http.delete(`${appUrls.documents}/api/Documents/${document.id}`).then(\n function() {\n flySvc.success();\n var index = $scope.documents.indexOf(document);\n if (index >= 0) $scope.documents.splice(index, 1);\n },\n function(error) {\n flySvc.error(error);\n document.showSpinner = false;\n return '';\n },\n );\n });\n };\n\n $scope.deleteSelectedDocuments = function() {\n const selectedDocuments = $scope.documents.filter(x => x.selected);\n if (!selectedDocuments || selectedDocuments.length === 0) return;\n\n dialogsSvc\n .showYesNo('comfirmDeleteTitle', 'msgConfirmDeleteDocuments')\n .then(function() {\n selectedDocuments.map(document => {\n document.showSpinner = true;\n $http.delete(`${appUrls.documents}/api/Documents/${document.id}`).then(\n function() {\n var index = $scope.documents.indexOf(document);\n if (index >= 0) $scope.documents.splice(index, 1);\n },\n function(error) {\n flySvc.error(error);\n document.showSpinner = false;\n return '';\n },\n );\n });\n });\n };\n\n $scope.editDocumentType = function(document, newType) {\n if (typeof newType === 'undefined') return false;\n if (typeof newType === 'string') newType = parseInt(newType);\n if (amlDocumentTypesNL.indexOf(newType) < 0) return false; //Only allow aml document types\n\n const model = angular.copy(document);\n model.documentType = newType;\n\n return $http.put(`${appUrls.documents}/api/Documents/Update`, model).then(\n function(result) {\n if (result && result.data) {\n document.documentType = result.data.documentType;\n }\n return false;\n },\n function(error) {\n flySvc.error(error);\n return '';\n },\n );\n };\n\n $scope.convertToPdf = document => DocumentService.convertToPdf(document.id);\n\n $scope.canCheckout = function(document) {\n return dataCacheService.hasUserConnectPlatform(46) && document.storageType !== 1;\n };\n\n $scope.canCheckin = function(document) {\n return (\n dataCacheService.hasUserConnectPlatform(46) &&\n document.checkedOutByUserId == AuthService.getUserId() &&\n document.storageType !== 1\n );\n };\n\n $scope.canDiscardCheckout = function(document) {\n return (\n dataCacheService.hasUserConnectPlatform(46) &&\n AuthService.hasPermission({ functionality: 'CompanyOwn', privilege: 'Update' }) &&\n document.checkedOutByUserId == AuthService.getUserId() &&\n document.storageType !== 1\n );\n };\n\n $scope.checkinDocument = function(document) {\n if (document.checkedOutByUserId == AuthService.getUserId()) {\n checkin(document);\n }\n };\n\n $scope.onDiscardCheckout = function(document) {\n dialogsSvc\n .showYesNo('comfirmTitle', 'msgDiscardCheckout', {\n name: dataCacheService.getUserName(document.checkedOutByUserId),\n })\n .then(function() {\n checkin(document);\n });\n };\n\n $scope.openEditing = function(document) {\n DocumentService.getCheckedOutLink(document.id).then(link => {\n if (!link) return;\n window.open(link);\n });\n };\n\n $scope.discardCheckout = function(document) {\n document.showSpinner = true;\n DocumentService.discardCheckout(document.id).then(\n () => {\n document.checkedOutByUserId = null;\n flySvc.success();\n document.showSpinner = false;\n },\n error => {\n console.error(error);\n if (error.response && error.response.data && error.response.data.code) {\n flySvc.error(error);\n document.showSpinner = false;\n } else {\n flySvc.success();\n }\n log.error('error discarding checkout ', error);\n },\n );\n };\n\n const checkin = function(document) {\n document.showSpinner = true;\n DocumentService.checkin(document.id).then(\n () => {\n document.checkedOutByUserId = null;\n flySvc.success();\n document.showSpinner = false;\n },\n error => {\n console.error(error);\n if (error.response && error.response.data && error.response.data.code) {\n flySvc.error(error);\n document.showSpinner = false;\n } else {\n flySvc.success();\n }\n log.error('error checking in document ', error);\n },\n );\n };\n\n $scope.checkoutDocument = function(document, openinApp) {\n if (!document || !document.canEdit) return;\n document.showSpinner = true;\n DocumentService.checkout(document.id, openinApp).then(\n data => {\n if (!!data) {\n document.checkedOutByUserId = AuthService.getUserId();\n flySvc.success();\n }\n document.showSpinner = false;\n },\n error => {\n console.error(error);\n if (error.response && error.response.data && error.response.data.code) {\n flySvc.error(error);\n document.showSpinner = false;\n } else {\n flySvc.success();\n }\n log.error('error checking out document ', error);\n },\n );\n };\n\n $scope.markSigned = function(document) {\n if (document.signingStatus >= 10) return; //Already signed or pending\n document.showSpinner = true;\n const model = {\n documentId: document.id,\n signingStatus: 20, // SigningComplete\n signingProvider: 0, // None\n };\n return $http.put(appUrls.documents + '/api/Documents/Sign', model).then(\n function(result) {\n if (result && result.data) {\n angular.extend(document, mapDocument(result.data));\n flySvc.success();\n }\n document.showSpinner = false;\n return false;\n },\n function(error) {\n flySvc.error(error);\n document.showSpinner = false;\n return '';\n },\n );\n };\n\n $scope.openEmailDocumentDialog = function(document, asPdf) {\n ModalService.showModal({\n template: require('../dialogs/mailDocumentDialog.html'),\n controller: 'MailDocumentDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n document: document,\n asPdf: asPdf,\n relationId: $scope.relation.id,\n companyId: $scope.relation.companyId,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n modal.close.then(function(result) {\n if (result) {\n angular.extend(document, result);\n }\n });\n });\n };\n $scope.revokeSignatureRequest = function(document) {\n if (!$scope.hasSigningProvider) {\n flySvc.error('MsgNoSigningProviderConfiguredSeeSettings');\n return;\n }\n\n dialogsSvc.showYesNo('comfirmTitle', 'msgConfirmRevokeSignature').then(function() {\n document.showSpinner = true;\n let url =\n appUrls.documentSigning +\n `/api/RevokeDocumentSigningRequest/${$scope.relation.companyId}/${document.signingId}/`;\n if (document.signingPackageId) {\n url += `${document.signingPackageId}`;\n }\n $http.post(url).then(\n function(result) {\n if (result && result.data) {\n document.showSpinner = false;\n flySvc.success('msgDocumentSingingRequestRevoked');\n }\n },\n function(error) {\n document.showSpinner = false;\n flySvc.error(error);\n },\n );\n });\n };\n\n $scope.openSignatureDialog = function(documents) {\n // use direct reference on datacache to prevent not being able to sign a document when provider was just configured\n var hasSigningProvider =\n dataCache.getCompanySettings($scope.relation.companyId).documentSigningProvider !== 0;\n\n if (!hasSigningProvider) {\n flySvc.error('MsgNoSigningProviderConfiguredSeeSettings');\n return;\n }\n\n ModalService.showModal({\n template: require('../dialogs/requestDocumentSignatureDialog.html'),\n controller: 'RequestDocumentSignatureDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n documents: documents,\n companyId: $scope.relation.companyId,\n relationId: $scope.relation.id,\n languageCode: $scope.relation.languageCode,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n modal.close.then(function(result) {\n if (!result) return;\n // signing request sent successfully, update document status.\n\n documents.map(x => {\n angular.extend(x, {\n ...x,\n signingStatus: 10,\n });\n });\n });\n });\n };\n\n $scope.openSignatureDialogForSelectedDocuments = function() {\n const selectedDocuments = $scope.documents.filter(x => x.selected);\n if (!selectedDocuments || selectedDocuments.length === 0) return;\n\n if (\n selectedDocuments.some(\n x => x.signingStatus == 10 || x.signingStatus == 20 || x.signingStatus == 21,\n )\n ) {\n flySvc.error('selectionContainsDocumentPendingOrAlreadySigned');\n return;\n }\n return $scope.openSignatureDialog(selectedDocuments);\n };\n\n const documentUpdatedHandler = document => {\n if (!document) return;\n $timeout(function() {\n var idx = $scope.documents.findIndex(x => x.id == document.id);\n\n if (idx >= 0) {\n if (\n document.scannedDocumentId &&\n $scope.documents.some(x => x.id === document.scannedDocumentId)\n ) {\n $scope.documents.splice(idx, 1); //Remove original document from list\n return;\n }\n angular.extend($scope.documents[idx], mapDocument(document));\n }\n }, 0);\n };\n\n const documentCheckedoutHandler = documentEditLink => {\n window.open(documentEditLink);\n };\n\n $scope.selectedCount = function() {\n if (!$scope.documents) return 0;\n const count = $scope.documents.reduce(\n (cnt, document) => cnt + (document.selected ? 1 : 0),\n 0,\n );\n\n return count;\n };\n\n $scope.update = function(document, field, value) {\n if (field === 'documentDate' && !value) return ''; //Document date is required\n if (\n (field === 'documentStartDate' || field === 'documentEndDate') &&\n typeof value === 'undefined'\n )\n return '';\n\n var model = angular.copy(document);\n\n if (angular.equals(model[field], value)) return true;\n\n model[field] = value;\n\n if (model.documentDate instanceof Date) model.documentDate = model.documentDate.ISO();\n if (model.documentStartDate instanceof Date)\n model.documentStartDate = model.documentStartDate.ISO();\n if (model.documentEndDate instanceof Date)\n model.documentEndDate = model.documentEndDate.ISO();\n\n return $http.put(appUrls.documents + '/api/Documents/Update', model).then(\n function(result) {\n if (result && result.data) {\n angular.extend(document, mapDocument(result.data));\n flySvc.success();\n }\n return false;\n },\n function(error) {\n flySvc.error(error);\n return '';\n },\n );\n };\n\n SignalRService.subscribe('documentUpdated', documentUpdatedHandler);\n SignalRService.subscribe('documentSigningStatusUpdated', documentUpdatedHandler);\n SignalRService.subscribe('checkoutFinished', documentCheckedoutHandler);\n\n $scope.$on('$destroy', function() {\n SignalRService.unsubscribe('documentUpdated', documentUpdatedHandler);\n SignalRService.unsubscribe('documentSigningStatusUpdated', documentUpdatedHandler);\n SignalRService.unsubscribe('checkoutFinished', documentCheckedoutHandler);\n });\n const deregistration = $rootScope.$on(\n '$translateChangeSuccess',\n $scope.translateAndSortDocumentTypes,\n );\n $scope.$on('$destroy', deregistration);\n },\n ],\n };\n },\n]);\n","module.exports = \"
{{data.purposeTransaction}}
{{data.natureTransaction}}
{{data.customerRisk | translateList:'amlrisklevel'}} {{data.customerRiskRemark}}
{{data.activityRisk | translateList:'amlrisklevel'}} {{data.activityRiskRemark}}
{{data.locationRisk | translateList:'amlrisklevel'}} {{data.locationRiskRemark}}
{{data.transactionRisk | translateList:'amlrisklevel'}} {{data.transactionRiskRemark}}
{{data.totalRisk | translateList:'amlrisklevel'}} {{data.totalRiskRemark}}
0\\\" disabled=\\\"ex.exemption > 0\\\" text=\\\"{{ex.exemption | translateList:'AMLExemption'}}\\\" tooltip=\\\"{{('This exemption is no longer editable due to the new AML law of 18/09/2017. More info can be found on our support page.' | translate)}}\\\" save=\\\"saveExemptions(ex, $data)\\\">
0}\\\" title=\\\"{{'Last chanced by {user} on {date}' | translate:{user:(ex.user | userName), date:(ex.date | formatDate)} }}\\\">{{ex.date | formatDate}}
{{data.recentStatutesDate | nullDate | formatDate}} {{data.recentStatutesDate | nullDate | formatDate}}
{{data.otherDocumentsRemark}} {{data.otherDocumentsRemark}}
{{data.juristicStructureRemark}} {{data.juristicStructureRemark}}
{{data.verificationRisk | translateList:'amlrisklevel'}}
{{data.verificationRiskRemark}}
{{data.verificationRemark}} {{data.verificationRemark}}

{{data.passportCountry| translateList:'country'}}

{{data.certificateAuthority}} {{data.certificateAuthority}}
{{data.certificateAuthorityDate | nullDate | formatDate}} {{data.certificateAuthorityDate | nullDate | formatDate}}

{{data.certificateAuthorityCountry| translateList:'country'}}
{{data.verificationDescription}} {{data.verificationDescription}}

{{data.verificationRisk | translateList:'amlrisklevel'}}
{{data.verificationRiskRemark}}
{{data.verificationRemark}} {{data.verificationRemark}}
{{document.documentDate|formatDate}} {{document.name}} {{document.name}} {{document.signingStatus|translateList:'SigningStatus':document.signingStatus}}
\";","module.exports = \" \";","module.exports = \"
{{vm.relation | relationName}}
{{vm.relation[vm.relation.businessNumberFieldId].value}}
{{vm.relation[vm.relation.nationalIdNumberFieldId].value}}
{{vm.relation.contactName | relationName: vm.relation.contactFirstName:vm.relation.contactTitle}}
{{vm.getPhone()}}
{{vm.getMobile()}}
{{vm.getEmail()}}
  • {{file.name}}
\";","module.exports = \" \";","module.exports = \" \";","module.exports = \"
  {{field.id | translateList:'field':field.label}}
Authorization name Status Valid from Valid until Authorization signed by Authorization type IdentificationNumber IdentificationNumber
{{ auth.name | translateList: 'authorizationName' }} {{ auth.status | translateList: 'authorizationStatus' }} {{auth.date|formatDate}} Unlimited {{auth.date|formatDate}} {{auth.validUntil|formatDate}} Unlimited {{auth.validUntil|formatDate}} Unlimited {{auth.signedBy}} {{auth.signedBy}} {{auth.type | translateList:'authorizationType'}} {{ auth.identificationNumber }} {{auth.identificationNumber}} {{ auth.identificationNumber }} {{auth.identificationNumber}} {{ auth.identificationNumberOwner }} {{auth.identificationNumberOwner}}
\";","module.exports = \"
:
{{rel | relationName}} {{rel.email}} {{rel.phone}} {{rel.streetNr}} {{rel.location}} Open Update relation
{{rel.fileResponsibleUserEmail}} {{rel.fileAssistantUserEmail}}
First name
Last name
Date of birth
Nationality
Gender
Place of birth
National number
Address
   
Enterprise number
Relation type
CRM type
Language
1\\\">
Own company
Team(s)
\";","module.exports = \"
Document date Document type Name Document start date Document end date Status
{{document.documentDate|formatDate}} {{document.name}} {{document.name}} {{document.documentStartDate|formatDate}} {{document.documentEndDate|formatDate}} {{document.signingStatus|translateList:'SigningStatus':document.signingStatus}}
\";","module.exports = \" \";","module.exports = \" \";","module.exports = \" \";","module.exports = \"
0\\\">
{{bank.bankAccountNr}} {{bank.bankAccountNr}} {{bank.bic}} {{bank.bankName}} {{bank.bankAccountType|translateList:'bankaccounttype'}} {{bank.countryCode}} {{bank.dateOpened | formatDate}} {{bank.dateClosed | formatDate}} {{bank.dateCAP | formatDate}}
{{bank.remark}}
\";","module.exports = \"
\";","module.exports = \"
\";","module.exports = \"
1 }\\\" style=max-width:300px cx-security=\\\"'PlannedTask:r'\\\">
\";","module.exports = \"
  Task scheduling
Task template Schedule Deadline 1\\\" data-translate=Assignment> Start planning Planning until
1\\\" class=col-auto> {{item.invoiceStream|invoiceStreamName}} {{item.invoiceStream|invoiceStreamName}} {{item.planningStop|formatDate}} Unlimited {{item.planningStop|formatDate}} Unlimited
or
\";","module.exports = \"
\";","module.exports = \"
\";","module.exports = \"
\";","module.exports = \"
\";","module.exports = \" \";","module.exports = \" \";","module.exports = \"
{{vm.snapshotOverview.lastOnlineSinceDate | formatDate}}
{{vm.snapshot.onlineSinceDate | formatDate}}
0 && vm.snapshotOverview.uboResponsibilityType===0\\\">
{{({name: line.relationName, type:line.relationType, title:line.relationLegalFormId}) | relationName}} ( {{line.ownerPosition|translateList:'CompanyOwnerPosition'}} )
  {{line.representedBy}}
0\\\"> {{ line.uboPercentage | percentage: 2 }} {{'VAT pending' | translate }} {{ line.identification }} {{ line.startDateMandate | formatDate}} {{ line.endDateMandate | formatDate}} 0\\\">{{ line.sharesPercentage | percentage: 2 }} 0\\\">({{ line.shares | number: 0 }}) 0\\\">{{ line.votesPercentage | percentage: 2 }} 0\\\">{{ line.relativeSharesPercentage | percentage: 2 }} 0\\\">{{ line.relativeVotesPercentage | percentage: 2 }} {{ line.remark }}
0\\\" class=\\\"control-panel fieldAsSection subsection\\\" id=UboDocuments>
Document date Upload date Name
{{document.name}} {{document.name}}
\";","module.exports = \"

0\\\" class=\\\"panel-body container-fluid form-horizontal form-labels-left\\\">
1\\\">
1 && vm.searchProvider === 2\\\">
LoadingProgress

{{vm.externalRelationSearchResult.name}} {{vm.externalRelationSearchResult.legalFormId | translateList:'legalForm':''}}

{{vm.externalRelationSearchResult.commercialName}}

{{vm.externalRelationSearchResult.displayNumber}}

{{vm.externalRelationSearchResult.mainAddress.street}} {{vm.externalRelationSearchResult.mainAddress.number}} {{vm.externalRelationSearchResult.mainAddress.box}}
{{vm.externalRelationSearchResult.mainAddress.areaCode}} {{vm.externalRelationSearchResult.mainAddress.city}}
0\\\" class=form-group>
{{address.street}} {{address.number}} {{address.box}}
{{address.areaCode}} {{address.city}}
1 && vm.searchProvider !== 2\\\">
0\\\" class=\\\"panel-body container-fluid form-horizontal\\\">
Relation type
1\\\">
Required fields
{{field.errorMsg}}
Optional fields
{{field.errorMsg}}
{{field.definition.id | translateList:'field':field.definition.label}}
{{field.errorMsg}}
\";","module.exports = \" \";","module.exports = \"
{{group.label}} =100 || (group.type===10 && group.links.length>1)\\\"> =100\\\" colspan=2> =100\\\"> / 10 && group.type<100\\\" colspan=4>
=100 || (group.type===10 && group.links.length>1)\\\"> =100\\\" colspan=2> =100\\\"> 10 && group.type<100\\\" colspan=4> {{link.description | limitTo:100}} {{link.description | limitTo:100}}
\";","module.exports = \"
\";","module.exports = \"
\";","module.exports = \"
\";","module.exports = \"
  ToDos
Deadline Assigned to Description
\";","module.exports = \"
0\\\">
\";","module.exports = \" \";","module.exports = \" \";","module.exports = \" \";","module.exports = \" \";","module.exports = \" \";","module.exports = \"
\";","module.exports = \"
\";","module.exports = \" \";","module.exports = \"
\";","module.exports = \" \";","module.exports = \"
\";","module.exports = \"
\";","module.exports = \" \";","module.exports = \"\";","module.exports = \" \";","module.exports = \" \";","module.exports = \"
\";","module.exports = \" \";","module.exports = \" \";","module.exports = \" \";","module.exports = \" \";","module.exports = \" \";","module.exports = \"
\";","module.exports = \"
\";","module.exports = \" \";","module.exports = \" \";","module.exports = \" \";","module.exports = \" \";","module.exports = \"
\";","module.exports = \"
  {{label}}
{{data.startDate | formatDate}}
{{data.invoiceNumberFormat}} : {{generateExample(data.invoiceNumberFormat, data.startDate, yearFormat)}}
{{data.creditNoteNumberFormat}} : {{generateExample(data.creditNoteNumberFormat, data.startDate, yearFormat)}}
{{data.invoiceNumberStartValue}} : {{generateExample(data.invoiceNumberFormat, data.startDate, data.invoiceNumberStartValue, yearFormat)}}
{{data.invoiceNumberStartValue}} : {{generateExample(data.invoiceNumberFormat, data.startDate, data.invoiceNumberStartValue, yearFormat)}}
{{data.creditNoteNumberStartValue}} : {{generateExample(data.creditNoteNumberFormat, data.startDate, data.creditNoteNumberStartValue, yearFormat)}}
: {{generateExample(data.creditNoteNumberFormat, data.startDate, data.invoiceNumberStartValue, yearFormat)}}
{{data.creditNoteNumberStartValue}} : {{generateExample(data.creditNoteNumberFormat, data.startDate, data.creditNoteNumberStartValue, yearFormat)}}
{{data.invoiceNumberStartValue}} : {{generateExample(data.creditNoteNumberFormat, data.startDate, data.invoiceNumberStartValue, yearFormat)}}
\";","import angular from 'angular';\n/*\nhttps://github.com/lemonde/angular-ckeditor/blob/master/angular-ckeditor.js\n*/\n\n(function(root, factory) {\n // AMD\n if (typeof define === 'function' && define.amd) define(['angular'], factory);\n // Global\n else factory(angular);\n})(this, function(angular) {\n angular.module('ckeditor', []).directive('ckeditor', ['$parse', ckeditorDirective]);\n\n // Polyfill setImmediate function.\n var setImmediate =\n window && window.setImmediate\n ? window.setImmediate\n : function(fn) {\n setTimeout(fn, 0);\n };\n\n /**\n * CKEditor directive.\n *\n * @example\n *
\n */\n\n function ckeditorDirective($parse) {\n return {\n restrict: 'A',\n require: ['ckeditor', 'ngModel'],\n controller: ['$scope', '$element', '$attrs', '$parse', '$q', '$timeout', ckeditorController],\n link: function(scope, element, attrs, ctrls) {\n // get needed controllers\n var controller = ctrls[0]; // our own, see below\n var ngModelController = ctrls[1];\n\n // Initialize the editor content when it is ready.\n controller.ready().then(function initialize() {\n // Sync view on specific events.\n ['dataReady', 'change', 'blur', 'saveSnapshot'].forEach(function(event) {\n controller.onCKEvent(event, function syncView() {\n ngModelController.$setViewValue(controller.instance.getData() || '');\n });\n });\n\n controller.instance.setReadOnly(!!attrs.readonly);\n attrs.$observe('readonly', function(readonly) {\n controller.instance.setReadOnly(!!readonly);\n });\n\n // Defer the ready handler calling to ensure that the editor is\n // completely ready and populated with data.\n setImmediate(function() {\n $parse(attrs.ready)(scope);\n });\n });\n\n // Set editor data when view data change.\n ngModelController.$render = function syncEditor() {\n controller.ready().then(function() {\n // \"noSnapshot\" prevent recording an undo snapshot\n controller.instance.setData(ngModelController.$viewValue || '', {\n noSnapshot: true,\n callback: function() {\n // Amends the top of the undo stack with the current DOM changes\n // ie: merge snapshot with the first empty one\n // http://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-updateSnapshot\n controller.instance.fire('updateSnapshot');\n },\n });\n });\n };\n },\n };\n }\n\n /**\n * CKEditor controller.\n */\n\n function ckeditorController($scope, $element, $attrs, $parse, $q, $timeout) {\n var config = $parse($attrs.ckeditor)($scope) || {};\n var editorElement = $element[0];\n var instance;\n var readyDeferred = $q.defer(); // a deferred to be resolved when the editor is ready\n\n // Create editor instance.\n if (\n editorElement.hasAttribute('contenteditable') &&\n editorElement.getAttribute('contenteditable').toLowerCase() == 'true'\n ) {\n instance = this.instance = CKEDITOR.inline(editorElement, config);\n } else {\n instance = this.instance = CKEDITOR.replace(editorElement, config);\n }\n\n /**\n * Listen on events of a given type.\n * This make all event asynchronous and wrapped in $scope.$apply.\n *\n * @param {String} event\n * @param {Function} listener\n * @returns {Function} Deregistration function for this listener.\n */\n\n this.onCKEvent = function(event, listener) {\n instance.on(event, asyncListener);\n\n function asyncListener() {\n var args = arguments;\n setImmediate(function() {\n applyListener.apply(null, args);\n });\n }\n\n function applyListener() {\n var args = arguments;\n $timeout(function() {\n listener.apply(null, args);\n }, 0);\n }\n\n // Return the deregistration function\n return function $off() {\n instance.removeListener(event, applyListener);\n };\n };\n\n this.onCKEvent('instanceReady', function() {\n readyDeferred.resolve(true);\n });\n\n /**\n * Check if the editor if ready.\n *\n * @returns {Promise}\n */\n this.ready = function ready() {\n return readyDeferred.promise;\n };\n\n // Destroy editor when the scope is destroyed.\n $scope.$on('$destroy', function onDestroy() {\n // do not delete too fast or pending events will throw errors\n readyDeferred.promise.then(function() {\n instance.destroy(false);\n });\n });\n }\n});\n","import PropTypes from 'prop-types';\nimport authService, { privileges } from '../../services/AuthService';\n\nconst CanCreate = ({ on = null, children, fallback }) => {\n if (!children) return null;\n if (on) {\n if (\n !authService.hasPermission({\n functionality: on,\n privilege: privileges.Create,\n })\n )\n return fallback;\n }\n\n return children;\n};\n\nCanCreate.propTypes = {\n on: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n children: PropTypes.node,\n fallback: PropTypes.node,\n};\nCanCreate.defaultProps = {\n on: null,\n children: null,\n fallback: null,\n};\nexport default CanCreate;\n","import PropTypes from 'prop-types';\nimport authService, { privileges } from '../../services/AuthService';\n\nconst CanDelete = ({ on = null, children, fallback }) => {\n if (!children) return null;\n if (on) {\n if (\n !authService.hasPermission({\n functionality: on,\n privilege: privileges.Delete,\n })\n )\n return fallback;\n }\n\n return children;\n};\n\nCanDelete.propTypes = {\n on: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n children: PropTypes.node,\n fallback: PropTypes.node,\n};\nCanDelete.defaultProps = {\n on: null,\n children: null,\n fallback: null,\n};\nexport default CanDelete;\n","import PropTypes from 'prop-types';\nimport authService, { privileges } from '../../services/AuthService';\n\nconst CanRead = ({ on = null, children, fallback }) => {\n if (!children) return null;\n if (on) {\n if (\n !authService.hasPermission({\n functionality: on,\n privilege: privileges.Read,\n })\n )\n return fallback;\n }\n\n return children;\n};\n\nCanRead.propTypes = {\n on: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n children: PropTypes.node,\n fallback: PropTypes.node,\n};\nCanRead.defaultProps = {\n on: null,\n children: null,\n fallback: null,\n};\nexport default CanRead;\n","import PropTypes from 'prop-types';\nimport authService, { privileges } from '../../services/AuthService';\n\nconst CanUpdate = ({ on = null, children, fallback }) => {\n if (!children) return null;\n if (on) {\n if (\n !authService.hasPermission({\n functionality: on,\n privilege: privileges.Update,\n })\n )\n return fallback;\n }\n\n return children;\n};\n\nCanUpdate.propTypes = {\n on: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n children: PropTypes.node,\n fallback: PropTypes.node,\n};\nCanUpdate.defaultProps = {\n on: null,\n children: null,\n fallback: null,\n};\nexport default CanUpdate;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\n\nexport default class Checkbox extends Component {\n static propTypes = {\n onClick: PropTypes.func.isRequired,\n value: PropTypes.bool,\n disabled: PropTypes.bool,\n extraClass: PropTypes.string,\n text: PropTypes.oneOfType([PropTypes.shape({}), PropTypes.string]),\n title: PropTypes.string,\n renderNullAsFalse: PropTypes.bool,\n };\n\n static defaultProps = {\n disabled: false,\n value: false,\n text: '',\n extraClass: undefined,\n title: '',\n renderNullAsFalse: false,\n };\n\n handleClick() {\n const { value, disabled, onClick } = this.props;\n if (disabled) return;\n\n onClick(!value);\n }\n\n render() {\n const { value, disabled, text, extraClass, title, renderNullAsFalse } = this.props;\n\n return (\n this.handleClick()}\n >\n \n {text}\n \n );\n }\n}\n","import React from 'react';\nimport authService, { parsePrivilege, parseFunctionality } from '../../services/AuthService';\n\nconst showWhenPermission = (functionality, privilege = null) => {\n const f = parseFunctionality(functionality);\n const p = parsePrivilege(privilege);\n\n return WrappedComponent => ({ ...passThroughProps }) => {\n if (\n !authService.hasPermission({\n functionality: f,\n privilege: p,\n })\n )\n return null;\n return ;\n };\n};\nexport default showWhenPermission;\n\n/* Used like this:\nexport default showWhenPermission('relation','read')(RelationOverviewContainer);\n*/\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport DataCacheService from '@/shared/services/DataCacheService';\n\nexport const hasAssignments = () => {\n const dataCache = DataCacheService.getDataCache();\n if (!dataCache) return false;\n return !!dataCache.assignmentsEnabled;\n};\n\nexport const showWhenAssignmentsEnabled = WrappedComponent => ({ ...passThroughProps }) => {\n if (!hasAssignments()) return null;\n return ;\n};\n\nconst HasAssignments = ({ children, fallback }) => {\n if (!children) return null;\n if (!hasAssignments()) return fallback;\n return children;\n};\n\nHasAssignments.propTypes = {\n children: PropTypes.node,\n fallback: PropTypes.node,\n};\nHasAssignments.defaultProps = {\n children: null,\n fallback: null,\n};\nexport default HasAssignments;\n","import React from 'react';\n\nconst LoadingAnimation = () => (\n
\n
\n
\n
\n
\n);\n\nexport default LoadingAnimation;\n","import { defineMessages } from 'react-intl';\n\nconst messages = defineMessages({\n Search: 'Search',\n ClearFilter: 'Clear filter',\n Filter: 'Filter',\n});\n\nexport default messages;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport Checkbox from '@/shared/components/input/Checkbox';\nimport { useIntl } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport messages from './filterMessages';\n\nclass ItemsFilter extends Component {\n state = {\n filterItems: [],\n };\n\n componentDidMount() {\n const { items, initialFilteredItems } = this.props;\n\n const initialFilteredValues =\n (initialFilteredItems && initialFilteredItems.map(item => item)) || [];\n\n const filterItems = items.map(item => {\n let key = item;\n if (typeof item === 'object' && item) {\n if (typeof item.key !== 'undefined') {\n // eslint-disable-next-line prefer-destructuring\n key = item.key;\n } else if (typeof item.id !== 'undefined') {\n key = item.id;\n }\n }\n\n return {\n checked: initialFilteredValues.includes(item),\n value: item,\n key,\n };\n });\n\n this.setState(state => ({\n ...state,\n filterItems,\n }));\n }\n\n handleClear() {\n this.setState(state => ({\n ...state,\n value: '',\n }));\n }\n\n onChange(item) {\n const { filterItems } = this.state;\n\n /* eslint-disable-next-line */\n item.checked = !item.checked;\n\n this.setState(state => ({\n ...state,\n filterItems,\n }));\n }\n\n render() {\n const { filterItems } = this.state;\n const { onFilter, isFiltered, renderItem, intl } = this.props;\n\n const selectedItems = filterItems.filter(x => x.checked).map(item => item.value);\n\n return (\n
\n onFilter({ items: selectedItems })}\n >\n {intl.formatMessage(messages.Filter)}\n \n\n {isFiltered && (\n onFilter({ items: [] })}\n >\n \n  \n {intl.formatMessage(messages.ClearFilter)}\n \n )}\n {filterItems.map(filterItem => (\n
\n {filterItem.value === 'divider' ? (\n
\n ) : (\n \n )}\n
\n ))}\n
\n );\n }\n\n static propTypes = {\n items: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.number),\n PropTypes.arrayOf(PropTypes.bool),\n PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n key: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n }),\n ),\n ]).isRequired,\n /** Array of values that should be checked when the items filter is shown */\n initialFilteredItems: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.number),\n PropTypes.arrayOf(PropTypes.bool),\n PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n key: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n }),\n ),\n ]),\n /** Function to execute when a value has been entered and search has been requested */\n onFilter: PropTypes.func.isRequired,\n /** Boolean indicating whether a value is currently being filtered. Used for displaying a clear filter button */\n isFiltered: PropTypes.bool,\n renderItem: PropTypes.func,\n intl: intlShape.isRequired,\n };\n\n static defaultProps = {\n initialFilteredItems: undefined,\n renderItem: undefined,\n isFiltered: false,\n };\n}\n\nexport default ItemsFilter;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { useIntl } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport messages from './filterMessages';\n\nclass SearchFilter extends Component {\n state = {\n value: '',\n };\n\n componentDidMount() {\n const { initialValue } = this.props;\n this.setState(state => ({\n ...state,\n value: initialValue || '',\n }));\n }\n\n handleClear() {\n this.setState(state => ({\n ...state,\n value: '',\n }));\n }\n\n handleInputChange(e) {\n this.setState({ value: e.target.value });\n }\n\n handleKeyPress(e) {\n if (e.key === 'Enter') {\n const { value } = this.state;\n const { onFilter } = this.props;\n\n onFilter({ searchValue: value });\n }\n }\n\n render() {\n const { value } = this.state;\n const { onFilter, isFiltered, intl } = this.props;\n\n return (\n
\n this.handleInputChange(e)}\n onKeyPress={e => this.handleKeyPress(e)}\n autoFocus\n />\n onFilter({ searchValue: value })}\n >\n {intl.formatMessage(messages.Filter)}\n \n {isFiltered && (\n onFilter({ searchValue: '' })}\n >\n \n  \n {intl.formatMessage(messages.ClearFilter)}\n \n )}\n
\n );\n }\n\n static propTypes = {\n initialValue: PropTypes.string,\n /** Function to execute when a value has been entered and search has been requested */\n onFilter: PropTypes.func.isRequired,\n /** Boolean indicating whether a value is currently being filtered. Used for displaying a clear filter button */\n isFiltered: PropTypes.bool,\n intl: intlShape.isRequired,\n };\n\n static defaultProps = {\n initialValue: '',\n isFiltered: false,\n };\n}\n\nexport default SearchFilter;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport intlShape from '@/shared/utils/intlShape';\nimport AutoComplete from '../../input/select/AutoComplete';\nimport messages from './filterMessages';\n\nclass SelectFilter extends Component {\n state = {\n selectedItem: undefined,\n };\n\n componentDidMount() {\n const { initialValue } = this.props;\n if (initialValue) {\n this.setState(state => ({\n ...state,\n selectedItem: initialValue,\n }));\n }\n }\n\n handleClear() {\n const { onFilter } = this.props;\n\n this.setState(state => ({\n ...state,\n selectedItem: undefined,\n }));\n\n onFilter({ selectedItem: undefined });\n }\n\n selectedItemChanged(selectedItem) {\n if (!selectedItem) return;\n this.setState(state => ({\n ...state,\n selectedItem,\n }));\n }\n\n onClear() {\n this.setState(state => ({\n ...state,\n selectedItem: undefined,\n }));\n }\n\n render() {\n const { selectedItem } = this.state;\n const { onFilter, isFiltered, loadFunc, initialValue, intl } = this.props;\n\n return (\n
\n this.selectedItemChanged(item)}\n initialSelectedItem={initialValue}\n onClear={() => this.onClear()}\n mode=\"edit\"\n />\n onFilter({ selectedItem })}\n >\n {intl.formatMessage(messages.Filter)}\n \n {isFiltered && (\n this.handleClear()}\n >\n \n  \n {intl.formatMessage(messages.ClearFilter)}\n \n )}\n
\n );\n }\n\n static propTypes = {\n initialValue: PropTypes.shape({}),\n /** Function to execute when a value has been entered and search has been requested */\n onFilter: PropTypes.func.isRequired,\n /** Boolean indicating whether a value is currently being filtered. Used for displaying a clear filter button */\n isFiltered: PropTypes.bool,\n /** Function to execute when a user starts typing to search for values e.g. relations */\n loadFunc: PropTypes.func.isRequired,\n intl: intlShape.isRequired,\n };\n\n static defaultProps = {\n initialValue: undefined,\n isFiltered: false,\n };\n}\n\nexport default SelectFilter;\n","import React, { Component } from 'react';\nimport Downshift from 'downshift';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport debounce from 'lodash-es/debounce';\nimport { defineMessages } from 'react-intl';\nimport Button from '../../Button';\nimport Item from './Item';\n\nconst messages = defineMessages({\n Search: 'Search',\n LoadingProgress: 'Loading...',\n ErrorLoadingData: 'Error loading data',\n NoItems: 'No items',\n Clear: 'Clear',\n StartTypingToSearch: 'Start typing to search',\n});\n\n// this component exists because we cannot use the intl injection of the normal component in overlaytriggers. see https://github.com/react-bootstrap/react-bootstrap/pull/5778\nclass AutoCompleteWithoutInjectIntl extends Component {\n hadFocus = false;\n\n static propTypes = {\n placeholder: PropTypes.string,\n onChange: PropTypes.func.isRequired,\n disabled: PropTypes.bool,\n emptyLabel: PropTypes.string,\n loadFunc: PropTypes.func,\n // Trigger load function when component is loaded (with empty value)\n loadOnInit: PropTypes.bool,\n initialSelectedItem: PropTypes.shape({\n key: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,\n label: PropTypes.string.isRequired,\n }),\n value: PropTypes.shape({\n key: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,\n label: PropTypes.string.isRequired,\n }),\n items: PropTypes.arrayOf(\n PropTypes.shape({\n key: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,\n label: PropTypes.string.isRequired,\n disabled: PropTypes.bool,\n }),\n ),\n autoFocus: PropTypes.bool,\n canClear: PropTypes.bool,\n isSmall: PropTypes.bool,\n\n /** can be auto, edit or readOnly. auto will make the input togglable between edit and readOnly */\n mode: PropTypes.string,\n /** Errormessage and indicator if element should render in error state */\n error: PropTypes.string,\n /** Handle onFocus events */\n onFocus: PropTypes.func,\n /** Handle onBlur events */\n onBlur: PropTypes.func,\n /** Callback that is called when user clears selection */\n onClear: PropTypes.func,\n /** Specify custom filter to search items */\n filterFunc: PropTypes.func,\n /** Specify custom classname for items */\n itemClassNameFunc: PropTypes.func /* (item)=>classname string or object */,\n };\n\n static defaultProps = {\n placeholder: null,\n disabled: false,\n value: null,\n emptyLabel: null,\n items: null,\n loadFunc: undefined,\n mode: 'auto',\n error: undefined,\n initialSelectedItem: undefined,\n autoFocus: false,\n canClear: true,\n loadOnInit: false,\n onFocus: () => {},\n onBlur: () => {},\n onClear: () => {},\n filterFunc: (item, inputValue) =>\n !inputValue || (item.label && item.label.toUpperCase().includes(inputValue.toUpperCase())),\n itemClassNameFunc: undefined,\n isSmall: false,\n };\n\n constructor(props) {\n super(props);\n const { items } = props;\n\n this.state = {\n inputValue: null,\n loading: false,\n hasError: false,\n items,\n mode: props.mode === 'auto' ? 'readOnly' : props.mode,\n currentInputValue: '',\n };\n }\n\n /* ----------------------------------------------------------------------------------- */\n\n renderInput() {\n const { mode: stateMode } = this.state;\n const { mode, value, intl, autoFocus } = this.props;\n const readOnly = stateMode !== 'edit';\n const className = classNames({\n 'TextInput--readOnly': readOnly,\n 'form-control TextInput--edit': !readOnly,\n 'TextInput--editable': mode === 'auto' && readOnly,\n });\n\n const propsContainer = {\n className,\n placeholder: intl.formatMessage(messages.Search),\n value: value ? value.label : '',\n readOnly,\n onFocus: this.handleFocus,\n onBlur: this.handleInputBlur,\n ref: input => {\n this.inputElement = input;\n },\n autoFocus,\n };\n\n return ;\n }\n\n handleInputBlur = event => {\n // Don't blur when the dropdown button is clicked\n if (event.relatedTarget && event.relatedTarget.id === 'dropdownButton') return;\n\n const { onBlur, mode, error } = this.props;\n\n if (error) {\n // When there is an error set focus back to input\n event.target.focus();\n return;\n }\n if (this.inputElement) {\n this.inputElement.blur();\n }\n\n this.setState(state => ({\n ...state,\n mode: mode === 'auto' ? 'readOnly' : mode,\n }));\n\n onBlur(event);\n };\n\n handleFocus = event => {\n const { onFocus, mode } = this.props;\n\n this.setState(state => ({\n ...state,\n mode: mode === 'auto' ? 'edit' : mode,\n }));\n\n onFocus(event);\n };\n\n componentDidUpdate(prevProps) {\n const { error, items } = this.props;\n\n if (prevProps.error !== error && error) {\n this.inputElement.focus();\n }\n\n if (prevProps.items !== items) {\n this.setState(state => ({\n ...state,\n items,\n }));\n }\n }\n componentDidMount() {\n const { loadFunc, loadOnInit } = this.props;\n if ((loadFunc, loadOnInit)) {\n const { inputValue } = this.state;\n this.setState({ loading: true });\n this.debouncedLoadFunc(inputValue);\n }\n }\n\n /* ----------------------------------------------------------------------------------- */\n\n renderTypeahead({ getInputProps, getToggleButtonProps, clearSelection, selectHighlightedItem }) {\n const {\n disabled,\n onClear,\n intl,\n placeholder,\n autoFocus,\n onChange,\n canClear,\n loadFunc,\n inputRef,\n isSmall,\n } = this.props;\n const { items } = this.state;\n this.hadFocus = false;\n\n const inputProps = getInputProps({\n placeholder: placeholder || intl.formatMessage(messages.Search),\n onBlur: this.handleInputBlur,\n onChange: e => {\n if (e.target.value === '') {\n clearSelection(); // Call downshift method\n onClear(); // Call props method to propogate to upper component\n if (loadFunc) {\n this.setState({ items: [] });\n }\n } else {\n const inputValueFoundInList =\n items && items.length > 0 && items.map(x => x.label).includes(e.target.value);\n if (!inputValueFoundInList && loadFunc) {\n this.loadItems(e.target.value);\n }\n }\n },\n onKeyDown: e => {\n if (e.key === 'Tab') {\n selectHighlightedItem();\n }\n },\n ref: input => {\n this.inputElement = input;\n },\n });\n\n return (\n
\n \n\n {/* if we cant clear the value, we want to always show a dropdown button so that another value can be selected */}\n {(!inputProps.value || !canClear) && (\n \n {\n this.dropdownButtonRef = buttonDOM;\n }}\n {...getToggleButtonProps()}\n >\n \n \n \n )}\n\n {!disabled && canClear && inputProps.value && (\n \n {\n clearSelection(); // Call downshift method\n onClear(); // Call props method to propogate to upper component\n onChange(null);\n }}\n >\n \n \n \n )}\n
\n );\n }\n\n renderMenu({ isOpen, getMenuProps, selectedItem, highlightedIndex, getItemProps, inputValue }) {\n const { items, loading, hasError } = this.state;\n const { loadFunc, intl, filterFunc, canClear, renderItem, itemClassNameFunc } = this.props;\n\n let filteredItems = items;\n\n const inputValueFoundInList =\n items && items.length > 0 && items.map(x => x.label).includes(inputValue);\n\n // if load function was passed, filtering is done by backend\n // otherwise, filter the items based on its label\n if (\n (isOpen &&\n items &&\n items.length > 0 &&\n !loadFunc &&\n // we dont want to filter the selection list when a value was selected and the clear button is not present (only a dropdown button to select another value)\n canClear) ||\n (!canClear && !inputValueFoundInList)\n ) {\n filteredItems = filteredItems.filter(item => filterFunc(item, inputValue));\n }\n\n return (\n
\n \n {isOpen &&\n filteredItems &&\n filteredItems.length > 0 &&\n filteredItems.map((item, index) => (\n \n ))}\n\n {isOpen && (\n \n {loading && intl.formatMessage(messages.LoadingProgress)}\n {!loading && hasError && intl.formatMessage(messages.errorLoadingData)}\n {!loading &&\n !hasError &&\n (!filteredItems || filteredItems.length < 1) &&\n inputValue &&\n intl.formatMessage(messages.NoItems)}\n {!loading &&\n !hasError &&\n (!filteredItems || filteredItems.length < 1) &&\n !inputValue &&\n intl.formatMessage(messages.StartTypingToSearch)}\n \n )}\n \n
\n );\n }\n\n // debounce makes sure that if this method is called again within 300 ms, only the last call is executed.\n // This is used to ignore user input when typing the next letter within 300 ms.\n debouncedLoadFunc = debounce(newInputValue => {\n const { loadFunc } = this.props;\n this.setState({ loading: true });\n loadFunc(newInputValue)\n .then(items => {\n this.setState(state => ({\n ...state,\n inputValue: newInputValue,\n loading: false,\n hasError: false,\n items,\n }));\n })\n .catch(() => {\n this.setState(state => ({\n ...state,\n inputValue: newInputValue,\n loading: false,\n hasError: true,\n }));\n });\n }, 1000);\n\n loadItems = newInputValue => {\n const { inputValue } = this.state;\n if (inputValue === newInputValue || !newInputValue) return;\n this.setState({ loading: true });\n this.debouncedLoadFunc(newInputValue);\n };\n\n onSelectedItemChanged(item) {\n const { onChange } = this.props;\n onChange(item);\n }\n\n render() {\n const { value, error, initialSelectedItem } = this.props;\n const { mode: stateMode } = this.state;\n const readOnly = stateMode !== 'edit';\n const classname = classNames({\n 'form-group': true,\n 'has-error has-feedback': error,\n 'has-feedback': !value,\n });\n\n if (readOnly) {\n return (\n
\n {this.renderInput()}\n
\n );\n }\n\n return (\n this.onSelectedItemChanged(selectedItem)}\n onStateChange={this.handleStateChange}\n initialSelectedItem={initialSelectedItem}\n selectedItem={value || initialSelectedItem || null}\n itemToString={item => (item ? item.label : '')}\n >\n {downshiftProps => (\n
\n {this.renderTypeahead(downshiftProps)}\n {this.renderMenu(downshiftProps)}\n
\n )}\n \n );\n }\n}\n\nexport default AutoCompleteWithoutInjectIntl;\n","import React, { Component } from 'react';\nimport { defineMessages } from 'react-intl';\nimport PropTypes from 'prop-types';\n\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport AuthService from '@/shared/services/AuthService';\nimport { guid1 } from '@/shared/utils/guid';\nimport intlShape from '@/shared/utils/intlShape';\nimport AutoCompleteWithoutInjectIntl from './select/AutoCompleteWithoutInjectIntl';\n\nconst messages = defineMessages({\n SearchEmployee: 'Search employee',\n Unassigned: 'Unassigned',\n AssignedToMe: 'Assigned to me',\n SystemUser: 'System user',\n});\n\nconst mapUser = user =>\n !user\n ? null\n : {\n key: user.id || user.key,\n label: user.name || user.label,\n employeeId: user.employeeId,\n isActive: user.isActive,\n hidden: user.hidden,\n };\n\nexport const getUserIdFromValue = value => {\n if (!value) return null;\n if (typeof value === 'string') return value; // Value = UserId\n if (typeof value === 'object') {\n if (value.id) return value.id;\n if (value.key) return value.key;\n }\n return null;\n};\n\nexport const userShape = PropTypes.shape({\n id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,\n name: PropTypes.string.isRequired,\n isActive: PropTypes.bool,\n hidden: PropTypes.bool,\n});\nexport const getUserClassName = ({ isActive = true }) => {\n if (isActive) return undefined;\n return 'removed-user';\n};\n\n// this component exists because we cannot use the intl injection of the normal component in overlaytriggers. see https://github.com/react-bootstrap/react-bootstrap/pull/5778\nclass UserSearchWithoutInjectIntl extends Component {\n state = {\n selectedUser: null,\n internalUsers: [],\n };\n\n constructor(props) {\n super(props);\n const users = this.initUsers();\n const userId = getUserIdFromValue(props.value);\n const selectedUser = userId ? users.find(x => x.key === userId) : null;\n\n this.state = {\n ...this.state,\n internalUsers: users,\n selectedUser,\n };\n if (!selectedUser && userId) {\n props.onChange(null);\n }\n }\n\n initUsers = () => {\n const {\n users,\n withUnassigned,\n withCurrentUser,\n intl,\n unassignedId,\n withSystemUser,\n } = this.props;\n let newUsers = users || [];\n\n // retrieve users if none were passed by parent component\n if (!newUsers.length) {\n newUsers = DataCacheService.getUsers();\n }\n\n if (withSystemUser) {\n newUsers.unshift({\n id: guid1,\n name: intl.formatMessage(messages.SystemUser),\n });\n }\n if (withCurrentUser) {\n newUsers.unshift({\n id: AuthService.getUserId(),\n name: intl.formatMessage(messages.AssignedToMe),\n });\n }\n if (withUnassigned) {\n newUsers.unshift({\n id: unassignedId || null,\n name: intl.formatMessage(messages.Unassigned),\n });\n }\n return newUsers.map(mapUser);\n };\n\n onUserChanged = user => {\n if (user === undefined) return;\n const { onChange } = this.props;\n this.setState({ selectedUser: user });\n\n if (user === null) {\n onChange(null);\n } else {\n onChange({ id: user.key, name: user.label, employeeId: user.employeeId });\n }\n };\n\n componentDidUpdate(oldProps) {\n const { value, users, onChange } = this.props;\n const usersChanged = JSON.stringify(oldProps.users) !== JSON.stringify(users);\n const valueChanged = JSON.stringify(oldProps.value) !== JSON.stringify(value);\n if (!usersChanged && !valueChanged) return;\n // eslint-disable-next-line react/no-did-update-set-state\n this.setState(({ internalUsers }) => {\n const newUsers = usersChanged ? this.initUsers() : internalUsers;\n\n const userId = getUserIdFromValue(value);\n const selectedUser = userId ? newUsers.find(x => x.key === userId) : null;\n if (!selectedUser && userId) {\n onChange(null);\n }\n return {\n internalUsers: newUsers,\n selectedUser,\n };\n });\n }\n\n render() {\n const { placeholder, intl, disabled, emptyLabel, hideClearButton, small } = this.props;\n const { selectedUser, internalUsers } = this.state;\n\n return (\n this.onUserChanged(item)}\n disabled={disabled}\n emptyLabel={emptyLabel}\n mode=\"edit\"\n value={selectedUser}\n canClear={!hideClearButton}\n itemClassNameFunc={getUserClassName}\n isSmall={small}\n intl={intl}\n />\n );\n }\n\n static propTypes = {\n placeholder: PropTypes.string,\n intl: intlShape.isRequired,\n users: PropTypes.arrayOf(userShape),\n onChange: PropTypes.func.isRequired, // Returns full user object, not just id\n disabled: PropTypes.bool,\n emptyLabel: PropTypes.string,\n value: PropTypes.oneOfType([\n userShape,\n PropTypes.shape({ id: PropTypes.string.isRequired }),\n PropTypes.string,\n ]),\n withUnassigned: PropTypes.bool,\n withCurrentUser: PropTypes.bool,\n withSystemUser: PropTypes.bool,\n unassignedId: PropTypes.string,\n hideClearButton: PropTypes.bool,\n small: PropTypes.bool,\n };\n\n static defaultProps = {\n placeholder: null,\n disabled: false,\n emptyLabel: null,\n value: null,\n users: [],\n withUnassigned: false,\n withCurrentUser: false,\n withSystemUser: false,\n unassignedId: '',\n hideClearButton: false,\n small: false,\n };\n}\n\nexport default UserSearchWithoutInjectIntl;\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport classNames from 'classnames';\nimport OverlayTrigger from 'react-bootstrap/lib/OverlayTrigger';\nimport Popover from 'react-bootstrap/lib/Popover';\nimport { useIntl } from 'react-intl';\nimport ItemsFilter from './filters/ItemsFilter';\nimport SearchFilter from './filters/SearchFilter';\nimport SelectFilter from './filters/SelectFilter';\nimport UserFilter from './filters/UserFilter';\nvar ColumnHeader = function (_a) {\n var filter = _a.filter, sortKey = _a.sortKey, onSort = _a.onSort, onFilter = _a.onFilter, _b = _a.searchParams, searchParams = _b === void 0 ? {} : _b, className = _a.className, title = _a.title, id = _a.id, _c = _a.visible, visible = _c === void 0 ? true : _c, style = _a.style;\n var intl = useIntl();\n if (!visible)\n return null;\n var isSearchFiltered = filter && searchParams.search && searchParams.search[filter.key] !== undefined;\n var isSelectFiltered = filter && searchParams.select && searchParams.select[filter.key] !== undefined;\n var isItemsFiltered = filter &&\n searchParams.filter &&\n searchParams.filter[filter.key] &&\n searchParams.filter[filter.key].items &&\n searchParams.filter[filter.key].items.length > 0;\n var sortClassName = classNames('fa margin10R', {\n clickable: sortKey,\n 'fa-caret-down': sortKey && searchParams.desc,\n 'fa-caret-up': sortKey && !searchParams.desc,\n });\n var getFilter = function (filterParam) {\n if (filterParam.type === 'search') {\n return (_jsx(SearchFilter, { initialValue: searchParams.search && searchParams.search[filterParam.key], onFilter: function (filterItems) { return onFilter(filterItems); }, isFiltered: isSearchFiltered, intl: intl }));\n }\n if (filterParam.type === 'items') {\n return (_jsx(ItemsFilter, { items: filterParam.items, renderItem: filterParam.renderItem, initialFilteredItems: searchParams.filter &&\n searchParams.filter[filterParam.key] &&\n searchParams.filter[filterParam.key].items, onFilter: function (filterItems) { return onFilter(filterItems); }, isFiltered: isItemsFiltered, intl: intl }));\n }\n if (filterParam.type === 'select') {\n return (_jsx(SelectFilter, { initialValue: searchParams.select && searchParams.select[filterParam.key], onFilter: function (filterItems) { return onFilter(filterItems); }, loadFunc: filterParam.loadFunc, isFiltered: isSelectFiltered, intl: intl }));\n }\n if (filterParam.type === 'user') {\n return (_jsx(UserFilter, { initialValue: searchParams.filter &&\n searchParams.filter[filterParam.key] &&\n searchParams.filter[filterParam.key].items &&\n searchParams.filter[filterParam.key].items[0], onFilter: function (filterItems) { return onFilter(filterItems); }, isFiltered: isItemsFiltered, intl: intl }));\n }\n };\n return (_jsxs(\"th\", __assign({ className: classNames(className, 'sticky-header'), id: id, style: style }, { children: [_jsxs(\"span\", __assign({ className: classNames({ clickable: onSort }), onClick: function () { return onSort && onSort(sortKey); } }, { children: [!!sortKey && sortKey === searchParams.sortKey && _jsx(\"i\", { className: sortClassName }), title] })), filter && (_jsx(OverlayTrigger, __assign({ trigger: \"click\", rootClose: true, placement: \"bottom\", overlay: _jsx(Popover, __assign({ id: \"filterPopover\" }, { children: getFilter(filter) })) }, { children: _jsx(\"i\", { className: classNames('fa fa-filter margin10L clickable filter-icon', {\n red: isItemsFiltered || isSearchFiltered || isSelectFiltered,\n }) }) })))] })));\n};\nexport default ColumnHeader;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport intlShape from '@/shared/utils/intlShape';\nimport guid from '@/shared/utils/guid';\nimport messages from './filterMessages';\nimport UserSearchWithoutInjectIntl from '../../input/UserSearchWithoutInjectIntl';\n\nclass UserFilter extends Component {\n state = {\n value: '',\n };\n\n componentDidMount() {\n const { initialValue } = this.props;\n this.setState(state => ({\n ...state,\n value: initialValue || '',\n }));\n }\n\n handleClear() {\n this.setState(state => ({\n ...state,\n value: '',\n }));\n }\n\n handleInputChange(user) {\n this.setState({ value: user?.id });\n }\n\n render() {\n const { value } = this.state;\n const { onFilter, isFiltered, intl } = this.props;\n\n return (\n
\n this.handleInputChange(user)}\n value={value}\n hideClearButton\n withUnassigned\n unassignedId={guid.empty}\n small\n intl={intl}\n />\n\n onFilter({ items: [value] })}\n >\n {intl.formatMessage(messages.Filter)}\n \n {isFiltered && (\n onFilter({ items: [] })}\n >\n \n  \n {intl.formatMessage(messages.ClearFilter)}\n \n )}\n
\n );\n }\n\n static propTypes = {\n initialValue: PropTypes.string,\n /** Function to execute when a value has been entered and search has been requested */\n onFilter: PropTypes.func.isRequired,\n /** Boolean indicating whether a value is currently being filtered. Used for displaying a clear filter button */\n isFiltered: PropTypes.bool,\n intl: intlShape.isRequired,\n };\n\n static defaultProps = {\n initialValue: '',\n isFiltered: false,\n };\n}\n\nexport default UserFilter;\n","import React, { Component } from 'react';\nimport { defineMessages, FormattedMessage } from 'react-intl';\nimport PropTypes from 'prop-types';\nimport InfiniteScroll from 'react-infinite-scroller';\nimport classNames from 'classnames';\nimport LoadingAnimation from '@/shared/components/LoadingAnimation';\nimport ColumnHeader from './ColumnHeader';\n\nconst messages = defineMessages({\n NoDataFound: 'No data found',\n});\n\nexport default class ScrollableTable extends Component {\n defaultSearchParams = {\n page: 0,\n pageSize: 50,\n desc: false,\n filter: {},\n search: {},\n select: {},\n };\n\n constructor(props) {\n super(props);\n\n this.state = {\n hasMoreData: false,\n scrollKey: 0,\n lastRequest: 0, // Request number\n loading: false,\n reloading: false,\n searchParams: {\n ...this.defaultSearchParams,\n ...props.initialSearchParams,\n },\n };\n }\n\n componentDidMount() {\n const { searchParams } = this.state;\n const { fetchOnMount, items, initialSearchParams } = this.props;\n window.scrollTo(0, 0);\n\n if (fetchOnMount) {\n this.loadMoreItems(searchParams.page);\n } else if (items.length === initialSearchParams.pageSize) {\n this.setState(state => ({ ...state, hasMoreData: true }));\n }\n }\n\n componentDidUpdate(prevProps) {\n const { initialSearchParams, items } = this.props;\n const { searchParams } = this.state;\n if (JSON.stringify(prevProps.initialSearchParams) !== JSON.stringify(initialSearchParams)) {\n const alteredSearchParams = {\n ...searchParams,\n ...initialSearchParams,\n };\n window.scrollTo(0, 0);\n this.retrieveItems(alteredSearchParams);\n }\n\n const count = items?.length ?? 0;\n const prevCount = prevProps?.items?.length ?? 0;\n if (count > 0 && count !== prevCount && count % initialSearchParams.pageSize === 0) {\n // eslint-disable-next-line react/no-did-update-set-state\n this.setState({ hasMoreData: true });\n }\n }\n retrieveItems = params => {\n const { loadItems } = this.props;\n const { lastRequest: previousRequest } = this.state;\n const promise = new Promise((resolve, reject) => {\n const currentRequest = previousRequest + 1;\n\n this.setState(\n state => {\n if (params.page === 0) {\n // First page request\n return {\n loading: true,\n reloading: true,\n lastRequest: currentRequest,\n // If the page was set to 0 and sthe current page is not 0, the key defined on the infinite scroller component has to be changed\n // for it to re-render and\n // https://github.com/CassetteRocks/react-infinite-scroller/issues/12\n scrollKey: state.scrollKey + 1,\n searchParams: {\n ...params,\n },\n };\n }\n\n // Next page request\n return {\n loading: true,\n reloading: false,\n lastRequest: currentRequest,\n };\n },\n () => {\n Promise.resolve(loadItems(params, currentRequest)).then(\n result => {\n const { lastRequest } = this.state;\n if (typeof result === 'undefined' || lastRequest !== currentRequest) {\n // Don't do anything if the request is cancelled or if this request is not the last\n resolve();\n return;\n }\n this.setState(\n state => ({\n ...state,\n loading: false,\n reloading: false,\n hasMoreData: !!result && result.length === params.pageSize,\n searchParams: {\n ...params,\n },\n }),\n () => {\n resolve(result);\n const root = document.getElementById('main-container');\n if (!!result && result.length === params.pageSize && !!root && root.scrollHeight < window.innerHeight) {\n this.loadMoreItems(params.page + 1);\n }\n },\n );\n },\n error => {\n reject(error);\n },\n );\n },\n );\n });\n return promise;\n };\n\n loadMoreItems(page) {\n const { searchParams } = this.state;\n\n const newSearchParams = {\n ...searchParams,\n page,\n };\n this.retrieveItems(newSearchParams);\n }\n\n sort(newSortKey) {\n this.setState(\n ({ searchParams }) => {\n const { sortKey, desc } = searchParams;\n\n return {\n searchParams: {\n ...searchParams,\n sortKey: newSortKey,\n desc: sortKey === newSortKey ? !desc : false, // If new sort key is different than state key, set descending back to default (false)\n page: 0,\n },\n };\n },\n () => {\n const { searchParams } = this.state;\n\n this.retrieveItems(searchParams).then(() => window.scrollTo(0, 0));\n },\n );\n }\n\n filter(property) {\n return filterRequest => {\n const { searchParams = {} } = this.state;\n let { filter = {}, search = {}, select = {} } = searchParams;\n\n if (filterRequest.items) {\n if (filterRequest.items.length > 0) {\n filter = { ...filter, [property]: { items: filterRequest.items } };\n } else {\n const newFilter = { ...filter };\n delete newFilter[property];\n filter = newFilter;\n }\n }\n\n // No falsy because it can be an empty string\n if (filterRequest.searchValue !== null && filterRequest.searchValue !== undefined) {\n if (filterRequest.searchValue === '' && search[property]) {\n const { [property]: _ignore, ...otherSearch } = search;\n search = otherSearch;\n } else {\n search = { ...search, [property]: filterRequest.searchValue };\n }\n }\n\n if (filterRequest.selectedItem) {\n select = { ...select, [property]: filterRequest.selectedItem };\n } else {\n const { [property]: _ignore, ...otherSelect } = select;\n select = otherSelect;\n }\n\n const alteredSearchParams = {\n ...searchParams,\n filter,\n search,\n select,\n page: 0,\n };\n this.setState(\n {\n searchParams: {\n ...searchParams,\n filter,\n search,\n select,\n },\n },\n () => {\n this.retrieveItems(alteredSearchParams).then(() => {\n window.scrollTo(0, 0);\n document.body.click(); // https://stackoverflow.com/a/47636953\n });\n },\n );\n };\n }\n\n render() {\n const { hasMoreData, searchParams, scrollKey, loading, reloading } = this.state;\n const {\n children,\n items,\n noDataLabel,\n renderRow,\n tableClassName,\n useWindow,\n renderTBody,\n tbodyStyle,\n scrollParentRef,\n noHover,\n } = this.props;\n\n const noDataFound = !items || items.length <= 0;\n const columns = [].concat(...children);\n const numberOfColumns = columns.length;\n\n return (\n this.loadMoreItems(searchParams.page + 1)}\n hasMore={hasMoreData && !loading}\n initialLoad={false}\n useWindow={useWindow}\n getScrollParent={() => scrollParentRef}\n key={scrollKey}\n // Sometimes the scroll component does not render the loading animation, e.g. when changing filters.\n // Therefore, when we set the loading state variable, render the loading animation ourselves and set the loader prop to something invisible\n loader={null}\n >\n \n \n \n {columns.map(\n (column, idx) =>\n column && (\n this.sort(sortKey))}\n onFilter={column.props.filter && this.filter(column.props.filter.key)}\n searchParams={searchParams}\n />\n ),\n )}\n \n \n\n {!loading && noDataFound && (\n \n \n {noDataLabel}\n \n \n )}\n\n {!reloading &&\n !!items &&\n !!items.length &&\n (renderTBody ? (\n {items.map(item => renderRow(item))}\n ) : (\n items.map(item => renderRow(item))\n ))}\n \n {\n loading && (\n
\n \n
\n )\n }\n \n );\n }\n\n static propTypes = {\n /** Function that is called when new items should be retrieved. Takes search params in as parameter and should return the transformed data */\n loadItems: PropTypes.func.isRequired,\n /** Can be set to false, when the scroll component is used in a modal */\n useWindow: PropTypes.bool,\n children: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.shape({\n title: PropTypes.string,\n sortKey: PropTypes.string,\n filter: PropTypes.shape({}),\n className: PropTypes.string,\n render: PropTypes.func,\n }),\n PropTypes.array,\n ]),\n ).isRequired,\n initialSearchParams: PropTypes.shape({\n page: PropTypes.number,\n pageSize: PropTypes.number,\n desc: PropTypes.bool,\n filter: PropTypes.shape({}),\n search: PropTypes.shape({}),\n }),\n items: PropTypes.arrayOf(PropTypes.shape).isRequired,\n noDataLabel: PropTypes.node,\n fetchOnMount: PropTypes.bool,\n noHover: PropTypes.bool,\n };\n\n static defaultProps = {\n noDataLabel: ,\n useWindow: true,\n initialSearchParams: {\n page: 0,\n pageSize: 50,\n desc: false,\n filter: {},\n search: {},\n },\n fetchOnMount: true,\n noHover: false,\n };\n}\n","import React, { PureComponent } from 'react';\nimport { defineMessages, injectIntl, useIntl } from 'react-intl';\nimport classnames from 'classnames';\nimport { FaRegQuestionCircle } from 'react-icons/fa';\nimport PropTypes from 'prop-types';\nimport intlShape from '@/shared/utils/intlShape';\n\nconst messages = defineMessages({\n OpenZendeskArticle: 'OpenZendeskArticle',\n});\n\nconst zendeskBaseUrl = 'https://adminpulse.zendesk.com/hc';\nconst fallbackCulture = 'en-us';\n\nconst mapCulture = culture => {\n if (!culture) return fallbackCulture;\n if (culture.startsWith('en')) return 'en-us';\n if (culture.startsWith('nl')) return culture;\n if (culture.startsWith('fr')) return culture;\n return fallbackCulture;\n};\nexport const getZendeskUrl = (articleOrSection, culture, isSection, anchor) => {\n if (!articleOrSection) return `${zendeskBaseUrl}/${mapCulture(culture)}`;\n if (isSection) {\n return `${zendeskBaseUrl}/${mapCulture(culture)}/sections/${articleOrSection}`;\n }\n if (anchor) {\n return `${zendeskBaseUrl}/${mapCulture(culture)}/articles/${articleOrSection}${anchor}`;\n }\n return `${zendeskBaseUrl}/${mapCulture(culture)}/articles/${articleOrSection}`;\n};\n\nexport const getMyTicketsUrl = culture => `${zendeskBaseUrl}/${mapCulture(culture)}/requests`;\n\nclass ZendeskHelp extends PureComponent {\n static propTypes = {\n intl: intlShape.isRequired,\n };\n\n render() {\n const { intl, className, article, anchor, ...rest } = this.props;\n const url = getZendeskUrl(article, intl.locale, false, anchor);\n\n return url ? (\n \n \n \n ) : null;\n }\n}\n\nexport default injectIntl(ZendeskHelp);\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport classNames from 'classnames';\nimport ZendeskHelp from './ZendeskHelp';\nvar SimplePanel = function (_a) {\n var title = _a.title, className = _a.className, article = _a.article, bodyClass = _a.bodyClass, children = _a.children, buttons = _a.buttons, onClick = _a.onClick;\n return (_jsxs(\"div\", __assign({ className: classNames('panel', className) }, { children: [_jsxs(\"div\", __assign({ className: \"panel-heading\", onClick: onClick }, { children: [_jsxs(\"h3\", __assign({ className: \"panel-title\" }, { children: [title, article && _jsx(ZendeskHelp, { article: article })] })), _jsx(\"div\", __assign({ className: \"panel-buttons\" }, { children: buttons }))] })), children ? _jsx(\"div\", __assign({ className: classNames('panel-body', bodyClass) }, { children: children })) : null] })));\n};\nexport default SimplePanel;\n","/*\n * Usage:\n * Holy guacamole! I'm Sticky.
}\n * placement=\"top\"\n * onMouseEnter={() => { }}\n * delay={200}\n * >\n *
Show the sticky tooltip
\n * \n */\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport dompurify from 'dompurify';\nimport { Overlay, Popover } from 'react-bootstrap';\n\nconst sanitizer = dompurify.sanitize;\n\nexport default class PopoverStickOnHover extends React.Component {\n constructor(props) {\n super(props);\n\n this.handleMouseEnter = this.handleMouseEnter.bind(this);\n this.handleMouseLeave = this.handleMouseLeave.bind(this);\n this.handleClick = this.handleClick.bind(this);\n\n this.state = {\n showPopover: false,\n };\n }\n\n handleMouseEnter() {\n const { delay, onMouseEnter } = this.props;\n\n this.setTimeoutConst = setTimeout(() => {\n this.setState({ showPopover: true }, () => {\n if (onMouseEnter) {\n onMouseEnter();\n }\n });\n }, delay);\n }\n\n handleMouseLeave() {\n clearTimeout(this.setTimeoutConst);\n\n this.setState({ showPopover: false });\n }\n handleClick() {\n const { onClick } = this.props;\n if (onClick) {\n onClick();\n }\n }\n componentWillUnmount() {\n if (this.setTimeoutConst) {\n clearTimeout(this.setTimeoutConst);\n }\n }\n\n render() {\n const { component, children, placement, renderAsRichText } = this.props;\n\n const child = React.Children.map(children, child =>\n React.cloneElement(child, {\n onMouseEnter: this.handleMouseEnter,\n onMouseLeave: this.handleMouseLeave,\n onClick: this.handleClick,\n ref: node => {\n this._child = node;\n const { ref } = child;\n if (typeof ref === 'function') {\n ref(node);\n }\n },\n }),\n )[0];\n\n return (\n \n {child}\n \n {\n this.setState({ showPopover: true });\n }}\n onMouseLeave={this.handleMouseLeave}\n id=\"popover\"\n >\n {renderAsRichText ? (\n
\n ) : (\n component\n )}\n \n \n \n );\n }\n}\n\nPopoverStickOnHover.defaultProps = {\n delay: 0,\n renderAsRichText: false,\n};\n\nPopoverStickOnHover.propTypes = {\n delay: PropTypes.number,\n onMouseEnter: PropTypes.func,\n children: PropTypes.element.isRequired,\n component: PropTypes.node.isRequired,\n renderAsRichText: PropTypes.bool,\n};\n","import React, { Component } from 'react';\nimport Modal from 'react-bootstrap/lib/Modal';\nimport { defineMessages, injectIntl, useIntl } from 'react-intl';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport intlShape from '@/shared/utils/intlShape';\nimport ZendeskHelp from '@/shared/components/ZendeskHelp';\nimport Button from './Button';\n\nconst messages = defineMessages({\n Ok: 'Ok',\n Cancel: 'Cancel',\n});\n\nclass OkCancelModal extends Component {\n static propTypes = {\n title: PropTypes.node,\n show: PropTypes.bool,\n onSave: PropTypes.func.isRequired,\n onClose: PropTypes.func.isRequired,\n children: PropTypes.node.isRequired,\n disabled: PropTypes.bool,\n intl: intlShape.isRequired,\n size: PropTypes.string,\n okLabel: PropTypes.node,\n disableFullScreen: PropTypes.bool,\n leftButton: PropTypes.node,\n dismissOnClickOutsideModal: PropTypes.bool,\n onHoverSave: PropTypes.func,\n zendeskArticle: PropTypes.string,\n cancelDisabled: PropTypes.bool,\n customClassName: PropTypes.string,\n onEnter: PropTypes.func,\n };\n\n static defaultProps = {\n title: '',\n show: false,\n size: '',\n disabled: false,\n cancelDisabled: false,\n okLabel: undefined,\n disableFullScreen: false,\n dismissOnClickOutsideModal: false,\n onHoverSave: () => {},\n zendeskArticle: null,\n customClassName: '',\n onEnter: () => {},\n };\n\n state = {\n fullScreen: false,\n };\n\n render() {\n const {\n title,\n show,\n onClose,\n onSave,\n children,\n disabled,\n intl,\n size,\n okLabel,\n disableFullScreen,\n leftButton,\n onHoverSave,\n dismissOnClickOutsideModal,\n zendeskArticle,\n cancelDisabled,\n customClassName,\n onEnter,\n } = this.props;\n const { fullScreen } = this.state;\n\n return (\n \n \n {!disableFullScreen && (\n this.setState(state => ({ fullScreen: !state.fullScreen }))}\n >\n \n \n )}\n \n {title}{' '}\n {zendeskArticle && }\n \n \n {children}\n \n
{leftButton}
\n\n \n onHoverSave()}\n onFocus={() => onHoverSave()}\n showProgress\n name=\"OkCancelModal-Ok\"\n >\n {okLabel || intl.formatMessage(messages.Ok)}\n \n
\n \n );\n }\n}\n\nexport default injectIntl(OkCancelModal);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { FaChevronDown, FaChevronUp } from 'react-icons/fa';\nimport Collapse from 'react-bootstrap/lib/Collapse';\nimport SimplePanel from './SimplePanel';\n\nconst CollapsablePanel = ({ title, bodyClass, collapsed, children, collapseChanged, ...rest }) => (\n collapseChanged(!collapsed)}\n titleClass=\"pointer\"\n bodyClass={bodyClass}\n title={\n \n {collapsed ? (\n \n ) : (\n \n )}\n {title}\n \n }\n {...rest}\n >\n {children}\n \n);\n\nCollapsablePanel.propTypes = {\n title: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.node]).isRequired,\n collapseChanged: PropTypes.func.isRequired,\n collapsed: PropTypes.bool,\n bodyClass: PropTypes.string,\n children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),\n};\nCollapsablePanel.defaultProps = {\n bodyClass: '',\n collapsed: true,\n children: undefined,\n};\n\nexport default CollapsablePanel;\n","import React, { Component } from 'react';\nimport { FilePond } from 'react-filepond';\nimport PropTypes from 'prop-types';\nimport { defineMessages, injectIntl } from 'react-intl';\n\nconst messages = defineMessages({\n FileIsTooLarge: 'File is too large',\n DragDropFiles: 'Drag & Drop your files or',\n Browse: 'Browse',\n FileWaitingForSize: 'Waiting for size',\n FileSizeNotAvailable: 'Size not available',\n Loading: 'Loading',\n FileLoadError: 'Error during load',\n Uploading: 'Uploading',\n FileProcessingComplete: 'Upload complete',\n FileProcessingAborted: 'Upload cancelled',\n FileProcessingError: 'Error during upload',\n TapToCancel: 'tap to cancel',\n TapToRetry: 'tap to retry',\n TapToUndo: 'tap to undo',\n Remove: 'Remove',\n Abort: 'Abort',\n Retry: 'Retry',\n Cancel: 'Cancel',\n Undo: 'Undo',\n Upload: 'Upload',\n MaxFileSize: 'Maximum file size is {filesize}',\n FileTypeNotAllowed: 'This file type is not allowed',\n});\n\nclass TranslatedFilePond extends Component {\n getLabels = intl => ({\n labelIdle: `\n ${intl.formatMessage(\n messages.DragDropFiles,\n )} ${intl.formatMessage(messages.Browse)}\n `,\n labelFileWaitingForSize: intl.formatMessage(messages.FileWaitingForSize),\n labelFileSizeNotAvailable: intl.formatMessage(messages.FileSizeNotAvailable),\n labelFileLoading: intl.formatMessage(messages.Loading),\n labelFileLoadError: intl.formatMessage(messages.FileLoadError),\n labelFileProcessing: intl.formatMessage(messages.Uploading),\n labelFileProcessingComplete: intl.formatMessage(messages.FileProcessingComplete),\n labelFileProcessingAborted: intl.formatMessage(messages.FileProcessingAborted),\n labelFileProcessingError: intl.formatMessage(messages.FileProcessingError),\n labelTapToCancel: intl.formatMessage(messages.TapToCancel),\n labelTapToRetry: intl.formatMessage(messages.TapToRetry),\n labelTapToUndo: intl.formatMessage(messages.TapToUndo),\n labelButtonRemoveItem: intl.formatMessage(messages.Remove),\n labelButtonAbortItemLoad: intl.formatMessage(messages.Abort),\n labelButtonRetryItemLoad: intl.formatMessage(messages.Retry),\n labelButtonAbortItemProcessing: intl.formatMessage(messages.Abort),\n labelButtonUndoItemProcessing: intl.formatMessage(messages.Undo),\n labelButtonRetryItemProcessing: intl.formatMessage(messages.Retry),\n labelButtonProcessItem: intl.formatMessage(messages.Upload),\n labelMaxFileSize: intl.formatMessage(messages.MaxFileSize, { filesize: '50MB' }),\n labelMaxFileSizeExceeded: intl.formatMessage(messages.FileIsTooLarge),\n labelFileTypeNotAllowed: intl.formatMessage(messages.FileTypeNotAllowed),\n });\n\n render() {\n const { intl, pondRef, ...rest } = this.props;\n\n return (\n \n );\n }\n\n static propTypes = {\n pondRef: PropTypes.func,\n };\n\n static defaultProps = {\n pondRef: () => {},\n };\n}\n\nexport default injectIntl(TranslatedFilePond);\n","import AuthService from './AuthService';\n\nconst storage = localStorage;\n\n/* eslint-disable */\nconst hashCode = s =>\n s.split('').reduce((a, b) => {\n a = (a << 5) - a + b.charCodeAt(0);\n\n return a & a;\n }, 0);\n/* eslint-enable */\n\nlet storageKey = null;\nconst getStorageKey = () => {\n if (!storageKey)\n storageKey = `UserData_${hashCode(`${AuthService.getUserId()};${AuthService.getTenantId()}`)}`;\n return storageKey;\n};\n\nconst setItem = (key, value) => {\n const userKey = getStorageKey();\n\n const userData = JSON.parse(storage.getItem(userKey)) || {};\n if (typeof value === 'undefined' || value === null) {\n delete userData[key];\n } else {\n userData[key] = value;\n }\n localStorage.setItem(userKey, JSON.stringify(userData));\n};\n\nconst getItem = key => {\n const userKey = getStorageKey();\n const userData = JSON.parse(localStorage.getItem(userKey)) || {};\n return userData[key];\n};\n\nconst userStorage = {\n setItem,\n getItem,\n};\nexport default userStorage;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nimport AuthService from '../../services/AuthService';\nimport TranslatedFilePond from '../TranslatedFilePond';\n\nclass FileUpload extends Component {\n getServerOptions() {\n const { endpoint, relationId } = this.props;\n let token = AuthService.getToken();\n\n const doProcess = (\n fieldName,\n file,\n metadata,\n load,\n error,\n progress,\n abort,\n retryOnUnauthorized,\n ) => {\n // fieldName is the name of the input field\n // file is the actual file object to send\n const formData = new FormData();\n\n formData.append(fieldName, file, file.name);\n if (relationId) {\n formData.append('relationId', relationId);\n }\n const url = new URL(endpoint);\n if (metadata && metadata.params) {\n const searchParams = new URLSearchParams(url.search);\n Object.keys(metadata.params).forEach(key => {\n searchParams.set(key, metadata.params[key]);\n });\n url.search = searchParams.toString();\n }\n\n const request = new XMLHttpRequest();\n request.open('POST', url.toString());\n request.setRequestHeader('Authorization', `Bearer ${token}`);\n\n // Should call the progress method to update the progress to 100% before calling load\n // Setting computable to false switches the loading indicator to infinite mode\n request.upload.onprogress = e => {\n progress(e.lengthComputable, e.loaded, e.total);\n };\n\n // Should call the load method when done and pass the returned server file id\n // this server file id is then used later on when reverting or restoring a file\n // so your server knows which file to return without exposing that info to the client\n request.onload = () => {\n if (request.status >= 200 && request.status < 300) {\n load(request.responseText);\n } else if (request.status === 401) {\n if (retryOnUnauthorized) {\n AuthService.signinSilent().then(user => {\n token = user.access_token;\n doProcess(fieldName, file, metadata, load, error, progress, abort, false);\n });\n } else {\n error({ response: { status: 401 }, code: 401 }); // translated error will be shown later down the chain by setting these props\n }\n } else if (request.responseText) {\n // Can call the error method if something is wrong, should exit after\n const errorResponse = JSON.parse(request.responseText);\n if (errorResponse.code) {\n error(errorResponse);\n } else {\n error(request.responseText);\n }\n } else {\n error('Error');\n }\n };\n\n request.send(formData);\n\n // Should expose an abort method so the request can be cancelled\n return {\n abort: () => {\n // This function is entered if the user has tapped the cancel button\n request.abort();\n\n // Let FilePond know the request has been cancelled\n abort();\n },\n };\n };\n\n return {\n process: (fieldName, file, metadata, load, error, progress, abort) =>\n doProcess(fieldName, file, metadata, load, error, progress, abort, true),\n };\n }\n\n onProcessFile(error, file) {\n const { onFileUploaded, removeSuccessfullAfter } = this.props;\n const fileId = file.id;\n const { pond } = this;\n if (file && file.serverId) {\n const [document] = JSON.parse(file.serverId); // serverId contains response from document service,\n onFileUploaded(error, document, file.getMetadata());\n if (removeSuccessfullAfter) {\n setTimeout(() => {\n if (pond) pond.removeFile(fileId);\n }, removeSuccessfullAfter);\n }\n } else {\n onFileUploaded(error, null, null);\n }\n }\n\n onAddFile(error, file) {\n const { onFileAdded } = this.props;\n onFileAdded(error, file);\n }\n\n render() {\n const { maxFiles, pondRef } = this.props;\n\n return (\n
\n {/* Pass FilePond properties as attributes */}\n this.onProcessFile(error, file)}\n onaddfile={(error, file) => {\n this.onAddFile(error, file);\n }}\n pondRef={ref => {\n this.pond = ref;\n pondRef(ref);\n }}\n />\n
\n );\n }\n\n static propTypes = {\n maxFiles: PropTypes.number,\n endpoint: PropTypes.string.isRequired,\n onFileAdded: PropTypes.func,\n onFileUploaded: PropTypes.func,\n removeSuccessfullAfter: PropTypes.number,\n pondRef: PropTypes.func,\n relationId: PropTypes.string,\n };\n\n static defaultProps = {\n maxFiles: 40,\n onFileAdded: () => {},\n onFileUploaded: () => {},\n pondRef: () => {},\n removeSuccessfullAfter: 0,\n relationId: undefined,\n };\n}\n\nexport default FileUpload;\n","import userStorage from '@/shared/services/userStorage';\n\nconst defaultFont = 'Arial';\nconst defaultFontSize = 14;\nexport const ckEditorDefaultFontStorageKey = 'ckEditorDefaultFont';\nexport const ckEditorDefaultFontSizeStorageKey = 'ckEditorDefaultFontSize';\n\nexport default function defaultConfig(useDefaultFont) {\n return {\n extraPlugins: 'docprops,base64image,sourcedialog,autogrow',\n entities: false,\n removePlugins:\n 'about,flash,forms,iframe,smiley,bidi,language,save,newpage,print,exportpdf,image,sourcearea, elementspath,resize',\n customConfig: '',\n autoGrow_minHeight: 200,\n autoGrow_maxHeight: 600,\n font_defaultLabel: useDefaultFont\n ? defaultFont\n : userStorage.getItem(ckEditorDefaultFontStorageKey) || defaultFont,\n fontSize_defaultLabel: useDefaultFont\n ? defaultFontSize\n : userStorage.getItem(ckEditorDefaultFontSizeStorageKey) || defaultFontSize,\n };\n}\n\nexport const onCkEditorLoaded = () => {\n if (!window.CKEDITOR) return;\n\n window.CKEDITOR.plugins.addExternal('base64image', '/ckeditor/plugins/base64image/plugin.js');\n window.CKEDITOR.plugins.addExternal('autogrow', '/ckeditor/plugins/autogrow/plugin.js');\n};\n\nexport const initializeCss = useDefaultFont => {\n if (!window.CKEDITOR) return;\n const font = useDefaultFont\n ? defaultFont\n : userStorage.getItem(ckEditorDefaultFontStorageKey) || defaultFont;\n const fontSize = useDefaultFont\n ? defaultFontSize\n : userStorage.getItem(ckEditorDefaultFontSizeStorageKey) || defaultFontSize;\n // https://stackoverflow.com/questions/50887220/how-to-set-default-font-and-font-size-in-ckeditor-4\n\n window.CKEDITOR.addCss(\n `.cke_editable{cursor:text; font-size: ${fontSize}px; font-family: ${font}, sans-serif;}`,\n );\n};\n\nif (window.CKEDITOR) {\n onCkEditorLoaded();\n}\n","import dompurify from 'dompurify';\n\nconst sanitizer = dompurify.sanitize;\n\n// if allowHtml is set to true, HTML markup will be allowed (to be used in content like email editors)\n// if false, the input is fully stripped so that nothing but
tags are allowed (to be used in showing simple data like relation name)\nexport function sanitize(input, allowHtml) {\n if (allowHtml) {\n const sanitized = sanitizer(input, { WHOLE_DOCUMENT: true, USE_PROFILES: { html: true } });\n return sanitized;\n }\n\n return sanitizer(input, {\n ALLOWED_TAGS: ['br'],\n });\n}\n","import React, { PureComponent } from 'react';\nimport { PropTypes } from 'prop-types';\nimport { injectIntl } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport ckeditorConfig, {\n ckEditorDefaultFontSizeStorageKey,\n ckEditorDefaultFontStorageKey,\n initializeCss,\n} from '@/ckeditorConfig';\nimport classNames from 'classnames';\nimport { sanitize } from '@/shared/utils/htmlHelpers';\nimport userStorage from '@/shared/services/userStorage';\n\nclass RichTextEditor extends PureComponent {\n constructor(props) {\n super(props);\n this.state = {\n isReady: false,\n };\n }\n\n triggerOnChange = () => {\n const { onChange } = this.props;\n if (onChange && this.editor) {\n onChange(this.editor.getData());\n }\n };\n\n componentDidMount() {\n const { intl, id, initialValue, readonly, isFreeEmail } = this.props;\n const languageCode = intl.locale.split('-')[0];\n const config = {\n ...ckeditorConfig(isFreeEmail === false),\n fullPage: true,\n language: languageCode,\n readOnly: readonly,\n };\n\n // we only want to load the user selected font/fontsize when its a free email, otherwise we will override the template font\n initializeCss(isFreeEmail === false);\n\n // https://ckeditor.com/docs/ckeditor4/latest/guide/dev_installation.html\n // eslint-disable-next-line no-undef\n this.editor = CKEDITOR.replace(`editor-wrapper-${id}`, config);\n\n // save font and font size to local storage so it can be used to bootstrap editor based on user's preference\n this.editor.on('afterCommandExec', e => {\n if (e?.data?.name === 'font') {\n const fontName = e.data.commandData?.newStyle?._?.definition?.name;\n if (!fontName) return;\n userStorage.setItem(ckEditorDefaultFontStorageKey, fontName);\n }\n\n if (e?.data?.name === 'fontSize') {\n const fontSize = e.data.commandData?.newStyle?._?.definition?.name;\n if (!fontSize) return;\n userStorage.setItem(ckEditorDefaultFontSizeStorageKey, fontSize);\n }\n\n // we call this method so that the next time a ckeditor is loaded (within the same browser session), it will use the new font\n initializeCss();\n });\n\n // https://ckeditor.com/docs/ckeditor4/latest/examples/api.html\n this.editor.on('instanceReady', () => {\n // Set initial value\n this.editor.setData(sanitize(initialValue, true));\n this.editor.setReadOnly(readonly);\n ['dataReady', 'change', 'blur', 'saveSnapshot'].forEach(event => {\n this.editor.on(event, this.triggerOnChange);\n });\n this.setState({ isReady: true });\n });\n }\n\n componentDidUpdate(prevProps) {\n const { initialValue, readonly } = this.props;\n const { isReady } = this.state;\n\n if (prevProps.initialValue !== initialValue) {\n if (this.editor && isReady) {\n // Set editor content (replace current content).\n // https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-setData\n this.editor.setData(sanitize(initialValue, true));\n }\n }\n\n if (prevProps.readonly !== readonly && this.editor) {\n if (isReady) {\n this.editor.setReadOnly(readonly);\n } else {\n this.editor.on('instanceReady', () => {\n this.editor.setReadOnly(readonly);\n });\n }\n }\n }\n\n componentWillUnmount() {\n if (this.editor) {\n // for some reason when destroying the editor, the html that is currently present is executed.\n // This can cause nasty behavior when there is XSS in the HTML so before destroying we wanna sanitize the content\n const data = this.editor.getData();\n this.editor.setData(sanitize(data));\n\n this.editor.destroy(false);\n this.editor = null;\n }\n this.setState({ isReady: false });\n }\n\n render() {\n const { id, noToolbar, readonly } = this.props;\n\n return (\n \n
\n
\n );\n }\n}\n\nRichTextEditor.propTypes = {\n initialValue: PropTypes.string,\n onChange: PropTypes.func.isRequired,\n intl: intlShape.isRequired,\n id: PropTypes.string,\n noToolbar: PropTypes.bool,\n readonly: PropTypes.bool,\n};\n\nRichTextEditor.defaultProps = {\n initialValue: '',\n id: 'default',\n noToolbar: false,\n readonly: false,\n};\n\nexport default injectIntl(RichTextEditor);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport {\n FaFileAlt,\n FaFileWord,\n FaFileExcel,\n FaFilePowerpoint,\n FaFileArchive,\n FaFileCode,\n FaFilePdf,\n FaFileImage,\n FaFileAudio,\n FaFileVideo,\n} from 'react-icons/fa';\nimport '../../style/components/FileIcon.scss';\n\nconst MimeIcon = ({ mime }) => {\n if (mime) {\n const parts = mime.toLowerCase().split('/');\n switch (parts[0]) {\n case 'text':\n if (parts.length === 1) return ;\n switch (parts[1]) {\n case 'html':\n case 'javascript':\n case 'css':\n return ;\n default:\n return ;\n }\n case 'application':\n if (parts.length === 1) return 'fa fa-file-o fa-fw';\n if (parts[1].indexOf('json') >= 0) return ;\n if (parts[1].indexOf('pdf') >= 0) return ;\n if (parts[1].indexOf('word') >= 0) return ;\n if (parts[1].indexOf('excel') >= 0) return ;\n if (parts[1].indexOf('spreadsheet') >= 0) return ;\n if (parts[1].indexOf('powerpoint') >= 0) return ;\n if (parts[1].indexOf('zip') >= 0) return ;\n if (parts[1].indexOf('rar') >= 0) return ;\n if (parts[1].indexOf('compressed') >= 0) return ;\n if (parts[1].indexOf('xml') >= 0) return ;\n break;\n case 'image':\n return ;\n case 'audio':\n return ;\n case 'video':\n return ;\n default:\n return ;\n }\n }\n\n return ;\n};\nMimeIcon.propTypes = {\n mime: PropTypes.string,\n};\nMimeIcon.defaultProps = {\n mime: null,\n};\n\nexport default MimeIcon;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport {\n FaFileInvoiceDollar,\n FaFileSignature,\n FaFileCode,\n FaInfo,\n FaRegEnvelope,\n FaRegEye,\n FaPaperclip,\n} from 'react-icons/fa';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport TranslateService from '@/shared/services/TranslateService';\n\nimport MimeIcon from './MimeIcon';\n\nconst RegularEmailIcon = () => (\n \n);\nconst EmailAttachmentIcon = () => ;\n\nconst renderEmailIcon = document => {\n if (document.emailStatus) {\n const intl = TranslateService.getIntl();\n const statusLabel = intl.formatMessage(listItemMsg('emailstatus', document.emailStatus));\n\n // sent, but no further updates\n if (document.emailStatus === 1) {\n return (\n \n \n \n );\n }\n // delivered\n if (document.emailStatus === 2) {\n return (\n \n \n \n \n );\n }\n\n // opened\n if (document.emailStatus === 3) {\n return (\n \n \n \n \n\n \n \n );\n }\n\n // delivery failed\n if (document.emailStatus === 4) {\n return (\n \n \n \n \n );\n }\n return ;\n }\n return ;\n};\n\nconst FileIcon = props => {\n const { document } = props;\n\n if (document.documentType && document.documentType >= 0) {\n switch (document.documentType) {\n // Invoices\n case 0:\n case 4:\n case 6:\n return ;\n // Email\n case 8:\n case 23:\n return renderEmailIcon(document);\n // email attachment\n case 9:\n return ;\n // Eid\n case 10:\n return ;\n default:\n return ;\n }\n }\n\n return ;\n};\n\nFileIcon.propTypes = {\n document: PropTypes.shape({}).isRequired,\n};\n\nexport default FileIcon;\n","import React, { Component } from 'react';\nimport Modal from 'react-bootstrap/lib/Modal';\nimport { injectIntl, defineMessages } from 'react-intl';\nimport Button from './Button';\n\nconst messages = defineMessages({\n Yes: 'Yes',\n No: 'No',\n});\n\nclass YesNoModal extends Component {\n render() {\n const { title, show, onClose, onSave, onNo, disabled, intl, message } = this.props;\n\n return (\n (onClose ? onClose() : onNo())}>\n \n {title}\n \n {{message}} \n \n \n onSave()}\n disabled={disabled}\n btnClassName=\"btn-inverse\"\n showProgress\n >\n {intl.formatMessage(messages.Yes)}\n \n \n \n );\n }\n}\n\nexport default injectIntl(YesNoModal);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport {\n FaTrashAlt,\n FaShareAlt,\n FaUndo,\n FaListUl,\n FaInfoCircle,\n FaRegClock,\n FaClipboardList,\n FaIdBadge,\n FaRegCopy,\n FaPlus,\n FaExternalLinkAlt,\n FaThumbtack,\n FaSave,\n FaCloudDownloadAlt,\n FaTree,\n FaTag,\n FaStream,\n FaUserAlt,\n FaRegWindowRestore,\n FaFileAlt,\n FaEye,\n FaUserFriends,\n FaRegStar,\n FaStar,\n FaBookmark,\n FaRegBookmark,\n FaEnvelope,\n FaPhone,\n FaExchangeAlt,\n FaRegUser,\n FaRegFolderOpen,\n FaRegCommentAlt,\n FaPaperPlane,\n FaHistory,\n FaIndustry,\n FaBriefcase,\n FaUser,\n FaFilePdf,\n FaPaperclip,\n FaLink\n} from 'react-icons/fa';\n\nimport { TiArrowLeftThick, TiArrowRightThick, TiMessages, TiMessage } from 'react-icons/ti';\nimport { injectIntl, defineMessages } from 'react-intl';\nimport classNames from 'classnames';\n\nconst messages = defineMessages({\n Ok: 'Ok',\n Cancel: 'Cancel',\n Delete: 'Delete',\n Restore: 'Restore',\n Copy: 'Copy',\n Add: 'Add',\n Save: 'Save',\n Edit: 'Edit',\n Download: 'Download',\n Replace: 'Replace',\n Browse: 'Browse',\n History: 'History',\n});\n\nconst IconPencil = injectIntl(({ className, tooltip, intl, ...rest }) => (\n \n));\n\nconst IconWarningSign = ({ className, ...rest }) => (\n \n);\nIconWarningSign.propTypes = {\n className: PropTypes.string,\n};\nIconWarningSign.defaultProps = {\n className: '',\n};\n\nconst DeleteIcon = injectIntl(({ intl, tooltip, ...rest }) => (\n \n \n \n));\nconst HistoryIcon = injectIntl(({ intl, tooltip, ...rest }) => (\n \n \n \n));\nconst PaperPlaneIcon = injectIntl(({ intl, tooltip, ...rest }) => (\n \n \n \n));\n\nconst FolderOpenIcon = injectIntl(({ intl, tooltip, ...rest }) => (\n \n \n \n));\nconst LeftArrowIcon = ({ ...rest }) => (\n \n \n \n);\nconst RightArrowIcon = ({ ...rest }) => (\n \n \n \n);\n\nconst UndoIcon = injectIntl(({ intl, tooltip, ...rest }) => (\n \n \n \n));\nconst SaveIcon = injectIntl(({ intl, tooltip, ...rest }) => (\n \n \n \n));\n\nconst ListIcon = injectIntl(({ intl, tooltip, ...rest }) => (\n \n \n \n));\n\nconst InfoCircleIcon = injectIntl(({ intl, tooltip, ...rest }) => (\n \n \n \n));\nconst CommentIcon = injectIntl(({ intl, tooltip, ...rest }) => (\n \n \n \n));\nconst PaperclipIcon = injectIntl(({ intl, tooltip, ...rest }) => (\n \n \n \n));\n\nconst ClockIcon = injectIntl(({ intl, tooltip, disabled, clickable, className, ...rest }) => (\n \n \n \n));\n\nconst MainTaskIcon = injectIntl(({ intl, tooltip, ...rest }) => (\n \n \n \n));\n\nconst SubTaskIcon = injectIntl(({ intl, tooltip, ...rest }) => (\n \n \n \n));\n\nconst ToDoIcon = injectIntl(({ intl, tooltip, className, ...rest }) => (\n \n \n \n));\n\nconst CopyIcon = injectIntl(({ intl, tooltip, ...rest }) => (\n \n \n \n));\nconst DownloadIcon = injectIntl(({ intl, tooltip, ...rest }) => (\n \n \n \n));\nconst LinkIcon = injectIntl(({ intl, tooltip, disabled, ...rest }) => (\n \n \n \n));\nconst UrlIcon = injectIntl(({ intl, tooltip, disabled, ...rest }) => (\n \n \n \n));\nconst WindowIcon = injectIntl(({ intl, tooltip, disabled, ...rest }) => (\n \n \n \n));\n\nconst AddIcon = injectIntl(({ intl, tooltip, ...rest }) => (\n \n \n \n));\nconst TreeIcon = injectIntl(({ intl, tooltip, ...rest }) => (\n \n \n \n));\nconst TagIcon = injectIntl(({ intl, tooltip, ...rest }) => (\n \n \n \n));\nconst FolderIcon = injectIntl(({ intl, tooltip, ...rest }) => (\n \n \n \n));\nconst UserIcon = injectIntl(({ intl, tooltip, ...rest }) => (\n \n \n \n));\nconst DocumentIcon = injectIntl(({ intl, tooltip, ...rest }) => (\n \n \n \n));\n\nconst EyeIcon = injectIntl(({ intl, tooltip, ...rest }) => (\n \n \n \n));\n\nconst PersonsIcon = injectIntl(({ intl, tooltip, ...rest }) => (\n \n \n \n));\nconst EmptyStarIcon = injectIntl(({ intl, tooltip, ...rest }) => (\n \n \n \n));\n\nconst StarIcon = injectIntl(({ intl, tooltip, ...rest }) => (\n \n \n \n));\nconst BookmarkIcon = injectIntl(({ intl, tooltip, ...rest }) => (\n \n \n \n));\nconst EmptyBookmarkIcon = injectIntl(({ intl, tooltip, ...rest }) => (\n \n \n \n));\n\nconst PhoneIcon = injectIntl(({ intl, tooltip, ...rest }) => (\n \n \n \n));\n\nconst NoteIcon = injectIntl(({ intl, tooltip, ...rest }) => (\n \n \n \n));\nconst AppointmentIcon = injectIntl(({ intl, tooltip, ...rest }) => (\n \n \n \n));\nconst MailIcon = injectIntl(({ intl, tooltip, color, ...rest }) => (\n \n \n \n));\nconst EnvelopeIcon = injectIntl(({ intl, tooltip, ...rest }) => (\n \n \n \n));\n\nconst UserCircleIcon = injectIntl(({ intl, tooltip, ...rest }) => (\n \n \n \n));\nconst ReplaceIcon = injectIntl(({ intl, tooltip, ...rest }) => (\n \n \n \n));\nconst SpinnerIcon = () => ;\n\nconst ShareIcon = injectIntl(({ intl, tooltip, clickable, disabled, ...rest }) => (\n \n \n \n));\n\nconst PdfIcon = injectIntl(({ intl, tooltip, className, clickable, disabled, ...rest }) => (\n \n \n \n));\n\nexport const IndustryIcon = ({ ...rest }) => (\n \n \n \n);\n\nexport const BriefcaseIcon = ({ ...rest }) => (\n \n \n \n);\n\nexport const UserFaIcon = ({ ...rest }) => (\n \n \n \n);\n\nexport {\n UserCircleIcon,\n EnvelopeIcon,\n IconPencil,\n IconWarningSign,\n DeleteIcon,\n UndoIcon,\n ListIcon,\n InfoCircleIcon,\n CommentIcon,\n MainTaskIcon,\n SubTaskIcon,\n ClockIcon,\n CopyIcon,\n AddIcon,\n LinkIcon,\n ToDoIcon,\n SaveIcon,\n DownloadIcon,\n LeftArrowIcon,\n RightArrowIcon,\n TreeIcon,\n TagIcon,\n FolderIcon,\n UserIcon,\n WindowIcon,\n DocumentIcon,\n EyeIcon,\n PersonsIcon,\n EmptyStarIcon,\n StarIcon,\n BookmarkIcon,\n EmptyBookmarkIcon,\n PhoneIcon,\n NoteIcon,\n AppointmentIcon,\n MailIcon,\n ReplaceIcon,\n SpinnerIcon,\n PaperclipIcon,\n FolderOpenIcon,\n ShareIcon,\n PaperPlaneIcon,\n HistoryIcon,\n PdfIcon,\n UrlIcon\n};\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport DocumentService from '@/shared/services/DocumentService';\nimport { defineMessages, injectIntl, useIntl } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport classNames from 'classnames';\nimport YesNoModal from '@/shared/components/YesNoModal';\n\nimport FileIcon from './FileIcon';\nimport { DeleteIcon } from './Icons';\nimport { CanDelete } from './security';\nimport AuthService from '../services/AuthService';\n\nconst messages = defineMessages({\n DeleteAttachment: 'Delete attachment',\n Delete: 'Delete',\n DeleteAttachmentConfirmationMsg: 'Are you sure you want to delete this attachment?',\n});\n\nclass InlineAttachment extends Component {\n state = { showDeleteModal: false };\n constructor(props) {\n super(props);\n this.canDownload = AuthService.hasPermission({ functionality: 'Documents', privilege: 'Read' });\n }\n\n render() {\n const {\n attachment,\n onDelete,\n noDownload,\n intl,\n className,\n showDeleteConfirmation,\n } = this.props;\n const { showDeleteModal } = this.state;\n\n if (attachment) {\n return (\n \n {showDeleteModal && (\n \n this.setState(state => ({\n ...state,\n showDeleteModal: false,\n }))\n }\n onSave={() => onDelete(attachment)}\n />\n )}\n \n \n {!noDownload && this.canDownload && attachment.id ? (\n // eslint-disable-next-line no-script-url\n DocumentService.download(attachment.id)}>\n \n {attachment.name}\n \n \n ) : (\n \n {attachment.name}\n \n )}\n \n {onDelete &&\n (\n \n showDeleteConfirmation\n ? this.setState({ showDeleteModal: true })\n : onDelete(attachment)\n }\n tooltip={intl.formatMessage(messages.DeleteAttachment)}\n />\n )}\n \n \n );\n }\n }\n}\n\nInlineAttachment.propTypes = {\n attachment: PropTypes.shape({\n id: PropTypes.string,\n scanStatus: PropTypes.number,\n name: PropTypes.string,\n documentType: PropTypes.number,\n }).isRequired,\n onDelete: PropTypes.func,\n noDownload: PropTypes.bool,\n intl: intlShape.isRequired,\n showDeleteConfirmation: PropTypes.bool,\n};\n\nInlineAttachment.defaultProps = {\n onDelete: null,\n noDownload: false,\n showDeleteConfirmation: true,\n};\n\nexport default injectIntl(InlineAttachment);\n","import moment from 'moment';\nimport dataCacheService from './DataCacheService';\n\nclass DateFormatService {\n tenantConfiguration;\n\n constructor() {\n this.tenantConfiguration = dataCacheService.getTenantConfiguration();\n }\n\n dateFormat = () => this.correctFormatForConfiguration('DD/MM/yyyy');\n dateWithTimeFormat = () => this.correctFormatForConfiguration('DD/MM/yyyy HH:mm');\n dateDayMonthFormat = () => this.correctFormatForConfiguration('DD/MM');\n dateLongFormat = () => this.correctFormatForConfiguration('DD/MM/yyyy');\n\n formatDate = input => this.format(input, this.dateFormat());\n formatDateWithTime = input => this.format(input, this.dateWithTimeFormat());\n formatDayMonth = input => this.format(input, this.dateDayMonthFormat());\n formatDateLong = input => this.format(input, this.dateLongFormat());\n format = (input, format) => {\n if (!input) return input;\n\n if (input instanceof moment) return input.format(format);\n\n return moment(input).format(format);\n };\n\n correctFormatForConfiguration(format) {\n const delimiter = this.delimiter();\n return format.toString().replaceAll('/', delimiter);\n }\n\n delimiter() {\n if (this.tenantConfiguration === false)\n this.tenantConfiguration = dataCacheService.getTenantConfiguration();\n return this.tenantConfiguration === 5 ? '-' : '/';\n }\n}\n\nconst dateFormatService = new DateFormatService();\nexport default dateFormatService;\n","// https://github.com/airbnb/react-dates/blob/master/src/components/SingleDatePicker.jsx\n\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport moment from 'moment';\n\nimport { SingleDatePicker } from 'react-dates';\nimport dateFormatService from '../../services/DateFormatService';\n\nconst returnYears = () => {\n const years = [];\n for (let i = moment().year() - 5; i <= moment().year() + 5; i++) {\n years.push();\n }\n return years;\n};\n\nconst renderMonthElement = ({ month, onMonthSelect, onYearSelect }) => (\n
\n
\n onMonthSelect(month, e.target.value)}\n >\n {moment.months().map((label, value) => (\n \n ))}\n \n
\n
\n onYearSelect(month, e.target.value)}\n >\n {returnYears()}\n \n
\n
\n);\n\nclass DatePicker extends Component {\n internalOnDateChange = (date, onDateChange) => {\n const inputValue = document.getElementById(this.props.id)?.value;\n if (inputValue) {\n const parsedInputValue = moment(inputValue, dateFormatService.dateFormat(), true);\n const isDateValid = parsedInputValue.isValid() === true;\n onDateChange(date, isDateValid);\n } else {\n onDateChange(date, true);\n }\n };\n\n render() {\n const { phrases, numberOfMonths, onDateChange, ...rest } = this.props;\n return (\n this.internalOnDateChange(date, onDateChange)}\n hideKeyboardShortcutsPanel\n renderMonthElement={renderMonthElement} // this method adds a dropdown for both month and year, so that the user doesnt have to navigate to previous years using the arrows\n displayFormat={dateFormatService.dateFormat()} // hardcoded for now, since the EN-culture changes the date format to MM/DD/YYYY and this is not wanted behavior in South-African tenants\n {...rest}\n />\n );\n }\n}\n\nDatePicker.propTypes = {\n numberOfMonths: PropTypes.number,\n phrases: PropTypes.shape({}),\n};\nDatePicker.defaultProps = {\n phrases: {},\n numberOfMonths: 1,\n};\n\nexport default DatePicker;\n","import moment from 'moment';\n\nexport const minimumMoment = moment.utc([1900, 0, 1]); // 1900-1-1\nexport const minimumDate = minimumMoment.toDate();\n/**\n * Validator function\n *\n * @callback validatorFunction\n * @param {any} date The date to check\n * @returns {boolean} IsValid\n */\n\n/**\n * @function validateMinimum\n * @type {validatorFunction}\n */\nexport const validateMinimumDate = date => {\n if (!date) return true; // Required should be checked separately\n if (!moment.isMoment(date)) return false;\n return moment(date).isSameOrAfter(minimumMoment, 'day');\n};\n\nexport const validateRequired = value => typeof value !== 'undefined' && value !== null;\n\n// Use as isOutsideRange attribute in react datepicker control\nexport const isBeforeMinimum = date => {\n if (!moment.isMoment(date)) return false;\n return moment(date).isBefore(minimumMoment, 'day');\n};\n\nexport const isBeforeToday = date => {\n if (!moment.isMoment(date)) return false;\n return moment(date).isBefore(moment.utc(), 'day');\n};\nexport const isBeforeTomorrow = date => {\n if (!moment.isMoment(date)) return false;\n return moment(date).isBefore(moment.utc().add(1, 'days'), 'day');\n};\nexport const isBeforeLastYear = date => {\n if (!moment.isMoment(date)) return false;\n return moment(date).isBefore(moment.utc().add(-1, 'year'), 'day');\n};\nexport const isBefore = (date, endDate) => {\n if (!moment.isMoment(date)) return false;\n if (!moment.isMoment(endDate)) return false;\n return moment(date).isBefore(endDate, 'day');\n};\nexport const validateDateRange = (\n startDate,\n endDate,\n startRequired = false,\n endRequired = false,\n) => {\n if (startRequired && (!startDate || !moment.isMoment(startDate))) return false;\n if (endRequired && (!endDate || !moment.isMoment(endDate))) return false;\n if (isBeforeMinimum(startDate)) return false;\n if (isBeforeMinimum(endDate)) return false;\n if (startDate && endDate && moment(endDate).isBefore(moment(startDate), 'd')) return false;\n return true;\n};\nexport const isInRange = (date, rangeStart, rangeEnd, required = false) => {\n if (!date || !moment.isMoment(date)) return !required;\n if (isBefore(date, rangeStart)) return false;\n if (isBefore(rangeEnd, date)) return false;\n return true;\n};\nexport const isOutRange = (date, rangeStart, rangeEnd, required = false) =>\n !isInRange(date, rangeStart, rangeEnd, required);\n\nexport const validateEndDate = (endDate, startDate = null, required = false) =>\n validateDateRange(startDate, endDate, false, required);\n\n// /**\n// * Validate multiple validator functions\n// * @function validateAll\n// * @param {...validatorFunction} functions\n// * @returns {boolean} IsValid\n// */\n// export const validateAll = (...functions) => date => !functions.some(x => !x(date));\n\nexport const falseFunc = () => false;\n\nexport const isNullOrUndefined = value => {\n if (typeof value === 'undefined') return true;\n if (value === null) return true;\n return false;\n};\nexport const isValidNumber = value => {\n if (isNullOrUndefined(value)) return false;\n return !Number.isNaN(value);\n};\n\nconst emptyHtml =\n '\\n\\n\\t\\n\\n\\n\\n';\nexport const isEmptyHtmlField = value => {\n if (!value) return true;\n if (value === emptyHtml) return true;\n return false;\n};\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\n\nexport const getRelationIconClass = (type, crm = 3, isActive = true) => {\n if (crm === 4 && isActive) return 'fa rel-type-icon fa-building';\n if (crm === 4 && !isActive) return 'fa rel-type-icon fa-building text-danger';\n\n return classNames('fa rel-type-icon', {\n 'fa-industry': type === 0,\n 'fa-briefcase': type === 1,\n 'fa-user': type === 2,\n 'text-danger': !isActive,\n });\n};\n\nconst RelationTypeIcon = ({ type, crm, isActive, className, ...rest }) => (\n \n);\n\nRelationTypeIcon.propTypes = {\n type: PropTypes.number.isRequired,\n crm: PropTypes.number,\n isActive: PropTypes.bool,\n className: PropTypes.string,\n};\nRelationTypeIcon.defaultProps = {\n crm: undefined,\n isActive: undefined,\n className: undefined,\n};\n\nexport default React.memo(RelationTypeIcon);\n","import React, { useContext } from 'react';\nimport PropTypes from 'prop-types';\n\nexport const StateServiceContext = React.createContext(null);\n\nclass StateService {\n $state = null;\n\n constructor($state) {\n this.$state = $state;\n }\n\n gotoRelation(relationId, { gotoField = null } = {}) {\n if (!this.$state) {\n console.warn('$state not initilized');\n return;\n }\n this.$state.go('relations.detail', { relId: relationId, gotoField }, { reload: true });\n }\n\n gotoRelationHref(relationId) {\n if (!this.$state) {\n console.warn('$state not initilized');\n return;\n }\n return this.$state.href('relations.detail', { relId: relationId });\n }\n\n goToEmailTemplates() {\n if (!this.$state) {\n console.warn('$state not initilized');\n return;\n }\n this.$state.go('settings.templates.list', { reload: true });\n }\n\n gotoTaskboard({\n relation = null,\n invoiceStreamId = null,\n taskTemplateId = null,\n plannedTaskId = null,\n openPlannedTaskDetailModal = false,\n kpi = null,\n userId = null,\n onlySubtasksForAssignedUser = null,\n userIsNextAssignedUser = null,\n deadlineFrom = null,\n deadlineUntil = null,\n } = {}) {\n if (!this.$state) {\n console.warn('$state not initilized');\n return;\n }\n this.$state.go(\n 'taskflow.taskboard',\n {\n relation,\n invoiceStreamId: invoiceStreamId || (relation && relation.invoiceStreamId),\n taskTemplateId,\n plannedTaskId,\n openPlannedTaskDetailModal,\n kpi,\n userId,\n onlySubtasksForAssignedUser,\n userIsNextAssignedUser,\n deadlineFrom,\n deadlineUntil,\n },\n { reload: true },\n );\n }\n\n gotoTaskOverview(filters = null) {\n if (!this.$state) {\n console.warn('$state not initilized');\n return;\n }\n this.$state.go(\n 'taskflow.overview',\n {\n filters,\n },\n { reload: true },\n );\n }\n\n goToNewRelation() {\n if (!this.$state) {\n console.warn('$state not initilized');\n return;\n }\n this.$state.go('relations.new', { reload: true });\n }\n\n gotoJob(id) {\n if (!this.$state) {\n console.warn('$state not initilized');\n return;\n }\n\n this.$state.go('jobs.detail', { jobId: id });\n }\n\n goToJobOverview() {\n if (!this.$state) {\n console.warn('$state not initilized');\n return;\n }\n\n this.$state.go('jobs.overview');\n }\n\n gotoDocuments({ tags = null, relationId = null } = {}) {\n if (!this.$state) {\n console.warn('$state not initilized');\n return;\n }\n\n this.$state.go('documents', { tags, relationId });\n }\n\n gotoRegistrationOverview({\n period = null,\n relation = null,\n filters = null,\n finalInvoiceStreamId = null,\n userId = null, // use empty guid to force combo to all\n dateFrom = null, // Set period to 'all' when using custom date filters\n dateUntil = null,\n resourceId = null,\n } = {}) {\n if (!this.$state) {\n console.warn('$state not initilized');\n return;\n }\n\n this.$state.go('registrations.overview', {\n period,\n relation,\n filters,\n finalInvoiceStreamId,\n userId,\n dateFrom,\n dateUntil,\n resourceId,\n });\n }\n\n gotoDraftInvoices({ relation = null, invoiceId = null } = {}) {\n if (!this.$state) {\n console.warn('$state not initilized');\n return;\n }\n\n this.$state.go('invoicing.draft', { relation, invoiceId });\n }\n\n gotoInvoiceOverview({\n relationId = null,\n relation = null,\n invoiceId = null,\n filterType = null,\n } = {}) {\n if (!this.$state) {\n console.warn('$state not initilized');\n return;\n }\n\n this.$state.go('invoicing.overview', { relationId, relation, invoiceId, filterType });\n }\n\n // Generic goto state without helpers for parameters\n gotoState(stateName, params = {}) {\n if (!this.$state) {\n console.warn('$state not initilized');\n return;\n }\n\n this.$state.go(stateName, params);\n }\n\n getStateUrl(stateName, params = {}) {\n if (!this.$state) {\n console.warn('$state not initilized');\n return;\n }\n\n return this.$state.href(stateName, params);\n }\n\n goToInteractions(relationId, openMailModal) {\n if (!this.$state) {\n console.warn('$state not initilized');\n return;\n }\n if (!relationId) {\n console.warn('relationId not passed through');\n return;\n }\n\n this.$state.go('interactions', { relationId, openMailModal });\n }\n\n gotoRelationOverview({ tags = null, relationGroups = null }) {\n if (!this.$state) {\n console.warn('$state not initilized');\n return;\n }\n\n this.$state.go('relations.overview', {\n tags,\n relationGroups,\n });\n }\n}\n\nconst withAngularState = WrappedComponent => ({ $state, ...passThroughProps }) => {\n const service = new StateService($state);\n return (\n \n \n \n );\n};\n\nconst injectStateService = WrappedComponent => props => (\n \n {service => }\n \n);\nexport const useStateService = () => {\n const ctx = useContext(StateServiceContext);\n if (!ctx) {\n throw new Error('Wrap app with StateServiceContext');\n }\n return ctx;\n};\n\nconst stateServicePropType = PropTypes.instanceOf(StateService);\n\nexport { withAngularState, injectStateService, StateService, stateServicePropType };\n\nexport default { withAngularState, injectStateService, StateService, stateServicePropType };\n","import React, { memo } from 'react';\nimport PropTypes from 'prop-types';\nimport { injectIntl, defineMessages } from 'react-intl';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport intlShape from '@/shared/utils/intlShape';\nimport RelationTypeIcon from './RelationTypeIcon';\nimport { injectStateService, StateService } from '../services/StateService';\nimport FormattedListValue, { listItemMsg } from './FormattedListValue';\nimport AuthService from '../services/AuthService';\nimport { mapInvoiceStreamName } from '../services/ObjectDisplayService';\n\nconst messages = defineMessages({\n GoToRelation: 'Go to relation',\n DeleteRelation: 'Delete relation',\n});\n\nexport const getNLSolePropAlias = relation => {\n if (!relation || AuthService.tenantConfiguration() !== 5) return null;\n\n if (!relation.type === 1 && relation.title !== 245) return null; // Relation type sole prop or legal form eenmanszaak\n return relation.alias || null;\n};\n\nexport const getRelationName = (intl, relation) => {\n if (!intl || !intl.formatMessage || !relation || !relation.name) return null;\n\n const lastName = relation.infix ? `${relation.infix} ${relation.name}` : `${relation.name}`;\n const name = relation.firstName ? `${lastName} ${relation.firstName}` : relation.name;\n\n // if DisplayName is filled in, the call comes from Monolyth, if it comes from the microservices, DisplayName will be empty, but Name is filled with value of DisplayName by RelationChangedEventModel\n const displayName = relation.displayName !== undefined ? relation.displayName : name;\n\n if (!relation.title || relation.title === '0') return displayName;\n const isPerson = relation.type !== 0;\n\n const titleType = isPerson ? 'salutation' : 'legalForm';\n const dataCache = DataCacheService.getDataCache();\n if (!dataCache || !dataCache[`${titleType}Object`]) return displayName; // Cache not ready\n\n const title = dataCache[`${titleType}Object`][relation.title];\n if (!title) return displayName;\n if (isPerson && !title.show) return displayName;\n if (!isPerson && !title.appendLegalFormToName) return displayName;\n const translatedTitle = intl.formatMessage(\n listItemMsg(titleType, relation.title, title.description || ''),\n );\n return isPerson\n ? `${translatedTitle} ${displayName}`.trim()\n : `${displayName} ${translatedTitle}`.trim();\n};\nexport const getRelationNameMapper = intl => relation => getRelationName(intl, relation);\n\nexport const getRelationNameCode = (intl, relation) => {\n if (!intl || !intl.formatMessage || !relation || !relation.name) return null;\n\n const relationName = getRelationName(intl, relation);\n if (!relation.customerCode) {\n return `${relationName} | ${relation.uniqueIdentifier}`;\n }\n\n return `${relationName} | ${relation.customerCode}`;\n};\nconst RelationName = ({\n intl,\n relation,\n stateService,\n enabled,\n tabIndex,\n onDeleteRelation,\n assignment,\n defaultAssignmentName,\n}) => {\n if (relation === null) return null;\n const handleClick = e => {\n if (e.ctrlKey) return;\n stateService.gotoRelation(relation.id);\n e.preventDefault();\n };\n const relationName = relation ? getRelationName(intl, relation) : null;\n const assignmentName = assignment\n ? mapInvoiceStreamName(assignment, intl, defaultAssignmentName)\n : null;\n\n const fullName = assignmentName ? `${relationName} - ${assignmentName}` : relationName;\n\n return enabled ? (\n \n \n \n  \n {fullName}\n \n {onDeleteRelation && (\n onDeleteRelation(relation.id)}\n title={intl.formatMessage(messages.DeleteRelation)}\n className=\"fa fa-trash-o margin5L clickable bold\"\n />\n )}\n \n ) : (\n \n \n  \n {fullName}\n \n );\n};\n\nRelationName.propTypes = {\n intl: intlShape.isRequired,\n tabIndex: PropTypes.number,\n stateService: PropTypes.instanceOf(StateService).isRequired,\n enabled: PropTypes.bool,\n relation: PropTypes.shape({\n id: PropTypes.string.isRequired,\n type: PropTypes.number.isRequired,\n name: PropTypes.string.isRequired,\n infix: PropTypes.string,\n firstName: PropTypes.string,\n alias: PropTypes.string,\n crm: PropTypes.number,\n isActive: PropTypes.bool,\n }),\n assignment: PropTypes.shape({\n assignmentId: PropTypes.string,\n assignmentName: PropTypes.string,\n assignmentTemplateId: PropTypes.string,\n }),\n defaultAssignmentName: PropTypes.string,\n onDeleteRelation: PropTypes.func,\n};\n\nRelationName.defaultProps = {\n relation: null,\n enabled: true,\n tabIndex: null,\n onDeleteRelation: null,\n assignment: null,\n defaultAssignmentName: '',\n};\n\nexport default injectStateService(injectIntl(memo(RelationName)));\n","let recentRelations;\n\nexport const filterRelations = (relations, searchOptions) => {\n if (!relations) return relations;\n if (!searchOptions) return relations;\n const options = {\n take: 20,\n includeInactive: false,\n crmTypes: [],\n type: null,\n ...searchOptions,\n };\n\n return relations.filter(x => {\n if (typeof x.isActive !== 'undefined' && !x.isActive && !options.includeInactive) return false;\n if (\n options.crmTypes &&\n options.crmTypes.length > 0 &&\n typeof x.crm !== 'undefined' &&\n options.crmTypes.indexOf(x.crm) === -1\n )\n return false;\n\n if (\n options.type &&\n options.type.length > 0 &&\n typeof x.type !== 'undefined' &&\n options.type.indexOf(x.type) === -1\n )\n return false;\n\n return true;\n });\n};\n\nexport default {\n get: () => recentRelations,\n getFiltered: options => filterRelations(recentRelations, options),\n set(data) {\n recentRelations = data || [];\n },\n};\n","import React, { Component } from 'react';\nimport { defineMessages, injectIntl, useIntl } from 'react-intl';\nimport PropTypes from 'prop-types';\n\nimport intlShape from '@/shared/utils/intlShape';\nimport RelationTypeIcon from '@/shared/components/RelationTypeIcon';\nimport { getRelationNameMapper } from '@/shared/components/RelationName';\nimport RecentRelationsService from '@/shared/services/RecentRelationsService';\nimport AutoComplete from './select/AutoComplete';\nimport config from '../../../config';\nimport api from '../../api';\n\nconst messages = defineMessages({\n SearchRelation: 'Search relation',\n});\n\nclass RelationSearch extends Component {\n state = {\n initialRelation: null,\n retrievingRelation: false,\n };\n\n constructor(props) {\n super(props);\n this.nameMapper = getRelationNameMapper(props.intl);\n }\n\n mapRelation = item => {\n if (!this.nameMapper) return; // Probably unmounted\n return {\n key: item.id,\n label: this.nameMapper(item),\n ...item,\n };\n };\n searchRelations = searchValue => {\n const { includeInactive, types, crmTypes, take } = this.props;\n const params = {\n searchValue,\n take,\n includeInactive,\n };\n\n if (types && types.length) params.type = types;\n if (crmTypes && crmTypes.length) params.crmTypes = crmTypes;\n if (!searchValue)\n return Promise.resolve(\n (RecentRelationsService.getFiltered(params) || []).map(this.mapRelation),\n );\n\n const endpoint = `${config.appUrls.api}/api/relation/names`;\n\n return api.base.get(endpoint, { params }).then(result => result.data.map(this.mapRelation));\n };\n\n componentDidUpdate(prevProps) {\n const { initialSelectedItem } = this.props;\n if (JSON.stringify(prevProps.initialSelectedItem) !== JSON.stringify(initialSelectedItem)) {\n this.setRelationStateFromInitialItem(initialSelectedItem);\n }\n }\n\n componentDidMount() {\n const { initialSelectedItem } = this.props;\n\n this.setRelationStateFromInitialItem(initialSelectedItem);\n }\n\n componentWillUnmount() {\n this.nameMapper = null;\n }\n\n setRelationStateFromInitialItem(initialSelectedItem) {\n if (initialSelectedItem && initialSelectedItem.key) {\n if (!initialSelectedItem.label) {\n this.setState({ retrievingRelation: true }, () => {\n api.base\n .post(`${config.appUrls.api}/api/relation/names`, [initialSelectedItem.key])\n .then(({ data }) => {\n const [relation] = data;\n const { changeOnInit, onChange } = this.props;\n const initialRelation = { ...initialSelectedItem, ...this.mapRelation(relation) };\n this.setState({\n initialRelation,\n retrievingRelation: false,\n });\n if (changeOnInit) {\n onChange(initialRelation);\n }\n });\n });\n } else {\n this.setState({\n initialRelation: initialSelectedItem,\n retrievingRelation: false,\n });\n }\n } else if (initialSelectedItem && initialSelectedItem.id && initialSelectedItem.name) {\n // Relation object\n this.setState({\n initialRelation: this.mapRelation(initialSelectedItem),\n retrievingRelation: false,\n });\n } else {\n this.setState({\n initialRelation: null,\n retrievingRelation: false,\n });\n }\n }\n\n onRelationChanged = relation => {\n if (relation === undefined) return;\n const { onChange } = this.props;\n if (relation === null) {\n onChange(null);\n return;\n }\n if (relation.invoiceStreamId) {\n onChange(relation);\n return;\n }\n // Recent relation selected -> retrieve extra info\n return api.base\n .post(`${config.appUrls.api}/api/relation/Names`, [relation.id])\n .then(({ data: [rel] }) => {\n if (rel) onChange(this.mapRelation(rel));\n });\n };\n\n render() {\n const { placeholder, intl, disabled, emptyLabel, autoFocus, small } = this.props;\n const { initialRelation, retrievingRelation } = this.state;\n return (\n !retrievingRelation && ( // Wait for initialRelation to be initialized (name lookup)\n this.searchRelations(searchValue)}\n loadOnInit\n placeholder={placeholder || intl.formatMessage(messages.SearchRelation)}\n onChange={item => this.onRelationChanged(item)}\n disabled={disabled}\n emptyLabel={emptyLabel}\n mode=\"edit\"\n initialSelectedItem={initialRelation}\n showAll\n autoFocus={autoFocus}\n isSmall={small}\n renderItem={item => (\n \n \n {item.label} {item.alias && item.alias !== item.label && ` (${item.alias})`}\n \n )}\n />\n )\n );\n }\n\n static propTypes = {\n placeholder: PropTypes.string,\n includeInactive: PropTypes.bool,\n types: PropTypes.arrayOf(PropTypes.number),\n crmTypes: PropTypes.arrayOf(PropTypes.number),\n take: PropTypes.number,\n intl: intlShape.isRequired,\n\n onChange: PropTypes.func.isRequired,\n disabled: PropTypes.bool,\n emptyLabel: PropTypes.string,\n initialSelectedItem: PropTypes.oneOfType([\n PropTypes.shape({\n key: PropTypes.string.isRequired,\n label: PropTypes.string,\n }),\n PropTypes.shape({ id: PropTypes.string.isRequired, name: PropTypes.string.isRequired }),\n ]),\n changeOnInit: PropTypes.bool, // Trigger onchange after retrieving relation name\n autoFocus: PropTypes.bool,\n small: PropTypes.bool,\n };\n\n static defaultProps = {\n placeholder: null,\n includeInactive: false,\n types: [],\n crmTypes: [],\n take: 15,\n disabled: false,\n emptyLabel: null,\n initialSelectedItem: null,\n changeOnInit: false,\n autoFocus: false,\n small:false,\n };\n}\n\nexport default injectIntl(RelationSearch);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { defineMessages, injectIntl, useIntl } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport classnames from 'classnames';\n\nconst ENTER_KEY = 13;\nconst messages = defineMessages({\n Clear: 'Clear',\n});\n\nclass TextSearch extends Component {\n state = {\n value: '',\n };\n static propTypes = {\n delay: PropTypes.number,\n value: PropTypes.string,\n type: PropTypes.string,\n onChange: PropTypes.func.isRequired,\n intl: intlShape.isRequired,\n };\n static defaultProps = {\n delay: 1000,\n value: '',\n type: 'search',\n };\n\n constructor(props) {\n super(props);\n this.state.value = props.value || '';\n }\n\n timer = null;\n\n handleChange = e => {\n const { delay } = this.props;\n\n clearTimeout(this.timer);\n\n this.setState({ value: e.target.value });\n\n this.timer = setTimeout(this.triggerChange, delay);\n };\n\n handleClear = () => {\n const { onChange } = this.props;\n clearTimeout(this.timer);\n this.setState({ value: '' });\n onChange('');\n if (this.inputRef) this.inputRef.focus();\n };\n\n handleKeyDown = e => {\n if (e.keyCode === ENTER_KEY) {\n clearTimeout(this.timer);\n this.triggerChange();\n }\n };\n\n triggerChange = () => {\n const { value } = this.state;\n const { onChange } = this.props;\n onChange(value);\n };\n\n componentDidUpdate({ value: oldValue }) {\n const { value: newValue } = this.props;\n const { value: stateValue } = this.state;\n if (oldValue !== newValue && newValue !== stateValue) {\n clearTimeout(this.timer);\n // eslint-disable-next-line react/no-did-update-set-state\n this.setState({ value: newValue || '' });\n }\n }\n\n renderInput() {\n const { type, onChange, value: _, ...rest } = this.props;\n const { value } = this.state;\n\n return (\n {\n this.inputRef = ref;\n }}\n data-1p-ignore\n />\n );\n }\n\n render() {\n const { intl } = this.props;\n const { value } = this.state;\n return (\n
\n {this.renderInput()}\n {value && (\n \n \n \n \n \n )}\n
\n );\n }\n}\n\nexport default injectIntl(TextSearch);\n","const getDragValue = (e, format) => {\n try {\n if (!e || !e.dataTransfer || !e.dataTransfer.types) return null;\n for (let i = 0; i < e.dataTransfer.types.length; i += 1) {\n if (e.dataTransfer.types[i].toLowerCase() === format.toLowerCase())\n return e.dataTransfer.getData(e.dataTransfer.types[i]);\n }\n return null;\n } catch (ex) {\n return null;\n }\n};\nconst containsDragFormat = (e, format) => {\n if (!e || !e.dataTransfer || !e.dataTransfer.types) return false;\n for (let i = 0; i < e.dataTransfer.types.length; i += 1) {\n if (e.dataTransfer.types[i].toLowerCase() === format.toLowerCase()) return true;\n }\n return false;\n};\n\nexport { getDragValue, containsDragFormat };\n","import { ApplicationInsights } from '@microsoft/applicationinsights-web';\n\nlet appInsights = null;\nconst dontTrackUrls = [\n 'signalr',\n 'zendesk',\n 'zdassets',\n 'amazonaws',\n 'well-known',\n 'getbeamer',\n 'sockjs-node',\n 'inlinemanual',\n 'google-analytics',\n 'maps.googleapis',\n '.tpl.html',\n 'ps/api/event',\n];\n\nconst doNothing = () => {};\nconst fallback = {\n trackEvent: doNothing,\n trackPageView: doNothing,\n trackPageViewPerformance: doNothing,\n trackException: doNothing,\n trackTrace: doNothing,\n trackMetric: doNothing,\n startTrackPage: doNothing,\n stopTrackPage: doNothing,\n startTrackEvent: doNothing,\n stopTrackEvent: doNothing,\n};\nconst getter = () => appInsights || fallback;\n/**\n React usage:\n import appInsights from '@/appInsights';\n appInsights().trackEvent({name:\"EventName\"});\n */\nexport default getter;\n\nexport const initAppInsights = (key, user) => {\n const { GroupSid: tenantId, Sid: userId } = user.profile;\n\n if (!key) {\n appInsights = null;\n return appInsights;\n }\n\n if (appInsights) {\n console.warn('AppInsights already initialized');\n return appInsights;\n }\n appInsights = new ApplicationInsights({\n config: {\n instrumentationKey: key,\n },\n });\n\n appInsights.loadAppInsights();\n appInsights.addTelemetryInitializer(envelope => {\n if (envelope.baseType === 'EventData') return true; // trackEvent\n const prohibitedUrlFound = dontTrackUrls.some(url => envelope.baseData.target.includes(url));\n if (prohibitedUrlFound) return false;\n\n envelope.data.tenant = tenantId;\n envelope.data.user = userId;\n\n return true;\n });\n return appInsights;\n};\n","import Tree from 'react-ui-tree';\n\nexport default class FixedTree extends Tree {\n getDraggingDom = () => null;\n dragStart = () => {};\n drag = () => {};\n dragEnd = () => {};\n}\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\n\nimport { IntlShape, injectIntl, FormattedMessage, defineMessages } from 'react-intl';\nimport api from '@/shared/api';\nimport intlShape from '@/shared/utils/intlShape';\nimport config from '@/config';\n\nimport FixedTree from '@/shared/components/FixedTree';\nimport LoadingAnimation from '@/shared/components/LoadingAnimation';\nimport { emptyGuid } from '@/shared/utils/guid';\n\nimport { getDragValue, containsDragFormat } from '@/shared/utils/dragEventHelpers';\nimport { TagIcon, FolderIcon } from '@/shared/components/Icons';\nimport userStorage from '@/shared/services/userStorage';\nimport appInsights from '@/appInsights';\n\nconst messages = defineMessages({\n AllDocuments: 'All documents',\n DocumentsWithoutTags: 'Documents without tags',\n Folders: 'Folders',\n Tags: 'Tags',\n DropDocumentToAddTag: 'Drop document to add tag',\n MoveOrCopyDocument: 'Move or copy document',\n UploadFilesToSpecificFolder: 'Upload files to specific folder',\n});\n\nconst findInitialNode = (node, tagsToFind) => {\n if (tagsToFind.length === 1 && node.tagId && node.tagId === tagsToFind[0]) return node;\n if (tagsToFind.length === 1 && !node.tagId && node.children && node.children.length) {\n for (let i = 0; i < node.children.length; i += 1) {\n const found = findInitialNode(node.children[i], tagsToFind);\n if (found) {\n // eslint-disable-next-line no-param-reassign\n node.collapsed = false;\n return found;\n }\n }\n }\n if (tagsToFind.length > 1) {\n const newTagsToFind = node.tagId ? tagsToFind.filter(t => t !== node.tagId) : tagsToFind;\n if (node.tagId && tagsToFind.length === newTagsToFind) return null; // The current node doesn't have one of the tags\n if (!node.children || !node.children.length) return null;\n for (let i = 0; i < node.children.length; i += 1) {\n const found = findInitialNode(node.children[i], newTagsToFind);\n if (found) {\n // eslint-disable-next-line no-param-reassign\n node.collapsed = false;\n return found;\n }\n }\n }\n return null;\n};\nconst findNodeById = (id, tree) => {\n if (tree.id === id) return tree;\n if (!tree.children || !tree.children.length) return null;\n for (let i = 0; i < tree.children.length; i += 1) {\n const found = findNodeById(id, tree.children[i]);\n if (found) {\n // eslint-disable-next-line no-param-reassign\n tree.collapsed = false;\n return found;\n }\n }\n return null;\n};\n\nconst updateNode = (nodeToFind, currentNode, updatedProps) => {\n if (nodeToFind === currentNode) return { ...currentNode, ...updatedProps };\n if (!currentNode.children || !currentNode.children.length) return currentNode;\n return {\n ...currentNode,\n children: currentNode.children.map(child => updateNode(nodeToFind, child, updatedProps)),\n };\n};\n\nconst getCollapsedState = () => {\n try {\n return userStorage.getItem('DocumentTreeCollapsed') || {};\n } catch (e) {\n return {};\n }\n};\n\nconst saveCollapsedState = value => {\n try {\n userStorage.setItem('DocumentTreeCollapsed', value);\n } catch (e) {\n // ignore\n }\n};\n\nconst getCollapsedStateFromTree = tree => {\n if (tree.leaf || !tree.children || !tree.children.length) return;\n return {\n [tree.id]: tree.collapsed,\n ...tree.children.reduce((o, c) => ({ ...o, ...getCollapsedStateFromTree(c) }), {}),\n };\n};\n\nconst undefinedFallback = (value, fallback) => (typeof value === 'undefined' ? fallback : value);\n\nclass DocumentTreeView extends Component {\n state = {\n tagTree: null,\n tagList: null,\n showList: false,\n activeNode: null,\n dragOverNode: null,\n };\n mapTreeNode = ({ children = null, ...node }, parentTags = [], collapsedState = {}, lvl = 0) => {\n const tags = [...parentTags, node.tagId];\n\n return {\n ...node,\n collapsed: undefinedFallback(collapsedState[node.id], lvl > 0),\n tags,\n children:\n children && children.length\n ? children.map(c => this.mapTreeNode(c, tags, collapsedState, lvl + 1))\n : [],\n };\n };\n componentDidMount() {\n const { intl, initialTags, onTreeLoaded } = this.props;\n\n const collapsedState = getCollapsedState();\n\n Promise.all([\n api.base.get(`${config.appUrls.documents}/api/Tree`),\n api.base.get(`${config.appUrls.documents}/api/Tag`),\n ]).then(([{ data: treeData }, { data: tagData }]) => {\n const allDocumentsNode = {\n id: 'AllDocuments',\n name: intl.formatMessage(messages.AllDocuments),\n collapsed: undefinedFallback(collapsedState.AllDocuments, false),\n noDrop: true,\n leaf: true,\n };\n const treeNodes = treeData.map(n => this.mapTreeNode(n, [], collapsedState, 1));\n const allTagsNode = {\n id: 'AllTags',\n name: intl.formatMessage(messages.AllDocuments),\n collapsed: undefinedFallback(collapsedState.AllTags, true),\n tags: null,\n noDrop: true,\n leaf: true,\n };\n const tagNodes = tagData.map(x => ({\n id: `t-${x.id}`,\n name: x.name,\n tagId: x.id,\n tags: [x.id],\n collapsed: false,\n leaf: true,\n alwaysCopy: true,\n }));\n const noTagsNode = {\n id: 'NoTags',\n name: intl.formatMessage(messages.DocumentsWithoutTags),\n collapsed: false,\n leaf: true,\n tags: [emptyGuid],\n noDrop: true,\n };\n const tagTree = {\n id: 'Root',\n name: '',\n children: [noTagsNode, allDocumentsNode, ...treeNodes],\n collapsed: false,\n leaf: true,\n };\n const tagList = {\n id: 'ListRoot',\n name: '',\n children: [noTagsNode, allTagsNode, ...tagNodes],\n collapsed: false,\n leaf: true,\n };\n let showList = false;\n let activeNode = null;\n const tags = initialTags ? initialTags.split(';') : [];\n if (tags && tags.length) {\n if (tags.length === 1) {\n showList = true;\n activeNode = tagNodes.find(x => x.tagId === tags[0]);\n } else {\n activeNode = findInitialNode(tagTree, tags);\n }\n }\n if (!activeNode) {\n const activeNodeId = userStorage.getItem('DocumentTreeActiveNode');\n if (activeNodeId) {\n if (activeNodeId.indexOf('t-') === 0) {\n activeNode = tagNodes.find(x => x.id === activeNodeId);\n showList = true;\n } else {\n activeNode = findNodeById(activeNodeId, tagTree);\n }\n }\n }\n activeNode = activeNode || allDocumentsNode;\n\n this.setState(\n {\n tagTree,\n tagList,\n activeNode,\n showList,\n },\n () => {\n onTreeLoaded({ tags: activeNode.tags });\n },\n );\n });\n }\n\n collapseNode = (node, collapsed) => {\n if (node.leaf || !node.id) return;\n const { tagTree } = this.state;\n const collapsedState = getCollapsedState();\n collapsedState[node.id] = collapsed;\n saveCollapsedState(collapsedState);\n return updateNode(node, tagTree, { collapsed });\n };\n\n selectNode = node => {\n const { onFilterChanged } = this.props;\n const { activeNode, showList } = this.state;\n const updatedState = { activeNode: node };\n userStorage.setItem('DocumentTreeActiveNode', node.id);\n if (!node.leaf) {\n if (node.id !== activeNode.id && node.collapsed) {\n updatedState.tagTree = this.collapseNode(node, false);\n } else if (node.id === activeNode.id) {\n updatedState.tagTree = this.collapseNode(node, !node.collapsed);\n }\n }\n if (showList && node) {\n appInsights().trackEvent({ name: 'DocumentsTagListClicked' }, { tag: node.name });\n }\n this.setState(updatedState, () => onFilterChanged({ tags: node.tags }));\n };\n\n handleDragOver = (e, node) => {\n if (!e.dataTransfer) return;\n const { activeNode } = this.state;\n\n try {\n if (containsDragFormat(e, 'Files')) {\n e.preventDefault();\n e.dataTransfer.dropEffect = 'copy';\n this.setState({ dragOverNode: node });\n } else if (containsDragFormat(e, 'cxdocument') || containsDragFormat(e, 'Text')) {\n if (activeNode.id === node.id || !node.tags || !node.tags.length || node.noDrop) return;\n e.preventDefault();\n e.dataTransfer.dropEffect =\n e.ctrlKey || !activeNode || !activeNode.tags || !activeNode.tags.length || node.alwaysCopy\n ? 'copy'\n : 'move';\n this.setState({ dragOverNode: node });\n }\n } catch (ex) {\n console.error(ex);\n }\n };\n handleDragLeave = (e, node) => {\n if (!e.dataTransfer) return;\n this.setState(state => ({\n dragOverNode: state.dragOverNode === node ? null : state.dragOverNode,\n }));\n };\n handleDrop = (e, node) => {\n if (!e.dataTransfer) return;\n const { activeNode } = this.state;\n const { onFilterChanged, onUploadDocument, allowUpload } = this.props;\n if (!allowUpload) return;\n this.setState({\n dragOverNode: null,\n });\n try {\n if (containsDragFormat(e, 'Files')) {\n e.preventDefault();\n onUploadDocument({ files: [...e.dataTransfer.files], node });\n } else {\n const dragValue = getDragValue(e, 'cxdocument') || getDragValue(e, 'Text');\n if (dragValue) {\n e.preventDefault();\n if (activeNode.id === node.id || !node.tags || !node.tags.length || node.noDrop) return;\n const data = JSON.parse(dragValue);\n if (data && data.id) {\n const model = {\n documentId: data.id,\n add: node.tags,\n remove:\n activeNode && activeNode.tags && !e.ctrlKey && !node.alwaysCopy\n ? activeNode.tags\n : [],\n };\n api.base.put(`${config.appUrls.documents}/api/Documents/Tags`, model).then(() => {\n if (model.remove.length) {\n onFilterChanged({ tags: activeNode.tags, force: true });\n }\n });\n }\n }\n }\n } catch (ex) {\n console.error(ex);\n }\n };\n\n handleTreeChanged = tree => {\n const collapsedState = getCollapsedStateFromTree(tree);\n saveCollapsedState(collapsedState);\n };\n\n toggleState = showList => {\n const { tagTree, tagList } = this.state;\n const { onFilterChanged } = this.props;\n const tree = showList ? tagList : tagTree;\n const activeNode = tree.children[0];\n this.setState({ showList, activeNode }, () => onFilterChanged({ tags: activeNode.tags }));\n\n if (showList) appInsights().trackEvent({ name: 'DocumentsTagListClicked' });\n };\n\n renderNode = node => {\n const { activeNode, dragOverNode } = this.state;\n const { allowUpload } = this.props;\n return (\n this.selectNode(node)}\n onDragOver={e => this.handleDragOver(e, node)}\n onDragLeave={e => this.handleDragLeave(e, node)}\n onDrop={e => this.handleDrop(e, node)}\n >\n {node.name}\n
\n );\n };\n\n render() {\n const { tagTree, showList, tagList } = this.state;\n const { intl } = this.props;\n return (\n
\n
\n this.toggleState(false)}\n >\n \n \n \n this.toggleState(true)}\n >\n \n \n \n
\n \n {tagTree ? (\n \n ) : (\n \n )}\n
\n
\n );\n }\n}\n\nDocumentTreeView.propTypes = {\n intl: intlShape.isRequired,\n onFilterChanged: PropTypes.func.isRequired,\n onUploadDocument: PropTypes.func,\n initialTags: PropTypes.string,\n onTreeLoaded: PropTypes.func,\n allowUpload: PropTypes.bool,\n};\nDocumentTreeView.defaultProps = {\n initialTags: null,\n allowUpload: true,\n onUploadDocument: () => {},\n onTreeLoaded: () => {},\n};\n\nexport default injectIntl(DocumentTreeView);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { injectIntl } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport { FaFileSignature } from 'react-icons/fa';\nimport { IconContext } from 'react-icons';\n\nconst getSigningStatusClassname = document => {\n switch (document.signingStatus) {\n case 1:\n return '';\n case 2:\n return 'text-orange';\n case 3:\n case 4:\n case 11:\n case 12:\n return 'text-danger';\n case 10:\n return 'text-blue';\n case 20:\n case 21:\n return 'text-success';\n default:\n return '';\n }\n};\n\nconst getSigningStatusTooltip = (document, intl) => {\n if (document.signingFailedReason) return document.signingFailedReason;\n\n return intl.formatMessage(listItemMsg('signingStatus', document.signingStatus));\n};\n\nconst DocumentSigningStatusIcon = ({ document, intl }) => (\n
\n \n \n \n
\n);\n\nDocumentSigningStatusIcon.propTypes = {\n intl: intlShape.isRequired,\n document: PropTypes.shape({}).isRequired,\n};\n\nexport default injectIntl(DocumentSigningStatusIcon);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport dateFormatService from '../services/DateFormatService';\n\nconst FormattedDateShort = ({ value, className, showTimeInTooltip }) => {\n const stringValue = value instanceof Date ? value.toISOString() : value;\n const title = showTimeInTooltip ? dateFormatService.formatDateWithTime(stringValue) : undefined;\n return (\n \n {dateFormatService.formatDate(stringValue)}\n \n );\n};\n\nFormattedDateShort.propTypes = {\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Date)]).isRequired,\n className: PropTypes.oneOfType([PropTypes.string, PropTypes.shape({})]),\n showTimeInTooltip: PropTypes.bool,\n};\nFormattedDateShort.defaultProps = {\n className: '',\n showTimeInTooltip: false,\n};\nexport default FormattedDateShort;\n","import React, { Component } from 'react';\nimport Modal from 'react-bootstrap/lib/Modal';\nimport { injectIntl, defineMessages, FormattedMessage, FormattedDate } from 'react-intl';\nimport PropTypes from 'prop-types';\nimport intlShape from '@/shared/utils/intlShape';\nimport ScrollableTable from '@/shared/components/table/ScrollableTable';\nimport ColumnHeader from '@/shared/components/table/ColumnHeader';\nimport Button from '@/shared/components/Button';\nimport config from '@/config';\nimport api from '@/shared/api';\nimport LoadingAnimation from '@/shared/components/LoadingAnimation';\nimport FormattedListValue from '@/shared/components/FormattedListValue';\nimport RelationSearch from '@/shared/components/input/RelationSearch';\nimport isEqual from 'lodash-es/isEqual';\nimport TextSearch from '@/shared/components/input/TextSearch';\nimport InlineAttachment from '@/shared/components/InlineAttachment';\nimport Axios from 'axios';\nimport RelationName from '@/shared/components/RelationName';\nimport FileIcon from '@/shared/components/FileIcon';\nimport DocumentTreeView from '@/shared/components/DocumentTreeView';\nimport DocumentSigningStatusIcon from '@/shared/components/DocumentSigningStatusIcon';\nimport FormattedDateShort from './FormattedDateShort';\n\nconst tagsToString = tags => (tags ? tags.sort().join(';') : null);\n\nconst messages = defineMessages({\n Save: 'Save',\n Cancel: 'Cancel',\n DocumentSelection: 'Document selection',\n NoDocumentsFound: 'No documents found',\n Name: 'Name',\n Type: 'Type',\n Relation: 'Relation',\n DocumentDate: 'Document date',\n Add: 'Add',\n SearchDocuments: 'Search documents',\n Delete: 'Delete',\n Ready: 'Ready',\n NrOfLinkedRelations: '{nr} relations',\n});\n\nclass DocumentSelectorModal extends Component {\n static propTypes = {\n show: PropTypes.bool,\n onClose: PropTypes.func.isRequired,\n disabled: PropTypes.bool,\n intl: intlShape.isRequired,\n initialRelation: PropTypes.string,\n };\n\n static defaultProps = {\n show: false,\n disabled: false,\n initialRelation: undefined,\n };\n\n constructor(props) {\n super(props);\n\n const { initialRelation } = props;\n let initialFilters = {};\n if (initialRelation) {\n initialFilters = {\n ...initialFilters,\n relationId: initialRelation,\n };\n }\n\n this.state = {\n selectedDocuments: [],\n documents: [],\n treeviewReady: false,\n initialSearchParams: {\n sortKey: 'documentDate',\n desc: true,\n pageSize: 50,\n mainFilters: initialFilters,\n },\n };\n }\n componentWillUnmount() {\n if (typeof this.cancelToken !== 'undefined') {\n this.cancelToken.cancel('Operation canceled due to leaving page.');\n }\n }\n onTreeviewLoaded = ({ tags }) => {\n this.setState(state => ({\n ...state,\n treeviewReady: true,\n initialSearchParams: {\n ...state.initialSearchParams,\n mainFilters: { ...state.initialSearchParams.mainFilters },\n tags: tagsToString(tags),\n page: 0,\n f: new Date().getTime(),\n },\n }));\n };\n\n filterDocumentsByTags = (tags, force) => {\n this.setState(state => ({\n ...state,\n initialSearchParams: {\n ...state.initialSearchParams,\n tags: tagsToString(tags),\n page: 0,\n f: force ? new Date().getTime() : undefined,\n },\n }));\n };\n\n relationChanged = item => {\n if (!item || !item.id) {\n this.filterChanged({ relationId: null, relationName: null });\n } else {\n this.filterChanged({\n relationId: item.key,\n relationName: item.label,\n });\n }\n };\n\n filterChanged(filters) {\n const { initialSearchParams } = this.state;\n if (isEqual(initialSearchParams.mainFilters, filters)) {\n return;\n }\n\n this.setState(state => ({\n ...state,\n initialSearchParams: {\n ...state.initialSearchParams,\n mainFilters: { ...state.initialSearchParams.mainFilters, ...filters },\n },\n }));\n }\n\n loadDocuments = ({ tags, desc, sortKey: sort, page, pageSize: take, mainFilters = {} }) => {\n const { relationId = null, search = null } = mainFilters;\n const params = {\n desc,\n sort,\n page,\n take,\n tags,\n search,\n };\n const { selectedDocuments } = this.state;\n\n if (relationId) {\n params.linkId = relationId;\n params.linkType = 3; // link type 3 = relation\n }\n\n if (typeof this.cancelToken !== 'undefined') {\n this.cancelToken.cancel('Operation canceled due to new request.');\n }\n this.cancelToken = Axios.CancelToken.source();\n\n return api.base\n .post(`${config.appUrls.documents}/api/documents/GetAll`, params, {\n cancelToken: this.cancelToken.token,\n })\n .then(({ data }) => {\n const newDocuments = data.documents.map(e => ({\n ...e,\n selected: selectedDocuments.map(x => x.id).includes(e.id),\n }));\n\n this.setState(state => ({\n ...state,\n documents: page > 0 ? [...state.documents, ...newDocuments] : [...newDocuments],\n currentSearchParams: params,\n }));\n\n return data.documents;\n })\n .catch(error => {\n if (!Axios.isCancel(error)) return error;\n });\n };\n renderRow = document => {\n const { intl } = this.props;\n\n return (\n \n \n \n {document.name}\n \n \n \n \n \n {document.relations &&\n document.relations.slice(0, 3).map(relation => (\n \n \n \n ))}\n {document.relations && document.relations.length > 3 && (\n \n …\n \n )}\n \n \n \n \n \n {((document.shouldBeSigned || document.signingStatus > 1) && document.signingStatus) && (\n \n )}\n \n \n {document.selected ? (\n \n this.setState(state => ({\n ...state,\n selectedDocuments: state.selectedDocuments.filter(x => x.id !== document.id),\n documents: state.documents.map(x =>\n x.id === document.id ? { ...x, selected: !x.selected } : x,\n ),\n }))\n }\n btnClassName=\"btn-xs\"\n >\n {intl.formatMessage(messages.Delete)}\n \n ) : (\n \n this.setState(state => ({\n ...state,\n selectedDocuments: [...state.selectedDocuments, document],\n documents: state.documents.map(x =>\n x.id === document.id ? { ...x, selected: !x.selected } : x,\n ),\n }))\n }\n btnClassName=\"btn-xs\"\n >\n {intl.formatMessage(messages.Add)}\n \n )}\n \n \n );\n };\n\n render() {\n const { show, onClose, intl, onDocumentsSelected, initialRelation } = this.props;\n const { selectedDocuments, treeviewReady, initialSearchParams, documents } = this.state;\n\n let initRelation = null;\n if (initialRelation) {\n initRelation = {\n key: initialRelation,\n // label will get retrieved by search component\n };\n }\n return (\n \n \n {document && (\n \n \n \n )}\n \n \n {\n
\n
\n
\n \n
\n
\n this.filterChanged({ search: value })}\n />\n
\n
\n this.filterDocumentsByTags(tags, force)}\n onTreeLoaded={this.onTreeviewLoaded}\n />\n
\n\n
\n {treeviewReady ? (\n (this.scrollParentRef = ref)}\n // this is required to make the scroll component work in modal\n style={{ height: '500px', overflow: 'auto' }}\n >\n this.loadDocuments(searchParams)}\n renderRow={item => this.renderRow(item)}\n renderTBody\n scrollParentRef={this.scrollParentRef}\n >\n \n \n \n \n \n \n \n
\n ) : (\n \n )}\n
\n
\n }\n
\n \n
\n {selectedDocuments.map(document => (\n \n this.setState(state => ({\n ...state,\n selectedDocuments: state.selectedDocuments.filter(x => x.id !== document.id),\n documents: state.documents.map(x =>\n x.id === document.id ? { ...x, selected: !x.selected } : x,\n ),\n }))\n }\n />\n ))}\n \n onDocumentsSelected(selectedDocuments)}\n disabled={selectedDocuments.length <= 0}\n btnClassName=\"btn-inverse\"\n >\n {intl.formatMessage(messages.Ready)}\n \n
\n
\n
\n );\n }\n}\n\nexport default injectIntl(DocumentSelectorModal);\n","import React from 'react';\nimport classnames from 'classnames';\nimport PropTypes from 'prop-types';\n\nconst InputGroupWrapper = ({ children, left, right, className, leftClassName, rightClassName }) => {\n if (!children) return null;\n if (!left && !right) return children;\n\n return (\n
\n {!!left && {left}}\n {children}\n {!!right && {right}}\n
\n );\n};\nInputGroupWrapper.propTypes = {\n children: PropTypes.node,\n left: PropTypes.node,\n leftClassName: PropTypes.string,\n right: PropTypes.node,\n rightClassName: PropTypes.string,\n className: PropTypes.string,\n};\nInputGroupWrapper.defaultProps = {\n children: null,\n left: null,\n leftClassName: 'input-group-addon',\n right: null,\n rightClassName: 'input-group-addon',\n className: '',\n};\n\nexport default InputGroupWrapper;\n","import React from 'react';\n\nimport { PropTypes } from 'prop-types';\nimport FileUpload from '@/shared/components/input/FileUpload';\nimport RichTextEditor from '@/shared/components/RichTextEditor';\nimport InlineAttachment from '@/shared/components/InlineAttachment';\nimport { defineMessages, FormattedMessage, injectIntl } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport { FolderOpenIcon } from '@/shared/components/Icons';\nimport Button from '@/shared/components/Button';\nimport DatePicker from '@/shared/components/input/DatePicker';\nimport { isBeforeMinimum } from '@/shared/utils/validationHelpers';\nimport DocumentSelectorModal from './DocumentSelectorModal';\nimport { CanRead } from './security';\n\nconst messages = defineMessages({\n Subject: 'Subject',\n Attachments: 'Attachments',\n SendTo: 'To',\n Cc: 'CC',\n Bcc: 'BCC',\n Email: 'Email',\n ChooseDocumentInAdminPulse: 'Choose document in AdminPulse',\n DocumentDateLabel: 'Document date',\n});\n\nclass EmailEditor extends React.Component {\n state = { showDocumentSelectorModal: false };\n\n render() {\n const {\n title,\n onTitleChanged,\n initialValue,\n onContentChanged,\n attachmentUploadEndpoint,\n intl,\n onAttachmentUploaded,\n attachments,\n onDeleteAttachment,\n initialRelation,\n documentDate,\n onDocumentDateChanged,\n id,\n isFreeEmail,\n } = this.props;\n const { showDocumentSelectorModal, dateFocused } = this.state;\n\n return (\n
\n {showDocumentSelectorModal && (\n {\n this.setState({ showDocumentSelectorModal: false }, () =>\n documents.map(x => onAttachmentUploaded(null, x)),\n );\n }}\n onClose={() => this.setState({ showDocumentSelectorModal: false })}\n />\n )}\n
\n \n
\n onTitleChanged(e.target.value)}\n />\n
\n
\n {onDocumentDateChanged && (\n
\n \n\n
\n onDocumentDateChanged(date)}\n focused={dateFocused}\n onFocusChange={({ focused }) => this.setState({ dateFocused: focused })}\n id=\"documentDate\"\n required\n block\n small\n isOutsideRange={isBeforeMinimum}\n />\n
\n
\n )}\n
\n \n
\n {attachments && (\n
\n {attachments.map(attachment => (\n \n ))}\n
\n )}\n \n
\n onAttachmentUploaded(error, file)}\n removeSuccessfullAfter={5000}\n />\n
\n \n this.setState({ showDocumentSelectorModal: true })}\n >\n \n \n \n \n
\n
\n
\n\n onContentChanged(newContent)}\n base64Images\n isFreeEmail={isFreeEmail}\n id={id}\n />\n
\n );\n }\n}\n\nEmailEditor.propTypes = {\n title: PropTypes.string,\n onTitleChanged: PropTypes.func.isRequired,\n initialValue: PropTypes.string,\n onContentChanged: PropTypes.func.isRequired,\n attachmentUploadEndpoint: PropTypes.string,\n intl: intlShape.isRequired,\n onAttachmentUploaded: PropTypes.func.isRequired,\n attachments: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n onDeleteAttachment: PropTypes.func,\n initialRelation: PropTypes.string,\n id: PropTypes.string,\n};\nEmailEditor.defaultProps = {\n title: '',\n attachmentUploadEndpoint: '',\n onDeleteAttachment: null,\n initialValue: '',\n initialRelation: undefined,\n id: 'default',\n};\nexport default injectIntl(EmailEditor);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { defineMessages, FormattedMessage, injectIntl, useIntl } from 'react-intl';\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport intlShape from '@/shared/utils/intlShape';\nimport classNames from 'classnames';\nimport FormattedListValue, { listItemMsg } from '@/shared/components/FormattedListValue';\nimport InputGroupWrapper from '@/shared/components/InputGroupWrapper';\n\nconst messages = defineMessages({\n Placeholders: 'Placeholders',\n Search: 'Search',\n UseThesePlaceholdersInYourEmail: 'Use these placeholders in your e-mail.',\n});\n\nconst searchFunc = (item, searchValue) =>\n item && typeof item === 'string' && item.toLowerCase().includes(searchValue.toLowerCase());\n\nconst searchPlaceholders = (items, searchValue, getter = x => x) => {\n if (!items || items.length === 0) return [];\n if (!searchValue) return items;\n\n const terms = searchValue.split(' ');\n for (let i = 0; i < terms.length; i++) {\n const term = terms[i];\n items = items.filter(x => searchFunc(getter(x), term));\n }\n\n return items;\n};\nconst searchKeyGetter = x => x?.searchKey;\n\nclass PlaceholderModal extends Component {\n state = {\n placeholders: [],\n taskPlaceholders: [],\n searchValue: '',\n };\n\n componentDidMount() {\n this.retrievePlaceholders();\n }\n\n static propTypes = {\n intl: intlShape.isRequired,\n onClose: PropTypes.func.isRequired,\n templateContext: PropTypes.number.isRequired,\n };\n\n retrievePlaceholders = () => {\n const { templateContext, intl } = this.props;\n if (!templateContext) {\n console.warn('No templatecontext was passed to PlaceholderModal');\n return;\n }\n const normalPlaceholdersPromise = api.base.get(\n `${config.appUrls.api}/api/template/MailPlaceholders`,\n );\n const taskPlaceholdersPromise =\n templateContext === 11\n ? api.base.get(`${config.appUrls.tasks}/api/taskparameters/placeholders`)\n : { data: [] };\n\n Promise.all([normalPlaceholdersPromise, taskPlaceholdersPromise]).then(\n ([{ data: normalPlaceholders }, { data: taskPlaceholders }]) => {\n this.setState({\n placeholders: normalPlaceholders[templateContext]?.map(x => {\n const description = intl.formatMessage(listItemMsg('mailplaceholder', x, ''));\n return {\n placeholder: x,\n description,\n searchKey: `${x};${description}`,\n };\n }),\n taskPlaceholders: taskPlaceholders?.map(x => {\n const label = intl.formatMessage(\n listItemMsg('tasktemplate', x.taskTemplateId, x.taskTemplateName),\n );\n return {\n ...x,\n label,\n searchKey: `${label};${x.placeholders?.join(';')}`,\n };\n }),\n });\n },\n );\n };\n\n render() {\n const { intl, onClose } = this.props;\n const { placeholders, taskPlaceholders, searchValue } = this.state;\n const hasTaskPlaceholders = taskPlaceholders.length;\n const filteredPlaceholders = searchPlaceholders(placeholders, searchValue, searchKeyGetter);\n const filteredTaskPlaceholders = searchPlaceholders(\n taskPlaceholders,\n searchValue,\n searchKeyGetter,\n );\n\n return (\n \n
\n
\n
\n \n
\n
\n
\n
\n this.setState({ searchValue: '' })}\n className=\"btn btn-default\"\n >\n \n \n ) : null\n }\n >\n this.setState({ searchValue: e.target.value })}\n autoComplete=\"off\"\n autoFocus\n data-1p-ignore\n className=\"form-control\"\n placeholder={intl.formatMessage(messages.Search)}\n />\n \n
\n
\n
\n \n {filteredPlaceholders.map(({ placeholder, description }, i) => (\n \n
{placeholder}
\n
{description}
\n
\n ))}\n
\n {hasTaskPlaceholders && (\n
\n {filteredTaskPlaceholders.map(taskParameter => {\n const filtered = searchPlaceholders(taskParameter.placeholders, searchValue);\n\n return (\n
\n {taskParameter.label}\n {(filtered.length === 0 ? taskParameter.placeholders : filtered)?.map(\n placeholder => (\n
{placeholder}
\n ),\n )}\n
\n );\n })}\n
\n )}\n
\n \n \n );\n }\n}\n\nexport default injectIntl(PlaceholderModal);\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst KPIs = ({ children }) =>
{children}
;\n\nKPIs.propTypes = {\n /** contains 0..n KPI */\n children: PropTypes.node.isRequired,\n};\n\nexport default KPIs;\n","import React from 'react';\nimport classNames from 'classnames';\nimport PropTypes from 'prop-types';\n\nconst KPI = props => {\n const { title, subtitle, titleClassName, subtitleClassName, onClick } = props;\n\n return (\n
\n
{title}
\n
{subtitle}
\n
\n );\n};\n\nKPI.propTypes = {\n title: PropTypes.node.isRequired,\n subtitle: PropTypes.node.isRequired,\n titleClassName: PropTypes.string,\n subtitleClassName: PropTypes.string,\n onClick: PropTypes.func,\n};\n\nKPI.defaultProps = {\n onClick: undefined,\n titleClassName: '',\n subtitleClassName: '',\n};\n\nexport default KPI;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { defineMessages, FormattedMessage } from 'react-intl';\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport log from 'loglevel';\nimport intlShape from '@/shared/utils/intlShape';\nimport ToastrService from '@/shared/services/ToastrService';\nimport CollapsablePanel from '@/shared/components/CollapablePanel';\nimport EmailEditor from '@/shared/components/EmailEditor';\nimport { injectStateService } from '@/shared/services/StateService';\nimport { LinkIcon } from '@/shared/components/Icons';\nimport moment from 'moment';\nimport Button from '@/shared/components/Button';\nimport CanRead from '@/shared/components/security/CanRead';\nimport PlaceholderModal from './PlaceholderModal';\nimport AuthService, { functionalities, privileges } from '@/shared/services/AuthService';\n\nconst messages = defineMessages({\n EmailContentRequired: 'The email must have content.',\n MsgEmailAttachmentUploadFailed: 'An error occurred when uploading the email attachment',\n NoEmailTemplateFoundInLanguage: 'No email template was found in {language}',\n SendEmail: 'Send email',\n Placeholders: 'Placeholders',\n Template: 'Template',\n NoTemplatesFound: 'No templates found',\n ChooseTemplate: 'Choose template',\n OpenEmailTemplates: 'Open email templates',\n Templates: 'Templates',\n PlaceholdersWillBeResolvedByAdminPulse: 'The visible placeholders will be resolved by AdminPulse',\n ClickHereToCreateFreeTextEmail:\n 'Choose a template or click here to start typing an email without template.',\n UseThesePlaceholdersInYourEmail: 'Use these placeholders in your e-mail.',\n SendMailMakeSureAllFieldsAreFilledOut:\n 'Email cannot be sent. Please make sure all emails in all languages have a subject and body',\n DocumentsOfTheFollowingTypeWillBeLinkedIfPresent:\n 'Documents of the following type will be attached to the email if linked to task:',\n});\n\nconst freetTextMailContent = `\n\n\t\n\n\n

 

\n

{company.signature}

\n\n`;\nclass MultiRelationsMailModal extends Component {\n state = {\n emails: [],\n emailAttachments: [],\n templates: [],\n showPlaceholderModal: false,\n autoLinkDocumentTypes: [],\n };\n\n componentDidMount() {\n this.form = React.createRef();\n const { emailContext } = this.props;\n this.retrieveEmailTemplates(emailContext);\n }\n\n static propTypes = {\n onSave: PropTypes.func.isRequired,\n intl: intlShape.isRequired,\n onClose: PropTypes.func.isRequired,\n show: PropTypes.bool,\n languages: PropTypes.array.isRequired,\n emailContext: PropTypes.number.isRequired,\n };\n\n static defaultProps = {\n show: false,\n };\n\n retrieveEmailTemplates = emailContext =>\n api.base.get(`${config.appUrls.api}/api/template/company/${emailContext}`).then(({ data }) => {\n if (!data.length) {\n this.renderEmailInput();\n return;\n }\n const templates = data.map(x => ({\n id: x.id,\n name: x.name,\n }));\n this.setState({ templates });\n });\n\n onSave = () => {\n const { emails, emailAttachments, selectedTemplate } = this.state;\n const { onSave, intl } = this.props;\n\n const isFormValid = this.validate();\n\n let invalidEmailBody = false;\n\n emails.map(x => {\n if (\n !x.content ||\n // regex to remove line breaks\n x.content.replace(/(\\r\\n|\\n|\\r)/gm, '') === '

'\n ) {\n invalidEmailBody = true;\n }\n });\n\n if (invalidEmailBody || !isFormValid) {\n ToastrService.error(intl.formatMessage(messages.SendMailMakeSureAllFieldsAreFilledOut));\n return Promise.reject(new Error('invalid form'));\n }\n\n const parameters = {\n emailTemplateId: selectedTemplate,\n emails,\n emailAttachments: emailAttachments.map(x => ({\n documentId: x.id,\n languageCode: x.languageCode,\n })),\n };\n\n return onSave(parameters);\n };\n\n closeModal = () => {\n const { onClose } = this.props;\n onClose();\n };\n\n getTemplateAttachments = (language, templateLanguageId) =>\n api.base\n .get(`${config.appUrls.documents}/api/Documents/Links/${templateLanguageId}/4`)\n .then(({ data }) => data.map(doc => this.mapAttachment(doc, language)));\n\n renderEmailInput = () => {\n const { languages } = this.props;\n\n const emails = languages.map((x, index) => ({\n subject: '',\n content: freetTextMailContent,\n initialValue: freetTextMailContent,\n documentDate: moment.utc(),\n languageCode: x,\n collapsed: index !== 0,\n }));\n\n this.setState(state => ({\n ...state,\n emails,\n }));\n };\n\n emailTitleChanged = (email, title) => {\n const { emails } = this.state;\n\n this.setState({\n emails: emails.map(e => {\n if (e.languageCode === email.languageCode)\n return {\n ...e,\n title,\n };\n return e;\n }),\n });\n };\n\n emailContentChanged = (email, content) => {\n const { emails } = this.state;\n\n this.setState({\n emails: emails.map(e => {\n if (e.languageCode === email.languageCode)\n return {\n ...e,\n content,\n };\n return e;\n }),\n });\n };\n\n onEditorStateChange = (email, content) => {\n const { emails } = this.state;\n this.setState({\n emails: emails.map(e => {\n if (e.languageCode === email.languageCode)\n return {\n ...e,\n content,\n };\n return e;\n }),\n });\n };\n\n renderSingleEmail = email => {\n const documentUploadEndpoint = `${config.appUrls.documents}/api/documents?documentType=15`;\n const { emailAttachments } = this.state;\n\n return (\n this.emailTitleChanged(email, title)}\n initialValue={email.initialValue}\n onContentChanged={content => this.onEditorStateChange(email, content)}\n onAttachmentUploaded={(error, file) =>\n this.onDocumentUploaded(error, file, email.languageCode)\n }\n attachmentUploadEndpoint={documentUploadEndpoint}\n attachments={emailAttachments.filter(x => x.languageCode === email.languageCode)}\n onDeleteAttachment={this.deleteAttachment}\n documentDate={email.documentDate}\n onDocumentDateChanged={documentDate =>\n this.setState(state => ({\n ...state,\n emails: state.emails.map(x => {\n if (x.languageCode === email.languageCode) {\n return {\n ...x,\n documentDate,\n };\n }\n return x;\n }),\n }))\n }\n />\n );\n };\n\n emailCollapseClicked = email => {\n const { emails } = this.state;\n\n const emailsCopy = [...emails];\n\n const item = emailsCopy.find(x => x.languageCode === email.languageCode);\n\n item.collapsed = !item.collapsed;\n\n this.setState(state => ({\n ...state,\n emails: emailsCopy,\n }));\n };\n\n mapAttachment = (document, languageCode) => ({\n ...document,\n languageCode,\n });\n\n onDocumentUploaded = (error, document, languageCode) => {\n const { intl } = this.props;\n\n if (error) {\n log.error(error);\n ToastrService.error(intl.formatMessage(messages.MsgEmailAttachmentUploadFailed));\n return;\n }\n\n const emailAttachment = this.mapAttachment(document, languageCode);\n\n this.setState(state => ({\n ...state,\n emailAttachments: [emailAttachment, ...state.emailAttachments],\n }));\n };\n\n deleteAttachment = attachment => {\n if (AuthService.hasPermission({\n functionality: functionalities.Documents,\n privilege: privileges.Delete,\n }) && attachment.documentType === 15) {\n api.base.delete(`${config.appUrls.documents}/api/documents/${attachment.id}`).then(() => {\n this.setState(state => ({\n emailAttachments: state.emailAttachments.filter(x => x.id !== attachment.id),\n }));\n });\n } else {\n this.setState(state => ({\n emailAttachments: state.emailAttachments.filter(x => x.id !== attachment.id),\n }));\n }\n };\n\n renderMultipleEmails = emails => {\n const { intl } = this.props;\n return emails.map(email => (\n this.emailCollapseClicked(email)}\n title={\n \n {intl.formatMessage(listItemMsg('language', email.languageCode, email.languageCode))}\n \n }\n >\n
{this.renderSingleEmail(email)}
\n \n ));\n };\n\n loadEmailTemplates = (templateId, languageCodes) => {\n const { intl } = this.props;\n\n return Promise.all(\n languageCodes.map((languageCode, index) =>\n api.base\n .get(`${config.appUrls.api}/api/template/content/${templateId}/${languageCode}`)\n .then(({ data }) => ({\n ...data,\n initialValue: data.content,\n collapsed: index !== 0,\n documentDate: moment.utc(),\n }))\n // if no template was found in the language code, just return an empty object to\n // still be able to use the editor\n .catch(() => {\n const language = intl.formatMessage(\n listItemMsg('language', languageCode, languageCode),\n );\n const message = intl.formatMessage(messages.NoEmailTemplateFoundInLanguage, {\n language,\n });\n ToastrService.error(message);\n return {\n languageCode,\n initialValue: freetTextMailContent,\n content: freetTextMailContent,\n title: '',\n collapsed: index !== 0,\n documentDate: moment.utc(),\n };\n }),\n ),\n );\n };\n\n templateChanged = event => {\n const template = event.target.value;\n this.setState(state => ({\n ...state,\n selectedTemplate: template,\n }));\n\n if (!template) return;\n\n const { languages } = this.props;\n\n this.loadEmailTemplates(template, languages).then(\n emailTemplates => {\n this.setState(state => ({\n ...state,\n emails: emailTemplates,\n loadingTemplate: false,\n autoLinkDocumentTypes: emailTemplates[0].autoLinkDocumentTypes,\n }));\n Promise.all(\n emailTemplates\n .filter(x => !!x.id)\n .map(x => this.getTemplateAttachments(x.languageCode, x.id)),\n ).then(([...results]) => {\n this.setState(state => ({\n emailAttachments: [...results.flat()],\n }));\n });\n },\n error => {\n console.error(error);\n this.setState(state => ({\n ...state,\n loadingTemplate: false,\n }));\n },\n );\n };\n\n validate() {\n const { emails } = this.state;\n if (!emails.length) return false;\n if (!this.form || !this.form.current) return false;\n\n return this.form.current.reportValidity();\n }\n\n render() {\n const { show, intl, stateService, emailContext } = this.props;\n const {\n emails,\n templates,\n selectedTemplate,\n showPlaceholderModal,\n autoLinkDocumentTypes,\n } = this.state;\n return (\n this.setState({ showPlaceholderModal: true })}>\n {'{'}\n {intl.formatMessage(messages.Placeholders)}\n {'}'}\n \n }\n >\n {showPlaceholderModal && (\n this.setState({ showPlaceholderModal: false })}\n onClose={() => this.setState({ showPlaceholderModal: false })}\n templateContext={emailContext}\n />\n )}\n\n {show && (\n
\n
\n
\n \n
\n {!templates.length && (\n \n )}\n {templates.length > 0 && (\n \n {!selectedTemplate && (\n \n )}\n {templates\n .map(template => ({\n ...template,\n translation: intl.formatMessage(\n listItemMsg('template', template.id, template.name),\n ),\n }))\n .sort((a, b) =>\n a.translation.toLowerCase().localeCompare(b.translation.toLowerCase()),\n )\n .map(template => (\n \n ))}\n \n )}\n
\n \n \n stateService.goToEmailTemplates()}\n >\n \n \n \n \n \n
\n\n {emails && emails.length > 0 && (\n
\n \n \n {intl.formatMessage(messages.PlaceholdersWillBeResolvedByAdminPulse)}\n \n \n
\n )}\n {emails &&\n emails.length > 0 &&\n autoLinkDocumentTypes &&\n autoLinkDocumentTypes.length > 0 && (\n
\n \n \n {intl.formatMessage(\n messages.DocumentsOfTheFollowingTypeWillBeLinkedIfPresent,\n )}\n \n\n
    \n {autoLinkDocumentTypes.map(x => (\n
  • {intl.formatMessage(listItemMsg('documentType', x, x))}
  • \n ))}\n
\n
\n
\n )}\n {templates.length >= 1 && (!emails || emails.length <= 0) && (\n
\n \n {intl.formatMessage(messages.ClickHereToCreateFreeTextEmail)}\n \n
\n )}\n\n {emails &&\n (emails.length === 1\n ? this.renderSingleEmail(emails[0])\n : this.renderMultipleEmails(emails))}\n
\n
\n )}\n \n );\n }\n}\n\nexport default injectStateService(MultiRelationsMailModal);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { defineMessages, FormattedMessage } from 'react-intl';\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport log from 'loglevel';\nimport ToastrService from '@/shared/services/ToastrService';\nimport EmailEditor from '@/shared/components/EmailEditor';\nimport { injectStateService } from '@/shared/services/StateService';\nimport { LinkIcon } from '@/shared/components/Icons';\nimport moment from 'moment';\nimport CanRead from '@/shared/components/security/CanRead';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport LoadingAnimation from '@/shared/components/LoadingAnimation';\nimport { mapSuggestedMailAddress } from '@/shared/services/ObjectDisplayService';\nimport intlShape from '@/shared/utils/intlShape';\nimport AuthService, { functionalities, privileges } from '@/shared/services/AuthService';\nimport PlaceholderModal from './PlaceholderModal';\n\nconst messages = defineMessages({\n EmailContentRequired: 'The email must have content.',\n MsgEmailAttachmentUploadFailed: 'An error occurred when uploading the email attachment',\n NoEmailTemplateFoundInLanguage: 'No email template was found in {language}',\n SendEmail: 'Send email',\n Placeholders: 'Placeholders',\n Template: 'Template',\n NoTemplatesFound: 'No templates found',\n ChooseTemplate: 'Choose template',\n OpenEmailTemplates: 'Open email templates',\n Templates: 'Templates',\n PlaceholdersWillBeResolvedByAdminPulse: 'The visible placeholders will be resolved by AdminPulse',\n ClickHereToCreateFreeTextEmail:\n 'Choose a template or click here to start typing an email without template.',\n UseThesePlaceholdersInYourEmail: 'Use these placeholders in your e-mail.',\n SendMailMakeSureAllFieldsAreFilledOut:\n 'Email cannot be sent. Please make sure all emails in all languages have a subject and body',\n SendTo: 'To',\n AddEmailAddress: 'Add email address',\n RemoveEmailAddress: 'Remove email address',\n Cc: 'CC',\n Bcc: 'BCC',\n msgInvalidEmailAddress: 'Invalid email address',\n SubjectBodyRecipientsAreRequired: 'Subject, body and recipients are required.',\n msgTemplateNotInLanguage: 'Template not available in language of relation.',\n templateNotFound: 'The e-mail template could not be found',\n templateNotFoundCheckTaskTemplate:\n 'The e-mail template could not be found. Please double check the task template to see if the correct e-mail template is configured.',\n});\n\nclass SingleRelationMailModal extends Component {\n state = {\n email: undefined,\n to: [],\n cc: [],\n bcc: [],\n emailAttachments: [],\n templates: [],\n showPlaceholderModal: false,\n loading: false,\n };\n\n componentDidMount() {\n this.form = React.createRef();\n this.initializeModal();\n this.CanReadDocuments = AuthService.hasPermission({\n functionality: functionalities.Documents,\n privilege: privileges.Read,\n });\n }\n\n static propTypes = {\n onSave: PropTypes.func.isRequired,\n intl: intlShape.isRequired,\n onClose: PropTypes.func.isRequired,\n show: PropTypes.bool,\n emailContext: PropTypes.number.isRequired,\n relationId: PropTypes.string.isRequired,\n companyId: PropTypes.string.isRequired,\n type: PropTypes.oneOf(['task', 'relation']),\n task: PropTypes.shape({\n relation: PropTypes.object,\n relationId: PropTypes.string,\n invoiceStreamId: PropTypes.string,\n id: PropTypes.string,\n parentId: PropTypes.string,\n mailTemplateId: PropTypes.string,\n }),\n };\n\n static defaultProps = {\n show: false,\n type: 'relation',\n task: undefined,\n };\n\n initializeModal = () => {\n // retrieve: email templates for context\n\n this.setState({ loading: true });\n const { relationId, emailContext, attachments, intl, task } = this.props;\n const templatesPromise = api.base.get(\n `${config.appUrls.api}/api/template/company/${emailContext}`,\n );\n const emailAddressesPromise = api.base.get(\n `${config.appUrls.api}/api/address/MailSuggestions/${relationId}`,\n );\n\n Promise.all([templatesPromise, emailAddressesPromise]).then(\n ([{ data: templates }, { data: emailAddresses }]) => {\n const addresses = emailAddresses.reduce((result, x, idx) => {\n if (!x) return result;\n if (result.some(y => y.emailAddress.toLowerCase() === x.emailAddress.toLowerCase()))\n return result;\n result.push({\n ...x,\n key: `${x.addressId}-${idx}`,\n label: mapSuggestedMailAddress(x, intl),\n });\n return result;\n }, []);\n this.setState(\n {\n loading: false,\n emailAttachments: attachments || [],\n templates,\n addresses,\n selectedTemplate: task?.mailTemplateId ?? undefined,\n },\n () => {\n if (task?.mailTemplateId) {\n this.retrieveTemplatedEmail();\n }\n },\n );\n },\n );\n };\n\n validateEmail = value => {\n if (!value) return false;\n return /^[^@]+@.+\\..+$/.test(value);\n };\n\n onSave = () => {\n const {\n email,\n emailAttachments,\n to,\n cc,\n bcc,\n selectedTemplate,\n templateLanguageId,\n autoLinkDocumentTypes,\n } = this.state;\n const { onSave, intl, relationId, companyId, type, task } = this.props;\n const isFormValid = this.validate();\n\n for (let j = 0; j < to.length; j++) {\n if (!this.validateEmail(to[j])) {\n ToastrService.error(intl.formatMessage(messages.msgInvalidEmailAddress));\n return false;\n }\n }\n\n for (let j = 0; j < cc.length; j++) {\n if (!this.validateEmail(cc[j])) {\n ToastrService.error(intl.formatMessage(messages.msgInvalidEmailAddress));\n return false;\n }\n }\n\n for (let j = 0; j < bcc.length; j++) {\n if (!this.validateEmail(bcc[j])) {\n ToastrService.error(intl.formatMessage(messages.msgInvalidEmailAddress));\n return false;\n }\n }\n\n let invalidEmailBody = false;\n\n if (\n !email?.content ||\n // regex to remove line breaks\n email.content.replace(/(\\r\\n|\\n|\\r)/gm, '') === '

'\n ) {\n invalidEmailBody = true;\n }\n\n if (invalidEmailBody || !isFormValid) {\n ToastrService.error(intl.formatMessage(messages.SubjectBodyRecipientsAreRequired));\n return Promise.reject(new Error('invalid form'));\n }\n\n const emailViewModel = {\n body: email.content,\n subject: email.title,\n to,\n cc,\n bcc,\n attachmentDocumentIds: emailAttachments.map(x => x.id) || [],\n relationId,\n companyId,\n linkId: type === 'task' ? task.id : relationId,\n emailLinkType: type === 'task' ? 2 : 4,\n emailTemplateId: selectedTemplate,\n documentDate: email.documentDate,\n templateLanguageId,\n autoLinkDocumentTypes,\n };\n\n return onSave(emailViewModel);\n };\n\n closeModal = () => {\n const { onClose } = this.props;\n onClose();\n };\n\n renderFreeEmail = () => {\n // we call the templated email because we still want to retrieve to/cc/bcc info from backend\n this.setState(\n state => ({\n ...state,\n selectedTemplate: undefined,\n loading: true,\n }),\n () => this.retrieveTemplatedEmail(),\n );\n };\n\n emailTitleChanged = title => {\n const { email } = this.state;\n\n this.setState({\n email: {\n ...email,\n title,\n },\n });\n };\n\n onEditorStateChange = content => {\n const { email } = this.state;\n this.setState({\n email: {\n ...email,\n content,\n },\n });\n };\n\n renderSingleEmail = email => {\n const documentUploadEndpoint = AuthService.hasPermission({\n functionality: functionalities.Documents,\n privilege: privileges.Create,\n })\n ? `${config.appUrls.documents}/api/documents?documentType=9&informQueues=false&recognitionStatus=4`\n : `${config.appUrls.documents}/api/documents/Temporary`;\n const { emailAttachments, selectedTemplate } = this.state;\n const { relationId } = this.props;\n\n const isFreeEmail = !selectedTemplate;\n\n return (\n this.emailTitleChanged(title)}\n initialValue={email.initialValue}\n onContentChanged={content => this.onEditorStateChange(content)}\n onAttachmentUploaded={(error, file) => this.onDocumentUploaded(error, file)}\n attachmentUploadEndpoint={documentUploadEndpoint}\n attachments={emailAttachments}\n onDeleteAttachment={this.deleteAttachment}\n initialRelation={relationId}\n documentDate={email.documentDate}\n isFreeEmail={isFreeEmail}\n onDocumentDateChanged={documentDate =>\n this.setState({\n email: {\n ...email,\n documentDate,\n },\n })\n }\n />\n );\n };\n\n onDocumentUploaded = (error, document) => {\n const { intl } = this.props;\n\n if (error) {\n log.error(error);\n ToastrService.error(intl.formatMessage(messages.MsgEmailAttachmentUploadFailed));\n return;\n }\n\n const { emailAttachments } = this.state;\n\n if (emailAttachments.some(x => x.id === document.id)) return;\n\n this.setState(state => ({\n ...state,\n emailAttachments: [document, ...state.emailAttachments],\n }));\n };\n\n deleteAttachment = attachment => {\n if (\n AuthService.hasPermission({\n functionality: functionalities.Documents,\n privilege: privileges.Delete,\n }) &&\n (attachment.documentType === 9 || attachment.documentType === 15)\n ) {\n api.base.delete(`${config.appUrls.documents}/api/documents/${attachment.id}`).then(() => {\n this.setState(state => ({\n emailAttachments: state.emailAttachments.filter(x => x.id !== attachment.id),\n }));\n });\n } else {\n this.setState(state => ({\n emailAttachments: state.emailAttachments.filter(x => x.id !== attachment.id),\n }));\n }\n };\n\n retrieveTemplatedEmail = () => {\n const { relationId, intl, type, task } = this.props;\n const { selectedTemplate } = this.state;\n\n const relationMailPromise = () =>\n api.base.post(`${config.appUrls.api}/api/template/GetRelationMail`, {\n templateId: selectedTemplate,\n relationId,\n });\n\n const taskMailPromise = () =>\n api.base.post(`${config.appUrls.api}/api/template/GetTaskMail`, {\n templateId: selectedTemplate,\n subTaskId: task.id,\n relationId: task.relationId,\n invoiceStreamId: task.invoiceStreamId,\n });\n const apiCall = type === 'relation' ? relationMailPromise : taskMailPromise;\n apiCall().then(\n ({ data }) => {\n const {\n cc,\n bcc,\n templateLanguageId,\n recipients,\n autoLinkDocumentTypes,\n templateNotFound,\n templateNotAvailableInRelationLanguage,\n } = data;\n const to = !recipients || recipients.length === 0 ? [''] : recipients; // render empty to if no recipients\n\n // if we got a language id, this means the template was found and available in the relation language\n if (templateLanguageId) {\n const email = {\n title: data.subject || '',\n initialValue: data.body || '',\n content: data.body || '',\n documentDate: moment.utc(),\n };\n this.setState(\n { email, cc, bcc, to, templateLanguageId, autoLinkDocumentTypes, loading: false },\n () => this.getTemplateAttachments(templateLanguageId),\n );\n } else {\n if (templateNotFound) {\n if (type === 'relation') {\n ToastrService.error(intl.formatMessage(messages.templateNotFound));\n } else {\n ToastrService.error(intl.formatMessage(messages.templateNotFoundCheckTaskTemplate));\n }\n }\n if (templateNotAvailableInRelationLanguage) {\n ToastrService.error(intl.formatMessage(messages.msgTemplateNotInLanguage));\n }\n this.setState({\n cc,\n bcc,\n to,\n loading: false,\n selectedTemplate: undefined,\n email: {\n title: data.subject || '',\n initialValue: data.body || '',\n content: data.body || '',\n documentDate: moment.utc(),\n },\n });\n }\n\n if (this.CanReadDocuments && autoLinkDocumentTypes && autoLinkDocumentTypes.length > 0) {\n const mainTaskId = task.parentId || task.id;\n let linkIds = [mainTaskId];\n\n api.base\n .get(`${config.appUrls.tasks}/api/plannedtasks/ChildTaskIds/${mainTaskId}`)\n .then(({ data: childTaskIds }) => {\n linkIds = [...linkIds, ...childTaskIds];\n this.retrieveTaskDocumentsForTemplate(linkIds, autoLinkDocumentTypes);\n })\n .catch(error => {\n this.retrieveTaskDocumentsForTemplate(linkIds, autoLinkDocumentTypes);\n });\n }\n },\n error => {\n this.setState({ loading: false });\n handleHttpError(intl)(error);\n },\n );\n };\n\n templateChanged = event => {\n const template = event.target.value;\n\n this.setState(\n state => ({\n ...state,\n selectedTemplate: template,\n loading: !!template,\n email: template ? undefined : state.email,\n }),\n () => this.retrieveTemplatedEmail(),\n );\n };\n\n getTemplateAttachments = templateLanguageId => {\n const { attachments } = this.props;\n if (!this.CanReadDocuments) return Promise.resolve();\n return api.base\n .get(`${config.appUrls.documents}/api/Documents/Links/${templateLanguageId}/4`)\n .then(({ data }) =>\n this.setState({\n emailAttachments: [...(attachments || []), ...data.flat()],\n }),\n );\n };\n\n retrieveTaskDocumentsForTemplate = (linkIds, autoLinkDocumentTypes) =>\n api.base\n .post(`${config.appUrls.documents}/api/documents/GetLinks`, linkIds)\n .then(({ data }) => {\n if (data && data.length > 0) {\n const attachments = [];\n data.forEach(attachment => {\n if (autoLinkDocumentTypes.some(x => x === attachment.documentType))\n attachments.push(attachment);\n });\n\n this.setState(state => ({\n ...state,\n emailAttachments: [...attachments, ...state.emailAttachments],\n }));\n }\n });\n\n validate() {\n const { email } = this.state;\n if (!email) return false;\n if (!this.form || !this.form.current) return false;\n\n return this.form.current.reportValidity();\n }\n\n handleToChange = (e, index) => {\n const { to } = this.state;\n const newTo = to.map((x, index2) => {\n if (index !== index2) return x;\n return e.target.value;\n });\n this.setState({ to: newTo });\n };\n\n handleCcChange = (e, index) => {\n const { cc } = this.state;\n const newCc = cc.map((x, index2) => {\n if (index !== index2) return x;\n return e.target.value;\n });\n this.setState({ cc: newCc });\n };\n\n handleBccChange = (e, index) => {\n const { bcc } = this.state;\n const newBcc = bcc.map((x, index2) => {\n if (index !== index2) return x;\n return e.target.value;\n });\n this.setState({ bcc: newBcc });\n };\n\n render() {\n const { show, intl, stateService, emailContext } = this.props;\n const {\n email,\n templates,\n selectedTemplate,\n showPlaceholderModal,\n addresses,\n to,\n cc,\n bcc,\n loading,\n } = this.state;\n return (\n \n {showPlaceholderModal && (\n this.setState({ showPlaceholderModal: false })}\n onClose={() => this.setState({ showPlaceholderModal: false })}\n templateContext={emailContext}\n />\n )}\n\n {show && (\n
\n
\n
\n \n
\n {!templates.length && (\n \n )}\n {templates.length > 0 && (\n \n {!selectedTemplate && (\n \n )}\n {templates\n .map(template => ({\n ...template,\n translation: intl.formatMessage(\n listItemMsg('template', template.id, template.name),\n ),\n }))\n .sort((a, b) =>\n a.translation.toLowerCase().localeCompare(b.translation.toLowerCase()),\n )\n .map(template => (\n \n ))}\n \n )}\n
\n \n \n stateService.goToEmailTemplates()}\n >\n \n \n \n \n \n
\n\n \n {addresses &&\n addresses.map(x => (\n \n ))}\n \n\n {email && (\n \n
\n \n
\n {to &&\n to.map((x, index) => (\n
\n
\n this.handleToChange(e, index)}\n />\n
\n \n {to.length > 1 && (\n \n this.setState(state => ({\n ...state,\n to: state.to.filter((_, i) => i !== index),\n }))\n }\n title={intl.formatMessage(messages.RemoveEmailAddress)}\n className=\"clickable\"\n >\n \n \n )}\n
\n
\n ))}\n
\n \n this.setState(state => ({\n ...state,\n to: [...state.to, ''],\n }))\n }\n title={intl.formatMessage(messages.AddEmailAddress)}\n className=\"btn btn-default btn-xs\"\n >\n \n \n
\n
\n
\n\n
\n \n
\n {cc &&\n cc.map((x, index) => (\n
\n
\n this.handleCcChange(e, index)}\n />\n
\n \n \n this.setState(state => ({\n ...state,\n cc: state.cc.filter((_, i) => i !== index),\n }))\n }\n title={intl.formatMessage(messages.RemoveEmailAddress)}\n className=\"clickable\"\n >\n \n \n
\n
\n ))}\n
\n \n this.setState(state => ({\n ...state,\n cc: [...state.cc, ''],\n }))\n }\n title={intl.formatMessage(messages.AddEmailAddress)}\n className=\"btn btn-default btn-xs\"\n >\n \n \n
\n
\n \n\n
\n \n
\n {bcc &&\n bcc.map((x, index) => (\n
\n
\n this.handleBccChange(e, index)}\n />\n
\n \n \n this.setState(state => ({\n ...state,\n bcc: state.bcc.filter((_, i) => i !== index),\n }))\n }\n title={intl.formatMessage(messages.RemoveEmailAddress)}\n className=\"clickable\"\n >\n \n \n
\n
\n ))}\n
\n \n this.setState(state => ({\n ...state,\n bcc: [...state.bcc, ''],\n }))\n }\n title={intl.formatMessage(messages.AddEmailAddress)}\n className=\"btn btn-default btn-xs\"\n >\n \n \n
\n
\n \n \n )}\n {!selectedTemplate && !email && (\n
\n \n {intl.formatMessage(messages.ClickHereToCreateFreeTextEmail)}\n \n
\n )}\n\n {email && this.renderSingleEmail(email)}\n {loading && }\n \n \n )}\n \n );\n }\n}\n\nexport default injectStateService(SingleRelationMailModal);\n","import { listItemMsg } from '@/shared/components/FormattedListValue';\nimport { dynamicSort } from '../utils/dynamicSort';\n\nlet enumCache;\n\nexport function setEnumCache(cache) {\n enumCache = cache;\n}\n\nexport default {\n get: name => {\n if (!enumCache) return Promise.reject(new Error('EnumCache not initialised'));\n return new Promise((resolve, reject) => enumCache.get(name).then(resolve, reject)); // Convert to real promise instead of angular $q promise\n },\n getTranslated: (name, intl, sortById = false) => {\n if (!enumCache) return Promise.reject(new Error('EnumCache not initialised'));\n return new Promise((resolve, reject) =>\n enumCache.get(name).then(value => {\n const sortFunction =\n typeof sortById === 'function' ? sortById : dynamicSort(sortById ? 'id' : 'label');\n\n resolve(\n value\n .map(x => ({\n id: x.key,\n label: intl.formatMessage(listItemMsg(name, x.key, x.value)),\n }))\n .sort(sortFunction),\n );\n }, reject),\n ); // Convert to real promise instead of angular $q promise\n },\n};\n","import React, { Component } from 'react';\nimport enumCache from '@/shared/services/EnumCacheService';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport { injectIntl, defineMessages } from 'react-intl';\nimport PropTypes from 'prop-types';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport classNames from 'classnames';\nimport intlShape from '@/shared/utils/intlShape';\n\nconst messages = defineMessages({\n SelectAValue: 'Select a value',\n NoValue: 'No value',\n});\n\nclass EnumSelect extends Component {\n static defaultProps = {\n orderByLabel: false,\n };\n\n static propTypes = {\n intl: intlShape.isRequired,\n onChange: PropTypes.func.isRequired,\n enumType: PropTypes.string.isRequired,\n orderByLabel: PropTypes.bool,\n allowNull: PropTypes.bool,\n };\n\n state = {\n options: [],\n selectedValue: undefined,\n allowNull: false,\n };\n\n componentDidMount() {\n const { intl, enumType, orderByLabel, allowNull } = this.props;\n enumCache.get(enumType).then(data => {\n let options = data.map(x => ({\n id: x.key,\n label: intl.formatMessage(listItemMsg(enumType, x.key, x.value)),\n }));\n if (orderByLabel) {\n options = options.sort(dynamicSort('label'));\n }\n if (allowNull) {\n options = [{ id: -1, label: intl.formatMessage(messages.NoValue) }, ...options];\n }\n this.setState({\n options,\n });\n });\n }\n\n selectedValueChanged(e) {\n const { onChange } = this.props;\n const { options } = this.state;\n\n const selectedOption = options.find(x => x.id === parseInt(e.target.value));\n this.setState({ selectedValue: selectedOption.id }, () =>\n onChange(selectedOption.id === -1 ? null : selectedOption.id),\n );\n }\n\n render() {\n const { options, selectedValue } = this.state;\n const { intl } = this.props;\n return (\n this.selectedValueChanged(e)}\n className=\"form-control\"\n value={selectedValue}\n >\n {!selectedValue && selectedValue !== 0 && (\n \n )}\n {options &&\n options.map(option => (\n \n {option.label}\n \n ))}\n \n );\n }\n}\n\nexport default injectIntl(EnumSelect);\n","import { defineMessages } from 'react-intl';\n\nconst messages = defineMessages({\n RelationGlobalActionsTooltip:\n 'Select one or more relations to execute a global action on these relations.',\n GlobalActions: 'Global actions',\n Relation: 'Relation',\n Compliance: 'Compliance',\n NoComplianciesFound: 'No compliancies found',\n ResetFilters: 'Reset filters',\n CountRelationsSelected: 'Selected {count} / {total} relations',\n SendEmail: 'Send email',\n SendEmailQueued:\n 'Emails for the selected relations are being sent. Click here to view its progress.',\n EmailSent: 'Email sent',\n Actions: 'Actions',\n MarkAsInapplicable: 'Mark as inapplicable',\n MarkAsApplicable: 'Mark as applicable',\n ChangesSaved: 'Changes saved',\n ExportToExcel: 'Export to Excel',\n ComplianceType: 'Compliance type',\n ToggleComplianceTypeApplicable: 'Toggle compliance type applicable',\n ComplianceMarkedAsInapplicable: 'The compliancies were marked as inapplicable',\n Loading: 'Loading',\n NotApplicable: 'Not applicable',\n ComplianciesWillBeCalculatedInTheBackground:\n 'The compliancies will be calculated in the background.',\n AMLEndScore: 'AML end score',\n ExportToExcelStarted: 'Export to Excel started',\n});\n\nexport default messages;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\n\nimport OkCancelModal from '@/shared/components/OkCancelModal';\n\nimport EnumSelect from '@/shared/components/input/EnumSelect';\nimport Checkbox from '@/shared/components/input/Checkbox';\nimport messages from './comliancyMessages';\n\nexport default class MarkCompliancyInapplicableModal extends Component {\n state = {\n complianceType: undefined,\n inapplicable: true,\n };\n\n static propTypes = {\n show: PropTypes.bool.isRequired,\n intl: intlShape.isRequired,\n onSave: PropTypes.func.isRequired,\n onClose: PropTypes.func.isRequired,\n };\n\n static defaultProps = {};\n\n onSave = () => {\n const { complianceType, inapplicable } = this.state;\n const { onSave } = this.props;\n return onSave({ complianceType, inapplicable });\n };\n\n closeModal = () => {\n const { onClose } = this.props;\n onClose();\n };\n\n selectedValueChanged = value => {\n this.setState({ complianceType: value });\n };\n\n render() {\n const { complianceType, inapplicable } = this.state;\n const { show, intl } = this.props;\n\n if (!show) return null;\n\n return (\n this.onSave()}\n >\n
\n
\n
\n \n
\n \n
\n
\n
\n
\n \n this.setState({\n inapplicable: value,\n })\n }\n />\n
\n
\n
\n
\n \n );\n }\n}\n","import React from 'react';\nimport classNames from 'classnames';\nimport PropTypes from 'prop-types';\n\nconst CompliancyStatusIcon = ({ status, large = true }) => (\n \n);\n\nCompliancyStatusIcon.propTypes = {\n status: PropTypes.oneOf([undefined, 0, 1, 2, 3]),\n large: PropTypes.bool,\n};\n\nCompliancyStatusIcon.defaultProps = {\n status: undefined,\n large: true,\n};\n\nexport default CompliancyStatusIcon;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { FaCaretDown } from 'react-icons/fa';\nimport classNames from 'classnames';\n/*\nThis component is only used here for a custom dropdown toggle. And needs to be a component\nhttps://5c507d49471426000887a6a7--react-bootstrap.netlify.com/components/dropdowns/#btn-dropdowns-custom\n*/\nexport default class HoverToggle extends React.Component {\n static propTypes = {\n onClick: PropTypes.func,\n title: PropTypes.string,\n children: PropTypes.node,\n className: PropTypes.string,\n };\n static defaultProps = {\n onClick: () => {},\n title: null,\n children: null,\n className: '',\n };\n handleClick = e => {\n e.preventDefault();\n // e.stopPropagation();\n const { onClick } = this.props;\n onClick(e);\n };\n render() {\n const { title, children, className } = this.props;\n return (\n \n {children}\n \n \n \n \n );\n }\n}\n","/* eslint-disable no-script-url */\n\nimport React from 'react';\nimport { Dropdown, MenuItem, OverlayTrigger, Tooltip } from 'react-bootstrap';\nimport { FormattedMessage, injectIntl } from 'react-intl';\nimport { formatListValue } from '@/shared/components/FormattedListValue';\nimport HoverToggle from '@/shared/components/HoverToggle';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport ToastrService from '@/shared/services/ToastrService';\nimport classNames from 'classnames';\nimport authService from '@/shared/services/AuthService';\n\nimport { SpinnerIcon } from '@/shared/components/Icons';\nimport CompliancyStatusIcon from './CompliancyStatusIcon';\nimport messages from './comliancyMessages';\n\nclass CompliancyStatusToggle extends React.PureComponent {\n state = {\n loading: false,\n };\n\n onToggleInapplicable = (relation, complianceType) => {\n const { intl, onComplianceUpdated } = this.props;\n this.setState({ loading: true }, () => {\n api.base\n .put(`${config.appUrls.api}/api/compliance/ToggleInapplicable`, null, {\n params: { relationId: relation.id, complianceType },\n })\n .then(({ data }) => {\n ToastrService.success(intl.formatMessage(messages.ChangesSaved));\n const { type, status, info } = data;\n\n this.setState(\n state => ({\n loading: false,\n statusInfo: state.statusInfo ? { ...state.statusInfo, [type]: info || [] } : null,\n }),\n () => onComplianceUpdated(relation.id, type, status),\n );\n })\n .catch(error => {\n this.setState({ loading: false }, () => handleHttpError(intl)(error));\n });\n });\n };\n\n loadStatusInfo = () => {\n const { statusInfoLoaded } = this.state;\n const { item, intl } = this.props;\n if (statusInfoLoaded) return;\n\n this.setState({ loadingStatusInfo: true }, () => {\n api.base\n .get(`${config.appUrls.api}/api/compliance/statusinfo?relationId=${item.id}`)\n .then(({ data }) => {\n this.setState({\n statusInfoLoaded: true,\n loadingStatusInfo: false,\n statusInfo: !data\n ? []\n : (data || []).reduce((o, i) => {\n o[i.type] = [...(o[i.type] || []), i]; // eslint-disable-line no-param-reassign\n return o;\n }, {}),\n });\n })\n .catch(error => {\n this.setState({ loadingStatusInfo: false }, () => handleHttpError(intl)(error));\n });\n });\n };\n\n render() {\n const { id, item, compliancyStatus, compliancyType, onNavigateCompliance, intl } = this.props;\n const { loading, loadingStatusInfo, statusInfo } = this.state;\n const status = compliancyStatus;\n if (status === null) return '';\n if (loading) return ;\n const canUpdate = authService.hasPermission({\n functionality: 'Relation',\n privilege: 'Update',\n });\n\n return (\n \n \n
\n \n \n {formatListValue({ id: compliancyType, list: 'compliancetype', intl })}\n \n
\n {status === 3 && (\n
\n {formatListValue({\n id: 10000,\n list: 'complianceinformation',\n values: {},\n intl,\n })}\n
\n )}\n {!loadingStatusInfo &&\n statusInfo &&\n status !== 3 &&\n statusInfo[compliancyType] &&\n statusInfo[compliancyType].length > 0 &&\n statusInfo[compliancyType].map((x, i) => (\n
\n {formatListValue({\n id: x.info,\n list: 'complianceinformation',\n values: x.parameters || {},\n intl,\n })}\n
\n ))}\n \n }\n >\n onNavigateCompliance(item, compliancyType, compliancyStatus)}>\n \n \n \n\n {canUpdate ? : null}\n \n {status !== 3 && (\n this.onToggleInapplicable(item, compliancyType)}>\n \n \n \n )}\n {status === 3 && (\n this.onToggleInapplicable(item, compliancyType)}>\n \n \n \n )}\n \n
\n );\n }\n}\n\nexport default injectIntl(CompliancyStatusToggle);\n","import React, { useMemo } from 'react';\nimport AuthService from '@/shared/services/AuthService';\nimport MenuItem from 'react-bootstrap/lib/MenuItem';\nimport PropTypes from 'prop-types';\n\nfunction MenuItemWithSecurity({ children, functionality, privilege, onSelect, id }) {\n const hasPermission = useMemo(\n () =>\n AuthService.hasPermission({\n functionality,\n privilege,\n }),\n [functionality, privilege],\n );\n if (!hasPermission) return null;\n\n return (\n \n {children}\n \n );\n}\n\nMenuItemWithSecurity.propTypes = {\n privilege: PropTypes.number.isRequired,\n functionality: PropTypes.number.isRequired,\n onSelect: PropTypes.func.isRequired,\n // eslint-disable-next-line react/require-default-props\n children: PropTypes.node,\n id: PropTypes.string.isRequired,\n};\nexport default MenuItemWithSecurity;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport DropdownButton from 'react-bootstrap/lib/DropdownButton';\nimport MenuItem from 'react-bootstrap/lib/MenuItem';\nimport { injectIntl } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport messages from './comliancyMessages';\nimport MenuItemWithSecurity from '@/shared/components/MenuItemWithSecurity';\nimport { functionalities, privileges } from '@/shared/services/AuthService';\n\nconst CompliancyGlobalActionsButton = (props) => {\n const { intl, disabled, onSendEmail, onMarkComplianceTypeAsInapplicable } = props;\n\n return (\n \n \n \n {intl.formatMessage(messages.ToggleComplianceTypeApplicable)}\n \n \n {intl.formatMessage(messages.SendEmail)}\n \n \n \n );\n};\n\nCompliancyGlobalActionsButton.propTypes = {\n intl: intlShape.isRequired,\n onSendEmail: PropTypes.func.isRequired,\n onMarkComplianceTypeAsInapplicable: PropTypes.func.isRequired,\n disabled: PropTypes.bool,\n};\n\nCompliancyGlobalActionsButton.defaultProps = { disabled: false };\n\nexport default injectIntl(CompliancyGlobalActionsButton);\n","const crmTypeSortKey = id => {\n switch (id) {\n case 3: // Customer\n return 0;\n case 2: // Prospect\n return 1;\n case 4: // Own company\n return 2;\n case 0: // Other\n return 3;\n default:\n // Unknown\n return 9;\n }\n};\nexport const crmTypeSorter = ({ id: a }, { id: b }) => {\n const sortA = crmTypeSortKey(a);\n const sortB = crmTypeSortKey(b);\n\n return sortA < sortB ? -1 : sortA > sortB;\n};\n\nexport default { crmType: crmTypeSorter };\n","// Mapping between compliancetype and relation field ids\n\nconst getFieldIdForCompliancy = (compliancy, status, relationType = null) => {\n switch (compliancy) {\n case 0: // assignment letter\n case 7: // authorization letter\n return '6b93b564-0865-488b-827a-480bc004d519';\n case 1: // risk assessment\n return '60f7a302-540f-47e9-a72f-2311362c57b5;aml-risk-assessment-section'; // AML\n case 2: // beneficiaries\n if (status === 0) return '2ca70dce-5a5d-49c1-a9d6-776c97e14fff'; // Linked relations\n return '60f7a302-540f-47e9-a72f-2311362c57b5';\n case 3: // id card\n if (relationType === 0) return '2ca70dce-5a5d-49c1-a9d6-776c97e14fff'; // Linked relations for companies\n return 'f0f34e57-46b0-4ebc-8954-73f4d9af4d4a';\n case 4: // authorizations\n return '3d6de6a8-b4f2-428a-a8f5-c5ee2467c913';\n case 5: // ubo\n return 'dce8c441-9525-455b-acb4-24c570f2d518';\n case 6: // identification\n if (status === 2) return '60f7a302-540f-47e9-a72f-2311362c57b5';\n return '60f7a302-540f-47e9-a72f-2311362c57b5;aml-documents-section';\n case 8: // detailed risk assessment\n if (status === 0)\n return '60f7a302-540f-47e9-a72f-2311362c57b5;aml-detailed-risk-assessment-section'; // AML\n return '60f7a302-540f-47e9-a72f-2311362c57b5;aml-documents-section'; // AML\n default:\n return null;\n }\n};\nexport default getFieldIdForCompliancy;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\n\nconst MultiSelectItem = ({ onRemove, name, className }) => (\n \n {name}{' '}\n onRemove()}>\n \n \n \n);\nMultiSelectItem.propTypes = {\n name: PropTypes.string.isRequired,\n onRemove: PropTypes.func,\n className: PropTypes.string,\n};\n\nMultiSelectItem.defaultProps = {\n onRemove: () => {},\n className: undefined,\n};\n\nexport default MultiSelectItem;\n","export var filterBehaviourOptions;\n(function (filterBehaviourOptions) {\n filterBehaviourOptions[filterBehaviourOptions[\"and\"] = 1] = \"and\";\n filterBehaviourOptions[filterBehaviourOptions[\"or\"] = 2] = \"or\";\n})(filterBehaviourOptions || (filterBehaviourOptions = {}));\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport { injectIntl, useIntl } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport enumCache from '@/shared/services/EnumCacheService';\nimport { crmTypeSorter } from '@/shared/utils/sorters';\n\nclass CrmTypeButtonGroup extends Component {\n state = {\n crmTypes: [],\n };\n\n componentDidMount() {\n const { intl, hiddenTypes } = this.props;\n enumCache.getTranslated('crmtype', intl, crmTypeSorter).then(crmTypes => {\n this.setState({\n crmTypes: crmTypes.filter(item => hiddenTypes.indexOf(item.id) < 0),\n });\n });\n }\n\n toggleRelationType = relType => {\n const { selectedTypes, onChange } = this.props;\n\n const idx = selectedTypes ? selectedTypes.indexOf(relType) : -1;\n if (idx >= 0) {\n onChange(selectedTypes.filter((_, i) => i !== idx));\n } else {\n onChange([...(selectedTypes || []), relType]);\n }\n };\n\n render() {\n const { crmTypes } = this.state;\n const { selectedTypes } = this.props;\n\n return (\n
\n {crmTypes &&\n crmTypes.map(t => (\n \n ))}\n
\n );\n }\n}\n\nCrmTypeButtonGroup.propTypes = {\n intl: intlShape.isRequired,\n selectedTypes: PropTypes.arrayOf(PropTypes.number),\n hiddenTypes: PropTypes.arrayOf(PropTypes.number),\n onChange: PropTypes.func.isRequired,\n};\n\nCrmTypeButtonGroup.defaultProps = {\n selectedTypes: [],\n hiddenTypes: [],\n};\n\nexport default injectIntl(CrmTypeButtonGroup);\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport React from 'react';\nimport classnames from 'classnames';\nimport Checkbox from './Checkbox';\nvar CheckboxMenu = React.forwardRef(function (_a, ref) {\n var items = _a.items, onItemChanged = _a.onItemChanged, disabled = _a.disabled, className = _a.className, itemClassName = _a.itemClassName;\n return (_jsx(\"ul\", __assign({ className: classnames('checkbox-list', className), role: \"menu\", ref: ref }, { children: items &&\n items.map(function (item) { return (_jsx(\"li\", __assign({ className: itemClassName, role: \"presentation\" }, { children: _jsx(Checkbox, { value: item.selected, text: item.label, disabled: disabled, role: \"menuitemcheckbox\", extraClass: \"\", onClick: function (selected) { return onItemChanged(item, selected); } }) }), item.id)); }) })));\n});\nCheckboxMenu.defaultProps = {\n disabled: false,\n className: undefined,\n itemClassName: undefined,\n};\nexport default CheckboxMenu;\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport React from 'react';\nimport RootCloseWrapper from 'react-overlays/lib/RootCloseWrapper';\nimport CheckboxMenu from './CheckboxMenu';\nvar CheckboxDropdownMenu = React.forwardRef(function (_a, ref) {\n var open = _a.open, onClose = _a.onClose, rootCloseEvent = _a.rootCloseEvent, props = __rest(_a, [\"open\", \"onClose\", \"rootCloseEvent\"]);\n return (_jsx(RootCloseWrapper, __assign({ disabled: !open, onRootClose: function (e) { return onClose(e, { source: 'rootClose' }); }, event: rootCloseEvent, ref: ref }, { children: _jsx(CheckboxMenu, __assign({}, props, { className: \"dropdown-menu\" })) })));\n});\nexport default CheckboxDropdownMenu;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { FaCheck, FaCheckDouble } from 'react-icons/fa';\n\nimport Downshift from 'downshift';\nimport AutosizeInput from 'react-input-autosize';\nimport classNames from 'classnames';\nimport { defineMessages, injectIntl } from 'react-intl';\nimport { matchSorter } from 'match-sorter';\nimport intlShape from '@/shared/utils/intlShape';\nimport Button from '@/shared/components/Button';\nimport { filterBehaviourOptions } from '@/modules/constants';\nimport MultiSelectItem from './MultiSelectItem';\nimport Item from '../select/Item';\nimport adminpulse from '@/shared/utils/adminpulse';\n\nexport const itemEquals = (a, b, caseSensitive) => {\n if (caseSensitive) return a === b;\n return adminpulse.ciEquals(a, b);\n};\n\nconst messages = defineMessages({\n NoItems: 'No items',\n OrFilter: 'OR filter',\n AndFilter: 'AND filter',\n});\n/**\n * Helper function to handle removing an item\n * @param {*} items The original selection\n * @param {*} item The item to remove\n * @param {*} [prop] The property to compare (default id)\n */\nexport const removeItem = (items, item, prop = 'id', caseSensitive = true) =>\n items.filter(x => !itemEquals(x, item.value[prop], caseSensitive));\n/**\n * Helper function to handle addin an item\n * @param {*} items The original selection\n * @param {*} item The item to add\n * @param {*} [prop] The property to compare (default id)\n */\nexport const addItem = (items, item, prop = 'id', caseSensitive = true) => {\n if (!item) return [];\n\n return [...items.filter(x => !itemEquals(x, item[prop], caseSensitive)), item[prop]];\n};\nexport const splitItems = (itemsArray, selectedArray, prop = 'id', caseSensitive = true) => {\n if (!itemsArray || !itemsArray.length) return [[], []]; // No items, return 2 empty arrays\n if (!selectedArray || !selectedArray.length) return [[], itemsArray]; // Nothing selected\n if (itemsArray.length === selectedArray.length) return [itemsArray, []]; // Everything selected\n // Mixed selection, splitting itemsArray into 2 arrays\n return itemsArray.reduce(\n (result, l) => {\n result[selectedArray.findIndex(x => itemEquals(x, l[prop], caseSensitive)) >= 0 ? 0 : 1].push(\n l,\n );\n return result;\n },\n [[], []],\n );\n};\n\nclass MultiSelect extends React.Component {\n constructor(props) {\n super(props);\n const { items, filterBehaviour } = props;\n this.state = {\n inputValue: '',\n availableItems: items || [],\n filteredItems: items || [],\n filterBehaviour: filterBehaviour || filterBehaviourOptions.and,\n };\n }\n\n // Needed because the list of items might not be initialized on mount (because of translations etc)\n componentDidUpdate(prevProps) {\n const { items, filterBehaviour } = this.props;\n if (prevProps.items !== items) {\n // eslint-disable-next-line react/no-did-update-set-state\n this.setState({\n availableItems: items || [],\n filteredItems: items || [],\n });\n }\n\n if (prevProps.filterBehaviour !== filterBehaviour) {\n // eslint-disable-next-line react/no-did-update-set-state\n this.setState({\n filterBehaviour,\n });\n }\n }\n handleInputValueChange = inputValue => {\n const filteredItems = this.filterItems(inputValue);\n this.setState({ filteredItems });\n };\n\n filterItems = value => {\n const { searchProps } = this.props;\n const { availableItems } = this.state;\n\n if (!value) {\n return availableItems;\n }\n\n const filteredItems = matchSorter(availableItems, value, {\n keys: searchProps ?? ['label'],\n threshold: matchSorter.rankings.ACRONYM,\n });\n return filteredItems;\n };\n\n onInputChange = event => {\n this.setState({ inputValue: event.target.value });\n };\n\n onInputKeyDown = (event, highlightedIndex) => {\n const currentValue = event.target.value;\n const { inputValue, filteredItems } = this.state;\n const { onCreateItem, items } = this.props;\n\n switch (event.keyCode) {\n case 8: // backspace\n if (!currentValue) {\n event.preventDefault();\n this.popValue();\n }\n break;\n case 46: // delete\n if (!inputValue) {\n event.preventDefault();\n this.popValue();\n }\n break;\n case 13: {\n const trimmed = (inputValue || '').trim();\n if (!!trimmed && typeof onCreateItem === 'function') {\n const isItemHighlighted =\n highlightedIndex !== null &&\n highlightedIndex >= 0 &&\n filteredItems.length > 0 &&\n highlightedIndex < filteredItems.length;\n\n if (isItemHighlighted) break;\n // Item selected, let other function handle add\n else {\n const matchingItem = items.find(x => x.label.toLowerCase() === trimmed.toLowerCase());\n if (matchingItem) {\n // Nothing selected and full match on name, add matched item\n this.onChange(matchingItem);\n break;\n }\n }\n\n onCreateItem(trimmed);\n // Reset filtered items back to all items if one was selected\n this.setState(() => ({\n inputValue: '',\n }));\n event.preventDefault();\n }\n break;\n }\n default:\n break;\n }\n };\n\n popValue() {\n const { selectedItem, onItemRemoved } = this.props;\n if (onItemRemoved) {\n onItemRemoved({\n value: selectedItem[selectedItem.length - 1],\n index: selectedItem.length - 1,\n });\n }\n }\n\n onWrapperClick = e => {\n this.focusOnInput();\n e.stopPropagation();\n e.preventDefault();\n };\n\n focusOnInput() {\n if (!this.input) return;\n this.input.focus();\n if (typeof this.input.getInput === 'function') {\n this.input.getInput().focus();\n }\n }\n\n onChange = item => {\n const { onItemSelected } = this.props;\n const { availableItems } = this.state;\n\n // Reset filtered items back to all items if one was selected\n this.setState({ filteredItems: availableItems, inputValue: '' });\n onItemSelected(item);\n };\n\n onFilterBehaviourChanged = () => {\n const { onFilterBehaviourChanged, selectedItem } = this.props;\n const { filterBehaviour } = this.state;\n\n const newFilterBehaviour =\n filterBehaviour === filterBehaviourOptions.and\n ? filterBehaviourOptions.or\n : filterBehaviourOptions.and;\n\n this.setState({ filterBehaviour: newFilterBehaviour }, () => {\n // only pass to parent component if any items are selected because the filter change will trigger an API call\n if (selectedItem?.length > 0) onFilterBehaviourChanged(newFilterBehaviour);\n });\n };\n\n handleBlur = closeMenu => {\n this.setState({ inputValue: '' });\n closeMenu();\n };\n\n render() {\n const {\n disabled,\n placeholder,\n onItemRemoved,\n onCreateItem,\n onItemSelected,\n itemClassNameFunc,\n intl,\n isSmall,\n withFilterBehaviour,\n renderItem,\n ...rest\n } = this.props;\n\n const { filteredItems, inputValue, filterBehaviour } = this.state;\n return (\n (item ? item.label : '')}\n onChange={this.onChange}\n {...rest}\n >\n {({\n getInputProps,\n getItemProps,\n isOpen,\n selectedItem,\n highlightedIndex,\n getToggleButtonProps,\n getMenuProps,\n closeMenu,\n }) => {\n const inputProps = getInputProps({\n value: inputValue,\n ref: inputRef => {\n this.input = inputRef;\n },\n inputClassName: 'multiselect-input',\n onChange: this.onInputChange,\n onKeyDown: e => this.onInputKeyDown(e, highlightedIndex),\n onBlur: () => this.handleBlur(closeMenu),\n disabled,\n });\n const selectedItems = selectedItem.map((item, index) => ({ value: item, index }));\n const hasItems = selectedItems.length > 0;\n\n return (\n
\n
\n
\n {selectedItems.map(item => (\n onItemRemoved(item)}\n name={item.value.label}\n className={itemClassNameFunc ? itemClassNameFunc(item.value) : undefined}\n />\n ))}\n \n
\n
\n \n \n \n
\n
\n
\n \n {isOpen && withFilterBehaviour && (\n <>\n
  • \n \n \n {filterBehaviour === filterBehaviourOptions.and && (\n \n )}\n {filterBehaviour === filterBehaviourOptions.or && (\n \n )}\n \n\n {intl.formatMessage(\n filterBehaviour === filterBehaviourOptions.or\n ? messages.OrFilter\n : messages.AndFilter,\n )}\n \n
  • \n\n
  • \n \n )}\n {isOpen &&\n filteredItems.map((item, index) => (\n \n ))}\n\n {isOpen && (\n \n {(!filteredItems || filteredItems.length < 1) &&\n intl.formatMessage(messages.NoItems)}\n \n )}\n \n
  • \n
    \n );\n }}\n \n );\n }\n}\n\nMultiSelect.propTypes = {\n items: PropTypes.arrayOf(PropTypes.any),\n selectedItem: PropTypes.arrayOf(PropTypes.any),\n disabled: PropTypes.bool,\n placeholder: PropTypes.string,\n isSmall: PropTypes.bool,\n onItemRemoved: PropTypes.func.isRequired,\n onItemSelected: PropTypes.func.isRequired,\n onCreateItem: PropTypes.func, // If function exists, passes inputValue on enter -> (inputValue)=>{ should add value to items and select item }\n\n /** Specify custom classname for items */\n itemClassNameFunc: PropTypes.func /* (item)=>classname string or object */,\n intl: intlShape.isRequired,\n withFilterBehaviour: PropTypes.bool,\n filterBehaviour: PropTypes.number,\n searchProps: PropTypes.arrayOf(PropTypes.string),\n};\nMultiSelect.defaultProps = {\n disabled: false,\n placeholder: null,\n isSmall: false,\n items: [],\n selectedItem: null,\n onCreateItem: undefined,\n itemClassNameFunc: undefined,\n withFilterBehaviour: false,\n filterBehaviour: 1,\n searchProps: ['label'],\n};\n\nexport default injectIntl(MultiSelect);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { defineMessages, injectIntl, useIntl } from 'react-intl';\n\nimport intlShape from '@/shared/utils/intlShape';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport MultiSelect, { addItem, removeItem, splitItems } from './MultiSelect';\n\nconst messages = defineMessages({\n OwnCompanies: 'Own companies',\n});\n\nfunction CompanyMultiSelect({ selection, onChange, intl, placeholder }) {\n const dataCache = DataCacheService.getDataCache();\n if (!dataCache) return null;\n const companies = dataCache.company\n .map(x => ({ ...x, label: x.name }))\n .sort(dynamicSort('label'));\n const [selectedItems, selectableItems] = splitItems(companies, selection);\n\n return (\n onChange(removeItem(selection, item))}\n onItemSelected={item => onChange(addItem(selection, item))}\n items={selectableItems}\n placeholder={placeholder || intl.formatMessage(messages.OwnCompanies)}\n />\n );\n}\n\nCompanyMultiSelect.propTypes = {\n selection: PropTypes.arrayOf(PropTypes.string).isRequired,\n onChange: PropTypes.func.isRequired, // (newSelection)=>{}\n placeholder: PropTypes.string,\n intl: intlShape.isRequired,\n};\n\nCompanyMultiSelect.defaultProps = {\n placeholder: null,\n};\n\nexport default injectIntl(CompanyMultiSelect);\n","import React, { useEffect, useState } from 'react';\nimport PropTypes from 'prop-types';\n\nimport { injectIntl, useIntl } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport MultiSelect, { addItem, removeItem, splitItems } from './MultiSelect';\n\n/**\n * Mapper used to map object from the datacache to items ({id,label})\n *\n * @callback dataCacheMultiSelectMapper\n * @param {Object} dataCache The dataCache object from the DataCacheService\n * @param {*} intl\n * @param {boolean} [showWithoutOption=false]\n * @returns Array of {id,label}\n */\n\n/**\n * Create DataCacheMultiSelect using mapper\n *\n * @param {dataCacheMultiSelectMapper} mapper The mapper\n * @param {Object} [placeholderMessage] The intl message for the placeholder\n */\nconst dataCacheMultiSelectHoc = (mapper, placeholderMessage = null) => {\n if (typeof mapper !== 'function') {\n console.error('Invalid dataCacheMultiSelect mapper');\n return null;\n }\n const DataCacheMultiSelect = ({ selection, onChange, intl, placeholder, showWithoutOption }) => {\n const [items, setItems] = useState([]);\n\n useEffect(() => {\n const dataCache = DataCacheService.getDataCache();\n if (!dataCache) return;\n\n setItems(mapper(dataCache, intl, showWithoutOption));\n }, [intl]);\n\n const [selectedItems, selectableItems] = splitItems(items, selection);\n\n return (\n onChange(removeItem(selection, item))}\n onItemSelected={item => onChange(addItem(selection, item))}\n items={selectableItems}\n placeholder={\n placeholder ||\n (placeholderMessage && placeholderMessage.id\n ? intl.formatMessage(placeholderMessage)\n : null)\n }\n />\n );\n };\n DataCacheMultiSelect.propTypes = {\n selection: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])),\n onChange: PropTypes.func.isRequired,\n placeholder: PropTypes.string,\n showWithoutOption: PropTypes.bool,\n intl: intlShape.isRequired,\n };\n DataCacheMultiSelect.defaultProps = {\n selection: [],\n placeholder: null,\n showWithoutOption: false,\n };\n\n return injectIntl(DataCacheMultiSelect);\n};\nexport default dataCacheMultiSelectHoc;\n","import PropTypes from 'prop-types';\nimport DataCacheService from '@/shared/services/DataCacheService';\n\nexport const hasMultipleCompanies = () => {\n const dataCache = DataCacheService.getDataCache();\n if (!dataCache) return false;\n const companies = dataCache.company;\n return !!companies && companies.length > 1;\n};\n\nconst HasMultiCompany = ({ children, fallback }) => {\n if (!children) return null;\n if (!hasMultipleCompanies()) return fallback;\n return children;\n};\n\nHasMultiCompany.propTypes = {\n children: PropTypes.node,\n fallback: PropTypes.node,\n};\nHasMultiCompany.defaultProps = {\n children: null,\n fallback: null,\n};\nexport default HasMultiCompany;\n","import { defineMessages } from 'react-intl';\nimport { dynamicSortMultiple } from '@/shared/utils/dynamicSort';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport DataCacheMultiSelectHoc from './DataCacheMultiSelectHoc';\n\nconst messages = defineMessages({\n LegalForms: 'Legal forms',\n WithoutLegalForm: 'Without legal form',\n});\n\nconst LegalFormMultiSelect = DataCacheMultiSelectHoc(\n (dataCache, intl, showWithoutOption = false) => {\n var items = dataCache.legalForm\n .map(x => ({\n id: x.id,\n label: intl.formatMessage(listItemMsg('legalform', x.id, x.description || '')),\n }))\n .sort(dynamicSortMultiple('label'));\n return showWithoutOption\n ? [{ id: -1, label: intl.formatMessage(messages.WithoutLegalForm) }, ...items]\n : items;\n },\n messages.LegalForms,\n);\n\nexport default LegalFormMultiSelect;\n","import React, { useEffect, useState } from 'react';\nimport PropTypes from 'prop-types';\n\nimport { injectIntl } from 'react-intl';\nimport EnumCacheService from '@/shared/services/EnumCacheService';\nimport intlShape from '@/shared/utils/intlShape';\nimport MultiSelect, { addItem, removeItem, splitItems } from './MultiSelect';\n\nconst EnumMultiSelect = ({\n type,\n sortById,\n selection,\n onChange,\n intl,\n placeholder,\n customItems,\n}) => {\n const [items, setItems] = useState([]);\n\n useEffect(() => {\n let mounted = true;\n EnumCacheService.getTranslated(type, intl, sortById).then(values => {\n if (mounted) setItems(values);\n });\n\n return () => {\n mounted = false;\n };\n }, [intl, type, sortById]);\n\n const allItems = [...customItems, ...items];\n\n const [selectedItems, selectableItems] = splitItems(allItems, selection);\n\n return (\n onChange(removeItem(selection, item))}\n onItemSelected={item => onChange(addItem(selection, item))}\n items={selectableItems}\n placeholder={placeholder}\n />\n );\n};\nEnumMultiSelect.propTypes = {\n type: PropTypes.string.isRequired,\n selection: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])),\n onChange: PropTypes.func.isRequired,\n placeholder: PropTypes.string,\n intl: intlShape.isRequired,\n sortById: PropTypes.bool,\n customItems: PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,\n label: PropTypes.string,\n }),\n ),\n};\nEnumMultiSelect.defaultProps = {\n selection: [],\n placeholder: null,\n sortById: false,\n customItems: [],\n};\n\nexport default injectIntl(EnumMultiSelect);\n","import React, { useState, useEffect } from 'react';\nimport PropTypes from 'prop-types';\n\nimport { injectIntl, defineMessages } from 'react-intl';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport intlShape from '@/shared/utils/intlShape';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport guid from '@/shared/utils/guid';\nimport MultiSelect, { removeItem, addItem, splitItems } from './MultiSelect';\n\nconst messages = defineMessages({\n WithoutTeams: 'Without teams',\n Teams: 'Teams',\n});\n\nconst TeamMultiSelect = ({ selection, onChange, intl, idProp }) => {\n const [items, setItems] = useState(intl);\n\n useEffect(() => {\n let mounted = true;\n api.base.get(`${config.appUrls.api}/api/team/MyTeams`).then(({ data }) => {\n if (!mounted) return;\n\n setItems([\n { id: guid.empty, label: intl.formatMessage(messages.WithoutTeams), code: 0 },\n ...data.map(({ id, name, code }) => ({ id, label: name, code })).sort(dynamicSort('label')),\n ]);\n });\n return () => {\n mounted = false;\n };\n }, [intl]);\n\n const [selectedItems, selectableItems] = splitItems(items, selection, idProp);\n\n return (\n onChange(removeItem(selection, item, idProp))}\n onItemSelected={item => onChange(addItem(selection, item, idProp))}\n items={selectableItems}\n placeholder={intl.formatMessage(messages.Teams)}\n />\n );\n};\nTeamMultiSelect.propTypes = {\n selection: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])),\n onChange: PropTypes.func.isRequired,\n intl: intlShape.isRequired,\n idProp: PropTypes.string,\n};\nTeamMultiSelect.defaultProps = {\n selection: [],\n idProp: 'id',\n};\n\nexport default injectIntl(TeamMultiSelect);\n","import React, { useEffect, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport moment from 'moment';\n\nimport { defineMessages, injectIntl, useIntl } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport MultiSelect, { addItem, removeItem, splitItems } from './MultiSelect';\n\nconst messages = defineMessages({\n EmptyFiscalYear: 'Without fiscal year',\n EndFiscalYear: 'End fiscal year',\n});\n\nfunction useFiscalYears(intl) {\n const [fiscalYears, setfiscalYears] = useState([]);\n const dataCache = DataCacheService.getDataCache();\n useEffect(() => {\n let mounted = true;\n if (dataCache && dataCache.fiscalYears) {\n setfiscalYears(dataCache.fiscalYears);\n } else {\n api.base.get(`${config.appUrls.api}/api/relation/fiscalYears`).then(({ data }) => {\n if (!mounted || !data || !data.length) return;\n const years = data.map(fiscalYear => ({\n id: fiscalYear,\n label: moment.utc(fiscalYear).format('D/MM'),\n }));\n if (dataCache) dataCache.fiscalYears = years;\n setfiscalYears(years);\n });\n }\n return () => {\n mounted = false;\n };\n }, [dataCache, dataCache.fiscalYears]);\n\n return [\n {\n id: '0001-01-01',\n label: intl.formatMessage(messages.EmptyFiscalYear),\n },\n ...fiscalYears,\n ];\n}\n\nconst EndFiscalYearMultiSelect = ({ selection, onChange, intl }) => {\n const items = useFiscalYears(intl);\n\n const [selectedItems, selectableItems] = splitItems(items, selection);\n\n return (\n onChange(removeItem(selection, item))}\n onItemSelected={item => onChange(addItem(selection, item))}\n items={selectableItems}\n placeholder={intl.formatMessage(messages.EndFiscalYear)}\n />\n );\n};\nEndFiscalYearMultiSelect.propTypes = {\n selection: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])),\n onChange: PropTypes.func.isRequired,\n intl: intlShape.isRequired,\n};\nEndFiscalYearMultiSelect.defaultProps = {\n selection: [],\n};\n\nexport default injectIntl(EndFiscalYearMultiSelect);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { defineMessages, injectIntl, useIntl } from 'react-intl';\nimport Axios from 'axios';\nimport intlShape from '@/shared/utils/intlShape';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport enumCache from '@/shared/services/EnumCacheService';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport MultiSelect, { addItem, removeItem, splitItems } from './MultiSelect';\n\nconst messages = defineMessages({\n InvoiceSchedules: 'Invoice schedules',\n NoInvoicingSchedule: 'No invoicing schedule',\n WithInvoicingSchedule: 'With invoicing schedule',\n InvoicingViaRelations: 'Invoicing via relations',\n});\n\nconst invoiceTypeKeys = {\n 0: '33333333-3333-3333-3333-333333333333',\n 1: '44444444-4444-4444-4444-444444444444',\n 2: '55555555-5555-5555-5555-555555555555',\n};\n\nclass InvoiceScheduleTypeMultiSelect extends React.Component {\n state = {\n items: [],\n };\n\n componentDidMount() {\n const { intl, hideInvoicingVia } = this.props;\n this.cancelToken = Axios.CancelToken.source();\n\n const invoiceSchedulesPromise = api.base.get(`${config.appUrls.api}/api/invoiceschedule/get`, {\n cancelToken: this.cancelToken.token,\n });\n\n Promise.all([enumCache.getTranslated('invoicingType', intl), invoiceSchedulesPromise]).then(\n ([invoicingTypes, { data: invoiceSchedules }]) => {\n const fixedItems = [\n {\n id: '00000000-0000-0000-0000-000000000000',\n label: intl.formatMessage(messages.NoInvoicingSchedule),\n },\n {\n id: '11111111-1111-1111-1111-111111111111',\n label: intl.formatMessage(messages.WithInvoicingSchedule),\n },\n ];\n if (!hideInvoicingVia) {\n fixedItems.push({\n id: '22222222-2222-2222-2222-222222222222',\n label: intl.formatMessage(messages.InvoicingViaRelations),\n });\n }\n const items = [\n ...fixedItems,\n ...invoicingTypes.map(x => ({\n ...x,\n id: invoiceTypeKeys[x.id],\n })),\n ...invoiceSchedules\n .map(x => ({\n id: x.id,\n label: intl.formatMessage(listItemMsg('invoiceschedule', x.id, x.name)),\n }))\n .sort(dynamicSort('label')),\n ];\n this.setState({ items });\n },\n );\n }\n componentWillUnmount() {\n if (typeof this.cancelToken !== 'undefined') {\n this.cancelToken.cancel('Operation canceled due to leaving page.');\n }\n }\n render() {\n const { selection, onChange, intl, placeholder } = this.props;\n const { items } = this.state;\n const [selectedItems, selectableItems] = splitItems(items, selection);\n\n return (\n onChange(removeItem(selection, item))}\n onItemSelected={item => onChange(addItem(selection, item))}\n items={selectableItems}\n placeholder={placeholder || intl.formatMessage(messages.InvoiceSchedules)}\n />\n );\n }\n}\n\nInvoiceScheduleTypeMultiSelect.propTypes = {\n selection: PropTypes.arrayOf(PropTypes.string).isRequired,\n onChange: PropTypes.func.isRequired, // (newSelection)=>{}\n placeholder: PropTypes.string,\n intl: intlShape.isRequired,\n hideInvoicingVia: PropTypes.bool,\n};\n\nInvoiceScheduleTypeMultiSelect.defaultProps = {\n placeholder: null,\n hideInvoicingVia: false,\n};\n\nexport default injectIntl(InvoiceScheduleTypeMultiSelect);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport { injectIntl, useIntl } from 'react-intl';\nimport enumCache from '@/shared/services/EnumCacheService';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport RelationTypeIcon from '@/shared/components/RelationTypeIcon';\nimport intlShape from '@/shared/utils/intlShape';\n\nclass RelationTypeButtonGroup extends Component {\n state = {\n relationTypes: [],\n };\n\n componentDidMount() {\n const { intl } = this.props;\n enumCache.get('relationtype').then(relationTypes => {\n this.setState({\n relationTypes: relationTypes\n .map(item => ({\n id: item.key,\n label: intl.formatMessage(listItemMsg('relationtype', item.key, item.value)),\n }))\n .sort(dynamicSort('label')),\n });\n });\n }\n\n toggleRelationType = relType => {\n const { selectedTypes = [], onChange } = this.props;\n const idx = selectedTypes.indexOf(relType);\n if (idx >= 0) {\n onChange(selectedTypes.filter((_, i) => i !== idx));\n } else {\n onChange([...selectedTypes, relType]);\n }\n };\n\n render() {\n const { relationTypes } = this.state;\n const { selectedTypes = [] } = this.props;\n\n return (\n
    \n {relationTypes &&\n relationTypes.map(t => (\n {\n document.activeElement.blur();\n this.toggleRelationType(t.id);\n }}\n type=\"button\"\n title={t.label}\n className={classnames('btn btn-default no-overflow', {\n active: selectedTypes.includes(t.id),\n })}\n >\n \n {t.label}\n \n ))}\n
    \n );\n }\n}\n\nRelationTypeButtonGroup.propTypes = {\n intl: intlShape.isRequired,\n selectedTypes: PropTypes.arrayOf(PropTypes.number),\n onChange: PropTypes.func.isRequired,\n};\n\nRelationTypeButtonGroup.defaultProps = {\n selectedTypes: [],\n};\n\nexport default injectIntl(RelationTypeButtonGroup);\n","import React, { Component } from 'react';\nimport { defineMessages, injectIntl, useIntl } from 'react-intl';\nimport PropTypes from 'prop-types';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport guid from '@/shared/utils/guid';\nimport config from '@/config';\nimport api from '@/shared/api';\nimport { hasAssignments } from '@/shared/components/security/HasAssignments';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport intlShape from '@/shared/utils/intlShape';\nimport Axios from 'axios';\n\nconst messages = defineMessages({\n AssignmentTemplate: 'Assignment template',\n DefaultAssignment: 'Default assignment',\n});\n\nclass AssignmentTemplateSelector extends Component {\n state = {\n templates: [],\n };\n\n componentDidMount() {\n if (!hasAssignments()) return;\n this.cancelToken = Axios.CancelToken.source();\n api.base\n .get(`${config.appUrls.api}/api/AssignmentTemplate/Get`, {\n cancelToken: this.cancelToken.token,\n })\n .then(({ data }) => {\n const { intl } = this.props;\n const templates = data\n .map(x => ({\n ...x,\n label: intl.formatMessage(listItemMsg('assignmenttemplate', x.id, x.name)),\n }))\n .sort(dynamicSort('label'));\n\n this.setState({\n templates,\n });\n });\n }\n\n render() {\n const { intl, onChange, value, placeholder, showDefaultAssignment } = this.props;\n const { templates } = this.state;\n\n if (!hasAssignments()) return null;\n\n const emptyObject =\n typeof placeholder !== 'undefined'\n ? placeholder\n : intl.formatMessage(messages.AssignmentTemplate);\n\n return (\n onChange(e.target.value || null)}\n >\n {!!emptyObject && }\n {!!showDefaultAssignment && (\n \n )}\n {templates &&\n templates.map(item => (\n \n ))}\n \n );\n }\n}\n\nAssignmentTemplateSelector.propTypes = {\n intl: intlShape.isRequired,\n onChange: PropTypes.func.isRequired,\n showDefaultAssignment: PropTypes.bool,\n value: PropTypes.string,\n placeholder: PropTypes.string,\n};\nAssignmentTemplateSelector.defaultProps = {\n value: null,\n placeholder: undefined, // Undefined will use standard placeholder, null or empty string will not display placeholder\n showDefaultAssignment: false,\n};\nexport default injectIntl(AssignmentTemplateSelector);\n","import React, { Component } from 'react';\nimport { injectIntl } from 'react-intl';\nimport PropTypes from 'prop-types';\nimport intlShape from '@/shared/utils/intlShape';\nimport moment from 'moment';\n\nconst getTranslation = (intl, message) => {\n if (!message) return null;\n if (typeof message === 'string') return message;\n if (message.id) return intl.formatMessage(message);\n return null;\n};\n\nclass YearSelect extends Component {\n static propTypes = {\n intl: intlShape.isRequired,\n value: PropTypes.number,\n onChange: PropTypes.func.isRequired,\n placeholder: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.shape({ id: PropTypes.string.isRequired }),\n ]),\n yearsInPast: PropTypes.number,\n yearsInFuture: PropTypes.number,\n withoutOption: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.shape({ id: PropTypes.string.isRequired }),\n ]),\n required: PropTypes.bool,\n };\n static defaultProps = {\n placeholder: null,\n value: null,\n yearsInPast: 5,\n yearsInFuture: 1,\n required: false,\n withoutOption: null,\n };\n\n state = {\n years: [],\n };\n\n componentDidMount() {\n const { yearsInPast, yearsInFuture } = this.props;\n const currentYear = moment.utc().year();\n const startYear = currentYear - Math.max(0, yearsInPast || 0);\n const endYear = currentYear + Math.max(0, yearsInFuture || 0);\n const years = [];\n for (let y = startYear; y <= endYear; y++) {\n years.push(y);\n }\n this.setState({ years });\n }\n\n selectedValueChanged(e) {\n const { onChange, withoutOption } = this.props;\n let value = parseInt(e.target.value);\n if (value === 0 && !!withoutOption) {\n onChange(0);\n return;\n }\n\n if (!value || value < 2000) value = null;\n onChange(value);\n }\n\n render() {\n const { years } = this.state;\n const {\n intl,\n value,\n placeholder,\n required,\n withoutOption,\n yearsInPast,\n yearsInFuture,\n ...otherProps\n } = this.props;\n const extraValue = !!value && years.indexOf(value) < 0;\n const placeholderLabel = getTranslation(intl, placeholder);\n const withoutOptionLabel = getTranslation(intl, withoutOption);\n return (\n this.selectedValueChanged(e)}\n value={value}\n >\n {(!required || !value) && }\n {withoutOptionLabel && }\n {extraValue && }\n {years &&\n years.map(y => (\n \n ))}\n \n );\n }\n}\n\nexport default injectIntl(YearSelect);\n","import React, { Component } from 'react';\nimport { defineMessages, injectIntl, useIntl } from 'react-intl';\nimport PropTypes from 'prop-types';\n\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport AuthService from '@/shared/services/AuthService';\nimport guid, { guid1 } from '@/shared/utils/guid';\nimport intlShape from '@/shared/utils/intlShape';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport AutoComplete from './select/AutoComplete';\n\nconst messages = defineMessages({\n SearchUser: 'Search user',\n Unassigned: 'Unassigned',\n AssignedToMe: 'Assigned to me',\n SystemUser: 'System user',\n});\n\nconst mapUser = (user) =>\n !user\n ? null\n : {\n key: user.id || user.key,\n label: user.name || user.label,\n employeeId: user.employeeId,\n isActive: user.isActive,\n hidden: user.hidden,\n };\n\nexport const getUserIdFromValue = (value) => {\n if (!value) return null;\n if (typeof value === 'string') return value; // Value = UserId\n if (typeof value === 'object') {\n if (value.id) return value.id;\n if (value.key) return value.key;\n }\n return null;\n};\n\nexport const userShape = PropTypes.shape({\n id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,\n name: PropTypes.string.isRequired,\n isActive: PropTypes.bool,\n hidden: PropTypes.bool,\n});\nexport const getUserClassName = ({ isActive = true }) => {\n if (isActive) return undefined;\n return 'removed-user';\n};\n\nclass UserSearch extends Component {\n state = {\n selectedUser: null,\n internalUsers: [],\n };\n\n constructor(props) {\n super(props);\n const userId = getUserIdFromValue(props.value);\n const users = this.initUsers(userId);\n const selectedUser = userId ? users.find((x) => x.key === userId) : null;\n\n this.state = {\n ...this.state,\n internalUsers: users,\n selectedUser,\n };\n if (!selectedUser && userId) {\n props.onChange(null);\n }\n }\n\n initUsers = (initialUserId) => {\n const {\n users,\n withUnassigned,\n withCurrentUser,\n intl,\n unassignedId,\n withSystemUser,\n includeInactiveUsers,\n } = this.props;\n let newUsers = users || [];\n\n // retrieve users if none were passed by parent component\n // if there is a userId passed, we always want to include this one.\n if (!newUsers.length) {\n newUsers = includeInactiveUsers\n ? DataCacheService.getAllUsers().filter((x) => !x.hidden || x.id === initialUserId)\n : DataCacheService.getUsers();\n }\n\n if (withSystemUser) {\n newUsers.unshift({\n id: guid1,\n name: intl.formatMessage(messages.SystemUser),\n });\n }\n if (withCurrentUser) {\n newUsers.unshift({\n id: AuthService.getUserId(),\n name: intl.formatMessage(messages.AssignedToMe),\n });\n }\n if (withUnassigned) {\n newUsers.unshift({\n id: unassignedId || null,\n name: intl.formatMessage(messages.Unassigned),\n });\n }\n return newUsers.map(mapUser);\n };\n\n onUserChanged = (user) => {\n if (user === undefined) return;\n const { onChange } = this.props;\n this.setState({ selectedUser: user });\n\n if (user === null) {\n onChange(null);\n } else {\n onChange({ id: user.key, name: user.label, employeeId: user.employeeId });\n }\n };\n\n componentDidUpdate(oldProps) {\n const { value, users, onChange } = this.props;\n const usersChanged = JSON.stringify(oldProps.users) !== JSON.stringify(users);\n const valueChanged = JSON.stringify(oldProps.value) !== JSON.stringify(value);\n if (!usersChanged && !valueChanged) return;\n // eslint-disable-next-line react/no-did-update-set-state\n this.setState(({ internalUsers }) => {\n const newUsers = usersChanged ? this.initUsers() : internalUsers;\n\n const userId = getUserIdFromValue(value);\n const selectedUser = userId ? newUsers.find((x) => x.key === userId) : null;\n if (!selectedUser && userId) {\n onChange(null);\n }\n return {\n internalUsers: newUsers,\n selectedUser,\n };\n });\n }\n\n render() {\n const { placeholder, intl, disabled, emptyLabel, hideClearButton, small } = this.props;\n const { selectedUser, internalUsers } = this.state;\n\n return (\n this.onUserChanged(item)}\n disabled={disabled}\n emptyLabel={emptyLabel}\n mode=\"edit\"\n value={selectedUser}\n canClear={!hideClearButton}\n itemClassNameFunc={getUserClassName}\n isSmall={small}\n />\n );\n }\n\n static propTypes = {\n placeholder: PropTypes.string,\n intl: intlShape.isRequired,\n users: PropTypes.arrayOf(userShape),\n onChange: PropTypes.func.isRequired, // Returns full user object, not just id\n disabled: PropTypes.bool,\n emptyLabel: PropTypes.string,\n value: PropTypes.oneOfType([\n userShape,\n PropTypes.shape({ id: PropTypes.string.isRequired }),\n PropTypes.string,\n ]),\n withUnassigned: PropTypes.bool,\n withCurrentUser: PropTypes.bool,\n withSystemUser: PropTypes.bool,\n unassignedId: PropTypes.string,\n hideClearButton: PropTypes.bool,\n small: PropTypes.bool,\n includeInactiveUsers: PropTypes.bool,\n };\n\n static defaultProps = {\n placeholder: null,\n disabled: false,\n emptyLabel: null,\n value: null,\n users: [],\n withUnassigned: false,\n withCurrentUser: false,\n withSystemUser: false,\n unassignedId: '',\n hideClearButton: false,\n small: false,\n includeInactiveUsers: false,\n };\n}\n\nexport default injectIntl(UserSearch);\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport guid from '@/shared/utils/guid';\nimport UserSearch from './UserSearch';\n\nconst RelationUserSearch = ({ value, onChange, ...rest }) => (\n onChange(user ? user.id : null)}\n value={value}\n withUnassigned\n unassignedId={guid.empty}\n withCurrentUser\n {...rest}\n />\n);\n\nRelationUserSearch.propTypes = {\n value: PropTypes.string,\n onChange: PropTypes.func.isRequired,\n withUnassigned: PropTypes.bool,\n withCurrentUser: PropTypes.bool,\n};\nRelationUserSearch.defaultProps = {\n value: null,\n withUnassigned: true,\n withCurrentUser: true,\n};\n\nexport default RelationUserSearch;\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport { injectIntl, useIntl, defineMessages } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport MultiSelect, { addItem, removeItem, splitItems } from './MultiSelect';\n\nconst messages = defineMessages({\n Yes: 'Yes',\n No: 'No',\n});\n\nconst YesNoSelect = ({ selection, onChange, intl, placeholder }) => {\n const items = [\n {\n id: true,\n label: intl.formatMessage(messages.Yes),\n },\n {\n id: false,\n label: intl.formatMessage(messages.No),\n },\n ];\n\n const [selectedItems, selectableItems] = splitItems(items, selection);\n\n return (\n onChange(removeItem(selection, item))}\n onItemSelected={item => onChange(addItem(selection, item))}\n items={selectableItems}\n placeholder={placeholder}\n />\n );\n};\nYesNoSelect.propTypes = {\n selection: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])),\n onChange: PropTypes.func.isRequired,\n placeholder: PropTypes.string,\n intl: intlShape.isRequired,\n};\n\nYesNoSelect.defaultProps = {\n selection: [],\n placeholder: null,\n};\n\nexport default injectIntl(YesNoSelect);\n","var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/* eslint-disable react/require-default-props */\nimport { defineMessages, useIntl } from 'react-intl';\nimport { useState, useEffect } from 'react';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport MultiSelect, { addItem, removeItem, splitItems } from './MultiSelect';\nimport guid from '@/shared/utils/guid';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nvar messages = defineMessages({\n WithoutRelationGroup: {\n id: 'WithoutRelationGroup',\n defaultMessage: 'Without relation group',\n },\n RelationGroups: {\n id: 'RelationGroups',\n defaultMessage: 'Relation groups',\n },\n});\nvar RelationGroupMultiSelect = function (_a) {\n var selection = _a.selection, placeholder = _a.placeholder, onChange = _a.onChange;\n var _b = useState([]), items = _b[0], setItems = _b[1];\n var intl = useIntl();\n useEffect(function () {\n var cancelled = false;\n api.base.get(\"\".concat(config.appUrls.api, \"/api/RelationGroup/GetAll\")).then(function (_a) {\n var data = _a.data;\n setItems(__spreadArray([\n { id: guid.empty, label: intl.formatMessage(messages.WithoutRelationGroup) }\n ], (data !== null && data !== void 0 ? data : []).map(function (x) { return ({ id: x.id, label: x.name }); }).sort(dynamicSort('label')), true));\n });\n return function () {\n cancelled = true;\n };\n }, [intl]);\n var _c = splitItems(items, selection), selectedItems = _c[0], selectableItems = _c[1];\n return (_jsx(MultiSelect, { selectedItem: selectedItems, onItemRemoved: function (item) { return onChange(removeItem(selection, item)); }, onItemSelected: function (item) { return onChange(addItem(selection, item)); }, items: selectableItems, placeholder: placeholder !== null && placeholder !== void 0 ? placeholder : intl.formatMessage(messages.RelationGroups) }));\n};\nexport default RelationGroupMultiSelect;\n","import { listItemMsg } from '@/shared/components/FormattedListValue';\nimport enumCache from '@/shared/services/EnumCacheService';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport { defineMessages, injectIntl, useIntl } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\n\nconst messages = defineMessages({\n SelectAValue: 'Select a value',\n NoValue: 'No value',\n});\n\nclass EnumSelectV2 extends Component {\n static defaultProps = {\n value: null,\n orderByLabel: false,\n allowNull: false,\n placeholder: undefined,\n };\n\n static propTypes = {\n intl: intlShape.isRequired,\n value: PropTypes.number,\n onChange: PropTypes.func.isRequired,\n enumType: PropTypes.string.isRequired,\n orderByLabel: PropTypes.bool,\n allowNull: PropTypes.bool,\n placeholder: PropTypes.string,\n };\n\n state = {\n options: [],\n };\n\n componentDidMount() {\n const { intl, enumType, orderByLabel, value } = this.props;\n enumCache.get(enumType).then(data => {\n let options = data.map(x => ({\n id: x.key,\n label: intl.formatMessage(listItemMsg(enumType, x.key, x.value)),\n }));\n if (orderByLabel) {\n options = options.sort(dynamicSort('label'));\n } else {\n options = options.sort(dynamicSort('id'));\n }\n this.setState({\n options,\n selectedValue: value,\n });\n });\n }\n\n selectedValueChanged(e) {\n const { onChange } = this.props;\n const { options } = this.state;\n if (e.target.value === '') {\n this.setState({ selectedValue: null }, () => onChange(null));\n } else {\n const selectedOption = options.find(x => x.id === parseInt(e.target.value));\n if (!selectedOption) {\n onChange(null);\n this.setState({ selectedValue: null });\n } else {\n onChange(selectedOption.id);\n this.setState({ selectedValue: selectedOption.id });\n }\n }\n }\n\n render() {\n const { options, selectedValue } = this.state;\n const { intl, placeholder, allowNull, value } = this.props;\n\n const hasItemSelected = !!value || value === 0;\n const showPlaceholder = allowNull || !hasItemSelected;\n\n return (\n this.selectedValueChanged(e)}\n className=\"form-control\"\n value={selectedValue}\n >\n {showPlaceholder && (\n \n )}\n {options &&\n options.map(option => (\n \n ))}\n \n );\n }\n}\n\nexport default injectIntl(EnumSelectV2);\n","export default {\n Responsible: { id: 'employeeprofile_1', defaultMessage: 'Responsible' },\n Assistant: { id: 'employeeprofile_2', defaultMessage: 'Assistant' },\n AssistantBackup: { id: 'employeeprofile_3', defaultMessage: 'Assistant backup' },\n Associate: { id: 'employeeprofile_4', defaultMessage: 'Associate' },\n BillingUser: { id: 'employeeprofile_5', defaultMessage: 'Billing user' },\n SeniorUser: { id: 'employeeprofile_6', defaultMessage: 'Senior user' },\n FilterResponsible: { id: 'employeeprofile_1', defaultMessage: 'Responsible' },\n FilterAssistant: { id: 'employeeprofile_2', defaultMessage: 'Assistant' },\n FilterAssistantBackup: { id: 'employeeprofile_3', defaultMessage: 'Assistant backup' },\n FilterAssociate: { id: 'employeeprofile_4', defaultMessage: 'Associate' },\n FilterBillingUser: { id: 'employeeprofile_5', defaultMessage: 'Billing user' },\n FilterSeniorUser: { id: 'employeeprofile_6', defaultMessage: 'Senior user' },\n};\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { defineMessages, FormattedMessage } from 'react-intl';\nimport isEqual from 'lodash-es/isEqual';\nimport TextSearch from '@/shared/components/input/TextSearch';\nimport Toggle from 'react-toggle';\nimport MultiSelect, {\n addItem as addMultiSelectItem,\n removeItem as removeMultiSelectItem,\n splitItems as splitMultiSelectItems,\n} from '@/shared/components/input/multiselect/MultiSelect';\nimport intlShape from '@/shared/utils/intlShape';\nimport CompanyMultiSelect from '@/shared/components/input/multiselect/CompanyMultiSelect';\nimport LegalFormMultiSelect from '@/shared/components/input/multiselect/LegalFormMultiSelect';\nimport { hasMultipleCompanies } from '@/shared/components/security/HasMultiCompany';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport { hasAssignments } from '@/shared/components/security/HasAssignments';\nimport EnumMultiSelect from '@/shared/components/input/multiselect/EnumMultiSelect';\nimport TeamMultiSelect from '@/shared/components/input/multiselect/TeamMultiSelect';\nimport EndFiscalYearMultiSelect from '@/shared/components/input/multiselect/EndFiscalYearMultiSelect';\nimport InvoiceScheduleTypeMultiSelect from '@/shared/components/input/multiselect/InvoiceScheduleTypeMultiSelect';\nimport AuthService from '@/shared/services/AuthService';\nimport RelationTypeButtonGroup from './RelationTypeButtonGroup';\nimport CrmTypeButtonGroup from './CrmTypeButtonGroup';\nimport AssignmentTemplateSelector from './input/AssignmentTemplateSelector';\nimport YearSelect from './input/YearSelect';\nimport RelationUserSearch from './input/RelationUserSearch';\nimport YesNoSelect from './input/multiselect/YesNoSelect';\nimport EnumSelectV2 from './input/EnumSelectV2';\nimport RelationGroupMultiSelect from './input/multiselect/RelationGroupMultiSelect';\n\nimport employeeProfileMessages from '../messages/employeeProfileMessages';\n\nconst messages = defineMessages({\n WithEmployeeLabels: 'With employee labels',\n WithoutEmployeeLabels: 'Without employee labels',\n OnlyActiveRelations: 'Only active relations',\n CommunicationChannelSearch: 'Communication (address, email, phone)',\n AssignedTo: 'Assigned to',\n CheckedOutUser: 'Checked out by',\n WithLabels: 'With labels',\n WithoutLabels: 'Without labels',\n CrmType: 'Crm type',\n RelationType: 'Relation type',\n LegalForms: 'Legal forms',\n OwnCompany: 'Own company',\n AssignmentTemplate: 'Assignment template',\n Sector: 'Sector',\n SocialSecretariat: 'Social secretariat',\n SocialSecurityFund: 'Social security fund',\n NotFilledOut: 'Not filled out',\n NoFinancialStatementScheme: 'No financial statement scheme',\n AccountingSoftware: 'Accounting software',\n Teams: 'Teams',\n SendInvoiceStrategy: 'Send invoice strategy',\n PeppolStatus: 'PEPPOL status',\n MixedTaxPayerVatDeductionMethod: 'Mixed tax payer VAT deduction method',\n MixedTaxPayer: 'Mixed tax payer',\n EmptyMixedTaxPayerVatDeductionMethod: 'Without mixed tax payer VAT deduction method',\n EndFiscalYear: 'End fiscal year',\n OtherSoftware: 'Other software',\n ReferenceYear: 'Reference year',\n WithoutReferenceYear: 'Without reference year',\n FinancialStatementScheme: 'FinancialStatementScheme',\n InvoiceSchedules: 'Invoice schedules',\n EmployeeType: 'Employee type',\n RelationGroups: 'Relation groups',\n VatPeriodicity: 'VAT periodicity',\n});\n\nconst filterObjects = [\n { id: 'crmType', label: messages.CrmType },\n { id: 'crmTypes', label: messages.CrmType },\n { id: 'relationType', label: messages.RelationType },\n { id: 'relationTypes', label: messages.RelationType },\n { id: 'legalForms', label: messages.LegalForms },\n { id: 'responsible', label: employeeProfileMessages.Responsible },\n { id: 'assistant', label: employeeProfileMessages.Assistant },\n { id: 'associate', label: employeeProfileMessages.Associate },\n { id: 'assistantBackup', label: employeeProfileMessages.AssistantBackup },\n { id: 'billingUser', label: employeeProfileMessages.BillingUser },\n { id: 'seniorUser', label: employeeProfileMessages.SeniorUser },\n { id: 'assignedTo', label: messages.AssignedTo },\n { id: 'checkedOutUser', label: messages.CheckedOutUser },\n { id: 'withLabels', label: messages.WithLabels },\n { id: 'withoutLabels', label: messages.WithoutLabels },\n { id: 'withEmployeeLabels', label: messages.WithEmployeeLabels },\n { id: 'withoutEmployeeLabels', label: messages.WithoutEmployeeLabels },\n {\n id: 'ownCompanies',\n label: messages.OwnCompany,\n enabled: () => hasMultipleCompanies(),\n },\n {\n id: 'assignmentTemplateId',\n label: messages.AssignmentTemplate,\n enabled: () => hasAssignments(),\n },\n { id: 'sector', label: messages.Sector },\n { id: 'sectors', label: messages.Sector },\n { id: 'socialSecretariat', label: messages.SocialSecretariat },\n { id: 'socialSecretariats', label: messages.SocialSecretariat },\n { id: 'socialSecurityFund', label: messages.SocialSecurityFund },\n { id: 'socialSecurityFunds', label: messages.SocialSecurityFund },\n { id: 'accountingSoftware', label: messages.AccountingSoftware },\n { id: 'teamCodes', label: messages.Teams },\n { id: 'sendInvoiceStrategy', label: messages.SendInvoiceStrategy },\n { id: 'peppolStatus', label: messages.PeppolStatus },\n { id: 'mixedTaxPayerVatDeductionMethod', label: messages.MixedTaxPayerVatDeductionMethod },\n { id: 'mixedTaxPayer', label: messages.MixedTaxPayer },\n { id: 'endFiscalYears', label: messages.EndFiscalYear },\n { id: 'otherSoftware', label: messages.OtherSoftware },\n { id: 'financialStatementSchemes', label: messages.FinancialStatementScheme },\n { id: 'invoiceScheduleTypes', label: messages.InvoiceSchedules },\n {\n id: 'referenceYear',\n label: messages.ReferenceYear,\n enabled: () => AuthService.hasFeature('ReferenceYear'),\n },\n { id: 'employeeType', label: messages.EmployeeType },\n { id: 'relationGroups', label: messages.RelationGroups },\n { id: 'vatPeriodicities', label: messages.VatPeriodicity },\n { id: 'vatPeriodicity', label: messages.VatPeriodicity },\n { id: 'communicationChannelSearchValue', label: messages.CommunicationChannelSearch },\n { id: 'onlyActiveRelations', label: messages.OnlyActiveRelations },\n];\nconst getEnabledFilters = dynamicFilters =>\n dynamicFilters.filter(f => {\n if (typeof f.enabled === 'undefined') return true;\n if (typeof f.enabled === 'function') return !!f.enabled();\n return !!f.enabled;\n });\n\nexport const getDynamicFiltersByKey = (keys = [], ignore = []) =>\n filterObjects.filter(x => keys.indexOf(x.id) >= 0 && ignore.indexOf(x.id) < 0);\n\nexport const getDynamicFiltersFromDefaultFilters = (defaultFilterObject = {}, ...ignore) => {\n const keys = Object.keys(defaultFilterObject);\n return getDynamicFiltersByKey(keys, ignore.flat());\n};\n\nexport const initDynamicFilters = (\n intl,\n dynamicFilters = [], // Dynamic filters {id,label}\n visibleFilters = [], // Keys from storage\n filterObject = {}, // Filter object from state\n defaultFilterObject = {}, // The default filters\n) =>\n getEnabledFilters(dynamicFilters)\n .map(({ id, label }) => ({\n id,\n label: label && label.id ? intl.formatMessage(label) : label?.toString(),\n selected: visibleFilters.includes(id) || !isEqual(filterObject[id], defaultFilterObject[id]),\n }))\n .sort(dynamicSort('label'));\n// Use this when selecting a saved filter\nexport const resetDynamicFilters = (dynamicFilters, filterObject, defaultFilterObject) =>\n dynamicFilters.map(x => ({\n ...x,\n selected: x.selected || !isEqual(filterObject[x.id], defaultFilterObject[x.id]),\n }));\n\nexport const handleDynamicFiltersChanged = (\n dynamicFilters,\n item,\n selected,\n filterObject,\n defaultFilterObject,\n) =>\n dynamicFilters.map(x => {\n if (item.id === 'selectall') {\n if (!selected && !isEqual(filterObject[x.id], defaultFilterObject[x.id]))\n return { ...x, selected: true }; // Keep used filter on screen\n return { ...x, selected };\n }\n if (x.id === item.id) {\n return { ...x, selected };\n }\n return x;\n });\n\nconst DynamicFilter = props => {\n const {\n type,\n filters,\n filterChanged,\n intl,\n labels = [],\n employeeLabels = [],\n renderCustomFilter,\n relationUserSearchParams = {},\n labelsIdProp = 'label',\n collClass,\n } = props;\n switch (type) {\n case 'crmType':\n case 'crmTypes':\n return (\n
    \n
    \n {\n filterChanged({ [type]: value });\n }}\n />\n
    \n
    \n );\n case 'relationType':\n case 'relationTypes':\n return (\n
    \n
    \n {\n filterChanged({ [type]: value });\n }}\n />\n
    \n
    \n );\n case 'legalForms':\n return (\n
    \n
    \n filterChanged({ legalForms: selection })}\n showWithoutOption\n />\n
    \n
    \n );\n case 'responsible':\n return (\n
    \n
    \n filterChanged({ responsible: userId })}\n value={filters.responsible}\n placeholder={intl.formatMessage(employeeProfileMessages.FilterResponsible)}\n />\n
    \n
    \n );\n case 'assistant':\n return (\n
    \n
    \n filterChanged({ assistant: userId })}\n value={filters.assistant}\n placeholder={intl.formatMessage(employeeProfileMessages.FilterAssistant)}\n />\n
    \n
    \n );\n case 'associate':\n return (\n
    \n
    \n filterChanged({ associate: userId })}\n value={filters.associate}\n placeholder={intl.formatMessage(employeeProfileMessages.FilterAssociate)}\n />\n
    \n
    \n );\n case 'assistantBackup':\n return (\n
    \n
    \n filterChanged({ assistantBackup: userId })}\n value={filters.assistantBackup}\n placeholder={intl.formatMessage(employeeProfileMessages.FilterAssistantBackup)}\n />\n
    \n
    \n );\n case 'billingUser':\n return (\n
    \n
    \n filterChanged({ billingUser: userId })}\n value={filters.billingUser}\n placeholder={intl.formatMessage(employeeProfileMessages.FilterBillingUser)}\n />\n
    \n
    \n );\n case 'seniorUser':\n return (\n
    \n
    \n filterChanged({ seniorUser: userId })}\n value={filters.seniorUser}\n placeholder={intl.formatMessage(employeeProfileMessages.FilterSeniorUser)}\n />\n
    \n
    \n );\n case 'assignedTo':\n return (\n
    \n
    \n filterChanged({ assignedTo: userId })}\n value={filters.assignedTo}\n placeholder={intl.formatMessage(messages.AssignedTo)}\n />\n
    \n
    \n );\n case 'checkedOutUser':\n return (\n
    \n
    \n filterChanged({ checkedOutUser: userId })}\n value={filters.checkedOutUser}\n placeholder={intl.formatMessage(messages.CheckedOutUser)}\n withUnassigned={false}\n withCurrentUser={false}\n />\n
    \n
    \n );\n case 'withLabels': {\n const [selectedLabels, availableLabels] = splitMultiSelectItems(\n labels,\n filters.withLabels,\n labelsIdProp,\n );\n return (\n
    \n
    \n \n filterChanged({\n withLabels: removeMultiSelectItem(filters.withLabels, item, labelsIdProp),\n })\n }\n onItemSelected={item =>\n filterChanged({\n withLabels: addMultiSelectItem(filters.withLabels, item, labelsIdProp),\n })\n }\n items={availableLabels}\n placeholder={intl.formatMessage(messages.WithLabels)}\n onFilterBehaviourChanged={filterBehaviour => {\n filterChanged({\n filterBehaviours: {\n withLabels: filterBehaviour,\n },\n });\n }}\n filterBehaviour={filters.filterBehaviours?.withLabels}\n withFilterBehaviour={typeof filters.filterBehaviours?.withLabels !== 'undefined'}\n />\n
    \n
    \n );\n }\n case 'withEmployeeLabels': {\n const [selectedLabels, availableLabels] = splitMultiSelectItems(\n employeeLabels,\n filters.withEmployeeLabels,\n labelsIdProp,\n );\n return (\n
    \n
    \n \n filterChanged({\n withEmployeeLabels: removeMultiSelectItem(\n filters.withEmployeeLabels,\n item,\n labelsIdProp,\n ),\n })\n }\n onItemSelected={item =>\n filterChanged({\n withEmployeeLabels: addMultiSelectItem(\n filters.withEmployeeLabels,\n item,\n labelsIdProp,\n ),\n })\n }\n items={availableLabels}\n placeholder={intl.formatMessage(messages.WithEmployeeLabels)}\n onFilterBehaviourChanged={filterBehaviour => {\n filterChanged({\n filterBehaviours: {\n withEmployeeLabels: filterBehaviour,\n },\n });\n }}\n filterBehaviour={filters.filterBehaviours?.withEmployeeLabels}\n withFilterBehaviour={\n typeof filters.filterBehaviours?.withEmployeeLabels !== 'undefined'\n }\n />\n
    \n
    \n );\n }\n case 'withoutLabels': {\n const [selectedLabels, availableLabels] = splitMultiSelectItems(\n labels,\n filters.withoutLabels,\n labelsIdProp,\n );\n\n return (\n
    \n
    \n \n filterChanged({\n withoutLabels: removeMultiSelectItem(filters.withoutLabels, item, labelsIdProp),\n })\n }\n onItemSelected={item =>\n filterChanged({\n withoutLabels: addMultiSelectItem(filters.withoutLabels, item, labelsIdProp),\n })\n }\n items={availableLabels}\n placeholder={intl.formatMessage(messages.WithoutLabels)}\n />\n
    \n
    \n );\n }\n case 'withoutEmployeeLabels': {\n const [selectedLabels, availableLabels] = splitMultiSelectItems(\n employeeLabels,\n filters.withoutEmployeeLabels,\n labelsIdProp,\n );\n\n return (\n
    \n
    \n \n filterChanged({\n withoutEmployeeLabels: removeMultiSelectItem(\n filters.withoutEmployeeLabels,\n item,\n labelsIdProp,\n ),\n })\n }\n onItemSelected={item =>\n filterChanged({\n withoutEmployeeLabels: addMultiSelectItem(\n filters.withoutEmployeeLabels,\n item,\n labelsIdProp,\n ),\n })\n }\n items={availableLabels}\n placeholder={intl.formatMessage(messages.WithoutEmployeeLabels)}\n />\n
    \n
    \n );\n }\n case 'ownCompanies': {\n return hasMultipleCompanies() ? (\n
    \n
    \n filterChanged({ ownCompanies: companies })}\n />\n
    \n
    \n ) : null;\n }\n case 'assignmentTemplateId': {\n return hasAssignments() ? (\n
    \n
    \n filterChanged({ assignmentTemplateId: id || null })}\n showDefaultAssignment\n />\n
    \n
    \n ) : null;\n }\n case 'sector':\n case 'sectors':\n return (\n
    \n
    \n {\n filterChanged({ [type]: value });\n }}\n placeholder={intl.formatMessage(messages.Sector)}\n />\n
    \n
    \n );\n case 'socialSecretariat':\n case 'socialSecretariats':\n return (\n
    \n
    \n {\n filterChanged({ [type]: value });\n }}\n placeholder={intl.formatMessage(messages.SocialSecretariat)}\n customItems={[\n {\n id: -1,\n label: intl.formatMessage(messages.NotFilledOut),\n },\n ]}\n />\n
    \n
    \n );\n case 'socialSecurityFund':\n case 'socialSecurityFunds':\n return (\n
    \n
    \n {\n filterChanged({ [type]: value });\n }}\n placeholder={intl.formatMessage(messages.SocialSecurityFund)}\n customItems={[\n {\n id: -1,\n label: intl.formatMessage(messages.NotFilledOut),\n },\n ]}\n />\n
    \n
    \n );\n case 'accountingSoftware':\n return (\n
    \n
    \n {\n filterChanged({ [type]: value });\n }}\n placeholder={intl.formatMessage(messages.AccountingSoftware)}\n />\n
    \n
    \n );\n case 'financialStatementSchemes':\n return (\n
    \n
    \n {\n filterChanged({ [type]: value });\n }}\n placeholder={intl.formatMessage(messages.FinancialStatementScheme)}\n customItems={[\n {\n id: -1,\n label: intl.formatMessage(messages.NoFinancialStatementScheme),\n },\n ]}\n />\n
    \n
    \n );\n case 'sendInvoiceStrategy':\n return (\n
    \n
    \n {\n filterChanged({ [type]: value });\n }}\n placeholder={intl.formatMessage(messages.SendInvoiceStrategy)}\n />\n
    \n
    \n );\n case 'invoiceScheduleTypes':\n return (\n
    \n
    \n {\n filterChanged({ [type]: value });\n }}\n />\n
    \n
    \n );\n case 'peppolStatus':\n return (\n
    \n
    \n {\n filterChanged({ [type]: value });\n }}\n placeholder={intl.formatMessage(messages.PeppolStatus)}\n />\n
    \n
    \n );\n case 'teamCodes': {\n return (\n
    \n
    \n filterChanged({ [type]: value })}\n idProp=\"code\"\n />\n
    \n
    \n );\n }\n case 'mixedTaxPayerVatDeductionMethod':\n return (\n
    \n
    \n {\n filterChanged({ [type]: value });\n }}\n placeholder={intl.formatMessage(messages.MixedTaxPayerVatDeductionMethod)}\n />\n
    \n
    \n );\n case 'mixedTaxPayer':\n return (\n
    \n
    \n {\n filterChanged({ [type]: value });\n }}\n placeholder={intl.formatMessage(messages.MixedTaxPayer)}\n />\n
    \n
    \n );\n\n case 'endFiscalYears': {\n return (\n
    \n
    \n filterChanged({ endFiscalYears })}\n />\n
    \n
    \n );\n }\n case 'otherSoftware':\n return (\n
    \n
    \n {\n filterChanged({ [type]: value });\n }}\n placeholder={intl.formatMessage(messages.OtherSoftware)}\n customItems={[\n {\n id: -1,\n label: intl.formatMessage(messages.NotFilledOut),\n },\n ]}\n />\n
    \n
    \n );\n case 'referenceYear':\n return (\n
    \n
    \n {\n filterChanged({ [type]: value });\n }}\n placeholder={intl.formatMessage(messages.ReferenceYear)}\n withoutOption={intl.formatMessage(messages.WithoutReferenceYear)}\n />\n
    \n
    \n );\n case 'employeeType':\n return (\n
    \n
    \n {\n filterChanged({ [type]: value });\n }}\n />\n
    \n
    \n );\n case 'relationGroups':\n return (\n
    \n
    \n {\n filterChanged({ [type]: value });\n }}\n />\n
    \n
    \n );\n case 'vatPeriodicities':\n return (\n
    \n
    \n {\n filterChanged({ [type]: value });\n }}\n placeholder={intl.formatMessage(messages.VatPeriodicity)}\n />\n
    \n
    \n );\n case 'communicationChannelSearchValue':\n return (\n
    \n
    \n filterChanged({ [type]: value })}\n />\n
    \n
    \n );\n case 'onlyActiveRelations':\n return (\n
    \n
    \n \n
    \n
    \n );\n default:\n return renderCustomFilter(props);\n }\n};\nDynamicFilter.propTypes = {\n type: PropTypes.string.isRequired,\n filters: PropTypes.shape({}).isRequired,\n filterChanged: PropTypes.func.isRequired,\n intl: intlShape.isRequired,\n labels: PropTypes.arrayOf(PropTypes.shape({})),\n renderCustomFilter: PropTypes.func,\n relationUserSearchParams: PropTypes.shape({}),\n labelsIdProp: PropTypes.string,\n collClass: PropTypes.string,\n};\nDynamicFilter.defaultProps = {\n labels: [],\n renderCustomFilter: props => null, // eslint-disable-line\n relationUserSearchParams: {},\n labelsIdProp: 'label',\n collClass: 'col-lg-4 col-sm-6',\n};\nexport default DynamicFilter;\n","import { defineMessages } from 'react-intl';\n\nconst messages = defineMessages({\n WithAssignments: 'With assignments',\n WithTeams: 'With teams',\n WithoutTeams: 'Without teams',\n StartDate: 'Start date',\n StartDateFrom: 'Start date from',\n StartDateUntil: 'Start date until',\n Name: 'Name',\n LastName: 'Last name',\n FirstName: 'First name',\n Infix: 'Infix',\n Initials: 'Initials',\n Alias: 'Commerciele naam',\n Location: 'Location',\n Phone: 'Phone',\n Email: 'Email',\n Active: 'Active',\n Status: 'Status',\n Delete: 'Delete',\n NoRelationsFound: 'No relations found',\n Relations: 'Relations',\n VatPending: 'VAT pending',\n Export: 'Export',\n ExportRelations: 'Export relations',\n ExportAuthorizations: 'Export authorizations',\n ExportLinkedRelations: 'Export linked relations',\n ExportFiscalSections: 'Export fiscal sections',\n ExportCommunicationChannels: 'Export communication channels',\n ExportCommunicationSettings: 'Export communication settings',\n VatOrEnterpriseNumber: 'VAT/Enterprise number',\n Yes: 'Yes',\n No: 'No',\n Template: 'Template',\n DeleteRelation: 'Delete relation',\n NoTemplatesFound: 'No templates found',\n OpenEmailTemplates: 'Open email templates',\n NoEmailTemplateFoundInLanguage: 'No email template was found in {language}',\n ChooseTemplate: 'Choose template',\n Templates: 'Templates',\n PlaceholdersWillBeResolvedByAdminPulse: 'The visible placeholders will be resolved by AdminPulse',\n DeleteRelationConfirmationMsg:\n 'Are you sure you want to delete this relation? All tasks and task schedules linked to this relation will be deleted as well.',\n RelationPutInactive:\n 'Relation put inactive because registrations and/or invoices exist for this relation, or because this relation is linked to another relation file',\n Type: 'Type',\n Add: 'Add',\n CountRelationsSelected: 'Selected {count} / {total} relations',\n\n ClearFilter: 'Clear filter',\n SetTaskSchedulingQueued:\n 'Task schedules for the selected relations will be added shortly. Click here to view its progress.',\n SetTaskScheduling: 'Set task scheduling',\n GlobalActions: 'Global actions',\n UpdateField: 'Update field',\n\n NaceCode: 'NACE code',\n SelectAField: 'Select a field',\n SelectAnEmployee: 'Select an employee',\n UpdateFieldQueued:\n 'The field for the selected relations will be updated shortly. Click here to view its progress.',\n ExportToExcel: 'Export to excel',\n SearchRelations: 'Search',\n IncludeInactiveRelations: 'Show inactive',\n PaymentMethod: 'Payment method',\n ResetFilters: 'Reset filters',\n LegalForms: 'Legal forms',\n WithLabels: 'With labels',\n WithoutLabels: 'Without labels',\n FilterLinkType: 'Filter on link type',\n FilterLinkTypeReverse: 'Filter on link type (reverse)',\n LinkType: 'Link type',\n LinkTypeReverse: 'Link type (reverse)',\n NewRegistration: 'New registration',\n NewRegistrationsQueued: 'New registrations will be created shortly.',\n SetInvoiceSchedule: 'Set invoice schedule',\n\n RelationGlobalActionsTooltip:\n 'Select one or more relations to execute a global action on these relations.',\n CreateTaskWithoutPlanning: 'Create task without planning',\n CreateTaskQueued:\n 'The task will be added shortly to all selected relations. Click here to view its progress.',\n OpenTimeline: 'Open timeline',\n AuditLog: 'Audit log',\n Actions: 'Actions',\n MsgEmailAttachmentUploadFailed: 'An error occurred when uploading the email attachment',\n SendEmail: 'Send email',\n SendEmailQueued:\n 'Emails for the selected relations are being sent. Click here to view its progress.',\n EmailContentRequired: 'The email must have content.',\n ClickHereToCreateFreeTextEmail:\n 'Choose a template or click here to start typing an email without template.',\n Placeholders: 'Placeholders',\n UseThesePlaceholdersInYourEmail: 'Use these placeholders in your e-mail.',\n AddOrRemoveTeams: 'Add or remove teams',\n AddTeamToRelationQueued:\n 'The team will be added to the selected relations shortly. Click here to view its progress.',\n RemoveTeamFromRelationQueued:\n 'The team will be removed from the selected relations shortly. Click here to view its progress.',\n\n Action: 'Action',\n Team: 'Team',\n AddTeam: 'Add team',\n RemoveTeam: 'Remove team',\n SelectATeam: 'Select a team',\n UpdateRelationTeamNotInATeam: 'You are not assigned to a team',\n ClickHereToGoToTeamSettings: 'Click here to go to the teams setting page',\n SelectAValue: 'Select a value',\n Unassigned: 'Unassigned',\n AdvanceFilters: 'Advanced filters',\n HideFilters: 'Hide filters',\n VatPeriodicity: 'VAT periodicity',\n All: 'All',\n EmptyFiscalYear: 'Without fiscal year',\n ChooseDate: 'Choose date',\n EndFiscalYear: 'End fiscal year',\n NotSubjectToVAT: 'Not subject to VAT',\n EmptyVATPeriodicity: 'Empty VAT periodicity',\n AddOrRemoveTags: 'Add or remove tags',\n RemoveTags: 'Remove tags',\n AddTags: 'Add tags',\n Tags: 'Tags',\n EnterTag: 'Enter tag',\n AddTagsToRelationQueued: 'The label(s) will be added to the selected relations shortly.',\n RemoveTagsFromRelationQueued: 'The label(s) will be removed from the selected relations shortly.',\n AddOrRemoveTaskSchedule: 'Add or remove task schedule',\n Deadline: 'Deadline',\n StartPlanning: 'Start planning',\n EndPlanning: 'End planning',\n TaskTemplate: 'Task template',\n Schedule: 'Schedule',\n AddTaskSchedule: 'Add task schedule',\n RemoveTaskSchedule: 'Remove task schedule',\n DeletePlannedTasks: 'Delete planned tasks',\n DeletePlannedTasksTooltip:\n 'This will delete all tasks that were created by this schedule from the taskboard and other task screens.',\n DeleteTaskScheduleQueued: 'The task schedules will be deleted shortly.',\n SetInvoiceScheduleQueued:\n 'Invoice schedules for the selected relations will be added shortly. Click here to view its progress.',\n VatNumber: 'VAT number',\n NationalNumber: 'National number',\n FilterLanguage: 'Filter on language',\n Language: 'Language',\n FilterCountry: 'Filter on country',\n Country: 'Country',\n Teams: 'Teams',\n OwnCompany: 'Own company',\n SelectYourFilters: 'Select your filters',\n SelectAll: 'Select all',\n Filters: 'Filters',\n MoreFilters: 'More filters',\n ColumnConfig: 'Configure columns',\n SelectOverviewColumns: 'Select overview columns',\n CustomerCode: 'Customer code',\n AccountingNumber: 'Accounting number',\n FinancialStatementScheme: 'Financial statement scheme',\n UniqueIdentifier: 'Unique Identifier',\n ShareRegister: 'Share register',\n ShareRegisterNotFilledOut: 'Share registration not filled out',\n Jurisdiction: 'Jurisdiction',\n Sector: 'Sector',\n AddAssignment: 'Add assignment',\n BackgroundJobQueued: 'A background job has started. Click here to monitor the progress.',\n UpdateRelationUser: 'Update relation user',\n UpdateUserInPlannedTasks: 'Do you also want to update the assigned user in tasks?',\n RelationUserIsUnassignedWhichUserDoYouWantToAssignToTasks:\n 'You set the relation user to unassigned, which user should we use for updating the assigned user in the tasks?',\n GenerateDocuments: 'Generate documents',\n GenerateDocumentsQueued:\n 'The documents are being generated for the selected relations. Click here to view its progress.',\n KvkNumber: 'KvK number',\n ObNumber: 'OB number',\n LbNumber: 'LB number',\n RsinNumber: 'RSIN number',\n BsnNumber: 'BSN number',\n FiscalNumber: 'Fiscal number',\n SearchOnPeppolNetwork: 'Search on PEPPOL network',\n EndDate: 'End date',\n AssignedTo: 'Assigned to',\n TaskScheduleDeviation: 'Task schedule deviation',\n ClickToConfigureDeviations: 'ClickToConfigureDeviations',\n Task: 'Task',\n ScheduleDeviation: 'Schedule deviation',\n ExportToExcelStarted: 'Export to Excel started',\n});\n\nexport default messages;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage, injectIntl } from 'react-intl';\nimport { Dropdown } from 'react-bootstrap';\nimport classnames from 'classnames';\nimport { FaUndo, FaFilter } from 'react-icons/fa';\nimport intlShape from '@/shared/utils/intlShape';\nimport CrmTypeButtonGroup from '@/shared/components/CrmTypeButtonGroup';\nimport RelationTypeIcon from '@/shared/components/RelationTypeIcon';\nimport CheckboxDropdownMenu from '@/shared/components/input/CheckboxDropdownMenu';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport MultiSelect, {\n removeItem as removeMultiSelectItem,\n addItem as addMultiSelectItem,\n splitItems as splitMultiSelectItems,\n} from '@/shared/components/input/multiselect/MultiSelect';\nimport api from '@/shared/api';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport enumCache from '@/shared/services/EnumCacheService';\nimport RelationSearch from '@/shared/components/input/RelationSearch';\nimport userStorage from '@/shared/services/userStorage';\n\nimport DynamicFilter, {\n getDynamicFiltersFromDefaultFilters,\n initDynamicFilters,\n} from '@/shared/components/DynamicFilter';\nimport messages from '../relations/overview/relationOverviewMessages';\nimport config from '../../config';\n\nexport const defaultRelationFilters = {\n amlEndScore: null,\n assistant: null, // UserId\n assistantBackup: null, // UserId\n associate: null, // UserId\n responsible: null, // UserId\n billingUser: null, // UserId\n seniorUser: null, // UserId\n relationId: null, // RelationId\n relationName: null, // string\n type: [], // Array\n crmTypes: [], // Array\n legalForms: [], // Array\n withLabels: [], // Array\n withoutLabels: [], // Array\n linkType: null,\n ownCompanies: [],\n statusFilters: [],\n assignedTo: null, // UserId\n naceCodes: [],\n filterBehaviours: {\n withLabels: 1,\n naceCodes: 1,\n },\n relationGroups: [],\n};\n\nconst dynamicFiltersStorageKey = 'ComplianceOverviewDynamicFilters';\n\nclass CompliancyFilters extends Component {\n state = {\n labels: [],\n linkTypes: [],\n dynamicFilters: [],\n };\n\n static propTypes = {\n countSelectedRelations: PropTypes.string.isRequired,\n onFilterChange: PropTypes.func.isRequired,\n filters: PropTypes.shape({\n associate: PropTypes.string,\n responsible: PropTypes.string,\n assistant: PropTypes.string,\n assistantBackup: PropTypes.string,\n billingUser: PropTypes.string,\n seniorUser: PropTypes.string,\n searchValue: PropTypes.string,\n assignedTo: PropTypes.string,\n type: PropTypes.arrayOf(PropTypes.number),\n crmTypes: PropTypes.arrayOf(PropTypes.number),\n legalForms: PropTypes.arrayOf(PropTypes.number),\n withLabels: PropTypes.arrayOf(PropTypes.string),\n withoutLabels: PropTypes.arrayOf(PropTypes.string),\n linkType: PropTypes.number,\n ownCompanies: PropTypes.arrayOf(PropTypes.string),\n naceCodes: PropTypes.arrayOf(PropTypes.string),\n relationGroups: PropTypes.arrayOf(PropTypes.string),\n }),\n intl: intlShape.isRequired,\n // Show reset filter button\n hasFilters: PropTypes.bool,\n onResetFilters: PropTypes.func,\n };\n\n static defaultProps = {\n filters: defaultRelationFilters,\n hasFilters: false,\n onResetFilters: () => {},\n };\n\n componentDidMount() {\n const { intl, filters } = this.props;\n\n Promise.all([\n api.base.get(`${config.appUrls.api}/api/Resource/Tags`),\n enumCache.get('linktype'),\n ]).then(([{ data: tags }, linkTypes]) => {\n const dataCache = DataCacheService.getDataCache();\n\n const allDynamicFilters = [\n ...getDynamicFiltersFromDefaultFilters(defaultRelationFilters, 'crmTypes'),\n\n {\n id: 'naceCode',\n label: messages.NaceCode,\n enabled: DataCacheService.isBelgianTenantConfiguration(),\n },\n {\n id: 'linkType',\n label: messages.FilterLinkType,\n },\n ];\n\n this.setState({\n naceCodes: dataCache.naceCodes.map(x => ({\n id: x.Code,\n label: `${x.Code} - ${x.Name}`,\n })),\n\n dynamicFilters: initDynamicFilters(\n intl,\n allDynamicFilters,\n userStorage.getItem(dynamicFiltersStorageKey) || [],\n filters,\n defaultRelationFilters,\n ),\n labels: tags\n .map(x => ({ id: x.id, label: x.name, sort: x.name.toLowerCase() }))\n .sort(dynamicSort('sort')),\n linkTypes: linkTypes\n .map(x => ({\n id: x.key,\n label: intl.formatMessage(listItemMsg('linktypeto', x.key, x.value)),\n }))\n .sort(dynamicSort('label')),\n });\n });\n }\n\n filterChanged = filter => {\n const { filters, onFilterChange } = this.props;\n const newFilters = { ...filters, ...filter };\n if (filters !== newFilters) onFilterChange(newFilters);\n };\n\n filterRelationTypes = relType => {\n const { filters = {} } = this.props;\n const types = filters.type || [];\n\n const idx = types.indexOf(relType);\n if (idx >= 0) {\n this.filterChanged({ type: types.filter((_, i) => i !== idx) });\n } else {\n this.filterChanged({ type: [...types, relType] });\n }\n };\n\n getRelationTypes = () => {\n const { intl } = this.props;\n return [\n {\n id: 0,\n label: intl.formatMessage(listItemMsg('relationtype', 0, 'Company')),\n },\n {\n id: 1,\n label: intl.formatMessage(listItemMsg('relationtype', 1, 'SoleProprietor')),\n },\n {\n id: 2,\n label: intl.formatMessage(listItemMsg('relationtype', 2, 'Person')),\n },\n ];\n };\n\n relationChanged = item => {\n if (!item || !item.id) {\n this.filterChanged({ relationId: null, relationName: null });\n } else {\n this.filterChanged({\n relationId: item.key,\n relationName: item.label,\n });\n }\n };\n\n renderDynamicFilter = ({ type, filters, intl }) => {\n switch (type) {\n case 'linkType': {\n const { linkTypes } = this.state;\n\n return (\n
    \n
    \n \n this.filterChanged({ linkType: e.target.value ? parseInt(e.target.value) : null })\n }\n value={filters.linkType || ''}\n >\n \n {linkTypes.map(l => (\n \n ))}\n \n
    \n
    \n );\n }\n case 'naceCode': {\n const { naceCodes } = this.state;\n\n const [selectedNaceCodes, availableNaceCodes] = splitMultiSelectItems(\n naceCodes,\n filters.naceCodes,\n );\n\n return (\n
    \n
    \n \n this.filterChanged({\n naceCodes: removeMultiSelectItem(filters.naceCodes, item),\n })\n }\n onItemSelected={item =>\n this.filterChanged({\n naceCodes: addMultiSelectItem(filters.naceCodes, item),\n })\n }\n items={availableNaceCodes}\n placeholder={intl.formatMessage(messages.NaceCode)}\n onFilterBehaviourChanged={filterBehaviour => {\n this.filterChanged({\n filterBehaviours: {\n naceCodes: filterBehaviour,\n },\n });\n }}\n filterBehaviour={filters.filterBehaviours?.naceCodes}\n withFilterBehaviour\n />\n
    \n
    \n );\n }\n\n default:\n console.warn(`Missing filter: ${type}`);\n return null;\n }\n };\n dynamicFilterChanged = (item, selected) => {\n const { dynamicFilters } = this.state;\n const { filters } = this.props;\n\n const newFilters = dynamicFilters.map(x => {\n if (x.id !== item.id && item.id !== 'selectall') return x;\n return { ...x, selected };\n });\n\n userStorage.setItem(\n dynamicFiltersStorageKey,\n newFilters.filter(x => x.selected).map(x => x.id),\n );\n this.setState({\n dynamicFilters: newFilters,\n });\n\n if (\n !selected &&\n JSON.stringify(filters[item.id]) !== JSON.stringify(defaultRelationFilters[item.id])\n ) {\n // Reset filter when it's removed\n this.filterChanged({ [item.id]: defaultRelationFilters[item.id] });\n }\n };\n\n render() {\n const { filters, intl, hasFilters, onResetFilters, countSelectedRelations } = this.props;\n const { labels, dynamicFilters } = this.state;\n const defaultBtnClass = 'btn btn-default';\n const relationTypes = this.getRelationTypes();\n\n const initRelation = filters.relationId\n ? {\n key: filters.relationId,\n label: filters.relationName,\n invoiceStreamId: filters.invoiceStreamId,\n }\n : null;\n const visibleFilters = dynamicFilters.filter(x => x.selected).map(x => x.id);\n\n const dropdownFilters = [\n {\n id: 'selectall',\n label: intl.formatMessage(messages.SelectAll),\n selected: !dynamicFilters.some(x => !x.selected),\n },\n ...dynamicFilters,\n ];\n\n return (\n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n {relationTypes.map(t => (\n {\n document.activeElement.blur();\n this.filterRelationTypes(t.id);\n }}\n type=\"button\"\n title={t.label}\n className={classnames(defaultBtnClass, {\n active: filters && filters.type && filters.type.includes(t.id),\n })}\n >\n \n {t.label}\n \n ))}\n
    \n
    \n\n
    \n
    \n {\n this.filterChanged({ crmTypes: value });\n }}\n hiddenTypes={[4]}\n />\n
    \n
    \n
    \n {visibleFilters && visibleFilters.length > 0 ? (\n
    \n {visibleFilters.map(id => (\n \n ))}\n
    \n ) : null}\n
    \n
    \n \n \n \n \n \n \n \n {hasFilters && (\n onResetFilters()}\n >\n \n  \n \n \n )}\n\n
    {countSelectedRelations}
    \n
    \n
    \n
    \n );\n }\n}\n\nexport default injectIntl(CompliancyFilters);\n","import React, { Component } from 'react';\nimport classNames from 'classnames';\nimport PropTypes from 'prop-types';\nimport Axios from 'axios';\nimport Checkbox from '@/shared/components/input/Checkbox';\nimport { CanCreate } from '@/shared/components/security';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport ToastrService from '@/shared/services/ToastrService';\nimport { FormattedMessage, injectIntl } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport ScrollableTable from '@/shared/components/table/ScrollableTable';\nimport ColumnHeader from '@/shared/components/table/ColumnHeader';\nimport SimplePanel from '@/shared/components/SimplePanel';\nimport PopoverStickOnHover from '@/shared/components/PopoverStickOnHover';\nimport SendEmailModal from '@/shared/components/email/MultiRelationsMailModal';\nimport KPIs from '@/shared/components/KPIs';\nimport KPI from '@/shared/components/KPI';\nimport api from '@/shared/api';\nimport SignalRService from '@/shared/services/SignalRService';\nimport { FaFileExcel, FaEnvelope } from 'react-icons/fa';\nimport { CommentIcon } from '@/shared/components/Icons';\nimport FileSaver from 'file-saver';\n\nimport utils from '@/shared/utils/adminpulse';\nimport FormattedListValue, {\n listItemMsg,\n formatListValue,\n} from '@/shared/components/FormattedListValue';\nimport { injectStateService, StateService } from '@/shared/services/StateService';\nimport RelationName from '@/shared/components/RelationName';\nimport SingleRelationMailModal from '@/shared/components/email/SingleRelationMailModal';\nimport { EnvelopeIcon } from '@/shared/components/Icons';\nimport config from '@/config';\nimport ZendeskHelp from '@/shared/components/ZendeskHelp';\nimport Button from '@/shared/components/Button';\nimport { CanUpdate } from '@/shared/components/security';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport MarkCompliancyInapplicableModal from './MarkCompliancyInapplicableModal';\nimport CompliancyStatusToggle from './CompliancyStatusToggle';\nimport messages from './comliancyMessages';\nimport CompliancyGlobalActionsButton from './CompliancyGlobalActionsButton';\nimport getFieldIdForCompliancy from './getFieldIdForCompliancy';\nimport CompliancyFilters, { defaultRelationFilters } from './CompliancyFilters';\n\n// eslint-disable-next-line\nconst ComplianceKPISubtitle = ({ item }) => (\n \n
    {item.percentage}%
    \n
    \n {item.compliant}/{item.total} \n
    \n
    \n);\n\nclass CompliancyContainer extends Component {\n constructor(props) {\n super(props);\n\n const { relationFilters: sessionFilters = {}, ...sessionParams } =\n JSON.parse(sessionStorage.getItem('CompliancyParams')) || {};\n\n const currentSearchParams = {\n ...sessionParams,\n page: 0,\n sortKey: sessionParams.sortKey || 'displayName',\n relationFilters: {\n ...defaultRelationFilters,\n ...sessionFilters,\n amlEndScore: null,\n },\n };\n this.state = {\n complianceKPIs: [],\n complianceTypes: [],\n items: [],\n allSelected: false,\n showSendMailModal: false,\n showMarkComplianceTypeAsInapplicableModal: false,\n showSendSingleRelationMailModal: false,\n currentSearchParams,\n relationLanguages: [],\n initialSearchParams: currentSearchParams,\n };\n }\n\n componentDidMount() {\n SignalRService.subscribe('compliancyUpdated', this.compliancyUpdateHandler);\n // this.loadKPIs();\n }\n\n componentWillUnmount() {\n SignalRService.unsubscribe('compliancyUpdated', this.compliancyUpdateHandler);\n if (typeof this.retrieveToken !== 'undefined') {\n this.retrieveToken.cancel('Operation canceled due to leaving page.');\n }\n }\n\n loadKPIs = () => {\n const { intl } = this.props;\n const { currentSearchParams: searchParams } = this.state;\n\n const statusFilters = Object.keys(searchParams.filter).reduce((obj, key) => {\n if (key !== 'amlRiskLevel' && key !== 'amlEndScore') {\n obj[key] = searchParams.filter[key].items;\n }\n return obj;\n }, {});\n\n const amlEndScore =\n searchParams.filter && searchParams.filter.amlEndScore\n ? searchParams.filter.amlEndScore.items || []\n : [];\n\n const bodyParams = {\n ...searchParams.relationFilters,\n statusFilters: {\n ...searchParams.relationFilters.statusFilters,\n ...statusFilters,\n },\n ...this.getSelectionParams(),\n amlEndScore,\n };\n\n return api.base\n .post(`/api/compliance/KPI`, bodyParams)\n .then(({ data }) => {\n this.setState((state) => ({\n ...state,\n complianceKPIs: data\n ? data\n .map((item) => ({\n type: item.compliancyType,\n title: intl.formatMessage(listItemMsg('compliancetype', item.compliancyType)),\n percentage: utils.toPercentage(item.ok, item.total, true),\n compliant: item.ok,\n total: item.total,\n }))\n .sort(dynamicSort('title'))\n : state.complianceKPIs,\n }));\n })\n .catch(handleHttpError(intl));\n };\n\n loadItems = (searchParams) => {\n const { allSelected } = this.state;\n const { intl } = this.props;\n if (typeof this.retrieveToken !== 'undefined') {\n this.retrieveToken.cancel('Operation canceled due to new request.');\n }\n this.retrieveToken = Axios.CancelToken.source();\n\n const urlParams = {\n desc: searchParams.desc,\n sort: searchParams.sortKey,\n page: searchParams.page,\n take: searchParams.pageSize,\n };\n\n const statusFilters = Object.keys(searchParams.filter).reduce((obj, key) => {\n if (key !== 'amlRiskLevel' && key !== 'amlEndScore') {\n obj[key] = searchParams.filter[key].items;\n }\n return obj;\n }, {});\n\n const amlEndScore =\n searchParams.filter && searchParams.filter.amlEndScore\n ? searchParams.filter.amlEndScore.items || []\n : [];\n\n const bodyParams = {\n ...searchParams.relationFilters,\n statusFilters: {\n ...searchParams.relationFilters.statusFilters,\n ...statusFilters,\n },\n amlEndScore,\n };\n sessionStorage.setItem('CompliancyParams', JSON.stringify(searchParams));\n\n return api.base\n .post(`/api/compliance/get`, bodyParams, {\n params: {\n ...urlParams,\n },\n cancelToken: this.retrieveToken.token,\n })\n .then(({ data }) => {\n const rows = data.relations.map((e) => ({ ...e, selected: !!allSelected }));\n\n this.setState(\n (state) => ({\n ...state,\n items: searchParams.page > 0 ? [...state.items, ...rows] : rows,\n total: data.total,\n complianceTypes: data.complianceTypes\n .map((x) => ({\n id: x,\n label: intl.formatMessage(listItemMsg('compliancetype', x, x)),\n }))\n .sort(dynamicSort('label'))\n .map((x) => x.id),\n complianceKPIs: data.complianceKPIs\n ? data.complianceKPIs.map((item) => ({\n type: item.compliancyType,\n title: intl.formatMessage(listItemMsg('compliancetype', item.compliancyType)),\n percentage: utils.toPercentage(item.ok, item.total, true),\n compliant: item.ok,\n total: item.total,\n }))\n : state.complianceKPIs,\n currentSearchParams: searchParams,\n }),\n () => {\n if (searchParams.page === 0) {\n this.loadKPIs();\n }\n },\n );\n\n return data.relations;\n })\n .catch((error) => {\n if (!Axios.isCancel(error)) return error;\n });\n };\n\n compliancyUpdateHandler = (relationId) => {\n if (!relationId) return;\n const { items } = this.state;\n // Check if relation is loaded\n if (!items.some((x) => x.id === relationId)) return;\n\n api.base\n .post(`/api/compliance/get?desc=false&sort=name&page=0&take=50`, { relationId })\n .then(({ data }) => {\n if (!data || !data.relations || data.relations.length !== 1) return;\n const row = data.relations[0];\n this.setState((state) => ({\n items: state.items.map((x) => {\n if (x.id !== row.id) return x;\n return row;\n }),\n }));\n });\n };\n\n handleUpdateComplianceStatus = (relationId, complianceType, complianceStatus) => {\n if (typeof complianceType === 'undefined') return;\n this.setState((state) => ({\n items: state.items.map((x) => {\n if (x.id !== relationId) return x;\n return {\n ...x,\n compliancies: x.compliancies.map((y) => {\n if (y.complianceType !== complianceType) return y;\n return { ...y, complianceStatus };\n }),\n };\n }),\n }));\n };\n\n filterByKpi(type) {\n this.setState((state) => ({\n ...state,\n initialSearchParams: {\n page: 0,\n relationFilters: {\n ...state.initialSearchParams.relationFilters,\n statusFilters: {\n ...state.initialSearchParams.relationFilters.statusFilters,\n [type]: [0],\n },\n },\n },\n }));\n }\n\n filtersChanged = (filters) => {\n this.setState((state) => ({\n ...state,\n initialSearchParams: {\n ...state.initialSearchParams,\n page: 0,\n relationFilters: filters,\n },\n }));\n };\n\n resetFilters = () => {\n this.setState((state) => ({\n ...state,\n initialSearchParams: {\n filter: {},\n search: {},\n page: 0,\n relationFilters: { ...defaultRelationFilters },\n },\n }));\n };\n\n iconClicked = (item, compliancyType, compliancyStatus) => {\n const { stateService } = this.props;\n const field = getFieldIdForCompliancy(compliancyType, compliancyStatus, item.type);\n stateService.gotoRelation(item.id, { gotoField: field });\n };\n\n handleSelectAll = () => {\n const { items, allSelected } = this.state;\n\n const isCurrentlySelected = !allSelected;\n\n const itemsCopy = items.map((e) => ({ ...e, selected: !!isCurrentlySelected }));\n\n this.setState((state) => ({\n ...state,\n allSelected: isCurrentlySelected,\n items: itemsCopy,\n }));\n };\n handleSelect = (relation) => {\n this.setState(({ items }) => ({\n items: items.map((x) => (x.id === relation.id ? { ...x, selected: !x.selected } : x)),\n }));\n };\n\n getCountSelectionsFormatted() {\n const { total } = this.state;\n const { intl } = this.props;\n const count = this.getCountSelections();\n\n return intl.formatMessage(messages.CountRelationsSelected, { count, total });\n }\n\n getCountSelections() {\n const { allSelected, total, items } = this.state;\n\n const count = items ? items.filter((x) => x.selected !== allSelected).length : 0;\n\n if (allSelected) {\n return total - count;\n }\n return count;\n }\n\n isGlobalActionsDisabled = () => {\n const { items, allSelected } = this.state;\n if (!items || !items.length) return true;\n if (items.some((x) => x.selected) || allSelected) return false;\n\n return true;\n };\n\n getSelectionParams = () => {\n const { items, allSelected } = this.state;\n\n // Get all relation ids that don't match the select all checkbox\n const relationIds = items\n ? items.filter((x) => x.selected !== allSelected).map((x) => x.id)\n : [];\n return {\n relationIds,\n selectAll: allSelected,\n };\n };\n\n sendEmailForSelectedRelations = (email) =>\n this.executeBatchAction({\n action: 'sendmail',\n parameters: email,\n });\n\n MarkComplianceTypeInapplicableForRelations = (complianceType) =>\n this.executeBatchAction({\n action: 'markinapplicable',\n parameters: complianceType,\n });\n\n createExcelReport = () => {\n const { intl } = this.props;\n const { currentSearchParams: searchParams } = this.state;\n\n const urlParams = {\n desc: searchParams.desc,\n sort: searchParams.sortKey,\n page: searchParams.page,\n take: searchParams.pageSize,\n culture: intl.locale,\n connectionId: SignalRService.getConnectionId(),\n };\n\n const statusFilters = Object.keys(searchParams.filter).reduce((obj, key) => {\n if (key !== 'amlRiskLevel' && key !== 'amlEndScore') {\n obj[key] = searchParams.filter[key].items;\n }\n return obj;\n }, {});\n\n const amlEndScore =\n searchParams.filter && searchParams.filter.amlEndScore\n ? searchParams.filter.amlEndScore.items || []\n : [];\n\n const bodyParams = {\n ...searchParams.relationFilters,\n statusFilters: {\n ...searchParams.relationFilters.statusFilters,\n ...statusFilters,\n },\n ...this.getSelectionParams(),\n amlEndScore,\n };\n\n this.setState({ creatingReport: true });\n\n return api.base\n .post(`/api/compliance/report`, bodyParams, {\n params: urlParams,\n })\n .then(() => {\n ToastrService.info(intl.formatMessage(messages.ExportToExcelStarted));\n })\n .catch((error) => {\n handleHttpError(intl)(error);\n })\n .finally(() => {\n this.setState({ creatingReport: false });\n });\n };\n\n executeBatchAction = ({ action, parameters }) => {\n if (this.isGlobalActionsDisabled()) return Promise.reject(new Error('invalid'));\n\n const { intl } = this.props;\n const { currentSearchParams: searchParams } = this.state;\n const { stateService } = this.props;\n\n let endpoint = '';\n let successMessage = '';\n let params = {};\n let reloadCompliancies = false;\n\n switch (action) {\n case 'sendmail':\n endpoint = 'CreateBatchMailJob';\n successMessage = intl.formatMessage(messages.SendEmailQueued);\n params = { ...parameters };\n break;\n case 'markinapplicable':\n endpoint = 'BatchToggleInapplicable';\n successMessage = parameters.inapplicable\n ? intl.formatMessage(messages.ComplianceMarkedAsInapplicable)\n : intl.formatMessage(messages.ComplianciesWillBeCalculatedInTheBackground);\n params = { ...parameters };\n reloadCompliancies = true;\n break;\n default:\n break;\n }\n\n const urlParams = {\n desc: searchParams.desc,\n sort: searchParams.sortKey,\n page: searchParams.page,\n take: searchParams.pageSize,\n };\n\n const statusFilters = Object.keys(searchParams.filter).reduce((obj, key) => {\n if (key !== 'amlRiskLevel' && key !== 'amlEndScore') {\n obj[key] = searchParams.filter[key].items;\n }\n return obj;\n }, {});\n\n const amlEndScore =\n searchParams.filter && searchParams.filter.amlEndScore\n ? searchParams.filter.amlEndScore.items || []\n : [];\n\n const bodyParams = {\n ...params,\n ...searchParams.relationFilters,\n statusFilters: {\n ...searchParams.relationFilters.statusFilters,\n ...statusFilters,\n },\n ...this.getSelectionParams(),\n amlEndScore,\n };\n\n const url = `/api/compliance/${endpoint}`;\n\n return api.base\n\n .post(url, bodyParams, { params: urlParams })\n .then(({ data }) => {\n this.setState((state) => ({\n ...state,\n showSendMailModal: false,\n showMarkComplianceTypeAsInapplicableModal: false,\n initialSearchParams: reloadCompliancies\n ? {\n ...searchParams,\n // forces refresh of table\n random: new Date().getTime(),\n }\n : searchParams,\n }));\n\n const onClick = data ? () => stateService.gotoJob(data.id) : undefined;\n\n ToastrService.info(successMessage, undefined, onClick);\n })\n .catch(handleHttpError(intl));\n };\n\n sendEmail = (emailViewModel) => {\n const { intl } = this.props;\n return api.base\n .post(`${config.appUrls.documents}/api/emails/CreateAndSend`, emailViewModel)\n .then(({ data }) => {\n this.setState((state) => ({\n ...state,\n showSendSingleRelationMailModal: false,\n }));\n ToastrService.info(intl.formatMessage(messages.EmailSent));\n })\n .catch(handleHttpError(intl));\n };\n\n getSelectedRelationLanguages = () => {\n const { allSelected, items } = this.state;\n return new Promise((resolve, reject) => {\n if (allSelected) {\n const { currentSearchParams } = this.state;\n\n const urlParams = {\n desc: currentSearchParams.desc,\n sort: currentSearchParams.sortKey,\n page: currentSearchParams.page,\n take: currentSearchParams.pageSize,\n };\n\n const statusFilters = Object.keys(currentSearchParams.filter).reduce((obj, key) => {\n if (key !== 'amlRiskLevel' && key !== 'amlEndScore') {\n obj[key] = currentSearchParams.filter[key].items;\n }\n return obj;\n }, {});\n\n const amlEndScore =\n currentSearchParams.filter && currentSearchParams.filter.amlEndScore\n ? currentSearchParams.filter.amlEndScore.items || []\n : [];\n\n const bodyParams = {\n ...currentSearchParams.relationFilters,\n statusFilters: {\n ...currentSearchParams.relationFilters.statusFilters,\n ...statusFilters,\n },\n amlEndScore,\n };\n\n api.base\n .post(`/api/compliance/languages`, bodyParams, {\n params: {\n ...urlParams,\n },\n })\n .then(({ data }) => {\n resolve(data);\n })\n .catch((error) => {\n reject(error);\n });\n } else {\n const languages = [...new Set(items.filter((x) => x.selected).map((x) => x.languageCode))]; // This makes sure it is a distinct list of language codes\n resolve(languages);\n }\n });\n };\n\n onSendEmail = () => {\n const { intl } = this.props;\n this.getSelectedRelationLanguages()\n .then((languages) => {\n this.setState({\n showSendMailModal: true,\n relationLanguages: languages,\n });\n })\n .catch((error) => {\n handleHttpError(intl)(error);\n });\n };\n onMarkComplianceTypeAsInapplicable = () => {\n this.setState({\n showMarkComplianceTypeAsInapplicableModal: true,\n });\n };\n\n renderRow = (item) => {\n const { complianceTypes } = this.state;\n const { intl } = this.props;\n\n return (\n \n \n \n this.handleSelect(item)} value={item.selected} />\n \n \n \n \n \n {item.relationComplianceRemark && (\n \n \n \n \n \n )}\n \n \n \n \n {complianceTypes.map((complianceType) => (\n \n x.complianceType === complianceType)\n .complianceStatus\n }\n compliancyType={complianceType}\n onComplianceUpdated={this.handleUpdateComplianceStatus}\n onNavigateCompliance={this.iconClicked}\n />\n \n ))}\n \n \n \n this.setState({ showSendSingleRelationMailModal: true, activeRelation: item })\n }\n >\n \n \n \n \n \n \n );\n };\n\n render() {\n const {\n complianceKPIs,\n initialSearchParams,\n items,\n allSelected,\n showSendMailModal,\n showMarkComplianceTypeAsInapplicableModal,\n relationLanguages,\n activeRelation,\n showSendSingleRelationMailModal,\n creatingReport,\n complianceTypes,\n currentSearchParams,\n } = this.state;\n const { intl } = this.props;\n const hasFilters =\n JSON.stringify(initialSearchParams.relationFilters) !==\n JSON.stringify(defaultRelationFilters) ||\n (currentSearchParams &&\n currentSearchParams.filter &&\n Object.keys(currentSearchParams.filter).length > 0);\n const hasData = items && items.length > 0;\n\n return (\n
    \n {showSendMailModal && (\n \n this.setState((state) => ({\n ...state,\n showSendMailModal: false,\n }))\n }\n onSave={(emailModel) => this.sendEmailForSelectedRelations(emailModel)}\n />\n )}\n {showMarkComplianceTypeAsInapplicableModal && (\n \n this.setState((state) => ({\n ...state,\n showMarkComplianceTypeAsInapplicableModal: false,\n }))\n }\n onSave={(complianceType) =>\n this.MarkComplianceTypeInapplicableForRelations(complianceType)\n }\n />\n )}\n {showSendSingleRelationMailModal && (\n \n this.setState((state) => ({\n ...state,\n showSendSingleRelationMailModal: false,\n }))\n }\n onSave={this.sendEmail}\n />\n )}\n \n \n {complianceKPIs.map((item) => (\n this.filterByKpi(item.type)}\n title={item.title}\n subtitleClassName={classNames({\n green: item.percentage === 100,\n })}\n subtitle={}\n />\n ))}\n \n
    \n this.filtersChanged(filters)}\n onResetFilters={() => this.resetFilters()}\n hasFilters={hasFilters}\n countSelectedRelations={this.getCountSelectionsFormatted()}\n />\n
    \n
    \n
    \n
    \n this.createExcelReport()}\n disabled={!hasData || creatingReport}\n >\n \n {creatingReport && }\n {!creatingReport && }\n \n {intl.formatMessage(messages.ExportToExcel)}\n \n \n
    \n
    \n this.loadItems(searchParams)}\n initialSearchParams={initialSearchParams}\n items={items}\n renderRow={(item) => this.renderRow(item)}\n noDataLabel={}\n >\n this.handleSelectAll()}\n value={allSelected}\n />\n }\n />\n \n \n formatListValue({ id: item, list: 'amlRiskLevel', intl }),\n }}\n />\n\n {complianceTypes.map((complianceType) => (\n formatListValue({ id: item, list: 'compliancestatus', intl }),\n }}\n className=\"text-center compliance-column\"\n />\n ))}\n \n \n
    \n );\n }\n\n static propTypes = {\n intl: intlShape.isRequired,\n stateService: PropTypes.instanceOf(StateService).isRequired,\n };\n\n static defaultProps = {};\n}\n\nexport default injectStateService(injectIntl(CompliancyContainer));\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { defineMessages } from 'react-intl';\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport log from 'loglevel';\nimport intlShape from '@/shared/utils/intlShape';\nimport ToastrService from '@/shared/services/ToastrService';\nimport EmailEditor from '@/shared/components/EmailEditor';\nimport { injectStateService } from '@/shared/services/StateService';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport moment from 'moment';\nimport RelationSearch from '@/shared/components/input/RelationSearch';\nimport { mapSuggestedMailAddress } from '@/shared/services/ObjectDisplayService';\nimport LoadingAnimation from '../LoadingAnimation';\n\nconst messages = defineMessages({\n SelectRelationToRetrieveAddresses: 'Select a relation to retrieve addresses',\n Relation: 'Relation',\n Forward: 'Forward',\n EmailSent: 'Email sent',\n EmailContentRequired: 'The email must have content.',\n MsgEmailAttachmentUploadFailed: 'An error occurred when uploading the email attachment',\n NoEmailTemplateFoundInLanguage: 'No email template was found in {language}',\n SendEmail: 'Send email',\n SendTo: 'To',\n AddEmailAddress: 'Add email address',\n RemoveEmailAddress: 'Remove email address',\n Cc: 'CC',\n Bcc: 'BCC',\n msgInvalidEmailAddress: 'Invalid email address',\n SubjectBodyRecipientsAreRequired: 'Subject, body and recipients are required.',\n});\n\nconst mapAddresses = (emailAddresses, intl) =>\n emailAddresses.reduce((result, x, idx) => {\n if (!x) return result;\n if (result.some(y => y.emailAddress.toLowerCase() === x.emailAddress.toLowerCase()))\n return result;\n result.push({\n ...x,\n key: `${x.addressId}-${idx}`,\n label: mapSuggestedMailAddress(x, intl),\n });\n return result;\n }, []);\n\nclass ForwardEmailModal extends Component {\n state = {\n email: undefined,\n tags: [],\n to: [],\n cc: [],\n bcc: [],\n emailAttachments: [],\n selectedRelation: undefined,\n };\n\n componentDidMount() {\n this.form = React.createRef();\n this.initializeModal();\n }\n\n static propTypes = {\n intl: intlShape.isRequired,\n relationId: PropTypes.string,\n onClose: PropTypes.func.isRequired,\n show: PropTypes.bool,\n documentId: PropTypes.string.isRequired,\n };\n\n static defaultProps = {\n relationId: null,\n show: false,\n };\n\n initializeModal = () => {\n const { documentId, relationId, intl } = this.props;\n const emptyPromise = () => Promise.resolve();\n\n const emailContentPromise = api.base.get(\n `${config.appUrls.documents}/api/emails/ForwardInfo/${documentId}`,\n );\n const emailAddressesPromise = relationId\n ? api.base.get(`${config.appUrls.api}/api/address/MailSuggestions/${relationId}`)\n : emptyPromise;\n const communicationSettingsPromise = relationId\n ? api.base.get(`${config.appUrls.api}/api/CommunicationSetting/get?id=${relationId}`)\n : emptyPromise;\n\n this.setState({ loading: true });\n Promise.all([emailContentPromise, emailAddressesPromise, communicationSettingsPromise])\n .then(\n ([{ data: forwardInfo }, { data: emailAddresses }, { data: communicationSettings }]) => {\n let to = [];\n let cc = [];\n let bcc = [];\n let addresses = [];\n if (relationId) {\n addresses = mapAddresses(emailAddresses, intl);\n const main = emailAddresses.find(\n a => !!a.emailAddress && a.linkType === null && a.isMain,\n );\n if (addresses && addresses.length > 0) {\n to = this.findAddressesForType(communicationSettings, addresses, 0); // 0 = \"to\"\n cc = this.findAddressesForType(communicationSettings, addresses, 1); // 1 = \"cc\"\n bcc = this.findAddressesForType(communicationSettings, addresses, 2); // 2 = \"bcc\"\n\n if (!to.length) {\n // No communication settings, add main or first or empty\n to.push((main ? main.emailAddress : null) || addresses[0].emailAddress || '');\n }\n } else {\n // No addresses, add empty input\n to.push('');\n }\n } else {\n to.push('');\n }\n\n this.setState({\n loading: false,\n addresses,\n to,\n cc,\n bcc,\n companyId: forwardInfo.companyId,\n tags: forwardInfo.tags,\n email: {\n title: forwardInfo.subject,\n initialValue: forwardInfo.content,\n content: forwardInfo.content,\n documentDate: moment.utc(),\n },\n emailAttachments: forwardInfo.attachments || [],\n selectedRelation: relationId ? { key: relationId } : undefined,\n });\n },\n )\n .catch(err => {\n handleHttpError(intl)(err);\n this.setState({ loading: false });\n });\n };\n\n findAddressesForType = (communicationSettings, addresses, type) =>\n communicationSettings.reduce((a, e) => {\n // purpose 0 = other, medium 1 = email, type = to/cc/bcc\n if (e.purpose === 0 && e.medium === 1 && e.type === type) {\n const address = addresses.find(\n addr => !!addr.emailAddress && addr.addressId === e.addressId,\n );\n if (address) a.push(address.emailAddress);\n }\n return a;\n }, []);\n\n validateEmail = value => {\n if (!value) return false;\n return /^[^@]+@.+\\..+$/.test(value);\n };\n\n onSave = () => {\n const {\n email,\n emailAttachments,\n to,\n cc,\n bcc,\n selectedTemplate,\n companyId,\n selectedRelation,\n tags,\n } = this.state;\n const { intl } = this.props;\n const isFormValid = this.validate();\n\n for (let j = 0; j < to.length; j++) {\n if (!this.validateEmail(to[j])) {\n ToastrService.error(intl.formatMessage(messages.msgInvalidEmailAddress));\n return false;\n }\n }\n\n for (let j = 0; j < cc.length; j++) {\n if (!this.validateEmail(cc[j])) {\n ToastrService.error(intl.formatMessage(messages.msgInvalidEmailAddress));\n return false;\n }\n }\n\n for (let j = 0; j < bcc.length; j++) {\n if (!this.validateEmail(bcc[j])) {\n ToastrService.error(intl.formatMessage(messages.msgInvalidEmailAddress));\n return false;\n }\n }\n\n let invalidEmailBody = false;\n\n if (\n !email.content ||\n // regex to remove line breaks\n email.content.replace(/(\\r\\n|\\n|\\r)/gm, '') === '

    '\n ) {\n invalidEmailBody = true;\n }\n\n if (invalidEmailBody || !isFormValid) {\n ToastrService.error(intl.formatMessage(messages.SubjectBodyRecipientsAreRequired));\n return Promise.reject(new Error('invalid form'));\n }\n\n const emailViewModel = {\n body: email.content,\n subject: email.title,\n to,\n cc,\n bcc,\n attachmentDocumentIds: emailAttachments.map(x => x.id) || [],\n relationId: selectedRelation && selectedRelation.key,\n companyId: selectedRelation?.companyId ?? companyId, // prioritize newly selected relation's company over company that was set on the original email\n emailLinkType: 4,\n documentDate: email.documentDate,\n emailTemplateId: selectedTemplate,\n tags,\n };\n\n return api.base\n .post(`${config.appUrls.documents}/api/emails/CreateAndSend`, emailViewModel)\n .then(() => {\n ToastrService.info(intl.formatMessage(messages.EmailSent));\n this.closeModal();\n })\n .catch(handleHttpError(intl));\n };\n\n closeModal = () => {\n const { onClose } = this.props;\n onClose();\n };\n\n emailTitleChanged = title => {\n const { email } = this.state;\n\n this.setState({\n email: {\n ...email,\n title,\n },\n });\n };\n\n onEditorStateChange = content => {\n const { email } = this.state;\n this.setState({\n email: {\n ...email,\n content,\n },\n });\n };\n\n renderSingleEmail = email => {\n const documentUploadEndpoint = `${config.appUrls.documents}/api/documents?documentType=9&informQueues=false&recognitionStatus=4`;\n const { emailAttachments } = this.state;\n const { relationId } = this.props;\n return (\n this.emailTitleChanged(title)}\n initialValue={email.initialValue}\n onContentChanged={content => this.onEditorStateChange(content)}\n onAttachmentUploaded={(error, file) => this.onDocumentUploaded(error, file)}\n attachmentUploadEndpoint={documentUploadEndpoint}\n attachments={emailAttachments}\n onDeleteAttachment={this.deleteAttachment}\n initialRelation={relationId}\n documentDate={email.documentDate}\n onDocumentDateChanged={documentDate =>\n this.setState({\n email: {\n ...email,\n documentDate,\n },\n })\n }\n />\n );\n };\n\n onDocumentUploaded = (error, document) => {\n const { intl } = this.props;\n\n if (error) {\n log.error(error);\n ToastrService.error(intl.formatMessage(messages.MsgEmailAttachmentUploadFailed));\n return;\n }\n\n const { emailAttachments } = this.state;\n\n if (emailAttachments.some(x => x.id === document.id)) return;\n\n this.setState(state => ({\n ...state,\n emailAttachments: [document, ...state.emailAttachments],\n }));\n };\n\n // when deleting an attachment when forwarding an email we wont delete the original attachment from our system but rather not send it with the new email\n deleteAttachment = attachment => {\n this.setState(state => ({\n emailAttachments: state.emailAttachments.filter(x => x.id !== attachment.id),\n }));\n };\n\n validate() {\n const { email } = this.state;\n if (!email) return false;\n if (!this.form || !this.form.current) return false;\n\n return this.form.current.reportValidity();\n }\n\n handleToChange = (e, index) => {\n const { to } = this.state;\n const newTo = to.map((x, index2) => {\n if (index !== index2) return x;\n return e.target.value;\n });\n this.setState({ to: newTo });\n };\n\n handleCcChange = (e, index) => {\n const { cc } = this.state;\n const newCc = cc.map((x, index2) => {\n if (index !== index2) return x;\n return e.target.value;\n });\n this.setState({ cc: newCc });\n };\n\n handleBccChange = (e, index) => {\n const { bcc } = this.state;\n const newBcc = bcc.map((x, index2) => {\n if (index !== index2) return x;\n return e.target.value;\n });\n this.setState({ bcc: newBcc });\n };\n\n relationChanged = item => {\n if (!item || !item.id) {\n this.setState({ selectedRelation: null }, () => this.getAddressesForRelation());\n } else {\n this.setState({ selectedRelation: item }, () => this.getAddressesForRelation());\n }\n };\n\n getAddressesForRelation() {\n const { intl } = this.props;\n const { selectedRelation } = this.state;\n if (!selectedRelation) {\n this.setState({ addresses: [] });\n return;\n }\n const { key } = selectedRelation;\n const emailAddressesPromise = api.base.get(\n `${config.appUrls.api}/api/address/MailSuggestions/${key}`,\n );\n\n const communicationSettingsPromise = api.base.get(\n `${config.appUrls.api}/api/CommunicationSetting/get?id=${key}`,\n );\n\n Promise.all([emailAddressesPromise, communicationSettingsPromise])\n .then(([{ data: emailAddresses }, { data: communicationSettings }]) => {\n let to = [];\n let cc = [];\n let bcc = [];\n const addresses = mapAddresses(emailAddresses, intl);\n const main = emailAddresses.find(a => !!a.emailAddress && a.linkType === null && a.isMain);\n if (addresses && addresses.length > 0) {\n to = this.findAddressesForType(communicationSettings, addresses, 0); // 0 = \"to\"\n cc = this.findAddressesForType(communicationSettings, addresses, 1); // 1 = \"cc\"\n bcc = this.findAddressesForType(communicationSettings, addresses, 2); // 2 = \"bcc\"\n\n if (!to.length) {\n // No communication settings, add main or first or empty\n to.push((main ? main.emailAddress : null) || addresses[0].emailAddress || '');\n }\n } else {\n // No addresses, add empty input\n to.push('');\n }\n\n this.setState({\n addresses,\n to,\n cc,\n bcc,\n });\n })\n .catch(err => {\n handleHttpError(intl)(err);\n this.setState({ loading: false });\n });\n }\n\n render() {\n const { show, intl } = this.props;\n const { email, addresses, to, cc, bcc, loading, selectedRelation } = this.state;\n return (\n \n {show && (\n
    \n
    \n \n {addresses &&\n addresses.map(x => (\n \n ))}\n \n {loading && }\n {email && (\n \n
    \n \n
    \n \n
    \n
    \n
    \n \n
    \n {to &&\n to.map((x, index) => (\n
    \n
    \n this.handleToChange(e, index)}\n />\n
    \n \n {to.length > 1 && (\n \n this.setState(state => ({\n ...state,\n to: state.to.filter((_, i) => i !== index),\n }))\n }\n title={intl.formatMessage(messages.RemoveEmailAddress)}\n className=\"clickable\"\n >\n \n \n )}\n
    \n
    \n ))}\n
    \n \n this.setState(state => ({\n ...state,\n to: [...state.to, ''],\n }))\n }\n title={intl.formatMessage(messages.AddEmailAddress)}\n className=\"btn btn-default btn-xs\"\n >\n \n \n
    \n
    \n
    \n\n
    \n \n
    \n {cc &&\n cc.map((x, index) => (\n
    \n
    \n this.handleCcChange(e, index)}\n />\n
    \n \n \n this.setState(state => ({\n ...state,\n cc: state.cc.filter((_, i) => i !== index),\n }))\n }\n title={intl.formatMessage(messages.RemoveEmailAddress)}\n className=\"clickable\"\n >\n \n \n
    \n
    \n ))}\n
    \n \n this.setState(state => ({\n ...state,\n cc: [...state.cc, ''],\n }))\n }\n title={intl.formatMessage(messages.AddEmailAddress)}\n className=\"btn btn-default btn-xs\"\n >\n \n \n
    \n
    \n \n\n
    \n \n
    \n {bcc &&\n bcc.map((x, index) => (\n
    \n
    \n this.handleBccChange(e, index)}\n />\n
    \n \n \n this.setState(state => ({\n ...state,\n bcc: state.bcc.filter((_, i) => i !== index),\n }))\n }\n title={intl.formatMessage(messages.RemoveEmailAddress)}\n className=\"clickable\"\n >\n \n \n
    \n
    \n ))}\n
    \n \n this.setState(state => ({\n ...state,\n bcc: [...state.bcc, ''],\n }))\n }\n title={intl.formatMessage(messages.AddEmailAddress)}\n className=\"btn btn-default btn-xs\"\n >\n \n \n
    \n
    \n \n \n )}\n\n {email && this.renderSingleEmail(email)}\n \n \n )}\n \n );\n }\n}\nexport default injectStateService(ForwardEmailModal);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nimport classnames from 'classnames';\n\nexport default class DropzoneContainer extends Component {\n state = {\n dragClasses: null,\n counter: 0,\n };\n\n handleDragOver = e => {\n e.preventDefault();\n e.stopPropagation();\n if (e.dataTransfer.dropEffect === 'none') {\n e.dataTransfer.effectAllowed = 'none';\n e.dataTransfer.dropEffect = 'none';\n }\n };\n\n handleDragEnter(e) {\n if (e.dataTransfer && e.dataTransfer.types && e.dataTransfer.types.length) {\n // e.dataTransfer.dropEffect = 'none';\n const classes = ['dragging'];\n // For loop needed for IE11\n for (let i = 0; i < e.dataTransfer.types.length; i += 1) {\n classes.push(`dragging-${e.dataTransfer.types[i].toLowerCase()}`);\n }\n\n this.setState(state => ({\n counter: state.counter + 1,\n dragClasses: classes,\n }));\n } else {\n this.setState(state => ({\n dragClasses: null,\n counter: state.counter + 1,\n }));\n }\n e.preventDefault();\n e.stopPropagation();\n }\n\n handleDragLeave(e) {\n const { counter } = this.state;\n if (counter <= 1) {\n this.setState({\n dragClasses: null,\n counter: counter - 1,\n });\n } else {\n this.setState({\n counter: counter - 1,\n });\n }\n e.preventDefault();\n e.stopPropagation();\n }\n\n handleDrop() {\n this.setState({\n dragClasses: null,\n counter: 0,\n });\n }\n\n static propTypes = {\n children: PropTypes.element.isRequired,\n className: PropTypes.string,\n };\n\n static defaultProps = {\n className: '',\n };\n\n render() {\n const { className, children, ...passThroughProps } = this.props;\n const { dragClasses } = this.state;\n return (\n this.handleDragEnter(e)}\n onDragLeave={e => this.handleDragLeave(e)}\n onDragOver={e => this.handleDragOver(e)}\n onDrop={e => this.handleDrop(e)}\n className={classnames(className, dragClasses)}\n >\n {children}\n \n );\n }\n}\n","import React from 'react';\nimport DropZoneContainer from './DropZoneContainer';\n\nexport default function withDropzone(WrappedComponent) {\n return props => (\n \n \n \n );\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport ZendeskHelp from '@/shared/components/ZendeskHelp';\nimport Checkbox from './Checkbox';\n\nconst CheckboxList = ({ items, onItemChanged, disabled, className, itemClassName }) => (\n
    \n {items &&\n items.map(item => (\n <>\n {item.title ?
    {item.title}
    : null}\n
    \n onItemChanged(item, selected)}\n />\n {item.zendeskArticle ? : null}\n
    \n \n ))}\n
    \n);\nCheckboxList.propTypes = {\n items: PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.string.isRequired,\n selected: PropTypes.bool,\n label: PropTypes.string,\n individualItemClassName: PropTypes.string,\n zendeskArticle: PropTypes.string,\n }),\n ).isRequired,\n onItemChanged: PropTypes.func.isRequired,\n disabled: PropTypes.bool,\n className: PropTypes.string,\n itemClassName: PropTypes.string,\n};\nCheckboxList.defaultProps = {\n disabled: false,\n className: undefined,\n itemClassName: undefined,\n};\n\nexport default CheckboxList;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport { defineMessages, injectIntl } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport classnames from 'classnames';\nimport { ShareIcon } from '@/shared/components/Icons';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport ToastrService from '@/shared/services/ToastrService';\nimport MultiSelect from './input/multiselect/MultiSelect';\nimport { getUserClassName } from './input/UserSearch';\n\nconst messages = defineMessages({\n Users: 'Users',\n ShareItem: 'Share {item}',\n Remark: 'Remark',\n ItemWasShared: 'Item was shared',\n Share: 'Share',\n});\n\nclass ShareItemModal extends Component {\n state = {\n users: [],\n selectedUsers: [],\n remark: '',\n };\n\n componentDidMount() {\n this.form = React.createRef();\n const users = DataCacheService.getUsers();\n\n this.setState({\n users: users.map(x => ({\n id: x.id,\n email: x.email,\n label: x.name,\n languageCode: x.languageCode,\n isActive: x.isActive,\n })),\n });\n }\n\n static propTypes = {\n intl: intlShape.isRequired,\n itemName: PropTypes.string.isRequired,\n type: PropTypes.string.isRequired,\n relationName: PropTypes.string,\n relationId: PropTypes.string,\n id: PropTypes.string.isRequired,\n onClose: PropTypes.func.isRequired,\n show: PropTypes.bool,\n };\n\n static defaultProps = {\n show: false,\n relationName: '',\n relationId: undefined,\n };\n\n assignedToChanged = assignedTo => {\n this.setState(state => ({\n ...state,\n selectedAssignedTo: assignedTo,\n }));\n };\n\n userRemoved = item => {\n const { selectedUsers } = this.state;\n const index = selectedUsers.findIndex(x => x === item.value.id);\n\n const copy = [...selectedUsers];\n copy.splice(index, 1);\n\n this.setState({ selectedUsers: copy });\n };\n\n userAdded = selectedItem => {\n if (!selectedItem) return;\n\n const { selectedUsers } = this.state;\n\n if (!selectedUsers) {\n this.setState({\n selectedUsers: [selectedItem],\n invalidUsers: false,\n });\n } else {\n if (selectedUsers.map(x => x.id).includes(selectedItem.id)) return;\n this.setState({\n selectedUsers: [...selectedUsers, selectedItem],\n invalidUsers: false,\n });\n }\n };\n\n onSave = () => {\n const { selectedUsers, remark } = this.state;\n const { type, itemName, id, relationName, relationId } = this.props;\n if (!selectedUsers || selectedUsers.length < 1) {\n this.setState({ invalidUsers: true });\n return;\n }\n\n let notificationType;\n switch (type) {\n case 'task':\n notificationType = 1000;\n break;\n case 'document':\n notificationType = 1001;\n break;\n case 'relation':\n notificationType = 1002;\n break;\n case 'todo':\n notificationType = 1003;\n break;\n case 'interaction':\n notificationType = 1004;\n break;\n default:\n }\n\n const model = {\n shareMessage: remark,\n shareSubject:\n relationName && itemName\n ? `${relationName} - ${itemName}`\n : relationName && !itemName\n ? `${relationName}`\n : itemName,\n level: 0,\n notificationType,\n objectId: id,\n recipients: selectedUsers.map(x => ({\n userId: x.id,\n email: x.email,\n languageCode: x.languageCode,\n })),\n relationId,\n };\n\n return api.base\n .post(`${config.appUrls.notifications}/api/notifications/createshare`, model)\n .then(\n () => {\n const { intl } = this.props;\n ToastrService.success(intl.formatMessage(messages.ItemWasShared));\n this.closeModal();\n },\n error => {\n const { intl } = this.props;\n handleHttpError(intl)(error);\n },\n );\n };\n\n closeModal = () => {\n const { onClose } = this.props;\n onClose();\n };\n\n render() {\n const { show, intl, itemName } = this.props;\n const { users, selectedUsers, remark, invalidUsers } = this.state;\n const selectedItemsFormatted = users\n ? users.filter(r => selectedUsers.map(x => x.id).includes(r.id))\n : [];\n return (\n \n \n \n \n {intl.formatMessage(messages.ShareItem, { item: itemName })}\n \n }\n show={show}\n okLabel={intl.formatMessage(messages.Share)}\n onClose={this.closeModal}\n onSave={this.onSave}\n >\n {show && (\n
    \n
    \n
    \n \n
    \n \n
    \n
    \n
    \n \n
    \n \n this.setState({\n remark: e.target.value,\n })\n }\n />\n
    \n
    \n
    \n
    \n )}\n \n );\n }\n}\n\nexport default injectIntl(ShareItemModal);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { defineMessages, injectIntl, useIntl } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport CheckboxList from '@/shared/components/input/CheckboxList';\nimport Checkbox from '@/shared/components/input/Checkbox';\n\nconst messages = defineMessages({\n SelectAll: 'Select all',\n});\n\nclass CheckboxListModal extends Component {\n state = {\n items: [],\n selectAll: false,\n };\n\n reloadItems = () => {\n const { items = [], sortByLabel } = this.props;\n this.setState({\n selectAll: items.every(x => x.selected),\n items: sortByLabel\n ? items\n .map(x => ({\n ...x,\n selected: x.selected || false,\n }))\n .sort(dynamicSort('label'))\n : items.map(x => ({\n ...x,\n selected: x.selected || false,\n })),\n });\n };\n\n componentDidMount() {\n const { show } = this.props;\n if (show) {\n this.reloadItems();\n }\n }\n\n componentDidUpdate(prevProps) {\n const { show } = this.props;\n if (!prevProps.show && show) {\n this.reloadItems();\n }\n }\n\n static propTypes = {\n onSave: PropTypes.func.isRequired,\n intl: intlShape.isRequired,\n onClose: PropTypes.func.isRequired,\n show: PropTypes.bool,\n title: PropTypes.node,\n sortByLabel: PropTypes.bool,\n showSelectAll: PropTypes.bool,\n items: PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.string.isRequired,\n label: PropTypes.string,\n selected: PropTypes.selected,\n }),\n ).isRequired,\n };\n\n static defaultProps = {\n show: false,\n title: null,\n sortByLabel: true,\n showSelectAll: true,\n };\n\n taskStatusChanged = event => {\n const taskStatus = event.target.value;\n this.setState(state => ({\n ...state,\n selectedTaskStatus: taskStatus,\n }));\n };\n\n onSave = () => {\n const { items } = this.state;\n const { onSave } = this.props;\n\n return onSave(items);\n };\n\n closeModal = () => {\n const { onClose } = this.props;\n onClose();\n };\n handleItemChanged = (item, selected) => {\n const { items } = this.state;\n const newItems = items.map(i => {\n if (i.id !== item.id) return i;\n return {\n ...i,\n selected,\n };\n });\n\n this.setState({\n items: newItems,\n selectAll: selected && newItems.every(x => x.selected),\n });\n };\n handleSelectAll = selected => {\n this.setState(({ items }) => ({\n selectAll: selected,\n items: items.map(i => ({\n ...i,\n selected,\n })),\n }));\n };\n\n render() {\n const { show, intl, title, showSelectAll } = this.props;\n const { items, selectAll } = this.state;\n\n return (\n \n {show && (\n
    \n {showSelectAll && (\n \n )}\n \n
    \n )}\n
    \n );\n }\n}\n\nexport default injectIntl(CheckboxListModal);\n","import userStorage from '@/shared/services/userStorage';\n\nconst generateColumnStatus = hideableColumns =>\n hideableColumns.reduce((o, col) => {\n // eslint-disable-next-line no-param-reassign\n o[col.id] = !!col.selected;\n return o;\n }, {});\n\nexport const initHiddenColumnsState = (columnSelectionStorageKey, columnDefinitions, intl) => {\n const columnsFromStorage = userStorage.getItem(columnSelectionStorageKey);\n const initColumns = typeof columnsFromStorage === 'undefined' || columnsFromStorage === null;\n const hiddenColumns = columnsFromStorage || [];\n const hideableColumns = columnDefinitions\n .filter(f => {\n if (typeof f.enabled === 'undefined') return true;\n if (typeof f.enabled === 'function') return !!f.enabled();\n return !!f.enabled;\n })\n .map(({ id, message, visibleByDefault = true }) => ({\n id,\n label: intl.formatMessage(message),\n selected: !initColumns ? hiddenColumns.indexOf(id) === -1 : !!visibleByDefault,\n }));\n const columnStatus = generateColumnStatus(hideableColumns);\n return {\n hideableColumns,\n columnStatus,\n };\n};\n\nexport const handleHiddenColumnsSelection = (items, hideableColumns, columnSelectionStorageKey) => {\n const hiddenColumns = items.filter(x => !x.selected).map(x => x.id);\n userStorage.setItem(columnSelectionStorageKey, hiddenColumns);\n\n const newHideableColumns = hideableColumns.map(x => ({\n ...x,\n selected: hiddenColumns.indexOf(x.id) === -1,\n }));\n const columnStatus = generateColumnStatus(newHideableColumns);\n return {\n hideableColumns: newHideableColumns,\n columnStatus,\n };\n};\n\nexport const countVisibleColumns = (columnStatus, ...columnNames) => {\n if (!columnStatus || typeof columnStatus !== 'object') return 0;\n // eslint-disable-next-line no-param-reassign\n if (!columnNames || columnNames.length === 0) columnNames = Object.keys(columnStatus);\n\n return columnNames.flat().reduce((count, name) => {\n if (columnStatus[name]) return count + 1;\n return count;\n }, 0);\n};\n","import React, { Fragment } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage } from 'react-intl';\nimport classnames from 'classnames';\n\nconst FormGroupPart = ({\n children,\n label,\n labelClassName,\n labelCols,\n inputCols,\n invalid,\n}) => (\n \n \n {label && label.id ? : label}\n \n
    {children}
    \n
    \n);\nFormGroupPart.propTypes = {\n children: PropTypes.node,\n label: PropTypes.oneOfType([\n PropTypes.node,\n PropTypes.shape({ id: PropTypes.string.isRequired }),\n ]),\n labelClassName: PropTypes.string,\n labelCols: PropTypes.string,\n inputCols: PropTypes.string,\n invalid: PropTypes.bool,\n labelAlign: PropTypes.oneOf(['left', 'right', 'center']),\n};\nFormGroupPart.defaultProps = {\n children: null,\n label: null,\n labelClassName: '',\n labelCols: 'col-sm-2',\n inputCols: 'col-sm-4',\n invalid: false,\n labelAlign: 'left',\n};\nexport default FormGroupPart;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport adminpulse from '@/shared/utils/adminpulse';\nimport OutsideClickHandler from 'react-outside-click-handler';\n\nconst padNumber = value => {\n const numberValue = parseInt(value, 10) || 0;\n return numberValue < 10 ? `0${numberValue}` : `${numberValue}`;\n};\n\nclass TimeInput extends Component {\n state = {\n hourEmpty: false,\n minuteEmpty: false,\n hasFocus: false,\n hourInput: '00',\n minuteInput: '00',\n lastKeyPressWasArrow: false,\n };\n\n onHoursKeyDown = e => {\n const { onKeyDown } = this.props;\n this.setState({ lastKeyPressWasArrow: e.keyCode === 38 || e.keyCode === 40 });\n\n if (onKeyDown) {\n onKeyDown(e);\n }\n };\n\n onHoursChanged = e => {\n const { padHours, id } = this.props;\n const { hourInput, minuteInput, lastKeyPressWasArrow } = this.state;\n let inputValue = e.target.value;\n const inputNumber = parseInt(inputValue, 10) || 0;\n // Changed from 00 to 0, so backspace or delete was used -> clear input\n if (hourInput === '00' && inputValue === '0') inputValue = '';\n // Changed from 02 to 3, so up or down button was used -> add padding\n else if (\n padHours &&\n hourInput !== '' &&\n inputValue !== '' &&\n Math.abs(inputNumber - parseInt(hourInput, 10)) === 1\n )\n inputValue = padNumber(inputValue);\n // Check if input values has to many leading zeros -> reset padding\n else if (inputValue.indexOf('0') === 0 && inputValue.length > 2)\n inputValue = padNumber(inputValue);\n\n this.onInputChanged(inputValue, minuteInput);\n\n if (\n // dont shift focus to minute field if the user is using the up/down arrow to increase/decrease hours. This results in bad UX\n !lastKeyPressWasArrow &&\n // use the element selector to get the amount of digits in the input field. The value of the number field is 9 even if the user entered 09.\n // after the 2nd digit, we jump to the minutes field\n document.getElementById(`${id}-HourField`).value.toString().length === 2\n ) {\n document.getElementById(`${id}-MinuteField`).focus();\n }\n };\n onMinuteChanged = e => {\n const { hourInput, minuteInput } = this.state;\n let inputValue = e.target.value;\n const inputNumber = parseInt(inputValue, 10) || 0;\n // Changed from 00 to 0, so backspace or delete was used -> clear input\n if (minuteInput === '00' && inputValue === '0') inputValue = '';\n // Changed from 02 to 3, so up or down button was used -> add padding\n else if (\n minuteInput !== '' &&\n inputValue !== '' &&\n Math.abs(inputNumber - parseInt(minuteInput, 10)) === 1\n )\n inputValue = padNumber(inputValue);\n // Check if input values has to many leading zeros -> reset padding\n else if (inputValue.indexOf('0') === 0 && inputValue.length > 2)\n inputValue = padNumber(inputValue);\n\n this.onInputChanged(hourInput, inputValue);\n };\n\n onInputChanged = (hour, minute) => {\n const { min, max, onChange, padHours } = this.props;\n let hourInput = hour;\n let minuteInput = minute;\n let validTime = null;\n if (hour !== '' && minute !== '') {\n const time = adminpulse.joinTime(parseInt(hour, 10), parseInt(minute, 10));\n validTime = Math.max(min, Math.min(max, time));\n if (time !== validTime) {\n // Change inputs to valid value\n const [validHour, validMinute] = adminpulse.splitTimeArray(validTime);\n hourInput = padHours ? padNumber(validHour) : `${validHour}`;\n minuteInput = padNumber(validMinute);\n }\n }\n this.setState({ hourInput, minuteInput }, () => {\n if (validTime !== null) {\n onChange(validTime);\n }\n });\n };\n\n handleFocus = () => {\n this.setState({ hasFocus: true });\n };\n\n // Submit on blur\n handleOutsideClick = () => {\n const { hasFocus, hourInput, minuteInput } = this.state;\n if (!hasFocus) return;\n const { onBlur, padHours } = this.props;\n const hour = padHours ? padNumber(hourInput) : `${hourInput || 0}`;\n const minute = padNumber(minuteInput);\n\n this.onInputChanged(hour, minute);\n this.setState({ hasFocus: false });\n onBlur();\n };\n handleClear = () => {\n const { onChange } = this.props;\n Promise.resolve(onChange(null)).then(() => {\n const { onBlur } = this.props;\n this.setState({ hasFocus: false });\n onBlur();\n });\n };\n\n resetInternalValue = () => {\n const { value, padHours } = this.props;\n this.setState(({ hourInput, minuteInput }) => {\n const newState = {};\n const [hour, minute] = adminpulse.splitTimeArray(value);\n const currentHour = parseInt(hourInput) || 0;\n const currentMinute = parseInt(minuteInput) || 0;\n\n if (hour === currentHour && minute === currentMinute) return undefined;\n if (hour !== currentHour) {\n newState.hourInput = padHours ? padNumber(hour) : `${hour}`;\n }\n\n if (minute !== currentMinute) {\n newState.minuteInput = padNumber(minute);\n }\n\n return newState;\n });\n };\n componentDidMount() {\n this.resetInternalValue();\n }\n componentDidUpdate(prevProps) {\n const { value, padHours } = this.props;\n if (prevProps.value !== value) {\n this.resetInternalValue();\n }\n }\n\n render() {\n const { disabled, id, autofocus, onKeyDown, allowNull, min, max } = this.props;\n const { hourInput, minuteInput } = this.state;\n let [minHour, minMinute] = adminpulse.splitTimeArray(min);\n let [maxHour, maxMinute] = adminpulse.splitTimeArray(max);\n const hourValue = parseInt(hourInput) || 0;\n if (hourValue > minHour) minMinute = -1;\n if (hourValue < maxHour) maxMinute = 60;\n\n return (\n \n
    \n \n :\n \n {allowNull ? (\n \n \n \n ) : null}\n
    \n
    \n );\n }\n}\nTimeInput.propTypes = {\n value: PropTypes.number,\n onChange: PropTypes.func.isRequired,\n onBlur: PropTypes.func,\n disabled: PropTypes.bool,\n id: PropTypes.string,\n min: PropTypes.number,\n max: PropTypes.number,\n autofocus: PropTypes.bool,\n onKeyDown: PropTypes.func,\n allowNull: PropTypes.bool,\n padHours: PropTypes.bool,\n};\n\nTimeInput.defaultProps = {\n value: 0,\n disabled: false,\n id: 'TimeInput',\n onBlur: () => {},\n min: 0,\n max: 1439,\n autofocus: undefined,\n onKeyDown: undefined,\n allowNull: false,\n padHours: true,\n};\nexport default TimeInput;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage, defineMessages } from 'react-intl';\n\nimport intlShape from '@/shared/utils/intlShape';\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport moment from 'moment';\nimport ToastrService from '@/shared/services/ToastrService';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport RichTextEditor from '@/shared/components/RichTextEditor';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport CanRead from '@/shared/components/security/CanRead';\nimport { injectStateService, StateService } from '@/shared/services/StateService';\nimport { LinkIcon } from '@/shared/components/Icons';\nimport AuthService, { privileges } from '@/shared/services/AuthService';\n\nimport api from '@/shared/api';\nimport config from '@/config';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport LoadingAnimation from '@/shared/components/LoadingAnimation';\nimport DatePicker from '@/shared/components/input/DatePicker';\nimport FormGroupPart from '@/shared/components/registration/partials/FormGroupPart';\nimport TimeInput from '@/shared/components/input/TimeInput';\nimport UserSearch from '@/shared/components/input/UserSearch';\n\nexport const isBeforeToday = date => {\n if (!moment.isMoment(date)) return false;\n return moment(date).isBefore(moment.utc(), 'day');\n};\n\nconst messages = defineMessages({\n OnlyEmailsByAdminPulseCanBeResent: 'E-mails that were not sent by AdminPulse cannot be resent',\n TheMailHasBeenSentAgain: 'The email has been sent again',\n ResendEmail: 'Resend email',\n ResendEmailConfirmationMsg: 'Are you sure you want to resend this email?',\n Share: 'Share',\n MarkAsSigned: 'Mark as signed',\n Template: 'Template',\n CreateRelation: 'Create relation',\n UpdateRelation: 'Update relation',\n Download: 'Download',\n Forward: 'Forward',\n Open: 'Open',\n LinkToRelation: 'Link to relation',\n DeleteDocument: 'Delete document',\n ShowAllDocumentsForRelation: 'Show documents for relation',\n EmailStatus: 'Email status',\n RemoveEmails: 'Remove e-mails',\n EmailGlobalActionsTooltip:\n 'Select one or more e-mails to execute a global action on these e-mails',\n DropzoneExplanation:\n 'AdminPulse will try to identify documents uploaded here and suggest a way to process them.',\n AutoLinkDocumentsToCompanyExplanation:\n 'The document will be linked to this company. If new relations are created based on this document, the relations will be linked to this company.',\n DocumentWillBeLinkedToCompanyAutomatically: 'The document will be linked to company {company}.',\n DocumentWillBeLinkedToRelationAutomatically:\n 'Documents that you upload here will now be automatically linked to {relation}.',\n Documents: 'Documents',\n Dropzone: 'Dropzone',\n ChooseRelationLinkDocument: 'Choose a relation you want to link {documentName} to.',\n NoDocumentsFound: 'No documents found',\n UploadFilesToCurrentFolder: 'Drop to upload files to current folder',\n UploadFilesToSpecificFolder: 'Drop to upload files to a specific folder',\n MoveOrCopyDocument: 'Drop your document to move or copy it',\n DropDocumentToAddTag: 'Drop your document to add a tag',\n NrOfLinkedRelations: '{nr} relations',\n AllDocumentsSelected: 'All documents selected',\n AllEmailsSelected: 'All emails selected',\n CountEmailsSelected: 'Selected {count} e-mails',\n Name: 'Name',\n Relation: 'Relation',\n Relations: 'Relations',\n Edit: 'Edit',\n Type: 'Type',\n Status: 'Status',\n SearchDocuments: 'Search documents',\n IncludeInactiveRelations: 'Include inactive relations',\n AllDocuments: 'All documents',\n DocumentsWithoutTags: 'Without tags',\n AllTags: 'All tags',\n Tags: 'Tags',\n Folders: 'Folders',\n FolderStructure: 'Folder structure',\n WithDocumentTags: 'With document tags',\n WithoutDocumentTags: 'Without document tags',\n // Toastrs\n MsgDeleteDocumentSuccess: 'Document deleted',\n MsgDeleteDocumentError: 'Error while deleting document',\n\n MsgLinkRelationDocumentSuccess: 'Document linked to relation',\n MsgLinkRelationDocumentError: 'Error while linking document to relation',\n\n MsgRecognitionDocumentUploadError: 'Error while uploading recognition document',\n\n MsgMarkSignedLetterSuccess: 'Document marked as signed assignment letter',\n MsgMarkSignedLetterError: 'Error while marking assignment letter as signed',\n\n MsgCreateRelationSuccess: 'Relation created',\n MsgCreateRelationError: 'Error while creating relation',\n\n MsgUpdateRelationSuccess: 'Relation updated',\n MsgUpdateRelationError: 'Error while updating relation',\n DocumentDate: 'Document date',\n CreationDate: 'Creation date',\n CreatedBy: 'Created by',\n Role: 'Role',\n\n AmountOfAuthorizations: 'Amount of authorizations',\n AmountOfRelations: 'Amount of relations',\n AmountOfRegistrations: 'Amount of registrations',\n UpdateAuthorizations: 'Update authorizations',\n Importregistrationlist: 'Import registrations',\n ProcessAuthorizationList: 'Process authorization list',\n CreateNewRelations: 'Create relation if it does not exist',\n RemoveExpiredAuthorizations: 'Remove expired authorizations',\n ProcessAuthorizationListQueued:\n 'Authorization list will be processed shortly. Click here to view its progress.',\n ProcessRegistrationListQueued:\n 'Registration import will be processed shortly. Click here to view its progress.',\n NotLinkedToARelation: 'Not linked to a relation',\n NotLinkedToARelationShort: 'No relation',\n LinkedToMultipleRelations: 'Linked to multiple relations',\n LinkedToMultipleRelationsShort: 'Multiple relations',\n GlobalActions: 'Global actions',\n DocumentGlobalActionsTooltip:\n 'Select one or more documents to execute a global action on these documents.',\n AddOrRemoveTags: 'Add or remove tags',\n Action: 'Action',\n AddTags: 'Add tags',\n RemoveTags: 'Remove tags',\n EnterTag: 'Enter tag',\n GlobalActionStarted: 'Global action was started, click here to see its progress',\n AddOrRemoveRelations: 'Add or remove relations',\n AddRelations: 'Add relations',\n RemoveRelations: 'Remove relations',\n DeleteSingleDocumentConfirmationMsg:\n 'Are you sure you want to delete this document? This action cannot be undone.',\n DeleteMultipleDocumentsConfirmationMsg:\n 'Are you sure you want to delete these documents? This action cannot be undone.',\n RemoveDocuments: 'Remove documents',\n DownloadAsZip: 'Download as zip',\n DownloadZipWithFolderStructureYesNo:\n 'Do you want to download the documents in their folder structure? If not, they will be added to the zip as one plain list of documents.',\n CountDocumentsSelected: 'Selected {count} documents',\n SendByEmail: 'Send by email',\n PleaseFilterOnRelationBeforeSendingEmail:\n 'Please select a relation before trying to send an email.',\n EmailSent: 'Email sent',\n PleaseMakeManualSelectionOfDocuments:\n 'Please make a manual selection of documents that you want to send by email, not using the select-all button.',\n ResetFilters: 'Reset filters',\n DocumentWasMoved: 'The document was moved.',\n SigningStatus: 'Signing status',\n CreateNewToDo: 'Create new to-do',\n DocumentIsPublicOnPortal: 'Document is public on portal',\n EnableOrDisableIsPublicOnPortal: 'Set or remove is public on portal',\n IsPublicOnPortal: 'Is public on portal',\n SendSignatureRequest: 'Send signature request',\n NoDocumentProviderConfigured:\n 'No signing provider has been configured. You can configure a document signing provider under general settings.',\n\n NoSignaturedFoundOnDocument: 'No signature fields were found on the document.',\n Signature: 'Signature',\n Signer: 'Signer',\n Email: 'Email',\n Mobile: 'Mobile',\n ChooseEmployee: 'Choose an employee',\n ChooseClient: 'Choose a client',\n Or: 'Or',\n NoEmailAddress: 'No email address',\n NoPhone: 'No phone',\n SelfSignature: 'Self signature',\n RequiredSignature: 'Signature is required',\n DocumentSigningRequestSent: 'Signature request sent',\n DocumentSigningRequestFailed: 'Signature request failed',\n TheDocumentNeedsToBeLinkedToARelationInOrderToSign:\n 'The document needs to be linked to at least 1 relation in order to send a signature request.',\n ChooseRelation: 'Choose relation',\n ClickToAddSignatureFieldsToDocumentOnEmptyPage:\n 'Click on the button to start adding signees to the document. The signatures will be placed on an empty page at the end of the document.',\n\n Add: 'Add',\n Delete: 'Delete',\n RevokeSignatureRequest: 'Revoke signature request',\n RevokeSignatureRequestConfirmationMsg: 'Are you sure you want to revoke this signature request?',\n SignatureRequestRevoked: 'Signature request revoked',\n DocumentCreatedBy: 'Created by',\n NoRelationCandidatesFound:\n 'No e-mailaddress or contact with an e-mailaddress was found. Please add an e-mailaddress to the relation, or add a linked relation with an e-mailaddress if the relation is of type company.',\n DeleteRelationLink: 'Delete relation link',\n DeleteRelationLinkConfirmationMsg:\n 'Are you sure you want to delete the relation from this document?',\n RelationLinkDeleted: 'Relation link deleted.',\n ChangeDocumentDate: 'Change document date',\n InvalidDate: 'Invalid date',\n SendOn: 'Send on',\n DelayedSendingExplanation: 'If empty, the e-mail will be sent immediately',\n Emails: 'E-mails',\n Attachments: 'Attachments',\n Invoices: 'Invoices',\n IncludeEmailsTooltip: 'Show or hide emails in the document overview',\n IncludeInvoicesTooltip: 'Show or hide invoices in the document overview',\n IncludeAttachmentsTooltip: 'Show or hide attachments in the document overview',\n CreateMergedPdf: 'Create merged PDF',\n Subject: 'Subject',\n EmailTo: 'To',\n From: 'From',\n Cc: 'CC',\n Bcc: 'BCC',\n Date: 'Date',\n ToCcBcc: 'To / CC / BCC',\n SystemEmailsCannotBeRemoved: 'Invoice e-mails that were sent by AdminPulse cannot be removed',\n NoEmailsFound: 'No emails found',\n DocumentWasUploaded:\n 'Document uploaded. It will be added to the list when recognition has finished',\n UploadFilesToStartRecognition: 'Upload files to start recognition',\n ColumnConfig: 'Configure columns',\n SelectOverviewColumns: 'Select overview columns',\n DocumentDateWasModified: 'Document date was modified',\n InvalidDocumentDate: 'Invalid document date',\n ClickForAdvancedUpload: 'Click for advanced upload',\n Content: 'Content',\n NoDigitalSigningTemplateFound: 'No digital signing template found',\n ChooseTemplate: 'Choose template',\n OpenEmailTemplates: 'Open email templates',\n Templates: 'Templates',\n AddSigner: 'Add signer',\n RequiredEmailBodyAndSubject: 'Email body and subject are required',\n Signers: 'Signers',\n DownloadAsPdf: 'Download as pdf',\n RepresentativeOfRelation: '(representative of {relation})',\n SendViaEmail: 'Send via e-mail',\n SendAsPdf: 'Send PDF via e-mail',\n SelectRelation: 'Select relation',\n DocumentCouldNotBeConverted: 'Document could not be converted',\n OneOrMoreOfTheDocumentsCannotBeSigned: 'OneOrMoreOfTheDocumentsCannotBeSigned',\n Time: 'Time',\n});\n\nclass DocumentSignatureRequestModal extends Component {\n signingProvidersWithCustomEmail = [3, 5, 6, 7];\n\n state = {\n noProviderConfigured: false,\n scheduledDate: undefined,\n scheduledTime: '00:00',\n employeeCandidates: [],\n relationCandidates: [],\n relations: [],\n companyId: undefined,\n documentSigningProvider: undefined,\n };\n\n static propTypes = {\n show: PropTypes.bool.isRequired,\n intl: intlShape.isRequired,\n onSave: PropTypes.func.isRequired,\n onClose: PropTypes.func.isRequired,\n stateService: PropTypes.instanceOf(StateService).isRequired,\n documents: PropTypes.arrayOf({}).isRequired,\n };\n\n static defaultProps = {};\n\n componentDidMount() {\n const { documents, intl } = this.props;\n\n for (let i = 0; i < documents.length; i++) {\n const canSign =\n AuthService.hasPermission({ functionality: 'Relation', privilege: 'Update' }) &&\n documents[i].canBeSigned &&\n documents[i].signingStatus < 20 && // not signed\n documents[i].signingStatus !== 10; // not pending\n if (!canSign) {\n this.setState({ cannotSign: true });\n break;\n }\n }\n\n const relations = documents.flatMap(x => x.relations);\n this.setState({ relations });\n\n const dataCache = DataCacheService.getDataCache();\n const relationCompanyIds =\n relations && relations.length\n ? new Set(relations.map(x => x.companyId))\n : new Set([dataCache.defaultcompany.id]);\n const companyId =\n relationCompanyIds.size === 1 ? [...relationCompanyIds][0] : dataCache.defaultcompany.id;\n\n this.setState({\n companyId,\n });\n\n const company = dataCache.company.find(x => x.id === companyId) || dataCache.defaultcompany;\n const { documentSigningProvider } = company;\n this.setState({ documentSigningProvider });\n\n // no provider configured\n if (documentSigningProvider === 0) {\n this.setState({ noProviderConfigured: true });\n } else if (relations && relations.length) {\n this.setState({ loading: true });\n\n const emptyPromise = () => Promise.resolve();\n // if Penneo is the signing provider, we dont need to find signature fields because Penneo doesn't support these markers\n const signaturesPromise =\n documentSigningProvider === 5\n ? emptyPromise\n : api.base.post(\n `${config.appUrls.documentsConverter}/api/getsigningfields/${documentSigningProvider}`,\n documents.map(x => x.id),\n );\n\n const templatesPromise = this.signingProvidersWithCustomEmail.includes(\n documentSigningProvider,\n )\n ? api.base.get(`${config.appUrls.api}/api/template/company/15`)\n : emptyPromise;\n\n Promise.all([signaturesPromise, templatesPromise])\n .then(([{ data: signers }, { data: templates }]) => {\n let updatedState = this.state;\n updatedState = {\n ...updatedState,\n signingProvider: documentSigningProvider,\n documentHasMarkers: !!signers,\n templates,\n };\n\n if (signers) {\n updatedState = {\n ...updatedState,\n signers,\n };\n }\n\n if (!templates || templates.length === 0) {\n // retrieve default email template\n api.base\n .get(\n `${\n config.appUrls.documentSigning\n }/api/DefaultEmailTemplate/${documentSigningProvider}/${relations[0].languageCode ||\n 'nl'}/${company.id}/${encodeURIComponent(documents[0].name)}`,\n )\n .then(\n ({ data }) => {\n updatedState = {\n ...updatedState,\n subject: data.subject,\n initialBody: data.body,\n body: data.body,\n };\n this.setState(updatedState, () => this.retrieveSigningCandidates());\n },\n error => {\n const { intl } = this.props;\n handleHttpError(intl)(error);\n this.setState(updatedState, () => this.retrieveSigningCandidates());\n },\n );\n } else if (templates.length === 1) {\n // select only template and load content\n updatedState = {\n ...updatedState,\n selectedTemplate: templates[0].id,\n };\n this.setState(updatedState, () =>\n this.retrieveDigitalSigningEmail(this.retrieveSigningCandidates),\n );\n } else {\n this.setState(updatedState, () => this.retrieveSigningCandidates());\n }\n })\n .catch(error => {\n handleHttpError(intl)(error);\n this.setState({ loading: false });\n this.closeModal();\n });\n }\n }\n\n templateChanged = event => {\n const template = event.target.value;\n\n this.setState(\n state => ({\n ...state,\n selectedTemplate: template,\n }),\n () => this.retrieveDigitalSigningEmail(),\n );\n };\n\n retrieveDigitalSigningEmail = callback => {\n const { intl, documents } = this.props;\n const { selectedTemplate, relations } = this.state;\n const relation = relations[0];\n this.setState({ loadingEmail: true });\n return api.base\n .get(\n `${config.appUrls.api}/api/template/GetDigitalSigningMail?relationId=${relation.id}&templateId=${selectedTemplate}&filename=${documents[0].name}`,\n )\n .then(\n ({ data }) => {\n this.setState(\n {\n subject: data.subject,\n initialBody: data.body,\n body: data.body,\n loadingEmail: false,\n },\n () => (callback ? callback() : {}),\n );\n },\n error => {\n this.setState({ loading: false });\n handleHttpError(intl)(error);\n this.setState(\n {\n subject: '',\n initialBody: '',\n body: '',\n loadingEmail: false,\n },\n () => (callback ? callback() : {}),\n );\n },\n );\n };\n\n retrieveSigningCandidates = () => {\n const { relations } = this.state;\n\n this.setState({ loading: true });\n\n const relationIds = relations.map(x => x.id);\n\n api.base\n .post(`${config.appUrls.api}/api/RelationDocument/GetSigningCandidates`, relationIds)\n .then(({ data }) => {\n if (data) {\n let { employeeCandidates, relationCandidates } = data;\n if (!!relationCandidates)\n relationCandidates.sort((a, b) => a.fullName.localeCompare(b.fullName));\n employeeCandidates = (employeeCandidates || [])\n .sort((a, b) => a.fullName.localeCompare(b.fullName))\n .map(x => ({ id: x.id, name: x.fullName, ...x }));\n this.setState({\n employeeCandidates,\n relationCandidates,\n loading: false,\n });\n }\n })\n .catch(error => {\n this.setState({\n loading: false,\n });\n const { intl } = this.props;\n handleHttpError(intl)(error);\n });\n };\n\n employeeChanged = (selection, index) => {\n let employeeId = !!selection ? selection.id : null;\n let employee = !!selection ? this.state.employeeCandidates.find(e => e.id === employeeId) : {};\n\n const { signers } = this.state;\n\n this.setState({\n signers: signers.map((x, idx) => {\n if (index === idx) {\n return {\n ...x,\n ...employee,\n signerId: employeeId,\n employeeId,\n relationId: null,\n };\n }\n return x;\n }),\n });\n };\n\n relationCandidateChanged = (event, index) => {\n const relationId = event.target.value;\n if (!relationId) return;\n\n const { relationCandidates, signers } = this.state;\n\n const relation = relationCandidates.find(x => x.id === relationId);\n this.setState({\n signers: signers.map((x, idx) => {\n if (idx === index) {\n return {\n ...x,\n ...relation,\n signerId: relationId,\n employeeId: null,\n relationId,\n };\n }\n return x;\n }),\n });\n };\n\n signerIsSelfSignature = signer => {\n if (!signer || !signer.fields) return false;\n for (let i = 0; i < signer.fields.length; i++) {\n if (signer.fields[i].isSelfSignature) {\n return true;\n }\n }\n\n return false;\n };\n\n validate = () => {\n const { signers, body, subject, documentSigningProvider } = this.state;\n const { intl } = this.props;\n\n if (!signers || signers.length === 0) {\n ToastrService.error(intl.formatMessage(messages.RequiredSignature));\n return false;\n }\n\n for (let i = 0; i < signers.length; i++) {\n const requiredSignature = signers[i];\n if (!this.signerIsSelfSignature(requiredSignature) && !requiredSignature.signerId) {\n ToastrService.error(intl.formatMessage(messages.RequiredSignature));\n return false;\n }\n }\n\n if (\n this.signingProvidersWithCustomEmail.includes(documentSigningProvider) &&\n (!body || !subject)\n ) {\n ToastrService.error(intl.formatMessage(messages.RequiredEmailBodyAndSubject));\n return false;\n }\n\n return true;\n };\n\n handleDateChange(date) {\n const { scheduledTime } = this.state;\n const combinedDateTime = this.combineDateAndTime(date, scheduledTime);\n this.setState({ scheduledDate: combinedDateTime });\n }\n\n handleTimeChange(time) {\n const { scheduledDate } = this.state;\n const combinedDateTime = this.combineDateAndTime(scheduledDate, time);\n this.setState({ scheduledDate: combinedDateTime, scheduledTime: time });\n }\n\n combineDateAndTime(date, time) {\n if (!date || !time || time === '00:00') return date;\n const hoursTime = Math.floor(time / 60);\n const minutesTime = time % 60;\n const timeString = `${hoursTime.toString().padStart(2, '0')}:${minutesTime\n .toString()\n .padStart(2, '0')}`;\n const [hours, minutes] = timeString.split(':');\n date\n .hour(hours)\n .minute(minutes)\n .second(0)\n .millisecond(0);\n return date;\n }\n\n onSave = () => {\n if (!this.validate()) return;\n const {\n signers,\n companyId,\n relations,\n appendSignaturesToDocument,\n scheduledDate,\n subject,\n body,\n documentSigningProvider,\n } = this.state;\n const { documents, onSave, intl } = this.props;\n\n const relation = relations[0];\n const signingRequest = {\n name: documents[0].name,\n emailSubject: subject,\n emailBody: body,\n relationId: relation.id,\n documentLanguage: relation.languageCode || 'nl',\n companyId,\n initiator: AuthService.getEmail(),\n signingProvider: documentSigningProvider,\n appendSignaturesToDocument,\n scheduledDate,\n documents: [\n ...documents.map(x => ({ documentId: x.id, fileName: x.name, contentType: x.mime })),\n ],\n signers,\n };\n\n this.setState({ sending: true, error: null });\n\n return api.base\n .post(`${config.appUrls.documentSigning}/api/CreateDocumentSigningRequest`, signingRequest)\n .then(({ data }) => {\n this.setState({ false: true });\n ToastrService.success(intl.formatMessage(messages.DocumentSigningRequestSent));\n const updatedDocuments = documents.map(x => ({\n ...x,\n signingId: data.signingId,\n signingPackageId: data.signingPackageId,\n signingStatus: data.signingStatus,\n }));\n return onSave(updatedDocuments);\n })\n .catch(error => {\n this.setState({ sending: false });\n\n if (error.response && error.response.status === 400) {\n if (error.response.data && error.response.data.code) {\n // the Penneo custom exception where we notify the user about the missing {link} in the email content is seen as a translation parameter\n if (error.response.data.code === 503) {\n error.response.data.parameters = {\n ...error.response.data.parameters,\n link: '{link}',\n };\n }\n handleHttpError(intl)(error);\n } else {\n ToastrService.error(intl.formatMessage(messages.DocumentSigningRequestFailed));\n this.setState({ error: JSON.stringify(error.response.data, null, 2) });\n }\n } else {\n handleHttpError(intl)(error);\n }\n });\n };\n\n closeModal = () => {\n const { onClose } = this.props;\n onClose();\n };\n\n render() {\n const { show, intl, stateService } = this.props;\n const {\n noProviderConfigured,\n employeeCandidates,\n relationCandidates,\n signers,\n loading,\n error,\n documentHasMarkers,\n appendSignaturesToDocument,\n signingProvider,\n scheduledDate,\n dateFocused,\n subject,\n templates,\n initialBody,\n selectedTemplate,\n loadingEmail,\n relations,\n cannotSign,\n } = this.state;\n if (!show) return null;\n\n const noRelationsLinkedToDocument = !relations || !relations.length;\n\n const signingProvidersWithDelayedSending = [3, 5, 6];\n\n return (\n this.onSave()}\n size=\"xl\"\n >\n
    \n
    \n {!loading && noProviderConfigured && (\n \n
    \n \n
    \n
    \n )}\n {!loading && cannotSign && (\n \n
    \n \n
    \n
    \n )}\n {!loading &&\n !noProviderConfigured &&\n !noProviderConfigured &&\n noRelationsLinkedToDocument && (\n \n
    \n \n
    \n \n )}\n {!loading && relationCandidates && relationCandidates.length === 0 && (\n \n
    \n \n
    \n \n )}\n\n {!loading && (\n <>\n
    \n \n \n \n
    \n
    \n
    \n \n \n \n {documentHasMarkers && (\n \n \n \n )}\n\n \n \n \n \n \n \n \n \n \n \n \n \n {appendSignaturesToDocument && }\n \n \n \n {signers\n ? signers.map((signer, index) => (\n \n {documentHasMarkers && {signer.signerIdentifier}}\n {!this.signerIsSelfSignature(signer) && (\n \n
    \n this.employeeChanged(e, index)}\n value={signer.employeeId}\n placeholder={intl.formatMessage(messages.ChooseEmployee)}\n />\n
    \n \n {intl.formatMessage(messages.Or)}\n \n
    \n\n this.relationCandidateChanged(e, index)}\n className=\"form-control\"\n id=\"documentSignatureModal-RelationCandidates\"\n style={{\n display: 'inline',\n width: '45%',\n marginTop: '7px',\n }}\n value={\n signer.relationId ||\n intl.formatMessage(messages.ChooseClient)\n }\n >\n {!signer.relationId && (\n \n )}\n {relationCandidates.map(relation => (\n \n ))}\n \n
    \n \n )}\n {!this.signerIsSelfSignature(signer) && (\n \n {signer.signerId && (\n \n {signer.emailAddress && (\n \n \n {signer.emailAddress}\n \n )}\n {!signer.emailAddress && (\n \n \n \n \n )}\n \n )}\n \n )}\n {!this.signerIsSelfSignature(signer) && (\n \n {signer.signerId && (\n \n {signer.phone && (\n \n \n {signer.phone}\n \n )}\n {!signer.phone && (\n \n \n \n \n )}\n \n )}\n \n )}\n {!this.signerIsSelfSignature(signer) && (\n \n {signer.signerId &&\n signer.roles &&\n signer.roles.map(role => (\n \n {!role.linkType && role.role >= 0 ? (\n \n {intl.formatMessage(listItemMsg('Role', role.role))}\n \n ) : null}\n {!role.role && role.linkType && role.linkType >= 0 ? (\n
    \n {intl.formatMessage(\n listItemMsg('linkTypeto', role.linkType),\n )}\n {role.position && role.position >= 0 ? (\n \n {' ('}\n {intl.formatMessage(\n listItemMsg(\n 'companyownerposition',\n role.position,\n ),\n )}\n )\n \n ) : null}\n {role.representative ? (\n <>\n  \n {intl.formatMessage(\n messages.RepresentativeOfRelation,\n { relation: role.representsRelation },\n )}\n \n ) : null}\n
    \n ) : null}\n
    \n ))}\n \n )}\n {this.signerIsSelfSignature(signer) && (\n \n \n \n )}\n {appendSignaturesToDocument && (\n \n \n this.setState({\n signers: signers.filter((item, idx) => idx !== index),\n })\n }\n title={intl.formatMessage(messages.Delete)}\n className=\"btn btn-default btn-xs\"\n >\n \n \n \n )}\n \n ))\n : null}\n \n \n\n {!noProviderConfigured &&\n !cannotSign &&\n !noRelationsLinkedToDocument &&\n !documentHasMarkers &&\n (!signers || signers.length === 0) && (\n \n \n {signingProvider !== 5 && (\n
    \n \n
    \n )}\n
    \n \n
    \n
    \n
    \n \n )}\n\n {!noProviderConfigured &&\n !noRelationsLinkedToDocument &&\n !documentHasMarkers &&\n !cannotSign && (\n
    \n \n this.setState({\n appendSignaturesToDocument: true,\n signers: [\n ...(signers || []),\n {\n marker: null,\n fields: [{ type: 1, isSelfSignature: false }],\n signer: null,\n signerId: null,\n },\n ],\n })\n }\n className=\"btn btn-default\"\n >\n \n {intl.formatMessage(messages.AddSigner)}\n \n\n {signingProvider === 3 &&\n (!signers || !signers.some(x => this.signerIsSelfSignature(x))) && (\n \n this.setState({\n appendSignaturesToDocument: true,\n signers: [\n ...(signers || []),\n {\n marker: null,\n fields: [{ type: 1, isSelfSignature: true }],\n signer: null,\n signerId: null,\n },\n ],\n })\n }\n className=\"btn btn-default margin5L\"\n >\n \n {intl.formatMessage(messages.SelfSignature)}\n \n )}\n
    \n )}\n
    \n
    \n \n )}\n\n {signingProvidersWithDelayedSending.includes(signingProvider) && (\n
    \n \n \n \n
    \n this.handleDateChange(date)}\n focused={this.state.dateFocused}\n onFocusChange={({ focused }) => this.setState({ dateFocused: focused })}\n id=\"scheduledDate\"\n required\n block\n small\n isOutsideRange={isBeforeToday}\n />\n
    \n
    \n \n this.handleTimeChange(time)} // Function to handle time changes\n />\n \n
    \n
    \n )}\n\n {this.signingProvidersWithCustomEmail.includes(signingProvider) && (\n \n
    \n \n {intl.formatMessage(messages.Template)}\n \n
    \n {!templates.length && (\n \n )}\n {templates.length > 0 && (\n \n {!selectedTemplate && (\n \n )}\n {templates\n .map(template => ({\n ...template,\n translation: intl.formatMessage(\n listItemMsg('template', template.id, template.name),\n ),\n }))\n .sort((a, b) =>\n a.translation.toLowerCase().localeCompare(b.translation.toLowerCase()),\n )\n .map(template => (\n \n ))}\n \n )}\n
    \n \n \n stateService.goToEmailTemplates()}\n >\n \n \n \n \n \n
    \n\n {loadingEmail && }\n {!loadingEmail && (\n
    \n \n \n \n
    \n this.setState({ subject: e.target.value })}\n />\n
    \n
    \n )}\n {!loadingEmail && (\n
    \n \n \n \n
    \n this.setState({ body: newBody })}\n base64Images\n />\n
    \n
    \n )}\n
    \n )}\n\n {loading && }\n\n {error && (\n \n
    {error}
    \n \n )}\n \n \n \n );\n }\n}\nexport default injectStateService(DocumentSignatureRequestModal);\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport config from '@/config';\nimport api from '@/shared/api';\nimport { useEffect, useState } from 'react';\nvar fetchFolders = function (siteId, driveId, folderId) { return __awaiter(void 0, void 0, void 0, function () {\n var url, data;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n url = folderId\n ? \"\".concat(config.appUrls.documents, \"/api/sharepoint/sites/\").concat(siteId, \"/drives/\").concat(driveId, \"/folders/\").concat(folderId, \"/folders\")\n : \"\".concat(config.appUrls.documents, \"/api/sharepoint/sites/\").concat(siteId, \"/drives/\").concat(driveId, \"/folders\");\n return [4 /*yield*/, api.base.get(url)];\n case 1:\n data = (_a.sent()).data;\n return [2 /*return*/, data];\n }\n });\n}); };\nexport var SharepointFolderTree = function (_a) {\n var siteId = _a.siteId, driveId = _a.driveId, onSelectedFolderChanged = _a.onSelectedFolderChanged, setLoading = _a.setLoading;\n var _b = useState({}), folderCache = _b[0], setFolderCache = _b[1];\n var _c = useState([]), selectedFolders = _c[0], setSelectedFolders = _c[1];\n useEffect(function () {\n setSelectedFolders([]);\n }, [siteId]);\n useEffect(function () {\n setSelectedFolders([]);\n if (!siteId || !driveId) {\n onSelectedFolderChanged('/');\n return;\n }\n if (!folderCache[driveId]) {\n setLoading(true);\n fetchFolders(siteId, driveId)\n .then(function (x) {\n var _a;\n setFolderCache(__assign(__assign({}, folderCache), (_a = {}, _a[driveId] = !x ? [] : x, _a)));\n setLoading(false);\n });\n }\n }, [driveId]);\n useEffect(function () {\n if (!siteId || !driveId) {\n onSelectedFolderChanged('/');\n return;\n }\n var _loop_1 = function (i) {\n var selectedFolder = selectedFolders[i];\n if (selectedFolder === '/')\n return \"continue\";\n if (!folderCache[selectedFolder]) {\n setLoading(true);\n fetchFolders(siteId, driveId, selectedFolder)\n .then(function (x) {\n var _a;\n setFolderCache(__assign(__assign({}, folderCache), (_a = {}, _a[selectedFolder] = x, _a)));\n setLoading(false);\n });\n }\n };\n for (var i = 0; i < selectedFolders.length; i++) {\n _loop_1(i);\n }\n }, [selectedFolders]);\n if (!siteId || !driveId || !folderCache[driveId])\n return _jsx(\"select\", __assign({ disabled: true, className: \"form-control margin5B\" }, { children: _jsx(\"option\", __assign({ value: '/' }, { children: \"/\" })) }));\n var subfolderSelected = function (folderId, index) {\n var newSelectedFolders = [];\n for (var i = 0; i < index; i++) {\n newSelectedFolders.push(selectedFolders[i]);\n }\n setSelectedFolders(__spreadArray(__spreadArray([], newSelectedFolders, true), [folderId], false));\n onSelectedFolderChanged(folderId);\n };\n var renderSubFolders = function () {\n var _a;\n var items = [];\n var _loop_2 = function (i) {\n var selectedFolder = selectedFolders[i];\n if (selectedFolder === '/' || !((_a = folderCache[selectedFolder]) === null || _a === void 0 ? void 0 : _a.length))\n return \"break\";\n var item = _jsxs(\"select\", __assign({ onChange: function (e) { return subfolderSelected(e.target.value, i + 1); }, className: \"form-control margin5B\" }, { children: [_jsx(\"option\", __assign({ value: '/' }, { children: \"/\" })), folderCache[selectedFolder].map(function (folder) { return _jsx(\"option\", __assign({ value: folder.id }, { children: folder.name }), folder.id); })] }), selectedFolder);\n items.push(item);\n };\n for (var i = 0; i < selectedFolders.length; i++) {\n var state_1 = _loop_2(i);\n if (state_1 === \"break\")\n break;\n }\n return items;\n };\n return _jsxs(_Fragment, { children: [_jsxs(\"select\", __assign({ onChange: function (e) { return subfolderSelected(e.target.value, 0); }, className: \"form-control margin5B\" }, { children: [_jsx(\"option\", __assign({ value: '/' }, { children: \"/\" })), folderCache[driveId].map(function (folder) { return _jsx(\"option\", __assign({ value: folder.id }, { children: folder.name }), folder.id); })] })), renderSubFolders()] });\n};\n","import { defineMessages } from 'react-intl';\n\nconst messages = defineMessages({\n InvalidType: 'Invalid type',\n SharePointFileWillBeMovedInBackground: 'The file will be moved to SharePoint in the background',\n SharePointFileMovedInBackground: 'The file has finished moving to SharePoint',\n PrefixFilenameWithDocumentDate: 'Prefix filename with document date',\n OnlyEmailsByAdminPulseCanBeResent: 'E-mails that were not sent by AdminPulse cannot be resent',\n TheMailHasBeenSentAgain: 'The email has been sent again',\n ResendEmail: 'Resend email',\n ResendEmailConfirmationMsg: 'Are you sure you want to resend this email?',\n Share: 'Share',\n MarkAsSigned: 'Mark as signed',\n Template: 'Template',\n CreateRelation: 'Create relation',\n SelectAll: 'Select all',\n UpdateRelation: 'Update relation',\n Download: 'Download',\n MoreFilters: 'More filters',\n SelectYourFilters: 'Select your filters',\n EditDocumentInSharePoint: 'Edit document in SharePoint',\n DocumentCheckedOut: 'Document is checked out by {name}',\n Forward: 'Forward',\n Open: 'Open',\n LinkToRelation: 'Link to relation',\n DeleteDocument: 'Delete document',\n ShowAllDocumentsForRelation: 'Show documents for relation',\n StartTypingToSearch: 'Start typing to search',\n EmailStatus: 'Email status',\n RemoveEmails: 'Remove e-mails',\n EmailLinkType: 'Email context',\n EmailGlobalActionsTooltip:\n 'Select one or more e-mails to execute a global action on these e-mails',\n DropzoneExplanation:\n 'AdminPulse will try to identify documents uploaded here and suggest a way to process them.',\n AutoLinkDocumentsToCompanyExplanation:\n 'The document will be linked to this company. If new relations are created based on this document, the relations will be linked to this company.',\n DocumentWillBeLinkedToCompanyAutomatically: 'The document will be linked to company {company}.',\n DocumentWillBeLinkedToRelationAutomatically:\n 'Documents that you upload here will now be automatically linked to {relation}.',\n Documents: 'Documents',\n Dropzone: 'Dropzone',\n ChooseRelationLinkDocument: 'Choose a relation you want to link {documentName} to.',\n NoDocumentsFound: 'No documents found',\n UploadFilesToCurrentFolder: 'Drop to upload files to current folder',\n UploadFilesToSpecificFolder: 'Drop to upload files to a specific folder',\n MoveOrCopyDocument: 'Drop your document to move or copy it',\n DropDocumentToAddTag: 'Drop your document to add a tag',\n NrOfLinkedRelations: '{nr} relations',\n AllDocumentsSelected: 'All documents selected',\n AllEmailsSelected: 'All emails selected',\n CountEmailsSelected: 'Selected {count} e-mails',\n Name: 'Name',\n Relation: 'Relation',\n Relations: 'Relations',\n Edit: 'Edit',\n CheckoutBrowser: 'Checkout in browser',\n CheckoutApp: 'Checkout in app',\n Checkin: 'Checkin',\n DiscardCheckout: 'Discard checkout',\n DiscardCheckoutAction: 'Discard checkout',\n ContinueEditing: 'Continue editing',\n Type: 'Type',\n Status: 'Status',\n SearchDocuments: 'Search documents',\n IncludeInactiveRelations: 'Include inactive relations',\n AllDocuments: 'All documents',\n DocumentsWithoutTags: 'Without tags',\n AllTags: 'All tags',\n Tags: 'Tags',\n Folders: 'Folders',\n FolderStructure: 'Folder structure',\n WithDocumentTags: 'With document tags',\n WithoutDocumentTags: 'Without document tags',\n CheckinDocument: 'Check in document',\n // Toastrs\n MsgDeleteDocumentSuccess: 'Document deleted',\n MsgDeleteDocumentError: 'Error while deleting document',\n MsgCheckinDocumentError: 'Error while checking in document',\n MsgCheckoutDocumentError: 'Error while checking out document',\n MsgLinkRelationDocumentSuccess: 'Document linked to relation',\n MsgDiscardCheckoutDocumentSuccess: 'Document checkout discarded',\n MsgDiscardCheckoutDocumentError: 'Error while discarding document checkout',\n MsgLinkRelationDocumentError: 'Error while linking document to relation',\n\n MsgRecognitionDocumentUploadError: 'Error while uploading recognition document',\n\n MsgMarkSignedLetterSuccess: 'Document marked as signed assignment letter',\n MsgMarkSignedLetterError: 'Error while marking assignment letter as signed',\n\n MsgCreateRelationSuccess: 'Relation created',\n MsgCreateRelationError: 'Error while creating relation',\n\n MsgUpdateRelationSuccess: 'Relation updated',\n MsgUpdateRelationError: 'Error while updating relation',\n DocumentDate: 'Document date',\n CreationDate: 'Creation date',\n CreatedBy: 'Created by',\n Role: 'Role',\n\n AmountOfAuthorizations: 'Amount of authorizations',\n AmountOfRelations: 'Amount of relations',\n AmountOfRegistrations: 'Amount of registrations',\n UpdateAuthorizations: 'Update authorizations',\n Importregistrationlist: 'Import registrations',\n ExtractZip: 'Extract zip',\n ExtractAndKeep: 'Extract and keep',\n ExtractAndDelete: 'Extract and delete',\n ExtractZipTitle: 'Extract zip',\n ExtractZipMessage: 'Do you want to keep the original zip file or not?',\n ProcessAuthorizationList: 'Process authorization list',\n CreateNewRelations: 'Create relation if it does not exist',\n RemoveExpiredAuthorizations: 'Remove expired authorizations',\n ProcessAuthorizationListQueued:\n 'Authorization list will be processed shortly. Click here to view its progress.',\n ProcessRegistrationListQueued:\n 'Registration import will be processed shortly. Click here to view its progress.',\n ProcessRegistrationList: 'Process registrations',\n DefaultRegistrationDate: 'Default registration date',\n NotLinkedToARelation: 'Not linked to a relation',\n NotLinkedToARelationShort: 'No relation',\n LinkedToMultipleRelations: 'Linked to multiple relations',\n LinkedToMultipleRelationsShort: 'Multiple relations',\n GlobalActions: 'Global actions',\n DocumentGlobalActionsTooltip:\n 'Select one or more documents to execute a global action on these documents.',\n AddOrRemoveTags: 'Add or remove tags',\n Action: 'Action',\n AddTags: 'Add tags',\n RemoveTags: 'Remove tags',\n EnterTag: 'Enter tag',\n GlobalActionStarted: 'Global action was started, click here to see its progress',\n AddOrRemoveRelations: 'Add or remove relations',\n AddRelations: 'Add relations',\n RemoveRelations: 'Remove relations',\n DeleteSingleDocumentConfirmationMsg:\n 'Are you sure you want to delete this document? This action cannot be undone.',\n DeleteMultipleDocumentsConfirmationMsg:\n 'Are you sure you want to delete these documents? This action cannot be undone.',\n RemoveDocuments: 'Remove documents',\n CheckinDocumentConfirmationMsg:\n 'Are you sure you want to discard this checkout? It is currently checked out by {name} so this action may result in a loss of changes.',\n DownloadAsZip: 'Download as zip',\n DownloadZipWithFolderStructureYesNo:\n 'Do you want to download the documents in their folder structure? If not, they will be added to the zip as one plain list of documents.',\n CountDocumentsSelected: 'Selected {count} documents',\n SendByEmail: 'Send by email',\n PleaseFilterOnRelationBeforeSendingEmail:\n 'Please select a relation before trying to send an email.',\n EmailSent: 'Email sent',\n PleaseMakeManualSelectionOfDocuments:\n 'Please make a manual selection of documents that you want to send by email, not using the select-all button.',\n ResetFilters: 'Reset filters',\n DocumentWasMoved: 'The document was moved.',\n SigningStatus: 'Signing status',\n CreateNewToDo: 'Create new to-do',\n DocumentIsPublicOnPortal: 'Document is public on portal',\n EnableOrDisableIsPublicOnPortal: 'Set or remove is public on portal',\n IsPublicOnPortal: 'Is public on portal',\n SendSignatureRequest: 'Send signature request',\n NoDocumentProviderConfigured:\n 'No signing provider has been configured. You can configure a document signing provider under general settings.',\n\n NoSignaturedFoundOnDocument: 'No signature fields were found on the document.',\n Signature: 'Signature',\n Signer: 'Signer',\n Email: 'Email',\n Mobile: 'Mobile',\n ChooseEmployee: 'Choose an employee',\n ChooseClient: 'Choose a client',\n Or: 'Or',\n NoEmailAddress: 'No email address',\n NoPhone: 'No phone',\n SelfSignature: 'Self signature',\n RequiredSignature: 'Signature is required',\n DocumentSigningRequestSent: 'Signature request sent',\n DocumentSigningRequestFailed: 'Signature request failed',\n TheDocumentNeedsToBeLinkedToARelationInOrderToSign:\n 'The document needs to be linked to at least 1 relation in order to send a signature request.',\n ChooseRelation: 'Choose relation',\n ClickToAddSignatureFieldsToDocumentOnEmptyPage:\n 'Click on the button to start adding signees to the document. The signatures will be placed on an empty page at the end of the document.',\n\n Add: 'Add',\n Delete: 'Delete',\n RevokeSignatureRequest: 'Revoke signature request',\n RevokeSignatureRequestConfirmationMsg: 'Are you sure you want to revoke this signature request?',\n SignatureRequestRevoked: 'Signature request revoked',\n DocumentCreatedBy: 'Created by',\n NoRelationCandidatesFound:\n 'No e-mailaddress or contact with an e-mailaddress was found. Please add an e-mailaddress to the relation, or add a linked relation with an e-mailaddress if the relation is of type company.',\n DeleteRelationLink: 'Delete relation link',\n DeleteRelationLinkConfirmationMsg:\n 'Are you sure you want to delete the relation from this document?',\n RelationLinkDeleted: 'Relation link deleted.',\n ChangeDocumentDate: 'Change document date',\n InvalidDate: 'Invalid date',\n SendOn: 'Send on',\n DelayedSendingExplanation: 'If empty, the e-mail will be sent immediately',\n Emails: 'E-mails',\n Attachments: 'Attachments',\n Invoices: 'Invoices',\n IncludeEmailsTooltip: 'Show or hide emails in the document overview',\n IncludeInvoicesTooltip: 'Show or hide invoices in the document overview',\n IncludeAttachmentsTooltip: 'Show or hide attachments in the document overview',\n CreateMergedPdf: 'Create merged PDF',\n Subject: 'Subject',\n EmailTo: 'To',\n From: 'From',\n Cc: 'CC',\n Bcc: 'BCC',\n Date: 'Date',\n ToCcBcc: 'To / CC / BCC',\n SystemEmailsCannotBeRemoved: 'Invoice e-mails that were sent by AdminPulse cannot be removed',\n NoEmailsFound: 'No emails found',\n DocumentWasUploaded:\n 'Document uploaded. It will be added to the list when recognition has finished',\n UploadFilesToStartRecognition: 'Upload files to start recognition',\n ColumnConfig: 'Configure columns',\n SelectOverviewColumns: 'Select overview columns',\n DocumentDateWasModified: 'Document date was modified',\n InvalidDocumentDate: 'Invalid document date',\n ClickForAdvancedUpload: 'Click for advanced upload',\n Content: 'Content',\n NoDigitalSigningTemplateFound: 'No digital signing template found',\n ChooseTemplate: 'Choose template',\n OpenEmailTemplates: 'Open email templates',\n Templates: 'Templates',\n AddSigner: 'Add signer',\n RequiredEmailBodyAndSubject: 'Email body and subject are required',\n Signers: 'Signers',\n DownloadAsPdf: 'Download as pdf',\n RepresentativeOfRelation: '(representative of {relation})',\n SendViaEmail: 'Send via e-mail',\n SendAsPdf: 'Send PDF via e-mail',\n SelectRelation: 'Select relation',\n DocumentCouldNotBeConverted: 'Document could not be converted',\n OneOrMoreOfTheDocumentsCannotBeSigned: 'OneOrMoreOfTheDocumentsCannotBeSigned',\n Success: 'Success',\n Reply: 'Reply',\n ReplyAll: 'Reply all',\n MoveToSharepoint: 'Move to sharepoint',\n LinkFromSharepoint: 'Link from sharepoint',\n OpenInApp: 'Open in app',\n SharepointSite: 'Sharepoint site',\n SharepointDrive: 'Sharepoint drive',\n Folder: 'Folder',\n File: 'File',\n SharepointFileSuccessfullyMoved: 'Successfully moved file to sharepoint.',\n CheckedOutSuccesfull: 'Successfully checked out file.',\n Duplicate: 'Duplicate',\n ChangeDocumentType: 'Change type',\n Replace: 'Replace',\n ForcedRelationModeCancelledMessage:\n 'This modal will appear every time you open the document screen. If this is bothering you, you need to assign a relation to every document.',\n CheckedOutDocumentsReminderMessage:\n 'This modal will appear every time you open the document screen if you have documents that have been checked out for longer than a day.',\n CheckedOutUser: 'Checked out by',\n});\n\nexport default messages;\n","import React, { useEffect, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage } from 'react-intl';\n\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport intlShape from '@/shared/utils/intlShape';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport ToastrService from '@/shared/services/ToastrService';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport { SpinnerIcon } from '@/shared/components/Icons';\nimport { SharepointFolderTree } from '@/modules/documents/modals/SharepointFolderTree';\nimport messages from '../documentMessages';\n\nconst SharepointModal = ({ show, intl, documentId, onSave, onClose }) => {\n const [sites, setSites] = useState([]);\n const [foldersLoading, setFoldersLoading] = useState(false);\n const [sitesLoading, setSitesLoading] = useState(true);\n const [selectedSiteId, setSelectedSiteId] = useState(null);\n const [drivesLoading, setDrivesLoading] = useState(false);\n const [drives, setDrives] = useState([]);\n const [selectedDriveId, setSelectedDriveId] = useState(null);\n const [selectedFolderId, setSelectedFolderId] = useState('/');\n\n useEffect(() => {\n setSitesLoading(true);\n api.base\n .get(`${config.appUrls.documents}/api/sharepoint/sites`)\n .then(\n x => {\n setSites(!x.data ? [] : x.data);\n },\n error => {\n handleHttpError(intl)(error);\n },\n )\n .finally(() => {\n setSitesLoading(false);\n });\n }, [intl]);\n\n useEffect(() => {\n setDrives([]);\n setSelectedFolderId('/');\n if (!selectedSiteId) return;\n\n setDrivesLoading(true);\n api.base\n .get(`${config.appUrls.documents}/api/sharepoint/sites/${selectedSiteId}/drives`)\n .then(\n x => {\n setDrives(!x.data ? [] : x.data);\n },\n error => {\n handleHttpError(intl)(error);\n },\n )\n .finally(() => {\n setDrivesLoading(false);\n });\n }, [selectedSiteId, intl]);\n\n const save = () =>\n api.base\n .post(\n `${config.appUrls.documents}/api/documents/${documentId}/MoveToSharepoint?driveId=${selectedDriveId}&folderId=${selectedFolderId}`,\n {},\n )\n .then(\n ({ data }) => onSave(data),\n error => {\n handleHttpError(intl)(error);\n },\n );\n\n const closeModal = () => {\n onClose();\n };\n\n if (!show) return null;\n\n const title = () => {\n if (!sitesLoading && !drivesLoading && !foldersLoading)\n return intl.formatMessage(messages.MoveToSharepoint);\n\n return (\n <>\n {intl.formatMessage(messages.MoveToSharepoint)}\n \n \n \n \n );\n };\n\n return (\n \n
    \n
    \n
    \n \n
    \n setSelectedSiteId(e.target?.value)}\n className=\"form-control\"\n >\n \n ))}\n \n
    \n \n
    \n setSelectedDriveId(e.target?.value)}\n className=\"form-control\"\n >\n \n ))}\n \n
    \n \n
    \n \n
    \n
    \n
    \n
    \n \n );\n};\n\nSharepointModal.propTypes = {\n show: PropTypes.bool.isRequired,\n intl: intlShape.isRequired,\n onSave: PropTypes.func.isRequired,\n onClose: PropTypes.func.isRequired,\n documentId: PropTypes.string.isRequired,\n};\n\nexport default SharepointModal;\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { useState } from 'react';\nimport OkCancelModal from \"@/shared/components/OkCancelModal\";\nimport Button from \"@/shared/components/Button\";\nimport { useIntl } from 'react-intl';\nimport messages from '../documentMessages';\nexport var ExtractZipModal = function (_a) {\n var onAccept = _a.onAccept, onClose = _a.onClose;\n var intl = useIntl();\n var _b = useState(false), buttonsDisabled = _b[0], setButtonsDisabled = _b[1];\n var continueDisabled = function (next) { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n setButtonsDisabled(true);\n return [4 /*yield*/, next()];\n case 1:\n _a.sent();\n return [2 /*return*/];\n }\n });\n }); };\n var extractAndKeepButton = _jsx(Button, __assign({ onClick: function () { return continueDisabled(function () { return onAccept('1'); }); }, btnClassName: \"btn-inverse\", showProgress: true, name: \"OkCancelModal-ExtractAndKeep\", disabled: buttonsDisabled }, { children: intl.formatMessage(messages.ExtractAndKeep) }));\n return _jsx(OkCancelModal, __assign({ title: intl.formatMessage(messages.ExtractZipTitle), show: true, onClose: function () { return continueDisabled(onClose); }, onSave: function () { return continueDisabled(function () { return onAccept('2'); }); }, disableFullScreen: true, okLabel: intl.formatMessage(messages.ExtractAndDelete), leftButton: extractAndKeepButton, disabled: buttonsDisabled, cancelDisabled: buttonsDisabled }, { children: _jsx(\"p\", { children: intl.formatMessage(messages.ExtractZipMessage) }) }));\n};\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { useEffect, useState } from \"react\";\nimport api from \"@/shared/api\";\nimport config from \"@/config\";\nexport var SharepointFileSelector = function (_a) {\n var siteId = _a.siteId, driveId = _a.driveId, folderId = _a.folderId, selectedFileId = _a.selectedFileId, onFileSelected = _a.onFileSelected;\n var _b = useState([]), files = _b[0], setFiles = _b[1];\n useEffect(function () {\n if (!siteId || !driveId || !folderId)\n return;\n var url = !!folderId && folderId !== '/'\n ? \"\".concat(config.appUrls.documents, \"/api/sharepoint/sites/\").concat(siteId, \"/drives/\").concat(driveId, \"/folders/\").concat(folderId, \"/files\")\n : \"\".concat(config.appUrls.documents, \"/api/sharepoint/sites/\").concat(siteId, \"/drives/\").concat(driveId, \"/files\");\n api.base.get(url)\n .then(function (x) { return setFiles(x.data); });\n }, [siteId, driveId, folderId]);\n return (_jsxs(\"select\", __assign({ disabled: files.length < 1, onChange: function (e) { return onFileSelected(files.find(function (x) { return x.id === e.target.value; }).name, e.target.value); }, className: \"form-control margin5B\", value: selectedFileId }, { children: [_jsx(\"option\", { value: null }), files.map(function (file) { return (_jsx(\"option\", __assign({ value: file.id }, { children: file.name }), file.id)); })] })));\n};\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { useEffect, useState } from 'react';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport ToastrService from '@/shared/services/ToastrService';\nimport messages from '@/modules/documents/documentMessages';\nimport { SpinnerIcon } from '@/shared/components/Icons';\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport { FormattedMessage } from 'react-intl';\nimport { SharepointFolderTree } from '@/modules/documents/modals/SharepointFolderTree';\nimport PropTypes from 'prop-types';\nimport intlShape from '@/shared/utils/intlShape';\nimport { SharepointFileSelector } from '@/modules/documents/modals/SharepointFileSelector';\nvar LinkFromSharepointModal = function (_a) {\n var show = _a.show, intl = _a.intl, onSave = _a.onSave, onClose = _a.onClose, relationId = _a.relationId, tags = _a.tags;\n var _b = useState([]), sites = _b[0], setSites = _b[1];\n var _c = useState(false), foldersLoading = _c[0], setFoldersLoading = _c[1];\n var _d = useState(true), sitesLoading = _d[0], setSitesLoading = _d[1];\n var _e = useState(null), selectedSiteId = _e[0], setSelectedSiteId = _e[1];\n var _f = useState(false), drivesLoading = _f[0], setDrivesLoading = _f[1];\n var _g = useState([]), drives = _g[0], setDrives = _g[1];\n var _h = useState(null), selectedDriveId = _h[0], setSelectedDriveId = _h[1];\n var _j = useState('/'), selectedFolderId = _j[0], setSelectedFolderId = _j[1];\n var _k = useState(null), selectedFileId = _k[0], setSelectedFileId = _k[1];\n var _l = useState(null), selectedFileName = _l[0], setSelectedFileName = _l[1];\n useEffect(function () {\n setSitesLoading(true);\n api.base\n .get(\"\".concat(config.appUrls.documents, \"/api/sharepoint/sites\"))\n .then(function (x) {\n setSites(!x.data ? [] : x.data);\n }, function (error) {\n handleHttpError(intl)(error);\n })\n .finally(function () {\n setSitesLoading(false);\n });\n }, [intl]);\n useEffect(function () {\n setDrives([]);\n setSelectedFolderId('/');\n if (!selectedSiteId)\n return;\n setDrivesLoading(true);\n api.base\n .get(\"\".concat(config.appUrls.documents, \"/api/sharepoint/sites/\").concat(selectedSiteId, \"/drives\"))\n .then(function (x) {\n setDrives(!x.data ? [] : x.data);\n }, function (error) {\n handleHttpError(intl)(error);\n })\n .finally(function () {\n setDrivesLoading(false);\n });\n }, [selectedSiteId, intl]);\n var save = function () {\n var url = \"\".concat(config.appUrls.documents, \"/api/documents/LinkToAdminPulse?driveId=\").concat(selectedDriveId, \"&folderId=\").concat(selectedFolderId, \"&fileId=\").concat(selectedFileId, \"&filename=\").concat(selectedFileName);\n if (tags) {\n url = \"\".concat(url, \"&tags=\").concat(tags);\n }\n if (relationId) {\n url = \"\".concat(url, \"&relationId=\").concat(relationId);\n }\n return api.base.post(url, {}).then(function (data) {\n ToastrService.changesSaved(intl);\n return onSave(data.data);\n }, function (error) {\n handleHttpError(intl)(error);\n });\n };\n var closeModal = function () {\n onClose();\n };\n if (!show)\n return null;\n var title = function () {\n if (!sitesLoading && !drivesLoading && !foldersLoading)\n return intl.formatMessage(messages.LinkFromSharepoint);\n return (_jsxs(_Fragment, { children: [intl.formatMessage(messages.LinkFromSharepoint), _jsx(\"span\", __assign({ className: \"margin5L\" }, { children: _jsx(SpinnerIcon, {}) }))] }));\n };\n return (_jsx(OkCancelModal, __assign({ title: title(), show: show, onClose: closeModal, disabled: !selectedSiteId ||\n !selectedDriveId ||\n !selectedFolderId ||\n !selectedFileId ||\n !selectedFileName, onSave: save }, { children: _jsx(\"div\", __assign({ className: \"form-horizontal\" }, { children: _jsx(\"div\", { children: _jsxs(\"div\", __assign({ className: \"form-group\" }, { children: [_jsx(\"label\", __assign({ className: \"control-label col-md-3\" }, { children: _jsx(FormattedMessage, __assign({}, messages.SharepointSite)) })), _jsx(\"div\", __assign({ className: \"col-md-9\", style: { marginTop: '7px' } }, { children: _jsxs(\"select\", __assign({ disabled: sites.length < 1, onChange: function (e) { var _a; return setSelectedSiteId((_a = e.target) === null || _a === void 0 ? void 0 : _a.value); }, className: \"form-control\" }, { children: [_jsx(\"option\", { value: null }), sites.map(function (site) { return (_jsx(\"option\", __assign({ value: site.id }, { children: site.name }), site.id)); })] })) })), _jsx(\"label\", __assign({ className: \"control-label col-md-3\" }, { children: _jsx(FormattedMessage, __assign({}, messages.SharepointDrive)) })), _jsx(\"div\", __assign({ className: \"col-md-9\", style: { marginTop: '7px' } }, { children: _jsxs(\"select\", __assign({ disabled: drives.length < 1, onChange: function (e) { var _a; return setSelectedDriveId((_a = e.target) === null || _a === void 0 ? void 0 : _a.value); }, className: \"form-control\" }, { children: [_jsx(\"option\", { value: null }), drives.map(function (drive) { return (_jsx(\"option\", __assign({ value: drive.id }, { children: drive.name }), drive.id)); })] })) })), _jsx(\"label\", __assign({ className: \"control-label col-md-3\" }, { children: _jsx(FormattedMessage, __assign({}, messages.Folder)) })), _jsx(\"div\", __assign({ className: \"col-md-9\", style: { marginTop: '7px' } }, { children: _jsx(SharepointFolderTree, { setLoading: setFoldersLoading, onSelectedFolderChanged: setSelectedFolderId, siteId: selectedSiteId, driveId: selectedDriveId }) })), _jsx(\"label\", __assign({ className: \"control-label col-md-3\" }, { children: _jsx(FormattedMessage, __assign({}, messages.File)) })), _jsx(\"div\", __assign({ className: \"col-md-9\", style: { marginTop: '7px' } }, { children: _jsx(SharepointFileSelector, { siteId: selectedSiteId, driveId: selectedDriveId, folderId: selectedFolderId, onFileSelected: function (name, fileId) {\n setSelectedFileName(name);\n setSelectedFileId(fileId);\n }, selectedFileId: selectedFileId }) }))] })) }) })) })));\n};\nLinkFromSharepointModal.propTypes = {\n show: PropTypes.bool.isRequired,\n intl: intlShape.isRequired,\n onSave: PropTypes.func.isRequired,\n onClose: PropTypes.func.isRequired,\n relationId: PropTypes.string,\n tags: PropTypes.string,\n};\nLinkFromSharepointModal.defaultProps = {\n relationId: undefined,\n tags: undefined,\n};\nexport default LinkFromSharepointModal;\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { useEffect, useState } from 'react';\nimport classnames from 'classnames';\nimport userStorage from '@/shared/services/userStorage';\nvar storageKey = 'sidebarCollapsed';\nvar CollapsableSidebar = function (_a) {\n var children = _a.children;\n var _b = useState(userStorage.getItem(storageKey) || false), isCollapsed = _b[0], setCollapsed = _b[1];\n var _c = useState(true), isLoading = _c[0], setIsLoading = _c[1];\n var sidebar = children[0], mainView = children[1];\n useEffect(function () {\n setIsLoading(false);\n }, []);\n useEffect(function () {\n userStorage.setItem(storageKey, isCollapsed);\n }, [isCollapsed]);\n return (_jsxs(\"div\", __assign({ className: classnames('sidebar-wrapper', {\n 'sidebar-collapsed': isCollapsed,\n 'sidebar-loading': isLoading,\n }) }, { children: [_jsx(\"div\", __assign({ className: \"sidebar\" }, { children: sidebar })), _jsx(\"div\", __assign({ className: \"gap\" }, { children: _jsx(\"a\", __assign({ onClick: function () { return setCollapsed(function (x) { return !x; }); }, className: \"sidebar-toggle\" }, { children: _jsx(\"i\", { className: classnames(\"fa \", isCollapsed ? 'fa-chevron-circle-right' : 'fa-chevron-circle-left') }) })) })), _jsx(\"div\", __assign({ className: \"mainview\" }, { children: mainView }))] })));\n};\nexport default CollapsableSidebar;\n","import moment from 'moment';\nimport { mapResourceName } from '@/shared/services/ObjectDisplayService';\nimport { dynamicSortMultiple } from '@/shared/utils/dynamicSort';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport adminpulse from '@/shared/utils/adminpulse';\nimport AuthService, { privileges, functionalities } from '@/shared/services/AuthService';\nimport guid from '../../utils/guid';\n/*\n * Helper for retrieving and translating resources\n */\nconst handleResponse = intl => ({ data }) =>\n data\n .map(item => {\n const translatedName = mapResourceName(item, intl);\n\n return {\n ...item,\n key: item.id,\n code: item.code || '',\n label: translatedName,\n };\n })\n .sort(dynamicSortMultiple('code', 'label'));\n\nexport const retrieveResources = (intl, type = -1) =>\n api.base\n .get(`${config.appUrls.api}/api/Resource/Registration?type=${type}`)\n .then(handleResponse(intl), handleHttpError(intl));\n\nexport const retrieveWorkResources = intl => retrieveResources(intl, 0);\n\nexport const retrieveAllResources = intl => retrieveResources(intl, -1);\n\nexport const getInForfait = (invoiceStreamId, resourceId) => {\n if (!invoiceStreamId || invoiceStreamId === guid.empty || !resourceId)\n return Promise.resolve(null);\n return api.base\n .get(\n `${config.appUrls.api}/api/resource/InForfait?invoiceStream=${invoiceStreamId}&resource=${resourceId}`,\n )\n .then(({ data }) => {\n if (data === null || typeof data === 'undefined' || data === '') return null;\n return data;\n });\n};\nexport const getPrice = (invoiceStreamId, categoryId, userId = null) => {\n if (!invoiceStreamId || !categoryId) return Promise.resolve({ data: null });\n return api.base.get(\n `${config.appUrls.api}/api/price/?invoiceStream=${invoiceStreamId}&category=${categoryId}&user=${userId}`,\n );\n};\nexport const getInForfaitAndPrice = (invoiceStreamId, resource, userId) =>\n Promise.all([\n getInForfait(invoiceStreamId, resource.id),\n getPrice(invoiceStreamId, resource.categoryId, userId),\n ]).then(([inForfait, { data: price }]) => ({\n inForfait,\n price: price || null,\n priceOptions: price ? [price] : [],\n }));\n\nexport const getAbsenceBalance = (resource, userId, date) => {\n if (!resource?.useCounter || !resource?.id) {\n return Promise.resolve({ absenceBalance: null });\n }\n return api.base\n .get(`${config.appUrls.api}/api/AbsenceCounter/Balance`, {\n params: {\n resourceId: resource.id,\n date: moment.utc(date).format('YYYY-MM-DD'),\n userId,\n },\n })\n .then(({ data }) => {\n const { balance, hoursInDay } = data || {};\n if (typeof balance === 'undefined' || balance === null || hoursInDay <= 0)\n return { absenceBalance: null };\n\n const balanceDays = balance / hoursInDay;\n return {\n absenceBalance: {\n ...data,\n balanceDays,\n maxDays: Math.max(0, balanceDays),\n maxMinutes: Math.max(0, balance * 60),\n },\n durationType: 1,\n };\n });\n};\n\nconst fallbackStartTime = adminpulse.joinTime(9, 0);\nexport const getLastRegistrationTime = date => {\n if (!date) return Promise.resolve(fallbackStartTime);\n return api.base\n .get(\n `${config.appUrls.api}/api/registration/LastRegistrationTime?date=${moment(date).format(\n 'YYYY-MM-DD',\n )}`,\n )\n .then(({ data }) => {\n if (!data) return fallbackStartTime;\n const momentDate = moment(data, 'HH:mm:ss');\n const h = momentDate.hour();\n const m = momentDate.minutes();\n return adminpulse.joinTime(h, m);\n });\n};\n\nexport const getInteractionForRegistration = group => {\n if (!group)\n return Promise.resolve({\n interactionType: null,\n interactionTitle: null,\n interactionDescription: null,\n });\n return api.base\n .get(`${config.appUrls.interactions}/api/interactions/object/1/${group}`)\n .then(({ data }) => {\n const [interaction = null] = data || [];\n return interaction;\n });\n};\n\nexport const emptyInteractionDescription =\n '\\n\\n\\t\\n\\n\\n\\n';\n\nexport const createOrUpdateInteraction = (\n {\n // Should be props on registration, so passing the registration to this functions should work\n interactionType = null,\n interactionDescription = null,\n interactionTitle = null,\n interactionId = null,\n relation = {},\n date,\n orgInteraction = null,\n userId,\n },\n group, // The second parameter should be the group id of the saved registration\n) => {\n if (\n userId &&\n userId !== AuthService.getUserId() &&\n !AuthService.hasPermission({\n functionality: functionalities.InteractionsOthers,\n privilege: 'Update',\n })\n )\n if (\n userId &&\n userId === AuthService.getUserId() &&\n !AuthService.hasPermission({\n functionality: functionalities.InteractionsOwn,\n privilege: 'Update',\n })\n )\n return;\n\n const interactionChanged =\n (!orgInteraction &&\n ((interactionDescription && interactionDescription !== emptyInteractionDescription) ||\n interactionTitle)) ||\n (orgInteraction &&\n ((interactionDescription !== orgInteraction.description &&\n interactionDescription !== emptyInteractionDescription) ||\n interactionTitle !== orgInteraction.title ||\n interactionType !== orgInteraction.interactionType ||\n orgInteraction.relationId !== relation.id ||\n !moment(orgInteraction.date).isSame(date, 'day')));\n if (!interactionChanged) return Promise.resolve();\n if (interactionId) {\n const updatedInteraction = {\n id: interactionId,\n description: interactionDescription,\n title: interactionTitle,\n interactionType,\n isPinned: orgInteraction.isPinned,\n date,\n relationId: relation.id,\n };\n return api.base.put(`${config.appUrls.interactions}/api/interactions`, updatedInteraction);\n }\n const newInteraction = {\n description: interactionDescription,\n title: interactionTitle,\n interactionType,\n date,\n relationId: relation.id,\n objectType: 1,\n objectId: group,\n interactionSource: 1,\n };\n return api.base.post(`${config.appUrls.interactions}/api/interactions/create`, newInteraction);\n};\n","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/* eslint-disable react/require-default-props */\nimport { useEffect, useMemo, useState } from 'react';\nimport { defineMessages, useIntl } from 'react-intl';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport AuthService, { privileges } from '@/shared/services/AuthService';\nimport MultiSelect, { addItem, removeItem, splitItems } from './MultiSelect';\nvar messages = defineMessages({\n EnterTag: {\n id: 'EnterTag',\n defaultMessage: 'Enter tag',\n },\n});\nexport var TaskTagsMultiSelect = function (_a) {\n var selection = _a.selection, onChange = _a.onChange, placeholder = _a.placeholder, _b = _a.allowNew, allowNew = _b === void 0 ? false : _b, _c = _a.small, small = _c === void 0 ? false : _c, _d = _a.disabled, disabled = _d === void 0 ? false : _d;\n var intl = useIntl();\n var _e = useState([]), items = _e[0], setItems = _e[1];\n useEffect(function () {\n var mounted = true;\n api.base.get(\"\".concat(config.appUrls.tasks, \"/api/Tags\")).then(function (_a) {\n var data = _a.data;\n if (!mounted)\n return;\n setItems(data.map(function (_a) {\n var id = _a.id, name = _a.name;\n return ({ id: id, label: name });\n }).sort(dynamicSort('label')));\n }, function (error) {\n handleHttpError(intl)(error);\n });\n return function () {\n mounted = false;\n };\n }, [intl]);\n var canCreateTags = useMemo(function () {\n return AuthService.hasPermission({\n functionality: 'Tags',\n privilege: privileges.Create,\n });\n }, []);\n var findOrCreateTag = function (tagName) {\n return new Promise(function (resolve, reject) {\n var tag = items.find(function (t) { return t.label.toLowerCase() === tagName.toLowerCase(); });\n if (tag) {\n resolve(tag);\n }\n else {\n api.base.post(\"\".concat(config.appUrls.tasks, \"/api/Tags\"), { name: tagName }).then(function (_a) {\n var data = _a.data;\n if (!data)\n return reject();\n var newTag = { id: data.id, label: data.name };\n setItems(function (oldItems) { return __spreadArray(__spreadArray([], oldItems, true), [newTag], false).sort(dynamicSort('label')); });\n resolve(newTag);\n }, reject);\n }\n });\n };\n var onCreateItem = function (inputValue) { return __awaiter(void 0, void 0, void 0, function () {\n var item;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!inputValue || !allowNew || !canCreateTags)\n return [2 /*return*/];\n return [4 /*yield*/, findOrCreateTag(inputValue)];\n case 1:\n item = _a.sent();\n if (!item)\n return [2 /*return*/];\n onChange(addItem(selection, item));\n return [2 /*return*/];\n }\n });\n }); };\n var _f = splitItems(items, selection), selectedItems = _f[0], selectableItems = _f[1];\n return (_jsx(MultiSelect, { selectedItem: selectedItems, onItemRemoved: function (item) { return onChange(removeItem(selection, item)); }, onItemSelected: function (item) { return onChange(addItem(selection, item)); }, onCreateItem: allowNew && canCreateTags ? onCreateItem : undefined, items: selectableItems, placeholder: placeholder || intl.formatMessage(messages.EnterTag), isSmall: small, disabled: disabled }));\n};\n","import { defineMessages } from 'react-intl';\n\nconst messages = defineMessages({\n ExportToExcelStarted: 'Export to Excel started',\n Share: 'Share',\n AssignedTo: 'Assigned to',\n Deadline: 'Deadline',\n RestoreOriginalDeadline: 'Reset to original deadline: {originalDeadline}',\n NoDeadline: 'No deadline',\n CompletedDate: 'Completed on',\n TaskStatus: 'Status',\n DeadlineFrom: 'From',\n DeadlineUntil: 'Until',\n NoTasksFound: 'No tasks found',\n SelectTask: 'Select a task',\n Relation: 'Relation',\n TaskOverview: 'Task overview',\n Unassigned: 'Unassigned',\n HideHistory: 'Hide history',\n ShowHistory: 'Show history',\n EditDocument: 'Edit document',\n Via: 'Via',\n ExportAuthorizations: 'Export authorizations',\n UpdateAssignedUserQueued:\n 'The assigned users for the selected tasks will be updated in the background.',\n ChangeAssignedUser: 'Change assigned user',\n 'Same as parent': 'Same as parent',\n User: 'User',\n Into: 'Into',\n On: 'On',\n All: 'All',\n From: 'From',\n To: 'To',\n Or: 'or',\n History: 'History',\n ThisMonth: 'This month',\n NextMonth: 'Next month',\n ThisQuarter: 'This quarter',\n NextQuarter: 'Next quarter',\n ThisYear: 'This year',\n OpenInTaskboard: 'Open this task in the task board',\n ShowDateDone: 'Show completed date',\n ShowDeadline: 'Show deadline',\n CountTasksSelected: 'Selected {count} / {total} tasks',\n GlobalActions: 'Global actions',\n ChangeTaskStatus: 'Change task status',\n ChangeMainTaskStatus: 'Change main task status',\n ChangeSubtaskStatus: 'Change subtask status',\n ChangeTodoStatus: 'Change todo status',\n ChangeDeadline: 'Change deadline',\n ChangeSubtaskDeadline: 'Change subtask deadline',\n Subtask: 'Subtask',\n SelectASubtask: 'Select a subtask',\n SendEmail: 'Send email',\n AutomaticMailTooltip: 'An email will be sent automatically on the deadline',\n Subject: 'Subject',\n UpdateTaskStatusQueued:\n 'The task status for the selected task will be updated shortly. Click here to view its progress.',\n PlaceholdersWillBeResolvedByAdminPulse: 'The visible placeholders will be resolved by AdminPulse',\n Attachments: 'Attachments',\n MsgEmailAttachmentUploadFailed: 'An error occurred when uploading the email attachment',\n NoEmailTemplateFoundInLanguage: 'No email template was found in {language}',\n EmailContentRequired: 'The email must have content.',\n ExportToExcel: 'Export to Excel',\n Tasks: 'Tasks',\n TaskList: 'Task list',\n Task: 'Task',\n TaskType: 'Task type',\n Actions: 'Actions',\n RelationType: 'Relation type',\n RegistratedTime: 'Registrated time',\n SubTask: 'Sub task',\n AddRegistration: 'Add registration',\n Documents: 'Documents',\n ModifiedAt: 'Modified at',\n ModifiedBy: 'Modified by',\n CreatedAt: 'Created at',\n CreatedBy: 'Created by',\n AssignedToMe: 'Assigned to me',\n AddOneTimeTask: 'Add one time task',\n ColumnConfig: 'Configure columns',\n SelectColumns: 'Select columns',\n\n ThisTaskCannotBeOpenedInTaskBoard:\n 'This task cannot be opened in the taskboard. It has been completed and the deadline has passed.',\n AToDoCannotBeOpenedInTaskBoard: 'A to-do cannot be opened in the taskboard.',\n UseTaskTemplate: 'Use task template',\n Description: 'Description',\n MarkAsInapplicable: 'Mark as inapplicable',\n MarkAsApplicable: 'Mark as applicable',\n Remark: 'Remark',\n TaskScheduleRemark: 'Task schedule remark',\n CreateNewToDo: 'Create new to-do',\n ToDoCreated: 'To-do created',\n ToDo: 'To-do',\n ToDos: \"To-do's\",\n SubTasks: 'Sub tasks',\n MainTasks: 'Main tasks',\n FilterOnToDos: \"Filter on to-do's\",\n FilterOnMainTasks: 'Filter on main tasks',\n FilterOnSubTasks: 'Filter on sub tasks',\n Save: 'Save',\n MainTask: 'Main task',\n TimeRegistrations: 'Time registrations',\n NoRegistrationsForThisTask: 'No time registrations recorded for this task.',\n CreateTimeRegistration: 'Create time registration',\n PauseTimer: 'Pause timer',\n StartTimer: 'Start timer',\n CountRegistrationsForDuration:\n '{count} registrations were made for this task for a total duration of {duration}',\n CountRegistrations: '{count} registration(s) were made for this task.',\n PriceListItem: 'Pricelist item',\n NoPriceListItemsFound: 'No pricelist items found',\n Duration: 'Duration',\n Employee: 'Employee',\n Date: 'Date',\n ThisTaskHasCountSubTasks: 'This task has {count} subtasks:',\n Blocked: 'Blocked',\n Block: 'Block',\n Unblock: 'Unblock',\n ViewTask: 'View task',\n Delete: 'Delete',\n DeleteTask: 'Delete task',\n DeleteMainTaskConfirmationMsg:\n 'Are you sure you want to delete this task? All subtasks associated with this task will be deleted as well.',\n DeleteTaskConfirmationMsg: 'Are you sure you want to delete this task?',\n TaskDeleted: 'Task deleted',\n ChangeTaskDeadline: 'Change task deadline',\n UpdateTaskDeadlineQueued:\n 'The deadline for the selected tasks will be updated shortly. Click here to view its progress.',\n NewRegistration: 'New registration',\n NewRegistrationsQueued: 'New registrations will be created shortly.',\n OpenTaskDetails: 'Open task details',\n Inapplicable: 'Inapplicable',\n Quantity: 'Quantity',\n DownloadAttachment: 'Download attachment',\n OpenDocument: 'Open document',\n Open: 'Open',\n Pending: 'Pending',\n Error: 'Error',\n DeleteAttachment: 'Delete attachment',\n AddDocument: 'Add document',\n DeleteAttachmentConfirmationMsg: 'Are you sure you want to delete this attachment?',\n TaskGlobalActionsTooltip: 'Select one or more tasks to execute a global action on these tasks.',\n TaskDashboard: 'Task dashboard',\n ChartType: 'Chart type',\n ShowQuantitiesChart: 'Show quantities chart',\n ShowPercentagesChart: 'Show percentages chart',\n Quantities: 'Quantities',\n Percentages: 'Percentages',\n Total: 'Total',\n Tags: 'Tags',\n FilterPeriodicity: 'Filter periodicity',\n NoPeriodicity: 'No periodicity',\n ClearFilter: 'Clear filter',\n\n TaskOverviewNoTaskSelectedDescription:\n 'This screen provides an overview of the planned tasks. \\r\\nYou can see the progress of the subtasks and quickly change the status by clicking the colored circles or by clicking the arrow next to it and selecting the new status.',\n TaskOverviewNoTaskSelectedSelectTask:\n 'To begin working with this overview, you first need to select a task:',\n TasksAssignedTo: 'Tasks assigned to',\n RelationsAssignedTo: 'Relations assigned to',\n ChooseTaskFirst: 'Choose task above',\n ShowParameters: 'Show parameters',\n FilledOut: 'Filled out',\n NotFilledOut: 'Not filled out',\n\n SendEmailQueued:\n 'Emails for the selected relations are being sent. Click here to view its progress.',\n SentEmails: 'Sent emails',\n Recipients: 'Recipients',\n Preview: 'Preview',\n EmailSent: 'Email sent',\n\n ResetFilters: 'Reset filters',\n RelationLabels: 'Relation labels',\n DocumentsOfTheFollowingTypeWillBeLinkedIfPresent:\n 'Documents of the following type will be attached to the email if linked to task:',\n ChooseDocumentInAdminPulse: 'Choose document in AdminPulse',\n Assignment: 'Assignment',\n DefaultAssignment: 'Default assignment',\n Status: 'Status',\n AllTasks: 'All tasks',\n AllUsers: 'All users',\n TasksWithoutTemplate: 'Tasks without template',\n TaskCreatedOnLabel: 'Created on {timestamp} by {creationSource}',\n FilterTaskTemplateNotFound:\n 'This filter does not work because the task template does not exist anymore',\n GenerateDocuments: 'Generate documents',\n GenerateDocumentsQueued:\n 'The documents are being generated for the selected relations. Click here to view its progress.',\n ResetDeadline: 'Reset deadline',\n UpdateFor: 'Update for',\n MainTaskAndAllSubtasks: 'Main task and all subtasks',\n OnlyMainTask: 'Only main task',\n SubTaskDeadlineResetInfo:\n 'The deadlines will be reset based on the deadline of the main task and the deviation from the template.',\n MainTaskDeadlineResetInfo:\n 'The deadlines will be reset based on the original reference date/year and the current task periodicity settings.',\n ReferenceYear: 'Reference year',\n SendMail: 'Send mail',\n OpenMailHistory: 'Open mail history',\n TimeRegistrationIsNotPossibleTaskTypeCondition:\n 'Time registration is not possible on a task of type condition',\n\n NewTask: 'New task',\n\n ItemFromPricelist: 'Item from pricelist',\n\n UserDefinedInTaskTemplate: 'User defined in task template',\n\n MarkAsRejected: 'Mark as rejected',\n MarkAsNotRejected: 'Mark as not rejected',\n Rejected: 'Rejected',\n System: 'System',\n BackgroundJobQueued: 'Job started',\n\n EnterTag: 'Enter tag',\n AddTaskTags: 'Add tags to tasks',\n RemoveTaskTags: 'Remove tags from tasks',\n NoSignableDocumentsLinkedToTask: 'No signable documents linked to this task',\n SelectDocuments: 'Select documents',\n SendDocumentsLinkedToTaskOutForSignature: 'SendDocumentsLinkedToTaskOutForSignature',\n ShowTasksWhereSelectedUserIsNextInLine: 'Show tasks where selected user is next in line',\n ShowTasksWhereSelectedUserIsNextInLineTooltip:\n 'When you have selected a user, this filter will only show the tasks where that user is next in line and can start working on the tasks.',\n});\n\nexport default messages;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage, injectIntl } from 'react-intl';\nimport log from 'loglevel';\nimport moment from 'moment';\nimport classNames from 'classnames';\nimport { retrieveResources } from '@/shared/components/registration/resourceApi';\nimport ResourceAutoComplete from '@/shared/components/registration/ResourceAutoComplete';\nimport intlShape from '@/shared/utils/intlShape';\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport ToastrService from '@/shared/services/ToastrService';\nimport DatePicker from '@/shared/components/input/DatePicker';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport UserSearch from '@/shared/components/input/UserSearch';\nimport RelationSearch from '@/shared/components/input/RelationSearch';\nimport AuthService from '@/shared/services/AuthService';\nimport InlineAttachment from '@/shared/components/InlineAttachment';\nimport Button from '@/shared/components/Button';\nimport FileUpload from '@/shared/components/input/FileUpload';\nimport { FolderOpenIcon } from '@/shared/components/Icons';\nimport DocumentSelectorModal from '@/shared/components/DocumentSelectorModal';\nimport { falseFunc, isBeforeMinimum } from '@/shared/utils/validationHelpers';\nimport { CanCreate, CanRead } from '@/shared/components/security';\nimport { TaskTagsMultiSelect } from '@/shared/components/input/multiselect/TaskTagsMultiSelect';\nimport { hasAssignments } from '@/shared/components/security/HasAssignments';\nimport { mapInvoiceStreamName } from '@/shared/services/ObjectDisplayService';\n\nimport { dynamicSortMultiple } from '@/shared/utils/dynamicSort';\nimport messages from './taskMessages';\n\nconst documentUploadEndpoint = `${config.appUrls.documents}/api/documents?documentType=15&informQueues=false&recognitionStatus=4`;\n\nclass CreateToDoModal extends Component {\n state = {};\n\n static propTypes = {\n onSave: PropTypes.func.isRequired,\n intl: intlShape.isRequired,\n onClose: PropTypes.func.isRequired,\n show: PropTypes.bool,\n relationId: PropTypes.string,\n documents: PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.string,\n name: PropTypes.string,\n }),\n ),\n };\n\n static defaultProps = {\n show: false,\n documents: null,\n relationId: null,\n };\n\n constructor(props) {\n super(props);\n const { documents } = props;\n this.hasAssignments = hasAssignments();\n\n const task = {\n taskLevel: 2, // 2 = to do\n name: '',\n remark: '',\n deadline: moment(),\n userId: undefined,\n relation: undefined,\n invoiceStreamId: undefined,\n tags: [],\n };\n\n this.state = {\n documents: documents || [],\n task,\n showDocumentSelectorModal: false,\n invoiceStreams: [],\n };\n }\n\n componentDidMount() {\n const { intl } = this.props;\n this.form = React.createRef();\n\n retrieveResources(intl, 0).then(resources => {\n this.setState(({ task }) => ({\n resources,\n task: {\n ...task,\n userId: AuthService.getUserId(),\n },\n }));\n });\n }\n\n onResourceChanged = resource => {\n this.setState(({ task }) => ({\n task: {\n ...task,\n resourceId: resource?.id,\n },\n }));\n };\n\n saveToDo = () => {\n this.setState({ touchedTaskName: true, touchedRelation: true });\n\n const { onSave, intl } = this.props;\n\n const { task, documents } = this.state;\n\n if (!task.name || !task.relation || !task.relation.invoiceStreamId) return;\n if (isBeforeMinimum(task.deadline)) return;\n\n const model = { ...task };\n model.deadline = moment.utc(model.deadline);\n\n return api.base\n .post(`${config.appUrls.tasks}/api/plannedTasks`, model)\n .then(({ data: todo }) => {\n if (!documents || !documents.length || !todo.id) return todo;\n const documentLinks = [];\n documents.forEach(document => {\n documentLinks.push({\n documentId: document.id,\n linkId: todo.id,\n linkType: 5,\n recognizeTemporaryDocuments: true,\n });\n // link document to relation, if present\n if (task.relationId) {\n documentLinks.push({\n documentId: document.id,\n linkId: task.relationId,\n linkType: 3,\n });\n }\n });\n return api.base\n .post(`${config.appUrls.documents}/api/documents/linksmultiple`, documentLinks)\n .then(() => todo);\n })\n .then(\n data => {\n ToastrService.success(intl.formatMessage(messages.ToDoCreated));\n onSave(data);\n },\n error => {\n handleHttpError(intl)(error);\n },\n );\n };\n onDocumentUploaded = (error, document) => {\n const { intl } = this.props;\n\n if (error) {\n log.error(error);\n ToastrService.error(intl.formatMessage(messages.MsgEmailAttachmentUploadFailed));\n return;\n }\n\n const { documents } = this.state;\n\n if (documents.some(x => x.id === document.id)) return;\n\n this.setState(state => ({\n documents: [document, ...state.documents],\n }));\n };\n\n handleDeleteDocument = document => {\n if (document.documentType === 15) {\n // Delete if temp file\n api.base.delete(`${config.appUrls.documents}/api/documents/${document.id}`).then(() => {\n this.setState(state => ({\n documents: state.documents.filter(x => x.id !== document.id),\n }));\n });\n } else {\n this.setState(state => ({\n documents: state.documents.filter(x => x.id !== document.id),\n }));\n }\n };\n handleDocumentsSelected = selectedDocuments => {\n this.setState(({ documents }) => {\n if (!selectedDocuments || !selectedDocuments.length)\n return { showDocumentSelectorModal: false };\n\n const newDocuments = [...documents];\n selectedDocuments.forEach(doc => {\n if (newDocuments.some(x => x.id === doc.id)) return;\n newDocuments.unshift(doc);\n });\n\n return {\n showDocumentSelectorModal: false,\n documents: newDocuments,\n };\n });\n };\n\n closeModal = () => {\n const { onClose } = this.props;\n onClose();\n };\n\n deadlineChanged = deadline => {\n this.setState(({ task }) => ({\n task: {\n ...task,\n deadline,\n },\n }));\n };\n\n onTagsChanged = tags => {\n this.setState(({ task }) => ({\n task: {\n ...task,\n tags: tags.map(x => ({\n id: x,\n })),\n },\n }));\n };\n\n userChanged = user => {\n this.setState(({ task }) => ({\n task: {\n ...task,\n userId: user ? user.id : null,\n },\n }));\n };\n\n relationChanged = relation => {\n const { intl } = this.props;\n this.setState(({ task }) => ({\n touchedRelation: true,\n task: {\n ...task,\n invoiceStreamId: relation ? relation.invoiceStreamId : undefined,\n relationId: relation ? relation.id : undefined,\n relation,\n },\n invoiceStreams: (relation?.invoiceStreams ?? [])\n .filter(x => x.isActive)\n .map(x => ({ ...x, label: mapInvoiceStreamName(x, intl) }))\n .sort(dynamicSortMultiple('-isMain', 'label')),\n }));\n };\n assignmentChanged = e => {\n this.setState(({ task }) => ({\n task: { ...task, invoiceStreamId: e.target.value || undefined },\n }));\n };\n\n taskNameChanged = name => {\n this.setState(({ task }) => ({\n touchedTaskName: true,\n task: {\n ...task,\n name,\n },\n }));\n };\n\n render() {\n const { show, intl, relationId: initialRelationId } = this.props;\n const {\n dateFocused,\n task,\n touchedRelation,\n touchedTaskName,\n documents,\n showDocumentSelectorModal,\n invoiceStreams,\n tags,\n resources,\n } = this.state;\n\n const taskNameClassName = classNames('form-group', {\n 'has-error': touchedTaskName && !task.name,\n });\n\n const relationClassName = classNames('form-group', {\n 'has-error': touchedRelation && (!task.relation || !task.relation.invoiceStreamId),\n });\n const initialDocumentSelectorRelation = (task && task.relation && task.relation.id) || null;\n const canCreateTags = AuthService.hasPermission({ functionality: 'Tags', privilege: 'Create' });\n\n return (\n \n {show && (\n
    \n
    \n
    \n \n
    \n this.taskNameChanged(e.target.value)}\n required\n className=\"form-control\"\n />\n
    \n
    \n
    \n \n
    \n \n
    \n
    \n {this.hasAssignments && invoiceStreams.length > 0 && (\n
    \n \n
    \n {invoiceStreams.length > 1 ? (\n \n {invoiceStreams.map(x => (\n \n ))}\n \n ) : (\n mapInvoiceStreamName(task, intl)\n )}\n
    \n
    \n )}\n\n \n \n
    \n this.setState({ dateFocused: focused })}\n id=\"todoDeadline\"\n block\n isOutsideRange={falseFunc}\n />\n
    \n
    \n
    \n \n
    \n {task && (\n x.id)}\n onChange={this.onTagsChanged}\n />\n )}\n
    \n
    \n
    \n \n
    \n \n
    \n
    \n
    \n \n
    \n \n
    \n
    \n {/* REMARK */}\n
    \n \n
    \n \n this.setState({\n task: {\n ...task,\n remark: e.target.value,\n },\n })\n }\n />\n
    \n
    \n {/* Linked documents */}\n\n \n
    \n \n
    \n {documents && documents.length > 0 && (\n
    \n {documents.map(doc => (\n \n ))}\n
    \n )}\n \n
    \n this.onDocumentUploaded(error, file)}\n removeSuccessfullAfter={5000}\n />\n
    \n this.setState({ showDocumentSelectorModal: true })}\n >\n \n \n \n
    \n
    \n
    \n
    \n \n
    \n )}\n {show && showDocumentSelectorModal && (\n this.setState({ showDocumentSelectorModal: false })}\n />\n )}\n \n );\n }\n}\n\nexport default injectIntl(CreateToDoModal);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport debounce from 'lodash-es/debounce';\n\nimport config from '../../config';\nimport api from '../api';\n\nexport default class SearchRelations extends React.Component {\n static initialState = { loading: false, error: null, relations: [] };\n static defaultSearchOptions = {\n includeInactive: false,\n types: [],\n crmTypes: [],\n take: 15,\n };\n requestId = 0;\n state = SearchRelations.initialState;\n mounted = false;\n\n reset(overrides) {\n this.setState({ ...SearchRelations.initialState, ...overrides });\n }\n\n searchRelations = (searchValue, requestId) => {\n const { searchOptions, omitRelations } = this.props;\n\n const endpoint = `${config.appUrls.api}/api/relation/names`;\n\n const params = {\n searchValue,\n ...SearchRelations.defaultSearchOptions,\n ...searchOptions,\n };\n\n return api.base.get(endpoint, { params }).then(\n ({ data }) => ({\n data: data.filter(x => !omitRelations.some(r => r && r.id === x.id)),\n requestId,\n }),\n error => ({\n error,\n requestId,\n }),\n );\n };\n\n fetch = debounce(() => {\n if (!this.mounted) {\n return;\n }\n const { onLoaded, searchValue } = this.props;\n this.requestId += 1;\n this.searchRelations(searchValue, this.requestId).then(\n ({ data: relations, requestId }) => {\n if (this.mounted && requestId === this.requestId) {\n onLoaded({ relations });\n this.setState({ loading: false, relations });\n }\n },\n ({ error, requestId }) => {\n if (this.mounted && requestId === this.requestId) {\n onLoaded({ error });\n this.setState({ loading: false, error });\n }\n },\n );\n }, 300);\n prepareFetch() {\n this.reset({ loading: true });\n }\n componentDidMount() {\n this.mounted = true;\n // this.prepareFetch();\n // this.fetch();\n }\n componentDidUpdate(prevProps) {\n const { searchValue, omitRelations } = this.props;\n if (prevProps.searchValue !== searchValue || prevProps.omitRelations !== omitRelations) {\n if (!searchValue || searchValue.length < 3) {\n this.reset({});\n } else {\n this.prepareFetch();\n this.fetch();\n }\n }\n }\n componentWillUnmount() {\n this.mounted = false;\n }\n render() {\n const { children } = this.props;\n return children(this.state);\n }\n\n static propTypes = {\n children: PropTypes.func.isRequired, // Render func { loading, error, relations }\n onLoaded: PropTypes.func,\n searchValue: PropTypes.string,\n searchOptions: PropTypes.shape({}),\n omitRelations: PropTypes.arrayOf(PropTypes.shape({ id: PropTypes.string })),\n };\n static defaultProps = {\n onLoaded: () => {},\n searchValue: '',\n searchOptions: {},\n omitRelations: [],\n };\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Downshift from 'downshift';\nimport { defineMessages, FormattedMessage, injectIntl, useIntl } from 'react-intl';\nimport classNames from 'classnames';\nimport intlShape from '@/shared/utils/intlShape';\nimport RelationTypeIcon from '@/shared/components/RelationTypeIcon';\nimport RelationName, { getRelationName } from '@/shared/components/RelationName';\nimport { DeleteIcon } from '../Icons';\nimport SearchRelation from '../SearchRelation';\nimport LoadingAnimation from '../LoadingAnimation';\nimport Item from './select/Item';\n\nconst messages = defineMessages({\n AddRelation: 'Add relation',\n RemoveRelation: 'Remove relation',\n NoRelationsFound: 'NoRelationsFound',\n ErrorLoadingData: 'Error loading data',\n ChooseRelation: 'Choose relation',\n});\n\nconst renderDropdownItems = ({\n loading,\n relations,\n error,\n highlightedIndex,\n selectedItem,\n getItemProps,\n intl\n}) => {\n if (loading) return ;\n if (error)\n return (\n \n \n \n );\n if (relations && relations.length)\n return relations.map((relation, index) => (\n \n \n {getRelationName(intl,relation)}\n \n ));\n return (\n \n \n \n );\n};\n\nclass RelationListPicker extends React.Component {\n state = {\n inputValue: null,\n };\n\n handleStateChange = (changes, { clearSelection }) => {\n const { onAddRelation } = this.props;\n if (typeof changes.selectedItem !== 'undefined') {\n onAddRelation(changes.selectedItem);\n clearSelection();\n } else if (typeof changes.inputValue !== 'undefined') {\n this.setState({ inputValue: changes.inputValue });\n }\n };\n\n renderRelationInput = () => {\n const { inputValue } = this.state;\n const { relations: selectedRelations, intl } = this.props;\n\n const itemToString = i => (i ? `${i.infix} ${i.name} ${i.firstName}` : '');\n\n return (\n
    0 })}>\n \n {({\n getInputProps,\n getMenuProps,\n isOpen,\n clearItems,\n setHighlightedIndex,\n setItemCount,\n highlightedIndex,\n getItemProps,\n selectedItem,\n }) => (\n
    \n \n {!isOpen ? null : (\n
    \n \n {\n clearItems();\n if (relations) {\n setHighlightedIndex(relations.length ? 0 : null);\n setItemCount(relations.length);\n }\n }}\n >\n {({ loading, relations, error }) =>\n renderDropdownItems({\n loading,\n relations,\n error,\n highlightedIndex,\n selectedItem,\n getItemProps,\n intl\n })\n }\n \n \n
    \n )}\n
    \n )}\n \n
    \n );\n };\n\n renderRelationRow = relation => {\n const { disabled, intl, onRemoveRelation } = this.props;\n\n return (\n
    \n \n {!disabled && (\n onRemoveRelation(relation)}\n title={intl.formatMessage(messages.RemoveRelation)}\n />\n )}\n
    \n );\n };\n\n render() {\n const { relations, disabled } = this.props;\n return (\n
    \n {!disabled && this.renderRelationInput()}\n
    {relations && relations.map(this.renderRelationRow)}
    \n
    \n );\n }\n}\n\nRelationListPicker.propTypes = {\n relations: PropTypes.arrayOf(PropTypes.shape({ id: PropTypes.string })).isRequired,\n\n disabled: PropTypes.bool,\n\n onAddRelation: PropTypes.func,\n onRemoveRelation: PropTypes.func,\n\n intl: intlShape.isRequired,\n};\n\nRelationListPicker.defaultProps = {\n disabled: false,\n onAddRelation: relation => {},\n onRemoveRelation: relation => {},\n};\nexport default injectIntl(RelationListPicker);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage } from 'react-intl';\n\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport RelationListPicker from '@/shared/components/input/RelationListPicker';\nimport intlShape from '@/shared/utils/intlShape';\nimport messages from '../documentMessages';\n\nexport default class UpdateDocumentRelationsModal extends Component {\n state = {\n action: 'add',\n relations: [],\n };\n\n static propTypes = {\n show: PropTypes.bool.isRequired,\n intl: intlShape.isRequired,\n onSave: PropTypes.func.isRequired,\n onClose: PropTypes.func.isRequired,\n };\n\n static defaultProps = {};\n\n actionChanged = event => {\n const action = event.target.value;\n this.setState({\n action,\n });\n };\n\n isFormInvalid = () => {\n const { action, relations } = this.state;\n if (!action || !relations.length) return true;\n\n return false;\n };\n\n addRelation = relation => {\n if (relation && relation.id) {\n this.setState(state => ({\n relations: [...state.relations.filter(x => x.id !== relation.id), relation],\n }));\n }\n };\n\n removeRelation = relation => {\n if (relation && relation.id) {\n this.setState(state => ({\n relations: state.relations.filter(x => x.id !== relation.id),\n }));\n }\n };\n\n onSave = () => {\n const { action, relations } = this.state;\n const { onSave } = this.props;\n\n return onSave({ action, relations });\n };\n\n closeModal = () => {\n const { onClose } = this.props;\n\n this.setState(state => ({\n ...state,\n selectedTags: [],\n }));\n\n onClose();\n };\n\n render() {\n const { show, intl } = this.props;\n const { action, relations } = this.state;\n\n if (!show) return null;\n\n return (\n this.onSave()}\n >\n
    \n
    \n
    \n \n
    \n \n
    \n
    \n
    \n \n
    \n \n
    \n
    \n
    \n
    \n \n );\n }\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { defineMessages, injectIntl, useIntl } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\n\nconst messages = defineMessages({\n RemoveTag: 'Remove tag',\n});\n\nclass Tag extends React.PureComponent {\n static propTypes = {\n intl: intlShape.isRequired,\n item: PropTypes.shape({\n value: PropTypes.object.isRequired,\n }),\n title: PropTypes.string,\n removeTitle: PropTypes.string,\n onRemove: PropTypes.func,\n };\n\n static defaultProps = {\n onRemove: () => {},\n item: undefined,\n title: null,\n removeTitle: null,\n };\n\n onRemove = e => {\n const { onRemove, item } = this.props;\n\n e.preventDefault();\n e.stopPropagation();\n if (onRemove) {\n onRemove({ ...item });\n }\n };\n\n render() {\n const { intl, item, title, removeTitle } = this.props;\n return (\n \n {item.name}\n \n {/* \n x\n */}\n \n );\n }\n}\n\nexport default injectIntl(Tag);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport DropdownButton from 'react-bootstrap/lib/DropdownButton';\nimport { injectIntl } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport MenuItemWithSecurity from '@/shared/components/MenuItemWithSecurity';\nimport messages from './documentMessages';\nimport { functionalities, privileges } from '@/shared/services/AuthService';\n\nconst DocumentGlobalActionsButton = props => {\n const {\n intl,\n disabled,\n onUpdateTags,\n onUpdateRelations,\n onRemoveDocuments,\n onDownloadZip,\n onSendByEmail,\n onSetIsPublicOnPortal,\n onChangeDocumentDate,\n onCreateMergePdf,\n onSendSignatureRequest,\n onChangeDocumentType,\n } = props;\n\n return (\n \n \n \n {intl.formatMessage(messages.AddOrRemoveTags)}\n \n \n {intl.formatMessage(messages.AddOrRemoveRelations)}\n \n \n {intl.formatMessage(messages.DownloadAsZip)}\n \n \n {intl.formatMessage(messages.CreateMergedPdf)}\n \n \n {intl.formatMessage(messages.SendByEmail)}\n \n \n {intl.formatMessage(messages.SendSignatureRequest)}\n \n \n {intl.formatMessage(messages.EnableOrDisableIsPublicOnPortal)}\n \n \n {intl.formatMessage(messages.ChangeDocumentDate)}\n \n \n {intl.formatMessage(messages.ChangeDocumentType)}\n \n \n {intl.formatMessage(messages.RemoveDocuments)}\n \n \n \n );\n};\n\nDocumentGlobalActionsButton.propTypes = {\n intl: intlShape.isRequired,\n disabled: PropTypes.bool,\n};\nDocumentGlobalActionsButton.defaultProps = {\n disabled: false,\n};\n\nexport default injectIntl(DocumentGlobalActionsButton);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage } from 'react-intl';\nimport debounce from 'lodash-es/debounce';\n\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport Tag from '@/shared/components/Tag';\nimport intlShape from '@/shared/utils/intlShape';\nimport messages from '../documentMessages';\n\nexport default class UpdateDocumentTagsModal extends Component {\n state = {\n action: 'add',\n availableTags: [],\n newTag: '',\n selectedTags: [],\n };\n\n static propTypes = {\n show: PropTypes.bool.isRequired,\n intl: intlShape.isRequired,\n onSave: PropTypes.func.isRequired,\n onClose: PropTypes.func.isRequired,\n };\n\n static defaultProps = {};\n\n componentDidMount() {\n this.retrieveTags();\n }\n\n retrieveTags = () => {\n api.base.get(`${config.appUrls.documents}/api/tag`).then(({ data }) => {\n this.setState({ availableTags: data });\n });\n };\n\n actionChanged = event => {\n const action = event.target.value;\n this.setState({\n action,\n });\n };\n\n isFormInvalid = () => {\n const { action, selectedTags } = this.state;\n if (!action || !selectedTags.length) return true;\n\n return false;\n };\n\n // debounce makes sure that if this method is called again within 300 ms, only the last call is executed.\n // this method adds the tag automatically to the document when it is found in the list of tags\n // this is needed because if there are two tags: test and test2, and the user starts typing, test2 will never be able\n // to be added to the document because the value that was entered will me immediately processed and found\n debouncedFindAndAddTag = debounce(value => {\n const { availableTags } = this.state;\n if (value && availableTags.find(x => x.name === value)) {\n this.addTag(value);\n this.setState({ newTag: '' });\n }\n }, 400);\n\n onTagValueChanged = value => {\n this.setState({ newTag: value });\n this.debouncedFindAndAddTag(value);\n };\n\n addTag = tagName => {\n if (!tagName) return;\n const { selectedTags } = this.state;\n\n if (selectedTags.includes(tagName)) return;\n this.setState({\n selectedTags: [...selectedTags, tagName],\n });\n };\n\n onSave = () => {\n const { action, selectedTags } = this.state;\n const { onSave } = this.props;\n\n return onSave({ action, tags: selectedTags });\n };\n\n closeModal = () => {\n const { onClose } = this.props;\n\n this.setState(state => ({\n ...state,\n selectedTags: [],\n }));\n\n onClose();\n };\n\n onRemoveTag = tag => {\n const { selectedTags } = this.state;\n\n this.setState({\n selectedTags: selectedTags.filter(x => x !== tag.name),\n });\n };\n\n render() {\n const { show, intl } = this.props;\n const { action, availableTags, newTag, selectedTags } = this.state;\n\n if (!show) return null;\n\n return (\n this.onSave()}\n >\n
    \n
    \n
    \n \n
    \n \n
    \n
    \n
    \n \n
    \n
    \n {\n if (newTag !== '') {\n this.addTag(newTag);\n this.setState({ newTag: '' });\n }\n }}\n value={newTag}\n placeholder={intl.formatMessage(messages.EnterTag)}\n onChange={e => this.onTagValueChanged(e.target.value.replace(';', ''))}\n list=\"tags\"\n autoComplete=\"off\"\n onKeyDown={e => {\n if (e.keyCode === 13) {\n this.addTag(newTag);\n this.setState({ newTag: '' });\n } else if (e.keyCode === 27) {\n this.setState({ newTag: '' });\n }\n }}\n />\n
    \n
    \n {selectedTags &&\n selectedTags.map((item, index) => (\n \n ))}\n
    \n \n {availableTags && availableTags.map(t => \n
    \n
    \n
    \n
    \n \n );\n }\n}\n","import { defineMessages } from 'react-intl';\n\nconst messages = defineMessages({\n All: 'All',\n ThisMonth: 'This month',\n ThisQuarter: 'This quarter',\n ThisYear: 'This year',\n DateFrom: 'From',\n DateUntil: 'Until',\n Today: 'Today',\n Yesterday: 'Yesterday',\n PreviousMonth: 'Previous month',\n PreviousQuarter: 'Previous quarter',\n ThisWeek: 'This week',\n PreviousWeek: 'Previous week',\n NextMonth: 'Next month',\n NextQuarter: 'Next quarter',\n});\n\nexport default messages;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { injectIntl, useIntl } from 'react-intl';\nimport { DateRangePicker } from 'react-dates';\nimport { isBeforeMinimum } from '@/shared/utils/validationHelpers';\n\nimport momentPropTypes from 'react-moment-proptypes';\n\nimport intlShape from '@/shared/utils/intlShape';\n\nimport dateMessages from '../../messages/dateMessages';\nimport dateFormatService from '../../services/DateFormatService';\n\n// Trigger update when calendar closes, not with every change\nclass DelayedDateRangePicker extends Component {\n constructor(props) {\n super(props);\n const { startDate, endDate } = props;\n this.state = {\n datePickerFocus: null,\n internalStartDate: startDate,\n internalEndDate: endDate,\n renderKey: 0,\n };\n }\n\n setDates = (startDate, endDate, submitAfterChange = false) => {\n this.setState(\n {\n internalStartDate: startDate,\n internalEndDate: endDate,\n },\n () => {\n if (submitAfterChange) {\n this.submitDates();\n }\n },\n );\n };\n submitDates = () => {\n const { onDatesChange } = this.props;\n const { internalStartDate, internalEndDate } = this.state;\n onDatesChange({ startDate: internalStartDate, endDate: internalEndDate });\n };\n\n setInputFocus = input => {\n this.setState({ datePickerFocus: input });\n };\n handleDatesChange = ({ startDate, endDate }) => {\n const { internalStartDate, internalEndDate, datePickerFocus } = this.state;\n // This is a check to see if the clear button was pressed\n\n const submitAfterChange =\n !datePickerFocus &&\n startDate === null &&\n endDate === null &&\n (internalStartDate !== null || internalEndDate !== null);\n\n this.setDates(startDate, endDate, submitAfterChange);\n };\n handleClose = () => {\n this.setState(\n ({ renderKey }) => ({ renderKey: renderKey + 1 }), // Force rerender, invalid input dates will be reset to null\n () => {\n this.submitDates(); // Submit after setState (including the one in setDates)\n },\n );\n };\n\n componentDidUpdate(prevProps) {\n const { startDate, endDate } = this.props;\n const { internalStartDate, internalEndDate } = this.state;\n if (\n (prevProps.startDate !== startDate && startDate !== internalStartDate) ||\n (prevProps.endDate !== endDate && endDate !== internalEndDate)\n ) {\n // Dates changed from outside\n this.setDates(startDate, endDate, false);\n // Force rerender\n // eslint-disable-next-line react/no-did-update-set-state\n this.setState(({ renderKey }) => ({ renderKey: renderKey + 1 }));\n }\n }\n\n render() {\n const {\n intl,\n isOutsideRange,\n startDatePlaceholderText,\n endDatePlaceholderText,\n startDateId,\n endDateId,\n startDate,\n endDate,\n onDatesChange,\n ...rest\n } = this.props;\n const { datePickerFocus, internalStartDate, internalEndDate, renderKey } = this.state;\n return (\n \n );\n }\n\n static propTypes = {\n onDatesChange: PropTypes.func.isRequired,\n intl: intlShape.isRequired,\n\n startDate: momentPropTypes.momentObj,\n endDate: momentPropTypes.momentObj,\n isOutsideRange: PropTypes.func,\n startDateId: PropTypes.string,\n endDateId: PropTypes.string,\n startDatePlaceholderText: PropTypes.string,\n endDatePlaceholderText: PropTypes.string,\n };\n static defaultProps = {\n startDate: null,\n endDate: null,\n isOutsideRange: isBeforeMinimum,\n startDateId: 'FiltersDateFrom',\n endDateId: 'FiltersDateUntil',\n startDatePlaceholderText: undefined,\n endDatePlaceholderText: undefined,\n };\n}\n\nexport default injectIntl(DelayedDateRangePicker);\n","import moment from 'moment';\nimport api from '../api';\nimport userStorage from './userStorage';\nimport adminpulse from '../utils/adminpulse';\n\nconst { ciEquals } = adminpulse;\nconst storageKey = 'EmployeeFilters';\n\nconst getStorage = () => {\n const { lastUpdate, filters = [] } = userStorage.getItem(storageKey) || {};\n return { lastUpdate, filters };\n};\nconst setStorage = (filters = []) => {\n userStorage.setItem(storageKey, { lastUpdate: moment.utc().format(), filters });\n};\n\nlet isLoaded = false;\nconst load = (force = false) => {\n const { lastUpdate, filters } = getStorage();\n if (!force && !!lastUpdate && moment.utc(lastUpdate).isAfter(moment.utc().subtract(1, 'hour'))) {\n // The last update was less than 1 hour ago, no need to call backend\n isLoaded = true;\n return Promise.resolve(filters);\n }\n return api.base.get(`/api/user/filter`).then(({ data }) => {\n const newFilters = data || [];\n setStorage(newFilters);\n isLoaded = true;\n return newFilters;\n });\n};\n\nconst findFilterIndex = (filters, filter) => {\n // Find by id\n let idx = filters.findIndex(x => x.id === filter.id);\n if (idx >= 0) return idx;\n // Find by name\n idx = filters.findIndex(x => ciEquals(x.screen, filter.screen) && ciEquals(x.name, filter.name));\n return idx;\n};\nconst getScreenFilters = screen => {\n if (!screen) return [];\n const { filters } = getStorage();\n return filters.filter(x => ciEquals(x.screen, screen));\n};\nconst setFilter = filter => {\n if (!filter) return Promise.reject();\n\n return api.base.post(`/api/user/filter`, filter).then(({ data }) => {\n if (data) {\n const { filters } = getStorage();\n\n const newFilters = [...filters];\n const idx = findFilterIndex(newFilters, data);\n if (idx < 0) {\n newFilters.push(data);\n } else {\n newFilters[idx] = data;\n }\n setStorage(newFilters);\n }\n return data;\n });\n};\nconst deleteFilter = filter => {\n if (!filter) return Promise.reject();\n\n return api.base.delete(`/api/user/filter/${filter.id}`).then(() => {\n const { filters } = getStorage();\n const newFilters = [...filters];\n const idx = findFilterIndex(newFilters, filter);\n if (idx >= 0) {\n newFilters.splice(idx, 1);\n }\n setStorage(newFilters);\n });\n};\n\nconst EmployeeFilterService = {\n isLoaded: () => isLoaded,\n load,\n getScreenFilters,\n setFilter,\n deleteFilter,\n};\n\nexport default EmployeeFilterService;\n","export var c = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return args.filter(Boolean).join(' ');\n};\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/* eslint-disable react/require-default-props */\nimport { useMemo } from 'react';\nimport { useIntl } from 'react-intl';\nimport OkCancelModal from './OkCancelModal';\nimport { messages } from './FilterSave';\nexport var FilterSaveModal = function (_a) {\n var isNameModalOpen = _a.isNameModalOpen, modalFilter = _a.modalFilter, saveFilter = _a.saveFilter, setModalFilter = _a.setModalFilter, setIsNameModalOpen = _a.setIsNameModalOpen;\n var formatMessage = useIntl().formatMessage;\n var closeModal = function () {\n setIsNameModalOpen(false);\n setModalFilter(undefined);\n };\n var handleNameInputKeyDownEvent = function (e) {\n if (e.keyCode === 13) {\n saveFilter();\n }\n else if (e.keyCode === 27) {\n closeModal();\n }\n };\n var onChange = function (e) {\n setModalFilter(__assign(__assign({}, modalFilter), { name: e.target.value }));\n };\n var nameInput = useMemo(function () { var _a; return (_a = modalFilter === null || modalFilter === void 0 ? void 0 : modalFilter.name) !== null && _a !== void 0 ? _a : ''; }, [modalFilter === null || modalFilter === void 0 ? void 0 : modalFilter.name]);\n if (isNameModalOpen) {\n return (_jsxs(OkCancelModal, __assign({ title: formatMessage(messages.SearchCriteriaNameInputTitle), show: true, onClose: closeModal, onSave: saveFilter, disableFullScreen: true }, { children: [_jsx(\"div\", { children: formatMessage(messages.SearchCriteriaNameInputMessage) }), _jsx(\"div\", { children: _jsx(\"input\", { type: \"text\", value: nameInput, onChange: onChange, className: \"form-control\", maxLength: 50, autoFocus: true, onKeyDown: handleNameInputKeyDownEvent, placeholder: formatMessage(messages.SearchCriteriaNameInputPlaceholder) }) })] })));\n }\n return null;\n};\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport { useCallback, useEffect, useMemo, useState } from 'react';\nimport { FaSave, FaSearch, FaUndo } from 'react-icons/fa';\nimport { defineMessages, useIntl } from 'react-intl';\nimport EmployeeFilterService from '../services/EmployeeFilterService';\nimport ToastrService from '../services/ToastrService';\nimport { c } from '../utils/c';\nimport { dynamicSort } from '../utils/dynamicSort';\nimport { FilterSaveModal } from './FilterSaveModal';\nexport var messages = defineMessages({\n SaveSearchCriteria: {\n id: 'SaveSearchCriteria',\n defaultMessage: 'Save search criteria',\n },\n RenameSearchCriteria: {\n id: 'RenameSearchCriteria',\n defaultMessage: 'Rename search criteria',\n },\n DeleteSearchCriteria: {\n id: 'DeleteSearchCriteria',\n defaultMessage: 'Delete search criteria',\n },\n SelectSearchCriteria: {\n id: 'SelectSearchCriteria',\n defaultMessage: 'Select search criteria',\n },\n ReplaceSearchCriteria: {\n id: 'ReplaceSearchCriteria',\n defaultMessage: 'Replace search criteria',\n },\n ResetFilters: {\n id: 'ResetFilters',\n defaultMessage: 'Reset filters',\n },\n SelectAll: {\n id: 'SelectAll',\n defaultMessage: 'Select all',\n },\n // Same labels used in AngularJS modal\n SearchCriteriaNameInputTitle: {\n id: 'SearchCriteriaNameInputTitle',\n defaultMessage: 'SearchCriteriaNameInputTitle',\n },\n SearchCriteriaNameInputMessage: {\n id: 'SearchCriteriaNameInputMessage',\n defaultMessage: 'SearchCriteriaNameInputMessage',\n },\n SearchCriteriaNameInputPlaceholder: {\n id: 'SearchCriteriaNameInputPlaceholder',\n defaultMessage: 'SearchCriteriaNameInputPlaceholder',\n },\n});\nexport var FilterSave = function (_a) {\n var hasActiveFilters = _a.hasActiveFilters, screen = _a.screen, filtersObject = _a.filtersObject, resetFilters = _a.resetFilters, setFilter = _a.setFilter;\n var intl = useIntl();\n var formatMessage = intl.formatMessage;\n var _b = useState([]), savedFilters = _b[0], setSavedFilters = _b[1];\n var _c = useState(false), isNameModalOpen = _c[0], setIsNameModalOpen = _c[1];\n var _d = useState(), modalFilter = _d[0], setModalFilter = _d[1];\n var hasSavedFilters = useMemo(function () { return savedFilters.length > 0; }, [savedFilters.length]);\n var selectedFilter = useMemo(function () {\n if (!hasSavedFilters) {\n return undefined;\n }\n return savedFilters.find(function (item) { return item.json === JSON.stringify(filtersObject); });\n }, [filtersObject, hasSavedFilters, savedFilters]);\n var reloadSavedFilters = useCallback(function () {\n setSavedFilters(EmployeeFilterService.getScreenFilters(screen)\n .map(function (x) { return (__assign(__assign({}, x), { filter: JSON.parse(x.json) || {} })); })\n .sort(dynamicSort('name')));\n }, [screen]);\n useEffect(function () {\n EmployeeFilterService.load().then(reloadSavedFilters);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n var showSaveFilterModal = function () {\n setModalFilter({\n name: '',\n filter: filtersObject,\n screen: screen,\n json: JSON.stringify(filtersObject),\n });\n setIsNameModalOpen(true);\n };\n var selectFilter = function (filterId) {\n var savedFilter = savedFilters.find(function (item) { return item.id === filterId; });\n if (savedFilter) {\n resetFilters();\n setFilter(savedFilter.filter);\n }\n };\n var replaceFilter = function (filter, event) { return __awaiter(void 0, void 0, void 0, function () {\n var model, updatedFilter;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n event.stopPropagation();\n event.preventDefault();\n if (!filter || !filter.id)\n return [2 /*return*/];\n model = __assign(__assign({}, filter), { json: JSON.stringify(filtersObject) });\n return [4 /*yield*/, EmployeeFilterService.setFilter(model)];\n case 1:\n updatedFilter = _a.sent();\n if (updatedFilter) {\n ToastrService.changesSaved(intl);\n reloadSavedFilters();\n }\n return [2 /*return*/, updatedFilter];\n }\n });\n }); };\n var showRenameFilterModal = function (filter, event) {\n event.stopPropagation();\n event.preventDefault();\n if (!filter || !filter.id)\n return;\n setModalFilter(filter);\n setIsNameModalOpen(true);\n };\n var deleteFilter = function (filter, event) { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n event.stopPropagation();\n event.preventDefault();\n if (!filter || !filter.id)\n return [2 /*return*/];\n return [4 /*yield*/, EmployeeFilterService.deleteFilter(filter)];\n case 1:\n _a.sent();\n ToastrService.changesSaved(intl);\n reloadSavedFilters();\n return [2 /*return*/];\n }\n });\n }); };\n var saveFilter = function () { return __awaiter(void 0, void 0, void 0, function () {\n var updatedFilter;\n var _a;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n if (!((_a = modalFilter === null || modalFilter === void 0 ? void 0 : modalFilter.name) === null || _a === void 0 ? void 0 : _a.length))\n return [2 /*return*/];\n return [4 /*yield*/, EmployeeFilterService.setFilter(modalFilter)];\n case 1:\n updatedFilter = _b.sent();\n if (updatedFilter) {\n ToastrService.changesSaved(intl);\n reloadSavedFilters();\n }\n setIsNameModalOpen(false);\n setModalFilter(undefined);\n return [2 /*return*/, updatedFilter];\n }\n });\n }); };\n if (!hasSavedFilters && hasActiveFilters) {\n return (_jsxs(_Fragment, { children: [_jsxs(\"button\", __assign({ type: \"button\", className: \"btn btn-default\", onClick: showSaveFilterModal }, { children: [_jsx(FaSave, { className: \"react-icon fa-fw margin5R\" }), formatMessage(messages.SaveSearchCriteria)] })), _jsx(FilterSaveModal, { isNameModalOpen: isNameModalOpen, modalFilter: modalFilter, saveFilter: saveFilter, setModalFilter: setModalFilter, setIsNameModalOpen: setIsNameModalOpen })] }));\n }\n if (hasSavedFilters) {\n return (_jsxs(\"div\", __assign({ className: \"btn-group\" }, { children: [_jsx(FilterSaveModal, { isNameModalOpen: isNameModalOpen, modalFilter: modalFilter, saveFilter: saveFilter, setModalFilter: setModalFilter, setIsNameModalOpen: setIsNameModalOpen }), _jsxs(\"button\", __assign({ type: \"button\", className: \"btn btn-default dropdown-toggle\", \"data-toggle\": \"dropdown\", \"aria-haspopup\": \"true\", \"aria-expanded\": \"false\" }, { children: [_jsx(FaSearch, { className: c('react-icon margin5R', selectedFilter ? 'text-success' : 'text-orange') }), selectedFilter && selectedFilter.name\n ? selectedFilter.name\n : formatMessage(messages.SelectSearchCriteria), _jsx(\"span\", { className: \"caret\" })] })), _jsxs(\"ul\", __assign({ className: \"dropdown-menu\" }, { children: [hasActiveFilters && !selectedFilter && (_jsx(\"li\", { children: _jsxs(\"a\", __assign({ onClick: showSaveFilterModal }, { children: [_jsx(FaSave, { className: \"react-icon fa-fw margin5R\" }), formatMessage(messages.SaveSearchCriteria)] })) })), hasActiveFilters && (_jsx(\"li\", { children: _jsxs(\"a\", __assign({ onClick: resetFilters }, { children: [_jsx(FaUndo, { className: \"react-icon fa-fw margin5R\" }), formatMessage(messages.ResetFilters)] })) })), hasActiveFilters && _jsx(\"li\", { role: \"separator\", className: \"divider\" }), hasSavedFilters &&\n savedFilters.map(function (filter) { return (_jsx(\"li\", __assign({ className: c(selectedFilter && selectedFilter.id === filter.id && 'active') }, { children: _jsxs(\"a\", __assign({ onClick: function () { return selectFilter(filter.id); }, id: filter.id }, { children: [_jsx(\"span\", { children: filter.name }), !selectedFilter && hasActiveFilters && (_jsx(\"i\", { className: \"fa fa-exchange clickable\", title: formatMessage(messages.ReplaceSearchCriteria), onClick: function (e) { return replaceFilter(filter, e); } })), _jsx(\"i\", { className: \"fa fa-pencil clickable\", title: formatMessage(messages.RenameSearchCriteria), onClick: function (e) { return showRenameFilterModal(filter, e); } }), _jsx(\"i\", { className: \"fa fa-trash clickable\", title: formatMessage(messages.DeleteSearchCriteria), onClick: function (e) { return deleteFilter(filter, e); } })] })) }), filter.id)); })] }))] })));\n }\n return null;\n};\n","// Copyright (c) 2017 PlanGrid, Inc.\n\nimport React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport messages from './fileViewerMessages';\n\nconst Error = () => (\n
    \n

    \n \n \n \n

    \n
    \n);\n\nexport default Error;\n","import React, { Component, Fragment, useMemo } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage, injectIntl } from 'react-intl';\nimport { FaFileInvoiceDollar, FaPaperclip, FaRegEnvelope, FaUndo, FaFilter } from 'react-icons/fa';\nimport classnames from 'classnames';\nimport moment from 'moment';\nimport momentPropTypes from 'react-moment-proptypes';\nimport intlShape from '@/shared/utils/intlShape';\nimport { Dropdown } from 'react-bootstrap';\nimport userStorage from '@/shared/services/userStorage';\n\nimport api from '@/shared/api';\nimport MultiSelect, {\n addItem as addMultiSelectItem,\n removeItem as removeMultiSelectItem,\n splitItems as splitMultiSelectItems,\n} from '@/shared/components/input/multiselect/MultiSelect';\nimport dateMessages from '@/shared/messages/dateMessages';\nimport RelationSearch from '@/shared/components/input/RelationSearch';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport TextSearch from '@/shared/components/input/TextSearch';\nimport CheckboxDropdownMenu from '@/shared/components/input/CheckboxDropdownMenu';\n\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport enumCache from '@/shared/services/EnumCacheService';\nimport CompanyMultiSelect from '@/shared/components/input/multiselect/CompanyMultiSelect';\nimport HasMultiCompany from '@/shared/components/security/HasMultiCompany';\nimport UserSearch from '@/shared/components/input/UserSearch';\nimport DelayedDateRangePicker from '@/shared/components/input/DelayedDateRangePicker';\nimport DynamicFilter, {\n getDynamicFiltersFromDefaultFilters,\n initDynamicFilters,\n} from '@/shared/components/DynamicFilter';\nimport messages from './documentMessages';\nimport config from '../../config';\nimport { FilterSave } from \"@/shared/components/FilterSave\";\nimport dataCacheService from '@/shared/services/DataCacheService';\n\nconst dynamicFiltersStorageKey = 'DocumentsOverviewDynamicFilters';\n\nexport const defaultFilters = {\n relationId: null,\n relationName: null,\n companyId: null,\n dateUntil: null,\n dateFrom: null,\n period: 'all',\n documentTypes: [],\n recognitionStatus: [],\n search: '',\n notLinkedToRelation: false,\n linkedToMultipleRelations: false,\n ownCompanies: [],\n emailStatus: [],\n signingStatus: [],\n createdBy: null,\n withTags: [],\n withoutTags: [],\n includeEmails: true,\n includeAttachments: true,\n includeInvoices: true,\n responsible: null,\n assistant: null,\n assistantBackup: null,\n associate: null,\n billingUser: null,\n seniorUser: null,\n relationGroups: [],\n checkedOutUser: null\n};\n\nclass DocumentFilters extends Component {\n state = {\n dynamicFilters: [],\n };\n\n static propTypes = {\n onFilterChange: PropTypes.func.isRequired,\n filters: PropTypes.shape({\n relationId: PropTypes.string,\n relationName: PropTypes.string,\n companyId: PropTypes.string,\n dateUntil: momentPropTypes.momentObj,\n dateFrom: momentPropTypes.momentObj,\n period: PropTypes.oneOf([\n 'all',\n 'month',\n 'quarter',\n 'year',\n 'year-1',\n 'year-2',\n 'year-3',\n 'year-4',\n 'year-5',\n ]),\n documentTypes: PropTypes.arrayOf(PropTypes.number),\n recognitionStatus: PropTypes.arrayOf(PropTypes.number),\n search: PropTypes.string,\n notLinkedToRelation: PropTypes.bool,\n linkedToMultipleRelations: PropTypes.bool,\n ownCompanies: PropTypes.arrayOf(PropTypes.string),\n emailStatus: PropTypes.arrayOf(PropTypes.number),\n signingStatus: PropTypes.arrayOf(PropTypes.number),\n withTags: PropTypes.arrayOf(PropTypes.string),\n withoutTags: PropTypes.arrayOf(PropTypes.string),\n createdBy: PropTypes.string,\n includeEmails: PropTypes.bool,\n includeInvoices: PropTypes.bool,\n includeAttachments: PropTypes.bool,\n relationGroups: PropTypes.arrayOf(PropTypes.string),\n checkedOutUser: PropTypes.string,\n }),\n intl: intlShape.isRequired,\n };\n\n static defaultProps = {\n filters: {\n ...defaultFilters,\n },\n };\n\n componentDidMount() {\n const { filters, intl } = this.props;\n\n if (filters && filters.period) {\n this.setPeriod(filters.period);\n }\n Promise.all([\n enumCache.get('documenttype'),\n enumCache.get('recognitionstatus'),\n enumCache.get('combinedEmailStatus'),\n enumCache.get('signingStatus'),\n api.base.get(`${config.appUrls.documents}/api/Tag`),\n ]).then(\n ([documentTypes, recognitionStatusses, emailStatusses, signingStatusses, { data: tags }]) => {\n const relevantSigningStatuses = [1, 2, 3, 4, 10, 11, 12, 20];\n\n const allDynamicFilters = [...getDynamicFiltersFromDefaultFilters(defaultFilters, 'ownCompanies', 'checkedOutUser'),\n {\n id: 'checkedOutUser',\n enabled: dataCacheService.hasConnectPlatform(null, 46),\n label: messages.CheckedOutUser\n }\n ];\n this.setState({\n dynamicFilters: initDynamicFilters(\n intl,\n allDynamicFilters,\n userStorage.getItem(dynamicFiltersStorageKey) || [],\n filters,\n defaultFilters,\n ),\n documentTypes: documentTypes\n .map(item => ({\n id: item.key,\n label: intl.formatMessage(listItemMsg('documenttype', item.key, item.value)),\n }))\n .sort(dynamicSort('label')),\n recognitionStatusses: recognitionStatusses\n .map(item => ({\n id: item.key,\n label: intl.formatMessage(listItemMsg('recognitionstatus', item.key, item.value)),\n }))\n .sort(dynamicSort('label')),\n emailStatusses: emailStatusses\n .map(item => ({\n id: item.key,\n label: intl.formatMessage(listItemMsg('combinedEmailStatus', item.key, item.value)),\n }))\n .sort(dynamicSort('label')),\n signingStatusses: signingStatusses\n .filter(x => relevantSigningStatuses.includes(x.key))\n .map(item => ({\n id: item.key,\n label: intl.formatMessage(listItemMsg('signingStatus', item.key, item.value)),\n }))\n .sort(dynamicSort('id')),\n tags: (tags || []).map(x => ({ ...x, label: x.name })).sort(dynamicSort('label')),\n });\n },\n );\n }\n\n dynamicFilterChanged = (item, selected) => {\n const { dynamicFilters } = this.state;\n const { filters } = this.props;\n\n const newFilters = dynamicFilters.map(x => {\n if (x.id !== item.id && item.id !== 'selectall') return x;\n return { ...x, selected };\n });\n\n userStorage.setItem(\n dynamicFiltersStorageKey,\n newFilters.filter(x => x.selected).map(x => x.id),\n );\n this.setState({\n dynamicFilters: newFilters,\n });\n\n if (!selected && JSON.stringify(filters[item.id]) !== JSON.stringify(defaultFilters[item.id])) {\n // Reset filter when it's removed\n this.filterChanged({ [item.id]: defaultFilters[item.id] });\n }\n };\n\n filterChanged = filter => {\n const { filters, onFilterChange } = this.props;\n const newFilters = { ...filters, ...filter };\n if (filters !== newFilters) onFilterChange(newFilters);\n };\n\n resetFilters = () => {\n const { onFilterChange } = this.props;\n onFilterChange({ ...defaultFilters });\n };\n\n setFilters = filters => {\n if (!!filters.dateFrom) filters.dateFrom = moment(filters.dateFrom)\n if (!!filters.dateUntil) filters.dateUntil = moment(filters.dateUntil)\n this.props.onFilterChange(filters)\n }\n\n deadlineFromChanged = value => {\n this.filterChanged({ deadlineFrom: value });\n };\n deadlineUntilChanged = value => {\n this.filterChanged({ deadlineUntil: value });\n };\n\n dateChanged = (startDate, endDate) => {\n this.filterChanged({ dateFrom: startDate, dateUntil: endDate, period: null });\n };\n\n relationChanged = item => {\n if (!item || !item.id) {\n this.filterChanged({ relationId: null, relationName: null, companyId: null });\n } else {\n this.filterChanged({\n relationId: item.key,\n relationName: item.label,\n companyId: item.companyId,\n });\n }\n };\n\n toggleNotLinkedtoRelation = () => {\n const { filters } = this.props;\n this.filterChanged({\n notLinkedToRelation: !filters.notLinkedToRelation,\n linkedToMultipleRelations: false,\n });\n };\n toggleLinkedToMultipleRelations = () => {\n const { filters } = this.props;\n this.filterChanged({\n linkedToMultipleRelations: !filters.linkedToMultipleRelations,\n notLinkedToRelation: false,\n });\n };\n\n setPeriod = period => {\n let dateFrom = null;\n let dateUntil = null;\n switch (period) {\n case 'all':\n case '':\n case null:\n case undefined:\n break;\n case 'month':\n case 'quarter':\n case 'year':\n dateFrom = moment.utc().startOf(period);\n dateUntil = moment.utc().endOf(period);\n break;\n case 'year-1':\n case 'year-2':\n case 'year-3':\n case 'year-4':\n case 'year-5': {\n const y = parseInt(period.substr(-1, 1));\n dateFrom = moment\n .utc()\n .startOf('year')\n .subtract(y, 'y');\n dateUntil = moment\n .utc()\n .endOf('year')\n .subtract(y, 'y');\n break;\n }\n default:\n console.debug(`Unknown period: ${period}`);\n return;\n }\n\n this.filterChanged({ dateFrom, dateUntil, period });\n };\n\n onDocumentTypeFilterAdded = selectedItem => {\n if (!selectedItem) return;\n\n const { filters } = this.props;\n const { documentTypes = [] } = filters;\n\n if (documentTypes.includes(selectedItem.id)) return;\n this.filterChanged({\n documentTypes: [...documentTypes, selectedItem.id],\n });\n };\n onDocumentTypeFilterRemoved = item => {\n const { filters } = this.props;\n const { documentTypes = [] } = filters;\n const index = documentTypes.findIndex(x => x === item.value.id);\n const copy = [...documentTypes];\n copy.splice(index, 1);\n this.filterChanged({ documentTypes: copy });\n };\n onRecognitionStatusFilterAdded = selectedItem => {\n if (!selectedItem) return;\n\n const { filters } = this.props;\n const { recognitionStatus = [] } = filters;\n\n if (recognitionStatus.includes(selectedItem.id)) return;\n this.filterChanged({\n recognitionStatus: [...recognitionStatus, selectedItem.id],\n });\n };\n onRecognitionStatusFilterRemoved = item => {\n const { filters } = this.props;\n const { recognitionStatus = [] } = filters;\n const index = recognitionStatus.findIndex(x => x === item.value.id);\n const copy = [...recognitionStatus];\n copy.splice(index, 1);\n\n this.filterChanged({ recognitionStatus: copy });\n };\n\n onEmailStatusFilterAdded = selectedItem => {\n if (!selectedItem) return;\n\n const { filters } = this.props;\n const { emailStatus = [] } = filters;\n\n if (emailStatus.includes(selectedItem.id)) return;\n this.filterChanged({\n emailStatus: [...emailStatus, selectedItem.id],\n });\n };\n onEmailStatusFilterRemoved = item => {\n const { filters } = this.props;\n const { emailStatus = [] } = filters;\n const index = emailStatus.findIndex(x => x === item.value.id);\n const copy = [...emailStatus];\n copy.splice(index, 1);\n\n this.filterChanged({ emailStatus: copy });\n };\n\n onSigningStatusFilterAdded = selectedItem => {\n if (!selectedItem) return;\n\n const { filters } = this.props;\n const { signingStatus = [] } = filters;\n\n if (signingStatus.includes(selectedItem.id)) return;\n this.filterChanged({\n signingStatus: [...signingStatus, selectedItem.id],\n });\n };\n\n onSigningStatusFilterRemoved = item => {\n const { filters } = this.props;\n const { signingStatus = [] } = filters;\n const index = signingStatus.findIndex(x => x === item.value.id);\n const copy = [...signingStatus];\n copy.splice(index, 1);\n\n this.filterChanged({ signingStatus: copy });\n };\n\n onCreatedByChanged = user => {\n this.filterChanged({\n createdBy: user ? user.id : user,\n });\n };\n\n render() {\n const {\n documentTypes,\n recognitionStatusses,\n emailStatusses,\n signingStatusses,\n tags,\n dynamicFilters,\n } = this.state;\n const { filters, intl, selectionCount } = this.props;\n const defaultBtnClass = 'btn btn-default';\n\n let initRelation = null;\n if (filters.relationId) {\n initRelation = {\n key: filters.relationId,\n label: filters.relationName,\n invoiceStreamId: filters.invoiceStreamId,\n companyId: filters.companyId,\n };\n }\n\n const selectedDocumentTypes =\n documentTypes && filters.documentTypes\n ? documentTypes.filter(r => filters.documentTypes.includes(r.id))\n : [];\n const selectedRecognitionStatusses =\n recognitionStatusses && filters.recognitionStatus\n ? recognitionStatusses.filter(r => filters.recognitionStatus.includes(r.id))\n : [];\n const selectedEmailStatusses =\n emailStatusses && filters.emailStatus\n ? emailStatusses.filter(r => filters.emailStatus.includes(r.id))\n : [];\n const selectedSigningStatusses =\n signingStatusses && filters.signingStatus\n ? signingStatusses.filter(r => filters.signingStatus.includes(r.id))\n : [];\n\n const [withTagsSelection, withTagsAvailable] = splitMultiSelectItems(tags, filters.withTags);\n const [withoutTagsSelection, withoutTagsAvailable] = splitMultiSelectItems(\n tags,\n filters.withoutTags,\n );\n\n const year = new Date().getFullYear();\n const filtersWithoutSortOptions = { ...filters };\n delete filtersWithoutSortOptions.sort;\n delete filtersWithoutSortOptions.desc;\n delete filtersWithoutSortOptions.filterBehaviours;\n const hasFilters = JSON.stringify(filtersWithoutSortOptions) !== JSON.stringify(defaultFilters);\n\n const visibleFilters = dynamicFilters.filter(x => x.selected).map(x => x.id);\n\n const dropdownFilters = [\n {\n id: 'selectall',\n label: intl.formatMessage(messages.SelectAll),\n selected: !dynamicFilters.some(x => !x.selected),\n },\n ...dynamicFilters,\n ];\n\n return (\n <>\n
    \n
    \n
    \n this.dateChanged(startDate, endDate)}\n block\n />\n
    \n
    \n
    \n
    \n
    \n this.setPeriod('month')}\n type=\"button\"\n className={classnames(defaultBtnClass, { active: filters.period === 'month' })}\n >\n \n \n this.setPeriod('quarter')}\n type=\"button\"\n className={classnames(defaultBtnClass, { active: filters.period === 'quarter' })}\n >\n \n \n this.setPeriod('year')}\n type=\"button\"\n className={classnames(defaultBtnClass, { active: filters.period === 'year' })}\n >\n {year}\n \n this.setPeriod('year-1')}\n type=\"button\"\n className={classnames(defaultBtnClass, { active: filters.period === 'year-1' })}\n >\n {year - 1}\n \n this.setPeriod('year-2')}\n type=\"button\"\n className={classnames(defaultBtnClass, { active: filters.period === 'year-2' })}\n >\n {year - 2}\n \n this.setPeriod('year-3')}\n type=\"button\"\n className={classnames(defaultBtnClass, { active: filters.period === 'year-3' })}\n >\n {year - 3}\n \n this.setPeriod('year-4')}\n type=\"button\"\n className={classnames(defaultBtnClass, { active: filters.period === 'year-4' })}\n >\n {year - 4}\n \n this.setPeriod('year-5')}\n type=\"button\"\n className={classnames(defaultBtnClass, { active: filters.period === 'year-5' })}\n >\n {year - 5}\n \n this.setPeriod('all')}\n type=\"button\"\n className={classnames(defaultBtnClass, {\n active: !filters.dateFrom && !filters.dateUntil,\n })}\n >\n \n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n {\n document.activeElement.blur();\n this.filterChanged({\n includeEmails: !filters.includeEmails,\n });\n }}\n type=\"button\"\n title={intl.formatMessage(messages.IncludeEmailsTooltip)}\n className={classnames(defaultBtnClass, { active: filters.includeEmails })}\n >\n \n \n \n {\n document.activeElement.blur();\n this.filterChanged({\n includeAttachments: !filters.includeAttachments,\n });\n }}\n type=\"button\"\n title={intl.formatMessage(messages.IncludeAttachmentsTooltip)}\n className={classnames(defaultBtnClass, { active: filters.includeAttachments })}\n >\n \n \n \n {\n document.activeElement.blur();\n this.filterChanged({\n includeInvoices: !filters.includeInvoices,\n });\n }}\n type=\"button\"\n title={intl.formatMessage(messages.IncludeInvoicesTooltip)}\n className={classnames(defaultBtnClass, { active: filters.includeInvoices })}\n >\n \n \n \n
    \n
    \n
    \n\n
    \n
    \n
    \n {\n document.activeElement.blur();\n this.toggleNotLinkedtoRelation();\n }}\n type=\"button\"\n title={intl.formatMessage(messages.NotLinkedToARelation)}\n className={classnames('btn btn-default', {\n active: filters.notLinkedToRelation,\n })}\n >\n {intl.formatMessage(messages.NotLinkedToARelationShort)}\n \n\n {\n document.activeElement.blur();\n this.toggleLinkedToMultipleRelations();\n }}\n type=\"button\"\n title={intl.formatMessage(messages.LinkedToMultipleRelations)}\n className={classnames('btn btn-default', {\n active: filters.linkedToMultipleRelations,\n })}\n >\n {intl.formatMessage(messages.LinkedToMultipleRelationsShort)}\n \n
    \n
    \n
    \n\n
    \n
    \n this.filterChanged({ search: value })}\n />\n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n \n
    \n
    \n {/*
    */}\n {/*
    */}\n
    \n
    \n \n
    \n
    \n
    \n
    \n \n
    \n
    \n {tags && tags.length > 0 ? (\n \n
    \n
    \n \n this.filterChanged({\n withTags: removeMultiSelectItem(filters.withTags, item),\n })\n }\n onItemSelected={item =>\n this.filterChanged({\n withTags: addMultiSelectItem(filters.withTags, item),\n })\n }\n items={withTagsAvailable}\n placeholder={intl.formatMessage(messages.WithDocumentTags)}\n onFilterBehaviourChanged={filterBehaviour => {\n this.filterChanged({\n filterBehaviours: {\n withTags: filterBehaviour,\n },\n });\n }}\n filterBehaviour={filters.filterBehaviours?.withTags}\n withFilterBehaviour\n />\n
    \n
    \n
    \n
    \n \n this.filterChanged({\n withoutTags: removeMultiSelectItem(filters.withoutTags, item),\n })\n }\n onItemSelected={item =>\n this.filterChanged({\n withoutTags: addMultiSelectItem(filters.withoutTags, item),\n })\n }\n items={withoutTagsAvailable}\n placeholder={intl.formatMessage(messages.WithoutDocumentTags)}\n />\n
    \n
    \n
    \n ) : null}\n \n
    \n
    \n this.filterChanged({ ownCompanies: companies })}\n />\n
    \n
    \n
    \n
    \n {visibleFilters && visibleFilters.length > 0 ? (\n
    \n {visibleFilters.map(id => (\n \n ))}\n
    \n ) : null}\n
    \n
    \n this.resetFilters()}\n setFilter={filter => this.setFilters(filter)}\n />\n \n \n \n \n \n \n \n {hasFilters && (\n this.resetFilters()}\n >\n \n  \n \n \n )}\n\n
    \n
    {selectionCount}
    \n
    \n \n );\n }\n}\n\nexport default injectIntl(DocumentFilters);\n","import { defineMessages } from 'react-intl';\n\nconst messages = defineMessages({\n NoPreviewAvailableForThisDocument: 'No preview available for this document.',\n FirstName: 'First name',\n LastName: 'Last name',\n DateOfBirth: 'Date of birth',\n Nationality: 'Nationality',\n Gender: 'Gender',\n PlaceOfBirth: 'Place of birth',\n NationalNumber: 'NationalNumber',\n Address: 'Address',\n Male: 'Male',\n Female: 'Female',\n ExpiryDate: 'Expiry date',\n});\n\nexport default messages;\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { useEffect, useState } from 'react';\nexport var HtmlViewer = function (_a) {\n var filePath = _a.filePath, storageType = _a.storageType;\n var _b = useState(null), fetchedData = _b[0], setFetchedData = _b[1];\n useEffect(function () {\n if (storageType === 1) {\n fetch(filePath)\n .then(function (x) { return x.text(); })\n .then(function (x) { return setFetchedData(x); });\n }\n }, [filePath, storageType]);\n if (storageType === 1) {\n return (_jsx(\"iframe\", { title: \"HTML Preview\", sandbox: \"\", style: { border: 'none', width: '100%', height: '100%' }, srcDoc: fetchedData }));\n }\n return (_jsx(\"iframe\", { title: \"HTML Preview\", sandbox: \"\", style: { border: 'none', width: '100%', height: '100%' }, src: filePath }));\n};\nexport default HtmlViewer;\n","import React, { Component } from 'react';\n\nimport Error from './error';\nimport LoadingAnimation from '@/shared/components/LoadingAnimation';\n\nfunction withFetching(WrappedComponent, { responseType } = {}) {\n return class WithFetching extends Component {\n constructor(props) {\n super(props);\n this.state = {};\n this.xhr = this.createRequest(props.filePath);\n }\n\n componentDidMount() {\n try {\n this.fetch();\n } catch (e) {\n const { onError } = this.props;\n if (onError) {\n onError(e);\n }\n this.setState({ error: 'fetch error' });\n }\n }\n\n componentWillUnmount() {\n this.abort();\n }\n\n render() {\n if (!this.xhr) {\n return

    CORS not supported..

    ;\n }\n const { error, data } = this.state;\n\n if (error) {\n return ;\n }\n\n if (data) {\n return ;\n }\n return ;\n }\n\n createRequest(path) {\n let xhr = new XMLHttpRequest();\n\n if ('withCredentials' in xhr) {\n // XHR for Chrome/Firefox/Opera/Safari.\n xhr.open('GET', path, true);\n } else if (typeof XDomainRequest !== 'undefined') {\n // XDomainRequest for IE.\n xhr = new XDomainRequest();\n xhr.open('GET', path);\n } else {\n // CORS not supported.\n xhr = null;\n return null;\n }\n if (responseType) {\n xhr.responseType = responseType;\n }\n\n xhr.onload = () => {\n if (xhr.status >= 400) {\n this.setState({ error: `fetch error with status ${xhr.status}` });\n return;\n }\n const resp = responseType ? xhr.response : xhr.responseText;\n\n this.setState({ data: resp });\n };\n\n return xhr;\n }\n\n fetch() {\n this.xhr.send();\n }\n\n abort() {\n if (this.xhr) {\n this.xhr.abort();\n }\n }\n };\n}\n\nexport default withFetching;\n","// Copyright (c) 2017 PlanGrid, Inc.\n\nimport React, { Component } from 'react';\n\nimport ReactDataGrid from 'react-data-grid';\nimport CSV from 'comma-separated-values';\n\nclass CsvViewer extends Component {\n static parse(data) {\n const rows = [];\n const columns = [];\n new CSV(data).forEach(array => {\n if (columns.length < 1) {\n array.forEach((cell, idx) => {\n columns.push({\n key: `key-${idx}`,\n name: cell,\n resizable: true,\n sortable: false,\n filterable: false,\n });\n });\n } else {\n const row = {};\n array.forEach((cell, idx) => {\n row[`key-${idx}`] = cell;\n });\n rows.push(row);\n }\n });\n\n return { rows, columns };\n }\n\n constructor(props) {\n super(props);\n this.state = CsvViewer.parse(props.data);\n }\n\n render() {\n const { rows, columns } = this.state;\n return (\n rows[i]}\n minHeight={this.props.height || 650}\n />\n );\n }\n}\n\nexport default CsvViewer;\n","import React, { Component } from 'react';\nimport beautify from 'xml-beautifier';\n\nclass XmlViewer extends Component {\n render() {\n const { data } = this.props;\n const beautified = beautify(data);\n return
    {beautified}
    ;\n }\n}\n\nexport default XmlViewer;\n","import React, { Component } from 'react';\n\nimport LoadingAnimation from '@/shared/components/LoadingAnimation';\n\nexport default class PhotoViewer extends Component {\n render() {\n const { filePath } = this.props;\n if (!filePath) {\n return ;\n }\n\n return ;\n }\n}\n","// Copyright (c) 2017 PlanGrid, Inc.\n\nimport React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport messages from '../fileViewerMessages';\n\nconst UnsupportedViewer = () => (\n
    \n
    \n

    \n \n \n \n

    \n
    \n
    \n);\n\nexport default UnsupportedViewer;\n","// Copyright (c) 2017 PlanGrid, Inc.\n\nimport React, { Component } from 'react';\n\nimport LoadingAnimation from '@/shared/components/LoadingAnimation';\n\nclass VideoViewer extends Component {\n state = {\n loading: true,\n };\n\n onCanPlay() {\n this.setState({ loading: false });\n }\n\n renderLoading() {\n if (this.state.loading) {\n return ;\n }\n return null;\n }\n\n render() {\n const { loading } = this.state;\n const { mimeType, filePath, fileName } = this.props;\n const visibility = loading ? 'hidden' : 'visible';\n return (\n
    \n
    \n {this.renderLoading()}\n this.onCanPlay(e)}\n src={filePath}\n type={mimeType}\n >\n \n\n

    Video playback is not supported by your browser.

    \n \n
    \n
    \n );\n }\n}\n\nexport default VideoViewer;\n","import React, { Component } from 'react';\nimport moment from 'moment';\nimport { FormattedMessage, FormattedDate } from 'react-intl';\nimport messages from '../fileViewerMessages';\nimport FormattedDateShort from \"../../FormattedDateShort\";\n\nclass EidViewer extends Component {\n parseEid = xml => {\n try {\n const parser = new DOMParser();\n const xmlDoc = parser.parseFromString(xml, 'text/xml');\n const identity = xmlDoc.getElementsByTagName('identity')[0];\n\n const cardInformation = {};\n\n cardInformation.lastName = identity.getElementsByTagName('name')[0].childNodes[0].nodeValue;\n cardInformation.firstName = identity.getElementsByTagName(\n 'firstname',\n )[0].childNodes[0].nodeValue;\n cardInformation.nationality = identity.getElementsByTagName(\n 'nationality',\n )[0].childNodes[0].nodeValue;\n cardInformation.placeOfBirth = identity.getElementsByTagName(\n 'placeofbirth',\n )[0].childNodes[0].nodeValue;\n cardInformation.nationalNumber = identity.getAttribute('nationalnumber');\n cardInformation.gender = identity.getAttribute('gender');\n cardInformation.dateOfBirth = moment(identity.getAttribute('dateofbirth')).toDate();\n cardInformation.cardNumber = xmlDoc\n .getElementsByTagName('card')[0]\n .getAttribute('cardnumber');\n cardInformation.cardExpiryDate = moment(\n xmlDoc.getElementsByTagName('card')[0].getAttribute('validitydateend'),\n ).toDate();\n cardInformation.street = xmlDoc\n .getElementsByTagName('address')[0]\n .getElementsByTagName('streetandnumber')[0].childNodes[0].nodeValue;\n cardInformation.zip = xmlDoc\n .getElementsByTagName('address')[0]\n .getElementsByTagName('zip')[0].childNodes[0].nodeValue;\n cardInformation.city = xmlDoc\n .getElementsByTagName('address')[0]\n .getElementsByTagName('municipality')[0].childNodes[0].nodeValue;\n cardInformation.photo = identity.getElementsByTagName('photo')[0].childNodes[0].nodeValue;\n return cardInformation;\n } catch (error) {\n console.error(error);\n return null;\n }\n };\n\n render() {\n const { data } = this.props;\n const cardInformation = this.parseEid(data);\n // console.log(cardInformation);\n\n if (!cardInformation) {\n return ;\n }\n\n return (\n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n \n \n \n \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n \n \n \n \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n \n \n \n \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n \n \n \n \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n \n \n \n \n \n
    \n
    \n {cardInformation.gender === 'male' && (\n \n )}\n {cardInformation.gender === 'female' && (\n \n )}\n
    \n
    \n
    \n
    \n \n \n \n \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n \n \n \n \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n \n \n \n \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n \n \n \n \n \n
    \n
    \n \n
    \n
    \n
    \n
     
    \n
    \n \n  \n \n  \n
    \n
    \n
    \n
    \n
    \n );\n }\n}\n\nexport default EidViewer;\n","import React, { Component } from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport config from '@/config';\nimport api from '@/shared/api';\nimport messages from '../fileViewerMessages';\nimport LoadingAnimation from '@/shared/components/LoadingAnimation';\n\nclass OutlookMsgViewer extends Component {\n state = {\n emailHtml: undefined,\n };\n\n retrieveMsgPreview(documentId) {\n this.setState({ loading: true });\n\n api.base.get(`${config.appUrls.documents}/api/emails/PreviewMsg/${documentId}`).then(\n ({ data }) => {\n this.setState({ emailHtml: data, loading: false });\n },\n error => {\n this.setState({ loading: false });\n console.error(error);\n },\n );\n }\n\n componentDidMount() {\n const { documentId } = this.props;\n this.retrieveMsgPreview(documentId);\n }\n\n render() {\n const { emailHtml, loading } = this.state;\n if (!emailHtml && !loading) {\n return ;\n }\n if (loading) {\n return ;\n }\n\n return (\n \n );\n }\n}\n\nexport default OutlookMsgViewer;\n","import React, { Component } from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport config from '@/config';\nimport api from '@/shared/api';\nimport messages from '../fileViewerMessages';\nimport LoadingAnimation from '@/shared/components/LoadingAnimation';\n\nclass EmlViewer extends Component {\n state = {\n emailHtml: undefined,\n };\n\n retrievePreview(documentId) {\n this.setState({ loading: true });\n\n api.base.get(`${config.appUrls.documents}/api/emails/PreviewEml/${documentId}`).then(\n ({ data }) => {\n this.setState({ emailHtml: data, loading: false });\n },\n error => {\n this.setState({ loading: false });\n console.error(error);\n },\n );\n }\n\n componentDidMount() {\n const { documentId } = this.props;\n this.retrievePreview(documentId);\n }\n\n render() {\n const { emailHtml, loading } = this.state;\n if (!emailHtml && !loading) {\n return ;\n }\n if (loading) {\n return ;\n }\n\n return (\n \n );\n }\n}\n\nexport default EmlViewer;\n","import React, { Component } from 'react';\nimport LoadingAnimation from '@/shared/components/LoadingAnimation';\n\nclass AudioViewer extends Component {\n state = {\n loading: true,\n };\n\n onCanPlay() {\n this.setState({ loading: false });\n }\n\n renderLoading() {\n if (this.state.loading) {\n return ;\n }\n return null;\n }\n\n render() {\n const { loading } = this.state;\n const { mimeType, filePath, fileName } = this.props;\n const visibility = loading ? 'hidden' : 'visible';\n return (\n
    \n
    \n {this.renderLoading()}\n this.onCanPlay(e)}\n src={filePath}\n type={mimeType}\n >\n \n

    Video playback is not supported by your browser.

    \n \n
    \n
    \n );\n }\n}\n\nexport default AudioViewer;\n","import config from '@/config';\n\nclass AdobeEmbedPdfViewer {\n constructor() {\n this.readyPromise = new Promise(resolve => {\n if (window.AdobeDC) {\n resolve();\n } else {\n document.addEventListener('adobe_dc_view_sdk.ready', () => {\n resolve();\n });\n }\n });\n this.adobeDCView = undefined;\n }\n\n ready() {\n return this.readyPromise;\n }\n\n previewFile(divId, viewerConfig, url, fileName, locale) {\n // the clientId is defined per domain (including any subdomains). This means we have a different clientId for app.adminpulse.be, app.adminpulse.nl and also one for localhost\n // the clients can be found at https://developer.adobe.com/console/projects (login with support@adminpulse.be)\n const clientId = config.appUrls.app.endsWith('.nl')\n ? 'b0e72949c25f43caa10f79632271eef0'\n : config.appUrls.app.endsWith('.be')\n ? 'b33a485daf9a425ab59a2b013025df62'\n : 'cf39a1ceb2b3418da6c415a6a76233d1';\n\n const adobeEmbedConfig = {\n clientId,\n divId,\n locale: locale.includes('nl') ? 'nl-NL' : locale.includes('fr') ? 'fr-FR' : 'en-US',\n };\n\n this.adobeDCView = new window.AdobeDC.View(adobeEmbedConfig);\n\n return this.adobeDCView.previewFile(\n {\n content: {\n location: {\n url,\n },\n },\n metaData: {\n fileName: fileName ?? 'preview.pdf',\n },\n },\n viewerConfig,\n );\n }\n}\nexport default AdobeEmbedPdfViewer;\n","import React from 'react';\nimport { injectIntl } from 'react-intl';\nimport AdobeEmbedPdfViewer from './AdobeEmbedPdfViewer';\n\nclass EmbeddableDocumentViewer extends React.Component {\n pdfViewerRef = null;\n\n constructor(props) {\n super(props);\n this.pdfViewerRef = React.createRef();\n }\n\n componentDidMount() {\n if (this.pdfViewerRef?.current) {\n this.loadPDF();\n }\n }\n\n loadPDF = () => {\n const { filePath, fileName, intl } = this.props;\n\n const viewer = new AdobeEmbedPdfViewer();\n viewer.ready().then(() => {\n viewer.previewFile(\n 'adobe-dc-view',\n {\n showPrintPDF: true,\n showZoomControl: true,\n showAnnotationTools: false,\n showLeftHandPanel: false,\n showPageControls: false,\n showDownloadPDF: false,\n enableFormFilling: false,\n showThumbnails: false,\n embedMode: 'FULL_WINDOW',\n },\n filePath,\n fileName,\n intl.locale,\n );\n });\n };\n\n render() {\n const { filePath, mimeType, storageType } = this.props;\n const isPdf = mimeType === 'application/pdf';\n\n return isPdf ? (\n
    \n ) : (\n \n );\n }\n}\nexport default injectIntl(EmbeddableDocumentViewer);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport withFetching from './WithFetching';\n\nimport HtmlViewer from './viewers/HtmlViewer';\nimport CsvViewer from './viewers/CsvViewer';\nimport TextViewer from './viewers/TextViewer';\nimport PhotoViewer from './viewers/PhotoViewer';\nimport VideoViewer from './viewers/VideoViewer';\nimport UnsupportedViewer from './viewers/UnsupportedViewer';\nimport EidViewer from './viewers/EidViewer';\nimport OutlookMsgViewer from './viewers/OutlookMsgViewer';\nimport EmlViewer from './viewers/EmlViewer';\nimport AudioViewer from './viewers/AudioViewer';\nimport EmbeddableDocumentViewer from './viewers/EmbeddableDocumentViewer';\n\nconst getExtensionFromName = fileName => {\n if (!fileName) return null;\n const lastDot = fileName.lastIndexOf('.');\n if (lastDot < 0) return null;\n return fileName.substring(lastDot + 1);\n};\n\nconst normalEmbeddedMimeTypes = [\n 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n 'application/vnd.ms-excel',\n 'application/vnd.ms-excel.sheet.macroenabled.12',\n 'application/pdf',\n 'application/msword',\n 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\n 'application/vnd.ms-powerpoint',\n 'application/vnd.openxmlformats-officedocument.presentationml.presentation',\n];\n\nclass FileViewer extends Component {\n state = {};\n\n constructor(props) {\n super(props);\n this.currentMimeType = props.mimeType;\n }\n shouldComponentUpdate(nextProps) {\n // Detect if viewer should render\n const {\n documentType: oldDocumentType,\n mimeType: oldMimeType,\n filePath: oldFilePath,\n fileName: oldFileName,\n } = this.props;\n const {\n documentType: newDocumentType,\n mimeType: newMimeType,\n filePath: newFilePath,\n fileName: newFileName,\n } = nextProps;\n\n if ((oldDocumentType === 10 || newDocumentType === 10) && oldDocumentType !== newDocumentType)\n return true;\n\n if (oldFilePath !== newFilePath) return true;\n if (oldMimeType !== newMimeType) return true;\n const oldExtension = getExtensionFromName(oldFileName);\n const newExtension = getExtensionFromName(newFileName);\n if (oldExtension !== newExtension) return true;\n\n return false;\n }\n\n componentDidMount() {\n const container = document.getElementById('pg-viewer');\n const height = container ? container.clientHeight : 0;\n const width = container ? container.clientWidth : 0;\n this.setState({ height, width });\n }\n\n getDriver() {\n const { documentType, mimeType, filePath, fileName, storageType } = this.props;\n const isEmbeddableMimeType = normalEmbeddedMimeTypes.indexOf(mimeType) > -1;\n\n if (filePath === null) {\n return UnsupportedViewer;\n }\n const extension = getExtensionFromName(fileName);\n\n // Render viewers based on custom document types first, such as eid\n if (documentType === 10 && extension === 'eid') {\n return withFetching(EidViewer);\n }\n\n if (extension && extension === 'msg') {\n return OutlookMsgViewer;\n }\n if (extension && extension === 'eml') {\n return EmlViewer;\n }\n\n // do this to avoid re-triggering fetch calls when the mime type doesn't change in the parent component due to state changes there.\n if (this.Driver && this.currentMimeType === mimeType) {\n return this.Driver;\n }\n\n if (isEmbeddableMimeType) {\n return EmbeddableDocumentViewer;\n }\n\n this.currentMimeType = mimeType;\n\n switch (this.currentMimeType.toLowerCase()) {\n case 'text/csv':\n return withFetching(CsvViewer);\n case 'text/html':\n return HtmlViewer;\n case 'image/jpg':\n case 'image/jpeg':\n case 'image/png':\n case 'image/bmp':\n case 'image/gif':\n return PhotoViewer;\n case 'application/xml':\n case 'text/plain':\n return withFetching(TextViewer);\n case 'video/webm':\n case 'video/mp4':\n return VideoViewer;\n case 'audio/wav':\n case 'audio/mpeg':\n case 'audio/mp4':\n return AudioViewer;\n default:\n return UnsupportedViewer;\n }\n }\n\n render() {\n const { width, height } = this.state;\n\n this.Driver = this.getDriver();\n\n return this.Driver && ;\n }\n}\n\nFileViewer.propTypes = {\n mimeType: PropTypes.string.isRequired,\n filePath: PropTypes.string.isRequired, // Download path\n fileName: PropTypes.string.isRequired, // File name\n unsupportedComponent: PropTypes.element,\n storageType: PropTypes.number.isRequired,\n};\n\nFileViewer.defaultProps = {\n unsupportedComponent: null,\n};\n\nexport default FileViewer;\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\n/*\n * Hidden file input\n */\nfunction SimpleFileUpload({ children, multiple, accept, onUpload, disabled, className }) {\n let inputRef = null;\n const handleClick = () => {\n if (disabled) return;\n if (inputRef) inputRef.click();\n };\n\n return (\n <>\n {\n inputRef = e;\n }}\n multiple={multiple}\n accept={accept}\n // required to allow the control to be used more than once without refresh of entire page\n onClick={e => (e.target.value = '')}\n onChange={e => onUpload(e.target.files)}\n />\n {typeof children === 'function' ? (\n children({ onClick: handleClick })\n ) : (\n handleClick()}\n disabled={disabled}\n className={className}\n >\n {children}\n \n )}\n \n );\n}\nSimpleFileUpload.propTypes = {\n onUpload: PropTypes.func.isRequired,\n children: PropTypes.oneOfType([PropTypes.func, PropTypes.node]).isRequired, // Render function (with onClick) or node\n\n multiple: PropTypes.bool, // Upload multiple files\n accept: PropTypes.string, // Filter files https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept,\n disabled: PropTypes.bool,\n className: PropTypes.string,\n};\n\nSimpleFileUpload.defaultProps = {\n multiple: false,\n accept: null,\n disabled: false,\n className: 'btn btn-xs btn-icon',\n};\n\nexport default SimpleFileUpload;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport dateFormatService from \"../services/DateFormatService\";\n\nconst FormattedDateTime = ({ value }) => {\n\n const stringValue = value instanceof Date ? value.toISOString() : value;\n\n return {dateFormatService.formatDateWithTime(stringValue)};\n}\n\nFormattedDateTime.propTypes = {\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Date)]).isRequired,\n};\n\nexport default FormattedDateTime;\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport React, { useContext, useMemo } from 'react';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport AuthService from '../services/AuthService';\nexport var DataContext = React.createContext(null);\nexport var useDataContext = function () {\n var ctx = useContext(DataContext);\n if (!ctx) {\n throw new Error('Wrap app with DataProvider');\n }\n return ctx;\n};\nvar DataProvider = function (_a) {\n var children = _a.children;\n var getUsers = useMemo(function () { return DataCacheService.getUsers(); }, []);\n var getDefaultCompany = useMemo(function () { return DataCacheService.getDefaultCompany(); }, []);\n var getCurrentUserId = useMemo(function () { return AuthService.getUserId(); }, []);\n var getUserLanguage = useMemo(function () { return DataCacheService.getUserLanguage(getCurrentUserId); }, [\n getCurrentUserId,\n ]);\n var getCompanies = useMemo(function () {\n var _a;\n return (_a = DataCacheService.getDataCache()) === null || _a === void 0 ? void 0 : _a.company.map(function (_a) {\n var id = _a.id, name = _a.name;\n return ({ id: id, name: name });\n }).sort(dynamicSort('name'));\n }, []);\n var value = useMemo(function () { return ({\n users: getUsers,\n defaultCompany: getDefaultCompany,\n currentUserId: getCurrentUserId,\n userLanguage: getUserLanguage,\n companies: getCompanies,\n }); }, [getDefaultCompany, getUsers, getCurrentUserId, getUserLanguage, getCompanies]);\n return _jsx(DataContext.Provider, __assign({ value: value }, { children: children }));\n};\nexport default DataProvider;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { defineMessages } from 'react-intl';\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport log from 'loglevel';\nimport intlShape from '@/shared/utils/intlShape';\nimport ToastrService from '@/shared/services/ToastrService';\nimport EmailEditor from '@/shared/components/EmailEditor';\nimport { injectStateService } from '@/shared/services/StateService';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport moment from 'moment';\nimport LoadingAnimation from '../LoadingAnimation';\n\nconst messages = defineMessages({\n SelectRelationToRetrieveAddresses: 'Select a relation to retrieve addresses',\n Relation: 'Relation',\n Forward: 'Forward',\n EmailSent: 'Email sent',\n EmailContentRequired: 'The email must have content.',\n MsgEmailAttachmentUploadFailed: 'An error occurred when uploading the email attachment',\n NoEmailTemplateFoundInLanguage: 'No email template was found in {language}',\n SendEmail: 'Send email',\n SendTo: 'To',\n AddEmailAddress: 'Add email address',\n RemoveEmailAddress: 'Remove email address',\n Cc: 'CC',\n Bcc: 'BCC',\n msgInvalidEmailAddress: 'Invalid email address',\n SubjectBodyRecipientsAreRequired: 'Subject, body and recipients are required.',\n Reply:'Reply'\n});\n\nclass ReplyToEmailModal extends Component {\n state = {\n email: undefined,\n tags: [],\n to: [],\n cc: [],\n bcc: [],\n emailAttachments: [],\n };\n\n componentDidMount() {\n this.form = React.createRef();\n this.initializeModal();\n }\n\n static propTypes = {\n intl: intlShape.isRequired,\n onClose: PropTypes.func.isRequired,\n show: PropTypes.bool,\n documentId: PropTypes.string.isRequired,\n replyAll: PropTypes.bool.isRequired,\n };\n\n static defaultProps = {\n show: false,\n };\n\n initializeModal = () => {\n const { documentId, intl, replyAll } = this.props;\n\n const emailContentPromise = api.base.get(\n `${config.appUrls.documents}/api/emails/ReplyToInfo/${documentId}?replyAll=${replyAll}`,\n );\n\n this.setState({ loading: true });\n Promise.all([emailContentPromise])\n .then(([{ data: forwardInfo }]) => {\n this.setState({\n loading: false,\n to: forwardInfo.to,\n cc: forwardInfo.cc,\n bcc: forwardInfo.bcc,\n companyId: forwardInfo.companyId,\n tags: forwardInfo.tags,\n relations: forwardInfo.relations,\n email: {\n title: forwardInfo.subject,\n initialValue: forwardInfo.content,\n content: forwardInfo.content,\n documentDate: moment.utc(),\n },\n emailAttachments: [],\n });\n })\n .catch(err => {\n handleHttpError(intl)(err);\n this.setState({ loading: false });\n });\n };\n\n validateEmail = value => {\n if (!value) return false;\n return /^[^@]+@.+\\..+$/.test(value);\n };\n\n onSave = () => {\n const {\n email,\n emailAttachments,\n to,\n cc,\n bcc,\n selectedTemplate,\n companyId,\n tags,\n relations,\n } = this.state;\n const { intl } = this.props;\n const isFormValid = this.validate();\n\n for (let j = 0; j < to.length; j++) {\n if (!this.validateEmail(to[j])) {\n ToastrService.error(intl.formatMessage(messages.msgInvalidEmailAddress));\n return false;\n }\n }\n\n for (let j = 0; j < cc.length; j++) {\n if (!this.validateEmail(cc[j])) {\n ToastrService.error(intl.formatMessage(messages.msgInvalidEmailAddress));\n return false;\n }\n }\n\n for (let j = 0; j < bcc.length; j++) {\n if (!this.validateEmail(bcc[j])) {\n ToastrService.error(intl.formatMessage(messages.msgInvalidEmailAddress));\n return false;\n }\n }\n\n let invalidEmailBody = false;\n\n if (\n !email.content ||\n // regex to remove line breaks\n email.content.replace(/(\\r\\n|\\n|\\r)/gm, '') === '

    '\n ) {\n invalidEmailBody = true;\n }\n\n if (invalidEmailBody || !isFormValid) {\n ToastrService.error(intl.formatMessage(messages.SubjectBodyRecipientsAreRequired));\n return Promise.reject(new Error('invalid form'));\n }\n\n const emailViewModel = {\n body: email.content,\n subject: email.title,\n to,\n cc,\n bcc,\n attachmentDocumentIds: emailAttachments.map(x => x.id) || [],\n relationIds: relations,\n companyId,\n emailLinkType: 4,\n documentDate: email.documentDate,\n emailTemplateId: selectedTemplate,\n tags,\n };\n\n return api.base\n .post(`${config.appUrls.documents}/api/emails/CreateAndSend`, emailViewModel)\n .then(() => {\n ToastrService.info(intl.formatMessage(messages.EmailSent));\n this.closeModal();\n })\n .catch(handleHttpError(intl));\n };\n\n closeModal = () => {\n const { onClose } = this.props;\n onClose();\n };\n\n emailTitleChanged = title => {\n const { email } = this.state;\n\n this.setState({\n email: {\n ...email,\n title,\n },\n });\n };\n\n onEditorStateChange = content => {\n const { email } = this.state;\n this.setState({\n email: {\n ...email,\n content,\n },\n });\n };\n\n renderSingleEmail = email => {\n const documentUploadEndpoint = `${config.appUrls.documents}/api/documents?documentType=9&informQueues=false&recognitionStatus=4`;\n const { emailAttachments } = this.state;\n return (\n this.emailTitleChanged(title)}\n initialValue={email.initialValue}\n onContentChanged={content => this.onEditorStateChange(content)}\n onAttachmentUploaded={(error, file) => this.onDocumentUploaded(error, file)}\n attachmentUploadEndpoint={documentUploadEndpoint}\n attachments={emailAttachments}\n onDeleteAttachment={this.deleteAttachment}\n documentDate={email.documentDate}\n onDocumentDateChanged={documentDate =>\n this.setState({\n email: {\n ...email,\n documentDate,\n },\n })\n }\n />\n );\n };\n\n onDocumentUploaded = (error, document) => {\n const { intl } = this.props;\n\n if (error) {\n log.error(error);\n ToastrService.error(intl.formatMessage(messages.MsgEmailAttachmentUploadFailed));\n return;\n }\n\n const { emailAttachments } = this.state;\n\n if (emailAttachments.some(x => x.id === document.id)) return;\n\n this.setState(state => ({\n ...state,\n emailAttachments: [document, ...state.emailAttachments],\n }));\n };\n\n // when deleting an attachment when forwarding an email we wont delete the original attachment from our system but rather not send it with the new email\n deleteAttachment = attachment => {\n this.setState(state => ({\n emailAttachments: state.emailAttachments.filter(x => x.id !== attachment.id),\n }));\n };\n\n validate() {\n const { email } = this.state;\n if (!email) return false;\n if (!this.form || !this.form.current) return false;\n\n return this.form.current.reportValidity();\n }\n\n handleToChange = (e, index) => {\n const { to } = this.state;\n const newTo = to.map((x, index2) => {\n if (index !== index2) return x;\n return e.target.value;\n });\n this.setState({ to: newTo });\n };\n\n handleCcChange = (e, index) => {\n const { cc } = this.state;\n const newCc = cc.map((x, index2) => {\n if (index !== index2) return x;\n return e.target.value;\n });\n this.setState({ cc: newCc });\n };\n\n handleBccChange = (e, index) => {\n const { bcc } = this.state;\n const newBcc = bcc.map((x, index2) => {\n if (index !== index2) return x;\n return e.target.value;\n });\n this.setState({ bcc: newBcc });\n };\n\n render() {\n const { show, intl } = this.props;\n const { email, addresses, to, cc, bcc, loading, selectedRelation } = this.state;\n return (\n \n {show && (\n
    \n
    \n \n {addresses &&\n addresses.map(x => (\n \n ))}\n \n {loading && }\n {email && (\n \n
    \n \n
    \n {to &&\n to.map((x, index) => (\n
    \n
    \n this.handleToChange(e, index)}\n />\n
    \n \n {to.length > 1 && (\n \n this.setState(state => ({\n ...state,\n to: state.to.filter((_, i) => i !== index),\n }))\n }\n title={intl.formatMessage(messages.RemoveEmailAddress)}\n className=\"clickable\"\n >\n \n \n )}\n
    \n
    \n ))}\n
    \n \n this.setState(state => ({\n ...state,\n to: [...state.to, ''],\n }))\n }\n title={intl.formatMessage(messages.AddEmailAddress)}\n className=\"btn btn-default btn-xs\"\n >\n \n \n
    \n
    \n
    \n\n
    \n \n
    \n {cc &&\n cc.map((x, index) => (\n
    \n
    \n this.handleCcChange(e, index)}\n />\n
    \n \n \n this.setState(state => ({\n ...state,\n cc: state.cc.filter((_, i) => i !== index),\n }))\n }\n title={intl.formatMessage(messages.RemoveEmailAddress)}\n className=\"clickable\"\n >\n \n \n
    \n
    \n ))}\n
    \n \n this.setState(state => ({\n ...state,\n cc: [...state.cc, ''],\n }))\n }\n title={intl.formatMessage(messages.AddEmailAddress)}\n className=\"btn btn-default btn-xs\"\n >\n \n \n
    \n
    \n
    \n\n
    \n \n
    \n {bcc &&\n bcc.map((x, index) => (\n
    \n
    \n this.handleBccChange(e, index)}\n />\n
    \n \n \n this.setState(state => ({\n ...state,\n bcc: state.bcc.filter((_, i) => i !== index),\n }))\n }\n title={intl.formatMessage(messages.RemoveEmailAddress)}\n className=\"clickable\"\n >\n \n \n
    \n
    \n ))}\n
    \n \n this.setState(state => ({\n ...state,\n bcc: [...state.bcc, ''],\n }))\n }\n title={intl.formatMessage(messages.AddEmailAddress)}\n className=\"btn btn-default btn-xs\"\n >\n \n \n
    \n
    \n \n \n )}\n\n {email && this.renderSingleEmail(email)}\n \n \n )}\n \n );\n }\n}\nexport default injectStateService(ReplyToEmailModal);\n","import { defineMessages } from 'react-intl';\n\nconst messages = defineMessages({\n Date: 'Date',\n Registration: 'Registration',\n Relation: 'Relation',\n Distance: 'Distance',\n Assignment: 'Assignment',\n SelectAnAssignment: 'Select an assignment',\n What: 'What',\n SearchPriceListItem: 'Search pricelist item',\n NoPriceListItemsFound: 'No pricelist items found',\n Duration: 'Duration',\n DurationInDays: 'Duration in days',\n DurationInHours: 'Duration in hours',\n HalfDay: 'Half day',\n Morning: 'Morning',\n Afternoon: 'Afternoon',\n Days: 'Days',\n Hours: 'Hours',\n DefaultAssignment: 'Default assignment',\n Price: 'Price',\n Discount: 'Discount',\n Quantity: 'Quantity',\n VAT: 'VAT',\n SelectAVatPercentage: 'Select a VAT percentage',\n TotalExcl: 'Total excl.',\n Billable: 'Billable',\n Remark: 'Remark',\n InternalRemark: 'Internal remark',\n AddMinutes: 'Add {minutes} minutes',\n RoundToNearest5: 'Round to nearest 5',\n RoundToNearest10: 'Round to nearest 10',\n RoundToNearestQuarter: 'Round to nearest quarter',\n RoundToNearestX: 'Rount to nearest {minutes}',\n From: 'From',\n Until: 'Until',\n Registered: 'Registered',\n InForfait: 'In forfait',\n Time: 'Time',\n Cost: 'Cost',\n Task: 'Task',\n SelectASubtask: 'Select a subtask',\n SubTask: 'Sub task',\n RegistrationDurationPerRelation: '{minutes} minutes per relation will be registered.',\n RegistrationQuantityPerRelation: '{quantity}x {resource} per relation will be registered.',\n DurationPerRelationMinimum1MinuteWarning:\n 'You need to register at least 1 minute per relation ({minutes} in total)',\n RegistrationOutsideWorkingHoursWarning:\n 'Your working hours {startHour} - {endHour} will be used for these registrations.',\n PerRelationLowerCase: 'per relation',\n CreatePhoneCallTooltip:\n 'Click here and use the textbox on the right to register a report of your phone call. This phone call will be added to the timeline of the relation.',\n CreateNoteTooltip:\n 'Click here and use the textbox on the right to register a note. This note will be added to the timeline of the relation.',\n CreateMeetingReportTooltip:\n 'Click here and use the textbox on the right to register a meeting report. This meeting report will be added to the timeline of the relation.',\n InvoiceRemark: 'Invoice remark',\n RelationLanguage: 'Relation language',\n RegistrationModified: 'Registration modified',\n CommunicationReportTitle: 'Title communication report',\n CommunicationReportDescription: 'Description communication report',\n TotalDuration: 'Total duration',\n RemainingOvertimeHours: 'Remaining overtime hours',\n RemainingOvertimeHoursAfterSave: 'Remaining overtime after save',\n FillWith: 'Fill with',\n RegTimeFromTo: 'From-to',\n ReferenceYear: 'Reference year',\n ResourceFixedPriceTooltip: 'Resource with fixed price',\n AddRegistration: 'Add registration',\n EditRegistration: 'Edit registration',\n AddAbsence: 'Add absence',\n EditAbsence: 'Edit absence',\n AddRecuperation: 'Add recuperation',\n EditRecuperation: 'Edit recuperation',\n OwnCompany: 'Own company',\n AbsenceBalance: 'Absence balance',\n BalanceAfter: 'Balance after',\n User: 'User',\n SystemUser: 'System user',\n});\n\nexport default messages;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport intlShape from '@/shared/utils/intlShape';\nimport { mapInvoiceStreamName } from '@/shared/services/ObjectDisplayService';\nimport FormGroupPart from './FormGroupPart';\nimport { invoiceStreamShape } from '../registrationHelpers';\nimport messages from '../registrationMessages';\nimport { dynamicSortMultiple } from '../../../utils/dynamicSort';\n\nconst AssignmentFormGroup = ({ invoiceStreams, value, onChange, readOnly, disabled, intl }) => {\n if (!invoiceStreams || invoiceStreams.length <= 1) return null;\n\n if (readOnly) {\n const stream = invoiceStreams.find(x => x.id === value);\n return (\n
    \n \n {mapInvoiceStreamName(stream, intl)}\n \n
    \n );\n }\n const streams = invoiceStreams\n .filter(x => x.isActive || x.id === value)\n .map(x => ({ ...x, label: x.label || mapInvoiceStreamName(x, intl) }))\n .sort(dynamicSortMultiple('isActive', '-isMain', 'label'));\n\n return (\n
    \n \n onChange(e.target.value)}\n disabled={disabled}\n >\n {streams.map(x => (\n \n ))}\n \n \n
    \n );\n};\nAssignmentFormGroup.propTypes = {\n invoiceStreams: PropTypes.arrayOf(invoiceStreamShape),\n value: PropTypes.string, // InvoiceStreamId\n onChange: PropTypes.func,\n readOnly: PropTypes.bool,\n disabled: PropTypes.bool,\n intl: intlShape.isRequired,\n};\nAssignmentFormGroup.defaultProps = {\n invoiceStreams: [],\n value: null,\n onChange: () => {},\n readOnly: false,\n disabled: false,\n};\nexport default AssignmentFormGroup;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport InputGroupWrapper from '../../InputGroupWrapper';\nimport messages from '../registrationMessages';\nimport FormGroupPart from './FormGroupPart';\nimport NumberInput from '../../input/NumberInput';\n\nconst CostQuantityPart = ({ quantity, onChange, disabled, showValidation }) => (\n \n \n \n \n \n);\nCostQuantityPart.propTypes = {\n quantity: PropTypes.number,\n onChange: PropTypes.func.isRequired,\n disabled: PropTypes.bool,\n showValidation: PropTypes.bool,\n};\nCostQuantityPart.defaultProps = {\n quantity: 0,\n disabled: false,\n showValidation: false,\n};\nexport default CostQuantityPart;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\n\nclass NumberInput extends Component {\n state = {\n invalidValue: null,\n };\n\n onInputChanged = val => {\n const { onChange, min, max, noDecimals } = this.props;\n let parsedValue = noDecimals ? Number.parseInt(val) : Number.parseFloat(val);\n if (Number.isNaN(parsedValue)) {\n this.setState({ invalidValue: val });\n onChange(null);\n } else {\n this.setState({ invalidValue: null });\n if (min !== null && !Number.isNaN(min) && min > parsedValue) parsedValue = min;\n if (max !== null && !Number.isNaN(max) && max < parsedValue) parsedValue = max;\n onChange(parsedValue);\n }\n };\n\n // Submit on blur\n handleBlur = () => {\n const { invalidValue } = this.state;\n const { onBlur, value, onChange } = this.props;\n if (invalidValue !== null) {\n this.setState({ invalidValue: null });\n onChange(value || 0);\n }\n onBlur();\n };\n\n render() {\n const { value, className, noDecimals, ...rest } = this.props;\n const { invalidValue } = this.state;\n const safePropValue = value == null ? '' : value;\n\n return (\n this.onInputChanged(e.target.value)}\n onBlur={this.handleBlur}\n className={classnames(className, 'form-control', {\n markedError: invalidValue !== null && invalidValue !== '',\n })}\n />\n );\n }\n}\nNumberInput.propTypes = {\n value: PropTypes.number,\n onChange: PropTypes.func.isRequired,\n onBlur: PropTypes.func,\n className: PropTypes.string,\n min: PropTypes.number,\n max: PropTypes.number,\n noDecimals: PropTypes.bool,\n};\n\nNumberInput.defaultProps = {\n value: 0,\n onBlur: () => {},\n className: '',\n min: null,\n max: null,\n noDecimals: false,\n};\nexport default NumberInput;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { momentObj } from 'react-moment-proptypes';\n\nimport DateInput from '@/shared/components/input/DateInput';\nimport moment from 'moment';\nimport intlShape from '@/shared/utils/intlShape';\nimport messages from '../registrationMessages';\nimport FormGroupPart from './FormGroupPart';\n\nconst DatePart = ({ value, onChange, showValidation, intl, disabled, inputCols }) => (\n \n onChange(moment.utc(date).toDate())}\n placeholder={intl.formatMessage(messages.Date)}\n disabled={disabled}\n />\n \n);\n\nDatePart.propTypes = {\n value: PropTypes.oneOfType([PropTypes.instanceOf(Date), momentObj]),\n onChange: PropTypes.func.isRequired,\n showValidation: PropTypes.bool,\n inputCols: PropTypes.string,\n intl: intlShape.isRequired,\n disabled: PropTypes.bool,\n};\nDatePart.defaultProps = {\n value: moment\n .utc()\n .startOf('day')\n .toDate(),\n showValidation: false,\n inputCols: 'col-sm-10',\n disabled: false,\n};\nexport default DatePart;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport InputGroupWrapper from '../../InputGroupWrapper';\nimport messages from '../registrationMessages';\nimport FormGroupPart from './FormGroupPart';\nimport NumberInput from '../../input/NumberInput';\n\nconst convertPercentage = val => {\n const parsedValue = parseFloat(val);\n if (Number.isNaN(parsedValue)) return null;\n return (Math.abs(parsedValue) / 100).round(4);\n};\n\nconst DiscountPart = ({ discount, onChange, disabled, className }) => (\n \n \n onChange(convertPercentage(value))}\n className=\"form-control input-sm\"\n />\n \n \n);\nDiscountPart.propTypes = {\n discount: PropTypes.number,\n onChange: PropTypes.func.isRequired,\n disabled: PropTypes.bool,\n className: PropTypes.string,\n};\nDiscountPart.defaultProps = {\n discount: 0,\n disabled: false,\n className: '',\n};\nexport default DiscountPart;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport messages from '../registrationMessages';\nimport intlShape from '@/shared/utils/intlShape';\n\nconst addMinutesChange = (duration, minutes) => duration + minutes;\nconst roundMinutesChange = (duration, minutes) => Math.round(duration / minutes, 10) * minutes;\nconst TimeButtons = ({\n addMinutes = [],\n roundMinutes = [],\n value,\n onChange,\n className,\n buttonClassName,\n disabled,\n intl,\n}) => (\n
    \n {addMinutes && addMinutes.length > 0\n ? addMinutes.map(x => {\n const id = `Add${x}Button`;\n\n return (\n {\n onChange(addMinutesChange(value, x));\n document.activeElement.blur();\n }}\n title={intl.formatMessage(messages.AddMinutes, { minutes: x })}\n >\n  +{x}' \n \n );\n })\n : null}\n {roundMinutes && roundMinutes.length > 0\n ? roundMinutes.map(x => {\n const id = `Round${x}Button`;\n\n return (\n {\n onChange(roundMinutesChange(value, x));\n document.activeElement.blur();\n }}\n title={intl.formatMessage(messages.RoundToNearestX, { minutes: x })}\n >\n  |{x}| \n \n );\n })\n : null}\n
    \n);\nTimeButtons.propTypes = {\n value: PropTypes.number,\n onChange: PropTypes.func.isRequired,\n intl: intlShape.isRequired,\n disabled: PropTypes.bool,\n addMinutes: PropTypes.arrayOf(PropTypes.number),\n roundMinutes: PropTypes.arrayOf(PropTypes.number),\n className: PropTypes.string,\n buttonClassName: PropTypes.string,\n};\nTimeButtons.defaultProps = {\n value: 0,\n disabled: false,\n addMinutes: [5, 10, 15],\n roundMinutes: [5, 10, 15],\n className: 'time-buttons-sm',\n buttonClassName: 'btn-xs btn-inverse',\n};\nexport default TimeButtons;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { IntlShape } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport TimeInput from '../../input/TimeInput';\nimport FormGroupPart from './FormGroupPart';\nimport TimeButtons from './TimeButtons';\n\nimport messages from '../registrationMessages';\n\nconst DurationFormGroup = ({ duration, onChange, disabled, intl, showValidation, max }) => (\n
    \n \n \n \n
    \n \n
    \n
    \n);\nDurationFormGroup.propTypes = {\n duration: PropTypes.number,\n onChange: PropTypes.func.isRequired,\n disabled: PropTypes.bool,\n max: PropTypes.number,\n showValidation: PropTypes.bool,\n intl: intlShape.isRequired,\n};\nDurationFormGroup.defaultProps = {\n duration: 0,\n disabled: false,\n showValidation: false,\n max: undefined,\n};\nexport default DurationFormGroup;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport moment from 'moment';\nimport momentPropTypes from 'react-moment-proptypes';\n\nimport DatePicker from './DatePicker';\nimport { isBeforeMinimum } from '../../utils/validationHelpers';\n\n// Same as datepicker, but only triggers onChange on valid date, or on blur\nclass DateInput extends Component {\n state = {\n isValid: true,\n };\n\n onDateChanged = val => {\n const { onChange } = this.props;\n if (!val) {\n this.setState({ isValid: false });\n } else {\n this.setState({ isValid: true });\n onChange(moment.utc(val));\n }\n };\n\n focusChanged = ({ focused }) => {\n if (!focused) {\n const { isValid } = this.state;\n const { onBlur } = this.props;\n if (!isValid) {\n // Will fall back to original value\n this.setState({ isValid: true, dateFocused: focused });\n } else {\n this.setState({ dateFocused: focused });\n }\n onBlur();\n } else {\n this.setState({ dateFocused: focused });\n }\n };\n\n render() {\n const { value, isOutsideRange, onChange, onBlur, ...rest } = this.props;\n const { isValid, dateFocused } = this.state;\n\n return (\n \n );\n }\n}\nDateInput.propTypes = {\n value: momentPropTypes.momentObj,\n onChange: PropTypes.func.isRequired,\n onBlur: PropTypes.func,\n isOutsideRange: PropTypes.func,\n};\n\nDateInput.defaultProps = {\n value: moment.utc().startOf('day'),\n onBlur: () => {},\n isOutsideRange: isBeforeMinimum,\n};\nexport default DateInput;\n","import React, { useEffect, useState } from 'react';\nimport Axios from 'axios';\nimport PropTypes from 'prop-types';\nimport { FormattedDate, FormattedMessage } from 'react-intl';\nimport { OverlayTrigger, Tooltip } from 'react-bootstrap';\nimport { FaCalendar } from 'react-icons/fa';\nimport intlShape from '@/shared/utils/intlShape';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport messages from '../registrationMessages';\n\nconst DurationDaysInfoPart = ({ duration, userId, date, isAfternoon, intl }) => {\n const [info, setInfo] = useState([]);\n useEffect(() => {\n let requestToken = null;\n const timeoutHandler = setTimeout(() => {\n requestToken = Axios.CancelToken.source();\n api.base\n .post(\n `${config.appUrls.api}/api/Registration/CalcDurationInDays`,\n { userId, date, durationDays: duration, isAfternoon },\n {\n cancelToken: requestToken.token,\n },\n )\n .then(({ data }) => {\n setInfo(data);\n })\n .catch(error => {\n if (!Axios.isCancel(error)) {\n handleHttpError(intl)(error);\n }\n });\n }, 500);\n return () => {\n clearTimeout(timeoutHandler);\n if (requestToken) requestToken.cancel('Operation canceled due to new request.');\n };\n }, [duration, userId, date, isAfternoon, intl]);\n const lastInfo = info.slice(-1).pop();\n return (\n
    \n \n  \n {lastInfo && lastInfo.date && (\n \n )}\n \n \n \n {info.map((x, i) => {\n if (i === 20 && info.length > 25)\n return (\n \n \n \n );\n if (i > 20 && i < info.length - 5) return null;\n return (\n \n \n \n \n );\n })}\n \n
    ...
    \n {intl.formatDate(x.date, {\n weekday: 'short',\n day: '2-digit',\n month: '2-digit',\n year: 'numeric',\n })}\n    \n {x.durationMinutes.minuteToTime()}
    \n \n }\n >\n \n \n \n \n
    \n );\n};\nDurationDaysInfoPart.propTypes = {\n duration: PropTypes.number,\n isAfternoon: PropTypes.bool,\n intl: intlShape.isRequired,\n};\nDurationDaysInfoPart.defaultProps = {\n duration: 0,\n isAfternoon: false,\n};\nexport default DurationDaysInfoPart;\n","import React, { useEffect, useState } from 'react';\nimport Axios from 'axios';\nimport PropTypes from 'prop-types';\nimport { FormattedDate, FormattedMessage } from 'react-intl';\nimport { OverlayTrigger, Tooltip } from 'react-bootstrap';\nimport { FaCalendar } from 'react-icons/fa';\nimport intlShape from '@/shared/utils/intlShape';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport FormGroupPart from './FormGroupPart';\nimport NumberInput from '../../input/NumberInput';\nimport InputGroupWrapper from '../../InputGroupWrapper';\n\nimport messages from '../registrationMessages';\nimport DurationDaysInfoPart from './DurationDaysInfoPart';\n\nconst DurationDaysFormGroup = ({\n duration,\n userId,\n date,\n isAfternoon,\n onChange,\n disabled,\n max,\n intl,\n showValidation,\n}) => (\n
    \n max))}\n >\n \n \n \n \n
    \n \n
    \n
    \n);\nDurationDaysFormGroup.propTypes = {\n duration: PropTypes.number,\n onChange: PropTypes.func.isRequired,\n disabled: PropTypes.bool,\n showValidation: PropTypes.bool,\n intl: intlShape.isRequired,\n};\nDurationDaysFormGroup.defaultProps = {\n duration: 0,\n disabled: false,\n showValidation: false,\n};\nexport default DurationDaysFormGroup;\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport intlShape from '@/shared/utils/intlShape';\nimport messages from '../registrationMessages';\nimport FormGroupPart from './FormGroupPart';\n\nconst DurationTypeFormGroup = ({ value, onChange, intl, disabled }) => {\n const handleChange = e => onChange(parseInt(e.target.value));\n\n return (\n
    \n \n \n \n \n \n
    \n );\n};\n\nDurationTypeFormGroup.propTypes = {\n value: PropTypes.oneOf([0, 1, 2]),\n onChange: PropTypes.func.isRequired,\n intl: intlShape.isRequired,\n disabled: PropTypes.bool,\n};\nDurationTypeFormGroup.defaultProps = {\n value: 0,\n disabled: false,\n};\nexport default DurationTypeFormGroup;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport messages from '../registrationMessages';\nimport FormGroupPart from './FormGroupPart';\nimport YearSelect from '../../input/YearSelect';\n\nconst ReferenceYearPart = ({ value, onChange, disabled, showValidation, inputCols }) => (\n = 2200)}\n inputCols={inputCols}\n >\n \n \n);\nReferenceYearPart.propTypes = {\n value: PropTypes.number,\n onChange: PropTypes.func.isRequired,\n disabled: PropTypes.bool,\n inputCols: PropTypes.string,\n showValidation: PropTypes.bool,\n};\nReferenceYearPart.defaultProps = {\n value: 0,\n disabled: false,\n showValidation: false,\n inputCols: 'col-sm-10',\n};\nexport default ReferenceYearPart;\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport intlShape from '@/shared/utils/intlShape';\nimport messages from '../registrationMessages';\nimport FormGroupPart from './FormGroupPart';\nimport DurationDaysInfoPart from './DurationDaysInfoPart';\n\nconst HalfDayFormGroup = ({ isAfternoon, duration, userId, date, onChange, intl, disabled }) => {\n const handleChange = e => onChange(parseInt(e.target.value) > 0);\n\n return (\n
    \n \n \n \n \n
    \n \n
    \n
    \n );\n};\n\nHalfDayFormGroup.propTypes = {\n isAfternoon: PropTypes.bool,\n onChange: PropTypes.func.isRequired,\n intl: intlShape.isRequired,\n disabled: PropTypes.bool,\n};\nHalfDayFormGroup.defaultProps = {\n isAfternoon: false,\n disabled: false,\n};\nexport default HalfDayFormGroup;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport intlShape from '@/shared/utils/intlShape';\nimport { AppointmentIcon, NoteIcon, PhoneIcon } from '@/shared/components/Icons';\nimport messages from '../registrationMessages';\nimport { actions } from '../registrationHelpers';\nimport RichTextEditor from '../../RichTextEditor';\n\nconst interactionTypes = [\n {\n id: 1,\n tooltip: messages.CreatePhoneCallTooltip,\n Icon: PhoneIcon,\n },\n {\n id: 0,\n tooltip: messages.CreateNoteTooltip,\n Icon: NoteIcon,\n },\n {\n id: 3,\n tooltip: messages.CreateMeetingReportTooltip,\n Icon: AppointmentIcon,\n },\n];\n\nconst InteractionFormGroup = ({\n interactionType,\n interactionTitle,\n doAction,\n disabled,\n intl,\n initialInteractionDescription,\n}) => (\n
    \n
    \n
    \n {interactionTypes.map(({ id, tooltip, Icon }) => (\n {\n document.activeElement.blur();\n doAction(actions.interactionTypeChanged, id);\n }}\n disabled={disabled}\n type=\"button\"\n title={intl.formatMessage(tooltip)}\n className={classnames('btn btn-xs btn-default', {\n active: interactionType === id,\n })}\n >\n \n \n ))}\n
    \n
    \n
    \n doAction(actions.interactionTitleChanged, e.target.value)}\n />\n\n doAction(actions.interactionDescriptionChanged, newContent)}\n base64Images\n noToolbar\n id=\"NEW\"\n readonly={disabled}\n placeholder={intl.formatMessage(messages.CommunicationReportDescription)}\n />\n
    \n
    \n);\nInteractionFormGroup.propTypes = {\n interactionType: PropTypes.oneOf([0, 1, 3, null]),\n interactionTitle: PropTypes.string,\n doAction: PropTypes.func.isRequired,\n disabled: PropTypes.bool,\n intl: intlShape.isRequired,\n initialInteractionDescription: PropTypes.string,\n};\n\nInteractionFormGroup.defaultProps = {\n interactionType: null,\n interactionTitle: null,\n disabled: false,\n initialInteractionDescription: '',\n};\nexport default InteractionFormGroup;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport OwnCompanyRelationSelect from '@/shared/components/input/OwnCompanyRelationSelect';\nimport RelationName from '@/shared/components/RelationName';\nimport FormGroupPart from './FormGroupPart';\nimport { relationShape } from '../registrationHelpers';\nimport messages from '../registrationMessages';\n\nconst OwnCompanyRelationFormGroup = ({\n relation,\n onChange,\n readOnly,\n disabled,\n autoFocus,\n userId,\n}) => (\n
    \n \n {readOnly ? (\n

    \n {relation && }\n

    \n ) : (\n \n )}\n
    \n
    \n);\nOwnCompanyRelationFormGroup.propTypes = {\n relation: relationShape,\n onChange: PropTypes.func,\n readOnly: PropTypes.bool,\n disabled: PropTypes.bool,\n autoFocus: PropTypes.bool,\n userId: PropTypes.string,\n};\nOwnCompanyRelationFormGroup.defaultProps = {\n relation: null,\n onChange: () => {},\n readOnly: false,\n disabled: false,\n autoFocus: undefined,\n userId: undefined,\n};\nexport default OwnCompanyRelationFormGroup;\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport { FormattedNumber } from 'react-intl';\n\nconst FormattedCurrency = ({\n minimumFractionDigits = 2,\n maximumFractionDigits = 2,\n value,\n className,\n}) => (\n \n \n \n);\n\nFormattedCurrency.propTypes = {\n value: PropTypes.number.isRequired,\n minimumFractionDigits: PropTypes.number,\n maximumFractionDigits: PropTypes.number,\n className: PropTypes.string,\n};\nFormattedCurrency.defaultProps = {\n minimumFractionDigits: 2,\n maximumFractionDigits: 2,\n className: '',\n};\n\nexport default FormattedCurrency;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { MenuItem, DropdownButton } from 'react-bootstrap';\nimport FormattedCurrency from '../../FormattedCurrency';\nimport { priceShape } from '../registrationHelpers';\n\nconst PriceOptionsDropdown = ({ price, priceOptions, disabled, onPriceChanged }) => {\n const showWarning = !price || !price.id;\n return priceOptions && priceOptions.length > 0 ? (\n }\n >\n {priceOptions.map(option => (\n onPriceChanged(option)}\n active={price && option.id === price.id}\n >\n
    \n \n \n \n
    \n \n ))}\n \n ) : null;\n};\n\nPriceOptionsDropdown.propTypes = {\n price: priceShape,\n priceOptions: PropTypes.arrayOf(priceShape),\n disabled: PropTypes.bool,\n onPriceChanged: PropTypes.func.isRequired,\n};\nPriceOptionsDropdown.defaultProps = {\n price: null,\n priceOptions: null,\n disabled: false,\n};\nexport default PriceOptionsDropdown;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { IntlShape } from 'react-intl';\nimport RelationSearch from '@/shared/components/input/RelationSearch';\nimport RelationName from '@/shared/components/RelationName';\nimport FormGroupPart from './FormGroupPart';\nimport { relationShape } from '../registrationHelpers';\nimport messages from '../registrationMessages';\n\nconst RelationFormGroup = ({\n relation,\n onChange,\n readOnly,\n disabled,\n showValidation,\n autoFocus,\n crmTypes,\n}) => (\n
    \n \n {readOnly ? (\n

    \n {relation && }\n

    \n ) : (\n \n )}\n \n
    \n);\nRelationFormGroup.propTypes = {\n relation: relationShape,\n onChange: PropTypes.func,\n readOnly: PropTypes.bool,\n disabled: PropTypes.bool,\n showValidation: PropTypes.bool,\n autoFocus: PropTypes.bool,\n crmTypes: PropTypes.arrayOf(PropTypes.number),\n};\nRelationFormGroup.defaultProps = {\n relation: null,\n onChange: () => {},\n readOnly: false,\n disabled: false,\n showValidation: false,\n autoFocus: undefined,\n crmTypes: [],\n};\nexport default RelationFormGroup;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport FormattedListValue from '../../FormattedListValue';\n\nconst ResourceTypeRadioButtons = ({\n value,\n onChange,\n disabled,\n types,\n name,\n className,\n}) => {\n const handleOnChange = e => onChange(parseInt(e.target.value));\n return types && types.length > 1 ? (\n
    \n {types.map(t => (\n \n ))}\n
    \n ) : null;\n};\n\nconst allowedValues = [0, 1, 2, 3, 4];\nResourceTypeRadioButtons.propTypes = {\n value: PropTypes.oneOf(allowedValues),\n onChange: PropTypes.func.isRequired,\n disabled: PropTypes.bool,\n types: PropTypes.arrayOf(PropTypes.oneOf(allowedValues)),\n name: PropTypes.string,\n className: PropTypes.string,\n};\nResourceTypeRadioButtons.defaultProps = {\n value: null,\n disabled: false,\n types: [0, 1, 2],\n name: 'ResourceType',\n className: '',\n};\nexport default ResourceTypeRadioButtons;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport { defineMessages, FormattedMessage, injectIntl, useIntl } from 'react-intl';\nimport { getRelationName } from '@/shared/components/RelationName';\nimport intlShape from '@/shared/utils/intlShape';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport config from '../../../config';\nimport api from '../../api';\nimport { dynamicSort } from '../../utils/dynamicSort';\n\nconst messages = defineMessages({\n NoOwnCompanyRelationsFound: 'No own company relations found',\n Relation: 'Relation',\n});\n\nclass OwnCompanyRelationSelect extends Component {\n state = {\n relations: null,\n };\n\n componentDidMount() {\n const endpoint = `${config.appUrls.api}/api/relation/names`;\n\n const params = {\n searchValue: '',\n take: 0,\n includeInactive: false,\n crmTypes: [4],\n };\n return api.base.get(endpoint, { params }).then(({ data }) => {\n const { intl } = this.props;\n const relations = data\n .map(item => ({\n key: item.id,\n label: getRelationName(intl, item),\n ...item,\n }))\n .sort(dynamicSort('label'));\n\n this.setState(\n {\n relations,\n },\n () => {\n const { value, onChange, userId } = this.props;\n if (!!value || relations.length === 0) return;\n if (relations.length === 1) {\n onChange(relations[0]);\n } else {\n const relationId = DataCacheService.getAbsenceRelationIdForUser(userId);\n const relation = relationId ? relations.find(x => x.id === relationId) : null;\n if (relation) {\n onChange(relation);\n } else {\n onChange(relations[0]);\n }\n }\n },\n );\n });\n }\n\n onSelect = e => {\n const { onChange } = this.props;\n const { relations } = this.state;\n const id = e.target.value || null;\n const relation = id ? relations.find(x => x.id === id) : null;\n onChange(relation);\n };\n\n render() {\n const { className, value, placeholder, intl, disabled, autoFocus } = this.props;\n const { relations } = this.state;\n\n if (relations === null) return null;\n if (!relations.length)\n return (\n
    \n \n
    \n );\n const inputValue = (value && (value.id || value.key || value)) || '';\n return (\n \n {!inputValue && }\n {relations.map(rel => (\n \n ))}\n \n );\n }\n}\n\nOwnCompanyRelationSelect.propTypes = {\n intl: intlShape.isRequired,\n value: PropTypes.oneOfType([\n PropTypes.shape({ key: PropTypes.string.isRequired }), // Key/label\n PropTypes.shape({ id: PropTypes.string.isRequired }), // Id/Name\n PropTypes.string, // Id\n ]),\n onChange: PropTypes.func,\n className: PropTypes.string,\n placeholder: PropTypes.node,\n disabled: PropTypes.bool,\n autoFocus: PropTypes.bool,\n userId: PropTypes.string,\n};\nOwnCompanyRelationSelect.defaultProps = {\n value: null,\n onChange: () => {},\n className: null,\n placeholder: null,\n disabled: false,\n autoFocus: null,\n userId: undefined,\n};\nexport default injectIntl(OwnCompanyRelationSelect);\n","import React, { Component } from 'react';\nimport { injectIntl, useIntl } from 'react-intl';\nimport PropTypes from 'prop-types';\nimport Highlighter from 'react-highlight-words';\n\nimport classNames from 'classnames';\nimport AutoComplete from '@/shared/components/input/select/AutoComplete';\nimport config from '@/config';\nimport api from '@/shared/api';\nimport { dynamicSortMultiple } from '@/shared/utils/dynamicSort';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport { ToDoIcon } from '@/shared/components/Icons';\nimport intlShape from '@/shared/utils/intlShape';\nimport FormGroupPart from './FormGroupPart';\nimport messages from '../registrationMessages';\nimport FormattedDateShort from '../../FormattedDateShort';\n\nconst taskSearch = (item, searchValue) => {\n if (!searchValue) return true;\n if (!item) return false;\n if (!item.search) return false;\n return item.search.toUpperCase().indexOf(searchValue.toUpperCase()) >= 0;\n};\nconst renderItem = (item, searchValue) => (\n \n {!item.isToDo && (\n \n )}\n {item.isToDo && (\n \n )}\n \n {searchValue ? (\n \n ) : (\n item.label\n )}\n \n {item.deadline && (\n \n ()\n \n )}\n \n);\n\nclass TaskFormGroup extends Component {\n state = {\n initialTask: null,\n tasks: [],\n };\n\n componentDidUpdate(prevProps) {\n const { plannedTaskId, invoiceStreamId, mainTaskId } = this.props;\n if (prevProps.invoiceStreamId !== invoiceStreamId || prevProps.mainTaskId !== mainTaskId) {\n this.retrieveTasks();\n\n return;\n }\n if (prevProps.plannedTaskId !== plannedTaskId) {\n // eslint-disable-next-line react/no-did-update-set-state\n this.setState(({ tasks }) => ({\n // Find task in current tasks\n initialTask: plannedTaskId ? tasks.find(x => x.plannedTaskId === plannedTaskId) : null,\n }));\n }\n }\n\n getTaskLabel = task => {\n const { intl } = this.props;\n return (\n task.plannedTaskName ||\n (task.plannedTaskTemplateId\n ? intl.formatMessage(\n listItemMsg(\n 'tasktemplate',\n task.plannedTaskTemplateId,\n task.plannedTaskTemplateName || '',\n ),\n )\n : '')\n );\n };\n\n componentDidMount() {\n this.retrieveTasks();\n }\n\n retrieveTasks = () => {\n const { plannedTaskId, invoiceStreamId, mainTaskId, intl } = this.props;\n if (!invoiceStreamId) {\n this.setState({ tasks: [] });\n return;\n }\n return api.base\n .post(`${config.appUrls.tasks}/api/PlannedTasks/ForRegistrations`, {\n invoiceStreamId,\n mainTaskId,\n includeIds: plannedTaskId ? [plannedTaskId] : [],\n })\n .then(\n ({ data }) => {\n if (!data) return;\n\n const tasks = data\n .reduce((array, orgMainTask, mainTaskIndex) => {\n const { children = null, ...mainTask } = orgMainTask;\n const mainTaskLabel = this.getTaskLabel(mainTask);\n const mappedChildren = (children || []).map((orgSubTask, subTaskIndex) => {\n const subtaskLabel = this.getTaskLabel(orgSubTask);\n return {\n ...orgSubTask,\n label: subtaskLabel,\n id: orgSubTask.plannedTaskId,\n key: orgSubTask.plannedTaskId,\n search: `${mainTaskLabel};${subtaskLabel}`,\n level: 1,\n order: mainTaskIndex * 100 + (subTaskIndex + 1),\n };\n });\n\n const childLabels = mappedChildren.map(x => x.label).join(';');\n\n return array.concat([\n {\n ...mainTask,\n label: mainTaskLabel,\n id: mainTask.plannedTaskId,\n key: mainTask.plannedTaskId,\n search: `${mainTaskLabel};${childLabels}`,\n level: 0,\n order: mainTaskIndex * 100,\n },\n ...mappedChildren,\n ]);\n }, [])\n .filter(x => !!x.label)\n .sort(dynamicSortMultiple('order', 'label'));\n const initialTask = plannedTaskId\n ? tasks.find(x => x.plannedTaskId === plannedTaskId)\n : null;\n this.setState({\n tasks,\n initialTask,\n });\n },\n error => {\n handleHttpError(intl)(error);\n },\n );\n };\n\n onTaskChanged = task => {\n if (task === undefined) return;\n const { onChange } = this.props;\n onChange(task);\n };\n\n render() {\n const { intl, disabled, showValidation, required } = this.props;\n const { initialTask, tasks } = this.state;\n if (!tasks || !tasks.length) return null;\n const invalid = showValidation && required && !initialTask;\n\n return (\n
    \n \n this.onTaskChanged(item)}\n disabled={disabled}\n mode=\"edit\"\n initialSelectedItem={initialTask}\n showAll\n renderItem={renderItem}\n filterFunc={taskSearch}\n isSmall\n />\n \n
    \n );\n }\n\n static propTypes = {\n intl: intlShape.isRequired,\n onChange: PropTypes.func.isRequired,\n required: PropTypes.bool,\n disabled: PropTypes.bool,\n showValidation: PropTypes.bool,\n invoiceStreamId: PropTypes.string,\n plannedTaskId: PropTypes.string,\n // If the mainTaskId is provided, only this mainTask and its subtasks can be selected\n mainTaskId: PropTypes.string,\n };\n\n static defaultProps = {\n disabled: false,\n required: false,\n showValidation: false,\n invoiceStreamId: null,\n plannedTaskId: null,\n mainTaskId: null,\n };\n}\n\nexport default injectIntl(TaskFormGroup);\n","const currencySymbols = [\n { currencyCode: 'EUR', currencySymbol: '€' },\n { currencyCode: 'ZAR', currencySymbol: 'R' },\n];\n\nexport default {\n getByCurrencyCode: currencyCode => {\n let result = currencySymbols.find(\n x => x.currencyCode.toUpperCase() === currencyCode.toUpperCase(),\n );\n\n if (!result) {\n result = currencySymbols.find(x => x.currencyCode === 'EUR');\n }\n\n return result.currencySymbol;\n },\n};\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport classnames from 'classnames';\nimport intlShape from '@/shared/utils/intlShape';\nimport FormGroupPart from './FormGroupPart';\nimport messages from '../registrationMessages';\nimport InputGroupWrapper from '../../InputGroupWrapper';\nimport CurrencySymbol from '../../CurrencySymbol';\nimport NumberInput from '../../input/NumberInput';\n\nconst TotalAmountPart = ({\n value,\n readOnly,\n disabled,\n isFixedPrice,\n intl,\n onChange,\n className,\n}) => (\n \n }\n >\n \n {isFixedPrice ? (\n \n \n \n ) : null}\n \n \n);\n\nTotalAmountPart.propTypes = {\n value: PropTypes.number,\n isFixedPrice: PropTypes.bool,\n disabled: PropTypes.bool,\n readOnly: PropTypes.bool,\n onChange: PropTypes.func,\n className: PropTypes.string,\n intl: intlShape.isRequired,\n};\nTotalAmountPart.defaultProps = {\n value: 0,\n isFixedPrice: false,\n disabled: false,\n readOnly: false,\n onChange: () => {},\n className: '',\n};\nexport default TotalAmountPart;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport InputGroupWrapper from '../../InputGroupWrapper';\nimport messages from '../registrationMessages';\nimport FormGroupPart from './FormGroupPart';\nimport NumberInput from '../../input/NumberInput';\n\nconst TravelQuantityPart = ({ quantity, onChange, disabled, showValidation }) => (\n \n \n \n \n \n);\nTravelQuantityPart.propTypes = {\n quantity: PropTypes.number,\n onChange: PropTypes.func.isRequired,\n disabled: PropTypes.bool,\n showValidation: PropTypes.bool,\n};\nTravelQuantityPart.defaultProps = {\n quantity: 0,\n disabled: false,\n showValidation: false,\n};\nexport default TravelQuantityPart;\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport classnames from 'classnames';\nimport intlShape from '@/shared/utils/intlShape';\nimport FormGroupPart from './FormGroupPart';\nimport messages from '../registrationMessages';\nimport PriceOptionsDropdown from './PriceOptionsDropdown';\nimport InputGroupWrapper from '../../InputGroupWrapper';\nimport CurrencySymbol from '../../CurrencySymbol';\nimport { priceShape } from '../registrationHelpers';\nimport NumberInput from '../../input/NumberInput';\n\nconst UnitPricePart = ({\n unitPrice,\n price,\n priceOptions,\n isFixedPrice,\n intl,\n disabled,\n onUnitPriceChanged,\n onPriceChanged,\n className,\n}) => {\n const showPriceOptions =\n priceOptions &&\n priceOptions.length > 0 &&\n (!price || !price.id || price.amount !== priceOptions[0].amount);\n\n return (\n \n }\n right={\n showPriceOptions ? (\n \n ) : null\n }\n rightClassName=\"input-group-btn\"\n >\n \n {isFixedPrice ? (\n \n \n \n ) : null}\n \n \n );\n};\n\nUnitPricePart.propTypes = {\n unitPrice: PropTypes.number,\n price: priceShape,\n priceOptions: PropTypes.arrayOf(priceShape),\n isFixedPrice: PropTypes.bool,\n disabled: PropTypes.bool,\n intl: intlShape.isRequired,\n onUnitPriceChanged: PropTypes.func.isRequired,\n onPriceChanged: PropTypes.func,\n className: PropTypes.string,\n};\nUnitPricePart.defaultProps = {\n unitPrice: 0,\n price: null,\n priceOptions: null,\n isFixedPrice: false,\n disabled: false,\n onPriceChanged: () => {},\n className: '',\n};\nexport default UnitPricePart;\n","import { Component } from 'react';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport CurrencySymbols from '@/shared/currencySymbols';\n\nclass CurrencySymbol extends Component {\n state = {\n currencySymbol: '€',\n };\n\n componentDidMount() {\n let currencyCode = 'EUR';\n\n const cache = DataCacheService.getDataCache();\n\n if (cache) {\n ({ currencyCode } = cache.defaultcompany);\n\n const currencySymbol = CurrencySymbols.getByCurrencyCode(currencyCode);\n this.setState({ currencySymbol });\n }\n }\n\n render() {\n const { currencySymbol } = this.state;\n\n return currencySymbol;\n }\n}\n\nexport default CurrencySymbol;\n","const vatPercentages = [\n {\n // 0 = default\n\n tenantConfiguration: 0,\n vatPercentages: [\n {\n label: '0',\n value: 0,\n },\n {\n label: '3',\n value: 0.03,\n },\n {\n label: '6',\n value: 0.06,\n },\n {\n label: '7',\n value: 0.07,\n },\n {\n label: '8',\n value: 0.08,\n },\n {\n label: '12',\n value: 0.12,\n },\n {\n label: '13',\n value: 0.13,\n },\n {\n label: '14',\n value: 0.14,\n },\n {\n label: '16',\n value: 0.16,\n },\n {\n label: '17',\n value: 0.17,\n },\n {\n label: '21',\n value: 0.21,\n },\n ],\n },\n {\n // 2 = AccountancySouthAfrica\n tenantConfiguration: 2,\n vatPercentages: [\n {\n label: '0',\n value: 0,\n },\n {\n label: '15',\n value: 0.15,\n },\n ],\n },\n {\n // 5 = AccountancyNetherlands\n tenantConfiguration: 5,\n vatPercentages: [\n {\n label: '0',\n value: 0,\n },\n {\n label: '9',\n value: 0.09,\n },\n {\n label: '21',\n value: 0.21,\n },\n ],\n },\n {\n // 3 = AccountancyLuxembourg\n tenantConfiguration: 3,\n vatPercentages: [\n {\n label: '0',\n value: 0,\n },\n {\n label: '3',\n value: 0.03,\n },\n {\n label: '6',\n value: 0.06,\n },\n {\n label: '7',\n value: 0.07,\n },\n {\n label: '8',\n value: 0.08,\n },\n {\n label: '12',\n value: 0.12,\n },\n {\n label: '13',\n value: 0.13,\n },\n {\n label: '14',\n value: 0.14,\n },\n {\n label: '16',\n value: 0.16,\n },\n {\n label: '17',\n value: 0.17,\n },\n {\n label: '21',\n value: 0.21,\n },\n ],\n },\n];\n\nexport default {\n getByConfiguration: configuration => {\n let result = vatPercentages.find(x => x.tenantConfiguration === configuration);\n\n if (!result) {\n // retrieve default if none were found for configuration\n result = vatPercentages.find(x => x.tenantConfiguration === 0);\n }\n\n return result.vatPercentages;\n },\n};\n","import React, { useState, useEffect, useMemo, useCallback } from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { injectIntl, useIntl } from 'react-intl';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport enumCache from '@/shared/services/EnumCacheService';\nimport intlShape from '@/shared/utils/intlShape';\nimport availableVatPercentages from '../registration/vatPercentages';\n\nconst VatRateTypeSelector = ({ vatRate, vatType, onChange, disabled, className, intl }) => {\n const [items, setItems] = useState([]);\n useEffect(() => {\n const cache = DataCacheService.getDataCache();\n if (!cache) {\n throw new Error('DataCache not found in VatRateTypeSelector.jsx');\n }\n\n const tenantConfiguration = cache.tenantConfiguration || 0;\n\n const percentages = availableVatPercentages.getByConfiguration(tenantConfiguration) || [];\n\n enumCache.getTranslated('vatType', intl).then(data => {\n const types = data.filter(x => x.id !== 0);\n setItems([\n ...percentages.map(x => ({\n id: `0;${x.label}`,\n label: x.label,\n vatType: 0,\n vatRate: x.value,\n })),\n ...types.map(x => ({\n id: `${x.id};0`,\n label: x.label,\n vatType: x.id,\n vatRate: 0.0,\n })),\n ]);\n });\n }, [intl]);\n\n const interalValue = useMemo(() => {\n if (vatType === null || vatRate === null) return null;\n\n const item = items.find(x => x.vatType === vatType && x.vatRate === vatRate);\n return item ? item.id : null;\n }, [vatRate, vatType, items]);\n const update = useCallback(\n e => {\n const { value = null } = e.target;\n if (!value) onChange({ vatRate: null, vatType: null });\n const item = items.find(x => x.id === value);\n if (item) {\n onChange({ vatRate: item.vatRate, vatType: item.vatType });\n }\n },\n [items, onChange],\n );\n\n return (\n \n {items.map(p => (\n \n ))}\n \n );\n};\nVatRateTypeSelector.propTypes = {\n vatRate: PropTypes.number,\n vatType: PropTypes.number,\n onChange: PropTypes.func.isRequired,\n disabled: PropTypes.bool,\n className: PropTypes.string,\n intl: intlShape.isRequired,\n};\nVatRateTypeSelector.defaultProps = {\n vatRate: null,\n vatType: null,\n disabled: false,\n className: '',\n};\n\nexport default injectIntl(VatRateTypeSelector);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport InputGroupWrapper from '../../InputGroupWrapper';\nimport messages from '../registrationMessages';\nimport FormGroupPart from './FormGroupPart';\n\nimport VatRateTypeSelector from '../../input/VatRateTypeSelector';\n\nconst VatPercentagePart = ({ vatPercentage, vatType, onChange, disabled, className }) => (\n \n \n \n \n \n);\nVatPercentagePart.propTypes = {\n vatPercentage: PropTypes.number,\n vatType: PropTypes.number,\n onChange: PropTypes.func.isRequired,\n disabled: PropTypes.bool,\n className: PropTypes.string,\n};\nVatPercentagePart.defaultProps = {\n vatPercentage: 0,\n vatType: 0,\n disabled: false,\n className: '',\n};\nexport default VatPercentagePart;\n","import React from 'react';\nimport FormGroupPart from './FormGroupPart';\nimport messages from '../registrationMessages';\nimport { FormattedNumber } from 'react-intl';\nimport classNames from 'classnames';\n\nconst AbsenceBalanceFormGroup = ({\n absenceBalance,\n durationType,\n intl,\n durationDays,\n duration,\n showValidation,\n}) => {\n if (!absenceBalance) return null;\n\n const { balance, hoursInDay, balanceDays, maxDays, maxMinutes } = absenceBalance;\n ///\n\n const balanceAfter =\n durationType === 0 ? balance - (duration ?? 0) / 60 : balanceDays - (durationDays ?? 0);\n\n return (\n
    \n \n {durationType === 0 ? (\n

    \n \n  \n {intl.formatMessage(messages.Hours)}\n

    \n ) : (\n

    \n \n  \n {intl.formatMessage(messages.Days)}\n

    \n )}\n
    \n \n

    \n \n  \n {intl.formatMessage(durationType === 0 ? messages.Hours : messages.Days)}\n

    \n
    \n
    \n );\n};\nexport default AbsenceBalanceFormGroup;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport InputGroupWrapper from '../../InputGroupWrapper';\nimport messages from '../registrationMessages';\nimport FormGroupPart from './FormGroupPart';\n\nimport VatRateTypeSelector from '../../input/VatRateTypeSelector';\nimport DataCacheService from '@/shared/services/DataCacheService';\n\nconst UserFormGroup = ({ userId }) => (\n
    \n \n

    {DataCacheService.getUserName(userId)}

    \n
    \n
    \n);\nUserFormGroup.propTypes = {\n userId: PropTypes.string,\n};\nUserFormGroup.defaultProps = { userId: null };\nexport default React.memo(UserFormGroup);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { IntlShape, injectIntl, FormattedMessage } from 'react-intl';\n\nimport intlShape from '@/shared/utils/intlShape';\nimport AuthService, { functionalities, privileges } from '@/shared/services/AuthService';\nimport { CanCreate } from '@/shared/components/security';\nimport messages from './registrationMessages';\nimport TimeInput from '../input/TimeInput';\nimport Checkbox from '../input/Checkbox';\nimport guid from '../../utils/guid';\nimport { actions, registrationShape, defaultOptions } from './registrationHelpers';\nimport {\n FormGroupPart,\n UnitPricePart,\n DiscountPart,\n TravelQuantityPart,\n CostQuantityPart,\n DurationFormGroup,\n VatPercentagePart,\n TotalAmountPart,\n RelationFormGroup,\n InteractionFormGroup,\n AssignmentFormGroup,\n TaskFormGroup,\n OwnCompanyRelationFormGroup,\n DurationDaysFormGroup,\n ResourceTypeRadioButtons,\n DatePart,\n ReferenceYearPart,\n DurationTypeFormGroup,\n HalfDayFormGroup,\n} from './partials';\nimport {\n retrieveResources,\n getInForfaitAndPrice,\n getLastRegistrationTime,\n getInteractionForRegistration,\n getPrice,\n getAbsenceBalance,\n} from './resourceApi';\nimport ResourceAutoComplete, { resourceFilter } from './ResourceAutoComplete';\nimport AbsenceBalanceFormGroup from './partials/AbsenceBalanceFormGroup';\nimport UserFormGroup from './partials/UserFormGroup';\n\nclass RegistrationComponent extends Component {\n hasPriceListPermission = AuthService.hasPermission({\n functionality: functionalities.Pricelist,\n privilege: 'Read',\n });\n\n state = {\n resources: null,\n };\n\n componentDidMount() {\n const { registration, options: externalOptions } = this.props;\n\n const options = { ...defaultOptions, ...(externalOptions || {}) };\n this.retrieveResources(registration.type);\n if (!registration.id) {\n // New registration\n if (\n (registration.type === 0 || registration.type === 3 || registration.type === 4) &&\n registration.date &&\n options.showFromUntil\n ) {\n getLastRegistrationTime(registration.date).then(value => {\n this.doAction(actions.fromMinutesChanged, value);\n });\n }\n if (options.defaultDuration > 0) {\n this.doAction(actions.durationMinutesChanged, options.defaultDuration);\n }\n } else if (\n registration.group &&\n options.showInteraction &&\n AuthService.hasPermission({\n functionality: 'InteractionsOwn',\n privilege: privileges.Read,\n })\n ) {\n getInteractionForRegistration(registration.group).then(interaction => {\n this.doAction(actions.interactionInit, interaction);\n });\n }\n }\n componentDidUpdate({ registration: oldRegistration }) {\n const { registration } = this.props;\n if (registration.type !== oldRegistration.type) {\n this.retrieveResources(registration.type);\n }\n }\n\n retrieveResources = resourceType => {\n const { intl } = this.props;\n this.setState({ resources: null });\n retrieveResources(intl, resourceType).then(resources => {\n this.setState({ resources });\n\n const { registration, defaultResourceId } = this.props;\n if (registration.id && registration.resource && registration.resource.id) {\n // Retrieve price options when editing registration\n if (!this.hasPriceListPermission) return;\n const invoiceStreamId =\n registration.invoiceStreamId ||\n (registration.relation && registration.relation.invoiceStreamId) ||\n null;\n if (invoiceStreamId) {\n getPrice(invoiceStreamId, registration.resource.categoryId, registration.userId).then(\n ({ data }) => {\n this.doAction(actions.setPriceOptions, data ? [data] : []);\n },\n );\n }\n return;\n }\n const defaultResource =\n !registration.resource && defaultResourceId\n ? resources.find(\n x =>\n x.id === defaultResourceId &&\n resourceFilter(\n x,\n {\n crmType: registration?.relation?.crm,\n assignmentTemplateId: registration?.assignmentTemplateId,\n },\n !!registration.id,\n ),\n )\n : null;\n\n const onlyResource = !registration.resource && resources.length === 1 ? resources[0] : null;\n this.onResourceChanged(registration.resource || defaultResource || onlyResource);\n });\n };\n onDateChanged = date => {\n this.doAction(actions.dateChanged, date);\n const { registration } = this.props;\n if (registration.type === 0 || registration.type === 3 || registration.type === 4) {\n getLastRegistrationTime(date).then(fromMinutes => {\n if (fromMinutes) {\n this.doAction(actions.fromMinutesChanged, fromMinutes);\n }\n });\n }\n };\n onRelationChanged = relation => {\n this.doAction(actions.relationChanged, relation);\n if (this.hasPriceListPermission) return;\n if (!relation) return;\n if (!relation.invoiceStreamId) return;\n const { registration } = this.props;\n if (registration.resource && registration.resource.id) {\n getInForfaitAndPrice(\n relation.invoiceStreamId,\n registration.resource,\n registration.userId,\n ).then(priceInfo => {\n this.doAction(actions.priceInfoChanged, priceInfo);\n });\n }\n };\n onAssignmentChanged = invoiceStreamId => {\n this.doAction(actions.assignmentChanged, invoiceStreamId);\n if (this.hasPriceListPermission || !invoiceStreamId) return;\n const { registration } = this.props;\n if (registration.resource && registration.resource.id) {\n getInForfaitAndPrice(invoiceStreamId, registration.resource, registration.userId).then(\n priceInfo => {\n this.doAction(actions.priceInfoChanged, priceInfo);\n },\n );\n }\n };\n\n getResourceChangedObject = resource => {\n const { registration } = this.props;\n if (registration.type === 3 || registration.type === 4) {\n return getAbsenceBalance(resource, registration.userId, registration.date).then(balance => ({\n ...balance,\n resource,\n inForfait: null,\n priceOptions: null,\n price: null,\n }));\n }\n if (this.hasPriceListPermission) {\n const invoiceStreamId =\n registration.invoiceStreamId ||\n (registration.relation && registration.relation.invoiceStreamId) ||\n null;\n if (resource && resource.id && invoiceStreamId) {\n return getInForfaitAndPrice(invoiceStreamId, resource, registration.userId).then(\n priceInfo => {\n const value = { ...priceInfo, resource };\n return value;\n },\n );\n }\n }\n const value = { resource, inForfait: null, priceOptions: null, price: null };\n return Promise.resolve(value);\n };\n onResourceChanged = resource => {\n this.getResourceChangedObject(resource).then(value =>\n this.doAction(actions.resourceChanged, value),\n );\n };\n\n onTaskChanged = task => {\n if (!task || !task.id) {\n this.doAction(actions.taskChanged, null);\n return;\n }\n const { resourceId = null } = task;\n const { registration } = this.props;\n if (!!resourceId && registration.type === 0) {\n const { resources } = this.state;\n const resource = resources.find(x => x.id === resourceId);\n if (resource) {\n return this.getResourceChangedObject(resource).then(updateResource =>\n this.doAction(actions.taskChanged, { ...task, updateResource }),\n );\n }\n }\n this.doAction(actions.taskChanged, task);\n };\n\n doAction = (action, value) => {\n const { onAction } = this.props;\n onAction(action, value);\n };\n\n render() {\n const { resources } = this.state;\n const {\n registration,\n intl,\n disabled,\n options: externalOptions,\n showValidation,\n mainTaskId,\n } = this.props;\n\n const invalidResource = !registration.resource || !registration.resource.id;\n\n const options = { ...defaultOptions, ...(externalOptions || {}) };\n\n const isTime = registration.type === 0 || registration.type === 3 || registration.type === 4;\n const showPriceInfo =\n registration.type !== 3 && registration.type !== 4 && this.hasPriceListPermission;\n const showAssignments =\n options.showAssignments &&\n registration.relation &&\n registration.relation.invoiceStreams &&\n registration.relation.invoiceStreams.length > 1;\n const showTasks =\n options.showTasks &&\n !!registration.invoiceStreamId &&\n registration.invoiceStreamId !== guid.empty;\n\n const focusRelationInput =\n options.showRelation && !!options.editableRelation && !registration.relation;\n\n const showDurationInDays =\n (registration.type === 3 || registration.type === 4) && !registration.id;\n\n const showOwnCompanyRelation =\n options.ownCompanyRelation || registration.type === 3 || registration.type === 4;\n\n if (!AuthService.hasFeature('ReferenceYear')) {\n options.showReferenceYear = false;\n }\n\n return (\n <>\n {options.showOtherUsers &&\n !!registration.userId &&\n registration.userId !== AuthService.getUserId() && (\n \n )}\n {options.showRelation && !!showOwnCompanyRelation && (\n \n )}\n {options.showDate && (\n
    \n \n {options.showReferenceYear && (\n this.doAction(actions.referenceYearChanged, value)}\n disabled={disabled}\n showValidation={showValidation}\n inputCols={options.showDate ? 'col-sm-4' : 'col-sm-10'}\n intl={intl}\n />\n )}\n
    \n )}\n {options.showRelation && !showOwnCompanyRelation && (\n \n )}\n {showAssignments ? (\n \n ) : null}\n {showTasks ? (\n \n ) : null}\n {!options.showDate && options.showReferenceYear && registration.relation && (\n
    \n this.doAction(actions.referenceYearChanged, value)}\n disabled={disabled}\n showValidation={showValidation}\n inputCols=\"col-sm-10\"\n intl={intl}\n />\n
    \n )}\n\n {options.resourceTypes && options.resourceTypes.length > 1 ? (\n
    \n \n this.doAction(actions.resourceTypeChanged, value)}\n />\n \n
    \n ) : null}\n
    \n \n {resources && resources.length > 0 && (\n \n )}\n \n
    \n {showDurationInDays && options.showDuration && (\n this.doAction(actions.durationTypeChanged, durationType)}\n />\n )}\n {isTime && options.showFromUntil && registration.durationType === 0 && (\n
    \n \n this.doAction(actions.fromMinutesChanged, value)}\n />\n \n \n this.doAction(actions.toMinutesChanged, value)}\n />\n \n
    \n )}\n {isTime && options.showDuration && registration.durationType === 0 && (\n this.doAction(actions.durationMinutesChanged, value)}\n disabled={invalidResource || disabled}\n showValidation={showValidation}\n max={1439 - (registration.fromMinutes || 0)}\n intl={intl}\n />\n )}\n {showDurationInDays && options.showDuration && registration.durationType === 1 && (\n this.doAction(actions.durationDaysChanged, value)}\n disabled={invalidResource || disabled}\n showValidation={showValidation}\n intl={intl}\n />\n )}\n {showDurationInDays && options.showDuration && registration.durationType === 2 && (\n this.doAction(actions.isAfternoonChanged, value)}\n disabled={invalidResource || disabled}\n showValidation={showValidation}\n intl={intl}\n />\n )}\n {(registration.type === 3 || registration.type === 4) && registration.absenceBalance ? (\n \n ) : null}\n {registration.type === 1 && options.showQuantity && (\n
    \n this.doAction(actions.quantityChanged, value)}\n disabled={invalidResource || disabled}\n showValidation={showValidation}\n />\n
    \n )}\n {registration.type === 2 && options.showQuantity && (\n
    \n this.doAction(actions.quantityChanged, value)}\n disabled={invalidResource || disabled}\n intl={intl}\n showValidation={showValidation}\n />\n
    \n )}\n {showPriceInfo && (options.showPrice || options.showDiscount) && (\n
    \n {options.showPrice && (\n this.doAction(actions.unitPriceChanged, value)}\n onPriceChanged={value => this.doAction(actions.priceChanged, value)}\n disabled={invalidResource || disabled}\n />\n )}\n {options.showDiscount && (\n this.doAction(actions.discountChanged, value)}\n disabled={invalidResource || disabled}\n />\n )}\n
    \n )}\n {showPriceInfo && (options.showVat || options.showTotalAmount) && (\n
    \n {options.showVat && (\n this.doAction(actions.vatPercentageChanged, value)}\n disabled={invalidResource || disabled}\n />\n )}\n {options.showTotalAmount && (\n this.doAction(actions.totalAmountChanged, value)}\n disabled={invalidResource || disabled}\n />\n )}\n
    \n )}\n {showPriceInfo && (options.showBillable || options.showInForfait) && (\n
    \n {options.showBillable && (\n
    \n this.doAction(actions.isBillableChanged, !registration.isBillable)}\n />\n
    \n )}\n {options.showInForfait &&\n registration.inForfait !== undefined &&\n registration.inForfait !== null && (\n
    \n this.doAction(actions.inForfaitChanged, !registration.inForfait)}\n />\n
    \n )}\n
    \n )}\n {options.showInvoiceRemark && (\n
    \n \n \n {registration.relation && registration.relation.languageCode ? (\n {` (${registration.relation.languageCode})`}\n ) : null}\n \n }\n inputCols=\"col-sm-9\"\n labelCols=\"col-sm-3\"\n >\n this.doAction(actions.remarkChanged, e.target.value)}\n placeholder={intl.formatMessage(messages.InvoiceRemark)}\n maxLength=\"3000\"\n />\n \n
    \n )}\n\n {options.showInternalRemark && (\n
    \n \n this.doAction(actions.internalRemarkChanged, e.target.value)}\n placeholder={intl.formatMessage(messages.InternalRemark)}\n maxLength=\"3000\"\n />\n \n
    \n )}\n {options.showInteraction && (\n \n \n \n )}\n \n );\n }\n}\n\nRegistrationComponent.propTypes = {\n registration: registrationShape.isRequired,\n onAction: PropTypes.func.isRequired,\n disabled: PropTypes.bool,\n intl: intlShape.isRequired,\n options: PropTypes.shape({}),\n showValidation: PropTypes.bool,\n // Select this resource on init (if available)\n defaultResourceId: PropTypes.string,\n // If the mainTaskId is provided, only this mainTask and its subtasks can be selected\n mainTaskId: PropTypes.string,\n};\nRegistrationComponent.defaultProps = {\n disabled: false,\n options: {},\n showValidation: false,\n defaultResourceId: null,\n mainTaskId: null,\n};\n\nexport default injectIntl(RegistrationComponent);\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/* eslint-disable react/require-default-props */\nimport messages from '@/modules/tasks/taskMessages';\nimport { useGetTaskTemplates } from '@/shared/hooks/task/useGetTaskTemplates';\nimport guid from '@/shared/utils/guid';\nimport { useMemo } from 'react';\nimport { useIntl } from 'react-intl';\nimport { listItemMsg } from '../../FormattedListValue';\nimport AutoComplete from '../select/AutoComplete';\nexport var TaskTemplateSelect = function (_a) {\n var initialValue = _a.initialValue, placeholder = _a.placeholder, onChange = _a.onChange, _b = _a.includeWithoutTemplate, includeWithoutTemplate = _b === void 0 ? true : _b, _c = _a.useTemplateInCallback, useTemplateInCallback = _c === void 0 ? false : _c;\n var formatMessage = useIntl().formatMessage;\n var data = useGetTaskTemplates().data;\n var taskTemplates = useMemo(function () {\n return data === null || data === void 0 ? void 0 : data.map(function (item) { return ({\n key: item.id,\n label: formatMessage(listItemMsg('taskTemplate', item.id, item.name)),\n resourceId: item.resourceId,\n }); }).sort(function (a, b) { return a.label.toLowerCase().localeCompare(b.label.toLowerCase()); });\n }, [data, formatMessage]);\n var items = useMemo(function () {\n if (!taskTemplates)\n return undefined;\n return includeWithoutTemplate\n ? __spreadArray([{ key: guid.empty, label: formatMessage(messages.TasksWithoutTemplate) }], taskTemplates, true) : taskTemplates;\n }, [formatMessage, taskTemplates, includeWithoutTemplate]);\n var initialSelectedItem = useMemo(function () { var _a; return (_a = (initialValue && (items === null || items === void 0 ? void 0 : items.find(function (item) { return (item === null || item === void 0 ? void 0 : item.key) === initialValue; })))) !== null && _a !== void 0 ? _a : undefined; }, [initialValue, items]);\n return (_jsx(AutoComplete, { items: items, initialSelectedItem: initialSelectedItem, placeholder: placeholder, mode: \"edit\", onChange: function (item) { return onChange(useTemplateInCallback ? item : item === null || item === void 0 ? void 0 : item.key); } }));\n};\nexport var FilterTaskTemplateSelect = function (_a) {\n var item = _a.item, clearItems = _a.clearItems, setFilter = _a.setFilter, activeFilters = _a.activeFilters, label = _a.label, isAlwaysVisible = _a.isAlwaysVisible, enabled = _a.enabled;\n return ({\n filterItem: item,\n enabled: enabled,\n filterSelectLabel: !isAlwaysVisible ? label : undefined,\n element: (_jsx(TaskTemplateSelect, { onChange: function (value) {\n var _a, _b;\n return setFilter((clearItems && !value\n ? __assign((_a = {}, _a[item] = undefined, _a), clearItems.reduce(function (prev, clearItem) {\n var _a;\n return (__assign(__assign({}, prev), (_a = {}, _a[clearItem] = undefined, _a)));\n }, {})) : (_b = {}, _b[item] = value !== null && value !== void 0 ? value : undefined, _b)));\n }, initialValue: activeFilters[item], placeholder: label })),\n });\n};\n","import { jsx as _jsx } from \"react/jsx-runtime\";\n/* eslint-disable react/require-default-props */\nimport { useIntl } from 'react-intl';\nimport { useMemo } from 'react';\nimport { mapInvoiceStreamName } from '@/shared/services/ObjectDisplayService';\nimport AutoComplete from './select/AutoComplete';\nexport var InvoiceStreamSelect = function (_a) {\n var initialValue = _a.initialValue, placeholder = _a.placeholder, onChange = _a.onChange, invoiceStreams = _a.invoiceStreams;\n var intl = useIntl();\n var items = useMemo(function () {\n var _a;\n return (_a = invoiceStreams === null || invoiceStreams === void 0 ? void 0 : invoiceStreams.filter(function (x) { return x.isActive || (!!initialValue && x.id === initialValue); })) === null || _a === void 0 ? void 0 : _a.map(function (item) { return ({\n key: item.id,\n label: mapInvoiceStreamName(item, intl),\n }); });\n }, [invoiceStreams, intl, initialValue]);\n var initialSelectedItem = useMemo(function () { var _a; return (_a = (initialValue && (items === null || items === void 0 ? void 0 : items.find(function (item) { return (item === null || item === void 0 ? void 0 : item.key) === initialValue; })))) !== null && _a !== void 0 ? _a : undefined; }, [initialValue, items]);\n return (_jsx(AutoComplete, { items: items, initialSelectedItem: initialSelectedItem, placeholder: placeholder, mode: \"edit\", onChange: function (item) { return onChange(item === null || item === void 0 ? void 0 : item.key); } }));\n};\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport DatePicker from '@/shared/components/input/DatePicker';\nimport { TaskTemplateSelect } from '@/shared/components/input/filterInputs/FilterTaskTemplateSelect';\nimport RelationSearch from '@/shared/components/input/RelationSearch';\nimport UserSearch from '@/shared/components/input/UserSearch';\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport { retrieveResources } from '@/shared/components/registration/resourceApi';\nimport ResourceAutoComplete from '@/shared/components/registration/ResourceAutoComplete';\nimport { useCreatePlannedTask } from '@/shared/hooks/task/useCreatePlannedTask';\nimport { useDataContext } from '@/shared/providers/DataProvider';\nimport AuthService from '@/shared/services/AuthService';\nimport { falseFunc, isBeforeMinimum } from '@/shared/utils/validationHelpers';\nimport classNames from 'classnames';\nimport moment from 'moment';\nimport { createRef, useEffect, useState } from 'react';\nimport { useIntl } from 'react-intl';\nimport Toggle from 'react-toggle';\nimport guid from '@/shared/utils/guid';\nimport { InvoiceStreamSelect } from '@/shared/components/input/InvoiceStreamSelect';\nimport { TaskTagsMultiSelect } from '@/shared/components/input/multiselect/TaskTagsMultiSelect';\nimport messages from './taskMessages';\nvar defaultTask = {\n taskLevel: 2,\n name: '',\n remark: '',\n deadline: moment(),\n userId: guid.empty,\n relation: undefined,\n invoiceStreamId: undefined,\n tags: [],\n};\nvar CreateOneTimeTask = function (_a) {\n var _b;\n var onSave = _a.onSave, onClose = _a.onClose, _c = _a.show, show = _c === void 0 ? false : _c, _d = _a.users, usersFromProps = _d === void 0 ? null : _d, _e = _a.relationId, initialRelationId = _e === void 0 ? null : _e;\n var intl = useIntl();\n var _f = useDataContext(), defaultCompany = _f.defaultCompany, usersFromDataCache = _f.users;\n var appendUserFromTaskTemplateToUsers = function (originalUsers) {\n var selectUserFromTaskTemplate = {\n id: guid.empty,\n name: \"\".concat(intl.formatMessage(messages.UserDefinedInTaskTemplate)),\n };\n return __spreadArray([selectUserFromTaskTemplate], originalUsers, true);\n };\n var _g = useState(appendUserFromTaskTemplateToUsers(usersFromProps || usersFromDataCache)), users = _g[0], setUsers = _g[1];\n var _h = useState(__assign(__assign({}, defaultTask), { resourceId: defaultCompany.defaultTaskResourceId })), task = _h[0], setTask = _h[1];\n var _j = useState(), resources = _j[0], setResources = _j[1];\n var form = createRef();\n var _k = useState(false), touchedTaskName = _k[0], setTouchedTaskName = _k[1];\n var _l = useState(false), touchedRelation = _l[0], setTouchedRelation = _l[1];\n var _m = useState(false), touchedTaskTemplate = _m[0], setTouchedTaskTemplate = _m[1];\n var _o = useState(false), touchedResource = _o[0], setTouchedResource = _o[1];\n var _p = useState(false), dateFocused = _p[0], setDateFocused = _p[1];\n var createPlannedTask = useCreatePlannedTask().createPlannedTask;\n var _q = useState(true), isTaskTemplate = _q[0], setIsTaskTemplate = _q[1];\n useEffect(function () {\n retrieveResources(intl, 0).then(function (response) {\n setResources(response);\n });\n }, [intl]);\n var saveTask = function () { return __awaiter(void 0, void 0, void 0, function () {\n var model;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if ((isTaskTemplate && !task.templateId) ||\n (!isTaskTemplate && !task.name) ||\n !task.relation ||\n !task.relation.invoiceStreamId ||\n !task.resourceId ||\n isBeforeMinimum(task.deadline)) {\n return [2 /*return*/];\n }\n model = __assign({}, task);\n model.deadline = moment.utc(model.deadline);\n model.taskLevel = 0; // This modal only creates main-tasks when no template was selected, or the backend will set the tasklevel correctly when a task template was selected\n if (model.userId === guid.empty)\n model.userId = null; // map user from task template to null (will be configured in backend)\n if (model.tags.length === 0)\n model.tags = null;\n return [4 /*yield*/, createPlannedTask(model)];\n case 1:\n _a.sent();\n onSave();\n return [2 /*return*/];\n }\n });\n }); };\n var closeModal = function () {\n onClose();\n };\n var deadlineChanged = function (deadline) {\n setTask(__assign(__assign({}, task), { deadline: deadline }));\n };\n var userChanged = function (user) {\n setTask(__assign(__assign({}, task), { userId: user ? user.id : null }));\n };\n var relationChanged = function (relation) {\n var _a, _b;\n setTouchedRelation(true);\n setTask(__assign(__assign({}, task), { invoiceStreamId: relation ? relation.invoiceStreamId : undefined, relationId: relation ? relation.id : undefined, relation: relation, assignmentTemplateId: (relation === null || relation === void 0 ? void 0 : relation.invoiceStreamId)\n ? (_b = (_a = relation === null || relation === void 0 ? void 0 : relation.invoiceStreams) === null || _a === void 0 ? void 0 : _a.find(function (x) { return x.id === relation.invoiceStreamId; })) === null || _b === void 0 ? void 0 : _b.assignmentTemplateId\n : null }));\n };\n var onInvoiceStreamChanged = function (invoiceStreamId) {\n var _a, _b, _c;\n setTask(__assign(__assign({}, task), { invoiceStreamId: invoiceStreamId, assignmentTemplateId: invoiceStreamId\n ? (_c = (_b = (_a = task.relation) === null || _a === void 0 ? void 0 : _a.invoiceStreams) === null || _b === void 0 ? void 0 : _b.find(function (x) { return x.id === invoiceStreamId; })) === null || _c === void 0 ? void 0 : _c.assignmentTemplateId\n : null }));\n };\n var onTaskTemplateChanged = function (template) {\n var _a;\n setTouchedTaskTemplate(true);\n setTask(__assign(__assign({}, task), { templateId: template === null || template === void 0 ? void 0 : template.key, resourceId: (_a = template === null || template === void 0 ? void 0 : template.resourceId) !== null && _a !== void 0 ? _a : defaultCompany.defaultTaskResourceId }));\n };\n var taskNameChanged = function (name) {\n setTouchedTaskName(true);\n setTask(__assign(__assign({}, task), { name: name }));\n };\n var onResourceChanged = function (resource) {\n setTouchedResource(true);\n if (resource === undefined)\n return;\n setTask(__assign(__assign({}, task), { resourceId: resource === null || resource === void 0 ? void 0 : resource.id }));\n };\n var onSetIsTaskTemplate = function (isTemplate) {\n setIsTaskTemplate(isTemplate);\n setTask(__assign(__assign({}, task), { userId: isTemplate ? guid.empty : AuthService.getUserId() }));\n };\n var onTagsChanged = function (tags) {\n setTask(__assign(__assign({}, task), { tags: tags.map(function (x) { return ({\n id: x,\n }); }) }));\n };\n var findSelectedUser = function (userId) { return (users ? users.find(function (x) { return x.id === userId; }) : null); };\n var selectedUser = findSelectedUser(task.userId);\n var taskNameClassName = classNames('form-group', {\n 'has-error': touchedTaskName && !task.name,\n });\n var relationClassName = classNames('form-group', {\n 'has-error': touchedRelation && (!task.relation || !task.relation.invoiceStreamId),\n });\n var taskTemplateClassName = classNames('form-group', {\n 'has-error': touchedTaskTemplate && !task.templateId,\n });\n var taskResourceClassName = classNames('form-group', {\n 'has-error': touchedResource && !task.resourceId,\n });\n return (_jsx(OkCancelModal, __assign({ title: intl.formatMessage(messages.AddOneTimeTask), show: show, onClose: closeModal, disabled: false, onSave: saveTask }, { children: show && (_jsx(\"form\", __assign({ ref: form }, { children: _jsxs(\"div\", __assign({ className: \"form-horizontal\" }, { children: [_jsxs(\"div\", __assign({ className: \"form-group\" }, { children: [_jsx(\"label\", __assign({ className: \"control-label col-sm-4\" }, { children: intl.formatMessage(messages.UseTaskTemplate) })), _jsx(\"div\", __assign({ className: \"col-sm-6\" }, { children: _jsx(Toggle, { checked: isTaskTemplate, onChange: function (e) { return onSetIsTaskTemplate(e.target.checked); } }) }))] })), _jsxs(\"div\", __assign({ className: relationClassName }, { children: [_jsx(\"label\", __assign({ className: \"control-label col-sm-4\" }, { children: intl.formatMessage(messages.Relation) })), _jsx(\"div\", __assign({ className: \"col-sm-6 \" }, { children: _jsx(RelationSearch, { onChange: relationChanged, changeOnInit: true, initialSelectedItem: initialRelationId ? { key: initialRelationId } : undefined }) }))] })), task.relation && task.relation.invoiceStreams.length > 1 ? (_jsxs(\"div\", __assign({ className: \"form-group\" }, { children: [_jsx(\"label\", __assign({ className: \"control-label col-sm-4\" }, { children: intl.formatMessage(messages.Assignment) })), _jsx(\"div\", __assign({ className: \"col-sm-6 \" }, { children: _jsx(InvoiceStreamSelect, { onChange: onInvoiceStreamChanged, initialValue: task.invoiceStreamId, invoiceStreams: task.relation.invoiceStreams }) }))] }))) : null, isTaskTemplate ? (_jsxs(\"div\", __assign({ className: taskTemplateClassName }, { children: [_jsx(\"label\", __assign({ className: \"control-label col-sm-4\" }, { children: intl.formatMessage(messages.Task) })), _jsx(\"div\", __assign({ className: \"col-sm-6 \" }, { children: _jsx(TaskTemplateSelect, { useTemplateInCallback: true, onChange: onTaskTemplateChanged, placeholder: intl.formatMessage(messages.Task), includeWithoutTemplate: false }) }))] }))) : (_jsxs(\"div\", __assign({ className: taskNameClassName }, { children: [_jsx(\"label\", __assign({ className: \"control-label col-sm-4\" }, { children: intl.formatMessage(messages.Description) })), _jsx(\"div\", __assign({ className: \"col-sm-6\" }, { children: _jsx(\"input\", { type: \"text\", autoFocus: true, value: task.name, placeholder: intl.formatMessage(messages.Description), onChange: function (e) { return taskNameChanged(e.target.value); }, required: true, className: \"form-control\" }) }))] }))), _jsxs(\"div\", __assign({ className: classNames('form-group', {\n 'has-error': isBeforeMinimum(task.deadline),\n }) }, { children: [_jsx(\"label\", __assign({ className: \"control-label col-sm-4\" }, { children: intl.formatMessage(messages.Deadline) })), _jsx(\"div\", __assign({ className: \"col-sm-6\" }, { children: _jsx(DatePicker, { placeholder: intl.formatMessage(messages.Deadline), date: task.deadline, onDateChange: deadlineChanged, focused: dateFocused, onFocusChange: function (_a) {\n var focused = _a.focused;\n return setDateFocused(focused);\n }, id: \"todoDeadline\", block: true, small: true, isOutsideRange: falseFunc, phrases: {}, numberOfMonths: 1 }) }))] })), _jsxs(\"div\", __assign({ className: \"form-group\" }, { children: [_jsx(\"label\", __assign({ className: \"control-label col-sm-4\" }, { children: intl.formatMessage(messages.AssignedTo) })), _jsx(\"div\", __assign({ className: \"col-sm-6\" }, { children: _jsx(UserSearch, { users: users, onChange: userChanged, value: selectedUser }) }))] })), _jsxs(\"div\", __assign({ className: taskResourceClassName }, { children: [_jsx(\"label\", __assign({ className: \"control-label col-sm-4\" }, { children: intl.formatMessage(messages.PriceListItem) })), _jsx(\"div\", __assign({ className: \"col-sm-6\" }, { children: _jsx(ResourceAutoComplete, { items: resources, placeholder: intl.formatMessage(messages.PriceListItem), onChange: onResourceChanged, emptyLabel: intl.formatMessage(messages.NoPriceListItemsFound), value: { id: task.resourceId }, crmType: (_b = task.relation) === null || _b === void 0 ? void 0 : _b.crm, assignmentTemplateId: task.assignmentTemplateId, required: true, intl: intl, disabled: false, small: false }) }))] })), _jsxs(\"div\", __assign({ className: \"form-group\" }, { children: [_jsx(\"label\", __assign({ className: \"control-label col-sm-4\" }, { children: intl.formatMessage(messages.Tags) })), _jsx(\"div\", __assign({ className: \"col-sm-6\" }, { children: _jsx(TaskTagsMultiSelect, { allowNew: true, selection: task.tags.map(function (x) { return x.id; }), onChange: onTagsChanged }) }))] })), _jsxs(\"div\", __assign({ className: \"form-group\" }, { children: [_jsx(\"label\", __assign({ className: \"control-label col-sm-4\" }, { children: intl.formatMessage(messages.Remark) })), _jsx(\"div\", __assign({ className: \"col-sm-6\" }, { children: _jsx(\"textarea\", { id: \"RemarkField\", className: \"form-control input-sm vertical-resize\", value: task.remark, maxLength: 4000, onChange: function (e) {\n return setTask(__assign(__assign({}, task), { remark: e.target.value }));\n } }) }))] }))] })) }))) })));\n};\nexport default CreateOneTimeTask;\n","import config from '@/config';\nimport api from '@/shared/api';\nimport { useMutation, useQueryClient } from '@tanstack/react-query';\nimport { useIntl } from 'react-intl';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport { insertNewMainTask } from '@/shared/utils/infiniteDataHelper';\nimport { TaskQueryKey } from './queryKey';\nexport var useCreatePlannedTask = function () {\n var intl = useIntl();\n var queryClient = useQueryClient();\n var _a = useMutation(function (values) {\n return api.base\n .post(\"\".concat(config.appUrls.tasks, \"/api/plannedTasks\"), values)\n .then(function (res) { return res.data; });\n }, {\n onSuccess: function (data) {\n queryClient.setQueryData([TaskQueryKey.PlannedTasks], function (oldData) {\n return insertNewMainTask(oldData, data);\n });\n },\n onError: function (apiError) {\n handleHttpError(intl)(apiError);\n },\n }), mutateAsync = _a.mutateAsync, isLoading = _a.isLoading, error = _a.error;\n return {\n createPlannedTask: mutateAsync,\n isLoading: isLoading,\n error: error,\n };\n};\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport './style.scss';\nimport { dynamicSort } from \"@/shared/utils/dynamicSort\";\nexport var Scope = function (_a) {\n var title = _a.title, scopes = _a.scopes, onScopeToggled = _a.onScopeToggled, selectedScopes = _a.selectedScopes, disabled = _a.disabled;\n var selected = function (scope) { return selectedScopes.indexOf(scope) > -1; };\n return _jsxs(\"div\", __assign({ className: \"scopes-set\" }, { children: [_jsx(\"h5\", { children: title }), _jsx(\"div\", __assign({ className: \"scopes\" }, { children: scopes.sort(dynamicSort('displayName')).map(function (scope) { return _jsxs(\"div\", __assign({ className: \"scope\" }, { children: [_jsx(\"input\", { disabled: disabled, checked: selected(scope.name), onChange: function () { return onScopeToggled(scope.name); }, type: \"checkbox\", id: scope.name, title: scope.description }), _jsx(\"label\", __assign({ htmlFor: scope.name, title: scope.description }, { children: scope.displayName }))] }), scope.name); }) }))] }));\n};\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport { createRef, useState } from 'react';\nimport { useIntl } from 'react-intl';\nimport { messages } from './accessTokenMessages';\nimport { useGetClients } from \"@/shared/hooks/accessTokens/useGetClients\";\nimport { useGetScopes } from \"@/shared/hooks/accessTokens/useGetScopes\";\nimport DatePicker from '@/shared/components/input/DatePicker';\nimport classNames from 'classnames';\nimport { isBefore, isBeforeMinimum, isBeforeTomorrow } from '@/shared/utils/validationHelpers';\nimport moment from 'moment';\nimport { groupBy } from \"@/shared/utils/groupBy\";\nimport { Scope } from \"./scope/Scope\";\nimport { useModalContext } from '@/shared/providers/ModalProvider';\nimport { useCreateAcccessToken } from \"@/shared/hooks/accessTokens/useCreateAccessToken\";\nimport { useQueryClient } from \"@tanstack/react-query\";\nimport { AccessTokenQueryKey } from '@/shared/hooks/accessTokens/queryKey';\nimport './CreateAccessToken.scss';\nvar DefaultTokenRequest = {\n scopes: [],\n expires: moment().add(1, 'day'),\n name: '',\n clientId: ''\n};\nvar CreateAccessToken = function (_a) {\n var _b = _a.show, show = _b === void 0 ? false : _b;\n var setShowModalInfo = useModalContext().setShowModalInfo;\n var intl = useIntl();\n var _c = useState(false), loading = _c[0], setLoading = _c[1];\n var clients = useGetClients();\n var scopes = useGetScopes();\n var _d = useState(null), createdToken = _d[0], setCreatedToken = _d[1];\n var createAccessToken = useCreateAcccessToken().createAccessToken;\n var queryClient = useQueryClient();\n var form = createRef();\n var _e = useState(false), expiredFocused = _e[0], setExpiredFocused = _e[1];\n var _f = useState(__assign({}, DefaultTokenRequest)), tokenRequest = _f[0], setTokenRequest = _f[1];\n var valueChanged = function (key, value) {\n var _a;\n setTokenRequest(__assign(__assign({}, tokenRequest), (_a = {}, _a[key] = value, _a)));\n };\n var createToken = function () { return __awaiter(void 0, void 0, void 0, function () {\n var scopes_1, expires, clientId, name_1, newToken;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!!createdToken) return [3 /*break*/, 3];\n scopes_1 = tokenRequest.scopes, expires = tokenRequest.expires, clientId = tokenRequest.clientId, name_1 = tokenRequest.name;\n if (scopes_1.length === 0 || !expires || !clientId || !name_1)\n return [2 /*return*/];\n setLoading(true);\n return [4 /*yield*/, createAccessToken(__assign(__assign({}, tokenRequest), { expires: tokenRequest.expires.toISOString() }))];\n case 1:\n newToken = _a.sent();\n setCreatedToken(newToken);\n return [4 /*yield*/, queryClient.invalidateQueries([AccessTokenQueryKey.AccessTokens])];\n case 2:\n _a.sent();\n setLoading(false);\n return [2 /*return*/];\n case 3:\n setShowModalInfo({});\n return [2 /*return*/];\n }\n });\n }); };\n var closeModal = function () {\n setShowModalInfo({});\n };\n var onScopeToggle = function (name) {\n var currentIndex = tokenRequest.scopes.indexOf(name);\n if (currentIndex > -1) {\n setTokenRequest(__assign(__assign({}, tokenRequest), { scopes: tokenRequest.scopes.filter(function (x) { return x !== name; }) }));\n }\n else {\n setTokenRequest(__assign(__assign({}, tokenRequest), { scopes: __spreadArray(__spreadArray([], tokenRequest.scopes, true), [name], false) }));\n }\n };\n var selectAllScopes = function () {\n setTokenRequest(__assign(__assign({}, tokenRequest), { scopes: __spreadArray([], scopes.data.map(function (x) { return x.name; }), true) }));\n };\n var unselectAllScopes = function () {\n setTokenRequest(__assign(__assign({}, tokenRequest), { scopes: [] }));\n };\n var renderScopes = function () {\n var data = scopes.data;\n var dataWithPrefix = data.map(function (scope) { return (__assign(__assign({}, scope), { prefix: scope.name.split('.')[0] })); });\n var grouped = groupBy(dataWithPrefix, function (x) { return x.prefix; });\n var keys = Object.keys(grouped);\n return keys.map(function (x) { return _jsx(Scope, { title: x, scopes: grouped[x], disabled: !!createdToken, selectedScopes: tokenRequest.scopes, onScopeToggled: onScopeToggle }, x); });\n };\n var copy = function () { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, navigator.clipboard.writeText(createdToken)];\n case 1:\n _a.sent();\n return [2 /*return*/];\n }\n });\n }); };\n var renderClients = function () {\n var renderName = function (name) { return name === 'MyOffice'\n ? intl.formatMessage(messages.MyOffice)\n : name; };\n return clients.data.map(function (x) { return _jsxs(\"option\", __assign({ value: x.id }, { children: [renderName(x.name), \" \", x.description && (\"| \".concat(x.description))] }), x.id); });\n };\n return (_jsx(OkCancelModal, __assign({ title: intl.formatMessage(messages.CreateAccessToken), show: show, onClose: closeModal, disabled: loading, onSave: createToken, zendeskArticle: \"8331100368924\" }, { children: show && !clients.isLoading && !scopes.isLoading && _jsxs(\"form\", __assign({ ref: form }, { children: [createdToken && _jsx(\"div\", __assign({ className: \"form-group\" }, { children: _jsxs(\"div\", __assign({ className: \"alert alert-success\", role: \"alert\" }, { children: [intl.formatMessage(messages.TokenCreated), \" \", _jsx(\"strong\", { children: createdToken }), \" \", _jsx(\"i\", { style: { cursor: \"pointer\" }, onClick: copy, className: \"fa fa-copy\" }), \" .\"] })) })), _jsxs(\"div\", __assign({ className: \"form-horizontal\" }, { children: [_jsxs(\"div\", __assign({ className: \"form-group\" }, { children: [_jsx(\"label\", __assign({ className: \"col-sm-2 create-access-token-label\" }, { children: intl.formatMessage(messages.Name) })), _jsx(\"div\", __assign({ className: \"col-sm-10\" }, { children: _jsx(\"input\", { disabled: !!createdToken, type: \"text\", autoFocus: true, value: tokenRequest.name, placeholder: intl.formatMessage(messages.Name), onChange: function (e) { return valueChanged('name', e.target.value); }, required: true, className: \"form-control\" }) }))] })), _jsxs(\"div\", __assign({ className: classNames('form-group', {\n 'has-error': isBeforeMinimum(tokenRequest.expires) || !isBefore(tokenRequest.expires, moment().add(5, 'year')),\n }) }, { children: [_jsx(\"label\", __assign({ className: \"col-sm-2 create-access-token-label\" }, { children: intl.formatMessage(messages.Expires) })), _jsx(\"div\", __assign({ className: \"col-sm-10\" }, { children: _jsx(DatePicker, { placeholder: intl.formatMessage(messages.Expires), date: tokenRequest.expires, onDateChange: function (e) { return valueChanged('expires', e); }, focused: expiredFocused, onFocusChange: function (_a) {\n var focused = _a.focused;\n return setExpiredFocused(focused);\n }, block: true, small: true, isOutsideRange: function (date) { return isBeforeTomorrow(date) || !isBefore(date, moment().add(5, 'year')); }, phrases: {}, numberOfMonths: 1, disabled: !!createdToken }) }))] })), _jsxs(\"div\", __assign({ className: 'form-group' }, { children: [_jsx(\"label\", __assign({ className: \"col-sm-2 create-access-token-label\" }, { children: intl.formatMessage(messages.Client) })), _jsx(\"div\", __assign({ className: \"col-sm-10\" }, { children: _jsxs(\"select\", __assign({ className: \"form-control\", disabled: !!createdToken, onChange: function (e) { return valueChanged('clientId', e.target.value); } }, { children: [_jsx(\"option\", {}), renderClients()] })) }))] })), _jsxs(\"div\", __assign({ className: \"form-group\" }, { children: [_jsx(\"div\", __assign({ className: \"col-sm-12\" }, { children: renderScopes() })), _jsxs(\"div\", __assign({ className: \"col-sm-12\" }, { children: [_jsx(\"button\", __assign({ type: \"button\", disabled: !!createdToken, onClick: unselectAllScopes, className: \"btn btn-default\" }, { children: intl.formatMessage(messages.UnselectAll) })), _jsx(\"button\", __assign({ type: \"button\", disabled: !!createdToken, onClick: selectAllScopes, className: \"btn btn-secondary margin10L\" }, { children: intl.formatMessage(messages.SelectAll) }))] }))] }))] }))] })) })));\n};\nexport default CreateAccessToken;\n","import config from '@/config';\nimport api from '@/shared/api';\nimport { useQuery } from '@tanstack/react-query';\nimport { useIntl } from 'react-intl';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport { AccessTokenQueryKey } from './queryKey';\nexport var useGetClients = function () {\n var intl = useIntl();\n var _a = useQuery([AccessTokenQueryKey.GetClients], function () {\n return api.base\n .get(\"\".concat(config.appUrls.identity, \"/api/profile/pats/clients\"))\n .then(function (res) { return res.data; });\n }, {\n enabled: true,\n onError: function (apiError) {\n handleHttpError(intl)(apiError);\n },\n retry: false,\n }), data = _a.data, isLoading = _a.isLoading, error = _a.error, refetch = _a.refetch;\n return {\n data: data,\n error: error,\n isLoading: isLoading,\n refetch: refetch,\n };\n};\n","import config from '@/config';\nimport api from '@/shared/api';\nimport { useQuery } from '@tanstack/react-query';\nimport { useIntl } from 'react-intl';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport { AccessTokenQueryKey } from './queryKey';\nexport var useGetScopes = function () {\n var intl = useIntl();\n var _a = useQuery([AccessTokenQueryKey.GetScopes], function () {\n return api.base\n .get(\"\".concat(config.appUrls.identity, \"/api/profile/pats/scopes\"))\n .then(function (res) { return res.data; });\n }, {\n enabled: true,\n onError: function (apiError) {\n handleHttpError(intl)(apiError);\n },\n retry: false,\n }), data = _a.data, isLoading = _a.isLoading, error = _a.error, refetch = _a.refetch;\n return {\n data: data,\n error: error,\n isLoading: isLoading,\n refetch: refetch,\n };\n};\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport config from '@/config';\nimport api from '@/shared/api';\nimport { useMutation } from '@tanstack/react-query';\nimport { useIntl } from 'react-intl';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nexport var useCreateAcccessToken = function () {\n var intl = useIntl();\n var _a = useMutation(function (values) { return api.base\n .post(\"\".concat(config.appUrls.identity, \"/api/profile/pats\"), __assign(__assign({}, values), { expires: parseInt(((new Date(values.expires).getTime() - new Date().getTime()) / 1000).toFixed()) }))\n .then(function (res) { return res.data; }); }, {\n onError: function (apiError) {\n handleHttpError(intl)(apiError);\n }\n }), mutateAsync = _a.mutateAsync, isLoading = _a.isLoading, error = _a.error;\n return {\n createAccessToken: mutateAsync,\n isLoading: isLoading,\n error: error,\n };\n};\n","export var groupBy = function (list, getKey) {\n return list.reduce(function (previous, currentItem) {\n var group = getKey(currentItem);\n if (!previous[group])\n previous[group] = [];\n previous[group].push(currentItem);\n return previous;\n }, {});\n};\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport TaskDetailsModal from '@/modules/tasks/taskDetails/TaskDetailsModal';\nimport { getRelationName } from '@/shared/components/RelationName';\nimport ShareItemModal from '@/shared/components/ShareItemModal';\nimport YesNoModal from '@/shared/components/YesNoModal';\nimport { useDataContext } from '@/shared/providers/DataProvider';\nimport AuthService, { privileges } from '@/shared/services/AuthService';\nimport { useQueryClient } from '@tanstack/react-query';\nimport React, { useContext, useMemo, useState } from 'react';\nimport { useIntl } from 'react-intl';\nimport SingleRelationMailModal from '@/shared/components/email/SingleRelationMailModal';\nimport RegistrationModal from '@/shared/components/registration/RegistrationModal';\nimport CreateOneTimeTask from '@/modules/tasks/CreateOneTimeTask';\nimport CreateAccessToken from '@/modules/profile/accessTokens/CreateAccessToken';\nimport CheckboxListModal from '@/shared/components/CheckboxListModal';\nimport DocumentDetailsModal from '@/modules/documents/details/DocumentDetailsModal';\nimport { TaskQueryKey } from '../hooks/task/queryKey';\nimport { getRegistrationModalPropsForTask } from '../components/registration/registrationHelpers';\nimport { useSendTaskMail } from '../hooks/template/useSendTaskMail';\nimport { useCreateTaskEmail } from '../hooks/emails/useCreateTaskMail';\nimport { getShareItemNameForTask } from '../services/ObjectDisplayService';\nexport var ModalType;\n(function (ModalType) {\n ModalType[ModalType[\"TaskDetail\"] = 1] = \"TaskDetail\";\n ModalType[ModalType[\"Share\"] = 2] = \"Share\";\n ModalType[ModalType[\"Delete\"] = 3] = \"Delete\";\n ModalType[ModalType[\"YesNo\"] = 4] = \"YesNo\";\n ModalType[ModalType[\"TaskMail\"] = 5] = \"TaskMail\";\n ModalType[ModalType[\"TimeRegistration\"] = 6] = \"TimeRegistration\";\n ModalType[ModalType[\"OneTimeTask\"] = 7] = \"OneTimeTask\";\n ModalType[ModalType[\"CreatePat\"] = 8] = \"CreatePat\";\n ModalType[ModalType[\"CheckboxList\"] = 9] = \"CheckboxList\";\n ModalType[ModalType[\"DocumentDetail\"] = 10] = \"DocumentDetail\";\n})(ModalType || (ModalType = {}));\nexport var ModalContext = React.createContext(null);\nexport var useModalContext = function () {\n var ctx = useContext(ModalContext);\n if (!ctx) {\n throw new Error('Wrap app with ModalProvider');\n }\n return ctx;\n};\nvar ModalProvider = function (_a) {\n var childElements = _a.children;\n var intl = useIntl();\n var _b = useState({}), showModalInfo = _b[0], setShowModalInfo = _b[1];\n var sendTaskMail = useSendTaskMail().sendTaskMail;\n var createTaskEmail = useCreateTaskEmail().createTaskEmail;\n var queryClient = useQueryClient();\n var _c = useDataContext(), users = _c.users, defaultCompany = _c.defaultCompany, userLanguage = _c.userLanguage;\n var canEditTasks = useMemo(function () {\n return AuthService.hasPermission({\n functionality: 'PlannedTask',\n privilege: privileges.Update,\n });\n }, []);\n var canEditDocuments = useMemo(function () {\n return AuthService.hasPermission({\n functionality: 'Documents',\n privilege: privileges.Update,\n });\n }, []);\n var modalType = showModalInfo.modalType, task = showModalInfo.task, title = showModalInfo.title, message = showModalInfo.message, registration = showModalInfo.registration, relationId = showModalInfo.relationId, documentId = showModalInfo.documentId, checkboxListItems = showModalInfo.checkboxListItems, showSelectAll = showModalInfo.showSelectAll, onSave = showModalInfo.onSave, onClose = showModalInfo.onClose, onTaskMailModalSaved = showModalInfo.onTaskMailModalSaved;\n var value = useMemo(function () { return ({\n showModalInfo: showModalInfo,\n setShowModalInfo: setShowModalInfo,\n }); }, [showModalInfo, setShowModalInfo]);\n var mapPropertiesAfterStatusChange = function (source, target) {\n if (!source || !target)\n return;\n target.status = source.status;\n target.isBlocked = source.isBlocked;\n target.inapplicable = source.inapplicable;\n target.rejected = source.rejected;\n target.taskColor = source.taskColor;\n target.deadline = source.deadline;\n target.userId = source.userId;\n target.name = source.name;\n target.remark = source.remark;\n target.hasRemark = source.hasRemark;\n target.scheduleHasRemark = source.scheduleHasRemark;\n target.year = source.year;\n };\n var onTaskDetailModalSave = function (updatedTasks) { return __awaiter(void 0, void 0, void 0, function () {\n var previousTasks;\n return __generator(this, function (_a) {\n previousTasks = queryClient.getQueryData([TaskQueryKey.PlannedTasks]);\n updatedTasks.forEach(function (newOrUpdatedTask) {\n var _a;\n var updatedTasksQueryData = __assign({}, previousTasks);\n var previousMainTasks = (_a = updatedTasksQueryData === null || updatedTasksQueryData === void 0 ? void 0 : updatedTasksQueryData.pages) === null || _a === void 0 ? void 0 : _a.flat(1);\n var isMainTask = !newOrUpdatedTask.parentId;\n var previousMainTask = previousMainTasks.find(function (x) { return x.id === (isMainTask ? newOrUpdatedTask.id : newOrUpdatedTask.parentId); });\n if (previousMainTask) {\n var children = previousMainTask.children;\n var updatedMainTask = isMainTask ? newOrUpdatedTask : newOrUpdatedTask.parent;\n mapPropertiesAfterStatusChange(updatedMainTask, previousMainTask);\n if (!isMainTask) {\n var previousSubtask = children.find(function (x) { return x.id === newOrUpdatedTask.id; });\n queryClient.invalidateQueries([TaskQueryKey.Remark, newOrUpdatedTask.id]);\n if (previousSubtask) {\n mapPropertiesAfterStatusChange(newOrUpdatedTask, previousSubtask);\n }\n else {\n children = __spreadArray(__spreadArray([], children, true), [newOrUpdatedTask], false);\n }\n previousMainTask.children = __spreadArray([], children, true); // useEffect in KanbanBoard.tsx is not called without this line, and we need it to trigger the reshuffling of columns\n }\n else {\n queryClient.invalidateQueries([TaskQueryKey.Remark, newOrUpdatedTask.id]);\n }\n }\n queryClient.setQueryData([TaskQueryKey.PlannedTasks], updatedTasksQueryData);\n });\n setShowModalInfo({});\n return [2 /*return*/];\n });\n }); };\n var onTaskDetailModalClosed = function () { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n setShowModalInfo({});\n return [2 /*return*/];\n });\n }); };\n var onRegistrationCreated = function () { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n setShowModalInfo({});\n return [2 /*return*/];\n });\n }); };\n var onCloseTimeRegistration = function () { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n setShowModalInfo({});\n return [2 /*return*/];\n });\n }); };\n var onSaveEmail = function (emailViewModel) { return __awaiter(void 0, void 0, void 0, function () {\n var emailId, sendTaskMailModel;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, createTaskEmail({\n taskId: task.id,\n relationId: (task.relation && task.relation.id) || task.relationId,\n })];\n case 1:\n emailId = (_a.sent()).id;\n sendTaskMailModel = __assign(__assign({}, emailViewModel), { emailId: emailId, language: userLanguage, linkType: emailViewModel.emailLinkType, recipients: emailViewModel.to, templateID: emailViewModel.emailTemplateId });\n return [4 /*yield*/, sendTaskMail(sendTaskMailModel)];\n case 2:\n _a.sent();\n setShowModalInfo({});\n return [4 /*yield*/, (onSave === null || onSave === void 0 ? void 0 : onSave())];\n case 3:\n _a.sent();\n return [2 /*return*/];\n }\n });\n }); };\n var onCloseModal = function () { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n setShowModalInfo({});\n return [4 /*yield*/, (onClose === null || onClose === void 0 ? void 0 : onClose())];\n case 1:\n _a.sent();\n return [2 /*return*/];\n }\n });\n }); };\n var onOneTimeTaskCreated = function () { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, queryClient.invalidateQueries([TaskQueryKey.KPI])];\n case 1:\n _a.sent();\n setShowModalInfo({});\n return [2 /*return*/];\n }\n });\n }); };\n var onCloseOneTimeTask = function () { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n setShowModalInfo({});\n return [2 /*return*/];\n });\n }); };\n var renderModal = function () {\n switch (modalType) {\n case ModalType.TaskDetail: {\n if (!task)\n return undefined;\n return (_jsx(TaskDetailsModal, { intl: intl, show: true, users: users, task: task, onSave: onTaskDetailModalSave, onClose: onTaskDetailModalClosed, onTaskMailModalSaved: onTaskMailModalSaved, disabled: !canEditTasks }));\n }\n case ModalType.Share:\n if (!task)\n return undefined;\n return (_jsx(ShareItemModal, { show: true, type: \"task\", id: task.id, itemName: getShareItemNameForTask(task, intl), relationId: task.relationId, relationName: getRelationName(intl, task.relation), onClose: function () { return setShowModalInfo({}); } }));\n case ModalType.YesNo:\n return (_jsx(YesNoModal, { intl: intl, show: true, title: title, message: message, onNo: onCloseModal, onSave: function () {\n onSave();\n setShowModalInfo({});\n } }));\n case ModalType.TaskMail:\n if (!task)\n return undefined;\n return (_jsx(SingleRelationMailModal, { intl: intl, show: true, relationId: (task.relation && task.relation.id) || task.relationId, companyId: defaultCompany.id, task: task, emailContext: 11, onClose: onCloseModal, onSave: onSaveEmail, type: \"task\" }));\n case ModalType.TimeRegistration:\n if (!task)\n return undefined;\n return (_jsx(RegistrationModal, __assign({}, getRegistrationModalPropsForTask(task, registration), { show: true, onSave: onRegistrationCreated, onClose: onCloseTimeRegistration, disabled: !canEditTasks })));\n case ModalType.OneTimeTask:\n return (_jsx(CreateOneTimeTask, { show: true, users: users, onSave: onOneTimeTaskCreated, onClose: onCloseOneTimeTask, relationId: relationId }));\n case ModalType.CreatePat:\n return _jsx(CreateAccessToken, { show: true });\n case ModalType.CheckboxList:\n return (_jsx(CheckboxListModal, { title: title, items: checkboxListItems, onClose: onCloseModal, onSave: function (items) {\n onSave(items);\n setShowModalInfo({});\n }, show: true, sortByLabel: false, showSelectAll: showSelectAll }));\n case ModalType.DocumentDetail:\n return (_jsx(DocumentDetailsModal, { documentId: documentId, show: true, onSave: function (updatedDocuments) {\n // onSave(items);\n setShowModalInfo({});\n }, onClose: onCloseModal, disabled: !canEditDocuments }));\n default:\n return undefined;\n }\n };\n return (_jsxs(ModalContext.Provider, __assign({ value: value }, { children: [renderModal(), childElements] })));\n};\nexport default ModalProvider;\n","import config from '@/config';\nimport api from '@/shared/api';\nimport { useMutation } from '@tanstack/react-query';\nimport { useIntl } from 'react-intl';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nexport var useSendTaskMail = function () {\n var intl = useIntl();\n var _a = useMutation(function (values) {\n return api.base\n .post(\"\".concat(config.appUrls.api, \"/api/template/sendTaskMail\"), values)\n .then(function (res) { return res.data; });\n }, {\n onError: function (e) {\n handleHttpError(intl)(e);\n },\n }), mutateAsync = _a.mutateAsync, isLoading = _a.isLoading, error = _a.error;\n return {\n sendTaskMail: mutateAsync,\n isLoading: isLoading,\n error: error,\n };\n};\n","import config from '@/config';\nimport api from '@/shared/api';\nimport { useMutation } from '@tanstack/react-query';\nimport { useIntl } from 'react-intl';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nexport var useCreateTaskEmail = function () {\n var intl = useIntl();\n var _a = useMutation(function (values) {\n return api.base\n .post(\"\".concat(config.appUrls.documents, \"/api/emails/TaskEmail/\").concat(values.taskId, \"/\").concat(values.relationId))\n .then(function (res) { return res.data; });\n }, {\n onError: function (e) {\n handleHttpError(intl)(e);\n },\n }), mutateAsync = _a.mutateAsync, isLoading = _a.isLoading, error = _a.error;\n return {\n createTaskEmail: mutateAsync,\n isLoading: isLoading,\n error: error,\n };\n};\n","export var TaskQueryKey;\n(function (TaskQueryKey) {\n TaskQueryKey[\"PlannedTasks\"] = \"PlannedTasks\";\n TaskQueryKey[\"Remark\"] = \"PlannedTasks/remark\";\n TaskQueryKey[\"TaskAttachments\"] = \"PlannedTasks/attachments\";\n TaskQueryKey[\"AssignedUser\"] = \"AssignedUser\";\n TaskQueryKey[\"KPI\"] = \"PlannedTasks/kpi\";\n TaskQueryKey[\"TaskTemplates\"] = \"Task/Templates\";\n TaskQueryKey[\"SubtaskTemplates\"] = \"Subtask/Templates\";\n TaskQueryKey[\"ResourceTags\"] = \"Resource/Tags\";\n TaskQueryKey[\"MyTeams\"] = \"Teams/MyTeams\";\n TaskQueryKey[\"TaskPeriodicity\"] = \"Task/Periodicity\";\n TaskQueryKey[\"AssignmentTemplates\"] = \"Assignment/Templates\";\n TaskQueryKey[\"TaskTags\"] = \"Task/Tags\";\n TaskQueryKey[\"TaskDocumentation\"] = \"Task/Documentation\";\n TaskQueryKey[\"TaskWidgetKPI\"] = \"PlannedTasks/kpi/widget\";\n})(TaskQueryKey || (TaskQueryKey = {}));\n","export var AccessTokenQueryKey;\n(function (AccessTokenQueryKey) {\n AccessTokenQueryKey[\"AccessTokens\"] = \"AccessTokens\";\n AccessTokenQueryKey[\"GetClients\"] = \"AccessTokens/Clients\";\n AccessTokenQueryKey[\"GetScopes\"] = \"AccessTokens/Scopes\";\n})(AccessTokenQueryKey || (AccessTokenQueryKey = {}));\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { injectIntl, useIntl } from 'react-intl';\nimport { isEqual } from 'lodash';\nimport moment from 'moment';\n\nimport intlShape from '@/shared/utils/intlShape';\nimport RegistrationComponent from '@/shared/components/registration/RegistrationComponent';\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport ToastrService from '@/shared/services/ToastrService';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport AuthService, { functionalities } from '@/shared/services/AuthService';\n\nimport {\n createEmptyRegistration,\n executeAction,\n isRegistrationValid,\n registrationShape,\n} from './registrationHelpers';\nimport { createOrUpdateInteraction } from './resourceApi';\nimport messages from './registrationMessages';\n\nclass RegistrationModal extends Component {\n state = {\n registration: null,\n };\n\n componentDidMount() {\n const { registration: initRegistration } = this.props;\n\n const registration = createEmptyRegistration(initRegistration);\n\n this.setState({ registration });\n }\n\n doRegistrationAction = (action, value) => {\n this.setState(({ registration }) => {\n const newValue = executeAction(registration, action, value);\n if (isEqual(newValue, registration)) return {};\n return { registration: newValue };\n });\n };\n saveRegistration = () => {\n if (this.isFormInvalid()) return;\n const { intl, onSave } = this.props;\n const { registration } = this.state;\n\n const model = { ...registration };\n delete model.orgInteraction;\n if (registration.id) {\n return api.base.put(`${config.appUrls.api}/api/Registration/PUT`, [model]).then(\n ({ data }) => {\n const [saveRegistration = null] = data;\n if (saveRegistration) {\n ToastrService.success(intl.formatMessage(messages.RegistrationModified));\n createOrUpdateInteraction(registration, saveRegistration.group).then(() => {\n onSave(saveRegistration);\n });\n }\n },\n error => {\n handleHttpError(intl)(error);\n },\n );\n }\n return api.base.post(`${config.appUrls.api}/api/Registration/POST`, [model]).then(\n ({ data }) => {\n const [saveRegistration = null] = data;\n if (saveRegistration) {\n let content = (model.resource && model.resource.label) || '';\n\n if (\n (model.type === 0 || model.type === 3 || model.type === 4) &&\n model.durationMinutes > 0\n ) {\n const formattedDuration = moment\n .duration(model.durationMinutes, 'minutes')\n .format('hh:mm', {\n trim: false,\n });\n content = `${formattedDuration} ${content}`;\n }\n\n ToastrService.info(content, intl.formatMessage(messages.Registered));\n createOrUpdateInteraction(registration, saveRegistration.group).then(() => {\n onSave(saveRegistration);\n });\n }\n },\n error => {\n handleHttpError(intl)(error);\n },\n );\n };\n isFormInvalid = () => {\n const { registration } = this.state;\n const { registrationOptions } = this.props;\n if (!isRegistrationValid(registration, registrationOptions)) return true;\n return false;\n };\n showValidation = () => this.setState({ showValidation: true });\n hasSavePermission = () => {\n const { registration } = this.state;\n if (!registration) return false;\n if (registration.userId && registration.userId !== AuthService.getUserId())\n return AuthService.hasPermission({\n functionality: functionalities.RegistrationOthers,\n privilege: 'Update',\n });\n return AuthService.hasPermission({\n functionality: functionalities.RegistrationOwn,\n privilege: 'Update',\n });\n };\n getModalTitle = () => {\n const { registration } = this.state;\n const { intl } = this.props;\n\n if (registration) {\n const isNew = !registration.id;\n switch (registration.type) {\n case 0:\n case 1:\n case 2:\n return intl.formatMessage(isNew ? messages.AddRegistration : messages.EditRegistration);\n case 3:\n return intl.formatMessage(isNew ? messages.AddAbsence : messages.EditAbsence);\n case 4:\n return intl.formatMessage(isNew ? messages.AddRecuperation : messages.EditRecuperation);\n }\n }\n\n return intl.formatMessage(messages.Registration);\n };\n\n render() {\n const { show, intl, onClose, registrationOptions, defaultResourceId, mainTaskId } = this.props;\n const { registration, showValidation } = this.state;\n const hasRegistrationPermission = this.hasSavePermission();\n return (\n \n
    \n {registration ? (\n \n ) : null}\n
    \n \n );\n }\n}\n\nRegistrationModal.propTypes = {\n registration: registrationShape,\n onSave: PropTypes.func.isRequired,\n intl: intlShape.isRequired,\n onClose: PropTypes.func.isRequired,\n show: PropTypes.bool,\n registrationOptions: PropTypes.shape({}),\n // Select this resource on init (if available)\n defaultResourceId: PropTypes.string,\n // If the mainTaskId is provided, only this mainTask and its subtasks can be selected\n mainTaskId: PropTypes.string,\n};\n\nRegistrationModal.defaultProps = {\n show: false,\n defaultResourceId: null,\n mainTaskId: null,\n registration: null,\n registrationOptions: {},\n};\nexport default injectIntl(RegistrationModal);\n","import config from '@/config';\nimport api from '@/shared/api';\nimport { useQuery } from '@tanstack/react-query';\nimport { useIntl } from 'react-intl';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport { TaskQueryKey } from './queryKey';\nexport var useGetTaskTemplates = function () {\n var intl = useIntl();\n var _a = useQuery([TaskQueryKey.TaskTemplates], function () {\n return api.base\n .get(\"\".concat(config.appUrls.tasks, \"/api/TaskTemplates\"))\n .then(function (res) { return res.data; });\n }, {\n enabled: true,\n onError: function (apiError) {\n handleHttpError(intl)(apiError);\n },\n retry: false,\n }), data = _a.data, isLoading = _a.isLoading, error = _a.error, refetch = _a.refetch;\n return {\n data: data,\n error: error,\n isLoading: isLoading,\n refetch: refetch,\n };\n};\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nexport var updateInfiniteDataItem = function (oldData, matchFunc, updateFunc) {\n var newPages = oldData === null || oldData === void 0 ? void 0 : oldData.pages.map(function (page) { return page.map(function (x) { return (matchFunc(x) ? updateFunc(x) : x); }); });\n return __assign(__assign({}, oldData), { pages: newPages });\n};\nexport var updateInfiniteDataItemById = function (oldData, updatedItem, updateFunc) {\n if (updateFunc === void 0) { updateFunc = function (a, b) { return (__assign(__assign({}, a), b)); }; }\n return updateInfiniteDataItem(oldData, function (x) { return x.id === updatedItem.id; }, function (a) { return updateFunc(a, updatedItem); });\n};\nexport var findById = function (data, id) { return data === null || data === void 0 ? void 0 : data.pages.flat(1).find(function (x) { return x.id === id; }); };\nexport var findTaskById = function (data, id) {\n for (var p = 0; p < data.pages.length; p += 1) {\n var page = data.pages[p];\n for (var m = 0; m < page.length; m += 1) {\n var mainTask = page[m];\n if (mainTask.id === id)\n return {\n task: mainTask,\n mainTask: mainTask,\n mainTaskIndex: m,\n pageIndex: p,\n };\n // Try searching in children\n if (mainTask.children) {\n for (var s = 0; s < mainTask.children.length; s += 1) {\n var subTask = mainTask.children[s];\n if (subTask.id === id)\n return {\n task: subTask,\n mainTask: mainTask,\n mainTaskIndex: m,\n subTask: subTask,\n subTaskIndex: s,\n pageIndex: p,\n };\n }\n }\n }\n }\n return null;\n};\nexport var updateTask = function (data, id, updateFunc) {\n var findResult = findTaskById(data, id);\n if (!findResult)\n return data;\n var pages = __spreadArray([], data.pages, true);\n var page = __spreadArray([], pages[findResult.pageIndex], true);\n pages[findResult.pageIndex] = page;\n var mainTask;\n if (findResult.subTask) {\n mainTask = __assign({}, page[findResult.mainTaskIndex]);\n mainTask.children = __spreadArray([], mainTask.children, true);\n mainTask.children[findResult.subTaskIndex] = updateFunc(__assign({}, mainTask.children[findResult.subTaskIndex]));\n }\n else {\n mainTask = updateFunc(__assign({}, page[findResult.mainTaskIndex]));\n }\n page[findResult.mainTaskIndex] = mainTask;\n return __assign(__assign({}, data), { pages: pages });\n};\nexport var insertNewMainTask = function (data, task) {\n var pages = __spreadArray([], data.pages, true);\n if (pages.length === 0)\n pages = [];\n pages[0] = __spreadArray([__assign({}, task)], pages[0], true);\n return __assign(__assign({}, data), { pages: pages });\n};\n","import { defineMessages } from 'react-intl';\nexport var messages = defineMessages({\n RevokeAccessToken: {\n id: 'RevokeAccessToken',\n defaultMessage: 'Revoke access token',\n },\n CreateAccessToken: {\n id: 'CreateAccessToken',\n defaultMessage: 'Create access token',\n },\n RevokeAccessTokenConfirmation: {\n id: 'RevokeAccessTokenConfirmation',\n defaultMessage: 'Are you sure you want to revoke this access token?',\n },\n Client: {\n id: 'Client',\n defaultMessage: 'Client',\n },\n AccessTokens: {\n id: 'AccessTokens',\n defaultMessage: 'Access tokens',\n },\n Name: {\n id: 'Name',\n defaultMessage: 'Name',\n },\n Expires: {\n id: 'Expires',\n defaultMessage: 'Expires',\n },\n CreatedAt: {\n id: 'CreatedAt',\n defaultMessage: 'Created at',\n },\n Actions: {\n id: 'Actions',\n defaultMessage: 'Actions',\n },\n AddToken: {\n id: 'AddToken',\n defaultMessage: 'Add token',\n },\n TokenCreated: {\n id: 'TokenCreated',\n defaultMessage: \"Your token has been created. Make sure you save it, this is the only time you'll see it:\"\n },\n SelectAll: {\n id: 'SelectAll',\n defaultMessage: 'Select all'\n },\n UnselectAll: {\n id: 'UnselectAll',\n defaultMessage: 'Unselect all'\n },\n MyOffice: {\n id: 'MyOffice',\n defaultMessage: 'Own office integration'\n }\n});\n","// Use this to wrap a proptype, to allow null\n// https://github.com/facebook/react/issues/3163#issuecomment-470307646\nexport default function nullable(subRequirement) {\n const check = (required, props, key, ...rest) => {\n if (props[key] === null) {\n return null;\n }\n const sub = required ? subRequirement.isRequired : subRequirement;\n return sub(props, key, ...rest);\n };\n const fn = check.bind(null, false);\n fn.isRequired = check.bind(null, true);\n return fn;\n}\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { FaPencilAlt } from 'react-icons/fa';\nimport classnames from 'classnames';\nimport nullable from '../../utils/nullable';\n\nclass EditableToggle extends Component {\n state = {\n mode: 'display',\n editValue: null,\n error: null,\n };\n inputRef = null;\n\n showEditMode = () => {\n const { mode } = this.state;\n const { value } = this.props;\n if (mode !== 'display') return;\n this.changeMode(\n {\n mode: 'edit',\n editValue: value,\n error: null,\n },\n () => {\n if (this.inputRef) {\n this.inputRef.focus();\n // Check if the control still has focus after 100ms.\n // If not, there is probably another editable control that doesn't validate and stole the focus again\n setTimeout(() => {\n if (this.inputRef !== document.activeElement) {\n this.handleCancel();\n }\n }, 100);\n }\n },\n );\n };\n registerInputRef = input => {\n this.inputRef = input;\n };\n\n handleValueChanged = e => this.handleSetValue(e.target.value);\n\n // Wrap setState into promise, so you can do something after the state has been set (eg: submit)\n handleSetValue = value =>\n new Promise(resolve =>\n this.setState(\n {\n editValue: value,\n },\n () => resolve(),\n ),\n );\n\n changeMode({ mode, ...rest }, callBack) {\n const { mode: prevMode } = this.state;\n const { onModeChange } = this.props;\n if (mode !== prevMode) {\n this.setState(\n {\n mode,\n ...rest,\n },\n () => {\n onModeChange(mode, prevMode);\n if (callBack) callBack();\n },\n );\n }\n }\n\n handleSubmit = () => {\n const { onSubmit, value, required } = this.props;\n const { editValue } = this.state;\n // Check if value changed, if not just cancel\n if (JSON.stringify(value) === JSON.stringify(editValue)) return this.handleCancel();\n if (!editValue && required) {\n if (this.inputRef) this.inputRef.focus();\n return;\n }\n this.changeMode(\n {\n mode: 'saving',\n },\n () => {\n Promise.resolve(onSubmit(editValue)).then(\n () => {\n // Success\n this.changeMode({\n mode: 'display',\n });\n },\n error => {\n this.changeMode(\n {\n mode: 'edit',\n },\n () => {\n if (this.inputRef) this.inputRef.focus();\n },\n );\n },\n );\n },\n );\n };\n handleCancel = () => {\n this.changeMode({\n mode: 'display',\n });\n };\n handleKeyDown = e => {\n // Escape\n if (e.keyCode === 27) {\n this.handleCancel();\n e.preventDefault();\n e.stopPropagation();\n if (e.nativeEvent) e.nativeEvent.stopImmediatePropagation();\n }\n // Enter\n else if (e.keyCode === 13) {\n this.handleSubmit();\n e.preventDefault();\n e.stopPropagation();\n if (e.nativeEvent) e.nativeEvent.stopImmediatePropagation();\n }\n };\n\n render() {\n const { children, displayValue, value, readOnly, className } = this.props;\n const { mode, editValue, error } = this.state;\n if (readOnly) return
    {displayValue || value}
    ;\n\n if (mode === 'edit')\n return (\n
    \n
    \n {children({\n // Handle the onChange of an input\n handleChange: this.handleValueChanged,\n // Set the input value directly, usefull for updating object values\n setInputValue: this.handleSetValue,\n // The current input value, bind this to the value attr of the input\n inputValue: editValue,\n // Put this in the ref attribute of the input, this will be used to set the focus on edit\n inputRef: this.registerInputRef,\n // When called, the current input value will be submitted to the parent, put this on the onBlur of the input\n submit: this.handleSubmit,\n // When called, the control will cancel and return to display mode\n cancel: this.handleCancel,\n // Handle submit on enter, cancel on escape. Put this on the onKeyDown of the input\n handleKeyDown: this.handleKeyDown,\n })}\n
    \n
    \n );\n if (mode === 'saving')\n return (\n
    \n \n
    \n );\n const events = readOnly ? {} : { onFocus: this.showEditMode, onClick: this.showEditMode };\n // Display mode\n return (\n \n {displayValue || (value ? value.length === 0 ? : value : value) || (\n \n )}\n \n );\n }\n}\n\nEditableToggle.propTypes = {\n // Custom display value for when the control is in display mode\n displayValue: PropTypes.node,\n // Custom class for the display value\n className: PropTypes.string,\n // The current value\n value: nullable(\n PropTypes.oneOfType([\n PropTypes.number,\n PropTypes.string,\n PropTypes.instanceOf(Date),\n PropTypes.arrayOf(PropTypes.shape({})),\n PropTypes.shape({}),\n ]),\n ).isRequired,\n // Handle value changes\n onSubmit: PropTypes.func.isRequired,\n // Notify when component changes mode\n onModeChange: PropTypes.func,\n // Disable edit mode\n readOnly: PropTypes.bool,\n\n // A render function to render the input, see function properties above\n children: PropTypes.func.isRequired,\n required: PropTypes.bool,\n};\n\nEditableToggle.defaultProps = {\n displayValue: null,\n readOnly: false,\n required: false,\n className: '',\n onModeChange: () => {},\n};\n\nexport default EditableToggle;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\n\nimport EditableToggle from './EditableToggle';\n\nconst handleKeyDown = (e, submit, cancel) => {\n // Escape\n if (e.keyCode === 27) {\n cancel();\n e.preventDefault();\n e.stopPropagation();\n if (e.nativeEvent) e.nativeEvent.stopImmediatePropagation();\n }\n // Ctrl + Enter\n else if (e.keyCode === 13 && e.ctrlKey) {\n submit();\n e.preventDefault();\n e.stopPropagation();\n if (e.nativeEvent) e.nativeEvent.stopImmediatePropagation();\n }\n};\nconst EditableTextArea = ({\n onChange,\n value,\n submitOnBlur,\n inputClassName,\n readOnly,\n placeholder,\n displayValue,\n displayClassName,\n ...rest\n}) => (\n {value} : null)}\n className={displayClassName}\n >\n {({ inputValue, handleChange, inputRef, submit, cancel }) => (\n handleKeyDown(e, submit, cancel)}\n className={classnames('form-control', inputClassName)}\n placeholder={placeholder}\n autoComplete=\"off\"\n {...rest}\n />\n )}\n \n);\n\nEditableTextArea.propTypes = {\n onChange: PropTypes.func.isRequired,\n value: PropTypes.string,\n submitOnBlur: PropTypes.bool,\n placeholder: PropTypes.string,\n inputClassName: PropTypes.string,\n displayClassName: PropTypes.string,\n readOnly: PropTypes.bool,\n displayValue: PropTypes.node,\n};\nEditableTextArea.defaultProps = {\n submitOnBlur: true,\n inputClassName: 'vertical-resize',\n displayClassName: '',\n placeholder: '',\n readOnly: false,\n displayValue: null,\n value: null,\n};\n\nexport default EditableTextArea;\n","import React from 'react';\nimport { injectIntl, useIntl } from 'react-intl';\nimport PropTypes from 'prop-types';\nimport intlShape from '@/shared/utils/intlShape';\nimport { MainTaskIcon, SubTaskIcon, ToDoIcon } from '@/shared/components/Icons';\nimport messages from './taskMessages';\n\nconst TaskIcon = ({ intl, taskLevel }) => {\n switch (taskLevel) {\n case 0:\n return ;\n case 1:\n return ;\n case 2:\n return ;\n default:\n return null;\n }\n};\n\nTaskIcon.propTypes = {\n intl: intlShape.isRequired,\n};\n\nTaskIcon.defaultProps = {};\n\nexport default injectIntl(TaskIcon);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\n\nconst TaskStatusIcon = ({ status, isBlocked, inapplicable, rejected, className, onClick, small }) =>\n typeof status !== 'undefined' && (\n \n );\nTaskStatusIcon.propTypes = {\n status: PropTypes.oneOf([undefined, 0, 1, 2]),\n isBlocked: PropTypes.bool,\n inapplicable: PropTypes.bool,\n rejected: PropTypes.bool,\n className: PropTypes.string,\n onClick: PropTypes.func,\n small: PropTypes.bool,\n};\n\nTaskStatusIcon.defaultProps = {\n status: undefined,\n isBlocked: false,\n inapplicable: false,\n rejected: false,\n className: null,\n onClick: null,\n small: false,\n};\nexport default TaskStatusIcon;\n","import React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedNumber, injectIntl, useIntl } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport DatePicker from '@/shared/components/input/DatePicker';\nimport FormattedListValue, { listItemMsg } from '@/shared/components/FormattedListValue';\nimport Checkbox from '@/shared/components/input/Checkbox';\nimport classNames from 'classnames';\nimport RelationName from '@/shared/components/RelationName';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport UserSearch from '@/shared/components/input/UserSearch';\nimport { isBeforeMinimum } from '../../../shared/utils/validationHelpers';\nimport FormattedDateShort from '../../../shared/components/FormattedDateShort';\n\nconst falseFunc = () => false;\n\nclass TaskDetailsParameterValue extends PureComponent {\n state = {\n dateFocused: null,\n };\n\n renderOtherSoftware = otherSoftware => {\n const { intl } = this.props;\n if (!otherSoftware) return '';\n const otherSoftwareArray = otherSoftware\n .replace(/\\s/g, '')\n .split(',')\n .filter(x => x !== '');\n\n return (otherSoftwareArray || [])\n .map(x => intl.formatMessage(listItemMsg('othersoftware', x)))\n .join(', ');\n };\n\n renderRelationField = parameter => {\n // Special types (list values, enums,...)\n switch (parameter.relationFieldType) {\n case 8: // AccountingSoftware\n return (\n parameter.valueNumeric !== null && (\n \n )\n );\n case 9:\n case 10:\n case 11:\n case 12:\n case 26:\n case 27: {\n const user = DataCacheService.getUserName(parameter.valueText);\n return {user};\n }\n case 14:\n return (\n parameter.valueNumeric !== null && (\n \n )\n );\n case 15:\n return parameter.valueObject !== null && ;\n case 18:\n return (\n parameter.valueNumeric !== null && (\n \n )\n );\n case 22:\n return this.renderOtherSoftware(parameter.valueText);\n case 23:\n return (\n parameter.valueNumeric !== null && (\n \n )\n );\n case 24:\n return (\n parameter.valueNumeric !== null && (\n \n )\n );\n case 28: // ShareRegister\n return (\n parameter.valueNumeric !== null && (\n \n )\n );\n default:\n break;\n }\n // Normal values\n switch (parameter.parameterValueType) {\n case 0: // text\n return parameter.valueText;\n case 1: // numeric\n return !parameter.valueNumeric && parameter.valueNumeric !== 0 ? null : (\n \n );\n case 2: // Date\n return parameter.valueDate && ;\n case 3: // boolean\n return (\n
    \n \n
    \n );\n default:\n return ;\n }\n };\n\n renderInputParameter = parameter => {\n const { onChange, intl } = this.props;\n const { dateFocused, isDateInvalid } = this.state;\n\n const selectionItemsArray = parameter.selectionItems\n ? parameter.selectionItems.split(';').map((x, index) => ({\n id: index,\n label: x,\n }))\n : [];\n\n const selectedItem =\n parameter.parameterValueType === 4 &&\n selectionItemsArray.map(x => x.label).includes(parameter.valueText)\n ? selectionItemsArray.find(x => x.label === parameter.valueText).id\n : undefined;\n\n const selectedItemChanged = id => {\n // selection cleared\n if (!id) {\n onChange(null, parameter, 4);\n return;\n }\n\n const item = selectionItemsArray.find(x => x.id === parseInt(id));\n if (!item) return;\n onChange(item.label, parameter, 4);\n };\n\n const isReadOnly = parameter.readOnly;\n switch (parameter.parameterValueType) {\n case 0: // text\n return (\n onChange(e.target.value, parameter, 0)}\n className=\"form-control\"\n maxLength=\"500\"\n readOnly={isReadOnly}\n />\n );\n case 1: // numeric\n return (\n {\n const pastedValue = e.clipboardData.getData('text/plain');\n // if the pasted value contains both a comma and a dot, we assume the dot should not be interpreted as the decimal separator\n if (pastedValue?.includes(',') && pastedValue?.includes('.')) {\n // 7.141,55: parse as 7141,55 (thousand-separator for display in most EU countries, comma as decimal separator)\n const numericValue = parseFloat(pastedValue.replace('.', '').replace(',', '.'));\n onChange(numericValue, parameter, 1);\n } else if (pastedValue?.includes('.')) {\n // 7.141: parse as 7141 (thousand-separator for display in most EU countries)\n const numericValue = parseFloat(pastedValue?.replace('.', ''));\n onChange(numericValue);\n } else {\n const numericValue = parseFloat(pastedValue?.replace(',', '.')); // parse float doesnt see comma as decimal separator\n onChange(numericValue, parameter, 1);\n }\n\n e.preventDefault();\n }}\n onChange={e => onChange(e.target.value, parameter, 1)}\n className=\"form-control\"\n readOnly={isReadOnly}\n />\n );\n case 2: // Date\n return !isReadOnly ? (\n \n {\n onChange(date, parameter, 2, isValid);\n this.setState({ isDateInvalid: isValid === false });\n }}\n focused={dateFocused}\n onFocusChange={({ focused }) => this.setState({ dateFocused: focused })}\n block\n small\n isOutsideRange={falseFunc}\n id={parameter.id}\n />\n \n ) : (\n \n );\n case 3: // boolean\n return (\n
    \n onChange(value, parameter, 3)}\n disabled={isReadOnly}\n />\n
    \n );\n case 4: // selection list\n return (\n selectedItemChanged(e.target.value)}\n >\n \n ))}\n \n );\n case 5: // employee\n return (\n onChange(value?.id, parameter, 5)}\n value={parameter.valueText}\n hideClearButton\n withUnassigned\n small\n includeInactiveUsers\n />\n );\n\n default:\n return ;\n }\n };\n\n render() {\n const { parameter } = this.props;\n return (\n
    \n \n {!!parameter.computedParameterType && (\n \n )}\n {parameter.name}\n \n
    \n {parameter.relationFieldType\n ? this.renderRelationField(parameter)\n : this.renderInputParameter(parameter)}\n
    \n
    \n );\n }\n}\n\nTaskDetailsParameterValue.propTypes = {\n parameter: PropTypes.shape({}).isRequired,\n onChange: PropTypes.func.isRequired,\n intl: intlShape.isRequired,\n};\n\nexport default injectIntl(TaskDetailsParameterValue);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage, injectIntl, useIntl } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\n\nimport { ClockIcon } from '@/shared/components/Icons';\n\nimport moment from 'moment';\n\nimport momentDurationFormatSetup from 'moment-duration-format';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport messages from '../taskMessages';\nimport FormattedDateShort from '../../../shared/components/FormattedDateShort';\n\nmomentDurationFormatSetup(moment);\n\nconst formatDurationToTime = duration =>\n moment.duration(duration, 'minutes').format('hh:mm', {\n trim: false,\n });\n\nconst TaskDetailRegistrations = ({ task, intl, historyActive, onShowHistory, registrations }) => {\n const formattedDuration = moment.duration(task.duration, 'minutes').format('hh:mm', {\n trim: false,\n });\n\n const hasCostRegistrations =\n registrations && registrations.filter(x => x.resource.type === 1).length > 0;\n const hasTimeRegistrations =\n registrations && registrations.filter(x => x.resource.type === 0).length > 0;\n\n return (\n
    \n {!historyActive && (!task.children || task.children.length === 0) && (\n \n \n {intl.formatMessage(messages.ShowHistory)}\n \n )}\n
    \n \n {hasTimeRegistrations &&\n !hasCostRegistrations &&\n intl.formatMessage(messages.CountRegistrationsForDuration, {\n count: registrations.length,\n duration: formattedDuration,\n })}\n {hasCostRegistrations &&\n intl.formatMessage(messages.CountRegistrations, {\n count: registrations.length,\n })}\n {!hasCostRegistrations &&\n !hasTimeRegistrations &&\n intl.formatMessage(messages.NoRegistrationsForThisTask)}\n
    \n\n {(hasCostRegistrations || hasTimeRegistrations) && (\n \n \n \n \n \n\n \n \n \n \n \n \n \n {registrations.slice(0, 10).map(registration => {\n const username = DataCacheService.getUserName(registration.userId);\n return (\n \n \n \n\n \n \n \n \n \n );\n })}\n {registrations.length > 10 && (\n \n \n \n )}\n \n
    \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n \n {registration.resource &&\n intl.formatMessage(\n listItemMsg(\n 'resource',\n registration.resource.id,\n registration.resource.name,\n ),\n )}\n {username}\n {registration.resource.type === 0 &&\n formatDurationToTime(registration.fromMinutes)}\n \n {registration.resource.type === 0 &&\n formatDurationToTime(registration.toMinutes)}\n \n {registration.resource.type === 0 &&\n formatDurationToTime(registration.durationMinutes)}\n {registration.resource.type === 1 && registration.quantity}\n
    ...
    \n )}\n
    \n );\n};\n\nTaskDetailRegistrations.propTypes = {\n task: PropTypes.shape({\n relation: PropTypes.object,\n id: PropTypes.string,\n }).isRequired,\n registrations: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n intl: intlShape.isRequired,\n};\n\nexport default injectIntl(TaskDetailRegistrations);\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport FileIcon from '@/shared/components/FileIcon';\nimport { ModalType, useModalContext } from '@/shared/providers/ModalProvider';\nvar TaskAttachmentsPopover = function (_a) {\n var attachments = _a.attachments, loadingAttachments = _a.loadingAttachments;\n var setShowModalInfo = useModalContext().setShowModalInfo;\n return (_jsxs(\"span\", __assign({ id: \"popover-trigger-hover-focus\" }, { children: [loadingAttachments ? _jsx(\"i\", { className: \"fa fa-spin fa-spinner\" }) : null, attachments\n ? attachments.map(function (document) { return (_jsx(\"div\", { children: _jsx(\"a\", __assign({ onClick: function (e) {\n setShowModalInfo({ modalType: ModalType.DocumentDetail, documentId: document.id });\n e.stopPropagation();\n } }, { children: _jsxs(\"span\", __assign({ className: \"text-nowrap\" }, { children: [_jsx(FileIcon, { document: document }), \" \", document.name] })) })) })); })\n : null] })));\n};\nexport default TaskAttachmentsPopover;\n","/* eslint-disable no-script-url */\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { Dropdown, MenuItem, OverlayTrigger } from 'react-bootstrap';\nimport { FormattedMessage, injectIntl, useIntl } from 'react-intl';\nimport PopoverStickOnHover from '@/shared/components/PopoverStickOnHover';\nimport intlShape from '@/shared/utils/intlShape';\nimport FormattedListValue, { formatListValue } from '@/shared/components/FormattedListValue';\nimport { WindowIcon, ClockIcon, PaperclipIcon, CommentIcon } from '@/shared/components/Icons';\nimport HoverToggle from '@/shared/components/HoverToggle';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport debounce from 'lodash-es/debounce';\nimport classNames from 'classnames';\nimport TaskAttachmentsPopover from './TaskAttachmentsPopover';\nimport messages from './taskMessages';\nimport TaskStatusIcon from './TaskStatusIcon';\nimport AuthService, { functionalities, privileges } from '@/shared/services/AuthService';\n\nconst TaskStatusLabel = ({ status, isBlocked, inapplicable, rejected }) => {\n const intl = useIntl();\n if (inapplicable) return intl.formatMessage(messages.Inapplicable);\n if (isBlocked) return intl.formatMessage(messages.Blocked);\n if (rejected) formatListValue({ id: 6, list: 'extendedtaskstatus', intl });\n return formatListValue({ id: status, list: 'taskstatus', intl });\n};\nconst changeStatusTitleMessages = [\n messages.ChangeMainTaskStatus,\n messages.ChangeSubtaskStatus,\n messages.ChangeTodoStatus,\n];\n\nexport const getNextStatus = value => {\n if (!value) return null;\n const { status, isBlocked, inapplicable, rejected } = value;\n if (inapplicable || rejected) return null;\n if (isBlocked) return { ...value, isBlocked: false };\n if (status === 2) return null;\n if (status === 0) return { ...value, status: 1 };\n if (status === 1) return { ...value, status: 2 };\n return null;\n};\n\nclass TaskStatusToggle extends React.Component {\n state = {};\n\n componentDidUpdate(prevProps) {\n const { initialRemark, initialScheduleRemark } = this.props;\n // handles the remark changing when changed via detail modal\n if (prevProps.initialRemark !== initialRemark) {\n // eslint-disable-next-line\n this.setState({ remark: initialRemark });\n }\n if (prevProps.initialScheduleRemark !== initialScheduleRemark) {\n // eslint-disable-next-line\n this.setState({ scheduleRemark: initialScheduleRemark });\n }\n }\n\n changeStatus = changes => {\n const { value } = this.props;\n const newStatus = { ...value, ...changes };\n if (!value.id) return;\n if (JSON.stringify(newStatus) === JSON.stringify(value)) return;\n this.setState({ saving: true });\n\n return api.base\n .put(`${config.appUrls.tasks}/api/TaskList/UpdateStatus`, {\n status: newStatus.status,\n isBlocked: newStatus.isBlocked,\n rejected: newStatus.rejected,\n inapplicable: newStatus.inapplicable,\n id: value.id,\n taskLevel: newStatus.taskLevel,\n })\n .then(\n ({ data }) => {\n this.setState({ saving: false });\n const { onTasksUpdated } = this.props;\n if (data && data.length > 0 && onTasksUpdated && typeof onTasksUpdated === 'function') {\n onTasksUpdated(data);\n }\n return data;\n },\n error => {\n const { intl } = this.props;\n this.setState({ saving: false });\n handleHttpError(intl)(error);\n },\n );\n };\n\n retrieveAttachmentsForTaskIds = taskIds => {\n const { intl } = this.props;\n api.base\n .post(`${config.appUrls.documents}/api/documents/DocumentLinks`, taskIds)\n .then(({ data }) => {\n this.setState({\n attachments: data,\n loadingAttachments: false,\n });\n })\n .catch(error => {\n handleHttpError(intl)(error);\n this.setState({ loadingAttachments: false });\n });\n };\n\n retrieveAttachments = () => {\n this.setState({ loadingAttachments: true, attachments: null });\n\n this.debouncedRetrieveAttachments();\n };\n\n debouncedRetrieveAttachments = debounce(() => {\n const { value } = this.props;\n\n // if hovered over a main task, we'll retrieve the subtask IDs and check which documents are linked to them as well\n if (value.taskLevel === 0) {\n api.base.get(`${config.appUrls.tasks}/api/plannedtasks/ChildTaskIds/${value.id}`).then(\n ({ data }) => {\n this.retrieveAttachmentsForTaskIds([value.id, ...data]);\n },\n () => this.retrieveAttachmentsForTaskIds([value.id]),\n );\n } else {\n this.retrieveAttachmentsForTaskIds([value.id]);\n }\n }, 300);\n\n renderAttachmentIcon = () => {\n const { value, onOpenDetail } = this.props;\n const { attachments, loadingAttachments } = this.state;\n if (value.hasAttachments === undefined) return null;\n\n return (\n
    \n {\n e.stopPropagation();\n }}\n >\n \n }\n shouldUpdatePosition\n onMouseEnter={this.retrieveAttachments}\n onClick={() => (onOpenDetail ? onOpenDetail(value.id) : {})}\n >\n \n \n \n \n \n
    \n );\n };\n\n retrieveRemark = () => {\n const { remark, scheduleRemark } = this.state;\n const { value, intl } = this.props;\n\n this.setState({ loadingRemark: true });\n const taskRemarkPromise =\n value.hasRemark && !remark\n ? api.base.get(\n `${config.appUrls.tasks}/api/plannedTasks/Remark/${value.id}?taskLevel=${value.taskLevel}`,\n )\n : Promise.resolve({ data: remark });\n\n const scheduleRemarkPromise =\n value.scheduleHasRemark && !scheduleRemark\n ? api.base.get(`${config.appUrls.tasks}/api/taskschedules/Remark/${value.id}`)\n : Promise.resolve({ data: scheduleRemark });\n\n Promise.all([taskRemarkPromise, scheduleRemarkPromise])\n .then(([{ data: taskRemark }, { data: newScheduleRemark }]) => {\n this.setState({\n remark: taskRemark,\n scheduleRemark: newScheduleRemark,\n loadingRemark: false,\n });\n })\n .catch(error => {\n handleHttpError(intl)(error);\n this.setState({ loadingRemark: false });\n });\n };\n\n renderRemarkIcon = () => {\n const { value, onOpenDetail } = this.props;\n const { remark, scheduleRemark, loadingRemark } = this.state;\n\n if (value.hasRemark === undefined) return null;\n\n const renderDivider = remark && scheduleRemark;\n\n const popoverHoverFocus = (\n \n {loadingRemark && }\n {!loadingRemark && (\n
    \n {remark ? {remark} : null}\n {renderDivider ? (\n
    \n ) : null}\n {scheduleRemark ? (\n {scheduleRemark}\n ) : null}\n
    \n )}\n
    \n );\n\n return (\n \n {/* */}\n {\n e.stopPropagation();\n }}\n >\n onOpenDetail(value.id)}\n >\n \n \n \n \n \n \n );\n };\n\n render() {\n const {\n id,\n value,\n overlay,\n intl,\n isMainTask,\n title,\n showStatusLabel,\n onOpenDetail,\n onAddRegistration,\n extraInfo,\n } = this.props;\n const { saving } = this.state;\n const { status, isBlocked, inapplicable, rejected, taskLevel } = value;\n\n const functionality = taskLevel === 2 ? functionalities.Todo : functionalities.PlannedTask;\n const canEdit = AuthService.hasPermission({ functionality, privilege: privileges.Update });\n const canDelete = AuthService.hasPermission({ functionality, privilege: privileges.Delete });\n const canCreateRegistration = AuthService.hasPermission({\n functionality: functionalities.RegistrationOwn,\n privilege: privileges.Delete,\n });\n\n const nextStatus = getNextStatus(value);\n const iconProps = {\n status,\n isBlocked,\n inapplicable,\n rejected,\n };\n if (nextStatus !== null && canEdit) {\n iconProps.onClick = () => this.changeStatus(nextStatus);\n }\n\n const statusTitle =\n title ||\n (canEdit\n ? (Number.isNaN(taskLevel)\n ? null\n : intl.formatMessage(changeStatusTitleMessages[taskLevel])) ||\n intl.formatMessage(messages.ChangeTaskStatus)\n : null);\n\n // undefined = attachment or remark is never shown. False = not currently present, but whitespace should be reserved\n const displayFlex = value.hasAttachments !== undefined || value.hasRemark !== undefined;\n\n return (\n \n {this.renderAttachmentIcon()}\n {this.renderRemarkIcon()}\n
    \n {\n e.stopPropagation();\n }}\n >\n {overlay ? (\n \n \n {saving && }\n {!saving && }\n {showStatusLabel && status !== null && (\n \n \n \n )}\n {extraInfo}\n \n \n ) : (\n \n \n {extraInfo}\n \n )}\n\n \n {showStatusLabel && status !== null && (\n \n \n \n )}\n \n \n {statusTitle ? {statusTitle} : null}\n {canEdit && (\n \n this.changeStatus({\n status: 0,\n isBlocked: false,\n inapplicable: false,\n rejected: false,\n })\n }\n >\n \n \n \n )}\n\n {canEdit && value.taskType !== 2 && value.type !== 2 && (\n \n this.changeStatus({\n status: 1,\n isBlocked: false,\n inapplicable: false,\n rejected: false,\n })\n }\n >\n \n \n \n )}\n {canEdit && (\n \n this.changeStatus({\n status: 2,\n isBlocked: false,\n inapplicable: false,\n rejected: false,\n })\n }\n >\n \n \n \n )}\n {canEdit && (!isMainTask || isBlocked) && !inapplicable && !rejected && (\n \n )}\n {canEdit && isBlocked && (\n this.changeStatus({ isBlocked: false })}>\n \n \n \n )}\n {canEdit && !isMainTask && !inapplicable && !isBlocked && (\n this.changeStatus({ isBlocked: true })}>\n \n \n \n )}\n {canEdit && !isMainTask && !inapplicable && (\n this.changeStatus({ inapplicable: true })}>\n \n \n \n )}\n {canEdit && !isMainTask && !rejected && (\n this.changeStatus({ rejected: true })}>\n \n \n \n )}\n {canEdit && (onOpenDetail || onAddRegistration) ? : null}\n {!!onOpenDetail && (\n onOpenDetail(value.id)}>\n \n \n \n )}\n {!!onAddRegistration &&\n canCreateRegistration &&\n value.taskType !== 2 &&\n value.type !== 2 && (\n onAddRegistration(value)}>\n \n \n \n )}\n \n \n
    \n \n );\n }\n}\n\nTaskStatusToggle.propTypes = {\n id: PropTypes.string.isRequired,\n initialRemark: PropTypes.string,\n initialScheduleRemark: PropTypes.string,\n value: PropTypes.shape({\n id: PropTypes.string.isRequired,\n status: PropTypes.oneOf([undefined, 0, 1, 2]),\n isBlocked: PropTypes.bool,\n inapplicable: PropTypes.bool,\n rejected: PropTypes.bool,\n hasAttachments: PropTypes.bool,\n hasRemark: PropTypes.bool,\n taskLevel: PropTypes.number,\n scheduleHasRemark: PropTypes.bool,\n taskType: PropTypes.number,\n }),\n overlay: PropTypes.element,\n isMainTask: PropTypes.bool,\n showStatusLabel: PropTypes.bool,\n intl: intlShape.isRequired,\n extraInfo: PropTypes.node, // Show extra info after icon and label\n title: PropTypes.string,\n onOpenDetail: PropTypes.func,\n onTasksUpdated: PropTypes.func,\n onAddRegistration: PropTypes.func,\n};\nTaskStatusToggle.defaultProps = {\n value: {\n status: null,\n isBlocked: false,\n inapplicable: false,\n rejected: false,\n hasAttachments: undefined,\n hasRemark: undefined,\n taskLevel: null,\n scheduleHasRemark: false,\n taskType: null,\n },\n initialRemark: null,\n initialScheduleRemark: null,\n title: null,\n overlay: null,\n isMainTask: false,\n showStatusLabel: false,\n onTasksUpdated: null,\n onOpenDetail: null,\n onAddRegistration: null,\n extraInfo: null,\n};\n\nexport default injectIntl(TaskStatusToggle);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { injectIntl, useIntl } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport FormattedListValue from '@/shared/components/FormattedListValue';\nimport classNames from 'classnames';\nimport messages from '../taskMessages';\nimport TaskStatusToggle from '../TaskStatusToggle';\n\nconst TaskDetailsSubtasks = ({\n task,\n intl,\n openTaskDetails,\n onTasksUpdated,\n onShowHistory,\n historyActive,\n}) => {\n if (!task.children || task.children.length <= 0) return null;\n\n return (\n
    \n \n {!historyActive && (\n \n \n\n {intl.formatMessage(messages.ShowHistory)}\n \n )}\n\n \n \n {task.children.map(subtask => (\n \n \n \n \n ))}\n \n
    \n \n \n openTaskDetails(subtask.id)}\n >\n {subtask.name && subtask.name}\n {!subtask.name && (\n \n )}\n \n
    \n
    \n );\n};\n\nTaskDetailsSubtasks.propTypes = {\n task: PropTypes.shape({\n relation: PropTypes.object,\n id: PropTypes.string,\n }).isRequired,\n openTaskDetails: PropTypes.func.isRequired,\n onTasksUpdated: PropTypes.func.isRequired,\n intl: intlShape.isRequired,\n onShowHistory: PropTypes.func.isRequired,\n historyActive: PropTypes.bool.isRequired,\n};\n\nexport default injectIntl(TaskDetailsSubtasks);\n","import React, { Component } from 'react';\nimport { FormattedMessage, injectIntl, useIntl } from 'react-intl';\nimport DocumentService from '@/shared/services/DocumentService';\nimport FileIcon from '@/shared/components/FileIcon';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport messages from '../taskMessages';\nimport { CanRead } from '../../../shared/components/security';\nimport FormattedDateShort from '../../../shared/components/FormattedDateShort';\nimport { ModalType, useModalContext } from '@/shared/providers/ModalProvider';\n\nconst TaskDetailsSentEmails = ({ emails }) => {\n const intl = useIntl();\n const { setShowModalInfo } = useModalContext();\n\n return (\n <>\n
    \n \n \n \n \n \n \n \n \n \n \n {emails.map((email, idx) => (\n \n \n \n \n \n \n \n ))}\n \n
    \n \n \n \n \n \n \n \n \n
    \n \n {email.status === 2 && }\n {email.status === 3 && }\n {email.status === 4 && }\n \n \n \n
      \n {email.recipients &&\n email.recipients.map((recipient) =>
    • {recipient}
    • )}\n
    \n
    {email.subject}\n {email.attachments &&\n email.attachments.map((attachment) => (\n \n \n \n \n {attachment.name}\n \n }\n >\n DocumentService.download(attachment.id)}\n title={intl.formatMessage(messages.DownloadAttachment)}\n >\n \n {attachment.name}\n \n \n \n \n ))}\n \n {email.documentId ? (\n {\n setShowModalInfo({\n modalType: ModalType.DocumentDetail,\n documentId: email.documentId,\n });\n e.stopPropagation();\n }}\n >\n \n \n ) : null}\n
    \n
    \n \n );\n};\n\nexport default TaskDetailsSentEmails;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport OutsideClickHandler from 'react-outside-click-handler';\nimport { injectIntl } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport AutoComplete from '@/shared/components/input/select/AutoComplete';\nimport EditableToggle from './EditableToggle';\n\nconst EditableAutoComplete = ({\n onChange,\n value,\n disabled,\n submitOnChange,\n className,\n displayValue,\n required,\n ...rest\n}) => (\n \n {({ inputValue, setInputValue, submit, inputRef }) => (\n \n {\n if (!e && required) return;\n if (submitOnChange && !!e) {\n setInputValue(e).then(submit);\n } else {\n setInputValue(e);\n }\n }}\n disabled={disabled}\n mode=\"edit\"\n value={inputValue}\n inputRef={inputRef}\n {...rest}\n />\n \n )}\n \n);\nEditableAutoComplete.propTypes = {\n onChange: PropTypes.func.isRequired,\n value: PropTypes.oneOfType([\n PropTypes.shape({ id: PropTypes.string.isRequired }),\n PropTypes.string,\n ]),\n disabled: PropTypes.bool,\n submitOnChange: PropTypes.bool,\n intl: intlShape.isRequired,\n className: PropTypes.string,\n};\n\nEditableAutoComplete.defaultProps = {\n value: null,\n disabled: false,\n submitOnChange: false,\n className: '',\n};\n\nexport default injectIntl(EditableAutoComplete);\n","import React, { useEffect, useMemo, useState } from 'react';\nimport { defineMessages, useIntl } from 'react-intl';\nimport DocumentService from '@/shared/services/DocumentService';\nimport EnumCacheService from '@/shared/services/EnumCacheService';\nimport EditableAutoComplete from '@/shared/components/editable/EditableAutoComplete';\nimport FormattedListValue from '@/shared/components/FormattedListValue';\n\nconst messages = defineMessages({\n StartTypingToSearch: 'Start typing to search',\n});\n\nconst EditableDocumentTypeSelect = ({ value, onChange, disabled = false, required = false }) => {\n const intl = useIntl();\n const [items, setItems] = useState([]);\n useEffect(() => {\n let cancelled = false;\n const promise = Promise.all([\n EnumCacheService.getTranslated('documentType', intl, false),\n DocumentService.getForbiddenDocumentTypes(),\n ]).then(([documentTypes, forbiddenTypes]) => {\n if (cancelled) return;\n const filteredItems =\n forbiddenTypes && forbiddenTypes.length > 0\n ? documentTypes.filter(x => !forbiddenTypes.includes(x.key))\n : documentTypes;\n setItems(filteredItems.map(x => ({ ...x, key: x.id })));\n });\n\n return () => {\n cancelled = true;\n };\n }, []);\n\n const selectedDocumentType = value && !!items ? items.find(x => x.key === value) : null;\n\n return (\n (\n \n )}\n items={items}\n placeholder={intl.formatMessage(messages.StartTypingToSearch)}\n onChange={item => onChange(item?.id)}\n mode=\"edit\"\n value={selectedDocumentType}\n showAll\n required={required}\n disabled={disabled}\n canClear={!required}\n submitOnChange\n />\n );\n};\n\nexport default EditableDocumentTypeSelect;\n","import PropTypes from 'prop-types';\nimport authService from '../../services/AuthService';\n\nconst HasFeature = ({ feature, children, fallback }) => {\n if (!children) return null;\n if (!authService.hasFeature(feature)) {\n return fallback;\n }\n return children;\n};\n\nHasFeature.propTypes = {\n feature: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,\n children: PropTypes.node,\n fallback: PropTypes.node,\n};\nHasFeature.defaultProps = {\n children: null,\n fallback: null,\n};\nexport default HasFeature;\n","import React, { PureComponent } from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { FaFileSignature } from 'react-icons/fa';\n\nimport config from '@/config';\nimport api from '@/shared/api';\nimport authService from '@/shared/services/AuthService';\nimport { CanCreate, CanRead, CanUpdate, CanDelete } from '@/shared/components/security';\nimport FileIcon from '@/shared/components/FileIcon';\nimport FileUpload from '@/shared/components/input/FileUpload';\nimport { FolderOpenIcon, MailIcon } from '@/shared/components/Icons';\nimport DocumentSelectorModal from '@/shared/components/DocumentSelectorModal';\nimport ShareItemModal from '@/shared/components/ShareItemModal';\nimport TaskDetailsSentEmails from './TaskDetailsSentEmails';\nimport Button from '@/shared/components/Button';\nimport DocumentDetailsModal from '@/modules/documents/details/DocumentDetailsModal';\nimport DocumentService from '@/shared/services/DocumentService';\nimport YesNoModal from '@/shared/components/YesNoModal';\n\nimport messages from '../taskMessages';\nimport ToastrService from '@/shared/services/ToastrService';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport LoadingAnimation from '@/shared/components/LoadingAnimation';\nimport EditableDocumentTypeSelect from '@/modules/documents/EditableDocumentTypeSelect';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport DataCacheService from '@/shared/services/DataCacheService';\n\nconst getSigningStatusColor = (signingStatus) => {\n switch (signingStatus) {\n case 1:\n return '';\n case 2:\n return 'text-orange';\n case 3:\n case 4:\n case 11:\n case 12:\n return 'text-danger';\n case 10:\n return 'text-blue';\n case 20:\n case 21:\n return 'text-success';\n default:\n return '';\n }\n};\nclass TaskDetailsDocuments extends PureComponent {\n state = {\n attachments: [],\n emails: [],\n savingBeforeEmail: false,\n deleteAttachment: null,\n };\n\n componentDidMount() {\n this.retrieveDocumentAndMails();\n }\n componentDidUpdate(prevProps) {\n const { taskIds, taskId } = this.props;\n if (\n taskId !== prevProps.taskId ||\n JSON.stringify(prevProps.taskIds) !== JSON.stringify(taskIds)\n ) {\n this.retrieveDocumentAndMails();\n }\n }\n\n retrieveDocumentAndMails = () => {\n const { intl, taskIds } = this.props;\n // retrieve both linked documents & sent emails for the task(s)\n if (!authService.hasPermission({ functionality: 'Documents', privilege: 'Read' })) return;\n if (!taskIds || taskIds.length === 0) return;\n this.setState({ attachments: null, emails: null });\n\n const linkedDocumentsPromise = api.base.post(\n `${config.appUrls.documents}/api/documents/DocumentLinks`,\n taskIds,\n );\n const sentEmailsPromise = api.base.post(\n `${config.appUrls.documents}/api/emails/TaskHistory`,\n taskIds,\n );\n\n Promise.all([linkedDocumentsPromise, sentEmailsPromise]).then(\n ([{ data: attachments = [] }, { data: emails = [] }]) => {\n this.setState({\n attachments,\n emails,\n });\n },\n (error) => {\n handleHttpError(intl)(error);\n },\n );\n };\n\n openMailModal = () => {\n const { onOpenMailModal } = this.props;\n this.setState({ savingBeforeEmail: true });\n Promise.resolve(onOpenMailModal()).finally(() => {\n this.setState({ savingBeforeEmail: false });\n });\n };\n\n deleteAttachment = (attachment) => {\n const { taskIds, taskId } = this.props;\n // if this modal is opened on the main task, the attachments could also include documents that are linked to one of the sub tasks\n // when clicking the delete attachment button, we have to find the correct taskId, in order to delete the link\n\n let linkId = null;\n if (attachment.links) {\n const tasksLinkedToAttachment = attachment.links\n .filter((x) => x.linkType === 5)\n .map((x) => x.linkId);\n linkId = taskIds.filter((x) => tasksLinkedToAttachment.includes(x))[0];\n } else {\n linkId = taskId;\n }\n\n api.base\n .delete(`${config.appUrls.documents}/api/documents/links/${attachment.id}/${linkId}/5`)\n .then(\n () => {\n this.setState((state) => ({\n deleteAttachment: null,\n attachments: state.attachments.filter((x) => x.id !== attachment.id),\n }));\n },\n (error) => {\n const { intl } = this.props;\n handleHttpError(intl)(error);\n },\n );\n };\n\n onDocumentsSelected = (documents) => {\n const { taskId, relationId } = this.props;\n const { attachments } = this.state;\n const newDocuments = documents.filter(\n (x) => !(attachments || []).map((y) => y.id).some((y) => y === x.id),\n );\n if (newDocuments && newDocuments.length > 0) {\n let documentLinks = [];\n\n for (let i = 0; i < newDocuments.length; i++) {\n const document = newDocuments[i];\n\n // link document to task\n documentLinks = [\n ...documentLinks,\n {\n documentId: document.id,\n linkId: taskId,\n linkType: 5,\n },\n ];\n\n // link document to relation, if present\n if (relationId) {\n documentLinks = [\n ...documentLinks,\n {\n documentId: document.id,\n linkId: relationId,\n linkType: 3,\n },\n ];\n }\n }\n api.base.post(`${config.appUrls.documents}/api/documents/linksmultiple`, documentLinks).then(\n () => {\n this.setState((state) => ({\n attachments: [...state.attachments, ...newDocuments],\n }));\n },\n (error) => {\n const { intl } = this.props;\n handleHttpError(intl)(error);\n },\n );\n }\n };\n onDocumentUpdated = (document) => {\n this.setState((state) => ({\n attachments: state.attachments.map((x) => (x.id !== document.id ? x : { ...x, ...document })),\n documentDetailId: null,\n }));\n };\n\n getPreviousDocumentId = (documentId) => {\n const { attachments } = this.state;\n if (!attachments || !attachments.length) return;\n\n const currentIndex = attachments.findIndex((x) => x.id === documentId);\n\n // No previous doc present\n if (currentIndex <= 0) return;\n\n const previousIndex = currentIndex - 1;\n if (previousIndex < attachments.length) {\n return attachments[previousIndex].id;\n }\n };\n getNextDocumentId = (documentId) => {\n const { attachments } = this.state;\n if (!attachments || !attachments.length) return;\n const currentIndex = attachments.findIndex((x) => x.id === documentId);\n if (currentIndex < 0) return;\n\n const nextIndex = currentIndex + 1;\n\n // No next doc present\n if (nextIndex >= attachments.length) return;\n\n return attachments[nextIndex].id;\n };\n\n onDocumentUploaded = (error, document) => {\n const { intl } = this.props;\n\n if (error) {\n ToastrService.error(intl.formatMessage(messages.MsgUploadAttachmentFailed));\n return;\n }\n\n this.setState(({ attachments }) => ({\n attachments: [...attachments, document],\n }));\n };\n\n updateDocumentType = (document, documentType) => {\n const { intl } = this.props;\n\n return api.base\n .put(`${config.appUrls.documents}/api/documents/type`, { id: document.id, documentType })\n .then(() => {\n this.setState((state) => ({\n attachments: state.attachments.map((x) =>\n x.id !== document.id ? x : { ...x, documentType },\n ),\n }));\n ToastrService.success();\n })\n .catch(handleHttpError(intl));\n };\n render() {\n const { taskId, relationId, intl, disabled, showSendEmailButton } = this.props;\n const {\n attachments,\n emails,\n deleteAttachment,\n documentDetailId,\n savingBeforeEmail,\n showDocumentSelectorModal,\n } = this.state;\n const documentUploadEndpoint = `${config.appUrls.documents\n }/api/documents?documentType=13&documentLinkType=5&recognitionStatus=4&linkId=${taskId}&relationId=${relationId || ''\n }`;\n const canRead = authService.hasPermission({ functionality: 'Documents', privilege: 'Read' });\n\n return (\n
    \n
    {intl.formatMessage(messages.Documents)}
    \n {attachments ? (\n \n \n {attachments.map((attachment) => (\n \n \n \n \n \n \n ))}\n \n
    \n {canRead ? (\n this.setState({ documentDetailId: attachment.id })}\n title={intl.formatMessage(messages.OpenDocument)}\n >\n \n {attachment.name}\n \n ) : (\n \n \n {attachment.name}\n \n )}\n \n this.updateDocumentType(attachment, type)}\n required\n disabled={\n disabled ||\n attachment.recognitionStatus === 1 ||\n attachment.recognitionStatus === 3 ||\n !attachment.canRemove\n }\n />\n \n \n \n
    \n {canRead ? (\n DocumentService.download(attachment.id)}\n title={intl.formatMessage(messages.DownloadAttachment)}\n className=\"fa fa-download clickable margin5L\"\n />\n ) : null}\n \n {attachment.canEdit && !DataCacheService.hasUserConnectPlatform(46) && (\n \n DocumentService.edit(attachment.id, intl.locale.split('-')[0])\n }\n title={intl.formatMessage(messages.EditDocument)}\n className=\"fa fa-pencil clickable margin10L\"\n />\n )}\n \n \n this.setState({ deleteAttachment: attachment })}\n title={intl.formatMessage(messages.DeleteAttachment)}\n className=\"fa fa-trash-o clickable margin10L\"\n />\n \n
    \n
    \n ) : (\n \n )}\n\n \n {!disabled ? (\n
    \n this.onDocumentUploaded(error, file)}\n removeSuccessfullAfter={500}\n />\n
    \n ) : null}\n this.setState({ showDocumentSelectorModal: true })}\n >\n \n \n \n
    \n\n {showDocumentSelectorModal && (\n {\n this.setState({ showDocumentSelectorModal: false }, () =>\n this.onDocumentsSelected(documents),\n );\n }}\n onClose={() => this.setState({ showDocumentSelectorModal: false })}\n disabled={disabled}\n />\n )}\n\n {emails && emails.length > 0 && }\n\n {showSendEmailButton ? \n \n {savingBeforeEmail && }\n {!savingBeforeEmail && }\n\n {intl.formatMessage(messages.SendEmail)}\n \n : null}\n\n {documentDetailId ? (\n this.setState({ documentDetailId: null })}\n disabled={disabled}\n />\n ) : null}\n\n {deleteAttachment ? (\n \n this.setState({\n deleteAttachment: null,\n })\n }\n onSave={() => this.deleteAttachment(deleteAttachment)}\n />\n ) : null}\n
    \n );\n }\n}\nexport default TaskDetailsDocuments;\n","import React, { Component } from 'react';\nimport classNames from 'classnames';\nimport moment from 'moment';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage, injectIntl } from 'react-intl';\nimport debounce from 'lodash-es/debounce';\nimport YearSelect from '@/shared/components/input/YearSelect';\nimport config from '@/config';\nimport api from '@/shared/api';\nimport FormattedListValue, { listItemMsg } from '@/shared/components/FormattedListValue';\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport RelationName, { getRelationName } from '@/shared/components/RelationName';\nimport ToastrService from '@/shared/services/ToastrService';\n\nimport Button from '@/shared/components/Button';\nimport FormattedDateTime from '@/shared/components/FormattedDateTime';\nimport { SaveIcon, ShareIcon } from '@/shared/components/Icons';\nimport Checkbox from '@/shared/components/input/Checkbox';\nimport DatePicker from '@/shared/components/input/DatePicker';\nimport UserSearch from '@/shared/components/input/UserSearch';\nimport LoadingAnimation from '@/shared/components/LoadingAnimation';\nimport { hasAssignments } from '@/shared/components/security/HasAssignments';\nimport ShareItemModal from '@/shared/components/ShareItemModal';\nimport AuthService, { functionalities, privileges } from '@/shared/services/AuthService';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport {\n getShareItemNameForTask,\n mapInvoiceStreamName,\n} from '@/shared/services/ObjectDisplayService';\nimport guid, { emptyGuid } from '@/shared/utils/guid';\nimport intlShape from '@/shared/utils/intlShape';\nimport { falseFunc, isBeforeMinimum } from '@/shared/utils/validationHelpers';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport { ModalContext, ModalType } from '@/shared/providers/ModalProvider';\nimport { retrieveWorkResources } from '@/shared/components/registration/resourceApi';\nimport ResourceAutoComplete from '@/shared/components/registration/ResourceAutoComplete';\n\nimport EditableTextArea from '@/shared/components/editable/EditableTextArea';\nimport ZendeskHelp from '@/shared/components/ZendeskHelp';\nimport InputGroupWrapper from '@/shared/components/InputGroupWrapper';\nimport { TaskTagsMultiSelect } from '@/shared/components/input/multiselect/TaskTagsMultiSelect';\nimport dateFormatService from '../../../shared/services/DateFormatService';\nimport { dynamicSortMultiple } from '../../../shared/utils/dynamicSort';\nimport TaskIcon from '../TaskIcon';\nimport messages from '../taskMessages';\nimport TaskStatusIcon from '../TaskStatusIcon';\nimport TaskDetailsParameterValue from './TaskDetailsParameterValue';\nimport TaskDetailsRegistrations from './TaskDetailsRegistrations';\nimport TaskDetailsSubtasks from './TaskDetailsSubTasks';\nimport TaskDetailsDocuments from './TaskDetailsDocuments';\nimport HasFeature from '@/shared/components/security/HasFeature';\n\nconst mapParameterValues = item => {\n const result = { ...item, readOnly: item.id === emptyGuid };\n if (item.valueDate && typeof item.valueDate === 'string')\n result.valueDate = moment.utc(item.valueDate);\n if (item.relationFieldType === 15)\n result.valueObject = item.valueText ? JSON.parse(item.valueText) : null;\n return result;\n};\nconst getTaskName = (task, intl) => {\n if (!task) return null;\n if (task.name) return task.name;\n if (!task.templateId) return '';\n return intl.formatMessage(listItemMsg('tasktemplate', task.templateId, task.templateName));\n};\nconst mapTask = (data, intl) =>\n data\n ? {\n ...data,\n deadline: data.deadline && moment.utc(data.deadline),\n completedDate: data.completedDate && moment.utc(data.completedDate),\n name: getTaskName(data, intl),\n userId: data.userId || (data.parent && data.parent.userId) || null,\n ...(data.parameterValues\n ? {\n parameterValues: data.parameterValues.map(mapParameterValues),\n }\n : {}),\n }\n : null;\n\nclass TaskDetailsModal extends Component {\n static contextType = ModalContext;\n // A list of ids that has been opened. These will be used to re-open the previous task when you have navigated to a parent or subtask\n taskHistory = [];\n // A list of the tasks that had changes and were updated in the back-end. Send these back to the container when the task modal is finally closed\n updatedTasks = [];\n\n state = {\n task: {\n tags: [],\n },\n showHistory: false,\n focusedDateParameters: [],\n taskIds: [],\n invoiceStreams: [],\n canEditAssignment: false,\n registrations: [],\n usersForUserSearch: [],\n retrieving: true,\n hasChanged: false,\n };\n\n static propTypes = {\n onSave: PropTypes.func.isRequired,\n intl: intlShape.isRequired,\n onClose: PropTypes.func.isRequired,\n show: PropTypes.bool,\n task: PropTypes.shape({}).isRequired,\n showSendEmailButton: PropTypes.bool,\n };\n\n static defaultProps = {\n show: false,\n showSendEmailButton: true,\n };\n\n constructor(props) {\n super(props);\n this.hasAssignments = hasAssignments();\n }\n\n async componentDidMount() {\n this.form = React.createRef();\n\n const { task, intl } = this.props;\n\n this.setState({ retrieving: true });\n const resources = await retrieveWorkResources(intl);\n this.setState({ resources }, () => {\n if (task.id) {\n this.taskHistory.push(task.id);\n this.openTaskDetails(task.id);\n } else {\n const { defaultTaskResourceId } = DataCacheService.getDefaultCompany();\n let defaultResource;\n if (defaultTaskResourceId) {\n defaultResource = resources.find(x => x.id === defaultTaskResourceId);\n }\n\n this.setState({\n selectedResource: defaultResource,\n originalTaskName: task.name,\n originalUserId: task.userId,\n task: mapTask(task, intl),\n focusedDateParameters: (task.parameterValues || []).map(x => ({\n id: x.id,\n focused: false, // to be used by date pickers\n })),\n canEditAssignment: false,\n retrieving: false,\n });\n }\n });\n }\n\n onTaskClick = id => {\n const { hasChanged } = this.state;\n if (hasChanged) {\n return this.saveTask(false).then(() => {\n this.taskHistory.push(id);\n this.openTaskDetails(id);\n });\n } else {\n this.taskHistory.push(id);\n this.openTaskDetails(id);\n }\n };\n\n openTaskDetails = id => {\n const { intl } = this.props;\n const { resources } = this.state;\n this.setState({\n retrieving: true,\n });\n api.base.get(`${config.appUrls.tasks}/api/plannedTasks/details/${id}`).then(\n ({ data }) => {\n this.setState(\n {\n originalTaskName: data.name,\n originalUserId: data.userId,\n task: mapTask(data, intl),\n focusedDateParameters: (data.parameterValues || []).map(x => ({\n id: x.id,\n focused: false, // to be used by date pickers\n })),\n canEditAssignment: false,\n retrieving: false,\n hasChanged: false,\n selectedResource: data.resourceId\n ? resources.find(x => x.id === data.resourceId)\n : data.parent\n ? data.parent.resourceId\n ? resources.find(x => x.id === data.parent.resourceId)\n : null\n : null,\n\n taskIds: [data.id, ...(data.children ? data.children.map(x => x.id) : [])],\n },\n () => {\n this.retrieveAssignments();\n this.addDefaultUserForSubtask();\n this.retrieveRegistrations();\n },\n );\n },\n error => {\n this.setState({\n retrieving: false,\n });\n handleHttpError(intl)(error);\n },\n );\n };\n\n addUpdatedTask = task => {\n const updatedTaskIndex = this.updatedTasks.findIndex(x => x.id === task.id);\n if (updatedTaskIndex >= 0) {\n this.updatedTasks[updatedTaskIndex] = task;\n } else {\n this.updatedTasks.push(task);\n }\n };\n\n reopenTaskOrCloseModal = task => {\n const { onSave } = this.props;\n\n this.taskHistory = this.taskHistory.filter(x => x !== task.id);\n\n if (!this.taskHistory || this.taskHistory.length <= 0) {\n // close the modal and return updated tasks\n onSave(this.updatedTasks);\n } else {\n const previousTask = [...this.taskHistory].pop();\n this.openTaskDetails(previousTask);\n }\n document.body.classList.remove('modal-top-open');\n };\n\n prepareModelForSave = () => {\n const {\n task,\n originalTaskName,\n touchedTaskName,\n touchedUserId,\n originalUserId,\n selectedResource,\n invalidDeadline,\n } = this.state;\n\n if (!task.name || !task.relation || !task.relation.invoiceStreamId) return;\n if (isBeforeMinimum(task.deadline) || invalidDeadline) return;\n if (task.taskLevel !== 2 && !selectedResource) return;\n\n const parentResourceId = task.parent ? task.parent.resourceId : null;\n\n const model = {\n ...task,\n };\n\n model.resourceId =\n selectedResource && (!parentResourceId || parentResourceId !== selectedResource.id)\n ? selectedResource.id\n : null;\n\n // Needed in order to keep showing translated value if the name itself wasn't changed\n if (!touchedTaskName) {\n model.name = originalTaskName;\n }\n\n if (!touchedUserId) {\n model.userId = originalUserId;\n }\n\n return model;\n };\n\n previewComputedTaskParameters = () => {\n const { task } = this.state;\n // No computed parameters present, no need to do a callback\n if (!task.parameterValues.some(pv => !!pv.computedParameterType)) return Promise.resolve();\n\n const model = this.prepareModelForSave();\n const { intl } = this.props;\n if (task.id === undefined) {\n return Promise.resolve();\n }\n\n return api.base.post(`${config.appUrls.tasks}/api/plannedTasks/ComputeParameters`, model).then(\n ({ data }) => {\n // Get most recent task state\n const { task } = this.state;\n // Override values of taskComputedValues with new values\n const parameterValues = task.parameterValues.map(pv =>\n pv.computedParameterModifiedByUser ? pv : data.filter(x => pv.id === x.id)[0] || pv,\n );\n return { ...task, parameterValues };\n },\n error => {\n handleHttpError(intl)(error);\n },\n );\n };\n\n saveTask = (autoClose = true) => {\n this.setState({ touchedTaskName: true });\n const model = this.prepareModelForSave();\n const { intl } = this.props;\n const { task } = this.state;\n\n return (task.id !== undefined\n ? api.base.put(`${config.appUrls.tasks}/api/plannedTasks`, model)\n : api.base.post(`${config.appUrls.tasks}/api/plannedTasks`, model)\n ).then(\n ({ data }) => {\n const updatedTask = {\n scheduleRemark: task.scheduleRemark,\n ...data,\n };\n\n this.addUpdatedTask(updatedTask);\n this.setState({ hasChanged: false });\n\n if (autoClose) {\n ToastrService.changesSaved(intl);\n this.reopenTaskOrCloseModal(updatedTask);\n }\n return updatedTask;\n },\n error => {\n handleHttpError(intl)(error);\n },\n );\n };\n\n closeModal = () => {\n const { task } = this.state;\n document.body.classList.remove('modal-top-open');\n this.reopenTaskOrCloseModal(task);\n };\n\n enterModal = () => {\n const { task } = this.state;\n document.body.classList.add('modal-top-open');\n };\n\n deadlineChanged = (deadline, isValid) => {\n this.setState(({ task }) => ({\n invalidDeadline: isValid === false,\n task: {\n ...task,\n deadline,\n },\n hasChanged: true,\n }));\n };\n\n userChanged = user => {\n this.setState(({ task }) => ({\n touchedUserId: true,\n task: {\n ...task,\n userId: user ? user.id : null,\n },\n hasChanged: true,\n }));\n };\n referenceYearChanged = year => {\n this.setState(({ task }) => ({\n task: {\n ...task,\n year,\n },\n hasChanged: true,\n }));\n };\n resourceChanged = resource => {\n this.setState({\n selectedResource: resource,\n hasChanged: true,\n });\n };\n\n relationChanged = relation => {\n this.setState(({ task }) => ({\n task: {\n ...task,\n invoiceStreamId: relation ? relation.invoiceStreamId : undefined,\n relationId: relation ? relation.id : undefined,\n relation,\n },\n hasChanged: true,\n }));\n };\n\n taskNameChanged = name => {\n this.setState(({ task }) => ({\n touchedTaskName: true,\n task: {\n ...task,\n name,\n },\n hasChanged: true,\n }));\n };\n assignmentChanged = e => {\n const id = e.target.value;\n this.setState(({ invoiceStreams, task }) => {\n const stream = invoiceStreams.find(x => x.id === id);\n if (stream === null) return {};\n const { assignmentId = null, assignmentName = null, assignmentTemplateId = null } = stream;\n return {\n task: { ...task, invoiceStreamId: id, assignmentId, assignmentName, assignmentTemplateId },\n hasChanged: true,\n };\n });\n };\n\n statusChanged = status => {\n this.setState(({ task }) => ({\n task: {\n ...task,\n status: Number(status),\n },\n hasChanged: true,\n }));\n };\n\n getUser = userId => {\n const { usersForUserSearch, task } = this.state;\n const isSameAsMainTask = !!(task.parent && task.parent.userId === userId);\n return usersForUserSearch && userId\n ? usersForUserSearch.find(x => x.id === (isSameAsMainTask ? guid.empty : userId))\n : null;\n };\n\n datePickerFocusChanged = (e, updatedParameter) => {\n this.setState(({ focusedDateParameters }) => ({\n focusedDateParameters: focusedDateParameters.map(item => {\n if (item.id === updatedParameter.id) {\n return { ...item, focused: e.focused };\n }\n return item;\n }),\n }));\n };\n\n parameterValueChanged = (value, parameter, parameterType, isValid) => {\n this.setState(\n ({ task }) => ({\n invalidParameter: isValid === false,\n task: {\n ...task,\n parameterValues: task.parameterValues.map(item => {\n if (item.id === parameter.id) {\n return {\n ...item,\n valueText:\n parameterType === 0 || parameterType === 4 || parameterType === 5 ? value : null,\n valueNumeric: parameterType === 1 ? value : null,\n valueDate: parameterType === 2 ? value : null,\n valueBoolean: parameterType === 3 ? value : null,\n computedParameterModifiedByUser: !!parameter.computedParameterType,\n };\n }\n return item;\n }),\n },\n hasChanged: true,\n }),\n debounce(() => {\n this.previewComputedTaskParameters().then(task => {\n if (task) this.setState({ task });\n });\n }, 500),\n );\n };\n retrieveRegistrations = () => {\n const { taskIds } = this.state;\n const { intl } = this.props;\n this.setState({ registrations: [] });\n\n if (\n !AuthService.hasPermission({\n functionality: functionalities.RegistrationOthers,\n privilege: privileges.Read,\n }) &&\n !AuthService.hasPermission({\n functionality: functionalities.RegistrationOwn,\n privilege: privileges.Read,\n })\n )\n return;\n api.base\n .post(`${config.appUrls.api}/api/registration/TaskRegistrations`, taskIds)\n .then(({ data }) => {\n this.setState({\n registrations: data,\n });\n }, handleHttpError(intl));\n };\n\n retrieveAssignments = () => {\n const { task } = this.state;\n\n if (!this.hasAssignments) return;\n if (task.hasSchedule || task.taskLevel === 1) return;\n const relationId = task.relationId || (task.relation && task.relation.Id);\n if (!relationId) return;\n if (\n !AuthService.hasPermission({\n functionality: functionalities.Relation,\n privilege: privileges.Read,\n })\n )\n return;\n\n api.base.get(`${config.appUrls.api}/api/invoiceStream/Names/${relationId}`).then(({ data }) => {\n const { intl } = this.props;\n this.setState({\n invoiceStreams: (data || [])\n .map(x => ({ ...x, label: mapInvoiceStreamName(x, intl) }))\n .sort(dynamicSortMultiple('-isMain', 'label')),\n canEditAssignment: data && data.length > 1,\n });\n });\n };\n\n addDefaultUserForSubtask = () => {\n const { task } = this.state;\n const { intl } = this.props;\n\n let allUsers = [...DataCacheService.getUsers()];\n\n if (task.parent && task.parent.userId && task.parent.userId !== guid.empty) {\n const parentUserName = DataCacheService.getUserName(task.parent.userId);\n const mainTaskUser = {\n id: guid.empty,\n name: `${intl.formatMessage(messages['Same as parent'])} (${parentUserName})`,\n };\n allUsers = [mainTaskUser, ...allUsers];\n }\n\n this.setState({\n usersForUserSearch: [...allUsers],\n });\n };\n\n getUsername = userId => {\n const { intl } = this.props;\n const user = DataCacheService.getUserName(userId);\n return user || intl.formatMessage(messages.System);\n };\n\n handleTasksUpdated = updatedTasks => {\n if (!updatedTasks || !updatedTasks.length) return;\n const { intl } = this.props;\n\n const items = updatedTasks.map(item => mapTask(item, intl));\n\n updatedTasks.forEach(this.addUpdatedTask);\n\n this.setState(({ task }) => {\n const mainTaskUpdated = items.find(x => x.id === task.id);\n const { status, isBlocked } = mainTaskUpdated || task;\n\n return {\n task: {\n ...task,\n status,\n isBlocked,\n children: task.children.map(row => {\n const updated = updatedTasks.find(x => x.id === row.id);\n if (!updated) return row;\n return { ...row, ...updated };\n }),\n },\n };\n });\n };\n\n updateScheduleRemark = value => {\n const { task: { scheduleId, scheduleRemark, id } = {} } = this.state;\n if (!scheduleId) return;\n if ((scheduleRemark || '') === (value || '')) return;\n return api.base\n .put(`${config.appUrls.tasks}/api/TaskSchedules/Remark`, {\n taskScheduleId: scheduleId,\n remark: value,\n })\n .then(\n () => {\n this.setState(({ task }) => ({\n task: id === task.id ? { ...task, scheduleRemark: value } : task,\n }));\n return true;\n },\n error => {\n const { intl } = this.props;\n handleHttpError(intl)(error);\n return Promise.reject();\n },\n );\n };\n onTagsChanged = tags => {\n this.setState(({ task }) => ({\n task: {\n ...task,\n tags: tags.map(x => ({\n id: x,\n })),\n },\n hasChanged: true,\n }));\n };\n\n openMailModal = () => {\n const { onSave, onTaskMailModalSaved } = this.props;\n const { task } = this.state;\n\n // save task before sending the email (if user has permissions). This avoids the email being sent with missing/incorrect data about the task.\n if (\n AuthService.hasPermission({\n functionality: task.taskLevel === 2 ? 'Todo' : 'PlannedTask',\n privilege: 'Create',\n })\n ) {\n return this.saveTask(false).then(updatedTask => {\n onSave([...this.updatedTasks, updatedTask]);\n // eslint-disable-next-line react/destructuring-assignment\n this.context?.setShowModalInfo({\n modalType: ModalType.TaskMail,\n task: updatedTask,\n onSave: onTaskMailModalSaved,\n });\n });\n } else {\n return this.context?.setShowModalInfo({\n modalType: ModalType.TaskMail,\n task,\n onSave: onTaskMailModalSaved,\n });\n }\n };\n\n render() {\n const { show, intl, showSendEmailButton } = this.props;\n const {\n dateFocused,\n task,\n touchedRelation,\n touchedTaskName,\n retrieving,\n showHistory,\n invoiceStreams,\n canEditAssignment,\n showShareItemModal,\n usersForUserSearch,\n resources,\n selectedResource,\n registrations,\n invalidDeadline,\n invalidParameter,\n taskIds,\n } = this.state;\n const selectedUser = this.getUser(task.userId);\n const createdByUser = DataCacheService.getUserName(task.createdBy);\n\n const canEdit = AuthService.hasPermission({\n functionality: task.taskLevel === 2 ? 'Todo' : 'PlannedTask',\n privilege: 'Update',\n });\n const taskNameClassName = classNames('form-group', {\n 'has-error': touchedTaskName && !task.name,\n });\n\n const relationClassName = classNames('form-group', {\n 'has-error': touchedRelation && (!task.relation || !task.relation.invoiceStreamId),\n });\n const relationId = task?.relation?.id;\n\n return (\n \n {task.name}\n
    \n }\n show={show}\n onClose={this.closeModal}\n disabled={!canEdit || invalidDeadline || invalidParameter}\n onSave={this.saveTask}\n size=\"xl\"\n customClassName=\"modal-top\"\n onEnter={this.enterModal}\n okLabel={\n \n {intl.formatMessage(messages.Save)}\n \n }\n leftButton={\n \n }\n >\n {show && retrieving && }\n\n {show && !retrieving && (\n
    \n
    \n
    \n
    \n {task.parent && (\n
    \n \n this.onTaskClick(task.parent.id)}\n >\n

    \n \n  \n \n {task.parent.name && task.parent.name}\n {!task.parent.name && (\n \n )}\n \n

    \n
    \n
    \n )}\n
    \n \n
    \n

    \n \n

    \n
    \n
    \n {this.hasAssignments && (\n
    \n \n
    \n {canEditAssignment ? (\n \n {invoiceStreams.map(x => (\n \n ))}\n \n ) : (\n

    {mapInvoiceStreamName(task, intl)}

    \n )}\n
    \n
    \n )}\n
    \n \n
    \n this.taskNameChanged(e.target.value)}\n required\n disabled={!canEdit}\n className=\"form-control input-sm\"\n />\n
    \n
    \n\n
    \n \n
    \n this.statusChanged(e.target.value)}\n >\n \n \n \n \n
    \n
    \n\n
    \n \n
    \n \n
    \n
    \n \n \n
    \n \n
    \n
    \n \n
    \n \n
    \n {task.taskLevel === 0 ? (\n \n ) : task.year === 0 ? null : (\n task.year\n )}\n
    \n
    \n
    \n \n \n
    \n \n this.deadlineChanged(moment.utc(task.originalDeadline))\n }\n title={intl.formatMessage(messages.RestoreOriginalDeadline, {\n originalDeadline: dateFormatService.formatDate(\n task.originalDeadline,\n ),\n })}\n >\n \n \n ) : null\n }\n >\n this.setState({ dateFocused: focused })}\n id=\"taskDeadline\"\n block\n small\n isOutsideRange={falseFunc}\n />\n \n
    \n
    \n {task.taskLevel === 2 && !!createdByUser && (\n
    \n \n
    \n {createdByUser}\n
    \n
    \n )}\n
    \n \n
    \n {task && task.tags ? (\n x.id)}\n onChange={this.onTagsChanged}\n disabled={!canEdit}\n small\n />\n ) : null}\n
    \n
    \n {task.completedDate && (\n
    \n \n
    \n \n
    \n
    \n )}\n\n {task && task.taskLevel === 1 && (\n <>\n
    \n \n
    \n
    \n \n this.setState({\n task: {\n ...task,\n inapplicable: e,\n },\n hasChanged: true,\n })\n }\n />\n
    \n
    \n
    \n
    \n \n
    \n
    \n \n this.setState({\n task: {\n ...task,\n rejected: e,\n },\n hasChanged: true,\n })\n }\n />\n
    \n
    \n
    \n \n )}\n\n {task &&\n task.parameterValues &&\n task.parameterValues.map(parameter => (\n \n ))}\n\n {task.scheduleId && (\n
    \n \n\n
    \n

    \n this.updateScheduleRemark(value)}\n maxLength=\"4000\"\n rows={10}\n readOnly={!canEdit}\n displayValue={\n task.scheduleRemark ? (\n

    {task.scheduleRemark}
    \n ) : null\n }\n style={{ minHeight: '100px' }}\n />\n

    \n
    \n
    \n )}\n\n {/* REMARK */}\n
    \n \n\n
    \n \n this.setState({\n task: {\n ...task,\n remark: e.target.value,\n },\n hasChanged: true,\n })\n }\n />\n
    \n
    \n \n \n \n
    \n {showHistory && (\n
    \n this.setState({ showHistory: false })}\n >\n \n {intl.formatMessage(messages.HideHistory)}\n \n
    \n \n {intl.formatMessage(messages.History)}\n
    \n\n \n \n {task.taskStatusHistory.map(historyItem => (\n \n \n \n ))}\n \n
    \n {historyItem.oldStatus === null && (\n \n \n\n {historyItem.source === 7 && (\n <>\n  \n \n  \n \n \n )}\n \n )}\n {historyItem.oldStatus != null && (\n \n {this.getUsername(historyItem.userId)}{' '}\n \n \n  \n \n \n  \n \n \n \n  \n \n \n  \n \n  \n \n  \n \n  \n \n {historyItem.source && (\n \n  \n \n  \n \n \n )}\n \n \n )}\n
    \n
    \n )}\n {!showHistory && (\n this.setState({ showHistory: true })}\n historyActive={showHistory}\n disabled={!canEdit}\n />\n )}\n\n this.setState({ showHistory: true })}\n historyActive={showHistory}\n disabled={!canEdit}\n />\n \n {showShareItemModal && (\n this.setState({ showShareItemModal: false })}\n />\n )}\n
    \n \n )}\n \n );\n }\n}\n\nexport default injectIntl(TaskDetailsModal);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { defineMessages, FormattedMessage, injectIntl } from 'react-intl';\nimport FileIcon from '@/shared/components/FileIcon';\nimport intlShape from '@/shared/utils/intlShape';\nimport DocumentService from '@/shared/services/DocumentService';\nimport FormattedListValue from '@/shared/components/FormattedListValue';\nimport Button from '@/shared/components/Button';\nimport { CanDelete } from '@/shared/components/security';\nimport { MdForwardToInbox } from 'react-icons/md';\nimport { FaRedo } from 'react-icons/fa';\n\nconst messages = defineMessages({\n Forward: 'Forward',\n From: 'From',\n EmailTo: 'To',\n Cc: 'Cc',\n Bcc: 'Bcc',\n ReplyTo: 'Reply to',\n Subject: 'Subject',\n IncomingEmail: 'Incoming email',\n OutgoingEmail: 'Outgoing email',\n Attachments: 'Attachments',\n Download: 'Download',\n Status: 'Status',\n Reason: 'Reason',\n ResendEmail: 'Resend email',\n DeleteAttachment: 'Delete attachment',\n});\n\nconst EmailMetadataDetails = ({\n metadataJson,\n documentType,\n attachments,\n onResendEmail,\n intl,\n onDeleteAttachment,\n onForward,\n}) => {\n if (!metadataJson) return null;\n const email = typeof metadataJson === 'string' ? JSON.parse(metadataJson) : metadataJson;\n\n return (\n
    \n
    \n
    \n \n {email.direction === 0 && }\n {email.direction === 1 && }\n \n
    \n
    \n
    \n
    \n \n
    \n
    \n {email.from}\n
    \n
    \n
    \n
    \n \n
    \n
    \n {email.to}\n
    \n
    \n {email.cc && (\n
    \n
    \n \n
    \n
    \n {email.cc}\n
    \n
    \n )}\n {email.bcc && (\n
    \n
    \n \n
    \n
    \n {email.bcc}\n
    \n
    \n )}\n {email.replyTo && (\n
    \n
    \n \n
    \n
    \n {email.replyTo}\n
    \n
    \n )}\n\n
    \n
    \n \n
    \n
    {email.subject}
    \n
    \n {email.status > 0 && (\n
    \n
    \n \n
    \n
    \n \n \n {email.status === 2 && }\n {email.status === 3 && }\n {email.status === 4 && }\n \n \n \n \n \n
    \n
    \n )}\n {email.status === 4 && email.reason && (\n
    \n
    \n \n
    \n
    \n {email.reason}\n
    \n
    \n )}\n {documentType === 8 && email.direction === 1 && (\n
    \n
    \n \n
    \n
    \n )}\n\n
    \n
    \n \n
    \n
    \n {attachments && attachments.length > 0 && (\n
    \n
    \n \n
    \n
    \n {attachments.map(attachment => (\n \n \n DocumentService.open(attachment.id)}\n title={intl.formatMessage(messages.Download)}\n >\n \n {attachment.name}\n \n \n \n onDeleteAttachment(attachment)}\n title={intl.formatMessage(messages.DeleteAttachment)}\n className=\"fa fa-trash-o clickable margin10L\"\n />\n \n \n ))}\n
    \n
    \n )}\n
    \n );\n};\n\nEmailMetadataDetails.propTypes = {\n metadataJson: PropTypes.oneOfType([PropTypes.string, PropTypes.shape({})]).isRequired,\n onResendEmail: PropTypes.func.isRequired,\n documentType: PropTypes.number.isRequired,\n intl: intlShape.isRequired,\n};\n\nexport default injectIntl(EmailMetadataDetails);\n","import React, { Component } from 'react';\nimport { injectIntl, defineMessages } from 'react-intl';\nimport PropTypes from 'prop-types';\nimport Highlighter from 'react-highlight-words';\nimport handleHttpError from '@/shared/services/HandleHttpError';\n\nimport classNames from 'classnames';\nimport moment from 'moment';\nimport { getRelationNameMapper } from '@/shared/components/RelationName';\nimport { dynamicSortMultiple } from '@/shared/utils/dynamicSort';\nimport { mapInvoiceStreamName } from '@/shared/services/ObjectDisplayService';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport intlShape from '@/shared/utils/intlShape';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport { ToDoIcon } from '@/shared/components/Icons';\nimport ToastrService from '@/shared/services/ToastrService';\nimport api from '../../api';\nimport config from '../../../config';\nimport AutoComplete from './select/AutoComplete';\nimport dateFormatService from '../../services/DateFormatService';\n\nconst messages = defineMessages({\n Task: 'Task',\n NoTasksFound: 'No tasks found',\n});\nconst taskSearch = (item, searchValue) => {\n if (!searchValue) return true;\n if (!item) return false;\n if (!item.search) return false;\n return item.search.toUpperCase().indexOf(searchValue.toUpperCase()) >= 0;\n};\nconst renderItem = (item, searchValue) => (\n \n {item.level > 0 && !item.isToDo && (\n \n )}\n {item.level > 0 && item.isToDo && (\n \n )}\n \n {searchValue ? (\n \n ) : (\n item.label\n )}\n \n \n);\nclass TasksForMultipleRelationsSelector extends Component {\n state = {\n items: [],\n };\n\n constructor(props) {\n super(props);\n this.nameMapper = getRelationNameMapper(props.intl);\n this.assignmentsEnabled = DataCacheService.assignmentsEnabled();\n }\n\n componentDidUpdate(prevProps) {\n const { initialSelectedItem, relations } = this.props;\n if (JSON.stringify(prevProps.initialSelectedItem) !== JSON.stringify(initialSelectedItem)) {\n this.setStateFromInitialItem(initialSelectedItem);\n }\n if (JSON.stringify(prevProps.relations) !== JSON.stringify(relations)) {\n this.retrieveTasks();\n }\n }\n\n getTaskLabel = task => {\n const { intl } = this.props;\n return (\n task.plannedTaskName ||\n (task.plannedTaskTemplateId\n ? intl.formatMessage(\n listItemMsg(\n 'tasktemplate',\n task.plannedTaskTemplateId,\n task.plannedTaskTemplateName || '',\n ),\n )\n : '')\n );\n };\n\n componentDidMount() {\n this.retrieveTasks();\n }\n\n retrieveTasks = () => {\n const { initialSelectedItem, relations, intl } = this.props;\n if (!relations || relations.length === 0) {\n console.warn('No relations passed to TasksForMultipleRelationsSelector');\n return;\n }\n api.base\n .post(`${config.appUrls.tasks}/api/PlannedTasks/ForRelations`, {\n relations,\n })\n .then(\n ({ data }) => {\n if (!data || !data.length) {\n this.setState({\n items: [],\n });\n ToastrService.info(intl.formatMessage(messages.NoTasksFound));\n return;\n }\n const perStream = data.reduce((streams, task, mainTaskIndex) => {\n let stream = streams.find(x => x.invoiceStreamId === task.invoiceStreamId);\n if (!stream) {\n const relationName = this.nameMapper(task.relation);\n const streamName = this.assignmentsEnabled ? mapInvoiceStreamName(task, intl) : null;\n stream = {\n key: task.invoiceStreamId,\n invoiceStreamId: task.invoiceStreamId,\n relationId: task.relationId,\n relation: task.relation,\n relationName,\n streamName,\n label: streamName ? `${relationName} - ${streamName}` : relationName,\n level: 0,\n disabled: true,\n tasks: [],\n };\n streams.push(stream);\n }\n\n const deadline = task.deadline\n ? ` (${dateFormatService.formatDate(task.deadline)})`\n : '';\n const taskLabel = `${this.getTaskLabel(task)}${deadline}`;\n stream.tasks.push({\n ...task,\n label: taskLabel,\n id: task.plannedTaskId,\n key: task.plannedTaskId,\n search: `${taskLabel};${stream.label}`,\n order: mainTaskIndex,\n level: 1,\n });\n return streams;\n }, []);\n this.setState(\n {\n items:\n perStream.length === 1\n ? perStream[0].tasks\n : perStream.sort(dynamicSortMultiple('label')).reduce(\n (result, stream) => {\n const taskLabels = stream.tasks.map(x => x.label).join(';');\n return result.concat([\n {\n ...stream,\n search: `${stream.label};${taskLabels}`,\n },\n ...stream.tasks,\n ]);\n },\n\n [],\n ),\n },\n () => this.setStateFromInitialItem(initialSelectedItem),\n );\n },\n error => {\n handleHttpError(intl)(error);\n },\n );\n };\n\n setStateFromInitialItem(initialSelectedItem) {\n const { tasks } = this.state;\n\n if (!initialSelectedItem) return;\n const task = tasks.find(x => x.plannedTaskId === initialSelectedItem);\n if (task) {\n this.setState({\n value: {\n ...task,\n key: task.plannedTaskId,\n },\n });\n }\n }\n\n onTaskChanged = task => {\n if (task === undefined) return;\n const { onSelect } = this.props;\n onSelect(task);\n this.setState({ value: task }, () => {\n this.setState({ value: null });\n });\n };\n\n render() {\n const { intl, disabled, emptyLabel, autoFocus } = this.props;\n const { value, items } = this.state;\n if (!items || !items.length) return null;\n return (\n this.onTaskChanged(item)}\n disabled={disabled}\n emptyLabel={emptyLabel}\n mode=\"edit\"\n value={value}\n showAll\n filterFunc={taskSearch}\n renderItem={renderItem}\n autoFocus={autoFocus}\n />\n );\n }\n\n static propTypes = {\n intl: intlShape.isRequired,\n onSelect: PropTypes.func.isRequired,\n disabled: PropTypes.bool,\n emptyLabel: PropTypes.string,\n initialSelectedItem: PropTypes.string,\n relations: PropTypes.arrayOf(PropTypes.string).isRequired,\n autoFocus: PropTypes.bool,\n };\n\n static defaultProps = {\n disabled: false,\n emptyLabel: null,\n initialSelectedItem: null,\n autoFocus: false,\n };\n}\n\nexport default injectIntl(TasksForMultipleRelationsSelector);\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport config from '@/config';\nimport api from '@/shared/api';\nimport { useEffect, useState, useCallback, useMemo } from 'react';\nimport Axios from 'axios';\nimport InfiniteScroll from 'react-infinite-scroller';\nimport LoadingAnimation from '@/shared/components/LoadingAnimation';\nimport { FormattedTime, useIntl, defineMessages } from 'react-intl';\nimport ToastrService from '@/shared/services/ToastrService';\nimport dateFormatService from '@/shared/services/DateFormatService';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport moment from 'moment';\nimport { formatListValue } from '@/shared/components/FormattedListValue';\nimport DocumentService from '@/shared/services/DocumentService';\nimport { DownloadIcon } from '@/shared/components/Icons';\nimport TaskStatusIcon from '@/modules/tasks/TaskStatusIcon';\nvar onlyUnique = function (value, index, self) { return self.indexOf(value) === index; };\nvar pageSize = 50;\nvar adminUserId = '11111111-1111-1111-1111-111111111111';\nvar dateFormat = 'YYYY-MM-DDTHH:mm:ssZ';\nvar messages = defineMessages({\n ATaskWasLinked: {\n id: 'ATaskWasLinked',\n defaultMessage: 'A task was linked to this document',\n },\n ATaskWasUnlinked: {\n id: 'ATaskWasUnlinked',\n defaultMessage: 'A task was unlinked from this document',\n },\n DocumentAuditLogsNotAvailable: {\n id: 'DocumentAuditLogsNotAvailable',\n defaultMessage: 'For technical reasons, audit logs are not available for this document because it was uploaded before october 10th 2024. Sorry for the inconvenience.',\n },\n ThisTaskWasDeleted: {\n id: 'ThisTaskWasDeleted',\n defaultMessage: 'this task was deleted',\n },\n Tasks: {\n id: 'Tasks',\n defaultMessage: 'Tasks',\n },\n AuditLog: {\n id: 'AuditLog',\n defaultMessage: 'AuditLog',\n },\n DownloadThisVersionOfTheDocument: {\n id: 'DownloadThisVersionOfTheDocument',\n defaultMessage: 'Download this version of the document',\n },\n Download: {\n id: 'Download',\n defaultMessage: 'Download',\n },\n RecognitionStatus: {\n id: 'RecognitionStatus',\n defaultMessage: 'RecognitionStatus',\n },\n Tags: {\n id: 'Tags',\n defaultMessage: 'Tags',\n },\n Relations: {\n id: 'Relations',\n defaultMessage: 'Relations',\n },\n SigningFailedReason: {\n id: 'SigningFailedReason',\n defaultMessage: 'SigningFailedReason',\n },\n Yes: {\n id: 'Yes',\n defaultMessage: 'Yes',\n },\n No: {\n id: 'No',\n defaultMessage: 'No',\n },\n IsPublicOnPortal: {\n id: 'IsPublicOnPortal',\n defaultMessage: 'IsPublicOnPortal',\n },\n SigningRequestDate: {\n id: 'SigningRequestDate',\n defaultMessage: 'SigningRequestDate',\n },\n SigningDate: {\n id: 'SigningDate',\n defaultMessage: 'SigningDate',\n },\n DocumentStartDate: {\n id: 'DocumentStartDate',\n defaultMessage: 'DocumentStartDate',\n },\n DocumentEndDate: {\n id: 'DocumentEndDate',\n defaultMessage: 'DocumentEndDate',\n },\n DocumentDate: {\n id: 'DocumentDate',\n defaultMessage: 'DocumentDate',\n },\n SetEnum: {\n id: 'SetEnum',\n defaultMessage: '{property} was set to {value}',\n },\n ClearEnum: {\n id: 'ClearEnum',\n defaultMessage: '{property} was cleared. Old value: {value}',\n },\n SigningStatus: {\n id: 'SigningStatus',\n defaultMessage: 'SigningStatus',\n },\n DocumentType: {\n id: 'DocumentType',\n defaultMessage: 'DocumentType',\n },\n Filename: {\n id: 'Filename',\n defaultMessage: 'Filename',\n },\n ChangedField: {\n id: 'ChangedField',\n defaultMessage: '{property} was changed from {originalValue} to {currentValue}',\n },\n DocumentContentModified: {\n id: 'DocumentContentModified',\n defaultMessage: 'Document content was modified',\n },\n DocumentCheckedIn: {\n id: 'DocumentCheckedOn',\n defaultMessage: 'Document content was checked in by {name}',\n },\n DocumentCheckedOut: {\n id: 'DocumentCheckedOut',\n defaultMessage: 'Document content was checked out by {name}',\n },\n DocumentCheckoutDiscarded: {\n id: 'DocumentCheckoutDiscarded',\n defaultMessage: 'Document checkout was discarded by {name}',\n },\n DocumentCreated: {\n id: 'DocumentCreated',\n defaultMessage: 'Document was created',\n },\n NoAuditLinesFound: {\n id: 'NoAuditLinesFound',\n defaultMessage: 'No audit lines found',\n },\n GenericDocumentRecognition: {\n id: 'GenericDocumentRecognition',\n defaultMessage: 'Generic document recognition',\n },\n});\nexport var DocumentAudits = function (_a) {\n var documentId = _a.documentId, storageType = _a.storageType, creationDate = _a.creationDate;\n var intl = useIntl();\n var isDevelopment = config.environment.toLowerCase() === 'local' ||\n config.environment.toLowerCase() === 'development';\n var isAcceptance = config.environment.toLowerCase() === 'acceptance';\n var _b = useState([]), auditLines = _b[0], setAuditLines = _b[1];\n var _c = useState(false), auditLogsAvailable = _c[0], setAuditLogsAvailable = _c[1];\n var _d = useState(false), loading = _d[0], setLoading = _d[1];\n var _e = useState(false), hasMore = _e[0], setHasMore = _e[1];\n var _f = useState([]), relationIds = _f[0], setRelationIds = _f[1];\n var _g = useState([]), taskIds = _g[0], setTaskIds = _g[1];\n var _h = useState(false), hasError = _h[0], setHasError = _h[1];\n var _j = useState({}), usersDictionary = _j[0], setUsersDictionary = _j[1];\n var _k = useState({}), relationsDictionary = _k[0], setRelationsDictionary = _k[1];\n var _l = useState({}), tasksDictionary = _l[0], setTasksDictionary = _l[1];\n var _m = useState(null), parentRef = _m[0], setParentRef = _m[1];\n useEffect(function () {\n var auditLogsReleaseDate = isDevelopment\n ? moment('20-09-2024', 'DD-MM-YYYY')\n : isAcceptance\n ? moment('03-10-2024', 'DD-MM-YYYY')\n : moment('10-10-2024', 'DD-MM-YYYY');\n var internalAuditLogsAvailable = moment\n .utc(creationDate)\n .startOf('day')\n .isSameOrAfter(auditLogsReleaseDate.startOf('day'));\n // re-load audits when the document has changed\n setAuditLogsAvailable(internalAuditLogsAvailable);\n setLoading(false);\n setHasError(false);\n setAuditLines([]);\n if (internalAuditLogsAvailable) {\n setHasMore(true);\n }\n }, [documentId, isDevelopment, isAcceptance, creationDate]);\n useEffect(function () {\n var newUsersDictionary = DataCacheService.getAllUsers().reduce(function (prev, current) {\n var _a;\n return (__assign(__assign({}, prev), (_a = {}, _a[current.id] = current.name, _a)));\n }, {});\n setUsersDictionary(newUsersDictionary);\n }, []);\n useEffect(function () {\n if (relationIds.length === 0)\n return;\n var uri = \"\".concat(config.appUrls.api, \"/api/Relation/Names\");\n var fetchRelations = function () {\n api.base.post(uri, relationIds).then(function (_a) {\n var data = _a.data;\n var newRelationsDictionary = data.reduce(function (prev, current) {\n var _a;\n return (__assign(__assign({}, prev), (_a = {}, _a[current.id] = \"\".concat(current.name, \" \").concat(current.firstName ? current.firstName : ''), _a)));\n }, {});\n setRelationsDictionary(function (current) { return (__assign(__assign({}, (current || {})), newRelationsDictionary)); });\n });\n };\n fetchRelations();\n }, [relationIds, intl]);\n useEffect(function () {\n if (taskIds.length === 0)\n return;\n var uri = \"\".concat(config.appUrls.tasks, \"/api/plannedtasks/tasks\");\n var fetchTasks = function () {\n api.base.post(uri, taskIds).then(function (_a) {\n var data = _a.data;\n var newTasksDictionary = data.reduce(function (prev, current) {\n var _a;\n return (__assign(__assign({}, prev), (_a = {}, _a[current.id] = current, _a)));\n }, {});\n setTasksDictionary(function (current) { return (__assign(__assign({}, (current || {})), newTasksDictionary)); });\n });\n };\n fetchTasks();\n }, [taskIds, intl]);\n var loadNextPage = useCallback(function (page) {\n var cancelToken = Axios.CancelToken.source();\n var uri = \"\".concat(config.appUrls.audit, \"/api/Documents/\").concat(documentId, \"?limit=\").concat(pageSize, \"&offset=\").concat(page * pageSize);\n setLoading(true);\n return api.base.get(uri, { cancelToken: cancelToken.token }).then(function (_a) {\n var data = _a.data;\n var reducedData = data.map(function (logLine) { return (__assign(__assign({}, logLine), { id: logLine.dateTime, dateTime: new Date(logLine.dateTime), type: logLine.type.toLowerCase() })); });\n if (data.length < pageSize)\n setHasMore(false);\n setAuditLines(__spreadArray(__spreadArray([], auditLines, true), reducedData, true));\n var allRelationIds = reducedData\n .reduce(function (result, logLine) {\n if (logLine.type.toLowerCase() === 'field' &&\n logLine.property &&\n logLine.property.toLowerCase() === 'relationids') {\n var newSplitRelationIds = logLine.newValue\n ? logLine.newValue.split(',').map(function (x) { return x.trim(); })\n : [];\n var oldSplitRelationIds = logLine.oldValue\n ? logLine.oldValue.split(',').map(function (x) { return x.trim(); })\n : [];\n newSplitRelationIds.forEach(function (x) {\n result.push(x);\n });\n oldSplitRelationIds.forEach(function (x) {\n result.push(x);\n });\n }\n return result;\n }, [])\n .filter(function (x) { return x !== null && typeof x !== 'undefined'; })\n .filter(onlyUnique);\n setRelationIds(allRelationIds);\n var allTaskIds = reducedData\n .reduce(function (result, logLine) {\n if (logLine.type.toLowerCase() === 'field' &&\n logLine.property &&\n logLine.property.toLowerCase() === 'taskids') {\n var newSplitTaskIds = logLine.newValue\n ? logLine.newValue.split(',').map(function (x) { return x.trim(); })\n : [];\n var oldSplitTaskIds = logLine.oldValue\n ? logLine.oldValue.split(',').map(function (x) { return x.trim(); })\n : [];\n newSplitTaskIds.forEach(function (x) {\n result.push(x);\n });\n oldSplitTaskIds.forEach(function (x) {\n result.push(x);\n });\n }\n return result;\n }, [])\n .filter(function (x) { return x !== null && typeof x !== 'undefined'; })\n .filter(onlyUnique);\n setTaskIds(allTaskIds);\n setLoading(false);\n return reducedData;\n }, function (error) {\n setLoading(false);\n setHasError(true);\n ToastrService.generalError(intl);\n throw error;\n });\n }, [documentId, auditLines, intl]);\n var groupedLogs = useMemo(function () {\n if (!auditLines || auditLines.length === 0)\n return [];\n return Object.values(auditLines.reduce(function (groups, log) {\n var groupKey = dateFormatService.formatDate(log.dateTime);\n if (!groups[groupKey])\n // eslint-disable-next-line no-param-reassign\n groups[groupKey] = {\n key: groupKey,\n label: moment(log.dateTime).format('LL'),\n logs: [],\n };\n groups[groupKey].logs.push(log);\n return groups;\n }, {}));\n }, [auditLines]);\n var renderSource = function (source, documentType) {\n if (!source || source === 'Unknown' || source === 'Manual' || source === 0 || source === 1)\n return null;\n var sourceFormatted = function () {\n if (Number.isInteger(source)) {\n return formatListValue({ id: source, list: 'entitysourcetype', intl: intl });\n }\n if (source === 'GenericDocumentRecognition' && documentType) {\n return \"\".concat(intl.formatMessage(messages.GenericDocumentRecognition), \" (\").concat(formatListValue({\n id: documentType,\n list: 'documenttype',\n intl: intl,\n }), \")\");\n }\n return source in messages ? intl.formatMessage(messages[source]) : source;\n };\n return (_jsxs(\"span\", { children: [' ', \"via \", _jsx(\"b\", { children: sourceFormatted() })] }));\n };\n var parseDate = function (value) {\n try {\n var mom = moment(value, dateFormat, true);\n if (!mom.isValid())\n return null;\n return dateFormatService.formatDate(mom);\n }\n catch (_) {\n return null;\n }\n };\n var parseBoolean = function (value) {\n switch (value) {\n case true:\n case 'True':\n case 'true':\n return true;\n case false:\n case 'False':\n case 'false':\n return false;\n default:\n return null;\n }\n };\n var translatedFieldChange = function (property, originalValue, currentValue) {\n return intl.formatMessage(messages.ChangedField, {\n property: property,\n originalValue: originalValue || '/',\n currentValue: currentValue || '/',\n b: function (value) { return _jsx(\"b\", __assign({ className: \"dark\" }, { children: value })); },\n i: function (value) { return _jsx(\"i\", __assign({ className: \"dark\" }, { children: value })); },\n });\n };\n var translatedEnumChange = function (translatedEnumType, enumType, oldValue, newValue) {\n if (!oldValue) {\n return intl.formatMessage(messages.SetEnum, {\n property: translatedEnumType,\n value: formatListValue({ id: newValue, list: enumType, intl: intl }),\n b: function (value) { return _jsx(\"b\", __assign({ className: \"dark\" }, { children: value })); },\n i: function (value) { return _jsx(\"i\", __assign({ className: \"dark\" }, { children: value })); },\n });\n }\n if (!newValue) {\n console.log('cleared', oldValue);\n return intl.formatMessage(messages.ClearEnum, {\n property: translatedEnumType,\n value: formatListValue({ id: oldValue, list: enumType, intl: intl }),\n b: function (value) { return _jsx(\"b\", __assign({ className: \"dark\" }, { children: value })); },\n i: function (value) { return _jsx(\"i\", __assign({ className: \"dark\" }, { children: value })); },\n });\n }\n return intl.formatMessage(messages.ChangedField, {\n property: translatedEnumType,\n originalValue: formatListValue({\n id: oldValue,\n list: enumType,\n intl: intl,\n }),\n currentValue: formatListValue({\n id: newValue,\n list: enumType,\n intl: intl,\n }),\n b: function (value) { return _jsx(\"b\", __assign({ className: \"dark\" }, { children: value })); },\n i: function (value) { return _jsx(\"i\", __assign({ className: \"dark\" }, { children: value })); },\n });\n };\n var renderEnumChange = function (log, enumType) {\n var _a, _b;\n if (enumType.toLowerCase() === 'documenttype') {\n return (_jsx(\"span\", { children: translatedEnumChange(intl.formatMessage(messages.DocumentType), enumType, (_a = log.oldValue) === null || _a === void 0 ? void 0 : _a.Value, (_b = log.newValue) === null || _b === void 0 ? void 0 : _b.Value) }));\n }\n if (enumType.toLowerCase() === 'signingstatus') {\n return (_jsx(\"span\", { children: translatedEnumChange(intl.formatMessage(messages.SigningStatus), enumType, log.oldValue, log.newValue) }));\n }\n if (enumType.toLowerCase() === 'recognitionstatus') {\n return (_jsx(\"span\", { children: translatedEnumChange(intl.formatMessage(messages.RecognitionStatus), enumType, log.oldValue, log.newValue) }));\n }\n return _jsxs(\"span\", { children: [\"Unmapped enum change: \", log.property] });\n };\n var parseRelations = function (relations) {\n return relations\n ? relations\n .split(',')\n .map(function (x) { return x.trim(); })\n .map(function (x) {\n if (x in (relationsDictionary || {}))\n return relationsDictionary[x];\n return null;\n })\n .join(', ')\n : '/';\n };\n var getTaskName = function (task) {\n var taskName = task.name\n ? task.name\n : formatListValue({\n id: task.templateId,\n list: 'tasktemplate',\n intl: intl,\n fallback: task.name || task.templateName || task.templateId,\n });\n var taskDeadline = task.deadline ? dateFormatService.formatDate(task.deadline) : null;\n return taskDeadline ? (_jsxs(\"b\", __assign({ className: \"dark\" }, { children: [taskName, \" (\", taskDeadline, \")\"] }))) : (_jsx(\"b\", __assign({ className: \"dark\" }, { children: taskName })));\n };\n var renderSingleTask = function (taskId) {\n if (taskId in (tasksDictionary || {})) {\n var task = tasksDictionary[taskId];\n return (_jsxs(_Fragment, { children: [_jsx(TaskStatusIcon, { status: task.status, isBlocked: task.isBlocked, inapplicable: task.inapplicable, rejected: task.rejected, small: true, className: \"margin5R\" }), getTaskName(task)] }));\n }\n return (_jsxs(\"span\", __assign({ className: \"italic\" }, { children: [intl.formatMessage(messages.ThisTaskWasDeleted), ' ', _jsxs(\"span\", __assign({ style: { color: 'white' } }, { children: [\"(id: \", taskId, \")\"] }))] })));\n };\n var renderTasksChange = function (log) {\n var newTasks = log.newValue ? log.newValue.split(',').map(function (x) { return x.trim(); }) : [];\n var oldTasks = log.oldValue ? log.oldValue.split(',').map(function (x) { return x.trim(); }) : [];\n var addedTasks = newTasks.filter(function (task) { return !oldTasks.includes(task); });\n var deletedTasks = oldTasks.filter(function (task) { return !newTasks.includes(task); });\n if (addedTasks.length > 0) {\n return (_jsxs(\"span\", { children: [intl.formatMessage(messages.ATaskWasLinked), \": \", addedTasks.map(function (x) { return renderSingleTask(x); })] }));\n }\n if (deletedTasks.length > 0) {\n return (_jsxs(\"span\", { children: [intl.formatMessage(messages.ATaskWasUnlinked), \":\", ' ', deletedTasks.map(function (x) { return renderSingleTask(x); })] }));\n }\n return '/';\n };\n var renderFieldChange = function (log, property) {\n switch (property.toLowerCase()) {\n case 'filename':\n return translatedFieldChange(intl.formatMessage(messages.Filename), log.oldValue, log.newValue);\n case 'ispubliconportal':\n return translatedFieldChange(intl.formatMessage(messages.IsPublicOnPortal), parseBoolean(log.oldValue)\n ? intl.formatMessage(messages.Yes)\n : intl.formatMessage(messages.No), parseBoolean(log.newValue)\n ? intl.formatMessage(messages.Yes)\n : intl.formatMessage(messages.No));\n case 'documentdate':\n return translatedFieldChange(intl.formatMessage(messages.DocumentDate), parseDate(log.oldValue), parseDate(log.newValue));\n case 'relationids':\n return translatedFieldChange(intl.formatMessage(messages.Relations), parseRelations(log.oldValue), parseRelations(log.newValue));\n case 'taskids':\n return renderTasksChange(log);\n case 'tags':\n return translatedFieldChange(intl.formatMessage(messages.Tags), log.oldValue, log.newValue);\n case 'documentstartdate':\n return translatedFieldChange(intl.formatMessage(messages.DocumentStartDate), parseDate(log.oldValue), parseDate(log.newValue));\n case 'documentenddate':\n return translatedFieldChange(intl.formatMessage(messages.DocumentEndDate), parseDate(log.oldValue), parseDate(log.newValue));\n case 'signingdate':\n return translatedFieldChange(intl.formatMessage(messages.SigningDate), parseDate(log.oldValue), parseDate(log.newValue));\n case 'signingrequestdate':\n return translatedFieldChange(intl.formatMessage(messages.SigningRequestDate), parseDate(log.oldValue), parseDate(log.newValue));\n case 'signingstatus':\n return renderEnumChange(log, property);\n case 'recognitionstatus':\n return renderEnumChange(log, property);\n case 'signingfailedreason':\n return translatedFieldChange(intl.formatMessage(messages.SigningFailedReason), log.oldValue, log.newValue);\n default:\n return _jsxs(\"span\", { children: [\"Unmapped property: \", property] });\n }\n };\n var downloadVersion = function (blobVersionId, filename, mimeType) {\n if (storageType === 1)\n return null; // currently not able to retrieve/download specific version of a file located in sharepoint\n return (_jsx(\"a\", __assign({ style: { verticalAlign: 'middle', marginLeft: '5px' }, title: intl.formatMessage(messages.DownloadThisVersionOfTheDocument), onClick: function () { return DocumentService.download(documentId, blobVersionId, filename, mimeType); } }, { children: _jsx(DownloadIcon, {}) })));\n };\n var renderLogLine = function (log) {\n var type = log.type, property = log.property;\n switch (type.toLowerCase()) {\n case 'entitycreated':\n return (_jsxs(\"span\", { children: [intl.formatMessage(messages.DocumentCreated), log.blobVersionId\n ? downloadVersion(log.blobVersionId, log.fileName, log.mimeType)\n : null] }));\n case 'documentcontentmodified':\n return (_jsxs(\"span\", { children: [intl.formatMessage(messages.DocumentContentModified), log.blobVersionId\n ? downloadVersion(log.blobVersionId, log.fileName, log.mimeType)\n : null] }));\n case 'documentcheckedout':\n return (_jsx(\"span\", { children: intl.formatMessage(messages.DocumentCheckedOut, { name: DataCacheService.getUserName(log.userId) }) }));\n case 'documentcheckedin':\n return (_jsxs(\"span\", { children: [intl.formatMessage(messages.DocumentCheckedIn, { name: DataCacheService.getUserName(log.userId) }), log.blobVersionId\n ? downloadVersion(log.blobVersionId, log.fileName, log.mimeType)\n : null] }));\n case 'documentcheckoutdiscarded':\n return (_jsx(\"span\", { children: intl.formatMessage(messages.DocumentCheckoutDiscarded, { name: DataCacheService.getUserName(log.userId) }) }));\n case 'field':\n return renderFieldChange(log, property);\n case 'enum':\n return renderEnumChange(log, property);\n default:\n return _jsxs(\"span\", { children: [\"Unmapped log type: \", type] });\n }\n };\n var renderLogs = function (logs) {\n if (!logs)\n return _jsx(\"div\", {});\n return logs.map(function (logLine) { return (_jsxs(\"li\", __assign({ className: \"document-audit-container-item list-group-item\" }, { children: [_jsx(\"div\", __assign({ className: \"log\" }, { children: renderLogLine(logLine) })), _jsxs(\"div\", __assign({ className: \"info\" }, { children: [_jsx(FormattedTime, { value: logLine.dateTime }), logLine.userId === adminUserId ? _jsx(\"span\", __assign({ className: \"name\" }, { children: \"AdminPulse\" })) : null, usersDictionary[logLine.userId] && (_jsx(\"span\", __assign({ className: \"name\" }, { children: usersDictionary[logLine.userId] }))), renderSource(logLine.source, logLine.documentType)] }))] }))); });\n };\n var renderGroups = function () {\n if (!groupedLogs || groupedLogs.length === 0)\n return loading ? null : intl.formatMessage(messages.NoAuditLinesFound);\n return groupedLogs\n .filter(function (x) { return x !== null; })\n .map(function (_a) {\n var label = _a.label, logs = _a.logs;\n return (_jsxs(\"div\", __assign({ className: \"audit-group\" }, { children: [_jsx(\"div\", __assign({ className: \"audit-group-label\" }, { children: label })), _jsx(\"ul\", __assign({ className: \"audit-group-logs list-group\" }, { children: renderLogs(logs) }))] })));\n });\n };\n return (_jsx(\"div\", __assign({ className: \"audits\" }, { children: _jsx(\"div\", __assign({ className: \"document-audit-container\" }, { children: _jsx(\"div\", __assign({ className: \"flex-col\", ref: function (node) {\n setParentRef(node);\n }, style: { height: '700px', overflow: 'auto' } }, { children: auditLogsAvailable ? (_jsx(InfiniteScroll, __assign({ pageStart: -1, loadMore: loadNextPage, hasMore: hasMore && !loading && !hasError, initialLoad: true, loader: _jsx(LoadingAnimation, {}), useWindow: false, getScrollParent: function () { return parentRef; } }, { children: renderGroups() }), documentId)) : (intl.formatMessage(messages.DocumentAuditLogsNotAvailable)) })) })) })));\n};\n","import React, { Component } from 'react';\nimport Modal from 'react-bootstrap/lib/Modal';\nimport { injectIntl, defineMessages, FormattedMessage, FormattedDate } from 'react-intl';\nimport PropTypes from 'prop-types';\nimport OutsideClickHandler from 'react-outside-click-handler';\nimport intlShape from '@/shared/utils/intlShape';\nimport FileViewer from '@/shared/components/FileViewers/FileViewer';\nimport SimpleFileUpload from '@/shared/components/input/SimpleFileUpload';\nimport Button from '@/shared/components/Button';\nimport moment from 'moment';\nimport classNames from 'classnames';\nimport debounce from 'lodash-es/debounce';\nimport OverlayTrigger from 'react-bootstrap/lib/OverlayTrigger';\nimport Popover from 'react-bootstrap/lib/Popover';\nimport { FaInfoCircle, FaLink, FaFilePdf } from 'react-icons/fa';\nimport { MdReply, MdReplyAll } from 'react-icons/md';\nimport api from '@/shared/api';\nimport ShareItemModal from '@/shared/components/ShareItemModal';\n\nimport LoadingAnimation from '@/shared/components/LoadingAnimation';\nimport FormattedListValue, {\n listItemMsg,\n formatListValue,\n} from '@/shared/components/FormattedListValue';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport AutoComplete from '@/shared/components/input/select/AutoComplete';\nimport enumCache from '@/shared/services/EnumCacheService';\nimport FormattedDateTime from '@/shared/components/FormattedDateTime';\nimport YesNoModal from '@/shared/components/YesNoModal';\nimport Checkbox from '@/shared/components/input/Checkbox';\nimport authService from '@/shared/services/AuthService';\nimport ForwardEmailModal from '@/shared/components/email/ForwardEmailModal';\nimport {\n isBeforeMinimum,\n isValidNumber,\n validateMinimumDate,\n} from '@/shared/utils/validationHelpers';\nimport DataCacheService from '@/shared/services/DataCacheService';\n\nimport {\n AddIcon,\n DeleteIcon,\n DownloadIcon,\n IconPencil,\n LeftArrowIcon,\n ReplaceIcon,\n RightArrowIcon,\n SaveIcon,\n ShareIcon,\n UndoIcon,\n} from '@/shared/components/Icons';\nimport FileIcon from '@/shared/components/FileIcon';\nimport DatePicker from '@/shared/components/input/DatePicker';\nimport Tag from '@/shared/components/Tag';\nimport DocumentService from '@/shared/services/DocumentService';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport RelationListPicker from '@/shared/components/input/RelationListPicker';\nimport SignalRService from '@/shared/services/SignalRService';\nimport ToastrService from '@/shared/services/ToastrService';\nimport MultiSelect from '@/shared/components/input/multiselect/MultiSelect';\nimport ReplyToEmailModal from '@/shared/components/email/ReplyToEmailModal';\nimport { getRelationName } from '@/shared/components/RelationName';\nimport ZendeskHelp from '@/shared/components/ZendeskHelp';\nimport TaskDetailsModal from '../../tasks/taskDetails/TaskDetailsModal';\nimport EmailMetadataDetails from './EmailMetadataDetails';\nimport config from '../../../config';\nimport TaskStatusToggle from '../../tasks/TaskStatusToggle';\nimport TaskIcon from '../../tasks/TaskIcon';\nimport CreateToDoModal from '../../tasks/CreateToDoModal';\nimport TasksForMultipleRelationsSelector from '../../../shared/components/input/TasksForMultipleRelationsSelector';\nimport FormattedDateShort from '../../../shared/components/FormattedDateShort';\nimport { DocumentAudits } from './DocumentAudits';\n\nconst messages = defineMessages({\n AuditLogsForDocument: 'Audit history for {name}',\n HideAuditLogs: 'Hide audit logs',\n ShowAuditLogs: 'Show audit logs',\n ResendEmail: 'Resend email',\n ResendEmailConfirmationMsg: 'Are you sure you want to resend this email?',\n Save: 'Save',\n Cancel: 'Cancel',\n DocumentDate: 'Document date',\n CreationDate: 'Creation date',\n DocumentCreatedBy: 'Created by',\n DeleteDocument: 'Delete document',\n StartTypingToSearch: 'Start typing to search',\n Success: 'Success',\n Tags: 'Tags',\n Download: 'Download',\n Edit: 'Edit',\n CheckoutBrowser: 'Checkout in browser',\n CheckoutApp: 'Checkout in app',\n Checkin: 'Checkin',\n DiscardCheckout: 'Discard checkout',\n ContinueEditing: 'Continue editing',\n PreviousDocument: 'Previous document',\n NextDocument: 'Next document',\n Open: 'Open',\n EnterTag: 'Enter tag',\n Filename: 'Filename',\n Relation: 'Relation',\n Relations: 'Relations',\n AddRelation: 'Add relation',\n RemoveRelation: 'Remove relation',\n ScannedDocument: 'Scanned document',\n DocumentType: 'Document type',\n Status: 'Status',\n Signature: 'Signature',\n ViewTask: 'View task',\n Tasks: 'Tasks',\n TheMailHasBeenSentAgain: 'The mail has been sent again',\n DeleteAttachment: 'Delete attachment',\n DeleteAttachmentConfirmationMsg: 'Are you sure you want to delete this attachment?',\n IsPublicOnPortal: 'Is public on portal',\n CreateNewToDo: 'Create new to-do',\n DocumentIsPublicOnPortalExplanation: 'This document can be accessed by 3rd party integrations.',\n Share: 'Share',\n LinkToTask: 'Link to task',\n DeleteTaskLink: 'Delete task link',\n DeleteTaskLinkConfirmationMsg:\n 'Are you sure you want to remove the link between this document and this task?',\n DownloadAsPdf: 'Download as pdf',\n Reply: 'Reply',\n ReplyAll: 'ReplyAll',\n FileUnauthorized:\n 'You do not have permission to view this file or your Sharepoint connection has not been configured yet.',\n ForceRelationModeInfo: 'It is required by your company to link documents to a relation',\n CheckedOutReminderModeInfo:\n 'This document has been checked out for more than a day. Please review if it should be checked in.',\n Replace: 'Replace',\n MsgCheckinDocumentError: 'Error while checking in document',\n CheckinDocumentConfirmationMsg:\n 'Are you sure you want to discard this checkout? It is currently checked out by {name}, this action may result in a loss of their changes.',\n CheckedOutSuccesfull: 'Successfully checked out file.',\n CheckedinSuccesfull: 'Successfully checked in file.',\n DiscardCheckoutSuccesfull: 'Successfully discarded checkout.',\n});\n\nclass DocumentDetailsModal extends Component {\n static propTypes = {\n show: PropTypes.bool,\n onSave: PropTypes.func.isRequired,\n onClose: PropTypes.func.isRequired,\n disabled: PropTypes.bool,\n intl: intlShape.isRequired,\n allowNavigation: PropTypes.bool,\n forceRelationMode: PropTypes.bool,\n onReplaceDocument: PropTypes.func.isRequired,\n checkedoutReminderMode: PropTypes.bool,\n };\n\n static defaultProps = {\n show: false,\n disabled: false,\n allowNavigation: true,\n forceRelationMode: false,\n checkedoutReminderMode: false,\n };\n\n constructor(props) {\n super(props);\n\n this.state = {\n newTag: '',\n document: props.document,\n documentId: props.documentId,\n documentLink: undefined,\n documentDetails: {},\n scannedDocument: undefined,\n tags: null,\n showCreateTodoModal: false,\n documentTypes: [],\n fullScreen: false,\n showValidation: false,\n addTasks: false,\n deleteTaskLink: null,\n unauthorized: false,\n };\n }\n\n componentDidMount() {\n const { document, documentId } = this.state;\n this.getDocumentDetails(documentId || document.id);\n this.getAvailableTags();\n\n SignalRService.subscribe('documentContentUpdated', this.getDocumentLink);\n }\n\n componentWillUnmount() {\n SignalRService.unsubscribe('documentContentUpdated', this.getDocumentLink);\n }\n\n getDocumentLink = documentId => {\n const { intl } = this.props;\n const { document } = this.state;\n if (documentId !== document.id) return;\n\n this.setState({ loading: true });\n\n if (document.storageType === 1) {\n this.setState({ documentLink: document.path, loading: false });\n } else {\n api.base.get(`${config.appUrls.documents}/api/documents/OpenDocumentLink/${documentId}`).then(\n ({ data }) => {\n this.setState({ documentLink: data, loading: false });\n },\n error => {\n this.setState({ loading: false, documentLink: null });\n handleHttpError(intl)(error);\n },\n );\n }\n };\n\n loadScannedDocument = documentId => {\n const { intl } = this.props;\n api.base.get(`${config.appUrls.documents}/api/documents/info/${documentId}`).then(\n ({ data }) => {\n this.setState({ scannedDocument: data });\n },\n error => {\n this.setState({ loading: false, documentLink: null });\n handleHttpError(intl)(error);\n },\n );\n };\n\n getDocumentDetails = documentId => {\n const { intl } = this.props;\n const documentTypesPromise = enumCache.getTranslated('documentType', intl, true);\n\n const documentDetailsPromise = api.base.get(\n `${config.appUrls.documents}/api/documents/details/${documentId}`,\n );\n\n const getDocumentLink = async () => {\n try {\n const response = await api.base.get(\n `${config.appUrls.documents}/api/documents/OpenDocumentLink/${documentId}`,\n );\n\n return response;\n } catch {\n this.setState({ unauthorized: true });\n return { data: null };\n }\n };\n\n this.setState({ loading: true });\n Promise.all([\n documentDetailsPromise,\n documentTypesPromise,\n getDocumentLink(),\n DocumentService.getWithoutRelationDocumentTypes(),\n ]).then(([{ data }, documentTypes, { data: documentLink }, withoutRelationDocumentTypes]) => {\n const selectedDocumentType = documentTypes.find(x => x.id === data.documentType);\n\n const creationUser = data.creationUserId\n ? DataCacheService.getUserName(data.creationUserId)\n : null;\n const showRelations = withoutRelationDocumentTypes.indexOf(data.documentType) < 0;\n this.setState(\n {\n loading: false,\n documentLink,\n document: data,\n documentTypes: documentTypes\n .map(x => ({\n ...x,\n key: x.id,\n }))\n .sort(dynamicSort('label')),\n selectedDocumentType: selectedDocumentType\n ? { key: selectedDocumentType.id, label: selectedDocumentType.label }\n : null,\n documentDetails: {\n ...data,\n documentDate: moment.utc(data.documentDate),\n creationDate: moment.utc(data.creationDate),\n creationUser,\n relations: data.relations || [],\n signingStatus: data.signingStatus === 21 ? 20 : data.signingStatus, // map \"signingStatusCompletedOriginal\"\n tags:\n data.tags &&\n data.tags.map(x => ({\n ...x,\n label: x.name,\n })),\n },\n scannedDocument: null,\n\n isRelationRequired:\n showRelations &&\n (DataCacheService.getDefaultCompany()?.forceLinkingDocumentsToRelation ?? false),\n\n showRelations,\n },\n () => {\n let scannedDocumentPromise;\n let tasksPromise;\n if (data.scannedDocumentId) {\n scannedDocumentPromise = api.base.get(\n `${config.appUrls.documents}/api/documents/info/${data.scannedDocumentId}`,\n );\n } else {\n scannedDocumentPromise = new Promise(resolve => resolve({ data: null }));\n }\n\n if (data.links && data.links.length && data.links.some(x => x.linkType === 5)) {\n const taskIds = data.links.filter(x => x.linkType === 5).map(x => x.linkId);\n tasksPromise = api.base.post(`${config.appUrls.tasks}/api/plannedtasks/tasks`, taskIds);\n } else {\n tasksPromise = new Promise(resolve => resolve({ data: null }));\n }\n\n Promise.all([scannedDocumentPromise, tasksPromise]).then(\n ([{ data: scannedDocument }, { data: tasks }]) => {\n this.setState({ scannedDocument, tasks });\n },\n );\n },\n );\n });\n };\n\n getAvailableTags = () => {\n const { intl } = this.props;\n api.base.get(`${config.appUrls.documents}/api/Tag`).then(\n ({ data }) => {\n this.setState({\n tags: data,\n });\n },\n error => {\n handleHttpError(intl)(error);\n },\n );\n };\n\n documentDateChanged = documentDate => {\n const { documentDetails } = this.state;\n\n this.setState({\n documentDetails: {\n ...documentDetails,\n documentDate,\n },\n });\n };\n\n navigatePreviousDocument = () => {\n const { documentDetails } = this.state;\n const { getPreviousDocumentId } = this.props;\n const previousDocumentId = getPreviousDocumentId(documentDetails.id);\n this.navigateDocument(previousDocumentId);\n };\n\n navigateNextDocument = () => {\n const { documentDetails } = this.state;\n const { getNextDocumentId } = this.props;\n Promise.resolve(getNextDocumentId(documentDetails.id)).then(nextDocumentId => {\n this.navigateDocument(nextDocumentId);\n });\n };\n\n navigateDocument = documentId => {\n if (documentId) {\n this.getDocumentDetails(documentId);\n }\n };\n\n updateDocument = () => {\n const { documentDetails } = this.state;\n const { intl, onSave } = this.props;\n const model = {\n ...documentDetails,\n };\n\n return api.base.put(`${config.appUrls.documents}/api/documents/updateDetails`, model).then(\n ({ data }) => {\n onSave(data);\n },\n error => {\n handleHttpError(intl)(error);\n },\n );\n };\n\n addTagToDocument = tagName => {\n if (!tagName) return;\n const { documentDetails } = this.state;\n const currentDocumentTagNames = documentDetails.tags.map(x => x.name);\n\n if (currentDocumentTagNames.includes(tagName)) return;\n\n this.findOrCreateTag(tagName).then(tag => {\n this.setState({\n documentDetails: {\n ...documentDetails,\n tags: [...documentDetails.tags, tag],\n },\n });\n });\n };\n\n onRemoveTag = tag => {\n const { documentDetails } = this.state;\n\n this.setState({\n documentDetails: {\n ...documentDetails,\n tags: documentDetails.tags.filter(x => x.id !== tag.id),\n },\n });\n };\n\n findOrCreateTag = tagName =>\n new Promise((resolve, reject) => {\n const { tags } = this.state;\n const tag = tags.find(t => t.name.toLowerCase() === tagName.toLowerCase());\n if (tag) {\n resolve(tag);\n } else {\n api.base.post(`${config.appUrls.documents}/api/Tag`, { name: tagName }).then(({ data }) => {\n if (!data) return reject();\n this.setState(\n state => ({\n tags: [...state.tags, data],\n }),\n () => resolve(data),\n );\n }, reject);\n }\n });\n\n onFilenameChanged = filenameWithoutExtension => {\n const { documentDetails } = this.state;\n\n const extension = documentDetails.name.split('.').pop();\n\n const newFilename = `${filenameWithoutExtension}.${extension}`;\n\n this.setState({\n documentDetails: {\n ...documentDetails,\n name: newFilename,\n },\n });\n };\n\n getMetadataComponent = document => {\n if (!document || !document.metadataJson) return null;\n\n switch (document.documentType) {\n // Email document\n case 8:\n case 23:\n return (\n this.setState({ showResendMailConfirmation: true })}\n onForward={() => this.setState({ showForwardModal: true })}\n onDeleteAttachment={attachment => this.onDeleteAttachmentRequested(attachment)}\n />\n );\n default:\n return null;\n }\n };\n\n onDeleteAttachmentRequested = attachment => {\n this.setState({ activeAttachment: attachment, showRemoveAttachmentModal: true });\n };\n\n removeAttachment = () => {\n const { activeAttachment, documentDetails } = this.state;\n const { intl } = this.props;\n\n return api.base\n .delete(\n `${config.appUrls.documents}/api/emails/DeleteAttachment/${documentDetails.emailId}/${activeAttachment.id}`,\n )\n .then(() => {\n this.setState(state => ({\n showRemoveAttachmentModal: false,\n documentDetails: {\n ...state.documentDetails,\n attachments: state.documentDetails.attachments.filter(\n x => x.id !== activeAttachment.id,\n ),\n },\n }));\n ToastrService.success(intl.formatMessage(messages.Success));\n })\n .catch(error => {\n handleHttpError(intl)(error);\n });\n };\n\n resendEmail = docId => {\n if (!docId) return;\n const { intl } = this.props;\n\n return api.base.post(`${config.appUrls.documents}/api/emails/Resend/${docId}`).then(\n ({ data }) => {\n if (!data) return;\n const { documentDetails } = this.state;\n const { documentId, emailStatus, metadataJson } = data;\n if (documentId !== documentDetails.id) return; // Document id's don't match, maybe they changed document?\n\n this.setState({\n showResendMailConfirmation: false,\n documentDetails: { ...documentDetails, emailStatus, metadataJson },\n });\n ToastrService.success(intl.formatMessage(messages.TheMailHasBeenSentAgain));\n },\n error => {\n handleHttpError(intl)(error);\n },\n );\n };\n\n addRelation = relation => {\n if (relation && relation.id) {\n this.setState(state => ({\n documentDetails: {\n ...state.documentDetails,\n relations: [\n ...state.documentDetails.relations.filter(x => x.id !== relation.id),\n relation,\n ],\n },\n }));\n }\n };\n removeRelation = relation => {\n if (relation && relation.id) {\n this.setState(state => ({\n documentDetails: {\n ...state.documentDetails,\n relations: state.documentDetails.relations.filter(x => x.id !== relation.id),\n },\n }));\n }\n };\n\n // debounce makes sure that if this method is called again within 300 ms, only the last call is executed.\n // this method adds the tag automatically to the document when it is found in the list of tags\n // this is needed because if there are two tags: test and test2, and the user starts typing, test2 will never be able\n // to be added to the document because the value that was entered will me immediately processed and found\n debouncedFindAndAddTag = debounce(value => {\n const { tags } = this.state;\n if (value && tags.find(x => x.name === value)) {\n this.addTagToDocument(value);\n this.setState({ newTag: '' });\n }\n }, 400);\n\n onTagValueChanged = value => {\n this.setState({ newTag: value });\n this.debouncedFindAndAddTag(value);\n };\n\n getSigningStatusClassName = status => {\n const className = classNames('fa', {\n 'fa-circle-o': status === 1,\n 'fa-circle text-orange': status === 2,\n 'fa-stop-circle': status === 3,\n 'fa-clock-o text-danger': status === 4,\n 'fa-circle text-blue': status === 10,\n 'fa-times-circle text-danger': status === 11,\n 'fa-minus-circle text-danger': status === 12,\n 'fa-check-circle text-success': status === 20 || status === 21,\n });\n return className;\n };\n // This method can return multiple tasks because multiple tasks could have been opened after another\n // (clicking parent or subtask -> vsts-like)\n onTaskDetailModalClosed = updatedTasks => {\n const { tasks } = this.state;\n const tasksCopy = [...tasks];\n\n if (updatedTasks) {\n updatedTasks.map(task => {\n const index = tasksCopy.findIndex(x => x.id === task.id);\n\n // task is not visible in this list\n if (index < 0) return;\n\n tasksCopy[index] = task;\n });\n }\n\n this.setState(state => ({\n ...state,\n showTaskDetailsModal: false,\n tasks: tasksCopy,\n }));\n };\n\n selectedDocumentTypeChanged = item => {\n if (item === undefined) return;\n const { documentDetails } = this.state;\n\n this.setState({\n documentDetails: {\n ...documentDetails,\n documentType: item ? item.key : undefined,\n },\n });\n };\n\n handleTasksUpdated = updatedTasks => {\n if (!updatedTasks || !updatedTasks.length) return;\n this.setState(({ tasks }) => ({\n tasks: tasks.map(task => {\n const updatedTask = updatedTasks.find(x => x.id === task.id);\n if (!updatedTasks) return task;\n return { ...task, ...updatedTask };\n }),\n }));\n };\n onToDoCreated = todo => {\n this.setState(({ tasks }) => {\n if (!todo || !todo.id) return { showCreateTodoModal: false };\n\n return { showCreateTodoModal: false, tasks: [...(tasks || []), todo] };\n });\n };\n showValidation = () => {\n this.setState({ showValidation: true });\n };\n isFormInvalid = () => {\n const { documentDetails, isRelationRequired } = this.state;\n if (!documentDetails) return true;\n if (!documentDetails.documentDate) return true;\n if (!validateMinimumDate(documentDetails.documentDate)) return true;\n if (isRelationRequired && (documentDetails.relations?.length ?? 0) === 0) return true;\n\n return false;\n };\n\n showAddTasks = () => this.setState({ addTasks: true });\n hideAddTasks = () => this.setState({ addTasks: false });\n linkToTask = task => {\n if (!task || !task.id) return;\n const { intl } = this.props;\n const { document, tasks: currentTasks } = this.state;\n if (currentTasks && currentTasks.some(x => x.id === task.id)) return; // Already linked\n\n const taskToAdd = {\n id: task.id,\n taskLevel: task.isToDo ? 2 : 0,\n isBlocked: task.isBlocked || task.status === 3,\n inapplicable: task.inapplicable || task.status === 4,\n rejected: task.rejected || task.status === 5,\n status: Math.min(task.status, 2),\n name: task.plannedTaskName,\n templateName: task.plannedTaskTemplateName,\n templateId: task.plannedTaskTemplateId,\n deadline: task.deadline,\n };\n\n return api.base\n .post(`${config.appUrls.documents}/api/documents/Links`, {\n documentId: document.id,\n linkId: task.id,\n linkType: 5,\n removeExistingRelations: false,\n recognizeTemporaryDocuments: false,\n })\n .then(() => {\n this.setState(({ tasks }) => ({ tasks: [...(tasks || []), taskToAdd] }));\n }, handleHttpError(intl));\n };\n showDeleteTaskLink = task => this.setState({ deleteTaskLink: task });\n deleteTaskLink = () => {\n const { intl } = this.props;\n const { deleteTaskLink, document } = this.state;\n return api.base\n .delete(\n `${config.appUrls.documents}/api/documents/Links/${document.id}/${deleteTaskLink.id}/5`,\n )\n .then(() => {\n this.setState(({ tasks }) => ({\n tasks: (tasks || []).filter(x => x.id !== deleteTaskLink.id),\n deleteTaskLink: null,\n }));\n }, handleHttpError(intl));\n };\n\n sourceFormatted = source => {\n const { intl } = this.props;\n const translated = formatListValue({ id: source, list: 'entitysourcetype', intl });\n\n if (!translated.includes('API')) {\n return `${translated.charAt(0).toLowerCase()}${translated.slice(1)}`;\n }\n\n return translated;\n };\n\n replaceDocumentInternal = (document, files) => {\n const { onReplaceDocument } = this.props;\n return onReplaceDocument(document, files).then(updatedDocument => {\n console.log(updatedDocument);\n\n this.setState(\n state => ({\n documentDetails: {\n ...state.documentDetails,\n name: updatedDocument.name,\n },\n document: {\n ...state.document,\n name: updatedDocument.name,\n mime: updatedDocument.mime,\n },\n }),\n () => this.getDocumentLink(document.id),\n );\n });\n };\n\n checkinDocument(document) {\n const { intl, onCheckinCheckout } = this.props;\n DocumentService.checkin(document.id).then(\n () => {\n document.checkedOutByUserId = null;\n this.setState({ document });\n if (!!onCheckinCheckout) {\n onCheckinCheckout(document);\n }\n },\n error => {\n console.error(error);\n if (error.response && error.response.data && error.response.data.code) {\n handleHttpError(intl)(error);\n }\n log.error('error checking in document ', error);\n },\n );\n }\n\n checkoutDocument = (document, openinApp) => {\n if (!document || !document.canEdit) return;\n const { intl, onCheckinCheckout } = this.props;\n DocumentService.checkout(document.id, openinApp).then(\n data => {\n if (!!data) {\n document.checkedOutByUserId = authService.getUserId();\n this.setState({ document });\n if (!!onCheckinCheckout) {\n onCheckinCheckout(document);\n }\n }\n },\n error => {\n console.error(error);\n if (error.response && error.response.data && error.response.data.code) {\n handleHttpError(intl)(error);\n } else {\n ToastrService.error(intl.formatMessage(messages.MsgCheckoutDocumentSuccess));\n }\n log.error('error checking out document ', error);\n },\n );\n };\n\n discardCheckout = document => {\n const { intl } = this.props;\n DocumentService.discardCheckout(document.id).then(\n () => {\n document.checkedOutByUserId = null;\n this.setState({ showCheckinDocumentModal: false, document });\n },\n error => {\n console.error(error);\n if (error.response && error.response.data && error.response.data.code) {\n handleHttpError(intl)(error);\n }\n this.setState({ showCheckinDocumentModal: false });\n log.error('error checking in document ', error);\n },\n );\n };\n\n render() {\n const {\n show,\n onClose,\n disabled,\n intl,\n allowNavigation,\n onRemoveDocument,\n onShareItem,\n forceRelationMode,\n checkedoutReminderMode,\n } = this.props;\n const {\n documentLink,\n loading,\n documentDetails,\n document,\n dateFocused,\n tags,\n newTag,\n scannedDocument,\n tasks,\n showTaskDetailsModal,\n activeTaskId,\n selectedDocumentType,\n showRemoveAttachmentModal,\n showCreateTodoModal,\n documentTypes,\n fullScreen,\n showValidation,\n showForwardModal,\n showResendMailConfirmation,\n addTasks,\n deleteTaskLink,\n showReplyToEmailModal,\n replyAll,\n unauthorized,\n showShareItemModal,\n isRelationRequired,\n showRelations,\n showAuditLogs,\n showCheckinDocumentModal,\n } = this.state;\n const filenameWithoutExtension =\n documentDetails && documentDetails.name && documentDetails.name.replace(/\\.[^/.]+$/, '');\n const extension =\n documentDetails && documentDetails.name && documentDetails.name.split('.').pop();\n\n const filenameClassName = classNames('form-group', {\n 'has-error': !filenameWithoutExtension && !loading,\n });\n\n const metadataComponent = this.getMetadataComponent(documentDetails);\n\n const disableRelationPicker = disabled || !document || !document.canRemove;\n\n const canBeChangedToDocumentTypes = !documentDetails.cannotBeChangedTo\n ? []\n : documentTypes.filter(x => !documentDetails.cannotBeChangedTo.includes(x.id));\n\n const canEdit = authService.hasPermission({ functionality: 'Documents', privilege: 'Update' });\n const canCreateTags = authService.hasPermission({ functionality: 'Tags', privilege: 'Create' });\n const canCreateTodo = authService.hasPermission({ functionality: 'Todo', privilege: 'Create' });\n\n const canDelete =\n document &&\n document.canRemove &&\n authService.hasPermission({ functionality: 'Documents', privilege: 'Delete' });\n const canBeReplaced =\n document &&\n document.canBeReplaced &&\n authService.hasPermission({ functionality: 'Documents', privilege: 'Update' });\n const isPdf = document && document.mime === 'application/pdf';\n\n return (\n \n \n this.setState(state => ({ fullScreen: !state.fullScreen }))}\n >\n \n \n this.setState(state => ({ showAuditLogs: !state.showAuditLogs }))}\n >\n \n \n {document && (\n \n {showAuditLogs ? (\n <>\n {intl.formatMessage(messages.AuditLogsForDocument, { name: document.name })}\n \n \n ) : (\n <>\n \n   {document.name}\n \n )}\n \n )}\n \n \n {showShareItemModal && (\n 0\n ? document.relations[0].id\n : undefined\n }\n relationName={\n document.relations && document.relations.length > 0\n ? getRelationName(intl, document.relations[0])\n : undefined\n }\n onClose={() => this.setState({ showShareItemModal: false })}\n />\n )}\n {showResendMailConfirmation && (\n this.setState({ showResendMailConfirmation: false })}\n onSave={() => this.resendEmail(document.id)}\n />\n )}\n {showCheckinDocumentModal && (\n this.setState({ showCheckinDocumentModal: false })}\n onSave={() => this.discardCheckout(document)}\n />\n )}\n {showForwardModal && (\n \n this.setState(state => ({\n ...state,\n showForwardModal: false,\n }))\n }\n />\n )}\n {showReplyToEmailModal && (\n this.setState({ showReplyToEmailModal: false })}\n />\n )}\n {showTaskDetailsModal && (\n \n )}\n {showRemoveAttachmentModal && (\n this.setState({ showRemoveAttachmentModal: false })}\n onSave={() => this.removeAttachment()}\n />\n )}\n {showCreateTodoModal && (\n 0\n ? documentDetails.relations[0].id\n : undefined\n }\n onSave={this.onToDoCreated}\n onClose={() => this.setState({ showCreateTodoModal: false })}\n />\n )}\n {deleteTaskLink && (\n this.setState({ deleteTaskLink: null })}\n onSave={() => this.deleteTaskLink()}\n />\n )}\n {forceRelationMode && isRelationRequired ? (\n
    \n \n \n
    \n ) : null}\n {checkedoutReminderMode ? (\n
    \n \n \n
    \n ) : null}\n
    \n {showAuditLogs && document && (\n \n )}\n
    \n \n
    \n {loading && }\n {!loading &&\n !!document &&\n isValidNumber(document.documentType) &&\n !!documentLink &&\n !unauthorized && (\n \n )}\n {!loading &&\n !!document &&\n isValidNumber(document.documentType) &&\n unauthorized && }\n
    \n
    \n
    \n
    \n {loading && }\n\n {!loading && document && documentDetails && documentDetails.id && (\n
    \n
    \n
    \n \n
    \n
    \n \n this.onFilenameChanged(\n e.target.value.replace('/', '').replace('\\\\', ''),\n )\n }\n required\n />\n
    .{extension}
    \n
    \n
    \n
    \n\n
    \n \n
    \n

    \n \n {documentDetails.source > 0 && (\n \n  via \n {this.sourceFormatted(documentDetails.source)}\n \n )}\n

    \n
    \n
    \n {documentDetails.creationUser ? (\n
    \n \n
    \n

    {documentDetails.creationUser}

    \n
    \n
    \n ) : null}\n\n \n \n
    \n this.setState({ dateFocused: focused })}\n id=\"documentDate\"\n required\n block\n small\n isOutsideRange={isBeforeMinimum}\n />\n
    \n
    \n\n
    \n \n
    \n {documentDetails.canRemove && canBeChangedToDocumentTypes.length > 0 ? (\n this.selectedDocumentTypeChanged(item)}\n mode=\"edit\"\n value={selectedDocumentType}\n showAll\n required\n />\n ) : (\n \n )}\n
    \n
    \n\n {(documentDetails.canBeSigned || document.signingStatus >= 10) && (\n
    \n \n
    \n {!documentDetails.signingProvider ||\n documentDetails.signingProvider === 0 ? (\n {\n const status = e.target.value;\n this.setState(state => ({\n documentDetails: {\n ...state.documentDetails,\n signingStatus: status === '' ? null : status,\n },\n }));\n }}\n value={documentDetails.signingStatus || ''}\n >\n \n \n \n \n \n \n ) : (\n \n \n \n \n \n \n \n {documentDetails.signingFailedReason && (\n
    {documentDetails.signingFailedReason}
    \n )}\n
    \n )}\n
    \n
    \n )}\n {showRelations ? (\n \n \n
    \n \n
    \n
    \n ) : null}\n {scannedDocument && (\n
    \n \n
    \n \n \n DocumentService.open(scannedDocument.id)}\n title={intl.formatMessage(messages.Download)}\n >\n \n \n this.navigateDocument(scannedDocument.id)}\n title={intl.formatMessage(messages.Open)}\n >\n \n {scannedDocument.name}\n \n \n \n
    \n
    \n )}\n
    \n \n
    \n {documentDetails && tags && (\n this.addTagToDocument(x?.name)}\n items={tags.map(x => ({ ...x, label: x.name }))}\n selectedItem={\n documentDetails.tags?.map(x => ({ ...x, label: x.name })) ?? []\n }\n onCreateItem={canCreateTags ? this.addTagToDocument : undefined}\n onItemRemoved={x => this.onRemoveTag(x.value)}\n />\n )}\n
    \n
    \n\n
    \n \n
    \n \n this.setState({\n documentDetails: {\n ...documentDetails,\n isPublicOnPortal: !documentDetails.isPublicOnPortal,\n },\n })\n }\n value={documentDetails.isPublicOnPortal}\n />\n
    \n
    \n\n {metadataComponent !== null && (\n
    {metadataComponent}
    \n )}\n
    \n \n
    \n {tasks && (\n \n \n {tasks.map(task => (\n \n \n \n {canEdit ? (\n \n ) : null}\n \n ))}\n \n
    \n \n this.setState({\n showTaskDetailsModal: true,\n activeTaskId: taskid,\n })\n }\n />\n \n \n this.setState({\n activeTaskId: task.id,\n showTaskDetailsModal: true,\n })\n }\n >\n \n {task.name && task.name}\n {!task.name && (\n \n )}\n {task.deadline ? (\n \n   ()\n \n ) : null}\n \n \n this.showDeleteTaskLink(task)}\n title={intl.formatMessage(messages.DeleteTaskLink)}\n className=\"fa fa-trash-o clickable margin10L\"\n />\n
    \n )}\n {addTasks && documentDetails.relations.length > 0 ? (\n
    \n \n x.id)}\n autoFocus\n />\n \n
    \n ) : null}\n {canEdit && !addTasks && documentDetails.relations.length > 0 ? (\n \n \n \n \n {intl.formatMessage(messages.LinkToTask)}\n \n ) : null}\n {canCreateTodo ? (\n this.setState({ showCreateTodoModal: true })}\n >\n \n \n \n {intl.formatMessage(messages.CreateNewToDo)}\n \n ) : null}\n
    \n
    \n \n \n )}\n \n \n
    \n \n
    \n {allowNavigation && (\n \n )}\n {allowNavigation && (\n \n )}\n {document && DocumentService.canConvertToPdf(document.mime) && (\n DocumentService.convertToPdf(document.id, document.name)}\n showProgress\n >\n \n {intl.formatMessage(messages.DownloadAsPdf)}\n \n )}\n {document && (document.documentType === 8 || document.documentType === 23) ? (\n <>\n this.setState({ showReplyToEmailModal: true, replyAll: false })}\n >\n {intl.formatMessage(messages.Reply)}\n \n this.setState({ showReplyToEmailModal: true, replyAll: true })}\n >\n {intl.formatMessage(messages.ReplyAll)}\n \n \n ) : null}\n\n \n \n {document &&\n document.canEdit &&\n canEdit &&\n !DataCacheService.hasUserConnectPlatform(46) && (\n DocumentService.edit(document.id, intl.locale.split('-')[0])}\n showProgress\n disabled={document.checkedOutByUserId != null}\n >\n {intl.formatMessage(messages.Edit)}\n \n )}\n\n {document &&\n document.canEdit &&\n canEdit &&\n DataCacheService.hasUserConnectPlatform(46) &&\n document.storageType !== 1 &&\n document.checkedOutByUserId == null && (\n \n )}\n {document &&\n document.canEdit &&\n canEdit &&\n DataCacheService.hasUserConnectPlatform(46) &&\n document.storageType !== 1 &&\n document.checkedOutByUserId == null && (\n \n )}\n {document &&\n document.canEdit &&\n canEdit &&\n DataCacheService.hasUserConnectPlatform(46) &&\n document.storageType !== 1 &&\n document.checkedOutByUserId != null &&\n document.checkedOutByUserId == authService.getUserId() && (\n \n DocumentService.getCheckedOutLink(document.id).then(link => {\n if (!link) return;\n window.open(link);\n })\n }\n showProgress\n >\n {intl.formatMessage(messages.ContinueEditing)}\n \n )}\n {document &&\n document.canEdit &&\n canEdit &&\n DataCacheService.hasUserConnectPlatform(46) &&\n document.storageType !== 1 &&\n document.checkedOutByUserId != null && (\n this.checkinDocument(document)}\n disabled={document.checkedOutByUserId != authService.getUserId()}\n showProgress\n >\n {intl.formatMessage(messages.Checkin)}\n \n )}\n {document &&\n document.canEdit &&\n canEdit &&\n DataCacheService.hasUserConnectPlatform(46) &&\n document.storageType !== 1 &&\n document.checkedOutByUserId != null && (\n this.setState({ showCheckinDocumentModal: true })}\n disabled={\n document.checkedOutByUserId != authService.getUserId() &&\n !authService.hasPermission({ functionality: 'CompanyOwn', privilege: 'Update' })\n }\n showProgress\n >\n {intl.formatMessage(messages.DiscardCheckout)}\n \n )}\n {document && canBeReplaced && (\n this.replaceDocumentInternal(document, files)}\n className=\"margin5L\"\n accept={document.mime}\n disabled={!!document.replacing || document.checkedOutByUserId != null}\n >\n {({ onClick }) => (\n \n {intl.formatMessage(messages.Replace)}\n \n )}\n \n )}\n {document && onRemoveDocument && document.canRemove && canDelete && (\n \n )}\n
    \n \n \n {intl.formatMessage(messages.Save)}\n \n
    \n \n );\n }\n}\n\nexport default injectIntl(DocumentDetailsModal);\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport SimplePanel from '@/shared/components/SimplePanel';\nimport OverlayTrigger from 'react-bootstrap/lib/OverlayTrigger';\nimport Popover from 'react-bootstrap/lib/Popover';\nimport { FormattedMessage, injectIntl } from 'react-intl';\nimport { FaInfoCircle } from 'react-icons/fa';\nimport FileUpload from '@/shared/components/input/FileUpload';\nimport dataCacheService from '@/shared/services/DataCacheService';\nimport classNames from 'classnames';\nimport messages from './documentMessages';\n\nconst Dropzone = ({\n documentUploadEndpoint,\n onDocumentUploaded,\n onAdvancedUpload,\n onLinkFromSharepoint,\n intl,\n ...rest\n}) => (\n
    \n
    \n \n \n\n \n {intl.formatMessage(messages.DropzoneExplanation)}\n \n }\n >\n \n \n \n \n \n
    \n
    \n
    \n onDocumentUploaded(error, file)}\n {...rest}\n />\n
    \n
    \n
    \n \n
    \n {dataCacheService.hasConnectPlatform(null, 31) && (\n
    \n \n
    \n )}\n
    \n
    \n
    \n);\n\nDropzone.propTypes = {\n documentUploadEndpoint: PropTypes.string.isRequired,\n onDocumentUploaded: PropTypes.func.isRequired,\n onAdvancedUpload: PropTypes.func.isRequired,\n onLinkFromSharepoint: PropTypes.func.isRequired,\n};\n\nexport default injectIntl(Dropzone);\n","import React, { useRef } from 'react';\nimport PropTypes from 'prop-types';\nimport Dropdown from 'react-bootstrap/lib/Dropdown';\nimport MenuItem from 'react-bootstrap/lib/MenuItem';\nimport { injectIntl } from 'react-intl';\nimport { MdForwardToInbox, MdOpenInNew } from 'react-icons/md';\nimport { FaFilePdf } from 'react-icons/fa';\nimport intlShape from '@/shared/utils/intlShape';\nimport DocumentService from '@/shared/services/DocumentService';\nimport {\n DeleteIcon,\n IconPencil,\n PaperPlaneIcon,\n ShareIcon,\n ToDoIcon,\n UndoIcon,\n MailIcon,\n SpinnerIcon,\n ReplaceIcon,\n SaveIcon,\n} from '@/shared/components/Icons';\nimport authService from '@/shared/services/AuthService';\nimport { SiMicrosoftsharepoint } from 'react-icons/si';\nimport dataCacheService from '@/shared/services/DataCacheService';\nimport messages from './documentMessages';\nimport Button from '../../shared/components/Button';\nimport SimpleFileUpload from '@/shared/components/input/SimpleFileUpload';\n\nconst DocumentActionsButton = props => {\n const {\n document,\n suggestedAction,\n otherActions,\n intl,\n onDeleteDocument,\n onCreateTodo,\n onOpenSignatureRequestModal,\n onOpenRevokeSignatureRequestModal,\n onSendViaEmail,\n onShareItem,\n onForward,\n onSendToSharepoint,\n openInApp,\n duplicate,\n onReplaceDocument,\n onCheckinDocument,\n onCheckoutDocument,\n onDiscardCheckout,\n actionsInProgress,\n } = props;\n const canEdit =\n document.canEdit &&\n authService.hasPermission({ functionality: 'Documents', privilege: 'Update' });\n const canBeReplaced =\n document.canBeReplaced &&\n authService.hasPermission({ functionality: 'Documents', privilege: 'Update' });\n const canDelete =\n document.canRemove &&\n authService.hasPermission({ functionality: 'Documents', privilege: 'Delete' });\n const canCreateTodo = authService.hasPermission({\n functionality: 'Todo',\n privilege: 'Create',\n });\n const canForward = document.documentType === 8 || document.documentType === 23;\n const canSign =\n authService.hasPermission({ functionality: 'Relation', privilege: 'Update' }) &&\n document.canBeSigned &&\n document.signingStatus < 20 && // not signed\n document.signingStatus !== 10; // not pending\n\n const canRevokeSignatureRequest =\n authService.hasPermission({ functionality: 'Relation', privilege: 'Update' }) &&\n document.signingProvider !== 4 &&\n document.signingProvider !== 6 &&\n document.signingId &&\n document.signingStatus >= 10 &&\n document.signingStatus <= 12;\n\n const dropdownRef = useRef();\n\n const handleReplaceDocument = (document, files) => {\n onReplaceDocument(document, files);\n if (dropdownRef.current) {\n dropdownRef.current.handleClose();\n }\n };\n\n if (\n (otherActions && otherActions.length) ||\n canEdit ||\n canDelete ||\n canCreateTodo ||\n canSign ||\n canBeReplaced ||\n canRevokeSignatureRequest\n ) {\n return (\n \n suggestedAction && suggestedAction.func(document)}\n showProgress={false}\n disabled={\n document.saving || (suggestedAction.disabled && suggestedAction.disabled(document))\n }\n >\n \n {document.saving && }\n {suggestedAction && suggestedAction.label}\n \n \n \n \n {otherActions &&\n otherActions.map(action => (\n action.func(document)}>\n {action.icon}\n {action.label}\n \n ))}\n {document.storageType !== 1 &&\n canDelete &&\n dataCacheService.hasConnectPlatform(null, 31) && (\n onSendToSharepoint(document)}>\n \n {intl.formatMessage(messages.MoveToSharepoint)}\n \n )}\n {document.storageType !== 1 && canDelete && canEdit && (\n duplicate(document)}>\n \n <>{intl.formatMessage(messages.Duplicate)}\n \n )}\n {document.storageType === 1 && canEdit && (\n openInApp(document)}>\n \n <>{intl.formatMessage(messages.OpenInApp)}\n \n )}\n {canForward && (\n onForward(document)}>\n \n {intl.formatMessage(messages.Forward)}\n \n )}\n\n {canSign && (\n onOpenSignatureRequestModal(document)}>\n \n {intl.formatMessage(messages.SendSignatureRequest)}\n \n )}\n {canRevokeSignatureRequest && (\n onOpenRevokeSignatureRequestModal(document)}>\n \n {intl.formatMessage(messages.RevokeSignatureRequest)}\n \n )}\n {DocumentService.canConvertToPdf(document.mime) && (\n DocumentService.convertToPdf(document.id, document.name)}>\n \n {intl.formatMessage(messages.DownloadAsPdf)}\n \n )}\n onSendViaEmail(document, false)}>\n \n {intl.formatMessage(messages.SendViaEmail)}\n \n {DocumentService.canConvertToPdf(document.mime) && (\n onSendViaEmail(document, true)}>\n \n {intl.formatMessage(messages.SendAsPdf)}\n \n )}\n {canCreateTodo && (\n onCreateTodo(document)}>\n {intl.formatMessage(messages.CreateNewToDo)}\n \n )}\n onShareItem(document)}>\n {intl.formatMessage(messages.Share)}\n \n {document.storageType !== 1 &&\n canEdit &&\n document.checkedOutByUserId == null &&\n dataCacheService.hasUserConnectPlatform(46) && (\n onCheckoutDocument(document, true)}\n disabled={actionsInProgress}\n >\n \n {intl.formatMessage(messages.CheckoutApp)}\n \n )}\n {document.storageType !== 1 &&\n canEdit &&\n document.checkedOutByUserId == null &&\n dataCacheService.hasUserConnectPlatform(46) && (\n onCheckoutDocument(document, false)}\n disabled={actionsInProgress}\n >\n \n {intl.formatMessage(messages.CheckoutBrowser)}\n \n )}\n {document.storageType !== 1 &&\n canEdit &&\n document.checkedOutByUserId != null &&\n document.checkedOutByUserId == authService.getUserId() &&\n dataCacheService.hasUserConnectPlatform(46) && (\n \n DocumentService.getCheckedOutLink(document.id).then(link => {\n if (!link) return;\n window.open(link);\n })\n }\n disabled={actionsInProgress}\n >\n \n {intl.formatMessage(messages.ContinueEditing)}\n \n )}\n {document.storageType !== 1 &&\n canEdit &&\n document.checkedOutByUserId != null &&\n dataCacheService.hasUserConnectPlatform(46) && (\n onCheckinDocument(document)}\n // Disabled if user is not checked out user\n disabled={\n document.checkedOutByUserId != authService.getUserId() || actionsInProgress\n }\n >\n \n {intl.formatMessage(messages.Checkin)}\n \n )}\n {document.storageType !== 1 &&\n canEdit &&\n document.checkedOutByUserId != null &&\n dataCacheService.hasUserConnectPlatform(46) && (\n onDiscardCheckout(document)}\n // Disabled if user is not admin or checked out user\n disabled={\n (document.checkedOutByUserId != authService.getUserId() &&\n !authService.hasPermission({\n functionality: 'CompanyOwn',\n privilege: 'Update',\n })) ||\n actionsInProgress\n }\n >\n \n {intl.formatMessage(messages.DiscardCheckoutAction)}\n \n )}\n {canEdit && !dataCacheService.hasUserConnectPlatform(46) && (\n DocumentService.edit(document.id, intl.locale.split('-')[0])}\n disabled={document.checkedOutByUserId != null}\n >\n \n {intl.formatMessage(messages.Edit)}\n \n )}\n {canBeReplaced && (\n handleReplaceDocument(document, files)}\n accept={document.mime}\n disabled={!!document.replacing || actionsInProgress}\n >\n {({ onClick }) => (\n \n {document.replacing ? (\n \n ) : (\n \n )}\n {intl.formatMessage(messages.Replace)}\n \n )}\n \n )}\n {canDelete && (\n onDeleteDocument(document)}\n >\n \n {intl.formatMessage(messages.DeleteDocument)}\n \n )}\n \n \n );\n }\n // Fallback\n return (\n suggestedAction && suggestedAction.func(document)}\n showProgress={false}\n disabled={document.saving}\n >\n \n {document.saving && }\n {suggestedAction && suggestedAction.label}\n \n \n );\n};\n\nDocumentActionsButton.propTypes = {\n document: PropTypes.shape({}).isRequired,\n suggestedAction: PropTypes.shape({}).isRequired,\n otherActions: PropTypes.arrayOf(PropTypes.shape({})),\n onDeleteDocument: PropTypes.func.isRequired,\n onCreateTodo: PropTypes.func.isRequired,\n onOpenSignatureRequestModal: PropTypes.func.isRequired,\n onOpenRevokeSignatureRequestModal: PropTypes.func.isRequired,\n onShareItem: PropTypes.func.isRequired,\n onSendViaEmail: PropTypes.func.isRequired,\n intl: intlShape.isRequired,\n onForward: PropTypes.func.isRequired,\n onSendToSharepoint: PropTypes.func.isRequired,\n openInApp: PropTypes.func.isRequired,\n duplicate: PropTypes.func.isRequired,\n onReplaceDocument: PropTypes.func.isRequired,\n};\nDocumentActionsButton.defaultProps = {\n otherActions: [],\n};\nexport default injectIntl(DocumentActionsButton);\n","import React from 'react';\nimport classNames from 'classnames';\n\nconst StatusLabel = props => {\n const { success, info, warning, danger, active, children, className, statuses, title } = props;\n\n const isActive = active || statuses.includes('active');\n\n const labelClassName = classNames('label', className, {\n 'label-success': success || statuses.includes('success'),\n 'label-info': info || statuses.includes('info'),\n 'label-warning': warning || statuses.includes('warning'),\n 'label-danger': danger || statuses.includes('danger'),\n });\n\n if (isActive) {\n return (\n \n {children}\n \n );\n }\n\n return (\n \n {children}\n \n );\n};\n\nexport default StatusLabel;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { useIntl } from 'react-intl';\nimport StatusLabel from '../../shared/components/StatusLabel';\nimport FormattedListValue from '@/shared/components/FormattedListValue';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\n\nconst RecognitionStatus = ({ status, iconOnly = false }) => {\n const intl = useIntl();\n let statuses = [];\n\n let recognitionStatus = status;\n // Show 'not applicable' as 'processed' for now\n if (status === 0) {\n recognitionStatus = 4;\n }\n\n // Recognizing\n if (recognitionStatus === 1) {\n statuses = ['info', 'active'];\n }\n\n // Recognized\n if (recognitionStatus === 2) {\n statuses = ['info'];\n }\n\n // Processing\n if (recognitionStatus === 3) {\n statuses = ['info', 'active'];\n }\n\n // Processed/not applicable\n if (recognitionStatus === 4) {\n statuses = ['success'];\n }\n\n // Unrecognized\n if (recognitionStatus === 5) {\n statuses = ['warning'];\n }\n const statusLabel = intl.formatMessage(listItemMsg('recognitionstatus', recognitionStatus));\n\n return (\n \n {!iconOnly ? {statusLabel} : ' '}\n \n );\n};\n\nRecognitionStatus.propTypes = {\n status: PropTypes.number.isRequired,\n};\n\nexport default RecognitionStatus;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport dateFormatService from \"../services/DateFormatService\";\nimport momentPropTypes from 'react-moment-proptypes';\nimport moment from 'moment';\n\nconst FormattedDayMonth = ({ value }) => {\n const stringValue = value instanceof Date\n ? value.toISOString()\n : (moment.isMoment(value) ? value.toISOString() : value);\n\n return {dateFormatService.formatDayMonth(stringValue)};\n}\n\nFormattedDayMonth.propTypes = {\n value: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.instanceOf(Date),\n momentPropTypes.momentObj,\n ]).isRequired,\n};\n\nexport default FormattedDayMonth;\n","import React from 'react';\nimport { formatListValue } from '@/shared/components/FormattedListValue';\nimport { useIntl } from 'react-intl';\nimport messages from './FieldMessages';\n\nconst AddressChange = props => {\n const intl = useIntl();\n const { log } = props;\n\n const property = formatListValue({ list: 'Medium', id: log.label, intl, log });\n\n if (log.oldValue.Value === null) {\n return (\n \n {intl.formatMessage(messages.AddedFieldForCommunication, {\n property,\n newValue: log.newValue.Value,\n b: value => {value},\n })}\n \n );\n }\n\n if (log.newValue.Value === null) {\n return (\n \n {intl.formatMessage(messages.DeletedFieldForCommunication, {\n property,\n oldValue: log.oldValue.Value,\n b: value => {value},\n })}\n \n );\n }\n\n return (\n \n {intl.formatMessage(messages.ChangedFieldForCommunication, {\n property,\n originalValue: log.oldValue.Value,\n currentValue: log.newValue.Value,\n b: value => {value},\n })}\n \n );\n};\n\nexport default AddressChange;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport momentPropTypes from 'react-moment-proptypes';\nimport { FormattedDate } from 'react-intl';\n\nimport moment from 'moment';\nimport EditableToggle from './EditableToggle';\nimport DatePicker from '../input/DatePicker';\nimport { isBeforeMinimum } from '../../utils/validationHelpers';\nimport FormattedDateShort from '../FormattedDateShort';\n\nclass EditableDatePicker extends Component {\n state = {\n isFocused: true,\n };\n\n handleModeChange = newMode => {\n if (newMode === 'edit') {\n this.setState({ isFocused: true });\n }\n };\n\n render() {\n const {\n onChange,\n value,\n submitOnSelect,\n inputClassName,\n displayClassName,\n readOnly,\n placeholder,\n isOutsideRange,\n nullDisplayValue,\n ...rest\n } = this.props;\n const { isFocused } = this.state;\n\n const dateValue = value ? moment.utc(value) : null;\n\n return (\n : nullDisplayValue\n }\n className={displayClassName}\n >\n {({ inputValue, setInputValue, submit, cancel }) => (\n {\n setInputValue(date).then(() => {\n if (date) submit(); // Submit when a date is valid\n });\n }}\n focused={isFocused}\n onFocusChange={({ focused }) => {\n this.setState(\n {\n isFocused: focused,\n },\n () => {\n if (!focused) {\n // cancel when focus moved away from datepicker\n cancel();\n }\n },\n );\n }}\n showClearDate\n reopenPickerOnClearDate={false}\n isOutsideRange={isOutsideRange}\n small\n onClose={({ date }) => {\n if (inputValue === null && !date) {\n submit(); // Submit null value when closing datepicker with invalid date\n } else if (!date) cancel();\n }}\n placeholder={placeholder}\n {...rest}\n />\n )}\n \n );\n }\n}\n\nEditableDatePicker.propTypes = {\n onChange: PropTypes.func.isRequired,\n value: momentPropTypes.momentObj,\n placeholder: PropTypes.string,\n inputClassName: PropTypes.string,\n displayClassName: PropTypes.string,\n readOnly: PropTypes.bool,\n nullDisplayValue: PropTypes.string,\n isOutsideRange: PropTypes.func,\n};\nEditableDatePicker.defaultProps = {\n inputClassName: '',\n displayClassName: '',\n placeholder: '',\n nullDisplayValue: undefined,\n readOnly: false,\n value: null,\n isOutsideRange: isBeforeMinimum,\n};\n\nexport default EditableDatePicker;\n","import { defineMessages } from 'react-intl';\n\nconst messages = defineMessages({\n AuditLog: 'Audit log',\n Yes: 'Yes',\n No: 'No',\n SetEnum: '{property} was set to {value}',\n ClearEnum: '{property} was cleared. Old value: {value}',\n ChangedField: '{property} was changed from {originalValue} to {currentValue}',\n AddedFieldForCommunication:\n 'has added a communication channel of {property} with value {newValue}',\n DeletedFieldForCommunication:\n 'has deleted a communication channel of {property} with value {oldValue}',\n ChangedFieldForCommunication:\n 'has changed {property} from {originalValue} to {currentValue} for a communication channel',\n AddedLink: 'A {linkType} was added: {relation}',\n RemovedLink: 'A {linkType} was removed: {relation}',\n ForRelationLinkWith: 'for relation link with {relation}',\n AddedAnUboSnapshotAt: 'An ubo snapshot was added at {time}',\n DeletedAnUboSnapshotAt: 'An ubo snapshot was deleted at {time}',\n UboSnapshotEnteredOnline: 'UBO snapshot of {time} was entered online',\n NoItems: 'No items found',\n Estox: 'eStox',\n Eid: 'eID',\n AuthorizationList: 'Authorization list',\n GenericDocumentRecognition: 'Document recognition',\n AddedCommunicationSetting:\n 'has added a communication setting of purpose {property} using medium {medium} with value {newValue}',\n DeletedCommunicationSetting:\n 'has deleted a communication setting of purpose {property} using medium {medium} with value {oldValue}',\n ChangedCommunicationSetting:\n 'has changed a communication setting of purpose {property} using medium {medium} from {originalValue} to {currentValue}',\n RelationCreated: 'Relation was created',\n AddedAuthorization: 'An authorization with name {name} was created',\n DeletedAuthorization: 'An authorization with name {name} was deleted',\n AuthorizationProperty: ' for an authorization link',\n AuthorizationPropertyWithName: ' for an authorization link with name {name}',\n DeletedBankAccount: 'A bank account with IBAN {iban} was deleted',\n AddedBankAccount: 'A bank account with IBAN {iban} was added',\n BankAccountProperty: ' for a bank account',\n BankAccountWithDisplayValueProperty: ' for a bank account with IBAN {iban}',\n NbbForeingAccountsDocument: 'NBB - foreign accounts',\n AddedAssignment: 'An assignment with name {name} was created',\n DeletedAssignment: 'An assignment with name {name} was deleted',\n DefaultAssignmentProperty: ' for the default assignment',\n AssignmentWithDisplayValueProperty: ' for assignment {name}',\n});\n\nexport default messages;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport MaskedInput from 'react-maskedinput';\nimport classNames from 'classnames';\nimport { IconPencil, IconWarningSign } from '../Icons';\n\nexport default class TextInput extends Component {\n componentName = 'TextInput';\n static propTypes = {\n /** input type element: text, hidden or password */\n type: PropTypes.string,\n /** name of the element */\n name: PropTypes.string,\n /** id of the element */\n id: PropTypes.string,\n /** The value of the element */\n value: PropTypes.string,\n /** On Value empty, place this string as a placeholder */\n placeholder: PropTypes.string,\n /** input mask to render masked input */\n mask: PropTypes.string,\n /** True will render component like a label. False will render as input control */\n asLabel: PropTypes.bool,\n /** True will toggle the control on focus and blur */\n togglable: PropTypes.bool,\n /** Boolean indicating whether it should render as disabled */\n disabled: PropTypes.bool,\n /** Errormessage and indicator if element should render in error state */\n error: PropTypes.string,\n /** Handle onChange events */\n onChange: PropTypes.func,\n /** Handle onFocus events */\n onFocus: PropTypes.func,\n /** Handle onBlur events */\n onBlur: PropTypes.func,\n };\n\n static defaultProps = {\n type: 'text',\n name: undefined,\n id: undefined,\n value: undefined,\n placeholder: undefined,\n mask: undefined,\n asLabel: false,\n togglable: false,\n disabled: false,\n error: undefined,\n onChange: () => {},\n onFocus: () => {},\n onBlur: () => {},\n };\n\n constructor(props) {\n super(props);\n this.state = {\n asLabel: props.togglable ? true : props.asLabel,\n };\n }\n handleBlur = event => {\n const { onBlur, asLabel, error, togglable } = this.props;\n if (error) {\n // When there is an error set focus back to input\n event.target.focus();\n return;\n }\n this.setState(state => ({\n ...state,\n asLabel: togglable ? true : asLabel,\n }));\n onBlur(event);\n };\n\n handleFocus = event => {\n const { onFocus, asLabel, onChange, togglable } = this.props;\n this.setState(state => ({\n ...state,\n asLabel: togglable ? false : asLabel,\n }));\n onChange(event);\n onFocus(event);\n };\n\n renderInput() {\n const { asLabel } = this.state;\n const { togglable, ...rest } = this.props;\n const readOnly = asLabel; // if rendered as label. Set readOnly also to true\n const className = classNames({\n 'TextInput--readOnly': asLabel,\n 'form-control TextInput--edit': !asLabel,\n 'TextInput--editable': togglable && asLabel,\n });\n\n const propsContainer = {\n className,\n ...rest,\n readOnly,\n onFocus: this.handleFocus,\n onBlur: this.handleBlur,\n ref: input => {\n this.inputElement = input;\n },\n };\n return rest.mask ? (\n \n ) : (\n \n );\n }\n\n componentDidUpdate(prevProps) {\n const { error } = this.props;\n if (prevProps.error !== error && error) {\n this.inputElement.focus();\n }\n }\n\n render() {\n const { error, value, togglable, placeholder, mask, type } = this.props;\n const { asLabel } = this.state;\n const classname = classNames({\n 'form-group': true,\n 'has-error has-feedback': error,\n 'has-feedback': !value,\n });\n const isHidden = type === 'hidden';\n const iconClass = 'form-control-feedback';\n return (\n
    \n {this.renderInput()}\n {error && !isHidden && }\n {!value &&\n !error &&\n togglable &&\n !placeholder &&\n !mask &&\n asLabel &&\n !isHidden && }\n
    \n );\n }\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport {defineMessages, FormattedMessage} from \"react-intl\";\nimport FormattedDayMonth from \"@/shared/components/FormattedDayMonth\";\nimport FormattedListValue from \"@/shared/components/FormattedListValue\";\nimport AddressChange from \"@/modules/relations/audit/components/AddressChange\";\nimport AddressInput from \"@/shared/components/input/AddressInput\";\n\nconst messages = defineMessages({\n BankAccount: 'Bank account',\n Name: 'Name',\n Address: 'Address',\n LegalForm: 'Legal form',\n FiscalYearEnd: 'End of fiscal year',\n Link: 'Linked person/entity'\n});\n\nconst RelationImportModelDetail = ({ document }) => {\n if (!document.recognitionMeta) return null;\n const data =\n typeof document.recognitionMeta === 'string'\n ? JSON.parse(document.recognitionMeta)\n : document.recognitionMeta;\n console.log(\"Data:\", data)\n return (\n
    \n
    \n \n
    \n {data.address && (
    \n \n
    )}\n
    \n \n
    \n {data.fiscalYearEnd && (
    \n \n
    )}\n {(data.links || []).map(acc => (\n
    \n \n
    )\n )}\n {(data.bankAccounts || []).map(acc => (\n
    \n \n
    )\n )}\n
    \n );\n};\n\nRelationImportModelDetail.propTypes = {\n document: PropTypes.shape({}).isRequired,\n};\n\nexport default RelationImportModelDetail;\n","import React from 'react';\nimport { FormattedDate } from 'react-intl';\nimport PropTypes from 'prop-types';\nimport FormattedDateShort from \"../../shared/components/FormattedDateShort\";\n\nconst EidDetail = ({ document }) => {\n if (!document.recognitionMeta) return null;\n const eid =\n typeof document.recognitionMeta === 'string'\n ? JSON.parse(document.recognitionMeta)\n : document.recognitionMeta;\n return (\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n );\n};\n\nEidDetail.propTypes = {\n document: PropTypes.shape({}).isRequired,\n};\n\nexport default EidDetail;\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst RelationDocumentDetail = ({ document }) => {\n if (!document.recognitionMeta) return null;\n\n const data =\n typeof document.recognitionMeta === 'string'\n ? JSON.parse(document.recognitionMeta)\n : document.recognitionMeta;\n const { relationFirstName, relationName, relationAddress } = data;\n\n return (\n
    \n
    {`${relationFirstName === null ? '' : relationFirstName} ${relationName}`.trim()}
    \n
    {relationAddress}
    \n
    \n );\n};\n\nRelationDocumentDetail.propTypes = {\n document: PropTypes.shape({}).isRequired,\n};\n\nexport default RelationDocumentDetail;\n","import React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport PropTypes from 'prop-types';\nimport messages from '../documentMessages';\n\nconst AuthorizationListDetail = ({ document }) => {\n if (!document.recognitionMeta) return null;\n const authorizationListDocument =\n typeof document.recognitionMeta === 'string'\n ? JSON.parse(document.recognitionMeta)\n : document.recognitionMeta;\n\n return (\n
    \n
    \n
    \n \n
    \n \n
    \n
    \n
    \n \n
    \n \n
    \n
    \n );\n};\n\nAuthorizationListDetail.propTypes = {\n document: PropTypes.shape({}).isRequired,\n};\n\nexport default AuthorizationListDetail;\n","import React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport PropTypes from 'prop-types';\nimport messages from '../documentMessages';\n\nconst RegistrationListDetail = ({ document }) => {\n if (!document.recognitionMeta) return null;\n const documentMeta =\n typeof document.recognitionMeta === 'string'\n ? JSON.parse(document.recognitionMeta)\n : document.recognitionMeta;\n\n return (\n
    \n
    \n
    \n \n
    \n \n
    \n
    \n );\n};\n\nRegistrationListDetail.propTypes = {\n document: PropTypes.shape({}).isRequired,\n};\n\nexport default RegistrationListDetail;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport RelationImportModelDetail from '@/modules/documents/details/RelationImportModelDetail';\nimport EidDetail from './EidDetail';\nimport RelationDocumentDetail from './RelationDocumentDetail';\nimport AuthorizationListDetail from './details/AuthorizationListDetail';\nimport RegistrationListDetail from './details/RegistrationListDetail';\n\nexport const documentTypesWithDetails = [\n 10, // Eid\n 19, // AuthorizationList\n 1000, // RegistrationList\n];\n\nconst DocumentDetailRow = ({ document }) => {\n switch (document.documentType) {\n case 10:\n return ;\n case 11: // Assignment letter\n case 29: // Generated document\n return ;\n case 19:\n return ;\n case 1000:\n return ;\n default:\n if (document.hasRelationImportModel) {\n return ;\n }\n return ;\n }\n};\n\nDocumentDetailRow.propTypes = {\n document: PropTypes.shape({}).isRequired,\n};\n\nexport default DocumentDetailRow;\n","import React, { Component } from 'react';\n// import PropTypes from 'prop-types';\nimport TextInput from './TextInput';\n\n/*\n\"address\":{\"id\":null,\"street1\":\"Puursesteenweg\",\"street2\":\"\",\"number\":\"390c\",\"box\":\"\",\"zipCode\":\"2880\",\"city\":\"Bornem\",\"region\":null,\"country\":\"BE\"}\n*/\n\nexport default class AddressInput extends Component {\n state = {\n showForm: false,\n };\n componentName = 'AddressInput';\n static propTypes = {};\n static defaultProps = {};\n\n handleFocus = () => {\n this.setState(state => ({\n ...state,\n showForm: true,\n }));\n // console.log('Component Name:', this.componentName, this);\n };\n\n handleBlur = () => {\n // console.log('Component Name:', this.componentName, this);\n };\n\n render() {\n const { showForm } = this.state;\n const asLabel = !showForm;\n return (\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n );\n }\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { FaGlobe } from 'react-icons/fa';\nimport { IconContext } from 'react-icons';\nimport intlShape from '@/shared/utils/intlShape';\nimport EditableDatePicker from '@/shared/components/editable/EditableDatePicker';\nimport moment from 'moment';\nimport EditableAutoComplete from '@/shared/components/editable/EditableAutoComplete';\n\nimport FileIcon from '@/shared/components/FileIcon';\nimport FormattedListValue, { listItemMsg } from '@/shared/components/FormattedListValue';\nimport RelationName from '@/shared/components/RelationName';\nimport DocumentService from '@/shared/services/DocumentService';\nimport Checkbox from '@/shared/components/input/Checkbox';\nimport { countVisibleColumns } from '@/shared/utils/hiddenColumnsHelper';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport { SiMicrosoftonedrive, SiMicrosoftsharepoint } from 'react-icons/si';\nimport DocumentSigningStatusIcon from '@/shared/components/DocumentSigningStatusIcon';\nimport messages from './documentMessages';\nimport DocumentActionsButton from './DocumentActionsButton';\nimport RecognitionStatus from './RecognitionStatus';\nimport DocumentDetailRow, { documentTypesWithDetails } from './DocumentDetailRow';\nimport FormattedDateShort from '../../shared/components/FormattedDateShort';\nimport EditableDocumentTypeSelect from './EditableDocumentTypeSelect';\nimport AuthService from '@/shared/services/AuthService';\n\nexport default class DocumentRow extends React.Component {\n state = {\n isCollapsed: true,\n };\n\n toggleCollapsed = () => {\n const { isCollapsed } = this.state;\n const { document, loadRecognitionMeta } = this.props;\n if (isCollapsed && typeof document.recognitionMeta === 'undefined')\n loadRecognitionMeta(document);\n\n this.setState({\n isCollapsed: !isCollapsed,\n });\n };\n\n render() {\n const {\n document,\n action,\n onOpenDocumentDetails,\n intl,\n handleSelection,\n onDeleteDocument,\n onCreateTodo,\n onOpenSignatureRequestModal,\n onSendViaEmail,\n onOpenRevokeSignatureRequestModal,\n onShareItem,\n onDeleteRelation,\n onForward,\n columnStatus,\n onUpdateDocumentDate,\n onUpdateDocumentType,\n onSendToSharepoint,\n openInApp,\n duplicate,\n onReplaceDocument,\n onCheckinDocument,\n onCheckoutDocument,\n onDiscardCheckout,\n actionsInProgress,\n } = this.props;\n const { isCollapsed } = this.state;\n\n // A row is collapsable when it has been recognized, not processed and metadata about the document was found\n const isCollapsable =\n document.recognitionStatus === 2 &&\n (typeof document.recognitionMeta === 'undefined' || !!document.recognitionMeta) &&\n (documentTypesWithDetails.indexOf(document.documentType) >= 0 ||\n document.hasRelationImportModel);\n // Count of all elements + 1 for column for toggle collapse\n const totalColumns = 4 + countVisibleColumns(columnStatus);\n\n return (\n \n {\n e.dataTransfer.effectAllowed = 'all';\n e.dataTransfer.setData('text', JSON.stringify(document));\n try {\n e.dataTransfer.setData('cxdocument', JSON.stringify(document));\n } catch (ex) {\n // Ignore\n }\n }}\n >\n \n handleSelection(document)} value={document.selected} />\n \n\n \n \n onOpenDocumentDetails(document)}\n data-toggle=\"tooltip\"\n data-placement=\"bottom\"\n title={document.name}\n >\n {document.name}\n
    \n \n {isCollapsable && (\n \n \n \n )}\n \n \n\n {columnStatus.documentType ? (\n document.canRemove ? (\n \n onUpdateDocumentType(x)}\n />\n \n ) : (\n \n \n \n )\n ) : null}\n {columnStatus.relation && (\n \n {document.relations &&\n document.relations.slice(0, 3).map(relation => (\n // \n onDeleteRelation(relationId) : null\n }\n />\n // \n ))}\n {document.relations && document.relations.length > 3 && (\n \n …\n
    \n )}\n \n )}\n {columnStatus.recognitionStatus && (\n \n \n \n )}\n\n {columnStatus.documentDate && (\n \n onUpdateDocumentDate(documentDate)}\n />\n \n )}\n {columnStatus.creationDate && (\n \n \n \n )}\n {columnStatus.createdBy && (\n \n {document.creationUserId\n ? DataCacheService.getUserName(document.creationUserId)\n : null}\n \n )}\n \n {document.isPublicOnPortal === true && (\n
    \n \n \n \n
    \n )}\n {document.canBeSigned &&\n (document.shouldBeSigned || document.signingStatus > 1) &&\n document.signingStatus && }\n\n {document.storageType === 1 && (\n
    \n DocumentService.edit(document.id, intl.locale.split('-')[0])}\n target=\"_blank\"\n rel=\"noreferrer nofollow\"\n className=\"btn btn-xs btn-inverse\"\n title={intl.formatMessage(messages.EditDocumentInSharePoint)}\n style={{ borderRadius: '3px' }}\n >\n \n \n
    \n )}\n {document.storageType != 1 && document.checkedOutByUserId != null && (\n
    \n {\n if (document.checkedOutByUserId == AuthService.getUserId())\n DocumentService.getCheckedOutLink(document.id).then(link => {\n if (!link) return;\n window.open(link);\n });\n }}\n target=\"_blank\"\n rel=\"noreferrer nofollow\"\n className=\"btn btn-xs btn-inverse\"\n title={intl.formatMessage(messages.DocumentCheckedOut, {\n name: DataCacheService.getUserName(document.checkedOutByUserId),\n })}\n style={{ borderRadius: '3px' }}\n >\n \n \n
    \n )}\n \n \n
    \n DocumentService.download(document.id)}\n >\n \n \n {action && (\n \n )}\n
    \n \n \n {!isCollapsed && isCollapsable && (\n \n \n \n {' '}\n \n \n )}\n \n );\n }\n}\n\nDocumentRow.propTypes = {\n document: PropTypes.shape({}).isRequired,\n intl: intlShape.isRequired,\n action: PropTypes.shape({}).isRequired,\n onOpenDocumentDetails: PropTypes.func.isRequired,\n handleSelection: PropTypes.func.isRequired,\n loadRecognitionMeta: PropTypes.func.isRequired,\n columnStatus: PropTypes.shape({}).isRequired,\n onUpdateDocumentDate: PropTypes.func.isRequired,\n openInApp: PropTypes.func.isRequired,\n duplicate: PropTypes.func.isRequired,\n onReplaceDocument: PropTypes.func.isRequired,\n};\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage } from 'react-intl';\nimport ToastrService from '@/shared/services/ToastrService';\nimport intlShape from '@/shared/utils/intlShape';\n\nimport OkCancelModal from '@/shared/components/OkCancelModal';\n\nimport DatePicker from '@/shared/components/input/DatePicker';\nimport { isBeforeMinimum } from '@/shared/utils/validationHelpers';\nimport messages from '../documentMessages';\n\nexport default class ChangeDocumentDateModal extends Component {\n state = {\n documentDate: undefined,\n };\n\n static propTypes = {\n show: PropTypes.bool.isRequired,\n intl: intlShape.isRequired,\n onSave: PropTypes.func.isRequired,\n onClose: PropTypes.func.isRequired,\n };\n\n static defaultProps = {};\n\n onSave = () => {\n const { documentDate } = this.state;\n const { onSave, intl } = this.props;\n if (!documentDate || isBeforeMinimum(documentDate)) {\n ToastrService.error(intl.formatMessage(messages.InvalidDate));\n return;\n }\n return onSave({ documentDate });\n };\n\n closeModal = () => {\n const { onClose } = this.props;\n onClose();\n };\n\n render() {\n const { show, intl } = this.props;\n const { documentDate, dateFocused } = this.state;\n if (!show) return null;\n\n return (\n this.onSave()}\n >\n
    \n
    \n
    \n \n
    \n \n this.setState(state => ({\n ...state,\n documentDate: date,\n }))\n }\n focused={dateFocused}\n onFocusChange={({ focused }) => this.setState({ dateFocused: focused })}\n id=\"documentDate\"\n required\n block\n small\n isOutsideRange={isBeforeMinimum}\n />\n
    \n
    \n
    \n
    \n \n );\n }\n}\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage } from 'react-intl';\nimport ToastrService from '@/shared/services/ToastrService';\nimport intlShape from '@/shared/utils/intlShape';\nimport AutoComplete from '@/shared/components/input/select/AutoComplete';\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport messages from '../documentMessages';\n\nexport default class ChangeDocumentTypeModal extends Component {\n state = {\n documentType: undefined,\n };\n\n static propTypes = {\n show: PropTypes.bool.isRequired,\n intl: intlShape.isRequired,\n onSave: PropTypes.func.isRequired,\n onClose: PropTypes.func.isRequired,\n cannotBeChangedTo: PropTypes.arrayOf(PropTypes.number).isRequired,\n documentTypes: PropTypes.arrayOf({}).isRequired,\n };\n\n static defaultProps = {};\n\n onSave = () => {\n const { documentType } = this.state;\n const { onSave, intl } = this.props;\n if (!documentType) {\n ToastrService.error(intl.formatMessage(messages.InvalidType));\n return;\n }\n return onSave({ documentType });\n };\n\n closeModal = () => {\n const { onClose } = this.props;\n onClose();\n };\n\n render() {\n const { show, intl, cannotBeChangedTo, documentTypes } = this.props;\n const { documentType } = this.state;\n if (!show) return null;\n\n const canBeChangedToDocumentTypes = !cannotBeChangedTo\n ? []\n : documentTypes.filter(x => !cannotBeChangedTo.includes(x.id));\n\n const selectedDocumentType = documentTypes\n .map(x => ({ key: x.id, label: x.label }))\n .find(x => x.key === documentType);\n\n return (\n this.onSave()}\n >\n
    \n
    \n
    \n \n
    \n this.setState({ documentType: item?.id })}\n mode=\"edit\"\n value={selectedDocumentType}\n showAll\n required\n />\n
    \n
    \n
    \n
    \n \n );\n }\n}\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage } from 'react-intl';\n\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport Checkbox from '@/shared/components/input/Checkbox';\nimport intlShape from '@/shared/utils/intlShape';\nimport messages from '../documentMessages';\n\nexport default class SetIsPublicOnPortalModal extends Component {\n state = {\n setIsPublicOnPortal: false,\n };\n\n static propTypes = {\n show: PropTypes.bool.isRequired,\n intl: intlShape.isRequired,\n onSave: PropTypes.func.isRequired,\n onClose: PropTypes.func.isRequired,\n };\n\n static defaultProps = {};\n\n onSave = () => {\n const { setIsPublicOnPortal } = this.state;\n const { onSave } = this.props;\n\n return onSave({ setIsPublicOnPortal });\n };\n\n closeModal = () => {\n const { onClose } = this.props;\n onClose();\n };\n\n render() {\n const { show, intl } = this.props;\n const { setIsPublicOnPortal } = this.state;\n if (!show) return null;\n\n return (\n this.onSave()}\n >\n
    \n
    \n
    \n \n
    \n this.setState({ setIsPublicOnPortal: !setIsPublicOnPortal })}\n value={setIsPublicOnPortal}\n />\n
    \n
    \n
    \n
    \n \n );\n }\n}\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage } from 'react-intl';\nimport OkCancelModal from '../../shared/components/OkCancelModal';\nimport config from '../../config';\nimport api from '../../shared/api';\nimport messages from './documentMessages';\nimport ToastrService from '@/shared/services/ToastrService';\nimport Checkbox from '@/shared/components/input/Checkbox';\nimport handleHttpError from '@/shared/services/HandleHttpError';\n\nexport default class ProcessAuthorizationListModal extends Component {\n state = {\n createNewRelations: false,\n removeExpiredAuthorizations: false,\n };\n\n handleAuthorizationList = () => {\n const { createNewRelations, removeExpiredAuthorizations } = this.state;\n const { documentId, onSave, intl, stateService } = this.props;\n const model = {\n createNewRelations,\n removeExpiredAuthorizations,\n documentId,\n };\n return api.base\n .post(`${config.appUrls.api}/api/documentrecognition/HandleAuthorizationList`, model)\n .then(\n ({ data }) => {\n const onClick = data ? () => stateService.gotoJob(data.id) : undefined;\n ToastrService.info(\n intl.formatMessage(messages.ProcessAuthorizationListQueued),\n null,\n onClick,\n );\n onSave(data);\n },\n error => {\n handleHttpError(intl)(error);\n },\n );\n };\n\n render() {\n const { show, onClose, intl } = this.props;\n const { createNewRelations, removeExpiredAuthorizations } = this.state;\n\n return (\n this.handleAuthorizationList()}\n >\n
    \n
    \n
    \n
    \n \n this.setState({\n createNewRelations: value,\n })\n }\n />\n
    \n
    \n
    \n
    \n \n this.setState({\n removeExpiredAuthorizations: value,\n })\n }\n />\n
    \n
    \n
    \n
    \n \n );\n }\n}\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport OutsideClickHandler from 'react-outside-click-handler';\nimport momentPropTypes from 'react-moment-proptypes';\nimport moment from 'moment';\nimport nullable from '../../utils/nullable';\n\nconst parseValue = value => {\n if (value === null || value === undefined) return { day: null, month: 0 };\n if (value instanceof Date) return { day: value.getDate(), month: value.getMonth() };\n if (typeof value.day === 'number' && typeof value.month === 'number')\n return { day: value.day, month: value.month };\n if (value instanceof moment) return { day: value.date(), month: value.month() };\n\n return { day: null, month: 0 };\n};\nexport const displayDayMonth = (value, monthFormat = 'MMMM') => {\n const date = parseValue(value);\n\n return (\n \n {`${date.day}`}\n  \n {moment({ year: 2000, month: date.month, day: 1 }).format(monthFormat)}\n \n );\n};\nclass DayMonthPicker extends Component {\n constructor(props) {\n super(props);\n const { value } = props;\n const { day, month } = parseValue(value);\n this.state = {\n day,\n month,\n };\n }\n submitValue = (force = false) => {\n const { day, month } = this.state;\n const { outputType, onChange, value } = this.props;\n const oldValue = parseValue(value);\n if (Number.isNaN(day) || day === null) {\n if (force || value) onChange(null);\n return;\n }\n const daysInMonth = new Date(2000, month + 1, 0).getDate();\n const safeDay = Math.min(day, daysInMonth);\n\n if (!force) {\n if (oldValue.day === safeDay && oldValue.month === month) return;\n }\n\n if (outputType === 'object') onChange({ day: safeDay, month });\n else if (outputType === 'date') onChange(new Date(2000, month, safeDay));\n else if (outputType === 'moment') onChange(moment.utc({ year: 2000, month, day: safeDay }));\n };\n\n componentDidUpdate = ({ value: oldValue }) => {\n const { value: newValue } = this.props;\n\n const { oldDay, oldMonth } = parseValue(oldValue);\n const { newDay, newMonth } = parseValue(newValue);\n if (oldDay !== newDay || oldMonth !== newMonth) {\n this.setState({\n day: newDay,\n month: newMonth,\n });\n }\n };\n\n createMonthOptions = monthFormat => {\n const m = [];\n for (let i = 0; i < 12; i += 1)\n m.push(\n ,\n );\n\n return m;\n };\n\n handleOutsideClick = () => {\n const { onBlur } = this.props;\n this.submitValue();\n onBlur();\n };\n\n changeDay = e => {\n let day = parseInt(e.target.value, 10) || null;\n const { month } = this.state;\n if (day) {\n const daysInMonth = new Date(2000, month + 1, 0).getDate();\n day = Math.min(day, daysInMonth);\n }\n\n this.setState({ day }, () => {\n this.submitValue();\n });\n };\n changeMonth = e => {\n let { day } = this.state;\n const month = parseInt(e.target.value, 10) || 0;\n const daysInMonth = new Date(2000, month + 1, 0).getDate();\n day = Math.min(day || 1, daysInMonth);\n this.setState({ day, month }, () => {\n this.submitValue();\n });\n };\n\n render() {\n const { inputRef, onKeyDown, monthFormat, disabled } = this.props;\n const { day, month } = this.state;\n\n const daysInMonth = new Date(2000, month + 1, 0).getDate();\n\n return (\n \n
    \n \n {\n this.monthInput = e;\n }}\n name=\"month\"\n >\n {this.createMonthOptions(monthFormat)}\n \n
    \n
    \n );\n }\n}\n\nDayMonthPicker.propTypes = {\n value: nullable(\n PropTypes.oneOfType([\n PropTypes.instanceOf(Date),\n momentPropTypes.momentObj,\n PropTypes.shape({ day: PropTypes.number, month: PropTypes.number }),\n ]),\n ).isRequired,\n onChange: PropTypes.func.isRequired,\n onKeyDown: PropTypes.func,\n onBlur: PropTypes.func,\n inputRef: PropTypes.func,\n outputType: PropTypes.oneOf(['moment', 'date', 'object']),\n monthFormat: PropTypes.oneOf(['M', 'MM', 'MMM', 'MMMM']),\n disabled: PropTypes.bool,\n};\n\nDayMonthPicker.defaultProps = {\n outputType: 'date',\n onKeyDown: () => {},\n inputRef: () => {},\n onBlur: () => {},\n monthFormat: 'MMMM',\n disabled: false,\n};\n\nexport default DayMonthPicker;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport momentPropTypes from 'react-moment-proptypes';\n\nimport DayMonthPicker, { displayDayMonth } from '../input/DayMonthPicker';\nimport EditableToggle from './EditableToggle';\nimport nullable from '../../utils/nullable';\n\nconst EditableDayMonthPicker = ({\n onChange,\n value,\n submitOnBlur,\n readOnly,\n displayValue,\n required,\n ...rest\n}) => (\n \n {({ inputValue, setInputValue, inputRef, submit, cancel, handleKeyDown }) => (\n {\n // Submit or cancel when pressing the tab key on the month control or shift tab on the day control\n if (\n e.keyCode === 9 &&\n ((e.target.name === 'month' && !e.shiftKey) || (e.target.name === 'day' && e.shiftKey))\n ) {\n setTimeout(() => {\n if (submitOnBlur) submit();\n else cancel();\n }, 100);\n return;\n }\n handleKeyDown(e);\n }}\n inputRef={inputRef}\n {...rest}\n />\n )}\n \n);\n\nEditableDayMonthPicker.propTypes = {\n onChange: PropTypes.func.isRequired,\n value: nullable(\n PropTypes.oneOfType([\n PropTypes.instanceOf(Date),\n momentPropTypes.momentObj,\n PropTypes.shape({ day: PropTypes.number, month: PropTypes.number }),\n ]),\n ).isRequired,\n readOnly: PropTypes.bool,\n displayValue: PropTypes.node,\n submitOnBlur: PropTypes.bool,\n required: PropTypes.bool,\n};\nEditableDayMonthPicker.defaultProps = {\n readOnly: false,\n displayValue: null,\n submitOnBlur: true,\n required: false,\n};\n\nexport default EditableDayMonthPicker;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport EditableToggle from './EditableToggle';\nimport nullable from '../../utils/nullable';\n\nconst findDisplayOption = (id, options) => {\n if (id === null) return null;\n const option = options.find(o => o.id === id);\n return option ? option.label : null;\n};\n\nconst EditableSelect = ({\n onChange,\n value,\n submitOnBlur,\n submitOnChange,\n readOnly,\n displayValue,\n required,\n bindToId,\n options,\n placeholder,\n className,\n ...rest\n}) => (\n {\n if (bindToId || val === null) {\n onChange(val);\n } else {\n onChange(options.find(o => o.id === val));\n }\n }}\n value={bindToId ? value : value.id}\n readOnly={readOnly}\n required={required}\n displayValue={displayValue || findDisplayOption(value, options)}\n >\n {({ inputValue, handleChange, inputRef, submit, cancel, handleKeyDown }) => (\n {\n if (submitOnChange) {\n handleChange(e).then(submit);\n } else {\n handleChange(e);\n }\n }}\n ref={inputRef}\n onBlur={submitOnBlur ? submit : cancel}\n onKeyDown={handleKeyDown}\n {...rest}\n >\n {(!required || inputValue === null) && }\n {options.map(o => (\n \n ))}\n \n )}\n \n);\n\nEditableSelect.propTypes = {\n onChange: PropTypes.func.isRequired,\n value: nullable(\n PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.shape({ id: PropTypes.string.isRequired, label: PropTypes.node }),\n ]),\n ).isRequired,\n options: PropTypes.arrayOf(\n PropTypes.shape({ id: PropTypes.string.isRequired, label: PropTypes.node }),\n ).isRequired,\n readOnly: PropTypes.bool,\n displayValue: PropTypes.node,\n submitOnBlur: PropTypes.bool,\n submitOnChange: PropTypes.bool,\n bindToId: PropTypes.bool,\n required: PropTypes.bool,\n placeholder: PropTypes.node,\n className: PropTypes.string,\n};\nEditableSelect.defaultProps = {\n readOnly: false,\n displayValue: null,\n submitOnBlur: true,\n submitOnChange: true,\n bindToId: true,\n required: false,\n placeholder: null,\n className: '',\n};\n\nexport default EditableSelect;\n","import { defineMessages } from 'react-intl';\n\nconst messages = defineMessages({\n Name: 'Name',\n InvoiceScheduleType: 'Schedule type',\n RegistrationsUntil: 'Registrations until',\n MainTask: 'Main task',\n Subtask: 'Subtask',\n AdvanceOrSettlement: 'Advance/Settlement',\n Advance: 'Advance',\n Settlement: 'Settlement',\n Amount: 'Amount',\n InvoiceText: 'InvoiceText',\n InvoiceCreationDate: 'Invoice creation date',\n UnableToDeleteScheduleInUse: \"The schedule cannot be removed because it's in use\",\n Save: 'Save',\n Cancel: 'Cancel',\n CreateInvoiceSchedule: 'Create invoice schedule',\n EditInvoiceSchedule: 'Edit invoice schedule',\n InvoiceScheduleInUseWarning:\n 'This schedule is currently in use. Changes will be propageted to the relation schedules. All manual changes will be overriden.',\n days: 'days',\n Add: 'Add',\n AddLine: 'Add line',\n AddAdvanceLine: 'Add advance',\n AddSettlementLine: 'Add settlement',\n InvoiceSchedules: 'Invoice schedules',\n NoScheduleLines: 'No schedule lines, please add a line',\n IsTaskflowBilling: 'Taskflow billing?',\n HasTaskflowBilling: 'Has taskflow billing',\n\n InvoiceScheduleChangedInvoiceCreationDateWarning:\n 'We changed the invoice creation date to be one day after the registration until date',\n InvoiceScheduleChangedRegistrationsUntilWarning:\n 'We changed the registration until date to be one day before the invoice creation date',\n InvoiceScheduleChangesQueued:\n 'Invoice schedule saved. Invoice schedules on the customers using this schedule will be updated in the background.',\n InvoiceTextForExForfaitRegistrationInvoices: 'Invoice text for separate ex forfait invoices',\n InvoiceTextForSettlementInvoices: 'Invoice text for settlements',\n});\n\nexport default messages;\n","import api from '@/shared/api';\nimport PropTypes from 'prop-types';\nimport config from '@/config';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport { dynamicSortMultiple } from '@/shared/utils/dynamicSort';\nimport TranslateService from '@/shared/services/TranslateService';\n\nconst retrieveTranslations = (listName, listId, fallback) => {\n if (!listName) return Promise.reject(new Error('No list name provided'));\n if (!listId) return Promise.reject(new Error('No list id provided'));\n\n return api.base\n .get(`${config.appUrls.api}/api/translation/list/${listName}/${listId}`)\n .then(({ data = [] }) =>\n data\n .map(el => ({\n ...el,\n value: el.isTenantLanguage && !el.value ? fallback : el.value,\n orgValue: el.value,\n }))\n .sort(dynamicSortMultiple('-isTenantLanguage', 'language')),\n );\n};\n\nconst createTranslations = (listName, fallback = '') => {\n const dataCache = DataCacheService.getDataCache();\n if (!dataCache) return Promise.reject(new Error('Datacache not initialized'));\n return Promise.resolve(\n dataCache.language.sort(dynamicSortMultiple('-isDefault', 'code')).map(l => ({\n key: null,\n language: l.code,\n value: l.isDefault ? fallback || '' : '',\n orgValue: '',\n isTenantLanguage: l.isDefault,\n })),\n );\n};\n\nconst saveTranslations = translations => {\n const changes = translations\n .filter(el => el.orgValue !== el.value && !!el.key)\n .map(({ orgValue, ...el }) => ({ ...el })); // Remove orgValue from object\n if (!changes || !changes.length) {\n return Promise.resolve([]);\n }\n return api.base.put(`${config.appUrls.api}/api/translation/lists/0`, changes).then(() => {\n TranslateService.reload();\n\n return changes;\n });\n};\n\nconst updateKey = (translations, listName, listId) => {\n if (!translations || !listName || !listId) return translations;\n return translations.map(el => ({\n ...el,\n key: `${listName.toLowerCase()}_${listId.toLowerCase()}`,\n }));\n};\n\nconst validateTranslations = (translations, keyRequired = false) =>\n translations &&\n !translations.some(tr => {\n if (keyRequired && !tr.key) return true;\n if (tr.isTenantLanguage && !tr.value) return true;\n return false;\n });\n\nconst handleTranslationChanged = (translations, language, value) =>\n translations.map(tr => (tr.language !== language ? tr : { ...tr, value }));\n\nexport default {\n // Retrieve translations from backend\n retrieve: retrieveTranslations,\n // Create new translations, for new items that don't yet exist in the backend.\n // Use the setKey function between saving the items and saving the translations.\n create: createTranslations,\n // Saves changed translations to the backend\n save: saveTranslations,\n // Updates the translation key\n setKey: updateKey,\n // Validate translations, returns true if valid\n validate: validateTranslations,\n\n // Helper for updating the translations in the state\n handleTranslationChanged,\n // Translation shape to use in PropTypes\n translationShape: PropTypes.shape({\n language: PropTypes.string.isRequired,\n key: PropTypes.string,\n value: PropTypes.string,\n orgValue: PropTypes.string,\n isTenantLanguage: PropTypes.bool,\n }),\n};\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport classnames from 'classnames';\n\nimport translationHelper from './TranslationHelper';\n\nclass TranslateListItem extends React.PureComponent {\n translationChanged = evt => {\n const inputName = evt.target.name;\n if (!inputName) return;\n const language = inputName.replace('value_', '');\n if (!language) return;\n const value = evt.target.value || null;\n const { onChange, onDefaultChanged, translations } = this.props;\n\n onChange(translationHelper.handleTranslationChanged(translations, language, value));\n if (onDefaultChanged) {\n const translation = translations.find(x => x.language === language);\n if (translation && translation.isTenantLanguage) onDefaultChanged(value);\n }\n };\n\n getLabelFunction = () => {\n const { label } = this.props;\n if (typeof label === 'string' && label) {\n return tr => `${label} ${tr.language}`;\n }\n if (typeof label === 'function') {\n return tr => `${label(tr)}`;\n }\n return tr => tr.language;\n };\n\n render() {\n const {\n labelClass,\n label,\n inputClass,\n translations,\n disabled,\n showValidation,\n maxLength,\n } = this.props;\n const labelFunc = this.getLabelFunction();\n\n return (\n <>\n {translations &&\n translations.map(tr => {\n const inputLabel = labelFunc(tr);\n return (\n
    \n \n
    \n \n
    \n
    \n );\n })}\n \n );\n }\n}\n\nTranslateListItem.propTypes = {\n // The translations to edit, use the TranslationHelper to retrieve or create!\n translations: PropTypes.arrayOf(translationHelper.translationShape).isRequired,\n // (translations)=>{}\n onChange: PropTypes.func.isRequired,\n // (newValue)=>{}\n onDefaultChanged: PropTypes.func,\n // Change width of label\n labelClass: PropTypes.string,\n // If string, `${label} ${language}`\n // If func, (translation)=>{return 'string'};\n // If null, language\n label: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),\n // Change width of input\n inputClass: PropTypes.string,\n // Disable inputs (when saving)\n disabled: PropTypes.bool,\n // Show validation errors (hover save button)\n showValidation: PropTypes.bool,\n\n maxLength: PropTypes.number,\n};\nTranslateListItem.defaultProps = {\n labelClass: 'col-md-3',\n label: '',\n inputClass: 'col-md-6',\n disabled: false,\n showValidation: false,\n onDefaultChanged: null,\n maxLength: undefined,\n};\n\nexport default TranslateListItem;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport Modal from 'react-bootstrap/lib/Modal';\nimport { FormattedMessage, injectIntl, useIntl } from 'react-intl';\nimport moment from 'moment';\nimport classnames from 'classnames';\n\nimport intlShape from '@/shared/utils/intlShape';\nimport { FaTrashAlt, FaUndo, FaCalendarAlt, FaClipboardList } from 'react-icons/fa';\n\nimport FormattedListValue, { listItemMsg } from '@/shared/components/FormattedListValue';\nimport FormattedDayMonth from '@/shared/components/FormattedDayMonth';\nimport EditableDayMonthPicker from '@/shared/components/editable/EditableDayMonthPicker';\nimport nullable from '@/shared/utils/nullable';\nimport Button from '@/shared/components/Button';\nimport { dynamicSort, dynamicSortMultiple } from '@/shared/utils/dynamicSort';\nimport EditableSelect from '../../../shared/components/editable/EditableSelect';\nimport messages from './invoiceScheduleMessages';\n\nimport api from '../../../shared/api';\nimport config from '../../../config';\nimport ToastrService from '../../../shared/services/ToastrService';\nimport handleHttpError from '../../../shared/services/HandleHttpError';\n\nimport TranslateListItem from '../../../shared/components/translations/TranslateListItem';\nimport translationHelper from '../../../shared/components/translations/TranslationHelper';\nimport guid from '@/shared/utils/guid';\nimport HasFeature from '@/shared/components/security/HasFeature';\nimport authService, { features } from '@/shared/services/AuthService';\nimport Checkbox from '@/shared/components/input/Checkbox';\n\nconst lineSort = dynamicSortMultiple('date', 'isFixed');\nconst getInvoiceTextType = (invoicingType, fixed) => {\n switch (invoicingType) {\n case 0:\n return 3;\n case 1:\n return 0;\n case 2:\n return fixed ? 1 : 2;\n default:\n return -1;\n }\n};\nconst getDisplayValueForInvoiceText = (line, data, invoiceTexts, intl) => {\n if (line.invoiceTextId) return undefined;\n const invoiceTextId =\n data.invoicingType === 2 && !line.fixed ? data.altInvoiceTextId : data.invoiceTextId;\n\n if (!invoiceTextId) return undefined;\n const text = invoiceTexts.find(x => x.id === invoiceTextId);\n if (!text) return undefined;\n return (\n \n {intl.formatMessage(listItemMsg('invoicetext', text.id, text.name))}\n \n );\n};\n\nexport const calcEndOfMonth = date =>\n moment(date)\n .startOf('month')\n .add(1, 'month')\n .add(-1, 'day');\n\nclass InvoiceScheduleModal extends Component {\n state = {\n data: null,\n saving: false,\n showValidation: false,\n taskTemplates: [],\n };\n\n componentDidUpdate(prevProps) {\n const { schedule: newSchedule } = this.props;\n\n if (JSON.stringify(prevProps.schedule) !== JSON.stringify(newSchedule)) {\n // eslint-disable-next-line react/no-did-update-set-state\n this.setState({\n saving: false,\n data: newSchedule\n ? {\n invoicingType: 0,\n name: '',\n inUse: false,\n ...newSchedule,\n lines: (newSchedule.lines || []).sort(lineSort),\n }\n : null,\n translations: null,\n showValidation: false,\n });\n if (newSchedule && !newSchedule.id) {\n translationHelper.create('invoiceSchedule').then(translations => {\n this.setState({ translations });\n });\n }\n }\n }\n retrieveTaskTemplates = () => {\n const { intl } = this.props;\n\n return api.base.get(`${config.appUrls.tasks}/api/TaskTemplates/Templates`).then(({ data }) => {\n const translatedTemplates = data\n .map(t => ({\n ...t,\n label: intl.formatMessage(listItemMsg('taskTemplate', t.id, t.name)),\n children: (t.children || [])\n .map(s => ({\n ...s,\n label: intl.formatMessage(listItemMsg('taskTemplate', s.id, s.name)),\n }))\n .sort(dynamicSort('priority')),\n }))\n .filter(t => t.children.length > 0)\n .sort(dynamicSort('label'));\n\n this.setState({\n taskTemplates: translatedTemplates,\n });\n });\n };\n\n componentDidMount() {\n this.hasTaskflowBilling = authService.hasFeature(features.TaskflowBilling);\n if (this.hasTaskflowBilling) {\n this.retrieveTaskTemplates();\n }\n }\n\n updateData = value => {\n this.setState(state => ({\n data: { ...state.data, ...value },\n }));\n };\n\n calcNextDate = prop => {\n const { data } = this.state;\n if (!data || !data.lines || !data.lines.length) return null;\n if (data.lines.length === 1)\n return moment(data.lines[0][prop])\n .add(1, 'month')\n .year(2000);\n\n const line1 = moment(data.lines[data.lines.length - 2][prop]);\n const line2 = moment(data.lines[data.lines.length - 1][prop]);\n\n if (line1.isAfter(line2)) {\n line1.add(-1, 'year');\n }\n\n const line1Eom = calcEndOfMonth(line1);\n const line2Eom = calcEndOfMonth(line2);\n\n const diffMonths = line2\n .clone()\n .startOf('month')\n .diff(line1.clone().startOf('month'), 'month');\n\n if (line1.isSame(line1Eom) && line2.isSame(line2Eom)) {\n return calcEndOfMonth(line2.clone().add(diffMonths, 'month')).year(2000);\n }\n\n if (line1.date() === line2.date()) {\n return line2\n .clone()\n .add(diffMonths, 'month')\n .year(2000);\n }\n\n const eomDiff = line2.diff(line2Eom, 'days');\n if (line1.diff(line1Eom, 'days') === eomDiff) {\n return calcEndOfMonth(\n line2\n .clone()\n .startOf('month')\n .add(diffMonths, 'month'),\n )\n .add(eomDiff, 'days')\n .year(2000);\n }\n\n const diffDays = line2.diff(line1, 'days');\n return line2\n .clone()\n .add(diffDays, 'days')\n .year(2000);\n };\n\n addLine = line => {\n const id = Math.random()\n .toString()\n .replace('0.', '');\n const {\n data: { invoicingType },\n } = this.state;\n\n const nextInvoiceDate =\n this.calcNextDate('invoiceCreationDate') || moment.utc({ year: 2000, month: 0, day: 1 });\n\n this.setState(state => {\n const [lastLine] = state.data.lines?.slice(-1);\n\n return {\n data: {\n ...state.data,\n lines: [\n ...state.data.lines,\n {\n id,\n isNew: true,\n registrationsUntil:\n invoicingType === 2 && line.fixed\n ? nextInvoiceDate\n .clone()\n .add(-1, 'days')\n .year(2000)\n : this.calcNextDate('registrationsUntil') ||\n moment.utc({ year: 2000, month: 11, day: 31 }),\n invoiceCreationDate: nextInvoiceDate,\n invoiceTextId: null,\n mainTaskTemplateId: lastLine?.mainTaskTemplateId,\n subtaskTemplateId: lastLine?.subtaskTemplateId,\n ...line,\n },\n ].sort(lineSort),\n },\n };\n });\n };\n\n updateLine = (line, value, recursive = false) => {\n const errors = this.validateLine({ ...line, ...value });\n const { intl } = this.props;\n if (!errors.isValid) {\n if (\n errors.registrationsUntil ===\n 'registrationsUntil must be lower than the invoiceCreationDate'\n ) {\n if (\n !recursive &&\n value.registrationsUntil &&\n value.registrationsUntil !== line.registrationsUntil\n ) {\n ToastrService.info(\n intl.formatMessage(messages.InvoiceScheduleChangedInvoiceCreationDateWarning),\n );\n\n return this.updateLine(\n line,\n {\n ...value,\n invoiceCreationDate: value.registrationsUntil\n .clone()\n .add(1, 'days')\n .year(2000),\n },\n true,\n );\n }\n if (\n !recursive &&\n value.invoiceCreationDate &&\n value.invoiceCreationDate !== line.invoiceCreationDate\n ) {\n ToastrService.info(\n intl.formatMessage(messages.InvoiceScheduleChangedRegistrationsUntilWarning),\n );\n return this.updateLine(\n line,\n {\n ...value,\n registrationsUntil: value.invoiceCreationDate\n .clone()\n .add(-1, 'days')\n .year(2000),\n },\n true,\n );\n }\n ToastrService.error(\n intl.formatMessage({\n id: `exceptioncode_2052`,\n defaultMessage: errors.registrationsUntil,\n }),\n );\n return Promise.reject();\n }\n //return Promise.reject();\n }\n\n this.setState(state => ({\n data: {\n ...state.data,\n lines: state.data.lines\n .map(l => {\n if (l.id === line.id) {\n if (value.invoiceCreationDate && state.data.invoicingType === 2 && l.fixed) {\n return {\n ...l,\n ...value,\n registrationsUntil: value.invoiceCreationDate\n .clone()\n .add(-1, 'days')\n .year(2000),\n };\n }\n return { ...l, ...value };\n }\n return l;\n })\n .sort(lineSort),\n },\n }));\n };\n removeLine = line => {\n if (line.isNew) {\n this.setState(state => ({\n data: {\n ...state.data,\n lines: state.data.lines.filter(l => l.id !== line.id),\n },\n }));\n } else {\n this.updateLine(line, { isRemoved: true });\n }\n };\n save = () => {\n const { onClose, intl } = this.props;\n const { saving, data, translations } = this.state;\n\n if (saving || !data || !this.validate().isValid) return Promise.reject();\n\n const endpoint = `${config.appUrls.api}/api/InvoiceSchedule`;\n const action = data.id ? api.base.put : api.base.post;\n\n const model = {\n ...data,\n lines: data.lines.map(({ id, isNew, ...rest }) => {\n const mapped = {\n ...rest,\n };\n // only bind id if it's not null, otherwise our API endpoint cant bind the model..\n if (!isNew) {\n mapped.id = id;\n }\n return mapped;\n }),\n };\n\n return new Promise((resolve, reject) => {\n this.setState({ saving: true }, () => {\n action(endpoint, model)\n .then(({ data: result }) => {\n if (!model.id && result.id) {\n // Create request is finished, save translations before handling the result\n return translationHelper\n .save(translationHelper.setKey(translations, 'invoiceSchedule', result.id))\n .then(() => result); // Return the original result (not the translation result)\n }\n // No need to save translations, pass result to next handler\n return result;\n })\n .then(result => {\n if (model.inUse) {\n ToastrService.info(intl.formatMessage(messages.InvoiceScheduleChangesQueued));\n } else {\n ToastrService.changesSaved(intl);\n }\n\n this.setState({\n saving: false,\n });\n onClose(result);\n resolve();\n })\n .catch(handleHttpError(intl))\n .catch(error => {\n this.setState({\n saving: false,\n });\n reject(error);\n });\n });\n });\n };\n validate = () => {\n const { data, translations } = this.state;\n const result = {\n isValid: true,\n lines: {},\n };\n if (!data) return result;\n if (!data.name) {\n result.name = 'Name is required';\n result.isValid = false;\n }\n if (translations && !translationHelper.validate(translations)) {\n result.isValid = false;\n result.translations = 'Translations validation error';\n }\n\n if (!data.lines || !data.lines.length) {\n result.isValid = false;\n } else {\n data.lines.forEach(line => {\n const { isValid, ...lineErrors } = this.validateLine(line);\n if (!isValid) {\n result.lines[line.id] = lineErrors;\n result.isValid = false;\n }\n });\n }\n\n return result;\n };\n\n validateLine = line => {\n let result = { isValid: true };\n if (line.mainTaskTemplateId) {\n if (line.mainTaskTemplateId === guid.empty) {\n result = {\n ...result,\n isValid: false,\n mainTaskTemplateId: 'MainTask is required',\n };\n }\n if (!line.subtaskTemplateId || line.subtaskTemplateId === guid.empty) {\n result = {\n ...result,\n isValid: false,\n subtaskTemplateId: 'Subtask is required',\n };\n }\n } else {\n if (!line.invoiceCreationDate) {\n result = {\n ...result,\n isValid: false,\n invoiceCreationDate: 'invoiceCreationDate is required',\n };\n }\n if (!line.registrationsUntil) {\n result = {\n ...result,\n isValid: false,\n registrationsUntil: 'registrationsUntil is required',\n };\n }\n if (\n line.invoiceCreationDate &&\n line.registrationsUntil &&\n line.invoiceCreationDate.isBefore(line.registrationsUntil) &&\n moment(line.registrationsUntil)\n .add(-6, 'months')\n .isBefore(line.invoiceCreationDate)\n ) {\n result = {\n ...result,\n isValid: false,\n registrationsUntil: 'registrationsUntil must be lower than the invoiceCreationDate',\n };\n }\n }\n return result;\n };\n\n getSubTasks = mainTaskTemplateId => {\n const { taskTemplates } = this.state;\n if (!mainTaskTemplateId || mainTaskTemplateId === guid.empty || !taskTemplates) return [];\n const taskTemplate = taskTemplates.find(x => x.id === mainTaskTemplateId);\n return taskTemplate?.children ?? [];\n };\n\n showValidation = () => {\n const { showValidation } = this.state;\n if (!showValidation) this.setState({ showValidation: true });\n };\n\n updateTranslations = translations => this.setState({ translations });\n changeName = name => this.updateData({ name });\n\n render() {\n const { onClose, intl, invoiceTexts } = this.props;\n const { data, saving, showValidation, translations, taskTemplates } = this.state;\n const show = !!data;\n const isNew = !data || !data.id;\n const errors = this.validate();\n if (!errors.isValid && process.env.NODE_ENV !== 'production') console.warn(errors);\n\n const invoiceTextOptions =\n invoiceTexts &&\n invoiceTexts.reduce((dic, t) => {\n if (!dic[t.type]) dic[t.type] = []; // eslint-disable-line no-param-reassign\n dic[t.type].push({\n id: t.id,\n label: intl.formatMessage(listItemMsg('invoicetext', t.id, t.name)),\n });\n return dic;\n }, {});\n\n const [normalLines, taskflowLines] = (data?.lines || []).reduce(\n (a, x) => {\n a[x.mainTaskTemplateId ? 1 : 0].push(x);\n return a;\n },\n [[], []],\n );\n return (\n onClose(null)}\n keyboard={false}\n bsSize=\"large\"\n >\n \n \n {isNew ? (\n \n ) : (\n \n )}\n \n \n \n {show && (\n
    \n {translations && isNew && (\n \n )}\n {!isNew && (\n
    \n \n
    \n
    \n \n
    \n
    \n
    \n )}\n\n
    \n \n
    \n {isNew && data.lines.length === 0 ? (\n \n this.updateData({ invoicingType: parseInt(e.target.value, 10) })\n }\n >\n \n \n \n \n ) : (\n
    \n \n
    \n )}\n
    \n
    \n
    \n \n
    \n this.updateData({ invoiceTextId: e.target.value || null })}\n >\n \n ),\n )}\n \n
    \n
    \n {data.invoicingType === 1 || data.invoicingType === 2 ? (\n
    \n \n
    \n this.updateData({ altInvoiceTextId: e.target.value || null })}\n >\n \n ))}\n \n
    \n
    \n ) : null}\n\n {!isNew && data.inUse && (\n
    \n \n
    \n )}\n
    \n\n {normalLines.length > 0 && (\n \n \n \n {this.hasTaskflowBilling ? (\n \n ) : null}\n \n \n\n {data.invoicingType === 2 && (\n \n )}\n \n \n \n \n {normalLines.map(line => (\n \n {this.hasTaskflowBilling ? (\n \n ) : null}\n \n {!line.mainTaskTemplateId && (\n this.updateLine(line, { registrationsUntil: date })}\n displayValue={\n !!line.registrationsUntil && (\n \n )\n }\n />\n )}\n \n \n {!line.mainTaskTemplateId && (\n \n this.updateLine(line, { invoiceCreationDate: date })\n }\n required\n displayValue={\n !!line.invoiceCreationDate && (\n \n )\n }\n />\n )}\n \n {data.invoicingType === 2 && (\n \n )}\n\n \n \n \n ))}\n {showValidation && data.lines && !data.lines.length && (\n \n \n \n )}\n \n
    \n \n \n \n \n \n \n \n \n \n \n
    \n \n this.updateLine(line, {\n mainTaskTemplateId: guid.empty,\n subtaskTemplateId: null,\n })\n }\n disabled={saving}\n />\n \n {line.fixed ? (\n \n ) : (\n \n )}\n \n this.updateLine(line, { invoiceTextId })}\n options={\n invoiceTextOptions[\n getInvoiceTextType(data.invoicingType, line.fixed)\n ] || []\n }\n bindToId\n displayValue={getDisplayValueForInvoiceText(\n line,\n data,\n invoiceTexts,\n intl,\n )}\n />\n \n {line.isRemoved ? (\n this.updateLine(line, { isRemoved: false })}>\n \n \n ) : (\n this.removeLine(line)}>\n \n \n )}\n
    \n \n
    \n )}\n {taskflowLines.length > 0 && (\n \n \n \n \n \n \n\n {data.invoicingType === 2 && (\n \n )}\n \n \n \n \n {taskflowLines.map(line => {\n const subTasks = this.getSubTasks(line.mainTaskTemplateId);\n return (\n \n \n \n \n {data.invoicingType === 2 && (\n \n )}\n\n \n \n \n );\n })}\n {showValidation && data.lines && !data.lines.length && (\n \n \n \n )}\n \n
    \n \n \n \n \n \n \n \n \n \n \n
    \n \n this.updateLine(line, {\n mainTaskTemplateId: null,\n subtaskTemplateId: null,\n })\n }\n disabled={saving}\n />\n \n \n this.updateLine(line, {\n mainTaskTemplateId: e.target.value || guid.empty,\n subtaskTemplateId: null,\n })\n }\n disabled={saving}\n className={classnames({\n markedError:\n showValidation && errors.lines[line.id]?.mainTaskTemplateId,\n })}\n required\n >\n {!line.mainTaskTemplateId ||\n line.mainTaskTemplateId === guid.empty ? (\n \n ) : null}\n {taskTemplates.map(t => (\n \n ))}\n \n \n {!!line.mainTaskTemplateId && line.mainTaskTemplateId !== guid.empty && (\n \n this.updateLine(line, {\n subtaskTemplateId: e.target.value || guid.empty,\n })\n }\n className={classnames({\n markedError:\n showValidation && errors.lines[line.id]?.subtaskTemplateId,\n })}\n disabled={saving}\n required\n >\n {!line.subtaskTemplateId ||\n line.subtaskTemplateId === guid.empty ? (\n \n ) : null}\n {subTasks.map(t => (\n \n ))}\n \n )}\n \n {line.fixed ? (\n \n ) : (\n \n )}\n \n this.updateLine(line, { invoiceTextId })}\n options={\n invoiceTextOptions[\n getInvoiceTextType(data.invoicingType, line.fixed)\n ] || []\n }\n bindToId\n displayValue={getDisplayValueForInvoiceText(\n line,\n data,\n invoiceTexts,\n intl,\n )}\n />\n \n {line.isRemoved ? (\n this.updateLine(line, { isRemoved: false })}>\n \n \n ) : (\n this.removeLine(line)}>\n \n \n )}\n
    \n \n
    \n )}\n
    \n )}\n
    \n \n {data && data.invoicingType === 0 && (\n this.addLine({ fixed: false })}\n >\n \n \n )}\n {data && data.invoicingType === 1 && (\n this.addLine({ fixed: true })}\n >\n \n \n )}\n {data && data.invoicingType === 2 && (\n \n this.addLine({ fixed: true })}\n btnClassName=\"btn-inverse\"\n >\n \n \n this.addLine({ fixed: false })}\n btnClassName=\"btn-inverse\"\n >\n \n \n \n )}\n\n \n this.save()}\n disabled={showValidation && !errors.isValid}\n onFocus={this.showValidation}\n onMouseOver={this.showValidation}\n btnClassName=\"btn-inverse\"\n showProgress\n >\n {intl.formatMessage(messages.Save)}\n \n \n \n );\n }\n}\n\nInvoiceScheduleModal.propTypes = {\n schedule: nullable(PropTypes.shape({})).isRequired,\n onClose: PropTypes.func.isRequired,\n intl: intlShape.isRequired,\n invoiceTexts: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n};\n\nexport default injectIntl(InvoiceScheduleModal);\n","import React, { Component } from 'react';\nimport ToastrService from '@/shared/services/ToastrService';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport { calcEndOfMonth } from '@/modules/settings/InvoiceSchedules/InvoiceScheduleModal';\nimport DatePicker from '@/shared/components/input/DatePicker';\nimport { falseFunc } from '@/shared/utils/validationHelpers';\nimport messages from './documentMessages';\nimport api from '../../shared/api';\nimport config from '../../config';\nimport OkCancelModal from '../../shared/components/OkCancelModal';\n\nexport default class ProcessRegistrationListModal extends Component {\n state = {\n referenceDate: calcEndOfMonth(new Date()),\n };\n\n handleRegistrationList = () => {\n const { referenceDate } = this.state;\n const { documentId, onSave, intl, stateService } = this.props;\n const model = {\n referenceDate,\n documentId,\n };\n\n return api.base\n .post(`${config.appUrls.api}/api/documentrecognition/HandleRegistrationList`, model)\n .then(\n ({ data }) => {\n const onClick = data ? () => stateService.gotoJob(data.id) : undefined;\n ToastrService.info(\n intl.formatMessage(messages.ProcessRegistrationListQueued),\n null,\n onClick,\n );\n onSave(data);\n },\n error => {\n handleHttpError(intl)(error);\n },\n );\n };\n\n render() {\n const { show, onClose, intl } = this.props;\n const { referenceDate, referenceDateFocused } = this.state;\n\n return (\n this.handleRegistrationList()}\n >\n
    \n
    \n
    \n \n
    \n this.setState({ referenceDateFocused: focused })}\n date={referenceDate}\n id=\"referenceDate\"\n block\n small\n isOutsideRange={falseFunc}\n onDateChange={referenceDate => this.setState({ referenceDate })}\n />\n
    \n
    \n
    \n
    \n \n );\n }\n}\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage } from 'react-intl';\nimport OkCancelModal from '../../shared/components/OkCancelModal';\nimport messages from './documentMessages';\nimport RelationSearch from '@/shared/components/input/RelationSearch';\nimport authService from '@/shared/services/AuthService';\n\nexport default class LinkRelationDocumentModal extends Component {\n state = {\n selectedRelation: undefined,\n };\n\n relationChanged(relation) {\n if (!relation) return;\n\n this.setState(state => ({\n ...state,\n selectedRelation: relation.key,\n }));\n }\n\n linkDocumentToRelation() {\n const { selectedRelation } = this.state;\n const { onSave, document } = this.props;\n\n if (!selectedRelation) return; // TOdO add error\n\n const relationDocument = {\n ...document,\n documentId: document.id,\n relationId: selectedRelation,\n };\n\n return onSave(relationDocument);\n }\n\n render() {\n const { show, onClose, document, onSave, intl } = this.props;\n const { selectedRelation } = this.state;\n const disabled = !authService.hasPermission({ functionality: 'Documents', privilege: 'Update' });\n\n return (\n this.linkDocumentToRelation()}\n >\n {show && (\n
    \n

    \n \n

    \n\n this.relationChanged(relation)} />\n
    \n )}\n \n );\n }\n}\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport Checkbox from '@/shared/components/input/Checkbox';\nimport intlShape from '@/shared/utils/intlShape';\nimport messages from '../documentMessages';\n\nexport default class DownloadDocumentZipModal extends Component {\n state = {\n useFolderStructure: true,\n prefixFilenameWithDocumentDate: false,\n };\n\n static propTypes = {\n show: PropTypes.bool.isRequired,\n intl: intlShape.isRequired,\n onSave: PropTypes.func.isRequired,\n onClose: PropTypes.func.isRequired,\n };\n\n static defaultProps = {};\n\n onSave = () => {\n const { useFolderStructure, prefixFilenameWithDocumentDate } = this.state;\n const { onSave } = this.props;\n\n return onSave({ useFolderStructure, prefixFilenameWithDocumentDate });\n };\n\n closeModal = () => {\n const { onClose } = this.props;\n onClose();\n };\n\n render() {\n const { show, intl } = this.props;\n const { useFolderStructure, prefixFilenameWithDocumentDate } = this.state;\n if (!show) return null;\n\n return (\n this.onSave()}\n >\n
    \n
    \n
    \n
    \n this.setState({ useFolderStructure: !useFolderStructure })}\n text={intl.formatMessage(messages.DownloadZipWithFolderStructureYesNo)}\n value={useFolderStructure}\n />\n
    \n
    \n
    \n
    \n \n this.setState({\n prefixFilenameWithDocumentDate: !prefixFilenameWithDocumentDate,\n })\n }\n text={intl.formatMessage(messages.PrefixFilenameWithDocumentDate)}\n value={prefixFilenameWithDocumentDate}\n />\n
    \n
    \n
    \n
    \n \n );\n }\n}\n","import React, { Component } from 'react';\nimport Modal from 'react-bootstrap/lib/Modal';\nimport { defineMessages, FormattedMessage, injectIntl } from 'react-intl';\nimport PropTypes from 'prop-types';\nimport intlShape from '@/shared/utils/intlShape';\nimport Button from '@/shared/components/Button';\nimport classNames from 'classnames';\nimport debounce from 'lodash-es/debounce';\nimport api from '@/shared/api';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport AutoComplete from '@/shared/components/input/select/AutoComplete';\nimport enumCache from '@/shared/services/EnumCacheService';\nimport { isBeforeMinimum, validateMinimumDate } from '@/shared/utils/validationHelpers';\nimport DatePicker from '@/shared/components/input/DatePicker';\nimport Tag from '@/shared/components/Tag';\nimport RelationListPicker from '@/shared/components/input/RelationListPicker';\nimport FileUpload from '@/shared/components/input/FileUpload';\nimport DocumentService from '@/shared/services/DocumentService';\nimport config from '../../../config';\n\nconst messages = defineMessages({\n DocumentDateLabel: 'Document date',\n\n StartTypingToSearch: 'Start typing to search',\n Success: 'Success',\n Tags: 'Tags',\n EnterTag: 'Enter tag',\n Relation: 'Relation',\n Relations: 'Relations',\n AddRelation: 'Add relation',\n RemoveRelation: 'Remove relation',\n DocumentType: 'Document type',\n Status: 'Status',\n Signature: 'Signature',\n AdvancedUpload: 'Advanced upload',\n Close: 'Close',\n});\n\nclass AdvancedUploadModal extends Component {\n static propTypes = {\n onSave: PropTypes.func.isRequired,\n onClose: PropTypes.func.isRequired,\n intl: intlShape.isRequired,\n };\n\n constructor(props) {\n super(props);\n\n this.state = {\n newTag: '',\n tags: [],\n availableTags: [],\n relations: [],\n documentTypes: [],\n showValidation: false,\n touched: false,\n };\n }\n\n componentDidMount() {\n this.initializeModal();\n }\n\n initializeModal = () => {\n const { intl } = this.props;\n const documentTypesPromise = enumCache.getTranslated('documentType', intl);\n const tagsPromise = api.base.get(`${config.appUrls.documents}/api/Tag`);\n\n const forbiddenDocumentTypesPromise = DocumentService.getForbiddenDocumentTypes();\n\n Promise.all([tagsPromise, documentTypesPromise, forbiddenDocumentTypesPromise]).then(\n ([{ data }, documentTypes, forbiddenTypes]) => {\n this.setState({\n availableTags: data,\n documentTypes: documentTypes.filter(x => !forbiddenTypes.includes(x.id)),\n });\n },\n );\n };\n\n addTagToDocument = tagName => {\n if (!tagName) return;\n const { tags } = this.state;\n const currentDocumentTagNames = tags.map(x => x.name);\n\n if (currentDocumentTagNames.includes(tagName)) return;\n\n this.findOrCreateTag(tagName).then(tag => {\n this.setState({\n tags: [...tags, tag],\n touched: true,\n });\n });\n };\n\n onRemoveTag = tag => {\n const { tags } = this.state;\n\n this.setState({\n tags: tags.filter(x => x.id !== tag.id),\n touched: true,\n });\n };\n\n findOrCreateTag = tagName =>\n new Promise((resolve, reject) => {\n const { availableTags } = this.state;\n const tag = availableTags.find(t => t.name.toLowerCase() === tagName.toLowerCase());\n if (tag) {\n resolve(tag);\n } else {\n api.base.post(`${config.appUrls.documents}/api/Tag`, { name: tagName }).then(({ data }) => {\n this.setState(\n state => ({\n availableTags: [...state.tags, data],\n }),\n () => resolve(data),\n );\n }, reject);\n }\n });\n\n addRelation = relation => {\n if (relation && relation.id) {\n this.setState(state => ({\n relations: [...state.relations.filter(x => x.id !== relation.id), relation],\n touched: true,\n }));\n }\n };\n\n removeRelation = relation => {\n if (relation && relation.id) {\n this.setState(state => ({\n relations: state.relations.filter(x => x.id !== relation.id),\n touched: true,\n }));\n }\n };\n\n // debounce makes sure that if this method is called again within 300 ms, only the last call is executed.\n // this method adds the tag automatically to the document when it is found in the list of tags\n // this is needed because if there are two tags: test and test2, and the user starts typing, test2 will never be able\n // to be added to the document because the value that was entered will me immediately processed and found\n debouncedFindAndAddTag = debounce(value => {\n const { availableTags } = this.state;\n if (value && availableTags.find(x => x.name === value)) {\n this.addTagToDocument(value);\n this.setState({ newTag: '' });\n }\n }, 400);\n\n onTagValueChanged = value => {\n this.setState({ newTag: value, touched: true });\n this.debouncedFindAndAddTag(value);\n };\n\n selectedDocumentTypeChanged = item => {\n this.setState({\n documentType: item,\n touched: true,\n });\n };\n\n showValidation = () => {\n this.setState({ showValidation: true });\n };\n\n isFormInvalid = () => {\n const { documentDate } = this.state;\n if (!documentDate) return true;\n if (!validateMinimumDate(documentDate)) return true;\n\n return false;\n };\n\n render() {\n const { onClose, intl } = this.props;\n const {\n documentDate,\n dateFocused,\n availableTags,\n newTag,\n documentType,\n documentTypes,\n showValidation,\n signingStatus,\n relations,\n tags,\n touched,\n } = this.state;\n\n let documentUploadEndpoint = `${config.appUrls.documents}/api/documents`; // -1 = document type unknown, used for recognizing\n\n const desiredDocumentType = documentType ? documentType.id : -1;\n documentUploadEndpoint += `?documentType=${desiredDocumentType}&source=300`;\n\n if (signingStatus) {\n documentUploadEndpoint += `&signingStatus=${signingStatus.id}`;\n }\n\n if (documentDate) {\n documentUploadEndpoint += `&documentDate=${documentDate.format('YYYY-MM-DD')}`;\n }\n if (tags && tags.length > 0) {\n documentUploadEndpoint += `&tags=${tags.map(x => x.id).join(';')}`;\n }\n\n if (relations && relations.length > 0) {\n if (desiredDocumentType !== -1) {\n // set document as processed if its not gonna be recognized\n documentUploadEndpoint += `&recognitionStatus=4`;\n }\n\n documentUploadEndpoint += `&${relations\n .map(x => x.id)\n .map((n, index) => `relationIds[${index}]=${n}`)\n .join('&')}`;\n }\n\n const signingStatuses = [1, 2, 10, 20].map(x => ({\n id: x,\n label: intl.formatMessage(listItemMsg('signingStatus', x)),\n }));\n\n return (\n \n \n \n \n \n \n \n {\n
    \n
    \n
    \n
    \n \n \n
    \n \n this.setState({ documentDate: value, touched: true })\n }\n focused={dateFocused}\n disabled={false}\n onFocusChange={({ focused }) => this.setState({ dateFocused: focused })}\n id=\"documentDate\"\n required\n block\n small\n isOutsideRange={isBeforeMinimum}\n />\n
    \n
    \n\n
    \n \n
    \n this.selectedDocumentTypeChanged(item)}\n mode=\"edit\"\n value={documentType}\n showAll\n required\n />\n
    \n
    \n\n
    \n \n
    \n this.setState({ touched: true, signingStatus: item })}\n mode=\"edit\"\n value={signingStatus}\n showAll\n />\n {/*\n {\n const status = e.target.value;\n this.setState({ signingStatus: status, touched: true });\n }}\n value={signingStatus}\n >\n \n \n \n \n */}\n
    \n
    \n\n
    \n \n
    \n \n
    \n
    \n\n
    \n \n
    \n
    0 })}>\n this.onTagValueChanged(e.target.value.replace(';', ''))}\n list=\"tags\"\n autoComplete=\"off\"\n onKeyDown={e => {\n if (e.keyCode === 13) {\n this.addTagToDocument(newTag);\n this.setState({ newTag: '' });\n } else if (e.keyCode === 27) {\n this.setState({ newTag: '' });\n }\n }}\n />\n
    \n
    \n {tags &&\n tags.map(item => (\n \n ))}\n
    \n
    \n
    \n\n {touched && (\n
    \n
    \n
    \n \n
    \n
    \n
    \n )}\n
    \n \n
    \n \n {availableTags && availableTags.map(t => \n \n }\n
    \n \n \n \n
    \n );\n }\n}\n\nexport default injectIntl(AdvancedUploadModal);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage } from 'react-intl';\n\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport intlShape from '@/shared/utils/intlShape';\nimport messages from '../documentMessages';\n\nexport default class SelectRelationModal extends Component {\n state = {\n selectedRelation: undefined,\n };\n\n static propTypes = {\n show: PropTypes.bool.isRequired,\n intl: intlShape.isRequired,\n onSave: PropTypes.func.isRequired,\n onClose: PropTypes.func.isRequired,\n relations: PropTypes.arrayOf({}).isRequired,\n };\n\n static defaultProps = {};\n\n componentDidMount() {\n const { relations } = this.props;\n this.setState({ selectedRelation: relations[0] });\n }\n\n onSave = () => {\n const { selectedRelation } = this.state;\n const { onSave } = this.props;\n\n return onSave(selectedRelation);\n };\n\n closeModal = () => {\n const { onClose } = this.props;\n onClose();\n };\n\n render() {\n const { show, intl, relations } = this.props;\n const { selectedRelation } = this.state;\n if (!show) return null;\n\n return (\n \n
    \n
    \n
    \n \n
    \n \n this.setState({\n selectedRelation: relations.find(x => x.id === e.target.value),\n })\n }\n >\n {relations.map(x => (\n \n ))}\n \n
    \n
    \n
    \n
    \n \n );\n }\n}\n","import React, { useState, useEffect } from 'react';\nimport Axios from 'axios';\nimport config from '@/config';\nimport api from '@/shared/api';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport ToastrService from '@/shared/services/ToastrService';\nimport { useIntl } from 'react-intl';\nimport moment from 'moment';\nimport DocumentDetailsModal from './details/DocumentDetailsModal';\nimport messages from './documentMessages';\n\nconst ForcedRelationMode = ({ onDocumentSaved }) => {\n const [documents, setDocuments] = useState([]);\n const intl = useIntl();\n\n useEffect(() => {\n let abort = false;\n const cancelToken = Axios.CancelToken.source();\n const isRelationRequired =\n DataCacheService.getDefaultCompany()?.forceLinkingDocumentsToRelation ?? false;\n\n if (!isRelationRequired) return;\n\n const date = DataCacheService.getDefaultCompany()?.forceLinkingDocumentsToRelationFromDate;\n const formattedDate = date ? moment(date).format('YYYY-MM-DD') : null;\n\n api.base\n .get(`${config.appUrls.documents}/api/documents/Unlinked`, {\n params: {\n date: formattedDate,\n },\n cancelToken: cancelToken.token,\n })\n .then(({ data }) => {\n if (abort || !data) return;\n setDocuments(data || []);\n });\n\n return () => {\n abort = true;\n\n cancelToken.cancel('Operation canceled due to new request.');\n };\n }, []);\n\n const removeDocumentFromList = document => {\n setDocuments(documents.filter(x => x !== document.id));\n onDocumentSaved(document);\n };\n const cancel = () => {\n ToastrService.info(intl.formatMessage(messages.ForcedRelationModeCancelledMessage));\n setDocuments([]);\n };\n\n if (documents.length === 0) return null;\n\n const activeDocument = documents[0];\n return (\n
    \n removeDocumentFromList(document)}\n onClose={() => cancel()}\n forceRelationMode\n />\n
    \n );\n};\n\nexport default ForcedRelationMode;\n","import React, { useState, useEffect } from 'react';\nimport Axios from 'axios';\nimport config from '@/config';\nimport api from '@/shared/api';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport ToastrService from '@/shared/services/ToastrService';\nimport { useIntl } from 'react-intl';\nimport moment from 'moment';\nimport DocumentDetailsModal from './details/DocumentDetailsModal';\nimport messages from './documentMessages';\n\nconst CheckoutReminderMode = ({ onDocumentSaved }) => {\n const [documents, setDocuments] = useState([]);\n const intl = useIntl();\n\n useEffect(() => {\n let abort = false;\n const cancelToken = Axios.CancelToken.source();\n var shouldShowReminders =\n DataCacheService.getDefaultCompany()?.shouldShowCheckoutReminders ?? false;\n if (!shouldShowReminders) return;\n\n api.base\n .get(`${config.appUrls.documents}/api/documents/checkedout`, {\n params: {},\n cancelToken: cancelToken.token,\n })\n .then(({ data }) => {\n if (abort || !data) return;\n setDocuments(data || []);\n });\n\n return () => {\n abort = true;\n\n cancelToken.cancel('Operation canceled due to new request.');\n };\n }, []);\n\n const removeDocumentFromList = document => {\n setDocuments(documents.filter(x => x !== document.id));\n onDocumentSaved(document);\n };\n const cancel = () => {\n ToastrService.info(intl.formatMessage(messages.CheckedOutDocumentsReminderMessage));\n setDocuments([]);\n };\n\n if (documents.length === 0) return null;\n\n const activeDocument = documents[0];\n return (\n
    \n removeDocumentFromList(document)}\n onClose={() => cancel()}\n checkedoutReminderMode={true}\n />\n
    \n );\n};\n\nexport default CheckoutReminderMode;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport Axios from 'axios';\nimport log from 'loglevel';\nimport authService, { privileges } from '@/shared/services/AuthService';\nimport moment from 'moment';\nimport { FormattedMessage, injectIntl } from 'react-intl';\nimport { FaCog, FaInfoCircle } from 'react-icons/fa';\nimport OverlayTrigger from 'react-bootstrap/lib/OverlayTrigger';\nimport Popover from 'react-bootstrap/lib/Popover';\nimport intlShape from '@/shared/utils/intlShape';\nimport { EyeIcon, ListIcon } from '@/shared/components/Icons';\nimport Button from '@/shared/components/Button';\nimport ForwardEmailModal from '@/shared/components/email/ForwardEmailModal';\nimport DocumentService from '@/shared/services/DocumentService';\nimport enumCache from '@/shared/services/EnumCacheService';\n\nimport api from '@/shared/api';\nimport ToastrService from '@/shared/services/ToastrService';\nimport ScrollableTable from '@/shared/components/table/ScrollableTable';\nimport ColumnHeader from '@/shared/components/table/ColumnHeader';\nimport SimplePanel from '@/shared/components/SimplePanel';\nimport { CanCreate, showWhenPermission } from '@/shared/components/security';\nimport SignalRService from '@/shared/services/SignalRService';\nimport DocumentTreeView from '@/shared/components/DocumentTreeView';\nimport withDropZone from '@/shared/components/dragAndDrop/withDropzone';\nimport { injectStateService } from '@/shared/services/StateService';\nimport ZendeskHelp from '@/shared/components/ZendeskHelp';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport Checkbox from '@/shared/components/input/Checkbox';\nimport YesNoModal from '@/shared/components/YesNoModal';\nimport SingleRelationMailModal from '@/shared/components/email/SingleRelationMailModal';\nimport userStorage from '@/shared/services/userStorage';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport { hasMultipleCompanies } from '@/shared/components/security/HasMultiCompany';\nimport ShareItemModal from '@/shared/components/ShareItemModal';\nimport CheckboxListModal from '@/shared/components/CheckboxListModal';\nimport {\n handleHiddenColumnsSelection,\n initHiddenColumnsState,\n} from '@/shared/utils/hiddenColumnsHelper';\nimport DocumentSignatureRequestModal from '@/shared/components/DocumentSignatureRequestModal';\nimport SharepointModal from '@/modules/documents/modals/SharepointModal';\nimport { ExtractZipModal } from '@/modules/documents/modals/ExtractZipModal';\nimport LinkFromSharepointModal from '@/modules/documents/modals/LinkFromSharepointModal';\nimport CollapsableSidebar from '@/shared/components/CollapsableSidebar';\nimport { getRelationName } from '@/shared/components/RelationName';\nimport CreateToDoModal from '../tasks/CreateToDoModal';\nimport UpdateDocumentRelationsModal from './modals/UpdateDocumentRelationsModal';\nimport UpdateDocumentTagsModal from './modals/UpdateDocumentTagsModal';\nimport DocumentGlobalActionsButton from './DocumentGlobalActionsButton';\nimport DocumentFilters, { defaultFilters } from './DocumentFilters';\nimport LoadingAnimation from '../../shared/components/LoadingAnimation';\nimport { containsDragFormat } from '../../shared/utils/dragEventHelpers';\nimport DocumentDetailsModal from './details/DocumentDetailsModal';\nimport Dropzone from './Dropzone';\nimport DocumentRow from './DocumentRow';\nimport messages from './documentMessages';\nimport ChangeDocumentDateModal from './modals/ChangeDocumentDateModal';\nimport ChangeDocumentTypeModal from './modals/ChangeDocumentTypeModal';\nimport SetIsPublicOnPortalModal from './modals/SetIsPublicOnPortalModal';\nimport ProcessAuthorizationListModal from './ProcessAuthorizationListModal';\nimport ProcessRegistrationListModal from './ProcessRegistrationListModal';\nimport LinkRelationDocumentModal from './LinkRelationDocumentModal';\nimport config from '../../config';\nimport DownloadDocumentZipModal from './modals/DownloadDocumentZipModal';\nimport AdvancedUploadModal from './details/AdvancedUploadModal';\nimport SelectRelationModal from './modals/SelectRelationModal';\nimport ForcedRelationMode from './ForcedRelationMode';\nimport AuthService from '@/shared/services/AuthService';\nimport CheckoutReminderMode from './CheckoutReminderMode';\nimport { actions } from '@/shared/components/registration/registrationHelpers';\n\nconst columnSelectionStorageKey = 'DocumentOverviewHiddenColumns';\nconst columnDefinitions = [\n { id: 'documentType', message: messages.Type, visibleByDefault: true },\n { id: 'relation', message: messages.Relation, visibleByDefault: true },\n { id: 'recognitionStatus', message: messages.Status, visibleByDefault: true },\n { id: 'documentDate', message: messages.DocumentDate, visibleByDefault: true },\n { id: 'creationDate', message: messages.CreationDate, visibleByDefault: true },\n { id: 'createdBy', message: messages.CreatedBy, visibleByDefault: false },\n];\n\nconst tagsToString = tags => (tags ? tags.sort().join(';') : null);\n\nclass DocumentsContainer extends Component {\n state = {\n documents: [],\n showPickRelationModal: false,\n showDocumentDetailsModal: false,\n showProcessAuthorizationListModal: false,\n showProcessYukiRegistrationListModal: false,\n initialSearchParams: {},\n treeviewReady: false,\n allSelected: false,\n showUpdateTagsModal: false,\n showUpdateRelationsModal: false,\n showRemoveBatchDocumentsModal: false,\n showDownloadZipModal: false,\n showCreateTodoModal: false,\n showSetPublicOnPortalModal: false,\n showChangeDocumentDateModal: false,\n showChangeDocumentTypeModal: false,\n showColumnSelectionModal: false,\n showMoveToSharepointModal: false,\n showLinkFromSharepointModal: false,\n showExtractZipModal: false,\n actionsInProgress: false,\n };\n\n constructor(props) {\n super(props);\n const {\n searchParams: { mainFilters: searchParamsFilters = {}, ...otherSearchParams } = {},\n intl,\n documentId,\n } = props;\n\n let mainFilters = { ...defaultFilters };\n if (searchParamsFilters && Object.keys(searchParamsFilters).length) {\n mainFilters = { ...mainFilters, ...searchParamsFilters };\n } else {\n const storageFilters = userStorage.getItem('DocumentsOverviewFilters') || {};\n\n if (storageFilters.dateFrom) {\n storageFilters.dateFrom = moment.utc(storageFilters.dateFrom);\n }\n if (storageFilters.dateUntil) {\n storageFilters.dateUntil = moment.utc(storageFilters.dateUntil);\n }\n mainFilters = { ...mainFilters, ...storageFilters };\n }\n\n const hiddenColumnsState = initHiddenColumnsState(\n columnSelectionStorageKey,\n columnDefinitions,\n intl,\n );\n\n this.state = {\n ...this.state,\n ...hiddenColumnsState,\n initialSearchParams: {\n sortKey: mainFilters?.sort ?? 'creationDate',\n desc: mainFilters?.desc ?? true,\n pageSize: 50,\n mainFilters,\n ...otherSearchParams,\n },\n };\n\n if (documentId) {\n this.state.showDocumentDetailsModal = true;\n this.state.activeDocument = { id: documentId };\n }\n\n this.availableActions = [\n {\n actionType: 0,\n action: 'marksigned',\n label: intl.formatMessage(messages.MarkAsSigned),\n msgSuccess: intl.formatMessage(messages.MsgMarkSignedLetterSuccess),\n msgError: intl.formatMessage(messages.MsgMarkSignedLetterError),\n func: document => this.handleRecognizedDocumentAction(0, document),\n },\n {\n actionType: 1,\n action: 'createrelation',\n label: intl.formatMessage(messages.CreateRelation),\n msgSuccess: intl.formatMessage(messages.MsgCreateRelationSuccess),\n msgError: intl.formatMessage(messages.MsgCreateRelationError),\n func: document => this.handleRecognizedDocumentAction(1, document),\n },\n {\n actionType: 2,\n action: 'updaterelation',\n label: intl.formatMessage(messages.UpdateRelation),\n msgSuccess: intl.formatMessage(messages.MsgUpdateRelationSuccess),\n msgError: intl.formatMessage(messages.MsgUpdateRelationError),\n func: document => this.handleRecognizedDocumentAction(2, document),\n },\n {\n actionType: 3,\n action: 'link',\n label: intl.formatMessage(messages.LinkToRelation),\n msgSuccess: intl.formatMessage(messages.MsgLinkRelationDocumentSuccess),\n msgError: intl.formatMessage(messages.MsgLinkRelationDocumentError),\n func: document => this.openLinkRelationModal(document),\n },\n {\n actionType: 4,\n action: 'open',\n label: intl.formatMessage(messages.Open),\n func: document =>\n this.setState({ showDocumentDetailsModal: true, activeDocument: document }),\n icon: ,\n },\n {\n actionType: 6,\n action: 'showall',\n label: intl.formatMessage(messages.ShowAllDocumentsForRelation),\n func: document => this.filterDocumentsByRelation(document.relations[0]),\n icon: ,\n },\n {\n actionType: 7,\n action: 'updateauthorizations',\n label: intl.formatMessage(messages.UpdateAuthorizations),\n func: document => this.openProcessAuthorizationListModal(document),\n },\n {\n actionType: 8,\n action: 'importregistrationlist',\n label: intl.formatMessage(messages.Importregistrationlist),\n func: document => this.importRegistrationListHandler(document),\n disabled: document => document.recognitionStatus === 3,\n },\n {\n actionType: 9,\n action: 'extractZip',\n label: intl.formatMessage(messages.ExtractZip),\n func: document => this.handleExtractZip(document),\n disabled: document => document.recognitionStatus === 3,\n },\n {\n actionType: 10,\n action: 'createrelationfromrelationimportmodel',\n label: intl.formatMessage(messages.CreateRelation),\n msgSuccess: intl.formatMessage(messages.MsgCreateRelationSuccess),\n msgError: intl.formatMessage(messages.MsgCreateRelationError),\n func: document => this.handleRecognizedDocumentAction(10, document),\n },\n ];\n\n this.availableActions = this.availableActions.map(action => {\n if (!action.disabled) {\n // eslint-disable-next-line no-param-reassign\n action.disabled = () => false;\n }\n return action;\n });\n\n this.handleExtractZipAction = this.handleExtractZipAction.bind(this);\n }\n\n static propTypes = {\n intl: intlShape.isRequired,\n searchParams: PropTypes.shape({}),\n };\n\n static defaultProps = {\n searchParams: {},\n };\n\n documentUpdateHandler = (document, showToastrMessages) => {\n // use 500ms delay because the signalr event of the document recognition might be faster than\n // the setState method that adds a new document to the documents state collection\n // if this happens, the document's properties are not updated because it is not yet found in the state collection\n // -> upload doc -> add doc to state (takes 200 ms) -> simultaneous signalr event of document -> document not found in state\n setTimeout(this.onDocumentUpdated(document, showToastrMessages), 500);\n };\n\n documentsUpdateHandler = documents => {\n if (documents && documents.length) {\n documents.map(document => this.documentUpdateHandler(document, false));\n }\n };\n documentDeleteHandler = documentId => {\n this.setState(({ documents }) => ({\n documents: documents.filter(document => document.id !== documentId),\n }));\n };\n\n documentMovedToSharePointHandler = documentId => {\n const { intl } = this.props;\n ToastrService.success(intl.formatMessage(messages.SharePointFileMovedInBackground));\n\n this.setState(({ documents }) => ({\n documents: documents.map(x => (x.id === documentId ? { ...x, storageType: 1 } : x)),\n }));\n };\n\n documentCheckedoutHandler = documentEditLink => {\n const { intl } = this.props;\n ToastrService.success(intl.formatMessage(messages.CheckedOutSuccesfull));\n this.setState({ actionsInProgress: false });\n window.open(documentEditLink);\n };\n\n documentCheckedinHandler = (documentId) => {\n const { intl } = this.props;\n const { documents } = this.state;\n const document = documents.find(x => x.id === documentId);\n this.setState({ actionsInProgress: false });\n this.updateDocumentInState({ ...document, checkedOutByUserId: null });\n };\n\n documentDiscardCheckoutHandler = documentId => {\n const { intl } = this.props;\n ToastrService.success(intl.formatMessage(messages.MsgDiscardCheckoutDocumentSuccess));\n this.setState({ actionsInProgress: false });\n };\n\n async componentDidMount() {\n const { intl } = this.props;\n SignalRService.subscribe('documentUpdated', this.documentUpdateHandler);\n SignalRService.subscribe('documentsUpdated', this.documentsUpdateHandler);\n SignalRService.subscribe('documentDeleted', this.documentDeleteHandler);\n SignalRService.subscribe('moveToSharePointFinished', this.documentMovedToSharePointHandler);\n SignalRService.subscribe('checkoutFinished', this.documentCheckedoutHandler);\n SignalRService.subscribe('checkinSuccesful', this.documentCheckedinHandler);\n SignalRService.subscribe('checkoutDiscarded', this.documentDiscardCheckoutHandler);\n\n const documentTypes = await enumCache.getTranslated('documentType', intl, false);\n this.setState({ documentTypes });\n }\n\n componentWillUnmount() {\n SignalRService.unsubscribe('documentUpdated', this.documentUpdateHandler);\n SignalRService.unsubscribe('documentsUpdated', this.documentsUpdateHandler);\n SignalRService.unsubscribe('documentDeleted', this.documentDeleteHandler);\n SignalRService.unsubscribe('moveToSharePointFinished', this.documentMovedToSharePointHandler);\n SignalRService.unsubscribe('checkoutFinished', this.documentCheckedoutHandler);\n SignalRService.unsubscribe('checkinSuccesful', this.documentCheckedinHandler);\n SignalRService.unsubscribe('checkoutDiscarded', this.documentDiscardCheckoutHandler);\n\n if (typeof this.cancelToken !== 'undefined') {\n this.cancelToken.cancel('Operation canceled due to leaving page.');\n }\n }\n\n onDocumentUploaded = (error, document, meta) => {\n const { intl } = this.props;\n const { initialSearchParams, documents } = this.state;\n if (error) {\n log.error(error);\n\n if (error.body) {\n const translatedError = {\n type: 'documentdomainexceptioncode',\n code: error.body,\n };\n\n handleHttpError(intl)(translatedError);\n } else if (error.code) {\n handleHttpError(intl)(error);\n }\n\n return;\n }\n\n // the list might already contain the documnt, if the signalr message was faster than this response\n const alreadyContainsDocument = documents.some(x => x.id === document.id);\n if (alreadyContainsDocument) return;\n\n const { params: metaParams } = meta || {};\n if (initialSearchParams.tags && metaParams && metaParams.tags !== initialSearchParams.tags)\n return;\n // if (\n // initialSearchParams.mainFilters &&\n // initialSearchParams.mainFilters.relationId &&\n // initialSearchParams.mainFilters.relationId !== (document.relationId || null)\n // )\n // return;\n this.setState(state => ({\n ...state,\n documents: [document, ...state.documents],\n }));\n };\n\n onUploadDocument = ({ files, node }) => {\n const canCreate = authService.hasPermission({\n functionality: 'documents',\n privilege: privileges.Create,\n });\n if (!canCreate) return;\n\n const { pond } = this;\n const { initialSearchParams } = this.state;\n if (!pond) return;\n const params = { tags: node ? tagsToString(node.tags) : null };\n\n if (initialSearchParams) {\n if (!params.tags && initialSearchParams.tags) {\n params.tags = initialSearchParams.tags;\n }\n if (initialSearchParams.mainFilters && initialSearchParams.mainFilters.relationId) {\n params.linkId = initialSearchParams.mainFilters.relationId;\n params.documentLinkType = 3;\n }\n }\n\n const filePondFiles = files.map(x => ({\n source: x,\n options: {\n metadata: { params },\n },\n }));\n\n pond.addFiles(filePondFiles);\n };\n\n deleteDocument(id) {\n const { documents } = this.state;\n const { intl } = this.props;\n\n return api.base.delete(`${config.appUrls.documents}/api/documents/${id}`).then(\n () => {\n ToastrService.success(intl.formatMessage(messages.MsgDeleteDocumentSuccess));\n this.setState(state => {\n const closeDetailModal = state.showDocumentDetailsModal && state.activeDocument.id === id;\n\n return {\n documents: documents.filter(document => document.id !== id),\n activeDocument: closeDetailModal ? null : state.activeDocument,\n showDocumentDetailsModal: closeDetailModal ? false : state.showDocumentDetailsModal,\n showSingleDeleteDocumentModal: false,\n };\n });\n },\n error => {\n console.error(error);\n if (error.response && error.response.data && error.response.data.code) {\n handleHttpError(intl)(error);\n } else {\n ToastrService.error(intl.formatMessage(messages.MsgDeleteDocumentError));\n }\n log.error('error deleting document ', error);\n },\n );\n }\n\n checkinDocument(document) {\n const { intl } = this.props;\n this.setState({ actionsInProgress: true });\n DocumentService.checkin(document.id).then(() => {\n this.setState({ showDiscardCheckoutModal: false })\n },\n error => {\n console.error(error);\n if (error.response && error.response.data && error.response.data.code) {\n handleHttpError(intl)(error);\n }\n this.setState({ showDiscardCheckoutModal: false });\n log.error('error checking in document ', error);\n },\n );\n }\n\n checkoutDocument = (document, openinApp) => {\n if (!document || !document.canEdit) return;\n const { intl } = this.props;\n this.setState({ actionsInProgress: true });\n DocumentService.checkout(document.id, openinApp).then((data) => {\n if (!!data) {\n this.setState({ actionsInProgress: false });\n this.updateDocumentInState({ ...document, checkedOutByUserId: AuthService.getUserId(), checkedOutDocumentLink: data });\n }\n },\n error => {\n console.error(error);\n if (error.response && error.response.data && error.response.data.code) {\n handleHttpError(intl)(error);\n } else {\n ToastrService.error(intl.formatMessage(messages.MsgCheckoutDocumentSuccess));\n }\n log.error('error checking out document ', error);\n this.setState({ actionsInProgress: false });\n },\n );\n };\n\n discardCheckout = (document) => {\n const { intl } = this.props;\n DocumentService.discardCheckout(document.id).then(() => {\n this.updateDocumentInState({ ...document, checkedOutByUserId: null });\n this.setState({ showDiscardCheckoutModal: false })\n },\n error => {\n console.error(error);\n if (error.response && error.response.data && error.response.data.code) {\n handleHttpError(intl)(error);\n }\n this.setState({ showDiscardCheckoutModal: false, actionsInProgress: false });\n log.error('error checking in document ', error);\n },\n );\n }\n\n loadRecognitionMeta = document => {\n if (typeof document.recognitionMeta !== 'undefined')\n return Promise.resolve(document.recognitionMeta);\n return api.base\n .get(`${config.appUrls.documents}/api/documents/RecognitionMeta/${document.id}`)\n .then(({ data }) => {\n this.onDocumentUpdated({\n ...document,\n recognitionMeta: data || {},\n });\n\n return data || {};\n });\n };\n\n handleExtractZip(document) {\n this.setState(state => ({\n ...this.state,\n activeDocument: document,\n showExtractZipModal: true,\n }));\n }\n\n async handleExtractZipAction(action) {\n await this.handleRecognizedDocumentAction(9, this.state.activeDocument, action);\n this.setState(state => ({\n ...this.state,\n activeDocument: undefined,\n showExtractZipModal: false,\n }));\n }\n\n handleRecognizedDocumentAction(action, document, jsonData = null) {\n this.onDocumentUpdated({\n ...document,\n saving: true,\n });\n\n let json = null;\n if (jsonData) {\n if (typeof jsonData === 'string') json = jsonData;\n if (typeof jsonData === 'object') json = JSON.stringify(jsonData);\n }\n\n return api.base\n .post(`${config.appUrls.api}/api/documentrecognition/HandleDocumentAction`, {\n action,\n documentId: document.id,\n json,\n })\n .then(\n ({ data }) => {\n if (!data) return;\n ToastrService.success(\n this.availableActions.find(x => x.actionType === action).msgSuccess,\n );\n this.onDocumentUpdated({\n ...data,\n saving: false,\n });\n },\n error => {\n log.error(error);\n let message = this.availableActions.find(x => x.actionType === action).msgError;\n const err = error.response.data;\n if (typeof err === 'object' && err.code > 0) {\n // TODO: Show actual message for code\n message += ` (${err.code})`;\n }\n ToastrService.error(message);\n\n this.onDocumentUpdated({\n ...document,\n saving: false,\n });\n },\n );\n }\n\n importRegistrationListHandler(document) {\n const handleRegistrationList = documentId => {\n const { intl, stateService } = this.props;\n const model = { documentId };\n\n return api.base\n .post(`${config.appUrls.api}/api/documentrecognition/HandleRegistrationList`, model)\n .then(\n ({ data }) => {\n const onClick = data ? () => stateService.gotoJob(data.id) : undefined;\n ToastrService.info(\n intl.formatMessage(messages.ProcessRegistrationListQueued),\n null,\n onClick,\n );\n },\n error => {\n handleHttpError(intl)(error);\n },\n );\n };\n\n this.loadRecognitionMeta(document).then(meta => {\n if (!meta || meta.registrationListType === 0) {\n // 'Normal' registration list, no need to ask for a reference date\n handleRegistrationList(document.id);\n } else {\n // 'Yuki' registration import requiring asking for a reference date\n this.setState(state => ({\n ...state,\n activeDocument: document,\n showProcessYukiRegistrationListModal: true,\n }));\n }\n });\n }\n\n openLinkRelationModal(document) {\n this.setState(state => ({\n ...state,\n activeDocument: document,\n showPickRelationModal: true,\n }));\n }\n\n openProcessAuthorizationListModal(document) {\n this.setState(state => ({\n ...state,\n activeDocument: document,\n showProcessAuthorizationListModal: true,\n }));\n }\n\n filtersChanged(filters) {\n this.setState(state => ({\n ...state,\n initialSearchParams: {\n ...state.initialSearchParams,\n page: 0,\n mainFilters: { ...state.initialSearchParams.mainFilters, ...filters },\n },\n }));\n }\n\n filterDocumentsByRelation(relation) {\n this.setState(state => ({\n ...state,\n initialSearchParams: {\n mainFilters: {\n ...state.initialSearchParams.mainFilters,\n relationId: relation.id,\n relationName: relation.name,\n },\n page: 0,\n },\n }));\n }\n\n filterDocumentsByTags = (tags, force) => {\n this.setState(state => ({\n ...state,\n initialSearchParams: {\n ...state.initialSearchParams,\n tags: tagsToString(tags),\n page: 0,\n f: force ? new Date().getTime() : undefined,\n },\n }));\n };\n\n loadDocuments = (\n { tags, desc, sortKey: sort, page, pageSize: take, mainFilters = {} },\n requestNr,\n ) => {\n if (typeof this.cancelToken !== 'undefined') {\n this.cancelToken.cancel('Operation canceled due to new request.');\n }\n this.cancelToken = Axios.CancelToken.source();\n this.lastRequestNr = requestNr;\n\n const { relationId = null, ...rest } = mainFilters;\n\n const params = {\n ...rest,\n desc,\n sort,\n page,\n take,\n tags,\n };\n\n if (relationId) {\n params.linkId = relationId;\n params.linkType = 3; // link type 3 = relation\n }\n\n const storageFilters = { ...mainFilters, sort, desc };\n\n userStorage.setItem('DocumentsOverviewFilters', storageFilters);\n\n return api.base\n .post(`${config.appUrls.documents}/api/documents/GetAll`, params, {\n cancelToken: this.cancelToken.token,\n })\n .then(({ data }) => {\n if (this.lastRequestNr !== requestNr) return;\n const { allSelected } = this.state;\n const newDocuments = data.documents.map(e => ({ ...e, selected: !!allSelected }));\n\n this.setState(state => ({\n ...state,\n cannotBeChangedTo: data.cannotBeChangedTo,\n documents: page > 0 ? [...state.documents, ...newDocuments] : [...newDocuments],\n currentSearchParams: {\n mainFilters,\n ...params,\n },\n }));\n\n return data.documents;\n })\n .catch(error => {\n if (!Axios.isCancel(error)) {\n if (page <= 0 && this.lastRequestNr === requestNr) {\n this.setState({ documents: [] });\n }\n return error;\n }\n });\n };\n\n getPreviousDocumentId = documentId => {\n const { documents } = this.state;\n\n if (!documents) return;\n\n const currentIndex = documents.map(x => x.id).findIndex(x => x === documentId);\n\n // No previous doc present\n if (currentIndex <= 0) return;\n\n const previousIndex = currentIndex - 1;\n if (previousIndex < documents.length) {\n return documents[previousIndex].id;\n }\n };\n\n getNextDocument = documentId => {\n const { documents } = this.state;\n if (!documents) return null;\n const currentIndex = documents.map(x => x.id).findIndex(x => x === documentId);\n const nextIndex = currentIndex + 1;\n if (nextIndex < documents.length) {\n return documents[nextIndex];\n }\n return null;\n };\n getNextDocumentId = documentId =>\n new Promise((resolve, reject) => {\n const nextDocument = this.getNextDocument(documentId);\n if (nextDocument) {\n return resolve(nextDocument.id);\n }\n\n // Need to retrieve next page\n const { currentSearchParams } = this.state;\n\n const params = {\n ...currentSearchParams,\n page: currentSearchParams.page + 1,\n };\n\n api.base.post(`${config.appUrls.documents}/api/documents/GetAll`, params).then(({ data }) => {\n const { documents: newDocuments } = data;\n if (!newDocuments || newDocuments.length === 0) {\n return reject();\n }\n\n this.setState(\n ({ documents }) => ({\n documents: params.page > 0 ? [...documents, ...newDocuments] : [...data],\n currentSearchParams: params,\n }),\n () => {\n const nextDocument2 = this.getNextDocument(documentId);\n if (nextDocument2) {\n resolve(nextDocument2.id);\n } else {\n reject();\n }\n },\n );\n }, reject);\n });\n\n getDocumentAction = document => {\n const actionForDocument = {\n suggestedAction: {\n func: documentToOpen =>\n this.setState({ showDocumentDetailsModal: true, activeDocument: documentToOpen }),\n label: 'Open',\n },\n otherActions: [],\n };\n // PROCESSED: default action is to download, others are delete & filter on relation if relation is present\n if (document.recognitionStatus === 4 || document.recognitionStatus === 0) {\n actionForDocument.suggestedAction = this.availableActions.find(x => x.action === 'open');\n\n // If the document has a relation, show action to filter all documents by relation\n if (document.relations && document.relations.length) {\n if (document.relations.length === 1)\n actionForDocument.otherActions.push(\n this.availableActions.find(x => x.action === 'showall'),\n );\n } else if (document.documentType !== 14) {\n // 14 = template\n // If document is not linked to relation and it's not a system document, user can delete it\n actionForDocument.otherActions.push(this.availableActions.find(x => x.action === 'link'));\n }\n }\n // RECOGNIZED: default is calculated in backend, other = delete\n if (document.recognitionStatus === 2 || document.recognitionStatus === 3) {\n actionForDocument.suggestedAction = this.availableActions.find(x => x.action === 'link');\n // TODO hardcode actions\n if (document.documentType === 10 || document.documentType === 87) {\n // EID\n if (document.relations && document.relations.length === 1) {\n actionForDocument.suggestedAction = this.availableActions.find(\n x => x.action === 'updaterelation',\n );\n } else if (!document.relations || document.relations.length === 0) {\n actionForDocument.suggestedAction = this.availableActions.find(\n x => x.action === 'createrelation',\n );\n }\n }\n if (document.hasRelationImportModel && document.documentType === 36) {\n // KBO Extract\n if (!document.relations || document.relations.length <= 1) {\n actionForDocument.suggestedAction = this.availableActions.find(\n x => x.action === 'createrelationfromrelationimportmodel',\n );\n }\n }\n if (document.documentType === 19) {\n actionForDocument.suggestedAction = this.availableActions.find(\n x => x.action === 'updateauthorizations',\n );\n }\n if (document.documentType === 124) {\n actionForDocument.suggestedAction = this.availableActions.find(\n x => x.action === 'extractZip',\n );\n }\n if (document.documentType === 1000) {\n actionForDocument.suggestedAction = this.availableActions.find(\n x => x.action === 'importregistrationlist',\n );\n }\n if (\n [11, 12, 24, 25, 26, 27, 29, 32].indexOf(document.documentType) >= 0 &&\n document.relations.length === 1\n ) {\n actionForDocument.suggestedAction = this.availableActions.find(\n x => x.action === 'marksigned',\n );\n }\n // User can download/delete it\n actionForDocument.otherActions = this.availableActions.filter(\n x => x.action === 'open' || x.action === 'delete',\n );\n if (document.relations && document.relations.length === 1) {\n actionForDocument.otherActions.push(\n this.availableActions.find(x => x.action === 'showall'),\n );\n }\n }\n\n // NOT RECOGNIZED:\n if (document.recognitionStatus === 5) {\n // if its not linked to relation yet, default is to link\n if (!document.relations || !document.relations.length) {\n actionForDocument.suggestedAction = this.availableActions.find(x => x.action === 'link');\n actionForDocument.otherActions = this.availableActions.filter(\n x => x.action === 'open' || x.action === 'delete',\n );\n } else {\n actionForDocument.suggestedAction = this.availableActions.find(x => x.action === 'open');\n actionForDocument.otherActions = this.availableActions.filter(\n x => x.action === 'delete' || (document.relations.length === 1 && x.action === 'showall'),\n );\n }\n }\n\n return actionForDocument;\n };\n\n onSendViaEmail = async (activeDocument, asPdf, activeRelation) => {\n const { intl } = this.props;\n if (!activeRelation) {\n if (activeDocument.relations.length === 0) {\n ToastrService.error(intl.formatMessage(messages.NotLinkedToARelation));\n return;\n }\n if (activeDocument.relations.length === 1) {\n [activeRelation] = activeDocument.relations;\n } else {\n this.setState({\n activeDocument,\n asPdf,\n showSelectRelationModal: true,\n activeRelations: activeDocument.relations,\n });\n return;\n }\n }\n\n const attachment = asPdf\n ? await DocumentService.convertAndSaveToPdf(activeDocument.id)\n : activeDocument;\n\n if (!attachment) {\n ToastrService.error(intl.formatMessage(messages.DocumentCouldNotBeConverted));\n return;\n }\n\n this.setState({\n showSendByEmailModal: true,\n selectedRelationId: activeRelation.id,\n selectedCompanyId: activeRelation.companyId,\n selectedDocuments: [attachment],\n });\n };\n\n linkDocumentToRelation = relationDocument => {\n const { relationId, documentId } = relationDocument;\n return this.handleRecognizedDocumentAction(3, relationDocument, {\n relationId,\n documentId,\n }).then(() =>\n this.setState(state => ({\n ...state,\n showPickRelationModal: false,\n })),\n );\n };\n\n handleSelection = document => {\n this.setState(({ documents }) => ({\n documents: documents.map(x => (x.id === document.id ? { ...x, selected: !x.selected } : x)),\n }));\n };\n\n renderRow = document => {\n const { intl } = this.props;\n const { columnStatus, cannotBeChangedTo, documentTypes, actionsInProgress } = this.state;\n const action = this.getDocumentAction(document);\n return (\n \n this.setState({ showDocumentDetailsModal: true, activeDocument })\n }\n columnStatus={columnStatus}\n action={action}\n handleSelection={this.handleSelection}\n loadRecognitionMeta={this.loadRecognitionMeta}\n onDeleteDocument={activeDocument =>\n this.setState({ showSingleDeleteDocumentModal: true, activeDocument })\n }\n onCreateTodo={activeDocument =>\n this.setState({ showCreateTodoModal: true, activeDocument })\n }\n onOpenSignatureRequestModal={activeDocument =>\n this.setState({ showSignatureRequestModal: true, selectedDocuments: [activeDocument] })\n }\n onOpenRevokeSignatureRequestModal={activeDocument =>\n this.setState({ showRevokeSignatureRequestModal: true, activeDocument })\n }\n onShareItem={activeDocument => this.setState({ showShareItemModal: true, activeDocument })}\n onDeleteRelation={relationId =>\n this.setState({\n showDeleteRelationLinkModal: true,\n activeDocument: document,\n activeRelationId: relationId,\n })\n }\n openInApp={this.openInApp}\n duplicate={this.duplicate}\n onSendViaEmail={this.onSendViaEmail}\n onForward={activeDocument => this.setState({ showForwardModal: true, activeDocument })}\n onUpdateDocumentDate={documentDate =>\n this.updateDocumentDate({ id: document.id, documentDate })\n }\n onUpdateDocumentType={documentType =>\n this.updateDocumentType({ id: document.id, documentType })\n }\n onSendToSharepoint={activeDocument =>\n this.setState({ showMoveToSharepointModal: true, activeDocument })\n }\n onCheckinDocument={(activeDocument) => {\n if (activeDocument.checkedOutByUserId != authService.getUserId()) {\n this.setState({ showDiscardCheckoutModal: true, activeDocument, actionsInProgress: true });\n } else {\n this.checkinDocument(activeDocument);\n }\n }}\n onDiscardCheckout={(activeDocument) => {\n this.setState({ actionsInProgress: true, showDiscardCheckoutModal: true, activeDocument });\n }}\n onCheckoutDocument={(activeDocument, openinApp) => this.checkoutDocument(activeDocument, openinApp)}\n onReplaceDocument={this.replaceDocument}\n actionsInProgress={actionsInProgress}\n />\n );\n };\n\n handleListDragOver = e => {\n if (!e.dataTransfer) return;\n if (containsDragFormat(e, 'Files')) {\n e.preventDefault();\n e.dataTransfer.dropEffect = 'copy';\n }\n };\n handleListDrop = e => {\n if (!e.dataTransfer) return;\n try {\n if (containsDragFormat(e, 'Files')) {\n e.preventDefault();\n this.onUploadDocument({ files: [...e.dataTransfer.files] });\n }\n } catch (ex) {\n console.error(ex);\n }\n };\n\n replaceDocument = (document, [file]) => {\n if (!file || !document || !document.canBeReplaced) return;\n this.updateDocumentInState({ id: document.id, replacing: true });\n\n const formData = new FormData();\n formData.append('documentId', document.id);\n formData.append('data', file);\n\n return api.base\n .post(`${config.appUrls.documents}/api/Documents/Replace`, formData, {\n headers: {\n 'Content-Type': undefined,\n },\n })\n .then(\n ({ data }) => {\n if (!data) return;\n ToastrService.success();\n\n this.updateDocumentInState({ ...data, replacing: false });\n return data;\n },\n error => {\n const { intl } = this.props;\n handleHttpError(intl)(error);\n\n return this.updateDocumentInState({ id: document.id, replacing: false });\n },\n );\n };\n\n updateDocumentInState = updatedDocument => {\n this.setState(state => {\n const { documents } = state;\n\n const index = documents.findIndex(x => x.id === updatedDocument.id);\n if (index !== -1) {\n const copy = [...documents];\n\n copy[index] = {\n ...copy[index],\n ...updatedDocument,\n filePath: updatedDocument.path || copy[index].filePath,\n signingStatus: updatedDocument.signingStatus,\n };\n return {\n documents: copy,\n };\n }\n return {\n documents: [updatedDocument, ...documents],\n };\n });\n };\n\n removeDocumentFromState = document => {\n this.setState(state => ({\n documents: state.documents.filter(d => d.id !== document.id),\n }));\n };\n\n onDocumentUpdated = (document, showToastrMessages = true) => {\n if (!document) return;\n const { initialSearchParams } = this.state;\n const { intl } = this.props;\n const { tags } = initialSearchParams;\n if (tags === null) {\n // all documents selected: can always update\n this.updateDocumentInState(document);\n }\n if (tags === '00000000-0000-0000-0000-000000000000') {\n // without tags selected: remove from list if document got a tag, otherwise update\n if (document.tags && document.tags.length) {\n if (showToastrMessages) ToastrService.info(intl.formatMessage(messages.DocumentWasMoved));\n this.removeDocumentFromState(document);\n } else {\n this.updateDocumentInState(document);\n }\n } else if (tags) {\n // document folder is selected, parse tags\n // if document does not contain all tags that are selected, remove from list since it was moved\n const selectedTags = tags.split(';');\n if (!document.tags) {\n this.updateDocumentInState(document);\n } else if (document.tags && document.tags.length) {\n const documentTags = document.tags.map(x => x.id);\n if (selectedTags.every(x => documentTags.some(y => y === x))) {\n this.updateDocumentInState(document);\n } else {\n if (showToastrMessages) ToastrService.info(intl.formatMessage(messages.DocumentWasMoved));\n this.removeDocumentFromState(document);\n }\n }\n }\n };\n onTreeviewLoaded = ({ tags }) => {\n this.setState(state => ({\n ...state,\n treeviewReady: true,\n initialSearchParams: {\n ...state.initialSearchParams,\n tags: tagsToString(tags),\n page: 0,\n f: new Date().getTime(),\n },\n }));\n };\n\n getSelectionCountFormatted() {\n const { allSelected, documents } = this.state;\n const { intl } = this.props;\n if (allSelected) {\n return intl.formatMessage(messages.AllDocumentsSelected);\n }\n\n const count = documents ? documents.filter(x => x.selected === true).length : 0;\n return intl.formatMessage(messages.CountDocumentsSelected, { count });\n }\n\n getSelectionCount() {\n const { allSelected, totalRows, documents } = this.state;\n\n const count = documents ? documents.filter(x => x.selected !== allSelected).length : 0;\n\n return allSelected ? totalRows - count : count;\n }\n\n handleSelectAll = () => {\n const { documents, allSelected } = this.state;\n\n const isCurrentlySelected = !allSelected;\n\n const documentsCopy = documents.map(e => ({ ...e, selected: !!isCurrentlySelected }));\n\n this.setState(state => ({\n ...state,\n allSelected: isCurrentlySelected,\n documents: documentsCopy,\n }));\n };\n\n isGlobalActionsDisabled = () => {\n const { documents, allSelected } = this.state;\n if (!documents || !documents.length) return true;\n if (documents.some(x => x.selected) || allSelected) return false;\n\n return true;\n };\n\n getSelectionParams = () => {\n const { documents, allSelected } = this.state;\n\n // Get all document ids that don't match the select all checkbox\n const documentIds = documents\n ? documents.filter(x => !!x.selected !== allSelected).map(x => x.id)\n : [];\n return {\n documentIds,\n selectAll: allSelected,\n };\n };\n\n executeBatchAction = ({ action, parameters }) => {\n if (this.isGlobalActionsDisabled()) return Promise.reject(new Error('invalid'));\n\n const { intl } = this.props;\n const { currentSearchParams } = this.state;\n const { stateService } = this.props;\n\n let endpoint = '';\n\n switch (action) {\n case 'updatetags':\n endpoint = 'UpdateTags';\n break;\n case 'updaterelations':\n endpoint = 'UpdateRelations';\n break;\n case 'removedocuments':\n endpoint = 'RemoveDocuments';\n break;\n case 'downloadzip': {\n const connectionId = SignalRService.getConnectionId();\n parameters = {\n ...parameters,\n signalRConnectionId: connectionId,\n };\n endpoint = 'DownloadZip';\n break;\n }\n case 'setispubliconportal':\n endpoint = 'SetIsPublicOnPortal';\n break;\n case 'createmergedpdf': {\n const connectionId = SignalRService.getConnectionId();\n parameters = {\n ...parameters,\n signalRConnectionId: connectionId,\n };\n endpoint = 'createmergedpdf';\n break;\n }\n default:\n endpoint = action;\n break;\n }\n\n const jobParameters = { ...parameters, ...this.getSelectionParams() };\n\n const url = `${config.appUrls.documents}/api/documentbatch/${endpoint}`;\n const allParams = {\n filterParams: currentSearchParams,\n ...jobParameters,\n };\n\n return api.base\n .post(url, allParams)\n .then(({ data }) => {\n this.setState(state => ({\n ...state,\n showUpdateTagsModal: false,\n showUpdateRelationsModal: false,\n showRemoveBatchDocumentsModal: false,\n showDownloadZipModal: false,\n showSetPublicOnPortalModal: false,\n showChangeDocumentDateModal: false,\n showChangeDocumentTypeModal: false,\n }));\n\n const onClick = data ? () => stateService.gotoJob(data.id) : undefined;\n\n ToastrService.info(intl.formatMessage(messages.GlobalActionStarted), undefined, onClick);\n })\n .catch(handleHttpError(intl));\n };\n\n updateDocumentDate = viewModel => {\n const { intl } = this.props;\n if (!viewModel.documentDate) {\n ToastrService.error(intl.formatMessage(messages.InvalidDocumentDate));\n return;\n }\n return api.base\n .put(`${config.appUrls.documents}/api/documents/date`, viewModel)\n .then(() => {\n const { documents } = this.state;\n const originalDocument = documents.find(x => x.id === viewModel.id);\n const updatedDocument = {\n ...originalDocument,\n documentDate: viewModel.documentDate,\n };\n\n this.updateDocumentInState(updatedDocument);\n ToastrService.success(intl.formatMessage(messages.DocumentDateWasModified));\n })\n .catch(handleHttpError(intl));\n };\n\n updateDocumentType = viewModel => {\n const { intl } = this.props;\n\n return api.base\n .put(`${config.appUrls.documents}/api/documents/type`, viewModel)\n .then(response => {\n const updatedDocumentData = response.data;\n const { documents } = this.state;\n const originalDocument = documents.find(x => x.id === viewModel.id);\n const updatedDocument = {\n ...originalDocument,\n documentType: viewModel.documentType,\n isPublicOnPortal: updatedDocumentData.isPublicOnPortal\n };\n\n this.updateDocumentInState(updatedDocument);\n ToastrService.success(intl.formatMessage(messages.Success));\n })\n .catch(handleHttpError(intl));\n };\n\n sendEmail = emailViewModel => {\n const { intl } = this.props;\n\n return api.base\n .post(`${config.appUrls.documents}/api/emails/CreateAndSend`, emailViewModel)\n .then(({ data }) => {\n this.setState(state => ({\n ...state,\n showSendByEmailModal: false,\n }));\n ToastrService.info(intl.formatMessage(messages.EmailSent));\n })\n .catch(handleHttpError(intl));\n };\n\n openEmailOrSignatureModal = emailOrSignatureRequest => {\n const { initialSearchParams, documents, allSelected } = this.state;\n const { intl } = this.props;\n\n if (allSelected) {\n ToastrService.error(intl.formatMessage(messages.PleaseMakeManualSelectionOfDocuments));\n return;\n }\n\n // if a relation was selected using the filters, this relation should be used to send the email\n let relationId =\n initialSearchParams &&\n initialSearchParams.mainFilters &&\n initialSearchParams.mainFilters.relationId;\n let companyId =\n initialSearchParams &&\n initialSearchParams.mainFilters &&\n initialSearchParams.mainFilters.companyId;\n\n if (relationId) {\n this.setState({\n selectedRelationId: relationId,\n selectedCompanyId: companyId,\n showSendByEmailModal: emailOrSignatureRequest === 'email',\n showSignatureRequestModal: emailOrSignatureRequest === 'signature',\n selectedDocuments: documents.filter(x => x.selected),\n });\n return;\n }\n\n // no relation was selected using the filters, check if the selected documents only belong to one relation.\n // if this is the case: the user can send an email to this relation too\n const selectedDocuments = documents && documents.filter(x => x.selected);\n\n if (selectedDocuments && selectedDocuments.length > 0) {\n const selectedRelations = selectedDocuments.flatMap(x => x.relations);\n const distinctRelations = [...new Set(selectedRelations.map(item => item.id))];\n if (distinctRelations && distinctRelations.length === 1) {\n // can mail document, since only documents for a single relation have been selected\n relationId = distinctRelations[0];\n companyId = selectedRelations.find(x => x.id === relationId).companyId;\n this.setState({\n selectedRelationId: relationId,\n selectedCompanyId: companyId,\n showSendByEmailModal: emailOrSignatureRequest === 'email',\n showSignatureRequestModal: emailOrSignatureRequest === 'signature',\n selectedDocuments: documents.filter(x => x.selected),\n });\n return;\n }\n }\n ToastrService.error(intl.formatMessage(messages.PleaseFilterOnRelationBeforeSendingEmail));\n };\n\n getSelectedCompany = () => {\n const { initialSearchParams } = this.state;\n let selectedCompany;\n if (hasMultipleCompanies()) {\n if (\n initialSearchParams &&\n initialSearchParams.mainFilters &&\n initialSearchParams.mainFilters.ownCompanies &&\n initialSearchParams.mainFilters.ownCompanies.length === 1\n ) {\n const dataCache = DataCacheService.getDataCache();\n if (dataCache) {\n selectedCompany = dataCache.company.find(\n x => x.id === initialSearchParams.mainFilters.ownCompanies[0],\n );\n }\n } else {\n selectedCompany = DataCacheService.getDefaultCompanyForUser();\n }\n }\n\n return selectedCompany;\n };\n\n revokeSignatureRequest = activeDocument => {\n const { intl } = this.props;\n\n const dataCache = DataCacheService.getDataCache();\n const company =\n dataCache.company.find(x => x.id === activeDocument.companyId) || dataCache.defaultcompany;\n const { documentSigningProvider } = company;\n\n if (documentSigningProvider === 0) {\n ToastrService.error(intl.formatMessage(messages.NoDocumentProviderConfigured));\n return;\n }\n\n let url = `${config.appUrls.documentSigning}/api/RevokeDocumentSigningRequest/${company.id}/${activeDocument.signingId}/`;\n\n if (activeDocument.signingPackageId) {\n url += `${activeDocument.signingPackageId}`;\n }\n return api.base.post(url).then(\n () => {\n ToastrService.success(intl.formatMessage(messages.SignatureRequestRevoked));\n this.setState(state => ({\n documents: state.documents.map(x => {\n if (x.id === activeDocument.id) {\n return {\n ...x,\n signingStatus: 3, // revoked\n };\n }\n return x;\n }),\n showRevokeSignatureRequestModal: false,\n }));\n },\n error => {\n handleHttpError(intl)(error);\n },\n );\n };\n\n handleColumnSelection = items => {\n this.setState(({ hideableColumns }) => ({\n ...handleHiddenColumnsSelection(items, hideableColumns, columnSelectionStorageKey),\n showColumnSelectionModal: false,\n }));\n };\n\n documentMovedToSharepoint = result => {\n const { intl } = this.props;\n const { activeDocument } = this.state;\n if (result.movedInBackground) {\n ToastrService.info(intl.formatMessage(messages.SharePointFileWillBeMovedInBackground));\n\n this.setState({ showMoveToSharepointModal: false });\n } else {\n ToastrService.success('', intl.formatMessage(messages.SharepointFileSuccessfullyMoved));\n\n this.setState({ showMoveToSharepointModal: false }, () => {\n activeDocument.storageType = 1;\n this.updateDocumentInState(activeDocument);\n });\n }\n };\n\n documentLinkedToSharepoint = document => {\n const { documents } = this.state;\n this.setState({ showLinkFromSharepointModal: false, documents: [document, ...documents] });\n };\n\n openInApp = document =>\n api.base\n .get(`${config.appUrls.documents}/api/documents/${document.id}/openinapp`)\n .then(({ data }) => {\n window.open(data, '_blank');\n });\n\n duplicate = document =>\n api.base\n .post(`${config.appUrls.documents}/api/documents/${document.id}/duplicate`)\n .then(({ data }) => {\n this.setState({\n documents: [data, ...this.state.documents],\n });\n });\n\n render() {\n const {\n initialSearchParams,\n documents,\n showPickRelationModal,\n activeDocument,\n showDocumentDetailsModal,\n treeviewReady,\n showProcessAuthorizationListModal,\n showProcessYukiRegistrationListModal,\n allSelected,\n showUpdateTagsModal,\n showUpdateRelationsModal,\n showRemoveBatchDocumentsModal,\n showSingleDeleteDocumentModal,\n showDownloadZipModal,\n showSendByEmailModal,\n showCreateTodoModal,\n showSetPublicOnPortalModal,\n showSignatureRequestModal,\n selectedRelationId,\n selectedCompanyId,\n showRevokeSignatureRequestModal,\n showShareItemModal,\n showDeleteRelationLinkModal,\n showChangeDocumentDateModal,\n showChangeDocumentTypeModal,\n activeRelationId,\n showColumnSelectionModal,\n hideableColumns,\n columnStatus,\n showForwardModal,\n showAdvancedUploadModal,\n selectedDocuments,\n showSelectRelationModal,\n showMoveToSharepointModal,\n showExtractZipModal,\n activeRelations,\n asPdf,\n showLinkFromSharepointModal,\n documentTypes,\n cannotBeChangedTo,\n showDiscardCheckoutModal\n } = this.state;\n let documentUploadEndpoint = `${config.appUrls.documents}/api/documents?documentType=-1`; // -1 = document type unknown, used for recognizing\n\n const selectedCompany = this.getSelectedCompany();\n\n if (initialSearchParams) {\n if (initialSearchParams.tags && initialSearchParams.tags.length > 0) {\n documentUploadEndpoint += `&tags=${initialSearchParams.tags}`;\n }\n if (initialSearchParams.mainFilters && initialSearchParams.mainFilters.relationId) {\n documentUploadEndpoint += `&linkId=${initialSearchParams.mainFilters.relationId}&documentLinkType=3`;\n }\n if (selectedCompany) {\n documentUploadEndpoint += `&companyId=${selectedCompany.id}`;\n }\n }\n\n const relationName =\n initialSearchParams &&\n initialSearchParams.mainFilters &&\n initialSearchParams.mainFilters.relationName;\n\n const { intl, stateService } = this.props;\n return (\n
    \n \n \n );\n }\n}\n\nexport default showWhenPermission(\n 'Documents',\n 'read',\n)(injectStateService(injectIntl(withDropZone(DocumentsContainer))));\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedDate } from 'react-intl';\nimport classNames from 'classnames';\nimport { FaRedo, FaShareAlt, FaThumbtack, FaTrashAlt } from 'react-icons/fa';\nimport { MdForwardToInbox, MdReply, MdReplyAll } from 'react-icons/md';\nimport { CanCreate, CanDelete, CanUpdate } from '@/shared/components/security';\n\nimport intlShape from '@/shared/utils/intlShape';\nimport FileIcon from '@/shared/components/FileIcon';\n\nimport RelationName from '@/shared/components/RelationName';\nimport DocumentService from '@/shared/services/DocumentService';\nimport Checkbox from '@/shared/components/input/Checkbox';\nimport messages from './documentMessages';\nimport FormattedDateShort from '../../shared/components/FormattedDateShort';\n\nfunction getIndexOfElement(str, char, n) {\n return str\n .split(char)\n .slice(0, n)\n .join(char).length;\n}\n\nfunction formatEmailAddresses(addresses) {\n const addressCount = addresses.split(';').length;\n let formattedAddresses = addresses.slice(0, getIndexOfElement(addresses, ';', 3));\n if (addressCount > 3) {\n formattedAddresses = `${formattedAddresses} (+${addressCount - 3})`;\n }\n return formattedAddresses;\n}\n\nexport default class EmailRow extends React.Component {\n render() {\n const {\n email,\n onOpenDocumentDetails,\n intl,\n handleSelection,\n onDeleteDocument,\n onCreateTodo,\n onShareItem,\n onDeleteRelation,\n onForward,\n onResend,\n onReplyTo,\n } = this.props;\n return (\n \n onOpenDocumentDetails(email)} key={email.id}>\n \n handleSelection(email)} value={email.selected} />\n \n\n \n \n onOpenDocumentDetails(email)}>\n {email.subject}\n \n \n \n {email.relations &&\n email.relations.slice(0, 3).map(relation => (\n \n onDeleteRelation(relationId) : null\n }\n />\n \n ))}\n {email.relations && email.relations.length > 3 && (\n \n …\n \n )}\n \n {email.sender}\n {email.recipients && formatEmailAddresses(email.recipients)}\n\n \n \n \n \n onReplyTo(email, false)}\n >\n \n \n onReplyTo(email, true)}\n >\n \n \n onForward(email)}\n >\n \n \n \n email.documentType === 8 && onResend(email)}\n >\n \n \n \n onShareItem(email)}\n >\n \n \n \n onCreateTodo(email)}\n >\n \n \n \n \n email.canRemove && onDeleteDocument(email)}\n >\n \n \n \n \n \n \n );\n }\n}\n\nEmailRow.propTypes = {\n email: PropTypes.shape({}).isRequired,\n intl: intlShape.isRequired,\n onOpenDocumentDetails: PropTypes.func.isRequired,\n handleSelection: PropTypes.func.isRequired,\n onDeleteDocument: PropTypes.func.isRequired,\n onCreateTodo: PropTypes.func.isRequired,\n onShareItem: PropTypes.func.isRequired,\n onDeleteRelation: PropTypes.func.isRequired,\n onForward: PropTypes.func.isRequired,\n onResend: PropTypes.func.isRequired,\n};\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport DropdownButton from 'react-bootstrap/lib/DropdownButton';\nimport MenuItem from 'react-bootstrap/lib/MenuItem';\nimport { injectIntl } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport { functionalities, privileges } from '@/shared/services/AuthService';\nimport MenuItemWithSecurity from '@/shared/components/MenuItemWithSecurity';\nimport messages from './documentMessages';\n\nconst EmailGlobalActionsButton = props => {\n const {\n intl,\n disabled,\n onUpdateTags,\n onUpdateRelations,\n onRemoveDocuments,\n onDownloadZip,\n onSendByEmail,\n } = props;\n\n return (\n \n \n \n {intl.formatMessage(messages.AddOrRemoveTags)}\n \n \n {intl.formatMessage(messages.AddOrRemoveRelations)}\n \n \n {intl.formatMessage(messages.DownloadAsZip)}\n \n {/* \n {intl.formatMessage(messages.SendByEmail)}\n */}\n \n {intl.formatMessage(messages.RemoveEmails)}\n \n \n \n );\n};\n\nEmailGlobalActionsButton.propTypes = {\n intl: intlShape.isRequired,\n disabled: PropTypes.bool,\n};\nEmailGlobalActionsButton.defaultProps = {\n disabled: false,\n};\n\nexport default injectIntl(EmailGlobalActionsButton);\n","import React, { Component, Fragment } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage, injectIntl } from 'react-intl';\nimport { FaUndo, FaFilter } from 'react-icons/fa';\nimport classnames from 'classnames';\nimport moment from 'moment';\nimport momentPropTypes from 'react-moment-proptypes';\nimport CheckboxDropdownMenu from '@/shared/components/input/CheckboxDropdownMenu';\nimport userStorage from '@/shared/services/userStorage';\n\nimport { Dropdown } from 'react-bootstrap';\nimport intlShape from '@/shared/utils/intlShape';\nimport api from '@/shared/api';\nimport MultiSelect, {\n addItem as addMultiSelectItem,\n removeItem as removeMultiSelectItem,\n splitItems as splitMultiSelectItems,\n} from '@/shared/components/input/multiselect/MultiSelect';\nimport dateMessages from '@/shared/messages/dateMessages';\nimport RelationSearch from '@/shared/components/input/RelationSearch';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport TextSearch from '@/shared/components/input/TextSearch';\n\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport enumCache from '@/shared/services/EnumCacheService';\nimport CompanyMultiSelect from '@/shared/components/input/multiselect/CompanyMultiSelect';\nimport EnumMultiSelect from '@/shared/components/input/multiselect/EnumMultiSelect';\nimport HasMultiCompany from '@/shared/components/security/HasMultiCompany';\nimport UserSearch from '@/shared/components/input/UserSearch';\nimport DelayedDateRangePicker from '@/shared/components/input/DelayedDateRangePicker';\nimport DynamicFilter, {\n getDynamicFiltersFromDefaultFilters,\n initDynamicFilters,\n} from '@/shared/components/DynamicFilter';\nimport messages from './documentMessages';\nimport config from '../../config';\nimport {FilterSave} from \"@/shared/components/FilterSave\";\n\nconst dynamicFiltersStorageKey = 'EmailOverviewDynamicFilters';\n\nexport const defaultFilters = {\n relationId: null,\n relationName: null,\n companyId: null,\n dateUntil: null,\n dateFrom: null,\n period: 'all',\n documentTypes: [],\n recognitionStatus: [],\n subject: '',\n sender: '',\n recipients: '',\n notLinkedToRelation: false,\n linkedToMultipleRelations: false,\n ownCompanies: [],\n emailStatus: [],\n createdBy: null,\n withTags: [],\n withoutTags: [],\n emailLinkTypes: [],\n responsible: null,\n assistant: null,\n assistantBackup: null,\n associate: null,\n relationGroups: [],\n};\n\nconst allDynamicFilters = [...getDynamicFiltersFromDefaultFilters(defaultFilters, 'ownCompanies')];\n\nclass EmailFilters extends Component {\n state = {\n dynamicFilters: [],\n };\n\n static propTypes = {\n onFilterChange: PropTypes.func.isRequired,\n filters: PropTypes.shape({\n relationId: PropTypes.string,\n relationName: PropTypes.string,\n companyId: PropTypes.string,\n dateUntil: momentPropTypes.momentObj,\n dateFrom: momentPropTypes.momentObj,\n period: PropTypes.oneOf([\n 'all',\n 'month',\n 'quarter',\n 'year',\n 'year-1',\n 'year-2',\n 'year-3',\n 'year-4',\n 'year-5',\n ]),\n subject: PropTypes.string,\n sender: PropTypes.string,\n recipients: PropTypes.string,\n notLinkedToRelation: PropTypes.bool,\n linkedToMultipleRelations: PropTypes.bool,\n ownCompanies: PropTypes.arrayOf(PropTypes.string),\n emailStatus: PropTypes.arrayOf(PropTypes.number),\n withTags: PropTypes.arrayOf(PropTypes.string),\n withoutTags: PropTypes.arrayOf(PropTypes.string),\n emailLinkTypes: PropTypes.arrayOf(PropTypes.string),\n createdBy: PropTypes.string,\n relationGroups: PropTypes.arrayOf(PropTypes.string),\n }),\n intl: intlShape.isRequired,\n };\n\n static defaultProps = {\n filters: {\n ...defaultFilters,\n },\n };\n\n componentDidMount() {\n const { filters, intl } = this.props;\n\n if (filters && filters.period) {\n this.setPeriod(filters.period);\n }\n Promise.all([\n enumCache.get('combinedEmailStatus'),\n api.base.get(`${config.appUrls.documents}/api/Tag`),\n ]).then(([emailStatusses, { data: tags }]) => {\n this.setState({\n emailStatusses: emailStatusses.map(item => ({\n id: item.key,\n label: intl.formatMessage(listItemMsg('combinedEmailStatus', item.key, item.value)),\n })),\n tags: (tags || []).map(x => ({ ...x, label: x.name })).sort(dynamicSort('label')),\n dynamicFilters: initDynamicFilters(\n intl,\n allDynamicFilters,\n userStorage.getItem(dynamicFiltersStorageKey) || [],\n filters,\n defaultFilters,\n ),\n });\n });\n }\n\n filterChanged = filter => {\n const { filters, onFilterChange } = this.props;\n const newFilters = { ...filters, ...filter };\n if (filters !== newFilters) onFilterChange(newFilters);\n };\n\n resetFilters = () => {\n const { onFilterChange } = this.props;\n onFilterChange({ ...defaultFilters });\n };\n\n setFilters = filters => {\n if (!!filters.dateFrom) filters.dateFrom = moment(filters.dateFrom)\n if (!!filters.dateUntil) filters.dateUntil = moment(filters.dateUntil)\n this.props.onFilterChange(filters)\n }\n\n dateChanged = (startDate, endDate) => {\n this.filterChanged({ dateFrom: startDate, dateUntil: endDate, period: null });\n };\n\n relationChanged = item => {\n if (!item || !item.id) {\n this.filterChanged({ relationId: null, relationName: null, companyId: null });\n } else {\n this.filterChanged({\n relationId: item.key,\n relationName: item.label,\n companyId: item.companyId,\n });\n }\n };\n\n dynamicFilterChanged = (item, selected) => {\n const { dynamicFilters } = this.state;\n const { filters } = this.props;\n\n const newFilters = dynamicFilters.map(x => {\n if (x.id !== item.id && item.id !== 'selectall') return x;\n return { ...x, selected };\n });\n\n userStorage.setItem(\n dynamicFiltersStorageKey,\n newFilters.filter(x => x.selected).map(x => x.id),\n );\n this.setState({\n dynamicFilters: newFilters,\n });\n\n if (!selected && JSON.stringify(filters[item.id]) !== JSON.stringify(defaultFilters[item.id])) {\n // Reset filter when it's removed\n this.filterChanged({ [item.id]: defaultFilters[item.id] });\n }\n };\n\n toggleNotLinkedtoRelation = () => {\n const { filters } = this.props;\n this.filterChanged({\n notLinkedToRelation: !filters.notLinkedToRelation,\n linkedToMultipleRelations: false,\n });\n };\n toggleLinkedToMultipleRelations = () => {\n const { filters } = this.props;\n this.filterChanged({\n linkedToMultipleRelations: !filters.linkedToMultipleRelations,\n notLinkedToRelation: false,\n });\n };\n\n setPeriod = period => {\n let dateFrom = null;\n let dateUntil = null;\n switch (period) {\n case 'all':\n case '':\n case null:\n case undefined:\n break;\n case 'month':\n case 'quarter':\n case 'year':\n dateFrom = moment.utc().startOf(period);\n dateUntil = moment.utc().endOf(period);\n break;\n case 'year-1':\n case 'year-2':\n case 'year-3':\n case 'year-4':\n case 'year-5': {\n const y = parseInt(period.substr(-1, 1));\n dateFrom = moment\n .utc()\n .startOf('year')\n .subtract(y, 'y');\n dateUntil = moment\n .utc()\n .endOf('year')\n .subtract(y, 'y');\n break;\n }\n default:\n console.debug(`Unknown period: ${period}`);\n return;\n }\n\n this.filterChanged({ dateFrom, dateUntil, period });\n };\n\n onEmailStatusFilterAdded = selectedItem => {\n if (!selectedItem) return;\n\n const { filters } = this.props;\n const { emailStatus = [] } = filters;\n\n if (emailStatus.includes(selectedItem.id)) return;\n this.filterChanged({\n emailStatus: [...emailStatus, selectedItem.id],\n });\n };\n onEmailStatusFilterRemoved = item => {\n const { filters } = this.props;\n const { emailStatus = [] } = filters;\n const index = emailStatus.findIndex(x => x === item.value.id);\n const copy = [...emailStatus];\n copy.splice(index, 1);\n\n this.filterChanged({ emailStatus: copy });\n };\n\n onCreatedByChanged = user => {\n this.filterChanged({\n createdBy: user ? user.id : user,\n });\n };\n\n render() {\n const { emailStatusses, tags, dynamicFilters } = this.state;\n const { filters, intl, selectionCount } = this.props;\n const defaultBtnClass = 'btn btn-default';\n\n let initRelation = null;\n if (filters.relationId) {\n initRelation = {\n key: filters.relationId,\n label: filters.relationName,\n invoiceStreamId: filters.invoiceStreamId,\n companyId: filters.companyId,\n };\n }\n const visibleFilters = dynamicFilters.filter(x => x.selected).map(x => x.id);\n\n const dropdownFilters = [\n {\n id: 'selectall',\n label: intl.formatMessage(messages.SelectAll),\n selected: !dynamicFilters.some(x => !x.selected),\n },\n ...dynamicFilters,\n ];\n\n const selectedEmailStatusses =\n emailStatusses && filters.emailStatus\n ? emailStatusses.filter(r => filters.emailStatus.includes(r.id))\n : [];\n\n const [withTagsSelection, withTagsAvailable] = splitMultiSelectItems(tags, filters.withTags);\n const [withoutTagsSelection, withoutTagsAvailable] = splitMultiSelectItems(\n tags,\n filters.withoutTags,\n );\n\n const year = new Date().getFullYear();\n\n const hasFilters = JSON.stringify(filters) !== JSON.stringify(defaultFilters);\n\n return (\n <>\n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n this.dateChanged(startDate, endDate)}\n block\n />\n
    \n
    \n
    \n
    \n
    \n this.setPeriod('month')}\n type=\"button\"\n className={classnames(defaultBtnClass, { active: filters.period === 'month' })}\n >\n \n \n this.setPeriod('quarter')}\n type=\"button\"\n className={classnames(defaultBtnClass, { active: filters.period === 'quarter' })}\n >\n \n \n this.setPeriod('year')}\n type=\"button\"\n className={classnames(defaultBtnClass, { active: filters.period === 'year' })}\n >\n {year}\n \n this.setPeriod('year-1')}\n type=\"button\"\n className={classnames(defaultBtnClass, { active: filters.period === 'year-1' })}\n >\n {year - 1}\n \n this.setPeriod('year-2')}\n type=\"button\"\n className={classnames(defaultBtnClass, { active: filters.period === 'year-2' })}\n >\n {year - 2}\n \n\n this.setPeriod('all')}\n type=\"button\"\n className={classnames(defaultBtnClass, {\n active: !filters.dateFrom && !filters.dateUntil,\n })}\n >\n \n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n this.filterChanged({ subject: value })}\n />\n
    \n
    \n\n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n {\n document.activeElement.blur();\n this.toggleNotLinkedtoRelation();\n }}\n type=\"button\"\n title={intl.formatMessage(messages.NotLinkedToARelation)}\n className={classnames('btn btn-default', {\n active: filters.notLinkedToRelation,\n })}\n >\n {intl.formatMessage(messages.NotLinkedToARelationShort)}\n \n\n {\n document.activeElement.blur();\n this.toggleLinkedToMultipleRelations();\n }}\n type=\"button\"\n title={intl.formatMessage(messages.LinkedToMultipleRelations)}\n className={classnames('btn btn-default', {\n active: filters.linkedToMultipleRelations,\n })}\n >\n {intl.formatMessage(messages.LinkedToMultipleRelationsShort)}\n \n
    \n
    \n
    \n
    \n
    \n this.filterChanged({ emailLinkTypes: value })}\n placeholder={intl.formatMessage(messages.EmailLinkType)}\n />\n
    \n
    \n
    \n\n
    \n
    \n
    \n this.filterChanged({ sender: value })}\n />\n
    \n
    \n
    \n
    \n this.filterChanged({ recipients: value })}\n />\n
    \n
    \n {tags && tags.length > 0 ? (\n \n
    \n
    \n \n this.filterChanged({\n withTags: removeMultiSelectItem(filters.withTags, item),\n })\n }\n onItemSelected={item =>\n this.filterChanged({\n withTags: addMultiSelectItem(filters.withTags, item),\n })\n }\n items={withTagsAvailable}\n placeholder={intl.formatMessage(messages.WithDocumentTags)}\n />\n
    \n
    \n
    \n
    \n \n this.filterChanged({\n withoutTags: removeMultiSelectItem(filters.withoutTags, item),\n })\n }\n onItemSelected={item =>\n this.filterChanged({\n withoutTags: addMultiSelectItem(filters.withoutTags, item),\n })\n }\n items={withoutTagsAvailable}\n placeholder={intl.formatMessage(messages.WithoutDocumentTags)}\n />\n
    \n
    \n
    \n ) : null}\n
    \n
    \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n this.filterChanged({ ownCompanies: companies })}\n />\n
    \n
    \n
    \n
    \n {visibleFilters && visibleFilters.length > 0 ? (\n
    \n {visibleFilters.map(id => (\n \n ))}\n
    \n ) : null}\n
    \n
    \n this.resetFilters()}\n setFilter={filter => this.setFilters(filter)}\n />\n \n \n \n \n \n \n \n {hasFilters && (\n this.resetFilters()}\n >\n \n  \n \n \n )}\n\n
    \n
    {selectionCount}
    \n
    \n \n );\n }\n}\n\nexport default injectIntl(EmailFilters);\n","import DataCacheService from '@/shared/services/DataCacheService';\nimport CurrencySymbols from '@/shared/currencySymbols';\n\nconst getCurrencySymbol = () => {\n let currencyCode = 'EUR';\n\n const cache = DataCacheService.getDataCache();\n if (cache) {\n ({ currencyCode } = cache.defaultcompany);\n }\n return CurrencySymbols.getByCurrencyCode(currencyCode);\n};\n\nexport const numberTooltipLabel = context => {\n let label = context.dataset.label || '';\n if (label) label += ': ';\n if (context.parsed.y !== null) {\n label += context.parsed.y.toFixed(2);\n }\n return label;\n};\n\nexport const currencyTooltipLabel = context => {\n let label = context.dataset.label || '';\n if (label) label += ': ';\n if (context.parsed.y !== null) {\n label += context.parsed.y.toFixed(2) + getCurrencySymbol();\n }\n return label;\n};\n\nexport const currencyTooltipLabelWithInlt = (context, intl) => {\n let label = context.dataset.label || '';\n if (label) label += ': ';\n const value = intl.formatNumber(context.parsed.y || 0, {\n format: 'currency',\n minimumFractionDigits: 2,\n maximumFractionDigits: 2,\n });\n return `${label}${value}`;\n};\nexport const percentageTooltipLabel = context => {\n let label = context.dataset.label || '';\n if (label) label += ': ';\n if (context.formattedValue !== null) {\n label += `${context.formattedValue}%`;\n }\n return label;\n};\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport Axios from 'axios';\nimport log from 'loglevel';\nimport authService, { privileges } from '@/shared/services/AuthService';\nimport moment from 'moment';\nimport { injectIntl } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\n\nimport api from '@/shared/api';\nimport ToastrService from '@/shared/services/ToastrService';\nimport ScrollableTable from '@/shared/components/table/ScrollableTable';\nimport ColumnHeader from '@/shared/components/table/ColumnHeader';\nimport SimplePanel from '@/shared/components/SimplePanel';\nimport { CanCreate, showWhenPermission } from '@/shared/components/security';\nimport SignalRService from '@/shared/services/SignalRService';\nimport withDropZone from '@/shared/components/dragAndDrop/withDropzone';\nimport { injectStateService } from '@/shared/services/StateService';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport Checkbox from '@/shared/components/input/Checkbox';\nimport YesNoModal from '@/shared/components/YesNoModal';\nimport userStorage from '@/shared/services/userStorage';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport ShareItemModal from '@/shared/components/ShareItemModal';\nimport ForwardEmailModal from '@/shared/components/email/ForwardEmailModal';\nimport ReplyToEmailModal from '@/shared/components/email/ReplyToEmailModal';\nimport { getRelationName } from '@/shared/components/RelationName';\nimport SetIsPublicOnPortalModal from './modals/SetIsPublicOnPortalModal';\nimport ChangeDocumentDateModal from './modals/ChangeDocumentDateModal';\nimport messages from './documentMessages';\nimport EmailRow from './EmailRow';\nimport Dropzone from './Dropzone';\nimport DocumentDetailsModal from './details/DocumentDetailsModal';\nimport { containsDragFormat } from '../../shared/utils/dragEventHelpers';\nimport EmailFilters, { defaultFilters } from './EmailFilters';\nimport EmailGlobalActionsButton from './EmailGlobalActionsButton';\nimport UpdateDocumentTagsModal from './modals/UpdateDocumentTagsModal';\nimport UpdateDocumentRelationsModal from './modals/UpdateDocumentRelationsModal';\nimport CreateToDoModal from '../tasks/CreateToDoModal';\nimport config from '../../config';\n\nclass EmailsContainer extends Component {\n state = {\n emails: [],\n showDocumentDetailsModal: false,\n initialSearchParams: {},\n allSelected: false,\n showUpdateTagsModal: false,\n showUpdateRelationsModal: false,\n showRemoveBatchDocumentsModal: false,\n showCreateTodoModal: false,\n showSetPublicOnPortalModal: false,\n showChangeDocumentDateModal: false,\n };\n\n constructor(props) {\n super(props);\n const {\n searchParams: { mainFilters: searchParamsFilters = {}, ...otherSearchParams } = {},\n } = props;\n\n let mainFilters = { ...defaultFilters };\n if (searchParamsFilters && Object.keys(searchParamsFilters).length) {\n mainFilters = { ...mainFilters, ...searchParamsFilters };\n } else {\n const storageFilters = userStorage.getItem('EmailsOverviewFilters') || {};\n\n if (storageFilters.dateFrom) {\n storageFilters.dateFrom = moment.utc(storageFilters.dateFrom);\n }\n if (storageFilters.dateUntil) {\n storageFilters.dateUntil = moment.utc(storageFilters.dateUntil);\n }\n mainFilters = { ...mainFilters, ...storageFilters };\n }\n\n this.state = {\n ...this.state,\n initialSearchParams: {\n sortKey: 'creationDate',\n desc: true,\n pageSize: 50,\n mainFilters,\n ...otherSearchParams,\n },\n };\n }\n\n static propTypes = {\n intl: intlShape.isRequired,\n searchParams: PropTypes.shape({}),\n };\n\n static defaultProps = {\n searchParams: {},\n };\n\n documentDeleteHandler = documentId => {\n this.setState(({ emails }) => ({\n emails: emails.filter(email => email.documentId !== documentId),\n }));\n };\n emailCreatedHandler = email => {\n this.setState(state => {\n const { emails } = state;\n\n const index = emails.findIndex(x => x.documentId === email.documentId);\n if (index !== -1) {\n const copy = [...emails];\n\n copy[index] = {\n ...copy[index],\n ...email,\n };\n return {\n emails: copy,\n };\n }\n return {\n emails: [email, ...emails],\n };\n });\n };\n emailStatusChangedHandler = (emailId, status) => {\n this.setState(state => {\n const { emails } = state;\n\n const index = emails.findIndex(x => x.id === emailId);\n if (index !== -1) {\n const copy = [...emails];\n\n copy[index] = {\n ...copy[index],\n emailStatus: status,\n };\n return {\n emails: copy,\n };\n }\n });\n };\n\n componentDidMount() {\n SignalRService.subscribe('documentDeleted', this.documentDeleteHandler);\n SignalRService.subscribe('emailCreated', this.emailCreatedHandler);\n SignalRService.subscribe('emailStatusChanged', this.emailStatusChangedHandler);\n }\n\n componentWillUnmount() {\n SignalRService.unsubscribe('documentDeleted', this.documentDeleteHandler);\n SignalRService.unsubscribe('emailCreated', this.emailCreatedHandler);\n SignalRService.unsubscribe('emailStatusChanged', this.emailStatusChangedHandler);\n\n if (typeof this.cancelToken !== 'undefined') {\n this.cancelToken.cancel('Operation canceled due to leaving page.');\n }\n }\n\n onDocumentUploaded = error => {\n const { intl } = this.props;\n if (error) {\n log.error(error);\n\n if (error.body) {\n const translatedError = {\n type: 'documentdomainexceptioncode',\n code: error.body,\n };\n\n handleHttpError(intl)(translatedError);\n } else if (error.code) {\n handleHttpError(intl)(error);\n }\n } else {\n ToastrService.success(intl.formatMessage(messages.DocumentWasUploaded));\n }\n };\n\n onUploadDocument = ({ files }) => {\n const canCreate = authService.hasPermission({\n functionality: 'documents',\n privilege: privileges.Create,\n });\n if (!canCreate) return;\n\n const { pond } = this;\n if (!pond) return;\n\n const filePondFiles = files.map(x => ({\n source: x,\n }));\n\n pond.addFiles(filePondFiles);\n };\n\n deleteDocument(id) {\n const { emails } = this.state;\n const { intl } = this.props;\n\n return api.base.delete(`${config.appUrls.documents}/api/documents/${id}`).then(\n () => {\n ToastrService.success(intl.formatMessage(messages.MsgDeleteDocumentSuccess));\n this.setState(state => {\n const closeDetailModal =\n state.showDocumentDetailsModal && state.activeEmail.documentId === id;\n\n return {\n emails: emails.filter(document => document.documentId !== id),\n activeEmail: closeDetailModal ? null : state.activeEmail,\n showDocumentDetailsModal: closeDetailModal ? false : state.showDocumentDetailsModal,\n showSingleDeleteDocumentModal: false,\n };\n });\n },\n error => {\n console.error(error);\n if (error.response && error.response.data && error.response.data.code) {\n handleHttpError(intl)(error);\n } else {\n ToastrService.error(intl.formatMessage(messages.MsgDeleteDocumentError));\n }\n log.error('error deleting document ', error);\n },\n );\n }\n\n filtersChanged(filters) {\n this.setState(state => ({\n ...state,\n initialSearchParams: {\n ...state.initialSearchParams,\n page: 0,\n mainFilters: { ...state.initialSearchParams.mainFilters, ...filters },\n },\n }));\n }\n\n loadEmails = (\n { tags, desc, sortKey: sort, page, pageSize: take, mainFilters = {} },\n requestNr,\n ) => {\n if (typeof this.cancelToken !== 'undefined') {\n this.cancelToken.cancel('Operation canceled due to new request.');\n }\n this.cancelToken = Axios.CancelToken.source();\n this.lastRequestNr = requestNr;\n\n const { relationId = null, ...rest } = mainFilters;\n\n const params = {\n desc,\n sort,\n page,\n take,\n ...rest,\n };\n\n if (relationId) {\n params.linkId = relationId;\n params.linkType = 3; // link type 3 = relation\n }\n\n const storageFilters = { ...mainFilters };\n userStorage.setItem('EmailsOverviewFilters', storageFilters);\n\n return api.base\n .post(`${config.appUrls.documents}/api/emails/GetEmails`, params, {\n cancelToken: this.cancelToken.token,\n })\n .then(({ data }) => {\n if (this.lastRequestNr !== requestNr) return;\n const { allSelected } = this.state;\n const newEmails = data.emails.map(e => ({ ...e, selected: !!allSelected }));\n\n this.setState(state => ({\n ...state,\n emails: page > 0 ? [...state.emails, ...newEmails] : [...newEmails],\n currentSearchParams: {\n mainFilters,\n ...params,\n },\n }));\n\n return data.emails;\n })\n .catch(error => {\n if (!Axios.isCancel(error)) {\n if (page <= 0 && this.lastRequestNr === requestNr) {\n this.setState({ emails: [] });\n }\n return error;\n }\n });\n };\n\n getPreviousDocumentId = documentId => {\n const { emails } = this.state;\n\n if (!emails) return;\n\n const currentIndex = emails.map(x => x.documentId).findIndex(x => x === documentId);\n\n // No previous doc present\n if (currentIndex <= 0) return;\n\n const previousIndex = currentIndex - 1;\n if (previousIndex < emails.length) {\n return emails[previousIndex].documentId;\n }\n };\n\n getNextDocument = documentId => {\n const { emails } = this.state;\n if (!emails) return null;\n const currentIndex = emails.map(x => x.documentId).findIndex(x => x === documentId);\n const nextIndex = currentIndex + 1;\n if (nextIndex < emails.length) {\n return emails[nextIndex];\n }\n return null;\n };\n getNextDocumentId = documentId =>\n new Promise((resolve, reject) => {\n const nextDocument = this.getNextDocument(documentId);\n if (nextDocument) {\n return resolve(nextDocument.documentId);\n }\n\n // Need to retrieve next page\n const { currentSearchParams } = this.state;\n\n const params = {\n ...currentSearchParams,\n page: currentSearchParams.page + 1,\n };\n\n api.base.post(`${config.appUrls.documents}/api/emails/GetEmails`, params).then(({ data }) => {\n const { emails: newEmails } = data;\n if (!newEmails || newEmails.length === 0) {\n return reject();\n }\n\n this.setState(\n ({ emails }) => ({\n emails: params.page > 0 ? [...emails, ...newEmails] : [...data],\n currentSearchParams: params,\n }),\n () => {\n const nextDocument2 = this.getNextDocument(documentId);\n if (nextDocument2) {\n resolve(nextDocument2.documentId);\n } else {\n reject();\n }\n },\n );\n }, reject);\n });\n\n handleSelection = email => {\n this.setState(({ emails }) => ({\n emails: emails.map(x => (x.id === email.id ? { ...x, selected: !x.selected } : x)),\n }));\n };\n\n renderRow = email => {\n const { intl } = this.props;\n return (\n this.setState({ showResendConfirmation: true, activeEmail })}\n onOpenDocumentDetails={activeEmail =>\n this.setState({ showDocumentDetailsModal: true, activeEmail })\n }\n handleSelection={this.handleSelection}\n onDeleteDocument={activeEmail =>\n this.setState({ showSingleDeleteDocumentModal: true, activeEmail })\n }\n onCreateTodo={activeEmail => this.setState({ showCreateTodoModal: true, activeEmail })}\n onShareItem={activeEmail => this.setState({ showShareItemModal: true, activeEmail })}\n onDeleteRelation={relationId =>\n this.setState({\n showDeleteRelationLinkModal: true,\n activeEmail: email,\n activeRelationId: relationId,\n })\n }\n onForward={activeEmail => this.setState({ showForwardModal: true, activeEmail })}\n onReplyTo={(activeEmail, replyAll) =>\n this.setState({ showReplyToModal: true, activeEmail, replyAll })\n }\n />\n );\n };\n\n handleListDragOver = e => {\n if (!e.dataTransfer) return;\n if (containsDragFormat(e, 'Files')) {\n e.preventDefault();\n e.dataTransfer.dropEffect = 'copy';\n }\n };\n handleListDrop = e => {\n if (!e.dataTransfer) return;\n try {\n if (containsDragFormat(e, 'Files')) {\n e.preventDefault();\n this.onUploadDocument({ files: [...e.dataTransfer.files] });\n }\n } catch (ex) {\n console.error(ex);\n }\n };\n\n onDetailModalClosed = updatedDocument => {\n if (!updatedDocument) return;\n\n this.setState(state => {\n const { emails } = state;\n\n const index = emails.findIndex(x => x.documentId === updatedDocument.id);\n if (index !== -1) {\n const copy = [...emails];\n\n copy[index] = {\n ...copy[index],\n relations: updatedDocument.relations,\n };\n return {\n emails: copy,\n };\n }\n return {\n emails: [updatedDocument, ...emails],\n };\n });\n };\n\n getSelectionCountFormatted() {\n const { allSelected, emails } = this.state;\n const { intl } = this.props;\n if (allSelected) {\n return intl.formatMessage(messages.AllEmailsSelected);\n }\n\n const count = emails ? emails.filter(x => x.selected === true).length : 0;\n return intl.formatMessage(messages.CountEmailsSelected, { count });\n }\n\n getSelectionCount() {\n const { allSelected, totalRows, emails } = this.state;\n\n const count = emails ? emails.filter(x => x.selected !== allSelected).length : 0;\n\n return allSelected ? totalRows - count : count;\n }\n\n handleSelectAll = () => {\n const { emails, allSelected } = this.state;\n\n const isCurrentlySelected = !allSelected;\n\n const emailsCopy = emails.map(e => ({ ...e, selected: !!isCurrentlySelected }));\n\n this.setState(state => ({\n ...state,\n allSelected: isCurrentlySelected,\n emails: emailsCopy,\n }));\n };\n\n isGlobalActionsDisabled = () => {\n const { emails, allSelected } = this.state;\n if (!emails || !emails.length) return true;\n if (emails.some(x => x.selected) || allSelected) return false;\n\n return true;\n };\n\n getSelectionParams = () => {\n const { emails, allSelected } = this.state;\n\n // Get all document ids that don't match the select all checkbox\n const emailIds = emails ? emails.filter(x => !!x.selected !== allSelected).map(x => x.id) : [];\n return {\n emailIds,\n selectAll: allSelected,\n };\n };\n\n executeBatchAction = ({ action, parameters }) => {\n if (this.isGlobalActionsDisabled()) return Promise.reject(new Error('invalid'));\n\n const { intl } = this.props;\n const { currentSearchParams } = this.state;\n const { stateService } = this.props;\n\n if (action === 'downloadzip') {\n const connectionId = SignalRService.getConnectionId();\n parameters = {\n ...parameters,\n signalRConnectionId: connectionId,\n };\n }\n\n const jobParameters = { ...parameters, ...this.getSelectionParams() };\n\n const url = `${config.appUrls.documents}/api/emails/${action}`;\n const allParams = {\n filterParams: currentSearchParams,\n ...jobParameters,\n };\n\n return api.base\n .post(url, allParams)\n .then(({ data }) => {\n this.setState(state => ({\n ...state,\n showUpdateTagsModal: false,\n showUpdateRelationsModal: false,\n showRemoveBatchDocumentsModal: false,\n }));\n\n const onClick = data ? () => stateService.gotoJob(data.id) : undefined;\n\n ToastrService.info(intl.formatMessage(messages.GlobalActionStarted), undefined, onClick);\n })\n .catch(handleHttpError(intl));\n };\n resendEmail = docId => {\n if (!docId) return;\n const { intl } = this.props;\n\n return api.base.post(`${config.appUrls.documents}/api/emails/Resend/${docId}`).then(\n ({ data }) => {\n if (!data) return;\n this.setState({ showResendConfirmation: false });\n ToastrService.success(intl.formatMessage(messages.TheMailHasBeenSentAgain));\n },\n error => {\n handleHttpError(intl)(error);\n },\n );\n };\n\n render() {\n const {\n initialSearchParams,\n emails,\n activeEmail,\n showDocumentDetailsModal,\n allSelected,\n showUpdateTagsModal,\n showUpdateRelationsModal,\n showRemoveBatchDocumentsModal,\n showSingleDeleteDocumentModal,\n showForwardModal,\n showCreateTodoModal,\n showSetPublicOnPortalModal,\n showShareItemModal,\n showDeleteRelationLinkModal,\n showChangeDocumentDateModal,\n activeRelationId,\n showResendConfirmation,\n showReplyToModal,\n replyAll,\n } = this.state;\n const documentUploadEndpoint = `${config.appUrls.documents}/api/documents?documentType=-1`; // -1 = document type unknown, used for recognizing\n const users = DataCacheService.getUsers();\n\n const { intl } = this.props;\n return (\n
    \n {showResendConfirmation && (\n this.setState({ showResendConfirmation: false })}\n onSave={() => this.resendEmail(activeEmail.documentId)}\n />\n )}\n {showForwardModal && (\n \n this.setState(state => ({\n ...state,\n showForwardModal: false,\n }))\n }\n />\n )}\n {showReplyToModal && (\n this.setState({ showReplyToModal: false })}\n />\n )}\n {showDocumentDetailsModal && (\n \n this.setState({\n activeEmail: { documentId: document.id },\n showSingleDeleteDocumentModal: true,\n })\n }\n onSave={document =>\n this.setState({ showDocumentDetailsModal: false }, () =>\n this.onDetailModalClosed(document),\n )\n }\n onClose={() =>\n this.setState({ showDocumentDetailsModal: false, activeEmail: undefined })\n }\n onShareItem={() => this.setState({ showShareItemModal: true })}\n />\n )}\n\n {showUpdateTagsModal && (\n \n this.setState(state => ({\n ...state,\n showUpdateTagsModal: false,\n }))\n }\n onSave={data =>\n this.executeBatchAction({\n action: 'updatetags',\n parameters: data,\n })\n }\n />\n )}\n {showUpdateRelationsModal && (\n \n this.setState(state => ({\n ...state,\n showUpdateRelationsModal: false,\n }))\n }\n onSave={data => {\n const parameters = {\n action: data.action,\n relations: data.relations.map(x => x.id),\n };\n return this.executeBatchAction({\n action: 'updaterelations',\n parameters,\n });\n }}\n />\n )}\n {showDeleteRelationLinkModal && (\n this.setState({ showDeleteRelationLinkModal: false })}\n onSave={() => {\n api.base\n .delete(\n `${config.appUrls.documents}/api/documents/Links/${activeEmail.documentId}/${activeRelationId}/3`,\n )\n .then(\n () => {\n ToastrService.success(intl.formatMessage(messages.RelationLinkDeleted));\n this.setState({\n showDeleteRelationLinkModal: false,\n emails: emails.map(x => {\n if (x.documentId === activeEmail.documentId) {\n return {\n ...x,\n relations: x.relations.filter(y => y.id !== activeRelationId),\n };\n }\n return x;\n }),\n });\n },\n error => {\n handleHttpError(intl)(error);\n },\n );\n }}\n />\n )}\n {showRemoveBatchDocumentsModal && (\n this.setState({ showRemoveBatchDocumentsModal: false })}\n onSave={() =>\n this.executeBatchAction({\n action: 'removedocuments',\n parameters: {},\n })\n }\n />\n )}\n {showSingleDeleteDocumentModal && (\n this.setState({ showSingleDeleteDocumentModal: false })}\n onSave={() => this.deleteDocument(activeEmail.documentId)}\n />\n )}\n\n {showSetPublicOnPortalModal && (\n \n this.setState(state => ({\n ...state,\n showSetPublicOnPortalModal: false,\n }))\n }\n onSave={data =>\n this.executeBatchAction({\n action: 'setispubliconportal',\n parameters: data,\n })\n }\n />\n )}\n {showChangeDocumentDateModal && (\n \n this.setState(state => ({\n ...state,\n showChangeDocumentDateModal: false,\n }))\n }\n onSave={data =>\n this.executeBatchAction({\n action: 'ChangeDocumentDate',\n parameters: data,\n })\n }\n />\n )}\n {showCreateTodoModal && (\n 0\n ? activeEmail.relations[0].id\n : undefined\n }\n onSave={() => this.setState({ showCreateTodoModal: false, activeEmail: undefined })}\n onClose={() => this.setState({ showCreateTodoModal: false, activeEmail: undefined })}\n />\n )}\n\n {showShareItemModal && (\n 0\n ? activeEmail.relations[0].id\n : undefined\n }\n relationName={\n activeEmail.relations && activeEmail.relations.length > 0\n ? getRelationName(intl, activeEmail.relations[0])\n : undefined\n }\n onClose={() => this.setState({ showShareItemModal: false })}\n />\n )}\n
    \n \n {\n this.pond = ref;\n }}\n />\n \n
    \n
    \n {intl.formatMessage(messages.Emails)}}>\n this.filtersChanged(filters)}\n selectionCount={this.getSelectionCountFormatted()}\n users={users}\n />\n \n
    \n
    \n this.setState({ showUpdateTagsModal: true })}\n onUpdateRelations={() => this.setState({ showUpdateRelationsModal: true })}\n onRemoveDocuments={() => this.setState({ showRemoveBatchDocumentsModal: true })}\n onDownloadZip={() =>\n this.executeBatchAction({\n action: 'downloadzip',\n parameters: {\n useFolderStructure: false,\n },\n })\n }\n onSendByEmail={() => this.checkCanSendEmail()}\n />\n
    \n
    \n\n this.handleListDragOver(e)}\n onDrop={e => this.handleListDrop(e)}\n style={{\n minHeight: '50vh',\n }}\n >\n this.loadEmails(searchParams, requestNr)}\n renderRow={item => this.renderRow(item)}\n >\n \n }\n className=\"\"\n />\n\n \n \n \n \n\n \n\n \n \n
    \n
    \n \n );\n }\n}\n\nexport default showWhenPermission(\n 'Documents',\n 'read',\n)(injectStateService(injectIntl(withDropZone(EmailsContainer))));\n","import { defineMessages } from 'react-intl';\n\nconst messages = defineMessages({\n OwnCompany: 'Own company',\n RevenuePerMonth: 'Revenue Per Month',\n MostValuableCustomers: 'Most valuable customers',\n MostValuableCustomersComparison: 'Most valuable customers comparison',\n RecentRelations: 'Recent relations',\n SearchRelation: 'Search relation',\n Compliancy: 'Compliancy',\n FiscalYear: 'Fiscal year',\n BilledLast3FiscalYears: 'Billed last 3 fiscal years',\n BilledThisYear: 'Billed this year',\n SwitchToCurrentFiscalYear: 'Switch to current fiscal year',\n SwitchToComparisonFiscalYears: 'Switch to comparison for last 3 fiscal years',\n CompliancePerCriterion: 'Compliance per criterion',\n ComplianceOverview: 'Compliance overview',\n SwitchToCompliancyOverviewForAllCustomers: 'Switch to compliancy overview for all customers',\n SwitchToCompliancyPerType: 'Switch to compliancy per type',\n ErrorLoadingData: 'Error loading data',\n MyTodos: \"My todo's\",\n MyRegistrations: 'My registrations',\n NewRegistration: 'New registration',\n ChangeTodoStatus: 'Change todo status',\n CreateNewToDo: 'Create new to-do',\n OpenDetails: 'Open details',\n AddRegistration: 'Add registration',\n DeleteTodo: 'Delete todo',\n DeleteTodoConfirmationMsg: 'Are you sure you want to delete this todo?',\n OpenTodosInTasklist: \"Open todo's in task list\",\n AssignedToMe: 'Assigned to me',\n AddDashboard: 'Add dashboard',\n EditLayout: 'Edit layout',\n SaveLayout: 'Save layout',\n Cancel: 'Cancel',\n ResetToDefault: 'Reset to default',\n Today: 'Today',\n Yesterday: 'Yesterday',\n ThisWeek: 'This week',\n ThisMonth: 'This month',\n Deadline: 'Deadline',\n Description: 'Description',\n Relation: 'Relation',\n Overtime: 'Overtime',\n MissingHours: 'Missing hours',\n RemainingOvertimeHours: 'Remaining overtime hours',\n AbsenceCounters: 'AbsenceCounters',\n NoAbsencesFound: 'No absences found',\n CounterBalanceStartValue:\n '{balanceDays} days of {startValueDays} remaining ({balanceHours}/{startValueHours} hours)',\n AbsenceWidgetWithoutCounterTooltip: '{balanceDays} days registered ({balanceHours} hours)',\n AddAbsence: 'Add absence',\n ShowAbsencesInDays: 'Show absences in days',\n\n // Task kpi's\n MyTasksKpis: 'My tasks - kpis',\n MyTasks: 'My tasks',\n FilterTodos: 'Show to-dos with these labels:',\n ConfigureKpis: 'Configure KPIs',\n ErrorWhileRetrievingMyTaskKpis: 'An error occurred while retrieving my task KPIs',\n NewConfigureYourTaskKpis: 'New! Configure the task KPIs you want to see',\n MyTasksFeatureHighlightTooltip:\n 'Configure the KPIs you want to see and only include the tasks where you are next in line.',\n KPIs: 'KPIs',\n});\nexport default messages;\n","import React, { useCallback, useEffect, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport Axios from 'axios';\nimport { FormattedMessage, injectIntl } from 'react-intl';\nimport classnames from 'classnames';\nimport { Chart, BarElement, Legend, LinearScale, Tooltip, CategoryScale } from 'chart.js';\nimport { Bar } from 'react-chartjs-2';\nimport intlShape from '@/shared/utils/intlShape';\n\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport FormattedCurrency from '@/shared/components/FormattedCurrency';\nimport LoadingAnimation from '@/shared/components/LoadingAnimation';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport { currencyTooltipLabelWithInlt } from '@/shared/utils/chartjsHelpers';\nimport messages from '../dashboardMessages';\n\nChart.register(Legend, LinearScale, Tooltip, CategoryScale, BarElement);\n\nconst lastIndexWithValue = array => {\n const index = array\n .slice()\n .reverse()\n .findIndex(x => !!x);\n return index >= 0 ? array.length - 1 - index : -1;\n};\n\nconst getDataSetColor = datasetIndex => (datasetIndex % 2 === 0 ? '#E0DBFD' : '#7564B6');\nconst getLabelColors = labels => labels.map((item, i) => (i % 2 === 0 ? '#E0DBFD' : '#7564B6'));\nconst getMonthLabel = (intl, month) => intl.formatMessage(listItemMsg('month', month));\n\nconst MonthlyRevenueDashboard = ({ intl, companyId }) => {\n const [showComparison, setShowComparison] = useState(false);\n const [rawData, setRawData] = useState(null);\n const [chartData, setChartData] = useState(null);\n const [totals, setTotals] = useState(null);\n\n const buildSingleYear = useCallback(() => {\n if (!rawData || !rawData.datasets) return;\n const [currentYearDataset] = rawData.datasets;\n if (!currentYearDataset) return;\n\n const lastIndex = lastIndexWithValue(currentYearDataset.values) + 1;\n\n const currentYearMonths = rawData.xLabels.slice(0, lastIndex);\n const chartXLabels = currentYearMonths.map(x => getMonthLabel(intl, parseInt(x)));\n const year = currentYearDataset.metadata;\n setTotals([{ year, total: currentYearDataset.total }]);\n setChartData({\n labels: chartXLabels,\n datasets: [\n {\n label: `${intl.formatMessage(messages.FiscalYear)} ${year}`,\n backgroundColor: getLabelColors(chartXLabels),\n borderColor: getLabelColors(chartXLabels),\n maxBarThickness: 100,\n data: currentYearDataset.values.slice(0, lastIndex),\n },\n ],\n });\n }, [rawData, intl]);\n const buildMultiYear = useCallback(() => {\n if (!rawData || !rawData.datasets) return;\n const { datasets = [], xLabels } = rawData;\n\n setTotals(datasets.map(({ total, metadata }) => ({ year: metadata, total })));\n setChartData({\n labels: xLabels.map(x => getMonthLabel(intl, parseInt(x))),\n datasets: datasets.map((dataset, idx) => ({\n label: `${intl.formatMessage(messages.FiscalYear)} ${dataset.metadata}`,\n backgroundColor: getDataSetColor(idx),\n borderColor: getDataSetColor(idx),\n maxBarThickness: 100,\n data: dataset.values,\n })),\n });\n }, [rawData, intl]);\n\n const toggleMode = () => {\n setShowComparison(!showComparison);\n };\n\n useEffect(() => {\n setRawData(null);\n setChartData(null);\n const cancelToken = Axios.CancelToken.source();\n\n api.base\n .get(`${config.appUrls.api}/api/Invoice/BilledPerMonth/`, {\n params: {\n companyId,\n },\n cancelToken: cancelToken.token,\n })\n .then(({ data }) => {\n setRawData(data || {});\n }, handleHttpError(intl));\n return () => {\n if (cancelToken) cancelToken.cancel('Operation canceled due to new request.');\n };\n }, [companyId, intl]);\n useEffect(() => {\n if (showComparison) {\n buildMultiYear();\n } else {\n buildSingleYear();\n }\n }, [rawData, showComparison, buildMultiYear, buildSingleYear]);\n\n const chartOptions = {\n responsive: true,\n maintainAspectRatio: false,\n scales: {\n x: {\n grid: { display: showComparison },\n },\n y: {\n ticks: {\n beginAtZero: true,\n callback: (value = 0) =>\n intl.formatNumber(value, {\n format: 'currency',\n minimumFractionDigits: 2,\n maximumFractionDigits: 2,\n }),\n },\n },\n },\n interaction: {\n mode: 'index',\n },\n\n plugins: {\n legend: {\n display: false,\n },\n tooltip: {\n enabled: true,\n xPadding: 10,\n yPadding: 10,\n displayColors: false,\n callbacks: {\n label: context => currencyTooltipLabelWithInlt(context, intl),\n },\n },\n },\n };\n\n const loading = !rawData;\n const hasData = !!(chartData && chartData.datasets && chartData.datasets.length);\n\n return (\n
    \n
    \n \n {!!rawData && (\n toggleMode()}\n >\n \n \n )}\n
    \n \n {loading && }\n {!loading && hasData && (\n
    \n \n
    \n )}\n
    \n {!loading && hasData && !!totals && (\n
    \n {totals.map(x => (\n
    \n \n {x.year}:{' '}\n \n \n \n \n
    \n ))}\n
    \n )}\n \n );\n};\n\nMonthlyRevenueDashboard.propTypes = {\n intl: intlShape.isRequired,\n companyId: PropTypes.string.isRequired,\n};\n\nexport default injectIntl(MonthlyRevenueDashboard);\n","import React, { useCallback, useEffect, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport Axios from 'axios';\nimport { FormattedMessage, injectIntl } from 'react-intl';\nimport classnames from 'classnames';\nimport { Chart, BarElement, Legend, LinearScale, Tooltip, CategoryScale } from 'chart.js';\nimport { Bar } from 'react-chartjs-2';\nimport intlShape from '@/shared/utils/intlShape';\n\nimport LoadingAnimation from '@/shared/components/LoadingAnimation';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport { currencyTooltipLabelWithInlt } from '@/shared/utils/chartjsHelpers';\n\nimport { injectStateService, StateService } from '@/shared/services/StateService';\nimport messages from '../dashboardMessages';\n\nChart.register(Legend, LinearScale, Tooltip, CategoryScale, BarElement);\nconst getDataSetColor = datasetIndex => (datasetIndex % 2 === 0 ? '#E0DBFD' : '#7564B6');\nconst getLabelColors = labels => labels.map((item, i) => (i % 2 === 0 ? '#E0DBFD' : '#7564B6'));\n\nconst TopCustomerRevenueDashboard = ({ intl, companyId, stateService }) => {\n const [showComparison, setShowComparison] = useState(false);\n const [rawData, setRawData] = useState(null);\n const [chartData, setChartData] = useState(null);\n\n const buildSingleYear = useCallback(() => {\n if (!rawData || !rawData.datasets) return;\n const [currentYearDataset] = rawData.datasets;\n if (!currentYearDataset) return;\n\n const chartXLabels = rawData.xLabels;\n const year = currentYearDataset.metadata;\n setChartData({\n labels: rawData.xLabels,\n datasets: [\n {\n label: `${intl.formatMessage(messages.FiscalYear)} ${year}`,\n backgroundColor: getLabelColors(chartXLabels),\n borderColor: getLabelColors(chartXLabels),\n maxBarThickness: 100,\n data: currentYearDataset.values,\n },\n ],\n });\n }, [intl, rawData]);\n const buildMultiYear = useCallback(() => {\n if (!rawData || !rawData.datasets) return;\n const { datasets = [], xLabels } = rawData;\n setChartData({\n labels: xLabels,\n datasets: datasets.map((dataset, idx) => ({\n label: `${intl.formatMessage(messages.FiscalYear)} ${dataset.metadata}`,\n backgroundColor: getDataSetColor(idx),\n borderColor: getDataSetColor(idx),\n maxBarThickness: 100,\n data: dataset.values,\n })),\n });\n }, [intl, rawData]);\n\n const toggleMode = () => {\n setShowComparison(!showComparison);\n };\n\n useEffect(() => {\n setRawData(null);\n setChartData(null);\n const cancelToken = Axios.CancelToken.source();\n\n api.base\n .get(`${config.appUrls.api}/api/Invoice/TopCustomerRevenue/`, {\n params: {\n companyId,\n },\n cancelToken: cancelToken.token,\n })\n .then(({ data }) => {\n setRawData(data || {});\n }, handleHttpError(intl));\n return () => {\n if (cancelToken) cancelToken.cancel('Operation canceled due to new request.');\n };\n }, [companyId, intl]);\n useEffect(() => {\n if (showComparison) {\n buildMultiYear();\n } else {\n buildSingleYear();\n }\n }, [rawData, showComparison, buildMultiYear, buildSingleYear]);\n\n const chartOptions = {\n responsive: true,\n maintainAspectRatio: false,\n scales: {\n x: {\n grid: { display: showComparison },\n ticks: {\n callback(idx) {\n const scale = this;\n const value = scale.getLabelForValue(idx);\n if (value.length > 5) {\n const substring = value.substr(0, 5);\n return `${substring}..`;\n }\n return value;\n },\n },\n },\n y: {\n ticks: {\n beginAtZero: true,\n callback: (value = 0) =>\n intl.formatNumber(value, {\n format: 'currency',\n minimumFractionDigits: 2,\n maximumFractionDigits: 2,\n }),\n },\n },\n },\n interaction: {\n mode: 'index',\n },\n plugins: {\n legend: {\n display: false,\n },\n tooltip: {\n enabled: true,\n xPadding: 10,\n yPadding: 10,\n displayColors: false,\n callbacks: {\n label: context => currencyTooltipLabelWithInlt(context, intl),\n },\n },\n },\n events: ['click', 'mousemove'], // this is needed, otherwise onHover is not fired\n onHover: (event, chartElement) => {\n // eslint-disable-next-line no-param-reassign\n event.native.target.style.cursor = chartElement[0] ? 'pointer' : 'default';\n },\n onClick: (event, chartElements) => {\n const [element] = chartElements || [];\n if (!element) return;\n // eslint-disable-next-line no-underscore-dangle\n const dataset = rawData.datasets[element.datasetIndex];\n // eslint-disable-next-line no-underscore-dangle\n const relationId = dataset.linkIds[element.index];\n if (!relationId) return;\n stateService.gotoRelation(relationId);\n },\n };\n\n const loading = !rawData;\n const hasData = !!(chartData && chartData.datasets && chartData.datasets.length);\n\n return (\n
    \n
    \n \n {!!rawData && (\n toggleMode()}\n >\n \n \n )}\n
    \n \n {loading && }\n {!loading && hasData && (\n
    \n \n
    \n )}\n
    \n \n );\n};\n\nTopCustomerRevenueDashboard.propTypes = {\n intl: intlShape.isRequired,\n companyId: PropTypes.string.isRequired,\n stateService: PropTypes.instanceOf(StateService).isRequired,\n};\n\nexport default injectStateService(injectIntl(TopCustomerRevenueDashboard));\n","import React, { useEffect, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { injectIntl } from 'react-intl';\nimport { Doughnut } from 'react-chartjs-2';\nimport intlShape from '@/shared/utils/intlShape';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport { Chart, Legend, LinearScale, Tooltip, CategoryScale, ArcElement } from 'chart.js';\nimport { percentageTooltipLabel } from '@/shared/utils/chartjsHelpers';\n\nChart.register(Legend, LinearScale, Tooltip, CategoryScale, ArcElement);\n\nconst ComplianceOverviewChart = ({ intl, data: rawData }) => {\n const [pieData, setPieData] = useState(null);\n\n useEffect(() => {\n const { overallOk, overallSemiOk, overallNotOk } = rawData;\n\n setPieData({\n labels: [2, 1, 0].map(x => intl.formatMessage(listItemMsg('compliancestatus', x))),\n datasets: [\n {\n data: [overallOk, overallSemiOk, overallNotOk],\n backgroundColor: [\n '#00B295',\n '#F0A800',\n '#B80016',\n ],\n hoverBackgroundColor: [\n '#00a086',\n '#d89700',\n '#a60014',\n ],\n borderColor: '#ffffff',\n hoverBorderColor: '#ffffff',\n borderWidth: 4,\n },\n ],\n });\n }, [rawData, intl]);\n const chartOptions = {\n maintainAspectRatio: false,\n\n plugins: {\n legend: {\n position: 'right',\n align: 'left',\n },\n tooltip: {\n enabled: true,\n mode: 'index',\n displayColors: false,\n callbacks: {\n label: percentageTooltipLabel,\n },\n },\n },\n };\n return !pieData ? null : ;\n};\nComplianceOverviewChart.propTypes = {\n intl: intlShape.isRequired,\n data: PropTypes.shape({}).isRequired,\n};\n\nexport default injectIntl(ComplianceOverviewChart);\n","import React, { useEffect, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { Bar } from 'react-chartjs-2';\nimport { Chart, BarElement, Legend, LinearScale, Tooltip, CategoryScale } from 'chart.js';\nimport { injectIntl } from 'react-intl';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport { percentageTooltipLabel } from '@/shared/utils/chartjsHelpers';\nimport intlShape from '@/shared/utils/intlShape';\n\nChart.register(BarElement, Legend, LinearScale, Tooltip, CategoryScale);\n\nconst CompliancePerTypeChart = ({ intl, data: rawData }) => {\n const [chartData, setChartData] = useState(null);\n\n useEffect(() => {\n const { complianceForTypes } = rawData;\n\n const orderedCompliancies = complianceForTypes\n .map(x => ({\n ...x,\n label: intl.formatMessage(listItemMsg('compliancetype', x.compliancyType)),\n }))\n .sort(dynamicSort('label'));\n\n setChartData({\n labels: orderedCompliancies.map(x =>\n intl.formatMessage(listItemMsg('compliancetype', x.compliancyType)),\n ),\n datasets: [\n {\n label: intl.formatMessage(listItemMsg('compliancestatus', 2)),\n data: orderedCompliancies.map(x => x.ok),\n backgroundColor: '#00B295',\n hoverBackgroundColor: '#00a086',\n borderColor: '#ffffff',\n hoverBorderColor: '#ffffff',\n },\n {\n label: intl.formatMessage(listItemMsg('compliancestatus', 1)),\n data: orderedCompliancies.map(x => x.partiallyOk),\n backgroundColor: '#F0A800',\n hoverBackgroundColor: '#d89700',\n borderColor: '#ffffff',\n hoverBorderColor: '#ffffff',\n },\n {\n label: intl.formatMessage(listItemMsg('compliancestatus', 0)),\n data: orderedCompliancies.map(x => x.notOk),\n backgroundColor: '#B80016',\n hoverBackgroundColor: '#a60014',\n borderColor: '#ffffff',\n hoverBorderColor: '#ffffff',\n },\n ],\n });\n }, [rawData, intl]);\n const chartOptions = {\n responsive: true,\n maintainAspectRatio: false,\n indexAxis: 'y',\n interaction: { mode: 'index' },\n\n scales: {\n x: {\n stacked: true,\n min: 0,\n max: 100,\n ticks: {\n callback: value => `${value}%`,\n },\n },\n y: {\n stacked: true,\n gridLines: { display: false },\n },\n },\n plugins: {\n tooltip: {\n enabled: true,\n displayColors: false,\n callbacks: {\n label: percentageTooltipLabel,\n },\n },\n },\n };\n return !chartData ? null : ;\n};\nCompliancePerTypeChart.propTypes = {\n intl: intlShape.isRequired,\n data: PropTypes.shape({}).isRequired,\n};\n\nexport default injectIntl(CompliancePerTypeChart);\n","import React, { useEffect, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport Axios from 'axios';\nimport { FormattedMessage, injectIntl } from 'react-intl';\nimport classnames from 'classnames';\n\nimport intlShape from '@/shared/utils/intlShape';\nimport LoadingAnimation from '@/shared/components/LoadingAnimation';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport messages from '../dashboardMessages';\nimport ComplianceOverviewChart from './ComplianceOverviewChart';\nimport CompliancePerTypeChart from './CompliancePerTypeChart';\n\nconst ComplianceDashboard = ({ intl, companyId }) => {\n const [showDetails, setShowDetails] = useState(false);\n const [rawData, setRawData] = useState(null);\n\n const toggleMode = () => {\n setShowDetails(!showDetails);\n };\n\n useEffect(() => {\n setRawData(null);\n const cancelToken = Axios.CancelToken.source();\n\n api.base\n .get(`${config.appUrls.api}/api/compliance/statistics/`, {\n params: {\n companyId,\n },\n cancelToken: cancelToken.token,\n })\n .then(({ data }) => {\n setRawData(data || {});\n }, handleHttpError(intl));\n return () => {\n if (cancelToken) cancelToken.cancel('Operation canceled due to new request.');\n };\n }, [companyId, intl]);\n\n const loading = !rawData;\n const hasData = !!(rawData && rawData.complianceForTypes && rawData.complianceForTypes.length);\n\n return (\n
    \n
    \n \n {!!rawData && (\n toggleMode()}\n >\n \n \n )}\n
    \n \n {loading && }\n {!loading && hasData && (\n
    \n {showDetails ? (\n \n ) : (\n \n )}\n
    \n )}\n
    \n \n );\n};\n\nComplianceDashboard.propTypes = {\n intl: intlShape.isRequired,\n companyId: PropTypes.string.isRequired,\n};\n\nexport default injectIntl(ComplianceDashboard);\n","import React, { useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage, injectIntl } from 'react-intl';\n\nimport { injectStateService, StateService } from '@/shared/services/StateService';\nimport RecentRelationsService from '@/shared/services/RecentRelationsService';\nimport { getRelationName, getRelationNameCode } from '@/shared/components/RelationName';\nimport intlShape from '@/shared/utils/intlShape';\n\nimport messages from '../dashboardMessages';\n\nconst RecentRelationsDashboard = ({ intl, stateService }) => {\n const [relations] = useState(RecentRelationsService.get());\n\n return (\n
    \n
    \n \n
    \n
    \n
    \n {relations &&\n relations.map(relation => {\n const name = getRelationName(intl, relation);\n const nameCode = getRelationNameCode(intl, relation);\n\n return (\n stateService.gotoRelation(relation.id)}\n >\n
    \n {name}\n
    \n {relation.location ? (\n
    \n {relation.location}\n
    \n ) : null}\n \n );\n })}\n
    \n
    \n
    \n );\n};\nRecentRelationsDashboard.propTypes = {\n intl: intlShape.isRequired,\n stateService: PropTypes.instanceOf(StateService).isRequired,\n};\n\nexport default injectStateService(injectIntl(RecentRelationsDashboard));\n","import React, { useCallback, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage, injectIntl } from 'react-intl';\nimport Downshift from 'downshift';\nimport intlShape from '@/shared/utils/intlShape';\n\nimport { injectStateService, StateService } from '@/shared/services/StateService';\nimport RelationName from '@/shared/components/RelationName';\nimport SearchRelation from '@/shared/components/SearchRelation';\nimport LoadingAnimation from '@/shared/components/LoadingAnimation';\nimport Item from '@/shared/components/input/select/Item';\n\nimport messages from '../dashboardMessages';\n\nconst itemToString = i => (i ? `${i.name} ${i.firstName}` : '');\n\nconst DropDownMenu = ({\n loading,\n relations,\n error,\n highlightedIndex,\n selectedItem,\n getItemProps,\n getMenuProps,\n}) => {\n let innerComponent = null;\n if (loading) innerComponent = ;\n if (error) innerComponent = ;\n if (!innerComponent && (!relations || !relations.length)) return null;\n return (\n
    \n \n {innerComponent ||\n relations.map((relation, index) => (\n \n \n \n ))}\n \n
    \n );\n};\n\nconst SearchRelationDashboard = ({ intl, stateService }) => {\n const [inputValue, setInputValue] = useState('');\n\n const handleStateChange = useCallback(\n (changes, { clearSelection }) => {\n if (typeof changes.selectedItem !== 'undefined') {\n if (changes.selectedItem && changes.selectedItem.id) {\n stateService.gotoRelation(changes.selectedItem.id);\n }\n clearSelection();\n } else if (typeof changes.inputValue !== 'undefined') {\n setInputValue(changes.inputValue);\n }\n },\n [stateService],\n );\n\n return (\n
    \n
    \n
    \n \n {({\n getInputProps,\n getMenuProps,\n isOpen,\n clearItems,\n setItemCount,\n highlightedIndex,\n getItemProps,\n selectedItem,\n }) => (\n
    \n \n \n {!isOpen ? null : (\n {\n clearItems();\n if (relations) {\n setItemCount(relations.length);\n }\n }}\n >\n {({ loading, relations, error }) => (\n \n )}\n \n )}\n
    \n )}\n
    \n
    \n
    \n
    \n );\n};\nSearchRelationDashboard.propTypes = {\n intl: intlShape.isRequired,\n stateService: PropTypes.instanceOf(StateService).isRequired,\n};\n\nexport default injectStateService(injectIntl(SearchRelationDashboard));\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport { injectIntl } from 'react-intl';\n\nimport config from '@/config';\nimport api from '@/shared/api';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport OutsideClickHandler from 'react-outside-click-handler';\nimport EditableToggle from './EditableToggle';\nimport MultiSelect from '../input/multiselect/MultiSelect';\n\nclass EditableTaskTagSelector extends React.Component {\n state = {\n availableTags: [],\n internalValue: [], // should be an array of objects {id, name/label}\n };\n\n async componentDidMount() {\n const { value } = this.props;\n const availableTags = await this.getAvailableTags();\n\n const internalValue =\n value && value.length ? availableTags.filter(r => value.includes(r.id)) : [];\n\n // it's possible there are invalid tag GUIDs (of tags that were deleted) in the user storage. If this is the case, we'll call the onChange method with only the valid entries\n const invalidTags =\n value && value.length ? value.filter(x => !availableTags.map(y => y.id).includes(x)) : [];\n\n this.setState({ internalValue, availableTags, initialValue: internalValue }, () => {\n if (invalidTags.length > 0) {\n const { onChange } = this.props;\n onChange(internalValue);\n }\n });\n }\n\n componentDidUpdate(prevProps) {\n const { value } = this.props;\n if (prevProps.value !== value) {\n const { availableTags } = this.state;\n\n const internalValue =\n value && value.length ? availableTags.filter(r => value.includes(r.id)) : [];\n\n this.setState({ initialValue: internalValue });\n }\n }\n\n getAvailableTags = () =>\n api.base.get(`${config.appUrls.tasks}/api/Tags`).then(({ data }) => data);\n\n onRemoveTag = tag => {\n const { internalValue } = this.state;\n return new Promise(resolve =>\n this.setState(\n {\n internalValue: internalValue.filter(x => x.id !== tag.id),\n },\n () => resolve(this.state.internalValue),\n ),\n );\n };\n\n onAddTag = tagName =>\n new Promise(resolve => {\n if (!tagName) {\n resolve();\n return;\n }\n const { internalValue } = this.state;\n const currentTags = internalValue ?? [];\n const currentTaskTagNames = currentTags.map(x => x.name);\n\n if (currentTaskTagNames && currentTaskTagNames.includes(tagName)) {\n resolve(this.state.internalValue);\n return;\n }\n\n return this.findOrCreateTag(tagName).then(tag =>\n this.setState(\n {\n internalValue: [...currentTags, tag],\n },\n () => resolve(this.state.internalValue),\n ),\n );\n });\n\n findOrCreateTag = tagName =>\n new Promise((resolve, reject) => {\n const { availableTags } = this.state;\n const tag = availableTags.find(t => t.name.toLowerCase() === tagName.toLowerCase());\n if (tag) {\n resolve(tag);\n } else {\n api.base.post(`${config.appUrls.tasks}/api/Tags`, { name: tagName }).then(({ data }) => {\n this.setState(\n state => ({\n availableTags: [...state.availableTags, data],\n }),\n () => resolve(data),\n );\n }, reject);\n }\n });\n\n renderDisplayValue = () => {\n const { availableTags, internalValue } = this.state;\n\n if (!internalValue || internalValue.length === 0) return null;\n const displayValue = availableTags\n .filter(r => internalValue.map(x => x.id).includes(r.id))\n .map(x => x.name)\n .join(', ');\n\n return {displayValue};\n };\n\n render() {\n const { onChange, readOnly, displayClassName, ...rest } = this.props;\n const { availableTags, initialValue } = this.state;\n\n return (\n \n {({ inputValue, setInputValue, submit }) => (\n \n ({ ...x, label: x.name }))}\n selectedItem={inputValue?.map(x => ({ ...x, label: x.name })) ?? []}\n onCreateItem={x => this.onAddTag(x).then(newValue => setInputValue(newValue))}\n onItemSelected={x => this.onAddTag(x?.name).then(newValue => setInputValue(newValue))}\n onItemRemoved={x =>\n this.onRemoveTag(x.value).then(newValue => setInputValue(newValue))\n }\n {...rest}\n />\n \n )}\n \n );\n }\n}\n\nEditableTaskTagSelector.propTypes = {\n onChange: PropTypes.func.isRequired,\n value: PropTypes.string,\n submitOnBlur: PropTypes.bool,\n placeholder: PropTypes.string,\n inputClassName: PropTypes.string,\n displayClassName: PropTypes.string,\n readOnly: PropTypes.bool,\n displayValue: PropTypes.node,\n};\nEditableTaskTagSelector.defaultProps = {\n submitOnBlur: true,\n inputClassName: '',\n displayClassName: '',\n placeholder: '',\n readOnly: false,\n displayValue: null,\n value: null,\n};\n\nexport default injectIntl(EditableTaskTagSelector);\n","import angular from 'angular';\n\nif (!Array.prototype.clear) {\n Array.prototype.clear = function() {\n if (this == null) throw new TypeError('Array.prototype.clear called on null or undefined');\n\n //Clear array without losing reference\n while (this.length > 0) this.pop();\n };\n}\n\nif (!Array.prototype.unique) {\n Array.prototype.unique = function() {\n var a = this.concat();\n for (var i = 0; i < a.length; ++i) {\n for (var j = i + 1; j < a.length; ++j) {\n if (a[i] === a[j]) a.splice(j--, 1);\n }\n }\n\n return a;\n };\n}\n\nif (!Array.prototype.sortByProperty) {\n Array.prototype.sortByProperty = function(property) {\n if (!property) return this.sort();\n var sortOrder = 1;\n if (property[0] === '-') {\n sortOrder = -1;\n property = property.substr(1);\n }\n return this.sort(function(a, b) {\n var result = a[property] < b[property] ? -1 : a[property] > b[property] ? 1 : 0;\n return result * sortOrder;\n });\n };\n}\nconst isGuid = function(value) {\n if (value == null || typeof value !== 'string' || value.length < 36) return false;\n return /^\\{?[a-fA-F0-9]{8}-([a-fA-F0-9]{4}-){3}[a-fA-F0-9]{12}\\}?$/.test(value);\n};\n\nif (!window.isGuid) {\n window.isGuid = isGuid;\n}\n\nif (!String.prototype.addParam) {\n String.prototype.addParam = function(param, value) {\n var a = document.createElement('a'),\n regex = /(?:\\?|&|&)+([^=]+)(?:=([^&]*))*/g;\n var match,\n str = [];\n a.href = this;\n param = encodeURIComponent(param);\n while ((match = regex.exec(a.search)))\n if (param !== match[1]) str.push(match[1] + (match[2] ? '=' + match[2] : ''));\n str.push(param + (value ? '=' + encodeURIComponent(value) : ''));\n a.search = str.join('&');\n return a.href;\n };\n}\n\nNumber.prototype.toTime = function() {\n var totalMinutes = Math.round(this * 60);\n return totalMinutes.minuteToTime();\n};\nNumber.prototype.minuteToTime = function() {\n var sign = this < 0 ? '-' : '';\n var h = Math.floor(Math.abs(this) / 60);\n var m = Math.abs(this) % 60;\n return sign + h + ':' + (m < 10 ? '0' : '') + m;\n};\n\nNumber.prototype.getFractionSize = function() {\n var s = this.toString();\n if (s.indexOf('.') < 0) return 0;\n var n = 0;\n\n for (var i = s.length - 1; i >= 0; i--) {\n if (isNaN(s[i])) break;\n n++;\n }\n\n return n;\n};\n\nNumber.prototype.round = function(digits) {\n var factor = Number('1e' + (digits || 0));\n return Math.round(this * factor) / factor;\n};\n\nNumber.prototype.trunc = function(digits) {\n var re = new RegExp('(-?\\\\d+\\\\.\\\\d{' + digits + '})(\\\\d)'),\n m = this.toString().match(re);\n return m ? parseFloat(m[1]) : this.valueOf();\n};\n\nDate.prototype.ISO = function() {\n return this.getFullYear() + '-' + (this.getMonth() + 1) + '-' + this.getDate();\n};\n\n// Casts the JSON object or array to the provided type.\nconst castJSON = function(json, type) {\n let items = angular.fromJson(json);\n\n if (angular.isArray(items)) {\n angular.forEach(items, (item, idx) => {\n items[idx] = new (Function.prototype.bind.apply(type, [null, item]))();\n });\n } else if (angular.isObject(items)) {\n items = new (Function.prototype.bind.apply(type, [null, items]))();\n }\n\n return items;\n};\n\nexport { castJSON, isGuid };\n","export var getTime = function () {\n var now = new Date();\n return now.getHours() * 60 + now.getMinutes();\n};\nexport var getHoursMinutesFromTime = function (time) {\n if (Number.isNaN(time))\n return '';\n var sign = time < 0 ? '-' : '';\n var value = Math.abs(time);\n var h = Math.floor(value / 60);\n var m = value % 60;\n return \"\".concat(sign).concat(h, \":\").concat(m < 10 ? '0' : '').concat(m);\n};\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport React, { useCallback, useContext, useMemo, useState } from 'react';\nimport { useDataContext } from '@/shared/providers/DataProvider';\nimport userStorage from '@/shared/services/userStorage';\nimport { KPIOptions } from '../tasks/taskboard/constants';\nexport var DashboardContext = React.createContext(null);\nexport var useDashboardContext = function () {\n var ctx = useContext(DashboardContext);\n if (!ctx) {\n throw new Error('Wrap app with DashboardProvider');\n }\n return ctx;\n};\nvar companyIdStorageKey = 'HomeDashboardCompanyId';\nvar taskKpiStorageKey = 'HomeDashboardTaskKPI';\nvar DashboardProvider = function (_a) {\n var _b, _c;\n var children = _a.children;\n var defaultCompany = useDataContext().defaultCompany;\n var _d = useState((_b = userStorage.getItem(companyIdStorageKey)) !== null && _b !== void 0 ? _b : defaultCompany === null || defaultCompany === void 0 ? void 0 : defaultCompany.id), companyId = _d[0], updateCompanyId = _d[1];\n var _e = useState((_c = userStorage.getItem(taskKpiStorageKey)) !== null && _c !== void 0 ? _c : KPIOptions.total), taskKpi = _e[0], updateTaskKpi = _e[1];\n var _f = useState(false), editMode = _f[0], setEditMode = _f[1];\n var setCompanyId = useCallback(function (value) {\n updateCompanyId(value);\n userStorage.setItem(companyIdStorageKey, value);\n }, [updateCompanyId]);\n var setTaskKpi = useCallback(function (value) {\n updateTaskKpi(value);\n userStorage.setItem(taskKpiStorageKey, value);\n }, [updateTaskKpi]);\n var value = useMemo(function () { return ({\n companyId: companyId,\n setCompanyId: setCompanyId,\n taskKpi: taskKpi,\n setTaskKpi: setTaskKpi,\n editMode: editMode,\n setEditMode: setEditMode,\n }); }, [companyId, setCompanyId, taskKpi, setTaskKpi, editMode]);\n return _jsx(DashboardContext.Provider, __assign({ value: value }, { children: children }));\n};\nexport var withDashboardProvider = function (Component) { return function (_a) {\n var passThroughProps = __rest(_a, []);\n return (_jsx(DashboardProvider, { children: _jsx(Component, __assign({}, passThroughProps)) }));\n}; };\nexport var injectDashboardContext = function (WrappedComponent) { return function (props) { return (_jsx(DashboardContext.Consumer, { children: function (service) { return _jsx(WrappedComponent, __assign({ dashboardContext: service }, props)); } })); }; };\nexport default DashboardProvider;\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport classNames from 'classnames';\nimport { useIntl } from 'react-intl';\nimport { useDashboardContext } from '../../DashboardProvider';\nvar noClick = function () { };\nvar DashboardTile = function (_a) {\n var title = _a.title, value = _a.value, _b = _a.onClick, onClick = _b === void 0 ? null : _b, _c = _a.className, className = _c === void 0 ? null : _c, _d = _a.titleClassName, titleClassName = _d === void 0 ? null : _d, style = _a.style, _e = _a.children, children = _e === void 0 ? null : _e;\n var formatMessage = useIntl().formatMessage;\n var editMode = useDashboardContext().editMode;\n var clickable = typeof onClick === 'function';\n var tileContent = (_jsxs(_Fragment, { children: [_jsx(\"div\", __assign({ className: classNames('title', titleClassName) }, { children: _jsx(\"span\", { children: typeof title === 'string' ? title : formatMessage(title) }) })), _jsx(\"div\", __assign({ className: \"value\" }, { children: _jsx(\"span\", { children: value }) })), children] }));\n if (!clickable) {\n return (_jsx(\"div\", __assign({ className: classNames('tile', className, { draggable: editMode }), style: style }, { children: tileContent })));\n }\n return (_jsx(\"button\", __assign({ className: classNames('tile', className, { draggable: editMode }), type: \"button\", onClick: editMode ? noClick : onClick, style: style }, { children: tileContent })));\n};\nexport default DashboardTile;\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport { useMemo } from 'react';\nimport { useIntl } from 'react-intl';\nimport '@/ajs/helpers';\nimport { getHoursMinutesFromTime } from '@/shared/utils/dateHelper';\nimport classNames from 'classnames';\nimport DashboardTile from './DashboardTile';\nimport messages from '../../dashboardMessages';\nvar DashboardTimeTile = function (_a) {\n var title = _a.title, _b = _a.value, value = _b === void 0 ? 0 : _b, onClick = _a.onClick, _c = _a.overtime, overtime = _c === void 0 ? 0 : _c, _d = _a.missing, missing = _d === void 0 ? 0 : _d, _e = _a.className, className = _e === void 0 ? null : _e;\n var formatMessage = useIntl().formatMessage;\n var formattedValue = useMemo(function () { return getHoursMinutesFromTime(value || 0); }, [value]);\n var formattedOvertime = useMemo(function () { return getHoursMinutesFromTime(overtime || 0); }, [overtime]);\n var formattedMissingHours = useMemo(function () { return getHoursMinutesFromTime(missing || 0); }, [missing]);\n return (_jsx(DashboardTile, __assign({ title: title, onClick: onClick, value: formattedValue, className: className }, { children: _jsxs(_Fragment, { children: [_jsxs(_Fragment, { children: [_jsx(\"div\", { className: \"separator\" }), _jsxs(\"div\", __assign({ className: \"overtime\" }, { children: [_jsx(\"label\", { children: formatMessage(messages.Overtime) }), _jsx(\"span\", { children: formattedOvertime })] }))] }), _jsxs(_Fragment, { children: [_jsx(\"div\", { className: \"separator\" }), _jsxs(\"div\", __assign({ className: \"missing\" }, { children: [_jsx(\"label\", { children: formatMessage(messages.MissingHours) }), _jsx(\"span\", __assign({ className: classNames({ red: missing > 0 }) }, { children: formattedMissingHours }))] }))] })] }) })));\n};\nexport default DashboardTimeTile;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage, injectIntl } from 'react-intl';\nimport Axios from 'axios';\n\nimport intlShape from '@/shared/utils/intlShape';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport handleHttpError from '@/shared/services/HandleHttpError';\n\nimport { injectStateService, StateService } from '@/shared/services/StateService';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport AuthService from '@/shared/services/AuthService';\nimport RelationName from '@/shared/components/RelationName';\nimport RegistrationModal from '@/shared/components/registration/RegistrationModal';\nimport { getRegistrationModalPropsForTask } from '@/shared/components/registration/registrationHelpers';\nimport Button from '@/shared/components/Button';\nimport { AddIcon } from '@/shared/components/Icons';\nimport { FaRegClock, FaRegWindowRestore, FaTrashAlt } from 'react-icons/fa';\nimport { CanCreate, CanDelete } from '@/shared/components/security';\nimport YesNoModal from '@/shared/components/YesNoModal';\nimport ScrollableTable from '@/shared/components/table/ScrollableTable';\nimport ColumnHeader from '@/shared/components/table/ColumnHeader';\nimport EditableTaskTagSelector from '@/shared/components/editable/EditableTaskTagSelector';\nimport userStorage from '@/shared/services/userStorage';\nimport classNames from 'classnames';\nimport moment from 'moment';\nimport TaskDetailsModal from '../../tasks/taskDetails/TaskDetailsModal';\nimport CreateToDoModal from '../../tasks/CreateToDoModal';\nimport TaskStatusToggle from '../../tasks/TaskStatusToggle';\nimport messages from '../dashboardMessages';\nimport FormattedDateShort from '../../../shared/components/FormattedDateShort';\n\nconst WithTagsStorageKey = 'to-do-widget-with-tags';\n\nconst defaultFilters = {\n deadlineFrom: null,\n deadlineUntil: null,\n mainStatus: [0, 1, 3],\n ownCompanies: [],\n period: 'all',\n relationTypes: [],\n taskLevels: [2], // Todo's\n userId: null,\n withTags: [],\n};\n\nconst initialParams = {\n ...defaultFilters,\n desc: false,\n page: 0,\n sortKey: 'deadline',\n pageSize: 50,\n filter: {},\n search: {},\n};\n\nclass TodoListDashboard extends Component {\n state = {\n items: [],\n currentModal: null,\n users: [],\n userId: null,\n };\n\n componentDidMount() {\n const userId = AuthService.getUserId();\n const users = DataCacheService.getUsers();\n const withTagsFromStorage = userStorage.getItem(WithTagsStorageKey) || [];\n\n this.setState({\n userId,\n users,\n initialSearchParams: {\n ...initialParams,\n withTags: withTagsFromStorage,\n },\n });\n }\n\n componentWillUnmount() {\n if (typeof this.cancelToken !== 'undefined') {\n this.cancelToken.cancel('Operation canceled due to leaving page.');\n }\n }\n\n loadItems = searchParams => {\n if (typeof this.cancelToken !== 'undefined') {\n this.cancelToken.cancel('Operation canceled due to new request.');\n }\n\n this.cancelToken = Axios.CancelToken.source();\n const { userId } = this.state;\n const { desc, sortKey, page, pageSize, ...otherParams } = searchParams;\n const params = {\n desc,\n sort: sortKey,\n page,\n take: pageSize,\n ...otherParams,\n userId,\n };\n\n return api.base\n .post(`${config.appUrls.tasks}/api/TaskList/`, params, {\n cancelToken: this.cancelToken.token,\n })\n .then(({ data }) => {\n const { tasks = [], total = 0 } = data || {};\n this.setState(({ items }) => {\n if (params.page === 0) {\n return {\n items: tasks,\n };\n }\n\n if (items.length > params.page * params.take) {\n // When a todo is created it is appended to the list.\n // But if you scroll down, it could also be in the next page request\n // So if there is a duplicate todo, we keep the one from the request because it is in the right order (sorting)\n const newItems = items.filter(x => tasks.findIndex(t => t.id === x.id) < 0);\n return {\n items: [...newItems, ...tasks],\n };\n }\n return {\n items: [...items, ...tasks],\n };\n });\n return tasks;\n })\n .catch(error => {\n if (!Axios.isCancel(error)) return error;\n });\n };\n\n openModal = modal => this.setState({ currentModal: modal });\n\n handleUpdateTasks = updatedTasks => {\n if (!updatedTasks) return;\n this.setState(({ items }) => ({\n items: items.map(row => {\n const updated = updatedTasks.find(x => x.id === row.id);\n if (!updated) return row;\n return { ...row, ...updated };\n }),\n }));\n };\n deleteTodo = taskId => {\n if (!taskId) return;\n const { intl } = this.props;\n\n return api.base\n .delete(`${config.appUrls.tasks}/api/PlannedTasks/${taskId}`, { params: { taskLevel: 2 } })\n .then(({ data }) => {\n this.setState(({ items }) => ({\n currentModal: null,\n items: items.filter(x => x.id !== taskId),\n }));\n return data;\n }, handleHttpError(intl));\n };\n\n onToDoCreated = toDo => {\n this.setState(({ items, userId }) => ({\n currentModal: null,\n items: toDo.userId && toDo.userId === userId ? [...items, toDo] : items,\n }));\n };\n\n onCloseTaskDetail = tasks => {\n if (tasks && tasks.length) {\n this.handleUpdateTasks(tasks);\n }\n this.setState({ currentModal: null });\n };\n\n openTaskList = () => {\n const { stateService, intl } = this.props;\n const { userId, initialSearchParams } = this.state;\n\n stateService.gotoState('taskflow.tasklist', {\n filters: {\n ...defaultFilters,\n userId,\n username: intl.formatMessage(messages.AssignedToMe),\n withTags: initialSearchParams.withTags,\n },\n sort: 'deadline',\n desc: false,\n });\n };\n\n closeDialogs = () => this.setState({ currentModal: null });\n\n withTagsChanged = e => {\n const { initialSearchParams } = this.state;\n const withTags = e && e.length ? e.map(x => x.id) : [];\n userStorage.setItem(WithTagsStorageKey, withTags);\n this.setState({\n initialSearchParams: {\n ...initialSearchParams,\n withTags,\n },\n });\n };\n\n renderRow = task => {\n const { intl } = this.props;\n const now = moment.utc();\n const deadlineUtc = moment.utc(task.deadline);\n\n return (\n \n \n {task.deadline ? (\n \n ) : null}\n \n \n
    \n this.openModal({ type: 'taskDetail', taskId: task.id })}\n />\n \n this.openModal({ type: 'taskDetail', taskId: task.id })}\n title={intl.formatMessage(messages.OpenDetails)}\n >\n {task.name}\n \n \n
    \n \n \n {task.relation && task.relation.id ? : null}\n \n \n \n \n this.openModal({\n type: 'registration',\n modalProps: getRegistrationModalPropsForTask(task),\n })\n }\n >\n \n \n \n this.openModal({ type: 'taskDetail', taskId: task.id })}\n >\n \n \n\n \n this.openModal({ type: 'confirmDelete', taskId: task.id })}\n >\n \n \n \n \n \n );\n };\n\n render() {\n const { items, currentModal, users, initialSearchParams } = this.state;\n const { intl } = this.props;\n\n return (\n
    \n
    \n \n
    \n
    \n \n \n \n \n \n \n
    \n
    \n \n this.openModal({ type: 'createTodo' })}\n >\n \n {intl.formatMessage(messages.CreateNewToDo)}\n \n \n {initialSearchParams && (\n
    \n {intl.formatMessage(messages.FilterTodos)} \n this.withTagsChanged(e)}\n />\n
    \n )}\n\n {!!items && items.length ? (\n
    \n \n \n \n
    \n ) : null}\n
    \n {currentModal && currentModal.type === 'createTodo' && (\n \n )}\n {currentModal && currentModal.type === 'taskDetail' && (\n \n )}\n {currentModal && currentModal.type === 'registration' && (\n \n )}\n {currentModal && currentModal.type === 'confirmDelete' && (\n this.deleteTodo(currentModal.taskId)}\n />\n )}\n
    \n );\n }\n}\n\nTodoListDashboard.propTypes = {\n intl: intlShape.isRequired,\n stateService: PropTypes.instanceOf(StateService).isRequired,\n};\n\nexport default injectStateService(injectIntl(TodoListDashboard));\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexport var TaskBoardFilterType;\n(function (TaskBoardFilterType) {\n TaskBoardFilterType[\"invoiceStreamId\"] = \"invoiceStreamId\";\n TaskBoardFilterType[\"relationId\"] = \"relationId\";\n TaskBoardFilterType[\"relationName\"] = \"relationName\";\n TaskBoardFilterType[\"taskId\"] = \"taskId\";\n TaskBoardFilterType[\"taskTemplates\"] = \"taskTemplates\";\n TaskBoardFilterType[\"subtaskId\"] = \"subtaskId\";\n TaskBoardFilterType[\"userId\"] = \"userId\";\n TaskBoardFilterType[\"relationUserId\"] = \"relationUserId\";\n TaskBoardFilterType[\"status\"] = \"status\";\n TaskBoardFilterType[\"subtaskStatus\"] = \"subtaskStatus\";\n TaskBoardFilterType[\"kpi\"] = \"kpi\";\n TaskBoardFilterType[\"deadlineFrom\"] = \"deadlineFrom\";\n TaskBoardFilterType[\"deadlineUntil\"] = \"deadlineUntil\";\n TaskBoardFilterType[\"plannedTaskId\"] = \"plannedTaskId\";\n TaskBoardFilterType[\"periodicityId\"] = \"periodicityId\";\n TaskBoardFilterType[\"ownCompanies\"] = \"ownCompanies\";\n TaskBoardFilterType[\"relationTags\"] = \"relationTags\";\n TaskBoardFilterType[\"withoutRelationTags\"] = \"withoutRelationTags\";\n TaskBoardFilterType[\"assistant\"] = \"assistant\";\n TaskBoardFilterType[\"responsible\"] = \"responsible\";\n TaskBoardFilterType[\"associate\"] = \"associate\";\n TaskBoardFilterType[\"assistantBackup\"] = \"assistantBackup\";\n TaskBoardFilterType[\"billingUser\"] = \"billingUser\";\n TaskBoardFilterType[\"seniorUser\"] = \"seniorUser\";\n TaskBoardFilterType[\"assignmentTemplateId\"] = \"assignmentTemplateId\";\n TaskBoardFilterType[\"endFiscalYears\"] = \"endFiscalYears\";\n TaskBoardFilterType[\"accountingSoftware\"] = \"accountingSoftware\";\n TaskBoardFilterType[\"otherSoftware\"] = \"otherSoftware\";\n TaskBoardFilterType[\"relationTypes\"] = \"relationTypes\";\n TaskBoardFilterType[\"onlySubtasksForAssignedUser\"] = \"onlySubtasksForAssignedUser\";\n TaskBoardFilterType[\"teams\"] = \"teams\";\n TaskBoardFilterType[\"vatPeriodicity\"] = \"vatPeriodicity\";\n TaskBoardFilterType[\"financialStatementScheme\"] = \"financialStatementScheme\";\n TaskBoardFilterType[\"socialSecurityFund\"] = \"socialSecurityFund\";\n TaskBoardFilterType[\"socialSecretariat\"] = \"socialSecretariat\";\n TaskBoardFilterType[\"createdBy\"] = \"createdBy\";\n TaskBoardFilterType[\"legalForms\"] = \"legalForms\";\n TaskBoardFilterType[\"withoutTags\"] = \"withoutTags\";\n TaskBoardFilterType[\"withTags\"] = \"withTags\";\n TaskBoardFilterType[\"userIsNextAssignedUser\"] = \"userIsNextAssignedUser\";\n TaskBoardFilterType[\"includeDoneTasksInThePast\"] = \"includeDoneTasksInThePast\";\n TaskBoardFilterType[\"relationGroups\"] = \"relationGroups\";\n TaskBoardFilterType[\"year\"] = \"year\";\n})(TaskBoardFilterType || (TaskBoardFilterType = {}));\nexport var KPIOptions;\n(function (KPIOptions) {\n KPIOptions[\"total\"] = \"total\";\n KPIOptions[\"blocked\"] = \"blocked\";\n KPIOptions[\"pastDeadline\"] = \"pastDeadline\";\n KPIOptions[\"deadlineOneWeek\"] = \"deadlineOneWeek\";\n KPIOptions[\"deadlineTwoWeeks\"] = \"deadlineTwoWeeks\";\n KPIOptions[\"deadlineThreeWeeks\"] = \"deadlineThreeWeeks\";\n KPIOptions[\"deadlineFourWeeks\"] = \"deadlineFourWeeks\";\n KPIOptions[\"deadlineThreeMonths\"] = \"deadlineThreeMonths\";\n KPIOptions[\"deadlineSixMonths\"] = \"deadlineSixMonths\";\n KPIOptions[\"deadlineOneYear\"] = \"deadlineOneYear\";\n KPIOptions[\"nextUserIsMe\"] = \"nextUserIsMe\";\n})(KPIOptions || (KPIOptions = {}));\nexport var MyTasksWidgetKPIOptions;\n(function (MyTasksWidgetKPIOptions) {\n MyTasksWidgetKPIOptions[\"nextUserIsMe\"] = \"nextUserIsMe\";\n MyTasksWidgetKPIOptions[\"pastDeadline\"] = \"pastDeadline\";\n MyTasksWidgetKPIOptions[\"deadlineOneWeek\"] = \"deadlineOneWeek\";\n MyTasksWidgetKPIOptions[\"deadlineTwoWeeks\"] = \"deadlineTwoWeeks\";\n MyTasksWidgetKPIOptions[\"deadlineThreeWeeks\"] = \"deadlineThreeWeeks\";\n MyTasksWidgetKPIOptions[\"deadlineFourWeeks\"] = \"deadlineFourWeeks\";\n MyTasksWidgetKPIOptions[\"deadlineThreeMonths\"] = \"deadlineThreeMonths\";\n MyTasksWidgetKPIOptions[\"deadlineSixMonths\"] = \"deadlineSixMonths\";\n MyTasksWidgetKPIOptions[\"deadlineOneYear\"] = \"deadlineOneYear\";\n})(MyTasksWidgetKPIOptions || (MyTasksWidgetKPIOptions = {}));\nexport var migrateTaskboardFilters = function (filters) {\n var result = __assign({}, filters);\n if (result.taskId) {\n result.taskTemplates = [result.taskId];\n result.taskId = null;\n }\n return result;\n};\n","import React, { useCallback, useEffect, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage, injectIntl } from 'react-intl';\n\nimport Axios from 'axios';\nimport { injectStateService, StateService } from '@/shared/services/StateService';\nimport AuthService from '@/shared/services/AuthService';\nimport intlShape from '@/shared/utils/intlShape';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport LoadingAnimation from '@/shared/components/LoadingAnimation';\nimport Button from '@/shared/components/Button';\nimport { AddIcon } from '@/shared/components/Icons';\nimport RegistrationModal from '@/shared/components/registration/RegistrationModal';\nimport { CanCreate } from '@/shared/components/security';\nimport DashboardTimeTile from './partials/DashboardTimeTile';\n\nimport messages from '../dashboardMessages';\n\nconst MyRegistrationsDashboard = ({ intl, stateService }) => {\n const [data, setData] = useState(null);\n const [showRegistrationModal, setRegistrationModal] = useState(false);\n const [reloadCount, setReloadCount] = useState(0);\n\n useEffect(() => {\n const cancelToken = Axios.CancelToken.source();\n\n api.base\n .get(`${config.appUrls.api}/api/registration/MyDashboard/`, {\n cancelToken: cancelToken.token,\n })\n .then(response => {\n setData(response.data || {});\n }, handleHttpError(intl));\n return () => {\n if (cancelToken) cancelToken.cancel('Operation canceled due to new request.');\n };\n }, [intl, reloadCount]);\n const openRegOverview = useCallback(\n period => {\n const currentUserId = AuthService.getUserId();\n stateService.gotoRegistrationOverview({ period, userId: currentUserId });\n },\n [stateService],\n );\n\n return (\n
    \n
    \n \n
    \n
    \n {!data ? (\n \n ) : (\n
    \n
    \n openRegOverview('today')}\n />\n openRegOverview('yesterday')}\n />\n
    \n
    \n openRegOverview('week')}\n />\n openRegOverview('month')}\n />\n
    \n
    \n )}\n
    \n \n
    \n setRegistrationModal(true)}\n >\n \n {intl.formatMessage(messages.NewRegistration)}\n \n {data && data.overtimeRemaining ? (\n \n \n : \n {data.overtimeRemaining.minuteToTime()}\n \n ) : null}\n
    \n
    \n {showRegistrationModal ? (\n {\n setReloadCount(reloadCount + 1); // Force reload\n setRegistrationModal(false);\n }}\n onClose={() => setRegistrationModal(false)}\n editableRelation\n />\n ) : null}\n
    \n );\n};\nMyRegistrationsDashboard.propTypes = {\n intl: intlShape.isRequired,\n stateService: PropTypes.instanceOf(StateService).isRequired,\n};\n\nexport default injectStateService(injectIntl(MyRegistrationsDashboard));\n","export var LocalStorageKey;\n(function (LocalStorageKey) {\n LocalStorageKey[\"TaskBoardContainer_OpenTaskIdsArray\"] = \"TaskBoardContainer_OpenTaskIdsArray\";\n LocalStorageKey[\"MyTasksWidgetWhereICanStart\"] = \"MyTasksWidget_WhereICanStart\";\n LocalStorageKey[\"MyTasksWidgetConfiguredKpis\"] = \"MyTasksWidget_ConfiguredKpis\";\n})(LocalStorageKey || (LocalStorageKey = {}));\nexport var setLocalStorageItem = function (key, value) {\n localStorage.setItem(key.toString(), JSON.stringify(value));\n};\nexport var getLocalStorageItem = function (key, defaultValue) {\n var value = localStorage.getItem(key.toString());\n if (value)\n return JSON.parse(value);\n return defaultValue || undefined;\n};\n","import { defineMessages } from 'react-intl';\nvar messages = defineMessages({\n Total: { id: 'Total', defaultMessage: 'Total' },\n Blocked: { id: 'Blocked', defaultMessage: 'Blocked' },\n PastDeadline: { id: 'PastDeadline', defaultMessage: 'Past deadline' },\n DeadlineOneWeek: { id: 'DeadlineOneWeek', defaultMessage: 'Deadline one week' },\n DeadlineTwoWeeks: { id: 'DeadlineTwoWeeks', defaultMessage: 'Deadline two weeks' },\n DeadlineThreeWeeks: { id: 'DeadlineThreeWeeks', defaultMessage: 'Deadline three weeks' },\n DeadlineFourWeeks: { id: 'DeadlineFourWeeks', defaultMessage: 'Deadline four weeks' },\n deadlineThreeMonths: { id: 'DeadlineThreeMonths', defaultMessage: 'Deadline three months' },\n deadlineSixMonths: { id: 'DeadlineSixMonths', defaultMessage: 'Deadline six months' },\n deadlineOneYear: { id: 'DeadlineOneYear', defaultMessage: 'Deadline one year' },\n OnlyCountTheTasksWhereIAmTheNextAssignedUser: {\n id: 'OnlyCountTheTasksWhereIAmTheNextAssignedUser',\n defaultMessage: 'OnlyCountTheTasksWhereIAmTheNextAssignedUser',\n },\n});\nexport default messages;\nvar mapping = {\n total: messages.Total,\n blocked: messages.Blocked,\n pastDeadline: messages.PastDeadline,\n deadlineOneWeek: messages.DeadlineOneWeek,\n deadlineTwoWeeks: messages.DeadlineTwoWeeks,\n deadlineThreeWeeks: messages.DeadlineThreeWeeks,\n deadlineFourWeeks: messages.DeadlineFourWeeks,\n deadlineThreeMonths: messages.deadlineThreeMonths,\n deadlineSixMonths: messages.deadlineSixMonths,\n deadlineOneYear: messages.deadlineOneYear,\n nextUserIsMe: messages.OnlyCountTheTasksWhereIAmTheNextAssignedUser,\n};\nexport var getKpiMessage = function (kpi) {\n return mapping[kpi];\n};\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { useEffect } from 'react';\nimport { useGetTaskWidgetKPIs } from '@/shared/hooks/task/useGetTaskWidgetKPIs';\nimport { useDataContext } from '@/shared/providers/DataProvider';\nimport { useStateService } from '@/shared/services/StateService';\nimport LoadingContainer from '@/shared/components/loading/LoadingContainer';\nimport { useIntl } from 'react-intl';\nimport moment from 'moment';\nimport { MyTasksWidgetKPIOptions } from '../../../tasks/taskboard/constants';\nimport DashboardTaskKpiTile from '../partials/DashboardTaskKpiTile';\nimport messages from '../../dashboardMessages';\nvar formatMoment = function (momentValue) { return momentValue.format('YYYY-MM-DD'); };\nvar getDeadlineFilter = function (kpi) {\n var now = moment.utc();\n if (kpi === MyTasksWidgetKPIOptions.pastDeadline) {\n return {\n deadlineFrom: null,\n deadlineUntil: formatMoment(now.clone().add(-1, 'days')),\n };\n }\n if (kpi === MyTasksWidgetKPIOptions.deadlineOneWeek) {\n return {\n deadlineFrom: formatMoment(now.clone()),\n deadlineUntil: formatMoment(now.clone().add(7, 'days')),\n };\n }\n if (kpi === MyTasksWidgetKPIOptions.deadlineTwoWeeks) {\n return {\n deadlineFrom: formatMoment(now.clone().add(7, 'days')),\n deadlineUntil: formatMoment(now.clone().add(14, 'days')),\n };\n }\n if (kpi === MyTasksWidgetKPIOptions.deadlineThreeWeeks) {\n return {\n deadlineFrom: formatMoment(now.clone().add(14, 'days')),\n deadlineUntil: formatMoment(now.clone().add(21, 'days')),\n };\n }\n if (kpi === MyTasksWidgetKPIOptions.deadlineFourWeeks) {\n return {\n deadlineFrom: formatMoment(now.clone().add(21, 'days')),\n deadlineUntil: formatMoment(now.clone().add(28, 'days')),\n };\n }\n if (kpi === MyTasksWidgetKPIOptions.deadlineThreeMonths) {\n return {\n deadlineFrom: formatMoment(now.clone().add(28, 'days')),\n deadlineUntil: formatMoment(now.clone().add(3, 'months')),\n };\n }\n if (kpi === MyTasksWidgetKPIOptions.deadlineSixMonths) {\n return {\n deadlineFrom: formatMoment(now.clone().add(3, 'months')),\n deadlineUntil: formatMoment(now.clone().add(6, 'months')),\n };\n }\n if (kpi === MyTasksWidgetKPIOptions.deadlineOneYear) {\n return {\n deadlineFrom: formatMoment(now.clone().add(6, 'months')),\n deadlineUntil: formatMoment(now.clone().add(12, 'months')),\n };\n }\n return {};\n};\nexport var MultipleTaskKpiTiles = function (_a) {\n var configuredKpis = _a.configuredKpis;\n var formatMessage = useIntl().formatMessage;\n var currentUserId = useDataContext().currentUserId;\n var _b = useGetTaskWidgetKPIs(configuredKpis), kpiData = _b.data, error = _b.error, isLoading = _b.isLoading, refetch = _b.refetch;\n useEffect(function () {\n refetch();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [configuredKpis]);\n var stateService = useStateService();\n var handleClick = function (k) {\n stateService.gotoTaskboard(__assign({ userId: currentUserId, onlySubtasksForAssignedUser: true, userIsNextAssignedUser: configuredKpis.includes(MyTasksWidgetKPIOptions.nextUserIsMe) }, getDeadlineFilter(k)));\n };\n return (_jsx(\"div\", __assign({ className: \"tasks-kpi-tiles\" }, { children: _jsxs(LoadingContainer, __assign({ isLoading: isLoading }, { children: [!isLoading && error && _jsx(\"div\", { children: formatMessage(messages.ErrorWhileRetrievingMyTaskKpis) }), !isLoading && !error && (_jsx(\"div\", __assign({ className: \"tile-grid\" }, { children: configuredKpis\n .filter(function (x) { return x !== MyTasksWidgetKPIOptions.nextUserIsMe; }) // we dont wanna show a separatile tile for this, its an option to add an extra filter to the counters but its not a separate tile\n .map(function (x) {\n var _a;\n return (_jsx(DashboardTaskKpiTile, { value: (_a = kpiData === null || kpiData === void 0 ? void 0 : kpiData[x]) !== null && _a !== void 0 ? _a : 0, kpi: x, onClick: handleClick }, x));\n }) })))] })) })));\n};\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { useState } from 'react';\nimport { useIntl } from 'react-intl';\nimport { getLocalStorageItem, LocalStorageKey, setLocalStorageItem, } from '@/shared/services/localStorageService';\nimport { ModalType, useModalContext } from '@/shared/providers/ModalProvider';\nimport { FaCog } from 'react-icons/fa';\nimport { getKpiMessage } from '@/modules/tasks/taskKpiMessages';\nimport { MyTasksWidgetKPIOptions } from '@/modules/tasks/taskboard/constants';\nimport messages from '../dashboardMessages';\nimport { MultipleTaskKpiTiles } from './tasks/MultipleTaskKpiTiles';\nvar IsKpiVisibleByDefault = function (kipOptions) {\n if (kipOptions === MyTasksWidgetKPIOptions.pastDeadline ||\n kipOptions === MyTasksWidgetKPIOptions.deadlineOneWeek ||\n kipOptions === MyTasksWidgetKPIOptions.deadlineTwoWeeks ||\n kipOptions === MyTasksWidgetKPIOptions.deadlineThreeWeeks)\n return true;\n return false;\n};\nvar MyTaskKpiDashboard = function () {\n var formatMessage = useIntl().formatMessage;\n var getInitialConfiguredKpis = function () {\n var kpiConfigurationsInStorage = getLocalStorageItem(LocalStorageKey.MyTasksWidgetConfiguredKpis, []);\n var kpiConfigurations = Object.values(MyTasksWidgetKPIOptions).map(function (x) {\n var _a, _b;\n return ({\n id: x,\n label: formatMessage(getKpiMessage(x)),\n selected: (_b = (_a = kpiConfigurationsInStorage.find(function (y) { return y.id === x; })) === null || _a === void 0 ? void 0 : _a.selected) !== null && _b !== void 0 ? _b : IsKpiVisibleByDefault(x),\n individualClassName: x === MyTasksWidgetKPIOptions.nextUserIsMe ? 'margin15B' : '',\n zendeskArticle: x === MyTasksWidgetKPIOptions.nextUserIsMe ? '9580127747356' : '',\n title: x === MyTasksWidgetKPIOptions.pastDeadline ? formatMessage(messages.KPIs) : null,\n });\n });\n return kpiConfigurations;\n };\n var _a = useState(getInitialConfiguredKpis()), kpiConfigurations = _a[0], setKpiConfigurations = _a[1];\n var setShowModalInfo = useModalContext().setShowModalInfo;\n var openKpiConfiguration = function () { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n setShowModalInfo({\n modalType: ModalType.CheckboxList,\n showSelectAll: false,\n title: formatMessage(messages.ConfigureKpis),\n checkboxListItems: kpiConfigurations,\n onSave: function (items) { return __awaiter(void 0, void 0, void 0, function () {\n var storageItems;\n return __generator(this, function (_a) {\n storageItems = items.map(function (x) { return ({ id: x.id, selected: x.selected }); });\n setLocalStorageItem(LocalStorageKey.MyTasksWidgetConfiguredKpis, storageItems);\n setKpiConfigurations(items);\n return [2 /*return*/];\n });\n }); },\n });\n return [2 /*return*/];\n });\n }); };\n return (_jsxs(\"div\", __assign({ className: \"my-task-kpi-dashboard\" }, { children: [_jsxs(\"div\", __assign({ className: \"title-block\" }, { children: [formatMessage(messages.MyTasks), _jsx(\"span\", __assign({ className: \"pull-right \" }, { children: _jsx(\"span\", { children: _jsx(FaCog, { className: \"react-icon\", style: { marginTop: '2px' }, onClick: openKpiConfiguration }) }) }))] })), _jsx(\"div\", __assign({ className: \"content-block\" }, { children: _jsx(MultipleTaskKpiTiles, { configuredKpis: kpiConfigurations.filter(function (x) { return x.selected; }).map(function (x) { return x.id; }) }) }))] })));\n};\nexport default MyTaskKpiDashboard;\n","import config from '@/config';\nimport api from '@/shared/api';\nimport { useQuery } from '@tanstack/react-query';\nimport { useIntl } from 'react-intl';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport { TaskQueryKey } from './queryKey';\nexport var useGetTaskWidgetKPIs = function (kpis) {\n var intl = useIntl();\n var _a = useQuery([TaskQueryKey.TaskWidgetKPI], function (_a) {\n var signal = _a.signal;\n return api.base\n .get(\"\".concat(config.appUrls.tasks, \"/api/plannedTasks/kpi/widget\"), {\n params: {\n kpis: kpis,\n },\n signal: signal,\n })\n .then(function (res) { return res.data; });\n }, {\n enabled: true,\n onError: function (apiError) {\n handleHttpError(intl)(apiError);\n },\n retry: false,\n }), data = _a.data, isLoading = _a.isLoading, error = _a.error, refetch = _a.refetch;\n return {\n data: data,\n error: error,\n isLoading: isLoading,\n refetch: refetch,\n };\n};\n","import { jsx as _jsx, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport LoadingAnimation from '@/shared/components/LoadingAnimation';\nvar LoadingContainer = function (_a) {\n var isLoading = _a.isLoading, children = _a.children;\n return isLoading ? _jsx(LoadingAnimation, {}) : _jsx(_Fragment, { children: children });\n};\nexport default LoadingContainer;\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { useCallback, useMemo } from 'react';\nimport { MyTasksWidgetKPIOptions } from '@/modules/tasks/taskboard/constants';\nimport { getKpiMessage } from '@/modules/tasks/taskKpiMessages';\nimport classNames from 'classnames';\nimport DashboardTile from './DashboardTile';\nexport var getKpiStyle = function (kpi, value) {\n if (!value || value <= 0)\n return { backgroundColor: '#F2F2F2', border: ' 2px solid #F2F2F2' };\n // Not 0\n switch (kpi) {\n case MyTasksWidgetKPIOptions.pastDeadline:\n return { backgroundColor: 'rgba(184, 0, 22, 0.1)', border: '2px solid #B80016' };\n case MyTasksWidgetKPIOptions.deadlineOneWeek:\n return { backgroundColor: 'rgb(217, 147, 35, 0.1)', border: '2px solid #D99323' };\n case MyTasksWidgetKPIOptions.deadlineTwoWeeks:\n case MyTasksWidgetKPIOptions.deadlineThreeWeeks:\n return { backgroundColor: '#F2F2F2', border: ' 2px solid #F2F2F2' };\n default:\n return { backgroundColor: '#F2F2F2', border: ' 2px solid #F2F2F2' };\n }\n};\nvar DashboardTaskKpiTile = function (_a) {\n var kpi = _a.kpi, _b = _a.value, value = _b === void 0 ? 0 : _b, className = _a.className, onClick = _a.onClick;\n var title = getKpiMessage(kpi);\n var style = useMemo(function () { return getKpiStyle(kpi, value); }, [kpi, value]);\n var handleClick = useCallback(function () {\n onClick(kpi);\n }, [kpi, onClick]);\n return (_jsx(DashboardTile, { title: title, onClick: handleClick, value: value || 0, titleClassName: classNames('task-kpi-title', className), style: style }));\n};\nexport default DashboardTaskKpiTile;\n","import React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport { injectIntl, useIntl } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport { listItemMsg } from './FormattedListValue';\n\nexport const getResourceName = (intl, resource, withoutCode = false) => {\n if (!intl || !intl.formatMessage || !resource || !resource.id) return null;\n const { categoryId, categoryName, code, id, name, isDefault = false } = resource;\n const codePrefix = code && !withoutCode ? `${code} – ` : '';\n\n if (categoryId) {\n const categoryTranslation = intl.formatMessage(\n listItemMsg('resourcecategory', categoryId, categoryName),\n );\n if (isDefault) return `${codePrefix}${categoryTranslation}`;\n const resourceTranslation = intl.formatMessage(listItemMsg('resource', id, name));\n return `${codePrefix}${categoryTranslation}: ${resourceTranslation}`;\n }\n const resourceTranslation = intl.formatMessage(listItemMsg('resource', id, name));\n return `${codePrefix}${resourceTranslation}`;\n};\n\nexport const getResourceNameMapper = (intl, withoutCode = false) => resource =>\n getResourceName(intl, resource, withoutCode);\n\nclass ResourceName extends PureComponent {\n static propTypes = {\n intl: intlShape.isRequired,\n resource: PropTypes.shape({\n id: PropTypes.string.isRequired,\n name: PropTypes.string.isRequired,\n code: PropTypes.string,\n categoryId: PropTypes.string.isRequired,\n categoryName: PropTypes.string.isRequired,\n isDefault: PropTypes.bool,\n }),\n hideCode: PropTypes.bool,\n };\n static defaultProps = {\n resource: null,\n hideCode: false,\n };\n\n render() {\n const { intl, resource, hideCode, ...rest } = this.props;\n\n if (resource === null) return null;\n\n return {getResourceName(intl, resource, hideCode)};\n }\n}\n\nexport default injectIntl(ResourceName);\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { FormattedNumber } from 'react-intl';\nimport { getResourceName } from '@/shared/components/ResourceName';\nimport DashboardTile from './DashboardTile';\nimport messages from '../../dashboardMessages';\nvar DashboardAbsenceTile = function (_a) {\n var _b, _c, _d;\n var data = _a.data, className = _a.className, intl = _a.intl, inDays = _a.inDays;\n var title = getResourceName(intl, data.resource);\n var value = data.startValueDays !== null ? (_jsxs(\"span\", __assign({ title: intl.formatMessage(messages.CounterBalanceStartValue, {\n balanceDays: data.balanceDays,\n balanceHours: data.balance,\n startValueHours: data.startValue,\n startValueDays: data.startValueDays,\n }) }, { children: [_jsx(FormattedNumber, { value: (_b = (inDays ? data.balanceDays : data.balance)) !== null && _b !== void 0 ? _b : 0, maximumFractionDigits: 2 }), \"\\u00A0/\\u00A0\", _jsx(FormattedNumber, { value: (_c = (inDays ? data.startValueDays : data.startValue)) !== null && _c !== void 0 ? _c : 0, maximumFractionDigits: 2 })] }))) : (_jsx(\"span\", __assign({ title: intl.formatMessage(messages.AbsenceWidgetWithoutCounterTooltip, {\n balanceDays: data.balanceDays,\n balanceHours: data.balance,\n }) }, { children: _jsx(FormattedNumber, { value: (_d = (inDays ? data.balanceDays : data.balance)) !== null && _d !== void 0 ? _d : 0, maximumFractionDigits: 2 }) })));\n return _jsx(DashboardTile, { title: title, value: value || 0, titleClassName: className });\n};\nexport default DashboardAbsenceTile;\n","import React, { useCallback, useEffect, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage, injectIntl } from 'react-intl';\nimport Toggle from 'react-toggle';\n\nimport Axios from 'axios';\nimport { injectStateService, StateService } from '@/shared/services/StateService';\nimport AuthService from '@/shared/services/AuthService';\nimport intlShape from '@/shared/utils/intlShape';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport LoadingAnimation from '@/shared/components/LoadingAnimation';\nimport Button from '@/shared/components/Button';\nimport { AddIcon } from '@/shared/components/Icons';\nimport { absenceRegistrationOptions } from '@/shared/components/registration/registrationHelpers';\nimport RegistrationModal from '@/shared/components/registration/RegistrationModal';\nimport { CanCreate } from '@/shared/components/security';\nimport ZendeskHelp from '@/shared/components/ZendeskHelp';\nimport moment from 'moment';\nimport DashboardTimeTile from './partials/DashboardTimeTile';\nimport userStorage from '@/shared/services/userStorage';\n\nimport messages from '../dashboardMessages';\nimport DashboardAbsenceTile from './partials/DashboardAbsenceTile';\n\nconst InDaysStorageKey = 'AbsenceDashboardInDays';\nconst AbsenceDashboard = ({ intl, stateService }) => {\n const [data, setData] = useState(null);\n const [showRegistrationModal, setRegistrationModal] = useState(false);\n const [reloadCount, setReloadCount] = useState(0);\n const [inDays, setInDays] = useState(userStorage.getItem(InDaysStorageKey) ?? true);\n\n const currentUserId = AuthService.getUserId();\n const hasRegistrationPermission = AuthService.hasPermission({\n functionality: 'RegistrationOwn',\n privilege: 'Create',\n });\n\n const createRegistration = type => {\n setRegistrationModal({\n registration: { type, currentUserId, date: moment.utc().toDate() },\n registrationOptions: type === 3 || type === 4 ? absenceRegistrationOptions : {},\n });\n };\n\n useEffect(() => {\n const cancelToken = Axios.CancelToken.source();\n\n api.base\n .get(`${config.appUrls.api}/api/AbsenceCounter/Widget/`, {\n cancelToken: cancelToken.token,\n })\n .then(response => {\n setData(response.data || {});\n }, handleHttpError(intl));\n return () => {\n if (cancelToken) cancelToken.cancel('Operation canceled due to new request.');\n };\n }, [intl, reloadCount]);\n useEffect(() => {\n userStorage.setItem(InDaysStorageKey, inDays);\n }, [inDays]);\n const openRegOverview = useCallback(\n period => {\n const currentUserId = AuthService.getUserId();\n stateService.gotoRegistrationOverview({ period, userId: currentUserId });\n },\n [stateService],\n );\n\n return (\n
    \n
    \n \n \n
    \n
    \n {!data ? (\n \n ) : data.length > 0 ? (\n
    \n {data.map(x => (\n \n ))}\n
    \n ) : (\n {intl.formatMessage(messages.NoAbsencesFound)}\n )}\n
    \n
    \n {hasRegistrationPermission ? (\n \n ) : null}\n \n \n \n
    \n\n {showRegistrationModal && (\n {\n setRegistrationModal(null);\n setReloadCount(reloadCount + 1);\n }}\n onClose={() => setRegistrationModal(null)}\n />\n )}\n
    \n );\n};\nAbsenceDashboard.propTypes = {\n intl: intlShape.isRequired,\n stateService: PropTypes.instanceOf(StateService).isRequired,\n};\n\nexport default injectStateService(injectIntl(AbsenceDashboard));\n","import React from 'react';\nimport AuthService, { privileges, functionalities, features } from '@/shared/services/AuthService';\n\nimport messages from './dashboardMessages';\nimport MonthlyRevenueDashboard from './dashboards/MonthlyRevenueDashboard';\nimport TopCustomerRevenueDashboard from './dashboards/TopCustomerRevenueDashboard';\nimport ComplianceDashboard from './dashboards/ComplianceDashboard';\nimport RecentRelationsDashboard from './dashboards/RecentRelationsDashboard';\nimport SearchRelationDashboard from './dashboards/SearchRelationDashboard';\nimport TodoListDashboard from './dashboards/TodoListDashboard';\nimport MyRegistrationsDashboard from './dashboards/MyRegistrationsDashboard';\nimport MyTaskKpiDashboard from './dashboards/MyTaskKpiDashboard';\nimport AbsenceDashboard from './dashboards/AbsenceDashboard';\n\nconst canReadFinalInvoice = () =>\n AuthService.hasPermission({\n functionality: functionalities.InvoiceFinal,\n privilege: privileges.read,\n });\n\nconst imgStyle = { height: '100%', width: '100%' };\n/* lg: 12, md: 6, sm: 4, xs: 2 */\nconst definitions = {\n SearchRelation: {\n minW: 1,\n minH: 1,\n maxW: 6,\n maxH: 1,\n w: 2,\n h: 1,\n x: 0,\n y: 0,\n title: messages.SearchRelation,\n render: params => ,\n enabled: () =>\n AuthService.hasPermission({\n functionality: functionalities.Relation,\n privilege: privileges.Read,\n }),\n },\n RecentRelations: {\n title: messages.RecentRelations,\n render: params => ,\n enabled: () =>\n AuthService.hasPermission({\n functionality: functionalities.Relation,\n privilege: privileges.Read,\n }),\n },\n RevenuePerMonth: {\n title: messages.RevenuePerMonth,\n render: params => ,\n enabled: canReadFinalInvoice,\n },\n\n MostValuableCustomers: {\n title: messages.MostValuableCustomers,\n render: params => ,\n enabled: canReadFinalInvoice,\n },\n Compliancy: {\n title: messages.Compliancy,\n render: params => ,\n enabled: () =>\n AuthService.hasFeature(features.Compliancy) &&\n AuthService.hasPermission({\n functionality: functionalities.Relation,\n privilege: privileges.Read,\n }),\n },\n MyTodos: {\n title: messages.MyTodos,\n render: params => ,\n enabled: () =>\n AuthService.hasPermission({\n functionality: functionalities.Todo,\n privilege: privileges.Read,\n }),\n },\n MyRegistrations: {\n title: messages.MyRegistrations,\n render: params => ,\n enabled: () =>\n AuthService.hasPermission({\n functionality: functionalities.RegistrationOwn,\n privilege: privileges.Read,\n }),\n minH: 2,\n },\n MyTasksKpis: {\n title: messages.MyTasksKpis,\n render: params => ,\n enabled: () =>\n AuthService.hasPermission({\n functionality: functionalities.PlannedTask,\n privilege: privileges.Read,\n }),\n minH: 2,\n },\n Absences: {\n title: messages.AbsenceCounters,\n render: params => ,\n enabled: () =>\n AuthService.hasPermission({\n functionality: functionalities.RegistrationOwn,\n privilege: privileges.Read,\n }),\n minH: 2,\n },\n // TileExample1: {\n // w: 1,\n // h: 1,\n // maxW: 1,\n // maxH: 1,\n // isResizable: false,\n // render: () => (\n //
    \n // \n //
    \n // ),\n // },\n // TileExample2: {\n // w: 1,\n // h: 1,\n // maxW: 1,\n // maxH: 1,\n // isResizable: false,\n // render: () => (\n //
    \n // \n //
    \n // ),\n // },\n};\nexport default definitions;\n","import definitions from './dashboardsDefinitions';\n\nexport const generateFromKeys = keys => {\n if (!keys) return [];\n return keys\n .filter(key => typeof definitions[key] !== 'undefined')\n .map(key => ({\n ...definitions[key],\n i: key,\n }));\n};\n\nexport const getEnabledDashboards = () =>\n Object.keys(definitions).filter(key => {\n if (!definitions[key]) return false;\n const { enabled } = definitions[key];\n if (typeof enabled === 'undefined') return true; // No enabled property= enabled\n if (typeof enabled === 'boolean') return enabled; // Just return boolean\n if (typeof enabled === 'function') return !!enabled(); // Call function\n return !!enabled; // Unknown type, convert to bool\n });\nexport const getEnabledDashboardDefinitions = () => generateFromKeys(getEnabledDashboards());\n\nexport const breakpoints = { lg: 1200, md: 992, sm: 768, xs: 0 };\nexport const breakpointCols = { lg: 12, md: 6, sm: 4, xs: 2 };\n\nexport const defaultLayouts = {\n lg: [\n { i: 'SearchRelation', x: 0, y: 0, w: 2, h: 0.5 },\n { i: 'RecentRelations', x: 0, y: 1, w: 2, h: 6.5 },\n { i: 'RevenuePerMonth', x: 2, y: 0, w: 5, h: 4 },\n { i: 'MostValuableCustomers', x: 7, y: 0, w: 5, h: 4 },\n { i: 'Compliancy', x: 2, y: 1, w: 5, h: 3 },\n { i: 'MyTasksKpis', x: 7, y: 1, w: 5, h: 3 },\n { i: 'MyTodos', x: 7, y: 2, w: 5, h: 6 },\n { i: 'MyRegistrations', x: 2, y: 2, w: 5, h: 4 },\n { i: 'Absences', x: 2, y: 3, w: 5, h: 3 },\n ],\n md: [\n { i: 'SearchRelation', x: 0, y: 0, w: 6, h: 0.5 },\n { i: 'RecentRelations', x: 0, y: 1, w: 3, h: 4 },\n { i: 'RevenuePerMonth', x: 3, y: 1, w: 3, h: 4 },\n { i: 'Compliancy', x: 0, y: 2, w: 3, h: 4 },\n { i: 'MostValuableCustomers', x: 3, y: 2, w: 3, h: 4 },\n { i: 'MyTasksKpis', x: 0, y: 3, w: 3, h: 3 },\n { i: 'MyRegistrations', x: 0, y: 4, w: 3, h: 4 },\n { i: 'MyTodos', x: 3, y: 3, w: 3, h: 7 },\n { i: 'Absences', x: 0, y: 5, w: 3, h: 3 },\n ],\n sm: [\n { i: 'SearchRelation', x: 0, y: 0, w: 4, h: 0.5 },\n { i: 'RecentRelations', x: 0, y: 1, w: 1, h: 6 },\n { i: 'RevenuePerMonth', x: 1, y: 1, w: 3, h: 3 },\n { i: 'MostValuableCustomers', x: 1, y: 2, w: 3, h: 3 },\n { i: 'MyTasksKpis', x: 0, y: 3, w: 2, h: 3 },\n { i: 'Compliancy', x: 2, y: 3, w: 2, h: 2 },\n { i: 'MyRegistrations', x: 0, y: 4, w: 2, h: 3 },\n { i: 'MyTodos', x: 3, y: 4, w: 2, h: 4 },\n { i: 'Absences', x: 0, y: 5, w: 2, h: 2 },\n ],\n xs: [\n { i: 'SearchRelation', x: 0, y: 0, w: 2, h: 0.25 },\n { i: 'RecentRelations', x: 0, y: 1, w: 2, h: 2 },\n { i: 'RevenuePerMonth', x: 0, y: 2, w: 2, h: 2 },\n { i: 'MostValuableCustomers', x: 0, y: 3, w: 2, h: 2 },\n { i: 'Compliancy', x: 0, y: 4, w: 2, h: 2 },\n { i: 'MyTasksKpis', x: 0, y: 5, w: 2, h: 1 },\n { i: 'MyTodos', x: 0, y: 6, w: 2, h: 3 },\n { i: 'MyRegistrations', x: 0, y: 7, w: 2, h: 2 },\n { i: 'Absences', x: 0, y: 8, w: 2, h: 2 },\n ],\n};\nconst valueInRange = (value, min, max) => value >= min && value <= max;\n\nconst rectOverlap = (A, B) => {\n const xOverlap = valueInRange(A.x, B.x, B.x + B.w - 1) || valueInRange(B.x, A.x, A.x + A.w - 1);\n\n const yOverlap = valueInRange(A.y, B.y, B.y + B.h - 1) || valueInRange(B.y, A.y, A.y + A.h - 1);\n\n return xOverlap && yOverlap;\n};\n\nexport const findOpenPosition = (layout, breakpoint, w = 1, h = 1) => {\n const maxCols = breakpointCols[breakpoint] || 12;\n // Max 100 rows should be enough\n for (let y = 0; y < 100; y += 1) {\n for (let x = 0; x <= maxCols - w; x += 1) {\n const tmp = { x, y, w, h };\n const overlapping = layout.find(item => rectOverlap(item, tmp));\n if (!overlapping) return { x, y };\n }\n }\n // Normally this should not be reached, but fallback to be sure\n return { x: 0, y: 999 };\n};\n\nexport const removeItemFromLayouts = (layouts, item) => {\n const newLayouts = { ...layouts };\n Object.keys(newLayouts).forEach(breakpoint => {\n newLayouts[breakpoint] = newLayouts[breakpoint].filter(x => x.i !== item.i);\n });\n return newLayouts;\n};\nexport const addItemToLayouts = (layouts, item) => {\n const newLayouts = { ...layouts };\n Object.keys(newLayouts).forEach(breakpoint => {\n const defaultLayout = defaultLayouts[breakpoint] || [];\n const dl = defaultLayout.find(x => x.i === item.i) || {};\n const size = {\n w: item.w || dl.w || 1,\n h: item.h || dl.h || 1,\n };\n const { x = -1, y = -1 } = { ...item, ...dl };\n const position =\n item.static && (x >= 0 || y >= 0) // Fixed position, not movable\n ? { x, y }\n : findOpenPosition(newLayouts[breakpoint], breakpoint, size.w, size.h); // Otherwise find open position\n\n newLayouts[breakpoint] = [\n ...newLayouts[breakpoint],\n {\n ...item,\n ...size,\n ...position,\n },\n ];\n });\n return newLayouts;\n};\n\nexport const validateLayouts = (layouts, dashboards) => {\n const newLayouts = { ...layouts };\n Object.keys(newLayouts).forEach(breakpoint => {\n newLayouts[breakpoint] = newLayouts[breakpoint].filter(x => dashboards.some(d => d.i === x.i));\n });\n return newLayouts;\n};\n","import api from '@/shared/api';\nimport config from '@/config';\n\nconst apiUrl = `${config.appUrls.api}/api/user/dashboard/`;\n\nlet cachedLayout = null;\n\nconst cleanItem = item => {\n const { i, w, h, x, y } = item;\n return { i, w, h, x, y };\n};\nconst cleanLayout = layout => {\n if (!layout) return null;\n const newlayout = {};\n Object.keys(layout).forEach(bp => {\n newlayout[bp] = layout[bp].map(cleanItem);\n });\n return newlayout;\n};\n\nconst parseLayoutObject = layout => {\n if (!layout) return null;\n if (typeof layout === 'string') return JSON.parse(layout) || null;\n if (typeof layout === 'object') return layout;\n return null;\n};\n\nconst parseCachedLayout = () => parseLayoutObject(cachedLayout);\n\nconst saveLayout = layout => {\n const cleanedLayout = cleanLayout(parseLayoutObject(layout));\n const data = JSON.stringify(cleanedLayout);\n return api.base\n .put(\n apiUrl,\n `=${data}`, // Little hack to post as string as body\n )\n .then(() => {\n cachedLayout = data;\n });\n};\n\nconst getLayout = () => {\n if (cachedLayout !== null) return Promise.resolve(parseCachedLayout());\n return api.base.get(apiUrl).then(({ data }) => {\n cachedLayout = data || '';\n return parseCachedLayout();\n });\n};\n\nexport default {\n save: saveLayout,\n get: getLayout,\n};\n","import React, { useMemo } from 'react';\nimport { Responsive, WidthProvider } from 'react-grid-layout';\n\nconst ResponsiveGridLayout = ({ width, cols, children, breakpoints, ...rest }) => {\n const rowHeight = useMemo(() => {\n const breakpoint = Responsive.utils.getBreakpointFromWidth(breakpoints, width);\n const c = cols[breakpoint];\n // Height = parent width / number of columns / 2\n // A square is 1 width and 2 height\n return Math.max(75, width / c / 2);\n }, [width, cols, breakpoints]);\n\n return (\n ``\n {children}\n \n );\n};\n\nexport default WidthProvider(ResponsiveGridLayout);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage, injectIntl } from 'react-intl';\nimport classnames from 'classnames';\nimport { DropdownButton, MenuItem } from 'react-bootstrap';\nimport { FaExpandArrowsAlt } from 'react-icons/fa';\n\nimport { Responsive, WidthProvider } from 'react-grid-layout';\n// import Toggle from 'react-toggle';\nimport userStorage from '@/shared/services/userStorage';\nimport intlShape from '@/shared/utils/intlShape';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport Button from '@/shared/components/Button';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport {\n addItemToLayouts,\n breakpointCols,\n breakpoints,\n defaultLayouts,\n getEnabledDashboardDefinitions,\n removeItemFromLayouts,\n validateLayouts,\n} from './dashboardHelpers';\nimport layoutService from './dashboardLayoutService';\nimport messages from './dashboardMessages';\nimport ResponsiveGridLayout from './ResponsiveGridLayout';\nimport { withDashboardProvider, injectDashboardContext } from './DashboardProvider';\n\nconst dashboardParamsStorageKey = 'HomeDashboardParams';\n\nclass HomeDashboardContainer extends Component {\n state = {\n dashboards: [],\n layouts: {},\n oldLayouts: null, // To store old layout when editing, on cancel we restore this one.\n params: {},\n companies: [],\n breakpoint: 'lg',\n };\n\n componentDidMount() {\n const dataCache = DataCacheService.getDataCache();\n if (!dataCache) return;\n const dashboards = this.initDashboards();\n\n const initialCompanyId =\n DataCacheService.getDefaultCompanyForUser()?.id ?? DataCacheService.getDefaultCompany().id;\n\n layoutService.get().then(storedLayout => {\n const layouts = storedLayout || { ...defaultLayouts };\n const params = userStorage.getItem(dashboardParamsStorageKey) || {\n companyId: initialCompanyId,\n };\n this.setState({\n params,\n dashboards,\n layouts: validateLayouts(layouts, dashboards),\n companies: dataCache.company\n .map(({ id, name }) => ({ id, name }))\n .sort(dynamicSort('name')),\n });\n });\n }\n\n onBreakpointChange = (breakpoint, cols) => {\n this.setState({\n breakpoint,\n cols,\n });\n };\n onLayoutChange = (layout, layouts) => {\n this.setState({\n layouts,\n });\n };\n\n initDashboards = () => {\n const { intl } = this.props;\n\n const dashboards = getEnabledDashboardDefinitions();\n return dashboards.map(item => ({\n ...item,\n title: item.title && item.title.id ? intl.formatMessage(item.title) : item.title, // Translate title\n }));\n };\n\n reset = () => {\n this.setState(({ dashboards }) => ({\n layouts: validateLayouts({ ...defaultLayouts }, dashboards),\n }));\n };\n\n renderDashboards = () => {\n const { params, layouts = {}, breakpoint, editMode, dashboards } = this.state;\n\n const { [breakpoint]: layout = [] } = layouts;\n\n return layout.map(l => {\n const d = dashboards.find(x => x.i === l.i);\n return (\n
    \n {d.render(params)}\n {editMode && (\n \n \n \n )}\n
    \n );\n });\n };\n\n updateParams = changes => {\n this.setState(\n ({ params }) => ({\n params: { ...params, ...changes },\n }),\n () => {\n const { params } = this.state;\n userStorage.setItem(dashboardParamsStorageKey, params);\n },\n );\n };\n\n renderCompanyFilter = () => {\n const {\n companies,\n params: { companyId },\n } = this.state;\n if (!companies || companies.length <= 1) return null;\n\n return (\n
    \n \n this.updateParams({ companyId: e.target.value })}\n >\n {companies.map(c => (\n \n ))}\n \n
    \n );\n };\n renderHiddenItemsMenu = () => {\n const { dashboards, layouts = {}, breakpoint } = this.state;\n const { intl } = this.props;\n const layout = layouts[breakpoint] || [];\n const hiddenItems = dashboards\n .filter(x => !layout.some(l => l.i === x.i))\n .sort(dynamicSort('title'));\n if (!hiddenItems || !hiddenItems.length) return null;\n return (\n \n {hiddenItems.map(item => (\n this.onShowItem(item)}>\n {item.title}\n \n ))}\n \n );\n };\n\n onShowItem = item => {\n const { dashboardContext } = this.props;\n dashboardContext.setEditMode(true);\n\n this.setState(({ layouts, oldLayouts }) => ({\n oldLayouts: dashboardContext.editMode ? oldLayouts : JSON.stringify(layouts),\n layouts: addItemToLayouts(layouts, item),\n }));\n };\n onHideItem = item => {\n this.setState(({ layouts = {} }) => ({\n layouts: removeItemFromLayouts(layouts, item),\n }));\n };\n\n enableEditMode = () => {\n const { dashboardContext } = this.props;\n this.setState(({ layouts }) => ({ editMode: true, oldLayouts: JSON.stringify(layouts) }));\n dashboardContext.setEditMode(true);\n };\n saveLayout = () => {\n const { layouts } = this.state;\n const { dashboardContext } = this.props;\n return layoutService.save(layouts).then(() => {\n this.setState({ editMode: false, oldLayouts: null });\n dashboardContext.setEditMode(false);\n });\n };\n cancelLayout = () => {\n const { oldLayouts, layouts } = this.state;\n const { dashboardContext } = this.props;\n if (oldLayouts === JSON.stringify(layouts)) {\n // Nothing changed\n this.setState({ editMode: false, oldLayouts: null });\n } else {\n this.setState({ editMode: false, layouts: JSON.parse(oldLayouts) });\n }\n dashboardContext.setEditMode(false);\n };\n renderToolbar = () => {\n const { dashboardContext } = this.props;\n const { editMode } = dashboardContext;\n if (!editMode)\n return (\n \n this.enableEditMode()}\n type=\"button\"\n className=\"btn btn-default btn-sm margin10L margin10R\"\n >\n {' '}\n \n \n {this.renderHiddenItemsMenu()}\n \n );\n\n return (\n \n this.saveLayout()}\n btnClassName=\"btn-inverse btn-sm margin10L\"\n >\n \n \n this.cancelLayout()}\n type=\"button\"\n className=\"btn btn-default btn-sm margin10L margin10R\"\n >\n \n \n {this.renderHiddenItemsMenu()}\n this.reset()}\n type=\"button\"\n className=\"btn btn-default btn-sm margin10L \"\n >\n \n \n \n );\n };\n\n render() {\n const { layouts } = this.state;\n const { dashboardContext } = this.props;\n const { editMode } = dashboardContext;\n\n return (\n
    \n
    \n {this.renderCompanyFilter()}\n {this.renderToolbar()}\n
    \n \n {this.renderDashboards()}\n \n\n {/* Display current layout size, for debugging & changing default layout: */}\n {/* \n {this.state.breakpoint}\n
    */}\n {editMode ?
    : null}\n
    \n );\n }\n}\n\nHomeDashboardContainer.propTypes = {\n intl: intlShape.isRequired,\n dashboardContext: PropTypes.any.isRequired,\n};\nHomeDashboardContainer.defaultProps = {};\n\nexport default injectIntl(withDashboardProvider(injectDashboardContext(HomeDashboardContainer)));\n","import React, { Component } from 'react';\nimport { injectIntl } from 'react-intl';\n\nimport { FaEnvelope, FaPhone, FaExternalLinkAlt } from 'react-icons/fa';\n\nclass ContactIcon extends Component {\n renderIcon = type => {\n if (type === 'link') return ;\n if (type === 'phone') return ;\n if (type === 'email') return ;\n return '';\n };\n formatHref = (value, type) => {\n if (type === 'link') {\n if (value.indexOf('http://') === -1 && value.indexOf('https://') === -1) {\n value = `http://${value}`;\n }\n return value;\n }\n\n if (type === 'phone') return `tel:${value.replace(/[^0-9+]/g, '')}`;\n if (type === 'email') return `mailto:${value}`;\n };\n render() {\n const { type, value, onClick } = this.props;\n if (!value) return ;\n // override default href if an onclick was specified\n if (onClick) {\n return (\n \n {this.renderIcon(type)}   {value}\n \n );\n }\n return (\n \n {this.renderIcon(type)}   {value}\n \n );\n }\n}\nexport default injectIntl(ContactIcon);\n","import { defineMessages } from 'react-intl';\n\nconst messages = defineMessages({\n Forward: 'Forward',\n ResetFilters: 'Reset filters',\n CopyLinkToInteraction: 'Copy link to interaction',\n Share: 'Share',\n PhoneCall: 'Phone call',\n ValueCopiedToClipboard: 'Value copied to clipboard',\n Note: 'Note',\n Email: 'Email',\n Edit: 'Edit',\n Delete: 'Delete',\n Save: 'Save',\n Cancel: 'Cancel',\n Date: 'Date',\n Title: 'Title',\n Description: 'Description',\n DeleteInteractionConfirmationMsg: 'Are you sure you want to delete this communication?',\n Search: 'Search',\n ExportToPdf: 'Export to PDF',\n ThisMonth: 'This month',\n LastSixMonths: 'Last 6 months',\n All: 'all',\n Appointment: 'Meeting report',\n NoInteractionsFound: 'No interactions were found for the selected filters.',\n NewPhoneCall: 'New phone call',\n NewNote: 'New note',\n NewAppointment: 'New meeting report',\n Contacts: 'Contacts',\n Attachments: 'Attachments',\n MsgUploadAttachmentFailed: 'An error occurred while uploading the attachment',\n\n PhoneNumber: 'Phone number',\n EnterpriseNumber: 'Enterprise number',\n VatNumber: 'VAT number',\n Status: 'Status',\n Type: 'Type',\n Sector: 'Sector',\n NoContactsPresentForRelation: 'No contacts present for this relation.',\n DateMandatory: 'Date is mandatory',\n TitleOrDescriptionMandatory: 'Please enter a title or description',\n DummyInteractionTitle: 'AdminPulse interactions',\n DummyInteractionDescription:\n 'Dear,\\n\\nIn this screen you can create notes, register phone calls or write a report of a meeting you have had with this client.\\n\\nAs soon as you register a new interaction, this example will be removed.\\n\\nKind regards,\\nAdminPulse team',\n CreateTimeRegistration: 'Create time registration',\n Pin: 'Pin',\n RemovePin: 'Remove pin',\n Pinned: 'Pinned',\n InteractionPinned: 'Interaction pinned',\n InteractionUnpinned: 'Interaction unpinned',\n GoToRelation: 'Go to relation',\n From: 'From',\n Subject: 'Subject',\n OpenEmail: 'Open email',\n LastModifiedBy: 'Last modified by {name}',\n ShowInteractionsOfLinkedRelations: 'Show interactions of linked relations',\n AttachmentDeleted: 'Attachment deleted',\n SendEmail: 'SendEmail',\n EmailSent: 'Email sent',\n ToRecipient: 'To',\n Cc: 'CC',\n Bcc: 'Bcc',\n Reason: 'Reason',\n CreateNewToDo: 'Create new to-do',\n DateFrom: 'Date from',\n DateUntil: 'Date until',\n Tags: 'Tags',\n Reply: 'Reply',\n ReplyAll: 'Reply all',\n ExportToPdfStarted: 'Export started, this can take a few minutes.',\n SendInPdfViaEmail: 'Send in PDF via email',\n SomethingWentWrongWhileConvertingTheInteractionToPdf:\n 'Something went wrong while converting the interaction to pdf',\n ExportSearchResultsToPdf: 'Export search results to PDF',\n Registered: 'Registered',\n});\nexport default messages;\n","import React, { Component, Fragment } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage, injectIntl } from 'react-intl';\nimport classNames from 'classnames';\nimport Button from '@/shared/components/Button';\nimport intlShape from '@/shared/utils/intlShape';\nimport FormattedListValue, { listItemMsg } from '@/shared/components/FormattedListValue';\nimport {\n AppointmentIcon,\n MailIcon,\n NoteIcon,\n PhoneIcon,\n ToDoIcon,\n} from '@/shared/components/Icons';\nimport ContactIcon from '@/shared/components/ContactIcon';\nimport { injectStateService, StateService } from '@/shared/services/StateService';\nimport { CanCreate, CanUpdate } from '@/shared/components/security';\nimport { getRelationName } from '@/shared/components/RelationName';\nimport RelationTypeIcon from '@/shared/components/RelationTypeIcon';\nimport messages from './interactionMessages';\n\nclass RelationSummary extends Component {\n render() {\n const {\n intl,\n relation,\n onOpenCreateInteractionDialog,\n stateService,\n onSendEmail,\n onOpenCreateTodoDialog,\n } = this.props;\n\n const relationName = getRelationName(intl, relation);\n\n return (\n
    \n
    \n stateService.gotoRelation(relation.id)}\n >\n {!relation.eidPhotoUrl ? (\n \n ) : (\n \n )}\n
    \n
    \n
    \n stateService.gotoRelation(relation.id)}\n title={intl.formatMessage(messages.GoToRelation)}\n >\n \n {relationName}\n \n \n
    \n {relation && relation.alias && relation.alias !== relationName && (\n
    {relation.alias}
    \n )}\n
    {relation.address}
    \n
    {relation.city}
    \n
    \n {relation.countryCode &&\n intl.formatMessage(listItemMsg('country', relation.countryCode))}\n
    \n
    \n
    \n\n {relation.type !== 2 && (\n \n {relation.enterpriseNumber && (\n
    \n
    \n \n
    \n
    {relation.enterpriseNumber}
    \n
    \n )}\n\n {relation.vatNumber && (\n
    \n
    \n \n
    \n
    {relation.vatNumber}
    \n
    \n )}\n
    \n )}\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n {relation.type !== 2 && relation.sector && (\n
    \n
    \n \n
    \n
    \n {relation.sector !== null && (\n \n )}\n
    \n
    \n )}\n {!onOpenCreateInteractionDialog && !onSendEmail ? null : (\n
    \n \n {!!onOpenCreateInteractionDialog && (\n \n \n \n \n \n )}\n \n \n {!!onSendEmail && (\n \n )}\n \n \n {!!onOpenCreateTodoDialog && (\n \n )}\n \n
    \n )}\n
    \n \n \n
    \n \n {!relation.linkedRelations.length && (\n
    \n
    \n {!relation.linkedRelations.length && (\n \n )}\n
    \n
    \n )}\n {relation.linkedRelations.map((linkedRelation, i) => {\n const isBorderNeeded = i !== relation.linkedRelations.length - 1;\n return (\n \n
    \n

    \n stateService.gotoRelation(linkedRelation.relationId)}\n title={intl.formatMessage(messages.GoToRelation)}\n >\n {linkedRelation.relationName}\n \n

    \n

    \n {linkedRelation.linkTypes\n .map(x => intl.formatMessage(listItemMsg('linktypeto', x)))\n .join(', ')}\n

    \n
    \n
    \n {linkedRelation.phone && (\n

    \n \n

    \n )}\n {linkedRelation.mobile && !linkedRelation.phone && (\n

    \n \n

    \n )}\n {linkedRelation.email && (\n

    \n \n

    \n )}\n
    \n \n );\n })}\n \n );\n }\n}\n\nRelationSummary.propTypes = {\n stateService: PropTypes.instanceOf(StateService).isRequired,\n intl: intlShape.isRequired,\n relation: PropTypes.shape({}).isRequired,\n onOpenCreateInteractionDialog: PropTypes.func,\n onSendEmail: PropTypes.func,\n onOpenCreateTodoDialog: PropTypes.func,\n};\nRelationSummary.defaultProps = {\n onOpenCreateInteractionDialog: null,\n onSendEmail: null,\n onOpenCreateTodoDialog: null,\n};\n\nexport default injectStateService(injectIntl(RelationSummary));\n","import React, { useState, useEffect, useMemo } from 'react';\nimport PropTypes from 'prop-types';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport MultiSelect, {\n removeItem as removeMultiSelectItem,\n addItem as addMultiSelectItem,\n splitItems as splitMultiSelectItems,\n itemEquals,\n} from '@/shared/components/input/multiselect/MultiSelect';\nimport AuthService from '@/shared/services/AuthService';\n\nconst InteractionTagMultiSelect = ({\n value,\n onChange,\n placeholder,\n allowNew = false,\n idProp,\n caseSensitive = true,\n}) => {\n const [items, setItems] = useState(null);\n const canCreateTags = useMemo(\n () => AuthService.hasPermission({ functionality: 'Tags', privilege: 'Create' }),\n [],\n );\n\n useEffect(() => {\n api.base.get(`${config.appUrls.interactions}/api/tags`).then(({ data }) => {\n const newItems = (data || []).map(x => ({\n ...x,\n label: x.name,\n }));\n setItems(newItems);\n });\n }, []);\n\n const onCreateItem = inputValue => {\n if (!inputValue || !allowNew || !canCreateTags) return;\n if (items.some(x => itemEquals(x.label, inputValue, caseSensitive))) return;\n\n const item = {\n // Id will be generated in backend when saved\n name: inputValue,\n label: inputValue,\n };\n onChange(addMultiSelectItem(value, item, idProp, caseSensitive));\n setItems([...items, item]);\n };\n\n if (!items) return null;\n\n const [selectedItems, availableItems] = splitMultiSelectItems(\n items,\n value,\n idProp,\n caseSensitive,\n );\n\n return (\n onChange(removeMultiSelectItem(value, item, idProp, caseSensitive))}\n onItemSelected={item => onChange(addMultiSelectItem(value, item, idProp, caseSensitive))}\n items={availableItems}\n placeholder={placeholder}\n onCreateItem={allowNew && canCreateTags ? onCreateItem : undefined}\n />\n );\n};\nInteractionTagMultiSelect.propTypes = {\n value: PropTypes.arrayOf(PropTypes.string),\n onChange: PropTypes.func.isRequired,\n placeholder: PropTypes.string,\n allowNew: PropTypes.bool,\n caseSensitive: PropTypes.bool,\n idProp: PropTypes.string,\n};\n\nInteractionTagMultiSelect.defaultProps = {\n value: [],\n placeholder: undefined,\n allowNew: false,\n caseSensitive: true,\n idProp: 'id',\n};\n\nexport default InteractionTagMultiSelect;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage, injectIntl } from 'react-intl';\nimport classnames from 'classnames';\nimport moment from 'moment';\nimport momentPropTypes from 'react-moment-proptypes';\nimport Toggle from 'react-toggle';\nimport { FaUndo } from 'react-icons/fa';\nimport isEqual from 'lodash-es/isEqual';\nimport intlShape from '@/shared/utils/intlShape';\n\nimport { AppointmentIcon, MailIcon, NoteIcon, PhoneIcon } from '@/shared/components/Icons';\nimport DelayedDateRangePicker from '@/shared/components/input/DelayedDateRangePicker';\nimport TextSearch from '@/shared/components/input/TextSearch';\nimport InteractionTagMultiSelect from './InteractionTagMultiSelect';\nimport messages from './interactionMessages';\n\nexport const defaultFilters = {\n startDate: null,\n endDate: null,\n period: 'all',\n interactionId: null,\n showLinkedRelationInteractions: true,\n interactionTypes: [],\n search: null,\n tags: [],\n};\n\nclass InteractionFilters extends Component {\n static propTypes = {\n onFilterChange: PropTypes.func.isRequired,\n filters: PropTypes.shape({\n startDate: momentPropTypes.momentObj,\n endDate: momentPropTypes.momentObj,\n period: PropTypes.oneOf(['all', 'month', '6months']),\n search: PropTypes.string,\n tags: PropTypes.arrayOf(PropTypes.string),\n }),\n intl: intlShape.isRequired,\n };\n\n static defaultProps = {\n filters: {\n startDate: null,\n endDate: null,\n period: null,\n interactionId: null,\n search: null,\n tags: null,\n },\n };\n\n componentDidMount() {\n const { filters } = this.props;\n\n if (filters && filters.period) {\n this.setPeriod(filters.period, false);\n }\n }\n\n filterChanged = filter => {\n const { filters, onFilterChange } = this.props;\n const newFilters = { ...filters, ...filter };\n\n onFilterChange(newFilters);\n };\n\n createDateFromChanged = value => {\n this.filterChanged({ startDate: value });\n };\n createDateToChanged = value => {\n this.filterChanged({ endDate: value });\n };\n\n createDateChanged = (startDate, endDate) => {\n this.filterChanged({ startDate, endDate, period: null });\n };\n\n setPeriod = (period, reload) => {\n let startDate = null;\n let endDate = null;\n switch (period) {\n case 'all':\n case '':\n case null:\n case undefined:\n break;\n case 'month':\n startDate = moment.utc().startOf(period);\n endDate = moment.utc().endOf(period);\n break;\n case '6months':\n startDate = moment\n .utc()\n .subtract(6, 'months')\n .startOf('day');\n endDate = moment.utc().endOf('day');\n break;\n default:\n console.debug(`Unknown period: ${period}`);\n return;\n }\n if (reload) {\n this.filterChanged({ startDate, endDate, period });\n }\n };\n\n toggleShowLinkedRelationInteractions = active => {\n this.filterChanged({ showLinkedRelationInteractions: !!active });\n };\n\n filterInteractionTypes = interactionType => {\n const { filters = {} } = this.props;\n const interactionTypes = filters.interactionTypes || [];\n\n const idx = interactionTypes.indexOf(interactionType);\n if (idx >= 0) {\n this.filterChanged({ interactionTypes: interactionTypes.filter((_, i) => i !== idx) });\n } else {\n this.filterChanged({ interactionTypes: [...interactionTypes, interactionType] });\n }\n };\n\n getInteractionLabel = interactionType => {\n const { intl } = this.props;\n\n switch (interactionType) {\n case 0:\n return intl.formatMessage(messages.Note);\n case 1:\n return intl.formatMessage(messages.PhoneCall);\n case 2:\n return intl.formatMessage(messages.Email);\n case 3:\n return intl.formatMessage(messages.Appointment);\n default:\n return intl.formatMessage(messages.Note);\n }\n };\n\n getInteractionIcon = interactionType => {\n const { intl } = this.props;\n\n switch (interactionType) {\n case 0:\n return ;\n case 1:\n return ;\n case 2:\n return ;\n case 3:\n return ;\n default:\n return ;\n }\n };\n resetFilters = () => {\n this.filterChanged({ ...defaultFilters });\n };\n\n render() {\n const { filters, hasLinkedRelations, intl } = this.props;\n const defaultBtnClass = 'btn btn-default';\n\n const interactionTypes = [0, 3, 1, 2];\n\n // relationId cannot be stored in default filters constant, and we dont need it to check if filters are selected.\n const filtersToCompare = { ...filters };\n delete filtersToCompare.relationId;\n\n const hasFilters =\n filtersToCompare &&\n Object.keys(filtersToCompare).length !== 0 &&\n !isEqual(filtersToCompare, defaultFilters);\n\n return (\n
    \n
    \n
    \n \n {interactionTypes.map(interactionType => (\n {\n document.activeElement.blur();\n this.filterInteractionTypes(interactionType);\n }}\n type=\"button\"\n title={this.getInteractionLabel(interactionType)}\n className={classnames(defaultBtnClass, {\n active:\n filters &&\n filters.interactionTypes &&\n filters.interactionTypes.includes(interactionType),\n })}\n key={interactionType}\n style={{ flex: 1 }}\n >\n {this.getInteractionIcon(interactionType)}\n {this.getInteractionLabel(interactionType)}\n \n ))}\n
    \n
    \n
    \n
    \n
    \n this.createDateChanged(startDate, endDate)}\n block\n />\n
    \n
    \n
    \n this.setPeriod('month', true)}\n type=\"button\"\n className={classnames(defaultBtnClass, { active: filters.period === 'month' })}\n style={{ flex: 1 }}\n >\n \n \n this.setPeriod('6months', true)}\n type=\"button\"\n className={classnames(defaultBtnClass, {\n active: filters.period === '6months',\n })}\n style={{ flex: 1 }}\n >\n \n \n this.setPeriod('all', true)}\n type=\"button\"\n className={classnames(defaultBtnClass, {\n active: !filters.startDate && !filters.endDate,\n })}\n style={{ flex: 1 }}\n >\n \n \n
    \n
    \n
    \n
    \n
    \n this.filterChanged({ search: value })}\n />\n
    \n
    \n this.filterChanged({ tags })}\n placeholder={intl.formatMessage(messages.Tags)}\n />\n
    \n\n {hasLinkedRelations && (\n
    \n \n
    \n )}\n
    \n {hasFilters && (\n \n )}\n \n );\n }\n}\n\nexport default injectIntl(InteractionFilters);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { injectIntl, FormattedMessage } from 'react-intl';\nimport { TimelineEvent } from 'react-event-timeline';\nimport { FaPencilAlt, FaTrashAlt, FaTags } from 'react-icons/fa';\nimport lowercaseKeys from 'lowercase-keys';\nimport moment from 'moment';\nimport { MdForwardToInbox, MdReply, MdReplyAll } from 'react-icons/md';\nimport intlShape from '@/shared/utils/intlShape';\nimport DatePicker from '@/shared/components/input/DatePicker';\nimport { CanUpdate, CanCreate, CanRead, CanDelete } from '@/shared/components/security';\nimport Button from '@/shared/components/Button';\nimport TimeInput from '@/shared/components/input/TimeInput';\nimport RichTextEditor from '@/shared/components/RichTextEditor';\nimport classNames from 'classnames';\nimport dompurify from 'dompurify';\nimport AuthService from '@/shared/services/AuthService';\nimport {\n EmptyBookmarkIcon,\n BookmarkIcon,\n PhoneIcon,\n NoteIcon,\n AppointmentIcon,\n MailIcon,\n EnvelopeIcon,\n UserCircleIcon,\n AddIcon,\n ShareIcon,\n PdfIcon,\n UrlIcon,\n} from '@/shared/components/Icons';\nimport RelationName from '@/shared/components/RelationName';\nimport InlineAttachment from '@/shared/components/InlineAttachment';\nimport FileUpload from '@/shared/components/input/FileUpload';\nimport FormattedListValue from '@/shared/components/FormattedListValue';\nimport FormattedDateTime from '@/shared/components/FormattedDateTime';\nimport { isBeforeMinimum } from '@/shared/utils/validationHelpers';\nimport messages from './interactionMessages';\n\nimport InteractionTagMultiSelect from './InteractionTagMultiSelect';\n\nconst sanitizer = dompurify.sanitize;\n\nclass InteractionEvent extends Component {\n state = {};\n\n renderInteractionIcon = interactionType => {\n const { intl } = this.props;\n\n switch (interactionType) {\n case 0:\n return ;\n case 1:\n return ;\n case 2:\n return ;\n case 3:\n return ;\n default:\n return ;\n }\n };\n\n getInteractionBorderColor = interactionType => {\n switch (interactionType) {\n case 0:\n return '#757575';\n case 1:\n return '#6fba1c';\n case 2:\n return '#03a9f4';\n default:\n return '#757575';\n }\n };\n\n getInteractionLabel = interactionType => {\n const { intl } = this.props;\n switch (interactionType) {\n case 0:\n return intl.formatMessage(messages.Note);\n case 1:\n return intl.formatMessage(messages.PhoneCall);\n case 2:\n return intl.formatMessage(messages.Email);\n case 3:\n return intl.formatMessage(messages.Appointment);\n default:\n return intl.formatMessage(messages.Note);\n }\n };\n\n parseEmailMetaData = () => {\n const { interaction } = this.props;\n if (interaction.interactionType !== 2 || !interaction.metaDataJson) return null;\n\n let metadata = JSON.parse(interaction.metaDataJson);\n\n // old email interactions dont have additional metadata like to/cc/bcc/status, they're just an array of senders.\n // therefore, if this is the case, only render these senders without additional metadata\n const onlySenders = Array.isArray(metadata);\n if (!onlySenders) {\n metadata = lowercaseKeys(metadata);\n }\n return (\n \n {onlySenders ? (\n
    \n \n :\n {' '}\n {metadata.join(';')}\n
    \n ) : (\n \n
    \n \n :\n {' '}\n {metadata.from}\n
    \n
    \n \n :\n {' '}\n {metadata.to}\n
    \n {metadata.cc && (\n
    \n \n :\n {' '}\n {metadata.cc}\n
    \n )}\n {metadata.bcc && (\n
    \n \n :\n {' '}\n {metadata.bcc}\n
    \n )}\n {metadata.status > 0 && (\n
    \n \n :\n {' '}\n \n \n {metadata.status === 2 && }\n {metadata.status === 3 && }\n {metadata.status === 4 && }\n \n \n \n \n \n
    \n )}\n {metadata.reason && (\n
    \n \n :\n {' '}\n {metadata.reason}\n
    \n )}\n
    \n )}\n
    \n \n :\n {' '}\n {interaction.title}\n
    \n
    \n );\n };\n\n render() {\n const {\n intl,\n interaction,\n onEditInteraction,\n onInteractionChanged,\n onSaveInteraction,\n onDeleteInteraction,\n onEditCancel,\n onPinInteraction,\n onRemovePin,\n onOpenEmail,\n modifiedBy,\n showRelationName,\n stateService,\n onDeleteAttachment,\n documentUploadEndpoint,\n onDocumentUploaded,\n onCreateTodo,\n onShareItem,\n onForwardEmail,\n onReplyToEmail,\n onExportToPdf,\n onSendViaEmail,\n onCopyLinkToInteraction,\n } = this.props;\n const { dateFocused } = this.state;\n const momentDate = interaction.date ? moment(interaction.date) : undefined;\n\n const isEmail = interaction.interactionType === 2;\n\n // add the interactionId to the generic document upload endpoint\n const endpoint = `${documentUploadEndpoint}&linkId=${interaction.id}&documentLinkType=6`;\n\n const hasHtml =\n (interaction.description && interaction.description.includes('html>')) || isEmail;\n\n const functionality =\n interaction.createdBy === AuthService.getUserId() ? 'InteractionsOwn' : 'InteractionsOthers';\n\n const canViewDocuments = AuthService.hasPermission({\n functionality: 'documents',\n privilege: 'read',\n });\n\n return (\n (\n \n onDeleteAttachment(interaction.id, deletedAttachment)\n }\n />\n ))\n ) : (\n \n
    \n \n \n\n {showRelationName && (\n stateService.gotoRelation(interaction.relationId)}\n title={intl.formatMessage(messages.GoToRelation)}\n >\n  - \n \n \n )}\n \n \n {interaction.attachments &&\n interaction.attachments.map(attachment => (\n \n onDeleteAttachment(interaction.id, deletedAttachment)\n }\n />\n ))}\n \n
    \n
    \n )\n }\n iconColor={this.getInteractionBorderColor(interaction.interactionType)}\n icon={this.renderInteractionIcon(interaction.interactionType)}\n bubbleStyle={{ left: '2px' }}\n >\n
    \n {!interaction.editFocus && interaction.isPinned && (\n \n
    \n \n \n \n
    \n
    \n )}\n\n {!interaction.editFocus && !interaction.isPinned && (\n \n
    \n \n \n \n
    \n
    \n )}\n\n
    \n {interaction.editFocus && (\n
    \n
    \n onInteractionChanged(interaction.id, { date: value })}\n focused={dateFocused}\n onFocusChange={({ focused }) => this.setState({ dateFocused: focused })}\n id=\"interactionDate\"\n required\n small\n isOutsideRange={isBeforeMinimum}\n />\n
    \n onInteractionChanged(interaction.id, { minutes: value })}\n />\n
    \n
    \n \n
    \n onDocumentUploaded(error, file, interaction)}\n removeSuccessfullAfter={5000}\n />\n
    \n
    \n
    \n \n onInteractionChanged(interaction.id, { title: e.target.value })}\n placeholder={intl.formatMessage(messages.Title)}\n />\n
    \n
    \n \n\n \n onInteractionChanged(interaction.id, { description: newContent })\n }\n base64Images\n id={interaction.id}\n />\n
    \n
    \n \n onInteractionChanged(interaction.id, { tags })}\n allowNew\n idProp=\"label\"\n caseSensitive={false}\n />\n
    \n\n \n {intl.formatMessage(messages.Save)}\n \n \n
    \n )}\n {!interaction.editFocus && (\n
    \n {!isEmail &&

    {interaction.title}

    }\n\n {!isEmail && (\n
    \n )}\n {isEmail && (\n
    \n {/* Dont show senders if no metadata present (old emails) */}\n {interaction.metaDataJson && this.parseEmailMetaData()}\n\n
    \n \n \n \n \n \n \n \n onReplyToEmail(false)}\n btnClassName=\"btn-xs margin5R\"\n style={{ marginLeft: '-2px' }}\n >\n \n \n \n onReplyToEmail(true)}\n btnClassName=\"btn-xs margin5R\"\n style={{ marginLeft: '-2px' }}\n >\n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n
    \n )}\n
    \n )}\n
    \n\n {!interaction.editFocus && (\n
    \n {interaction.tags && interaction.tags.length > 0 && (\n \n \n  \n {interaction.tags.join(', ')}\n \n )}\n {modifiedBy && !isEmail && (\n \n \n \n \n\n {modifiedBy}\n \n )}\n {!isEmail && (\n \n \n \n \n \n )}\n {!isEmail || canViewDocuments ? (\n <>\n \n {interaction.exportingToPdf && }\n {!interaction.exportingToPdf && (\n \n )}\n \n \n \n \n \n {interaction.sendingViaEmail && }\n {!interaction.sendingViaEmail && (\n \n )}\n \n \n ) : null}\n \n \n \n \n \n \n \n \n
    \n )}\n
    \n \n );\n }\n}\n\nInteractionEvent.propTypes = {\n intl: intlShape.isRequired,\n};\nInteractionEvent.defaultProps = {};\n\nexport default injectIntl(InteractionEvent);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { injectIntl } from 'react-intl';\nimport { isEqual } from 'lodash';\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport { CanCreate } from '@/shared/components/security';\n\nimport intlShape from '@/shared/utils/intlShape';\nimport ToastrService from '@/shared/services/ToastrService';\nimport moment from 'moment';\nimport classNames from 'classnames';\nimport DatePicker from '@/shared/components/input/DatePicker';\nimport Checkbox from '@/shared/components/input/Checkbox';\nimport { AppointmentIcon, NoteIcon, PhoneIcon } from '@/shared/components/Icons';\nimport FileUpload from '@/shared/components/input/FileUpload';\nimport InlineAttachment from '@/shared/components/InlineAttachment';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport TimeInput from '@/shared/components/input/TimeInput';\nimport { isBeforeMinimum, isEmptyHtmlField } from '@/shared/utils/validationHelpers';\nimport RichTextEditor from '@/shared/components/RichTextEditor';\nimport {\n createEmptyRegistration,\n executeAction,\n isRegistrationValid,\n} from '@/shared/components/registration/registrationHelpers';\nimport RegistrationComponent from '@/shared/components/registration/RegistrationComponent';\nimport messages from './interactionMessages';\nimport InteractionTagMultiSelect from './InteractionTagMultiSelect';\n\nconst registrationOptions = {\n showDate: false,\n showRelation: false,\n editableRelation: true,\n showInteraction: false,\n showPrice: false,\n showDiscount: false,\n showVat: false,\n showTotalAmount: false,\n showBillable: false,\n showInForfait: false,\n showAssignments: true,\n};\n\nclass CreateInteractionModal extends Component {\n static propTypes = {\n onSave: PropTypes.func.isRequired,\n intl: intlShape.isRequired,\n onClose: PropTypes.func.isRequired,\n interactionType: PropTypes.number.isRequired,\n relationId: PropTypes.string.isRequired,\n documentUploadEndpoint: PropTypes.string.isRequired,\n };\n\n constructor(props) {\n super(props);\n this.RegistrationComponent = React.createRef();\n this.state = {\n interaction: {\n interactionType: props.interactionType,\n title: '',\n description: '',\n date: moment(),\n minutes: moment.duration(moment().format('HH:mm')).asMinutes(),\n attachments: [],\n },\n showRegistrationForm: false,\n saving: false,\n showValidation: false,\n registration: createEmptyRegistration({\n type: 0,\n source: 4,\n }),\n };\n }\n componentDidMount = () => {\n const { relationId } = this.props;\n api.base.post(`${config.appUrls.api}/api/relation/names`, [relationId]).then(({ data }) => {\n const [relation] = data;\n this.setState(({ registration }) => ({\n registration: executeAction(registration, 'relationChanged', relation),\n }));\n });\n };\n\n getInteractionLabel = () => {\n const { intl, interactionType } = this.props;\n\n switch (interactionType) {\n case 0:\n return intl.formatMessage(messages.NewNote);\n case 1:\n return intl.formatMessage(messages.NewPhoneCall);\n case 3:\n return intl.formatMessage(messages.NewAppointment);\n default:\n return intl.formatMessage(messages.Note);\n }\n };\n\n getInteractionIcon = () => {\n const { interactionType } = this.props;\n\n switch (interactionType) {\n case 0:\n return ;\n case 1:\n return ;\n case 3:\n return ;\n default:\n return ;\n }\n };\n\n titleChanged = value => {\n this.setState(state => ({\n ...state,\n interaction: {\n ...state.interaction,\n title: value,\n },\n }));\n };\n\n descriptionChanged = value => {\n this.setState(state => ({\n ...state,\n interaction: {\n ...state.interaction,\n description: value,\n },\n }));\n };\n doRegistrationAction = (action, value) => {\n this.setState(({ registration }) => {\n const newValue = executeAction(registration, action, value);\n if (isEqual(newValue, registration)) return {};\n return { registration: newValue };\n });\n };\n saveInteraction = () => {\n const { onSave, intl } = this.props;\n const { interaction, showRegistrationForm, registration } = this.state;\n\n if (!interaction.date) {\n ToastrService.error(intl.formatMessage(messages.DateMandatory));\n return;\n }\n\n if (isEmptyHtmlField(interaction.title) && isEmptyHtmlField(interaction.description)) {\n ToastrService.error(intl.formatMessage(messages.TitleOrDescriptionMandatory));\n return;\n }\n\n const time = moment.duration(interaction.minutes, 'minutes');\n const interactionDate = moment.utc(interaction.date);\n const newDateTime = moment([\n interactionDate.year(),\n interactionDate.month(),\n interactionDate.date(),\n time.hours(),\n time.minutes(),\n 0,\n 0,\n ]);\n\n if (!showRegistrationForm) {\n const model = {\n ...interaction,\n date: newDateTime,\n };\n return onSave(model);\n }\n\n const canSaveRegistration = isRegistrationValid(registration, registrationOptions);\n\n if (canSaveRegistration) {\n this.setState({ saving: true });\n return api.base\n .post(`${config.appUrls.api}/api/Registration/POST`, [registration])\n .then(\n ({ data }) => {\n const [saveRegistration = null] = data;\n if (saveRegistration) {\n const formattedDuration = moment\n .duration(registration.durationMinutes, 'minutes')\n .format('hh:mm', {\n trim: false,\n });\n\n // Cant access registration on state anymore here for some reason\n const content = `${formattedDuration} ${(registration.resource &&\n registration.resource.label) ||\n ''}`;\n ToastrService.info(content, intl.formatMessage(messages.Registered));\n\n const model = {\n ...interaction,\n objectId: saveRegistration.group,\n objectType: 1,\n date: newDateTime,\n };\n return onSave(model);\n }\n },\n error => {\n handleHttpError(intl)(error);\n },\n )\n .finally(() => this.setState({ saving: true }));\n }\n };\n\n onDocumentUploaded = (error, attachment) => {\n const { intl } = this.props;\n if (error) {\n ToastrService.error(intl.formatMessage(messages.MsgEmailAttachmentUploadFailed));\n return;\n }\n const { interaction } = this.state;\n\n interaction.attachments = [...interaction.attachments, attachment];\n this.setState({\n interaction,\n });\n };\n\n deleteAttachment = attachment => {\n api.base.delete(`${config.appUrls.documents}/api/documents/${attachment.id}`).then(() => {\n const { interaction } = this.state;\n\n interaction.attachments = interaction.attachments.filter(x => x.id !== attachment.id);\n\n this.setState({\n interaction,\n });\n });\n };\n\n tagsChanged = tags => {\n this.setState(({ interaction }) => ({ interaction: { ...interaction, tags } }));\n };\n dateChanged = date => {\n this.setState(({ interaction, registration }) => ({\n interaction: {\n ...interaction,\n date,\n },\n registration: executeAction(registration, 'dateChanged', date),\n }));\n };\n\n onCancel = () => {\n const { onClose, intl } = this.props;\n\n const { interaction } = this.state;\n\n if (interaction.attachments && interaction.attachments.length) {\n api.base\n .post(\n `${config.appUrls.documents}/api/documents/deleteMultiple`,\n interaction.attachments.map(x => x.id),\n )\n .then(\n () => {\n onClose();\n },\n error => {\n handleHttpError(intl)(error);\n onClose();\n },\n );\n } else {\n onClose();\n }\n };\n\n showValidation = () => this.setState({ showValidation: true });\n isFormInvalid = () => {\n const { registration, showRegistrationForm, interaction } = this.state;\n if (isEmptyHtmlField(interaction.title) && isEmptyHtmlField(interaction.description))\n return true;\n if (!interaction.date || !moment(interaction.date).isValid()) return true;\n\n if (showRegistrationForm && !isRegistrationValid(registration, registrationOptions))\n return true;\n return false;\n };\n\n render() {\n const { intl, documentUploadEndpoint } = this.props;\n const {\n interaction,\n dateFocused,\n showRegistrationForm,\n saving,\n registration,\n showValidation,\n } = this.state;\n\n const titleClassName = classNames('form-group', {\n 'has-error':\n showValidation &&\n isEmptyHtmlField(interaction.title) &&\n isEmptyHtmlField(interaction.description),\n });\n const descriptionClassName = classNames('form-group', {\n 'has-error':\n showValidation &&\n isEmptyHtmlField(interaction.title) &&\n isEmptyHtmlField(interaction.description),\n });\n const dateClassName = classNames('form-group', {\n 'has-error': showValidation && !interaction.date,\n });\n\n return (\n \n {this.getInteractionIcon()}\n {this.getInteractionLabel()}\n \n }\n show\n onClose={this.onCancel}\n onSave={this.saveInteraction}\n onHoverSave={this.showValidation}\n disabled={saving || (showValidation && this.isFormInvalid())}\n >\n
    \n
    \n
    \n \n
    \n
    \n this.setState({ dateFocused: focused })}\n id=\"interactionDate\"\n required\n block\n small\n isOutsideRange={isBeforeMinimum}\n />\n
    \n \n this.setState(state => ({\n ...state,\n interaction: {\n ...state.interaction,\n minutes: value,\n },\n }))\n }\n />\n
    \n
    \n
    \n
    \n \n
    \n \n
    \n {interaction.attachments && (\n
    \n {interaction.attachments.map(attachment => (\n \n ))}\n
    \n )}\n
    \n this.onDocumentUploaded(error, file)}\n removeSuccessfullAfter={5000}\n />\n
    \n
    \n
    \n
    \n
    \n \n
    \n this.titleChanged(e.target.value)}\n required\n maxLength={500}\n className=\"form-control\"\n />\n
    \n
    \n
    \n \n
    \n this.descriptionChanged(newContent)}\n base64Images\n id=\"new\"\n />\n
    \n
    \n
    \n \n
    \n \n
    \n
    \n
    \n
    \n \n this.setState(state => ({\n ...state,\n showRegistrationForm: !state.showRegistrationForm,\n }))\n }\n />\n
    \n
    \n {showRegistrationForm && (\n \n )}\n
    \n
    \n \n );\n }\n}\n\nexport default injectIntl(CreateInteractionModal);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { injectIntl } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport messages from '../invoicingMessages';\n\nconst RegistrationRemarkTooltip = ({ remark, internalRemark, intl }) => (\n
    \n {!!remark && (\n
    \n {remark}\n
    \n )}\n {!!internalRemark && (\n
    \n {internalRemark}\n
    \n )}\n
    \n);\nRegistrationRemarkTooltip.propTypes = {\n remark: PropTypes.string,\n internalRemark: PropTypes.string,\n intl: intlShape.isRequired,\n};\nRegistrationRemarkTooltip.defaultProps = {\n remark: null,\n internalRemark: null,\n};\n\nexport default injectIntl(RegistrationRemarkTooltip);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage, injectIntl } from 'react-intl';\nimport { Timeline } from 'react-event-timeline';\nimport LoadingAnimation from '@/shared/components/LoadingAnimation';\nimport InfiniteScroll from 'react-infinite-scroller';\nimport YesNoModal from '@/shared/components/YesNoModal';\nimport moment from 'moment';\nimport DocumentService from '@/shared/services/DocumentService';\nimport ToastrService from '@/shared/services/ToastrService';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport intlShape from '@/shared/utils/intlShape';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport SignalRService from '@/shared/services/SignalRService';\nimport Axios from 'axios';\nimport { injectStateService, StateService } from '@/shared/services/StateService';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport SingleRelationMailModal from '@/shared/components/email/SingleRelationMailModal';\nimport ShareItemModal from '@/shared/components/ShareItemModal';\nimport ForwardEmailModal from '@/shared/components/email/ForwardEmailModal';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport ReplyToEmailModal from '@/shared/components/email/ReplyToEmailModal';\nimport utils from '@/shared/utils/adminpulse';\nimport FileSaver from 'file-saver';\nimport Button from '@/shared/components/Button';\nimport { FaFilePdf } from 'react-icons/fa';\nimport AuthService, { privileges, functionalities, features } from '@/shared/services/AuthService';\nimport copy from 'copy-to-clipboard';\nimport RelationSummary from './RelationSummary';\nimport InteractionFilters from './InteractionFilters';\nimport DocumentDetailsModal from '../documents/details/DocumentDetailsModal';\nimport CreateToDoModal from '../tasks/CreateToDoModal';\nimport messages from './interactionMessages';\nimport InteractionEvent from './InteractionEvent';\nimport CreateInteractionModal from './CreateInteractionModal';\n\nconst defaultFilters = {\n showLinkedRelationInteractions: true,\n search: null,\n startDate: null,\n period: 'all',\n tags: [],\n};\n\nclass InteractionsContainer extends Component {\n constructor(props) {\n super(props);\n const { searchParams } = props;\n\n let storageFilters;\n if (\n !searchParams?.interactionFilters.interactionId &&\n localStorage.getItem('InteractionsOverviewFilters')\n ) {\n storageFilters = JSON.parse(localStorage.getItem('InteractionsOverviewFilters')) || {};\n if (storageFilters.startDate) storageFilters.startDate = moment(storageFilters.startDate);\n if (storageFilters.endDate) storageFilters.endDate = moment(storageFilters.endDate);\n delete storageFilters.interactionId; // prevent the interactionId that was saved in storage from displaying only this interaction\n // we cant fix this in the \"set storage\", because some customers already have this property in their storage unfortunately\n } else {\n storageFilters = {};\n }\n\n this.state = {\n interactions: null,\n relation: null,\n showDeleteInteractionModal: false,\n showEmailDocumentModal: false,\n showCreateTodoModal: false,\n showShareItemModal: false,\n activeDocument: null,\n hasMoreData: true,\n scrollKey: 0,\n searchParams: {\n page: -1,\n take: 10,\n ...searchParams,\n interactionFilters: {\n ...defaultFilters,\n ...storageFilters,\n ...searchParams.interactionFilters,\n },\n },\n };\n }\n\n componentDidMount() {\n this.loadRelationSummary();\n SignalRService.subscribe('interactionCreated', this.interactionCreatedHandler);\n }\n\n componentWillUnmount() {\n SignalRService.unsubscribe('interactionCreated', this.interactionCreatedHandler);\n if (typeof this.summaryToken !== typeof undefined) {\n this.summaryToken.cancel('Operation canceled');\n }\n }\n\n interactionCreatedHandler = interaction => {\n const { relation } = this.state;\n if (!relation || relation.id !== interaction.relationId) return;\n\n this.setState(state => ({\n ...state,\n showDummyInteraction: false,\n interactions: [\n ...((state.interactions || []).filter(x => x.isPinned) || []),\n interaction,\n ...((state.interactions || []).filter(x => !x.isPinned) || []),\n ],\n }));\n };\n\n loadRelationSummary = () => {\n const { searchParams } = this.state;\n const { relationId } = searchParams.interactionFilters;\n const { openMailModal, intl } = this.props;\n\n this.summaryToken = Axios.CancelToken.source();\n return api.base\n .get(`${config.appUrls.api}/api/relation/summary?id=${relationId}`, {\n cancelToken: this.summaryToken.token,\n })\n .then(({ data }) => {\n this.setState({ relation: data, showSendEmailModal: openMailModal }, () =>\n this.loadInteractions(),\n );\n\n if (data.eidDocumentPhotoId) {\n DocumentService.getLink(data.eidDocumentPhotoId).then(result => {\n this.setState(state => ({\n ...state,\n relation: {\n ...state.relation,\n eidPhotoUrl: result,\n },\n }));\n });\n }\n })\n .catch(handleHttpError(intl));\n };\n\n loadInteractions(incomingSearchParams = null) {\n const { searchParams, loading } = this.state;\n const { intl } = this.props;\n if (loading) return;\n this.setState({ loading: true });\n\n const params = incomingSearchParams || searchParams;\n const newSearchParams = {\n ...params,\n page: params.page + 1,\n };\n\n return api.base\n .post(`${config.appUrls.interactions}/api/interactions`, {\n ...params,\n ...params.interactionFilters,\n page: newSearchParams.page,\n })\n .then(({ data }) => {\n const storageFilters = { ...newSearchParams.interactionFilters };\n delete storageFilters.relationId; // dont store relationId in local storage\n localStorage.setItem('InteractionsOverviewFilters', JSON.stringify(storageFilters));\n\n return this.refreshState(data, newSearchParams);\n })\n .catch(handleHttpError(intl))\n .finally(() => this.setState({ loading: false }));\n }\n\n exportToPdf() {\n const { searchParams } = this.state;\n const { intl } = this.props;\n\n const model = {\n ...searchParams.interactionFilters,\n languageCode: 'nl',\n signalRConnectionId: SignalRService.getConnectionId(),\n };\n\n this.setState({ creatingPdf: true });\n return api.base\n .post(`${config.appUrls.interactions}/api/interactions/pdf`, model)\n .then(() => {\n ToastrService.info(intl.formatMessage(messages.ExportToPdfStarted));\n })\n .catch(handleHttpError(intl))\n .finally(() => this.setState({ creatingPdf: false }));\n }\n\n onDocumentUploaded = (error, document, interaction) => {\n const { intl } = this.props;\n\n if (error) {\n ToastrService.error(intl.formatMessage(messages.MsgUploadAttachmentFailed));\n return;\n }\n const { interactions } = this.state;\n\n this.setState({\n interactions: interactions.map(x => {\n if (x.id === interaction.id) {\n return {\n ...x,\n attachments: [...(x.attachments || []), document],\n };\n }\n return x;\n }),\n });\n };\n\n retrieveDocumentsForInteractions = interactionIds => {\n if (\n !interactionIds ||\n !interactionIds.length ||\n !AuthService.hasPermission({\n functionality: functionalities.Documents,\n privilege: privileges.read,\n })\n )\n return;\n\n const { intl } = this.props;\n\n return api.base\n .post(`${config.appUrls.documents}/api/documents/DocumentLinks`, interactionIds)\n .then(({ data }) => {\n if (!data || !data.length);\n const { interactions } = this.state;\n\n for (let index = 0; index < data.length; index++) {\n const document = data[index];\n\n const linkIds = document.links.filter(y => y.linkType === 6).map(y => y.linkId);\n\n if (!linkIds || !linkIds.length) {\n // eslint-disable-next-line no-continue\n continue;\n }\n\n // a document should only be linked to 1 interaction maximum\n const interactionId = linkIds[0];\n const interaction = interactions.find(x => x.id === interactionId);\n interaction.attachments = [...(interaction.attachments || []), document];\n }\n\n this.setState({ interactions });\n })\n .catch(handleHttpError(intl));\n };\n\n deleteAttachment = (interactionId, attachment) => {\n const { intl } = this.props;\n\n api.base.delete(`${config.appUrls.documents}/api/documents/${attachment.id}`).then(() => {\n const { interactions } = this.state;\n\n ToastrService.success(intl.formatMessage(messages.AttachmentDeleted));\n\n const interaction = interactions.find(x => x.id === interactionId);\n if (!interaction) return;\n\n interaction.attachments = interaction.attachments.filter(x => x.id !== attachment.id);\n\n this.setState({\n interactions,\n });\n });\n };\n\n refreshState(data, newSearchParams) {\n const { scrollKey, searchParams } = this.state;\n const increaseInfiniteScrollKey = newSearchParams.page === 0 && searchParams.page !== 0;\n\n // if the user did not customize the filters, and there are no interactions present, we're going to display a dummy\n // interaction.\n const noCustomFilters =\n (!newSearchParams.interactionFilters.period ||\n newSearchParams.interactionFilters.period === 'all') &&\n (!newSearchParams.interactionFilters.interactionTypes ||\n !newSearchParams.interactionFilters.interactionTypes.length);\n\n return this.setState(\n state => ({\n ...state,\n hasLinkedRelations: data.hasLinkedRelations,\n interactions:\n newSearchParams.page > 0\n ? [...state.interactions, ...data.interactions]\n : [...data.interactions],\n loading: false,\n forceLoad: false,\n hasMoreData: data.interactions.length === newSearchParams.take,\n scrollKey: increaseInfiniteScrollKey ? state.scrollKey + 1 : scrollKey,\n showDummyInteraction:\n !data.interactions.length && noCustomFilters && newSearchParams.page === 0,\n searchParams: {\n ...newSearchParams,\n },\n }),\n () => this.onInteractionsLoaded(data.interactions),\n );\n }\n\n onInteractionsLoaded = interactions => {\n const interactionIds = interactions.map(x => x.id);\n this.retrieveDocumentsForInteractions(interactionIds);\n };\n\n onEditInteraction = interaction => {\n const utcDate = moment.utc(interaction.date);\n const localDate = utcDate.local();\n const minutes = moment.duration(localDate.format('HH:mm')).asMinutes();\n\n // old interaction weren't created using the rich text editor. This causes newlines (\\n) to be present in the description string.\n // these are not converted to new lines in HTML, so we replace them with a
    tag\n let { description } = interaction;\n if (description && !description.includes('html>')) {\n description = description.replace(/\\n/g, '
    ');\n }\n\n this.setState(state => ({\n ...state,\n interactions: state.interactions.map(x => {\n if (x.id === interaction.id) {\n return {\n ...x,\n description,\n originalDescription: description,\n editFocus: true,\n originalTitle: x.title,\n originalDate: x.date,\n originalTags: x.tags,\n minutes,\n };\n }\n // cancel all other edits\n if (!x.editFocus) return x;\n return {\n ...x,\n title: x.originalTitle,\n description: x.originalDescription,\n date: x.originalDate,\n tags: x.originalTags,\n editFocus: false,\n };\n }),\n }));\n };\n\n cancelEdit = interactionId =>\n this.setState(({ interactions }) => ({\n interactions: interactions.map(x => {\n if (x.id === interactionId) {\n return {\n ...x,\n editFocus: false,\n title: x.originalTitle,\n description: x.originalDescription,\n date: x.originalDate,\n tags: x.originalTags,\n };\n }\n return x;\n }),\n }));\n\n onSaveInteraction = interaction => {\n const { intl } = this.props;\n\n const model = {\n ...interaction,\n };\n\n if (!model.date) {\n ToastrService.error(intl.formatMessage(messages.DateMandatory));\n return;\n }\n\n if (!model.title && !model.description) {\n ToastrService.error(intl.formatMessage(messages.TitleOrDescriptionMandatory));\n return;\n }\n const time = moment.duration(model.minutes, 'minutes');\n const interactionDate = moment.utc(model.date);\n\n model.date = moment([\n interactionDate.year(),\n interactionDate.month(),\n interactionDate.date(),\n time.hours(),\n time.minutes(),\n 0,\n 0,\n ]);\n\n return this.sendUpdateRequest(model).then(({ data }) => {\n this.setState(state => ({\n ...state,\n interactions: state.interactions.map(x => {\n if (x.id === interaction.id) {\n return {\n ...data,\n attachments: [...(interaction.attachments || [])],\n };\n }\n return x;\n }),\n }));\n });\n };\n\n sendUpdateRequest = interaction =>\n api.base.put(`${config.appUrls.interactions}/api/interactions`, interaction);\n\n linkDocumentsToInteraction = viewModel => {\n const { intl } = this.props;\n return api.base\n .post(`${config.appUrls.documents}/api/documents/AddDocumentsToLink`, viewModel)\n .catch(handleHttpError(intl));\n };\n\n onCreateInteraction = interaction => {\n const { searchParams } = this.state;\n const { intl } = this.props;\n const { relationId } = searchParams.interactionFilters;\n const model = {\n ...interaction,\n creationSource: 0,\n relationId,\n };\n\n return api.base\n .post(`${config.appUrls.interactions}/api/interactions/create`, model)\n .then(({ data }) => {\n if (!data) return;\n if (interaction.attachments && interaction.attachments.length) {\n const interactionId = data.id;\n\n const addDocumentsToInteractionViewModel = {\n linkId: interactionId,\n links: interaction.attachments.map(x => ({\n documentId: x.id,\n linkType: 6,\n })),\n };\n\n data.attachments = interaction.attachments;\n\n this.linkDocumentsToInteraction(addDocumentsToInteractionViewModel);\n }\n\n this.setState(state => ({\n ...state,\n interactions: [\n ...state.interactions.filter(x => x.isPinned),\n data,\n ...state.interactions.filter(x => !x.isPinned),\n ],\n showDummyInteraction: false,\n showCreateInteractionModal: false,\n }));\n })\n .catch(handleHttpError(intl));\n };\n\n showDeleteInteractionConfirmation = interaction => {\n this.setState(state => ({\n ...state,\n showDeleteInteractionModal: true,\n activeInteraction: interaction,\n }));\n };\n\n onDeleteInteraction = () => {\n const { activeInteraction } = this.state;\n\n return api.base\n .delete(`${config.appUrls.interactions}/api/interactions/${activeInteraction.id}`)\n .then(() => {\n this.setState(state => ({\n ...state,\n showDeleteInteractionModal: false,\n activeInteraction: undefined,\n interactions: state.interactions.filter(x => x.id !== activeInteraction.id),\n }));\n });\n };\n\n filtersChanged = filters => {\n const { searchParams } = this.state;\n const searchCriteria = {\n ...searchParams,\n page: -1,\n interactionFilters: {\n ...filters,\n },\n };\n this.setState({ searchParams: searchCriteria, forceLoad: true });\n this.loadInteractions(searchCriteria);\n };\n\n openCreateInteractionDialog = interactionType => {\n this.setState(state => ({\n ...state,\n activeInteractionType: interactionType,\n showCreateInteractionModal: true,\n }));\n };\n\n getDummyInteraction = () => {\n const { intl } = this.props;\n const interaction = {\n interactionType: 1,\n date: moment(),\n title: intl.formatMessage(messages.DummyInteractionTitle),\n description: intl.formatMessage(messages.DummyInteractionDescription),\n };\n return interaction;\n };\n\n onPinInteraction = interaction => {\n if (interaction.isPinned) return;\n\n const model = {\n ...interaction,\n isPinned: true,\n };\n\n const { intl } = this.props;\n\n const { interactions } = this.state;\n\n return this.sendUpdateRequest(model).then(({ data }) => {\n ToastrService.success(intl.formatMessage(messages.InteractionPinned));\n\n const pinnedInteractions = [\n ...interactions.filter(x => x.isPinned),\n {\n ...data,\n attachments: model.attachments,\n },\n ].sort(dynamicSort('-date'));\n\n this.setState(\n state => ({\n ...state,\n interactions: [\n ...pinnedInteractions,\n ...state.interactions.filter(x => !x.isPinned && x.id !== data.id),\n ],\n }),\n () => window.scrollTo(0, 0),\n );\n });\n };\n\n onRemovePin = interaction => {\n if (!interaction.isPinned) return;\n\n const model = {\n ...interaction,\n isPinned: false,\n };\n const { intl } = this.props;\n const { interactions } = this.state;\n return this.sendUpdateRequest(model).then(({ data }) => {\n ToastrService.success(intl.formatMessage(messages.InteractionUnpinned));\n\n const unpinnedInteractions = [\n ...interactions.filter(x => !x.isPinned),\n {\n ...data,\n attachments: model.attachments,\n },\n ].sort(dynamicSort('-date'));\n\n this.setState(state => ({\n ...state,\n interactions: [\n ...state.interactions.filter(x => x.isPinned && x.id !== data.id),\n ...unpinnedInteractions,\n ],\n }));\n });\n };\n\n copyLinkToInteraction = interaction => {\n const { intl } = this.props;\n const url = `${config.appUrls.app}/#/interactions/${interaction.relationId}/${interaction.id}`;\n if (copy(url)) {\n ToastrService.success(intl.formatMessage(messages.ValueCopiedToClipboard));\n }\n };\n\n exportSingleInteractionToPdf = interaction => {\n if (interaction.exportingToPdf) return;\n const { intl } = this.props;\n const languageCode = intl.locale;\n const { interactions } = this.state;\n\n this.setState({\n interactions: interactions.map(x =>\n x.id === interaction.id ? { ...x, exportingToPdf: true } : x,\n ),\n });\n const endpoint = `${config.appUrls.interactions}/api/interactions/${interaction.id}/pdf/${\n languageCode.split('-')[0]\n }`;\n\n return api.base\n .get(endpoint, {\n responseType: 'arraybuffer',\n })\n .then(result => {\n const fileType = result.headers['content-type'];\n const fileName = interaction.title ? `${interaction.title}.pdf` : 'untitled.pdf';\n const blob = new Blob([result.data], {\n type: fileType,\n });\n FileSaver.saveAs(blob, fileName);\n this.setState({\n interactions: interactions.map(x =>\n x.id === interaction.id ? { ...x, exportingToPdf: false } : x,\n ),\n });\n })\n .catch(error => {\n this.setState({\n interactions: interactions.map(x =>\n x.id === interaction.id ? { ...x, exportingToPdf: false } : x,\n ),\n });\n const errorObject = utils.arrayBufferToObject(error.response && error.response.data);\n handleHttpError(intl)(errorObject);\n });\n };\n\n sendInteractionViaEmail = async interaction => {\n if (interaction.sendingViaEmail) return;\n const { intl } = this.props;\n const languageCode = intl.locale;\n const { interactions } = this.state;\n\n this.setState({\n interactions: interactions.map(x =>\n x.id === interaction.id ? { ...x, sendingViaEmail: true } : x,\n ),\n });\n const endpoint = `${config.appUrls.interactions}/api/interactions/${interaction.id}/pdf/${\n languageCode.split('-')[0]\n }/save`;\n const result = await api.base.get(endpoint);\n\n this.setState({\n interactions: interactions.map(x =>\n x.id === interaction.id ? { ...x, sendingViaEmail: false } : x,\n ),\n });\n\n const { data } = result;\n if (!data) {\n ToastrService.error(\n intl.formatMessage(messages.SomethingWentWrongWhileConvertingTheInteractionToPdf),\n );\n }\n\n this.setState({\n showSendEmailModal: true,\n activeAttachments: [{ id: data.documentId, name: data.filename }],\n });\n };\n\n sendEmail = emailViewModel => {\n const { intl } = this.props;\n\n return api.base\n .post(`${config.appUrls.documents}/api/emails/CreateAndSend`, emailViewModel)\n .then(() => {\n this.setState(state => ({\n ...state,\n showSendEmailModal: false,\n }));\n ToastrService.info(intl.formatMessage(messages.EmailSent));\n })\n .catch(handleHttpError(intl));\n };\n\n openCreateTodoModal = interaction => {\n const { intl } = this.props;\n if (interaction && interaction.objectType === 2 && interaction.objectId) {\n if (interaction.document) {\n // Cached document info\n this.setState({ showCreateTodoModal: true, activeDocument: interaction.document });\n } else {\n return api.base\n .get(`${config.appUrls.documents}/api/Documents/Info/${interaction.objectId}`)\n .then(({ data }) => {\n this.setState(state => ({\n interactions: state.interactions.map(x =>\n x.id === interaction.id ? { ...x, document: data } : x,\n ),\n activeDocument: data,\n showCreateTodoModal: true,\n }));\n return data;\n })\n .catch(handleHttpError(intl));\n }\n } else {\n this.setState({ showCreateTodoModal: true, activeDocument: null });\n }\n };\n\n handleInteractionChanged = (id, change = {}) => {\n this.setState(({ interactions }) => ({\n interactions: interactions.map(x => {\n if (x.id === id) {\n return {\n ...x,\n ...change,\n };\n }\n return x;\n }),\n }));\n };\n\n render() {\n const {\n interactions,\n searchParams,\n hasMoreData,\n scrollKey,\n loading,\n showDeleteInteractionModal,\n showCreateInteractionModal,\n relation,\n forceLoad,\n activeInteractionType,\n showDummyInteraction,\n activeInteraction,\n activeDocument,\n showEmailDocumentModal,\n hasLinkedRelations,\n showSendEmailModal,\n showCreateTodoModal,\n showShareItemModal,\n showForwardModal,\n showReplyToEmailModal,\n replyAll,\n creatingPdf,\n activeAttachments,\n } = this.state;\n const { intl, stateService } = this.props;\n\n const noDataFound =\n !hasMoreData && (!interactions || interactions.length <= 0) && !showDummyInteraction;\n const showTimeLine =\n (!forceLoad && !!interactions && !!interactions.length) ||\n (!forceLoad && showDummyInteraction);\n const showFilters = noDataFound || !!interactions;\n\n let documentUploadEndpoint = `${config.appUrls.documents}/api/documents?documentType=13`;\n if (relation && relation.id) {\n documentUploadEndpoint += `&relationId=${relation.id}`;\n }\n\n const canViewDocuments = AuthService.hasPermission({\n functionality: functionalities.Documents,\n privilege: privileges.read,\n });\n\n return (\n
    \n {showSendEmailModal && (\n \n this.setState(state => ({\n ...state,\n showSendEmailModal: false,\n }))\n }\n onSave={this.sendEmail}\n />\n )}\n
    \n {relation && (\n \n this.openCreateInteractionDialog(interactionType)\n }\n onSendEmail={() => this.setState({ showSendEmailModal: true })}\n onOpenCreateTodoDialog={() => this.openCreateTodoModal()}\n />\n )}\n
    \n
    \n {showFilters && (\n
    \n
    \n

    \n {intl.formatMessage(messages.DummyInteractionTitle)}\n

    \n
    \n
    \n \n
    \n
    \n )}\n {interactions && canViewDocuments && (\n
    \n
    \n this.exportToPdf()}\n disabled={!interactions || creatingPdf}\n >\n \n {!creatingPdf && }\n {creatingPdf && }\n \n {intl.formatMessage(messages.ExportSearchResultsToPdf)}\n \n
    \n
    \n )}\n
    \n {!interactions && loading && }\n {forceLoad && }\n {!loading && noDataFound && (\n \n \n \n )}\n {showTimeLine && (\n \n this.loadInteractions()}\n hasMore={hasMoreData}\n initialLoad={false}\n key={scrollKey}\n loader={loading ? : }\n >\n {showDummyInteraction && (\n \n )}\n {interactions.map(interaction => (\n \n this.setState(state => ({\n ...state,\n interactions: state.interactions.map(x => {\n if (x.id === interaction.id) {\n return {\n ...x,\n focused: true,\n };\n }\n return x;\n }),\n }))\n }\n onMouseLeave={() =>\n this.setState(state => ({\n ...state,\n interactions: state.interactions.map(x => {\n if (x.id === interaction.id) {\n return {\n ...x,\n focused: false,\n };\n }\n return x;\n }),\n }))\n }\n >\n this.onEditInteraction(interaction)}\n onSaveInteraction={() => this.onSaveInteraction(interaction)}\n onShareItem={() =>\n this.setState({\n activeInteraction: interaction,\n showShareItemModal: true,\n })\n }\n onExportToPdf={() => this.exportSingleInteractionToPdf(interaction)}\n onCopyLinkToInteraction={() => this.copyLinkToInteraction(interaction)}\n onSendViaEmail={() => this.sendInteractionViaEmail(interaction)}\n onDeleteInteraction={() =>\n this.showDeleteInteractionConfirmation(interaction)\n }\n onPinInteraction={() => this.onPinInteraction(interaction)}\n onRemovePin={() => this.onRemovePin(interaction)}\n onOpenEmail={() =>\n this.setState(state => ({\n ...state,\n showEmailDocumentModal: true,\n activeInteraction: interaction,\n }))\n }\n onForwardEmail={() =>\n this.setState(state => ({\n ...state,\n showForwardModal: true,\n activeInteraction: interaction,\n }))\n }\n onReplyToEmail={replyAllParameter =>\n this.setState({\n showReplyToEmailModal: true,\n activeInteraction: interaction,\n replyAll: replyAllParameter,\n })\n }\n onCreateTodo={() => this.openCreateTodoModal(interaction)}\n onInteractionChanged={this.handleInteractionChanged}\n onEditCancel={() => this.cancelEdit(interaction.id)}\n onDeleteAttachment={this.deleteAttachment}\n onDocumentUploaded={this.onDocumentUploaded}\n />\n
    \n ))}\n {loading && }\n \n \n )}\n
    \n
    \n {showShareItemModal && (\n this.setState({ showShareItemModal: false })}\n />\n )}\n {showDeleteInteractionModal && (\n \n this.setState(state => ({\n ...state,\n showDeleteInteractionModal: false,\n activeInteraction: undefined,\n }))\n }\n onSave={this.onDeleteInteraction}\n />\n )}\n {showCreateInteractionModal && (\n this.setState({ showCreateInteractionModal: false })}\n />\n )}\n {showEmailDocumentModal && (\n \n this.setState({ showEmailDocumentModal: false, activeInteraction: undefined })\n }\n onClose={() =>\n this.setState({ showEmailDocumentModal: false, activeInteraction: undefined })\n }\n />\n )}\n {showForwardModal && (\n \n this.setState(state => ({\n ...state,\n showForwardModal: false,\n }))\n }\n onSave={this.sendEmail}\n />\n )}\n {showReplyToEmailModal && (\n \n this.setState({\n showReplyToEmailModal: false,\n })\n }\n onSave={this.sendEmail}\n />\n )}\n {showCreateTodoModal && (\n this.setState({ showCreateTodoModal: false, activeDocument: null })}\n onClose={() => this.setState({ showCreateTodoModal: false, activeDocument: null })}\n />\n )}\n
    \n );\n }\n}\n\nInteractionsContainer.propTypes = {\n intl: intlShape.isRequired,\n stateService: PropTypes.instanceOf(StateService).isRequired,\n};\n\nexport default injectStateService(injectIntl(InteractionsContainer));\n","import { defineMessages } from 'react-intl';\n\nconst messages = defineMessages({\n VatPeriodicity: 'VAT periodicity',\n ShowInvoiceHistory: 'Show invoice history',\n EmptyVATPeriodicity: 'Without VAT periodicity',\n ToInvoice: 'To invoice',\n Relation: 'Relation',\n Edit: 'Edit',\n Assignment: 'Assignment',\n Amount: 'Amount',\n Hours: 'Hours',\n Distance: 'Distance',\n InvoicingType: 'Invoicing type',\n NextScheduleDate: 'Next schedule date',\n NoInvoicingSchedule: 'No schedule',\n RemoveRegistration: 'Remove registration',\n RemoveRegistrationConfirmationMsg:\n 'Are you sure you want to remove this registration? It will be permanently deleted.',\n RegistrationMarkedAsNeverInvoice: 'Registration marked as never invoice',\n NeverInvoiceRegistration: 'Never invoice registration',\n NeverInvoiceRegistrationConfirmationMsg:\n 'Are you sure you want to mark this registration as \"Never invoice\"? The registration will not be deleted, but can only be invoiced from the registration overview.',\n RegistrationAddedToInvoiceProposal: 'Registration added to invoice proposal',\n RegistrationRemoved: 'Registration removed',\n Actions: 'Actions',\n Totals: 'Totals',\n MakeInvoiceProposal: 'Make invoice proposal',\n AddToInvoiceProposal: 'Add to invoice proposal',\n InvoiceAllRegistrations: 'Invoice all registrations',\n InvoiceAllRegistrationsTooltip:\n 'Link all open registrations to an invoice proposal. If an invoice proposal exists already, registrations will be added. If not, a new invoice proposal will be created.',\n ShowInRegistrationOverview: 'Show in registration overview',\n OpenInvoiceProposal: 'Open invoice proposal',\n TotalAmount: 'Total amount',\n TotalHours: 'Total hours',\n RegistrationAmount: 'Registration amount',\n RegistrationIncludedInForfait: 'Included in fixed amount',\n RegistrationExcludedFromForfait: 'Excluded from fixed amount',\n ForfaitAmount: 'Fixed amount',\n UnsettledAdvances: 'Unsettled advances',\n TotalToInvoiceAmount: 'Total to invoice',\n ToInvoiceAmount: 'To invoice amount',\n NrDraftInvoicedCreatedOrModified: '{nr} invoice proposals were created/changed',\n GlobalActions: 'Global actions',\n ToInvoiceGlobalActionsTooltip: 'Select one or more relations to execute a batch action.',\n LegalForms: 'Legal forms',\n Processing: 'Processing',\n ResetFilters: 'Reset filters',\n CountSelected: 'Selected {count} / {total}',\n NoDataFound: 'No data found',\n ExportToExcel: 'Export to Excel',\n Relations: 'Relations',\n HasInvoicingVia: 'Has invoicing via',\n FixedAmount: 'Fixed amount',\n RegistrationsUntil: 'Registrations until',\n InvoiceText: 'Invoice text',\n Number: 'Number',\n Date: 'Date',\n Advances: 'Advances',\n OpenPdf: 'Open pdf',\n OpenInvoiceOverview: 'Open invoice overview',\n Registrations: 'Registrations',\n Employee: 'Employee',\n Resource: 'Resource',\n Quantity: 'Quantity',\n UnitPrice: 'UnitPrice',\n InForfait: 'InForfait',\n Billable: 'Billable',\n Remark: 'Remark',\n InternalRemark: 'Internal remark',\n WithLabels: 'With labels',\n WithoutLabels: 'Without labels',\n RegisteredBy: 'Registered by',\n PriceListItem: 'Price list item',\n NoPriceListItemsFound: 'No price list item found',\n ReferenceYear: 'Reference year',\n WithoutReferenceYear: 'Without reference year',\n ExportToExcelStarted: 'Export to Excel started',\n});\nexport default messages;\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport CheckboxDropdownMenu from '@/shared/components/input/CheckboxDropdownMenu';\nimport { Dropdown } from 'react-bootstrap';\nimport { FaFilter } from 'react-icons/fa';\nimport { defineMessages, useIntl } from 'react-intl';\nvar messages = defineMessages({\n SelectYourFilters: {\n id: 'SelectYourFilters',\n defaultMessage: 'Select your filters',\n },\n MoreFilters: {\n id: 'MoreFilters',\n defaultMessage: 'More filters',\n },\n});\nexport var DynamicFilterDropdown = function (_a) {\n var items = _a.items, onChange = _a.onChange;\n var formatMessage = useIntl().formatMessage;\n if (!items || items.length <= 0)\n return null;\n return (_jsxs(Dropdown, __assign({ id: \"dynamicFilterMenu\" }, { children: [_jsxs(Dropdown.Toggle, __assign({ title: formatMessage(messages.SelectYourFilters) }, { children: [_jsx(FaFilter, { className: \"react-icon margin5R\" }), formatMessage(messages.MoreFilters)] })), _jsx(CheckboxDropdownMenu, { bsRole: \"menu\", items: items, onItemChanged: onChange })] })));\n};\nexport default DynamicFilterDropdown;\n","import React, { PureComponent, Fragment } from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { injectIntl, FormattedMessage, FormattedDate } from 'react-intl';\nimport { FaFilePdf, FaEye, FaEyeSlash, FaClipboardList } from 'react-icons/fa';\nimport intlShape from '@/shared/utils/intlShape';\nimport { injectStateService, StateService } from '@/shared/services/StateService';\nimport FormattedCurrency from '@/shared/components/FormattedCurrency';\nimport FormattedListValue from '@/shared/components/FormattedListValue';\nimport { LinkIcon, IconPencil, CommentIcon } from '@/shared/components/Icons';\nimport DocumentService from '@/shared/services/DocumentService';\nimport { CanRead, CanUpdate, CanDelete } from '@/shared/components/security';\nimport RelationName from '@/shared/components/RelationName';\nimport ResourceName from '@/shared/components/ResourceName';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport authService, { privileges } from '@/shared/services/AuthService';\nimport PopoverStickOnHover from '@/shared/components/PopoverStickOnHover';\nimport messages from '../invoicingMessages';\nimport RegistrationRemarkTooltip from './RegistrationRemarkTooltip';\nimport FormattedDateShort from '../../../shared/components/FormattedDateShort';\nimport { mapRegTaskName } from '../../../shared/services/ObjectDisplayService';\n\nclass ToInvoiceDetail extends PureComponent {\n state = {\n users: DataCacheService.getAllUsers().reduce((o, u) => {\n if (!u.id) return o;\n // eslint-disable-next-line no-param-reassign\n o[u.id] = u.name;\n return o;\n }, {}),\n };\n\n render() {\n const {\n invoiceStreamId,\n columns,\n registrations,\n nextSchedule,\n advances,\n stateService,\n intl,\n onEditRegistration,\n onAddToDraftInvoice,\n onNeverInvoiceRegistration,\n onRemoveRegistration,\n } = this.props;\n const { users } = this.state;\n const showRelation =\n registrations && registrations.some(r => r.invoiceStreamId !== invoiceStreamId);\n\n const showInForfait = registrations && registrations.some(r => r.inForfait !== null);\n\n return (\n \n {registrations && registrations.length > 0 && (\n \n \n \n
    \n \n \n \n \n \n {showRelation && (\n \n )}\n \n \n \n \n \n \n {showInForfait && (\n \n )}\n \n \n \n \n {registrations.map(r => (\n \n \n {showRelation && (\n \n )}\n \n \n \n \n \n \n \n {showInForfait && (\n \n )}\n \n \n \n ))}\n \n
    \n \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n \n \n {users[r.userId]}\n {!!r.plannedTaskId && (\n \n \n \n \n \n )}\n \n \n \n {r.type === 0 ? r.durationMinutes.minuteToTime() : r.quantity}\n \n \n \n \n \n \n \n {r.inForfait !== null && (\n \n )}\n \n {!!(r.remark || r.internalRemark) && (\n \n }\n shouldUpdatePosition\n >\n \n \n \n \n )}\n \n
    \n \n {\n onAddToDraftInvoice(r);\n e.stopPropagation();\n }}\n >\n {!r.addingToDraft && (\n \n \n \n \n )}\n {r.addingToDraft && }\n \n \n \n {\n onEditRegistration(r);\n e.stopPropagation();\n }}\n >\n \n \n \n \n {\n onNeverInvoiceRegistration(r);\n e.stopPropagation();\n }}\n >\n {!r.neverInvoicing && (\n \n \n \n \n )}\n {r.neverInvoicing && }\n \n \n \n {\n if (\n r.userId !== authService.getUserId() &&\n !authService.hasPermission({\n functionality: 'RegistrationOthers',\n privilege: privileges.Delete,\n })\n )\n return;\n onRemoveRegistration(r);\n e.stopPropagation();\n }}\n >\n {!r.removing && }\n {r.removing && }\n \n \n
    \n
    \n
    \n \n \n )}\n {nextSchedule && (\n \n \n

    \n \n

    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n \n \n \n \n \n \n
    \n {!!nextSchedule.invoiceCreationDate && (\n \n )}\n \n {!!nextSchedule.date && }\n \n {!!nextSchedule.amount && }\n \n {nextSchedule.invoiceText && (\n \n )}\n
    \n \n \n )}\n {advances && advances.length > 0 && (\n \n \n

    \n \n

    \n \n \n \n \n \n \n \n\n \n \n \n \n {advances.map(a => (\n \n \n \n \n \n \n ))}\n \n
    \n \n \n \n \n \n \n
    {a.date && }{a.number}{a.amount && }\n \n {a.documentPdfId && (\n \n DocumentService.open(a.documentPdfId)}\n />\n \n )}\n stateService.gotoInvoiceOverview({ invoiceId: a.id })}\n />\n \n
    \n \n \n )}\n
    \n );\n }\n}\nToInvoiceDetail.propTypes = {\n intl: intlShape.isRequired,\n stateService: PropTypes.instanceOf(StateService).isRequired,\n};\nexport default injectIntl(ToInvoiceDetail);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport { defineMessages, FormattedMessage, injectIntl, useIntl } from 'react-intl';\nimport { FaSave, FaSearch, FaUndo } from 'react-icons/fa';\n\nimport intlShape from '@/shared/utils/intlShape';\nimport EmployeeFilterService from '@/shared/services/EmployeeFilterService';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport ToastrService from '@/shared/services/ToastrService';\nimport OkCancelModal from './OkCancelModal';\nimport DynamicFilterDropdown from './DynamicFilterDropdown';\n\nconst messages = defineMessages({\n SaveSearchCriteria: 'Save search criteria',\n RenameSearchCriteria: 'Rename search criteria',\n DeleteSearchCriteria: 'Delete search criteria',\n SelectSearchCriteria: 'Select search criteria',\n ReplaceSearchCriteria: 'Replace search criteria',\n ResetFilters: 'Reset filters',\n SelectAll: 'Select all',\n // Same labels used in AngularJS modal\n SearchCriteriaNameInputTitle: 'SearchCriteriaNameInputTitle',\n SearchCriteriaNameInputMessage: 'SearchCriteriaNameInputMessage',\n SearchCriteriaNameInputPlaceholder: 'SearchCriteriaNameInputPlaceholder',\n});\n\nconst filtersEquals = (filter1, filter2, ignoreFilters) => {\n const object1 = { ...filter1 };\n const object2 = { ...filter2 };\n (ignoreFilters || []).forEach(key => {\n delete object1[key];\n delete object2[key];\n });\n return JSON.stringify(object1) === JSON.stringify(object2);\n};\n\nclass SavedFiltersButton extends Component {\n state = {\n savedFilters: [],\n selectedFilter: null,\n showNameModal: false,\n nameInput: '',\n modalFilter: null, // Used for modal actions\n };\n\n componentDidMount() {\n EmployeeFilterService.load().then(this.reloadSavedFilters);\n }\n\n componentDidUpdate(oldProps) {\n const { currentFilters, ignoreFilters } = this.props;\n if (!filtersEquals(currentFilters, oldProps.currentFilters, ignoreFilters)) {\n this.findSelectedFilter();\n }\n }\n\n selectFilter = e => {\n const filterId = e.currentTarget.id;\n const { savedFilters } = this.state;\n const { onFiltersChanged } = this.props;\n const filter = savedFilters.find(x => x.id === filterId);\n if (!filter || !filter.filter) return;\n this.setState({ selectedFilter: filter });\n onFiltersChanged({ ...filter.filter });\n };\n resetFilters = () => {\n const { onFiltersChanged, defaultFilters } = this.props;\n this.setState({ selectedFilter: null });\n onFiltersChanged({ ...defaultFilters });\n };\n\n reloadSavedFilters = () => {\n const { screen, defaultFilters } = this.props;\n const savedFilters = EmployeeFilterService.getScreenFilters(screen)\n .map(x => ({\n ...x,\n // Parse json and apply them to the default filters (in case there is a new filter)\n filter: { ...(defaultFilters || {}), ...(JSON.parse(x.json) || {}) },\n }))\n .sort(dynamicSort('name'));\n this.setState({\n savedFilters,\n });\n this.findSelectedFilter();\n };\n\n findSelectedFilter = () => {\n const { currentFilters, defaultFilters, ignoreFilters } = this.props;\n const isDefault = filtersEquals(currentFilters, defaultFilters, ignoreFilters);\n this.setState(({ selectedFilter, savedFilters }) => {\n let newFilter = selectedFilter;\n if (newFilter && !filtersEquals(currentFilters, newFilter.filter, ignoreFilters))\n newFilter = null;\n if (!newFilter && !isDefault)\n newFilter = savedFilters.find(x => filtersEquals(currentFilters, x.filter, ignoreFilters));\n return { selectedFilter: newFilter };\n });\n };\n showSaveFilterModal = () => {\n const { currentFilters, screen } = this.props;\n this.setState({\n showNameModal: true,\n nameInput: '',\n modalFilter: {\n screen,\n name: '',\n json: JSON.stringify(currentFilters),\n },\n });\n };\n closeSaveFilterModal = () => {\n this.setState({ showNameModal: false, modalFilter: null });\n };\n\n showRenameFilterModal = (filter, event) => {\n event.stopPropagation();\n event.preventDefault();\n if (!filter || !filter.id) return;\n this.setState({ showNameModal: true, nameInput: filter.name, modalFilter: filter });\n };\n saveFilter = () => {\n const { modalFilter, nameInput } = this.state;\n if (!modalFilter) return;\n if (!nameInput) return;\n const model = { ...modalFilter, name: nameInput };\n return EmployeeFilterService.setFilter(model).then(updatedFilter => {\n if (updatedFilter) {\n const { intl } = this.props;\n ToastrService.changesSaved(intl);\n this.reloadSavedFilters();\n }\n this.setState({ showNameModal: false, modalFilter: null });\n return updatedFilter;\n });\n };\n handleNameInputKeyDownEvent = e => {\n if (e.keyCode === 13) {\n this.saveFilter();\n } else if (e.keyCode === 27) {\n this.closeSaveFilterModal();\n }\n };\n\n replaceFilter = (filter, event) => {\n event.stopPropagation();\n event.preventDefault();\n if (!filter || !filter.id) return;\n const { currentFilters, intl } = this.props;\n const model = {\n ...filter,\n json: JSON.stringify(currentFilters),\n };\n return EmployeeFilterService.setFilter(model).then(updatedFilter => {\n if (updatedFilter) {\n ToastrService.changesSaved(intl);\n\n this.reloadSavedFilters();\n }\n return updatedFilter;\n });\n };\n deleteFilter = (filter, event) => {\n event.stopPropagation();\n event.preventDefault();\n if (!filter || !filter.id) return;\n // Clear filter if it is currently selected\n this.setState(({ selectedFilter }) => ({\n selectedFilter: selectedFilter && selectedFilter.id !== filter.id ? selectedFilter : null,\n }));\n\n EmployeeFilterService.deleteFilter(filter).then(() => {\n const { intl } = this.props;\n ToastrService.changesSaved(intl);\n this.reloadSavedFilters();\n });\n };\n\n render() {\n const { selectedFilter, savedFilters, showNameModal, nameInput } = this.state;\n const {\n intl,\n currentFilters,\n defaultFilters,\n ignoreFilters,\n dynamicFilters,\n onDynamicFiltersChanged,\n } = this.props;\n\n const hasSavedFilters = savedFilters && savedFilters.length > 0;\n\n const showReset = !filtersEquals(currentFilters, defaultFilters, ignoreFilters);\n\n const dynamicFiltersItems =\n dynamicFilters && dynamicFilters.length\n ? [\n {\n id: 'selectall',\n label: intl.formatMessage(messages.SelectAll),\n selected: !dynamicFilters.some(x => !x.selected),\n },\n ...dynamicFilters,\n ]\n : [];\n\n return (\n
    \n {!hasSavedFilters && showReset && (\n \n )}\n {hasSavedFilters && (\n
    \n \n \n {selectedFilter && selectedFilter.name ? (\n selectedFilter.name\n ) : (\n \n )}\n \n \n \n
    \n )}\n \n {showReset && (\n \n )}\n {showNameModal && (\n }\n show\n onClose={this.closeSaveFilterModal}\n onSave={this.saveFilter}\n disabled={!nameInput}\n disableFullScreen\n >\n
    \n \n
    \n
    \n this.setState({ nameInput: e.target.value })}\n className=\"form-control\"\n maxLength={50}\n autoFocus\n onKeyDown={this.handleNameInputKeyDownEvent}\n placeholder={intl.formatMessage(messages.SearchCriteriaNameInputPlaceholder)}\n />\n
    \n \n )}\n
    \n );\n }\n}\n\nSavedFiltersButton.propTypes = {\n intl: intlShape.isRequired,\n screen: PropTypes.string.isRequired,\n currentFilters: PropTypes.shape({}),\n defaultFilters: PropTypes.shape({}).isRequired,\n dynamicFilters: PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.string.isRequired,\n label: PropTypes.string.isRequired,\n selected: PropTypes.bool,\n }),\n ),\n ignoreFilters: PropTypes.arrayOf(PropTypes.string),\n onFiltersChanged: PropTypes.func.isRequired,\n onDynamicFiltersChanged: PropTypes.func,\n};\nSavedFiltersButton.defaultProps = {\n currentFilters: {},\n ignoreFilters: [],\n dynamicFilters: [],\n onDynamicFiltersChanged: () => {},\n};\n\nexport default injectIntl(SavedFiltersButton);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport DropdownButton from 'react-bootstrap/lib/DropdownButton';\nimport MenuItem from 'react-bootstrap/lib/MenuItem';\nimport { injectIntl } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport messages from '../invoicingMessages';\n\nconst ToInvoiceGlobalActionsButton = props => {\n const { intl, disabled, onAddToInvoiceProposal } = props;\n\n return (\n \n \n \n {intl.formatMessage(messages.AddToInvoiceProposal)}\n \n \n
    \n );\n};\n\nToInvoiceGlobalActionsButton.propTypes = {\n intl: intlShape.isRequired,\n disabled: PropTypes.bool,\n onAddToInvoiceProposal: PropTypes.func.isRequired,\n};\nToInvoiceGlobalActionsButton.defaultProps = {\n disabled: false,\n};\nexport default injectIntl(ToInvoiceGlobalActionsButton);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport Axios from 'axios';\n\nimport { FormattedMessage, injectIntl } from 'react-intl';\nimport momentPropTypes from 'react-moment-proptypes';\nimport { FaUndo } from 'react-icons/fa';\nimport classNames from 'classnames';\nimport isEqual from 'lodash-es/isEqual';\n\nimport intlShape from '@/shared/utils/intlShape';\nimport RelationSearch from '@/shared/components/input/RelationSearch';\nimport RelationTypeButtonGroup from '@/shared/components/RelationTypeButtonGroup';\nimport InvoiceScheduleTypeMultiSelect from '@/shared/components/input/multiselect/InvoiceScheduleTypeMultiSelect';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport DataCacheService from '@/shared/services/DataCacheService';\n\nimport FormattedCurrency from '@/shared/components/FormattedCurrency';\nimport { hasMultipleCompanies } from '@/shared/components/security/HasMultiCompany';\nimport CompanyMultiSelect from '@/shared/components/input/multiselect/CompanyMultiSelect';\nimport AssignmentTemplateSelector from '@/shared/components/input/AssignmentTemplateSelector';\nimport DelayedDateRangePicker from '@/shared/components/input/DelayedDateRangePicker';\nimport UserSearch from '@/shared/components/input/UserSearch';\nimport ResourceAutoComplete from '@/shared/components/registration/ResourceAutoComplete';\nimport { retrieveAllResources } from '@/shared/components/registration/resourceApi';\nimport userStorage from '@/shared/services/userStorage';\nimport SavedFiltersButton from '@/shared/components/SavedFiltersButton';\nimport LegalFormMultiSelect from '@/shared/components/input/multiselect/LegalFormMultiSelect';\nimport CrmTypeButtonGroup from '@/shared/components/CrmTypeButtonGroup';\nimport DynamicFilter, {\n getDynamicFiltersFromDefaultFilters,\n handleDynamicFiltersChanged,\n initDynamicFilters,\n resetDynamicFilters,\n} from '../../../shared/components/DynamicFilter';\n\nimport config from '../../../config';\nimport api from '../../../shared/api';\nimport messages from '../invoicingMessages';\n\nexport const defaultFilters = {\n dateFrom: null,\n dateUntil: null,\n relationId: null,\n relationName: null,\n invoiceStreamId: null,\n relationTypes: [],\n crmTypes: [],\n legalForms: [],\n ownCompanies: [],\n assignmentTemplateId: null,\n vatPeriodicities: [],\n withLabels: [],\n withoutLabels: [],\n withEmployeeLabels: [],\n withoutEmployeeLabels: [],\n invoiceScheduleTypes: [],\n assistant: null,\n responsible: null,\n associate: null,\n assistantBackup: null,\n billingUser: null,\n seniorUser: null,\n resourceId: null,\n referenceYear: null,\n onlyActiveRelations: false,\n filterBehaviours: {\n withLabels: 1,\n withEmployeeLabels: 1,\n },\n relationGroups: [],\n};\n\nconst dynamicFiltersStorageKey = 'ToInvoiceDynamicFilters';\nconst allDynamicFilters = [\n ...getDynamicFiltersFromDefaultFilters(\n defaultFilters,\n 'relationTypes',\n 'crmTypes',\n 'legalForms',\n 'invoiceScheduleTypes',\n 'ownCompanies',\n 'assignmentTemplateId',\n ),\n];\n\nclass ToInvoiceFilters extends Component {\n state = {\n labels: [],\n employeeLabels: [],\n dynamicFilters: [],\n };\n\n static propTypes = {\n onFilterChange: PropTypes.func.isRequired,\n filters: PropTypes.shape({\n relationId: PropTypes.string,\n dateFrom: momentPropTypes.momentObj,\n dateUntil: momentPropTypes.momentObj,\n period: PropTypes.oneOf(['all', 'month', 'quarter', 'year', 'year-1', 'year-2']),\n relationTypes: PropTypes.arrayOf(PropTypes.number),\n crmTypes: PropTypes.arrayOf(PropTypes.number),\n legalForms: PropTypes.arrayOf(PropTypes.number),\n assignmentTemplateId: PropTypes.string,\n ownCompanies: PropTypes.arrayOf(PropTypes.string),\n withLabels: PropTypes.arrayOf(PropTypes.string),\n withoutLabels: PropTypes.arrayOf(PropTypes.string),\n withEmployeeLabels: PropTypes.arrayOf(PropTypes.string),\n withoutEmployeeLabels: PropTypes.arrayOf(PropTypes.string),\n invoiceScheduleTypes: PropTypes.arrayOf(PropTypes.string),\n relationGroups: PropTypes.arrayOf(PropTypes.string),\n vatPeriodicities: PropTypes.arrayOf(PropTypes.string),\n responsible: PropTypes.string,\n assistant: PropTypes.string,\n associate: PropTypes.string,\n assistantBackup: PropTypes.string,\n billingUser: PropTypes.string,\n seniorUser: PropTypes.string,\n userId: PropTypes.string,\n resourceId: PropTypes.string,\n referenceYear: PropTypes.number,\n onlyActiveRelations: PropTypes.bool,\n }),\n countSelected: PropTypes.string,\n intl: intlShape.isRequired,\n };\n\n static defaultProps = {\n filters: defaultFilters,\n countSelected: '',\n };\n componentWillUnmount() {\n if (typeof this.labelCancelToken !== 'undefined') {\n this.labelCancelToken.cancel('Operation canceled due to leaving page.');\n }\n }\n componentDidMount() {\n const { intl, filters } = this.props;\n this.assignmentsEnabled = DataCacheService.assignmentsEnabled();\n this.labelCancelToken = Axios.CancelToken.source();\n this.employeeLabelCancelToken = Axios.CancelToken.source();\n const labelEndpoint = `${config.appUrls.api}/api/resource/tags`;\n const employeeLabelEndpoint = `${config.appUrls.api}/api/employee/tags`;\n\n Promise.all([\n api.base.get(labelEndpoint, {\n cancelToken: this.labelCancelToken.token,\n }),\n api.base.get(employeeLabelEndpoint, {\n cancelToken: this.employeeLabelCancelToken.token,\n }),\n retrieveAllResources(intl),\n ]).then(([{ data: labels }, { data: employeeLabels }, resources]) => {\n this.setState({\n labels: labels\n .map(x => ({ id: x.id, label: x.name, sort: x.name.toLowerCase() }))\n .sort(dynamicSort('sort')),\n employeeLabels: employeeLabels\n .map(x => ({ id: x.id, label: x.name, sort: x.name.toLowerCase() }))\n .sort(dynamicSort('sort')),\n resources,\n dynamicFilters: initDynamicFilters(\n intl,\n allDynamicFilters,\n userStorage.getItem(dynamicFiltersStorageKey) || [],\n filters,\n defaultFilters,\n ),\n });\n });\n }\n\n filterChanged = filter => {\n const { filters, onFilterChange } = this.props;\n const newFilters = { ...filters, ...filter };\n\n if (JSON.stringify(filters) !== JSON.stringify(newFilters)) onFilterChange(newFilters);\n };\n dynamicFilterChanged = (item, selected) => {\n this.setState(({ dynamicFilters }) => {\n const { filters } = this.props;\n const newFilters = handleDynamicFiltersChanged(\n dynamicFilters,\n item,\n selected,\n filters,\n defaultFilters,\n );\n userStorage.setItem(\n dynamicFiltersStorageKey,\n newFilters.filter(x => x.selected).map(x => x.id),\n );\n if (\n !selected &&\n item.id !== 'selectAll' &&\n !isEqual(filters[item.id], defaultFilters[item.id])\n ) {\n // Reset filter when it's removed\n this.filterChanged({ [item.id]: defaultFilters[item.id] });\n }\n return { dynamicFilters: newFilters };\n });\n };\n\n savedFilterChanged = filters => {\n const { onFilterChange } = this.props;\n const newFilters = { ...defaultFilters, ...filters };\n if (typeof newFilters.dateFrom === 'string') newFilters.dateFrom = moment.utc(filters.dateFrom);\n if (typeof newFilters.dateUntil === 'string')\n newFilters.dateUntil = moment.utc(filters.dateUntil);\n\n onFilterChange(newFilters);\n\n this.setState(({ dynamicFilters }) => ({\n dynamicFilters: resetDynamicFilters(dynamicFilters, newFilters, defaultFilters),\n }));\n };\n\n renderDynamicFilter = ({ type, filters, intl }) => {\n //\n console.warn(`Missing filter: ${type}`);\n\n return null;\n };\n\n relationChanged = item => {\n if (!item || !item.id) {\n this.filterChanged({ relationId: null, relationName: null, invoiceStreamId: null });\n } else {\n this.filterChanged({\n relationId: item.key,\n relationName: item.label,\n });\n }\n };\n dateChanged = (startDate, endDate) => {\n this.filterChanged({ dateFrom: startDate, dateUntil: endDate });\n };\n\n render() {\n const { labels, employeeLabels, resources, dynamicFilters } = this.state;\n const { filters, intl, totals, countSelected } = this.props;\n const initRelation = filters.relationId\n ? {\n key: filters.relationId,\n label: filters.relationName,\n invoiceStreamId: filters.invoiceStreamId,\n }\n : null;\n\n const showCompanies = hasMultipleCompanies();\n\n const visibleFilters = dynamicFilters.filter(x => x.selected).map(x => x.id);\n\n return (\n
    \n
    \n
    \n
    \n
    \n
    \n \n

    \n \n

    \n

    \n \n

    \n
    \n
    \n
    \n
    \n \n

    \n \n

    \n

    \n \n

    \n
    \n
    \n
    \n \n

    \n \n

    \n

    {((totals && totals.totalHours) || 0).toTime()}

    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n {\n this.filterChanged({ relationTypes: value });\n }}\n />\n
    \n
    \n
    \n
    \n
    \n
    \n this.filterChanged({ legalForms: selection })}\n showWithoutOption\n />\n
    \n
    \n
    \n
    \n {\n this.filterChanged({ crmTypes: value });\n }}\n hiddenTypes={[0]}\n />\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n this.dateChanged(startDate, endDate)}\n block\n />\n
    \n
    \n
    \n this.filterChanged({ userId: user ? user.id : null })}\n value={filters.userId}\n placeholder={intl.formatMessage(messages.RegisteredBy)}\n />\n
    \n
    \n
    \n
    \n \n this.filterChanged({ resourceId: resource ? resource.id : null })\n }\n emptyLabel={intl.formatMessage(messages.NoPriceListItemsFound)}\n value={filters.resourceId ? { id: filters.resourceId } : undefined}\n intl={intl}\n disabled={false}\n />\n
    \n
    \n
    \n
    \n this.filterChanged({ invoiceScheduleTypes: items })}\n hideInvoicingVia\n />\n
    \n
    \n\n {showCompanies && (\n
    \n
    \n this.filterChanged({ ownCompanies: companies })}\n />\n
    \n
    \n )}\n {this.assignmentsEnabled && (\n
    \n
    \n this.filterChanged({ assignmentTemplateId: id || null })}\n showDefaultAssignment\n />\n
    \n
    \n )}\n {visibleFilters && visibleFilters.length > 0\n ? visibleFilters.map(id => (\n \n ))\n : null}\n
    \n
    \n
    \n \n
    \n {countSelected && (\n
    \n
    {countSelected}
    \n
    \n )}\n
    \n
    \n );\n }\n}\n\nexport default injectIntl(ToInvoiceFilters);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { injectIntl, FormattedMessage, FormattedNumber } from 'react-intl';\nimport SignalRService from '@/shared/services/SignalRService';\nimport intlShape from '@/shared/utils/intlShape';\n\nimport FormattedCurrency from '@/shared/components/FormattedCurrency';\nimport FormattedListValue from '@/shared/components/FormattedListValue';\nimport RelationName from '@/shared/components/RelationName';\nimport SimplePanel from '@/shared/components/SimplePanel';\nimport YesNoModal from '@/shared/components/YesNoModal';\n\nimport { FaFileExcel, FaShareAlt, FaFileMedical, FaPlus, FaExternalLinkAlt } from 'react-icons/fa';\n\nimport moment from 'moment';\nimport Axios from 'axios';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport { CanCreate, CanUpdate, CanRead } from '@/shared/components/security';\nimport { injectStateService, StateService } from '@/shared/services/StateService';\nimport Button from '@/shared/components/Button';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport ToastrService from '@/shared/services/ToastrService';\nimport Checkbox from '@/shared/components/input/Checkbox';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport RegistrationModal from '@/shared/components/registration/RegistrationModal';\nimport { createEmptyRegistration } from '@/shared/components/registration/registrationHelpers';\nimport { mapInvoiceStreamName } from '@/shared/services/ObjectDisplayService';\nimport ScrollableTable from '@/shared/components/table/ScrollableTable';\nimport ColumnHeader from '@/shared/components/table/ColumnHeader';\nimport ToInvoiceDetail from './ToInvoiceDetail';\nimport ToInvoiceFilters, { defaultFilters } from './ToInvoiceFilters';\nimport ToInvoiceGlobalActionsButton from './ToInvoiceGlobalActionsButton';\nimport messages from '../invoicingMessages';\nimport FormattedDateShort from '../../../shared/components/FormattedDateShort';\n\nconst showColumn = {\n distance: item => item.distance !== 0,\n inForfaitAmount: item =>\n item.invoicingType === 1 && item.inForfaitAmount !== null && item.inForfaitAmount > 0,\n exForfaitAmount: item =>\n item.invoicingType === 1 && item.exForfaitAmount !== null && item.exForfaitAmount > 0,\n fixedAmount: item =>\n item.invoicingType === 1 && !item.hasDraft && item.fixedAmount !== null && item.fixedAmount > 0,\n unsettledAdvances: item =>\n !item.hasDraft && item.unsettledAdvances !== null && item.unsettledAdvances > 0,\n};\nconst editRegistrationOptions = {\n editableRelation: true,\n};\nconst formatFiltersForRequest = ({ dateFrom, dateUntil, ...rest } = {}) => ({\n ...rest,\n dateFrom: dateFrom ? moment(dateFrom).format('YYYY-MM-DD') : undefined,\n dateUntil: dateUntil ? moment(dateUntil).format('YYYY-MM-DD') : undefined,\n});\n\nconst SessionStorageKey = 'ToInvoiceParams';\n\nclass ToInvoiceContainer extends Component {\n constructor(props) {\n super(props);\n const { searchParams = {} } = props;\n const { toInvoiceFilters = {}, ...otherSessionParams } =\n JSON.parse(sessionStorage.getItem(SessionStorageKey)) || {};\n\n if (toInvoiceFilters.dateFrom) {\n toInvoiceFilters.dateFrom = moment.utc(toInvoiceFilters.dateFrom);\n }\n if (toInvoiceFilters.dateUntil) {\n toInvoiceFilters.dateUntil = moment.utc(toInvoiceFilters.dateUntil);\n }\n this.state = {\n items: [],\n invoiceScheduleDate: moment.utc(),\n invoiceScheduleDateFocused: false,\n hideDevPanel: true,\n allRelationsSelected: false,\n details: {},\n globalActionRunning: false,\n totals: {},\n initialSearchParams: {\n page: 0,\n sortKey: 'displayName',\n pageSize: 50,\n ...otherSessionParams,\n toInvoiceFilters: {\n ...defaultFilters,\n ...toInvoiceFilters,\n ...searchParams,\n },\n },\n };\n }\n\n loadItems = searchParams => {\n const toInvoiceFilters = formatFiltersForRequest(searchParams.toInvoiceFilters);\n\n const params = {\n desc: searchParams.desc,\n sort: searchParams.sortKey,\n page: searchParams.page,\n take: searchParams.pageSize,\n ...toInvoiceFilters,\n };\n\n const sessionParams = JSON.stringify({\n desc: searchParams.desc,\n sortKey: searchParams.sortKey,\n toInvoiceFilters: searchParams.toInvoiceFilters,\n });\n\n if (params.page === 0) this.retrieveTotals(toInvoiceFilters);\n\n sessionStorage.setItem(SessionStorageKey, sessionParams);\n\n if (typeof this.token !== typeof undefined) {\n this.token.cancel('Operation canceled due to new request.');\n }\n this.token = Axios.CancelToken.source();\n\n return api.base\n .get(`${config.appUrls.api}/api/Invoice/CustomerBillable`, {\n params,\n cancelToken: this.token.token,\n })\n .then(({ data }) => {\n this.setState(({ allRelationsSelected, items, details }) => {\n const newItems = data.map(e => ({ ...e, selected: !!allRelationsSelected }));\n return {\n items: searchParams.page > 0 ? [...items, ...newItems] : newItems,\n details: searchParams.page === 0 ? {} : details,\n };\n });\n\n return data;\n })\n .catch(error => {\n if (!Axios.isCancel(error)) return error;\n });\n };\n\n retrieveTotals = filters => {\n if (typeof this.totalsToken !== typeof undefined) {\n this.totalsToken.cancel('Operation canceled due to new request.');\n }\n this.totalsToken = Axios.CancelToken.source();\n return api.base\n .get(`${config.appUrls.api}/api/Invoice/CustomerBillableTotals`, {\n params: { ...filters },\n cancelToken: this.totalsToken.token,\n })\n .then(({ data }) => {\n this.setState({\n totals: data || {},\n });\n\n return data || {};\n })\n .catch(error => {\n if (!Axios.isCancel(error)) return error;\n });\n };\n\n retrieveDetails = invoiceStreamId => {\n const { initialSearchParams: { toInvoiceFilters = {} } = {} } = this.state;\n\n const { dateFrom, dateUntil, userId, resourceId, referenceYear } = toInvoiceFilters;\n const params = formatFiltersForRequest({\n dateFrom,\n dateUntil,\n userId,\n resourceId,\n referenceYear,\n });\n return api.base\n .get(`${config.appUrls.api}/api/Invoice/CustomerBillableDetails/${invoiceStreamId}`, {\n params,\n })\n .then(({ data }) => {\n const { details } = this.state;\n const detail = { ...(details[invoiceStreamId] || { collapsed: false }), data };\n\n this.setState({\n details: { ...details, [invoiceStreamId]: detail },\n showEditRegistrationModal: false,\n });\n\n })\n .catch(error => {\n const { intl } = this.props;\n handleHttpError(intl)(error);\n });\n };\n\n componentDidMount() {\n this.assignmentsEnabled = DataCacheService.assignmentsEnabled();\n SignalRService.subscribe('draft-registration-invoice-created', this.draftInvoiceCreatedHandler);\n }\n componentWillUnmount() {\n SignalRService.unsubscribe(\n 'draft-registration-invoice-created',\n this.draftInvoiceCreatedHandler,\n );\n\n if (typeof this.token !== 'undefined') {\n this.token.cancel('Operation canceled due to leaving page.');\n }\n if (typeof this.totalsToken !== 'undefined') {\n this.totalsToken.cancel('Operation canceled due to leaving page.');\n }\n }\n\n draftInvoiceCreatedHandler = invoices => {\n this.setState(state => {\n if (!state.items) return state;\n\n return {\n items: state.items.map(i => {\n if (!invoices.find(x => x.invoiceStreamId === i.invoiceStreamId)) return i;\n return {\n ...i,\n openRegistrationInvoiceStartDate: null,\n created: true,\n };\n }),\n };\n });\n };\n\n reload = () => {\n this.setState(state => ({\n items: [],\n details: {},\n initialSearchParams: {\n ...state.initialSearchParams,\n page: 0,\n r: new Date().getTime(),\n },\n }));\n };\n reloadInvoiceStream = invoiceStreamId => {\n const { items } = this.state;\n if (!items.some(x => x.invoiceStreamId === invoiceStreamId)) return Promise.resolve(null);\n return api.base\n .get(`${config.appUrls.api}/api/Invoice/CustomerBillable`, {\n params: {\n invoiceStreamId,\n },\n cancelToken: this.token.token,\n })\n .then(({ data }) => {\n if (!data || !data.length) return null;\n const [item] = data;\n this.setState(\n state => ({\n items: state.items.map(x =>\n x.invoiceStreamId === item.invoiceStreamId ? { ...x, ...item } : x,\n ),\n }),\n () => {\n const { details } = this.state;\n if (!details[invoiceStreamId]) return;\n this.retrieveDetails(invoiceStreamId);\n },\n );\n return item;\n });\n };\n\n billSingleRelation = row => {\n const { initialSearchParams: { toInvoiceFilters = {} } = {} } = this.state;\n const { dateFrom, dateUntil } = toInvoiceFilters;\n const params = formatFiltersForRequest({ dateFrom, dateUntil });\n\n return api.base\n .post(\n `${config.appUrls.api}/api/InvoiceRegistration/BillStream/${row.invoiceStreamId}`,\n params,\n )\n .then(\n ({ data }) => {\n if (data) {\n this.setState(state => ({\n items: state.items\n ? state.items.map(i => {\n if (i.invoiceStreamId !== row.invoiceStreamId) return i;\n return { ...i, created: true };\n })\n : state.items,\n }));\n }\n return true;\n },\n error => {\n const { intl } = this.props;\n handleHttpError(intl)(error);\n },\n );\n };\n\n getSelectionParams = () => {\n const { items, allRelationsSelected } = this.state;\n\n // Get all invoiceStream ids that don't match the select all checkbox\n const invoiceStreamIds = items\n ? items.filter(x => x.selected !== allRelationsSelected).map(x => x.invoiceStreamId)\n : [];\n return {\n invoiceStreamIds,\n selectAll: allRelationsSelected,\n };\n };\n billMultipleRelations = () => {\n const { intl, stateService } = this.props;\n const { initialSearchParams: { toInvoiceFilters = {} } = {} } = this.state;\n this.setState({ globalActionRunning: true });\n\n const model = {\n ...this.getSelectionParams(),\n };\n\n return api.base\n .post(`${config.appUrls.api}/api/InvoiceRegistration/BatchBill/`, model, {\n params: formatFiltersForRequest(toInvoiceFilters),\n })\n .then(\n ({ data }) => {\n if (data) {\n this.setState(({ items }) => ({\n globalActionRunning: false,\n items: items\n ? items.map(item =>\n item.selected\n ? {\n ...item,\n openRegistrationInvoiceStartDate:\n item.openRegistrationInvoiceStartDate || moment.utc(),\n }\n : item,\n )\n : items,\n }));\n ToastrService.success(\n intl.formatMessage(messages.NrDraftInvoicedCreatedOrModified, { nr: data }),\n null,\n () => {\n stateService.gotoDraftInvoices();\n },\n );\n }\n },\n error => {\n handleHttpError(intl)(error);\n this.setState({ globalActionRunning: false });\n },\n );\n };\n\n handleSelection = row => {\n this.setState(({ items }) => ({\n items: items.map(x =>\n x.invoiceStreamId === row.invoiceStreamId ? { ...x, selected: !x.selected } : x,\n ),\n }));\n };\n getCountSelectedRelations() {\n const { allRelationsSelected, items, totals } = this.state;\n if (!items || !totals) return 0;\n const total = totals.count || 0;\n const count = items.filter(x => x.selected !== allRelationsSelected).length;\n\n if (allRelationsSelected) {\n return total - count;\n }\n return count;\n }\n getCountSelectedRelationsFormatted() {\n const { items, totals = {} } = this.state;\n const { intl } = this.props;\n const total = items ? totals.count || 0 : 0;\n const count = this.getCountSelectedRelations();\n\n return intl.formatMessage(messages.CountSelected, { count, total });\n }\n\n toggleCollapse = invoiceStreamId => {\n const { details } = this.state;\n if (!details[invoiceStreamId]) {\n this.setState(\n { details: { ...details, [invoiceStreamId]: { collapsed: false, data: {} } } },\n () => {\n // load\n this.retrieveDetails(invoiceStreamId);\n },\n );\n } else {\n const detail = { ...details[invoiceStreamId] };\n detail.collapsed = !detail.collapsed;\n this.setState({ details: { ...details, [invoiceStreamId]: detail } });\n }\n };\n\n billRegistration = (registration, invoiceStreamId) => {\n const { details } = this.state;\n const detail = details[invoiceStreamId];\n\n this.setState(\n {\n details: {\n ...details,\n [invoiceStreamId]: {\n ...detail,\n data: {\n ...detail.data,\n registrations: detail.data.registrations.map(x => {\n if (registration.id === x.id) {\n return {\n ...x,\n addingToDraft: true,\n };\n }\n return x;\n }),\n },\n },\n },\n },\n () => {\n api.base.post(`${config.appUrls.api}/api/InvoiceRegistration/post`, [registration.id]).then(\n ({ data }) => {\n if (data) {\n const { intl } = this.props;\n ToastrService.success(\n intl.formatMessage(messages.RegistrationAddedToInvoiceProposal),\n );\n this.setState(\n {\n details: {\n ...details,\n [invoiceStreamId]: {\n ...detail,\n data: {\n ...detail.data,\n registrations: detail.data.registrations.filter(\n x => x.id !== registration.id,\n ),\n },\n },\n },\n },\n () => {\n // refresh the totals for current invoicestream\n this.refreshOpenRegistrationsForInvoiceStream(invoiceStreamId);\n },\n );\n }\n },\n error => {\n const { intl } = this.props;\n handleHttpError(intl)(error);\n },\n );\n },\n );\n };\n renderRow = (\n row,\n {\n showDistance = false,\n showForfait = false,\n showInExForfait = false,\n showAdvances = false,\n } = {},\n intl,\n stateService,\n ) => {\n const isProcessing =\n row.openRegistrationInvoiceStartDate &&\n moment.utc(row.openRegistrationInvoiceStartDate) &&\n moment\n .utc(row.openRegistrationInvoiceStartDate)\n .add(1, 'hours')\n .isAfter(moment.utc());\n const { details } = this.state;\n const { collapsed = true, data: rowDetail } = details[row.invoiceStreamId] || {};\n const nrOfColumns =\n 8 +\n this.assignmentsEnabled +\n showDistance +\n showForfait +\n showInExForfait +\n showInExForfait +\n showAdvances;\n const { invoiceDialogsSvc } = this.props;\n\n return (\n \n \n \n this.handleSelection(row)} value={row.selected} />\n this.toggleCollapse(row.invoiceStreamId)} className=\"caret-button\">\n \n \n \n \n \n {row.hasInvoicingVia && (\n \n \n \n )}\n \n {this.assignmentsEnabled ? {mapInvoiceStreamName(row, intl, '')} : null}\n \n {row.invoicingType === null ? (\n \n ) : (\n \n )}\n \n {row.nextScheduleDate && }\n \n \n \n \n {' '}\n {!row.hours && row.hours !== 0 ? null : row.hours.toTime()}\n \n {showDistance && (\n \n {showColumn.distance(row) && }\n \n )}\n {showInExForfait && (\n \n {showColumn.inForfaitAmount(row) && }\n \n )}\n {showInExForfait && (\n \n {showColumn.exForfaitAmount(row) && }\n \n )}\n {showForfait && (\n \n {showColumn.fixedAmount(row) && }\n \n )}\n {showAdvances && (\n \n {showColumn.unsettledAdvances(row) && (\n \n )}\n \n )}\n \n \n \n \n {isProcessing && (\n \n )}\n\n {row.created && !isProcessing && (\n \n \n stateService.gotoDraftInvoices({\n relation: { id: row.relationId, name: row.name },\n })\n }\n >\n \n \n \n )}\n {!row.created && !isProcessing && row.hasDraft && (\n \n this.billSingleRelation(row)}\n >\n \n \n \n \n )}\n {!row.created && !isProcessing && !row.hasDraft && (\n \n this.billSingleRelation(row)}\n >\n \n \n \n \n )}\n \n \n invoiceDialogsSvc.showInvoicingHistory(row.invoiceStreamId, null, row.relationId)\n }\n >\n \n \n \n \n stateService.gotoRegistrationOverview({\n relation: { id: row.relationId },\n period: 'all',\n filters: { invoiceStatus: { items: [0] } },\n finalInvoiceStreamId: row.invoiceStreamId,\n })\n }\n >\n \n \n \n \n {!collapsed && !!rowDetail && (\n {\n this.setState({\n activeRegistration: createEmptyRegistration(registration),\n activeInvoiceStreamId: row.invoiceStreamId,\n showEditRegistrationModal: true,\n });\n }}\n onAddToDraftInvoice={registration =>\n this.billRegistration(registration, row.invoiceStreamId)\n }\n onNeverInvoiceRegistration={registration =>\n this.setState({\n activeRegistration: registration,\n activeInvoiceStreamId: row.invoiceStreamId,\n showNeverInvoiceRegistrationModal: true,\n })\n }\n onRemoveRegistration={registration =>\n this.setState({\n activeRegistration: registration,\n activeInvoiceStreamId: row.invoiceStreamId,\n showRemoveRegistrationModal: true,\n })\n }\n {...rowDetail}\n />\n )}\n \n );\n };\n\n handleSelectAllRelations = () => {\n const { items, allRelationsSelected } = this.state;\n\n const isCurrentlySelected = !allRelationsSelected;\n\n const itemsCopy = items.map(e => ({ ...e, selected: !!isCurrentlySelected }));\n\n this.setState(state => ({\n ...state,\n allRelationsSelected: isCurrentlySelected,\n items: itemsCopy,\n }));\n };\n\n isGlobalActionsDisabled = () => {\n const { globalActionRunning } = this.state;\n return globalActionRunning || this.getCountSelectedRelations() === 0;\n };\n\n filtersChanged = filters => {\n this.setState(state => ({\n items: null,\n initialSearchParams: {\n ...state.initialSearchParams,\n page: 0,\n toInvoiceFilters: filters,\n },\n }));\n };\n\n createExcelReport = () => {\n const { intl } = this.props;\n const { initialSearchParams: { toInvoiceFilters = {} } = {} } = this.state;\n\n const culture = intl.locale;\n\n const url = `/api/invoice/CustomerBillableReport`;\n\n const urlParams = {\n ...formatFiltersForRequest(toInvoiceFilters),\n culture,\n connectionId: SignalRService.getConnectionId(),\n };\n\n this.setState({\n creatingReport: true,\n });\n\n return api.base\n .post(url, null, { params: urlParams })\n .then(() => {\n ToastrService.info(intl.formatMessage(messages.ExportToExcelStarted));\n\n this.setState({\n creatingReport: false,\n });\n })\n .catch(error => {\n this.setState({\n creatingReport: false,\n });\n handleHttpError(intl)(error);\n });\n };\n\n onRegistrationModified = registration => {\n const { details, activeRegistration, activeInvoiceStreamId } = this.state;\n const detail = details[activeInvoiceStreamId];\n\n // if the assignment/invoicestream was changed, remove the registration from current assignment and add to other one\n if (activeRegistration.invoiceStreamId !== registration.invoiceStreamId) {\n this.setState(\n {\n showEditRegistrationModal: false,\n },\n () => {\n // Reload both lines\n Promise.all([\n this.reloadInvoiceStream(activeRegistration.invoiceStreamId),\n this.reloadInvoiceStream(registration.invoiceStreamId),\n ]).then(([i1, i2]) => {\n if (!i1 || !i2) {\n this.reload();\n }\n });\n },\n );\n } else {\n this.setState(\n {\n showEditRegistrationModal: false,\n details: {\n ...details,\n [activeInvoiceStreamId]: {\n ...detail,\n data: {\n ...detail.data,\n registrations: detail.data.registrations.map(x => {\n if (x.group === registration.group) {\n return registration;\n }\n return x;\n }),\n },\n },\n },\n },\n () => {\n // refresh the totals for current invoicestream\n this.refreshOpenRegistrationsForInvoiceStream(activeInvoiceStreamId);\n },\n );\n }\n };\n\n refreshOpenRegistrationsForInvoiceStream = invoiceStreamId =>\n api.base\n .get(`${config.appUrls.api}/api/Invoice/CustomerBillable`, {\n params: {\n invoiceStreamId,\n },\n })\n .then(({ data }) => {\n if (data && data.length > 0) {\n const updatedItem = data[0];\n this.setState(state => ({\n items: state.items.map(x => {\n if (x.invoiceStreamId === invoiceStreamId) {\n return updatedItem;\n }\n return x;\n }),\n }));\n }\n if (data.length === 0) {\n // no registrations, delete from list\n this.setState(state => ({\n items: state.items.filter(x => x.invoiceStreamId !== invoiceStreamId),\n }));\n }\n });\n\n removeRegistration = registration => {\n const { details, activeInvoiceStreamId } = this.state;\n const detail = details[activeInvoiceStreamId];\n const model = {\n ...registration,\n removing: true,\n };\n this.setState(this.updateRegistrationState(model, activeInvoiceStreamId), () => {\n api.base\n .delete(\n `${config.appUrls.api}/api/registration/Delete/${registration.id}?deleteGroup=false`,\n )\n .then(\n () => {\n const { intl } = this.props;\n ToastrService.success(intl.formatMessage(messages.RegistrationRemoved));\n this.setState(\n {\n details: {\n ...details,\n [activeInvoiceStreamId]: {\n ...detail,\n data: {\n ...detail.data,\n registrations: detail.data.registrations.filter(\n x => x.id !== registration.id,\n ),\n },\n },\n },\n },\n () => {\n // refresh the totals for current invoicestream\n this.refreshOpenRegistrationsForInvoiceStream(activeInvoiceStreamId);\n },\n );\n },\n error => {\n const { intl } = this.props;\n this.setState(\n this.updateRegistrationState(\n { ...registration, removing: false },\n activeInvoiceStreamId,\n ),\n );\n handleHttpError(intl)(error);\n },\n );\n });\n };\n\n updateRegistrationState = (registration, invoiceStreamId) => {\n const { details } = this.state;\n const detail = details[invoiceStreamId];\n return {\n showNeverInvoiceRegistrationModal: false,\n showRemoveRegistrationModal: false,\n showEditRegistrationModal: false,\n details: {\n ...details,\n [invoiceStreamId]: {\n ...detail,\n data: {\n ...detail.data,\n registrations: detail.data.registrations.map(x => {\n if (registration.id === x.id) {\n return {\n ...x,\n ...registration,\n };\n }\n return x;\n }),\n },\n },\n },\n };\n };\n\n neverInvoiceRegistration = registration => {\n const model = {\n ...registration,\n neverInvoicing: true,\n };\n const { details, activeInvoiceStreamId } = this.state;\n const detail = details[activeInvoiceStreamId];\n this.setState(this.updateRegistrationState(model, activeInvoiceStreamId), () => {\n api.base\n .put(\n `${config.appUrls.api}/api/registration/NeverInvoice/${registration.id}?neverInvoice=true`,\n )\n .then(\n () => {\n const { intl } = this.props;\n ToastrService.success(intl.formatMessage(messages.RegistrationMarkedAsNeverInvoice));\n this.setState(\n {\n details: {\n ...details,\n [activeInvoiceStreamId]: {\n ...detail,\n data: {\n ...detail.data,\n registrations: detail.data.registrations.filter(\n x => x.id !== registration.id,\n ),\n },\n },\n },\n },\n () => {\n // refresh the totals for current invoicestream\n this.refreshOpenRegistrationsForInvoiceStream(activeInvoiceStreamId);\n },\n );\n },\n error => {\n const { intl } = this.props;\n this.setState(\n this.updateRegistrationState(\n { ...registration, neverInvoicing: false },\n activeInvoiceStreamId,\n ),\n );\n handleHttpError(intl)(error);\n },\n );\n });\n };\n render() {\n const { intl, stateService } = this.props;\n const {\n items,\n invoiceScheduleDate,\n invoiceScheduleDateFocused,\n hideDevPanel,\n allRelationsSelected,\n creatingReport,\n activeRegistration,\n showEditRegistrationModal,\n showRemoveRegistrationModal,\n showNeverInvoiceRegistrationModal,\n initialSearchParams,\n totals,\n } = this.state;\n\n const displaySettings = (items || []).reduce(\n (result, item) => ({\n showDistance: result.showDistance || showColumn.distance(item),\n showForfait: result.showForfait || showColumn.fixedAmount(item),\n showInExForfait:\n result.showInExForfait ||\n showColumn.inForfaitAmount(item) ||\n showColumn.exForfaitAmount(item),\n showAdvances: result.showAdvances || showColumn.unsettledAdvances(item),\n }),\n {\n showDistance: false,\n showForfait: false,\n showInExForfait: false,\n showAdvances: false,\n },\n );\n\n return (\n
    \n {showRemoveRegistrationModal && (\n \n this.setState({ showRemoveRegistrationModal: false, activeRegistration: undefined })\n }\n onSave={() => this.removeRegistration(activeRegistration)}\n />\n )}\n {showNeverInvoiceRegistrationModal && (\n \n this.setState({\n showNeverInvoiceRegistrationModal: false,\n activeRegistration: undefined,\n })\n }\n onSave={() => this.neverInvoiceRegistration(activeRegistration)}\n />\n )}\n {showEditRegistrationModal && (\n \n this.setState(state => ({\n ...state,\n activeRegistration: undefined,\n showEditRegistrationModal: false,\n }))\n }\n />\n )}\n \n this.filtersChanged(filters)}\n totals={totals}\n countSelected={this.getCountSelectedRelationsFormatted()}\n />\n \n\n {items && items.length > 0 && (\n
    \n
    \n this.createExcelReport()}\n disabled={creatingReport}\n >\n \n {intl.formatMessage(messages.ExportToExcel)}\n \n \n \n \n
    \n
    \n )}\n this.renderRow(item, displaySettings, intl, stateService)}\n noDataLabel={}\n >\n \n }\n />\n \n {this.assignmentsEnabled ? (\n \n ) : null}\n \n \n \n \n {displaySettings.showDistance ? (\n \n ) : null}\n {displaySettings.showInExForfait ? (\n \n ) : null}\n {displaySettings.showInExForfait ? (\n \n ) : null}\n {displaySettings.showForfait ? (\n \n ) : null}\n {displaySettings.showAdvances ? (\n \n ) : null}\n \n \n \n
    \n );\n }\n}\n\nToInvoiceContainer.propTypes = {\n intl: intlShape.isRequired,\n stateService: PropTypes.instanceOf(StateService).isRequired,\n};\n\nexport default injectStateService(injectIntl(ToInvoiceContainer));\n","import React from 'react';\nimport propTypes from 'prop-types';\n\nconst Column = props => {\n const { render } = props;\n return
    {render()}
    ;\n};\n\nColumn.propTypes = {\n render: propTypes.func.isRequired,\n};\n\nexport default Column;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\n\nexport default class CollapsableTableRow extends Component {\n state = {\n isCollapsed: true,\n };\n\n componentDidMount() {\n const { initialIsCollapsed } = this.props;\n\n this.setState(state => ({\n ...state,\n isCollapsed: initialIsCollapsed,\n }));\n }\n\n toggleCollapse = () => {\n this.setState(state => ({\n ...state,\n isCollapsed: !state.isCollapsed,\n }));\n };\n\n render() {\n const { children, isCollapsable, renderDetail, rowProps } = this.props;\n const { isCollapsed } = this.state;\n\n // Count of all elements + 1 for column for toggle collapse\n const totalColumns = React.Children.toArray(children).length + 1;\n\n return (\n \n \n \n {isCollapsable && (\n this.toggleCollapse()}>\n \n \n )}\n \n {children}\n \n {!isCollapsed &&\n isCollapsable && (\n \n \n {renderDetail()} \n \n )}\n \n );\n }\n\n static propTypes = {\n initialIsCollapsed: PropTypes.bool,\n children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]).isRequired,\n isCollapsable: PropTypes.bool,\n renderDetail: PropTypes.func,\n rowProps: PropTypes.shape({}),\n };\n\n static defaultProps = {\n initialIsCollapsed: true,\n isCollapsable: true,\n renderDetail: () => {},\n rowProps: {},\n };\n}\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport StatusLabel from '@/shared/components/StatusLabel';\nimport { formatListValue } from '@/shared/components/FormattedListValue';\nvar JobStatus = function (_a) {\n var status = _a.status, intl = _a.intl;\n var statuses = [];\n if (status === 0 /* Status.Initialized */ || status === 1 /* Status.Processing */) {\n statuses = ['info', 'active'];\n }\n if (status === 2 /* Status.Success */) {\n statuses = ['success'];\n }\n if (status === 3 /* Status.Failed */) {\n statuses = ['danger'];\n }\n if (status === 4 /* Status.Skipped */) {\n statuses = ['warning'];\n }\n return (_jsx(StatusLabel, __assign({ statuses: statuses, className: \"document-status-label\" }, { children: formatListValue({ id: status, list: 'jobstatus', intl: intl }) })));\n};\nexport default JobStatus;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport FormattedListValue from '@/shared/components/FormattedListValue';\nimport SimplePanel from '@/shared/components/SimplePanel';\nimport { FormattedMessage, injectIntl } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport Checkbox from '@/shared/components/input/Checkbox';\nimport messages from '../jobMessages';\n\nconst JobDetailUpdateTaskStatus = ({ job, intl }) => {\n const sendEmailText = job.parameters.sendEmail\n ? intl.formatMessage(messages.Yes)\n : intl.formatMessage(messages.No);\n\n return (\n }>\n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n {job.parameters.subtaskTemplateId || job.parameters.subtaskName ? (\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n ) : null}\n
    \n
    \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    \n );\n};\n\nJobDetailUpdateTaskStatus.propTypes = {\n job: PropTypes.shape({}).isRequired,\n intl: intlShape.isRequired,\n};\n\nexport default injectIntl(JobDetailUpdateTaskStatus);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport SimplePanel from '@/shared/components/SimplePanel';\nimport { injectIntl, FormattedMessage } from 'react-intl';\nimport messages from '../jobMessages';\nimport utils from '@/shared/utils/adminpulse';\nimport FormattedListValue, { listItemMsg } from '@/shared/components/FormattedListValue';\n\nconst JobDetailRelationFieldUpdate = ({ job, intl }) => {\n // Some json parameters might still be stored without camelcase in the db, so convert it to camelcase just in case\n const parameters = utils.toCamel(job.parameters);\n const fieldId = parameters.definition.id;\n return (\n }>\n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n {intl.formatMessage(listItemMsg('field', fieldId))}\n
    \n
    \n
    \n
    \n
    \n
    \n );\n};\n\nJobDetailRelationFieldUpdate.propTypes = {\n job: PropTypes.shape({}).isRequired,\n};\n\nexport default injectIntl(JobDetailRelationFieldUpdate);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport FormattedListValue from '@/shared/components/FormattedListValue';\nimport SimplePanel from '@/shared/components/SimplePanel';\nimport { injectIntl, FormattedMessage, FormattedDate } from 'react-intl';\nimport messages from '../jobMessages';\nimport utils from '@/shared/utils/adminpulse';\nimport FormattedDateShort from \"../../../shared/components/FormattedDateShort\";\n\nconst JobDetailCreateTaskSchedule = ({ job }) => {\n // Some json parameters might still be stored without camelcase in the db, so convert it to camelcase just in case\n const parameters = utils.toCamel(job.parameters);\n\n return (\n }>\n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n \n
    \n
    \n {parameters.planningStop && (\n \n )}\n
    \n
    \n
    \n
    \n
    \n
    \n );\n};\n\nJobDetailCreateTaskSchedule.propTypes = {\n job: PropTypes.shape({}).isRequired,\n};\n\nexport default injectIntl(JobDetailCreateTaskSchedule);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport FormattedListValue from '@/shared/components/FormattedListValue';\nimport SimplePanel from '@/shared/components/SimplePanel';\nimport { injectIntl, FormattedMessage, FormattedDate } from 'react-intl';\nimport moment from 'moment';\nimport messages from '../jobMessages';\nimport Checkbox from '@/shared/components/input/Checkbox';\nimport FormattedDateShort from \"../../../shared/components/FormattedDateShort\";\n\nconst JobDetailCreateRegistration = ({ job, intl }) => {\n // Some json parameters might still be stored without camelcase in the db, so convert it to camelcase just in case\n const { parameters } = job;\n\n return (\n }>\n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n \n
    \n
    \n {parameters.resource.type === 0 &&\n `${parameters.durationMinutes} ${intl.formatMessage(messages.MinutesLowerCase)}`}\n {parameters.resource.type !== 0 && `${parameters.quantity}`}\n
    \n
    \n
    \n\n
    \n
    \n
    \n \n
    \n
    \n {}} />\n
    \n
    \n {parameters.resource.type === 0 && (\n
    \n
    \n \n
    \n
    \n {moment(parameters.startTime, 'HH:mm:ss').format('HH:mm')}\n
    \n
    \n )}\n {parameters.taskTemplateId && (\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n )}\n
    \n
    \n\n {parameters.remark && (\n \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    {parameters.remark}
    \n
    \n
    \n
    \n
    \n )}\n {parameters.internalRemark && (\n \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    {parameters.internalRemark}
    \n
    \n
    \n
    \n
    \n )}\n
    \n
    \n );\n};\n\nJobDetailCreateRegistration.propTypes = {\n job: PropTypes.shape({}).isRequired,\n};\n\nexport default injectIntl(JobDetailCreateRegistration);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport FormattedListValue from '@/shared/components/FormattedListValue';\nimport SimplePanel from '@/shared/components/SimplePanel';\nimport { injectIntl, FormattedMessage, FormattedDate } from 'react-intl';\nimport messages from '../jobMessages';\nimport FormattedCurrency from '../../../shared/components/FormattedCurrency';\nimport Checkbox from '@/shared/components/input/Checkbox';\nimport FormattedDateShort from \"../../../shared/components/FormattedDateShort\";\n\nconst JobDetailSetInvoiceSchedule = ({ job }) => {\n // Some json parameters might still be stored without camelcase in the db, so convert it to camelcase just in case\n const { parameters } = job;\n return (\n }>\n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n {parameters.scheduleId ? (\n \n ) : (\n \n )}\n
    \n
    \n {parameters.amount !== 0 && (\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n )}\n
    \n
    \n \n
    \n
    {parameters.ledgerAccount}
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n \n
    \n
    \n {parameters.endDate && (\n \n )}\n
    \n
    \n
    \n
    \n \n
    \n
    \n {}} />\n
    \n
    \n
    \n
    \n
    \n
    \n );\n};\n\nJobDetailSetInvoiceSchedule.propTypes = {\n job: PropTypes.shape({}).isRequired,\n};\n\nexport default injectIntl(JobDetailSetInvoiceSchedule);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport FormattedListValue from '@/shared/components/FormattedListValue';\nimport SimplePanel from '@/shared/components/SimplePanel';\nimport { FormattedMessage } from 'react-intl';\nimport { FaExternalLinkAlt } from 'react-icons/fa';\nimport messages from '../jobMessages';\nimport { CanRead } from '@/shared/components/security';\nimport { injectStateService, StateService } from '@/shared/services/StateService';\n\nconst JobDetailMailInvoices = ({ job, stateService }) => (\n }>\n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n \n \n \n stateService.gotoState('settings.templates.edit', {\n templateId: job.parameters.templateId,\n })\n }\n >\n \n \n \n
    \n
    \n
    \n
    \n
    \n
    \n);\n\nJobDetailMailInvoices.propTypes = {\n job: PropTypes.shape({}).isRequired,\n stateService: PropTypes.instanceOf(StateService).isRequired,\n};\n\nexport default injectStateService(JobDetailMailInvoices);\n","import { defineMessages } from 'react-intl';\n\nconst messages = defineMessages({\n ExportToExcel: 'Export to Excel',\n ExportToExcelStarted: 'Export to Excel started',\n NoJobsFound: 'No jobs found',\n JobType: 'Job type',\n CreatedAt: 'Creation date',\n CreatedBy: 'Created by',\n JobStatus: 'Status',\n CompletedAt: 'Completion date',\n OpenDetail: 'Open details',\n Relation: 'Relation',\n Errors: 'Errors',\n ModifiedAt: 'Modified date',\n JobDetails: 'Job details',\n CompletedItems: 'Completed items',\n FailedItems: 'Failed items',\n Relations: 'Relations',\n NumberOfItems: 'Number of items',\n GlobalActions: 'Global actions',\n JobOverviewExplanation:\n 'On this page you will see an overview of the background tasks that were created and their current status. An example of a background task is creating a task schedule on a selection of relations.',\n Task: 'Task',\n Tasks: 'Tasks',\n Subtask: 'Subtask',\n Status: 'Status',\n SendEmail: 'Send email',\n Yes: 'Yes',\n No: 'No',\n Field: 'Field',\n Value: 'Value',\n StartPlanning: 'Start planning',\n EndPlanning: 'End planning',\n TaskTemplate: 'Task template',\n Schedule: 'Schedule',\n Authorization: 'Authorization',\n Authorizations: 'Authorizations',\n Info: 'Info',\n SkippedItems: 'Skipped items',\n Registration: 'Registration',\n Registrations: 'Registrations',\n Date: 'Date',\n Quantity: 'Quantity',\n MinutesLowerCase: 'minutes',\n What: 'What',\n Remark: 'Remark',\n StartTime: 'Start time',\n Billable: 'Billable',\n InternalRemark: 'Internal remark',\n NoSchedule: 'No schedule',\n Amount: 'Amount',\n LedgerAccount: 'Ledger account',\n OverrideExistingSchedule: 'Override existing schedule if present.',\n Invoice: 'Invoice',\n Invoices: 'Invoices',\n MailTemplate: 'Mail template',\n OpenRelation: 'Open relation file',\n OpenInvoice: 'Open invoice',\n Subject: 'Subject',\n Attachments: 'Attachments',\n DeletePlannedTasks: 'Delete planned tasks',\n Document: 'Document',\n Documents: 'Documents',\n Transaction: 'Transaction',\n Transactions: 'Transactions',\n DraftInvoice: 'Draft invoice',\n DraftInvoices: 'Draft invoices',\n PlannedRegistrations: 'Planned registrations',\n PlannedRegistration: 'Planned registration',\n DateFrom: 'From',\n DateUntil: 'Until',\n JobEntryStatus: 'Job entry status',\n ResetFilters: 'Reset filters',\n Search: 'Search',\n SearchInfo: 'Search info',\n Tags: 'Tags',\n Employees: 'Employees',\n Employee: 'Employee',\n Year: 'Year',\n Resource: 'Resource',\n CopyFromPreviousYear: 'Copy from previous year',\n AbsenceStartValue: 'Start value',\n OverrideIfCounterAlreadyExists: 'Override if counter already exists',\n RemoveExistingCorrections: 'Remove existing corrections',\n Hours: 'Hours',\n PriceGrid: 'Price grid',\n All: 'All',\n Default: 'Default',\n PriceProfile: 'Price profile',\n Method: 'Method',\n Percentage: 'Percentage',\n PriceListItems: 'Price list items',\n PriceListItem: 'Price list item',\n InvoiceSchedule: 'Invoice schedule',\n InvoicingType: 'Invoicing type',\n InvoiceCreationDate: 'Invoice creation date',\n});\n\nexport default messages;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport FormattedListValue from '@/shared/components/FormattedListValue';\nimport SimplePanel from '@/shared/components/SimplePanel';\nimport { injectIntl, FormattedMessage } from 'react-intl';\nimport messages from '../jobMessages';\nimport utils from '@/shared/utils/adminpulse';\nimport Checkbox from '@/shared/components/input/Checkbox';\n\nconst JobDetailDeleteTaskSchedule = ({ job }) => {\n // Some json parameters might still be stored without camelcase in the db, so convert it to camelcase just in case\n const parameters = utils.toCamel(job.parameters);\n\n return (\n }>\n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n \n
    \n
    \n {}} />\n
    \n
    \n
    \n
    \n
    \n
    \n );\n};\n\nJobDetailDeleteTaskSchedule.propTypes = {\n job: PropTypes.shape({}).isRequired,\n};\n\nexport default injectIntl(JobDetailDeleteTaskSchedule);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport SimplePanel from '@/shared/components/SimplePanel';\nimport { injectIntl, FormattedMessage } from 'react-intl';\nimport utils from '@/shared/utils/adminpulse';\nimport FormattedListValue, { listItemMsg } from '@/shared/components/FormattedListValue';\nimport messages from '../jobMessages';\n\nconst JobDetailChangeTaskTags = ({ job, intl }) => {\n // Some json parameters might still be stored without camelcase in the db, so convert it to camelcase just in case\n const parameters = utils.toCamel(job.parameters);\n if (!parameters || !parameters.tags || parameters.tags.length === 0) return null;\n return (\n }>\n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
      \n {parameters.tags.map(x => (\n
    • {x.name}
    • \n ))}\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n );\n};\n\nJobDetailChangeTaskTags.propTypes = {\n job: PropTypes.shape({}).isRequired,\n};\n\nexport default injectIntl(JobDetailChangeTaskTags);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport FormattedListValue from '@/shared/components/FormattedListValue';\nimport SimplePanel from '@/shared/components/SimplePanel';\nimport { FormattedMessage, injectIntl } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport InlineAttachment from '@/shared/components/InlineAttachment';\nimport messages from '../jobMessages';\nimport api from '../../../shared/api';\nimport config from '../../../config';\n\nclass JobDetailSendRelationMail extends Component {\n state = {\n emails: [],\n };\n\n componentDidMount() {\n this.loadEmailContent().then(emails => {\n // console.log(emails);\n this.setState({\n emails,\n });\n });\n }\n\n loadEmailContent = () => {\n const { job, intl } = this.props;\n return Promise.all(\n job.parameters.emails.map(email =>\n api.base\n .get(`${config.appUrls.documents}/api/documents/view/${email.contentDocumentId}`)\n .then(({ data }) =>\n this.retrieveAttachmentInfo(job, email)\n .then(attachments => ({\n ...email,\n attachments,\n content: data,\n }))\n .catch(() => ({\n ...email,\n attachments: [],\n content: data,\n })),\n )\n .catch(error => {\n handleHttpError(intl)(error);\n return {\n ...email,\n attachments: [],\n content: '',\n };\n }),\n ),\n );\n };\n\n retrieveAttachmentInfo = (job, email) => {\n if (\n job.parameters.emailAttachments &&\n job.parameters.emailAttachments.length &&\n job.parameters.emailAttachments.filter(x => x.languageCode === email.languageCode).length\n ) {\n return Promise.all(\n job.parameters.emailAttachments\n .filter(x => x.languageCode === email.languageCode)\n .map(attachment =>\n api.base\n .get(`${config.appUrls.documents}/api/documents/info/${attachment.documentId}`)\n .then(response => response.data),\n ),\n );\n }\n return Promise.resolve([]);\n };\n\n render() {\n const { emails } = this.state;\n\n return emails.map(email => (\n }>\n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n {email && email.attachments && email.attachments.length > 0 && (\n
    \n
    \n \n
    \n
    \n {email.attachments.map(attachment => (\n \n ))}\n
    \n
    \n )}\n
    \n
    \n
    \n
    \n ));\n }\n}\n\nJobDetailSendRelationMail.propTypes = {\n job: PropTypes.shape({}).isRequired,\n intl: intlShape.isRequired,\n};\n\nexport default injectIntl(JobDetailSendRelationMail);\n","import React, { useEffect, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport SimplePanel from '@/shared/components/SimplePanel';\nimport { injectIntl, FormattedMessage, FormattedNumber } from 'react-intl';\nimport utils from '@/shared/utils/adminpulse';\nimport FormattedListValue, { listItemMsg } from '@/shared/components/FormattedListValue';\nimport Checkbox from '@/shared/components/input/Checkbox';\nimport messages from '../jobMessages';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport CurrencySymbol from '@/shared/components/CurrencySymbol';\n\nconst JobDetailPriceGridUpdate = ({ job, intl }) => {\n const [gridName, setGridName] = useState(null);\n const [profileName, setProfileName] = useState(null);\n\n // Some json parameters might still be stored without camelcase in the db, so convert it to camelcase just in case\n const parameters = utils.toCamel(job.parameters);\n useEffect(() => {\n if (parameters.updateAllPriceGrids || !parameters.priceGridId) {\n setGridName(intl.formatMessage(messages.All));\n return;\n }\n let mounted = true;\n api.base.get(`${config.appUrls.api}/api/Price/Grid`).then(({ data }) => {\n if (!mounted) return;\n const grids = data.map(x => ({\n ...x,\n name: x.name === 'Default' ? intl.formatMessage(messages.Default) : x.name,\n }));\n const grid = grids.find(x => x.id === parameters.priceGridId);\n setGridName(grid?.name);\n });\n return () => {\n mounted = false;\n };\n }, [parameters, intl]);\n useEffect(() => {\n if (!parameters.priceProfileId) {\n setProfileName(intl.formatMessage(messages.All));\n return;\n }\n let mounted = true;\n api.base.get(`${config.appUrls.api}/api/EmployeeProfile/Get`).then(({ data }) => {\n if (!mounted) return;\n const profile = data.find(x => x.id === parameters.priceProfileId);\n setProfileName(profile?.name);\n });\n return () => {\n mounted = false;\n };\n }, [parameters, intl]);\n if (!parameters) return null;\n return (\n }>\n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    {gridName}
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    {profileName}
    \n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n {parameters.method === 0 ? (\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n ) : (\n
    \n
    \n \n
    \n
    \n
    \n \n \n
    \n
    \n
    \n )}\n
    \n
    \n
    \n
    \n );\n};\n\nJobDetailPriceGridUpdate.propTypes = {\n job: PropTypes.shape({}).isRequired,\n};\n\nexport default injectIntl(JobDetailPriceGridUpdate);\n","import React, { useEffect, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport SimplePanel from '@/shared/components/SimplePanel';\nimport { injectIntl, FormattedMessage, FormattedNumber } from 'react-intl';\nimport utils from '@/shared/utils/adminpulse';\nimport FormattedListValue, { listItemMsg } from '@/shared/components/FormattedListValue';\nimport Checkbox from '@/shared/components/input/Checkbox';\nimport messages from '../jobMessages';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport CurrencySymbol from '@/shared/components/CurrencySymbol';\nimport FormattedDateShort from '@/shared/components/FormattedDateShort';\n\nconst JobDetailReprocessInvoiceStreamSchedule = ({ job, intl }) => {\n const [invoiceSchedule, setInvoiceSchedule] = useState(null);\n\n // Some json parameters might still be stored without camelcase in the db, so convert it to camelcase just in case\n const parameters = utils.toCamel(job.parameters);\n useEffect(() => {\n let mounted = true;\n api.base.get(`${config.appUrls.api}/api/InvoiceSchedule/Get`).then(({ data }) => {\n if (!mounted) return;\n setInvoiceSchedule(data.find(x => x.id === parameters.invoiceScheduleId));\n });\n return () => {\n mounted = false;\n };\n }, [parameters, intl]);\n\n if (!parameters) return null;\n return (\n }>\n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n {!!invoiceSchedule && (\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n )}\n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n );\n};\n\nJobDetailReprocessInvoiceStreamSchedule.propTypes = {\n job: PropTypes.shape({}).isRequired,\n};\n\nexport default injectIntl(JobDetailReprocessInvoiceStreamSchedule);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport SimplePanel from '@/shared/components/SimplePanel';\nimport { injectIntl, FormattedMessage } from 'react-intl';\nimport utils from '@/shared/utils/adminpulse';\nimport FormattedListValue, { listItemMsg } from '@/shared/components/FormattedListValue';\nimport Checkbox from '@/shared/components/input/Checkbox';\nimport messages from '../jobMessages';\n\nconst JobDetailInitAbsenceCounter = ({ job, intl }) => {\n // Some json parameters might still be stored without camelcase in the db, so convert it to camelcase just in case\n const parameters = utils.toCamel(job.parameters);\n if (!parameters) return null;\n return (\n }>\n
    \n
    \n
    \n
    \n
    \n \n
    \n
    {parameters.year}
    \n
    \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n {parameters.fromPreviousYear ? (\n
    \n
    \n \n
    \n
    \n 0} />\n
    \n
    \n ) : (\n
    \n
    \n \n
    \n
    \n {parameters.startValue}\n  \n \n
    \n
    \n )}\n
    \n
    \n
    \n
    \n \n
    \n
    \n 0} />\n
    \n
    \n
    \n
    \n \n
    \n
    \n 0} />\n
    \n
    \n
    \n
    \n
    \n
    \n );\n};\n\nJobDetailInitAbsenceCounter.propTypes = {\n job: PropTypes.shape({}).isRequired,\n};\n\nexport default injectIntl(JobDetailInitAbsenceCounter);\n","import messages from './jobMessages';\n\nconst getLabelForJobEntity = (intl, jobType, isPlural) => {\n switch (jobType) {\n case 0:\n case 1:\n case 8:\n case 10:\n case 12:\n case 13:\n case 14:\n case 15:\n case 16:\n case 17:\n case 18:\n case 25:\n case 29:\n case 37:\n case 38:\n case 39:\n case 41:\n case 42:\n case 43:\n case 44:\n case 49:\n return isPlural\n ? intl.formatMessage(messages.Relations)\n : intl.formatMessage(messages.Relation);\n\n case 2:\n case 3:\n case 7:\n case 11:\n case 24:\n case 30:\n case 36:\n case 40:\n return isPlural ? intl.formatMessage(messages.Tasks) : intl.formatMessage(messages.Task);\n case 5:\n return isPlural\n ? intl.formatMessage(messages.Authorizations)\n : intl.formatMessage(messages.Authorization);\n case 4:\n case 6:\n case 26:\n case 33:\n return isPlural\n ? intl.formatMessage(messages.Registrations)\n : intl.formatMessage(messages.Registration);\n case 9:\n case 28:\n case 31:\n return isPlural\n ? intl.formatMessage(messages.Invoices)\n : intl.formatMessage(messages.Invoice);\n case 19:\n case 20:\n case 21:\n case 22:\n case 23:\n return isPlural\n ? intl.formatMessage(messages.Documents)\n : intl.formatMessage(messages.Document);\n case 27:\n return isPlural\n ? intl.formatMessage(messages.Transactions)\n : intl.formatMessage(messages.Transaction);\n case 32:\n return isPlural\n ? intl.formatMessage(messages.DraftInvoices)\n : intl.formatMessage(messages.DraftInvoice);\n\n case 34:\n case 35:\n return isPlural\n ? intl.formatMessage(messages.PlannedRegistrations)\n : intl.formatMessage(messages.PlannedRegistration);\n case 53:\n return isPlural\n ? intl.formatMessage(messages.Employees)\n : intl.formatMessage(messages.Employee);\n case 56:\n return isPlural\n ? intl.formatMessage(messages.PriceListItems)\n : intl.formatMessage(messages.PriceListItem);\n default:\n return '';\n }\n};\nexport default getLabelForJobEntity;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage, injectIntl } from 'react-intl';\nimport Axios from 'axios';\nimport moment from 'moment';\nimport intlShape from '@/shared/utils/intlShape';\nimport FormattedListValue, { listItemMsg } from '@/shared/components/FormattedListValue';\n\nimport SimplePanel from '@/shared/components/SimplePanel';\nimport SignalRService from '@/shared/services/SignalRService';\nimport Button from '@/shared/components/Button';\nimport { FaFileExcel } from 'react-icons/fa';\nimport { mapRegTaskName } from '@/shared/services/ObjectDisplayService';\nimport ToastrService from '@/shared/services/ToastrService';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport RelationSearch from '@/shared/components/input/RelationSearch';\nimport TextSearch from '@/shared/components/input/TextSearch';\nimport DataCacheService from '@/shared/services/DataCacheService';\n\nimport FormattedDateTime from '../../shared/components/FormattedDateTime';\nimport LoadingAnimation from '../../shared/components/LoadingAnimation';\nimport { ColumnHeader, ScrollableTable } from '../../shared/components/table';\nimport api from '../../shared/api';\nimport config from '../../config';\nimport messages from './jobMessages';\nimport JobStatus from './JobStatus';\n\nimport { injectStateService, StateService } from '../../shared/services/StateService';\nimport JobDetailUpdateTaskStatus from './jobDetails/JobDetailUpdateTaskStatus';\nimport JobDetailRelationFieldUpdate from './jobDetails/JobDetailRelationFieldUpdate';\nimport JobDetailCreateTaskSchedule from './jobDetails/JobDetailCreateTaskSchedule';\nimport JobDetailCreateRegistration from './jobDetails/JobDetailCreateRegistration';\nimport JobDetailSetInvoiceSchedule from './jobDetails/JobDetailSetInvoiceSchedule';\nimport JobDetailMailInvoices from './jobDetails/JobDetailMailInvoices';\nimport JobDetailSendRelationMail from './jobDetails/JobDetailSendRelationMail';\nimport JobDetailDeleteTaskSchedule from './jobDetails/JobDetailDeleteTaskSchedule';\nimport JobDetailChangeTaskTags from './jobDetails/JobDetailChangeTaskTags';\nimport JobDetailPriceGridUpdate from './jobDetails/JobDetailPriceGridUpdate';\nimport JobDetailReprocessInvoiceStreamSchedule from './jobDetails/JobDetailReprocessInvoiceStreamSchedule';\n\nimport AuthService, { functionalities, privileges } from '../../shared/services/AuthService';\nimport getLabelForJobEntity from './getLabelForJobEntity';\nimport dateFormatService from '../../shared/services/DateFormatService';\nimport JobDetailInitAbsenceCounter from './jobDetails/JobDetailInitAbsenceCounter';\n\nconst tryParseJSON = jsonString => {\n try {\n const o = JSON.parse(jsonString);\n\n // Handle non-exception-throwing cases:\n // Neither JSON.parse(false) or JSON.parse(1234) throw errors, hence the type-checking,\n // but... JSON.parse(null) returns null, and typeof null === \"object\",\n // so we must check for that, too. Thankfully, null is falsey, so this suffices:\n if (o && typeof o === 'object') {\n return o;\n }\n } catch (e) {\n return jsonString;\n }\n\n return jsonString;\n};\n\nclass JobDetailContainer extends Component {\n state = {\n job: null,\n items: [],\n initialSearchParams: {\n sortKey: 'displayName',\n desc: false,\n extraFilters: {\n relationId: null,\n relationName: null,\n searchInfo: null,\n },\n },\n };\n\n static propTypes = {\n jobId: PropTypes.string.isRequired,\n intl: intlShape.isRequired,\n stateService: PropTypes.instanceOf(StateService).isRequired,\n };\n\n componentDidMount() {\n const { jobId } = this.props;\n if (!jobId) return;\n\n const endpoint = `${config.appUrls.jobs}/api/Jobs/${jobId}`;\n\n api.base.get(endpoint).then(({ data }) => {\n const parameters = data.parameters ? tryParseJSON(data.parameters) : {};\n\n this.setState(state => ({\n ...state,\n job: { ...data, parameters },\n }));\n });\n\n SignalRService.subscribe('jobUpdated', this.jobUpdateHandler);\n }\n\n componentWillUnmount() {\n SignalRService.unsubscribe('jobUpdated', this.jobUpdateHandler);\n if (typeof this.cancelToken !== 'undefined') {\n this.cancelToken.cancel('Operation canceled due to leaving page.');\n }\n }\n\n jobUpdateHandler = job => this.updateJob(job);\n\n createExcelReport = jobId => {\n const { intl } = this.props;\n\n const languageCode = intl.locale;\n const signalRConnectionId = SignalRService.getConnectionId();\n return api.base\n .get(`${config.appUrls.jobs}/api/jobs/export/${jobId}/${languageCode}/${signalRConnectionId}`)\n .then(() => {\n ToastrService.info(intl.formatMessage(messages.ExportToExcelStarted));\n })\n .catch(error => {\n handleHttpError(intl)(error);\n });\n };\n\n updateJob(job) {\n const { jobId } = this.props;\n if (job.id !== jobId) return;\n\n const parameters = job.parameters ? tryParseJSON(job.parameters) : {};\n\n this.setState(state => ({\n ...state,\n job: { ...job, parameters },\n }));\n }\n\n loadItems = searchParams => {\n const { jobId } = this.props;\n if (typeof this.cancelToken !== 'undefined') {\n this.cancelToken.cancel('Operation canceled due to new request.');\n }\n this.cancelToken = Axios.CancelToken.source();\n\n const search = JSON.stringify(searchParams.search || {});\n const filter = JSON.stringify(searchParams.filter || {});\n\n const endpoint = `${config.appUrls.jobs}/api/Jobs/Entries/${jobId}`;\n\n return api.base\n .get(endpoint, {\n params: {\n desc: searchParams.desc,\n sort: searchParams.sortKey,\n page: searchParams.page,\n take: searchParams.pageSize,\n search,\n filter,\n ...searchParams.extraFilters,\n },\n cancelToken: this.cancelToken.token,\n })\n .then(({ data }) => {\n this.setState(state => ({\n ...state,\n items: searchParams.page > 0 ? [...state.items, ...data] : [...data],\n filter: searchParams.filter,\n }));\n return data;\n })\n .catch(error => {\n if (!Axios.isCancel(error)) return error;\n });\n };\n filterChanged = filter => {\n const { initialSearchParams } = this.state;\n const { extraFilters } = initialSearchParams;\n const newFilters = { ...extraFilters, ...filter };\n if (JSON.stringify(extraFilters) === JSON.stringify(newFilters)) return;\n\n this.setState(state => ({\n initialSearchParams: {\n ...state.currentSearchParams,\n page: 0,\n extraFilters: newFilters,\n },\n }));\n };\n relationChanged = item => {\n if (!item || !item.key) {\n this.filterChanged({ relationId: null, relationName: null });\n } else {\n this.filterChanged({\n relationId: item.key,\n relationName: item.label,\n });\n }\n };\n getEntityColumnLabel = () => {\n const { intl } = this.props;\n const { job } = this.state;\n\n const label = getLabelForJobEntity(intl, job.jobType, false);\n return label;\n };\n\n parseErrorMessage = error => {\n if (!error) return;\n const { intl } = this.props;\n const errorObject = JSON.parse(error);\n const parameters = {};\n if (errorObject.parameters && errorObject.parameters.length > 0) {\n for (let i = 0; i < errorObject.parameters.length; i++) {\n parameters[`p${i}`] = errorObject.parametersEnumType // if the parameters are of a specific enum type, we will translate it accordingly.\n ? Array.isArray(errorObject.parameters[i])\n ? errorObject.parameters[i]\n .map(x => intl.formatMessage(listItemMsg(errorObject.parametersEnumType, x)))\n .join(', ')\n : intl.formatMessage(\n listItemMsg(errorObject.parametersEnumType, errorObject.parameters[i]),\n )\n : intl.formatMessage({\n id: errorObject.parameters[i],\n defaultMessage: errorObject.parameters[i],\n }); // try to translate parameter in case its translatable\n }\n }\n return ;\n };\n\n goToRelationByInvoiceStream = item => {\n const { stateService } = this.props;\n\n const endpoint = `${config.appUrls.api}/api/relation/invoicestreams`;\n\n const invoiceStreamId = item.entityId;\n\n api.base\n .post(endpoint, [invoiceStreamId])\n .then(({ data }) => {\n if (data && data.length > 0) {\n const relation = data[0];\n stateService.gotoRelation(relation.id);\n }\n })\n .catch(error => {\n console.error(error);\n });\n };\n\n renderEntity = item => {\n const { stateService, intl } = this.props;\n\n if (item.entityId) {\n switch (item.entityType) {\n // invoicestream\n case 0:\n return (\n this.goToRelationByInvoiceStream(item)}>\n \n \n \n   {item.displayName}\n \n );\n // relation\n case 1:\n return (\n stateService.gotoRelation(item.relationId || item.entityId)}\n >\n \n \n \n   {item.displayName}\n \n );\n case 2: // invoice\n if (\n AuthService.hasPermission({\n functionality: functionalities.InvoiceFinal,\n privilege: privileges.Read,\n })\n )\n return (\n \n stateService.gotoInvoiceOverview({ invoiceId: item.entityId })}\n >\n \n   {item.displayName}\n \n {!!item.relationId && (\n stateService.gotoRelation(item.relationId)}\n >\n \n \n \n \n )}\n \n );\n break;\n case 4: //ResourceCategory\n return (\n \n );\n default:\n break;\n }\n }\n if (item.relationId) {\n return (\n stateService.gotoRelation(item.relationId)}>\n \n   {item.displayName}\n \n );\n }\n\n return item.displayName;\n };\n\n renderJobDetail = job => {\n switch (job.jobType) {\n case 0:\n return ;\n case 1:\n return ;\n case 2:\n return ;\n case 4:\n case 6:\n return ;\n case 8:\n return ;\n case 9:\n return ;\n case 12:\n return ;\n case 18:\n return ;\n case 47:\n case 48:\n return ;\n case 53:\n return ;\n case 56:\n return ;\n case 57:\n return ;\n default:\n return ;\n }\n };\n\n renderInfo = item => {\n const { job } = this.state;\n const { intl } = this.props;\n switch (job.jobType) {\n case 36: {\n const task = tryParseJSON(item.parametersJson);\n const taskName = mapRegTaskName(task, intl);\n if (!taskName) return null;\n return `${taskName} - ${dateFormatService.formatDate(task.deadline)}`;\n }\n case 38: {\n return item.infoDescription\n ? item.infoDescription.replace(\n 'registrations',\n intl.formatMessage(messages.Registrations),\n )\n : item.infoDescription;\n }\n default:\n return item.infoDescription;\n }\n };\n\n renderRow = (item, intl) => (\n \n \n {this.renderEntity(item)}\n \n \n \n {item.completedAt && }\n {this.renderInfo(item)}\n {this.parseErrorMessage(item.error)}\n \n \n \n );\n\n render() {\n const { intl } = this.props;\n const { job, items, initialSearchParams } = this.state;\n if (!job) return ;\n\n const entityColumnLabel = this.getEntityColumnLabel();\n const user = DataCacheService.getUserName(job.createdBy);\n const { extraFilters } = initialSearchParams;\n let initRelation = null;\n if (extraFilters.relationId && extraFilters.relationName) {\n initRelation = {\n key: extraFilters.relationId,\n label: extraFilters.relationName,\n };\n }\n\n return (\n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n \n
    \n
    {user}
    \n
    \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n \n
    \n
    \n {job.completedAt && }\n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    {job.totalEntries}
    \n
    \n
    \n
    \n \n
    \n
    {job.completedEntries}
    \n
    \n {job.skippedEntries > 0 && (\n
    \n
    \n \n
    \n
    {job.skippedEntries}
    \n
    \n )}\n
    \n
    \n \n
    \n
    {job.failedEntries}
    \n
    \n
    \n
    \n
    \n \n
    \n
    {this.renderJobDetail(job)}
    \n
    \n\n
    \n
    \n
    \n this.filterChanged({ searchInfo: value })}\n />\n
    \n
    \n \n
    \n
    \n this.createExcelReport(job.id)}\n showProgress\n >\n \n \n \n {intl.formatMessage(messages.ExportToExcel)}\n \n
    \n
    \n
    \n
    \n this.loadItems(searchParams)}\n initialSearchParams={initialSearchParams}\n items={items}\n renderRow={item => this.renderRow(item, intl)}\n noDataLabel={}\n >\n \n ,\n }}\n />\n\n \n \n \n \n \n
    \n
    \n
    \n
    \n );\n }\n}\n\nexport default injectStateService(injectIntl(JobDetailContainer));\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport intlShape from '@/shared/utils/intlShape';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport FormattedListValue from '../../shared/components/FormattedListValue';\nimport FormattedDateTime from '../../shared/components/FormattedDateTime';\n\nimport { injectStateService, StateService } from '../../shared/services/StateService';\nimport messages from './jobMessages';\nimport JobStatus from './JobStatus';\n\nconst JobOverviewRow = ({ item, intl, stateService, entityLabel }) => {\n const user = DataCacheService.getUserName(item.createdBy);\n\n return (\n stateService.gotoJob(item.id)}>\n \n \n \n \n \n {item.totalEntries} {entityLabel}\n \n \n \n \n {user}\n\n \n \n \n\n {item.completedAt && }\n \n stateService.gotoJob(item.id)}\n className=\"btn btn-sm btn-default\"\n title={intl.formatMessage(messages.OpenDetail)}\n >\n \n \n \n \n \n );\n};\n\nJobOverviewRow.propTypes = {\n item: PropTypes.shape({\n id: PropTypes.string.isRequired,\n jobType: PropTypes.number.isRequired,\n createdAt: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Date)]).isRequired,\n createdBy: PropTypes.string,\n status: PropTypes.number.isRequired,\n completedAt: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Date)]),\n }).isRequired,\n entityLabel: PropTypes.string.isRequired,\n stateService: PropTypes.instanceOf(StateService).isRequired,\n intl: intlShape.isRequired,\n};\nexport default injectStateService(JobOverviewRow);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage } from 'react-intl';\nimport classnames from 'classnames';\n\nimport moment from 'moment';\nimport momentPropTypes from 'react-moment-proptypes';\n\nimport dateMessages from '@/shared/messages/dateMessages';\n\nconst periods = [\n {\n period: 'today-1',\n dateFrom: () =>\n moment\n .utc()\n .subtract(1, 'day')\n .startOf('day'),\n dateUntil: () =>\n moment\n .utc()\n .subtract(1, 'day')\n .endOf('day'),\n label: dateMessages.Yesterday,\n },\n {\n period: 'today',\n dateFrom: () => moment.utc().startOf('day'),\n dateUntil: () => moment.utc().endOf('day'),\n label: dateMessages.Today,\n },\n {\n period: 'week-1',\n dateFrom: () =>\n moment\n .utc()\n .subtract(7, 'day')\n .startOf('week'),\n dateUntil: () =>\n moment\n .utc()\n .subtract(7, 'day')\n .endOf('week'),\n label: dateMessages.PreviousWeek,\n },\n {\n period: 'week',\n dateFrom: () => moment.utc().startOf('week'),\n dateUntil: () => moment.utc().endOf('week'),\n label: dateMessages.ThisWeek,\n },\n {\n period: 'month-1',\n dateFrom: () =>\n moment\n .utc()\n .subtract(1, 'month')\n .startOf('month'),\n dateUntil: () =>\n moment\n .utc()\n .subtract(1, 'month')\n .endOf('month'),\n label: dateMessages.PreviousMonth,\n },\n {\n period: 'month',\n dateFrom: () => moment.utc().startOf('month'),\n dateUntil: () => moment.utc().endOf('month'),\n label: dateMessages.ThisMonth,\n },\n {\n period: 'nextMonth',\n dateFrom: () =>\n moment\n .utc()\n .add(1, 'month')\n .startOf('month'),\n dateUntil: () =>\n moment\n .utc()\n .add(1, 'month')\n .endOf('month'),\n label: dateMessages.NextMonth,\n },\n {\n period: 'month+1',\n dateFrom: () =>\n moment\n .utc()\n .add(1, 'month')\n .startOf('month'),\n dateUntil: () =>\n moment\n .utc()\n .add(1, 'month')\n .endOf('month'),\n label: dateMessages.NextMonth,\n },\n {\n period: 'quarter-1',\n dateFrom: () =>\n moment\n .utc()\n .add(-3, 'months')\n .startOf('quarter'),\n dateUntil: () =>\n moment\n .utc()\n .add(-3, 'months')\n .endOf('quarter'),\n label: dateMessages.PreviousQuarter,\n },\n {\n period: 'quarter',\n dateFrom: () => moment.utc().startOf('quarter'),\n dateUntil: () => moment.utc().endOf('quarter'),\n label: dateMessages.ThisQuarter,\n },\n {\n period: 'quarter+1',\n dateFrom: () =>\n moment\n .utc()\n .add(3, 'months')\n .startOf('quarter'),\n dateUntil: () =>\n moment\n .utc()\n .add(3, 'months')\n .endOf('quarter'),\n label: dateMessages.NextQuarter,\n },\n {\n period: 'nextQuarter',\n dateFrom: () =>\n moment\n .utc()\n .add(3, 'months')\n .startOf('quarter'),\n dateUntil: () =>\n moment\n .utc()\n .add(3, 'months')\n .endOf('quarter'),\n label: dateMessages.NextQuarter,\n },\n {\n period: 'year-2',\n dateFrom: () =>\n moment\n .utc()\n .startOf('year')\n .subtract(2, 'y'),\n dateUntil: () =>\n moment\n .utc()\n .endOf('year')\n .subtract(2, 'y'),\n label: moment.utc().year() - 2,\n },\n {\n period: 'year-1',\n dateFrom: () =>\n moment\n .utc()\n .startOf('year')\n .subtract(1, 'y'),\n dateUntil: () =>\n moment\n .utc()\n .endOf('year')\n .subtract(1, 'y'),\n label: moment.utc().year() - 1,\n },\n {\n period: 'year',\n dateFrom: () => moment.utc().startOf('year'),\n dateUntil: () => moment.utc().endOf('year'),\n label: moment.utc().year(),\n },\n {\n period: 'year+1',\n dateFrom: () =>\n moment\n .utc()\n .startOf('year')\n .add(1, 'y'),\n dateUntil: () =>\n moment\n .utc()\n .endOf('year')\n .add(1, 'y'),\n label: moment.utc().year() + 1,\n },\n\n {\n period: 'all',\n dateFrom: () => null,\n dateUntil: () => null,\n label: dateMessages.All,\n },\n];\n\nexport const allPeriods = periods.map(x => x.period);\nexport const defaultPeriods = ['month', 'quarter', 'year', 'year-1', 'year-2', 'all'];\nexport const pastToNowPeriods = [\n 'today-1',\n 'today',\n 'week-1',\n 'week',\n 'month-1',\n 'month',\n 'quarter-1',\n 'quarter',\n 'year-1',\n 'year',\n 'all',\n];\nexport const pastToPrevMonth = [\n 'month-1',\n 'month',\n 'quarter-1',\n 'quarter',\n 'year-2',\n 'year-1',\n 'year',\n 'all',\n];\n\nexport const getPeriodStartEndDates = periodName => {\n const p = periods.find(x => x.period === periodName);\n if (!p) return [null, null, null];\n return [p.dateFrom(), p.dateUntil(), p.period];\n};\nexport const getPeriodDateFromUntil = periodName => {\n const [dateFrom, dateUntil, period] = getPeriodStartEndDates(periodName);\n return { dateFrom, dateUntil, period };\n};\n\n// Execute date functions and get real dates\nconst getPeriodDates = ({ period, dateFrom, dateUntil }) => ({\n period,\n dateFrom: dateFrom(),\n dateUntil: dateUntil(),\n});\n\nconst PeriodButtonGroup = ({\n dateFrom,\n dateUntil,\n period,\n onChange,\n hiddenPeriods,\n visiblePeriods,\n className,\n}) => {\n const filteredPeriods = periods.filter(\n p =>\n (visiblePeriods.length === 0 || visiblePeriods.indexOf(p.period) >= 0) &&\n hiddenPeriods.indexOf(p.period) < 0,\n );\n return (\n
    \n {filteredPeriods.map(p => {\n const localPeriod = getPeriodDates(p);\n return (\n onChange(localPeriod)}\n type=\"button\"\n key={`period-${p.period}`}\n className={classnames('btn btn-default', {\n active:\n period === p.period ||\n (p.period === 'all' && dateFrom === null && dateUntil === null) ||\n (dateFrom != null &&\n dateUntil !== null &&\n moment(dateFrom).isSame(localPeriod.dateFrom, 'day') &&\n moment(dateUntil).isSame(localPeriod.dateUntil, 'day')),\n })}\n >\n {p.label && p.label.id ? : p.label}\n \n );\n })}\n
    \n );\n};\n\nPeriodButtonGroup.propTypes = {\n dateFrom: momentPropTypes.momentObj,\n dateUntil: momentPropTypes.momentObj,\n period: PropTypes.oneOf(allPeriods),\n onChange: PropTypes.func.isRequired,\n visiblePeriods: PropTypes.arrayOf(PropTypes.oneOf(allPeriods)),\n hiddenPeriods: PropTypes.arrayOf(PropTypes.oneOf(allPeriods)),\n className: PropTypes.string,\n};\n\nPeriodButtonGroup.defaultProps = {\n dateFrom: null,\n dateUntil: null,\n period: 'all',\n visiblePeriods: defaultPeriods,\n hiddenPeriods: [],\n className: ' margin10R',\n};\nexport default PeriodButtonGroup;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage, injectIntl } from 'react-intl';\nimport { FaUndo } from 'react-icons/fa';\nimport momentPropTypes from 'react-moment-proptypes';\nimport UserSearch from '@/shared/components/input/UserSearch';\nimport RelationSearch from '@/shared/components/input/RelationSearch';\nimport PeriodButtonGroup, {\n getPeriodDateFromUntil,\n pastToNowPeriods,\n} from '@/shared/components/PeriodButtonGroup';\nimport { CanRead } from '@/shared/components/security';\nimport DelayedDateRangePicker from '@/shared/components/input/DelayedDateRangePicker';\nimport intlShape from '@/shared/utils/intlShape';\nimport EnumMultiSelect from '../../shared/components/input/multiselect/EnumMultiSelect';\nimport AuthService from '../../shared/services/AuthService';\nimport messages from './jobMessages';\n\nexport const defaultFilters = {\n userId: null,\n dateFrom: null,\n dateUntil: null,\n period: null,\n jobType: [],\n\n jobStatus: [],\n entryStatus: [],\n relationId: null,\n relationName: null,\n};\n\nclass JobOverviewFilters extends Component {\n static propTypes = {\n onFilterChange: PropTypes.func.isRequired,\n filters: PropTypes.shape({\n userId: PropTypes.string,\n period: PropTypes.string,\n dateFrom: momentPropTypes.momentObj,\n dateUntil: momentPropTypes.momentObj,\n relationId: PropTypes.string,\n jobType: PropTypes.arrayOf(PropTypes.number),\n jobStatus: PropTypes.arrayOf(PropTypes.number),\n entryStatus: PropTypes.arrayOf(PropTypes.number),\n }),\n onResetFilters: PropTypes.func.isRequired,\n hasColumnFilters: PropTypes.bool,\n intl: intlShape.isRequired,\n };\n\n static defaultProps = {\n filters: defaultFilters,\n hasColumnFilters: false,\n };\n\n filterChanged = filter => {\n const { filters, onFilterChange } = this.props;\n const newFilters = { ...filters, ...filter };\n\n if (JSON.stringify(filters) !== JSON.stringify(newFilters)) onFilterChange(newFilters);\n };\n userChanged = item => {\n this.filterChanged({\n userId: (item && item.id) || null,\n });\n };\n dateChanged = (dateFrom, dateUntil) => {\n this.filterChanged({ dateFrom, dateUntil, period: null });\n };\n relationChanged = item => {\n if (!item || !item.key) {\n this.filterChanged({ relationId: null, relationName: null });\n } else {\n this.filterChanged({\n relationId: item.key,\n relationName: item.label,\n });\n }\n };\n setPeriod = period => {\n this.filterChanged(getPeriodDateFromUntil(period));\n };\n\n componentDidMount() {\n const { filters } = this.props;\n\n if (filters && filters.period) {\n this.setPeriod(filters.period);\n }\n\n this.defaultFiltersWithUser = {\n ...defaultFilters,\n userId: AuthService.isSupport() ? null : AuthService.getUserId(),\n };\n }\n\n componentDidUpdate(prevProps) {\n const { filters } = this.props;\n const { filters: oldFilters = {} } = prevProps;\n if (filters.period !== oldFilters.period) {\n this.setPeriod(filters.period);\n }\n }\n\n resetFilters = () => {\n this.filterChanged(this.defaultFiltersWithUser);\n };\n\n render() {\n const { filters, intl, onResetFilters, hasColumnFilters } = this.props;\n let initRelation = null;\n if (filters.relationId && filters.relationName) {\n initRelation = {\n key: filters.relationId,\n label: filters.relationName,\n };\n }\n\n const hasFilters =\n hasColumnFilters || JSON.stringify(filters) !== JSON.stringify(this.defaultFiltersWithUser);\n return (\n
    \n
    \n
    \n
    \n this.dateChanged(startDate, endDate)}\n block\n />\n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n this.filterChanged({ jobType: value })}\n placeholder={intl.formatMessage(messages.JobType)}\n />\n
    \n
    \n
    \n
    \n this.filterChanged({ entryStatus: value })}\n placeholder={intl.formatMessage(messages.JobEntryStatus)}\n />\n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n {hasFilters && (\n onResetFilters()}\n >\n \n  \n \n \n )}\n
    \n
    \n
    \n );\n }\n}\n\nexport default injectIntl(JobOverviewFilters);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage, injectIntl } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport { DeleteIcon, EyeIcon, ToDoIcon } from '@/shared/components/Icons';\nimport FormattedDateTime from '@/shared/components/FormattedDateTime';\nimport classNames from 'classnames';\nimport RelationName from '@/shared/components/RelationName';\nimport FormattedListValue from '@/shared/components/FormattedListValue';\nimport DocumentService from '@/shared/services/DocumentService';\nimport FileIcon from '@/shared/components/FileIcon';\n\nimport { injectStateService, StateService } from '@/shared/services/StateService';\nimport messages from './notificationMessages';\n\nconst NotificationRow = ({\n notification,\n stateService,\n intl,\n markRead,\n markExpired,\n openTaskDialog,\n}) => (\n \n \n \n \n \n {notification.relation && }\n \n {notification.type === 0 ? null : (\n \n )}\n {notification.type === 0 ? {notification.params.Text} : null}\n {(notification.type === 800 || notification.type === 801) &&\n notification.params &&\n notification.params.document &&\n notification.params.document.id ? (\n \n \n DocumentService.download(notification.params.document.id)}\n title={intl.formatMessage(messages.DownloadFile)}\n >\n \n {notification.params.document.name}\n \n \n \n ) : null}\n\n {(notification.type === 501 || notification.type === 502) &&\n notification.params &&\n notification.params.info &&\n notification.params.info.taskId && (\n \n openTaskDialog(notification.params.info.taskId)}>\n \n {notification.params.info.name}\n \n \n )}\n {notification.type === 501 &&\n notification.params &&\n notification.params.info &&\n !!notification.params.info.assignedBy && (\n \n \n : \n {notification.params.info.assignedBy}\n \n )}\n {notification.type === 502 &&\n notification.params &&\n notification.params.info &&\n !!notification.params.info.completedBy && (\n \n \n : \n {notification.params.info.completedBy}\n \n )}\n \n \n {notification.unread && (\n \n )}\n {!notification.unread && !notification.expireDate && (\n \n )}\n \n \n \n);\n\nNotificationRow.propTypes = {\n notification: PropTypes.shape({\n id: PropTypes.string,\n }).isRequired,\n stateService: PropTypes.instanceOf(StateService).isRequired,\n intl: intlShape.isRequired,\n markRead: PropTypes.func.isRequired,\n markExpired: PropTypes.func.isRequired,\n openTaskDialog: PropTypes.func.isRequired,\n};\n\nexport default injectIntl(injectStateService(NotificationRow));\n","import React, { Component } from 'react';\nimport { injectIntl, FormattedMessage } from 'react-intl';\nimport PropTypes from 'prop-types';\nimport Axios from 'axios';\nimport moment from 'moment';\n\nimport OverlayTrigger from 'react-bootstrap/lib/OverlayTrigger';\nimport Popover from 'react-bootstrap/lib/Popover';\nimport { FaInfoCircle } from 'react-icons/fa';\nimport SimplePanel from '@/shared/components/SimplePanel';\nimport SignalRService from '@/shared/services/SignalRService';\nimport { CanRead } from '@/shared/components/security';\nimport AuthService from '@/shared/services/AuthService';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport intlShape from '@/shared/utils/intlShape';\nimport { ScrollableTable, ColumnHeader } from '../../shared/components/table';\nimport JobOverviewRow from './JobOverviewRow';\nimport api from '../../shared/api';\nimport config from '../../config';\nimport messages from './jobMessages';\nimport JobStatus from './JobStatus';\nimport getLabelForJobEntity from './getLabelForJobEntity';\nimport JobOverviewFilters, { defaultFilters } from './JobOverviewFilters';\n\nconst SessionStorageKey = 'JobOverviewParams';\nclass JobOverviewContainer extends Component {\n static propTypes = {\n intl: intlShape.isRequired,\n };\n constructor(props) {\n super(props);\n const { overviewFilters: sessionFilters = {}, ...sessionParams } =\n JSON.parse(sessionStorage.getItem(SessionStorageKey)) || {};\n if (sessionFilters.dateFrom) {\n sessionFilters.dateFrom = moment.utc(sessionFilters.dateFrom);\n }\n if (sessionFilters.dateUntil) {\n sessionFilters.dateUntil = moment.utc(sessionFilters.dateUntil);\n }\n this.defaultFiltersWithUserId = {\n ...defaultFilters,\n userId: AuthService.isSupport() ? null : AuthService.getUserId(),\n };\n\n this.state = {\n items: [],\n currentSearchParams: {},\n initialSearchParams: {\n // Set default filters\n sortKey: 'createdAt',\n desc: true,\n pageSize: 50,\n overviewFilters: {\n ...this.defaultFiltersWithUserId,\n ...sessionFilters,\n },\n // Override with session storage params\n ...sessionParams,\n },\n };\n }\n\n componentDidMount() {\n SignalRService.subscribe('jobUpdated', this.jobUpdateHandler);\n }\n\n componentWillUnmount() {\n SignalRService.unsubscribe('jobUpdated', this.jobUpdateHandler);\n if (typeof this.cancelToken !== 'undefined') {\n this.cancelToken.cancel('Operation canceled due to leaving page.');\n }\n }\n\n jobUpdateHandler = job => this.updateJob(job);\n\n updateJob(job) {\n this.setState(state => {\n const { items } = state;\n const index = items.findIndex(x => x.id === job.id);\n if (index !== -1) {\n items[index] = job;\n return {\n ...state,\n items,\n };\n }\n return {\n ...state,\n items: [job, ...state.items],\n };\n });\n }\n\n getEntityColumnLabel = job => {\n const { intl } = this.props;\n const isPlural = job.totalEntries > 1;\n\n const label = getLabelForJobEntity(intl, job.jobType, isPlural);\n return label;\n };\n\n filtersChanged = filters => {\n this.setState(state => ({\n ...state,\n initialSearchParams: {\n ...state.currentSearchParams,\n page: 0,\n overviewFilters: filters,\n },\n }));\n };\n resetFilters = () => {\n this.setState(state => ({\n ...state,\n initialSearchParams: {\n ...state.currentSearchParams,\n page: 0,\n overviewFilters: { ...this.defaultFiltersWithUserId },\n filter: {},\n // forces refresh\n random: new Date().getTime(),\n },\n }));\n };\n\n loadItems = searchParams => {\n sessionStorage.setItem(\n SessionStorageKey,\n JSON.stringify({\n desc: searchParams.desc,\n sortKey: searchParams.sortKey,\n overviewFilters: searchParams.overviewFilters,\n filter: searchParams.filter,\n }),\n );\n if (typeof this.cancelToken !== 'undefined') {\n this.cancelToken.cancel('Operation canceled due to new request.');\n }\n this.cancelToken = Axios.CancelToken.source();\n\n const search = JSON.stringify(searchParams.search || {});\n const filter = JSON.stringify(searchParams.filter || {});\n const endpoint = `${config.appUrls.jobs}/api/Jobs/overview`;\n\n return api.base\n .post(endpoint, searchParams.overviewFilters, {\n params: {\n desc: searchParams.desc,\n sort: searchParams.sortKey,\n page: searchParams.page,\n take: searchParams.pageSize,\n search,\n filter,\n },\n cancelToken: this.cancelToken.token,\n })\n .then(({ data }) => {\n this.setState(state => ({\n ...state,\n items: searchParams.page > 0 ? [...state.items, ...data] : [...data],\n currentSearchParams: searchParams,\n }));\n return data;\n })\n .catch(error => {\n if (!Axios.isCancel(error)) return error;\n });\n };\n\n render() {\n const { intl } = this.props;\n const { initialSearchParams, currentSearchParams, items } = this.state;\n const hasColumnFilters =\n !!currentSearchParams &&\n !!currentSearchParams.filter &&\n Object.keys(currentSearchParams.filter).length !== 0;\n\n return (\n
    \n \n \n\n \n {intl.formatMessage(messages.JobOverviewExplanation)}\n \n }\n >\n \n \n \n \n \n }\n >\n \n this.filtersChanged(filters)}\n onResetFilters={this.resetFilters}\n hasColumnFilters={hasColumnFilters}\n />\n \n this.loadItems(searchParams)}\n initialSearchParams={initialSearchParams}\n items={items}\n renderRow={item => (\n \n )}\n noDataLabel={}\n >\n \n \n ,\n }}\n />\n \n \n \n \n \n \n
    \n );\n }\n}\n\nexport default injectIntl(JobOverviewContainer);\n","import { defineMessages } from 'react-intl';\n\nconst messages = defineMessages({\n Notifications: 'Notifications',\n NotificationType: 'Notification type',\n CreatedOn: 'Created on',\n Message: 'Message',\n Relation: 'Relation',\n CreatedDateFrom: 'Created on from',\n CreatedDateTo: 'Created on until',\n Today: 'Today',\n ThisWeek: 'This week',\n ThisMonth: 'This month',\n All: 'All',\n ShowHistory: 'Show history',\n MarkAsRead: 'Mark as read',\n Delete: 'Delete',\n Notification: 'Notification',\n DownloadFile: 'Download file',\n ResetFilters: 'Reset filters',\n\n OpenNotificationSettings: 'Open notification settings',\n NotificationSettings: 'Notification settings',\n NotificationTypeSettings: 'Notification type settings',\n NotificationTypeSettingsInfo: 'Choose which types you want to receive notitications for',\n ReceiveNotificationsForAllRelations: 'Receive notifications for all relations',\n OrOnlyIfYouAreAssignedAs: 'Or only if you are assigned as',\n AssignedBy: 'Assigned by',\n CompletedBy: 'Completed by',\n ReceiveNotificationsForAllRelationsOfCompanies:\n 'Receive notifications for all relations of these companies (empty means all companies)',\n});\n\nexport default messages;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage, injectIntl } from 'react-intl';\nimport classnames from 'classnames';\nimport moment from 'moment';\nimport momentPropTypes from 'react-moment-proptypes';\nimport { FaUndo } from 'react-icons/fa';\nimport intlShape from '@/shared/utils/intlShape';\n\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\n\nimport Toggle from 'react-toggle';\nimport MultiSelect from '@/shared/components/input/multiselect/MultiSelect';\nimport enumCache from '@/shared/services/EnumCacheService';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport DelayedDateRangePicker from '@/shared/components/input/DelayedDateRangePicker';\nimport messages from './notificationMessages';\n\nexport const defaultFilters = {\n createDateFrom: moment.utc().startOf('month'),\n createDateTo: moment.utc().endOf('month'),\n period: 'month',\n notificationTypes: [],\n includeExpired: true,\n};\n\nclass NotificationFilters extends Component {\n state = {\n notificationTypes: [],\n };\n\n static propTypes = {\n onFilterChange: PropTypes.func.isRequired,\n filters: PropTypes.shape({\n createDateFrom: momentPropTypes.momentObj,\n createDateTo: momentPropTypes.momentObj,\n period: PropTypes.oneOf(['all', 'month', 'quarter', 'year']),\n }),\n intl: intlShape.isRequired,\n };\n\n static defaultProps = {\n filters: {\n createDateFrom: null,\n createDateTo: null,\n period: null,\n },\n };\n\n componentDidMount() {\n const { filters, intl } = this.props;\n\n enumCache.get('notificationType').then(data => {\n this.setState({\n notificationTypes: data\n .map(x => ({\n id: x.key,\n label: intl.formatMessage(listItemMsg('notificationTypeLabel', x.key, x.value)),\n }))\n .filter(x => x.id !== 400 && x.id !== 500) // filter out 'tenant expiring' and 'custom' notification types\n .sort(dynamicSort('label')),\n });\n });\n\n if (filters && filters.period) {\n this.setPeriod(filters.period);\n }\n }\n\n filterChanged = filter => {\n const { filters, onFilterChange } = this.props;\n const newFilters = { ...filters, ...filter };\n\n onFilterChange(newFilters);\n };\n\n createDateFromChanged = value => {\n this.filterChanged({ createDateFrom: value });\n };\n createDateToChanged = value => {\n this.filterChanged({ createDateTo: value });\n };\n\n createDateChanged = (startDate, endDate) => {\n this.filterChanged({ createDateFrom: startDate, createDateTo: endDate, period: null });\n };\n toggleInactive = active => {\n this.filterChanged({ includeExpired: !!active });\n };\n resetFilters = () => {\n this.filterChanged(defaultFilters);\n };\n\n setPeriod = period => {\n let createDateFrom = null;\n let createDateTo = null;\n switch (period) {\n case 'all':\n case '':\n case null:\n case undefined:\n break;\n case 'day':\n case 'week':\n case 'month':\n createDateFrom = moment.utc().startOf(period);\n createDateTo = moment.utc().endOf(period);\n break;\n default:\n console.debug(`Unknown period: ${period}`);\n return;\n }\n\n this.filterChanged({ createDateFrom, createDateTo, period });\n };\n\n onNotificationTypeFilterAdded = selectedItem => {\n if (!selectedItem) return;\n\n const { filters } = this.props;\n const { notificationTypes } = filters;\n if (notificationTypes.includes(selectedItem.id)) return;\n this.filterChanged({\n notificationTypes: [...notificationTypes, selectedItem.id],\n });\n };\n\n onNotificationTypeFilterRemoved = item => {\n const { filters } = this.props;\n const { notificationTypes } = filters;\n const index = notificationTypes.findIndex(x => x === item.value.id);\n const copy = [...notificationTypes];\n copy.splice(index, 1);\n\n this.filterChanged({ notificationTypes: copy });\n };\n\n render() {\n const { notificationTypes } = this.state;\n const { filters, intl, total } = this.props;\n const defaultBtnClass = 'btn btn-default';\n\n const hasFilters = JSON.stringify(filters) !== JSON.stringify(defaultFilters);\n\n // transform filter (array of task status integers to list of object with label and id)\n const selectedNotificationTypes = notificationTypes\n ? notificationTypes.filter(r => filters.notificationTypes.includes(r.id))\n : [];\n\n return (\n
    \n
    \n
    \n \n
    \n\n
    \n this.createDateChanged(startDate, endDate)}\n startDatePlaceholderText={intl.formatMessage(messages.CreatedOn)}\n endDatePlaceholderText={intl.formatMessage(messages.CreatedOn)}\n />\n
    \n this.setPeriod('day')}\n type=\"button\"\n className={classnames(defaultBtnClass, { active: filters.period === 'day' })}\n >\n \n \n this.setPeriod('week')}\n type=\"button\"\n className={classnames(defaultBtnClass, { active: filters.period === 'week' })}\n >\n \n \n this.setPeriod('month')}\n type=\"button\"\n className={classnames(defaultBtnClass, { active: filters.period === 'month' })}\n >\n \n \n this.setPeriod('all')}\n type=\"button\"\n className={classnames(defaultBtnClass, {\n active: !filters.createDateFrom && !filters.createDateTo,\n })}\n >\n \n \n
    \n
    \n
    \n
    \n
    \n \n\n {hasFilters && (\n this.resetFilters()}\n >\n \n  \n \n \n )}\n
    \n
    \n \n {total}{' '}\n {total > 1 ? (\n \n ) : (\n \n )}\n \n
    \n
    \n
    \n );\n }\n}\n\nexport default injectIntl(NotificationFilters);\n","import React, { Component } from 'react';\nimport { FormattedMessage, injectIntl } from 'react-intl';\nimport Axios from 'axios';\nimport { injectStateService } from '@/shared/services/StateService';\n\nimport moment from 'moment';\nimport intlShape from '@/shared/utils/intlShape';\nimport SimplePanel from '@/shared/components/SimplePanel';\nimport { ColumnHeader, ScrollableTable } from '@/shared/components/table';\nimport api from '@/shared/api';\nimport PropTypes from 'prop-types';\nimport SignalRService from '@/shared/services/SignalRService';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport config from '../../config';\nimport NotificationRow from './NotificationRow';\nimport messages from './notificationMessages';\nimport NotificationFilters from './NotificationFilters';\nimport TaskDetailsModal from '../tasks/taskDetails/TaskDetailsModal';\n\nclass NotificationOverviewContainer extends Component {\n state = {\n items: [],\n initialSearchParams: {\n filter: {},\n page: 0,\n pageSize: 50,\n notificationFilters: {\n createDateFrom: moment.utc().startOf('month'),\n createDateTo: moment.utc().endOf('month'),\n period: 'month',\n notificationTypes: [],\n includeExpired: true,\n },\n },\n taskId: null,\n users: [],\n };\n\n constructor(props) {\n super(props);\n const params = JSON.parse(sessionStorage.getItem('NotificationOverviewParams'));\n if (!params) return;\n if (params.notificationFilters) {\n if (params.notificationFilters.createDateFrom) {\n params.notificationFilters.createDateFrom = moment(\n params.notificationFilters.createDateFrom,\n );\n }\n if (params.notificationFilters.createDateTo) {\n params.notificationFilters.createDateTo = moment(params.notificationFilters.createDateTo);\n }\n }\n\n const { initialSearchParams: orgSearchParams } = this.state;\n this.state.initialSearchParams = {\n ...orgSearchParams,\n ...params,\n };\n }\n\n reloadNotificationsEventHandler = () => {\n this.setState(state => ({\n ...state,\n initialSearchParams: {\n ...state.currentSearchParams,\n // forces refresh of table\n random: new Date().getTime(),\n },\n }));\n };\n\n componentDidMount() {\n SignalRService.subscribe('reloadNotifications', this.reloadNotificationsEventHandler);\n const users = DataCacheService.getUsers();\n this.setState({ users });\n }\n\n componentWillUnmount() {\n SignalRService.unsubscribe('reloadNotifications', this.reloadNotificationsEventHandler);\n if (typeof this.cancelToken !== 'undefined') {\n this.cancelToken.cancel('Operation canceled due to leaving page.');\n }\n }\n\n static propTypes = {\n intl: intlShape.isRequired,\n };\n\n loadItems = searchParams => {\n const endpoint = `${config.appUrls.notifications}/api/notifications/overview`;\n\n sessionStorage.setItem(\n 'NotificationOverviewParams',\n JSON.stringify({\n notificationFilters: searchParams.notificationFilters,\n }),\n );\n if (typeof this.cancelToken !== 'undefined') {\n this.cancelToken.cancel('Operation canceled due to new request.');\n }\n this.cancelToken = Axios.CancelToken.source();\n\n return api.base\n .post(\n endpoint,\n {\n ...searchParams.notificationFilters,\n page: searchParams.page,\n take: searchParams.pageSize,\n },\n {\n cancelToken: this.cancelToken.token,\n },\n )\n .then(({ data }) => {\n const notifications = this.mapNotifications(data.notifications);\n this.setState(state => ({\n ...state,\n items: searchParams.page > 0 ? [...state.items, ...notifications] : [...notifications],\n total: data.total,\n currentSearchParams: searchParams,\n }));\n return data;\n })\n .catch(error => {\n if (!Axios.isCancel(error)) return error;\n });\n };\n\n mapNotifications(rows) {\n const { intl } = this.props;\n const notifications = rows.map(x => {\n const value = {\n ...x,\n params: x.json && typeof x.json === 'string' ? JSON.parse(x.json) || {} : {},\n };\n\n if ((value.type === 208 || value.type === 209) && value.params.expiryDate) {\n const date = intl.formatDate(moment(value.params.expiryDate));\n value.params.expiryDate = date;\n }\n if (value.type === 700 && value.params.jobType) {\n value.params.jobType = intl.formatMessage(listItemMsg('jobType', value.params.jobType));\n }\n if (value.relation) {\n value.params.relation = value.relation.name;\n }\n return value;\n });\n\n return notifications;\n }\n\n filtersChanged = filters => {\n this.setState(state => ({\n ...state,\n initialSearchParams: {\n ...state.initialSearchParams,\n page: 0,\n notificationFilters: filters,\n },\n }));\n };\n\n markRead = notification => {\n api.base\n .post(`${config.appUrls.notifications}/api/notifications/markseen`, [notification.id])\n .then(() => {\n this.setState(state => ({\n ...state,\n items: state.items.map(x => {\n if (x.id === notification.id) {\n return {\n ...x,\n unread: false,\n };\n }\n return {\n ...x,\n };\n }),\n }));\n });\n };\n\n markExpired = notification => {\n api.base\n .post(`${config.appUrls.notifications}/api/notifications/expire`, [notification.id])\n .then(() => {\n const { state } = this;\n\n if (state.initialSearchParams.notificationFilters.includeExpired) {\n this.setState(state2 => ({\n ...state2,\n items: state2.items.map(x => {\n if (x.id === notification.id) {\n return {\n ...x,\n expireDate: moment(),\n };\n }\n return {\n ...x,\n };\n }),\n }));\n } else {\n this.setState(state2 => ({\n ...state2,\n items: state2.items.filter(x => x.id !== notification.id),\n }));\n }\n });\n };\n openSettings = e => {\n const { stateService } = this.props;\n e.preventDefault();\n stateService.gotoState('notificationSettings');\n };\n renderRow = item => (\n this.markRead(item)}\n markExpired={() => this.markExpired(item)}\n openTaskDialog={taskId => this.setState({ taskId })}\n />\n );\n\n render() {\n const { intl } = this.props;\n const { initialSearchParams, items, total, taskId, users } = this.state;\n\n return (\n
    \n \n \n \n \n \n \n }\n >\n this.filtersChanged(filters)}\n total={total}\n />\n \n\n this.loadItems(searchParams)}\n initialSearchParams={initialSearchParams}\n items={items}\n renderRow={item => this.renderRow(item)}\n >\n \n \n \n \n \n {taskId && (\n this.setState({ taskId: null })}\n onClose={() => this.setState({ taskId: null })}\n />\n )}\n
    \n );\n }\n}\n\nexport default injectStateService(injectIntl(NotificationOverviewContainer));\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport OutsideClickHandler from 'react-outside-click-handler';\nimport { injectIntl } from 'react-intl';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport intlShape from '@/shared/utils/intlShape';\nimport CompanyMultiSelect from '@/shared/components/input/multiselect/CompanyMultiSelect';\nimport EditableToggle from './EditableToggle';\n\nconst companyNames = companyIds => {\n const companies = DataCacheService.getDataCache().company;\n return companyIds && companyIds.length\n ? companyIds\n .map(x => companies.find(y => y.id === x))\n .map(x => x.name)\n .join(', ')\n : '';\n};\n\nconst EditableCompanyMultiSelect = ({\n onChange,\n value,\n disabled,\n submitOnChange,\n className,\n ...rest\n}) => (\n \n {({ inputValue, setInputValue, submit }) => (\n \n {\n if (submitOnChange && !!e) {\n setInputValue(e).then(submit);\n } else {\n setInputValue(e);\n }\n }}\n />\n \n )}\n \n);\n\nEditableCompanyMultiSelect.propTypes = {\n onChange: PropTypes.func.isRequired,\n value: PropTypes.arrayOf(PropTypes.string),\n disabled: PropTypes.bool,\n submitOnChange: PropTypes.bool,\n intl: intlShape.isRequired,\n className: PropTypes.string,\n};\n\nEditableCompanyMultiSelect.defaultProps = {\n value: [],\n disabled: false,\n submitOnChange: false,\n className: '',\n};\n\nexport default injectIntl(EditableCompanyMultiSelect);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage, injectIntl } from 'react-intl';\nimport Toggle from 'react-toggle';\nimport intlShape from '@/shared/utils/intlShape';\n\nimport ZendeskHelp from '@/shared/components/ZendeskHelp';\nimport SimplePanel from '@/shared/components/SimplePanel';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport FormattedListValue, { listItemMsg } from '@/shared/components/FormattedListValue';\nimport { hasMultipleCompanies } from '@/shared/components/security/HasMultiCompany';\nimport EditableCompanyMultiSelect from '@/shared/components/editable/EditableCompanyMultiSelect';\n\nimport api from '@/shared/api';\nimport config from '@/config';\nimport LoadingAnimation from '@/shared/components/LoadingAnimation';\nimport ToastrService from '@/shared/services/ToastrService';\n\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport messages from './notificationMessages';\nimport employeeProfileMessages from '@/shared/messages/employeeProfileMessages';\n\nconst mapSettings = data => {\n // Don't map notificationTypes prop\n const { notificationTypes, ...settings } = data || {};\n\n return {\n allRelations: true,\n relationResponsible: true,\n relationAssistant: true,\n relationAssistantBackup: true,\n relationAssociate: true,\n relationBillingUser: true,\n relationSeniorUser: true,\n ...settings,\n };\n};\n\nclass NotificationSettingsContainer extends Component {\n state = {\n settings: null,\n saving: false,\n profiles: [],\n };\n\n componentDidMount() {\n const { intl } = this.props;\n api.base.get(`${config.appUrls.notifications}/api/Settings`).then(({ data = {} }) => {\n const { notificationTypes = [] } = data;\n\n const groupedNotificationTypes = notificationTypes\n .map(x => ({\n ...x,\n label: intl.formatMessage(listItemMsg('notificationtypelabel', x.type)),\n }))\n .sort(dynamicSort('label'))\n .reduce((result, currentItem) => {\n const key = currentItem.category;\n if (!result[key]) {\n result[key] = [];\n }\n\n result[key].push(currentItem);\n return result;\n }, {});\n\n this.setState({\n settings: mapSettings(data),\n groupedNotificationTypes,\n ownCompanies: DataCacheService.getDataCache().company,\n });\n });\n const profiles = [\n {\n id: 'relationResponsible',\n label: intl.formatMessage(employeeProfileMessages.Responsible),\n },\n {\n id: 'relationAssistant',\n label: intl.formatMessage(employeeProfileMessages.Assistant),\n },\n {\n id: 'relationAssistantBackup',\n label: intl.formatMessage(employeeProfileMessages.AssistantBackup),\n },\n {\n id: 'relationAssociate',\n label: intl.formatMessage(employeeProfileMessages.Associate),\n },\n {\n id: 'relationBillingUser',\n label: intl.formatMessage(employeeProfileMessages.BillingUser),\n },\n {\n id: 'relationSeniorUser',\n label: intl.formatMessage(employeeProfileMessages.SeniorUser),\n },\n ].sort(dynamicSort('label'));\n this.setState({ profiles });\n }\n\n updateSetting = values => {\n const { settings, saving } = this.state;\n if (saving) return;\n this.setState({ saving: true });\n\n const model = { ...settings, ...values };\n if (JSON.stringify(model) === JSON.stringify(settings)) return; // Not Changed\n return api.base.put(`${config.appUrls.notifications}/api/Settings`, model).then(\n ({ data = {} }) => {\n this.setState({\n settings: mapSettings(data),\n saving: false,\n });\n const { intl } = this.props;\n ToastrService.changesSaved(intl, null, true);\n return settings;\n },\n error => {\n const { intl } = this.props;\n handleHttpError(intl)(error);\n this.setState({ saving: false });\n },\n );\n };\n\n updateAllRelations = checked => {\n if (checked) {\n this.updateSetting({\n allRelations: true,\n relationResponsible: false,\n relationAssistant: false,\n relationAssistantBackup: false,\n relationAssociate: false,\n relationBillingUser: false,\n relationSeniorUser: false,\n });\n } else {\n this.updateSetting({\n allRelations: false,\n });\n }\n };\n\n updateRelationProfile = (prop, checked) => {\n if (!checked) {\n this.updateSetting({\n allRelations: false,\n [prop]: false,\n });\n } else {\n this.updateSetting({\n [prop]: true,\n });\n }\n };\n updateOwnCompanies = (id, checked) => {\n const { settings, ownCompanies } = this.state;\n\n // if this is the first time modifying the own company setting, the current value will be null and we should send all the other (enabled) companies.\n let selectedCompanies = [];\n if (!settings.relationsOfCompaniesCommaSeparated) {\n if (checked) {\n selectedCompanies = ownCompanies.filter(x => x.id === id).map(x => x.id);\n } else {\n selectedCompanies = ownCompanies.filter(x => x.id !== id).map(x => x.id);\n }\n } else {\n const currentlySelectedCompanies = settings.relationsOfCompanies;\n // if this is the last company that is being disabled, toggle the general setting instead.\n if (\n currentlySelectedCompanies.length === 1 &&\n currentlySelectedCompanies[0] === id &&\n !checked\n ) {\n this.updateAllRelations(false);\n return;\n }\n if (checked) {\n selectedCompanies = [...currentlySelectedCompanies, id];\n } else {\n selectedCompanies = currentlySelectedCompanies.filter(x => x !== id);\n }\n }\n this.updateSetting({\n relationsOfCompanies: selectedCompanies,\n });\n };\n\n updateNotificationSetting = (type, value, category) => {\n const { saving } = this.state;\n if (saving) return;\n this.setState({ saving: true });\n const model = { type, shouldCreate: !!value };\n return api.base.put(`${config.appUrls.notifications}/api/Settings/Type`, model).then(\n () => {\n const { groupedNotificationTypes } = this.state;\n const modified = {\n ...groupedNotificationTypes,\n [category]: groupedNotificationTypes[category].map(x =>\n x.type !== type ? x : { ...x, shouldCreate: model.shouldCreate },\n ),\n };\n\n this.setState({ groupedNotificationTypes: modified, saving: false });\n const { intl } = this.props;\n ToastrService.changesSaved(intl, null, true);\n },\n error => {\n const { intl } = this.props;\n handleHttpError(intl)(error);\n this.setState({ saving: false });\n },\n );\n };\n\n render() {\n const { settings, profiles, groupedNotificationTypes, ownCompanies } = this.state;\n const { intl } = this.props;\n if (!settings) return ;\n\n const categories = Object.keys(groupedNotificationTypes);\n const half = Math.ceil((categories || []).length / 2);\n const categoriesCol1 = categories ? categories.slice(0, half) : [];\n const categoriesCol2 = categories ? categories.slice(half) : [];\n const hasMultiCompanies = hasMultipleCompanies();\n const ownCompaniesCol1 = ownCompanies\n ? ownCompanies.slice(0, Math.ceil((ownCompanies || []).length / 2))\n : [];\n const ownCompaniesCol2 = ownCompanies\n ? ownCompanies.slice(Math.ceil((ownCompanies || []).length / 2))\n : [];\n\n return (\n
    \n \n
    \n
    \n
    \n \n
    \n
    \n\n
    \n {hasMultiCompanies ? (\n <>\n
    \n {ownCompaniesCol1.map(({ id, name }) => (\n
    \n \n
    \n ))}\n
    \n
    \n {ownCompaniesCol2.map(({ id, name }) => (\n
    \n \n
    \n ))}\n
    \n \n ) : null}\n
    \n
    \n
    \n
    \n \n
    \n {profiles &&\n profiles.map(({ id, label }) => (\n
    \n \n
    \n ))}\n
    \n
    \n
    \n \n {groupedNotificationTypes && Object.keys(groupedNotificationTypes).length > 0 ? (\n \n
    \n
    \n \n
    \n
    \n
    \n {categoriesCol1.map(category => (\n
    \n

    \n \n

    \n
    \n {groupedNotificationTypes[category].map(({ type, label, shouldCreate }) => (\n
    \n \n
    \n ))}\n
    \n
    \n ))}\n
    \n
    \n {categoriesCol2.map(category => (\n
    \n

    \n \n

    \n
    \n {groupedNotificationTypes[category].map(({ type, label, shouldCreate }) => (\n
    \n \n
    \n ))}\n
    \n
    \n ))}\n
    \n
    \n
    \n
    \n ) : null}\n
    \n );\n }\n}\n\nNotificationSettingsContainer.propTypes = {\n intl: intlShape.isRequired,\n};\n\nexport default injectIntl(NotificationSettingsContainer);\n","import { defineMessages } from 'react-intl';\n\nconst messages = defineMessages({\n Resource: 'Resource',\n CopyPriceGrid: 'Copy price grid',\n CreatePriceGrid: 'Create price grid',\n ChangePriceGridName: 'Change name',\n Name: 'Name',\n DeletePriceGrid: 'Delete price grid?',\n DeletePriceGridConfirmationMsg: 'Are u sure you want to delete this price grid?',\n Default: 'Default',\n MakeDefaultPriceGrid: 'Make default for new relations',\n UpdateAmount: 'Update amount',\n Method: 'Method',\n Percentage: 'Percentage',\n Amount: 'Amount',\n PriceProfile: 'Price profile',\n All: 'All',\n AllProfiles: 'All profiles',\n AllUsers: 'All users',\n AllCompanies: 'All companies',\n AllPriceGrids: 'All price grids',\n WarningAllPriceGrids: 'This operation will update all price grids in your environment',\n CurrentPriceGrid: 'Current price grid',\n AllResources: 'All resources',\n ResourceCategory: 'ResourceCategory',\n PriceGrid: 'Price grid',\n User: 'User',\n Relation: 'Relation',\n OwnCompany: 'Own company',\n RegistrationDateFrom: 'Registration date from',\n RecalculateRegistrationPrices: 'Recalculate registration prices',\n XRegistrationsWillBeUpdated: '{x} registrations will be updated by this action',\n PriceGridGlobalActionsTooltip: 'Please select one or more price grids.',\n OverrideManuallyChangedPrices: 'Override manually changed prices',\n RecalcRegistrationPriceJobQueued:\n 'The price of registrations matching the criteria will be recalculated in the background. Click here to view its progress.',\n ChangesSaved: 'Changes saved',\n RoundingMethod: 'Rounding method',\n RoundTo: 'Round to',\n Digits: 'Digits',\n Example: 'Example',\n ExportToExcel: 'Export to Excel',\n ExportToExcelStarted: 'Export to Excel started',\n BackgroundJobQueued: 'A background job has started. Click here to monitor the progress.',\n});\n\nexport default messages;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage, injectIntl } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport OkCancelModal from '../../shared/components/OkCancelModal';\nimport messages from './priceGridMessages';\n\nclass PriceGridNameModal extends Component {\n state = {\n name: '',\n saving: false,\n };\n constructor(props) {\n super(props);\n this.state.name = props.grid ? props.grid.name : '';\n }\n componentDidUpdate(oldProps) {\n const { grid } = this.props;\n if (JSON.stringify(oldProps.grid) !== JSON.stringify(grid)) {\n // eslint-disable-next-line react/no-did-update-set-state\n this.setState({\n name: grid.name,\n });\n }\n }\n handleSubmit = () => {\n const { onSave, grid } = this.props;\n const { name } = this.state;\n if (!name) return Promise.reject();\n return new Promise(resolve => {\n this.setState({ saving: true }, () => {\n resolve(onSave({ ...grid, name }));\n });\n }).finally(() => {\n this.setState({ saving: false });\n });\n };\n handleCancel = () => {\n const { onClose } = this.props;\n onClose();\n };\n\n handleKeyDown = e => {\n // Escape\n if (e.keyCode === 27) {\n this.handleCancel();\n e.preventDefault();\n e.stopPropagation();\n if (e.nativeEvent) e.nativeEvent.stopImmediatePropagation();\n }\n // Enter\n else if (e.keyCode === 13) {\n this.handleSubmit();\n e.preventDefault();\n e.stopPropagation();\n if (e.nativeEvent) e.nativeEvent.stopImmediatePropagation();\n }\n };\n\n render() {\n const { title, intl } = this.props;\n const { name, saving } = this.state;\n return (\n \n
    \n
    \n \n
    \n this.setState({ name: e.target.value })}\n onKeyDown={this.handleKeyDown}\n placeholder={intl.formatMessage(messages.Name)}\n autoFocus\n autoComplete=\"off\"\n />\n
    \n
    \n
    \n \n );\n }\n}\n\nPriceGridNameModal.propTypes = {\n grid: PropTypes.shape({ id: PropTypes.string, name: PropTypes.string }).isRequired,\n title: PropTypes.string,\n onClose: PropTypes.func.isRequired,\n onSave: PropTypes.func,\n intl: intlShape.isRequired,\n};\nPriceGridNameModal.defaultProps = {\n title: '',\n onSave: () => {},\n};\n\nexport default injectIntl(PriceGridNameModal);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport moment from 'moment';\nimport Toggle from 'react-toggle';\nimport { FormattedMessage } from 'react-intl';\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport classNames from 'classnames';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport { dynamicSort, dynamicSortMultiple } from '@/shared/utils/dynamicSort';\nimport DatePicker from '@/shared/components/input/DatePicker';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport intlShape from '@/shared/utils/intlShape';\nimport ToastrService from '@/shared/services/ToastrService';\nimport { injectStateService, StateService } from '@/shared/services/StateService';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport RelationSearch from '@/shared/components/input/RelationSearch';\nimport AutoComplete from '@/shared/components/input/select/AutoComplete';\nimport { falseFunc, isBeforeMinimum } from '@/shared/utils/validationHelpers';\nimport messages from './priceGridMessages';\n\nclass RecalcRegistrationPriceModal extends Component {\n state = {\n filters: {\n priceGridId: null,\n priceProfileId: null,\n relationId: null,\n userId: null,\n companyId: null,\n fromDate: moment.utc().startOf('day'),\n overrideManualPrices: false,\n resourceCategoryId: null,\n },\n selectedRelation: null,\n users: [],\n priceGrids: [],\n companies: [],\n registrationCount: null,\n dateFocused: null,\n };\n static propTypes = {\n intl: intlShape.isRequired,\n gridId: PropTypes.string,\n onClose: PropTypes.func.isRequired,\n profiles: PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.string,\n name: PropTypes.string,\n }),\n ).isRequired,\n stateService: PropTypes.instanceOf(StateService).isRequired,\n };\n\n static defaultProps = {\n gridId: null,\n };\n\n componentDidMount() {\n const { intl, gridId } = this.props;\n\n const dataCache = DataCacheService.getDataCache();\n if (!dataCache) return;\n Promise.all([\n api.base.get(`${config.appUrls.api}/api/resource/registration`),\n api.base.get(`${config.appUrls.api}/api/Price/Grid`),\n ]).then(([{ data: categories = [] }, { data: grids = [] }]) => {\n const allResourceCategories = { id: null, label: intl.formatMessage(messages.AllResources) };\n\n const priceGrids = grids\n .map(x => ({\n ...x,\n name: x.name === 'Default' ? intl.formatMessage(messages.Default) : x.name,\n }))\n .sort(dynamicSortMultiple('-isDefault', 'name'));\n const resourceCategories = [\n allResourceCategories,\n ...categories\n .map(x => {\n const codePrefix = x.code ? `${x.code} – ` : '';\n\n const label = `${codePrefix}${intl.formatMessage(\n listItemMsg('resource', x.id, x.name),\n )}`;\n return { id: x.categoryId, label };\n })\n .sort(dynamicSort('label')),\n ];\n\n const companies = dataCache.company;\n\n this.setState(state => ({\n priceGrids,\n users: DataCacheService.getAllUsers(),\n companies,\n resourceCategories,\n filters: {\n ...state.filters,\n priceGridId: gridId,\n },\n }));\n });\n }\n\n updateFilter = filter => {\n this.setState(\n state => ({ filters: { ...state.filters, ...filter } }),\n () => {\n this.retrieveCount();\n },\n );\n };\n relationChanged = relation => {\n this.setState(\n state => ({\n filters: { ...state.filters, relationId: relation && relation.id ? relation.id : null },\n selectedRelation: relation || null,\n }),\n () => {\n this.retrieveCount();\n },\n );\n };\n\n resourceChanged = resource => {\n this.setState(\n state => ({\n filters: {\n ...state.filters,\n resourceCategoryId: resource && resource.id ? resource.id : null,\n },\n selectedResourceCategory: resource || null,\n }),\n () => {\n this.retrieveCount();\n },\n );\n };\n\n validate = () => {\n const { selectedResourceCategory } = this.state;\n const invalidResourceCategory = !selectedResourceCategory;\n this.setState({ invalidResourceCategory });\n return !invalidResourceCategory;\n };\n\n retrieveCount = () => {\n const { filters } = this.state;\n if (!this.validate()) return;\n\n return this.setState({ retrievingCount: true }, () => {\n return api.base\n .post(`${config.appUrls.api}/Api/Registration/RecalcPriceCount`, filters)\n .then(({ data = null }) => {\n this.setState({ registrationCount: data, retrievingCount: false });\n });\n });\n };\n\n onSave = () => {\n const { filters, retrievingCount, registrationCount } = this.state;\n const { onClose, stateService, intl } = this.props;\n if (!this.validate()) return;\n if (retrievingCount || registrationCount === null || registrationCount === 0) return;\n\n return api.base\n .post(`${config.appUrls.api}/Api/Registration/RecalcPrice`, filters)\n .then(({ data = null }) => {\n if (data) {\n const onClick = data.id ? () => stateService.gotoJob(data.id) : undefined;\n\n ToastrService.info(\n intl.formatMessage(messages.RecalcRegistrationPriceJobQueued),\n undefined,\n onClick,\n );\n }\n onClose();\n }, handleHttpError(intl));\n };\n\n render() {\n const { onClose, intl, profiles } = this.props;\n const {\n filters,\n companies,\n users,\n priceGrids,\n registrationCount,\n dateFocused,\n resourceCategories,\n selectedRelation,\n selectedResourceCategory,\n invalidResourceCategory,\n } = this.state;\n\n const hasMultipleCompanies = !!companies && companies.length > 1;\n\n return (\n this.onSave()}\n >\n
    \n \n \n
    \n this.updateFilter({ fromDate: date })}\n focused={dateFocused}\n onFocusChange={({ focused }) => this.setState({ dateFocused: focused })}\n id=\"fromDate\"\n block\n small\n showClearDate\n isOutsideRange={falseFunc}\n />\n
    \n
    \n
    \n \n
    \n {priceGrids && (\n this.updateFilter({ priceGridId: e.target.value || null })}\n className=\"form-control\"\n value={filters.priceGridId || ''}\n >\n \n {priceGrids.map(grid => (\n \n ))}\n \n )}\n
    \n
    \n
    \n \n
    \n {profiles && (\n this.updateFilter({ priceProfileId: e.target.value || null })}\n className=\"form-control\"\n value={filters.priceProfileId || ''}\n >\n \n {profiles.map(profile => (\n \n ))}\n \n )}\n
    \n
    \n
    \n \n
    \n {resourceCategories && (\n \n )}\n
    \n
    \n
    \n \n
    \n {users && (\n this.updateFilter({ userId: e.target.value || null })}\n className=\"form-control\"\n value={filters.userId || ''}\n >\n \n {users.map(user => (\n \n ))}\n \n )}\n
    \n
    \n
    \n \n
    \n \n
    \n
    \n {hasMultipleCompanies && (\n
    \n \n
    \n this.updateFilter({ companyId: e.target.value || null })}\n className=\"form-control\"\n value={filters.companyId || ''}\n >\n \n {companies.map(company => (\n \n ))}\n \n
    \n
    \n )}\n
    \n \n
    \n
    \n this.updateFilter({ overrideManualPrices: e.target.checked })}\n />\n
    \n
    \n
    \n {registrationCount !== null && (\n
    \n \n
    \n )}\n
    \n \n );\n }\n}\n\nexport default injectStateService(RecalcRegistrationPriceModal);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport intlShape from '@/shared/utils/intlShape';\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport classNames from 'classnames';\nimport CurrencySymbol from '@/shared/components/CurrencySymbol';\nimport FormattedCurrency from '@/shared/components/FormattedCurrency';\nimport enumCache from '@/shared/services/EnumCacheService';\nimport utils from '@/shared/utils/adminpulse';\nimport messages from './priceGridMessages';\n\nexport default class PriceGridAmountModal extends Component {\n state = {\n updateMethods: [],\n roundingMethods: [],\n selectedUpdateMethod: 0,\n selectedRoundingMethod: 0,\n roundingDecimals: 2,\n amountOrPercentage: 0,\n selectedProfile: '',\n updateAllPriceGrids: '0',\n };\n static propTypes = {\n show: PropTypes.bool.isRequired,\n intl: intlShape.isRequired,\n onSave: PropTypes.func.isRequired,\n onClose: PropTypes.func.isRequired,\n exampleAmount: PropTypes.number,\n };\n\n static defaultProps = { exampleAmount: utils.randomAmount() };\n\n componentDidMount() {\n const { intl } = this.props;\n\n Promise.all([\n enumCache.getTranslated('updateAmountMethod', intl),\n enumCache.getTranslated('roundingMethod', intl),\n ]).then(([updateMethods, roundingMethods]) => {\n this.setState({\n updateMethods,\n roundingMethods,\n });\n });\n }\n\n isFormInvalid = () => {\n const { amountOrPercentage, selectedUpdateMethod } = this.state;\n\n if (!amountOrPercentage || parseFloat(amountOrPercentage) === 0) {\n return true;\n }\n if (selectedUpdateMethod === 0 && (amountOrPercentage > 100 || amountOrPercentage < -100)) {\n return true;\n }\n return false;\n };\n\n amountChanged = value => {\n const { selectedUpdateMethod } = this.state;\n\n let parsedValue = Number.parseFloat(value);\n if (Number.isNaN(parsedValue)) {\n parsedValue = null;\n } else if (selectedUpdateMethod === 0) {\n // percentage: dont allow bigger/smaller than 100/-100\n parsedValue = Math.min(100, Math.max(-100, parsedValue));\n }\n\n this.setState(state => ({\n ...state,\n touched: true,\n amountOrPercentage: parsedValue,\n }));\n };\n\n onSave = () => {\n const {\n amountOrPercentage,\n selectedUpdateMethod,\n selectedProfile,\n selectedRoundingMethod,\n roundingDecimals,\n updateAllPriceGrids,\n } = this.state;\n\n const { onSave } = this.props;\n\n this.setState({ touched: true });\n\n const amountUpdate = {\n updateAllPriceGrids: updateAllPriceGrids === '1',\n method: selectedUpdateMethod,\n amountOrPercentage,\n selectedProfile,\n rounding: selectedRoundingMethod,\n roundingDecimals,\n };\n\n return onSave(amountUpdate);\n };\n\n generateExample = () => {\n const { exampleAmount } = this.props;\n const {\n amountOrPercentage,\n selectedUpdateMethod,\n selectedRoundingMethod,\n roundingDecimals,\n } = this.state;\n\n return utils.calculateIndexedAmount(\n Number.parseFloat(exampleAmount),\n selectedUpdateMethod,\n amountOrPercentage,\n selectedRoundingMethod,\n roundingDecimals,\n );\n };\n\n render() {\n const { show, onClose, intl, profiles, exampleAmount } = this.props;\n const {\n updateMethods,\n amountOrPercentage,\n touched,\n selectedUpdateMethod,\n selectedRoundingMethod,\n roundingDecimals,\n roundingMethods,\n selectedProfile,\n updateAllPriceGrids,\n } = this.state;\n\n if (!show) return null;\n\n const amountClassName = classNames('form-group', {\n 'has-error': touched && (!amountOrPercentage || parseFloat(amountOrPercentage) === 0),\n });\n const generatedAmount = this.generateExample();\n\n return (\n this.onSave()}\n >\n
    \n
    \n \n
    \n this.setState({ updateAllPriceGrids: e.target.value })}\n className=\"form-control\"\n value={updateAllPriceGrids || 'false'}\n >\n \n \n \n
    \n
    \n {updateAllPriceGrids === '1' && (\n
    \n \n
    \n {intl.formatMessage(messages.WarningAllPriceGrids)}\n
    \n
    \n )}\n
    \n \n
    \n {profiles && (\n this.setState({ selectedProfile: e.target.value })}\n className=\"form-control\"\n value={selectedProfile || ''}\n >\n \n {profiles.map(profile => (\n \n ))}\n \n )}\n
    \n
    \n
    \n \n
    \n {updateMethods && (\n this.setState({ selectedUpdateMethod: parseInt(e.target.value) })}\n className=\"form-control\"\n value={selectedUpdateMethod}\n >\n {updateMethods.map(item => (\n \n ))}\n \n )}\n
    \n
    \n\n
    \n \n
    \n {(selectedUpdateMethod === 1 || selectedUpdateMethod === 2) && (\n
    \n this.amountChanged(e.target.value)}\n className=\"form-control\"\n />\n \n \n \n
    \n )}\n {selectedUpdateMethod === 0 && (\n
    \n this.amountChanged(e.target.value)}\n className=\"form-control\"\n />\n %\n
    \n )}\n
    \n
    \n {selectedUpdateMethod === 0 && (\n
    \n \n
    \n {roundingMethods && (\n \n this.setState({ selectedRoundingMethod: parseInt(e.target.value) })\n }\n className=\"form-control\"\n value={selectedRoundingMethod}\n >\n {roundingMethods.map(item => (\n \n ))}\n \n )}\n
    \n
    \n )}\n {selectedUpdateMethod === 0 && (\n
    \n \n
    \n
    \n this.setState({ roundingDecimals: parseInt(e.target.value) })}\n className=\"form-control\"\n min={0}\n max={5}\n value={roundingDecimals}\n />\n {intl.formatMessage(messages.Digits)}\n
    \n
    \n
    \n )}\n
    \n \n
    \n
    \n \n
    \n {!Number.isNaN(generatedAmount) && (\n \n )}\n
    \n
    \n
    \n
    \n \n );\n }\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\n\nimport FormattedCurrency from '../FormattedCurrency';\nimport EditableToggle from './EditableToggle';\n\nconst limitValue = (value, min, max) => {\n let result = Number.parseFloat(value);\n if (typeof result !== 'number') return null;\n if (typeof min !== 'undefined' && min !== null) result = Math.max(min, result);\n if (typeof max !== 'undefined' && max !== null) result = Math.min(max, result);\n return result;\n};\n\nconst EditableCurrency = ({\n onChange,\n value,\n submitOnBlur,\n inputClassName,\n readOnly,\n placeholder,\n minimumFractionDigits,\n maximumFractionDigits,\n min,\n max,\n ...rest\n}) => (\n \n )\n }\n >\n {({ inputValue, setInputValue, inputRef, submit, cancel, handleKeyDown }) => (\n setInputValue(limitValue(e.target.value, min, max))}\n ref={inputRef}\n onBlur={submitOnBlur ? submit : cancel}\n onKeyDown={handleKeyDown}\n className={classnames('form-control', inputClassName)}\n onFocus={event => event.target.select()}\n placeholder={placeholder}\n autoComplete=\"off\"\n style={{ textAlign: 'right' }}\n step=\"any\"\n {...rest}\n />\n )}\n \n);\n\nEditableCurrency.propTypes = {\n onChange: PropTypes.func.isRequired,\n value: PropTypes.number,\n submitOnBlur: PropTypes.bool,\n placeholder: PropTypes.string,\n inputClassName: PropTypes.string,\n readOnly: PropTypes.bool,\n minimumFractionDigits: PropTypes.number,\n maximumFractionDigits: PropTypes.number,\n min: PropTypes.number,\n max: PropTypes.number,\n};\nEditableCurrency.defaultProps = {\n value: null,\n submitOnBlur: true,\n inputClassName: '',\n placeholder: '',\n readOnly: false,\n minimumFractionDigits: 2,\n maximumFractionDigits: 2,\n min: undefined,\n max: undefined,\n};\n\nexport default EditableCurrency;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport EditableCurrency from '@/shared/components/editable/EditableCurrency';\nimport authService, { privileges } from '@/shared/services/AuthService';\n\nconst PriceGridCell = ({ value, onChange }) => (\n onChange({ ...value, amount: val })}\n readOnly={\n !authService.hasPermission({\n functionality: 'pricelist',\n privilege: privileges.Update,\n })\n }\n maximumFractionDigits={5}\n />\n);\n\nPriceGridCell.propTypes = {\n value: PropTypes.shape({\n id: PropTypes.string.isRequired,\n amount: PropTypes.number.isRequired,\n }).isRequired,\n onChange: PropTypes.func.isRequired,\n};\n\nexport default PriceGridCell;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {\n CopyIcon,\n DeleteIcon,\n EmptyStarIcon,\n IconPencil,\n StarIcon,\n} from '@/shared/components/Icons';\nimport { injectIntl } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport { CanCreate, CanDelete, CanUpdate } from '@/shared/components/security';\nimport messages from './priceGridMessages';\n\nconst PriceGridSideBar = ({\n grids,\n activeGrid,\n onChangeGrid,\n onDeleteGrid,\n onCopyGrid,\n onEditGrid,\n onSetDefault,\n intl,\n}) => (\n \n);\n\nPriceGridSideBar.propTypes = {\n grids: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n activeGrid: PropTypes.string,\n onChangeGrid: PropTypes.func.isRequired,\n onDeleteGrid: PropTypes.func.isRequired,\n onCopyGrid: PropTypes.func.isRequired,\n onEditGrid: PropTypes.func.isRequired,\n onSetDefault: PropTypes.func.isRequired,\n intl: intlShape.isRequired,\n};\n\nPriceGridSideBar.defaultProps = {\n activeGrid: null,\n};\n\nexport default injectIntl(PriceGridSideBar);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { injectIntl } from 'react-intl';\nimport { FaFileExcel, FaCalculator } from 'react-icons/fa';\nimport intlShape from '@/shared/utils/intlShape';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport LoadingAnimation from '@/shared/components/LoadingAnimation';\nimport FormattedListValue, { listItemMsg } from '@/shared/components/FormattedListValue';\nimport { dynamicSortMultiple } from '@/shared/utils/dynamicSort';\nimport { StarIcon } from '@/shared/components/Icons';\nimport Checkbox from '@/shared/components/input/Checkbox';\nimport Button from '@/shared/components/Button';\nimport ToastrService from '@/shared/services/ToastrService';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport CurrencySymbol from '@/shared/components/CurrencySymbol';\nimport { CanUpdate } from '@/shared/components/security';\nimport ZendeskHelp from '@/shared/components/ZendeskHelp';\nimport SignalRService from '@/shared/services/SignalRService';\nimport messages from './priceGridMessages';\nimport RecalcRegistrationPriceModal from './RecalcRegistrationPriceModal';\nimport PriceGridAmountModal from './PriceGridAmountModal';\nimport PriceGridCell from './PriceGridCell';\n\nconst resourceTypesProp = ['time', 'cost', 'travel'];\n\nclass PriceGrid extends Component {\n state = {\n grid: null,\n profiles: null,\n time: null,\n cost: null,\n travel: null,\n showUpdateAmountModal: false,\n showRecalcRegistrationPriceModal: false,\n };\n\n componentDidMount() {\n const { gridId } = this.props;\n this.reloadGrid(gridId);\n SignalRService.subscribe('jobUpdated', this.jobUpdateHandler);\n }\n componentWillUnmount() {\n SignalRService.unsubscribe('jobUpdated', this.jobUpdateHandler);\n }\n reloadGrid = gridId => {\n if (!gridId) return;\n const { intl } = this.props;\n api.base\n .get(`${config.appUrls.api}/api/Price/Grid/${gridId}`)\n .then(({ data }) => this.MapPriceGridScreen(data, intl));\n };\n jobUpdateHandler = job => {\n const { gridId } = this.props;\n if (\n job.jobType === 56 &&\n (job.status === 2 || job.status === 3) &&\n job.parameters &&\n typeof job.parameters === 'string'\n ) {\n const params = JSON.parse(job.parameters);\n if (!params) return;\n if (params.updateAllPriceGrids || params.priceGridId === gridId) {\n this.reloadGrid(gridId);\n }\n }\n };\n componentDidUpdate({ gridId: oldGridId }) {\n const { gridId } = this.props;\n if (gridId !== oldGridId) {\n this.reloadGrid(gridId);\n }\n }\n\n updateCell = (type, rowId, colId, cell) => {\n const resourceProp = resourceTypesProp[type];\n api.base.put(`${config.appUrls.api}/api/Price/Item/`, cell).then(({ data }) => {\n this.setState(state => ({\n ...state,\n [resourceProp]: state[resourceProp].map(row => {\n if (row.id === rowId) {\n return { ...row, cells: { ...row.cells, [colId]: data } };\n }\n return row;\n }),\n }));\n return data;\n });\n };\n\n mapProfileHeader = profile => {\n const { intl } = this.props;\n\n return (\n \n \n {profile.isDefault && (\n \n )}\n \n );\n };\n\n handlePriceGridSelect = (selectedRow, type) => {\n this.setState(state => ({\n ...state,\n time:\n type === 0\n ? state.time.map(row => {\n if (row.id === selectedRow.id) {\n return {\n ...row,\n selected: !row.selected,\n };\n }\n return row;\n })\n : state.time,\n cost:\n type === 1\n ? state.cost.map(row => {\n if (row.id === selectedRow.id) {\n return {\n ...row,\n selected: !row.selected,\n };\n }\n return row;\n })\n : state.cost,\n travel:\n type === 2\n ? state.travel.map(row => {\n if (row.id === selectedRow.id) {\n return {\n ...row,\n selected: !row.selected,\n };\n }\n return row;\n })\n : state.travel,\n }));\n };\n\n handleSelectAllPriceGrids = type => {\n const {\n allTimePriceGridsSelected,\n allTravelPriceGridsSelected,\n allCostPriceGridsSelected,\n time,\n cost,\n travel,\n } = this.state;\n if (type === 0) {\n const isCurrentlySelected = !allTimePriceGridsSelected;\n this.setState({\n time: time.map(e => ({ ...e, selected: !!isCurrentlySelected })),\n allTimePriceGridsSelected: isCurrentlySelected,\n });\n }\n if (type === 1) {\n const isCurrentlySelected = !allCostPriceGridsSelected;\n this.setState({\n cost: cost.map(e => ({ ...e, selected: !!isCurrentlySelected })),\n allCostPriceGridsSelected: isCurrentlySelected,\n });\n }\n if (type === 2) {\n const isCurrentlySelected = !allTravelPriceGridsSelected;\n this.setState({\n travel: travel.map(e => ({ ...e, selected: !!isCurrentlySelected })),\n allTravelPriceGridsSelected: isCurrentlySelected,\n });\n }\n };\n\n renderResourceType = (type, rows, columns) => {\n if (!rows || !rows.length) return false;\n const {\n allTimePriceGridsSelected,\n allCostPriceGridsSelected,\n allTravelPriceGridsSelected,\n } = this.state;\n const allSelected =\n type === 0\n ? allTimePriceGridsSelected\n : type === 1\n ? allCostPriceGridsSelected\n : type === 2\n ? allTravelPriceGridsSelected\n : false;\n return (\n \n \n \n this.handleSelectAllPriceGrids(type)}\n value={allSelected}\n />\n \n \n \n \n {rows.map(row => (\n \n \n \n \n {columns.map(col => (\n \n {row.cells && row.cells[col.id] && (\n this.updateCell(type, row.id, col.id, cell)}\n />\n )}\n \n ))}\n \n \n ))}\n \n );\n };\n\n isGlobalActionsDisabled = () => {\n const {\n time,\n cost,\n travel,\n allTimePriceGridsSelected,\n allCostPriceGridsSelected,\n allTravelPriceGridsSelected,\n } = this.state;\n if ((!time || !time.length) && (!cost || !cost.length) && (!travel || !time.travel))\n return true;\n if (\n time.some(x => x.selected) ||\n cost.some(x => x.selected) ||\n travel.some(x => x.selected) ||\n allTimePriceGridsSelected ||\n allCostPriceGridsSelected ||\n allTravelPriceGridsSelected\n )\n return false;\n\n return true;\n };\n\n getExampleAmount = () => {\n const { time, profiles } = this.state;\n if (!time || !time.length) return undefined;\n const first = time.find(x => x.selected);\n if (!first) return undefined;\n const defaultProfile = profiles.find(x => x.isDefault);\n if (!defaultProfile) return undefined;\n const { cells: { [defaultProfile.id]: { amount } = { amount: 0 } } = {} } = first;\n return amount;\n };\n\n updatePriceGridAmountBatch = amountUpdate => {\n const { gridId, intl } = this.props;\n const { time, cost, travel } = this.state;\n const resourceIds = [\n ...time.filter(x => x.selected).map(x => x.id),\n ...cost.filter(x => x.selected).map(x => x.id),\n ...travel.filter(x => x.selected).map(x => x.id),\n ];\n const model = {\n updateAllPriceGrids: amountUpdate.updateAllPriceGrids,\n priceGridId: gridId,\n priceProfileId: amountUpdate.selectedProfile,\n amountOrPercentage: amountUpdate.amountOrPercentage,\n method: amountUpdate.method,\n rounding: amountUpdate.rounding,\n roundingDecimals: amountUpdate.roundingDecimals,\n resourceIds,\n };\n\n return api.base.post(`${config.appUrls.api}/api/Price/AmountUpdate`, model).then(\n ({ data }) => {\n const onClick = data ? () => stateService.gotoJob(data.id) : undefined;\n\n ToastrService.info(intl.formatMessage(messages.BackgroundJobQueued), undefined, onClick);\n this.setState({\n showUpdateAmountModal: false,\n });\n return true;\n },\n error => handleHttpError(intl)(error),\n );\n };\n\n MapPriceGridScreen(data, intl) {\n const {\n allTimePriceGridsSelected,\n allCostPriceGridsSelected,\n allTravelPriceGridsSelected,\n } = this.state;\n const { profiles, rows, ...grid } = data;\n /* Split rows into resource types */\n const resources = rows\n .filter(x => x.type !== 3 && x.type !== 4)\n .reduce(\n (result, row) => {\n const resourceType = resourceTypesProp[row.type];\n const codePrefix = row.code ? `${row.code} – ` : '';\n const selected =\n row.type === 0\n ? allTimePriceGridsSelected\n : row.type === 1\n ? allCostPriceGridsSelected\n : row.type === 2\n ? allTravelPriceGridsSelected\n : false;\n const label = `${codePrefix}${intl.formatMessage(\n listItemMsg('resourceCategory', row.id, row.name),\n )}`;\n\n return {\n ...result,\n [resourceType]: [\n ...result[resourceType],\n { ...row, label, selected: !!selected, code: row.code || '' },\n ],\n };\n },\n { time: [], cost: [], travel: [] },\n );\n\n resources.time.sort(dynamicSortMultiple('code', 'label'));\n resources.cost.sort(dynamicSortMultiple('code', 'label'));\n resources.travel.sort(dynamicSortMultiple('code', 'label'));\n\n this.setState(state => ({\n ...state,\n grid,\n showUpdateAmountModal: false,\n profiles: profiles.sort(dynamicSortMultiple('-isDefault', 'name')),\n ...resources,\n }));\n return data;\n }\n createExcelReport = () => {\n const { intl } = this.props;\n\n const urlParams = {\n culture: intl.locale,\n connectionId: SignalRService.getConnectionId(),\n };\n\n this.setState({ creatingReport: true });\n\n return api.base\n .get(`/api/Price/Report`, {\n params: urlParams,\n })\n .then(() => {\n ToastrService.info(intl.formatMessage(messages.ExportToExcelStarted));\n })\n .catch(error => {\n handleHttpError(intl)(error);\n })\n .finally(() => {\n this.setState({ creatingReport: false });\n });\n };\n\n render() {\n const {\n grid,\n profiles,\n time,\n cost,\n travel,\n showUpdateAmountModal,\n showRecalcRegistrationPriceModal,\n creatingReport,\n } = this.state;\n const { intl, gridId } = this.props;\n\n return grid ? (\n
    \n {showUpdateAmountModal && (\n this.setState({ showUpdateAmountModal: false })}\n onSave={amountUpdate => this.updatePriceGridAmountBatch(amountUpdate)}\n exampleAmount={this.getExampleAmount()}\n />\n )}\n {showRecalcRegistrationPriceModal && (\n this.setState({ showRecalcRegistrationPriceModal: false })}\n />\n )}\n\n
    \n

    \n {intl.formatMessage(messages.PriceGrid)}\n \n

    \n \n
    \n this.createExcelReport()}\n disabled={creatingReport}\n >\n \n {creatingReport && }\n {!creatingReport && }\n \n {intl.formatMessage(messages.ExportToExcel)}\n \n\n this.setState({ showRecalcRegistrationPriceModal: true })}\n >\n {' '}\n {intl.formatMessage(messages.RecalculateRegistrationPrices)}\n \n this.setState({ showUpdateAmountModal: true })}\n disabled={this.isGlobalActionsDisabled()}\n title={\n this.isGlobalActionsDisabled()\n ? intl.formatMessage(messages.PriceGridGlobalActionsTooltip)\n : ''\n }\n >\n {intl.formatMessage(messages.UpdateAmount)}\n \n
    \n
    \n
    \n
    \n \n \n \n \n \n {this.renderResourceType(0, time, profiles)}\n {this.renderResourceType(1, cost, profiles)}\n {this.renderResourceType(2, travel, profiles)}\n
    \n {profiles.map(this.mapProfileHeader)}\n \n
    \n
    \n
    \n ) : (\n \n );\n }\n}\n\nPriceGrid.propTypes = {\n gridId: PropTypes.string.isRequired,\n intl: intlShape.isRequired,\n};\n\nexport default injectIntl(PriceGrid);\n","import React from 'react';\nimport moment from 'moment';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport { useIntl } from 'react-intl';\nimport messages from './FieldMessages';\nimport RenderProperty from './RenderProperty';\n\nconst parseBoolean = value => {\n switch (value) {\n case true:\n case 'True':\n case 'true':\n return true;\n case false:\n case 'False':\n case 'false':\n return false;\n default:\n return null;\n }\n};\nconst parseDate = value => {\n try {\n const mom = moment(value, 'M/D/YYYY hh:mm A', true);\n\n if (!mom.isValid()) return null;\n\n return mom.format('LL');\n } catch (_) {\n return null;\n }\n};\nconst FieldChange = props => {\n const intl = useIntl();\n const {\n log,\n users,\n relations,\n templates,\n ownCompanies,\n salutations,\n invoiceSchedules,\n priceGrids,\n invoiceStreams,\n } = props;\n\n const renderFieldValue = (value, property) => {\n if (property === 'Salutation' && value in (salutations || {}))\n return intl.formatMessage(listItemMsg('salutation', salutations[value].id));\n\n if (property === 'JurisdictionId' && value && !Number.isNaN(parseInt(value))) {\n return intl.formatMessage(listItemMsg('jurisdiction', value));\n }\n\n if (property === 'OtherSoftware') {\n // comma separated string\n if (!value) return '/';\n const otherSoftware = value\n .replace(/\\s/g, '')\n .split(',')\n .filter(x => x !== '');\n if (otherSoftware.length === 0) return '/';\n return otherSoftware.map(x => intl.formatMessage(listItemMsg('othersoftware', x))).join(', ');\n }\n if (value in (users || {})) return users[value];\n if (value in (relations || {})) return relations[value];\n if (value in (ownCompanies || {})) return ownCompanies[value];\n if (value in (templates || {})) return templates[value];\n if (value in (invoiceSchedules || {})) return invoiceSchedules[value];\n if (value in (priceGrids || {})) return priceGrids[value];\n if (value in (invoiceStreams || {})) return invoiceStreams[value];\n\n const booleanValue = parseBoolean(value);\n if (booleanValue !== null)\n return booleanValue ? intl.formatMessage(messages.Yes) : intl.formatMessage(messages.No);\n\n const dateTimeFormat = parseDate(value);\n if (value !== null && dateTimeFormat !== null) return dateTimeFormat;\n\n return value ? value.toString() : '/';\n };\n\n return (\n \n {intl.formatMessage(messages.ChangedField, {\n property: RenderProperty({ intl, log }),\n originalValue: renderFieldValue(log.oldValue, log.property),\n currentValue: renderFieldValue(log.newValue, log.property),\n b: value => {value},\n i: value => {value},\n })}\n \n );\n};\n\nexport default FieldChange;\n","import React from 'react';\nimport { formatListValue } from '@/shared/components/FormattedListValue';\nimport { useIntl } from 'react-intl';\nimport RenderProperty from './RenderProperty';\nimport messages from './FieldMessages';\n\nconst EnumChange = props => {\n const intl = useIntl();\n const { log } = props;\n\n const property = RenderProperty({ intl, log });\n\n if (!log.oldValue) {\n return (\n \n {intl.formatMessage(messages.SetEnum, {\n property,\n value: formatListValue({ id: log.newValue.Value, list: log.newValue.Name, intl }),\n b: value => {value},\n i: value => {value},\n })}\n \n );\n }\n\n if (!log.newValue) {\n return (\n \n {intl.formatMessage(messages.ClearEnum, {\n property,\n value: formatListValue({ id: log.oldValue.Value, list: log.oldValue.Name, intl }),\n b: value => {value},\n i: value => {value},\n })}\n \n );\n }\n\n return (\n \n {intl.formatMessage(messages.ChangedField, {\n property,\n originalValue: formatListValue({ id: log.oldValue.Value, list: log.oldValue.Name, intl }),\n currentValue: formatListValue({ id: log.newValue.Value, list: log.newValue.Name, intl }),\n b: value => {value},\n i: value => {value},\n })}\n \n );\n};\n\nexport default EnumChange;\n","import React from 'react';\nimport { formatListValue } from '@/shared/components/FormattedListValue';\nimport { useIntl } from 'react-intl';\nimport messages from './FieldMessages';\n\nconst RelationLinkChange = props => {\n const intl = useIntl();\n const { log, relations } = props;\n\n const renderLinkType = () =>\n formatListValue({ log, intl, list: 'linktypeto', id: log.newValue.Type });\n const renderNewRelation = () => (\n \n {intl.formatMessage(messages.AddedLink, {\n linkType: renderLinkType(),\n relation: relations[log.newValue.Id],\n b: value => {value},\n i: value => {value},\n })}\n \n );\n const renderRemovedRelation = () => (\n \n {intl.formatMessage(messages.RemovedLink, {\n linkType: renderLinkType(),\n relation: relations[log.oldValue.Id],\n b: value => {value},\n i: value => {value},\n })}\n \n );\n\n return {log.oldValue.Id === null ? renderNewRelation() : renderRemovedRelation()};\n};\n\nexport default RelationLinkChange;\n","import React from 'react';\nimport moment from 'moment';\nimport { useIntl } from 'react-intl';\nimport messages from './FieldMessages';\n\nconst UboLine = props => {\n const intl = useIntl();\n const { log } = props;\n\n const added = !!(log.oldValue === null && log.newValue !== null);\n const dateTime = moment(added ? new Date(log.newValue) : new Date(log.oldValue));\n const time = dateTime.format('LLLL');\n const message = added ? messages.AddedAnUboSnapshotAt : messages.DeletedAnUboSnapshotAt;\n\n return {intl.formatMessage(message, { time, i: value => {value}, })};\n};\n\nexport default UboLine;\n","import React from 'react';\nimport { useIntl } from 'react-intl';\nimport { formatListValue } from '@/shared/components/FormattedListValue';\nimport messages from './FieldMessages';\n\nconst AddressSettingChange = props => {\n const intl = useIntl();\n const { log } = props;\n\n const isEnum = (logLine, valueToDisplay) => {\n const value = log.oldValue.Value || log.newValue.Value;\n const isEnum = value && value.hasOwnProperty('Value') && value.hasOwnProperty('Name');\n\n if (!valueToDisplay || !valueToDisplay.Value) return '';\n\n return isEnum\n ? formatListValue({ id: valueToDisplay.Value.Value, list: valueToDisplay.Value.Name, intl })\n : valueToDisplay.Value;\n };\n\n const property = formatListValue({ list: 'Purpose', id: log.fieldId, intl, log });\n const medium = formatListValue({ list: 'Medium', id: log.oldValue.Medium, intl, log });\n\n if (log.oldValue.Value === null) {\n return (\n \n {intl.formatMessage(messages.AddedCommunicationSetting, {\n property,\n medium,\n newValue: isEnum(log, log.newValue),\n b: value => {value},\n })}\n \n );\n }\n\n if (log.newValue.Value === null) {\n return (\n \n {intl.formatMessage(messages.DeletedCommunicationSetting, {\n property,\n medium,\n oldValue: isEnum(log, log.oldValue),\n b: value => {value},\n })}\n \n );\n }\n\n return (\n \n {intl.formatMessage(messages.ChangedCommunicationSetting, {\n property,\n medium,\n originalValue: isEnum(log, log.oldValue),\n currentValue: isEnum(log, log.newValue),\n b: value => {value},\n })}\n \n );\n};\n\nexport default AddressSettingChange;\n","import React, { Component } from 'react';\nimport { injectIntl } from 'react-intl';\nimport { CanCreate, showWhenPermission } from '@/shared/components/security';\nimport PropTypes from 'prop-types';\nimport api from '@/shared/api';\nimport intlShape from '@/shared/utils/intlShape';\nimport config from '@/config';\nimport { dynamicSortMultiple } from '@/shared/utils/dynamicSort';\nimport { AddIcon } from '@/shared/components/Icons';\nimport YesNoModal from '@/shared/components/YesNoModal';\nimport ZendeskHelp from '@/shared/components/ZendeskHelp';\nimport messages from './priceGridMessages';\nimport PriceGridNameModal from './PriceGridNameModal';\nimport LoadingAnimation from '../../shared/components/LoadingAnimation';\nimport PriceGrid from './PriceGrid';\nimport PriceGridSideBar from './PriceGridSideBar';\n\nconst gridSort = dynamicSortMultiple('-isDefault', 'name');\n\nclass PriceGridContainer extends Component {\n state = {\n grids: null,\n activeGrid: null,\n editGrid: null,\n deleteGrid: null,\n };\n\n componentDidMount() {\n const { intl } = this.props;\n api.base.get(`${config.appUrls.api}/api/Price/Grid`).then(({ data }) => {\n const grids = [...data]\n .map(x => ({\n ...x,\n name: x.name === 'Default' ? intl.formatMessage(messages.Default) : x.name,\n }))\n .sort(gridSort);\n let activeGrid = grids.find(x => x.isDefault);\n if (!activeGrid && grids.length) [activeGrid] = grids;\n\n this.setState(state => ({\n ...state,\n grids,\n activeGrid: activeGrid.id,\n }));\n });\n }\n\n changeGrid = grid => {\n this.setState(state => ({\n ...state,\n activeGrid: grid.id,\n }));\n };\n createGrid = () => {\n const { intl } = this.props;\n this.setState({\n editGrid: {\n id: null,\n name: '',\n onSave: ({ name }) =>\n api.base.post(`${config.appUrls.api}/api/Price/CreateGrid`, { name }).then(({ data }) => {\n this.setState(state => ({\n grids: [...state.grids, data].sort(gridSort),\n activeGrid: data.id,\n editGrid: null,\n }));\n return data;\n }),\n title: intl.formatMessage(messages.CreatePriceGrid),\n },\n });\n };\n copyGrid = grid => {\n const { intl } = this.props;\n this.setState({\n editGrid: {\n ...grid,\n onSave: ({ id, name }) =>\n api.base\n .post(`${config.appUrls.api}/api/Price/CopyGrid`, { id, name })\n .then(({ data }) => {\n this.setState(state => ({\n grids: [...state.grids, data].sort(gridSort),\n activeGrid: data.id,\n editGrid: null,\n }));\n return data;\n }),\n title: intl.formatMessage(messages.CopyPriceGrid),\n },\n });\n };\n\n editGrid = grid => {\n const { intl } = this.props;\n this.setState({\n editGrid: {\n ...grid,\n onSave: ({ id, name }) =>\n api.base\n .put(`${config.appUrls.api}/api/Price/UpdateGrid`, { id, name })\n .then(({ data }) => {\n this.setState(state => ({\n grids: state.grids\n .map(g => {\n if (g.id === data.id) {\n return { ...data };\n }\n return g;\n })\n .sort(gridSort),\n editGrid: null,\n }));\n return data;\n }),\n title: intl.formatMessage(messages.ChangePriceGridName),\n },\n });\n };\n deleteGrid = ({ id }) =>\n api.base.delete(`${config.appUrls.api}/api/Price/Delete/${id}`).then(() => {\n const { activeGrid, grids } = this.state;\n let aGrid = activeGrid;\n if (activeGrid.id === id) {\n aGrid = grids.find(x => x.isDefault);\n if (!aGrid && grids.length) [aGrid] = grids;\n }\n this.setState(state => ({\n grids: state.grids.filter(x => x.id !== id).sort(gridSort),\n activeGrid: aGrid,\n deleteGrid: null,\n }));\n });\n\n setDefaultGrid = ({ id }) =>\n api.base.put(`${config.appUrls.api}/api/Price/SetDefault/${id}`).then(({ data }) => {\n this.setState(({ grids }) => ({\n grids: grids.map(x => {\n const updatedGrid = data.find(g => g.id === x.id);\n if (!updatedGrid) return x;\n return { ...x, ...updatedGrid };\n }),\n }));\n });\n\n render() {\n const { grids, activeGrid, editGrid, deleteGrid } = this.state;\n const { intl } = this.props;\n\n return grids ? (\n
    \n
    \n \n
    \n \n\n \n
    \n
    \n this.setState({ deleteGrid: grid })}\n onEditGrid={this.editGrid}\n onSetDefault={this.setDefaultGrid}\n />\n
    \n
    {activeGrid && }
    \n {editGrid && (\n this.setState({ editGrid: null })}\n />\n )}\n \n this.setState({\n deleteGrid: null,\n })\n }\n onSave={() => this.deleteGrid(deleteGrid)}\n />\n
    \n ) : (\n \n );\n }\n}\n\nPriceGridContainer.propTypes = {\n intl: intlShape.isRequired,\n};\n\nexport default showWhenPermission('pricelist', 'read')(injectIntl(PriceGridContainer));\n","import {listItemMsg} from '@/shared/components/FormattedListValue';\n\nconst RenderProperty = (props) => {\n const { log, intl } = props;\n \n return log.fieldId !== null\n ? intl.formatMessage(listItemMsg('field', log.fieldId))\n : (log.label ? intl.formatMessage({id:log.label, defaultMessage:log.label}) : log.property);\n}\n\nexport default RenderProperty;\n","import React from 'react';\nimport { useIntl } from 'react-intl';\nimport FieldChange from './FieldChange';\nimport EnumChange from './EnumChange';\nimport messages from './FieldMessages';\n\nconst RelationLinkProperty = props => {\n const intl = useIntl();\n const { log, relations, users } = props;\n\n const isEnum = () => {\n const value = log.oldValue.Value || log.newValue.Value;\n return value && value.hasOwnProperty('Value') && value.hasOwnProperty('Name');\n };\n\n const displayLogLine = () => {\n const transformedLogLine = {\n ...log,\n oldValue: log.oldValue.Value,\n newValue: log.newValue.Value,\n };\n\n if (isEnum()) {\n return ;\n }\n\n return ;\n };\n\n const relation = relations[log.oldValue.RelationId];\n\n return (\n \n {displayLogLine(log.newValue)}{' '}\n {intl.formatMessage(messages.ForRelationLinkWith, { relation })}\n \n );\n};\n\nexport default RelationLinkProperty;\n","import React from 'react';\nimport { useIntl } from 'react-intl';\nimport messages from './FieldMessages';\n\nconst RelationCreated = () => {\n const intl = useIntl();\n return {intl.formatMessage(messages.RelationCreated)};\n};\n\nexport default RelationCreated;\n","import React from 'react';\nimport moment from 'moment';\nimport { useIntl } from 'react-intl';\nimport messages from './FieldMessages';\n\nconst UboEnteredOnline = props => {\n const intl = useIntl();\n const { log } = props;\n\n const dateTime = moment.utc(log.newValue).local(false);\n const time = dateTime.format('LLLL');\n\n return {intl.formatMessage(messages.UboSnapshotEnteredOnline, { time })};\n};\n\nexport default UboEnteredOnline;\n","import React from 'react';\nimport { useIntl } from 'react-intl';\nimport messages from './FieldMessages';\nimport RenderProperty from './RenderProperty';\nimport { formatListValue } from '../../../../shared/components/FormattedListValue';\n\nconst AuthorizationChange = props => {\n const intl = useIntl();\n const { log } = props;\n\n if (log.oldValue === null) {\n return (\n \n {intl.formatMessage(messages.AddedAuthorization, {\n property: RenderProperty({ intl, log }),\n name: formatListValue({ id: log.newValue, list: 'authorizationname', intl }),\n b: value => {value},\n })}\n \n );\n }\n\n return (\n \n {intl.formatMessage(messages.DeletedAuthorization, {\n property: RenderProperty({ intl, log }),\n name: formatListValue({ id: log.oldValue, list: 'authorizationname', intl }),\n b: value => {value},\n })}\n \n );\n};\n\nexport default AuthorizationChange;\n","import React from 'react';\nimport { useIntl } from 'react-intl';\nimport messages from './FieldMessages';\nimport { formatListValue } from '../../../../shared/components/FormattedListValue';\nimport EnumChange from './EnumChange';\nimport FieldChange from './FieldChange';\n\nconst AuthorizationPropertyChange = props => {\n const intl = useIntl();\n const { log, users, relations, templates, ownCompanies, salutations } = props;\n\n const isEnum = () => {\n const value = log.oldValue.Value || log.newValue.Value;\n return value && value.hasOwnProperty('Value') && value.hasOwnProperty('Name');\n };\n\n const displayLogLine = () => {\n const transformedLogLine = {\n ...log,\n oldValue: log.oldValue.Value,\n newValue: log.newValue.Value,\n };\n\n if (isEnum()) {\n return ;\n }\n\n return ;\n };\n\n const message =\n log.oldValue.Name >= 0\n ? messages.AuthorizationPropertyWithName\n : messages.AuthorizationProperty;\n\n return (\n \n {displayLogLine()}{' '}\n {intl.formatMessage(message, {\n name: formatListValue({ id: log.oldValue.Name, list: 'AuthorizationName', intl }),\n b: value => {value},\n })}\n \n );\n};\n\nexport default AuthorizationPropertyChange;\n","import React from \"react\";\nimport EnumChange from \"./EnumChange\";\n\nconst ComplianceChange = props => {\n const { log } = props;\n\n return \n};\n\nexport default ComplianceChange;\n","import React from 'react';\nimport { useIntl } from 'react-intl';\nimport messages from './FieldMessages';\nimport RenderProperty from './RenderProperty';\n\nconst BankAccountChange = props => {\n const intl = useIntl();\n const { log } = props;\n\n if (log.oldValue === null) {\n return (\n \n {intl.formatMessage(messages.AddedBankAccount, {\n property: RenderProperty({ intl, log }),\n iban: log.newValue,\n b: value => {value},\n })}\n \n );\n }\n\n return (\n \n {intl.formatMessage(messages.DeletedBankAccount, {\n property: RenderProperty({ intl, log }),\n iban: log.oldValue,\n b: value => {value},\n })}\n \n );\n};\n\nexport default BankAccountChange;\n","import React from 'react';\nimport { useIntl } from 'react-intl';\nimport messages from './FieldMessages';\nimport EnumChange from './EnumChange';\nimport FieldChange from './FieldChange';\n\nconst BankAccountPropertyChange = props => {\n const intl = useIntl();\n const { log, users, relations } = props;\n\n const isEnum = () => {\n const value = log.oldValue.Value || log.newValue.Value;\n return value && value.hasOwnProperty('Value') && value.hasOwnProperty('Name');\n };\n\n const displayLogLine = () => {\n const transformedLogLine = {\n ...log,\n oldValue: log.oldValue.Value,\n newValue: log.newValue.Value,\n };\n\n if (isEnum()) {\n return ;\n }\n\n return ;\n };\n\n return (\n \n {displayLogLine()}{' '}\n {log.displayValue\n ? intl.formatMessage(messages.BankAccountWithDisplayValueProperty, {\n iban: log.displayValue,\n b: value => {value},\n })\n : intl.formatMessage(messages.BankAccountProperty)}\n \n );\n};\n\nexport default BankAccountPropertyChange;\n","import React from 'react';\nimport { useIntl } from 'react-intl';\nimport { mapInvoiceStreamName } from '@/shared/services/ObjectDisplayService';\nimport messages from './FieldMessages';\nimport RenderProperty from './RenderProperty';\n\nexport const getInvoiceStreamName = (value, intl, defaultName) => {\n if (!value) return '';\n // Fix casing of properties\n const {\n assignmentId,\n assignmentName,\n assignmentTemplateId,\n AssignmentId,\n AssignmentName,\n AssignmentTemplateId,\n } = value;\n const stream = {\n assignmentId: assignmentId ?? AssignmentId,\n assignmentName: assignmentName ?? AssignmentName,\n assignmentTemplateId: assignmentTemplateId ?? AssignmentTemplateId,\n };\n\n return mapInvoiceStreamName(stream, intl, defaultName);\n};\n\nconst InvoiceStreamChange = props => {\n const intl = useIntl();\n const { log } = props;\n\n if (log.oldValue === null) {\n return (\n \n {intl.formatMessage(messages.AddedAssignment, {\n property: RenderProperty({ intl, log }),\n name: getInvoiceStreamName(log.newValue, intl),\n b: value => {value},\n })}\n \n );\n }\n\n return (\n \n {intl.formatMessage(messages.DeletedAssignment, {\n property: RenderProperty({ intl, log }),\n name: getInvoiceStreamName(log.oldValue, intl),\n b: value => {value},\n })}\n \n );\n};\n\nexport default InvoiceStreamChange;\n","import React from 'react';\nimport { useIntl } from 'react-intl';\nimport { hasAssignments } from '@/shared/components/security/HasAssignments';\nimport messages from './FieldMessages';\nimport EnumChange from './EnumChange';\nimport FieldChange from './FieldChange';\n\nimport { getInvoiceStreamName } from './InvoiceStreamChange';\n\nconst InvoiceStreamPropertyChange = props => {\n const intl = useIntl();\n const {\n log,\n users,\n relations,\n ownCompanies,\n templates,\n invoiceSchedules,\n priceGrids,\n invoiceStreams,\n } = props;\n\n const isEnum = () => {\n const value = log.oldValue.Value || log.newValue.Value;\n return value && value.hasOwnProperty('Value') && value.hasOwnProperty('Name');\n };\n\n const displayLogLine = () => {\n const transformedLogLine = {\n ...log,\n oldValue: log.oldValue.Value,\n newValue: log.newValue.Value,\n };\n\n if (isEnum()) {\n return ;\n }\n\n return (\n \n );\n };\n if (!hasAssignments()) return {displayLogLine()};\n\n const invoiceStreamName = getInvoiceStreamName(log.oldValue ?? log.newValue, intl, '');\n\n return (\n \n {displayLogLine()}\n  \n {invoiceStreamName\n ? intl.formatMessage(messages.AssignmentWithDisplayValueProperty, {\n name: invoiceStreamName,\n b: value => {value},\n })\n : intl.formatMessage(messages.DefaultAssignmentProperty)}\n \n );\n};\n\nexport default InvoiceStreamPropertyChange;\n","import React, { useCallback, useEffect, useMemo, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedTime, injectIntl, useIntl } from 'react-intl';\nimport InfiniteScroll from 'react-infinite-scroller';\nimport moment from 'moment';\n\nimport api from '@/shared/api';\nimport SimplePanel from '@/shared/components/SimplePanel';\nimport ZendeskHelp from '@/shared/components/ZendeskHelp';\nimport LoadingAnimation from '@/shared/components/LoadingAnimation';\nimport DocumentService from '@/shared/services/DocumentService';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport { formatListValue } from '@/shared/components/FormattedListValue';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport { mapInvoiceStreamName } from '@/shared/services/ObjectDisplayService';\nimport { hasAssignments } from '@/shared/components/security/HasAssignments';\nimport ToastrService from '@/shared/services/ToastrService';\nimport { injectStateService } from '../../../shared/services/StateService';\nimport config from '../../../config';\nimport FieldChange from './components/FieldChange';\nimport EnumChange from './components/EnumChange';\nimport RelationLinkChange from './components/RelationLinkChange';\nimport UboLine from './components/UboLine';\nimport AddressChange from './components/AddressChange';\nimport AddressSettingChange from './components/AddressSettingChange';\nimport RelationLinkProperty from './components/RelationLinkProperty';\nimport RelationCreated from './components/RelationCreated';\nimport UboEnteredOnline from './components/UboEnteredOnline';\nimport messages from './components/FieldMessages';\nimport RelationSummary from '../../interactions/RelationSummary';\nimport AuthorizationChange from './components/AuthorizationChange';\nimport AuthorizationPropertyChange from './components/AuthorizationPropertyChange';\nimport Compliance from './components/Compliance';\nimport BankAccountChange from './components/BankAccountChange';\nimport BankAccountPropertyChange from './components/BankAccountPropertyChange';\nimport dateFormatService from '../../../shared/services/DateFormatService';\nimport InvoiceStreamChange from './components/InvoiceStreamChange';\nimport InvoiceStreamPropertyChange from './components/InvoiceStreamPropertyChange';\n\nconst onlyUnique = (value, index, self) => self.indexOf(value) === index;\nconst pageSize = 50;\n\nconst RelationAuditContainer = props => {\n const intl = useIntl();\n const { relationId } = props;\n\n const [hasError, setHasError] = useState(false);\n const [loadingTemplates, setLoadingData] = useState(true);\n const [salutations, setSalutations] = useState({});\n const [templates, setTemplates] = useState({});\n const [invoiceSchedules, setInvoiceSchedules] = useState({});\n const [priceGrids, setPriceGrids] = useState({});\n const [allLogs, setLogs] = useState([]);\n const [ownCompanyIds, setOwnCompanyIds] = useState({});\n const [relationIds, setRelationIds] = useState([]);\n const [usersDictionary, setUsersDictionary] = useState({});\n const [relationsDictionary, setRelationsDictionary] = useState({});\n const [invoiceStreams, setInvoiceStreams] = useState({}); // For via info\n const [loading, setLoading] = useState(false);\n const [relation, setRelation] = useState(null);\n const [hasMore, setHasMore] = useState(true);\n\n useEffect(() => {\n const loadRelationSummary = () => {\n if (!relationId) {\n setHasError(true);\n return;\n }\n api.base\n .get(`${config.appUrls.api}/api/relation/summary?id=${relationId}`)\n .then(({ data }) => {\n if (!data.eidDocumentPhotoId) return data;\n return DocumentService.getLink(data.eidDocumentPhotoId).then(photoUrl => ({\n ...data,\n eidPhotoUrl: photoUrl,\n }));\n })\n .then(setRelation)\n .catch(error => {\n setHasError(true);\n handleHttpError(intl)(error);\n });\n };\n setLogs([]);\n loadRelationSummary();\n }, [relationId, intl]);\n\n useEffect(() => {\n const newUsersDictionary = DataCacheService.getAllUsers().reduce(\n (prev, current) => ({ ...prev, [current.id]: current.name }),\n {},\n );\n\n setUsersDictionary(newUsersDictionary);\n }, []);\n\n useEffect(() => {\n if (relationIds.length === 0) return;\n\n const uri = `${config.appUrls.api}/api/Relation/Names`;\n\n const fetchRelations = () => {\n api.base.post(uri, relationIds).then(({ data }) => {\n const newRelationsDictionary = data.reduce(\n (prev, current) => ({\n ...prev,\n [current.id]: `${current.name} ${current.firstName ? current.firstName : ''}`,\n }),\n {},\n );\n setRelationsDictionary(current => ({ ...(current || {}), ...newRelationsDictionary }));\n const showAssignmentName = hasAssignments();\n const invoiceStreamDictionary = data.reduce((prev, current) => {\n if (!current.invoiceStreams) return prev;\n const relationName = `${current.name} ${current.firstName ? current.firstName : ''}`;\n if (!showAssignmentName && current.invoiceStreams.length === 1) {\n const [invoiceStream] = current.invoiceStreams;\n prev[invoiceStream.id] = relationName;\n } else {\n current.invoiceStreams.forEach(invoiceStream => {\n const name = mapInvoiceStreamName(invoiceStream, intl);\n prev[invoiceStream.id] = `${relationName} - ${name}`;\n });\n }\n return prev;\n }, {});\n setInvoiceStreams(current => ({ ...(current || {}), ...invoiceStreamDictionary }));\n });\n };\n\n fetchRelations();\n }, [relationIds, intl]);\n\n useEffect(() => {\n const loadTemplates = () => {\n const templateTypes = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15];\n const queryTemplateTypes = templateTypes.reduce(\n (prev, current) => `${prev}&templateTypes=${current}`,\n '',\n );\n const url = `${config.appUrls.api}/api/documentTemplate/Templates?${queryTemplateTypes}`;\n return api.base.get(url).then(response => {\n const templatesById = response.data.reduce(\n (prev, current) => ({ ...prev, [current.id]: current.name }),\n {},\n );\n setTemplates(templatesById);\n });\n };\n const loadInvoiceSchedules = () =>\n api.base\n .get(`${config.appUrls.api}/api/InvoiceSchedule/Get?includeRemoved=true`)\n .then(response => {\n const schedulesById = response.data.reduce((prev, current) => {\n prev[current.id] = formatListValue({\n id: current.id,\n list: 'invoiceschedule',\n fallback: current.name,\n intl,\n });\n return prev;\n }, {});\n setInvoiceSchedules(schedulesById);\n });\n const loadPriceGrids = () => {\n api.base.get(`${config.appUrls.api}/api/Price/grid`).then(response => {\n const priceGridsById = response.data.reduce((prev, current) => {\n prev[current.id] = current.name;\n return prev;\n }, {});\n setPriceGrids(priceGridsById);\n });\n };\n Promise.all([loadTemplates(), loadInvoiceSchedules(), loadPriceGrids()]).finally(() => {\n setLoadingData(false);\n });\n }, [intl]);\n\n useEffect(() => {\n const loadOwnCompanies = () => {\n const dataCache = DataCacheService.getDataCache();\n if (!dataCache) return;\n\n const ownCompanies = dataCache.company.reduce(\n (prev, current) => ({ ...prev, [current.id]: current.name }),\n {},\n );\n setOwnCompanyIds(ownCompanies);\n };\n\n const loadSalutations = () => {\n const dataCache = DataCacheService.getDataCache();\n if (!dataCache) return;\n\n setSalutations(dataCache.salutationObject);\n };\n\n loadOwnCompanies();\n loadSalutations();\n }, []);\n\n const loadNextPage = useCallback(\n page => {\n const uri = `${\n config.appUrls.audit\n }/api/Relations/${relationId}?limit=${pageSize}&offset=${page * pageSize}`;\n setLoading(true);\n return api.base.get(uri).then(\n ({ data }) => {\n const reducedData = data.map(logLine => ({\n ...logLine,\n id: logLine.dateTime,\n dateTime: new Date(logLine.dateTime),\n type: logLine.type.toLowerCase(),\n }));\n if (data.length < pageSize) setHasMore(false);\n setLogs([...allLogs, ...reducedData]);\n const allRelationIds = reducedData\n .reduce((result, logLine) => {\n switch (logLine.type) {\n case 'relationlink': {\n result.push(logLine.oldValue.Id);\n result.push(logLine.newValue.Id);\n break;\n }\n case 'relationlinkproperty': {\n result.push(logLine.oldValue.RelationId);\n if (logLine.property === 'RepresentedBy') {\n result.push(logLine.oldValue.Value);\n result.push(logLine.newValue.Value);\n }\n break;\n }\n case 'invoicestreamproperty': {\n if (logLine.property === 'InvoiceViaStreamId') {\n result.push(logLine.oldValue.InvoiceRelationId);\n result.push(logLine.newValue.InvoiceRelationId);\n }\n break;\n }\n default:\n break;\n }\n return result;\n }, [])\n .filter(x => x !== null && typeof x !== 'undefined')\n .filter(onlyUnique);\n setRelationIds(allRelationIds);\n setLoading(false);\n return reducedData;\n },\n error => {\n setLoading(false);\n setHasError(true);\n ToastrService.generalError(intl);\n throw error;\n },\n );\n },\n [relationId, allLogs, intl],\n );\n\n const groupedLogs = useMemo(() => {\n if (!allLogs || allLogs.length === 0) return [];\n return Object.values(\n allLogs.reduce((groups, log) => {\n const groupKey = dateFormatService.formatDate(log.dateTime);\n if (!groups[groupKey])\n // eslint-disable-next-line no-param-reassign\n groups[groupKey] = {\n key: groupKey,\n label: moment(log.dateTime).format('LL'),\n logs: [],\n };\n groups[groupKey].logs.push(log);\n return groups;\n }, {}),\n );\n }, [allLogs]);\n\n const renderLogLine = log => {\n const { type } = log;\n switch (type.toLowerCase()) {\n case 'field':\n return (\n \n );\n case 'enum':\n return ;\n case 'relationlink':\n return ;\n case 'ubosnapshot':\n return ;\n case 'relationlinkproperty':\n return (\n \n );\n case 'address':\n return ;\n case 'addresssetting':\n return ;\n case 'entitycreated':\n return ;\n case 'ubosnapshotenteredonline':\n return ;\n case 'authorization':\n return ;\n case 'authorizationproperty':\n return (\n \n );\n case 'compliance':\n return ;\n case 'bankaccount':\n return ;\n case 'bankaccountproperty':\n return (\n \n );\n case 'invoicestream':\n return ;\n case 'invoicestreamproperty':\n return (\n \n );\n default:\n return
    ;\n }\n };\n\n const renderSource = (source, documentType) => {\n if (!source || source === 'Unknown' || source === 'Manual' || source === 0 || source === 1)\n return null;\n\n const sourceFormatted = () => {\n if (Number.isInteger(source)) {\n return formatListValue({ id: source, list: 'entitysourcetype', intl });\n }\n\n if (source === 'GenericDocumentRecognition' && documentType) {\n return `${intl.formatMessage(messages.GenericDocumentRecognition)} (${formatListValue({\n id: documentType,\n list: 'documenttype',\n intl,\n })})`;\n }\n\n return source in messages ? intl.formatMessage(messages[source]) : source;\n };\n\n return (\n \n {' '}\n via {sourceFormatted()}\n \n );\n };\n const renderLogs = logs => {\n if (!logs) return
    ;\n return logs.map(logLine => (\n
  • \n
    {renderLogLine(logLine)}
    \n
    \n \n {usersDictionary[logLine.userId] && (\n {usersDictionary[logLine.userId]}\n )}\n {renderSource(logLine.source, logLine.documentType)}\n
    \n
  • \n ));\n };\n\n const renderGroups = () => {\n if (!groupedLogs || groupedLogs.length === 0 || loadingTemplates)\n return loading || loadingTemplates ? null : intl.formatMessage(messages.NoItems);\n return groupedLogs\n .filter(x => x !== null)\n .map(({ key, label, logs }) => (\n
    \n
    {label}
    \n
      {renderLogs(logs)}
    \n
    \n ));\n };\n\n if (hasError) return
    ;\n const isLoading = !!(loading || loadingTemplates);\n\n return (\n
    \n
    \n {relation ? : }\n
    \n
    \n {relation ? (\n \n \n {renderGroups()}\n {isLoading && }\n \n ) : (\n \n )}\n
    \n
    \n );\n};\n\nRelationAuditContainer.propTypes = {\n relationId: PropTypes.string.isRequired,\n};\n\nexport default injectStateService(RelationAuditContainer);\n","import React, { useMemo } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage } from 'react-intl';\nimport classnames from 'classnames';\n\nimport moment from 'moment';\nimport dateMessages from '@/shared/messages/dateMessages';\n\nconst generateYears = (yearFrom, yearUntil, showAll) => {\n const years = [];\n for (let year = yearFrom; year <= yearUntil; year++) {\n years.push({\n key: `${year}`,\n value: year,\n label: `${year}`,\n });\n }\n if (showAll) {\n years.push({\n key: 'all',\n value: null,\n label: dateMessages.All,\n });\n }\n return years;\n};\n\nconst YearButtonGroup = ({ value, yearFrom, yearUntil, showAll, onChange, className }) => {\n const years = useMemo(() => generateYears(yearFrom, yearUntil, showAll), [\n yearFrom,\n yearUntil,\n showAll,\n ]);\n\n return (\n
    \n {years.map(p => (\n onChange(p.value)}\n type=\"button\"\n key={p.key}\n className={classnames('btn btn-default', {\n active: value === p.value,\n })}\n >\n {p.label && p.label.id ? : p.label}\n \n ))}\n
    \n );\n};\n\nYearButtonGroup.propTypes = {\n value: PropTypes.number,\n yearFrom: PropTypes.number,\n yearUntil: PropTypes.number,\n showAll: PropTypes.bool,\n onChange: PropTypes.func.isRequired,\n className: PropTypes.string,\n};\n\nYearButtonGroup.defaultProps = {\n value: null,\n yearFrom: moment.utc().year() - 3,\n yearUntil: moment.utc().year(),\n showAll: false,\n className: '',\n};\nexport default YearButtonGroup;\n","import React, { useState, useEffect } from 'react';\nimport PropTypes from 'prop-types';\n\nconst DelayedInput = ({ value, type, onChange, delay, submitOnBlur, ...rest }) => {\n const [query, setQuery] = useState(value);\n const [saving, setSaving] = useState(false);\n useEffect(\n () => {\n setQuery(value);\n },\n [value],\n );\n useEffect(\n () => {\n const id = setTimeout(() => setSaving(true), delay);\n return () => clearTimeout(id);\n },\n [query, delay],\n );\n\n useEffect(\n () => {\n if (saving) {\n onChange(query);\n setSaving(false);\n }\n return () => {\n setSaving(false);\n };\n },\n [onChange, saving, query],\n );\n\n const handleBlur = () => {\n if (!submitOnBlur || saving) return;\n\n // if (timeoutId) clearTimeout(timeoutId);\n if (value !== query) setSaving(true);\n };\n\n return (\n setQuery(e.target.value)}\n value={query == null ? '' : query}\n />\n );\n};\n\nDelayedInput.propTypes = {\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n type: PropTypes.string,\n onChange: PropTypes.func.isRequired,\n submitOnBlur: PropTypes.bool,\n delay: PropTypes.number,\n};\nDelayedInput.defaultProps = {\n value: null,\n type: 'string',\n submitOnBlur: true,\n delay: 500,\n};\nexport default DelayedInput;\n","import { defineMessages } from 'react-intl';\n\nexport default defineMessages({\n Budget: 'Budget',\n BudgetOverview: 'Budget overview',\n NoDataFound: 'No data found',\n Relation: 'Relation',\n Assignment: 'Assignment',\n Period: 'Period',\n BudgetAmount: 'Budget amount',\n ActualAmount: 'Actual amount',\n RemainingAmount: 'Remaining amount',\n BudgetAmountUsedPct: 'Used amount %',\n BudgetHours: 'Budget hours',\n ActualHours: 'Actual hours',\n RemainingHours: 'Remaining hours',\n BudgetHoursUsedPct: 'Used hours %',\n Year: 'Year',\n WithBudget: 'With budget',\n WithoutBudget: 'Without budget',\n DeleteBudget: 'Delete budget',\n DeleteBudgetMsg: 'Are you sure you want to delete this budget?',\n InvoiceSchedules: 'Invoice schedules',\n AllBudgetsSelected: 'All budgets selected',\n CountBudgetsSelected: 'Selected {count} budgets',\n ExportToExcel: 'Export to Excel',\n GlobalActions: 'Global actions',\n UpdateBudgetAmount: 'Update budget amount',\n UpdateAmountForYear: 'Update amount for year {year}',\n UpdateBudgetHours: 'Update budget hours',\n UpdateHoursForYear: 'Update hours for year {year}',\n OverrideIfBudgetExists: 'Override budget if one is already present',\n UseForfaitAmountAsBudgetAmount: 'Use forfait amount as budget amount',\n UseRegistrationAmountAsBudgetAmount: 'Use registration amount as budget amount',\n UseInvoiceAmountAsBudgetAmount: 'Use invoice amount as budget amount',\n UseRegistrationHoursForBudget: 'Use registration hours for budget',\n UseAdvanceAmountAsBudgetAmount: 'Use advance amount as budget amount',\n NewAmount: 'New amount',\n NewQuantity: 'New quantity',\n Amount: 'Amount',\n Hours: 'Hours',\n Method: 'Method',\n BudgetBasedOnYear: 'Based on year',\n CopyBudgetToYear: 'Copy budget to year',\n CopyBudget: 'Copy budget',\n GlobalActionStarted: 'Global action started',\n ExportToExcelStarted: 'Export to Excel started',\n ShowInvoicingHistory: 'Show invoicing history',\n IncludeInactiveRelations: 'Show inactive',\n\n IncludeExForfaitRegistrations: 'Include registrations not included in fixed amount',\n\n FiltersForBudgetCalculations: 'Filters for budget calculations',\n ShowInRegistrationOverview: 'Show in registration overview',\n BudgetSpreadOverPeriod: 'Budget spread over period',\n\n CopyBudgetYearFilterInfo: 'This year can be changed by changing the year filter in the overview',\n\n ColumnConfig: 'Configure columns',\n SelectColumns: 'Select columns',\n AddOrSubtractPercentage: 'Add or subtract percentage',\n Digits: 'Digits',\n RoundTo: 'Round to',\n RoundingMethod: 'Rounding method',\n Example: 'Example',\n Percentage: 'Percentage',\n\n OpenBudgetSettings: 'Open budget settings',\n});\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage, injectIntl } from 'react-intl';\nimport moment from 'moment';\nimport isEqual from 'lodash-es/isEqual';\nimport Toggle from 'react-toggle';\n\nimport intlShape from '@/shared/utils/intlShape';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport userStorage from '@/shared/services/userStorage';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport RelationSearch from '@/shared/components/input/RelationSearch';\nimport YearButtonGroup from '@/shared/components/YearButtonGroup';\nimport SavedFiltersButton from '@/shared/components/SavedFiltersButton';\nimport DelayedInput from '@/shared/components/input/DelayedInput';\nimport { parseIntOrNull } from '@/shared/utils/adminpulse';\nimport authService, { privileges } from '@/shared/services/AuthService';\nimport config from '../../../config';\nimport api from '../../../shared/api';\nimport messages from './budgetMessages';\nimport DynamicFilter, {\n getDynamicFiltersFromDefaultFilters,\n handleDynamicFiltersChanged,\n initDynamicFilters,\n resetDynamicFilters,\n} from '../../../shared/components/DynamicFilter';\n\nconst currentYear = moment.utc().year();\nconst yearFrom = currentYear - 3;\nconst yearUntil = currentYear + 1;\n\nexport const defaultFilters = {\n associate: null, // UserId\n assistant: null, // UserId\n assistantBackup: null, // UserId\n responsible: null, // UserId\n billingUser: null, // UserId\n seniorUser: null, // UserId\n relationId: null, // String\n relationName: null,\n relationType: [], // Array\n withLabels: [], // Array\n withoutLabels: [], // Array,\n ownCompanies: [],\n assignmentTemplateId: null,\n invoiceScheduleTypes: [],\n endFiscalYears: [],\n year: moment.utc().year(),\n withBudget: null,\n budgetAmountUsed: null,\n budgetHoursUsed: null,\n includeInactive: false,\n relationGroups: [],\n filterBehaviours: {\n withLabels: 1,\n },\n};\nconst allDynamicFilters = [\n ...getDynamicFiltersFromDefaultFilters(defaultFilters),\n {\n id: 'budgetAmountUsed',\n label: messages.BudgetAmountUsedPct,\n enabled: () =>\n authService.hasPermission({\n functionality: 'pricelist',\n privilege: privileges.Read,\n }),\n },\n { id: 'budgetHoursUsed', label: messages.BudgetHoursUsedPct },\n { id: 'includeInactive', label: messages.IncludeInactiveRelations },\n];\n\nconst dynamicFiltersStorageKey = 'BudgetOverviewDynamicFilters';\n\nclass BudgetOverviewFilters extends Component {\n state = {\n dynamicFilters: [],\n labels: [],\n };\n static propTypes = {\n countSelected: PropTypes.string.isRequired,\n onFilterChange: PropTypes.func.isRequired,\n filters: PropTypes.shape({\n responsible: PropTypes.string,\n assistant: PropTypes.string,\n assistantBackup: PropTypes.string,\n associate: PropTypes.string,\n billingUser: PropTypes.string,\n seniorUser: PropTypes.string,\n relationId: PropTypes.string,\n relationName: PropTypes.string,\n relationType: PropTypes.arrayOf(PropTypes.number),\n withLabels: PropTypes.arrayOf(PropTypes.string),\n withoutLabels: PropTypes.arrayOf(PropTypes.string),\n ownCompanies: PropTypes.arrayOf(PropTypes.string),\n assignmentTemplateId: PropTypes.string,\n invoiceScheduleTypes: PropTypes.arrayOf(PropTypes.string),\n year: PropTypes.number,\n withBudget: PropTypes.bool,\n budgetAmountUsed: PropTypes.number,\n budgetHoursUsed: PropTypes.number,\n includeInactive: PropTypes.bool,\n relationGroups: PropTypes.arrayOf(PropTypes.string),\n }),\n intl: intlShape.isRequired,\n };\n\n static defaultProps = {\n filters: defaultFilters,\n };\n\n componentDidMount() {\n const { intl, filters } = this.props;\n this.assignmentsEnabled = DataCacheService.assignmentsEnabled();\n const labelPromise = api.base.get(`${config.appUrls.api}/api/Resource/Tags`);\n\n Promise.all([labelPromise]).then(([{ data: labels }]) => {\n this.setState({\n labels: labels\n .map(x => ({ id: x.id, label: x.name, sort: x.name.toLowerCase() }))\n .sort(dynamicSort('sort')),\n dynamicFilters: initDynamicFilters(\n intl,\n allDynamicFilters,\n userStorage.getItem(dynamicFiltersStorageKey) || [],\n filters,\n defaultFilters,\n ),\n });\n });\n }\n\n filterChanged = filter => {\n const { filters, onFilterChange } = this.props;\n const newFilters = { ...filters, ...filter };\n if (filters !== newFilters) onFilterChange(newFilters);\n };\n resetFilters = () => {\n this.filterChanged(defaultFilters);\n };\n dynamicFilterChanged = (item, selected) => {\n this.setState(({ dynamicFilters }) => {\n const { filters } = this.props;\n const newFilters = handleDynamicFiltersChanged(\n dynamicFilters,\n item,\n selected,\n filters,\n defaultFilters,\n );\n userStorage.setItem(\n dynamicFiltersStorageKey,\n newFilters.filter(x => x.selected).map(x => x.id),\n );\n if (\n !selected &&\n item.id !== 'selectAll' &&\n !isEqual(filters[item.id], defaultFilters[item.id])\n ) {\n // Reset filter when it's removed\n this.filterChanged({ [item.id]: defaultFilters[item.id] });\n }\n return { dynamicFilters: newFilters };\n });\n };\n savedFilterChanged = filters => {\n const { onFilterChange } = this.props;\n const newFilters = { ...defaultFilters, ...filters };\n if (typeof newFilters.dateFrom === 'string') newFilters.dateFrom = moment.utc(filters.dateFrom);\n if (typeof newFilters.dateUntil === 'string')\n newFilters.dateUntil = moment.utc(filters.dateUntil);\n\n onFilterChange(newFilters);\n\n this.setState(({ dynamicFilters }) => ({\n dynamicFilters: resetDynamicFilters(dynamicFilters, newFilters, defaultFilters),\n }));\n };\n relationChanged = item => {\n if (!item || !item.id) {\n this.filterChanged({ relationId: null, relationName: null });\n } else {\n this.filterChanged({\n relationId: item.key,\n relationName: item.label,\n });\n }\n };\n withBudgetChanged = checked => {\n this.filterChanged({ withBudget: checked ? true : null });\n };\n withoutBudgetChanged = checked => {\n this.filterChanged({ withBudget: checked ? false : null });\n };\n renderDynamicFilter = ({ type, filters, intl }) => {\n switch (type) {\n case 'budgetAmountUsed': {\n return (\n
    \n
    \n
    \n \n this.filterChanged({ budgetAmountUsed: parseIntOrNull(value) })\n }\n className=\"form-control\"\n placeholder={intl.formatMessage(messages.BudgetAmountUsedPct)}\n />\n %\n
    \n
    \n
    \n );\n }\n case 'budgetHoursUsed': {\n return (\n
    \n
    \n
    \n this.filterChanged({ budgetHoursUsed: parseIntOrNull(value) })}\n className=\"form-control\"\n placeholder={intl.formatMessage(messages.BudgetHoursUsedPct)}\n />\n %\n
    \n
    \n
    \n );\n }\n case 'includeInactive':\n return (\n
    \n
    \n \n
    \n
    \n );\n default:\n console.warn(`Missing filter: ${type}`);\n return null;\n }\n };\n\n render() {\n const { dynamicFilters, labels } = this.state;\n const { intl, filters, countSelected } = this.props;\n //\n\n let initRelation = null;\n if (filters.relationId) {\n initRelation = {\n key: filters.relationId,\n label: filters.relationName,\n };\n }\n const visibleFilters = dynamicFilters.filter(x => x.selected).map(x => x.id);\n\n return (\n \n
    \n
    \n
    \n \n
    \n
    \n
    \n this.filterChanged({ year })}\n />\n
    \n
    \n
    \n {visibleFilters && visibleFilters.length > 0\n ? visibleFilters.map(id => (\n \n ))\n : null}\n
    \n
    \n \n \n
    \n
    \n
    \n
    \n
    \n \n {countSelected &&
    {countSelected}
    }\n
    \n
    \n
    \n );\n }\n}\n\nexport default injectIntl(BudgetOverviewFilters);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport { FormattedNumber } from 'react-intl';\n\nimport EditableToggle from './EditableToggle';\n\nconst EditableNumber = ({\n onChange,\n value,\n submitOnBlur,\n inputClassName,\n displayClassName,\n readOnly,\n placeholder,\n allowDecimals,\n displayValue,\n ...rest\n}) => (\n )\n }\n className={displayClassName}\n >\n {({ inputValue, handleChange, inputRef, submit, cancel, handleKeyDown }) => (\n {\n const pastedValue = e.clipboardData.getData('text/plain');\n // if the pasted value contains both a comma and a dot, we assume the dot should not be interpreted as the decimal separator\n if (pastedValue?.includes(',') && pastedValue?.includes('.')) {\n // 7.141,55: parse as 7141,55 (thousand-separator for display in most EU countries, comma as decimal separator)\n const numericValue = parseFloat(pastedValue.replace('.', '').replace(',', '.'));\n e.target.value = numericValue;\n handleChange(e);\n } else if (pastedValue?.includes('.')) {\n // 7.141: parse as 7141 (thousand-separator for display in most EU countries)\n const numericValue = parseFloat(pastedValue?.replace('.', ''));\n e.target.value = numericValue;\n handleChange(e);\n } else {\n const numericValue = parseFloat(pastedValue?.replace(',', '.')); // parse float doesnt see comma as decimal separator\n e.target.value = numericValue;\n handleChange(e);\n }\n\n e.preventDefault();\n }}\n onKeyPress={event => {\n if (!allowDecimals && (event.charCode === 44 || event.charCode === 46)) {\n event.preventDefault();\n }\n }}\n onBlur={submitOnBlur ? submit : cancel}\n onKeyDown={handleKeyDown}\n className={classnames('form-control', inputClassName)}\n placeholder={placeholder}\n autoComplete=\"off\"\n {...rest}\n />\n )}\n \n);\n\nEditableNumber.propTypes = {\n onChange: PropTypes.func.isRequired,\n value: PropTypes.number,\n submitOnBlur: PropTypes.bool,\n placeholder: PropTypes.string,\n inputClassName: PropTypes.string,\n displayClassName: PropTypes.string,\n readOnly: PropTypes.bool,\n allowDecimals: PropTypes.bool,\n displayValue: PropTypes.node,\n};\nEditableNumber.defaultProps = {\n submitOnBlur: true,\n inputClassName: '',\n displayClassName: '',\n placeholder: '',\n readOnly: false,\n value: null,\n allowDecimals: true,\n displayValue: undefined,\n};\n\nexport default EditableNumber;\n","import moment from 'moment';\nimport merge from 'lodash-es/merge';\n\nexport const getPercentageColorClass = pct => {\n if (pct === null) return '';\n\n if (pct >= 1) return 'text-red';\n if (pct >= 0.9) return 'text-orange';\n if (pct >= 0.7) return 'text-orange';\n if (pct <= 0.3) return 'text-success';\n return '';\n};\n\nexport const getPercentageColorBgClass = pct => {\n if (pct === null) return '';\n\n if (pct >= 1) return 'bg-red';\n if (pct >= 0.9) return 'bg-orange';\n if (pct >= 0.7) return 'bg-orange';\n if (pct <= 0.3) return 'bg-success';\n return '';\n};\n\nexport const getFomattedPercentage = (pct, max = 999) =>\n `${Math.min(max, Math.round((pct || 0) * 100))}%`;\n\nexport const getUsedBudgetPercentage = (budget, actual) => (budget ? (actual || 0) / budget : null);\n\nexport const randomActuals = budget => {\n const result = [];\n let sum = 0;\n for (let i = 0; i < 12; i++) {\n const v = Math.round(Math.random() * (budget * 0.13) * 100) / 100;\n sum += v;\n result[i] = sum;\n }\n return result;\n};\n\nexport const budgetDataToMonthGraph = (data, budget) => {\n if (!data || !budget) return ['', ''];\n // The graph has a fixed size of 240 width and 100 height\n const topPadding = 5; // Extra space on top\n const height = 90; // Maximum height of graph\n const max = data.reduce((m, i) => (i > m ? i : m), -1);\n const ratio = max > budget ? max / budget : 1;\n\n const actual = data\n .map((x, i) => `${10 + 20 * i},${(topPadding + height * (1 - x / budget / ratio)).toFixed(5)}`)\n .join(' ');\n const budgetLineY = (topPadding + height * (1 - 1 / ratio)).toFixed(5);\n const expected = `0,${topPadding + height} 240,${budgetLineY}`;\n\n const budgetLine = ratio === 1 ? '' : `0,${budgetLineY} 240,${budgetLineY}`;\n return [actual, expected, budgetLine];\n};\n\nexport const makeCumulative = array => {\n if (!array) return null;\n return array.reduce((a, v) => {\n a.push((a[a.length - 1] || 0) + v);\n return a;\n }, []);\n};\n\nexport const mapBudgetOverview = (e, allSelected) => ({\n ...e,\n budget: e.budget,\n amountPerMonth: makeCumulative(e.amountPerMonth),\n hoursPerMonth: makeCumulative(e.hoursPerMonth),\n selected: allSelected,\n});\n\nexport const noActuals = ({ actualAmount, actualHours, ...e }) => ({ ...e });\n\n// Clear id & budget values\nexport const clearBudget = ({ id, ...e }) => ({\n ...e,\n budgetAmount: null,\n budgetHours: null,\n isNew: true,\n});\n\nconst getRegistrationPeriodFilter = year => {\n if (year === moment.utc().year()) return 'year';\n if (year === moment.utc().year() - 1) return 'prevYear';\n return 'all';\n};\n\nconst getRegistrationOverviewNavParamsFromCalcSettings = settings => {\n if (!settings || Object.keys(settings).length === 0) return {};\n\n const result = { filters: {} };\n if (!settings.includeExForfait && !settings.includeInForfait) {\n result.filters.forfaitStatus = { items: [0] }; // Only NVT forfait status\n } else if (!settings.includeExForfait) {\n result.filters.forfaitStatus = { items: [0, 2] }; // Only NVT & included\n } else if (!settings.includeInForfait) {\n result.filters.forfaitStatus = { items: [0, 1] }; // Only NVT & not included\n }\n\n if (!settings.includeNotBillable) {\n result.filters.isBillable = { items: [true] };\n }\n if (settings.onlyNumberedInvoices) {\n result.filters.invoiceStatus = { items: [2] };\n }\n\n return result;\n};\n\nexport const getRegistrationOverviewNavParams = (\n year,\n relationId,\n invoiceStreamId,\n calcSettings = null,\n) =>\n merge(\n {\n relation: relationId\n ? {\n id: relationId,\n }\n : null,\n dateFrom: moment.utc([year, 0, 1]),\n dateUntil: moment.utc([year, 11, 31]),\n period: getRegistrationPeriodFilter(year),\n finalInvoiceStreamId: invoiceStreamId,\n filters: {\n // Clear all column filters\n type: undefined,\n forfaitStatus: undefined,\n isBillable: undefined,\n invoiceStatus: undefined,\n neverInvoice: undefined,\n },\n },\n getRegistrationOverviewNavParamsFromCalcSettings(calcSettings),\n );\n\nexport const getDisplayProperties = x => {\n const amountUsed = x.budgetAmountUsed ?? getUsedBudgetPercentage(x.budgetAmount, x.actualAmount);\n const hoursUsed = x.budgetHoursUsed ?? getUsedBudgetPercentage(x.budgetHours, x.actualHours);\n\n return {\n pbAmountClass: getPercentageColorBgClass(amountUsed),\n pbAmountStyle: { width: getFomattedPercentage(amountUsed, 100) },\n pbHoursClass: getPercentageColorBgClass(hoursUsed),\n pbHoursStyle: { width: getFomattedPercentage(hoursUsed, 100) },\n amountClass: getPercentageColorClass(amountUsed),\n hoursClass: getPercentageColorClass(hoursUsed),\n };\n};\n\nexport const mapBudgetKpi = data => {\n if (!data) return null;\n\n const { budgetAmountUsed, budgetHoursUsed, maxBudgetUsed, details } = data;\n\n const maxPercentage = Math.max(budgetAmountUsed, budgetHoursUsed, 0);\n\n const result = {\n ...data,\n pbClass: getPercentageColorBgClass(Math.max(maxBudgetUsed, maxPercentage)), // Color code for max % of details\n ...getDisplayProperties(data),\n pbPercentage: getFomattedPercentage(maxPercentage),\n pbStyle: { width: getFomattedPercentage(maxPercentage, 100) },\n\n // Map details\n details: details.map(x => ({\n ...x,\n actualAmount: x.actualAmount || 0,\n actualHours: x.actualHours || 0,\n ...getDisplayProperties(x),\n })),\n };\n\n return result;\n};\n","import React, { useMemo } from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { budgetDataToMonthGraph } from './budgetHelpers';\n\nconst BudgetGraph = ({ data, budget, onClick }) => {\n const [actualPoints, expectedPoints, budgetLinePoints] = useMemo(\n () => budgetDataToMonthGraph(data, budget),\n [data, budget],\n );\n\n if (!data) return null;\n\n return (\n \n \n \n \n \n \n \n \n \n {/* Expected budget */}\n \n {/* Actuals per month */}\n \n \n );\n};\n\nBudgetGraph.propTypes = {\n data: PropTypes.arrayOf(PropTypes.number),\n budget: PropTypes.number,\n onClick: PropTypes.func,\n};\nBudgetGraph.defaultProps = {\n data: [],\n budget: 0,\n onClick: undefined,\n};\nexport default BudgetGraph;\n","import React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport authService from '@/shared/services/AuthService';\nimport { injectStateService, StateService } from '@/shared/services/StateService';\n\nclass NavigateToState extends PureComponent {\n handleClick = () => {\n const { stateService, stateName, stateParams } = this.props;\n return stateService.gotoState(stateName, stateParams);\n };\n render() {\n const {\n functionality,\n permissions,\n children,\n title,\n useUrl,\n stateService,\n stateName,\n stateParams,\n paramsToJson,\n className,\n } = this.props;\n if (functionality !== null && !authService.hasPermission({ functionality, permissions }))\n return {children}; // No permission to go to state, return children\n\n const url = useUrl\n ? stateService.getStateUrl(stateName, paramsToJson ? { json: stateParams } : stateParams)\n : undefined;\n\n return (\n \n {children}\n \n );\n }\n}\nNavigateToState.propTypes = {\n stateService: PropTypes.instanceOf(StateService).isRequired,\n stateName: PropTypes.string.isRequired,\n stateParams: PropTypes.shape({}),\n title: PropTypes.string,\n functionality: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n permissions: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n children: PropTypes.node,\n useUrl: PropTypes.bool,\n paramsToJson: PropTypes.bool,\n className: PropTypes.string,\n};\nNavigateToState.defaultProps = {\n stateParams: undefined,\n title: undefined,\n functionality: null,\n permissions: 'read',\n children: null,\n useUrl: false,\n paramsToJson: false,\n className: null,\n};\n\nexport default injectStateService(NavigateToState);\n","import React, { Fragment, useMemo } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedNumber } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport classNames from 'classnames';\nimport merge from 'lodash-es/merge';\nimport RelationName from '@/shared/components/RelationName';\nimport FormattedCurrency from '@/shared/components/FormattedCurrency';\nimport { mapInvoiceStreamName } from '@/shared/services/ObjectDisplayService';\nimport EditableCurrency from '@/shared/components/editable/EditableCurrency';\nimport EditableNumber from '@/shared/components/editable/EditableNumber';\nimport { FaTrashAlt, FaRegWindowRestore, FaHistory } from 'react-icons/fa';\nimport Checkbox from '@/shared/components/input/Checkbox';\nimport { CanRead } from '@/shared/components/security';\nimport { StateService } from '@/shared/services/StateService';\nimport BudgetGraph from './BudgetGraph';\nimport { getPercentageColorClass, getUsedBudgetPercentage } from './budgetHelpers';\nimport messages from './budgetMessages';\nimport NavigateToState from '../../../shared/components/NavigateToState';\nimport { useRegistrationOverviewNavParams } from './hooks/useRegistrationOverviewNavParams';\n\nconst resourceTimeFilter = {\n filters: {\n type: { items: [0] },\n },\n};\nconst BudgetRow = ({\n intl,\n value,\n showAssignments,\n onUpdateBudget,\n onDeleteBudget,\n canUpdateBudget,\n canViewAmounts,\n handleSelect,\n selected,\n disableSelect,\n invoiceDialogsSvc,\n showBudgetGraphModal,\n stateService,\n columnStatus,\n}) => {\n const { relation, invoiceStream, budget = null } = value;\n const regNavParams = useRegistrationOverviewNavParams(\n budget.year,\n relation.id,\n invoiceStream.id,\n invoiceStream.companyId ?? relation.companyId,\n );\n if (!budget) {\n return (\n \n \n \n handleSelect(invoiceStream.id)}\n value={selected}\n disabled={disableSelect}\n />\n \n \n \n \n {showAssignments && (\n {mapInvoiceStreamName(invoiceStream, intl)}\n )}\n \n {canUpdateBudget && }\n \n \n );\n }\n\n const amountPct = getUsedBudgetPercentage(budget.budgetAmount, budget.actualAmount);\n const hoursPct = getUsedBudgetPercentage(budget.budgetHours, budget.actualHours);\n const budgetClass = budget.isNew ? 'text-muted fw-normal' : 'fw-normal';\n\n return (\n \n \n \n handleSelect(invoiceStream.id)}\n value={selected}\n disabled={disableSelect}\n />\n \n \n \n \n {showAssignments && (\n {mapInvoiceStreamName(invoiceStream, intl)}\n )}\n {budget.year}\n {canViewAmounts ? (\n \n {columnStatus.budgetAmount && (\n \n onUpdateBudget({ ...budget, budgetAmount: val })}\n readOnly={!canUpdateBudget}\n min={0}\n max={99999999999.99}\n />\n \n )}\n {columnStatus.actualAmount && (\n \n {budget.budgetAmount || budget.actualAmount ? (\n \n \n \n ) : null}\n \n )}\n {columnStatus.remainingAmount && (\n \n {budget.budgetAmount || budget.actualAmount ? (\n \n ) : null}\n \n )}\n {columnStatus.budgetAmountUsedPct && (\n \n {budget.budgetAmount ? (\n \n \n \n ) : null}\n \n )}\n {columnStatus.budgetAmountUsedPct && (\n \n {budget.budgetAmount ? (\n \n showBudgetGraphModal(\n value.amountPerMonth,\n budget.budgetAmount,\n budget.year,\n true,\n )\n }\n data={value.amountPerMonth}\n budget={budget.budgetAmount}\n />\n ) : null}\n \n )}\n \n ) : null}\n {columnStatus.budgetHours && (\n \n onUpdateBudget({ ...budget, budgetHours: val })}\n readOnly={!canUpdateBudget}\n />\n \n )}\n {columnStatus.actualHours && (\n \n {budget.budgetHours || budget.actualHours ? (\n \n \n \n \n \n ) : null}\n \n )}\n {columnStatus.remainingHours && (\n \n {budget.budgetHours || budget.actualHours ? (\n \n ) : null}\n \n )}\n {columnStatus.budgetHoursUsedPct && (\n \n {budget.budgetHours ? (\n \n \n \n ) : null}\n \n )}\n {columnStatus.budgetHoursUsedPct && (\n \n {budget.budgetHours ? (\n \n showBudgetGraphModal(value.hoursPerMonth, budget.budgetHours, budget.year, false)\n }\n />\n ) : null}\n \n )}\n \n \n stateService.gotoRegistrationOverview(regNavParams)}\n >\n \n \n \n \n \n invoiceDialogsSvc.showInvoicingHistory(invoiceStream.id, null, relation.id)\n }\n >\n \n \n \n {canUpdateBudget && (\n onDeleteBudget(value)}\n >\n \n \n )}\n \n \n \n );\n};\n\nBudgetRow.propTypes = {\n intl: intlShape.isRequired,\n value: PropTypes.shape({}).isRequired,\n showAssignments: PropTypes.bool,\n canUpdateBudget: PropTypes.bool,\n canViewAmounts: PropTypes.bool,\n onUpdateBudget: PropTypes.func.isRequired,\n onDeleteBudget: PropTypes.func.isRequired,\n handleSelect: PropTypes.func.isRequired,\n selected: PropTypes.bool,\n disableSelect: PropTypes.bool,\n invoiceDialogsSvc: PropTypes.shape({}).isRequired,\n showBudgetGraphModal: PropTypes.func.isRequired,\n stateService: PropTypes.instanceOf(StateService).isRequired,\n columnStatus: PropTypes.shape({}).isRequired,\n};\nBudgetRow.defaultProps = {\n showAssignments: false,\n canUpdateBudget: false,\n canViewAmounts: false,\n selected: false,\n disableSelect: false,\n};\n\nexport default BudgetRow;\n","import { useMemo } from 'react';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport { getRegistrationOverviewNavParams } from '../budgetHelpers';\nexport var useRegistrationOverviewNavParams = function (year, relationId, invoiceStreamId, companyId) {\n return useMemo(function () {\n var _a = DataCacheService.getCompanySettings(companyId), _b = _a.budgetIncludeExForfait, budgetIncludeExForfait = _b === void 0 ? true : _b, _c = _a.budgetIncludeInForfait, budgetIncludeInForfait = _c === void 0 ? true : _c, _d = _a.budgetIncludeNotBillable, budgetIncludeNotBillable = _d === void 0 ? false : _d, _e = _a.budgetOnlyNumberedInvoices, budgetOnlyNumberedInvoices = _e === void 0 ? false : _e;\n return getRegistrationOverviewNavParams(year, relationId, invoiceStreamId, {\n includeExForfait: budgetIncludeExForfait,\n includeInForfait: budgetIncludeInForfait,\n includeNotBillable: budgetIncludeNotBillable,\n onlyNumberedInvoices: budgetOnlyNumberedInvoices,\n });\n }, [year, relationId, invoiceStreamId, companyId]);\n};\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport DropdownButton from 'react-bootstrap/lib/DropdownButton';\nimport MenuItem from 'react-bootstrap/lib/MenuItem';\nimport { FormattedMessage, injectIntl } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport messages from './budgetMessages';\n\nconst GlobalActionsButton = props => {\n const {\n intl,\n disabled,\n onUpdateBudgetAmount,\n onUpdateBudgetHours,\n onCopyBudget,\n inProgress,\n } = props;\n\n return (\n \n \n {inProgress && }\n \n \n }\n >\n \n {intl.formatMessage(messages.UpdateBudgetAmount)}\n \n \n {intl.formatMessage(messages.UpdateBudgetHours)}\n \n \n {intl.formatMessage(messages.CopyBudget)}\n \n \n \n );\n};\n\nGlobalActionsButton.propTypes = {\n intl: intlShape.isRequired,\n onUpdateBudgetAmount: PropTypes.func.isRequired,\n onUpdateBudgetHours: PropTypes.func.isRequired,\n onCopyBudget: PropTypes.func.isRequired,\n disabled: PropTypes.bool,\n inProgress: PropTypes.bool,\n};\nGlobalActionsButton.defaultProps = { disabled: false, inProgress: false };\nexport default injectIntl(GlobalActionsButton);\n","import React, { Component, Fragment } from 'react';\nimport PropTypes from 'prop-types';\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport Checkbox from '@/shared/components/input/Checkbox';\nimport moment from 'moment';\nimport intlShape from '@/shared/utils/intlShape';\nimport messages from '../budgetMessages';\n\nconst currentYear = moment.utc().year();\n\nexport default class UpdateBudgetAmountModal extends Component {\n state = {\n overrideBudget: false,\n referenceYear: currentYear,\n budgetYear: currentYear + 1,\n years: [],\n };\n\n static propTypes = {\n show: PropTypes.bool.isRequired,\n intl: intlShape.isRequired,\n onSave: PropTypes.func.isRequired,\n onClose: PropTypes.func.isRequired,\n year: PropTypes.number, // Year from filters\n };\n static defaultProps = {\n year: null,\n };\n componentDidMount() {\n const { year } = this.props;\n const referenceYear = year || moment.utc().year();\n const budgetYear = referenceYear + 1;\n\n const years = [\n budgetYear + 2,\n budgetYear + 1,\n budgetYear,\n budgetYear - 1,\n budgetYear - 2,\n budgetYear - 3,\n ];\n this.setState({ referenceYear, budgetYear, years });\n }\n\n isFormInvalid = () => {\n const { referenceYear, budgetYear } = this.state;\n if (!referenceYear || referenceYear < 2000) return true;\n if (!budgetYear || budgetYear < 2000) return true;\n if (referenceYear === budgetYear) return true;\n\n return false;\n };\n\n onSave = () => {\n const { overrideBudget, referenceYear, budgetYear } = this.state;\n\n const { onSave } = this.props;\n\n const amountUpdate = {\n overrideBudget,\n referenceYear,\n budgetYear,\n };\n\n return onSave(amountUpdate);\n };\n\n toggleCheckbox = name => {\n if (!name) return;\n this.setState(({ [name]: oldValue }) => ({ [name]: !oldValue }));\n };\n\n referenceYearChanged = e => {\n const referenceYear = parseInt(e.target.value) || null;\n\n this.setState(({ budgetYear }) => ({\n referenceYear,\n budgetYear: budgetYear === referenceYear ? referenceYear + 1 : budgetYear,\n }));\n };\n budgetYearChanged = e => {\n const budgetYear = parseInt(e.target.value) || null;\n\n this.setState({\n budgetYear,\n });\n };\n\n render() {\n const { show, onClose, intl, year } = this.props;\n const { overrideBudget, referenceYear, budgetYear, years } = this.state;\n\n if (!show) return null;\n\n return (\n this.onSave()}\n >\n
    \n
    \n \n
    \n {year && year >= 2000 ? (\n \n

    {year}

    \n

    \n {intl.formatMessage(messages.CopyBudgetYearFilterInfo)}\n

    \n
    \n ) : (\n \n {years.map(y => (\n \n ))}\n \n )}\n
    \n
    \n
    \n \n
    \n this.setState({ budgetYear: parseInt(e.target.value) || null })}\n >\n {years\n .filter(y => y !== referenceYear)\n .map(y => (\n \n ))}\n \n
    \n
    \n\n
    \n this.setState({ overrideBudget: !overrideBudget })}\n text={intl.formatMessage(messages.OverrideIfBudgetExists)}\n />\n
    \n
    \n \n );\n }\n}\n","import React, { Component, Fragment } from 'react';\nimport PropTypes from 'prop-types';\nimport intlShape from '@/shared/utils/intlShape';\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport Checkbox from '@/shared/components/input/Checkbox';\nimport moment from 'moment';\nimport enumCache from '@/shared/services/EnumCacheService';\nimport utils from '@/shared/utils/adminpulse';\nimport FormattedCurrency from '@/shared/components/FormattedCurrency';\nimport messages from '../budgetMessages';\n\nconst currentYear = moment.utc().year();\nconst exampleAmount = 2500;\n\nexport default class UpdateBudgetAmountModal extends Component {\n state = {\n selectedUpdateMethod: 0,\n overrideBudget: false,\n referenceYear: currentYear - 1,\n budgetYear: currentYear,\n includeExForfait: false,\n amount: 0,\n selectedRoundingMethod: 0,\n roundingDecimals: 2,\n percentage: 0,\n };\n\n static propTypes = {\n show: PropTypes.bool.isRequired,\n intl: intlShape.isRequired,\n onSave: PropTypes.func.isRequired,\n onClose: PropTypes.func.isRequired,\n year: PropTypes.number, // Year from filters\n };\n static defaultProps = {\n year: null,\n };\n componentDidMount() {\n const { intl, year } = this.props;\n const budgetYear = year || moment.utc().year();\n const updateMethods = [\n {\n id: 0,\n label: intl.formatMessage(messages.NewAmount),\n },\n {\n id: 1,\n label: intl.formatMessage(messages.UseForfaitAmountAsBudgetAmount),\n },\n {\n id: 2,\n label: intl.formatMessage(messages.UseRegistrationAmountAsBudgetAmount),\n },\n {\n id: 3,\n label: intl.formatMessage(messages.UseInvoiceAmountAsBudgetAmount),\n },\n {\n id: 4,\n label: intl.formatMessage(messages.UseAdvanceAmountAsBudgetAmount),\n },\n {\n id: 5,\n label: intl.formatMessage(messages.AddOrSubtractPercentage),\n },\n ];\n\n Promise.all([enumCache.getTranslated('roundingMethod', intl)]).then(([roundingMethods]) => {\n const referenceYears = [budgetYear, budgetYear - 1, budgetYear - 2, budgetYear - 3];\n this.setState({\n referenceYear: budgetYear - 1,\n budgetYear,\n updateMethods,\n referenceYears,\n roundingMethods,\n });\n });\n }\n\n isFormInvalid = () => {\n const { referenceYear, selectedUpdateMethod, amount } = this.state;\n if (!referenceYear || referenceYear < 2000) return true;\n if (selectedUpdateMethod === 0 && (Number.isNaN(amount) || amount < 0)) return true;\n\n return false;\n };\n\n onSave = () => {\n const {\n overrideBudget,\n selectedUpdateMethod,\n referenceYear,\n budgetYear,\n includeExForfait,\n amount,\n selectedRoundingMethod,\n percentage,\n roundingDecimals,\n } = this.state;\n\n const { onSave } = this.props;\n\n const amountUpdate = {\n method: selectedUpdateMethod,\n overrideBudget,\n referenceYear,\n budgetYear,\n includeExForfait,\n roundingDecimals,\n amount,\n percentage,\n rounding: selectedRoundingMethod,\n };\n\n return onSave(amountUpdate);\n };\n\n methodChanged = e => {\n const value = parseInt(e.target.value);\n this.setState({ selectedUpdateMethod: value, includeExForfait: value === 2 });\n };\n\n toggleCheckbox = name => {\n if (!name) return;\n this.setState(({ [name]: oldValue }) => ({ [name]: !oldValue }));\n };\n\n amountChanged = e => {\n let value = Number.parseFloat(e.target.value);\n if (Number.isNaN(value)) {\n value = null;\n } else {\n value = Math.max(0, Math.min(99999999999.99, value));\n }\n\n return this.setState({ amount: value });\n };\n generateExample = () => {\n const { percentage, selectedRoundingMethod, roundingDecimals } = this.state;\n\n return utils.calculateIndexedAmount(\n Number.parseFloat(exampleAmount),\n 0,\n percentage,\n selectedRoundingMethod,\n roundingDecimals,\n );\n };\n render() {\n const { show, onClose, intl } = this.props;\n const {\n overrideBudget,\n selectedUpdateMethod,\n updateMethods,\n referenceYear,\n budgetYear,\n includeExForfait,\n amount,\n referenceYears,\n roundingMethods,\n selectedRoundingMethod,\n roundingDecimals,\n percentage,\n } = this.state;\n\n if (!show) return null;\n const generatedAmount = this.generateExample();\n\n return (\n this.onSave()}\n >\n
    \n
    \n \n
    \n {updateMethods && (\n \n {updateMethods.map(x => (\n \n ))}\n \n )}\n
    \n
    \n\n {selectedUpdateMethod !== 0 && selectedUpdateMethod !== 4 ? (\n
    \n \n
    \n this.setState({ referenceYear: parseInt(e.target.value) || null })}\n >\n {referenceYears.map(y => (\n \n ))}\n \n
    \n
    \n ) : null}\n\n {selectedUpdateMethod === 0 ? (\n
    \n \n
    \n \n
    \n
    \n ) : null}\n\n {selectedUpdateMethod === 5 && (\n <>\n
    \n \n
    \n
    \n \n this.setState({ percentage: Number.parseFloat(e.target.value) })\n }\n className=\"form-control\"\n />\n %\n
    \n
    \n
    \n\n
    \n \n
    \n {roundingMethods && (\n \n this.setState({ selectedRoundingMethod: parseInt(e.target.value) })\n }\n className=\"form-control\"\n value={selectedRoundingMethod}\n >\n {roundingMethods.map(item => (\n \n ))}\n \n )}\n
    \n
    \n
    \n \n
    \n
    \n this.setState({ roundingDecimals: parseInt(e.target.value) })}\n className=\"form-control\"\n min={0}\n max={5}\n value={roundingDecimals}\n />\n {intl.formatMessage(messages.Digits)}\n
    \n
    \n
    \n\n
    \n \n
    \n
    \n \n
    \n {!Number.isNaN(generatedAmount) && (\n \n )}\n
    \n
    \n
    \n \n )}\n {selectedUpdateMethod === 1 ? (\n
    \n this.toggleCheckbox('includeExForfait')}\n text={intl.formatMessage(messages.IncludeExForfaitRegistrations)}\n />\n
    \n ) : null}\n\n
    \n this.setState({ overrideBudget: !overrideBudget })}\n text={intl.formatMessage(messages.OverrideIfBudgetExists)}\n />\n
    \n
    \n \n );\n }\n}\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport intlShape from '@/shared/utils/intlShape';\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport Checkbox from '@/shared/components/input/Checkbox';\nimport moment from 'moment';\nimport messages from '../budgetMessages';\n\nconst currentYear = moment.utc().year();\n\nexport default class UpdateBudgetAmountModal extends Component {\n state = {\n selectedUpdateMethod: 0,\n overrideBudget: false,\n referenceYear: currentYear - 1,\n budgetYear: currentYear,\n hours: 0,\n };\n\n static propTypes = {\n show: PropTypes.bool.isRequired,\n intl: intlShape.isRequired,\n onSave: PropTypes.func.isRequired,\n onClose: PropTypes.func.isRequired,\n year: PropTypes.number, // Year from filters\n };\n static defaultProps = {\n year: null,\n };\n componentDidMount() {\n const { intl, year } = this.props;\n const budgetYear = year || moment.utc().year();\n const updateMethods = [\n {\n id: 0,\n label: intl.formatMessage(messages.NewQuantity),\n },\n\n {\n id: 1,\n label: intl.formatMessage(messages.UseRegistrationHoursForBudget),\n },\n ];\n\n const referenceYears = [budgetYear, budgetYear - 1, budgetYear - 2, budgetYear - 3];\n this.setState({ referenceYear: budgetYear - 1, budgetYear, updateMethods, referenceYears });\n }\n\n isFormInvalid = () => {\n const { referenceYear, selectedUpdateMethod, hours } = this.state;\n if (!referenceYear || referenceYear < 2000) return true;\n if (selectedUpdateMethod === 0 && (Number.isNaN(hours) || hours < 0)) return true;\n\n return false;\n };\n\n onSave = () => {\n const { overrideBudget, selectedUpdateMethod, referenceYear, budgetYear, hours } = this.state;\n\n const { onSave } = this.props;\n\n const amountUpdate = {\n method: selectedUpdateMethod,\n overrideBudget,\n referenceYear,\n budgetYear,\n hours,\n };\n\n return onSave(amountUpdate);\n };\n\n methodChanged = e => {\n const value = parseInt(e.target.value);\n this.setState({ selectedUpdateMethod: value });\n };\n\n toggleCheckbox = name => {\n if (!name) return;\n this.setState(({ [name]: oldValue }) => ({ [name]: !oldValue }));\n };\n\n render() {\n const { show, onClose, intl } = this.props;\n const {\n overrideBudget,\n selectedUpdateMethod,\n updateMethods,\n referenceYear,\n budgetYear,\n hours,\n referenceYears,\n } = this.state;\n\n if (!show) return null;\n\n return (\n this.onSave()}\n >\n
    \n
    \n \n
    \n {updateMethods && (\n \n {updateMethods.map(x => (\n \n ))}\n \n )}\n
    \n
    \n\n {selectedUpdateMethod !== 0 ? (\n
    \n \n
    \n this.setState({ referenceYear: parseInt(e.target.value) || null })}\n >\n {referenceYears.map(y => (\n \n ))}\n \n
    \n
    \n ) : null}\n\n {selectedUpdateMethod === 0 ? (\n
    \n \n
    \n this.setState({ hours: parseFloat(e.target.value) || null })}\n />\n
    \n
    \n ) : null}\n\n
    \n this.setState({ overrideBudget: !overrideBudget })}\n text={intl.formatMessage(messages.OverrideIfBudgetExists)}\n />\n
    \n
    \n \n );\n }\n}\n","import React, { useMemo } from 'react';\nimport PropTypes from 'prop-types';\nimport {\n Chart,\n LineElement,\n Legend,\n LinearScale,\n Tooltip,\n CategoryScale,\n PointElement,\n} from 'chart.js';\nimport { Line } from 'react-chartjs-2';\nimport moment from 'moment';\nimport annotationPlugin from 'chartjs-plugin-annotation';\nimport intlShape from '@/shared/utils/intlShape';\n\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport { numberTooltipLabel } from '@/shared/utils/chartjsHelpers';\nimport { useIntl } from 'react-intl';\nimport messages from './budgetMessages';\n\nChart.register(\n LineElement,\n Legend,\n LinearScale,\n Tooltip,\n CategoryScale,\n PointElement,\n annotationPlugin,\n);\n\nconst BigBudgetGraph = ({ data, budget, dataLabel, intl }) => {\n const [chartData, chartOptions] = useMemo(() => {\n if (!data) return [null, null];\n const cData = {\n labels: Array.from({ length: 12 }, (x, i) =>\n intl.formatMessage(\n listItemMsg(\n i + 1,\n 'month',\n moment()\n .month(i)\n .format('MMMM'),\n ),\n ),\n ),\n datasets: [\n {\n label: dataLabel,\n data,\n borderColor: '#0060ff',\n type: 'line',\n },\n ],\n };\n const budgetAnnotation = {\n type: 'line',\n yMin: budget,\n yMax: budget,\n label: { content: intl.formatMessage(messages.Budget) },\n borderColor: '#76a6af',\n borderDash: [6, 6],\n borderDashOffset: 0,\n drawTime: 'beforeDatasetsDraw',\n };\n const spreadAnnotation = {\n type: 'line',\n label: { content: intl.formatMessage(messages.BudgetSpreadOverPeriod) },\n borderColor: '#ffaa21',\n drawTime: 'beforeDatasetsDraw',\n yMin: 0,\n yMax: budget,\n };\n\n const cOptions = {\n scales: {\n x: {\n grid: { display: true },\n },\n y: {\n ticks: {\n beginAtZero: true,\n },\n },\n },\n\n plugins: {\n annotation: {\n annotations: {\n budgetAnnotation,\n spreadAnnotation,\n },\n },\n tooltip: {\n callbacks: {\n label: numberTooltipLabel,\n },\n },\n },\n };\n\n return [cData, cOptions];\n }, [data, budget, dataLabel, intl]);\n\n if (!data) return null;\n\n return (\n
    \n \n
    \n );\n};\n\nBigBudgetGraph.propTypes = {\n data: PropTypes.arrayOf(PropTypes.number),\n budget: PropTypes.number,\n dataLabel: PropTypes.string.isRequired,\n intl: intlShape.isRequired,\n};\nBigBudgetGraph.defaultProps = {\n data: [],\n budget: 0,\n};\nexport default BigBudgetGraph;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage, injectIntl } from 'react-intl';\nimport Axios from 'axios';\nimport ScrollableTable from '@/shared/components/table/ScrollableTable';\nimport intlShape from '@/shared/utils/intlShape';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport SignalRService from '@/shared/services/SignalRService';\nimport { FaCog, FaFileExcel } from 'react-icons/fa';\nimport moment from 'moment';\nimport ColumnHeader from '@/shared/components/table/ColumnHeader';\nimport SimplePanel from '@/shared/components/SimplePanel';\nimport ZendeskHelp from '@/shared/components/ZendeskHelp';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport ToastrService from '@/shared/services/ToastrService';\nimport authService, { privileges } from '@/shared/services/AuthService';\nimport YesNoModal from '@/shared/components/YesNoModal';\nimport Checkbox from '@/shared/components/input/Checkbox';\nimport Button from '@/shared/components/Button';\nimport { injectStateService, StateService } from '@/shared/services/StateService';\nimport CheckboxListModal from '@/shared/components/CheckboxListModal';\nimport {\n handleHiddenColumnsSelection,\n initHiddenColumnsState,\n} from '@/shared/utils/hiddenColumnsHelper';\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport userStorage from '@/shared/services/userStorage';\nimport { CanRead } from '@/shared/components/security';\nimport BudgetOverviewFilters, { defaultFilters } from './BudgetOverviewFilters';\nimport messages from './budgetMessages';\nimport BudgetRow from './BudgetRow';\nimport { hasAssignments } from '../../../shared/components/security/HasAssignments';\nimport { clearBudget, mapBudgetOverview, noActuals } from './budgetHelpers';\nimport GlobalActionsButton from './GlobalActionsButton';\nimport CopyBudgetModal from './modals/CopyBudgetModal';\nimport UpdateBudgetAmountModal from './modals/UpdateBudgetAmountModal';\nimport UpdateBudgetHoursModal from './modals/UpdateBudgetHoursModal';\nimport BigBudgetGraph from './BigBudgetGraph';\n\nconst columnSelectionStorageKey = 'BudgetOverviewColumns';\n\nconst columnDefinitions = [\n { id: 'budgetAmount', message: messages.BudgetAmount, visibleByDefault: true },\n { id: 'actualAmount', message: messages.ActualAmount, visibleByDefault: true },\n { id: 'remainingAmount', message: messages.RemainingAmount, visibleByDefault: false },\n { id: 'budgetAmountUsedPct', message: messages.BudgetAmountUsedPct, visibleByDefault: true },\n { id: 'budgetHours', message: messages.BudgetHours, visibleByDefault: true },\n { id: 'actualHours', message: messages.ActualHours, visibleByDefault: true },\n { id: 'remainingHours', message: messages.RemainingHours, visibleByDefault: false },\n { id: 'budgetHoursUsedPct', message: messages.BudgetHoursUsedPct, visibleByDefault: true },\n];\n\nclass BudgetOverviewContainer extends Component {\n constructor(props) {\n super(props);\n const { searchParams = {} } = props;\n\n const { budgetFilters: sessionFilters = {}, ...sessionParams } =\n JSON.parse(sessionStorage.getItem('BudgetOverviewParams')) || {};\n this.state = {\n allSelected: false,\n items: [],\n initialSearchParams: {\n // Set default filters\n sortKey: 'relation.displayName, periodFrom',\n pageSize: 50,\n desc: false,\n budgetFilters: {\n ...defaultFilters,\n ...sessionFilters,\n ...searchParams,\n },\n // Override with session storage params\n ...sessionParams,\n },\n itemToDelete: null,\n showUpdateBudgetHoursModal: false,\n showUpdateBudgetAmountModal: false,\n showCopyBudgetModal: false,\n graphModalData: null,\n showColumnSelectionModal: false,\n columnStatus: {},\n };\n const { hideableColumns, columnStatus } = initHiddenColumnsState(\n columnSelectionStorageKey,\n columnDefinitions,\n props.intl,\n );\n this.state.hideableColumns = hideableColumns;\n this.state.columnStatus = columnStatus;\n }\n\n componentDidMount() {\n SignalRService.subscribe('jobUpdated', this.jobUpdateHandler);\n }\n\n componentWillUnmount() {\n SignalRService.unsubscribe('jobUpdated', this.jobUpdateHandler);\n if (typeof this.searchToken !== 'undefined') {\n this.searchToken.cancel('Operation canceled due to leaving page.');\n }\n }\n\n loadItems = searchParams => {\n if (typeof this.searchToken !== 'undefined') {\n this.searchToken.cancel('Operation canceled due to new request.');\n }\n this.searchToken = Axios.CancelToken.source();\n\n sessionStorage.setItem(\n 'BudgetOverviewParams',\n JSON.stringify({\n desc: searchParams.desc,\n sortKey: searchParams.sortKey,\n budgetFilters: searchParams.budgetFilters,\n }),\n );\n\n const body = {\n ...searchParams.budgetFilters,\n };\n\n return api.base\n .post('/api/budget/overview', body, {\n params: {\n desc: searchParams.desc,\n sort: searchParams.sortKey,\n page: searchParams.page,\n take: searchParams.pageSize,\n },\n cancelToken: this.searchToken.token,\n })\n .then(({ data }) => {\n const { allSelected } = this.state;\n const newLines = data.map(x => mapBudgetOverview(x, allSelected));\n\n this.setState(state => ({\n items: searchParams.page > 0 ? [...state.items, ...newLines] : [...newLines],\n currentSearchParams: searchParams,\n }));\n\n return newLines;\n })\n .catch(error => {\n if (!Axios.isCancel(error)) return error;\n });\n };\n\n filtersChanged = filters => {\n this.setState(state => ({\n ...state,\n initialSearchParams: {\n ...state.initialSearchParams,\n page: 0,\n budgetFilters: filters,\n },\n }));\n };\n\n onUpdateBudget = updateViewModel => {\n const { intl } = this.props;\n\n return api.base.put(`${config.appUrls.api}/api/budget/`, updateViewModel).then(({ data }) => {\n ToastrService.changesSaved(intl);\n this.setState(({ items }) => ({\n items: items.map(x => {\n if (x.invoiceStream.id === data.invoiceStreamId) {\n return { ...x, budget: { ...x.budget, ...noActuals(data) } };\n }\n return x;\n }),\n }));\n }, handleHttpError(intl));\n };\n onDeleteBudget = e => this.setState({ itemToDelete: e });\n\n doDelete = () => {\n const { itemToDelete } = this.state;\n const { intl } = this.props;\n api.base.delete(`${config.appUrls.api}/api/Budget/${itemToDelete.budget.id}`).then(() => {\n ToastrService.success();\n this.setState(\n ({ items, initialSearchParams: { budgetFilters: { withBudget = null } = {} } = {} }) => ({\n items:\n withBudget === true\n ? items.filter(\n x =>\n x.invoiceStream.id !== itemToDelete.invoiceStream.id &&\n (x.budget === null || x.budget.id !== itemToDelete.budget.id),\n )\n : items.map(x => {\n if (x.invoiceStream.id !== itemToDelete.invoiceStream.id) return x;\n if (x.budget === null || x.budget.id !== itemToDelete.budget.id) return x;\n return {\n ...x,\n budget: clearBudget(x.budget),\n amountPerMonth: null,\n hoursPerMonth: null,\n }; // Clear budget but keep invoice stream in list\n }),\n itemToDelete: null,\n }),\n );\n }, handleHttpError(intl));\n };\n\n isGlobalActionsDisabled = () => {\n const { items, allSelected } = this.state;\n if (!items || !items.length) return true;\n if (allSelected || items.some(x => x.selected)) return false;\n\n return true;\n };\n handleSelectAll = () => {\n this.setState(({ items, allSelected }) => ({\n allSelected: !allSelected,\n items: items.map(x => (x.selected !== allSelected ? x : { ...x, selected: !allSelected })),\n }));\n };\n handleSelect = invoiceStreamId => {\n if (!invoiceStreamId) return;\n this.setState(({ items }) => ({\n items: items.map(x =>\n x.invoiceStream.id === invoiceStreamId\n ? {\n ...x,\n selected: !x.selected,\n }\n : x,\n ),\n }));\n };\n\n getCountSelectedRowsFormatted() {\n const { allSelected, items } = this.state;\n const { intl } = this.props;\n if (allSelected) {\n return intl.formatMessage(messages.AllBudgetsSelected);\n }\n\n const count = items ? items.filter(x => x.selected === true).length : 0;\n return intl.formatMessage(messages.CountBudgetsSelected, { count });\n }\n\n getInvoiceStreamSelection = () => {\n const { items, allSelected } = this.state;\n\n // Get all ids that don't match the select all checkbox\n const invoiceStreamIds = items\n ? items\n .filter(x => x.selected !== allSelected && x.invoiceStream && x.invoiceStream.id)\n .map(x => x.invoiceStream.id)\n : [];\n\n return {\n invoiceStreamIds,\n selectAll: allSelected,\n };\n };\n getBudgetFilters = () => {\n const { currentSearchParams, initialSearchParams } = this.state;\n const budgetFilters =\n (currentSearchParams && currentSearchParams.budgetFilters) ||\n (initialSearchParams && initialSearchParams.budgetFilters) ||\n {};\n\n return {\n ...budgetFilters,\n };\n };\n\n updateInvoiceStreamAmountBatch = viewModel => {\n const selection = this.getInvoiceStreamSelection();\n const { currentSearchParams } = this.state;\n const currentFilters = currentSearchParams.budgetFilters;\n\n const bodyParams = {\n ...selection,\n ...viewModel,\n filters: currentFilters,\n };\n\n const { stateService, intl } = this.props;\n return api.base\n .post(`${config.appUrls.api}/api/budget/BatchUpdateBudget`, bodyParams)\n .then(({ data }) => {\n this.setState({ showUpdateBudgetAmountModal: false });\n\n const onClick = data ? () => stateService.gotoJob(data.id) : undefined;\n\n ToastrService.info(intl.formatMessage(messages.GlobalActionStarted), undefined, onClick);\n })\n .catch(handleHttpError(intl));\n };\n updateInvoiceStreamHoursBatch = viewModel => {\n const selection = this.getInvoiceStreamSelection();\n const { currentSearchParams } = this.state;\n const currentFilters = currentSearchParams.budgetFilters;\n\n const bodyParams = {\n ...selection,\n ...viewModel,\n filters: currentFilters,\n };\n\n const { stateService, intl } = this.props;\n return api.base\n .post(`${config.appUrls.api}/api/budget/BatchUpdateBudgetHours`, bodyParams)\n .then(({ data }) => {\n this.setState({ showUpdateBudgetHoursModal: false });\n\n const onClick = data ? () => stateService.gotoJob(data.id) : undefined;\n\n ToastrService.info(intl.formatMessage(messages.GlobalActionStarted), undefined, onClick);\n })\n .catch(handleHttpError(intl));\n };\n copyBudgetBatch = viewModel => {\n const selection = this.getInvoiceStreamSelection();\n const { currentSearchParams } = this.state;\n const currentFilters = currentSearchParams.budgetFilters;\n\n const bodyParams = {\n ...selection,\n ...viewModel,\n filters: currentFilters,\n };\n\n const { stateService, intl } = this.props;\n return api.base\n .post(`${config.appUrls.api}/api/budget/BatchCopyBudget`, bodyParams)\n .then(({ data }) => {\n this.setState({ showCopyBudgetModal: false });\n\n const onClick = data ? () => stateService.gotoJob(data.id) : undefined;\n\n ToastrService.info(intl.formatMessage(messages.GlobalActionStarted), undefined, onClick);\n })\n .catch(handleHttpError(intl));\n };\n\n getColumns = () => {\n const { budgets, initialSearchParams: { columns = [] } = {} } = this.state;\n return columns.length ? budgets.filter(x => columns.indexOf(x.id) >= 0) : budgets;\n };\n\n createExcelReport = () => {\n const { intl } = this.props;\n const { currentSearchParams } = this.state;\n const languageCode = intl.locale;\n\n const currentFilters = this.getBudgetFilters();\n\n this.setState({ creatingReport: true });\n\n const connectionId = SignalRService.getConnectionId();\n\n return api.base\n .post(`${config.appUrls.api}/api/budget/Report`, currentFilters, {\n params: {\n connectionId,\n languageCode,\n desc: currentSearchParams.desc,\n sort: currentSearchParams.sortKey,\n },\n })\n .then(() => {\n this.setState({ creatingReport: false });\n ToastrService.info(intl.formatMessage(messages.ExportToExcelStarted));\n })\n .catch(error => {\n this.setState({ creatingReport: false });\n handleHttpError(intl)(error);\n });\n };\n jobUpdateHandler = job => {\n if ((job.jobType === 42 || job.jobType === 43) && (job.status === 2 || job.status === 3)) {\n this.setState(state => ({\n initialSearchParams: {\n ...state.initialSearchParams,\n page: 0,\n // forces refresh of table\n random: new Date().getTime(),\n },\n }));\n }\n };\n\n showBudgetGraphModal = (data, budget, year, isAmount) => {\n const { intl } = this.props;\n this.setState({\n graphModalData: {\n data,\n budget,\n label: `${intl.formatMessage(\n isAmount ? messages.ActualAmount : messages.ActualHours,\n )} - ${year}`,\n },\n showBudgetGraphModal: true,\n });\n };\n closeBudgetGraphModal = () => {\n this.setState({\n showBudgetGraphModal: false,\n graphModalData: null,\n });\n };\n getYearFromFilters = fallback => {\n const { initialSearchParams: { budgetFilters: { year } = {} } = {} } = this.state;\n if (year && year > 2000) return year;\n if (typeof fallback !== 'undefined') return fallback;\n\n return moment.utc().year();\n };\n\n handleColumnSelection = items => {\n this.setState(({ hideableColumns }) => ({\n ...handleHiddenColumnsSelection(items, hideableColumns, columnSelectionStorageKey),\n showColumnSelectionModal: false,\n }));\n };\n\n render() {\n const {\n items,\n initialSearchParams,\n itemToDelete,\n allSelected,\n showUpdateBudgetAmountModal,\n showUpdateBudgetHoursModal,\n showCopyBudgetModal,\n creatingReport,\n showBudgetGraphModal,\n graphModalData,\n showColumnSelectionModal,\n hideableColumns,\n columnStatus,\n } = this.state;\n const { intl, invoiceDialogsSvc, stateService } = this.props;\n const canUpdateBudget = authService.hasPermission({\n functionality: 'InvoiceDraft',\n privilege: privileges.Update,\n });\n const canViewAmounts = authService.hasPermission({\n functionality: 'pricelist',\n privilege: privileges.Read,\n });\n const showAssignments = hasAssignments();\n const hasData = items && items.length > 0;\n\n return (\n
    \n {showBudgetGraphModal && (\n \n
    \n
    \n \n
    \n
    \n \n )}\n {showUpdateBudgetAmountModal && (\n this.setState({ showUpdateBudgetAmountModal: false })}\n onSave={amountUpdate => this.updateInvoiceStreamAmountBatch(amountUpdate)}\n year={this.getYearFromFilters()}\n />\n )}\n {showUpdateBudgetHoursModal && (\n this.setState({ showUpdateBudgetHoursModal: false })}\n onSave={data => this.updateInvoiceStreamHoursBatch(data)}\n year={this.getYearFromFilters()}\n />\n )}\n {showCopyBudgetModal && (\n this.setState({ showCopyBudgetModal: false })}\n onSave={data => this.copyBudgetBatch(data)}\n year={this.getYearFromFilters(null)}\n />\n )}\n \n \n \n \n \n \n \n \n }\n >\n
    \n this.filtersChanged(filters)}\n countSelected={this.getCountSelectedRowsFormatted()}\n />\n
    \n \n
    \n
    \n this.setState({ showColumnSelectionModal: true })}\n >\n \n \n \n {intl.formatMessage(messages.ColumnConfig)}\n \n this.createExcelReport()}\n disabled={!hasData || creatingReport}\n >\n \n \n \n {intl.formatMessage(messages.ExportToExcel)}\n \n {canUpdateBudget ? (\n this.setState({ showUpdateBudgetAmountModal: true })}\n onUpdateBudgetHours={() => this.setState({ showUpdateBudgetHoursModal: true })}\n onCopyBudget={() => this.setState({ showCopyBudgetModal: true })}\n disabled={this.isGlobalActionsDisabled()}\n />\n ) : null}\n
    \n
    \n this.loadItems(searchParams)}\n initialSearchParams={initialSearchParams}\n items={items}\n renderRow={item => {\n const { columnStatus } = this.state;\n return (\n \n );\n }}\n noDataLabel={}\n >\n \n }\n />\n \n {showAssignments ? (\n \n ) : null}\n \n {canViewAmounts ? (\n \n ) : null}\n {canViewAmounts ? (\n \n ) : null}\n {canViewAmounts ? (\n \n ) : null}\n {canViewAmounts ? (\n \n ) : null}\n {/* Graph */}\n {canViewAmounts ? (\n \n ) : null}\n \n \n \n \n {/* Graph */}\n \n \n \n\n {itemToDelete ? (\n this.setState({ itemToDelete: null })}\n onSave={this.doDelete}\n />\n ) : null}\n\n {showColumnSelectionModal && (\n this.setState({ showColumnSelectionModal: false })}\n show={showColumnSelectionModal}\n sortByLabel={false}\n />\n )}\n
    \n );\n }\n}\n\nBudgetOverviewContainer.propTypes = {\n intl: intlShape.isRequired,\n searchParams: PropTypes.shape({}),\n stateService: PropTypes.instanceOf(StateService).isRequired,\n};\nBudgetOverviewContainer.defaultProps = {\n searchParams: null,\n};\nexport default injectStateService(injectIntl(BudgetOverviewContainer));\n","import { defineMessages } from 'react-intl';\n\nconst messages = defineMessages({\n RelationStartDateFrom: 'Start date relation from',\n RelationStartDateUntil: 'Start date relation until',\n Relation: 'Relation',\n Assignment: 'Assignment',\n DefaultAssignment: 'Default assignment',\n InvoiceSchedule: 'Invoice schedule',\n Amount: 'Amount',\n FixedAmountRegistrationMethod: 'FixedAmountRegistrationMethod',\n AdvanceRegistrationMethod: 'AdvanceRegistrationMethod',\n PriceGrid: 'Price grid',\n NoRelationsFound: 'No relations found',\n NoInvoiceSchedule: 'No invoice schedule',\n CountRelationsSelected: 'Selected {count} / {total} relations',\n ResetFilters: 'Reset filters',\n Unassigned: 'Unassigned',\n SearchRelations: 'Search relations',\n SelectPriceGrid: 'Select a price grid',\n WithLabels: 'With labels',\n WithoutLabels: 'Without labels',\n InvoiceSchedules: 'Invoice schedules',\n NoInvoicingSchedule: 'No invoicing schedule',\n AmountFrom: 'Amount from',\n AmountTo: 'Amount to',\n WithInvoicingSchedule: 'With invoicing schedule',\n UpdateAmount: 'Update amount',\n UpdateInvoiceStreamAmountConfirmation:\n 'This invoice schedule has schedule lines that were manually changed. Do you want to override these changes with the new amount?',\n MsgConfirmChange: 'Changes saved.',\n GlobalActions: 'Global actions',\n RelationGlobalActionsTooltip:\n 'Select one or more relations to execute a global action on these relations.',\n SetInvoiceScheduleQueued:\n 'Invoice schedules for the selected relations will be added shortly. Click here to view its progress.',\n SetInvoiceSchedule: 'Set invoice schedule',\n Default: 'Default',\n OverrideManualInvoiceStreamScheduleChanges:\n 'Override manual amount changes of certain invoice schedule lines.',\n GlobalActionStarted: 'Global action started.',\n Method: 'Method',\n Percentage: 'Percentage',\n InvoiceScheduleOverview: 'Invoice schedule overview',\n ExportToExcel: 'Export to Excel',\n Relations: 'Relations',\n InvoicingVia: 'Invoicing via',\n InvoicingViaRelations: 'Invoicing via relations',\n UpdateInvoiceStreamAmountWarning:\n 'Attention: this change only applies to the fixed amounts and advances. And therefore has no effect on hourly rates and registration based invoicing!',\n UpdatePriceGrid: 'Update price grid',\n RoundingMethod: 'Rounding method',\n RoundTo: 'Round to',\n Digits: 'Digits',\n Example: 'Example',\n VatPeriodicity: 'Vat periodicity',\n EmptyVATPeriodicity: 'Empty vat periodicity',\n SendEmail: 'Send email',\n UpdatePriceGridOnSelectedRelations: 'Update price grid on selected relation',\n UpdatePriceGridOnSelectedInvoiceStreams: 'Update price grid on selected invoice schedules',\n UseRelationSetting: 'Use relation setting',\n AlsoResetPriceGridOnSelectedInvoiceStreams:\n 'Also reset the price grid on the selected invoice schedules to use the relation setting.',\n ExportToExcelStarted: 'Export to Excel started',\n UpdateInvoiceStreamUser: 'Update invoice stream user',\n\n UpdateUserForSelectedRelations: 'Update user for selected relations',\n UpdateUserForSelectedInvoiceStreams: 'Update user for selected invoice schedules',\n AlsoResetUserForSelectedInvoiceStreams:\n 'Also reset the user for the selected invoice schedules to use the relation setting.',\n\n UpdateUserInPlannedTasks: 'Do you also want to update the assigned user in tasks?',\n RelationUserIsUnassignedWhichUserDoYouWantToAssignToTasks:\n 'You set the relation user to unassigned, which user should we use for updating the assigned user in the tasks?',\n\n SelectAField: 'Select a field',\n SelectYourFilters: 'Select your filters',\n MoreFilters: 'More filters',\n SelectAll: 'Select all',\n IncludeInactiveRelations: 'Show inactive',\n\n ReprocessInvoiceStreamSchedules: 'Recreate draft invoices for processed invoice schedules',\n ProcessNextInvoiceStreamSchedule: 'Run next planning invoice schedules',\n InvoiceScheduleLine: 'Schedule line',\n InvoiceCreationDate: 'Invoice creation date',\n BatchProcessNextScheduleConfirm:\n 'Are you sure you want to execute the next invoice planning line for all {count} selected relations?',\n});\n\nexport default messages;\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport { FormattedMessage } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport RelationName from '@/shared/components/RelationName';\nimport FormattedListValue from '@/shared/components/FormattedListValue';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport EditableCurrency from '@/shared/components/editable/EditableCurrency';\nimport authService, { privileges } from '@/shared/services/AuthService';\nimport { mapInvoiceStreamName } from '@/shared/services/ObjectDisplayService';\nimport EditableSelect from '@/shared/components/editable/EditableSelect';\nimport messages from './invoiceStreamMessages';\nimport Checkbox from '../../../shared/components/input/Checkbox';\nimport { CanRead } from '../../../shared/components/security';\n\nconst InvoiceStreamRow = ({\n invoiceStream,\n intl,\n handleSelect,\n onUpdateAmount,\n showAssignments,\n priceGrids,\n onUpdatePriceGrid,\n invoiceDialogsSvc,\n}) => {\n const canUpdateRelation = authService.hasPermission({\n functionality: 'relation',\n privilege: privileges.Update,\n });\n return (\n \n \n \n handleSelect(invoiceStream)} value={invoiceStream.selected} />\n \n \n \n \n {showAssignments && {mapInvoiceStreamName(invoiceStream, intl)}}\n\n {invoiceStream.viaRelation ? (\n \n \n \n \n  \n \n \n ) : (\n \n {invoiceStream.invoiceScheduleId ? (\n \n ) : (\n \n )}\n \n )}\n \n {(invoiceStream.invoicingType === 1 || invoiceStream.invoicingType === 2) && (\n onUpdateAmount({ ...invoiceStream, amount: val })}\n readOnly={!canUpdateRelation}\n />\n )}\n \n \n {invoiceStream.invoicingType === 1 &&\n (invoiceStream.fixedAmountRegistrationMethod !== null ? (\n \n ) : (\n \n ))}\n \n \n {invoiceStream.invoicingType === 2 &&\n (invoiceStream.advanceRegistrationMethod !== null ? (\n \n ) : (\n \n ))}\n \n \n onUpdatePriceGrid(priceGridId)}\n displayValue={\n invoiceStream.priceGrid === 'Default'\n ? intl.formatMessage(messages.Default)\n : invoiceStream.priceGrid\n }\n options={priceGrids}\n bindToId\n required\n readOnly={!canUpdateRelation}\n class=\"form-control input-sm\"\n />\n \n \n \n \n invoiceDialogsSvc.showInvoicingHistory(\n invoiceStream.id,\n null,\n invoiceStream.relation.id,\n )\n }\n >\n \n \n \n \n \n \n );\n};\n\nInvoiceStreamRow.propTypes = {\n invoiceStream: PropTypes.shape({}).isRequired,\n handleSelect: PropTypes.func.isRequired,\n onUpdateAmount: PropTypes.func.isRequired,\n showAssignments: PropTypes.bool,\n\n intl: intlShape.isRequired,\n};\nInvoiceStreamRow.defaultProps = {\n showAssignments: false,\n};\n\nexport default InvoiceStreamRow;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport DropdownButton from 'react-bootstrap/lib/DropdownButton';\nimport MenuItem from 'react-bootstrap/lib/MenuItem';\nimport { injectIntl } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport messages from './invoiceStreamMessages';\nimport MenuItemWithSecurity from '@/shared/components/MenuItemWithSecurity';\nimport { functionalities, privileges } from '@/shared/services/AuthService';\n\nconst InvoiceStreamGlobalActionsButton = props => {\n const {\n intl,\n disabled,\n onSetInvoiceSchedule,\n onUpdateAmount,\n onUpdatePriceGrid,\n onSendEmail,\n onUpdateUser,\n onReprocessSchedule,\n onProcessNextSchedule,\n } = props;\n\n return (\n \n \n \n {intl.formatMessage(messages.SetInvoiceSchedule)}\n \n \n {intl.formatMessage(messages.UpdateAmount)}\n \n \n {intl.formatMessage(messages.UpdatePriceGrid)}\n \n \n {intl.formatMessage(messages.UpdateInvoiceStreamUser)}\n \n \n {intl.formatMessage(messages.SendEmail)}\n \n\n \n {intl.formatMessage(messages.ReprocessInvoiceStreamSchedules)}\n \n \n {intl.formatMessage(messages.ProcessNextInvoiceStreamSchedule)}\n \n \n \n );\n};\n\nInvoiceStreamGlobalActionsButton.propTypes = {\n intl: intlShape.isRequired,\n onSetInvoiceSchedule: PropTypes.func.isRequired,\n onUpdateAmount: PropTypes.func.isRequired,\n onUpdatePriceGrid: PropTypes.func.isRequired,\n onUpdateUser: PropTypes.func.isRequired,\n onReprocessSchedule: PropTypes.func.isRequired,\n onProcessNextSchedule: PropTypes.func.isRequired,\n disabled: PropTypes.bool,\n};\n\nInvoiceStreamGlobalActionsButton.defaultProps = { disabled: false };\n\nexport default injectIntl(InvoiceStreamGlobalActionsButton);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage, injectIntl } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport classnames from 'classnames';\nimport { FaUndo, FaFilter } from 'react-icons/fa';\nimport UserSearch from '@/shared/components/input/UserSearch';\nimport RelationTypeIcon from '@/shared/components/RelationTypeIcon';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport MultiSelect from '@/shared/components/input/multiselect/MultiSelect';\nimport CompanyMultiSelect from '@/shared/components/input/multiselect/CompanyMultiSelect';\nimport config from '@/config';\nimport isEqual from 'lodash-es/isEqual';\nimport DelayedDateRangePicker from '@/shared/components/input/DelayedDateRangePicker';\nimport api from '@/shared/api';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport { hasMultipleCompanies } from '@/shared/components/security/HasMultiCompany';\nimport AutoComplete from '@/shared/components/input/select/AutoComplete';\nimport RelationSearch from '@/shared/components/input/RelationSearch';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport AssignmentTemplateSelector from '@/shared/components/input/AssignmentTemplateSelector';\nimport EnumMultiSelect from '@/shared/components/input/multiselect/EnumMultiSelect';\nimport InvoiceScheduleTypeMultiSelect from '@/shared/components/input/multiselect/InvoiceScheduleTypeMultiSelect';\nimport guid from '@/shared/utils/guid';\nimport EndFiscalYearMultiSelect from '@/shared/components/input/multiselect/EndFiscalYearMultiSelect';\nimport messages from './invoiceStreamMessages';\nimport RelationGroupMultiSelect from '@/shared/components/input/multiselect/RelationGroupMultiSelect';\nimport employeeProfileMessages from '@/shared/messages/employeeProfileMessages';\nimport momentPropTypes from 'react-moment-proptypes';\nimport moment from 'moment';\nimport DynamicFilter, {\n getDynamicFiltersFromDefaultFilters,\n initDynamicFilters,\n} from '@/shared/components/DynamicFilter';\nimport { Dropdown } from 'react-bootstrap';\nimport CheckboxDropdownMenu from '@/shared/components/input/CheckboxDropdownMenu';\nimport userStorage from '@/shared/services/userStorage';\nimport Toggle from 'react-toggle';\n\nconst dynamicFiltersStorageKey = 'InvoiceStreamDynamicFilters';\n\nexport const defaultInvoiceStreamFilters = {\n priceGridId: null,\n associate: null, // UserId\n amountFrom: '',\n amountTo: '',\n assistant: null, // UserId\n assistantBackup: null, // UserId\n responsible: null, // UserId\n billingUser: null, // UserId\n seniorUser: null, // UserId\n relationId: null, // String\n relationName: null,\n type: [], // Array\n includeInactive: false,\n withLabels: [], // Array\n withoutLabels: [], // Array,\n ownCompanies: [],\n assignmentTemplateId: null,\n vatPeriodicities: [],\n invoiceScheduleTypes: [],\n endFiscalYears: [],\n filterBehaviours: {\n withLabels: 1,\n },\n relationGroups: [],\n relationStartDateFrom: null,\n relationStartDateUntil: null,\n};\n\nconst allDynamicFilters = [...getDynamicFiltersFromDefaultFilters(defaultInvoiceStreamFilters, 'relationTypes'),\n{ id: 'includeInactive', label: messages.IncludeInactiveRelations },\n{ id: 'priceGridId', label: messages.PriceGrid },\n{ id: 'amountFrom', label: messages.AmountFrom },\n{ id: 'relationStartDateFrom', label: messages.RelationStartDateFrom }\n];\n\nclass InvoiceStreamFilters extends Component {\n state = {\n amountFrom: null,\n amountTo: null,\n labels: [],\n dynamicFilters: []\n };\n\n static propTypes = {\n onFilterChange: PropTypes.func.isRequired,\n filters: PropTypes.shape({\n responsible: PropTypes.string,\n assistant: PropTypes.string,\n assistantBackup: PropTypes.string,\n associate: PropTypes.string,\n billingUser: PropTypes.string,\n seniorUser: PropTypes.string,\n relationId: PropTypes.string,\n relationName: PropTypes.string,\n includeInactive: PropTypes.bool,\n type: PropTypes.arrayOf(PropTypes.number),\n crmTypes: PropTypes.arrayOf(PropTypes.number),\n legalForms: PropTypes.arrayOf(PropTypes.number),\n withLabels: PropTypes.arrayOf(PropTypes.string),\n withoutLabels: PropTypes.arrayOf(PropTypes.string),\n amountFrom: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n amountTo: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n linkType: PropTypes.number,\n ownCompanies: PropTypes.arrayOf(PropTypes.string),\n assignmentTemplateId: PropTypes.string,\n vatPeriodicities: PropTypes.arrayOf(PropTypes.number),\n invoiceScheduleTypes: PropTypes.arrayOf(PropTypes.string),\n endFiscalYears: PropTypes.arrayOf(PropTypes.string),\n relationGroups: PropTypes.arrayOf(PropTypes.string),\n relationStartDateFrom: PropTypes.oneOfType([PropTypes.string, momentPropTypes.momentObj]),\n relationStartDateUntil: PropTypes.oneOfType([PropTypes.string, momentPropTypes.momentObj]),\n }),\n intl: intlShape.isRequired,\n countSelectedRelations: PropTypes.string.isRequired,\n };\n\n static defaultProps = {\n filters: defaultInvoiceStreamFilters,\n };\n\n constructor(props) {\n super(props);\n const { filters } = props;\n this.state.amountFrom =\n !filters.amountFrom && filters.amountFrom !== 0 ? '' : `${filters.amountFrom}`;\n this.state.amountTo = !filters.amountTo && filters.amountTo !== 0 ? '' : `${filters.amountTo}`;\n }\n\n componentDidMount() {\n const { intl, filters } = this.props;\n this.assignmentsEnabled = DataCacheService.assignmentsEnabled();\n const labelPromise = api.base.get(`${config.appUrls.api}/api/Resource/Tags`);\n\n Promise.all([labelPromise]).then(([{ data: labels }]) => {\n this.setState({\n labels: labels\n .map(x => ({ id: x.id, label: x.name, sort: x.name.toLowerCase() }))\n .sort(dynamicSort('sort')),\n dynamicFilters: initDynamicFilters(\n intl,\n allDynamicFilters,\n userStorage.getItem(dynamicFiltersStorageKey) || [],\n filters,\n defaultInvoiceStreamFilters,\n )\n });\n });\n\n }\n\n dynamicFilterChanged = (item, selected) => {\n const { dynamicFilters } = this.state;\n const { filters } = this.props;\n\n const newFilters = dynamicFilters.map(x => {\n if (x.id !== item.id && item.id !== 'selectall') return x;\n return { ...x, selected };\n });\n\n userStorage.setItem(\n dynamicFiltersStorageKey,\n newFilters.filter(x => x.selected).map(x => x.id),\n );\n this.setState({\n dynamicFilters: newFilters,\n });\n\n if (!selected && JSON.stringify(filters[item.id]) !== JSON.stringify(defaultInvoiceStreamFilters[item.id])) {\n // Reset filter when it's removed\n this.filterChanged({ [item.id]: defaultInvoiceStreamFilters[item.id] });\n }\n };\n\n filterChanged = filter => {\n const { filters, onFilterChange } = this.props;\n const newFilters = { ...filters, ...filter };\n\n if (!isEqual(filters, newFilters)) {\n onFilterChange(newFilters);\n }\n };\n\n filterRelationTypes = relType => {\n const { filters = {} } = this.props;\n const types = filters.type || [];\n\n const idx = types.indexOf(relType);\n if (idx >= 0) {\n this.filterChanged({ type: types.filter((_, i) => i !== idx) });\n } else {\n this.filterChanged({ type: [...types, relType] });\n }\n };\n\n filterCrmTypes = crmType => {\n const { filters = {} } = this.props;\n const types = filters.crmTypes || [];\n\n const idx = types.indexOf(crmType);\n if (idx >= 0) {\n this.filterChanged({ crmTypes: types.filter((_, i) => i !== idx) });\n } else {\n this.filterChanged({ crmTypes: [...types, crmType] });\n }\n };\n\n withLabelsFilterRemoved = item => {\n const { filters } = this.props;\n const { withLabels } = filters;\n const index = withLabels.findIndex(x => x === item.value.label);\n\n const copy = [...withLabels];\n copy.splice(index, 1);\n\n this.filterChanged({ withLabels: copy });\n };\n\n withLabelsFilterAdded = selectedItem => {\n if (!selectedItem) return;\n\n const { filters } = this.props;\n const { withLabels } = filters;\n\n if (!withLabels) {\n this.filterChanged({\n withLabels: [selectedItem.label],\n });\n } else {\n if (withLabels.includes(selectedItem.label)) return;\n this.filterChanged({\n withLabels: [...withLabels, selectedItem.label],\n });\n }\n };\n\n withoutLabelsFilterRemoved = item => {\n const { filters } = this.props;\n const { withoutLabels } = filters;\n const index = withoutLabels.findIndex(x => x === item.value.label);\n\n const copy = [...withoutLabels];\n copy.splice(index, 1);\n\n this.filterChanged({ withoutLabels: copy });\n };\n\n withoutLabelsFilterAdded = selectedItem => {\n if (!selectedItem) return;\n\n const { filters } = this.props;\n const { withoutLabels } = filters;\n\n if (!withoutLabels) {\n this.filterChanged({\n withoutLabels: [selectedItem.label],\n });\n } else {\n if (withoutLabels.includes(selectedItem.label)) return;\n this.filterChanged({\n withoutLabels: [...withoutLabels, selectedItem.label],\n });\n }\n };\n\n getRelationTypes = () => {\n const { intl } = this.props;\n return [\n {\n id: 0,\n label: intl.formatMessage(listItemMsg('relationtype', 0, 'Company')),\n },\n {\n id: 1,\n label: intl.formatMessage(listItemMsg('relationtype', 1, 'SoleProprietor')),\n },\n {\n id: 2,\n label: intl.formatMessage(listItemMsg('relationtype', 2, 'Person')),\n },\n ];\n };\n\n handleAmountBlur = amountToOrFrom => {\n const { amountFrom, amountTo } = this.state;\n if (amountToOrFrom === 'amountFrom') {\n this.filterChanged({\n amountFrom,\n });\n }\n\n if (amountToOrFrom === 'amountTo') {\n this.filterChanged({\n amountTo,\n });\n }\n };\n\n handleAmountKeyDown = (e, amountToOrFrom) => {\n const { filters } = this.props;\n // Escape\n if (e.keyCode === 27) {\n e.preventDefault();\n e.stopPropagation();\n\n if (e.nativeEvent) e.nativeEvent.stopImmediatePropagation();\n if (amountToOrFrom === 'amountFrom') {\n this.setState({ amountFrom: filters.amountFrom });\n }\n\n if (amountToOrFrom === 'amountTo') {\n this.setState({ amountTo: filters.amountTo });\n }\n }\n // Enter\n else if (e.keyCode === 13) {\n e.preventDefault();\n e.stopPropagation();\n if (e.nativeEvent) e.nativeEvent.stopImmediatePropagation();\n this.handleAmountBlur(amountToOrFrom);\n }\n };\n\n resetFilters = () => {\n const { onFilterChange } = this.props;\n this.setState({ amountFrom: '', amountTo: '' }, () => {\n onFilterChange(defaultInvoiceStreamFilters);\n });\n };\n\n relationChanged = item => {\n if (!item || !item.id) {\n this.filterChanged({ relationId: null, relationName: null });\n } else {\n this.filterChanged({\n relationId: item.key,\n relationName: item.label,\n });\n }\n };\n\n renderDynamicFilter = ({ type, filters, intl }) => {\n switch (type) {\n case 'priceGridId': {\n const { intl, priceGrids } = this.props;\n const selectedPriceGrid = filters.priceGridId\n ? priceGrids.find(x => x.key === filters.priceGridId)\n : null;\n return (\n
    \n
    \n \n this.filterChanged({\n priceGridId: e && e.key ? e.key : null,\n })\n }\n onClear={() => this.filterChanged({ priceGridId: null })}\n value={selectedPriceGrid}\n items={priceGrids}\n placeholder={intl.formatMessage(messages.PriceGrid)}\n mode=\"edit\"\n />\n
    \n
    \n );\n }\n case 'relationStartDateFrom': {\n const relationStartDateFrom =\n typeof filters.relationStartDateFrom === 'string'\n ? moment.utc(filters.relationStartDateFrom)\n : filters.relationStartDateFrom;\n const relationStartDateUntil =\n typeof filters.relationStartDateUntil === 'string'\n ? moment.utc(filters.relationStartDateUntil)\n : filters.relationStartDateUntil;\n return (\n
    \n
    \n \n this.filterChanged({\n relationStartDateFrom: startDate?.format('YYYY-MM-DD'),\n relationStartDateUntil: endDate?.format('YYYY-MM-DD'),\n })\n }\n startDatePlaceholderText={intl.formatMessage(messages.RelationStartDateFrom)}\n endDatePlaceholderText={intl.formatMessage(messages.RelationStartDateUntil)}\n block\n />\n
    \n
    \n );\n }\n case 'amountFrom': {\n const { amountFrom, amountTo } = this.state;\n return (\n
    \n
    \n
    \n {intl.formatMessage(messages.AmountFrom)}\n\n this.handleAmountBlur('amountFrom')}\n onKeyDown={e => {\n const event = e;\n this.handleAmountKeyDown(event, 'amountFrom');\n }}\n onChange={e => this.setState({ amountFrom: e.target.value })}\n value={amountFrom}\n className=\"form-control\"\n style={{ textAlign: 'right' }}\n placeholder={intl.formatMessage(messages.Amount)}\n />\n
    \n
    \n
    \n
    \n {intl.formatMessage(messages.AmountTo)}\n this.handleAmountBlur('amountTo')}\n onKeyDown={e => {\n const event = e;\n this.handleAmountKeyDown(event, 'amountTo');\n }}\n onChange={e => this.setState({ amountTo: e.target.value })}\n value={amountTo}\n style={{ textAlign: 'right' }}\n placeholder={intl.formatMessage(messages.Amount)}\n />\n
    \n
    \n
    \n );\n }\n case 'includeInactive':\n return (\n
    \n
    \n \n
    \n
    \n );\n default:\n console.warn(`Missing filter: ${type}`);\n return null;\n }\n };\n\n render() {\n const { filters, intl, countSelectedRelations } = this.props;\n const { labels, dynamicFilters } = this.state;\n\n const defaultBtnClass = 'btn btn-default';\n const relationTypes = this.getRelationTypes();\n const hasFilters = !isEqual(filters, defaultInvoiceStreamFilters);\n\n const initRelation = filters.relationId\n ? {\n key: filters.relationId,\n label: filters.relationName,\n invoiceStreamId: filters.invoiceStreamId,\n }\n : null;\n\n const visibleFilters = dynamicFilters.filter(x => x.selected).map(x => x.id);\n\n const dropdownFilters = [\n {\n id: 'selectall',\n label: intl.formatMessage(messages.SelectAll),\n selected: !dynamicFilters.some(x => !x.selected),\n },\n ...dynamicFilters,\n ];\n\n return (\n \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n {relationTypes.map(t => (\n {\n document.activeElement.blur();\n this.filterRelationTypes(t.id);\n }}\n type=\"button\"\n title={t.label}\n className={classnames(defaultBtnClass, {\n active: filters && filters.type && filters.type.includes(t.id),\n })}\n >\n \n {t.label}\n \n ))}\n
    \n
    \n
    \n
    \n this.filterChanged({ invoiceScheduleTypes: items })}\n />\n
    \n
    \n
    \n {visibleFilters && visibleFilters.length > 0 ? (\n
    \n {visibleFilters.map(id => (\n \n ))}\n
    \n ) : null}\n
    \n
    \n \n \n \n \n \n \n \n {hasFilters && (\n \n \n  \n \n \n )}\n
    \n {countSelectedRelations}\n
    \n
    \n
    \n
    \n );\n }\n}\n\nexport default injectIntl(InvoiceStreamFilters);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { defineMessages } from 'react-intl';\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport moment from 'moment';\nimport intlShape from '@/shared/utils/intlShape';\nimport api from '@/shared/api';\nimport DatePicker from '@/shared/components/input/DatePicker';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport classNames from 'classnames';\nimport CurrencySymbol from '@/shared/components/CurrencySymbol';\nimport Checkbox from '@/shared/components/input/Checkbox';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport {\n falseFunc,\n validateDateRange,\n validateEndDate,\n isBeforeLastYear,\n} from '@/shared/utils/validationHelpers';\nimport config from '../../../../config';\n\nconst messages = defineMessages({\n StartPlanning: 'Start planning',\n EndPlanning: 'End planning',\n Schedule: 'Schedule',\n LedgerAccount: 'Ledger account',\n Amount: 'Amount',\n OverrideExistingSchedule: 'Override existing invoice schedule if present.',\n NoSchedule: 'No schedule',\n SetInvoiceSchedule: 'Set invoice schedule',\n InvoiceStreamStartDateInPastExplanation:\n 'If you set this start date in the past, its possible that draft invoices are created instantly based on the schedule.',\n});\n\nexport default class SetInvoiceScheduleModal extends Component {\n state = {\n planningStart: moment(), // Set start date to today\n schedules: [],\n amount: 0,\n ledgerAccount: '',\n overrideExistingSchedule: false,\n };\n static propTypes = {\n show: PropTypes.bool.isRequired,\n intl: intlShape.isRequired,\n onSave: PropTypes.func.isRequired,\n onClose: PropTypes.func.isRequired,\n };\n\n static defaultProps = {};\n\n retrieveSchedules = () => {\n const { intl } = this.props;\n\n api.base.get(`${config.appUrls.api}/api/invoiceschedule/get`).then(({ data }) => {\n const sortOnLabel = (a, b) => (a.label > b.label) - (a.label < b.label);\n\n const translatedSchedules = [\n { id: -1, label: intl.formatMessage(messages.NoSchedule) },\n ...data\n .map(t => ({\n ...t,\n label: `${intl.formatMessage(\n listItemMsg('invoiceSchedule', t.id, t.name),\n )} (${intl.formatMessage(listItemMsg('InvoicingType', t.invoicingType))})`,\n }))\n .sort(sortOnLabel),\n ];\n\n let selectedSchedule = null;\n if (translatedSchedules && translatedSchedules.length > 0) {\n [selectedSchedule] = translatedSchedules;\n }\n\n this.setState(state => ({\n ...state,\n schedules: translatedSchedules,\n touched: true,\n selectedSchedule,\n }));\n });\n };\n\n componentDidMount() {\n this.retrieveSchedules();\n }\n\n scheduleChanged = event => {\n const { schedules } = this.state;\n const scheduleId = event.target.value;\n\n const selectedSchedule = scheduleId === -1 ? null : schedules.find(x => x.id === scheduleId);\n\n let defaultLedger = '';\n if (selectedSchedule) {\n const companySettings = DataCacheService.getDefaultCompany();\n // forfait\n if (selectedSchedule.invoicingType === 1) {\n defaultLedger = companySettings ? companySettings.fixedAmountLedgerAccount : '';\n }\n // advance settlement\n if (selectedSchedule.invoicingType === 2) {\n defaultLedger = companySettings ? companySettings.advanceSettlementLedgerAccount : '';\n }\n }\n\n this.setState(state => ({\n ...state,\n touched: true,\n ledgerAccount: defaultLedger,\n selectedSchedule,\n }));\n };\n\n isFormInvalid = () => {\n const { planningStart, planningStop, selectedSchedule, amount } = this.state;\n if (!planningStart) return true;\n if (!validateDateRange(planningStart, planningStop, true)) return true;\n\n if (\n selectedSchedule &&\n selectedSchedule.id !== -1 &&\n selectedSchedule.invoicingType !== 0 &&\n amount < 1\n ) {\n return true;\n }\n\n return false;\n };\n\n amountChanged = value => {\n this.setState(state => ({\n ...state,\n touched: true,\n amount: value,\n }));\n };\n\n onSave = () => {\n const {\n planningStart,\n planningStop,\n selectedSchedule,\n amount,\n ledgerAccount,\n overrideExistingSchedule,\n } = this.state;\n\n const { onSave } = this.props;\n\n this.setState({ touched: true });\n\n const invoiceSchedule = {\n startDate: planningStart,\n endDate: planningStop,\n scheduleId: !selectedSchedule || selectedSchedule.id === -1 ? null : selectedSchedule.id,\n amount,\n ledgerAccount,\n overrideExistingSchedule,\n };\n\n return onSave(invoiceSchedule);\n };\n\n render() {\n const { show, onClose, intl } = this.props;\n const {\n planningStart,\n planningStop,\n planningStartFocused,\n planningStopFocused,\n schedules,\n selectedSchedule,\n amount,\n ledgerAccount,\n touched,\n overrideExistingSchedule,\n } = this.state;\n\n if (!show) return null;\n\n const showAmount =\n selectedSchedule && selectedSchedule.id !== -1 && selectedSchedule.invoicingType !== 0;\n\n const amountClassName = classNames('form-group', {\n 'has-error': touched && amount < 1,\n });\n\n return (\n this.onSave()}\n >\n
    \n
    \n
    \n \n
    \n
    \n {schedules && (\n \n {schedules.map(schedule => (\n \n ))}\n \n )}\n
    \n
    \n\n
    \n
    \n \n
    {intl.formatMessage(messages.InvoiceStreamStartDateInPastExplanation)}
    \n
    \n\n
    \n \n this.setState({ planningStart: date, planningStop: undefined })\n }\n focused={planningStartFocused}\n onFocusChange={({ focused }) => this.setState({ planningStartFocused: focused })}\n id=\"taskScheduleStartDate\"\n required\n block\n small\n isOutsideRange={isBeforeLastYear}\n />\n
    \n
    \n\n \n
    \n \n
    \n
    \n this.setState({ planningStop: date })}\n focused={planningStopFocused}\n onFocusChange={({ focused }) => this.setState({ planningStopFocused: focused })}\n id=\"taskScheduleEndDate\"\n isOutsideRange={falseFunc}\n />\n
    \n
    \n\n {showAmount && (\n
    \n
    \n \n
    \n
    \n
    \n this.amountChanged(e.target.value)}\n className=\"form-control\"\n />\n \n \n \n
    \n
    \n
    \n )}\n\n
    \n
    \n \n
    \n
    \n this.setState({ ledgerAccount: e.target.value })}\n id=\"ledgeraccount\"\n />\n
    \n
    \n\n
    \n this.setState({ overrideExistingSchedule: !overrideExistingSchedule })}\n text={intl.formatMessage(messages.OverrideExistingSchedule)}\n />\n
    \n
    \n \n );\n }\n}\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport Toggle from 'react-toggle';\nimport intlShape from '@/shared/utils/intlShape';\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport { hasAssignments } from '@/shared/components/security/HasAssignments';\n\nimport messages from '../invoiceStreamMessages';\n\nexport default class UpdateInvoiceStreamPriceGridModal extends Component {\n state = {\n priceGridId: undefined,\n updateRelation: true,\n resetInvoiceStreams: false,\n };\n\n static propTypes = {\n show: PropTypes.bool.isRequired,\n intl: intlShape.isRequired,\n onSave: PropTypes.func.isRequired,\n onClose: PropTypes.func.isRequired,\n };\n\n static defaultProps = {};\n\n isFormInvalid = () => {\n const { priceGridId, updateRelation } = this.state;\n\n if (updateRelation && !priceGridId) {\n return true;\n }\n\n return false;\n };\n\n onSave = () => {\n const { priceGridId, updateRelation, resetInvoiceStreams } = this.state;\n\n const { onSave } = this.props;\n\n return onSave({ priceGridId, updateRelation, resetInvoiceStreams });\n };\n\n updateRelationChanged = e => {\n this.setState({ updateRelation: e.target.value === 'true' });\n };\n\n render() {\n const { show, onClose, intl, priceGrids } = this.props;\n const { priceGridId, updateRelation, resetInvoiceStreams } = this.state;\n const showAdvancedOptions = hasAssignments();\n\n return (\n this.onSave()}\n >\n
    \n {showAdvancedOptions ? (\n
    \n
    \n
    \n \n \n
    \n
    \n
    \n ) : null}\n\n
    \n \n
    \n this.setState({ priceGridId: e.target.value })}\n className=\"form-control\"\n value={priceGridId || ''}\n >\n {typeof priceGridId === 'undefined' && (\n \n )}\n {!updateRelation && (\n \n )}\n {priceGrids.map(priceGrid => (\n \n ))}\n \n
    \n
    \n {showAdvancedOptions && updateRelation ? (\n
    \n
    \n \n
    \n
    \n ) : null}\n
    \n \n );\n }\n}\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport classNames from 'classnames';\nimport CurrencySymbol from '@/shared/components/CurrencySymbol';\nimport Checkbox from '@/shared/components/input/Checkbox';\nimport FormattedCurrency from '@/shared/components/FormattedCurrency';\nimport enumCache from '@/shared/services/EnumCacheService';\nimport utils from '@/shared/utils/adminpulse';\nimport messages from '../invoiceStreamMessages';\n\nexport default class UpdateInvoiceStreamAmountModal extends Component {\n state = {\n updateMethods: [],\n roundingMethods: [],\n selectedUpdateMethod: 0,\n amountOrPercentage: 0,\n selectedRoundingMethod: 0,\n roundingDecimals: 2,\n overrideManualChanges: false,\n };\n static propTypes = {\n show: PropTypes.bool.isRequired,\n intl: intlShape.isRequired,\n onSave: PropTypes.func.isRequired,\n onClose: PropTypes.func.isRequired,\n exampleAmount: PropTypes.number,\n };\n\n static defaultProps = { exampleAmount: utils.randomAmount() };\n\n componentDidMount() {\n const { intl } = this.props;\n Promise.all([\n enumCache.getTranslated('updateAmountMethod', intl),\n enumCache.getTranslated('roundingMethod', intl),\n ]).then(([updateMethods, roundingMethods]) => {\n this.setState({\n updateMethods,\n roundingMethods,\n });\n });\n }\n\n isFormInvalid = () => {\n const { amountOrPercentage, selectedUpdateMethod } = this.state;\n\n if (!amountOrPercentage || parseFloat(amountOrPercentage) === 0) {\n return true;\n }\n if (selectedUpdateMethod === 0 && (amountOrPercentage > 100 || amountOrPercentage < -100)) {\n return true;\n }\n return false;\n };\n\n amountChanged = value => {\n const { selectedUpdateMethod } = this.state;\n\n let parsedValue = Number.parseFloat(value);\n if (Number.isNaN(parsedValue)) {\n parsedValue = null;\n } else if (selectedUpdateMethod === 0) {\n // percentage: dont allow bigger/smaller than 100/-100\n parsedValue = Math.min(100, Math.max(-100, parsedValue));\n }\n\n this.setState(state => ({\n ...state,\n touched: true,\n amountOrPercentage: parsedValue,\n }));\n };\n\n onSave = () => {\n const {\n amountOrPercentage,\n overrideManualChanges,\n selectedUpdateMethod,\n selectedRoundingMethod,\n roundingDecimals,\n } = this.state;\n\n const { onSave } = this.props;\n\n this.setState({ touched: true });\n\n const amountUpdate = {\n method: selectedUpdateMethod,\n amountOrPercentage,\n overrideManualChanges,\n rounding: selectedRoundingMethod,\n roundingDecimals,\n };\n\n return onSave(amountUpdate);\n };\n generateExample = () => {\n const { exampleAmount } = this.props;\n const {\n amountOrPercentage,\n selectedUpdateMethod,\n selectedRoundingMethod,\n roundingDecimals,\n } = this.state;\n\n return utils.calculateIndexedAmount(\n Number.parseFloat(exampleAmount),\n selectedUpdateMethod,\n amountOrPercentage,\n selectedRoundingMethod,\n roundingDecimals,\n );\n };\n\n render() {\n const { show, onClose, intl, exampleAmount } = this.props;\n const {\n updateMethods,\n amountOrPercentage,\n touched,\n overrideManualChanges,\n selectedUpdateMethod,\n selectedRoundingMethod,\n roundingDecimals,\n roundingMethods,\n } = this.state;\n\n if (!show) return null;\n\n const amountClassName = classNames('form-group', {\n 'has-error': touched && (!amountOrPercentage || parseFloat(amountOrPercentage) === 0),\n });\n const generatedAmount = this.generateExample();\n\n return (\n this.onSave()}\n >\n
    \n
    \n \n
    \n {updateMethods && (\n this.setState({ selectedUpdateMethod: parseInt(e.target.value) })}\n className=\"form-control\"\n value={selectedUpdateMethod}\n >\n {updateMethods.map(schedule => (\n \n ))}\n \n )}\n
    \n
    \n\n
    \n \n
    \n {(selectedUpdateMethod === 1 || selectedUpdateMethod === 2) && (\n
    \n this.amountChanged(e.target.value)}\n className=\"form-control\"\n />\n \n \n \n
    \n )}\n {selectedUpdateMethod === 0 && (\n
    \n this.amountChanged(e.target.value)}\n className=\"form-control\"\n />\n %\n
    \n )}\n
    \n
    \n {selectedUpdateMethod === 0 && (\n
    \n \n
    \n {roundingMethods && (\n \n this.setState({ selectedRoundingMethod: parseInt(e.target.value) })\n }\n className=\"form-control\"\n value={selectedRoundingMethod}\n >\n {roundingMethods.map(item => (\n \n ))}\n \n )}\n
    \n
    \n )}\n {selectedUpdateMethod === 0 && (\n
    \n \n
    \n
    \n this.setState({ roundingDecimals: parseInt(e.target.value) })}\n className=\"form-control\"\n min={0}\n max={5}\n value={roundingDecimals}\n />\n {intl.formatMessage(messages.Digits)}\n
    \n
    \n
    \n )}\n
    \n \n
    \n
    \n \n
    \n {!Number.isNaN(generatedAmount) && (\n \n )}\n
    \n
    \n
    \n\n
    \n this.setState({ overrideManualChanges: !overrideManualChanges })}\n text={intl.formatMessage(messages.OverrideManualInvoiceStreamScheduleChanges)}\n />\n
    \n
    \n \n
    \n
    \n \n );\n }\n}\n","import React, { Component } from 'react';\nimport enumCache from '@/shared/services/EnumCacheService';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport { injectIntl, defineMessages } from 'react-intl';\nimport PropTypes from 'prop-types';\n\nimport intlShape from '@/shared/utils/intlShape';\n\nconst messages = defineMessages({\n Unassigned: 'Unassigned',\n Profiles: 'Profiles',\n Users: 'Users',\n ResetToTemplateSetting: 'Reset to template setting',\n});\nclass AssignedToSelector extends Component {\n static propTypes = {\n intl: intlShape.isRequired,\n onChange: PropTypes.func.isRequired,\n showReset: PropTypes.bool,\n profiles: PropTypes.arrayOf(PropTypes.shape({ id: PropTypes.number, label: PropTypes.string })),\n };\n static defaultProps = {\n showReset: false,\n profiles: undefined,\n };\n\n state = {\n profiles: [],\n users: [],\n };\n\n componentDidMount() {\n const { intl, profiles } = this.props;\n const profilesPromise =\n profiles && profiles.length > 0\n ? Promise.resolve(profiles)\n : enumCache.getTranslated('employeeprofile', intl);\n\n profilesPromise.then(data => {\n this.setState({\n profiles: data,\n users: DataCacheService.getUsers(),\n });\n });\n }\n\n selectedValueChanged(e) {\n const { onChange } = this.props;\n\n const assignedToString = e.target.value;\n const parts = assignedToString.split(';');\n\n let model = {\n assignedType: 0,\n assignedUserId: null,\n assignedProfile: null,\n reset: false,\n };\n\n if (parts.length === 2 && parts[0].length) {\n if (parts[0] === '-1') {\n model = { ...model, reset: true };\n } else if (parts[1].length) {\n if (parts[0] === '1') {\n model = {\n ...model,\n assignedType: 1,\n assignedProfile: parseInt(parts[1]),\n };\n } else if (parts[0] === '2') {\n model = {\n ...model,\n assignedType: 2,\n assignedUserId: parts[1],\n };\n }\n }\n }\n\n onChange(model);\n }\n\n render() {\n const { profiles, users, selectedAssignedTo } = this.state;\n const { intl, showReset } = this.props;\n return (\n this.selectedValueChanged(e)}\n >\n \n {showReset ? (\n \n ) : null}\n \n {profiles &&\n profiles.map(profile => (\n \n ))}\n \n \n {users &&\n users.map(user => (\n \n ))}\n \n \n );\n }\n}\n\nexport default injectIntl(AssignedToSelector);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport Toggle from 'react-toggle';\nimport intlShape from '@/shared/utils/intlShape';\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport { hasAssignments } from '@/shared/components/security/HasAssignments';\n\nimport enumCache from '@/shared/services/EnumCacheService';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport AssignedToSelector from '@/shared/components/input/AssignedToSelector';\nimport Checkbox from '@/shared/components/input/Checkbox';\nimport { getUserClassName } from '@/shared/components/input/UserSearch';\n\nimport messages from '../invoiceStreamMessages';\n\nexport default class UpdateInvoiceStreamUserModal extends Component {\n state = {\n profile: null,\n userId: null,\n updateRelation: true,\n resetInvoiceStreams: false,\n profiles: [],\n users: [],\n updateTasks: false,\n updateTaskData: {\n assignedType: 0,\n assignedUserId: null,\n assignedProfile: null,\n },\n };\n\n static propTypes = {\n show: PropTypes.bool.isRequired,\n intl: intlShape.isRequired,\n onSave: PropTypes.func.isRequired,\n onClose: PropTypes.func.isRequired,\n };\n\n static defaultProps = {};\n\n componentDidMount() {\n const { intl } = this.props;\n enumCache.getTranslated('employeeprofile', intl).then(profiles => {\n this.setState({\n profiles,\n users: DataCacheService.getUsers(),\n });\n });\n }\n isFormInvalid = () => {\n const { updateRelation, profile, userId, updateTasks, updateTaskData } = this.state;\n if (profile === null) return true;\n\n return false;\n };\n\n onSave = () => {\n const {\n profile,\n userId,\n updateRelation,\n resetInvoiceStreams,\n updateTasks,\n updateTaskData,\n } = this.state;\n const { onSave } = this.props;\n\n let updateTaskModel = null;\n if (updateTasks) {\n if (!userId) {\n // User data from assigned user control when user is set to unassigned\n updateTaskModel = {\n oldProfile: profile,\n assignedType: updateTaskData.assignedType,\n newProfile: updateTaskData.assignedProfile,\n newUserId: updateTaskData.assignedUserId,\n };\n } else {\n // Replace with new user\n updateTaskModel = {\n oldProfile: profile,\n assignedType: 2,\n newProfile: null,\n newUserId: userId,\n };\n }\n }\n const model = {\n profile,\n userId,\n updateTasks: updateTaskModel,\n updateRelation,\n resetInvoiceStreams,\n };\n return onSave(model);\n };\n\n updateRelationChanged = e => {\n this.setState({ updateRelation: e.target.value === 'true' });\n };\n\n profileChanged = event => {\n const profile = parseInt(event.target.value) || 0;\n this.setState({\n profile,\n });\n };\n userChanged = event => {\n this.setState({\n userId: event.target.value || null,\n });\n };\n assignedToChanged = assignedTo => {\n this.setState({\n updateTaskData: assignedTo,\n });\n };\n\n render() {\n const { show, onClose, intl } = this.props;\n const {\n updateRelation,\n resetInvoiceStreams,\n users,\n profiles,\n profile,\n userId,\n updateTasks,\n } = this.state;\n const showAdvancedOptions = hasAssignments();\n const showAssignedToSelector = updateRelation && profile !== null && !userId && updateTasks;\n const assignedToProfiles = showAssignedToSelector\n ? profiles.filter(x => x.id !== profile)\n : undefined;\n\n return (\n this.onSave()}\n >\n
    \n {showAdvancedOptions ? (\n
    \n
    \n
    \n \n \n
    \n
    \n
    \n ) : null}\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n\n {showAdvancedOptions && updateRelation ? (\n
    \n
    \n \n
    \n
    \n ) : null}\n\n {profile !== null && (\n
    \n
    \n \n
    \n
    \n )}\n {showAssignedToSelector && (\n
    \n \n
    \n \n
    \n
    \n )}\n
    \n \n );\n }\n}\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport classNames from 'classnames';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport moment from 'moment';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport messages from '../invoiceStreamMessages';\nimport dateFormatService from '@/shared/services/DateFormatService';\nimport {\n isBeforeToday,\n isBeforeMinimum,\n isBeforeLastYear,\n isBeforeTomorrow,\n} from '@/shared/utils/validationHelpers';\nimport DatePicker from '@/shared/components/input/DatePicker';\n\nconst getInvoiceType = (invoicingType, fixed) => {\n switch (invoicingType) {\n case 0:\n return 4;\n case 1:\n return 1;\n case 2:\n return fixed ? 2 : 3;\n default:\n return 4;\n }\n};\n\nexport default class ReprocessInvoiceStreamScheduleModal extends Component {\n state = {\n invoiceSchedules: [],\n invoiceSchedule: null,\n showValidation: null,\n invoiceScheduleLineId: null,\n invoiceCreationDate: null,\n };\n\n static propTypes = {\n show: PropTypes.bool.isRequired,\n intl: intlShape.isRequired,\n onSave: PropTypes.func.isRequired,\n onClose: PropTypes.func.isRequired,\n exampleAmount: PropTypes.number,\n };\n\n componentDidMount() {\n const { intl } = this.props;\n this.loadInvoiceSchedules();\n }\n\n loadInvoiceSchedules = () => {\n const { intl, invoiceScheduleId } = this.props;\n api.base.get(`${config.appUrls.api}/api/InvoiceSchedule/Full`).then(({ data }) => {\n const invoiceSchedules = data\n .map(x => ({\n ...x,\n label: intl.formatMessage(listItemMsg('InvoiceSchedule', x.id, x.name)),\n lines: (x.lines || [])\n .map(l => {\n let previousDate = moment.utc(l.invoiceCreationDate).year(moment.utc().year());\n if (moment.utc().isBefore(previousDate)) previousDate = previousDate.subtract(1, 'y');\n\n return {\n ...l,\n previousDate,\n previousDateSort: moment(previousDate).format('x'),\n lineTypeLabel: intl.formatMessage(\n listItemMsg('InvoiceType', getInvoiceType(x.invoicingType, l.fixed)),\n ),\n };\n })\n .sort(dynamicSort('-previousDateSort')),\n }))\n .filter(x => x.inUse && x.lines.length > 0)\n .sort(dynamicSort('label'));\n\n const invoiceSchedule = invoiceScheduleId\n ? invoiceSchedules.find(x => x.id === invoiceScheduleId)\n : null;\n const invoiceScheduleLine = invoiceSchedule ? invoiceSchedule.lines[0] : null;\n\n this.setState({\n fixedInvoiceSchedule: !!invoiceScheduleId && !!invoiceSchedule,\n invoiceSchedules,\n invoiceSchedule,\n invoiceScheduleLineId: invoiceScheduleLine?.id,\n invoiceCreationDate: invoiceScheduleLine?.previousDate,\n });\n });\n };\n invoiceScheduleChanged = e => {\n const id = e.target.value;\n this.setState(({ invoiceSchedules }) => {\n const invoiceSchedule = id ? invoiceSchedules.find(x => x.id === id) : null;\n const invoiceScheduleLine = invoiceSchedule ? invoiceSchedule.lines[0] : null;\n return {\n invoiceSchedule,\n invoiceScheduleLineId: invoiceScheduleLine?.id,\n invoiceCreationDate: invoiceScheduleLine?.previousDate,\n };\n });\n };\n invoiceScheduleLineChanged = e => {\n const id = e.target.value;\n this.setState(({ invoiceSchedule }) => {\n const invoiceScheduleLine =\n invoiceSchedule && id ? invoiceSchedule.lines.find(x => x.id === id) : null;\n return {\n invoiceScheduleLineId: invoiceScheduleLine?.id,\n invoiceCreationDate: invoiceScheduleLine?.previousDate,\n };\n });\n };\n isFormInvalid = () => {\n const { invoiceSchedule, invoiceScheduleLineId, invoiceCreationDate } = this.state;\n if (!invoiceSchedule) return true;\n if (!invoiceScheduleLineId) return true;\n if (!invoiceCreationDate) return true;\n if (isBeforeLastYear(invoiceCreationDate)) return true;\n if (!isBeforeTomorrow(invoiceCreationDate)) return true;\n\n return false;\n };\n onSave = () => {\n const { onSave } = this.props;\n const { invoiceSchedule, invoiceScheduleLineId, invoiceCreationDate } = this.state;\n\n if (this.isFormInvalid()) return;\n\n return onSave({\n invoiceScheduleId: invoiceSchedule.id,\n invoiceScheduleLineId,\n invoiceCreationDate,\n });\n };\n render() {\n const { invoiceScheduleId, intl, show, onClose } = this.props;\n const {\n fixedInvoiceSchedule,\n invoiceSchedules,\n invoiceSchedule,\n invoiceScheduleLineId,\n invoiceCreationDate,\n dateFocused,\n showValidation,\n } = this.state;\n\n return (\n this.onSave()}\n onHoverSave={() => this.setState({ showValidation: true })}\n >\n
    \n \n \n
    \n {invoiceSchedules && !fixedInvoiceSchedule ? (\n \n {!invoiceScheduleId && !invoiceSchedule && }\n {invoiceSchedules.map(schedule => (\n \n ))}\n \n ) : (\n invoiceSchedule?.label\n )}\n
    \n
    \n {invoiceSchedule ? (\n \n \n
    \n \n {invoiceSchedule.lines.map(line => (\n \n ))}\n \n
    \n
    \n ) : null}\n\n {invoiceSchedule ? (\n \n \n
    \n \n this.setState({\n invoiceCreationDate: date,\n })\n }\n focused={dateFocused}\n onFocusChange={({ focused }) => this.setState({ dateFocused: focused })}\n id=\"InvoiceCreationDate\"\n required\n block\n small\n isOutsideRange={date => isBeforeLastYear(date) || !isBeforeTomorrow(date)}\n />\n
    \n
    \n ) : null}\n
    \n \n );\n }\n}\n","import React, { Component } from 'react';\nimport { FormattedMessage, injectIntl } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\n\nimport { CanUpdate, showWhenPermission } from '@/shared/components/security';\nimport ScrollableTable from '@/shared/components/table/ScrollableTable';\nimport api from '@/shared/api';\nimport ColumnHeader from '@/shared/components/table/ColumnHeader';\nimport Checkbox from '@/shared/components/input/Checkbox';\nimport Axios from 'axios';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\n\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport FileSaver from 'file-saver';\nimport ToastrService from '@/shared/services/ToastrService';\nimport { injectStateService } from '@/shared/services/StateService';\nimport { FaFileExcel } from 'react-icons/fa';\nimport utils from '@/shared/utils/adminpulse';\nimport config from '@/config';\nimport PropTypes from 'prop-types';\nimport YesNoModal from '@/shared/components/YesNoModal';\nimport ZendeskHelp from '@/shared/components/ZendeskHelp';\nimport SimplePanel from '@/shared/components/SimplePanel';\nimport SignalRService from '@/shared/services/SignalRService';\nimport Button from '@/shared/components/Button';\nimport { hasAssignments } from '@/shared/components/security/HasAssignments';\nimport SendEmailModal from '@/shared/components/email/MultiRelationsMailModal';\nimport messages from './invoiceStreamMessages';\nimport InvoiceStreamRow from './InvoiceStreamRow';\nimport InvoiceStreamFilters, { defaultInvoiceStreamFilters } from './InvoiceStreamFilters';\nimport InvoiceStreamGlobalActionsButton from './InvoiceStreamGlobalActionsButton';\nimport SetInvoiceScheduleModal from '../overview/modals/SetInvoiceScheduleModal';\nimport UpdateInvoiceStreamPriceGridModal from './modals/UpdateInvoiceStreamPriceGridModal';\nimport UpdateInvoiceStreamAmountModal from './modals/UpdateInvoiceStreamAmountModal';\nimport UpdateInvoiceStreamUserModal from './modals/UpdateInvoiceStreamUserModal';\nimport ReprocessInvoiceStreamScheduleModal from './modals/ReprocessInvoiceStreamScheduleModal';\nimport OkCancelModal from '@/shared/components/OkCancelModal';\n\nclass InvoiceStreamContainer extends Component {\n constructor(props) {\n super(props);\n const { searchParams = {} } = props;\n\n const { invoiceStreamFilters: sessionFilters = {}, ...sessionParams } =\n JSON.parse(sessionStorage.getItem('InvoiceStreamOverviewParams')) || {};\n\n this.state = {\n items: [],\n allSelected: false,\n showEditAmountConfirmationDialog: false,\n showUpdateAmountModal: false,\n showUpdatePriceGridModal: false,\n showUpdateUserModal: false,\n updateViewModel: undefined,\n currentSearchParams: undefined,\n priceGrids: [],\n initialSearchParams: {\n // Set default filters\n sortKey: 'relation.displayName',\n pageSize: 50,\n desc: false,\n invoiceStreamFilters: {\n ...defaultInvoiceStreamFilters,\n ...sessionFilters,\n ...searchParams,\n },\n // Override with session storage params\n ...sessionParams,\n },\n };\n }\n\n componentDidMount() {\n SignalRService.subscribe('invoiceStreamOverviewUpdated', invoiceStream =>\n this.updateInvoiceStreamHandler(invoiceStream),\n );\n SignalRService.subscribe('reloadInvoiceStreamOverview', this.reloadInvoiceStreamOverivew);\n\n SignalRService.subscribe('jobUpdated', this.jobUpdateHandler);\n\n const { intl } = this.props;\n const priceGridPromise = api.base.get(`${config.appUrls.api}/api/Price/Grid`);\n Promise.all([priceGridPromise]).then(([{ data: priceGrids }]) => {\n this.setState({\n priceGrids: priceGrids\n .map(x => ({\n key: x.id,\n id: x.id,\n label: x.name === 'Default' ? intl.formatMessage(messages.Default) : x.name,\n }))\n .sort(dynamicSort('label')),\n });\n });\n }\n\n componentWillUnmount() {\n SignalRService.unsubscribe('invoiceStreamOverviewUpdated', invoiceStream =>\n this.updateInvoiceStreamHandler(invoiceStream),\n );\n SignalRService.unsubscribe('reloadInvoiceStreamOverview', this.reloadInvoiceStreamOverivew);\n SignalRService.unsubscribe('jobUpdated', this.jobUpdateHandler);\n\n if (typeof this.searchToken !== 'undefined') {\n this.searchToken.cancel('Operation canceled due to leaving page.');\n }\n }\n jobUpdateHandler = job => {\n if (job.jobType === 46 && (job.status === 2 || job.status === 3)) {\n this.reloadInvoiceStreamOverivew();\n }\n };\n\n updateInvoiceStreamHandler(invoiceStream) {\n this.setState(state => ({\n items: state.items.map(x => (x.id === invoiceStream.id ? { ...x, ...invoiceStream } : x)),\n }));\n }\n\n loadItems = searchParams => {\n const { allSelected } = this.state;\n\n sessionStorage.setItem(\n 'InvoiceStreamOverviewParams',\n JSON.stringify({\n desc: searchParams.desc,\n sortKey: searchParams.sortKey,\n invoiceStreamFilters: searchParams.invoiceStreamFilters,\n }),\n );\n if (typeof this.searchToken !== 'undefined') {\n this.searchToken.cancel('Operation canceled due to new request.');\n }\n this.searchToken = Axios.CancelToken.source();\n\n return api.base\n .get('/api/invoicestream/invoicestreamoverview', {\n params: {\n desc: searchParams.desc,\n sort: searchParams.sortKey,\n page: searchParams.page,\n take: searchParams.pageSize,\n ...searchParams.invoiceStreamFilters,\n },\n cancelToken: this.searchToken.token,\n })\n .then(({ data: response }) => {\n const newInvoiceStreams = response.data.map(e => ({ ...e, selected: !!allSelected }));\n\n this.setState(state => ({\n items:\n searchParams.page > 0 ? [...state.items, ...newInvoiceStreams] : [...newInvoiceStreams],\n total: response.total,\n currentSearchParams: searchParams,\n }));\n\n return response.data;\n })\n .catch(error => {\n if (!Axios.isCancel(error)) return error;\n });\n };\n\n handleSelectAll = () => {\n this.setState(({ items, allSelected }) => {\n const isCurrentlySelected = !allSelected;\n\n return {\n allSelected: isCurrentlySelected,\n items: items.map(e => ({ ...e, selected: !!isCurrentlySelected })),\n };\n });\n };\n\n handleSelect = invoiceStream => {\n this.setState(({ items }) => ({\n items: items.map(x => (x.id === invoiceStream.id ? { ...x, selected: !x.selected } : x)),\n }));\n };\n\n getCountSelectionsFormatted() {\n const { total } = this.state;\n const { intl } = this.props;\n const count = this.getCountSelections();\n\n return intl.formatMessage(messages.CountRelationsSelected, { count, total });\n }\n\n getCountSelections() {\n const { allSelected, total, items } = this.state;\n\n const count = items ? items.filter(x => x.selected !== allSelected).length : 0;\n\n if (allSelected) {\n return total - count;\n }\n return count;\n }\n\n filtersChanged = filters => {\n this.setState(state => ({\n ...state,\n initialSearchParams: {\n ...state.initialSearchParams,\n page: 0,\n invoiceStreamFilters: filters,\n },\n }));\n };\n\n onUpdateAmount = updateViewModel => {\n const { intl } = this.props;\n\n return api.base\n .put(`${config.appUrls.api}/api/invoicestream/updateAmount`, updateViewModel)\n .then(\n ({ data }) => {\n ToastrService.success(intl.formatMessage(messages.MsgConfirmChange));\n this.setState(state => ({\n showEditAmountConfirmationDialog: false,\n items: state.items.map(x => {\n if (x.id === data.id) {\n return { ...x, ...data };\n }\n return x;\n }),\n }));\n },\n error => {\n if (\n error.response &&\n error.response.data &&\n error.response.data.code &&\n error.response.data.code === 11052\n ) {\n // the invoicestream has schedule lines that were manually changed. Ask confirmation\n this.setState({ showEditAmountConfirmationDialog: true, updateViewModel });\n } else {\n handleHttpError(intl)(error);\n }\n },\n );\n };\n onUpdatePriceGrid = (invoiceStreamId, priceGridId) => {\n const { intl } = this.props;\n\n const model = {\n invoiceStreamId,\n priceGridId,\n };\n return api.base.put(`${config.appUrls.api}/api/invoicestream/UpdatePriceGrid`, model).then(\n ({ data }) => {\n ToastrService.success(intl.formatMessage(messages.MsgConfirmChange));\n this.setState(state => ({\n items: state.items.map(x => {\n if (x.id === data.id) {\n return { ...x, ...data };\n }\n return x;\n }),\n }));\n },\n error => {\n handleHttpError(intl)(error);\n },\n );\n };\n createExcelReport = () => {\n const { intl } = this.props;\n const { currentSearchParams: searchParams } = this.state;\n\n const params = this.getSelectionParams();\n\n const culture = intl.locale;\n\n const url = `/api/invoiceStream/Report`;\n\n const urlParams = {\n ...searchParams.invoiceStreamFilters,\n\n culture,\n connectionId: SignalRService.getConnectionId(),\n };\n\n this.setState({\n creatingReport: true,\n });\n\n return api.base\n .post(url, params, { params: urlParams })\n .then(() => {\n ToastrService.info(intl.formatMessage(messages.ExportToExcelStarted));\n this.setState({\n creatingReport: false,\n });\n })\n .catch(error => {\n this.setState({\n creatingReport: false,\n });\n const errorObject = utils.arrayBufferToObject(error.response && error.response.data);\n handleHttpError(intl)(errorObject);\n });\n };\n\n isGlobalActionsDisabled = () => {\n const { items, allSelected } = this.state;\n if (!items || !items.length) return true;\n if (items.some(x => x.selected) || allSelected) return false;\n\n return true;\n };\n getExampleAmount = () => {\n const { items } = this.state;\n if (!items || !items.length) return undefined;\n const item = items.find(x => x.selected && x.amount) || items.find(x => x.amount);\n if (!item) return undefined;\n return item.amount;\n };\n\n executeBatchAction = ({ action, parameters }) => {\n if (this.isGlobalActionsDisabled()) return Promise.reject(new Error('invalid'));\n\n const { intl } = this.props;\n const { currentSearchParams: searchParams } = this.state;\n const { stateService } = this.props;\n\n let endpoint = '';\n let successMessage = '';\n let params = {};\n\n switch (action) {\n case 'setinvoiceschedule':\n endpoint = 'SetBatchInvoiceSchedule';\n successMessage = intl.formatMessage(messages.SetInvoiceScheduleQueued);\n params = { invoiceSchedule: parameters };\n break;\n case 'updateamount':\n endpoint = 'UpdateAmount';\n successMessage = intl.formatMessage(messages.GlobalActionStarted);\n params = { amountUpdate: parameters };\n break;\n case 'updatepricegrid':\n endpoint = 'updatepricegrid';\n successMessage = intl.formatMessage(messages.GlobalActionStarted);\n params = parameters;\n break;\n case 'updateusers':\n endpoint = 'BatchUpdateUser';\n successMessage = intl.formatMessage(messages.GlobalActionStarted);\n params = parameters;\n break;\n case 'reprocessSchedule':\n endpoint = 'BatchReprocessSchedule';\n successMessage = intl.formatMessage(messages.GlobalActionStarted);\n params = parameters;\n break;\n case 'processNextSchedule':\n endpoint = 'BatchProcessNextSchedule';\n successMessage = intl.formatMessage(messages.GlobalActionStarted);\n break;\n default:\n endpoint = action;\n successMessage = intl.formatMessage(messages.GlobalActionStarted);\n params = parameters;\n break;\n }\n\n params = { ...params, ...this.getSelectionParams() };\n\n const url = `/api/invoiceStream/${endpoint}`;\n\n const urlParams = {\n ...searchParams.invoiceStreamFilters,\n };\n\n return api.base\n .post(url, params, { params: urlParams })\n .then(({ data }) => {\n this.setState({\n showSetInvoiceScheduleModal: false,\n showUpdateAmountModal: false,\n showUpdatePriceGridModal: false,\n showSendMailModal: false,\n showUpdateUserModal: false,\n showReprocessScheduleModal: false,\n showProcessNextScheduleModal: false,\n });\n\n if (data && Array.isArray(data) && data.length > 0) {\n data.forEach(job => {\n const onClick = job ? () => stateService.gotoJob(job.id) : undefined;\n\n ToastrService.info(successMessage, undefined, onClick);\n });\n return;\n }\n\n const onClick = data ? () => stateService.gotoJob(data.id) : undefined;\n\n ToastrService.info(successMessage, undefined, onClick);\n })\n .catch(handleHttpError(intl));\n };\n\n getSelectionParams = () => {\n const { items, allSelected } = this.state;\n\n // Get all relation ids that don't match the select all checkbox\n const invoiceStreamIds = items\n ? items.filter(x => (x.selected || false) !== allSelected).map(x => x.id)\n : [];\n\n return {\n invoiceStreamIds,\n selectAll: allSelected,\n };\n };\n\n reloadInvoiceStreamOverivew = () => {\n this.setState(state => ({\n initialSearchParams: {\n ...state.currentSearchParams,\n // forces refresh of table\n random: new Date().getTime(),\n },\n }));\n };\n\n getSelectedRelationLanguages = () =>\n new Promise((resolve, reject) => {\n const { currentSearchParams: searchParams } = this.state;\n\n const bodyParams = { ...this.getSelectionParams() };\n\n const urlParams = {\n ...searchParams.invoiceStreamFilters,\n };\n\n return api.base\n .post(`/api/invoiceStream/languages`, bodyParams, { params: urlParams })\n .then(({ data }) => {\n resolve(data);\n })\n .catch(error => {\n reject(error);\n });\n });\n\n onSendEmail = () => {\n const { intl } = this.props;\n this.getSelectedRelationLanguages()\n .then(languages => {\n this.setState({\n showSendMailModal: true,\n relationLanguages: languages,\n });\n })\n .catch(error => {\n handleHttpError(intl)(error);\n });\n };\n\n setInvoiceScheduleSelectedRelations = invoiceSchedule =>\n this.executeBatchAction({\n action: 'setinvoiceschedule',\n parameters: invoiceSchedule,\n });\n sendEmailForSelectedRelations = model =>\n this.executeBatchAction({\n action: 'CreateBatchMailJob',\n parameters: model,\n });\n updateInvoiceStreamAmountBatch = amountUpdate =>\n this.executeBatchAction({\n action: 'updateamount',\n parameters: amountUpdate,\n });\n\n updateInvoiceStreamPriceGridBatch = model =>\n this.executeBatchAction({\n action: 'updatepricegrid',\n parameters: model,\n });\n\n updateInvoiceStreamUserBatch = model =>\n this.executeBatchAction({\n action: 'updateusers',\n parameters: model,\n });\n\n reprocessSchedule = model =>\n this.executeBatchAction({\n action: 'reprocessSchedule',\n parameters: model,\n });\n processNextSchedule = () =>\n this.executeBatchAction({\n action: 'processNextSchedule',\n });\n\n render() {\n const {\n initialSearchParams,\n items,\n allSelected,\n showEditAmountConfirmationDialog,\n updateViewModel,\n showSetInvoiceScheduleModal,\n showUpdateAmountModal,\n showUpdatePriceGridModal,\n creatingReport,\n priceGrids,\n showSendMailModal,\n relationLanguages,\n showUpdateUserModal,\n showReprocessScheduleModal,\n showProcessNextScheduleModal,\n } = this.state;\n const { invoiceDialogsSvc } = this.props;\n\n const { intl } = this.props;\n const hasData = items && items.length > 0;\n const showAssignments = hasAssignments();\n const invoiceScheduleIdFromFilter =\n initialSearchParams?.invoiceStreamFilters?.invoiceScheduleTypes?.length === 1 ?? false\n ? initialSearchParams?.invoiceStreamFilters?.invoiceScheduleTypes[0]\n : null;\n\n return (\n
    \n {showSendMailModal && (\n \n this.setState(state => ({\n ...state,\n showSendMailModal: false,\n }))\n }\n onSave={emailModel => this.sendEmailForSelectedRelations(emailModel)}\n />\n )}\n {showEditAmountConfirmationDialog && (\n \n this.setState({\n showEditAmountConfirmationDialog: false,\n updateViewModel: null,\n })\n }\n onNo={() =>\n this.onUpdateAmount({\n ...updateViewModel,\n overrideManualChanges: false,\n })\n }\n onSave={() =>\n this.onUpdateAmount({\n ...updateViewModel,\n overrideManualChanges: true,\n })\n }\n />\n )}\n {showSetInvoiceScheduleModal && (\n this.setState({ showSetInvoiceScheduleModal: false })}\n onSave={invoiceSchedule => this.setInvoiceScheduleSelectedRelations(invoiceSchedule)}\n />\n )}\n {showUpdateAmountModal && (\n this.setState({ showUpdateAmountModal: false })}\n onSave={amountUpdate => this.updateInvoiceStreamAmountBatch(amountUpdate)}\n exampleAmount={this.getExampleAmount()}\n />\n )}\n {showUpdatePriceGridModal && (\n this.setState({ showUpdatePriceGridModal: false })}\n onSave={priceGridModel => this.updateInvoiceStreamPriceGridBatch(priceGridModel)}\n />\n )}\n {showUpdateUserModal && (\n this.setState({ showUpdateUserModal: false })}\n onSave={model => this.updateInvoiceStreamUserBatch(model)}\n />\n )}\n {showReprocessScheduleModal && (\n this.setState({ showReprocessScheduleModal: false })}\n onSave={model => this.reprocessSchedule(model)}\n />\n )}\n {showProcessNextScheduleModal && (\n this.setState({ showProcessNextScheduleModal: false })}\n onSave={() => this.processNextSchedule()}\n title={intl.formatMessage(messages.ProcessNextInvoiceStreamSchedule)}\n >\n \n \n )}\n\n \n
    \n this.filtersChanged(filters)}\n countSelectedRelations={this.getCountSelectionsFormatted()}\n priceGrids={priceGrids}\n />\n
    \n \n
    \n
    \n this.createExcelReport()}\n disabled={!hasData || creatingReport}\n >\n \n \n \n {intl.formatMessage(messages.ExportToExcel)}\n \n \n this.setState({ showSetInvoiceScheduleModal: true })}\n onUpdateAmount={() => this.setState({ showUpdateAmountModal: true })}\n onUpdatePriceGrid={() => this.setState({ showUpdatePriceGridModal: true })}\n onSendEmail={this.onSendEmail}\n onUpdateUser={() => this.setState({ showUpdateUserModal: true })}\n onReprocessSchedule={() => this.setState({ showReprocessScheduleModal: true })}\n onProcessNextSchedule={() => this.setState({ showProcessNextScheduleModal: true })}\n disabled={this.isGlobalActionsDisabled()}\n />\n \n
    \n
    \n this.loadItems(searchParams)}\n initialSearchParams={initialSearchParams}\n items={items}\n renderRow={invoiceStream => (\n \n this.onUpdatePriceGrid(invoiceStream.id, priceGridId)\n }\n onUpdateAmount={stream =>\n this.onUpdateAmount({\n invoiceStreamId: stream.id,\n amount: stream.amount,\n overrideManualChanges: null,\n })\n }\n showAssignments={showAssignments}\n />\n )}\n noDataLabel={}\n >\n this.handleSelectAll()}\n value={allSelected}\n />\n }\n className=\"checkbox-column\"\n />\n \n {showAssignments ? (\n \n ) : null}\n \n \n \n \n\n \n \n \n
    \n );\n }\n}\n\nInvoiceStreamContainer.propTypes = {\n intl: intlShape.isRequired,\n};\n\nexport default showWhenPermission(\n 'InvoiceDraft',\n 'read',\n)(injectStateService(injectIntl(InvoiceStreamContainer)));\n","import React, { Fragment } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage, injectIntl, useIntl } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\n\nimport ZendeskHelp from './ZendeskHelp';\n\nconst ModalTitleZendeskHelp = ({ message, article }) => (\n \n \n \n \n);\nModalTitleZendeskHelp.propTypes = {\n message: PropTypes.shape({ id: PropTypes.string.isRequired }).isRequired,\n article: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n intl: intlShape.isRequired,\n};\nModalTitleZendeskHelp.defaultProps = {\n article: '',\n};\n\nexport default injectIntl(ModalTitleZendeskHelp);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage, injectIntl, useIntl } from 'react-intl';\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport Checkbox from '@/shared/components/input/Checkbox';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport moment from 'moment';\nimport classNames from 'classnames';\nimport intlShape from '@/shared/utils/intlShape';\nimport DatePicker from '@/shared/components/input/DatePicker';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport CanRead from '@/shared/components/security/CanRead';\nimport UserSearch from '@/shared/components/input/UserSearch';\nimport YearSelect from '@/shared/components/input/YearSelect';\nimport ResourceAutoComplete from './ResourceAutoComplete';\nimport messages from './registrationMessages';\nimport { retrieveResources } from './resourceApi';\nimport { isBeforeMinimum } from '../../utils/validationHelpers';\nimport AuthService from '@/shared/services/AuthService';\nimport { guid1 } from '@/shared/utils/guid';\nimport TimeButtons from './partials/TimeButtons';\n\nclass BatchRegistrationModal extends Component {\n state = {};\n\n static propTypes = {\n onSave: PropTypes.func.isRequired,\n intl: intlShape.isRequired,\n onClose: PropTypes.func.isRequired,\n show: PropTypes.bool,\n defaultResourceId: PropTypes.string,\n countSelectedRelations: PropTypes.number,\n calculateDurationPerRelation: PropTypes.bool,\n assignmentTemplateId: PropTypes.string,\n crmType: PropTypes.number,\n };\n\n static defaultProps = {\n show: false,\n defaultResourceId: undefined,\n countSelectedRelations: 0,\n calculateDurationPerRelation: true,\n assignmentTemplateId: undefined,\n crmType: undefined,\n };\n\n constructor(props) {\n super(props);\n this.state = {\n selectedTask: undefined,\n durationPerRelationActive: true,\n showValidation: false,\n registration: {\n type: 0,\n date: moment(),\n\n durationHour: 0,\n durationMinutes: 0,\n durationMinutesTotal: 0,\n\n fromHour: 0,\n fromMinutes: 0,\n fromMinutesTotal: 0,\n\n quantity: 0,\n isBillable: true,\n resource: undefined,\n },\n };\n }\n\n componentDidMount() {\n const cache = DataCacheService.getDataCache();\n\n if (!cache) {\n throw new Error('DataCache not found in RegistrationModal.jsx');\n }\n\n this.form = React.createRef();\n\n this.retrieveResources(0);\n\n let employeeStartHour = cache.employee && cache.employee.workDayStartHour;\n let employeeEndHour = cache.employee && cache.employee.workDayEndHour;\n\n if (employeeStartHour) {\n employeeStartHour = moment(employeeStartHour, 'HH:mm:ss');\n }\n if (employeeEndHour) {\n employeeEndHour = moment(employeeEndHour, 'HH:mm:ss');\n }\n\n const { registration } = this.state;\n\n this.getLastRegistrationTime(registration.date);\n\n this.setState(state => ({\n ...state,\n employeeStartHour,\n employeeEndHour,\n registration: {\n ...state.registration,\n },\n }));\n }\n\n onResourceTypeChanged = resourceType => {\n this.setState(\n state => ({\n ...state,\n registration: {\n ...state.registration,\n type: parseInt(resourceType),\n quantity: parseInt(resourceType) === 1 ? 1 : 0,\n resource: undefined,\n },\n }),\n () => {\n this.retrieveResources(resourceType);\n },\n );\n };\n\n retrieveResources = resourceType => {\n const { intl, defaultResourceId } = this.props;\n retrieveResources(intl, resourceType).then(resources => {\n const defaultResource = defaultResourceId\n ? resources.find(x => x.id === defaultResourceId)\n : null;\n this.setState(\n state => ({\n ...state,\n resources,\n registration: defaultResource\n ? {\n ...state.registration,\n isBillable: defaultResource.isBillable,\n resource: defaultResource,\n }\n : state.registration,\n }),\n () => {\n const { registration } = this.state;\n if (registration.resource) {\n this.onResourceChanged(registration.resource);\n }\n },\n );\n });\n };\n\n getLastRegistrationTime = date => {\n const now = new Date();\n let hour = now.getHours();\n let minutes = now.getMinutes();\n\n api.base\n .get(\n `${config.appUrls.api}/api/registration/LastRegistrationTime?date=${moment(date).format(\n 'YYYY-MM-DD',\n )}`,\n )\n .then(\n ({ data }) => {\n if (data) {\n // TimeSpan was sent back from back-end, parse it to moment obj and retrieve hour & minutes\n const momentDate = moment(data, 'HH:mm:ss');\n\n hour = momentDate.hour();\n minutes = momentDate.minutes();\n }\n\n const hourInMinutes = hour > 0 ? hour * 60 : 0;\n const totalMinutes = hourInMinutes + minutes;\n\n this.fromTotalMinutesChanged(totalMinutes);\n },\n error => console.error(error),\n );\n };\n\n onResourceChanged = resource => {\n if (resource === undefined) return;\n const { registration } = this.state;\n\n this.setState({\n registration: {\n ...registration,\n isBillable: resource ? resource.isBillable : true,\n resource,\n },\n });\n };\n\n userChanged = user => {\n this.setState(({ registration }) => ({ registration: { ...registration, userId: user?.id } }));\n };\n\n convertHoursToMinutes = hours => (hours > 0 ? hours * 60 : 0);\n\n getTotalDurationMinutes = (toMinutesTotal, fromMinutesTotal) => toMinutesTotal - fromMinutesTotal;\n\n fromHourChanged = hour => {\n const { registration } = this.state;\n const { fromMinutes } = registration;\n\n const hourInMinutes = this.convertHoursToMinutes(hour);\n const fromMinutesTotal = hourInMinutes + fromMinutes;\n\n this.fromTotalMinutesChanged(fromMinutesTotal);\n };\n\n fromMinutesInputChanged = minutes => {\n const { registration } = this.state;\n const { fromMinutes, fromMinutesTotal } = registration;\n\n const newFromMinutesTotal = minutes - fromMinutes + fromMinutesTotal;\n\n this.fromTotalMinutesChanged(newFromMinutesTotal);\n };\n\n fromTotalMinutesChanged = minutes => {\n const { registration } = this.state;\n\n // Max 23h59 or 1439 minutes\n if (minutes > 1439) {\n minutes = 1439;\n }\n\n // If the minutes > 60: calculate the amount of hours that were entered\n const durationHour = parseInt(minutes / 60);\n\n // Subtract the hours from the minutes\n const fromMinutes = parseInt(minutes - durationHour * 60);\n\n // Add the new amount of hours entered to the current amount of hours\n const fromHour = parseInt(durationHour);\n\n // Calculate the total amount of minutes\n const fromMinutesTotal = fromHour * 60 + fromMinutes;\n\n this.setState({\n registration: {\n ...registration,\n fromHour,\n fromMinutes,\n fromMinutesTotal,\n },\n });\n };\n\n durationMinutesChanged = minutes => {\n const { registration } = this.state;\n\n // If the minutes > 60: calculate the amount of hours that were entered\n const durationHour = parseInt(minutes / 60);\n\n // Subtract the hours from the minutes\n const durationMinutes = parseInt(minutes - durationHour * 60);\n\n // Add the new amount of hours entered to the current amount of hours\n const newHours = parseInt(durationHour);\n\n // Calculate the total amount of minutes\n const durationMinutesTotal = newHours * 60 + durationMinutes;\n\n this.setState({\n registration: {\n ...registration,\n durationHour: newHours,\n durationMinutes,\n durationMinutesTotal,\n },\n });\n };\n\n durationMinutesInputChanged = minutes => {\n this.setState({ touchedDuration: true });\n\n if (minutes < 0) {\n minutes = 0;\n }\n\n const { registration } = this.state;\n const { durationMinutesTotal, durationMinutes } = registration;\n\n const newDurationMinutesTotal = durationMinutesTotal + (minutes - durationMinutes);\n\n this.durationMinutesChanged(newDurationMinutesTotal);\n };\n\n durationHourInputChanged = hour => {\n this.setState({ touchedDuration: true });\n\n if (hour < 0) {\n hour = 0;\n }\n\n const { registration } = this.state;\n const { durationMinutes } = registration;\n\n const hourInMinutes = hour > 0 ? hour * 60 : 0;\n const newDurationMinutesTotal = hourInMinutes + durationMinutes;\n\n this.durationMinutesChanged(newDurationMinutesTotal);\n };\n isFormInvalid = () => {\n const { registration } = this.state;\n const { calculateDurationPerRelation } = this.props;\n if (!registration.date) return true;\n if (!registration.resource) return true;\n if (!registration.resource.id) return true;\n\n if (registration.type === 0) {\n if (registration.durationMinutesTotal <= 0) return true;\n if (calculateDurationPerRelation && this.calculateDurationPerRelation() <= 0) return true;\n }\n if (registration.type === 1 && registration.quantity < 1) return true;\n\n return false;\n };\n saveRegistration = () => {\n const { onSave, countSelectedRelations, calculateDurationPerRelation } = this.props;\n\n const { registration, selectedTask, durationPerRelationActive } = this.state;\n if (this.isFormInvalid()) return;\n\n const model = { ...registration };\n\n const duration = calculateDurationPerRelation\n ? durationPerRelationActive\n ? model.durationMinutesTotal * countSelectedRelations\n : Math.round(this.calculateDurationPerRelation() * countSelectedRelations)\n : model.durationMinutesTotal;\n\n model.durationMinutesTotal = duration;\n model.subtaskTemplateId = selectedTask ? selectedTask.id : null;\n model.fromMinutes = model.fromMinutesTotal;\n\n return onSave(model);\n };\n\n closeModal = () => {\n const { onClose } = this.props;\n onClose();\n };\n\n addMinutes = minutes => {\n const { registration } = this.state;\n const totalDurationMinutes = registration.durationMinutesTotal + minutes;\n\n this.durationMinutesChanged(totalDurationMinutes);\n };\n\n dateChanged = date => {\n const { registration } = this.state;\n if (date) this.getLastRegistrationTime(date);\n\n this.setState({\n registration: {\n ...registration,\n date,\n },\n });\n };\n\n referenceYearChanged = value => {\n const { registration } = this.state;\n let referenceYear = parseInt(value) || null;\n if (referenceYear !== null) {\n if (referenceYear < 2000) referenceYear = null;\n else if (referenceYear > 2200) referenceYear = moment.utc().year;\n }\n this.setState({\n registration: {\n ...registration,\n referenceYear,\n },\n });\n };\n\n quantityChanged = quantity => {\n const { registration } = this.state;\n\n if (quantity < 1) {\n quantity = 1;\n }\n\n this.setState({\n registration: {\n ...registration,\n quantity,\n },\n });\n };\n\n taskChanged = taskId => {\n const { tasks } = this.props;\n const { resources } = this.state;\n const task = tasks.find(x => x.id === taskId);\n this.setState({\n selectedTask: task,\n });\n\n if (task.resourceId) {\n const resource = resources.find(x => x.id === task.resourceId);\n if (resource != null) {\n this.onResourceChanged(resource);\n }\n }\n };\n\n calculateDurationPerRelation = () => {\n const { registration, durationPerRelationActive } = this.state;\n const { countSelectedRelations } = this.props;\n const totalDuration = registration.durationMinutesTotal;\n\n if (countSelectedRelations === 0) return 0; // wie deelt door 0 is een snul\n if (durationPerRelationActive) {\n return totalDuration;\n }\n const durationPerRelation = totalDuration / countSelectedRelations;\n\n // round to nearest int\n return Math.floor(durationPerRelation);\n };\n\n showValidation = () => this.setState({ showValidation: true });\n\n render() {\n const { show, intl, tasks, countSelectedRelations, crmType, assignmentTemplateId } = this.props;\n const {\n dateFocused,\n resources,\n registration,\n touchedDuration,\n selectedTask,\n employeeStartHour,\n employeeEndHour,\n durationPerRelationActive,\n showValidation,\n } = this.state;\n const invalidResource = !registration.resource;\n\n const durationClassName = classNames('form-group', {\n 'has-error': (showValidation || touchedDuration) && registration.durationMinutesTotal <= 0,\n });\n const durationPerRelation = registration.type !== 0 ? 0 : this.calculateDurationPerRelation();\n\n let surpassesCurrentDay = false;\n const isSystemUser = registration.userId && registration.userId === guid1;\n\n // if the registration surpasses the current day, the next registration will be made on the next day, starting at the employee's starting workhour\n if (\n registration.date &&\n registration.type === 0 &&\n employeeStartHour &&\n employeeEndHour &&\n !isSystemUser\n ) {\n const startTime = moment().set({\n year: registration.date.year(),\n month: registration.date.month(),\n day: registration.date.date(),\n hour: registration.fromHour,\n minute: registration.fromMinutes,\n });\n\n const totalMinutes = durationPerRelationActive\n ? registration.durationMinutesTotal * countSelectedRelations\n : Math.round(durationPerRelation * countSelectedRelations);\n\n const endTime = startTime.clone().add(totalMinutes, 'minutes');\n\n if (endTime.isAfter(startTime, 'day')) {\n surpassesCurrentDay = true;\n }\n }\n\n return (\n \n {show && (\n
    \n
    \n \n \n
    \n this.setState({ dateFocused: focused })}\n id=\"registrationDate\"\n required\n block\n small\n isOutsideRange={isBeforeMinimum}\n />\n
    \n {AuthService.hasFeature('ReferenceYear') ? (\n <>\n \n
    \n \n
    \n \n ) : null}\n
    \n\n {tasks && (\n
    \n \n
    \n this.taskChanged(e.target.value)}\n className=\"form-control form-field\"\n value={(selectedTask && selectedTask.id) || ''}\n >\n {!selectedTask && (\n \n )}\n {tasks.map(task => (\n \n ))}\n \n
    \n
    \n )}\n\n
    \n
    \n \n\n \n
    \n
    \n\n
    \n \n
    \n \n
    \n
    \n\n
    \n \n
    \n {resources && resources.length && (\n \n )}\n
    \n
    \n\n {registration.type === 0 && (\n
    \n
    \n {!isSystemUser && (\n <>\n \n
    \n
    \n this.fromHourChanged(e.target.value)}\n className=\"form-control\"\n />\n :\n this.fromMinutesInputChanged(e.target.value)}\n className=\"form-control\"\n />\n
    \n
    \n \n )}\n
    \n
    \n \n
    \n
    \n this.durationHourInputChanged(e.target.value)}\n className=\"form-control \"\n />\n :\n this.durationMinutesInputChanged(e.target.value)}\n className=\"form-control\"\n />\n
    \n
    \n
    \n \n
    \n
    \n\n {countSelectedRelations > 1 && durationPerRelation > 0 && (\n
    \n
    \n \n
    \n
    \n )}\n {countSelectedRelations > 1 &&\n registration.durationMinutesTotal > 0 &&\n durationPerRelation === 0 && (\n
    \n
    \n \n \n
    \n
    \n
    \n )}\n\n {surpassesCurrentDay && (\n
    \n
    \n \n \n
    \n
    \n \n )}\n \n )}\n\n {registration.type === 1 && (\n
    \n
    \n \n
    \n
    \n this.quantityChanged(e.target.value)}\n className=\"form-control\"\n />\n
    \n
    \n
    \n\n {countSelectedRelations > 1 &&\n registration.quantity > 0 &&\n registration.resource && (\n
    \n
    \n \n
    \n
    \n )}\n
    \n )}\n\n
    \n {/* BILLABLE */}\n \n
    \n \n this.setState({\n registration: {\n ...registration,\n isBillable: value,\n },\n })\n }\n />\n
    \n
    \n {countSelectedRelations > 1 && (\n
    \n \n this.setState({\n durationPerRelationActive: value,\n })\n }\n />\n
    \n )}\n
    \n\n {/* REMARK */}\n
    \n \n
    \n \n this.setState({\n registration: {\n ...registration,\n remark: e.target.value,\n },\n })\n }\n />\n
    \n
    \n\n {/* INTERNAL REMARK */}\n
    \n \n
    \n \n this.setState({\n registration: {\n ...registration,\n internalRemark: e.target.value,\n },\n })\n }\n />\n
    \n
    \n \n
    \n )}\n \n );\n }\n}\n\nexport default injectIntl(BatchRegistrationModal);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport moment from 'moment';\nimport { defineMessages, FormattedMessage, injectIntl, useIntl } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport Checkbox from '@/shared/components/input/Checkbox';\nimport api from '@/shared/api';\nimport enumCache from '@/shared/services/EnumCacheService';\nimport { dynamicSort, dynamicSortMultiple } from '@/shared/utils/dynamicSort';\nimport classNames from 'classnames';\nimport DateInput from '@/shared/components/input/DateInput';\nimport config from '../../config';\nimport ModalTitleZendeskHelp from './ModalTitleZendeskHelp';\n\nconst messages = defineMessages({\n GenerateDocuments: 'Generate documents',\n TemplateType: 'Template type',\n Templates: 'Templates',\n NoTemplateForLanguage: 'No template found for this language',\n ChooseDocumentTemplatePerLanguage: 'ChooseDocumentTemplatePerLanguage',\n AddQrCode: 'Add QR code',\n ConvertToPdf: 'Convert to pdf?',\n FileType: 'File type',\n LinkDocumentTo: 'Link document to',\n MainTask: 'Main task',\n DocumentType: 'Document type',\n DocumentDate: 'Document date',\n DocumentStartDate: 'Document start date',\n DocumentEndDate: 'Document end date',\n});\nconst defaultTemplateTypes = [3, 10, 13, 18, 21, 22, 23, 26, 27, 99];\nconst defaultDocumentTypes = [11, 12, 13, 29, 78, 93, 94, 144, 150, 5000];\n//\nconst templateTypesWithDocumentTypeDropdown = [99];\n\nclass BatchGenerateDocumentModal extends Component {\n state = {\n asPdf: false,\n addQrCode: false,\n documentType: null,\n fileNameFormat: null,\n templates: {\n // template per language\n },\n subtaskTemplateId: null, // link to main task or subtask,\n documentDate: moment.utc().startOf('day'),\n documentStartDate: null,\n documentEndDate: null,\n templateType: null,\n templateTypes: [],\n\n languageTemplates: [],\n allDocumentTemplates: [],\n showValidation: false,\n };\n\n componentDidMount() {\n const { languages, templateTypes, intl, documentTypes } = this.props;\n if (!languages || languages.length === 0) return;\n Promise.all([\n enumCache.getTranslated('documenttype', intl),\n enumCache.getTranslated('templatetype', intl),\n api.base.get(`${config.appUrls.api}/api/documentTemplate/Templates`, {\n params: {\n templateTypes: templateTypes || defaultTemplateTypes,\n },\n }),\n ]).then(([documentTypesEnum, templateTypeEnum, { data: documentTemplates }]) => {\n const templateTypesInUse = new Set();\n const allDocumentTemplates = documentTemplates\n .map(template => ({\n key: template.id,\n label: template.name,\n templateType: template.templateType,\n templateTypeLabel: intl.formatMessage(listItemMsg('templatetype', template.templateType)),\n languageCode: template.languageCode,\n }))\n .sort(dynamicSortMultiple('templateTypeLabel', 'label'));\n\n const languageTemplates = languages.map(langCode => {\n const templatesForLang = allDocumentTemplates.filter(x => x.languageCode === langCode);\n return {\n key: langCode,\n label: intl.formatMessage(listItemMsg('language', langCode, langCode)),\n templateTypes: Object.values(\n // Group by templateType\n templatesForLang.reduce((obj, template) => {\n if (!obj[template.templateType])\n // eslint-disable-next-line no-param-reassign\n obj[template.templateType] = {\n key: template.templateType,\n label: template.templateTypeLabel,\n templates: [],\n };\n obj[template.templateType].templates.push(template);\n templateTypesInUse.add(template.templateType);\n return obj;\n }, {}),\n ).sort(dynamicSort('label')),\n };\n });\n\n this.setState({\n languageTemplates,\n templates: {},\n documentTypes: documentTypesEnum.filter(x => (documentTypes || []).indexOf(x.id) >= 0),\n templateTypes: templateTypeEnum.filter(x => templateTypesInUse.has(x.id)),\n allDocumentTemplates,\n });\n });\n }\n\n templateChanged = (langCode, templateId) => {\n this.setState(\n ({ templates, allDocumentTemplates, templateType: oldTemplateType, documentType }) => {\n let templateType = null;\n if (templateId) {\n ({ templateType } = allDocumentTemplates.find(x => x.key === templateId) || {});\n }\n\n return {\n templates: { ...templates, [langCode]: templateId || null },\n templateType,\n documentType: oldTemplateType !== templateType ? null : documentType,\n };\n },\n );\n };\n templateTypeChanged = e => {\n const templateType = e.target.value || null;\n\n this.setState({\n templateType: templateType ? parseInt(templateType) : null,\n templates: {},\n documentType: null,\n });\n };\n\n asPdfChanged = e => {\n const value = parseInt(e.target.value);\n this.setState({ asPdf: value === 1 });\n };\n\n isValid = () => {\n const { templates, documentDate, documentStartDate, documentEndDate } = this.state;\n if (!Object.keys(templates).some(langCode => !!templates[langCode])) return false;\n if (!documentDate || !moment(documentDate).isValid()) return false;\n if (documentStartDate && !moment(documentStartDate).isValid()) return false;\n if (documentEndDate && !moment(documentEndDate).isValid()) return false;\n if (documentStartDate && documentEndDate && documentEndDate.isBefore(documentStartDate, 'day'))\n return false;\n return true;\n };\n\n onSave = () => {\n if (!this.isValid()) return;\n const {\n templates,\n asPdf,\n addQrCode,\n documentType,\n fileNameFormat,\n subtaskTemplateId,\n documentDate,\n documentStartDate,\n documentEndDate,\n } = this.state;\n const { onSave } = this.props;\n const languagesWithTemplateId = Object.keys(templates).reduce((result, langCode) => {\n if (!templates[langCode]) return result;\n // eslint-disable-next-line no-param-reassign\n result[langCode] = templates[langCode];\n return result;\n }, {});\n\n const parameters = {\n templates: languagesWithTemplateId,\n asPdf,\n addQrCode,\n documentType,\n fileNameFormat,\n subtaskTemplateId,\n documentDate,\n documentStartDate,\n documentEndDate,\n };\n\n return onSave(parameters);\n };\n\n closeModal = () => {\n const { onClose } = this.props;\n onClose();\n };\n\n render() {\n const { show, intl, subtasks, languages } = this.props;\n const {\n languageTemplates,\n templates,\n asPdf,\n addQrCode,\n documentType,\n fileNameFormat,\n subtaskTemplateId,\n showValidation,\n documentTypes,\n documentDate,\n documentStartDate,\n documentEndDate,\n templateType,\n templateTypes,\n } = this.state;\n\n const showTemplateTypeSelect = languages && languages.length > 1;\n const showTemplates = !showTemplateTypeSelect || !!templateType;\n\n const showDocumentTypeSelect =\n !!templateType && templateTypesWithDocumentTypeDropdown.indexOf(templateType) >= 0;\n\n return (\n \n }\n show={show}\n onClose={this.closeModal}\n onSave={this.onSave}\n disabled={showValidation && !this.isValid()}\n onHoverSave={() => this.setState({ showValidation: true })}\n size=\"lg\"\n >\n {show && languageTemplates.length > 0 && (\n
    \n
    \n {showTemplateTypeSelect ? (\n \n \n
    \n \n {!templateType && \n ))}\n \n
    \n
    \n ) : null}\n

    \n \n

    \n {languageTemplates.map(language => {\n const selectableTemplates =\n templateType !== null && showTemplateTypeSelect\n ? (language.templateTypes || []).filter(x => x.key === templateType)\n : language.templateTypes || [];\n\n return (\n 0 &&\n !templates[language.key],\n })}\n >\n \n
    \n {selectableTemplates.length > 0 ? (\n this.templateChanged(language.key, e.target.value)}\n className=\"form-control\"\n value={templates[language.key] || ''}\n disabled={!showTemplates}\n >\n \n {group.templates.map(template => (\n \n ))}\n \n ))}\n \n ) : (\n
    \n \n
    \n )}\n
    \n \n );\n })}\n
    \n \n
    \n this.setState({ documentDate: date })}\n placeholder={intl.formatMessage(messages.DocumentDate)}\n />\n
    \n
    \n
    \n \n
    \n this.setState({ documentStartDate: date })}\n placeholder={intl.formatMessage(messages.DocumentStartDate)}\n required={false}\n />\n
    \n
    \n
    \n \n
    \n this.setState({ documentEndDate: date })}\n placeholder={intl.formatMessage(messages.DocumentEndDate)}\n required={false}\n />\n
    \n
    \n {subtasks && subtasks.length > 0 ? (\n
    \n \n
    \n this.setState({ subtaskTemplateId: e.target.value || null })}\n className=\"form-control\"\n value={subtaskTemplateId || ''}\n >\n \n {subtasks.map(t => (\n \n ))}\n \n
    \n
    \n ) : null}\n {showDocumentTypeSelect && documentTypes && documentTypes.length > 0 ? (\n
    \n \n
    \n this.setState({ documentType: e.target.value || null })}\n className=\"form-control\"\n value={documentType || ''}\n >\n \n ))}\n \n
    \n
    \n ) : null}\n
    \n
    \n this.setState({ asPdf: value })}\n text={intl.formatMessage(messages.ConvertToPdf)}\n />\n
    \n
    \n
    \n
    \n this.setState({ addQrCode: value })}\n text={intl.formatMessage(messages.AddQrCode)}\n />\n
    \n
    \n \n \n )}\n \n );\n }\n}\n\nBatchGenerateDocumentModal.propTypes = {\n languages: PropTypes.arrayOf(PropTypes.string).isRequired,\n templateTypes: PropTypes.arrayOf(PropTypes.number),\n documentTypes: PropTypes.arrayOf(PropTypes.number),\n show: PropTypes.bool,\n subtasks: PropTypes.arrayOf(PropTypes.shape({})),\n intl: intlShape.isRequired,\n};\nBatchGenerateDocumentModal.defaultProps = {\n templateTypes: defaultTemplateTypes,\n documentTypes: defaultDocumentTypes,\n show: true,\n subtasks: [],\n};\n\nexport default injectIntl(BatchGenerateDocumentModal);\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport intlShape from '@/shared/utils/intlShape';\nimport RelationName from '@/shared/components/RelationName';\nimport ContactIcon from '@/shared/components/ContactIcon';\nimport UserName from '@/shared/components/UserName';\nimport { FaEnvelope, FaTrashAlt, FaUndo } from 'react-icons/fa';\nimport { CanDelete, CanRead, CanCreate } from '@/shared/components/security';\nimport {\n isBelgianTenantConfiguration,\n isDutchTenantConfiguration,\n} from '@/shared/TenantConfigurationConstants';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport FormattedDayMonth from '@/shared/components/FormattedDayMonth';\nimport messages from './relationOverviewMessages';\nimport Checkbox from '../../../shared/components/input/Checkbox';\nimport FormattedDateShort from '../../../shared/components/FormattedDateShort';\nimport employeeProfileMessages from '@/shared/messages/employeeProfileMessages';\n\nexport const getColumnDefinitions = tenantConfiguration =>\n [\n {\n id: 'firstName',\n message: messages.FirstName,\n sortKey: 'firstName',\n visibleByDefault: false,\n },\n {\n id: 'initials',\n message: messages.Initials,\n visibleByDefault: false,\n className: 'hidden-xs',\n sortKey: 'initials',\n available: isDutchTenantConfiguration(tenantConfiguration),\n },\n {\n id: 'infix',\n message: messages.Infix,\n visibleByDefault: false,\n className: 'hidden-xs',\n sortKey: 'infix',\n available: isDutchTenantConfiguration(tenantConfiguration),\n },\n {\n id: 'name',\n message: messages.LastName,\n visibleByDefault: false,\n className: 'hidden-xs',\n render: ({ relation }) => {relation.type === 0 ? '' : relation.name},\n },\n {\n id: 'location',\n message: messages.Location,\n visibleByDefault: true,\n className: 'hidden-xs',\n render: ({ relation }) => (\n \n {relation.streetNr}\n
    \n {relation.location}\n
    \n ),\n },\n {\n id: 'phone',\n message: messages.Phone,\n disableSorting: true,\n visibleByDefault: true,\n className: 'hidden-xs',\n render: ({ relation }) => (\n \n {relation.phone && }\n {relation.mobile && }\n \n ),\n },\n {\n id: 'email',\n message: messages.Email,\n visibleByDefault: true,\n className: 'hidden-xs',\n render: ({ relation, goToInteractions }) => (\n goToInteractions(relation.id, true)}\n />\n ),\n },\n {\n id: 'enterpriseNumber',\n message: messages.VatOrEnterpriseNumber,\n visibleByDefault: true,\n className: 'hidden-xs',\n sortKey: 'vatNumber',\n render: ({ relation, intl }) =>\n relation.vatNumber === 'VatPending'\n ? intl.formatMessage(messages.VatPending)\n : relation.vatNumber,\n },\n {\n id: 'nationalNumber',\n message: messages.NationalNumber,\n visibleByDefault: true,\n className: 'hidden-xs',\n available: isBelgianTenantConfiguration(tenantConfiguration),\n },\n {\n id: 'kvkNumber',\n message: messages.KvkNumber,\n visibleByDefault: true,\n className: 'hidden-xs',\n available: isDutchTenantConfiguration(tenantConfiguration),\n },\n {\n id: 'fiscalNumber',\n message: messages.FiscalNumber,\n visibleByDefault: true,\n className: 'hidden-xs',\n available: isDutchTenantConfiguration(tenantConfiguration),\n },\n {\n id: 'obNumber',\n message: messages.ObNumber,\n visibleByDefault: false,\n className: 'hidden-xs',\n available: isDutchTenantConfiguration(tenantConfiguration),\n },\n {\n id: 'lbNumber',\n message: messages.LbNumber,\n visibleByDefault: false,\n className: 'hidden-xs',\n available: isDutchTenantConfiguration(tenantConfiguration),\n },\n {\n id: 'bsnNumber',\n message: messages.BsnNumber,\n visibleByDefault: true,\n className: 'hidden-xs',\n available: isDutchTenantConfiguration(tenantConfiguration),\n },\n {\n id: 'rsinNumber',\n message: messages.RsinNumber,\n visibleByDefault: false,\n className: 'hidden-xs',\n available: isDutchTenantConfiguration(tenantConfiguration),\n },\n {\n id: 'customerCode',\n message: messages.CustomerCode,\n visibleByDefault: true,\n className: 'hidden-xs',\n },\n {\n id: 'accountingNr',\n message: messages.AccountingNumber,\n visibleByDefault: true,\n className: 'hidden-xs',\n },\n {\n id: 'uniqueIdentifier',\n message: messages.UniqueIdentifier,\n visibleByDefault: true,\n className: 'hidden-xs',\n },\n {\n id: 'companyId',\n message: messages.OwnCompany,\n disableSorting: true,\n visibleByDefault: false,\n className: 'hidden-xs',\n render: ({ relation }) => {DataCacheService.getCompanySettings(relation.companyId)?.name},\n },\n {\n id: 'associateUser',\n message: employeeProfileMessages.Associate,\n visibleByDefault: false,\n className: 'hidden-xs',\n render: ({ relation }) => ,\n },\n {\n id: 'responsibleUser',\n message: employeeProfileMessages.Responsible,\n visibleByDefault: false,\n className: 'hidden-xs',\n render: ({ relation }) => ,\n },\n {\n id: 'seniorUser',\n message: employeeProfileMessages.SeniorUser,\n visibleByDefault: false,\n render: ({ relation }) => ,\n },\n {\n id: 'assistantUser',\n message: employeeProfileMessages.Assistant,\n visibleByDefault: false,\n className: 'hidden-xs',\n render: ({ relation }) => ,\n },\n {\n id: 'assistantBackupUser',\n message: employeeProfileMessages.AssistantBackup,\n visibleByDefault: false,\n className: 'hidden-xs',\n render: ({ relation }) => ,\n },\n {\n id: 'billingUser',\n message: employeeProfileMessages.BillingUser,\n visibleByDefault: false,\n render: ({ relation }) => ,\n },\n { id: 'alias', message: messages.Alias, sortKey: 'alias', visibleByDefault: false },\n {\n id: 'startDate',\n message: messages.StartDate,\n visibleByDefault: true,\n className: 'hidden-xs',\n render: ({ relation }) => ,\n },\n {\n id: 'active',\n message: messages.Active,\n sortKey: 'isActive',\n visibleByDefault: true,\n className: 'hidden-xs',\n render: ({ relation, intl }) =>\n relation.isActive ? intl.formatMessage(messages.Yes) : intl.formatMessage(messages.No),\n },\n {\n id: 'endDate',\n message: messages.EndDate,\n visibleByDefault: false,\n className: 'hidden-xs',\n render: ({ relation }) => ,\n },\n {\n id: 'endFiscalYear',\n message: messages.EndFiscalYear,\n visibleByDefault: false,\n className: 'hidden-xs',\n render: ({ relation }) => ,\n },\n ].filter(x => x.available === undefined || x.available);\n\nconst RelationOverviewRow = ({\n relation,\n intl,\n handleRelationSelect,\n showDeleteRelationConfirmation,\n restoreRelation,\n goToInteractions,\n columnStatus,\n}) => (\n \n \n \n handleRelationSelect(relation)} value={relation.selected} />\n \n \n \n \n\n {getColumnDefinitions(DataCacheService.getTenantConfiguration()).map(\n column =>\n columnStatus[column.id] && (\n \n {column.render\n ? column.render({ relation, intl, goToInteractions })\n : relation[column.id]}\n \n ),\n )}\n \n \n goToInteractions(relation.id)}\n title={intl.formatMessage(messages.OpenTimeline)}\n >\n \n \n \n\n \n goToInteractions(relation.id, true)}\n tooltip={intl.formatMessage(messages.SendEmail)}\n >\n \n \n \n \n {relation.isActive ? (\n showDeleteRelationConfirmation(relation)}\n >\n \n \n ) : (\n restoreRelation(relation)}>\n \n \n )}\n \n \n \n \n);\n\nRelationOverviewRow.propTypes = {\n relation: PropTypes.shape({}).isRequired,\n intl: intlShape.isRequired,\n handleRelationSelect: PropTypes.func.isRequired,\n showDeleteRelationConfirmation: PropTypes.func.isRequired,\n restoreRelation: PropTypes.func.isRequired,\n goToInteractions: PropTypes.func.isRequired,\n columnStatus: PropTypes.objectOf(PropTypes.any).isRequired,\n};\n\nexport default RelationOverviewRow;\n","import React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport DataCacheService from '@/shared/services/DataCacheService';\n\nclass UserName extends PureComponent {\n render() {\n const { userId, ...rest } = this.props;\n if (!userId) return null;\n return {DataCacheService.getUserName(userId)};\n }\n}\n\nUserName.propTypes = {\n userId: PropTypes.string,\n};\nUserName.defaultProps = {\n userId: undefined,\n};\n\nexport default UserName;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport CollapsablePanel from '@/shared/components/CollapablePanel';\n\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport moment from 'moment';\nimport api from '@/shared/api';\nimport DatePicker from '@/shared/components/input/DatePicker';\nimport DayMonthPicker from '@/shared/components/input/DayMonthPicker';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport classNames from 'classnames';\nimport Checkbox from '@/shared/components/input/Checkbox';\nimport {\n validateDateRange,\n validateEndDate,\n isBeforeLastYear,\n} from '@/shared/utils/validationHelpers';\nimport EnumSelectV2 from '@/shared/components/input/EnumSelectV2';\nimport config from '../../../../config';\nimport messages from '../relationOverviewMessages';\nimport AuthService, { functionalities, privileges } from '@/shared/services/AuthService';\n\nexport default class UpdateTaskScheduleModal extends Component {\n state = {\n planningStart: moment(), // Set start date to today\n planningStop: null,\n scheduleDate: null,\n templates: [],\n action: 'add',\n deletePlannedTasks: false,\n deviationsCollapsed: true,\n };\n static propTypes = {\n show: PropTypes.bool.isRequired,\n intl: intlShape.isRequired,\n onSave: PropTypes.func.isRequired,\n onClose: PropTypes.func.isRequired,\n };\n\n actionChanged = event => {\n const action = event.target.value;\n this.setState({\n action,\n });\n };\n\n retrievePossibleDeviationsForTemplate = templateId => {\n const promise = templateId\n ? api.base.get(\n `${config.appUrls.tasks}/api/TaskSchedules/deviationpossibilities/${templateId}`,\n )\n : Promise.resolve({ data: null });\n\n return promise.then(({ data }) => data);\n };\n\n retrieveTaskTemplates = () => {\n const { intl } = this.props;\n\n api.base.get(`${config.appUrls.tasks}/api/TaskTemplates/Schedules`).then(({ data }) => {\n const sortOnLabel = (a, b) => (a.label > b.label) - (a.label < b.label);\n const translatedTemplates = data\n .map(t => ({\n ...t,\n label: intl.formatMessage(listItemMsg('taskTemplate', t.id, t.name)), // Map translation to label property\n periodicities: t.periodicities\n .map(p => ({\n ...p,\n label: intl.formatMessage(listItemMsg('taskperiodicity', p.id, p.name)), // Map translation to label property\n }))\n .sort(sortOnLabel),\n }))\n .sort(sortOnLabel);\n\n let selectedTemplate = null;\n let selectedPeriodicity = null;\n if (translatedTemplates && translatedTemplates.length > 0) {\n [selectedTemplate] = translatedTemplates;\n [selectedPeriodicity] = selectedTemplate.periodicities;\n }\n\n this.retrievePossibleDeviationsForTemplate(selectedTemplate?.id).then(deviations => {\n this.setState(state => ({\n ...state,\n templates: translatedTemplates,\n selectedTemplate,\n selectedPeriodicity,\n deviations,\n }));\n });\n });\n };\n\n componentDidMount() {\n this.retrieveTaskTemplates();\n }\n\n templateChanged = event => {\n const { templates } = this.state;\n const templateId = event.target.value;\n const template = templates.find(x => x.id === templateId);\n\n let selectedPeriodicity = null;\n\n if (template && template.periodicities) {\n [selectedPeriodicity] = template.periodicities;\n }\n\n this.retrievePossibleDeviationsForTemplate(template?.id).then(deviations => {\n this.setState(state => ({\n ...state,\n selectedTemplate: template,\n selectedPeriodicity,\n deviations,\n }));\n });\n };\n\n periodicityChanged = event => {\n const { selectedTemplate } = this.state;\n const periodicityId = event.target.value;\n const periodicity = selectedTemplate.periodicities.find(x => x.id === periodicityId);\n\n this.setState(state => ({\n ...state,\n selectedPeriodicity: periodicity,\n }));\n };\n\n isEndDateOutOfRange = endDate => {\n const { planningStart } = this.state;\n if (endDate <= planningStart) return true;\n return false;\n };\n\n isFormInvalid = () => {\n const {\n planningStart,\n planningStop,\n selectedTemplate,\n selectedPeriodicity,\n scheduleDate,\n action,\n } = this.state;\n\n if (action === 'add') {\n if (\n !planningStart ||\n !selectedTemplate ||\n !selectedPeriodicity ||\n (selectedPeriodicity.showScheduleDate && !scheduleDate) ||\n !validateDateRange(planningStart, planningStop, true)\n )\n return true;\n } else if (!selectedTemplate || !selectedPeriodicity) return true;\n\n return false;\n };\n\n onSave = () => {\n const {\n scheduleDate,\n planningStart,\n planningStop,\n selectedTemplate,\n selectedPeriodicity,\n deletePlannedTasks,\n action,\n deviations,\n } = this.state;\n\n const { onSave } = this.props;\n\n let model = {};\n\n if (action === 'add') {\n model = {\n scheduleDate,\n planningStart,\n planningStop,\n taskTemplateId: selectedTemplate.id,\n periodicityId: selectedPeriodicity.id,\n deviations,\n };\n } else {\n model = {\n deletePlannedTasks,\n taskTemplateId: selectedTemplate.id,\n periodicityId: selectedPeriodicity.id,\n };\n }\n\n return onSave({ action, model });\n };\n\n render() {\n const { show, onClose, intl } = this.props;\n const {\n scheduleDate,\n planningStart,\n planningStop,\n planningStartFocused,\n planningStopFocused,\n\n templates,\n selectedTemplate,\n selectedPeriodicity,\n action,\n deletePlannedTasks,\n deviations,\n deviationsCollapsed,\n } = this.state;\n\n const showScheduleDate = (selectedPeriodicity && selectedPeriodicity.showScheduleDate) || false;\n const canCreate = AuthService.hasPermission({\n functionality: functionalities.TaskSchedules,\n privilege: privileges.Create | privileges.Delete,\n });\n const canDelete = AuthService.hasPermission({\n functionality: functionalities.TaskSchedules,\n privilege: privileges.Delete,\n });\n\n if (!show) return null;\n return (\n this.onSave()}\n size=\"lg\"\n >\n
    \n
    \n \n
    \n \n
    \n
    \n
    \n \n
    \n {templates && (\n \n {templates.map(template => (\n \n ))}\n \n )}\n
    \n
    \n\n
    \n \n
    \n \n {selectedTemplate &&\n selectedTemplate.periodicities &&\n selectedTemplate.periodicities.map(periodicity => (\n \n ))}\n \n
    \n
    \n\n {canCreate && action === 'add' && (\n <>\n {showScheduleDate && (\n
    \n \n
    \n this.setState({ scheduleDate: date })}\n id=\"taskScheduleDate\"\n required\n outputType=\"moment\"\n block\n small\n />\n
    \n
    \n )}\n \n \n
    \n \n this.setState({ planningStart: date, planningStop: undefined })\n }\n focused={planningStartFocused}\n onFocusChange={({ focused }) =>\n this.setState({ planningStartFocused: focused })\n }\n id=\"taskScheduleStartDate\"\n required\n block\n small\n isOutsideRange={isBeforeLastYear}\n />\n
    \n
    \n \n \n
    \n this.setState({ planningStop: date })}\n focused={planningStopFocused}\n onFocusChange={({ focused }) => this.setState({ planningStopFocused: focused })}\n id=\"taskScheduleEndDate\"\n isOutsideRange={d => validateEndDate(planningStart, d)}\n />\n
    \n \n \n \n
    \n \n this.setState({ deviationsCollapsed: !deviationsCollapsed })\n }\n title={\n \n {intl.formatMessage(messages.ClickToConfigureDeviations)}\n \n }\n >\n {deviations?.length ? (\n \n \n \n {intl.formatMessage(messages.Task)}\n {intl.formatMessage(messages.ScheduleDeviation)}\n \n \n \n \n {deviations?.map(deviation => (\n \n \n {intl.formatMessage(\n listItemMsg(\n 'taskTemplate',\n deviation.subtaskTemplateId,\n deviation.subtaskTemplateName,\n ),\n )}\n \n \n {\n this.setState({\n deviations: deviations.map(x => {\n if (x.subtaskTemplateId !== deviation.subtaskTemplateId)\n return x;\n return {\n ...x,\n type: v,\n };\n }),\n });\n }}\n />\n \n \n ))}\n \n \n ) : (\n <>\n )}\n \n
    \n \n \n )}\n {canDelete && action === 'remove' && (\n
    \n this.setState({ deletePlannedTasks: !deletePlannedTasks })}\n text={intl.formatMessage(messages.DeletePlannedTasks)}\n title={intl.formatMessage(messages.DeletePlannedTasksTooltip)}\n />\n
    \n )}\n \n \n );\n }\n}\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { injectIntl, FormattedMessage } from 'react-intl';\nimport Toggle from 'react-toggle';\nimport { FaUndo, FaFilter } from 'react-icons/fa';\nimport { Dropdown } from 'react-bootstrap';\nimport Axios from 'axios';\nimport TextSearch from '@/shared/components/input/TextSearch';\nimport intlShape from '@/shared/utils/intlShape';\nimport RelationTypeButtonGroup from '@/shared/components/RelationTypeButtonGroup';\nimport CrmTypeButtonGroup from '@/shared/components/CrmTypeButtonGroup';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport DelayedDateRangePicker from '@/shared/components/input/DelayedDateRangePicker';\nimport MultiSelect, {\n removeItem as removeMultiSelectItem,\n addItem as addMultiSelectItem,\n splitItems as splitMultiSelectItems,\n} from '@/shared/components/input/multiselect/MultiSelect';\nimport api from '@/shared/api';\nimport guid from '@/shared/utils/guid';\nimport momentPropTypes from 'react-moment-proptypes';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport enumCache from '@/shared/services/EnumCacheService';\nimport userStorage from '@/shared/services/userStorage';\nimport CheckboxDropdownMenu from '@/shared/components/input/CheckboxDropdownMenu';\nimport DynamicFilter, {\n getDynamicFiltersFromDefaultFilters,\n initDynamicFilters,\n} from '../../../shared/components/DynamicFilter';\nimport messages from './relationOverviewMessages';\nimport config from '../../../config';\nimport moment from 'moment';\nimport { hasAssignments } from '@/shared/components/security/HasAssignments';\n\nexport const defaultRelationFilters = {\n assistant: null, // UserId\n responsible: null, // UserId\n associate: null, // UserId\n assistantBackup: null, // UserId\n billingUser: null, // UserId\n seniorUser: null, // UserId\n assignedTo: null, // UserId\n searchValue: '', // String,\n communicationChannelSearchValue: '', // String\n includeInactive: false,\n type: [], // Array\n crmTypes: [], // Array\n legalForms: [], // Array\n withLabels: [], // Array\n withoutLabels: [], // Array\n linkType: null,\n linkTypeReverse: null,\n vatPeriodicities: [],\n paymentmethods: [],\n endFiscalYears: [],\n ownCompanies: [],\n languageCode: '',\n countryCode: '',\n teams: [],\n withoutTeams: [],\n financialStatementSchemes: [],\n shareRegisters: [],\n jurisdictions: [],\n sectors: [],\n socialSecretariats: [],\n socialSecurityFunds: [],\n accountingSoftware: [],\n otherSoftware: [],\n sendInvoiceStrategy: [],\n peppolStatus: [],\n mixedTaxPayer: [],\n mixedTaxPayerVatDeductionMethod: [],\n naceCodes: [],\n filterBehaviours: {\n withLabels: 1,\n naceCodes: 1,\n },\n relationGroups: [],\n startDateFrom: null,\n startDateUntil: null,\n withAssignments: [],\n};\n\nconst dynamicFiltersStorageKey = 'RelationOverviewDynamicFilters';\n\nclass RelationOverviewFilters extends Component {\n state = {\n linkTypes: [],\n linkTypesReverse: [],\n teams: [],\n assignmentTemplates: [],\n languages: [],\n countries: [],\n vatPeriodicities: [],\n paymentmethods: [],\n dynamicFilters: [],\n };\n\n static propTypes = {\n onFilterChange: PropTypes.func.isRequired,\n filters: PropTypes.shape({\n responsible: PropTypes.string,\n assistant: PropTypes.string,\n associate: PropTypes.string,\n assistantBackup: PropTypes.string,\n billingUser: PropTypes.string,\n seniorUser: PropTypes.string,\n assignedTo: PropTypes.string,\n searchValue: PropTypes.string,\n communicationChannelSearchValue: PropTypes.string,\n includeInactive: PropTypes.bool,\n type: PropTypes.arrayOf(PropTypes.number),\n crmTypes: PropTypes.arrayOf(PropTypes.number),\n legalForms: PropTypes.arrayOf(PropTypes.number),\n withLabels: PropTypes.arrayOf(PropTypes.string),\n withoutLabels: PropTypes.arrayOf(PropTypes.string),\n linkType: PropTypes.number,\n linkTypeReverse: PropTypes.number,\n ownCompanies: PropTypes.arrayOf(PropTypes.string),\n teams: PropTypes.arrayOf(PropTypes.string),\n withoutTeams: PropTypes.arrayOf(PropTypes.string),\n sectors: PropTypes.arrayOf(PropTypes.number),\n accountingSoftware: PropTypes.arrayOf(PropTypes.number),\n otherSoftware: PropTypes.arrayOf(PropTypes.number),\n sendInvoiceStrategy: PropTypes.arrayOf(PropTypes.number),\n peppolStatus: PropTypes.arrayOf(PropTypes.number),\n naceCodes: PropTypes.arrayOf(PropTypes.string),\n relationGroups: PropTypes.arrayOf(PropTypes.string),\n startDateFrom: PropTypes.oneOfType([PropTypes.string, momentPropTypes.momentObj]),\n startDateUntil: PropTypes.oneOfType([PropTypes.string, momentPropTypes.momentObj]),\n }),\n intl: intlShape.isRequired,\n countSelectedRelations: PropTypes.string.isRequired,\n };\n\n static defaultProps = {\n filters: defaultRelationFilters,\n };\n\n componentDidMount() {\n const { intl, filters } = this.props;\n\n Promise.all([\n enumCache.get('linktype'),\n enumCache.get('paymentmethod'),\n this.getTeams(),\n enumCache.get('shareregister'),\n this.getAssignmentTemplates(),\n ]).then(([linktypes, paymentmethods, teams, shareRegister, assignmentTemplates]) => {\n const dataCache = DataCacheService.getDataCache();\n const allDynamicFilters = [\n ...getDynamicFiltersFromDefaultFilters(defaultRelationFilters, 'crmTypes'),\n\n { id: 'linkType', label: messages.LinkType },\n { id: 'linkTypeReverse', label: messages.LinkTypeReverse },\n { id: 'includeInactive', label: messages.IncludeInactiveRelations },\n { id: 'languageCode', label: messages.Language },\n { id: 'countryCode', label: messages.Country },\n { id: 'teams', label: messages.WithTeams },\n { id: 'withoutTeams', label: messages.WithoutTeams },\n { id: 'withAssignments', label: messages.WithAssignments },\n { id: 'shareRegisters', label: messages.ShareRegister },\n { id: 'jurisdiction', label: messages.Jurisdiction },\n { id: 'paymentMethod', label: messages.PaymentMethod },\n {\n id: 'naceCode',\n label: messages.NaceCode,\n enabled: DataCacheService.isBelgianTenantConfiguration(),\n },\n { id: 'startDate', label: messages.StartDate },\n ];\n const specificCountryCodes = ['BE', 'NL', 'FR', 'LU', 'GB'];\n\n // Create an array for the specific country codes in the format you want\n const specificCountryOptions = specificCountryCodes\n .map(code => {\n const country = dataCache.country.find(x => x.code === code);\n return {\n id: country ? country.code : code,\n label: intl.formatMessage(listItemMsg('country', code, country?.description || '')),\n };\n })\n .sort(dynamicSort('label'));\n\n // Create an array for \"All other countries\" option\n const otherCountryOptions = dataCache.country\n .map(x => ({\n id: x.code,\n label: intl.formatMessage(listItemMsg('country', x.code, x.description || '')),\n }))\n .sort(dynamicSort('label')); // Sort the array based on the translated labels\n\n // Combine the arrays of specific country codes and all other countries\n const combinedOptions = [...specificCountryOptions, ...otherCountryOptions];\n\n let shareRegisters = [\n {id: -1, label: intl.formatMessage(messages.ShareRegisterNotFilledOut)},\n ... shareRegister.map(x => ({id: x.key, label: intl.formatMessage(listItemMsg('shareRegister', x.key, x.value))}))\n ];\n this.setState({\n naceCodes: dataCache.naceCodes.map(x => ({\n id: x.Code,\n label: `${x.Code} - ${x.Name}`,\n })),\n linkTypes: linktypes\n .map(x => ({\n id: x.key,\n label: intl.formatMessage(listItemMsg('linktypeto', x.key, x.value)),\n }))\n .sort(dynamicSort('label')),\n linkTypesReverse: linktypes\n .map(x => ({\n id: x.key,\n label: intl.formatMessage(listItemMsg('linktypeback', x.key, x.value)),\n }))\n .sort(dynamicSort('label')),\n shareRegisters,\n paymentmethods: [\n ...paymentmethods\n .map(x => ({\n id: x.key,\n label: intl.formatMessage(listItemMsg('paymentmethod', x.key, x.value)),\n }))\n .sort(dynamicSort('label')),\n ],\n teams,\n assignmentTemplates,\n languages: dataCache.language.map(x => ({\n id: x.code,\n label: intl.formatMessage(listItemMsg('language', x.code, x.description || '')),\n })),\n countries: combinedOptions,\n dynamicFilters: initDynamicFilters(\n intl,\n allDynamicFilters,\n userStorage.getItem(dynamicFiltersStorageKey) || [],\n filters,\n defaultRelationFilters,\n ),\n jurisdictions: dataCache.jurisdiction\n .map(x => ({\n id: x.id,\n label: intl.formatMessage(listItemMsg('jurisdiction', x.id, x.name || '')),\n }))\n .sort(dynamicSort('label')),\n });\n });\n }\n\n filterChanged = filter => {\n const { filters, onFilterChange } = this.props;\n const newFilters = { ...filters, ...filter };\n if (filters !== newFilters) onFilterChange(newFilters);\n };\n\n getTeams = () => {\n const { intl } = this.props;\n this.teamsToken = Axios.CancelToken.source();\n return api.base\n .get(`${config.appUrls.api}/api/team/MyTeams`, {\n cancelToken: this.teamsToken.token,\n })\n .then(({ data }) => [\n { id: guid.empty, label: intl.formatMessage(messages.WithoutTeams) },\n ...data.map(({ id, name }) => ({ id, label: name })).sort(dynamicSort('label')),\n ]);\n };\n\n getAssignmentTemplates = () => {\n const { intl } = this.props;\n if (!hasAssignments()) return [];\n this.assignmentTemplatesCancelToken = Axios.CancelToken.source();\n return api.base\n .get(`${config.appUrls.api}/api/AssignmentTemplate/Get`, {\n cancelToken: this.assignmentTemplatesCancelToken.token,\n })\n .then(({ data }) => {\n const { intl } = this.props;\n const templates = data\n .map(x => ({\n ...x,\n label: intl.formatMessage(listItemMsg('assignmenttemplate', x.id, x.name)),\n }))\n .sort(dynamicSort('label'));\n\n return templates;\n });\n };\n componentWillUnmount() {\n if (typeof this.teamsToken !== 'undefined') {\n this.teamsToken.cancel('Operation canceled due to leaving page.');\n }\n if (typeof this.assignmentTemplatesCancelToken !== 'undefined') {\n this.assignmentTemplatesCancelToken.cancel('Operation canceled due to leaving page.');\n }\n }\n resetFilters = () => {\n this.filterChanged(defaultRelationFilters);\n };\n\n renderDynamicFilter = ({ type, filters, intl }) => {\n const startDateFrom =\n typeof filters.startDateFrom === 'string'\n ? moment.utc(filters.startDateFrom)\n : filters.startDateFrom;\n const startDateUntil =\n typeof filters.startDateUntil === 'string'\n ? moment.utc(filters.startDateUntil)\n : filters.startDateUntil;\n\n switch (type) {\n case 'linkType': {\n const { linkTypes } = this.state;\n return (\n
    \n
    \n \n this.filterChanged({ linkType: e.target.value ? parseInt(e.target.value) : null })\n }\n value={filters.linkType || ''}\n >\n \n {linkTypes.map(l => (\n \n ))}\n \n
    \n
    \n );\n }\n case 'linkTypeReverse': {\n const { linkTypesReverse } = this.state;\n return (\n
    \n
    \n \n this.filterChanged({\n linkTypeReverse: e.target.value ? parseInt(e.target.value) : null,\n })\n }\n value={filters.linkTypeReverse || ''}\n >\n \n {linkTypesReverse.map(l => (\n \n ))}\n \n
    \n
    \n );\n }\n case 'paymentMethod': {\n const { paymentmethods } = this.state;\n\n const [selectedPaymentMethods, availablePaymentMethods] = splitMultiSelectItems(\n paymentmethods,\n filters.paymentmethods,\n );\n\n return (\n
    \n
    \n \n this.filterChanged({\n paymentmethods: removeMultiSelectItem(filters.paymentmethods, item),\n })\n }\n onItemSelected={item =>\n this.filterChanged({\n paymentmethods: addMultiSelectItem(filters.paymentmethods, item),\n })\n }\n items={availablePaymentMethods}\n placeholder={intl.formatMessage(messages.PaymentMethod)}\n />\n
    \n
    \n );\n }\n case 'includeInactive':\n return (\n
    \n
    \n \n
    \n
    \n );\n case 'languageCode': {\n const { languages } = this.state;\n return (\n
    \n
    \n \n this.filterChanged({ languageCode: e.target.value ? e.target.value : null })\n }\n value={filters.languageCode || ''}\n >\n \n {languages.map(l => (\n \n ))}\n \n
    \n
    \n );\n }\n case 'countryCode': {\n const { countries } = this.state;\n return (\n
    \n
    \n \n this.filterChanged({ countryCode: e.target.value ? e.target.value : null })\n }\n value={filters.countryCode || ''}\n >\n \n {countries.map(l => (\n \n ))}\n \n
    \n
    \n );\n }\n case 'teams': {\n const { teams } = this.state;\n const [selectedTeams, availableTeams] = splitMultiSelectItems(teams, filters.teams);\n\n return (\n
    \n
    \n \n this.filterChanged({\n teams: removeMultiSelectItem(filters.teams, item),\n })\n }\n onItemSelected={item =>\n this.filterChanged({\n teams: addMultiSelectItem(filters.teams, item),\n })\n }\n items={availableTeams}\n placeholder={intl.formatMessage(messages.WithTeams)}\n />\n
    \n
    \n );\n }\n case 'withoutTeams': {\n const { teams } = this.state;\n const noWithoutTeam = teams.filter(x => x.id != guid.empty);\n const [selectedTeams, availableTeams] = splitMultiSelectItems(\n noWithoutTeam,\n filters.withoutTeams,\n );\n\n return (\n
    \n
    \n \n this.filterChanged({\n withoutTeams: removeMultiSelectItem(filters.withoutTeams, item),\n })\n }\n onItemSelected={item =>\n this.filterChanged({\n withoutTeams: addMultiSelectItem(filters.withoutTeams, item),\n })\n }\n items={availableTeams}\n placeholder={intl.formatMessage(messages.WithoutTeams)}\n />\n
    \n
    \n );\n }\n case 'withAssignments': {\n const { assignmentTemplates } = this.state;\n const [selectedAssignments, availableAssignments] = splitMultiSelectItems(\n assignmentTemplates,\n filters.withAssignments,\n );\n\n return (\n
    \n
    \n \n this.filterChanged({\n withAssignments: removeMultiSelectItem(filters.withAssignments, item),\n })\n }\n onItemSelected={item =>\n this.filterChanged({\n withAssignments: addMultiSelectItem(filters.withAssignments, item),\n })\n }\n items={availableAssignments}\n placeholder={intl.formatMessage(messages.WithAssignments)}\n />\n
    \n
    \n );\n }\n case 'shareRegisters': {\n const { shareRegisters } = this.state;\n const [selectedShareRegisters, availableShareRegisters] = splitMultiSelectItems(\n shareRegisters,\n filters.shareRegisters,\n );\n\n return (\n
    \n
    \n \n this.filterChanged({\n shareRegisters: removeMultiSelectItem(filters.shareRegisters, item),\n })\n }\n onItemSelected={item =>\n this.filterChanged({\n shareRegisters: addMultiSelectItem(filters.shareRegisters, item),\n })\n }\n items={availableShareRegisters}\n placeholder={intl.formatMessage(messages.ShareRegister)}\n />\n
    \n
    \n );\n }\n case 'jurisdiction': {\n const { jurisdictions } = this.state;\n const [selectedJurisdictions, availableJurisdictions] = splitMultiSelectItems(\n jurisdictions,\n filters.jurisdictions,\n );\n return (\n
    \n
    \n \n this.filterChanged({\n jurisdictions: removeMultiSelectItem(filters.jurisdictions, item),\n })\n }\n onItemSelected={item =>\n this.filterChanged({\n jurisdictions: addMultiSelectItem(filters.jurisdictions, item),\n })\n }\n items={availableJurisdictions}\n placeholder={intl.formatMessage(messages.Jurisdiction)}\n />\n
    \n
    \n );\n }\n case 'naceCode': {\n const { naceCodes } = this.state;\n\n const [selectedNaceCodes, availableNaceCodes] = splitMultiSelectItems(\n naceCodes,\n filters.naceCodes,\n );\n\n return (\n
    \n
    \n \n this.filterChanged({\n naceCodes: removeMultiSelectItem(filters.naceCodes, item),\n })\n }\n onItemSelected={item =>\n this.filterChanged({\n naceCodes: addMultiSelectItem(filters.naceCodes, item),\n })\n }\n items={availableNaceCodes}\n placeholder={intl.formatMessage(messages.NaceCode)}\n onFilterBehaviourChanged={filterBehaviour => {\n this.filterChanged({\n filterBehaviours: {\n naceCodes: filterBehaviour,\n },\n });\n }}\n filterBehaviour={filters.filterBehaviours?.naceCodes}\n withFilterBehaviour\n />\n
    \n
    \n );\n }\n case 'startDate': {\n return (\n
    \n
    \n \n this.filterChanged({\n startDateFrom: startDate?.format('YYYY-MM-DD'),\n startDateUntil: endDate?.format('YYYY-MM-DD'),\n })\n }\n startDatePlaceholderText={intl.formatMessage(messages.StartDateFrom)}\n endDatePlaceholderText={intl.formatMessage(messages.StartDateUntil)}\n block\n />\n
    \n
    \n );\n }\n default:\n console.warn(`Missing filter: ${type}`);\n return null;\n }\n };\n\n dynamicFilterChanged = (item, selected) => {\n const { dynamicFilters } = this.state;\n const { filters } = this.props;\n\n const newFilters = dynamicFilters.map(x => {\n if (x.id !== item.id && item.id !== 'selectall') return x;\n return { ...x, selected };\n });\n\n userStorage.setItem(\n dynamicFiltersStorageKey,\n newFilters.filter(x => x.selected).map(x => x.id),\n );\n this.setState({\n dynamicFilters: newFilters,\n });\n\n if (\n !selected &&\n JSON.stringify(filters[item.id]) !== JSON.stringify(defaultRelationFilters[item.id])\n ) {\n // Reset filter when it's removed\n this.filterChanged({ [item.id]: defaultRelationFilters[item.id] });\n }\n };\n\n render() {\n const { filters, intl, countSelectedRelations, labels } = this.props;\n const { dynamicFilters } = this.state;\n\n const hasFilters = JSON.stringify(filters) !== JSON.stringify(defaultRelationFilters);\n\n const visibleFilters = dynamicFilters.filter(x => x.selected).map(x => x.id);\n const dropdownFilters = [\n {\n id: 'selectall',\n label: intl.formatMessage(messages.SelectAll),\n selected: !dynamicFilters.some(x => !x.selected),\n },\n ...dynamicFilters,\n ];\n\n return (\n
    \n
    \n
    \n
    \n this.filterChanged({ searchValue: value })}\n />\n
    \n
    \n\n
    \n
    \n
    \n
    \n {\n this.filterChanged({ type: value });\n }}\n />\n
    \n
    \n
    \n
    \n {\n this.filterChanged({ crmTypes: value });\n }}\n />\n
    \n
    \n
    \n
    \n
    \n\n {visibleFilters && visibleFilters.length > 0 ? (\n
    \n {visibleFilters.map(id => (\n \n ))}\n
    \n ) : null}\n
    \n
    \n \n \n \n \n \n \n \n {hasFilters && (\n this.resetFilters()}\n >\n \n  \n \n \n )}\n\n
    {countSelectedRelations}
    \n
    \n
    \n
    \n );\n }\n}\n\nexport default injectIntl(RelationOverviewFilters);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage } from 'react-intl';\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport intlShape from '@/shared/utils/intlShape';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport CanRead from '@/shared/components/security/CanRead';\nimport messages from '../relationOverviewMessages';\n\nexport default class UpdateRelationTeamModal extends Component {\n state = {\n action: 'add',\n selectedValue: null,\n availableTeams: null,\n };\n static propTypes = {\n show: PropTypes.bool.isRequired,\n intl: intlShape.isRequired,\n onSave: PropTypes.func.isRequired,\n onClose: PropTypes.func.isRequired,\n };\n\n static defaultProps = {};\n\n componentDidMount() {\n this.retrieveTeams();\n }\n\n retrieveTeams = () => {\n api.base.get(`${config.appUrls.api}/api/team/MyTeams`).then(({ data }) => {\n this.setState({ availableTeams: data });\n });\n };\n\n actionChanged = event => {\n const action = event.target.value;\n this.setState({\n action,\n });\n };\n\n selectedValueChanged = event => {\n const teamId = event.target.value;\n\n this.setState(state => ({\n ...state,\n selectedValue: teamId,\n }));\n };\n\n isFormInvalid = () => {\n const { action, selectedValue } = this.state;\n if (!action || !selectedValue) return true;\n\n return false;\n };\n\n onSave = () => {\n const { action, selectedValue } = this.state;\n const { onSave } = this.props;\n\n return onSave({ action, teamId: selectedValue });\n };\n\n closeModal = () => {\n const { onClose } = this.props;\n\n this.setState(state => ({\n ...state,\n selectedValue: null,\n }));\n\n onClose();\n };\n\n render() {\n const { show, intl } = this.props;\n const { action, availableTeams, selectedValue } = this.state;\n\n if (!show) return null;\n\n return (\n this.onSave()}\n >\n
    \n {availableTeams && availableTeams.length > 0 ? (\n
    \n
    \n \n
    \n \n
    \n
    \n
    \n \n
    \n \n {!selectedValue && (\n \n )}\n {availableTeams.map(team => (\n \n ))}\n \n
    \n
    \n
    \n ) : (\n
    \n

    {intl.formatMessage(messages.UpdateRelationTeamNotInATeam)}

    \n \n

    \n \n {intl.formatMessage(messages.ClickHereToGoToTeamSettings)}\n \n

    \n
    \n
    \n )}\n
    \n \n );\n }\n}\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage } from 'react-intl';\nimport debounce from 'lodash-es/debounce';\nimport intlShape from '@/shared/utils/intlShape';\n\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport Tag from '@/shared/components/Tag';\nimport adminpulse from '@/shared/utils/adminpulse';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport messages from '../relationOverviewMessages';\n\nexport default class UpdateRelationTagsModal extends Component {\n state = {\n action: 'add',\n availableTags: [],\n newTag: '',\n selectedTags: [],\n };\n\n static propTypes = {\n show: PropTypes.bool.isRequired,\n intl: intlShape.isRequired,\n onSave: PropTypes.func.isRequired,\n onClose: PropTypes.func.isRequired,\n };\n\n static defaultProps = {};\n\n componentDidMount() {\n this.retrieveTags();\n }\n\n retrieveTags = () => {\n api.base.get(`${config.appUrls.api}/api/relation/tags`).then(({ data }) => {\n this.setState({ availableTags: data.sort(dynamicSort('name')) });\n });\n };\n\n actionChanged = event => {\n const action = event.target.value;\n this.setState({\n action,\n });\n };\n\n isFormInvalid = () => {\n const { action, selectedTags } = this.state;\n if (!action || !selectedTags.length) return true;\n\n return false;\n };\n\n // debounce makes sure that if this method is called again within 300 ms, only the last call is executed.\n // this method adds the tag automatically to the document when it is found in the list of tags\n // this is needed because if there are two tags: test and test2, and the user starts typing, test2 will never be able\n // to be added to the document because the value that was entered will me immediately processed and found\n debouncedFindAndAddTag = debounce(value => {\n const { availableTags } = this.state;\n if (value && availableTags.find(x => x.name === value)) {\n this.addTag(value);\n this.setState({ newTag: '' });\n }\n }, 400);\n\n onTagValueChanged = value => {\n this.setState({ newTag: value });\n this.debouncedFindAndAddTag(value);\n };\n\n addTag = tagName => {\n if (!tagName) return;\n const cleanTagName = adminpulse.removeDuplicateSpaces(tagName);\n\n const { selectedTags } = this.state;\n\n if (selectedTags.some(x => x.toLowerCase() === cleanTagName.toLowerCase())) return;\n this.setState({\n selectedTags: [...selectedTags, cleanTagName],\n });\n };\n\n onSave = () => {\n const { action, selectedTags } = this.state;\n const { onSave } = this.props;\n\n return onSave({ action, tags: selectedTags });\n };\n\n closeModal = () => {\n const { onClose } = this.props;\n\n this.setState(state => ({\n ...state,\n selectedTags: [],\n }));\n\n onClose();\n };\n\n onRemoveTag = tag => {\n const { selectedTags } = this.state;\n\n this.setState({\n selectedTags: selectedTags.filter(x => x !== tag.name),\n });\n };\n\n render() {\n const { show, intl } = this.props;\n const { action, availableTags, newTag, selectedTags } = this.state;\n\n if (!show) return null;\n\n return (\n this.onSave()}\n >\n
    \n
    \n
    \n \n
    \n \n
    \n
    \n
    \n \n
    \n
    \n {\n if (newTag !== '') {\n this.addTag(newTag);\n this.setState({ newTag: '' });\n }\n }}\n value={newTag}\n placeholder={intl.formatMessage(messages.EnterTag)}\n onChange={e => this.onTagValueChanged(e.target.value.replace(';', ''))}\n list=\"tags\"\n autoComplete=\"off\"\n onKeyDown={e => {\n if (e.keyCode === 13) {\n this.addTag(newTag);\n this.setState({ newTag: '' });\n } else if (e.keyCode === 27) {\n this.setState({ newTag: '' });\n }\n }}\n />\n
    \n
    \n {selectedTags &&\n selectedTags.map((item, index) => (\n \n ))}\n
    \n \n {availableTags && availableTags.map(t => \n
    \n
    \n
    \n
    \n \n );\n }\n}\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport intlShape from '@/shared/utils/intlShape';\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport enumCache from '@/shared/services/EnumCacheService';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport AssignedToSelector from '@/shared/components/input/AssignedToSelector';\nimport Checkbox from '@/shared/components/input/Checkbox';\nimport { getUserClassName } from '@/shared/components/input/UserSearch';\nimport messages from '../relationOverviewMessages';\n\nexport default class UpdateRelationUserModal extends Component {\n state = {\n profile: null,\n userId: null,\n profiles: [],\n users: [],\n updateTasks: false,\n updateTaskData: {\n assignedType: 0,\n assignedUserId: null,\n assignedProfile: null,\n },\n };\n static propTypes = {\n show: PropTypes.bool.isRequired,\n intl: intlShape.isRequired,\n onSave: PropTypes.func.isRequired,\n onClose: PropTypes.func.isRequired,\n };\n\n static defaultProps = {};\n\n componentDidMount() {\n const { intl } = this.props;\n enumCache.getTranslated('employeeprofile', intl).then(profiles => {\n this.setState({\n profiles,\n users: DataCacheService.getUsers(),\n });\n });\n }\n\n profileChanged = event => {\n const profile = parseInt(event.target.value) || 0;\n this.setState({\n profile,\n });\n };\n userChanged = event => {\n this.setState({\n userId: event.target.value || null,\n });\n };\n assignedToChanged = assignedTo => {\n this.setState({\n updateTaskData: assignedTo,\n });\n };\n isFormInvalid = () => {\n const { profile } = this.state;\n if (profile === null) return true;\n\n return false;\n };\n\n onSave = () => {\n const { profile, userId, updateTasks, updateTaskData } = this.state;\n const { onSave } = this.props;\n\n let updateTaskModel = null;\n if (updateTasks) {\n if (!userId) {\n // User data from assigned user control when user is set to unassigned\n updateTaskModel = {\n oldProfile: profile,\n assignedType: updateTaskData.assignedType,\n newProfile: updateTaskData.assignedProfile,\n newUserId: updateTaskData.assignedUserId,\n };\n } else {\n // Replace with new user\n updateTaskModel = {\n oldProfile: profile,\n assignedType: 2,\n newProfile: null,\n newUserId: userId,\n };\n }\n }\n\n const model = {\n profile,\n userId,\n updateTasks: updateTaskModel,\n };\n\n return onSave(model);\n };\n\n closeModal = () => {\n const { onClose } = this.props;\n\n this.setState(state => ({\n ...state,\n selectedValue: null,\n }));\n\n onClose();\n };\n\n render() {\n const { show, intl } = this.props;\n const { profile, profiles, users, userId, updateTasks } = this.state;\n\n if (!show) return null;\n const showAssignedToSelector = profile !== null && !userId && updateTasks;\n const assignedToProfiles = showAssignedToSelector\n ? profiles.filter(x => x.id !== profile)\n : undefined;\n\n return (\n this.onSave()}\n >\n
    \n
    \n
    \n
    \n \n {!profile && (\n \n )}\n {profiles.map(x => (\n \n ))}\n \n
    \n
    \n \n
    \n
    \n {profile !== null && (\n
    \n this.setState({ updateTasks: !updateTasks })}\n text={intl.formatMessage(messages.UpdateUserInPlannedTasks)}\n />\n
    \n )}\n {showAssignedToSelector && (\n
    \n \n
    \n \n
    \n
    \n )}\n
    \n
    \n \n );\n }\n}\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { defineMessages } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport Checkbox from '@/shared/components/input/Checkbox';\n\nconst messages = defineMessages({\n SearchRelationsInPeppolNetwork: 'Search relations in PEPPOL network',\n SwitchInvoiceStrategyToPeppolIfFoundOnNetwork:\n 'Switch the send invoice strategy to PEPPOL for relations that were found on the PEPPOL network. This does not affect the ability to send the invoice by e-mail.',\n});\n\nexport default class SearchRelationsInPeppolNetworkModal extends Component {\n state = {\n switchInvoiceStrategyIfFound: true,\n };\n static propTypes = {\n show: PropTypes.bool.isRequired,\n intl: intlShape.isRequired,\n onSave: PropTypes.func.isRequired,\n onClose: PropTypes.func.isRequired,\n };\n\n static defaultProps = {};\n\n onSave = () => {\n const { switchInvoiceStrategyIfFound } = this.state;\n\n const { onSave } = this.props;\n\n const model = {\n switchInvoiceStrategyIfFound,\n };\n\n return onSave(model);\n };\n\n render() {\n const { show, onClose, intl } = this.props;\n const { switchInvoiceStrategyIfFound } = this.state;\n\n if (!show) return null;\n\n return (\n this.onSave()}\n >\n
    \n
    \n \n this.setState({ switchInvoiceStrategyIfFound: !switchInvoiceStrategyIfFound })\n }\n text={intl.formatMessage(messages.SwitchInvoiceStrategyToPeppolIfFoundOnNetwork)}\n />\n
    \n
    \n \n );\n }\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport DropdownButton from 'react-bootstrap/lib/DropdownButton';\nimport MenuItem from 'react-bootstrap/lib/MenuItem';\nimport { injectIntl } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport { functionalities, privileges } from '@/shared/services/AuthService';\nimport { hasAssignments } from '@/shared/components/security/HasAssignments';\nimport MenuItemWithSecurity from '@/shared/components/MenuItemWithSecurity';\nimport messages from './relationOverviewMessages';\n\nconst GlobalActionsButton = (props) => {\n const {\n intl,\n disabled,\n onUpdateTaskSchedule,\n onUpdateField,\n onCreateRegistration,\n onSetInvoiceSchedule,\n onCreateTask,\n onSendMail,\n onUpdateTeam,\n onUpdateTags,\n onAddAssignment,\n onUpdateRelationUser,\n onGenerateDocuments,\n onSearchOnPeppolNetwork,\n } = props;\n\n return (\n \n \n \n {intl.formatMessage(messages.AddOrRemoveTaskSchedule)}\n \n\n \n {intl.formatMessage(messages.CreateTaskWithoutPlanning)}\n \n \n {intl.formatMessage(messages.UpdateField)}\n \n \n {intl.formatMessage(messages.UpdateRelationUser)}\n \n \n {intl.formatMessage(messages.NewRegistration)}\n \n \n {intl.formatMessage(messages.SetInvoiceSchedule)}\n \n {hasAssignments() && (\n \n {intl.formatMessage(messages.AddAssignment)}\n \n )}\n\n \n {intl.formatMessage(messages.SendEmail)}\n \n \n {intl.formatMessage(messages.AddOrRemoveTeams)}\n \n \n {intl.formatMessage(messages.AddOrRemoveTags)}\n \n\n \n {intl.formatMessage(messages.GenerateDocuments)}\n \n \n {intl.formatMessage(messages.SearchOnPeppolNetwork)}\n \n \n \n );\n};\n\nGlobalActionsButton.propTypes = {\n intl: intlShape.isRequired,\n onUpdateTaskSchedule: PropTypes.func.isRequired,\n onUpdateField: PropTypes.func.isRequired,\n onCreateRegistration: PropTypes.func.isRequired,\n onSetInvoiceSchedule: PropTypes.func.isRequired,\n onCreateTask: PropTypes.func.isRequired,\n onSendMail: PropTypes.func.isRequired,\n onUpdateTeam: PropTypes.func.isRequired,\n onUpdateTags: PropTypes.func.isRequired,\n onAddAssignment: PropTypes.func.isRequired,\n onUpdateRelationUser: PropTypes.func.isRequired,\n onGenerateDocuments: PropTypes.func.isRequired,\n onSearchOnPeppolNetwork: PropTypes.func.isRequired,\n disabled: PropTypes.bool,\n};\nGlobalActionsButton.defaultProps = { disabled: false };\nexport default injectIntl(GlobalActionsButton);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage, defineMessages } from 'react-intl';\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport intlShape from '@/shared/utils/intlShape';\nimport Checkbox from '@/shared/components/input/Checkbox';\n\nconst messages = defineMessages({\n ExportFiscalSections: 'Export fiscal sections',\n FiscalReportInfo: 'Select the fiscal sections you want to export:',\n FiscalCosts: 'Fiscal costs',\n FiscalLoans: 'Fiscal loans',\n FiscalVehicles: 'Fiscal vehicles',\n FiscalInsurances: 'Fiscal insurances',\n FiscalRealEstates: 'Fiscal real estates',\n});\n\nconst fiscalSections = [\n {\n message: messages.FiscalVehicles,\n key: 'vehicle',\n },\n {\n message: messages.FiscalLoans,\n key: 'loan',\n },\n {\n message: messages.FiscalCosts,\n key: 'cost',\n },\n {\n message: messages.FiscalInsurances,\n key: 'insurance',\n },\n {\n message: messages.FiscalRealEstates,\n key: 'realEstate',\n },\n];\n\nexport default class FiscalReportModal extends Component {\n state = {\n value: {\n cost: true,\n loan: true,\n vehicle: true,\n insurance: true,\n realEstate: true,\n },\n };\n static propTypes = {\n show: PropTypes.bool.isRequired,\n intl: intlShape.isRequired,\n onSave: PropTypes.func.isRequired,\n onClose: PropTypes.func.isRequired,\n };\n\n static defaultProps = {};\n\n isFormInvalid = () => {\n const { value } = this.state;\n const { cost, loan, vehicle, insurance, realEstate } = value;\n // At least 1\n if (!cost && !loan && !vehicle && !insurance && !realEstate) return true;\n\n return false;\n };\n\n setValue = (name, checked) => {\n if (!name) return;\n this.setState(({ value }) => ({ value: { ...value, [name]: !!checked } }));\n };\n\n onSave = () => {\n const { value } = this.state;\n\n const { onSave } = this.props;\n return onSave(value);\n };\n\n render() {\n const { show, onClose, intl } = this.props;\n const { value } = this.state;\n\n if (!show) return null;\n\n return (\n this.onSave()}\n >\n

    \n \n

    \n
    \n {fiscalSections.map(({ key, message }) => (\n
    \n this.setValue(key, c)}\n text={intl.formatMessage(message)}\n />\n
    \n ))}\n
    \n \n );\n }\n}\n","import React, { Component } from 'react';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport { injectIntl, defineMessages } from 'react-intl';\nimport PropTypes from 'prop-types';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport intlShape from '@/shared/utils/intlShape';\n\nconst messages = defineMessages({\n SelectAValue: 'Select a value',\n});\n\nclass CompanySelector extends Component {\n static propTypes = {\n intl: intlShape.isRequired,\n onChange: PropTypes.func.isRequired,\n required: PropTypes.bool,\n placeholder: PropTypes.string,\n value: PropTypes.string,\n };\n static defaultProps = {\n value: null,\n required: false,\n placeholder: null,\n };\n\n state = {\n companies: [],\n selectedCompany: null,\n };\n\n componentDidMount() {\n const { value } = this.props;\n const dataCache = DataCacheService.getDataCache();\n if (dataCache) {\n const companies = dataCache.company\n .map(x => ({ ...x, label: x.name }))\n .sort(dynamicSort('label'));\n\n this.setState({\n companies,\n selectedCompany: value ? companies.find(x => x.id === value)?.id : null,\n });\n }\n }\n\n externalUpdate = value => {\n const { onChange } = this.props;\n this.setState(({ companies }) => {\n const companyId = value;\n const company = companyId ? companies.find(x => x.id === companyId) : null;\n if (!company && companyId) {\n onChange(null);\n }\n return {\n selectedCompany: company.id,\n };\n });\n };\n\n componentDidUpdate(oldProps) {\n const { value, onChange } = this.props;\n const valueChanged = JSON.stringify(oldProps.value) !== JSON.stringify(value);\n if (!valueChanged) return;\n // eslint-disable-next-line react/no-did-update-set-state\n this.setState(({ companies }) => {\n const company = value ? companies.find(x => x.id === value) : null;\n if (!company && value) {\n onChange(null);\n }\n return {\n selectedCompany: value,\n };\n });\n }\n\n selectedValueChanged(e) {\n const { onChange } = this.props;\n const selectedCompany = e.target.value;\n this.setState({ selectedCompany }, () => onChange(selectedCompany));\n }\n\n render() {\n const { intl, placeholder, required } = this.props;\n const { companies, selectedCompany } = this.state;\n return (\n this.selectedValueChanged(e)}\n >\n {(!required || !selectedCompany) && (\n \n )}\n {companies &&\n companies.map(company => (\n \n ))}\n \n );\n }\n}\n\nexport default injectIntl(CompanySelector);\n","import React, { Component } from 'react';\nimport { injectIntl, defineMessages } from 'react-intl';\nimport PropTypes from 'prop-types';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport intlShape from '@/shared/utils/intlShape';\n\nconst messages = defineMessages({\n SelectAValue: 'Select a value',\n});\n\nclass LanguageSelect extends Component {\n static propTypes = {\n intl: intlShape.isRequired,\n onChange: PropTypes.func.isRequired,\n };\n\n state = {\n languages: [],\n selectedValue: undefined,\n };\n\n componentDidMount() {\n const languages = DataCacheService.getDataCache().language;\n\n this.setState({ languages });\n }\n\n selectedValueChanged(e) {\n const { onChange } = this.props;\n const { languages } = this.state;\n const selectedOption = languages.find(x => x.code === e.target.value);\n this.setState({ selectedValue: selectedOption.code }, () => onChange(selectedOption.code));\n }\n\n render() {\n const { languages, selectedValue } = this.state;\n const { intl } = this.props;\n\n return (\n this.selectedValueChanged(e)}\n className=\"form-control\"\n value={selectedValue}\n >\n {!selectedValue && selectedValue !== 0 && (\n \n )}\n {languages &&\n languages.map(option => (\n \n ))}\n \n );\n }\n}\n\nexport default injectIntl(LanguageSelect);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport intlShape from '@/shared/utils/intlShape';\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport { dynamicSortMultiple, dynamicSort } from '@/shared/utils/dynamicSort';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport CompanySelector from '@/shared/components/input/CompanySelector';\nimport DayMonthPicker from '@/shared/components/input/DayMonthPicker';\nimport UserSearch from '@/shared/components/input/UserSearch';\nimport EnumSelect from '@/shared/components/input/EnumSelect';\nimport LanguageSelect from '@/shared/components/input/LanguageSelect';\nimport EnumMultiSelect from '@/shared/components/input/multiselect/EnumMultiSelect';\nimport messages from '../relationOverviewMessages';\n\nexport default class UpdateRelationFieldModal extends Component {\n state = {\n fields: [],\n legalForms: [],\n };\n static propTypes = {\n show: PropTypes.bool.isRequired,\n intl: intlShape.isRequired,\n onSave: PropTypes.func.isRequired,\n onClose: PropTypes.func.isRequired,\n };\n\n static defaultProps = {};\n\n componentDidMount() {\n this.setAvailableFields();\n }\n\n getLegalForms = () => {\n const { intl } = this.props;\n const dataCache = DataCacheService.getDataCache();\n if (!dataCache || !dataCache.legalForm) return [];\n return dataCache.legalForm\n .map(x => ({\n id: x.id,\n label: intl.formatMessage(listItemMsg('legalform', x.id, x.description || '')),\n }))\n .sort(dynamicSortMultiple('label'));\n };\n\n setAvailableFields = () => {\n const { intl } = this.props;\n\n const availableFields = [\n {\n id: '0443d6e0-343d-437f-907c-84235907a5f8',\n label: intl.formatMessage({\n id: `field_0443d6e0-343d-437f-907c-84235907a5f8`.toLowerCase(),\n defaultMessage: 'Legal form',\n }),\n },\n {\n id: 'e31bb7ad-afb4-4a37-bd1e-46d4a9a71cf0',\n label: intl.formatMessage({\n id: `field_e31bb7ad-afb4-4a37-bd1e-46d4a9a71cf0`.toLowerCase(),\n defaultMessage: 'Own company',\n }),\n },\n {\n id: '3117d514-64bc-4c6e-84f7-4a39fbdc51e2',\n label: intl.formatMessage({\n id: `field_3117d514-64bc-4c6e-84f7-4a39fbdc51e2`.toLowerCase(),\n defaultMessage: 'End fiscal year',\n }),\n },\n {\n id: 'ebf5a67c-6ac2-4616-84ea-2b475f279575',\n label: intl.formatMessage({\n id: `field_ebf5a67c-6ac2-4616-84ea-2b475f279575`.toLowerCase(),\n defaultMessage: 'VAT periodicity',\n }),\n },\n {\n id: 'd4f04a11-cdf7-4d85-900f-c1d15df6057f',\n label: intl.formatMessage({\n id: `field_d4f04a11-cdf7-4d85-900f-c1d15df6057f`.toLowerCase(),\n defaultMessage: 'Financial statement scheme',\n }),\n },\n {\n id: 'b33726aa-3dbb-4e6a-afce-219670843eb5',\n label: intl.formatMessage({\n id: `field_b33726aa-3dbb-4e6a-afce-219670843eb5`.toLowerCase(),\n defaultMessage: 'Social secretariat',\n }),\n },\n {\n id: '99c41dc8-a3fb-4843-bbbf-1c558c46f90f',\n label: intl.formatMessage({\n id: `field_99c41dc8-a3fb-4843-bbbf-1c558c46f90f`.toLowerCase(),\n defaultMessage: 'Social security fund',\n }),\n },\n {\n id: 'b094d68c-1c90-422a-a64a-2913b07e02f1',\n label: intl.formatMessage({\n id: `field_b094d68c-1c90-422a-a64a-2913b07e02f1`.toLowerCase(),\n defaultMessage: 'Payment method',\n }),\n },\n {\n id: '56495285-77d0-46bf-951a-4a66e14e1298',\n label: intl.formatMessage({\n id: `field_56495285-77d0-46bf-951a-4a66e14e1298`.toLowerCase(),\n defaultMessage: 'Accounting software',\n }),\n },\n {\n id: 'd4d5bf76-55ce-4030-91bb-6416f5636505',\n defaultValue: [],\n label: intl.formatMessage({\n id: `field_d4d5bf76-55ce-4030-91bb-6416f5636505`.toLowerCase(),\n defaultMessage: 'Other software',\n }),\n },\n {\n id: '8a884985-efa6-4faf-8740-6461caf69aed',\n label: intl.formatMessage({\n id: `field_8a884985-efa6-4faf-8740-6461caf69aed`.toLowerCase(),\n defaultMessage: 'Language',\n }),\n },\n {\n id: '246f74be-a60d-46b3-82d7-294dfa227762',\n label: intl.formatMessage({\n id: `field_246f74be-a60d-46b3-82d7-294dfa227762`.toLowerCase(),\n defaultMessage: 'Share register',\n }),\n },\n {\n id: '40ae0a55-fd7d-4577-830f-22589642e875',\n label: intl.formatMessage({\n id: `field_40ae0a55-fd7d-4577-830f-22589642e875`.toLowerCase(),\n defaultMessage: 'Send invoice strategy',\n }),\n },\n {\n id: 'b5813c30-a8f9-4b66-a0d5-236f400c5088',\n label: intl.formatMessage({\n id: `field_b5813c30-a8f9-4b66-a0d5-236f400c5088`.toLowerCase(),\n defaultMessage: 'InvoiceEmailAttachmentOptions',\n }),\n },\n ];\n\n this.setState({\n fields: availableFields.sort(dynamicSort('label')),\n legalForms: this.getLegalForms(),\n });\n };\n\n fieldChanged = event => {\n const { fields } = this.state;\n const fieldId = event.target.value;\n const field = fields.find(x => x.id === fieldId);\n\n this.setState(state => ({\n ...state,\n selectedField: field,\n selectedValue: field.defaultValue ?? undefined,\n }));\n };\n\n selectedValueChanged = value => {\n this.setState(state => ({\n ...state,\n selectedValue: value,\n }));\n };\n\n isFormInvalid = () => {\n const { selectedField, selectedValue } = this.state;\n\n if (\n !selectedField ||\n // list of fields that allow null are listed here\n (selectedField.id !== '246f74be-a60d-46b3-82d7-294dfa227762' &&\n selectedField.id !== '40ae0a55-fd7d-4577-830f-22589642e875' &&\n selectedField.id !== 'd4d5bf76-55ce-4030-91bb-6416f5636505' &&\n selectedField.id !== 'b5813c30-a8f9-4b66-a0d5-236f400c5088' &&\n !selectedValue &&\n selectedValue !== 0)\n )\n return true;\n\n return false;\n };\n\n onSave = () => {\n const { selectedField, selectedValue } = this.state;\n const { onSave } = this.props;\n\n const fieldUpdate = {\n definition: {\n id: selectedField.id,\n },\n value: selectedValue,\n };\n\n return onSave(fieldUpdate);\n };\n\n closeModal = () => {\n const { onClose } = this.props;\n\n this.setState(state => ({\n ...state,\n selectedField: undefined,\n selectedValue: undefined,\n }));\n\n onClose();\n };\n\n render() {\n const { show, intl } = this.props;\n const { fields, selectedField, selectedValue, legalForms } = this.state;\n\n if (!show) return null;\n\n return (\n this.onSave()}\n >\n
    \n
    \n
    \n {fields && (\n \n {!selectedField && (\n \n )}\n {fields.map(field => (\n \n ))}\n \n )}\n
    \n {selectedField && (\n
    \n {(selectedField.id === '68988c03-3b65-4b90-a53a-f4114d9c46bc' ||\n selectedField.id === '5b5c42ce-0232-43c3-816a-154840dc2b2c' ||\n selectedField.id === 'bef9f50d-9002-40a0-816f-13c2b507f9f4' ||\n selectedField.id === '0543ff8b-36bb-4638-b7f6-641484b3ca4b') && (\n this.selectedValueChanged(user ? user.id : null)}\n placeholder={intl.formatMessage(messages.SelectAValue)}\n />\n )}\n {selectedField.id === '0443d6e0-343d-437f-907c-84235907a5f8' && (\n {\n const value = legalForms.find(x => x.id === parseInt(e.target.value));\n this.selectedValueChanged(value.id);\n }}\n className=\"form-control\"\n value={selectedValue || ''}\n >\n {!selectedValue && selectedValue !== 0 && (\n \n )}\n {legalForms &&\n legalForms.map(legalForm => (\n \n ))}\n \n )}\n\n {selectedField.id === 'e31bb7ad-afb4-4a37-bd1e-46d4a9a71cf0' && (\n \n )}\n {selectedField.id === '3117d514-64bc-4c6e-84f7-4a39fbdc51e2' && (\n {\n if (date) {\n const dateFormatted = `2000-${date.month + 1}-${date.day}`;\n this.selectedValueChanged(dateFormatted); // backend expects value: \"2000-12-31\"\n }\n }}\n id=\"endFiscalYearDate\"\n required\n outputType=\"object\"\n block\n small\n />\n )}\n\n {selectedField.id === 'ebf5a67c-6ac2-4616-84ea-2b475f279575' && (\n \n )}\n {selectedField.id === 'd4f04a11-cdf7-4d85-900f-c1d15df6057f' && (\n \n )}\n {selectedField.id === 'b33726aa-3dbb-4e6a-afce-219670843eb5' && (\n \n )}\n {selectedField.id === '99c41dc8-a3fb-4843-bbbf-1c558c46f90f' && (\n \n )}\n {selectedField.id === 'b094d68c-1c90-422a-a64a-2913b07e02f1' && (\n \n )}\n {selectedField.id === '56495285-77d0-46bf-951a-4a66e14e1298' && (\n \n )}\n {selectedField.id === '8a884985-efa6-4faf-8740-6461caf69aed' && (\n \n )}\n {selectedField.id === '246f74be-a60d-46b3-82d7-294dfa227762' && (\n \n )}\n {selectedField.id === '40ae0a55-fd7d-4577-830f-22589642e875' && (\n \n )}\n {selectedField.id === 'b5813c30-a8f9-4b66-a0d5-236f400c5088' && (\n \n )}\n {selectedField.id === 'd4d5bf76-55ce-4030-91bb-6416f5636505' && (\n \n )}\n
    \n )}\n
    \n
    \n \n );\n }\n}\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { defineMessages } from 'react-intl';\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport moment from 'moment';\nimport api from '@/shared/api';\nimport intlShape from '@/shared/utils/intlShape';\nimport DatePicker from '@/shared/components/input/DatePicker';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport config from '@/config';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport Checkbox from '@/shared/components/input/Checkbox';\nimport { isBeforeMinimum } from '@/shared/utils/validationHelpers';\nimport classNames from 'classnames';\nimport employeeProfileMessages from '@/shared/messages/employeeProfileMessages';\n\nconst messages = defineMessages({\n UseAssignedToFromTemplate: 'Use assigned to from template',\n CreateTaskWithoutPlanning: 'Create task without planning',\n TaskTemplate: 'Task template',\n Schedule: 'Schedule',\n Deadline: 'Deadline',\n AssignedTo: 'Assigned to',\n Profiles: 'Profiles',\n Users: 'Users',\n DontAddTaskIfAlreadyExistsForRelation: 'Do not add the task if it already exists for relation',\n});\n\nexport default class CreatePlannedTaskModal extends Component {\n state = {\n templates: [],\n selectedTemplate: null,\n deadline: moment(),\n users: [],\n assignedUser: null,\n skipIfTaskAlreadyExists: false,\n };\n static propTypes = {\n show: PropTypes.bool.isRequired,\n intl: intlShape.isRequired,\n onSave: PropTypes.func.isRequired,\n onClose: PropTypes.func.isRequired,\n };\n\n static defaultProps = {};\n\n constructor(props) {\n super(props);\n const { intl } = props;\n this.templateUser = {\n key: '0;0',\n assignedType: 0,\n assignedUserId: null,\n assignedProfile: null,\n label: intl.formatMessage(messages.UseAssignedToFromTemplate),\n };\n this.responsibleUser = {\n key: '1;1',\n assignedType: 1,\n assignedUserId: null,\n assignedProfile: 1,\n label: intl.formatMessage(employeeProfileMessages.Responsible),\n };\n this.assistantUser = {\n key: '1;2',\n assignedType: 1,\n assignedUserId: null,\n assignedProfile: 2,\n label: intl.formatMessage(employeeProfileMessages.Assistant),\n };\n }\n\n retrieveTaskTemplates = () => {\n const { intl } = this.props;\n\n return api.base.get(`${config.appUrls.tasks}/api/TaskTemplates`).then(({ data }) => {\n const translatedTemplates = data\n .map(t => ({\n ...t,\n label: intl.formatMessage(listItemMsg('taskTemplate', t.id, t.name)), // Map translation to label property\n }))\n .sort(dynamicSort('label'));\n\n let selectedTemplate = null;\n if (translatedTemplates && translatedTemplates.length > 0) {\n [selectedTemplate] = translatedTemplates;\n }\n\n this.setState(state => ({\n ...state,\n templates: translatedTemplates,\n selectedTemplate,\n }));\n });\n };\n\n retrieveUsers = () => {\n const cache = DataCacheService.getDataCache();\n\n if (!cache) {\n throw new Error('DataCache not found in RegistrationModal.jsx');\n }\n\n const users = [\n this.templateUser,\n this.assistantUser,\n this.responsibleUser,\n ...(cache.user || [])\n .filter(x => x.isActive || !x.hidden)\n .map(u => ({\n key: `2;${u.userID}`,\n assignedType: 2,\n assignedUserId: u.userID,\n assignedProfile: 2,\n label: `${u.firstName} ${u.lastName}`,\n className: u.isActive ? '' : 'removed-user',\n }))\n .sort(dynamicSort('label')),\n ];\n this.setState({\n users,\n assignedUser: this.templateUser,\n });\n };\n\n componentDidMount() {\n this.retrieveTaskTemplates();\n this.retrieveUsers();\n }\n\n templateChanged = event => {\n const { templates } = this.state;\n const templateId = event.target.value;\n const template = templates.find(x => x.id === templateId);\n\n let selectedPeriodicity = null;\n\n if (template && template.periodicities) {\n [selectedPeriodicity] = template.periodicities;\n }\n\n this.setState(state => ({\n ...state,\n selectedTemplate: template,\n selectedPeriodicity,\n }));\n };\n\n assignedUserChanged = event => {\n const { users } = this.state;\n const key = event.target.value;\n\n const assignedUser = users.find(x => x.key === key);\n\n this.setState({\n assignedUser,\n });\n };\n\n isFormInvalid = () => {\n const { assignedUser, selectedTemplate, deadline } = this.state;\n if (!assignedUser || !assignedUser.key || !selectedTemplate || !deadline) return true;\n\n return false;\n };\n\n onSave = () => {\n const {\n deadline,\n selectedTemplate,\n assignedUser: { assignedType, assignedUserId, assignedProfile },\n skipIfTaskAlreadyExists,\n } = this.state;\n const { onSave } = this.props;\n\n const task = {\n deadline,\n taskTemplateId: selectedTemplate.id,\n assignedType,\n assignedUserId,\n assignedProfile,\n skipIfTaskAlreadyExists,\n };\n\n return onSave(task);\n };\n\n render() {\n const { show, onClose, intl } = this.props;\n const {\n deadline,\n deadlineFocused,\n templates,\n selectedTemplate,\n assignedUser,\n users,\n skipIfTaskAlreadyExists,\n } = this.state;\n if (!show) return null;\n return (\n this.onSave()}\n >\n
    \n
    \n \n
    \n {templates && (\n \n {templates.map(template => (\n \n ))}\n \n )}\n
    \n
    \n\n
    \n \n
    \n this.setState({ deadline: date })}\n focused={deadlineFocused}\n onFocusChange={({ focused }) => this.setState({ deadlineFocused: focused })}\n id=\"taskDeadline\"\n required\n block\n small\n isOutsideRange={isBeforeMinimum}\n />\n
    \n
    \n
    \n \n
    \n \n \n \n \n \n \n \n {users\n .filter(x => x.assignedType === 2)\n .map(u => (\n \n ))}\n \n \n
    \n
    \n\n
    \n this.setState({ skipIfTaskAlreadyExists: !skipIfTaskAlreadyExists })}\n text={intl.formatMessage(messages.DontAddTaskIfAlreadyExistsForRelation)}\n />\n
    \n
    \n \n );\n }\n}\n","import React, { Component } from 'react';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport { injectIntl, defineMessages } from 'react-intl';\nimport PropTypes from 'prop-types';\nimport { dynamicSort, dynamicSortMultiple } from '@/shared/utils/dynamicSort';\nimport intlShape from '@/shared/utils/intlShape';\nimport api from '@/shared/api';\nimport config from '@/config';\n\nconst messages = defineMessages({\n SelectAValue: 'Select a value',\n Default: 'Default',\n});\n\nclass PriceGridSelector extends Component {\n static propTypes = {\n intl: intlShape.isRequired,\n onChange: PropTypes.func.isRequired,\n required: PropTypes.bool,\n placeholder: PropTypes.string,\n value: PropTypes.string,\n };\n static defaultProps = {\n value: null,\n required: false,\n placeholder: null,\n };\n\n state = {\n items: [],\n };\n\n componentDidMount() {\n const { intl } = this.props;\n api.base.get(`${config.appUrls.api}/api/price/Grid`).then(({ data }) => {\n this.setState({\n items: (data || [])\n .map(x => ({\n ...x,\n label: x.name === 'Default' ? intl.formatMessage(messages.Default) : x.name,\n }))\n .sort(dynamicSortMultiple('-isDefault', 'label')),\n });\n });\n }\n\n selectedValueChanged(e) {\n const { onChange } = this.props;\n onChange(e.target.value || null);\n }\n\n render() {\n const { intl, placeholder, required, value } = this.props;\n const { items } = this.state;\n return (\n \n );\n }\n}\n\nexport default injectIntl(PriceGridSelector);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport DropdownButton from 'react-bootstrap/lib/DropdownButton';\nimport MenuItem from 'react-bootstrap/lib/MenuItem';\nimport { FaFileExcel } from 'react-icons/fa';\nimport { FormattedMessage, injectIntl } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport messages from './relationOverviewMessages';\n\nconst ExportButton = props => {\n const {\n intl,\n disabled,\n exporting,\n onCreateExcelReport,\n onCreateAuthorizationReport,\n onCreateLinkedRelationsReport,\n onCreateFiscalReport,\n onCreateCommunicationChannelReport,\n onCreateCommunicationSettingReport,\n } = props;\n\n return (\n \n \n {exporting && }\n {!exporting && }\n \n \n \n }\n >\n \n {intl.formatMessage(messages.ExportRelations)}\n \n \n {intl.formatMessage(messages.ExportAuthorizations)}\n \n \n {intl.formatMessage(messages.ExportLinkedRelations)}\n \n \n {intl.formatMessage(messages.ExportFiscalSections)}\n \n \n {intl.formatMessage(messages.ExportCommunicationChannels)}\n \n \n {intl.formatMessage(messages.ExportCommunicationSettings)}\n \n \n );\n};\n\nExportButton.propTypes = {\n intl: intlShape.isRequired,\n onCreateExcelReport: PropTypes.func.isRequired,\n onCreateAuthorizationReport: PropTypes.func.isRequired,\n onCreateLinkedRelationsReport: PropTypes.func.isRequired,\n onCreateFiscalReport: PropTypes.func.isRequired,\n onCreateCommunicationChannelReport: PropTypes.func.isRequired,\n onCreateCommunicationSettingReport: PropTypes.func.isRequired,\n disabled: PropTypes.bool,\n exporting: PropTypes.bool,\n};\nExportButton.defaultProps = { disabled: false, exporting: false };\nexport default injectIntl(ExportButton);\n","import React, { Component, Fragment } from 'react';\nimport PropTypes from 'prop-types';\nimport { defineMessages, FormattedMessage } from 'react-intl';\nimport moment from 'moment';\nimport classNames from 'classnames';\n\nimport intlShape from '@/shared/utils/intlShape';\nimport api from '@/shared/api';\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport DatePicker from '@/shared/components/input/DatePicker';\nimport DayMonthPicker from '@/shared/components/input/DayMonthPicker';\nimport CurrencySymbol from '@/shared/components/CurrencySymbol';\nimport { isBeforeToday, validateEndDate } from '@/shared/utils/validationHelpers';\nimport config from '../../../../config';\nimport CompanySelector from '@/shared/components/input/CompanySelector';\nimport PriceGridSelector from '@/shared/components/input/PriceGridSelector';\nimport HasMultiCompany from '@/shared/components/security/HasMultiCompany';\n\nconst messages = defineMessages({\n AssignmentTemplate: 'Assignment template',\n AddAssignment: 'Add assignment',\n TaskTemplate: 'Task template',\n Schedule: 'Schedule',\n Deadline: 'Deadline',\n StartPlanning: 'Start planning',\n EndPlanning: 'End planning',\n Choose: 'Choose',\n NoSchedule: 'No schedule',\n NoAssignmentTemplates: 'There are no assignment templates',\n RelationTypeMismatchWarning:\n 'There is a posibiltiy that some relations will be skipped because their type does not match the types defined in the assignement template',\n InvoiceSchedule: 'Invoice schedule',\n Amount: 'Amount',\n LedgerAccount: 'Ledger account',\n OwnCompany: 'Own company',\n PriceGrid: 'Price grid',\n UseRelationSetting: 'Use relation setting',\n});\n\nconst validateScheduleLine = line => {\n if (line.removed) return true; // Removed lines are not validated\n if (!line.planningStart) return false;\n if (!moment(line.planningStart).isValid()) return false;\n if (line.planningStop && !moment(line.planningStop).isValid()) return false;\n if (!line.periodicity || !line.periodicity.id) return false;\n if (line.periodicity.showScheduleDate && !line.scheduleDate) return false;\n\n return true;\n};\n\nclass AddAssignmentModal extends Component {\n state = {\n templates: [],\n assignmentTemplate: null,\n companyId: null,\n priceGridId: null,\n taskConfig: [],\n taskSchedules: [],\n taskTemplates: [],\n datePickerFocus: {},\n invoiceSchedule: {\n schedule: null,\n startDate: moment(),\n endDate: null,\n amount: 0,\n ledgerAccount: '',\n overrideExistingSchedule: false,\n },\n invoiceSchedules: [],\n };\n\n componentDidMount() {\n this.retrieveAssignmentTemplates();\n }\n\n retrieveAssignmentTemplates = () => {\n const { intl, relationType } = this.props;\n\n const assignmentTemplateRequest = api.base.get(\n `${config.appUrls.api}/api/AssignmentTemplate/get`,\n {\n params: {\n relationType,\n },\n },\n );\n const taskConfigRequest = api.base.get(`${config.appUrls.tasks}/api/AssignmentTemplate`);\n const taskTemplatesRequest = api.base.get(\n `${config.appUrls.tasks}/api/TaskTemplates/Schedules`,\n );\n const invoiceScheduleRequest = api.base.get(`${config.appUrls.api}/api/invoiceschedule/get`);\n\n Promise.all([\n assignmentTemplateRequest,\n taskConfigRequest,\n taskTemplatesRequest,\n invoiceScheduleRequest,\n ]).then(\n ([\n { data: assignmentTemplates },\n { data: taskConfig },\n { data: taskTemplates },\n { data: invoiceSchedules },\n ]) => {\n this.setState({\n taskConfig,\n templates: (assignmentTemplates || [])\n .map(t => ({\n ...t,\n label: intl.formatMessage(listItemMsg('assignmenttemplate', t.id, t.name)),\n }))\n .sort(dynamicSort('label')),\n taskTemplates: taskTemplates.map(x => ({\n ...x,\n label: intl.formatMessage(listItemMsg('tasktemplate', x.id, x.name)),\n periodicities: (x.periodicities || [])\n .map(p => ({\n ...p,\n label: intl.formatMessage(listItemMsg('taskperiodicity', p.id, p.name)),\n }))\n .sort(dynamicSort('label')),\n })),\n invoiceSchedules: (invoiceSchedules || [])\n .map(t => ({\n ...t,\n label: `${intl.formatMessage(\n listItemMsg('invoiceSchedule', t.id, t.name),\n )} (${intl.formatMessage(listItemMsg('InvoicingType', t.invoicingType))})`,\n }))\n .sort(dynamicSort('label')),\n });\n },\n );\n };\n\n templateChanged = event => {\n const { templates, taskConfig, taskTemplates } = this.state;\n const templateId = event.target.value;\n const template = templates.find(x => x.id === templateId);\n let taskSchedules = [];\n if (template) {\n taskSchedules = taskConfig\n .reduce((result, item) => {\n if (item.assignmentTemplateId !== template.id) return result;\n const taskTemplate = taskTemplates.find(x => x.id === item.taskTemplateId);\n if (!taskTemplate) return result;\n if (!taskTemplate.periodicities || !taskTemplate.periodicities.length) return result;\n let periodicity = item.taskPeriodicityId\n ? taskTemplate.periodicities.find(x => x.id === item.taskPeriodicityId)\n : null;\n if (!periodicity && taskTemplate.periodicities.length === 1)\n [periodicity] = taskTemplate.periodicities;\n const schedule = {\n type: 1,\n template: {\n id: taskTemplate.id,\n name: taskTemplate.name,\n label: taskTemplate.label,\n },\n periodicities: taskTemplate.periodicities || [],\n periodicity,\n planningStart: moment()\n .utc()\n .startOf('day'),\n planningStop: null,\n scheduleDate: null,\n removed: false,\n };\n result.push(schedule);\n return result;\n }, [])\n .sort(dynamicSort('taskTemplate.label'));\n }\n this.setState({\n assignmentTemplate: template,\n taskSchedules,\n });\n };\n\n updateSchedule = (taskTemplateId, updatedValues) => {\n this.setState(({ taskSchedules }) => ({\n taskSchedules: taskSchedules.map(x => {\n if (x.template.id !== taskTemplateId) return x;\n return { ...x, ...updatedValues };\n }),\n }));\n };\n\n toggleSchedule = taskTemplateId => {\n this.setState(({ taskSchedules }) => ({\n taskSchedules: taskSchedules.map(x => {\n if (x.template.id !== taskTemplateId) return x;\n return { ...x, removed: !x.removed };\n }),\n }));\n };\n\n schedulePeriodicityChanged = (taskTemplateId, periodicityId) => {\n this.setState(({ taskSchedules }) => ({\n taskSchedules: taskSchedules.map(x => {\n if (x.template.id !== taskTemplateId) return x;\n\n const periodicity = periodicityId\n ? x.periodicities.find(p => p.id === periodicityId)\n : null;\n let { scheduleDate } = x;\n if (!periodicity || !periodicity.showScheduleDate) {\n scheduleDate = null;\n }\n\n return { ...x, periodicity, scheduleDate };\n }),\n }));\n };\n\n updateInvoiceSchedule = updatedProps => {\n this.setState(({ invoiceSchedule }) => ({\n invoiceSchedule: { ...invoiceSchedule, ...updatedProps },\n }));\n };\n invoiceScheduleChanged = e => {\n const { invoiceSchedules } = this.state;\n const id = e.target.value;\n const schedule = id ? invoiceSchedules.find(x => x.id === id) : null;\n this.updateInvoiceSchedule({ schedule });\n };\n\n setDatePickerFocus = (picker, focused) => {\n this.setState(({ datePickerFocus }) => ({\n datePickerFocus: {\n ...datePickerFocus,\n [picker]: focused,\n },\n }));\n };\n\n validate = () => {\n const { assignmentTemplate, taskSchedules, invoiceSchedule } = this.state;\n if (!assignmentTemplate || !assignmentTemplate.id) return false;\n if (\n taskSchedules &&\n taskSchedules.length > 0 &&\n taskSchedules.some(x => !validateScheduleLine(x))\n )\n return false;\n if (invoiceSchedule && invoiceSchedule.schedule && invoiceSchedule.schedule.id) {\n if (!invoiceSchedule.startDate) return false;\n if (isBeforeToday(invoiceSchedule.startDate)) return false;\n if (!validateEndDate(invoiceSchedule.endDate, invoiceSchedule.startDate)) return false;\n if (invoiceSchedule.schedule.invoicingType !== 0 && invoiceSchedule.amount < 1) return false;\n }\n\n return true;\n };\n\n onSave = () => {\n const { onSave } = this.props;\n const {\n assignmentTemplate,\n taskSchedules,\n invoiceSchedule = {},\n companyId,\n priceGridId,\n } = this.state;\n if (!this.validate()) return Promise.reject();\n const { schedule, ...invoiceScheduleData } = invoiceSchedule;\n\n const parameters = {\n assignmentTemplateId: assignmentTemplate.id,\n companyId,\n priceGridId,\n taskSchedules: (taskSchedules || [])\n .filter(x => !x.removed)\n .map(x => ({\n type: x.type,\n taskTemplateId: x.template.id,\n periodicityId: x.periodicity.id,\n planningStart: x.planningStart,\n planningStop: x.planningStop,\n scheduleDate: x.scheduleDate,\n })),\n invoiceSchedule:\n schedule && schedule.id\n ? {\n ...invoiceScheduleData,\n scheduleId: schedule.id,\n }\n : null,\n };\n return onSave(parameters);\n };\n\n render() {\n const {\n templates,\n assignmentTemplate,\n taskSchedules,\n showValidation,\n datePickerFocus,\n invoiceSchedule,\n invoiceSchedules,\n companyId,\n priceGridId,\n } = this.state;\n const { intl, onClose, relationType } = this.props;\n\n const showScheduleDate = taskSchedules.some(\n x => x.periodicity && x.periodicity.showScheduleDate,\n );\n const appliesToCount = assignmentTemplate\n ? (assignmentTemplate.appliesToPerson ? 1 : 0) +\n (assignmentTemplate.appliesToSoleProprietor ? 1 : 0) +\n (assignmentTemplate.appliesToCompany ? 1 : 0)\n : 0;\n const showRelationTypeMismatchWarning =\n relationType === null && !!assignmentTemplate && appliesToCount !== 3;\n const hasInvoiceSchedule =\n invoiceSchedule && invoiceSchedule.schedule && invoiceSchedule.schedule.id;\n const showInvoiceScheduleAmount =\n hasInvoiceSchedule && invoiceSchedule.schedule.invoicingType !== 0;\n return (\n this.setState({ showValidation: true })}\n size=\"xl\"\n >\n
    \n
    \n \n
    \n {templates && templates.length > 0 && (\n \n {!assignmentTemplate || !assignmentTemplate.id ? (\n \n ) : null}\n {templates.map(t => (\n \n ))}\n \n )}\n {templates && templates.length === 0 && (\n
    \n \n
    \n )}\n {showRelationTypeMismatchWarning && (\n
    \n \n
    \n )}\n
    \n
    \n\n \n
    \n \n
    \n this.setState({ companyId: value || null })}\n value={companyId}\n placeholder={intl.formatMessage(messages.UseRelationSetting)}\n />\n
    \n
    \n
    \n
    \n \n
    \n this.setState({ priceGridId: value || null })}\n value={priceGridId}\n placeholder={intl.formatMessage(messages.UseRelationSetting)}\n />\n
    \n
    \n {invoiceSchedules && invoiceSchedules.length > 0 ? (\n
    \n \n
    \n \n \n {invoiceSchedules.map(t => (\n \n ))}\n \n
    \n
    \n ) : null}\n\n {hasInvoiceSchedule ? (\n \n \n \n
    \n \n this.updateInvoiceSchedule({ startDate: date, endDate: undefined })\n }\n focused={datePickerFocus.invoicePlanningStart || false}\n onFocusChange={({ focused }) =>\n this.setDatePickerFocus('invoicePlanningStart', focused)\n }\n id=\"invoicePlanningStart\"\n required\n block\n small\n isOutsideRange={isBeforeToday}\n />\n
    \n
    \n \n \n
    \n this.updateInvoiceSchedule({ endDate: date })}\n focused={datePickerFocus.invoicePlanningEnd || false}\n onFocusChange={({ focused }) =>\n this.setDatePickerFocus('invoicePlanningEnd', focused)\n }\n id=\"invoicePlanningEnd\"\n isOutsideRange={isBeforeToday}\n />\n
    \n \n {showInvoiceScheduleAmount && (\n \n \n
    \n
    \n \n this.updateInvoiceSchedule({ amount: parseFloat(e.target.value) })\n }\n className=\"form-control\"\n />\n \n \n \n
    \n
    \n \n )}\n
    \n \n
    \n this.updateInvoiceSchedule({ ledgerAccount: e.target.value })}\n id=\"ledgeraccount\"\n />\n
    \n
    \n \n ) : null}\n\n {taskSchedules.length > 0 && (\n
    \n \n \n \n \n \n {showScheduleDate && (\n \n )}\n \n \n \n \n \n {taskSchedules.map(taskSchedule => {\n const taskTemplateId = taskSchedule.template.id;\n return (\n \n \n \n {showScheduleDate && (\n \n {taskSchedule.periodicity &&\n taskSchedule.periodicity.showScheduleDate ? (\n \n this.updateSchedule(taskTemplateId, { scheduleDate: date })\n }\n disabled={taskSchedule.removed}\n required={!taskSchedule.removed}\n outputType=\"moment\"\n block\n small\n />\n ) : null}\n \n )}\n\n \n \n this.updateSchedule(taskTemplateId, { planningStart: date })\n }\n focused={datePickerFocus[`planningStart${taskTemplateId}`]}\n onFocusChange={({ focused }) =>\n this.setDatePickerFocus(`planningStart${taskTemplateId}`, focused)\n }\n id={`planningStart${taskTemplateId}`}\n disabled={taskSchedule.removed}\n required={!taskSchedule.removed}\n block\n small\n />\n \n \n \n \n );\n })}\n \n
    \n \n \n \n \n \n \n \n \n \n \n
    \n {taskSchedule.template.label}\n \n \n this.schedulePeriodicityChanged(taskTemplateId, e.target.value)\n }\n disabled={taskSchedule.removed}\n required={!taskSchedule.removed}\n className={classNames('form-control', {\n markedError:\n showValidation &&\n !taskSchedule.removed &&\n (!taskSchedule.periodicity || !taskSchedule.periodicity.id),\n })}\n >\n {!taskSchedule.periodicity || !taskSchedule.periodicity.id ? (\n \n ) : null}\n {taskSchedule.periodicities.map(periodicity => (\n \n ))}\n \n \n \n this.updateSchedule(taskTemplateId, { planningStop: date })\n }\n focused={datePickerFocus[`planningStop${taskTemplateId}`]}\n onFocusChange={({ focused }) =>\n this.setDatePickerFocus(`planningStop${taskTemplateId}`, focused)\n }\n id={`planningStop${taskTemplateId}`}\n disabled={taskSchedule.removed}\n block\n small\n />\n \n this.toggleSchedule(taskTemplateId)}\n >\n \n \n
    \n
    \n )}\n \n \n );\n }\n}\n\nAddAssignmentModal.propTypes = {\n intl: intlShape.isRequired,\n onSave: PropTypes.func.isRequired,\n onClose: PropTypes.func.isRequired,\n relationType: PropTypes.number,\n};\nAddAssignmentModal.defaultProps = {\n relationType: null,\n};\n\nexport default AddAssignmentModal;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport DropdownButton from 'react-bootstrap/lib/DropdownButton';\nimport MenuItem from 'react-bootstrap/lib/MenuItem';\nimport { FormattedMessage, injectIntl } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport messages from './messages';\n\nconst GlobalActionsButton = props => {\n const {\n intl,\n disabled,\n onCreatePlannedRegistrations,\n onRemovePlannedRegistrations,\n onSendMail,\n onCreateRegistration,\n onChangeUser,\n hasWithoutFilter,\n inProgress,\n } = props;\n\n return (\n \n \n {inProgress && }\n \n \n }\n >\n \n {intl.formatMessage(messages.AddPlannedRegistrations)}\n \n \n {intl.formatMessage(messages.RemovePlannedRegistrations)}\n \n \n {intl.formatMessage(messages.ChangeUser)}\n \n \n {intl.formatMessage(messages.CreateSingleRegistration)}\n \n \n {intl.formatMessage(messages.SendEmail)}\n \n \n \n );\n};\n\nGlobalActionsButton.propTypes = {\n intl: intlShape.isRequired,\n onCreatePlannedRegistrations: PropTypes.func.isRequired,\n onRemovePlannedRegistrations: PropTypes.func.isRequired,\n onSendMail: PropTypes.func.isRequired,\n onCreateRegistration: PropTypes.func.isRequired,\n onChangeUser: PropTypes.func.isRequired,\n disabled: PropTypes.bool,\n inProgress: PropTypes.bool,\n hasWithoutFilter: PropTypes.bool,\n};\nGlobalActionsButton.defaultProps = { disabled: false, inProgress: false, hasWithoutFilter: false };\nexport default injectIntl(GlobalActionsButton);\n","import React, { Component } from 'react';\nimport Axios from 'axios';\nimport PropTypes from 'prop-types';\nimport { injectStateService } from '@/shared/services/StateService';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\n\nimport { FormattedMessage, injectIntl } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport ScrollableTable from '@/shared/components/table/ScrollableTable';\nimport ColumnHeader from '@/shared/components/table/ColumnHeader';\nimport SimplePanel from '@/shared/components/SimplePanel';\nimport api from '@/shared/api';\nimport { FaCog } from 'react-icons/fa';\nimport eventBus from 'pubsub-js';\nimport ToastrService from '@/shared/services/ToastrService';\nimport Button from '@/shared/components/Button';\nimport BatchRegistrationModal from '@/shared/components/registration/BatchRegistrationModal';\nimport SendEmailModal from '@/shared/components/email/MultiRelationsMailModal';\nimport CheckboxListModal from '@/shared/components/CheckboxListModal';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport { CanCreate, CanUpdate, showWhenPermission } from '@/shared/components/security';\nimport BatchGenerateDocumentModal from '@/shared/components/BatchGenerateDocumentModal';\nimport {\n handleHiddenColumnsSelection,\n initHiddenColumnsState,\n} from '@/shared/utils/hiddenColumnsHelper';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport SignalRService from '@/shared/services/SignalRService';\nimport YesNoModal from '../../../shared/components/YesNoModal';\nimport config from '../../../config';\nimport Checkbox from '../../../shared/components/input/Checkbox';\nimport RelationOverviewRow, { getColumnDefinitions } from './RelationOverviewRow';\nimport UpdateTaskScheduleModal from './modals/UpdateTaskScheduleModal';\nimport RelationOverviewFilters, { defaultRelationFilters } from './RelationOverviewFilters';\nimport UpdateRelationTeamModal from './modals/UpdateRelationTeamModal';\nimport UpdateRelationTagsModal from './modals/UpdateRelationTagsModal';\nimport UpdateRelationUserModal from './modals/UpdateRelationUserModal';\nimport SearchRelationsInPeppolNetworkModal from './modals/SearchRelationsInPeppolNetworkModal';\nimport FiscalReportModal from './modals/FiscalReportModal';\n\nimport messages from './relationOverviewMessages';\nimport GlobalActionsButton from './GlobalActionsButton';\nimport UpdateRelationFieldModal from './modals/UpdateRelationFieldModal';\n\nimport SetInvoiceScheduleModal from './modals/SetInvoiceScheduleModal';\nimport CreatePlannedTaskModal from './modals/CreatePlannedTaskModal';\nimport AddAssignmentModal from './modals/AddAssignmentModal';\nimport ExportButton from './ExportButton';\n\nconst columnSelectionStorageKey = 'RelationOverviewHiddenColumns';\n\nclass RelationOverviewContainer extends Component {\n constructor(props) {\n super(props);\n const { searchParams = {}, intl } = props;\n\n const { relationFilters: sessionFilters = {}, ...sessionParams } =\n JSON.parse(sessionStorage.getItem('RelationOverviewParams')) || {};\n\n const columnDefinitions = getColumnDefinitions(DataCacheService.getTenantConfiguration());\n const hiddenColumnsState = initHiddenColumnsState(\n columnSelectionStorageKey,\n columnDefinitions,\n intl,\n );\n this.state = {\n columnDefinitions,\n showDeleteRelationModal: false,\n showUpdateTaskScheduleModal: false,\n showUpdateRelationFieldModal: false,\n showCreateRegistrationModal: false,\n showSetInvoiceScheduleModal: false,\n showCreatePlannedTaskModal: false,\n showUpdateRelationTagsModal: false,\n showUpdateRelationUserModal: false,\n showAddAssignmentModal: false,\n showGenerateDocumentsModal: false,\n showFiscalReportModal: false,\n showSendMailModal: false,\n activeRelation: undefined,\n relationLanguages: [],\n labels: [],\n items: [],\n allRelationsSelected: false,\n currentSearchParams: undefined,\n ...hiddenColumnsState,\n initialSearchParams: {\n // Set default filters\n sortKey: 'displayname',\n pageSize: 50,\n relationFilters: {\n ...defaultRelationFilters,\n ...sessionFilters,\n ...searchParams,\n },\n // Override with session storage params\n ...sessionParams,\n },\n };\n }\n\n componentDidMount() {\n this.tagsCancelToken = Axios.CancelToken.source();\n api.base\n .get(`${config.appUrls.api}/api/Resource/Tags`, {\n cancelToken: this.tagsCancelToken.token,\n })\n .then(({ data }) => {\n this.setState({\n labels: data\n .map(x => ({ id: x.id, label: x.name, sort: x.name.toLowerCase() }))\n .sort(dynamicSort('sort')),\n });\n });\n }\n\n componentWillUnmount() {\n if (typeof this.searchToken !== 'undefined') {\n this.searchToken.cancel('Operation canceled due to leaving page.');\n }\n if (typeof this.tagsCancelToken !== 'undefined') {\n this.tagsCancelToken.cancel('Operation canceled due to leaving page.');\n }\n }\n\n handleColumnSelection = items => {\n this.setState(({ hideableColumns }) => ({\n ...handleHiddenColumnsSelection(items, hideableColumns, columnSelectionStorageKey),\n showColumnSelectionModal: false,\n }));\n };\n\n deleteRelation = () => {\n const { activeRelation, items } = this.state;\n const { intl } = this.props;\n const endpoint = `${config.appUrls.api}/api/relation/delete/${activeRelation.id}`;\n\n return api.base\n .delete(endpoint)\n .then(\n ({ data }) =>\n new Promise(resolve => {\n this.setState(state => ({\n ...state,\n showDeleteRelationModal: false,\n items: items.filter(relation => relation.id !== activeRelation.id),\n }));\n\n // Server returns true if the relation was put on inactive because there are open links/invoices/registrations...\n if (data) {\n ToastrService.info(intl.formatMessage(messages.RelationPutInactive));\n } else {\n ToastrService.changesSaved(intl);\n }\n eventBus.publish('reloadRecentRelations');\n resolve(data);\n }),\n )\n .catch(error => {\n handleHttpError(intl)(error);\n });\n };\n\n showDeleteRelationConfirmation = relation => {\n this.setState(state => ({\n ...state,\n showDeleteRelationModal: true,\n activeRelation: relation,\n }));\n };\n\n showUpdateTaskScheduleModal = () => {\n this.setState(state => ({\n ...state,\n showUpdateTaskScheduleModal: true,\n }));\n };\n\n showSetInvoiceScheduleModal = () => {\n this.setState(state => ({\n ...state,\n showSetInvoiceScheduleModal: true,\n }));\n };\n showAddAssignmentModal = () => {\n this.setState(state => ({\n ...state,\n showAddAssignmentModal: true,\n }));\n };\n showUpdateRelationUserModal = () => {\n this.setState(state => ({\n ...state,\n showUpdateRelationUserModal: true,\n }));\n };\n\n showUpdateRelationFieldModal = () => {\n this.setState(state => ({\n ...state,\n showUpdateRelationFieldModal: true,\n }));\n };\n\n showCreateRegistrationModal = () => {\n this.setState(state => ({\n ...state,\n showCreateRegistrationModal: true,\n }));\n };\n showCreatePlannedTaskModal = () => {\n this.setState(state => ({\n ...state,\n showCreatePlannedTaskModal: true,\n }));\n };\n isGlobalActionsDisabled = () => {\n const { items, allRelationsSelected } = this.state;\n if (!items || !items.length) return true;\n if (items.some(x => x.selected) || allRelationsSelected) return false;\n\n return true;\n };\n getSelectionParams = () => {\n const { items, allRelationsSelected } = this.state;\n\n // Get all relation ids that don't match the select all checkbox\n const relationIds = items\n ? items.filter(x => x.selected !== allRelationsSelected).map(x => x.id)\n : [];\n return {\n relationIds,\n selectAll: allRelationsSelected,\n };\n };\n\n handleReportResponse = () => {\n const { intl } = this.props;\n\n this.setState({ exporting: false });\n ToastrService.info(intl.formatMessage(messages.ExportToExcelStarted));\n };\n handleReportError = error => {\n const { intl } = this.props;\n this.setState({ exporting: false });\n handleHttpError(intl)(error);\n };\n\n createAuthorizationReport = () => {\n const { intl } = this.props;\n const { currentSearchParams: searchParams } = this.state;\n\n const params = this.getSelectionParams();\n const url = `/api/relationbatch/AuthorizationReport`;\n\n const urlParams = {\n desc: searchParams.desc,\n sort: searchParams.sortKey,\n page: searchParams.page,\n take: searchParams.pageSize,\n ...searchParams.relationFilters,\n culture: intl.locale,\n connectionId: SignalRService.getConnectionId(),\n };\n\n this.setState({ exporting: true });\n\n return api.base\n .post(url, params, { params: urlParams })\n .then(this.handleReportResponse)\n .catch(this.handleReportError);\n };\n\n createExcelReport = () => {\n const { currentSearchParams: searchParams } = this.state;\n const { intl } = this.props;\n\n const params = this.getSelectionParams();\n const url = `/api/relationbatch/Report`;\n\n const urlParams = {\n desc: searchParams.desc,\n sort: searchParams.sortKey,\n page: searchParams.page,\n take: searchParams.pageSize,\n ...searchParams.relationFilters,\n culture: intl.locale,\n connectionId: SignalRService.getConnectionId(),\n };\n\n this.setState({ exporting: true });\n\n return api.base\n .post(url, params, { params: urlParams })\n .then(this.handleReportResponse)\n .catch(this.handleReportError);\n };\n createLinkedRelationsReport = () => {\n const { intl } = this.props;\n const { currentSearchParams: searchParams } = this.state;\n\n const params = this.getSelectionParams();\n const url = `/api/relationbatch/LinkedRelationsReport`;\n\n const urlParams = {\n desc: searchParams.desc,\n sort: searchParams.sortKey,\n page: searchParams.page,\n take: searchParams.pageSize,\n ...searchParams.relationFilters,\n culture: intl.locale,\n connectionId: SignalRService.getConnectionId(),\n };\n\n this.setState({ exporting: true });\n\n return api.base\n .post(url, params, { params: urlParams })\n .then(this.handleReportResponse)\n .catch(this.handleReportError);\n };\n\n createFiscalReport = modalParams => {\n const { intl } = this.props;\n const { currentSearchParams: searchParams } = this.state;\n\n const params = { ...this.getSelectionParams(), ...modalParams };\n const url = `/api/Fiscal/Report`;\n\n const urlParams = {\n desc: searchParams.desc,\n sort: searchParams.sortKey,\n page: searchParams.page,\n take: searchParams.pageSize,\n ...searchParams.relationFilters,\n culture: intl.locale,\n connectionId: SignalRService.getConnectionId(),\n };\n\n this.setState({ exporting: true });\n\n return api.base\n .post(url, params, { params: urlParams })\n .then(this.handleReportResponse)\n .then(() => {\n this.setState({ showFiscalReportModal: false });\n })\n .catch(this.handleReportError);\n };\n\n createCommunicationChannelReport = () => {\n const { intl } = this.props;\n const { currentSearchParams: searchParams } = this.state;\n\n const params = this.getSelectionParams();\n const url = `/api/relationbatch/CommunicationChannelReport`;\n\n const urlParams = {\n desc: searchParams.desc,\n sort: searchParams.sortKey,\n page: searchParams.page,\n take: searchParams.pageSize,\n ...searchParams.relationFilters,\n\n culture: intl.locale,\n connectionId: SignalRService.getConnectionId(),\n };\n\n this.setState({ exporting: true });\n\n return api.base\n .post(url, params, { params: urlParams })\n .then(this.handleReportResponse)\n .catch(this.handleReportError);\n };\n\n createCommunicationSettingReport = () => {\n const { intl } = this.props;\n const { currentSearchParams: searchParams } = this.state;\n\n const params = this.getSelectionParams();\n const url = `/api/relationbatch/CommunicationSettingReport`;\n\n const urlParams = {\n desc: searchParams.desc,\n sort: searchParams.sortKey,\n page: searchParams.page,\n take: searchParams.pageSize,\n ...searchParams.relationFilters,\n\n culture: intl.locale,\n connectionId: SignalRService.getConnectionId(),\n };\n\n this.setState({ exporting: true });\n\n return api.base\n .post(url, params, { params: urlParams })\n .then(this.handleReportResponse)\n .catch(this.handleReportError);\n };\n\n executeBatchAction = ({ action, parameters }) => {\n if (this.isGlobalActionsDisabled()) return Promise.reject(new Error('invalid'));\n\n const { intl } = this.props;\n const { currentSearchParams: searchParams } = this.state;\n const { stateService } = this.props;\n\n let endpoint = '';\n let successMessage = '';\n let params = {};\n let newLabels = [];\n\n switch (action) {\n case 'fieldupdate':\n endpoint = 'RelationFieldUpdate';\n successMessage = intl.formatMessage(messages.UpdateFieldQueued);\n params = { field: parameters };\n break;\n case 'createtaskschedule':\n endpoint = 'CreateBatchTaskSchedule';\n successMessage = intl.formatMessage(messages.SetTaskSchedulingQueued);\n params = { taskSchedule: parameters };\n break;\n case 'removetaskschedule':\n endpoint = 'RemoveBatchTaskSchedule';\n successMessage = intl.formatMessage(messages.DeleteTaskScheduleQueued);\n params = { taskSchedule: parameters };\n break;\n case 'createregistration':\n endpoint = 'CreateBatchRegistration';\n successMessage = intl.formatMessage(messages.NewRegistrationsQueued);\n params = { parameters };\n break;\n case 'setinvoiceschedule':\n endpoint = 'SetBatchInvoiceSchedule';\n successMessage = intl.formatMessage(messages.SetInvoiceScheduleQueued);\n params = { invoiceSchedule: parameters };\n break;\n case 'createplannedtask':\n endpoint = 'CreateBatchTask';\n successMessage = intl.formatMessage(messages.CreateTaskQueued);\n params = { task: parameters };\n break;\n case 'sendmail':\n endpoint = 'CreateBatchMailJob';\n successMessage = intl.formatMessage(messages.SendEmailQueued);\n params = { ...parameters };\n break;\n case 'teamsupdate':\n endpoint = 'RelationTeamsUpdate';\n if (parameters.action === 'add') {\n successMessage = intl.formatMessage(messages.AddTeamToRelationQueued);\n } else if (parameters.action === 'remove') {\n successMessage = intl.formatMessage(messages.RemoveTeamFromRelationQueued);\n }\n params = { ...parameters };\n break;\n case 'tagsupdate':\n endpoint = 'RelationTagsUpdate';\n if (parameters.action === 'add') {\n successMessage = intl.formatMessage(messages.AddTagsToRelationQueued);\n if (parameters && parameters.tags && parameters.tags.length) {\n const { labels } = this.state;\n // these new labels should be added to state array after request finishes\n parameters.tags.map((x, index) => {\n if (labels.indexOf(x) === -1) {\n const newLabel = {\n id: labels.length + index + 1,\n label: x,\n };\n newLabels = [...newLabels, newLabel];\n }\n });\n }\n } else if (parameters.action === 'remove') {\n successMessage = intl.formatMessage(messages.RemoveTagsFromRelationQueued);\n }\n params = { ...parameters };\n break;\n case 'addAssignment':\n endpoint = 'CreateBatchAssignment';\n successMessage = intl.formatMessage(messages.BackgroundJobQueued);\n params = { assignment: parameters };\n break;\n case 'relationUserUpdate':\n endpoint = 'RelationUserUpdate';\n successMessage = intl.formatMessage(messages.BackgroundJobQueued);\n params = { ...parameters };\n break;\n case 'generateDocuments':\n endpoint = 'GenerateDocuments';\n successMessage = intl.formatMessage(messages.GenerateDocumentsQueued);\n params = { ...parameters };\n break;\n default:\n endpoint = action;\n successMessage = intl.formatMessage(messages.BackgroundJobQueued);\n params = { ...parameters };\n break;\n }\n\n params = { ...params, ...this.getSelectionParams() };\n\n const url = `/api/relationbatch/${endpoint}`;\n\n const urlParams = {\n desc: searchParams.desc,\n sort: searchParams.sortKey,\n page: searchParams.page,\n take: searchParams.pageSize,\n ...searchParams.relationFilters,\n };\n\n return api.base\n .post(url, params, { params: urlParams })\n .then(({ data }) => {\n this.setState(state => ({\n ...state,\n showUpdateTaskScheduleModal: false,\n showUpdateRelationFieldModal: false,\n showCreateRegistrationModal: false,\n showSetInvoiceScheduleModal: false,\n showCreatePlannedTaskModal: false,\n showUpdateRelationTeamModal: false,\n showUpdateRelationTagsModal: false,\n showUpdateRelationUserModal: false,\n showAddAssignmentModal: false,\n showGenerateDocumentsModal: false,\n showSendMailModal: false,\n showSearchRelationsInPeppolNetworkModal: false,\n labels: [...state.labels, ...newLabels],\n }));\n\n const onClick = data ? () => stateService.gotoJob(data.id) : undefined;\n\n ToastrService.info(successMessage, undefined, onClick);\n })\n .catch(handleHttpError(intl));\n };\n\n createTaskScheduleForSelectedRelations = taskSchedule =>\n this.executeBatchAction({\n action: 'createtaskschedule',\n parameters: taskSchedule,\n });\n\n removeTaskScheduleForSelectedRelations = taskSchedule =>\n this.executeBatchAction({\n action: 'removetaskschedule',\n parameters: taskSchedule,\n });\n\n setInvoiceScheduleSelectedRelations = invoiceSchedule =>\n this.executeBatchAction({\n action: 'setinvoiceschedule',\n parameters: invoiceSchedule,\n });\n\n addAssignmentToSelectedRelations = assignment =>\n this.executeBatchAction({\n action: 'addAssignment',\n parameters: assignment,\n });\n\n updateRelationField = field =>\n this.executeBatchAction({\n action: 'fieldupdate',\n parameters: field,\n });\n\n updateRelationTeam = data =>\n this.executeBatchAction({\n action: 'teamsupdate',\n parameters: data,\n });\n\n updateRelationTags = data =>\n this.executeBatchAction({\n action: 'tagsupdate',\n parameters: data,\n });\n\n createBatchRegistrations = batchRegistrationModel =>\n this.executeBatchAction({\n action: 'createregistration',\n parameters: batchRegistrationModel,\n });\n createTaskForSelectedRelations = task =>\n this.executeBatchAction({\n action: 'createplannedtask',\n parameters: task,\n });\n sendEmailForSelectedRelations = email =>\n this.executeBatchAction({\n action: 'sendmail',\n parameters: email,\n });\n updateRelationUser = data =>\n this.executeBatchAction({\n action: 'relationUserUpdate',\n parameters: data,\n });\n\n generateDocuments = data =>\n this.executeBatchAction({\n action: 'generateDocuments',\n parameters: data,\n });\n\n restoreRelation = relation => {\n const endpoint = `${config.appUrls.api}/api/relation/undelete/${relation.id}`;\n const { items } = this.state;\n const { intl } = this.props;\n\n return api.base\n .delete(endpoint)\n .then(() => {\n const itemsCopy = [...items];\n\n const item = itemsCopy.find(x => x.id === relation.id);\n\n item.isActive = true;\n\n this.setState(state => ({\n ...state,\n items: itemsCopy,\n }));\n\n ToastrService.changesSaved(intl);\n })\n .catch(error => {\n handleHttpError(intl)(error);\n });\n };\n\n newRelation = () => {\n const { stateService } = this.props;\n stateService.goToNewRelation();\n };\n\n goToInteractions = (relationId, openMailModal) => {\n const { stateService } = this.props;\n stateService.goToInteractions(relationId, openMailModal);\n };\n\n handleRelationSelect = relation => {\n this.setState(({ items }) => ({\n items: items.map(x => (x.id === relation.id ? { ...x, selected: !x.selected } : x)),\n }));\n };\n\n handleSelectAllRelations = () => {\n const { items, allRelationsSelected } = this.state;\n\n const isCurrentlySelected = !allRelationsSelected;\n\n const itemsCopy = items.map(e => ({ ...e, selected: !!isCurrentlySelected }));\n\n this.setState(state => ({\n ...state,\n allRelationsSelected: isCurrentlySelected,\n items: itemsCopy,\n }));\n };\n\n filtersChanged = filters => {\n this.setState(state => ({\n ...state,\n initialSearchParams: {\n ...state.initialSearchParams,\n page: 0,\n relationFilters: filters,\n },\n }));\n };\n\n loadItems = searchParams => {\n const { allRelationsSelected } = this.state;\n if (typeof this.searchToken !== 'undefined') {\n this.searchToken.cancel('Operation canceled due to new request.');\n }\n this.searchToken = Axios.CancelToken.source();\n\n sessionStorage.setItem(\n 'RelationOverviewParams',\n JSON.stringify({\n desc: searchParams.desc,\n sortKey: searchParams.sortKey,\n relationFilters: searchParams.relationFilters,\n }),\n );\n\n return api.base\n .get('/api/relation/list', {\n params: {\n desc: searchParams.desc,\n sort: searchParams.sortKey,\n page: searchParams.page,\n take: searchParams.pageSize,\n ...searchParams.relationFilters,\n },\n cancelToken: this.searchToken.token,\n })\n .then(({ data }) => {\n // If checkbox for all relations is selected, set selected on all new incoming relations\n const newRelations = data.data.map(e => ({ ...e, selected: !!allRelationsSelected }));\n\n this.setState(state => ({\n ...state,\n items: searchParams.page > 0 ? [...state.items, ...newRelations] : [...newRelations],\n total: data.total,\n currentSearchParams: searchParams,\n }));\n\n return data.data;\n })\n .catch(error => {\n if (!Axios.isCancel(error)) return error;\n });\n };\n\n getSelectedRelationLanguages = () => {\n const { allRelationsSelected, items } = this.state;\n return new Promise((resolve, reject) => {\n if (allRelationsSelected) {\n const { currentSearchParams: searchParams } = this.state;\n\n const params = { ...this.getSelectionParams() };\n\n const urlParams = {\n desc: searchParams.desc,\n sort: searchParams.sortKey,\n page: searchParams.page,\n take: searchParams.pageSize,\n ...searchParams.relationFilters,\n };\n\n api.base\n .post(`/api/relation/OverviewLanguages`, params, { params: urlParams })\n\n .then(({ data }) => {\n resolve(data);\n })\n .catch(error => {\n reject(error);\n });\n } else {\n const languages = [...new Set(items.filter(x => x.selected).map(x => x.languageCode))];\n resolve(languages);\n }\n });\n };\n\n openEmailModal = () => {\n const { intl } = this.props;\n this.getSelectedRelationLanguages()\n .then(languages => {\n this.setState({\n showSendMailModal: true,\n relationLanguages: languages,\n });\n })\n .catch(error => {\n handleHttpError(intl)(error);\n });\n };\n openGenerateDocumentsModal = () => {\n const { intl } = this.props;\n this.getSelectedRelationLanguages()\n .then(languages => {\n this.setState({\n showGenerateDocumentsModal: true,\n relationLanguages: languages,\n });\n })\n .catch(error => {\n handleHttpError(intl)(error);\n });\n };\n\n getCountSelectedRelationsFormatted() {\n const { total } = this.state;\n const { intl } = this.props;\n const count = this.getCountSelectedRelations();\n\n return intl.formatMessage(messages.CountRelationsSelected, { count, total });\n }\n\n getCountSelectedRelations() {\n const { allRelationsSelected, total, items } = this.state;\n\n const count = items ? items.filter(x => x.selected !== allRelationsSelected).length : 0;\n\n if (allRelationsSelected) {\n return total - count;\n }\n return count;\n }\n\n determineRelationTypeForGlobalAction = () => {\n const {\n allRelationsSelected,\n items,\n initialSearchParams: { relationFilters = {} } = {},\n } = this.state;\n if (relationFilters && relationFilters.type && relationFilters.type.length === 1) {\n return [relationFilters.type]; // Return relation type from filter if only 1 is selected\n }\n if (allRelationsSelected) return null; // Cannot determine relation type if select all is on\n if (!items || items.length <= 0) return null;\n const [first, ...selected] = items.filter(x => x.selected);\n const relationType = first.type; // Get relation type from first selected\n if (selected.some(x => x.type !== relationType)) return null; // If there are there other relation types selected, return null\n return relationType;\n };\n\n render() {\n const {\n initialSearchParams,\n items,\n showDeleteRelationModal,\n showUpdateTaskScheduleModal,\n showUpdateRelationFieldModal,\n showCreateRegistrationModal,\n showSetInvoiceScheduleModal,\n showSearchRelationsInPeppolNetworkModal,\n showCreatePlannedTaskModal,\n showUpdateRelationTeamModal,\n showUpdateRelationTagsModal,\n showUpdateRelationUserModal,\n showGenerateDocumentsModal,\n showFiscalReportModal,\n showSendMailModal,\n showAddAssignmentModal,\n allRelationsSelected,\n exporting,\n relationLanguages,\n labels,\n showColumnSelectionModal,\n hideableColumns,\n columnStatus,\n columnDefinitions,\n } = this.state;\n const { intl } = this.props;\n\n const hasData = items && items.length > 0;\n\n return (\n
    \n {showDeleteRelationModal && (\n \n this.setState(state => ({\n ...state,\n showDeleteRelationModal: false,\n activeRelation: undefined,\n }))\n }\n onSave={() => this.deleteRelation()}\n />\n )}\n {showUpdateTaskScheduleModal && (\n \n this.setState(state => ({\n ...state,\n showUpdateTaskScheduleModal: false,\n }))\n }\n onSave={({ action, model }) => {\n if (action === 'add') {\n return this.createTaskScheduleForSelectedRelations(model);\n }\n if (action === 'remove') {\n return this.removeTaskScheduleForSelectedRelations(model);\n }\n }}\n />\n )}\n {showCreateRegistrationModal && (\n \n this.setState(state => ({\n ...state,\n showCreateRegistrationModal: false,\n }))\n }\n onSave={batchRegistrationModel => this.createBatchRegistrations(batchRegistrationModel)}\n countSelectedRelations={this.getCountSelectedRelations()}\n />\n )}\n {showUpdateRelationFieldModal && (\n \n this.setState(state => ({\n ...state,\n showUpdateRelationFieldModal: false,\n }))\n }\n onSave={field => this.updateRelationField(field)}\n />\n )}\n {showSetInvoiceScheduleModal && (\n \n this.setState(state => ({\n ...state,\n showSetInvoiceScheduleModal: false,\n }))\n }\n onSave={invoiceSchedule => this.setInvoiceScheduleSelectedRelations(invoiceSchedule)}\n />\n )}\n {showSearchRelationsInPeppolNetworkModal && (\n \n this.setState(state => ({\n ...state,\n showSearchRelationsInPeppolNetworkModal: false,\n }))\n }\n onSave={model =>\n this.executeBatchAction({\n action: 'SearchRelationsInPeppolNetwork',\n parameters: model,\n })\n }\n />\n )}\n {showCreatePlannedTaskModal && (\n \n this.setState(state => ({\n ...state,\n showCreatePlannedTaskModal: false,\n }))\n }\n onSave={task => this.createTaskForSelectedRelations(task)}\n />\n )}\n {showSendMailModal && (\n \n this.setState(state => ({\n ...state,\n showSendMailModal: false,\n }))\n }\n onSave={emailModel => this.sendEmailForSelectedRelations(emailModel)}\n />\n )}\n {showUpdateRelationTeamModal && (\n \n this.setState(state => ({\n ...state,\n showUpdateRelationTeamModal: false,\n }))\n }\n onSave={data => this.updateRelationTeam(data)}\n />\n )}\n\n {showUpdateRelationTagsModal && (\n \n this.setState(state => ({\n ...state,\n showUpdateRelationTagsModal: false,\n }))\n }\n onSave={data => this.updateRelationTags(data)}\n />\n )}\n\n {showAddAssignmentModal && (\n this.setState({ showAddAssignmentModal: false })}\n onSave={data => this.addAssignmentToSelectedRelations(data)}\n relationType={this.determineRelationTypeForGlobalAction()}\n />\n )}\n {showUpdateRelationUserModal && (\n this.setState({ showUpdateRelationUserModal: false })}\n onSave={data => this.updateRelationUser(data)}\n />\n )}\n {showGenerateDocumentsModal && (\n \n this.setState({\n showGenerateDocumentsModal: false,\n })\n }\n onSave={this.generateDocuments}\n />\n )}\n {showFiscalReportModal && (\n this.setState({ showFiscalReportModal: false })}\n onSave={this.createFiscalReport}\n />\n )}\n {showColumnSelectionModal && (\n this.setState({ showColumnSelectionModal: false })}\n show={showColumnSelectionModal}\n sortByLabel={false}\n />\n )}\n\n \n
    \n this.filtersChanged(filters)}\n countSelectedRelations={this.getCountSelectedRelationsFormatted()}\n labels={labels}\n />\n
    \n
    \n
    \n
    \n this.setState({ showColumnSelectionModal: true })}\n >\n \n \n \n \n \n this.setState({ showFiscalReportModal: true })}\n onCreateCommunicationChannelReport={this.createCommunicationChannelReport}\n onCreateCommunicationSettingReport={this.createCommunicationSettingReport}\n disabled={!hasData}\n exporting={exporting}\n />\n\n this.setState({ showUpdateRelationTeamModal: true })}\n onUpdateTags={() => this.setState({ showUpdateRelationTagsModal: true })}\n onSendMail={this.openEmailModal}\n onAddAssignment={this.showAddAssignmentModal}\n onUpdateRelationUser={this.showUpdateRelationUserModal}\n onGenerateDocuments={this.openGenerateDocumentsModal}\n onSearchOnPeppolNetwork={() =>\n this.setState({ showSearchRelationsInPeppolNetworkModal: true })\n }\n disabled={this.isGlobalActionsDisabled()}\n />\n
    \n
    \n this.loadItems(searchParams)}\n initialSearchParams={initialSearchParams}\n items={items}\n renderRow={item => (\n \n )}\n noDataLabel={}\n >\n this.handleSelectAllRelations()}\n value={allRelationsSelected}\n />\n }\n />\n\n \n\n {columnDefinitions.map(column => (\n \n ))}\n\n \n \n
    \n );\n }\n\n static propTypes = {\n intl: intlShape.isRequired,\n };\n\n static defaultProps = {};\n}\n\nexport default showWhenPermission(\n 'relation',\n 'read',\n)(injectStateService(injectIntl(RelationOverviewContainer)));\n","import { defineMessages } from 'react-intl';\n\nconst messages = defineMessages({\n PlannedRegistrationOverview: 'Planned registration overview',\n FinancialStatementScheme: 'FinancialStatementScheme',\n AssignedToMe: 'Assigned to me',\n Unassigned: 'Unassigned',\n SelectAll: 'Select all',\n SelectYourFilters: 'Select your filters',\n Filters: 'Filters',\n ResetFilters: 'Reset filters',\n WithPriceListItem: 'With price list item',\n WithoutPriceListItem: 'Without price list item',\n WithPlannedRegistrations: 'With planned registrations',\n WithoutPlannedRegistrations: 'Without planned registrations',\n Relation: 'Relation',\n UniqueIdentifier: 'Unique Identifier',\n RelationCode: 'Relation code',\n Assignment: 'Assignment',\n Schedule: 'Schedule',\n NextPlanningDate: 'Next planning date',\n PlanningStartStop: 'Planning start - stop',\n Resource: 'Resource',\n Quantity: 'Quantity',\n UnitPrice: 'Unit price',\n Amount: 'Amount',\n GlobalActions: 'Global actions',\n ExportToExcel: 'Export to Excel',\n AddPlannedRegistrations: 'Add planned registrations',\n RemovePlannedRegistrations: 'Remove planned registrations',\n RemovePlannedRegistrationsConfirmationMsg:\n 'Are you sure you want to remove all selected planned registrations?',\n GlobalActionStarted: 'Global action was started, click here to see its progress',\n DayAndMonth: 'Day and month',\n DayOfTheMonth: 'Day of the month',\n Day: 'Day',\n ResourceType: 'Resource type',\n StartDate: 'Start date',\n EndDate: 'End date',\n CountSelected: 'Selected {count} / {total}',\n Other: 'Other',\n SendEmail: 'Send email',\n EndFiscalYear: 'End fiscal year',\n EmptyFiscalYear: 'Empty fiscal year',\n CreateSingleRegistration: 'Create single registration',\n ColumnConfig: 'Configure columns',\n SelectOverviewColumns: 'Select overview columns',\n SelectColumns: 'Select columns',\n ExportToExcelStarted: 'Export to Excel started',\n User: 'User',\n SystemUser: 'System user',\n ChangeUser: 'Change user',\n});\n\nexport default messages;\n","const PlannedRegistrationQuantity = ({ planning }) => {\n if (!planning) return null;\n const { resource, durationMinutes, quantity } = planning;\n if (!resource) return;\n\n if (resource.type === 0 || resource.type === 3) {\n return durationMinutes ? durationMinutes.minuteToTime() : null;\n }\n return quantity;\n};\nexport default PlannedRegistrationQuantity;\n","import React, { useMemo } from 'react';\nimport PropTypes from 'prop-types';\n\nimport RelationName from '@/shared/components/RelationName';\nimport { hasAssignments } from '@/shared/components/security/HasAssignments';\nimport { mapInvoiceStreamName, mapResourceName } from '@/shared/services/ObjectDisplayService';\nimport Checkbox from '@/shared/components/input/Checkbox';\nimport FormattedListValue from '@/shared/components/FormattedListValue';\nimport FormattedCurrency from '@/shared/components/FormattedCurrency';\nimport intlShape from '@/shared/utils/intlShape';\nimport { guid1 } from '@/shared/utils/guid';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport PlannedRegistrationQuantity from './PlannedRegistrationQuantity';\nimport FormattedDateShort from '../../../shared/components/FormattedDateShort';\nimport messages from './messages';\n\nconst PlannedRegistrationOverviewRow = ({\n row,\n selected,\n intl,\n handleSelect,\n disableSelect,\n showPrices,\n columnStatus,\n}) => {\n const { planning } = row;\n const user = useMemo(() => {\n if (!planning?.userId) return null;\n return planning.userId === guid1\n ? intl.formatMessage(messages.SystemUser)\n : DataCacheService.getUserName(planning.userId);\n }, [planning?.userId, intl]);\n\n return (\n \n \n \n handleSelect(row)} value={selected} disabled={disableSelect} />\n \n \n \n \n {columnStatus.relationUniqueIdentifier && {row.relation.uniqueIdentifier}}\n {columnStatus.relationCode && {row.relation.customerCode}}\n {hasAssignments() && {mapInvoiceStreamName(row.invoiceStream, intl)}}\n \n {planning && planning.scheduleId && (\n \n )}\n \n \n {planning && planning.nextPlanningDate && (\n \n )}\n \n \n {planning && planning.startDate && }\n {planning && planning.startDate && planning.endDate && ' - '}\n {planning && planning.endDate && }\n \n {planning && mapResourceName(planning.resource, intl)}\n {planning && }\n {columnStatus.user && {user}}\n {showPrices && {planning && }}\n {showPrices && {planning && }}\n {/* actions */}\n \n \n );\n};\nPlannedRegistrationOverviewRow.propTypes = {\n row: PropTypes.shape({}).isRequired,\n selected: PropTypes.bool,\n handleSelect: PropTypes.func,\n intl: intlShape.isRequired,\n disableSelect: PropTypes.bool,\n showPrices: PropTypes.bool,\n columnStatus: PropTypes.shape({}).isRequired,\n};\nPlannedRegistrationOverviewRow.defaultProps = {\n selected: false,\n disableSelect: false,\n handleSelect: () => {},\n showPrices: false,\n};\nexport default PlannedRegistrationOverviewRow;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage, injectIntl } from 'react-intl';\nimport isEqual from 'lodash-es/isEqual';\n\nimport { FaFilter, FaUndo } from 'react-icons/fa';\nimport { Dropdown } from 'react-bootstrap';\n\nimport intlShape from '@/shared/utils/intlShape';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport { dynamicSort, dynamicSortMultiple } from '@/shared/utils/dynamicSort';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport RelationSearch from '@/shared/components/input/RelationSearch';\nimport userStorage from '@/shared/services/userStorage';\nimport guid from '@/shared/utils/guid';\nimport CheckboxDropdownMenu from '@/shared/components/input/CheckboxDropdownMenu';\nimport DynamicFilter, {\n getDynamicFiltersFromDefaultFilters,\n initDynamicFilters,\n} from '@/shared/components/DynamicFilter';\nimport AutoComplete from '@/shared/components/input/select/AutoComplete';\nimport UserSearch from '@/shared/components/input/UserSearch';\nimport messages from './messages';\n\nexport const defaultFilters = {\n relationId: null, // String\n relationName: null,\n assistant: null, // UserId\n responsible: null, // UserId\n associate: null, // UserId\n assistantBackup: null, // UserId\n billingUser: null, // UserId\n seniorUser: null, // UserId\n relationTypes: [], // Array\n legalForms: [], // Array\n withLabels: [], // Array\n withoutLabels: [], // Array,\n ownCompanies: [],\n assignmentTemplateId: null,\n withCategoryId: null,\n withoutCategoryId: null,\n endFiscalYears: [],\n financialStatementSchemes: [],\n accountingSoftware: [],\n otherSoftware: [],\n invoiceScheduleTypes: [],\n userId: null,\n filterBehaviours: {\n withLabels: 1,\n },\n relationGroups: [],\n};\n\nconst allDynamicFilters = [\n ...getDynamicFiltersFromDefaultFilters(defaultFilters, 'userId'),\n { id: 'userId', label: messages.User },\n];\n\nconst dynamicFiltersStorageKey = 'PlannedRegistrationOverviewDynamicFilters';\n\nclass PlannedRegistrationOverviewFilters extends Component {\n state = {\n labels: [],\n withCategories: [],\n withoutCategories: [],\n dynamicFilters: [],\n };\n\n componentDidMount() {\n const { intl, filters } = this.props;\n\n Promise.all([\n api.base.get(`${config.appUrls.api}/api/Resource/Tags`),\n api.base.get(`${config.appUrls.api}/api/Resource/Categories/`),\n ]).then(([{ data: tags }, { data: categoriesResult }]) => {\n const categories = categoriesResult\n .map(x => {\n const codePrefix = x.code ? `${x.code} – ` : '';\n\n const label = `${codePrefix}${intl.formatMessage(\n listItemMsg('resourceCategory', x.id, x.name),\n )}`;\n return { key: x.id, label, type: x.type };\n })\n .sort(dynamicSortMultiple('type', 'label'));\n\n this.setState({\n dynamicFilters: initDynamicFilters(\n intl,\n allDynamicFilters,\n userStorage.getItem(dynamicFiltersStorageKey) || [],\n filters,\n defaultFilters,\n ),\n withCategories: [\n { key: guid.empty, label: intl.formatMessage(messages.WithPlannedRegistrations) },\n ...categories,\n ],\n withoutCategories: [\n { key: guid.empty, label: intl.formatMessage(messages.WithoutPlannedRegistrations) },\n ...categories,\n ],\n labels: tags\n .map(x => ({ id: x.id, label: x.name, sort: x.name.toLowerCase() }))\n .sort(dynamicSort('sort')),\n });\n });\n\n api.base.get(`${config.appUrls.api}/api/Resource/Categories/`).then(({ data }) => {\n const categories = data\n .map(x => {\n const codePrefix = x.code ? `${x.code} – ` : '';\n\n const label = `${codePrefix}${intl.formatMessage(\n listItemMsg('resourceCategory', x.id, x.name),\n )}`;\n return { key: x.id, label, type: x.type };\n })\n .sort(dynamicSortMultiple('type', 'label'));\n this.setState({\n withCategories: [\n { key: guid.empty, label: intl.formatMessage(messages.WithPlannedRegistrations) },\n ...categories,\n ],\n withoutCategories: [\n { key: guid.empty, label: intl.formatMessage(messages.WithoutPlannedRegistrations) },\n ...categories,\n ],\n });\n this.setState({\n dynamicFilters: initDynamicFilters(\n intl,\n allDynamicFilters,\n userStorage.getItem(dynamicFiltersStorageKey) || [],\n filters,\n defaultFilters,\n ),\n });\n });\n }\n\n filterChanged = filter => {\n const { onFilterChange, filters } = this.props;\n const newFilters = { ...filters, ...filter };\n\n if (!isEqual(filters, newFilters)) {\n onFilterChange(newFilters);\n }\n };\n dynamicFilterChanged = (item, selected) => {\n const { dynamicFilters } = this.state;\n const newFilters = dynamicFilters.map(x => {\n if (x.id !== item.id && item.id !== 'selectall') return x;\n return { ...x, selected };\n });\n\n userStorage.setItem(\n dynamicFiltersStorageKey,\n newFilters.filter(x => x.selected).map(x => x.id),\n );\n this.setState({ dynamicFilters: newFilters });\n\n const { filters } = this.props;\n if (!selected && !isEqual(filters[item.id], defaultFilters[item.id])) {\n // Reset filter when it's removed\n this.filterChanged({ [item.id]: defaultFilters[item.id] });\n }\n };\n\n renderDynamicFilter = ({ type, filters, intl }) => {\n switch (type) {\n case 'userId': {\n return (\n
    \n
    \n this.filterChanged({ userId: user?.id ?? null })}\n value={filters.userId}\n placeholder={intl.formatMessage(messages.User)}\n disabled={!!filters.withoutCategoryId}\n />\n
    \n
    \n );\n }\n default:\n console.warn(`Missing filter: ${type}`);\n return null;\n }\n };\n render() {\n const { filters, intl, countSelected } = this.props;\n const { dynamicFilters, withCategories, withoutCategories, labels } = this.state;\n const initRelation = filters.relationId\n ? {\n key: filters.relationId,\n label: filters.relationName,\n invoiceStreamId: filters.invoiceStreamId,\n }\n : null;\n\n const withCategory =\n withCategories && filters.withCategoryId\n ? withCategories.find(x => x.key === filters.withCategoryId)\n : null;\n const withoutCategory =\n withoutCategories && filters.withoutCategoryId\n ? withoutCategories.find(x => x.key === filters.withoutCategoryId)\n : null;\n\n const hasFilters = !isEqual(filters, defaultFilters);\n const visibleFilters = dynamicFilters.filter(x => x.selected).map(x => x.id);\n const dropdownFilters = [\n {\n id: 'selectall',\n label: intl.formatMessage(messages.SelectAll),\n selected: !dynamicFilters.some(x => !x.selected),\n },\n ...dynamicFilters,\n ];\n return (\n
    \n
    \n
    \n
    \n {\n if (!item || !item.id) {\n this.filterChanged({ relationId: null, relationName: null });\n } else {\n this.filterChanged({\n relationId: item.key,\n relationName: item.label,\n });\n }\n }}\n initialSelectedItem={initRelation}\n />\n
    \n
    \n
    \n
    \n \n this.filterChanged({\n withCategoryId: e && e.key ? e.key : null,\n withoutCategoryId: null,\n })\n }\n onClear={() => this.filterChanged({ withCategoryId: null })}\n value={withCategory}\n items={withCategories}\n placeholder={intl.formatMessage(messages.WithPriceListItem)}\n mode=\"edit\"\n />\n
    \n
    \n
    \n
    \n \n this.filterChanged({\n withoutCategoryId: e && e.key ? e.key : null,\n withCategoryId: null,\n userId: null,\n })\n }\n onClear={() => this.filterChanged({ withoutCategoryId: null })}\n value={withoutCategory}\n items={withoutCategories}\n placeholder={intl.formatMessage(messages.WithoutPriceListItem)}\n mode=\"edit\"\n />\n
    \n
    \n
    \n {visibleFilters && visibleFilters.length > 0 ? (\n
    \n {visibleFilters.map(id => (\n \n ))}\n
    \n ) : null}\n
    \n
    \n \n \n \n \n \n \n \n {hasFilters && (\n this.filterChanged(defaultFilters)}\n >\n \n  \n \n \n )}\n {countSelected &&
    {countSelected}
    }\n
    \n
    \n
    \n );\n }\n}\n\nPlannedRegistrationOverviewFilters.propTypes = {\n filters: PropTypes.shape({\n relationId: PropTypes.string,\n relationName: PropTypes.string,\n responsible: PropTypes.string,\n assistant: PropTypes.string,\n associate: PropTypes.string,\n assistantBackup: PropTypes.string,\n billingUser: PropTypes.string,\n seniorUser: PropTypes.string,\n relationType: PropTypes.arrayOf(PropTypes.number),\n legalForms: PropTypes.arrayOf(PropTypes.number),\n withLabels: PropTypes.arrayOf(PropTypes.string),\n withoutLabels: PropTypes.arrayOf(PropTypes.string),\n ownCompanies: PropTypes.arrayOf(PropTypes.string),\n relationGroups: PropTypes.arrayOf(PropTypes.string),\n assignmentTemplateId: PropTypes.string,\n withCategoryId: PropTypes.string,\n withoutCategoryId: PropTypes.string,\n accountingSoftware: PropTypes.arrayOf(PropTypes.number),\n otherSoftware: PropTypes.string,\n userId: PropTypes.string,\n }),\n onFilterChange: PropTypes.func.isRequired,\n countSelected: PropTypes.string,\n intl: intlShape.isRequired,\n};\nPlannedRegistrationOverviewFilters.defaultProps = {\n filters: defaultFilters,\n countSelected: '',\n};\n\nexport default injectIntl(PlannedRegistrationOverviewFilters);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport moment from 'moment';\nimport { isEqual } from 'lodash';\n\nimport { FormattedMessage } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\n\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport DayMonthPicker from '@/shared/components/input/DayMonthPicker';\n\nimport DatePicker from '@/shared/components/input/DatePicker';\nimport NumberInput from '@/shared/components/input/NumberInput';\nimport {\n actions,\n createEmptyRegistration,\n executeAction,\n isRegistrationValid,\n} from '@/shared/components/registration/registrationHelpers';\nimport ResourceTypeRadioButtons from '@/shared/components/registration/partials/ResourceTypeRadioButtons';\nimport RegistrationComponent from '@/shared/components/registration/RegistrationComponent';\nimport guid, { guid1 } from '@/shared//utils/guid';\nimport {\n isBeforeTomorrow,\n validateDateRange,\n validateEndDate,\n} from '@/shared/utils/validationHelpers';\nimport UserSearch from '@/shared/components/input/UserSearch';\nimport messages from '../messages';\n\nconst registrationOptions = {\n showDate: false,\n showReferenceYear: false,\n showRelation: false,\n showAssignments: false,\n showTasks: false,\n showFromUntil: false,\n showPrice: false,\n showDiscount: false,\n showTotalAmount: false,\n showInteraction: false,\n crmTypes: [3], //Only customers are allowed for planned registrations\n};\n\nclass CreatePlannedRegistrationsModal extends Component {\n constructor(props) {\n super(props);\n const { assignmentTemplateId } = props;\n this.state = {\n schedules: [],\n schedule: null,\n dayMonthDate: { day: 1, month: 0 },\n model: {\n scheduleId: null,\n startDate: moment\n .utc()\n .startOf('day')\n .add(1, 'days'),\n endDate: null,\n day: 1,\n month: 1,\n },\n registration: createEmptyRegistration({\n invoiceStreamId: guid.empty,\n type: 1,\n source: 2,\n quantity: 1,\n userId: guid1,\n assignmentTemplateId,\n }),\n startDateFocused: null,\n endDateFocused: null,\n showValidation: false,\n };\n }\n\n retrieveSchedules = () =>\n api.base.get(`${config.appUrls.api}/api/PlannedRegistration/Schedules`).then(({ data }) => {\n if (data) {\n const { intl } = this.props;\n const schedules = data\n .map(x => ({\n ...x,\n label: intl.formatMessage(listItemMsg('plannedregistrationschedule', x.id, x.name)),\n }))\n .sort(dynamicSort('label'));\n const schedule = schedules.find(x => x.numberOfLines === 1); // Select yearly schedule as default\n this.setState(({ model }) => ({\n schedules,\n schedule,\n model: { ...model, scheduleId: schedule ? schedule.id : null },\n }));\n }\n });\n\n componentDidMount() {\n this.retrieveSchedules();\n }\n\n onScheduleChange = e => {\n const { schedules } = this.state;\n const id = e.target.value || null;\n const schedule = schedules && id ? schedules.find(x => x.id === id) : null;\n this.setState(({ model }) => ({ schedule, model: { ...model, scheduleId: id } }));\n };\n onDayMonthChange = dayMonthDate => {\n this.setState(({ model }) => {\n if (!dayMonthDate) return { dayMonthDate, model: { ...model, day: null } };\n const { day, month } = dayMonthDate;\n return { dayMonthDate, model: { ...model, day, month: month + 1 } };\n });\n };\n updateModel = values => {\n this.setState(({ model }) => ({ model: { ...model, ...(values || {}) } }));\n };\n\n isFormInvalid = () => {\n const { model, schedule, registration } = this.state;\n if (!model || !schedule) return true;\n if (!model.scheduleId) return true;\n if (schedule.numberOfLines === 1 && (!model.day || !model.month)) return true;\n if (schedule.numberOfLines > 1 && !model.day) return true;\n if (!model.startDate || !moment(model.startDate).isValid()) return true;\n if (model.endDate && !moment(model.endDate).isValid()) return true;\n if (!validateDateRange(model.startDate, model.endDate, true)) return true;\n if (!isRegistrationValid(registration, registrationOptions)) return true;\n return false;\n };\n doRegistrationAction = (action, value) => {\n this.setState(({ registration }) => {\n const newValue = executeAction(registration, action, value);\n if (isEqual(newValue, registration)) return {};\n return { registration: newValue };\n });\n };\n userChanged = user => {\n this.setState(({ registration }) => ({ registration: { ...registration, userId: user?.id } }));\n };\n onSave = () => {\n if (this.isFormInvalid()) return;\n const { onSave } = this.props;\n const { model, registration, schedule } = this.state;\n const data = { ...model, template: registration };\n if (schedule.numberOfLines > 1) data.month = null;\n return onSave(data);\n };\n showValidation = () => this.setState({ showValidation: true });\n\n render() {\n const { show, onClose, intl } = this.props;\n const {\n schedules,\n schedule,\n dayMonthDate,\n model,\n registration,\n startDateFocused,\n endDateFocused,\n showValidation,\n users,\n } = this.state;\n\n return (\n \n
    \n
    \n \n \n {schedules && (\n \n {schedules.map(x => (\n \n ))}\n \n )}\n
    \n
    \n {schedule && schedule.numberOfLines === 1 && (\n
    \n \n \n \n
    \n \n )}\n {schedule && schedule.numberOfLines > 1 && (\n
    \n \n
    \n this.updateModel({ day: value })}\n className=\"form-control\"\n placeholder={intl.formatMessage(messages.Day)}\n noDecimals\n />\n
    \n
    \n )}\n\n
    \n \n
    \n this.updateModel({ startDate: date })}\n focused={startDateFocused}\n onFocusChange={({ focused }) => this.setState({ startDateFocused: focused })}\n id=\"startDate\"\n required\n block\n small\n isOutsideRange={isBeforeTomorrow}\n />\n
    \n
    \n \n \n
    \n this.updateModel({ endDate: date })}\n focused={endDateFocused}\n onFocusChange={({ focused }) => this.setState({ endDateFocused: focused })}\n id=\"endDate\"\n block\n small\n isOutsideRange={isBeforeTomorrow}\n />\n
    \n \n
    \n \n
    \n \n
    \n
    \n
    \n \n
    \n this.doRegistrationAction(actions.resourceTypeChanged, value)}\n />\n
    \n
    \n \n \n \n );\n }\n}\n\nCreatePlannedRegistrationsModal.propTypes = {\n show: PropTypes.bool,\n onClose: PropTypes.func.isRequired,\n onSave: PropTypes.func.isRequired,\n assignmentTemplateId: PropTypes.string,\n\n intl: intlShape.isRequired,\n};\nCreatePlannedRegistrationsModal.defaultProps = {\n show: false,\n assignmentTemplateId: undefined,\n};\nexport default CreatePlannedRegistrationsModal;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nimport { FormattedMessage } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport UserSearch from '@/shared/components/input/UserSearch';\nimport messages from '../messages';\n\nclass ChangePlannedRegistrationUserModal extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n userId: null,\n showValidation: false,\n };\n }\n state = {};\n\n isFormInvalid = () => {\n const { userId } = this.state;\n if (!userId) return true;\n return false;\n };\n userChanged = user => {\n this.setState({ userId: user?.id });\n };\n onSave = () => {\n if (this.isFormInvalid()) return;\n const { onSave } = this.props;\n const { userId } = this.state;\n return onSave({ userId });\n };\n showValidation = () => this.setState({ showValidation: true });\n\n render() {\n const { show, onClose, intl } = this.props;\n const { userId, showValidation } = this.state;\n\n return (\n \n
    \n
    \n \n
    \n \n
    \n
    \n
    \n \n );\n }\n}\n\nChangePlannedRegistrationUserModal.propTypes = {\n show: PropTypes.bool,\n onClose: PropTypes.func.isRequired,\n onSave: PropTypes.func.isRequired,\n\n intl: intlShape.isRequired,\n};\nChangePlannedRegistrationUserModal.defaultProps = {\n show: false,\n};\nexport default ChangePlannedRegistrationUserModal;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { injectIntl } from 'react-intl';\nimport Axios from 'axios';\nimport { FaCog, FaFileExcel } from 'react-icons/fa';\nimport FileSaver from 'file-saver';\nimport intlShape from '@/shared/utils/intlShape';\n\nimport { CanUpdate, showWhenPermission } from '@/shared/components/security';\nimport ScrollableTable from '@/shared/components/table/ScrollableTable';\nimport api from '@/shared/api';\nimport ColumnHeader from '@/shared/components/table/ColumnHeader';\nimport Checkbox from '@/shared/components/input/Checkbox';\nimport config from '@/config';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport ToastrService from '@/shared/services/ToastrService';\nimport SignalRService from '@/shared/services/SignalRService';\nimport { injectStateService, StateService } from '@/shared/services/StateService';\nimport CheckboxListModal from '@/shared/components/CheckboxListModal';\nimport {\n handleHiddenColumnsSelection,\n initHiddenColumnsState,\n} from '@/shared/utils/hiddenColumnsHelper';\nimport SimplePanel from '@/shared/components/SimplePanel';\nimport ZendeskHelp from '@/shared/components/ZendeskHelp';\nimport { hasAssignments } from '@/shared/components/security/HasAssignments';\nimport Button from '@/shared/components/Button';\nimport utils from '@/shared/utils/adminpulse';\nimport AuthService, { functionalities } from '@/shared/services/AuthService';\nimport SendEmailModal from '@/shared/components/email/MultiRelationsMailModal';\nimport BatchRegistrationModal from '@/shared/components/registration/BatchRegistrationModal';\nimport GlobalActionsButton from './GlobalActionsButton';\nimport PlannedRegistrationOverviewFilters, {\n defaultFilters,\n} from './PlannedRegistrationOverviewFilters';\nimport PlannedRegistrationOverviewRow from './PlannedRegistrationOverviewRow';\nimport messages from './messages';\nimport CreatePlannedRegistrationsModal from './modals/CreatePlannedRegistrationsModal';\nimport ChangePlannedRegistrationUserModal from './modals/ChangePlannedRegistrationUserModal';\nimport YesNoModal from '../../../shared/components/YesNoModal';\n\nconst columnSelectionStorageKey = 'PlannedRegistrationOverviewColumns';\nconst storageKey = 'PlannedRegistrationOverviewParams';\n\nconst columnDefinitions = [\n { id: 'relationUniqueIdentifier', message: messages.UniqueIdentifier, visibleByDefault: false },\n { id: 'relationCode', message: messages.RelationCode, visibleByDefault: false },\n { id: 'user', message: messages.User, visibleByDefault: true },\n];\n\nclass PlannedRegistrationOverviewContainer extends Component {\n hasPriceListPermission = AuthService.hasPermission({ functionality: functionalities.Pricelist });\n\n constructor(props) {\n super(props);\n\n const { overviewFilters: sessionFilters = {}, ...sessionParams } =\n JSON.parse(sessionStorage.getItem(storageKey)) || {};\n this.state = {\n rows: [],\n total: 0,\n allSelected: false,\n plannedRegistrations: [],\n initialSearchParams: {\n page: 0,\n pageSize: 50,\n sortKey: 'relation.displayName',\n desc: false,\n overviewFilters: {\n ...defaultFilters,\n ...sessionFilters,\n },\n ...sessionParams,\n },\n showCreatePlannedRegistrationsModal: false,\n showRemovePlannedRegistrationsModal: false,\n showChangeUserModal: false,\n showSendMailModal: false,\n showCreateRegistrationModal: false,\n relationLanguages: null,\n showColumnSelectionModal: false,\n columnStatus: {},\n };\n const { hideableColumns, columnStatus } = initHiddenColumnsState(\n columnSelectionStorageKey,\n columnDefinitions,\n props.intl,\n );\n this.state.hideableColumns = hideableColumns;\n this.state.columnStatus = columnStatus;\n }\n\n componentDidMount() {\n SignalRService.subscribe('jobUpdated', this.jobUpdateHandler);\n }\n\n componentWillUnmount() {\n SignalRService.unsubscribe('jobUpdated', this.jobUpdateHandler);\n if (typeof this.searchToken !== 'undefined') {\n this.searchToken.cancel('Operation canceled due to leaving page.');\n }\n }\n\n filtersChanged = filters => {\n this.setState(state => ({\n ...state,\n initialSearchParams: {\n ...state.initialSearchParams,\n page: 0,\n overviewFilters: filters,\n },\n }));\n };\n\n loadItems = searchParams => {\n sessionStorage.setItem(\n storageKey,\n JSON.stringify({\n desc: searchParams.desc,\n sortKey: searchParams.sortKey,\n overviewFilters: searchParams.overviewFilters,\n }),\n );\n if (typeof this.searchToken !== 'undefined') {\n this.searchToken.cancel('Operation canceled due to new request.');\n }\n this.searchToken = Axios.CancelToken.source();\n return api.base\n .get(`${config.appUrls.api}/api/PlannedRegistration/Overview`, {\n params: {\n desc: searchParams.desc,\n sort: searchParams.sortKey,\n page: searchParams.page,\n take: searchParams.pageSize,\n ...searchParams.overviewFilters,\n },\n cancelToken: this.searchToken.token,\n })\n .then(({ data }) => {\n const { allSelected } = this.state;\n // If checkbox for all relations is selected, set selected on all new incoming relations\n const newRows = data.data.map(e => ({\n ...e,\n key: `${e.relation.id};${e.invoiceStream.id};${(e.planning && e.planning.id) || ''}`,\n selected: allSelected,\n }));\n\n this.setState(state => ({\n rows: searchParams.page > 0 ? [...state.rows, ...newRows] : [...newRows],\n total: data.total,\n currentSearchParams: searchParams,\n }));\n\n return data.data;\n })\n .catch(error => {\n if (!Axios.isCancel(error)) return error;\n });\n };\n handleSelect = ({ key }) => {\n if (!key) return;\n this.setState(({ rows }) => ({\n rows: rows.map(x =>\n x.key === key\n ? {\n ...x,\n selected: !x.selected,\n }\n : x,\n ),\n }));\n };\n handleSelectAll = () => {\n this.setState(({ rows, allSelected }) => ({\n allSelected: !allSelected,\n rows: rows.map(x => (x.selected !== allSelected ? x : { ...x, selected: !allSelected })),\n }));\n };\n\n isGlobalActionsDisabled = () => {\n const { rows, allSelected } = this.state;\n if (!rows || !rows.length) return true;\n if (allSelected || rows.some(x => x.selected)) return false;\n\n return true;\n };\n getInvoiceStreamSelection = () => {\n const { rows, allSelected } = this.state;\n\n // Get all ids that don't match the select all checkbox\n const invoiceStreamIds = rows\n ? rows\n .filter(x => x.selected !== allSelected && x.invoiceStream && x.invoiceStream.id)\n .map(x => x.invoiceStream.id)\n : [];\n return {\n invoiceStreamIds,\n selectAll: allSelected,\n };\n };\n getPlannedRegistrationSelection = () => {\n const { rows, allSelected } = this.state;\n\n // Get all ids that don't match the select all checkbox\n const ids = rows\n ? rows\n .filter(x => x.selected !== allSelected && x.planning && x.planning.id)\n .map(x => x.planning.id)\n : [];\n return {\n ids,\n selectAll: allSelected,\n };\n };\n\n getCountSelectedRows() {\n const { allSelected, total, rows } = this.state;\n\n const count = rows ? rows.filter(x => x.selected !== allSelected).length : 0;\n\n if (allSelected) {\n return total - count;\n }\n return count;\n }\n\n getCountSelectedRowsFormatted() {\n const { total } = this.state;\n const { intl } = this.props;\n const count = this.getCountSelectedRows();\n\n return intl.formatMessage(messages.CountSelected, { count, total });\n }\n\n getFilterParams = () => {\n const { currentSearchParams, initialSearchParams } = this.state;\n const filters =\n (currentSearchParams && currentSearchParams.overviewFilters) ||\n (initialSearchParams && initialSearchParams.overviewFilters) ||\n {};\n const searchParams = currentSearchParams || initialSearchParams || {};\n\n return {\n ...filters,\n desc: searchParams.desc,\n sort: searchParams.sortKey,\n };\n };\n batchCreatePlannedRegistrations = model => {\n const bodyParams = this.getInvoiceStreamSelection();\n const urlParams = this.getFilterParams();\n const { stateService, intl } = this.props;\n return api.base\n .post(\n `${config.appUrls.api}/api/PlannedRegistration/BatchCreate`,\n { ...bodyParams, registration: model },\n {\n params: {\n ...urlParams,\n },\n },\n )\n .then(({ data }) => {\n this.setState({ showCreatePlannedRegistrationsModal: false });\n\n const onClick = data ? () => stateService.gotoJob(data.id) : undefined;\n\n ToastrService.info(intl.formatMessage(messages.GlobalActionStarted), undefined, onClick);\n })\n .catch(handleHttpError(intl));\n };\n batchRemovePlannedRegistrations = () => {\n const bodyParams = this.getPlannedRegistrationSelection();\n const urlParams = this.getFilterParams();\n const { stateService, intl } = this.props;\n return api.base\n .post(`${config.appUrls.api}/api/PlannedRegistration/BatchRemove`, bodyParams, {\n params: {\n ...urlParams,\n },\n })\n .then(({ data }) => {\n this.setState({ showRemovePlannedRegistrationsModal: false });\n\n const onClick = data ? () => stateService.gotoJob(data.id) : undefined;\n\n ToastrService.info(intl.formatMessage(messages.GlobalActionStarted), undefined, onClick);\n })\n .catch(handleHttpError(intl));\n };\n batchChangeUser = model => {\n const bodyParams = { ...this.getPlannedRegistrationSelection(), ...model };\n const urlParams = this.getFilterParams();\n const { stateService, intl } = this.props;\n return api.base\n .post(`${config.appUrls.api}/api/PlannedRegistration/BatchUpdateUser`, bodyParams, {\n params: {\n ...urlParams,\n },\n })\n .then(({ data }) => {\n this.setState({ showChangeUserModal: false });\n\n const onClick = data ? () => stateService.gotoJob(data.id) : undefined;\n\n ToastrService.info(intl.formatMessage(messages.GlobalActionStarted), undefined, onClick);\n })\n .catch(handleHttpError(intl));\n };\n\n getColumns = () => {\n const { taskTemplates, initialSearchParams: { columns = [] } = {} } = this.state;\n return columns.length ? taskTemplates.filter(x => columns.indexOf(x.id) >= 0) : taskTemplates;\n };\n\n createExcelReport = () => {\n const { intl } = this.props;\n\n const filterParams = this.getFilterParams();\n\n const languageCode = intl.locale;\n\n const urlParams = {\n ...filterParams,\n languageCode,\n connectionId: SignalRService.getConnectionId(),\n };\n\n this.setState({ creatingReport: true });\n\n return api.base\n .get(`${config.appUrls.api}/api/PlannedRegistration/Report`, {\n params: urlParams,\n })\n .then(() => {\n ToastrService.info(intl.formatMessage(messages.ExportToExcelStarted));\n this.setState({ creatingReport: false });\n })\n .catch(error => {\n this.setState({ creatingReport: false });\n handleHttpError(intl)(error);\n });\n };\n\n jobUpdateHandler = job => {\n if (\n (job.jobType === 34 || job.jobType === 35 || job.jobType === 54) &&\n (job.status === 2 || job.status === 3)\n ) {\n this.setState(state => ({\n initialSearchParams: {\n ...state.initialSearchParams,\n page: 0,\n // forces refresh of table\n random: new Date().getTime(),\n },\n }));\n }\n };\n getSelectedRelationLanguages = () => {\n const { allSelected, rows } = this.state;\n return new Promise((resolve, reject) => {\n if (allSelected) {\n const bodyParams = this.getInvoiceStreamSelection();\n const urlParams = this.getFilterParams();\n return api.base\n .post(`${config.appUrls.api}/api/PlannedRegistration/OverviewLanguages`, bodyParams, {\n params: {\n ...urlParams,\n },\n })\n\n .then(({ data }) => {\n resolve(data);\n })\n .catch(error => {\n reject(error);\n });\n }\n const languages = [\n ...new Set(rows.filter(x => x.selected && !!x.relation).map(x => x.relation.languageCode)),\n ];\n resolve(languages);\n });\n };\n\n openEmailModal = () => {\n const { intl } = this.props;\n this.getSelectedRelationLanguages()\n .then(languages => {\n this.setState({\n showSendMailModal: true,\n relationLanguages: languages,\n });\n })\n .catch(error => {\n handleHttpError(intl)(error);\n });\n };\n\n batchSendMail = email => {\n const bodyParams = this.getInvoiceStreamSelection();\n const urlParams = this.getFilterParams();\n const { stateService, intl } = this.props;\n return api.base\n .post(\n `${config.appUrls.api}/api/PlannedRegistration/BatchSendMail`,\n { ...bodyParams, ...email },\n {\n params: {\n ...urlParams,\n },\n },\n )\n .then(({ data }) => {\n this.setState({ showSendMailModal: false });\n\n const onClick = data ? () => stateService.gotoJob(data.id) : undefined;\n\n ToastrService.info(intl.formatMessage(messages.GlobalActionStarted), undefined, onClick);\n })\n .catch(handleHttpError(intl));\n };\n\n batchCreateSingleRegistration = parameters => {\n const bodyParams = this.getInvoiceStreamSelection();\n const urlParams = this.getFilterParams();\n const { stateService, intl } = this.props;\n return api.base\n .post(\n `${config.appUrls.api}/api/PlannedRegistration/BatchSingleRegistration`,\n { ...bodyParams, parameters },\n {\n params: {\n ...urlParams,\n },\n },\n )\n .then(({ data }) => {\n this.setState({ showCreateRegistrationModal: false });\n\n const onClick = data ? () => stateService.gotoJob(data.id) : undefined;\n\n ToastrService.info(intl.formatMessage(messages.GlobalActionStarted), undefined, onClick);\n })\n .catch(handleHttpError(intl));\n };\n\n handleColumnSelection = items => {\n this.setState(({ hideableColumns }) => ({\n ...handleHiddenColumnsSelection(items, hideableColumns, columnSelectionStorageKey),\n showColumnSelectionModal: false,\n }));\n };\n\n renderRow = item => {\n const { columnStatus } = this.state;\n const { intl } = this.props;\n const { allSelected } = this.state;\n return (\n \n );\n };\n showAssignments = hasAssignments();\n\n render() {\n const { intl } = this.props;\n const {\n initialSearchParams,\n rows,\n allSelected,\n showCreatePlannedRegistrationsModal,\n showRemovePlannedRegistrationsModal,\n showSendMailModal,\n showCreateRegistrationModal,\n showChangeUserModal,\n creatingReport,\n relationLanguages,\n showColumnSelectionModal,\n hideableColumns,\n columnStatus,\n } = this.state;\n\n const hasData = rows && rows.length > 0;\n\n return (\n
    \n \n
    \n this.filtersChanged(filters)}\n countSelected={this.getCountSelectedRowsFormatted()}\n />\n
    \n \n
    \n
    \n this.setState({ showColumnSelectionModal: true })}\n >\n \n \n \n {intl.formatMessage(messages.ColumnConfig)}\n \n this.createExcelReport()}\n disabled={!hasData || creatingReport}\n >\n \n \n \n {intl.formatMessage(messages.ExportToExcel)}\n \n \n \n this.setState({ showCreatePlannedRegistrationsModal: true })\n }\n onRemovePlannedRegistrations={() =>\n this.setState({ showRemovePlannedRegistrationsModal: true })\n }\n onCreateRegistration={() => this.setState({ showCreateRegistrationModal: true })}\n hasWithoutFilter={\n initialSearchParams.overviewFilters &&\n initialSearchParams.overviewFilters.withoutCategoryId\n }\n onChangeUser={() => this.setState({ showChangeUserModal: true })}\n disabled={this.isGlobalActionsDisabled()}\n onSendMail={this.openEmailModal}\n />\n \n
    \n
    \n \n \n }\n />\n \n \n \n {this.showAssignments ? (\n \n ) : null}\n\n \n \n \n \n \n \n {this.hasPriceListPermission && (\n \n )}\n {this.hasPriceListPermission && (\n \n )}\n \n \n\n {showColumnSelectionModal && (\n this.setState({ showColumnSelectionModal: false })}\n show={showColumnSelectionModal}\n sortByLabel={false}\n />\n )}\n\n {showCreatePlannedRegistrationsModal && (\n this.setState({ showCreatePlannedRegistrationsModal: false })}\n assignmentTemplateId={initialSearchParams.overviewFilters?.assignmentTemplateId}\n />\n )}\n {showRemovePlannedRegistrationsModal && (\n \n this.setState({\n showRemovePlannedRegistrationsModal: false,\n })\n }\n onSave={this.batchRemovePlannedRegistrations}\n />\n )}\n {showSendMailModal && (\n \n this.setState({\n showSendMailModal: false,\n })\n }\n onSave={emailModel => this.batchSendMail(emailModel)}\n />\n )}\n {showCreateRegistrationModal && (\n \n this.setState({\n showCreateRegistrationModal: false,\n })\n }\n onSave={batchRegistrationModel =>\n this.batchCreateSingleRegistration(batchRegistrationModel)\n }\n crmType={3}\n assignmentTemplateId={initialSearchParams.overviewFilters?.assignmentTemplateId}\n />\n )}\n {showChangeUserModal && (\n this.setState({ showChangeUserModal: false })}\n />\n )}\n
    \n );\n }\n}\n\nPlannedRegistrationOverviewContainer.propTypes = {\n intl: intlShape.isRequired,\n stateService: PropTypes.instanceOf(StateService).isRequired,\n};\n\nexport default showWhenPermission(\n 'relation',\n 'read',\n)(injectStateService(injectIntl(PlannedRegistrationOverviewContainer)));\n","import { defineMessages } from 'react-intl';\n\nconst messages = defineMessages({\n ExportToExcelStarted: 'Export to excel started',\n TaskScheduleOverview: 'Task schedule overview',\n SelectOverviewColumns: 'Select overview columns',\n CountRelationsSelected: 'Selected {count} / {total} relations',\n EndFiscalYear: 'End fiscal year',\n NextAnnualMeeting: 'Next annual meeting',\n WithoutSchedule: 'Without schedule',\n Relation: 'Relation',\n Search: 'Search',\n ColumnConfig: 'Configure columns',\n OpenInTaskboard: 'Open this task in the task board',\n OpenTaskOverview: 'Open task overview',\n SetTaskSchedulingQueued:\n 'Task schedules for the selected relations will be added shortly. Click here to view its progress.',\n DeleteTaskScheduleQueued: 'The task schedules will be deleted shortly.',\n ResetFilters: 'Reset filters',\n ExportToExcel: 'Export to Excel',\n ExportTaskSchedules: 'Export task schedules',\n ExportAuthorizations: 'Export authorizations',\n AssignedToMe: 'Assigned to me',\n Unassigned: 'Unassigned',\n NoTasksFound: 'No tasks found',\n SelectAll: 'Select all',\n RelationLabels: 'Relation labels',\n WithoutRelationLabels: 'Without relation labels',\n Assignment: 'Assignment',\n DefaultAssignment: 'Default assignment',\n FilterLinkType: 'Filter on link type',\n LinkType: 'Link type',\n VatPeriodicity: 'Vat periodicity',\n EmptyVATPeriodicity: 'Empty vat periodicity',\n EndFirstFiscalYear: 'End first fiscal year',\n WithoutEndFirstFiscalYear: 'Without end first fiscal year',\n WithEndFirstFiscalYear: 'With end first fiscal year',\n RecalculateTaskDeadlinesTitle: 'Recalculate task deadlines?',\n RecalculateTaskDeadlinesMsg:\n 'There are {count} tasks with a deadline based on the general meeting or end fiscal year. Do you want to recalculate the deadline of these tasks?',\n WithoutEndFiscalYear: 'Without end fiscal year',\n WithEndFiscalYear: 'With end fiscal year',\n RelationGroups: 'Relation groups',\n SelectYourFilters: 'Select your filters',\n MoreFilters: 'More filters',\n});\n\nexport default messages;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport DropdownButton from 'react-bootstrap/lib/DropdownButton';\nimport MenuItem from 'react-bootstrap/lib/MenuItem';\nimport { defineMessages, injectIntl } from 'react-intl';\n\nimport intlShape from '@/shared/utils/intlShape';\n\nconst messages = defineMessages({\n RelationGlobalActionsTooltip:\n 'Select one or more relations to execute a global action on these relations.',\n GlobalActions: 'Global actions',\n AddOrRemoveTaskSchedule: 'Add or remove task schedule',\n});\n\nconst GlobalActionsButton = props => {\n const { intl, disabled, onUpdateTaskSchedule } = props;\n\n return (\n \n \n \n {intl.formatMessage(messages.AddOrRemoveTaskSchedule)}\n \n \n \n );\n};\n\nGlobalActionsButton.propTypes = {\n intl: intlShape.isRequired,\n onUpdateTaskSchedule: PropTypes.func.isRequired,\n disabled: PropTypes.bool,\n};\nGlobalActionsButton.defaultProps = { disabled: false };\nexport default injectIntl(GlobalActionsButton);\n","import React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage, injectIntl } from 'react-intl';\nimport classnames from 'classnames';\nimport { FaUndo, FaFilter } from 'react-icons/fa';\nimport intlShape from '@/shared/utils/intlShape';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport CompanyMultiSelect from '@/shared/components/input/multiselect/CompanyMultiSelect';\nimport MultiSelect, {\n addItem as addMultiSelectItem,\n removeItem as removeMultiSelectItem,\n splitItems as splitMultiSelectItems,\n} from '@/shared/components/input/multiselect/MultiSelect';\nimport LegalFormMultiSelect from '@/shared/components/input/multiselect/LegalFormMultiSelect';\n\nimport AuthService from '@/shared/services/AuthService';\nimport UserSearch from '@/shared/components/input/UserSearch';\nimport { hasMultipleCompanies } from '@/shared/components/security/HasMultiCompany';\nimport RelationTypeIcon from '@/shared/components/RelationTypeIcon';\nimport enumCache from '@/shared/services/EnumCacheService';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport { crmTypeSorter } from '@/shared/utils/sorters';\nimport RelationSearch from '@/shared/components/input/RelationSearch';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport EnumMultiSelect from '@/shared/components/input/multiselect/EnumMultiSelect';\nimport AssignmentTemplateSelector from '@/shared/components/input/AssignmentTemplateSelector';\nimport { hasAssignments } from '@/shared/components/security/HasAssignments';\n\nimport guid from '@/shared/utils/guid';\nimport messages from './taskScheduleMessages';\nimport RelationGroupMultiSelect from '@/shared/components/input/multiselect/RelationGroupMultiSelect';\nimport employeeProfileMessages from '@/shared/messages/employeeProfileMessages';\nimport DynamicFilter, {\n getDynamicFiltersFromDefaultFilters,\n initDynamicFilters,\n} from '@/shared/components/DynamicFilter';\nimport { Dropdown } from 'react-bootstrap';\nimport CheckboxDropdownMenu from '@/shared/components/input/CheckboxDropdownMenu';\nimport userStorage from '@/shared/services/userStorage';\n\nconst dynamicFiltersStorageKey = 'TaskScheduleOverviewDynamicFilters';\n\nexport const defaultFilters = {\n relationId: null,\n relationName: null,\n invoiceStreamId: null,\n assistant: null, // UserId\n responsible: null, // UserId\n relationTypes: [], // Array\n crmTypes: [3], // Array\n ownCompanies: [], // Array\n vatPeriodicities: [],\n assignmentTemplateId: null,\n legalForms: [],\n relationGroups: [],\n assistantBackup: null,\n associate: null,\n billingUser: null,\n seniorUser: null,\n withLabels: [],\n withoutLabels: [],\n linkType: null,\n filterBehaviours: {\n withLabels: 1\n },\n};\n\nclass OverviewFilters extends PureComponent {\n state = {\n crmTypes: [],\n relationTypes: [],\n linkTypes: [],\n dynamicFilters: [],\n };\n\n static propTypes = {\n onFilterChange: PropTypes.func.isRequired,\n filters: PropTypes.shape({\n relationId: PropTypes.string,\n relationName: PropTypes.string,\n invoiceStreamId: PropTypes.string,\n assistant: PropTypes.string, // UserId\n responsible: PropTypes.string, // UserId\n relationTypes: PropTypes.arrayOf(PropTypes.number),\n crmTypes: PropTypes.arrayOf(PropTypes.number),\n ownCompanies: PropTypes.arrayOf(PropTypes.string),\n withLabels: PropTypes.arrayOf(PropTypes.string),\n withoutLabels: PropTypes.arrayOf(PropTypes.string),\n linkType: PropTypes.number,\n vatPeriodicities: PropTypes.arrayOf(PropTypes.number),\n assignmentTemplateId: PropTypes.string,\n legalForms: PropTypes.arrayOf(PropTypes.number),\n relationGroups: PropTypes.arrayOf(PropTypes.string),\n assistantBackup: PropTypes.string, // UserId\n associate: PropTypes.string, // UserId\n billingUser: PropTypes.string, // UserId\n seniorUser: PropTypes.string, // UserId\n }),\n onResetFilters: PropTypes.func.isRequired,\n countSelected: PropTypes.string,\n hasFilters: PropTypes.bool,\n intl: intlShape.isRequired,\n };\n\n static defaultProps = {\n filters: defaultFilters,\n countSelected: '',\n hasFilters: false,\n };\n\n componentDidMount() {\n const { intl, filters } = this.props;\n\n const relationLabelsPromise = api.base.get(`${config.appUrls.api}/api/Resource/Tags`);\n\n Promise.all([\n enumCache.getTranslated('relationtype', intl, true),\n enumCache.getTranslated('crmtype', intl, crmTypeSorter),\n relationLabelsPromise,\n enumCache.get('linktype'),\n ]).then(([relationTypes, crmTypes, { data: labels }, linkTypes]) => {\n const allDynamicFilters = [...getDynamicFiltersFromDefaultFilters(defaultFilters, 'crmTypes', 'relationTypes'),\n { id: 'linkType', label: messages.LinkType },\n ];\n\n this.setState({\n relationTypes,\n crmTypes,\n relationLabels: labels\n .map(x => ({ id: x.id, label: x.name, sort: x.name.toLowerCase() }))\n .sort(dynamicSort('sort')),\n linkTypes: linkTypes\n .map(x => ({\n id: x.key,\n label: intl.formatMessage(listItemMsg('linktypeto', x.key, x.value)),\n name: intl.formatMessage(listItemMsg('linktypeto', x.key, x.value)),\n }))\n .sort(dynamicSort('label')),\n dynamicFilters: initDynamicFilters(\n intl,\n allDynamicFilters,\n userStorage.getItem(dynamicFiltersStorageKey) || [],\n filters,\n defaultFilters,\n )\n });\n });\n }\n\n dynamicFilterChanged = (item, selected) => {\n const { dynamicFilters } = this.state;\n const { filters } = this.props;\n\n const newFilters = dynamicFilters.map(x => {\n if (x.id !== item.id && item.id !== 'selectall') return x;\n return { ...x, selected };\n });\n\n userStorage.setItem(\n dynamicFiltersStorageKey,\n newFilters.filter(x => x.selected).map(x => x.id),\n );\n this.setState({\n dynamicFilters: newFilters,\n });\n\n if (!selected && JSON.stringify(filters[item.id]) !== JSON.stringify(defaultFilters[item.id])) {\n // Reset filter when it's removed\n this.filterChanged({ [item.id]: defaultFilters[item.id] });\n }\n };\n\n filterChanged = filter => {\n const { filters, onFilterChange } = this.props;\n const newFilters = { ...filters, ...filter };\n if (filters !== newFilters) onFilterChange(newFilters);\n };\n\n responsibleChanged = item => {\n if (!item || !item.id) {\n this.filterChanged({ responsible: null });\n } else {\n this.filterChanged({ responsible: item.id });\n }\n };\n\n linkTypeChanged = item => {\n if (!item || !item.id) {\n this.filterChanged({ linkType: null });\n } else {\n this.filterChanged({ linkType: item.id });\n }\n };\n\n assistantChanged = item => {\n if (!item || !item.id) {\n this.filterChanged({ assistant: null });\n } else {\n this.filterChanged({ assistant: item.id });\n }\n };\n filterRelationTypes = relType => {\n const { filters = {} } = this.props;\n const types = filters.relationTypes || [];\n\n const idx = types.indexOf(relType);\n if (idx >= 0) {\n this.filterChanged({ relationTypes: types.filter((_, i) => i !== idx) });\n } else {\n this.filterChanged({ relationTypes: [...types, relType] });\n }\n };\n\n filterCrmTypes = crmType => {\n const { filters = {} } = this.props;\n const types = filters.crmTypes || [];\n\n const idx = types.indexOf(crmType);\n if (idx >= 0) {\n this.filterChanged({ crmTypes: types.filter((_, i) => i !== idx) });\n } else {\n this.filterChanged({ crmTypes: [...types, crmType] });\n }\n };\n\n filterLinkTypes = linkType => {\n const { filters = {} } = this.props;\n const types = filters.linkTypes || [];\n\n const idx = types.indexOf(linkType);\n if (idx >= 0) {\n this.filterChanged({ linkTypes: types.filter((_, i) => i !== idx) });\n } else {\n this.filterChanged({ linkTypes: [...types, linkType] });\n }\n };\n\n relationChanged = item => {\n if (!item || !item.id) {\n this.filterChanged({ relationId: null, relationName: null });\n } else {\n this.filterChanged({\n relationId: item.key,\n relationName: item.label,\n });\n }\n };\n\n renderDynamicFilter = ({ type, filters, intl }) => {\n switch (type) {\n case 'linkType': {\n const { linkTypes } = this.state;\n\n const initialLinkType = filters.linkType\n ? linkTypes.find(x => x.id === filters.linkType)\n : null;\n\n return (\n
    \n \n
    \n );\n }\n default:\n console.warn(`Missing filter: ${type}`);\n return null;\n }\n }\n\n render() {\n const { relationTypes, crmTypes, relationLabels, dynamicFilters } = this.state;\n const { filters, intl, countSelected, onResetFilters, hasFilters } = this.props;\n const defaultBtnClass = 'btn btn-default';\n\n const showCompanies = hasMultipleCompanies();\n const initRelation = filters.relationId\n ? {\n key: filters.relationId,\n label: filters.relationName,\n invoiceStreamId: filters.invoiceStreamId,\n }\n : null;\n\n const [withLabelsSelection, withLabelsAvailable] = splitMultiSelectItems(\n relationLabels,\n filters.relationTags,\n 'label',\n );\n const [withoutLabelsSelection, withoutLabelsAvailable] = splitMultiSelectItems(\n relationLabels,\n filters.withoutRelationTags,\n 'label',\n );\n\n const visibleFilters = dynamicFilters.filter(x => x.selected).map(x => x.id);\n const dropdownFilters = [\n {\n id: 'selectall',\n label: intl.formatMessage(messages.SelectAll),\n selected: !dynamicFilters.some(x => !x.selected),\n },\n ...dynamicFilters,\n ];\n\n return (\n
    \n
    \n
    \n \n
    \n
    \n
    \n {relationTypes.map(t => (\n
    \n {\n document.activeElement.blur();\n this.filterRelationTypes(t.id);\n }}\n type=\"button\"\n title={t.label}\n className={classnames(defaultBtnClass, {\n active:\n filters && filters.relationTypes && filters.relationTypes.includes(t.id),\n })}\n >\n \n {t.label}\n \n
    \n ))}\n
    \n
    \n
    \n
    \n {crmTypes.map(t => (\n
    \n {\n document.activeElement.blur();\n this.filterCrmTypes(t.id);\n }}\n type=\"button\"\n title={t.label}\n className={classnames(defaultBtnClass, {\n active: filters && filters.crmTypes && filters.crmTypes.includes(t.id),\n })}\n >\n {t.label}\n \n
    \n ))}\n
    \n
    \n
    \n {visibleFilters && visibleFilters.length > 0 ? (\n
    \n {visibleFilters.map(id => (\n \n ))}\n
    \n ) : null}\n
    \n
    \n \n \n \n \n \n \n \n {hasFilters && (\n onResetFilters()}\n >\n \n  \n \n \n )}\n
    \n {countSelected}\n
    \n
    \n
    \n
    \n );\n }\n}\n\nexport default injectIntl(OverviewFilters);\n","/* eslint-disable no-script-url */\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { FaCog, FaFileExcel, FaTasks } from 'react-icons/fa';\nimport FileSaver from 'file-saver';\nimport Axios from 'axios';\nimport moment from 'moment';\n\nimport { FormattedDate, FormattedMessage, injectIntl, useIntl } from 'react-intl';\nimport { Dropdown, MenuItem } from 'react-bootstrap';\n\nimport intlShape from '@/shared/utils/intlShape';\nimport { injectStateService, StateService } from '@/shared/services/StateService';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport { ColumnHeader, ScrollableTable } from '@/shared/components/table';\nimport Checkbox from '@/shared/components/input/Checkbox';\nimport FormattedListValue, {\n listItemMsg,\n formatListValue,\n} from '@/shared/components/FormattedListValue';\nimport RelationName from '@/shared/components/RelationName';\nimport FormattedDayMonth from '@/shared/components/FormattedDayMonth';\nimport CheckboxListModal from '@/shared/components/CheckboxListModal';\nimport guid from '@/shared/utils/guid';\nimport userStorage from '@/shared/services/userStorage';\nimport Button from '@/shared/components/Button';\nimport SimplePanel from '@/shared/components/SimplePanel';\nimport utils from '@/shared/utils/adminpulse';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport ToastrService from '@/shared/services/ToastrService';\nimport ZendeskHelp from '@/shared/components/ZendeskHelp';\n\nimport { CanUpdate, showWhenPermission } from '@/shared/components/security';\nimport { hasAssignments } from '@/shared/components/security/HasAssignments';\nimport { mapInvoiceStreamName } from '@/shared/services/ObjectDisplayService';\nimport YesNoModal from '@/shared/components/YesNoModal';\n\nimport HoverToggle from '@/shared/components/HoverToggle';\nimport EditableDayMonthPicker from '@/shared/components/editable/EditableDayMonthPicker';\nimport EditableDatePicker from '@/shared/components/editable/EditableDatePicker';\nimport messages from './taskScheduleMessages';\nimport OverviewFilters, { defaultFilters } from './OverviewFilters';\nimport UpdateTaskScheduleModal from '../overview/modals/UpdateTaskScheduleModal';\nimport GlobalActionsButton from './GlobalActionsButton';\nimport FormattedDateShort from '../../../shared/components/FormattedDateShort';\nimport SignalRService from '@/shared/services/SignalRService';\n\nconst columnSelectionStorageKey = 'TaskScheduleOverviewColumns';\nconst paramsStorageKey = 'TaskScheduleOverviewParams';\n\nconst getTaskTemplateColumnFilters = filter =>\n Object.keys(filter)\n .filter(key => key.startsWith('tasktemplate_'))\n .reduce(\n (obj, key) => ({\n ...obj,\n [key.substr(13)]: filter[key].items.map(x => x.id),\n }),\n {},\n );\n\nclass TaskScheduleOverviewContainer extends Component {\n state = {\n allRowsSelected: false,\n showColumnSelectionModal: false,\n showUpdateTaskScheduleModal: false,\n creatingReport: false,\n items: [],\n taskTemplates: [],\n initialSearchParams: {\n page: 0,\n pageSize: 50,\n sortKey: 'relation',\n desc: false,\n columns: [], // Selected columns, empty array=all\n overviewFilters: {\n ...defaultFilters,\n },\n },\n };\n\n constructor(props) {\n super(props);\n\n const { initialSearchParams: orgSearchParams } = this.state;\n\n const { overviewFilters = {}, ...sessionParams } =\n JSON.parse(sessionStorage.getItem(paramsStorageKey)) || {};\n const selectedColumns = userStorage.getItem(columnSelectionStorageKey) || [];\n\n this.state.initialSearchParams = {\n ...orgSearchParams,\n ...sessionParams,\n overviewFilters: { ...defaultFilters, ...overviewFilters },\n columns: selectedColumns,\n };\n }\n\n componentDidMount() {\n const { intl } = this.props;\n const endpoint = `${config.appUrls.tasks}/api/TaskTemplates/Schedules/`;\n api.base.get(endpoint).then(({ data }) => {\n const { initialSearchParams: { columns } = {} } = this.state;\n\n const taskTemplates = data.map(x => ({\n ...x,\n label: intl.formatMessage(listItemMsg('TaskTemplate', x.id, x.name)),\n selected: columns.indexOf(x.id) >= 0,\n }));\n\n this.setState({\n taskTemplates,\n });\n });\n this.withoutScheduleFilterItem = {\n id: guid.empty,\n name: intl.formatMessage(messages.WithoutSchedule),\n };\n }\n\n componentWillUnmount() {\n if (typeof this.cancelToken !== 'undefined') {\n this.cancelToken.cancel('Operation canceled due to leaving page.');\n }\n }\n\n loadItems = searchParams => {\n if (typeof this.cancelToken !== 'undefined') {\n this.cancelToken.cancel('Operation canceled due to new request.');\n }\n this.cancelToken = Axios.CancelToken.source();\n\n const filter = searchParams.filter || {};\n const { intl } = this.props;\n\n const taskTemplateFilters = getTaskTemplateColumnFilters(filter);\n const { hasEndFirstFiscalYear } = filter;\n\n let hasEndFirstFiscalYearFilter = [];\n if (hasEndFirstFiscalYear && hasEndFirstFiscalYear.items) {\n hasEndFirstFiscalYearFilter = hasEndFirstFiscalYear.items.map(x => x);\n }\n const { hasEndFiscalYear } = filter;\n\n let hasEndFiscalYearFilter = [];\n if (hasEndFiscalYear && hasEndFiscalYear.items) {\n hasEndFiscalYearFilter = hasEndFiscalYear.items.map(x => x);\n }\n const endpoint = `${config.appUrls.tasks}/api/TaskSchedules/Overview/`;\n sessionStorage.setItem(\n paramsStorageKey,\n JSON.stringify({\n overviewFilters: searchParams.overviewFilters,\n sortKey: searchParams.sortKey,\n desc: searchParams.desc,\n filter,\n }),\n );\n\n return api.base\n .post(\n endpoint,\n {\n ...searchParams.overviewFilters,\n page: searchParams.page,\n take: searchParams.pageSize,\n sort: searchParams.sortKey,\n desc: searchParams.desc,\n columns: searchParams.columns || [],\n periodicityFilters: taskTemplateFilters,\n hasEndFirstFiscalYear: hasEndFirstFiscalYearFilter,\n hasEndFiscalYear: hasEndFiscalYearFilter,\n },\n {\n cancelToken: this.cancelToken.token,\n },\n )\n .then(({ data }) => {\n if (!data) return;\n\n const { allRowsSelected } = this.state;\n const newTasks = data.rows.map(e => ({\n ...e,\n selected: !!allRowsSelected,\n }));\n this.setState(state => ({\n ...state,\n items: searchParams.page > 0 ? [...state.items, ...newTasks] : [...newTasks],\n totalRows: searchParams.page === 0 ? data.totalRows : state.totalRows,\n }));\n return data.rows;\n })\n .catch(error => {\n if (!Axios.isCancel(error)) {\n return handleHttpError(intl)(error);\n }\n });\n };\n\n handleColumnSelection = items => {\n let selectedColumns = items.filter(x => x.selected).map(x => x.id);\n // Clear selection if all are selected\n if (selectedColumns.length === items.length) selectedColumns = [];\n userStorage.setItem(columnSelectionStorageKey, selectedColumns);\n\n this.setState(state => ({\n initialSearchParams: {\n ...state.initialSearchParams,\n page: 0,\n columns: selectedColumns,\n },\n taskTemplates: [...items],\n showColumnSelectionModal: false,\n }));\n };\n createBatchActionModel = (parameters = {}) => {\n const { items, allRowsSelected, initialSearchParams = {} } = this.state;\n const currentSearchParams = JSON.parse(sessionStorage.getItem(paramsStorageKey)) || {};\n const filter = currentSearchParams.filter || {};\n\n const taskTemplateFilters = getTaskTemplateColumnFilters(filter);\n const { hasEndFirstFiscalYear } = filter;\n\n let hasEndFirstFiscalYearFilter = [];\n if (hasEndFirstFiscalYear && hasEndFirstFiscalYear.items) {\n hasEndFirstFiscalYearFilter = hasEndFirstFiscalYear.items.map(x => x);\n }\n\n const { hasEndFiscalYear } = filter;\n\n let hasEndFiscalYearFilter = [];\n if (hasEndFiscalYear && hasEndFiscalYear.items) {\n hasEndFiscalYearFilter = hasEndFiscalYear.items.map(x => x);\n }\n return {\n ...currentSearchParams.overviewFilters,\n ...parameters,\n columns: initialSearchParams.columns || [],\n sort: currentSearchParams.sortKey,\n desc: currentSearchParams.desc,\n periodicityFilters: taskTemplateFilters,\n hasEndFirstFiscalYear: hasEndFirstFiscalYearFilter,\n hasEndFiscalYear: hasEndFiscalYearFilter,\n selectAll: allRowsSelected,\n selectedRows: items ? items.filter(x => x.selected !== allRowsSelected).map(x => x.id) : [],\n };\n };\n\n createAuthorizationReport = () => {\n const { intl } = this.props;\n const model = this.createBatchActionModel();\n\n const culture = intl.locale;\n const endpoint = `${\n config.appUrls.tasks\n }/api/taskschedules/export/authorizations?culture=${culture}&connectionId=${SignalRService.getConnectionId()}`;\n this.setState({\n creatingAuthorizationReport: true,\n });\n\n return api.base\n .post(endpoint, model)\n .then(result => {\n ToastrService.info(intl.formatMessage(messages.ExportToExcelStarted));\n this.setState(state => ({\n ...state,\n creatingAuthorizationReport: false,\n }));\n })\n .catch(error => {\n this.setState(state => ({\n ...state,\n creatingAuthorizationReport: false,\n }));\n handleHttpError(intl)(error);\n });\n };\n\n createReport = () => {\n const { intl } = this.props;\n const model = this.createBatchActionModel();\n\n const culture = intl.locale;\n const endpoint = `${\n config.appUrls.tasks\n }/api/taskschedules/export?culture=${culture}&connectionId=${SignalRService.getConnectionId()}`;\n this.setState({\n creatingReport: true,\n });\n\n return api.base\n .post(endpoint, model)\n .then(result => {\n ToastrService.info(intl.formatMessage(messages.ExportToExcelStarted));\n this.setState(state => ({\n ...state,\n creatingReport: false,\n }));\n })\n .catch(error => {\n this.setState(state => ({\n ...state,\n creatingReport: false,\n }));\n handleHttpError(intl)(error);\n });\n };\n\n getCountSelected = () => {\n const { allRowsSelected, totalRows, items } = this.state;\n\n const count = items ? items.filter(x => x.selected !== allRowsSelected).length : 0;\n\n return allRowsSelected ? totalRows - count : count;\n };\n\n getCountSelectedFormatted() {\n const { totalRows } = this.state;\n const { intl } = this.props;\n const count = this.getCountSelected();\n\n return intl.formatMessage(messages.CountRelationsSelected, { count, total: totalRows });\n }\n\n isGlobalActionsDisabled = () => {\n const { items, allRowsSelected } = this.state;\n if (!items || !items.length) return true;\n if (items.some(x => x.selected) || allRowsSelected) return false;\n\n return true;\n };\n filtersChanged = filters => {\n this.setState(state => ({\n ...state,\n initialSearchParams: {\n ...state.initialSearchParams,\n page: 0,\n overviewFilters: filters,\n },\n }));\n };\n resetFilters = () => {\n this.setState(state => ({\n ...state,\n initialSearchParams: {\n ...state.initialSearchParams,\n page: 0,\n filter: {},\n search: {},\n overviewFilters: defaultFilters,\n },\n }));\n };\n\n handleSelectAllRows = () => {\n this.setState(({ items, allRowsSelected }) => ({\n allRowsSelected: !allRowsSelected,\n items: items.map(e => ({ ...e, selected: !allRowsSelected })),\n }));\n };\n handleRowSelection = row => {\n this.setState(({ items }) => ({\n items: items.map(x => (x.id === row.id ? { ...x, selected: !x.selected } : x)),\n }));\n };\n\n showUpdateTaskScheduleModal = () => {\n this.setState({\n showUpdateTaskScheduleModal: true,\n });\n };\n handleUpdateTaskScheduleModalSave = ({ action, model: batchActionParameters }) => {\n if (action !== 'add' && action !== 'remove') return Promise.reject();\n if (this.isGlobalActionsDisabled()) return Promise.reject(new Error('invalid'));\n\n const { intl, stateService } = this.props;\n\n const model = this.createBatchActionModel({ taskSchedule: batchActionParameters });\n const endpoint = `${config.appUrls.tasks}/api/TaskSchedules/${\n action === 'add' ? 'BatchCreateSchedule' : 'BatchRemoveSchedule'\n }`;\n\n return api.base\n .post(endpoint, model)\n .then(({ data }) => {\n this.setState(state => ({\n ...state,\n showUpdateTaskScheduleModal: false,\n }));\n const onClick = data ? () => stateService.gotoJob(data.id) : undefined;\n const message =\n action === 'add'\n ? intl.formatMessage(messages.SetTaskSchedulingQueued)\n : intl.formatMessage(messages.DeleteTaskScheduleQueued);\n ToastrService.info(message, undefined, onClick);\n })\n .catch(error => {\n handleHttpError(intl)(error);\n });\n };\n\n getColumns = () => {\n const { taskTemplates, initialSearchParams: { columns = [] } = {} } = this.state;\n return columns.length ? taskTemplates.filter(x => columns.indexOf(x.id) >= 0) : taskTemplates;\n };\n\n updateEndFiscalYear = (item, endFiscalYear) => {\n const endFiscalYearField = {\n definition: {\n id: '3117d514-64bc-4c6e-84f7-4a39fbdc51e2',\n },\n value: endFiscalYear,\n };\n\n const { id: relationId } = item.relation;\n\n return this.updateFiscalField(relationId, endFiscalYearField, 'endFiscalYear', endFiscalYear);\n };\n\n updateEndFirstFiscalYear = (item, endFirstFiscalYear) => {\n const endFirstFiscalYearField = {\n definition: {\n id: 'a70d571f-f208-49a3-99ad-702e9c092303',\n },\n value: endFirstFiscalYear,\n };\n\n const { id: relationId } = item.relation;\n\n return this.updateFiscalField(\n relationId,\n endFirstFiscalYearField,\n 'endFirstFiscalYear',\n endFirstFiscalYear,\n );\n };\n\n updateFiscalField = (relationId, model, fieldName, fieldValue) => {\n const { intl } = this.props;\n\n return api.base\n .put(`${config.appUrls.api}/api/relation/Put?id=${relationId}`, model)\n .then(({ data }) => {\n const { items } = this.state;\n ToastrService.changesSaved(intl);\n\n this.setState({\n items: items.map(e => {\n if (e.relation.id === relationId) {\n return { ...e, [fieldName]: fieldValue };\n }\n return e;\n }),\n });\n\n if (data.fiscalYearsUpdated) {\n const recalcDeadlinesParams = {\n relationId,\n onlyBasedOnFiscalYears: true,\n recalcSubtasks: true,\n };\n return api.base\n .post(\n `${config.appUrls.tasks}/api/plannedTasks/RecalculateDeadlinesCount`,\n recalcDeadlinesParams,\n )\n .then(({ data: recalcDeadlinesCount }) => {\n if (recalcDeadlinesCount) {\n this.setState({\n recalcDeadlinesParams,\n recalcDeadlinesCount,\n showRecalcTaskDeadlinesDialog: true,\n });\n }\n });\n }\n })\n .catch(error => {\n handleHttpError(intl)(error);\n return Promise.reject();\n });\n };\n recalculateTaskDeadlines = () => {\n const { recalcDeadlinesParams } = this.state;\n const { intl } = this.props;\n return api.base\n .post(`${config.appUrls.tasks}/api/plannedTasks/RecalculateDeadlines`, recalcDeadlinesParams)\n .then(() => {\n this.setState({ showRecalcTaskDeadlinesDialog: false, recalcDeadlinesParams: undefined });\n ToastrService.changesSaved(intl);\n });\n };\n\n renderRow = item => {\n const columns = this.getColumns();\n const { stateService, intl } = this.props;\n const showAssignments = hasAssignments();\n\n return (\n \n \n \n this.handleRowSelection(item)} value={item.selected} />\n \n \n \n \n {showAssignments && {mapInvoiceStreamName(item, intl)}}\n \n {item.relation && (item.relation.type === 0 || item.relation.type === 1) ? (\n this.updateEndFirstFiscalYear(item, date)}\n />\n ) : null}\n \n \n {item.relation && (item.relation.type === 0 || item.relation.type === 1) ? (\n this.updateEndFiscalYear(item, date)}\n displayValue={\n !!item.endFiscalYear && \n }\n />\n ) : null}\n \n \n {item.nextAnnualMeeting ? : null}\n \n {columns.map(col => {\n const schedules = item.columns[col.id];\n return (\n \n {schedules && schedules.length > 0\n ? schedules.map(s => (\n
    \n \n \n \n \n \n stateService.gotoTaskboard({\n relation: item.relation,\n taskTemplateId: col.id,\n })\n }\n >\n \n \n \n \n stateService.gotoTaskOverview({\n taskId: col.id,\n periodicityId: s.taskPeriodicityId,\n relation: item.relation,\n period: 'all',\n })\n }\n >\n \n \n \n \n \n
    \n ))\n : null}\n \n );\n })}\n \n \n );\n };\n\n render() {\n const {\n initialSearchParams,\n items,\n allRowsSelected,\n taskTemplates,\n showColumnSelectionModal,\n creatingReport,\n showUpdateTaskScheduleModal,\n creatingAuthorizationReport,\n showRecalcTaskDeadlinesDialog,\n recalcDeadlinesCount,\n } = this.state;\n const { intl } = this.props;\n const columns = this.getColumns();\n\n const hasData = items && items.length > 0;\n const hasFilters =\n JSON.stringify(initialSearchParams.overviewFilters) !== JSON.stringify(defaultFilters) ||\n (initialSearchParams.filter && Object.keys(initialSearchParams.filter).length > 0);\n const showAssignments = hasAssignments();\n\n return (\n
    \n {showRecalcTaskDeadlinesDialog && (\n \n this.setState({\n showRecalcTaskDeadlinesDialog: false,\n recalcDeadlinesParams: undefined,\n })\n }\n onSave={() => this.recalculateTaskDeadlines()}\n />\n )}\n \n this.filtersChanged(filters)}\n countSelected={this.getCountSelectedFormatted()}\n onResetFilters={this.resetFilters}\n hasFilters={hasFilters}\n />\n \n
    \n
    \n {taskTemplates && taskTemplates.length > 0 && (\n this.setState({ showColumnSelectionModal: true })}\n >\n \n \n \n \n \n )}\n this.createReport()}\n disabled={!hasData || creatingReport}\n >\n \n {creatingReport && }\n {!creatingReport && }\n \n {intl.formatMessage(messages.ExportTaskSchedules)}\n \n \n \n {creatingAuthorizationReport && }\n {!creatingAuthorizationReport && }\n \n {intl.formatMessage(messages.ExportAuthorizations)}\n \n \n \n \n
    \n
    \n\n this.loadItems(searchParams)}\n initialSearchParams={initialSearchParams}\n items={items}\n renderRow={item => this.renderRow(item)}\n noDataLabel={}\n >\n \n }\n />\n \n\n {showAssignments ? (\n \n ) : null}\n \n item === true\n ? intl.formatMessage(messages.WithEndFirstFiscalYear)\n : intl.formatMessage(messages.WithoutEndFirstFiscalYear),\n }}\n />\n \n item === true\n ? intl.formatMessage(messages.WithEndFiscalYear)\n : intl.formatMessage(messages.WithoutEndFiscalYear),\n }}\n />\n \n\n {columns &&\n columns.map(col => (\n \n formatListValue({\n id: item.id,\n list: 'taskperiodicity',\n fallback: item.name,\n intl,\n }),\n }}\n />\n ))}\n \n\n this.setState({ showColumnSelectionModal: false })}\n show={showColumnSelectionModal}\n />\n\n {showUpdateTaskScheduleModal && (\n \n this.setState(state => ({\n ...state,\n showUpdateTaskScheduleModal: false,\n }))\n }\n onSave={this.handleUpdateTaskScheduleModalSave}\n />\n )}\n
    \n );\n }\n}\n\nTaskScheduleOverviewContainer.propTypes = {\n intl: intlShape.isRequired,\n stateService: PropTypes.instanceOf(StateService).isRequired,\n};\n\nexport default showWhenPermission(\n 'TaskSchedules',\n 'read',\n)(injectStateService(injectIntl(TaskScheduleOverviewContainer)));\n","import { defineMessages } from 'react-intl';\n\nexport default defineMessages({\n InvoiceDateFrom: 'Invoice date from',\n InvoiceDateUntil: 'Invoice date until',\n WithEmployeeTags: 'With employee tags',\n RelationRentability: 'Relation rentability',\n InvoiceDateFrom: 'Invoice date from',\n InvoiceDateUntil: 'Invoice date until',\n NoInvoicingSchedule: 'No schedule',\n WithInvoicingSchedule: 'With invoicing schedule',\n InvoicingViaRelations: 'Invoicing via relations',\n Totals: 'Totals',\n Total: 'Total',\n ExportToExcel: 'Export to excel',\n ShowHoursInsteadOfAmounts: 'Show hours',\n None: 'None',\n NoDataForReport: 'Could not find any data using the current filters',\n Assignment: 'Assignment',\n ExportToExcelStarted: 'Export to excel started',\n IncludeInactiveRelations: 'Show inactive',\n\n Relation: 'Relation',\n InvoicingType: 'Invoicing type',\n InvoiceSchedule: 'Invoice schedule',\n RegisteredHours: 'Registered hours',\n RemovedHours: 'Removed hours',\n AddedHours: 'Added hours',\n ManipulatedHours: 'Manipulated hours',\n BilledHours: 'Billed hours',\n AddedHoursAmount: 'Added Hours Amount',\n RemovedHoursAmount: 'Removed Hours Amount',\n TotalHoursAmount: 'Total Hours Amount',\n RegisteredCosts: 'Registered costs',\n RemovedCosts: 'Removed costs',\n AddedCosts: 'Added costs',\n BilledCosts: 'Billed costs',\n ManipulatedCosts: 'Manipulated costs',\n FreeLines: 'Free lines',\n Turnover: 'Turnover',\n InternalCost: 'Internal cost',\n Profit: 'Profit',\n TurnoverMinInternalCost: 'Turnover - internal cost',\n TurnoverMinRegistered: 'Turnover - registered hours & costs',\n Rentability: 'Rentability',\n OpenRegisteredHours: 'Open registered hours',\n OpenRegisteredCosts: 'Open registered costs',\n NeverInvoiceRegisteredHours: 'Never invoice hours',\n NeverInvoiceRegisteredCosts: 'Never invoice costs',\n AllCompanies: 'All companies',\n AllTaskTemplates: 'All task templates',\n AllUsers: 'All users',\n WithoutTemplate: 'Without template',\n WithLabels: 'With labels',\n WithoutLabels: 'Without labels',\n TaskTemplate: 'Task template',\n FillPeriodWithWork: 'Fill period with work',\n FillPeriodWithRecup: 'Fill period with recup',\n /* Excel columns */\n InvoicingScheduleName: 'Invoice schedule',\n RegisteredHoursAmount: 'Registered hours amount',\n BillableHoursAmount: 'Billable hours amount',\n BilledHoursAmount: 'Billed hours amount',\n AverageUnitPrice: 'Average unit price',\n OpenRegisteredHoursAmount: 'Open registered hours amount',\n OpenBillableHours: 'Open billable hours',\n OpenBillableHoursAmount: 'Open billable hours amount',\n\n /* HoursPerEmployee */\n HoursPerEmployee: 'Hours per eployee',\n GroupBy: 'Group by',\n GroupByDay: 'Day',\n GroupByWeek: 'Week',\n GroupByMonth: 'Month',\n GroupByYear: 'Year',\n Employee: 'Employee',\n DateFrom: 'From',\n DateUntil: 'Until',\n DateFromRequired: 'The from date is required',\n ExpectedHours: 'Expected hours',\n WorkedHours: 'Worked hours',\n AbsenceHours: 'Absence hours',\n RecuperationHours: 'Recuperation hours',\n FilledInHours: 'Filled in hours',\n CappedFilledInHours: 'Capped filled in hours',\n OvertimeHours: 'Overtime hours',\n OvertimeCorrectionHours: 'Overtime correction hours',\n RemainingOvertimeHoursPeriod: 'Remaining overtime (period)',\n RemainingOvertimeHoursAll: 'Remaining overtime (all)',\n\n MissingHours: 'Missing hours',\n HomeWorkingHours: 'Home working hours',\n RegisterWorkingFromHome: 'Register working from home',\n ClearWorkingFromHome: 'Clear working from home',\n\n /* InvoicingHistory */\n InvoicingHistory: 'Invoicing history',\n DraftInvoiceAmount: 'Draft invoice amount',\n ToInvoice: 'ToInvoice',\n ToInvoiceHours: 'ToInvoiceHours',\n NextScheduleDate: 'Next schedule date',\n NextScheduleAmount: 'Next schedule amount',\n AvgAmountPerHour: 'Avg amount per hour',\n\n BilledAmount: 'Billed amount',\n RegisteredHoursBilled: 'Registered hours (billed)',\n AvgAmountPerHourBilled: 'Avg amount per hour (billed)',\n BilledPerMonth: 'Billed per month',\n FixedAmountOrAdvance: 'Fixed amount/advance',\n LastInvoiceDate: 'Last invoice date',\n\n Potential: 'Potential',\n SelectColumns: 'Select columns',\n ColumnConfig: 'Configure columns',\n\n RegistrationsPerTaskTemplate: 'Registrations per task template',\n RegistrationsPerResourceCategory: 'Registrations per resource category',\n /* RegistrationsPerRelation */\n RegistrationsPerRelation: 'Registrations per relation',\n RegistrationsPerUser: 'Registrations per user',\n NotBillable: 'Not billable',\n Invoiced: 'Invoiced',\n InvoicedInForfait: 'Invoiced in forfait',\n Deleted: 'Deleted',\n NeverInvoice: 'NeverInvoice',\n InvoicedMinusPotential: 'Invoiced - Potential',\n Hours: 'Hours',\n Quantity: 'Quantity',\n Amount: 'Amount',\n Name: 'Name',\n Remark: 'Remark',\n InForfait: 'In forfait',\n InvoiceStatus: 'Invoice status',\n FilterRegistrationUser: 'Select registration user',\n RegistrationDateFrom: 'Reg. from',\n RegistrationDateUntil: 'Reg. until',\n Details: 'Details',\n ShowDetails: 'Show details?',\n Margin: 'Margin',\n InvoicedMinusInternalCost: 'Invoiced - Int. cost',\n NotRegisteredOnTask: 'Not registered on task',\n NotRegisteredOnSubTask: 'Not registered on subtask',\n ExportDetailsToExcel: 'Export details',\n ResetFilters: 'Reset filters',\n WithoutReferenceYear: 'Without reference year',\n\n /* AbsencePerEmployee */\n AbsencePerEmployee: 'Absence per employee',\n AllOvertimeHours: 'All overtime hours',\n AllRecuperationHours: 'All recuperation hours',\n RemainingOvertimeHours: 'Remaining overtime hours',\n ShowAbsencesInDays: 'Show absences in days',\n\n OpenRegistrationOverview: 'Open registration overview',\n AddRegistration: 'Add registration',\n AddAbsence: 'Add absence',\n AddRecuperation: 'Add recuperation',\n OvertimeHoursTooltip: 'Overtime hours: {value}',\n MissingHoursTooltip: 'Missing hours: {value}',\n HomeWorkingHoursTooltip: 'Home working hours: {value}',\n ZoomInToDayView: 'Zoom in to day view',\n SystemUser: 'System user',\n EmployeeType: 'Employee type',\n WithPriceListItem: 'With price list item',\n\n AbsenceCalendar: 'Absence calendar',\n OnlyEmployeesWithAbsences: 'Show only employees with absences',\n Holiday: 'Holiday',\n AbsenceTypes: 'Absence types',\n AddRegistrationFor: 'Add registration for {user}',\n AddAbsenceFor: 'Add absence for {user}',\n AddRecuperationFor: 'Add recuperation for {user}',\n OnlyEmployeesWithMissingHours: 'Only show employees with missing hours',\n});\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\n\nconst HourColumn = ({ value, className, ...rest }) => (\n \n {!value && value !== 0 ? null : value.minuteToTime()}\n \n);\nHourColumn.propTypes = {\n value: PropTypes.number,\n className: PropTypes.string,\n};\nHourColumn.defaultProps = {\n value: null,\n className: null,\n};\n\nexport default HourColumn;\n","import React, { useState, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport MultiSelect, {\n removeItem as removeMultiSelectItem,\n addItem as addMultiSelectItem,\n splitItems as splitMultiSelectItems,\n} from '@/shared/components/input/multiselect/MultiSelect';\n\nconst EmployeeTagMultiSelect = ({ value, onChange, placeholder, idProp, caseSensitive = true }) => {\n const [items, setItems] = useState(null);\n\n useEffect(() => {\n api.base.get(`${config.appUrls.api}/api/employee/tags`).then(({ data }) => {\n const newItems = (data || []).map((x) => ({\n ...x,\n label: x.name,\n }));\n setItems(newItems);\n });\n }, []);\n\n if (!items) return null;\n\n const [selectedItems, availableItems] = splitMultiSelectItems(\n items,\n value,\n idProp,\n caseSensitive,\n );\n\n return (\n onChange(removeMultiSelectItem(value, item, idProp, caseSensitive))}\n onItemSelected={(item) => onChange(addMultiSelectItem(value, item, idProp, caseSensitive))}\n items={availableItems}\n placeholder={placeholder}\n onCreateItem={undefined}\n />\n );\n};\nEmployeeTagMultiSelect.propTypes = {\n value: PropTypes.arrayOf(PropTypes.string),\n onChange: PropTypes.func.isRequired,\n placeholder: PropTypes.string,\n allowNew: PropTypes.bool,\n caseSensitive: PropTypes.bool,\n idProp: PropTypes.string,\n};\n\nEmployeeTagMultiSelect.defaultProps = {\n value: [],\n placeholder: undefined,\n allowNew: false,\n caseSensitive: true,\n idProp: 'id',\n};\n\nexport default EmployeeTagMultiSelect;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage, injectIntl, useIntl } from 'react-intl';\nimport { FaUndo } from 'react-icons/fa';\nimport Toggle from 'react-toggle';\nimport moment from 'moment';\nimport momentPropTypes from 'react-moment-proptypes';\nimport intlShape from '@/shared/utils/intlShape';\n\nimport PeriodButtonGroup from '@/shared/components/PeriodButtonGroup';\nimport UserSearch from '@/shared/components/input/UserSearch';\nimport AuthService from '@/shared/services/AuthService';\nimport DelayedDateRangePicker from '@/shared/components/input/DelayedDateRangePicker';\nimport { hasMultipleCompanies } from '@/shared/components/security/HasMultiCompany';\nimport CompanyMultiSelect from '@/shared/components/input/multiselect/CompanyMultiSelect';\nimport EnumSelectV2 from '@/shared/components/input/EnumSelectV2';\nimport EmployeeTagMultiSelect from '@/modules/hrm/EmployeeTagMultiSelect';\nimport messages from '../reportingMessages';\n\nexport const defaultFilters = {\n dateFrom: moment.utc().startOf('month'),\n dateUntil: moment.utc().endOf('month'),\n period: 'month',\n userId: null,\n ownCompanies: [],\n inDays: false,\n employeeType: null,\n onlyWithMissingHours: false,\n withEmployeeLabels: [],\n};\n\nclass AbsencePerEmployeeFilters extends Component {\n state = {\n showUsers: false,\n };\n static propTypes = {\n onFilterChange: PropTypes.func.isRequired,\n filters: PropTypes.shape({\n userId: PropTypes.string,\n dateFrom: momentPropTypes.momentObj,\n dateUntil: momentPropTypes.momentObj,\n ownCompanies: PropTypes.arrayOf(PropTypes.string),\n inDays: PropTypes.bool,\n employeeType: PropTypes.number,\n onlyWithMissingHours: PropTypes.bool,\n withEmployeeLabels: PropTypes.arrayOf(PropTypes.string),\n }),\n intl: intlShape.isRequired,\n };\n static defaultProps = {\n filters: defaultFilters,\n };\n constructor(props) {\n super(props);\n this.state.showUsers = AuthService.hasPermission({\n functionality: 'RegistrationOthers',\n privilege: 'Read',\n });\n }\n\n filterChanged = (filter) => {\n const { filters, onFilterChange } = this.props;\n const newFilters = { ...filters, ...filter };\n\n if (JSON.stringify(filters) !== JSON.stringify(newFilters)) onFilterChange(newFilters);\n };\n resetFilters = () => {\n this.filterChanged({ ...defaultFilters });\n };\n dateChanged = (dateFrom, dateUntil) => {\n this.filterChanged({ dateFrom, dateUntil });\n };\n userChanged = (item) => {\n this.filterChanged({\n userId: (item && item.id) || null,\n });\n };\n\n render() {\n const { filters, intl } = this.props;\n const { showUsers } = this.state;\n const hasFilters = JSON.stringify(filters) !== JSON.stringify(defaultFilters);\n const showCompanies = hasMultipleCompanies();\n\n return (\n
    \n
    \n
    \n
    \n this.dateChanged(startDate, endDate)}\n block\n />\n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n {showUsers && (\n <>\n
    \n
    \n \n
    \n
    \n
    \n
    \n this.filterChanged({ employeeType: value })}\n />\n
    \n
    \n
    \n
    \n this.filterChanged({ withEmployeeLabels })}\n placeholder={intl.formatMessage(messages.WithEmployeeTags)}\n />\n
    \n
    \n \n )}\n\n {showCompanies ? (\n
    \n
    \n this.filterChanged({ ownCompanies: companies })}\n />\n
    \n
    \n ) : null}\n
    \n
    \n \n
    \n
    \n {showUsers && (\n
    \n
    \n \n
    \n
    \n )}\n
    \n
    \n {hasFilters && (\n
    \n \n \n  \n \n \n
    \n )}\n
    \n
    \n );\n }\n}\n\nexport default injectIntl(AbsencePerEmployeeFilters);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport { FormattedNumber } from 'react-intl';\n\nconst DaysColumn = ({ value, className, ...rest }) => (\n \n {!value && value !== 0 ? null : }\n \n);\nDaysColumn.propTypes = {\n value: PropTypes.number,\n hoursInDay: PropTypes.number,\n className: PropTypes.string,\n};\nDaysColumn.defaultProps = {\n value: null,\n className: null,\n hoursInDay: 0,\n};\n\nexport default DaysColumn;\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { useState, useEffect, useMemo } from 'react';\nimport OutsideClickHandler from 'react-outside-click-handler';\nimport moment from 'moment';\nimport YearSelect from './YearSelect';\nexport var MonthYearPickerOutputFormat;\n(function (MonthYearPickerOutputFormat) {\n MonthYearPickerOutputFormat[\"moment\"] = \"moment\";\n MonthYearPickerOutputFormat[\"date\"] = \"date\";\n MonthYearPickerOutputFormat[\"object\"] = \"object\";\n})(MonthYearPickerOutputFormat || (MonthYearPickerOutputFormat = {}));\nexport var MonthYearPickerMonthFormat;\n(function (MonthYearPickerMonthFormat) {\n MonthYearPickerMonthFormat[\"M\"] = \"M\";\n MonthYearPickerMonthFormat[\"MM\"] = \"MM\";\n MonthYearPickerMonthFormat[\"MMM\"] = \"MMM\";\n MonthYearPickerMonthFormat[\"MMMM\"] = \"MMMM\";\n})(MonthYearPickerMonthFormat || (MonthYearPickerMonthFormat = {}));\nvar parseValue = function (value) {\n if (value === null || value === undefined)\n return { year: null, month: 0 };\n if (value instanceof Date)\n return { year: value.getFullYear(), month: value.getMonth() };\n if (moment.isMoment(value))\n return { year: value.year(), month: value.month() };\n if (typeof value.year === 'number' && typeof value.month === 'number')\n return { year: value.year, month: value.month };\n return { year: null, month: 0 };\n};\nexport var displayDayMonth = function (value, monthFormat) {\n if (monthFormat === void 0) { monthFormat = 'MMMM'; }\n var date = parseValue(value);\n return moment({ year: date.year, month: date.month, day: 1 }).format(\"\".concat(monthFormat, \" YYYY\"));\n};\nvar MonthYearPicker = function (_a) {\n var value = _a.value, onChange = _a.onChange, outputType = _a.outputType, monthFormat = _a.monthFormat, onBlur = _a.onBlur, onKeyDown = _a.onKeyDown, disabled = _a.disabled, yearsInPast = _a.yearsInPast, yearsInFuture = _a.yearsInFuture;\n var _b = useState(parseValue(value)), innerValue = _b[0], setInnerValue = _b[1];\n useEffect(function () {\n var _a = parseValue(innerValue), oldYear = _a.year, oldMonth = _a.month;\n var newValue = parseValue(value);\n var newYear = newValue.year, newMonth = newValue.month;\n if (oldYear !== newYear || oldMonth !== newMonth) {\n setInnerValue(newValue);\n }\n }, [value]);\n var submitValue = function (force) {\n if (force === void 0) { force = false; }\n var year = innerValue.year, month = innerValue.month;\n var oldValue = parseValue(value);\n if (Number.isNaN(year) || year === null) {\n if (force || value)\n onChange(null);\n return;\n }\n if (!force) {\n if (oldValue.year === year && oldValue.month === month)\n return;\n }\n if (outputType === 'object')\n onChange(__assign({}, innerValue));\n else if (outputType === 'date')\n onChange(new Date(year, month, 1));\n else if (outputType === 'moment')\n onChange(moment.utc({ year: year, month: month, day: 1 }));\n };\n useEffect(function () {\n submitValue();\n }, [innerValue]);\n var monthOptions = useMemo(function () {\n var m = [];\n for (var i = 0; i < 12; i += 1)\n m.push(_jsx(\"option\", __assign({ value: i }, { children: moment({ year: 2000, month: i, day: 1 }).format(monthFormat) }), i));\n return m;\n }, [monthFormat]);\n var handleOutsideClick = function () {\n submitValue();\n onBlur();\n };\n var changeYear = function (year) {\n setInnerValue(function (oldValue) { return (__assign(__assign({}, oldValue), { year: year })); });\n submitValue();\n };\n var changeMonth = function (e) {\n var month = parseInt(e.target.value, 10) || 0;\n setInnerValue(function (oldValue) { return (__assign(__assign({}, oldValue), { month: month })); });\n submitValue();\n };\n return (_jsx(OutsideClickHandler, __assign({ onOutsideClick: handleOutsideClick }, { children: _jsxs(\"div\", __assign({ className: \"react-month-year-picker input-group horizontal-form\" }, { children: [_jsx(\"select\", __assign({ value: innerValue.month, className: \"form-control month-input\", onChange: changeMonth, onKeyDown: onKeyDown, disabled: disabled, name: \"month\" }, { children: monthOptions })), _jsx(YearSelect, { value: innerValue.year, onChange: changeYear, yearsInPast: yearsInPast, yearsInFuture: yearsInFuture, onKeyDown: onKeyDown, disabled: disabled, required: true, name: \"year\", className: \"form-control year-input\" })] })) })));\n};\nMonthYearPicker.defaultProps = {\n outputType: MonthYearPickerOutputFormat.object,\n onKeyDown: function () { },\n onBlur: function () { },\n monthFormat: MonthYearPickerMonthFormat.MMMM,\n disabled: false,\n};\nexport default MonthYearPicker;\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/* eslint-disable react/require-default-props */\nimport { useCallback, useEffect, useMemo, useState } from 'react';\nimport { defineMessages, useIntl } from 'react-intl';\nimport Highlighter from 'react-highlight-words';\nimport classnames from 'classnames';\nimport MultiSelect, { addItem, removeItem, splitItems } from './MultiSelect';\nimport useResourceTree from '@/shared/hooks/resource/useResourceTree';\nimport { retrieveResources } from '@/shared/components/registration/resourceApi';\nvar messages = defineMessages({\n EnterResource: {\n id: 'Enter resource',\n defaultMessage: 'Enter resource',\n },\n});\nexport var ResourceMultiSelect = function (_a) {\n var selection = _a.selection, _b = _a.resourceTypes, resourceTypes = _b === void 0 ? null : _b, _c = _a.resourceType, resourceType = _c === void 0 ? -1 : _c, onChange = _a.onChange, placeholder = _a.placeholder, _d = _a.small, small = _d === void 0 ? false : _d;\n var intl = useIntl();\n var _e = useState([]), allResources = _e[0], setResources = _e[1];\n var resources = useMemo(function () {\n if (!resourceTypes || resourceTypes.length === 0)\n return allResources;\n return allResources.filter(function (r) { return resourceTypes.includes(r.type); });\n }, [resourceTypes, allResources]);\n var items = useResourceTree(resources, intl);\n useEffect(function () {\n retrieveResources(intl, resourceType).then(function (response) {\n setResources(response);\n });\n }, [intl]);\n var renderItem = useCallback(function (item, searchValue, index) {\n var showCategory = item.level === 1 && (index === 0 || item.categoryId !== items[index - 1].categoryId);\n return (_jsxs(\"div\", { children: [showCategory ? (_jsx(\"div\", __assign({ className: \"margin-10L\" }, { children: searchValue ? (_jsx(Highlighter, { highlightClassName: \"bold\", searchWords: [searchValue], textToHighlight: item.categoryLabel })) : (item.categoryLabel) }))) : null, _jsx(\"div\", __assign({ className: classnames({\n 'margin-10L': item.level === 0,\n }) }, { children: searchValue ? (_jsx(Highlighter, { highlightClassName: \"bold\", searchWords: [searchValue], textToHighlight: item.label })) : (item.label) }))] }));\n }, [items]);\n var _f = splitItems(items, selection), selectedItems = _f[0], selectableItems = _f[1];\n return (_jsx(MultiSelect, { selectedItem: selectedItems, onItemRemoved: function (item) { return onChange(removeItem(selection, item)); }, onItemSelected: function (item) { return onChange(addItem(selection, item)); }, items: selectableItems, placeholder: placeholder || intl.formatMessage(messages.EnterResource), isSmall: small, renderItem: renderItem, searchProps: ['search', 'label'] }));\n};\nexport default ResourceMultiSelect;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport Axios from 'axios';\nimport { FaCouch, FaFileExcel, FaRegClock, FaSun } from 'react-icons/fa';\nimport { Dropdown, MenuItem } from 'react-bootstrap';\n\nimport intlShape from '@/shared/utils/intlShape';\nimport SimplePanel from '@/shared/components/SimplePanel';\nimport { FormattedMessage, injectIntl, useIntl } from 'react-intl';\nimport moment from 'moment';\nimport LoadingAnimation from '@/shared/components/LoadingAnimation';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport Button from '@/shared/components/Button';\nimport ZendeskHelp from '@/shared/components/ZendeskHelp';\nimport ToastrService from '@/shared/services/ToastrService';\nimport { mapResourceName } from '@/shared/services/ObjectDisplayService';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport SignalRService from '@/shared/services/SignalRService';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport HoverToggle from '@/shared/components/HoverToggle';\nimport AuthService from '@/shared/services/AuthService';\nimport { injectStateService, StateService } from '@/shared/services/StateService';\nimport RegistrationModal from '@/shared/components/registration/RegistrationModal';\nimport { absenceRegistrationOptions } from '@/shared/components/registration/registrationHelpers';\nimport messages from '../reportingMessages';\nimport HourColumn from './HourColumn';\nimport AbsencePerEmployeeFilters, { defaultFilters } from './AbsencePerEmployeeFilters';\nimport DaysColumn from './DaysColumn';\n\nconst SessionStorageKey = 'AbsencePerEmployeeReportParams';\n\nclass AbsencePerEmployeeContainer extends Component {\n state = {\n filters: { ...defaultFilters },\n report: null,\n showRegistrationModal: null,\n };\n\n constructor(props) {\n super(props);\n const { searchParams = {} } = props;\n const sessionParams = JSON.parse(sessionStorage.getItem(SessionStorageKey)) || {};\n\n if (sessionParams.dateFrom) {\n sessionParams.dateFrom = moment.utc(sessionParams.dateFrom);\n }\n if (sessionParams.dateUntil) {\n sessionParams.dateUntil = moment.utc(sessionParams.dateUntil);\n }\n\n this.state = {\n ...this.state,\n filters: {\n ...defaultFilters,\n ...sessionParams,\n ...searchParams,\n },\n };\n this.timeTablesEnabled = DataCacheService.timeTablesEnabled();\n this.currentUserId = AuthService.getUserId();\n this.hasRegistrationPermission = AuthService.hasPermission({\n functionality: 'RegistrationOwn',\n privilege: 'Create',\n });\n this.hasRegistrationOthersPermission = AuthService.hasPermission({\n functionality: 'RegistrationOthers',\n privilege: 'Create',\n });\n }\n\n componentDidMount() {\n this.retrieve();\n SignalRService.subscribe('yearTimeTableUpdated', this.handleYearTimeTableUpdatedEvent);\n }\n\n componentWillUnmount() {\n SignalRService.unsubscribe('yearTimeTableUpdated', this.handleYearTimeTableUpdatedEvent);\n if (typeof this.reportToken !== typeof undefined) {\n this.reportToken.cancel('Operation canceled due to leaving page.');\n }\n }\n\n filtersChanged = filters => {\n this.setState(\n state => ({\n ...state,\n filters: {\n ...state.filters,\n ...filters,\n },\n report: null,\n }),\n () => this.retrieve(),\n );\n };\n\n getParams = () => {\n const { filters } = this.state;\n return filters;\n };\n retrieve = () => {\n const { filters } = this.state;\n const { intl } = this.props;\n\n const params = this.getParams();\n\n const sessionParams = JSON.stringify(filters);\n sessionStorage.setItem(SessionStorageKey, sessionParams);\n\n if (typeof this.reportToken !== typeof undefined) {\n this.reportToken.cancel('Operation canceled due to new request.');\n }\n this.reportToken = Axios.CancelToken.source();\n\n return api.base\n .post(`${config.appUrls.reporting}/api/absenceperemployee`, params, {\n cancelToken: this.reportToken.token,\n })\n .then(({ data: { columns = [], rows = [], ...totals } = {} }) => {\n this.setState(state => ({\n ...state,\n report: {\n columns: columns\n .map(col => ({\n ...col,\n label: mapResourceName(col, intl, false, true),\n }))\n .sort(dynamicSort('label')),\n rows,\n ...totals,\n },\n }));\n return true;\n })\n .catch(error => {\n if (!Axios.isCancel(error)) {\n ToastrService.error();\n }\n });\n };\n createExcelReport = () => {\n const { intl } = this.props;\n\n const reportParams = this.getParams();\n const languageCode = intl.locale;\n const params = {\n language: languageCode,\n signalRConnectionId: SignalRService.getConnectionId(),\n report: 8,\n parameters: JSON.stringify(reportParams),\n };\n\n return api.base\n .post(`${config.appUrls.reporting}/api/export`, params)\n .then(() => {\n ToastrService.info(intl.formatMessage(messages.ExportToExcelStarted));\n })\n .catch(error => {\n handleHttpError(intl)(error);\n });\n };\n\n handleYearTimeTableUpdatedEvent = eventParams => {\n const { userId, dateFrom, dateUntil } = eventParams;\n if (!userId) return;\n const { report, filters } = this.state;\n if (filters.dateFrom && moment.utc(dateUntil).isBefore(moment.utc(filters.dateFrom))) return;\n if (filters.dateUntil && moment.utc(dateFrom).isAfter(moment.utc(filters.dateUntil))) return;\n if (!report || !report.rows || report.rows.findIndex(r => r.userId === userId) < 0) return;\n\n this.retrieve();\n };\n\n gotoRegistrationOverview = userId => {\n const { stateService } = this.props;\n const { filters: { dateFrom, dateUntil } = {} } = this.state;\n\n stateService.gotoRegistrationOverview({\n userId,\n dateFrom,\n dateUntil,\n period: 'All',\n });\n };\n\n createRegistration = (type, userId) => {\n const { filters: { dateFrom } = {} } = this.state;\n this.setState({\n showRegistrationModal: {\n registration: { type, userId, date: moment.utc(dateFrom).toDate() },\n registrationOptions: type === 3 || type === 4 ? absenceRegistrationOptions : {},\n },\n });\n };\n\n renderRow = row => {\n const {\n report,\n filters: { inDays },\n } = this.state;\n const canCreateRegistration =\n this.currentUserId === row.userId\n ? this.hasRegistrationPermission\n : this.hasRegistrationOthersPermission;\n\n const AbsenceColumn = inDays ? DaysColumn : HourColumn;\n return (\n \n \n \n \n {row.employeeName}\n \n this.gotoRegistrationOverview(row.userId)}>\n \n \n {' '}\n {canCreateRegistration ? (\n this.createRegistration(0, row.userId)}>\n \n \n \n ) : null}\n {canCreateRegistration ? (\n this.createRegistration(3, row.userId)}>\n \n \n \n ) : null}\n {canCreateRegistration && DataCacheService.timeTablesEnabled() ? (\n this.createRegistration(4, row.userId)}>\n \n \n \n ) : null}\n \n \n \n\n {(report.absence || 0) > 0 &&\n report.columns.map(col => )}\n {(report.absence || 0) > 0 && }\n \n\n {report.work !== report.total && }\n\n {this.timeTablesEnabled && (report.expected || 0) > 0 && (\n \n )}\n\n {this.timeTablesEnabled && (report.missing || 0) > 0 && }\n\n {this.timeTablesEnabled && (report.overtime || 0) > 0 && (\n \n )}\n {(report.overtimeCorrection || 0) !== 0 && }\n\n {this.timeTablesEnabled && (report.recup || 0) > 0 && }\n\n {this.timeTablesEnabled && }\n \n );\n };\n\n render() {\n const { intl } = this.props;\n const { filters, report, showRegistrationModal } = this.state;\n\n const hasAbsences = ((report && report.absence) || 0) > 0;\n\n const AbsenceColumn = filters.inDays ? DaysColumn : HourColumn;\n\n return (\n
    \n \n
    \n \n
    \n \n\n {report && report.rows && report.rows.length > 0 && (\n <>\n
    \n
    \n this.createExcelReport()}\n showProgress\n >\n \n \n \n {intl.formatMessage(messages.ExportToExcel)}\n \n
    \n
    \n \n \n \n \n {hasAbsences && (\n \n )}\n \n {report.work !== report.total && (\n \n )}\n {this.timeTablesEnabled && (report.expected || 0) > 0 && (\n \n )}\n {this.timeTablesEnabled && (report.missing || 0) > 0 && (\n \n )}\n {this.timeTablesEnabled && (report.overtime || 0) > 0 && (\n \n )}\n {(report.overtimeCorrection || 0) !== 0 && (\n \n )}\n {(report.recup || 0) > 0 && (\n \n )}\n\n {this.timeTablesEnabled && (\n \n )}\n \n {hasAbsences && (\n \n {report.columns.map(col => (\n \n ))}\n \n \n )}\n \n {report.rows.map(this.renderRow)}\n \n \n \n {hasAbsences &&\n report.columns.map(col => )}\n {hasAbsences && }\n \n {report.work !== report.total && }\n\n {this.timeTablesEnabled && (report.expected || 0) > 0 && (\n \n )}\n\n {this.timeTablesEnabled && (report.missing || 0) > 0 && (\n \n )}\n {this.timeTablesEnabled && (report.overtime || 0) > 0 && (\n \n )}\n {(report.overtimeCorrection || 0) !== 0 && (\n \n )}\n {this.timeTablesEnabled && (report.recup || 0) > 0 && (\n \n )}\n\n {this.timeTablesEnabled && }\n \n \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n {col.label}\n \n \n
    \n \n
    \n \n )}\n {report && (!report.rows || !report.rows.length) && (\n
    \n \n
    \n )}\n {!report && }\n {showRegistrationModal && (\n \n this.setState({\n showRegistrationModal: null,\n })\n }\n onClose={() =>\n this.setState({\n showRegistrationModal: null,\n })\n }\n />\n )}\n
    \n );\n }\n}\n\nAbsencePerEmployeeContainer.propTypes = {\n intl: intlShape.isRequired,\n stateService: PropTypes.instanceOf(StateService).isRequired,\n};\n\nexport default injectStateService(injectIntl(AbsencePerEmployeeContainer));\n","import moment from 'moment';\nimport React from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport Toggle from 'react-toggle';\nimport MonthYearPicker from '@/shared/components/input/MonthYearPicker';\nimport CompanyMultiSelect from '@/shared/components/input/multiselect/CompanyMultiSelect';\nimport TeamMultiSelect from '@/shared/components/input/multiselect/TeamMultiSelect';\nimport HasMultiCompany from '@/shared/components/security/HasMultiCompany';\nimport AuthService from '@/shared/services/AuthService';\nimport UserSearch from '@/shared/components/input/UserSearch';\nimport EnumMultiSelect from '@/shared/components/input/multiselect/EnumMultiSelect';\nimport ResourceAutoComplete from '@/shared/components/registration/ResourceAutoComplete';\nimport ResourceMultiSelect from '@/shared/components/input/multiselect/ResourceMultiSelect';\nimport { FaUndo } from 'react-icons/fa';\nimport EmployeeTagMultiSelect from '@/modules/hrm/EmployeeTagMultiSelect';\nimport messages from '../reportingMessages';\n\nexport const defaultFilters = {\n userId: null,\n ownCompanies: [],\n employeeTypes: [],\n resources: [],\n teams: [],\n year: moment.utc().year(),\n month: moment.utc().month(),\n\n onlyWithAbsences: true,\n withEmployeeLabels: [],\n};\n\nconst AbsenceCalendarFilters = ({ filters, onFilterChange, canSeeAbsenceDetails }) => {\n const intl = useIntl();\n const filterChanged = (filter) => {\n const newFilters = { ...filters, ...filter };\n\n if (JSON.stringify(filters) !== JSON.stringify(newFilters)) onFilterChange(newFilters);\n };\n const userChanged = (item) => {\n filterChanged({\n userId: (item && item.id) || null,\n });\n };\n\n const resetFilters = () => {\n filterChanged({ ...defaultFilters });\n };\n\n const { year, month } = filters;\n const showUsers = AuthService.hasPermission({\n functionality: 'RegistrationOthers',\n privilege: 'Read',\n });\n\n const hasFilters = JSON.stringify(filters) !== JSON.stringify(defaultFilters);\n\n return (\n
    \n
    \n
    \n
    \n \n
    \n
    \n {showUsers && (\n <>\n
    \n
    \n \n
    \n
    \n
    \n
    \n filterChanged({ employeeTypes: value })}\n placeholder={intl.formatMessage(messages.EmployeeType)}\n />\n
    \n
    \n
    \n
    \n filterChanged({ teams: value })}\n />\n
    \n
    \n
    \n \n
    \n \n )}\n \n
    \n
    \n filterChanged({ ownCompanies: companies })}\n />\n
    \n
    \n
    \n {!!canSeeAbsenceDetails &&
    \n
    \n filterChanged({ resources })}\n placeholder={intl.formatMessage(messages.AbsenceTypes)}\n />\n
    \n
    }\n
    \n
    \n filterChanged({ withEmployeeLabels })}\n placeholder={intl.formatMessage(messages.WithEmployeeTags)}\n />\n
    \n
    \n {hasFilters && (\n
    \n \n
    \n )}\n
    \n
    \n );\n};\n\nexport default AbsenceCalendarFilters;\n","import React from 'react';\n\nimport messages from '../reportingMessages';\n\nimport { canCreateRegistrationForUser } from '@/shared/components/registration/registrationHelpers';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport { Dropdown, MenuItem, SplitButton } from 'react-bootstrap';\nimport { FaCouch, FaPlus, FaSun } from 'react-icons/fa';\nimport DropdownMenu from 'react-bootstrap/lib/DropdownMenu';\nimport { FormattedMessage } from 'react-intl';\n\nconst AddAbsenceDropdownButton = ({ onOpenRegistrationModal, intl, userId }) => {\n const showOtherUser = !!userId && canCreateRegistrationForUser(userId);\n const showRecup = DataCacheService.timeTablesEnabled();\n const userName = !!userId ? DataCacheService.getUserName(userId) : null;\n\n const otherUserValues = { user: userName };\n return (\n onOpenRegistrationModal(3)}\n id=\"AddRegistrationButton\"\n bsStyle=\"inverse\"\n pullRight\n toggleLabel={intl.formatMessage(messages.AddAbsence)}\n title={\n \n \n \n \n }\n >\n onOpenRegistrationModal(3)}>\n \n \n \n {showRecup ? (\n onOpenRegistrationModal(4)}>\n \n \n \n ) : null}\n\n {showOtherUser ? (\n onOpenRegistrationModal(3, userId)}>\n \n \n \n ) : null}\n {showOtherUser && showRecup ? (\n onOpenRegistrationModal(4, userId)}>\n \n \n \n ) : null}\n \n );\n};\nexport default AddAbsenceDropdownButton;\n","import React, { Component } from 'react';\nimport Axios from 'axios';\nimport { injectStateService } from '@/shared/services/StateService';\nimport { FormattedMessage, injectIntl } from 'react-intl';\nimport SimplePanel from '@/shared/components/SimplePanel';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport messages from '../reportingMessages';\nimport AbsenceCalendarFilters, { defaultFilters } from './AbsenceCalendarFilters';\nimport LoadingAnimation from '@/shared/components/LoadingAnimation';\nimport moment from 'moment';\nimport classNames from 'classnames';\nimport { mapResourceName } from '@/shared/services/ObjectDisplayService';\nimport { minutesToTimeSpan } from '@/shared/utils/adminpulse';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport ToastrService from '@/shared/services/ToastrService';\nimport RegistrationModal from '@/shared/components/registration/RegistrationModal';\n\nimport {\n absenceRegistrationOptions,\n canCreateRegistrationForUser,\n} from '@/shared/components/registration/registrationHelpers';\nimport AddAbsenceDropdownButton from './AddAbsenceDropdownButton';\nimport { CanCreate } from '@/shared/components/security';\nimport AuthService from '@/shared/services/AuthService';\n\nconst SessionStorageKey = 'AbsenceCalendarParams';\n\nconst getClassForDayStatus = dayStatus => {\n if (!dayStatus || dayStatus === 0) return '';\n switch (dayStatus) {\n case 1:\n return 'noworkday';\n case 2:\n return '';\n case 3:\n return 'halfDayMorning';\n case 4:\n return 'halfDayAfternoon';\n }\n};\nconst getClassForAbsence = absence => {\n if (absence.startInMorning && absence.endInMorning) return 'absence left';\n if (absence.startInMorning && !absence.endInMorning) return 'absence full';\n if (!absence.startInMorning) return 'absence right';\n};\nconst getResourceColor = (i, total) => {\n if (total < 1) total = 1;\n const color = (i * (360 / total)) % 360;\n return 'hsl( ' + color + ', 27%, 53% )';\n};\n\nclass AbsenceCalendarContainer extends Component {\n constructor(props) {\n super(props);\n const sessionParams = JSON.parse(sessionStorage.getItem(SessionStorageKey)) || {};\n this.state = {\n report: null,\n showRegistrationModal: null,\n filters: {\n ...defaultFilters,\n ...sessionParams,\n },\n };\n }\n\n canSeeAbsenceDetails = () => {\n return AuthService.hasPermission({ functionality: 'RegistrationOthers', privilege: 'Read' });\n };\n\n filtersChanged = filters => {\n this.setState(\n state => ({\n filters: {\n ...state.filters,\n ...filters,\n },\n report: null,\n }),\n () => this.retrieve(),\n );\n };\n\n getParams = () => {\n const { filters } = this.state;\n return { ...filters, month: filters.month + 1 };\n };\n retrieve = () => {\n const { filters } = this.state;\n const { intl } = this.props;\n this.setState({ report: null });\n const params = this.getParams();\n\n const sessionParams = JSON.stringify(filters);\n sessionStorage.setItem(SessionStorageKey, sessionParams);\n\n if (typeof this.reportToken !== typeof undefined) {\n this.reportToken.cancel('Operation canceled due to new request.');\n }\n this.reportToken = Axios.CancelToken.source();\n\n return api.base\n .post(`${config.appUrls.reporting}/api/AbsenceCalendar`, params, {\n cancelToken: this.reportToken.token,\n })\n .then(({ data }) => {\n if (!data) {\n this.setState({\n report: {},\n dateColumns: [],\n resources: [],\n resourceLookup: {},\n hasHolidays: false,\n });\n return false;\n }\n const daysInMonth = moment\n .utc({ year: filters.year, month: filters.month, day: 1 })\n .daysInMonth();\n\n const dateColumns = Array.from({ length: daysInMonth }, (x, i) => ({\n key: i,\n date: moment.utc({ year: filters.year, month: filters.month, day: i + 1 }),\n }));\n const resourceCount = (data.resources || []).length;\n\n const resources = (data.resources || [])\n .map(x => ({ ...x, label: mapResourceName(x, intl) })) //Translate\n .sort(dynamicSort('label')) //Sort\n .map((x, i) => ({\n ...x,\n className: `color-${i}`,\n color: getResourceColor(i, resourceCount),\n })); //Add color index to object\n\n this.setState({\n report: data,\n dateColumns,\n resources,\n resourceLookup: resources.reduce((o, r) => {\n o[r.resourceId] = r;\n return o;\n }, {}),\n hasHolidays: data.isHoliday.some(x => x),\n });\n return true;\n })\n .catch(error => {\n if (!Axios.isCancel(error)) {\n ToastrService.error();\n }\n });\n };\n\n componentDidMount() {\n this.retrieve();\n }\n\n // getFirstWorkday = () => {\n // const { report, filters } = this.state;\n // let date = moment.utc({ year: filters.year, month: filters.month, day: 1 });\n // //Check if date is a holiday, add 1 day\n // while (report && report.isHoliday[date.date() - 1]) {\n // date = date.add(1, 'day');\n // }\n // if (date.isoWeekday() >= 6) {\n // //Check if in weekend\n // date = date.isoWeekday(8); //Set to next monday\n // //Redo is holiday check\n // while (report && report.isHoliday[date.date() - 1]) {\n // date = date.add(1, 'day');\n // }\n // }\n // return date;\n // };\n\n openRegistrationModal = (type, userId = null, date = null) => {\n this.setState(({ filters }) => ({\n showRegistrationModal: {\n registration: {\n type,\n userId: userId ?? AuthService.getUserId(),\n date: date ? moment.utc(date).toDate() : moment.utc().toDate(),\n },\n registrationOptions: absenceRegistrationOptions,\n },\n }));\n };\n\n createExcelReport = () => {\n const { intl } = this.props;\n\n const reportParams = this.getParams();\n const languageCode = intl.locale;\n const params = {\n language: languageCode,\n signalRConnectionId: SignalRService.getConnectionId(),\n report: 9,\n parameters: JSON.stringify(reportParams),\n };\n\n return api.base\n .post(`${config.appUrls.reporting}/api/export`, params)\n .then(() => {\n ToastrService.info(intl.formatMessage(messages.ExportToExcelStarted));\n })\n .catch(error => {\n handleHttpError(intl)(error);\n });\n };\n\n renderEmployeeRow = row => {\n const { report, dateColumns, resourceLookup } = this.state;\n return (\n \n \n {row.name}\n {dateColumns.map((c, ci) => {\n const absences = row.cells[ci] || null;\n\n return (\n \n {absences && absences.length > 0 && (\n
    \n {absences.map((a, ai) => {\n const resource = this.canSeeAbsenceDetails() ? resourceLookup[a.resourceId] : undefined;\n return (\n
    \n \n  \n
    \n
    \n );\n })}\n \n )}\n \n );\n })}\n \n \n );\n };\n\n render() {\n const {\n report,\n filters,\n dateColumns,\n resources,\n hasHolidays,\n showRegistrationModal,\n } = this.state;\n const { intl } = this.props;\n\n return (\n
    \n \n \n \n }\n >\n
    \n \n
    \n \n\n {report && report.rows && report.rows.length > 0 && (\n <>\n \n \n \n \n {dateColumns.map((x, xi) => (\n \n {moment(x.date).format('dd')}\n
    \n {moment(x.date).format('DD')}\n \n ))}\n
    \n \n {report.rows.map(row => this.renderEmployeeRow(row))}\n
    \n \n
    \n {resources && resources.length > 0 && (\n
    \n {this.canSeeAbsenceDetails() && resources.map(r => (\n \n \n  \n \n  \n {r.label}\n \n ))}\n {hasHolidays ? (\n \n  \n  \n \n \n ) : null}\n
    \n )}\n \n )}\n {report && (!report.rows || !report.rows.length) && (\n
    \n \n
    \n )}\n {!report && }\n {showRegistrationModal && (\n \n this.setState({\n showRegistrationModal: null,\n })\n }\n onClose={() =>\n this.setState({\n showRegistrationModal: null,\n })\n }\n />\n )}\n
    \n );\n }\n}\n\nexport default injectStateService(injectIntl(AbsenceCalendarContainer));\n","import React from 'react';\n\nimport messages from '../reportingMessages';\n\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport { Dropdown, MenuItem, SplitButton } from 'react-bootstrap';\nimport { FaCouch, FaPlus, FaSun } from 'react-icons/fa';\nimport DropdownMenu from 'react-bootstrap/lib/DropdownMenu';\nimport { FormattedMessage } from 'react-intl';\nimport AuthService, { functionalities, privileges } from '@/shared/services/AuthService';\n\nconst AddRegistrationDropdownButton = ({ onAddRegistration, intl, userId }) => {\n const showRecup = DataCacheService.timeTablesEnabled();\n const otherUserName =\n !!userId &&\n userId !== AuthService.getUserId() &&\n AuthService.hasPermission({\n functionality: functionalities.RegistrationOthers,\n privilege: privileges.Create,\n })\n ? DataCacheService.getUserName(userId)\n : null;\n const otherUserValues = { user: otherUserName };\n return (\n onAddRegistration({ type: 0 })}\n id=\"AddRegistrationButton\"\n bsStyle=\"inverse\"\n pullRight\n toggleLabel={intl.formatMessage(messages.AddAbsence)}\n title={\n \n \n \n \n }\n >\n onAddRegistration({ type: 3 })}>\n \n \n \n {showRecup ? (\n onAddRegistration({ type: 4 })}>\n \n \n \n ) : null}\n {otherUserName ? (\n <>\n \n onAddRegistration({ type: 0, userId })}>\n \n \n \n onAddRegistration({ type: 3, userId })}>\n \n \n \n {showRecup ? (\n onAddRegistration({ type: 4, userId })}>\n \n \n \n ) : null}\n \n ) : null}\n \n );\n};\nexport default AddRegistrationDropdownButton;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { injectIntl, useIntl } from 'react-intl';\nimport { isEqual } from 'lodash';\nimport moment from 'moment';\nimport momentPropTypes from 'react-moment-proptypes';\nimport { OverlayTrigger, Tooltip } from 'react-bootstrap';\nimport { FaCalendar } from 'react-icons/fa';\n\nimport intlShape from '@/shared/utils/intlShape';\nimport RegistrationComponent from '@/shared/components/registration/RegistrationComponent';\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport ToastrService from '@/shared/services/ToastrService';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport AuthService, { functionalities } from '@/shared/services/AuthService';\nimport DelayedDateRangePicker from '@/shared/components/input/DelayedDateRangePicker';\nimport classNames from 'classnames';\n\nimport {\n createEmptyRegistration,\n executeAction,\n isRegistrationValid,\n registrationShape,\n} from './registrationHelpers';\nimport messages from './registrationMessages';\nimport { FormGroupPart } from './partials';\n\nconst registrationOptions = {\n showDate: false,\n showReferenceYear: false,\n showTasks: false,\n showFromUntil: false,\n showDuration: false,\n showQuantity: false,\n showPrice: false,\n showDiscount: false,\n showVat: false,\n showTotalAmount: false,\n showBillable: false,\n showInForfait: false,\n showInternalRemark: false,\n showInvoiceRemark: false,\n showInteraction: false,\n ownCompanyRelation: true,\n};\n\nclass FillGapsRegistrationModal extends Component {\n state = {\n registration: null,\n dateFrom: moment.utc().startOf('day'),\n dateUntil: moment.utc().startOf('day'),\n userId: AuthService.getUserId(),\n gapInfo: null,\n totalTime: 0,\n showValidation: false,\n };\n\n constructor(props) {\n super(props);\n\n this.state.dateFrom = props.dateFrom;\n this.state.dateUntil = props.dateUntil;\n this.state.userId = props.userId || AuthService.getUserId();\n }\n\n componentDidMount() {\n const { registration: initRegistration } = this.props;\n\n const registration = createEmptyRegistration(initRegistration);\n\n this.setState({ registration, isRecup: !!registration && registration.type === 4 }, () =>\n this.reloadGapInfo(),\n );\n }\n\n doRegistrationAction = (action, value) => {\n this.setState(({ registration }) => {\n const newValue = executeAction(registration, action, value);\n if (isEqual(newValue, registration)) return {};\n return { registration: newValue };\n });\n };\n saveRegistration = () => {\n if (this.isFormInvalid()) return;\n const { intl, onSave } = this.props;\n const { registration, userId, dateFrom, dateUntil, isRecup } = this.state;\n\n return api.base\n .post(`${config.appUrls.api}/api/Registration/FillDays`, {\n userId,\n dateFrom,\n dateUntil,\n isRecup,\n registration,\n })\n .then(\n ({ data }) => {\n onSave(data);\n ToastrService.success();\n },\n error => {\n handleHttpError(intl)(error);\n },\n );\n };\n isFormInvalid = () => {\n const { registration, dateFrom, dateUntil, totalTime } = this.state;\n if (!dateFrom || !dateUntil) return true;\n if (!moment.utc(dateFrom).isValid()) return true;\n if (!moment.utc(dateUntil).isValid()) return true;\n if (moment.utc(dateUntil).isBefore(moment.utc(dateFrom))) return true;\n\n if (!isRegistrationValid(registration, registrationOptions)) return true;\n\n return false;\n };\n\n showValidation = () => this.setState({ showValidation: true });\n hasSavePermission = () => {\n const { registration } = this.state;\n if (!registration) return false;\n if (registration.userId && registration.userId !== AuthService.getUserId())\n return AuthService.hasPermission({\n functionality: functionalities.RegistrationOthers,\n privilege: 'Update',\n });\n return AuthService.hasPermission({\n functionality: functionalities.RegistrationOwn,\n privilege: 'Update',\n });\n };\n\n reloadGapInfo = () => {\n const { userId, dateFrom, dateUntil, isRecup } = this.state;\n if (!userId || !dateFrom || !dateUntil) {\n this.setState({ gapInfo: null });\n return;\n }\n\n api.base\n .post(`${config.appUrls.api}/api/Registration/CalculateGaps`, {\n userId,\n dateFrom,\n dateUntil,\n isRecup,\n })\n .then(\n ({ data }) => {\n this.setState({\n gapInfo: data,\n totalTime: (data || []).reduce((sum, day) => sum + day.durationMinutes, 0),\n });\n },\n error => {\n const { intl } = this.props;\n handleHttpError(intl)(error);\n },\n );\n };\n datesChanged = ({ startDate, endDate }) => {\n this.setState({ dateFrom: startDate, dateUntil: endDate }, this.reloadGapInfo);\n };\n\n render() {\n const { show, intl, onClose, remainingOvertime } = this.props;\n const { registration, showValidation, dateFrom, dateUntil, gapInfo, totalTime } = this.state;\n const hasRegistrationPermission = this.hasSavePermission();\n const remainingOvertimeAfterSave = (remainingOvertime || 0) - (totalTime || 0);\n return (\n \n
    \n
    \n \n \n \n
    \n {gapInfo ? (\n
    \n \n {totalTime.minuteToTime()}\n \n \n \n \n \n \n \n {gapInfo.map((x, i) => {\n if (i === 26 && gapInfo.length > 31)\n return (\n \n \n \n );\n if (i > 26 && i < gapInfo.length - 5) return null;\n return (\n \n \n \n \n );\n })}\n \n
    \n {intl.formatMessage(messages.Date)} ({gapInfo.length})\n {intl.formatMessage(messages.Duration)}
    ...
    \n {intl.formatDate(x.date, {\n weekday: 'short',\n day: '2-digit',\n month: '2-digit',\n year: 'numeric',\n })}\n    \n \n {x.durationMinutes.minuteToTime()}\n
    \n \n }\n >\n \n \n \n \n \n {registration && registration.type === 4 ? (\n \n {(remainingOvertime || 0).minuteToTime()}\n \n ) : null}\n
    \n ) : null}\n {gapInfo && registration && registration.type === 4 ? (\n
    \n \n {remainingOvertimeAfterSave.minuteToTime()}\n \n
    \n ) : null}\n {registration && (!!registration.type || registration.type === 0) ? (\n \n ) : null}\n
    \n \n );\n }\n}\n\nFillGapsRegistrationModal.propTypes = {\n registration: registrationShape,\n onSave: PropTypes.func.isRequired,\n intl: intlShape.isRequired,\n onClose: PropTypes.func.isRequired,\n show: PropTypes.bool,\n dateFrom: momentPropTypes.momentObj,\n dateUntil: momentPropTypes.momentObj,\n userId: PropTypes.string,\n remainingOvertime: PropTypes.number,\n};\n\nFillGapsRegistrationModal.defaultProps = {\n show: false,\n registration: null,\n dateFrom: moment.utc().startOf('day'),\n dateUntil: moment.utc().startOf('day'),\n userId: null,\n remainingOvertime: null,\n};\nexport default injectIntl(FillGapsRegistrationModal);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport TimeInput from '../input/TimeInput';\nimport EditableToggle from './EditableToggle';\n\nconst EditableTimeInput = ({\n onChange,\n value,\n submitOnBlur,\n inputClassName,\n readOnly,\n placeholder,\n displayValue,\n displayClassName,\n ...rest\n}) => (\n \n {({ inputValue, setInputValue, submit, cancel, handleKeyDown }) => (\n \n )}\n \n);\n\nEditableTimeInput.propTypes = {\n onChange: PropTypes.func.isRequired,\n value: PropTypes.number,\n submitOnBlur: PropTypes.bool,\n placeholder: PropTypes.string,\n displayClassName: PropTypes.string,\n readOnly: PropTypes.bool,\n displayValue: PropTypes.node,\n};\nEditableTimeInput.defaultProps = {\n submitOnBlur: true,\n displayClassName: '',\n placeholder: '',\n readOnly: false,\n displayValue: null,\n value: null,\n};\n\nexport default EditableTimeInput;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\n\nimport EditableTimeInput from '@/shared/components/editable/EditableTimeInput';\n\nconst HoursPerEmployeeReportDetailRow = ({\n userId,\n type,\n values,\n total,\n label,\n columns,\n toggleResources,\n showResources,\n onUpdateHomeWorkingHours,\n}) => {\n const toggleFunction = toggleResources;\n\n return (\n \n \n {toggleResources ? (\n \n \n \n ) : null}\n {label}\n \n {columns.map(col => {\n const value = values[col.groupNr];\n return (\n \n onUpdateHomeWorkingHours(userId, col.startDate, x)}\n allowNull\n padHours={false}\n />\n \n );\n })}\n \n {total.minuteToTime()}\n \n \n );\n};\nHoursPerEmployeeReportDetailRow.propTypes = {\n onUpdateHomeWorkingHours: PropTypes.func.isRequired,\n userId: PropTypes.string.isRequired,\n type: PropTypes.number.isRequired,\n total: PropTypes.number.isRequired,\n values: PropTypes.shape({}),\n label: PropTypes.node,\n columns: PropTypes.arrayOf(PropTypes.shape({})),\n toggleResources: PropTypes.func,\n showResources: PropTypes.bool,\n};\nHoursPerEmployeeReportDetailRow.defaultProps = {\n values: {},\n label: null,\n columns: [],\n toggleResources: undefined,\n showResources: false,\n};\n\nexport default HoursPerEmployeeReportDetailRow;\n","import React, { Component } from 'react';\nimport DatePicker from './DatePicker';\n\nclass SimpleDatePicker extends Component {\n state = {\n isFocused: false,\n };\n\n render() {\n const { isFocused } = this.state;\n return (\n this.setState({ isFocused: focused })}\n focused={isFocused}\n {...this.props}\n />\n );\n }\n}\n\nexport default SimpleDatePicker;\n","import React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport { injectIntl, useIntl } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport enumCache from '@/shared/services/EnumCacheService';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\n\nclass ResourceTypeButtonGroup extends PureComponent {\n state = {\n resourceTypes: [],\n };\n\n componentDidMount() {\n const { intl, allowedTypes } = this.props;\n enumCache.get('resourcetype').then(data => {\n this.setState({\n resourceTypes: data\n .filter(item => !allowedTypes || allowedTypes.indexOf(item.key) >= 0)\n .map(item => ({\n id: item.key,\n label: intl.formatMessage(listItemMsg('resourcetype', item.key, item.value)),\n }))\n .sort(dynamicSort('id')),\n });\n });\n }\n\n toggleRelationType = relType => {\n const { selectedTypes = [], onChange } = this.props;\n const idx = selectedTypes.indexOf(relType);\n if (idx >= 0) {\n onChange(selectedTypes.filter((_, i) => i !== idx));\n } else {\n onChange([...selectedTypes, relType]);\n }\n };\n\n render() {\n const { resourceTypes } = this.state;\n const { selectedTypes = [] } = this.props;\n\n return (\n
    \n {resourceTypes &&\n resourceTypes.map(t => (\n
    \n {\n document.activeElement.blur();\n this.toggleRelationType(t.id);\n }}\n type=\"button\"\n title={t.label}\n className={classnames('btn btn-default', {\n active: selectedTypes.includes(t.id),\n })}\n >\n {t.label}\n \n
    \n ))}\n
    \n );\n }\n}\n\nResourceTypeButtonGroup.propTypes = {\n intl: intlShape.isRequired,\n selectedTypes: PropTypes.arrayOf(PropTypes.number),\n onChange: PropTypes.func.isRequired,\n allowedTypes: PropTypes.arrayOf(PropTypes.number),\n};\n\nResourceTypeButtonGroup.defaultProps = {\n selectedTypes: [],\n allowedTypes: null,\n};\n\nexport default injectIntl(ResourceTypeButtonGroup);\n","import React from 'react';\nimport moment from 'moment';\nimport { defineMessages, FormattedMessage } from 'react-intl';\n\nconst messages = defineMessages({\n SubtractOneMonth: '-1 month',\n AddOneMonth: '+1 month',\n PreviousMonth: 'Previous month',\n CurrentMonth: 'Current month',\n CurrentYear: 'Current year',\n DateFrom: 'From',\n DateUntil: 'Until',\n SubtractOneWeek: '-1 week',\n AddOneWeek: '+1 week',\n PreviousWeek: 'Previous week',\n CurrentWeek: 'Current week',\n});\n\nconst currentYearStart = moment.utc().startOf('year');\nconst currentYearEnd = moment.utc().endOf('year');\nconst currentMonth = moment.utc().startOf('month');\nconst currentMonthEnd = moment.utc().endOf('month');\nconst currentYear = moment.utc().year();\n\nconst yearOffsets = [4, 3, 2, 1, 0];\n\nfunction HoursPerEmployeeReportPeriods({ filters = {}, onChangeDate }) {\n const { dateFrom, dateUntil, groupBy } = filters;\n const currentWeek = moment.utc().startOf('week');\n const currentWeekEnd = moment.utc().endOf('week');\n const dateUntilLastDay =\n dateUntil && moment(dateUntil).isSame(moment(dateUntil).endOf('month'), 'day');\n if (groupBy === 4) {\n return (\n
    \n
    \n
    \n \n
    \n {yearOffsets.map(x => {\n const startDate = moment(currentYearStart).subtract(x, 'y');\n const endDate = dateUntil;\n\n return (\n = endDate}\n onClick={() => {\n document.activeElement.blur();\n onChangeDate(startDate, endDate);\n document.activeElement.classList.add('active');\n }}\n >\n {currentYear - x}\n \n );\n })}\n
    \n
    \n
    \n
    \n
    \n \n
    \n {yearOffsets.map(x => {\n const startDate = dateFrom;\n const endDate = moment(currentYearEnd).subtract(x, 'y');\n\n return (\n = endDate}\n onClick={() => onChangeDate(startDate, endDate)}\n >\n {currentYear - x}\n \n );\n })}\n
    \n
    \n
    \n
    \n );\n }\n if (groupBy === 3) {\n return (\n
    \n
    \n \n onChangeDate(\n moment(dateFrom).subtract(1, 'month'),\n dateUntil\n ? dateUntilLastDay\n ? moment(dateUntil)\n .subtract(5, 'day')\n .subtract(1, 'month')\n .endOf('month')\n : moment(dateUntil).subtract(1, 'month')\n : null,\n )\n }\n >\n \n \n \n onChangeDate(\n moment(dateFrom).add(1, 'month'),\n dateUntil\n ? dateUntilLastDay\n ? moment(dateUntil)\n .subtract(5, 'day')\n .add(1, 'month')\n .endOf('month')\n : moment(dateUntil).add(1, 'month')\n : null,\n )\n }\n >\n \n \n \n onChangeDate(\n moment(currentYearStart).add(-2, 'y'),\n moment(currentYearEnd).add(-2, 'y'),\n )\n }\n >\n {currentYear - 2}\n \n \n onChangeDate(\n moment(currentYearStart).add(-1, 'y'),\n moment(currentYearEnd).add(-1, 'y'),\n )\n }\n >\n {currentYear - 1}\n \n onChangeDate(moment(currentYearStart), moment(currentYearEnd))}\n >\n \n \n
    \n
    \n );\n }\n return (\n <>\n
    \n
    \n \n onChangeDate(\n moment(dateFrom).subtract(1, 'week'),\n dateUntil ? moment(dateUntil).subtract(1, 'week') : null,\n )\n }\n >\n \n \n \n onChangeDate(\n moment(currentWeek).subtract(1, 'week'),\n moment(currentWeekEnd).subtract(1, 'week'),\n )\n }\n >\n \n \n onChangeDate(moment(currentWeek), moment(currentWeekEnd))}\n >\n \n \n \n onChangeDate(\n moment(dateFrom).add(1, 'week'),\n dateUntil ? moment(dateUntil).add(1, 'week') : null,\n )\n }\n >\n \n \n
    \n
    \n
    \n
    \n \n onChangeDate(\n moment(dateFrom).subtract(1, 'month'),\n dateUntil\n ? dateUntilLastDay\n ? moment(dateUntil)\n .subtract(5, 'day')\n .subtract(1, 'month')\n .endOf('month')\n : moment(dateUntil).subtract(1, 'month')\n : null,\n )\n }\n >\n \n \n \n onChangeDate(\n moment(currentMonth).subtract(1, 'month'),\n moment(currentMonth)\n .subtract(1, 'month')\n .endOf('month'),\n )\n }\n >\n \n \n onChangeDate(moment(currentMonth), moment(currentMonthEnd))}\n >\n \n \n \n onChangeDate(\n moment(dateFrom).add(1, 'month'),\n dateUntil\n ? dateUntilLastDay\n ? moment(dateUntil)\n .subtract(5, 'day')\n .add(1, 'month')\n .endOf('month')\n : moment(dateUntil).add(1, 'month')\n : null,\n )\n }\n >\n \n \n
    \n
    \n \n );\n}\n\nexport default HoursPerEmployeeReportPeriods;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { FaUndo } from 'react-icons/fa';\n\nimport { FormattedMessage, injectIntl } from 'react-intl';\nimport classnames from 'classnames';\nimport moment from 'moment';\nimport momentPropTypes from 'react-moment-proptypes';\nimport Toggle from 'react-toggle';\n\nimport intlShape from '@/shared/utils/intlShape';\nimport SimpleDatePicker from '@/shared/components/input/SimpleDatePicker';\nimport { hasMultipleCompanies } from '@/shared/components/security/HasMultiCompany';\nimport CompanyMultiSelect from '@/shared/components/input/multiselect/CompanyMultiSelect';\nimport TeamMultiSelect from '@/shared/components/input/multiselect/TeamMultiSelect';\nimport UserSearch from '@/shared/components/input/UserSearch';\nimport ResourceTypeButtonGroup from '@/shared/components/ResourceTypeButtonGroup';\nimport AuthService from '@/shared/services/AuthService';\nimport EmployeeTagMultiSelect from '@/modules/hrm/EmployeeTagMultiSelect';\n\nimport { isBeforeMinimum, isOutRange } from '@/shared/utils/validationHelpers';\nimport EnumSelectV2 from '@/shared/components/input/EnumSelectV2';\nimport Periods from './HoursPerEmployeeReportPeriods';\n\nimport messages from '../reportingMessages';\nimport dateFormatService from '../../../shared/services/DateFormatService';\n\nconst getMaxDateUntil = (groupBy, dateFrom) => {\n switch (groupBy) {\n case 1:\n case 2:\n return moment.utc(dateFrom).add(1, 'month').subtract(1, 'day');\n case 3:\n return moment.utc(dateFrom).add(1, 'year').subtract(1, 'day');\n case 4:\n return moment.utc(dateFrom).add(20, 'year').subtract(1, 'day');\n default:\n return null;\n }\n};\n// https://github.com/airbnb/react-dates/issues/239#issuecomment-458297507\n\nexport const defaultFilters = {\n groupBy: 1,\n dateFrom: moment.utc().startOf('month'),\n dateUntil: null,\n ownCompanies: [],\n userId: null,\n resourceTypes: [],\n teamCodes: [],\n employeeType: null,\n onlyWithMissingHours: false,\n withEmployeeLabels: [],\n};\n\nconst groupByButtons = [\n { key: 1, label: messages.GroupByDay },\n { key: 2, label: messages.GroupByWeek },\n { key: 3, label: messages.GroupByMonth },\n { key: 4, label: messages.GroupByYear },\n];\n\nclass HoursPerEmployeeReportFilters extends Component {\n static propTypes = {\n onFilterChange: PropTypes.func.isRequired,\n filters: PropTypes.shape({\n groupBy: PropTypes.number,\n dateFrom: momentPropTypes.momentObj,\n dateUntil: momentPropTypes.momentObj,\n ownCompanies: PropTypes.arrayOf(PropTypes.string),\n resourceTypes: PropTypes.arrayOf(PropTypes.number),\n teamCodes: PropTypes.arrayOf(PropTypes.number),\n userId: PropTypes.string,\n employeeType: PropTypes.number,\n onlyWithMissingHours: PropTypes.bool,\n withEmployeeLabels: PropTypes.arrayOf(PropTypes.string),\n }),\n intl: intlShape.isRequired,\n };\n static defaultProps = {\n filters: defaultFilters,\n };\n state = {\n showUsers: false,\n };\n constructor(props) {\n super(props);\n this.state.showUsers = AuthService.hasPermission({\n functionality: 'RegistrationOthers',\n privilege: 'Read',\n });\n }\n\n filterChanged = (filter) => {\n const { filters, onFilterChange } = this.props;\n const newFilters = { ...filters, ...filter };\n if (newFilters.dateFrom && newFilters.dateUntil) {\n newFilters.dateUntil = moment.min(\n newFilters.dateUntil,\n getMaxDateUntil(newFilters.groupBy, newFilters.dateFrom),\n );\n }\n\n if (JSON.stringify(filters) !== JSON.stringify(newFilters)) onFilterChange(newFilters);\n };\n dateChanged = (dateFrom, dateUntil) => {\n this.filterChanged({ dateFrom, dateUntil });\n };\n\n fromDateChanged = (dateFrom) => {\n this.filterChanged({ dateFrom });\n };\n untilDateChanged = (dateUntil) => {\n this.filterChanged({ dateUntil });\n };\n groupByChanged = (group) => {\n const { filters } = this.props;\n const newFilters = { groupBy: group };\n\n switch (group) {\n case 4: {\n newFilters.dateFrom = moment.utc(filters.dateFrom).startOf('year').subtract(5, 'year');\n newFilters.dateUntil = moment.utc().endOf('year');\n break;\n }\n case 3: {\n if (filters.groupBy === 4) {\n newFilters.dateFrom = moment.utc().startOf('year');\n newFilters.dateUntil = moment.utc().endOf('year');\n } else {\n newFilters.dateUntil = moment.utc(filters.dateFrom).add(1, 'year').subtract(1, 'day');\n }\n break;\n }\n case 1:\n case 2: {\n if (filters.groupBy > 2) {\n newFilters.dateFrom = moment.utc().startOf('month');\n newFilters.dateUntil = moment.utc().endOf('month');\n }\n break;\n }\n default:\n break;\n }\n\n this.filterChanged(newFilters);\n };\n resetFilters = () => {\n this.filterChanged({ ...defaultFilters });\n };\n userChanged = (item) => {\n this.filterChanged({\n userId: (item && item.id) || null,\n });\n };\n\n render() {\n const { filters, intl } = this.props;\n const { showUsers } = this.state;\n\n const showCompanies = hasMultipleCompanies();\n\n const hasFilters = JSON.stringify(filters) !== JSON.stringify(defaultFilters);\n const maxDateUntil = getMaxDateUntil(filters.groupBy, filters.dateFrom);\n\n return (\n
    \n
    \n
    \n
    \n \n
    \n {groupByButtons.map(({ key, label }) => (\n this.groupByChanged(key)}\n type=\"button\"\n >\n {intl.formatMessage(label)}\n \n ))}\n
    \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n \n isOutRange(d, filters.dateFrom, maxDateUntil)}\n displayFormat={dateFormatService.dateFormat()}\n />\n
    \n
    \n
    \n \n
    \n
    \n\n
    \n {showUsers && (\n
    \n
    \n \n
    \n
    \n )}\n {showCompanies && (\n
    \n
    \n this.filterChanged({ ownCompanies: companies })}\n />\n
    \n
    \n )}\n
    \n
    \n {\n this.filterChanged({ resourceTypes: value });\n }}\n />\n
    \n
    \n
    \n
    \n this.filterChanged({ teamCodes: value })}\n idProp=\"code\"\n />\n
    \n
    \n {showUsers && (\n <>\n
    \n
    \n {\n this.filterChanged({ employeeType: value });\n }}\n />\n
    \n
    \n
    \n
    \n this.filterChanged({ withEmployeeLabels })}\n placeholder={intl.formatMessage(messages.WithEmployeeTags)}\n />\n
    \n
    \n
    \n \n
    \n \n )}\n {hasFilters && (\n
    \n \n \n  \n \n \n
    \n )}\n
    \n
    \n );\n }\n}\n\nexport default injectIntl(HoursPerEmployeeReportFilters);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\n\nconst HoursPerEmployeeReportDetailRow = ({\n userId,\n type,\n values,\n total,\n label,\n columns,\n toggleResources,\n showResources,\n}) => {\n const toggleFunction = toggleResources;\n\n return (\n \n \n {toggleResources ? (\n \n \n \n ) : null}\n {label}\n \n {columns.map(col => {\n const value = values[col.groupNr];\n return (\n \n {!value && value !== 0 ? null : value.minuteToTime()}\n \n );\n })}\n \n {total.minuteToTime()}\n \n \n );\n};\nHoursPerEmployeeReportDetailRow.propTypes = {\n userId: PropTypes.string.isRequired,\n type: PropTypes.number.isRequired,\n total: PropTypes.number.isRequired,\n values: PropTypes.shape({}),\n label: PropTypes.node,\n columns: PropTypes.arrayOf(PropTypes.shape({})),\n toggleResources: PropTypes.func,\n showResources: PropTypes.bool,\n};\nHoursPerEmployeeReportDetailRow.defaultProps = {\n values: {},\n label: null,\n columns: [],\n toggleResources: undefined,\n showResources: false,\n};\n\nexport default HoursPerEmployeeReportDetailRow;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport { Dropdown, MenuItem } from 'react-bootstrap';\nimport { FormattedMessage } from 'react-intl';\nimport { FaCouch, FaFillDrip, FaHome, FaRegClock, FaSun } from 'react-icons/fa';\nimport momentPropTypes from 'react-moment-proptypes';\n\nimport intlShape from '@/shared/utils/intlShape';\nimport HoverToggle from '@/shared/components/HoverToggle';\nimport { stateServicePropType } from '@/shared/services/StateService';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport AuthService from '@/shared/services/AuthService';\nimport { canCreateRegistrationForUser } from '@/shared/components/registration/registrationHelpers';\nimport messages from '../reportingMessages';\n\nconst HoursPerEmployeeReportDropdown = ({\n value,\n startDate,\n endDate,\n userId,\n groupNr,\n groupBy,\n stateService,\n onAddRegistration,\n onToggleDetails,\n onChangeToDayView,\n onUpdateHomeWorkingHours,\n onOpenFillGapsRegistrationModal,\n missing,\n expected,\n homeWorking,\n hasDetails,\n intl,\n}) => {\n const currentUserId = AuthService.getUserId();\n const canCreateRegistration = canCreateRegistrationForUser(userId);\n const canSetHomeWorkingHours =\n groupBy === 1 &&\n hasDetails &&\n (currentUserId === userId ||\n AuthService.hasPermission({ functionality: 'Users', privilege: 'Updates' }));\n return (\n \n \n \n \n {!value && (value !== 0 || (hasDetails && expected === 0)) ? null : value.minuteToTime()}\n \n \n {homeWorking ? (\n \n ) : null}\n {missing ? (\n \n ) : null}\n \n\n \n \n stateService.gotoRegistrationOverview({\n userId,\n dateFrom: startDate,\n dateUntil: endDate,\n period: 'all',\n })\n }\n >\n \n \n
    \n {groupBy > 1 ? (\n onChangeToDayView(startDate, endDate)}>\n \n \n \n ) : null}\n {canCreateRegistration ? (\n onAddRegistration({ type: 0, userId, date: startDate })}\n >\n \n \n \n ) : null}\n {canCreateRegistration ? (\n onAddRegistration({ type: 3, userId, date: startDate })}\n >\n \n \n \n ) : null}\n {canCreateRegistration && DataCacheService.timeTablesEnabled() ? (\n onAddRegistration({ type: 4, userId, date: startDate })}\n >\n \n \n \n ) : null}\n {canCreateRegistration && hasDetails && missing > 0 ? (\n onOpenFillGapsRegistrationModal(0)}>\n \n \n \n ) : null}\n {canCreateRegistration && hasDetails && missing > 0 ? (\n onOpenFillGapsRegistrationModal(4)}>\n \n \n \n ) : null}\n {canSetHomeWorkingHours && expected > 0 && homeWorking !== expected && (\n onUpdateHomeWorkingHours(userId, startDate, expected)}\n >\n \n \n \n )}\n {canSetHomeWorkingHours && homeWorking > 0 && (\n onUpdateHomeWorkingHours(userId, startDate, 0)}>\n \n \n \n )}\n \n \n \n );\n};\n\nHoursPerEmployeeReportDropdown.propTypes = {\n value: PropTypes.number,\n startDate: momentPropTypes.momentObj,\n endDate: momentPropTypes.momentObj,\n userId: PropTypes.string.isRequired,\n groupNr: PropTypes.number.isRequired,\n groupBy: PropTypes.number.isRequired,\n stateService: stateServicePropType.isRequired,\n onAddRegistration: PropTypes.func.isRequired,\n onToggleDetails: PropTypes.func.isRequired,\n onChangeToDayView: PropTypes.func.isRequired,\n onUpdateHomeWorkingHours: PropTypes.func.isRequired,\n onOpenFillGapsRegistrationModal: PropTypes.func.isRequired,\n missing: PropTypes.number,\n expected: PropTypes.number,\n homeWorking: PropTypes.number,\n hasDetails: PropTypes.bool,\n intl: intlShape.isRequired,\n};\nHoursPerEmployeeReportDropdown.defaultProps = {\n value: 0,\n startDate: null,\n endDate: null,\n missing: 0,\n expected: 0,\n homeWorking: 0,\n hasDetails: false,\n};\nexport default HoursPerEmployeeReportDropdown;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { FaFileExcel } from 'react-icons/fa';\nimport MenuItem from 'react-bootstrap/lib/MenuItem';\nimport DropdownButton from 'react-bootstrap/lib/DropdownButton';\nimport { SpinnerIcon } from '@/shared/components/Icons';\nimport intlShape from '@/shared/utils/intlShape';\nimport messages from '../reportingMessages';\n\nconst ExportToExcelDropdown = ({ exporting, createExcel, intl }) => (\n \n {exporting ? : }\n {intl.formatMessage(messages.ExportToExcel)}\n \n }\n >\n createExcel(false)} id=\"excel-export-button-bla\">\n \n \n \n {intl.formatMessage(messages.ExportToExcel)}\n \n createExcel(true)} id=\"excel-export-button-bla\">\n \n \n \n {intl.formatMessage(messages.ExportDetailsToExcel)}\n \n \n);\nExportToExcelDropdown.propTypes = {\n intl: intlShape.isRequired,\n createExcel: PropTypes.func.isRequired,\n exporting: PropTypes.bool,\n};\nExportToExcelDropdown.defaultProps = {\n exporting: false,\n};\n\nexport default ExportToExcelDropdown;\n","import React, { Component } from 'react';\nimport Axios from 'axios';\nimport classnames from 'classnames';\nimport { FaFileExcel, FaFillDrip, FaCouch, FaPlus, FaSun } from 'react-icons/fa';\nimport { Dropdown, MenuItem } from 'react-bootstrap';\n\nimport intlShape from '@/shared/utils/intlShape';\nimport SimplePanel from '@/shared/components/SimplePanel';\nimport { FormattedMessage, injectIntl } from 'react-intl';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport moment from 'moment';\nimport LoadingAnimation from '@/shared/components/LoadingAnimation';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport { showWhenPermission } from '@/shared/components/security';\nimport Button from '@/shared/components/Button';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport SignalRService from '@/shared/services/SignalRService';\nimport ToastrService from '@/shared/services/ToastrService';\nimport AddRegistrationDropdownButton from './AddRegistrationDropdownButton';\nimport { CanCreate } from '@/shared/components/security';\nimport AuthService from '@/shared/services/AuthService';\nimport RegistrationModal from '@/shared/components/registration/RegistrationModal';\nimport {\n absenceRegistrationOptions,\n canCreateRegistrationForUser,\n} from '@/shared/components/registration/registrationHelpers';\nimport { getResourceName } from '@/shared/components/ResourceName';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport FillGapsRegistrationModal from '@/shared/components/registration/FillGapsRegistrationModal';\nimport HoverToggle from '@/shared/components/HoverToggle';\nimport { injectStateService, stateServicePropType } from '@/shared/services/StateService';\nimport dateFormatService from '@/shared/services/DateFormatService';\nimport HoursPerEmployeeReportHomeWorkingRow from './HoursPerEmployeeReportHomeWorkingRow';\nimport messages from '../reportingMessages';\nimport HoursPerEmployeeReportFilters, { defaultFilters } from './HoursPerEmployeeReportFilters';\nimport HoursPerEmployeeReportDetailRow from './HoursPerEmployeeReportDetailRow';\nimport HoursPerEmployeeReportCell from './HoursPerEmployeeReportCell';\nimport FormattedDateShort from '../../../shared/components/FormattedDateShort';\n\nconst SessionStorageKey = 'HoursPerEmployeeReportParams';\n\nconst resourceTypesForDetailType = {\n 1: [0], // Work\n 2: [3], // Absence\n 3: [4], // Recup\n};\n\nclass HoursPerEmployeeReportContainer extends Component {\n state = {\n reportFilters: {},\n report: null,\n showDetails: {},\n showResources: {},\n resources: {},\n showRegistrationModal: null,\n showFillGapsRegistrationModal: null,\n };\n\n constructor(props) {\n super(props);\n const { searchParams = {} } = props;\n const sessionParams = JSON.parse(sessionStorage.getItem(SessionStorageKey)) || {};\n\n if (sessionParams.dateFrom) {\n sessionParams.dateFrom = moment(sessionParams.dateFrom);\n }\n if (sessionParams.dateUntil) {\n sessionParams.dateUntil = moment(sessionParams.dateUntil);\n }\n this.hasUpdateUsersPermission = AuthService.hasPermission({\n functionality: 'Users',\n privilege: 'Update',\n });\n this.currentUserId = AuthService.getUserId();\n\n this.state = {\n ...this.state,\n reportFilters: {\n ...defaultFilters,\n ...sessionParams,\n ...searchParams,\n },\n };\n }\n\n componentDidMount() {\n this.retrieve();\n SignalRService.subscribe('yearTimeTableUpdated', this.handleYearTimeTableUpdatedEvent);\n }\n\n componentWillUnmount() {\n SignalRService.unsubscribe('yearTimeTableUpdated', this.handleYearTimeTableUpdatedEvent);\n if (typeof this.reportToken !== typeof undefined) {\n this.reportToken.cancel('Operation canceled due to leaving page.');\n }\n }\n\n getParams() {\n const { reportFilters } = this.state;\n const {\n groupBy,\n dateFrom: from,\n dateUntil: until,\n ownCompanies,\n userId = null,\n resourceTypes,\n teamCodes,\n employeeType,\n onlyWithMissingHours,\n withEmployeeLabels,\n } = reportFilters;\n\n return {\n groupBy,\n from,\n until,\n ownCompanies,\n userId,\n resourceTypes,\n teamCodes,\n employeeType,\n onlyWithMissingHours,\n withEmployeeLabels,\n };\n }\n\n retrieve() {\n const { reportFilters } = this.state;\n const { intl } = this.props;\n\n const params = this.getParams();\n if (!params.from) {\n ToastrService.error(intl.formatMessage(messages.DateFromRequired));\n return;\n }\n\n const sessionParams = JSON.stringify(reportFilters);\n sessionStorage.setItem(SessionStorageKey, sessionParams);\n\n if (typeof this.reportToken !== typeof undefined) {\n this.reportToken.cancel('Operation canceled due to new request.');\n }\n this.reportToken = Axios.CancelToken.source();\n\n return api.base\n .post(`${config.appUrls.reporting}/api/registeredhoursperemployee`, params, {\n cancelToken: this.reportToken.token,\n })\n .then(({ data: { columns = [], rows = [], total = 0, totalRemainingOvertime = 0 } = {} }) => {\n this.setState(state => ({\n ...state,\n report: {\n columns: columns.map(({ startDate, endDate, ...col }) => ({\n ...col,\n startDate: moment.utc(startDate),\n endDate: moment.utc(endDate),\n name: col.name.replace('/', dateFormatService.delimiter()),\n })),\n rows,\n total,\n totalRemainingOvertime,\n },\n showResources: {},\n resources: {},\n }));\n return true;\n })\n .catch(error => {\n if (!Axios.isCancel(error)) {\n ToastrService.error();\n }\n });\n }\n\n handleYearTimeTableUpdatedEvent = eventParams => {\n const { userId, dateFrom, dateUntil } = eventParams;\n if (!userId) return;\n const { report, reportFilters } = this.state;\n if (moment.utc(dateUntil).isBefore(moment.utc(reportFilters.dateFrom))) return;\n if (!reportFilters.dateUntil) {\n if (moment.utc(dateFrom).isAfter(moment.utc(reportFilters.dateFrom).add(1, 'month'))) return;\n } else if (moment.utc(dateFrom).isAfter(moment.utc(reportFilters.dateUntil))) return;\n if (!report || !report.rows || report.rows.findIndex(r => r.userId === userId) < 0) return;\n\n this.retrieve();\n };\n\n createExcelReport = () => {\n const { intl } = this.props;\n\n const reportParams = this.getParams();\n const languageCode = intl.locale;\n const params = {\n language: languageCode,\n signalRConnectionId: SignalRService.getConnectionId(),\n report: 2,\n parameters: JSON.stringify(reportParams),\n };\n\n return api.base\n .post(`${config.appUrls.reporting}/api/export`, params)\n .then(() => {\n ToastrService.info(intl.formatMessage(messages.ExportToExcelStarted));\n })\n .catch(error => {\n handleHttpError(intl)(error);\n });\n };\n updateHomeWorkingHours = (userId, date, value) => {\n const params = {\n userId,\n date,\n homeWorkingMinutes: value,\n };\n return api.base\n .post(`${config.appUrls.api}/api/Employee/HomeWorking`, params)\n .then(({ data }) => {\n this.setState(({ report }) => {\n const col = report.columns.find(x => x.startDate === date);\n\n return {\n report: {\n ...report,\n rows: report.rows.map(x => {\n if (x.userId !== userId) return x;\n\n const homeWorking = { ...x.homeWorking, [col.groupNr]: data };\n if (data === 0) delete homeWorking[col.groupNr];\n return {\n ...x,\n homeWorking,\n totalHomeWorking: Object.keys(homeWorking).reduce(\n (sum, key) => sum + (homeWorking[key] || 0),\n 0,\n ),\n };\n }),\n },\n };\n });\n\n // if (data === params.HomeWorkingMinutes) this.retrieve();\n });\n };\n\n filtersChanged(filters) {\n this.setState(\n state => ({\n ...state,\n reportFilters: {\n ...state.reportFilters,\n ...filters,\n },\n report: null,\n }),\n () => this.retrieve(),\n );\n }\n\n renderMonth = date => {\n const { intl } = this.props;\n const month = date.month() + 1; // moment month is 0-index based\n return `${intl.formatMessage(listItemMsg('month', month))} ${date.year()}`;\n };\n\n renderHeaderLabel = (column, groupBy) => {\n switch (groupBy) {\n case 3:\n return this.renderMonth(column.startDate);\n default:\n return column.name;\n }\n };\n toggleDetails = ({ userId, hasDetails }, event) => {\n if (!hasDetails) return;\n if (event.defaultPrevented) return; // Probably dropdown\n this.setState(({ showDetails }) => ({\n showDetails: { ...showDetails, [userId]: !showDetails[userId] },\n }));\n };\n getDateRange = () => {\n const { reportFilters, report } = this.state;\n let { dateFrom, dateUntil } = reportFilters;\n if (!dateFrom && report && report.columns) {\n const [firstCol] = report.columns;\n if (firstCol) {\n dateFrom = moment.utc(firstCol.endDate);\n }\n }\n if (!dateUntil && report && report.columns) {\n const [lastCol] = report.columns.slice(-1);\n if (lastCol) {\n dateUntil = moment.utc(lastCol.endDate);\n }\n }\n return { dateFrom, dateUntil };\n };\n openRegistrationModal = ({ type, userId, date }) => {\n this.setState({\n showRegistrationModal: {\n registration: { type, userId, date: moment.utc(date).toDate() },\n registrationOptions: type === 3 || type === 4 ? absenceRegistrationOptions : {},\n },\n });\n };\n\n openFillGapsRegistrationModal = ({\n type = null,\n userId = null,\n dateFrom: argDateFrom,\n dateUntil: argDateUntil,\n remainingOvertime = null,\n } = {}) => {\n let dateFrom = argDateFrom ? moment.utc(argDateFrom) : null;\n let dateUntil = argDateUntil ? moment.utc(argDateUntil) : null;\n\n if (!dateFrom && !dateUntil) {\n ({ dateFrom, dateUntil } = this.getDateRange());\n const today = moment.utc().startOf('day');\n if (dateFrom.isBefore(today) && dateUntil.isAfter(today)) dateUntil = today;\n }\n const registration = { type, userId };\n // If there is remaining overtime, set the registration type to recup\n if (type === null && remainingOvertime !== null && remainingOvertime > 0) registration.type = 4;\n\n this.setState({\n showFillGapsRegistrationModal: {\n registration,\n dateFrom,\n dateUntil,\n userId,\n remainingOvertime,\n },\n });\n };\n changeToDayView = (dateFrom, dateUntil) => {\n this.filtersChanged({\n groupBy: 1,\n dateFrom: moment.utc(dateFrom),\n dateUntil: moment.utc(dateUntil),\n });\n };\n\n toggleResourceDetails = (type, userId) => {\n this.setState(({ showResources, resources }) => {\n const key = `${type};${userId}`;\n const currentValue = !!showResources[key];\n if (!currentValue && typeof resources[key] === 'undefined') {\n this.retrieveResourceDetails(type, userId);\n return {\n showResources: { ...showResources, [key]: !currentValue },\n resources: { ...resources, [key]: null },\n };\n }\n return {\n showResources: { ...showResources, [key]: !currentValue },\n };\n });\n };\n retrieveResourceDetails = (type, userId) => {\n const { intl } = this.props;\n\n const reportParams = this.getParams();\n const params = {\n ...reportParams,\n userId,\n resourceTypes: resourceTypesForDetailType[type],\n };\n\n return api.base\n .post(`${config.appUrls.reporting}/api/registeredhoursperemployeeperresource`, params)\n .then(({ data }) => {\n const key = `${type};${userId}`;\n\n const resourceData = (data ? data.rows : null || [])\n .map(x => ({\n ...x,\n label: getResourceName(intl, x),\n }))\n .sort(dynamicSort('label'));\n\n this.setState(({ resources }) => ({\n resources: { ...resources, [key]: resourceData },\n }));\n })\n .catch(error => {\n handleHttpError(intl)(error);\n });\n };\n\n renderResourceDetails = (type, userId) => {\n const { resources, showResources, report } = this.state;\n const sharedProps = { userId, columns: report.columns };\n const key = `${type};${userId}`;\n if (!showResources[key]) return [];\n if (!resources[key]) return [];\n if (resources[key].length <= 0) return [];\n return resources[key].map(({ id, label, values, total }) => (\n \n ));\n };\n\n renderDetails = row => {\n if (!row || !row.hasDetails) return null;\n const { report, showResources, reportFilters } = this.state;\n const { intl } = this.props;\n const sharedProps = { userId: row.userId, columns: report.columns };\n const isCurrentUser = row.userId === this.currentUserId;\n const canEditHomeWorking =\n reportFilters.groupBy === 1 && (isCurrentUser || this.hasUpdateUsersPermission);\n\n const detailsRows = [\n ,\n this.toggleResourceDetails(1, row.userId)}\n showResources={!!showResources[`1;${row.userId}`]}\n {...sharedProps}\n />,\n ...this.renderResourceDetails(1, row.userId),\n ];\n\n if (row.totalAbsence > 0) {\n detailsRows.push(\n this.toggleResourceDetails(2, row.userId)}\n showResources={!!showResources[`2;${row.userId}`]}\n {...sharedProps}\n />,\n ...this.renderResourceDetails(2, row.userId),\n );\n }\n if (row.totalRecuperation > 0)\n detailsRows.push(\n this.toggleResourceDetails(3, row.userId)}\n showResources={!!showResources[`3;${row.userId}`]}\n {...sharedProps}\n />,\n ...this.renderResourceDetails(3, row.userId),\n );\n // detailsRows.push(\n // ,\n // );\n // if (row.totalFilledIn !== row.totalCappedFilledIn)\n // detailsRows.push(\n // ,\n // );\n if (row.totalMissing > 0)\n detailsRows.push(\n ,\n );\n if (row.totalOvertime > 0)\n detailsRows.push(\n ,\n );\n if (row.totalOvertimeCorrection !== 0)\n detailsRows.push(\n ,\n );\n if (\n row.totalRemainingOvertimePeriod !== 0 ||\n (row.remainingOvertimePeriod && Object.keys(row.remainingOvertimePeriod).length > 0)\n )\n detailsRows.push(\n ,\n );\n\n if (row.totalHomeWorking !== 0 || canEditHomeWorking) {\n if (canEditHomeWorking) {\n // Editable on day view\n detailsRows.push(\n ,\n );\n } else {\n detailsRows.push(\n ,\n );\n }\n }\n return detailsRows;\n };\n\n render() {\n const { intl, stateService } = this.props;\n const {\n reportFilters,\n report,\n showDetails,\n showRegistrationModal,\n showFillGapsRegistrationModal,\n } = this.state;\n const showRemainingOvertime =\n report && !!report.totalRemainingOvertime && report.totalRemainingOvertime !== 0;\n\n const totalRemainingOvertimePeriod =\n report && report.rows\n ? report.rows.reduce((sum, row) => sum + (row.totalRemainingOvertimePeriod || 0), 0)\n : 0;\n\n const dateRange = this.getDateRange();\n\n return (\n
    \n \n \n \n }\n >\n
    \n this.filtersChanged(filters)}\n />\n
    \n \n\n {report && report.rows && !!report.rows.length && (\n <>\n
    \n
    \n this.createExcelReport()}\n showProgress\n >\n \n \n \n {intl.formatMessage(messages.ExportToExcel)}\n \n
    \n
    \n \n \n \n \n {report.columns.map(col => (\n \n ))}\n \n {totalRemainingOvertimePeriod !== 0 && (\n \n )}\n {showRemainingOvertime && (\n \n )}\n \n \n {report.rows.map(row => {\n const toggleFunction = e => this.toggleDetails(row, e);\n const canCreateRegistration = canCreateRegistrationForUser(row.userId);\n return (\n \n \n \n {report.columns.map(col => {\n const value = row.values[col.groupNr];\n const expected = (row.expected && row.expected[col.groupNr]) || 0;\n const overtime = (row.overtime && row.overtime[col.groupNr]) || 0;\n const missing = (row.missing && row.missing[col.groupNr]) || 0;\n const homeWorking = (row.homeWorking && row.homeWorking[col.groupNr]) || 0;\n return (\n \n this.openFillGapsRegistrationModal({\n userId: row.userId,\n dateFrom: col.startDate,\n dateUntil: col.endDate,\n remainingOvertime: row.remainingOvertime,\n type,\n })\n }\n hasDetails={row.hasDetails}\n intl={intl}\n stateService={stateService}\n />\n );\n })}\n \n \n \n {row.total.minuteToTime()}\n\n \n \n stateService.gotoRegistrationOverview({\n userId: row.userId,\n dateFrom: dateRange.dateFrom,\n dateUntil: dateRange.dateUntil,\n period: 'all',\n })\n }\n >\n \n \n \n {canCreateRegistration && row.hasDetails && row.totalMissing > 0 ? (\n \n this.openFillGapsRegistrationModal({\n userId: row.userId,\n remainingOvertime: row.remainingOvertime,\n type: 0,\n })\n }\n >\n \n \n \n ) : null}\n {canCreateRegistration && row.hasDetails && row.totalMissing > 0 ? (\n \n this.openFillGapsRegistrationModal({\n userId: row.userId,\n remainingOvertime: row.remainingOvertime,\n type: 4,\n })\n }\n >\n \n \n \n ) : null}\n \n \n \n {totalRemainingOvertimePeriod !== 0 && (\n \n {row.totalRemainingOvertimePeriod.minuteToTime()}\n \n )}\n {showRemainingOvertime && (\n \n {row.remainingOvertime.minuteToTime()}\n \n )}\n \n {showDetails[row.userId] ? this.renderDetails(row) : null}\n \n );\n })}\n \n \n \n {report.columns.map(col => (\n \n {!col.total &&\n (col.total !== 0 ||\n (col.totalExpected !== null &&\n typeof col.totalExpected !== 'undefined' &&\n col.totalExpected === 0))\n ? null\n : col.total.minuteToTime()}\n \n ))}\n \n {totalRemainingOvertimePeriod !== 0 && (\n \n )}\n {showRemainingOvertime && (\n \n )}\n \n \n
    \n \n \n {this.renderHeaderLabel(col, reportFilters.groupBy)}\n \n \n \n \n \n \n
    \n {row.hasDetails && (\n \n \n \n )}\n {row.name}\n
    \n \n {report.total.minuteToTime()}{totalRemainingOvertimePeriod.minuteToTime()}{report.totalRemainingOvertime.minuteToTime()}
    \n \n )}\n {report && (!report.rows || !report.rows.length) && (\n
    \n \n
    \n )}\n {!report && }\n {showRegistrationModal && (\n \n this.setState({\n showRegistrationModal: null,\n })\n }\n onClose={() =>\n this.setState({\n showRegistrationModal: null,\n })\n }\n />\n )}\n {showFillGapsRegistrationModal && (\n \n this.setState({\n showFillGapsRegistrationModal: null,\n })\n }\n onClose={() =>\n this.setState({\n showFillGapsRegistrationModal: null,\n })\n }\n />\n )}\n
    \n );\n }\n}\n\nHoursPerEmployeeReportContainer.propTypes = {\n intl: intlShape.isRequired,\n stateService: stateServicePropType.isRequired,\n};\n\nexport default showWhenPermission(\n 'RegistrationOwn',\n 'read',\n)(injectStateService(injectIntl(HoursPerEmployeeReportContainer)));\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport moment from 'moment';\nimport momentPropTypes from 'react-moment-proptypes';\nimport { injectIntl, useIntl } from 'react-intl';\nimport isEqual from 'lodash-es/isEqual';\n\nimport intlShape from '@/shared/utils/intlShape';\nimport RelationSearch from '@/shared/components/input/RelationSearch';\nimport enumCache from '@/shared/services/EnumCacheService';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport InvoiceScheduleTypeMultiSelect from '@/shared/components/input/multiselect/InvoiceScheduleTypeMultiSelect';\nimport DelayedDateRangePicker from '@/shared/components/input/DelayedDateRangePicker';\nimport userStorage from '@/shared/services/userStorage';\n\nimport DynamicFilter, {\n getDynamicFiltersFromDefaultFilters,\n handleDynamicFiltersChanged,\n initDynamicFilters,\n resetDynamicFilters,\n} from '@/shared/components/DynamicFilter';\nimport SavedFiltersButton from '@/shared/components/SavedFiltersButton';\nimport config from '../../../config';\nimport api from '../../../shared/api';\n\nimport messages from '../reportingMessages';\n\nexport const defaultFilters = {\n relationId: null,\n relationName: null,\n invoiceStreamId: null,\n relationTypes: [],\n ownCompanies: [],\n assistant: null,\n responsible: null,\n associate: null,\n assistantBackup: null,\n billingUser: null,\n seniorUser: null,\n dateFrom: null,\n dateUntil: null,\n invoiceScheduleTypes: [], // Guid[]\n withLabels: [],\n withoutLabels: [],\n teamCodes: [],\n assignmentTemplateId: null,\n relationGroups: [],\n};\nconst allDynamicFilters = [\n ...getDynamicFiltersFromDefaultFilters(defaultFilters, 'invoiceScheduleTypes'),\n];\nconst dynamicFiltersStorageKey = 'InvoicingHistoryReportDynamicFilters';\n\nclass InvoicingHistoryFilters extends Component {\n state = {\n invoicingTypes: [],\n dynamicFilters: [],\n };\n\n static propTypes = {\n onFilterChange: PropTypes.func.isRequired,\n filters: PropTypes.shape({\n invoiceStreamId: PropTypes.string,\n relationTypes: PropTypes.arrayOf(PropTypes.number),\n ownCompanies: PropTypes.arrayOf(PropTypes.string),\n dateUntil: momentPropTypes.momentObj,\n dateFrom: momentPropTypes.momentObj,\n withLabels: PropTypes.arrayOf(PropTypes.string),\n withoutLabels: PropTypes.arrayOf(PropTypes.string),\n assistant: PropTypes.string,\n responsible: PropTypes.string,\n associate: PropTypes.string,\n assistantBackup: PropTypes.string,\n billingUser: PropTypes.string,\n seniorUser: PropTypes.string,\n teamCodes: PropTypes.arrayOf(PropTypes.number),\n invoiceScheduleTypes: PropTypes.arrayOf(PropTypes.string),\n relationGroups: PropTypes.arrayOf(PropTypes.string),\n assignmentTemplateId: PropTypes.string,\n }),\n intl: intlShape.isRequired,\n };\n static defaultProps = {\n filters: defaultFilters,\n };\n\n componentDidMount() {\n const { intl, filters } = this.props;\n\n const labelEndpoint = `${config.appUrls.api}/api/Resource/Tags`;\n Promise.all([api.base.get(labelEndpoint), enumCache.get('invoicingtype')]).then(\n ([{ data: labels }, invoicingtypes]) => {\n this.setState({\n invoicingTypes: [\n {\n key: -1,\n label: intl.formatMessage(messages.NoInvoicingSchedule),\n },\n ...invoicingtypes\n .map(x => ({\n key: x.key,\n label: intl.formatMessage(listItemMsg('invoicingtype', x.key, x.value)),\n }))\n .sort(dynamicSort('label')),\n ],\n labels: labels\n .map(x => ({ id: x.id, label: x.name, sort: x.name.toLowerCase() }))\n .sort(dynamicSort('sort')),\n dynamicFilters: initDynamicFilters(\n intl,\n allDynamicFilters,\n userStorage.getItem(dynamicFiltersStorageKey) || [],\n filters,\n defaultFilters,\n ),\n });\n },\n );\n }\n\n filterChanged = filter => {\n const { filters, onFilterChange } = this.props;\n const newFilters = { ...filters, ...filter };\n\n if (JSON.stringify(filters) !== JSON.stringify(newFilters)) onFilterChange(newFilters);\n };\n dynamicFilterChanged = (item, selected) => {\n this.setState(({ dynamicFilters }) => {\n const { filters } = this.props;\n const newFilters = handleDynamicFiltersChanged(\n dynamicFilters,\n item,\n selected,\n filters,\n defaultFilters,\n );\n userStorage.setItem(\n dynamicFiltersStorageKey,\n newFilters.filter(x => x.selected).map(x => x.id),\n );\n if (\n !selected &&\n item.id !== 'selectAll' &&\n !isEqual(filters[item.id], defaultFilters[item.id])\n ) {\n // Reset filter when it's removed\n this.filterChanged({ [item.id]: defaultFilters[item.id] });\n }\n return { dynamicFilters: newFilters };\n });\n };\n savedFilterChanged = filters => {\n const { onFilterChange } = this.props;\n const newFilters = { ...defaultFilters, ...filters };\n if (typeof newFilters.dateFrom === 'string') newFilters.dateFrom = moment.utc(filters.dateFrom);\n if (typeof newFilters.dateUntil === 'string')\n newFilters.dateUntil = moment.utc(filters.dateUntil);\n\n onFilterChange(newFilters);\n\n this.setState(({ dynamicFilters }) => ({\n dynamicFilters: resetDynamicFilters(dynamicFilters, newFilters, defaultFilters),\n }));\n };\n dateChanged = (dateFrom, dateUntil) => {\n this.filterChanged({ dateFrom, dateUntil });\n };\n setYear = year => {\n if (!year || year <= 0) {\n this.dateChanged(null, null);\n } else {\n this.dateChanged(moment.utc([year, 0, 1]), moment.utc([year, 11, 31]));\n }\n };\n\n relationChanged = item => {\n if (!item || !item.id) {\n this.filterChanged({ relationId: null, relationName: null, invoiceStreamId: null });\n } else {\n this.filterChanged({\n relationId: item.key,\n relationName: item.label,\n invoiceStreamId: null,\n });\n }\n };\n resetFilters = () => {\n this.filterChanged({ ...defaultFilters });\n };\n\n render() {\n const { invoicingTypes, labels, dynamicFilters } = this.state;\n const { filters, intl } = this.props;\n const initRelation = filters.relationId\n ? {\n key: filters.relationId,\n label: filters.relationName,\n invoiceStreamId: filters.invoiceStreamId,\n }\n : null;\n\n const selectedInvoicingType = filters.invoicingType\n ? invoicingTypes.find(x => x.key === filters.invoicingType)\n : null;\n const year = new Date().getFullYear();\n let selectedYear = !filters.dateFrom && !filters.dateUntil ? -1 : null;\n if (filters.dateFrom && filters.dateUntil) {\n if (\n moment(filters.dateFrom).isSame(\n moment(filters.dateFrom).startOf('year') &&\n moment(filters.dateUntil).isSame(moment(filters.dateUntil).endOf('year')),\n )\n ) {\n selectedYear = moment(filters.dateFrom).year;\n }\n }\n\n const emptyFrom = moment()\n .utc()\n .startOf('month')\n .subtract(1, 'year')\n .add(1, 'month');\n\n const visibleFilters = dynamicFilters.filter(x => x.selected).map(x => x.id);\n\n return (\n <>\n
    \n
    \n
    \n this.dateChanged(startDate, endDate)}\n startDatePlaceholderText={intl.formatMessage(messages.InvoiceDateFrom)}\n endDatePlaceholderText={intl.formatMessage(messages.InvoiceDateUntil)}\n block\n />\n
    \n
    \n
    \n
    \n
    \n this.setYear(-1)}\n type=\"button\"\n className={classnames('btn btn-default', {\n active: selectedYear === -1,\n })}\n >\n {emptyFrom.format('MM/YYYY')}\n →\n {moment().format('MM/YYYY')}\n \n this.setYear(year)}\n type=\"button\"\n className={classnames('btn btn-default', {\n active: selectedYear === year,\n })}\n >\n {year}\n \n this.setYear(year - 1)}\n type=\"button\"\n className={classnames('btn btn-default', {\n active: selectedYear === year - 1,\n })}\n >\n {year - 1}\n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n this.filterChanged({ invoiceScheduleTypes: items })}\n hideInvoicingVia\n />\n
    \n
    \n {visibleFilters && visibleFilters.length > 0\n ? visibleFilters.map(id => (\n \n ))\n : null}\n
    \n
    \n
    \n \n
    \n
    \n \n );\n }\n}\n\nexport default injectIntl(InvoicingHistoryFilters);\n","import React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport RelationName from '@/shared/components/RelationName';\nimport { mapAssignmentGroupName } from '@/shared/services/ObjectDisplayService';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport FormattedDateShort from '@/shared/components/FormattedDateShort';\nimport classnames from 'classnames';\nimport FormattedCurrency from '@/shared/components/FormattedCurrency';\nimport dateFormatService from '@/shared/services/DateFormatService';\nimport messages from '../reportingMessages';\n\nconst getRelationColumnValue = row => {\n const {\n relationId: id,\n relationDisplayName: name,\n relationType: type,\n relationCrm: crm,\n relationAlias: alias,\n relationIsActive: isActive,\n } = row;\n\n const relation = {\n id,\n name,\n type,\n crm,\n alias,\n isActive,\n };\n return ;\n};\nconst getAssignmentColumnValue = (row, intl) => {\n const { assignmentName, assignmentTemplateId } = row;\n return mapAssignmentGroupName(assignmentTemplateId, assignmentName, intl);\n};\n\nconst HoursColumn = ({ value, className } = {}) => (\n \n {!value && value !== 0 ? null : value.toTime()}\n \n);\nconst AmountColumn = ({ value, className } = {}) => (\n \n {!value && value !== 0 ? null : }\n \n);\nconst DateColumn = ({ value }) => (value ? : null);\n\nexport const getColumns = (intl, monthColumns, columnStatus, showAssignments, totals) => {\n const columns = [\n {\n Header: ,\n Footer: ,\n id: 'relation',\n accessor: originalRow => getRelationColumnValue(originalRow),\n isVisible: columnStatus.relation,\n minWidth: 70,\n },\n\n {\n Header: ,\n id: 'assignment',\n accessor: originalRow => getAssignmentColumnValue(originalRow, intl),\n isVisible: columnStatus.relation && showAssignments,\n minWidth: 70,\n },\n {\n Header: ,\n id: 'invoicingType',\n accessor: originalRow =>\n originalRow.invoicingScheduleId\n ? intl.formatMessage(\n listItemMsg(\n 'invoiceschedule',\n originalRow.invoicingScheduleId,\n originalRow.invoicingScheduleName,\n ),\n )\n : intl.formatMessage(messages.None),\n isVisible: columnStatus.invoicingType,\n },\n {\n Header: ,\n id: 'lastInvoiceDate',\n accessor: 'lastInvoiceDate',\n Cell: DateColumn,\n isVisible: columnStatus.lastInvoiceDate,\n width: 100,\n },\n {\n Header: ,\n id: 'nextScheduleDate',\n accessor: 'nextScheduleDate',\n Cell: DateColumn,\n isVisible: columnStatus.nextScheduleDate,\n width: 100,\n },\n {\n Header: ,\n id: 'nextScheduleAmount',\n accessor: 'scheduleAmount',\n Cell: AmountColumn,\n isVisible: columnStatus.nextScheduleAmount,\n align: 'right',\n width: 100,\n },\n {\n Header: ,\n id: 'fixedAmount',\n accessor: 'fixedAmount',\n Cell: AmountColumn,\n Footer: () => AmountColumn({ value: totals.totalFixedAmount }),\n isVisible: columnStatus.fixedAmount,\n align: 'right',\n width: 120,\n },\n {\n Header: ,\n id: 'draftAmount',\n accessor: 'draftAmount',\n Cell: AmountColumn,\n Footer: () => AmountColumn({ value: totals.totalDraftAmount }),\n isVisible: columnStatus.draftInvoiceAmount,\n align: 'right',\n width: 120,\n },\n {\n Header: ,\n id: 'potential',\n accessor: 'potential',\n Cell: AmountColumn,\n Footer: () => AmountColumn({ value: totals.totalPotential }),\n isVisible: columnStatus.potential,\n align: 'right',\n width: 120,\n },\n {\n Header: ,\n id: 'toInvoice',\n accessor: 'toInvoice',\n Cell: AmountColumn,\n Footer: () => AmountColumn({ value: totals.totalToInvoice }),\n isVisible: columnStatus.toInvoice,\n align: 'right',\n width: 120,\n },\n\n {\n Header: ,\n id: 'avgAmountPerHour',\n accessor: originalRow =>\n originalRow.toInvoiceHours === 0\n ? null\n : originalRow.toInvoice / originalRow.toInvoiceHours,\n Cell: AmountColumn,\n Footer: () =>\n AmountColumn({\n value:\n totals.totalToInvoiceHours === 0\n ? null\n : totals.totalToInvoice / totals.totalToInvoiceHours,\n }),\n isVisible: columnStatus.avgAmountPerHour,\n align: 'right',\n width: 100,\n },\n {\n Header: ,\n id: 'totalAmount',\n accessor: 'totalAmount',\n Cell: AmountColumn,\n Footer: () => AmountColumn({ value: totals.totalAmount }),\n isVisible: columnStatus.billedAmount,\n align: 'right',\n width: 120,\n },\n {\n Header: ,\n id: 'avgAmountPerHourBilled',\n accessor: originalRow =>\n originalRow.totalHours === 0 ? null : originalRow.totalAmount / originalRow.totalHours,\n Cell: AmountColumn,\n Footer: () =>\n AmountColumn({\n value: totals.totalHours === 0 ? null : totals.totalAmount / totals.totalHours,\n }),\n isVisible: columnStatus.avgAmountPerHourBilled,\n align: 'right',\n width: 100,\n },\n {\n Header: ,\n id: 'totalHoursAmount',\n accessor: originalRow => originalRow.toInvoiceHours + originalRow.totalHours,\n Cell: HoursColumn,\n Footer: () => HoursColumn({ value: totals.totalToInvoiceHours + totals.totalHours }),\n isVisible: columnStatus.totalHoursAmount,\n align: 'right',\n width: 100,\n },\n {\n Header: ,\n id: 'toInvoiceHours',\n accessor: 'toInvoiceHours',\n Cell: HoursColumn,\n Footer: () => HoursColumn({ value: totals.totalToInvoiceHours }),\n isVisible: columnStatus.toInvoiceHours,\n align: 'right',\n width: 100,\n },\n {\n Header: ,\n id: 'totalHours',\n accessor: 'totalHours',\n Cell: HoursColumn,\n Footer: () => HoursColumn({ value: totals.totalHours }),\n isVisible: columnStatus.billedHours,\n align: 'right',\n width: 100,\n },\n ...monthColumns.map((col, idx) => ({\n Header: (\n \n {col.month}\n {dateFormatService.delimiter()}\n {col.year}\n \n ),\n id: `${col.year}-${col.month}`,\n accessor: originalRow => originalRow.amounts && originalRow.amounts[idx],\n Cell: AmountColumn,\n Footer: () => AmountColumn({ value: col.totalAmount }),\n isVisible: columnStatus.months,\n align: 'right',\n width: 100,\n })),\n ];\n // Filter columns on isVisible columns\n return columns\n .map(x => {\n if (typeof x.isVisible !== 'undefined' && !x.isVisible) return null;\n if (typeof x.columns === 'undefined') return x;\n const subColumns = x.columns.filter(c => typeof c.isVisible === 'undefined' || !!c.isVisible);\n if (subColumns.length === 0) return null;\n return {\n ...x,\n columns: subColumns,\n };\n })\n .filter(Boolean);\n};\n\nexport const defaultColumn = {\n // When using the useFlexLayout:\n minWidth: 30, // minWidth is only used as a limit for resizing\n // width: 1, // width is used for both the flex-basis and flex-grow\n maxWidth: 200, // maxWidth is only used as a limit for resizing\n};\n","import React, { useCallback, useEffect, useMemo } from 'react';\nimport PropTypes from 'prop-types';\nimport { useBlockLayout, useTable } from 'react-table';\nimport {\n AutoSizer,\n CellMeasurer,\n CellMeasurerCache,\n List,\n WindowScroller,\n} from 'react-virtualized';\nimport { injectIntl } from 'react-intl';\n\nimport intlShape from '@/shared/utils/intlShape';\nimport { defaultColumn, getColumns } from './InvoicingHistoryHelpers';\n\nconst getStyles = (props, align = 'left') => [\n props,\n {\n style: {\n textAlign: align,\n },\n },\n];\nconst headerProps = (props, { column }) => getStyles(props, column.align);\nconst headerGroupProps = props => getStyles(props, 'center');\n\nconst cellProps = (props, { cell }) => getStyles(props, cell.column.align);\n\nconst cache = new CellMeasurerCache({\n defaultHeight: 37,\n minHeight: 37,\n fixedWidth: true,\n});\n\nconst InvoicingHistoryVirtualTable = ({\n data,\n monthColumns,\n intl,\n columnStatus,\n showAssignments,\n totals,\n}) => {\n const columns = useMemo(\n () => getColumns(intl, monthColumns, columnStatus, showAssignments, totals),\n [monthColumns, columnStatus, showAssignments, intl, totals],\n );\n const {\n getTableProps,\n getTableBodyProps,\n headerGroups,\n footerGroups,\n rows,\n prepareRow,\n totalColumnsWidth,\n } = useTable(\n {\n columns,\n data,\n defaultColumn,\n },\n useBlockLayout,\n );\n\n const RenderRow = React.useCallback(\n ({ index, style, parent, key }) => {\n const row = rows[index];\n prepareRow(row);\n return (\n \n \n {row.cells.map(cell => (\n
    \n {cell.render('Cell')}\n
    \n ))}\n \n
    \n );\n },\n [prepareRow, rows],\n );\n\n useEffect(() => {\n // Clear cached row heights when data changes\n cache.clearAll();\n }, [data]);\n\n const handleResize = useCallback(() => {\n // Clear cached row heights when window resizes\n cache.clearAll();\n }, []);\n\n return (\n
    [props, { className: 'table table-report' }])}>\n
    \n {headerGroups.map(headerGroup => (\n
    \n {headerGroup.headers.map(column => (\n
    \n {column.render('Header')}\n
    \n ))}\n
    \n ))}\n
    \n
    \n {footerGroups.map(group => (\n
    \n {group.headers.map(column => (\n
    \n {column.render('Footer')}\n
    \n ))}\n
    \n ))}\n
    \n \n {({ height, isScrolling, registerChild, scrollTop, onChildScroll }) => (\n
    \n \n
    \n )}\n
    \n
    \n );\n};\nInvoicingHistoryVirtualTable.propTypes = {\n data: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n monthColumns: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n columnStatus: PropTypes.shape({}).isRequired,\n totals: PropTypes.shape({}).isRequired,\n showAssignments: PropTypes.bool.isRequired,\n intl: intlShape.isRequired,\n};\nexport default injectIntl(InvoicingHistoryVirtualTable);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport Axios from 'axios';\nimport { FaCog } from 'react-icons/fa';\nimport intlShape from '@/shared/utils/intlShape';\nimport SimplePanel from '@/shared/components/SimplePanel';\nimport { FormattedMessage, injectIntl } from 'react-intl';\nimport moment from 'moment';\nimport LoadingAnimation from '@/shared/components/LoadingAnimation';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport { showWhenPermission } from '@/shared/components/security';\nimport { injectStateService } from '@/shared/services/StateService';\nimport Button from '@/shared/components/Button';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport { hasAssignments } from '@/shared/components/security/HasAssignments';\nimport CheckboxListModal from '@/shared/components/CheckboxListModal';\nimport userStorage from '@/shared/services/userStorage';\nimport SignalRService from '@/shared/services/SignalRService';\nimport ToastrService from '@/shared/services/ToastrService';\nimport ExportToExcelDropdown from '../registrationsPer/ExportToExcelDropdown';\nimport messages from '../reportingMessages';\n\nimport InvoicingHistoryFilters, { defaultFilters } from './InvoicingHistoryFilters';\nimport InvoicingHistoryVirtualTable from './InvoicingHistoryVirtualTable';\n\nconst SessionStorageKey = 'InvoicingHistoryReportParams';\nconst columnSelectionStorageKey = 'InvoicingHistoryReportHiddenColumns';\n\nconst columnDefinitions = [\n { id: 'relation', message: messages.Relation },\n { id: 'invoicingType', message: messages.InvoicingType },\n { id: 'lastInvoiceDate', message: messages.LastInvoiceDate },\n { id: 'nextScheduleDate', message: messages.NextScheduleDate },\n { id: 'nextScheduleAmount', message: messages.NextScheduleAmount },\n { id: 'fixedAmount', message: messages.FixedAmountOrAdvance },\n { id: 'draftInvoiceAmount', message: messages.DraftInvoiceAmount },\n { id: 'potential', message: messages.Potential },\n { id: 'toInvoice', message: messages.ToInvoice },\n { id: 'toInvoiceHours', message: messages.ToInvoiceHours },\n { id: 'avgAmountPerHour', message: messages.AvgAmountPerHour },\n { id: 'billedAmount', message: messages.BilledAmount },\n { id: 'billedHours', message: messages.BilledHours },\n { id: 'avgAmountPerHourBilled', message: messages.AvgAmountPerHourBilled },\n { id: 'months', message: messages.BilledPerMonth },\n { id: 'totalHoursAmount', message: messages.TotalHoursAmount },\n];\n\nclass InvoicingHistoryContainer extends Component {\n state = {\n reportFilters: {},\n rows: null,\n columns: null,\n totalAmount: 0,\n totalDraftAmount: 0,\n totalHours: 0,\n totalToInvoice: 0,\n totalToInvoiceHours: 0,\n totalPotential: 0,\n totalFixedAmount: 0,\n showAssignments: false,\n showColumnSelectionModal: false,\n hideableColumns: [],\n exporting: false,\n };\n\n constructor(props) {\n super(props);\n const { searchParams = {}, intl } = props;\n const sessionParams = JSON.parse(sessionStorage.getItem(SessionStorageKey)) || {};\n\n if (sessionParams.dateFrom) {\n sessionParams.dateFrom = moment(sessionParams.dateFrom);\n }\n if (sessionParams.dateUntil) {\n sessionParams.dateUntil = moment(sessionParams.dateUntil);\n }\n const hiddenColumns = userStorage.getItem(columnSelectionStorageKey) || [];\n const hideableColumns = columnDefinitions.map(({ id, message }) => ({\n id,\n label: intl.formatMessage(message),\n selected: hiddenColumns.indexOf(id) === -1,\n }));\n const columnStatus = hideableColumns.reduce((o, col) => {\n // eslint-disable-next-line no-param-reassign\n o[col.id] = !!col.selected;\n return o;\n }, {});\n this.state = {\n ...this.state,\n reportFilters: {\n ...defaultFilters,\n ...sessionParams,\n ...searchParams,\n },\n hideableColumns,\n columnStatus,\n };\n }\n\n componentDidMount() {\n this.retrieve();\n }\n\n componentWillUnmount() {\n if (typeof this.reportToken !== typeof undefined) {\n this.reportToken.cancel('Operation canceled due to leaving page.');\n }\n }\n\n getParams() {\n const { reportFilters } = this.state;\n const {\n relationId,\n invoiceStreamId,\n relationTypes,\n ownCompanies,\n responsible,\n assistant,\n associate,\n assistantBackup,\n billingUser,\n seniorUser,\n sliding,\n dateFrom,\n dateUntil,\n withLabels,\n withoutLabels,\n teamCodes,\n invoiceScheduleTypes,\n assignmentTemplateId,\n relationGroups,\n } = reportFilters;\n\n return {\n relationId,\n invoiceStreamId,\n relationTypes,\n ownCompanies,\n responsible,\n assistant,\n associate,\n assistantBackup,\n billingUser,\n seniorUser,\n sliding,\n dateFrom,\n dateUntil,\n withLabels,\n withoutLabels,\n teamCodes,\n invoiceScheduleTypes,\n assignmentTemplateId,\n relationGroups,\n };\n }\n\n retrieve() {\n const { reportFilters } = this.state;\n\n const params = this.getParams();\n\n const sessionParams = JSON.stringify(reportFilters);\n sessionStorage.setItem(SessionStorageKey, sessionParams);\n\n if (typeof this.reportToken !== typeof undefined) {\n this.reportToken.cancel('Operation canceled due to new request.');\n }\n this.reportToken = Axios.CancelToken.source();\n this.setState({ rows: null });\n return api.base\n .post(`${config.appUrls.reporting}/api/invoicingHistoryOverview`, params, {\n cancelToken: this.reportToken.token,\n })\n .then(({ data }) => {\n const {\n rows = [],\n months = [],\n totalAmount = 0,\n totalDraftAmount = 0,\n totalHours = 0,\n totalToInvoice = 0,\n totalPotential = 0,\n totalToInvoiceHours = 0,\n totalFixedAmount = 0,\n totalHoursAmount = 0,\n } = data || {};\n\n this.setState({\n rows,\n columns: months,\n totals: {\n totalAmount,\n totalDraftAmount,\n totalHours,\n totalToInvoice,\n totalPotential,\n totalToInvoiceHours,\n totalFixedAmount,\n totalHoursAmount,\n },\n\n showAssignments: hasAssignments() && rows.some(x => x.assignmentId),\n });\n })\n .catch(error => {\n if (!Axios.isCancel(error)) return error;\n });\n }\n\n createExcelReport = (isDetailsReport = false) => {\n this.setState({ exporting: true });\n const { intl } = this.props;\n\n const reportParams = { ...this.getParams(), isDetailsReport };\n const languageCode = intl.locale;\n\n const params = {\n language: languageCode,\n signalRConnectionId: SignalRService.getConnectionId(),\n report: 3,\n parameters: JSON.stringify(reportParams),\n isDetailsReport,\n };\n\n return api.base\n .post(`${config.appUrls.reporting}/api/export`, params)\n .then(() => {\n ToastrService.info(intl.formatMessage(messages.ExportToExcelStarted));\n })\n .catch(error => {\n handleHttpError(intl)(error);\n })\n .finally(() => {\n this.setState({ exporting: false });\n });\n };\n\n filtersChanged(filters) {\n this.setState(\n state => ({\n ...state,\n reportFilters: {\n ...state.reportFilters,\n ...filters,\n },\n }),\n () => this.retrieve(),\n );\n }\n\n handleColumnSelection = items => {\n let hiddenColumns = items.filter(x => !x.selected).map(x => x.id);\n // Clear selection if all are hidden or none are hidden\n if (hiddenColumns.length === items.length || hiddenColumns.length === 0) hiddenColumns = [];\n userStorage.setItem(columnSelectionStorageKey, hiddenColumns);\n\n const { hideableColumns } = this.state;\n\n const newHideableColumns = hideableColumns.map(x => ({\n ...x,\n selected: hiddenColumns.indexOf(x.id) === -1,\n }));\n const columnStatus = newHideableColumns.reduce((o, col) => {\n // eslint-disable-next-line no-param-reassign\n o[col.id] = !!col.selected;\n return o;\n }, {});\n\n this.setState({\n hideableColumns: newHideableColumns,\n columnStatus,\n showColumnSelectionModal: false,\n });\n };\n\n render() {\n const { intl } = this.props;\n const {\n reportFilters,\n rows,\n columns,\n totals,\n showAssignments,\n showColumnSelectionModal,\n hideableColumns,\n columnStatus,\n exporting,\n } = this.state;\n return (\n
    \n
    \n \n
    \n this.filtersChanged(filters)}\n />\n
    \n \n {rows ? (\n
    \n
    \n this.setState({ showColumnSelectionModal: true })}\n >\n \n \n \n \n \n {rows && rows.length > 0 && (\n \n )}\n
    \n
    \n ) : null}\n
    \n\n {rows ? (\n \n ) : (\n \n )}\n this.setState({ showColumnSelectionModal: false })}\n show={showColumnSelectionModal}\n />\n
    \n );\n }\n}\n\nInvoicingHistoryContainer.propTypes = {\n intl: intlShape.isRequired,\n searchParams: PropTypes.shape({ relationId: PropTypes.string }),\n};\n\nInvoicingHistoryContainer.defaultProps = {\n searchParams: {},\n};\n\nexport default showWhenPermission(\n 'InvoiceDraft',\n 'read',\n)(injectStateService(injectIntl(InvoicingHistoryContainer)));\n","import React, { Component } from 'react';\nimport { FaArrowCircleUp } from 'react-icons/fa';\n\nconst scrollTop = () => {\n window.scrollTo({ top: 0, behavior: 'smooth' });\n};\n\nclass ScrollArrow extends Component {\n state = {\n showScroll: false,\n };\n\n checkScrollTop = () => {\n const { showScroll } = this.state;\n if (!showScroll && window.pageYOffset > 400) {\n this.setState({ showScroll: true });\n } else if (showScroll && window.pageYOffset <= 400) {\n this.setState({ showScroll: false });\n }\n };\n componentDidMount() {\n window.addEventListener('scroll', this.checkScrollTop);\n }\n componentWillUnmount() {\n window.removeEventListener('scroll', this.checkScrollTop);\n }\n\n render() {\n const { showScroll } = this.state;\n return (\n \n );\n }\n}\n\nexport default ScrollArrow;\n","import React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport { defineMessages, FormattedMessage, injectIntl, useIntl } from 'react-intl';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport Tag from '@/shared/components/Tag';\nimport intlShape from '@/shared/utils/intlShape';\nimport HasFeature from '@/shared/components/security/HasFeature';\nimport AuthService from '@/shared/services/AuthService';\n\nconst messages = defineMessages({\n Relation: 'Relation',\n Assignment: 'Assignment',\n ResourceType: 'ResourceType',\n ResourceCategory: 'ResourceCategory',\n ResourceSubcategory: 'ResourceSubcategory',\n TaskTemplate: 'Task template',\n SubtaskTemplate: 'Subtask template',\n PlannedTask: 'Planned task',\n PlannedSubtask: 'Planned subtask',\n User: 'User',\n Year: 'Year',\n Month: 'Month',\n Date: 'Date',\n ReferenceYear: 'Reference year',\n OwnCompany: 'Own company',\n Details: 'Details',\n GroupBy: 'GroupBy',\n RemoveGroup: 'RemoveGroup',\n AddGroup: 'AddGroup',\n});\n\nclass GroupByFilter extends PureComponent {\n constructor(props) {\n super(props);\n const { intl } = props;\n const groups = [\n { id: 1, name: intl.formatMessage(messages.Relation) },\n { id: 2, name: intl.formatMessage(messages.Assignment) },\n { id: 3, name: intl.formatMessage(messages.ResourceType) },\n { id: 4, name: intl.formatMessage(messages.ResourceCategory) },\n { id: 5, name: intl.formatMessage(messages.ResourceSubcategory) },\n { id: 6, name: intl.formatMessage(messages.TaskTemplate) },\n { id: 8, name: intl.formatMessage(messages.User) },\n { id: 9, name: intl.formatMessage(messages.Year) },\n { id: 10, name: intl.formatMessage(messages.Month) },\n { id: 11, name: intl.formatMessage(messages.Date) },\n { id: 13, name: intl.formatMessage(messages.OwnCompany) },\n { id: 15, name: intl.formatMessage(messages.SubtaskTemplate) },\n { id: 99, name: intl.formatMessage(messages.Details) },\n ];\n if (AuthService.hasFeature('ReferenceYear'))\n groups.push({ id: 12, name: intl.formatMessage(messages.ReferenceYear) });\n\n this.state = {\n groups: groups.sort(dynamicSort('name')),\n };\n }\n\n removeGroup(item) {\n const { value, onChange } = this.props;\n\n const newValue = value.filter(x => x !== item.id);\n onChange(newValue);\n }\n\n addGroup(item) {\n if (!item) return;\n const { value = [], onChange } = this.props;\n if (value.indexOf(item.id) >= 0) return; // Already in list\n if (value.length === 0) {\n onChange([item.id]);\n return;\n }\n\n const detailsIdx = value.indexOf(99);\n if (detailsIdx < 0) {\n onChange([...value, item.id]);\n return;\n }\n // Has details\n const newValue = [\n ...value.slice(0, detailsIdx),\n ...value.slice(detailsIdx + 1),\n item.id,\n ...value.slice(detailsIdx, detailsIdx + 1),\n ];\n onChange(newValue);\n }\n\n render() {\n const { groups } = this.state;\n const { value, hidden = [], intl } = this.props;\n\n const visibleGroups =\n !hidden || !hidden.length ? groups : groups.filter(l => hidden.indexOf(l.id) < 0);\n const selectedGroups =\n !value || !value.length\n ? []\n : value.map(x => visibleGroups.find(l => l.id === x)).filter(l => l && l.id);\n\n const availableGroups =\n !value || !value.length ? visibleGroups : visibleGroups.filter(l => value.indexOf(l.id) < 0);\n\n const removeGroupTitle = intl.formatMessage(messages.RemoveGroup);\n\n return (\n
    \n {/* */}\n {availableGroups && availableGroups.length > 0 ? (\n // 0,\n // })}\n // >\n
    \n \n \n \n \n
    \n ) : null}\n \n {selectedGroups && selectedGroups.length > 0\n ? selectedGroups.map(l => (\n this.removeGroup(item)}\n />\n ))\n : null}\n
    \n );\n }\n}\n\nGroupByFilter.propTypes = {\n intl: intlShape.isRequired,\n value: PropTypes.arrayOf(PropTypes.number).isRequired,\n onChange: PropTypes.func.isRequired,\n hidden: PropTypes.arrayOf(PropTypes.number),\n};\nGroupByFilter.defaultProps = {\n hidden: [],\n};\nexport default injectIntl(GroupByFilter);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage, injectIntl, useIntl } from 'react-intl';\nimport moment from 'moment';\nimport momentPropTypes from 'react-moment-proptypes';\nimport Toggle from 'react-toggle';\nimport isEqual from 'lodash-es/isEqual';\nimport intlShape from '@/shared/utils/intlShape';\nimport Axios from 'axios';\n\nimport RelationSearch from '@/shared/components/input/RelationSearch';\nimport PeriodButtonGroup, {\n getPeriodStartEndDates,\n pastToPrevMonth,\n} from '@/shared/components/PeriodButtonGroup';\nimport ResourceTypeButtonGroup from '@/shared/components/ResourceTypeButtonGroup';\nimport UserSearch from '@/shared/components/input/UserSearch';\nimport DelayedDateRangePicker from '@/shared/components/input/DelayedDateRangePicker';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport userStorage from '@/shared/services/userStorage';\n\nimport DynamicFilter, {\n getDynamicFiltersFromDefaultFilters,\n handleDynamicFiltersChanged,\n initDynamicFilters,\n resetDynamicFilters,\n} from '@/shared/components/DynamicFilter';\nimport SavedFiltersButton from '@/shared/components/SavedFiltersButton';\nimport { CanRead } from '@/shared/components/security';\nimport GroupByFilter from './GroupByFilter';\nimport config from '../../../config';\nimport api from '../../../shared/api';\nimport messages from '../reportingMessages';\nimport ResourceMultiSelect from '@/shared/components/input/multiselect/ResourceMultiSelect';\nimport RelationTypeButtonGroup from '@/shared/components/RelationTypeButtonGroup';\nimport CrmTypeButtonGroup from '@/shared/components/CrmTypeButtonGroup';\n\nexport const defaultFilters = {\n relationId: null,\n relationName: null,\n dateFrom: moment.utc().startOf('year'),\n dateUntil: moment.utc().endOf('year'),\n period: 'year',\n relationTypes: [],\n crmTypes: [],\n ownCompanies: [],\n resourceTypes: [0],\n mainTaskTemplateId: null,\n userId: null,\n groupBy: [],\n withLabels: [],\n withoutLabels: [],\n withEmployeeLabels: [],\n assistant: null, // UserId\n responsible: null, // UserId\n associate: null, // UserId\n assistantBackup: null, // UserId\n billingUser: null, // UserId\n seniorUser: null, // UserId\n teamCodes: [],\n referenceYear: null,\n assignmentTemplateId: null,\n employeeType: null,\n resources: [],\n relationGroups: [],\n};\nexport const getParamsFromFilters = filters => {\n const {\n relationId,\n dateFrom: from,\n dateUntil: until,\n relationTypes,\n crmTypes,\n ownCompanies,\n resourceTypes,\n userId,\n groupBy,\n mainTaskTemplateId,\n withLabels,\n withoutLabels,\n withEmployeeLabels,\n assistant,\n responsible,\n associate,\n assistantBackup,\n billingUser,\n seniorUser,\n teamCodes,\n referenceYear,\n assignmentTemplateId,\n employeeType,\n resources,\n relationGroups,\n } = filters;\n\n return {\n relationId,\n from,\n until,\n relationTypes,\n crmTypes,\n resourceTypes,\n ownCompanies,\n userId,\n groupBy,\n mainTaskTemplateId,\n withLabels,\n withoutLabels,\n withEmployeeLabels,\n assistant,\n responsible,\n associate,\n assistantBackup,\n billingUser,\n seniorUser,\n teamCodes,\n referenceYear,\n assignmentTemplateId,\n employeeType,\n resources,\n relationGroups,\n };\n};\nconst allDynamicFilters = [\n ...getDynamicFiltersFromDefaultFilters(defaultFilters, 'relationTypes', 'crmTypes'),\n { id: 'mainTaskTemplateId', label: messages.TaskTemplate },\n { id: 'resources', label: messages.WithPriceListItem },\n];\nconst getIgnoredFilters = filters => {\n if (filters.period) {\n // Ignore date filters if there is a period\n return ['dateFrom', 'dateUntil'];\n }\n return [];\n};\n\nclass RegistrationsPerReportFilters extends Component {\n state = {\n labels: [],\n dynamicFilters: [],\n };\n\n constructor(props) {\n super(props);\n this.dynamicFiltersStorageKey = `${props.reportKey}DynamicFilters`;\n }\n\n componentDidMount() {\n const { intl, filters } = this.props;\n this.labelCancelToken = Axios.CancelToken.source();\n this.employeeLabelCancelToken = Axios.CancelToken.source();\n const labelEndpoint = `${config.appUrls.api}/api/resource/tags`;\n const employeeLabelEndpoint = `${config.appUrls.api}/api/employee/tags`;\n\n Promise.all([\n api.base.get(labelEndpoint, {\n cancelToken: this.labelCancelToken.token,\n }),\n api.base.get(employeeLabelEndpoint, {\n cancelToken: this.employeeLabelCancelToken.token,\n }),\n ]).then(([{ data: labels }, { data: employeeLabels }]) => {\n this.setState({\n labels: labels\n .map(x => ({ id: x.id, label: x.name, sort: x.name.toLowerCase() }))\n .sort(dynamicSort('sort')),\n employeeLabels: employeeLabels\n .map(x => ({ id: x.id, label: x.name, sort: x.name.toLowerCase() }))\n .sort(dynamicSort('sort')),\n dynamicFilters: initDynamicFilters(\n intl,\n allDynamicFilters,\n userStorage.getItem(this.dynamicFiltersStorageKey) || [],\n filters,\n defaultFilters,\n ),\n });\n });\n }\n\n filterChanged = filter => {\n const { filters, onFilterChange } = this.props;\n const newFilters = { ...filters, ...filter };\n\n if (JSON.stringify(filters) !== JSON.stringify(newFilters)) onFilterChange(newFilters);\n };\n dynamicFilterChanged = (item, selected) => {\n this.setState(({ dynamicFilters }) => {\n const { filters } = this.props;\n const newFilters = handleDynamicFiltersChanged(\n dynamicFilters,\n item,\n selected,\n filters,\n defaultFilters,\n );\n userStorage.setItem(\n this.dynamicFiltersStorageKey,\n newFilters.filter(x => x.selected).map(x => x.id),\n );\n if (\n !selected &&\n item.id !== 'selectAll' &&\n !isEqual(filters[item.id], defaultFilters[item.id])\n ) {\n // Reset filter when it's removed\n this.filterChanged({ [item.id]: defaultFilters[item.id] });\n }\n return { dynamicFilters: newFilters };\n });\n };\n savedFilterChanged = filters => {\n const { onFilterChange } = this.props;\n const newFilters = { ...defaultFilters, ...filters };\n if (typeof newFilters.dateFrom === 'string') newFilters.dateFrom = moment.utc(filters.dateFrom);\n if (typeof newFilters.dateUntil === 'string')\n newFilters.dateUntil = moment.utc(filters.dateUntil);\n\n if (newFilters.period) {\n const [dateFrom, dateUntil] = getPeriodStartEndDates(newFilters.period);\n newFilters.dateFrom = dateFrom;\n newFilters.dateUntil = dateUntil;\n }\n\n onFilterChange(newFilters);\n\n this.setState(({ dynamicFilters }) => ({\n dynamicFilters: resetDynamicFilters(dynamicFilters, newFilters, defaultFilters),\n }));\n };\n dateChanged = (dateFrom, dateUntil) => {\n this.filterChanged({ dateFrom, dateUntil, period: null });\n };\n relationChanged = item => {\n if (!item || !item.id) {\n this.filterChanged({ relationId: null, relationName: null });\n } else {\n this.filterChanged({\n relationId: item.key,\n relationName: item.label,\n });\n }\n };\n showDetailsChanged = showDetail => {\n const { filters } = this.props;\n const groupsWithoutDetails = (filters.groupBy || []).filter(x => x !== 99);\n\n this.filterChanged({\n groupBy: showDetail ? [...groupsWithoutDetails, 99] : groupsWithoutDetails,\n });\n };\n resetFilters = () => {\n this.filterChanged({ ...defaultFilters });\n };\n\n renderDynamicFilter = ({ type, filters, intl }) => {\n switch (type) {\n case 'mainTaskTemplateId': {\n const { mainTaskTemplates } = this.props;\n return (\n
    \n this.filterChanged({ mainTaskTemplateId: e.target.value })}\n className=\"form-control\"\n >\n \n \n {mainTaskTemplates &&\n mainTaskTemplates.map(template => (\n \n ))}\n \n
    \n );\n }\n case 'resources':\n return (\n
    \n this.filterChanged({ resources })}\n placeholder={intl.formatMessage(messages.WithPriceListItem)}\n />\n
    \n );\n default: {\n console.warn(`Missing filter: ${type}`);\n return null;\n }\n }\n };\n\n render() {\n const { filters, intl, rootGroup, reportKey } = this.props;\n const { labels, employeeLabels, dynamicFilters } = this.state;\n const initRelation = filters.relationId\n ? {\n key: filters.relationId,\n label: filters.relationName,\n invoiceStreamId: filters.invoiceStreamId,\n }\n : null;\n\n const showDetails = (filters.groupBy || []).some(x => x === 99);\n const groupsWithoutDetails = (filters.groupBy || []).filter(x => x !== 99);\n const visibleFilters = dynamicFilters.filter(x => x.selected).map(x => x.id);\n\n return (\n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n {\n this.filterChanged({ relationTypes: value });\n }}\n />\n
    \n
    \n
    \n
    \n {\n this.filterChanged({ crmTypes: value });\n }}\n />\n
    \n
    \n
    \n
    \n
    \n
    \n this.dateChanged(startDate, endDate)}\n startDatePlaceholderText={intl.formatMessage(messages.RegistrationDateFrom)}\n endDatePlaceholderText={intl.formatMessage(messages.RegistrationDateUntil)}\n block\n />\n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    \n {\n this.filterChanged({ resourceTypes: value });\n }}\n />\n
    \n
    \n \n
    \n
    \n this.filterChanged({ userId: user ? user.id : null })}\n value={filters.userId}\n placeholder={intl.formatMessage(messages.FilterRegistrationUser)}\n withSystemUser\n />\n
    \n
    \n
    \n
    \n {visibleFilters && visibleFilters.length > 0 ? (\n
    \n {visibleFilters.map(id => (\n \n ))}\n
    \n ) : null}\n
    \n
    \n
    \n \n this.filterChanged({ groupBy: [...(grps || []), ...(showDetails ? [99] : [])] })\n }\n hidden={[rootGroup, 99]}\n />\n
    \n
    \n \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n );\n }\n}\n\nRegistrationsPerReportFilters.propTypes = {\n intl: intlShape.isRequired,\n filters: PropTypes.shape({\n relationId: PropTypes.string,\n dateFrom: momentPropTypes.momentObj,\n dateUntil: momentPropTypes.momentObj,\n period: PropTypes.oneOf(pastToPrevMonth),\n relationTypes: PropTypes.arrayOf(PropTypes.number),\n ownCompanies: PropTypes.arrayOf(PropTypes.string),\n resourceTypes: PropTypes.arrayOf(PropTypes.number),\n crmTypes: PropTypes.arrayOf(PropTypes.number),\n groupBy: PropTypes.arrayOf(PropTypes.number),\n mainTaskTemplateId: PropTypes.string,\n responsible: PropTypes.string,\n assistant: PropTypes.string,\n associate: PropTypes.string,\n assistantBackup: PropTypes.string,\n billingUser: PropTypes.string,\n seniorUser: PropTypes.string,\n userId: PropTypes.string,\n }),\n onFilterChange: PropTypes.func.isRequired,\n rootGroup: PropTypes.number.isRequired,\n reportKey: PropTypes.string.isRequired,\n};\nRegistrationsPerReportFilters.defaultProps = {\n filters: { ...defaultFilters },\n};\nexport default injectIntl(RegistrationsPerReportFilters);\n","import React from 'react';\nimport classnames from 'classnames';\n\nconst InForfaitCheckbox = ({ value }) => {\n if (typeof value === 'undefined' || value === null) return null;\n const checked = value === 'true' || (value !== 'false' && !!value);\n return ;\n};\nexport default InForfaitCheckbox;\n","import React from 'react';\nimport classnames from 'classnames';\n\nconst HoursColumnValue = ({ value, className }) =>\n !value && value !== 0 ? null : (\n \n {value.toTime()}\n \n );\nexport default HoursColumnValue;\n","import React from 'react';\nimport FormattedCurrency from '@/shared/components/FormattedCurrency';\nimport classnames from 'classnames';\n\nconst AmountColumnValue = ({ value, className }) =>\n !value && value !== 0 ? null : (\n \n \n \n );\nexport default AmountColumnValue;\n","import React from 'react';\nimport classnames from 'classnames';\nimport { FormattedNumber } from 'react-intl';\n\nconst QuantityColumnValue = ({ value, className }) =>\n !value && value !== 0 ? null : (\n \n \n \n );\nexport default QuantityColumnValue;\n","import React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport PropTypes from 'prop-types';\n\nimport RelationName, { getRelationName } from '@/shared/components/RelationName';\nimport { mapAssignmentGroupName, mapResourceName } from '@/shared/services/ObjectDisplayService';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\n\nimport config from '@/config';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport AuthService from '@/shared/services/AuthService';\nimport { guid1 } from '@/shared/utils/guid';\nimport messages from '../reportingMessages';\nimport InForfaitCheckbox from './InForfaitCheckbox';\nimport HoursColumnValue from './HoursColumnValue';\nimport AmountColumnValue from './AmountColumnValue';\nimport QuantityColumnValue from './QuantityColumnValue';\n\nconst reportInfo = [\n {\n type: 4,\n title: messages.RegistrationsPerRelation,\n rootGroup: 1,\n url: `${config.appUrls.reporting}/api/RegistrationsPerRelation`,\n zendeskArticle: '5434847027730',\n },\n {\n type: 5,\n title: messages.RegistrationsPerResourceCategory,\n rootGroup: 4,\n url: `${config.appUrls.reporting}/api/RegistrationsPerResourceCategory`,\n zendeskArticle: '5434792789906',\n },\n {\n type: 6,\n title: messages.RegistrationsPerTaskTemplate,\n rootGroup: 6,\n url: `${config.appUrls.reporting}/api/RegistrationsPerTaskTemplate`,\n zendeskArticle: '5434760158098',\n },\n {\n type: 7,\n title: messages.RegistrationsPerUser,\n rootGroup: 8,\n url: `${config.appUrls.reporting}/api/RegistrationsPerUser`,\n zendeskArticle: '5434845825938',\n },\n];\nexport const getReportTypeInfo = type => {\n const info = reportInfo.find(x => x.type === type);\n if (!info) throw new Error(`Unknown report type: ${type}`);\n return info;\n};\n\nconst getRelationColumnValue = (row, intl) => {\n const {\n relationId: id,\n relationDisplayName: name,\n relationType: type,\n relationCrm: crm,\n relationAlias: alias,\n relationIsActive: isActive,\n } = row;\n\n const relation = {\n id,\n name,\n type,\n crm,\n alias,\n isActive,\n };\n return ;\n};\nconst getAssignmentColumnValue = (row, intl) => {\n const { assignmentName, assignmentTemplateId } = row;\n return mapAssignmentGroupName(assignmentTemplateId, assignmentName, intl);\n};\n\nconst getResourceTypeColumnValue = (row, intl) => {\n const { resourceType } = row;\n return intl.formatMessage(listItemMsg('resourcetype', resourceType));\n};\n\nconst getResourceCategoryColumnValue = (row, intl) => {\n const { categoryId, categoryName } = row;\n return intl.formatMessage(listItemMsg('resourcecategory', categoryId, categoryName));\n};\n\nconst getResourceColumnValue = (row, intl) => {\n const {\n categoryId,\n categoryName,\n resourceId: id,\n resourceName: name,\n isDefaultResource: isDefault,\n } = row;\n\n return mapResourceName({ id, name, isDefault, categoryId, categoryName }, intl);\n};\nconst getTaskTemplateColumnValue = (row, intl) => {\n const { taskTemplateId } = row;\n return taskTemplateId\n ? intl.formatMessage(listItemMsg('tasktemplate', taskTemplateId))\n : intl.formatMessage(messages.NotRegisteredOnTask);\n};\nconst getSubTaskTemplateColumnValue = (row, intl) => {\n const { subTaskTemplateId } = row;\n return subTaskTemplateId\n ? // I'm currently unsure why, but 'tasktemplate' here seems to work as intended, even though we address subtasks\n intl.formatMessage(listItemMsg('tasktemplate', subTaskTemplateId))\n : intl.formatMessage(messages.NotRegisteredOnSubTask);\n};\nconst getUserNameColumnValue = (row, intl) => {\n const { userId } = row;\n if (userId === guid1) return intl.formatMessage(messages.SystemUser);\n const users = DataCacheService.getAllUsers();\n if (!userId || !users) return null;\n\n const { name = null } = users.find(x => x.id === userId) || {};\n return name;\n};\nconst getOwnCompanyColumnValue = row => row.name;\nconst getReferenceYearValue = (row, intl) => {\n const { label } = row;\n if (!label) return intl.formatMessage(messages.WithoutReferenceYear);\n return label;\n};\nconst getSimpleGroupColumnValue = row => {\n const { label } = row;\n return label;\n};\nconst getDetailColumnValue = (row, intl) => {\n const { registrationDate } = row;\n return !!registrationDate && intl.formatDate(registrationDate);\n};\nconst getNameColumnAccessor = (row, intl) => {\n const { rowType } = row;\n switch (rowType) {\n case -1:\n return intl.formatMessage(messages.Totals);\n case 1:\n return getRelationColumnValue(row, intl);\n case 2:\n return getAssignmentColumnValue(row, intl);\n case 3:\n return getResourceTypeColumnValue(row, intl);\n case 4:\n return getResourceCategoryColumnValue(row, intl);\n case 5:\n return getResourceColumnValue(row, intl);\n case 6:\n return getTaskTemplateColumnValue(row, intl);\n case 8:\n return getUserNameColumnValue(row, intl);\n case 9:\n case 10:\n case 11:\n return getSimpleGroupColumnValue(row);\n case 12:\n return getReferenceYearValue(row, intl);\n case 13:\n return getOwnCompanyColumnValue(row);\n case 15:\n return getSubTaskTemplateColumnValue(row, intl);\n case 99:\n return getDetailColumnValue(row, intl);\n default:\n return `Unsupported type: ${rowType}`;\n }\n};\n\nexport const getVisibleColumnsFromTotals = totals => {\n const {\n potentialQuantity,\n notBillableHours,\n notBillableQuantity,\n notBillableAmount,\n billedQuantity,\n billedInForfaitHours,\n billedInForfaitQuantity,\n billedInForfaitAmount,\n deletedHours,\n deletedQuantity,\n deletedAmount,\n neverInvoiceHours,\n neverInvoiceQuantity,\n neverInvoiceAmount,\n internalCost,\n } = totals || {};\n const canViewPriceList = AuthService.hasPermission({\n functionality: 'Pricelist',\n privilege: 'read',\n });\n const canViewInternalPrice = AuthService.hasPermission({\n functionality: 'EmployeeInternalPrice',\n privilege: 'read',\n });\n const canViewDraftInvoices = AuthService.hasPermission({\n functionality: 'InvoiceDraft',\n privilege: 'read',\n });\n const canViewFinalInvoices = AuthService.hasPermission({\n functionality: 'InvoiceFinal',\n privilege: 'read',\n });\n return {\n potentialQuantity: (potentialQuantity ?? 0) > 0,\n notBillable: canViewPriceList && ((notBillableHours ?? 0) > 0 || (notBillableAmount ?? 0) > 0),\n notBillableQuantity: canViewPriceList && (notBillableQuantity ?? 0) > 0,\n billed: canViewFinalInvoices,\n billedQuantity: canViewFinalInvoices && (billedQuantity ?? 0) > 0,\n inForfait:\n canViewFinalInvoices && ((billedInForfaitHours ?? 0) > 0 || (billedInForfaitAmount ?? 0) > 0),\n inForfaitQuantity: canViewFinalInvoices && (billedInForfaitQuantity ?? 0) > 0,\n deleted: canViewFinalInvoices && ((deletedHours ?? 0) > 0 || (deletedAmount ?? 0) > 0),\n deletedQuantity: canViewFinalInvoices && (deletedQuantity ?? 0) > 0,\n neverInvoice:\n canViewDraftInvoices && ((neverInvoiceHours ?? 0) > 0 || (neverInvoiceAmount ?? 0) > 0),\n neverInvoiceQuantity: canViewDraftInvoices && (neverInvoiceQuantity ?? 0) > 0,\n margin: canViewInternalPrice && canViewDraftInvoices && (internalCost ?? 0) > 0,\n priceListPermission: canViewPriceList,\n internalPricePermission: canViewInternalPrice,\n draftInvoicePermission: canViewDraftInvoices,\n finalInvoicePermission: canViewFinalInvoices,\n };\n};\nexport const columnStatusShape = PropTypes.shape({\n potentialQuantity: PropTypes.bool.isRequired,\n notBillable: PropTypes.bool.isRequired,\n notBillableQuantity: PropTypes.bool.isRequired,\n billed: PropTypes.bool.isRequired,\n billedQuantity: PropTypes.bool.isRequired,\n inForfait: PropTypes.bool.isRequired,\n inForfaitQuantity: PropTypes.bool.isRequired,\n deleted: PropTypes.bool.isRequired,\n deletedQuantity: PropTypes.bool.isRequired,\n neverInvoice: PropTypes.bool.isRequired,\n neverInvoiceQuantity: PropTypes.bool.isRequired,\n margin: PropTypes.bool.isRequired,\n priceListPermission: PropTypes.bool.isRequired,\n internalPricePermission: PropTypes.bool.isRequired,\n draftInvoicePermission: PropTypes.bool.isRequired,\n});\nexport const getColumns = (intl, showDetails, totals) => {\n const isVisible = getVisibleColumnsFromTotals(totals);\n const columns = [\n {\n Header: ,\n id: 'name',\n accessor: originalRow => getNameColumnAccessor(originalRow, intl),\n width: 2,\n minWidth: 100,\n },\n ];\n if (showDetails) {\n columns.push(\n {\n Header: ,\n id: 'remark',\n accessor: ({ registrationRemark = '', registrationInternalRemark = '' }) =>\n `${registrationRemark} ${registrationInternalRemark}`,\n },\n {\n Header: ,\n id: 'invoiceStatus',\n accessor: ({ registrationInvoiceStatus }) =>\n registrationInvoiceStatus\n ? intl.formatMessage(\n listItemMsg('registrationinvoicestatus', registrationInvoiceStatus),\n )\n : null,\n isVisible: isVisible.finalInvoicePermission,\n },\n {\n Header: ,\n id: 'inForfait',\n accessor: 'registrationInForfait',\n Cell: InForfaitCheckbox,\n isVisible: isVisible.priceListPermission,\n },\n );\n }\n columns.push({\n Header: ,\n id: 'potential',\n align: 'center',\n columns: [\n {\n Header: ,\n id: 'potentialHours',\n accessor: 'potentialHours',\n Cell: HoursColumnValue,\n align: 'right',\n },\n {\n Header: ,\n id: 'potentialQuantity',\n accessor: 'potentialQuantity',\n Cell: QuantityColumnValue,\n align: 'right',\n isVisible: isVisible.potentialQuantity,\n },\n {\n Header: ,\n id: 'potentialAmount',\n accessor: 'potentialAmount',\n Cell: AmountColumnValue,\n align: 'right',\n isVisible: isVisible.priceListPermission,\n },\n {\n Header: ,\n id: 'internalCost',\n accessor: 'internalCost',\n Cell: AmountColumnValue,\n align: 'right',\n isVisible: isVisible.internalPricePermission,\n },\n ],\n });\n\n if (isVisible.notBillable) {\n columns.push({\n Header: ,\n id: 'notBillable',\n align: 'center',\n columns: [\n {\n Header: ,\n id: 'notBillableHours',\n accessor: 'notBillableHours',\n Cell: HoursColumnValue,\n align: 'right',\n },\n {\n Header: ,\n id: 'notBillableQuantity',\n accessor: 'notBillableQuantity',\n Cell: QuantityColumnValue,\n align: 'right',\n isVisible: isVisible.notBillableQuantity,\n },\n {\n Header: ,\n id: 'notBillableAmount',\n accessor: 'notBillableAmount',\n Cell: AmountColumnValue,\n align: 'right',\n },\n ],\n });\n }\n if (isVisible.billed) {\n columns.push({\n Header: ,\n id: 'invoiced',\n align: 'center',\n columns: [\n {\n Header: ,\n id: 'billedHours',\n accessor: 'billedHours',\n Cell: HoursColumnValue,\n align: 'right',\n },\n {\n Header: ,\n id: 'billedQuantity',\n accessor: 'billedQuantity',\n Cell: QuantityColumnValue,\n align: 'right',\n isVisible: isVisible.billedQuantity,\n },\n {\n Header: ,\n id: 'billedAmount',\n accessor: 'billedAmount',\n Cell: AmountColumnValue,\n align: 'right',\n },\n ],\n });\n }\n if (isVisible.inForfait) {\n columns.push({\n Header: ,\n id: 'invoicedInForfait',\n align: 'center',\n columns: [\n {\n Header: ,\n id: 'billedInForfaitHours',\n accessor: 'billedInForfaitHours',\n Cell: HoursColumnValue,\n align: 'right',\n },\n {\n Header: ,\n id: 'billedInForfaitQuantity',\n accessor: 'billedInForfaitQuantity',\n Cell: QuantityColumnValue,\n align: 'right',\n isVisible: isVisible.inForfaitQuantity,\n },\n {\n Header: ,\n id: 'billedInForfaitAmount',\n accessor: 'billedInForfaitAmount',\n Cell: AmountColumnValue,\n align: 'right',\n },\n ],\n });\n }\n if (isVisible.deleted) {\n columns.push({\n Header: ,\n id: 'deleted',\n align: 'center',\n columns: [\n {\n Header: ,\n id: 'deletedHours',\n accessor: 'deletedHours',\n Cell: HoursColumnValue,\n align: 'right',\n },\n {\n Header: ,\n id: 'deletedQuantity',\n accessor: 'deletedQuantity',\n Cell: QuantityColumnValue,\n align: 'right',\n isVisible: isVisible.deletedQuantity,\n },\n {\n Header: ,\n id: 'deletedAmount',\n accessor: 'deletedAmount',\n Cell: AmountColumnValue,\n align: 'right',\n },\n ],\n });\n }\n if (isVisible.neverInvoice) {\n columns.push({\n Header: ,\n id: 'neverInvoice',\n align: 'center',\n columns: [\n {\n Header: ,\n id: 'neverInvoiceHours',\n accessor: 'neverInvoiceHours',\n Cell: HoursColumnValue,\n align: 'right',\n },\n {\n Header: ,\n id: 'neverInvoiceQuantity',\n accessor: 'neverInvoiceQuantity',\n Cell: QuantityColumnValue,\n align: 'right',\n isVisible: isVisible.neverInvoiceQuantity,\n },\n {\n Header: ,\n id: 'neverInvoiceAmount',\n accessor: 'neverInvoiceAmount',\n Cell: AmountColumnValue,\n align: 'right',\n },\n ],\n });\n }\n if (isVisible.billed) {\n columns.push({\n Header: ,\n id: 'invoicedMinusPotential',\n align: 'center',\n columns: [\n {\n Header: ,\n id: 'invoicedMinusPotentialHours',\n accessor: 'deltaHours',\n Cell: HoursColumnValue,\n align: 'right',\n },\n {\n Header: ,\n id: 'invoicedMinusPotentialQuantity',\n accessor: 'deltaQuantity',\n Cell: QuantityColumnValue,\n align: 'right',\n isVisible: isVisible.billedQuantity,\n },\n {\n Header: ,\n id: 'invoicedMinusPotentialAmount',\n accessor: 'deltaAmount',\n Cell: AmountColumnValue,\n align: 'right',\n },\n ],\n });\n }\n if (isVisible.margin) {\n columns.push({\n Header: ,\n id: 'margin',\n align: 'right',\n columns: [\n {\n Header: ,\n id: 'invoicedMinusInternalCost',\n accessor: 'margin',\n Cell: AmountColumnValue,\n align: 'right',\n },\n ],\n });\n }\n\n // Filter columns on isVisible columns\n return columns\n .map(x => {\n if (typeof x.isVisible !== 'undefined' && !x.isVisible) return null;\n if (typeof x.columns === 'undefined') return x;\n const subColumns = x.columns.filter(c => typeof c.isVisible === 'undefined' || !!c.isVisible);\n if (subColumns.length === 0) return null;\n return {\n ...x,\n columns: subColumns,\n };\n })\n .filter(Boolean);\n};\n\nexport const defaultColumn = {\n // When using the useFlexLayout:\n minWidth: 30, // minWidth is only used as a limit for resizing\n width: 1, // width is used for both the flex-basis and flex-grow\n maxWidth: 200, // maxWidth is only used as a limit for resizing\n};\n","import React, { useCallback, useEffect, useMemo } from 'react';\nimport PropTypes from 'prop-types';\nimport { useFlexLayout, useTable } from 'react-table';\nimport {\n AutoSizer,\n CellMeasurer,\n CellMeasurerCache,\n List,\n WindowScroller,\n} from 'react-virtualized';\nimport { injectIntl } from 'react-intl';\nimport classnames from 'classnames';\n\nimport intlShape from '@/shared/utils/intlShape';\nimport { defaultColumn, getColumns } from './helpers';\n\nconst getStyles = (props, align = 'left') => [\n props,\n {\n style: {\n textAlign: align,\n },\n },\n];\nconst headerProps = (props, { column }) => getStyles(props, column.align);\nconst headerGroupProps = props => getStyles(props, 'center');\n\nconst cellProps = (props, { cell }) => getStyles(props, cell.column.align);\n\nconst cache = new CellMeasurerCache({\n defaultHeight: 37,\n minHeight: 37,\n fixedWidth: true,\n});\n\nconst RegistrationsPerReportTable = ({ data, showDetails, intl, lastGroup, totals }) => {\n const columns = useMemo(() => getColumns(intl, showDetails, totals), [showDetails, intl, totals]);\n const { getTableProps, getTableBodyProps, headerGroups, rows, prepareRow } = useTable(\n {\n columns,\n data,\n defaultColumn,\n },\n useFlexLayout,\n );\n\n const RenderRow = React.useCallback(\n ({ index, style, parent, key }) => {\n const row = rows[index];\n prepareRow(row);\n const { rowType, rowDepth } = row.original;\n return (\n \n \n {row.cells.map(cell => (\n
    \n {cell.render('Cell')}\n
    \n ))}\n \n
    \n );\n },\n [prepareRow, rows, lastGroup],\n );\n\n useEffect(() => {\n // Clear cached row heights when data changes\n cache.clearAll();\n }, [data]);\n\n const handleResize = useCallback(() => {\n // Clear cached row heights when window resizes\n cache.clearAll();\n }, []);\n\n return (\n [\n props,\n { className: 'table registrations-per-report-table table-report grouped-report' },\n ])}\n >\n
    \n {headerGroups.map(headerGroup => (\n
    \n {headerGroup.headers.map(column => (\n
    \n {column.render('Header')}\n
    \n ))}\n
    \n ))}\n
    \n \n {({ height, isScrolling, registerChild, scrollTop, onChildScroll }) => (\n
    \n \n {({ width }) => (\n \n )}\n \n
    \n )}\n
    \n \n );\n};\nRegistrationsPerReportTable.propTypes = {\n data: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n showDetails: PropTypes.bool.isRequired,\n lastGroup: PropTypes.number.isRequired,\n intl: intlShape.isRequired,\n};\nexport default injectIntl(RegistrationsPerReportTable);\n","import React, { useCallback, useEffect, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport Axios from 'axios';\nimport SimplePanel from '@/shared/components/SimplePanel';\nimport { injectIntl } from 'react-intl';\nimport moment from 'moment';\nimport intlShape from '@/shared/utils/intlShape';\nimport LoadingAnimation from '@/shared/components/LoadingAnimation';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport ScrollArrow from '@/shared/components/ScrollArrow';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport SignalRService from '@/shared/services/SignalRService';\nimport ToastrService from '@/shared/services/ToastrService';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport RegistrationsPerReportFilters, {\n defaultFilters,\n getParamsFromFilters,\n} from './RegistrationsPerReportFilters';\nimport ExportToExcelDropdown from './ExportToExcelDropdown';\nimport messages from '../reportingMessages';\nimport { getReportTypeInfo } from './helpers';\n\nimport RegistrationsPerReportTable from './RegistrationsPerReportTable';\n\nconst StoragePrefix = 'RegistrationsPerReportFilters';\n\nconst RegistrationsPerReport = ({ reportType, externalParams = {}, intl, reportKey }) => {\n const [loading, setLoading] = useState(false);\n const [rows, setRows] = useState([]);\n const [totals, setTotals] = useState({});\n const [reportInfo] = useState(getReportTypeInfo(reportType));\n const [exporting, setExporting] = useState(false);\n\n const [filters, setFilters] = useState(() => {\n const sessionParams =\n JSON.parse(sessionStorage.getItem(`${StoragePrefix}-${reportType}`)) || {};\n if (sessionParams.dateFrom) {\n sessionParams.dateFrom = moment(sessionParams.dateFrom);\n }\n if (sessionParams.dateUntil) {\n sessionParams.dateUntil = moment(sessionParams.dateUntil);\n }\n return {\n ...defaultFilters,\n ...sessionParams,\n ...externalParams,\n };\n });\n const [mainTaskTemplates, setMainTaskTemplates] = useState([]);\n\n // Retrieve data\n useEffect(() => {\n const cancelToken = Axios.CancelToken.source();\n setLoading(true);\n\n const languageCode = intl.locale;\n\n const params = {\n ...getParamsFromFilters(filters),\n take: 20,\n page: 0,\n languageCode,\n };\n\n const sessionParams = JSON.stringify(filters);\n sessionStorage.setItem(`${StoragePrefix}-${reportType}`, sessionParams);\n api.base\n .post(reportInfo.url, params, {\n cancelToken: cancelToken.token,\n })\n .then(({ data }) => {\n const newRows = data.rows;\n const totalRow = {\n rowDepth: 0,\n rowType: -1,\n rowKey: 'Totals',\n ...(data.totals || {}),\n };\n setRows([totalRow, ...newRows]);\n setTotals(data.totals || {});\n setLoading(false);\n })\n .catch(error => {\n setLoading(false);\n setRows([]);\n if (!Axios.isCancel(error)) return handleHttpError(intl)(error);\n });\n return () => {\n if (cancelToken) cancelToken.cancel('Operation canceled due to new request.');\n };\n }, [filters, intl, reportType, reportInfo]);\n\n // Retrieve task templates\n useEffect(() => {\n api.base.get(`${config.appUrls.tasks}/api/TaskTemplates`).then(({ data }) =>\n setMainTaskTemplates(\n data\n .map(t => ({\n ...t,\n label: intl.formatMessage(listItemMsg('taskTemplate', t.id, t.name)), // Map translation to label property\n }))\n .sort((a, b) => (a.label > b.label) - (a.label < b.label)), // Sort on label property\n ),\n );\n }, [intl]);\n\n const createExcelReport = useCallback(\n (isDetailsReport = false) => {\n const reportParams = { ...getParamsFromFilters(filters), isDetailsReport };\n const languageCode = intl.locale;\n\n const params = {\n language: languageCode,\n signalRConnectionId: SignalRService.getConnectionId(),\n report: reportType,\n parameters: JSON.stringify(reportParams),\n };\n setExporting(true);\n\n return api.base\n .post(`${config.appUrls.reporting}/api/export`, params)\n .then(() => {\n ToastrService.info(intl.formatMessage(messages.ExportToExcelStarted));\n })\n .catch(error => {\n handleHttpError(intl)(error);\n })\n .finally(() => {\n setExporting(false);\n });\n },\n [intl, filters, reportType],\n );\n\n const updateFilters = newFilters => {\n setFilters({\n ...filters,\n ...newFilters,\n });\n };\n\n const showDetails = filters.groupBy.indexOf(99) >= 0;\n let [lastGroup] = [...filters.groupBy].reverse();\n if (!lastGroup) lastGroup = 1;\n return (\n <>\n \n
    \n \n
    \n
    \n\n
    \n
    \n {rows && rows.length > 0 && (\n \n )}\n
    \n
    \n \n {loading && (\n
    \n \n
    \n )}\n \n \n );\n};\n\nRegistrationsPerReport.propTypes = {\n intl: intlShape.isRequired,\n externalParams: PropTypes.shape({ relationId: PropTypes.string }),\n reportType: PropTypes.oneOf([4, 5, 6, 7]).isRequired,\n reportKey: PropTypes.string.isRequired,\n};\n\nRegistrationsPerReport.defaultProps = {\n externalParams: {},\n};\n\nexport default injectIntl(RegistrationsPerReport);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { showWhenPermission } from '@/shared/components/security';\nimport RegistrationsPerReport from './RegistrationsPerReport';\n\nconst RegistrationsPerResourceCategoryContainer = ({ searchParams }) => (\n \n);\nRegistrationsPerResourceCategoryContainer.propTypes = {\n searchParams: PropTypes.shape({}),\n};\n\nRegistrationsPerResourceCategoryContainer.defaultProps = {\n searchParams: {},\n};\nexport default showWhenPermission(\n 'RegistrationOwn',\n 'read',\n)(RegistrationsPerResourceCategoryContainer);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { showWhenPermission } from '@/shared/components/security';\nimport RegistrationsPerReport from './RegistrationsPerReport';\n\nconst RegistrationsPerTaskTemplateContainer = ({ searchParams }) => (\n \n);\nRegistrationsPerTaskTemplateContainer.propTypes = {\n searchParams: PropTypes.shape({}),\n};\n\nRegistrationsPerTaskTemplateContainer.defaultProps = {\n searchParams: {},\n};\nexport default showWhenPermission('RegistrationOwn', 'read')(RegistrationsPerTaskTemplateContainer);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { showWhenPermission } from '@/shared/components/security';\nimport RegistrationsPerReport from './RegistrationsPerReport';\n\nconst RegistrationsPerUserContainer = ({ searchParams }) => (\n \n);\nRegistrationsPerUserContainer.propTypes = {\n searchParams: PropTypes.shape({}),\n};\n\nRegistrationsPerUserContainer.defaultProps = {\n searchParams: {},\n};\nexport default showWhenPermission('RegistrationOwn', 'read')(RegistrationsPerUserContainer);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport { FormattedMessage, FormattedNumber, injectIntl, useIntl } from 'react-intl';\n\nimport intlShape from '@/shared/utils/intlShape';\nimport FormattedCurrency from '@/shared/components/FormattedCurrency';\nimport RelationName from '@/shared/components/RelationName';\nimport FormattedListValue from '@/shared/components/FormattedListValue';\nimport { mapAssignmentGroupName, mapResourceName } from '@/shared/services/ObjectDisplayService';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport { guid1 } from '@/shared/utils/guid';\nimport messages from '../../reportingMessages';\nimport FormattedDateShort from '../../../../shared/components/FormattedDateShort';\nimport { columnStatusShape } from '../helpers';\n\nconst AmountColumn = ({ value, className }) => (\n \n {!value && value !== 0 ? null : }\n \n);\nconst HoursColumn = ({ value = null, className }) => (\n \n {value === null ? null : value.toTime()}\n \n);\nconst QuantityColumn = ({ value = null, className }) => (\n \n {value === null ? null : }\n \n);\nclass RegistrationsPerRow extends Component {\n renderRelationName() {\n const {\n rowData: {\n relationId: id,\n relationDisplayName: name,\n relationType: type,\n relationCrm: crm,\n relationAlias: alias,\n relationIsActive: isActive,\n } = {},\n } = this.props;\n const relation = {\n id,\n name,\n type,\n crm,\n alias,\n isActive,\n };\n return ;\n }\n\n renderAssignment() {\n const { intl, rowData: { assignmentName, assignmentTemplateId } = {} } = this.props;\n return mapAssignmentGroupName(assignmentTemplateId, assignmentName, intl);\n }\n\n renderDetailColumn() {\n const { rowData: { registrationDate } = {} } = this.props;\n return !!registrationDate && ;\n }\n\n renderResourceType() {\n const { rowData: { resourceType } = {} } = this.props;\n return ;\n }\n\n renderResourceCategory() {\n const { rowData: { categoryId, categoryName } = {} } = this.props;\n return ;\n }\n\n renderResource() {\n const {\n rowData: {\n categoryId,\n categoryName,\n resourceId: id,\n resourceName: name,\n isDefaultResource: isDefault,\n } = {},\n intl,\n } = this.props;\n\n return mapResourceName({ id, name, isDefault, categoryId, categoryName }, intl);\n }\n\n renderTaskTemplate() {\n const { rowData: { taskTemplateId } = {} } = this.props;\n return taskTemplateId ? (\n \n ) : (\n \n \n \n );\n }\n\n renderSubTaskTemplate() {\n const { rowData: { subTaskTemplateId } = {} } = this.props;\n return subTaskTemplateId ? (\n \n ) : (\n \n \n \n );\n }\n\n renderUserName() {\n const { rowData: { userId } = {}, intl } = this.props;\n if (!userId) return null;\n if (userId === guid1) return intl.formatMessage(messages.SystemUser);\n return DataCacheService.getUserName(userId);\n }\n renderReferenceYear() {\n const { rowData: { label } = {} } = this.props;\n if (!label)\n return (\n \n \n \n );\n return label;\n }\n renderOwnCompany() {\n const { rowData: { name } = {} } = this.props;\n return {name};\n }\n renderSimpleGroup() {\n const { rowData: { label } = {} } = this.props;\n return label;\n }\n\n renderLabel() {\n const { rowData: { rowType } = {} } = this.props;\n\n switch (rowType) {\n case -1:\n return ;\n case 1:\n return this.renderRelationName();\n case 2:\n return this.renderAssignment();\n case 3:\n return this.renderResourceType();\n case 4:\n return this.renderResourceCategory();\n case 5:\n return this.renderResource();\n case 6:\n return this.renderTaskTemplate();\n case 8:\n return this.renderUserName();\n case 9:\n case 10:\n case 11:\n return this.renderSimpleGroup();\n case 12:\n return this.renderReferenceYear();\n case 13:\n return this.renderOwnCompany();\n case 15:\n return this.renderSubTaskTemplate();\n case 99:\n return this.renderDetailColumn();\n default:\n return `Unsupported type: ${rowType}`;\n }\n }\n\n renderInForfaitCheckbox() {\n const { rowData: { registrationInForfait } = {} } = this.props;\n if (typeof registrationInForfait === 'undefined' || registrationInForfait === null) return null;\n const checked =\n registrationInForfait === 'true' ||\n (registrationInForfait !== 'false' && !!registrationInForfait);\n return ;\n }\n\n render() {\n const { showDetails, rowData = {}, lastGroup, columnStatus } = this.props;\n const {\n rowType,\n rowDepth,\n potentialHours,\n potentialQuantity,\n potentialAmount,\n internalCost,\n notBillableHours,\n notBillableQuantity,\n notBillableAmount,\n billedHours,\n billedQuantity,\n billedAmount,\n billedInForfaitHours,\n billedInForfaitQuantity,\n billedInForfaitAmount,\n deletedHours,\n deletedQuantity,\n deletedAmount,\n neverInvoiceHours,\n neverInvoiceQuantity,\n neverInvoiceAmount,\n deltaHours,\n deltaQuantity,\n deltaAmount,\n margin,\n\n registrationRemark,\n registrationInternalRemark,\n registrationInvoiceStatus,\n } = rowData;\n\n const isDetail = rowType === 99;\n const labelColspan =\n !showDetails || isDetail\n ? 1\n : 2 +\n (columnStatus.finalInvoicePermission ? 1 : 0) +\n (columnStatus.priceListPermission ? 1 : 0);\n\n return (\n \n {this.renderLabel()}\n {isDetail && (\n \n {registrationRemark} {registrationInternalRemark}\n \n )}\n {isDetail && columnStatus.finalInvoicePermission && (\n \n \n \n )}\n {isDetail && columnStatus.priceListPermission && {this.renderInForfaitCheckbox()}}\n \n {columnStatus.potentialQuantity && }\n {columnStatus.priceListPermission && }\n {columnStatus.internalPricePermission && }\n {columnStatus.notBillable && (\n \n )}\n {columnStatus.notBillableQuantity && }\n {columnStatus.notBillable && }\n {columnStatus.billed && }\n {columnStatus.billedQuantity && }\n {columnStatus.billed && }\n {columnStatus.inForfait && (\n \n )}\n {columnStatus.inForfaitQuantity && }\n {columnStatus.inForfait && }\n\n {columnStatus.deleted && }\n {columnStatus.deletedQuantity && }\n {columnStatus.deleted && }\n\n {columnStatus.neverInvoice && (\n \n )}\n {columnStatus.neverInvoiceQuantity && }\n {columnStatus.neverInvoice && }\n {columnStatus.billed && }\n {columnStatus.billedQuantity && }\n {columnStatus.billed && }\n {columnStatus.margin && }\n \n );\n }\n}\n\nAmountColumn.propTypes = {\n value: PropTypes.number,\n className: PropTypes.string,\n};\nAmountColumn.defaultProps = {\n value: null,\n className: '',\n};\n\nHoursColumn.propTypes = {\n value: PropTypes.number,\n className: PropTypes.string,\n};\nHoursColumn.defaultProps = {\n value: null,\n className: '',\n};\nQuantityColumn.propTypes = {\n value: PropTypes.number,\n className: PropTypes.string,\n};\nQuantityColumn.defaultProps = {\n value: null,\n className: '',\n};\n\nRegistrationsPerRow.propTypes = {\n intl: intlShape.isRequired,\n showDetails: PropTypes.bool,\n showHours: PropTypes.bool,\n showAmounts: PropTypes.bool,\n showInternalPrice: PropTypes.bool,\n columnStatus: columnStatusShape.isRequired,\n rowData: PropTypes.shape({\n rowType: PropTypes.number.isRequired,\n rowDepth: PropTypes.number.isRequired,\n /* And many more properties */\n }).isRequired,\n lastGroup: PropTypes.number,\n};\nRegistrationsPerRow.defaultProps = {\n showDetails: false,\n lastGroup: null,\n showAmounts: false,\n showInternalPrice: false,\n showHours: false,\n};\n\nexport default injectIntl(RegistrationsPerRow);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport Axios from 'axios';\nimport InfiniteScroll from 'react-infinite-scroller';\nimport SimplePanel from '@/shared/components/SimplePanel';\nimport { injectIntl, FormattedMessage } from 'react-intl';\nimport moment from 'moment';\nimport { FaFileExcel } from 'react-icons/fa';\nimport LoadingAnimation from '@/shared/components/LoadingAnimation';\nimport intlShape from '@/shared/utils/intlShape';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport { showWhenPermission } from '@/shared/components/security';\nimport { injectStateService } from '@/shared/services/StateService';\nimport ZendeskHelp from '@/shared/components/ZendeskHelp';\nimport ScrollArrow from '@/shared/components/ScrollArrow';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport Button from '@/shared/components/Button';\nimport SignalRService from '@/shared/services/SignalRService';\nimport ToastrService from '@/shared/services/ToastrService';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport AuthService from '@/shared/services/AuthService';\nimport RegistrationsPerReportFilters, {\n defaultFilters,\n getParamsFromFilters,\n} from '../RegistrationsPerReportFilters';\nimport messages from '../../reportingMessages';\nimport ExportToExcelDropdown from '../ExportToExcelDropdown';\n\nimport RegistrationsPerRow from './RegistrationsPerRow';\nimport { getVisibleColumnsFromTotals } from '../helpers';\n\nconst SessionStorageKey = 'RegistrationsPerRelationReportParams';\nconst ShowHoursStorageKey = 'RegistrationsPerRelationReportShowHours';\n\nclass RegistrationsPerRelationContainer extends Component {\n state = {\n hasMoreData: false,\n loading: null,\n pagingKey: 1,\n totals: null,\n rows: [],\n showHours: false,\n reportFilters: {},\n exporting: false,\n };\n\n constructor(props) {\n super(props);\n const { searchParams = {} } = props;\n const sessionParams = JSON.parse(sessionStorage.getItem(SessionStorageKey)) || {};\n\n if (sessionParams.dateFrom) {\n sessionParams.dateFrom = moment(sessionParams.dateFrom);\n }\n if (sessionParams.dateUntil) {\n sessionParams.dateUntil = moment(sessionParams.dateUntil);\n }\n\n this.state = {\n ...this.state,\n reportFilters: {\n ...defaultFilters,\n ...sessionParams,\n ...searchParams,\n },\n hasMoreData: true,\n showHours: !!sessionStorage.getItem(ShowHoursStorageKey),\n };\n }\n\n componentDidMount() {\n const { intl } = this.props;\n\n api.base.get(`${config.appUrls.tasks}/api/TaskTemplates`).then(({ data }) => {\n const translatedTemplates = data\n .map(t => ({\n ...t,\n label: intl.formatMessage(listItemMsg('taskTemplate', t.id, t.name)), // Map translation to label property\n }))\n .sort((a, b) => (a.label > b.label) - (a.label < b.label)); // Sort on label property\n\n this.setState(state => ({\n ...state,\n mainTaskTemplates: translatedTemplates,\n }));\n });\n }\n componentWillUnmount() {\n if (typeof this.reportToken !== typeof undefined) {\n this.reportToken.cancel('Operation canceled due to leaving page.');\n }\n }\n\n getParams() {\n const { reportFilters = {} } = this.state;\n return getParamsFromFilters(reportFilters);\n }\n\n retrieve = page => {\n const { reportFilters = {}, pagingKey } = this.state;\n\n if (typeof this.reportToken !== typeof undefined) {\n this.reportToken.cancel('Operation canceled due to new request.');\n }\n this.reportToken = Axios.CancelToken.source();\n this.setState({ loading: pagingKey });\n\n const params = {\n ...this.getParams(),\n take: 20,\n page,\n };\n\n const sessionParams = JSON.stringify(reportFilters);\n sessionStorage.setItem(SessionStorageKey, sessionParams);\n return api.base\n .post(`${config.appUrls.reporting}/api/RegistrationsPerRelation`, params, {\n cancelToken: this.reportToken.token,\n })\n .then(({ data }) => {\n const newRows = data.rows;\n const totals = {\n rowDepth: 0,\n rowType: -1,\n rowKey: 'Totals',\n ...(data.totals || {}),\n };\n\n this.setState(state => ({\n ...state,\n rows: params.page > 0 ? [...state.rows, ...newRows] : [totals, ...newRows],\n totals: params.page > 0 ? state.totals : data.totals,\n hasMoreData: data.hasMoreData,\n loading: null,\n }));\n return data.rows;\n })\n .catch(error => {\n this.setState(state => ({\n loading: state.loading && state.loading === pagingKey ? null : state.loading,\n hasMoreData: state.loading && state.loading === pagingKey ? false : state.hasMoreData,\n }));\n const { intl } = this.props;\n if (!Axios.isCancel(error)) return handleHttpError(intl)(error);\n });\n };\n\n createExcelReport = (isDetailsReport = false) => {\n const { intl } = this.props;\n\n const reportParams = { ...this.getParams(), isDetailsReport };\n const languageCode = intl.locale;\n\n const params = {\n language: languageCode,\n signalRConnectionId: SignalRService.getConnectionId(),\n report: 4,\n parameters: JSON.stringify(reportParams),\n isDetailsReport,\n };\n this.setState({ exporting: true });\n return api.base\n .post(`${config.appUrls.reporting}/api/export`, params)\n .then(() => {\n ToastrService.info(intl.formatMessage(messages.ExportToExcelStarted));\n })\n .catch(error => {\n handleHttpError(intl)(error);\n })\n .finally(() => {\n this.setState({ exporting: false });\n });\n };\n\n filtersChanged(filters) {\n this.setState(state => ({\n reportFilters: {\n ...(state.reportFilters || {}),\n ...filters,\n },\n rows: [],\n hasMoreData: true,\n loading: null,\n pagingKey: state.pagingKey + 1,\n }));\n }\n\n showHoursChanged = value => {\n sessionStorage.setItem(ShowHoursStorageKey, value);\n this.setState({ showHours: value });\n };\n\n render() {\n const { intl } = this.props;\n const {\n reportFilters,\n rows,\n showHours,\n hasMoreData,\n loading,\n pagingKey,\n mainTaskTemplates,\n totals,\n exporting,\n } = this.state;\n\n const showDetails = reportFilters.groupBy.indexOf(99) >= 0;\n let [lastGroup] = [...reportFilters.groupBy].reverse();\n if (!lastGroup) lastGroup = 1;\n const columnStatus = getVisibleColumnsFromTotals(totals);\n\n return (\n
    \n \n
    \n this.filtersChanged(filters)}\n showHours={showHours}\n onShowHoursChanged={this.showHoursChanged}\n rootGroup={1}\n reportKey=\"RegsPerRelationReport\"\n />\n
    \n \n\n
    \n
    \n {rows && rows.length > 0 && (\n \n )}\n
    \n
    \n\n this.retrieve(page)}\n hasMore={hasMoreData && !loading}\n initialLoad\n loader={null}\n key={pagingKey}\n >\n \n \n \n \n {showDetails && (\n \n )}\n {showDetails && columnStatus.finalInvoicePermission && (\n \n )}\n {showDetails && columnStatus.priceListPermission && (\n \n )}\n \n \n \n {columnStatus.notBillable && (\n \n \n \n )}\n {columnStatus.billed && (\n \n \n \n )}\n {columnStatus.inForfait && (\n \n \n \n )}\n {columnStatus.deleted && (\n \n \n \n )}\n {columnStatus.neverInvoice && (\n \n \n \n )}\n {columnStatus.billed && (\n \n \n \n )}\n {columnStatus.margin && (\n \n )}\n \n \n \n {columnStatus.potentialQuantity && (\n \n )}\n {columnStatus.priceListPermission && (\n \n )}\n {columnStatus.internalPricePermission && (\n \n )}\n {columnStatus.notBillable && (\n \n )}\n {columnStatus.notBillableQuantity && (\n \n )}\n {columnStatus.notBillable && (\n \n )}\n {columnStatus.billed && (\n \n )}\n {columnStatus.billedQuantity && (\n \n )}\n {columnStatus.billed && (\n \n )}\n {columnStatus.inForfait && (\n \n )}\n {columnStatus.inForfaitQuantity && (\n \n )}\n {columnStatus.inForfait && (\n \n )}\n {columnStatus.deleted && (\n \n )}{' '}\n {columnStatus.deletedQuantity && (\n \n )}\n {columnStatus.deleted && (\n \n )}\n {columnStatus.neverInvoice && (\n \n )}{' '}\n {columnStatus.neverInvoiceQuantity && (\n \n )}\n {columnStatus.neverInvoice && (\n \n )}\n {columnStatus.billed && (\n \n )}{' '}\n {columnStatus.billedQuantity && (\n \n )}\n {columnStatus.billed && (\n \n )}\n {columnStatus.margin && (\n \n )}\n \n \n \n {rows &&\n rows.map(row => (\n \n ))}\n \n
    \n \n \n \n \n \n \n \n \n \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n {loading && (\n
    \n \n
    \n )}\n \n \n
    \n );\n }\n}\n\nRegistrationsPerRelationContainer.propTypes = {\n intl: intlShape.isRequired,\n searchParams: PropTypes.shape({ relationId: PropTypes.string }),\n};\n\nRegistrationsPerRelationContainer.defaultProps = {\n searchParams: {},\n};\n\nexport default showWhenPermission(\n 'RegistrationOwn',\n 'read',\n)(injectStateService(injectIntl(RegistrationsPerRelationContainer)));\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nimport { FormattedMessage, injectIntl, useIntl } from 'react-intl';\nimport moment from 'moment';\nimport momentPropTypes from 'react-moment-proptypes';\nimport Toggle from 'react-toggle';\nimport isEqual from 'lodash-es/isEqual';\n\nimport intlShape from '@/shared/utils/intlShape';\nimport RelationSearch from '@/shared/components/input/RelationSearch';\nimport PeriodButtonGroup, {\n getPeriodStartEndDates,\n pastToPrevMonth,\n} from '@/shared/components/PeriodButtonGroup';\nimport enumCache from '@/shared/services/EnumCacheService';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport AutoComplete from '@/shared/components/input/select/AutoComplete';\nimport { hasAssignments } from '@/shared/components/security/HasAssignments';\nimport DelayedDateRangePicker from '@/shared/components/input/DelayedDateRangePicker';\nimport SavedFiltersButton from '@/shared/components/SavedFiltersButton';\nimport userStorage from '@/shared/services/userStorage';\n\nimport DynamicFilter, {\n getDynamicFiltersFromDefaultFilters,\n handleDynamicFiltersChanged,\n initDynamicFilters,\n resetDynamicFilters,\n} from '@/shared/components/DynamicFilter';\nimport config from '../../../config';\nimport api from '../../../shared/api';\n\nimport messages from '../reportingMessages';\n\nexport const defaultFilters = {\n relationId: null,\n relationName: null,\n dateFrom: moment.utc().startOf('year'),\n dateUntil: moment.utc().endOf('year'),\n period: 'year',\n relationTypes: [],\n ownCompanies: [],\n assistant: null,\n responsible: null,\n invoicingType: null,\n invoiceSchedule: null,\n sliding: true,\n assignmentTemplateId: null,\n withLabels: [],\n withoutLabels: [],\n teamCodes: [],\n associate: null, // UserId\n assistantBackup: null, // UserId\n billingUser: null, // UserId\n seniorUser: null, // UserId\n includeInactive: false,\n filterBehaviours: {\n withLabels: 1,\n },\n relationGroups: [],\n};\n\nconst allDynamicFilters = [\n ...getDynamicFiltersFromDefaultFilters(defaultFilters),\n { id: 'includeInactive', label: messages.IncludeInactiveRelations },\n];\n\nconst dynamicFiltersStorageKey = 'RelationRentabilityDynamicFilters';\nconst getIgnoredFilters = filters => {\n if (filters.period) {\n // Ignore date filters if there is a period\n return ['dateFrom', 'dateUntil'];\n }\n return [];\n};\n\nclass RelationRentabilityFilters extends Component {\n state = {\n invoiceSchedule: [],\n labels: [],\n dynamicFilters: [],\n };\n\n static propTypes = {\n onFilterChange: PropTypes.func.isRequired,\n filters: PropTypes.shape({\n relationId: PropTypes.string,\n dateFrom: momentPropTypes.momentObj,\n dateUntil: momentPropTypes.momentObj,\n period: PropTypes.oneOf(pastToPrevMonth),\n relationTypes: PropTypes.arrayOf(PropTypes.number),\n ownCompanies: PropTypes.arrayOf(PropTypes.string),\n invoicingType: PropTypes.number,\n invoiceSchedule: PropTypes.string,\n assignmentTemplateId: PropTypes.string,\n assistant: PropTypes.string,\n responsible: PropTypes.string,\n withLabels: PropTypes.arrayOf(PropTypes.string), // Guids\n withoutLabels: PropTypes.arrayOf(PropTypes.string), // Guids\n teamCodes: PropTypes.arrayOf(PropTypes.number),\n relationGroups: PropTypes.arrayOf(PropTypes.number),\n associate: PropTypes.string,\n assistantBackup: PropTypes.string,\n billingUser: PropTypes.string,\n seniorUser: PropTypes.string,\n includeInactive: PropTypes.bool,\n }),\n showHours: PropTypes.bool,\n onShowHoursChanged: PropTypes.func,\n intl: intlShape.isRequired,\n };\n static defaultProps = {\n filters: defaultFilters,\n showHours: false,\n onShowHoursChanged: () => {},\n };\n\n hasAssignments = hasAssignments();\n\n componentDidMount() {\n const { intl, filters } = this.props;\n\n this.assignmentsEnabled = hasAssignments();\n const scheduleEndpoint = `${config.appUrls.api}/api/invoiceschedule/get`;\n const labelEndpoint = `${config.appUrls.api}/api/Resource/Tags`;\n\n Promise.all([\n api.base.get(scheduleEndpoint),\n api.base.get(labelEndpoint),\n enumCache.get('invoicingtype'),\n ]).then(([{ data: schedules }, { data: labels }, types]) => {\n this.setState({\n invoiceSchedule: [\n {\n key: '1;-1',\n label: intl.formatMessage(messages.NoInvoicingSchedule),\n },\n {\n key: '2;11111111-1111-1111-1111-111111111111',\n label: intl.formatMessage(messages.WithInvoicingSchedule),\n },\n ...types\n .map(x => ({\n key: `1;${x.key}`,\n label: intl.formatMessage(listItemMsg('invoicingtype', x.key, x.value)),\n }))\n .sort(dynamicSort('label')),\n ...schedules\n .map(x => ({\n key: `2;${x.id}`,\n label: intl.formatMessage(listItemMsg('invoiceSchedule', x.id, x.name)),\n }))\n .sort(dynamicSort('label')),\n ],\n labels: labels\n .map(x => ({ id: x.id, label: x.name, sort: x.name.toLowerCase() }))\n .sort(dynamicSort('sort')),\n\n dynamicFilters: initDynamicFilters(\n intl,\n allDynamicFilters,\n userStorage.getItem(dynamicFiltersStorageKey) || [],\n filters,\n defaultFilters,\n ),\n });\n });\n }\n\n filterChanged = filter => {\n const { filters, onFilterChange } = this.props;\n const newFilters = { ...filters, ...filter };\n\n if (JSON.stringify(filters) !== JSON.stringify(newFilters)) onFilterChange(newFilters);\n };\n dynamicFilterChanged = (item, selected) => {\n this.setState(({ dynamicFilters }) => {\n const { filters } = this.props;\n const newFilters = handleDynamicFiltersChanged(\n dynamicFilters,\n item,\n selected,\n filters,\n defaultFilters,\n );\n userStorage.setItem(\n dynamicFiltersStorageKey,\n newFilters.filter(x => x.selected).map(x => x.id),\n );\n if (\n !selected &&\n item.id !== 'selectAll' &&\n !isEqual(filters[item.id], defaultFilters[item.id])\n ) {\n // Reset filter when it's removed\n this.filterChanged({ [item.id]: defaultFilters[item.id] });\n }\n return { dynamicFilters: newFilters };\n });\n };\n savedFilterChanged = filters => {\n const { onFilterChange } = this.props;\n const newFilters = { ...defaultFilters, ...filters };\n if (typeof newFilters.dateFrom === 'string') newFilters.dateFrom = moment.utc(filters.dateFrom);\n if (typeof newFilters.dateUntil === 'string')\n newFilters.dateUntil = moment.utc(filters.dateUntil);\n\n if (newFilters.period) {\n const [dateFrom, dateUntil] = getPeriodStartEndDates(newFilters.period);\n newFilters.dateFrom = dateFrom;\n newFilters.dateUntil = dateUntil;\n }\n\n onFilterChange(newFilters);\n\n this.setState(({ dynamicFilters }) => ({\n dynamicFilters: resetDynamicFilters(dynamicFilters, newFilters, defaultFilters),\n }));\n };\n dateChanged = (dateFrom, dateUntil) => {\n this.filterChanged({ dateFrom, dateUntil, period: null });\n };\n relationChanged = item => {\n if (!item || !item.id) {\n this.filterChanged({ relationId: null, relationName: null });\n } else {\n this.filterChanged({\n relationId: item.key,\n relationName: item.label,\n });\n }\n };\n scheduleChanged = item => {\n if (!item || !item.key) {\n this.filterChanged({\n invoicingType: null,\n invoiceSchedule: null,\n });\n return;\n }\n const [type, id] = item.key.split(';');\n if (type === '1') {\n this.filterChanged({\n invoicingType: parseInt(id),\n invoiceSchedule: null,\n });\n } else if (type === '2') {\n this.filterChanged({\n invoicingType: null,\n invoiceSchedule: id,\n });\n } else {\n this.filterChanged({\n invoicingType: null,\n invoiceSchedule: null,\n });\n }\n };\n\n resetFilters = () => {\n this.filterChanged({ ...defaultFilters });\n };\n\n renderDynamicFilter = ({ type, filters, intl }) => {\n switch (type) {\n case 'includeInactive':\n return (\n
    \n
    \n \n
    \n
    \n );\n default:\n console.warn(`Missing filter: ${type}`);\n return null;\n }\n };\n\n render() {\n const { invoiceSchedule, labels, dynamicFilters } = this.state;\n const { filters, intl, showHours, onShowHoursChanged } = this.props;\n const initRelation = filters.relationId\n ? {\n key: filters.relationId,\n label: filters.relationName,\n invoiceStreamId: filters.invoiceStreamId,\n }\n : null;\n\n let selectedSchedule = null;\n if (filters.invoicingType) {\n selectedSchedule = invoiceSchedule.find(x => x.key === `1;${filters.invoicingType}`);\n } else if (filters.invoiceSchedule) {\n selectedSchedule = invoiceSchedule.find(x => x.key === `2;${filters.invoiceSchedule}`);\n }\n\n const visibleFilters = dynamicFilters.filter(x => x.selected).map(x => x.id);\n return (\n \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n this.filterChanged({ invoicingType: null, invoiceSchedule: null })}\n value={selectedSchedule}\n items={invoiceSchedule}\n placeholder={intl.formatMessage(messages.InvoiceSchedule)}\n mode=\"edit\"\n />\n
    \n
    \n
    \n
    \n this.dateChanged(startDate, endDate)}\n startDatePlaceholderText={intl.formatMessage(messages.InvoiceDateFrom)}\n endDatePlaceholderText={intl.formatMessage(messages.InvoiceDateUntil)}\n block\n />\n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n {visibleFilters && visibleFilters.length > 0\n ? visibleFilters.map(id => (\n \n ))\n : null}\n
    \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n );\n }\n}\n\nexport default injectIntl(RelationRentabilityFilters);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport Axios from 'axios';\nimport classnames from 'classnames';\nimport { FaCog, FaFileExcel } from 'react-icons/fa';\n\nimport SimplePanel from '@/shared/components/SimplePanel';\nimport { FormattedMessage, injectIntl, useIntl } from 'react-intl';\nimport moment from 'moment';\nimport intlShape from '@/shared/utils/intlShape';\nimport RelationName from '@/shared/components/RelationName';\nimport LoadingAnimation from '@/shared/components/LoadingAnimation';\nimport FormattedCurrency from '@/shared/components/FormattedCurrency';\nimport enumCache from '@/shared/services/EnumCacheService';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport { showWhenPermission } from '@/shared/components/security';\nimport { injectStateService } from '@/shared/services/StateService';\nimport Button from '@/shared/components/Button';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport SignalRService from '@/shared/services/SignalRService';\nimport ToastrService from '@/shared/services/ToastrService';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport { mapInvoiceStreamName } from '@/shared/services/ObjectDisplayService';\nimport userStorage from '@/shared/services/userStorage';\nimport CheckboxListModal from '@/shared/components/CheckboxListModal';\nimport ScrollArrow from '@/shared/components/ScrollArrow';\nimport RelationRentabilityFilters, { defaultFilters } from './RelationRentabilityFilters';\nimport messages from '../reportingMessages';\nimport NavigateToState from '../../../shared/components/NavigateToState';\nimport { functionalities, privileges } from '@/shared/services/AuthService';\n\nconst SessionStorageKey = 'RelationRentabilityReportParams';\nconst columnSelectionStorageKey = 'RelationRentabilityReportHiddenColumns';\n\n// Init prop= visible on init\nconst columnDefinitions = [\n { id: 'invoicingType', message: messages.InvoicingType, init: true },\n { id: 'registeredHours', message: messages.RegisteredHours, init: true },\n { id: 'billedHours', message: messages.BilledHours, init: true },\n { id: 'addedHours', message: messages.AddedHours, init: false },\n { id: 'removedHours', message: messages.RemovedHours, init: false },\n { id: 'inForfaitHours', message: messages.InForfait, init: true },\n { id: 'registeredCosts', message: messages.RegisteredCosts, init: true },\n { id: 'billedCosts', message: messages.BilledCosts, init: true },\n { id: 'fixedAmounts', message: messages.FixedAmountOrAdvance, init: true },\n { id: 'freeLines', message: messages.FreeLines, init: true },\n { id: 'turnover', message: messages.Turnover, init: true },\n { id: 'internalCost', message: messages.InternalCost, init: false },\n { id: 'profit', message: messages.Profit, init: false },\n { id: 'turnoverMinRegistered', message: messages.Rentability, init: true },\n { id: 'openRegisteredHours', message: messages.OpenRegisteredHours, init: true },\n { id: 'openRegisteredCosts', message: messages.OpenRegisteredCosts, init: false },\n { id: 'neverInvoiceRegisteredHours', message: messages.NeverInvoiceRegisteredHours, init: false },\n { id: 'neverInvoiceRegisteredCosts', message: messages.NeverInvoiceRegisteredCosts, init: false },\n];\n\nclass RelationRentabilityContainer extends Component {\n state = {\n reportFilters: {},\n rows: null,\n showHours: false,\n };\n\n constructor(props) {\n super(props);\n const { searchParams = {}, intl } = props;\n const sessionParams = JSON.parse(sessionStorage.getItem(SessionStorageKey)) || {};\n\n if (sessionParams.dateFrom) {\n sessionParams.dateFrom = moment(sessionParams.dateFrom);\n }\n if (sessionParams.dateUntil) {\n sessionParams.dateUntil = moment(sessionParams.dateUntil);\n }\n const columnsFromStorage = userStorage.getItem(columnSelectionStorageKey);\n const initColumns = typeof columnsFromStorage === 'undefined' || columnsFromStorage === null;\n\n const hiddenColumns = columnsFromStorage || [];\n const hideableColumns = columnDefinitions.map(({ id, message, init = true }) => ({\n id,\n label: intl.formatMessage(message),\n selected: !initColumns ? hiddenColumns.indexOf(id) === -1 : !!init,\n }));\n const columnStatus = hideableColumns.reduce((o, col) => {\n // eslint-disable-next-line no-param-reassign\n o[col.id] = !!col.selected;\n return o;\n }, {});\n\n this.state = {\n ...this.state,\n reportFilters: {\n ...defaultFilters,\n ...sessionParams,\n ...searchParams,\n },\n hideableColumns,\n columnStatus,\n showColumnSelectionModal: false,\n showHours: !!sessionStorage.getItem('RelationRentabilityReportShowHours'),\n };\n }\n\n componentDidMount() {\n const { intl } = this.props;\n\n this.assignmentsEnabled = DataCacheService.assignmentsEnabled();\n this.retrieve();\n\n enumCache.get('invoicingtype').then(invoicingtypes => {\n this.invoicingtypes = invoicingtypes.reduce(\n (o, item) => ({\n ...o,\n [item.key]: intl.formatMessage(listItemMsg('invoicingtype', item.key, item.value)),\n }),\n {},\n );\n });\n }\n\n componentWillUnmount() {\n if (typeof this.reportToken !== typeof undefined) {\n this.reportToken.cancel('Operation canceled due to leaving page.');\n }\n }\n\n getParams() {\n const { reportFilters } = this.state;\n const {\n relationId,\n dateFrom: from,\n dateUntil: until,\n relationTypes,\n invoicingType,\n ownCompanies,\n responsible,\n assistant,\n assignmentTemplateId,\n invoiceSchedule,\n withLabels,\n withoutLabels,\n teamCodes,\n associate,\n assistantBackup,\n billingUser,\n seniorUser,\n includeInactive,\n filterBehaviours,\n relationGroups,\n } = reportFilters;\n\n return {\n relationId,\n from,\n until,\n relationTypes,\n invoicingType,\n ownCompanies,\n responsible,\n assistant,\n assignmentTemplateId,\n invoiceSchedule,\n withLabels,\n withoutLabels,\n teamCodes,\n associate,\n assistantBackup,\n billingUser,\n seniorUser,\n includeInactive,\n filterBehaviours,\n relationGroups,\n };\n }\n\n retrieve() {\n const { reportFilters } = this.state;\n\n const params = this.getParams();\n\n const sessionParams = JSON.stringify(reportFilters);\n sessionStorage.setItem(SessionStorageKey, sessionParams);\n\n if (typeof this.reportToken !== typeof undefined) {\n this.reportToken.cancel('Operation canceled due to new request.');\n }\n this.reportToken = Axios.CancelToken.source();\n this.setState({ rows: null });\n return api.base\n .post(`${config.appUrls.reporting}/api/relationrentability`, params, {\n cancelToken: this.reportToken.token,\n })\n .then(({ data }) => {\n this.setState(state => ({\n ...state,\n rows: data,\n }));\n return data;\n })\n .catch(error => {\n if (!Axios.isCancel(error)) return error;\n });\n }\n\n createExcelReport = () => {\n const { intl } = this.props;\n\n const reportParams = this.getParams();\n const languageCode = intl.locale;\n\n const params = {\n language: languageCode,\n signalRConnectionId: SignalRService.getConnectionId(),\n report: 1,\n parameters: JSON.stringify(reportParams),\n };\n\n return api.base\n .post(`${config.appUrls.reporting}/api/export`, params)\n .then(() => {\n ToastrService.info(intl.formatMessage(messages.ExportToExcelStarted));\n })\n .catch(error => {\n handleHttpError(intl)(error);\n });\n };\n\n filtersChanged(filters) {\n this.setState(\n state => ({\n ...state,\n reportFilters: {\n ...state.reportFilters,\n ...filters,\n },\n }),\n () => this.retrieve(),\n );\n }\n\n handleColumnSelection = items => {\n let hiddenColumns = items.filter(x => !x.selected).map(x => x.id);\n // Clear selection if all are hidden or none are hidden\n if (hiddenColumns.length === items.length || hiddenColumns.length === 0) hiddenColumns = [];\n userStorage.setItem(columnSelectionStorageKey, hiddenColumns);\n\n const { hideableColumns } = this.state;\n\n const newHideableColumns = hideableColumns.map(x => ({\n ...x,\n selected: hiddenColumns.indexOf(x.id) === -1,\n }));\n const columnStatus = newHideableColumns.reduce((o, col) => {\n // eslint-disable-next-line no-param-reassign\n o[col.id] = !!col.selected;\n return o;\n }, {});\n\n this.setState({\n hideableColumns: newHideableColumns,\n columnStatus,\n showColumnSelectionModal: false,\n });\n };\n\n renderHoursColumn = value => (\n \n {(value || 0).toTime()}\n \n );\n renderHoursColumnWithNavigation = (value, stateName, navigationProps = {}) => (\n \n \n {(value || 0).toTime()}\n \n \n );\n renderAmountColumn = value => (\n \n \n \n );\n renderAmountColumnWithNavigation = (value, stateName, navigationProps = {}) => (\n \n \n \n \n \n );\n renderHoursOrAmount = (isHours, hoursValue, amountValue) =>\n isHours ? this.renderHoursColumn(hoursValue) : this.renderAmountColumn(amountValue);\n renderHoursOrAmountWithNavigation = (\n isHours,\n hoursValue,\n amountValue,\n stateName,\n navigationProps = {},\n ) =>\n isHours\n ? this.renderHoursColumnWithNavigation(hoursValue, stateName, navigationProps)\n : this.renderAmountColumnWithNavigation(amountValue, stateName, navigationProps);\n\n calculateTotal = (rows, property) =>\n rows.reduce((sum, { [property]: value = 0 }) => sum + value, 0);\n\n showHoursChanged = value => {\n sessionStorage.setItem('RelationRentabilityReportShowHours', value);\n this.setState({ showHours: value });\n };\n\n renderRow = (row, showHours, showAssignments) => {\n const { intl } = this.props;\n const { columnStatus, reportFilters } = this.state;\n\n const now = moment.utc();\n const relation = {\n id: row.relationId,\n type: row.relationType,\n name: row.relationDisplayName,\n alias: row.relationAlias,\n isActive:\n !row.relationEndDate ||\n (row.relationEndDate && moment.utc(row.relationEndDate).isAfter(now)),\n };\n const dateFrom = reportFilters.dateFrom ? moment(reportFilters.dateFrom).toDate() : null;\n const dateUntil = reportFilters.dateUntil ? moment(reportFilters.dateUntil).toDate() : null;\n\n return (\n \n this.setState(state => ({\n ...state,\n rows: state.rows.map(x => ({\n ...x,\n selected: x.relationId === row.relationId,\n })),\n }))\n }\n >\n \n \n \n {showAssignments ? {mapInvoiceStreamName(row, intl, '')} : null}\n {columnStatus.invoicingType && (\n \n {!row.invoicingType && row.invoicingType !== 0 ? (\n \n ) : (\n this.invoicingtypes[row.invoicingType]\n )}\n \n )}\n {columnStatus.registeredHours &&\n this.renderHoursOrAmountWithNavigation(\n showHours,\n row.registeredHours,\n row.registeredHoursAmount,\n 'registrations.overview',\n {\n stateParams: {\n relationId: row.relationId,\n relation,\n finalInvoiceStreamId: row.invoiceStreamId,\n period: 'all',\n invoiceDateFrom: dateFrom,\n invoiceDateUntil: dateUntil,\n filters: {\n type: { items: [0] },\n },\n },\n },\n )}\n\n {columnStatus.billedHours &&\n this.renderHoursOrAmount(showHours, row.billedHours, row.billedHoursAmount)}\n {columnStatus.inForfaitHours &&\n this.renderHoursOrAmountWithNavigation(\n showHours,\n row.inForfaitHours,\n row.inForfaitHoursAmount,\n 'registrations.overview',\n {\n stateParams: {\n relationId: row.relationId,\n relation,\n finalInvoiceStreamId: row.invoiceStreamId,\n period: 'all',\n invoiceDateFrom: dateFrom,\n invoiceDateUntil: dateUntil,\n filters: {\n type: { items: [0] },\n forfaitStatus: { items: [2] },\n },\n },\n },\n )}\n {columnStatus.addedHours &&\n this.renderHoursOrAmount(showHours, row.addedHours, row.addedHoursAmount)}\n {columnStatus.removedHours &&\n this.renderHoursOrAmount(showHours, row.removedHours, row.removedHoursAmount)}\n\n {columnStatus.registeredCosts &&\n this.renderAmountColumnWithNavigation(row.registeredCosts, 'registrations.overview', {\n stateParams: {\n relationId: row.relationId,\n relation,\n finalInvoiceStreamId: row.invoiceStreamId,\n period: 'all',\n invoiceDateFrom: dateFrom,\n invoiceDateUntil: dateUntil,\n filters: {\n type: { items: [1, 2] },\n },\n },\n })}\n {columnStatus.billedCosts && this.renderAmountColumn(row.billedCosts)}\n {columnStatus.fixedAmounts && this.renderAmountColumn(row.fixedAmounts)}\n {columnStatus.freeLines && this.renderAmountColumn(row.freeLines)}\n {columnStatus.turnover &&\n this.renderAmountColumnWithNavigation(row.turnover, 'invoicing.overview', {\n stateParams: {\n relationId: row.relationId,\n relation,\n invoiceStreamId: row.invoiceStreamId,\n dateFrom,\n dateUntil,\n invoiceDateFrom: null,\n invoiceDateUntil: null,\n },\n functionality: 'InvoiceFinal',\n permission: 'Read',\n })}\n {columnStatus.internalCost && this.renderAmountColumn(row.internalCost)}\n {columnStatus.profit && this.renderAmountColumn(row.profit)}\n {columnStatus.turnoverMinRegistered && this.renderAmountColumn(row.turnoverMinRegistered)}\n {columnStatus.openRegisteredHours &&\n this.renderHoursOrAmountWithNavigation(\n showHours,\n row.openRegisteredHours,\n row.openRegisteredHoursAmount,\n 'registrations.overview',\n {\n stateParams: {\n relationId: row.relationId,\n relation,\n finalInvoiceStreamId: row.invoiceStreamId,\n period: 'all',\n filters: {\n invoiceStatus: { items: [0, 1] },\n type: { items: [0] },\n },\n },\n },\n )}\n\n {columnStatus.openRegisteredCosts &&\n this.renderAmountColumnWithNavigation(row.openRegisteredCosts, 'registrations.overview', {\n stateParams: {\n relationId: row.relationId,\n relation,\n finalInvoiceStreamId: row.invoiceStreamId,\n period: 'all',\n filters: {\n invoiceStatus: { items: [0, 1] },\n type: { items: [1, 2] },\n },\n },\n })}\n {columnStatus.neverInvoiceRegisteredHours &&\n this.renderHoursOrAmountWithNavigation(\n showHours,\n row.neverInvoiceRegisteredHours,\n row.neverInvoiceRegisteredHoursAmount,\n 'registrations.overview',\n {\n stateParams: {\n relationId: row.relationId,\n relation,\n finalInvoiceStreamId: row.invoiceStreamId,\n period: 'all',\n filters: {\n invoiceStatus: { items: [-1] },\n type: { items: [0] },\n },\n },\n },\n )}\n\n {columnStatus.neverInvoiceRegisteredCosts &&\n this.renderAmountColumnWithNavigation(\n row.neverInvoiceRegisteredCosts,\n 'registrations.overview',\n {\n stateParams: {\n relationId: row.relationId,\n relation,\n finalInvoiceStreamId: row.invoiceStreamId,\n period: 'all',\n filters: {\n invoiceStatus: { items: [-1] },\n type: { items: [1, 2] },\n },\n },\n },\n )}\n \n );\n };\n\n render() {\n const { intl } = this.props;\n const {\n reportFilters,\n rows,\n showHours,\n showColumnSelectionModal,\n columnStatus,\n hideableColumns,\n } = this.state;\n const showAssignments = this.assignmentsEnabled && !!rows && rows.some(x => !!x.assignmentId);\n\n return (\n
    \n \n
    \n this.filtersChanged(filters)}\n showHours={showHours}\n onShowHoursChanged={this.showHoursChanged}\n />\n
    \n \n {showColumnSelectionModal ? (\n this.setState({ showColumnSelectionModal: false })}\n show={showColumnSelectionModal}\n sortByLabel={false}\n />\n ) : null}\n {rows ? (\n <>\n
    \n
    \n this.setState({ showColumnSelectionModal: true })}\n >\n \n \n \n \n \n this.createExcelReport()}\n showProgress\n >\n \n \n \n {intl.formatMessage(messages.ExportToExcel)}\n \n
    \n
    \n \n \n \n \n {showAssignments ? (\n \n ) : null}\n {columnStatus.invoicingType && (\n \n )}\n {columnStatus.registeredHours && (\n \n )}\n {columnStatus.billedHours && (\n \n )}\n {columnStatus.inForfaitHours && (\n \n )}\n {columnStatus.addedHours && (\n \n )}\n {columnStatus.removedHours && (\n \n )}\n {columnStatus.registeredCosts && (\n \n )}\n {columnStatus.billedCosts && (\n \n )}\n {columnStatus.fixedAmounts && (\n \n )}\n {columnStatus.freeLines && (\n \n )}\n {columnStatus.turnover && (\n \n )}\n {columnStatus.internalCost && (\n \n )}\n {columnStatus.profit && (\n \n \n \n )}\n {columnStatus.turnoverMinRegistered && (\n \n \n \n )}\n {columnStatus.openRegisteredHours && (\n \n )}\n {columnStatus.openRegisteredCosts && (\n \n )}\n {columnStatus.neverInvoiceRegisteredHours && (\n \n )}\n {columnStatus.neverInvoiceRegisteredCosts && (\n \n )}\n \n \n {rows.map(item => this.renderRow(item, showHours, showAssignments))}\n \n \n \n {columnStatus.registeredHours &&\n showHours &&\n this.renderHoursColumn(this.calculateTotal(rows, 'registeredHours'))}\n {columnStatus.registeredHours &&\n !showHours &&\n this.renderAmountColumn(this.calculateTotal(rows, 'registeredHoursAmount'))}\n {columnStatus.billedHours &&\n showHours &&\n this.renderHoursColumn(this.calculateTotal(rows, 'billedHours'))}\n {columnStatus.billedHours &&\n !showHours &&\n this.renderAmountColumn(this.calculateTotal(rows, 'billedHoursAmount'))}\n {columnStatus.inForfaitHours &&\n showHours &&\n this.renderHoursColumn(this.calculateTotal(rows, 'inForfaitHours'))}\n {columnStatus.inForfaitHours &&\n !showHours &&\n this.renderAmountColumn(this.calculateTotal(rows, 'inForfaitHoursAmount'))}\n {columnStatus.addedHours &&\n showHours &&\n this.renderHoursColumn(this.calculateTotal(rows, 'addedHours'))}\n {columnStatus.addedHours &&\n !showHours &&\n this.renderAmountColumn(this.calculateTotal(rows, 'addedhoursAmount'))}\n {columnStatus.removedHours &&\n showHours &&\n this.renderHoursColumn(this.calculateTotal(rows, 'removedHours'))}\n {columnStatus.removedHours &&\n !showHours &&\n this.renderAmountColumn(this.calculateTotal(rows, 'removedHoursAmount'))}\n\n {columnStatus.registeredCosts &&\n this.renderAmountColumn(this.calculateTotal(rows, 'registeredCosts'))}\n {columnStatus.billedCosts &&\n this.renderAmountColumn(this.calculateTotal(rows, 'billedCosts'))}\n {columnStatus.fixedAmounts &&\n this.renderAmountColumn(this.calculateTotal(rows, 'fixedAmounts'))}\n {columnStatus.freeLines &&\n this.renderAmountColumn(this.calculateTotal(rows, 'freeLines'))}\n {columnStatus.turnover &&\n this.renderAmountColumn(this.calculateTotal(rows, 'turnover'))}\n {columnStatus.internalCost &&\n this.renderAmountColumn(this.calculateTotal(rows, 'internalCost'))}\n {columnStatus.profit &&\n this.renderAmountColumn(this.calculateTotal(rows, 'profit'))}\n {columnStatus.turnoverMinRegistered &&\n this.renderAmountColumn(this.calculateTotal(rows, 'turnoverMinRegistered'))}\n\n {columnStatus.openRegisteredHours &&\n showHours &&\n this.renderHoursColumn(this.calculateTotal(rows, 'openRegisteredHours'))}\n {columnStatus.openRegisteredHours &&\n !showHours &&\n this.renderAmountColumn(this.calculateTotal(rows, 'openRegisteredHoursAmount'))}\n\n {columnStatus.openRegisteredCosts &&\n this.renderAmountColumn(this.calculateTotal(rows, 'openRegisteredCosts'))}\n\n {columnStatus.neverInvoiceRegisteredHours &&\n showHours &&\n this.renderHoursColumn(\n this.calculateTotal(rows, 'neverInvoiceRegisteredHours'),\n )}\n {columnStatus.neverInvoiceRegisteredHours &&\n !showHours &&\n this.renderAmountColumn(\n this.calculateTotal(rows, 'neverInvoiceRegisteredHoursAmount'),\n )}\n\n {columnStatus.neverInvoiceRegisteredCosts &&\n this.renderAmountColumn(\n this.calculateTotal(rows, 'neverInvoiceRegisteredCosts'),\n )}\n \n \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n
    \n \n \n ) : (\n \n )}\n
    \n );\n }\n}\n\nRelationRentabilityContainer.propTypes = {\n intl: intlShape.isRequired,\n searchParams: PropTypes.shape({ relationId: PropTypes.string }),\n};\n\nRelationRentabilityContainer.defaultProps = {\n searchParams: {},\n};\n\nexport default showWhenPermission(\n functionalities.RentabilityReport,\n privileges.Read,\n)(injectStateService(injectIntl(RelationRentabilityContainer)));\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\n\nimport EditableToggle from './EditableToggle';\n\nconst EditableTextbox = ({\n onChange,\n value,\n submitOnBlur,\n inputClassName,\n readOnly,\n placeholder,\n displayValue,\n displayClassName,\n ...rest\n}) => (\n \n {({ inputValue, handleChange, inputRef, submit, cancel, handleKeyDown }) => (\n \n )}\n \n);\n\nEditableTextbox.propTypes = {\n onChange: PropTypes.func.isRequired,\n value: PropTypes.string,\n submitOnBlur: PropTypes.bool,\n placeholder: PropTypes.string,\n inputClassName: PropTypes.string,\n displayClassName: PropTypes.string,\n readOnly: PropTypes.bool,\n displayValue: PropTypes.node,\n};\nEditableTextbox.defaultProps = {\n submitOnBlur: true,\n inputClassName: '',\n displayClassName: '',\n placeholder: '',\n readOnly: false,\n displayValue: null,\n value: null,\n};\n\nexport default EditableTextbox;\n","import { defineMessages } from 'react-intl';\n\nconst messages = defineMessages({\n AssignmentTemplates: 'Assignment templates',\n NoAssignmentTemplates: 'There are no assignment templates',\n Add: 'Add',\n AddAssignmentTemplate: 'Add assignment template',\n AddTaskTemplate: 'Add task template',\n TaskTemplate: 'Task template',\n TaskPeriodicity: 'Task periodicity',\n TaskTemplates: 'Task templates',\n NoDefault: 'No default',\n SelectTaskTemplate: 'Select task template',\n DefaultTaskPeriodicity: 'Default task periodicity',\n ChoosePeriodicityWhenCreatingAssignment: 'Choose peridocity when creating assignment',\n Name: 'Name',\n AppliesToPerson: 'Applies to person',\n AppliesToSoleProprietor: 'Applies to sole proprietor',\n AppliesToCompany: 'Applies to company',\n Cancel: 'Cancel',\n DeleteAssignmentTemplate: 'Delete assignment template?',\n DeleteAssignmentTemplateConfirmationMsg:\n 'Are you sure you want to delete this assignment template?',\n Code: 'Code',\n DefaultAssignment: 'Default assignment',\n ConfigureAllowResources: 'Configure allowed resources',\n ConfigureAllowResourcesForDefaultAssignment: 'Configure allowed resources for default assignment',\n Save: 'Save',\n Close: 'Close',\n Search: 'Search',\n Allowed: 'Allowed',\n NoItems: 'No items',\n});\n\nexport default messages;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport Modal from 'react-bootstrap/lib/Modal';\nimport classnames from 'classnames';\nimport { FormattedMessage, injectIntl, useIntl } from 'react-intl';\nimport Button from '@/shared/components/Button';\nimport Toggle from 'react-toggle';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport intlShape from '@/shared/utils/intlShape';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport messages from './assignmentTemplateMessages';\nimport TranslateListItem from '../../../shared/components/translations/TranslateListItem';\nimport translationHelper from '../../../shared/components/translations/TranslationHelper';\n\nclass AddAssignmentTemplateModal extends Component {\n state = {\n template: {\n name: '',\n appliesToPerson: true,\n appliesToSoleProprietor: true,\n appliesToCompany: true,\n },\n translations: null,\n showValidation: false,\n saving: false,\n };\n\n componentDidMount() {\n translationHelper.create('assignmenttemplate').then(translations => {\n this.setState({ translations });\n });\n }\n\n save = () => {\n const { saving, template, translations } = this.state;\n const { onClose } = this.props;\n if (!this.isValid() || saving) return '';\n this.setState({ saving: true });\n\n return api.base\n .post(`${config.appUrls.api}/api/AssignmentTemplate`, template)\n .then(({ data }) => {\n if (!data) return data;\n if (!template.id && data.id) {\n // Create request is finished, save translations before handling the result\n return translationHelper\n .save(translationHelper.setKey(translations, 'assignmenttemplate', data.id))\n .then(() => data); // Return the original result (not the translation result)\n }\n return data;\n })\n .then(\n data => {\n if (!data) return '';\n onClose(data);\n return data;\n },\n error => {\n const { intl } = this.props;\n handleHttpError(intl)(error);\n return error;\n },\n )\n .finally(() => {\n if (typeof this !== 'undefined') this.setState({ saving: false });\n });\n };\n\n updateTemplate = changes => {\n this.setState(({ template }) => ({ template: { ...template, ...changes } }));\n };\n changeName = name => this.updateTemplate({ name });\n updateTranslations = translations => this.setState({ translations });\n\n showValidation = () => {\n const { showValidation } = this.state;\n if (!showValidation) this.setState({ showValidation: true });\n };\n\n isValid = () => {\n const { template, translations } = this.state;\n\n if (translations && !translationHelper.validate(translations)) {\n return false;\n }\n return (\n !!template &&\n !!template.name &&\n (template.appliesToPerson || template.appliesToSoleProprietor || template.appliesToCompany) // At least 1 checked\n );\n };\n\n render() {\n const { onClose, intl } = this.props;\n const { template, showValidation, saving, translations } = this.state;\n\n const isValid = this.isValid();\n const appliesToInvalid =\n !template.appliesToPerson && !template.appliesToSoleProprietor && !template.appliesToCompany;\n return (\n onClose(null)} keyboard={false}>\n \n \n \n \n \n \n
    \n
    \n \n
    \n this.updateTemplate({ code: e.target.value })}\n className={classnames('form-control')}\n placeholder={intl.formatMessage(messages.Code)}\n autoComplete=\"off\"\n disabled={saving}\n />\n
    \n
    \n {translations && (\n \n )}\n \n
    \n \n
    \n
    \n \n
    \n \n
    \n \n \n
    \n \n
    \n \n \n
    \n \n \n this.save()}\n disabled={showValidation && !isValid}\n onFocus={this.showValidation}\n onMouseOver={this.showValidation}\n btnClassName=\"btn-inverse\"\n showProgress\n >\n \n \n \n
    \n );\n }\n}\n\nAddAssignmentTemplateModal.propTypes = {\n intl: intlShape.isRequired,\n onClose: PropTypes.func.isRequired,\n};\n\nexport default injectIntl(AddAssignmentTemplateModal);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport Modal from 'react-bootstrap/lib/Modal';\nimport classnames from 'classnames';\nimport { injectIntl, FormattedMessage } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport Button from '@/shared/components/Button';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport messages from './assignmentTemplateMessages';\n\nclass AddTaskTemplateModal extends Component {\n constructor(props) {\n super(props);\n const { assignmentTemplateId } = props;\n this.state = {\n template: {\n assignmentTemplateId,\n taskTemplateId: null,\n taskPeriodicityId: null,\n },\n showValidation: false,\n saving: false,\n };\n }\n\n save = () => {\n const { saving, template } = this.state;\n const { onClose } = this.props;\n if (!this.isValid() || saving) return '';\n this.setState({ saving: true });\n\n return api.base\n .post(`${config.appUrls.tasks}/api/AssignmentTemplate`, template)\n .then(\n ({ data }) => {\n if (!data) return '';\n\n onClose(data);\n return data;\n },\n error => {\n const { intl } = this.props;\n handleHttpError(intl)(error);\n return error;\n },\n )\n .finally(() => {\n if (typeof this !== 'undefined') this.setState({ saving: false });\n });\n };\n\n updateTemplate = changes => {\n this.setState(({ template }) => ({ template: { ...template, ...changes } }));\n };\n showValidation = () => {\n const { showValidation } = this.state;\n if (!showValidation) this.setState({ showValidation: true });\n };\n\n isValid = () => {\n const { template } = this.state;\n return !!template.taskTemplateId;\n };\n render() {\n const { onClose, intl, taskTemplates } = this.props;\n const { template, showValidation, saving } = this.state;\n\n const isValid = this.isValid();\n const selectedTaskTemplate = template.taskTemplateId\n ? taskTemplates.find(x => x.id === template.taskTemplateId)\n : null;\n const { periodicities = [] } = selectedTaskTemplate || {};\n\n return (\n onClose(null)} keyboard={false}>\n \n \n \n \n \n \n
    \n \n \n
    \n \n this.updateTemplate({ taskTemplateId: e.target.value, taskPeriodicityId: null })\n }\n >\n {!template.taskTemplateId && (\n \n )}\n {taskTemplates.map(task => (\n \n ))}\n \n
    \n
    \n {periodicities && periodicities.length > 0 && (\n
    \n \n
    \n \n this.updateTemplate({\n taskPeriodicityId: e.target.value || null,\n })\n }\n >\n \n {periodicities.map(per => (\n \n ))}\n \n
    \n
    \n )}\n \n
    \n \n \n this.save()}\n disabled={showValidation && !isValid}\n onFocus={this.showValidation}\n onMouseOver={this.showValidation}\n btnClassName=\"btn-inverse\"\n showProgress\n >\n \n \n \n
    \n );\n }\n}\n\nAddTaskTemplateModal.propTypes = {\n intl: intlShape.isRequired,\n onClose: PropTypes.func.isRequired,\n assignmentTemplateId: PropTypes.string.isRequired,\n taskTemplates: PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.string.isRequired,\n label: PropTypes.string.isRequired,\n periodicities: PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.string.isRequired,\n label: PropTypes.string.isRequired,\n }),\n ),\n }),\n ).isRequired,\n};\n\nexport default injectIntl(AddTaskTemplateModal);\n","import React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage, defineMessages, injectIntl, useIntl } from 'react-intl';\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport intlShape from '@/shared/utils/intlShape';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport FormattedListValue from '@/shared/components/FormattedListValue';\nimport LoadingAnimation from '@/shared/components/LoadingAnimation';\nimport translationHelper from './TranslationHelper';\nimport TranslateListItem from './TranslateListItem';\n\nconst messages = defineMessages({\n Translate: 'Translate',\n});\n\nclass TranslateListItemModal extends PureComponent {\n state = {\n translations: null,\n saving: false,\n showValidationErrors: false,\n };\n\n loadTranslations = () => {\n const { list, listId, fallback, intl } = this.props;\n return translationHelper.retrieve(list, listId, fallback).then(translations => {\n this.setState({ translations, showValidationErrors: false });\n }, handleHttpError(intl));\n };\n\n componentDidMount() {\n const { show } = this.props;\n if (show) this.loadTranslations();\n }\n\n componentDidUpdate(oldProps) {\n const { list, listId, show } = this.props;\n const { translations } = this.state;\n if (list !== oldProps.list || listId !== oldProps.listId) {\n // eslint-disable-next-line react/no-did-update-set-state\n this.setState({ translations: null }, () => {\n if (show) {\n this.loadTranslations();\n }\n });\n } else if (!oldProps.show && show && !translations) {\n this.loadTranslations();\n }\n }\n updateTranslations = translations => {\n this.setState({ translations });\n };\n\n saveTranslations = () => {\n const { translations } = this.state;\n const { intl, onClose, list, listId } = this.props;\n if (!translationHelper.validate(translations, true)) return Promise.reject();\n\n this.setState({ saving: true });\n const tenantLanguage = translations.find(x => x.isTenantLanguage);\n return translationHelper.save(translations).then(\n changes => {\n this.setState({ saving: false }, () => {\n onClose({\n list,\n listId,\n changes,\n fallback: tenantLanguage ? tenantLanguage.value : '',\n });\n });\n },\n error => {\n handleHttpError(intl)(error);\n this.setState({ saving: false });\n },\n );\n };\n closeModal = () => {\n const { onClose } = this.props;\n this.setState({ translations: null, saving: false, showValidationErrors: false }, () => {\n onClose(null);\n });\n };\n\n showValidationErrors = () => {\n this.setState({ showValidationErrors: true });\n };\n\n render() {\n const { list, listId, fallback, show, maxLength } = this.props;\n const { translations, saving, showValidationErrors } = this.state;\n const isValid = translationHelper.validate(translations, true);\n return (\n \n \n  \n \n \n }\n show={show}\n onClose={this.closeModal}\n onSave={this.saveTranslations}\n onHoverSave={this.showValidationErrors}\n >\n {!show || !translations ? (\n \n ) : (\n
    \n \n
    \n )}\n \n );\n }\n}\n\nTranslateListItemModal.propTypes = {\n intl: intlShape.isRequired,\n list: PropTypes.string.isRequired,\n listId: PropTypes.string.isRequired,\n fallback: PropTypes.string,\n maxLength: PropTypes.number,\n show: PropTypes.bool,\n};\n\nTranslateListItemModal.defaultProps = {\n fallback: null,\n show: false,\n maxLength: undefined,\n};\nexport default injectIntl(TranslateListItemModal);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport Modal from 'react-bootstrap/lib/Modal';\nimport Highlighter from 'react-highlight-words';\nimport classnames from 'classnames';\nimport { injectIntl, FormattedMessage } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport Button from '@/shared/components/Button';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport messages from './assignmentTemplateMessages';\nimport guid from '@/shared/utils/guid';\nimport authService from '@/shared/services/AuthService';\nimport ToastrService from '@/shared/services/ToastrService';\nimport { mapResourcesToTree } from '@/shared/hooks/resource/useResourceTree';\nimport LoadingContainer from '@/shared/components/loading/LoadingContainer';\nimport TextSearch from '@/shared/components/input/TextSearch';\nimport Checkbox from '@/shared/components/input/Checkbox';\nimport { resourceSearch } from '@/shared/components/registration/ResourceAutoComplete';\n\nclass EditBlockedResourcesModal extends Component {\n constructor(props) {\n super(props);\n const { assignmentTemplateId, assignmentTemplateName, intl } = props;\n this.state = {\n templateName:\n assignmentTemplateId === guid.empty\n ? intl.formatMessage(messages.DefaultAssignment)\n : assignmentTemplateName,\n saving: false,\n readOnly: !authService.hasPermission({\n functionality: 'Settings',\n privilege: 'Update',\n }),\n resources: null,\n allChecked: false,\n searchValue: '',\n };\n }\n\n componentDidMount() {\n const { intl, assignmentTemplateId } = this.props;\n api.base.get(`${config.appUrls.api}/api/Resource/registration`).then(({ data }) => {\n const resources = mapResourcesToTree(\n data\n .filter(x => x.type !== 3 && x.type !== 4)\n .map(x => ({\n ...x,\n checked:\n !x.blockedAssignmentTemplates ||\n x.blockedAssignmentTemplates.indexOf(assignmentTemplateId) < 0,\n })),\n intl,\n );\n const allChecked = resources.every(r => r.checked)\n this.setState({ resources, allChecked });\n });\n }\n\n save = () => {\n const { saving, resources } = this.state;\n const { onClose, assignmentTemplateId } = this.props;\n if (saving) return '';\n\n this.setState({ saving: true });\n\n const model = {\n assignmentTemplateId,\n resources: resources.filter(x => !x.checked).map(x => x.id),\n };\n\n return api.base\n .put(`${config.appUrls.api}/api/AssignmentTemplate/BlockedResources`, model)\n .then(\n () => {\n ToastrService.success();\n onClose();\n },\n error => {\n const { intl } = this.props;\n handleHttpError(intl)(error);\n return error;\n },\n )\n .finally(() => {\n if (typeof this !== 'undefined') this.setState({ saving: false });\n });\n };\n onCheckboxClick = (resource, checked) => {\n let resources = this.state.resources.map(x => x.id === resource.id ? Object.assign(x, { checked }) : x);\n let allChecked = resources.every(x=>x.checked);\n this.setState({resources, allChecked});\n };\n\n onCheckboxAllClick = checked => {\n let resources = this.state.resources.map(x => Object.assign(x, { checked }));\n let allChecked = checked;\n this.setState({resources, allChecked});\n };\n\n render() {\n const { onClose, intl, taskTemplates } = this.props;\n const { saving, templateName, readOnly, resources, allChecked, searchValue } = this.state;\n\n const filteredResources =\n searchValue && resources ? resources.filter(x => resourceSearch(x, searchValue)) : resources;\n\n return (\n onClose()} keyboard={false}>\n \n \n \n  - {templateName}\n \n \n \n \n
    \n
    \n
    \n this.setState({ searchValue: value || '' })}\n />\n
    \n
    \n \n \n \n \n \n \n \n \n {filteredResources ? (\n filteredResources.map(x => (\n \n {x.level === 1 ? : null}\n \n \n \n ))\n ) : (\n \n \n \n )}\n \n
    {intl.formatMessage(messages.Name)} this.onCheckboxAllClick(checked)}/> {intl.formatMessage(messages.Allowed)}
     \n {searchValue ? (\n \n ) : (\n x.label\n )}\n \n this.onCheckboxClick(x, checked)}\n />\n
    \n \n
    \n
    \n
    \n
    \n \n \n {!readOnly ? (\n this.save()}\n disabled={saving}\n btnClassName=\"btn-inverse\"\n showProgress\n >\n \n \n ) : null}\n \n
    \n );\n }\n}\n\nEditBlockedResourcesModal.propTypes = {\n intl: intlShape.isRequired,\n onClose: PropTypes.func.isRequired,\n assignmentTemplateId: PropTypes.string.isRequired,\n assignmentTemplateName: PropTypes.string,\n};\n\nexport default injectIntl(EditBlockedResourcesModal);\n","import React, { Component } from 'react';\nimport { injectIntl, FormattedMessage } from 'react-intl';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport { CanCreate, CanDelete } from '@/shared/components/security';\nimport { showWhenAssignmentsEnabled } from '@/shared/components/security/HasAssignments';\nimport authService, { privileges, functionalities } from '@/shared/services/AuthService';\nimport YesNoModal from '@/shared/components/YesNoModal';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport ZendeskHelp from '@/shared/components/ZendeskHelp';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport { FaCaretUp, FaCaretDown } from 'react-icons/fa';\nimport FormattedListValue, { listItemMsg } from '@/shared/components/FormattedListValue';\n\nimport EditableTextbox from '@/shared/components/editable/EditableTextbox';\nimport messages from './assignmentTemplateMessages';\nimport LoadingAnimation from '../../../shared/components/LoadingAnimation';\nimport Checkbox from '../../../shared/components/input/Checkbox';\nimport { AddIcon, DeleteIcon } from '../../../shared/components/Icons';\n\nimport AddAssignmentTemplateModal from './AddAssignmentTemplateModal';\nimport AddTaskTemplateModal from './AddTaskTemplateModal';\nimport EditableSelect from '../../../shared/components/editable/EditableSelect';\n\nimport TranslateListItemModal from '../../../shared/components/translations/TranslateListItemModal';\nimport EditBlockedResourcesModal from './EditBlockedResourcesModal';\nimport guid from '@/shared/utils/guid';\n\nclass AssignmentTemplateContainer extends Component {\n state = {\n templates: null,\n showAddModal: false,\n deleteTemplate: null,\n addTaskTemplate: null,\n };\n\n mapAssignmentTemplateTaskTemplate = x => {\n const { intl } = this.props;\n return {\n ...x,\n taskTemplateName: intl.formatMessage(\n listItemMsg('tasktemplate', x.taskTemplateId, x.taskTemplateName),\n ),\n taskPeriodicityName: x.taskPeriodicityId\n ? intl.formatMessage(\n listItemMsg('taskperiodicity', x.taskPeriodicityId, x.taskPeridodicityName),\n )\n : null,\n };\n };\n\n loadTemplates = () => {\n Promise.all([\n api.base.get(`${config.appUrls.api}/api/AssignmentTemplate/Get`).then(({ data }) => data),\n api.base.get(`${config.appUrls.tasks}/api/AssignmentTemplate`).then(({ data }) => data),\n api.base.get(`${config.appUrls.tasks}/api/TaskTemplates/Schedules`).then(({ data }) => data),\n ]).then(\n ([templates, assignmentTaskTemplates, allTaskTemplates]) => {\n const taskTemplates = assignmentTaskTemplates.map(this.mapAssignmentTemplateTaskTemplate);\n const { intl } = this.props;\n this.setState({\n templates: templates\n .map(x => ({\n ...x,\n showDetails: false,\n taskTemplates: taskTemplates\n .filter(t => t.assignmentTemplateId === x.id)\n .sort(dynamicSort('taskTemplateName')),\n }))\n .sort(dynamicSort('name')),\n taskTemplates: allTaskTemplates\n .map(({ id, name, periodicities = [] }) => ({\n id,\n label: intl.formatMessage(listItemMsg('tasktemplate', id, name)),\n periodicities: periodicities\n .map(p => ({\n id: p.id,\n label: intl.formatMessage(listItemMsg('taskperiodicity', p.id, p.name)),\n }))\n .sort(dynamicSort('label')),\n }))\n .sort(dynamicSort('label')),\n });\n },\n error => {\n const { intl } = this.props;\n handleHttpError(intl)(error);\n },\n );\n };\n\n componentDidMount() {\n this.loadTemplates();\n }\n\n appendTemplate = template => {\n if (!template || !template.id) {\n this.setState({ showAddModal: false });\n return;\n }\n const newTemplate = { ...template, showDetails: true, taskTemplates: [] };\n\n this.setState(({ templates }) => ({\n templates: [...templates, newTemplate].sort(dynamicSort('name')),\n showAddModal: false,\n }));\n };\n\n toggleDetails = template => {\n this.setState(({ templates }) => ({\n templates: templates.map(x => {\n if (x.id !== template.id) return x;\n return { ...x, showDetails: !x.showDetails };\n }),\n }));\n };\n\n updateTemplate = (template, changes) => {\n const model = { ...template, ...changes };\n return api.base.put(`${config.appUrls.api}/api/AssignmentTemplate`, model).then(\n ({ data }) => {\n if (!data) return '';\n this.setState(({ templates }) => ({\n templates: templates.map(x => {\n if (x.id !== data.id) return x;\n return { ...x, ...data };\n }),\n }));\n return data;\n },\n error => {\n const { intl } = this.props;\n handleHttpError(intl)(error);\n return Promise.reject();\n },\n );\n };\n deleteTemplate = template => {\n if (!template || !template.id) {\n this.setState({\n deleteTemplate: null,\n });\n return;\n }\n return api.base\n .delete(`${config.appUrls.api}/api/AssignmentTemplate/Delete/${template.id}`)\n .then(\n () =>\n api.base\n .delete(`${config.appUrls.tasks}/api/AssignmentTemplate/Delete/${template.id}`)\n .then(() => {\n this.setState(({ templates }) => ({\n templates: templates.filter(x => x.id !== template.id),\n deleteTemplate: null,\n }));\n }),\n error => {\n const { intl } = this.props;\n handleHttpError(intl)(error);\n return Promise.reject();\n },\n );\n };\n deleteTaskTemplate = (templateId, taskTemplateId) => {\n if (!templateId || !taskTemplateId) return;\n return api.base\n .delete(\n `${config.appUrls.tasks}/api/AssignmentTemplate/Delete/${templateId}/${taskTemplateId}`,\n )\n .then(\n () => {\n this.setState(({ templates }) => ({\n templates: templates.map(x => {\n if (x.id !== templateId) return x;\n return {\n ...x,\n taskTemplates: x.taskTemplates.filter(t => t.taskTemplateId !== taskTemplateId),\n };\n }),\n }));\n },\n error => {\n const { intl } = this.props;\n handleHttpError(intl)(error);\n },\n );\n };\n\n showAddTaskTemplateModal = template => {\n const usedTemplates = (template.taskTemplates || []).map(x => x.taskTemplateId);\n this.setState(({ taskTemplates }) => ({\n addTaskTemplate: {\n assignmentTemplateId: template.id,\n taskTemplates: taskTemplates.filter(t => usedTemplates.indexOf(t.id) < 0),\n },\n }));\n };\n addTaskTemplate = taskTemplate => {\n if (!taskTemplate || !taskTemplate.assignmentTemplateId) {\n this.setState({ addTaskTemplate: null });\n return;\n }\n const newTemplate = this.mapAssignmentTemplateTaskTemplate(taskTemplate);\n\n this.setState(({ templates }) => ({\n addTaskTemplate: null,\n templates: templates.map(x => {\n if (x.id !== taskTemplate.assignmentTemplateId) return x;\n return {\n ...x,\n taskTemplates: [...x.taskTemplates, newTemplate].sort(dynamicSort('taskTemplateName')),\n };\n }),\n }));\n };\n updateTaskTemplate = (taskTemplate, changes) => {\n if (!taskTemplate || !taskTemplate.assignmentTemplateId) {\n return;\n }\n const model = { ...taskTemplate, ...changes };\n return api.base.put(`${config.appUrls.tasks}/api/AssignmentTemplate`, model).then(\n ({ data }) => {\n if (!data) return '';\n const updatedTaskTemplate = this.mapAssignmentTemplateTaskTemplate(data);\n\n this.setState(({ templates }) => ({\n templates: templates.map(x => {\n if (x.id !== updatedTaskTemplate.assignmentTemplateId) return x;\n return {\n ...x,\n taskTemplates: x.taskTemplates.map(t => {\n if (t.taskTemplateId !== updatedTaskTemplate.taskTemplateId) return t;\n return { ...t, ...updatedTaskTemplate };\n }),\n };\n }),\n }));\n return updatedTaskTemplate;\n },\n error => {\n const { intl } = this.props;\n handleHttpError(intl)(error);\n return Promise.reject();\n },\n );\n };\n openTranslateDialog = template => {\n const { saving } = this.state;\n if (saving) return;\n this.setState({\n translationModal: {\n list: 'assignmenttemplate',\n listId: template.id,\n fallback: template.name,\n },\n });\n };\n handleTranslationModalClosed = result => {\n if (!result) {\n // Cancelled\n this.setState({ translationModal: null });\n return;\n }\n const { listId, fallback = '' } = result;\n const { templates } = this.state;\n const template = templates.find(x => x.id === listId);\n if (template && template.name !== fallback) {\n this.updateTemplate(template, { name: fallback }).then(() => {\n this.setState({ translationModal: null });\n });\n } else {\n this.setState({ translationModal: null });\n }\n };\n\n render() {\n const {\n templates,\n showAddModal,\n deleteTemplate,\n addTaskTemplate,\n taskTemplates,\n translationModal,\n editBlockedResources,\n } = this.state;\n const { intl } = this.props;\n\n const canUpdate = authService.hasPermission({\n functionality: functionalities.Settings,\n privilege: privileges.Update,\n });\n const periodicities = (taskTemplates || []).reduce((o, e) => {\n // eslint-disable-next-line no-param-reassign\n o[e.id] = e.periodicities;\n return o;\n }, {});\n\n return (\n
    \n
    \n
    \n

    \n \n \n

    \n
    \n \n this.setState({ editBlockedResources: { assignmentTemplateId: guid.empty } })\n }\n >\n {' '}\n \n \n \n this.setState({ showAddModal: true })}\n >\n \n \n \n
    \n
    \n
    \n {!templates && }\n {templates && templates.length > 0 && (\n \n \n \n \n \n \n \n \n \n \n {templates.map(template => (\n \n this.toggleDetails(template)}>\n \n \n \n \n \n \n \n \n {template.showDetails && (\n \n \n \n )}\n \n ))}\n
    \n \n \n \n \n \n \n \n \n \n \n \n
    this.toggleDetails(template)}>\n {template.showDetails ? : }\n \n this.updateTemplate(template, { code: value })}\n maxLength=\"15\"\n readOnly={!canUpdate}\n />\n \n {canUpdate ? (\n {\n e.stopPropagation();\n this.openTranslateDialog(template);\n }}\n >\n \n \n ) : (\n \n )}\n \n \n this.updateTemplate(template, { appliesToPerson: checked })\n }\n />\n \n \n this.updateTemplate(template, { appliesToSoleProprietor: checked })\n }\n />\n \n \n this.updateTemplate(template, { appliesToCompany: checked })\n }\n />\n \n \n this.setState({\n editBlockedResources: {\n assignmentTemplateId: template.id,\n assignmentTemplateName: template.name,\n },\n })\n }\n title={intl.formatMessage(messages.ConfigureAllowResources)}\n >\n \n \n \n this.setState({ deleteTemplate: template })}\n className=\"btn btn-xs btn-icon\"\n >\n \n \n \n
    \n \n {template.taskTemplates && template.taskTemplates.length > 0 && (\n
    \n \n \n \n \n \n \n \n \n \n {template.taskTemplates.map(task => (\n \n \n \n \n \n ))}\n \n
    \n \n
    \n \n \n \n \n
    {task.taskTemplateName}\n \n this.updateTaskTemplate(task, {\n taskPeriodicityId: newId,\n })\n }\n placeholder={intl.formatMessage(messages.NoDefault)}\n displayValue={\n task.taskPeriodicityId ? null : (\n \n \n \n )\n }\n />\n \n \n \n this.deleteTaskTemplate(template.id, task.taskTemplateId)\n }\n >\n \n \n \n
    \n
    \n )}\n \n
    \n this.showAddTaskTemplateModal(template)}\n >\n \n \n
    \n
    \n
    \n )}\n {templates && !templates.length && (\n

    \n \n

    \n )}\n\n {showAddModal && (\n this.appendTemplate(template)} />\n )}\n {deleteTemplate !== null && (\n \n this.setState(state => ({\n ...state,\n deleteTemplate: null,\n }))\n }\n onSave={() => this.deleteTemplate(deleteTemplate)}\n />\n )}\n {addTaskTemplate && (\n this.addTaskTemplate(taskTemplate)}\n />\n )}\n {translationModal && (\n \n )}\n {editBlockedResources && (\n this.setState({ editBlockedResources: null })}\n />\n )}\n
    \n );\n }\n}\nexport default showWhenAssignmentsEnabled(injectIntl(AssignmentTemplateContainer));\n","import { defineMessages } from 'react-intl';\n\nconst messages = defineMessages({\n EnterTag: 'Enter tag',\n Name: 'Name',\n NrOfRelations: 'Nr of relations',\n NrOfDocuments: 'Nr of documents',\n NrOfEmployees: 'Nr of employees',\n Actions: 'Actions',\n DeleteDocumentTag: 'Delete tag?',\n DeleteDocumentTagConfirmationMsg:\n 'This tag is linked to documents. By removing this tag, you also remove it from the documents. Are you sure you want to delete this tag?',\n AddTag: 'Add tag',\n TagAlreadyExists: 'This tag already exists',\n DocumentTags: 'Document tags',\n DocumentTypes: 'Document types',\n TaskTags: 'Task tags',\n RelationTags: 'Relation tags',\n ApplyToDocumentTypes: 'Apply to document types',\n ChangesSaved: 'Changes saved',\n SetIsPublicOnPortal: 'Is public on portal',\n SetIsPublicOnPortalExplanation:\n 'If this option is enabled, all documents that are recognized by AdminPulse and are given the selected label, will also be automatically made public on the portal.',\n InteractionTags: 'Interaction tags',\n DeleteInteractionTagConfirmationMsg:\n 'By removing this tag, you also remove it from the interactions. Are you sure you want to delete this tag?',\n DeleteTag: 'Delete tag?',\n DeleteRelationTagConfirmationMsg:\n 'This tag is linked to relations. By removing this tag, you also remove it from the relations. Are you sure you want to delete this tag?',\n DeleteTaskTagConfirmationMsg:\n 'By removing this tag, you also remove it from any linked tasks. Are you sure you want to delete this tag?',\n DeleteEmployeeTagConfirmationMsg:\n 'This tag is linked to employees. By removing this tag, you also remove it from the employees. Are you sure you want to delete this tag?',\n RelationGroups: 'Relation groups',\n AddRelationGroup: 'Add relation group',\n DeleteRelationGroup: 'Delete relation group',\n DeleteRelationGroupConfirmationMsg:\n 'This group is linked to relations. By removing this relation group, you also remove it from the relations. Are you sure you want to delete this group?',\n RelationGroupAlreadyExists: 'This relation group already exists',\n EmployeeTags: \"Employee tags\"\n});\nexport default messages;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { injectIntl, FormattedMessage } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport ToastrService from '@/shared/services/ToastrService';\nimport api from '../../../shared/api';\nimport config from '../../../config';\nimport { AddIcon, DeleteIcon } from '../../../shared/components/Icons';\nimport LoadingAnimation from '../../../shared/components/LoadingAnimation';\nimport EditableTextbox from '../../../shared/components/editable/EditableTextbox';\nimport YesNoModal from '../../../shared/components/YesNoModal';\nimport OkCancelModal from '../../../shared/components/OkCancelModal';\n\nimport { injectStateService, StateService } from '../../../shared/services/StateService';\nimport { CanCreate, CanDelete } from '../../../shared/components/security';\nimport authService, { privileges } from '../../../shared/services/AuthService';\n\nimport messages from './tagSettingsMessages';\n\nclass TaskTagOverview extends Component {\n state = {\n tags: null,\n newTag: null,\n tagToDelete: null,\n };\n\n componentDidMount() {\n api.base.get(`${config.appUrls.tasks}/api/tags`).then(({ data: tags }) => {\n this.setState({\n tags,\n });\n });\n }\n\n addTag = () => {\n const { newTag, tags } = this.state;\n const { intl } = this.props;\n\n if (!newTag) return;\n\n if (tags.find(x => x.name.toLowerCase() === newTag.toLowerCase())) {\n ToastrService.error(intl.formatMessage(messages.TagAlreadyExists));\n return;\n }\n\n api.base.post(`${config.appUrls.tasks}/api/tags`, { name: newTag }).then(({ data }) => {\n if (tags.find(x => x.id === data.id)) {\n // Tag already exists\n this.setState({\n newTag: null,\n });\n } else {\n this.setState(state => ({\n tags: [...state.tags, data],\n newTag: null,\n }));\n }\n });\n };\n\n editTagName = (tag, value) =>\n api.base\n .put(`${config.appUrls.tasks}/api/tags/${tag.id}`, { ...tag, name: value })\n .then(({ data }) => {\n const { name } = data;\n this.setState(state => ({\n tags: state.tags.map(t => {\n if (t.id === tag.id) {\n return { ...t, name };\n }\n return t;\n }),\n }));\n });\n\n deleteTag = (tag, force = false) => {\n if (tag.documentCount === 0 || force) {\n return api.base.delete(`${config.appUrls.tasks}/api/tags/${tag.id}`).then(() => {\n this.setState(state => ({\n tags: state.tags.filter(t => t.id !== tag.id),\n tagToDelete: null,\n }));\n });\n }\n this.setState({ tagToDelete: tag });\n };\n\n render() {\n const { tags, newTag, tagToDelete } = this.state;\n const { intl, stateService } = this.props;\n\n const canUpdate = authService.hasPermission({\n functionality: 'Tags',\n privilege: privileges.Update,\n });\n\n return (\n <>\n {tags ? (\n <>\n
    \n \n
    \n this.setState({ newTag: '' })}\n >\n \n \n
    \n
    \n
    \n
    \n \n \n \n \n \n \n \n \n {tags.map(tag => (\n \n \n\n \n \n ))}\n \n
    \n \n \n \n
    \n this.editTagName(tag, value)}\n maxLength=\"200\"\n readOnly={!canUpdate}\n />\n \n \n this.deleteTag(tag)}\n className=\"btn btn-xs btn-icon\">\n \n \n \n
    \n\n this.setState({ newTag: null })}\n onSave={() => this.addTag()}\n >\n {newTag !== null && (\n this.setState({ newTag: e.target.value })}\n onKeyDown={e => {\n if (e.keyCode === 13) {\n this.addTag();\n } else if (e.keyCode === 27) {\n this.setState({ newTag: null });\n }\n }}\n autoFocus\n />\n )}\n \n\n this.setState({ tagToDelete: null })}\n onSave={() => this.deleteTag(tagToDelete, true)}\n />\n
    \n \n ) : (\n \n )}\n \n );\n }\n}\n\nTaskTagOverview.propTypes = {\n intl: intlShape.isRequired,\n stateService: PropTypes.instanceOf(StateService).isRequired,\n};\n\nexport default injectStateService(injectIntl(TaskTagOverview));\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { injectIntl, defineMessages, FormattedMessage } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport ToastrService from '@/shared/services/ToastrService';\nimport api from '../../../shared/api';\nimport config from '../../../config';\nimport { AddIcon, DeleteIcon } from '../../../shared/components/Icons';\nimport LoadingAnimation from '../../../shared/components/LoadingAnimation';\nimport EditableTextbox from '../../../shared/components/editable/EditableTextbox';\nimport YesNoModal from '../../../shared/components/YesNoModal';\nimport OkCancelModal from '../../../shared/components/OkCancelModal';\n\nimport { injectStateService, StateService } from '../../../shared/services/StateService';\nimport { CanCreate, CanDelete } from '../../../shared/components/security';\nimport authService, { privileges } from '../../../shared/services/AuthService';\nimport messages from './tagSettingsMessages';\n\nclass RelationTagOverview extends Component {\n state = {\n tags: null,\n newTag: null,\n tagToDelete: null,\n };\n\n componentDidMount() {\n api.base.get(`${config.appUrls.api}/api/relationtag/overview`).then(({ data: tags }) => {\n this.setState({\n tags,\n });\n });\n }\n\n addTag = () => {\n const { newTag, tags } = this.state;\n const { intl } = this.props;\n\n if (!newTag) return;\n\n if (tags.find(x => x.name.toLowerCase() === newTag.toLowerCase())) {\n ToastrService.error(intl.formatMessage(messages.TagAlreadyExists));\n return;\n }\n\n api.base.post(`${config.appUrls.api}/api/relationtag`, { name: newTag }).then(({ data }) => {\n data.nrOfRelationsInUse = 0;\n if (tags.find(x => x.id === data.id)) {\n // Tag already exists\n this.setState({\n newTag: null,\n });\n } else {\n this.setState(state => ({\n tags: [...state.tags, data],\n newTag: null,\n }));\n }\n });\n };\n\n editTagName = (tag, value) =>\n api.base\n .put(`${config.appUrls.api}/api/relationtag`, { ...tag, name: value })\n .then(({ data }) => {\n const { name } = data;\n this.setState(state => ({\n tags: state.tags.map(t => {\n if (t.id === tag.id) {\n return { ...t, name };\n }\n return t;\n }),\n }));\n });\n\n deleteTag = (tag, force = false) => {\n if (tag.documentCount === 0 || force) {\n return api.base.delete(`${config.appUrls.api}/api/relationtag/${tag.id}`).then(() => {\n this.setState(state => ({\n tags: state.tags.filter(t => t.id !== tag.id),\n tagToDelete: null,\n }));\n });\n }\n this.setState({ tagToDelete: tag });\n };\n\n render() {\n const { tags, newTag, tagToDelete } = this.state;\n const { intl, stateService } = this.props;\n\n const canUpdate = authService.hasPermission({\n functionality: 'Tags',\n privilege: privileges.Update,\n });\n\n return (\n <>\n {tags ? (\n <>\n
    \n \n
    \n this.setState({ newTag: '' })}\n >\n \n \n
    \n
    \n
    \n
    \n \n \n \n \n \n \n \n \n \n {tags.map(tag => (\n \n \n\n \n\n \n \n ))}\n \n
    \n \n \n \n \n \n
    \n this.editTagName(tag, value)}\n maxLength=\"200\"\n readOnly={!canUpdate}\n />\n \n {tag.nrOfRelationsInUse === 0 ? (\n 0\n ) : (\n stateService.gotoRelationOverview({ tags: [tag.name] })}\n >\n {tag.nrOfRelationsInUse}\n \n )}\n \n \n this.deleteTag(tag)} className=\"btn btn-xs btn-icon\">\n \n \n \n
    \n\n this.setState({ newTag: null })}\n onSave={() => this.addTag()}\n >\n {newTag !== null && (\n this.setState({ newTag: e.target.value })}\n onKeyDown={e => {\n if (e.keyCode === 13) {\n this.addTag();\n } else if (e.keyCode === 27) {\n this.setState({ newTag: null });\n }\n }}\n autoFocus\n />\n )}\n \n\n this.setState({ tagToDelete: null })}\n onSave={() => this.deleteTag(tagToDelete, true)}\n />\n
    \n \n ) : (\n \n )}\n \n );\n }\n}\n\nRelationTagOverview.propTypes = {\n intl: intlShape.isRequired,\n stateService: PropTypes.instanceOf(StateService).isRequired,\n};\n\nexport default injectStateService(injectIntl(RelationTagOverview));\n","import enumCache from '@/shared/services/EnumCacheService';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport api from '../../../shared/api';\nimport config from '../../../config';\n\nexport const getDocumentTypes = async (intl) => {\n const documentTypes = await enumCache.get('documenttype');\n const { data: documentTypeSettings }= await api.base.get(`${config.appUrls.documents}/api/DocumentTypeSetting`)\n\n const filteredDocumentTypes = documentTypes\n .filter(x => x.key !== -1 && x.key !== 15) // Exclude Unknown and Temporary\n .map(x => ({\n key: x.key,\n label: intl.formatMessage(listItemMsg('documenttype', x.key, x.value))\n }))\n .sort(dynamicSort('label'));\n\n const enrichedDocumentTypes = filteredDocumentTypes.map(docType => {\n const settings = documentTypeSettings.find(setting => setting.documentType === docType.key);\n return {\n ...docType,\n setIsPublicOnPortal: settings ? settings.setIsPublicOnPortal : false,\n };\n });\n\n return enrichedDocumentTypes;\n};\n\nexport default { getDocumentTypes };\n","import React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport { defineMessages, injectIntl, useIntl } from 'react-intl';\nimport isEqual from 'lodash-es/isEqual';\n\nimport intlShape from '@/shared/utils/intlShape';\nimport { DeleteIcon } from '@/shared/components/Icons';\nimport OkCancelModal from '../../../../shared/components/OkCancelModal';\n\nimport api from '../../../../shared/api';\nimport config from '../../../../config';\nimport { getDocumentTypes } from '../../Documents/documentTypesService';\n\nconst messages = defineMessages({\n SelectDocumentTypeToAdd: 'Select type to add',\n});\n\nclass EditDocumentTagTypesDialog extends PureComponent {\n constructor(props) {\n super(props);\n\n const { types } = props;\n\n this.state = {\n types: [...types],\n documentTypes: [],\n };\n }\n\n componentDidMount() {\n const { intl } = this.props;\n getDocumentTypes(intl).then(documentTypes => {\n this.setState({ documentTypes });\n });\n }\n\n addType = e => {\n const type = e.target.value;\n if (!type) return;\n\n this.setState(({ types }) => ({\n types: [...types, parseInt(type)],\n selectedType: '',\n }));\n };\n removeType = type => {\n this.setState(({ types }) => ({\n types: types.filter(x => x !== type),\n }));\n };\n\n save = () => {\n const { types } = this.state;\n const { tagId, types: oldTypes, onClose } = this.props;\n if (isEqual(types, oldTypes)) {\n onClose(null); // Nothing changed\n return;\n }\n\n return api.base\n .put(`${config.appUrls.documents}/api/TagType/Types`, { tagId, types })\n .then(() => {\n onClose(types);\n });\n };\n\n render() {\n const { documentTypes, types } = this.state;\n const { onClose, intl, tagName } = this.props;\n\n const availableTypes =\n types && types.length > 0\n ? documentTypes.filter(x => types.indexOf(x.key) === -1)\n : documentTypes;\n\n const selectedTypes =\n types && types.length > 0 ? documentTypes.filter(x => types.indexOf(x.key) >= 0) : [];\n\n return (\n onClose(null)} onSave={() => this.save()}>\n {availableTypes.length > 0 && (\n
    \n \n
    \n )}\n {selectedTypes.map(x => (\n
    \n {x.label}\n this.removeType(x.key)} />\n
    \n ))}\n
    \n );\n }\n}\n\nEditDocumentTagTypesDialog.propTypes = {\n tagId: PropTypes.string.isRequired,\n tagName: PropTypes.string.isRequired,\n types: PropTypes.arrayOf(PropTypes.number).isRequired,\n onClose: PropTypes.func.isRequired, // (newTypes)=>{}\n intl: intlShape.isRequired,\n};\n\nexport default injectIntl(EditDocumentTagTypesDialog);\n","import React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport { defineMessages, injectIntl, useIntl } from 'react-intl';\nimport isEqual from 'lodash-es/isEqual';\n\nimport intlShape from '@/shared/utils/intlShape';\nimport AutoComplete from '@/shared/components/input/select/AutoComplete';\nimport { DeleteIcon } from '@/shared/components/Icons';\nimport OkCancelModal from '../../../../shared/components/OkCancelModal';\n\nimport api from '../../../../shared/api';\nimport config from '../../../../config';\n\nconst messages = defineMessages({\n SelectTagsToAdd: 'Select tags to add',\n});\n\nclass EditDocumentTypesTagDialog extends PureComponent {\n constructor(props) {\n super(props);\n\n const { documentTags } = props;\n this.state = {\n documentTags: [...documentTags],\n selectedTag: null,\n };\n }\n\n addTag = item => {\n if (!item) return;\n const { allTags } = this.props;\n const tag = allTags.find(x => x.id === item.key);\n if (!tag) return;\n this.setState(\n ({ documentTags }) => ({\n documentTags: [...documentTags, tag],\n selectedTag: item,\n }),\n () => {\n this.setState({ selectedTag: null });\n },\n );\n };\n removeTag = tagId => {\n this.setState(({ documentTags }) => ({\n documentTags: documentTags.filter(x => x.id !== tagId),\n }));\n };\n\n save = () => {\n const { documentTags } = this.state;\n const { documentTypeId, documentTags: oldTags, onClose } = this.props;\n if (isEqual(documentTags, oldTags)) {\n onClose(null); // Nothing changed\n return;\n }\n\n return api.base\n .put(`${config.appUrls.documents}/api/TagType/Tags`, {\n documentType: documentTypeId,\n tags: documentTags.map(x => x.id),\n })\n .then(() => {\n onClose(documentTags);\n });\n };\n\n render() {\n const { documentTags, selectedTag } = this.state;\n const { onClose, intl, documentTypeName, allTags } = this.props;\n const availableTags = (documentTags && documentTags.length > 0\n ? allTags.filter(x => documentTags.findIndex(y => y.id === x.id) === -1)\n : allTags\n ).map(x => ({ ...x, key: x.id, label: x.name }));\n\n return (\n onClose(null)}\n onSave={() => this.save()}\n >\n {availableTags.length > 0 && (\n
    \n this.addTag(item)}\n mode=\"edit\"\n autoFocus\n value={selectedTag}\n />\n
    \n )}\n {documentTags.map(x => (\n
    \n {x.name}\n this.removeTag(x.id)} />\n
    \n ))}\n \n );\n }\n}\n\nconst tagShape = PropTypes.shape({ id: PropTypes.string.isRequired, name: PropTypes.name });\n\nEditDocumentTypesTagDialog.propTypes = {\n documentTypeId: PropTypes.number.isRequired,\n documentTypeName: PropTypes.string.isRequired,\n documentTags: PropTypes.arrayOf(tagShape).isRequired,\n allTags: PropTypes.arrayOf(tagShape).isRequired,\n onClose: PropTypes.func.isRequired, // (newTypes)=>{}\n intl: intlShape.isRequired,\n};\n\nexport default injectIntl(EditDocumentTypesTagDialog);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage, injectIntl } from 'react-intl';\nimport OverlayTrigger from 'react-bootstrap/lib/OverlayTrigger';\nimport Popover from 'react-bootstrap/lib/Popover';\nimport { FaInfoCircle } from 'react-icons/fa';\nimport intlShape from '@/shared/utils/intlShape';\nimport Checkbox from '@/shared/components/input/Checkbox';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport api from '../../../shared/api';\nimport config from '../../../config';\nimport { AddIcon, DeleteIcon, IconPencil } from '../../../shared/components/Icons';\nimport LoadingAnimation from '../../../shared/components/LoadingAnimation';\nimport EditableTextbox from '../../../shared/components/editable/EditableTextbox';\nimport YesNoModal from '../../../shared/components/YesNoModal';\nimport OkCancelModal from '../../../shared/components/OkCancelModal';\nimport ToastrService from '../../../shared/services/ToastrService';\nimport { injectStateService, StateService } from '../../../shared/services/StateService';\nimport { CanCreate, CanDelete, CanUpdate } from '../../../shared/components/security';\nimport authService, { privileges } from '../../../shared/services/AuthService';\nimport { getDocumentTypes } from '../Documents/documentTypesService';\nimport EditDocumentTagTypesDialog from './Modals/EditDocumentTagTypesDialog';\nimport EditDocumentTypesTagDialog from './Modals/EditDocumentTypesTagDialog';\nimport messages from './tagSettingsMessages';\n\nclass DocumentTagConfiguration extends Component {\n state = {\n tags: null,\n tagToDelete: null,\n newTag: null,\n editTypesForTag: null,\n editTagsForType: null,\n loading: true,\n documentTypes: [],\n };\n\n componentDidMount() {\n const { intl } = this.props;\n api.base.get(`${config.appUrls.documents}/api/Tag/Config`).then(({ data: tags }) => {\n this.setState({\n tags,\n loading: false,\n });\n });\n getDocumentTypes(intl).then(documentTypes => {\n this.setState({\n documentTypes,\n });\n });\n }\n\n addTag = () => {\n const { newTag, tags } = this.state;\n const { intl } = this.props;\n if (!newTag) return;\n if (tags.find(x => x.name.toLowerCase() === newTag.toLowerCase())) {\n ToastrService.error(intl.formatMessage(messages.TagAlreadyExists));\n return;\n }\n\n api.base.post(`${config.appUrls.documents}/api/Tag`, { name: newTag }).then(({ data }) => {\n if (tags.find(x => x.id === data.id)) {\n // Tag already exists\n this.setState({\n newTag: null,\n });\n } else {\n this.setState(state => ({\n tags: [...state.tags, { documentCount: 0, ...data, documentTypes: [] }],\n newTag: null,\n }));\n }\n });\n };\n\n editTagName = (tag, value) =>\n api.base\n .put(`${config.appUrls.documents}/api/Tag`, { ...tag, name: value })\n .then(({ data }) => {\n const { name } = data;\n this.setState(state => ({\n tags: state.tags.map(t => {\n if (t.id === tag.id) {\n return { ...t, name };\n }\n return t;\n }),\n }));\n });\n\n deleteTag = (tag, force = false) => {\n if (tag.documentCount === 0 || force) {\n api.base.delete(`${config.appUrls.documents}/api/Tag/${tag.id}`).then(() => {\n this.setState(state => ({\n tags: state.tags.filter(t => t.id !== tag.id),\n tagToDelete: null,\n }));\n });\n } else {\n this.setState({ tagToDelete: tag });\n }\n };\n\n updateTagTypes = newTypes => {\n const { editTypesForTag } = this.state;\n if (!editTypesForTag) return;\n if (newTypes) {\n this.setState(({ tags }) => ({\n tags: tags.map(x => {\n if (x.id !== editTypesForTag.id) return x;\n return { ...x, documentTypes: [...newTypes] };\n }),\n editTypesForTag: null,\n }));\n } else {\n // Cancel\n this.setState({\n editTypesForTag: null,\n });\n }\n };\n updateDocumentTypeTags = newTags => {\n const { editTagsForType } = this.state;\n if (!editTagsForType) return;\n if (newTags) {\n this.setState(({ tags }) => ({\n tags: tags.map(tag => {\n const documentTypesWithoutCurrent = (tag.documentTypes || []).filter(\n x => x !== editTagsForType.key,\n );\n if (newTags.findIndex(y => y.id === tag.id) >= 0) {\n return { ...tag, documentTypes: [...documentTypesWithoutCurrent, editTagsForType.key] };\n }\n\n return { ...tag, documentTypes: documentTypesWithoutCurrent };\n }),\n editTagsForType: null,\n }));\n } else {\n // Cancel\n this.setState({\n editTagsForType: null,\n });\n }\n };\n setTagIsPublicOnPortal = tag => {\n const { intl } = this.props;\n\n api.base\n .put(`${config.appUrls.documents}/api/Tag`, {\n ...tag,\n setIsPublicOnPortal: !tag.setIsPublicOnPortal,\n })\n .then(({ data }) => {\n const { setIsPublicOnPortal } = data;\n this.setState(state => ({\n tags: state.tags.map(t => {\n if (t.id === tag.id) {\n return { ...t, setIsPublicOnPortal };\n }\n return t;\n }),\n }));\n ToastrService.success(intl.formatMessage(messages.ChangesSaved));\n })\n .catch(handleHttpError(intl));\n };\n\n setDocumentTypeIsPublicOnPortal = documentType => {\n const { intl } = this.props;\n\n api.base\n .put(`${config.appUrls.documents}/api/DocumentTypeSetting`, {\n DocumentType: documentType.key,\n SetIsPublicOnPortal: !documentType.setIsPublicOnPortal\n })\n .then(({ data }) => {\n const { setIsPublicOnPortal } = data;\n this.setState(state => ({\n documentTypes: state.documentTypes.map(d =>\n d.key === documentType.key ? { ...d, setIsPublicOnPortal } : d\n ),\n }));\n ToastrService.success(intl.formatMessage(messages.ChangesSaved));\n })\n .catch(handleHttpError(intl));\n };\n\n render() {\n const {\n tags,\n tagToDelete,\n newTag,\n documentTypes,\n editTypesForTag,\n editTagsForType,\n loading,\n } = this.state;\n const { intl, stateService, tab } = this.props;\n\n const tagLookup = (tags || []).reduce((prev, current) => {\n // eslint-disable-next-line no-param-reassign\n prev[current.id] = current.name;\n return prev;\n }, {});\n\n const tagsForType = (tags || []).reduce((prev, current) => {\n if (!current.documentTypes) return prev;\n current.documentTypes.forEach(documentType => {\n if (!prev[documentType]) prev[documentType] = [];\n prev[documentType].push(current);\n });\n return prev;\n }, {});\n\n const typeLookup = (documentTypes || []).reduce((result, item) => {\n // eslint-disable-next-line no-param-reassign\n result[item.key] = item.label;\n return result;\n }, {});\n const canUpdateTags = authService.hasPermission({\n functionality: 'Tags',\n privilege: privileges.Update,\n });\n const canUpdateSettings = authService.hasPermission({\n functionality: 'Settings',\n privilege: privileges.Update,\n });\n\n return (\n <>\n
    \n \n
    \n this.setState({ newTag: '' })}\n >\n \n \n
    \n
    \n
    \n {tab === 0 && !loading && tags ? (\n
    \n \n \n \n \n \n \n \n \n \n \n \n {tags.map(tag => (\n \n \n \n \n \n \n \n ))}\n \n
    \n \n \n \n \n \n \n \n \n {intl.formatMessage(messages.SetIsPublicOnPortalExplanation)}\n \n }\n >\n \n \n \n \n \n \n
    \n this.editTagName(tag, value)}\n maxLength=\"200\"\n readOnly={!canUpdateTags}\n />\n \n 0\n ? tag.documentTypes.map(type => typeLookup[type]).join(', ')\n : null\n }\n >\n this.setState({ editTypesForTag: tag })}>\n {tag.documentTypes && tag.documentTypes.length > 0 ? (\n tag.documentTypes.map(type => typeLookup[type]).join(', ')\n ) : (\n \n )}\n \n \n \n {tag.documentCount === 0 ? (\n 0\n ) : (\n stateService.gotoDocuments({ tags: tag.id })}\n >\n {tag.documentCount}\n \n )}\n \n this.setTagIsPublicOnPortal(tag)}\n value={tag.setIsPublicOnPortal}\n disabled={!canUpdateSettings}\n />\n \n \n this.deleteTag(tag)}>\n \n \n \n
    \n this.setState({ tagToDelete: null })}\n onSave={() => this.deleteTag(tagToDelete, true)}\n />\n {!!editTypesForTag && (\n \n )}\n
    \n ) : null}\n {tab === 1 && !loading && documentTypes ? (\n
    \n \n \n \n \n \n \n \n \n \n {!!tagsForType &&\n documentTypes.map(documentType => (\n \n \n \n \n \n ))}\n \n
    \n \n \n \n \n \n \n {intl.formatMessage(messages.SetIsPublicOnPortalExplanation)}\n \n }\n >\n \n \n \n \n
    \n \n \n 0\n ? tagsForType[documentType.key]\n .map(tag => tagLookup[tag.id])\n .join(', ')\n : null\n }\n >\n \n this.setState({\n editTagsForType: {\n ...documentType,\n tags: tagsForType[documentType.key] || [],\n },\n })\n }\n >\n {tagsForType[documentType.key] &&\n tagsForType[documentType.key].length > 0 ? (\n tagsForType[documentType.key].map(tag => tagLookup[tag.id]).join(', ')\n ) : (\n \n )}\n \n \n \n this.setDocumentTypeIsPublicOnPortal(documentType)}\n value={documentType.setIsPublicOnPortal}\n disabled={!canUpdateSettings}\n />\n
    \n\n {!!editTagsForType && (\n \n )}\n
    \n ) : null}\n\n this.setState({ newTag: null })}\n onSave={() => this.addTag()}\n >\n {newTag !== null && (\n this.setState({ newTag: e.target.value })}\n onKeyDown={e => {\n if (e.keyCode === 13) {\n this.addTag();\n } else if (e.keyCode === 27) {\n this.setState({ newTag: null });\n }\n }}\n autoFocus\n />\n )}\n \n {loading && }\n \n );\n }\n}\n\nDocumentTagConfiguration.propTypes = {\n intl: intlShape.isRequired,\n stateService: PropTypes.instanceOf(StateService).isRequired,\n tab: PropTypes.number.isRequired,\n};\n\nexport default injectStateService(injectIntl(DocumentTagConfiguration));\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { injectIntl, FormattedMessage } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport ToastrService from '@/shared/services/ToastrService';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport api from '../../../shared/api';\nimport config from '../../../config';\nimport { AddIcon, DeleteIcon } from '../../../shared/components/Icons';\nimport LoadingAnimation from '../../../shared/components/LoadingAnimation';\nimport EditableTextbox from '../../../shared/components/editable/EditableTextbox';\nimport YesNoModal from '../../../shared/components/YesNoModal';\nimport OkCancelModal from '../../../shared/components/OkCancelModal';\n\nimport { injectStateService, StateService } from '../../../shared/services/StateService';\nimport { CanCreate, CanDelete } from '../../../shared/components/security';\nimport authService, { privileges } from '../../../shared/services/AuthService';\n\nimport messages from './tagSettingsMessages';\n\nclass InteractionTagOverview extends Component {\n state = {\n tags: null,\n newTag: null,\n tagToDelete: null,\n };\n\n componentDidMount() {\n const { intl } = this.props;\n api.base.get(`${config.appUrls.interactions}/api/tags`).then(({ data: tags }) => {\n this.setState({\n tags,\n });\n }, handleHttpError(intl));\n }\n\n addTag = () => {\n const { newTag, tags } = this.state;\n const { intl } = this.props;\n\n if (!newTag) return;\n\n if (tags.find(x => x.name.toLowerCase() === newTag.toLowerCase())) {\n ToastrService.error(intl.formatMessage(messages.TagAlreadyExists));\n return;\n }\n\n api.base.post(`${config.appUrls.interactions}/api/tags`, { name: newTag }).then(({ data }) => {\n if (tags.find(x => x.id === data.id)) {\n // Tag already exists\n this.setState({\n newTag: null,\n });\n } else {\n this.setState(state => ({\n tags: [...state.tags, data],\n newTag: null,\n }));\n }\n });\n };\n\n editTagName = (tag, value) =>\n api.base.put(`${config.appUrls.interactions}/api/tags`, { ...tag, name: value }).then(\n ({ data }) => {\n const { name } = data;\n this.setState(state => ({\n tags: state.tags.map(t => {\n if (t.id === tag.id) {\n return { ...t, name };\n }\n return t;\n }),\n }));\n },\n error => {\n const { intl } = this.props;\n handleHttpError(intl)(error);\n return Error();\n },\n );\n\n deleteTag = (tag, force = false) => {\n if (force) {\n const { intl } = this.props;\n return api.base.delete(`${config.appUrls.interactions}/api/tags/${tag.id}`).then(() => {\n this.setState(state => ({\n tags: state.tags.filter(t => t.id !== tag.id),\n tagToDelete: null,\n }));\n }, handleHttpError(intl));\n }\n this.setState({ tagToDelete: tag });\n };\n\n render() {\n const { tags, newTag, tagToDelete } = this.state;\n const { intl } = this.props;\n\n const canUpdate = authService.hasPermission({\n functionality: 'Tags',\n privilege: privileges.Update,\n });\n\n return (\n <>\n {tags ? (\n <>\n
    \n \n
    \n this.setState({ newTag: '' })}\n >\n \n \n
    \n
    \n
    \n
    \n \n \n \n \n \n \n \n \n {tags.map(tag => (\n \n \n\n \n \n ))}\n \n
    \n \n \n \n
    \n this.editTagName(tag, value)}\n maxLength=\"200\"\n readOnly={!canUpdate}\n />\n \n \n this.deleteTag(tag)}\n className=\"btn btn-xs btn-icon\">\n \n \n \n
    \n\n this.setState({ newTag: null })}\n onSave={() => this.addTag()}\n >\n {newTag !== null && (\n this.setState({ newTag: e.target.value })}\n onKeyDown={e => {\n if (e.keyCode === 13) {\n this.addTag();\n } else if (e.keyCode === 27) {\n this.setState({ newTag: null });\n }\n }}\n autoFocus\n />\n )}\n \n\n this.setState({ tagToDelete: null })}\n onSave={() => this.deleteTag(tagToDelete, true)}\n />\n
    \n \n ) : (\n \n )}\n \n );\n }\n}\n\nInteractionTagOverview.propTypes = {\n intl: intlShape.isRequired,\n stateService: PropTypes.instanceOf(StateService).isRequired,\n};\n\nexport default injectStateService(injectIntl(InteractionTagOverview));\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { injectIntl, defineMessages, FormattedMessage } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport ToastrService from '@/shared/services/ToastrService';\nimport api from '../../../shared/api';\nimport config from '../../../config';\nimport { AddIcon, DeleteIcon } from '../../../shared/components/Icons';\nimport LoadingAnimation from '../../../shared/components/LoadingAnimation';\nimport EditableTextbox from '../../../shared/components/editable/EditableTextbox';\nimport YesNoModal from '../../../shared/components/YesNoModal';\nimport OkCancelModal from '../../../shared/components/OkCancelModal';\n\nimport { injectStateService, StateService } from '../../../shared/services/StateService';\nimport { CanCreate, CanDelete } from '../../../shared/components/security';\nimport authService, { privileges } from '../../../shared/services/AuthService';\nimport messages from './tagSettingsMessages';\n\nclass RelationGroupOverview extends Component {\n state = {\n groups: null,\n newGroup: null,\n groupToDelete: null,\n };\n\n componentDidMount() {\n api.base.get(`${config.appUrls.api}/api/RelationGroup/overview`).then(({ data: groups }) => {\n this.setState({\n groups,\n });\n });\n }\n\n addGroup = () => {\n const { newGroup, groups } = this.state;\n const { intl } = this.props;\n\n if (!newGroup) return;\n\n if (groups.find(x => x.name.toLowerCase() === newGroup.toLowerCase())) {\n ToastrService.error(intl.formatMessage(messages.RelationGroupAlreadyExists));\n return;\n }\n\n api.base\n .post(`${config.appUrls.api}/api/RelationGroup`, { name: newGroup })\n .then(({ data }) => {\n data.nrOfRelationsInUse = 0;\n if (groups.find(x => x.id === data.id)) {\n // Group already exists\n this.setState({\n newGroup: null,\n });\n } else {\n this.setState(state => ({\n groups: [...state.groups, data],\n newGroup: null,\n }));\n }\n });\n };\n\n editGroupName = (group, value) =>\n api.base\n .put(`${config.appUrls.api}/api/RelationGroup`, { ...group, name: value })\n .then(({ data }) => {\n const { name } = data;\n this.setState(state => ({\n groups: state.groups.map(t => {\n if (t.id === group.id) {\n return { ...t, name };\n }\n return t;\n }),\n }));\n });\n\n deleteGroup = (group, force = false) => {\n if (group.nrOfRelationsInUse === 0 || force) {\n return api.base.delete(`${config.appUrls.api}/api/RelationGroup/${group.id}`).then(() => {\n this.setState(state => ({\n groups: state.groups.filter(t => t.id !== group.id),\n groupToDelete: null,\n }));\n });\n }\n this.setState({ groupToDelete: group });\n };\n\n render() {\n const { groups, newGroup, groupToDelete } = this.state;\n const { intl, stateService } = this.props;\n\n const canUpdate = authService.hasPermission({\n functionality: 'Tags',\n privilege: privileges.Update,\n });\n\n return (\n <>\n {groups ? (\n <>\n
    \n \n
    \n this.setState({ newGroup: '' })}\n >\n \n \n
    \n
    \n
    \n
    \n \n \n \n \n \n \n \n \n \n {groups.map(group => (\n \n \n\n \n\n \n \n ))}\n \n
    \n \n \n \n \n \n
    \n this.editGroupName(group, value)}\n maxLength=\"200\"\n readOnly={!canUpdate}\n />\n \n {group.nrOfRelationsInUse === 0 ? (\n 0\n ) : (\n \n stateService.gotoRelationOverview({ relationGroups: [group.id] })\n }\n >\n {group.nrOfRelationsInUse}\n \n )}\n \n \n this.deleteGroup(group)}\n className=\"btn btn-xs btn-icon\"\n >\n \n \n \n
    \n\n this.setState({ newGroup: null })}\n onSave={() => this.addGroup()}\n >\n {newGroup !== null && (\n this.setState({ newGroup: e.target.value })}\n onKeyDown={e => {\n if (e.keyCode === 13) {\n this.addGroup();\n } else if (e.keyCode === 27) {\n this.setState({ newGroup: null });\n }\n }}\n autoFocus\n />\n )}\n \n\n this.setState({ groupToDelete: null })}\n onSave={() => this.deleteGroup(groupToDelete, true)}\n />\n
    \n \n ) : (\n \n )}\n \n );\n }\n}\n\nRelationGroupOverview.propTypes = {\n intl: intlShape.isRequired,\n stateService: PropTypes.instanceOf(StateService).isRequired,\n};\n\nexport default injectStateService(injectIntl(RelationGroupOverview));\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { injectIntl, defineMessages, FormattedMessage } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport ToastrService from '@/shared/services/ToastrService';\nimport api from '../../../shared/api';\nimport config from '../../../config';\nimport { AddIcon, DeleteIcon } from '../../../shared/components/Icons';\nimport LoadingAnimation from '../../../shared/components/LoadingAnimation';\nimport EditableTextbox from '../../../shared/components/editable/EditableTextbox';\nimport YesNoModal from '../../../shared/components/YesNoModal';\nimport OkCancelModal from '../../../shared/components/OkCancelModal';\n\nimport { injectStateService, StateService } from '../../../shared/services/StateService';\nimport { CanCreate, CanDelete } from '../../../shared/components/security';\nimport authService, { privileges } from '../../../shared/services/AuthService';\nimport messages from './tagSettingsMessages';\n\nclass EmployeeTagOverview extends Component {\n state = {\n tags: null,\n newTag: null,\n tagToDelete: null,\n };\n\n componentDidMount() {\n api.base.get(`${config.appUrls.api}/api/employeetag/overview`).then(({ data: tags }) => {\n this.setState({\n tags,\n });\n });\n }\n\n addTag = () => {\n const { newTag, tags } = this.state;\n const { intl } = this.props;\n\n if (!newTag) return;\n\n if (tags.find(x => x.name.toLowerCase() === newTag.toLowerCase())) {\n ToastrService.error(intl.formatMessage(messages.TagAlreadyExists));\n return;\n }\n\n api.base.post(`${config.appUrls.api}/api/employeetag`, { name: newTag }).then(({ data }) => {\n data.nrOfEmployeesInUse = 0;\n if (tags.find(x => x.id === data.id)) {\n // Tag already exists\n this.setState({\n newTag: null,\n });\n } else {\n this.setState(state => ({\n tags: [...state.tags, data],\n newTag: null,\n }));\n }\n });\n };\n\n editTagName = (tag, value) =>\n api.base\n .put(`${config.appUrls.api}/api/employeetag`, { ...tag, name: value })\n .then(({ data }) => {\n const { name } = data;\n this.setState(state => ({\n tags: state.tags.map(t => {\n if (t.id === tag.id) {\n return { ...t, name };\n }\n return t;\n }),\n }));\n });\n\n deleteTag = (tag, force = false) => {\n if (tag.documentCount === 0 || force) {\n return api.base.delete(`${config.appUrls.api}/api/employeetag/${tag.id}`).then(() => {\n this.setState(state => ({\n tags: state.tags.filter(t => t.id !== tag.id),\n tagToDelete: null,\n }));\n });\n }\n this.setState({ tagToDelete: tag });\n };\n\n render() {\n const { tags, newTag, tagToDelete } = this.state;\n const { intl, stateService } = this.props;\n\n const canUpdate = authService.hasPermission({\n functionality: 'Tags',\n privilege: privileges.Update,\n });\n\n return (\n <>\n {tags ? (\n <>\n
    \n \n
    \n this.setState({ newTag: '' })}\n >\n \n \n
    \n
    \n
    \n
    \n \n \n \n \n \n \n \n \n \n {tags.map(tag => (\n \n \n\n \n\n \n \n ))}\n \n
    \n \n \n \n \n \n
    \n this.editTagName(tag, value)}\n maxLength=\"200\"\n readOnly={!canUpdate}\n />\n \n {tag.nrOfEmployeesInUse === 0 ? (\n 0\n ) : (\n \n {tag.nrOfEmployeesInUse}\n \n )}\n \n \n this.deleteTag(tag)} className=\"btn btn-xs btn-icon\">\n \n \n \n
    \n\n this.setState({ newTag: null })}\n onSave={() => this.addTag()}\n >\n {newTag !== null && (\n this.setState({ newTag: e.target.value })}\n onKeyDown={e => {\n if (e.keyCode === 13) {\n this.addTag();\n } else if (e.keyCode === 27) {\n this.setState({ newTag: null });\n }\n }}\n autoFocus\n />\n )}\n \n\n this.setState({ tagToDelete: null })}\n onSave={() => this.deleteTag(tagToDelete, true)}\n />\n
    \n \n ) : (\n \n )}\n \n );\n }\n}\n\nEmployeeTagOverview.propTypes = {\n intl: intlShape.isRequired,\n stateService: PropTypes.instanceOf(StateService).isRequired,\n};\n\nexport default injectStateService(injectIntl(EmployeeTagOverview));\n","import React, { useState, useCallback } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport classNames from 'classnames';\n\nimport ZendeskHelp from '@/shared/components/ZendeskHelp';\n\nimport { showWhenPermission } from '@/shared/components/security';\nimport { useStateService } from '@/shared/services/StateService';\nimport TaskTagOverview from './TaskTagOverview';\nimport RelationTagOverview from './RelationTagOverview';\nimport DocumentTagConfiguration from './DocumentTagConfiguration';\nimport InteractionTagOverview from './InteractionTagOverview';\nimport messages from './tagSettingsMessages';\nimport RelationGroupOverview from './RelationGroupOverview';\nimport EmployeeTagOverview from './EmployeeTagOverview';\n\nconst routeNames = ['DocumentTags', 'DocumentTypes', 'Task', 'Relation', 'Interaction', 'RelationGroups', 'Employee'];\n\nconst getInitialTab = tab => {\n if (!tab) return 3;\n if (typeof tab === 'string') {\n const idx = routeNames.findIndex(x => x.toLowerCase() === tab.toLowerCase());\n if (idx >= 0) return idx;\n }\n if (typeof tab === 'number' && tab >= 0 && tab < routeNames.length) {\n return tab;\n }\n\n return 3;\n};\n\nconst TagSettingsContainer = ({ tab: initialTab }) => {\n const [tab, setTab] = useState(getInitialTab(initialTab));\n const intl = useIntl();\n const stateService = useStateService();\n const changeTab = useCallback(\n t => {\n setTab(t);\n stateService.gotoState('.', { tab: routeNames[t] });\n },\n [stateService],\n );\n\n return (\n <>\n
      \n changeTab(3)}\n >\n \n \n \n \n changeTab(5)}\n >\n \n {' '}\n \n \n \n changeTab(4)}\n >\n \n {' '}\n \n \n \n changeTab(2)}\n >\n \n \n \n \n changeTab(0)}\n >\n \n \n \n \n changeTab(1)}\n >\n \n \n \n \n changeTab(6)}\n >\n \n \n \n \n
    \n
    \n {tab === 0 || tab === 1 ? (\n \n ) : null}\n {tab === 2 && }\n {tab === 3 && }\n {tab === 4 && }\n {tab === 5 && }\n {tab === 6 && }\n
    \n \n );\n};\nTagSettingsContainer.propTypes = {\n tab: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.any]),\n};\nTagSettingsContainer.defaultProps = {\n tab: undefined,\n};\nexport default showWhenPermission('Tags', 'read')(TagSettingsContainer);\n","import React, { Component } from 'react';\nimport Tree from 'react-ui-tree';\nimport Axios from 'axios';\nimport { defineMessages, FormattedMessage, injectIntl, useIntl } from 'react-intl';\nimport PropTypes from 'prop-types';\nimport intlShape from '@/shared/utils/intlShape';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport ZendeskHelp from '@/shared/components/ZendeskHelp';\nimport SimplePanel from '@/shared/components/SimplePanel';\nimport api from '../../../shared/api';\nimport config from '../../../config';\nimport {\n AddIcon,\n DeleteIcon,\n DocumentIcon,\n FolderIcon,\n SaveIcon,\n UndoIcon,\n} from '../../../shared/components/Icons';\nimport LoadingAnimation from '../../../shared/components/LoadingAnimation';\nimport EditableTextbox from '../../../shared/components/editable/EditableTextbox';\nimport FixedTree from '../../../shared/components/FixedTree';\nimport {\n CanCreate,\n CanDelete,\n CanUpdate,\n showWhenPermission,\n} from '../../../shared/components/security';\nimport { getDocumentTypes } from './documentTypesService';\nimport Button from '@/shared/components/Button';\n\nconst messages = defineMessages({\n EnterTag: 'Enter tag',\n DocumentFolderStructure: 'Document folder structure',\n DocumentTypesForX: 'Document types for {x}',\n SelectDocumentTypeToAdd: 'Select type to add',\n ManageDocumentTypesForFolder: 'Manage document types for folder',\n RestructureDocumentTree: 'Restructure tree',\n RestructureDocumentTreeInfo:\n \"Use drag and drop to restructure the tree above. \\r\\nDon't forget to click the save button afterwards.\",\n Save: 'Save',\n Cancel: 'Cancel',\n AddDocumentTypesToParentNodes: 'Add document types to parent nodes',\n});\nconst deleteCollapsedStateRecursive = ({ children, ...currentNode }) => {\n const copy = {\n ...currentNode,\n children: children.map(deleteCollapsedStateRecursive),\n };\n delete copy.collapsed;\n\n return copy;\n};\nclass DocumentTreeConfiguration extends Component {\n state = { tree: null, tags: null, newTag: '' };\n\n mapTreeNode = ({ children = null, ...node }) => {\n const result = {\n ...node,\n collapsed: false,\n children: children && children.length ? children.map(this.mapTreeNode) : [],\n };\n return result;\n };\n\n componentDidMount() {\n const { intl } = this.props;\n Promise.all([\n api.base.get(`${config.appUrls.documents}/api/Tree`),\n api.base.get(`${config.appUrls.documents}/api/Tag`),\n getDocumentTypes(intl),\n ]).then(([{ data: treeData }, { data: tags }, documentTypes]) => {\n this.setState({\n tree: { children: treeData.map(this.mapTreeNode), collapsed: false },\n tags,\n documentTypes,\n });\n });\n }\n\n findOrCreateTag = tagName =>\n new Promise((resolve, reject) => {\n const { tags } = this.state;\n const tag = tags.find(t => t.name.toLowerCase() === tagName.toLowerCase());\n if (tag) {\n resolve(tag);\n } else {\n api.base.post(`${config.appUrls.documents}/api/Tag`, { name: tagName }).then(({ data }) => {\n this.setState(\n state => ({\n tags: [...state.tags, data],\n }),\n () => resolve(data),\n );\n }, reject);\n }\n });\n\n addTag = (node, tagName) => {\n tagName = tagName.replace(';', '');\n if (!tagName) return;\n this.findOrCreateTag(tagName).then(tag => {\n this.addTagToNode(node, tag);\n });\n };\n addTagToNode = (node, tag) => {\n if (!tag || !tag.id) return;\n const { tree, restructure } = this.state;\n if (restructure) return;\n const updatedTree = this.updateNodeRecursive(\n node.id,\n {\n children: [\n ...node.children,\n {\n name: tag.name,\n tagId: tag.id,\n children: [],\n collapsed: false,\n },\n ],\n },\n tree,\n );\n\n this.handleChange(updatedTree);\n };\n\n updateNodeRecursive = (id, updatedProperties, { children = [], ...currentNode }) => {\n const copy = {\n ...currentNode,\n children: children.map(c => this.updateNodeRecursive(id, updatedProperties, c)),\n };\n if (currentNode.id && currentNode.id === id) {\n return { ...copy, ...updatedProperties };\n }\n return copy;\n };\n deleteNode = node => {\n const { tree, restructure } = this.state;\n if (restructure) return;\n const updatedTree = this.deleteNodeRecursive(node.id, tree);\n\n this.handleChange(updatedTree);\n };\n deleteNodeRecursive = (id, { children, ...currentNode }) => ({\n ...currentNode,\n children: children.filter(c => !c.id || c.id !== id).map(c => this.deleteNodeRecursive(id, c)),\n });\n\n addTagToRoot = tagName => {\n this.findOrCreateTag(tagName).then(tag => {\n const { tree, restructure } = this.state;\n if (restructure) return;\n const updatedTree = {\n ...tree,\n children: [\n ...tree.children,\n {\n name: tag.name,\n tagId: tag.id,\n children: [],\n collapsed: false,\n },\n ],\n };\n\n this.handleChange(updatedTree);\n });\n };\n\n getDocumentTypes = node => {\n const { intl } = this.props;\n this.setState(\n {\n documentTypeInfo: {\n tagIds: node.tagIds,\n tagId: node.tagId,\n tagNames: node.treeTagNames,\n loading: true,\n types: null,\n otherTypes: null,\n },\n },\n () => {\n Promise.all([\n api.base.post(`${config.appUrls.documents}/api/TagType/Types`, { tagIds: node.tagIds }),\n node.tagIds.length > 1\n ? api.base.get(`${config.appUrls.documents}/api/TagType/Types/${node.tagId}`)\n : Promise.resolve({ data: [] }),\n ]).then(\n ([{ data: types }, { data: tagTypes }]) => {\n this.setState(({ documentTypeInfo }) => ({\n documentTypeInfo: {\n ...documentTypeInfo,\n types,\n otherTypes: tagTypes.filter(x => types.indexOf(x) < 0),\n loading: false,\n },\n }));\n },\n error => {\n handleHttpError(intl)(error);\n this.setState({\n documentTypeInfo: null,\n });\n },\n );\n },\n );\n };\n\n handleAddDocumentType = e => this.addDocumentType(e.target.value);\n\n addDocumentType = type => {\n const {\n documentTypeInfo: { tagIds },\n } = this.state;\n if (!type || !tagIds) return;\n\n return api.base\n .post(`${config.appUrls.documents}/api/TagType/AddType/${type}`, {\n tagIds,\n })\n .then(\n () => {\n this.setState(({ documentTypeInfo }) => ({\n documentTypeInfo: {\n ...documentTypeInfo,\n types: [...documentTypeInfo.types, parseInt(type)],\n otherTypes: documentTypeInfo.otherTypes.filter(x => x !== type),\n },\n }));\n },\n error => {\n const { intl } = this.props;\n handleHttpError(intl)(error);\n },\n );\n };\n removeDocumentType = type => {\n const {\n documentTypeInfo: { tagId },\n } = this.state;\n if (type === null || type === undefined || !tagId) return;\n\n return api.base\n .delete(`${config.appUrls.documents}/api/TagType/DeleteType/${type}/${tagId}`)\n .then(\n () => {\n this.setState(({ documentTypeInfo }) => ({\n documentTypeInfo: {\n ...documentTypeInfo,\n types: documentTypeInfo.types.filter(x => x !== type),\n },\n }));\n },\n error => {\n const { intl } = this.props;\n handleHttpError(intl)(error);\n },\n );\n };\n\n renderNode = node => {\n const { intl } = this.props;\n const { restructure } = this.state;\n return (\n
    \n {node.name}\n {!restructure && (\n \n e.stopPropagation()}\n onClick={e => {\n this.getDocumentTypes(node);\n e.stopPropagation();\n }}\n >\n \n \n \n e.stopPropagation()}>\n this.addTag(node, tag)}\n displayValue={\n \n }\n inputClassName=\"tag-input input-sm\"\n />\n \n \n \n e.stopPropagation()}\n onClick={e => {\n this.deleteNode(node);\n e.stopPropagation();\n }}\n >\n \n \n \n \n )}\n
    \n );\n };\n handleChange = tree => {\n if (typeof this.updateToken !== 'undefined') {\n this.updateToken.cancel('Operation canceled due to new request.');\n }\n this.updateToken = Axios.CancelToken.source();\n return api.base\n .put(`${config.appUrls.documents}/api/Tree`, tree.children, {\n cancelToken: this.updateToken.token,\n })\n .then(\n ({ data }) => {\n this.setState({\n tree: { children: data.map(this.mapTreeNode), collapsed: false },\n documentTypeInfo: null,\n });\n },\n error => {\n if (!Axios.isCancel(error)) {\n const { intl } = this.props;\n return handleHttpError(intl)(error);\n }\n },\n )\n .finally(() => {\n this.setState({ saving: false });\n });\n };\n startRestructure = () => {\n const { tree } = this.state;\n // Store copy of original tree state\n const treeCopy = deleteCollapsedStateRecursive(tree);\n\n this.setState({ restructure: true, treeCopy, documentTypeInfo: null });\n };\n saveRestructure = () => {\n const { treeCopy, tree, activeTeam, saving } = this.state;\n if (saving) return;\n const ignoreCollapsedTree = deleteCollapsedStateRecursive(tree);\n\n if (JSON.stringify(treeCopy) === JSON.stringify(ignoreCollapsedTree)) {\n this.setState({ restructure: false, treeCopy: null });\n\n return;\n }\n this.setState({ saving: true });\n return this.handleChange(tree).then(() => {\n this.setState({\n restructure: false,\n saving: false,\n });\n const { intl } = this.props;\n ToastrService.changesSaved(intl);\n return true;\n });\n };\n\n cancelRestructure = () => {\n const { treeCopy, saving } = this.state;\n if (saving) return;\n\n this.setState({ restructure: false, tree: treeCopy, treeCopy: null });\n };\n\n render() {\n const { tree, tags, newTag, documentTypeInfo, documentTypes, restructure, saving } = this.state;\n const { intl } = this.props;\n\n const availableTypes =\n documentTypeInfo && documentTypeInfo.types && documentTypeInfo.types.length > 0\n ? documentTypes.filter(x => documentTypeInfo.types.indexOf(x.key) === -1)\n : documentTypes;\n const selectedTypes =\n documentTypeInfo && documentTypeInfo.types && documentTypeInfo.types.length > 0\n ? documentTypes.filter(x => documentTypeInfo.types.indexOf(x.key) >= 0)\n : [];\n\n const tagDocumentTypes =\n documentTypeInfo?.otherTypes && documentTypeInfo.otherTypes.length > 0\n ? documentTypes.filter(x => documentTypeInfo.otherTypes.indexOf(x.key) >= 0)\n : [];\n\n return (\n
    \n {tree ? (\n \n
    \n
    \n
    \n \n
    \n this.setState({ newTag: e.target.value.replace(';', '') })}\n list=\"tags\"\n autoComplete=\"off\"\n onKeyDown={e => {\n if (e.keyCode === 13) {\n this.addTagToRoot(newTag);\n this.setState({ newTag: '' });\n } else if (e.keyCode === 27) {\n this.setState({ newTag: '' });\n }\n }}\n />\n \n {\n this.addTagToRoot(newTag);\n this.setState({ newTag: '' });\n }}\n >\n \n \n \n
    \n
    \n \n }\n >\n {restructure && !saving ? (\n \n ) : (\n \n )}\n
    \n {!restructure ? (\n this.startRestructure()}\n >\n \n \n \n ) : (\n
    \n
    \n \n
    \n this.saveRestructure()}\n >\n \n  \n \n \n \n
    \n )}\n
    \n \n
    \n
    \n
    \n {documentTypeInfo && (\n \n {!documentTypeInfo.loading && (\n
    \n \n
    \n \n \n {availableTypes.map(x => (\n \n ))}\n \n
    \n
    \n
    \n {selectedTypes.map(x => (\n
    \n {x.label}\n \n this.removeDocumentType(x.key)}\n className=\"pull-right\"\n />\n \n
    \n ))}\n
    \n
    \n )}\n \n )}\n {tagDocumentTypes.length > 0 && !documentTypeInfo.loading ? (\n \n \n
    \n
    \n {tagDocumentTypes.map(x => (\n
    \n {x.label}\n this.addDocumentType(x.key)}\n className=\"pull-right\"\n />\n
    \n ))}\n
    \n
    \n \n
    \n ) : null}\n
    \n
    \n \n ) : (\n \n )}\n {tags && tags.map(t => \n
    \n );\n }\n}\n\nDocumentTreeConfiguration.propTypes = {\n intl: intlShape.isRequired,\n};\n\nexport default showWhenPermission('settings', 'read')(injectIntl(DocumentTreeConfiguration));\n","import { defineMessages } from 'react-intl';\n\nconst messages = defineMessages({\n DocumentTemplates: 'Document templates',\n ExampleDocumentTemplates: 'Example document templates',\n AllTemplateTypes: 'All template type',\n AllLanguages: 'All languages',\n AllCompanies: 'All companies',\n\n Name: 'Name',\n DocumentTemplateType: 'Template type',\n Language: 'Language',\n RelationType: 'Relation type',\n OwnCompany: 'Own company',\n Actions: 'Actions',\n All: 'All',\n AddDocumentTemplate: 'Add document template',\n TemplateType: 'Template type',\n Add: 'Add',\n Cancel: 'Cancel',\n DeleteTemplate: 'Delete template',\n DeleteTemplateConfirmationMsg: 'Are you sure you want to delete this template?',\n File: 'File',\n AntiMoneyLaundering: 'Anti-money laundering',\n Download: 'Download',\n ShowAvailablePlaceholders: 'Show available placeholders',\n Placeholders: 'Placeholders',\n PlaceholdersModalTitle: 'Use these placeholders in your template',\n PlaceholdersModalInfo:\n 'AdminPulse will automatically try to fill out the placeholders listed below when generating an assignment letter. Custom placeholders such as {remark} can be added to the template and will be asked to fill out during the generation process.',\n Close: 'Close',\n SelectTemplateType: 'Select a template type',\n Preview: 'Preview',\n ErrorWhileLoadingPreview: 'An error ocurred while loading the preview',\n Edit: 'Edit',\n RelationLinksPlaceholders: 'Relation link placeholders',\n Search: 'Search',\n AuthorizationLetter: 'Authorization letter',\n AssignmentLetter: 'Assignment letter',\n Questionnaires: 'Questionnaires',\n TaskPlaceholders: 'Task placeholders',\n TaskTemplate: 'Task template',\n Other: 'Other',\n Copy: 'Copy',\n CheckoutBrowser: 'Checkout in browser',\n CheckoutApp: 'Checkout in app',\n Checkin: 'Checkin',\n DiscardCheckout: 'Discard checkout',\n ContinueEditing: 'Continue editing',\n MsgCheckinDocumentError: 'Error while checking in document',\n MsgCheckoutDocumentError: 'Error while checking out document',\n CheckinDocumentConfirmationMsg:\n 'Are you sure you want to discard this checkout? It is currently checked out by {name} so this may result in a loss of their changes.',\n CheckedOutSuccesfull: 'Successfully checked out file.',\n CheckedinSuccesfull: 'Successfully checked in file.',\n});\n\nexport default messages;\n","import api from '@/shared/api';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport utils from '@/shared/utils/adminpulse';\n\nexport const imageDataToBase64Url = httpResponse =>\n new Promise((resolve, reject) => {\n const fileType = httpResponse.headers['content-type'] || 'image/png';\n\n const blob = new Blob([httpResponse.data], {\n type: fileType,\n });\n const reader = new FileReader();\n reader.onload = function onLoad(evt) {\n resolve(evt.target.result);\n };\n reader.onerror = reject;\n reader.readAsDataURL(blob);\n });\n\nexport const getImageAsBase64Url = (url, intl) =>\n api.base\n .get(url, {\n responseType: 'arraybuffer',\n })\n .then(imageDataToBase64Url)\n .catch(error => {\n const errorObject = utils.arrayBufferToObject(error.response && error.response.data);\n\n return handleHttpError(intl)(errorObject);\n });\n","import React, { useEffect, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { injectIntl, useIntl } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport LoadingAnimation from './LoadingAnimation';\nimport { getImageAsBase64Url } from '../utils/httpHelpers';\n\nconst SecureImage = ({ src, intl, onError, ...other }) => {\n const [loading, setLoading] = useState(false);\n const [imgUrl, setImgUrl] = useState(null);\n\n const [error, setError] = useState(null);\n\n useEffect(() => {\n setError(null);\n if (!src) {\n setImgUrl(null);\n setLoading(false);\n return undefined;\n }\n\n setLoading(true);\n let mounted = true;\n\n getImageAsBase64Url(src, intl)\n .then(url => {\n if (mounted) {\n setImgUrl(url);\n }\n })\n .catch(setError)\n .finally(() => {\n if (mounted) setLoading(false);\n });\n return () => {\n mounted = false;\n };\n }, [src, intl]);\n useEffect(() => {\n if (error && typeof onError === 'function') {\n onError(error);\n setError(null);\n }\n }, [error, onError]);\n\n if (loading) return ;\n if (!imgUrl) return null;\n return ;\n};\n\nSecureImage.propTypes = {\n src: PropTypes.string,\n intl: intlShape.isRequired,\n onError: PropTypes.func,\n};\nSecureImage.defaultProps = {\n src: '',\n onError: undefined,\n};\n\nexport default injectIntl(SecureImage);\n","import React, { Component } from 'react';\nimport Modal from 'react-bootstrap/lib/Modal';\nimport { injectIntl, FormattedMessage } from 'react-intl';\nimport Button from '@/shared/components/Button';\n\nimport messages from './documentTemplateMessages';\nimport config from '@/config';\nimport SecureImage from '@/shared/components/SecureImage';\n\nclass PreviewDocumentTemplateModal extends Component {\n state = {};\n\n componentDidMount() {\n const { templateId } = this.props;\n\n this.setState({\n url: `${\n config.appUrls.api\n }/api/documentTemplate/PreviewTemplate/${templateId}?now=${new Date().getTime()}`,\n });\n }\n\n render() {\n const { onClose } = this.props;\n const { url, error } = this.state;\n return (\n onClose(null)}\n keyboard={false}\n dialogClassName=\"modal-lg\"\n >\n \n \n \n \n \n \n
    \n {url &&\n !error && (\n this.setState({ error: true })}\n className=\"img-responsive\"\n />\n )}\n {error && (\n \n )}\n
    \n
    \n \n \n \n \n );\n }\n}\n\nexport default injectIntl(PreviewDocumentTemplateModal);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport Modal from 'react-bootstrap/lib/Modal';\nimport classnames from 'classnames';\nimport { FormattedMessage, injectIntl, useIntl } from 'react-intl';\nimport Button from '@/shared/components/Button';\nimport intlShape from '@/shared/utils/intlShape';\nimport TranslatedFilePond from '@/shared/components/TranslatedFilePond';\nimport MimeIcon from '@/shared/components/MimeIcon';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport messages from './documentTemplateMessages';\n\nclass AddDocumentTemplateModal extends Component {\n constructor(props) {\n super(props);\n const { templateType, language, companyId } = props;\n this.state = {\n template: {\n id: null,\n name: '',\n templateType: templateType || null,\n language: language || null,\n companyId: companyId || null,\n },\n showValidation: false,\n saving: false,\n };\n }\n\n updateTemplate = changes => {\n this.setState(({ template }) => ({ template: { ...template, ...changes } }));\n };\n\n save = () => {\n const { saving, template, file } = this.state;\n const { onClose } = this.props;\n if (!this.isValid() || saving) return '';\n this.setState({ saving: true });\n const formData = new FormData();\n formData.append('name', template.name);\n formData.append('templateType', template.templateType);\n formData.append('languageCode', template.language);\n formData.append('relationType', template.relationType);\n formData.append('companyId', template.companyId);\n formData.append('data', file);\n return api.base\n .post(`${config.appUrls.api}/api/documentTemplate/Template`, formData, {\n headers: {\n 'Content-Type': undefined,\n },\n })\n .then(\n ({ data }) => {\n if (!data) return '';\n\n onClose(data);\n return data;\n },\n error => {\n const { intl } = this.props;\n handleHttpError(intl)(error);\n return error;\n },\n )\n .finally(() => {\n if (typeof this !== 'undefined') this.setState({ saving: false });\n });\n };\n showValidation = () => {\n const { showValidation } = this.state;\n if (!showValidation) this.setState({ showValidation: true });\n };\n\n setFile = file => {\n this.setState({ file: file.file });\n this.pond.removeFile();\n };\n\n isValid = () => {\n const { file, template } = this.state;\n return (\n !!file && template.templateType !== null && template.language !== null && !!template.name\n );\n };\n\n render() {\n const { onClose, templateTypes, languages, relationTypes, companies, intl } = this.props;\n const { template, showValidation, saving, file } = this.state;\n\n const isValid = this.isValid();\n const multipleCompanies = companies.length > 1;\n return (\n onClose(null)} keyboard={false}>\n \n \n \n \n \n \n
    \n \n \n
    \n this.updateTemplate({ templateType: e.target.value })}\n >\n {template.templateType === null && \n ))}\n \n
    \n
    \n \n \n
    \n this.updateTemplate({ name: e.target.value })}\n />\n
    \n \n \n \n
    \n this.updateTemplate({ language: e.target.value })}\n >\n {template.language === null && \n ))}\n \n
    \n \n
    \n \n
    \n \n this.updateTemplate({\n relationType: e.target.value === '' ? null : e.target.value,\n })\n }\n >\n \n {relationTypes.map(x => (\n \n ))}\n \n
    \n
    \n {multipleCompanies && (\n
    \n \n
    \n \n this.updateTemplate({\n companyId: e.target.value === '' ? null : e.target.value,\n })\n }\n >\n \n {companies.map(x => (\n \n ))}\n \n
    \n
    \n )}\n {file && (\n
    \n \n
    \n

    \n \n {file.name}\n

    \n
    \n
    \n )}\n \n
    \n
    \n this.setFile(newFile)}\n pondRef={ref => {\n this.pond = ref;\n }}\n acceptedFileTypes={[\n 'application/msword',\n 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\n 'application/vnd.ms-excel',\n 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n ]}\n />\n
    \n
    \n \n \n
    \n \n \n this.save()}\n disabled={showValidation && !isValid}\n onFocus={this.showValidation}\n onMouseOver={this.showValidation}\n btnClassName=\"btn-inverse\"\n showProgress\n >\n \n \n \n
    \n );\n }\n}\n\nAddDocumentTemplateModal.propTypes = {\n intl: intlShape.isRequired,\n onClose: PropTypes.func.isRequired,\n templateTypes: PropTypes.arrayOf(\n PropTypes.shape({ id: PropTypes.string, label: PropTypes.string }),\n ).isRequired,\n relationTypes: PropTypes.arrayOf(\n PropTypes.shape({ id: PropTypes.string, label: PropTypes.string }),\n ).isRequired,\n languages: PropTypes.arrayOf(PropTypes.shape({ id: PropTypes.string, label: PropTypes.string }))\n .isRequired,\n companies: PropTypes.arrayOf(PropTypes.shape({ id: PropTypes.string, label: PropTypes.string }))\n .isRequired,\n\n templateType: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n language: PropTypes.string,\n companyId: PropTypes.string,\n};\n\nAddDocumentTemplateModal.defaultProps = {\n templateType: null,\n language: null,\n companyId: null,\n};\n\nexport default injectIntl(AddDocumentTemplateModal);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport Modal from 'react-bootstrap/lib/Modal';\nimport classnames from 'classnames';\nimport { FormattedMessage, injectIntl, useIntl } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport Button from '@/shared/components/Button';\n\nimport api from '@/shared/api';\nimport config from '@/config';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport messages from './documentTemplateMessages';\n\nconst createSearchFilter = search => {\n if (!search || typeof search !== 'string') return () => true;\n const value = search.toLowerCase();\n return p =>\n p.tag.toLowerCase().indexOf(value) >= 0 ||\n (p.description && p.description.toLowerCase().indexOf(value) >= 0);\n};\n\nclass PlaceholdersModal extends Component {\n constructor(props) {\n super(props);\n const { templateType } = props;\n this.state = {\n templateType,\n placeholders: null,\n searchValue: '',\n };\n }\n\n componentDidMount() {\n this.retrievePlaceholders();\n }\n\n retrievePlaceholders = () => {\n const { intl } = this.props;\n const { templateType } = this.state;\n if (templateType === null) return;\n\n api.base.get(`${config.appUrls.api}/api/documentTemplate/Placeholders/${templateType}`).then(\n ({ data }) => {\n this.setState({\n placeholders: data.map(p => {\n const tag = `{${p}}`;\n const description = intl.formatMessage(listItemMsg('mailplaceholder', tag, ' '));\n return { tag, description };\n }),\n });\n },\n error => {\n handleHttpError(intl)(error);\n return error;\n },\n );\n };\n templateTypeChanged = templateType => {\n this.setState({ templateType }, this.retrievePlaceholders);\n };\n\n render() {\n const { templateType, placeholders, searchValue } = this.state;\n const { templateTypes, onClose, intl } = this.props;\n\n const filteredPlaceholders = !searchValue\n ? placeholders || []\n : (placeholders || []).filter(createSearchFilter(searchValue));\n\n return (\n onClose(null)} keyboard={false}>\n \n \n \n \n \n \n
    \n
    \n \n
    \n this.templateTypeChanged(e.target.value)}\n >\n {templateType === null && (\n \n )}\n {templateTypes.map(x => (\n \n ))}\n \n
    \n
    \n\n \n {templateType !== null ? (\n
    \n
    \n this.setState({ searchValue: e.target.value || '' })}\n placeholder={intl.formatMessage(messages.Search)}\n />\n
    \n
    \n ) : null}\n\n {placeholders &&\n filteredPlaceholders.map((p, i, a) => (\n \n
    {p.tag}
    \n
    {p.description}
    \n
    \n ))}\n \n
    \n \n \n \n
    \n );\n }\n}\n\nPlaceholdersModal.propTypes = {\n intl: intlShape.isRequired,\n onClose: PropTypes.func.isRequired,\n templateTypes: PropTypes.arrayOf(\n PropTypes.shape({ id: PropTypes.string, label: PropTypes.string }),\n ).isRequired,\n\n templateType: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n};\n\nPlaceholdersModal.defaultProps = {\n templateType: null,\n};\n\nexport default injectIntl(PlaceholdersModal);\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { useMemo } from 'react';\nimport { useIntl } from 'react-intl';\nimport messages from './documentTemplateMessages';\nvar examples = [\n {\n category: 'AntiMoneyLaundering',\n message: messages.AntiMoneyLaundering,\n items: [\n // NL\n {\n url: 'https://public-storage.adminpulse.be/public/aml/nl/Identificatie%20persoon.docx',\n label: 'Identificatie persoon',\n templateType: 4,\n languageCode: 'nl',\n },\n {\n url: 'https://public-storage.adminpulse.be/public/aml/nl/Identificatie%20bedrijf.docx',\n label: 'Identificatie bedrijf',\n templateType: 5,\n languageCode: 'nl',\n },\n {\n url: 'https://public-storage.adminpulse.be/public/aml/nl/Risicobeoordeeling.docx',\n label: 'Risicobeoordeling',\n templateType: 6,\n languageCode: 'nl',\n },\n {\n url: 'https://public-storage.adminpulse.be/public/aml/nl/Begunstigden.docx',\n label: 'Begunstigden',\n templateType: 7,\n languageCode: 'nl',\n },\n {\n url: 'https://public-storage.adminpulse.be/public/aml/nl/Lasthebber%20persoon.docx',\n label: 'Lasthebber persoon',\n templateType: 8,\n languageCode: 'nl',\n },\n {\n url: 'https://public-storage.adminpulse.be/public/aml/nl/Lasthebber%20bedrijf.docx',\n label: 'Lasthebber bedrijf',\n templateType: 9,\n languageCode: 'nl',\n },\n {\n url: 'https://public-storage.adminpulse.be/public/aml/nl/Klantacceptatie.xlsx',\n label: 'Klantacceptatie',\n templateType: 20,\n languageCode: 'nl',\n notConfiguration: [5],\n },\n {\n url: 'https://public-storage.adminpulse.be/public/aml/nl-nl/Klantacceptatie.xlsx',\n label: 'Klantacceptatie',\n templateType: 20,\n languageCode: 'nl',\n configuration: [5],\n },\n {\n url: 'https://public-storage.adminpulse.be/public/aml/nl-nl/Klantacceptatie (NOAB).docx',\n label: 'Klantacceptatie (NOAB)',\n templateType: 20,\n languageCode: 'nl',\n configuration: [5],\n },\n {\n url: 'https://public-storage.adminpulse.be/public/aml/nl/Risicobeoordeeling%20uitgebreid.docx',\n label: 'Risicoanalyse uitgebreid',\n templateType: 19,\n languageCode: 'nl',\n },\n {\n url: 'https://public-storage.adminpulse.be/public/aml/nl-nl/Risicobeoordeling (NOAB).docx',\n label: 'Risicoanalyse uitgebreid (NOAB)',\n templateType: 19,\n languageCode: 'nl',\n configuration: [5],\n },\n {\n url: 'https://public-storage.adminpulse.be/public/aml/nl-nl/Afgeleid klantonderzoek - D.1.c (NOAB).docx',\n label: 'Afgeleid klantonderzoek - D.1.c (NOAB)',\n templateType: 24,\n languageCode: 'nl',\n configuration: [5],\n },\n // FR\n {\n url: 'https://public-storage.adminpulse.be/public/aml/fr/Identification%20personel.docx',\n label: 'Identification personel',\n templateType: 4,\n languageCode: 'fr',\n },\n {\n url: 'https://public-storage.adminpulse.be/public/aml/fr/Identification%20entreprise.docx',\n label: 'Identification entreprise',\n templateType: 5,\n languageCode: 'fr',\n },\n {\n url: 'https://public-storage.adminpulse.be/public/aml/fr/Analyse%20du%20risque.docx',\n label: 'Analyse du risque',\n templateType: 6,\n languageCode: 'fr',\n },\n {\n url: 'https://public-storage.adminpulse.be/public/aml/fr/Bénéficiare.docx',\n label: 'Bénéficiaire',\n templateType: 7,\n languageCode: 'fr',\n },\n {\n url: 'https://public-storage.adminpulse.be/public/aml/fr/Fiduciaire%20personne.docx',\n label: 'Fiduciaire personne',\n templateType: 8,\n languageCode: 'fr',\n },\n {\n url: 'https://public-storage.adminpulse.be/public/aml/fr/Fiduciaire%20entreprise.docx',\n label: 'Fiduciaire entreprise',\n templateType: 9,\n languageCode: 'fr',\n },\n {\n url: 'https://public-storage.adminpulse.be/public/aml/fr/Acceptation%20des%20clients.xlsx',\n label: 'Acceptation des clients',\n templateType: 20,\n languageCode: 'fr',\n },\n {\n url: 'https://public-storage.adminpulse.be/public/aml/fr/Analyse%20du%20risque%20extensif.docx',\n label: 'Analyse du risque extensif',\n templateType: 19,\n languageCode: 'fr',\n },\n // EN\n {\n url: 'https://public-storage.adminpulse.be/public/aml/en/Person%20verification.docx',\n label: 'Person verification',\n templateType: 4,\n languageCode: 'en',\n },\n {\n url: 'https://public-storage.adminpulse.be/public/aml/en/Company%20verification.docx',\n label: 'Company verification',\n templateType: 5,\n languageCode: 'en',\n },\n {\n url: 'https://public-storage.adminpulse.be/public/aml/en/Risk%20assessment.docx',\n label: 'Risk assessment',\n templateType: 6,\n languageCode: 'en',\n },\n {\n url: 'https://public-storage.adminpulse.be/public/aml/en/Beneficiaries.docx',\n label: 'Beneficiaries',\n templateType: 7,\n languageCode: 'en',\n },\n {\n url: 'https://public-storage.adminpulse.be/public/aml/en/Representative%20person.docx',\n label: 'Representative person',\n templateType: 8,\n languageCode: 'en',\n },\n {\n url: 'https://public-storage.adminpulse.be/public/aml/en/Representative%20company.docx',\n label: 'Representative company',\n templateType: 9,\n languageCode: 'en',\n },\n {\n url: 'https://public-storage.adminpulse.be/public/aml/en/Client%20acceptance.xlsx',\n label: 'Client acceptance',\n templateType: 20,\n languageCode: 'en',\n },\n ],\n },\n {\n category: 'AuthorizationLetter',\n message: messages.AuthorizationLetter,\n items: [\n // NL\n {\n url: 'https://public-storage.adminpulse.be/public/Documentation%20files/nl/Sjabloon%20fiscale%20volmacht%20-%20Bedrijf.docx',\n label: 'Fiscale volmacht - Bedrijf',\n templateType: 10,\n languageCode: 'nl',\n },\n {\n url: 'https://public-storage.adminpulse.be/public/Documentation%20files/nl/Sjabloon%20fiscale%20volmacht%20-%20Eenmanszaak.docx',\n label: 'Fiscale volmacht - Eenmanszaak',\n templateType: 10,\n languageCode: 'nl',\n },\n // FR\n {\n url: 'https://public-storage.adminpulse.be/public/Documentation%20files/fr/Modèle%20procuration%20fiscale%20-%20Société.docx',\n label: 'Procuration fiscale - Société',\n templateType: 10,\n languageCode: 'fr',\n },\n {\n url: 'https://public-storage.adminpulse.be/public/Documentation%20files/fr/Modèle%20procuration%20fiscale%20-%20Entreprise%20Individuelle.docx',\n label: 'Procuration fiscale - Entreprise Individuelle',\n templateType: 10,\n languageCode: 'fr',\n },\n ],\n },\n {\n category: 'AssignmentLetter',\n message: messages.AssignmentLetter,\n notConfiguration: [5],\n items: [\n // NL\n {\n url: 'https://public-storage.adminpulse.be/public/assignment%20letters/nl/ITAA%202024%20-%20Model%20opdrachtbrief%20met%20algemene%20voorwaarden.docx',\n label: 'ITAA 2024 - Model opdrachtbrief met algemene voorwaarden',\n templateType: 3,\n languageCode: 'nl',\n },\n {\n url: 'https://public-storage.adminpulse.be/public/assignment%20letters/nl/ITAA%202021%20-%20Aanhangsel%20bij%20de%20opdrachtbrief%20-%20UBO-register%20en%20GDPR.docx',\n label: 'ITAA 2021 - Aanhangsel bij de opdrachtbrief - UBO-register en GDPR',\n templateType: 3,\n languageCode: 'nl',\n },\n {\n url: 'https://public-storage.adminpulse.be/public/assignment%20letters/nl/ITAA%202023%20-%20Model%20opdrachtbrief%20PB%20consument.docx',\n label: 'ITAA 2023 - Model opdrachtbrief PB consument',\n templateType: 3,\n languageCode: 'nl',\n },\n // FR\n {\n url: 'https://public-storage.adminpulse.be/public/assignment%20letters/fr/ITAA%202024%20-%20Mod%C3%A8le%20lettre%20de%20mission%20avec%20conditions%20g%C3%A9n%C3%A9rales.docx',\n label: 'ITAA 2024 - Modèle lettre de mission avec conditions générales',\n templateType: 3,\n languageCode: 'fr',\n },\n {\n url: 'https://public-storage.adminpulse.be/public/assignment%20letters/fr/ITAA%202021%20-%20Avenant%20%C3%A0%20la%20lettre%20de%20mission%20-%20registre%20UBO%20et%20RGPD.docx',\n label: 'ITAA 2021 - Avenant à la lettre de mission - registre UBO et RGPD',\n templateType: 3,\n languageCode: 'fr',\n },\n {\n url: 'https://public-storage.adminpulse.be/public/assignment%20letters/fr/ITAA%202023%20-%20Mod%C3%A8le%20lettre%20de%20mission%20IPP%20consommateur.docx',\n label: 'ITAA 2023 - Modèle lettre de mission IPP consommateur',\n templateType: 3,\n languageCode: 'fr',\n },\n // EN\n {\n url: 'https://public-storage.adminpulse.be/public/assignment%20letters/en/ITAA%202023%20-%20Engagement%20letter%20and%20its%20general%20terms%20and%20conditions.docx',\n label: 'ITAA 2023 - Engagement letter and its general terms and conditions',\n templateType: 3,\n languageCode: 'en',\n },\n ],\n },\n {\n category: 'Questionnaires',\n message: messages.Questionnaires,\n items: [\n // NL\n {\n url: 'https://public-storage.adminpulse.be/public/Documentation%20files/nl/adminpulse-pb-questionnaire-nl.docx',\n label: 'Personenbelasting',\n templateType: 18,\n languageCode: 'nl',\n notConfiguration: [5],\n },\n {\n url: 'https://public-storage.adminpulse.be/public/Documentation%20files/nl/AdminPulse_aangifte_inkomstenbelasting.docx',\n label: 'Inkomstenbelasting',\n templateType: 18,\n languageCode: 'nl',\n configuration: [5],\n },\n // FR\n {\n url: 'https://public-storage.adminpulse.be/public/Documentation%20files/fr/adminpulse-pb-questionnaire-fr.docx',\n label: 'Impôt des personnes physiques',\n templateType: 18,\n languageCode: 'fr',\n notConfiguration: [5],\n },\n {\n url: 'https://public-storage.adminpulse.be/public/Documentation%20files/en/adminpulse-pb-questionnaire-en.docx',\n label: 'Personal income tax',\n templateType: 18,\n languageCode: 'en',\n notConfiguration: [5],\n },\n ],\n },\n {\n category: 'Other',\n message: messages.Other,\n items: [\n // NL\n {\n url: 'https://public-storage.adminpulse.be/public/Documentation%20files/nl/UBO-overzicht.docx',\n label: 'UBO overzicht',\n templateType: 99,\n languageCode: 'nl',\n },\n // FR\n {\n url: 'https://public-storage.adminpulse.be/public/Documentation%20files/fr/Aperçu UBO.docx',\n label: 'Aperçu UBO',\n templateType: 99,\n languageCode: 'fr',\n },\n ],\n },\n];\nvar filterTenantConfiguration = function (item, tenantConfiguration) {\n if (!item)\n return false;\n if (!!item.notConfiguration && item.notConfiguration.length > 0) {\n if (item.notConfiguration.indexOf(tenantConfiguration) >= 0)\n return false;\n }\n if (!!item.configuration && item.configuration.length > 0) {\n if (item.configuration.indexOf(tenantConfiguration) < 0)\n return false;\n }\n return true;\n};\nvar noEmptyCategories = function (category) { return category.items.length > 0; };\nvar applyTenantConfigurationFilter = function (categories, tenantConfiguration) {\n // Configuration filter on category\n return categories\n .filter(function (x) { return filterTenantConfiguration(x, tenantConfiguration); })\n .map(function (x) { return (__assign(__assign({}, x), { items: x.items.filter(function (i) { return filterTenantConfiguration(i, tenantConfiguration); }) })); })\n .filter(noEmptyCategories);\n};\nvar applyTenantLanguagesFilter = function (categories, languages) {\n if (!languages || languages.length === 0)\n return categories;\n return categories\n .map(function (x) { return (__assign(__assign({}, x), { items: x.items.filter(function (i) { return languages.indexOf(i.languageCode) >= 0; }) })); })\n .filter(noEmptyCategories);\n};\nvar applyCategoryFilters = function (categories, languageCode, templateType) {\n return categories\n .map(function (x) {\n var result = __assign({}, x);\n if (languageCode) {\n result.items = result.items.filter(function (t) { return t.languageCode === languageCode; });\n }\n if (templateType) {\n result.items = result.items.filter(function (t) { return t.templateType === templateType; });\n }\n return result;\n })\n .filter(noEmptyCategories);\n};\nexport var getLanguages = function (categories) {\n var languages = [];\n for (var c = 0; c < categories.length; c++) {\n var cat = categories[c];\n for (var i = 0; i < cat.items.length; i++) {\n var example = cat.items[i];\n if (languages.indexOf(example.languageCode) < 0)\n languages.push(example.languageCode);\n // Exit early when all 3 languages are found\n if (languages.length === 3)\n return languages;\n }\n }\n return languages;\n};\nexport var getExamples = function (tenantConfiguration, languages, languageCode, templateType) {\n var categories = applyTenantLanguagesFilter(applyTenantConfigurationFilter(examples, tenantConfiguration), languages);\n // Use all filters\n var filteredExamples = applyCategoryFilters(categories, languageCode, templateType);\n if (filteredExamples.length > 0)\n return filteredExamples;\n if (languageCode) {\n // Try without language filter\n filteredExamples = applyCategoryFilters(categories, undefined, templateType);\n if (filteredExamples.length > 0)\n return filteredExamples;\n }\n if (templateType) {\n // Try without templateType filter\n filteredExamples = applyCategoryFilters(categories, languageCode, undefined);\n if (filteredExamples.length > 0)\n return filteredExamples;\n }\n filteredExamples = applyCategoryFilters(categories, undefined, undefined);\n return filteredExamples;\n};\nvar searchCategory = function (category, search, intl) {\n if (!search)\n return category;\n if (!category)\n return category;\n // Return all examples if category label matches\n var translation = category.message && category.message.id ? intl.formatMessage(category.message) : null;\n if (translation && translation.toLowerCase().indexOf(search) >= 0)\n return category;\n // Filter examples by label\n return __assign(__assign({}, category), { items: category.items.filter(function (l) { return l.label && l.label.toLowerCase().indexOf(search) >= 0; }) });\n};\nexport var searchExamples = function (items, intl, search) {\n if (search === void 0) { search = ''; }\n if (!search)\n return items;\n var parts = search.split(' ');\n var result = items;\n parts.forEach(function (term) {\n result = result.map(function (x) { return searchCategory(x, term.toLowerCase(), intl); }).filter(noEmptyCategories);\n });\n return result;\n};\nexport var useExamples = function (tenantConfiguration, tenantLanguages, languageCode, templateType, search) {\n var intl = useIntl();\n var filteredExamples = useMemo(function () { return getExamples(tenantConfiguration, tenantLanguages, languageCode, templateType); }, [tenantConfiguration, tenantLanguages, languageCode, templateType]);\n return useMemo(function () {\n var searchedExamples = searchExamples(filteredExamples, intl, search);\n return {\n examples: searchedExamples,\n languages: getLanguages(searchedExamples),\n };\n }, [filteredExamples, intl, search]);\n};\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage } from 'react-intl';\n\nimport FormattedListValue from '@/shared/components/FormattedListValue';\nimport classNames from 'classnames';\nimport intlShape from '@/shared/utils/intlShape';\nimport messages from './documentTemplateMessages';\nimport { useExamples } from './examples';\n\nconst ExampleLanguageColumn = ({ intl, languageCode, examples }) => {\n if (examples.length === 0) return
    ;\n\n return (\n
    \n \n
      \n {examples.map(e => (\n
    • \n \n \n {e.label}\n \n
    • \n ))}\n
    \n
    \n );\n};\nExampleLanguageColumn.propTypes = {\n intl: intlShape.isRequired,\n languageCode: PropTypes.oneOf(['nl', 'fr', 'en']).isRequired,\n examples: PropTypes.arrayOf(\n PropTypes.shape({\n url: PropTypes.string.isRequired,\n label: PropTypes.string.isRequired,\n }),\n ),\n};\nExampleLanguageColumn.defaultProps = {\n examples: [],\n};\n\nconst DocumentTemplateExamples = ({\n intl,\n className,\n languageCode,\n templateType,\n search,\n tenantConfiguration,\n tenantLanguages,\n}) => {\n const { examples, languages } = useExamples(\n tenantConfiguration,\n tenantLanguages,\n languageCode,\n templateType,\n search,\n );\n\n return (\n
    \n {examples.map(({ category, message, items }) => (\n
    \n
    \n
    \n \n
    \n
    \n
    \n {languages.map(l => (\n t.languageCode === l)}\n intl={intl}\n />\n ))}\n
    \n
    \n ))}\n
    \n );\n};\n\nconst languageCodePropType = PropTypes.oneOf(['nl', 'fr', 'en']);\nDocumentTemplateExamples.propTypes = {\n intl: intlShape.isRequired,\n search: PropTypes.string,\n className: PropTypes.string,\n languageCode: languageCodePropType,\n templateType: PropTypes.number,\n tenantConfiguration: PropTypes.number.isRequired,\n tenantLanguages: PropTypes.arrayOf(languageCodePropType).isRequired,\n};\nDocumentTemplateExamples.defaultProps = {\n className: null,\n languageCode: null,\n templateType: null,\n search: '',\n};\n\nexport default DocumentTemplateExamples;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport Modal from 'react-bootstrap/lib/Modal';\nimport classnames from 'classnames';\nimport { FormattedMessage, injectIntl, useIntl } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport Button from '@/shared/components/Button';\n\nimport api from '@/shared/api';\nimport config from '@/config';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport messages from './documentTemplateMessages';\n\nconst createSearchFilter = search => {\n if (!search || typeof search !== 'string') return () => true;\n const value = search.toLowerCase();\n return p =>\n p.tag.toLowerCase().indexOf(value) >= 0 ||\n (p.description && p.description.toLowerCase().indexOf(value) >= 0);\n};\n\nclass TaskPlaceholdersModal extends Component {\n constructor(props) {\n super(props);\n this.state = {\n taskTemplateId: null,\n taskTemplates: [],\n placeholders: null,\n searchValue: '',\n taskParameters: [],\n };\n }\n\n componentDidMount() {\n this.retrievePlaceholders();\n this.retrieveTaskTemplates();\n }\n\n retrievePlaceholders = () => {\n const { intl } = this.props;\n\n api.base.get(`${config.appUrls.api}/api/documentTemplate/Placeholders/-10`).then(\n ({ data }) => {\n this.setState({\n placeholders: data.map(p => {\n const tag = `{${p}}`;\n const description = intl.formatMessage(listItemMsg('mailplaceholder', tag, ' '));\n return { tag, description };\n }),\n });\n },\n error => {\n handleHttpError(intl)(error);\n return error;\n },\n );\n };\n retrieveTaskParameters = () => {\n const { taskTemplateId } = this.state;\n if (!taskTemplateId) return;\n api.base\n .get(`${config.appUrls.tasks}/api/TaskParameters/Definitions/${taskTemplateId}`)\n .then(({ data }) => {\n this.setState({\n taskParameters: data\n .filter(x => !x.relationFieldType)\n .map(x => ({ tag: `{${x.name}}`, description: x.name }))\n .sort(dynamicSort('description')),\n });\n });\n };\n\n retrieveTaskTemplates = () => {\n const { intl } = this.props;\n api.base.get(`${config.appUrls.tasks}/api/TaskTemplates`).then(({ data }) => {\n const translatedTemplates = data\n .map(t => ({\n ...t,\n label: intl.formatMessage(listItemMsg('taskTemplate', t.id, t.name)), // Map translation to label property\n }))\n .sort(dynamicSort('label'));\n this.setState({ taskTemplates: translatedTemplates });\n });\n };\n\n taskTemplateChanged = taskTemplateId => {\n this.setState({ taskTemplateId, taskParameters: [] }, this.retrieveTaskParameters);\n };\n\n render() {\n const { taskTemplateId, placeholders, searchValue, taskTemplates, taskParameters } = this.state;\n const { onClose, intl } = this.props;\n\n let filteredPlaceholders = placeholders || [];\n let filteredTaskParameters = taskParameters || [];\n if (searchValue) {\n const searchFilter = createSearchFilter(searchValue);\n filteredPlaceholders = filteredPlaceholders.filter(searchFilter);\n filteredTaskParameters = filteredTaskParameters.filter(searchFilter);\n }\n\n return (\n onClose(null)} keyboard={false}>\n \n \n \n \n \n \n
    \n {taskTemplates && taskTemplates.length > 0 ? (\n
    \n \n
    \n this.taskTemplateChanged(e.target.value || null)}\n >\n {taskTemplateId === null && (\n \n )}\n {taskTemplates.map(x => (\n \n ))}\n \n
    \n
    \n ) : null}\n\n \n {placeholders && placeholders.length > 0 ? (\n
    \n
    \n this.setState({ searchValue: e.target.value || '' })}\n placeholder={intl.formatMessage(messages.Search)}\n />\n
    \n
    \n ) : null}\n {filteredTaskParameters.map(p => (\n
    \n
    {p.tag}
    \n
    {p.description}
    \n
    \n ))}\n {filteredTaskParameters.length > 0 && filteredPlaceholders.length > 0 &&
    }\n {filteredPlaceholders.map((p, i, a) => (\n \n
    {p.tag}
    \n
    {p.description}
    \n
    \n ))}\n
    \n \n \n \n \n \n );\n }\n}\n\nTaskPlaceholdersModal.propTypes = {\n intl: intlShape.isRequired,\n onClose: PropTypes.func.isRequired,\n};\n\nexport default injectIntl(TaskPlaceholdersModal);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage } from 'react-intl';\nimport momentPropTypes from 'react-moment-proptypes';\nimport FormattedListValue from '@/shared/components/FormattedListValue';\nimport messages from './invoiceScheduleMessages';\nimport FormattedDayMonth from '../../../shared/components/FormattedDayMonth';\n\nconst getInvoiceText = (id, invoiceTexts, lang) => {\n if (!id || !invoiceTexts) return null;\n const text = invoiceTexts.find(t => t.id === id);\n if (!text) return null;\n return (\n
    \n \n {text.languages[lang]}\n
    \n );\n};\n\nconst InvoiceScheduleLinesTable = ({ lines, schedule, invoiceTexts, taskTemplates }) => {\n const invType = schedule.invoicingType;\n const showDateColumns = lines && lines.some(x => !x.mainTaskTemplateId);\n const showTaskColumns = lines && lines.some(x => !!x.mainTaskTemplateId);\n\n return (\n
    \n {lines && (\n \n \n \n {showDateColumns && (\n \n )}\n {showDateColumns && (\n \n )}\n {showTaskColumns && (\n \n )}\n {showTaskColumns && (\n \n )}\n {invType === 2 && (\n \n )}\n \n \n \n\n \n {lines.map(line => {\n const invoiceTextId =\n line.invoiceTextId ??\n (schedule.invoicingType === 2 && !line.fixed\n ? schedule.altInvoiceTextId\n : schedule.invoiceTextId);\n\n const taskTemplate =\n line.mainTaskTemplateId && taskTemplates\n ? taskTemplates.find(x => x.id === line.mainTaskTemplateId)\n : null;\n const subTaskTemplate =\n taskTemplate?.children && line.subtaskTemplateId\n ? taskTemplate.children.find(x => x.id === line.subtaskTemplateId)\n : null;\n\n return (\n \n {showDateColumns && (\n \n )}\n\n {showDateColumns && (\n \n )}\n {showTaskColumns && (\n \n )}\n\n {showTaskColumns && (\n \n )}\n {invType === 2 && (\n \n )}\n\n \n \n );\n })}\n \n
    \n \n \n \n \n \n \n \n \n \n \n \n
    \n {!line.mainTaskTemplateId && (\n \n )}\n \n {!line.mainTaskTemplateId && (\n \n )}\n \n {!!line.mainTaskTemplateId && (\n \n )}\n \n {!!line.mainTaskTemplateId && !!line.subtaskTemplateId && (\n \n )}\n \n \n \n \n
    \n )}\n
    \n );\n};\n\nInvoiceScheduleLinesTable.propTypes = {\n lines: PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.string,\n name: PropTypes.string,\n invoiceCreationDate: momentPropTypes.momentObj,\n registrationsUntil: momentPropTypes.momentObj,\n }),\n ).isRequired,\n schedule: PropTypes.shape({\n invoicingType: PropTypes.number,\n invoiceTextId: PropTypes.string,\n altInvoiceTextId: PropTypes.string,\n }).isRequired,\n invoiceTexts: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n};\n\nexport default InvoiceScheduleLinesTable;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport { FaCaretUp, FaCaretDown, FaClipboardList } from 'react-icons/fa';\nimport FormattedListValue from '@/shared/components/FormattedListValue';\nimport { FormattedMessage } from 'react-intl';\nimport { IconPencil, DeleteIcon, CopyIcon } from '@/shared/components/Icons';\nimport { CanCreate, CanUpdate, CanDelete } from '@/shared/components/security';\nimport messages from './invoiceScheduleMessages';\nimport InvoiceScheduleLinesTable from './InvoiceScheduleLinesTable';\nimport intlShape from '@/shared/utils/intlShape';\nimport Checkbox from '@/shared/components/input/Checkbox';\n\nconst InvoiceSchedulesTable = ({\n schedules,\n onToggleDetails,\n onEditSchedule,\n onCopySchedule,\n onDeleteSchedule,\n invoiceTexts,\n onTranslate,\n taskTemplates,\n intl,\n}) => {\n const hasTaskflowBilling = schedules && schedules.some(x => x.isTaskflowBilling);\n return (\n \n \n \n \n \n {hasTaskflowBilling ? (\n \n ) : null}\n\n \n \n {schedules &&\n schedules.map(schedule => (\n \n onToggleDetails(schedule.id)}>\n \n \n \n\n {hasTaskflowBilling ? (\n \n ) : null}\n \n \n {schedule.showDetails && (\n \n \n \n )}\n \n ))}\n
    \n \n \n \n \n \n \n \n
    {schedule.showDetails ? : }\n \n \n \n }\n >\n {\n e.stopPropagation();\n onTranslate(schedule);\n }}\n >\n \n \n \n \n \n \n {schedule.isTaskflowBilling && }\n \n
    \n \n {\n onEditSchedule(schedule);\n e.stopPropagation();\n }}\n >\n \n \n \n \n {\n onCopySchedule(schedule);\n e.stopPropagation();\n }}\n >\n \n \n \n \n {\n onDeleteSchedule(schedule);\n e.stopPropagation();\n }}\n >\n \n \n \n
    \n
    \n \n \n
    \n );\n};\n\nInvoiceSchedulesTable.propTypes = {\n schedules: PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.string,\n name: PropTypes.string,\n invoicingType: PropTypes.number,\n }),\n ).isRequired,\n onToggleDetails: PropTypes.func.isRequired,\n onEditSchedule: PropTypes.func.isRequired,\n onCopySchedule: PropTypes.func.isRequired,\n onDeleteSchedule: PropTypes.func.isRequired,\n onTranslate: PropTypes.func.isRequired,\n invoiceTexts: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n taskTemplates: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n intl: intlShape.isRequired,\n};\n\nexport default InvoiceSchedulesTable;\n","import React, { Component, useRef } from 'react';\nimport { FormattedMessage, injectIntl } from 'react-intl';\n\nimport api from '@/shared/api';\nimport config from '@/config';\nimport { CanCreate, CanDelete, CanUpdate, showWhenPermission } from '@/shared/components/security';\nimport authService, { privileges } from '@/shared/services/AuthService';\nimport intlShape from '@/shared/utils/intlShape';\nimport ZendeskHelp from '@/shared/components/ZendeskHelp';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport enumCache from '@/shared/services/EnumCacheService';\nimport FormattedListValue, { listItemMsg } from '@/shared/components/FormattedListValue';\nimport SimpleFileUpload from '@/shared/components/input/SimpleFileUpload';\nimport TextSearch from '@/shared/components/input/TextSearch';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport EditableSelect from '@/shared/components/editable/EditableSelect';\nimport EditableTextbox from '@/shared/components/editable/EditableTextbox';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport YesNoModal from '@/shared/components/YesNoModal';\nimport ToastrService from '@/shared/services/ToastrService';\nimport SignalRService from '@/shared/services/SignalRService';\n\nimport {\n AddIcon,\n DeleteIcon,\n DownloadIcon,\n EyeIcon,\n IconPencil,\n ReplaceIcon,\n SpinnerIcon,\n CopyIcon,\n SaveIcon,\n UndoIcon,\n} from '@/shared/components/Icons';\nimport SimplePanel from '@/shared/components/SimplePanel';\nimport CollapsablePanel from '@/shared/components/CollapablePanel';\nimport DocumentService from '@/shared/services/DocumentService';\nimport PreviewDocumentTemplateModal from './PreviewDocumentTemplateModal';\nimport messages from './documentTemplateMessages';\n\nimport AddDocumentTemplateModal from './AddDocumentTemplateModal';\nimport PlaceholdersModal from './PlaceholdersModal';\nimport TaskPlaceholdersModal from './TaskPlaceholdersModal';\nimport DocumentTemplateExamples from './DocumentTemplateExamples';\nimport Dropdown from 'react-bootstrap/lib/Dropdown';\nimport MenuItem from 'react-bootstrap/lib/MenuItem';\n\nconst SessionStorageKey = 'DocumentTemplatesSettings';\nconst linkedRelationPlaceholderUrls = {\n nl:\n 'https://public-storage.adminpulse.be/public/Documentation%20files/nl/AdminPulse_Invulvelden_gelinkte_relaties.docx',\n fr:\n 'https://public-storage.adminpulse.be/public/Documentation%20files/fr/AdminPulse_Substituants_relations_liées.docx',\n en:\n 'https://public-storage.adminpulse.be/public/Documentation%20files/en/AdminPulse_Placeholders_linked_relations.docx',\n};\nconst invoiceTemplateTypes = [0, 1, 2, 11, 12, 14, 15, 16, 17];\n\nclass DocumentTemplateContainer extends Component {\n state = {\n templates: null,\n templateTypes: null,\n companies: [],\n search: '',\n filters: {\n templateType: null,\n language: null,\n relationType: null,\n companyId: null,\n },\n uploading: false,\n showAddModal: false,\n showPlaceholdersModal: false,\n showTaskPlaceholdersModal: false,\n deleteTemplate: null,\n examplesCollapsed: false,\n tenantConfiguration: 0,\n loadingDocumentDetails: false,\n showCheckinDocumentModal: false,\n checkinTemplate: null,\n templateCheckoutInfo: null,\n actionsInProgress: false,\n };\n\n constructor(props) {\n super(props);\n const sessionParams = JSON.parse(sessionStorage.getItem(SessionStorageKey)) || {};\n\n this.state = {\n ...this.state,\n ...sessionParams,\n };\n }\n\n documentCheckedoutHandler = documentEditLink => {\n const { intl } = this.props;\n ToastrService.success(intl.formatMessage(messages.CheckedOutSuccesfull));\n this.setState({ actionsInProgress: false });\n window.open(documentEditLink);\n };\n\n documentCheckedinHandler = blobId => {\n this.setState({ actionsInProgress: false });\n };\n\n componentDidMount() {\n const { intl } = this.props;\n\n SignalRService.subscribe('checkoutFinished', this.documentCheckedoutHandler);\n SignalRService.subscribe('checkinFinished', this.documentCheckedinHandler);\n\n Promise.all([enumCache.get('templatetype'), enumCache.get('relationtype')]).then(\n ([templateTypes, relationTypes]) => {\n const dataCache = DataCacheService.getDataCache();\n this.setState({\n templateTypes: templateTypes\n .filter(x => invoiceTemplateTypes.indexOf(x.key) === -1) // Exclude invoice types\n .map(x => ({\n id: x.key,\n label: intl.formatMessage(listItemMsg('templatetype', x.key, x.value)),\n }))\n .sort(dynamicSort('label')),\n languages: dataCache.language\n .map(x => ({\n id: x.code,\n label: intl.formatMessage(listItemMsg('language', x.code, x.description || '')),\n isDefault: x.isDefault,\n }))\n .sort(dynamicSort('label')),\n relationTypes: relationTypes\n .map(x => ({\n id: `${x.key}`,\n label: intl.formatMessage(listItemMsg('relationtype', x.key, x.value)),\n }))\n .sort(dynamicSort('label')),\n companies: dataCache.company\n .map(x => ({ ...x, label: x.name }))\n .sort(dynamicSort('label')),\n tenantConfiguration: dataCache.tenantConfiguration || 0,\n });\n },\n );\n this.loadTemplates();\n }\n\n componentWillUnmount() {\n SignalRService.unsubscribe('checkoutFinished', this.documentCheckedoutHandler);\n SignalRService.unsubscribe('checkinFinished', this.documentCheckedinHandler);\n }\n\n loadTemplateCheckoutInfo = () => {\n const { templates } = this.state;\n const templateIds = templates.map(t => t.documentId);\n DocumentService.getTemplateCheckoutInfo(templateIds).then(data => {\n this.setState({ templateCheckoutInfo: data });\n });\n };\n\n removeCheckOutStatus = template => {\n const { templateCheckoutInfo } = this.state;\n this.setState({\n templateCheckoutInfo: {\n ...templateCheckoutInfo,\n [template.documentId]: undefined,\n },\n });\n };\n\n loadTemplates = () => {\n const { filters } = this.state;\n api.base.get(`${config.appUrls.api}/api/DocumentTemplate/Templates`, { params: filters }).then(\n ({ data }) => {\n this.setState({\n templates: data,\n });\n this.loadTemplateCheckoutInfo();\n },\n error => {\n const { intl } = this.props;\n handleHttpError(intl)(error);\n },\n );\n };\n\n filterChanged = filter => {\n const { filters } = this.state;\n const newFilters = { ...filters, ...filter };\n if (JSON.stringify(filters) !== JSON.stringify(newFilters)) {\n this.setState({ filters: newFilters }, () => {\n this.setSessionParams();\n this.loadTemplates();\n });\n }\n };\n updateTemplate = (template, changes) => {\n const model = { ...template, ...changes };\n const { intl } = this.props;\n if (JSON.stringify(model) === JSON.stringify(template)) return;\n api.base.put(`${config.appUrls.api}/api/documentTemplate/UpdateTemplate/`, model).then(\n ({ data }) => {\n if (!data) return;\n this.updateTemplateRow(data);\n ToastrService.changesSaved(intl);\n },\n error => {\n handleHttpError(intl)(error);\n },\n );\n };\n\n updateTemplateRow = template => {\n this.setState(({ templates }) => ({\n templates: templates.map(t => {\n if (t.id !== template.id) return t;\n return template;\n }),\n }));\n };\n\n downloadTemplate = template => DocumentService.download(template.documentId);\n previewTemplate = template => {\n this.setState({ activeTemplate: template, showPreviewModal: true });\n };\n\n replaceTemplate = (template, [file]) => {\n if (!file) return;\n\n this.setState({ uploading: template.id });\n const formData = new FormData();\n formData.append('data', file);\n\n api.base\n .post(`${config.appUrls.api}/api/documentTemplate/ReplaceTemplate/${template.id}`, formData, {\n headers: {\n 'Content-Type': undefined,\n },\n })\n .then(\n ({ data }) => {\n if (!data) return;\n\n this.updateTemplateRow(data);\n },\n error => {\n const { intl } = this.props;\n handleHttpError(intl)(error);\n },\n )\n .finally(() => {\n this.setState({ uploading: false });\n });\n };\n deleteTemplate = template => {\n api.base.delete(`${config.appUrls.api}/api/documentTemplate/Delete/${template.id}`).then(\n () => {\n this.setState(({ templates }) => ({\n templates: templates.filter(t => t.id !== template.id),\n deleteTemplate: null,\n }));\n },\n error => {\n const { intl } = this.props;\n handleHttpError(intl)(error);\n },\n );\n };\n\n copyTemplate = template => {\n api.base.post(`${config.appUrls.api}/api/documentTemplate/Copy/${template.id}`).then(\n async response => {\n const copiedTemplate = response.data; // Assuming response.data contains the copied template\n\n const { intl } = this.props;\n\n // Update the state to include the new template\n const { templates } = this.state;\n const sourceTemplateIndex = templates.findIndex(t => t.id === template.id);\n\n if (sourceTemplateIndex !== -1) {\n // Create a new array to hold the updated templates list\n const updatedTemplates = [\n ...templates.slice(0, sourceTemplateIndex + 1), // Copy elements before the source template (including the source template)\n copiedTemplate, // Add the copied template after the source template\n ...templates.slice(sourceTemplateIndex + 1), // Copy elements after the source template\n ];\n // Update state with the new templates array\n this.setState({\n templates: updatedTemplates,\n });\n }\n\n ToastrService.changesSaved(intl);\n },\n error => {\n const { intl } = this.props;\n handleHttpError(intl)(error);\n },\n );\n };\n\n appendTemplate = template => {\n this.setState(({ templates }) => ({\n templates: !template ? templates : [...templates, template],\n showAddModal: false,\n }));\n };\n setSessionParams = (changes = {}) => {\n const { examplesCollapsed, filters } = this.state;\n const data = {\n examplesCollapsed,\n filters,\n ...changes,\n };\n\n sessionStorage.setItem(SessionStorageKey, JSON.stringify(data));\n };\n\n toggleExamples = collapsed => {\n this.setState({ examplesCollapsed: collapsed }, () => this.setSessionParams());\n };\n\n getFilteredTemplates = () => {\n const { templates, search } = this.state;\n\n if (!search) return templates;\n\n const parts = search.split(' ');\n let result = templates;\n\n parts.forEach(term => {\n result = result.filter(x => x.name && x.name.toLowerCase().indexOf(term.toLowerCase()) >= 0);\n });\n\n return result;\n };\n\n onCheckinDocument = template => {\n this.checkinDocument(template);\n };\n\n onDiscardCheckout = template => {\n this.setState({\n showCheckinDocumentModal: true,\n checkinTemplate: template,\n actionsInProgress: true,\n });\n };\n\n discardCheckout = template => {\n const { intl } = this.props;\n DocumentService.discardCheckout(template.documentId).then(\n () => {\n this.setState({\n checkinTemplate: null,\n showCheckinDocumentModal: false,\n actionsInProgress: false,\n });\n this.loadTemplateCheckoutInfo();\n },\n error => {\n console.error(error);\n if (error.response && error.response.data && error.response.data.code) {\n handleHttpError(intl)(error);\n }\n this.setState({\n showCheckinDocumentModal: false,\n actionsInProgress: false,\n actionsInProgress: false,\n });\n log.error('error checking in document ', error);\n },\n );\n };\n\n checkinDocument(template) {\n const { intl } = this.props;\n this.setState({ actionsInProgress: true });\n DocumentService.checkin(template.documentId).then(\n () => {\n this.setState(\n {\n showCheckinDocumentModal: false,\n actionsInProgress: false,\n },\n () => this.removeCheckOutStatus(template),\n );\n },\n error => {\n console.error(error);\n if (error.response && error.response.data && error.response.data.code) {\n handleHttpError(intl)(error);\n }\n this.setState({\n showCheckinDocumentModal: false,\n actionsInProgress: false,\n });\n log.error('error checking in document ', error);\n },\n );\n }\n\n checkoutDocument = (template, openinApp) => {\n const { intl } = this.props;\n this.setState({ actionsInProgress: true });\n DocumentService.checkout(template.documentId, openinApp).then(\n data => {\n if (!!data) {\n this.setState({\n actionsInProgress: false,\n });\n this.loadTemplateCheckoutInfo();\n }\n },\n error => {\n console.error(error);\n if (error.response && error.response.data && error.response.data.code) {\n handleHttpError(intl)(error);\n } else {\n ToastrService.error(intl.formatMessage(messages.MsgCheckoutDocumentSuccess));\n }\n this.setState({ actionsInProgress: false });\n log.error('error checking out document ', error);\n },\n );\n };\n\n isCheckedOut = documentId => {\n const { templateCheckoutInfo } = this.state;\n return templateCheckoutInfo[documentId];\n };\n\n isCheckedOutByCurrentUser = documentId => {\n const { templateCheckoutInfo } = this.state;\n return templateCheckoutInfo[documentId] === authService.getUserId();\n };\n\n setCheckoutInfo = documentId => {\n this.setState({\n isDocumentCheckedOut: this.isCheckedOut(documentId),\n isDocumentCheckedOutByCurrentUser: this.isCheckedOutByCurrentUser(documentId),\n });\n };\n\n render() {\n const {\n templateTypes,\n filters,\n languages,\n relationTypes,\n companies,\n uploading,\n showAddModal,\n showPlaceholdersModal,\n showTaskPlaceholdersModal,\n deleteTemplate,\n examplesCollapsed,\n showPreviewModal,\n activeTemplate,\n tenantConfiguration,\n search,\n showCheckinDocumentModal,\n checkinTemplate,\n templateCheckoutInfo,\n actionsInProgress,\n isDocumentCheckedOut,\n isDocumentCheckedOutByCurrentUser,\n } = this.state;\n const { intl } = this.props;\n const readOnly = !authService.hasPermission({\n functionality: 'settings',\n privilege: privileges.Update,\n });\n\n const defaultLanguage = ((languages || []).find(x => x.isDefault) || { id: 'nl' }).id;\n const multipleCompanies = companies.length > 1;\n\n const languageCode = intl.locale.split('-')[0];\n const { [languageCode]: linkedRelationPlaceholderUrl = null } = linkedRelationPlaceholderUrls;\n\n const filteredTemplates = this.getFilteredTemplates();\n\n const checkedOutUserId = showCheckinDocumentModal\n ? templateCheckoutInfo[checkinTemplate.documentId]\n : null;\n\n const checkedOutUserName = checkedOutUserId\n ? DataCacheService.getUserName(checkedOutUserId)\n : null;\n return (\n
    \n
    \n
    \n

    \n {intl.formatMessage(messages.DocumentTemplates)}\n \n

    \n
    \n this.setState({ showPlaceholdersModal: true })}\n title={intl.formatMessage(messages.ShowAvailablePlaceholders)}\n type=\"button\"\n >\n \n \n {linkedRelationPlaceholderUrl && (\n \n \n \n )}\n this.setState({ showTaskPlaceholdersModal: true })}\n title={intl.formatMessage(messages.ShowAvailablePlaceholders)}\n type=\"button\"\n >\n \n \n \n this.setState({ showAddModal: true })}\n >\n {uploading === true ? : }\n \n \n \n
    \n
    \n
    \n
    \n
    \n this.setState({ search: value || '' })}\n delay={200}\n />\n
    \n
    \n \n this.filterChanged({\n templateType: e.target.value ? parseInt(e.target.value) : null,\n })\n }\n value={filters.templateType || ''}\n >\n \n {templateTypes &&\n templateTypes.map(t => (\n \n ))}\n \n
    \n
    \n \n this.filterChanged({\n language: e.target.value || null,\n })\n }\n value={filters.language || ''}\n >\n \n {languages &&\n languages.map(t => (\n \n ))}\n \n
    \n {multipleCompanies && (\n
    \n \n this.filterChanged({\n companyId: e.target.value || null,\n })\n }\n value={filters.companyId || ''}\n >\n \n {companies &&\n companies.map(t => (\n \n ))}\n \n
    \n )}\n
    \n \n l.id) ?? []}\n />\n \n
    \n
    \n {filteredTemplates && (\n \n \n \n \n \n \n \n {multipleCompanies && (\n \n )}\n \n \n \n \n {filteredTemplates.map(template => (\n \n \n \n \n \n {multipleCompanies && (\n \n )}\n \n \n ))}\n \n
    \n \n \n \n \n \n \n \n \n \n \n \n
    \n this.updateTemplate(template, { name })}\n readOnly={readOnly}\n />\n \n {templateTypes && (\n this.updateTemplate(template, { templateType })}\n options={templateTypes}\n required\n readOnly={readOnly}\n bindToId\n />\n )}\n \n {languages && (\n this.updateTemplate(template, { languageCode })}\n options={languages}\n required\n readOnly={readOnly}\n bindToId\n />\n )}\n \n {relationTypes && (\n this.updateTemplate(template, { relationType })}\n placeholder={intl.formatMessage(messages.All)}\n displayValue={\n template.relationType === null ? (\n \n ) : (\n \n )\n }\n readOnly={readOnly}\n options={relationTypes}\n bindToId\n />\n )}\n \n {companies && (\n this.updateTemplate(template, { companyId })}\n placeholder={intl.formatMessage(messages.All)}\n displayValue={\n template.companyId === null ? (\n \n ) : (\n companies.find(x => x.id === template.companyId).name\n )\n }\n readOnly={readOnly}\n options={companies}\n bindToId\n />\n )}\n \n
    \n this.previewTemplate(template)}\n className=\"btn btn-xs btn-icon\"\n >\n \n \n {!DataCacheService.hasUserConnectPlatform(46) &&\n !!templateCheckoutInfo &&\n templateCheckoutInfo[template.documentId] == null && (\n \n \n DocumentService.edit(template.documentId, intl.locale.split('-')[0])\n }\n title={intl.formatMessage(messages.Edit)}\n className=\"btn btn-xs btn-icon\"\n >\n \n \n \n )}\n {!DataCacheService.hasUserConnectPlatform(46) &&\n !!templateCheckoutInfo &&\n templateCheckoutInfo[template.documentId] != null && (\n \n \n DocumentService.edit(template.documentId, intl.locale.split('-')[0])\n }\n title={intl.formatMessage(messages.Edit)}\n className=\"btn btn-xs btn-icon disabled\"\n >\n \n \n \n )}\n this.downloadTemplate(template)}\n className=\"btn btn-xs btn-icon\"\n >\n \n \n \n this.replaceTemplate(template, files)}\n accept=\"application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\"\n disabled={\n !!uploading ||\n (!!templateCheckoutInfo &&\n templateCheckoutInfo[template.documentId] != null)\n }\n >\n {uploading && uploading === template.id ? (\n \n ) : (\n \n )}\n \n \n \n this.copyTemplate(template)}\n >\n \n \n \n \n this.setState({ deleteTemplate: template })}\n >\n \n \n \n {DataCacheService.hasUserConnectPlatform(46) && (\n \n this.setCheckoutInfo(template.documentId)}\n >\n \n \n \n \n {isDocumentCheckedOut ? null : (\n this.checkoutDocument(template, true)}\n disabled={actionsInProgress}\n >\n \n {intl.formatMessage(messages.CheckoutApp)}\n \n )}\n {isDocumentCheckedOut ? null : (\n this.checkoutDocument(template, false)}\n disabled={actionsInProgress}\n >\n \n {intl.formatMessage(messages.CheckoutBrowser)}\n \n )}\n {isDocumentCheckedOutByCurrentUser ? (\n \n DocumentService.getCheckedOutLink(template.documentId).then(\n link => {\n if (!link) return;\n window.open(link);\n },\n )\n }\n disabled={actionsInProgress}\n >\n \n {intl.formatMessage(messages.ContinueEditing)}\n \n ) : null}\n {isDocumentCheckedOutByCurrentUser ? (\n this.onCheckinDocument(template)}\n >\n \n {intl.formatMessage(messages.Checkin)}\n \n ) : null}\n {isDocumentCheckedOut ? (\n this.onDiscardCheckout(template)}\n // Disabled if user is not admin or checked out user\n disabled={\n actionsInProgress ||\n (!isDocumentCheckedOutByCurrentUser &&\n !authService.hasPermission({\n functionality: 'CompanyOwn',\n privilege: 'Update',\n }))\n }\n >\n \n {intl.formatMessage(messages.DiscardCheckout)}\n \n ) : null}\n \n \n \n )}\n
    \n
    \n )}\n\n {showPreviewModal && (\n this.setState({ showPreviewModal: false })}\n />\n )}\n {showAddModal && (\n this.appendTemplate(template)}\n />\n )}\n {showPlaceholdersModal && (\n this.setState({ showPlaceholdersModal: false })}\n />\n )}\n {showTaskPlaceholdersModal && (\n this.setState({ showTaskPlaceholdersModal: false })}\n />\n )}\n {deleteTemplate !== null && (\n \n this.setState(state => ({\n ...state,\n deleteTemplate: null,\n }))\n }\n onSave={() => this.deleteTemplate(deleteTemplate)}\n />\n )}\n {showCheckinDocumentModal && (\n \n this.setState({\n showCheckinDocumentModal: false,\n loadingDocumentDetails: false,\n actionsInProgress: false,\n })\n }\n onSave={() => this.discardCheckout(checkinTemplate)}\n />\n )}\n
    \n );\n }\n}\n\nDocumentTemplateContainer.propTypes = {\n intl: intlShape.isRequired,\n};\n\nexport default showWhenPermission('Settings', 'read')(injectIntl(DocumentTemplateContainer));\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport moment from 'moment';\nimport { injectIntl, FormattedMessage } from 'react-intl';\nimport { FaPlus } from 'react-icons/fa';\nimport { showWhenPermission, CanCreate } from '@/shared/components/security';\nimport authService, { features, privileges } from '@/shared/services/AuthService';\nimport ZendeskHelp from '@/shared/components/ZendeskHelp';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport intlShape from '@/shared/utils/intlShape';\nimport InvoiceSchedulesTable from './InvoiceSchedulesTable';\n\nimport api from '../../../shared/api';\nimport config from '../../../config';\nimport ToastrService from '../../../shared/services/ToastrService';\n\nimport InvoiceScheduleModal from './InvoiceScheduleModal';\nimport messages from './invoiceScheduleMessages';\n\nimport TranslateListItemModal from '../../../shared/components/translations/TranslateListItemModal';\n\nclass InvoiceSchedulesContainer extends Component {\n state = {\n schedules: [],\n invoiceTexts: [],\n taskTemplates: [],\n modalSchedule: null,\n saving: false,\n translationModal: null,\n };\n\n componentDidMount() {\n const scheduleEndpoint = `${config.appUrls.api}/api/InvoiceSchedule/Full`;\n const invTextEndpoint = `${config.appUrls.api}/api/InvoiceText/InvoiceTexts`;\n const taskTemplatesRequest = authService.hasFeature(features.TaskflowBilling)\n ? api.base.get(`${config.appUrls.tasks}/api/TaskTemplates/Templates`)\n : Promise.resolve({ data: [] });\n\n Promise.all([\n api.base.get(scheduleEndpoint),\n api.base.get(invTextEndpoint),\n taskTemplatesRequest,\n ]).then(([{ data: schedules }, { data: invoiceTexts }, { data: taskTemplates }]) => {\n this.setState(\n state => ({\n ...state,\n schedules: schedules.map(this.mapSchedule),\n invoiceTexts,\n taskTemplates,\n }),\n () => {\n const { editScheduleId } = this.props;\n if (\n editScheduleId &&\n authService.hasPermission({ functionality: 'Settings', privilege: 'read' })\n ) {\n const { schedules: stateSchedules } = this.state;\n const schedule = stateSchedules.find(x => x.id === editScheduleId);\n if (schedule != null) {\n this.openEditDialog(schedule);\n }\n }\n },\n );\n });\n }\n\n mapSchedule = schedule => ({\n ...schedule,\n lines: schedule.lines.map(line => ({\n ...line,\n registrationsUntil: moment(line.registrationsUntil),\n invoiceCreationDate: moment(line.invoiceCreationDate),\n })),\n });\n\n toggleDetails = scheduleId => {\n const { schedules } = this.state;\n // Immutable update of element in array\n const newSchedules = schedules.map(item => {\n if (item.id === scheduleId) {\n return { ...item, showDetails: !item.showDetails };\n }\n return item;\n });\n\n this.setState(state => ({\n ...state,\n schedules: newSchedules,\n }));\n };\n\n openEditDialog = schedule => {\n const { saving } = this.state;\n if (saving) return;\n\n this.setState({\n modalSchedule: schedule,\n });\n };\n onModalClose = schedule => {\n const { modalSchedule } = this.state;\n if (schedule) {\n if (modalSchedule.id) {\n // Edit\n this.setState(state => ({\n schedules: state.schedules.map(s => {\n if (s.id === schedule.id) {\n return { ...this.mapSchedule(schedule), showDetails: true };\n }\n return { ...s, showDetails: false };\n }),\n modalSchedule: null,\n }));\n } else {\n // Add\n this.setState(state => ({\n schedules: [\n {\n ...this.mapSchedule(schedule),\n isNew: true,\n showDetails: true,\n },\n ...state.schedules.map(s => ({ ...s, showDetails: false })),\n ],\n modalSchedule: null,\n }));\n }\n } else {\n this.setState({\n modalSchedule: null,\n });\n }\n };\n\n handleError = error => {\n const { intl } = this.props;\n handleHttpError(intl)(error);\n\n this.setState({\n saving: false,\n });\n };\n\n copySchedule = schedule => {\n const { saving } = this.state;\n if (saving) return;\n\n const endpoint = `${config.appUrls.api}/api/InvoiceSchedule/Copy/${schedule.id}`;\n this.setState({ saving: true }, () => {\n api.base\n .get(endpoint)\n .then(({ data }) => {\n this.setState(state => ({\n ...state,\n saving: false,\n schedules: [\n {\n ...this.mapSchedule(data),\n isNew: true,\n showDetails: true,\n },\n ...state.schedules.map(s => ({ ...s, showDetails: false })),\n ],\n }));\n const { intl } = this.props;\n ToastrService.changesSaved(intl);\n })\n .catch(this.handleError);\n });\n };\n\n deleteSchedule = schedule => {\n const { intl } = this.props;\n const { saving } = this.state;\n if (saving) return;\n if (schedule.inUse) {\n ToastrService.warning(intl.formatMessage(messages.UnableToDeleteScheduleInUse));\n return;\n }\n\n const endpoint = `${config.appUrls.api}/api/InvoiceSchedule/Delete/${schedule.id}`;\n this.setState({ saving: true }, () => {\n api.base\n .delete(endpoint)\n .then(() => {\n this.setState(state => ({\n ...state,\n saving: false,\n schedules: state.schedules.filter(s => s.id !== schedule.id),\n }));\n ToastrService.changesSaved(intl);\n })\n .catch(this.handleError);\n });\n };\n openTranslateDialog = schedule => {\n const { saving } = this.state;\n if (saving) return;\n this.setState({\n translationModal: {\n list: 'invoiceschedule',\n listId: schedule.id,\n fallback: schedule.name,\n },\n });\n };\n handleTranslationModalClosed = result => {\n if (!result) {\n // Cancelled\n this.setState({ translationModal: null });\n return;\n }\n const { listId, fallback = '' } = result;\n const { schedules } = this.state;\n const schedule = schedules.find(x => x.id === listId);\n if (schedule && schedule.name !== fallback) {\n const { lines, ...model } = schedule; // Remove lines from model\n api.base\n .put(`${config.appUrls.api}/api/InvoiceSchedule`, { ...model, name: fallback })\n .then(({ data }) => {\n this.setState({\n translationModal: null,\n schedules: schedules.map(x => (x.id !== data.id ? x : { ...x, name: data.name })),\n });\n });\n } else {\n this.setState({ translationModal: null });\n }\n };\n\n render() {\n const { schedules, modalSchedule, invoiceTexts, translationModal, taskTemplates } = this.state;\n const { intl } = this.props;\n\n return (\n
    \n
    \n
    \n

    \n \n \n

    \n \n
    \n this.openEditDialog({})}\n >\n \n \n \n
    \n
    \n
    \n
    \n \n\n \n {translationModal && (\n \n )}\n
    \n );\n }\n}\n\nInvoiceSchedulesContainer.propTypes = {\n intl: intlShape.isRequired,\n editScheduleId: PropTypes.string,\n};\nInvoiceSchedulesContainer.defaultProps = {\n editScheduleId: null,\n};\n\nexport default showWhenPermission('Settings', 'read')(injectIntl(InvoiceSchedulesContainer));\n","import { defineMessages } from 'react-intl';\n\nconst messages = defineMessages({\n EmployeesInTeamX: \"Employees in team '{team}'\",\n CreateNewTeam: 'Create new team',\n DeleteTeam: 'Delete team',\n AddEmployee: 'Add employee',\n EmployeeXAddedToTeamX: \"{employee} added to '{team}'\",\n RemoveEmployeeFromTeam: 'Remove employee from team',\n RemoveEmployeeFromTeamMsg: \"Are you sure you want to remove {employee} from '{team}?'\",\n EmployeeXRemovedFromTeamX: \"{employee} removed from '{team}'\",\n ViewEmployeesInTeamX: \"View employees in '{team}'\",\n RemoveTeam: 'Remove team',\n RemoveTeamXMsg:\n \"Are you sure you want to delete team '{team}'? All employees in this team will be unlinked.\",\n AddTeamToOtherTeamX: \"Add team to '{team}'\",\n SelectATeamToViewItsEmployees: 'Select a team to view its employees.',\n EmployeeInheritedTeamExplanation:\n \"This employee is a member of the parent team of '{team}' and is automatically included in this team.\",\n Teams: 'Teams',\n RestructureTeams: 'Restructure teams',\n Save: 'Save',\n Cancel: 'Cancel',\n RestructureTeamsInfo:\n \"Use drag and drop to restructure the teams above. \\r\\nDon't forget to click the save button afterwards.\",\n Name: 'Name',\n Email: 'Email',\n CanViewInvoices: 'Can view invoices?',\n});\n\nexport default messages;\n","import React, { Component } from 'react';\nimport { FormattedMessage, defineMessages, injectIntl } from 'react-intl';\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport UserSearch from '@/shared/components/input/UserSearch';\n\nconst messages = defineMessages({\n ChooseEmployeeToAddToTeamX: \"Choose the employee you want to add to team '{team}'\",\n AddEmployee: 'Add employee',\n AllUsersAreAlreadyInThisTeam: 'All users are already in this team',\n});\n\nclass SelectEmployeeModal extends Component {\n state = {\n user: undefined,\n };\n\n userChanged(user) {\n this.setState(state => ({\n ...state,\n user,\n }));\n }\n saveEmployee = () => {\n const { onSave, team } = this.props;\n const { user } = this.state;\n\n return onSave(user, team);\n };\n render() {\n const { onClose, users, intl, team } = this.props;\n const { user } = this.state;\n\n return (\n \n
    \n

    \n \n

    \n {users && users.length === 0 ? (\n

    \n \n

    \n ) : (\n this.userChanged(selectedUser)} />\n )}\n
    \n \n );\n }\n}\n\nexport default injectIntl(SelectEmployeeModal);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport { FaCaretUp, FaCaretDown, FaPencilAlt, FaTrashAlt, FaRegClone } from 'react-icons/fa';\nimport FormattedListValue from '@/shared/components/FormattedListValue';\nimport { FormattedMessage } from 'react-intl';\nimport { CanUpdate, CanDelete } from '@/shared/components/security';\nimport Checkbox from '@/shared/components/input/Checkbox';\nimport messages from './workflowConfigurationMessages';\n\nconst WorkflowConfigurationTable = ({\n configurations,\n onEdit,\n onDelete,\n onCopy,\n taskTemplates,\n intl,\n}) => (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {configurations &&\n configurations.map(configuration => (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ))}\n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n \n \n \n {configuration.subTaskTemplateId && (\n \n )}\n \n \n \n \n \n \n \n \n \n {configuration.workflowType !== 58 && (\n \n )}\n \n {configuration.workflowType !== 58 && (\n \n )}\n \n
    \n onEdit(configuration)}\n >\n \n \n \n onDelete(configuration)}\n >\n \n \n \n
    \n
    \n);\n\nexport default WorkflowConfigurationTable;\n","import React, { Component } from 'react';\nimport Tree from 'react-ui-tree';\nimport { FormattedMessage, injectIntl, useIntl } from 'react-intl';\nimport classNames from 'classnames';\nimport OverlayTrigger from 'react-bootstrap/lib/OverlayTrigger';\nimport Popover from 'react-bootstrap/lib/Popover';\nimport PropTypes from 'prop-types';\nimport {\n AddIcon,\n DeleteIcon,\n FolderIcon,\n InfoCircleIcon,\n SaveIcon,\n UndoIcon,\n UserIcon,\n} from '@/shared/components/Icons';\nimport intlShape from '@/shared/utils/intlShape';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport Button from '@/shared/components/Button';\nimport YesNoModal from '@/shared/components/YesNoModal';\nimport ZendeskHelp from '@/shared/components/ZendeskHelp';\nimport SimplePanel from '@/shared/components/SimplePanel';\nimport { dynamicSort, dynamicSortMultiple } from '@/shared/utils/dynamicSort';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport Checkbox from '@/shared/components/input/Checkbox';\nimport api from '../../../shared/api';\nimport config from '../../../config';\nimport LoadingAnimation from '../../../shared/components/LoadingAnimation';\nimport EditableTextbox from '../../../shared/components/editable/EditableTextbox';\nimport FixedTree from '../../../shared/components/FixedTree';\nimport {\n CanCreate,\n CanDelete,\n CanRead,\n CanUpdate,\n showWhenPermission,\n} from '../../../shared/components/security';\nimport messages from './teamMessages';\nimport SelectEmployeeModal from './SelectEmployeeModal';\nimport ToastrService from '../../../shared/services/ToastrService';\n\nconst employeeSortFunc = dynamicSortMultiple('inheritedTeam', 'firstName', 'lastName', 'email');\n\nclass TeamsContainer extends Component {\n state = { tree: null, tags: null, newTag: '', saving: false, restructure: false };\n\n mapTreeNode = ({ children = null, ...node }) => {\n const result = {\n ...node,\n collapsed: false,\n children: children && children.length ? children.map(this.mapTreeNode) : [],\n };\n return result;\n };\n\n componentDidMount() {\n const { intl } = this.props;\n\n const users = (DataCacheService.getDataCache()?.user || [])\n .filter((u) => u.isActive) // Only active users\n .map((u) => ({\n id: u.userID,\n name: `${u.firstName} ${u.lastName}`,\n employeeId: u.employeeID,\n }))\n .sort(dynamicSort('name'));\n\n api.base\n .get(`${config.appUrls.api}/api/team/get`)\n .then(({ data }) => {\n this.setState({\n tree: { children: data.map(this.mapTreeNode), collapsed: false },\n users,\n });\n })\n .catch(handleHttpError(intl));\n }\n\n createTeam = (team) => {\n const { saving } = this.state;\n if (saving) return;\n\n this.setState({ saving: true });\n return api.base.post(`${config.appUrls.api}/api/team/create`, team).then(\n ({ data }) => {\n this.setState({\n tree: { children: data.map(this.mapTreeNode), collapsed: false },\n saving: false,\n });\n },\n (error) => {\n const { intl } = this.props;\n\n this.setState({ saving: false });\n handleHttpError(intl)(error);\n return null;\n },\n );\n };\n\n AddTeamToOtherTeam = (team, name) => {\n name = name.replace(';', '');\n if (!name) return;\n\n const newTeam = {\n parentId: team ? team.id : null,\n name,\n };\n\n this.createTeam(newTeam);\n };\n\n deleteTeam = (activeDeleteTeam) => {\n const { activeTeam, saving } = this.state;\n if (saving) return;\n this.setState({ saving: true });\n\n return api.base\n .delete(`${config.appUrls.api}/api/team/deleteTeam?id=${activeDeleteTeam.id}`)\n .then(\n ({ data }) => {\n this.setState((state) => ({\n showDeleteTeamModal: false,\n tree: { children: data.map(this.mapTreeNode), collapsed: false },\n // If the team's employees are shown on the right side of the screen and this delete is deleted, set the employees array to null\n employees:\n activeTeam && activeTeam.id === activeDeleteTeam.id ? undefined : state.employees,\n activeTeam: undefined,\n saving: false,\n }));\n },\n (error) => {\n const { intl } = this.props;\n this.setState({ saving: false });\n handleHttpError(intl)(error);\n return null;\n },\n );\n };\n\n addTeamToRoot = (name) => {\n if (!name) return;\n this.createTeam({\n name,\n });\n };\n deleteCollapsedStateRecursive = ({ children, ...currentNode }) => {\n const copy = {\n ...currentNode,\n children: children.map((c) => this.deleteCollapsedStateRecursive(c)),\n };\n delete copy.collapsed;\n\n return copy;\n };\n\n onTeamSelected = (team) => {\n this.setState({ activeTeam: team });\n\n this.retrieveEmployeesInTeam(team);\n };\n\n retrieveEmployeesInTeam = (team) => {\n api.base.get(`${config.appUrls.api}/api/team/employees?id=${team.id}`).then(({ data }) => {\n this.setState({\n employees: data.sort(employeeSortFunc),\n });\n });\n };\n\n addEmployeeToTeam = (employee, team) => {\n const { intl } = this.props;\n return api.base\n .post(`${config.appUrls.api}/api/team/AddEmployeeToTeam`, {\n employeeId: employee.employeeId,\n teamId: team.id,\n })\n .then(({ data }) => {\n this.setState({\n showSelectEmployeeModal: false,\n employees: data.sort(employeeSortFunc),\n });\n ToastrService.success(\n intl.formatMessage(messages.EmployeeXAddedToTeamX, {\n employee: employee.name,\n team: team.name,\n }),\n );\n })\n .catch((error) => handleHttpError(intl)(error));\n };\n\n deleteEmployeeFromTeam = (employee, team) => {\n const { intl } = this.props;\n\n return api.base\n .post(`${config.appUrls.api}/api/team/DeleteEmployeeFromTeam`, {\n employeeId: employee.employeeId,\n teamId: team.id,\n })\n .then(({ data }) => {\n this.setState({\n showDeleteEmployeeModal: false,\n employees: data.sort(employeeSortFunc),\n });\n ToastrService.success(\n intl.formatMessage(messages.EmployeeXRemovedFromTeamX, {\n employee: `${employee.firstName} ${employee.lastName}`,\n team: team.name,\n }),\n );\n })\n .catch((error) => handleHttpError(intl)(error));\n };\n startRestructure = () => {\n const { tree } = this.state;\n // Store copy of original tree state\n const treeCopy = this.deleteCollapsedStateRecursive(tree);\n\n this.setState({ restructure: true, treeCopy });\n };\n\n saveRestructure = () => {\n const { treeCopy, tree, activeTeam, saving } = this.state;\n if (saving) return;\n const ignoreCollapsedTree = this.deleteCollapsedStateRecursive(tree);\n\n if (JSON.stringify(treeCopy) === JSON.stringify(ignoreCollapsedTree)) {\n this.setState({ restructure: false, treeCopy: null });\n\n return;\n }\n this.setState({ saving: true });\n\n return api.base.put(`${config.appUrls.api}/api/Team`, tree.children).then(\n ({ data }) => {\n const newTree = { children: data.map(this.mapTreeNode), collapsed: false };\n\n this.setState(\n {\n tree: newTree,\n treeCopy: null,\n restructure: false,\n saving: false,\n },\n () => {\n if (!activeTeam) return;\n this.retrieveEmployeesInTeam(activeTeam);\n },\n );\n const { intl } = this.props;\n ToastrService.changesSaved(intl);\n return true;\n },\n (error) => {\n const { intl } = this.props;\n handleHttpError(intl)(error);\n this.setState({ saving: false });\n },\n );\n };\n\n cancelRestructure = () => {\n const { treeCopy, saving } = this.state;\n if (saving) return;\n\n this.setState({ restructure: false, tree: treeCopy, treeCopy: null });\n };\n\n toggleCanViewInvoices = (employee, team, canViewInvoices) => {\n if (employee.inheritedTeam && employee.canViewInvoices) return;\n const { saving } = this.state;\n if (saving) return;\n this.setState({\n saving: true,\n });\n const model = { employeeId: employee.employeeId, canViewInvoices, teamId: team.id };\n return api.base.put(`${config.appUrls.api}/api/Team/CanViewInvoices`, model).then(\n ({ data }) => {\n this.setState({\n employees: data.sort(employeeSortFunc),\n saving: false,\n });\n ToastrService.success();\n },\n (error) => {\n const { intl } = this.props;\n handleHttpError(intl)(error);\n this.setState({\n saving: false,\n });\n },\n );\n };\n\n renderTeam = (team) => {\n const { intl } = this.props;\n const { saving, restructure } = this.state;\n\n const deleteTitle = `${intl.formatMessage(messages.DeleteTeam)} '${team.name}'`;\n\n return (\n
    \n {!restructure ? (\n {\n document.activeElement.blur();\n this.onTeamSelected(team);\n }}\n >\n {team.name}\n \n ) : (\n {team.name}\n )}\n {!restructure && (\n \n \n e.stopPropagation()}\n onClick={() => {\n document.activeElement.blur();\n this.onTeamSelected(team);\n }}\n >\n \n \n \n \n e.stopPropagation()}>\n this.AddTeamToOtherTeam(team, tag)}\n disabled={saving}\n displayValue={\n \n \n \n }\n inputClassName=\"tag-input input-sm\"\n />\n \n \n \n e.stopPropagation()}\n onClick={(e) => {\n this.setState({ activeDeleteTeam: team, showDeleteTeamModal: true });\n e.stopPropagation();\n }}\n >\n \n \n \n \n )}\n
    \n );\n };\n\n render() {\n const {\n tree,\n tags,\n newTag,\n activeTeam,\n employees,\n showSelectEmployeeModal,\n showDeleteTeamModal,\n showDeleteEmployeeModal,\n activeDeleteTeam,\n users,\n activeEmployee,\n saving,\n restructure,\n } = this.state;\n const { intl } = this.props;\n\n const filteredUsers =\n users && employees\n ? users.filter((u) => employees.findIndex((e) => e.employeeID === u.employeeId) < 0)\n : [];\n return (\n \n
    \n
    \n {showSelectEmployeeModal && activeTeam && (\n \n this.setState((state) => ({\n ...state,\n showSelectEmployeeModal: false,\n }))\n }\n onSave={this.addEmployeeToTeam}\n />\n )}\n\n {showDeleteEmployeeModal && activeTeam && activeEmployee && (\n \n this.setState((state) => ({\n ...state,\n showDeleteEmployeeModal: false,\n activeEmployee: undefined,\n }))\n }\n onSave={() => this.deleteEmployeeFromTeam(activeEmployee, activeTeam)}\n />\n )}\n\n {showDeleteTeamModal && activeDeleteTeam && (\n \n this.setState((state) => ({\n ...state,\n showDeleteTeamModal: false,\n activeDeleteTeam: undefined,\n }))\n }\n onSave={() => this.deleteTeam(activeDeleteTeam)}\n />\n )}\n\n
    \n {tree ? (\n
    \n
    \n \n \n
    \n \n this.setState({ newTag: e.target.value.replace(';', '') })\n }\n list=\"tags\"\n disabled={saving || restructure}\n autoComplete=\"off\"\n onKeyDown={(e) => {\n if (e.keyCode === 13) {\n this.addTeamToRoot(newTag);\n this.setState({ newTag: '' });\n } else if (e.keyCode === 27) {\n this.setState({ newTag: '' });\n }\n }}\n />\n \n {\n if (!newTag || saving) return;\n this.addTeamToRoot(newTag);\n this.setState({ newTag: '' });\n }}\n >\n \n \n \n
    \n
    \n
    \n\n \n }\n >\n {restructure && !saving ? (\n \n ) : (\n \n )}\n \n
    \n \n
    \n {!restructure ? (\n this.startRestructure()}\n >\n \n \n \n ) : (\n
    \n
    \n \n
    \n\n this.saveRestructure()}\n >\n \n  \n \n \n \n
    \n )}\n
    \n
    \n
    \n ) : (\n \n )}\n
    \n
    \n {activeTeam && !restructure && (\n
    \n \n \n this.setState({ showSelectEmployeeModal: true })}\n disabled={!activeTeam || saving}\n >\n \n \n \n {intl.formatMessage(messages.AddEmployee)}\n \n \n\n \n \n \n \n \n \n \n \n \n {employees &&\n employees.map((employee) => (\n \n \n {employee.firstName} {employee.lastName}\n \n \n {employee.email}\n \n \n {employee.hasDraftInvoicePermission ? (\n \n this.toggleCanViewInvoices(employee, activeTeam, value)\n }\n value={employee.canViewInvoices}\n disabled={\n saving || (employee.inheritedTeam && employee.canViewInvoices)\n }\n />\n ) : null}\n \n \n \n ))}\n \n
    {intl.formatMessage(messages.Name)}{intl.formatMessage(messages.Email)}\n {intl.formatMessage(messages.CanViewInvoices)}\n \n \n
    \n {/* an employee cannot be removed if it was 'inherited' from one of its parent teams */}\n {!employee.inheritedTeam ? (\n \n \n this.setState({\n showDeleteEmployeeModal: true,\n activeEmployee: employee,\n })\n }\n />\n \n ) : (\n \n {intl.formatMessage(\n messages.EmployeeInheritedTeamExplanation,\n {\n team: activeTeam.name,\n },\n )}\n \n }\n >\n \n \n \n \n )}\n
    \n
    \n )}\n
    \n \n {tags && tags.map((t) => \n
    \n {!restructure && saving && }\n
    \n
    \n );\n }\n}\n\nTeamsContainer.propTypes = {\n intl: intlShape.isRequired,\n};\n\nexport default showWhenPermission('teams', 'read')(injectIntl(TeamsContainer));\n","import { defineMessages } from 'react-intl';\n\nconst messages = defineMessages({\n Task: 'Task',\n Save: 'Save',\n Cancel: 'Cancel',\n Add: 'Add',\n DaysBefore: 'Start search period compared to reference date',\n DaysAfter: 'End search period compared to reference date',\n WorkflowType: 'Workflow type',\n WorkflowConfigurationListTitle: 'Workflow configurations',\n TaskStatus: 'Task status',\n NewTaskStatus: 'New status',\n ReferenceDate: 'Referencedate',\n LastDayOfVatPeriod: 'Last day of the VAT period',\n MarkAsBlocked: 'Mark as blocked',\n MarkAsInapplicable: 'Mark as inapplicable',\n RequireDocumentSigned: 'Require document to be signed to trigger taskflow',\n TaskflowAction: 'Taskflow action',\n Choose: 'Choose',\n ChangesSaved: 'Changes saved',\n Subtask: 'Subtask',\n StartTypingToSearch: 'Start typing to search',\n AllSubtasksWillBeSetToDoneIfYouDontSelectOne:\n 'If you only select the main task, and the status is set to \"done\", all subtasks will also be moved to \"done\"',\n\n GeneratedDocumentQrCodeScannedInfo:\n 'The task that will be updated is based on the task linked to the originally generated document.',\n DontChangeStatus: \"Don't change the status\",\n TaskTemplateNotFoundProbablyDeleted: 'Task template not found, it was probably removed!',\n});\n\nexport default messages;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { injectIntl, useIntl } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport classNames from 'classnames';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\n\nimport messages from '@/modules/tasks/taskMessages';\n\nclass TaskTemplateFilter extends Component {\n static propTypes = {\n onMainTaskTemplateChanged: PropTypes.func.isRequired,\n onSubTaskTemplateChanged: PropTypes.func.isRequired,\n intl: intlShape.isRequired,\n showValidation: PropTypes.bool,\n mainTaskTemplateId: PropTypes.string,\n subTaskTemplateId: PropTypes.string,\n showSubtaskFilter: PropTypes.bool,\n };\n static defaultProps = {\n showSubtaskFilter: true,\n };\n\n constructor(props) {\n super(props);\n this.state = {\n mainTaskTemplates: [],\n subTaskTemplates: [],\n mainTaskTemplateId: props.mainTaskTemplateId,\n subTaskTemplateId: props.subTaskTemplateId,\n showValidation: props.showValidation,\n };\n }\n\n componentDidMount() {\n const { intl } = this.props;\n const { mainTaskTemplateId } = this.state;\n\n api.base.get(`${config.appUrls.tasks}/api/TaskTemplates`).then(({ data }) => {\n const translatedTemplates = data\n .map(t => ({\n ...t,\n label: intl.formatMessage(listItemMsg('taskTemplate', t.id, t.name)), // Map translation to label property\n }))\n .sort((a, b) => (a.label > b.label) - (a.label < b.label)); // Sort on label property\n\n this.setState(state => ({\n ...state,\n mainTaskTemplates: translatedTemplates,\n }));\n });\n\n if (mainTaskTemplateId !== undefined) {\n api.base\n .get(`${config.appUrls.tasks}/api/TaskTemplates/children/${mainTaskTemplateId}`)\n .then(({ data }) => {\n const translatedTemplates = data\n .map(t => ({\n ...t,\n label: intl.formatMessage(listItemMsg('taskTemplate', t.id, t.name)), // Map translation to label property\n }))\n .sort((a, b) => (a.label > b.label) - (a.label < b.label)); // Sort on label property\n\n this.setState(state => ({\n ...state,\n subTaskTemplates: translatedTemplates,\n }));\n });\n }\n }\n\n mainTaskTemplateChanged = event => {\n const templateId = event.target.value;\n const { intl, onMainTaskTemplateChanged } = this.props;\n if (templateId) {\n api.base\n .get(`${config.appUrls.tasks}/api/TaskTemplates/children/${templateId}`)\n .then(({ data }) => {\n const translatedTemplates = data\n .map(t => ({\n ...t,\n label: intl.formatMessage(listItemMsg('taskTemplate', t.id, t.name)), // Map translation to label property\n }))\n .sort((a, b) => (a.label > b.label) - (a.label < b.label)); // Sort on label property\n\n this.setState(state => ({\n ...state,\n subTaskTemplates: translatedTemplates,\n mainTaskTemplateId: templateId,\n }));\n\n onMainTaskTemplateChanged(templateId);\n });\n } else {\n this.setState(state => ({\n ...state,\n subTaskTemplates: [],\n mainTaskTemplateId: templateId,\n }));\n onMainTaskTemplateChanged(templateId);\n }\n };\n\n subTaskTemplateChanged = event => {\n const templateId = event.target.value;\n const { onSubTaskTemplateChanged } = this.props;\n\n this.setState(state => ({\n ...state,\n subTaskTemplateId: templateId,\n }));\n\n onSubTaskTemplateChanged(templateId);\n };\n\n render() {\n const { intl, showValidation, showSubtaskFilter } = this.props;\n const {\n mainTaskTemplates,\n subTaskTemplates,\n mainTaskTemplateId,\n subTaskTemplateId,\n } = this.state;\n\n const mainTaskTemplateClassName = classNames('form-group', {\n 'has-error': !mainTaskTemplateId && showValidation,\n });\n\n const subTaskTemplateClassName = classNames('form-group', {\n 'has-error': !subTaskTemplateId && showValidation,\n });\n\n return (\n
    \n
    \n \n
    \n \n \n {mainTaskTemplates.map(template => (\n \n ))}\n \n
    \n
    \n {showSubtaskFilter && (\n
    \n
    \n \n
    \n \n \n {subTaskTemplates.map(template => (\n \n ))}\n \n
    \n
    \n
    \n )}\n
    \n );\n }\n}\n\nexport default injectIntl(TaskTemplateFilter);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { injectIntl, useIntl } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport ToastrService from '@/shared/services/ToastrService';\nimport TaskTemplateFilter from '@/modules/tasks/TaskTemplateFilter';\nimport Checkbox from '@/shared/components/input/Checkbox';\nimport enumCache from '@/shared/services/EnumCacheService';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport classNames from 'classnames';\nimport authService, { privileges } from '@/shared/services/AuthService';\nimport AutoComplete from '@/shared/components/input/select/AutoComplete';\nimport handleHttpError from '../../../shared/services/HandleHttpError';\nimport messages from './workflowConfigurationMessages';\n\nclass WorkflowConfigurationModal extends Component {\n static propTypes = {\n show: PropTypes.bool,\n workflowConfiguration: PropTypes.shape({}).isRequired,\n onClose: PropTypes.func.isRequired,\n onSave: PropTypes.func.isRequired,\n intl: intlShape.isRequired,\n };\n\n static defaultProps = {\n show: false,\n };\n\n constructor(props) {\n super(props);\n const { workflowConfiguration } = this.props;\n\n this.state = {\n viewModel: workflowConfiguration || {\n workflowType: null,\n desiredStatus: \"\",\n mainTaskTemplateId: null,\n subTaskTemplateId: null,\n toleranceDaysAfter: 0,\n toleranceDaysBefore: 0,\n requireDocumentSigned: false,\n },\n showValidation: false,\n workflowTypes: [],\n };\n }\n\n componentDidMount() {\n const { intl } = this.props;\n const { viewModel } = this.state;\n enumCache.get('workflowType').then(data => {\n let selectedWorkflow;\n const mappedWorkflows = data\n .map(x => ({\n id: x.key,\n label: intl.formatMessage(listItemMsg('workflowType', x.key, x.value)),\n }))\n .sort(dynamicSort('label'));\n if (viewModel.workflowType >= 0) {\n selectedWorkflow = mappedWorkflows\n .map(x => ({ key: x.id, label: x.label }))\n .find(x => x.key === viewModel.workflowType);\n }\n this.setState({\n selectedWorkflow,\n workflowTypes: mappedWorkflows,\n });\n });\n }\n\n closeModal = () => {\n const { onClose } = this.props;\n\n onClose();\n };\n\n saveModal = () => {\n const { onSave, intl } = this.props;\n const { viewModel } = this.state;\n const configurationDto = { ...viewModel };\n const successMessage = intl.formatMessage(messages.ChangesSaved);\n\n if (configurationDto.workflowType === 3) {\n configurationDto.desiredStatus = null; // remove desired status for VAT amount workflow\n }\n // Validate\n if (\n !configurationDto.mainTaskTemplateId ||\n (!viewModel.workflowType && viewModel.workflowType !== 0)\n ) {\n this.setState(state => ({\n ...state,\n showValidation: true,\n }));\n return;\n }\n\n const action = configurationDto.id === undefined ? api.base.post : api.base.put;\n\n return action(`${config.appUrls.api}/api/workflowconfiguration`, configurationDto).then(\n ({ data: serviceObject }) => {\n ToastrService.success(successMessage);\n onSave(serviceObject);\n },\n error => {\n handleHttpError(intl)(error);\n },\n );\n };\n\n selectedWorkflowChanged = workflow => {\n if (workflow === undefined) return;\n const { viewModel } = this.state;\n this.setState({\n selectedWorkflow: workflow,\n viewModel: {\n ...viewModel,\n workflowType: workflow ? parseInt(workflow.key) : undefined,\n },\n });\n };\n\n render() {\n const { show, intl } = this.props;\n const { viewModel, showValidation, workflowTypes, selectedWorkflow } = this.state;\n const showSubtaskDetails = !viewModel.workflowType || viewModel.workflowType !== 3;\n const showReferenceDate = !viewModel.workflowType || viewModel.workflowType !== 58;\n const workFlowTypeClassName = classNames('form-group', {\n 'has-error': showValidation && !viewModel.workflowType && viewModel.workflowType !== 0,\n });\n\n const canUpdate = authService.hasPermission({\n functionality: 'settings',\n privilege: privileges.Update,\n });\n\n const mappedWorkflows = workflowTypes.map(x => ({\n key: x.id,\n label: x.label,\n }));\n\n return (\n \n {show && (\n
    \n
    \n
    \n \n
    \n this.selectedWorkflowChanged(item)}\n mode=\"edit\"\n value={selectedWorkflow}\n showAll\n />\n
    \n
    \n
    \n \n
    \n \n this.setState({\n viewModel: {\n ...viewModel,\n requireDocumentSigned: value,\n },\n })\n }\n value={viewModel.requireDocumentSigned}\n />\n
    \n
    \n
    \n {showSubtaskDetails && viewModel.mainTaskTemplateId && !viewModel.subTaskTemplateId && (\n
    \n
    \n {intl.formatMessage(messages.AllSubtasksWillBeSetToDoneIfYouDontSelectOne)}\n
    \n
    \n )}\n\n \n this.setState({\n viewModel: {\n ...viewModel,\n mainTaskTemplateId: e,\n },\n })\n }\n onSubTaskTemplateChanged={e =>\n this.setState({\n viewModel: {\n ...viewModel,\n subTaskTemplateId: e,\n },\n })\n }\n />\n\n {showSubtaskDetails && (\n \n
    \n \n
    \n \n this.setState({\n viewModel: {\n ...viewModel,\n desiredStatus: e.target.value,\n },\n })\n }\n className=\"form-control\"\n value={viewModel.desiredStatus}\n >\n \n \n \n \n \n
    \n
    \n {viewModel.subTaskTemplateId && (\n
    \n \n
    \n \n this.setState({\n viewModel: {\n ...viewModel,\n markAsBlocked: value,\n },\n })\n }\n value={viewModel.markAsBlocked}\n />\n
    \n
    \n )}\n\n {viewModel.subTaskTemplateId && (\n
    \n \n
    \n \n this.setState({\n viewModel: {\n ...viewModel,\n markAsInapplicable: value,\n },\n })\n }\n value={viewModel.markAsInapplicable}\n />\n
    \n
    \n )}\n
    \n )}\n {showReferenceDate ? (\n \n
    \n \n \n
    \n
    \n \n
    \n \n this.setState({\n viewModel: {\n ...viewModel,\n toleranceDaysBefore: e.target.value,\n },\n })\n }\n />\n
    \n
    \n
    \n \n
    \n \n this.setState({\n viewModel: {\n ...viewModel,\n toleranceDaysAfter: e.target.value,\n },\n })\n }\n />\n
    \n
    \n
    \n ) : null}\n {viewModel.workflowType === 58 && (\n
    \n
    \n {intl.formatMessage(messages.GeneratedDocumentQrCodeScannedInfo)}\n
    \n
    \n )}\n
    \n
    \n )}\n \n );\n }\n}\n\nexport default injectIntl(WorkflowConfigurationModal);\n","import React, { Component } from 'react';\nimport { FormattedMessage, injectIntl, useIntl } from 'react-intl';\nimport { FaPlus } from 'react-icons/fa';\nimport intlShape from '@/shared/utils/intlShape';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\n\nimport PropTypes from 'prop-types';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport { CanCreate, showWhenPermission } from '@/shared/components/security';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport ZendeskHelp from '@/shared/components/ZendeskHelp';\nimport api from '../../../shared/api';\nimport config from '../../../config';\nimport ToastrService from '../../../shared/services/ToastrService';\n\nimport WorkflowConfigurationTable from './WorkflowConfigurationTable';\nimport WorkflowConfigurationModal from './WorkflowConfigurationModal';\n\nimport messages from './workflowConfigurationMessages';\n\nclass WorkflowConfigurationContainer extends Component {\n state = {\n configurations: [],\n configurationModal: null,\n saving: false,\n showWorkflowConfigurationModal: false,\n };\n\n componentDidMount() {\n const { intl } = this.props;\n const workflowConfigurationEndpoint = `${config.appUrls.api}/api/workflowConfiguration`;\n const taskTemplatesPromise = api.base.get(\n `${config.appUrls.tasks}/api/TaskTemplates/Templates`,\n );\n\n Promise.all([api.base.get(workflowConfigurationEndpoint), taskTemplatesPromise]).then(\n ([{ data: configurations }, { data: taskTemplates }]) => {\n const translatedConfigurations = configurations\n .map(x => ({\n ...x,\n label: intl.formatMessage(listItemMsg('workflowtype', x.workflowType)),\n }))\n .sort(dynamicSort('label'));\n let translatedTemplates = {};\n taskTemplates.map(t => {\n const mainTaskTranslation = {\n [t.id]: intl.formatMessage(listItemMsg('taskTemplate', t.id, t.name)),\n };\n translatedTemplates = {\n ...translatedTemplates,\n ...mainTaskTranslation,\n };\n if (t.children && t.children.length) {\n t.children.map(x => {\n const subtaskTranslation = {\n [x.id]: intl.formatMessage(listItemMsg('taskTemplate', x.id, x.name)),\n };\n translatedTemplates = {\n ...translatedTemplates,\n ...subtaskTranslation,\n };\n });\n }\n });\n this.setState(state => ({\n ...state,\n configurations: translatedConfigurations,\n translatedTemplates,\n }));\n },\n );\n }\n\n openEditDialog = workflowConfiguration => {\n const { saving } = this.state;\n if (saving) return;\n\n this.setState({\n configurationModal: workflowConfiguration,\n showWorkflowConfigurationModal: true,\n });\n };\n\n handleError = error => {\n const { intl } = this.props;\n handleHttpError(intl)(error);\n\n this.setState({\n saving: false,\n });\n };\n\n saveConfiguration = configuration => {\n const { configurations } = this.state;\n if (configuration) {\n const existingConfiguration = configurations.find(o => o.id === configuration.id);\n if (existingConfiguration === undefined) {\n // Add\n this.setState(state => ({\n configurations: [\n {\n ...configuration,\n isNew: true,\n },\n ...state.configurations,\n ],\n }));\n } else {\n // Edit\n this.setState(state => ({\n configurations: state.configurations.map(s => {\n if (s.id === configuration.id) {\n return configuration;\n }\n return s;\n }),\n }));\n }\n }\n\n this.setState(state => ({\n ...state,\n showWorkflowConfigurationModal: false,\n }));\n };\n\n deleteConfiguration = configuration => {\n const { saving } = this.state;\n if (saving) return;\n\n const endpoint = `${config.appUrls.api}/api/workflowConfiguration/Delete/${configuration.id}`;\n this.setState({ saving: true }, () => {\n api.base\n .delete(endpoint)\n .then(() => {\n this.setState(state => ({\n ...state,\n saving: false,\n configurations: state.configurations.filter(s => s.id !== configuration.id),\n }));\n\n const { intl } = this.props;\n ToastrService.changesSaved(intl);\n })\n .catch(this.handleError);\n });\n };\n\n render() {\n const {\n configurations,\n configurationModal,\n showWorkflowConfigurationModal,\n translatedTemplates,\n } = this.state;\n const { intl } = this.props;\n\n return (\n <>\n
    \n
    \n

    \n \n \n \n \n

    \n \n
    \n this.openEditDialog(null)}\n >\n \n \n \n
    \n
    \n
    \n
    \n \n\n\n {showWorkflowConfigurationModal && (\n \n this.setState(state => ({\n ...state,\n showWorkflowConfigurationModal: false,\n }))\n }\n onSave={this.saveConfiguration}\n />\n )}\n \n );\n }\n}\n\nWorkflowConfigurationContainer.propTypes = {\n intl: intlShape.isRequired,\n};\n\nexport default showWhenPermission('settings', 'read')(injectIntl(WorkflowConfigurationContainer));\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nimport { Bar } from 'react-chartjs-2';\nimport { Chart, BarElement, Legend, LinearScale, Tooltip, CategoryScale } from 'chart.js';\nimport { getRelativePosition } from 'chart.js/helpers';\n\nChart.register(BarElement, Legend, LinearScale, Tooltip, CategoryScale);\n\n// Adds extra functionality to the default horizontal chart\nexport default class ExtendedHorizontalBar extends Component {\n constructor(props) {\n super(props);\n this.chartRef = React.createRef();\n }\n\n static propTypes = {\n options: PropTypes.shape({}),\n onLabelClick: PropTypes.func,\n onElementClick: PropTypes.func,\n };\n static defaultProps = {\n options: {},\n onLabelClick: index => {},\n onElementClick: element => {},\n };\n handleChartClick = event => {\n const { onLabelClick, onElementClick } = this.props;\n if (!this.chartRef.current) return;\n const [element] = this.chartRef.current.getElementsAtEventForMode(\n event,\n 'nearest',\n { intersect: true },\n false,\n );\n if (element) {\n onElementClick(element);\n return;\n }\n const mousePoint = getRelativePosition(event, this.chartRef.current);\n const scale = this.chartRef.current.scales.y;\n if (\n scale.top > mousePoint.y ||\n scale.bottom < mousePoint.y ||\n scale.left > mousePoint.x ||\n scale.right < mousePoint.x\n )\n return; // Clicked outside of the y-axis\n const index = scale.getValueForPixel(mousePoint.y);\n onLabelClick(index);\n };\n\n render() {\n const { options, onLabelClick, onElementClick, ...rest } = this.props;\n return ;\n }\n}\n","import guid from '@/shared/utils/guid';\n\nexport const datasetColors = [\n 'rgba(0, 178, 149, 1)', // Done\n 'rgba(240, 168, 0, 1)', // In progress\n 'rgba(214, 214, 214, 1)', // Todo\n 'rgba(184, 0, 22, 1)', // Blocked\n];\n\nconst statusCodes = [2, 1, 0, 3]; // Todo: Fix blocked status code\nexport const getDatasetStatus = index => {\n if (index < 0 || index >= statusCodes.length) return null;\n return statusCodes[index];\n};\n\nexport const getStateParamsFromTask = task => {\n if (!task) return {};\n if (task.year)\n return {\n taskId: task.templateId,\n periodicityId: task.periodicityId ?? guid.empty,\n deadlineFrom: task.minDeadline,\n deadlineUntil: task.maxDeadline,\n year: task.year,\n };\n return {\n taskId: task.templateId,\n periodicityId: task.periodicityId ?? guid.empty,\n deadlineFrom: task.minDeadline,\n deadlineUntil: task.maxDeadline,\n };\n};\n\nexport const getStateParamsFromEvent = (data, event) => {\n if (!event) return null;\n const task = data[event.index];\n const statusCode = getDatasetStatus(event.datasetIndex);\n return { ...getStateParamsFromTask(task), mainStatus: [statusCode] };\n};\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { injectIntl, useIntl } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport HorizontalBar from '@/shared/components/charts/HorizontalBar';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport {\n datasetColors,\n getStateParamsFromEvent,\n getStateParamsFromTask,\n} from './taskDashboardUtils';\nimport messages from '../taskMessages';\n\nconst chartOptions = {\n responsive: true,\n indexAxis: 'y',\n maintainAspectRatio: false,\n\n scales: {\n x: {\n stacked: true,\n ticks: {\n callback: value => `${value}%`,\n },\n min: 0,\n max: 100,\n },\n y: {\n stacked: true,\n grid: { display: false },\n },\n },\n layout: {\n padding: {\n bottom: 100,\n },\n },\n plugins: {\n legend: {\n onClick: null,\n },\n tooltip: {\n enabled: true,\n mode: 'index',\n displayColors: true,\n position: 'nearest',\n callbacks: {\n label(context) {\n const statusLabel = context.label;\n const percentage = context.raw;\n const value = context.dataset.values[context.dataIndex];\n return `${statusLabel}: ${value} (${percentage.toFixed(2)}%)`;\n },\n footer(items) {\n if (!items || !items.length) return '';\n const [first] = items;\n const { totalLabel } = first.dataset;\n const total = items.reduce((sum, i) => sum + (i.dataset.values[i.dataIndex] || 0), 0);\n\n return `${totalLabel}: ${total}`;\n },\n },\n },\n },\n};\n\n// Convert data from http call to chart data\nconst transformData = (data, intl) => {\n if (!data) return null;\n\n const labels = data.map(x => x.label);\n\n const totalLabel = intl.formatMessage(messages.Total);\n const datasets = [\n {\n label: intl.formatMessage(listItemMsg('taskstatus', 2, 'Done')),\n backgroundColor: datasetColors[0],\n data: data.map(x => ((x.done || 0) / x.total) * 100),\n values: data.map(x => x.done || 0),\n totalLabel,\n },\n {\n label: intl.formatMessage(listItemMsg('taskstatus', 1, 'In Progress')),\n backgroundColor: datasetColors[1],\n data: data.map(x => ((x.inProgress || 0) / x.total) * 100),\n values: data.map(x => x.inProgress || 0),\n totalLabel,\n },\n {\n label: intl.formatMessage(listItemMsg('taskstatus', 0, 'Todo')),\n backgroundColor: datasetColors[2],\n data: data.map(x => ((x.todo || 0) / x.total) * 100),\n values: data.map(x => x.todo || 0),\n totalLabel,\n },\n {\n label: intl.formatMessage(messages.Blocked),\n backgroundColor: datasetColors[3],\n data: data.map(x => ((x.blocked || 0) / x.total) * 100),\n values: data.map(x => x.blocked || 0),\n totalLabel,\n },\n ];\n\n return {\n labels,\n datasets,\n };\n};\n\nconst PercentagesDashboard = ({ data, intl, onOpenOverview }) =>\n data ? (\n {\n if (!e) return;\n const params = getStateParamsFromEvent(data, e);\n if (params) onOpenOverview(params);\n }}\n onLabelClick={idx => {\n const params = getStateParamsFromTask(data[idx]);\n if (params) onOpenOverview(params);\n }}\n />\n ) : null;\nPercentagesDashboard.propTypes = {\n data: PropTypes.arrayOf(PropTypes.shape({})),\n onOpenOverview: PropTypes.func,\n intl: intlShape.isRequired,\n};\nPercentagesDashboard.defaultProps = {\n data: null,\n onOpenOverview: () => {},\n};\nexport default injectIntl(PercentagesDashboard);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { injectIntl, useIntl } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport HorizontalBar from '@/shared/components/charts/HorizontalBar';\n\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport {\n datasetColors,\n getStateParamsFromEvent,\n getStateParamsFromTask,\n} from './taskDashboardUtils';\nimport messages from '../taskMessages';\n\nconst chartOptions = {\n responsive: true,\n indexAxis: 'y',\n maintainAspectRatio: false,\n\n scales: {\n x: {\n stacked: true,\n },\n y: {\n stacked: true,\n grid: { display: false },\n },\n },\n layout: {\n padding: {\n bottom: 100,\n },\n },\n plugins: {\n tooltip: {\n enabled: true,\n mode: 'index',\n displayColors: true,\n position: 'nearest',\n callbacks: {\n footer(items) {\n if (!items || !items.length) return '';\n const [first] = items;\n const { totalLabel } = first.dataset;\n const total = items.reduce((sum, i) => sum + (i.raw || 0), 0);\n\n return `${totalLabel}: ${total}`;\n },\n },\n },\n },\n};\n\n// Convert data from http call to chart data\nconst transformData = (data, intl) => {\n if (!data) return null;\n const labels = data.map(x => x.label);\n\n const totalLabel = intl.formatMessage(messages.Total);\n const datasets = [\n {\n label: intl.formatMessage(listItemMsg('taskstatus', 2, 'Done')),\n backgroundColor: datasetColors[0],\n data: data.map(x => x.done || 0),\n totalLabel,\n },\n {\n label: intl.formatMessage(listItemMsg('taskstatus', 1, 'In Progress')),\n backgroundColor: datasetColors[1],\n data: data.map(x => x.inProgress || 0),\n totalLabel,\n },\n {\n label: intl.formatMessage(listItemMsg('taskstatus', 0, 'Todo')),\n backgroundColor: datasetColors[2],\n data: data.map(x => x.todo || 0),\n totalLabel,\n },\n {\n label: intl.formatMessage(messages.Blocked),\n backgroundColor: datasetColors[3],\n data: data.map(x => x.blocked || 0),\n totalLabel,\n },\n ];\n\n return {\n labels,\n datasets,\n };\n};\n\nconst QuantitiesDashboard = ({ data, intl, onOpenOverview }) =>\n data ? (\n {\n if (!e) return;\n const params = getStateParamsFromEvent(data, e);\n if (params) onOpenOverview(params);\n }}\n onLabelClick={idx => {\n const params = getStateParamsFromTask(data[idx]);\n if (params) onOpenOverview(params);\n }}\n />\n ) : null;\nQuantitiesDashboard.propTypes = {\n data: PropTypes.arrayOf(PropTypes.shape({})),\n onOpenOverview: PropTypes.func,\n intl: intlShape.isRequired,\n};\nQuantitiesDashboard.defaultProps = {\n data: null,\n onOpenOverview: () => {},\n};\nexport default injectIntl(QuantitiesDashboard);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { defineMessages, injectIntl, useIntl } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport InputGroupWrapper from './InputGroupWrapper';\n\nconst messages = defineMessages({\n Clear: 'Clear',\n});\n\n/*\nAdd clear button after select control\nUse the show property to toggle button visibility\n */\nconst ClearButtonWrapper = ({ children, show, onClear, intl }) => (\n \n \n \n )\n }\n >\n {children}\n \n);\nClearButtonWrapper.propTypes = {\n children: PropTypes.node.isRequired,\n show: PropTypes.bool.isRequired,\n onClear: PropTypes.func.isRequired,\n intl: intlShape.isRequired,\n};\nexport default injectIntl(ClearButtonWrapper);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage, injectIntl, useIntl } from 'react-intl';\nimport { FaUndo } from 'react-icons/fa';\nimport classnames from 'classnames';\nimport momentPropTypes from 'react-moment-proptypes';\nimport intlShape from '@/shared/utils/intlShape';\nimport { hasMultipleCompanies } from '@/shared/components/security/HasMultiCompany';\nimport CompanyMultiSelect from '@/shared/components/input/multiselect/CompanyMultiSelect';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport api from '@/shared/api';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport AuthService from '@/shared/services/AuthService';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport ClearButtonWrapper from '@/shared/components/ClearButtonWrapper';\nimport DelayedDateRangePicker from '@/shared/components/input/DelayedDateRangePicker';\nimport TeamMultiSelect from '@/shared/components/input/multiselect/TeamMultiSelect';\nimport PeriodButtonGroup, { getPeriodStartEndDates } from '@/shared/components/PeriodButtonGroup';\nimport UserSearch from '@/shared/components/input/UserSearch';\nimport guid from '@/shared/utils/guid';\nimport EndFiscalYearMultiSelect from \"@/shared/components/input/multiselect/EndFiscalYearMultiSelect\";\nimport config from '../../../config';\n\nimport messages from '../taskMessages';\n\nconst periods = ['all', 'month', 'nextMonth', 'quarter', 'nextQuarter', 'year'];\n\nexport const defaultFilters = {\n deadlineUntil: null,\n deadlineFrom: null,\n period: null,\n endFiscalYears: [],\n ownCompanies: [],\n userId: null,\n username: null,\n taskTemplateId: null,\n periodicityId: null,\n teams: [],\n};\n\nclass TaskDashboardFilters extends Component {\n state = {\n templates: [],\n periodicities: [],\n };\n\n static propTypes = {\n onFilterChange: PropTypes.func.isRequired,\n filters: PropTypes.shape({\n deadlineUntil: momentPropTypes.momentObj,\n deadlineFrom: momentPropTypes.momentObj,\n endFiscalYears: PropTypes.arrayOf(PropTypes.string),\n period: PropTypes.oneOf(periods),\n ownCompanies: PropTypes.arrayOf(PropTypes.string),\n userId: PropTypes.string,\n taskTemplateId: PropTypes.string,\n periodicityId: PropTypes.string,\n teams: PropTypes.arrayOf(PropTypes.number),\n }),\n showPercentages: PropTypes.bool.isRequired,\n onChartTypeChange: PropTypes.func.isRequired,\n intl: intlShape.isRequired,\n };\n\n static defaultProps = {\n filters: defaultFilters,\n };\n\n componentDidMount() {\n const { filters } = this.props;\n\n if (filters && filters.period) {\n this.setPeriod(filters.period);\n }\n if (filters && filters.endOfFiscalYearPeriod) {\n this.setEndOfFiscalYearPeriod(filters.endOfFiscalYearPeriod);\n }\n this.retrieveTemplates();\n }\n\n componentDidUpdate(prevProps) {\n const { filters: newFilters } = this.props;\n const { filters: oldFilters } = prevProps;\n\n if (oldFilters.taskTemplateId !== newFilters.taskTemplateId) {\n this.retrievePeriodicities(newFilters.taskTemplateId);\n }\n }\n\n filterChanged = filter => {\n const { filters, onFilterChange } = this.props;\n const newFilters = { ...filters, ...filter };\n\n onFilterChange(newFilters);\n };\n\n deadlineChanged = (startDate, endDate) => {\n this.filterChanged({ deadlineFrom: startDate, deadlineUntil: endDate, period: null });\n };\n\n endFiscalYearChanged = (dateFrom, dateUntil) => {\n this.filterChanged({ endOfFiscalYearFrom: dateFrom, endOfFiscalYearUntil: dateUntil, endOfFiscalYearPeriod: null });\n };\n\n setPeriod = value => {\n const [deadlineFrom, deadlineUntil, period] = getPeriodStartEndDates(value);\n this.filterChanged({ deadlineFrom, deadlineUntil, period });\n };\n setEndOfFiscalYearPeriod = value => {\n const [endOfFiscalYearFrom, endOfFiscalYearUntil, endOfFiscalYearPeriod] = getPeriodStartEndDates(value);\n this.filterChanged({ endOfFiscalYearFrom, endOfFiscalYearUntil, endOfFiscalYearPeriod });\n };\n periodChanged = ({ dateFrom, dateUntil, period }) => {\n this.filterChanged({ deadlineFrom: dateFrom, deadlineUntil: dateUntil, period });\n };\n\n endFiscalYearPeriodChanged = ({ dateFrom, dateUntil, period }) => {\n this.filterChanged({ endOfFiscalYearFrom: dateFrom, endOfFiscalYearUntil: dateUntil, endOfFiscalYearPeriod: period });\n };\n\n retrieveTemplates() {\n const { intl } = this.props;\n api.base.get(`${config.appUrls.tasks}/api/TaskTemplates`).then(({ data }) => {\n const translatedTemplates = data\n .map(t => ({\n ...t,\n label: intl.formatMessage(listItemMsg('taskTemplate', t.id, t.name)), // Map translation to label property\n }))\n .sort(dynamicSort('label')); // Sort on label property\n\n this.setState(\n {\n templates: translatedTemplates,\n },\n () => {\n const {\n filters: { taskTemplateId },\n } = this.props;\n if (taskTemplateId) {\n this.retrievePeriodicities(taskTemplateId);\n }\n },\n );\n });\n }\n\n templateChanged = event => {\n const taskTemplateId = event ? event.target.value : null;\n this.filterChanged({\n taskTemplateId,\n periodicityId: null,\n });\n\n this.retrievePeriodicities(taskTemplateId);\n };\n retrievePeriodicities = templateId => {\n const { intl } = this.props;\n if (!templateId) {\n this.setState({ periodicities: null });\n return;\n }\n return api.base\n .get(`${config.appUrls.tasks}/api/TaskPeriodicity/${templateId}`)\n .then(({ data }) => {\n const translatedPeriodicities = data\n .map(t => ({\n ...t,\n label: intl.formatMessage(listItemMsg('taskperiodicity', t.id, t.name)), // Map translation to label property\n }))\n .sort(dynamicSort('label'));\n\n this.setState({\n periodicities: translatedPeriodicities,\n });\n });\n };\n userChanged = item => {\n if (!item || !item.id) {\n this.filterChanged({ userId: null, username: null });\n } else {\n this.filterChanged({\n userId: item.id,\n username: item.name,\n });\n }\n };\n resetFilters = () => {\n const { onFilterChange } = this.props;\n onFilterChange({ ...defaultFilters });\n };\n\n render() {\n const { templates, periodicities } = this.state;\n const { filters, intl, showPercentages, onChartTypeChange } = this.props;\n const showCompanies = hasMultipleCompanies();\n\n const hasFilters = JSON.stringify(filters) !== JSON.stringify(defaultFilters);\n\n return (\n
    \n
    \n
    \n
    \n this.deadlineChanged(startDate, endDate)}\n startDatePlaceholderText={intl.formatMessage(messages.DeadlineFrom)}\n endDatePlaceholderText={intl.formatMessage(messages.DeadlineUntil)}\n />\n
    \n
    \n
    \n
    \n \n
    \n onChartTypeChange(false)}\n type=\"button\"\n title={intl.formatMessage(messages.ShowQuantitiesChart)}\n className={classnames('btn btn-default', {\n active: !showPercentages,\n })}\n >\n {intl.formatMessage(messages.Quantities)}\n \n onChartTypeChange(true)}\n type=\"button\"\n title={intl.formatMessage(messages.ShowPercentagesChart)}\n className={classnames('btn btn-default', {\n active: showPercentages,\n })}\n >\n {intl.formatMessage(messages.Percentages)}\n \n
    \n
    \n
    \n
    \n\n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n this.filterChanged({ teams })}\n idProp=\"code\"\n />\n
    \n
    \n
    \n
    \n
    \n
    \n {templates && (\n this.templateChanged(null)}\n >\n \n \n {templates.map(template => (\n \n ))}\n \n \n )}\n
    \n
    \n
    \n
    \n this.filterChanged({ periodicityId: null })}\n >\n this.filterChanged({ periodicityId: e.target.value || null })}\n className=\"form-control\"\n disabled={!periodicities || !periodicities.length}\n value={filters.periodicityId || ''}\n >\n \n \n  \n \n {periodicities\n ? periodicities.map(periodicity => (\n \n ))\n : null}\n \n \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n {showCompanies && (\n
    \n this.filterChanged({ ownCompanies: companies })}\n />\n
    \n )}\n
    \n
    \n\n
    \n
    \n this.filterChanged({ endFiscalYears })}\n />\n
    \n\n {hasFilters && (\n
    \n \n
    \n )}\n
    \n
    \n );\n }\n}\n\nexport default injectIntl(TaskDashboardFilters);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { injectIntl, useIntl } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport ZendeskHelp from '@/shared/components/ZendeskHelp';\n\nimport { injectStateService, StateService } from '@/shared/services/StateService';\nimport LoadingAnimation from '@/shared/components/LoadingAnimation';\nimport SimplePanel from '@/shared/components/SimplePanel';\nimport Axios from 'axios';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport moment from 'moment';\nimport dateFormatService from '@/shared/services/DateFormatService';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport messages from '../taskMessages';\nimport PercentagesDashboard from './PercentagesDashboard';\nimport QuantitiesDashboard from './QuantitiesDashboard';\nimport TaskDashboardFilters, { defaultFilters } from './TaskDashboardFilters';\nimport { showWhenPermission } from '@/shared/components/security';\nimport { functionalities, privileges } from '@/shared/services/AuthService';\n\nconst sessionStorageKey = 'TaskDashboardParams';\n\nclass TaskDashboardContainer extends Component {\n state = {\n data: null,\n showPercentages: false,\n filters: {\n ...defaultFilters,\n },\n };\n\n constructor(props) {\n super(props);\n\n const { showPercentages = false, filters = null } =\n JSON.parse(sessionStorage.getItem(sessionStorageKey)) || {};\n this.state.showPercentages = showPercentages;\n if (filters) {\n if (filters.deadlineFrom) filters.deadlineFrom = moment.utc(filters.deadlineFrom);\n if (filters.deadlineUntil) filters.deadlineUntil = moment.utc(filters.deadlineUntil);\n this.state.filters = {\n ...defaultFilters,\n ...filters,\n };\n }\n }\n\n static propTypes = {\n intl: intlShape.isRequired,\n stateService: PropTypes.instanceOf(StateService).isRequired,\n };\n\n componentDidMount() {\n this.loadData();\n }\n\n componentWillUnmount() {\n if (typeof this.cancelToken !== 'undefined') {\n this.cancelToken.cancel('Operation canceled due to leaving page.');\n }\n }\n\n loadData = () => {\n if (typeof this.cancelToken !== 'undefined') {\n this.cancelToken.cancel('Operation canceled due to new request.');\n }\n this.cancelToken = Axios.CancelToken.source();\n const { filters } = this.state;\n\n return api.base\n .post(`${config.appUrls.tasks}/api/dashboard/TaskProgressOverview`, filters, {\n cancelToken: this.cancelToken.token,\n })\n .then(({ data }) => {\n const { intl } = this.props;\n this.setState({\n data: data\n .map(x => {\n const templateName = intl.formatMessage(\n listItemMsg('tasktemplate', x.templateId, x.templateName),\n );\n const periodicityName = intl.formatMessage(\n x.periodicityId\n ? listItemMsg('taskperiodicity', x.periodicityId, x.periodicityName)\n : messages.NoPeriodicity,\n );\n const momentPeriod = moment(x.period, 'DD/MM/YYYY');\n const formattedDate = momentPeriod.isValid()\n ? dateFormatService.formatDate(moment(x.period, 'DD/MM/YYYY'))\n : x.period;\n return {\n ...x,\n label: `${templateName} - ${periodicityName} - ${formattedDate}`,\n sortValue: `${templateName} - ${periodicityName} - ${x.periodSort}`,\n };\n })\n .sort(dynamicSort('sortValue')),\n });\n\n // do something\n })\n .catch(error => {\n if (!Axios.isCancel(error)) return error;\n });\n };\n\n toggleDashboards = showPercentages => {\n this.setState({ showPercentages });\n this.updateSessionStorage({ showPercentages });\n };\n\n updateSessionStorage = (value, replace = false) => {\n const currentValue = JSON.parse(sessionStorage.getItem(sessionStorageKey)) || {};\n const newValue = replace ? value : { ...currentValue, ...value };\n sessionStorage.setItem(sessionStorageKey, JSON.stringify(newValue));\n };\n\n filtersChanged = filters => {\n const { filters: currentFilters } = this.state;\n\n if (JSON.stringify(filters) === JSON.stringify(currentFilters)) return;\n this.updateSessionStorage({ filters });\n\n this.setState({ filters, data: null }, () => this.loadData());\n };\n openOverview = p => {\n const { stateService } = this.props;\n const { filters } = this.state;\n const { userId, username, deadlineFrom, deadlineUntil, period, ownCompanies, teams } = filters;\n\n stateService.gotoState('taskflow.overview', {\n filters: { userId, username, deadlineFrom, deadlineUntil, period, ownCompanies, teams, ...p },\n });\n };\n\n render() {\n const { data, showPercentages, filters } = this.state;\n const { intl } = this.props;\n\n return (\n \n <>\n this.filtersChanged(x)}\n showPercentages={showPercentages}\n onChartTypeChange={x => this.toggleDashboards(x)}\n />\n {data ? (\n \n {showPercentages ? (\n \n ) : (\n \n )}\n \n ) : (\n \n )}\n \n \n );\n }\n}\n\nexport default showWhenPermission(\n functionalities.PlannedTask,\n privileges.Read,\n)(injectStateService(injectIntl(TaskDashboardContainer)));\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { IntlShape, defineMessages } from 'react-intl';\nimport isEqual from 'lodash-es/isEqual';\n\nimport MultiSelect, {\n removeItem as removeMultiSelectItem,\n addItem as addMultiSelectItem,\n splitItems as splitMultiSelectItems,\n} from '@/shared/components/input/multiselect/MultiSelect';\nimport intlShape from '@/shared/utils/intlShape';\nimport CompanyMultiSelect from '@/shared/components/input/multiselect/CompanyMultiSelect';\nimport EnumMultiSelect from '@/shared/components/input/multiselect/EnumMultiSelect';\nimport EndFiscalYearMultiSelect from '@/shared/components/input/multiselect/EndFiscalYearMultiSelect';\nimport NumberInput from '@/shared/components/input/NumberInput';\nimport LegalFormMultiSelect from '@/shared/components/input/multiselect/LegalFormMultiSelect';\nimport TeamMultiSelect from '@/shared/components/input/multiselect/TeamMultiSelect';\nimport RelationUserSearch from '@/shared/components/input/RelationUserSearch';\nimport UserSearch from '@/shared/components/input/UserSearch';\nimport AssignmentTemplateSelector from '@/shared/components/input/AssignmentTemplateSelector';\nimport { hasMultipleCompanies } from '@/shared/components/security/HasMultiCompany';\nimport CrmTypeButtonGroup from '@/shared/components/CrmTypeButtonGroup';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport { hasAssignments } from '@/shared/components/security/HasAssignments';\nimport RelationGroupMultiSelect from '@/shared/components/input/multiselect/RelationGroupMultiSelect';\nimport employeeProfileMessages from '@/shared/messages/employeeProfileMessages';\n\nconst messages = defineMessages({\n WithRelationLabels: 'With relation labels',\n WithoutRelationLabels: 'Without relation labels',\n CrmType: 'Crm type',\n RelationType: 'Relation type',\n LegalForms: 'Legal forms',\n OwnCompany: 'Own company',\n AssignmentTemplate: 'Assignment template',\n RelationsAssignedTo: 'Relations assigned to',\n EndFiscalYear: 'End fiscal year',\n AccountingSoftware: 'Accounting software',\n OtherSoftware: 'Other software',\n EmptyAccountingSoftware: 'Empty accounting software',\n Teams: 'Teams',\n ReferenceYear: 'Reference year',\n VatPeriodicity: 'Vat periodicity',\n CreatedBy: 'Created by',\n FinancialStatementScheme: 'FinancialStatementScheme',\n SocialSecurityFund: 'SocialSecurityFund',\n SocialSecretariat: 'SocialSecretariat',\n WithTaskLabels: 'With task labels',\n WithoutTaskLabels: 'Without task labels',\n RelationGroups: 'Relation groups',\n});\n\nconst filterObjects = [\n { id: 'crmType', label: messages.CrmType },\n { id: 'crmTypes', label: messages.CrmType },\n { id: 'relationType', label: messages.RelationType },\n { id: 'relationTypes', label: messages.RelationType },\n { id: 'legalForms', label: messages.LegalForms },\n { id: 'responsible', label: employeeProfileMessages.Responsible },\n { id: 'assistant', label: employeeProfileMessages.Assistant },\n { id: 'associate', label: employeeProfileMessages.Associate },\n { id: 'assistantBackup', label: employeeProfileMessages.AssistantBackup },\n { id: 'billingUser', label: employeeProfileMessages.BillingUser },\n { id: 'seniorUser', label: employeeProfileMessages.SeniorUser },\n { id: 'relationTags', label: messages.WithRelationLabels },\n { id: 'withoutRelationTags', label: messages.WithoutRelationLabels },\n { id: 'relationUserId', label: messages.RelationsAssignedTo },\n { id: 'endFiscalYears', label: messages.EndFiscalYear },\n { id: 'accountingSoftware', label: messages.AccountingSoftware },\n { id: 'otherSoftware', label: messages.OtherSoftware },\n { id: 'teams', label: messages.Teams },\n { id: 'vatPeriodicity', label: messages.VatPeriodicity },\n { id: 'financialStatementScheme', label: messages.FinancialStatementScheme },\n { id: 'socialSecurityFund', label: messages.SocialSecurityFund },\n { id: 'socialSecretariat', label: messages.SocialSecretariat },\n { id: 'createdBy', label: messages.CreatedBy },\n { id: 'withTags', label: messages.WithTaskLabels },\n { id: 'withoutTags', label: messages.WithoutTaskLabels },\n { id: 'relationGroups', label: messages.RelationGroups },\n { id: 'year', label: messages.ReferenceYear },\n\n {\n id: 'ownCompanies',\n label: messages.OwnCompany,\n enabled: () => hasMultipleCompanies(),\n },\n {\n id: 'assignmentTemplateId',\n label: messages.AssignmentTemplate,\n enabled: () => hasAssignments(),\n },\n];\nconst getEnabledFilters = dynamicFilters =>\n dynamicFilters.filter(f => {\n if (typeof f.enabled === 'undefined') return true;\n if (typeof f.enabled === 'function') return !!f.enabled();\n return !!f.enabled;\n });\n\nexport const getDynamicFiltersByKey = (keys = []) =>\n filterObjects.filter(x => keys.indexOf(x.id) >= 0);\n\nexport const getDynamicFiltersFromDefaultFilters = (defaultFilterObject = {}) => {\n const keys = Object.keys(defaultFilterObject);\n return getDynamicFiltersByKey(keys);\n};\n\nexport const initDynamicFilters = (\n intl,\n dynamicFilters = [], // Dynamic filters {id,label}\n visibleFilters = [], // Keys from storage\n filterObject = {}, // Filter object from state\n defaultFilterObject = {}, // The default filters\n) =>\n getEnabledFilters(dynamicFilters)\n .map(({ id, label }) => ({\n id,\n label: label && label.id ? intl.formatMessage(label) : label?.toString(),\n selected: visibleFilters.includes(id) || !isEqual(filterObject[id], defaultFilterObject[id]),\n }))\n .sort(dynamicSort('label'));\n\n// Use this when selecting a saved filter\nexport const resetDynamicFilters = (dynamicFilters, filterObject, defaultFilterObject) =>\n dynamicFilters.map(x => ({\n ...x,\n selected: x.selected || !isEqual(filterObject[x.id], defaultFilterObject[x.id]),\n }));\n\nexport const handleDynamicFiltersChanged = (\n dynamicFilters,\n item,\n selected,\n filterObject,\n defaultFilterObject,\n) =>\n dynamicFilters.map(x => {\n if (item.id === 'selectall') {\n if (!selected && !isEqual(filterObject[x.id], defaultFilterObject[x.id]))\n return { ...x, selected: true }; // Keep used filter on screen\n return { ...x, selected };\n }\n if (x.id === item.id) {\n return { ...x, selected };\n }\n return x;\n });\n\nconst DynamicTaskFilter = props => {\n const {\n type,\n filters,\n filterChanged,\n intl,\n labels = [],\n taskLabels = [],\n renderCustomFilter,\n columnClassName,\n } = props;\n switch (type) {\n case 'crmType':\n case 'crmTypes':\n return (\n
    \n
    \n {\n filterChanged({ [type]: value });\n }}\n />\n
    \n
    \n );\n case 'relationType':\n case 'relationTypes':\n return (\n
    \n
    \n {\n filterChanged({ [type]: value });\n }}\n placeholder={intl.formatMessage(messages.RelationType)}\n />\n
    \n
    \n );\n case 'legalForms':\n return (\n
    \n
    \n filterChanged({ legalForms: selection })}\n showWithoutOption\n />\n
    \n
    \n );\n case 'responsible':\n return (\n
    \n
    \n filterChanged({ responsible: userId })}\n value={filters.responsible}\n placeholder={intl.formatMessage(employeeProfileMessages.FilterResponsible)}\n />\n
    \n
    \n );\n case 'assistant':\n return (\n
    \n
    \n filterChanged({ assistant: userId })}\n value={filters.assistant}\n placeholder={intl.formatMessage(employeeProfileMessages.FilterAssistant)}\n />\n
    \n
    \n );\n case 'associate':\n return (\n
    \n
    \n filterChanged({ associate: userId })}\n value={filters.associate}\n placeholder={intl.formatMessage(employeeProfileMessages.FilterAssociate)}\n />\n
    \n
    \n );\n case 'assistantBackup':\n return (\n
    \n
    \n filterChanged({ assistantBackup: userId })}\n value={filters.assistantBackup}\n placeholder={intl.formatMessage(employeeProfileMessages.FilterAssistantBackup)}\n />\n
    \n
    \n );\n case 'billingUser':\n return (\n
    \n filterChanged({ billingUser: userId })}\n value={filters.billingUser}\n placeholder={intl.formatMessage(employeeProfileMessages.FilterBillingUser)}\n />\n
    \n );\n case 'seniorUser':\n return (\n
    \n filterChanged({ seniorUser: userId })}\n value={filters.seniorUser}\n placeholder={intl.formatMessage(employeeProfileMessages.FilterSeniorUser)}\n />\n
    \n );\n case 'relationUserId': {\n return (\n
    \n
    \n filterChanged({ relationUserId: userId })}\n value={filters.relationUserId}\n placeholder={intl.formatMessage(messages.RelationsAssignedTo)}\n />\n
    \n
    \n );\n }\n case 'relationTags': {\n const [selectedLabels, availableLabels] = splitMultiSelectItems(\n labels,\n filters[type],\n 'label',\n );\n return (\n
    \n
    \n \n filterChanged({\n [type]: removeMultiSelectItem(filters[type], item, 'label'),\n })\n }\n onItemSelected={item =>\n filterChanged({\n [type]: addMultiSelectItem(filters[type], item, 'label'),\n })\n }\n items={availableLabels}\n placeholder={intl.formatMessage(messages.WithRelationLabels)}\n withFilterBehaviour\n onFilterBehaviourChanged={filterBehaviour => {\n filterChanged({\n filterBehaviours: {\n [type]: filterBehaviour,\n },\n });\n }}\n filterBehaviour={filters.filterBehaviours?.[type]}\n />\n
    \n
    \n );\n }\n case 'withoutRelationTags': {\n const [selectedLabels, availableLabels] = splitMultiSelectItems(\n labels,\n filters[type],\n 'label',\n );\n\n return (\n
    \n
    \n \n filterChanged({\n [type]: removeMultiSelectItem(filters[type], item, 'label'),\n })\n }\n onItemSelected={item =>\n filterChanged({\n [type]: addMultiSelectItem(filters[type], item, 'label'),\n })\n }\n items={availableLabels}\n placeholder={intl.formatMessage(messages.WithoutRelationLabels)}\n />\n
    \n
    \n );\n }\n case 'ownCompanies': {\n return hasMultipleCompanies() ? (\n
    \n
    \n filterChanged({ ownCompanies: companies })}\n />\n
    \n
    \n ) : null;\n }\n case 'assignmentTemplateId': {\n return hasAssignments() ? (\n
    \n
    \n filterChanged({ assignmentTemplateId: id || null })}\n showDefaultAssignment\n />\n
    \n
    \n ) : null;\n }\n case 'endFiscalYears': {\n return (\n
    \n
    \n filterChanged({ endFiscalYears })}\n />\n
    \n
    \n );\n }\n case 'accountingSoftware': {\n return (\n
    \n
    \n {\n filterChanged({ [type]: value });\n }}\n customItems={[\n {\n id: -1,\n label: intl.formatMessage(messages.EmptyAccountingSoftware),\n },\n ]}\n placeholder={intl.formatMessage(messages.AccountingSoftware)}\n />\n
    \n
    \n );\n }\n case 'otherSoftware': {\n return (\n
    \n
    \n {\n filterChanged({ [type]: value });\n }}\n placeholder={intl.formatMessage(messages.OtherSoftware)}\n />\n
    \n
    \n );\n }\n case 'vatPeriodicity': {\n return (\n
    \n
    \n {\n filterChanged({ [type]: value });\n }}\n placeholder={intl.formatMessage(messages.VatPeriodicity)}\n />\n
    \n
    \n );\n }\n case 'financialStatementScheme': {\n return (\n
    \n
    \n {\n filterChanged({ [type]: value });\n }}\n placeholder={intl.formatMessage(messages.FinancialStatementScheme)}\n />\n
    \n
    \n );\n }\n case 'socialSecurityFund': {\n return (\n
    \n
    \n {\n filterChanged({ [type]: value });\n }}\n placeholder={intl.formatMessage(messages.SocialSecurityFund)}\n />\n
    \n
    \n );\n }\n case 'socialSecretariat': {\n return (\n
    \n
    \n {\n filterChanged({ [type]: value });\n }}\n placeholder={intl.formatMessage(messages.SocialSecretariat)}\n />\n
    \n
    \n );\n }\n case 'teams': {\n return (\n
    \n
    \n filterChanged({ teams })}\n idProp=\"code\"\n />\n
    \n
    \n );\n }\n case 'year': {\n return (\n
    \n
    \n filterChanged({ year: year || null })}\n className=\"form-control\"\n placeholder={intl.formatMessage(messages.ReferenceYear)}\n />\n
    \n
    \n );\n }\n case 'createdBy':\n return (\n
    \n
    \n filterChanged({ createdBy: user ? user.id : null })}\n value={filters.createdBy}\n placeholder={intl.formatMessage(messages.CreatedBy)}\n />\n
    \n
    \n );\n case 'withTags': {\n const [selectedLabels, availableLabels] = splitMultiSelectItems(\n taskLabels,\n filters[type],\n 'id',\n );\n\n return (\n
    \n
    \n \n filterChanged({\n [type]: removeMultiSelectItem(filters[type], item, 'id'),\n })\n }\n onItemSelected={item =>\n filterChanged({\n [type]: addMultiSelectItem(filters[type], item, 'id'),\n })\n }\n items={availableLabels}\n placeholder={intl.formatMessage(messages.WithTaskLabels)}\n withFilterBehaviour\n onFilterBehaviourChanged={filterBehaviour => {\n filterChanged({\n filterBehaviours: {\n [type]: filterBehaviour,\n },\n });\n }}\n filterBehaviour={filters.filterBehaviours?.[type]}\n />\n
    \n
    \n );\n }\n case 'withoutTags': {\n const [selectedLabels, availableLabels] = splitMultiSelectItems(\n taskLabels,\n filters[type],\n 'id',\n );\n\n return (\n
    \n
    \n \n filterChanged({\n [type]: removeMultiSelectItem(filters[type], item, 'id'),\n })\n }\n onItemSelected={item =>\n filterChanged({\n [type]: addMultiSelectItem(filters[type], item, 'id'),\n })\n }\n items={availableLabels}\n placeholder={intl.formatMessage(messages.WithoutTaskLabels)}\n />\n
    \n
    \n );\n }\n case 'relationGroups':\n return (\n
    \n
    \n {\n filterChanged({ [type]: value });\n }}\n />\n
    \n
    \n );\n default:\n return renderCustomFilter(props);\n }\n};\nDynamicTaskFilter.propTypes = {\n type: PropTypes.string.isRequired,\n filters: PropTypes.shape({}).isRequired,\n filterChanged: PropTypes.func.isRequired,\n intl: intlShape.isRequired,\n labels: PropTypes.arrayOf(PropTypes.shape({})),\n taskLabels: PropTypes.arrayOf(PropTypes.shape({})),\n renderCustomFilter: PropTypes.func,\n columnClassName: PropTypes.string,\n};\nDynamicTaskFilter.defaultProps = {\n labels: [],\n renderCustomFilter: props => null, // eslint-disable-line\n columnClassName: 'col-lg-4 col-sm-6',\n};\nexport default DynamicTaskFilter;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage, injectIntl, useIntl } from 'react-intl';\nimport classnames from 'classnames';\nimport moment from 'moment';\nimport momentPropTypes from 'react-moment-proptypes';\nimport isEqual from 'lodash-es/isEqual';\n\nimport intlShape from '@/shared/utils/intlShape';\nimport api from '@/shared/api';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport Toggle from 'react-toggle';\n\nimport RelationSearch from '@/shared/components/input/RelationSearch';\nimport UserSearch from '@/shared/components/input/UserSearch';\nimport MultiSelect from '@/shared/components/input/multiselect/MultiSelect';\nimport AuthService from '@/shared/services/AuthService';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport guid from '@/shared/utils/guid';\nimport SavedFiltersButton from '@/shared/components/SavedFiltersButton';\nimport userStorage from '@/shared/services/userStorage';\nimport DelayedDateRangePicker from '@/shared/components/input/DelayedDateRangePicker';\nimport TaskIcon from '../TaskIcon';\nimport messages from '../taskMessages';\nimport config from '../../../config';\nimport DynamicTaskFilter, {\n initDynamicFilters,\n getDynamicFiltersFromDefaultFilters,\n resetDynamicFilters,\n handleDynamicFiltersChanged,\n} from '../DynamicTaskFilter';\nimport { CanRead } from '@/shared/components/security';\n\nexport const defaultFilters = {\n deadlineFrom: moment.utc().startOf('month'),\n deadlineUntil: moment.utc().endOf('month'),\n period: 'month',\n relationId: null,\n relationName: null,\n userId: null,\n username: null,\n relationUserId: null,\n relationUsername: null,\n taskTemplateId: null,\n taskId: null, //= Subtask id\n periodicityId: null,\n mainStatus: [],\n relationTypes: [],\n relationTags: [],\n withoutRelationTags: [],\n taskLevels: [],\n ownCompanies: [],\n assistant: null, // UserId\n responsible: null, // UserId\n associate: null, // UserId\n assistantBackup: null, // UserId\n billingUser: null, // UserId\n seniorUser: null, // UserId\n assignmentTemplateId: null,\n endFiscalYears: [],\n accountingSoftware: [],\n otherSoftware: [],\n teams: [],\n year: null,\n plannedTaskId: null,\n vatPeriodicity: [],\n createdBy: null, // UserId\n legalForms: [], // Array\n financialStatementScheme: [],\n socialSecurityFund: [],\n socialSecretariat: [],\n withTags: [],\n withoutTags: [],\n relationGroups: [],\n filterBehaviours: {\n withTags: 1,\n relationTags: 1,\n },\n};\n\nconst getPeriodStartEndDates = period => {\n switch (period) {\n case 'all':\n case '':\n case null:\n case undefined:\n break;\n case 'month':\n case 'quarter':\n case 'year':\n return [moment.utc().startOf(period), moment.utc().endOf(period)];\n default:\n console.debug(`Unknown period: ${period}`);\n }\n return [null, null];\n};\nconst getIgnoredFilters = filters => {\n if (filters.period) {\n // Ignore deadline filters if there is a period\n return ['deadlineUntil', 'deadlineFrom'];\n }\n return [];\n};\nconst allDynamicFilters = [...getDynamicFiltersFromDefaultFilters(defaultFilters)];\n\nconst dynamicFiltersStorageKey = 'TaskListDynamicFilters';\n\nclass TaskListFilters extends Component {\n state = {\n taskStatuses: [],\n templates: [],\n subTasks: [],\n periodicities: [],\n dynamicFilters: [],\n taskLabels: [],\n };\n\n static propTypes = {\n onFilterChange: PropTypes.func.isRequired,\n filters: PropTypes.shape({\n deadlineUntil: momentPropTypes.momentObj,\n deadlineFrom: momentPropTypes.momentObj,\n period: PropTypes.oneOf(['all', 'month', 'quarter', 'year']),\n relationId: PropTypes.string,\n relationName: PropTypes.string,\n userId: PropTypes.string,\n username: PropTypes.string,\n relationUserId: PropTypes.string,\n relationUsername: PropTypes.string,\n taskTemplateId: PropTypes.string,\n taskId: PropTypes.string, //= Subtask id\n periodicityId: PropTypes.string,\n mainStatus: PropTypes.arrayOf(PropTypes.number),\n relationTypes: PropTypes.arrayOf(PropTypes.number),\n relationTags: PropTypes.arrayOf(PropTypes.string),\n withoutRelationTags: PropTypes.arrayOf(PropTypes.string),\n taskLevels: PropTypes.arrayOf(PropTypes.number),\n ownCompanies: PropTypes.arrayOf(PropTypes.string),\n responsible: PropTypes.string,\n assistant: PropTypes.string,\n associate: PropTypes.string,\n assistantBackup: PropTypes.string,\n billingUser: PropTypes.string,\n seniorUser: PropTypes.string,\n assignmentTemplateId: PropTypes.string,\n accountingSoftware: PropTypes.arrayOf(PropTypes.number),\n otherSoftware: PropTypes.arrayOf(PropTypes.number),\n createdBy: PropTypes.string,\n legalForms: PropTypes.arrayOf(PropTypes.number),\n withTags: PropTypes.arrayOf(PropTypes.string),\n withoutTags: PropTypes.arrayOf(PropTypes.string),\n relationGroups: PropTypes.arrayOf(PropTypes.string),\n userIsNextAssignedUser: PropTypes.bool,\n }),\n intl: intlShape.isRequired,\n };\n\n static defaultProps = {\n filters: defaultFilters,\n };\n\n componentDidMount() {\n const { filters, intl } = this.props;\n\n const taskStatuses = [\n {\n id: 0,\n label: intl.formatMessage(listItemMsg('extendedtaskstatus', 0, 'To do')),\n },\n {\n id: 1,\n label: intl.formatMessage(listItemMsg('extendedtaskstatus', 1, 'In progress')),\n },\n {\n id: 2,\n label: intl.formatMessage(listItemMsg('extendedtaskstatus', 2, 'Done')),\n },\n {\n id: 3,\n label: intl.formatMessage(listItemMsg('extendedtaskstatus', 3, 'Blocked')),\n },\n {\n id: 4,\n label: intl.formatMessage(listItemMsg('extendedtaskstatus', 4, 'Inapplicable')),\n },\n {\n id: 6,\n label: intl.formatMessage(listItemMsg('extendedtaskstatus', 6, 'Rejected')),\n },\n {\n id: 5,\n label: intl.formatMessage(listItemMsg('extendedtaskstatus', 5, 'Not done')),\n },\n ];\n this.setState({\n taskStatuses,\n dynamicFilters: initDynamicFilters(\n intl,\n allDynamicFilters,\n userStorage.getItem(dynamicFiltersStorageKey) || [],\n filters,\n defaultFilters,\n ),\n });\n\n if (filters && filters.period) {\n this.setPeriod(filters.period);\n }\n api.base.get(`${config.appUrls.api}/api/Resource/Tags`).then(({ data }) => {\n this.setState({\n relationLabels: data\n .map(x => ({ id: x.id, label: x.name, sort: x.name.toLowerCase() }))\n .sort(dynamicSort('sort')),\n });\n });\n api.base.get(`${config.appUrls.tasks}/api/Tags`).then(({ data }) => {\n this.setState({\n taskLabels: data\n .map(x => ({ id: x.id, label: x.name, sort: x.name.toLowerCase() }))\n .sort(dynamicSort('sort')),\n });\n });\n this.retrieveTemplates();\n if (filters.taskTemplateId) {\n this.retrieveSubTasks(filters.taskTemplateId);\n this.retrievePeriodicities(filters.taskTemplateId);\n }\n }\n\n retrieveTemplates() {\n const { intl } = this.props;\n api.base.get(`${config.appUrls.tasks}/api/TaskTemplates`).then(({ data }) => {\n const translatedTemplates = data\n .map(t => ({\n ...t,\n label: intl.formatMessage(listItemMsg('taskTemplate', t.id, t.name)), // Map translation to label property\n }))\n .sort(dynamicSort('label'));\n\n this.setState({\n templates: translatedTemplates,\n });\n });\n }\n retrieveSubTasks(taskTemplateId) {\n const { intl } = this.props;\n if (!taskTemplateId || taskTemplateId === guid.empty) {\n this.setState({ subTasks: [] });\n return;\n }\n\n api.base.get(`${config.appUrls.tasks}/api/TaskTemplates/Children/${taskTemplateId}`).then(\n ({ data }) => {\n const translatedSubtasks = data\n .map(t => ({\n ...t,\n label: intl.formatMessage(listItemMsg('taskTemplate', t.id, t.name)), // Map translation to label property\n }))\n .sort(dynamicSort('label'));\n\n this.setState({\n subTasks: translatedSubtasks,\n });\n },\n () => {\n this.setState({\n subTasks: [],\n });\n },\n );\n }\n retrievePeriodicities = templateId => {\n if (!templateId || templateId === guid.empty) {\n this.setState({ periodicities: [] });\n return;\n }\n const { intl } = this.props;\n return api.base\n .get(`${config.appUrls.tasks}/api/TaskPeriodicity/${templateId}`)\n .then(({ data }) => {\n const translatedPeriodicities = data\n .map(t => ({\n ...t,\n label: intl.formatMessage(listItemMsg('taskperiodicity', t.id, t.name)), // Map translation to label property\n }))\n .sort(dynamicSort('label'));\n\n this.setState(state => ({\n ...state,\n periodicities: translatedPeriodicities,\n }));\n });\n };\n\n dynamicFilterChanged = (item, selected) => {\n this.setState(({ dynamicFilters }) => {\n const { filters } = this.props;\n const newFilters = handleDynamicFiltersChanged(\n dynamicFilters,\n item,\n selected,\n filters,\n defaultFilters,\n );\n userStorage.setItem(\n dynamicFiltersStorageKey,\n newFilters.filter(x => x.selected).map(x => x.id),\n );\n if (\n !selected &&\n item.id !== 'selectAll' &&\n !isEqual(filters[item.id], defaultFilters[item.id])\n ) {\n // Reset filter when it's removed\n this.filterChanged({ [item.id]: defaultFilters[item.id] });\n }\n return { dynamicFilters: newFilters };\n });\n };\n filterChanged = filter => {\n const { filters, onFilterChange } = this.props;\n const newFilters = { ...filters, ...filter };\n\n onFilterChange(newFilters);\n };\n\n savedFilterChanged = filters => {\n const { onFilterChange } = this.props;\n const newFilters = { ...defaultFilters, ...filters };\n if (typeof newFilters.deadlineFrom === 'string')\n newFilters.deadlineFrom = moment.utc(filters.deadlineFrom);\n if (typeof newFilters.deadlineUntil === 'string')\n newFilters.deadlineUntil = moment.utc(filters.deadlineUntil);\n\n if (newFilters.period) {\n const [deadlineFrom, deadlineUntil] = getPeriodStartEndDates(newFilters.period);\n newFilters.deadlineFrom = deadlineFrom;\n newFilters.deadlineUntil = deadlineUntil;\n }\n\n onFilterChange(newFilters);\n\n this.setState(({ dynamicFilters }) => ({\n dynamicFilters: resetDynamicFilters(dynamicFilters, newFilters, defaultFilters),\n }));\n const { taskTemplateId } = newFilters;\n this.retrieveSubTasks(taskTemplateId);\n this.retrievePeriodicities(taskTemplateId);\n };\n\n deadlineChanged = (startDate, endDate) => {\n this.filterChanged({ deadlineFrom: startDate, deadlineUntil: endDate, period: null });\n };\n\n taskTemplateChanged = taskTemplateId => {\n const { filters: { periodicityId } = {} } = this.props;\n this.filterChanged({\n taskTemplateId,\n taskId: null,\n periodicityId: periodicityId === guid.empty ? periodicityId : null,\n });\n this.retrieveSubTasks(taskTemplateId);\n this.retrievePeriodicities(taskTemplateId);\n };\n relationChanged = item => {\n if (!item || !item.invoiceStreamId) {\n this.filterChanged({ invoiceStreamId: null, relationId: null, relationName: null });\n } else {\n this.filterChanged({\n invoiceStreamId: null,\n relationId: item.key,\n relationName: item.label,\n });\n }\n };\n\n userChanged = item => {\n if (!item || !item.id) {\n this.filterChanged({ userId: null, username: null });\n } else {\n this.filterChanged({\n userId: item.id,\n username: item.name,\n });\n }\n };\n\n relationTypeChanged = value => {\n this.filterChanged({ relationType: value });\n };\n\n setPeriod = period => {\n const [deadlineFrom, deadlineUntil] = getPeriodStartEndDates(period);\n this.filterChanged({ deadlineFrom, deadlineUntil, period });\n };\n\n onStatusFilterRemoved = item => {\n const { filters } = this.props;\n const { mainStatus } = filters;\n const index = mainStatus.findIndex(x => x === item.value.id);\n\n const copy = [...mainStatus];\n copy.splice(index, 1);\n\n this.filterChanged({ mainStatus: copy });\n };\n\n onStatusFilterAdded = selectedItem => {\n if (!selectedItem) return;\n\n const { filters } = this.props;\n const { mainStatus } = filters;\n\n if (mainStatus.includes(selectedItem.id)) return;\n this.filterChanged({\n mainStatus: [...mainStatus, selectedItem.id],\n });\n };\n\n filterTaskLevelChanged = taskLevel => {\n const { filters } = this.props;\n const { taskLevels } = filters;\n\n let newTaskLevels = [];\n\n if (taskLevels.includes(taskLevel)) {\n newTaskLevels = taskLevels.filter(x => x !== taskLevel);\n } else {\n newTaskLevels = [...taskLevels, taskLevel];\n }\n\n this.filterChanged({\n taskLevels: newTaskLevels,\n });\n };\n\n render() {\n const {\n taskStatuses,\n relationLabels,\n taskLabels,\n templates,\n subTasks,\n periodicities,\n dynamicFilters,\n } = this.state;\n const { filters, intl, countSelectedTasks } = this.props;\n const defaultBtnClass = 'btn btn-default';\n\n let initRelation = null;\n let initialUser = null;\n\n if (filters.relationId && filters.relationName) {\n initRelation = {\n key: filters.relationId,\n label: filters.relationName,\n invoiceStreamId: filters.invoiceStreamId,\n };\n }\n if (filters.userId && filters.username) {\n initialUser = {\n id: filters.userId,\n name: filters.username,\n };\n }\n // transform filter (array of task status integers to list of object with label and id)\n const selectedStatuses = taskStatuses\n ? taskStatuses.filter(r => filters.mainStatus.includes(r.id))\n : [];\n\n const visibleFilters = dynamicFilters.filter(x => x.selected).map(x => x.id);\n\n return (\n
    \n
    \n
    \n
    \n \n
    \n
    \n\n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n \n {\n document.activeElement.blur();\n this.filterTaskLevelChanged(2);\n }}\n type=\"button\"\n title={intl.formatMessage(messages.FilterOnToDos)}\n className={classnames(defaultBtnClass, {\n active: filters.taskLevels.includes(2),\n })}\n >\n \n \n \n \n\n \n {\n document.activeElement.blur();\n this.filterTaskLevelChanged(0);\n }}\n type=\"button\"\n title={intl.formatMessage(messages.FilterOnMainTasks)}\n className={classnames(defaultBtnClass, {\n active: filters.taskLevels.includes(0),\n })}\n >\n \n \n \n\n {\n document.activeElement.blur();\n this.filterTaskLevelChanged(1);\n }}\n type=\"button\"\n className={classnames(defaultBtnClass, {\n active: filters.taskLevels.includes(1),\n })}\n >\n \n \n \n \n
    \n
    \n
    \n\n
    \n
    \n
    \n this.setPeriod('month')}\n type=\"button\"\n className={classnames(defaultBtnClass, { active: filters.period === 'month' })}\n >\n \n \n this.setPeriod('quarter')}\n type=\"button\"\n className={classnames(defaultBtnClass, { active: filters.period === 'quarter' })}\n >\n \n \n this.setPeriod('year')}\n type=\"button\"\n className={classnames(defaultBtnClass, { active: filters.period === 'year' })}\n >\n \n \n this.setPeriod('all')}\n type=\"button\"\n className={classnames(defaultBtnClass, {\n active: !filters.deadlineFrom && !filters.deadlineUntil,\n })}\n >\n \n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n {templates && (\n this.taskTemplateChanged(e.target.value || null)}\n className=\"form-control\"\n value={filters.taskTemplateId || ''}\n >\n \n \n \n  \n \n {templates.map(template => (\n \n ))}\n \n )}\n
    \n
    \n
    \n
    \n \n \n this.filterChanged({\n userIsNextAssignedUser: !filters.userIsNextAssignedUser,\n // when enabling this filter and no userId is filtered, set the userId to the current user\n userId:\n !filters.userIsNextAssignedUser === true && !filters.userId\n ? AuthService.getUserId()\n : filters.userId,\n username:\n !filters.userIsNextAssignedUser === true && !filters.userId\n ? AuthService.getName()\n : filters.userId,\n })\n }\n />\n \n \n
    \n
    \n
    \n
    \n this.filterChanged({ periodicityId: e.target.value || null })}\n className=\"form-control\"\n value={filters.periodicityId || ''}\n >\n \n \n {periodicities && !!periodicities.length && (\n \n  \n \n )}\n {periodicities.map(periodicity => (\n \n ))}\n \n
    \n
    \n
    \n
    \n this.deadlineChanged(startDate, endDate)}\n startDatePlaceholderText={intl.formatMessage(messages.DeadlineFrom)}\n endDatePlaceholderText={intl.formatMessage(messages.DeadlineUntil)}\n block\n />\n
    \n
    \n
    \n
    \n
    \n
    \n {subTasks && (\n this.filterChanged({ taskId: e.target.value || null })}\n className=\"form-control\"\n disabled={!subTasks.length}\n value={filters.taskId || ''}\n >\n \n {subTasks.map(sub => (\n \n ))}\n \n )}\n
    \n
    \n
    \n
    \n \n
    \n
    \n {visibleFilters && visibleFilters.length > 0\n ? visibleFilters.map(id => (\n \n ))\n : null}\n
    \n\n
    \n
    \n \n
    \n
    \n {countSelectedTasks}\n
    \n
    \n
    \n );\n }\n}\n\nexport default injectIntl(TaskListFilters);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport OutsideClickHandler from 'react-outside-click-handler';\nimport { defineMessages, injectIntl, useIntl } from 'react-intl';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport UserSearch, { getUserIdFromValue, userShape } from '@/shared/components/input/UserSearch';\nimport intlShape from '@/shared/utils/intlShape';\nimport EditableToggle from './EditableToggle';\n\nconst messages = defineMessages({ Unassigned: 'Unassigned' });\n\nconst EditableUserSearch = ({\n onChange,\n value,\n disabled,\n submitOnChange,\n intl,\n className,\n withUnassigned,\n unassignedId,\n includeInactiveUsers,\n ...rest\n}) => {\n const userId = getUserIdFromValue(value);\n\n return (\n \n {({ inputValue, setInputValue, submit, handleKeyDown }) => (\n \n {\n if (submitOnChange && !!e) {\n setInputValue(e).then(submit);\n } else {\n setInputValue(e);\n }\n }}\n onKeyDown={handleKeyDown}\n withUnassigned={withUnassigned}\n unassignedId={unassignedId}\n includeInactiveUsers={includeInactiveUsers}\n />\n \n )}\n \n );\n};\nEditableUserSearch.propTypes = {\n onChange: PropTypes.func.isRequired,\n value: PropTypes.oneOfType([\n userShape,\n PropTypes.shape({ id: PropTypes.string.isRequired }),\n PropTypes.string,\n ]),\n disabled: PropTypes.bool,\n submitOnChange: PropTypes.bool,\n withUnassigned: PropTypes.bool,\n unassignedId: PropTypes.string,\n intl: intlShape.isRequired,\n className: PropTypes.string,\n includeInactiveUsers: PropTypes.bool,\n};\n\nEditableUserSearch.defaultProps = {\n value: null,\n disabled: false,\n submitOnChange: false,\n withUnassigned: false,\n className: '',\n unassignedId: '',\n includeInactiveUsers: false,\n};\n\nexport default injectIntl(EditableUserSearch);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Dropdown from 'react-bootstrap/lib/Dropdown';\nimport MenuItem from 'react-bootstrap/lib/MenuItem';\nimport { injectIntl } from 'react-intl';\nimport { FaTrashAlt, FaShareAlt, FaRegWindowRestore, FaRegEnvelope } from 'react-icons/fa';\nimport intlShape from '@/shared/utils/intlShape';\nimport Button from '../../../shared/components/Button';\nimport messages from '../taskMessages';\nimport CanDelete from '@/shared/components/security/CanDelete';\n\nconst TaskListActionsButton = ({ task, intl, onOpenTask, onShareItem, onSendEmail, onDeleteTask }) => {\n return (\n \n \n\n \n \n\n onSendEmail(task)}>\n \n {intl.formatMessage(messages.SendEmail)}\n \n\n onShareItem(task)}>\n \n {intl.formatMessage(messages.Share)}\n \n\n \n onDeleteTask(task)}>\n \n {intl.formatMessage(messages.Delete)}\n \n \n \n \n );\n};\n\nTaskListActionsButton.propTypes = {\n task: PropTypes.shape({\n id: PropTypes.string.isRequired,\n }).isRequired,\n intl: intlShape.isRequired,\n onOpenTask: PropTypes.func.isRequired,\n onSendEmail: PropTypes.func.isRequired,\n onShareItem: PropTypes.func.isRequired,\n onDeleteTask: PropTypes.func.isRequired,\n};\n\nexport default injectIntl(TaskListActionsButton);\n","import React, { useState, useEffect, useMemo } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage, injectIntl, useIntl } from 'react-intl';\nimport classNames from 'classnames';\nimport {\n FaTrashAlt,\n FaShareAlt,\n FaRegClock,\n FaExternalLinkAlt,\n FaRegWindowRestore,\n} from 'react-icons/fa';\nimport intlShape from '@/shared/utils/intlShape';\nimport CanDelete from '@/shared/components/security/CanDelete';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport moment from 'moment';\n\nimport Checkbox from '@/shared/components/input/Checkbox';\n\nimport RelationName from '@/shared/components/RelationName';\nimport FormattedListValue from '@/shared/components/FormattedListValue';\n\nimport { injectStateService, StateService } from '@/shared/services/StateService';\nimport momentDurationFormatSetup from 'moment-duration-format';\nimport { hasAssignments } from '@/shared/components/security/HasAssignments';\nimport { mapInvoiceStreamName } from '@/shared/services/ObjectDisplayService';\nimport EditableDatePicker from '@/shared/components/editable/EditableDatePicker';\nimport EditableUserSearch from '@/shared/components/editable/EditableUserSearch';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport TaskListActionsButton from './TaskListActionsButton';\nimport messages from '../taskMessages';\nimport TaskIcon from '../TaskIcon';\nimport TaskStatusToggle from '../TaskStatusToggle';\nimport FormattedDateShort from '../../../shared/components/FormattedDateShort';\n\nmomentDurationFormatSetup(moment);\n\nconst getLinkIconTooltipMessage = (showLinkButton, taskLevel) => {\n if (showLinkButton) return messages.OpenInTaskboard;\n if (taskLevel === 2) return messages.AToDoCannotBeOpenedInTaskBoard;\n return messages.ThisTaskCannotBeOpenedInTaskBoard;\n};\n\nconst TaskListRow = ({\n task,\n stateService,\n intl,\n handleTaskSelection,\n onAddRegistrationClick,\n onShowTaskDetails,\n onRequestDeleteTask,\n onTasksUpdated,\n onShareItem,\n onSendEmail,\n onUpdateUser,\n onUpdateDeadline,\n columnStatus,\n}) => {\n const { relation } = task;\n\n const modifiedBy = useMemo(() => DataCacheService.getUserName(task.modifiedBy), [\n task.modifiedBy,\n ]);\n const createdBy = useMemo(() => DataCacheService.getUserName(task.createdBy), [task.createdBy]);\n\n const formattedDuration = moment.duration(task.duration, 'minutes').format('hh:mm', {\n trim: false,\n });\n\n // Only navigatable to taskboard on these conditions\n const showLinkButton =\n task.taskLevel !== 2 &&\n (task.status !== 2 || task.deadline === null || moment.utc(task.deadline) > moment.utc());\n\n const changeStatusTitle = [\n messages.ChangeMainTaskStatus,\n messages.ChangeSubtaskStatus,\n messages.ChangeTodoStatus,\n ][task.taskLevel];\n\n const showAssignments = hasAssignments();\n\n return (\n \n \n \n handleTaskSelection(task)} value={task.selected} />\n \n onShowTaskDetails(task)} className=\"text-clickable\">\n \n\n {task.name && task.name}\n {!task.name && (\n \n )}\n \n {columnStatus.assignedTo && (\n \n onUpdateUser({ ...task, userId: user?.id })}\n value={task?.userId}\n submitOnChange\n withUnassigned\n />\n \n )}\n {columnStatus.relation && (\n \n \n \n )}\n {showAssignments && columnStatus.assignment && (\n {mapInvoiceStreamName(task, intl, '')}\n )}\n {columnStatus.status && (\n \n onShowTaskDetails(task)}\n onAddRegistration={() => onAddRegistrationClick(task)}\n />\n \n )}\n {columnStatus.referenceYear && (\n {task.year === 0 ? null : task.year}\n )}\n {columnStatus.deadline && (\n \n onUpdateDeadline({ ...task, deadline })}\n />\n \n )}\n {columnStatus.createdAt && (\n \n {task.createdAt && }\n \n )}\n {columnStatus.createdBy && {createdBy}}\n\n {columnStatus.modifiedAt && (\n \n {task.modifiedAt && }\n \n )}\n {columnStatus.modifiedBy && {modifiedBy}}\n {columnStatus.completedDate && (\n \n {task.completedDate && (\n \n )}\n \n )}\n {columnStatus.duration && {formattedDuration}}\n \n {task.type !== 2 && (\n {\n onAddRegistrationClick(task);\n }}\n >\n \n \n )}\n {\n if (!showLinkButton) return;\n stateService.gotoTaskboard({\n relation,\n plannedTaskId: task.id,\n });\n }}\n title={intl.formatMessage(getLinkIconTooltipMessage(showLinkButton, task.taskLevel))}\n >\n \n \n \n \n \n \n \n \n );\n};\n\nTaskListRow.propTypes = {\n task: PropTypes.shape({\n relation: PropTypes.object,\n id: PropTypes.string,\n }).isRequired,\n stateService: PropTypes.instanceOf(StateService).isRequired,\n intl: intlShape.isRequired,\n handleTaskSelection: PropTypes.func.isRequired,\n onRequestDeleteTask: PropTypes.func.isRequired,\n onSendEmail: PropTypes.func.isRequired,\n onShareItem: PropTypes.func.isRequired,\n onTasksUpdated: PropTypes.func.isRequired,\n columnStatus: PropTypes.shape({}).isRequired,\n};\n\nexport default injectIntl(injectStateService(TaskListRow));\n","import React, { useMemo } from 'react';\nimport PropTypes from 'prop-types';\nimport DropdownButton from 'react-bootstrap/lib/DropdownButton';\nimport MenuItem from 'react-bootstrap/lib/MenuItem';\nimport { injectIntl } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport CanDelete from '@/shared/components/security/CanDelete';\nimport CanUpdate from '@/shared/components/security/CanUpdate';\nimport messages from '../taskMessages';\nimport AuthService, { functionalities, privileges } from '@/shared/services/AuthService';\n\nconst TaskListGlobalActionsButton = props => {\n const {\n intl,\n disabled,\n onChangedAssignedUser,\n onDeleteTask,\n onChangeDeadline,\n onAddTaskTags,\n onRemoveTaskTags,\n onSendEmail,\n hasTodos,\n hasTasks,\n } = props;\n\n const { canUpdateTasks, canUpdateTodo, canDeleteTasks, canDeleteTodo } = useMemo(\n () => ({\n canUpdateTasks:\n hasTasks &&\n AuthService.hasPermission({\n functionality: functionalities.PlannedTask,\n privilege: privileges.Update,\n }),\n canUpdateTodo:\n hasTodos &&\n AuthService.hasPermission({\n functionality: functionalities.Todo,\n privilege: privileges.Update,\n }),\n canDeleteTasks:\n hasTasks &&\n AuthService.hasPermission({\n functionality: functionalities.PlannedTask,\n privilege: privileges.Delete,\n }),\n canDeleteTodo:\n hasTodos &&\n AuthService.hasPermission({\n functionality: functionalities.Todo,\n privilege: privileges.Delete,\n }),\n }),\n [hasTasks, hasTodos],\n );\n\n if (!canUpdateTasks && !canUpdateTodo && !canDeleteTasks && !canDeleteTodo) return null;\n\n return (\n \n \n {canUpdateTasks || canUpdateTodo ? (\n <>\n \n {intl.formatMessage(messages.ChangeAssignedUser)}\n \n \n {intl.formatMessage(messages.ChangeDeadline)}\n \n \n {intl.formatMessage(messages.SendEmail)}\n \n \n {intl.formatMessage(messages.AddTaskTags)}\n \n \n {intl.formatMessage(messages.RemoveTaskTags)}\n \n \n ) : null}\n {canDeleteTasks || canDeleteTodo ? (\n \n {intl.formatMessage(messages.DeleteTask)}\n \n ) : null}\n \n
    \n );\n};\n\nTaskListGlobalActionsButton.propTypes = {\n intl: intlShape.isRequired,\n disabled: PropTypes.bool,\n onChangedAssignedUser: PropTypes.func.isRequired,\n onChangeDeadline: PropTypes.func.isRequired,\n onDeleteTask: PropTypes.func.isRequired,\n onAddTaskTags: PropTypes.func.isRequired,\n onRemoveTaskTags: PropTypes.func.isRequired,\n onSendEmail: PropTypes.func.isRequired,\n};\nTaskListGlobalActionsButton.defaultProps = {\n disabled: false,\n};\nexport default injectIntl(TaskListGlobalActionsButton);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport intlShape from '@/shared/utils/intlShape';\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport AssignedToSelector from '@/shared/components/input/AssignedToSelector';\nimport messages from '../taskMessages';\n\nexport default class ChangeAssignedUserModal extends Component {\n state = {\n selectedAssignedTo: {\n assignedType: 0,\n assignedUserId: null,\n assignedProfile: null,\n },\n };\n\n componentDidMount() {\n this.form = React.createRef();\n }\n\n static propTypes = {\n onSave: PropTypes.func.isRequired,\n intl: intlShape.isRequired,\n onClose: PropTypes.func.isRequired,\n show: PropTypes.bool,\n };\n\n static defaultProps = {\n show: false,\n };\n\n assignedToChanged = assignedTo => {\n this.setState(state => ({\n ...state,\n selectedAssignedTo: assignedTo,\n }));\n };\n\n onSave = () => {\n const { selectedAssignedTo } = this.state;\n const { onSave } = this.props;\n return onSave(selectedAssignedTo);\n };\n\n closeModal = () => {\n const { onClose } = this.props;\n onClose();\n };\n\n render() {\n const { show, intl } = this.props;\n\n return (\n \n {show && (\n
    \n
    \n
    \n \n
    \n \n
    \n
    \n
    \n
    \n )}\n \n );\n }\n}\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { FormattedMessage } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport DatePicker from '@/shared/components/input/DatePicker';\nimport moment from 'moment';\nimport { falseFunc, isBeforeMinimum } from '@/shared/utils/validationHelpers';\nimport messages from './taskMessages';\n\nexport default class ChangeTaskDeadlineModal extends Component {\n state = {\n deadline: moment.utc(),\n };\n\n componentDidMount() {\n this.form = React.createRef();\n }\n\n componentDidUpdate(prevProps) {\n const { show } = this.props;\n\n if (prevProps.show !== show) {\n // eslint-disable-next-line react/no-did-update-set-state\n this.setState(() => ({\n deadline: moment.utc(),\n }));\n }\n }\n\n static propTypes = {\n onSave: PropTypes.func.isRequired,\n intl: intlShape.isRequired,\n onClose: PropTypes.func.isRequired,\n show: PropTypes.bool,\n };\n\n static defaultProps = {\n show: false,\n };\n\n closeModal = () => {\n const { onClose } = this.props;\n onClose();\n };\n\n validate() {\n const { deadline } = this.state;\n if (isBeforeMinimum(deadline)) return false;\n\n if (!this.form || !this.form.current) return true;\n return this.form.current.reportValidity();\n }\n\n deadlineChanged = input => {\n this.setState({\n deadline: input,\n });\n };\n\n onSave = () => {\n const { deadline } = this.state;\n const { onSave } = this.props;\n if (!this.validate()) return Promise.reject(new Error('invalid form'));\n\n const parameters = {\n deadline,\n field: 0,\n };\n\n return onSave(parameters);\n };\n\n render() {\n const { show, intl } = this.props;\n const { deadline, dateFocused } = this.state;\n\n return (\n \n {show && (\n
    \n
    \n \n \n
    \n this.setState({ dateFocused: focused })}\n id=\"taskDeadline\"\n block\n small\n isOutsideRange={falseFunc}\n />\n
    \n
    \n \n
    \n )}\n \n );\n }\n}\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { FormattedMessage } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport api from '@/shared/api';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport MultiSelect from '@/shared/components/input/multiselect/MultiSelect';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport ItemsFilter from '@/shared/components/table/filters/ItemsFilter';\nimport config from '../../config';\nimport messages from './taskMessages';\n\nexport default class ChangeTaskTagsModal extends Component {\n state = {\n tags: [],\n selectedTags: [],\n selectedSubtask: null,\n };\n\n componentDidMount() {\n const { intl } = this.props;\n api.base.get(`${config.appUrls.tasks}/api/Tags`).then(({ data }) => {\n this.setState({\n tags: data.map(x => ({ ...x, label: x.name })),\n });\n }, handleHttpError(intl));\n }\n\n static propTypes = {\n onSave: PropTypes.func.isRequired,\n intl: intlShape.isRequired,\n onClose: PropTypes.func.isRequired,\n show: PropTypes.bool,\n subtasks: PropTypes.arrayOf(PropTypes.shape({})),\n addTags: PropTypes.bool,\n };\n\n static defaultProps = {\n show: false,\n subtasks: null,\n addTags: true,\n };\n\n closeModal = () => {\n const { onClose } = this.props;\n onClose();\n };\n\n validate = () => {\n const { selectedTags } = this.state;\n if (!selectedTags || selectedTags.length === 0) return false;\n return true;\n };\n\n onSave = () => {\n const { selectedSubtask, selectedTags } = this.state;\n const { onSave, subtasks, addTags } = this.props;\n if (!this.validate()) return Promise.reject(new Error('invalid form'));\n\n const parameters = {\n tags: selectedTags,\n action: addTags ? 'add' : 'remove',\n };\n if (subtasks && subtasks.length > 0) {\n parameters.subtaskTemplateId = selectedSubtask;\n }\n\n return onSave(parameters);\n };\n\n onAddTag = tagName => {\n const trimmedName = tagName?.trim();\n if (!trimmedName) return;\n\n this.setState(({ tags, selectedTags }) => {\n if (selectedTags.some(x => x.name.toLowerCase() === trimmedName.toLowerCase())) return {}; // Already contains tag, nothing changed\n\n let tag = tags.find(x => x.name.toLowerCase() === trimmedName.toLowerCase());\n if (tag) {\n return { selectedTags: [...selectedTags, tag] };\n }\n tag = {\n name: trimmedName,\n label: trimmedName,\n };\n return { selectedTags: [...selectedTags, tag], tags: [...tags, tag] };\n });\n };\n subtaskChanged = e => {\n this.setState({ selectedSubtask: e.target.value || null });\n };\n\n onRemoveTag = ({ value: tag }) => {\n const trimmedName = tag?.name?.trim();\n if (!trimmedName) return;\n this.setState(({ selectedTags }) => ({\n selectedTags: selectedTags.filter(x => x.name.toLowerCase() !== trimmedName.toLowerCase()),\n }));\n };\n\n render() {\n const { show, intl, subtasks, addTags } = this.props;\n const { tags, selectedTags, selectedSubtask } = this.state;\n\n return (\n \n {show && (\n
    \n
    \n {subtasks && subtasks.length > 0 ? (\n
    \n \n
    \n \n {!selectedSubtask && (\n \n )}\n {subtasks.map(subtask => (\n \n ))}\n \n
    \n
    \n ) : null}\n
    \n \n
    \n
    \n {tags && (\n this.onAddTag(t?.name)}\n items={tags}\n selectedItem={selectedTags}\n onCreateItem={addTags ? this.onAddTag : undefined}\n onItemRemoved={this.onRemoveTag}\n />\n )}\n
    \n
    \n
    \n
    \n
    \n )}\n \n );\n }\n}\n","import React, { Component } from 'react';\nimport { FormattedMessage, injectIntl } from 'react-intl';\nimport Axios from 'axios';\nimport moment from 'moment';\nimport intlShape from '@/shared/utils/intlShape';\nimport ZendeskHelp from '@/shared/components/ZendeskHelp';\nimport { FaFileExcel, FaCog } from 'react-icons/fa';\nimport FileSaver from 'file-saver';\nimport SimplePanel from '@/shared/components/SimplePanel';\nimport { ColumnHeader, ScrollableTable } from '@/shared/components/table';\nimport api from '@/shared/api';\nimport Checkbox from '@/shared/components/input/Checkbox';\nimport SignalRService from '@/shared/services/SignalRService';\nimport RegistrationModal from '@/shared/components/registration/RegistrationModal';\nimport { getRegistrationModalPropsForTask } from '@/shared/components/registration/registrationHelpers';\nimport Button from '@/shared/components/Button';\nimport utils from '@/shared/utils/adminpulse';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport { AddIcon } from '@/shared/components/Icons';\nimport ToastrService from '@/shared/services/ToastrService';\nimport { CanCreate } from '@/shared/components/security';\nimport { hasAssignments } from '@/shared/components/security/HasAssignments';\nimport YesNoModal from '@/shared/components/YesNoModal';\nimport { injectStateService } from '@/shared/services/StateService';\nimport ShareItemModal from '@/shared/components/ShareItemModal';\nimport { getRelationName } from '@/shared/components/RelationName';\nimport CheckboxListModal from '@/shared/components/CheckboxListModal';\nimport SendEmailModal from '@/shared/components/email/MultiRelationsMailModal';\nimport SingleRelationMailModal from '@/shared/components/email/SingleRelationMailModal';\n\nimport {\n handleHiddenColumnsSelection,\n initHiddenColumnsState,\n} from '@/shared/utils/hiddenColumnsHelper';\nimport { getShareItemNameForTask } from '@/shared/services/ObjectDisplayService';\nimport TaskDetailsModal from '../taskDetails/TaskDetailsModal';\nimport CreateToDoModal from '../CreateToDoModal';\nimport TaskListFilters, { defaultFilters } from './TaskListFilters';\nimport messages from '../taskMessages';\nimport TaskListRow from './TaskListRow';\nimport config from '../../../config';\nimport ChangeAssignedUserModal from './ChangeAssignedUserModal';\nimport TaskListGlobalActionsButton from './TaskListGlobalActionsButton';\nimport ChangeTaskDeadlineModal from '../ChangeTaskDeadlineModal';\nimport ChangeTaskTagsModal from '../ChangeTaskTagsModal';\nimport AuthService from '@/shared/services/AuthService';\n\nconst columnSelectionStorageKey = 'TaskListHiddenColumns';\nconst columnDefinitions = [\n { id: 'assignedTo', message: messages.AssignedTo, visibleByDefault: true },\n { id: 'relation', message: messages.Relation, visibleByDefault: true },\n {\n id: 'assignment',\n message: messages.Assignment,\n visibleByDefault: true,\n enabled: () => hasAssignments(),\n },\n { id: 'status', message: messages.TaskStatus, visibleByDefault: true },\n { id: 'deadline', message: messages.Deadline, visibleByDefault: true },\n { id: 'createdAt', message: messages.CreatedAt, visibleByDefault: false },\n { id: 'createdBy', message: messages.CreatedBy, visibleByDefault: false },\n { id: 'modifiedAt', message: messages.ModifiedAt, visibleByDefault: false },\n { id: 'modifiedBy', message: messages.ModifiedBy, visibleByDefault: false },\n { id: 'completedDate', message: messages.CompletedDate, visibleByDefault: false },\n { id: 'duration', message: messages.RegistratedTime, visibleByDefault: true },\n {\n id: 'referenceYear',\n message: messages.ReferenceYear,\n visibleByDefault: false,\n enabled: () => AuthService.hasFeature('ReferenceYear'),\n },\n];\n\nclass TaskListContainer extends Component {\n state = {\n allTasksSelected: false,\n items: [],\n initialSearchParams: {\n sortKey: 'deadline',\n filter: {},\n page: 0,\n pageSize: 50,\n desc: true,\n taskFilters: {\n ...defaultFilters,\n },\n },\n currentSearchParams: undefined,\n showColumnSelectionModal: false,\n columnStatus: {},\n };\n\n constructor(props) {\n super(props);\n let searchParams = {};\n let filters = {};\n if (props.searchParams && typeof props.searchParams.filters === 'object') {\n // Parameters from state\n filters = { ...props.searchParams.filters };\n if (props.desc || props.desc === false) searchParams.desc = props.desc;\n if (props.sort) searchParams.sortKey = props.sort;\n } else if (props.taskId) {\n filters = { plannedTaskId: props.taskId };\n this.state.showTaskDetailsModal = true;\n this.state.activeTask = { id: props.taskId };\n } else {\n // Parameters from memory\n const { taskFilters: memoryTaskFilters = {}, ...otherParams } =\n JSON.parse(sessionStorage.getItem('TaskListParams')) || {};\n\n searchParams = otherParams;\n filters = memoryTaskFilters;\n }\n // Fix filter formats\n if (filters.deadlineFrom) filters.deadlineFrom = moment(filters.deadlineFrom);\n if (filters.deadlineUntil) filters.deadlineUntil = moment(filters.deadlineUntil);\n\n const taskFilters = {\n ...defaultFilters,\n ...filters,\n };\n const { hideableColumns, columnStatus } = initHiddenColumnsState(\n columnSelectionStorageKey,\n columnDefinitions,\n props.intl,\n );\n this.state.hideableColumns = hideableColumns;\n this.state.columnStatus = columnStatus;\n\n const { initialSearchParams: orgSearchParams } = this.state;\n this.state.initialSearchParams = {\n ...orgSearchParams,\n ...searchParams,\n taskFilters,\n };\n }\n\n taskUpdatedEventHandler = task => {\n if (!task) return;\n const { items } = this.state;\n\n this.setState(state => {\n const index = items.findIndex(x => x.id === task.id);\n if (index !== -1) {\n items[index] = { ...items[index], ...task };\n\n if (task.children && task.children.length) {\n task.children.map(subtask => {\n const childIndex = items.findIndex(x => x.id === subtask.id);\n if (index !== -1) {\n items[childIndex] = { ...items[childIndex], ...subtask };\n }\n });\n }\n if (task.parent) {\n const parentIndex = items.findIndex(x => x.id === task.parent.id);\n if (index !== -1) {\n items[parentIndex] = {\n ...items[parentIndex],\n ...task.parent,\n };\n }\n }\n return {\n ...state,\n items,\n };\n }\n return {\n ...state,\n };\n });\n };\n\n taskRemovedEventHandler = taskIds => {\n const { items } = this.state;\n const itemsCopy = items.filter(\n task => !taskIds.includes(task.id) && !taskIds.includes(task.parentId),\n );\n\n this.setState(state => ({\n ...state,\n items: [...itemsCopy],\n }));\n };\n\n handleTaskHasAttachmentsMessage = message => {\n const { items } = this.state;\n\n this.setState(state => {\n const index = items.findIndex(x => x.id === message.id);\n if (index !== -1) {\n items[index] = {\n ...items[index],\n hasAttachments: message.hasAttachments,\n };\n }\n // update parent id present\n if (message.parentId) {\n const parentIndex = items.findIndex(x => x.id === message.parentId);\n if (parentIndex !== -1) {\n items[parentIndex] = {\n ...items[parentIndex],\n hasAttachments: message.parentHasAttachments,\n };\n }\n }\n\n return {\n ...state,\n items,\n };\n });\n };\n\n componentDidMount() {\n SignalRService.subscribe('taskUpdated', this.taskUpdatedEventHandler);\n SignalRService.subscribe('taskDeleted', this.taskRemovedEventHandler);\n SignalRService.subscribe('taskHasAttachmentsChanged', this.handleTaskHasAttachmentsMessage);\n }\n\n componentWillUnmount() {\n SignalRService.unsubscribe('taskUpdated', this.taskUpdatedEventHandler);\n SignalRService.unsubscribe('taskDeleted', this.taskRemovedEventHandler);\n SignalRService.unsubscribe('taskHasAttachmentsChanged', this.handleTaskHasAttachmentsMessage);\n\n if (typeof this.loadListToken !== 'undefined') {\n this.loadListToken.cancel('Operation canceled due to leaving page.');\n }\n }\n\n static propTypes = {\n intl: intlShape.isRequired,\n };\n\n loadItems = searchParams => {\n const endpoint = `${config.appUrls.tasks}/api/TaskList`;\n const { allTasksSelected } = this.state;\n const { intl } = this.props;\n if (typeof this.loadListToken !== 'undefined') {\n this.loadListToken.cancel('Operation canceled due to new request.');\n }\n this.loadListToken = Axios.CancelToken.source();\n\n sessionStorage.setItem(\n 'TaskListParams',\n JSON.stringify({\n taskFilters: searchParams.taskFilters,\n sortKey: searchParams.sortKey,\n desc: searchParams.desc,\n }),\n );\n\n return api.base\n .post(\n endpoint,\n {\n ...searchParams.taskFilters,\n page: searchParams.page,\n take: searchParams.pageSize,\n sort: searchParams.sortKey,\n desc: searchParams.desc,\n },\n {\n cancelToken: this.loadListToken.token,\n },\n )\n .then(({ data }) => {\n // If checkbox for all tasks is selected, set selected on all new incoming tasks\n const newTasks = data.tasks.map(e => ({ ...e, selected: !!allTasksSelected }));\n\n this.setState(state => ({\n ...state,\n items: searchParams.page > 0 ? [...state.items, ...newTasks] : [...newTasks],\n total: data.total,\n currentSearchParams: searchParams,\n }));\n return data.tasks;\n })\n .catch(error => {\n if (!Axios.isCancel(error)) {\n return handleHttpError(intl)(error);\n }\n });\n };\n\n handleTaskSelection = task => {\n this.setState(({ items }) => ({\n items: items.map(x => (x.id === task.id ? { ...x, selected: !x.selected } : x)),\n }));\n };\n\n filtersChanged = filters => {\n this.setState(state => ({\n initialSearchParams: {\n ...state.initialSearchParams,\n page: 0,\n taskFilters: filters,\n },\n }));\n };\n\n handleSelectAllTasks = () => {\n this.setState(({ items, allTasksSelected }) => ({\n allTasksSelected: !allTasksSelected,\n items: items.map(e => ({ ...e, selected: !allTasksSelected })),\n }));\n };\n\n getCountSelectedTasks() {\n const { allTasksSelected, total, items } = this.state;\n\n const count = items ? items.filter(x => x.selected !== allTasksSelected).length : 0;\n\n return allTasksSelected ? total - count : count;\n }\n\n getCountSelectedTasksFormatted() {\n const { total } = this.state;\n const { intl } = this.props;\n const count = this.getCountSelectedTasks();\n\n return intl.formatMessage(messages.CountTasksSelected, { count, total });\n }\n\n isGlobalActionsDisabled = () => {\n const { items, allTasksSelected } = this.state;\n if (!items || !items.length) return true;\n if (items.some(x => x.selected) || allTasksSelected) return false;\n\n return true;\n };\n\n onAddRegistrationClick = task => {\n this.setState(state => ({\n ...state,\n activeTask: task,\n showRegistrationModal: true,\n }));\n };\n\n onRegistrationCreated = registration => {\n const { items, activeTask } = this.state;\n const itemsCopy = [...items];\n\n const item = itemsCopy.find(x => x.id === activeTask.id);\n if (item) {\n item.duration += registration.durationMinutes;\n }\n\n this.setState(state => ({\n ...state,\n showRegistrationModal: false,\n items: itemsCopy,\n }));\n };\n\n createReport = () => {\n const { intl } = this.props;\n const { currentSearchParams, items, allTasksSelected } = this.state;\n\n const model = {\n ...currentSearchParams.taskFilters,\n page: currentSearchParams.page,\n take: currentSearchParams.pageSize,\n sort: currentSearchParams.sortKey,\n desc: currentSearchParams.desc,\n selectAll: allTasksSelected,\n selectedTasks: items ? items.filter(x => x.selected !== allTasksSelected).map(x => x.id) : [],\n };\n\n const culture = intl.locale;\n const connectionId = SignalRService.getConnectionId();\n\n const endpoint = `${config.appUrls.tasks}/api/tasklist/export?culture=${culture}&connectionId=${connectionId}`;\n this.setState(state => ({\n ...state,\n creatingReport: true,\n }));\n\n return api.base\n .post(endpoint, model)\n .then(result => {\n ToastrService.info(intl.formatMessage(messages.ExportToExcelStarted));\n this.setState(state => ({\n ...state,\n creatingReport: false,\n }));\n })\n .catch(error => {\n this.setState(state => ({\n ...state,\n creatingReport: false,\n }));\n handleHttpError(intl)(error);\n });\n };\n\n onToDoCreated = toDo => {\n const { items } = this.state;\n\n const itemsCopy = [toDo, ...items];\n\n this.setState(state => ({\n ...state,\n showCreateToDoModal: false,\n items: itemsCopy,\n }));\n };\n\n onShowTaskDetails = task => {\n this.setState({\n activeTask: task,\n showTaskDetailsModal: true,\n });\n };\n\n onTaskDetailsClosed = () => {\n this.setState({\n showTaskDetailsModal: false,\n });\n };\n\n onRequestDeleteTask = task => {\n this.setState(state => ({\n ...state,\n activeTask: task,\n showDeleteTaskModal: true,\n }));\n };\n\n getSelectedRelationLanguages = () => {\n const { allTasksSelected, items } = this.state;\n\n return new Promise((resolve, reject) => {\n if (allTasksSelected) {\n const { currentSearchParams } = this.state;\n const model = {\n ...currentSearchParams.taskFilters,\n selectAll: allTasksSelected,\n selectedTasks: items\n ? items.filter(x => x.selected !== allTasksSelected).map(x => x.id)\n : [],\n };\n\n api.base\n .post(`${config.appUrls.tasks}/api/tasklist/languages`, model)\n .then(({ data }) => {\n resolve(data);\n })\n .catch(error => {\n reject(error);\n });\n } else {\n const languages = [\n ...new Set(items.filter(x => x.selected).map(x => x.relation.languageCode)),\n ];\n resolve(languages);\n }\n });\n };\n openSendEmailModal = () => {\n const { intl } = this.props;\n this.getSelectedRelationLanguages()\n .then(languages => {\n this.setState({\n showSendMailModal: true,\n languages,\n });\n })\n .catch(error => {\n handleHttpError(intl)(error);\n });\n };\n\n deleteTask = () => {\n const { activeTask, items } = this.state;\n const { intl } = this.props;\n\n const endpoint = `${config.appUrls.tasks}/api/PlannedTasks/${activeTask.id}`;\n\n return api.base\n .delete(endpoint, { params: { taskLevel: activeTask.taskLevel } })\n .then(({ data }) => {\n ToastrService.success(intl.formatMessage(messages.TaskDeleted));\n\n let itemsCopy = items;\n\n if (data.taskLevel === 0) {\n // If a main task was deleted, remove sub tasks from items if present\n itemsCopy = items.filter(\n task => task.id !== activeTask.id && task.parentId !== activeTask.id,\n );\n } else {\n itemsCopy = items.filter(task => task.id !== activeTask.id);\n }\n\n this.setState(state => ({\n ...state,\n showDeleteTaskModal: false,\n items: [...itemsCopy],\n }));\n })\n .catch(error => {\n this.setState(state => ({\n ...state,\n showDeleteTaskModal: false,\n }));\n handleHttpError(intl)(error);\n });\n };\n\n // This method can return multiple tasks because multiple tasks could have been opened after another\n // (clicking parent or subtask -> vsts-like)\n onTaskDetailModalClosed = tasks => {\n if (tasks && tasks.length) {\n this.setState(\n state => ({\n ...state,\n showTaskDetailsModal: false,\n }),\n () => tasks.map(task => this.taskUpdatedEventHandler(task)),\n );\n } else {\n this.setState(state => ({\n ...state,\n showTaskDetailsModal: false,\n }));\n }\n };\n handleTasksUpdated = updatedTasks => {\n if (!updatedTasks || !updatedTasks.length) return;\n this.setState(state => ({\n items: state.items.map(row => {\n const updated = updatedTasks.find(x => x.id === row.id);\n if (!updated) return row;\n return { ...row, ...updated };\n }),\n }));\n };\n\n handleSendEmail = task => {\n this.setState({\n selectedRelationId: task.relationId,\n selectedCompanyId: task.relation.companyId,\n activeTask: task,\n showSendByEmailModal: true,\n });\n };\n\n updateTask = task => {\n const { intl } = this.props;\n task.tags = null;\n return api.base.put(`${config.appUrls.tasks}/api/plannedTasks`, task).then(\n ({ data }) => {\n ToastrService.changesSaved(intl);\n this.setState(({ items }) => ({\n items: items.map(x => (x.id === task.id ? { ...x, ...data } : x)),\n }));\n return data;\n },\n error => {\n handleHttpError(intl)(error);\n },\n );\n };\n\n updateDeadline = task => {\n const { intl } = this.props;\n const deadline = task.deadline ? task.deadline.format('YYYY-MM-DD') : '';\n return api.base\n .put(`${config.appUrls.tasks}/api/plannedTasks/deadline/${task.id}/${deadline}`, task)\n .then(\n ({ data }) => {\n ToastrService.changesSaved(intl);\n this.setState(({ items }) => ({\n items: items.map(x => (x.id === task.id ? { ...x, ...data } : x)),\n }));\n return data;\n },\n error => {\n handleHttpError(intl)(error);\n },\n );\n };\n\n updateUser = task => {\n const { intl } = this.props;\n\n const model = { taskId: task.id, userId: task.userId, taskLevel: task.taskLevel };\n return api.base.put(`${config.appUrls.tasks}/api/plannedTasks/UpdateAssignedUser`, model).then(\n ({ data }) => {\n ToastrService.changesSaved(intl);\n this.setState(({ items }) => ({\n items: items.map(x => (x.id === task.id ? { ...x, ...data } : x)),\n }));\n return data;\n },\n error => {\n handleHttpError(intl)(error);\n },\n );\n };\n\n executeBatchActionChangeAssignedUser = assignedToModel => {\n const { intl, stateService } = this.props;\n const batchActionModel = this.createBatchActionModel();\n const model = {\n ...batchActionModel,\n parameters: assignedToModel,\n };\n\n const endpoint = `${config.appUrls.tasks}/api/TaskList/BatchChangeAssignedUser`;\n\n return api.base\n .post(endpoint, model)\n .then(({ data }) => {\n this.setState(state => ({\n ...state,\n showChangeAssignedUserModal: false,\n }));\n const onClick = data ? () => stateService.gotoJob(data.id) : undefined;\n ToastrService.info(\n intl.formatMessage(messages.UpdateAssignedUserQueued),\n undefined,\n onClick,\n );\n })\n .catch(error => {\n this.setState(state => ({\n ...state,\n showChangeAssignedUserModal: false,\n }));\n handleHttpError(intl)(error);\n });\n };\n\n executeBatchActionChangeDeadline = ({ deadline }) => {\n const { intl, stateService } = this.props;\n const batchActionModel = this.createBatchActionModel();\n const model = {\n ...batchActionModel,\n deadline,\n };\n\n const endpoint = `${config.appUrls.tasks}/api/TaskList/BatchChangeDeadline`;\n\n return api.base\n .post(endpoint, model)\n .then(({ data }) => {\n this.setState({\n showChangeTaskDeadlineModal: false,\n });\n\n const onClick = data ? () => stateService.gotoJob(data.id) : undefined;\n ToastrService.info(intl.formatMessage(messages.BackgroundJobQueued), undefined, onClick);\n })\n .catch(error => {\n this.setState({\n showChangeTaskDeadlineModal: false,\n });\n handleHttpError(intl)(error);\n });\n };\n\n executeBatchActionSendTaskRelationMail = emailDto => {\n const { intl, stateService } = this.props;\n const batchActionModel = this.createBatchActionModel();\n const model = {\n ...batchActionModel,\n parameters: emailDto,\n };\n\n const endpoint = `${config.appUrls.tasks}/api/TaskList/BatchMailTaskRelation`;\n\n return api.base\n .post(endpoint, model)\n .then(({ data }) => {\n this.setState({\n showSendMailModal: false,\n });\n\n const onClick = data ? () => stateService.gotoJob(data.id) : undefined;\n ToastrService.info(intl.formatMessage(messages.BackgroundJobQueued), undefined, onClick);\n })\n .catch(error => {\n this.setState({\n showSendMailModal: false,\n });\n handleHttpError(intl)(error);\n });\n };\n\n executeBatchActionDeleteTasks = () => {\n const { intl } = this.props;\n const model = this.createBatchActionModel();\n\n const endpoint = `${config.appUrls.tasks}/api/TaskList/BatchDeleteTasks`;\n\n return api.base\n .post(endpoint, model)\n .then(() => {\n this.setState({ showBatchDeleteTaskModal: false });\n })\n .catch(error => {\n this.setState({ showBatchDeleteTaskModal: false });\n handleHttpError(intl)(error);\n });\n };\n executeBatchActionChangeTags = batchActionParameters => {\n if (this.isGlobalActionsDisabled()) return Promise.reject(new Error('invalid'));\n\n const { intl, stateService } = this.props;\n\n const model = { ...batchActionParameters, ...this.createBatchActionModel() };\n const endpoint = `${config.appUrls.tasks}/api/TaskList/BatchChangeTags`;\n\n return api.base\n .post(endpoint, model)\n .then(({ data }) => {\n this.setState({\n showChangeTagsModal: false,\n });\n const onClick = data ? () => stateService.gotoJob(data.id) : undefined;\n ToastrService.info(intl.formatMessage(messages.BackgroundJobQueued), undefined, onClick);\n })\n .catch(error => {\n handleHttpError(intl)(error);\n });\n };\n\n createBatchActionModel = () => {\n const { currentSearchParams, items, allTasksSelected } = this.state;\n\n const model = {\n filterParams: {\n ...currentSearchParams.taskFilters,\n },\n page: currentSearchParams.page,\n take: currentSearchParams.pageSize,\n sort: currentSearchParams.sortKey,\n desc: currentSearchParams.desc,\n selectAll: allTasksSelected,\n selectedTasks: items ? items.filter(x => x.selected !== allTasksSelected).map(x => x.id) : [],\n };\n\n return model;\n };\n\n sendEmail = emailViewModel => {\n const { intl } = this.props;\n\n return api.base\n .post(`${config.appUrls.documents}/api/emails/CreateAndSend`, emailViewModel)\n .then(({ data }) => {\n this.setState(state => ({\n ...state,\n showSendByEmailModal: false,\n }));\n ToastrService.info(intl.formatMessage(messages.EmailSent));\n })\n .catch(handleHttpError(intl));\n };\n\n handleColumnSelection = items => {\n this.setState(({ hideableColumns }) => ({\n ...handleHiddenColumnsSelection(items, hideableColumns, columnSelectionStorageKey),\n showColumnSelectionModal: false,\n }));\n };\n\n hasTasks = () => {\n const { initialSearchParams } = this.state;\n if (!initialSearchParams) return true;\n const { taskLevels = [] } = initialSearchParams.taskFilters;\n return taskLevels.length === 0 || taskLevels.indexOf(0) >= 0 || taskLevels.indexOf(1) >= 0;\n };\n hasTodos = () => {\n const { initialSearchParams } = this.state;\n if (!initialSearchParams) return true;\n const { taskLevels = [] } = initialSearchParams.taskFilters;\n return taskLevels.length === 0 || taskLevels.indexOf(2) >= 0;\n };\n\n renderRow = item => {\n const { columnStatus } = this.state;\n return (\n this.setState({ showShareItemModal: true, activeTask: item })}\n onUpdateTask={task => this.updateTask(task)}\n onUpdateDeadline={task => this.updateDeadline(task)}\n onUpdateUser={task => this.updateUser(task)}\n />\n );\n };\n\n render() {\n const { intl } = this.props;\n const {\n initialSearchParams,\n items,\n allTasksSelected,\n showRegistrationModal,\n activeTask,\n creatingReport,\n showCreateToDoModal,\n showTaskDetailsModal,\n showDeleteTaskModal,\n showChangeAssignedUserModal,\n showBatchDeleteTaskModal,\n showShareItemModal,\n showChangeTaskDeadlineModal,\n showChangeTagsModal,\n showSendMailModal,\n showSendByEmailModal,\n showColumnSelectionModal,\n hideableColumns,\n columnStatus,\n languages,\n selectedRelationId,\n selectedCompanyId,\n } = this.state;\n\n const hasData = items && items.length > 0;\n const showAssignments = hasAssignments();\n return (\n
    \n {showDeleteTaskModal && (\n \n this.setState(state => ({\n ...state,\n showDeleteTaskModal: false,\n activeTask: undefined,\n }))\n }\n onSave={() => this.deleteTask()}\n />\n )}\n {showChangeTaskDeadlineModal && (\n \n this.setState(state => ({\n ...state,\n showChangeTaskDeadlineModal: false,\n }))\n }\n onSave={this.executeBatchActionChangeDeadline}\n />\n )}\n {showSendMailModal && (\n \n this.setState(state => ({\n ...state,\n showSendMailModal: false,\n }))\n }\n onSave={this.executeBatchActionSendTaskRelationMail}\n />\n )}\n\n {showSendByEmailModal && (\n this.setState({ showSendByEmailModal: false })}\n onSave={this.sendEmail}\n type=\"task\"\n />\n )}\n\n {showBatchDeleteTaskModal && (\n \n this.setState(state => ({\n ...state,\n showBatchDeleteTaskModal: false,\n }))\n }\n onSave={() => this.executeBatchActionDeleteTasks()}\n />\n )}\n\n {showRegistrationModal && (\n \n this.setState(state => ({\n ...state,\n activeTask: undefined,\n showRegistrationModal: false,\n }))\n }\n />\n )}\n {showChangeAssignedUserModal && (\n \n this.setState(state => ({\n ...state,\n showChangeAssignedUserModal: false,\n }))\n }\n />\n )}\n {showCreateToDoModal && (\n \n this.setState(state => ({\n ...state,\n showCreateToDoModal: false,\n }))\n }\n />\n )}\n {showTaskDetailsModal && (\n \n )}\n {showShareItemModal && (\n this.setState({ showShareItemModal: false })}\n />\n )}\n {showChangeTagsModal && (\n this.setState({ showChangeTagsModal: false })}\n addTags={showChangeTagsModal.addTags}\n intl={intl}\n />\n )}\n {showColumnSelectionModal && (\n this.setState({ showColumnSelectionModal: false })}\n show={showColumnSelectionModal}\n sortByLabel={false}\n />\n )}\n \n this.setState({ showCreateToDoModal: true })}\n >\n \n \n \n {intl.formatMessage(messages.CreateNewToDo)}\n \n \n }\n >\n this.filtersChanged(filters)}\n countSelectedTasks={this.getCountSelectedTasksFormatted()}\n />\n \n\n
    \n
    \n
    \n this.setState({ showColumnSelectionModal: true })}\n >\n \n \n \n \n \n this.createReport()}\n disabled={!hasData || creatingReport}\n >\n \n \n \n {intl.formatMessage(messages.ExportToExcel)}\n \n this.setState({ showChangeAssignedUserModal: true })}\n onDeleteTask={() => this.setState({ showBatchDeleteTaskModal: true })}\n onChangeDeadline={() => this.setState({ showChangeTaskDeadlineModal: true })}\n onAddTaskTags={() => this.setState({ showChangeTagsModal: { addTags: true } })}\n onRemoveTaskTags={() => this.setState({ showChangeTagsModal: { addTags: false } })}\n onSendEmail={() => this.openSendEmailModal()}\n hasTasks={this.hasTasks()}\n hasTodos={this.hasTodos()}\n disabled={this.isGlobalActionsDisabled()}\n />\n
    \n
    \n this.loadItems(searchParams)}\n initialSearchParams={initialSearchParams}\n items={items}\n renderRow={item => this.renderRow(item)}\n noDataLabel={}\n >\n this.handleSelectAllTasks()}\n value={allTasksSelected}\n />\n }\n />\n \n \n \n \n\n \n {AuthService.hasFeature('ReferenceYear') ? (\n \n ) : null}\n\n \n \n \n \n \n \n \n \n \n
    \n );\n }\n}\n\nexport default injectStateService(injectIntl(TaskListContainer));\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage } from 'react-intl';\nimport classNames from 'classnames';\n\nimport intlShape from '@/shared/utils/intlShape';\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport messages from './taskMessages';\n\nexport default class ResetDeadlineModal extends Component {\n state = {\n selectedOption: '1',\n showValidation: false,\n };\n\n constructor(props) {\n super(props);\n\n const { intl, subtasks } = props;\n\n this.state.options = [\n { key: '1', label: intl.formatMessage(messages.MainTaskAndAllSubtasks) },\n { key: '2', label: intl.formatMessage(messages.OnlyMainTask) },\n ...subtasks.map(x => ({\n key: `3;${x.id}`,\n label: intl.formatMessage(listItemMsg('taskTemplate', x.id, x.name)),\n })),\n ];\n this.form = React.createRef();\n }\n\n componentDidUpdate(prevProps) {\n const { show } = this.props;\n\n if (prevProps.show !== show) {\n // eslint-disable-next-line react/no-did-update-set-state\n this.setState(() => ({\n showValidation: false,\n selectedOption: '1',\n }));\n }\n }\n\n static propTypes = {\n subtasks: PropTypes.arrayOf(\n PropTypes.shape({ id: PropTypes.string.isRequired, name: PropTypes.string }),\n ).isRequired,\n onSave: PropTypes.func.isRequired,\n intl: intlShape.isRequired,\n onClose: PropTypes.func.isRequired,\n show: PropTypes.bool,\n };\n\n static defaultProps = {\n show: false,\n };\n\n closeModal = () => {\n const { onClose } = this.props;\n onClose();\n };\n\n validate() {\n if (!this.form || !this.form.current) return false;\n const { selectedOption } = this.state;\n if (!selectedOption) return false;\n\n return this.form.current.reportValidity();\n }\n\n optionChanged = event => {\n this.setState({\n selectedOption: event.target.value,\n });\n };\n onSave = () => {\n const { selectedOption } = this.state;\n const { onSave } = this.props;\n if (!this.validate()) return Promise.reject(new Error('invalid form'));\n\n const [type, subtaskTemplateId = null] = selectedOption.split(';');\n\n const parameters = {\n recalcSubtasks: type === '1',\n subtaskTemplateId,\n };\n\n return onSave(parameters);\n };\n\n render() {\n const { show, intl } = this.props;\n const { options, selectedOption, showValidation } = this.state;\n const [type, subtaskTemplateId = null] = selectedOption.split(';');\n\n return (\n this.setState({ showValidation: true })}\n >\n {show && (\n
    \n
    \n \n \n
    \n {options && (\n \n {options.map(({ key, label }) => (\n \n ))}\n \n )}\n
    \n
    \n
    \n \n
    \n
    \n \n )}\n \n );\n }\n}\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport classNames from 'classnames';\nimport moment from 'moment';\n\nimport intlShape from '@/shared/utils/intlShape';\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport DatePicker from '@/shared/components/input/DatePicker';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport { falseFunc, isBeforeMinimum } from '@/shared/utils/validationHelpers';\nimport messages from './taskMessages';\n\nexport default class ChangeSubtaskDeadlineModal extends Component {\n state = {\n deadline: moment.utc(),\n selectedSubtask: null,\n };\n\n componentDidMount() {\n this.form = React.createRef();\n }\n\n componentDidUpdate(prevProps) {\n const { show } = this.props;\n\n if (prevProps.show !== show) {\n // eslint-disable-next-line react/no-did-update-set-state\n this.setState(() => ({\n deadline: moment.utc(),\n showValidation: false,\n selectedSubtask: null,\n }));\n }\n }\n\n static propTypes = {\n onSave: PropTypes.func.isRequired,\n intl: intlShape.isRequired,\n onClose: PropTypes.func.isRequired,\n show: PropTypes.bool,\n };\n\n static defaultProps = {\n show: false,\n };\n\n closeModal = () => {\n const { onClose } = this.props;\n onClose();\n };\n\n validate() {\n if (!this.form || !this.form.current) return false;\n const { selectedSubtask, deadline } = this.state;\n if (!selectedSubtask || !selectedSubtask.id) return false;\n if (isBeforeMinimum(deadline)) return false;\n\n return this.form.current.reportValidity();\n }\n\n deadlineChanged = input => {\n this.setState({\n deadline: input,\n });\n };\n subtaskChanged = event => {\n const { subtasks } = this.props;\n const subtaskId = event.target.value;\n const subtask = subtasks.find(x => x.id === subtaskId);\n\n this.setState({\n selectedSubtask: subtask,\n });\n };\n onSave = () => {\n const { deadline, selectedSubtask } = this.state;\n const { onSave } = this.props;\n if (!this.validate()) return Promise.reject(new Error('invalid form'));\n\n const parameters = {\n subtaskTemplateId: selectedSubtask.id,\n deadline,\n };\n\n return onSave(parameters);\n };\n\n render() {\n const { show, intl, subtasks } = this.props;\n const { deadline, dateFocused, selectedSubtask, showValidation } = this.state;\n\n return (\n this.setState({ showValidation: true })}\n >\n {show && (\n
    \n
    \n \n \n
    \n {subtasks && (\n \n {!selectedSubtask && (\n \n )}\n {subtasks.map(subtask => (\n \n ))}\n \n )}\n
    \n
    \n\n \n \n
    \n this.setState({ dateFocused: focused })}\n id=\"taskDeadline\"\n block\n small\n isOutsideRange={falseFunc}\n />\n
    \n \n \n \n )}\n \n );\n }\n}\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport intlShape from '@/shared/utils/intlShape';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport messages from '../taskMessages';\n\nexport default class ChangeMainTaskStatusModal extends Component {\n state = {\n selectedTaskStatus: 2,\n };\n\n componentDidMount() {\n this.form = React.createRef();\n }\n\n componentDidUpdate(prevProps) {\n const { show } = this.props;\n\n if (prevProps.show !== show) {\n // eslint-disable-next-line react/no-did-update-set-state\n this.setState(() => ({\n selectedTaskStatus: 2,\n }));\n }\n }\n\n static propTypes = {\n onSave: PropTypes.func.isRequired,\n intl: intlShape.isRequired,\n onClose: PropTypes.func.isRequired,\n show: PropTypes.bool,\n };\n\n static defaultProps = {\n show: false,\n };\n\n taskStatusChanged = event => {\n const taskStatus = event.target.value;\n this.setState(state => ({\n ...state,\n selectedTaskStatus: taskStatus,\n }));\n };\n\n onSave = () => {\n const { selectedTaskStatus } = this.state;\n const { onSave } = this.props;\n\n const parameters = {\n status: selectedTaskStatus,\n field: 1,\n };\n\n return onSave(parameters);\n };\n\n closeModal = () => {\n const { onClose } = this.props;\n onClose();\n };\n\n render() {\n const { show, intl } = this.props;\n const { selectedTaskStatus } = this.state;\n\n return (\n \n {show && (\n
    \n
    \n
    \n \n
    \n \n \n \n \n \n
    \n
    \n
    \n
    \n )}\n \n );\n }\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport DropdownButton from 'react-bootstrap/lib/DropdownButton';\nimport MenuItem from 'react-bootstrap/lib/MenuItem';\nimport { injectIntl } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport messages from '../taskMessages';\n\nconst TaskGlobalActionsButton = props => {\n const {\n intl,\n disabled,\n onChangeTaskStatus,\n onChangeTaskDeadline,\n onChangeSubtaskDeadline,\n onNewRegistration,\n onChangeMainTaskStatus,\n onSendEmail,\n onDeleteTask,\n onResetDeadline,\n onGenerateDocuments,\n onAddTaskTags,\n onRemoveTaskTags,\n } = props;\n\n return (\n \n \n \n {intl.formatMessage(messages.ChangeMainTaskStatus)}\n \n \n {intl.formatMessage(messages.ChangeTaskStatus)}\n \n \n {intl.formatMessage(messages.ResetDeadline)}\n \n \n {intl.formatMessage(messages.ChangeDeadline)}\n \n \n {intl.formatMessage(messages.ChangeSubtaskDeadline)}\n \n \n {intl.formatMessage(messages.NewRegistration)}\n \n \n {intl.formatMessage(messages.SendEmail)}\n \n \n {intl.formatMessage(messages.GenerateDocuments)}\n \n \n {intl.formatMessage(messages.DeleteTask)}\n \n \n {intl.formatMessage(messages.AddTaskTags)}\n \n \n {intl.formatMessage(messages.RemoveTaskTags)}\n \n \n \n );\n};\n\nTaskGlobalActionsButton.propTypes = {\n intl: intlShape.isRequired,\n disabled: PropTypes.bool,\n onChangeTaskStatus: PropTypes.func.isRequired,\n onChangeTaskDeadline: PropTypes.func.isRequired,\n onChangeSubtaskDeadline: PropTypes.func.isRequired,\n onNewRegistration: PropTypes.func.isRequired,\n onChangeMainTaskStatus: PropTypes.func.isRequired,\n onGenerateDocuments: PropTypes.func.isRequired,\n onSendEmail: PropTypes.func.isRequired,\n onDeleteTask: PropTypes.func.isRequired,\n onResetDeadline: PropTypes.func.isRequired,\n onAddTaskTags: PropTypes.func.isRequired,\n onRemoveTaskTags: PropTypes.func.isRequired,\n};\nTaskGlobalActionsButton.defaultProps = {\n disabled: false,\n};\nexport default injectIntl(TaskGlobalActionsButton);\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { IntlShape } from 'react-intl';\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport Checkbox from '@/shared/components/input/Checkbox';\nimport intlShape from '@/shared/utils/intlShape';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport log from 'loglevel';\nimport ToastrService from '@/shared/services/ToastrService';\nimport classNames from 'classnames';\nimport moment from 'moment';\nimport LoadingAnimation from '@/shared/components/LoadingAnimation';\nimport EmailEditor from '@/shared/components/EmailEditor';\nimport enumCache from '@/shared/services/EnumCacheService';\nimport CollapsablePanel from '../../shared/components/CollapablePanel';\nimport messages from './taskMessages';\nimport AuthService, { functionalities, privileges } from '@/shared/services/AuthService';\n\nexport default class ChangeTaskStatusModal extends Component {\n state = {\n emails: [],\n emailAttachments: [],\n selectedSubtask: undefined,\n selectedTaskStatus: 2,\n loadingTemplate: false,\n showEmailEditor: false,\n taskstatuses: [],\n autoLinkDocumentTypes: [],\n };\n\n componentDidMount() {\n this.form = React.createRef();\n const { intl } = this.props;\n enumCache.get('taskstatus').then(data => {\n this.setState({\n taskstatuses: [\n ...data.map(x => ({\n key: x.key,\n label: intl.formatMessage(listItemMsg('taskstatus', x.key, x.value)),\n })),\n {\n key: 4,\n label: intl.formatMessage(listItemMsg('extendedtaskstatus', 4, 4)),\n },\n {\n key: 6,\n label: intl.formatMessage(listItemMsg('extendedtaskstatus', 6, 6)),\n },\n ],\n });\n });\n }\n\n componentDidUpdate(prevProps) {\n const { show } = this.props;\n\n if (prevProps.show !== show) {\n // eslint-disable-next-line react/no-did-update-set-state\n this.setState(() => ({\n emails: [],\n emailAttachments: [],\n selectedSubtask: undefined,\n selectedTaskStatus: 0,\n loadingTemplate: false,\n showEmailEditor: false,\n }));\n }\n }\n\n static propTypes = {\n subtasks: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n onSave: PropTypes.func.isRequired,\n intl: intlShape.isRequired,\n onClose: PropTypes.func.isRequired,\n show: PropTypes.bool,\n };\n\n static defaultProps = {\n show: false,\n };\n\n subtaskChanged = event => {\n const { subtasks } = this.props;\n const subtaskId = event.target.value;\n const subtask = subtasks.find(x => x.id === subtaskId);\n\n this.setState(state => ({\n ...state,\n selectedSubtask: subtask,\n showEmailEditor: false,\n sendEmail: false,\n emails: [],\n }));\n };\n\n taskStatusChanged = event => {\n const taskStatus = event.target.value;\n this.setState(state => ({\n ...state,\n selectedTaskStatus: taskStatus,\n }));\n };\n\n isFormInvalid = () => {\n const { selectedSubtask } = this.state;\n if (!selectedSubtask) return true;\n\n return false;\n };\n\n onSave = () => {\n const {\n selectedSubtask,\n selectedTaskStatus,\n showEmailEditor,\n emails,\n emailAttachments,\n } = this.state;\n const { onSave, intl } = this.props;\n this.setState({ touchedTask: true });\n\n if (!selectedSubtask || !selectedSubtask.id) return;\n\n const isFormValid = this.validate();\n\n let invalidEmailBody = false;\n\n if (showEmailEditor) {\n if (emails.length) {\n emails.map(x => {\n if (!x.content || x.content === '

    ') {\n invalidEmailBody = true;\n }\n });\n } else {\n invalidEmailBody = true;\n }\n }\n\n if (invalidEmailBody) {\n ToastrService.error(intl.formatMessage(messages.EmailContentRequired));\n return Promise.reject(new Error('invalid form'));\n }\n\n if (!isFormValid) return Promise.reject(new Error('invalid form'));\n\n const status = parseInt(selectedTaskStatus);\n\n const parameters = {\n mailTemplateId: selectedSubtask.mailTemplateId,\n subtaskTemplateId: selectedSubtask.id,\n desiredStatus: status === 4 || status === 6 ? 2 : status, // remap extended task status to normal status.\n markAsInapplicable: status === 4,\n markAsRejected: status === 6,\n sendEmail: showEmailEditor,\n emails,\n emailAttachments: emailAttachments.map(x => ({\n documentId: x.id,\n languageCode: x.languageCode,\n })),\n };\n\n return onSave(parameters);\n };\n\n closeModal = () => {\n const { onClose } = this.props;\n onClose();\n };\n\n loadEmailTemplates = (templateId, languageCodes) => {\n const { intl } = this.props;\n\n return Promise.all(\n languageCodes.map((languageCode, index) =>\n api.base\n .get(`${config.appUrls.api}/api/template/content/${templateId}/${languageCode}`)\n .then(({ data }) => ({\n ...data,\n initialValue: data.content,\n collapsed: index !== 0,\n documentDate: moment.utc(),\n }))\n // if no template was found in the language code, just return an empty object to\n // still be able to use the editor\n .catch(() => {\n const language = intl.formatMessage(\n listItemMsg('language', languageCode, languageCode),\n );\n const message = intl.formatMessage(messages.NoEmailTemplateFoundInLanguage, {\n language,\n });\n ToastrService.error(message);\n return {\n languageCode,\n content: '',\n title: '',\n collapsed: index !== 0,\n documentDate: moment.utc(),\n };\n }),\n ),\n );\n };\n getAttachments = (language, templateLanguageId) =>\n api.base\n .get(`${config.appUrls.documents}/api/Documents/Links/${templateLanguageId}/4`)\n .then(({ data }) => data.map(doc => this.mapAttachment(doc, language)));\n\n handleSendMailClick = () => {\n const { showEmailEditor, selectedSubtask } = this.state;\n const { relationLanguages } = this.props;\n const newShowMailEditor = !showEmailEditor;\n\n const loadEmailTemplate = newShowMailEditor && selectedSubtask.mailTemplateId;\n\n this.setState(state => ({\n ...state,\n showEmailEditor: newShowMailEditor,\n loadingTemplate: !!loadEmailTemplate,\n emails: [],\n emailAttachments: [],\n }));\n\n if (loadEmailTemplate) {\n this.loadEmailTemplates(selectedSubtask.mailTemplateId, relationLanguages).then(\n emailTemplates => {\n this.setState(state => ({\n ...state,\n emails: emailTemplates,\n loadingTemplate: false,\n autoLinkDocumentTypes: emailTemplates[0].autoLinkDocumentTypes,\n }));\n Promise.all(\n emailTemplates.filter(x => !!x.id).map(x => this.getAttachments(x.languageCode, x.id)),\n ).then(([...results]) => {\n this.setState(state => ({\n emailAttachments: [...state.emailAttachments, ...results.flat()],\n }));\n });\n },\n error => {\n console.error(error);\n this.setState(state => ({\n ...state,\n loadingTemplate: false,\n }));\n },\n );\n }\n };\n\n emailTitleChanged = (email, title) => {\n const { emails } = this.state;\n\n this.setState({\n emails: emails.map(e => {\n if (e.languageCode === email.languageCode)\n return {\n ...e,\n title,\n };\n return e;\n }),\n });\n };\n\n emailContentChanged = (email, content) => {\n const { emails } = this.state;\n\n this.setState({\n emails: emails.map(e => {\n if (e.languageCode === email.languageCode)\n return {\n ...e,\n content,\n };\n return e;\n }),\n });\n };\n\n onEditorStateChange = (email, content) => {\n const { emails } = this.state;\n\n this.setState({\n emails: emails.map(e => {\n if (e.languageCode === email.languageCode)\n return {\n ...e,\n content,\n };\n return e;\n }),\n });\n };\n\n renderSingleEmail = (email, languageCode) => {\n const documentUploadEndpoint = `${config.appUrls.documents}/api/documents?documentType=15`;\n const { emailAttachments } = this.state;\n return (\n this.emailTitleChanged(email, title)}\n initialValue={email.initialValue}\n onContentChanged={content => this.onEditorStateChange(email, content)}\n onAttachmentUploaded={(error, file) =>\n this.onDocumentUploaded(error, file, email.languageCode)\n }\n attachmentUploadEndpoint={documentUploadEndpoint}\n attachments={emailAttachments.filter(x => x.languageCode === email.languageCode)}\n onDeleteAttachment={this.deleteAttachment}\n documentDate={email.documentDate}\n onDocumentDateChanged={documentDate =>\n this.setState(state => ({\n ...state,\n emails: state.emails.map(x => {\n if (x.languageCode === email.languageCode) {\n return {\n ...x,\n documentDate,\n };\n }\n return x;\n }),\n }))\n }\n />\n );\n };\n\n emailCollapseClicked = email => {\n const { emails } = this.state;\n\n const emailsCopy = [...emails];\n\n const item = emailsCopy.find(x => x.languageCode === email.languageCode);\n\n item.collapsed = !item.collapsed;\n\n this.setState(state => ({\n ...state,\n emails: emailsCopy,\n }));\n };\n\n mapAttachment = (document, languageCode) => ({\n ...document,\n languageCode,\n });\n\n onDocumentUploaded = (error, document, languageCode) => {\n const { intl } = this.props;\n\n if (error) {\n log.error(error);\n ToastrService.error(intl.formatMessage(messages.MsgEmailAttachmentUploadFailed));\n return;\n }\n\n const emailAttachment = this.mapAttachment(document, languageCode);\n\n this.setState(state => ({\n ...state,\n emailAttachments: [emailAttachment, ...state.emailAttachments],\n }));\n };\n deleteAttachment = attachment => {\n if (AuthService.hasPermission({\n functionality: functionalities.Documents,\n privilege: privileges.Delete,\n }) && attachment.documentType === 15) {\n api.base.delete(`${config.appUrls.documents}/api/documents/${attachment.id}`).then(() => {\n this.setState(state => ({\n emailAttachments: state.emailAttachments.filter(x => x.id !== attachment.id),\n }));\n });\n } else {\n this.setState(state => ({\n emailAttachments: state.emailAttachments.filter(x => x.id !== attachment.id),\n }));\n }\n };\n\n renderMultipleEmails = emails => {\n const { intl } = this.props;\n return emails.map(email => (\n this.emailCollapseClicked(email)}\n title={\n \n {intl.formatMessage(listItemMsg('language', email.languageCode, email.languageCode))}\n \n }\n >\n
    {this.renderSingleEmail(email, email.languageCode)}
    \n \n ));\n };\n\n validate() {\n const { selectedSubtask } = this.state;\n\n if (!selectedSubtask || !selectedSubtask.id) {\n return false;\n }\n return true;\n }\n\n render() {\n const { show, intl, subtasks } = this.props;\n const {\n selectedSubtask,\n selectedTaskStatus,\n showEmailEditor,\n loadingTemplate,\n emails,\n touchedTask,\n taskstatuses,\n autoLinkDocumentTypes,\n } = this.state;\n\n const showMailCheckbox =\n selectedSubtask && (selectedSubtask.type === 3 || selectedSubtask.type === 4);\n const taskClassName = classNames('form-group', {\n 'has-error': touchedTask && (!selectedSubtask || !selectedSubtask.id),\n });\n\n return (\n \n {show && (\n
    \n
    \n
    \n \n
    \n {subtasks && (\n \n {!selectedSubtask && (\n \n )}\n {subtasks.map(subtask => (\n \n ))}\n \n )}\n
    \n
    \n
    \n \n
    \n \n {taskstatuses &&\n taskstatuses.map(taskstatus => (\n \n ))}\n \n
    \n
    \n {showMailCheckbox && (\n
    \n this.handleSendMailClick()}\n text={intl.formatMessage(messages.SendEmail)}\n />\n
    \n )}\n {loadingTemplate && }\n\n {showEmailEditor && !loadingTemplate && (\n
    \n \n {intl.formatMessage(messages.PlaceholdersWillBeResolvedByAdminPulse)}\n \n
    \n )}\n {showEmailEditor &&\n !loadingTemplate &&\n autoLinkDocumentTypes &&\n autoLinkDocumentTypes.length > 0 && (\n
    \n \n \n {intl.formatMessage(\n messages.DocumentsOfTheFollowingTypeWillBeLinkedIfPresent,\n )}\n \n\n
      \n {autoLinkDocumentTypes.map(x => (\n
    • {intl.formatMessage(listItemMsg('documentType', x, x))}
    • \n ))}\n
    \n
    \n
    \n )}\n\n {showEmailEditor &&\n !loadingTemplate &&\n emails &&\n (emails.length === 1\n ? this.renderSingleEmail(emails[0])\n : this.renderMultipleEmails(emails))}\n
    \n
    \n )}\n \n );\n }\n}\n","import React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage, injectIntl, useIntl } from 'react-intl';\nimport moment from 'moment';\nimport isEqual from 'lodash-es/isEqual';\nimport momentPropTypes from 'react-moment-proptypes';\nimport Toggle from 'react-toggle';\n\nimport intlShape from '@/shared/utils/intlShape';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport api from '@/shared/api';\n\nimport RelationSearch from '@/shared/components/input/RelationSearch';\nimport AuthService from '@/shared/services/AuthService';\nimport UserSearch from '@/shared/components/input/UserSearch';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport guid from '@/shared/utils/guid';\nimport SavedFiltersButton from '@/shared/components/SavedFiltersButton';\nimport ToastrService from '@/shared/services/ToastrService';\nimport userStorage from '@/shared/services/userStorage';\nimport DelayedDateRangePicker from '@/shared/components/input/DelayedDateRangePicker';\nimport PeriodButtonGroup, { getPeriodStartEndDates } from '@/shared/components/PeriodButtonGroup';\nimport DynamicTaskFilter, {\n getDynamicFiltersFromDefaultFilters,\n handleDynamicFiltersChanged,\n initDynamicFilters,\n resetDynamicFilters,\n} from '../DynamicTaskFilter';\nimport messages from '../taskMessages';\nimport config from '../../../config';\n\nconst periods = [\n 'month-1',\n 'month',\n 'nextMonth',\n 'quarter-1',\n 'quarter',\n 'nextQuarter',\n 'year-1',\n 'year',\n 'year+1',\n 'all',\n];\n\nexport const defaultFilters = {\n taskId: null,\n includeParameters: false,\n relationId: null,\n invoiceStreamId: null,\n relationName: null,\n relationTypes: [],\n deadlineFrom: moment.utc().startOf('month'),\n deadlineUntil: moment.utc().endOf('month'),\n period: 'month',\n periodicityId: null,\n ownCompanies: [],\n relationTags: [],\n withoutRelationTags: [],\n userId: null,\n relationUserId: null,\n assistant: null, // UserId\n responsible: null, // UserId\n associate: null, // UserId\n assistantBackup: null, // UserId\n billingUser: null, // UserId\n seniorUser: null, // UserId\n assignmentTemplateId: null,\n endFiscalYears: [],\n accountingSoftware: [],\n otherSoftware: [],\n teams: [],\n year: null,\n vatPeriodicity: [],\n createdBy: null,\n legalForms: [], // Array\n financialStatementScheme: [],\n socialSecurityFund: [],\n socialSecretariat: [],\n withTags: [],\n withoutTags: [],\n relationGroups: [],\n filterBehaviours: {\n withTags: 1,\n relationTags: 1,\n },\n};\nconst getIgnoredFilters = filters => {\n const result = ['username', 'relationUsername'];\n if (filters.period) {\n // Ignore deadline filters if there is a period\n result.push('deadlineUntil', 'deadlineFrom');\n }\n return result;\n};\n\nconst allDynamicFilters = [...getDynamicFiltersFromDefaultFilters(defaultFilters)];\n\nconst dynamicFiltersStorageKey = 'TaskOverviewDynamicFilters';\n\nclass TaskOverviewFilters extends PureComponent {\n state = {\n templates: null,\n periodicities: null,\n dynamicFilters: [],\n taskLabels: [],\n };\n\n static propTypes = {\n onFilterChange: PropTypes.func.isRequired,\n filters: PropTypes.shape({\n taskId: PropTypes.string,\n relationId: PropTypes.string,\n invoiceStreamId: PropTypes.string,\n relationName: PropTypes.string,\n relationTypes: PropTypes.arrayOf(PropTypes.number),\n linkTypes: PropTypes.arrayOf(PropTypes.number),\n deadlineUntil: momentPropTypes.momentObj,\n deadlineFrom: momentPropTypes.momentObj,\n period: PropTypes.oneOf(periods),\n periodicityId: PropTypes.string,\n includeParameters: PropTypes.bool,\n relationTags: PropTypes.arrayOf(PropTypes.string),\n withoutRelationTags: PropTypes.arrayOf(PropTypes.string),\n ownCompanies: PropTypes.arrayOf(PropTypes.string),\n userId: PropTypes.string,\n username: PropTypes.string,\n relationUserId: PropTypes.string,\n responsible: PropTypes.string,\n assistant: PropTypes.string,\n associate: PropTypes.string,\n assistantBackup: PropTypes.string,\n billingUser: PropTypes.string,\n seniorUser: PropTypes.string,\n year: PropTypes.number,\n assignmentTemplateId: PropTypes.string,\n accountingSoftware: PropTypes.arrayOf(PropTypes.number),\n otherSoftware: PropTypes.arrayOf(PropTypes.number),\n createdBy: PropTypes.string,\n legalForms: PropTypes.arrayOf(PropTypes.number),\n withTags: PropTypes.arrayOf(PropTypes.string),\n withoutTags: PropTypes.arrayOf(PropTypes.string),\n relationGroups: PropTypes.arrayOf(PropTypes.string),\n userIsNextAssignedUser: PropTypes.bool,\n }),\n displayMode: PropTypes.oneOf(['status', 'dateDone', 'deadline']).isRequired,\n displayModeChanged: PropTypes.func.isRequired,\n templates: PropTypes.arrayOf(\n PropTypes.shape({ id: PropTypes.string.isRequired, label: PropTypes.string.isRequired }),\n ).isRequired,\n columnFilters: PropTypes.shape({}),\n intl: intlShape.isRequired,\n };\n\n static defaultProps = {\n filters: defaultFilters,\n columnFilters: {},\n };\n\n constructor(props) {\n super(props);\n this.state.templates = props.templates;\n }\n\n componentDidMount() {\n const { filters, intl } = this.props;\n\n this.setState({\n dynamicFilters: initDynamicFilters(\n intl,\n allDynamicFilters,\n userStorage.getItem(dynamicFiltersStorageKey) || [],\n filters,\n defaultFilters,\n ),\n });\n\n this.retrievePeriodicities(filters.taskId);\n\n if (filters && filters.period) {\n this.setPeriod(filters.period);\n }\n api.base.get(`${config.appUrls.api}/api/Resource/Tags`).then(({ data }) => {\n this.setState({\n relationLabels: data\n .map(x => ({ id: x.id, label: x.name, sort: x.name.toLowerCase() }))\n .sort(dynamicSort('sort')),\n });\n });\n api.base.get(`${config.appUrls.tasks}/api/Tags`).then(({ data }) => {\n this.setState({\n taskLabels: data\n .map(x => ({ id: x.id, label: x.name, sort: x.name.toLowerCase() }))\n .sort(dynamicSort('sort')),\n });\n });\n }\n\n componentDidUpdate(prevProps) {\n const { filters: newFilters } = this.props;\n const { filters: oldFilters } = prevProps;\n\n if (oldFilters.taskId !== newFilters.taskId) {\n this.retrievePeriodicities(newFilters.taskId);\n }\n }\n\n retrievePeriodicities = templateId => {\n const { intl } = this.props;\n if (!templateId) {\n this.setState({ periodicities: null });\n return;\n }\n return api.base\n .get(`${config.appUrls.tasks}/api/TaskPeriodicity/${templateId}`)\n .then(({ data }) => {\n const translatedPeriodicities = data\n .map(t => ({\n ...t,\n label: intl.formatMessage(listItemMsg('taskperiodicity', t.id, t.name)), // Map translation to label property\n }))\n .sort(dynamicSort('label'));\n\n this.setState({\n periodicities: translatedPeriodicities,\n });\n });\n };\n\n filterChanged = filter => {\n const { filters, onFilterChange } = this.props;\n const newFilters = { ...filters, ...filter };\n if (filters !== newFilters) onFilterChange(newFilters);\n };\n dynamicFilterChanged = (item, selected) => {\n this.setState(({ dynamicFilters }) => {\n const { filters } = this.props;\n const newFilters = handleDynamicFiltersChanged(\n dynamicFilters,\n item,\n selected,\n filters,\n defaultFilters,\n );\n userStorage.setItem(\n dynamicFiltersStorageKey,\n newFilters.filter(x => x.selected).map(x => x.id),\n );\n if (\n !selected &&\n item.id !== 'selectAll' &&\n !isEqual(filters[item.id], defaultFilters[item.id])\n ) {\n // Reset filter when it's removed\n this.filterChanged({ [item.id]: defaultFilters[item.id] });\n }\n return { dynamicFilters: newFilters };\n });\n };\n\n templateChanged = event => {\n const taskId = event.target.value;\n const { filters: { periodicityId } = {} } = this.props;\n this.filterChanged({\n taskId,\n periodicityId: periodicityId === guid.empty ? periodicityId : null,\n });\n\n this.retrievePeriodicities(taskId);\n };\n\n periodicityChanged = event => {\n const periodicityId = event.target.value || null;\n this.filterChanged({ periodicityId });\n };\n\n deadlineFromChanged = value => {\n this.filterChanged({ deadlineFrom: value });\n };\n deadlineUntilChanged = value => {\n this.filterChanged({ deadlineUntil: value });\n };\n\n deadlineChanged = (startDate, endDate) => {\n this.filterChanged({ deadlineFrom: startDate, deadlineUntil: endDate, period: null });\n };\n periodChanged = ({ dateFrom, dateUntil, period }) => {\n this.filterChanged({ deadlineFrom: dateFrom, deadlineUntil: dateUntil, period });\n };\n\n relationChanged = item => {\n if (!item || !item.invoiceStreamId) {\n this.filterChanged({ invoiceStreamId: null, relationId: null, relationName: null });\n } else {\n this.filterChanged({\n invoiceStreamId: null,\n relationId: item.key,\n relationName: item.label,\n });\n }\n };\n\n userChanged = item => {\n if (!item || !item.id) {\n this.filterChanged({ userId: null, username: null });\n } else {\n this.filterChanged({\n userId: item.id,\n username: item.name,\n });\n }\n };\n\n includeParametersChanged = checked => {\n this.filterChanged({\n includeParameters: checked,\n });\n };\n\n setPeriod = value => {\n const [deadlineFrom, deadlineUntil, period] = getPeriodStartEndDates(value);\n this.filterChanged({ deadlineFrom, deadlineUntil, period });\n };\n savedFilterChanged = filters => {\n const { onFilterChange, intl } = this.props;\n const newFilters = { ...defaultFilters, ...filters };\n if (typeof newFilters.deadlineFrom === 'string')\n newFilters.deadlineFrom = moment.utc(filters.deadlineFrom);\n if (typeof newFilters.deadlineUntil === 'string')\n newFilters.deadlineUntil = moment.utc(filters.deadlineUntil);\n\n if (newFilters.period) {\n const [deadlineFrom, deadlineUntil] = getPeriodStartEndDates(newFilters.period);\n newFilters.deadlineFrom = deadlineFrom;\n newFilters.deadlineUntil = deadlineUntil;\n }\n const { templates } = this.state;\n if (newFilters.taskId && templates && !templates.some(x => x.id === newFilters.taskId)) {\n // Task template not found, reset to null\n newFilters.taskId = null;\n ToastrService.warning(intl.formatMessage(messages.FilterTaskTemplateNotFound));\n }\n\n onFilterChange(newFilters);\n\n this.setState(({ dynamicFilters }) => ({\n dynamicFilters: resetDynamicFilters(dynamicFilters, newFilters, defaultFilters),\n }));\n\n const { taskId } = newFilters;\n this.retrievePeriodicities(taskId);\n };\n\n render() {\n const { templates, periodicities, relationLabels, dynamicFilters, taskLabels } = this.state;\n const {\n filters,\n intl,\n displayMode,\n displayModeChanged,\n countSelectedTasks,\n columnFilters,\n } = this.props;\n\n let initRelation = null;\n\n if (filters.relationId && filters.relationName) {\n initRelation = {\n key: filters.relationId,\n label: filters.relationName,\n invoiceStreamId: filters.invoiceStreamId,\n };\n }\n const visibleFilters = dynamicFilters.filter(x => x.selected).map(x => x.id);\n\n const defaultFiltersForSaving = {\n ...defaultFilters,\n // Add current taskId so the reset doesn't change the task\n taskId: filters.taskId || null,\n columnFilters: {},\n };\n // When a user visits this screen for the first time, they still need to select a task template.\n // To prevent saving filters without taskid, we use the default filter as current filter, so the button doesn't detect a difference.\n // This is better than hiding the button because now they can still select a saved filter.\n const currentFiltersForSaving = filters.taskId\n ? {\n ...filters,\n columnFilters,\n }\n : defaultFiltersForSaving;\n\n return (\n
    \n
    \n
    \n
    \n {templates && (\n \n {!filters.taskId && }\n {templates.map(template => (\n \n ))}\n \n )}\n
    \n
    \n
    \n
    \n {!filters.taskId && !periodicities && (\n \n )}\n {periodicities && (\n \n \n\n \n {periodicities && !!periodicities.length && (\n \n  \n \n )}\n {periodicities.map(periodicity => (\n \n ))}\n \n )}\n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n {visibleFilters && visibleFilters.length > 0 ? (\n
    \n {visibleFilters.map(id => (\n \n ))}\n
    \n ) : null}\n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    \n \n this.deadlineChanged(startDate, endDate)\n }\n startDatePlaceholderText={intl.formatMessage(messages.DeadlineFrom)}\n endDatePlaceholderText={intl.formatMessage(messages.DeadlineUntil)}\n block\n />\n
    \n
    \n
    \n
    \n \n \n this.filterChanged({\n userIsNextAssignedUser: !filters.userIsNextAssignedUser,\n // when enabling this filter and no userId is filtered, set the userId to the current user\n userId:\n !filters.userIsNextAssignedUser === true && !filters.userId\n ? AuthService.getUserId()\n : filters.userId,\n })\n }\n />\n \n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n \n \n \n
    \n
    \n
    \n
    \n
    \n

    {countSelectedTasks}

    \n
    \n
    \n
    \n );\n }\n}\n\nexport default injectIntl(TaskOverviewFilters);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { injectIntl, useIntl } from 'react-intl';\nimport { Tooltip } from 'react-bootstrap';\n\nimport intlShape from '@/shared/utils/intlShape';\nimport { formatListValue } from '@/shared/components/FormattedListValue';\nimport TaskStatusToggle from '../TaskStatusToggle';\n\nimport messages from '../taskMessages';\nimport FormattedDateShort from '../../../shared/components/FormattedDateShort';\n\nconst cellTooltip = (column, value, assignedUser, intl) => (\n \n
    \n \n {value.name ||\n formatListValue({ id: column.id, list: 'taskTemplate', fallback: column.name, intl })}\n \n
    \n {value.deadline && (\n
    \n \n {intl.formatMessage(messages.Deadline)}\n : \n \n \n
    \n )}\n {value.completedDate && (\n
    \n \n {intl.formatMessage(messages.CompletedDate)}\n : \n \n \n
    \n )}\n
    \n \n {intl.formatMessage(messages.AssignedTo)}\n : \n \n {assignedUser || intl.formatMessage(messages.Unassigned)}\n
    \n
    \n);\n\nclass TaskOverviewCell extends React.PureComponent {\n static propTypes = {\n taskId: PropTypes.string.isRequired,\n column: PropTypes.shape({\n id: PropTypes.string,\n name: PropTypes.string,\n type: PropTypes.number,\n }).isRequired,\n value: PropTypes.shape({\n id: PropTypes.string,\n deadline: PropTypes.string,\n status: PropTypes.number,\n hasAttachments: PropTypes.bool,\n }),\n displayMode: PropTypes.oneOf(['status', 'dateDone', 'deadline']).isRequired,\n assignedUser: PropTypes.string,\n onTasksUpdated: PropTypes.func.isRequired,\n onOpenDetail: PropTypes.func,\n onAddRegistration: PropTypes.func,\n intl: intlShape.isRequired,\n };\n static defaultProps = {\n value: null,\n onOpenDetail: null,\n assignedUser: null,\n onAddRegistration: null,\n };\n renderCellContent = () => {\n const {\n taskId,\n column,\n value,\n assignedUser,\n displayMode,\n onTasksUpdated,\n onOpenDetail,\n onAddRegistration,\n intl,\n } = this.props;\n if (!value) return null;\n let extraInfo = null;\n if (\n displayMode === 'dateDone' &&\n value.status === 2 &&\n value.completedDate &&\n !value.isBlocked\n ) {\n extraInfo = (\n \n \n \n );\n } else if (displayMode === 'deadline' && value.deadline) {\n extraInfo = (\n \n \n \n );\n }\n return (\n \n );\n };\n\n render() {\n return {this.renderCellContent()};\n }\n}\n\nexport default injectIntl(TaskOverviewCell);\n","import EditableDatePicker from '@/shared/components/editable/EditableDatePicker';\nimport EditableNumber from '@/shared/components/editable/EditableNumber';\nimport EditableTextbox from '@/shared/components/editable/EditableTextbox';\nimport FormattedListValue, { listItemMsg } from '@/shared/components/FormattedListValue';\nimport EditableUserSearch from '@/shared/components/editable/EditableUserSearch';\nimport HasFeature from '@/shared/components/security/HasFeature';\nimport classNames from 'classnames';\nimport {\n FaTrashAlt,\n FaShareAlt,\n FaRegClock,\n FaExternalLinkAlt,\n FaRegWindowRestore,\n FaPaperPlane,\n} from 'react-icons/fa';\n\nimport intlShape from '@/shared/utils/intlShape';\nimport Checkbox from '@/shared/components/input/Checkbox';\nimport RelationName from '@/shared/components/RelationName';\nimport CanDelete from '@/shared/components/security/CanDelete';\nimport moment from 'moment';\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport { FormattedNumber } from 'react-intl';\nimport { CanUpdate } from '@/shared/components/security';\nimport { hasAssignments } from '@/shared/components/security/HasAssignments';\nimport { mapInvoiceStreamName } from '@/shared/services/ObjectDisplayService';\nimport { injectStateService, StateService } from '@/shared/services/StateService';\nimport EditableSelect from '@/shared/components/editable/EditableSelect';\nimport FormattedDateShort from '@/shared/components/FormattedDateShort';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport TaskStatusToggle from '../TaskStatusToggle';\nimport TaskOverviewCell from './TaskOverviewCell';\n\nimport messages from '../taskMessages';\n\nclass TaskOverviewRow extends React.PureComponent {\n renderSingleParameter = (parameterValue, selectionItems) => {\n const { onUpdateParameter } = this.props;\n const selectionItemsArray = selectionItems\n ? selectionItems.split(';').map((x, index) => ({\n id: index,\n label: x,\n }))\n : [];\n\n const selectedItem =\n parameterValue.parameterValueType === 4 &&\n selectionItemsArray.map(x => x.label).includes(parameterValue.valueText)\n ? selectionItemsArray.find(x => x.label === parameterValue.valueText).id\n : undefined;\n\n const selectedItemChanged = id => {\n // selection cleared\n if (!id) {\n onUpdateParameter({ ...parameterValue, valueText: null });\n return;\n }\n\n const item = selectionItemsArray.find(x => x.id === parseInt(id));\n if (!item) return;\n onUpdateParameter({ ...parameterValue, valueText: item.label });\n };\n\n const highlight = parameterValue.computedParameterModifiedByUser ? 'red' : undefined;\n\n switch (parameterValue.parameterValueType) {\n case 0: // text\n return (\n onUpdateParameter({ ...parameterValue, valueText: value })}\n maxLength=\"500\"\n />\n );\n case 1: // numeric\n return (\n onUpdateParameter({ ...parameterValue, valueNumeric: value })}\n max=\"99999999\"\n min=\"-99999999\"\n />\n );\n case 2: // Date\n return (\n onUpdateParameter({ ...parameterValue, valueDate: value })}\n />\n );\n case 3: // boolean\n return (\n {\n e.stopPropagation();\n }}\n >\n onUpdateParameter({ ...parameterValue, valueBoolean: value })}\n value={parameterValue.valueBoolean}\n renderNullAsFalse\n />\n \n );\n case 4: // select list\n return (\n selectedItemChanged(id)}\n options={selectionItemsArray}\n />\n );\n case 5: // employee\n return (\n onUpdateParameter({ ...parameterValue, valueText: value?.id })}\n value={parameterValue.valueText}\n withUnassigned\n submitOnChange\n includeInactiveUsers\n />\n );\n default:\n return ;\n }\n };\n\n renderOtherSoftware = otherSoftware => {\n const { intl } = this.props;\n if (!otherSoftware) return '';\n const otherSoftwareArray = otherSoftware\n .replace(/\\s/g, '')\n .split(',')\n .filter(x => x !== '');\n\n return (otherSoftwareArray || [])\n .map(x => intl.formatMessage(listItemMsg('othersoftware', x)))\n .join(', ');\n };\n\n renderRelationField = (parameterValue, type) => {\n // Special types (list values, enums, guids ...)\n switch (type) {\n case 8: // AccountingSoftware\n return (\n parameterValue.valueNumeric !== null && (\n \n )\n );\n case 9:\n case 10:\n case 11:\n case 12:\n case 26:\n case 27: {\n const user = DataCacheService.getUserName(parameterValue.valueText);\n return {user};\n }\n case 14:\n return (\n parameterValue.valueNumeric !== null && (\n \n )\n );\n case 18:\n return (\n parameterValue.valueNumeric !== null && (\n \n )\n );\n case 15:\n return (\n parameterValue.valueObject !== null && (\n \n )\n );\n case 22:\n return this.renderOtherSoftware(parameterValue.valueText);\n case 23:\n return (\n parameterValue.valueNumeric !== null && (\n \n )\n );\n case 24:\n return (\n parameterValue.valueNumeric !== null && (\n \n )\n );\n default:\n break;\n }\n // Normal values\n switch (parameterValue.parameterValueType) {\n case 0: // text\n return parameterValue.valueText;\n case 1: // numeric\n return !parameterValue.valueNumeric && parameterValue.valueNumeric !== 0 ? null : (\n \n );\n case 2: // Date\n return parameterValue.valueDate && ;\n case 3: // boolean\n return (\n
    \n {}}\n />\n
    \n );\n default:\n return ;\n }\n };\n\n renderTaskParameters = (task, parameterDefinitions) => {\n const temp = parameterDefinitions.map(definition => {\n const parameterValue =\n !task.parameterValues || !task.parameterValues.length\n ? null\n : task.parameterValues.find(x => x.parameterDefinitionId === definition.id);\n if (!parameterValue) return ;\n if (definition.relationFieldType) {\n return (\n \n {this.renderRelationField(parameterValue, definition.relationFieldType)}\n \n );\n }\n return (\n \n {this.renderSingleParameter(parameterValue, definition.selectionItems)}\n \n );\n });\n return temp;\n };\n\n getRegObjectForCell = colId => {\n const { task } = this.props;\n const subTask = task.columns[colId];\n if (!subTask) return null;\n\n return {\n id: subTask.id,\n templateId: subTask.templateId,\n name: subTask.name,\n resourceId: subTask.resourceId || task.resourceId,\n mainTaskId: task.id,\n mainTaskName: task.name,\n mainTemplateId: task.templateId,\n relation: task.relation,\n invoiceStreamId: task.invoiceStreamId,\n };\n };\n\n render() {\n const {\n task,\n columns,\n stateService,\n displayMode,\n intl,\n handleTaskSelection,\n parameterDefinitions,\n onShowTaskDetails,\n onAddRegistrationClick,\n onTasksUpdated,\n onRequestDeleteTask,\n onShareItem,\n onUpdateDeadline,\n onSendSignatureRequest,\n handleRowHighlight,\n } = this.props;\n const {\n id,\n relation,\n columns: cells,\n status,\n isBlocked,\n inapplicable,\n assignmentId,\n assignmentTemplateId,\n assignmentName,\n hasRemark,\n scheduleHasRemark,\n hasAttachments,\n rejected,\n remark,\n scheduleRemark,\n } = task;\n const statusValue = {\n id,\n status,\n isBlocked,\n inapplicable,\n rejected,\n hasAttachments,\n hasRemark,\n scheduleHasRemark,\n taskLevel: 0,\n };\n const showLinkButton =\n task.status !== 2 || task.deadline === null || moment(task.deadline) > moment.utc();\n\n const showAssignments = hasAssignments();\n\n const canSendSignatureRequest =\n DataCacheService.getCompanySettings(task.relation.companyId) &&\n DataCacheService.getCompanySettings(task.relation.companyId).documentSigningProvider > 0;\n\n return (\n \n handleRowHighlight(task)}\n className={task.active || task.selected ? 'highlight-row' : null}\n >\n \n {\n handleTaskSelection(task);\n e.stopPropagation();\n }}\n value={task.selected}\n />\n \n \n \n \n\n {showAssignments && (\n \n {mapInvoiceStreamName(\n { assignmentId, assignmentTemplateId, assignmentName },\n intl,\n '',\n )}\n \n )}\n \n onShowTaskDetails(task.id)}\n onAddRegistration={() => onAddRegistrationClick(task)}\n extraInfo={\n displayMode === 'dateDone' &&\n task.status === 2 &&\n task.completedDate &&\n !task.isBlocked ? (\n \n \n \n ) : null\n }\n />\n \n \n {task.year === 0 ? null : task.year}\n \n \n onUpdateDeadline({ ...task, deadline })}\n />\n \n\n {parameterDefinitions && this.renderTaskParameters(task, parameterDefinitions)}\n\n {columns.map(col => (\n onAddRegistrationClick(this.getRegObjectForCell(col.id))}\n />\n ))}\n \n {\n onAddRegistrationClick(task);\n e.stopPropagation();\n }}\n >\n \n \n {canSendSignatureRequest && (\n \n {\n onSendSignatureRequest(task);\n e.stopPropagation();\n }}\n >\n \n \n \n )}\n {\n onShowTaskDetails(task.id);\n e.stopPropagation();\n }}\n >\n \n \n {\n onShareItem();\n e.stopPropagation();\n }}\n >\n \n \n {\n stateService.gotoTaskboard({\n relation,\n taskTemplateId: task.templateId,\n plannedTaskId: task.id,\n openPlannedTaskDetailModal: false,\n });\n e.stopPropagation();\n }}\n title={intl.formatMessage(messages.OpenInTaskboard)}\n >\n \n \n \n {\n onRequestDeleteTask(task);\n e.stopPropagation();\n }}\n >\n \n \n \n \n \n \n );\n }\n}\n\nTaskOverviewRow.propTypes = {\n task: PropTypes.shape({\n relation: PropTypes.shape({}),\n columns: PropTypes.shape({}),\n id: PropTypes.string,\n templateId: PropTypes.string,\n userId: PropTypes.string,\n }).isRequired,\n columns: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n stateService: PropTypes.instanceOf(StateService).isRequired,\n displayMode: PropTypes.oneOf(['status', 'dateDone', 'deadline']),\n intl: intlShape.isRequired,\n handleTaskSelection: PropTypes.func.isRequired,\n handleRowHighlight: PropTypes.func.isRequired,\n onShowTaskDetails: PropTypes.func.isRequired,\n onAddRegistrationClick: PropTypes.func.isRequired,\n onRequestDeleteTask: PropTypes.func.isRequired,\n onShareItem: PropTypes.func.isRequired,\n\n // onStatusChanged: PropTypes.func.isRequired,\n parameterDefinitions: PropTypes.arrayOf(PropTypes.shape({})),\n\n onTasksUpdated: PropTypes.func.isRequired,\n onUpdateParameter: PropTypes.func.isRequired,\n};\nTaskOverviewRow.defaultProps = {\n parameterDefinitions: [],\n displayMode: 'status',\n};\nexport default injectStateService(TaskOverviewRow);\n","import React, { Component } from 'react';\nimport { FormattedMessage, injectIntl, useIntl } from 'react-intl';\nimport Axios from 'axios';\nimport { injectStateService } from '@/shared/services/StateService';\nimport intlShape from '@/shared/utils/intlShape';\nimport HasFeature from '@/shared/components/security/HasFeature';\n\nimport moment from 'moment';\nimport FileSaver from 'file-saver';\nimport { FaFileExcel } from 'react-icons/fa';\nimport SimplePanel from '@/shared/components/SimplePanel';\nimport { ColumnHeader, ScrollableTable } from '@/shared/components/table';\nimport api from '@/shared/api';\nimport debounce from 'lodash-es/debounce';\nimport { listItemMsg, formatListValue } from '@/shared/components/FormattedListValue';\nimport Checkbox from '@/shared/components/input/Checkbox';\nimport ToastrService from '@/shared/services/ToastrService';\nimport SignalRService from '@/shared/services/SignalRService';\nimport utils from '@/shared/utils/adminpulse';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport Button from '@/shared/components/Button';\nimport BatchRegistrationModal from '@/shared/components/registration/BatchRegistrationModal';\nimport SendEmailModal from '@/shared/components/email/MultiRelationsMailModal';\nimport BatchGenerateDocumentModal from '@/shared/components/BatchGenerateDocumentModal';\nimport CheckboxListModal from '@/shared/components/CheckboxListModal';\nimport DocumentSignatureRequestModal from '@/shared/components/DocumentSignatureRequestModal';\n\nimport RegistrationModal from '@/shared/components/registration/RegistrationModal';\nimport YesNoModal from '@/shared/components/YesNoModal';\nimport { hasAssignments } from '@/shared/components/security/HasAssignments';\nimport { getRegistrationModalPropsForTask } from '@/shared/components/registration/registrationHelpers';\nimport authService, { functionalities, privileges } from '@/shared/services/AuthService';\nimport ShareItemModal from '@/shared/components/ShareItemModal';\nimport { getRelationName } from '@/shared/components/RelationName';\nimport { getShareItemNameForTask } from '@/shared/services/ObjectDisplayService';\nimport PopoverStickOnHover from '@/shared/components/PopoverStickOnHover';\nimport createDOMPurify from 'dompurify';\nimport { showWhenPermission } from '@/shared/components/security';\nimport ResetDeadlineModal from '../ResetDeadlineModal';\nimport ChangeSubtaskDeadlineModal from '../ChangeSubtaskDeadlineModal';\nimport ChangeMainTaskStatusModal from './ChangeMainTaskStatusModal';\nimport TaskDetailsModal from '../taskDetails/TaskDetailsModal';\nimport messages from '../taskMessages';\nimport ChangeTaskDeadlineModal from '../ChangeTaskDeadlineModal';\nimport ChangeTaskStatusModal from '../ChangeTaskStatusModal';\nimport TaskGlobalActionsButton from './TaskGlobalActionsButton';\nimport TaskOverviewFilters, { defaultFilters } from './TaskOverviewFilters';\nimport TaskOverviewRow from './TaskOverviewRow';\nimport config from '../../../config';\nimport ChangeTaskTagsModal from '../ChangeTaskTagsModal';\n\nconst sanitizer = createDOMPurify();\nsanitizer.addHook('afterSanitizeAttributes', currentNode => {\n if ('target' in currentNode) {\n // Open all links in new tab / window\n currentNode.setAttribute('target', '_blank');\n\n // To prevent legacy browsers to pass confidential info across the link...\n // https://developer.chrome.com/docs/lighthouse/best-practices/external-anchors-use-rel-noopener\n currentNode.setAttribute('rel', 'noopener noreferrer');\n }\n});\n\nconst mapParameterValues = item => {\n const result = { ...item };\n if (item.valueDate && typeof item.valueDate === 'string')\n result.valueDate = moment.utc(item.valueDate);\n if (item.relationFieldType === 15)\n result.valueObject = item.valueText ? JSON.parse(item.valueText) : null;\n return result;\n};\n\nconst mapParent = (stateTask, updatedTask) =>\n updatedTask\n ? {\n ...stateTask,\n status: updatedTask.status,\n deadline: updatedTask.deadline,\n completedDate: updatedTask.completedDate,\n isBlocked: updatedTask.isBlocked,\n hasRemark: updatedTask.hasRemark,\n remark: updatedTask.remark,\n year: updatedTask.year,\n scheduleRemark:\n updatedTask.scheduleRemark === undefined\n ? stateTask.scheduleRemark\n : updatedTask.scheduleRemark, // SignalR event doesn't send schedule remark, keep from state if undefined\n parameterValues: !updatedTask.parameterValues\n ? stateTask.parameterValues\n : (updatedTask.parameterValues || []).map(mapParameterValues),\n }\n : stateTask;\n\nconst mapChild = (stateTask, subtask) => ({\n ...stateTask,\n remark: subtask.remark,\n status: subtask.status,\n deadline: subtask.deadline,\n completedDate: subtask.completedDate,\n isBlocked: subtask.isBlocked,\n inapplicable: subtask.inapplicable,\n rejected: subtask.rejected,\n hasRemark: subtask.hasRemark,\n hasAttachments: subtask.hasAttachments,\n});\n\nclass TaskOverviewContainer extends Component {\n state = {\n displayMode: 'status',\n allTasksSelected: false,\n items: [],\n columns: [],\n languages: [],\n initialSearchParams: {\n page: 0,\n pageSize: 50,\n sortKey: 'relation',\n desc: false, // relations are better sorted alphabetically\n taskFilters: {\n ...defaultFilters,\n },\n },\n currentSearchParams: undefined,\n };\n\n jobUpdateReloadTasks = debounce(() => {\n this.setState(state => ({\n ...state,\n initialSearchParams: {\n ...state.currentSearchParams,\n // forces refresh of table\n random: new Date().getTime(),\n },\n }));\n }, 500);\n\n taskUpdatedEventHandler = task => {\n if (!task) return;\n this.handleTasksUpdated([task]);\n };\n\n retrieveTemplates() {\n const { intl } = this.props;\n api.base.get(`${config.appUrls.tasks}/api/TaskTemplates`).then(({ data }) => {\n const translatedTemplates = data\n .map(t => ({\n ...t,\n label: intl.formatMessage(listItemMsg('taskTemplate', t.id, t.name)), // Map translation to label property\n }))\n .sort((a, b) => (a.label > b.label) - (a.label < b.label)); // Sort on label property\n\n this.setState({\n templates: translatedTemplates,\n });\n });\n }\n\n taskRemovedEventHandler = taskIds => {\n const { items } = this.state;\n const itemsCopy = items.filter(task => !taskIds.includes(task.id));\n\n this.setState(state => ({\n ...state,\n items: [...itemsCopy],\n }));\n };\n\n taskHasAttachmentsChangedHandler = message => {\n this.setState(({ items }) => {\n const updatedItems = [...items];\n if (message.level === 0) {\n const index = updatedItems.findIndex(x => x.id === message.id);\n if (index < 0) return;\n const updatedRow = {\n ...updatedItems[index],\n hasAttachments: message.hasAttachments,\n };\n\n updatedItems[index] = updatedRow;\n } else if (message.level === 1) {\n const mainTaskIndex = updatedItems.findIndex(x => x.id === message.parentId);\n if (mainTaskIndex < 0) return;\n\n const updatedRow = {\n ...updatedItems[mainTaskIndex],\n hasAttachments: message.parentHasAttachments,\n };\n const taskTemplateIds = Object.keys(updatedRow.columns);\n\n // eslint-disable-next-line\n for (const taskTemplateId of taskTemplateIds) {\n const column = updatedRow.columns[taskTemplateId];\n if (column.id === message.id) {\n updatedRow.columns = {\n ...updatedRow.columns,\n [taskTemplateId]: {\n ...updatedRow.columns[taskTemplateId],\n hasAttachments: message.hasAttachments,\n },\n };\n updatedItems[mainTaskIndex] = updatedRow;\n break;\n }\n }\n }\n\n return { items: updatedItems };\n });\n };\n\n componentDidMount() {\n SignalRService.subscribe('taskUpdated', this.taskUpdatedEventHandler);\n SignalRService.subscribe('taskDeleted', this.taskRemovedEventHandler);\n SignalRService.subscribe('taskHasAttachmentsChanged', this.taskHasAttachmentsChangedHandler);\n\n this.retrieveTemplates();\n }\n\n componentWillUnmount() {\n SignalRService.unsubscribe('taskUpdated', this.taskUpdatedEventHandler);\n SignalRService.unsubscribe('taskDeleted', this.taskRemovedEventHandler);\n SignalRService.unsubscribe('taskHasAttachmentsChanged', this.taskHasAttachmentsChangedHandler);\n\n if (typeof this.cancelToken !== 'undefined') {\n this.cancelToken.cancel('Operation canceled due to leaving page.');\n }\n }\n\n constructor(props) {\n super(props);\n const { initialSearchParams: orgSearchParams } = this.state;\n\n let filtersFromSearchParams = {};\n if (props.searchParams && Object.keys(props.searchParams).length) {\n const {\n taskId,\n periodicityId,\n mainStatus,\n deadlineFrom,\n deadlineUntil,\n period,\n relation = null,\n userId = null,\n username = null,\n year = null,\n ownCompanies = [],\n teams = [],\n } = props.searchParams;\n\n const filter = {}; // Clear column filters\n const taskFilters = {\n ...orgSearchParams.taskFilters,\n taskId,\n periodicityId,\n teams,\n ownCompanies,\n };\n if (mainStatus) filter.mainStatus = { items: mainStatus };\n if (period) {\n taskFilters.period = period;\n }\n if (deadlineFrom) {\n taskFilters.deadlineFrom = moment.utc(deadlineFrom);\n taskFilters.period = null;\n }\n if (deadlineUntil) {\n taskFilters.deadlineUntil = moment.utc(deadlineUntil);\n taskFilters.period = null;\n }\n if (relation && relation.id && relation.name) {\n taskFilters.relationId = relation.id;\n taskFilters.relationName = relation.name;\n taskFilters.invoiceStreamId = relation.invoiceStreamId;\n }\n if (userId && username) {\n taskFilters.userId = userId;\n taskFilters.username = username;\n }\n if (year || year === 0) {\n taskFilters.year = year;\n }\n filtersFromSearchParams = { filter, taskFilters };\n // We removed the return that was here in order to have session sorting to prevail, even if\n // filters are taken from passed in searchParams\n }\n\n const sessionParams = JSON.parse(sessionStorage.getItem('TaskOverviewParams')) || {};\n if (sessionParams.taskFilters) {\n if (sessionParams.taskFilters.deadlineFrom)\n sessionParams.taskFilters.deadlineFrom = moment.utc(sessionParams.taskFilters.deadlineFrom);\n if (sessionParams.taskFilters.deadlineUntil)\n sessionParams.taskFilters.deadlineUntil = moment.utc(\n sessionParams.taskFilters.deadlineUntil,\n );\n\n // Migration from previous stored session params where this might not be defined resulting in errors\n if (!sessionParams.taskFilters.relationTypes) {\n sessionParams.taskFilters.relationTypes = [];\n }\n if (!sessionParams.taskFilters.ownCompanies) {\n sessionParams.taskFilters.ownCompanies = [];\n }\n }\n\n // This is our fallback procedure, use filters/taskFilters from searchParams, then sessionStore, then orgParams\n // in order to keep sorting parameters from sessionStore\n this.state.initialSearchParams = {\n ...orgSearchParams,\n ...sessionParams,\n ...filtersFromSearchParams,\n };\n\n if (this.state.initialSearchParams.sortKey) {\n const subtaskMatch = this.state.initialSearchParams.sortKey.match(\n /subtask_([^_]+)_[0-9a-fA-F-]+/i,\n );\n if (subtaskMatch && subtaskMatch.length > 1) {\n // eslint-disable-next-line prefer-destructuring\n this.state.displayMode = subtaskMatch[1];\n }\n }\n }\n\n static propTypes = {\n intl: intlShape.isRequired,\n };\n\n loadItems = searchParams => {\n if (!searchParams.taskFilters.taskId) {\n return Promise.resolve([]); // Task id is required\n }\n\n if (typeof this.cancelToken !== 'undefined') {\n this.cancelToken.cancel('Operation canceled due to new request.');\n }\n this.cancelToken = Axios.CancelToken.source();\n const filter = searchParams.filter || {};\n\n const subTaskFilters = Object.keys(filter)\n .filter(key => key.startsWith('subtask_'))\n .reduce(\n (obj, key) => ({\n ...obj,\n [key.substr(8)]: filter[key].items,\n }),\n {},\n );\n\n const parameterFilters = Object.keys(filter)\n .filter(key => key.startsWith('parameter_'))\n .reduce(\n (obj, key) => ({\n ...obj,\n [key.substr(10)]: filter[key].items,\n }),\n {},\n );\n\n const endpoint = `${config.appUrls.tasks}/api/Overview`;\n\n const mainStatus = (filter && filter.mainStatus && filter.mainStatus.items) || null;\n const { allTasksSelected } = this.state;\n\n sessionStorage.setItem(\n 'TaskOverviewParams',\n JSON.stringify({\n taskFilters: searchParams.taskFilters,\n parameterFilters: searchParams.parameterFilters,\n sortKey: searchParams.sortKey,\n desc: searchParams.desc,\n filter,\n }),\n );\n\n return api.base\n .post(\n endpoint,\n {\n ...searchParams.taskFilters,\n statusFilters: subTaskFilters,\n parameterFilters,\n mainStatus,\n\n page: searchParams.page,\n take: searchParams.pageSize,\n sort: searchParams.sortKey,\n desc: searchParams.desc,\n },\n {\n cancelToken: this.cancelToken.token,\n },\n )\n .then(({ data }) => {\n if (!data) {\n // Something wrong with the parameters or the tasktemplate is removed\n this.setState({\n items: [],\n columns: [],\n taskTemplateName: null,\n taskTemplateId: null,\n taskTemplateDocumentation: null,\n totalRows: 0,\n currentSearchParams: searchParams,\n defaultResourceId: null,\n parameterDefinitions: null,\n });\n return [];\n }\n // If checkbox for all tasks is selected, set selected on all new incoming tasks\n const newTasks = data.rows.map(e => ({\n ...e,\n selected: !!allTasksSelected,\n parameterValues: (e.parameterValues || []).map(mapParameterValues),\n }));\n\n this.setState(state => ({\n items: searchParams.page > 0 ? [...state.items, ...newTasks] : [...newTasks],\n columns: searchParams.page > 0 ? state.columns : data.columns,\n taskTemplateName: data.taskTemplateName,\n taskTemplateId: data.taskTemplateId,\n taskTemplateDocumentation: data.documentation,\n totalRows: data.totalRows,\n currentSearchParams: searchParams,\n defaultResourceId: data.resourceId,\n parameterDefinitions: data.parameterDefinitions,\n }));\n return data.rows;\n })\n .catch(error => {\n if (!Axios.isCancel(error)) return error;\n });\n };\n handleTaskSelection = task => {\n this.setState(({ items }) => ({\n items: items.map(x => (x.id === task.id ? { ...x, selected: !x.selected } : x)),\n }));\n };\n handleRowHighlight = task => {\n this.setState(({ items }) => ({\n items: items.map(x => (x.id === task.id ? { ...x, active: !x.active } : x)),\n }));\n };\n\n filtersChanged = filters => {\n const { initialSearchParams, currentSearchParams } = this.state;\n\n const {\n taskFilters: { taskId: orgTaskId },\n } = initialSearchParams;\n const { columnFilters, ...taskFilters } = filters;\n\n const params = currentSearchParams || initialSearchParams || {};\n const taskChanged = orgTaskId !== filters.taskId;\n\n this.setState(state => ({\n ...state,\n initialSearchParams: {\n ...state.initialSearchParams,\n page: 0,\n taskFilters,\n // if columnFilters has a value, this is from a saved filter\n filter: columnFilters || (taskChanged ? {} : params.filter) || {},\n sortKey: taskChanged ? 'deadline' : params.sortKey,\n desc: taskChanged ? false : params.desc,\n },\n }));\n };\n\n displayModeChanged = displayMode => {\n this.setState(({ initialSearchParams, currentSearchParams }) => {\n const params = currentSearchParams || initialSearchParams || {};\n if (!params.sortKey || params.sortKey.indexOf('subtask_') < 0)\n return {\n displayMode: displayMode || 'status',\n };\n\n const newSortKey = params.sortKey.replace(\n /subtask(?:_[^_]+)?_([0-9a-fA-F-]+)/gi,\n `subtask_${displayMode || 'status'}_$1`,\n );\n if (newSortKey === params.sortKey)\n return {\n displayMode: displayMode || 'status',\n };\n\n return {\n displayMode: displayMode || 'status',\n initialSearchParams: {\n ...initialSearchParams,\n ...params,\n page: 0,\n sortKey: newSortKey,\n },\n };\n });\n };\n\n handleSelectAllTasks = () => {\n this.setState(({ items, allTasksSelected }) => ({\n allTasksSelected: !allTasksSelected,\n items: items.map(e => ({ ...e, selected: !allTasksSelected })),\n }));\n };\n\n getCountSelectedTasksFormatted() {\n const { totalRows } = this.state;\n const { intl } = this.props;\n const count = this.getCountSelectedTasks();\n\n return intl.formatMessage(messages.CountTasksSelected, { count, total: totalRows });\n }\n\n getCountSelectedTasks() {\n const { allTasksSelected, totalRows, items } = this.state;\n\n const count = items ? items.filter(x => x.selected !== allTasksSelected).length : 0;\n\n return allTasksSelected ? totalRows - count : count;\n }\n\n isGlobalActionsDisabled = () => {\n const { items, allTasksSelected } = this.state;\n if (!items || !items.length) return true;\n if (items.some(x => x.selected) || allTasksSelected) return false;\n\n return true;\n };\n\n createBatchActionModel = parameters => {\n const { currentSearchParams, items, allTasksSelected } = this.state;\n\n const filter = currentSearchParams.filter || {};\n const subTaskFilters = Object.keys(filter)\n .filter(key => key.startsWith('subtask_'))\n .reduce(\n (obj, key) => ({\n ...obj,\n [key.substr(8)]: filter[key].items,\n }),\n {},\n );\n const parameterFilters = Object.keys(filter)\n .filter(key => key.startsWith('parameter_'))\n .reduce(\n (obj, key) => ({\n ...obj,\n [key.substr(10)]: filter[key].items,\n }),\n {},\n );\n const mainStatus = (filter && filter.mainStatus && filter.mainStatus.items) || null;\n\n const filterParams = {\n ...currentSearchParams.taskFilters,\n statusFilters: subTaskFilters,\n parameterFilters,\n mainStatus,\n\n page: currentSearchParams.page,\n take: currentSearchParams.pageSize,\n sort: currentSearchParams.sortKey,\n desc: currentSearchParams.desc,\n };\n\n const model = {\n filterParams,\n parameters,\n selectAll: allTasksSelected,\n selectedTasks: items ? items.filter(x => x.selected !== allTasksSelected).map(x => x.id) : [],\n };\n\n return model;\n };\n\n executeBatchActionTaskStatus = batchActionParameters => {\n if (this.isGlobalActionsDisabled()) return Promise.reject(new Error('invalid'));\n\n const { intl, stateService } = this.props;\n const { currentSearchParams } = this.state;\n\n const model = this.createBatchActionModel({\n ...batchActionParameters,\n mainTaskTemplateId: currentSearchParams.taskFilters.taskId,\n });\n\n const endpoint = `${config.appUrls.tasks}/api/PlannedTasks/BatchChangeTaskStatus`;\n\n return api.base\n .post(endpoint, model)\n .then(({ data }) => {\n this.setState(state => ({\n ...state,\n showChangeTaskStatusModal: false,\n }));\n const onClick = data ? () => stateService.gotoJob(data.id) : undefined;\n ToastrService.info(intl.formatMessage(messages.UpdateTaskStatusQueued), undefined, onClick);\n })\n .catch(error => {\n handleHttpError(intl)(error);\n });\n };\n\n executeBatchActionDeleteTask = () => {\n if (this.isGlobalActionsDisabled()) return Promise.reject(new Error('invalid'));\n\n const { intl } = this.props;\n const { currentSearchParams } = this.state;\n\n const model = this.createBatchActionModel({\n mainTaskTemplateId: currentSearchParams.taskFilters.taskId,\n });\n\n const endpoint = `${config.appUrls.tasks}/api/Overview/BatchDeleteTasks`;\n\n return api.base\n .post(endpoint, model)\n .then(() => {\n this.setState({ showBatchDeleteTaskModal: false });\n })\n .catch(error => {\n this.setState({ showBatchDeleteTaskModal: false });\n handleHttpError(intl)(error);\n });\n };\n\n executeBatchActionChangeField = batchActionParameters => {\n if (this.isGlobalActionsDisabled()) return Promise.reject(new Error('invalid'));\n\n const { intl, stateService } = this.props;\n\n const model = this.createBatchActionModel(batchActionParameters);\n const endpoint = `${config.appUrls.tasks}/api/PlannedTasks/BatchChangeField`;\n\n return api.base\n .post(endpoint, model)\n .then(({ data }) => {\n this.setState(state => ({\n ...state,\n showChangeTaskDeadlineModal: false,\n showChangeMainTaskStatusModal: false,\n }));\n const onClick = data ? () => stateService.gotoJob(data.id) : undefined;\n const message =\n batchActionParameters.field === 0\n ? intl.formatMessage(messages.UpdateTaskDeadlineQueued)\n : intl.formatMessage(messages.UpdateTaskStatusQueued);\n ToastrService.info(message, undefined, onClick);\n })\n .catch(error => {\n handleHttpError(intl)(error);\n });\n };\n\n executeBatchActionSubtaskDeadline = batchActionParameters => {\n if (this.isGlobalActionsDisabled()) return Promise.reject(new Error('invalid'));\n const { intl, stateService } = this.props;\n\n const model = this.createBatchActionModel(batchActionParameters);\n const endpoint = `${config.appUrls.tasks}/api/PlannedTasks/BatchChangeSubtaskDeadline`;\n\n return api.base\n .post(endpoint, model)\n .then(({ data }) => {\n this.setState(state => ({\n ...state,\n showChangeSubtaskDeadlineModal: false,\n }));\n const onClick = data ? () => stateService.gotoJob(data.id) : undefined;\n const message = intl.formatMessage(messages.UpdateTaskDeadlineQueued);\n ToastrService.info(message, undefined, onClick);\n })\n .catch(error => {\n handleHttpError(intl)(error);\n });\n };\n\n executeBatchActionTaskRegistration = batchActionParameters => {\n if (this.isGlobalActionsDisabled()) return Promise.reject(new Error('invalid'));\n\n const { intl, stateService } = this.props;\n\n const model = this.createBatchActionModel(batchActionParameters);\n const endpoint = `${config.appUrls.tasks}/api/PlannedTasks/BatchTaskRegistration`;\n\n return api.base\n .post(endpoint, model)\n .then(({ data }) => {\n this.setState(state => ({\n ...state,\n showNewRegistrationModal: false,\n }));\n const onClick = data ? () => stateService.gotoJob(data.id) : undefined;\n ToastrService.info(intl.formatMessage(messages.NewRegistrationsQueued), undefined, onClick);\n })\n .catch(error => {\n handleHttpError(intl)(error);\n });\n };\n\n executeBatchActionSendTaskRelationMail = batchActionParameters => {\n if (this.isGlobalActionsDisabled()) return Promise.reject(new Error('invalid'));\n\n const { intl, stateService } = this.props;\n\n const model = this.createBatchActionModel(batchActionParameters);\n const endpoint = `${config.appUrls.tasks}/api/PlannedTasks/BatchMailTaskRelation`;\n\n return api.base\n .post(endpoint, model)\n .then(({ data }) => {\n this.setState(state => ({\n ...state,\n showSendMailModal: false,\n }));\n const onClick = data ? () => stateService.gotoJob(data.id) : undefined;\n ToastrService.info(intl.formatMessage(messages.SendEmailQueued), undefined, onClick);\n })\n .catch(error => {\n handleHttpError(intl)(error);\n });\n };\n executeBatchActionGenerateDocuments = batchActionParameters => {\n if (this.isGlobalActionsDisabled()) return Promise.reject(new Error('invalid'));\n\n const { intl, stateService } = this.props;\n\n const model = this.createBatchActionModel(batchActionParameters);\n const endpoint = `${config.appUrls.tasks}/api/Overview/BatchGenerateDocuments`;\n\n return api.base\n .post(endpoint, model)\n .then(({ data }) => {\n this.setState(state => ({\n ...state,\n showGenerateDocumentsModal: false,\n }));\n const onClick = data ? () => stateService.gotoJob(data.id) : undefined;\n ToastrService.info(\n intl.formatMessage(messages.GenerateDocumentsQueued),\n undefined,\n onClick,\n );\n })\n .catch(error => {\n handleHttpError(intl)(error);\n });\n };\n executeBatchActionResetDeadline = batchActionParameters => {\n if (this.isGlobalActionsDisabled()) return Promise.reject(new Error('invalid'));\n\n const { intl, stateService } = this.props;\n\n const model = this.createBatchActionModel(batchActionParameters);\n const endpoint = `${config.appUrls.tasks}/api/Overview/BatchResetDeadlines`;\n\n return api.base\n .post(endpoint, model)\n .then(({ data }) => {\n this.setState({\n showResetDeadlineModal: false,\n });\n const onClick = data ? () => stateService.gotoJob(data.id) : undefined;\n ToastrService.info(\n intl.formatMessage(messages.UpdateTaskDeadlineQueued),\n undefined,\n onClick,\n );\n })\n .catch(error => {\n handleHttpError(intl)(error);\n });\n };\n executeBatchActionChangeTags = batchActionParameters => {\n if (this.isGlobalActionsDisabled()) return Promise.reject(new Error('invalid'));\n\n const { intl, stateService } = this.props;\n\n const model = { ...batchActionParameters, ...this.createBatchActionModel() };\n const endpoint = `${config.appUrls.tasks}/api/Overview/BatchChangeTags`;\n\n return api.base\n .post(endpoint, model)\n .then(({ data }) => {\n this.setState({\n showChangeTagsModal: false,\n });\n const onClick = data ? () => stateService.gotoJob(data.id) : undefined;\n ToastrService.info(intl.formatMessage(messages.BackgroundJobQueued), undefined, onClick);\n })\n .catch(error => {\n handleHttpError(intl)(error);\n });\n };\n\n createReport = () => {\n const { intl } = this.props;\n const { currentSearchParams, items, allTasksSelected, displayMode } = this.state;\n\n const filter = currentSearchParams.filter || {};\n const subTaskFilters = Object.keys(filter)\n .filter(key => key.startsWith('subtask_'))\n .reduce(\n (obj, key) => ({\n ...obj,\n [key.substr(8)]: filter[key].items,\n }),\n {},\n );\n const parameterFilters = Object.keys(filter)\n .filter(key => key.startsWith('parameter_'))\n .reduce(\n (obj, key) => ({\n ...obj,\n [key.substr(10)]: filter[key].items,\n }),\n {},\n );\n const mainStatus = (filter && filter.mainStatus && filter.mainStatus.items) || null;\n\n const filterParams = {\n ...currentSearchParams.taskFilters,\n statusFilters: subTaskFilters,\n parameterFilters,\n mainStatus,\n\n page: currentSearchParams.page,\n take: currentSearchParams.pageSize,\n sort: currentSearchParams.sortKey,\n desc: currentSearchParams.desc,\n };\n\n const model = {\n ...filterParams,\n selectAll: allTasksSelected,\n selectedTasks: items ? items.filter(x => x.selected !== allTasksSelected).map(x => x.id) : [],\n };\n\n const culture = intl.locale;\n const mappedDisplayMode =\n displayMode == 'status'\n ? 1\n : displayMode == 'dateDone'\n ? 2\n : displayMode == 'deadline'\n ? 3\n : 1;\n const endpoint = `${\n config.appUrls.tasks\n }/api/overview/export?displayMode=${mappedDisplayMode}&culture=${culture}&connectionId=${SignalRService.getConnectionId()}`;\n this.setState(state => ({\n ...state,\n creatingReport: true,\n }));\n\n return api.base\n .post(endpoint, model)\n .then(result => {\n ToastrService.info(intl.formatMessage(messages.ExportToExcelStarted));\n this.setState(state => ({\n ...state,\n creatingReport: false,\n }));\n })\n .catch(error => {\n this.setState(state => ({\n ...state,\n creatingReport: false,\n }));\n handleHttpError(intl)(error);\n });\n };\n\n onShowTaskDetails = taskId => {\n this.setState(state => ({\n ...state,\n activeTask: { id: taskId },\n showTaskDetailsModal: true,\n }));\n };\n\n onTaskDetailsClosed = () => {\n this.setState({\n showTaskDetailsModal: false,\n });\n };\n\n onTaskDetailModalClosed = updatedTasks => {\n if (updatedTasks && updatedTasks.length) {\n this.setState(\n state => ({\n ...state,\n showTaskDetailsModal: false,\n }),\n () => updatedTasks.map(task => this.taskUpdatedEventHandler(task)),\n );\n } else {\n this.setState({ showTaskDetailsModal: false });\n }\n };\n\n onAddRegistrationClick = task => {\n this.setState(state => ({\n ...state,\n activeTask: task,\n showRegistrationModal: true,\n }));\n };\n\n onRegistrationCreated = () => {\n this.setState({\n showRegistrationModal: false,\n activeTask: null,\n });\n };\n\n handleTaskStatusChanged = (newStatus, oldStatus) => {\n if (!newStatus.id) return;\n if (JSON.stringify(newStatus) === JSON.stringify(oldStatus)) return;\n\n return this.changeStatus({ ...newStatus });\n };\n\n updateTask = task => {\n const { intl } = this.props;\n return api.base.put(`${config.appUrls.tasks}/api/plannedTasks`, task).then(\n ({ data }) => {\n ToastrService.changesSaved(intl);\n this.handleTasksUpdated([data]);\n return data;\n },\n error => {\n handleHttpError(intl)(error);\n },\n );\n };\n updateDeadline = task => {\n const { intl } = this.props;\n\n const deadline = task.deadline ? task.deadline.format('YYYY-MM-DD') : '';\n return api.base\n .put(`${config.appUrls.tasks}/api/plannedTasks/deadline/${task.id}/${deadline}`, task)\n .then(\n ({ data }) => {\n ToastrService.changesSaved(intl);\n this.handleTasksUpdated([data]);\n return data;\n },\n error => {\n handleHttpError(intl)(error);\n },\n );\n };\n handleTasksUpdated = updatedTasks => {\n if (!updatedTasks || !updatedTasks.length) return;\n this.setState(({ items }) => {\n let updatedItems = [...items];\n updatedTasks.forEach(task => {\n if (task.taskLevel === 0) {\n updatedItems = updatedItems.map(x => {\n if (x.id === task.id) {\n const updatedRow = mapParent(x, task);\n if (task.children && task.children.length) {\n updatedRow.columns = {\n ...task.children.reduce((columns, subtask) => {\n // eslint-disable-next-line no-param-reassign\n columns[subtask.templateId] = mapChild(columns[subtask.templateId], subtask);\n return columns;\n }, updatedRow.columns || {}),\n };\n }\n return updatedRow;\n }\n\n // update schedule remark for other task (same relation) if present in this view (yes they could have been made by a different schedule ID but the chance is very low)\n if (x.id !== task.id && x.relation?.id === task.relationId && x.scheduleId)\n return {\n ...x,\n scheduleHasRemark: task.scheduleHasRemark,\n scheduleRemark: task.scheduleRemark,\n };\n\n return x;\n });\n } else if (task.taskLevel === 1) {\n const index = updatedItems.findIndex(x => x.id === task.parentId);\n if (index < 0) return; // Task not on screen, skipping\n const updatedRow = mapParent(updatedItems[index], task.parent);\n updatedRow.columns = {\n ...updatedRow.columns,\n [task.templateId]: mapChild(updatedRow.columns[task.templateId], task),\n };\n updatedItems[index] = updatedRow;\n }\n });\n\n return { items: updatedItems };\n });\n };\n\n changeStatus = params => {\n const { intl } = this.props;\n return api.base.put(`${config.appUrls.tasks}/api/Overview/UpdateStatus`, params).then(\n ({ data }) => {\n this.setState(state => ({\n items: state.items.map(row => {\n if (row.id !== data.id) return row;\n\n return {\n ...row,\n ...data,\n parameterValues: row.parameterValues,\n };\n }),\n }));\n return data;\n },\n error => {\n handleHttpError(intl)(error);\n },\n );\n };\n\n templateChanged = event => {\n const taskId = event.target.value;\n const {\n initialSearchParams: { taskFilters = {} },\n } = this.state;\n this.filtersChanged({ ...taskFilters, taskId, periodicityId: '' });\n };\n\n createAuthorizationReport = () => {\n const { intl } = this.props;\n const { currentSearchParams, items, allTasksSelected } = this.state;\n\n const filter = currentSearchParams.filter || {};\n const subTaskFilters = Object.keys(filter)\n .filter(key => key.startsWith('subtask_'))\n .reduce(\n (obj, key) => ({\n ...obj,\n [key.substr(8)]: filter[key].items,\n }),\n {},\n );\n const parameterFilters = Object.keys(filter)\n .filter(key => key.startsWith('parameter_'))\n .reduce(\n (obj, key) => ({\n ...obj,\n [key.substr(10)]: filter[key].items,\n }),\n {},\n );\n const mainStatus = (filter && filter.mainStatus && filter.mainStatus.items) || null;\n\n const filterParams = {\n ...currentSearchParams.taskFilters,\n statusFilters: subTaskFilters,\n parameterFilters,\n mainStatus,\n\n page: currentSearchParams.page,\n take: currentSearchParams.pageSize,\n sort: currentSearchParams.sortKey,\n desc: currentSearchParams.desc,\n };\n\n const model = {\n ...filterParams,\n selectAll: allTasksSelected,\n selectedTasks: items ? items.filter(x => x.selected !== allTasksSelected).map(x => x.id) : [],\n };\n\n const culture = intl.locale;\n\n const endpoint = `${\n config.appUrls.tasks\n }/api/overview/export/authorizations?culture=${culture}&connectionId=${SignalRService.getConnectionId()}`;\n this.setState({\n creatingAuthorizationReport: true,\n });\n\n return api.base\n .post(endpoint, model)\n .then(result => {\n ToastrService.info(intl.formatMessage(messages.ExportToExcelStarted));\n this.setState({ creatingAuthorizationReport: false });\n })\n .catch(error => {\n this.setState({ creatingAuthorizationReport: false });\n handleHttpError(intl)(error);\n });\n };\n\n renderRow = item => {\n const { intl } = this.props;\n const { columns, initialSearchParams, displayMode, parameterDefinitions } = this.state;\n\n return (\n this.setState({ showShareItemModal: true, activeTask: item })}\n onUpdateDeadline={this.updateDeadline}\n onSendSignatureRequest={this.onSendSignatureRequest}\n />\n );\n };\n\n onRequestDeleteTask = task => {\n this.setState(state => ({\n ...state,\n activeTask: task,\n showDeleteTaskModal: true,\n }));\n };\n\n deleteTask = () => {\n const { activeTask, items } = this.state;\n const { intl } = this.props;\n\n const endpoint = `${config.appUrls.tasks}/api/PlannedTasks/${activeTask.id}`;\n return api.base\n .delete(endpoint, { params: { taskLevel: activeTask.taskLevel } })\n .then(() => {\n ToastrService.success(intl.formatMessage(messages.TaskDeleted));\n\n let itemsCopy = items;\n itemsCopy = items.filter(task => task.id !== activeTask.id);\n\n this.setState(state => ({\n ...state,\n showDeleteTaskModal: false,\n items: [...itemsCopy],\n }));\n })\n .catch(error => {\n this.setState(state => ({\n ...state,\n showDeleteTaskModal: false,\n }));\n handleHttpError(intl)(error);\n });\n };\n\n onUpdateParameter = parameter => {\n const { intl } = this.props;\n\n if (!!parameter.computedParameterType) {\n parameter.computedParameterModifiedByUser = true;\n }\n const endpoint = `${config.appUrls.tasks}/api/plannedTasks/UpdateParameters`;\n const task = this.state.items.find(x => x.id === parameter.plannedTaskId);\n const parameterValues = task.parameterValues.map(pv => pv.id === parameter.id ? parameter : pv);\n\n return api.base\n .post(endpoint, Object.assign(task, {parameterValues}))\n .then(({ data }) => {\n this.setState(state => ({\n items: state.items.map(task => {\n if (task.id !== parameter.plannedTaskId) return task;\n const parameterValues = task.parameterValues\n .map(pv => pv.id === parameter.id ? parameter : pv.computedParameterModifiedByUser ? pv : data.filter(x => pv.id === x.id)[0] || pv)\n .map(pv => mapParameterValues(pv));\n return { ...task, parameterValues };\n })\n }));\n })\n .catch(error => {\n this.setState(state => ({\n ...state,\n }));\n handleHttpError(intl)(error);\n });\n };\n\n openSendEmailModal = () => {\n const { intl } = this.props;\n this.getSelectedRelationLanguages()\n .then(languages => {\n this.setState({\n showSendMailModal: true,\n languages,\n });\n })\n .catch(error => {\n handleHttpError(intl)(error);\n });\n };\n\n openGenerateDocumentsModal = () => {\n const { intl } = this.props;\n this.getSelectedRelationLanguages()\n .then(languages => {\n this.setState({\n showGenerateDocumentsModal: true,\n languages,\n });\n })\n .catch(error => {\n handleHttpError(intl)(error);\n });\n };\n openChangeSubtaskStatusModal = () => {\n const { intl } = this.props;\n this.getSelectedRelationLanguages()\n .then(languages => {\n this.setState({\n showChangeTaskStatusModal: true,\n languages,\n });\n })\n .catch(error => {\n handleHttpError(intl)(error);\n });\n };\n\n getSelectedRelationLanguages = () => {\n const { allTasksSelected, items } = this.state;\n return new Promise((resolve, reject) => {\n if (allTasksSelected) {\n const { currentSearchParams } = this.state;\n\n const filter = currentSearchParams.filter || {};\n const subTaskFilters = Object.keys(filter)\n .filter(key => key.startsWith('subtask_'))\n .reduce(\n (obj, key) => ({\n ...obj,\n [key.substr(8)]: filter[key].items,\n }),\n {},\n );\n const parameterFilters = Object.keys(filter)\n .filter(key => key.startsWith('parameter_'))\n .reduce(\n (obj, key) => ({\n ...obj,\n [key.substr(10)]: filter[key].items,\n }),\n {},\n );\n const mainStatus = (filter && filter.mainStatus && filter.mainStatus.items) || null;\n\n const filterParams = {\n ...currentSearchParams.taskFilters,\n statusFilters: subTaskFilters,\n parameterFilters,\n mainStatus,\n };\n\n api.base\n .post(`${config.appUrls.tasks}/api/overview/OverviewLanguages`, filterParams)\n .then(({ data }) => {\n resolve(data);\n })\n .catch(error => {\n reject(error);\n });\n } else {\n const languages = [\n ...new Set(items.filter(x => x.selected).map(x => x.relation.languageCode)),\n ]; // This makes sure it is a distinct list of language codes\n resolve(languages);\n }\n });\n };\n\n createParameterFilterObject = definition => {\n const { intl } = this.props;\n\n if (definition.parameterValueType === 4) {\n const selectionItemsArray = definition.selectionItems\n ? definition.selectionItems.split(';')\n : [];\n\n return {\n type: 'items',\n key: `parameter_${definition.id}`,\n items: ['select_$NOTFILLEDOUT$', ...selectionItemsArray.map(x => `select_${x}`)],\n renderItem: item =>\n item.split('_')[1] === '$NOTFILLEDOUT$'\n ? intl.formatMessage(messages.NotFilledOut)\n : item.split('_')[1],\n };\n }\n if (definition.parameterValueType === 5) {\n return {\n type: 'user',\n key: `parameter_${definition.id}`,\n };\n }\n return {\n type: 'items',\n key: `parameter_${definition.id}`,\n items: [`bool_${true}`, `bool_${false}`],\n renderItem: item =>\n new RegExp('true').test(item.split('_')[1]) === true\n ? intl.formatMessage(messages.FilledOut)\n : intl.formatMessage(messages.NotFilledOut),\n };\n };\n\n onSendSignatureRequest = task =>\n api.base.get(`${config.appUrls.tasks}/api/plannedtasks/ChildTaskIds/${task.id}`).then(\n ({ data }) => {\n this.setState({ taskIds: [task.id, ...data] }, () => {\n const { taskIds } = this.state;\n return this.retrieveTaskAttachments(taskIds);\n });\n },\n () => this.retrieveTaskAttachments([task.id]),\n );\n\n retrieveTaskAttachments = taskIds => {\n const { intl } = this.props;\n const linkedDocumentsPromise = api.base.post(\n `${config.appUrls.documents}/api/documents/DocumentLinks`,\n taskIds,\n );\n\n return Promise.all([linkedDocumentsPromise]).then(\n ([{ data: attachments }]) => {\n const signableDocuments = attachments.filter(x => x.canBeSigned);\n if (!signableDocuments || signableDocuments.length === 0) {\n ToastrService.error(intl.formatMessage(messages.NoSignableDocumentsLinkedToTask));\n } else {\n this.setState({\n showSelectDocumentsModal: true,\n signableDocuments,\n });\n }\n },\n error => {\n handleHttpError(intl)(error);\n },\n );\n };\n\n openSendSignatureRequestModal = documents => {\n this.setState({ showSelectDocumentsModal: false });\n const selectedDocuments = documents.filter(x => x.selected);\n if (!selectedDocuments || selectedDocuments.length === 0) return;\n\n this.setState({ activeDocuments: selectedDocuments, showSignatureRequestModal: true });\n };\n\n documentationPopover = documentation => {\n const sanitized = sanitizer.sanitize(documentation);\n return (\n \n
    \n \n );\n };\n\n buildColumnTitle(col) {\n return (\n \n {formatListValue({\n id: col.id,\n list: 'tasktemplate',\n fallback: col.name,\n intl: this.props.intl,\n })}\n {col.documentation && (\n \n \n \n \n \n )}\n \n );\n }\n\n buildTitle() {\n const { taskTemplateId, taskTemplateName, taskTemplateDocumentation } = this.state;\n if (!taskTemplateId) return this.props.intl.formatMessage(messages.TaskOverview);\n return (\n \n {this.props.intl.formatMessage(messages.TaskOverview)}\n {!!taskTemplateId && ' - '}\n {!!taskTemplateId &&\n this.props.intl.formatMessage(\n listItemMsg('tasktemplate', taskTemplateId, taskTemplateName),\n )}\n {!!taskTemplateDocumentation && (\n \n \n \n \n \n )}\n \n );\n }\n\n render() {\n const canEdit = authService.hasPermission({\n functionality: 'PlannedTask',\n privilege: 'Update',\n });\n const { intl } = this.props;\n const {\n initialSearchParams,\n currentSearchParams,\n items,\n columns,\n templates,\n displayMode,\n allTasksSelected,\n showChangeTaskStatusModal,\n showChangeTaskDeadlineModal,\n showChangeSubtaskDeadlineModal,\n showResetDeadlineModal,\n creatingReport,\n showNewRegistrationModal,\n activeTask,\n showTaskDetailsModal,\n showRegistrationModal,\n showChangeMainTaskStatusModal,\n showSendMailModal,\n showDeleteTaskModal,\n defaultResourceId,\n parameterDefinitions,\n languages,\n creatingAuthorizationReport,\n showBatchDeleteTaskModal,\n showShareItemModal,\n showGenerateDocumentsModal,\n showChangeTagsModal,\n showSelectDocumentsModal,\n signableDocuments,\n showSignatureRequestModal,\n activeDocuments,\n } = this.state;\n\n const { filter: columnFilters = {} } = currentSearchParams || initialSearchParams || {};\n const hasData = items && items.length > 0;\n\n const showAssignments = hasAssignments();\n\n return (\n
    \n {showSignatureRequestModal && (\n \n this.setState({\n showSignatureRequestModal: false,\n })\n }\n onClose={() =>\n this.setState({ showSignatureRequestModal: false, activeDocument: undefined })\n }\n />\n )}\n {showSelectDocumentsModal && (\n ({ ...x, label: x.name }))}\n onSave={this.openSendSignatureRequestModal}\n onClose={() => this.setState({ showSelectDocumentsModal: false })}\n show={showSelectDocumentsModal}\n sortByLabel={false}\n />\n )}\n {showDeleteTaskModal && (\n \n this.setState(state => ({\n ...state,\n showDeleteTaskModal: false,\n activeTask: undefined,\n }))\n }\n onSave={this.deleteTask}\n />\n )}\n {showBatchDeleteTaskModal && (\n \n this.setState(state => ({\n ...state,\n showBatchDeleteTaskModal: false,\n }))\n }\n onSave={this.executeBatchActionDeleteTask}\n />\n )}\n {showTaskDetailsModal && (\n \n )}\n\n {showRegistrationModal && (\n \n this.setState({\n activeTask: null,\n showRegistrationModal: false,\n })\n }\n disabled={!canEdit}\n />\n )}\n {showChangeTaskStatusModal && (\n \n this.setState(state => ({\n ...state,\n showChangeTaskStatusModal: false,\n }))\n }\n onSave={this.executeBatchActionTaskStatus}\n />\n )}\n {showChangeMainTaskStatusModal && (\n \n this.setState(state => ({\n ...state,\n showChangeMainTaskStatusModal: false,\n }))\n }\n onSave={this.executeBatchActionChangeField}\n />\n )}\n {showChangeTaskDeadlineModal && (\n \n this.setState(state => ({\n ...state,\n showChangeTaskDeadlineModal: false,\n }))\n }\n onSave={this.executeBatchActionChangeField}\n />\n )}\n {showChangeSubtaskDeadlineModal && (\n \n this.setState(state => ({\n ...state,\n showChangeSubtaskDeadlineModal: false,\n }))\n }\n onSave={this.executeBatchActionSubtaskDeadline}\n />\n )}\n {showNewRegistrationModal && (\n \n this.setState(state => ({\n ...state,\n showNewRegistrationModal: false,\n }))\n }\n defaultResourceId={defaultResourceId}\n onSave={this.executeBatchActionTaskRegistration}\n countSelectedRelations={this.getCountSelectedTasks()} // in this screen, the number of selected tasks equals the number of relations\n />\n )}\n {showSendMailModal && (\n \n this.setState(state => ({\n ...state,\n showSendMailModal: false,\n }))\n }\n onSave={this.executeBatchActionSendTaskRelationMail}\n />\n )}\n {showGenerateDocumentsModal && (\n \n this.setState(state => ({\n ...state,\n showGenerateDocumentsModal: false,\n }))\n }\n onSave={this.executeBatchActionGenerateDocuments}\n />\n )}\n {showResetDeadlineModal && (\n \n this.setState(state => ({\n ...state,\n showResetDeadlineModal: false,\n }))\n }\n onSave={this.executeBatchActionResetDeadline}\n />\n )}\n {showShareItemModal && (\n this.setState({ showShareItemModal: false })}\n />\n )}\n {showChangeTagsModal && (\n this.setState({ showChangeTagsModal: false })}\n addTags={showChangeTagsModal.addTags}\n subtasks={columns}\n intl={intl}\n />\n )}\n
    \n \n {templates && (\n this.filtersChanged(filters)}\n displayMode={displayMode}\n displayModeChanged={this.displayModeChanged}\n countSelectedTasks={this.getCountSelectedTasksFormatted()}\n templates={templates}\n columnFilters={columnFilters}\n />\n )}\n \n\n
    \n
    \n this.createReport()}\n disabled={!hasData || creatingReport}\n >\n \n \n \n {intl.formatMessage(messages.ExportToExcel)}\n \n \n \n {creatingAuthorizationReport && }\n {!creatingAuthorizationReport && }\n \n {intl.formatMessage(messages.ExportAuthorizations)}\n \n \n this.setState({\n showChangeMainTaskStatusModal: true,\n })\n }\n onChangeTaskStatus={this.openChangeSubtaskStatusModal}\n onChangeTaskDeadline={() =>\n this.setState({\n showChangeTaskDeadlineModal: true,\n })\n }\n onChangeSubtaskDeadline={() =>\n this.setState({\n showChangeSubtaskDeadlineModal: true,\n })\n }\n onNewRegistration={() =>\n this.setState({\n showNewRegistrationModal: true,\n })\n }\n onSendEmail={this.openSendEmailModal}\n onCreateReport={this.createReport}\n onDeleteTask={() =>\n this.setState({\n showBatchDeleteTaskModal: true,\n })\n }\n onGenerateDocuments={this.openGenerateDocumentsModal}\n onResetDeadline={() =>\n this.setState({\n showResetDeadlineModal: true,\n })\n }\n onAddTaskTags={() => {\n this.setState({\n showChangeTagsModal: { addTags: true },\n });\n }}\n onRemoveTaskTags={() => {\n this.setState({\n showChangeTagsModal: { addTags: false },\n });\n }}\n disabled={this.isGlobalActionsDisabled() || !canEdit}\n />\n
    \n
    \n
    \n {!initialSearchParams.taskFilters.taskId ? (\n
    \n
    \n
    \n
    \n

    \n \n

    \n

    \n \n {templates && (\n \n {!initialSearchParams.taskFilters.taskId && (\n \n )}\n {templates.map(template => (\n \n ))}\n \n )}\n

    \n
    \n
    \n
    \n
    \n ) : (\n this.renderRow(item)}\n noDataLabel={}\n >\n \n )\n }\n />\n \n {showAssignments ? (\n \n ) : null}\n formatListValue({ id: item, list: 'extendedtaskstatus', intl }),\n }}\n />\n\n {authService.hasFeature('referenceYear') ? (\n \n ) : null}\n\n \n\n {parameterDefinitions &&\n parameterDefinitions.map(definition => (\n \n ))}\n\n {columns &&\n columns.map(col => (\n \n formatListValue({ id: item, list: 'extendedtaskstatus', intl }),\n }}\n />\n ))}\n \n \n )}\n
    \n );\n }\n}\n\nexport default showWhenPermission(\n functionalities.PlannedTask,\n privileges.Read,\n)(injectStateService(injectIntl(TaskOverviewContainer)));\n","import React, { Component } from 'react';\nimport { isEqual } from 'lodash';\n\nimport RegistrationComponent from './RegistrationComponent';\nimport ResourceTypeRadioButtons from './partials/ResourceTypeRadioButtons';\nimport { createEmptyRegistration, executeAction, isRegistrationValid } from './registrationHelpers';\nimport guid from '../../utils/guid';\n\nexport default class RegistrationFormTestContainer extends Component {\n state = {\n registration: createEmptyRegistration({\n type: 0,\n }),\n disabled: false,\n showValidation: false,\n };\n doAction = (action, value) => {\n this.setState(({ registration }) => {\n const newValue = executeAction(registration, action, value);\n if (isEqual(newValue, registration)) return {};\n return { registration: newValue };\n });\n };\n\n render() {\n const { registration, disabled, showValidation } = this.state;\n return (\n
    \n \n this.setState(({ registration: reg }) => ({ registration: { ...reg, type: value } }))\n }\n />\n \n \n \n
    IsValid? {isRegistrationValid(registration, {}) ? 'Valid' : 'Invalid'}
    \n
     {JSON.stringify(registration, null, '  ')}
    \n
    \n );\n }\n}\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport config from '@/config';\nimport api from '@/shared/api';\nimport { useQuery, useQueryClient } from '@tanstack/react-query';\nimport { useIntl } from 'react-intl';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport { useEffect } from 'react';\nimport moment from 'moment';\nimport { IntraCompanyQueryKey } from './queryKey';\nexport var useGetIntraCompanyOverview = function (filters) {\n var intl = useIntl();\n var queryClient = useQueryClient();\n // const [data,setData]=useState();\n var _a = useQuery([IntraCompanyQueryKey.Overview], function (_a) {\n var signal = _a.signal;\n return api.base\n .get(\"\".concat(config.appUrls.api, \"/api/IntraCompany\"), {\n params: __assign(__assign({}, filters), { dateFrom: filters.dateFrom ? moment(filters.dateFrom).toISOString() : null, dateUntil: filters.dateFrom ? moment(filters.dateUntil).toISOString() : null }),\n signal: signal,\n })\n .then(function (res) {\n var _a;\n return (_a = res.data) === null || _a === void 0 ? void 0 : _a.map(function (x) {\n return (__assign(__assign({}, x), { key: \"\".concat(x.relationCompanyId, \";\").concat(x.userCompanyId) }));\n });\n });\n }, {\n enabled: true,\n onError: function (apiError) {\n handleHttpError(intl)(apiError);\n },\n retry: false,\n }), data = _a.data, isLoading = _a.isLoading, error = _a.error, refetch = _a.refetch;\n var reload = function () {\n if (isLoading) {\n var queryKey = [IntraCompanyQueryKey.Overview];\n queryClient.cancelQueries(queryKey);\n queryClient.invalidateQueries({ queryKey: queryKey });\n }\n return refetch();\n };\n // Reload if filters change\n useEffect(function () {\n reload();\n }, [filters]);\n return {\n data: data,\n error: error,\n isLoading: isLoading,\n reload: reload,\n };\n};\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport { useState } from 'react';\nimport dateFormatService from '@/shared/services/DateFormatService';\nimport RelationName from '@/shared/components/RelationName';\nimport { hasAssignments } from '@/shared/components/security/HasAssignments';\nimport { mapInvoiceStreamName } from '@/shared/services/ObjectDisplayService';\nimport FormattedListValue from '@/shared/components/FormattedListValue';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport classNames from 'classnames';\nimport FormattedCurrency from '@/shared/components/FormattedCurrency';\nimport { hoursToTimeSpan } from '@/shared/utils/adminpulse';\nimport { CanCreate, CanUpdate } from '@/shared/components/security';\nimport Button from '@/shared/components/Button';\nimport messages from './messages';\nimport useToggleIntraCompanyBilling from './hooks/useToggleIntraCompanyBilling';\nimport useBillRegistration from './hooks/useBillRegistration';\nvar pageSize = 100;\nvar IntraCompanyDetails = function (_a) {\n var registrations = _a.registrations, billingDisabled = _a.billingDisabled, intl = _a.intl;\n var _b = useState(1), page = _b[0], setPage = _b[1];\n var toggleIntraCompanyBilling = useToggleIntraCompanyBilling().toggleIntraCompanyBilling;\n var billRegistration = useBillRegistration().billRegistration;\n var showMore = function () { return setPage(function (p) { return p + 1; }); };\n var pagedRegistrations = registrations.slice(0, page * pageSize);\n var hasMore = page * pageSize < registrations.length;\n var assignmentsEnabled = !!hasAssignments();\n return (_jsxs(\"table\", __assign({ className: \"table subtable\" }, { children: [_jsx(\"thead\", { children: _jsxs(\"tr\", { children: [_jsx(\"th\", { children: intl.formatMessage(messages.Date) }), _jsx(\"th\", { children: intl.formatMessage(messages.User) }), _jsx(\"th\", { children: intl.formatMessage(messages.Relation) }), assignmentsEnabled && _jsx(\"th\", { children: intl.formatMessage(messages.Assignment) }), _jsx(\"th\", { children: intl.formatMessage(messages.Resource) }), _jsx(\"th\", __assign({ className: \"text-right\" }, { children: intl.formatMessage(messages.OriginalQuantity) })), _jsx(\"th\", __assign({ className: \"text-right\" }, { children: intl.formatMessage(messages.BilledQuantity) })), _jsx(\"th\", __assign({ className: \"text-right\" }, { children: intl.formatMessage(messages.BilledAmount) })), _jsx(\"th\", __assign({ className: \"text-right\" }, { children: intl.formatMessage(messages.IntraCompanyUnitPrice) })), _jsx(\"th\", __assign({ className: \"text-right\" }, { children: intl.formatMessage(messages.IntraCompanyAmount) })), _jsx(\"th\", __assign({ className: \"text-center\" }, { children: intl.formatMessage(messages.InForfait) })), _jsx(\"th\", {})] }) }), _jsxs(\"tbody\", { children: [pagedRegistrations.map(function (row) {\n var _a, _b, _c;\n return (_jsxs(\"tr\", { children: [_jsx(\"td\", { children: dateFormatService.formatDate(row.registrationDate) }), _jsx(\"td\", { children: DataCacheService.getUserName(row.userId) }), _jsx(\"td\", { children: _jsx(RelationName, { relation: row.relation }) }), assignmentsEnabled && _jsx(\"td\", { children: mapInvoiceStreamName(row.invoiceStream, intl) }), _jsx(\"td\", { children: _jsx(FormattedListValue, { list: \"resource\", id: row.resourceId, fallback: row.resourceName }) }), _jsx(\"td\", __assign({ className: \"text-right\" }, { children: row.resourceType === 0\n ? hoursToTimeSpan(row.originalQuantity)\n : row.originalQuantity })), _jsx(\"td\", __assign({ className: \"text-right\" }, { children: row.resourceType === 0 ? hoursToTimeSpan(row.billedQuantity) : row.billedQuantity })), _jsx(\"td\", __assign({ className: \"text-right\" }, { children: _jsx(FormattedCurrency, { value: (_a = row.billedAmount) !== null && _a !== void 0 ? _a : 0 }) })), _jsx(\"td\", __assign({ className: \"text-right\" }, { children: _jsx(FormattedCurrency, { value: (_b = row.intraCompanyUnitPrice) !== null && _b !== void 0 ? _b : 0 }) })), _jsx(\"td\", __assign({ className: \"text-right\" }, { children: _jsx(FormattedCurrency, { value: (_c = row.intraCompanyAmount) !== null && _c !== void 0 ? _c : 0 }) })), _jsx(\"td\", __assign({ className: \"text-center\" }, { children: row.inForfait !== null && (_jsx(\"i\", { className: classNames('fa fa-fw', {\n 'fa-check-square-o': row.inForfait,\n 'fa-square-o': !row.inForfait,\n }) })) })), _jsx(\"td\", { children: _jsxs(\"div\", __assign({ className: \"flex-row-nowrap\" }, { children: [_jsx(CanUpdate, __assign({ on: \"IntraCompanyInvoice\" }, { children: _jsx(Button, __assign({ title: intl.formatMessage(row.noIntraCompanyBilling ? messages.Undo : messages.NeverInvoiceRegistration), className: \"btn btn-icon btn-sm\", onClick: function (e) {\n e.stopPropagation();\n return toggleIntraCompanyBilling(row);\n } }, { children: !row.noIntraCompanyBilling ? (_jsxs(_Fragment, { children: [_jsx(\"i\", { className: \"fa fa-pencil-square-o\" }), _jsx(\"i\", { className: \"fa fa-times\" })] })) : (_jsx(\"i\", { className: \"fa fa-undo\" })) })) })), !row.noIntraCompanyBilling && (_jsx(CanCreate, __assign({ on: \"IntraCompanyInvoice\" }, { children: _jsxs(Button, __assign({ title: intl.formatMessage(messages.AddToIntraCompanyInvoice), className: \"btn btn-icon btn-sm\", disabled: billingDisabled, onClick: function (e) {\n e.stopPropagation();\n return billRegistration(row);\n } }, { children: [_jsx(\"i\", { className: \"fa fa-money\" }), _jsx(\"i\", { className: \"fa fa-arrow-right\" })] })) })))] })) })] }, row.registrationId));\n }), hasMore && (_jsx(\"tr\", { children: _jsx(\"td\", __assign({ colSpan: 3 }, { children: _jsx(\"a\", __assign({ onClick: showMore }, { children: intl.formatMessage(messages.ShowMore) })) })) }))] })] })));\n};\nexport default IntraCompanyDetails;\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport Toggle from 'react-toggle';\nimport { FormattedMessage } from 'react-intl';\nimport CompanyMultiSelect from '@/shared/components/input/multiselect/CompanyMultiSelect';\nimport UserSearch from '@/shared/components/input/UserSearch';\nimport RelationSearch from '@/shared/components/input/RelationSearch';\nimport AssignmentTemplateSelector from '@/shared/components/input/AssignmentTemplateSelector';\nimport DelayedDateRangePicker from '@/shared/components/input/DelayedDateRangePicker';\nimport PeriodButtonGroup, { pastToPrevMonth } from '@/shared/components/PeriodButtonGroup';\nimport { FaUndo } from 'react-icons/fa';\nimport ResourceTypeButtonGroup from '@/shared/components/ResourceTypeButtonGroup';\nimport messages from './messages';\nexport var defaultFilters = {\n dateFrom: null,\n dateUntil: null,\n relationId: null,\n assignmentTemplateId: null,\n relationCompanies: [],\n userCompanies: [],\n resourceTypes: [],\n userId: null,\n onlyInvoicedRegistrations: true,\n neverIntraCompany: false,\n period: 'all',\n billNonBillable: true,\n};\nvar IntraCompanyFilters = function (_a) {\n var filters = _a.filters, onFilterChange = _a.onFilterChange, intl = _a.intl;\n var hasFilters = JSON.stringify(filters) !== JSON.stringify(defaultFilters);\n var resetFilters = function () {\n onFilterChange(defaultFilters);\n };\n return (_jsxs(\"div\", { children: [_jsxs(\"div\", __assign({ className: \"row\" }, { children: [_jsx(\"div\", __assign({ className: \"col-md-4 margin5B\" }, { children: _jsx(CompanyMultiSelect, { selection: filters.userCompanies, placeholder: intl.formatMessage(messages.FromCompany), onChange: function (companies) { return onFilterChange({ userCompanies: companies }); } }) })), _jsx(\"div\", __assign({ className: \"col-md-4 margin5B\" }, { children: _jsx(CompanyMultiSelect, { selection: filters.relationCompanies, placeholder: intl.formatMessage(messages.ToCompany), onChange: function (companies) { return onFilterChange({ relationCompanies: companies }); } }) })), _jsx(\"div\", __assign({ className: \"col-md-4 margin5B\" }, { children: _jsx(UserSearch, { onChange: function (user) { return onFilterChange({ userId: user ? user.id : null }); }, value: filters.userId, placeholder: intl.formatMessage(messages.User) }) })), _jsx(\"div\", __assign({ className: \"col-md-4 margin5B\" }, { children: _jsx(RelationSearch, { onChange: function (rel) { return onFilterChange({ relationId: rel === null || rel === void 0 ? void 0 : rel.id }); }, initialSelectedItem: filters.relationId }) })), _jsx(\"div\", __assign({ className: \"col-md-4 margin5B\" }, { children: _jsx(AssignmentTemplateSelector, { value: filters.assignmentTemplateId, onChange: function (id) { return onFilterChange({ assignmentTemplateId: id || null }); }, showDefaultAssignment: true }) })), _jsx(\"div\", __assign({ className: \"col-md-4 margin5B\" }, { children: _jsx(ResourceTypeButtonGroup, { selectedTypes: filters.resourceTypes, allowedTypes: [0, 1, 2], onChange: function (value) { return onFilterChange({ resourceTypes: value }); } }) }))] })), _jsxs(\"div\", __assign({ className: \"row\" }, { children: [_jsx(\"div\", __assign({ className: \"col-md-3 margin5B\" }, { children: _jsx(DelayedDateRangePicker, { startDate: filters.dateFrom, startDateId: \"TaskOverviewFilterDeadlineFrom\", endDate: filters.dateUntil, endDateId: \"TaskOverviewFilterDeadlineUntil\", onDatesChange: function (_a) {\n var startDate = _a.startDate, endDate = _a.endDate;\n return onFilterChange({ dateFrom: startDate, dateUntil: endDate, period: null });\n }, block: true }) })), _jsx(\"div\", __assign({ className: \"col-md-9 margin5B\" }, { children: _jsx(PeriodButtonGroup, { dateFrom: filters.dateFrom, dateUntil: filters.dateUntil, period: filters.period, visiblePeriods: pastToPrevMonth, onChange: function (_a) {\n var dateFrom = _a.dateFrom, dateUntil = _a.dateUntil, period = _a.period;\n return onFilterChange({ dateFrom: dateFrom, dateUntil: dateUntil, period: period });\n }, className: \"margin5L\" }) }))] })), _jsxs(\"div\", __assign({ className: \"row\" }, { children: [_jsx(\"div\", __assign({ className: \"col-md-4 margin5B\" }, { children: _jsxs(\"label\", __assign({ className: \"react-toggle-wrapper margin5T\" }, { children: [_jsx(Toggle, { checked: filters.onlyInvoicedRegistrations, onChange: function (e) { return onFilterChange({ onlyInvoicedRegistrations: !!e.target.checked }); } }), _jsx(\"span\", __assign({ className: \"label-text\" }, { children: intl.formatMessage(messages.OnlyInvoicedRegistrations) }))] })) })), _jsx(\"div\", __assign({ className: \"col-md-4 margin5B\" }, { children: _jsxs(\"label\", __assign({ className: \"react-toggle-wrapper margin5T\" }, { children: [_jsx(Toggle, { checked: filters.neverIntraCompany, onChange: function (e) { return onFilterChange({ neverIntraCompany: !!e.target.checked }); } }), _jsx(\"span\", __assign({ className: \"label-text\" }, { children: intl.formatMessage(messages.ShowOnlyNeverIntraCompany) }))] })) })), _jsx(\"div\", __assign({ className: \"col-md-4 margin5B\" }, { children: _jsxs(\"label\", __assign({ className: \"react-toggle-wrapper margin5T\" }, { children: [_jsx(Toggle, { checked: filters.billNonBillable, onChange: function (e) { return onFilterChange({ billNonBillable: !!e.target.checked }); } }), _jsx(\"span\", __assign({ className: \"label-text\" }, { children: intl.formatMessage(messages.BillNonBillableRegistrations) }))] })) }))] })), _jsx(\"div\", __assign({ className: \"row\" }, { children: _jsx(\"div\", __assign({ className: \"col-md-4 margin5B\" }, { children: hasFilters && (_jsxs(\"button\", __assign({ type: \"button\", className: \"btn btn-default btn-reset\", onClick: function () { return resetFilters(); } }, { children: [_jsx(FaUndo, { className: \"react-icon\" }), \"\\u00A0\", _jsx(FormattedMessage, __assign({}, messages.ResetFilters))] }))) })) }))] }));\n};\nexport default IntraCompanyFilters;\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { OverlayTrigger, Tooltip } from 'react-bootstrap';\nimport { useStateService } from '@/shared/services/StateService';\nimport messages from './messages';\nvar NoRelationWarningIcon = function (_a) {\n var companyId = _a.companyId, intl = _a.intl;\n var stateService = useStateService();\n return (_jsx(OverlayTrigger, __assign({ placement: \"right\", overlay: _jsx(Tooltip, __assign({ id: \"NoRelationWarning\".concat(companyId) }, { children: intl.formatMessage(messages.NoRelationConfiguredInCompany) })) }, { children: _jsx(\"a\", __assign({ href: stateService.getStateUrl('settings.company', { json: { companyId: companyId } }), onClick: function () { return stateService.gotoState('settings.company', { companyId: companyId }); } }, { children: _jsx(\"i\", { className: \"fa fa-exclamation-triangle fa-fw text-danger\" }) })) })));\n};\nexport default NoRelationWarningIcon;\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport { useMemo } from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport RelationName from '@/shared/components/RelationName';\nimport classNames from 'classnames';\nimport FormattedCurrency from '@/shared/components/FormattedCurrency';\nimport Checkbox from '@/shared/components/input/Checkbox';\nimport { CanCreate, CanUpdate } from '@/shared/components/security';\nimport Button from '@/shared/components/Button';\nimport messages from './messages';\nimport IntraCompanyDetails from './IntraCompanyDetails';\nimport { calcTotalBilledAmount, calcTotalIntraCompanyAmount } from './helpers';\nimport NoRelationWarningIcon from './NoRelationWarningIcon';\nvar IntraCompanyTable = function (_a) {\n var data = _a.data, details = _a.details, onToggleDetails = _a.onToggleDetails, onBillCompany = _a.onBillCompany, onToggleIntraCompanyBilling = _a.onToggleIntraCompanyBilling, neverIntraCompany = _a.neverIntraCompany, onToggleSelected = _a.onToggleSelected, isSelected = _a.isSelected, onToggleAllSelected = _a.onToggleAllSelected;\n var allSelected = useMemo(function () { return !data.some(function (x) { return x.relation && !isSelected(x.key); }); }, [\n isSelected,\n data,\n ]);\n var intl = useIntl();\n return (_jsxs(\"table\", __assign({ className: \"table table-grid table-hover table-scrollable\" }, { children: [_jsx(\"thead\", { children: _jsxs(\"tr\", { children: [_jsx(\"th\", __assign({ className: \"sticky-header\" }, { children: _jsx(Checkbox, { onClick: function () { return onToggleAllSelected(!allSelected); }, value: allSelected }) })), _jsx(\"th\", __assign({ className: \"sticky-header\" }, { children: intl.formatMessage(messages.FromCompany) })), _jsx(\"th\", __assign({ className: \"sticky-header\" }, { children: intl.formatMessage(messages.ToCompany) })), _jsx(\"th\", __assign({ className: \"sticky-header\" }, { children: intl.formatMessage(messages.ToRelation) })), _jsx(\"th\", __assign({ className: \"sticky-header text-right\" }, { children: intl.formatMessage(messages.BilledAmount) })), _jsx(\"th\", __assign({ className: \"sticky-header text-right\" }, { children: intl.formatMessage(messages.IntraCompanyAmount) })), _jsx(\"th\", { className: \"sticky-header\" })] }) }), data.map(function (group) {\n var showDetails = !!details[group.key];\n return (_jsxs(\"tbody\", { children: [_jsxs(\"tr\", { children: [_jsxs(\"td\", __assign({ className: \"text-nowrap\" }, { children: [_jsx(Checkbox, { onClick: function () { return onToggleSelected(group.key); }, value: isSelected(group.key), disabled: !group.relation }), _jsx(\"a\", __assign({ onClick: function () { return onToggleDetails(group.key); }, className: \"caret-button\" }, { children: _jsx(\"i\", { className: classNames('fa pointer', {\n 'fa-caret-up': showDetails,\n 'fa-caret-down': !showDetails,\n }) }) }))] })), _jsx(\"td\", { children: group.userCompanyName }), _jsx(\"td\", { children: group.relationCompanyName }), _jsx(\"td\", { children: group.relation ? (_jsx(RelationName, { relation: group.relation })) : (_jsx(NoRelationWarningIcon, { companyId: group.relationCompanyId, intl: intl })) }), _jsx(\"td\", __assign({ className: \"text-right\" }, { children: _jsx(FormattedCurrency, { value: calcTotalBilledAmount(group) }) })), _jsx(\"td\", __assign({ className: \"text-right\" }, { children: _jsx(FormattedCurrency, { value: calcTotalIntraCompanyAmount(group) }) })), _jsxs(\"td\", __assign({ className: \"text-right\" }, { children: [_jsx(CanCreate, __assign({ on: \"IntraCompanyInvoice\" }, { children: !neverIntraCompany && (_jsx(Button, __assign({ showProgress: true, className: \"btn btn-inverse add-button btn-sm\", disabled: !group.relation, title: intl.formatMessage(group.relation\n ? messages.MakeInvoiceProposal\n : messages.NoRelationConfiguredInCompany), onClick: function () { return onBillCompany(group); } }, { children: _jsx(FormattedMessage, __assign({}, messages.MakeInvoiceProposal)) }))) })), _jsx(CanUpdate, __assign({ on: \"IntraCompanyInvoice\" }, { children: _jsx(Button, __assign({ showProgress: true, className: \"btn btn-icon btn-sm\", title: intl.formatMessage(neverIntraCompany ? messages.Undo : messages.NeverInvoiceRegistration), onClick: function () { return onToggleIntraCompanyBilling(group); } }, { children: neverIntraCompany ? (_jsx(\"i\", { className: \"fa fa-undo\" })) : (_jsxs(_Fragment, { children: [_jsx(\"i\", { className: \"fa fa-pencil-square-o\" }), _jsx(\"i\", { className: \"fa fa-times\" })] })) })) }))] }))] }), showDetails && (_jsxs(\"tr\", __assign({ className: \"subclasses\" }, { children: [_jsx(\"td\", {}), _jsx(\"td\", __assign({ colSpan: 6 }, { children: _jsx(\"div\", __assign({ className: \"subtable-wrapper\" }, { children: _jsx(IntraCompanyDetails, { registrations: group.registrations, intl: intl, billingDisabled: !group.relation }) })) }))] })))] }, group.key));\n })] })));\n};\nexport default IntraCompanyTable;\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport moment from 'moment';\nimport { getPeriodDateFromUntil } from '@/shared/components/PeriodButtonGroup';\nimport { defaultFilters } from './IntraCompanyFilters';\nexport var calcTotalOriginalAmount = function (group) {\n return group.registrations.reduce(function (sum, x) { var _a, _b; return sum + ((_a = x.originalQuantity) !== null && _a !== void 0 ? _a : 0) * ((_b = x.originalUnitPrice) !== null && _b !== void 0 ? _b : 0); }, 0);\n};\nexport var calcTotalBilledAmount = function (group) {\n return group.registrations.reduce(function (sum, x) { var _a, _b; return sum + ((_a = x.billedQuantity) !== null && _a !== void 0 ? _a : 0) * ((_b = x.billedUnitPrice) !== null && _b !== void 0 ? _b : 0); }, 0);\n};\nexport var calcTotalIntraCompanyAmount = function (group) {\n return group.registrations.reduce(function (sum, x) { var _a; return sum + ((_a = x.intraCompanyAmount) !== null && _a !== void 0 ? _a : 0); }, 0);\n};\nvar initPeriod = function (filters) {\n if (!filters.period)\n return filters;\n return __assign(__assign({}, filters), getPeriodDateFromUntil(filters.period));\n};\nexport var initialFilters = function (sessionFilters, stateFilters) {\n try {\n if (stateFilters) {\n var combinedFilters = __assign(__assign({}, defaultFilters), stateFilters);\n if (JSON.stringify(combinedFilters) !== JSON.stringify(defaultFilters))\n return initPeriod(combinedFilters);\n }\n if (!sessionFilters)\n return __assign({}, defaultFilters);\n if (typeof sessionFilters === 'string') {\n sessionFilters = JSON.parse(sessionFilters);\n }\n if (sessionFilters) {\n if (typeof sessionFilters.dateFrom === 'string')\n sessionFilters.dateFrom = moment.utc(sessionFilters.dateFrom);\n if (typeof sessionFilters.dateUntil === 'string')\n sessionFilters.dateUntil = moment.utc(sessionFilters.dateUntil);\n return initPeriod(__assign(__assign({}, defaultFilters), sessionFilters));\n }\n }\n catch (e) {\n console.error(e);\n return __assign({}, defaultFilters);\n }\n};\n","import React from 'react';\nimport authService, { parseFeature } from '../../services/AuthService';\n\nconst showWhenFeature = feature => {\n const f = parseFeature(feature);\n\n return WrappedComponent => ({ ...passThroughProps }) => {\n if (!authService.hasFeature(f)) return null;\n return ;\n };\n};\nexport default showWhenFeature;\n\n/* Used like this:\nexport default showWhenFeature('TaskMgmtPlus')(TaskOverviewContainer);\n*/\n","export var IntraCompanyQueryKey;\n(function (IntraCompanyQueryKey) {\n IntraCompanyQueryKey[\"Overview\"] = \"IntraCompanyOverview\";\n IntraCompanyQueryKey[\"Kpi\"] = \"IntraCompanyKpi\";\n})(IntraCompanyQueryKey || (IntraCompanyQueryKey = {}));\n","import { defineMessages } from 'react-intl';\nvar messages = defineMessages({\n FromCompany: {\n id: 'FromCompany',\n defaultMessage: 'From company',\n },\n ToCompany: {\n id: 'ToCompany',\n defaultMessage: 'To company',\n },\n ToRelation: {\n id: 'ToRelation',\n defaultMessage: 'To relation',\n },\n Relation: {\n id: 'Relation',\n defaultMessage: 'Relation',\n },\n Assignment: {\n id: 'Assignment',\n defaultMessage: 'Assignment',\n },\n Date: {\n id: 'Date',\n defaultMessage: 'Date',\n },\n User: {\n id: 'User',\n defaultMessage: 'User',\n },\n Resource: {\n id: 'Resource',\n defaultMessage: 'Resource',\n },\n OriginalQuantity: {\n id: 'OriginalQuantity',\n defaultMessage: 'Original quantity',\n },\n BilledQuantity: {\n id: 'BilledQuantity',\n defaultMessage: 'Billed quantity',\n },\n InForfait: {\n id: 'InForfait',\n defaultMessage: 'In forfait',\n },\n BilledAmount: {\n id: 'BilledAmount',\n defaultMessage: 'Billed amount',\n },\n IntraCompanyAmount: {\n id: 'IntraCompanyAmount',\n defaultMessage: 'Intra company amount',\n },\n IntraCompanyUnitPrice: {\n id: 'IntraCompanyUnitPrice',\n defaultMessage: 'Intra company unit price',\n },\n AddToIntraCompanyInvoice: {\n id: 'AddToIntraCompanyInvoice',\n defaultMessage: 'Add to intra company invoice',\n },\n MakeInvoiceProposal: {\n id: 'MakeInvoiceProposal',\n defaultMessage: 'Make invoice proposal',\n },\n MakeInvoiceProposals: {\n id: 'MakeInvoiceProposals',\n defaultMessage: 'Make invoice proposals',\n },\n IntraCompanyBilling: {\n id: 'IntraCompanyBilling',\n defaultMessage: 'Intra company billing',\n },\n OnlyInvoicedRegistrations: {\n id: 'OnlyInvoicedRegistrations',\n defaultMessage: 'Only invoiced registrations',\n },\n NeverInvoiceRegistration: {\n id: 'NeverInvoiceRegistration',\n defaultMessage: 'Never invoice registration',\n },\n Undo: {\n id: 'Undo',\n defaultMessage: 'Undo',\n },\n DoNotIntraCompanyBillRegistrationConfirm: {\n id: 'DoNotIntraCompanyBillRegistrationConfirm',\n defaultMessage: \"Are you sure you don't want to bill this registration to another own company\",\n },\n NoRelationConfiguredInCompany: {\n id: 'NoRelationConfiguredInCompany',\n defaultMessage: 'There is no relation configured on the company',\n },\n ShowOnlyNeverIntraCompany: {\n id: 'ShowOnlyNeverIntraCompany',\n defaultMessage: 'Show only never intra company registrations',\n },\n ResetFilters: {\n id: 'ResetFilters',\n defaultMessage: 'Reset filters',\n },\n ShowMore: {\n id: 'ShowMore',\n defaultMessage: 'Show more',\n },\n BillNonBillableRegistrations: {\n id: 'BillNonBillableRegistrations',\n defaultMessage: 'Make non-billable registrations billable',\n },\n BackgroundJobQueued: {\n id: 'BackgroundJobQueued',\n defaultMessage: 'A background job has started. Click here to monitor the progress.',\n },\n});\nexport default messages;\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { useQueryClient } from '@tanstack/react-query';\nimport { useCallback } from 'react';\nimport { IntraCompanyQueryKey } from './queryKey';\nvar useRemoveDetailRow = function () {\n var queryClient = useQueryClient();\n var removeDetailRow = useCallback(function (detail) {\n queryClient.setQueryData([IntraCompanyQueryKey.Overview], function (oldData) {\n return oldData.map(function (group) {\n return group.relationCompanyId === detail.relationCompanyId &&\n group.userCompanyId === detail.userCompanyId\n ? __assign(__assign({}, group), { registrations: group.registrations.filter(function (x) { return x.registrationId !== detail.registrationId; }) }) : group;\n });\n });\n }, [queryClient]);\n return { removeDetailRow: removeDetailRow };\n};\nexport default useRemoveDetailRow;\n","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport { useMutation } from '@tanstack/react-query';\nimport { ModalType, useModalContext } from '@/shared/providers/ModalProvider';\nimport config from '@/config';\nimport api from '@/shared/api';\nimport HandleHttpError from '@/shared/services/HandleHttpError';\nimport { useIntl } from 'react-intl';\nimport ToastrService from '@/shared/services/ToastrService';\nimport useRemoveDetailRow from './useRemoveDetailRow';\nimport messages from '../messages';\nvar useToggleIntraCompanyBilling = function () {\n var setShowModalInfo = useModalContext().setShowModalInfo;\n var removeDetailRow = useRemoveDetailRow().removeDetailRow;\n var intl = useIntl();\n var mutateAsync = useMutation(function (values) {\n return api.base.put(\"\".concat(config.appUrls.api, \"/api/IntraCompany/NeverIntraCompany/\").concat(values.registrationId), null, {\n params: { neverInvoice: !values.noIntraCompanyBilling },\n });\n }, {\n onSuccess: function (_, x) {\n removeDetailRow(x);\n ToastrService.success();\n },\n onError: function (e) {\n HandleHttpError(intl)(e);\n },\n }).mutateAsync;\n var toggleIntraCompanyBilling = function (reg) { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!reg.noIntraCompanyBilling) return [3 /*break*/, 2];\n // Make active again\n return [4 /*yield*/, mutateAsync(reg)];\n case 1:\n // Make active again\n _a.sent();\n return [3 /*break*/, 3];\n case 2: return [2 /*return*/, new Promise(function (resolve, reject) {\n setShowModalInfo({\n modalType: ModalType.YesNo,\n title: intl.formatMessage(messages.NeverInvoiceRegistration),\n message: intl.formatMessage(messages.DoNotIntraCompanyBillRegistrationConfirm),\n onSave: function () { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, mutateAsync(reg)];\n case 1:\n _a.sent();\n resolve();\n return [2 /*return*/];\n }\n });\n }); },\n onClose: function () { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n reject();\n return [2 /*return*/];\n });\n }); },\n });\n })];\n case 3: return [2 /*return*/];\n }\n });\n }); };\n return { toggleIntraCompanyBilling: toggleIntraCompanyBilling };\n};\nexport default useToggleIntraCompanyBilling;\n","import { useMutation } from '@tanstack/react-query';\nimport config from '@/config';\nimport api from '@/shared/api';\nimport HandleHttpError from '@/shared/services/HandleHttpError';\nimport { useIntl } from 'react-intl';\nimport ToastrService from '@/shared/services/ToastrService';\nimport useRemoveDetailRow from './useRemoveDetailRow';\nvar useBillRegistration = function () {\n var removeDetailRow = useRemoveDetailRow().removeDetailRow;\n var intl = useIntl();\n var mutateAsync = useMutation(function (values) {\n return api.base\n .post(\"\".concat(config.appUrls.api, \"/api/IntraCompany/BillRegistration/\").concat(values.registrationId))\n .then(function (_a) {\n var data = _a.data;\n return data;\n });\n }, {\n onSuccess: function (invoiceId, x) {\n if (invoiceId) {\n console.log(invoiceId);\n removeDetailRow(x);\n ToastrService.success();\n }\n },\n onError: function (e) {\n HandleHttpError(intl)(e);\n },\n }).mutateAsync;\n return { billRegistration: mutateAsync };\n};\nexport default useBillRegistration;\n","import { useMutation, useQueryClient } from '@tanstack/react-query';\nimport config from '@/config';\nimport api from '@/shared/api';\nimport HandleHttpError from '@/shared/services/HandleHttpError';\nimport { useIntl } from 'react-intl';\nimport ToastrService from '@/shared/services/ToastrService';\nimport { IntraCompanyQueryKey } from './queryKey';\nvar useBillCompany = function () {\n var queryClient = useQueryClient();\n var intl = useIntl();\n var _a = useMutation(function (values) {\n return api.base\n .post(\"\".concat(config.appUrls.api, \"/api/IntraCompany/Bill/\"), values)\n .then(function (_a) {\n var data = _a.data;\n return data;\n });\n }, {\n onSuccess: function (invoiceId) {\n if (invoiceId) {\n queryClient.invalidateQueries([IntraCompanyQueryKey.Overview]);\n console.log(invoiceId);\n ToastrService.success();\n return invoiceId;\n }\n },\n onError: function (e) {\n HandleHttpError(intl)(e);\n },\n }), mutateAsync = _a.mutateAsync, isLoading = _a.isLoading;\n return { billCompany: mutateAsync, isBillingCompany: isLoading };\n};\nexport default useBillCompany;\n","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport { useMutation, useQueryClient } from '@tanstack/react-query';\nimport { ModalType, useModalContext } from '@/shared/providers/ModalProvider';\nimport config from '@/config';\nimport api from '@/shared/api';\nimport HandleHttpError from '@/shared/services/HandleHttpError';\nimport { useIntl } from 'react-intl';\nimport ToastrService from '@/shared/services/ToastrService';\nimport messages from '../messages';\nimport { IntraCompanyQueryKey } from './queryKey';\nvar useBatchToggleIntraCompanyBilling = function () {\n var setShowModalInfo = useModalContext().setShowModalInfo;\n var queryClient = useQueryClient();\n var intl = useIntl();\n var mutateAsync = useMutation(function (values) {\n return api.base.post(\"\".concat(config.appUrls.api, \"/api/IntraCompany/NeverIntraCompany\"), values);\n }, {\n onSuccess: function () {\n queryClient.invalidateQueries([IntraCompanyQueryKey.Overview]);\n ToastrService.success();\n },\n onError: function (e) {\n HandleHttpError(intl)(e);\n },\n }).mutateAsync;\n var toggleIntraCompanyBilling = function (reg) { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!!reg.neverInvoice) return [3 /*break*/, 2];\n // Make active again\n return [4 /*yield*/, mutateAsync(reg)];\n case 1:\n // Make active again\n _a.sent();\n return [3 /*break*/, 3];\n case 2: return [2 /*return*/, new Promise(function (resolve) {\n setShowModalInfo({\n modalType: ModalType.YesNo,\n title: intl.formatMessage(messages.NeverInvoiceRegistration),\n message: intl.formatMessage(messages.DoNotIntraCompanyBillRegistrationConfirm),\n onSave: function () { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, mutateAsync(reg)];\n case 1:\n _a.sent();\n resolve();\n return [2 /*return*/];\n }\n });\n }); },\n onClose: function () { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n resolve();\n return [2 /*return*/];\n });\n }); },\n });\n })];\n case 3: return [2 /*return*/];\n }\n });\n }); };\n return { toggleIntraCompanyBilling: toggleIntraCompanyBilling };\n};\nexport default useBatchToggleIntraCompanyBilling;\n","import React from 'react';\n\n// eslint-disable-next-line\nfunction Button({ children, className, ...rest }) {\n const button = React.createRef();\n return (\n \n );\n}\n\nexport default Button;\n","import { useMutation, useQueryClient } from '@tanstack/react-query';\nimport config from '@/config';\nimport api from '@/shared/api';\nimport HandleHttpError from '@/shared/services/HandleHttpError';\nimport { useIntl } from 'react-intl';\nimport ToastrService from '@/shared/services/ToastrService';\nimport { IntraCompanyQueryKey } from './queryKey';\nimport { useStateService } from '@/shared/services/StateService';\nimport messages from '../messages';\nvar useBatchBill = function () {\n var queryClient = useQueryClient();\n var stateService = useStateService();\n var intl = useIntl();\n var _a = useMutation(function (values) {\n return api.base\n .post(\"\".concat(config.appUrls.api, \"/api/IntraCompany/BatchBill/\"), values)\n .then(function (_a) {\n var data = _a.data;\n return data;\n });\n }, {\n onSuccess: function (data) {\n if (data) {\n queryClient.invalidateQueries([IntraCompanyQueryKey.Overview]);\n var onClick = data.id ? function () { return stateService.gotoJob(data.id); } : undefined;\n ToastrService.info(intl.formatMessage(messages.BackgroundJobQueued), undefined, onClick);\n }\n },\n onError: function (e) {\n HandleHttpError(intl)(e);\n },\n }), mutateAsync = _a.mutateAsync, isLoading = _a.isLoading;\n return { batchBill: mutateAsync, batchBillRunning: isLoading };\n};\nexport default useBatchBill;\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { useCallback, useMemo, useState } from 'react';\nexport var useRowSelection = function () {\n var _a = useState({}), selected = _a[0], setSelected = _a[1];\n var hasAnySelected = useMemo(function () { return Object.keys(selected).some(function (x) { return selected[x]; }); }, [selected]);\n var isSelected = useCallback(function (id) { return !!selected[id]; }, [selected]);\n return {\n isSelected: isSelected,\n toggleSelected: function (id) { return setSelected(function (x) {\n var _a;\n return (__assign(__assign({}, x), (_a = {}, _a[id] = !x[id], _a)));\n }); },\n resetSelected: function () { return setSelected({}); },\n selected: selected,\n getSelected: function () { return Object.keys(selected).filter(function (x) { return selected[x]; }); },\n hasAnySelected: hasAnySelected,\n setSelected: setSelected,\n selectAll: function (ids) {\n return setSelected(function (old) {\n var newValue = __assign({}, old);\n ids.forEach(function (id) {\n newValue[id] = true;\n });\n return newValue;\n });\n },\n };\n};\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { useCallback, useEffect, useState } from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport LoadingContainer from '@/shared/components/loading/LoadingContainer';\nimport SimplePanel from '@/shared/components/SimplePanel';\nimport { CanCreate, showWhenPermission } from '@/shared/components/security';\nimport { features, functionalities, privileges } from '@/shared/services/AuthService';\nimport showWhenFeature from '@/shared/components/security/showWhenFeature';\nimport { useGetIntraCompanyOverview } from './hooks/useGetIntraCompanyOverview';\nimport IntraCompanyTable from './IntraCompanyTable';\nimport IntraCompanyFilters from './IntraCompanyFilters';\nimport messages from './messages';\nimport { initialFilters } from './helpers';\nimport useBillCompany from './hooks/useBillCompany';\nimport useBatchToggleIntraCompanyBilling from './hooks/useBatchToggleIntraCompanyBilling';\nimport Button from '@/shared/components/input/select/Button';\nimport useBatchBill from './hooks/useBatchBill';\nimport { useRowSelection } from '@/shared/hooks/useRowSelection';\nvar storageKey = 'IntraCompanyFilters';\nvar IntraCompanyBillingContainer = function (_a) {\n var stateService = _a.stateService;\n var intl = useIntl();\n var _b = useState(function () {\n return initialFilters(sessionStorage.getItem(storageKey), undefined);\n }), currentFilters = _b[0], setFilters = _b[1];\n var _c = useState({}), details = _c[0], setDetails = _c[1];\n var _d = useGetIntraCompanyOverview(currentFilters), data = _d.data, isLoading = _d.isLoading, reload = _d.reload;\n var billCompany = useBillCompany().billCompany;\n var _e = useBatchBill(), batchBill = _e.batchBill, batchBillRunning = _e.batchBillRunning;\n var toggleIntraCompanyBilling = useBatchToggleIntraCompanyBilling().toggleIntraCompanyBilling;\n var _f = useRowSelection(), isSelected = _f.isSelected, resetSelected = _f.resetSelected, toggleSelected = _f.toggleSelected, hasAnySelected = _f.hasAnySelected, selectAll = _f.selectAll;\n useEffect(function () {\n sessionStorage.setItem(storageKey, JSON.stringify(currentFilters));\n }, [currentFilters]);\n var onBillCompany = useCallback(function (_a) {\n var relationCompanyId = _a.relationCompanyId, userCompanyId = _a.userCompanyId;\n return __awaiter(void 0, void 0, void 0, function () {\n var result;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0: return [4 /*yield*/, billCompany({\n relationCompanyId: relationCompanyId,\n userCompanyId: userCompanyId,\n filters: currentFilters,\n })];\n case 1:\n result = _b.sent();\n if (result)\n reload();\n return [2 /*return*/];\n }\n });\n });\n }, [billCompany, currentFilters, reload]);\n var onBatchBill = useCallback(function () { return __awaiter(void 0, void 0, void 0, function () {\n var selectedLines;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n selectedLines = data\n .filter(function (x) { return isSelected(x.key); })\n .map(function (_a) {\n var relationCompanyId = _a.relationCompanyId, userCompanyId = _a.userCompanyId;\n return ({\n relationCompanyId: relationCompanyId,\n userCompanyId: userCompanyId,\n });\n });\n return [4 /*yield*/, batchBill({\n selectedLines: selectedLines,\n filters: currentFilters,\n })];\n case 1:\n _a.sent();\n return [2 /*return*/];\n }\n });\n }); }, [batchBill, currentFilters, data, isSelected]);\n var onToggleIntraCompanyBilling = useCallback(function (_a) {\n var relationCompanyId = _a.relationCompanyId, userCompanyId = _a.userCompanyId;\n return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0: return [4 /*yield*/, toggleIntraCompanyBilling({\n relationCompanyId: relationCompanyId,\n userCompanyId: userCompanyId,\n neverInvoice: !currentFilters.neverIntraCompany,\n filters: currentFilters,\n })];\n case 1:\n _b.sent();\n reload();\n return [2 /*return*/];\n }\n });\n });\n }, [currentFilters, toggleIntraCompanyBilling, reload]);\n var updateFilters = function (filters) {\n setFilters(function (oldFilters) {\n var newFilters = __assign(__assign({}, oldFilters), filters);\n if (JSON.stringify(oldFilters) === JSON.stringify(newFilters))\n return oldFilters;\n return newFilters;\n });\n };\n var toggleDetails = function (key) { return setDetails(function (d) {\n var _a;\n return (__assign(__assign({}, d), (_a = {}, _a[key] = !d[key], _a)));\n }); };\n var onSelectAll = function (selected) {\n if (selected) {\n selectAll(data.filter(function (x) { return !!x.relation; }).map(function (x) { return x.key; }));\n }\n else {\n resetSelected();\n }\n };\n var isGlobalActionsDisabled = batchBillRunning || !hasAnySelected;\n return (_jsx(\"div\", { children: _jsxs(LoadingContainer, __assign({ isLoading: isLoading || !data }, { children: [_jsx(SimplePanel, __assign({ article: \"12187295654684\", title: intl.formatMessage(messages.IntraCompanyBilling) }, { children: _jsx(\"div\", __assign({ className: \"info-block container-fluid radius4B\" }, { children: _jsx(IntraCompanyFilters, { filters: currentFilters, onFilterChange: updateFilters, intl: intl }) })) })), data && data.length > 0 && (_jsx(\"div\", __assign({ className: \"row btn-row\" }, { children: _jsx(\"div\", __assign({ className: \"col-md-6 pull-right content-right\" }, { children: _jsx(CanCreate, __assign({ on: \"IntraCompanyInvoice\" }, { children: _jsx(Button, __assign({ disabled: isGlobalActionsDisabled, onClick: onBatchBill, className: \"\" }, { children: _jsx(FormattedMessage, __assign({}, messages.MakeInvoiceProposals)) })) })) })) }))), _jsx(IntraCompanyTable, { data: data, details: details, onToggleDetails: toggleDetails, onBillCompany: onBillCompany, onToggleIntraCompanyBilling: onToggleIntraCompanyBilling, neverIntraCompany: currentFilters.neverIntraCompany, onToggleSelected: toggleSelected, isSelected: isSelected, onToggleAllSelected: onSelectAll })] })) }));\n};\nexport default showWhenPermission(functionalities.IntraCompanyInvoice, privileges.Read)(showWhenFeature(features.IntraCompanyBilling)(IntraCompanyBillingContainer));\n","import { defineMessages } from 'react-intl';\n\nconst messages = defineMessages({\n WithEmployeeTags: 'With employee tags',\n Name: 'Name',\n AbsenceCounters: 'Absence counters',\n Actions: 'Actions',\n Employee: 'Employee',\n ResetFilters: 'Reset filters',\n OwnCompany: 'Own company',\n FilterResource: 'Filter resource',\n OpenRegistrationOverview: 'Open registration overview',\n Delete: 'Delete',\n AbsenceBalance: 'Balance',\n AbsenceStartValue: 'Start value',\n AbsenceCorrections: 'Absence corrections',\n OpenDetails: 'Open details',\n Date: 'Date',\n Type: 'Type',\n BalanceBefore: 'Balance before',\n Mutation: 'Mutation',\n BalanceAfter: 'Balance after',\n Remark: 'Remark',\n AddCorrection: 'Add correction',\n Add: 'Add',\n Close: 'Close',\n Save: 'Save',\n RemoveCorrection: 'Remove correction',\n DeleteCorrectionMsg: 'Are you sure you want to delete this absence correction?',\n GlobalActions: 'Global actions',\n InitializeCounter: 'Initialize counter',\n BackgroundJobQueued: 'A background job has started. Click here to monitor the progress.',\n Resource: 'Resource',\n Year: 'Year',\n Action: 'Action',\n InitInHours: 'Init in hours',\n InitInDays: 'Init in days',\n CopyFromPreviousYear: 'Copy from previous year',\n Hours: 'Hours',\n Days: 'Days',\n OverrideIfCounterAlreadyExists: 'Override if counter already exists',\n RemoveExistingCorrections: 'Remove existing corrections',\n CounterBalanceStartValue:\n '{balanceDays} days of {startValueDays} remaining ({balanceHours}/{startValueHours} hours)',\n OpenEmployeeDetail: 'Open employee detail',\n HoursInDay: 'Hours in day',\n ShowAbsencesInDays: 'Show absences in days',\n ShowOnlyOpenAbsences: 'Show only employees with open absences',\n EmployeeType: 'Employee type',\n});\n\nexport default messages;\n","import HoverToggle from '@/shared/components/HoverToggle';\nimport PropTypes from 'prop-types';\nimport EditableNumber from '@/shared/components/editable/EditableNumber';\nimport React, { useMemo } from 'react';\nimport { Dropdown, MenuItem } from 'react-bootstrap';\nimport { FormattedMessage } from 'react-intl';\nimport { CanDelete, CanRead } from '@/shared/components/security';\nimport AuthService from '@/shared/services/AuthService';\nimport intlShape from '@/shared/utils/intlShape';\nimport messages from '../hrmMessages';\n\nconst AbsenceCounterCell = ({\n counter,\n resourceId,\n employeeId,\n userId,\n intl,\n onInitCounter,\n onDeleteCounter,\n onOpenRegistrationOverview,\n onOpenCounterDetails,\n inDays,\n}) => {\n const currentUser = useMemo(() => AuthService.getUserId(), []);\n if (counter?.id) {\n const counterInfo = {\n ...counter,\n employeeId,\n resourceId,\n };\n const isCurrentUser = userId === currentUser;\n return (\n \n \n onOpenCounterDetails(counterInfo)}\n >\n {inDays\n ? `${counter.balanceDays}/${counter.startValueDays}`\n : `${counter.balance}/${counter.startValue}`}\n \n \n \n\n \n \n onOpenRegistrationOverview({ userId, resourceId })}\n >\n \n \n \n \n onOpenCounterDetails(counterInfo)}>\n \n \n \n \n onDeleteCounter(counterInfo)}>\n \n \n \n \n \n \n );\n }\n\n // Counter not initialized\n return (\n \n onInitCounter({ resourceId, employeeId, startValue: value, inDays })}\n displayValue={}\n min={0}\n placeholder={intl.formatMessage(inDays ? messages.Days : messages.Hours)}\n />\n \n );\n};\n\nAbsenceCounterCell.propTypes = {\n intl: intlShape.isRequired,\n counter: PropTypes.shape({\n id: PropTypes.string,\n balanceDays: PropTypes.number,\n balance: PropTypes.number,\n startValue: PropTypes.number,\n startValueDays: PropTypes.number,\n }),\n resourceId: PropTypes.string.isRequired,\n employeeId: PropTypes.string.isRequired,\n userId: PropTypes.string.isRequired,\n onInitCounter: PropTypes.func.isRequired,\n onDeleteCounter: PropTypes.func.isRequired,\n onOpenRegistrationOverview: PropTypes.func.isRequired,\n onOpenCounterDetails: PropTypes.func.isRequired,\n inDays: PropTypes.bool.isRequired,\n};\nAbsenceCounterCell.defaultProps = {\n counter: null,\n};\n\nexport default AbsenceCounterCell;\n","import React, { useMemo } from 'react';\nimport PropTypes from 'prop-types';\nimport Checkbox from '@/shared/components/input/Checkbox';\nimport intlShape from '@/shared/utils/intlShape';\nimport { StateService } from '@/shared/services/StateService';\nimport { CanRead } from '@/shared/components/security';\nimport AuthService from '@/shared/services/AuthService';\nimport AbsenceCounterCell from './AbsenceCounterCell';\nimport messages from '../hrmMessages';\n\nconst HrmOverviewRow = ({\n intl,\n absences,\n data,\n handleSelect,\n onInitCounter,\n onOpenRegistrationOverview,\n onDeleteCounter,\n onOpenCounterDetails,\n stateService,\n inDays,\n}) => {\n const currentUser = useMemo(() => AuthService.getUserId(), []);\n return (\n \n \n \n handleSelect(data)} value={data.selected} />\n \n \n {data.firstName} {data.lastName}\n \n {absences?.map(x => {\n const counter = data?.counters ? data?.counters[x.id] : null;\n return (\n \n \n \n );\n })}\n \n \n \n \n \n \n \n onOpenRegistrationOverview({ userId: data.userID })}\n title={intl.formatMessage(messages.OpenRegistrationOverview)}\n >\n \n \n \n \n \n \n );\n};\nHrmOverviewRow.propTypes = {\n intl: intlShape.isRequired,\n absences: PropTypes.arrayOf(PropTypes.shape({ id: PropTypes.string })).isRequired,\n data: PropTypes.shape({\n employeeID: PropTypes.string,\n userID: PropTypes.string,\n firstName: PropTypes.string,\n lastName: PropTypes.string,\n selected: PropTypes.bool,\n counters: PropTypes.shape({}),\n }).isRequired,\n handleSelect: PropTypes.func.isRequired,\n onInitCounter: PropTypes.func.isRequired,\n onOpenRegistrationOverview: PropTypes.func.isRequired,\n onDeleteCounter: PropTypes.func.isRequired,\n onOpenCounterDetails: PropTypes.func.isRequired,\n stateService: PropTypes.instanceOf(StateService).isRequired,\n inDays: PropTypes.bool,\n};\nHrmOverviewRow.defaultProps = {\n inDays: true,\n};\nexport default HrmOverviewRow;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport DropdownButton from 'react-bootstrap/lib/DropdownButton';\nimport MenuItem from 'react-bootstrap/lib/MenuItem';\nimport { FormattedMessage, injectIntl } from 'react-intl';\nimport intlShape from '@/shared/utils/intlShape';\nimport messages from '../hrmMessages';\n\nconst GlobalActionsButton = props => {\n const { intl, disabled, onInitCounter, inProgress } = props;\n\n return (\n \n \n {inProgress && }\n \n \n }\n >\n \n {intl.formatMessage(messages.InitializeCounter)}\n \n \n
    \n );\n};\n\nGlobalActionsButton.propTypes = {\n intl: intlShape.isRequired,\n onInitCounter: PropTypes.func.isRequired,\n disabled: PropTypes.bool,\n inProgress: PropTypes.bool,\n};\nGlobalActionsButton.defaultProps = { disabled: false, inProgress: false };\nexport default GlobalActionsButton;\n","import moment from 'moment';\nimport React, { Component } from 'react';\nimport Toggle from 'react-toggle';\nimport PropTypes from 'prop-types';\nimport intlShape from '@/shared/utils/intlShape';\nimport { retrieveResources } from '@/shared/components/registration/resourceApi';\nimport YearButtonGroup from '@/shared/components/YearButtonGroup';\nimport UserSearch from '@/shared/components/input/UserSearch';\nimport { FaUndo } from 'react-icons/fa';\nimport { FormattedMessage } from 'react-intl';\nimport ResourceAutoComplete from '@/shared/components/registration/ResourceAutoComplete';\nimport CompanySelector from '@/shared/components/input/CompanySelector';\nimport { hasMultipleCompanies } from '@/shared/components/security/HasMultiCompany';\nimport EnumSelectV2 from '@/shared/components/input/EnumSelectV2';\nimport EmployeeTagMultiSelect from '@/modules/hrm/EmployeeTagMultiSelect';\nimport messages from '../hrmMessages';\n\nexport const defaultFilters = {\n year: moment().utc().year(),\n resourceId: null,\n resourceCategoryId: null,\n userId: null,\n companyId: null,\n employeeType: null,\n withEmployeeLabels: [],\n onlyOpen: false\n};\n\nconst currentYear = moment.utc().year();\nconst yearFrom = currentYear - 2;\nconst yearUntil = currentYear + 1;\n\nclass HrmOverviewFilters extends Component {\n state = {\n resources: [],\n };\n static propTypes = {\n onFilterChange: PropTypes.func.isRequired,\n filters: PropTypes.shape({\n year: PropTypes.number.isRequired,\n resourceId: PropTypes.string,\n resourceCategoryId: PropTypes.string,\n userId: PropTypes.string,\n companyId: PropTypes.string,\n employeeType: PropTypes.number,\n withEmployeeLabels: PropTypes.arrayOf(PropTypes.string),\n onlyOpen: PropTypes.bool\n }),\n inDays: PropTypes.bool,\n inDaysChanged: PropTypes.func,\n intl: intlShape.isRequired,\n };\n static defaultProps = {\n filters: defaultFilters,\n inDaysChanged: () => { },\n };\n\n componentDidMount() {\n const { intl } = this.props;\n retrieveResources(intl, 3).then((data) => {\n this.setState({\n resources: data.filter((x) => {\n if (x.useCounter) return true;\n\n return x.isDefault && data.some((y) => y.categoryId === x.categoryId && y.useCounter);\n }),\n });\n });\n }\n filterChanged = (filter) => {\n const { filters, onFilterChange } = this.props;\n const newFilters = { ...filters, ...filter };\n if (filters !== newFilters) onFilterChange(newFilters);\n };\n resetFilters = () => {\n this.filterChanged(defaultFilters);\n };\n resourceFilterChanged = (resource) => {\n let resourceId = null;\n let categoryId = null;\n\n if (resource) {\n if (resource.isDefault) {\n // eslint-disable-next-line prefer-destructuring\n categoryId = resource.categoryId;\n } else {\n resourceId = resource.id;\n }\n }\n this.filterChanged({ resourceId, resourceCategoryId: categoryId });\n };\n render() {\n const { resources } = this.state;\n const { filters, intl, inDaysChanged, inDays } = this.props;\n\n const hasFilters = JSON.stringify(filters) !== JSON.stringify(defaultFilters);\n const showCompanies = hasMultipleCompanies();\n\n const selectedResource =\n (filters.resourceCategoryId\n ? resources.find((x) => x.categoryId === filters.resourceCategoryId && x.isDefault)\n : null) ?? (filters.resourceId ? resources.find((x) => x.id === filters.resourceId) : null);\n\n return (\n
    \n
    \n
    \n
    \n this.filterChanged({ userId: u?.id })}\n placeholder={intl.formatMessage(messages.Employee)}\n />\n
    \n
    \n\n
    \n
    \n \n
    \n
    \n
    \n
    \n this.filterChanged({ employeeType: value })}\n />\n
    \n
    \n
    \n
    \n
    \n this.filterChanged({ year })}\n />\n
    \n
    \n this.filterChanged({ withEmployeeLabels })}\n placeholder={intl.formatMessage(messages.WithEmployeeTags)}\n />\n
    \n {showCompanies && (\n
    \n
    \n this.filterChanged({ companyId: companyId || null })}\n value={filters.companyId}\n placeholder={intl.formatMessage(messages.OwnCompany)}\n />\n
    \n
    \n )}\n
    \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n {hasFilters && (\n
    \n
    \n this.resetFilters()}\n >\n \n  \n \n \n
    \n
    \n )}\n
    \n );\n }\n}\n\nexport default HrmOverviewFilters;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage, FormattedNumber } from 'react-intl';\nimport ToastrService from '@/shared/services/ToastrService';\nimport intlShape from '@/shared/utils/intlShape';\n\nimport api from '@/shared/api';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport FormattedListValue from '@/shared/components/FormattedListValue';\nimport FormattedDateShort from '@/shared/components/FormattedDateShort';\nimport { CanUpdate } from '@/shared/components/security';\nimport NumberInput from '@/shared/components/input/NumberInput';\nimport adminpulse from '@/shared/utils/adminpulse';\nimport YesNoModal from '@/shared/components/YesNoModal';\nimport { Modal } from 'react-bootstrap';\nimport ZendeskHelp from '@/shared/components/ZendeskHelp';\nimport Button from '@/shared/components/Button';\nimport messages from '../hrmMessages';\n\nexport default class AbsenceCorrectionModal extends Component {\n state = {\n rows: [],\n correction: 0,\n remark: '',\n balance: 0,\n saving: false,\n hasChanged: false,\n };\n\n static propTypes = {\n show: PropTypes.bool.isRequired,\n intl: intlShape.isRequired,\n onClose: PropTypes.func.isRequired,\n hoursInDay: PropTypes.number,\n counter: PropTypes.shape({ id: PropTypes.string }).isRequired,\n };\n\n static defaultProps = { hoursInDay: 0 };\n\n reloadData = () => {\n const { counter, intl } = this.props;\n return api.base\n .get(`/api/AbsenceCounter/Details/${counter.id}`)\n .then(({ data }) => {\n const balance = data && data.length > 0 ? data[data.length - 1].balanceAfter : 0;\n\n this.setState({ rows: data || [], balance });\n })\n .catch(error => handleHttpError(intl)(error));\n };\n componentDidMount() {\n this.reloadData();\n }\n\n closeModal = () => {\n const { onClose } = this.props;\n const { hasChanged } = this.state;\n\n onClose(hasChanged);\n };\n\n addCorrection = () => {\n const { correction, remark } = this.state;\n const { counter, intl } = this.props;\n if ((correction ?? 0) === 0) return;\n this.setState({ saving: true });\n return api.base\n .post('api/AbsenceCounter/Correction', {\n absenceCounterId: counter.id,\n correctionValue: correction,\n remark,\n })\n .then(() =>\n this.reloadData().finally(() => {\n ToastrService.success();\n\n this.setState({ correction: 0, remark: '', hasChanged: true }, this.closeModal);\n }),\n )\n .catch(error => handleHttpError(intl)(error))\n .finally(() => {\n this.setState({ saving: false });\n });\n };\n\n removeCorrection = id => {\n const { intl } = this.props;\n this.setState({ saving: true });\n return api.base\n .delete(`api/AbsenceCounter/Correction/${id}`)\n .then(() =>\n this.reloadData().finally(() => {\n ToastrService.success();\n\n this.setState({ hasChanged: true });\n }),\n )\n .catch(error => handleHttpError(intl)(error))\n .finally(() => {\n this.setState({ saving: false, deleteCorrection: null });\n });\n };\n\n correctionValueChanged = value => {\n this.setState({ correction: adminpulse.roundAmount(value, 0, 5) });\n };\n render() {\n const { show, intl, hoursInDay } = this.props;\n const { rows, balance, correction, remark, saving, deleteCorrection } = this.state;\n if (!show) return null;\n const numberInputStyle = {\n maxWidth: '150px',\n display: 'inline-block',\n textAlign: 'right',\n };\n\n return (\n \n \n \n {intl.formatMessage(messages.AbsenceCorrections)}{' '}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {rows?.map(row => (\n \n \n \n \n {hoursInDay ? (\n \n ) : null}\n \n\n {hoursInDay ? (\n \n ) : null}\n \n {hoursInDay ? (\n \n ) : null}\n \n \n \n ))}\n \n \n \n \n \n \n {hoursInDay ? (\n \n ) : null}\n \n {hoursInDay ? (\n \n ) : null}\n \n {hoursInDay ? (\n \n ) : null}\n \n \n \n \n
    \n \n \n \n \n \n \n
    \n \n \n \n \n \n  \n \n \n \n  \n \n \n \n  \n \n \n \n  \n \n \n \n  \n \n \n \n  \n \n {row.remark}\n {row.correctionId ? (\n \n this.setState({ deleteCorrection: row.correctionId })}\n >\n \n \n \n ) : null}\n
    \n \n \n \n  \n \n \n \n  \n \n \n \n \n this.correctionValueChanged(e * hoursInDay)}\n />\n \n \n  \n \n \n \n  \n \n \n this.setState({ remark: e.target.value })}\n maxLength={3000}\n />\n \n
    \n {hoursInDay ? (\n
    \n \n  \n {hoursInDay}\n
    \n ) : null}\n\n {deleteCorrection ? (\n \n this.setState({\n deleteCorrection: null,\n })\n }\n onSave={() => this.removeCorrection(deleteCorrection)}\n />\n ) : null}\n
    \n \n \n \n \n {intl.formatMessage(messages.Save)}\n \n \n \n \n );\n }\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport intlShape from '@/shared/utils/intlShape';\nimport AbsenceCorrectionModal from '../modals/AbsenceCorrectionModal';\nimport BatchInitCounterModal from '../modals/BatchInitCounterModal';\n\nconst HrmModals = ({ modal, data, onCloseModals, intl }) => {\n if (!modal) return null;\n\n switch (modal) {\n case 'counterDetails':\n return (\n \n );\n case 'initCounter':\n return (\n \n );\n default:\n return null;\n }\n};\n\nHrmModals.propTypes = {\n modal: PropTypes.string.isRequired,\n data: PropTypes.any,\n onCloseModals: PropTypes.func.isRequired,\n intl: intlShape.isRequired,\n};\nHrmModals.defaultProps = {\n data: undefined,\n};\n\nexport default HrmModals;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport intlShape from '@/shared/utils/intlShape';\n\nimport NumberInput from '@/shared/components/input/NumberInput';\nimport moment from 'moment';\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport ResourceAutoComplete from '@/shared/components/registration/ResourceAutoComplete';\nimport { retrieveResources } from '@/shared/components/registration/resourceApi';\nimport Checkbox from '@/shared/components/input/Checkbox';\nimport InputGroupWrapper from '@/shared/components/InputGroupWrapper';\nimport messages from '../hrmMessages';\n\nexport default class BatchInitCounterModal extends Component {\n constructor(props) {\n super(props);\n const currentYear = moment.utc().year();\n this.state = {\n year: props.year || currentYear,\n resourceId: props.resourceId || null,\n startValueDays: null,\n startValueHours: null,\n action: props.inDays ? 1 : 0,\n overrideExisting: false,\n removeCorrections: true,\n years: [currentYear + 1, currentYear, currentYear - 1, currentYear - 2],\n };\n }\n\n static propTypes = {\n year: PropTypes.number,\n resourceId: PropTypes.string,\n show: PropTypes.bool.isRequired,\n intl: intlShape.isRequired,\n onClose: PropTypes.func.isRequired,\n onSave: PropTypes.func.isRequired,\n };\n\n static defaultProps = {\n year: null,\n resourceId: null,\n };\n\n componentDidMount() {\n const { intl } = this.props;\n retrieveResources(intl, 3).then(data => {\n this.setState({\n resources: data\n .filter(x => {\n if (x.useCounter) return true;\n\n return x.isDefault && data.some(y => y.categoryId === x.categoryId && y.useCounter);\n })\n .map(x => ({ ...x, disabled: !!x.isDefault })),\n });\n });\n }\n onSave = () => {\n const { onSave } = this.props;\n const {\n year,\n resourceId,\n startValueDays,\n overrideExisting,\n removeCorrections,\n action,\n startValueHours,\n } = this.state;\n if (this.isFormInvalid()) return Promise.reject();\n const model = {\n year,\n resourceId,\n overrideExisting,\n removeCorrections,\n startValueHours: action === 0 ? startValueHours : undefined,\n startValueDays: action === 1 ? startValueDays : undefined,\n fromPreviousYear: action === 2,\n };\n return Promise.resolve(onSave(model));\n };\n\n resourceFilterChanged = resource => {\n let resourceId = null;\n if (resource && !resource.isDefault) {\n resourceId = resource.id;\n }\n this.setState({ resourceId });\n };\n\n isFormInvalid = () => {\n const { year, resourceId, startValueDays, startValueHours, action } = this.state;\n if (!year || year < 2000) return true;\n\n if (!resourceId) return true;\n if (action < 0 || action > 2) return true;\n if (action === 0 && (startValueHours ?? 0) < 0) return true;\n if (action === 1 && (startValueDays ?? 0) < 0) return true;\n\n return false;\n };\n render() {\n const { show, intl, onClose } = this.props;\n const {\n year,\n resourceId,\n startValueDays,\n startValueHours,\n overrideExisting,\n removeCorrections,\n years,\n resources,\n action,\n } = this.state;\n if (!show) return null;\n\n const selectedResource =\n resourceId && resources ? resources.find(x => x.id === resourceId) : null;\n return (\n \n
    \n
    \n \n
    \n this.setState({ year: parseInt(e.target.value) })}\n >\n {years.map(y => (\n \n ))}\n \n
    \n
    \n
    \n \n
    \n \n
    \n
    \n\n
    \n \n
    \n this.setState({ action: parseInt(e.target.value) })}\n >\n \n \n \n \n
    \n
    \n {action === 0 && (\n
    \n \n
    \n \n this.setState({ startValueHours: value })}\n className=\"form-control\"\n />\n \n
    \n
    \n )}\n {action === 1 && (\n
    \n \n
    \n \n this.setState({ startValueDays: value })}\n className=\"form-control\"\n />\n \n
    \n
    \n )}\n
    \n this.setState({ overrideExisting: !overrideExisting })}\n text={intl.formatMessage(messages.OverrideIfCounterAlreadyExists)}\n />\n
    \n
    \n this.setState({ removeCorrections: !removeCorrections })}\n text={intl.formatMessage(messages.RemoveExistingCorrections)}\n />\n
    \n
    \n \n );\n }\n}\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { useState, useMemo, useCallback, useEffect } from 'react';\nimport { defineMessages, FormattedMessage, useIntl } from 'react-intl';\nimport { isEqual } from 'lodash';\nimport RegistrationComponent from '@/shared/components/registration/RegistrationComponent';\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport { createEmptyTimerRegistration, executeAction, isRegistrationValid, getCurrentTime, } from '@/shared/components/registration/registrationHelpers';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nvar messages = defineMessages({\n Relation: {\n id: 'Relation',\n defaultMessage: 'Relation',\n },\n CreateTimerRegistration: {\n id: 'CreateTimerRegistration',\n defaultMessage: 'Create timer registration',\n },\n});\nvar registrationOptions = {\n showDate: false,\n showFromUntil: false,\n showDuration: false,\n showQuantity: false,\n showPrice: false,\n showDiscount: false,\n showVat: false,\n showTotalAmount: false,\n showBillable: false,\n showInForfait: false,\n showInternalRemark: true,\n showInvoiceRemark: true,\n showInteraction: false,\n};\nvar CreateTimerRegistrationModal = function (_a) {\n var _b = _a.initialValue, initialValue = _b === void 0 ? {} : _b, onSave = _a.onSave, onClose = _a.onClose, _c = _a.show, show = _c === void 0 ? false : _c;\n var _d = useState(createEmptyTimerRegistration(initialValue)), registration = _d[0], setRegistration = _d[1];\n var _e = useState(false), validationVisible = _e[0], showValidation = _e[1];\n var _f = useState(false), saving = _f[0], setSaving = _f[1];\n var intl = useIntl();\n var save = useCallback(function () {\n setSaving(true);\n var resource = registration.resource, invoiceStreamId = registration.invoiceStreamId, fromMinutes = registration.fromMinutes, plannedTaskId = registration.plannedTaskId, plannedTaskTemplateId = registration.plannedTaskTemplateId, plannedTaskName = registration.plannedTaskName, mainPlannedTaskId = registration.mainPlannedTaskId, mainTaskTemplateId = registration.mainTaskTemplateId, mainPlannedTaskName = registration.mainPlannedTaskName, referenceYear = registration.referenceYear, remark = registration.remark, internalRemark = registration.internalRemark;\n var value = {\n resourceId: resource.id,\n invoiceStreamId: invoiceStreamId,\n fromMinutes: fromMinutes || getCurrentTime(),\n plannedTaskId: plannedTaskId,\n plannedTaskTemplateId: plannedTaskTemplateId,\n plannedTaskName: plannedTaskName,\n mainPlannedTaskId: mainPlannedTaskId,\n mainTaskTemplateId: mainTaskTemplateId,\n mainPlannedTaskName: mainPlannedTaskName,\n referenceYear: referenceYear,\n remark: remark,\n internalRemark: internalRemark,\n };\n Promise.resolve(onSave(value))\n .then(function () {\n setSaving(false);\n }, handleHttpError(intl))\n .finally(function () {\n setSaving(false);\n });\n }, [onSave, registration, intl]);\n var doRegistrationAction = useCallback(function (action, value) {\n var newValue = executeAction(registration, action, value);\n if (isEqual(newValue, registration))\n return;\n setRegistration(newValue);\n }, [registration]);\n var isValid = useMemo(function () { return isRegistrationValid(registration, registrationOptions); }, [\n registration,\n ]);\n useEffect(function () {\n if (show) {\n showValidation(false);\n setRegistration(createEmptyTimerRegistration(initialValue));\n }\n else {\n setRegistration(null);\n }\n }, [show, initialValue]);\n return (_jsx(OkCancelModal, __assign({ title: _jsx(\"span\", { children: _jsx(FormattedMessage, __assign({}, messages.CreateTimerRegistration)) }), show: show, onClose: onClose, onSave: save, disabled: saving || (validationVisible && !isValid), onHoverSave: function () { return showValidation(true); } }, { children: _jsx(\"div\", __assign({ className: \"form-horizontal\" }, { children: registration ? (_jsx(RegistrationComponent, { registration: registration, onAction: doRegistrationAction, options: registrationOptions, showValidation: validationVisible })) : null })) })));\n};\nexport default CreateTimerRegistrationModal;\n","import SimplePanel from '@/shared/components/SimplePanel';\nimport ZendeskHelp from '@/shared/components/ZendeskHelp';\nimport Checkbox from '@/shared/components/input/Checkbox';\nimport { ColumnHeader, ScrollableTable } from '@/shared/components/table';\nimport React, { Component } from 'react';\nimport { injectIntl } from 'react-intl';\nimport PropTypes from 'prop-types';\n\nimport Axios from 'axios';\nimport { getResourceName } from '@/shared/components/ResourceName';\nimport { injectStateService, StateService } from '@/shared/services/StateService';\nimport api from '@/shared/api';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport moment from 'moment';\nimport { CanCreate, showWhenPermission } from '@/shared/components/security';\nimport ToastrService from '@/shared/services/ToastrService';\nimport SignalRService from '@/shared/services/SignalRService';\nimport { functionalities, privileges } from '@/shared/services/AuthService';\nimport intlShape from '@/shared/utils/intlShape';\nimport messages from '../hrmMessages';\nimport HrmOverviewRow from './HrmOverviewRow';\nimport HrmOverviewFilters, { defaultFilters } from './HrmOverviewFilters';\nimport GlobalActionsButton from './GlobalActionButton';\nimport HrmModals from './HrmModals';\n\nclass HrmOverviewContainer extends Component {\n constructor(props) {\n super(props);\n const { searchParams = {}, intl } = props;\n\n const { hrmFilters: sessionFilters = {}, ...sessionParams } =\n JSON.parse(sessionStorage.getItem('HrmOverviewParams')) || {};\n\n this.state = {\n items: [],\n currentSearchParams: undefined,\n allSelected: false,\n inDays: true,\n initialSearchParams: {\n // Set default filters\n sortKey: 'displayname',\n pageSize: -1,\n hrmFilters: {\n ...defaultFilters,\n ...sessionFilters,\n ...searchParams,\n },\n // Override with session storage params\n ...sessionParams,\n },\n };\n }\n componentDidMount() {\n SignalRService.subscribe('jobUpdated', this.jobUpdateHandler);\n }\n componentWillUnmount() {\n SignalRService.unsubscribe('jobUpdated', this.jobUpdateHandler);\n if (typeof this.searchToken !== 'undefined') {\n this.searchToken.cancel('Operation canceled due to leaving page.');\n }\n }\n\n getYearFromFilters = () => {\n const { initialSearchParams: { hrmFilters: { year } = {} } = {} } = this.state;\n return year;\n };\n loadItems = searchParams => {\n sessionStorage.setItem(\n 'HrmOverviewParams',\n JSON.stringify({\n desc: searchParams.desc,\n sortKey: searchParams.sortKey,\n hrmFilters: searchParams.hrmFilters,\n }),\n );\n const { allSelected } = this.state;\n const { intl } = this.props;\n if (typeof this.searchToken !== 'undefined') {\n this.searchToken.cancel('Operation canceled due to new request.');\n }\n this.searchToken = Axios.CancelToken.source();\n return api.base\n .get('/api/AbsenceCounter/Overview', {\n params: {\n desc: searchParams.desc,\n sort: searchParams.sortKey,\n ...searchParams.hrmFilters,\n },\n cancelToken: this.searchToken.token,\n })\n .then(({ data }) => {\n // If checkbox for all relations is selected, set selected on all new incoming relations\n const items = data.rows.map(e => ({ ...e, selected: !!allSelected }));\n const absences = data.absences.map(e => ({ ...e, label: getResourceName(intl, e) }));\n\n this.setState(state => ({\n ...state,\n items,\n absences,\n currentSearchParams: searchParams,\n }));\n\n return items;\n })\n .catch(error => {\n if (!Axios.isCancel(error)) return error;\n });\n };\n filtersChanged = filters => {\n this.setState(state => ({\n initialSearchParams: {\n ...state.initialSearchParams,\n page: 0,\n hrmFilters: filters,\n },\n }));\n };\n\n handleSelect = row => {\n this.setState(({ items }) => ({\n items: items.map(x =>\n x.employeeID === row.employeeID ? { ...x, selected: !x.selected } : x,\n ),\n }));\n };\n handleSelectAll = () => {\n this.setState(({ items, allSelected }) => ({\n items: items.map(x => ({ ...x, selected: !allSelected })),\n allSelected: !allSelected,\n }));\n };\n\n handleUpdateCounter = (employeeId, resourceId, counter, callback = undefined) => {\n this.setState(\n ({ items }) => ({\n items: items.map(r =>\n r.employeeID !== employeeId\n ? r\n : {\n ...r,\n counters: {\n ...r.counters,\n [resourceId]: counter,\n },\n },\n ),\n }),\n callback,\n );\n };\n\n handleInitCounter = counter => {\n const { resourceId, employeeId, startValue, inDays } = counter || {};\n if (!resourceId || !employeeId || !startValue) return Promise.reject();\n const year = this.getYearFromFilters();\n const { intl } = this.props;\n return new Promise((resolve, reject) => {\n api.base\n .post('/api/AbsenceCounter/Init', {\n employeeId,\n startValueDays: inDays ? startValue : null,\n startValueHours: inDays ? null : startValue,\n resourceId,\n year,\n })\n .then(({ data }) => {\n if (!data) return reject();\n if (data.year !== year) return reject();\n this.handleUpdateCounter(\n employeeId,\n resourceId,\n {\n id: data.id,\n startValue: data.startValue,\n startValueDays: data.startValueDays,\n balance: data.balance,\n balanceDays: data.balanceDays,\n },\n resolve,\n );\n })\n .catch(error => {\n handleHttpError(intl)(error);\n return reject();\n });\n });\n };\n\n handleDeleteCounter = ({ id, employeeId, resourceId }) => {\n const { intl } = this.props;\n api.base\n .delete(`/api/AbsenceCounter/${id}`)\n .then(() => {\n this.handleUpdateCounter(employeeId, resourceId, null);\n })\n .catch(error => {\n handleHttpError(intl)(error);\n });\n };\n handleOpenRegOverview = ({ userId, resourceId = null }) => {\n const { stateService } = this.props;\n const year = this.getYearFromFilters();\n\n stateService.gotoRegistrationOverview({\n userId,\n period: 'all',\n dateFrom: moment.utc([year, 0, 1]).toDate(),\n dateUntil: moment.utc([year, 11, 31]),\n resourceId,\n filters: { type: { items: [3] } },\n });\n };\n\n openModal = (modalName, data) => {\n this.setState({ showModal: { name: modalName, data } });\n };\n closeModals = (reload = false) => {\n if (reload) {\n this.setState(state => ({\n initialSearchParams: {\n ...state.initialSearchParams,\n page: 0,\n f: new Date().getTime(),\n },\n showModal: null,\n }));\n return;\n }\n this.setState({ showModal: null });\n };\n isGlobalActionsDisabled = () => {\n const { items, allSelected } = this.state;\n if (!items || !items.length) return true;\n if (allSelected || items.some(x => x.selected)) return false;\n\n return true;\n };\n getSelectionParams = () => {\n const { items, allSelected } = this.state;\n\n const ids = items\n ? items.filter(x => (x.selected || false) !== allSelected).map(x => x.employeeID)\n : [];\n\n return {\n ids,\n selectAll: allSelected,\n };\n };\n\n handleGlobalActionJobResult = ({ data }) => {\n const { stateService, intl } = this.props;\n const onClick = data ? () => stateService.gotoJob(data.id) : undefined;\n\n ToastrService.info(intl.formatMessage(messages.BackgroundJobQueued), undefined, onClick);\n this.closeModals();\n };\n\n initCounterGlobalAction = settings => {\n const { intl } = this.props;\n const { initialSearchParams } = this.state;\n const bodyParams = {\n ...settings,\n ...this.getSelectionParams(),\n };\n return api.base\n .post(`/api/AbsenceCounter/BatchInit`, bodyParams, {\n params: initialSearchParams.hrmFilters,\n })\n .then(this.handleGlobalActionJobResult)\n .catch(error => {\n handleHttpError(intl)(error);\n });\n };\n jobUpdateHandler = job => {\n if (job.jobType === 53 && (job.status === 2 || job.status === 3)) {\n this.setState(state => ({\n initialSearchParams: {\n ...state.initialSearchParams,\n page: 0,\n // forces refresh of table\n f: new Date().getTime(),\n },\n }));\n }\n };\n\n render() {\n const { intl, stateService } = this.props;\n const { items, absences, allSelected, initialSearchParams, showModal, inDays } = this.state;\n const year = this.getYearFromFilters();\n const resourceId = initialSearchParams?.hrmFilters?.resourceId;\n return (\n
    \n \n {intl.formatMessage(messages.AbsenceCounters)}{' '}\n \n \n }\n >\n
    \n this.setState({ inDays: !!x })}\n intl={intl}\n />\n
    \n \n
    \n
    \n \n \n this.openModal('initCounter', {\n resourceId,\n year,\n inDays,\n save: this.initCounterGlobalAction,\n })\n }\n intl={intl}\n disabled={this.isGlobalActionsDisabled()}\n />\n \n
    \n
    \n\n this.loadItems(searchParams)}\n initialSearchParams={initialSearchParams}\n items={items}\n renderRow={item => (\n \n this.openModal('counterDetails', { counter: data, hoursInDay: item.hoursInDay })\n }\n inDays={inDays}\n stateService={stateService}\n />\n )}\n >\n this.handleSelectAll()}\n value={allSelected}\n />\n }\n />\n\n \n\n {absences?.map(column => (\n \n ))}\n\n \n \n\n \n
    \n );\n }\n}\nHrmOverviewContainer.propTypes = {\n intl: intlShape.isRequired,\n stateService: PropTypes.instanceOf(StateService).isRequired,\n searchParams: PropTypes.shape({}),\n};\nHrmOverviewContainer.defaultProps = {\n searchParams: {},\n};\n\nexport default showWhenPermission(\n functionalities.AbsenceAndCounters,\n privileges.Read,\n)(injectStateService(injectIntl(HrmOverviewContainer)));\n","import React, { Component } from 'react';\nimport { IntlProvider } from 'react-intl';\nimport moment from 'moment';\nimport TranslateService from '../services/TranslateService';\n\nimport '@formatjs/intl-pluralrules/polyfill';\nimport '@formatjs/intl-pluralrules/locale-data/en';\nimport '@formatjs/intl-pluralrules/locale-data/fr';\nimport '@formatjs/intl-pluralrules/locale-data/nl';\n\nimport '@formatjs/intl-relativetimeformat/polyfill';\nimport '@formatjs/intl-relativetimeformat/locale-data/en';\nimport '@formatjs/intl-relativetimeformat/locale-data/fr';\nimport '@formatjs/intl-relativetimeformat/locale-data/nl';\n\nrequire('moment/locale/fr');\nrequire('moment/locale/nl-be');\n\n// Parameters in angularjs are surounded by {{param}}. In react it's surounded by single {param}. So we change the double braces to single braces.\nconst changeDoubleBracesToSingle = value => {\n if (!value) return value;\n if (value.indexOf('{') < 0 || value.indexOf('}') < 0) return value; // Check if there are braces, this is faster than doing the replace regex on all values.\n return value.replace(/\\{\\{\\s*([^}]+)\\s*\\}\\}/g, '{$1}');\n};\n\nexport default function withIntl(WrappedComponent) {\n return class extends Component {\n state = {\n messages: null,\n userCulture: null,\n currencyCode: null,\n version: 0,\n };\n\n initTranslations = () => {\n const { $translate } = this.props;\n\n const locale = $translate.use();\n const translations = $translate.getTranslationTable(locale);\n if (translations) {\n this.setState(() => ({\n messages: Object.keys(translations).reduce((o, key) => {\n // eslint-disable-next-line no-param-reassign\n o[key] = changeDoubleBracesToSingle(translations[key]); // See comment above function\n return o;\n }, {}),\n version: TranslateService.getVersion(),\n }));\n }\n };\n\n handleReload = () => {\n this.initTranslations();\n };\n\n componentDidMount() {\n const { $translate, dataCache } = this.props;\n\n if (dataCache) {\n dataCache.ready().then(() => {\n const { userLanguage = 'nl', userCulture } = dataCache.getArray('employee');\n const languages = dataCache.getArray('language');\n const lang = languages.find(x => x.code === userLanguage);\n const culture = (lang && lang.culture) || userCulture;\n if (!culture) {\n console.warn('User culture was not found in datacache');\n }\n const { currencyCode } = dataCache.getDefaultCompany();\n this.setState(() => ({\n userCulture: culture,\n currencyCode,\n }));\n });\n } else {\n console.warn('dataCache missing in WithIntl.jsx component');\n }\n\n if ($translate) {\n if ($translate.isReady()) {\n // Already loaded\n this.initTranslations();\n } else {\n // Still loading translations, wait for it to finish and then init translations\n $translate.onReady(() => {\n this.initTranslations();\n });\n }\n }\n TranslateService.onReload(this.handleReload);\n }\n\n componentWillUnmount() {\n TranslateService.offReload(this.handleReload);\n }\n\n handleError = error => {\n if (process.env.NODE_ENV !== 'production') {\n if (\n typeof error === 'string' &&\n error.indexOf('Missing message') >= 0 &&\n error.indexOf('using default message as fallback') >= 0\n )\n return;\n // console.warn(error);\n }\n };\n\n render() {\n const { $translate, ...passThroughProps } = this.props;\n const { messages, userCulture, currencyCode, version } = this.state;\n if (!$translate) {\n console.warn('$translate missing');\n return ;\n }\n\n moment.locale(userCulture);\n const formats = {\n number: {\n currency: {\n style: 'currency',\n currency: currencyCode,\n currencyDisplay: 'symbol',\n },\n },\n };\n\n if (!messages || !userCulture) return null;\n\n return (\n \n \n \n );\n }\n };\n}\n","export var defaultItemTypes = {\n task: { color: '#E3B23C', backgroundColor: 'white' },\n bug: { color: '#b80016', backgroundColor: '#faedef' },\n story: { color: '#0094ff', backgroundColor: 'white' },\n feature: { color: '#7564b6', backgroundColor: 'white' },\n epic: { color: '#ff6a00', backgroundColor: 'white' },\n};\nexport var defaultStates = [\n { name: 'To do', status: 0 },\n { name: 'In progress', status: 1 },\n { name: 'Done', status: 2 },\n];\nexport var defaultItemType = defaultItemTypes.task;\nexport var defaultGroupType = defaultItemTypes.story;\nexport var collapsedGroupHeight = 36;\nexport var groupHeight = 130;\nexport var getStateWidth = function (hideGroups, statesLength) {\n return \"\".concat((!hideGroups ? 85 : 100) / statesLength, \"%\");\n};\nexport var groupWidth = '15%';\nvar state0 = {\n status: 0,\n name: 'To do',\n isCollapsedByDefaultForGroups: true,\n};\nvar state1 = {\n status: 1,\n name: 'In progress',\n areNewItemButtonsHidden: true,\n};\nvar state2 = {\n status: 2,\n name: 'Done',\n isCollapsedByDefaultForGroups: true,\n areNewItemButtonsHidden: true,\n};\nexport var states = [state0, state1, state2];\nexport var taskColors = {\n blue: {\n color: '#f2f2f2',\n backgroundColor: '#f2f2f2',\n },\n red: {\n color: '#b80016',\n backgroundColor: '#faedef',\n },\n yellowOchre: {\n color: '#E3B23C',\n backgroundColor: '#f2f2f2',\n },\n green: {\n color: '#197d65',\n backgroundColor: '#f2f2f2',\n },\n purple: {\n color: '#7564b6',\n backgroundColor: '#e0dbfd',\n },\n dragging: {\n color: undefined,\n backgroundColor: '##f2f2f2',\n },\n};\nexport var getTaskColor = function (task) {\n switch (task.taskColor) {\n case 0:\n return taskColors.green;\n case 1:\n return taskColors.blue;\n case 2:\n return taskColors.yellowOchre;\n case 3:\n return taskColors.red;\n case 4:\n return taskColors.purple;\n default:\n return defaultItemType;\n }\n};\nexport var TaskStatus;\n(function (TaskStatus) {\n TaskStatus[TaskStatus[\"Todo\"] = 0] = \"Todo\";\n TaskStatus[TaskStatus[\"InProgress\"] = 1] = \"InProgress\";\n TaskStatus[TaskStatus[\"Done\"] = 2] = \"Done\";\n})(TaskStatus || (TaskStatus = {}));\nexport var Method;\n(function (Method) {\n Method[Method[\"ClickToOpenRegForm\"] = 0] = \"ClickToOpenRegForm\";\n Method[Method[\"OpenFormOnDone\"] = 1] = \"OpenFormOnDone\";\n Method[Method[\"AutomaticRegistration\"] = 2] = \"AutomaticRegistration\";\n})(Method || (Method = {}));\nexport var TaskType;\n(function (TaskType) {\n TaskType[TaskType[\"ActualTask\"] = 0] = \"ActualTask\";\n TaskType[TaskType[\"DefaultTime\"] = 1] = \"DefaultTime\";\n TaskType[TaskType[\"Condition\"] = 2] = \"Condition\";\n TaskType[TaskType[\"Mail\"] = 3] = \"Mail\";\n TaskType[TaskType[\"AutomaticMail\"] = 4] = \"AutomaticMail\";\n})(TaskType || (TaskType = {}));\n","// Borrowed from https://github.com/okikio/sharedworker/blob/main/src/index.ts\n/**\n * indicates if SharedWorker is supported, in the global scope\n */\nexport var SharedWorkerSupported = 'SharedWorker' in globalThis;\n/**\n * A polyfill class for `SharedWorker`, it accepts a URL/string as well as any other options the spec. allows for `SharedWorker`.\n * It supports all the same methods and properties as the original, except it adds compatibility methods and properties for older browsers that don't support `SharedWorker`, so, it can switch to normal `Workers` instead.\n */\nvar SharedWorkerPolyfill = /** @class */ (function () {\n function SharedWorkerPolyfill(url, opts) {\n if (SharedWorkerSupported) {\n this.ActualWorker = new SharedWorker(url, opts);\n }\n else {\n this.ActualWorker = new Worker(url, opts);\n }\n }\n Object.defineProperty(SharedWorkerPolyfill.prototype, \"onmessage\", {\n /**\n * An EventListener called when MessageEvent of type message is fired on the port—that is, when the port receives a message.\n */\n get: function () {\n var _a;\n if (SharedWorkerSupported) {\n return (_a = this.ActualWorker) === null || _a === void 0 ? void 0 : _a.port.onmessage;\n }\n return this.ActualWorker.onmessage;\n },\n set: function (value) {\n if (SharedWorkerSupported) {\n this.ActualWorker.port.onmessage = value;\n }\n else {\n this.ActualWorker.onmessage = value;\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(SharedWorkerPolyfill.prototype, \"onmessageerror\", {\n /**\n * An EventListener called when a MessageEvent of type MessageError is fired—that is, when it receives a message that cannot be deserialized.\n */\n get: function () {\n var _a;\n if (SharedWorkerSupported) {\n return (_a = this.ActualWorker) === null || _a === void 0 ? void 0 : _a.port.onmessageerror;\n }\n return this.ActualWorker.onmessageerror;\n },\n set: function (value) {\n if (SharedWorkerSupported) {\n this\n .ActualWorker.port.onmessageerror = value;\n }\n else {\n this.ActualWorker.onmessageerror = value;\n }\n },\n enumerable: false,\n configurable: true\n });\n /**\n * Starts the sending of messages queued on the port (only needed when using EventTarget.addEventListener; it is implied when using MessagePort.onmessage.)\n */\n SharedWorkerPolyfill.prototype.start = function () {\n var _a;\n if (SharedWorkerSupported) {\n return (_a = this.ActualWorker) === null || _a === void 0 ? void 0 : _a.port.start();\n }\n };\n /**\n * Clones message and transmits it to worker's global environment. transfer can be passed as a list of objects that are to be transferred rather than cloned.\n */\n SharedWorkerPolyfill.prototype.postMessage = function (message, transfer) {\n var _a;\n if (SharedWorkerSupported) {\n return (_a = this.ActualWorker) === null || _a === void 0 ? void 0 : _a.port.postMessage(message, transfer);\n }\n return this.ActualWorker.postMessage(message, transfer);\n };\n /**\n * Immediately terminates the worker. This does not let worker finish its operations; it is halted at once. ServiceWorker instances do not support this method.\n */\n SharedWorkerPolyfill.prototype.terminate = function () {\n var _a;\n if (SharedWorkerSupported) {\n return (_a = this.ActualWorker) === null || _a === void 0 ? void 0 : _a.port.close();\n }\n return this.ActualWorker.terminate();\n };\n /**\n * Disconnects the port, so it is no longer active.\n */\n SharedWorkerPolyfill.prototype.close = function () {\n return this.terminate();\n };\n Object.defineProperty(SharedWorkerPolyfill.prototype, \"port\", {\n /**\n * Returns a MessagePort object used to communicate with and control the shared worker.\n */\n get: function () {\n return (SharedWorkerSupported\n ? this.ActualWorker.port\n : this.ActualWorker);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(SharedWorkerPolyfill.prototype, \"onerror\", {\n /**\n * Is an EventListener that is called whenever an ErrorEvent of type error event occurs.\n */\n get: function () {\n return this.ActualWorker.onerror;\n },\n set: function (value) {\n this.ActualWorker.onerror = value;\n },\n enumerable: false,\n configurable: true\n });\n SharedWorkerPolyfill.prototype.addEventListener = function (type, listener, options) {\n var _a;\n if (SharedWorkerSupported && type !== 'error') {\n return (_a = this.ActualWorker) === null || _a === void 0 ? void 0 : _a.port.addEventListener(type, listener, options);\n }\n return this.ActualWorker.addEventListener(type, listener, options);\n };\n SharedWorkerPolyfill.prototype.removeEventListener = function (type, listener, options) {\n var _a;\n if (SharedWorkerSupported && type !== 'error') {\n return (_a = this.ActualWorker) === null || _a === void 0 ? void 0 : _a.port.removeEventListener(type, listener, options);\n }\n return this.ActualWorker.removeEventListener(type, listener, options);\n };\n /**\n * Dispatches an event to this EventTarget.\n */\n SharedWorkerPolyfill.prototype.dispatchEvent = function (event) {\n return this.ActualWorker.dispatchEvent(event);\n };\n return SharedWorkerPolyfill;\n}());\nexport { SharedWorkerPolyfill };\nexport default SharedWorkerPolyfill;\n","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport config from '@/config';\nimport SignalRService from '@/shared/services/SignalRService';\nimport eventBus from 'pubsub-js';\nimport { getCurrentTime } from '@/shared/components/registration/registrationHelpers';\nimport api from '../api';\nimport SharedWorkerPolyfill from './SharedWorkerPolyfill';\nimport userStorage from './userStorage';\nimport AuthService, { functionalities, privileges } from './AuthService';\nvar lastRegStorageKey = 'LastTmrReg';\nvar TimerRegistrationService = /** @class */ (function () {\n function TimerRegistrationService() {\n }\n // Timer worker methods\n TimerRegistrationService.postMessageToWorker = function (message) {\n if (this.worker) {\n this.worker.postMessage(message);\n }\n };\n TimerRegistrationService.stopTimer = function () {\n this.postMessageToWorker({ event: 'stop' });\n };\n TimerRegistrationService.startTimer = function (registrationId) {\n if (AuthService.hasPermission({\n functionality: functionalities.RegistrationOwn,\n privilege: privileges.Create,\n }))\n this.postMessageToWorker({ event: 'start', registrationId: registrationId });\n };\n TimerRegistrationService.setRegistrationId = function (registrationId) {\n this.postMessageToWorker({ event: 'setRegistrationId', registrationId: registrationId });\n };\n TimerRegistrationService.createTimerRegistration = function (value) {\n var _b, _c;\n return __awaiter(this, void 0, void 0, function () {\n var data, result, registrationId;\n return __generator(this, function (_d) {\n switch (_d.label) {\n case 0:\n if (!AuthService.hasPermission({\n functionality: functionalities.RegistrationOwn,\n privilege: privileges.Create,\n })) {\n return [2 /*return*/, Promise.reject()];\n }\n return [4 /*yield*/, api.base.post(\"\".concat(config.appUrls.api, \"/api/TimerRegistration/StartTimer\"), value)];\n case 1:\n data = (_d.sent()).data;\n result = data;\n this.current = result;\n registrationId = (_c = (_b = this.current) === null || _b === void 0 ? void 0 : _b.registration) === null || _c === void 0 ? void 0 : _c.id;\n if (result === null || result === void 0 ? void 0 : result.registration) {\n userStorage.setItem(lastRegStorageKey, value);\n this.startTimer(registrationId);\n }\n eventBus.publish('timerRegistrationChanged');\n return [2 /*return*/, result];\n }\n });\n });\n };\n TimerRegistrationService.restartTimerRegistration = function () {\n return __awaiter(this, void 0, void 0, function () {\n var lastReg;\n return __generator(this, function (_b) {\n if (!AuthService.hasPermission({\n functionality: functionalities.RegistrationOwn,\n privilege: privileges.Create,\n })) {\n return [2 /*return*/, Promise.reject()];\n }\n lastReg = userStorage.getItem(lastRegStorageKey);\n if (!lastReg)\n return [2 /*return*/, Promise.resolve(null)];\n lastReg.fromMinutes = getCurrentTime();\n return [2 /*return*/, this.createTimerRegistration(lastReg)];\n });\n });\n };\n TimerRegistrationService.stopTimerRegistration = function (pause) {\n var _b;\n if (pause === void 0) { pause = false; }\n return __awaiter(this, void 0, void 0, function () {\n var data, result;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0:\n if (!AuthService.hasPermission({\n functionality: functionalities.RegistrationOwn,\n privilege: privileges.Create,\n })) {\n return [2 /*return*/, Promise.reject()];\n }\n if (!pause) {\n userStorage.setItem(lastRegStorageKey, null);\n }\n this.stopTimer();\n if (!((_b = this.current) === null || _b === void 0 ? void 0 : _b.registration))\n return [2 /*return*/, Promise.resolve(null)];\n return [4 /*yield*/, api.base.get(\"\".concat(config.appUrls.api, \"/api/TimerRegistration/StopTimer/\").concat(this.current.registration.id), {\n params: { now: getCurrentTime() },\n })];\n case 1:\n data = (_c.sent()).data;\n result = data;\n this.current = null;\n eventBus.publish('timerRegistrationChanged');\n return [2 /*return*/, result];\n }\n });\n });\n };\n TimerRegistrationService.pauseTimerRegistration = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_b) {\n return [2 /*return*/, this.stopTimerRegistration(true)];\n });\n });\n };\n var _a;\n _a = TimerRegistrationService;\n TimerRegistrationService.worker = null;\n TimerRegistrationService.current = null;\n TimerRegistrationService.SharedWorkerSupported = 'SharedWorker' in globalThis;\n TimerRegistrationService.init = function () {\n if (_a.SharedWorkerSupported) {\n _a.worker = new SharedWorkerPolyfill('/assets/scripts/timerSharedWorker.js', {\n name: 'TimerRegistrationWorker',\n });\n _a.worker.onmessage = _a.handleWorkerMessage;\n _a.worker.start();\n }\n SignalRService.subscribe('timerRegistrationUpdated', function (data) {\n var _b, _c;\n _a.current = data;\n var registrationId = (_c = (_b = _a.current) === null || _b === void 0 ? void 0 : _b.registration) === null || _c === void 0 ? void 0 : _c.id;\n _a.setRegistrationId(registrationId);\n eventBus.publish('timerRegistrationChanged');\n });\n if (AuthService.hasPermission({\n functionality: functionalities.RegistrationOwn,\n privilege: privileges.Create,\n })) {\n api.base.get(\"\".concat(config.appUrls.api, \"/api/TimerRegistration\")).then(function (_b) {\n var _c, _d;\n var data = _b.data;\n _a.current = data;\n var registrationId = (_d = (_c = _a.current) === null || _c === void 0 ? void 0 : _c.registration) === null || _d === void 0 ? void 0 : _d.id;\n _a.setRegistrationId(registrationId);\n eventBus.publish('timerRegistrationChanged');\n });\n }\n window.addEventListener('unload', function () {\n if (_a.worker) {\n _a.worker.postMessage({ event: 'disconnect' });\n _a.worker.close();\n }\n });\n };\n TimerRegistrationService.handleWorkerMessage = function (_b) {\n var data = _b.data;\n var message = data;\n if (!message)\n return;\n switch (message.event) {\n case 'tick': {\n _a.doTimerTick(message.registrationId);\n break;\n }\n default:\n break;\n }\n };\n TimerRegistrationService.doTimerTick = function (registrationId) {\n if (!AuthService.hasPermission({\n functionality: functionalities.RegistrationOwn,\n privilege: privileges.Update,\n })) {\n return;\n }\n api.base\n .get(\"\".concat(config.appUrls.api, \"/api/TimerRegistration/UpdateTimer/\").concat(registrationId), {\n params: { now: getCurrentTime() },\n })\n .then(function (_b) {\n var _c;\n var data = _b.data;\n _a.current = data;\n if (!((_c = _a.current) === null || _c === void 0 ? void 0 : _c.registration)) {\n _a.stopTimer();\n }\n }, function (error) {\n _a.current = null;\n _a.stopTimer();\n console.error(error);\n });\n };\n TimerRegistrationService.isRunning = function () {\n if (!_a.current)\n return false;\n return _a.current.isRunning;\n };\n TimerRegistrationService.getRunningRegistration = function () {\n if (!_a.current || !_a.current.isRunning)\n return null;\n return _a.current.registration;\n };\n TimerRegistrationService.isPaused = function () {\n if (_a.isRunning())\n return false;\n return !!userStorage.getItem(lastRegStorageKey);\n };\n return TimerRegistrationService;\n}());\nexport default TimerRegistrationService;\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport React, { useCallback, useContext, useEffect, useMemo, useRef } from 'react';\nimport { Method, TaskStatus, TaskType } from '@/modules/tasks/taskboard/kanban/constants';\nimport { useIntl } from 'react-intl';\nimport { getRelationName } from '@/shared/components/RelationName';\nimport SignalRService from '../services/SignalRService';\nimport { useDataContext } from './DataProvider';\nimport { getHoursMinutesFromTime, getTime } from '../utils/dateHelper';\nimport TimerRegistrationService from '../services/TimerRegistrationService';\nimport { useGetRunningTaskId } from '../hooks/task/useGetTimerRegistration';\nimport { formatListValue } from '../components/FormattedListValue';\nimport ToastrService from '../services/ToastrService';\nimport messages from '../messages/appMessages';\nimport { ModalType, useModalContext } from './ModalProvider';\nimport HandleHttpError from '../services/HandleHttpError';\nexport var TaskTimerContext = React.createContext(null);\nexport var useTaskTimerContext = function () {\n var ctx = useContext(TaskTimerContext);\n if (!ctx) {\n throw new Error('Wrap app with TaskTimerProvider');\n }\n return ctx;\n};\nvar TaskTimerProvider = function (_a) {\n var children = _a.children;\n var intl = useIntl();\n var setShowModalInfo = useModalContext().setShowModalInfo;\n var defaultCompany = useDataContext().defaultCompany;\n var isTimerRunningForSubTaskId = useGetRunningTaskId();\n // const { updateTaskStatus } = useUpdateTaskStatus();\n var tasks = useRef([]);\n var processTimeRegistrationResult = useCallback(function (timeRegistrationResult, isAffectedRegistration) {\n if (isAffectedRegistration === void 0) { isAffectedRegistration = false; }\n return __awaiter(void 0, void 0, void 0, function () {\n var registration, taskName, duration;\n var _a;\n return __generator(this, function (_b) {\n if (!timeRegistrationResult)\n return [2 /*return*/];\n registration = timeRegistrationResult.registration;\n taskName = null;\n if (registration === null || registration === void 0 ? void 0 : registration.plannedTaskId) {\n taskName =\n (_a = registration.plannedTaskName) !== null && _a !== void 0 ? _a : formatListValue({\n list: 'tasktemplate',\n id: registration.plannedTaskTemplateId,\n intl: intl,\n fallback: registration.plannedTaskName,\n });\n }\n if (timeRegistrationResult.isRunning) {\n ToastrService.success(taskName\n ? intl.formatMessage(messages.msgTaskTimeRegistrationStarted, { task: taskName })\n : intl.formatMessage(messages.msgTimerRegistrationStarted));\n }\n else if (timeRegistrationResult.discarded) {\n ToastrService.info(intl.formatMessage(messages.msgTaskTimeRegistrationDiscarded));\n }\n else {\n duration = getHoursMinutesFromTime(registration.durationMinutes);\n ToastrService.success(intl.formatMessage(messages.msgTaskTimeRegistrationCreated, {\n duration: duration,\n relation: getRelationName(intl, registration.relation),\n }), undefined, function () {\n var task = {\n relation: registration === null || registration === void 0 ? void 0 : registration.relation,\n mainTaskId: registration === null || registration === void 0 ? void 0 : registration.mainPlannedTaskId,\n mainTemplateId: registration === null || registration === void 0 ? void 0 : registration.mainTaskTemplateId,\n };\n setShowModalInfo({\n modalType: ModalType.TimeRegistration,\n task: task,\n registration: registration,\n });\n });\n }\n if (timeRegistrationResult.affectedRegistrations &&\n timeRegistrationResult.affectedRegistrations.length > 0) {\n timeRegistrationResult.affectedRegistrations.forEach(function (affectedRegistration) {\n processTimeRegistrationResult(affectedRegistration, true);\n });\n }\n return [2 /*return*/];\n });\n });\n }, [intl, setShowModalInfo]);\n var taskTimeRegistrationUpdatedHandler = useCallback(function (taskTimeRegistrationResult) {\n var _a;\n var subTask = (_a = tasks.current) === null || _a === void 0 ? void 0 : _a.find(function (x) { return x.id === taskTimeRegistrationResult.plannedTaskId; });\n if (!subTask)\n return;\n processTimeRegistrationResult(taskTimeRegistrationResult);\n }, [processTimeRegistrationResult, tasks]);\n useEffect(function () {\n SignalRService.subscribe('taskTimeRegistrationUpdated', taskTimeRegistrationUpdatedHandler);\n return function () {\n return SignalRService.unsubscribe('taskTimeRegistrationUpdated', taskTimeRegistrationUpdatedHandler);\n };\n }, [taskTimeRegistrationUpdatedHandler]);\n var stopTimer = useCallback(function (pause) {\n if (pause === void 0) { pause = false; }\n return __awaiter(void 0, void 0, void 0, function () {\n var timeRegistrationResult, e_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 3, , 4]);\n return [4 /*yield*/, TimerRegistrationService.stopTimerRegistration(pause)];\n case 1:\n timeRegistrationResult = _a.sent();\n return [4 /*yield*/, processTimeRegistrationResult(timeRegistrationResult)];\n case 2:\n _a.sent();\n return [3 /*break*/, 4];\n case 3:\n e_1 = _a.sent();\n HandleHttpError(intl)(e_1);\n return [3 /*break*/, 4];\n case 4: return [2 /*return*/];\n }\n });\n });\n }, [intl, processTimeRegistrationResult]);\n // Manuel click on button on subtask\n var startStopTimer = useCallback(function (t, subTask) { return __awaiter(void 0, void 0, void 0, function () {\n var runningRegistration, timerTaskId, mainTask, createStartTaskTimeRegistrationValues, timeRegistrationResult, e_2;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n subTask.disabled = true;\n runningRegistration = TimerRegistrationService.getRunningRegistration();\n timerTaskId = runningRegistration === null || runningRegistration === void 0 ? void 0 : runningRegistration.plannedTaskId;\n if (!(subTask.id === timerTaskId)) return [3 /*break*/, 1];\n // Stop timer\n stopTimer(true);\n subTask.disabled = false;\n return [3 /*break*/, 7];\n case 1:\n if (!subTask.resourceId) {\n // Maybe open modal instead?\n ToastrService.error(intl.formatMessage(messages.msgNoResourceDefined));\n return [2 /*return*/];\n }\n if (subTask.isBlocked) {\n // await updateTaskStatus({\n // id: subTask.id,\n // status: subTask.status,\n // isBlocked: !subTask.isBlocked,\n // inapplicable: subTask.inapplicable,\n // });\n }\n mainTask = t;\n createStartTaskTimeRegistrationValues = {\n invoiceStreamId: subTask.invoiceStreamId,\n resourceId: subTask.resourceId,\n plannedTaskId: subTask.id,\n fromMinutes: getTime(),\n plannedTaskTemplateId: subTask.templateId,\n plannedTaskName: subTask.name,\n mainPlannedTaskId: mainTask.id,\n mainTaskTemplateId: mainTask.templateId,\n mainPlannedTaskName: mainTask.name,\n referenceYear: subTask.year\n };\n _a.label = 2;\n case 2:\n _a.trys.push([2, 5, , 6]);\n return [4 /*yield*/, TimerRegistrationService.createTimerRegistration(createStartTaskTimeRegistrationValues)];\n case 3:\n timeRegistrationResult = _a.sent();\n return [4 /*yield*/, processTimeRegistrationResult(timeRegistrationResult)];\n case 4:\n _a.sent();\n return [3 /*break*/, 6];\n case 5:\n e_2 = _a.sent();\n HandleHttpError(intl)(e_2);\n return [3 /*break*/, 6];\n case 6:\n subTask.disabled = false;\n _a.label = 7;\n case 7: return [2 /*return*/];\n }\n });\n }); }, [intl, stopTimer, processTimeRegistrationResult]);\n // Status change after dragging or manual\n var startStopTimerAfterStatusChange = useCallback(function (t) { return __awaiter(void 0, void 0, void 0, function () {\n var runningRegistration, timerTaskId, subTasksWithTimer, taskType, mainTask;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (defaultCompany.taskTimeRegistrationMethod !== Method.AutomaticRegistration)\n return [2 /*return*/];\n runningRegistration = TimerRegistrationService.getRunningRegistration();\n timerTaskId = runningRegistration === null || runningRegistration === void 0 ? void 0 : runningRegistration.plannedTaskId;\n if (!!t.parentId) return [3 /*break*/, 3];\n // Main task\n if (t.status !== TaskStatus.Done)\n return [2 /*return*/];\n subTasksWithTimer = t.children.filter(function (x) {\n if (x.type === TaskType.DefaultTime ||\n x.type === TaskType.Mail ||\n x.type === TaskType.AutomaticMail) {\n return false;\n }\n return x.status === TaskStatus.Done && x.id === timerTaskId;\n });\n if (!(subTasksWithTimer.length > 0)) return [3 /*break*/, 2];\n return [4 /*yield*/, stopTimer()];\n case 1:\n _a.sent();\n _a.label = 2;\n case 2: return [2 /*return*/];\n case 3:\n taskType = t.type;\n if (taskType === TaskType.DefaultTime ||\n taskType === TaskType.Mail ||\n taskType === TaskType.AutomaticMail)\n return [2 /*return*/];\n if (!(t.status === TaskStatus.InProgress)) return [3 /*break*/, 5];\n mainTask = tasks.current.find(function (x) { return x.id === t.parentId; });\n return [4 /*yield*/, startStopTimer(mainTask, t)];\n case 4:\n _a.sent();\n return [2 /*return*/];\n case 5:\n if (t.id !== timerTaskId)\n return [2 /*return*/];\n // Moved from InProgress to another status\n return [4 /*yield*/, stopTimer()];\n case 6:\n // Moved from InProgress to another status\n _a.sent();\n return [2 /*return*/];\n }\n });\n }); }, [defaultCompany.taskTimeRegistrationMethod, tasks, stopTimer, startStopTimer]);\n var onSetTasks = useCallback(function (allTasks) { return __awaiter(void 0, void 0, void 0, function () {\n var tsks;\n var _a;\n return __generator(this, function (_b) {\n tsks = (_a = allTasks === null || allTasks === void 0 ? void 0 : allTasks.reduce(function (prev, t) { var _a; return __spreadArray(__spreadArray(__spreadArray([], prev, true), ((_a = t.children) !== null && _a !== void 0 ? _a : []), true), [t], false); }, [])) !== null && _a !== void 0 ? _a : [];\n tasks.current = tsks;\n return [2 /*return*/];\n });\n }); }, []);\n var value = useMemo(function () { return ({\n processTimeRegistrationResult: processTimeRegistrationResult,\n startStopTimerAfterStatusChange: startStopTimerAfterStatusChange,\n startStopTimer: startStopTimer,\n setTasks: onSetTasks,\n isTimerRunningForSubTaskId: isTimerRunningForSubTaskId,\n }); }, [\n processTimeRegistrationResult,\n startStopTimerAfterStatusChange,\n startStopTimer,\n onSetTasks,\n isTimerRunningForSubTaskId,\n ]);\n return _jsx(TaskTimerContext.Provider, __assign({ value: value }, { children: children }));\n};\nexport default TaskTimerProvider;\n","import TimerRegistrationService from '@/shared/services/TimerRegistrationService';\nimport { useEffect, useState } from 'react';\nimport eventBus from 'pubsub-js';\nexport var useGetTimerRegistration = function () {\n var _a = useState(TimerRegistrationService.getRunningRegistration()), registration = _a[0], setRegistration = _a[1];\n useEffect(function () {\n var sub = eventBus.subscribe('timerRegistrationChanged', function () {\n setRegistration(TimerRegistrationService.getRunningRegistration());\n });\n return function () {\n eventBus.unsubscribe(sub);\n };\n }, []);\n return registration;\n};\nexport var useGetRunningTaskId = function () {\n var registration = useGetTimerRegistration();\n return registration === null || registration === void 0 ? void 0 : registration.plannedTaskId;\n};\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { withAngularState } from '@/shared/services/StateService';\nimport withIntl from '@/shared/components/withIntl';\nimport { QueryClient, QueryClientProvider } from '@tanstack/react-query';\nimport DataProvider from '@/shared/providers/DataProvider';\nimport ModalProvider from '@/shared/providers/ModalProvider';\nimport TaskTimerProvider from './TaskTimerProvider';\nexport var withModalProvider = function (Component) { return function (_a) {\n var passThroughProps = __rest(_a, []);\n return (_jsx(ModalProvider, { children: _jsx(Component, __assign({}, passThroughProps)) }));\n}; };\nexport var withDataProvider = function (Component) { return function (_a) {\n var passThroughProps = __rest(_a, []);\n return (_jsx(DataProvider, { children: _jsx(Component, __assign({}, passThroughProps)) }));\n}; };\nvar queryClient = new QueryClient({\n defaultOptions: {\n queries: {\n refetchOnWindowFocus: false,\n },\n },\n});\nexport var withQueryClient = function (Component) { return function (_a) {\n var passThroughProps = __rest(_a, []);\n return (_jsx(QueryClientProvider, __assign({ client: queryClient }, { children: _jsx(Component, __assign({}, passThroughProps)) })));\n}; };\nexport var withTaskTimerProvider = function (Component) { return function (_a) {\n var passThroughProps = __rest(_a, []);\n return (_jsx(TaskTimerProvider, { children: _jsx(Component, __assign({}, passThroughProps)) }));\n}; };\nvar AppProviders = function (WrappedComponent) {\n // @ts-ignore\n return withAngularState(withIntl(WrappedComponent));\n};\nexport default AppProviders;\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { defaultGroupType, getTaskColor, states, } from '@/modules/tasks/taskboard/kanban/constants';\nimport taskMessages from '@/modules/tasks/taskMessages';\nimport { formatListValue } from '@/shared/components/FormattedListValue';\nimport { CommentIcon } from '@/shared/components/Icons';\nimport PopoverStickOnHover from '@/shared/components/PopoverStickOnHover';\nimport RelationName from '@/shared/components/RelationName';\nimport { FormattedDate, useIntl } from 'react-intl';\nimport { ModalType, useModalContext } from '@/shared/providers/ModalProvider';\nimport { hasAssignments } from '@/shared/components/security/HasAssignments';\nimport { mapInvoiceStreamName } from '@/shared/services/ObjectDisplayService';\nvar ClosedTask = function (_a) {\n var _b, _c, _d;\n var task = _a.task, collapseTask = _a.collapseTask, retrieveRemark = _a.retrieveRemark, remark = _a.remark, loadingRemark = _a.loadingRemark;\n var intl = useIntl();\n var setShowModalInfo = useModalContext().setShowModalInfo;\n var popoverHoverFocus = (_jsxs(\"span\", __assign({ id: \"popover-trigger-hover-focus\" }, { children: [loadingRemark && _jsx(\"i\", { className: \"fa fa-spinner fa-spin\" }), (remark === null || remark === void 0 ? void 0 : remark.remark) ? _jsx(\"span\", __assign({ style: { whiteSpace: 'pre-line' } }, { children: remark.remark })) : null, (remark === null || remark === void 0 ? void 0 : remark.remark) && remark.scheduleRemark ? (_jsx(\"hr\", { className: \"dark-line\", style: { marginTop: '10px', marginBottom: '10px' } })) : null, (remark === null || remark === void 0 ? void 0 : remark.scheduleRemark) ? (_jsx(\"span\", __assign({ style: { whiteSpace: 'pre-line' } }, { children: remark.scheduleRemark }))) : null] })));\n var taskColor = getTaskColor(task);\n var invoiceStreamName = mapInvoiceStreamName(task, intl);\n return (_jsx(\"td\", __assign({ onClick: function () { return collapseTask(task); }, colSpan: 4, className: \"dskb-cell dskb-header dskb-row-header dskb-group-container\" }, { children: _jsx(\"div\", __assign({ className: \"dskb-content-box\" }, { children: _jsx(\"div\", __assign({ className: \"dskb-group-wrapper\" }, { children: _jsx(\"div\", __assign({ className: \"dskb-group\", style: {\n backgroundColor: (_b = taskColor.backgroundColor) !== null && _b !== void 0 ? _b : defaultGroupType.backgroundColor,\n } }, { children: _jsx(\"table\", __assign({ style: { width: '100%' } }, { children: _jsx(\"tbody\", { children: _jsxs(\"tr\", { children: [_jsx(\"td\", { className: \"dskb-gripper\", style: {\n backgroundColor: (_c = taskColor.color) !== null && _c !== void 0 ? _c : defaultGroupType.color,\n } }), _jsx(\"td\", __assign({ className: \"dskb-group-content\" }, { children: _jsxs(\"div\", __assign({ className: \"row\" }, { children: [_jsx(\"div\", __assign({ className: \"col-sm-3\" }, { children: _jsxs(\"div\", __assign({ className: \"dskb-property dskb-property-editor\" }, { children: [_jsx(\"svg\", __assign({ stroke: \"currentColor\", fill: \"currentColor\", strokeWidth: \"0\", viewBox: \"0 0 384 512\", className: \"fa-fw\", height: \"1em\", width: \"1em\" }, { children: _jsx(\"path\", { d: \"M336 64h-80c0-35.3-28.7-64-64-64s-64 28.7-64 64H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zM96 424c-13.3 0-24-10.7-24-24s10.7-24 24-24 24 10.7 24 24-10.7 24-24 24zm0-96c-13.3 0-24-10.7-24-24s10.7-24 24-24 24 10.7 24 24-10.7 24-24 24zm0-96c-13.3 0-24-10.7-24-24s10.7-24 24-24 24 10.7 24 24-10.7 24-24 24zm96-192c13.3 0 24 10.7 24 24s-10.7 24-24 24-24-10.7-24-24 10.7-24 24-24zm128 368c0 4.4-3.6 8-8 8H168c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16zm0-96c0 4.4-3.6 8-8 8H168c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16zm0-96c0 4.4-3.6 8-8 8H168c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16z\" }) })), _jsx(\"span\", __assign({ className: \"bold\" }, { children: (_d = task.name) !== null && _d !== void 0 ? _d : formatListValue({\n list: 'tasktemplate',\n id: task.templateId,\n intl: intl,\n fallback: task.templateName,\n }) })), task.hasRemark || task.scheduleHasRemark ? (_jsx(PopoverStickOnHover, __assign({ trigger: ['hover', 'focus'], placement: \"right\", component: popoverHoverFocus, shouldUpdatePosition: true, onMouseEnter: retrieveRemark, onClick: function () {\n setShowModalInfo({ modalType: ModalType.TaskDetail, task: task });\n } }, { children: _jsx(\"span\", __assign({ className: \"margin10L explanation-icon\" }, { children: _jsx(CommentIcon, {}) })) }))) : null] })) })), _jsx(\"div\", __assign({ className: \"col-sm-3\" }, { children: task.relation && (_jsxs(\"div\", __assign({ className: \"dskb-property dskb-property-editor\" }, { children: [_jsx(RelationName, { relation: task.relation }), task.assignmentId && hasAssignments() && (_jsxs(\"span\", __assign({ style: { verticalAlign: 'text-top' } }, { children: [' - ', _jsx(\"span\", __assign({ title: \"\".concat(intl.formatMessage(taskMessages.Assignment), \": \").concat(invoiceStreamName) }, { children: invoiceStreamName }))] })))] }))) })), _jsx(\"div\", __assign({ className: \"col-sm-3\" }, { children: _jsx(\"div\", __assign({ className: \"dskb-property\" }, { children: formatListValue({\n list: 'taskStatus',\n id: states[task.status].status,\n intl: intl,\n fallback: states[task.status].name,\n }) })) })), _jsx(\"div\", __assign({ className: \"col-sm-3\" }, { children: _jsx(\"table\", __assign({ className: \"dskb-property dskb-property-editor dskb-property-table\" }, { children: _jsx(\"tbody\", { children: task.deadline ? (_jsx(\"tr\", { children: _jsxs(\"td\", { children: [intl.formatMessage(taskMessages.Deadline), ': ', _jsx(FormattedDate, { value: task.deadline.toString() })] }) })) : (_jsx(\"tr\", { children: _jsx(\"td\", { children: intl.formatMessage(taskMessages.NoDeadline) }) })) }) })) }))] })) }))] }) }) })) })) })) })) })));\n};\nexport default ClosedTask;\n","import config from '@/config';\nimport api from '@/shared/api';\nimport { useQuery } from '@tanstack/react-query';\nimport { useIntl } from 'react-intl';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport { TaskQueryKey } from './queryKey';\nexport var useGetPlannedTaskRemark = function (taskId, taskLevel, scheduleHasRemark, enabled) {\n var intl = useIntl();\n var _a = useQuery([TaskQueryKey.Remark, taskId], function () {\n var scheduleRemarkPromise = scheduleHasRemark\n ? api.base.get(\"\".concat(config.appUrls.tasks, \"/api/taskschedules/Remark/\").concat(taskId))\n : Promise.resolve({ data: null });\n var taskRemarkPromise = api.base.get(\"\".concat(config.appUrls.tasks, \"/api/plannedTasks/Remark/\").concat(taskId, \"?taskLevel=\").concat(taskLevel));\n return Promise.all([\n taskRemarkPromise,\n scheduleRemarkPromise,\n ]).then(function (_a) {\n var remark = _a[0].data, scheduleRemark = _a[1].data;\n return ({ remark: remark, scheduleRemark: scheduleRemark });\n });\n }, {\n enabled: enabled,\n onError: function (apiError) {\n handleHttpError(intl)(apiError);\n },\n retry: false,\n }), data = _a.data, isLoading = _a.isLoading, error = _a.error, refetch = _a.refetch;\n return {\n data: data,\n error: error,\n isLoading: isLoading,\n refetch: refetch,\n };\n};\n","import config from '@/config';\nimport api from '@/shared/api';\nimport { getTime } from '@/shared/utils/dateHelper';\nimport { useMutation } from '@tanstack/react-query';\nimport { useIntl } from 'react-intl';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nexport var useCreateTaskTimeRegistration = function () {\n var intl = useIntl();\n var _a = useMutation(function (values) { return api.base\n .post(\"\".concat(config.appUrls.api, \"/api/registration/CreateTaskTimeRegistration/?now=\").concat(getTime()), values)\n .then(function (res) { return res.data; }); }, {\n onError: function (apiError) {\n handleHttpError(intl)(apiError);\n }\n }), mutateAsync = _a.mutateAsync, isLoading = _a.isLoading, error = _a.error;\n return {\n createTaskTimeRegistration: mutateAsync,\n isLoading: isLoading,\n error: error,\n };\n};\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport config from '@/config';\nimport { TaskStatus } from '@/modules/tasks/taskboard/kanban/constants';\nimport api from '@/shared/api';\nimport { useTaskTimerContext } from '@/shared/providers/TaskTimerProvider';\nimport { useMutation, useQueryClient } from '@tanstack/react-query';\nimport { useIntl } from 'react-intl';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport cloneDeep from 'lodash-es/cloneDeep';\nimport { TaskQueryKey } from './queryKey';\nvar extractIndexes = function (previousTasks, taskToUpdate) {\n var taskIndex = previousTasks.findIndex(function (t) { return t.id === taskToUpdate.id; });\n var subTaskIndex = -1;\n if (taskIndex < 0) {\n // eslint-disable-next-line no-restricted-syntax\n for (var i = 0; i < previousTasks.length; i++) {\n subTaskIndex = previousTasks[i].children.findIndex(function (t) { return t.id === taskToUpdate.id; });\n if (subTaskIndex >= 0) {\n taskIndex = i;\n break;\n }\n }\n }\n return { taskIndex: taskIndex, subTaskIndex: subTaskIndex };\n};\nvar mapPropertiesAfterStatusChange = function (source, target) {\n if (!source || !target)\n return;\n target.status = source.status;\n target.isBlocked = source.isBlocked;\n target.inapplicable = source.inapplicable;\n target.rejected = source.rejected;\n target.taskColor = source.taskColor;\n};\nexport var useUpdateTaskStatus = function () {\n var intl = useIntl();\n var queryClient = useQueryClient();\n var startStopTimerAfterStatusChange = useTaskTimerContext().startStopTimerAfterStatusChange;\n var _a = useMutation(function (values) {\n return api.base\n .put(\"\".concat(config.appUrls.tasks, \"/api/plannedTasks/UpdateStatus\"), values)\n .then(function (res) { return res.data; });\n }, {\n onMutate: function (taskToUpdate) { return __awaiter(void 0, void 0, void 0, function () {\n var previousTasks, updatedTasks, mainTask, subTaskToUpdate, _a, taskIndex, subTaskIndex, amountDone, amountTotal;\n var _b, _c;\n return __generator(this, function (_d) {\n switch (_d.label) {\n case 0: \n // Cancel any outgoing refetches\n // (so they don't overwrite our optimistic update)\n return [4 /*yield*/, queryClient.cancelQueries({ queryKey: [TaskQueryKey.PlannedTasks] })];\n case 1:\n // Cancel any outgoing refetches\n // (so they don't overwrite our optimistic update)\n _d.sent();\n previousTasks = queryClient.getQueryData([TaskQueryKey.PlannedTasks]);\n updatedTasks = cloneDeep(previousTasks);\n mainTask = null;\n subTaskToUpdate = null;\n _a = extractIndexes((_b = previousTasks === null || previousTasks === void 0 ? void 0 : previousTasks.pages) === null || _b === void 0 ? void 0 : _b.flat(1), taskToUpdate), taskIndex = _a.taskIndex, subTaskIndex = _a.subTaskIndex;\n if (taskIndex >= 0) {\n mainTask = (_c = updatedTasks.pages) === null || _c === void 0 ? void 0 : _c.flat(1)[taskIndex];\n if (subTaskIndex >= 0) {\n subTaskToUpdate = mainTask.children[subTaskIndex];\n subTaskToUpdate.status = taskToUpdate.status;\n if (subTaskToUpdate.status === TaskStatus.Done) {\n subTaskToUpdate.taskColor = 0;\n }\n amountDone = mainTask.children.filter(function (f) { return f.status === TaskStatus.Done; }).length;\n amountTotal = mainTask.children.length;\n if (amountDone === amountTotal) {\n mainTask.status = TaskStatus.Done;\n mainTask.taskColor = 0;\n }\n }\n else {\n mainTask.status = taskToUpdate.status;\n if (mainTask.status === TaskStatus.Done) {\n mainTask.taskColor = 0;\n mainTask.children = mainTask.children.map(function (m) { return (__assign(__assign({}, m), { status: TaskStatus.Done, taskColor: 0 })); });\n }\n }\n }\n // Optimistically update to the new value\n queryClient.setQueryData([TaskQueryKey.PlannedTasks], updatedTasks);\n // Return a context with the previous and updated tasks\n return [2 /*return*/, {\n previousTasks: previousTasks,\n updatedTasks: updatedTasks,\n task: subTaskToUpdate !== null && subTaskToUpdate !== void 0 ? subTaskToUpdate : mainTask,\n }];\n }\n });\n }); },\n onSuccess: function (data, taskToUpdate, context) { return __awaiter(void 0, void 0, void 0, function () {\n var previousTasks, updatedTasksQueryData, previousMainTasks, updatedMainTask, previousMainTask, children_1, updatedSubtasks, task;\n var _a;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n previousTasks = context.previousTasks;\n updatedTasksQueryData = __assign({}, previousTasks);\n previousMainTasks = (_a = updatedTasksQueryData === null || updatedTasksQueryData === void 0 ? void 0 : updatedTasksQueryData.pages) === null || _a === void 0 ? void 0 : _a.flat(1);\n updatedMainTask = data.find(function (x) { return x.id && !x.parentId; });\n previousMainTask = previousMainTasks.find(function (x) { return x.id === (updatedMainTask === null || updatedMainTask === void 0 ? void 0 : updatedMainTask.id); });\n if (previousMainTask) {\n children_1 = previousMainTask.children;\n mapPropertiesAfterStatusChange(updatedMainTask, previousMainTask);\n updatedSubtasks = data.filter(function (x) { return x.id && x.parentId === (updatedMainTask === null || updatedMainTask === void 0 ? void 0 : updatedMainTask.id); });\n if (updatedSubtasks.length && children_1.length) {\n updatedSubtasks.forEach(function (updatedSubtask) {\n var previousSubtask = children_1.find(function (x) { return x.id === updatedSubtask.id; });\n mapPropertiesAfterStatusChange(updatedSubtask, previousSubtask);\n });\n }\n previousMainTask.children = __spreadArray([], children_1, true); // useEffect in KanbanBoard.tsx is not called without this line, and we need it to trigger the reshuffling of columns\n }\n queryClient.setQueryData([TaskQueryKey.PlannedTasks], updatedTasksQueryData);\n queryClient.invalidateQueries([TaskQueryKey.KPI]);\n task = context.task;\n if (!task) return [3 /*break*/, 2];\n return [4 /*yield*/, startStopTimerAfterStatusChange(task)];\n case 1:\n _b.sent();\n _b.label = 2;\n case 2: return [2 /*return*/];\n }\n });\n }); },\n // If the mutation fails,\n // use the context returned from onMutate to roll back\n onError: function (err, taskToUpdate, context) {\n queryClient.setQueryData([TaskQueryKey.PlannedTasks], context.previousTasks);\n handleHttpError(intl)(err);\n },\n }), mutateAsync = _a.mutateAsync, isLoading = _a.isLoading, error = _a.error;\n return {\n updateTaskStatus: mutateAsync,\n isLoading: isLoading,\n error: error,\n };\n};\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nexport var getKanbanBoardColumns = function (subTaskByStatusMap) {\n var list = [];\n subTaskByStatusMap.forEach(function (values, key) {\n list.push({\n id: key.toString(),\n itemIds: values.map(function (m) { return m.id; }),\n });\n });\n return list;\n};\nexport var getSubTaskByStatusMap = function (subTasks) {\n return subTasks.reduce(function (result, obj) {\n var subTasksByStatusArray = result.get(obj.status);\n if (subTasksByStatusArray) {\n result.set(obj.status, __spreadArray(__spreadArray([], subTasksByStatusArray, true), [obj], false));\n }\n else {\n result.set(obj.status, [obj]);\n }\n return result;\n }, new Map([\n [0, []],\n [1, []],\n [2, []],\n ]));\n};\nexport var getItemStyle = function (isDragging, draggableStyle) { return (__assign({}, draggableStyle)); };\nexport var getContainerListStyle = function () { return ({\n height: '100%',\n width: '100%',\n}); };\nexport var getListStyle = function (isDraggingOver) { return ({\n background: isDraggingOver ? '#dfddeb' : undefined,\n border: isDraggingOver ? '4px dashed #7564b6' : undefined,\n width: '100%',\n minHeight: '100%',\n}); };\nexport var getUser = function (userId, users) { return (users && userId ? users.find(function (x) { return x.id === userId; }) : null); };\n","import config from '@/config';\nimport api from '@/shared/api';\nimport { useMutation, useQueryClient } from '@tanstack/react-query';\nimport { useIntl } from 'react-intl';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport { TaskQueryKey } from './queryKey';\nexport var useUpdateAssignedUser = function () {\n var intl = useIntl();\n var queryClient = useQueryClient();\n var _a = useMutation(function (values) {\n return api.base\n .put(\"\".concat(config.appUrls.tasks, \"/api/plannedTasks/UpdateAssignedUser\"), {\n taskId: values.taskId,\n userId: values.userId,\n taskLevel: values.taskLevel,\n })\n .then(function (res) { return res.data; });\n }, {\n onSuccess: function () {\n queryClient.invalidateQueries([TaskQueryKey.PlannedTasks]);\n },\n onError: function (e) {\n handleHttpError(intl)(e);\n },\n }), mutateAsync = _a.mutateAsync, isLoading = _a.isLoading, error = _a.error;\n return {\n updateAssignedUser: mutateAsync,\n isLoading: isLoading,\n error: error,\n };\n};\n","import config from '@/config';\nimport taskMessages from '@/modules/tasks/taskMessages';\nimport api from '@/shared/api';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport ToastrService from '@/shared/services/ToastrService';\nimport { useMutation, useQueryClient } from '@tanstack/react-query';\nimport { useIntl } from 'react-intl';\nimport { TaskQueryKey } from './queryKey';\nexport var useDeletePlannedTask = function () {\n var intl = useIntl();\n var queryClient = useQueryClient();\n var _a = useMutation(function (values) {\n return api.base\n .delete(\"\".concat(config.appUrls.tasks, \"/api/plannedTasks/\").concat(values.taskId), {\n params: { taskLevel: values.taskLevel },\n })\n .then(function (res) { return res.data; });\n }, {\n onSuccess: function () {\n queryClient.invalidateQueries([TaskQueryKey.PlannedTasks]);\n ToastrService.success(intl.formatMessage(taskMessages.TaskDeleted));\n },\n onError: function (e) {\n handleHttpError(intl)(e);\n },\n }), mutateAsync = _a.mutateAsync, isLoading = _a.isLoading, error = _a.error;\n return {\n deletePlannedTask: mutateAsync,\n isLoading: isLoading,\n error: error,\n };\n};\n","var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport config from '@/config';\nimport api from '@/shared/api';\nimport { useQuery } from '@tanstack/react-query';\nimport { useIntl } from 'react-intl';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport { TaskQueryKey } from './queryKey';\nexport var useGetTaskAttachments = function (taskId, taskLevel, enabled) {\n var intl = useIntl();\n var retrieveAttachmentsForTaskIds = function (taskIds) {\n return api.base\n .post(\"\".concat(config.appUrls.documents, \"/api/documents/DocumentLinks\"), taskIds)\n .then(function (res) { return res.data; });\n };\n var _a = useQuery([TaskQueryKey.TaskAttachments, taskId], function () {\n // if hovered over a main task, we'll retrieve the subtask IDs and check which documents are linked to them as well\n if (taskLevel === 0) {\n return api.base\n .get(\"\".concat(config.appUrls.tasks, \"/api/plannedtasks/ChildTaskIds/\").concat(taskId))\n .then(function (_a) {\n var subtaskIds = _a.data;\n return retrieveAttachmentsForTaskIds(__spreadArray([taskId], subtaskIds, true));\n }, function () { return retrieveAttachmentsForTaskIds([taskId]); });\n }\n return retrieveAttachmentsForTaskIds([taskId]);\n }, {\n enabled: enabled,\n onError: function (apiError) {\n handleHttpError(intl)(apiError);\n },\n retry: false,\n }), data = _a.data, isLoading = _a.isLoading, error = _a.error, refetch = _a.refetch;\n return {\n data: data,\n error: error,\n isLoading: isLoading,\n refetch: refetch,\n };\n};\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport config from '@/config';\nimport api from '@/shared/api';\nimport { useMutation, useQueryClient } from '@tanstack/react-query';\nimport { useIntl } from 'react-intl';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport { findTaskById, updateTask } from '@/shared/utils/infiniteDataHelper';\nimport { TaskQueryKey } from './queryKey';\nvar updateTaskDeadline = function (oldData, newData) {\n if (!newData)\n return oldData;\n var newValue = __assign(__assign({}, oldData), { deadline: newData.deadline });\n var mainTask = newValue;\n var newMainTask = newData;\n if (!(mainTask === null || mainTask === void 0 ? void 0 : mainTask.children))\n return newValue;\n if (!(newMainTask === null || newMainTask === void 0 ? void 0 : newMainTask.children))\n return newValue;\n mainTask.children = mainTask.children.map(function (c) {\n var newChild = newMainTask.children.find(function (y) { return y.id === c.id; });\n if (!newChild)\n return c;\n return __assign(__assign({}, c), { deadline: newChild.deadline });\n });\n return mainTask;\n};\nexport var useUpdateTaskDeadline = function () {\n var intl = useIntl();\n var queryClient = useQueryClient();\n var _a = useMutation(function (values) {\n var _a;\n return api.base\n .put(\"\".concat(config.appUrls.tasks, \"/api/plannedTasks/deadline/\").concat(values.id, \"/\").concat((_a = values.deadline) === null || _a === void 0 ? void 0 : _a.format('YYYY-MM-DD')), null, {\n params: {\n taskLevel: values.taskLevel,\n },\n })\n .then(function (res) { return res.data; });\n }, {\n onMutate: function (taskToUpdate) { return __awaiter(void 0, void 0, void 0, function () {\n var currentData, result;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: \n // Cancel any outgoing refetches\n // (so they don't overwrite our optimistic update)\n return [4 /*yield*/, queryClient.cancelQueries({ queryKey: [TaskQueryKey.PlannedTasks] })];\n case 1:\n // Cancel any outgoing refetches\n // (so they don't overwrite our optimistic update)\n _a.sent();\n currentData = queryClient.getQueryData([TaskQueryKey.PlannedTasks]);\n result = findTaskById(currentData, taskToUpdate.id);\n if (result) {\n queryClient.setQueryData([TaskQueryKey.PlannedTasks], function (oldData) {\n return updateTask(oldData, taskToUpdate.id, function (x) { return (__assign(__assign({}, x), { deadline: taskToUpdate.deadline })); });\n });\n }\n return [2 /*return*/, { previousTask: result === null || result === void 0 ? void 0 : result.task }];\n }\n });\n }); },\n onSuccess: function (data) {\n queryClient.setQueryData([TaskQueryKey.PlannedTasks], function (oldData) {\n return updateTask(oldData, data.id, function (x) { return updateTaskDeadline(x, data); });\n });\n },\n onError: function (e, taskToUpdate, context) {\n queryClient.setQueryData([TaskQueryKey.PlannedTasks], function (oldData) {\n return updateTask(oldData, taskToUpdate.id, function (x) { return updateTaskDeadline(x, context === null || context === void 0 ? void 0 : context.previousTask); });\n });\n handleHttpError(intl)(e);\n },\n }), mutateAsync = _a.mutateAsync, isLoading = _a.isLoading, error = _a.error;\n return {\n updateTaskDeadline: mutateAsync,\n isLoading: isLoading,\n error: error,\n };\n};\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport React from 'react';\nimport { Dropdown, MenuItem } from 'react-bootstrap';\nvar CustomToggle = React.forwardRef(function (props, ref) {\n var children = props.children, onClick = props.onClick;\n function handleClick(e) {\n e.preventDefault();\n onClick(e);\n }\n return (_jsxs(\"a\", __assign({ onClick: handleClick, className: \"\", style: {}, ref: ref }, { children: [_jsx(\"i\", { className: \"fa fa-ellipsis-h\" }), children] })));\n});\nvar TaskDropdownButton = function (_a) {\n var disabled = _a.disabled, menuItems = _a.menuItems;\n return (_jsxs(Dropdown, __assign({ pullRight: true, id: \"task-dropdown-button\" }, { children: [_jsx(CustomToggle, { bsRole: \"toggle\" }), _jsx(Dropdown.Menu, { children: menuItems.map(function (menuItem) { return (_jsx(MenuItem, __assign({ onSelect: menuItem.onSelect, disabled: disabled }, { children: _jsxs(_Fragment, { children: [menuItem.icon, \" \", menuItem.title] }) }), menuItem.title)); }) })] })));\n};\nexport default TaskDropdownButton;\n","import config from '@/config';\nimport api from '@/shared/api';\nimport { useQuery } from '@tanstack/react-query';\nimport { useIntl } from 'react-intl';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport { TaskQueryKey } from './queryKey';\nimport createDOMPurify from 'dompurify';\nvar sanitizer = createDOMPurify();\nsanitizer.addHook('afterSanitizeAttributes', function (currentNode) {\n if ('target' in currentNode) {\n // Open all links in new tab / window\n currentNode.setAttribute('target', '_blank');\n // To prevent legacy browsers to pass confidential info across the link...\n // https://developer.chrome.com/docs/lighthouse/best-practices/external-anchors-use-rel-noopener\n currentNode.setAttribute('rel', 'noopener noreferrer');\n }\n});\nexport var useGetTaskDocumentation = function (taskTemplateId, enabled) {\n var intl = useIntl();\n var _a = useQuery([TaskQueryKey.TaskDocumentation, taskTemplateId], function () {\n return api.base.get(\"\".concat(config.appUrls.tasks, \"/api/taskTemplates/Documentation/\").concat(taskTemplateId)).then(function (_a) {\n var documentation = _a.data;\n return ({ documentation: sanitizer.sanitize(documentation || '') });\n });\n }, {\n enabled: enabled,\n onError: function (apiError) {\n handleHttpError(intl)(apiError);\n },\n retry: false,\n }), data = _a.data, isLoading = _a.isLoading, error = _a.error, refetch = _a.refetch;\n return {\n data: data,\n error: error,\n isLoading: isLoading,\n refetch: refetch,\n };\n};\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\n/* eslint-disable react/require-default-props */\nimport { useCallback, useMemo, useState } from 'react';\nimport classNames from 'classnames';\nimport moment from 'moment';\nimport { useIntl } from 'react-intl';\nimport { formatListValue } from '@/shared/components/FormattedListValue';\nimport PopoverStickOnHover from '@/shared/components/PopoverStickOnHover';\nimport { CommentIcon, PaperclipIcon } from '@/shared/components/Icons';\nimport { useCreateTaskTimeRegistration, } from '@/shared/hooks/task/registration/useCreateTaskTimeRegistration';\nimport { defaultItemType, getTaskColor, states, taskColors, TaskStatus, Method, } from '@/modules/tasks/taskboard/kanban/constants';\nimport authService, { functionalities, privileges } from '@/shared/services/AuthService';\nimport taskMessages from '@/modules/tasks/taskMessages';\nimport EditableUserSearch from '@/shared/components/editable/EditableUserSearch';\nimport { useDataContext } from '@/shared/providers/DataProvider';\nimport { useUpdateAssignedUser } from '@/shared/hooks/task/useUpdateAssignedUser';\nimport { useGetPlannedTaskRemark } from '@/shared/hooks/task/useGetPlannedTaskRemark';\nimport { ModalType, useModalContext } from '@/shared/providers/ModalProvider';\nimport { useUpdateTaskStatus } from '@/shared/hooks/task/useUpdateTaskStatus';\nimport { useTaskTimerContext } from '@/shared/providers/TaskTimerProvider';\nimport { useDeletePlannedTask } from '@/shared/hooks/task/useDeletePlannedTask';\nimport { useGetTaskAttachments } from '@/shared/hooks/task/useGetTaskAttachments';\nimport EditableDatePicker from '@/shared/components/editable/EditableDatePicker';\nimport ToastrService from '@/shared/services/ToastrService';\nimport appMessages from '@/shared/messages/appMessages';\nimport { useUpdateTaskDeadline } from '@/shared/hooks/task/useUpdateTaskDeadline';\nimport FormattedDateShort from '@/shared/components/FormattedDateShort';\nimport TaskDropdownButton from './TaskDropdownButton';\nimport { getUser } from '../helper';\nimport TaskAttachmentsPopover from '../../../TaskAttachmentsPopover';\nimport { useGetTaskDocumentation } from '@/shared/hooks/task/useGetTaskDocumentation';\nimport dompurify from 'dompurify';\nimport AuthService from '@/shared/services/AuthService';\nvar sanitizer = dompurify.sanitize;\nvar extracted = function (shareItem, subTask, toggleBlockItem, toggleInapplicable, toggleRejected, deleteItem, state, intl) {\n var canUpdateTask = AuthService.hasPermission({\n functionality: functionalities.PlannedTask,\n privilege: privileges.Update,\n });\n var menuItems = [\n {\n title: intl.formatMessage(taskMessages.Share),\n icon: _jsx(\"i\", { className: \"fa fa-fw fa-share-alt\" }),\n onSelect: function () {\n shareItem(subTask);\n },\n },\n canUpdateTask &&\n !subTask.isBlocked &&\n state.status !== 2 && {\n title: intl.formatMessage(taskMessages.Block),\n icon: (_jsxs(\"span\", __assign({ className: \"fa-stack fa-sm\" }, { children: [_jsx(\"i\", { className: \"fa fa-fw fa-circle fa-stack-2x fa-inverse\" }), _jsx(\"i\", { className: \"fa fa-fw fa-minus-circle fa-stack-2x text-danger\" })] }))),\n onSelect: function () {\n toggleBlockItem(subTask);\n },\n },\n canUpdateTask &&\n subTask.isBlocked && {\n title: intl.formatMessage(taskMessages.Unblock),\n icon: (_jsxs(\"span\", __assign({ className: \"fa-stack fa-sm\" }, { children: [_jsx(\"i\", { className: \"fa fa-fw fa-circle fa-stack-2x text-primary\" }), _jsx(\"i\", { className: \"fa fa-fw fa-arrow-up fa-stack-1x fa-inverse\", style: { top: '-1px', left: '-0.5px' } })] }))),\n onSelect: function () {\n toggleBlockItem(subTask);\n },\n },\n canUpdateTask &&\n !subTask.inapplicable && {\n title: intl.formatMessage(taskMessages.MarkAsInapplicable),\n icon: _jsx(\"i\", { className: \"fa fa-fw fa-user-times\" }),\n onSelect: function () {\n toggleInapplicable(subTask);\n },\n },\n canUpdateTask &&\n subTask.inapplicable && {\n title: intl.formatMessage(taskMessages.MarkAsApplicable),\n icon: _jsx(\"i\", { className: \"fa fa-fw fa-check-circle text-primary\" }),\n onSelect: function () {\n toggleInapplicable(subTask);\n },\n },\n canUpdateTask &&\n !subTask.rejected && {\n title: intl.formatMessage(taskMessages.MarkAsRejected),\n icon: _jsx(\"i\", { className: \"fa fa-fw fa-ban\" }),\n onSelect: function () {\n toggleRejected(subTask);\n },\n },\n canUpdateTask &&\n subTask.rejected && {\n title: intl.formatMessage(taskMessages.MarkAsNotRejected),\n icon: _jsx(\"i\", { className: \"fa fa-fw fa-check-circle text-primary\" }),\n onSelect: function () {\n toggleRejected(subTask);\n },\n },\n AuthService.hasPermission({\n functionality: functionalities.PlannedTask,\n privilege: privileges.Delete,\n }) && {\n title: intl.formatMessage(taskMessages.Delete),\n icon: (_jsx(\"span\", __assign({ className: \"fa-stack fa-sm\" }, { children: _jsx(\"i\", { className: \"fa fa-trash-o fa-fw fa-stack-2x\" }) }))),\n onSelect: function () {\n deleteItem(subTask);\n },\n },\n ];\n return menuItems.filter(function (f) { return !!f; });\n};\nvar SubTaskComponent = function (_a) {\n var _b, _c, _d;\n var task = _a.task, subTask = _a.subTask, shareItem = _a.shareItem, openTaskDetails = _a.openTaskDetails, reloadColumns = _a.reloadColumns, _e = _a.isDisabled, isDisabled = _e === void 0 ? false : _e, isDragging = _a.isDragging;\n var setShowModalInfo = useModalContext().setShowModalInfo;\n var users = useDataContext().users;\n var updateAssignedUser = useUpdateAssignedUser().updateAssignedUser;\n var updateTaskStatus = useUpdateTaskStatus().updateTaskStatus;\n var deletePlannedTask = useDeletePlannedTask().deletePlannedTask;\n var updateTaskDeadline = useUpdateTaskDeadline().updateTaskDeadline;\n var _f = useTaskTimerContext(), startStopTimer = _f.startStopTimer, isTimerRunningForSubTaskId = _f.isTimerRunningForSubTaskId, processTimeRegistrationResult = _f.processTimeRegistrationResult;\n var intl = useIntl();\n var createTaskTimeRegistration = useCreateTaskTimeRegistration().createTaskTimeRegistration;\n var _g = useState(false), loadDocumentation = _g[0], setLoadDocumentation = _g[1];\n var _h = useState(false), loadRemark = _h[0], setLoadRemark = _h[1];\n var _j = useState(false), loadAttachments = _j[0], setLoadAttachments = _j[1];\n var _k = useGetPlannedTaskRemark(subTask.id, 1, false, loadRemark), remark = _k.data, loadingRemark = _k.isLoading;\n var _l = useGetTaskDocumentation(subTask.templateId, loadDocumentation), documentation = _l.data, loadingDocumentation = _l.isLoading;\n var _m = useGetTaskAttachments(subTask.id, 1, loadAttachments), attachments = _m.data, loadingAttachments = _m.isLoading;\n var isTimerRunning = useMemo(function () { return isTimerRunningForSubTaskId === subTask.id; }, [\n subTask.id,\n isTimerRunningForSubTaskId,\n ]);\n var defaultCompany = useDataContext().defaultCompany;\n var retrieveRemark = function () {\n setLoadRemark(true);\n };\n var retrieveDocumentation = function () {\n setLoadDocumentation(true);\n };\n var retrieveAttachments = function () {\n setLoadAttachments(true);\n };\n var openTimeRegistrationDialog = function (s) {\n s.relation = task.relation;\n s.mainTaskId = task.id;\n s.mainTemplateId = task.templateId;\n setShowModalInfo({ modalType: ModalType.TimeRegistration, task: s });\n };\n var openMailDialog = function (s) {\n setShowModalInfo({\n modalType: ModalType.TaskMail,\n task: s,\n onSave: function () { return __awaiter(void 0, void 0, void 0, function () {\n var taskTimeRegistration, timeRegistrationResult;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, updateTaskStatus({\n id: s.id,\n status: TaskStatus.Done,\n isBlocked: s.isBlocked,\n inapplicable: s.inapplicable,\n rejected: s.rejected,\n })];\n case 1:\n _a.sent();\n if (!(defaultCompany.taskTimeRegistrationMethod === Method.AutomaticRegistration)) return [3 /*break*/, 6];\n if (!(s.defaultDuration && s.defaultDuration > 0)) return [3 /*break*/, 4];\n taskTimeRegistration = {\n plannedTaskId: s.id,\n plannedTaskTemplateId: s.templateId,\n plannedTaskName: s.name,\n invoiceStreamId: s.invoiceStreamId,\n relationId: s.relationId,\n resourceId: s.resourceId,\n durationMinutes: s.defaultDuration,\n mainPlannedTaskId: task.id,\n mainTaskTemplateId: task.templateId,\n mainPlannedTaskName: task.name,\n };\n return [4 /*yield*/, createTaskTimeRegistration(taskTimeRegistration)];\n case 2:\n timeRegistrationResult = _a.sent();\n return [4 /*yield*/, processTimeRegistrationResult(timeRegistrationResult)];\n case 3:\n _a.sent();\n return [3 /*break*/, 5];\n case 4:\n ToastrService.info(intl.formatMessage(appMessages.msgNoRegistrationMadeDefaultTimeZero));\n _a.label = 5;\n case 5: return [3 /*break*/, 7];\n case 6:\n if (defaultCompany.taskTimeRegistrationMethod === Method.OpenFormOnDone) {\n openTimeRegistrationDialog(s);\n }\n _a.label = 7;\n case 7:\n reloadColumns();\n return [2 /*return*/];\n }\n });\n }); },\n });\n };\n var onStartStopTimer = function () { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!!isDisabled) return [3 /*break*/, 2];\n return [4 /*yield*/, startStopTimer(task, subTask)];\n case 1:\n _a.sent();\n _a.label = 2;\n case 2: return [2 /*return*/];\n }\n });\n }); };\n var state = states[subTask.status];\n var getTaskTypeIcon = function () {\n switch (subTask.type) {\n case 0:\n return _jsx(\"i\", { className: \"fa fa-user task-type-icon\", style: { fontSize: '16px' } });\n case 1:\n return _jsx(\"i\", { className: \"fa fa-hourglass task-type-icon\" });\n case 2:\n return (_jsx(\"i\", { className: \"fa fa-question task-type-icon\", title: intl.formatMessage(taskMessages.TimeRegistrationIsNotPossibleTaskTypeCondition) }));\n case 3:\n if (state.status <= 1) {\n return (_jsx(\"i\", { className: \"fa fa-envelope action-icon task-type-icon clickable\", onClick: function () { return !isDisabled && openMailDialog(subTask); }, title: intl.formatMessage(taskMessages.SendMail) }));\n }\n if (state.status === 2) {\n return (_jsx(\"a\", __assign({ onClick: function () { return openTaskDetails(subTask); }, title: intl.formatMessage(taskMessages.OpenMailHistory) }, { children: _jsx(\"i\", { className: \"fa fa-envelope\" }) })));\n }\n return null;\n case 4:\n if (state.status <= 1) {\n return (_jsxs(\"span\", __assign({ onClick: function () { return !isDisabled && openMailDialog(subTask); }, title: intl.formatMessage(taskMessages.AutomaticMailTooltip), className: \"fa-stack fa-sm action-icon task-type-icon clickable\" }, { children: [_jsx(\"i\", { className: \"fa fa-calendar fa-stack-2x text-blue\" }), _jsx(\"i\", { className: \"fa fa-envelope fa-stack-15x \", style: { left: '2px', top: '5px' } })] })));\n }\n if (state.status === 2) {\n return (_jsx(\"a\", __assign({ onClick: function () { return openTaskDetails(subTask); }, title: intl.formatMessage(taskMessages.OpenMailHistory) }, { children: _jsx(\"i\", { className: \"fa fa-envelope\" }) })));\n }\n return null;\n default:\n return null;\n }\n };\n var toggleBlockItem = useCallback(function (s) {\n updateTaskStatus({\n id: s.id,\n status: s.status,\n isBlocked: !s.isBlocked,\n inapplicable: s.inapplicable,\n rejected: s.rejected,\n });\n }, [updateTaskStatus]);\n var toggleInapplicable = useCallback(function (s) {\n updateTaskStatus({\n id: s.id,\n status: s.status,\n isBlocked: s.isBlocked,\n inapplicable: !s.inapplicable,\n rejected: s.rejected,\n });\n }, [updateTaskStatus]);\n var toggleRejected = useCallback(function (s) {\n updateTaskStatus({\n id: s.id,\n status: s.status,\n isBlocked: s.isBlocked,\n inapplicable: s.inapplicable,\n rejected: !s.rejected,\n });\n }, [updateTaskStatus]);\n var onDeleteTask = useCallback(function (s) {\n setShowModalInfo({\n modalType: ModalType.YesNo,\n title: intl.formatMessage(taskMessages.DeleteTask),\n message: intl.formatMessage(taskMessages.DeleteTaskConfirmationMsg),\n onSave: function () { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n deletePlannedTask({ taskId: s.id, taskLevel: s.taskLevel });\n return [2 /*return*/];\n });\n }); },\n });\n }, [setShowModalInfo, deletePlannedTask, intl]);\n var menuItems = useMemo(function () {\n return extracted(shareItem, subTask, toggleBlockItem, toggleInapplicable, toggleRejected, onDeleteTask, state, intl);\n }, [\n shareItem,\n subTask,\n toggleBlockItem,\n toggleInapplicable,\n toggleRejected,\n onDeleteTask,\n state,\n intl,\n ]);\n var selectedUser = getUser((_b = subTask.userId) !== null && _b !== void 0 ? _b : task.userId, users);\n var canUpdateTask = useMemo(function () {\n return authService.hasPermission({\n functionality: functionalities.PlannedTask,\n privilege: privileges.Update,\n });\n }, []);\n var taskColor = getTaskColor(subTask);\n var remarkPopover = (_jsxs(\"span\", __assign({ id: \"popover-trigger-hover-focus\" }, { children: [loadingRemark ? _jsx(\"i\", { className: \"fa fa-spin fa-spinner\" }) : null, _jsx(\"span\", __assign({ style: { whiteSpace: 'pre-line' } }, { children: remark === null || remark === void 0 ? void 0 : remark.remark }))] })));\n var documentationPopover = (_jsxs(\"span\", __assign({ id: \"popover-trigger-hover-focus\" }, { children: [loadingDocumentation ? _jsx(\"i\", { className: \"fa fa-spin fa-spinner\" }) : null, _jsx(\"div\", { dangerouslySetInnerHTML: { __html: sanitizer(documentation === null || documentation === void 0 ? void 0 : documentation.documentation) } })] })));\n var showTimerRunning = useMemo(function () { return defaultCompany.taskTimeRegistrationMethod === 2 && isTimerRunning; }, [defaultCompany.taskTimeRegistrationMethod, isTimerRunning]);\n var onChangeUser = function (user) {\n var _a;\n var userId = (_a = user === null || user === void 0 ? void 0 : user.id) !== null && _a !== void 0 ? _a : null;\n updateAssignedUser({\n taskId: subTask.id,\n userId: userId,\n taskLevel: subTask.taskLevel,\n });\n };\n var onUpdateDeadline = function (deadline) {\n updateTaskDeadline({\n id: subTask.id,\n deadline: deadline || null,\n taskLevel: subTask.taskLevel,\n });\n };\n return (_jsx(\"div\", __assign({ className: \"dskb-item-container\", id: \"task_\".concat(subTask.id) }, { children: _jsxs(\"div\", __assign({ className: \"dskb-item-element\", style: {\n backgroundColor: isDragging\n ? taskColors.dragging.backgroundColor\n : taskColor.backgroundColor,\n } }, { children: [_jsx(\"div\", { className: classNames(showTimerRunning && 'tr-running-n') }), _jsx(\"div\", { className: \"dskb-gripper\", style: {\n backgroundColor: (_c = taskColor.color) !== null && _c !== void 0 ? _c : defaultItemType.color,\n } }), _jsx(\"div\", __assign({ className: \"dskb-count\" }, { children: _jsx(\"p\", { children: subTask.priority }) })), _jsxs(\"div\", __assign({ style: {\n flex: 1,\n marginTop: 5,\n marginBottom: 5,\n zIndex: showTimerRunning ? 1 : undefined,\n } }, { children: [_jsx(\"a\", __assign({ id: \"subtask-item-\".concat(subTask.name), className: classNames('name-property', (subTask.inapplicable || subTask.rejected) && 'strike'), onClick: function () { return openTaskDetails(subTask); } }, { children: (_d = subTask.name) !== null && _d !== void 0 ? _d : formatListValue({\n list: 'tasktemplate',\n id: subTask.templateId,\n intl: intl,\n fallback: subTask.templateName,\n }) })), _jsxs(\"div\", __assign({ style: { display: 'flex', alignItems: 'center' } }, { children: [_jsx(\"i\", { className: \"fa fa-calendar\", style: { marginRight: 5 } }), subTask.status !== 2 ? (_jsx(EditableDatePicker, { showClearDate: true, value: subTask.deadline ? moment.utc(subTask.deadline) : null, nullDisplayValue: intl.formatMessage(taskMessages.NoDeadline), onChange: function (deadline) { return onUpdateDeadline(deadline); }, readOnly: !canUpdateTask })) : subTask.deadline ? (_jsx(FormattedDateShort, { value: moment.utc(subTask.deadline).toDate() })) : (_jsx(\"span\", { children: intl.formatMessage(taskMessages.NoDeadline) })), state.status === 2 && subTask.completedDate && (_jsxs(_Fragment, { children: [_jsx(\"i\", { className: \"fa fa-check\", style: { marginRight: 5, marginLeft: 10 } }), _jsx(\"span\", { children: intl.formatDate(subTask.completedDate) })] }))] }))] })), _jsxs(\"div\", __assign({ style: {\n display: 'flex',\n flexDirection: 'column',\n margin: 5,\n zIndex: showTimerRunning ? 1 : undefined,\n } }, { children: [_jsxs(\"div\", __assign({ style: { display: 'flex', alignItems: 'center', justifyContent: 'flex-end' } }, { children: [subTask.isBlocked && (_jsx(\"i\", { className: \"fa fa-minus-circle text-danger blocked-icon\", title: intl.formatMessage(taskMessages.Blocked), style: { marginRight: 7 } })), subTask.hasAttachments && (_jsx(\"span\", __assign({ style: { marginRight: 7, marginTop: '4px' } }, { children: _jsx(PopoverStickOnHover, __assign({ trigger: ['hover', 'focus'], placement: \"top\", component: _jsx(TaskAttachmentsPopover, { attachments: attachments, loadingAttachments: loadingAttachments }), shouldUpdatePosition: true, onMouseEnter: retrieveAttachments, onClick: function () { return openTaskDetails(subTask); } }, { children: _jsx(\"span\", { children: _jsx(PaperclipIcon, {}) }) })) }))), subTask.hasRemark && (_jsx(\"span\", __assign({ style: { marginRight: 7, marginTop: '4px' } }, { children: _jsx(PopoverStickOnHover, __assign({ trigger: ['hover', 'focus'], placement: \"top\", component: remarkPopover, shouldUpdatePosition: true, onMouseEnter: retrieveRemark, onClick: function () { return openTaskDetails(subTask); } }, { children: _jsx(\"span\", { children: _jsx(CommentIcon, {}) }) })) }))), ((subTask.type !== 2 && defaultCompany.taskTimeRegistrationMethod !== 2) ||\n (subTask.type !== 2 &&\n defaultCompany.taskTimeRegistrationMethod === 2 &&\n state.status === 2)) &&\n !isTimerRunning && (_jsx(\"a\", __assign({ onClick: function () { return !isDisabled && openTimeRegistrationDialog(subTask); }, style: { marginRight: 7 } }, { children: _jsx(\"i\", { className: \"fa fa-clock-o\", title: intl.formatMessage(taskMessages.CreateTimeRegistration) }) }))), subTask.type !== 3 &&\n subTask.type !== 4 &&\n subTask.type !== 1 &&\n (isTimerRunning ||\n (state.status === 1 && defaultCompany.taskTimeRegistrationMethod === 2)) && (_jsx(\"a\", __assign({ onClick: onStartStopTimer, style: { marginRight: 7 } }, { children: isTimerRunning ? (_jsx(\"i\", { className: \"fa fa-pause-circle\", title: intl.formatMessage(taskMessages.PauseTimer) })) : (_jsx(\"i\", { className: \"fa fa-play-circle\", title: intl.formatMessage(taskMessages.StartTimer) })) }))), subTask.hasDocumentation && (_jsx(\"span\", __assign({ style: { marginRight: 7 } }, { children: _jsx(PopoverStickOnHover, __assign({ trigger: ['hover', 'focus'], placement: state.status === 2 ? 'left' : 'bottom', component: documentationPopover, shouldUpdatePosition: true, onMouseEnter: retrieveDocumentation, onClick: function () { return openTaskDetails(subTask); } }, { children: _jsx(\"i\", { className: \"fa fa-book\" }) })) }))), getTaskTypeIcon(), (menuItems === null || menuItems === void 0 ? void 0 : menuItems.length) > 0 && (_jsx(\"div\", __assign({ style: { display: 'flex', marginLeft: 7 } }, { children: _jsx(TaskDropdownButton, { disabled: false, menuItems: menuItems }) })))] })), _jsx(\"div\", __assign({ style: { flex: 1 } }, { children: _jsx(EditableUserSearch, { onChange: function (user) { return onChangeUser(user); }, value: selectedUser, className: classNames('bold-text', !subTask.userId && 'italic-text'), submitOnChange: true, withUnassigned: true, unassignedId: null }) }))] }))] })) }), \"\".concat(task.id).concat(subTask.id).concat(isTimerRunning)));\n};\nexport default SubTaskComponent;\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { useCreateTaskTimeRegistration, } from '@/shared/hooks/task/registration/useCreateTaskTimeRegistration';\nimport { useUpdateTaskStatus } from '@/shared/hooks/task/useUpdateTaskStatus';\nimport { useDataContext } from '@/shared/providers/DataProvider';\nimport { ModalType, useModalContext } from '@/shared/providers/ModalProvider';\nimport { useTaskTimerContext } from '@/shared/providers/TaskTimerProvider';\nimport ToastrService from '@/shared/services/ToastrService';\nimport { useEffect, useMemo, useState } from 'react';\nimport moment from 'moment';\nimport { DragDropContext, Draggable, Droppable, } from 'react-beautiful-dnd';\nimport { useIntl } from 'react-intl';\nimport taskMessages from '@/modules/tasks/taskMessages';\nimport authService, { functionalities, privileges } from '@/shared/services/AuthService';\nimport appMessages from '@/shared/messages/appMessages';\nimport { Method, TaskStatus, TaskType } from './constants';\nimport { getContainerListStyle, getItemStyle, getKanbanBoardColumns, getListStyle, getSubTaskByStatusMap, } from './helper';\nimport SubTaskComponent from './task/SubTask';\n// eslint-disable-next-line react/prop-types\nvar KanbanBoard = function (_a) {\n var task = _a.task, shareItem = _a.shareItem;\n var intl = useIntl();\n var subTaskByStatusMap = getSubTaskByStatusMap(task.children);\n var initialColumns = getKanbanBoardColumns(subTaskByStatusMap);\n var _b = useState(initialColumns), columns = _b[0], setColumns = _b[1];\n var updateTaskStatus = useUpdateTaskStatus().updateTaskStatus;\n var createTaskTimeRegistration = useCreateTaskTimeRegistration().createTaskTimeRegistration;\n var setShowModalInfo = useModalContext().setShowModalInfo;\n var _c = useDataContext(), defaultCompany = _c.defaultCompany, currentUserId = _c.currentUserId;\n var processTimeRegistrationResult = useTaskTimerContext().processTimeRegistrationResult;\n useEffect(function () {\n var updatedColumns = getKanbanBoardColumns(getSubTaskByStatusMap(task.children));\n setColumns(updatedColumns);\n }, [task.children]);\n var canCreateTask = useMemo(function () {\n return authService.hasPermission({\n functionality: functionalities.PlannedTask,\n privilege: privileges.Create,\n });\n }, []);\n var canUpdateTask = useMemo(function () {\n return authService.hasPermission({\n functionality: functionalities.PlannedTask,\n privilege: privileges.Update,\n });\n }, []);\n var onCreateSubTask = function () {\n var newSubTask = {\n parentId: task.id,\n parent: task,\n name: intl.formatMessage(taskMessages.NewTask),\n deadline: moment\n .utc(task.deadline)\n .utcOffset(0)\n .toISOString(),\n status: 0,\n invoiceStreamId: task.invoiceStreamId,\n relationId: task.relationId,\n relation: task.relation,\n userId: currentUserId,\n taskLevel: 1, // This is a subtask\n };\n setShowModalInfo({ modalType: ModalType.TaskDetail, task: newSubTask });\n };\n var updateStatus = function (subTaskToUpdate, status) { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, updateTaskStatus({\n id: subTaskToUpdate.id,\n status: status,\n isBlocked: subTaskToUpdate.isBlocked,\n inapplicable: false,\n rejected: false, // when dragging the task we'll always clear this status\n })];\n case 1:\n _a.sent();\n return [2 /*return*/];\n }\n });\n }); };\n var onTaskMailModalClosed = function (subTaskToUpdate, status) { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!(status === TaskStatus.InProgress)) return [3 /*break*/, 2];\n return [4 /*yield*/, updateTaskStatus({\n id: subTaskToUpdate.id,\n status: TaskStatus.Todo,\n isBlocked: subTaskToUpdate.isBlocked,\n inapplicable: subTaskToUpdate.inapplicable,\n rejected: subTaskToUpdate.rejected,\n })];\n case 1:\n _a.sent();\n ToastrService.info(intl.formatMessage(appMessages.msgTaskEmailCancelled));\n setColumns(columns);\n _a.label = 2;\n case 2: return [2 /*return*/];\n }\n });\n }); };\n var onTaskMailModalSaved = function (subTaskToUpdate) { return __awaiter(void 0, void 0, void 0, function () {\n var taskTimeRegistration, timeRegistrationResult, updatedColumns;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (subTaskToUpdate.type !== TaskType.Mail && subTaskToUpdate.type !== TaskType.AutomaticMail)\n return [2 /*return*/];\n return [4 /*yield*/, updateTaskStatus({\n id: subTaskToUpdate.id,\n status: TaskStatus.Done,\n isBlocked: subTaskToUpdate.isBlocked,\n inapplicable: subTaskToUpdate.inapplicable,\n rejected: subTaskToUpdate.rejected,\n })];\n case 1:\n _a.sent();\n if (!(defaultCompany.taskTimeRegistrationMethod === Method.AutomaticRegistration)) return [3 /*break*/, 6];\n if (!(subTaskToUpdate.defaultDuration && subTaskToUpdate.defaultDuration > 0)) return [3 /*break*/, 4];\n taskTimeRegistration = {\n plannedTaskId: subTaskToUpdate.id,\n plannedTaskTemplateId: subTaskToUpdate.templateId,\n plannedTaskName: subTaskToUpdate.name,\n invoiceStreamId: subTaskToUpdate.invoiceStreamId,\n relationId: subTaskToUpdate.relationId,\n resourceId: subTaskToUpdate.resourceId,\n durationMinutes: subTaskToUpdate.defaultDuration,\n mainPlannedTaskId: task.id,\n mainTaskTemplateId: task.templateId,\n mainPlannedTaskName: task.name,\n };\n return [4 /*yield*/, createTaskTimeRegistration(taskTimeRegistration)];\n case 2:\n timeRegistrationResult = _a.sent();\n return [4 /*yield*/, processTimeRegistrationResult(timeRegistrationResult)];\n case 3:\n _a.sent();\n return [3 /*break*/, 5];\n case 4:\n ToastrService.info(intl.formatMessage(appMessages.msgNoRegistrationMadeDefaultTimeZero));\n _a.label = 5;\n case 5: return [3 /*break*/, 7];\n case 6:\n if (defaultCompany.taskTimeRegistrationMethod === Method.OpenFormOnDone) {\n subTaskToUpdate.relation = task.relation;\n subTaskToUpdate.mainTaskId = task.id;\n subTaskToUpdate.mainTemplateId = task.templateId;\n setShowModalInfo({ modalType: ModalType.TimeRegistration, task: subTaskToUpdate });\n }\n _a.label = 7;\n case 7:\n updatedColumns = getKanbanBoardColumns(getSubTaskByStatusMap(task.children));\n setColumns(updatedColumns);\n return [2 /*return*/];\n }\n });\n }); };\n var onOpenTaskDetails = function (taskToOpen) {\n setShowModalInfo({\n modalType: ModalType.TaskDetail,\n task: taskToOpen,\n onTaskMailModalSaved: function () { return onTaskMailModalSaved(taskToOpen); },\n });\n };\n var onTaskStateChange = function (subTaskToUpdate, status, prevStatus) { return __awaiter(void 0, void 0, void 0, function () {\n var updateBoard, taskType, taskTimeRegistration, timeRegistrationResult;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n updateBoard = false;\n if (status === prevStatus)\n return [2 /*return*/];\n taskType = subTaskToUpdate.type;\n subTaskToUpdate.isBlocked = false; // when moving a task we'll always unblock it\n if (!((taskType === TaskType.Mail || taskType === TaskType.AutomaticMail) &&\n status === TaskStatus.InProgress)) return [3 /*break*/, 1];\n subTaskToUpdate.relation = task.relation;\n setShowModalInfo({\n modalType: ModalType.TaskMail,\n task: subTaskToUpdate,\n onSave: function () { return onTaskMailModalSaved(subTaskToUpdate); },\n onClose: function () { return onTaskMailModalClosed(subTaskToUpdate, status); },\n });\n updateBoard = true;\n return [3 /*break*/, 5];\n case 1:\n if (!((taskType === TaskType.Mail || taskType === TaskType.AutomaticMail) &&\n status === TaskStatus.Done)) return [3 /*break*/, 3];\n return [4 /*yield*/, updateStatus(subTaskToUpdate, status)];\n case 2:\n _a.sent();\n updateBoard = true;\n ToastrService.info(intl.formatMessage(appMessages.taskMgmtSendMailContent), intl.formatMessage(appMessages.taskMgmtSendMailTitle), function () {\n subTaskToUpdate.relation = task.relation;\n setShowModalInfo({\n modalType: ModalType.TaskMail,\n task: subTaskToUpdate,\n onSave: function () { return onTaskMailModalSaved(subTaskToUpdate); },\n onClose: function () { return onTaskMailModalClosed(subTaskToUpdate, status); },\n });\n });\n return [3 /*break*/, 5];\n case 3: return [4 /*yield*/, updateStatus(subTaskToUpdate, status)];\n case 4:\n _a.sent();\n updateBoard = true;\n if (status === TaskStatus.Done &&\n defaultCompany.taskTimeRegistrationMethod === Method.OpenFormOnDone &&\n taskType !== TaskType.Condition) {\n // Move to 'Done' should open registration form\n subTaskToUpdate.relation = task.relation;\n subTaskToUpdate.mainTaskId = task.id;\n subTaskToUpdate.mainTemplateId = task.templateId;\n setShowModalInfo({ modalType: ModalType.TimeRegistration, task: subTaskToUpdate });\n }\n _a.label = 5;\n case 5:\n if (!(status === TaskStatus.Done &&\n (taskType === TaskType.DefaultTime ||\n taskType === TaskType.Mail ||\n taskType === TaskType.AutomaticMail) &&\n defaultCompany.taskTimeRegistrationMethod === Method.AutomaticRegistration)) return [3 /*break*/, 9];\n if (!(subTaskToUpdate.defaultDuration && subTaskToUpdate.defaultDuration > 0)) return [3 /*break*/, 8];\n taskTimeRegistration = {\n plannedTaskId: subTaskToUpdate.id,\n plannedTaskTemplateId: subTaskToUpdate.templateId,\n plannedTaskName: subTaskToUpdate.name,\n invoiceStreamId: subTaskToUpdate.invoiceStreamId,\n relationId: subTaskToUpdate.relationId,\n resourceId: subTaskToUpdate.resourceId,\n durationMinutes: subTaskToUpdate.defaultDuration,\n mainPlannedTaskId: task.id,\n mainTaskTemplateId: task.templateId,\n mainPlannedTaskName: task.name,\n };\n return [4 /*yield*/, createTaskTimeRegistration(taskTimeRegistration)];\n case 6:\n timeRegistrationResult = _a.sent();\n return [4 /*yield*/, processTimeRegistrationResult(timeRegistrationResult)];\n case 7:\n _a.sent();\n return [3 /*break*/, 9];\n case 8:\n ToastrService.info(intl.formatMessage(appMessages.msgNoRegistrationMadeDefaultTimeZero));\n _a.label = 9;\n case 9: return [2 /*return*/, updateBoard];\n }\n });\n }); };\n var onDragEnd = function (result) { return __awaiter(void 0, void 0, void 0, function () {\n var source, destination, startColumn, finishColumn, startItemIds, movingItemId, subTaskToUpdate, newStartColumn, finishItemIds, newFinishColumn, newColumns, startIndex, finishIndex, prevStatus, status, updateBoard;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n // dropped nowhere\n if (!result.destination) {\n return [2 /*return*/];\n }\n source = result.source;\n destination = result.destination;\n startColumn = columns.find(function (f) { return f.id === source.droppableId; });\n finishColumn = columns.find(function (f) { return f.id === destination.droppableId; });\n // did not move anywhere - can bail early\n if (source.droppableId === destination.droppableId && source.index === destination.index) {\n return [2 /*return*/];\n }\n // same columns\n if (startColumn === finishColumn) {\n return [2 /*return*/];\n }\n startItemIds = Array.from(startColumn.itemIds);\n movingItemId = startColumn.itemIds[source.index];\n subTaskToUpdate = task.children.find(function (f) { return f.id === movingItemId; });\n startItemIds.splice(source.index, 1);\n newStartColumn = __assign(__assign({}, startColumn), { itemIds: startItemIds });\n finishItemIds = Array.from(finishColumn.itemIds);\n finishItemIds.splice(destination.index, 0, movingItemId);\n newFinishColumn = __assign(__assign({}, finishColumn), { itemIds: finishItemIds });\n newColumns = columns.slice();\n startIndex = columns.findIndex(function (f) { return f.id === source.droppableId; });\n newColumns[startIndex] = newStartColumn;\n finishIndex = columns.findIndex(function (f) { return f.id === destination.droppableId; });\n newColumns[finishIndex] = newFinishColumn;\n prevStatus = Number(source.droppableId);\n status = Number(destination.droppableId);\n if (subTaskToUpdate.type === TaskType.Condition && status === TaskStatus.InProgress) {\n ToastrService.info(intl.formatMessage(appMessages.msgTaskOfTypeConditionCannotBeSetInProgress));\n newColumns[startIndex] = startColumn;\n newColumns[finishIndex] = finishColumn;\n setColumns(newColumns);\n return [2 /*return*/];\n }\n setColumns(newColumns);\n return [4 /*yield*/, onTaskStateChange(subTaskToUpdate, status, prevStatus)];\n case 1:\n updateBoard = _a.sent();\n if (!updateBoard) {\n setColumns(columns);\n }\n return [2 /*return*/];\n }\n });\n }); };\n var reloadColumns = function () {\n var updatedColumns = getKanbanBoardColumns(getSubTaskByStatusMap(task.children));\n setColumns(updatedColumns);\n };\n var getElement = function (provided, snapshot, subTask) { return (_jsx(\"div\", __assign({ ref: provided.innerRef }, provided.draggableProps, provided.dragHandleProps, { style: getItemStyle(snapshot.isDragging, provided.draggableProps.style) }, { children: _jsx(\"div\", { children: _jsx(\"div\", __assign({ className: \"dskb-content-box\" }, { children: _jsx(SubTaskComponent, { isDragging: snapshot.isDragging, task: task, subTask: subTask, shareItem: shareItem, openTaskDetails: onOpenTaskDetails, reloadColumns: reloadColumns }, \"\".concat(task.id).concat(subTask.id)) })) }) }))); };\n var getItemList = function (column, dropProvided, dropSnapshot) { return (_jsxs(\"div\", __assign({ ref: dropProvided.innerRef }, dropProvided.droppableProps, { style: getListStyle(dropSnapshot.isDraggingOver) }, { children: [column.itemIds.map(function (itemId, index) {\n var item = task.children.find(function (f) { return f.id === itemId; });\n if (!item)\n return;\n return (_jsx(Draggable, __assign({ draggableId: item.id + column.id, index: index, isDragDisabled: !canUpdateTask }, { children: function (provided, snapshot) { return getElement(provided, snapshot, item); } }), item.id + column.id));\n }), _jsx(\"div\", __assign({ style: { width: '25vw' } }, { children: dropProvided.placeholder })), column.id === '0' && canCreateTask && (_jsx(\"div\", { children: _jsx(\"button\", __assign({ type: \"button\", className: \"btn btn-default btn-xsm\", style: { marginTop: column.itemIds.length > 0 ? '10px' : '0px' }, onClick: onCreateSubTask, title: intl.formatMessage(taskMessages.NewTask) }, { children: _jsx(\"i\", { className: \"fa fa-plus\" }) })) }))] }))); };\n var getColumn = function (column) { return (_jsx(\"td\", __assign({ className: \"dskb-cell dskb-items-container\" }, { children: _jsx(\"div\", __assign({ className: \"kanban-item-mjr\", style: getContainerListStyle() }, { children: _jsx(Droppable, __assign({ droppableId: column.id, type: \"ITEM\", isDropDisabled: !canUpdateTask }, { children: function (dropProvided, dropSnapshot) {\n return getItemList(column, dropProvided, dropSnapshot);\n } })) })) }), column.id)); };\n return (_jsx(DragDropContext, __assign({ onDragEnd: onDragEnd }, { children: columns.map(function (column) { return getColumn(column); }) })));\n};\nexport default KanbanBoard;\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport moment from 'moment';\nimport { defaultGroupType, getTaskColor } from '@/modules/tasks/taskboard/kanban/constants';\nimport EditableEnumSelectV2 from '@/shared/components/editable/EditableEnumSelectV2';\nimport EditableUserSearch from '@/shared/components/editable/EditableUserSearch';\nimport { formatListValue } from '@/shared/components/FormattedListValue';\nimport { CommentIcon, PaperclipIcon } from '@/shared/components/Icons';\nimport PopoverStickOnHover from '@/shared/components/PopoverStickOnHover';\nimport RelationName from '@/shared/components/RelationName';\nimport { useUpdateAssignedUser } from '@/shared/hooks/task/useUpdateAssignedUser';\nimport { useUpdateTaskStatus } from '@/shared/hooks/task/useUpdateTaskStatus';\nimport { useDataContext } from '@/shared/providers/DataProvider';\nimport { mapInvoiceStreamName } from '@/shared/services/ObjectDisplayService';\nimport { useCallback, useMemo, useState } from 'react';\nimport { useIntl } from 'react-intl';\nimport authService, { functionalities, privileges } from '@/shared/services/AuthService';\nimport taskMessages from '@/modules/tasks/taskMessages';\nimport { hasAssignments } from '@/shared/components/security/HasAssignments';\nimport EditableDatePicker from '@/shared/components/editable/EditableDatePicker';\nimport guid from '@/shared/utils/guid';\nimport { ModalType, useModalContext } from '@/shared/providers/ModalProvider';\nimport { useDeletePlannedTask } from '@/shared/hooks/task/useDeletePlannedTask';\nimport { useQueryClient } from '@tanstack/react-query';\nimport { TaskQueryKey } from '@/shared/hooks/task/queryKey';\nimport { useGetTaskAttachments } from '@/shared/hooks/task/useGetTaskAttachments';\nimport { useUpdateTaskDeadline } from '@/shared/hooks/task/useUpdateTaskDeadline';\nimport TaskDropdownButton from './TaskDropdownButton';\nimport { getUser } from '../helper';\nimport TaskAttachmentsPopover from '../../../TaskAttachmentsPopover';\nimport { useGetTaskDocumentation } from '@/shared/hooks/task/useGetTaskDocumentation';\nimport dompurify from 'dompurify';\nimport AuthService from '@/shared/services/AuthService';\nimport HasFeature from '@/shared/components/security/HasFeature';\nvar sanitizer = dompurify.sanitize;\nvar MainTask = function (_a) {\n var _b, _c, _d;\n var task = _a.task, shareItem = _a.shareItem, openTaskDetails = _a.openTaskDetails, retrieveRemark = _a.retrieveRemark, remark = _a.remark, loadingRemark = _a.loadingRemark;\n var users = useDataContext().users;\n var updateAssignedUser = useUpdateAssignedUser().updateAssignedUser;\n var updateTaskStatus = useUpdateTaskStatus().updateTaskStatus;\n var updateTaskDeadline = useUpdateTaskDeadline().updateTaskDeadline;\n var intl = useIntl();\n var setShowModalInfo = useModalContext().setShowModalInfo;\n var deletePlannedTask = useDeletePlannedTask().deletePlannedTask;\n var queryClient = useQueryClient();\n var deleteItem = useCallback(function (t) {\n setShowModalInfo({\n modalType: ModalType.YesNo,\n title: intl.formatMessage(taskMessages.DeleteTask),\n message: intl.formatMessage(taskMessages.DeleteMainTaskConfirmationMsg),\n onSave: function () { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, deletePlannedTask({ taskId: t.id, taskLevel: t.taskLevel })];\n case 1:\n _a.sent();\n return [4 /*yield*/, queryClient.invalidateQueries([TaskQueryKey.KPI])];\n case 2:\n _a.sent();\n return [2 /*return*/];\n }\n });\n }); },\n });\n }, [setShowModalInfo, deletePlannedTask, queryClient, intl]);\n var taskColor = getTaskColor(task);\n var backgroundColor = (_b = taskColor.backgroundColor) !== null && _b !== void 0 ? _b : defaultGroupType.backgroundColor;\n var _e = useState(false), loadDocumentation = _e[0], setLoadDocumentation = _e[1];\n var _f = useGetTaskDocumentation(task.templateId, loadDocumentation), documentation = _f.data, loadingDocumentation = _f.isLoading;\n var _g = useState(false), loadAttachments = _g[0], setLoadAttachments = _g[1];\n var _h = useGetTaskAttachments(task.id, 0, loadAttachments), attachments = _h.data, loadingAttachments = _h.isLoading;\n var documentationPopover = (_jsxs(\"span\", __assign({ id: \"popover-trigger-hover-focus\" }, { children: [loadingDocumentation ? _jsx(\"i\", { className: \"fa fa-spin fa-spinner\" }) : null, _jsx(\"div\", { dangerouslySetInnerHTML: { __html: sanitizer(documentation === null || documentation === void 0 ? void 0 : documentation.documentation) } })] })));\n var menuItems = useMemo(function () {\n var items = [\n {\n title: intl.formatMessage(taskMessages.Share),\n icon: _jsx(\"i\", { className: \"fa fa-fw fa-share-alt\" }),\n onSelect: function () {\n shareItem(task);\n },\n },\n ];\n if (AuthService.hasPermission({\n functionality: functionalities.PlannedTask,\n privilege: privileges.Delete,\n })) {\n items.push({\n title: intl.formatMessage(taskMessages.Delete),\n icon: (_jsx(\"span\", __assign({ className: \"fa-stack fa-sm\" }, { children: _jsx(\"i\", { className: \"fa fa-trash-o fa-fw fa-stack-2x\" }) }))),\n onSelect: function () {\n deleteItem(task);\n },\n });\n }\n return items;\n }, [shareItem, task, deleteItem, intl]);\n var popoverHoverFocus = (_jsxs(\"span\", __assign({ id: \"popover-trigger-hover-focus\" }, { children: [loadingRemark && _jsx(\"i\", { className: \"fa fa-spinner fa-spin\" }), (remark === null || remark === void 0 ? void 0 : remark.remark) ? _jsx(\"span\", __assign({ style: { whiteSpace: 'pre-line' } }, { children: remark.remark })) : null, (remark === null || remark === void 0 ? void 0 : remark.remark) && remark.scheduleRemark ? (_jsx(\"hr\", { className: \"dark-line\", style: { marginTop: '10px', marginBottom: '10px' } })) : null, (remark === null || remark === void 0 ? void 0 : remark.scheduleRemark) ? (_jsx(\"span\", __assign({ style: { whiteSpace: 'pre-line' } }, { children: remark.scheduleRemark }))) : null] })));\n var onChangeUser = function (user) {\n var _a;\n var userId = (_a = user === null || user === void 0 ? void 0 : user.id) !== null && _a !== void 0 ? _a : guid.empty;\n updateAssignedUser({\n taskId: task.id,\n userId: userId,\n taskLevel: task.taskLevel,\n });\n };\n var onUpdateDeadline = function (deadline) {\n updateTaskDeadline({\n id: task.id,\n deadline: deadline || null,\n taskLevel: task.taskLevel,\n });\n };\n var onChangeTaskStatus = function (status) {\n updateTaskStatus({\n id: task.id,\n status: status,\n isBlocked: task.isBlocked,\n inapplicable: task.inapplicable,\n rejected: task.rejected,\n });\n };\n var selectedUser = getUser(task.userId, users);\n var retrieveAttachments = function () {\n setLoadAttachments(true);\n };\n var retrieveDocumentation = function () {\n setLoadDocumentation(true);\n };\n var canCreateRegistration = useMemo(function () {\n return authService.hasPermission({\n functionality: functionalities.RegistrationOwn,\n privilege: privileges.Create,\n });\n }, []);\n var canUpdateTask = useMemo(function () {\n return authService.hasPermission({\n functionality: functionalities.PlannedTask,\n privilege: privileges.Update,\n });\n }, []);\n var openTimeRegistrationDialog = function (t) {\n t.relation = task.relation;\n t.mainTaskId = task.id;\n t.mainTemplateId = task.templateId;\n setShowModalInfo({ modalType: ModalType.TimeRegistration, task: t });\n };\n var invoiceStreamName = mapInvoiceStreamName(task, intl);\n return (_jsx(\"div\", __assign({ className: \"dskb-group-wrapper\" }, { children: _jsxs(\"div\", __assign({ className: \"dskb-group\", style: {\n backgroundColor: backgroundColor,\n } }, { children: [_jsxs(\"div\", __assign({ className: \"dskb-item-commands-container\" }, { children: [canCreateRegistration && (_jsx(\"a\", __assign({ onClick: function () { return openTimeRegistrationDialog(task); }, style: { marginRight: 7 } }, { children: _jsx(\"i\", { className: \"fa fa-clock-o\", title: intl.formatMessage(taskMessages.CreateTimeRegistration) }) }))), task.hasDocumentation && (_jsx(\"a\", __assign({ style: { marginRight: 7 } }, { children: _jsx(PopoverStickOnHover, __assign({ trigger: ['hover', 'focus'], placement: \"right\", component: documentationPopover, shouldUpdatePosition: true, onMouseEnter: retrieveDocumentation, onClick: function () { return openTaskDetails(task); } }, { children: _jsx(\"i\", { className: \"fa fa-book\" }) })) }))), _jsx(\"div\", __assign({ className: \"btn-group\" }, { children: _jsx(TaskDropdownButton, { disabled: false, menuItems: menuItems }) }))] })), _jsx(\"table\", __assign({ style: { width: '100%' } }, { children: _jsx(\"tbody\", { children: _jsxs(\"tr\", { children: [_jsx(\"td\", { className: \"dskb-gripper\", style: {\n backgroundColor: (_c = taskColor.color) !== null && _c !== void 0 ? _c : defaultGroupType.color,\n } }), _jsxs(\"td\", __assign({ className: \"dskb-group-content dskb-task-details\" }, { children: [_jsx(\"div\", __assign({ className: \"dskb-property dskb-property-editor dskb-name-property\" }, { children: _jsxs(\"a\", __assign({ className: \"name-property\", onClick: function () { return openTaskDetails(task); } }, { children: [_jsx(\"svg\", __assign({ stroke: \"currentColor\", fill: \"currentColor\", strokeWidth: \"0\", viewBox: \"0 0 384 512\", className: \"fa-fw\", height: \"1em\", width: \"1em\", style: { marginLeft: '-0.25em' } }, { children: _jsx(\"path\", { d: \"M336 64h-80c0-35.3-28.7-64-64-64s-64 28.7-64 64H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zM96 424c-13.3 0-24-10.7-24-24s10.7-24 24-24 24 10.7 24 24-10.7 24-24 24zm0-96c-13.3 0-24-10.7-24-24s10.7-24 24-24 24 10.7 24 24-10.7 24-24 24zm0-96c-13.3 0-24-10.7-24-24s10.7-24 24-24 24 10.7 24 24-10.7 24-24 24zm96-192c13.3 0 24 10.7 24 24s-10.7 24-24 24-24-10.7-24-24 10.7-24 24-24zm128 368c0 4.4-3.6 8-8 8H168c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16zm0-96c0 4.4-3.6 8-8 8H168c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16zm0-96c0 4.4-3.6 8-8 8H168c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16z\" }) })), (_d = task.name) !== null && _d !== void 0 ? _d : formatListValue({\n list: 'tasktemplate',\n id: task.templateId,\n intl: intl,\n fallback: task.templateName,\n })] })) })), task.relation && (_jsx(\"div\", __assign({ className: \"dskb-property dskb-property-editor dskb-name-property\" }, { children: _jsx(RelationName, { relation: task.relation }) }))), task.assignmentId && hasAssignments() && (_jsx(\"div\", __assign({ className: \"dskb-property dskb-property-editor\", title: \"\".concat(intl.formatMessage(taskMessages.Assignment), \": \").concat(invoiceStreamName) }, { children: invoiceStreamName }))), _jsx(\"table\", __assign({ className: \"dskb-property dskb-property-editor dskb-property-table\", style: { overflow: 'visible' } }, { children: _jsx(\"tbody\", { children: _jsxs(\"tr\", { children: [_jsx(\"td\", { children: _jsx(\"span\", __assign({ className: \"dskb-property-label\" }, { children: \"\".concat(intl.formatMessage(taskMessages.Deadline), \":\") })) }), _jsx(\"td\", __assign({ className: \"dskb-property-table\" }, { children: _jsx(EditableDatePicker, { showClearDate: true, value: task.deadline ? moment.utc(task.deadline) : null, nullDisplayValue: intl.formatMessage(taskMessages.NoDeadline), onChange: function (deadline) { return onUpdateDeadline(deadline); }, readOnly: !canUpdateTask }) }))] }) }) })), _jsx(HasFeature, __assign({ feature: \"referenceYear\" }, { children: _jsx(\"table\", __assign({ className: \"dskb-property dskb-property-editor dskb-property-table\", style: { overflow: 'visible' } }, { children: _jsx(\"tbody\", { children: _jsxs(\"tr\", { children: [_jsx(\"td\", __assign({ style: { whiteSpace: 'nowrap' } }, { children: _jsx(\"span\", __assign({ className: \"dskb-property-label\" }, { children: \"\".concat(intl.formatMessage(taskMessages.ReferenceYear), \":\") })) })), _jsx(\"td\", __assign({ className: \"dskb-property-table\" }, { children: task.year === 0 ? null : task.year }))] }) }) })) })), _jsx(\"table\", __assign({ className: \"dskb-property dskb-property-editor dskb-property-table\", style: { overflow: 'auto' } }, { children: _jsx(\"tbody\", { children: _jsx(\"tr\", { children: _jsx(\"td\", __assign({ className: \"dskb-property-table\" }, { children: _jsx(EditableUserSearch, { onChange: function (user) { return onChangeUser(user); }, value: selectedUser, withUnassigned: true, unassignedId: null, submitOnChange: true, readOnly: !canUpdateTask }) })) }) }) })), _jsx(\"table\", __assign({ className: \"dskb-property dskb-property-editor dskb-property-table\" }, { children: _jsxs(\"tbody\", { children: [_jsx(\"tr\", { children: _jsx(\"td\", __assign({ className: \"dskb-property-table\" }, { children: _jsx(EditableEnumSelectV2, { enumType: \"taskstatus\", value: task.status, onChange: onChangeTaskStatus, disabled: !canUpdateTask }) })) }), _jsxs(\"tr\", { children: [_jsx(\"td\", { children: task.hasAttachments && (_jsx(\"span\", __assign({ style: { marginRight: 7, marginTop: '4px' } }, { children: _jsx(PopoverStickOnHover, __assign({ trigger: ['hover', 'focus'], placement: \"top\", component: _jsx(TaskAttachmentsPopover, { attachments: attachments, loadingAttachments: loadingAttachments }), shouldUpdatePosition: true, onMouseEnter: retrieveAttachments, onClick: function () { return openTaskDetails(task); } }, { children: _jsx(\"span\", __assign({ className: \"task-attachments-icon\" }, { children: _jsx(PaperclipIcon, {}) })) })) }))) }), _jsx(\"td\", { children: task.hasRemark || task.scheduleHasRemark ? (_jsx(PopoverStickOnHover, __assign({ trigger: ['hover', 'focus'], placement: \"top\", component: popoverHoverFocus, shouldUpdatePosition: true, onMouseEnter: retrieveRemark, onClick: function () { return openTaskDetails(task); } }, { children: _jsx(\"span\", __assign({ className: \"task-remark-icon\" }, { children: _jsx(CommentIcon, {}) })) }))) : null })] })] }) }))] }))] }) }) }))] })) })));\n};\nexport default MainTask;\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport KanbanBoard from '@/modules/tasks/taskboard/kanban/KanbanBoard';\nimport { ModalType, useModalContext } from '@/shared/providers/ModalProvider';\nimport MainTask from './MainTask';\nvar OpenTask = function (_a) {\n var task = _a.task, retrieveRemark = _a.retrieveRemark, remark = _a.remark, loadingRemark = _a.loadingRemark;\n var setShowModalInfo = useModalContext().setShowModalInfo;\n var shareItem = function (t) {\n setShowModalInfo({ modalType: ModalType.Share, task: __assign(__assign({}, t), { relation: task.relation }) });\n };\n return (_jsxs(_Fragment, { children: [_jsx(\"td\", __assign({ className: \"dskb-cell dskb-header dskb-row-header dskb-group-container\" }, { children: _jsx(\"div\", __assign({ className: \"dskb-content-box\" }, { children: _jsx(MainTask, { task: task, shareItem: shareItem, openTaskDetails: function () {\n setShowModalInfo({ modalType: ModalType.TaskDetail, task: task });\n }, retrieveRemark: retrieveRemark, remark: remark, loadingRemark: loadingRemark }) })) })), _jsx(KanbanBoard, { task: task, shareItem: shareItem }, task.children.toString())] }));\n};\nexport default OpenTask;\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport ClosedTask from '@/modules/tasks/taskboard/kanban/task/ClosedTask';\nimport { useGetPlannedTaskRemark } from '@/shared/hooks/task/useGetPlannedTaskRemark';\nimport classNames from 'classnames';\nimport { useState } from 'react';\nimport OpenTask from './OpenTask';\nvar TaskRow = function (_a) {\n var task = _a.task, isCollapsed = _a.isCollapsed, onSetIsCollapsed = _a.onSetIsCollapsed;\n var _b = useState(false), loadRemark = _b[0], setLoadRemark = _b[1];\n var _c = useGetPlannedTaskRemark(task.id, 0, task.scheduleHasRemark, loadRemark), data = _c.data, loading = _c.isLoading;\n var collapseTask = function (t) {\n onSetIsCollapsed(t);\n };\n var retrieveRemark = function () {\n setLoadRemark(true);\n };\n return (_jsxs(\"tr\", __assign({ className: classNames('dskb-row dskb-group-row', isCollapsed ? 'dskb-group-collapsed' : null) }, { children: [_jsx(\"td\", __assign({ className: \"dskb-cell dskb-header dskb-row-header dskb-toggle-button-area clickable\", onClick: function () { return collapseTask(task); } }, { children: _jsx(\"svg\", __assign({ className: \"dskb-toggle-button\", width: \"8\", height: \"8\" }, { children: isCollapsed ? (_jsx(\"polygon\", { points: \"0,0 6,4 0,8\", className: \"dskb-toggle-button-collapsed\" })) : (_jsx(\"polygon\", { points: \"1,7 7,7 7,1\", className: \"dskb-toggle-button-expanded\" })) })) })), isCollapsed ? (_jsx(ClosedTask, { task: task, collapseTask: collapseTask, retrieveRemark: retrieveRemark, remark: data, loadingRemark: loading })) : (_jsx(OpenTask, { task: task, retrieveRemark: retrieveRemark, remark: data, loadingRemark: loading }))] })));\n};\nexport default TaskRow;\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport classnames from 'classnames';\nvar SortTaskComponent = function (_a) {\n var title = _a.title, hasOpenTasks = _a.hasOpenTasks, toggleOpenTasks = _a.toggleOpenTasks;\n return (_jsxs(\"span\", __assign({ className: \"clickable\", onClick: function () { return toggleOpenTasks(); } }, { children: [_jsx(\"i\", { className: classnames('fa margin10R', hasOpenTasks ? 'fa-angle-double-up' : 'fa-angle-double-down') }), title] })));\n};\nexport default SortTaskComponent;\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nvar TaskContainer = function (_a) {\n var children = _a.children;\n return (_jsx(\"div\", __assign({ className: \"panel dskb\" }, { children: _jsx(\"div\", __assign({ className: \"panel-body\" }, { children: _jsx(\"table\", __assign({ className: \"dskb-container\" }, { children: _jsx(\"tbody\", { children: _jsx(\"tr\", { children: _jsx(\"td\", { children: children }) }) }) })) })) })));\n};\nexport default TaskContainer;\n","import config from '@/config';\nimport api from '@/shared/api';\nimport { useQuery } from '@tanstack/react-query';\nimport { useIntl } from 'react-intl';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport { TaskQueryKey } from './queryKey';\nexport var useGetKPIs = function (params) {\n var intl = useIntl();\n var _a = useQuery([TaskQueryKey.KPI], function (_a) {\n var signal = _a.signal;\n return api.base\n .get(\"\".concat(config.appUrls.tasks, \"/api/plannedTasks/kpi\"), {\n params: params,\n signal: signal,\n })\n .then(function (res) { return res.data; });\n }, {\n enabled: true,\n onError: function (apiError) {\n handleHttpError(intl)(apiError);\n },\n retry: false,\n }), data = _a.data, isLoading = _a.isLoading, error = _a.error, refetch = _a.refetch;\n return {\n data: data,\n error: error,\n isLoading: isLoading,\n refetch: refetch,\n };\n};\n","import { jsx as _jsx } from \"react/jsx-runtime\";\n/* eslint-disable react/require-default-props */\nimport { useMemo } from 'react';\nimport { defineMessages, useIntl } from 'react-intl';\nimport AutoComplete from '../select/AutoComplete';\nvar messages = defineMessages({\n ToDo: {\n id: 'ToDo',\n defaultMessage: 'To do',\n },\n InProgress: {\n id: 'InProgress',\n defaultMessage: 'In progress',\n },\n Done: {\n id: 'Done',\n defaultMessage: 'Done',\n },\n Blocked: {\n id: 'Blocked',\n defaultMessage: 'Blocked',\n },\n NotDone: {\n id: 'NotDone',\n defaultMessage: 'NotDone',\n },\n});\nexport var StatusSelect = function (_a) {\n var initialValue = _a.initialValue, placeholder = _a.placeholder, onChange = _a.onChange;\n var formatMessage = useIntl().formatMessage;\n var statuses = useMemo(function () { return [\n {\n key: 0,\n label: formatMessage(messages.ToDo),\n },\n {\n key: 1,\n label: formatMessage(messages.InProgress),\n },\n {\n key: 2,\n label: formatMessage(messages.Done),\n },\n {\n key: -1,\n label: formatMessage(messages.NotDone),\n },\n ]; }, [formatMessage]);\n var initialSelectedItem = useMemo(function () {\n return initialValue || parseInt(initialValue) === 0\n ? statuses.find(function (item) { return (item === null || item === void 0 ? void 0 : item.key) === parseInt(initialValue); })\n : undefined;\n }, [initialValue, statuses]);\n return (_jsx(AutoComplete, { items: statuses, initialSelectedItem: initialSelectedItem, placeholder: placeholder, mode: \"edit\", onChange: function (item) { return onChange(item === null || item === void 0 ? void 0 : item.key); } }));\n};\nexport var FilterStatusSelect = function (_a) {\n var item = _a.item, setFilter = _a.setFilter, activeFilters = _a.activeFilters, label = _a.label, isAlwaysVisible = _a.isAlwaysVisible, enabled = _a.enabled;\n return ({\n filterItem: item,\n enabled: enabled,\n filterSelectLabel: !isAlwaysVisible ? label : undefined,\n element: (_jsx(StatusSelect, { onChange: function (value) {\n var _a;\n return setFilter((_a = {}, _a[item] = value !== null && value !== void 0 ? value : undefined, _a));\n }, initialValue: activeFilters[item], placeholder: label })),\n });\n};\n","var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/* eslint-disable react/require-default-props */\nimport { useMemo } from 'react';\nimport { defineMessages, useIntl } from 'react-intl';\nimport guid from '@/shared/utils/guid';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport { useGetTaskTemplates } from '@/shared/hooks/task/useGetTaskTemplates';\nimport MultiSelect, { addItem, removeItem, splitItems } from './MultiSelect';\nimport { listItemMsg } from '../../FormattedListValue';\nvar messages = defineMessages({\n TaskTemplates: {\n id: 'TaskTemplates',\n defaultMessage: 'Task templates',\n },\n TasksWithoutTemplate: {\n id: 'TasksWithoutTemplate',\n defaultMessage: 'Tasks without template',\n },\n});\nexport var TaskTemplateMultiSelect = function (_a) {\n var selection = _a.selection, onChange = _a.onChange, placeholder = _a.placeholder;\n var formatMessage = useIntl().formatMessage;\n var data = useGetTaskTemplates().data;\n var items = useMemo(function () { return __spreadArray([\n { id: guid.empty, label: formatMessage(messages.TasksWithoutTemplate) }\n ], (data !== null && data !== void 0 ? data : [])\n .map(function (item) { return ({\n id: item.id,\n label: formatMessage(listItemMsg('taskTemplate', item.id, item.name)),\n }); })\n .sort(dynamicSort('label')), true); }, [data, formatMessage]);\n var _b = splitItems(items, selection), selectedItems = _b[0], selectableItems = _b[1];\n return (_jsx(MultiSelect, { selectedItem: selectedItems, onItemRemoved: function (item) { return onChange(removeItem(selection, item)); }, onItemSelected: function (item) { return onChange(addItem(selection, item)); }, items: selectableItems, placeholder: placeholder || formatMessage(messages.TaskTemplates) }));\n};\n","import { jsx as _jsx } from \"react/jsx-runtime\";\n/* eslint-disable react/require-default-props */\nimport { useGetSubtaskTemplates } from '@/shared/hooks/task/useGetSubtaskTemplates';\nimport { useEffect, useMemo } from 'react';\nimport { useIntl } from 'react-intl';\nimport { listItemMsg } from '../../FormattedListValue';\nimport AutoComplete from '../select/AutoComplete';\nexport var SubtaskTemplateSelect = function (_a) {\n var initialValue = _a.initialValue, placeholder = _a.placeholder, taskTemplateId = _a.taskTemplateId, isDisabled = _a.isDisabled, onChange = _a.onChange;\n var formatMessage = useIntl().formatMessage;\n var _b = useGetSubtaskTemplates(taskTemplateId), data = _b.data, refetch = _b.refetch;\n useEffect(function () {\n refetch();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [taskTemplateId]);\n var subtaskTemplates = useMemo(function () {\n return data === null || data === void 0 ? void 0 : data.map(function (item) { return ({\n key: item.id,\n label: formatMessage(listItemMsg('taskTemplate', item.id, item.name)),\n }); });\n }, [data, formatMessage]);\n var initialSelectedItem = useMemo(function () { var _a; return (_a = (initialValue && (subtaskTemplates === null || subtaskTemplates === void 0 ? void 0 : subtaskTemplates.find(function (item) { return (item === null || item === void 0 ? void 0 : item.key) === initialValue; })))) !== null && _a !== void 0 ? _a : undefined; }, [initialValue, subtaskTemplates]);\n return (_jsx(AutoComplete, { items: subtaskTemplates, initialSelectedItem: initialSelectedItem, placeholder: placeholder, mode: \"edit\", onChange: function (item) { return onChange(item === null || item === void 0 ? void 0 : item.key); }, disabled: isDisabled }));\n};\nexport var FilterSubtaskTemplateSelect = function (_a) {\n var _b;\n var item = _a.item, taskTemplatesItem = _a.taskTemplatesItem, setFilter = _a.setFilter, activeFilters = _a.activeFilters, label = _a.label, isAlwaysVisible = _a.isAlwaysVisible, enabled = _a.enabled;\n var taskTemplates = (_b = activeFilters[taskTemplatesItem]) !== null && _b !== void 0 ? _b : [];\n var taskTemplateId = taskTemplates.length === 1 ? taskTemplates[0] : null;\n return {\n enabled: enabled,\n filterItem: item,\n filterSelectLabel: !isAlwaysVisible ? label : undefined,\n element: (_jsx(SubtaskTemplateSelect, { onChange: function (value) {\n var _a;\n return setFilter((_a = {}, _a[item] = value !== null && value !== void 0 ? value : undefined, _a));\n }, initialValue: activeFilters[item], taskTemplateId: taskTemplateId, placeholder: label, isDisabled: !taskTemplateId })),\n };\n};\n","import config from '@/config';\nimport api from '@/shared/api';\nimport { useQuery } from '@tanstack/react-query';\nimport { useIntl } from 'react-intl';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport { TaskQueryKey } from './queryKey';\nexport var useGetSubtaskTemplates = function (taskTemplateId) {\n var intl = useIntl();\n var _a = useQuery([TaskQueryKey.SubtaskTemplates, taskTemplateId], function () {\n return taskTemplateId\n ? api.base\n .get(\"\".concat(config.appUrls.tasks, \"/api/TaskTemplates/Children/\").concat(taskTemplateId))\n .then(function (res) { return res.data; })\n : null;\n }, {\n enabled: true,\n onError: function (apiError) {\n handleHttpError(intl)(apiError);\n },\n }), data = _a.data, isLoading = _a.isLoading, error = _a.error, refetch = _a.refetch;\n return {\n data: data,\n error: error,\n isLoading: isLoading,\n refetch: refetch,\n };\n};\n","var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/* eslint-disable react/require-default-props */\nimport { useGetPlannedTaskTags } from '@/shared/hooks/task/useGetPlannedTaskTags';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport MultiSelect, { splitItems } from '../multiselect/MultiSelect';\nexport var PlannedTasksTagsMultiSelect = function (_a) {\n var selectedItems = _a.selectedItems, placeholder = _a.placeholder, onChange = _a.onChange, onFilterBehaviourChanged = _a.onFilterBehaviourChanged, filterBehaviour = _a.filterBehaviour, withFilterBehaviour = _a.withFilterBehaviour;\n var data = useGetPlannedTaskTags().data;\n var taskLabels = data === null || data === void 0 ? void 0 : data.map(function (x) { return ({ id: x.id, label: x.name, sort: x.name.toLowerCase() }); }).sort(dynamicSort('sort'));\n var _b = splitItems(taskLabels, selectedItems, 'id'), selectedLabels = _b[0], availableLabels = _b[1];\n return (_jsx(MultiSelect, { selectedItem: selectedLabels, onItemRemoved: function (item) { return onChange(selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.filter(function (label) { return label !== item.value.id; })); }, onItemSelected: function (item) { return onChange(__spreadArray(__spreadArray([], (selectedItems !== null && selectedItems !== void 0 ? selectedItems : []), true), [item.id], false)); }, items: availableLabels, placeholder: placeholder, onFilterBehaviourChanged: function (behaviour) {\n return onFilterBehaviourChanged(behaviour);\n }, filterBehaviour: filterBehaviour, withFilterBehaviour: withFilterBehaviour }));\n};\nexport var FilterPlannedTasksTagsMultiSelect = function (_a) {\n var _b;\n var item = _a.item, setFilter = _a.setFilter, activeFilters = _a.activeFilters, label = _a.label, isAlwaysVisible = _a.isAlwaysVisible, withFilterBehaviour = _a.withFilterBehaviour, enabled = _a.enabled;\n return ({\n filterItem: item,\n enabled: enabled,\n filterSelectLabel: !isAlwaysVisible ? label : undefined,\n element: (_jsx(PlannedTasksTagsMultiSelect, { onChange: function (value) {\n var _a;\n var _b;\n setFilter((_a = {},\n _a[item] = ((_b = value === null || value === void 0 ? void 0 : value.length) !== null && _b !== void 0 ? _b : 0) > 0 ? value : undefined,\n _a));\n }, selectedItems: activeFilters[item], placeholder: label, withFilterBehaviour: withFilterBehaviour, onFilterBehaviourChanged: function (filterBehaviour) {\n var _a;\n setFilter({\n filterBehaviours: (_a = {},\n _a[item] = filterBehaviour,\n _a),\n });\n }, filterBehaviour: (_b = activeFilters.filterBehaviours) === null || _b === void 0 ? void 0 : _b[item] })),\n });\n};\n","import config from '@/config';\nimport api from '@/shared/api';\nimport { useQuery } from '@tanstack/react-query';\nimport { useIntl } from 'react-intl';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport { TaskQueryKey } from './queryKey';\nexport var useGetPlannedTaskTags = function () {\n var intl = useIntl();\n var _a = useQuery([TaskQueryKey.TaskTags], function () {\n return api.base\n .get(\"\".concat(config.appUrls.tasks, \"/api/Tags\"))\n .then(function (res) { return res.data; });\n }, {\n enabled: true,\n onError: function (apiError) {\n handleHttpError(intl)(apiError);\n },\n retry: false,\n }), data = _a.data, isLoading = _a.isLoading, error = _a.error, refetch = _a.refetch;\n return {\n data: data,\n error: error,\n isLoading: isLoading,\n refetch: refetch,\n };\n};\n","var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/* eslint-disable react/require-default-props */\nimport { useGetResourceTags } from '@/shared/hooks/task/useGetResourceTags';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport MultiSelect, { splitItems } from '../multiselect/MultiSelect';\nexport var ResourceTagsMultiSelect = function (_a) {\n var selectedItems = _a.selectedItems, placeholder = _a.placeholder, onChange = _a.onChange, onFilterBehaviourChanged = _a.onFilterBehaviourChanged, filterBehaviour = _a.filterBehaviour, withFilterBehaviour = _a.withFilterBehaviour;\n var data = useGetResourceTags().data;\n var relationLabels = data === null || data === void 0 ? void 0 : data.map(function (x) { return ({ id: x.id, label: x.name, sort: x.name.toLowerCase() }); }).sort(dynamicSort('sort'));\n var _b = splitItems(relationLabels, selectedItems, 'label'), selectedLabels = _b[0], availableLabels = _b[1];\n return (_jsx(MultiSelect, { selectedItem: selectedLabels, onItemRemoved: function (item) { return onChange(selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.filter(function (label) { return label !== item.value.label; })); }, onItemSelected: function (item) { return onChange(__spreadArray(__spreadArray([], (selectedItems !== null && selectedItems !== void 0 ? selectedItems : []), true), [item.label], false)); }, items: availableLabels, placeholder: placeholder, onFilterBehaviourChanged: function (behaviour) {\n return onFilterBehaviourChanged(behaviour);\n }, filterBehaviour: filterBehaviour, withFilterBehaviour: withFilterBehaviour }));\n};\nexport var FilterResourceTagsMultiSelect = function (_a) {\n var _b;\n var item = _a.item, setFilter = _a.setFilter, activeFilters = _a.activeFilters, label = _a.label, isAlwaysVisible = _a.isAlwaysVisible, withFilterBehaviour = _a.withFilterBehaviour, enabled = _a.enabled;\n return ({\n filterItem: item,\n enabled: enabled,\n filterSelectLabel: !isAlwaysVisible ? label : undefined,\n element: (_jsx(ResourceTagsMultiSelect, { onChange: function (value) {\n var _a;\n var _b;\n setFilter((_a = {},\n _a[item] = ((_b = value === null || value === void 0 ? void 0 : value.length) !== null && _b !== void 0 ? _b : 0) > 0 ? value : undefined,\n _a));\n }, selectedItems: activeFilters[item], placeholder: label, onFilterBehaviourChanged: function (filterBehaviour) {\n var _a;\n setFilter({\n filterBehaviours: (_a = {},\n _a[item] = filterBehaviour,\n _a),\n });\n }, filterBehaviour: (_b = activeFilters.filterBehaviours) === null || _b === void 0 ? void 0 : _b[item], withFilterBehaviour: withFilterBehaviour })),\n });\n};\n","import config from '@/config';\nimport api from '@/shared/api';\nimport { useQuery } from '@tanstack/react-query';\nimport { useIntl } from 'react-intl';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport { TaskQueryKey } from './queryKey';\nexport var useGetResourceTags = function () {\n var intl = useIntl();\n var _a = useQuery([TaskQueryKey.ResourceTags], function () {\n return api.base\n .get(\"\".concat(config.appUrls.api, \"/api/Resource/Tags\"))\n .then(function (res) { return res.data; });\n }, {\n enabled: true,\n onError: function (apiError) {\n handleHttpError(intl)(apiError);\n },\n retry: false,\n }), data = _a.data, isLoading = _a.isLoading, error = _a.error, refetch = _a.refetch;\n return {\n data: data,\n error: error,\n isLoading: isLoading,\n refetch: refetch,\n };\n};\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/* eslint-disable react/require-default-props */\nimport { c } from '@/shared/utils/c';\nexport var MultiSelectButtons = function (_a) {\n var options = _a.options, selected = _a.selected, fullWith = _a.fullWith, onChange = _a.onChange;\n return (_jsx(\"div\", __assign({ className: \"btn-group btn-group-justified\" }, { children: options.map(function (option) { return (_jsxs(\"button\", __assign({ type: \"button\", className: c('btn btn-default', (selected === null || selected === void 0 ? void 0 : selected.includes(option.id)) && 'active'), onClick: function () {\n return onChange((selected === null || selected === void 0 ? void 0 : selected.includes(option.id))\n ? selected === null || selected === void 0 ? void 0 : selected.filter(function (item) { return item !== option.id; })\n : __spreadArray(__spreadArray([], (selected !== null && selected !== void 0 ? selected : []), true), [option.id], false));\n } }, { children: [option.icon && _jsx(\"span\", __assign({ style: { marginRight: 5 } }, { children: option.icon })), option.label] }), option.id)); }) })));\n};\n","var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/* eslint-disable react/require-default-props */\nimport { useGetMyTeams } from '@/shared/hooks/task/useGetMyTeams';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport { useMemo } from 'react';\nimport { useIntl } from 'react-intl';\nimport MultiSelect, { splitItems } from '../multiselect/MultiSelect';\nexport var MyTeamsMultiSelect = function (_a) {\n var selectedItems = _a.selectedItems, placeholder = _a.placeholder, onChange = _a.onChange;\n var formatMessage = useIntl().formatMessage;\n var data = useGetMyTeams().data;\n var relationLabels = useMemo(function () {\n return data === null || data === void 0 ? void 0 : data.map(function (x) { return ({\n id: x.id,\n label: x.name,\n code: x.code.toString(),\n sort: x.name.toLowerCase(),\n }); }).sort(dynamicSort('sort'));\n }, [data]);\n var allLabels = useMemo(function () {\n return relationLabels && __spreadArray([\n { id: '0', label: formatMessage({ id: 'WithoutTeams' }), code: '0' }\n ], relationLabels, true);\n }, [formatMessage, relationLabels]);\n var _b = splitItems(allLabels, selectedItems, 'code'), selectedLabels = _b[0], availableLabels = _b[1];\n return (_jsx(MultiSelect, { selectedItem: selectedLabels, onItemRemoved: function (item) { return onChange(selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.filter(function (label) { return label !== item.value.code; })); }, onItemSelected: function (item) { return onChange(__spreadArray(__spreadArray([], (selectedItems !== null && selectedItems !== void 0 ? selectedItems : []), true), [item.code], false)); }, items: availableLabels, placeholder: placeholder }));\n};\nexport var FilterMyTeamsMultiSelect = function (_a) {\n var item = _a.item, setFilter = _a.setFilter, activeFilters = _a.activeFilters, label = _a.label, isAlwaysVisible = _a.isAlwaysVisible, enabled = _a.enabled;\n return ({\n filterItem: item,\n enabled: enabled,\n filterSelectLabel: !isAlwaysVisible ? label : undefined,\n element: (_jsx(MyTeamsMultiSelect, { onChange: function (value) {\n var _a;\n var _b;\n setFilter((_a = {},\n _a[item] = ((_b = value === null || value === void 0 ? void 0 : value.length) !== null && _b !== void 0 ? _b : 0) > 0 ? value : undefined,\n _a));\n }, selectedItems: activeFilters[item], placeholder: label })),\n });\n};\n","import config from '@/config';\nimport api from '@/shared/api';\nimport { useQuery } from '@tanstack/react-query';\nimport { useIntl } from 'react-intl';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport { TaskQueryKey } from './queryKey';\nexport var useGetMyTeams = function () {\n var intl = useIntl();\n var _a = useQuery([TaskQueryKey.MyTeams], function () {\n return api.base\n .get(\"\".concat(config.appUrls.api, \"/api/Team/MyTeams\"))\n .then(function (res) { return res.data; });\n }, {\n enabled: true,\n onError: function (apiError) {\n handleHttpError(intl)(apiError);\n },\n retry: false,\n }), data = _a.data, isLoading = _a.isLoading, error = _a.error, refetch = _a.refetch;\n return {\n data: data,\n error: error,\n isLoading: isLoading,\n refetch: refetch,\n };\n};\n","var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/* eslint-disable react/require-default-props */\nimport { useGetTaskPeriodicity } from '@/shared/hooks/task/useGetTaskPeriodicity';\nimport guid from '@/shared/utils/guid';\nimport { useEffect, useMemo } from 'react';\nimport { useIntl } from 'react-intl';\nimport { listItemMsg } from '../../FormattedListValue';\nimport AutoComplete from '../select/AutoComplete';\nexport var TaskPeriodicitySelect = function (_a) {\n var initialValue = _a.initialValue, placeholder = _a.placeholder, taskTemplateId = _a.taskTemplateId, isDisabled = _a.isDisabled, onChange = _a.onChange;\n var formatMessage = useIntl().formatMessage;\n var _b = useGetTaskPeriodicity(taskTemplateId), data = _b.data, refetch = _b.refetch;\n useEffect(function () {\n refetch();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [taskTemplateId]);\n var taskPeriodicitys = useMemo(function () {\n return data === null || data === void 0 ? void 0 : data.map(function (item) { return ({\n key: item.id,\n label: formatMessage(listItemMsg('taskperiodicity', item.id, item.name)),\n }); });\n }, [data, formatMessage]);\n var allItems = useMemo(function () { return __spreadArray([\n {\n key: guid.empty,\n label: formatMessage({ id: 'NoPeriodicity', defaultMessage: 'No periodicity' }),\n }\n ], (taskPeriodicitys !== null && taskPeriodicitys !== void 0 ? taskPeriodicitys : []), true); }, [taskPeriodicitys, formatMessage]);\n var initialSelectedItem = useMemo(function () { var _a; return (_a = (initialValue && (allItems === null || allItems === void 0 ? void 0 : allItems.find(function (item) { return (item === null || item === void 0 ? void 0 : item.key) === initialValue; })))) !== null && _a !== void 0 ? _a : undefined; }, [initialValue, allItems]);\n return (_jsx(AutoComplete, { items: allItems, initialSelectedItem: initialSelectedItem, placeholder: placeholder, mode: \"edit\", onChange: function (item) { return onChange(item === null || item === void 0 ? void 0 : item.key); }, disabled: isDisabled }));\n};\nexport var FilterTaskPeriodicitySelect = function (_a) {\n var _b;\n var item = _a.item, taskTemplatesItem = _a.taskTemplatesItem, setFilter = _a.setFilter, activeFilters = _a.activeFilters, label = _a.label, isAlwaysVisible = _a.isAlwaysVisible, enabled = _a.enabled;\n var taskTemplates = (_b = activeFilters[taskTemplatesItem]) !== null && _b !== void 0 ? _b : [];\n var taskTemplateId = taskTemplates.length === 1 ? taskTemplates[0] : null;\n return {\n enabled: enabled,\n filterItem: item,\n filterSelectLabel: !isAlwaysVisible ? label : undefined,\n element: (_jsx(TaskPeriodicitySelect, { onChange: function (value) {\n var _a;\n return setFilter((_a = {}, _a[item] = value !== null && value !== void 0 ? value : undefined, _a));\n }, initialValue: activeFilters[item], taskTemplateId: taskTemplateId, placeholder: label, isDisabled: !taskTemplateId })),\n };\n};\n","import config from '@/config';\nimport api from '@/shared/api';\nimport { useQuery } from '@tanstack/react-query';\nimport { useIntl } from 'react-intl';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport { TaskQueryKey } from './queryKey';\nexport var useGetTaskPeriodicity = function (taskTemplateId) {\n var intl = useIntl();\n var _a = useQuery([TaskQueryKey.TaskPeriodicity, taskTemplateId], function () {\n return taskTemplateId\n ? api.base\n .get(\"\".concat(config.appUrls.tasks, \"/api/TaskPeriodicity/\").concat(taskTemplateId))\n .then(function (res) { return res.data; })\n : null;\n }, {\n enabled: true,\n onError: function (apiError) {\n handleHttpError(intl)(apiError);\n },\n }), data = _a.data, isLoading = _a.isLoading, error = _a.error, refetch = _a.refetch;\n return {\n data: data,\n error: error,\n isLoading: isLoading,\n refetch: refetch,\n };\n};\n","var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/* eslint-disable react/require-default-props */\nimport messages from '@/modules/tasks/taskMessages';\nimport { useGetAssignmentTemplates } from '@/shared/hooks/task/useGetAssignmentTemplates';\nimport guid from '@/shared/utils/guid';\nimport { useMemo } from 'react';\nimport { useIntl } from 'react-intl';\nimport { listItemMsg } from '../../FormattedListValue';\nimport { hasAssignments } from '../../security/HasAssignments';\nimport AutoComplete from '../select/AutoComplete';\nexport var AssignmentTemplateSelector = function (_a) {\n var initialValue = _a.initialValue, placeholder = _a.placeholder, onChange = _a.onChange;\n var formatMessage = useIntl().formatMessage;\n var data = useGetAssignmentTemplates().data;\n var assignmentTemplates = useMemo(function () {\n return data === null || data === void 0 ? void 0 : data.map(function (item) { return ({\n key: item.id,\n label: formatMessage(listItemMsg('assignmenttemplate', item.id, item.name)),\n }); });\n }, [data, formatMessage]);\n var items = useMemo(function () {\n var _a;\n return (_a = (assignmentTemplates && __spreadArray([\n { key: guid.empty, label: formatMessage(messages.DefaultAssignment) }\n ], assignmentTemplates, true))) !== null && _a !== void 0 ? _a : undefined;\n }, [assignmentTemplates, formatMessage]);\n var initialSelectedItem = useMemo(function () { var _a; return (_a = (initialValue && (items === null || items === void 0 ? void 0 : items.find(function (item) { return (item === null || item === void 0 ? void 0 : item.key) === initialValue; })))) !== null && _a !== void 0 ? _a : undefined; }, [initialValue, items]);\n return (_jsx(AutoComplete, { items: items, initialSelectedItem: initialSelectedItem, placeholder: placeholder, mode: \"edit\", onChange: function (item) { return onChange(item === null || item === void 0 ? void 0 : item.key); } }));\n};\nexport var FilterAssignmentTemplateSelector = function (_a) {\n var item = _a.item, setFilter = _a.setFilter, activeFilters = _a.activeFilters, label = _a.label, isAlwaysVisible = _a.isAlwaysVisible, enabled = _a.enabled;\n return ({\n filterItem: item,\n enabled: enabled,\n filterSelectLabel: !isAlwaysVisible ? label : undefined,\n element: hasAssignments() ? (_jsx(AssignmentTemplateSelector, { initialValue: activeFilters[item], onChange: function (value) {\n var _a;\n return setFilter((_a = {}, _a[item] = value !== null && value !== void 0 ? value : undefined, _a));\n }, placeholder: label })) : null,\n });\n};\n","import config from '@/config';\nimport api from '@/shared/api';\nimport { useQuery } from '@tanstack/react-query';\nimport { useIntl } from 'react-intl';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport { TaskQueryKey } from './queryKey';\nexport var useGetAssignmentTemplates = function () {\n var intl = useIntl();\n var _a = useQuery([TaskQueryKey.AssignmentTemplates], function () {\n return api.base\n .get(\"\".concat(config.appUrls.api, \"/api/AssignmentTemplate/Get\"))\n .then(function (res) { return res.data; });\n }, {\n enabled: true,\n onError: function (apiError) {\n handleHttpError(intl)(apiError);\n },\n retry: false,\n }), data = _a.data, isLoading = _a.isLoading, error = _a.error, refetch = _a.refetch;\n return {\n data: data,\n error: error,\n isLoading: isLoading,\n refetch: refetch,\n };\n};\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/* eslint-disable react/require-default-props */\nimport DynamicFilterDropdown from '@/shared/components/DynamicFilterDropdown';\nimport React, { useMemo, useState } from 'react';\nimport { FaUndo } from 'react-icons/fa';\nimport { defineMessages, useIntl } from 'react-intl';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport userStorage from '../services/userStorage';\nimport { FilterSave } from './FilterSave';\nvar onlyUnique = function (value, index, self) { return self.indexOf(value) === index; };\nvar selectAll = 'selectAll';\nvar messages = defineMessages({\n ResetFilters: {\n id: 'ResetFilters',\n defaultMessage: 'Reset filters',\n },\n SelectAll: {\n id: 'SelectAll',\n defaultMessage: 'Select all',\n },\n});\nexport var FilterWrapper = function (_a) {\n var filterObject = _a.filterObject, children = _a.children, bottomElement = _a.bottomElement, screen = _a.screen, setFilter = _a.setFilter, invisibleFilters = _a.invisibleFilters;\n var formatMessage = useIntl().formatMessage;\n var filterSelectItems = useMemo(function () {\n return children.filter(function (item) { return item.filterSelectLabel && item.enabled; }).map(function (item) { return item.filterItem; });\n }, [children]);\n var _b = useState(userStorage.getItem(\"\".concat(screen, \"-Filters\")) || []), selectedFilterItems = _b[0], _setSelectedFilterItems = _b[1];\n var setSelectedFilterItems = function (items) {\n return _setSelectedFilterItems(function (prev) {\n var newItems = typeof items === 'function' ? items(prev) : items;\n userStorage.setItem(\"\".concat(screen, \"-Filters\"), newItems);\n return newItems;\n });\n };\n var filterSelectList = useMemo(function () { return __spreadArray([\n {\n id: selectAll,\n label: formatMessage(messages.SelectAll),\n selected: selectedFilterItems.includes(selectAll),\n }\n ], filterSelectItems\n .map(function (key) { return ({\n id: key,\n label: children.find(function (item) { return item.filterItem === key; }).filterSelectLabel,\n selected: selectedFilterItems.includes(key),\n }); })\n .sort(dynamicSort('label')), true); }, [children, filterSelectItems, formatMessage, selectedFilterItems]);\n var onChangeFilterSelect = function (selectedItem, selected) {\n if (selectedItem.id === selectAll) {\n if (selected) {\n setSelectedFilterItems(__spreadArray([selectAll], filterSelectItems, true));\n }\n else {\n setSelectedFilterItems([]);\n }\n }\n else {\n // eslint-disable-next-line no-lonely-if\n if (selected) {\n if (selectedFilterItems.length + 1 >= filterSelectItems.length) {\n setSelectedFilterItems(__spreadArray([selectAll], filterSelectItems, true));\n }\n else {\n setSelectedFilterItems(function (prev) { return __spreadArray(__spreadArray([], prev, true), [selectedItem.id], false); });\n }\n }\n else {\n setSelectedFilterItems(function (prev) {\n return prev.filter(function (item) { return item !== selectedItem.id && item !== selectAll; });\n });\n }\n }\n };\n var includedFilterKeys = useMemo(function () {\n return __spreadArray(__spreadArray(__spreadArray([], children.map(function (item) { return item.filterItem; }), true), children.reduce(function (prev, item) { var _a; return __spreadArray(__spreadArray([], prev, true), ((_a = item.extraFilterItems) !== null && _a !== void 0 ? _a : []), true); }, []), true), invisibleFilters, true).filter(onlyUnique);\n }, [children, invisibleFilters]);\n var includedFiltersObject = useMemo(function () {\n return Object.keys(filterObject).reduce(function (prev, key) {\n var _a;\n if ((!filterObject[key] || !includedFilterKeys.includes(key)) && filterObject[key] !== 0) {\n return prev;\n }\n return __assign(__assign({}, prev), (_a = {}, _a[key] = filterObject[key], _a));\n }, {});\n }, [filterObject, includedFilterKeys]);\n var hasActiveFilters = useMemo(function () {\n return Object.values(includedFiltersObject).filter(function (item) {\n return Array.isArray(item) ? item.length > 0 : item === 0 || Boolean(item);\n }).length > 0;\n }, [includedFiltersObject]);\n var resetFilters = function () {\n setFilter(includedFilterKeys.reduce(function (prev, item) {\n var _a;\n return (__assign(__assign({}, prev), (_a = {}, _a[item] = undefined, _a)));\n }, {}));\n };\n return (_jsxs(React.Fragment, { children: [_jsx(\"div\", __assign({ className: \"row\" }, { children: children\n .filter(function (x) { return x.filterItem; })\n .map(function (child) {\n var _a;\n if (!child.element) {\n return null;\n }\n if (child.filterSelectLabel &&\n !selectedFilterItems.includes(child.filterItem)) {\n return null;\n }\n return (_jsx(\"div\", __assign({ className: (_a = child.className) !== null && _a !== void 0 ? _a : 'col-lg-3 col-md-6' }, { children: _jsx(\"div\", __assign({ className: \"form-group width100pct\" }, { children: child.element })) }), child.filterItem));\n })\n .filter(Boolean) })), _jsxs(\"div\", __assign({ className: \"flex-row\" }, { children: [_jsxs(\"div\", __assign({ className: \"btn-group save-filters\" }, { children: [_jsx(FilterSave, { hasActiveFilters: hasActiveFilters, screen: screen, filtersObject: includedFiltersObject, resetFilters: resetFilters, setFilter: setFilter }), filterSelectItems.length > 0 && (_jsx(DynamicFilterDropdown, { items: filterSelectList, onChange: onChangeFilterSelect })), hasActiveFilters && (_jsxs(\"button\", __assign({ type: \"button\", className: \"btn btn-default btn-reset\", onClick: resetFilters }, { children: [_jsx(FaUndo, { className: \"react-icon fa-fw margin5R\" }), formatMessage(messages.ResetFilters)] })))] })), bottomElement] }))] }));\n};\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { c } from '@/shared/utils/c';\nexport var TaskBoardKPIFilterButton = function (_a) {\n var label = _a.label, amount = _a.amount, isActive = _a.isActive, color = _a.color, onClick = _a.onClick;\n return (_jsxs(\"div\", __assign({ className: \"\".concat(isActive ? 'selected' : '', \" kpi-block flex-child-block\"), onClick: onClick }, { children: [_jsx(\"h2\", __assign({ className: 'kpi-title' }, { children: label })), _jsx(\"h1\", __assign({ className: c('bold', color && amount > 0 && color) }, { children: amount }))] })));\n};\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport SimplePanel from '@/shared/components/SimplePanel';\nimport messages from '@/modules/tasks/taskboard/taskboardMessages';\nimport { useIntl } from 'react-intl';\nimport { CanCreate } from '@/shared/components/security';\nimport { ModalType, useModalContext } from '@/shared/providers/ModalProvider';\nimport taskMessages from '@/modules/tasks/taskMessages';\nimport { FilterUserSearch } from '@/shared/components/input/filterInputs/FilterUserSearch';\nimport { FilterStatusSelect } from '@/shared/components/input/filterInputs/FilterStatusSelect';\nimport { FilterTaskTemplateMultiSelect } from '@/shared/components/input/filterInputs/FilterTaskTemplateMultiSelect';\nimport { FilterDelayedDateRangePicker } from '@/shared/components/input/filterInputs/FilterDelayedDateRangePicker';\nimport { FilterSubtaskTemplateSelect } from '@/shared/components/input/filterInputs/FilterSubtaskTemplateSelect';\nimport { FilterRelationSearch } from '@/shared/components/input/filterInputs/FilterRelationSearch';\nimport { FilterEnumMultiSelect } from '@/shared/components/input/filterInputs/FilterEnumMultiSelect';\nimport { FilterLegalFormMultiSelect } from '@/shared/components/input/filterInputs/FilterLegalFormMultiSelect';\nimport { FilterCompanyMultiSelect } from '@/shared/components/input/filterInputs/FilterCompanyMultiSelect';\nimport { FilterEndFiscalYearMultiSelect } from '@/shared/components/input/filterInputs/FilterEndFiscalYearMultiSelect';\nimport { FilterPlannedTasksTagsMultiSelect } from '@/shared/components/input/filterInputs/FilterPlannedTasksTagsMultiSelect';\nimport { FilterResourceTagsMultiSelect } from '@/shared/components/input/filterInputs/FilterResourceTagsMultiSelect';\nimport { FilterRelationTypeButtons } from '@/shared/components/input/filterInputs/FilterRelationTypeButtons';\nimport { FilterMyTeamsMultiSelect } from '@/shared/components/input/filterInputs/FilterMyTeamsMultiSelect';\nimport { FilterTaskPeriodicitySelect } from '@/shared/components/input/filterInputs/FilterTaskPeriodicitySelect';\nimport { FilterToggleSelect } from '@/shared/components/input/filterInputs/FilterToggleSelect';\nimport { FilterAssignmentTemplateSelector } from '@/shared/components/input/filterInputs/FilterAssignmentTemplateSelector';\nimport { FilterRelationGroupMultiSelect } from '@/shared/components/input/filterInputs/FilterRelationGroupMultiSelect';\nimport { FilterReferenceYear } from '@/shared/components/input/filterInputs/FilterReferenceYear';\nimport { FilterWrapper } from '@/shared/components/FilterWrapper';\nimport authService from '@/shared/services/AuthService';\nimport { TaskBoardFilterKPIs } from './TaskboardFilterKPIs';\nimport { TaskBoardFilterType, } from '../../constants';\nimport employeeProfileMessages from '@/shared/messages/employeeProfileMessages';\nexport var TaskBoardFilters = function (_a) {\n var activeFilters = _a.activeFilters, setFilter = _a.setFilter;\n var formatMessage = useIntl().formatMessage;\n var setShowModalInfo = useModalContext().setShowModalInfo;\n var onCreateNewTask = function () {\n setShowModalInfo({\n modalType: ModalType.OneTimeTask,\n relationId: activeFilters.relationId,\n });\n };\n return (_jsxs(SimplePanel, __assign({ article: \"5434833712530\", title: formatMessage(messages.TaskBoard), buttons: _jsx(CanCreate, __assign({ on: \"PlannedTask\" }, { children: _jsxs(\"button\", __assign({ onClick: onCreateNewTask, id: \"taskboard-new-task-button\", title: formatMessage(taskMessages.NewTask), className: \"btn btn-inverse\", type: \"button\" }, { children: [_jsx(\"i\", { className: \"fa fa-plus\" }), _jsx(\"span\", __assign({ className: \"margin5L\" }, { children: formatMessage(messages.Add) }))] })) })) }, { children: [_jsx(TaskBoardFilterKPIs, { filters: activeFilters, setActiveKPI: function (kpi) { return setFilter({ kpi: kpi }); } }), _jsx(\"div\", __assign({ className: \"info-block container-fluid\" }, { children: _jsx(FilterWrapper, __assign({ filterObject: activeFilters, setFilter: setFilter, screen: \"TaskBoard\", invisibleFilters: ['plannedTaskId', 'invoiceStreamId', 'kpi', 'filterBehaviours'] }, { children: [\n FilterRelationSearch({\n item: TaskBoardFilterType.relationId,\n itemName: TaskBoardFilterType.relationName,\n setFilter: setFilter,\n activeFilters: activeFilters,\n enabled: true,\n }),\n FilterUserSearch({\n item: TaskBoardFilterType.userId,\n label: formatMessage(messages.TasksAssignedTo),\n isAlwaysVisible: true,\n setFilter: setFilter,\n activeFilters: activeFilters,\n enabled: true,\n }),\n FilterTaskTemplateMultiSelect({\n item: TaskBoardFilterType.taskTemplates,\n clearItems: [TaskBoardFilterType.subtaskId, TaskBoardFilterType.periodicityId],\n label: formatMessage(messages.SelectTask),\n isAlwaysVisible: true,\n setFilter: setFilter,\n activeFilters: activeFilters,\n enabled: true,\n }),\n FilterStatusSelect({\n item: TaskBoardFilterType.status,\n label: formatMessage(messages.Status),\n isAlwaysVisible: true,\n setFilter: setFilter,\n activeFilters: activeFilters,\n enabled: true,\n }),\n FilterDelayedDateRangePicker({\n startDateItem: TaskBoardFilterType.deadlineFrom,\n endDateItem: TaskBoardFilterType.deadlineUntil,\n startDateId: 'TaskBoardStartDateFilter',\n endDateId: 'TaskBoardEndDateFilter',\n startDatePlaceholder: formatMessage(messages.DeadlineFrom),\n endDatePlaceholder: formatMessage(messages.DeadlineUntil),\n setFilter: setFilter,\n activeFilters: activeFilters,\n enabled: true,\n }),\n FilterSubtaskTemplateSelect({\n item: TaskBoardFilterType.subtaskId,\n label: formatMessage(messages.SelectASubtask),\n isAlwaysVisible: true,\n taskTemplatesItem: TaskBoardFilterType.taskTemplates,\n setFilter: setFilter,\n activeFilters: activeFilters,\n enabled: true,\n }),\n FilterStatusSelect({\n item: TaskBoardFilterType.subtaskStatus,\n label: formatMessage(messages.SubtaskStatus),\n isAlwaysVisible: true,\n setFilter: setFilter,\n activeFilters: activeFilters,\n enabled: true,\n }),\n FilterTaskPeriodicitySelect({\n item: TaskBoardFilterType.periodicityId,\n label: formatMessage(messages.FilterPeriodicity),\n isAlwaysVisible: true,\n taskTemplatesItem: TaskBoardFilterType.taskTemplates,\n setFilter: setFilter,\n activeFilters: activeFilters,\n enabled: true,\n }),\n FilterEnumMultiSelect({\n item: TaskBoardFilterType.vatPeriodicity,\n type: 'vatPeriodicity',\n label: formatMessage(messages.VatPeriodicity),\n setFilter: setFilter,\n activeFilters: activeFilters,\n enabled: true,\n }),\n FilterEnumMultiSelect({\n item: TaskBoardFilterType.financialStatementScheme,\n type: 'financialStatementScheme',\n label: formatMessage(messages.FinancialStatementScheme),\n setFilter: setFilter,\n activeFilters: activeFilters,\n enabled: true,\n }),\n FilterEnumMultiSelect({\n item: TaskBoardFilterType.socialSecurityFund,\n type: 'socialSecurityFund',\n label: formatMessage(messages.SocialSecurityFund),\n setFilter: setFilter,\n activeFilters: activeFilters,\n enabled: true,\n }),\n FilterEnumMultiSelect({\n item: TaskBoardFilterType.socialSecretariat,\n type: 'socialSecretariat',\n label: formatMessage(messages.SocialSecretariat),\n setFilter: setFilter,\n activeFilters: activeFilters,\n enabled: true,\n }),\n FilterEnumMultiSelect({\n item: TaskBoardFilterType.accountingSoftware,\n type: 'accountingSoftware',\n customItems: [{ id: -1, label: formatMessage(messages.EmptyAccountingSoftware) }],\n label: formatMessage(messages.AccountingSoftware),\n setFilter: setFilter,\n activeFilters: activeFilters,\n enabled: true,\n }),\n FilterEnumMultiSelect({\n item: TaskBoardFilterType.otherSoftware,\n type: 'otherSoftware',\n label: formatMessage(messages.OtherSoftware),\n setFilter: setFilter,\n activeFilters: activeFilters,\n enabled: true,\n }),\n FilterCompanyMultiSelect({\n item: TaskBoardFilterType.ownCompanies,\n label: formatMessage(messages.OwnCompanies),\n setFilter: setFilter,\n activeFilters: activeFilters,\n enabled: true,\n }),\n FilterEndFiscalYearMultiSelect({\n item: TaskBoardFilterType.endFiscalYears,\n label: formatMessage(messages.EndFiscalYear),\n setFilter: setFilter,\n activeFilters: activeFilters,\n enabled: true,\n }),\n FilterUserSearch({\n item: TaskBoardFilterType.createdBy,\n label: formatMessage(messages.CreatedBy),\n setFilter: setFilter,\n activeFilters: activeFilters,\n enabled: true,\n }),\n FilterUserSearch({\n item: TaskBoardFilterType.assistant,\n label: formatMessage(employeeProfileMessages.Assistant),\n setFilter: setFilter,\n activeFilters: activeFilters,\n enabled: true,\n }),\n FilterUserSearch({\n item: TaskBoardFilterType.assistantBackup,\n label: formatMessage(employeeProfileMessages.AssistantBackup),\n setFilter: setFilter,\n activeFilters: activeFilters,\n enabled: true,\n }),\n FilterUserSearch({\n item: TaskBoardFilterType.seniorUser,\n label: formatMessage(employeeProfileMessages.SeniorUser),\n setFilter: setFilter,\n activeFilters: activeFilters,\n enabled: true,\n }),\n FilterUserSearch({\n item: TaskBoardFilterType.billingUser,\n label: formatMessage(employeeProfileMessages.BillingUser),\n setFilter: setFilter,\n activeFilters: activeFilters,\n enabled: true,\n }),\n FilterAssignmentTemplateSelector({\n item: TaskBoardFilterType.assignmentTemplateId,\n label: formatMessage(messages.AssignmentTemplate),\n setFilter: setFilter,\n activeFilters: activeFilters,\n enabled: true,\n }),\n FilterLegalFormMultiSelect({\n item: TaskBoardFilterType.legalForms,\n label: formatMessage(messages.LegalForms),\n setFilter: setFilter,\n activeFilters: activeFilters,\n showWithoutOption: true,\n enabled: true,\n }),\n FilterUserSearch({\n item: TaskBoardFilterType.relationUserId,\n label: formatMessage(messages.RelationsAssignedTo),\n setFilter: setFilter,\n activeFilters: activeFilters,\n enabled: true,\n }),\n FilterResourceTagsMultiSelect({\n item: TaskBoardFilterType.relationTags,\n label: formatMessage(messages.WithRelationLabels),\n setFilter: setFilter,\n activeFilters: activeFilters,\n withFilterBehaviour: true,\n enabled: true,\n }),\n FilterResourceTagsMultiSelect({\n item: TaskBoardFilterType.withoutRelationTags,\n label: formatMessage(messages.WithoutRelationLabels),\n setFilter: setFilter,\n activeFilters: activeFilters,\n withFilterBehaviour: false,\n enabled: true,\n }),\n FilterRelationTypeButtons({\n item: TaskBoardFilterType.relationTypes,\n label: formatMessage(messages.RelationType),\n setFilter: setFilter,\n activeFilters: activeFilters,\n enabled: true,\n }),\n FilterMyTeamsMultiSelect({\n item: TaskBoardFilterType.teams,\n label: formatMessage(messages.Teams),\n setFilter: setFilter,\n activeFilters: activeFilters,\n enabled: true,\n }),\n FilterUserSearch({\n item: TaskBoardFilterType.associate,\n label: formatMessage(employeeProfileMessages.Associate),\n setFilter: setFilter,\n activeFilters: activeFilters,\n enabled: true,\n }),\n FilterUserSearch({\n item: TaskBoardFilterType.responsible,\n label: formatMessage(employeeProfileMessages.Responsible),\n setFilter: setFilter,\n activeFilters: activeFilters,\n enabled: true,\n }),\n FilterPlannedTasksTagsMultiSelect({\n item: TaskBoardFilterType.withoutTags,\n label: formatMessage(messages.WithoutTaskLabels),\n setFilter: setFilter,\n activeFilters: activeFilters,\n withFilterBehaviour: false,\n enabled: true,\n }),\n FilterPlannedTasksTagsMultiSelect({\n item: TaskBoardFilterType.withTags,\n label: formatMessage(messages.WithTaskLabels),\n setFilter: setFilter,\n activeFilters: activeFilters,\n withFilterBehaviour: true,\n enabled: true,\n }),\n FilterToggleSelect({\n item: TaskBoardFilterType.onlySubtasksForAssignedUser,\n label: formatMessage(messages['Show only subtask assigned to selected user']),\n isAlwaysVisible: true,\n setFilter: setFilter,\n activeFilters: activeFilters,\n enabled: true,\n }),\n FilterToggleSelect({\n item: TaskBoardFilterType.userIsNextAssignedUser,\n label: formatMessage(messages['Show tasks where the selected user is next in line']),\n tooltip: formatMessage(messages.ShowTasksWhereSelectedUserIsNextInLineTooltip),\n isAlwaysVisible: true,\n enabled: true,\n setFilter: function (updatedFilters) {\n // when enabling this filter and no userId is filtered, set the userId to the current user\n if (updatedFilters.userIsNextAssignedUser && !activeFilters.userId) {\n setFilter(__assign(__assign({}, updatedFilters), { userId: authService.getUserId() }));\n }\n else {\n setFilter(updatedFilters);\n }\n },\n activeFilters: activeFilters,\n }),\n FilterToggleSelect({\n item: TaskBoardFilterType.includeDoneTasksInThePast,\n label: formatMessage(messages.IncludeDoneTasksInThePast),\n isAlwaysVisible: false,\n setFilter: setFilter,\n activeFilters: activeFilters,\n enabled: true,\n }),\n FilterRelationGroupMultiSelect({\n item: TaskBoardFilterType.relationGroups,\n label: formatMessage(messages.RelationGroups),\n isAlwaysVisible: false,\n setFilter: setFilter,\n activeFilters: activeFilters,\n enabled: true,\n }),\n FilterReferenceYear({\n item: TaskBoardFilterType.year,\n label: formatMessage(messages.ReferenceYear),\n isAlwaysVisible: false,\n setFilter: setFilter,\n activeFilters: activeFilters,\n enabled: authService.hasFeature('referenceYear'),\n }),\n ] })) }))] })));\n};\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport FormattedDateShort from '@/shared/components/FormattedDateShort';\nimport { DeleteIcon } from '@/shared/components/Icons';\nimport { AccessTokenQueryKey } from '@/shared/hooks/accessTokens/queryKey';\nimport { useGetAccessTokens } from '@/shared/hooks/accessTokens/useGetAccessTokens';\nimport { useRevokeAccessToken } from '@/shared/hooks/accessTokens/useRevokeAccessToken';\nimport { ModalType, useModalContext } from '@/shared/providers/ModalProvider';\nimport { useQueryClient } from '@tanstack/react-query';\nimport { useIntl } from 'react-intl';\nimport FormattedDateTime from '@/shared/components/FormattedDateTime';\nimport SimplePanel from '@/shared/components/SimplePanel';\nimport moment from 'moment';\nimport { messages } from './accessTokenMessages';\nvar AccessTokensContainer = function () {\n var queryClient = useQueryClient();\n var accessTokens = useGetAccessTokens();\n var revokeAccessToken = useRevokeAccessToken().revokeAccessToken;\n var setShowModalInfo = useModalContext().setShowModalInfo;\n var intl = useIntl();\n var createNewAccessToken = function () { return setShowModalInfo({ modalType: ModalType.CreatePat }); };\n var deleteProps = function (key) { return ({\n onClick: function () { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n setShowModalInfo({\n modalType: ModalType.YesNo,\n title: intl.formatMessage(messages.RevokeAccessToken),\n message: intl.formatMessage(messages.RevokeAccessTokenConfirmation),\n onSave: function () { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, revokeAccessToken({ key: key })];\n case 1:\n _a.sent();\n return [4 /*yield*/, queryClient.invalidateQueries([AccessTokenQueryKey.AccessTokens])];\n case 2:\n _a.sent();\n return [2 /*return*/];\n }\n });\n }); },\n });\n return [2 /*return*/];\n });\n }); },\n }); };\n return (_jsxs(\"div\", __assign({ className: \"dskb\" }, { children: [_jsx(SimplePanel, { article: \"8331100368924\", title: intl.formatMessage(messages.AccessTokens) }), _jsx(\"div\", __assign({ className: \"row\" }, { children: _jsxs(\"div\", __assign({ className: \"col-md-12\" }, { children: [_jsxs(\"table\", __assign({ className: \"table table-grid\" }, { children: [_jsx(\"thead\", { children: _jsxs(\"tr\", { children: [_jsx(\"th\", { children: intl.formatMessage(messages.Name) }), _jsx(\"th\", { children: intl.formatMessage(messages.Expires) }), _jsx(\"th\", { children: intl.formatMessage(messages.CreatedAt) }), _jsx(\"th\", { children: intl.formatMessage(messages.Actions) })] }) }), _jsx(\"tbody\", { children: (accessTokens === null || accessTokens === void 0 ? void 0 : accessTokens.data) &&\n accessTokens.data.map(function (accessToken) { return (_jsxs(\"tr\", { children: [_jsx(\"td\", { children: accessToken.name }), _jsx(\"td\", { children: _jsx(FormattedDateShort, { value: accessToken.expires }) }), _jsx(\"td\", { children: _jsx(FormattedDateTime, { value: moment(accessToken.created)\n .utc(true)\n .toISOString() }) }), _jsx(\"td\", { children: _jsx(DeleteIcon, __assign({ intl: intl }, deleteProps(accessToken.key))) })] }, accessToken.key)); }) })] })), _jsxs(\"button\", __assign({ className: \"btn btn-default btn-sticky btn-sticky-left\", type: \"button\", onClick: createNewAccessToken }, { children: [_jsx(\"i\", { className: \"fa fa-plus\" }), _jsx(\"span\", __assign({ className: \"margin5L\" }, { children: intl.formatMessage(messages.AddToken) }))] }))] })) }))] })));\n};\nexport default AccessTokensContainer;\n","import config from '@/config';\nimport api from '@/shared/api';\nimport { useQuery } from '@tanstack/react-query';\nimport { useIntl } from 'react-intl';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport { AccessTokenQueryKey } from './queryKey';\nexport var useGetAccessTokens = function () {\n var intl = useIntl();\n var _a = useQuery([AccessTokenQueryKey.AccessTokens], function () {\n return api.base\n .get(\"\".concat(config.appUrls.identity, \"/api/profile/pats\"))\n .then(function (res) { return res.data; });\n }, {\n enabled: true,\n onError: function (apiError) {\n handleHttpError(intl)(apiError);\n },\n retry: false,\n }), data = _a.data, isLoading = _a.isLoading, error = _a.error, refetch = _a.refetch;\n return {\n data: data,\n error: error,\n isLoading: isLoading,\n refetch: refetch,\n };\n};\n","import config from '@/config';\nimport api from '@/shared/api';\nimport { useMutation } from '@tanstack/react-query';\nimport { useIntl } from 'react-intl';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nexport var useRevokeAccessToken = function () {\n var intl = useIntl();\n var _a = useMutation(function (values) { return api.base\n .delete(\"\".concat(config.appUrls.identity, \"/api/profile/pats/revoke\"), { data: values.key, headers: {\n 'Content-Type': 'application/json'\n } }); }, {\n onError: function (apiError) {\n handleHttpError(intl)(apiError);\n }\n }), mutateAsync = _a.mutateAsync, isLoading = _a.isLoading, error = _a.error;\n return {\n revokeAccessToken: mutateAsync,\n isLoading: isLoading,\n error: error,\n };\n};\n","import { defineMessages } from 'react-intl';\n\nconst messages = defineMessages({\n msgTaskTimeRegistrationCreated: 'Registered {duration} for {relation}
    Click here to edit',\n msgTaskTimeRegistrationStarted: 'Started time registration on {task}',\n msgTimerRegistrationStarted: 'Started time registration',\n msgTaskTimeRegistrationStillRunning:\n 'Time registration on {task} for {relation} is still running.
    Duration: {duration}',\n msgTaskTimeRegistrationDiscarded: 'Registration discarded (less than 1 minute)',\n msgNoRegistrationMadeDefaultTimeZero: 'No time was registred because the default duration is 0',\n msgNoResourceDefined: 'No resource defined',\n msgTaskEmailCancelled: \"Because the mail was not sent, this task is returned to state 'to do'\",\n taskMgmtSendMailTitle: 'By dragging this task directly to done, the mail was not send.',\n taskMgmtSendMailContent: 'Click here to send it anyway',\n msgTaskOfTypeConditionCannotBeSetInProgress: 'Task of type condition cannot be set in progress.',\n});\n\nexport default messages;\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { injectIntl } from 'react-intl';\nimport OutsideClickHandler from 'react-outside-click-handler';\nimport { listItemMsg } from '../FormattedListValue';\nimport EnumSelectV2 from '../input/EnumSelectV2';\nimport EditableToggle from './EditableToggle';\nvar EditableEnumSelectV2 = function (_a) {\n var enumType = _a.enumType, onChange = _a.onChange, _b = _a.value, value = _b === void 0 ? null : _b, _c = _a.disabled, disabled = _c === void 0 ? false : _c, intl = _a.intl;\n var displayValue = intl.formatMessage(listItemMsg(enumType, value));\n return (_jsx(EditableToggle, __assign({ onSubmit: onChange, value: value, disabled: disabled, displayValue: displayValue }, { children: function (_a) {\n var inputValue = _a.inputValue, setInputValue = _a.setInputValue, submit = _a.submit;\n return (_jsx(OutsideClickHandler, __assign({ onOutsideClick: submit }, { children: _jsx(EnumSelectV2, { enumType: enumType, value: inputValue, onChange: function (v) { return setInputValue(v).then(submit); } }) })));\n } })));\n};\nexport default injectIntl(EditableEnumSelectV2);\n","import { defineMessages } from 'react-intl';\nvar messages = defineMessages({\n ReferenceYear: {\n id: 'ReferenceYear',\n defaultMessage: 'Reference year',\n },\n TaskBoard: {\n id: 'TaskBoard',\n defaultMessage: 'Task board',\n },\n CollapseAll: {\n id: 'CollapseAll',\n defaultMessage: 'Collapse all',\n },\n ExpandAll: {\n id: 'ExpandAll',\n defaultMessage: 'Expand all',\n },\n EmptyAccountingSoftware: {\n id: 'EmptyAccountingSoftware',\n defaultMessage: 'Empty accounting software',\n },\n TasksAssignedTo: {\n id: 'TasksAssignedTo',\n defaultMessage: 'Tasks assigned to',\n },\n SelectTask: {\n id: 'SelectTask',\n defaultMessage: 'Select task',\n },\n Status: {\n id: 'Status',\n defaultMessage: 'Status',\n },\n SubtaskStatus: {\n id: 'SubtaskStatus',\n defaultMessage: 'Subtask status',\n },\n DeadlineFrom: {\n id: 'DeadlineFrom',\n defaultMessage: 'Deadline from',\n },\n DeadlineUntil: {\n id: 'DeadlineUntil',\n defaultMessage: 'Deadline until',\n },\n SelectASubtask: {\n id: 'SelectASubtask',\n defaultMessage: 'Select a subtask',\n },\n FilterPeriodicity: {\n id: 'FilterPeriodicity',\n defaultMessage: 'Filter task periodicity',\n },\n VatPeriodicity: {\n id: 'VatPeriodicity',\n defaultMessage: 'VAT periodicity',\n },\n AccountingSoftware: {\n id: 'AccountingSoftware',\n defaultMessage: 'Accounting software',\n },\n OtherSoftware: {\n id: 'OtherSoftware',\n defaultMessage: 'Other software',\n },\n OwnCompanies: {\n id: 'OwnCompanies',\n defaultMessage: 'Own companies',\n },\n EndFiscalYear: {\n id: 'EndFiscalYear',\n defaultMessage: 'End fiscal year',\n },\n CreatedBy: {\n id: 'CreatedBy',\n defaultMessage: 'Created by',\n },\n LegalForms: {\n id: 'LegalForms',\n defaultMessage: 'Legal forms',\n },\n RelationsAssignedTo: {\n id: 'RelationsAssignedTo',\n defaultMessage: 'Relation assigned to',\n },\n WithRelationLabels: {\n id: 'WithRelationLabels',\n defaultMessage: 'Relation labels (with)',\n },\n WithoutRelationLabels: {\n id: 'WithoutRelationLabels',\n defaultMessage: 'Relation labels (without)',\n },\n RelationType: {\n id: 'RelationType',\n defaultMessage: 'Relation type',\n },\n Teams: {\n id: 'Teams',\n defaultMessage: 'Teams',\n },\n WithLabels: {\n id: 'WithLabels',\n defaultMessage: 'With labels',\n },\n WithoutLabels: {\n id: 'WithoutLabels',\n defaultMessage: 'Without labels',\n },\n WithTaskLabels: {\n id: 'WithTaskLabels',\n defaultMessage: 'With task labels',\n },\n WithoutTaskLabels: {\n id: 'WithoutTaskLabels',\n defaultMessage: 'Without task labels',\n },\n 'Show only subtask assigned to selected user': {\n id: 'Show only subtask assigned to selected user',\n defaultMessage: 'Show only subtask assigned to selected user',\n },\n AssignmentTemplate: {\n id: 'AssignmentTemplate',\n defaultMessage: 'Assignment template',\n },\n Add: {\n id: 'Add',\n defaultMessage: 'Add',\n },\n FinancialStatementScheme: {\n id: 'FinancialStatementScheme',\n defaultMessage: 'FinancialStatementScheme',\n },\n SocialSecurityFund: {\n id: 'SocialSecurityFund',\n defaultMessage: 'SocialSecurityFund',\n },\n SocialSecretariat: {\n id: 'SocialSecretariat',\n defaultMessage: 'SocialSecretariat',\n },\n 'Show tasks where the selected user is next in line': {\n id: 'Show tasks where the selected user is next in line',\n defaultMessage: 'Show tasks where the selected user is next in line',\n },\n ShowTasksWhereSelectedUserIsNextInLineTooltip: {\n id: 'ShowTasksWhereSelectedUserIsNextInLineTooltip',\n defaultMessage: 'When you have selected a user, this filter will only show the tasks where that user is next in line and can start working on the tasks.',\n },\n IncludeDoneTasksInThePast: {\n id: 'IncludeDoneTasksInThePast',\n defaultMessage: 'IncludeDoneTasksInThePast',\n },\n RelationGroups: {\n id: 'RelationGroups',\n defaultMessage: 'Relation groups',\n },\n});\nexport default messages;\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport config from '@/config';\nimport api from '@/shared/api';\nimport { useInfiniteQuery } from '@tanstack/react-query';\nimport { useIntl } from 'react-intl';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport { TaskQueryKey } from './queryKey';\nexport var useGetPlannedTasks = function (filters, pageParams) {\n var _a;\n var intl = useIntl();\n var cacheKey = [TaskQueryKey.PlannedTasks];\n var _b = useInfiniteQuery(cacheKey, function (_a) {\n var signal = _a.signal, pageParam = _a.pageParam;\n return api.base\n .get(\"\".concat(config.appUrls.tasks, \"/api/plannedTasks\"), {\n params: __assign(__assign(__assign({}, filters), pageParams), { page: pageParam }),\n signal: signal,\n })\n .then(function (res) { return res.data; });\n }, {\n enabled: true,\n onError: function (apiError) {\n handleHttpError(intl)(apiError);\n },\n getNextPageParam: function (lastPage, allPages) {\n return lastPage.length === pageParams.take ? allPages.length : undefined;\n },\n notifyOnChangeProps: 'all',\n }), data = _b.data, isLoading = _b.isLoading, error = _b.error, refetch = _b.refetch, fetchNextPage = _b.fetchNextPage;\n return {\n data: (_a = data === null || data === void 0 ? void 0 : data.pages) === null || _a === void 0 ? void 0 : _a.flat(1),\n error: error,\n isLoading: isLoading,\n refetch: refetch,\n fetchNextPage: fetchNextPage,\n };\n};\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport guid from '@/shared/utils/guid';\nimport UserSearch from '../UserSearch';\nexport var FilterUserSearch = function (_a) {\n var item = _a.item, setFilter = _a.setFilter, activeFilters = _a.activeFilters, label = _a.label, isAlwaysVisible = _a.isAlwaysVisible, enabled = _a.enabled;\n return ({\n filterItem: item,\n enabled: enabled,\n filterSelectLabel: !isAlwaysVisible ? label : undefined,\n element: (_jsx(UserSearch, { onChange: function (value) {\n var _a;\n var _b;\n return setFilter((_a = {}, _a[item] = (_b = value === null || value === void 0 ? void 0 : value.id) !== null && _b !== void 0 ? _b : undefined, _a));\n }, value: activeFilters[item], placeholder: label, withCurrentUser: true, withUnassigned: true, unassignedId: guid.empty })),\n });\n};\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { TaskTemplateMultiSelect } from '../multiselect/TaskTemplateMultiSelect';\nexport var FilterTaskTemplateMultiSelect = function (_a) {\n var _b;\n var item = _a.item, clearItems = _a.clearItems, setFilter = _a.setFilter, activeFilters = _a.activeFilters, label = _a.label, isAlwaysVisible = _a.isAlwaysVisible, enabled = _a.enabled;\n return ({\n filterItem: item,\n enabled: enabled,\n filterSelectLabel: !isAlwaysVisible ? label : undefined,\n element: (_jsx(TaskTemplateMultiSelect, { selection: (_b = activeFilters[item]) !== null && _b !== void 0 ? _b : [], onChange: function (value) {\n var _a, _b;\n return setFilter((clearItems && (!value || value.length !== 1)\n ? __assign((_a = {}, _a[item] = value !== null && value !== void 0 ? value : [], _a), clearItems.reduce(function (prev, clearItem) {\n var _a;\n return (__assign(__assign({}, prev), (_a = {}, _a[clearItem] = undefined, _a)));\n }, {})) : (_b = {}, _b[item] = value !== null && value !== void 0 ? value : [], _b)));\n }, placeholder: undefined })),\n });\n};\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport moment from 'moment';\nimport DelayedDateRangePicker from '../DelayedDateRangePicker';\nexport var FilterDelayedDateRangePicker = function (_a) {\n var startDateItem = _a.startDateItem, endDateItem = _a.endDateItem, startDateId = _a.startDateId, endDateId = _a.endDateId, startDatePlaceholder = _a.startDatePlaceholder, endDatePlaceholder = _a.endDatePlaceholder, setFilter = _a.setFilter, activeFilters = _a.activeFilters, label = _a.label, isAlwaysVisible = _a.isAlwaysVisible, enabled = _a.enabled;\n return ({\n filterItem: startDateItem,\n enabled: enabled,\n extraFilterItems: [endDateItem],\n filterSelectLabel: !isAlwaysVisible ? label : undefined,\n element: (_jsx(DelayedDateRangePicker, { startDate: activeFilters[startDateItem] && moment(activeFilters[startDateItem]), startDateId: startDateId, endDate: activeFilters[endDateItem] && moment(activeFilters[endDateItem]), endDateId: endDateId, onDatesChange: function (_a) {\n var _b;\n var startDate = _a.startDate, endDate = _a.endDate;\n setFilter((_b = {},\n _b[startDateItem] = startDate === null || startDate === void 0 ? void 0 : startDate.toISOString(),\n _b[endDateItem] = endDate === null || endDate === void 0 ? void 0 : endDate.toISOString(),\n _b));\n }, startDatePlaceholderText: startDatePlaceholder, endDatePlaceholderText: endDatePlaceholder, block: true })),\n });\n};\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport RelationSearch from '../RelationSearch';\nexport var FilterRelationSearch = function (_a) {\n var item = _a.item, itemName = _a.itemName, setFilter = _a.setFilter, activeFilters = _a.activeFilters, label = _a.label, isAlwaysVisible = _a.isAlwaysVisible, enabled = _a.enabled;\n return ({\n filterItem: item,\n enabled: enabled,\n filterSelectLabel: !isAlwaysVisible ? label : undefined,\n element: (_jsx(RelationSearch, { onChange: function (value) {\n var _a;\n var _b, _c;\n setFilter((_a = {},\n _a[item] = (_b = value === null || value === void 0 ? void 0 : value.id) !== null && _b !== void 0 ? _b : undefined,\n _a[itemName] = (_c = value === null || value === void 0 ? void 0 : value.label) !== null && _c !== void 0 ? _c : undefined,\n _a.invoiceStreamId = undefined,\n _a));\n }, initialSelectedItem: activeFilters[item] && activeFilters[itemName]\n ? { key: activeFilters[item], label: activeFilters[itemName] }\n : undefined })),\n });\n};\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport EnumMultiSelect from '../multiselect/EnumMultiSelect';\nexport var FilterEnumMultiSelect = function (_a) {\n var item = _a.item, type = _a.type, _b = _a.customItems, customItems = _b === void 0 ? [] : _b, setFilter = _a.setFilter, activeFilters = _a.activeFilters, label = _a.label, isAlwaysVisible = _a.isAlwaysVisible, enabled = _a.enabled;\n return ({\n filterItem: item,\n enabled: enabled,\n filterSelectLabel: !isAlwaysVisible ? label : undefined,\n element: (_jsx(EnumMultiSelect, { type: type, selection: activeFilters[item], onChange: function (value) {\n var _a;\n return setFilter((_a = {}, _a[item] = value !== null && value !== void 0 ? value : undefined, _a));\n }, placeholder: label, sortById: false, customItems: customItems })),\n });\n};\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport LegalFormMultiSelect from '../multiselect/LegalFormMultiSelect';\nexport var FilterLegalFormMultiSelect = function (_a) {\n var item = _a.item, setFilter = _a.setFilter, activeFilters = _a.activeFilters, label = _a.label, isAlwaysVisible = _a.isAlwaysVisible, enabled = _a.enabled, _b = _a.showWithoutOption, showWithoutOption = _b === void 0 ? false : _b;\n return ({\n filterItem: item,\n enabled: enabled,\n filterSelectLabel: !isAlwaysVisible ? label : undefined,\n element: (_jsx(LegalFormMultiSelect, { selection: activeFilters[item], onChange: function (value) {\n var _a;\n return setFilter((_a = {}, _a[item] = value !== null && value !== void 0 ? value : undefined, _a));\n }, placeholder: undefined, showWithoutOption: showWithoutOption })),\n });\n};\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { hasMultipleCompanies } from '../../security/HasMultiCompany';\nimport CompanyMultiSelect from '../multiselect/CompanyMultiSelect';\nexport var FilterCompanyMultiSelect = function (_a) {\n var _b;\n var item = _a.item, setFilter = _a.setFilter, activeFilters = _a.activeFilters, label = _a.label, isAlwaysVisible = _a.isAlwaysVisible, enabled = _a.enabled;\n return ({\n filterItem: item,\n enabled: enabled,\n filterSelectLabel: !isAlwaysVisible ? label : undefined,\n element: hasMultipleCompanies() ? (_jsx(CompanyMultiSelect, { selection: (_b = activeFilters[item]) !== null && _b !== void 0 ? _b : [], onChange: function (value) {\n var _a;\n return setFilter((_a = {}, _a[item] = value !== null && value !== void 0 ? value : undefined, _a));\n }, placeholder: undefined })) : null,\n });\n};\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport EndFiscalYearMultiSelect from '../multiselect/EndFiscalYearMultiSelect';\nexport var FilterEndFiscalYearMultiSelect = function (_a) {\n var item = _a.item, setFilter = _a.setFilter, activeFilters = _a.activeFilters, label = _a.label, isAlwaysVisible = _a.isAlwaysVisible, enabled = _a.enabled;\n return ({\n filterItem: item,\n enabled: enabled,\n filterSelectLabel: !isAlwaysVisible ? label : undefined,\n element: (_jsx(EndFiscalYearMultiSelect, { selection: activeFilters[item], onChange: function (value) {\n var _a;\n return setFilter((_a = {}, _a[item] = value !== null && value !== void 0 ? value : undefined, _a));\n } })),\n });\n};\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { useIntl } from 'react-intl';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport { BriefcaseIcon, IndustryIcon, UserFaIcon } from '../../Icons';\nimport { MultiSelectButtons } from '../MultiSelectButtons';\nexport var FilterRelationTypeButtons = function (_a) {\n var item = _a.item, setFilter = _a.setFilter, activeFilters = _a.activeFilters, label = _a.label, isAlwaysVisible = _a.isAlwaysVisible, enabled = _a.enabled;\n var formatMessage = useIntl().formatMessage;\n return {\n filterItem: item,\n enabled: enabled,\n filterSelectLabel: !isAlwaysVisible ? label : undefined,\n element: (_jsx(MultiSelectButtons, { options: [\n {\n id: '0',\n label: formatMessage(listItemMsg('relationType', 0, 'Company')),\n icon: _jsx(IndustryIcon, {}),\n },\n {\n id: '1',\n label: formatMessage(listItemMsg('relationType', 1, 'Sole proprietor')),\n icon: _jsx(BriefcaseIcon, {}),\n },\n {\n id: '2',\n label: formatMessage(listItemMsg('relationType', 2, 'Person')),\n icon: _jsx(UserFaIcon, {}),\n },\n ], onChange: function (value) {\n var _a;\n var _b;\n return setFilter((_a = {},\n _a[item] = ((_b = value === null || value === void 0 ? void 0 : value.length) !== null && _b !== void 0 ? _b : 0) > 0 ? value : undefined,\n _a));\n }, selected: activeFilters[item], fullWith: true })),\n };\n};\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport Toggle from 'react-toggle';\nexport var FilterToggleSelect = function (_a) {\n var item = _a.item, showOnItem = _a.showOnItem, setFilter = _a.setFilter, activeFilters = _a.activeFilters, label = _a.label, isAlwaysVisible = _a.isAlwaysVisible, tooltip = _a.tooltip, enabled = _a.enabled;\n return ({\n filterItem: item,\n enabled: enabled,\n filterSelectLabel: !isAlwaysVisible ? label : undefined,\n element: showOnItem && !activeFilters[showOnItem] ? null : (_jsxs(\"label\", __assign({ className: \"react-toggle-wrapper margin10T\", title: tooltip }, { children: [_jsx(Toggle, { checked: activeFilters[item], onChange: function (e) {\n var _a;\n var _b;\n return setFilter((_a = {}, _a[item] = (_b = e.target.checked) !== null && _b !== void 0 ? _b : undefined, _a));\n } }), _jsx(\"span\", __assign({ className: \"label-text\" }, { children: label }))] }))),\n });\n};\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport RelationGroupMultiSelect from '../multiselect/RelationGroupMultiSelect';\nexport var FilterRelationGroupMultiSelect = function (_a) {\n var _b;\n var item = _a.item, setFilter = _a.setFilter, activeFilters = _a.activeFilters, label = _a.label, isAlwaysVisible = _a.isAlwaysVisible, enabled = _a.enabled;\n return ({\n filterItem: item,\n filterSelectLabel: !isAlwaysVisible ? label : undefined,\n enabled: enabled,\n element: (_jsx(RelationGroupMultiSelect, { selection: (_b = activeFilters[item]) !== null && _b !== void 0 ? _b : [], onChange: function (value) {\n var _a;\n return setFilter((_a = {}, _a[item] = value !== null && value !== void 0 ? value : undefined, _a));\n }, placeholder: label })),\n });\n};\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport NumberInput from '@/shared/components/input/NumberInput';\nimport { defineMessages, useIntl } from 'react-intl';\nvar messages = defineMessages({\n ReferenceYear: {\n id: 'ReferenceYear',\n defaultMessage: 'ReferenceYear',\n },\n});\nexport var FilterReferenceYear = function (_a) {\n var item = _a.item, setFilter = _a.setFilter, activeFilters = _a.activeFilters, label = _a.label, isAlwaysVisible = _a.isAlwaysVisible, enabled = _a.enabled;\n var formatMessage = useIntl().formatMessage;\n return {\n filterItem: item,\n enabled: enabled,\n filterSelectLabel: !isAlwaysVisible ? label : undefined,\n element: (_jsx(NumberInput, { id: \"yearFilter\", max: 2100, noDecimals: true, step: 1, value: activeFilters[item], onChange: function (value) {\n var _a;\n return setFilter((_a = {}, _a[item] = value || null, _a));\n }, className: \"form-control\", placeholder: formatMessage(messages.ReferenceYear) })),\n };\n};\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { useEffect } from 'react';\nimport { useGetKPIs } from '@/shared/hooks/task/useGetKPIs';\nimport { useIntl } from 'react-intl';\nimport { KPIOptions } from '../../constants';\nimport { TaskBoardKPIFilterButton } from './TaskBoardKPIFilterButton';\nexport var TaskBoardFilterKPIs = function (_a) {\n var _b, _c, _d, _e, _f, _g, _h;\n var filters = _a.filters, setActiveKPI = _a.setActiveKPI;\n var t = useIntl().formatMessage;\n var _j = useGetKPIs(filters), data = _j.data, refetch = _j.refetch;\n useEffect(function () {\n refetch();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [filters]);\n return (_jsx(\"div\", __assign({ className: \"kpi-container info-block\" }, { children: _jsxs(\"div\", __assign({ className: \"flex-container\" }, { children: [_jsx(TaskBoardKPIFilterButton, { label: t({ id: 'Total' }), amount: (_b = data === null || data === void 0 ? void 0 : data.total) !== null && _b !== void 0 ? _b : 0, isActive: filters.kpi === KPIOptions.total, onClick: function () { return setActiveKPI(KPIOptions.total); } }), _jsx(TaskBoardKPIFilterButton, { label: t({ id: 'Where i can start' }), amount: (_c = data === null || data === void 0 ? void 0 : data.nextUserIsMe) !== null && _c !== void 0 ? _c : 0, isActive: filters.kpi === KPIOptions.nextUserIsMe, color: \"kpi-blue\", onClick: function () { return setActiveKPI(KPIOptions.nextUserIsMe); } }), _jsx(TaskBoardKPIFilterButton, { label: t({ id: 'Blocked' }), amount: (_d = data === null || data === void 0 ? void 0 : data.blocked) !== null && _d !== void 0 ? _d : 0, isActive: filters.kpi === KPIOptions.blocked, color: \"kpi-purple\", onClick: function () { return setActiveKPI(KPIOptions.blocked); } }), _jsx(TaskBoardKPIFilterButton, { label: t({ id: 'Past deadline' }), amount: (_e = data === null || data === void 0 ? void 0 : data.pastDeadline) !== null && _e !== void 0 ? _e : 0, isActive: filters.kpi === KPIOptions.pastDeadline, color: \"kpi-red\", onClick: function () { return setActiveKPI(KPIOptions.pastDeadline); } }), _jsx(TaskBoardKPIFilterButton, { label: t({ id: 'Deadline in one week' }), amount: (_f = data === null || data === void 0 ? void 0 : data.deadlineOneWeek) !== null && _f !== void 0 ? _f : 0, isActive: filters.kpi === KPIOptions.deadlineOneWeek, color: \"kpi-orange\", onClick: function () { return setActiveKPI(KPIOptions.deadlineOneWeek); } }), _jsx(TaskBoardKPIFilterButton, { label: t({ id: 'Deadline in two weeks' }), amount: (_g = data === null || data === void 0 ? void 0 : data.deadlineTwoWeeks) !== null && _g !== void 0 ? _g : 0, isActive: filters.kpi === KPIOptions.deadlineTwoWeeks, color: \"kpi-blue\", onClick: function () { return setActiveKPI(KPIOptions.deadlineTwoWeeks); } }), _jsx(TaskBoardKPIFilterButton, { label: t({ id: 'Deadline in three weeks' }), amount: (_h = data === null || data === void 0 ? void 0 : data.deadlineThreeWeeks) !== null && _h !== void 0 ? _h : 0, isActive: filters.kpi === KPIOptions.deadlineThreeWeeks, color: \"kpi-blue\", onClick: function () { return setActiveKPI(KPIOptions.deadlineThreeWeeks); } })] })) })));\n};\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport { defaultStates } from '@/modules/tasks/taskboard/kanban/constants';\nimport TaskRow from '@/modules/tasks/taskboard/kanban/task/TaskRow';\nimport SortTaskComponent from '@/modules/tasks/taskboard/partial/SortTaskComponent';\nimport taskboardMessages from '@/modules/tasks/taskboard/taskboardMessages';\nimport TaskContainer from '@/modules/tasks/taskboard/TaskContainer';\nimport taskMessages from '@/modules/tasks/taskMessages';\nimport { listItemMsg } from '@/shared/components/FormattedListValue';\nimport LoadingContainer from '@/shared/components/loading/LoadingContainer';\nimport { ColumnHeader, ScrollableTable } from '@/shared/components/table';\nimport { injectStateService } from '@/shared/services/StateService';\nimport { useEffect, useState } from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport omit from 'lodash/omit';\nimport isEqual from 'lodash/isEqual';\nimport SignalRService from '@/shared/services/SignalRService';\nimport { useGetPlannedTasks } from '@/shared/hooks/task/useGetPlannedTasks';\nimport { getLocalStorageItem, LocalStorageKey, setLocalStorageItem, } from '@/shared/services/localStorageService';\nimport { useQueryClient } from '@tanstack/react-query';\nimport { TaskQueryKey } from '@/shared/hooks/task/queryKey';\nimport { ModalType, useModalContext } from '@/shared/providers/ModalProvider';\nimport { showWhenPermission } from '@/shared/components/security';\nimport { useGetKPIs } from '@/shared/hooks/task/useGetKPIs';\nimport { useTaskTimerContext } from '@/shared/providers/TaskTimerProvider';\nimport { TaskBoardFilters } from './partial/filters/TaskBoardHeader';\nimport { migrateTaskboardFilters, } from './constants';\nimport { functionalities, privileges } from '@/shared/services/AuthService';\nvar TaskboardContainer = function (props) {\n var _a;\n var formatMessage = useIntl().formatMessage;\n var setShowModalInfo = useModalContext().setShowModalInfo;\n var _b = useState(true), openTaskDetailForTaskInRoute = _b[0], setOpenTaskDetailForTaskInRoute = _b[1];\n var stateProps = omit(props, ['dataCache', 'stateService']);\n var initialSearchParams = {\n page: 0,\n pageSize: 50,\n sortKey: 'relation',\n desc: false,\n width: '25vw',\n };\n var queryClient = useQueryClient();\n var handleTaskHasAttachmentsMessage = function (message) {\n var _a;\n if (message.level === 2)\n return; // ignore todo's\n var parentId = null;\n var previousTasks = queryClient.getQueryData([TaskQueryKey.PlannedTasks]);\n var updatedTasksQueryData = __assign({}, previousTasks);\n var mainTasks = (_a = updatedTasksQueryData === null || updatedTasksQueryData === void 0 ? void 0 : updatedTasksQueryData.pages) === null || _a === void 0 ? void 0 : _a.flat(1);\n var isMainTask = message.level === 0;\n var mainTask = mainTasks.find(function (x) { var _a; return x.id === ((_a = message.parentId) !== null && _a !== void 0 ? _a : message.id); });\n if (!mainTask)\n return;\n if (isMainTask) {\n mainTask.hasAttachments = message.hasAttachments;\n }\n else {\n var children = mainTask.children;\n var subTask = children.find(function (x) { return x.id === message.id; });\n if (subTask) {\n parentId = mainTask.id;\n subTask.hasAttachments = message.hasAttachments;\n mainTask.hasAttachments = message.parentHasAttachments;\n mainTask.children = __spreadArray([], children, true); // useEffect in KanbanBoard.tsx is not called without this line, and we need it to trigger the reshuffling of columns\n }\n }\n if (parentId) {\n queryClient.invalidateQueries([TaskQueryKey.TaskAttachments, parentId]);\n }\n queryClient.invalidateQueries([TaskQueryKey.TaskAttachments, message.id]);\n queryClient.setQueryData([TaskQueryKey.PlannedTasks], updatedTasksQueryData);\n };\n // if the route contains a task ID, from either the running task clock icon or the 'share task' link, we want to open the task detail modal of this task. Except for when the user navigated from task overview to taskboard..\n useEffect(function () {\n var plannedTaskId = stateProps.plannedTaskId, _a = stateProps.createTaskForRelation, createTaskForRelation = _a === void 0 ? null : _a;\n if (plannedTaskId && openTaskDetailForTaskInRoute && stateProps.openPlannedTaskDetailModal) {\n setShowModalInfo({\n modalType: ModalType.TaskDetail,\n task: { id: stateProps.plannedTaskId },\n });\n setOpenTaskDetailForTaskInRoute(false);\n }\n else if (openTaskDetailForTaskInRoute && createTaskForRelation) {\n setShowModalInfo({\n modalType: ModalType.OneTimeTask,\n relationId: createTaskForRelation,\n });\n setOpenTaskDetailForTaskInRoute(false);\n }\n SignalRService.subscribe('taskHasAttachmentsChanged', handleTaskHasAttachmentsMessage);\n return function () {\n SignalRService.unsubscribe('taskHasAttachmentsChanged', handleTaskHasAttachmentsMessage);\n };\n }, [stateProps, setShowModalInfo, openTaskDetailForTaskInRoute, setOpenTaskDetailForTaskInRoute]);\n var getInitialOpenTaskIds = function () {\n if (stateProps.plannedTaskId) {\n return [stateProps.plannedTaskId];\n }\n return getLocalStorageItem(LocalStorageKey.TaskBoardContainer_OpenTaskIdsArray, []);\n };\n var _c = useState(getInitialOpenTaskIds()), openTaskIds = _c[0], setOpenTaskIds = _c[1];\n var _d = useState(true), useParametersFromRoute = _d[0], setUseParametersFromRoute = _d[1];\n var setOpenTasks = function (newValue) {\n setLocalStorageItem(LocalStorageKey.TaskBoardContainer_OpenTaskIdsArray, newValue);\n setOpenTaskIds(newValue);\n };\n var getFiltersFromRouteOrLocalStorage = function () {\n var emptyState = {\n invoiceStreamId: null,\n relation: null,\n taskTemplateId: null,\n plannedTaskId: null,\n kpi: null,\n userId: null,\n onlySubtasksForAssignedUser: null,\n userIsNextAssignedUser: null,\n openPlannedTaskDetailModal: true,\n deadlineFrom: null,\n deadlineUntil: null,\n createTaskForRelation: null,\n };\n if (!isEqual(stateProps, emptyState) && useParametersFromRoute) {\n var filterFromState = {};\n if (stateProps.relation) {\n filterFromState.relationId = stateProps.relation.id;\n filterFromState.relationName = stateProps.relation.name;\n delete stateProps.relation;\n }\n if (stateProps.taskTemplateId) {\n filterFromState.taskTemplates = [stateProps.taskTemplateId];\n delete stateProps.taskTemplateId;\n }\n filterFromState = __assign(__assign({}, filterFromState), stateProps);\n if (stateProps.plannedTaskId) {\n setOpenTasks([stateProps.plannedTaskId]);\n }\n sessionStorage.setItem('TaskboardParams', JSON.stringify(__assign({}, filterFromState)));\n // we only want to use the route parameters the first time this method is called, otherwise resetting the filters does not work\n setUseParametersFromRoute(false);\n return filterFromState;\n }\n var storageString = sessionStorage.getItem('TaskboardParams');\n if (!storageString) {\n return undefined;\n }\n try {\n var filterObject = JSON.parse(storageString);\n return filterObject;\n }\n catch (error) {\n console.log(error);\n return {};\n }\n };\n var _e = useState((_a = getFiltersFromRouteOrLocalStorage()) !== null && _a !== void 0 ? _a : {}), activeFilters = _e[0], setActiveFilters = _e[1];\n var _f = useGetPlannedTasks(activeFilters, {\n page: 0,\n take: initialSearchParams.pageSize,\n }), data = _f.data, isLoading = _f.isLoading, onRefetch = _f.refetch, fetchNextPage = _f.fetchNextPage;\n var kpiData = useGetKPIs(activeFilters).data;\n var refetch = function () {\n if (isLoading) {\n var queryKey = [TaskQueryKey.PlannedTasks];\n queryClient.cancelQueries(queryKey);\n queryClient.invalidateQueries({ queryKey: queryKey });\n }\n return onRefetch();\n };\n var loadItems = function () { return __awaiter(void 0, void 0, void 0, function () {\n var result;\n var _a;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0: return [4 /*yield*/, fetchNextPage()];\n case 1:\n result = _b.sent();\n return [2 /*return*/, (_a = result === null || result === void 0 ? void 0 : result.data) === null || _a === void 0 ? void 0 : _a.pages[result.data.pages.length - 1]];\n }\n });\n }); };\n var setTasks = useTaskTimerContext().setTasks;\n useEffect(function () {\n if (data) {\n setTasks(data);\n }\n }, [data, setTasks]);\n var hasOpenTasks = (openTaskIds === null || openTaskIds === void 0 ? void 0 : openTaskIds.length) >= 1;\n var onSetIsAllCollapsed = function () {\n if (hasOpenTasks) {\n setOpenTasks([]);\n }\n else {\n setOpenTasks(data === null || data === void 0 ? void 0 : data.map(function (m) { return m.id; }));\n }\n };\n var onSetIsCollapsed = function (task) {\n var copy = __spreadArray([], openTaskIds, true);\n var index = copy.findIndex(function (x) { return x === task.id; });\n var subtaskIds = task.children ? task.children.map(function (x) { return x.id; }) : [];\n // openTaskIds can contain a subtask id (if navigated from other screen and we want to open this task when navigation to taskboard)\n var taskIsUncollapsedBySubtask = task.children && subtaskIds.some(function (x) { return openTaskIds.includes(x); });\n if (index >= 0) {\n copy.splice(index, 1);\n }\n else if (!taskIsUncollapsedBySubtask) {\n copy.push(task.id);\n }\n if (taskIsUncollapsedBySubtask) {\n copy = copy.filter(function (x) { return !subtaskIds.some(function (y) { return x === y; }); });\n }\n setOpenTasks(copy);\n };\n var onCreateNewTask = function () {\n setShowModalInfo({\n modalType: ModalType.OneTimeTask,\n relationId: activeFilters.relationId,\n });\n };\n var renderRow = function (task) {\n var subTaskIds = task.children ? task.children.map(function (x) { return x.id; }) : [];\n var isCollapsed = !openTaskIds.includes(task.id) && !openTaskIds.some(function (r) { return subTaskIds.includes(r); });\n return (_jsx(TaskRow, { task: task, isCollapsed: isCollapsed, onSetIsCollapsed: onSetIsCollapsed }, task.id + isCollapsed));\n };\n var setFilter = function (filter) {\n setActiveFilters(function (prev) {\n var newFilter = migrateTaskboardFilters(__assign(__assign({}, prev), filter));\n sessionStorage.setItem('TaskboardParams', JSON.stringify(newFilter));\n return newFilter;\n });\n setTimeout(function () {\n refetch();\n }, 0);\n };\n return (_jsxs(_Fragment, { children: [_jsx(TaskBoardFilters, { activeFilters: activeFilters, setFilter: setFilter }), _jsxs(LoadingContainer, __assign({ isLoading: isLoading && !data }, { children: [_jsx(\"div\", __assign({ className: \"container-fluid\" }, { children: _jsx(\"div\", __assign({ className: \"row btn-row\" }, { children: kpiData && (_jsxs(\"span\", __assign({ className: \"right\" }, { children: [data === null || data === void 0 ? void 0 : data.length, \" / \", kpiData === null || kpiData === void 0 ? void 0 : kpiData.total] }))) })) })), _jsx(TaskContainer, { children: _jsxs(ScrollableTable, __assign({ tableClassName: \"width100pct dskb-layout\", loadItems: loadItems, initialSearchParams: initialSearchParams, items: data !== null && data !== void 0 ? data : [], renderRow: function (item) { return renderRow(item); }, noDataLabel: _jsx(FormattedMessage, __assign({}, taskMessages.NoTasksFound)), fetchOnMount: false, renderTBody: true, noHover: true }, { children: [_jsx(ColumnHeader, { title: \"\" }, \"placeholder\"), _jsx(ColumnHeader, { title: _jsx(SortTaskComponent, { title: formatMessage(hasOpenTasks ? taskboardMessages.CollapseAll : taskboardMessages.ExpandAll), hasOpenTasks: hasOpenTasks, toggleOpenTasks: onSetIsAllCollapsed }) }, \"isAllCollapsed\"), defaultStates.map(function (defaultState) { return (_jsx(ColumnHeader, { title: formatMessage(listItemMsg('taskStatus', defaultState.status)) }, defaultState.name)); })] })) })] }))] }));\n};\nexport default showWhenPermission(functionalities.PlannedTask, privileges.Read)(injectStateService(TaskboardContainer));\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { injectIntl, defineMessages } from 'react-intl';\n\nimport intlShape from '@/shared/utils/intlShape';\nimport OkCancelModal from '@/shared/components/OkCancelModal';\nimport api from '@/shared/api';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport { hasAssignments } from '@/shared/components/security/HasAssignments';\nimport { ColumnHeader, ScrollableTable } from '@/shared/components/table';\nimport RelationName from '@/shared/components/RelationName';\n\nconst messages = defineMessages({\n InvoicedRelations: 'Invoiced relations',\n Relation: 'Relation',\n Assignment: 'Assignment',\n});\n\nclass InvoicedRelationsModal extends Component {\n state = {};\n\n static propTypes = {\n intl: intlShape.isRequired,\n onClose: PropTypes.func.isRequired,\n show: PropTypes.bool,\n relationId: PropTypes.string.isRequired,\n };\n\n static defaultProps = {\n show: false,\n };\n\n constructor(props) {\n super(props);\n\n this.state = {\n relations: [],\n showAssignments: hasAssignments(),\n };\n }\n\n closeModal = () => {\n const { onClose } = this.props;\n onClose();\n };\n\n // eslint-disable-next-line class-methods-use-this\n renderRelation = relation => (\n \n \n \n \n {relation.assignmentName}\n \n );\n\n loadRelations = parameters => {\n const { relationId, intl } = this.props;\n console.log('loading', parameters);\n return api.base\n .get('/api/relation/invoicingvia/invoicedRelations', {\n params: {\n id: relationId,\n sort: 'mainRelation.displayName',\n sortDesc: true,\n ...parameters,\n },\n })\n .then(({ data }) => {\n if (!data) return;\n\n this.setState(state => ({\n ...state,\n relations: parameters.page > 0 ? [...state.relations, ...data] : [...data],\n }));\n return data;\n })\n .catch(error => handleHttpError(intl)(error));\n };\n render() {\n const { show, intl } = this.props;\n const { relations, showAssignments, initialSearchParameters } = this.state;\n\n return (\n \n
    (this.scrollParentRef = ref)}>\n this.loadRelations(searchParams)}\n initialSearchParams={initialSearchParameters}\n items={relations}\n useWindow={false}\n renderTBody\n renderRow={item => this.renderRelation(item)}\n scrollParentRef={this.scrollParentRef}\n >\n \n\n {showAssignments ? (\n \n ) : null}\n \n
    \n \n );\n }\n}\n\nexport default injectIntl(InvoicedRelationsModal);\n","import { defineMessages } from 'react-intl';\n\nexport default defineMessages({\n TenantRoles: 'Roles',\n Name: 'Name',\n Save: 'Save',\n Add: 'Add',\n Cancel: 'Cancel',\n Functionality: 'Functionality',\n Read: 'Read',\n Write: 'Write',\n Create: 'Create',\n Update: 'Update',\n Delete: 'Delete',\n UseAdvanceWritePermissions: 'Use advance write permissions',\n EditTenantRole: 'Edit role',\n CreateTenantRole: 'Create role',\n DeleteConfirmationTitle: 'Delete?',\n DeleteRoleConfirmationMsg: 'Are you sure you want to delete this role?',\n Copy: 'Copy',\n CopyDefaultRole: 'Copy default role',\n});\n","import React, { Component } from 'react';\nimport PropTypes, { object } from 'prop-types';\nimport Modal from 'react-bootstrap/lib/Modal';\nimport classnames from 'classnames';\nimport { FormattedMessage, injectIntl, useIntl } from 'react-intl';\nimport Button from '@/shared/components/Button';\nimport EnumCacheService from '@/shared/services/EnumCacheService';\nimport { privileges } from '@/shared/services/AuthService';\n\nimport Checkbox from '@/shared/components/input/Checkbox';\nimport intlShape from '@/shared/utils/intlShape';\nimport api from '@/shared/api';\nimport config from '@/config';\nimport handleHttpError from '@/shared/services/HandleHttpError';\nimport messages from './tenantRoleMessages';\nimport { CanUpdate } from '@/shared/components/security';\n\nconst emptyRole = { name: '', permissions: {} };\n\n// eslint-disable-next-line no-bitwise\nconst hasPrivilege = (value, privilege) => (value & privilege) === privilege;\nconst isAdvanceWrite = value => {\n const writeCnt =\n (hasPrivilege(value, privileges.Create) ? 1 : 0) +\n (hasPrivilege(value, privileges.Update) ? 1 : 0) +\n (hasPrivilege(value, privileges.Delete) ? 1 : 0);\n\n return writeCnt !== 0 && writeCnt !== 3;\n};\n\n// eslint-disable-next-line no-bitwise\nconst writePrivilege = privileges.Create | privileges.Update | privileges.Delete;\nconst resetWritePermissions = permissions =>\n Object.keys(permissions).reduce((o, key) => {\n const value = permissions[key];\n o[key] = value;\n // eslint-disable-next-line no-bitwise\n if ((value & writePrivilege) !== writePrivilege) {\n // eslint-disable-next-line no-bitwise\n o[key] = value & ~writePrivilege;\n }\n return o;\n }, {});\n\nclass TenantRoleConfigModal extends Component {\n state = {\n advancedWrite: false,\n showValidation: false,\n saving: false,\n role: { ...emptyRole },\n };\n componentDidMount() {\n const { value, intl } = this.props;\n EnumCacheService.getTranslated('functionality', intl).then(functionalities => {\n const role = { ...emptyRole, ...(value ?? {}) };\n const advancedWrite = Object.values(role.permissions).some(p => isAdvanceWrite(p));\n this.setState({\n role,\n functionalities,\n advancedWrite,\n showValidation: false,\n saving: false,\n });\n });\n }\n showValidation = () => this.setState({ showValidation: true });\n\n updateName = name => {\n this.setState(({ role }) => ({ role: { ...role, name } }));\n };\n\n updateFunctionality = (functionality, privilege, checked) => {\n this.setState(({ role }) => {\n let rights = role.permissions[functionality];\n if (checked) {\n // eslint-disable-next-line no-bitwise\n rights |= privilege;\n } else {\n // eslint-disable-next-line no-bitwise\n rights &= ~privilege;\n }\n\n return {\n role: { ...role, permissions: { ...role.permissions, [functionality]: rights } },\n };\n });\n };\n\n isValid = () => {\n const { role } = this.state;\n\n if (!role) return false;\n if (!role.name) return false;\n if (!role.permissions) return false;\n\n if (!Object.values(role.permissions).some(x => x !== 0)) return false;\n\n return true;\n };\n save = () => {\n const { saving, role } = this.state;\n const { onClose } = this.props;\n if (!this.isValid() || saving) return '';\n this.setState({ saving: true });\n\n const requestMethod = role.id ? api.base.put : api.base.post;\n\n return requestMethod(`${config.appUrls.api}/api/TenantRole`, role)\n .then(\n ({ data }) => {\n if (!data) return '';\n onClose(data);\n return data;\n },\n error => {\n const { intl } = this.props;\n handleHttpError(intl)(error);\n return error;\n },\n )\n .finally(() => {\n if (typeof this !== 'undefined') this.setState({ saving: false });\n });\n };\n toggleAdvanceWrite = value => {\n if (value) {\n this.setState({ advancedWrite: value });\n } else {\n this.setState(({ role }) => ({\n advancedWrite: value,\n role: { ...role, permissions: resetWritePermissions(role.permissions) },\n }));\n }\n };\n render() {\n const { role, saving, advancedWrite, functionalities, showValidation } = this.state;\n const { onClose, intl } = this.props;\n const isValid = this.isValid();\n return (\n onClose(null)} keyboard={false} bsSize=\"large\">\n \n \n \n \n \n \n
    \n \n \n
    \n this.updateName(e.target.value)}\n className=\"form-control\"\n placeholder={intl.formatMessage(messages.Name)}\n autoComplete=\"off\"\n disabled={saving}\n />\n
    \n
    \n
    \n \n \n \n \n \n \n {advancedWrite && (\n <>\n \n \n \n \n )}\n \n \n \n {functionalities?.map(f => {\n //\n const rights = role.permissions[f.id];\n return (\n \n \n \n \n {advancedWrite && (\n <>\n \n \n \n \n )}\n \n );\n })}\n \n
    \n \n \n \n \n \n \n \n \n \n \n \n
    {f.label}\n this.updateFunctionality(f.id, privileges.Read, value)}\n value={hasPrivilege(rights, privileges.Read)}\n />\n \n this.updateFunctionality(f.id, writePrivilege, value)}\n value={hasPrivilege(rights, writePrivilege)}\n />\n \n \n this.updateFunctionality(f.id, privileges.Create, value)\n }\n value={hasPrivilege(rights, privileges.Create)}\n />\n \n \n this.updateFunctionality(f.id, privileges.Update, value)\n }\n value={hasPrivilege(rights, privileges.Update)}\n />\n \n \n this.updateFunctionality(f.id, privileges.Delete, value)\n }\n value={hasPrivilege(rights, privileges.Delete)}\n />\n
    \n \n \n \n this.toggleAdvanceWrite(value)}\n value={advancedWrite}\n text={intl.formatMessage(messages.UseAdvanceWritePermissions)}\n />\n \n \n \n this.save()}\n disabled={showValidation && !isValid}\n onFocus={this.showValidation}\n onMouseOver={this.showValidation}\n btnClassName=\"btn-inverse\"\n showProgress\n >\n \n \n \n \n \n );\n }\n}\n\nTenantRoleConfigModal.propTypes = {\n intl: intlShape.isRequired,\n onClose: PropTypes.func.isRequired,\n};\n\nexport default injectIntl(TenantRoleConfigModal);\n","import React, { useEffect, useState } from 'react';\n\nimport messages from './tenantRoleMessages';\n\nimport { canCreateRegistrationForUser } from '@/shared/components/registration/registrationHelpers';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport { Dropdown, MenuItem, SplitButton } from 'react-bootstrap';\nimport { FaCouch, FaPlus, FaSun } from 'react-icons/fa';\nimport DropdownMenu from 'react-bootstrap/lib/DropdownMenu';\nimport { FormattedMessage } from 'react-intl';\nimport EnumCacheService from '@/shared/services/EnumCacheService';\nimport FormattedListValue from '@/shared/components/FormattedListValue';\nimport api from '@/shared/api';\nimport config from '@/config';\n\nconst AddTenantRoleDropdownButton = ({ intl, onOpenEditModal }) => {\n const [roles, setRoles] = useState([]);\n\n useEffect(() => {\n let mounted = true;\n EnumCacheService.getTranslated('role', intl, true).then(data => {\n if (!mounted) return;\n setRoles(data);\n });\n\n return () => {\n mounted = false;\n };\n }, []);\n\n const onSelectRole = role => {\n if (role.permissions) {\n return onOpenEditModal({ name: role.label, permissions: role.permissions });\n }\n return api.base\n .get(`${config.appUrls.api}/api/TenantRole/Permissions/${role.id}`)\n .then(({ data }) => {\n setRoles(oldRoles =>\n oldRoles.map(x => (x.id === role.id ? { ...x, permissions: data ?? {} } : x)),\n );\n\n return onOpenEditModal({ name: role.label, permissions: data ?? {} });\n });\n };\n\n return (\n onOpenEditModal({})}\n id=\"AddRegistrationButton\"\n bsStyle=\"inverse\"\n pullRight\n toggleLabel={intl.formatMessage(messages.Add)}\n title={\n \n \n \n \n }\n >\n \n \n \n {roles.map(role => (\n onSelectRole(role)}>\n {role.label}\n \n ))}\n \n );\n};\n\nexport default AddTenantRoleDropdownButton;\n","import {\n CanCreate,\n CanDelete,\n CanUpdate,\n showWhenPermission,\n CanRead,\n} from '@/shared/components/security';\nimport ZendeskHelp from '@/shared/components/ZendeskHelp';\nimport React, { Component } from 'react';\nimport { FormattedMessage, injectIntl } from 'react-intl';\n\nimport api from '@/shared/api';\nimport config from '@/config';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport { FaPencilAlt, FaTrashAlt } from 'react-icons/fa';\nimport YesNoModal from '@/shared/components/YesNoModal';\nimport HandleHttpError from '@/shared/services/HandleHttpError';\nimport intlShape from '@/shared/utils/intlShape';\nimport { CopyIcon } from '@/shared/components/Icons';\nimport messages from './tenantRoleMessages';\nimport TenantRoleConfigModal from './TenantRoleConfigModal';\nimport AddTenantRoleDropdownButton from './AddTenantRoleDropdownButton';\nimport showWhenFeature from '@/shared/components/security/showWhenFeature';\n\nclass TenantRoleContainer extends Component {\n state = {\n items: [],\n editModal: null,\n roleToDelete: null,\n };\n\n componentDidMount() {\n api.base.get(`${config.appUrls.api}/api/TenantRole/Settings`).then(({ data }) => {\n this.setState({ items: data.sort(dynamicSort('name')) });\n });\n }\n\n openEditDialog = model => {\n this.setState({\n editModal: model,\n });\n };\n onDelete = role => {\n this.setState({ roleToDelete: role });\n };\n deleteRole() {\n const { roleToDelete } = this.state;\n const { intl } = this.props;\n if (!roleToDelete || !roleToDelete.id) return;\n return api.base.delete(`${config.appUrls.api}/api/TenantRole/${roleToDelete.id}`).then(() => {\n this.setState(({ items }) => ({\n items: items.filter(x => x.id !== roleToDelete.id),\n roleToDelete: null,\n }));\n }, HandleHttpError(intl));\n }\n updateRole = role => {\n if (!role || !role.id) {\n this.setState({ editModal: null });\n return;\n }\n\n this.setState(({ items }) => {\n let found = false;\n const newItems = items.map(x => {\n if (x.id !== role.id) return x;\n found = true;\n return { ...x, ...role };\n });\n\n return {\n items: (found ? newItems : [...items, role]).sort(dynamicSort('name')),\n editModal: null,\n };\n });\n };\n\n roleNameExists = name => {\n const { items } = this.state;\n return items.some(x => x.name === name);\n };\n\n copyRole = role => {\n let name = '';\n for (let i = 2; i < 20; i++) {\n name = `${role.name} ${i}`;\n if (!this.roleNameExists(name)) break;\n }\n this.openEditDialog({ ...role, permissions: { ...role.permissions }, id: undefined, name });\n };\n\n render() {\n const { items, editModal, roleToDelete } = this.state;\n const { intl } = this.props;\n return (\n
    \n
    \n
    \n

    \n \n \n \n \n

    \n \n
    \n \n
    \n
    \n
    \n
    \n
    \n \n \n \n \n \n \n \n {items.map(x => (\n \n \n \n \n ))}\n \n
    \n \n \n \n
    {x.name}\n \n
    \n \n this.copyRole(x)}\n >\n \n \n \n \n this.openEditDialog(x)}>\n \n \n \n \n this.onDelete(x)}>\n \n \n \n
    \n
    \n
    \n {editModal && (\n this.updateRole(value)} />\n )}\n {roleToDelete && (\n \n this.setState(state => ({\n ...state,\n roleToDelete: null,\n }))\n }\n onSave={() => this.deleteRole()}\n />\n )}\n
    \n );\n }\n}\n\nTenantRoleContainer.propTypes = {\n intl: intlShape.isRequired,\n};\n\nexport default showWhenFeature('CustomRoles')(\n showWhenPermission('CompanyOwn', 'read')(injectIntl(TenantRoleContainer)),\n);\n","import angular from 'angular';\nimport { react2angular } from 'react2angular';\nimport CompliancyContainer from '../modules/compliancy/CompliancyContainer';\nimport DocumentsContainer from '../modules/documents/DocumentsContainer';\nimport EmailsContainer from '../modules/documents/EmailsContainer';\n\nimport HomeDashboardContainer from '../modules/home/HomeDashboardContainer';\nimport InteractionsContainer from '../modules/interactions/InteractionsContainer';\nimport ToInvoiceContainer from '../modules/invoicing/toInvoice/ToInvoiceContainer';\nimport JobDetailContainer from '../modules/jobs/JobDetailContainer';\nimport JobOverviewContainer from '../modules/jobs/JobOverviewContainer';\nimport NotificationOverviewContainer from '../modules/notifications/NotificationOverviewContainer';\nimport NotificationSettingsContainer from '../modules/notifications/NotificationSettingsContainer';\nimport PriceGridContainer from '../modules/pricegrids/PriceGridContainer';\nimport RelationAuditContainer from '../modules/relations/audit/RelationAuditContainer';\nimport BudgetOverviewContainer from '../modules/relations/budgets/BudgetOverviewContainer';\nimport InvoiceStreamContainer from '../modules/relations/invoiceStreamOverview/InvoiceStreamContainer';\nimport RelationOverviewContainer from '../modules/relations/overview/RelationOverviewContainer';\nimport PlannedRegistrationOverviewContainer from '../modules/relations/plannedRegistrationOverview/PlannedRegistrationOverviewContainer';\nimport TaskScheduleOverviewContainer from '../modules/relations/taskScheduleOverview/TaskScheduleOverviewContainer';\nimport AbsencePerEmployeeContainer from '../modules/reporting/absencePerEmployee/AbsencePerEmployeeContainer';\nimport AbsenceCalendarContainer from '../modules/reporting/absenceCalendar/AbsenceCalendarContainer';\nimport HoursPerEmployeeReportContainer from '../modules/reporting/hoursPerEmployee/HoursPerEmployeeReportContainer';\nimport InvoicingHistoryContainer from '../modules/reporting/invoicingHistory/InvoicingHistoryContainer';\nimport RegistrationsPerResourceCategoryContainer from '../modules/reporting/registrationsPer/RegistrationsPerResourceCategoryContainer';\nimport RegistrationsPerTaskTemplateContainer from '../modules/reporting/registrationsPer/RegistrationsPerTaskTemplateContainer';\nimport RegistrationsPerUserContainer from '../modules/reporting/registrationsPer/RegistrationsPerUserContainer';\nimport RegistrationsPerRelationContainer from '../modules/reporting/registrationsPer/relation/RegistrationsPerRelationContainer';\nimport RelationRentabilityContainer from '../modules/reporting/relationRentability/RelationRentabilityContainer';\nimport AssignmentTemplateContainer from '../modules/settings/AssignmentTemplates/AssignmentTemplateContainer';\nimport TagSettingsContainer from '../modules/settings/Tags/TagSettingsContainer';\nimport DocumentTreeConfiguration from '../modules/settings/Documents/DocumentTreeConfiguration';\nimport DocumentTemplateContainer from '../modules/settings/DocumentTemplates/DocumentTemplateContainer';\nimport InvoiceSchedulesContainer from '../modules/settings/InvoiceSchedules/InvoiceSchedulesContainer';\nimport TeamsContainer from '../modules/settings/teams/TeamsContainer';\nimport WorkflowConfigurationContainer from '../modules/settings/WorkflowConfiguration/WorkflowConfigurationContainer';\nimport TaskDashboardContainer from '../modules/tasks/dashboard/TaskDashboardContainer';\nimport TaskListContainer from '../modules/tasks/taskList/TaskListContainer';\nimport TaskOverviewContainer from '../modules/tasks/taskOverview/TaskOverviewContainer';\nimport RegistrationFormTestContainer from '../shared/components/registration/RegistrationFormTestContainer';\nimport IntraCompanyBillingContainer from '../modules/invoicing/intraCompany/IntraCompanyBillingContainer';\nimport HrmOverviewContainer from '../modules/hrm/overview/HrmOverviewContainer';\n\nimport CreateTimerRegistrationModal from '@/modules/registrations/modals/CreateTimerRegistrationModal';\nimport AppProviders, {\n withDataProvider,\n withModalProvider,\n withQueryClient,\n withTaskTimerProvider,\n} from '@/shared/providers/AppProviders';\nimport TaskboardContainer from '../modules/tasks/taskboard/TaskboardContainer';\nimport AccessTokensContainer from '@/modules/profile/accessTokens/accessTokens';\nimport DocumentDetailsModal from '@/modules/documents/details/DocumentDetailsModal';\nimport TaskDetailsModal from '@/modules/tasks/taskDetails/TaskDetailsModal';\nimport SingleRelationMailModal from '@/shared/components/email/SingleRelationMailModal';\nimport CreateToDoModal from '@/modules/tasks/CreateToDoModal';\nimport InvoicedRelationsModal from '@/modules/relations/relationfile/InvoicedRelationsModal';\n\nimport TenantRoleContainer from '@/modules/settings/TenantRoles/TenantRoleContainer';\n\nconst componentsModule = angular\n .module('cloudX.components', [])\n //\n // add here all your top level react components\n //\n .component(\n 'relationCompliancyContainer',\n react2angular(AppProviders(CompliancyContainer), [], ['$state', '$translate', 'dataCache']),\n )\n .component('currencySymbol', {\n template: '{{$ctrl.currencySymbol}}',\n controller: [\n 'dataCache',\n function CurrencySymbolController(dataCache) {\n var currencyCode = dataCache.getDefaultCompany().currencyCode;\n this.currencySymbol = '€';\n\n if (currencyCode == 'ZAR') {\n this.currencySymbol = 'R';\n }\n },\n ],\n })\n .component(\n 'documentsContainer',\n react2angular(\n AppProviders(DocumentsContainer),\n ['searchParams', 'documentId'],\n ['$state', '$translate', 'dataCache'],\n ),\n )\n .component(\n 'documentDetailsModal',\n react2angular(\n AppProviders(DocumentDetailsModal),\n ['documentId', 'show', 'onClose', 'onSave'],\n ['$state', '$translate', 'dataCache'],\n ),\n )\n .component(\n 'taskDetailsModal',\n react2angular(\n AppProviders(withQueryClient(withDataProvider(withModalProvider(TaskDetailsModal)))),\n ['task', 'show', 'onClose', 'onSave', 'showSendEmailButton'],\n ['$state', '$translate', 'dataCache'],\n ),\n )\n .component(\n 'createToDoModal',\n react2angular(\n AppProviders(CreateToDoModal),\n ['relationId', 'show', 'onClose', 'onSave'],\n ['$state', '$translate', 'dataCache'],\n ),\n )\n .component(\n 'invoicedRelationsModal',\n react2angular(\n AppProviders(InvoicedRelationsModal),\n ['relationId', 'show', 'onClose', 'onSave'],\n ['$state', '$translate', 'dataCache'],\n ),\n )\n .component(\n 'emailsContainer',\n react2angular(AppProviders(EmailsContainer), [], ['$state', '$translate', 'dataCache']),\n )\n .component(\n 'relationOverviewContainer',\n react2angular(\n AppProviders(RelationOverviewContainer),\n ['searchParams'],\n ['$state', '$translate', 'dataCache'],\n ),\n )\n .component(\n 'jobOverviewContainer',\n react2angular(AppProviders(JobOverviewContainer), [], ['$state', '$translate', 'dataCache']),\n )\n .component(\n 'jobDetailContainer',\n react2angular(\n AppProviders(JobDetailContainer),\n ['jobId'],\n ['$state', '$translate', 'dataCache'],\n ),\n )\n .component(\n 'invoiceSchedulesContainer',\n react2angular(\n AppProviders(InvoiceSchedulesContainer),\n ['editScheduleId'],\n ['$state', '$translate', 'dataCache'],\n ),\n )\n .component(\n 'workflowConfigurationContainer',\n react2angular(\n AppProviders(WorkflowConfigurationContainer),\n [],\n ['$state', '$translate', 'dataCache'],\n ),\n )\n .component(\n 'priceGridContainer',\n react2angular(AppProviders(PriceGridContainer), [], ['$state', '$translate', 'dataCache']),\n )\n .component(\n 'documentTreeConfiguration',\n react2angular(\n AppProviders(DocumentTreeConfiguration),\n [],\n ['$state', '$translate', 'dataCache'],\n ),\n )\n .component(\n 'tagSettingsContainer',\n react2angular(\n AppProviders(TagSettingsContainer),\n ['tab'],\n ['$state', '$translate', 'dataCache'],\n ),\n )\n .component(\n 'documentTemplateContainer',\n react2angular(\n AppProviders(DocumentTemplateContainer),\n [],\n ['$state', '$translate', 'dataCache'],\n ),\n )\n .component(\n 'teamsContainer',\n react2angular(AppProviders(TeamsContainer), [], ['$state', '$translate', 'dataCache']),\n )\n .component(\n 'relationRentabilityContainer',\n react2angular(\n AppProviders(RelationRentabilityContainer),\n ['searchParams'],\n ['$state', '$translate', 'dataCache'],\n ),\n )\n .component(\n 'invoicingHistoryContainer',\n react2angular(\n AppProviders(InvoicingHistoryContainer),\n [],\n ['$state', '$translate', 'dataCache'],\n ),\n )\n .component(\n 'hoursPerEmployeeReportContainer',\n react2angular(\n AppProviders(HoursPerEmployeeReportContainer),\n [],\n ['$state', '$translate', 'dataCache'],\n ),\n )\n .component(\n 'toInvoiceContainer',\n react2angular(\n AppProviders(ToInvoiceContainer),\n ['searchParams'],\n ['$state', '$translate', 'dataCache', 'invoiceDialogsSvc'],\n ),\n )\n .component(\n 'intraCompanyBillingContainer',\n react2angular(\n AppProviders(\n withQueryClient(withDataProvider(withModalProvider(IntraCompanyBillingContainer))),\n ),\n ['searchParams'],\n ['$state', '$translate', 'dataCache', 'invoiceDialogsSvc'],\n ),\n )\n .component(\n 'notificationOverviewContainer',\n react2angular(\n AppProviders(NotificationOverviewContainer),\n [],\n ['$state', '$translate', 'dataCache'],\n ),\n )\n .component(\n 'interactionsContainer',\n react2angular(\n AppProviders(InteractionsContainer),\n ['searchParams', 'openMailModal'],\n ['$state', '$translate', 'dataCache'],\n ),\n )\n .component(\n 'taskScheduleOverviewContainer',\n react2angular(\n AppProviders(TaskScheduleOverviewContainer),\n [],\n ['$state', '$translate', 'dataCache'],\n ),\n )\n .component(\n 'invoiceStreamContainer',\n react2angular(\n AppProviders(InvoiceStreamContainer),\n [],\n ['$state', '$translate', 'dataCache', 'invoiceDialogsSvc'],\n ),\n )\n .component(\n 'assignmentTemplateContainer',\n react2angular(\n AppProviders(AssignmentTemplateContainer),\n [],\n ['$state', '$translate', 'dataCache'],\n ),\n )\n .component(\n 'registrationsPerRelationContainer',\n react2angular(\n AppProviders(RegistrationsPerRelationContainer),\n [],\n ['$state', '$translate', 'dataCache'],\n ),\n )\n .component(\n 'registrationsPerResourceCategoryContainer',\n react2angular(\n AppProviders(RegistrationsPerResourceCategoryContainer),\n [],\n ['$state', '$translate', 'dataCache'],\n ),\n )\n .component(\n 'registrationsPerTaskTemplateContainer',\n react2angular(\n AppProviders(RegistrationsPerTaskTemplateContainer),\n [],\n ['$state', '$translate', 'dataCache'],\n ),\n )\n .component(\n 'registrationsPerUserContainer',\n react2angular(\n AppProviders(RegistrationsPerUserContainer),\n [],\n ['$state', '$translate', 'dataCache'],\n ),\n )\n .component(\n 'homeDashboardContainer',\n react2angular(\n AppProviders(withQueryClient(withDataProvider(withModalProvider(HomeDashboardContainer)))),\n [],\n ['$state', '$translate', 'dataCache'],\n ),\n )\n .component(\n 'plannedRegistrationOverviewContainer',\n react2angular(\n AppProviders(PlannedRegistrationOverviewContainer),\n [],\n ['$state', '$translate', 'dataCache'],\n ),\n )\n .component(\n 'registrationFormTestContainer',\n react2angular(\n AppProviders(RegistrationFormTestContainer),\n [],\n ['$state', '$translate', 'dataCache'],\n ),\n )\n .component(\n 'notificationSettingsContainer',\n react2angular(\n AppProviders(NotificationSettingsContainer),\n [],\n ['$state', '$translate', 'dataCache'],\n ),\n )\n .component(\n 'absencePerEmployeeContainer',\n react2angular(\n AppProviders(AbsencePerEmployeeContainer),\n [],\n ['$state', '$translate', 'dataCache'],\n ),\n )\n .component(\n 'absenceCalendarContainer',\n react2angular(\n AppProviders(AbsenceCalendarContainer),\n [],\n ['$state', '$translate', 'dataCache'],\n ),\n )\n .component(\n 'relationAuditContainer',\n react2angular(\n AppProviders(RelationAuditContainer),\n ['relationId'],\n ['$state', '$translate', 'dataCache'],\n ),\n )\n .component(\n 'budgetOverviewContainer',\n react2angular(\n AppProviders(BudgetOverviewContainer),\n [],\n ['$state', '$translate', 'dataCache', 'invoiceDialogsSvc'],\n ),\n )\n .component(\n 'taskOverviewContainer',\n react2angular(\n AppProviders(withQueryClient(withDataProvider(withModalProvider(TaskOverviewContainer)))),\n ['searchParams'],\n ['$state', '$translate', 'dataCache'],\n ),\n )\n .component(\n 'taskListContainer',\n react2angular(\n AppProviders(withQueryClient(withDataProvider(withModalProvider(TaskListContainer)))),\n ['searchParams', 'taskId', 'sort', 'desc'],\n ['$state', '$translate', 'dataCache'],\n ),\n )\n .component(\n 'taskDashboardContainer',\n react2angular(\n AppProviders(withQueryClient(withDataProvider(withModalProvider(TaskDashboardContainer)))),\n ['searchParams'],\n ['$state', '$translate', 'dataCache'],\n ),\n )\n .component(\n 'taskboardContainer',\n react2angular(\n AppProviders(\n withQueryClient(\n withDataProvider(withModalProvider(withTaskTimerProvider(TaskboardContainer))),\n ),\n ),\n [\n 'relation',\n 'invoiceStreamId',\n 'taskTemplateId',\n 'plannedTaskId',\n 'kpi',\n 'userId',\n 'onlySubtasksForAssignedUser',\n 'userIsNextAssignedUser',\n 'openPlannedTaskDetailModal',\n 'deadlineFrom',\n 'deadlineUntil',\n 'createTaskForRelation',\n ],\n ['$state', '$translate', 'dataCache'],\n ),\n )\n .component(\n 'createTimerRegistrationModal',\n react2angular(\n AppProviders(CreateTimerRegistrationModal),\n ['initialValue', 'onClose', 'onSave', 'show'],\n ['$state', '$translate', 'dataCache'],\n ),\n )\n .component(\n 'accessTokensContainer',\n react2angular(\n AppProviders(\n withQueryClient(\n withDataProvider(withModalProvider(withTaskTimerProvider(AccessTokensContainer))),\n ),\n ),\n [],\n ['$state', '$translate', 'dataCache'],\n ),\n )\n .component(\n 'hrmOverviewContainer',\n react2angular(AppProviders(HrmOverviewContainer), [], ['$state', '$translate', 'dataCache']),\n )\n .component(\n 'tenantRoleContainer',\n react2angular(AppProviders(TenantRoleContainer), [], ['$state', '$translate', 'dataCache']),\n );\n\nexport default componentsModule.name;\n","import angular from 'angular';\n\nimport 'angular-resource';\nimport 'angular-local-storage';\nimport 'angular-translate';\nimport 'angular-translate-storage-local';\nimport 'angular-translate-storage-cookie';\nimport 'angular-translate-loader-static-files';\nimport 'angular-ui-bootstrap';\nimport 'ng-infinite-scroll/build/ng-infinite-scroll';\nimport 'angular-ui-router';\nimport 'angular-ui-mask';\nimport 'jquery-ui/ui/widgets/draggable';\nimport 'jquery-ui/ui/widgets/droppable';\nimport 'angular-dragdrop';\nimport 'angular-cookies';\nimport 'angular-sanitize';\nimport 'angular-modal-service';\nimport 'angular-dynamic-locale';\nimport 'angular-xeditable';\nimport 'jquery-minicolors';\nimport 'angular-minicolors';\nimport './assets/angularjs-ckeditor';\nimport 'ng-tags-input';\nimport 'moment';\nimport 'angular-moment';\nimport 'angular-file-saver';\nimport 'angularjs-autogrow';\n\nimport { registerPlugin } from 'react-filepond';\nimport FilePondPluginFileValidateSize from 'filepond-plugin-file-validate-size';\nimport FilePondPluginFileValidateType from 'filepond-plugin-file-validate-type';\n\nimport components from './components';\nimport SignalRService from '@/shared/services/SignalRService';\nimport DocumentService from '@/shared/services/DocumentService';\nimport { initTranslateService } from '@/shared/services/TranslateService';\nimport config from '@/config';\n\nangular\n .module('cloudX', [\n 'commonServices',\n 'cxTable',\n 'cxInvoicing',\n 'cxRelations',\n 'cxRegistrations',\n 'cxSettings',\n 'cxTranslations',\n 'cxNotifications',\n 'cxTaskflow',\n\n 'ui.router',\n 'ui.mask',\n 'ui.bootstrap',\n\n 'ngCookies',\n 'ngLocale',\n 'ngSanitize',\n 'ngDragDrop',\n\n 'angularModalService',\n\n 'infinite-scroll',\n 'LocalStorageModule',\n 'pascalprecht.translate',\n 'tmh.dynamicLocale',\n 'xeditable',\n 'minicolors',\n 'ckeditor',\n 'ngTagsInput',\n 'angularMoment',\n 'ngFileSaver',\n 'angularjs-autogrow',\n components,\n ])\n .config([\n '$stateProvider',\n '$urlRouterProvider',\n '$urlMatcherFactoryProvider',\n '$httpProvider',\n '$translateProvider',\n 'tmhDynamicLocaleProvider',\n 'ipnConfig',\n 'uibDatepickerPopupConfig',\n 'uibDatepickerConfig',\n 'minicolorsProvider',\n 'appUrls',\n 'buildversion',\n 'environment',\n function(\n $stateProvider,\n $urlRouterProvider,\n $urlMatcherFactoryProvider,\n $httpProvider,\n $translateProvider,\n tmhDynamicLocaleProvider,\n ipnConfig,\n uibDatepickerPopupConfig,\n uibDatepickerConfig,\n minicolorsProvider,\n appUrls,\n buildversion,\n environment,\n ) {\n //Make routes case insensitive\n $urlMatcherFactoryProvider.caseInsensitive(true);\n //Special encoder/decoder for passing objects in url params\n $urlMatcherFactoryProvider.type('json', {\n encode: val => JSON.stringify(val),\n decode: str => (str ? JSON.parse(str) : null),\n is: val => angular.isObject(val) && !angular.equals({}, val),\n pattern: /^\\{.+\\}$/,\n });\n\n $stateProvider\n //Layouts\n .state('layout_sb', {\n //Layout with sidebar\n abstract: true,\n template: `
    \n
    \n
    \n
    \n
    `,\n resolve: {\n ready: [\n 'optionsSvc',\n function(optionsSvc) {\n return optionsSvc.ready();\n },\n ],\n },\n params: { settingState: 'settings.general' },\n })\n .state('layout_csb', {\n //Layout with collapsable sidebar\n abstract: true,\n template: `
    \n
    \n
    \n \n
    \n
    \n
    `,\n controller: 'CollapsableSidebarCtrl as sb',\n resolve: {\n ready: [\n 'optionsSvc',\n function(optionsSvc) {\n return optionsSvc.ready();\n },\n ],\n },\n params: { settingState: 'settings.general' },\n })\n .state('layout_full', {\n //Full width layout\n abstract: true,\n template: '
    ',\n resolve: {\n ready: [\n 'optionsSvc',\n function(optionsSvc) {\n return optionsSvc.ready();\n },\n ],\n },\n params: { settingState: 'settings.general' },\n })\n .state('home', {\n url: '/',\n template: '',\n isReact: true,\n resolve: {\n ready: [\n 'optionsSvc',\n function(optionsSvc) {\n return optionsSvc.ready();\n },\n ],\n },\n })\n .state('myProfile', {\n url: '/profile',\n parent: 'layout_csb',\n views: {\n '': {\n template: require('./profile/profile.html'),\n controller: 'ProfileCtrl as vm',\n },\n sidebar: {\n template:\n '',\n },\n },\n })\n .state('accessTokens', {\n url: '/profile/accessTokens',\n parent: 'layout_csb',\n views: {\n '': {\n template: '',\n },\n sidebar: {\n template:\n '',\n },\n },\n })\n .state('403', {\n url: '/Errors/403',\n template: require('./authentication/403.html'),\n })\n .state('relations', {\n url: '/relations',\n parent: 'layout_csb',\n abstract: true,\n views: {\n '': {\n template: '',\n },\n sidebar: {\n template:\n '',\n },\n },\n resolve: {\n security: [\n 'checkSecurity',\n '$q',\n (checkSecurity, $q) => {\n if (!checkSecurity('Relation:r')) return $q.reject('Not Authorized');\n },\n ],\n },\n })\n .state('relations.new', {\n url: '/new',\n template: require('./relations/new/relNew.html'),\n controller: 'RelNewCtrl as vm',\n security: 'Relation:c',\n })\n .state('relations.detail', {\n url: '/detail/:relId',\n template: require('./relations/detail/relationFile.html'),\n controller: 'RelationFileCtrl as vm',\n params: {\n relId: null,\n options: null,\n fromRelBindSvc: false,\n gotoField: null,\n },\n reloadOnSearch: true,\n })\n .state('relations.audit', {\n url: '/audit/:relationId',\n views: {\n '@': {\n template:\n '',\n controller: [\n '$scope',\n '$stateParams',\n function($scope, $stateParams) {\n $scope.relationId = $stateParams.relationId;\n },\n ],\n },\n },\n isReact: true,\n })\n .state('relations.overview', {\n url: '?json',\n views: {\n '': {\n template:\n '',\n controller: [\n '$scope',\n '$stateParams',\n function($scope, $stateParams) {\n $scope.searchParams = {};\n if (!$stateParams) return;\n if ($stateParams.relationName) {\n $scope.searchParams = {\n searchValue: $stateParams.relationName,\n };\n }\n if ($stateParams.tags) {\n $scope.searchParams = {\n ...$scope.searchParams,\n withLabels: $stateParams.tags,\n };\n }\n if ($stateParams.relationGroups) {\n $scope.searchParams = {\n ...$scope.searchParams,\n relationGroups: $stateParams.relationGroups,\n };\n }\n },\n ],\n },\n 'sidebar@layout_csb': {\n template: '',\n },\n },\n params: {\n relationName: null,\n tags: null,\n relationGroups: null,\n json: { value: null, type: 'json', squash: true },\n },\n transformJsonParam: true,\n isReact: true,\n })\n .state('relations.compliance', {\n url: '/compliance',\n isReact: true,\n template: '',\n })\n .state('relations.invoiceschedules', {\n url: '/invoiceschedules',\n template: '',\n security: 'InvoiceDraft:r',\n isReact: true,\n })\n .state('relations.taskSchedules', {\n url: '/taskschedules',\n template: '',\n security: 'TaskSchedules',\n isReact: true,\n })\n .state('relations.plannedRegistrations', {\n url: '/planned-registrations',\n template:\n '',\n isReact: true,\n })\n .state('relations.budget', {\n url: '/budget',\n template: '',\n isReact: true,\n })\n .state('employees', {\n url: '/employees',\n parent: 'layout_csb',\n abstract: true,\n security: 'Users:r',\n views: {\n '': {\n template: '',\n },\n sidebar: {\n template: '',\n controller: 'SettingMenuCtrl as vm',\n },\n },\n })\n .state('employees.new', {\n url: '/new',\n template: require('./employees/new/empNew.html'),\n controller: 'EmpNewCtrl as vm',\n security: 'Users:c',\n params: {\n temporary: false,\n },\n })\n .state('employees.tmp', {\n url: '/tmp',\n template: require('./employees/new/empNew.html'),\n controller: 'EmpNewCtrl as vm',\n security: 'Users:c',\n params: {\n temporary: true,\n },\n })\n .state('employees.detail', {\n url: '/:id',\n template: require('./employees/detail/employeeDetail.html'),\n controller: 'EmployeeDetailCtrl as vm',\n security: 'Users:r',\n resolve: {\n employee: [\n 'resourceFactorySvc',\n '$stateParams',\n function(resourceFactorySvc, $stateParams) {\n return resourceFactorySvc.get('employee').get({\n id: $stateParams.id,\n }).$promise;\n },\n ],\n },\n })\n .state('employees.overview', {\n url: '',\n template: require('./employees/overview/employeeOverview.html'),\n controller: 'EmployeeOverviewCtrl as vm',\n security: 'Users:r',\n })\n .state('employees.profiles', {\n url: '/profiles',\n template: require('./employees/profiles/employeeProfileOverview.html'),\n controller: 'EmployeeProfileOverviewCtrl as vm',\n security: 'CompanyOwn:r',\n })\n .state('registrations', {\n url: '/registrations',\n parent: 'layout_full',\n abstract: true,\n template: '',\n })\n .state('registrations.day', {\n url: '',\n template: require('./registrations/regDay.html'),\n controller: 'RegDayCtrl as vm',\n security: 'RegistrationOwn',\n })\n .state('registrations.overview', {\n url: '/overview/*ignore?json', // Previous url was /overview/:period? -> *ignore catches everthing after /overview in case they bookmarked it\n template: require('./registrations/regOverview.html'),\n controller: 'RegOverviewCtrl as vm',\n params: {\n period: null,\n relation: null,\n userId: null, // empty guid to force combo to all\n filters: null,\n finalInvoiceStreamId: null,\n dateFrom: null,\n dateUntil: null,\n invoiceDateFrom: null,\n invoiceDateUntil: null,\n resourceId: null,\n invoiceId: null,\n intraCompanyInvoiceId: null,\n json: { value: null, type: 'json', squash: true },\n ignore: null, // Everything after /overview/ in the url\n },\n transformJsonParam: true,\n security: ['RegistrationOwn', 'RegistrationOthers'],\n })\n .state('registrations.settings', {\n url: '/priceList',\n template: require('./registrations/resources/priceList.html'),\n controller: 'PriceListCtrl as vm',\n security: ['Pricelist:r', 'AbsenceAndCounters:r'],\n })\n .state('registrations.pricegrid', {\n url: '/pricegrid',\n template: '',\n isReact: true,\n security: 'Pricelist',\n })\n .state('invoicing', {\n url: '/invoicing',\n abstract: true,\n parent: 'layout_full',\n template: '',\n })\n .state('invoicing.overview', {\n url: '?json',\n template: require('./invoicing/overview/invoicingOverview.html'),\n controller: 'InvoicingOverviewCtrl as vm',\n params: {\n relationId: null,\n relation: null,\n invoiceId: null,\n filterType: null,\n dateFrom: null,\n dateUntil: null,\n invoiceStreamId: null,\n period: null,\n json: { value: null, type: 'json', squash: true },\n },\n security: 'InvoiceFinal',\n transformJsonParam: true,\n })\n .state('invoicing.invoiceFromScratch', {\n url: '/wizard/1',\n template: require('./invoicing/wizard/invoiceFromScratch.html'),\n controller: 'InvoiceFromScratchCtrl as vm',\n data: {\n isInvoice: true,\n },\n security: 'FreeInvoiceCreditNote:c',\n })\n .state('invoicing.creditNoteFromScratch', {\n url: '/wizard/4',\n template: require('./invoicing/wizard/invoiceFromScratch.html'),\n controller: 'InvoiceFromScratchCtrl as vm',\n data: {\n isInvoice: false,\n },\n security: 'FreeInvoiceCreditNote:c',\n })\n .state('invoicing.draft', {\n url: '/draft?json',\n template: require('./invoicing/draft/draftInvoiceOverview.html'),\n controller: 'DraftInvoiceOverviewCtrl as vm',\n params: {\n relationId: null,\n relation: null,\n invoiceId: null,\n invoiceStreamId: null,\n json: { value: null, type: 'json', squash: true },\n },\n security: 'InvoiceDraft',\n transformJsonParam: true,\n })\n .state('invoicing.toInvoice', {\n url: '/toInvoice',\n template: '',\n params: {\n relationId: null,\n relationName: null,\n },\n isReact: true,\n controller: [\n '$scope',\n '$stateParams',\n function($scope, $stateParams) {\n $scope.searchParams = {};\n if ($stateParams) {\n if ($stateParams.relationId) {\n $scope.searchParams = {\n relationId: $stateParams.relationId,\n };\n }\n if ($stateParams.relationName) {\n $scope.searchParams = {\n ...$scope.searchParams,\n relationName: $stateParams.relationName,\n };\n }\n }\n },\n ],\n security: 'InvoiceDraft',\n })\n .state('invoicing.intraCompany', {\n url: '/intraCompany',\n template:\n '',\n isReact: true,\n security: 'IntraCompanyInvoice:r',\n feature: 'IntraCompanyBilling',\n })\n .state('invoicing.transactions', {\n url: '/transactions',\n params: {\n relationId: null,\n showTransactions: true,\n },\n template: require('./invoicing/transaction/transactionOverview.html'),\n controller: 'TransactionOverviewCtrl as vm',\n security: 'InvoiceTransactions',\n })\n .state('translate', {\n abstract: true,\n url: '/translate',\n template: require('./translations/translate.html'),\n parent: 'layout_full',\n })\n .state('translate.labels', {\n url: '/labels',\n template: require('./translations/translateLabels.html'),\n controller: 'TranslateLabelsCtrl as vm',\n })\n .state('translate.lists', {\n url: '/lists',\n template: require('./translations/translateLists.html'),\n controller: 'TranslateListsCtrl as vm',\n })\n .state('config', {\n abstract: true,\n url: '/config',\n template: require('./config/config.html'),\n parent: 'layout_full',\n })\n .state('config.sections', {\n url: '/sections',\n template: require('./config/sections/sectionConfig.html'),\n controller: 'SectionConfigCtrl as vm',\n })\n .state('config.fields', {\n url: '/fields',\n template: require('./config/fields/fieldConfig.html'),\n controller: 'FieldConfigCtrl as vm',\n })\n .state('settings', {\n abstract: true,\n url: '/settings',\n parent: 'layout_csb',\n views: {\n '': {\n template: '',\n },\n sidebar: {\n template: '',\n controller: 'SettingMenuCtrl as vm',\n },\n },\n })\n .state('settings.company', {\n url: '/company/?json',\n template: require('./settings/company.html'),\n controller: 'CompanyCtrl as vm',\n reloadOnSearch: true,\n security: 'CompanyOwn',\n params: {\n companyId: null,\n json: { value: null, type: 'json', squash: true },\n },\n transformJsonParam: true,\n })\n .state('settings.general', {\n url: '/',\n template: require('./settings/generalSettings.html'),\n controller: 'GeneralSettingsCtrl as vm',\n resolve: {\n companyId: [\n 'dataCache',\n '$stateParams',\n function(dataCache, $stateParams) {\n return !$stateParams.companyId\n ? dataCache.getArray('defaultcompany').id\n : $stateParams.companyId;\n },\n ],\n },\n reloadOnSearch: true,\n params: {\n companyId: null,\n },\n security: ['Settings:r', 'Users:u'],\n })\n .state('settings.templates', {\n abstract: true,\n url: '/templates',\n template: '',\n resolve: {\n companyId: [\n 'dataCache',\n '$stateParams',\n function(dataCache, $stateParams) {\n return !$stateParams.companyId\n ? dataCache.getArray('defaultcompany').id\n : $stateParams.companyId;\n },\n ],\n },\n params: {\n companyId: null,\n },\n })\n .state('settings.templates.new', {\n url: '/new',\n template: require('./settings/editMailTemplateSettings.html'),\n controller: 'EditMailTemplateSettingsCtrl as vm',\n resolve: {\n template: [\n '$q',\n function($q) {\n return $q.when(null);\n },\n ],\n },\n security: 'Settings:c',\n })\n .state('settings.templates.edit', {\n url: '/:templateId',\n template: require('./settings/editMailTemplateSettings.html'),\n controller: 'EditMailTemplateSettingsCtrl as vm',\n resolve: {\n template: [\n 'templateHttpSvc',\n '$stateParams',\n function(templateHttpSvc, $stateParams) {\n return templateHttpSvc.getTemplateWithContent($stateParams.templateId);\n },\n ],\n },\n security: 'Settings:r',\n })\n .state('settings.templates.list', {\n url: '',\n template: require('./settings/mailTemplateSettings.html'),\n controller: 'MailTemplateSettingsCtrl as vm',\n security: 'Settings:r',\n })\n .state('settings.invoiceText', {\n url: '/invoiceText',\n template: require('./settings/invoiceTextSettings.html'),\n controller: 'InvoiceTextSettingsCtrl as vm',\n resolve: {\n data: [\n 'resourceFactorySvc',\n function(resourceFactorySvc) {\n return resourceFactorySvc.get('invoiceText').get().$promise;\n },\n ],\n },\n security: 'Settings:r',\n })\n .state('settings.invoiceSchedules', {\n url: '/invoiceSchedules/:editScheduleId',\n template:\n '',\n isReact: true,\n controller: [\n '$scope',\n '$stateParams',\n function($scope, $stateParams) {\n $scope.editScheduleId = $stateParams.editScheduleId || null;\n },\n ],\n params: {\n editScheduleId: { value: null, squash: true },\n },\n security: 'Settings:r',\n })\n .state('settings.workflowConfiguration', {\n url: '/workflow',\n template: '',\n isReact: true,\n security: 'Settings:r',\n })\n .state('settings.taskTemplates', {\n url: '/taskTemplates',\n template: require('./settings/taskTemplates.html'),\n controller: 'taskTemplatesCtrl as vm',\n security: 'TaskTemplates:r',\n })\n .state('settings.reminder', {\n url: '/reminder',\n template: require('./settings/reminderSettings.html'),\n controller: 'ReminderSettingsCtrl as vm',\n resolve: {\n reminders: [\n 'reminderHttpSvc',\n function(reminderHttpSvc) {\n return reminderHttpSvc.getReminders();\n },\n ],\n },\n })\n .state('settings.license', {\n url: '/license',\n template: require('./settings/license.html'),\n controller: 'licenseCtrl as vm',\n security: ['CompanyOwn:u', 'Support'],\n })\n .state('settings.folderStructure', {\n url: '/folders',\n template: '',\n isReact: true,\n security: 'Settings:r',\n })\n .state('settings.tags', {\n url: '/Tags/:tab',\n template: '',\n isReact: true,\n params: {\n tab: {\n dynamic: true,\n value: null,\n squash: true,\n },\n },\n controller: [\n '$scope',\n '$stateParams',\n function($scope, $stateParams) {\n $scope.tab = $stateParams.tab || null;\n },\n ],\n security: 'Tags:r',\n })\n .state('settings.teams', {\n url: '/teams',\n template: '',\n isReact: true,\n security: 'Teams:r',\n })\n .state('settings.documentTemplates', {\n url: '/DocumentTemplates',\n template: '',\n isReact: true,\n security: 'Settings:r',\n })\n .state('settings.assignmentTemplates', {\n url: '/AssignmentTemplates',\n template: '',\n isReact: true,\n security: 'Settings:r',\n })\n .state('settings.roles', {\n url: '/Roles',\n template: '',\n isReact: true,\n security: 'CompanyOwn:r',\n })\n\n .state('taskflow', { abstract: true })\n .state('taskflow.taskboard', {\n url: '/taskboard/:plannedTaskId?json',\n views: {\n '@': {\n template: `\n `,\n controller: [\n '$scope',\n '$stateParams',\n function($scope, $stateParams) {\n $scope.relation = $stateParams.relation;\n $scope.invoiceStreamId = $stateParams.invoiceStreamId;\n $scope.taskTemplateId = $stateParams.taskTemplateId;\n $scope.plannedTaskId = $stateParams.plannedTaskId;\n $scope.kpi = $stateParams.kpi;\n $scope.userId = $stateParams.userId;\n $scope.onlySubtasksForAssignedUser = $stateParams.onlySubtasksForAssignedUser;\n $scope.userIsNextAssignedUser = $stateParams.userIsNextAssignedUser;\n $scope.openPlannedTaskDetailModal = $stateParams.openPlannedTaskDetailModal;\n $scope.deadlineFrom = $stateParams.deadlineFrom;\n $scope.deadlineUntil = $stateParams.deadlineUntil;\n $scope.createTaskForRelation = $stateParams.createTaskForRelation;\n },\n ],\n },\n },\n params: {\n invoiceStreamId: null,\n relation: null,\n taskTemplateId: null,\n plannedTaskId: null,\n kpi: null,\n userId: null,\n onlySubtasksForAssignedUser: null,\n userIsNextAssignedUser: null,\n openPlannedTaskDetailModal: true,\n deadlineFrom: null,\n deadlineUntil: null,\n createTaskForRelation: null,\n json: { value: null, type: 'json', squash: true },\n //Also add params to emptyState var in getFiltersFromRouteOrLocalStorage in TaskboardContainer\n },\n isReact: true,\n transformJsonParam: true,\n security: 'PlannedTask',\n })\n .state('taskflow.overview', {\n url: '/taskoverview',\n controllerAs: 'vm',\n template:\n '',\n params: {\n filters: null,\n },\n isReact: true,\n controller: [\n '$scope',\n '$stateParams',\n function($scope, $stateParams) {\n $scope.searchParams = {};\n if ($stateParams && $stateParams.filters) {\n $scope.searchParams = $stateParams.filters;\n }\n },\n ],\n security: 'PlannedTask',\n })\n .state('taskflow.tasklist', {\n url: '/tasklist/:taskId?json',\n template:\n '',\n params: {\n filters: null,\n taskId: null,\n sort: null,\n desc: null,\n json: { value: null, type: 'json', squash: true },\n },\n isReact: true,\n transformJsonParam: true,\n controller: [\n '$scope',\n '$stateParams',\n function($scope, $stateParams) {\n $scope.searchParams = {};\n if ($stateParams && $stateParams.filters) {\n $scope.searchParams = { filters: $stateParams.filters };\n }\n $scope.taskId = $stateParams.taskId;\n $scope.sort = $stateParams.sort;\n $scope.desc = $stateParams.desc;\n },\n ],\n security: ['PlannedTask', 'Todo'],\n })\n .state('taskflow.dashboard', {\n url: '/taskdashboard',\n template: '',\n isReact: true,\n security: 'PlannedTask',\n })\n\n .state('documents', {\n url: '/documents/:documentId?json',\n template:\n '',\n params: {\n relationId: null,\n relationName: null,\n companyId: null,\n tags: '' /* Should be string, tags separated by ; */,\n documentId: null,\n json: { value: null, type: 'json', squash: true },\n },\n isReact: true,\n transformJsonParam: true,\n controller: [\n '$scope',\n '$stateParams',\n function($scope, $stateParams) {\n $scope.searchParams = {};\n $scope.documentId = $stateParams.documentId;\n if ($stateParams) {\n if ($stateParams.tags) {\n $scope.searchParams.mainFilters = $scope.searchParams.mainFilters || {};\n $scope.searchParams.tags = $stateParams.tags;\n $scope.searchParams.filter = {};\n }\n if ($stateParams.relationId) {\n $scope.searchParams.mainFilters = $scope.searchParams.mainFilters || {};\n $scope.searchParams.mainFilters.relationId = $stateParams.relationId;\n if ($stateParams.relationName) {\n $scope.searchParams.mainFilters.relationName = $stateParams.relationName;\n }\n if ($stateParams.companyId) {\n // Used for global actions, not the own company filter\n $scope.searchParams.mainFilters.companyId = $stateParams.companyId;\n }\n $scope.searchParams.filter = {};\n }\n }\n },\n ],\n security: 'Documents:r',\n })\n .state('documents.relation', {\n url: 'relation/:relationId',\n redirectTo: trans => ({\n state: 'documents',\n params: trans.params(),\n }),\n params: {\n relationId: null,\n },\n security: 'Documents:r',\n })\n .state('emails', {\n url: '/emails',\n template: '',\n isReact: true,\n security: 'Documents:r',\n })\n .state('settings.invoicetemplates', {\n url: '/invoicetemplates',\n template: require('./settings/invoiceTemplates.html'),\n controller: 'InvoiceTemplatesCtrl as vm',\n })\n .state('jobs', {\n url: '/jobs',\n abstract: true,\n })\n .state('jobs.overview', {\n url: '/',\n template: '',\n isReact: true,\n })\n .state('jobs.detail', {\n url: '/:jobId',\n template: '',\n isReact: true,\n controller: [\n '$scope',\n '$stateParams',\n function($scope, $stateParams) {\n $scope.jobId = $stateParams.jobId;\n },\n ],\n })\n .state('reports', {\n url: '/reports',\n abstract: true,\n })\n .state('reports.relationRentability', {\n url: '/relation-rentabiltity',\n template:\n '',\n params: {\n relationId: null,\n },\n\n isReact: true,\n controller: [\n '$scope',\n '$stateParams',\n function($scope, $stateParams) {\n if ($stateParams.relationId) {\n $scope.searchParams = { relationId: $stateParams };\n } else {\n $scope.searchParams = {};\n }\n },\n ],\n security: 'RentabilityReport:r',\n })\n .state('reports.hoursPerEmployee', {\n url: '/hours-per-employee',\n redirectTo: 'hrm.hoursPerEmployee',\n security: 'RegistrationOwn:r',\n })\n .state('reports.invoicingHistory', {\n url: '/invoicing-history',\n template:\n '',\n isReact: true,\n security: 'ChecklistInvoicingReport:r',\n })\n .state('reports.registrationsPerRelation', {\n url: '/registrations-per-relation',\n template:\n '',\n isReact: true,\n security: 'RegistrationsPerReports:r',\n })\n .state('reports.registrationsPerResourceCategory', {\n url: '/registrations-per-resource-category',\n template:\n '',\n isReact: true,\n security: 'RegistrationsPerReports:r',\n })\n .state('reports.registrationsPerTaskTemplate', {\n url: '/registrations-per-task-template',\n template:\n '',\n isReact: true,\n security: 'RegistrationsPerReports:r',\n })\n .state('reports.registrationsPerUser', {\n url: '/registrations-per-user',\n template:\n '',\n isReact: true,\n security: 'RegistrationsPerReports:r',\n })\n .state('reports.absencePerEmployee', {\n url: '/absences',\n redirectTo: 'hrm.absencePerEmployee',\n security: 'AbsenceReports:r',\n })\n .state('interactions', {\n url: '/interactions/:relationId/:interactionId',\n template:\n '',\n params: {\n relationId: null,\n openMailModal: false,\n interactionId: null,\n },\n isReact: true,\n controller: [\n '$scope',\n '$stateParams',\n function($scope, $stateParams) {\n $scope.searchParams = {};\n $scope.openMailModal = false;\n $scope.searchParams.interactionFilters = {};\n if ($stateParams) {\n if ($stateParams.relationId) {\n $scope.searchParams.interactionFilters = {\n ...$scope.searchParams.interactionFilters,\n relationId: $stateParams.relationId,\n };\n }\n if ($stateParams.interactionId) {\n $scope.searchParams.interactionFilters = {\n ...$scope.searchParams.interactionFilters,\n interactionId: $stateParams.interactionId,\n };\n }\n if ($stateParams.openMailModal) {\n $scope.openMailModal = $stateParams.openMailModal;\n }\n }\n },\n ],\n security: 'InteractionsOwn:r',\n })\n .state('notifications', {\n url: '/notifications',\n template: '',\n isReact: true,\n })\n .state('notificationSettings', {\n url: '/NotificationSettings',\n template: '',\n isReact: true,\n })\n .state('settings.relationTags', {\n url: '/relations/tags',\n template: '',\n isReact: true,\n security: 'Tags:r',\n })\n .state('settings.taskTags', {\n url: '/tasks/tags',\n template: '',\n isReact: true,\n security: 'Tags:r',\n })\n .state('hrm', {\n url: '/hrm',\n abstract: true,\n parent: 'layout_full',\n template: '',\n })\n .state('hrm.overview', {\n url: '?json',\n template: '',\n security: 'AbsenceAndCounters:r',\n isReact: true,\n transformJsonParam: true,\n })\n .state('hrm.hoursPerEmployee', {\n url: '/hours-per-employee',\n security: ['RegistrationOwn:r', 'RegistrationOthers:r'],\n template:\n '',\n isReact: true,\n })\n .state('hrm.absencePerEmployee', {\n url: '/absences',\n template: '',\n isReact: true,\n security: 'AbsenceReports:r',\n })\n .state('hrm.absenceCalendar', {\n url: '/calendar',\n template: '',\n isReact: true,\n security: 'AbsenceReports:r',\n });\n\n $urlRouterProvider.otherwise('/'); // Default route\n\n $httpProvider.interceptors.push('authInterceptorSvc');\n $httpProvider.interceptors.push('templateInterceptorSvc');\n $httpProvider.interceptors.push('loadingAnimationInterceptor');\n\n //Translations\n if (environment === 'local') {\n $translateProvider.useStaticFilesLoader({\n files: [\n {\n prefix: appUrls.api + '/api/translation/',\n suffix: '?all=true',\n },\n ],\n });\n } else {\n $translateProvider.useStaticFilesLoader({\n files: [\n {\n prefix: 'translations/',\n suffix: '.json?b=' + buildversion,\n },\n {\n prefix: appUrls.api + '/api/translation/',\n suffix: '',\n },\n ],\n });\n }\n\n //Uncomment line below if escape problem occurs again.\n $translateProvider.useSanitizeValueStrategy('escape');\n\n $translateProvider.useLocalStorage();\n $translateProvider.preferredLanguage('en');\n // I put this in comment because legalForm is sometimes not appearing in section Identification and Maybe the translation has to do with it\n //$translateProvider.directivePriority(1);\n\n tmhDynamicLocaleProvider.localeLocationPattern(\n 'assets/scripts/i18n/angular-locale_{{locale}}.js',\n );\n tmhDynamicLocaleProvider.storageKey('NG_CULTURE_KEY');\n tmhDynamicLocaleProvider.defaultLocale('nl');\n tmhDynamicLocaleProvider.useStorage('$translateLocalStorage');\n\n //Internation phonenumbers\n ipnConfig.initialCountry = 'be';\n ipnConfig.nationalMode = true;\n ipnConfig.preferredCountries = ['be', 'nl', 'fr', 'lu', 'es'];\n\n //Datepicker config\n //For formats see https://angular-ui.github.io/bootstrap/#!#dateparser\n uibDatepickerPopupConfig.altInputFormats = [\n 'd!/M!/yyyy',\n 'd!/M!/yy',\n 'd!-M!-yyyy',\n 'd!-M!-yy',\n 'yyyy/M!/d!',\n 'yyyy-M!-d!',\n ];\n //Set default format\n uibDatepickerPopupConfig.datepickerPopup = 'd!/M!/yyyy';\n //Set minimum date\n uibDatepickerConfig.minDate = new Date(1900, 0, 1);\n uibDatepickerConfig.showWeeks = false;\n\n //Colorpicker config\n //https://github.com/kaihenzler/angular-minicolors\n angular.extend(minicolorsProvider.defaults, {\n format: 'hex',\n letterCase: 'uppercase',\n defaultValue: '#006B8F',\n });\n },\n ])\n .run([\n '$window',\n 'authService',\n 'flySvc',\n '$timeout',\n '$anchorScroll',\n 'editableOptions',\n 'editableThemes',\n '$state',\n '$transitions',\n '$rootScope',\n 'appInsights',\n '$translate',\n '$http',\n 'optionsSvc',\n 'checkSecurity',\n 'checkFeature',\n '$location',\n function(\n $window,\n authService,\n flySvc,\n $timeout,\n $anchorScroll,\n editableOptions,\n editableThemes,\n $state,\n $transitions,\n $rootScope,\n appInsights,\n $translate,\n $http,\n optionsSvc,\n checkSecurity,\n checkFeature,\n $location,\n ) {\n //Check if user is logged in\n if (!authService.isLoggedIn()) {\n authService.startAuthentication();\n } else if (appInsights) {\n var profile = authService.getClaims();\n // https://github.com/microsoft/ApplicationInsights-JS/blob/master/API-reference.md\n appInsights.setAuthenticatedUserContext(profile.Sid, profile.GroupSid, true);\n }\n optionsSvc.ready();\n initTranslateService($translate, $timeout);\n\n SignalRService.startConnection();\n\n SignalRService.subscribe('showAction', msg =>\n flySvc.action(\n msg.title,\n msg.content,\n msg.action,\n msg.actionLabel,\n msg.actionParameter,\n msg.parameters,\n ),\n );\n SignalRService.subscribe('showProposal', msg =>\n flySvc.proposal(\n msg.title,\n msg.content,\n msg.action,\n msg.actionLabel,\n msg.actionParameter,\n msg.parameters,\n ),\n );\n SignalRService.subscribe('showMessage', msg => flySvc.message(msg.content, msg.parameters));\n SignalRService.subscribe('showError', msg =>\n flySvc.error(msg.content, msg.parameters, msg.fieldId),\n );\n\n SignalRService.subscribe('showSuccess', msg => flySvc.success(msg.content, msg.parameters));\n\n SignalRService.subscribe('downloadDocument', documentId => {\n DocumentService.download(documentId);\n flySvc.action('msgDocumentReady', 'msgClickHereToDownloadDocument', function() {\n DocumentService.download(documentId);\n });\n });\n\n SignalRService.subscribe('codaProcessed', function(numberOfTransactions) {\n flySvc.action(\n 'msgCODAProcessed',\n '',\n function() {\n $state.go('invoicing.transactions');\n },\n null,\n null,\n {\n n: numberOfTransactions,\n },\n );\n const currentState = $state.$current.name;\n if (currentState === 'invoicing.transactions') {\n $state.reload();\n }\n });\n\n SignalRService.subscribe('reload', () => window.location.reload(true));\n SignalRService.subscribe('refreshToken', function() {\n authService.signinSilent();\n });\n\n SignalRService.subscribe('checkinFinished', blobId => {\n if (!!blobId) {\n flySvc.success('msgCheckinSuccesfull');\n } else {\n flySvc.warning('msgCheckinWarning');\n }\n });\n\n $transitions.onError({}, function(transition) {\n var error = transition.error();\n if (error) {\n //https://ui-router.github.io/ng1/docs/latest/enums/transition.rejecttype.html\n if (error.type === 5 || error.type === 3 || error.type === 2) return;\n if (error.detail && error.detail === 'Not Authorized') {\n flySvc.error(4003, []); //Unauth error\n const $state = transition.router.stateService;\n return $state.go('home', {}, { reload: true });\n }\n if (error.detail && error.detail.data) error = error.detail.data;\n if (error.data) error = error.data;\n if (error.code && typeof error.parameters !== 'undefined')\n flySvc.error(error.code, error.parameters);\n else if (error.message) flySvc.error('StateChangeError:' + error.message);\n else flySvc.error('StateChangeError:' + error);\n console.error('StateChangeError: ' + error);\n } else flySvc.error('StateChangeError');\n });\n\n $transitions.onStart({}, function(transition) {\n if (!authService.isLoggedIn()) authService.startAuthentication();\n\n angular.forEach($http.pendingRequests, function(request) {\n if (request.cancel && request.timeout) {\n request.cancel.resolve();\n }\n });\n\n const $state = transition.router.stateService;\n const toStateConfig = transition.to();\n if (toStateConfig.security && !checkSecurity(toStateConfig.security)) {\n flySvc.error(4003, []); //Unauth error\n if (toStateConfig.name !== 'home') return $state.target('home', {}, { reload: true });\n return;\n }\n if (toStateConfig.feature && !checkFeature(toStateConfig.feature)) {\n flySvc.error(4003, []); //Unauth error\n if (toStateConfig.name !== 'home') return $state.target('home', {}, { reload: true });\n return;\n }\n if (!toStateConfig.transformJsonParam) return;\n const { json } = transition.params();\n if (!json || typeof json !== 'object' || Object.keys(json).length === 0) return;\n\n return $state.target(transition.$to(), json);\n });\n\n $transitions.onSuccess({}, function(transition) {\n sendPlausibleAnalyticsPageView(transition);\n reinitializeInlineManual($window, $timeout);\n const hash = $location.hash();\n\n // Set scrollbar to top after route change, otherwise it can cause infinite scroll to call\n // API twice because it 'starts' in the middle of the screen\n $anchorScroll(hash || undefined);\n });\n\n //Set default anchorscroll offset\n $anchorScroll.yOffset = function() {\n //Add extra offset when in relation file because it has a sticky header\n const relationFileHeader = document.getElementById('RelationFileHeader');\n if (relationFileHeader) {\n return relationFileHeader.offsetHeight + 61; //51px stick-to-top + 10px extra margin\n }\n\n return 60;\n };\n\n //Xeditable Options\n editableOptions.buttons = 'no';\n editableOptions.theme = 'bs3';\n editableOptions.blur = 'submit';\n editableOptions.cancelButtonTitle = $translate.instant('Cancel');\n editableOptions.submitButtonTitle = $translate.instant('Save');\n editableThemes.bs3.inputClass = 'input-sm';\n\n $rootScope.$on('$translateChangeSuccess', function() {\n editableOptions.cancelButtonTitle = $translate.instant('Cancel');\n editableOptions.submitButtonTitle = $translate.instant('Save');\n });\n\n //Override default href function for links\n $state.originalHrefFunction = $state.href;\n $state.href = function href(stateOrName, params, options) {\n var result = $state.originalHrefFunction(stateOrName, params, options);\n if (result && result.slice(0, 2) === '#/') {\n return '/' + result; //Add leading slash before hashtag\n } else {\n return result;\n }\n };\n\n registerPlugin(FilePondPluginFileValidateSize);\n registerPlugin(FilePondPluginFileValidateType); // See: https://pqina.nl/filepond/docs/patterns/plugins/file-validate-type/#properties for attributes\n },\n ]);\n\nfunction reinitializeInlineManual($window, $timeout) {\n if (typeof $window.inline_manual_player !== 'undefined') {\n $timeout(function() {\n $window.inline_manual_player.manualReinit();\n // an update of the inline manual player is required, because this will update certain properties such as current the current URL\n // this is used in some inline manual topic conditions, to only show a topic on a specific page\n $window.inline_manual_player.update();\n }, 1500);\n }\n}\n\nfunction sendPlausibleAnalyticsPageView(transition) {\n let page = transition.router.urlService.path();\n\n if (page === '/') return;\n\n const guidPattern = /[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}\\/?$/gi;\n const match = page.match(guidPattern);\n\n if (match) {\n page = page.replace(match[0], '');\n }\n\n // plausible is not configured on localhost\n if (window.plausible) {\n plausible('pageview', { u: page });\n }\n}\n","import angular from 'angular';\n\nangular.module('commonServices', [\n 'ngResource',\n 'LocalStorageModule',\n 'pascalprecht.translate',\n 'cxHttpServices',\n]);\n","import angular from 'angular';\nangular.module('cxHttpServices', []);\n","import angular from 'angular';\n\nangular.module('cxTable', [\n 'commonServices',\n 'ui.bootstrap',\n 'infinite-scroll',\n]);\n","import angular from 'angular';\n\nangular.module('cxInvoicing', ['commonServices', 'cxHttpServices']);\n","import angular from 'angular';\n\nangular.module('cxNotifications', ['commonServices']);\n","import angular from 'angular';\n\nangular.module('cxRegistrations', ['commonServices']);\n","import angular from 'angular';\n\nangular.module('cxRelations', ['commonServices']);\n","import angular from 'angular';\n\nangular.module('cxSettings', ['commonServices', 'cxHttpServices']);\n","import angular from 'angular';\n\nangular.module('cxTaskflow', ['commonServices']);\n","import angular from 'angular';\n\nangular.module('cxTranslations', []);\n","import angular from 'angular';\nimport TranslateService from '@/shared/services/TranslateService';\nimport zendesk from '@/zendesk';\nimport { getZendeskUrl, getMyTicketsUrl } from '@/shared/components/ZendeskHelp';\n\nangular.module('cloudX').directive('cxMenu', [\n function() {\n return {\n restrict: 'E',\n replace: true,\n template: require('./menu.html'),\n scope: true,\n controller: [\n '$window',\n '$scope',\n 'resourceFactorySvc',\n 'loadingAnimationSvc',\n 'authService',\n '$translate',\n 'tmhDynamicLocale',\n 'relBindSvc',\n '$state',\n 'dataCache',\n 'flySvc',\n 'notificationSvc',\n 'checkFeature',\n 'jobSvc',\n 'recentRelationsSvc',\n 'insights',\n 'appUrls',\n '$http',\n 'environment',\n menuCtrl,\n ],\n };\n\n function menuCtrl(\n $window,\n $scope,\n resourceFactorySvc,\n loadingAnimationSvc,\n authService,\n $translate,\n tmhDynamicLocale,\n relBindSvc,\n $state,\n dataCache,\n flySvc,\n notificationSvc,\n checkFeature,\n jobSvc,\n recentRelationsSvc,\n insights,\n appUrls,\n $http,\n environment,\n ) {\n $scope.userName = '';\n $scope.notificationSvc = notificationSvc;\n $scope.logOut = authService.logOut;\n $scope.hasEid = checkFeature('Eid');\n $scope.jobSvc = jobSvc;\n $scope.recentRelationsSvc = recentRelationsSvc;\n $scope.connectWebUrl = appUrls.connect;\n $scope.zendeskUrl = 'http://support.adminpulse.be'; //will be replaced by url with culture\n\n var tenantConfiguration = parseInt(authService.getClaims().TenantConfiguration || '1');\n\n function init() {\n dataCache.ready().then(function() {\n insights.ready().then(() => {\n setupInlineManual();\n });\n\n var auth = authService.getClaims();\n\n $scope.showPaymentMonitoring = dataCache.showPaymentMonitoring;\n\n var company = dataCache.getArray('defaultcompany');\n\n $scope.languages = dataCache.getArray('language');\n $scope.buildNumber = dataCache.getArray('buildNumber');\n $scope.userName = auth.Name;\n $scope.loadingAnimationSvc = loadingAnimationSvc;\n $scope.connectWebUrl = `${appUrls.connect}?companyId=${company.id}`;\n $scope.su = auth.su || 0;\n initLanguage();\n });\n }\n\n init();\n\n $scope.setLang = function(code, isInitial) {\n const language = $scope.languages.find(x => x.code === code);\n if (!language) return;\n var originalCode = $translate.use();\n var newCode = language.culture;\n $scope.zendeskUrl = getZendeskUrl(null, newCode);\n $translate.use(newCode).then(() => {\n TranslateService.onLocaleChanged();\n if (\n (!isInitial || originalCode !== newCode) &&\n $state &&\n $state.current &&\n $state.current.isReact\n ) {\n $state.reload();\n }\n });\n\n $scope.currentLanguage = language;\n tmhDynamicLocale.set(language.culture);\n setInlineManualLanguage(language.code);\n\n insights.ready().then(() => {\n setupBeamerWhatsNew(language.code, insights);\n });\n\n if (!isInitial) {\n setEmployeeLanguage(language);\n }\n };\n\n var initLanguage = function() {\n var employee = dataCache.getArray('employee');\n var lang = (employee.userLanguage || 'en').toLowerCase();\n $scope.setLang(lang, true);\n };\n\n $scope.openRelation = function(id) {\n relBindSvc.open(id);\n };\n $scope.openConnect = function() {\n $window.open($scope.connectWebUrl, '_blank');\n };\n\n $scope.createTicket = function() {\n zendesk.createTicket();\n };\n $scope.openMyTickets = () => {\n $window.open(getMyTicketsUrl($translate.use()), '_blank');\n };\n $scope.mobile = function() {\n var windowWidth = $window.innerWidth;\n return windowWidth <= 768;\n };\n\n function setupInlineManual() {\n var auth = authService.getClaims();\n\n if (auth.su && auth.su === '1') return; // support user: dont create inline manual account\n\n var inlineManualRoles = [];\n var company = dataCache.getArray('defaultcompany');\n\n var isTrial = dataCache.getArray('isTrial');\n if (isTrial) {\n inlineManualRoles.push('IsTrial');\n }\n\n if (auth) {\n if (\n typeof $window.inlineManualPlayerData !== 'undefined' &&\n typeof $window.createInlineManualPlayer === 'function' &&\n typeof $window.inline_manual_player === 'undefined'\n ) {\n $window.inlineManualTracking = {\n uid: auth.Sid,\n email: auth.Email,\n name: auth.Name,\n group: company.name,\n roles: inlineManualRoles,\n };\n $window.createInlineManualPlayer($window.inlineManualPlayerData);\n if (typeof $window.inline_manual_player !== 'undefined') {\n const inlineManualLanguage =\n $scope.currentLanguage && $scope.currentLanguage.code\n ? $scope.currentLanguage.code\n : 'nl';\n $window.inline_manual_player.setLanguage(inlineManualLanguage || 'nl');\n }\n } else if (typeof $window.inline_manual_player !== 'undefined') {\n $window.inline_manual_player.metadata = {};\n $window.inline_manual_player.tracking.metadata = {};\n $window.inline_manual_player._setMetadata({\n uid: auth.Sid,\n email: auth.Email,\n name: auth.Name,\n group: company.name,\n roles: inlineManualRoles,\n });\n $window.inline_manual_player.manualReinit();\n }\n }\n }\n\n const setupBeamerWhatsNew = (languageCode, insightsService) => {\n if (typeof Beamer !== 'undefined') {\n try {\n const insights = insightsService.get();\n var employee = dataCache.getArray('employee');\n\n Beamer.update({\n ...beamer_config, // global variable that was declared in index.js\n user_firstname: employee.firstName,\n user_lastname: employee.lastName,\n filter: insights.segments,\n language: languageCode,\n });\n } catch (error) {\n console.log(error);\n }\n }\n };\n\n function setInlineManualLanguage(code) {\n if (typeof $window.inline_manual_player !== 'undefined')\n $window.inline_manual_player.setLanguage(code);\n if (typeof $window.zE !== 'undefined')\n $window.zE('webWidget', 'setLocale', code.toLowerCase());\n }\n\n function setEmployeeLanguage(language) {\n var resource = resourceFactorySvc.get('user');\n const model = {\n language: language.code,\n culture: language.culture,\n };\n\n return resource.language(model).$promise.then(\n function(result) {\n var employee = dataCache.getArray('employee');\n if (employee) {\n employee.userLanguage = model.language;\n employee.userCulture = model.culture;\n }\n flySvc.success('msgConfirmChange');\n return false;\n },\n function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n return '';\n },\n );\n }\n }\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').factory('templateInterceptorSvc', [\n 'buildversion',\n function(buildVersion) {\n return {\n request: function(config) {\n if (config && config.url && config.url.indexOf('assets/templates/') >= 0) {\n config.params = { ...config.params, v: buildVersion };\n }\n return config;\n },\n };\n },\n]);\n","import angular from 'angular';\n\nconst isEnvDevelopment = environment => {\n var env = (environment || '').toLowerCase();\n return env === 'development' || env === 'local';\n};\n\nangular\n .module('cloudX')\n .directive('developmentOnly', [\n 'environment',\n function(environment) {\n return {\n restrict: 'A',\n link: function(scope, element, attr) {\n if (!isEnvDevelopment(environment)) element.remove();\n },\n };\n },\n ])\n /*\n Filter variant to use in attributes\n Example:\n ng-if=\"0|isDevelopment\"\n (The value before the pipe is needed for the syntax, but is ignored in the filter. It can be any value)\n */\n .filter('isDevelopment', [\n 'environment',\n function(environment) {\n return function() {\n return isEnvDevelopment(environment);\n };\n },\n ]);\n","import angular from 'angular';\nimport userStorage from '@/shared/services/userStorage';\n\nconst storageKey = 'sidebarCollapsed';\nangular.module('cloudX').controller('CollapsableSidebarCtrl', [\n '$timeout',\n function($timeout) {\n const sb = this;\n /*Disable animations on pageload*/\n sb.loading = true;\n sb.collapsed = userStorage.getItem(storageKey) || false;\n\n sb.setCollapsed = function(collapsed) {\n sb.collapsed = !!collapsed;\n userStorage.setItem(storageKey, sb.collapsed);\n };\n\n sb.toggleSidebar = function() {\n sb.setCollapsed(!sb.collapsed);\n };\n\n sb.showSidebar = function() {\n sb.setCollapsed(false);\n };\n sb.hideSidebar = function() {\n sb.setCollapsed(true);\n };\n\n $timeout(function() {\n sb.loading = false;\n }, 500);\n },\n]);\n","import angular from 'angular';\nconst FEATURES = [\n {\n key: 1,\n name: 'Unused',\n },\n {\n key: 2,\n name: 'TypeForm',\n },\n {\n key: 4,\n name: 'Budget',\n },\n {\n key: 8,\n name: 'Eid',\n },\n {\n key: 16,\n name: 'Compliancy',\n },\n {\n key: 32,\n name: 'Peppol',\n },\n {\n key: 64,\n name: 'Gmail',\n },\n {\n key: 128,\n name: 'IntraCompanyBilling',\n },\n {\n key: 256,\n name: 'ConnectOpenTheBox',\n },\n {\n key: 512,\n name: 'CustomRoles',\n },\n {\n key: 1024,\n name: 'ReferenceYear',\n },\n];\nangular.module('cloudX').factory('checkFeature', [\n 'authService',\n 'featureflags',\n function (authService, featureflags) {\n var parseFeatureParam = function (value) {\n if (typeof value === 'undefined' || value === null) return 0;\n if (angular.isArray(value)) {\n /* Allowed array format:\n ['ExtendedPricing','TaskMgmt']\n */\n return value.reduce(function (sec, item) {\n var feature = FEATURES.find(function (f) {\n return f.name.toLowerCase() === item.toLowerCase();\n });\n if (feature) {\n return sec | feature.key;\n }\n return sec;\n }, 0);\n } else if (angular.isString(value)) {\n /* Allowed string formats:\n 'ExtendedPricing'\n 'ExtendedPricing,TaskMgmt'\n */\n return parseFeatureParam(value.split(','));\n }\n return 0;\n };\n\n var checkFeaturesFlags = function (value) {\n if (!value) return false;\n if (typeof value !== 'string') return false;\n if (!featureflags) return false;\n return !!featureflags[value.toLowerCase()];\n };\n\n var service = function (param) {\n var auth = authService.getClaims();\n if (!auth) return false;\n if (checkFeaturesFlags(param)) return true;\n var security = parseFeatureParam(param);\n var permissions = 0;\n try {\n permissions = parseInt(auth.WindowsSubAuthority);\n } catch (ex) {\n permissions = 0;\n }\n\n return (security & permissions) > 0;\n };\n return service;\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('assignmentsEnabled', [\n 'dataCache',\n function(dataCache) {\n return {\n restrict: 'A',\n link: function(scope, element, attr) {\n dataCache.ready().then(function() {\n const enabled = dataCache.getArray('assignmentsEnabled');\n if (!enabled) element.remove();\n });\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').factory('authInterceptorSvc', [\n '$q',\n '$injector',\n 'authService',\n 'lockFactory',\n 'flySvc',\n function($q, $injector, authService, lockFactory, flySvc) {\n var authInterceptorServiceFactory = {};\n\n var request = function(config) {\n config.headers = config.headers || {};\n\n if ((!config.url.startsWith('https://') && !config.url.startsWith('http://')) || (config.url.indexOf('adminpulse.') === -1 && config.url.indexOf('//localhost:') === -1))\n {\n config.withCredentials = false;\n }\n else\n {\n config.headers.Authorization = authService.getAuthorizationHeaderValue();\n }\n\n return config;\n };\n\n var responseError = function(rejection) {\n if (rejection.status === 401 || rejection.status === 403) {\n flySvc.error('NoPermissionsForThisAction');\n } else if (rejection.status === 550) {\n //Custom status when updating application\n location.reload();\n return undefined;\n }\n\n return $q.reject(rejection);\n };\n\n authInterceptorServiceFactory.request = request;\n authInterceptorServiceFactory.responseError = responseError;\n\n return authInterceptorServiceFactory;\n },\n]);\n","import angular from 'angular';\nimport eventBus from 'pubsub-js';\n\nangular.module('cloudX').factory('authService', [\n '$q',\n '$timeout',\n 'authServiceConfig',\n function($q, $timeout, config) {\n var self = this;\n self.user = config.user;\n self.manager = config.manager;\n self.events = {\n onLogout: [],\n onNewToken: [],\n };\n\n //debugger;\n if (!self.user)\n self.manager.getUser().then(function(user) {\n self.user = user;\n });\n\n self.manager.events.addUserLoaded(function(user) {\n if (user) angular.extend(self.user, user);\n notifyListeners(self.events.onNewToken, user.access_token, user.profile);\n });\n\n function isLoggedIn() {\n return self.user != null && !self.user.expired;\n }\n\n function getClaims() {\n return self.user ? self.user.profile : null;\n }\n\n function getAuthorizationHeaderValue() {\n return self.user ? self.user.token_type + ' ' + self.user.access_token : null;\n }\n\n function getToken() {\n return self.user ? self.user.access_token : null;\n }\n function getUserId() {\n return self.user ? self.user.profile.Sid : null;\n }\n function startAuthentication() {\n return self.manager.signinRedirect({\n state: {\n url: window.location.href,\n },\n });\n }\n\n function completeAuthentication() {\n return self.manager.signinRedirectCallback().then(function(user) {\n self.user = user;\n });\n }\n\n function notifyListeners(listeners) {\n var args = Array.prototype.slice.call(arguments, 1);\n return $q.all(\n listeners.map(function(fnc) {\n return $q.when(fnc.apply(null, args));\n }),\n );\n }\n\n function logOut() {\n return notifyListeners(self.events.onLogout).finally(function() {\n cleanupSessionStorage();\n\n self.manager.signoutRedirect();\n });\n }\n\n function addEventListener(event) {\n return function(callback) {\n if (typeof callback === 'function') event.push(callback);\n };\n }\n\n function signinSilent() {\n self.manager.signinSilent().then(user => {\n if (user) angular.extend(self.user, user);\n notifyListeners(self.events.onNewToken, user.access_token, user.profile);\n });\n }\n\n function cleanupSessionStorage() {\n if (!sessionStorage) return;\n var i = sessionStorage.length;\n while (i--) {\n var key = sessionStorage.key(i);\n // Keep the authentication token, the identity ms still needs it to logout\n if (key.indexOf('oidc.user:') !== 0) {\n sessionStorage.removeItem(key);\n }\n }\n }\n\n // can be triggered when silent login was request and performed from react screen\n eventBus.subscribe('signinSilentCompleted', function(msg, user) {\n $timeout(function() {\n if (user) angular.extend(self.user, user);\n notifyListeners(self.events.onNewToken, user.access_token, user.profile);\n }, 100);\n });\n\n return {\n isLoggedIn: isLoggedIn,\n getClaims: getClaims,\n getToken: getToken,\n getAuthorizationHeaderValue: getAuthorizationHeaderValue,\n startAuthentication: startAuthentication,\n completeAuthentication: completeAuthentication,\n logOut: logOut,\n addOnLogOut: addEventListener(self.events.onLogout),\n addOnNewToken: addEventListener(self.events.onNewToken),\n signinSilent: signinSilent,\n getUserId: getUserId,\n };\n },\n]);\n","import angular from 'angular';\nconst PRIVILEGES = {\n r: 1, //Read\n u: 2, //Update\n c: 4, //Create\n d: 8, //Delete\n e: 16, //Execute\n s: 32, //Syneton\n a: 15, //All crud actions\n};\nconst FUNCTIONALITIES = [\n {\n key: 1,\n name: 'Relation',\n },\n {\n key: 2,\n name: 'RegistrationOwn',\n },\n {\n key: 4,\n name: 'RegistrationOthers',\n },\n {\n key: 8,\n name: 'Pricelist',\n },\n {\n key: 16,\n name: 'InvoiceDraft',\n },\n {\n key: 32,\n name: 'InvoiceFinal',\n },\n {\n key: 64,\n name: 'CompanyOwn',\n },\n {\n key: 128,\n name: 'Settings',\n },\n {\n key: 256,\n name: 'TaskTemplates',\n },\n {\n key: 512,\n name: 'InvoiceTransactions',\n },\n {\n key: 1024,\n name: 'Documents',\n },\n {\n key: 2048,\n name: 'Users',\n },\n {\n key: 4096,\n name: 'RentabilityReport',\n },\n {\n key: 8192,\n name: 'Tags',\n },\n {\n key: 16384,\n name: 'InteractionsOwn',\n },\n {\n key: 32768,\n name: 'InteractionsOthers',\n },\n {\n key: 65536,\n name: 'TaskSchedules',\n },\n {\n key: 131072,\n name: 'PlannedTask',\n },\n {\n key: 262144,\n name: 'Todo',\n },\n {\n key: 524288,\n name: 'IntraCompanyInvoice',\n },\n {\n key: 1048576,\n name: 'FreeInvoiceCreditNote',\n },\n {\n key: 2097152,\n name: 'RegistrationsPerReports',\n },\n {\n key: 4194304,\n name: 'AbsenceReports',\n },\n {\n key: 8388608,\n name: 'ChecklistInvoicingReport',\n },\n {\n key: 16777216,\n name: 'AbsenceAndCounters',\n },\n {\n key: 33554432,\n name: 'Teams',\n },\n {\n key: 67108864,\n name: 'EmployeeInternalPrice',\n },\n];\nangular.module('cloudX').factory('checkSecurity', [\n 'authService',\n function(authService) {\n var parseSecurityPrivileges = function(item) {\n var idx = item.lastIndexOf(':');\n if (idx < 0)\n return {\n name: item,\n value: PRIVILEGES.a,\n };\n var name = item.substr(0, idx);\n var perm = item.substr(idx + 1);\n if (perm.length === 0)\n return {\n name: name,\n value: PRIVILEGES.a,\n };\n if (!isNaN(perm))\n return {\n name: name,\n value: parseInt(perm),\n };\n return {\n name: name,\n value: perm.split('').reduce(function(s, p) {\n if (PRIVILEGES.hasOwnProperty(p.toLowerCase())) return PRIVILEGES[p.toLowerCase()] | s;\n return s;\n }, 0),\n };\n };\n\n var parseSecurityParam = function(value) {\n if (typeof value === 'undefined' || value === null) return {};\n var perm;\n var security = {\n $parsed: true,\n };\n if (angular.isArray(value)) {\n /* Allowed array formats:\n ['RegistrationOwn','RegistrationOthers']\n ['RegistrationOwn:15','RegistrationOthers:1']\n ['RegistrationOwn:a','RegistrationOthers:rc']\n */\n return value.reduce(\n function(sec, item) {\n perm = parseSecurityPrivileges(item);\n sec[perm.name] = perm.value;\n return sec;\n },\n {\n $parsed: true,\n },\n );\n } else if (angular.isObject(value)) {\n /* Allowed object formats:\n {RegistrationOwn:15,RegistrationOthers:1}\n {RegistrationOwn:'a',RegistrationOthers:'r'}\n {RegistrationOwn:'',RegistrationOthers:''}\n */\n if (value.$parsed) return value;\n for (var prop in value) {\n if (value.hasOwnProperty(prop)) {\n perm = parseSecurityPrivileges(prop + ':' + value[prop]);\n security[perm.name] = perm.value;\n }\n }\n } else if (angular.isString(value)) {\n /* Allowed string formats:\n 'RegistrationOwn:15'\n 'RegistrationOwn:a'\n */\n perm = parseSecurityPrivileges(value);\n security[perm.name] = perm.value;\n }\n\n return security;\n };\n\n var parsePermissions = function(permissionString) {\n var perms = permissionString.split(';');\n var result = {};\n for (var i = 0; i < perms.length; i++) {\n var permission = perms[i].split(':');\n if (permission.length !== 2) continue;\n var functionalities = permission[0];\n var privilege = permission[1];\n\n for (var j = 0; j < FUNCTIONALITIES.length; j++) {\n if ((FUNCTIONALITIES[j].key & functionalities) === FUNCTIONALITIES[j].key)\n result[FUNCTIONALITIES[j].name] = (result[FUNCTIONALITIES[j].name] || 0) | privilege;\n }\n }\n return result;\n };\n\n var service = function(param) {\n var auth = authService.getClaims();\n if (!auth) return false;\n var security = parseSecurityParam(param);\n var permissions = {};\n try {\n permissions = parsePermissions(auth.Role);\n } catch (ex) {\n permissions = {};\n }\n for (var prop in security) {\n if (security.hasOwnProperty(prop)) {\n var reqPerm = security[prop];\n if (auth.su && prop.toLowerCase() === 'support') return true;\n var perm = permissions[prop] || 0;\n if (reqPerm & perm) return true;\n }\n }\n return false;\n };\n\n service.parse = parseSecurityParam;\n\n return service;\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').factory('checkInvoiceTeamAccess', [\n 'authService',\n function(authService, featureflags) {\n return function(relationTeamAccessCode) {\n var auth = authService.getClaims();\n if (!auth) return false;\n if (auth.su) return true;\n const relationTeamCode = BigInt(relationTeamAccessCode);\n if (relationTeamCode === 0n) return true;\n const userInvoiceTeamCode = BigInt(auth.isc);\n return (userInvoiceTeamCode & relationTeamCode) > 0n;\n };\n },\n]);\n","import angular from 'angular';\n\nvar SECURITY_HIDDEN_CLASS = 'no-access-feature';\n\nangular.module('cloudX').directive('cxFeature', [\n '$rootScope',\n 'checkFeature',\n 'authService',\n function($rootScope, checkFeature, authService) {\n return {\n restrict: 'A',\n link: function(scope, element, attr) {\n var security = '';\n var doCheck = function() {\n if (checkFeature(security)) element.removeClass(SECURITY_HIDDEN_CLASS);\n else element.addClass(SECURITY_HIDDEN_CLASS);\n };\n\n scope.$watch(attr.cxFeature, function(value) {\n security = value;\n doCheck();\n });\n\n var destroyer = $rootScope.$on('$cxAuthenticated', function() {\n doCheck();\n });\n scope.$on('$destroy', function() {\n destroyer();\n });\n\n authService.addOnNewToken(function(token) {\n doCheck();\n });\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').factory('checkTenantConfiguration', [\n 'authService',\n function(authService) {\n var getConfigurationsFromParam = function(value) {\n if (typeof value === 'undefined' || value === null) return null;\n if (angular.isArray(value)) {\n /* Allowed array format:\n [1,2]\n */\n return { reverse: false, configurations: value };\n } else if (angular.isString(value)) {\n /* Allowed string formats:\n 1\n 1,2\n [1,2]\n !1\n !1,2\n ![1,2]\n */\n var result = {\n reverse: false,\n configurations: [],\n };\n if (value.startsWith('!')) {\n result.reverse = true;\n value = value.substr(1);\n }\n if (value.startsWith('[') && value.endsWith(']')) {\n value = value.substr(1, value.length - 2);\n }\n if (value.match(/^[0-9]+(,[0-9])*$/)) {\n result.configurations = value.split(',').map(c => parseInt(c));\n }\n return result;\n }\n return null;\n };\n\n var service = function(param) {\n var auth = authService.getClaims();\n if (!auth) return false;\n \n if (param === 'sso') return auth['sso'] === 'True';\n \n var security = getConfigurationsFromParam(param);\n if (!security) return false;\n \n var tenantConfiguration = 0;\n try {\n tenantConfiguration = parseInt(auth.TenantConfiguration);\n } catch (ex) {\n return false;\n }\n return security.configurations.indexOf(tenantConfiguration) >= 0\n ? !security.reverse\n : security.reverse;\n };\n return service;\n },\n]);\n","import angular from 'angular';\n\nvar SECURITY_HIDDEN_CLASS = 'no-access-configuration';\n\nangular.module('cloudX').directive('cxTenantConfiguration', [\n '$rootScope',\n 'checkTenantConfiguration',\n 'authService',\n function($rootScope, checkTenantConfiguration, authService) {\n return {\n restrict: 'A',\n link: function(scope, element, attr) {\n var security = '';\n var doCheck = function() {\n if (checkTenantConfiguration(security)) element.removeClass(SECURITY_HIDDEN_CLASS);\n else element.addClass(SECURITY_HIDDEN_CLASS);\n };\n\n attr.$observe('cxTenantConfiguration', function() {\n security = attr.cxTenantConfiguration;\n doCheck();\n });\n\n var destroyer = $rootScope.$on('$cxAuthenticated', function() {\n doCheck();\n });\n scope.$on('$destroy', function() {\n destroyer();\n });\n\n authService.addOnNewToken(function(token) {\n doCheck();\n });\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').filter('feature', [\n 'checkFeature',\n function(checkFeature) {\n return function(sec) {\n return checkFeature(sec);\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('multiCompanyOnly', [\n 'dataCache',\n function(dataCache) {\n return {\n restrict: 'A',\n link: function(scope, element, attr) {\n const companies = dataCache.getArray('company');\n if (!companies || companies.length <= 1) element.remove();\n },\n };\n },\n]);\n","import angular from 'angular';\n\nvar SECURITY_HIDDEN_CLASS = 'no-access';\n\nangular.module('cloudX').directive('cxSecurity', [\n '$rootScope',\n 'checkSecurity',\n function($rootScope, checkSecurity) {\n return {\n restrict: 'A',\n link: function(scope, element, attr) {\n var security = {};\n var doCheck = function() {\n if (checkSecurity(security))\n element.removeClass(SECURITY_HIDDEN_CLASS);\n else element.addClass(SECURITY_HIDDEN_CLASS);\n };\n\n scope.$watch(attr.cxSecurity, function(value) {\n security = checkSecurity.parse(value);\n doCheck();\n });\n\n var destroyer = $rootScope.$on('$cxAuthenticated', function() {\n doCheck();\n });\n scope.$on('$destroy', function() {\n destroyer();\n });\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').filter('security', [\n 'checkSecurity',\n function(checkSecurity) {\n return function(sec) {\n return checkSecurity(sec);\n };\n },\n]);\n","import angular from 'angular';\n\nvar SECURITY_HIDDEN_CLASS = 'no-access-configuration';\n\n// example: allowed for tenant config 0 or 1 or if tenant has feature 32 cx-tenant-configuration=\"[0,1;32]\"\n\nangular.module('cloudX').directive('cxTenantConfigurationOrFeature', [\n '$rootScope',\n 'checkTenantConfiguration',\n 'authService',\n 'checkFeature',\n function($rootScope, checkTenantConfiguration, authService, checkFeature) {\n return {\n restrict: 'A',\n link: function(scope, element, attr) {\n var security = '';\n var feature = '';\n var doCheck = function() {\n if (checkTenantConfiguration(security) || checkFeature(feature))\n element.removeClass(SECURITY_HIDDEN_CLASS);\n else element.addClass(SECURITY_HIDDEN_CLASS);\n };\n\n attr.$observe('cxTenantConfiguration', function() {\n security = attr.cxTenantConfiguration.split(';')[0];\n feature = attr.cxTenantConfiguration.split(';')[1];\n doCheck();\n });\n\n var destroyer = $rootScope.$on('$cxAuthenticated', function() {\n doCheck();\n });\n scope.$on('$destroy', function() {\n destroyer();\n });\n\n authService.addOnNewToken(function(token) {\n doCheck();\n });\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').filter('tenantConfiguration', [\n 'checkTenantConfiguration',\n function(checkTenantConfiguration) {\n return function(sec) {\n return checkTenantConfiguration(sec);\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('timeTablesEnabled', [\n 'dataCache',\n function(dataCache) {\n return {\n restrict: 'A',\n link: function(scope, element, attr) {\n dataCache.ready().then(function() {\n const enabled = dataCache.getArray('employeeTimeTables');\n if (!enabled) element.remove();\n });\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular\n .module('cloudX')\n .controller('CalcDistanceDialogCtrl', [\n '$element',\n '$q',\n '$translate',\n 'googleMapsSvc',\n 'resourceFactorySvc',\n 'flySvc',\n 'userData',\n 'dataCache',\n '$http',\n 'appUrls',\n 'close',\n 'relationId',\n 'companyId',\n calcDistanceDialogCtrl,\n ]);\n\nfunction calcDistanceDialogCtrl(\n $element,\n $q,\n $translate,\n googleMapsSvc,\n resourceFactorySvc,\n flySvc,\n userData,\n dataCache,\n $http,\n appUrls,\n close,\n relationId,\n companyId,\n) {\n var vm = this;\n vm.from = {\n value: '',\n list: [],\n };\n vm.to = {\n value: '',\n list: [],\n };\n var settings = userData.get('distanceDialog', {\n singleTravel: true,\n addRoute: true,\n });\n var profile = dataCache.getArray('employee');\n\n vm.singleTravel = profile.travelOneWay ? 1 : 2;\n vm.addRoute = settings.addRoute;\n vm.calculating = false;\n vm.result = null;\n vm.noRelAddress = false;\n vm.noCompAddress = false;\n\n var getAddressString = function(address) {\n return [\n address.street1,\n ' ',\n address.number,\n address.box ? '/' + address.box : '',\n ', ',\n address.zipCode,\n ' ',\n address.city,\n ', ',\n address.country,\n ].join('');\n };\n\n var init = () => {\n const companyAddressPromise = $http.get(`${appUrls.api}/api/company/addresses`);\n const relationAddressPromise = $http.get(`${appUrls.api}/api/address/${relationId}`);\n Promise.all([companyAddressPromise, relationAddressPromise]).then(\n ([{ data: companyAddresses }, { data: relationAddresses }]) => {\n companyAddresses.filter(x => x.street1).forEach(companyAddress => {\n var address = getAddressString(companyAddress);\n if (vm.from.list.indexOf(address) < 0) vm.from.list.push(address);\n if (!!companyId && companyId === companyAddress.companyId) {\n vm.from.value = address;\n } else if (!companyId && dataCache.getArray('tenantId') === companyAddress.companyId) {\n vm.from.value = address;\n }\n });\n\n if (vm.from.list.length === 0) {\n vm.noCompAddress = true;\n } else if (!vm.from.value) {\n vm.from.value = vm.from.list[0];\n }\n\n relationAddresses.forEach(({ medium, postAddress, isMain = false }) => {\n if (medium !== 0) return;\n if (!postAddress || !postAddress.street1) return;\n var addr = getAddressString(postAddress);\n vm.to.list.push(addr);\n\n if (isMain) vm.to.value = addr;\n });\n\n if (vm.to.list.length === 0) {\n vm.noRelAddress = true;\n } else if (!vm.to.value) {\n vm.to.value = vm.to.list[0];\n }\n\n if (vm.canCalculate()) vm.calculate();\n },\n );\n };\n init();\n\n if (profile.employeeAddress && profile.employeeAddress.street1) {\n var emplAddr = getAddressString(profile.employeeAddress);\n vm.from.list.push(emplAddr);\n if (profile.travelFromHome || !vm.from.value) vm.from.value = emplAddr;\n }\n\n vm.flip = function() {\n var tmp = angular.copy(vm.from);\n vm.from = vm.to;\n vm.to = tmp;\n };\n\n vm.canCalculate = function() {\n if (vm.calculating) return false;\n if (!vm.from || !vm.from.value) return false;\n if (!vm.to || !vm.to.value) return false;\n return true;\n };\n vm.calculate = function() {\n if (!vm.canCalculate()) return;\n vm.calculating = true;\n vm.result = null;\n googleMapsSvc.getDistanceMatrix(vm.from.value, vm.to.value).then(\n function(result) {\n vm.result = result;\n vm.calculating = false;\n },\n function(error) {\n vm.result = {\n error: error,\n };\n flySvc.error(error);\n vm.calculating = false;\n },\n );\n };\n vm.clearResult = function() {\n vm.result = null;\n };\n\n vm.getDescription = function() {\n if (!vm.addRoute || !vm.result || vm.result.error) return null;\n var description = $translate.instant('Origin') + ': ' + vm.result.origin + '\\n';\n description += $translate.instant('Destination') + ': ' + vm.result.destination + '\\n';\n if (vm.singleTravel === 2)\n description += $translate.instant('and back') + ': ' + vm.result.origin + '\\n';\n description +=\n $translate.instant('Distance') +\n ': ' +\n (vm.result.distance * vm.singleTravel).toFixed(2) +\n ' km';\n return description;\n };\n\n vm.updateSettings = function() {\n userData.set('distanceDialog', {\n singleTravel: vm.singleTravel,\n addRoute: vm.addRoute,\n });\n };\n\n vm.save = function() {\n close(\n {\n distance: vm.result.distance * vm.singleTravel,\n durationMinutes: vm.result.durationMinutes * vm.singleTravel,\n description: vm.getDescription(),\n },\n 500,\n );\n $element.modal('hide');\n };\n vm.cancel = function() {\n close(null, 500);\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cloudX')\n .controller('CheckboxListDialogCtrl', [\n '$scope',\n 'appMessages',\n 'close',\n 'title',\n 'items',\n checkboxListDialogCtrl,\n ]);\n\nfunction checkboxListDialogCtrl($scope, appMessages, close, title, items) {\n $scope.title = appMessages(title);\n $scope.items = angular.copy(items);\n $scope.selectAll = $scope.items.every(x => x.selected);\n\n $scope.selectAllChanged = function() {\n $scope.items.forEach(item => {\n item.selected = $scope.selectAll;\n });\n };\n $scope.itemChanged = function(item) {\n $scope.selectAll = item.selected && $scope.items.every(x => x.selected);\n };\n\n $scope.close = function(result) {\n if (result) {\n close($scope.items, 500);\n } else {\n close(null, 500);\n }\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cloudX')\n .controller('ConfirmChangesDialogCtrl', [\n '$scope',\n '$element',\n 'appMessages',\n 'close',\n 'title',\n 'message',\n 'showSaveButton',\n confirmChangesDialogCtrl,\n ]);\n\nfunction confirmChangesDialogCtrl(\n $scope,\n $element,\n appMessages,\n close,\n title,\n message,\n showSaveButton,\n) {\n $scope.title = appMessages(title);\n $scope.message = appMessages(message);\n $scope.showSaveButton = showSaveButton;\n $scope.close = function(result) {\n close(result, 500);\n };\n}\n","import angular from 'angular';\n\nangular.module('cloudX').factory('dialogsSvc', ['$q', 'ModalService', '$timeout', dialogsSvc]);\n\nfunction dialogsSvc($q, ModalService, $timeout) {\n function showModal(modalOptions) {\n var deferred = $q.defer();\n ModalService.showModal(modalOptions).then(function(modal) {\n modal.element.modal();\n modal.close.then(function(result) {\n if (result) deferred.resolve(result);\n else deferred.reject(null);\n }, deferred.reject);\n });\n return deferred.promise;\n }\n\n return {\n //Returns promise,\n showYesNo: function(title, message, params) {\n return showModal({\n template: require('./yesNoDialog.html'),\n controller: 'YesNoDialogCtrl',\n locationChangeSuccess: false,\n inputs: {\n title: title,\n message: message,\n params: params,\n },\n });\n },\n showOkCancel: function(title, message) {\n return showModal({\n template: require('./okCancelDialog.html'),\n controller: 'OkCancelDialogCtrl',\n locationChangeSuccess: false,\n inputs: {\n title: title,\n message: message,\n },\n });\n },\n showYesNoCancel: function(title, message) {\n var deferred = $q.defer();\n ModalService.showModal({\n template: require('./yesNoCancelDialog.html'),\n controller: 'YesNoCancelDialogCtrl',\n locationChangeSuccess: false,\n inputs: {\n title: title,\n message: message,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.close.then(deferred.resolve, deferred.reject);\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n $timeout(() => {\n deferred.resolve(null);\n }, 1000);\n });\n });\n /* Returns promise with these values:\n * null: cancel\n * true: yes\n * false: no\n */\n return deferred.promise;\n },\n showAvailableRelationTags: function() {\n var deferred = $q.defer();\n ModalService.showModal({\n template: require('./availableRelationTagsDialog.html'),\n controller: 'AvailableRelationTagsDialogCtrl',\n locationChangeSuccess: false,\n }).then(function(modal) {\n modal.element.modal();\n modal.close.then(deferred.resolve, deferred.reject);\n });\n return deferred.promise;\n },\n showSimilarRelations: function(similarRelations) {\n var deferred = $q.defer();\n ModalService.showModal({\n template: require('./similarRelationDialog.html'),\n controller: 'SimilarRelationDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n similarRelations: similarRelations,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.close.then(deferred.resolve, deferred.reject);\n });\n return deferred.promise;\n },\n showExternalRelationSearchDialog: function(searchTerm, searchProvider) {\n var deferred = $q.defer();\n ModalService.showModal({\n template: require('./externalRelationSearchDialog.html'),\n controller: 'ExternalRelationSearchDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n searchTerm: searchTerm,\n searchProvider: searchProvider,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.close.then(deferred.resolve, deferred.reject);\n });\n return deferred.promise;\n },\n showRelationWizard: function(title, wizardOptions) {\n return showModal({\n template: require('./relationWizardDialog.html'),\n controller: 'RelationWizardDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n title: title,\n wizardOptions: wizardOptions,\n },\n });\n },\n showDistanceDialog: function(relationId, companyId) {\n return showModal({\n template: require('./calcDistanceDialog.html'),\n controller: 'CalcDistanceDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n relationId,\n companyId,\n },\n });\n },\n //Translations\n translateListItem: function(list, listid, fallback, options = {}) {\n return showModal({\n template: require('./translateListItemDialog.html'),\n controller: 'TranslateListItemDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n list,\n listid,\n fallback,\n options,\n },\n });\n },\n\n updateInternalPrice: function(internalPrice) {\n return showModal({\n template: require('./updateRegistrationsInternalPriceDialog.html'),\n controller: 'UpdateRegistrationsInternalPriceDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n internalPrice: internalPrice,\n },\n });\n },\n\n shareItem: function(type, id, itemName, relationName) {\n return showModal({\n template: require('./shareItemDialog.html'),\n controller: 'ShareItemDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n type: type,\n id: id,\n itemName: itemName,\n relationName: relationName,\n },\n });\n },\n\n showCheckboxList: function(title, items) {\n return showModal({\n template: require('./checkboxListDialog.html'),\n controller: 'CheckboxListDialogCtrl',\n locationChangeSuccess: false,\n inputs: {\n title: title,\n items: items,\n },\n });\n },\n confirmChanges: function(title, message, showSaveButton = false) {\n var deferred = $q.defer();\n ModalService.showModal({\n template: require('./confirmChangesDialog.html'),\n controller: 'ConfirmChangesDialogCtrl',\n locationChangeSuccess: false,\n inputs: {\n title: title,\n message: message,\n showSaveButton: showSaveButton,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.close.then(deferred.resolve, deferred.reject);\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n });\n /* Returns promise with these values:\n * null || 0: cancel\n * 1: Discard changes\n * 2: Save changes\n */\n return deferred.promise;\n },\n showStringInput: function(title, message, placeholder = '', value = '') {\n return showModal({\n template: require('./stringInputDialog.html'),\n controller: 'StringInputDialogCtrl',\n locationChangeSuccess: false,\n inputs: {\n title: title,\n message: message,\n placeholder,\n value,\n },\n });\n },\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cloudX')\n .controller('ExternalRelationSearchDialogCtrl', [\n '$q',\n 'externalRelationHttpSvc',\n 'flySvc',\n '$element',\n 'close',\n 'searchTerm',\n 'searchProvider',\n ExternalRelationSearchDialogCtrl,\n ]);\n\nfunction ExternalRelationSearchDialogCtrl(\n $q,\n externalRelationHttpSvc,\n flySvc,\n $element,\n close,\n searchTerm,\n searchProvider,\n) {\n var vm = this;\n vm.canceller = null;\n vm.searchProvider = searchProvider;\n vm.searchTerm = searchTerm || '';\n vm.results = [];\n\n vm.search = function() {\n if (vm.canceller !== null) {\n vm.canceller.resolve();\n vm.canceller = null;\n }\n vm.results = [];\n if (vm.searchTerm) {\n vm.canceller = $q.defer();\n externalRelationHttpSvc\n .search(vm.searchTerm, 1000, searchProvider, vm.canceller.promise)\n .then(\n function(data) {\n vm.results = data;\n vm.canceller = null;\n },\n function(error) {\n if (error.status === 0) return; //Cancelled\n flySvc.error(error);\n vm.canceller = null;\n },\n );\n }\n };\n if (vm.searchTerm) vm.search();\n\n vm.select = function(comp) {\n close(comp, 500);\n $element.modal('hide');\n };\n\n vm.cancel = function() {\n if (vm.canceller !== null) {\n vm.canceller.resolve();\n vm.canceller = null;\n }\n close(null, 500);\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cloudX')\n .controller('OkCancelDialogCtrl', [\n '$scope',\n 'appMessages',\n 'close',\n 'title',\n 'message',\n yesNoDialogCtrl,\n ]);\n\nfunction yesNoDialogCtrl($scope, appMessages, close, title, message) {\n $scope.title = appMessages(title);\n $scope.message = appMessages(message);\n $scope.close = function(result) {\n close(result, 500);\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cloudX')\n .controller('RelationWizardDialogCtrl', [\n '$element',\n 'appMessages',\n 'close',\n 'title',\n 'wizardOptions',\n relationWizardDialogCtrl,\n ]);\n\nfunction relationWizardDialogCtrl(\n $element,\n appMessages,\n close,\n title,\n wizardOptions,\n) {\n var vm = this;\n vm.title = appMessages(title || 'New relation');\n\n vm.wizardOptions = wizardOptions || {};\n vm.success = function(relation, isNew) {\n if (relation && relation.id) {\n close(\n {\n relation: relation,\n isNew: isNew,\n },\n 500,\n );\n $element.modal('hide');\n }\n };\n\n vm.cancel = function() {\n close(null, 500);\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cloudX')\n .controller('SimilarRelationDialogCtrl', [\n 'resourceFactorySvc',\n '$element',\n 'flySvc',\n 'close',\n 'similarRelations',\n SimilarRelationDialogCtrl,\n ]);\n\nfunction SimilarRelationDialogCtrl(resourceFactorySvc, $element, flySvc, close, similarRelations) {\n var vm = this;\n vm.saving = false;\n\n vm.relations = similarRelations;\n\n vm.undelete = function(rel) {\n if (vm.saving) return;\n vm.saving = true;\n resourceFactorySvc.get('relation').undelete(\n {\n id: rel.id,\n },\n function() {\n $element.modal('hide');\n rel.isActive = true;\n vm.saving = false;\n close(rel, 500);\n },\n function(error) {\n if (error?.data?.code === 2021) {\n //Already active\n $element.modal('hide');\n rel.isActive = true;\n vm.saving = false;\n close(rel, 500);\n return;\n }\n flySvc.error(error);\n vm.saving = false;\n },\n );\n };\n\n vm.select = function(rel) {\n close(rel, 500);\n };\n vm.continue = function() {\n close(false, 500);\n };\n vm.cancel = function() {\n close(null, 500);\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cloudX')\n .controller('TranslateListItemDialogCtrl', [\n '$element',\n '$http',\n '$q',\n '$scope',\n '$translate',\n 'flySvc',\n 'appUrls',\n 'close',\n 'list',\n 'listid',\n 'fallback',\n 'options',\n translateListItemDialogCtrl,\n ]);\n\nfunction translateListItemDialogCtrl(\n $element,\n $http,\n $q,\n $scope,\n $translate,\n flySvc,\n appUrls,\n close,\n list,\n listid,\n fallback,\n options,\n) {\n var vm = this;\n vm.fallback = fallback;\n vm.accessor = {};\n\n vm.translations = [];\n vm.list = list;\n vm.listid = listid;\n\n vm.options = options;\n\n vm.saving = false;\n vm.save = function() {\n if (vm.saving) return;\n if (!vm.accessor.isValid || !vm.accessor.isValid()) return;\n if (!vm.accessor.save) return;\n\n vm.saving = true;\n vm.accessor\n .save()\n .then(function(changes) {\n const defaultChanged = changes.find(x => x.isTenantLanguage);\n close({ defaultValue: defaultChanged ? defaultChanged.value : null, changes }, 500);\n $element.modal('hide');\n })\n .finally(() => {\n vm.saving = false;\n });\n };\n vm.cancel = function() {\n vm.saving = false;\n close(null, 500);\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cloudX')\n .controller('YesNoCancelDialogCtrl', [\n '$scope',\n '$element',\n 'appMessages',\n 'close',\n 'title',\n 'message',\n yesNoDialogCtrl,\n ]);\n\nfunction yesNoDialogCtrl($scope, $element, appMessages, close, title, message) {\n $scope.title = appMessages(title);\n $scope.message = appMessages(message);\n $scope.close = function(result) {\n close(result, 500);\n //$element.modal('hide');\n };\n $scope.cancel = function() {\n //$element.modal('hide');\n close(null, 500);\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cloudX')\n .controller('YesNoDialogCtrl', [\n '$scope',\n 'appMessages',\n 'close',\n 'title',\n 'message',\n 'params',\n yesNoDialogCtrl,\n ]);\n\nfunction yesNoDialogCtrl($scope, appMessages, close, title, message, params) {\n $scope.title = appMessages(title, params);\n $scope.message = appMessages(message, params);\n $scope.close = function(result) {\n close(result, 500);\n };\n}\n","import angular from 'angular';\nimport moment from 'moment';\n\nangular\n .module('cxSettings')\n .controller('UpdateRegistrationsInternalPriceDialogCtrl', [\n '$element',\n '$scope',\n 'close',\n '$window',\n 'internalPrice',\n 'flySvc',\n updateRegistrationsInternalPriceDialogCtrl,\n ]);\n\nfunction updateRegistrationsInternalPriceDialogCtrl(\n $element,\n $scope,\n close,\n $window,\n internalPrice,\n flySvc,\n) {\n var vm = this;\n vm.model = {\n internalPrice,\n updateRegistrations: false,\n startDate: moment().utc().startOf('day').toDate(),\n endDate: moment().utc().startOf('day').toDate()\n };\n\n vm.submit = function() {\n if (vm.model.updateRegistrations && (!vm.model.startDate || !vm.model.endDate)) {\n flySvc.error('msgStartEndDateRequiredUpdateInternalPrice');\n return;\n }\n\n if (vm.model.updateRegistrations) {\n vm.model.startDate = moment.utc(vm.model.startDate);\n vm.model.endDate = moment.utc(vm.model.endDate);\n }\n\n $element.modal('hide');\n close(vm.model, 500);\n };\n\n vm.cancel = function() {\n $element.modal('hide');\n close(null, 500);\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cloudX')\n .controller('AvailableRelationTagsDialogCtrl', [\n '$scope',\n 'close',\n 'resourceFactorySvc',\n '$filter',\n '$http',\n 'appUrls',\n 'flySvc',\n 'dialogsSvc',\n AvailableRelationTagsDialogCtrl,\n ]);\n\nfunction AvailableRelationTagsDialogCtrl(\n $scope,\n close,\n resourceFactorySvc,\n $filter,\n $http,\n appUrls,\n flySvc,\n dialogsSvc,\n) {\n $scope.tags = [];\n $scope.noTags = false;\n var removedTags = [];\n var updatedTags = [];\n\n var init = () => {\n return $http.get(`${appUrls.api}/api/relationtag/getall`).then(\n ({ data }) => {\n if (!data || !data.length) {\n $scope.noTags = true;\n } else {\n $scope.tags = data.map(x => ({\n ...x,\n selected: false,\n }));\n $scope.tags = $filter('orderBy')($scope.tags, 'name');\n }\n },\n function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n return '';\n },\n );\n };\n init();\n\n $scope.cancel = function() {\n close({ selectedTags: null, updatedTags, removedTags }, 500);\n };\n\n $scope.select = function(result) {\n var selectedTags = $scope.tags && $scope.tags.filter(x => x.selected).map(x => x.name);\n close({ selectedTags, updatedTags, removedTags }, 500);\n };\n\n $scope.update = (tag, value, field) => {\n if (angular.equals(tag[field], value)) return false;\n if (!value) return false;\n var model = angular.copy(tag);\n model[field] = value;\n\n return $http.put(`${appUrls.api}/api/relationtag`, model).then(\n ({ data }) => {\n if (data) {\n angular.extend(tag, data);\n flySvc.success();\n updatedTags = [tag, ...updatedTags];\n }\n return false;\n },\n function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n return '';\n },\n );\n };\n\n $scope.showDeleteDialog = tag => {\n dialogsSvc.showYesNo('msgConfirmDeleteTitle', 'msgConfirmDeleteRelationTag').then(function() {\n $http.delete(`${appUrls.api}/api/relationtag/${tag.id}`).then(\n () => {\n var idx = $scope.tags.indexOf(tag);\n if (idx >= 0) $scope.tags.splice(idx, 1);\n removedTags = [tag.id, ...removedTags];\n },\n function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n return '';\n },\n );\n });\n };\n}\n","import angular from 'angular';\nimport moment from 'moment';\n\nangular\n .module('cxSettings')\n .controller('InvalidEmailWarningDialogCtrl', [\n '$element',\n '$http',\n 'appUrls',\n 'flySvc',\n 'close',\n invalidEmailWarningDialogCtrl,\n ]);\n\nfunction invalidEmailWarningDialogCtrl($element, $http, appUrls, flySvc, close) {\n var vm = this;\n\n vm.remove = function() {\n close(true, 500);\n $element.modal('hide');\n };\n\n vm.cancel = function() {\n close(null, 500);\n $element.modal('hide');\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cloudX')\n .controller('StringInputDialogCtrl', [\n '$scope',\n '$element',\n 'appMessages',\n 'close',\n 'title',\n 'message',\n 'placeholder',\n 'value',\n stringInputDialogCtrl,\n ]);\n\nfunction stringInputDialogCtrl(\n $scope,\n $element,\n appMessages,\n close,\n title,\n message,\n placeholder,\n value,\n) {\n $scope.title = appMessages(title);\n $scope.message = appMessages(message);\n $scope.placeholder = appMessages(placeholder);\n $scope.value = value || '';\n $scope.save = function(result) {\n if (!$scope.value) return;\n $element.modal('hide');\n close($scope.value, 500);\n };\n $scope.close = function(result) {\n $element.modal('hide');\n close(null, 500);\n };\n}\n","import angular from 'angular';\nimport moment from 'moment';\nimport AuthService from '@/shared/services/AuthService';\n\nangular\n .module('cxSettings')\n .controller('ShareItemDialogCtrl', [\n '$element',\n '$scope',\n 'close',\n '$window',\n 'type',\n 'id',\n 'itemName',\n 'relationName',\n 'flySvc',\n 'appUrls',\n '$http',\n 'dataCache',\n shareItemDialogCtrl,\n ]);\n\nfunction shareItemDialogCtrl(\n $element,\n $scope,\n close,\n $window,\n type,\n id,\n itemName,\n relationName,\n flySvc,\n appUrls,\n $http,\n dataCache,\n) {\n var vm = this;\n vm.itemName = itemName;\n vm.remark = '';\n vm.selectedUsers = [];\n vm.saving = false;\n vm.submit = function() {\n if (!vm.selectedUsers || vm.selectedUsers < 1) {\n vm.invalidUsers = true;\n return;\n }\n\n let notificationType;\n switch (type) {\n case 'task':\n notificationType = 1000;\n break;\n case 'document':\n notificationType = 1001;\n break;\n case 'relation':\n notificationType = 1002;\n break;\n default:\n return;\n }\n\n const model = {\n shareMessage: vm.remark,\n shareSubject: relationName ? `${relationName} - ${itemName}` : itemName,\n level: 0,\n notificationType,\n objectId: id,\n recipients: vm.selectedUsers.map(x => ({\n userId: x,\n email: dataCache\n .getArray('user')\n .filter(x => x.isActive)\n .find(y => y.userID == x).email,\n languageCode: dataCache\n .getArray('user')\n .filter(x => x.isActive)\n .find(y => y.userID == x).languageCode,\n })),\n };\n vm.saving = true;\n return $http.post(`${appUrls.notifications}/api/notifications/createshare`, model).then(\n () => {\n vm.saving = false;\n flySvc.success('ItemWasShared');\n $element.modal('hide');\n close(vm.model, 500);\n return true;\n },\n error => {\n vm.saving = false;\n flySvc.error(error);\n console.error(error);\n return false;\n },\n );\n };\n\n vm.cancel = function() {\n $element.modal('hide');\n close(null, 500);\n };\n}\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxAddressList', function() {\n return {\n restrict: 'E',\n template: require('./addressList.html'),\n scope: {\n addressList: '=data',\n title: '@panelTitle',\n relId: '@',\n id: '@',\n },\n controller: [\n '$scope',\n 'optionsSvc',\n 'objectFactorySvc',\n 'resourceFactorySvc',\n 'flySvc',\n 'relBindSvc',\n 'openNewAddressSvc',\n '$anchorScroll',\n 'appSettings',\n 'ModalService',\n function(\n $scope,\n optionsSvc,\n objectFactorySvc,\n resourceFactorySvc,\n flySvc,\n relBindSvc,\n openNewAddressSvc,\n $anchorScroll,\n appSettings,\n ModalService,\n ) {\n var resource = resourceFactorySvc.get('address');\n\n $scope.adding = false;\n $scope.newAddress = null;\n $scope.newMedium = null;\n $scope.saving = false;\n $scope.appSettings = appSettings;\n $scope.cancelNew = function() {\n $scope.adding = false;\n $scope.newAddress = null;\n $scope.newMedium = null;\n return;\n };\n $scope.getDefaultCountry = function() {\n var rel = relBindSvc.relations[$scope.relId];\n if (rel) {\n if (rel.countryFieldId && rel[rel.countryFieldId].value) {\n return rel[rel.countryFieldId].value;\n }\n if (rel.country) return rel.country;\n }\n return appSettings.defaultCountry;\n };\n\n $scope.addNewAddress = function() {\n if (!$scope.adding) {\n $scope.adding = true;\n } else {\n $scope.adding = false;\n $scope.newAddress = null;\n $scope.newMedium = null;\n }\n };\n\n var addNewAddressFromOutside = function(medium) {\n $scope.adding = true;\n $scope.newMedium = medium;\n $scope.renewNewAddress();\n $anchorScroll($scope.id + '_new');\n };\n\n // register 'addNewAddressFromOutside' with openNewAddressSvc for use from communicationListDrv\n openNewAddressSvc.register($scope, addNewAddressFromOutside);\n\n $scope.renewNewAddress = function() {\n if ($scope.newMedium != null) {\n $scope.newAddress = objectFactorySvc.address($scope.newMedium);\n if ($scope.newMedium === 0)\n $scope.newAddress.postAddress.country = $scope.getDefaultCountry();\n $scope.newAddress.edit = true;\n }\n };\n\n const stringEquals = function(s1, s2, ignoreCase) {\n if (ignoreCase) return (s1 || '').toLowerCase() === (s2 || '').toLowerCase();\n return (s1 || '') === (s2 || '');\n };\n const postAddressEquals = function(a1, a2, ignoreCase) {\n return (\n stringEquals(a1.street1, a2.street1, ignoreCase) &&\n stringEquals(a1.street2, a2.street2, ignoreCase) &&\n stringEquals(a1.number, a2.number, ignoreCase) &&\n stringEquals(a1.box, a2.box, ignoreCase) &&\n stringEquals(a1.zipCode, a2.zipCode, ignoreCase) &&\n stringEquals(a1.city, a2.city, ignoreCase) &&\n stringEquals(a1.country, a2.country, ignoreCase)\n );\n };\n\n var save = function(address) {\n if ($scope.saving) return '';\n $scope.saving = true;\n address.saving = true;\n if (address.id !== '00000000-0000-0000-0000-000000000000') {\n // existing address -> update\n return resource.update(address).$promise.then(\n function(response) {\n flySvc.success('msgConfirmChange');\n address.edit = false;\n address.saving = false;\n // update rel object with changes\n relBindSvc.updateRelation($scope.relId, response.changes, response.billingErrors);\n\n openNewAddressSvc.notifyRefresh();\n $scope.saving = false;\n\n if (!response.isAddressValid) {\n dialogsSvc\n .showOkCancel('WarningTitle', 'msgEmailAddressInvalidWarningMessage')\n .then(function() {\n return false;\n });\n }\n\n return false;\n },\n function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n $scope.saving = false;\n address.saving = false;\n return '';\n },\n );\n } else {\n // new address -> save\n return resource\n .save(\n {\n id: $scope.relId,\n },\n address,\n )\n .$promise.then(\n function(response) {\n flySvc.success('msgNewItemSaved');\n $scope.addressList.push(response.address);\n // update rel object with changes\n relBindSvc.updateRelation($scope.relId, response.changes, response.billingErrors);\n\n $scope.newAddress = null;\n $scope.newMedium = null;\n $scope.adding = false;\n $scope.saving = false;\n\n openNewAddressSvc.notifyRefresh();\n if (!response.isAddressValid) {\n ModalService.showModal({\n template: require('../dialogs/invalidEmailWarningDialog.html'),\n controller: 'InvalidEmailWarningDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n modal.close.then(function(result) {\n if (result) {\n $scope.remove(response.address);\n return true;\n }\n return false;\n });\n });\n }\n },\n function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n $scope.saving = false;\n return '';\n },\n );\n }\n };\n\n $scope.submit = function(address, value, field) {\n if (typeof value === 'undefined') {\n if (address.errors) {\n for (var error in address.errors) {\n if (address.errors.hasOwnProperty(error) && error[0] !== '$') {\n if (address.errors[error].code) {\n flySvc.error(\n address.errors[error].code,\n angular.copy(address.errors[error].parameters),\n );\n }\n }\n }\n }\n return '';\n }\n address.error = address.error || {};\n\n if (field == 'remark') {\n address.remark = value;\n } else {\n if (address.medium === 0 || address.medium === 5) {\n if (postAddressEquals(value, address.postAddress)) return false;\n // check if duplicate\n for (var i = 0; i < $scope.addressList.length; i++) {\n if (\n $scope.addressList[i].id !== address.id &&\n $scope.addressList[i].medium === 0 &&\n postAddressEquals($scope.addressList[i].postAddress, value, true)\n ) {\n flySvc.error(2, ['address']);\n return '';\n }\n }\n address.postAddress = value;\n } else {\n if (value === address.addressData && address !== $scope.newAddress) return false;\n\n // behaviour Carla wanted: save empty string = delete (for mail, phone & social as they have only 1 property: addressData)\n if (!value) {\n if (address.id && address.id !== '00000000-0000-0000-0000-000000000000') {\n $scope.remove(address);\n } else {\n $scope.cancelNew();\n }\n return false;\n }\n // check if duplicate\n for (var l = 0; l < $scope.addressList.length; l++) {\n if (\n $scope.addressList[l].id !== address.id &&\n $scope.addressList[l].medium === address.medium &&\n $scope.addressList[l].addressData.toLowerCase() === '' + value.toLowerCase()\n ) {\n flySvc.error(2, ['address']);\n return '';\n }\n }\n address.addressData = value;\n }\n }\n\n // save\n return save(address);\n };\n\n $scope.remove = function(address) {\n if ($scope.saving) return '';\n if (address.id === '00000000-0000-0000-0000-000000000000') return;\n $scope.saving = true;\n address.removing = true;\n resource.delete(\n {\n id: address.id,\n },\n function(response) {\n flySvc.success('msgAddressRemoved');\n\n var index = $scope.addressList.indexOf(address);\n $scope.addressList.splice(index, 1);\n\n openNewAddressSvc.notifyRefresh();\n\n relBindSvc.updateRelation($scope.relId, response.changes, response.billingErrors);\n $scope.saving = false;\n },\n function(error) {\n address.removing = false;\n flySvc.error(error.data.code, error.data.parameters);\n $scope.saving = false;\n },\n );\n };\n\n $scope.setAsMain = function(address) {\n if ($scope.saving) return '';\n if (address.isMain) {\n address.isMain = false;\n save(address);\n return;\n }\n // set isMain = false for all addresses of the same medium\n angular.forEach($scope.addressList, function(addressInList) {\n if (addressInList.medium === address.medium) addressInList.isMain = false;\n });\n address.isMain = true;\n save(address);\n };\n\n $scope.toggleIncludeInMagicMail = function(address) {\n address.includeInMagicMail = !address.includeInMagicMail;\n save(address);\n };\n\n $scope.sortAddresses = function(address) {\n var mediumSort = address.medium;\n if (address.medium === 3) mediumSort = 5;\n if (address.medium === 4) mediumSort = 3;\n return '' + mediumSort + address.addressData;\n };\n },\n ],\n };\n});\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxAddressListForm', function() {\n return {\n restrict: 'E',\n template: require('./addressListForm.html'),\n scope: { addresses: '=data', required: '=', country: '=' },\n controller: [\n '$scope',\n 'optionsSvc',\n 'objectFactorySvc',\n '$timeout',\n 'appSettings',\n function($scope, optionsSvc, objectFactorySvc, $timeout, appSettings) {\n $scope.addressList = [];\n $scope.zipcodes = optionsSvc.getOptions('zipCodes');\n if (!$scope.country) $scope.country = appSettings.defaultCountry;\n\n $scope.zipcodeChanged = function(address, field, $item) {\n if (!$item || !$item.code || !$item.name) return;\n if (field === 0) address.postAddress.city = $item.name;\n if (field === 1) address.postAddress.zipCode = $item.code;\n $timeout(function() {\n $scope.addressChanged(address);\n }, 0);\n };\n\n $scope.addNewAddress = function() {\n $scope.addressList.push(objectFactorySvc.address());\n };\n\n $scope.renewNewAddress = function(address) {\n if (address.medium != null) {\n angular.copy(objectFactorySvc.address(address.medium, $scope.country), address);\n address.edit = true;\n }\n };\n\n var syncAddress = function(address) {\n var idx = $scope.addresses.indexOf(address);\n if (idx < 0) $scope.addresses.push(address);\n };\n\n var unSyncAddress = function(address) {\n var idx = $scope.addresses.indexOf(address);\n if (idx >= 0) $scope.addresses.splice(idx, 1);\n };\n\n $scope.addressChanged = function(address) {\n if (!address.$form) return;\n if (\n address.$form.$invalid ||\n (address.medium !== 0 && !address.addressData) ||\n (address.medium === 0 && (!address.postAddress || !address.postAddress.street1))\n ) {\n unSyncAddress(address);\n } else {\n syncAddress(address);\n }\n };\n\n $scope.remove = function(address) {\n unSyncAddress(address);\n var idx = $scope.addressList.indexOf(address);\n if (idx >= 0) $scope.addressList.splice(idx, 1);\n };\n\n $scope.sortAddresses = function(address) {\n var mediumSort = address.medium;\n if (address.medium === 0) mediumSort = 9;\n if (address.medium === 3) mediumSort = 5;\n if (address.medium === 4) mediumSort = 3;\n return '' + mediumSort + address.addressData;\n };\n\n $scope.addressList = angular.copy($scope.addresses);\n $scope.addresses.clear();\n\n if ($scope.required && !$scope.addressList.length) $scope.addNewAddress();\n },\n ],\n };\n});\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxAddressSelect', [\n function() {\n return {\n restrict: 'E',\n template: require('./addressSelect.html'),\n scope: {\n addressReference: '=data',\n relation: '=',\n save: '&',\n setIfOne: '@',\n medium: '=',\n disabled: '=?',\n },\n require: ['^cxRelationFile', 'cxAddressSelect'],\n link: function(scope, element, attrs, ctrls) {\n if (!ctrls || ctrls.length !== 2) return;\n\n var relFile = ctrls[0];\n var addrSelect = ctrls[1];\n\n scope.gotoAddresses = function() {\n return relFile.gotoField(scope.relation.addressesFieldId);\n };\n },\n controller: [\n '$scope',\n 'relBindSvc',\n 'commOutSvc',\n 'resourceFactorySvc',\n '$filter',\n 'openNewAddressSvc',\n function($scope, relBindSvc, commOutSvc, resourceFactorySvc, $filter, openNewAddressSvc) {\n // we add the option of setting the attribute setIfOne to true for when used in form (eg new commSetting) that will be saved.\n // in that case, when only one option is available, that one is set by default.\n $scope.setIfOne = $scope.setIfOne === 'true';\n //var relation = relBindSvc.relations[$scope.relId];\n $scope.empty = { id: '', medium: $scope.medium[0] };\n $scope.noAddresses = false;\n var loadingAddressesPromise = null;\n $scope.getAddresses = function() {\n if (!$scope.relation[$scope.relation.addressesFieldId]) {\n if (loadingAddressesPromise) return loadingAddressesPromise;\n loadingAddressesPromise = resourceFactorySvc\n .get('address')\n .query(\n {\n id: $scope.relation.id,\n },\n function(data) {\n $scope.relation[$scope.relation.addressesFieldId] = {\n value: data,\n type: 12,\n };\n return $scope.getAddresses();\n },\n )\n .$promise.finally(function() {\n loadingAddressesPromise = null;\n });\n return loadingAddressesPromise;\n }\n var addresses = $scope.relation[$scope.relation.addressesFieldId].value.filter(function(\n a,\n ) {\n return $scope.medium.includes(a.medium);\n });\n $scope.noAddresses = false;\n $scope.empty.addressData = '';\n if (\n !$scope.addressReference ||\n $scope.addressReference === '00000000-0000-0000-0000-000000000000'\n ) {\n if (addresses.length === 1 && $scope.setIfOne) {\n $scope.wrapAndSave(addresses[0].id);\n $scope.addressReference = addresses[0].id;\n return addresses;\n } else if (addresses.length === 0) {\n $scope.empty.addressData = $filter('translate')('No addresses entered yet');\n $scope.noAddresses = true;\n } else {\n $scope.empty.addressData = $filter('translate')('Select an address');\n }\n //addresses.unshift($scope.empty);\n }\n return addresses;\n };\n $scope.getAddresses();\n $scope.wrapAndSave = function($data) {\n if ($data === '00000000-0000-0000-0000-000000000000' || !$data) return false;\n return $scope.save({\n newValue: {\n ReferenceFieldId: $scope.relation.addressesFieldId,\n ValueId: $data,\n },\n });\n };\n\n $scope.newAddress = function() {\n if ($scope.gotoAddresses) {\n $scope.gotoAddresses().then(function() {\n openNewAddressSvc.openNewAddress($scope.medium[0]);\n });\n }\n };\n openNewAddressSvc.registerCallback($scope, $scope.getAddresses);\n },\n ],\n };\n },\n]);\n","import angular from 'angular';\nimport guid from '@/shared/utils/guid';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\n\nangular.module('cloudX').directive('cxAssignmentTemplateTypeahead', [\n '$http',\n 'appUrls',\n '$translate',\n 'translateListFilter',\n '$q',\n function($http, appUrls, $translate, translateListFilter, $q) {\n return {\n restrict: 'E',\n replace: true,\n template:\n '
    ' +\n '
    ' +\n ' ' +\n ' ' +\n ' ' +\n ' ' +\n ' ' +\n '
    ' +\n ' ' +\n '
    ',\n scope: {\n placeholder: '@?',\n showDefaultAssignment: '@?',\n },\n require: 'ngModel',\n link: function($scope, el, attrs, ngModel) {\n if (!ngModel) return;\n\n $scope.defaultAssignment = $scope.showDefaultAssignment\n ? {\n id: guid.empty,\n label: $translate.instant('DefaultAssignment'),\n }\n : null;\n var deferred = $q.defer();\n $http\n .get(`${appUrls.api}/api/AssignmentTemplate/Get`, {\n timeout: deferred.promise,\n cancel: deferred,\n })\n .then(({ data }) => {\n $scope.options = data\n .map(x => ({\n ...x,\n label: translateListFilter(x.id, 'assignmenttemplate', x.name),\n }))\n .sort(dynamicSort('label'));\n if ($scope.value && !$scope.selected) {\n $scope.selected = findOption($scope.value);\n }\n });\n\n $scope.selectOnBlur = angular.isDefined(attrs.selectOnBlur)\n ? $scope.$eval(attrs.selectOnBlur) || attrs.selectOnBlur\n : true;\n $scope.selectOnExact = angular.isDefined(attrs.selectOnExact)\n ? $scope.$eval(attrs.selectOnExact) || attrs.selectOnExact\n : true;\n\n var findOption = function(id) {\n if (id == null || $scope.options.length === 0) return null;\n\n if (id === guid.empty) {\n return $scope.defaultAssignment;\n }\n\n return $scope.options.find(function(el) {\n return el.id === id;\n });\n };\n\n $scope.onSelect = function(item) {\n if (item !== null) {\n $scope.selected = item;\n $scope.value = item.id;\n ngModel.$setViewValue(item.id);\n } else {\n $scope.value = null;\n $scope.selected = null;\n ngModel.$setViewValue(null);\n }\n };\n $scope.onBlur = function() {\n if ($scope.selected != null && $scope.selected.id != null) return;\n $scope.value = null;\n $scope.selected = null;\n ngModel.$setViewValue(null);\n };\n\n ngModel.$render = function() {\n $scope.value = ngModel.$viewValue;\n if ($scope.options) $scope.selected = findOption($scope.value);\n };\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxBoolSelect', [\n function() {\n return {\n restrict: 'E',\n require: '^ngModel',\n replace: true,\n scope: {\n trueValue: '=',\n falseValue: '=',\n defaultValue: '=?',\n },\n template:\n '',\n link: function(scope, element, attrs, ngModel) {\n if (!ngModel) return;\n ngModel.$parsers.push(function(value) {\n if (value === null) return !!scope.defaultValue || false;\n return value == 'true';\n });\n ngModel.$formatters.push(function(value) {\n if (typeof value === 'undefined' || value === null) {\n value = !!scope.defaultValue || false;\n }\n return '' + (!!value).toString();\n });\n },\n };\n },\n]);\n","import angular from 'angular';\n\n/* Helper directive to show bootstrap screensize in center of the screen\n Just add to the page you are working on\n*/\nangular.module('cloudX').directive('bootstrapSize', [\n function() {\n return {\n restrict: 'E',\n replace: true,\n scope: false,\n template: `
    \n

    xs

    \n

    sm

    \n

    md

    \n

    lg

    \n
    `,\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxCalendar', function() {\n return {\n restrict: 'E',\n template: require('./calendar.html'),\n scope: false,\n };\n});\n","import angular from 'angular';\n\nangular.module('cloudX').directive('checkAdvancedUpload', function() {\n var isAdvancedUpload = (function() {\n var div = document.createElement('div');\n return (\n ('draggable' in div || ('ondragstart' in div && 'ondrop' in div)) &&\n 'FormData' in window &&\n 'FileReader' in window\n );\n })();\n return {\n restrict: 'A',\n link: function($scope, $element) {\n if (!isAdvancedUpload) $element.remove();\n },\n };\n});\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxCheckbox', [\n '$timeout',\n '$q',\n '$parse',\n function($timeout, $q, $parse) {\n return {\n restrict: 'E',\n template:\n '' +\n \"\" +\n '{{text}}' +\n '',\n scope: {\n text: '@',\n tooltip: '@',\n checked: '=?value',\n checkedFunc: '&?',\n save: '&',\n onChange: '&',\n disabled: '=?',\n },\n link: function(scope, el, attrs) {\n if (typeof scope.checkedFunc === 'function') {\n scope.checked = scope.checkedFunc();\n }\n\n scope.onClick = function($event) {\n var checked = !scope.checked;\n\n //Disable when saving\n scope.saving = true;\n $event.stopPropagation();\n\n $timeout(function() {\n $q.when(\n scope.save({\n $data: checked,\n }),\n ).then(\n function(result) {\n scope.saving = false;\n if (typeof result === 'string') {\n //error\n return;\n } else if (typeof result === 'undefined' || !!result) {\n //success update model\n scope.checked = checked;\n }\n },\n function(error) {\n scope.saving = false;\n },\n );\n });\n\n $timeout(function() {\n $q.when(scope.onChange());\n });\n };\n },\n };\n },\n]);\n","import angular from 'angular';\nimport ckeditorConfig, { initializeCss } from '@/ckeditorConfig';\n\nangular.module('cloudX').directive('cxCkeditor', [\n '$compile',\n function($compile) {\n return {\n restrict: 'E',\n require: 'ngModel',\n scope: {\n options: '=?',\n readonly: '=?',\n noToolbar: '=?',\n },\n link: function(scope, element, attrs) {\n var id = attrs.key ? scope.$eval(attrs.key) || attrs.key : '';\n var name = attrs.name ? scope.$eval(attrs.name) || attrs.name : '';\n var ngModel = attrs.ngModel;\n var newEl = angular.element(\n `
    `,\n );\n\n $compile(newEl)(scope); // Only compile the new element\n element.append(newEl);\n },\n controllerAs: 'vm',\n controller: [\n '$scope',\n '$translate',\n function($scope, $translate) {\n var vm = this;\n initializeCss(true);\n vm.ckeOptions = angular.extend(\n {},\n ckeditorConfig(true),\n {\n language: $translate.use(),\n fullPage: true,\n },\n $scope.options,\n );\n },\n ],\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxColorPreview', [\n function() {\n return {\n restrict: 'E',\n replace: true,\n scope: {\n color: '=',\n showLabel: '=',\n eClass: '@',\n },\n template:\n '
    ' +\n '' +\n '{{color}}' +\n '
    ',\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxCommList', function() {\n return {\n restrict: 'E',\n template: require('./communicationList.html'),\n scope: { field: '=data', title: '@panelTitle', relId: '@', id: '@' },\n controller: [\n '$scope',\n 'resourceFactorySvc',\n 'objectFactorySvc',\n 'flySvc',\n 'relBindSvc',\n 'openNewAddressSvc',\n function(\n $scope,\n resourceFactorySvc,\n objectFactorySvc,\n flySvc,\n relBindSvc,\n openNewAddressSvc,\n ) {\n var resource = resourceFactorySvc.get('commSetting');\n $scope.commList = $scope.field.value;\n $scope.addresses = [];\n $scope.addressCount = [];\n $scope.saving = false;\n\n var reloadAddresses = function() {\n var fieldId = relBindSvc.relations[$scope.relId].addressesFieldId;\n $scope.addresses = relBindSvc.relations[$scope.relId][fieldId].value;\n $scope.addressCount = $scope.addresses.reduce(\n function(result, address) {\n result[address.medium]++;\n return result;\n },\n [0, 0, 0, 0, 0],\n );\n };\n reloadAddresses();\n $scope.openNewAddress = openNewAddressSvc.openNewAddress;\n openNewAddressSvc.registerCallback($scope, reloadAddresses);\n\n $scope.newComm = null;\n\n $scope.addNewComm = function() {\n reloadAddresses();\n // if new comm is null, create a new empty commSetting\n if ($scope.newComm === null) {\n $scope.newComm = objectFactorySvc.commSetting();\n // else set the new comm back to null (= stop adding comm)\n } else $scope.newComm = null;\n };\n\n $scope.cancelEdit = function(comm) {\n if (comm === $scope.newComm) {\n $scope.newComm = null;\n return;\n }\n };\n\n $scope.showBillingError = function() {\n var fi = $scope.field.id;\n var relation = relBindSvc.relations[$scope.relId];\n flySvc.message(\n relation[fi].billingError.exception.code,\n relation[fi].billingError.exception.params,\n );\n };\n\n $scope.getErrorMsg = flySvc.getErrorMsg;\n\n $scope.newBillingEmailComm = function() {\n reloadAddresses();\n $scope.newComm = objectFactorySvc.commSetting();\n $scope.newComm.purpose = 1;\n $scope.newComm.medium = 1;\n };\n\n $scope.validate = function(comm) {\n var validate = true;\n comm.error = {};\n if (comm.purpose === null) {\n validate = false;\n comm.error.purpose = true;\n }\n if (comm.medium === null) {\n validate = false;\n comm.error.medium = true;\n }\n if (comm.addressId === '00000000-0000-0000-0000-000000000000' || !comm.addressId) {\n validate = false;\n comm.error.address = true;\n }\n if (\n (comm.error.purpose || comm.error.medium || comm.error.address) &&\n !comm.validationCheckedOnce\n )\n flySvc.error(3029);\n // check if a commSetting with the same purpose, medium an address already exists\n\n comm.validationCheckedOnce = true;\n return validate;\n };\n\n $scope.validateAgain = function(comm, fromMedium) {\n if (comm.validationCheckedOnce) $scope.validate(comm);\n //if (fromMedium && comm.error && comm.error.address) comm.error.address=false;\n };\n\n $scope.saveComm = function(comm, field, value) {\n var model = angular.copy(comm);\n model[field] = value;\n if (!$scope.validate(model)) {\n comm.error = model.error;\n return '';\n }\n if (comm[field] === value || comm.id === '00000000-0000-0000-0000-000000000000')\n return false;\n\n return resource.update(model).$promise.then(\n function(response) {\n comm[field] = value;\n flySvc.success('msgConfirmChange');\n relBindSvc.updateRelation($scope.relId, response.changes, response.billingErrors);\n return false;\n },\n function(error) {\n flySvc.error(error);\n return '';\n },\n );\n };\n\n $scope.submitNew = function(comm) {\n if (!$scope.validate(comm)) return;\n if (comm && comm.id === '00000000-0000-0000-0000-000000000000') {\n // new commSetting -> save\n $scope.saving = true;\n resource.save(\n comm,\n function(response) {\n $scope.saving = false;\n comm.id = response.setting.id;\n $scope.commList.push(comm);\n $scope.newComm = null;\n flySvc.success('msgCommSaved');\n relBindSvc.updateRelation($scope.relId, response.changes, response.billingErrors);\n },\n function(error) {\n $scope.saving = false;\n flySvc.error(error);\n },\n );\n }\n };\n\n $scope.remove = function(comm) {\n comm.removing = true;\n resource.delete(\n { id: comm.id },\n function(response) {\n var index = $scope.commList.indexOf(comm);\n $scope.commList.splice(index, 1);\n flySvc.success('msgCommRemoved');\n relBindSvc.updateRelation($scope.relId, response.changes, response.billingErrors);\n },\n function(error) {\n comm.removing = false;\n flySvc.error(error);\n },\n );\n };\n },\n ],\n };\n});\n","import angular from 'angular';\n\nangular.module('cloudX').directive('contactIcon', [\n function () {\n return {\n restrict: 'E',\n // only open in new tab if website\n template:\n \"\",\n scope: {\n data: '=',\n addrId: '=?',\n medium: '=',\n },\n replace: true,\n controller: [\n '$scope',\n 'commOutSvc',\n function ($scope, commOutSvc) {\n $scope.formatHref = function () {\n return commOutSvc.formatHref($scope.data, $scope.addrId, $scope.medium);\n };\n },\n ],\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxContactSelect', [\n function() {\n return {\n restrict: 'E',\n template: require('./contactSelect.html'),\n scope: {\n contactReference: '=data',\n relId: '@',\n save: '&',\n setIfOne: '@',\n disabled: '=?',\n },\n controller: [\n '$scope',\n 'relBindSvc',\n '$filter',\n function($scope, relBindSvc, $filter) {\n // we add the option of setting the attribute setIfOne to true for when used in form (eg new commSetting) that will be saved.\n // in that case, when only one option is available, that one is set by default.\n $scope.setIfOne = $scope.setIfOne === 'true';\n\n var relation = relBindSvc.relations[$scope.relId];\n $scope.contacts = relation[relation.linksSectionId].value;\n\n $scope.emptyArray1 = [];\n $scope.emptyArray2 = [];\n $scope.removeDefaultOption = function() {\n $scope.emptyArray1 = [];\n $scope.emptyArray2 = [];\n };\n if (\n !$scope.contactReference.valueId ||\n $scope.contactReference.valueId ===\n '00000000-0000-0000-0000-000000000000'\n ) {\n var contactsFrom = $filter('filter')($scope.contacts, {\n from: $scope.relId,\n });\n if (contactsFrom.length === 1 && $scope.setIfOne) {\n $scope.contactReference.valueId = contactsFrom[0].id;\n } else {\n $scope.emptyString1 = $filter('translate')(\n 'No contacts entered yet',\n );\n $scope.emptyString2 = $filter('translate')('Select a contact');\n $scope.emptyArray1 = [\n {\n target: {\n id: '00000000-0000-0000-0000-000000000000',\n name: $scope.emptyString1,\n },\n },\n ];\n $scope.emptyArray2 = [\n {\n target: {\n id: '00000000-0000-0000-0000-000000000000',\n name: $scope.emptyString2,\n },\n },\n ];\n }\n }\n },\n ],\n };\n },\n]);\n","import { val } from '@uirouter/core';\nimport angular from 'angular';\n\nangular.module('cloudX').directive('convertToNumber', function() {\n return {\n require: 'ngModel',\n link: function(scope, element, attrs, ngModel) {\n ngModel.$parsers.push(function(val) {\n if (typeof val === 'undefined' || val === null) return val;\n // if (val === '') return null;\n return parseInt(val, 10);\n });\n // ngModel.$formatters.push(function(val) {\n // if (typeof val === 'undefined' || val === null) return val;\n // return '' + val;\n // });\n },\n };\n});\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxCountry', [\n '$filter',\n '$rootScope',\n 'dataCache',\n function($filter, $rootScope, dataCache) {\n return {\n restrict: 'E',\n template:\n '',\n require: 'ngModel',\n link: function($scope, el, attrs, ngModel) {\n if (!ngModel) return;\n\n var options = dataCache.getArray('country');\n $scope.showAll = false;\n var mapOptions = function() {\n $scope.countries = options.map(function(c) {\n return {\n id: c.code,\n label: $filter('translateList')(c.code, 'country', c.name),\n common: c.isCommon,\n };\n });\n };\n\n mapOptions();\n var deregistration = $rootScope.$on(\n '$translateChangeSuccess',\n mapOptions,\n );\n $scope.$on('$destroy', deregistration);\n\n $scope.setValue = function(value) {\n if (value === 'SHOWALL') {\n $scope.showAll = true;\n $scope.model = ngModel.$viewValue;\n return;\n }\n ngModel.$setViewValue(value);\n };\n\n ngModel.$render = function() {\n $scope.model = ngModel.$viewValue;\n };\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxCountrySelect', [\n 'optionsSvc',\n 'dataCache',\n function(optionsSvc, dataCache) {\n return {\n restrict: 'E',\n template:\n '' +\n '' +\n '',\n scope: {\n country: '=data',\n save: '&',\n disabled: '=?',\n },\n controller: [\n '$scope',\n '$filter',\n '$rootScope',\n function($scope, $filter, $rootScope) {\n var options = dataCache.getArray('country');\n var mapOptions = function() {\n $scope.countries = options\n .map(val => ({\n id: val.code,\n label: $filter('translateList')(val.code, 'country', val.name),\n isCommon: val.isCommon\n }))\n };\n\n mapOptions();\n var deregistration = $rootScope.$on(\n '$translateChangeSuccess',\n mapOptions,\n );\n $scope.$on('$destroy', deregistration);\n },\n ],\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxCountryPicker', [\n '$filter',\n '$rootScope',\n 'optionsSvc',\n function($filter, $rootScope, optionsSvc) {\n return {\n restrict: 'E',\n replace: true,\n scope: { disabled: '=' },\n template: `
    \n \n \n \n
    `,\n require: 'ngModel',\n link: function($scope, el, attrs, ngModel) {\n if (!ngModel) return;\n $scope.selected = [];\n $scope.options = [];\n var findOption = function(code) {\n if (code == null || $scope.options.length === 0) return null;\n return $scope.options.find(function(el) {\n return el.id === code;\n });\n };\n var mapOptions = function() {\n var options = optionsSvc.getOptions('country');\n $scope.options = options.map(function(val) {\n return {\n id: val,\n label: $filter('translateList')(val, 'country', val),\n };\n });\n };\n\n $scope.getSuggestions = function(search) {\n return $filter('filter')($scope.options, search);\n };\n\n $scope.updateValue = function() {\n ngModel.$setViewValue($scope.selected.map(x => x.id));\n };\n\n ngModel.$render = function() {\n var value = ngModel.$viewValue;\n if (value !== null && typeof value !== 'undefined' && angular.isArray(value)) {\n $scope.selected = value.map(x => findOption(x));\n }\n };\n mapOptions();\n var deregistration = $rootScope.$on('$translateChangeSuccess', mapOptions);\n $scope.$on('$destroy', deregistration);\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxCountryTypeahead', [\n '$filter',\n '$rootScope',\n 'dataCache',\n function($filter, $rootScope, dataCache) {\n return {\n restrict: 'E',\n replace: true,\n template:\n '
    ' +\n '
    ' +\n '
    ' +\n ' ' +\n ' ' +\n ' ' +\n ' ' +\n '
    ' +\n ' ' +\n '
    ',\n require: 'ngModel',\n link: function($scope, el, attrs, ngModel) {\n if (!ngModel) return;\n\n var options = dataCache.getArray('country');\n $scope.limit = $scope.$eval(attrs.limit) || 10;\n $scope.selectOnBlur = angular.isDefined(attrs.selectOnBlur)\n ? $scope.$eval(attrs.selectOnBlur) || attrs.selectOnBlur\n : true;\n $scope.selectOnExact = angular.isDefined(attrs.selectOnExact)\n ? $scope.$eval(attrs.selectOnExact) || attrs.selectOnExact\n : true;\n $scope.showAll = false;\n\n var findCountry = function(code) {\n if (code == null || $scope.countries.length === 0) return null;\n return $scope.countries.find(function(el) {\n return el.id === code;\n });\n };\n\n var mapOptions = function() {\n $scope.placeholder = $filter('translateList')(null, 'country');\n $scope.countries = options.map(function(c) {\n return {\n id: c.code,\n label: $filter('translateList')(c.code, 'country', c.name),\n common: c.isCommon,\n };\n });\n $scope.selected = findCountry($scope.value);\n };\n\n mapOptions();\n var deregistration = $rootScope.$on('$translateChangeSuccess', mapOptions);\n $scope.$on('$destroy', deregistration);\n\n $scope.onSelect = function(item) {\n $scope.selected = item;\n $scope.value = item.id;\n ngModel.$setViewValue(item.id);\n };\n $scope.onBlur = function() {\n if ($scope.selected != null && $scope.selected.id != null) return;\n $scope.value = null;\n $scope.selected = null;\n ngModel.$setViewValue(null);\n };\n\n ngModel.$render = function() {\n $scope.value = ngModel.$viewValue;\n $scope.selected = findCountry($scope.value);\n };\n },\n };\n },\n]);\n","import angular from 'angular';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\n\nangular.module('cloudX').directive('cxCompanySelect', [\n 'dataCache',\n function(dataCache) {\n return {\n restrict: 'E',\n template: `\n \n \n \n `,\n scope: {\n companyId: '=data',\n save: '&',\n disabled: '=?',\n allowNull: '=?',\n placeholder: '@?',\n showPlaceholderIfNull: '=?',\n },\n controller: [\n '$scope',\n function($scope) {\n $scope.companies = dataCache.getArray('company').sort(dynamicSort('name'));\n\n $scope.$watch('companyId', function(newValue) {\n $scope.company = $scope.companies.find(x => x.id === newValue) || null;\n });\n },\n ],\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxCompanyPicker', [\n '$filter',\n '$rootScope',\n 'dataCache',\n function($filter, $rootScope, dataCache) {\n return {\n restrict: 'E',\n replace: true,\n scope: true,\n template: `
    \n \n \n \n
    `,\n require: 'ngModel',\n link: function($scope, el, attrs, ngModel) {\n if (!ngModel) return;\n $scope.selected = [];\n $scope.options = [];\n var findOption = function(code) {\n if (code == null || $scope.options.length === 0) return null;\n return $scope.options.find(function(el) {\n return el.id === code;\n });\n };\n $scope.options = dataCache.getArray('company');\n\n $scope.getSuggestions = function(search) {\n return $filter('filter')($scope.options, search);\n };\n\n $scope.updateValue = function() {\n ngModel.$setViewValue($scope.selected.map(x => x.id));\n };\n\n ngModel.$render = function() {\n var value = ngModel.$viewValue;\n if (value !== null && typeof value !== 'undefined' && angular.isArray(value)) {\n $scope.selected = value.map(x => findOption(x));\n }\n };\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxConfigurationPicker', [\n '$filter',\n '$rootScope',\n 'optionsSvc',\n function($filter, $rootScope, optionsSvc) {\n return {\n restrict: 'E',\n replace: true,\n scope: { disabled: '=' },\n template: `
    \n \n \n \n
    `,\n require: 'ngModel',\n link: function($scope, el, attrs, ngModel) {\n if (!ngModel) return;\n $scope.selected = [];\n $scope.options = [];\n var findOption = function(code) {\n if (code == null || $scope.options.length === 0) return null;\n return $scope.options.find(function(el) {\n return el.value === code;\n });\n };\n var mapOptions = function() {\n $scope.options = optionsSvc.getOptions('tenantConfiguration');\n };\n\n $scope.getSuggestions = function(search) {\n return $filter('filter')($scope.options, search);\n };\n\n $scope.updateValue = function() {\n ngModel.$setViewValue($scope.selected.map(x => x.value));\n };\n\n ngModel.$render = function() {\n var value = ngModel.$viewValue;\n if (value !== null && typeof value !== 'undefined' && angular.isArray(value)) {\n $scope.selected = value.map(x => findOption(x));\n }\n };\n mapOptions();\n },\n };\n },\n]);\n","import angular from 'angular';\n\nconst windowUnloadHandler = event => {};\n\nangular.module('cloudX').directive('confirmOnExit', [\n '$translate',\n '$transitions',\n '$window',\n 'dialogsSvc',\n '$q',\n\n function($translate, $transitions, $window, dialogsSvc, $q) {\n return {\n restrict: 'A',\n require: 'form',\n link: function($scope, elem, attrs, form) {\n const unloadEventHandler = function(event) {\n if (form.$dirty) {\n const msg = $translate.instant('The form is dirty, do you want to stay on the page?');\n event.preventDefault();\n e.returnValue = msg;\n return msg;\n }\n };\n\n $window.addEventListener('beforeunload', unloadEventHandler);\n\n const showSaveButton = attrs.confirmOnExit && attrs.confirmOnExit.indexOf('()') > 0;\n const destroyer = $transitions.onStart({}, function(transition) {\n if (form.$dirty) {\n const preventStateChange = () => {\n transition.abort();\n return false;\n };\n\n return dialogsSvc\n .confirmChanges('msgConfirmLeavePage', 'msgConfirmLeavePageMessage', showSaveButton)\n .then(\n function(result) {\n if (result === 1) {\n return undefined; //Discard changes\n } else if (result === 2) {\n //Save changes\n //Todo call save function and handle promise\n if (showSaveButton) {\n return $q.when($scope.$eval(attrs.confirmOnExit)).then(\n function(result) {\n form.$setSubmitted();\n return undefined;\n },\n function() {\n return preventStateChange(); //Error when saving? stay on page\n },\n );\n }\n console.warn(\"Can't save changes without save function\");\n\n return undefined; //Discard changes\n } else {\n return preventStateChange(); //Cancelled, prevent state change\n }\n },\n function(error) {\n return preventStateChange(); //Prevent state change\n },\n );\n }\n });\n\n $scope.$on('$destroy', function() {\n destroyer();\n window.removeEventListener('beforeunload', unloadEventHandler);\n });\n },\n };\n },\n]);\n","import copy from 'copy-to-clipboard';\nimport angular from 'angular';\n\nangular.module('cloudX').component('copyToClipboard', {\n template: ``,\n bindings: {\n value: '<',\n },\n controller: [\n 'flySvc',\n function(flySvc) {\n const ctrl = this;\n ctrl.copy = () => {\n if (!ctrl.value) return;\n if (copy(ctrl.value)) {\n flySvc.success('ValueCopiedToClipboard');\n }\n };\n },\n ],\n});\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxCrmType', [\n 'enumCacheSvc',\n function(enumCacheSvc) {\n return {\n restrict: 'E',\n template:\n '',\n scope: {\n crmType: '=data',\n },\n controller: [\n '$scope',\n function($scope) {\n $scope.crmTypes = [];\n enumCacheSvc.get('crmType').then(function(data) {\n $scope.crmTypes = data;\n });\n },\n ],\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxCurrency', [\n 'optionsSvc',\n function(optionsSvc) {\n return {\n restrict: 'E',\n replace: true,\n template:\n '',\n scope: {\n currency: '=data',\n },\n controller: [\n '$scope',\n function($scope) {\n $scope.currencies = optionsSvc.getOptionsWithDefault('currency');\n $scope.selecting = function() {\n $scope.currencies = optionsSvc.getOptions('currency');\n };\n },\n ],\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxCurrencySelect', function() {\n return {\n restrict: 'E',\n template:\n ' {{value}} ' +\n ' ',\n scope: {\n value: '=data',\n beforeSave: '&',\n afterSave: '&',\n disabled: '=?',\n },\n };\n});\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxCurrencyTypeahead', [\n '$filter',\n '$rootScope',\n 'dataCache',\n function($filter, $rootScope, dataCache) {\n return {\n restrict: 'E',\n replace: true,\n template:\n '
    ' +\n '
    ' +\n ' ' +\n ' ' +\n ' ' +\n ' ' +\n '
    ' +\n ' ' +\n '
    ',\n require: 'ngModel',\n link: function($scope, el, attrs, ngModel) {\n if (!ngModel) return;\n\n var options = dataCache.getArray('currency');\n $scope.limit = $scope.$eval(attrs.limit) || 10;\n $scope.selectOnBlur = angular.isDefined(attrs.selectOnBlur)\n ? $scope.$eval(attrs.selectOnBlur) || attrs.selectOnBlur\n : true;\n $scope.selectOnExact = angular.isDefined(attrs.selectOnExact)\n ? $scope.$eval(attrs.selectOnExact) || attrs.selectOnExact\n : true;\n $scope.showAll = false;\n\n var findOption = function(code) {\n if (code == null || $scope.options.length === 0) return null;\n return $scope.options.find(function(el) {\n return el.id === code;\n });\n };\n\n var mapOptions = function() {\n $scope.placeholder = $filter('translateList')(null, 'currency');\n $scope.options = options.map(function(c) {\n return {\n id: c.code,\n label: c.code + ' - ' + $filter('translateList')(c.code, 'currency', c.name),\n common: c.isCommon,\n };\n });\n $scope.selected = findOption($scope.value);\n };\n\n mapOptions();\n var deregistration = $rootScope.$on('$translateChangeSuccess', mapOptions);\n $scope.$on('$destroy', deregistration);\n\n $scope.onSelect = function(item) {\n $scope.selected = item;\n $scope.value = item.id;\n ngModel.$setViewValue(item.id);\n };\n $scope.onBlur = function() {\n if ($scope.selected != null && $scope.selected.id != null) return;\n $scope.value = null;\n $scope.selected = null;\n ngModel.$setViewValue(null);\n };\n\n ngModel.$render = function() {\n $scope.value = ngModel.$viewValue;\n $scope.selected = findOption($scope.value);\n };\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular\n .module('cloudX')\n .filter('relationName', ['$filter', 'dataCache', 'checkTenantConfiguration', relationName]);\nangular.module('cloudX').filter('compactRelation', () => compactRelation);\nangular\n .module('cloudX')\n .filter('relationNameCode', ['$filter', 'dataCache', 'checkTenantConfiguration', relationNameCode]);\n\nconst aliasFieldId = 'aeedc3e5-73cf-41c2-abb4-423d75d2f52b';\n\nconst getFieldValue = function(rel, fieldId, defaultValue) {\n if (!rel || !fieldId || !rel[fieldId]) return defaultValue;\n return rel[fieldId].value || defaultValue;\n};\nconst getTitleCode = function(rel) {\n if (typeof rel === 'string') return null;\n if (rel.legalFormSalutationFieldId) return getFieldValue(rel, rel.legalFormSalutationFieldId, '');\n return rel.title;\n};\n\nfunction getNLSolePropAlias(rel, checkTenantConfiguration, titleCode) {\n if (!rel || !checkTenantConfiguration('5')) return null;\n if (rel.type !== 1) return null;\n if (!!rel.alias) return rel.alias;\n return getFieldValue(rel, aliasFieldId, null);\n}\n\nfunction relationNameCode($filter, dataCache, checkTenantConfiguration) {\n return function(rel, firstName, titleCode, ignoreAlias) {\n if (!rel) return '';\n\n // Use the existing relationName filter to get the base name\n var relationName = $filter('relationName')(rel, firstName, titleCode, ignoreAlias);\n\n // Append the UniqueIdentifier to the relation name\n if(!rel.customerCode) return relationName + ' | ' + rel.uniqueIdentifier;\n return relationName + ' | ' + rel.customerCode;\n };\n}\n\nfunction relationName($filter, dataCache, checkTenantConfiguration) {\n var getName = function(rel, firstName) {\n if (typeof rel === 'string')\n return (rel.infix ? rel.infix + ' ' : '') + rel + (firstName ? ', ' + firstName : '');\n if (rel.nameFieldId) {\n //PD\n if (rel.infixFieldId) {\n return (\n getFieldValue(rel, rel.infixFieldId, '') +\n ' ' +\n getFieldValue(rel, rel.nameFieldId, '') +\n (rel.type === 0 ? '' : ', ' + getFieldValue(rel, rel.firstNameFieldId, ''))\n ).trim();\n } else {\n return (\n getFieldValue(rel, rel.nameFieldId, '') +\n (rel.type === 0 ? '' : ', ' + getFieldValue(rel, rel.firstNameFieldId, ''))\n ).trim();\n }\n }\n return (\n (rel.infix ? rel.infix + ' ' : '') +\n (rel.name || '') +\n (rel.firstName ? ', ' + rel.firstName : '')\n );\n };\n\n return function(rel, firstName, titleCode, ignoreAlias) {\n if (!rel) return '';\n var name = getName(rel, firstName);\n\n if (!titleCode && titleCode !== 0) titleCode = getTitleCode(rel);\n if (typeof titleCode === 'string') titleCode = parseInt(titleCode);\n if (!ignoreAlias) {\n const alias = getNLSolePropAlias(rel, checkTenantConfiguration, titleCode);\n if (!!alias) return alias;\n }\n\n if (!titleCode && titleCode !== 0) return name;\n var titles = dataCache.getObject(rel.type !== 0 ? 'salutation' : 'legalForm');\n if (!titles) return name; //Cache not ready\n\n var title = titles[titleCode];\n if (!title) return name;\n\n if (rel.type !== 0) {\n if (!title.show) return name;\n return (\n $filter('translateList')(titleCode, 'salutation', title.description || '') +\n ' ' +\n name\n ).trim();\n }\n if (!title.appendLegalFormToName) return name;\n return (\n name +\n ' ' +\n $filter('translateList')(titleCode, 'legalForm', title.description || '')\n ).trim();\n };\n}\n\n// Converts relation file object (with guids as fields) to relation name object\nconst compactRelation = rel => {\n if (!rel || !rel.id) return null;\n var result = {\n id: rel.id,\n type: rel.type,\n crm: rel.crm,\n name: rel.name || null,\n infix: rel.infix || null,\n firstName: rel.firstName || null,\n title: rel.title || null,\n customerCode: rel.customerCode || null,\n uniqueIdentifier: rel.uniqueIdentifier || null\n };\n if (rel.nameFieldId) {\n result.name = getFieldValue(rel, rel.nameFieldId, null);\n }\n if (rel.infixFieldId) {\n result.infix = getFieldValue(rel, rel.infixFieldId, null);\n }\n if (rel.firstNameFieldId) {\n result.firstName = getFieldValue(rel, rel.firstNameFieldId, null);\n }\n if (rel.legalFormSalutationFieldId) {\n result.title = parseInt(getFieldValue(rel, rel.legalFormSalutationFieldId, 0));\n }\n if (rel.codeFieldId) {\n result.customerCode = getFieldValue(rel, rel.codeFieldId, null);\n }\n if (rel.uniqueIdentifierFieldId) {\n result.uniqueIdentifier = getFieldValue(rel, rel.uniqueIdentifierFieldId, null);\n }\n return result;\n};\n\nexport { compactRelation };\n","import angular from 'angular';\nimport moment from 'moment';\nimport dateFormatService from '../../../shared/services/DateFormatService';\n\nconst inputRegex = /^\\s*(\\d?\\d)\\s*(\\/|-)\\s*(\\d?\\d)\\s*$/;\n\nangular.module('cloudX').directive('dayMonthConverter', function() {\n return {\n restrict: 'A',\n require: 'ngModel',\n link: function(scope, el, attrs, ngModel) {\n if (!ngModel) return;\n let outputType = attrs.dayMonthConverter || 'string';\n if (outputType === 'day-month-converter') outputType = 'string';\n\n ngModel.$formatters.push(function(value) {\n if (value === null) return null;\n if (typeof value === 'undefined') return undefined;\n\n let dateValue;\n if (typeof value === 'string') {\n dateValue = moment.utc(value.substr(0, 10));\n } else if (value instanceof Date) {\n dateValue = moment(value).utc();\n } else if (moment.isMoment(value)) {\n dateValue = moment(value).utc();\n } else {\n //Unknown type\n return value;\n }\n\n return dateFormatService.formatDayMonth(dateValue.toISOString());\n });\n\n ngModel.$parsers.push(function(value) {\n if (!value) return null;\n const match = value.match(inputRegex);\n if (match) {\n const dateValue = moment.utc(`2000-${match[3]}-${match[1]}`, 'YYYY-MM-DD');\n if (dateValue.isValid()) {\n ngModel.$setValidity('date', true);\n if (outputType === 'string') return dateValue.format('YYYY-MM-DD');\n if (outputType === 'moment') return dateValue;\n if (outputType === 'date') return dateValue.local().toDate();\n if (outputType === 'dateUTC') return dateValue.toDate();\n return dateValue.format('YYYY-MM-DD');\n }\n }\n ngModel.$setValidity('date', false);\n return undefined;\n });\n },\n };\n});\n","import angular from 'angular';\n\nimport { compactRelation } from '../Filters/relationNameFilter';\n\nangular.module('cloudX').directive('cxDashboard', [\n function() {\n return {\n restrict: 'E',\n template: require('./dashboard.html'),\n scope: { data: '=', relation: '=' },\n controller: [\n '$scope',\n '$state',\n '$http',\n '$filter',\n 'checkSecurity',\n 'invoiceDialogsSvc',\n function($scope, $state, $http, $filter, checkSecurity, invoiceDialogsSvc) {\n $scope.security = {};\n $scope.loading = false;\n $scope.checkSecurity = function(type) {\n if (!$scope.security.hasOwnProperty(type)) $scope.security[type] = checkSecurity(type);\n return $scope.security[type];\n };\n $scope.widgetList = [];\n $scope.$watch('data', function(newValue) {\n if (\n newValue &&\n typeof newValue === 'string' &&\n newValue.toLowerCase().indexOf('/api/') >= 0\n ) {\n $scope.loading = true;\n $http.get(newValue).then(function(response) {\n $scope.widgetList = response.data;\n $scope.loading = false;\n });\n } else {\n $scope.widgetList = newValue;\n }\n });\n\n $scope.hasAction = function(widget) {\n if (!widget) return false;\n switch (widget.kpi) {\n case 0:\n case 1:\n case 2:\n case 5:\n return $scope.checkSecurity('InvoiceFinal');\n case 3:\n return $scope.checkSecurity('InvoiceDraft');\n case 4:\n return $scope.checkSecurity('RegistrationOthers');\n }\n return false;\n };\n $scope.doAction = function(widget) {\n if (!widget) return;\n const relation = compactRelation($scope.relation);\n switch (widget.kpi) {\n case 0:\n if ($scope.checkSecurity('InvoiceFinal'))\n $state.go('invoicing.overview', {\n relation: relation,\n filterType: widget.status > 0 ? widget.status + 1 : 0,\n });\n break;\n case 1:\n case 2:\n if ($scope.checkSecurity('InvoiceFinal'))\n $state.go('invoicing.overview', {\n relation: relation,\n filterType: 1,\n });\n break;\n case 3:\n if ($scope.checkSecurity('InvoiceDraft'))\n $state.go('invoicing.toInvoice', {\n relationId: relation.id,\n relationName: relation.name,\n });\n break;\n case 4:\n if ($scope.checkSecurity('RegistrationOthers'))\n $state.go('registrations.overview', {\n relation: relation,\n period: 'all',\n filters: { invoiceStatus: { items: [0] } },\n });\n break;\n case 5:\n if ($scope.checkSecurity('InvoiceFinal'))\n invoiceDialogsSvc.showInvoicingHistory(\n $scope.relation.invoiceStreamId,\n null,\n $scope.relation.id,\n );\n break;\n }\n };\n },\n ],\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('datepickerLocaldate', [\n '$parse',\n function($parse) {\n var directive = {\n restrict: 'A',\n require: ['ngModel'],\n link: link,\n };\n return directive;\n\n function link(scope, element, attr, ctrls) {\n var ngModelController = ctrls[0];\n\n // called with a JavaScript Date object when picked from the datepicker\n ngModelController.$parsers.push(function(viewValue) {\n // undo the timezone adjustment we did during the formatting\n viewValue.setMinutes(\n viewValue.getMinutes() - viewValue.getTimezoneOffset(),\n );\n // we just want a local date in ISO format\n return viewValue.toISOString().substring(0, 10);\n });\n\n // called with a 'yyyy-mm-dd' string to format\n ngModelController.$formatters.push(function(modelValue) {\n if (!modelValue) {\n return undefined;\n }\n // date constructor will apply timezone deviations from UTC (i.e. if locale is behind UTC 'dt' will be one day behind)\n var dt = new Date(modelValue);\n // 'undo' the timezone offset again (so we end up on the original date again)\n dt.setMinutes(dt.getMinutes() + dt.getTimezoneOffset());\n return dt;\n });\n }\n },\n]);\n","import angular from 'angular';\nimport moment from 'moment';\n\nangular.module('cloudX').directive('cxDateScroller', [\n function() {\n return {\n restrict: 'E',\n replace: 'true',\n template: require('./dateScroller.html'),\n require: '^ngModel',\n scope: true,\n link: function(scope, element, attrs, ctrl) {\n var ngModel = ctrl;\n\n ngModel.$render = function() {\n scope.date = ngModel.$viewValue || new Date();\n if (typeof scope.date === 'string') scope.date = new moment(scope.date).toDate();\n if (!(scope.date instanceof Date)) scope.date = new Date();\n scope.date = moment(scope.date)\n .clone()\n .toDate();\n };\n\n scope.onChange = function() {\n ngModel.$setViewValue(scope.date);\n };\n\n scope.update = function(n) {\n scope.date = new Date(scope.date); //Watch didn't detect addDays changes\n scope.date = moment(scope.date)\n .add(n, 'days')\n .toDate();\n ngModel.$setViewValue(scope.date);\n };\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('datetimepickerNeutralTimezone', function() {\n return {\n restrict: 'A',\n priority: 1,\n require: 'ngModel',\n link: function(scope, element, attrs, ctrl) {\n ctrl.$formatters.push(function(value) {\n if (value == null) return value;\n var date = new Date(Date.parse(value));\n date = new Date(date.getTime() + 60000 * date.getTimezoneOffset());\n return date;\n });\n\n ctrl.$parsers.push(function(value) {\n if (value == null) return value;\n var date = new Date(value.getTime() - 60000 * value.getTimezoneOffset());\n return date;\n });\n },\n };\n});\n","import angular from 'angular';\nimport adminpulse from '../../../shared/utils/adminpulse';\nangular.module('cloudX').directive('uibDatepickerPopup', function() {\n var directive = {\n restrict: 'A',\n require: ['ngModel'],\n link: link,\n priority: 1,\n };\n return directive;\n\n function link(scope, element, attr, ctrls) {\n var ngModelController = ctrls[0];\n if (!attr.uibDatepickerPopup) return;\n if (attr.uibDatepickerPopup !== 'dd/MM') return;\n\n // if (attr.datepickerOptions) {\n // const options = scope.$eval(attr.datepickerOptions);\n // if (options && !!options.minDate) return; //Don't run parsers if mindate is set\n // }\n\n ngModelController.$parsers.push(function(viewValue) {\n if (!viewValue) return viewValue;\n\n if (angular.isDate(viewValue)) return adminpulse.dayMonthDate(viewValue);\n return viewValue;\n });\n }\n});\n","import angular from 'angular';\n\nimport DocumentService from '@/shared/services/DocumentService';\nimport { isEditable } from '@/shared/utils/mime';\n\nangular.module('cloudX').directive('cxDocumentsDropdown', [\n function() {\n return {\n restrict: 'E',\n template: `\n
    0) || (('Documents:c'|security) && vm.showUpload)\">\n \n \n \n \n 0\" ng-bind=\"vm.documents.length\">\n 0\">\n \n \n
    `,\n replace: true,\n scope: {\n documents: '=',\n showUpload: '=',\n linkType: '=?',\n linkId: '=?',\n onUpload: '&?',\n onDeleteLink: '&?',\n showDocumentType: '=?',\n },\n bindToController: true,\n controllerAs: 'vm',\n controller: [\n '$http',\n 'appUrls',\n 'flySvc',\n 'dialogsSvc',\n '$timeout',\n '$q',\n '$translate',\n function($http, appUrls, flySvc, dialogsSvc, $timeout, $q, $translate) {\n const vm = this;\n if (!vm.onUpload) vm.showUpload = false;\n\n vm.uploadFiles = function(files) {\n if (!vm.onUpload) return;\n vm.onUpload({ files: files });\n };\n vm.edit = async function(document, event) {\n event.stopPropagation();\n\n if (document.storageType === 1) {\n window.open(document.path, '_blank');\n return;\n }\n\n await DocumentService.edit(document.id, $translate.use().split('-')[0]);\n };\n vm.openInApp = async function(document, event) {\n event.stopPropagation();\n\n await DocumentService.openInApp(document.id);\n };\n\n vm.onPreviewClosed = () => {\n $timeout(function() {\n vm.showPreview = false;\n vm.activeDocumentId = null;\n }, 0);\n };\n\n vm.onPreviewSaved = document => {\n $timeout(function() {\n vm.showPreview = false;\n vm.activeDocument = null;\n vm.documents = vm.documents.map(x => {\n if (x.id === document.id) {\n return {\n ...x,\n ...document,\n };\n }\n return x;\n });\n }, 0);\n };\n\n vm.previewDocument = document => {\n vm.activeDocument = document;\n vm.showPreview = true;\n };\n\n vm.showEditIcon = document => {\n const fileExtension = document.name.split('.').pop();\n return isEditable(fileExtension, document.mime);\n };\n\n vm.download = function(document) {\n if (!document || !document.id) return;\n if (document.showSpinner) return;\n document.showSpinner = true;\n DocumentService.download(document.id).finally(() => {\n $timeout(function() {\n document.showSpinner = false;\n }, 0);\n });\n };\n\n vm.sendDeleteDocumentRequest = function(documentId) {\n return $http.delete(`${appUrls.documents}/api/documents/${documentId}`);\n };\n vm.sendDeleteDocumentLinkRequest = function(documentId) {\n if (!vm.linkId || !vm.linkType) return $q.reject();\n\n return $http.delete(\n `${appUrls.documents}/api/documents/Links/${documentId}/${vm.linkId}/${vm.linkType}`,\n );\n };\n\n vm.deleteDocument = function(document, event) {\n event.stopPropagation();\n if (document.showSpinner) return;\n if (vm.linkId && vm.linkType) {\n return dialogsSvc\n .showYesNoCancel('comfirmDeleteTitle', 'msgConfirmDeleteDocumentOrLink')\n .then(function(confirm) {\n if (confirm === null) return false; //cancel\n document.showSpinner = true;\n const request = confirm\n ? vm.sendDeleteDocumentRequest(document.id)\n : vm.sendDeleteDocumentLinkRequest(document.id);\n\n return request\n .success(function(result) {\n flySvc.success();\n var index = vm.documents.indexOf(document);\n if (index >= 0) vm.documents.splice(index, 1);\n document.showSpinner = false;\n })\n .error(function(error) {\n flySvc.error(error);\n document.showSpinner = false;\n return '';\n });\n });\n }\n return dialogsSvc\n .showYesNo('comfirmDeleteTitle', 'msgConfirmDeleteDocument')\n .then(function() {\n document.showSpinner = true;\n\n return vm\n .sendDeleteDocumentRequest(document.id)\n .success(function(result) {\n flySvc.success();\n var index = vm.documents.indexOf(document);\n if (index >= 0) vm.documents.splice(index, 1);\n document.showSpinner = false;\n })\n .error(function(error) {\n flySvc.error(error);\n document.showSpinner = false;\n return '';\n });\n });\n };\n },\n ],\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxDocumentTemplateSelect', [\n function() {\n return {\n restrict: 'E',\n template: `\n {{getDisplayValue()}}\n {{'Use company setting'|translate}}\n \n `,\n scope: {\n value: '=data',\n save: '&',\n languageCode: '@',\n templateType: '@',\n companyId: '@',\n disabled: '=',\n },\n controller: [\n '$scope',\n '$http',\n 'appUrls',\n function($scope, $http, appUrls) {\n $scope.documentTemplates = [];\n $scope.showMismatchWarning = false;\n\n $scope.beforeSave = function(newValue) {\n if (newValue) {\n const documentTemplate = $scope.documentTemplates.find(x => x.id === newValue);\n $scope.showMismatchWarning = documentTemplate ? !!documentTemplate.isMismatch : true;\n } else {\n $scope.showMismatchWarning = false;\n }\n\n $scope.save({ newValue });\n };\n $scope.reloadTemplates = function() {\n return $http\n .get(`${appUrls.api}/api/documentTemplate/TemplatesForType`, {\n params: {\n templateType: $scope.templateType,\n languageCode: $scope.languageCode,\n companyId: $scope.companyId,\n },\n })\n .then(function({ data }) {\n $scope.documentTemplates = data;\n\n if ($scope.value) {\n const documentTemplate = data.find(x => x.id === $scope.value);\n if (documentTemplate == null) {\n $scope.showMismatchWarning = true;\n $http\n .get(`${appUrls.api}/api/documentTemplate/Templates`, {\n params: {\n templateType: $scope.templateType,\n templateId: $scope.value,\n },\n })\n .then(function({ data }) {\n if (data && data.length) {\n const template = data[0];\n template.isMismatch = true;\n $scope.documentTemplates.push(template);\n }\n });\n } else {\n $scope.showMismatchWarning = false;\n }\n }\n return data;\n });\n };\n\n $scope.getDisplayValue = () => {\n if (!$scope.value || !$scope.documentTemplates) return null;\n const documentTemplate = $scope.documentTemplates.find(x => x.id === $scope.value);\n return documentTemplate ? documentTemplate.name : null;\n };\n $scope.$watchGroup(['languageCode', 'companyId'], function() {\n $scope.reloadTemplates();\n });\n },\n ],\n };\n },\n]);\n","import angular from 'angular';\nimport moment from 'moment';\n\nangular.module('cloudX').directive('cxEidUpload', [\n '$timeout',\n 'flySvc',\n '$compile',\n function ($timeout, flySvc, $compile) {\n return {\n scope: {\n upload: '&',\n },\n link: function (scope, element) {\n var draggingClass = 'dragover';\n var inputId = 'fileInput' + Math.random();\n var inputWrapper = angular.element(\n `
    `,\n );\n var input = angular.element(\n '',\n );\n input.addClass('form-control');\n inputWrapper.append(input);\n\n $compile(inputWrapper)(scope);\n\n element.append(inputWrapper);\n\n var readEidXml = function (xml) {\n try {\n var parser = new DOMParser();\n var xmlDoc = parser.parseFromString(xml, 'text/xml');\n var identity = xmlDoc.getElementsByTagName('identity')[0];\n\n var cardInformation = {};\n\n cardInformation.xml = xml;\n cardInformation.lastName = identity.getElementsByTagName(\n 'name',\n )[0].childNodes[0].nodeValue;\n\n if (identity.getElementsByTagName('firstname')[0].childNodes.length > 0) {\n cardInformation.firstName = identity.getElementsByTagName(\n 'firstname',\n )[0].childNodes[0].nodeValue;\n }\n\n if (identity.getElementsByTagName('middlenames')[0].childNodes.length > 0) {\n cardInformation.firstNameOfficial = cardInformation.firstName + \" \" + identity.getElementsByTagName(\n 'middlenames',\n )[0].childNodes[0].nodeValue;\n }\n\n cardInformation.nationality = identity.getElementsByTagName(\n 'nationality',\n )[0].childNodes[0].nodeValue;\n cardInformation.placeOfBirth = identity.getElementsByTagName(\n 'placeofbirth',\n )[0].childNodes[0].nodeValue;\n cardInformation.nationalNumber = identity.getAttribute('nationalnumber');\n cardInformation.gender = identity.getAttribute('gender');\n cardInformation.dateOfBirth = moment.utc(identity.getAttribute('dateofbirth')).toDate();\n cardInformation.cardNumber = xmlDoc\n .getElementsByTagName('card')[0]\n .getAttribute('cardnumber');\n cardInformation.cardExpiryDate = moment\n .utc(xmlDoc.getElementsByTagName('card')[0].getAttribute('validitydateend'))\n .toDate();\n cardInformation.street = xmlDoc\n .getElementsByTagName('address')[0]\n .getElementsByTagName('streetandnumber')[0].childNodes[0].nodeValue;\n cardInformation.zip = xmlDoc\n .getElementsByTagName('address')[0]\n .getElementsByTagName('zip')[0].childNodes[0].nodeValue;\n cardInformation.city = xmlDoc\n .getElementsByTagName('address')[0]\n .getElementsByTagName('municipality')[0].childNodes[0].nodeValue;\n cardInformation.photo = identity.getElementsByTagName(\n 'photo',\n )[0].childNodes[0].nodeValue;\n\n scope.$apply(function () {\n scope.upload({\n eid: cardInformation,\n });\n });\n } catch (error) {\n $timeout(function () {\n console.error(error);\n //Failed to parse eid XML\n flySvc.error(6022);\n }, 0);\n }\n };\n\n var readXmlFromFile = function (file) {\n var reader = new FileReader();\n reader.readAsText(file);\n reader.onloadend = function (event) {\n if (event.target.readyState === FileReader.DONE) {\n // DONE == 2\n if (!event.target.result) return;\n readEidXml(event.target.result);\n }\n };\n };\n element.attr('draggable', 'true');\n element.on('dragover', function (event) {\n event.preventDefault();\n });\n\n var processDragOverOrEnter = function (event) {\n if (event == null) return false;\n\n var dataTransfer = event.dataTransfer || event.originalEvent.dataTransfer;\n if (!dataTransfer) return false;\n\n if (dataTransfer.items && dataTransfer.items.length > 0) {\n var file = dataTransfer.items[0];\n if (file.type !== 'text/plain' && file.type !== '') {\n //Eid file has no file type, dragging text is text/plain\n dataTransfer.dropEffect = 'none';\n return false;\n }\n }\n\n event.preventDefault();\n\n dataTransfer.effectAllowed = 'copy';\n dataTransfer.dropEffect = 'copy';\n element.addClass(draggingClass);\n return true;\n };\n\n input.bind('change', function (event) {\n if (event && event.target) {\n if (event.target.files && event.target.files.length > 0) {\n var file = event.target.files[0];\n if (file.type !== '') {\n //.eid file has empty type\n event.target.value = '';\n $timeout(function () {\n flySvc.error(2022, ['.eid']);\n }, 0);\n return;\n }\n readXmlFromFile(file);\n }\n event.target.value = '';\n }\n });\n element.on('drop', function (event) {\n element.removeClass(draggingClass);\n var dataTransfer = event.dataTransfer || event.originalEvent.dataTransfer;\n if (!dataTransfer) return;\n\n event.preventDefault();\n\n if (dataTransfer.types.indexOf('Files') >= 0) {\n if (dataTransfer.files.length < 1) return;\n var file = dataTransfer.files[0];\n console.debug(file);\n\n readXmlFromFile(file);\n }\n\n if (dataTransfer.types.indexOf('text/plain') >= 0) {\n var xml = event.originalEvent.dataTransfer.getData('Text');\n readEidXml(xml);\n }\n });\n\n var processDragLeaveOrEnd = function (event) {\n element.removeClass(draggingClass);\n return false;\n };\n\n element.bind('dragover', processDragOverOrEnter);\n element.bind('dragenter', processDragOverOrEnter);\n element.bind('dragleave', processDragLeaveOrEnd);\n element.bind('dragend', processDragLeaveOrEnd);\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('elastic', [\n '$timeout',\n function($timeout) {\n return {\n restrict: 'A',\n scope: false,\n link: function($scope, element, attr) {\n $scope.initialHeight = $scope.initialHeight || element[0].style.height;\n var resize = function() {\n element[0].style.height = $scope.initialHeight;\n element[0].style.height = '' + (element[0].scrollHeight + 12) + 'px';\n };\n element.on('input change', resize);\n\n var watchVisibility = function(reverse) {\n return function(expr) {\n $scope.$watch(expr, function(val) {\n if ((reverse && !val) || (!reverse && val)) $timeout(resize, 100);\n });\n };\n };\n\n //Put ng-show or ng-hide on element itself to resize if visibility changes\n //\n if (angular.isDefined(attr.ngShow))\n attr.$observe('ngShow', watchVisibility(false));\n if (angular.isDefined(attr.ngHide))\n attr.$observe('ngHide', watchVisibility(true));\n\n $timeout(resize, 100);\n },\n };\n },\n]);\n","import angular from 'angular';\n//Converts empty string value to null\nangular.module('cloudX').directive('emptyToNull', function() {\n return {\n restrict: 'A',\n require: 'ngModel',\n link: function(scope, elem, attrs, ctrl) {\n ctrl.$parsers.push(function(viewValue) {\n if (viewValue === '') return null;\n return viewValue;\n });\n },\n };\n});\n","import angular from 'angular';\nimport moment from 'moment';\n\nangular.module('cloudX').directive('cxEndFiscalYearPicker', [\n function() {\n return {\n restrict: 'E',\n replace: true,\n scope: true,\n template: `
    \n \n \n \n
    `,\n require: ['ngModel', 'cxEndFiscalYearPicker'],\n link: function($scope, el, attrs, controllers) {\n if (!controllers || controllers.length !== 2) return;\n const [ngModel, ctrl] = controllers;\n ctrl.view2model = function(value) {\n ngModel.$setViewValue(value);\n };\n\n // when angular detects a change to the model,\n // we update our inner value\n ngModel.$render = function() {\n ctrl.setValue(ngModel.$viewValue);\n };\n },\n controllerAs: 'ctrl',\n controller: [\n '$http',\n 'appUrls',\n '$translate',\n 'dataCache',\n '$filter',\n function($http, appUrls, $translate, dataCache, $filter) {\n const ctrl = this;\n ctrl.selected = [];\n ctrl.options = null;\n ctrl.tmpValue = null; //Init after loading\n ctrl.findOption = function(code) {\n if (code == null || !ctrl.options || ctrl.options.length === 0) return null;\n return ctrl.options.find(el => el.id === code);\n };\n ctrl.getSuggestions = function(search) {\n return $filter('filter')(ctrl.options, search);\n };\n dataCache\n .ready()\n .then(() => {\n const data = dataCache.getArray('fiscalYears');\n if (!!data) return data; //Get fiscalYears from dataCache\n\n //Not found, retrieve from backend\n return $http.get(`${appUrls.api}/api/relation/fiscalYears`).then(({ data }) => {\n const years = data.map(fiscalYear => ({\n id: fiscalYear,\n label: moment.utc(fiscalYear).format('D/MM'),\n }));\n //Store in dataCache\n dataCache.update('fiscalYears', years);\n return years;\n });\n })\n .then(years => {\n ctrl.options = [\n {\n id: '0001-01-01',\n label: $translate.instant('EmptyFiscalYear'),\n },\n ...years,\n ];\n if (!!ctrl.tmpValue) {\n ctrl.selected = ctrl.tmpValue.map(x => ctrl.findOption(x));\n }\n });\n ctrl.updateValue = function() {\n ctrl.view2model(ctrl.selected.map(x => x.id));\n };\n ctrl.setValue = function(value) {\n ctrl.tmpValue = null;\n if (value !== null && typeof value !== 'undefined' && angular.isArray(value)) {\n if (ctrl.options !== null) {\n ctrl.selected = value.map(x => ctrl.findOption(x));\n } else {\n //Options not loaded yet\n ctrl.tmpValue = value;\n }\n } else {\n ctrl.selected = [];\n }\n };\n },\n ],\n };\n },\n]);\n","import angular from 'angular';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\n\nangular.module('cloudX').directive('cxEnumCheckboxSelect', [\n 'enumCacheSvc',\n '$filter',\n '$rootScope',\n function(enumCacheSvc, $filter, $rootScope) {\n return {\n restrict: 'E',\n require: '^ngModel',\n template: `
    \n
    \n \n
    \n \n \n
    \n
    \n \n
    `,\n scope: {\n type: '@',\n orderByLabel: '@?',\n placeholder: '@?',\n hideItems: '=?',\n },\n link: function(scope, el, attrs, ngModel) {\n if (!ngModel) return;\n scope.items = [];\n scope.initOnload = null;\n scope.displayValue = '';\n scope.ddwOpen = false;\n\n enumCacheSvc.get(scope.type).then(function(data) {\n scope.items = (scope.hideItems && scope.hideItems.length > 0\n ? data.filter(x => !scope.hideItems.includes(x.key))\n : data\n ).map(x => ({\n ...x,\n selected: scope.initOnload && scope.initOnload.indexOf(x.key) >= 0,\n }));\n translateLabels();\n });\n\n function translateLabels() {\n scope.items.forEach(function(item) {\n item.label = $filter('translateList')(item.key, scope.type, item.value);\n });\n scope.setDisplayValue();\n }\n var deregistration = $rootScope.$on('$translateChangeSuccess', translateLabels);\n scope.$on('$destroy', deregistration);\n\n scope.toggleItem = function(item) {\n item.selected = !item.selected;\n scope.setDisplayValue();\n };\n\n scope.setDisplayValue = function() {\n scope.displayValue = scope.items\n .filter(x => x.selected)\n .sort(dynamicSort(scope.orderByLabel ? 'label' : 'key'))\n .map(x => x.label)\n .join(', ');\n };\n scope.clearSelected = function() {\n if (scope.items) {\n scope.items.forEach(x => {\n x.selected = false;\n });\n }\n scope.displayValue = '';\n ngModel.$setViewValue([]);\n scope.ddwOpen = false;\n };\n\n scope.toggleDropDown = function(open) {\n if (!open) {\n const value = scope.items\n .filter(x => x.selected)\n .map(x => x.key)\n .sort();\n ngModel.$setViewValue(value);\n }\n };\n\n ngModel.$render = function() {\n const value = ngModel.$viewValue || [];\n if (scope.items && scope.items.length) {\n if (value.length) {\n scope.items.forEach(x => {\n x.selected = value && value.indexOf(x.key) >= 0;\n });\n scope.setDisplayValue();\n } else {\n scope.clearSelected();\n }\n } else {\n scope.initOnload = value;\n }\n };\n },\n };\n },\n]);\n","import { dynamicSort } from '@/shared/utils/dynamicSort';\nimport angular from 'angular';\n\nangular.module('cloudX').directive('cxEnum', [\n 'enumCacheSvc',\n '$filter',\n '$rootScope',\n '$timeout',\n '$q',\n function(enumCacheSvc, $filter, $rootScope, $timeout, $q) {\n return {\n restrict: 'E',\n require: '^ngModel',\n template:\n '',\n scope: {\n type: '@',\n allowNull: '=?',\n eClass: '=?',\n eName: '@?',\n ctrlId: '@?',\n ngDisabled: '=?',\n orderByLabel: '@?',\n nullLabel: '@?',\n onChange: '&',\n },\n link: function(scope, el, attrs, ngModel) {\n if (!ngModel) return;\n scope.items = [];\n\n enumCacheSvc.get(scope.type).then(function(data) {\n scope.items = data;\n translateLabels();\n });\n\n function translateLabels() {\n scope.placeholder =\n scope.nullLabel ||\n $filter('translateList')(null, scope.type) ||\n '- ' + $filter('translate')('Choose') + ' -';\n scope.items.forEach(function(item) {\n item.label = $filter('translateList')(item.key, scope.type, item.value);\n });\n scope.items.sort(dynamicSort(scope.orderByLabel ? 'label' : 'key'));\n }\n var deregistration = $rootScope.$on('$translateChangeSuccess', translateLabels);\n scope.$on('$destroy', deregistration);\n\n ngModel.$render = function() {\n scope.value = ngModel.$viewValue;\n };\n scope.setValue = function() {\n ngModel.$setViewValue(scope.value);\n if (scope.onChange) {\n $timeout(function() {\n $q.when(scope.onChange());\n });\n }\n };\n },\n };\n },\n]);\n","import angular from 'angular';\nimport moment from 'moment';\nimport { dynamicSortMultiple } from '@/shared/utils/dynamicSort';\nimport guid from '@/shared/utils/guid';\n\nangular.module('cloudX').directive('cxEnumPicker', [\n '$timeout',\n function($timeout) {\n return {\n restrict: 'E',\n replace: true,\n scope: {\n type: '@',\n placeholder: '@',\n extraId: '@',\n extraLabel: '@',\n autofocus: '=',\n },\n bindToController: true,\n template: `
    \n \n \n \n
    `,\n require: ['ngModel', 'cxEnumPicker'],\n link: function($scope, el, attrs, controllers) {\n if (!controllers || controllers.length !== 2) return;\n const [ngModel, ctrl] = controllers;\n if (ctrl.autofocus) {\n $timeout(function() {\n el.find('input')\n .first()\n .focus();\n });\n }\n\n ctrl.view2model = function(value) {\n ngModel.$setViewValue(value);\n };\n\n // when angular detects a change to the model,\n // we update our inner value\n ngModel.$render = function() {\n ctrl.setValue(ngModel.$viewValue);\n };\n },\n controllerAs: 'ctrl',\n controller: [\n '$scope',\n '$rootScope',\n 'enumCacheSvc',\n 'translateListFilter',\n 'dataCache',\n '$filter',\n function($scope, $rootScope, enumCacheSvc, translateListFilter, dataCache, $filter) {\n const ctrl = this;\n ctrl.selected = [];\n ctrl.options = null;\n ctrl.tmpValue = null; //Init after loading\n ctrl.findOption = function(code) {\n if (code == null || !ctrl.options || ctrl.options.length === 0) return null;\n return ctrl.options.find(el => el.id === code);\n };\n ctrl.getSuggestions = function(search) {\n return $filter('filter')(ctrl.options, search);\n };\n enumCacheSvc.get(ctrl.type).then(function(data) {\n ctrl.options = data.map(item => ({\n ...item,\n id: item.key,\n label: translateListFilter(item.key, ctrl.type, item.value),\n sort: 1,\n }));\n if (ctrl.extraLabel && ctrl.extraId) {\n ctrl.options.push({\n id: ctrl.extraId,\n label: ctrl.extraLabel,\n sort: 0,\n });\n }\n ctrl.options.sort(dynamicSortMultiple('sort', 'label'));\n if (!!ctrl.tmpValue) {\n ctrl.selected = ctrl.tmpValue.map(x => ctrl.findOption(x));\n }\n });\n ctrl.updateValue = function() {\n ctrl.view2model(ctrl.selected.map(x => x.id));\n };\n ctrl.setValue = function(value) {\n ctrl.tmpValue = null;\n if (value !== null && typeof value !== 'undefined' && angular.isArray(value)) {\n if (ctrl.options !== null) {\n ctrl.selected = value.map(x => ctrl.findOption(x));\n } else {\n //Options not loaded yet\n ctrl.tmpValue = value;\n }\n } else {\n ctrl.selected = [];\n }\n };\n const translateLabels = function() {\n if (!ctrl.options) return;\n angular.forEach(ctrl.options, item => {\n if (item.id === guid.empty) {\n item.label = ctrl.emptyGuidLabel;\n return;\n }\n item.label = translateListFilter(item.key, ctrl.type, item.value);\n });\n ctrl.options.sort(dynamicSortMultiple('sort', 'label'));\n };\n const deregistration = $rootScope.$on('$translateChangeSuccess', translateLabels);\n $scope.$on('$destroy', deregistration);\n },\n ],\n };\n },\n]);\n","import angular from 'angular';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\n\nangular.module('cloudX').directive('cxEnumSelect', [\n function () {\n return {\n restrict: 'E',\n template:\n '' +\n '{{displayFunc({value:value}) || (value | translateList:type:labels[value])}}' +\n '' +\n '{{placeholder}}' +\n '{{displayValueIfNull}}' +\n '',\n scope: {\n value: '=data',\n type: '@',\n save: '&',\n afterSave: '&',\n displayFunc: '&?',\n disabled: '=?',\n placeholder: '=?',\n showPlaceholderIfNull: '=?',\n displayValueIfNull: '=?',\n orderByLabel: '@?',\n allowNull: '=?',\n hideItems: '=?',\n },\n controller: [\n '$scope',\n 'enumCacheSvc',\n 'translateListFilter',\n '$filter',\n function ($scope, enumCacheSvc, translateListFilter, $filter) {\n $scope.items = [];\n $scope.labels = {};\n\n enumCacheSvc.get($scope.type).then(function (data) {\n $scope.items = (\n $scope.hideItems && $scope.hideItems.length > 0\n ? data.filter((x) => !$scope.hideItems.includes(x.key))\n : data\n ).map((item) => ({\n ...item,\n label: $scope.displayFunc\n ? $scope.displayFunc({ value: item.key })\n : translateListFilter(item.key, $scope.type, item.value),\n }));\n\n $scope.items = $filter('orderBy')($scope.items, $scope.orderByLabel ? 'label' : 'key');\n if ($scope.allowNull) {\n $scope.items = [{ key: null, value: '', label: '' }, ...$scope.items];\n }\n\n $scope.labels = data.reduce(function (o, e) {\n o[e.key] = e.value;\n return o;\n }, {});\n });\n },\n ],\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('europeanOnly', [\n 'dataCache',\n function(dataCache) {\n return {\n restrict: 'A',\n link: function(scope, element, attr) {\n var tenantConfiguration = dataCache.getArray('tenantConfiguration');\n if (tenantConfiguration == 2) {\n element.remove();\n }\n },\n };\n },\n]);\n","import angular from 'angular';\nimport moment from 'moment';\n\nangular.module('cloudX').directive('cxExternalServiceLink', [\n function() {\n return {\n restrict: 'E',\n template: `\n \"{{tooltip}}\"/\n `,\n scope: {\n value: '=',\n relation: '='\n },\n controller: [\n '$rootScope',\n '$scope',\n '$http',\n 'appUrls',\n '$translate',\n 'translateListFilter',\n function($rootScope, $scope, $http, appUrls, $translate, translateListFilter) {\n var generateUrl = function() {\n $scope.url = '';\n $scope.imgSource = '';\n $scope.tooltip = '';\n\n $scope.tooltip = translateListFilter($scope.value.type, 'ExternalServiceLinkType', '');\n\n $scope.handleClick = async function() {\n const businessNumberFieldId = \"11cbb373-2ad8-496f-872f-f4a4be31b9a5\";\n const vatNumberFieldId = \"dfd0fd1c-8c4d-4e9e-be98-a79f26310960\";\n const kvkNumberFieldId = \"c7cc236a-1c66-4d35-88d9-ca8bb27872f2\";\n const nationalIdNumberFieldId = \"3b8e7746-100e-4e5c-930b-4de7628a574b\";\n const nameFieldId = \"ccb058e7-f972-4215-82f1-0efdd16deb7d\";\n\n let businessNumberValue = '';\n let vatNumberValue = '';\n let kvkNumberValue = '';\n let nationalIdNumberValue = '';\n let nameValue = '';\n\n if ($scope.relation && $scope.relation[businessNumberFieldId]) {\n businessNumberValue = $scope.relation[businessNumberFieldId].value;\n }\n if ($scope.relation && $scope.relation[vatNumberFieldId]) {\n vatNumberValue = $scope.relation[vatNumberFieldId].value;\n }\n if ($scope.relation && $scope.relation[kvkNumberFieldId]) {\n kvkNumberValue = $scope.relation[kvkNumberFieldId].value;\n }\n if ($scope.relation && $scope.relation[nationalIdNumberFieldId]) {\n nationalIdNumberValue = $scope.relation[nationalIdNumberFieldId].value;\n }\n if ($scope.relation && $scope.relation[nameFieldId]) {\n nameValue = $scope.relation[nameFieldId].value;\n }\n\n const params = {\n companyId: $scope.relation.companyId,\n relationId: $scope.relation.id,\n relationType: $scope.relation.type,\n enterpriseNr: businessNumberValue,\n kvkNumber: kvkNumberValue,\n vatNumber: vatNumberValue,\n nationalIdNumber: nationalIdNumberValue,\n name: nameValue,\n };\n\n switch ($scope.value.type) {\n case 10: // AccountingSoftware\n params.accountingSoftware = $scope.value.metadata;\n break;\n case 11: // OtherSoftware\n params.otherSoftware = $scope.value.metadata;\n break;\n case 6: // SocialSecretariat\n params.socialSecretariat = $scope.value.metadata;\n break;\n case 7: // SocialSecurityFund\n params.socialSecurityFund = $scope.value.metadata;\n break;\n default:\n params.externalServiceLinkType = $scope.value.type;\n params.metadata = $scope.value.metadata;\n break;\n }\n\n try {\n const response = await $http.get(`${appUrls.api}/api/relation/ExternalLink`, { params });\n $scope.url = response.data || '';\n } catch (error) {\n console.error('Error fetching external link:', error);\n }\n\n if ($scope.url) {\n const lang = $translate.use().toLowerCase().split('-')[0];\n $scope.url = $scope.url.replace('{lang}', lang);\n window.open($scope.url, '_blank');\n };\n }\n // different logos in separate folder per social secretariat\n if ($scope.value && $scope.value.type === 6 && $scope.value.metadata) {\n const socialSecretariat = parseInt($scope.value.metadata);\n $scope.imgSource = `https://image-storage.adminpulse.be/public/images/external-links/social-secretariats/${socialSecretariat}.png`;\n $scope.tooltip = `${$scope.tooltip}: ${translateListFilter(\n socialSecretariat,\n 'SocialSecretariat',\n '',\n )}`;\n } else if ($scope.value && $scope.value.type === 7 && $scope.value.metadata) {\n const socialSecurityFund = parseInt($scope.value.metadata);\n $scope.imgSource = `https://image-storage.adminpulse.be/public/images/external-links/social-security-funds/${socialSecurityFund}.png`;\n $scope.tooltip = `${$scope.tooltip}: ${translateListFilter(\n socialSecurityFund,\n 'SocialSecurityFund',\n '',\n )}`;\n } else if ($scope.value && $scope.value.type === 10 && $scope.value.metadata) {\n const accountingSoftware = parseInt($scope.value.metadata);\n $scope.imgSource = `https://image-storage.adminpulse.be/public/images/external-links/accounting-softwares/${accountingSoftware}.png`;\n $scope.tooltip = `${$scope.tooltip}: ${translateListFilter(\n accountingSoftware,\n 'AccountingSoftware',\n '',\n )}`;\n } else if ($scope.value && $scope.value.type === 11 && $scope.value.metadata) {\n const otherSoftware = parseInt($scope.value.metadata);\n $scope.imgSource = `https://image-storage.adminpulse.be/public/images/external-links/other-softwares/${otherSoftware}.png`;\n $scope.tooltip = `${$scope.tooltip}: ${translateListFilter(\n otherSoftware,\n 'OtherSoftware',\n '',\n )}`;\n } else {\n $scope.imgSource = `https://image-storage.adminpulse.be/public/images/external-links/${$scope.value.type}.png`;\n }\n };\n generateUrl();\n var deregistration = $rootScope.$on('$translateChangeSuccess', generateUrl);\n $scope.$on('$destroy', deregistration);\n },\n ],\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('noneEuropeanOnly', [\n 'dataCache',\n function(dataCache) {\n return {\n restrict: 'A',\n link: function(scope, element, attr) {\n var tenantConfiguration = dataCache.getArray('tenantConfiguration');\n if (tenantConfiguration != 2) {\n element.remove();\n }\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('fileDropzone', [\n 'flySvc',\n '$timeout',\n function(flySvc, $timeout) {\n return {\n restrict: 'A',\n scope: {\n showInput: '@',\n base64: '@',\n upload: '&',\n },\n link: function(scope, element, attrs, ctrl) {\n var draggingClass = 'dragover';\n var inputId = 'fileInput' + Math.random();\n var inputWrapper = angular.element(\n '
    ',\n );\n var input = angular.element('');\n input.addClass('form-control');\n inputWrapper.append(input);\n\n var canDrag = (function() {\n var div = document.createElement('div');\n return 'draggable' in div || ('ondragstart' in div && 'ondrop' in div);\n })();\n var isAdvancedUpload = (function() {\n return 'FormData' in window && 'FileReader' in window;\n })();\n scope.showInput = scope.showInput === 'true';\n scope.base64 = scope.base64 === 'true';\n /*\n Hack to stop flickering.\n DragLeave event is triggered when hovering over child elements.\n Adding small delay before removing class from element\n */\n const dragging = {\n timeout: null,\n };\n var processDragOverOrEnter = function(event) {\n if (event != null) {\n //Cancel DragLeave event\n if (dragging.timeout) clearTimeout(dragging.timeout);\n\n var dataTransfer = event.dataTransfer || event.originalEvent.dataTransfer;\n if (!dataTransfer || !dataTransfer.items) return false;\n if (attrs.disableDrop === 'true') {\n event.preventDefault();\n dataTransfer.effectAllowed = 'none';\n dataTransfer.dropEffect = 'none';\n return false;\n }\n var validType = false;\n for (var i = 0; i < dataTransfer.items.length; i++)\n if (\n dataTransfer.items[i].type !== 'undefined' &&\n isTypeValid(dataTransfer.items[i].type, false)\n )\n validType = true;\n if (!validType) {\n dataTransfer.dropEffect = 'none';\n return false;\n }\n event.preventDefault();\n\n if (\n (dataTransfer.types.contains && dataTransfer.types.contains('Files')) ||\n (dataTransfer.types.indexOf && dataTransfer.types.indexOf('Files') >= 0)\n ) {\n dataTransfer.effectAllowed = 'copy';\n dataTransfer.dropEffect = 'copy';\n element.addClass(draggingClass);\n } else {\n dataTransfer.effectAllowed = 'none';\n dataTransfer.dropEffect = 'none';\n }\n }\n return false;\n };\n var processDragLeaveOrEnd = function(event) {\n //Delay event\n dragging.timeout = window.setTimeout(function() {\n element.removeClass(draggingClass);\n dragging.timeout = null;\n }, 200);\n return false;\n };\n var validMimeTypes = attrs.fileDropzone;\n if (validMimeTypes) {\n input.attr('accept', validMimeTypes.replace(/[\\[\\]]/g, ''));\n }\n\n var checkSize = function(size) {\n var ref;\n if (\n (ref = attrs.maxFileSize) === void 0 ||\n ref === '' ||\n size / 1024 / 1024 < attrs.maxFileSize\n ) {\n return true;\n } else {\n $timeout(function() {\n flySvc.error(18, [\n attrs.maxFileSize + ' MB',\n (size / 1024 / 1024).toFixed(2) + ' MB',\n ]);\n }, 0);\n return false;\n }\n };\n var isTypeValid = function(type, showAlert) {\n if (showAlert === void 0) showAlert = true;\n if (\n validMimeTypes === void 0 ||\n validMimeTypes === '' ||\n validMimeTypes.indexOf(type) > -1\n ) {\n return true;\n } else {\n if (showAlert)\n $timeout(function() {\n flySvc.error(2022, [attrs.fileTypeDesc ? attrs.fileTypeDesc : validMimeTypes]);\n }, 0);\n return false;\n }\n };\n var setFile = function(file) {\n var reader = new FileReader();\n reader.onload = function(evt) {\n if (checkSize(file.size) && isTypeValid(file.type)) {\n $timeout(function() {\n scope.upload({\n file: {\n name: file.name,\n data: scope.base64 ? evt.target.result : file,\n size: file.size,\n type: file.type,\n },\n });\n }, 0);\n }\n };\n reader.readAsDataURL(file);\n };\n var setFiles = function(files) {\n if (!files.length) return;\n if (typeof attrs.allowMultiple === 'undefined' || attrs.allowMultiple === 'false')\n setFile(files[0]);\n else for (var i = 0; i < files.length; i++) setFile(files[i]);\n };\n\n if (scope.showInput || !canDrag) {\n element.append(inputWrapper);\n input.bind('change', function(event) {\n if (event && event.target) {\n if (event.target.files) setFiles(event.target.files);\n event.target.value = '';\n }\n });\n }\n if (canDrag) {\n element.bind('dragover', processDragOverOrEnter);\n\n element.bind('dragenter', processDragOverOrEnter);\n element.bind('dragleave', processDragLeaveOrEnd);\n element.bind('dragend', processDragLeaveOrEnd);\n element.bind('drop', function(event) {\n element.removeClass(draggingClass);\n if (event != null) {\n var dataTransfer = event.dataTransfer || event.originalEvent.dataTransfer;\n if (!dataTransfer) return false;\n if (attrs.disableDrop === 'true') {\n event.preventDefault();\n return false;\n }\n event.preventDefault();\n if (\n !(\n (dataTransfer.types.contains && dataTransfer.types.contains('Files')) ||\n (dataTransfer.types.indexOf && dataTransfer.types.indexOf('Files') >= 0)\n )\n )\n return false;\n if (dataTransfer.files.length <= 0) return false;\n setFiles(dataTransfer.files);\n }\n return false;\n });\n }\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('fileUpload', [\n '$timeout',\n function($timeout) {\n return {\n template:\n '' +\n '',\n transclude: true,\n scope: {\n upload: '&',\n base64: '@',\n allow: '@?',\n singleFile: '@?',\n },\n link: function(scope, element) {\n var fileInput = element.children('input');\n scope.base64 = scope.base64 === 'true';\n fileInput.on('change', function(event) {\n if (!event.target.files) return;\n if (event.target.files.length < 1) return;\n\n var files = [];\n\n for (var i = 0; i < event.target.files.length; i++) {\n var file = event.target.files[i];\n if (file === null) return;\n\n files.push({\n name: file.name,\n data: file,\n size: file.size,\n type: file.type,\n });\n }\n $timeout(function() {\n scope.upload({\n files: files,\n });\n }, 0);\n\n fileInput[0].value = null;\n });\n\n //Needed for using this directive on tags\n fileInput.on('click', function(e) {\n e.stopPropagation();\n });\n\n if (\n typeof scope.singleFile !== 'undefined' &&\n (scope.singleFile === '' || scope.singleFile === 'true')\n ) {\n fileInput.removeAttr('multiple');\n } else {\n fileInput.attr('multiple', 'multiple');\n }\n\n element.on('click', function(e) {\n fileInput[0].click();\n });\n },\n };\n },\n]);\n","import angular from 'angular';\nimport EmployeeFilterService from '@/shared/services/EmployeeFilterService';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\n\nangular.module('cloudX').component('savedFiltersButton', {\n bindings: {\n screen: '@',\n currentFilters: '<',\n defaultFilters: '<',\n onFilterChanged: '&',\n dynamicFilters: '<',\n onDynamicFiltersChanged: '&',\n },\n controller: [\n '$timeout',\n 'dialogsSvc',\n 'flySvc',\n function($timeout, dialogsSvc, flySvc) {\n const ctrl = this;\n ctrl.savedFilters = [];\n ctrl.selectedFilter = null;\n ctrl.hasSavedFilters = false;\n ctrl.showReset = false;\n ctrl.previousFilters = {};\n\n ctrl.reloadSavedFilters = function() {\n ctrl.savedFilters = EmployeeFilterService.getScreenFilters(ctrl.screen)\n .map(x => ({\n ...x,\n // Parse json and apply them to the default filters (in case there is a new filter)\n filter: { ...(ctrl.defaultFilters || {}), ...(JSON.parse(x.json) || {}) },\n }))\n .sort(dynamicSort('name'));\n ctrl.hasSavedFilters = ctrl.savedFilters.length > 0;\n if (ctrl.selectedFilter && ctrl.selectedFilter.id)\n ctrl.selectedFilter = ctrl.savedFilters.find(x => x.id === ctrl.selectedFilter.id);\n\n ctrl.calculateViewProps(true);\n };\n\n ctrl.calculateViewProps = function(force) {\n const currentJson = JSON.stringify(ctrl.currentFilters);\n //Set helper props to use in template\n if (force || currentJson !== JSON.stringify(ctrl.previousFilters)) {\n //Only do these checks if the filters have changed\n\n ctrl.showReset = currentJson !== JSON.stringify(ctrl.defaultFilters);\n\n if (ctrl.selectedFilter && currentJson !== JSON.stringify(ctrl.selectedFilter.filter)) {\n //Clear selected filter if the current filter doesn't match\n ctrl.selectedFilter = null;\n }\n\n if (!ctrl.selectedFilter && ctrl.showReset) {\n //Try finding matching filter\n ctrl.selectedFilter = ctrl.savedFilters.find(\n x => currentJson === JSON.stringify(x.filter),\n );\n }\n ctrl.previousFilters = { ...ctrl.currentFilters };\n }\n ctrl.dynamicFiltersAllSelected = !(ctrl.dynamicFilters || []).some(x => !x.selected);\n };\n ctrl.selectFilter = function(filter) {\n if (!filter) return;\n ctrl.selectedFilter = filter;\n ctrl.onFilterChanged({ $filters: { ...filter.filter } });\n };\n ctrl.resetFilters = function() {\n ctrl.onFilterChanged({ $filters: { ...ctrl.defaultFilters } });\n };\n ctrl.saveFilter = function() {\n dialogsSvc\n .showStringInput(\n 'SearchCriteriaNameInputTitle',\n 'SearchCriteriaNameInputMessage',\n 'SearchCriteriaNameInputPlaceholder',\n )\n .then(function(name) {\n if (!name) return;\n EmployeeFilterService.setFilter({\n screen: ctrl.screen,\n name,\n json: JSON.stringify(ctrl.currentFilters),\n }).then(filter => {\n if (filter) {\n $timeout(() => {\n flySvc.changesSaved();\n ctrl.reloadSavedFilters();\n ctrl.selectedFilter = ctrl.savedFilters.find(x => x.id === filter.id);\n }, 0);\n }\n });\n });\n };\n ctrl.deleteFilter = function(filter, $event) {\n $event.stopPropagation();\n $event.preventDefault();\n if (!filter || !filter.id) return;\n if (ctrl.selectedFilter && ctrl.selectedFilter.id === filter.id) {\n ctrl.selectedFilter = null;\n }\n EmployeeFilterService.deleteFilter(filter).then(() => {\n $timeout(() => {\n flySvc.changesSaved();\n ctrl.reloadSavedFilters();\n }, 0);\n });\n };\n ctrl.replaceFilter = (filter, $event) => {\n $event.stopPropagation();\n $event.preventDefault();\n if (!filter || !filter.id) return;\n const model = {\n ...filter,\n json: JSON.stringify(ctrl.currentFilters),\n };\n EmployeeFilterService.setFilter(model).then(updatedFilter => {\n if (updatedFilter) {\n $timeout(() => {\n flySvc.changesSaved();\n ctrl.reloadSavedFilters();\n }, 0);\n }\n });\n };\n ctrl.renameFilter = function(filter, $event) {\n $event.stopPropagation();\n $event.preventDefault();\n if (!filter || !filter.id) return;\n dialogsSvc\n .showStringInput(\n 'SearchCriteriaNameInputTitle',\n 'SearchCriteriaNameInputMessage',\n 'SearchCriteriaNameInputPlaceholder',\n filter.name,\n )\n .then(function(name) {\n if (!name) return;\n const model = { ...filter, name };\n EmployeeFilterService.setFilter(model).then(updatedFilter => {\n if (updatedFilter) {\n $timeout(() => {\n flySvc.changesSaved();\n ctrl.reloadSavedFilters();\n }, 0);\n }\n });\n });\n };\n ctrl.toggleAllDynamicFilters = function() {\n const selected = !ctrl.dynamicFiltersAllSelected;\n\n const dynamicFilters = ctrl.dynamicFilters.map(x => {\n if (!selected && !angular.equals(ctrl.currentFilters[x.id], ctrl.defaultFilters[x.id])) {\n return { ...x, selected: true }; // Keep used filter on screen\n }\n return { ...x, selected };\n });\n\n ctrl.onDynamicFiltersChanged({ $filters: dynamicFilters });\n };\n ctrl.toggleDynamicFilter = function(filter) {\n const selected = filter.selected;\n const dynamicFilters = ctrl.dynamicFilters.map(x => {\n if (x.id === filter.id) return { ...x, selected };\n return x;\n });\n ctrl.onDynamicFiltersChanged({ $filters: dynamicFilters });\n if (\n !selected &&\n !angular.equals(ctrl.currentFilters[filter.id], ctrl.defaultFilters[filter.id])\n ) {\n // Reset filter when it's removed\n ctrl.onFilterChanged({\n $filters: { ...ctrl.currentFilters, [filter.id]: ctrl.defaultFilters[filter.id] },\n });\n }\n };\n ctrl.$doCheck = function() {\n ctrl.calculateViewProps();\n };\n EmployeeFilterService.load().then(function() {\n //Wrap in timeout because the promise doesn't run in angular context\n $timeout(() => {\n ctrl.reloadSavedFilters();\n }, 0);\n });\n },\n ],\n template: `
    \n \n \n
    0\">\n \n
      \n
    • \n \n \n \n \n
    • \n
    • \n \n \n \n \n
    • \n
    \n
    \n \n
    `,\n});\n","import angular from 'angular';\n\nangular.module('commonServices').directive('cxFocusThis', [\n '$parse',\n '$timeout',\n function($parse, $timeout) {\n return {\n // Put a watch on the boolean passed with the attribute and when it is set to true, put focus on the element\n link: function(scope, element, attrs) {\n var model = $parse(attrs.cxFocusThis);\n scope.$watch(model, function(value) {\n if (value === true) {\n $timeout(function() {\n element[0].focus();\n }, 100);\n }\n });\n // To set searching to false on blur (When clicking outside searchfield, the searchbox disappears)\n //element.bind('blur', function () {\n // console.log('blur');\n // scope.$apply(model.assign(scope, false));\n //});\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('formKeyCommands', [\n '$parse',\n function($parse) {\n return {\n restrict: 'A',\n require: 'form',\n link: function($scope, $element, $attr, $form) {\n if (!$form) return;\n //Parse ng-cancel attribute\n var fn = $parse($attr.ngCancel);\n //Add cancel function to form controller\n $form.cancel = function() {\n fn($scope, {});\n };\n\n $element.on('keyup', function(event) {\n if (event.keyCode === 27) {\n //escape\n $scope.$apply($form.cancel);\n } else if (event.keyCode === 13) {\n if ($form.$valid) $element.triggerHandler('submit'); //Trigger ng-submit\n }\n });\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxGenderXedit', [\n function() {\n return {\n restrict: 'E',\n template:\n '' +\n 'MaleFemaleNon-binary' +\n '',\n scope: {\n value: '=data',\n save: '&',\n disabled: '=?',\n },\n controller: [\n '$scope',\n '$rootScope',\n '$translate',\n function($scope, $rootScope, $translate) {\n function mapOptions() {\n $scope.items = [\n {\n key: 'M',\n label: $translate.instant('Male'),\n },\n {\n key: 'F',\n label: $translate.instant('Female'),\n },\n {\n key: 'N',\n label: $translate.instant('Non-binary'),\n },\n ];\n }\n\n mapOptions();\n var deregistration = $rootScope.$on(\n '$translateChangeSuccess',\n mapOptions,\n );\n $scope.$on('$destroy', deregistration);\n },\n ],\n };\n },\n]);\n","import angular from 'angular';\nimport moment from 'moment';\n\nangular.module('cloudX').directive('cxGeneralMeeting', [\n '$q',\n 'ModalService',\n function($q, ModalService) {\n return {\n restrict: 'E',\n replace: true,\n scope: {\n onbeforesave: '&',\n onaftersave: '&',\n oncancel: '&',\n disabled: '=?',\n relationId: '=',\n },\n template: require('./generalMeeting.html'),\n require: ['ngModel'],\n link: function($scope, element, attrs, ctrl) {\n var ngModel = ctrl[0];\n $scope.showValidation = false;\n $scope.prefix = $scope.$id;\n // ReSharper disable once CoercedEqualsUsing\n $scope.isXeditable = (attrs.xeditable || false) == 'true';\n $scope.isFormOpen = !$scope.isXeditable;\n $scope.saving = false;\n\n $scope.submit = function(value) {\n if ($scope.saving) return;\n $scope.saving = true;\n return $q\n .when(\n $scope.onbeforesave({\n $data: value,\n }),\n )\n .then(function(result) {\n if (typeof result !== 'undefined' && !!result) {\n if (value.date != null) {\n if (typeof value.date === 'string')\n value.date = moment.utc(value.date.substr(0, 10)).toDate();\n }\n ngModel.$setViewValue(value);\n $scope.gm = angular.extend(\n {\n type: 0,\n date: null,\n week: null,\n day: null,\n month: null,\n fallback: 0,\n isSaturdayWorkDay: false,\n },\n value,\n );\n if ($scope.isXeditable) $scope.isFormOpen = false;\n $scope.onaftersave({\n $data: value,\n });\n return;\n }\n })\n .finally(function() {\n $scope.saving = false;\n });\n };\n\n $scope.save = function() {\n if ($scope.gmForm.$invalid) return false;\n var data = angular.copy($scope.gm);\n return $scope.submit(data);\n };\n\n $scope.undo = function() {\n ngModel.$rollbackViewValue();\n if ($scope.isXeditable) $scope.isFormOpen = false;\n $scope.oncancel();\n };\n\n $scope.setDateType = function(type) {\n $scope.gm.type = type;\n };\n\n ngModel.$render = function() {\n $scope.gm = angular.extend(\n {\n type: 0,\n date: null,\n week: null,\n day: null,\n month: null,\n fallback: 0,\n isSaturdayWorkDay: false,\n },\n ngModel.$viewValue,\n );\n if ($scope.gm.fallback === null) $scope.gm.fallback = 0;\n if (!$scope.gm.type) $scope.gm.type = 0;\n };\n },\n };\n },\n]);\n","import { dynamicSortMultiple } from '@/shared/utils/dynamicSort';\nimport angular from 'angular';\nimport { type } from 'os';\n\nangular.module('cloudX').directive('cxGroupedTypeaheadDropdown', [\n '$parse',\n '$timeout',\n function($parse, $timeout) {\n return {\n restrict: 'E',\n replace: true,\n template: `\n
    \n
    \n \n
    \n \n \n
    \n
    \n \n \n
    `,\n require: 'ngModel',\n scope: {\n //mdl: '=ngModel',\n orgOptions: '=options',\n groupProp: '@group',\n label: '@',\n allowInvalidInitialItem: '@?',\n labelFunc: '&?',\n autoSelect: '@?',\n disabled: '=?ngDisabled',\n placeholder: '@?',\n disabledtitle: '@?',\n showClearButton: '@?',\n inputId: '@?',\n iClass: '@?',\n },\n link: function(scope, el, attrs, ngModel) {\n if (!ngModel) return;\n //Default values\n scope.allowInvalid = angular.isDefined(attrs.allowInvalid)\n ? $parse(attrs.allowInvalid)(scope)\n : false;\n scope.selectOnBlur = angular.isDefined(attrs.selectOnBlur)\n ? $parse(attrs.selectOnBlur)(scope)\n : true;\n scope.selectOnExact = angular.isDefined(attrs.selectOnExact)\n ? $parse(attrs.selectOnExact)(scope)\n : true;\n scope.limit = attrs.limit || 10;\n\n scope.view2model = function(value) {\n ngModel.$setViewValue(value);\n };\n\n function findSelected(value) {\n return value == null || !scope.options.length\n ? null\n : scope.options.find(function(el) {\n if (el.isGroup) return false;\n //Search on label if scope.value is string\n if (\n typeof el.value !== 'string' &&\n typeof value === 'string' &&\n typeof el.label === 'string'\n )\n return el.label === value;\n\n //Match by id\n if (\n typeof el.value === 'object' &&\n typeof value === 'object' &&\n typeof el.value.id === 'string' &&\n typeof value.id === 'string'\n )\n return angular.equals(el.value.id, value.id);\n return angular.equals(el.value, value);\n });\n }\n\n // when angular detects a change to the model,\n // we update our inner value\n ngModel.$render = function() {\n scope.value = ngModel.$viewValue;\n var selectedItem = findSelected(scope.value);\n if (selectedItem) {\n scope.selected = selectedItem;\n } else if (scope.allowInvalidInitialItem) {\n scope.value = getLabel(scope.value);\n scope.selected = scope.value;\n } else {\n scope.selected = scope.value;\n }\n };\n\n var getLabel = function(item) {\n if (!item) return null;\n if (scope.labelFunc)\n return scope.labelFunc({\n item: item,\n });\n if (!scope.label) return item;\n return item[scope.label];\n };\n scope.onSelect = function(i, $event) {\n if (i && i.isGroup) {\n if ($event) {\n $event.preventDefault();\n $event.stopPropagation();\n if ($event.target) {\n //Little hacky, but only way to clear input again when selecting group item...\n $timeout(() => {\n $event.target.value = '';\n }, 100);\n }\n }\n scope.value = null;\n scope.seleted = null;\n\n scope.view2model(null);\n return;\n }\n scope.selected = i;\n scope.value = i != null ? i.value : null;\n scope.view2model(scope.value);\n };\n scope.clearSelected = function() {\n scope.onSelect(null);\n };\n\n function mapOptions() {\n const options = (!scope.orgOptions || !angular.isArray(scope.orgOptions)\n ? []\n : scope.orgOptions\n )\n .map(x => {\n const label = getLabel(x);\n const group = x[scope.groupProp || 'group'] || '';\n\n return {\n value: x,\n label,\n search: `${group};${label}`,\n group,\n isGroup: false,\n };\n })\n .sort(dynamicSortMultiple('group', 'label'));\n\n const grouped = options.reduce((groups, x) => {\n if (!groups[x.group]) groups[x.group] = [];\n groups[x.group].push(x);\n return groups;\n }, {});\n\n scope.options = Object.keys(grouped).flatMap(group => [\n {\n value: null,\n label: group,\n group: group,\n search: `${group};${grouped[group].map(x => x.label).join(';')}`,\n isGroup: true,\n },\n ...grouped[group],\n ]);\n scope.selected = findSelected(scope.value) || scope.value;\n }\n mapOptions();\n scope.$watchCollection('orgOptions', function(newValue, oldValue) {\n mapOptions();\n if (scope.autoSelect == 'true' && scope.options.length === 1 && !scope.selected)\n scope.onSelect(scope.options[0]);\n });\n\n scope.onChange = function() {\n if (scope.allowInvalid && typeof scope.selected === 'string') {\n scope.value = scope.selected;\n scope.view2model(scope.selected);\n }\n };\n //Clear textbox if value is not in option list\n scope.onBlur = function() {\n if (scope.selected == null) return;\n if (scope.allowInvalid && typeof scope.selected === 'string') {\n scope.value = scope.selected;\n scope.view2model(scope.selected);\n }\n if (!scope.allowInvalid && scope.options.indexOf(scope.selected) < 0)\n scope.onSelect(null);\n };\n },\n };\n },\n]);\n","import angular from 'angular';\n\n/**\n * Helper directive that runs bootstrap-hover-dropdown jQuery plugin on element\n */\nangular.module('commonServices').directive('hoverDropdown', [\n function() {\n return {\n link: function(scope, element, attrs) {\n if (typeof element.dropdownHover !== 'undefined')\n element.dropdownHover();\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxImageLoader', function() {\n return {\n restrict: 'A',\n link: function(scope, element) {\n var el = angular.element(\n '
    ' +\n '
    ' +\n '
    ' +\n '
    ' +\n '
    ',\n );\n el.insertAfter(element);\n element.on('loadstart', function() {\n if (element) element.hide();\n if (el) el.show();\n });\n element.on('load', function() {\n if (element) element.show();\n if (el) el.hide();\n });\n\n element.on('$destroy', function() {\n if (el) el.remove();\n el = null;\n });\n },\n };\n});\n","import angular from 'angular';\n\nangular.module('cloudX').directive('interactionTypeIcon', function() {\n return {\n restrict: 'E',\n replace: true,\n // template: ``,\n template: `\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n `,\n scope: {\n type: '@',\n },\n };\n});\n","import angular from 'angular';\nimport 'intl-tel-input';\n\nangular\n .module('cloudX')\n .constant('ipnConfig', {\n allowExtensions: false,\n autoFormat: true,\n autoHideDialCode: true,\n autoPlaceholder: true,\n customPlaceholder: null,\n defaultCountry: '',\n geoIpLookup: null,\n nationalMode: true,\n numberType: 'MOBILE',\n onlyCountries: [],\n preferredCountries: ['us', 'gb'],\n skipUtilScriptDownload: true,\n utilsScript: '',\n })\n .directive('internationalPhoneNumber', [\n '$timeout',\n 'ipnConfig',\n function($timeout, ipnConfig) {\n return {\n restrict: 'A',\n require: ['^ngModel', '^?bindErrors'],\n scope: {\n ngModel: '=',\n country: '=',\n },\n link: function(scope, element, attrs, ctrls) {\n var options = angular.copy(ipnConfig);\n angular.forEach(options, function(value, key) {\n if (!(attrs.hasOwnProperty(key) && angular.isDefined(attrs[key]))) return null;\n var option = attrs[key];\n\n if (key === 'preferredCountries') {\n return (options.preferredCountries = handleWhatsSupposedToBeAnArray(option));\n } else if (key === 'onlyCountries') {\n return (options.onlyCountries = handleWhatsSupposedToBeAnArray(option));\n } else if (typeof value === 'boolean') {\n return (options[key] = option === 'true');\n } else {\n return (options[key] = option);\n }\n });\n\n var intlOptions = {\n ...options,\n utilsScript: 'https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.0/js/utils.js',\n };\n\n // initialise plugin\n var telInputPlugin = window.intlTelInput(element[0], intlOptions);\n\n var ctrl = ctrls[0];\n\n var bindErrors = ctrls[1];\n var read = function() {\n return ctrl.$setViewValue(telInputPlugin.getNumber(1));\n //return ctrl.$setViewValue(element.val());\n };\n var handleWhatsSupposedToBeAnArray = function(value) {\n if (value instanceof Array) {\n return value;\n } else {\n return value\n .toString()\n .replace(/[ ]/g, '')\n .split(',');\n }\n };\n\n ctrl.$render = function() {\n if (\n ctrl.$modelValue !== null &&\n ctrl.$modelValue !== void 0 &&\n ctrl.$modelValue.length > 0\n )\n telInputPlugin.setNumber(ctrl.$modelValue);\n else element.val('');\n };\n\n scope.$watch('country', function(newValue) {\n if (newValue !== null && newValue !== void 0 && newValue !== '') {\n return telInputPlugin.setCountry(newValue);\n }\n });\n ctrl.$formatters.push(function(value) {\n if (!value) {\n return value;\n }\n return telInputPlugin.getNumber(1);\n });\n ctrl.$parsers.push(function(value) {\n if (!value) {\n return value;\n }\n var selectedCountry = telInputPlugin.getSelectedCountryData();\n if (!selectedCountry || value.indexOf('+' + selectedCountry.dialCode) !== 0)\n return telInputPlugin.getNumber(1); //1 international\n return value;\n });\n ctrl.$validators.internationalPhoneNumber = function(value) {\n var selectedCountry = telInputPlugin.getSelectedCountryData();\n if (!value || (selectedCountry && '+' + selectedCountry.dialCode === value)) {\n return true;\n }\n\n return telInputPlugin.isValidNumber();\n };\n if (bindErrors) {\n bindErrors.addError('internationalPhoneNumber', 'msgInvalidPhoneNumber');\n ctrl.$viewChangeListeners.push(function() {\n bindErrors.refreshErrors(ctrl.$error);\n });\n scope.$on('$destroy', function() {\n bindErrors.refreshErrors();\n });\n }\n element.on('blur keyup change countrychange', function() {\n return $timeout(read, 100);\n });\n\n return element.on('$destroy', function() {\n telInputPlugin.destroy();\n return element.off('blur keyup change countrychange');\n });\n },\n };\n },\n ]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxInvoiceExpiryDate', function() {\n return {\n restrict: 'E',\n replace: true,\n bindToController: {\n onbeforesave: '&',\n onaftersave: '&',\n },\n template: ``,\n require: ['ngModel', 'cxInvoiceExpiryDate'],\n link: function(scope, el, attrs, ctrl) {\n if (!ctrl || ctrl.length !== 2) return;\n var ngModel = ctrl[0];\n var controller = ctrl[1];\n\n controller.view2model = function(value) {\n ngModel.$setViewValue(value);\n };\n\n // when angular detects a change to the model,\n // we update our inner value\n ngModel.$render = function() {\n controller.setValue(ngModel.$viewValue);\n };\n },\n controllerAs: 'ctrl',\n controller: [\n '$q',\n function($q) {\n const ctrl = this;\n\n ctrl.setValue = function(value) {\n ctrl.value = angular.extend(\n {\n expiryDays: null,\n expiryType: null,\n },\n ctrl.value,\n value,\n );\n };\n ctrl.setValue(null);\n ctrl.submit = function($data, field) {\n if (ctrl.value && ctrl.value[field] === $data) return false;\n\n const value = angular.copy(ctrl.value);\n value[field] = $data;\n\n return $q\n .when(\n ctrl.onbeforesave({\n $data: value,\n }),\n )\n .then(function(result) {\n if (typeof result === 'string') return result;\n if (result !== false) {\n //Update model\n if (ctrl.view2model) {\n ctrl.view2model(value);\n }\n }\n ctrl.onaftersave({\n $data: value,\n });\n return result;\n });\n };\n },\n ],\n };\n});\n","import angular from 'angular';\nimport { dynamicSortMultiple } from '@/shared/utils/dynamicSort';\n\nconst invoiceTypeKeys = {\n 0: '33333333-3333-3333-3333-333333333333',\n 1: '44444444-4444-4444-4444-444444444444',\n 2: '55555555-5555-5555-5555-555555555555',\n};\n\nangular.module('cloudX').directive('cxInvoiceScheduleTypeCheckboxSelect', [\n 'enumCacheSvc',\n '$filter',\n '$rootScope',\n '$q',\n '$http',\n 'appUrls',\n function(enumCacheSvc, $filter, $rootScope, $q, $http, appUrls) {\n return {\n restrict: 'E',\n require: '^ngModel',\n template: `
    \n
    \n \n
    \n \n \n
    \n
    \n \n
    `,\n scope: {\n hideInvoicingVia: '@?',\n placeholder: '@?',\n },\n link: function(scope, el, attrs, ngModel) {\n if (!ngModel) return;\n scope.items = [];\n scope.initOnload = null;\n scope.displayValue = '';\n scope.ddwOpen = false;\n\n var deferred = $q.defer();\n $q.all([\n enumCacheSvc.get('invoicingType'),\n $http.get(`${appUrls.api}/api/invoiceschedule/get`, {\n timeout: deferred.promise,\n cancel: deferred,\n }),\n ]).then(([invoiceTypes, { data: invoiceSchedules }]) => {\n const fixedItems = [\n {\n key: '00000000-0000-0000-0000-000000000000',\n name: 'NoInvoicingSchedule',\n type: 1,\n sortKey: 1,\n },\n {\n key: '11111111-1111-1111-1111-111111111111',\n name: 'WithInvoicingSchedule',\n type: 1,\n sortKey: 2,\n },\n ];\n if (!scope.hideInvoicingVia) {\n fixedItems.push({\n key: '22222222-2222-2222-2222-222222222222',\n name: 'InvoicingViaRelations',\n type: 1,\n sortKey: 3,\n });\n }\n\n scope.items = [\n ...fixedItems,\n {\n key: 'separator1',\n type: -1,\n sortKey: 5,\n },\n ...invoiceTypes.map(x => ({\n ...x,\n id: x.key,\n key: invoiceTypeKeys[x.key],\n type: 2,\n sortKey: 6,\n })),\n {\n key: 'separator2',\n type: -1,\n sortKey: 7,\n },\n ...invoiceSchedules.map(x => ({\n key: x.id,\n name: x.name,\n type: 3,\n sortKey: 8,\n })),\n ].map(x => ({\n ...x,\n selected: scope.initOnload && scope.initOnload.indexOf(x.key) >= 0,\n }));\n translateLabels();\n });\n\n function translateItem(item) {\n if (item.type === 1) {\n switch (item.key[0]) {\n case '0':\n return $filter('translate')('NoInvoicingSchedule');\n case '1':\n return $filter('translate')('WithInvoicingSchedule');\n case '2':\n return $filter('translate')('InvoicingViaRelations');\n default:\n return '';\n }\n }\n if (item.type === 2) {\n return $filter('translateList')(item.id, 'invoicingtype', item.value);\n }\n if (item.type === 3) {\n return $filter('translateList')(item.key, 'invoiceschedule', item.name);\n }\n return '';\n }\n\n function translateLabels() {\n scope.items.forEach(function(item) {\n item.label = translateItem(item);\n });\n scope.setDisplayValue();\n }\n var deregistration = $rootScope.$on('$translateChangeSuccess', translateLabels);\n scope.$on('$destroy', deregistration);\n\n scope.toggleItem = function(item) {\n item.selected = !item.selected;\n scope.setDisplayValue();\n };\n\n scope.setDisplayValue = function() {\n scope.displayValue = scope.items\n .filter(x => x.selected)\n .sort(dynamicSortMultiple('sortKey', 'label'))\n .map(x => x.label)\n .join(', ');\n };\n scope.clearSelected = function() {\n if (scope.items) {\n scope.items.forEach(x => {\n x.selected = false;\n });\n }\n scope.displayValue = '';\n ngModel.$setViewValue([]);\n scope.ddwOpen = false;\n };\n\n scope.toggleDropDown = function(open) {\n if (!open) {\n const value = scope.items\n .filter(x => x.selected)\n .map(x => x.key)\n .sort();\n ngModel.$setViewValue(value);\n }\n };\n\n ngModel.$render = function() {\n const value = ngModel.$viewValue || [];\n if (scope.items && scope.items.length) {\n if (value.length) {\n scope.items.forEach(x => {\n x.selected = value && value.indexOf(x.key) >= 0;\n });\n scope.setDisplayValue();\n } else {\n scope.clearSelected();\n }\n } else {\n scope.initOnload = value;\n }\n };\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxJurisdictionSelect', [\n '$rootScope',\n '$filter',\n 'dataCache',\n function($rootScope, $filter, dataCache) {\n return {\n restrict: 'E',\n template:\n '' +\n '{{value | translateList:\\'jurisdiction\\'}}',\n scope: {\n value: '=data',\n save: '&',\n },\n link: function($scope) {\n var mapOptions = function() {\n $scope.placeholder =\n $filter('translateList')(null, 'jurisdiction') || '';\n $scope.options = dataCache.getArray('jurisdiction').map(function(c) {\n return {\n id: c.id,\n label: $filter('translateList')(c.id, 'jurisdiction', c.name),\n };\n });\n };\n\n mapOptions();\n var deregistration = $rootScope.$on(\n '$translateChangeSuccess',\n mapOptions,\n );\n $scope.$on('$destroy', deregistration);\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxLanguage', [\n 'optionsSvc',\n function(optionsSvc) {\n return {\n restrict: 'E',\n replace: true,\n template:\n '',\n scope: {\n placeholder: '@',\n },\n controller: [\n '$scope',\n function($scope) {\n $scope.languages = optionsSvc.getOptions('language');\n },\n ],\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxLanguageSelect', [\n function() {\n return {\n restrict: 'E',\n template:\n '' +\n \"{{language | translateList:'language'}}\",\n scope: {\n language: '=data',\n save: '&',\n disabled: '=?',\n },\n controller: [\n '$scope',\n 'optionsSvc',\n function($scope, optionsSvc) {\n $scope.languages = optionsSvc.getOptions('language');\n },\n ],\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxLegalFormPicker', [\n '$filter',\n '$rootScope',\n 'dataCache',\n function($filter, $rootScope, dataCache) {\n return {\n restrict: 'E',\n replace: true,\n scope: true,\n template: `
    \n \n \n \n
    `,\n require: 'ngModel',\n link: function($scope, el, attrs, ngModel) {\n if (!ngModel) return;\n $scope.selected = [];\n $scope.options = [];\n var findOption = function(code) {\n if (code == null || $scope.options.length === 0) return null;\n return $scope.options.find(function(el) {\n return el.id === code;\n });\n };\n\n var options = dataCache.getArray('legalForm');\n var mapOptions = function() {\n $scope.options = options.map(function(c) {\n return {\n id: c.id,\n label: $filter('translateList')(c.id, 'legalForm', c.description),\n };\n });\n };\n\n mapOptions();\n var deregistration = $rootScope.$on('$translateChangeSuccess', mapOptions);\n $scope.$on('$destroy', deregistration);\n\n $scope.getSuggestions = function(search) {\n return $filter('filter')($scope.options, search);\n };\n\n $scope.updateValue = function() {\n ngModel.$setViewValue($scope.selected.map(x => x.id));\n };\n\n ngModel.$render = function() {\n var value = ngModel.$viewValue;\n if (value !== null && typeof value !== 'undefined' && angular.isArray(value)) {\n $scope.selected = value.map(x => findOption(x));\n }\n };\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxLegalFormSelect', function() {\n return {\n restrict: 'E',\n template:\n ' {{value | translateList:\\'legalForm\\'}} ' +\n ' ',\n scope: {\n value: '=data',\n beforeSave: '&',\n afterSave: '&',\n disabled: '=?',\n },\n };\n});\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxLegalFormTypeahead', [\n '$filter',\n '$rootScope',\n 'dataCache',\n function($filter, $rootScope, dataCache) {\n return {\n restrict: 'E',\n replace: true,\n template:\n '
    ' +\n '
    ' +\n ' ' +\n ' ' +\n ' ' +\n ' ' +\n '
    ' +\n ' ' +\n '
    ',\n require: 'ngModel',\n link: function($scope, el, attrs, ngModel) {\n if (!ngModel) return;\n\n var options = dataCache.getArray('legalForm');\n $scope.limit = $scope.$eval(attrs.limit) || 10;\n $scope.selectOnBlur = angular.isDefined(attrs.selectOnBlur)\n ? $scope.$eval(attrs.selectOnBlur) || attrs.selectOnBlur\n : true;\n $scope.selectOnExact = angular.isDefined(attrs.selectOnExact)\n ? $scope.$eval(attrs.selectOnExact) || attrs.selectOnExact\n : true;\n\n var findOption = function(code) {\n if (code == null || $scope.options.length === 0) return null;\n return $scope.options.find(function(el) {\n return el.id === code;\n });\n };\n\n var mapOptions = function() {\n $scope.placeholder = $filter('translateList')(null, 'legalForm');\n $scope.options = options.map(function(c) {\n return {\n id: c.id,\n label: $filter('translateList')(c.id, 'legalForm', c.description),\n };\n });\n $scope.selected = findOption($scope.value);\n };\n\n mapOptions();\n var deregistration = $rootScope.$on('$translateChangeSuccess', mapOptions);\n $scope.$on('$destroy', deregistration);\n\n $scope.onSelect = function(item) {\n $scope.selected = item;\n $scope.value = item.id;\n ngModel.$setViewValue(item.id);\n };\n $scope.onBlur = function() {\n if ($scope.selected != null && $scope.selected.id != null) return;\n $scope.value = null;\n $scope.selected = null;\n ngModel.$setViewValue(null);\n };\n\n ngModel.$render = function() {\n $scope.value = ngModel.$viewValue;\n $scope.selected = findOption($scope.value);\n };\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('limitDigits', [\n '$parse',\n function($parse) {\n var directive = {\n restrict: 'A',\n require: ['ngModel'],\n link: link,\n priority: 2, //After percentageDrv\n };\n return directive;\n\n function link(scope, element, attr, ctrls) {\n var ngModelController = ctrls[0];\n ngModelController.$parsers.push(function(viewValue) {\n if (\n typeof viewValue === 'undefined' ||\n viewValue === null ||\n isNaN(viewValue)\n )\n return viewValue;\n var value = viewValue.trunc(attr.limitDigits);\n if (value !== viewValue.round(10)) {\n var formatters = ngModelController.$formatters,\n idx = formatters.length;\n var newViewValue = value;\n while (idx--) {\n newViewValue = formatters[idx](newViewValue);\n }\n ngModelController.$setViewValue(newViewValue);\n ngModelController.$render();\n }\n return value;\n });\n }\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('moveCaretOnFocus', [\n '$timeout',\n function($timeout) {\n function setCaretPosition(elem, caretPos) {\n if (!elem) return;\n if (elem.createTextRange) {\n var range = elem.createTextRange();\n range.move('character', caretPos);\n range.select();\n } else if (elem.selectionStart) {\n elem.setSelectionRange(caretPos, caretPos);\n }\n }\n\n return {\n restrict: 'A',\n link: function(scope, element, attrs) {\n var focusedElement = null;\n var pos = parseInt(\n scope.$eval(attrs.moveCaretOnFocus) || attrs.moveCaretOnFocus,\n );\n\n var onFocus = function() {\n var self = this;\n if (focusedElement !== self) {\n focusedElement = self;\n $timeout(function() {\n if (focusedElement) setCaretPosition(focusedElement, pos);\n }, 10);\n }\n };\n var onBlur = function() {\n focusedElement = null;\n };\n\n element.on('focus', onFocus);\n element.on('blur', onBlur);\n\n //Cleanup events if the element is destroyed\n element.on('$destroy', function() {\n element.off('focus', onFocus);\n element.off('blur', onBlur);\n focusedElement = null;\n });\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('myCurrentTime', [\n '$interval',\n 'dateFilter',\n function($interval, dateFilter) {\n // return the directive link function. (compile function not needed)\n return function(scope, element, attrs) {\n var format, // date format\n stopTime; // so that we can cancel the time updates\n\n // used to update the UI\n function updateTime() {\n element.text(dateFilter(new Date(), format));\n }\n\n // watch the expression, and update the UI on change.\n scope.$watch(attrs.myCurrentTime, function(value) {\n format = value;\n updateTime();\n });\n\n stopTime = $interval(updateTime, 1000);\n\n // listen on DOM destroy (removal) event, and cancel the next UI update\n // to prevent updating time after the DOM element was removed.\n element.on('$destroy', function() {\n $interval.cancel(stopTime);\n });\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('myDate', function() {\n return function(scope, element) {\n element.bind('click', function() {\n alert('change on' + element);\n });\n };\n});\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxOptionTypeaheadDropdown', function() {\n return {\n restrict: 'E',\n replace: true,\n template:\n '
    ' +\n '
    ' +\n ' ' +\n ' ' +\n ' ' +\n ' ' +\n '
    ' +\n ' ' +\n '
    ',\n require: ['ngModel', 'cxOptionTypeaheadDropdown'],\n link: function(scope, el, attrs, ctrl) {\n if (!ctrl || ctrl.length !== 2) return;\n var ngModel = ctrl[0];\n var controller = ctrl[1];\n\n scope.option = scope.$eval(attrs.option) || attrs.option || '';\n scope.limit = scope.$eval(attrs.limit) || 10;\n scope.selectOnBlur = angular.isDefined(attrs.selectOnBlur)\n ? scope.$eval(attrs.selectOnBlur) || attrs.selectOnBlur\n : true;\n scope.selectOnExact = angular.isDefined(attrs.selectOnExact)\n ? scope.$eval(attrs.selectOnExact) || attrs.selectOnExact\n : true;\n\n scope.options = [];\n\n scope.view2model = function(value) {\n ngModel.$setViewValue(value);\n };\n\n // when angular detects a change to the model,\n // we update our inner value\n ngModel.$render = function() {\n scope.value = ngModel.$viewValue;\n scope.selected =\n scope.value == null || !scope.options.length\n ? null\n : scope.options.find(function(el) {\n return el.id === scope.value;\n });\n };\n\n controller.init();\n },\n controller: [\n '$scope',\n '$rootScope',\n '$filter',\n 'optionsSvc',\n function($scope, $rootScope, $filter, optionsSvc) {\n $scope.onSelect = function(i) {\n $scope.selected = i;\n $scope.value = i.id;\n $scope.view2model(i.id);\n };\n //Clear textbox if value is not in option list\n $scope.onBlur = function() {\n if ($scope.selected != null && $scope.selected.id != null) return;\n $scope.selected = null;\n $scope.value = null;\n $scope.view2model(null);\n };\n\n function mapOptions() {\n var options = optionsSvc.getOptions($scope.option);\n $scope.placeholder = $filter('translateList')(null, $scope.option);\n\n $scope.options = options.map(function(val) {\n return {\n id: val,\n label: $filter('translateList')(val, $scope.option, val),\n };\n });\n $scope.selected =\n $scope.value == null\n ? null\n : $scope.options.find(function(el) {\n return el.id === $scope.value;\n });\n }\n\n this.init = function() {\n mapOptions();\n };\n var deregistration = $rootScope.$on('$translateChangeSuccess', mapOptions);\n $scope.$on('$destroy', deregistration);\n },\n ],\n };\n});\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxOptionXedit', function() {\n return {\n restrict: 'E',\n template:\n ' {{value | translateList:option}} ' +\n ' ',\n scope: {\n value: '=data',\n option: '@',\n beforeSave: '&?',\n afterSave: '&?',\n },\n controller: [\n '$scope',\n '$rootScope',\n '$filter',\n 'optionsSvc',\n function($scope, $rootScope, $filter, optionsSvc) {\n if (angular.isUndefined($scope.beforeSave))\n $scope.beforeSave = angular.noop;\n if (angular.isUndefined($scope.afterSave))\n $scope.afterSave = angular.noop;\n\n function mapOptions() {\n var options = optionsSvc.getOptions($scope.option) || [];\n $scope.options = options.map(function(val) {\n return {\n id: val,\n label: $filter('translateList')(val, $scope.option, val),\n };\n });\n }\n mapOptions();\n var deregistration = $rootScope.$on(\n '$translateChangeSuccess',\n mapOptions,\n );\n $scope.$on('$destroy', deregistration);\n },\n ],\n };\n});\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxPercentage', function() {\n var directive = {\n restrict: 'A',\n require: ['ngModel'],\n link: link,\n priority: 1,\n };\n return directive;\n\n function link(scope, element, attr, ctrls) {\n var ngModelController = ctrls[0];\n ngModelController.$parsers.push(function(viewValue) {\n if (viewValue === null) return null;\n return (viewValue / 100.0).round(10);\n });\n\n ngModelController.$formatters.push(function(modelValue) {\n if (modelValue === null) return null;\n return (modelValue * 100.0).round(10); //TFS #10887\n });\n }\n});\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxPostAddressForm', [\n '$q',\n 'optionsSvc',\n function($q, optionsSvc) {\n return {\n restrict: 'E',\n replace: true,\n scope: {\n onbeforesave: '&',\n onaftersave: '&',\n oncancel: '&',\n isRequired: '=?required',\n iClass: '@?',\n labelSeparator: '=?',\n labelHideCountry: '@?',\n hideStreet2: '@?',\n hideButtons: '@?',\n disabled: '=?',\n id: '@',\n },\n template:\n '
    ' +\n '' +\n ' ' +\n '
    ' +\n '' +\n '' +\n '' +\n '' +\n '' +\n '' +\n '' +\n '' +\n '' +\n '' +\n '' +\n '' +\n '' +\n '' +\n '' +\n '' +\n '' +\n '' +\n '' +\n '
    ' +\n '' +\n '' +\n '
    ' +\n '
    ' +\n '
    ',\n require: ['ngModel'],\n link: function($scope, element, attrs, ctrl) {\n var ngModel = ctrl[0];\n $scope.showValidation = false;\n $scope.saving = false;\n\n $scope.isXeditable = (attrs.xeditable || false) == 'true';\n $scope.isFormOpen = !$scope.isXeditable;\n\n $scope.zipcodes = optionsSvc.getOptions('zipCodes');\n $scope.zipcodeChanged = function(field, $item) {\n if (!$item || !$item.code || !$item.name) return;\n if (field === 0) $scope.address.city = $item.name;\n if (field === 1) $scope.address.zipCode = $item.code;\n };\n\n $scope.save = function() {\n if ($scope.addressForm.$invalid) return false;\n console.log($scope.saving);\n $scope.saving = true;\n return $q\n .when(\n $scope.onbeforesave({\n $data: $scope.address,\n }),\n )\n .then(function(result) {\n $scope.saving = false;\n if (typeof result === 'undefined' || result == 'true') {\n ngModel.$setViewValue($scope.address);\n if ($scope.isXeditable) $scope.isFormOpen = false;\n $scope.onaftersave({\n $data: $scope.address,\n });\n return;\n }\n\n if (result != 'true') {\n if ($scope.isXeditable) $scope.isFormOpen = false;\n $scope.onaftersave({\n $data: $scope.address,\n });\n }\n });\n };\n\n $scope.undo = function() {\n ngModel.$rollbackViewValue();\n if ($scope.isXeditable) $scope.isFormOpen = false;\n $scope.oncancel();\n };\n\n ngModel.$render = function() {\n // no save button: parent is responsible for saving\n if ($scope.hideButtons) {\n $scope.address = ngModel.$viewValue;\n } else {\n $scope.address = angular.copy(ngModel.$viewValue);\n }\n };\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxPriceGridSelect', [\n function() {\n return {\n restrict: 'E',\n template:\n '' +\n '{{getDisplayValue()}}' +\n '',\n scope: {\n value: '=data',\n save: '&',\n disabled: '=',\n },\n controller: [\n '$scope',\n '$http',\n 'appUrls',\n '$translate',\n function($scope, $http, appUrls, $translate) {\n $scope.grids = [];\n $http.get(appUrls.api + '/api/price/Grid').then(function({ data }) {\n $scope.grids = data.map(x => ({\n ...x,\n name: x.name === 'Default' ? $translate.instant('Default') : x.name,\n }));\n if ($scope.value) {\n const grid = data.find(x => x.id === $scope.value);\n $scope.displayValue = grid ? grid.name : null;\n }\n return data;\n });\n $scope.getDisplayValue = () => {\n if (!$scope.value || !$scope.grids) return null;\n const grid = $scope.grids.find(x => x.id === $scope.value);\n return grid ? grid.name : null;\n };\n },\n ],\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxRecentRelationsBar', [\n function() {\n return {\n restrict: 'E', //replace: true,\n template: require('./recentRelationsBar.html'),\n scope: true,\n\n controller: [\n '$scope',\n 'dataCache',\n 'relBindSvc',\n 'recentRelationsSvc',\n function($scope, dataCache, relBindSvc, recentRelationsSvc) {\n $scope.recentRelationsSvc = recentRelationsSvc;\n $scope.open = relBindSvc.open;\n },\n ],\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxRelationTypeButtonGroup', [\n 'enumCacheSvc',\n '$filter',\n '$rootScope',\n function(enumCacheSvc, $filter, $rootScope) {\n return {\n restrict: 'E',\n replace: true,\n template: `
    \n \n
    `,\n scope: {\n placeholder: '@?',\n },\n require: 'ngModel',\n link: function($scope, el, attrs, ngModel) {\n if (!ngModel) return;\n\n $scope.items = [];\n $scope.selectedTypes = [];\n\n enumCacheSvc.get('relationType').then(function(data) {\n $scope.items = data.map(x => ({ id: x.key, value: x.value, label: x.value }));\n translateLabels();\n });\n function translateLabels() {\n $scope.items.forEach(function(item) {\n item.label = $filter('translateList')(item.id, 'relationType', item.value);\n });\n }\n var deregistration = $rootScope.$on('$translateChangeSuccess', translateLabels);\n $scope.$on('$destroy', deregistration);\n\n $scope.toggleRelationType = function(relType) {\n const idx = $scope.selectedTypes.indexOf(relType);\n if (idx >= 0) {\n $scope.selectedTypes.splice(idx, 1);\n } else {\n $scope.selectedTypes.push(relType);\n }\n ngModel.$setViewValue([...$scope.selectedTypes]);\n };\n\n ngModel.$render = function() {\n var value = ngModel.$viewValue;\n if (value !== null && typeof value !== 'undefined') {\n $scope.selectedTypes = [...value];\n }\n };\n },\n };\n },\n]);\n","import angular from 'angular';\nimport classNames from 'classnames';\nimport { getRelationIconClass } from '@/shared/components/RelationTypeIcon';\n\nangular.module('cloudX').component('cxRelationIcon', {\n template: ``,\n bindings: {\n type: '<',\n crm: '\n \n \n\n \n \n \n \n \n `,\n link: function(scope, element, attrs, ngModel) {\n if (!ngModel) return;\n scope.value = null;\n scope.text = null;\n scope.relation = null;\n scope.showSearch = false;\n scope.focusOn = '';\n\n scope.onChange = function() {\n if (scope.showSearch) {\n if (scope.relation && scope.relation.id) {\n ngModel.$setViewValue({\n text: null,\n relation: scope.relation,\n });\n } else {\n ngModel.$setViewValue({\n text: null,\n relation: null,\n });\n }\n } else {\n ngModel.$setViewValue({\n text: scope.text || null,\n relation: null,\n });\n }\n };\n scope.selectRelation = function(relation) {\n if (!relation || !relation.id) {\n scope.relation = null;\n scope.text = null;\n scope.onChange();\n } else {\n scope.relation = relation;\n scope.text = null;\n scope.onChange();\n }\n };\n scope.clear = function() {\n scope.value = null;\n scope.text = null;\n scope.relation = null;\n scope.onChange();\n };\n scope.handleBlur = function() {\n $timeout(function() {\n if (scope.showSearch && scope.value && !scope.value.id) {\n scope.clear(); //Clear value on blur\n }\n }, 500);\n };\n scope.toggleState = function() {\n //Reset input\n scope.clear();\n scope.showSearch = !scope.showSearch;\n scope.focusOn = scope.showSearch ? 'rel' : 'text';\n };\n scope.hasValue = function() {\n if (scope.showSearch) {\n return !!scope.relation?.id;\n }\n return !!scope.text;\n };\n scope.openNewRelationDialog = function() {\n dialogsSvc\n .showRelationWizard('newRelation', {\n relType: 2,\n crmType: 0,\n })\n .then(function(result) {\n if (result && result.relation && result.relation.id) {\n scope.relation = result.relation;\n scope.value = relationNameFilter(result.relation);\n scope.text = null;\n scope.showSearch = true;\n scope.onChange();\n }\n });\n };\n\n const initByRelationById = id => {\n return $http.post(`${appUrls.api}/api/relation/names`, [id]).then(\n ({ data = null }) => {\n if (data) {\n const [relation] = data;\n if (relation) {\n scope.relation = relation;\n scope.value = relationNameFilter(relation);\n scope.showSearch = true;\n return relation;\n }\n }\n scope.relation = null;\n scope.value = null;\n scope.text = null;\n scope.showSearch = true;\n },\n () => {\n scope.relation = null;\n scope.value = null;\n scope.text = null;\n scope.showSearch = true;\n },\n );\n };\n\n ngModel.$render = function() {\n const value = ngModel.$viewValue;\n if (!value || typeof value !== 'object') {\n scope.relation = null;\n scope.value = null;\n scope.text = null;\n scope.showSearch = true;\n return;\n }\n if (!!value.relation) {\n if (typeof value.relation === 'string' && isGuid(value.relation)) {\n // { relation:'relationId',text:null }\n initByRelationById(value.relation);\n return;\n }\n\n if (!value.relation.id) {\n // { relation:'randomText',text:null }\n scope.relation = null;\n scope.value = null;\n scope.showSearch = false;\n } else if (!value.relation.name) {\n // { relation:{id:'relationId', name:null },text:null }\n initByRelationById(value.id);\n return;\n } else {\n // { relation:{id:'relationId', name:'relationName' },text:null }\n scope.relation = value.relation;\n scope.value = relationNameFilter(value.relation);\n scope.text = null;\n scope.showSearch = true;\n return;\n }\n }\n\n // { relation:null,text:null }\n // { relation:null,text:'text' }\n scope.text = value.text || null;\n scope.relation = null;\n scope.value = null;\n scope.showSearch = !scope.text;\n };\n },\n };\n },\n]);\n","import angular from 'angular';\nangular.module('cloudX').directive('cxRouteSelect', [\n '$state',\n '$transitions',\n function($state, $transitions) {\n return {\n restrict: 'A',\n replace: 'true',\n link: function($scope, element, attributes) {\n var ref = element.attr('ui-sref');\n if (ref === $state.$current.name) {\n element.addClass('selected');\n }\n var deregisterTo = $transitions.onSuccess({ to: ref }, function(transition) {\n element.addClass('selected');\n });\n var deregisterFrom = $transitions.onSuccess({ from: ref }, function(transition) {\n element.removeClass('selected');\n });\n $scope.$on('$destroy', function() {\n deregisterTo();\n deregisterFrom();\n });\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxSalutation', [\n 'optionsSvc',\n function(optionsSvc) {\n return {\n restrict: 'E',\n template:\n '',\n scope: {\n salutation: '=data',\n required: '@',\n },\n controller: [\n '$scope',\n function($scope) {\n $scope.salutations = optionsSvc.getOptions('salutation');\n },\n ],\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxSalutationSelect', [\n function() {\n return {\n restrict: 'E',\n template:\n '' +\n '{{salutation | translateList:\\'salutation\\'}}',\n scope: {\n salutation: '=data',\n save: '&',\n },\n controller: [\n '$scope',\n 'optionsSvc',\n function($scope, optionsSvc) {\n var chosen = false;\n if ($scope.salutation || $scope.salutation === 0) {\n chosen = true;\n $scope.salutations = optionsSvc.getOptionsWithDefault('salutation');\n } else $scope.salutations = optionsSvc.getOptionsWithDefault('salutation');\n $scope.choosing = function() {\n if (!chosen) {\n chosen = true;\n $scope.salutations = optionsSvc.getOptionsWithDefault('salutation');\n }\n };\n },\n ],\n };\n },\n]);\n","import angular from 'angular';\nimport moment from 'moment';\nimport eventBus from 'pubsub-js';\nimport { formatOGM } from '@/shared/utils/adminpulse';\n\nconst profileFromFieldId = {\n '68988c03-3b65-4b90-a53a-f4114d9c46bc': 1,\n '5b5c42ce-0232-43c3-816a-154840dc2b2c': 2,\n '0543ff8b-36bb-4638-b7f6-641484b3ca4b': 3,\n 'bef9f50d-9002-40a0-816f-13c2b507f9f4': 4,\n '69ae92f6-cf99-4bf8-9503-f47311fc401d': 5,\n 'd2876d8b-5157-4c2d-9a19-dcd6aedfd985': 6,\n};\nconst invoiceHeaderDataSection = '6b9334f2-95dc-41bb-b3ac-89bea7d718af';\nconst invoiceStreamSection = 'b404b29d-f8fe-413b-ac37-a317de4a43f0';\n\nangular\n .module('cloudX')\n .controller('SectionCtrl', [\n '$scope',\n 'userData',\n 'relPersistSvc',\n 'flySvc',\n 'relBindSvc',\n 'ModalService',\n '$q',\n 'appUrls',\n '$http',\n 'dataCache',\n 'translateListFilter',\n SectionCtrl,\n ]);\n\nfunction SectionCtrl(\n $scope,\n userData,\n relPersistSvc,\n flySvc,\n relBindSvc,\n ModalService,\n $q,\n appUrls,\n $http,\n dataCache,\n translateListFilter,\n) {\n // section is defined in isolated scope of directive (section & subSection)\n\n if (typeof $scope.section.collapsed === 'undefined') $scope.section.collapsed = false;\n\n $scope.getHelpArticleForField = relBindSvc.getHelpArticleForField;\n\n // link to the relation object\n $scope.relation = relBindSvc.relations[$scope.relId];\n\n $scope.showBillingError = function(fieldId) {\n flySvc.message(\n $scope.relation[fieldId].billingError.code,\n $scope.relation[fieldId].billingError.params,\n );\n };\n\n $scope.getErrorMsg = flySvc.getErrorMsg;\n\n // Set textbox maxwidth\n $scope.textBoxMaxWidth = 100;\n switch ($scope.section.columns.length) {\n case 3:\n $scope.textBoxMaxWidth = 30;\n break;\n case 2:\n $scope.textBoxMaxWidth = 45;\n break;\n case 1:\n case 0:\n break;\n default:\n console.warn('SectionCtrl -> textBoxMaxWidth: columns is not 1,2 or 3...');\n }\n\n $scope.boolToStr = function(bool) {\n return bool ? 'Yes' : 'No';\n };\n\n $scope.dateOptions = {\n minDate: new Date(1900, 0, 1),\n initDate: new Date(),\n startingDay: 1,\n };\n $scope.dayMonthOptions = {\n minMode: 'day',\n maxMode: 'month',\n showWeeks: false,\n formatDayTitle: 'MMMM',\n datepickerMode: 'month',\n formatMonthTitle: ' ',\n initDate: moment\n .utc()\n .startOf('day')\n .year(2000)\n .toDate(),\n // minDate: new Date(2000, 0, 1),\n // maxDate: new Date(2000, 11, 31),\n startingDay: 1,\n };\n\n $scope.isNullDate = function(date) {\n return date === '0001-01-01T00:00:00Z' || date === '0001-01-01T00:00:00';\n };\n\n $scope.cancel = function(field) {\n field.value = null;\n };\n\n $scope.onToggle = function(collapsed) {\n if (!collapsed && !$scope.section.loaded) {\n relBindSvc.loadSection($scope.relId, $scope.section.id);\n }\n };\n\n $scope.changeRelationType = function() {\n ModalService.showModal({\n template: require('../../relations/dialogs/changeRelTypeDialog.html'),\n controller: 'ChangeRelTypeDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n relId: $scope.relId,\n options: {},\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n modal.close.then(function(result) {\n if (result) {\n relBindSvc.open($scope.relId, { reloadSections: true });\n eventBus.publish('relationTypeChanged');\n }\n });\n });\n };\n\n var showValidationError = function(field) {\n for (var error in field.errors) {\n if (field.errors.hasOwnProperty(error) && error[0] !== '$') {\n if (field.errors[error].code) {\n flySvc.error(\n field.errors[error].code,\n angular.copy(field.errors[error].parameters),\n field.id,\n );\n }\n }\n }\n };\n var checkRequired = function(field, newValue) {\n if (field.type === 38) {\n // special case: vatNumber: Even when required an empty string should pass, because that means 'not liable'\n return newValue !== null;\n }\n if (field.type === 3) {\n // for Date we need to check for the null value (0001-01-01T00:00:00) as well\n return (\n newValue !== null &&\n newValue !== '' &&\n newValue !== '0001-01-01T00:00:00' &&\n newValue !== '0001-01-01T00:00:00Z' &&\n (typeof newValue.getTime === 'undefined' || newValue.getTime() !== -62135600400000)\n );\n }\n return !(!newValue && newValue !== 0);\n };\n\n $scope.submit = function(field, newValue) {\n if (typeof newValue === 'undefined') {\n //Error\n if (field.errors) showValidationError(field);\n return $q.reject();\n }\n if (field.isRequired) {\n field.invalid = false;\n if (!checkRequired(field, newValue)) {\n flySvc.error(3017, null, field.id);\n field.invalid = true;\n return $q.reject();\n }\n }\n\n var fieldInRel = $scope.relation[field.id];\n if (fieldInRel.value === newValue) return $q.when(false);\n return relPersistSvc.update($scope.relation.id, {\n definition: field,\n value: newValue,\n });\n };\n\n $scope.submitUser = function(field, newValue) {\n const oldUserId = $scope.relation[field.id].value;\n const profile = profileFromFieldId[field.id];\n\n return $scope.submit(field, newValue).then(result => {\n if (result === false) return false; //Not changed\n\n if (!profile) {\n console.warn(`Unknown user profile (${profile}) for field ${field.id}`);\n return true;\n }\n return $http\n .get(`${appUrls.tasks}/api/plannedtasks/HasOpenTasks`, {\n params: {\n relationId: $scope.relation.id,\n assignedUserId: oldUserId,\n profile,\n },\n })\n .then(\n ({ data: hasOpenTasks }) => {\n if (hasOpenTasks && (hasOpenTasks.count || 0) > 0) {\n return ModalService.showModal({\n template: require('./resetTaskAssignedToDialog.html'),\n controller: 'ResetTaskAssignedToDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n oldUserId: oldUserId,\n newUserId: newValue,\n tasksForUser: hasOpenTasks.forUser || 0,\n profile,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n modal.close.then(function(result) {\n if (!result) return false;\n const model = {\n ...result,\n relationId: $scope.relation.id,\n oldProfile: profile,\n };\n return $http\n .post(`${appUrls.tasks}/api/plannedtasks/ResetAssignedUser`, model)\n .then(\n result2 => {\n flySvc.success('SuccessTitle');\n //console.log(result2);\n return true;\n },\n error => {\n flySvc.success('msgTaskUserChangedError');\n console.error(error);\n return false;\n },\n );\n });\n });\n }\n },\n error => {\n return false;\n },\n );\n });\n };\n\n $scope.isSectionVisible = function(section) {\n //Hide subsection based on relation data\n var invoiceStreams = $scope.relation['00ac639e-027a-4589-90fa-9017873c8e5a']?.value;\n if (!invoiceStreams) {\n return true;\n }\n if (section.id === invoiceHeaderDataSection) {\n return invoiceStreams.some(x => !x.invoicingViaStream);\n } else if (section.id === invoiceStreamSection && !dataCache.getArray('assignmentsEnabled')) {\n return invoiceStreams.some(x => !x.invoicingViaStream);\n }\n\n return true;\n };\n\n $scope.getValueToCopy = function(field) {\n if (!$scope.relation || !field || !field.id) return;\n if (!field.showCopyButton) return;\n\n let value = $scope.relation[field.id]?.value;\n switch (field.type) {\n case 38: {\n if (value === 'VatPending') return;\n }\n case 48: {\n return formatOGM(value);\n }\n //Add custom formatting, extra checks here\n }\n return value;\n };\n\n $scope.getFieldLabel = function(field) {\n if (!field) return;\n //Add custom translations here\n switch (field.id) {\n case '68988c03-3b65-4b90-a53a-f4114d9c46bc':\n return translateListFilter(1, 'employeeprofile');\n case '5b5c42ce-0232-43c3-816a-154840dc2b2c':\n return translateListFilter(2, 'employeeprofile');\n case '0543ff8b-36bb-4638-b7f6-641484b3ca4b':\n return translateListFilter(3, 'employeeprofile');\n case 'bef9f50d-9002-40a0-816f-13c2b507f9f4':\n return translateListFilter(4, 'employeeprofile');\n case '69ae92f6-cf99-4bf8-9503-f47311fc401d':\n return translateListFilter(5, 'employeeprofile');\n case 'd2876d8b-5157-4c2d-9a19-dcd6aedfd985':\n return translateListFilter(6, 'employeeprofile');\n }\n\n return translateListFilter(field.id, 'field', field.label);\n };\n}\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxSection', function() {\n return {\n restrict: 'E',\n template: require('./section.html'),\n scope: {\n section: '=data',\n relId: '@',\n },\n controller: 'SectionCtrl',\n };\n});\n","import angular from 'angular';\n\nangular.module('cloudX').directive('selectOnFocus', [\n '$timeout',\n function($timeout) {\n return {\n restrict: 'A',\n link: function(scope, element, attrs) {\n var focusedElement = null;\n var onFocus = function() {\n var self = this;\n if (focusedElement !== self) {\n focusedElement = self;\n $timeout(function() {\n if (focusedElement) focusedElement.select();\n }, 10);\n }\n };\n var onBlur = function() {\n focusedElement = null;\n };\n\n element.on('focus', onFocus);\n element.on('blur', onBlur);\n\n //Cleanup events if the element is destroyed\n element.on('$destroy', function() {\n element.off('focus', onFocus);\n element.off('blur', onBlur);\n focusedElement = null;\n });\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxSortHeader', [\n function() {\n return {\n restrict: 'A',\n replace: 'true',\n template:\n '' +\n '{{key | translate}}' +\n '' +\n //'' +\n //'' +\n '',\n scope: true, //Gives the directive a nested, but not isolated scope.\n link: function(scope, element, attrs) {\n scope.key = attrs.key;\n scope.name = attrs.name;\n },\n //$filter('translate')('To');\n controller: [\n '$scope',\n function($scope) {\n $scope.canSort = function(dir) {\n if ($scope.vm.canSort) {\n return $scope.vm.canSort($scope.name, dir);\n } else {\n console.warn('The function \"can sort\" is not defined.');\n }\n };\n\n $scope.sort = function(dir) {\n if ($scope.vm.sort) {\n $scope.vm.sort($scope.name, dir);\n } else {\n console.warn('The function \"sort\" is not defined.');\n }\n };\n },\n ],\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxSortIcon', [\n function() {\n var nameFromToStringRegex = /^function\\s?([^\\s(]*)/;\n\n function className(object, defaultName) {\n var result = '';\n if (typeof object === 'function') {\n result =\n object.name || object.toString().match(nameFromToStringRegex)[1];\n } else if (typeof object.constructor === 'function') {\n result = className(object.constructor, defaultName);\n }\n return result || defaultName;\n }\n\n return {\n restrict: 'E',\n replace: true,\n template:\n '',\n scope: {\n key: '@?',\n func: '=?',\n predicate: '=',\n reverse: '=',\n },\n controller: [\n '$scope',\n function($scope) {\n $scope.visible = function() {\n if (\n typeof $scope.func === 'function' &&\n typeof $scope.predicate === 'function'\n )\n return $scope.func === $scope.predicate;\n if (\n typeof $scope.key === 'undefined' ||\n typeof $scope.predicate === 'undefined'\n )\n return false;\n if (angular.isArray($scope.predicate))\n return $scope.key === $scope.predicate[0];\n return $scope.key === $scope.predicate;\n };\n },\n ],\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxSubSection', function() {\n return {\n restrict: 'E',\n template: require('./subSection.html'),\n scope: {\n section: '=data',\n relId: '@',\n },\n controller: 'SectionCtrl',\n };\n});\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxTagInputXedit', [\n '$filter',\n 'resourceFactorySvc',\n 'dialogsSvc',\n function($filter, resourceFactorySvc, dialogsSvc) {\n return {\n restrict: 'E',\n template: `
    \n
    \n
    \n \n
    \n \n  \n  \n \n \n
    \n
    \n
    `,\n scope: {\n value: '=data',\n save: '&',\n readonly: '=?',\n disableCreate: '=?',\n },\n link: function(scope) {\n scope.innerValue = [];\n scope.tags = null;\n scope.displayValue = '';\n scope.loadTags = function(search) {\n if (scope.tags !== null)\n return $filter('filter')(\n scope.tags.map(x => x.name),\n search,\n );\n return resourceFactorySvc\n .get('resource')\n .tags({}, function(data) {\n scope.tags = data;\n })\n .$promise.then(function() {\n return $filter('filter')(\n scope.tags.map(x => x.name),\n search,\n );\n });\n };\n scope.setDisplayValue = function(value) {\n if (typeof value === 'string') value = JSON.parse(value);\n scope.displayValue = (value || []).map(x => x.name).join(', ');\n };\n\n scope.showAvailableTags = function() {\n dialogsSvc.showAvailableRelationTags().then(\n function({ selectedTags, updatedTags, removedTags } = parameters) {\n if (selectedTags && selectedTags.length) {\n const newTags = selectedTags.filter(\n x => !(scope.innerValue || []).map(y => y.text).some(y => y === x),\n );\n scope.innerValue = [...scope.innerValue, ...newTags.map(x => ({ text: x }))];\n }\n if (updatedTags && updatedTags.length) {\n updatedTags.map(updatedTag => {\n scope.value = scope.value.map(x => {\n if (x.id === updatedTag.id) {\n return {\n ...x,\n name: updatedTag.name,\n };\n }\n return x;\n });\n });\n\n scope.readValue();\n scope.setDisplayValue(scope.value);\n }\n if (removedTags && removedTags.length) {\n scope.value = scope.value.filter(x => !removedTags.includes(x.id));\n scope.readValue();\n scope.setDisplayValue(scope.value);\n }\n },\n function() {},\n );\n };\n\n scope.readValue = function() {\n var value = scope.value;\n if (typeof value === 'string') value = JSON.parse(value);\n if (angular.isArray(value)) {\n scope.innerValue = value.map(function(el) {\n return {\n text: el.name,\n };\n });\n } else {\n scope.innerValue = [];\n }\n };\n scope.$watch(\n 'value',\n function(newValue, oldValue) {\n scope.readValue();\n scope.setDisplayValue(newValue);\n },\n true, //Force equal check, doesn't work without it...\n );\n scope.beforeSave = function(data) {\n var tags = data.map(function(el) {\n return el.text;\n });\n return scope.save({\n $data: tags,\n });\n };\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxEmployeeTagInputXedit', [\n '$filter',\n '$http',\n 'appUrls',\n 'checkSecurity',\n function($filter, $http, appUrls, checkSecurity) {\n return {\n restrict: 'E',\n template: `
    \n
    \n
    \n \n
    \n \n  \n  \n \n
    \n
    \n
    `,\n scope: {\n value: '=data',\n save: '&',\n readonly: '=?',\n disableCreate: '=?',\n },\n link: function(scope) {\n scope.innerValue = [];\n scope.tags = null;\n scope.displayValue = '';\n scope.loadTags = function(search) {\n if (scope.tags !== null)\n return $filter('filter')(\n scope.tags.map(x => x.name),\n search,\n );\n if (checkSecurity('RegistrationOthers:r') || checkSecurity('Users:r'))\n return $http.get(appUrls.api + '/api/employee/tags').then(function({ data }) {\n scope.tags = data;\n return $filter('filter')(\n scope.tags.map(x => x.name),\n search,\n );\n });\n };\n\n scope.setDisplayValue = function(value) {\n if (typeof value === 'string') value = JSON.parse(value);\n scope.displayValue = (value || []).map(x => x.name).join(', ');\n };\n\n scope.readValue = function() {\n var value = scope.value;\n if (typeof value === 'string') value = JSON.parse(value);\n if (angular.isArray(value)) {\n scope.innerValue = value.map(function(el) {\n return {\n text: el.name,\n };\n });\n } else {\n scope.innerValue = [];\n }\n };\n scope.$watch(\n 'value',\n function(newValue, oldValue) {\n scope.readValue();\n scope.setDisplayValue(newValue);\n },\n true, //Force equal check, doesn't work without it...\n );\n\n scope.beforeSave = function(data) {\n var tags = data.map(function(el) {\n return el.text;\n });\n return scope\n .save({\n $data: tags,\n })\n .then(\n result => {\n scope.value = result;\n scope.setDisplayValue(result);\n\n return false;\n },\n error => {\n return '';\n },\n );\n };\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxTagPicker', [\n '$filter',\n '$rootScope',\n 'resourceFactorySvc',\n '$q',\n function($filter, $rootScope, resourceFactorySvc, $q) {\n return {\n restrict: 'E',\n replace: true,\n template: `
    \n \n \n \n
    `,\n scope: { placeholder: '@?', retrieveTags: '=?' },\n require: 'ngModel',\n link: function($scope, el, attrs, ngModel) {\n if (!ngModel) return;\n $scope.selected = [];\n $scope.tags = null;\n\n $scope.loadTags = function(search) {\n if ($scope.tags !== null) {\n return $filter('filter')($scope.tags, search);\n }\n\n if ($scope.retrieveTags) {\n return $scope.retrieveTags\n .then(function({ data }) {\n $scope.tags = data.map(x => ({ text: x.name }));\n })\n .then(function() {\n return $filter('filter')($scope.tags, search);\n });\n } else {\n return resourceFactorySvc\n .get('resource')\n .tags({}, function(data) {\n $scope.tags = data.map(x => ({ text: x.name }));\n })\n .$promise.then(function() {\n return $filter('filter')($scope.tags, search);\n });\n }\n };\n\n $scope.getSuggestions = function(search) {\n return $filter('filter')($scope.options, search);\n };\n\n $scope.updateValue = function() {\n ngModel.$setViewValue($scope.selected.map(x => x.text));\n };\n\n ngModel.$render = function() {\n var value = ngModel.$viewValue;\n if (value !== null && typeof value !== 'undefined' && angular.isArray(value)) {\n if ($scope.selected.length || value.length)\n $q.when($scope.loadTags()).then(function() {\n $scope.selected = value.map(x => ({ text: x }));\n });\n }\n };\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxTagSelect', [\n function() {\n return {\n restrict: 'E',\n template:\n '' +\n '{{value}}' +\n '',\n scope: {\n value: '=data',\n save: '&',\n },\n controller: [\n '$scope',\n 'resourceFactorySvc',\n function($scope, resourceFactorySvc) {\n $scope.tags = [];\n $scope.loadTags = function() {\n return $scope.tags.length\n ? null\n : resourceFactorySvc.get('resource').tags({}, function(data) {\n $scope.tags = data.map(x => x.name);\n }).$promise;\n };\n },\n ],\n };\n },\n]);\n","import angular from 'angular';\nangular.module('cloudX').component('taskStatusIcon', {\n bindings: {\n value: '<',\n },\n template: ` `,\n});\n","import angular from 'angular';\nimport { getNextStatus } from '@/modules/tasks/TaskStatusToggle';\n\nangular.module('cloudX').component('taskStatusToggle', {\n bindings: {\n value: '<',\n onChange: '&',\n showOpenDetail: '\n \n \n \n \n \n \n \n \n \n \n `,\n\n controller: [\n '$http',\n 'appUrls',\n 'flySvc',\n 'ModalService',\n '$timeout',\n 'checkSecurity',\n function ($http, appUrls, flySvc, ModalService, $timeout, checkSecurity) {\n const $ctrl = this;\n $ctrl.saving = false;\n $ctrl.isTodo = $ctrl.value?.taskLevel === 2;\n $ctrl.canUpdate = $ctrl.isTodo ? checkSecurity('Todo:u') : checkSecurity('PlannedTask:u');\n\n $ctrl.changeStatus = function (updatedValue) {\n if (!$ctrl.canUpdate) return;\n if (!$ctrl.value || !$ctrl.value.id) return;\n const newValue = angular.extend({}, $ctrl.value, updatedValue);\n if (angular.equals($ctrl.value, newValue)) return;\n $ctrl.saving = true;\n $http.put(`${appUrls.tasks}/api/plannedTasks/UpdateStatus`, newValue).then(\n ({ data }) => {\n $ctrl.onChange({ value: data });\n $ctrl.saving = false;\n },\n (error) => {\n flySvc.error(error);\n $ctrl.saving = false;\n },\n );\n };\n $ctrl.setStatus = function (status) {\n $ctrl.changeStatus({ status, isBlocked: false, inapplicable: false });\n };\n $ctrl.setBlocked = function (isBlocked) {\n $ctrl.changeStatus({ isBlocked });\n };\n $ctrl.setInapplicable = function () {\n if (!$ctrl.value.parentId) return;\n $ctrl.changeStatus({ inapplicable: true });\n };\n $ctrl.setRejected = function () {\n if (!$ctrl.value.parentId) return;\n $ctrl.changeStatus({ rejected: true });\n };\n $ctrl.setNextStatus = function () {\n if ($ctrl.saving) return;\n if (!$ctrl.canUpdate) return;\n const nextStatus = getNextStatus($ctrl.value);\n if (!nextStatus) return;\n $ctrl.changeStatus(nextStatus);\n };\n $ctrl.hasNextStatus = function () {\n if (!$ctrl.canUpdate) return false;\n if ($ctrl.saving) return false;\n const nextStatus = getNextStatus($ctrl.value);\n return !!nextStatus;\n };\n\n $ctrl.onTaskModalClosed = (task) => {\n $timeout(function () {\n $ctrl.showTaskModal = false;\n $ctrl.activeTask = null;\n }, 0);\n };\n\n $ctrl.onTaskModalSaved = (updatedTasks) => {\n $timeout(function () {\n $ctrl.showTaskModal = false;\n $ctrl.activeTask = null;\n\n if (angular.isArray(updatedTasks)) {\n updatedTasks.forEach((todo) => {\n if ($ctrl.value.id === todo.id) {\n $ctrl.onChange({ value: todo });\n }\n });\n }\n }, 0);\n };\n\n $ctrl.openTaskDetail = function ($event) {\n if (!$ctrl.value || !$ctrl.value.id) return;\n\n $event.preventDefault();\n $event.stopPropagation();\n\n $ctrl.activeTask = $ctrl.value;\n $ctrl.showTaskModal = true;\n };\n },\n ],\n});\n","import angular from 'angular';\nimport { dynamicSort, dynamicSortMultiple } from '@/shared/utils/dynamicSort';\nimport guid from '@/shared/utils/guid';\n\nangular.module('cloudX').directive('cxTaskTemplatePicker', [\n '$filter',\n '$rootScope',\n '$http',\n 'appUrls',\n '$q',\n function($filter, $rootScope, $http, appUrls, $q) {\n return {\n restrict: 'E',\n replace: true,\n scope: true,\n template: `
    \n \n \n \n
    `,\n require: 'ngModel',\n link: function($scope, el, attrs, ngModel) {\n if (!ngModel) return;\n $scope.selected = [];\n $scope.options = null;\n var findOption = function(code) {\n if (code == null || $scope.options.length === 0) return null;\n return $scope.options.find(function(el) {\n return el.id === code;\n });\n };\n var mapOptions = function() {\n if (!$scope.options) return;\n $scope.options = $scope.options\n .map(x => ({\n ...x,\n label:\n x.itemType === 0\n ? $filter('translate')('Tasks without template')\n : $filter('translateList')(x.id, 'taskTemplate', x.name),\n }))\n .sort(dynamicSortMultiple('itemType', 'label'));\n if ($scope.selected.length) {\n $scope.selected = $scope.selected.map(x => findOption(x.id));\n }\n };\n $scope.loadTemplates = function(search) {\n if ($scope.options != null) return $filter('filter')($scope.options, search);\n\n return $http.get(`${appUrls.tasks}/api/tasktemplates`).then(({ data }) => {\n $scope.options = data.map(x => ({ ...x, itemType: 1 }));\n if (attrs.withoutTemplate === '' || attrs.withoutTemplate !== 'false') {\n $scope.options.push({\n id: guid.empty,\n label: $filter('translate')('Tasks without template'),\n itemType: 0,\n });\n }\n mapOptions();\n return $filter('filter')($scope.options, search);\n });\n };\n var deregistration = $rootScope.$on('$translateChangeSuccess', mapOptions);\n $scope.$on('$destroy', deregistration);\n\n $scope.updateValue = function() {\n ngModel.$setViewValue($scope.selected.map(x => x.id));\n };\n\n ngModel.$render = function() {\n var value = ngModel.$viewValue;\n if (value !== null && typeof value !== 'undefined' && angular.isArray(value)) {\n if ($scope.selected.length || value.length)\n $q.when($scope.loadTemplates()).then(function() {\n $scope.selected = value.map(x => findOption(x));\n });\n }\n };\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxTeamInputXedit', [\n '$filter',\n 'resourceFactorySvc',\n 'flySvc',\n 'ModalService',\n function($filter, resourceFactorySvc, flySvc, ModalService) {\n return {\n restrict: 'E',\n template: `
    \n
    \n \n \n \n \n
    \n
    \n \n
    \n \n  \n \n \n
    \n
    \n
    `,\n scope: {\n value: '=data',\n relation: '=relation',\n save: '&',\n readonly: '=?',\n allowAllTeams: '=?',\n },\n link: function(scope, element, attrs) {\n scope.innerValue = [];\n scope.tags = null;\n scope.displayValue = '';\n scope.loadTags = function(search) {\n if (scope.tags !== null) return $filter('filter')(scope.tags, search);\n\n const endpoint = scope.allowAllTeams\n ? resourceFactorySvc.get('team').flatTeams\n : resourceFactorySvc.get('team').myTeams;\n\n return endpoint({}, function(data) {\n scope.tags = data.map(function(el) {\n return {\n ...el,\n text: el.name,\n };\n });\n }).$promise.then(function() {\n return $filter('filter')(scope.tags, search);\n });\n };\n scope.setDisplayValue = function(value) {\n if (typeof value === 'string') value = JSON.parse(value);\n scope.displayValue = (value || []).map(x => x.name).join(', ');\n };\n scope.invalidTag = function(tag) {\n flySvc.error('msgChooseExistingTeamFromList');\n };\n scope.addingTag = function(tag) {\n if (scope.tags === null) return false;\n if (tag.id) return true;\n var option = scope.tags.find(x => x.text.toLowerCase() === tag.text.toLowerCase());\n if (!option) return false;\n return true;\n };\n scope.readValue = function() {\n var value = scope.value;\n if (typeof value === 'string') value = JSON.parse(value);\n if (angular.isArray(value)) {\n scope.innerValue = value.map(function(el) {\n return {\n ...el,\n text: el.name,\n };\n });\n } else {\n scope.innerValue = [];\n }\n };\n scope.$watch(\n 'value',\n function(newValue, oldValue) {\n scope.readValue();\n scope.setDisplayValue(newValue);\n },\n true,\n );\n scope.beforeSave = function(data, form) {\n let invalid =\n form.$invalid || (form.$error.leftoverText && form.$error.leftoverText.length > 0);\n\n data.map(x => {\n if (!x.id) invalid = true;\n });\n\n if (invalid) {\n flySvc.error('msgChooseExistingTeamFromList');\n return '';\n }\n\n return scope\n .save({\n $data: data,\n })\n .then(\n result => {\n scope.value = data;\n scope.setDisplayValue(data);\n\n if (data.length === 0 && scope.relation) {\n flySvc.proposal('msgTeamListEmpty');\n }\n\n return false;\n },\n error => {\n return '';\n },\n );\n };\n scope.openAccessDialog = function() {\n ModalService.showModal({\n template: require('../../relations/dialogs/employeeAccessDialog.html'),\n controller: 'EmployeeAccessDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n relationId: scope.relation.id,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n });\n };\n },\n };\n },\n]);\n","import angular from 'angular';\nimport guid from '../../../shared/utils/guid';\n\nangular.module('cloudX').directive('cxTeamPicker', [\n '$filter',\n '$rootScope',\n '$http',\n 'appUrls',\n function($filter, $rootScope, $http, appUrls) {\n return {\n restrict: 'E',\n replace: true,\n scope: true,\n template: `
    \n \n \n \n
    `,\n require: 'ngModel',\n link: function($scope, el, attrs, ngModel) {\n if (!ngModel) return;\n $scope.keyProperty = attrs.keyProperty || 'id';\n $scope.showWithoutTeams = attrs.showWithoutTeams || false;\n\n $scope.selected = [];\n $scope.options = [];\n $scope.loaded = false;\n $scope.tmpValue = null;\n var findOption = function(code) {\n if (code == null || $scope.options.length === 0) return null;\n return $scope.options.find(function(el) {\n return el[$scope.keyProperty] === code;\n });\n };\n\n $scope.loadTeams = function() {\n return $http.get(`${appUrls.api}/api/Team/MyTeams`).then(({ data }) => {\n $scope.options = data || [];\n if ($scope.showWithoutTeams) {\n $scope.options.unshift({\n id: guid.empty,\n name: $filter('translate')('WithoutTeams'),\n code: 0,\n });\n }\n if ($scope.tmpValue) {\n $scope.selected = $scope.tmpValue.map(x => findOption(x));\n $scope.tmpValue = null;\n }\n $scope.loaded = true;\n });\n };\n\n $scope.getSuggestions = function(search) {\n if (!$scope.loaded)\n return $scope.loadTeams().then(() => {\n return $filter('filter')($scope.options, search);\n });\n return $filter('filter')($scope.options, search);\n };\n\n $scope.updateValue = function() {\n ngModel.$setViewValue(\n attrs.objectAsModel ? $scope.selected : $scope.selected.map(x => x[$scope.keyProperty]),\n );\n };\n\n ngModel.$render = function() {\n var value = ngModel.$viewValue;\n if (value !== null && typeof value !== 'undefined' && angular.isArray(value)) {\n if (!$scope.loaded) {\n $scope.tmpValue = value;\n $scope.loadTeams();\n } else {\n $scope.selected = value.map(x => findOption(x));\n }\n }\n };\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxTimeInput', [\n '$parse',\n '$timeout',\n function($parse, $timeout) {\n return {\n restrict: 'E',\n replace: true,\n scope: {\n id: '@',\n disabled: '=ngDisabled',\n },\n template:\n '
    ' +\n ' ' +\n ' :' +\n ' ' +\n '
    ',\n require: 'ngModel',\n link: function(scope, el, attrs, ngModel) {\n if (!ngModel) return;\n var unit = (attrs.unit || 'm').substring(0, 1).toLowerCase(); //m or h\n if (unit !== 'm' && unit !== 'h') unit = 'm';\n\n scope.time = {\n hour: 0,\n minute: 0,\n };\n\n var lastKeyPressWasArrow = false;\n\n var setValue = function(value) {\n var sign = value < 0 ? -1 : 1;\n if (unit === 'm') {\n scope.time.minute = Math.abs(value) % 60;\n scope.time.hour = sign * Math.floor((Math.abs(value) - scope.time.minute) / 60.0);\n } else {\n scope.time.minute = Math.round(Math.abs(value) * 60) % 60;\n scope.time.hour = sign * Math.floor(Math.abs(value));\n }\n };\n var getValue = function() {\n var sign = scope.time.hour < 0 ? -1 : 1;\n\n if (unit === 'm')\n return (\n sign *\n ((Math.abs(parseInt(scope.time.hour)) || 0) * 60 + (parseInt(scope.time.minute) || 0))\n );\n return (\n sign *\n ((Math.abs(parseInt(scope.time.hour)) || 0) + (parseInt(scope.time.minute) / 60.0 || 0))\n );\n };\n\n /**\n * Use e-min & e-max attributes to set a minimum and maximum.\n * Use the e-min=\"{{value}}\" syntax\n */\n var watches = { eMin: null, eMax: null, disabled: null };\n\n attrs.$observe('eMin', function(value) {\n scope.min = $parse(value);\n if (!!watches.eMin) watches.eMin(); //Destroy old watch\n watches.eMin = scope.$parent.$watch(scope.min, function(newValue) {\n newValue = newValue || 0;\n var value = getValue();\n if (value < newValue) ngModel.$setViewValue(newValue);\n ngModel.$render();\n });\n });\n attrs.$observe('eMax', function(value) {\n scope.max = $parse(value);\n if (!!watches.eMax) watches.eMax(); //Destroy old watch\n watches.eMax = scope.$parent.$watch(scope.max, function(newValue) {\n newValue = newValue || 1439;\n var value = getValue();\n if (value > newValue) ngModel.$setViewValue(newValue);\n ngModel.$render();\n });\n });\n\n scope.onKeyDown = function(event) {\n if (event.keyCode === 38 || event.keyCode === 40) {\n lastKeyPressWasArrow = true;\n } else {\n lastKeyPressWasArrow = false;\n }\n };\n\n scope.valueChanged = function(isHoursInput) {\n var value = getValue();\n var max =\n scope.max != null ? scope.max(scope.$parent, scope) : unit === 'm' ? 1439 : 1439 / 60.0; //Default 23:59\n var min = scope.min != null ? scope.min(scope.$parent, scope) : 0; //Default 0\n\n if (scope.time.minute < 0 || scope.time.minute >= 60) {\n setValue(value);\n }\n if (value < min) {\n value = min;\n setValue(value);\n }\n if (value > max) {\n //Default 23:59\n value = max;\n setValue(value);\n }\n\n ngModel.$setViewValue(value);\n\n if (\n isHoursInput &&\n scope.time.hour &&\n // dont shift focus to minute field if the user is using the up/down arrow to increase/decrease hours. This results in bad UX\n !lastKeyPressWasArrow &&\n // use the element selector to get the amount of digits in the input field. The value of the number field is 9 even if the user entered 09.\n // after the 2nd digit, we jump to the minutes field\n document.getElementById(`${scope.id}-HourField`).value.toString().length === 2\n ) {\n $timeout(function() {\n document.getElementById(`${scope.id}-MinuteField`).focus();\n }, 0);\n }\n };\n\n ngModel.$render = function() {\n if (isNaN(ngModel.$viewValue)) return;\n setValue(Number(ngModel.$viewValue));\n };\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxTimeInputXedit', function() {\n return {\n restrict: 'A',\n require: 'ngModel',\n link: function(scope, el, attrs, ngModel) {\n if (!ngModel) return;\n var unit = (attrs.cxTimeInputXedit || 'm').substring(0, 1).toLowerCase(); //m or h\n if (unit !== 'm' && unit !== 'h') unit = 'm';\n\n var max =\n (scope.$eval(attrs.max) || (unit === 'm' ? 1439 : 1439 / 60.0)) * (unit === 'm' ? 1 : 60.0); //Default 23:59\n\n ngModel.$formatters.push(function(value) {\n if (value === null || isNaN(value)) return null;\n var minute = 0;\n var hour = 0;\n var sign = value < 0 ? '-' : '';\n value = Math.abs(value);\n if (unit === 'm') {\n minute = value % 60;\n hour = Math.floor((value - minute) / 60.0);\n } else if (unit === 'h') {\n minute = Math.round(value * 60) % 60;\n hour = Math.floor(value);\n }\n return sign + (hour < 10 ? '0' : '') + hour + ':' + (minute < 10 ? '0' : '') + minute;\n });\n ngModel.$parsers.push(function(value) {\n if (!value) return null;\n var factor = 1;\n if (value[0] === '-') {\n factor = -1;\n value = value.substring(1);\n }\n var split = value.split(':');\n var hour = 0;\n var minute = 0;\n if (split.length === 2) {\n hour = parseInt(split[0]);\n }\n minute = parseInt(split[split.length - 1]);\n var totalMinutes = Math.abs(hour || 0) * 60 + (minute || 0);\n if (totalMinutes > max) totalMinutes = max; //Default 23:59\n if (unit === 'h') return (factor * totalMinutes) / 60.0;\n return factor * totalMinutes;\n });\n },\n };\n});\n","import angular from 'angular';\nimport moment from 'moment';\n\nangular.module('cloudX').directive('cxTimespanDatetime', function() {\n return {\n restrict: 'A',\n require: '^ngModel',\n link: function(scope, el, attrs, ngModel) {\n if (!ngModel) return;\n var timeRegex = /^(0?[0-9]|1[0-9]|2[0-3]):([0-5]?[0-9])(?::([0-5]?[0-9]))?$/;\n var timeFormatter = function(value) {\n if (value === null || typeof value === 'undefined') return null;\n var m = value.match(timeRegex);\n if (!m) return undefined;\n\n return moment()\n .startOf('day')\n .set({\n hour: parseInt(m[1]) || 0,\n minute: parseInt(m[2]) || 0,\n second: parseInt(m[3]) || 0,\n })\n .toDate();\n };\n ngModel.$formatters.push(timeFormatter);\n ngModel.$parsers.push(function(value) {\n if (!value) return value;\n if (typeof value === 'string' && value.match(timeRegex)) return value;\n if (value instanceof Date) return moment(value).format('HH:mm:ss');\n return value;\n });\n ngModel.$validators.time = function(modelValue) {\n if (!modelValue) return true;\n var m = modelValue.match(timeRegex);\n if (!m) return false;\n //Validate seconds if available\n if (m[3] && parseInt(m[3]) >= 60) return false;\n //Validate minutes\n return parseInt(m[2]) < 60;\n };\n },\n };\n});\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxToggleCollapsed', [\n '$parse',\n 'userData',\n function($parse, userData) {\n return {\n restrict: 'A',\n link: function(scope, element, attrs) {\n var onToggle = $parse(attrs.onToggle) || angular.noop;\n var onInit = $parse(attrs.onInit) || angular.noop;\n\n var fn = $parse(attrs.cxToggleCollapsed);\n var saveValue = function(data) {\n var key = attrs.collapsedKey;\n if (!key) return;\n //console.log('saving ' + key + ': ' + data);\n userData.update('collapsed', function(value) {\n if (!value) value = {};\n value[key] = !!data;\n return value;\n });\n };\n\n element.on('click', function() {\n scope.$apply(function() {\n var value = fn(scope);\n fn.assign(scope, !value);\n onToggle(scope, {\n $collapsed: !value,\n });\n //saveValue(!value);\n });\n });\n\n var defaultValue = attrs.defaultCollapsed === 'true';\n\n var value = fn(scope);\n var key = attrs.collapsedKey;\n if (!!key) {\n value = userData.get('collapsed', {})[key];\n scope.$watch(attrs.cxToggleCollapsed, function(newValue, oldValue) {\n if (newValue !== oldValue) saveValue(newValue);\n });\n }\n if (typeof value === 'undefined' || value === null) {\n value = defaultValue;\n saveValue(value);\n }\n fn.assign(scope, value);\n onInit(scope, {\n $collapsed: value,\n });\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxToggleButton', [\n function() {\n return {\n restrict: 'E',\n replace: true,\n template: ``,\n scope: {\n disabled: '=',\n label: '@',\n },\n require: 'ngModel',\n link: function($scope, el, attrs, ngModel) {\n if (!ngModel) return;\n $scope.setValue = function() {\n ngModel.$setViewValue(!!$scope.checked);\n };\n ngModel.$render = function() {\n $scope.checked = !!ngModel.$viewValue;\n };\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxTranslateBtn', [\n function() {\n return {\n restrict: 'E',\n replace: true,\n template:\n '',\n scope: {\n key: '@',\n listid: '=?',\n fallback: '=?',\n eClass: '=?',\n disabled: '=?ngDisabled',\n },\n controller: [\n '$scope',\n 'dialogsSvc',\n function($scope, dialogsSvc) {\n $scope.showDialog = function() {\n if (!$scope.key) return;\n if ($scope.listid || $scope.listid === 0) {\n dialogsSvc.translateListItem($scope.key, $scope.listid, $scope.fallback);\n } else {\n dialogsSvc.translateLabel($scope.key, $scope.fallback);\n }\n };\n },\n ],\n };\n },\n]);\n","import angular from 'angular';\nimport { dynamicSortMultiple } from '@/shared/utils/dynamicSort';\n\nconst defaultOptions = {\n inputRows: 1, // Values > 1 will render textarea's (with rows property equals to this value)\n defaultRequired: true, //Is the default langauge required\n maxlength: undefined,\n placeholders: {}, //Placeholders per language {nl:'',fr:'',en:''}\n};\n\nangular.module('cloudX').directive('cxTranslateListItem', [\n function() {\n return {\n restrict: 'E',\n replace: true,\n template: `
    \n
    \n \n
    \n \n \n
    \n
    \n
    `,\n scope: {\n list: '@',\n listid: '=?',\n fallback: '=?',\n accessor: '=?',\n defaultChanged: '&',\n labelPrefix: '@?',\n labelClass: '@?',\n inputClass: '@?',\n options: '=?',\n disabled: '=?',\n maxlength: '@?', //Can also be set in options\n },\n controller: [\n '$scope',\n '$q',\n '$http',\n '$translate',\n 'flySvc',\n 'appUrls',\n 'dataCache',\n function($scope, $q, $http, $translate, flySvc, appUrls, dataCache) {\n $scope.saving = null;\n $scope.showValidation = false;\n $scope.translations = [];\n const options = { ...defaultOptions, ...($scope.options || {}) };\n $scope.inputRows = options.inputRows || 1;\n $scope.isTextArea = $scope.inputRows > 1;\n $scope.defaultRequired = options.defaultRequired;\n $scope.maxlength = options.maxlength || $scope.maxlength;\n $scope.placeholders = options.placeholders;\n\n $scope.isValid = function(showValidation) {\n $scope.showValidation = showValidation;\n return $scope.form.$valid;\n };\n var handleError = function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n return error;\n };\n $scope.save = function(listid) {\n if ($scope.saving) return $scope.saving;\n if (!listid) listid = $scope.listid;\n if (!listid) return $q.reject('No id provided');\n if (!$scope.isValid()) return $q.reject('Translations not valid');\n var changes = $scope.translations\n .filter(el => el.orgValue !== el.value)\n .map(({ orgValue, ...el }) => ({ ...el, key: `${$scope.list}_${listid}` }));\n if (!changes || !changes.length) {\n return $q.when([]);\n }\n $scope.saving = $http\n .put(appUrls.api + '/api/translation/lists/0', changes)\n .then(function() {\n // Reload all loaded languages\n $translate.refresh();\n return changes;\n }, handleError)\n .finally(() => {\n $scope.saving = null;\n });\n return $scope.saving;\n };\n $scope.translationChanged = function(translation) {\n if (translation && translation.isTenantLanguage && $scope.defaultChanged) {\n $scope.defaultChanged({ value: translation.value });\n }\n };\n $scope.$watch('accessor', function() {\n if ($scope.accessor) {\n $scope.accessor.save = $scope.save;\n $scope.accessor.isValid = $scope.isValid;\n }\n });\n\n if ($scope.listid) {\n $http\n .get(appUrls.api + '/api/translation/list/' + $scope.list + '/' + $scope.listid)\n .then(function({ data = [] }) {\n $scope.translations = data.map(el => ({\n ...el,\n value: el.isTenantLanguage && !el.value ? $scope.fallback : el.value,\n orgValue: el.value,\n placeholder:\n ($scope.placeholders && $scope.placeholders[el.language]) ||\n `${$scope.labelPrefix || ''} ${el.language}`.trim(),\n }));\n }, handleError);\n } else {\n dataCache.ready().then(function() {\n $scope.translations = dataCache\n .getArray('language')\n .sort(dynamicSortMultiple('-isDefault', 'code'))\n .map(l => ({\n key: null,\n language: l.code,\n value: l.isDefault ? $scope.fallback || '' : '',\n orgValue: '',\n isTenantLanguage: l.isDefault,\n placeholder:\n ($scope.placeholders && $scope.placeholders[l.code]) ||\n `${$scope.labelPrefix || ''} ${l.code}`.trim(),\n }));\n });\n }\n },\n ],\n };\n },\n]);\n","import angular from 'angular';\nimport { type } from 'os';\n\nangular.module('cloudX').directive('cxTypeaheadDropdown', [\n '$parse',\n function($parse) {\n return {\n restrict: 'E',\n replace: true,\n template:\n '
    ' +\n '
    ' +\n ' ' +\n '
    ' +\n ' ' +\n ' ' +\n '
    ' +\n '
    ' +\n ' ' +\n '
    ',\n require: 'ngModel',\n scope: {\n //mdl: '=ngModel',\n orgOptions: '=options',\n label: '@',\n allowInvalidInitialItem: '@?',\n labelFunc: '&?',\n autoSelect: '@?',\n disabled: '=?ngDisabled',\n placeholder: '@?',\n disabledtitle: '@?',\n showClearButton: '@?',\n iClass: '@?',\n },\n link: function(scope, el, attrs, ngModel) {\n if (!ngModel) return;\n //Default values\n scope.allowInvalid = angular.isDefined(attrs.allowInvalid)\n ? $parse(attrs.allowInvalid)(scope)\n : false;\n scope.selectOnBlur = angular.isDefined(attrs.selectOnBlur)\n ? $parse(attrs.selectOnBlur)(scope)\n : true;\n scope.selectOnExact = angular.isDefined(attrs.selectOnExact)\n ? $parse(attrs.selectOnExact)(scope)\n : true;\n scope.limit = attrs.limit || 10;\n\n scope.view2model = function(value) {\n ngModel.$setViewValue(value);\n };\n\n function findSelected(value) {\n return value == null || !scope.options.length\n ? null\n : scope.options.find(function(el) {\n //Search on label if scope.value is string\n if (\n typeof el.value !== 'string' &&\n typeof value === 'string' &&\n typeof el.label === 'string'\n )\n return el.label === value;\n\n //Match by id\n if (\n typeof el.value === 'object' &&\n typeof value === 'object' &&\n typeof el.value.id === 'string' &&\n typeof value.id === 'string'\n )\n return angular.equals(el.value.id, value.id);\n return angular.equals(el.value, value);\n });\n }\n\n // when angular detects a change to the model,\n // we update our inner value\n ngModel.$render = function() {\n scope.value = ngModel.$viewValue;\n var selectedItem = findSelected(scope.value);\n if (selectedItem) {\n scope.selected = selectedItem;\n } else if (scope.allowInvalidInitialItem) {\n scope.value = getLabel(scope.value);\n scope.selected = scope.value;\n } else {\n scope.selected = scope.value;\n }\n };\n\n var getLabel = function(item) {\n if (!item) return null;\n if (scope.labelFunc)\n return scope.labelFunc({\n item: item,\n });\n if (!scope.label) return item;\n return item[scope.label];\n };\n\n scope.onSelect = function(i) {\n scope.selected = i;\n scope.value = i != null ? i.value : null;\n scope.view2model(scope.value);\n };\n scope.clearSelected = function() {\n scope.onSelect(null);\n };\n\n function mapOptions() {\n scope.options =\n !scope.orgOptions || !angular.isArray(scope.orgOptions)\n ? []\n : scope.orgOptions.map(function(val) {\n return {\n value: val,\n label: getLabel(val),\n };\n });\n scope.selected = findSelected(scope.value) || scope.value;\n }\n mapOptions();\n scope.$watchCollection('orgOptions', function(newValue, oldValue) {\n mapOptions();\n if (scope.autoSelect == 'true' && scope.options.length === 1 && !scope.selected)\n scope.onSelect(scope.options[0]);\n });\n\n scope.onChange = function() {\n if (scope.allowInvalid && typeof scope.selected === 'string') {\n scope.value = scope.selected;\n scope.view2model(scope.selected);\n }\n };\n //Clear textbox if value is not in option list\n scope.onBlur = function() {\n if (scope.selected == null) return;\n if (scope.allowInvalid && typeof scope.selected === 'string') {\n scope.value = scope.selected;\n scope.view2model(scope.selected);\n }\n if (!scope.allowInvalid && scope.options.indexOf(scope.selected) < 0)\n scope.onSelect(null);\n };\n },\n };\n },\n]);\n","import angular from 'angular';\nangular.module('cloudX').directive('uibSearchRelation', [\n '$compile',\n '$parse',\n 'resourceFactorySvc',\n function($compile, $parse, resourceFactorySvc) {\n return {\n restrict: 'A',\n priority: 1001,\n terminal: true,\n //scope: true,\n link: function(scope, el, attrs) {\n var relationResource = resourceFactorySvc.get('relation');\n\n el.removeAttr('uib-search-relation'); //Remove own attribute to prevent endless compile loop\n\n const ignoreAliasGetter = $parse(attrs.ignoreAlias);\n\n scope.ignoreAlias = ignoreAliasGetter(scope);\n\n scope.$watch(\n function() {\n return ignoreAliasGetter(scope);\n },\n function(newVal, _) {\n scope.ignoreAlias = newVal;\n },\n );\n\n el.attr(\n 'uib-typeahead',\n 'item as (item | relationName:null:null:ignoreAlias | sanitize) for item in $uibSearchCustomer($viewValue)',\n );\n\n el.attr('id', 'RelationField');\n el.attr('typeahead-select-on-exact', 'true');\n el.attr('typeahead-min-length', '2');\n el.attr(\n 'typeahead-template-url',\n 'assets/templates/common/directives/uibSearchRelationTemplate.tpl.html',\n );\n el.attr('autocomplete', 'off');\n if (!attrs.placeholder) el.attr('placeholder', \"{{'Search relation'|translate}}\");\n\n scope.$uibSearchCustomerRequest = null;\n scope.$uibSearchCustomer = function(searchValue) {\n //Cancel previous request, cancelling a completed request will have no effect\n if (scope.$uibSearchCustomerRequest && scope.$uibSearchCustomerRequest.$cancelRequest)\n scope.$uibSearchCustomerRequest.$cancelRequest();\n\n var params = {\n take: 20,\n includeInactive: false,\n crmTypes: [],\n type: null,\n forInvoice: false,\n };\n if (attrs.searchOptions) {\n angular.extend(params, $parse(attrs.searchOptions)(scope));\n }\n params.searchValue = searchValue;\n scope.$uibSearchCustomerRequest = relationResource.names(params);\n return scope.$uibSearchCustomerRequest.$promise;\n };\n return $compile(el)(scope);\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('uiSelectContainer', [\n '$timeout',\n function($timeout) {\n return {\n restrict: 'C',\n require: ['uiSelect', '?^form'],\n link: function(scope, element, attrs, ctrl) {\n var $select = ctrl[0];\n var form = ctrl[1];\n if (!form) return;\n\n $timeout(function() {\n ///Open ui select on focus\n if (!$select.open) $select.toggle();\n ///Submit on select\n $select.onSelectCallback = function() {\n form.$submit();\n };\n });\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('updateOnEnter', function() {\n return {\n restrict: 'A',\n require: 'ngModel',\n link: function(scope, element, attrs, ctrl) {\n element.on('keyup', function(ev) {\n if (ev.keyCode == 13) {\n ctrl.$commitViewValue();\n scope.$apply(ctrl.$setTouched);\n }\n });\n },\n };\n});\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxUserSelect', function() {\n return {\n restrict: 'E',\n template:\n '' +\n '' +\n '' +\n '' +\n '',\n scope: {\n value: '=data',\n beforeSave: '&',\n afterSave: '&',\n disabled: '=?',\n },\n controller: [\n '$scope',\n 'dataCache',\n function($scope, dataCache) {\n $scope.users = dataCache\n .getArray('user')\n .filter(x => x.isActive || !x.hidden)\n .map(({ userID, firstName, lastName, isActive }) => ({\n id: userID,\n name: `${firstName} ${lastName}`,\n text: (isActive ? '' : 'âš  ') + `${firstName} ${lastName}`,\n isActive,\n }));\n $scope.findUser = function(userId) {\n if (!userId) return null;\n return dataCache.getObject('user')[userId];\n };\n $scope.getUserName = function(value) {\n const user = $scope.findUser(value);\n if (!user) return '';\n return `${user.firstName} ${user.lastName}`;\n };\n $scope.handleAfterSave = function(value) {\n $scope.label = $scope.getUserName(value);\n $scope.afterSave({ newValue: value });\n };\n $scope.label = $scope.getUserName($scope.value);\n\n $scope.isInactiveUser = function() {\n const user = $scope.findUser($scope.value);\n if (!user) return false;\n return !user.isActive;\n };\n $scope.invalidUser = function() {\n const user = $scope.findUser($scope.value);\n if (!user) return false;\n if (user.isActive) return false;\n return !!user.hidden;\n };\n },\n ],\n };\n});\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxUserSetting', [\n function() {\n return {\n restrict: 'A',\n scope: {\n data: '=cxUserSetting',\n key: '@settingKey',\n },\n controller: [\n '$scope',\n 'userData',\n function($scope, userData) {\n if (!$scope.key) return;\n\n $scope.$watch('data', function(newValue, oldValue) {\n if (newValue !== oldValue) userData.set($scope.key, newValue);\n });\n\n //Load setting from userData\n var data = userData.get($scope.key, null);\n if (data != null) $scope.data = data;\n },\n ],\n };\n },\n]);\n","import { dynamicSort } from '@/shared/utils/dynamicSort';\nimport guid, { guid1 } from '@/shared/utils/guid';\nimport angular from 'angular';\n\nangular.module('cloudX').directive('cxUserTypeahead', [\n 'dataCache',\n '$translate',\n function(dataCache, $translate) {\n return {\n restrict: 'E',\n replace: true,\n template: `
    \n
    \n \n \n \n \n \n
    \n \n \n
    `,\n scope: {\n placeholder: '@?',\n showUnassigned: '@?',\n showSystemUser: '@?',\n extraOptions: '=?', //Make sure to only render control if the extraOptions are initialised. (ng-if=\"!!extraOptions\")\n },\n require: 'ngModel',\n link: function($scope, el, attrs, ngModel) {\n if (!ngModel) return;\n $scope.unassignedUser = $scope.showUnassigned\n ? {\n id: guid.empty,\n label: $translate.instant('Unassigned'),\n isActive: true,\n }\n : null;\n $scope.systemUser = $scope.showSystemUser\n ? {\n id: guid1,\n label: $translate.instant('SystemUser'),\n isActive: true,\n }\n : null;\n\n $scope.options = dataCache\n .getArray('user')\n .filter(x => x.isActive || !x.hidden)\n .map(({ userID, firstName, lastName, isActive }) => ({\n id: userID,\n label: `${firstName} ${lastName}`,\n isActive,\n }))\n .sort(dynamicSort('label'));\n\n $scope.allOptions = [\n $scope.unassignedUser,\n $scope.systemUser,\n ...($scope.extraOptions || []).filter(x => x.id && x.label),\n ...$scope.options,\n ].filter(x => !!x);\n\n $scope.limit = $scope.$eval(attrs.limit) || 10;\n $scope.selectOnBlur = angular.isDefined(attrs.selectOnBlur)\n ? $scope.$eval(attrs.selectOnBlur) || attrs.selectOnBlur\n : true;\n $scope.selectOnExact = angular.isDefined(attrs.selectOnExact)\n ? $scope.$eval(attrs.selectOnExact) || attrs.selectOnExact\n : true;\n $scope.showAll = false;\n\n var findOption = function(id) {\n if (id == null || $scope.allOptions.length === 0) return null;\n\n return $scope.allOptions.find(function(el) {\n return el.id === id;\n });\n };\n\n $scope.currentUser = findOption(dataCache.getArray('employee').userID);\n\n $scope.onSelect = function(item) {\n if (item !== null) {\n $scope.selected = item;\n $scope.value = item.id;\n ngModel.$setViewValue(item.id);\n } else {\n $scope.value = null;\n $scope.selected = null;\n ngModel.$setViewValue(null);\n }\n };\n $scope.onBlur = function() {\n if ($scope.selected != null && $scope.selected.id != null) return;\n $scope.value = null;\n $scope.selected = null;\n ngModel.$setViewValue(null);\n };\n\n ngModel.$render = function() {\n $scope.value = ngModel.$viewValue;\n $scope.selected = findOption($scope.value);\n };\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxVatNumber', [\n function() {\n return {\n restrict: 'E',\n template: require('./vatNumber.html'),\n scope: {\n field: '=',\n relation: '=',\n save: '&',\n disabled: '=?',\n },\n controller: [\n '$scope',\n '$timeout',\n 'flySvc',\n function($scope, $timeout, flySvc) {\n $scope.maskOptions = {\n clearOnBlur: false,\n };\n $scope.identifier = 'vatNumber-' + $scope.$id;\n\n $scope.oldValue = $scope.relation[$scope.field.id].value;\n $scope.setFocus = function(id) {\n angular.element(document.querySelector('#' + id)).focus();\n };\n\n function setStatus() {\n $scope.status = 2;\n\n if ($scope.relation[$scope.field.id].value === null)\n $scope.status = -1;\n if ($scope.relation[$scope.field.id].value === 'VatPending')\n $scope.status = 0;\n else if ($scope.relation[$scope.field.id].value === '')\n $scope.status = 1;\n }\n setStatus();\n\n $scope.changeFormState = function() {\n if ($scope.status === 0) {\n $scope.vatForm.$cancel();\n $scope\n .save({\n newValue: 'VatPending',\n })\n .then(function() {\n $scope.relation[$scope.field.id].value = 'VatPending';\n $scope.oldValue = 'VatPending';\n });\n } else if ($scope.status === 1) {\n $scope.vatForm.$cancel();\n $scope\n .save({\n newValue: '',\n })\n .then(function() {\n $scope.relation[$scope.field.id].value = '';\n $scope.oldValue = '';\n });\n } else if ($scope.status === 2) {\n //When no VAT liability => show form.\n $timeout(function() {\n $scope.setFocus('vatString');\n }, 50);\n }\n };\n\n $scope.handleEsc = function($event) {\n if ($event.keyCode === 27) {\n $scope.relation[$scope.field.id].value = $scope.oldValue;\n setStatus();\n $scope.vatForm.$cancel();\n }\n };\n\n $scope.vatStringClick = function() {\n if ($scope.status === 2) return;\n $scope.status = 2;\n $timeout(function() {\n $scope.setFocus('vatString');\n }, 50);\n };\n\n $scope.submit = function($data) {\n $scope.field.invalid = false;\n if ($scope.status === 0) {\n return $scope.save({\n newValue: 'VatPending',\n });\n } else if ($scope.status === 1) {\n return $scope.save({\n newValue: '',\n });\n } else {\n // If no value is returned (empty string) we need to save null (if vatNumber is not required).\n // (Convention: null = not filled out, \"\" = not VAT liable, \"VatPending\" = pending)\n // BUT if value is undefined entry is incomplete: warning + return '' for xEditable\n if (typeof $data.vatString === 'undefined') {\n $scope.field.invalid = true;\n if ($scope.vatForm.vatString.$error.vatNumber) {\n flySvc.error(14006);\n } else if ($scope.field.inputMask) {\n flySvc.message('msgIncompleteEntryInMaskIsNoSave');\n }\n return '';\n }\n\n if ($data.vatString === '') {\n //If not required, making it empty is allowed => set value to null.\n if (!$scope.field.isRequired) {\n $scope.status = -1;\n return $scope\n .save({\n newValue: null,\n })\n .then(function() {\n $scope.relation[$scope.field.id].value = null;\n $scope.oldValue = null;\n });\n }\n\n //If vatNumber is required, making it empty is not allowed.\n flySvc.error(3000, ['vatNumber']);\n\n return '';\n }\n\n return $scope\n .save({\n newValue: $data.vatString,\n })\n .then(function() {\n $scope.relation[$scope.field.id].value = $data.vatString;\n $scope.oldValue = $data.vatString;\n });\n }\n };\n\n $scope.$on('$destroy', function() {\n if ($scope.vatForm) $scope.vatForm.$cancel();\n });\n },\n ],\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxVatPercentage', [\n 'optionsSvc',\n function(optionsSvc) {\n return {\n restrict: 'E',\n replace: true,\n template:\n '',\n scope: {\n vat: '=data',\n },\n controller: [\n '$scope',\n function($scope) {\n $scope.percentages = optionsSvc.getOptions('vatPercentage');\n },\n ],\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').component('cxVatRateTypeSelect', {\n bindings: {\n vatRate: '<',\n vatType: '<',\n onChange: '&',\n disabled: '<',\n inputClass: '@',\n },\n controller: [\n '$scope',\n 'optionsSvc',\n 'enumCacheSvc',\n function($scope, optionsSvc, enumCacheSvc) {\n const ctrl = this;\n ctrl.vatTypes = [];\n ctrl.internalValue = '';\n ctrl.percentages = optionsSvc.getOptions('vatPercentage');\n enumCacheSvc.get('vatType').then(data => {\n ctrl.vatTypes = data.filter(x => x.key !== 0);\n });\n\n ctrl.setInternalValue = function() {\n if (ctrl.vatType === null || ctrl.vatRate === null) {\n this.internalValue = null;\n return;\n }\n let vatType = ctrl.vatType;\n if (ctrl.vatRate > 0) vatType = 0;\n let vatRate = '0';\n if (vatType === 0) {\n const vat = ctrl.percentages.find(x => x.value === ctrl.vatRate);\n if (vat) vatRate = vat.label;\n }\n ctrl.internalValue = `${vatType};${vatRate}`;\n };\n ctrl.save = function() {\n if (!ctrl.internalValue) {\n ctrl.onChange({ vatRate: null, vatType: null });\n return;\n }\n const [type, vat] = ctrl.internalValue.split(';');\n let vatType = parseInt(type);\n let vatRate = 0;\n if (vatType === 0) {\n const percentage = ctrl.percentages.find(x => x.label === vat);\n if (percentage) vatRate = percentage.value;\n }\n ctrl.onChange({ vatRate, vatType });\n };\n\n ctrl.$onChanges = function() {\n ctrl.setInternalValue();\n };\n },\n ],\n template: ``,\n});\n","import angular from 'angular';\n\nangular.module('cloudX').component('cxVatRateTypeXedit', {\n transclude: true,\n bindings: {\n vatRate: '<',\n vatType: '<',\n onChange: '&',\n disabled: '<',\n },\n controller: [\n '$scope',\n 'optionsSvc',\n 'enumCacheSvc',\n 'translateListFilter',\n 'percentageFilter',\n '$q',\n function($scope, optionsSvc, enumCacheSvc, translateListFilter, percentageFilter, $q) {\n const ctrl = this;\n ctrl.vatTypes = [];\n ctrl.options = [];\n ctrl.internalValue = '';\n ctrl.displayValue = '';\n ctrl.percentages = optionsSvc.getOptions('vatPercentage');\n enumCacheSvc.get('vatType').then(data => {\n ctrl.vatTypes = data.filter(x => x.key !== 0);\n ctrl.options = [\n ...ctrl.percentages.map(x => ({\n id: `0;${x.label}`,\n label: percentageFilter(x.value, 0),\n vatType: 0,\n vatRate: x.value,\n })),\n ...ctrl.vatTypes.map(x => ({\n id: `${x.key};0`,\n label: translateListFilter(x.key, 'vatType', x.name),\n vatType: x.key,\n vatRate: 0,\n })),\n ];\n ctrl.setDisplayValue();\n });\n\n ctrl.setInternalValue = function() {\n if (ctrl.vatType === null || ctrl.vatRate === null) {\n this.internalValue = null;\n return;\n }\n let vatType = ctrl.vatType;\n if (ctrl.vatRate > 0) vatType = 0;\n let vatRate = '0';\n if (vatType === 0) {\n const vat = ctrl.percentages.find(x => x.value === ctrl.vatRate);\n if (vat) vatRate = vat.label;\n }\n ctrl.internalValue = `${vatType};${vatRate}`;\n };\n\n ctrl.setDisplayValue = function() {\n if (!ctrl.internalValue) {\n ctrl.displayValue = null;\n return;\n }\n const { label = null } = ctrl.options.find(x => x.id === ctrl.internalValue) || {};\n ctrl.displayValue = label;\n };\n ctrl.save = function(value) {\n if (!value) {\n return $q.when(ctrl.onChange({ vatRate: null, vatType: null }));\n }\n const { vatType = null, vatRate = null } = ctrl.options.find(x => x.id === value);\n return $q.when(ctrl.onChange({ vatRate, vatType }));\n };\n\n ctrl.$onChanges = function() {\n ctrl.setInternalValue();\n ctrl.setDisplayValue();\n };\n },\n ],\n\n template: `\n \n {{$ctrl.displayValue}}\n \n \n `,\n});\n","import angular from 'angular';\nimport { getZendeskUrl, getMyTicketsUrl } from '@/shared/components/ZendeskHelp';\n\nangular.module('cloudX').directive('cxZendeskHelp', [\n function() {\n return {\n restrict: 'E',\n replace: true,\n template: `\n \n `,\n scope: {\n article: '@',\n getArticle: '&',\n section: '@',\n anchor: '@',\n },\n controller: [\n '$scope',\n '$translate',\n '$window',\n '$rootScope',\n function($scope, $translate, $window, $rootScope) {\n $scope.formatUrl = () => {\n $scope.formattedUrl = $scope.article\n ? getZendeskUrl($scope.article, $translate.use(), false, $scope.anchor)\n : $scope.section\n ? getZendeskUrl($scope.section, $translate.use(), true)\n : getZendeskUrl($scope.getArticle(), $translate.use(), false, $scope.anchor);\n };\n\n $scope.formatUrl();\n\n //Listen to global language change event\n var deregistration = $rootScope.$on('$translateChangeSuccess', function() {\n $scope.formatUrl();\n });\n $scope.$on('$destroy', deregistration);\n },\n ],\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxRelationAdministrativeCost', function() {\n return {\n restrict: 'E',\n replace: true,\n bindToController: {\n onbeforesave: '&',\n onaftersave: '&',\n },\n template: `
    \n
    \n \n
    \n
    \n\n \n \n
    \n
    \n \n \n
    \n
    `,\n require: ['ngModel', 'cxRelationAdministrativeCost'],\n link: function(scope, el, attrs, ctrl) {\n if (!ctrl || ctrl.length !== 2) return;\n var ngModel = ctrl[0];\n var controller = ctrl[1];\n\n controller.view2model = function(value) {\n ngModel.$setViewValue(value);\n };\n\n // when angular detects a change to the model,\n // we update our inner value\n ngModel.$render = function() {\n controller.setValue(ngModel.$viewValue);\n };\n },\n controllerAs: 'ctrl',\n controller: [\n '$q',\n function($q) {\n const ctrl = this;\n\n ctrl.setValue = function(value) {\n ctrl.value = angular.extend(\n {\n administrativeCostMethod: null,\n administrativeCostAmount: null,\n },\n ctrl.value,\n value,\n );\n };\n ctrl.setValue(null);\n ctrl.submit = function($data, field) {\n if (ctrl.value && ctrl.value[field] === $data) return false;\n\n let value = angular.copy(ctrl.value);\n value[field] = $data;\n\n return $q\n .when(\n ctrl.onbeforesave({\n $data: value,\n }),\n )\n .then(function(result) {\n // set amount to 0 if method changed\n if (field === 'administrativeCostMethod') {\n value = {\n administrativeCostAmount: 0,\n administrativeCostMethod: $data,\n };\n }\n if (typeof result === 'string') return result;\n if (result !== false) {\n //Update model\n if (ctrl.view2model) {\n ctrl.view2model(value);\n }\n }\n ctrl.onaftersave({\n $data: value,\n });\n return result;\n });\n };\n },\n ],\n };\n});\n","import angular from 'angular';\nimport { isGuid } from '@/shared/utils/guid';\n\nangular.module('cloudX').directive('cxRelationSelect', [\n '$http',\n 'appUrls',\n '$timeout',\n 'relationNameFilter',\n 'recentRelationsSvc',\n function($http, appUrls, $timeout, relationNameFilter, recentRelationsSvc) {\n return {\n restrict: 'E',\n require: '^ngModel',\n replace: true,\n scope: {\n searchOptions: '=?',\n withInvoiceStream: '@',\n iClass: '@?',\n ngDisabled: '=?',\n },\n template: `
    \n
    \n \n \n \n \n \n
    \n \n
    `,\n link: function(scope, element, attrs, ngModel) {\n if (!ngModel) return;\n scope.value = null;\n scope.relation = null;\n\n scope.selectRecentRelation = function(relation) {\n if (!relation || !relation.id) return scope.setValue(null);\n if (!scope.withInvoiceStream) return scope.setValue(relation);\n $http\n .post(`${appUrls.api}/api/relation/names`, [relation.id], {\n params: { forInvoice: scope.searchOptions.forInvoice },\n })\n .then(\n ({ data = null }) => {\n const [relation] = data;\n if (!relation) return scope.setValue(null);\n\n scope.relation = relation;\n scope.value = relation;\n ngModel.$setViewValue(relation);\n },\n () => {\n scope.setValue(null);\n },\n );\n };\n\n scope.setValue = function(relation) {\n if (!relation || !relation.id) {\n scope.relation = null;\n scope.value = null;\n ngModel.$setViewValue(null);\n } else {\n scope.relation = relation;\n scope.value = relation;\n ngModel.$setViewValue(relation);\n }\n };\n scope.clear = function() {\n scope.value = null;\n scope.relation = null;\n ngModel.$setViewValue(null);\n };\n scope.handleBlur = function() {\n $timeout(function() {\n if (scope.value && !scope.value.id) {\n scope.clear(); //Clear value on blur\n }\n }, 500);\n };\n scope.recentRelationsToggle = function(open) {\n if (open && !scope.recentRelations) {\n scope.recentRelations = recentRelationsSvc.getFiltered(scope.searchOptions);\n }\n };\n scope.recentRelations = recentRelationsSvc.getFiltered(scope.searchOptions);\n if (!scope.recentRelations.length) recentRelationsSvc.reloadRecentRelations();\n\n const initByRelationById = id => {\n return $http\n .post(`${appUrls.api}/api/relation/names`, [id], {\n params: { forInvoice: scope.searchOptions.forInvoice },\n })\n .then(\n ({ data = null }) => {\n if (data) {\n const [relation] = data;\n if (relation) {\n scope.relation = relation;\n scope.value = relation;\n ngModel.$setViewValue(relation);\n return relation;\n }\n }\n\n scope.relation = null;\n scope.value = null;\n ngModel.$setViewValue(null);\n },\n () => {\n scope.relation = null;\n scope.value = null;\n ngModel.$setViewValue(null);\n },\n );\n };\n\n ngModel.$render = function() {\n const value = ngModel.$viewValue;\n if (!value) {\n scope.relation = null;\n scope.value = null;\n return;\n }\n if (typeof value === 'string' && isGuid(value)) {\n initByRelationById(value);\n return;\n }\n if (!value.id) {\n scope.relation = null;\n scope.value = null;\n return;\n }\n if (!value.name) {\n initByRelationById(value.id);\n return;\n }\n if (scope.withInvoiceStream && !value.invoiceStreams) {\n initByRelationById(value.id);\n return;\n }\n\n scope.relation = value;\n scope.value = value;\n };\n },\n };\n },\n]);\n","import angular from 'angular';\nimport guid from '../../../shared/utils/guid';\n\nangular.module('cloudX').directive('cxRelationGroupPicker', [\n '$filter',\n '$rootScope',\n '$http',\n 'appUrls',\n function($filter, $rootScope, $http, appUrls) {\n return {\n restrict: 'E',\n replace: true,\n scope: true,\n template: `
    \n \n \n \n
    `,\n require: 'ngModel',\n link: function($scope, el, attrs, ngModel) {\n if (!ngModel) return;\n $scope.keyProperty = attrs.keyProperty || 'id';\n $scope.showWithoutGroups = attrs.showWithoutGroups || false;\n\n $scope.selected = [];\n $scope.options = [];\n $scope.loaded = false;\n $scope.tmpValue = null;\n var findOption = function(code) {\n if (code == null || $scope.options.length === 0) return null;\n return $scope.options.find(function(el) {\n return el[$scope.keyProperty] === code;\n });\n };\n\n $scope.loadGroups = function() {\n return $http.get(`${appUrls.api}/api/RelationGroup/GetAll`).then(({ data }) => {\n $scope.options = data || [];\n if ($scope.showWithoutGroups) {\n $scope.options.unshift({\n id: guid.empty,\n name: $filter('translate')('WithoutRelationGroup'),\n });\n }\n if ($scope.tmpValue) {\n $scope.selected = $scope.tmpValue.map(x => findOption(x));\n $scope.tmpValue = null;\n }\n $scope.loaded = true;\n });\n };\n\n $scope.getSuggestions = function(search) {\n if (!$scope.loaded)\n return $scope.loadGroups().then(() => {\n return $filter('filter')($scope.options, search);\n });\n return $filter('filter')($scope.options, search);\n };\n\n $scope.updateValue = function() {\n ngModel.$setViewValue(\n attrs.objectAsModel ? $scope.selected : $scope.selected.map(x => x[$scope.keyProperty]),\n );\n };\n\n ngModel.$render = function() {\n var value = ngModel.$viewValue;\n if (value !== null && typeof value !== 'undefined' && angular.isArray(value)) {\n if (!$scope.loaded) {\n $scope.tmpValue = value;\n $scope.loadGroups();\n } else {\n $scope.selected = value.map(x => findOption(x));\n }\n }\n };\n },\n };\n },\n]);\n","import { dynamicSort } from '@/shared/utils/dynamicSort';\nimport angular from 'angular';\n\nangular.module('cloudX').directive('cxRelationGroupSelect', function() {\n return {\n restrict: 'E',\n template: `\n \n {{selected.name}}\n \n `,\n scope: {\n value: '=data',\n onSave: '&',\n disabled: '=?',\n },\n controller: [\n '$http',\n 'appUrls',\n '$scope',\n 'flySvc',\n 'dialogsSvc',\n 'checkSecurity',\n function($http, appUrls, $scope, flySvc, dialogsSvc, checkSecurity) {\n $scope.selected = null;\n var findOption = function(code) {\n if (code == null || $scope.options.length === 0) return null;\n return $scope.options.find(function(el) {\n return el.id === code;\n });\n };\n $http.get(`${appUrls.api}/api/RelationGroup/GetAll`).then(({ data }) => {\n $scope.options = data;\n $scope.selected = findOption($scope.value);\n });\n\n $scope.save = function(newValue) {\n if (!newValue || !newValue.id) {\n if (typeof newValue === 'string' && newValue !== '') {\n if (!checkSecurity('Tags:c')) {\n return '';\n }\n return dialogsSvc\n .showYesNo('AddRelationGroup', 'msgCreateRelationGroup', { value: newValue })\n .then(\n function() {\n return $http\n .post(`${appUrls.api}/api/RelationGroup`, {\n name: newValue,\n })\n .then(({ data }) => {\n if (!data) return '';\n $scope.options.push(data);\n $scope.options.sort(dynamicSort('name'));\n $scope.selected = data;\n return $scope.onSave({ newValue: data.id });\n });\n },\n error => {\n if (error) flySvc.error(error);\n return '';\n },\n );\n }\n $scope.selected = null;\n return $scope.onSave({ newValue: null });\n }\n\n return $scope.onSave({ newValue: newValue.id });\n };\n $scope.commitValue = function() {\n $scope.value = $scope.selected?.id;\n };\n\n $scope.$watch('value', () => {\n if ($scope.options) $scope.selected = findOption($scope.value);\n });\n },\n ],\n };\n});\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxRelationGroupTypeahead', [\n '$filter',\n '$rootScope',\n '$http',\n 'appUrls',\n function($filter, $rootScope, $http, appUrls) {\n return {\n restrict: 'E',\n replace: true,\n template: `\n
    \n
    \n \n \n \n \n
    \n \n
    `,\n require: 'ngModel',\n link: function($scope, el, attrs, ngModel) {\n if (!ngModel) return;\n $scope.options = [];\n $http.get(`${appUrls.api}/api/RelationGroup/GetAll`).then(({ data }) => {\n $scope.options = data;\n $scope.selected = findOption($scope.value);\n });\n\n $scope.limit = $scope.$eval(attrs.limit) || 10;\n $scope.selectOnBlur = angular.isDefined(attrs.selectOnBlur)\n ? $scope.$eval(attrs.selectOnBlur) || attrs.selectOnBlur\n : true;\n $scope.selectOnExact = angular.isDefined(attrs.selectOnExact)\n ? $scope.$eval(attrs.selectOnExact) || attrs.selectOnExact\n : true;\n\n var findOption = function(code) {\n if (code == null || $scope.options.length === 0) return null;\n return $scope.options.find(function(el) {\n return el.id === code;\n });\n };\n\n $scope.onSelect = function(item) {\n $scope.selected = item;\n $scope.value = item.id;\n ngModel.$setViewValue(item.id);\n };\n $scope.onBlur = function() {\n if ($scope.selected != null && $scope.selected.id != null) return;\n $scope.value = null;\n $scope.selected = null;\n ngModel.$setViewValue(null);\n };\n\n ngModel.$render = function() {\n $scope.value = ngModel.$viewValue;\n $scope.selected = findOption($scope.value);\n };\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular\n .module('cxTaskflow')\n .controller('ResetTaskAssignedToDialogCtrl', [\n '$element',\n '$filter',\n 'close',\n 'dataCache',\n 'enumCacheSvc',\n 'translateListFilter',\n 'oldUserId',\n 'newUserId',\n 'tasksForUser',\n 'profile',\n resetTaskAssignedToDialogCtrl,\n ]);\n\nfunction resetTaskAssignedToDialogCtrl(\n $element,\n $filter,\n close,\n dataCache,\n enumCacheSvc,\n translateListFilter,\n oldUserId,\n newUserId,\n tasksForUser,\n profile,\n) {\n var vm = this;\n vm.profile = profile;\n vm.profiles = [];\n vm.hasTasksAssignedToOldUser = tasksForUser > 0;\n vm.replaceAllUsers = !vm.hasTasksAssignedToOldUser;\n vm.showUserSelector = !newUserId; //Only show user selector if the user is set unassigned\n\n vm.assignedTo = {\n assignedType: 0,\n userId: null,\n profile: null,\n };\n vm.oldUserName = '';\n vm.newUserName = '';\n\n dataCache.ready().then(function() {\n const users = dataCache.getArray('user');\n const oldUser = oldUserId ? users.find(x => x.userID === oldUserId) : null;\n if (oldUser) {\n vm.oldUserName = oldUser.firstName + ' ' + oldUser.lastName;\n }\n const newUser = newUserId ? users.find(x => x.userID === newUserId) : null;\n if (newUser) {\n vm.newUserName = newUser.firstName + ' ' + newUser.lastName;\n\n vm.assignedTo.assignedType = 2;\n vm.assignedTo.userId = newUserId;\n }\n vm.users = users\n .filter(x => x.isActive || !x.hidden)\n .filter(x => x.userID !== oldUserId)\n .map(function(user) {\n return {\n id: user.userID,\n label: `${user.firstName} ${user.lastName}`,\n isActive: user.isActive,\n };\n })\n .sortByProperty('name');\n enumCacheSvc.get('employeeprofile').then(function(data) {\n vm.profiles = data.map(({ key, value }) => ({\n id: key,\n value,\n label: translateListFilter(key, 'employeeprofile', value),\n }));\n });\n });\n\n vm.save = function() {\n $element.modal('hide');\n //Extract userid\n const { userId, ...rest } = vm.assignedTo;\n close(\n {\n ...rest,\n newUserId: userId,\n oldUserId: vm.replaceAllUsers ? null : oldUserId,\n },\n 500,\n );\n };\n\n vm.cancel = function() {\n $element.modal('hide');\n close(null, 500);\n };\n}\n","import angular from 'angular';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\n\nangular.module('cloudX').directive('cxUserPicker', [\n '$filter',\n '$rootScope',\n 'resourceFactorySvc',\n '$q',\n 'dataCache',\n function($filter, $rootScope, resourceFactorySvc, $q, dataCache) {\n return {\n restrict: 'E',\n replace: true,\n template: `
    \n \n \n \n
    `,\n scope: { placeholder: '@?' },\n require: 'ngModel',\n link: function($scope, el, attrs, ngModel) {\n if (!ngModel) return;\n $scope.keyProperty = attrs.keyProperty || 'id';\n\n $scope.selected = [];\n $scope.options = [];\n $scope.tmpValue = null;\n\n dataCache.ready().then(function() {\n $scope.options = dataCache\n .getArray('user')\n .filter(x => x.isActive || !x.hidden)\n .map(u => ({\n id: u.userID,\n name: `${u.firstName} ${u.lastName}`,\n text: (u.isActive ? '' : 'âš  ') + `${u.firstName} ${u.lastName}`,\n isActive: u.isActive,\n }))\n .sort(dynamicSort('name'));\n });\n var findOption = function(code) {\n if (code == null || $scope.options.length === 0) return null;\n return $scope.options.find(function(el) {\n return el[$scope.keyProperty] === code;\n });\n };\n\n $scope.getSuggestions = function(search) {\n return $filter('filter')($scope.options, search);\n };\n\n $scope.updateValue = function() {\n ngModel.$setViewValue($scope.selected.map(x => x[$scope.keyProperty]));\n };\n\n ngModel.$render = function() {\n var value = ngModel.$viewValue;\n if (value !== null && typeof value !== 'undefined' && angular.isArray(value)) {\n $scope.selected = value.map(x => findOption(x));\n }\n };\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxEnumPickerXedit', function() {\n return {\n restrict: 'E',\n template: `\n {{displayValue}}\n \n `,\n scope: {\n value: '=data',\n type: '@',\n placeholder: '@?',\n save: '&',\n },\n controller: [\n '$scope',\n '$rootScope',\n '$filter',\n '$timeout',\n function($scope, $rootScope, $filter, $timeout) {\n $scope.displayValue = '';\n $scope.innerValue = [];\n if (angular.isUndefined($scope.beforeSave)) $scope.beforeSave = angular.noop;\n\n $scope.innerSave = function(value) {\n $timeout(function() {\n $scope.save({ $data: value });\n $scope.setDisplayValue(value);\n }, 100);\n };\n\n $scope.setDisplayValue = function(value) {\n if (typeof value === 'string') {\n if (value.includes('[') && value.includes(']')) {\n value = JSON.parse(value).filter(x => x !== '');\n } else {\n value = value\n .replace(/\\s/g, '')\n .split(',')\n .filter(x => x !== '');\n }\n }\n\n $scope.displayValue = (value || [])\n .map(x => $filter('translateList')(x, $scope.type, x))\n .join(', ');\n };\n\n $scope.readValue = function() {\n var value = $scope.value;\n if (typeof value === 'string') {\n if (value === '') {\n value = [];\n } else {\n if (value.includes('[') && value.includes(']')) {\n value = JSON.parse(value).filter(x => x !== '');\n } else {\n value = value\n .replace(/\\s/g, '')\n .split(',')\n .filter(x => x !== '');\n if (value.length) {\n value = value.map(x => parseInt(x));\n }\n }\n }\n }\n\n if (angular.isArray(value)) {\n $scope.innerValue = value;\n } else {\n $scope.innerValue = [];\n }\n };\n\n $scope.$watch(\n 'value',\n function(newValue, oldValue) {\n $scope.readValue();\n $scope.setDisplayValue(newValue);\n },\n true,\n );\n },\n ],\n };\n});\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxStringAsEnumList', [\n function() {\n return {\n restrict: 'E',\n template:\n ' {{item | translateList: type}}, ',\n scope: {\n value: '=',\n type: '@',\n },\n controller: [\n '$scope',\n function($scope) {\n $scope.valueArray = $scope.value\n ? $scope.value\n .replace(/\\s/g, '')\n .split(',')\n .filter(x => x !== '')\n : [];\n },\n ],\n };\n },\n]);\n","import angular from 'angular';\nimport moment from 'moment';\n\nangular.module('cloudX').directive('cxYearSelect', [\n '$translate',\n function($translate) {\n return {\n restrict: 'E',\n template: `\n \n \n \n `,\n scope: {\n required: '@',\n placeholder: '@',\n inputClass: '@',\n inputId: '@',\n withoutOption: '@',\n },\n require: 'ngModel',\n link: function($scope, el, attrs, ngModel) {\n if (!ngModel) return;\n\n $scope.options = [];\n\n $scope.resetOptions = () => {\n $scope.options = [];\n const currentYear = moment.utc().year();\n const yearsInPast = angular.isDefined(attrs.yearsInPast)\n ? parseInt($scope.$eval(attrs.yearsInPast) || attrs.yearsInPast)\n : 5;\n const yearsInFuture = angular.isDefined(attrs.yearsInFuture)\n ? parseInt($scope.$eval(attrs.yearsInFuture) || attrs.yearsInFuture)\n : 1;\n\n const startYear = currentYear - Math.max(0, yearsInPast || 0);\n const endYear = currentYear + Math.max(0, yearsInFuture || 0);\n\n for (let y = startYear; y <= endYear; y++) {\n $scope.options.push(y);\n }\n\n if ($scope.value && $scope.value !== 0 && $scope.options.indexOf($scope.value) < 0) {\n $scope.options.push($scope.value);\n }\n };\n ngModel.$render = function() {\n $scope.value = ngModel.$viewValue;\n if (\n $scope.options.length === 0 ||\n ($scope.value && $scope.options.indexOf($scope.value) < 0)\n )\n $scope.resetOptions();\n };\n $scope.setValue = function(value) {\n if ((value === '0' || value === 0) && !!$scope.withoutOption) {\n ngModel.$setViewValue(0);\n return;\n }\n\n if (!value || value < 2000) {\n ngModel.$setViewValue(null);\n } else {\n ngModel.$setViewValue(parseInt(value));\n }\n };\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxNaceCodeInputXedit', [\n '$filter',\n '$http',\n 'appUrls',\n 'dataCache',\n function($filter, $http, appUrls, dataCache) {\n return {\n restrict: 'E',\n template: `
    \n
    \n
    \n \n
    \n \n  \n  \n \n
    \n
    \n \n
    `,\n scope: {\n value: '=data',\n save: '&',\n readonly: '=?',\n },\n link: function(scope) {\n scope.innerValue = [];\n scope.tags = dataCache\n .getArray('nace')\n .filter(x => x.code !== '')\n .map(x => ({\n ...x,\n displayValue: `${x.code} ${x.name}`,\n }));\n\n scope.displayValue = '';\n scope.addCssClass = match => {\n const naceCode = scope.tags.find(x => x.displayValue === match.text);\n if (!naceCode) return null;\n return `nace-level-${naceCode.level}`;\n };\n\n scope.loadTags = function(search) {\n const filterResult = scope.tags.filter(item =>\n item.displayValue\n .toLowerCase()\n .replace(/\\./g, '')\n .includes(search),\n );\n\n return filterResult.map(x => x.displayValue);\n };\n\n scope.setDisplayValue = function(value) {\n if (typeof value === 'string') value = JSON.parse(value);\n scope.displayValue = (value || []).map(x => x.name).join(', ');\n };\n\n scope.readValue = function() {\n var value = scope.value;\n if (typeof value === 'string') value = JSON.parse(value);\n if (angular.isArray(value)) {\n scope.innerValue = value.map(function(el) {\n return {\n text: el.name,\n };\n });\n } else {\n scope.innerValue = [];\n }\n };\n scope.$watch(\n 'value',\n function(newValue, oldValue) {\n scope.readValue();\n scope.setDisplayValue(newValue);\n },\n true, //Force equal check, doesn't work without it...\n );\n\n scope.beforeSave = function(data) {\n var tags = data.map(function(el) {\n const naceCode = scope.tags.find(x => x.displayValue === el.text);\n\n return el.code;\n });\n return scope\n .save({\n $data: tags,\n })\n .then(\n result => {\n scope.value = result;\n scope.setDisplayValue(result);\n\n return false;\n },\n error => {\n return '';\n },\n );\n };\n },\n };\n },\n]);\n","import angular from 'angular';\nimport { type } from 'os';\n\nangular.module('cloudX').directive('cxNaceCodeDropdown', [\n '$parse',\n 'dataCache',\n function($parse, dataCache) {\n return {\n restrict: 'E',\n replace: true,\n template:\n '
    ' +\n '
    ' +\n ' ' +\n '
    ' +\n ' ' +\n '
    ' +\n '
    ' +\n ' ' +\n '
    ',\n require: 'ngModel',\n scope: {\n orgOptions: '=options',\n label: '@',\n allowInvalidInitialItem: '@?',\n labelFunc: '&?',\n autoSelect: '@?',\n disabled: '=?ngDisabled',\n placeholder: '@?',\n disabledtitle: '@?',\n iClass: '@?',\n },\n link: function(scope, el, attrs, ngModel) {\n if (!ngModel) return;\n\n //Default values\n scope.allowInvalid = false;\n scope.selectOnBlur = angular.isDefined(attrs.selectOnBlur)\n ? $parse(attrs.selectOnBlur)(scope)\n : true;\n scope.selectOnExact = angular.isDefined(attrs.selectOnExact)\n ? $parse(attrs.selectOnExact)(scope)\n : true;\n scope.limit = attrs.limit || 30;\n\n scope.view2model = function(value) {\n ngModel.$setViewValue(value);\n };\n\n function findSelected(value) {\n return value == null || !scope.options.length\n ? null\n : scope.options.find(function(el) {\n //Search on label if scope.value is string\n if (\n typeof el.value !== 'string' &&\n typeof value === 'string' &&\n typeof el.label === 'string'\n )\n return el.label === value;\n\n //Match by id\n if (\n typeof el.value === 'object' &&\n typeof value === 'object' &&\n typeof el.value.id === 'string' &&\n typeof value.id === 'string'\n )\n return angular.equals(el.value.id, value.id);\n return angular.equals(el.value, value);\n });\n }\n\n // when angular detects a change to the model,\n // we update our inner value\n ngModel.$render = function() {\n scope.value = ngModel.$viewValue;\n var selectedItem = findSelected(scope.value);\n if (selectedItem) {\n scope.selected = selectedItem;\n } else if (scope.allowInvalidInitialItem) {\n scope.value = getLabel(scope.value);\n scope.selected = scope.value;\n } else {\n scope.selected = scope.value;\n }\n };\n\n scope.onSelect = function(i) {\n scope.selected = i;\n scope.value = i != null ? i.value : null;\n scope.view2model(scope.value);\n };\n scope.clearSelected = function() {\n scope.onSelect(null);\n };\n\n function mapOptions() {\n const naceCodes = dataCache.getArray('naceCodes');\n scope.options = naceCodes.map(function(val) {\n return {\n value: val.Code,\n label: `${val.Code} - ${val.Name}`,\n };\n });\n scope.selected = findSelected(scope.value) || scope.value;\n }\n\n dataCache.ready().then(function() {\n mapOptions();\n });\n\n scope.onChange = function() {\n if (scope.allowInvalid && typeof scope.selected === 'string') {\n scope.value = scope.selected;\n scope.view2model(scope.selected);\n }\n };\n\n //Clear textbox if value is not in option list\n scope.onBlur = function() {\n if (scope.selected == null) return;\n if (scope.allowInvalid && typeof scope.selected === 'string') {\n scope.value = scope.selected;\n scope.view2model(scope.selected);\n }\n if (!scope.allowInvalid && scope.options.indexOf(scope.selected) < 0)\n scope.onSelect(null);\n };\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxLoading', [\n '$compile',\n function($compile) {\n var loadingSpinner =\n '
    ' +\n '
    ' +\n '
    ' +\n '
    ' +\n '
    ';\n\n return {\n restrict: 'A',\n terminal: true,\n\n link: function(scope, element, attrs) {\n var originalContent = element.html();\n element.html(loadingSpinner);\n\n scope.$watch(attrs.cxLoading, function(val) {\n if (val === false || (val && val !== true)) {\n element.html(originalContent);\n $compile(element.contents())(scope);\n } else {\n element.html(loadingSpinner);\n }\n });\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxLoadingSm', [\n '$compile',\n function($compile) {\n var loadingSpinner =\n '
    ' +\n '
    ' +\n '
    ' +\n '
    ' +\n '
    ' +\n '
    ' +\n '
    ' +\n '
    ' +\n '
    ' +\n '
    ' +\n '
    ' +\n '
    ' +\n '
    ' +\n '
    ';\n\n return {\n restrict: 'A',\n terminal: true,\n\n link: function(scope, element, attrs) {\n var originalContent = element.html();\n element.html(loadingSpinner);\n\n scope.$watch(attrs.cxLoadingSm, function(val) {\n if (val === false || (val && val !== true)) {\n element.html(originalContent);\n $compile(element.contents())(scope);\n } else {\n element.html(loadingSpinner);\n }\n });\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('commonServices').filter('bAnd', function() {\n /*\n Bitwise and operator filter\n usage: number | bAnd:5 <==> (number & 5) === 5\n number | bAnd:5:1 <==> (number & 5) === 1\n */\n return function(firstNumber, secondNumber, compareTo) {\n return (\n (parseInt(firstNumber, 10) & parseInt(secondNumber, 10)) ===\n (typeof compareTo === 'undefined'\n ? parseInt(secondNumber, 10)\n : parseInt(compareTo, 10))\n );\n };\n});\n","import angular from 'angular';\n\nangular.module('cloudX').filter('bytes', [bytesFilter]);\n\nfunction bytesFilter() {\n var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];\n return function(bytes, decimals) {\n if (!bytes) return '0 Bytes';\n var k = 1024,\n dm = typeof decimals === 'undefined' || decimals < 0 ? 2 : decimals,\n i = Math.floor(Math.log(bytes) / Math.log(k));\n return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];\n };\n}\n","import angular from 'angular';\n\nangular.module('commonServices').filter('deviation', [\n '$translate',\n function($translate) {\n return function(input) {\n if (typeof input === 'undefined' || input === null) return '';\n let nr;\n if (typeof input === 'string') nr = parseInt(input, 10);\n if (typeof input === 'number') nr = Math.round(input);\n const sign = input < 0 ? '-' : '+';\n nr = Math.abs(nr); //Make absolute\n const unit = $translate.instant('days'); //If we support other units in the future, this will probably depend on an extra parameter\n return `${sign} ${nr} ${unit}`;\n };\n },\n]);\n","import angular from 'angular';\n\nangular\n .module('commonServices')\n .filter('dynNumber', [\n '$filter',\n function($filter) {\n return function(value, min, max) {\n if (typeof value === 'string') value = parseFloat(value);\n if (value == null || isNaN(value)) return '';\n //return value;\n var fraction = value.getFractionSize();\n if (typeof min !== 'undefined' && min != null) fraction = fraction > min ? fraction : min;\n if (typeof max !== 'undefined' && max != null) fraction = fraction > max ? max : fraction;\n return $filter('number')(value, fraction);\n };\n },\n ])\n .filter('dynCurrency', ['$filter', 'dataCache', dynCurrency]);\nfunction dynCurrency($filter, dataCache) {\n return function(value, min, max) {\n if (typeof value === 'string') value = parseFloat(value);\n if (value == null || isNaN(value)) return '';\n\n var fraction = value.getFractionSize();\n if (typeof min === 'undefined' || min === null) min = 2; //If no minimum passed, set minimum to 2\n if (typeof max === 'undefined' || max === null) max = 2; //If no maximum passed, set maximum to 2\n\n fraction = fraction > min ? fraction : min;\n fraction = fraction > max ? max : fraction;\n\n var amount = $filter('number')(value, fraction);\n return '€ ' + amount;\n };\n}\n","import angular from 'angular';\n\nangular.module('commonServices').filter('edit', function() {\n return function(value) {\n var editSign = '';\n\n if (value === null) return editSign;\n if (value === undefined) return editSign;\n if (value === '') return editSign;\n // empty guid\n if (value === '00000000-0000-0000-0000-000000000000') return editSign;\n // 4 whitespaces returns as well => Empty address\n if (value === ' ') return editSign;\n return value;\n };\n});\n","import angular from 'angular';\n//This filter gets a number of minutes and formats it to 'hh:mm' format.\nangular.module('commonServices').filter('ogm', function() {\n return function(value) {\n if (!value) return;\n if (value.match(/^\\+{3}(\\d{3})\\/(\\d{4})\\/(\\d{5})\\+{3}/gm)) return value;\n const stripped = value.replace(/\\D+/g, '');\n if (stripped.length !== 12) return value; //Value doesn't have the correct size\n return stripped.replace(/^(\\d{3})(\\d{4})(\\d{5})$/, '+++$1/$2/$3+++');\n };\n});\n","import angular from 'angular';\n\nangular.module('cloudX').filter('invoiceStreamName', ['$translate', invoiceStreamName]);\n\nfunction invoiceStreamName($translate) {\n return function(stream, defaultName) {\n if (!stream || typeof stream.assignmentId === 'undefined') return '';\n if (!stream.assignmentId)\n return typeof defaultName !== 'undefined'\n ? defaultName\n : $translate.instant('Default assignment');\n if (!stream.assignmentTemplateId) return stream.assignmentName;\n const key = `assignmenttemplate_${stream.assignmentTemplateId}`;\n const translation = $translate.instant(key, null, null, null, 'escaped');\n return (!translation || key === translation ? null : translation) || stream.assignmentName;\n };\n}\n","import angular from 'angular';\n\nangular.module('cloudX').filter('isActive', [isActiveFilter]);\n\nfunction isActiveFilter() {\n return function(array, current) {\n if (!angular.isArray(array)) {\n return array;\n }\n return array.filter(item => {\n if (item.isActive) return true;\n if (typeof current === 'undefined') return false;\n if (current === null) return false;\n if (typeof current === 'object') {\n if (angular.equals(current, item)) return true;\n if (typeof item.id !== 'undefined' && current.id === item.id) return true;\n return false;\n }\n if (typeof current !== 'string') return false;\n if (typeof item.id !== 'undefined' && item.id === current) return true;\n\n return false;\n });\n };\n}\n","import angular from 'angular';\nimport { isEmptyHtmlField } from '@/shared/utils/validationHelpers';\n\nangular.module('commonServices').filter('isEmpty', function() {\n return function(input) {\n if (typeof input === 'undefined' || input === null) return true;\n if (angular.isString(input) && isEmptyHtmlField(input)) return true;\n if (angular.isString(input)) return input.length === 0;\n if (angular.isArray(input)) return input.length === 0;\n if (angular.isObject(input)) return angular.equals(input, {});\n return true;\n };\n});\n","import angular from 'angular';\nangular.module('commonServices').filter('joinBy', function() {\n return function(input, delimiter, ignoreEmpty) {\n if (ignoreEmpty)\n return (input || [])\n .filter(function(val) {\n return !!val;\n })\n .join(delimiter || ', ');\n return (input || []).join(delimiter || ', ');\n };\n});\n","import angular from 'angular';\n\nangular.module('cloudX').filter('mimeIcon', [mimeIconFilter]);\n\nfunction mimeIconFilter() {\n return function(mime) {\n if (!mime) return 'fa fa-file-o fa-fw';\n var parts = mime.toLowerCase().split('/');\n switch (parts[0]) {\n case 'text':\n if (parts.length === 1) return 'fa fa-file-text-o fa-fw';\n switch (parts[1]) {\n case 'html':\n case 'javascript':\n case 'css':\n return 'fa fa-file-code-o fa-fw';\n default:\n return 'fa fa-file-text-o fa-fw';\n }\n case 'application':\n if (parts.length === 1) return 'fa fa-file-o fa-fw';\n if (parts[1].indexOf('json') >= 0) return 'fa fa-file-code-o fa-fw';\n if (parts[1].indexOf('pdf') >= 0) return 'fa fa-file-pdf-o fa-fw';\n if (parts[1].indexOf('word') >= 0) return 'fa fa-file-word-o fa-fw';\n if (parts[1].indexOf('excel') >= 0) return 'fa fa-file-excel-o fa-fw';\n if (parts[1].indexOf('spreadsheet') >= 0)\n return 'fa fa-file-excel-o fa-fw';\n if (parts[1].indexOf('powerpoint') >= 0)\n return 'fa fa-file-powerpoint-o fa-fw';\n if (parts[1].indexOf('zip') >= 0) return 'fa fa-file-archive-o fa-fw';\n if (parts[1].indexOf('rar') >= 0) return 'fa fa-file-archive-o fa-fw';\n if (parts[1].indexOf('compressed') >= 0)\n return 'fa fa-file-archive-o fa-fw';\n if (parts[1].indexOf('xml') >= 0) return 'fa fa-file-code-o fa-fw';\n break;\n case 'image':\n return 'fa fa-file-image-o fa-fw';\n case 'audio':\n return 'fa fa-file-audio-o fa-fw';\n case 'video':\n return 'fa fa-file-video-o fa-fw';\n }\n\n return 'fa fa-file-o fa-fw';\n };\n}\n","import angular from 'angular';\nangular.module('commonServices').filter('nullDate', [\n function() {\n return function(date) {\n if (\n date === '0001-01-01T00:00:00Z' ||\n date === '0001-01-01T00:00:00' ||\n date === ''\n )\n return null;\n return date;\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').filter('ownCompanyName', ['dataCache', ownCompanyNameFilter]);\n\nfunction ownCompanyNameFilter(dataCache) {\n return function(companyId) {\n if (!companyId || companyId === '00000000-0000-0000-0000-000000000000') return '';\n var company = dataCache.getObject('company')[companyId];\n if (!company) return '';\n return company.name;\n };\n}\n","import angular from 'angular';\nangular.module('commonServices').filter('percentage', [\n '$filter',\n function($filter) {\n return function(input, decimals = 2) {\n return $filter('number')(input * 100, decimals) + '%';\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('commonServices').filter('postAddress', [\n '$sce',\n '$translate',\n function ($sce, $translate) {\n return function (address, separator, hideCountry) {\n if (!address) return null;\n if (typeof separator === 'undefined') separator = $sce.trustAs($sce.HTML, '
    ');\n\n var country = '';\n\n // ReSharper disable once CoercedEqualsUsing\n if (hideCountry != 'true' && !!address.country) {\n var key = 'country_' + address.country;\n var translation = $translate.instant(key);\n country = translation === key ? address.country : translation;\n }\n\n return (\n address.street1 +\n ' ' +\n (address.number ? address.number : '') +\n (address.box ? '/' + address.box + ' ' : '') +\n separator +\n (address.street2 ? address.street2 + separator : '') +\n (address.zipCode ? address.zipCode + ' ' : '') +\n (address.city ? address.city + ' ' : '') +\n (country ? separator + country : '')\n );\n };\n },\n]);\n","import { resourceFilter } from '@/shared/components/registration/ResourceAutoComplete';\nimport angular from 'angular';\n\nangular.module('cloudX').filter('regResourceSearch', [regResourceSearchFilter]);\n\nfunction regResourceSearchFilter() {\n return function(array, searchOptions, current = null) {\n if (!angular.isArray(array)) {\n return array;\n }\n const currentId = current?.id ?? current;\n\n return array.filter(item => {\n return resourceFilter(item, searchOptions, currentId && currentId === item.id);\n });\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cloudX')\n .filter('regTaskName', ['translateListFilter', '$translate', 'dataCache', regTaskName]);\n\nfunction regTaskName(translateListFilter, $translate, dataCache) {\n return function(item) {\n if (!item || !item.plannedTaskId) return '';\n let taskName = item.plannedTaskName || '';\n\n if (!taskName && item.plannedTaskTemplateId) {\n taskName = translateListFilter(item.plannedTaskTemplateId, 'taskTemplate');\n if (!taskName) {\n const defaultTenantLangauge =\n dataCache.getArray('language').find(x => x.isDefault)?.culture ?? 'nl-be';\n const currentLanguage = $translate.use().split('-')[0];\n const translatedInTenantLanguageTaskName = translateListFilter(\n item.plannedTaskTemplateId,\n 'taskTemplate',\n null,\n null,\n defaultTenantLangauge,\n );\n\n taskName = $translate.instant('{{task}} is not translated in {{lang}}', {\n task: translatedInTenantLanguageTaskName,\n lang: currentLanguage,\n });\n }\n }\n\n if (!item.mainPlannedTaskId || item.mainPlannedTaskId === item.plannedTaskId) {\n return taskName;\n }\n\n let mainTaskName = item.mainPlannedTaskName || '';\n if (!mainTaskName && item.mainTaskTemplateId) {\n mainTaskName = translateListFilter(item.mainTaskTemplateId, 'taskTemplate');\n }\n\n return mainTaskName ? `${mainTaskName} - ${taskName}` : taskName;\n };\n}\n","import angular from 'angular';\n\nangular.module('cloudX').filter('resourceName', ['translateListFilter', resourceName]);\n\nfunction resourceName(translateListFilter) {\n return function(item, withoutCode, withoutCategoryPrefix) {\n if (!item) return '';\n const codePrefix = item.code && !withoutCode ? `${item.code} – ` : '';\n if (item.categoryId && !withoutCategoryPrefix) {\n const categoryName = translateListFilter(\n item.categoryId,\n 'resourcecategory',\n item.categoryName,\n );\n if (item.isDefault) return `${codePrefix}${categoryName}`;\n return `${codePrefix}${categoryName}: ${translateListFilter(item.id, 'resource', item.name)}`;\n }\n return `${codePrefix}${translateListFilter(item.id, 'resource', item.name)}`;\n };\n}\n","import angular from 'angular';\n\nangular.module('commonServices').filter('showAddressData', function() {\n var formatAddress = function(a) {\n if ((a.medium === 0 || a.medium === 5) && a.postAddress) {\n var postAddress = a.postAddress;\n return (\n postAddress.street1 +\n ' ' +\n (postAddress.number ? postAddress.number : '') +\n (postAddress.box ? '/' + postAddress.box + ' ' : '') +\n (postAddress.street2 ? ' - ' + postAddress.street2 + ' ' : '') +\n ' - ' +\n (postAddress.zipCode ? postAddress.zipCode + ' ' : '') +\n (postAddress.city || '')\n );\n }\n return a.addressData;\n };\n\n return function(address, addressList) {\n if (!address) return null;\n if (address.addressData || address.postAddress) return formatAddress(address);\n if (!addressList || !angular.isArray(addressList)) return null;\n\n for (var t = 0; t < addressList.length; t++)\n if (addressList[t].id === address) return formatAddress(addressList[t]);\n return null;\n };\n});\n","import angular from 'angular';\n\nangular.module('commonServices').filter('showContactData', function() {\n return function(contactId, contactList) {\n for (var t = 0; t < contactList.length; t++) {\n if (contactList[t].target.id === contactId) {\n return contactList[t].target;\n }\n }\n return null;\n };\n});\n","const getSigningStatusClassName = status => {\n switch (status) {\n case 1: // SigningEmpty\n return 'fa fa-circle-o';\n case 2: // SigningNeeded\n return 'fa fa-circle text-orange';\n case 3: // SigningRevoked\n return 'fa fa-stop-circle';\n case 4: // SigningExpired\n return 'fa fa-clock-o text-danger';\n case 10: // SigningPending\n return 'fa fa-circle text-blue';\n case 11: // SigningFailed\n return 'fa fa-times-circle text-danger';\n case 12: // SigningRejected\n return 'fa fa-minus-circle text-danger';\n case 20: // SigningCompleted\n case 21: // SigningCompletedOriginal\n return 'fa fa-check-circle text-success';\n default:\n return '';\n }\n};\nexport default getSigningStatusClassName;\n","import angular from 'angular';\nimport getSigningStatusClassName from '@/shared/utils/signingStatusClassName';\n\nangular.module('commonServices').filter('signingStatus', function() {\n return getSigningStatusClassName;\n});\n","import angular from 'angular';\n\nangular.module('commonServices').filter('similar', function() {\n var levenshteinenator = function(a, b) {\n var cost;\n var m = a.length;\n var n = b.length;\n\n // make sure a.length >= b.length to use O(min(n,m)) space, whatever that is\n if (m < n) {\n var c = a;\n a = b;\n b = c;\n var o = m;\n m = n;\n n = o;\n }\n\n var r = [];\n r[0] = [];\n for (var c = 0; c < n + 1; ++c) {\n r[0][c] = c;\n }\n\n for (var i = 1; i < m + 1; ++i) {\n r[i] = [];\n r[i][0] = i;\n for (var j = 1; j < n + 1; ++j) {\n cost = a.charAt(i - 1) === b.charAt(j - 1) ? 0 : 1;\n r[i][j] = minimator(\n r[i - 1][j] + 1,\n r[i][j - 1] + 1,\n r[i - 1][j - 1] + cost,\n );\n }\n }\n\n return r;\n };\n\n /**\n * Return the smallest of the three numbers passed in\n * @param Number x\n * @param Number y\n * @param Number z\n * @return Number\n */\n var minimator = function(x, y, z) {\n if (x <= y && x <= z) return x;\n if (y <= x && y <= z) return y;\n return z;\n };\n\n var similar = function(value, value2, max) {\n if (!value || !value2) return false;\n if (value.toLowerCase().indexOf(value2.toLowerCase()) !== -1) return true;\n var distArray = levenshteinenator(value, value2);\n var dist =\n distArray[distArray.length - 1][\n distArray[distArray.length - 1].length - 1\n ];\n return dist <= max;\n };\n\n return function(input, search, maxDistance) {\n maxDistance = maxDistance || 3;\n if (angular.isArray(input)) {\n if (!search) return input;\n var result = [];\n angular.forEach(input, function(value) {\n if (typeof value === 'object') {\n for (var property in value)\n if (\n value.hasOwnProperty(property) &&\n similar(value[property], search, maxDistance)\n ) {\n result.push(value);\n break;\n }\n } else if (similar(value, search, maxDistance)) {\n result.push(value);\n }\n });\n return result;\n } else if (typeof input === 'object') {\n if (!search) return input;\n var result = {};\n angular.forEach(input, function(value, key) {\n if (similar('' + key, search, maxDistance)) {\n result[key] = value;\n } else if (\n typeof value === 'string' &&\n (('' + value).toLowerCase().indexOf(search.toLowerCase()) !== -1 ||\n similar('' + value, search, maxDistance))\n ) {\n result[key] = value;\n }\n });\n return result;\n } else {\n return similar(input, search, maxDistance);\n }\n };\n});\n","import angular from 'angular';\n//This filter gets a number of minutes and formats it to 'hh:mm' format.\nangular.module('commonServices').filter('time', function() {\n return function(time) {\n if (isNaN(time)) return '';\n\n time = Math.abs(time);\n var h = parseInt(time / 60);\n var m = parseInt(time - h * 60);\n\n return (h < 10 ? '0' : '') + h + ':' + (m < 10 ? '0' : '') + m;\n };\n});\n","import angular from 'angular';\nimport moment from 'moment';\n\n//This filter gets a number of minutes and formats it to 'hh:mm' format.\nangular.module('commonServices').filter('timespanToDate', function() {\n var timeRegex = /^(0?[0-9]|1[0-9]|2[0-3]):([0-5]?[0-9])(?::([0-5]?[0-9]))?$/;\n return function(value) {\n if (!value) return null;\n var m = value.match(timeRegex);\n if (!m) return null;\n return moment()\n .startOf('day')\n .set({\n hour: parseInt(m[1]) || 0,\n minute: parseInt(m[2]) || 0,\n second: parseInt(m[3]) || 0,\n })\n .toDate();\n };\n});\n","import angular from 'angular';\n\nangular.module('commonServices').filter('translateList', ['$translate', translateList]);\n\nfunction translateList($translate) {\n var translateListFilter = function(input, name, def, params, forceLanguage) {\n if (name == null) return def || null;\n var key =\n name.toLowerCase() + '_' + (!input && input !== 0 ? 'null' : ('' + input).toLowerCase());\n var translation = $translate.instant(key, params, null, forceLanguage, 'escaped');\n\n if (key === translation) return def || null;\n return translation;\n };\n if ($translate.statefulFilter()) {\n translateListFilter.$stateful = true;\n }\n return translateListFilter;\n}\n","import angular from 'angular';\n\nangular.module('commonServices').filter('cxTypeaheadHighlight', [\n '$sce',\n '$injector',\n '$log',\n function($sce, $injector, $log) {\n var isSanitizePresent;\n isSanitizePresent = $injector.has('$sanitize');\n\n function escapeRegexp(queryToEscape) {\n // Regex: capture the whole query string and replace it with the string that will be used to match\n // the results, for example if the capture is \"a\" the result will be \\a\n return queryToEscape.replace(/([.?*+^$[\\]\\\\(){}|-])/g, '\\\\$1');\n }\n\n function containsHtml(matchItem) {\n return /<.*>/g.test(matchItem);\n }\n\n return function(matchItem, query) {\n if (!isSanitizePresent && containsHtml(matchItem)) {\n $log.warn('Unsafe use of typeahead please use ngSanitize'); // Warn the user about the danger\n }\n if (query) {\n var items = query.split(' ');\n var matches = [];\n for (var i = 0; i < items.length; i++) matches.push('(' + escapeRegexp(items[i]) + ')');\n\n matchItem = ('' + matchItem).replace(\n new RegExp(matches.join('|'), 'gi'),\n '$&',\n ); // Replaces the capture string with a the same string inside of a \"strong\" tag\n }\n if (!isSanitizePresent) {\n matchItem = $sce.trustAsHtml(matchItem); // If $sanitize is not present we pack the string in a $sce object for the ng-bind-html directive\n }\n return matchItem;\n };\n },\n]);\n//Override default template\nangular.module('uib/template/typeahead/typeahead-match.html', []).run([\n '$templateCache',\n function($templateCache) {\n $templateCache.put(\n 'uib/template/typeahead/typeahead-match.html',\n '\\n' +\n '',\n );\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').filter('userName', ['dataCache', userName]);\n\nfunction userName(dataCache) {\n return function(userId) {\n if (!userId || userId === '00000000-0000-0000-0000-000000000000') return '';\n var user = dataCache.getObject('user')[userId];\n if (!user) return '';\n return ((user.firstName || '') + ' ' + (user.lastName || '')).trim();\n };\n}\n","import angular from 'angular';\nimport moment from 'moment';\n\nangular.module('commonServices').filter('formatTime', function() {\n return function(input) {\n // formats c# timespan to HH:mm\n return moment(input, 'HH:mm:ss').format('HH:mm');\n };\n});\n","import angular from 'angular';\n//This filter gets a number of minutes and formats it to 'hh:mm' format.\nangular.module('commonServices').filter('vatRateType', [\n 'translateListFilter',\n 'percentageFilter',\n function(translateListFilter, percentageFilter) {\n return function(vatRate, vatType, decimals = 0) {\n if (vatType === 0) return percentageFilter(vatRate, decimals);\n return translateListFilter(vatType, 'vatType', '');\n };\n },\n]);\n","import angular from 'angular';\nimport dateFormatService from '../../../shared/services/DateFormatService';\n\nangular.module('commonServices').filter('formatDate', [\n function() {\n return dateFormatService.formatDate;\n },\n]);\n\nangular.module('commonServices').filter('formatDateWithTime', [\n function() {\n return dateFormatService.formatDateWithTime;\n },\n]);\n\nangular.module('commonServices').filter('formatDayMonth', [\n function() {\n return dateFormatService.formatDayMonth;\n },\n]);\n\nangular.module('commonServices').filter('formatDateLong', [\n function() {\n return dateFormatService.formatDateLong;\n },\n]);\n\nangular.module('commonServices').filter('correctFormatForConfiguration', [\n '$filter',\n function($filter) {\n return function(format) {\n const translated = $filter('translate')(format);\n return dateFormatService.correctFormatForConfiguration(translated);\n };\n },\n]);\n","import angular from 'angular';\nimport { sanitize } from '@/shared/utils/htmlHelpers';\n\nangular.module('commonServices').filter('sanitize', [\n function() {\n return function(input) {\n return sanitize(input);\n };\n },\n]);\n","import angular from 'angular';\nimport dompurify from 'dompurify';\nconst sanitizer = dompurify.sanitize;\nangular.module('commonServices').filter('domPurify', [\n function () {\n return function (text) {\n if (!text) return text;\n return sanitizer(text);\n }\n },\n]);\n","import angular from 'angular';\nangular.module('commonServices').filter('parseJson', [\n function() {\n return function(text, property) {\n return JSON.parse(text)[property];\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').filter('naceCodeName', ['dataCache', naceCodeName]);\n\nfunction naceCodeName(dataCache) {\n return function(code) {\n const naceCodeEntry = dataCache.getArray('naceCodes').find(x => x.Code === code);\n return naceCodeEntry?.Name ?? 'Unknown';\n };\n}\n","import angular from 'angular';\n\nangular.module('cloudX').filter('newLineTextToRichText', [\n '$sce',\n function($sce) {\n return function(input) {\n if (input) {\n if (!input.includes('')) {\n var converted = input.replace(/(?:\\r\\n|\\r|\\n)/g, '
    ');\n return $sce.trustAsHtml(converted);\n }\n }\n return $sce.trustAsHtml(input);\n };\n }\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').controller('FlyCtrl', ['$scope', 'flySvc', FlyCtrl]);\n\nfunction FlyCtrl($scope, flySvc) {\n var vm = this;\n vm.flyArray = flySvc.getFlyArray();\n}\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxFlyin', [\n '$timeout',\n function($timeout) {\n return {\n restrict: 'E',\n scope: {\n item: '=data',\n },\n template: require('./flyIn.html'),\n controller: [\n '$scope',\n '$state',\n 'flySvc',\n '$element',\n function($scope, $state, flySvc) {\n $scope.timeout = null;\n\n if (typeof $scope.item.timeout == 'undefined') {\n $scope.item.timeout = 5000;\n }\n\n $scope.removeFly = function(fly) {\n flySvc.removeFly(fly);\n };\n\n $scope.clickAction = function(fly) {\n console.debug(\"Fly-in action '%s' invoked: %s\", fly.actionLabel, fly.action);\n\n if (typeof fly.action === 'string') {\n $state.go(fly.action, fly.actionParameter);\n } else if (typeof fly.action === 'function') {\n fly.action(fly.actionParameter);\n }\n\n $scope.hide();\n };\n\n $scope.hide = function() {\n $scope.visible = false;\n\n $timeout(function() {\n flySvc.removeFly($scope.item);\n }, 400);\n };\n\n $scope.pauseHide = function() {\n if ($scope.timeout) {\n $timeout.cancel($scope.timeout);\n }\n\n $scope.timeout = null;\n };\n\n $scope.resumeHide = function() {\n if ($scope.item.timeout > 0) {\n $scope.timeout = $timeout($scope.hide, $scope.item.timeout + 400);\n }\n };\n },\n ],\n link: function(scope, element, attrs) {\n $timeout(function() {\n scope.initialized = true;\n }, 0);\n $timeout(function() {\n scope.visible = true;\n }, 400);\n\n if (scope.item.timeout > 0) {\n scope.timeout = $timeout(scope.hide, scope.item.timeout + 400);\n }\n },\n };\n },\n]);\n","import angular from 'angular';\nimport toastr from 'toastr';\n\nangular\n .module('commonServices')\n .factory('flySvc', [\n '$window',\n '$state',\n '$filter',\n '$sce',\n '$timeout',\n '$q',\n 'appMessages',\n flySvc,\n ]);\n\nfunction flySvc($window, $state, $filter, $sce, $timeout, $q, appMessages) {\n var flyArray = [];\n\n // for messages translated from string (labels)\n var getMessage = appMessages;\n\n // Options for toastr\n toastr.options.positionClass = 'toast-bottom-right';\n toastr.options.preventDuplicates = true;\n toastr.options.closeButton = true;\n toastr.options.escapeHtml = true;\n\n // For messages translated from enum exceptionCode\n var getErrorMsg = function(errCode, params, fieldId, type, parametersEnumType) {\n type = type || 'ExceptionCode';\n // for these errorcodes, translate the label of the referenced field\n var fieldLabel;\n if (errCode === 24 || errCode === 25 || errCode === 26 || errCode === 27) {\n fieldLabel = $filter('translateList')(params[0], 'field');\n params[0] = fieldLabel;\n }\n //Add field label to params\n if (!!fieldId && errCode === 3000) {\n params[0] = $filter('translateList')(fieldId, 'field', params[0]);\n }\n\n // Invoice/credit note template errors. Params come in as language code and are translated into the corresponding full language\n if ((errCode === 1043 || errCode === 1044 || errCode === 1045) && params && params.length > 0) {\n params[0] = $filter('translateList')(params[0].toLowerCase(), 'language', params[0]);\n }\n\n // For the others, see (with regex) if the param is a guid or a string and translate accordingly\n if (errCode === 9) {\n if (/^\\{?[a-fA-F0-9]{8}-([a-fA-F0-9]{4}-){3}[a-fA-F0-9]{12}\\}?$/.test(params[0])) {\n fieldLabel = $filter('translateList')(params[0], 'field');\n params[0] = fieldLabel;\n } else {\n fieldLabel = $filter('translate')(params[0]);\n params[0] = fieldLabel;\n }\n }\n //Dates\n if (errCode === 4007) {\n if (params[0]) params[0] = $filter('formatDate')(params[0]);\n }\n\n if (angular.isArray(params)) {\n //Convert array to object\n params = params.reduce(function(o, v, i) {\n o['p' + i] = parametersEnumType // if the parameters are of a specific enum type, we will translate it accordingly.\n ? Array.isArray(v)\n ? v.map(x => $filter('translateList')(x, parametersEnumType)).join(', ')\n : $filter('translateList')(v, parametersEnumType)\n : v;\n return o;\n }, {});\n }\n\n var msg;\n if (typeof errCode === 'string' && isNaN(errCode)) {\n msg = getMessage(errCode, params);\n if (!!msg) return msg;\n }\n msg = $filter('translateList')(errCode, type, errCode, params);\n\n return msg?.toString();\n };\n\n const handleErrorObject = function(error) {\n const errorCode = error.code >= 0 ? error.code : error.data && error.data.code;\n const params = error.parameters ? error.parameters : error.data && error.data.parameters;\n const type = error.type ? error.type : error.data && error.data.type;\n const parametersEnumType = error.parametersEnumType\n ? error.parametersEnumType\n : error.data && error.data.parametersEnumType;\n\n toastr.options.onclick = null;\n toastr['error'](\n getErrorMsg(errorCode, params, null, type, parametersEnumType),\n getMessage('ErrorTitle'),\n {\n timeOut: 10000,\n },\n );\n };\n\n return {\n getFlyArray: function() {\n return flyArray;\n },\n\n addFly: function(fly) {\n var deferred = $q.defer();\n if (fly) {\n var withheld = [];\n fly.$promise = deferred;\n for (var i = 0; i < flyArray.length; i++) {\n //First remove the other (solo) fly-ins.\n if (fly.solo === true || flyArray[i].solo === true) {\n withheld.push(flyArray[i]);\n }\n }\n\n for (var j = 0; j < withheld.length; j++) {\n //Remove existing (solo) fly-ins.\n this.removeFly(withheld[j]);\n }\n\n if (flyArray.length === 2) {\n this.removeFly(flyArray[flyArray.length - 1]);\n }\n\n flyArray.unshift(fly); //Add object to flyArray and remove it when cycle is round.\n //Vibrate\n if (window.navigator.vibrate) window.navigator.vibrate(500);\n } else {\n deferred.reject();\n }\n return deferred.promise;\n },\n\n removeFly: function(fly) {\n var index = flyArray.indexOf(fly);\n flyArray.splice(index, 1);\n fly.$promise.resolve(true);\n },\n\n executeToastrAction: function(state, action, actionLabel, actionParameter) {\n if (typeof action === 'string') {\n state.go(action, actionParameter);\n } else if (typeof action === 'function') {\n $timeout(function() {\n action(actionParameter);\n }, 0);\n }\n },\n\n action: function(\n title,\n content,\n action,\n actionLabel,\n actionParameter,\n titleParams,\n toastrDisplayMethod,\n ) {\n var fly = this;\n var state = $state;\n toastr.options.onclick = function() {\n fly.executeToastrAction(state, action, getMessage(actionLabel), actionParameter);\n };\n var toastrType = !toastrDisplayMethod ? 'info' : toastrDisplayMethod;\n toastr[toastrType](getMessage(content, titleParams), getMessage(title, titleParams), {\n timeOut: 8000,\n });\n },\n\n proposal: function(title, content, action, actionLabel, actionParameter, titleParams) {\n var fly = this;\n var state = $state;\n toastr.options.onclick = function() {\n fly.executeToastrAction(state, action, getMessage(actionLabel), actionParameter);\n };\n toastr['info'](getMessage(content, titleParams), getMessage(title, titleParams));\n },\n\n message: function(msgStringOrErrorCode, params, timeout = 8000) {\n // is eigenlijk 'warning'\n var content = null;\n if (typeof msgStringOrErrorCode === 'string')\n content = getMessage(msgStringOrErrorCode, params);\n if (typeof msgStringOrErrorCode === 'number')\n content = getErrorMsg(msgStringOrErrorCode, params);\n toastr.options.onclick = null;\n toastr['info'](content, '', {\n timeOut: timeout,\n extendedTimeOut: timeout,\n });\n },\n\n error: function(errCode, params, fieldId, type) {\n if (\n typeof errCode === 'object' &&\n (errCode.code >= 0 || (errCode.data && errCode.data.code >= 0))\n )\n return handleErrorObject(errCode);\n if (errCode === 'msgJobFailed') {\n this.action('ErrorTitle', 'msgJobFailed', 'jobs.overview', null, null, null, 'error');\n } else {\n toastr.options.onclick = null;\n toastr['error'](getErrorMsg(errCode, params, fieldId, type), getMessage('ErrorTitle'), {\n timeOut: 10000,\n });\n }\n },\n\n success: function(content, params) {\n toastr.options.onclick = null;\n if (!content) {\n toastr['success']('', getMessage('SuccessTitle'), {\n timeOut: 8000,\n });\n return;\n }\n toastr['success'](getMessage(content, params), getMessage('SuccessTitle'), {\n timeOut: 8000,\n });\n },\n\n warning: function(content, params) {\n toastr.options.onclick = null;\n toastr['warning'](getMessage(content, params), getMessage('WarningTitle'), {\n timeOut: 8000,\n });\n },\n info: function(content, params) {\n toastr.options.onclick = null;\n toastr['info'](getMessage(content, params), null, {\n timeOut: 10000,\n });\n },\n changesSaved: function() {\n toastr.options.onclick = null;\n toastr['success'](getMessage('ChangesSaved'), getMessage('SuccessTitle'), {\n timeOut: 8000,\n });\n },\n\n custom: function({\n toastrType = 'info',\n title = null,\n titleMessage = null,\n titleParams = null,\n content = null,\n contentMessage = null,\n contentParams = null,\n timeOut = 8000,\n onClick = null,\n }) {\n if (onClick) {\n var fly = this;\n var state = $state;\n toastr.options.onclick = function() {\n fly.executeToastrAction(state, action, getMessage(actionLabel), actionParameter);\n };\n toastr.options.onclick = onClick ?? null;\n } else {\n toastr.options.onclick = null;\n }\n\n let toastrTitle = null;\n if (titleMessage) {\n toastrTitle = getMessage(titleMessage, titleParams);\n }\n if (!toastrTitle && title) toastrTitle = title;\n let toastrContent = null;\n if (contentMessage) {\n toastrContent = getMessage(contentMessage, contentParams);\n }\n if (!toastrContent && content) toastrContent = content;\n toastr[toastrType](toastrContent, toastrTitle, {\n timeOut,\n });\n },\n getErrorMsg: getErrorMsg,\n };\n}\n","import angular from 'angular';\n\nangular.module('cxHttpServices').factory('reminderHttpSvc', ['$http', 'appUrls', reminderHttpSvc]);\n\nfunction reminderHttpSvc($http, appUrls) {\n var baseUrl = appUrls.api + '/api/Reminder/';\n\n function handleSuccess(response) {\n return response.data;\n }\n\n return {\n getReminders: function() {\n return $http.get(baseUrl + 'Get').then(handleSuccess);\n },\n createReminder: function(reminder) {\n return $http.post(baseUrl + 'Post', reminder).then(handleSuccess);\n },\n updateReminder: function(reminder) {\n return $http.put(baseUrl + 'Put', reminder).then(handleSuccess);\n },\n removeReminder: function(reminderId) {\n return $http.delete(baseUrl + 'Delete/' + reminderId).then(handleSuccess);\n },\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cxHttpServices')\n .factory('templateHttpSvc', ['$http', '$q', 'appUrls', 'checkSecurity', templateHttpSvc]);\n\nfunction templateHttpSvc($http, $q, appUrls, checkSecurity) {\n var baseUrl = appUrls.api + '/api/Template/';\n\n function handleSuccess(response) {\n return response.data;\n }\n\n return {\n getTemplates: function (type) {\n return $http\n .get(baseUrl + 'Company/' + (!type && type !== 0 ? '' : type))\n .then(handleSuccess);\n },\n getTemplate: function (templateId) {\n return $http.get(baseUrl + 'Get/' + templateId).then(handleSuccess);\n },\n getContent: function (templateId, lang) {\n return $http\n .get(baseUrl + 'Content/' + templateId + '/' + (lang || 'nl'))\n .then(handleSuccess);\n },\n getTemplateWithContent: function (templateId) {\n return $http.get(baseUrl + 'Get/' + templateId).then(function (response) {\n var template = response.data;\n\n // if the template contains document tags, retrieve their respective name and attach them to the template\n var documentTagsPromise =\n template.documentTags && template.documentTags.length && checkSecurity('Settings:u') // tags are only relevant if user can edit the template\n ? $http.get(appUrls.documents + '/api/tag').then(function ({ data }) {\n if (data && data.length) {\n template.documentTags = data.filter((x) => template.documentTags.includes(x.id));\n }\n return template;\n })\n : undefined;\n\n var promises = template.languages.map(function (lang) {\n return $http\n .get(baseUrl + 'Content/' + templateId + '/' + (lang.languageCode || 'nl'))\n .then(function (response) {\n lang.content = response.data.content;\n lang.title = response.data.title;\n return lang;\n });\n });\n\n promises = [...promises, documentTagsPromise];\n\n return $q.all(promises).then(function () {\n return template;\n });\n });\n },\n getPlaceholders: function () {\n return $http.get(baseUrl + 'MailPlaceholders').then(handleSuccess);\n },\n createTemplate: function (companyId, template) {\n return $http.post(baseUrl + 'Template/' + companyId, template).then(handleSuccess);\n },\n copyTemplate: function (templateId) {\n return $http.post(baseUrl + 'Copy/' + templateId).then(handleSuccess);\n },\n updateTemplate: function (template) {\n return $http.put(baseUrl + 'Template', template).then(handleSuccess);\n },\n removeTemplate: function (templateId) {\n return $http.delete(baseUrl + 'Template/' + templateId).then(handleSuccess);\n },\n createLanguage: function (templateId, language) {\n return $http.post(baseUrl + 'CreateLanguage/' + templateId, language).then(handleSuccess);\n },\n validateLanguage: function (templateId, language) {\n return $http.post(baseUrl + 'ValidateLanguage/' + templateId, language).then(handleSuccess);\n },\n updateLanguage: function (templateId, language) {\n return $http.put(baseUrl + 'UpdateLanguage/' + templateId, language).then(handleSuccess);\n },\n removeLanguage: function (templateId, languageId) {\n return $http\n .delete(baseUrl + 'Language/' + templateId + '/' + languageId)\n .then(handleSuccess);\n },\n };\n}\n","import angular from 'angular';\n\nangular.module('cloudX').component('todoIcon', {\n template: `\n \n `,\n});\n","import angular from 'angular';\n\nangular.module('cloudX').component('windowIcon', {\n template: `\n \n `,\n});\n","import angular from 'angular';\n\nangular.module('cloudX').service('loadingAnimationInterceptor', [\n '$q',\n 'loadingAnimationSvc',\n function($q, loadingAnimationSvc) {\n var xhrCreations = 0;\n var xhrResolutions = 0;\n\n function isLoading() {\n return xhrResolutions < xhrCreations;\n }\n\n function updateStatus() {\n if (isLoading()) loadingAnimationSvc.showSmallLoadingAnimation();\n else loadingAnimationSvc.hideSmallLoadingAnimation();\n }\n\n return {\n request: function(config) {\n xhrCreations++;\n updateStatus();\n return config;\n },\n requestError: function(rejection) {\n xhrResolutions++;\n updateStatus();\n return $q.reject(rejection);\n },\n response: function(response) {\n xhrResolutions++;\n updateStatus();\n return response;\n },\n responseError: function(rejection) {\n xhrResolutions++;\n updateStatus();\n return $q.reject(rejection);\n },\n };\n },\n]);\n","import angular from 'angular';\n/*\nJSON.stringify doesn't work on Error object\nhttps://stackoverflow.com/a/18391400\n */\nconst replaceErrors = (key, value) => {\n if (value instanceof Error) {\n var error = {};\n\n Object.getOwnPropertyNames(value).forEach(function(propName) {\n error[propName] = value[propName];\n });\n\n return error;\n }\n\n return value;\n};\n\nangular.module('cloudX').factory('$exceptionHandler', [\n 'appInsights',\n function(appInsights) {\n return function errorCatcherHandler(exception, cause) {\n if (!exception) return;\n console.error(exception, cause);\n\n if (appInsights) {\n try {\n if (exception instanceof Error) {\n appInsights.trackException(\n { exception },\n {\n cause: JSON.stringify(cause),\n },\n );\n } else {\n const errorMessage = exception?.toString();\n appInsights.trackException(\n { exception: new Error(errorMessage || 'Unknown JS error') },\n {\n originalError: JSON.stringify(exception, replaceErrors),\n cause: JSON.stringify(cause),\n },\n );\n }\n } catch (e) {\n console.warn(e);\n }\n }\n // do not rethrow the exception - breaks the digest cycle\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('commonServices').factory('appMessages', ['$translate', appMessages]);\n\nfunction appMessages($translate) {\n return function(msgString, params) {\n switch (msgString) {\n case 'SuccessTitle':\n return $translate.instant('Success');\n case 'ErrorTitle':\n return $translate.instant('Error');\n case 'WarningTitle':\n return $translate.instant('Warning');\n case 'ChangesSaved':\n return $translate.instant('ChangesSaved'); // 'Changes saved...'\n case 'msgConfirmChange':\n return $translate.instant('msgConfirmChange'); // 'Changes saved...'\n case 'msgItemRemoved':\n return $translate.instant('msgItemRemoved'); // 'Item removed...'\n case 'msgConfirmDeleteTitle':\n return $translate.instant('Delete?'); // 'Changes saved...'\n\n case 'msgGeneralError':\n return $translate.instant('msgGeneralError'); // 'Oops, something went wrong there...'\n //case 'msgSaveError':\n // return $translate.instant('msgSaveError'); // Oei! Opslaan mislukt!\n //case 'msgRemoveError':\n // return $translate.instant('msgRemoveError'); // Oei! Verwijderen mislukt!\n\n case 'msgPasswordChanged':\n return $translate.instant('Your password has been changed');\n case 'msgAddressSaved':\n return $translate.instant('msgAddressSaved'); // Adres opgeslagen\n case 'msgNewItemSaved':\n return $translate.instant('msgNewItemSaved');\n case 'msgCommSaved':\n return $translate.instant('msgCommSaved'); // commSetting opgeslagen\n case 'msgCommRemoved':\n return $translate.instant('msgCommRemoved'); // commSetting verwijderd\n case 'msgLinkRemoved':\n return $translate.instant('msgLinkRemoved'); // Link removed\n case 'msgEmpRemoved':\n return $translate.instant('msgEmpRemoved'); // Employee removed\n case 'msgAddressRemoved':\n return $translate.instant('msgAddressRemoved'); // Adres verwijderd\n case 'msgLinkSaved':\n return $translate.instant('msgLinkSaved'); // Link saved\n case 'msgNoAddressSelectedError':\n return $translate.instant('msgNoAddressSelectedError');\n case 'msgRemoved_name':\n return $translate.instant('msgRemoved_name', params); //\n case 'msgInactive_name':\n return $translate.instant('msgInactive_name', params); // {{name}} set to inactive\n case 'msgNewRelCreated':\n return $translate.instant('msgNewRelCreated');\n case 'msgNewEmpCreated':\n return $translate.instant('A new user was created and a confirmation mail sent.');\n case 'msgNewEmpError':\n return $translate.instant('msgNewEmpError');\n case 'msgSelectValueForAllFieldsError':\n return $translate.instant('msgSelectValueForAllFields');\n case 'Registration created':\n return $translate.instant('Registration created');\n case 'Edit registration':\n return $translate.instant('Edit registration');\n case 'msgRegRelationInactive':\n return $translate.instant(\n 'You can not make a registration for this relation because it is inactive.',\n );\n case 'Because of linked invoices/registrations.':\n return $translate.instant('Because of linked invoices/registrations.');\n case 'Undo/Make active':\n return $translate.instant('Undo/Make active');\n case 'Registration modified':\n return $translate.instant('Registration modified');\n case 'Registration removed':\n return $translate.instant('Registration removed');\n case 'SynetonWelcome':\n return $translate.instant('SynetonWelcome');\n case 'SynetonWelcomeBack':\n return $translate.instant('SynetonWelcomeBack');\n case 'Register your time':\n return $translate.instant('Register your time');\n case 'Good morning!':\n return $translate.instant('Good morning!');\n case 'Good afternoon!':\n return $translate.instant('Good afternoon!');\n case 'Good evening!':\n return $translate.instant('Good evening!');\n case 'msgFileOpen':\n return $translate.instant('msgFileOpen'); // This file is open already\n case 'Line added':\n return $translate.instant('Line added');\n case 'Field config modified':\n return $translate.instant('Field config modified');\n case 'Field config removed':\n return $translate.instant('Field config removed');\n case 'Field config added':\n return $translate.instant('Field config added');\n case 'Field added':\n return $translate.instant('Field added');\n case 'Field updated':\n return $translate.instant('Field updated');\n case 'Forbidden':\n return $translate.instant('Forbidden');\n case 'msgMailsSent':\n return $translate.instant('{{p0}} mails sent', params);\n case 'msgSingleInvoiceEmailSent':\n return $translate.instant('Invoice for {{relation}} sent', params);\n case 'msgInvoiceMarkedAsSent':\n return $translate.instant('The invoice is marked as sent');\n case 'msgCreditNoteMarkedAsSent':\n return $translate.instant('The credit note is marked as sent');\n case 'msgXDraftInvoicesCreated':\n return $translate.instant('{{p0}} draft invoices created', params);\n case 'msgXDraftInvoicesChanged':\n return $translate.instant('{{p0}} draft invoices have been changed', params);\n case 'msgIncompleteEntryInMaskIsNoSave':\n return $translate.instant('msgIncompleteEntryInMaskIsNoSave');\n case 'msgPasswordReset':\n return $translate.instant(\n 'Your password was reset and a mail was sent with a link to enter a new one. This link is only valid for 24h.',\n );\n case 'msgPasswordResetOtherUser':\n return $translate.instant(\n 'The users password was reset and a mail was sent to enter a new one.',\n );\n case 'msgBrowserNotSupported':\n return $translate.instant(\n 'Your current browser is not supported by AdminPulse. Although basic actions may still work in your current browser, you will will not be able to use all of the features. We suggest updating your browser.',\n );\n case 'comfirmTitle':\n return $translate.instant('Are you sure?');\n case 'comfirmDeleteTitle':\n return $translate.instant('Delete?');\n case 'comfirmDisableNotificationType':\n return $translate.instant('Turn of notifications of this type ?');\n case 'comfirmDeleteItem':\n return $translate.instant('Are you sure you want to delete this item?');\n case 'comfirmDeletePayment':\n return $translate.instant('Are you sure you want to delete this payment?');\n case 'comfirmDeleteInvoice':\n return $translate.instant('Are you sure you want to delete this invoice?');\n case 'comfirmUndoInvoice':\n return $translate.instant('Are you sure you want to undo this invoice?');\n case 'comfirmDeleteInvoiceLine':\n return $translate.instant('Are you sure you want to delete this invoice line?');\n case 'comfirmUndoInvoiceLine':\n return $translate.instant('Are you sure you want to undo this invoice line?');\n case 'comfirmUndoInvoiceDetailLine':\n return $translate.instant('Are you sure you want to undo this detail line?');\n case 'comfirmUndoOrNeverInvoiceDetailLine':\n return $translate.instant(\n 'Are you sure you want to undo this detail line? Or never invoice it again?',\n );\n case 'comfirmUndoOrNeverInvoiceLine':\n return $translate.instant(\n 'Are you sure you want to delete this invoice line? All registrations will be moved to the next invoice or you can choose to never invoice them again?',\n );\n case 'comfirmDeleteInvoiceDetailLine':\n return $translate.instant('Are you sure you want to delete this detail line?');\n case 'comfirmDeleteTranslation':\n return $translate.instant('Are you sure you want to delete this translation?');\n case 'comfirmDeleteTemplate':\n return $translate.instant('Are you sure you want to delete this template?');\n case 'comfirmDeleteReminder':\n return $translate.instant('Are you sure you want to delete this reminder?');\n case 'comfirmDeleteResource':\n return $translate.instant(\n 'Are you sure you want to delete this resource \"{{name}}\"?',\n params,\n );\n case 'comfirmDeletePrice':\n return $translate.instant('Are you sure you want to delete this price?');\n case 'comfirmDeletePriceStack':\n return $translate.instant('Are you sure you want to delete this stacked price?');\n case 'comfirmDeleteDiscount':\n return $translate.instant('Are you sure you want to delete this discount?');\n case 'comfirmDeleteDiscountStack':\n return $translate.instant('Are you sure you want to delete this stacked discount?');\n case 'comfirmResetPassword':\n return $translate.instant('Are you sure you want to reset your password?');\n case 'msgConfirmDeleteTaskTemplate':\n return $translate.instant('Are you sure you want to delete this task template?');\n case 'msgConfirmDeleteSubtaskTemplate':\n return $translate.instant('Are you sure you want to delete this subtask template?');\n case 'msgConfirmDeleteTaskSchedule':\n return $translate.instant('Are you sure you want to delete this task schedule?');\n case 'msgConfirmDeleteTaskScheduleLine':\n return $translate.instant('Are you sure you want to delete this task schedule line?');\n case 'msgConfirmDeleteDocument':\n return $translate.instant('Are you sure you want to delete this document?');\n\n case 'msgConfirmDeleteDocumentOrLink':\n return $translate.instant(\n 'Do you want to delete the document (yes). Or delete the link but keep the document (no).',\n );\n case 'confirmDeleteInvoiceText':\n return $translate.instant('Are you sure you want to delete this invoice text?');\n case 'confirmNumberAndSendAllInvoices':\n return $translate.instant('Are you sure you want to number and send all invoices?');\n case 'confirmNumberAllInvoices':\n return $translate.instant('Are you sure you want to number all invoices?');\n case 'linkTransSuccess':\n return $translate.instant(\n 'Link successfull, payment created for invoice {{invNr}}',\n params,\n );\n case 'linkTransMultiple':\n return $translate.instant('{{nr}} possible matching invoices found', params);\n case 'linkTransFailed':\n return $translate.instant('No matching invoices found');\n case 'mapsOriginNotFound':\n return $translate.instant('Origin address not found');\n case 'mapsDestinationNotFound':\n return $translate.instant('Destination address not found');\n case 'openFile':\n return $translate.instant('Open file');\n case 'msgPagingNoResults':\n return $translate.instant('Query returned no results');\n case 'msgPagingNoInvoiceResults':\n return $translate.instant('Query returned no invoices');\n case 'msgPagingNoRelationResults':\n return $translate.instant('Query returned no relations');\n case 'msgPagingNoTransactionResults':\n return $translate.instant('Query returned no transactions');\n case 'msgPagingNoResourceResults':\n return $translate.instant('Query returned no resources');\n\n case 'msgInvoiceProcessed':\n return $translate.instant('The invoice for {{name}} is being processed.', params);\n case 'msgExporterMissingAccNr20':\n return $translate.instant(\n 'Export is not possible: there are missing accounting numbers in some relation files. Click to open the first 20.',\n );\n case 'msgExporterMissingAccNr':\n return $translate.instant(\n 'Export is not possible: there are missing accounting numbers in some relation files. Click to open these files.',\n );\n case 'msgExporterMultipleCompanies':\n return $translate.instant(\n 'You can only export invoices for 1 own company, use the own company filter in the advanced filters.',\n );\n case 'msgBatchMailMultipleCompanies':\n return $translate.instant(\n 'You can only mail invoices for 1 own company, use the own company filter in the advanced filters.',\n );\n case 'msgInvoiceCountProcessed':\n return $translate.instant('{{count}} invoices are being processed.', params);\n case 'msgInvoiceCountDateToNumber':\n return $translate.instant('{{count}} invoices will be numbered on {{date}}', params);\n case 'msgInvoiceCountErrors':\n return $translate.instant('{{count}} invoices have errors.', params);\n case 'trialAlmostExpired':\n return $translate.instant('Trial almost expired');\n case 'trialExpiresDays':\n return $translate.instant(\n 'Your free trial period will end in {{nr}} days. Complete your registration to ensure your continued use of AdminPulse. Billing period will start AFTER the free trial period',\n params,\n );\n case 'trialExpiredMsg':\n return $translate.instant(\n 'Your free trial period has expired. Complete your registration to ensure your continued use of AdminPulse.',\n );\n case 'btnApply':\n return $translate.instant('Apply');\n case 'btnRegister':\n return $translate.instant('Register');\n case 'btnOpenRelation':\n return $translate.instant('Open relation');\n case 'btnOpenRelations':\n return $translate.instant('Open relations');\n case 'btnDraftInvoices':\n return $translate.instant('Open draft invoices');\n case 'msgNoDraftInvoiceCrm':\n return $translate.instant(\n 'Invoicing not possible because the crm status of {{name}} is not customer',\n params,\n );\n case 'cancel':\n return $translate.instant('Cancel');\n case 'selectRelation':\n return $translate.instant('Select relation');\n case 'newCustomer':\n return $translate.instant('New customer');\n case 'newRelation':\n return $translate.instant('New relation');\n case 'newContact':\n return $translate.instant('New contact');\n case 'newBeneficiary':\n return $translate.instant('New beneficiary');\n case 'newOwnCompany':\n return $translate.instant('New own company');\n\n case 'msgFillOnCrmChange':\n var crmTypeKey = 'crmtype_' + params.newCrmType;\n params.newCrmType = $translate.instant(crmTypeKey);\n return $translate.instant('msgFillOnCrmChange', params);\n case 'msgRegistrationCreated':\n return params.relation + ' - ' + params.resource;\n case 'msgTaskTimeRegistrationCreated':\n return (\n $translate.instant('Registered {{duration}} for {{relation}}', params) +\n ' - ' +\n $translate.instant('Click here to edit')\n );\n case 'msgTaskTimeRegistrationStarted':\n return $translate.instant(\"Started time registration on '{{task}}'\", params);\n case 'msgTaskTimeRegistrationStillRunning':\n return (\n $translate.instant(\n \"Time registration on '{{task}}' for {{relation}} is still running.\",\n params,\n ) +\n ' - ' +\n $translate.instant('Duration: {{duration}}', params)\n );\n case 'msgTaskTimeRegistrationDiscarded':\n return $translate.instant('Registration discarded (less than 1 minute)');\n case 'msgRegistrationCreatedTruncated':\n return (\n params.relation +\n ' - ' +\n params.resource +\n ' (' +\n $translate.instant('The end time was truncated') +\n ')'\n );\n case 'msgCODAProcessed':\n return $translate.instant(\n 'The CODA file has been processed. {{n}} transactions have been created.',\n params,\n );\n case 'msgFieldsNeededCompleteFile':\n return $translate.instant(\n 'The following fields are needed to complete this file: {{list}}',\n params,\n );\n\n case 'msgCompanyFillInEnterpriseNrCBE':\n return $translate.instant(\n 'Fill out your enterprise number and the other data for your company will be fetched from the CBE.',\n );\n case 'btnEditEnterpriceNr':\n return $translate.instant('Edit');\n case 'msgCompanyCBENotFound':\n return $translate.instant('This enterprise number could not be found in the CBE database.');\n case 'msgInvalidPhoneNumber':\n return $translate.instant('Please enter a valid phone number');\n case 'msgCreateNewPrice':\n return $translate.instant('A new price will be created');\n\n case 'msgRegistrationPriceInactive':\n return $translate.instant(\n 'The price labeled \"{{desc}}\" set on this registration is no longer active. While you may retain this price, you could also choose between the active prices below.',\n params,\n );\n case 'msgOnePriceAlreadySet':\n return $translate.instant(\n 'This resource only has one price available. This price is already used.',\n );\n case 'msgNoPricesAvailable':\n return $translate.instant('This resource has no available prices.');\n case 'msgNegativePriceNotAllowed':\n return $translate.instant('Negative prices are not allowed.');\n case 'msgDateCannotBeSetBefore':\n return $translate.instant('This date cannot be set to a value before {{date}}.', params);\n case 'msgDownloadingFile':\n return $translate.instant(\n 'Your download is being prepared. This could take a few moments.',\n );\n\n case 'msgVirusScanSuccessfull':\n return $translate.instant('No virus found in \"{{name}}\"', params);\n case 'msgVirusScanPending':\n return $translate.instant(\n 'Our scanning service is unavailable at the moment, we will retry in a minute.',\n );\n case 'msgVirusScanVirusFound':\n return $translate.instant(\n 'We found a virus in the file \"{{name}}\", please upload another file without a virus.',\n params,\n );\n\n case 'popupBlockedMsg':\n return $translate.instant(\n 'Your browser prevented the tab from opening, most likely because of a pop-up blocker.',\n );\n case 'popupBlockedActionMsg':\n return $translate.instant(\n 'Your browser prevented the tab from opening, most likely because of a pop-up blocker. For more information about turning this feature off: ',\n );\n case 'popupBlockedActionBtn':\n return $translate.instant('Read article');\n\n case 'msgNegativeDiscountWarning':\n return $translate.instant('A discount is saved as a positive number.');\n case 'msgApplyDiscountsToInvoices':\n return $translate.instant('Apply the new discount to existing invoice proposals?');\n case 'msgCannotSendNoRelationEmail':\n return $translate.instant(\n 'Invoice can only be sent if you add an emailaddress to the relation file.',\n );\n\n case 'msgTemplateNotInLanguage':\n return $translate.instant('There is no mail template for the language of this customer.');\n case 'msgRelationsImported':\n return $translate.instant('msgRelationsImported', params); //\n case 'msgTemporaryRelationDeleted':\n return $translate.instant('The relation to import was deleted.');\n case 'msgChangeInvoiceStreamScheduleTitle':\n return $translate.instant('Update invoice schedule');\n case 'msgInvoiceStreamChangeExistingSchedules':\n return $translate.instant('Do you want to update the existing lines accordingly?');\n case 'msgDeleteInvoiceStreamScheduleLine':\n return $translate.instant('Are you sure you want to delete this invoice schedule line?');\n case 'msgInvoiceStreamScheduleLineDeleted':\n return $translate.instant('Invoice schedule line deleted');\n case 'msgDeleteBudget':\n return $translate.instant('Are you sure you want to delete this budget line?');\n case 'msgDeletePlannedRegistrationLine':\n return $translate.instant(\n 'Are you sure you want to delete this planned registration line?',\n );\n case 'msgPlannedRegistrationLineDeleted':\n return $translate.instant('Planned registration line deleted');\n case 'msgDeletePlannedRegistration':\n return $translate.instant('Are you sure you want to delete this planned registration?');\n case 'msgRegistrationRemoved':\n return $translate.instant('Planned registration deleted');\n\n case 'msgRelationFileQueued':\n return $translate.instant(\n 'The file has been successfully queued. Processing will begin shortly.',\n );\n case 'msgRelationImportCompleted':\n return $translate.instant('Your relation file was processed successfully');\n case 'msgTaskPlannedOn':\n return $translate.instant(\n 'The task {{name}} has been planned with deadline {{deadline}}',\n params,\n );\n case 'msgDefaultSettingsRestored':\n return $translate.instant('The default settings are restored');\n case 'msgRelationsWithSameAccountingNr':\n return $translate.instant('This accounting number is already in use for: {{p0}}', params);\n case 'msgRelationsSameCustomerCode':\n return $translate.instant('This code is already in use for: {{p0}}', params);\n case 'msgTaskStateChangeError':\n return $translate.instant(\n 'Not allowed. There is at least one child task still in progress.',\n );\n case 'msgConfirmDeleteRegistration':\n return $translate.instant('Are you sure you want to delete this registration?');\n case 'msgConfirmDeleteEmployee':\n return $translate.instant('Are you sure you want to delete this employee?');\n case 'msgConfirmDeleteTimeTable':\n return $translate.instant(\n 'Are you sure you want to delete the time table for this employee?',\n );\n case 'msgNoConditionTaskInProgress':\n return $translate.instant(\"You can't move a condition to 'In Progress'\");\n case 'msgDeleteTaskSchedule':\n return $translate.instant('Delete task schedule');\n case 'msgDeleteTransaction':\n return $translate.instant('Are you sure you want to delete this transaction?');\n case 'msgDeleteTaskScheduleAlsoDeletePlannedTasks':\n return $translate.instant(\n 'Do you want the remove the tasks linked to this schedule from the taskboard?',\n );\n case 'msgConfirmAddDuplicateTaskSchedule':\n return $translate.instant(\n 'A schedule for this task already exists. Are you sure you want to continue? All tasks will be put on the taskboard twice',\n );\n case 'msgConfirmChangeInvoiceMethodTitle':\n return $translate.instant('Change invoice method');\n case 'msgConfirmChangeInvoiceMethod':\n return $translate.instant(\n 'Changing the invoice method with immediate effect may cause advances and/or registrations never to be settled. If you continue, you must be certain that all advances and registrations have been billed at this point!',\n );\n case 'msgEmployeeRestoreSuccesful':\n return $translate.instant('Employee restored');\n case 'msgConfirmRestoreTitle':\n return $translate.instant('Restore employee');\n case 'confirmDeleteInvoiceAttachment':\n return $translate.instant(\n 'Are you sure you want to delete this attachment from this invoice?',\n );\n case 'confirmDeleteEmailAttachment':\n return $translate.instant(\n 'Are you sure you want to delete this attachment from this email?',\n );\n case 'confirmDeleteAttachment':\n return $translate.instant('Are you sure you want to delete this attachment?');\n case 'msgInvoiceScheduleExistingLinesBeforeStartDateNotDeleted':\n return $translate.instant(\n 'New settings apply from the entered date. If existing schedule lines before this date should not be executed, you need to remove them manually.',\n );\n case 'msgMainTaskDeadlineMovedForward':\n return $translate.instant(\n 'New deadline saved. The deadlines of the subtasks have been brought forward equally.',\n );\n case 'msgMainTaskAutomaticallySaved':\n return $translate.instant('Your task was automatically saved.');\n case 'msgMainTaskDeadlinePostponed':\n return $translate.instant(\n 'New deadline saved. The deadlines of the subtasks have been postponed equally.',\n );\n case 'msgRelationUpdated':\n return $translate.instant('Relation updated successfully.');\n case 'taskMgmtSendMailTitle':\n return $translate.instant('By dragging this task directly to done, the mail was not send.');\n case 'taskMgmtSendMailContent':\n return $translate.instant('Click here to send it anyway');\n case 'msgTaskEmailCancelled':\n return $translate.instant(\n \"Because the mail was not sent, this task is returned to state 'to do'\",\n );\n case 'msgNoRegistrationMadeDefaultTimeZero':\n return $translate.instant('No time was registred because the default duration is 0');\n case 'msgPaymentProviderChangedSuccess':\n return $translate.instant('Payment details for {{provider}} saved sucessfully.', params);\n case 'msgPaymentProviderChangedError':\n return $translate.instant(\n 'Something went wrong while changing payment provider. Please try again.',\n );\n case 'msgChangeTwikeyAccountNumberSuccess':\n return $translate.instant('Request to change Twikey account number submitted succesfully.');\n case 'msgChangeTwikeyAccountNumberError':\n return $translate.instant(\n 'Something went wrong while submitting your request to change Twikey account number. Please try again.',\n );\n case 'msgTwikeyPaymentMethodReactivated':\n return $translate.instant('Your existing Twikey mandate has been reactivated.');\n case 'msgModuleConfigurationSaved':\n return $translate.instant('Module configuration saved');\n case 'msgTaskTemplateCopied':\n return $translate.instant('Task template copied');\n case 'msgRequiredField':\n return $translate.instant('Dit veld is verplicht.'); // Key is in dutch\n\n case 'msgChoosePaymentMethod':\n return $translate.instant('Please configure your payment method first.');\n case 'msgPayNowSuccess':\n return $translate.instant('You will receive the invoice shortly in your mail inbox.');\n case 'confirmDeleteAuthorizationLetter':\n return $translate.instant('Are you sure you want to delete this authorization letter?');\n\n case 'msgFillInCompanySettings':\n return $translate.instant('Click here to fill in your company settings');\n\n case 'msgNumberLicensesLowerThanEmployees':\n return $translate.instant(\n \"The number of licenses can't be lower than the number of employees. Please remove (an) employee(s) with a user account first.\",\n );\n case 'msgConfirmAddInvoiceTemplate':\n return $translate.instant('Invoice template added');\n case 'msgConfirmDeleteInvoiceTemplate':\n return $translate.instant('Are you sure you want to delete this template?');\n case 'msgConfirmDeleteRelationLink':\n return $translate.instant('Are you sure you want to delete this link?');\n case 'msgConfirmChangePaymentProvidertitle':\n return $translate.instant('Change payment provider');\n case 'msgConfirmChangePaymentProvider':\n return $translate.instant('Are you sure you want to change your payment provider?');\n case 'msgConfirmDeleteSystemTaskTemplate':\n return $translate.instant(\n 'Are you sure you want to delete this system task template? It cannot be restored later.',\n );\n case 'msgJobStarted':\n return $translate.instant(\n 'A background job has started. Click here to monitor the progress.',\n );\n case 'msgJobFinished':\n return $translate.instant('A background job has finished.');\n case 'msgJobFailed':\n return $translate.instant('A background job has failed');\n case 'msgPropogateTaskTemplateChangesCount':\n return $translate.instant(\n '{{count}} task(s) on the taskboard have been updated accordingly.',\n params,\n );\n case 'msgConfirmPropogateTemplateChangesTitle':\n return $translate.instant('Update task template');\n case 'msgInvoicesSentToConnect':\n return $translate.instant('Invoices sent to connect service.');\n case 'msgConfirmPropogateTemplateChanges':\n return $translate.instant(\n 'Do you want to apply the changes to the tasks on the taskboard linked to this template?',\n );\n case 'msgConfirmPropagateSubtaskTemplateDelete':\n return $translate.instant(\n 'Do you also want to delete the subtasks on the taskboard linked to this template?',\n );\n case 'msgConfirmPropagateTemplateDelete':\n return $translate.instant(\n 'Do you also want to delete the tasks on the taskboard linked to this template?',\n );\n case 'msgAddedRegistrationToDraftInvoice':\n return $translate.instant('Registration added to draft invoice.');\n case 'msgRemovedRegistrationFromDraftInvoice':\n return $translate.instant('Registration removed from draft invoice.');\n case 'msgInvoiceRegistrationNoInvoiceCreated':\n return $translate.instant(\n 'There was no draft invoice created for this registration because of the invoice schedule of this relation.',\n );\n case 'msgRegistrationMovedToOtherDraftInvoice':\n return $translate.instant('The registration was moved to another draft invoice');\n case 'msgClickToOpenDraftInvoice':\n return $translate.instant('Click to open the draft invoice');\n case 'msgConfirmDeleteEmployeeProfile':\n return $translate.instant(\n 'Are you sure you want to delete this employee profile? All employees linked to this profile will be assigned to the default profile.',\n );\n case 'msgConfirmPropogateChangesTitle':\n return $translate.instant('Propogate changes');\n case 'msgConfirmPropogateResourceForfaitChanges':\n return $translate.instant(\n 'Do you want to propogate this change to all open registrations?',\n );\n\n case 'msgChooseExistingTeamFromList':\n return $translate.instant(\n 'Please enter an existing team. A new team can be created in the settings.',\n );\n case 'msgTeamListEmpty':\n return $translate.instant(\n \"You've cleared the list of teams. This relation will now be visible to everyone.\",\n );\n case 'msgConfirmDeleteUBOVerification':\n return $translate.instant('Are you sure you want to delete this UBO verification?');\n case 'msgDeleteTaskParameter':\n return $translate.instant(\n 'Are you sure you want to delete this task parameter? It will no longer be available in email templates and tasks using this parameter.',\n );\n case 'msgStartEndDateRequiredUpdateInternalPrice':\n return $translate.instant('Please fill out start and end date.');\n case 'msgInvoiceScheduleDateChangedInvoiceCreationDate':\n return $translate.instant(\n 'We changed the invoice creation date to be one day after the registration until date',\n );\n case 'msgInvoiceScheduleDateChangedDate':\n return $translate.instant(\n 'We changed the registration until date to be one day before the invoice creation date',\n );\n case 'msgOpenInvoicesInTabsIsLimited':\n return $translate.instant(\n 'The number of invoices you can open in separate tabs is limited to 10',\n );\n case 'msgCreateFileInBackgroundFailed':\n return $translate.instant(\n 'Something went wrong while creating the file. Please try again later.',\n );\n case 'msgClickHereToDownloadDocument':\n return $translate.instant(\n 'Your file is ready to download. Click here if this does not happen automatically.',\n );\n case 'msgDocumentReady':\n return $translate.instant('Document ready');\n case 'msgCouldNotFindInvoicePdf':\n return $translate.instant(\n 'Invoice PDF could not be found. Please contact support if this problem persists.',\n );\n case 'msgChangesSavedForName':\n return $translate.instant('Changes saved for {name}', params);\n case 'msgInvalidEmailAddress':\n return $translate.instant('An invalid email address was entered.');\n case 'msgEmailChangeUsernameSent':\n return $translate.instant('An email to change your username was sent.');\n case 'msg2FAEnabled':\n return $translate.instant('2-FA has been enabled.');\n case 'msg2FADisabled':\n return $translate.instant('2-FA has been disabled.');\n case 'comfirmUnnumberInvoiceTitle':\n return $translate.instant('Unnumber invoice?');\n case 'comfirmUnnumberInvoiceMessage':\n return $translate.instant('Are you sure want to unnumber this invoice?');\n case 'msgInvoiceSuccessfullyUnnumbered':\n return $translate.instant('The invoice was successfully unnumbered');\n case 'EmailSent':\n return $translate.instant('Email sent');\n case 'MsgNoSigningProviderConfiguredSeeSettings':\n return $translate.instant(\n 'No signing provider has been configured. You can configure a document signing provider under general settings.',\n );\n case 'msgRequiredDocumentSigner':\n return $translate.instant('Please select a signer for each required signature.');\n case 'msgDocumentSigningRequestSent':\n return $translate.instant('Request to sign document has been sent.');\n case 'msgDocumentSigningRequestFailed':\n return $translate.instant('Something went wrong while creating the signature request.');\n case 'msgDocumentSingingRequestRevoked':\n return $translate.instant('Document signature request was revoked.');\n case 'msgDocumentRevokeSigningRequestFailed':\n return $translate.instant('Something went wrong while revoking the signature request.');\n case 'msgConfirmRevokeSignature':\n return $translate.instant('Are you sure you want to revoke the signature request?');\n case 'msgRequiredEnterpriseNumberAndAddress':\n return $translate.instant('Enterprise number and company address are mandatory.');\n case 'msgInvoicesWillBeMarkedAsSent':\n return $translate.instant('The selected invoices will be marked as sent shortly.');\n case 'msgIncludeNonBillableRegistrationsTitle':\n return $translate.instant('Include non billable registrations?');\n case 'msgDiscardCheckout':\n return $translate.instant(\n 'Are you sure you want to discard this checkout? it is currently checked out by {{name}}?',\n );\n case 'msgIncludeNonBillableRegistrationsMsg':\n return $translate.instant(\n 'Do you want to include non-billable registrations in the invoice detail?',\n );\n case 'confirmRevertDraftInvoices':\n return $translate.instant('Are you sure you want to revert these draft invoices?');\n case 'msgPropagateLedgerAccountChangesToExistingSchedule':\n return $translate.instant(\n 'Do you want to propagate this new ledger account to existing invoice schedules?',\n );\n case 'msgTaskTemplateHasAllAvailableRelationFields':\n return $translate.instant('This task template already has all available relation fields');\n case 'msgSelectTableColumns':\n return $translate.instant('Select which columns you want to display in the table');\n case 'msgConfirmChangeScheduleDateMessage':\n return $translate.instant(\n 'The date you picked differse more than a month from the original date, are you sure you want to change this date? You can always create a support ticket if you feel like something is wrong with your invoice schedules.',\n );\n case 'msgInvoicesWillBeMarkedAsPaid':\n return $translate.instant(\n 'The selected invoices will be marked as paid in the background.',\n );\n case 'msgTaskUserChangedError':\n return $translate.instant('Something went wrong while changing the assigned user.');\n case 'msgInvoiceExportStatusWillBeCleared':\n return $translate.instant(\n 'The export status of the selected invoices will be cleared in the background.',\n );\n\n case 'msgConfirmLeavePage':\n return $translate.instant('Leave page?');\n case 'msgConfirmLeavePageMessage':\n return $translate.instant(\n 'You changed something, leaving the page will discard the made changes.',\n );\n case 'msgInvoicesWillBeMarkedAsExported':\n return $translate.instant('The invoices will be marked as exported in the background.');\n case 'msgSelectionContainedAlreadyExportedInvoices':\n return $translate.instant(\n 'The selection contained already exported invoices. These were not included in the export.',\n );\n case 'UploadSuccessful':\n return $translate.instant('Upload successful');\n\n case 'SearchCriteriaNameInputTitle':\n return $translate.instant('SearchCriteriaNameInputTitle');\n case 'SearchCriteriaNameInputMessage':\n return $translate.instant('SearchCriteriaNameInputMessage');\n case 'SearchCriteriaNameInputPlaceholder':\n return $translate.instant('SearchCriteriaNameInputPlaceholder');\n case 'msgConfirmDeleteRelationTag':\n return $translate.instant('Are you sure you want to delete this tag?');\n case 'msgOneOfInvoicesAlreadySent':\n return $translate.instant(\n 'One of the selected invoices has already been sent. Do you want to continue?',\n );\n case 'msgConfirmDeleteActiveInvoiceScheduleWithDraftInvoices':\n return $translate.instant(\n 'There is still a draft invoice that was created by this schedule. If you delete this schedule, the draft invoice will be deleted and the registrations will be moved back to open registrations. Are you sure you want to do this?',\n );\n case 'msgConfirmDeleteActiveInvoiceSchedule':\n return $translate.instant('Are you sure you want to delete this invoice schedule?');\n case 'msgConfirmDeleteNotificationsOfType':\n return $translate.instant('Do you also want to delete all notifications of this type?');\n case 'msgCompanyCreatedInEstox':\n return $translate.instant('The company was created as concept in eStox');\n case 'msgRecalcDeadlinesTitle':\n return $translate.instant('Recalculate task deadlines?');\n\n case 'msgRecalcDeadlinesMessage':\n return $translate.instant(\n 'There are {{count}} planned tasks with a deadline based on the general meeting or end fiscal year. Do you want to recalculate the deadline of these tasks?',\n params,\n );\n case 'msgBatchUpdateRegistrationsSuccess':\n return $translate.instant('{{count}} registrations where updated.', params);\n case 'msgComplianceRecalculationStarted':\n return $translate.instant(\n 'Changes saved. The compliance will be recalculated in the background.',\n );\n case 'msgComplianceRecalculationCompleted':\n return $translate.instant('The compliance recalculation has completed.');\n case 'msgXTransactionsDeleted':\n return $translate.instant('{{p0}} transactions deleted', params);\n\n case 'confirmDeleteEmailDomain':\n return $translate.instant(\n 'Are you sure you want to delete the email domain? All e-mails sent by AdminPulse will now use inbox@adminpulse.be as sender.',\n );\n\n case 'msgEmailDomainVerificationSucceeded':\n return $translate.instant(\n 'CNAME verification succeeded. Mails sent from {{domain}} will be authenticated by the domain.',\n params,\n );\n\n case 'msgEmailDomainVerificationFailed':\n return $translate.instant(\n 'CNAME verification failed. Make sure all 3 CNAME records are present in the DNS settings for domain {{domain}}. It can take up to 48 hours before the CNAME records are available to be verified. If the problem still persists, please visit the article or contact our helpdesk.',\n params,\n );\n case 'msgEmailDomainAddedVerificationPending':\n return $translate.instant(\n 'The domain was added successfully. Please add the CNAME records to the DNS settings of {{domain}}',\n params,\n );\n case 'msgCompanyEmailRequiredBeforeVerification':\n return $translate.instant(\n 'Please fill in a company e-mailaddress via the menu option \"Own company\" before verifying the domain.',\n );\n case 'msgEmailDomainVerificationRequired':\n return $translate.instant(\n 'E-mails will now be sent using {{companyEmail}}, however the email domain still needs to be verified in order to prevent emails to be delivered in the spam folder.',\n params,\n );\n case 'msgInvoiceWillBeProcessedTonight':\n return $translate.instant(\n 'The invoice will be processed tonight, using invoice date {{date}}',\n params,\n );\n case 'msgConfirmBillRegistrations':\n return $translate.instant(\n 'Are you sure you want to add these registrations to draft invoices?',\n );\n case 'selectionContainsDocumentPendingOrAlreadySigned':\n return $translate.instant(\n 'One or more documents selected is already awaiting signature or is already signed.',\n );\n case 'msgConfirmDeleteDocuments':\n return $translate.instant('Are you sure you want to delete these documents?');\n case 'msgTaskPlanningXSchedulesQueued':\n return $translate.instant(\n 'The taskplanning was queued for {{count}} task schedules. The planning will run in the background and can take a few minutes to finish.',\n params,\n );\n case 'msgTaskPlanningNothingQueued':\n return $translate.instant(\n 'There are no task schedules to be queued for this task template',\n );\n\n case 'comfirmUndoOrNeverSettledAdvanceLine':\n return $translate.instant(\n 'Are you sure you want to delete this advance? Settle advance on next settlement or delete it forever and never settle it?',\n );\n case 'neverSettleAdvance':\n return $translate.instant('Delete advance and never settle it');\n case 'neverSettleAdvancesAndNeverInvoiceRegistrations':\n return $translate.instant('Never invoice advance(s) and registration(s) again');\n case 'msgUnnumberInvoiceTwikeyWarning':\n return $translate.instant(\n 'This invoice might already exist in Twikey. Please delete the invoice in Twikey before numbering this invoice again, otherwise the payment info will be incorrect.',\n );\n case 'msgEditInvoiceTwikeyWarning':\n return $translate.instant(\n 'This invoice might already exist in Twikey. Please delete the invoice in Twikey before editing and saving this invoice, otherwise the payment info will be incorrect.',\n );\n case 'msgTransactionMovedToOpenTransactions':\n return $translate.instant('Transaction moved to open transactions');\n case 'msgArchiveTransactionExplanation':\n return $translate.instant(\n 'Are you sure you want to delete this transaction? Since there are one or more payments linked to the transaction, it will be archived and moved to the closed transactions instead.',\n );\n case 'msgRequiredEmailSubjectAndBody':\n return $translate.instant('E-mail subject and body are required.');\n\n case 'msgRelationFoundOnPeppolNetwork':\n return $translate.instant(\n 'The relation was found on the PEPPOL network. You can now send invoices to the PEPPOL network for this relation.',\n );\n case 'msgInvoiceSentViaPeppol':\n return $translate.instant('The invoice was sent to the PEPPOL network.');\n case 'msgRelationNotFoundOnPeppolNetwork':\n return $translate.instant('The relation was not found on the PEPPOL network');\n case 'msgRelationFoundOnPeppolNetworkButNoSupportedDocumentFormats':\n return $translate.instant(\n 'The relation was found on the PEPPOL network, but does not support any invoice formats that are also supported by AdminPulse',\n );\n case 'msgSwitchInvoiceStrategyToPeppolAfterInvoiceSent':\n return $translate.instant(\n 'The invoice was sent through the PEPPOL network. Do you want to switch the invoice strategy for this relation to PEPPOL?',\n );\n case 'msgSwitchInvoiceStrategyToPeppolAfterLookup':\n return $translate.instant(\n 'The relation was found on the PEPPOL network. Do you want to switch the invoice strategy for this relation to PEPPOL?',\n );\n\n case 'msgInvoiceAlreadyExportedViaPeppol':\n return $translate.instant(\n 'This invoice was already sent to the PEPPOL network. Are you sure you want to send it again?',\n );\n case 'msgInvoiceNotRemovedFromTwikey':\n return $translate.instant(\n 'The invoice was unnumbered but could not be removed in Twikey. Please remove the invoice in Twikey before numbering this invoice again.',\n );\n case 'msgDirectDebitInviteSent':\n return $translate.instant('Direct debit invite was sent to the customer.');\n case 'msgConfirmDeleteRelation':\n return $translate.instant('Are you sure you want to delete this relation?');\n case 'msgRelationSetToInactive':\n return $translate.instant(\n 'Relation put inactive because registrations and/or invoices exist for this relation, or because this relation is linked to another relation file',\n );\n case 'comfirmUnnumberInvoiceMessageTwikey':\n return $translate.instant(\n 'Are you sure want to unnumber this invoice? If the customer has a direct debit contract and the amount was already sent to the bank via Twikey, it is possible the customer will be invoiced even when you unnumber this invoice.',\n );\n case 'msgSomeTaskSchedulesCouldNotBePlanned':\n return $translate.instant(\n 'The task schedules were created, but there were some that could not plan the first task:',\n );\n case 'msgMandateCreatedInMollie':\n return $translate.instant('The mandate was created in Mollie');\n case 'msgFirstPaymentMollieCreated':\n return $translate.instant(\n 'A mandate will be created when the customer pays their next invoice.',\n );\n case 'comfirmUnnumberInvoiceMessagePaymentProvider':\n return $translate.instant(\n 'Are you sure want to unnumber this invoice? If the customer has a direct debit mandate and the amount was already debited via your payment provider, you might have to manually refund this customer.',\n );\n case 'msgConfirmCleanupMonthsTitle':\n return $translate.instant('Are you sure you want to set the cleanup to {{value}}?', params);\n case 'msgConfirmCleanupMonths':\n return $translate.instant(\n 'Because if you set it to {{value}}, {{count}} tasks will be removed by tomorrow.',\n params,\n );\n case 'msgConfirmCleanupMonthsAtLeast1000':\n return $translate.instant(\n 'Because if you set it to {{value}}, at least 1000 tasks will be removed by tomorrow.',\n params,\n );\n case 'msgValueCopiedToClipboard':\n return $translate.instant('ValueCopiedToClipboard');\n\n case 'EditTaskTemplateRequiredDocumentTypes':\n return $translate.instant('Add or remove required document types');\n case 'registrationFormContainsErrors':\n return $translate.instant('The registration form contains errors');\n case 'msgConfirmDeleteTodo':\n return $translate.instant('Are you sure you want to delete this todo?');\n case 'msgConfirmTurnOffAbsenceCounter':\n return $translate.instant(\n 'Are you sure you want to turn off the counter for this absence?',\n );\n case 'msgSomeLanguagesContainValidationErrors':\n return $translate.instant('Some languages contain validation errors');\n\n case 'msgCreateRelationGroup':\n return $translate.instant('Do you want to create the relation group {{value}}?', params);\n case 'msgCheckinWarning':\n return $translate.instant(\n 'Something went wrong checking in the document, this could be caused by the document having been deleted in OneDrive. The checkout has been discarded instead.',\n );\n case 'msgCheckinSuccesfull':\n return $translate.instant('Successfully checked in file.');\n case 'msgDiscardCheckout':\n return $translate.instant('Are you sure you want to discard the checkout?');\n default:\n //Fallback try to translate\n return $translate.instant(msgString, params);\n }\n };\n}\n","import angular from 'angular';\n\nangular.module('commonServices').factory('appUrls', [\n '$window',\n function($window) {\n return $window.backendUrls || {};\n },\n]);\n","import angular from 'angular';\n\nangular.module('commonServices').factory('commOutSvc', ['$window', commOutSvc]);\n\nfunction commOutSvc($window) {\n // This function exists so we can use the service either with an address in a string or with a reference to the addressList and the address\n var getAddressFromList = function(addressOrList, addressId) {\n if (typeof addressOrList === 'string' && typeof addressId === 'undefined') return addressOrList;\n\n var address = null;\n if (angular.isArray(addressOrList) && typeof addressId !== 'undefined') {\n for (var t = 0; t < addressOrList.length; t++) {\n if (addressOrList[t].id === addressId) {\n address = addressOrList[t];\n break;\n }\n }\n if (!address) {\n console.warn(\"CommOutSvc: Address wasn't found in the list!\", addressId, addressOrList);\n }\n } else if (\n angular.isObject(addressOrList) &&\n typeof addressOrList.addressData !== 'undefined'\n ) {\n address = addressOrList;\n }\n\n if (address == null) return null;\n if (address.medium === 0 || address.medium === 5)\n return (\n address.postAddress.street1 +\n ' ' +\n address.postAddress.number +\n ', ' +\n address.postAddress.zipCode +\n ' ' +\n address.postAddress.city +\n ', ' +\n address.postAddress.country\n );\n return address.addressData;\n };\n\n var formatHref = function(addressOrList, addressId, medium) {\n if (!addressOrList) return '';\n\n var data = getAddressFromList(addressOrList, addressId);\n if (!data) return '';\n\n switch (medium) {\n case 5:\n case 0:\n return 'http://maps.google.be/maps?q=' + data;\n case 1:\n return 'mailto:' + data;\n case 2:\n case 4:\n return 'tel:' + data.replace(/[^0-9+]/g, '');\n case 3:\n case 6:\n case 7:\n if (data.indexOf('http://') === -1 && data.indexOf('https://') === -1) {\n data = 'http://' + data;\n }\n return data;\n default:\n return '';\n }\n };\n\n return {\n formatHref: formatHref,\n };\n}\n","import angular from 'angular';\nimport DataCacheService from '@/shared/services/DataCacheService';\nimport {setEnumCache} from '@/shared/services/EnumCacheService';\nimport SignalRService from '@/shared/services/SignalRService';\nimport EmployeeFilterService from '@/shared/services/EmployeeFilterService';\nimport {guid1} from '@/shared/utils/guid';\n\nconst commonCountriesPerConfiguration = {\n 0: ['NL', 'BE', 'FR', 'LU', 'DE', 'GB', 'US', 'CH', 'IT'],\n 1: ['NL', 'BE', 'FR', 'LU', 'DE', 'GB', 'US', 'CH', 'IT'],\n 3: ['NL', 'BE', 'FR', 'LU', 'GB', 'CH', 'DE', 'US'],\n 5: ['NL', 'BE', 'DE', 'US'],\n};\nconst mapStaticCacheItems = (key, data, tenantConfiguration) => {\n switch (key) {\n case 'country': {\n const commonCountries = commonCountriesPerConfiguration[tenantConfiguration] || [];\n return data.map(x => ({\n ...x,\n isCommon: commonCountries.indexOf(x.code.toUpperCase()) >= 0,\n }));\n }\n case 'currency':\n return data.map(x => ({\n ...x,\n isCommon: x.code.toUpperCase() === 'EUR',\n }));\n\n default:\n return data;\n }\n};\n\nangular\n .module('commonServices')\n .service('dataCache', [\n '$http',\n 'appUrls',\n '$q',\n '$timeout',\n 'enumCacheSvc',\n 'authService',\n '$injector',\n 'recentRelationsSvc',\n '$translate',\n '$rootScope',\n 'buildversion',\n dataCache,\n ]);\n\nfunction dataCache(\n $http,\n appUrls,\n $q,\n $timeout,\n enumCacheSvc,\n authService,\n $injector,\n recentRelationsSvc,\n $translate,\n $rootScope,\n buildversion,\n) {\n var cache = this;\n\n var lock = null;\n let naceCodeLanguage = null;\n\n // In cache, we store collections, but we name them single because we use the same var in the load()fn to get the resource and in filters and selects...\n cache.ready = false;\n\n const documentSigningProviderUpdatedHandler = (companyId, documentSigningProvider) => {\n $timeout(function() {\n var dataCacheCompany = cache['company'].find(x => x.id == companyId);\n if (dataCacheCompany) {\n const model = {\n ...dataCacheCompany,\n documentSigningProvider: documentSigningProvider,\n };\n angular.extend(dataCacheCompany, model);\n }\n }, 100);\n };\n\n var createObjectFromArray = function(objectType, data) {\n switch (objectType) {\n case 'legalForm':\n case 'company':\n case 'salutation': {\n return data.reduce(function(o, v, i) {\n o[v.id] = v;\n return o;\n }, {});\n }\n case 'user':\n return data.reduce(function(o, v) {\n if (v.userID) o[v.userID] = v;\n return o;\n }, {});\n default:\n return null;\n }\n };\n\n var loadUserData = function() {\n var deferred = $q.defer();\n const staticDataRequest = $http.get(`/assets/data/dataCache.json?b=${buildversion}`);\n const userDataRequest = $http.get(`${appUrls.api}/api/user/data`);\n\n const tenantConfiguration = parseInt(authService.getClaims().TenantConfiguration || '1');\n $q.all([userDataRequest, staticDataRequest]).then(\n ([{ data: userData = {} }, { data: staticData = {} }]) => {\n angular.forEach(staticData, (value, key, obj) => {\n cache[key] = mapStaticCacheItems(key, value, tenantConfiguration);\n cache[key + 'Object'] = createObjectFromArray(key, cache[key]);\n });\n\n // put all the data in the cache object\n angular.forEach(userData, function(value, key, obj) {\n if (cache[key]) {\n console.warn(`Key ${key} already exists in dataCache`);\n return;\n }\n cache[key] = value;\n cache[key + 'Object'] = createObjectFromArray(key, value);\n });\n\n cache['defaultcompany'] = cache['company'].find(x => x.isDefaultCompany);\n const systemUserName = $translate.instant('SystemUser');\n cache.systemUser = {\n id: guid1,\n name: systemUserName,\n label: systemUserName,\n languageCode: $translate.use(),\n isActive: true,\n };\n\n loadNaceCodes().then(\n () => {\n DataCacheService.setDataCache(cache);\n deferred.resolve(true);\n },\n () => {\n DataCacheService.setDataCache(cache);\n deferred.resolve(true);\n },\n );\n },\n error => {\n deferred.reject(error);\n console.error('Loading application data FAILED...');\n },\n );\n return deferred.promise;\n };\n\n var ready = function() {\n if (lock != null) return lock.promise;\n lock = $q.defer();\n\n recentRelationsSvc.reloadRecentRelations();\n EmployeeFilterService.load();\n\n if (!cache.ready) {\n loadUserData().then(\n function() {\n enumCacheSvc.init(cache.buildNumber + ';' + cache.tenantConfiguration).then(function() {\n // when all these promises are resolved\n $injector.get('timerSvc').init();\n setEnumCache(enumCacheSvc);\n\n lock.resolve(cache);\n cache.ready = true;\n });\n },\n function(error) {\n cache.ready = false;\n if (lock != null) lock.reject(error);\n lock = null;\n },\n );\n } else {\n lock.resolve(cache);\n }\n return lock.promise;\n };\n ready();\n\n const loadNaceCodes = () => {\n const languageCode = $translate.use().split('-')[0];\n if (naceCodeLanguage === languageCode) return Promise.resolve();\n naceCodeLanguage = languageCode;\n const naceCodesRequest = $http.get(`/assets/data/nace-${languageCode}.json`);\n\n return naceCodesRequest.then(({ data }) => {\n cache.naceCodes = data;\n });\n };\n\n const languageChanged = function() {\n if (!cache || !cache.ready || !cache.systemUser) return;\n cache.systemUser.name = $translate.instant('SystemUser');\n cache.systemUser.label = cache.systemUser.name;\n cache.systemUser.languageCode = $translate.use();\n loadNaceCodes();\n };\n var translateListenerDestroyer = $rootScope.$on('$translateChangeSuccess', languageChanged);\n\n var destroy = function() {\n cache = {\n ready: false,\n };\n lock = null;\n translateListenerDestroyer();\n };\n\n authService.addOnLogOut(function() {\n destroy();\n });\n\n SignalRService.subscribe('documentSigningProviderUpdated', documentSigningProviderUpdatedHandler);\n\n let getDefaultCompanyForUser = (userId = null) => {\n if (!cache) return null;\n const employee = userId ? cache['user'].find(x => x.userID === userId) : cache['employee'];\n const companyId = employee?.companyId;\n return companyId\n ? cache['company'].find(x => x.id === companyId)\n : cache['defaultcompany'];\n }\n\n return {\n ready: ready,\n getArray: function(type) {\n return cache[type];\n },\n getObject: function(type) {\n return cache[type + 'Object'];\n },\n update: function(type, value) {\n cache[type] = value;\n },\n getCompanySettings: function(companyId) {\n if (!cache) return {};\n const companies = cache['company'] || [];\n const company = companies.find(x => x.id == companyId);\n\n if (!company) {\n console.warn('Company with id ' + companyId + ' not found in data cache');\n return {};\n }\n\n return company;\n },\n showPaymentMonitoring: function() {\n // the menu item for transactions etc should be shown if at least 1 company has this setting enabled\n if (!cache) return false;\n const companies = cache['company'] || [];\n return companies.some(x => x.paymentMonitoring === true);\n },\n getDefaultCompany: function() {\n if (!cache) return null;\n return cache['defaultcompany'];\n },\n\n updateCompany: function(updatedCompany) {\n if (!cache) return;\n var oldCompany = cache['company'].find(x => x.id == updatedCompany.id);\n angular.extend(oldCompany, updatedCompany);\n if (updatedCompany.tenantId === updatedCompany.id) {\n cache['defaultcompany'] = updatedCompany;\n }\n },\n updateAllCompanies: function(data) {\n if (!cache || !data) return;\n cache['company'].forEach(company => {\n angular.extend(company, data);\n });\n },\n getDefaultCompanyForUser,\n getAbsenceRelationIdForUser: (userId = null) => getDefaultCompanyForUser(userId)?.absenceRelationId\n };\n}\n","import angular from 'angular';\n\nangular\n .module('commonServices')\n .service('enumCacheSvc', [\n '$http',\n '$q',\n 'appUrls',\n 'buildversion',\n 'environment',\n 'authService',\n enumCache,\n ]);\n\nlet _cache = {};\n\nfunction enumCache($http, $q, appUrls, buildversion, environment, authService) {\n var reloadLock = null;\n var readyLock = $q.defer();\n var logLine = function(line) {\n //console.debug(line);\n };\n\n const tenantConfiguration = parseInt(authService.getClaims().TenantConfiguration || '1');\n const features = parseInt(authService.getClaims().WindowsSubAuthority || '0');\n const url =\n environment === 'local' ? appUrls.api + '/api/enum' : appUrls.app + '/translations/enums.json';\n\n var reloadEnums = function(backEndBuildVersion) {\n if (reloadLock != null) return reloadLock;\n var deferred = $q.defer();\n reloadLock = deferred.promise;\n $http\n .get(url, {\n params: {\n v: `${backEndBuildVersion};${buildversion}`,\n },\n })\n .then(\n function({ data }) {\n if (data) {\n const result = {};\n for (var e in data) {\n if (!data.hasOwnProperty(e) || e.indexOf('$') === 0) continue;\n result[e.toLowerCase()] = data[e];\n }\n _cache = result;\n }\n\n deferred.resolve(true);\n },\n function(error) {\n console.error('EnumCachSvc.reloadEnums:error' + JSON.stringify(error));\n deferred.reject(error);\n },\n )\n .finally(function() {\n reloadLock = null;\n });\n\n return reloadLock;\n };\n\n var init = function(backEndBuildVersion) {\n if (!readyLock || readyLock.promise.$$state.status === 1) readyLock = $q.defer(); //New ready lock\n reloadEnums(backEndBuildVersion).then(\n function() {\n readyLock.resolve(true);\n },\n function(error) {\n console.error('EnumCachSvc.init:error' + JSON.stringify(error));\n readyLock.reject(error);\n },\n );\n\n return readyLock.promise;\n };\n\n var getEnumValues = function(name, reloadOnError) {\n if (!name) return [];\n logLine('IDB EnumCachSvc.getEnumValues:start');\n return readyLock.promise.then(function() {\n logLine('IDB EnumCachSvc.getEnumValues:open enums store');\n const values = _cache[name.toLowerCase()];\n if (!values) return [];\n return values.filter(\n x =>\n (!x.configs || x.configs.length === 0 || x.configs.indexOf(tenantConfiguration) >= 0) &&\n (!x.feature || (features & x.feature) > 0),\n );\n });\n };\n\n return {\n init: init,\n get: function(name) {\n return getEnumValues(name, true);\n },\n };\n}\n","import angular from 'angular';\n\nangular\n .module('commonServices')\n .provider('googleMaps', function() {\n this.$get = [\n '$window',\n function($window) {\n return $window.google.maps;\n },\n ];\n })\n .factory('googleMapsSvc', [\n '$q',\n '$timeout',\n '$rootScope',\n 'googleMaps',\n 'appMessages',\n googleMapsSvc,\n ]);\n\nfunction googleMapsSvc($q, $timeout, $rootScope, googleMaps, appMessages) {\n var travelModes = [];\n var unitSystems = [];\n\n travelModes.driving = googleMaps.TravelMode.DRIVING;\n travelModes.bicycling = googleMaps.TravelMode.BICYCLING;\n travelModes.transit = googleMaps.TravelMode.TRANSIT;\n travelModes.walking = googleMaps.TravelMode.WALKING;\n\n unitSystems.metric = googleMaps.UnitSystem.METRIC;\n unitSystems.imperial = googleMaps.UnitSystem.IMPERIAL;\n\n var defaults = {\n unitSystem: null,\n durationInTraffic: false,\n avoidHighways: false,\n avoidTolls: false,\n };\n\n function distanceMatrix(args) {\n var req = angular.copy(defaults, {});\n angular.extend(req, args);\n var deferred = $q.defer();\n\n var service = new googleMaps.DistanceMatrixService();\n var timer = $timeout(function() {\n deferred.reject('Timeout');\n }, 10000);\n\n service.getDistanceMatrix(req, function(result, status) {\n $timeout.cancel(timer);\n if (\n status === googleMaps.DistanceMatrixStatus.OK ||\n status === googleMaps.DistanceMatrixStatus.ZERO_RESULTS\n ) {\n $rootScope.$apply(function() {\n if (!result.originAddresses[0])\n return deferred.reject(appMessages('mapsOriginNotFound'));\n if (!result.destinationAddresses[0])\n return deferred.reject(appMessages('mapsDestinationNotFound'));\n\n var res = {\n origin: result.originAddresses[0],\n destination: result.destinationAddresses[0],\n };\n\n if (result.rows.length && result.rows[0].elements.length) {\n var el = result.rows[0].elements[0];\n res.status = el.status;\n if (el.status === 'OK') {\n res.distance = (el.distance.value / 1000.0).toFixed(2);\n res.distanceText = el.distance.text;\n res.durationMinutes = Math.round(el.duration.value);\n res.durationText = el.duration.text;\n }\n }\n res.originalResult = result;\n return deferred.resolve(res);\n });\n } else {\n $rootScope.$apply(function() {\n return deferred.reject(status);\n });\n }\n });\n\n return deferred.promise;\n }\n\n return {\n getDistanceMatrix: function(origin, destination, args) {\n if (typeof args === 'undefined' || args === null) args = {};\n args.travelMode =\n travelModes[args.travelMode] || googleMaps.TravelMode.DRIVING;\n args.unitSystem =\n unitSystems[args.unitSystem] || googleMaps.UnitSystem.METRIC;\n args.origins = [].concat(origin);\n args.destinations = [].concat(destination);\n return distanceMatrix(args);\n },\n };\n}\n","import moment from 'moment';\n\nexport function BillableRegistration(data) {\n // ReSharper disable MisuseOfOwnerFunctionThis\n this.date = new Date();\n this.customer = {};\n this.type = 0;\n this.resource = null;\n\n this.originalQuantity = 0;\n this.originalUnitPrice = 0;\n this.originalDiscountPercentage = 0;\n this.originalVatRate = 0.21;\n this.originalVatType = 0;\n this.originalBillable = 0;\n this.quantity = null;\n this.unitPrice = null;\n this.discountPercentage = null;\n this.vatRate = null;\n this.vatType = null;\n this.billable = null;\n this.inForfait = null;\n this.originalInForfait = null;\n\n this.remark = null;\n this.internalRemark = null;\n\n this.isFixedPrice = false;\n if (data) angular.extend(this, data);\n\n if (this.date && typeof this.date === 'string')\n this.date = new moment(this.date.substr(0, 10)).toDate();\n\n this.billedQuantity = function() {\n var quantity = this.quantity != null ? this.quantity : this.originalQuantity;\n if (this.type !== 0) return quantity;\n return Math.round(quantity * 60, 10) / 60.0; //Round to minutes\n };\n\n this.displayTime = function() {\n //TFS 5864\n return this.billedQuantity().toTime();\n };\n\n this.billedUnitPrice = function() {\n return this.unitPrice != null ? this.unitPrice : this.originalUnitPrice;\n };\n this.billedDiscountPercentage = function() {\n return this.discountPercentage != null\n ? this.discountPercentage\n : this.originalDiscountPercentage;\n };\n\n this.billedVatRate = function() {\n return this.vatRate != null ? this.vatRate : this.originalVatRate;\n };\n this.billedVatType = function() {\n return this.vatType != null ? this.vatType : this.originalVatType;\n };\n\n this.isBilled = function() {\n return this.billable != null ? this.billable : this.originalBillable;\n };\n this.isInForfait = function() {\n return this.inForfait;\n };\n\n this.billedAmount = function() {\n return this.isBilled()\n ? this.billedUnitPrice() * (this.isFixedPrice ? 1 : this.billedQuantity())\n : null;\n };\n\n this.isModified = function() {\n return (\n this.quantity != null ||\n this.unitPrice != null ||\n this.vatRate != null ||\n this.vatType != null ||\n this.billable != null ||\n this.discountPercentage != null ||\n (this.price != null &&\n (this.originalPrice == null || this.originalPrice.id !== this.price.id))\n );\n };\n\n this.currentPrice = function() {\n return this.price ? this.price : this.originalPrice;\n };\n\n this.currentUnitPrice = function() {\n return this.unitPrice ? this.unitPrice : this.originalUnitPrice;\n };\n this.currentDiscountPercentage = function() {\n return this.discountPercentage ? this.discountPercentage : this.originalDiscountPercentage;\n };\n\n this.undo = function() {\n this.quantity = null;\n this.unitPrice = null;\n this.discountPercentage = null;\n this.vatRate = null;\n this.vatType = null;\n this.billable = null;\n this.price = null;\n this.isFixedPrice = false;\n };\n\n this.update = function(reg) {\n if (reg) {\n angular.extend(this, reg);\n }\n };\n}\n","import { BillableRegistration } from '../model/billableRegistration';\nimport utils from '@/shared/utils/adminpulse';\n\nexport function InvoiceLine(data) {\n // ReSharper disable MisuseOfOwnerFunctionThis\n this.resource = '';\n this.remark = '';\n this.quantity = null;\n this.unitPrice = null;\n this.discountPercentage = null;\n this.vatRate = null;\n this.vatType = null;\n this.type = 3; //Free\n\n this.billedQuantity = 0;\n this.billedUnitPrice = 0;\n this.billedVatRate = 0;\n this.billedVatType = 0;\n this.billedDiscountPercentage = 0;\n this.baseAmount = 0;\n this.hasRegistrations = false;\n\n this.registrations = [];\n if (data) angular.extend(this, data);\n\n if (\n this.registrations != null &&\n this.registrations.length > 0 &&\n !(this.registrations[0] instanceof BillableRegistration)\n ) {\n angular.forEach(this.registrations, function(item, idx, context) {\n context[idx] = new BillableRegistration(item);\n });\n }\n\n this.displayTime = function() {\n //TFS 5864\n return this.billedQuantity.toTime();\n };\n this.totalRegistrationHours = function() {\n if (!this.registrations || this.registrations.length === 0) return 0;\n const hours = this.registrations\n .reduce(function(sum, reg, index) {\n return sum + (reg.isBilled() && reg.type === 0 ? reg.billedQuantity() || 0 : 0);\n }, 0.0)\n .round(5);\n return hours.toTime();\n };\n this.totalRegistrationAmount = function() {\n if (!this.registrations || this.registrations.length === 0) return 0;\n return this.registrations\n .reduce(function(sum, reg, index) {\n return sum + (reg.isBilled() ? reg.billedAmount() || 0 : 0);\n }, 0.0)\n .round(2);\n };\n this.subtotal = function() {\n return this.baseAmount;\n };\n\n this.totalExVat = function() {\n return utils.roundAwayFromZero(this.subtotal() * (1 - (this.billedDiscountPercentage || 0)));\n };\n\n this.totalVat = function() {\n return this.totalExVat() * this.billedVatRate;\n };\n\n this.totalInclVat = function() {\n return this.totalExVat() * (1 + this.billedVatRate);\n };\n\n this.isModified = function() {\n return (\n this.hasRegistrations &&\n (this.quantity != null ||\n this.unitPrice != null ||\n this.discountPercentage != null ||\n this.vatRate != null ||\n this.vatType != null)\n );\n };\n this.isRegQuantityModified = function() {\n if (this.registrations)\n for (var i = 0; i < this.registrations.length; i++)\n if (this.registrations[i].quantity != null && this.registrations[i].source !== 1)\n return true;\n return false;\n };\n this.isRegUnitPriceModified = function() {\n if (this.registrations)\n for (var i = 0; i < this.registrations.length; i++)\n if (this.registrations[i].unitPrice != null && this.registrations[i].source !== 1)\n return true;\n return false;\n };\n this.isRegDiscountModified = function() {\n if (this.registrations)\n for (var i = 0; i < this.registrations.length; i++)\n if (this.registrations[i].discountPercentage != null && this.registrations[i].source !== 1)\n return true;\n return false;\n };\n this.isRegVatRateModified = function() {\n if (this.registrations)\n for (var i = 0; i < this.registrations.length; i++)\n if (\n (this.registrations[i].vatRate != null || this.registrations[i].vatType != null) &&\n this.registrations[i].source !== 1\n )\n return true;\n return false;\n };\n this.isRegModified = function() {\n if (this.registrations)\n for (var i = 0; i < this.registrations.length; i++)\n if (this.registrations[i].isModified() && this.registrations[i].source !== 1) return true;\n return false;\n };\n // this.hasRegistrations = function(onlyRealRegistrations) {\n // if (!onlyRealRegistrations) return this.registrations && this.registrations.length > 0;\n // return this.registrations && this.registrations.some(x => x.source !== 1);\n // };\n this.registrationsLoaded = function() {\n if (!this.hasRegistrations) return false;\n return !!this.registrations;\n };\n\n this.isBilled = function() {\n if (!this.registrations || !this.registrations.length) return true;\n if (this.quantity !== null && this.quantity !== 0) return true;\n for (var i = 0; i < this.registrations.length; i++)\n if (this.registrations[i].isBilled()) return true;\n return false;\n };\n\n this.undo = function() {\n this.quantity = null;\n this.unitPrice = null;\n this.discountPercentage = null;\n this.vatRate = null;\n this.vatType = null;\n };\n this.update = function(data) {\n if (data) angular.extend(this, data);\n\n for (var i = 0; i < this.registrations.length; i++)\n if (!(this.registrations[i] instanceof BillableRegistration))\n this.registrations[i] = new BillableRegistration(this.registrations[i]);\n };\n\n this.addRegistration = function(reg) {\n if (!reg) return;\n if (!(reg instanceof BillableRegistration)) reg = new BillableRegistration(reg);\n this.registrations.push(reg);\n };\n\n this.deleteRegistration = function(regId) {\n for (var i = 0; i < this.registrations.length; i++)\n if (this.registrations[i].id === regId) {\n this.registrations.splice(i, 1);\n return;\n }\n };\n this.updateRegistration = function(reg) {\n for (var i = 0; i < this.registrations.length; i++) {\n if (this.registrations[i].id === reg.id) {\n this.registrations[i].update(reg);\n return;\n }\n }\n };\n}\n","import { InvoiceLine } from './invoiceLine';\nimport moment from 'moment';\n\nexport function DraftInvoice(data) {\n this.date = new Date();\n this.dateToNumber = null;\n this.createDate = null;\n this.modifiedDate = null;\n this.customer = null;\n this.isInvoice = true;\n this.companyErrors = [];\n this.relationErrors = [];\n this.invoiceErrors = [];\n\n const invoiceExceptionCodes = [11026, 11037, 11034, 11044, 11061];\n const companyExceptionCodes = [2007, 1043, 1044, 1045];\n const relationExceptionCodes = [11017, 11018, 11019, 11040];\n\n if (data) {\n if (typeof data.createDate === 'string') data.createDate = moment.utc(data.createDate).toDate();\n if (typeof data.modifiedDate === 'string')\n data.modifiedDate = moment.utc(data.modifiedDate).toDate();\n if (data.date && typeof data.date === 'string') data.date = moment.utc(data.date).toDate();\n if (data.dateToNumber && typeof data.dateToNumber === 'string')\n data.dateToNumber = moment.utc(data.dateToNumber).toDate();\n\n if (data.billingErrors) {\n try {\n var billingErrors = JSON.parse(data.billingErrors);\n\n if (billingErrors.length > 0) {\n billingErrors.map(error => {\n if (invoiceExceptionCodes.includes(error.code)) {\n this.invoiceErrors.push(error);\n }\n if (companyExceptionCodes.includes(error.code)) {\n this.companyErrors.push(error);\n }\n if (relationExceptionCodes.includes(error.code)) {\n this.relationErrors.push(error);\n }\n });\n }\n } catch (error) {\n console.error(error);\n }\n }\n\n angular.extend(this, data);\n }\n\n this.parseBillingErrors = function(billingErrors) {\n try {\n this.companyErrors = [];\n this.relationErrors = [];\n this.invoiceErrors = [];\n\n if (billingErrors.length > 0) {\n billingErrors.map(error => {\n if (invoiceExceptionCodes.includes(error.code)) {\n this.invoiceErrors.push(error);\n }\n if (companyExceptionCodes.includes(error.code)) {\n this.companyErrors.push(error);\n }\n if (relationExceptionCodes.includes(error.code)) {\n this.relationErrors.push(error);\n }\n });\n }\n } catch (error) {\n console.error(error);\n }\n };\n\n this.invoiceLines = null;\n\n this.isLoaded = function() {\n return this.invoiceLines != null;\n };\n\n this.addLine = function(line) {\n if (!this.isLoaded() || line == null) return;\n if (!(line instanceof InvoiceLine)) line = new InvoiceLine(line);\n this.invoiceLines.push(line);\n };\n this.deleteLine = function(lineId) {\n if (!this.isLoaded() || lineId == null) return;\n for (var i = 0; i < this.invoiceLines.length; i++) {\n if (this.invoiceLines[i].id === lineId) {\n this.invoiceLines.splice(i, 1);\n return;\n }\n }\n };\n\n this.findLine = function(lineId) {\n if (typeof lineId !== 'string') return null;\n for (var i = 0; i < this.invoiceLines.length; i++) {\n if (this.invoiceLines[i].id === lineId) {\n return this.invoiceLines[i];\n }\n }\n return null;\n };\n\n /* this.findRegistration = function(id) {\n if (typeof id !== 'string') return null;\n\n for (var i = 0; i < this.invoiceLines.length; i++) {\n if (!this.invoiceLines[i].hasRegistrations) continue;\n\n for (var j = 0; j < this.invoiceLines[i].registrations.length; j++) {\n if (this.invoiceLines[i].registrations[j].id !== id) continue;\n\n return {\n line: this.invoiceLines[i],\n registration: this.invoiceLines[i].registrations[j],\n };\n }\n }\n\n return null;\n };*/\n\n this.hasLineType = function(lineType) {\n if (!this.isLoaded()) return false;\n for (var i = 0; i < this.invoiceLines.length; i++)\n if (this.invoiceLines[i].type === lineType) return true;\n return false;\n };\n this.hasRegistrations = function() {\n if (!this.isLoaded()) return false;\n for (var i = 0; i < this.invoiceLines.length; i++)\n if (this.invoiceLines[i].hasRegistrations) return true;\n return false;\n };\n\n this.isAdvance = function() {\n return hasLineType(5);\n };\n\n this.hasErrors = function() {\n if (!!this.error) return true;\n if (this.companyErrors.length) return true;\n if (this.relationErrors.length) return true;\n if (this.invoiceErrors.length) return true;\n return false;\n };\n\n this.canNumber = function(ignoreDate) {\n if (this.hasErrors()) {\n if (this.invoiceErrors.length === 1) {\n // allow numbering for mollie warning\n if (this.invoiceErrors[0].code !== 11061) return false;\n } else {\n return false;\n }\n }\n if (this.invoiceLines != null && !this.invoiceLines.length) return false;\n if (!ignoreDate && this.dateToNumber !== null) return false;\n return true;\n };\n}\n","import angular from 'angular';\nimport RequestLoadingAnimationService from '@/shared/services/RequestLoadingAnimationService';\nimport eventBus from 'pubsub-js';\n\nangular.module('commonServices').factory('loadingAnimationSvc', [\n '$timeout',\n function($timeout) {\n var loadingAnimation = {\n showSmall: false,\n };\n\n // we use the event bus because the loading animation is displayed in an angularjs component and if we listen to the service directly it doesn't automatically update the animation ($scope.watch doesnt work)\n eventBus.subscribe('showLoadingAnimationChanged', function(msg, data) {\n $timeout(function() {\n loadingAnimation.showSmall = data;\n }, 100);\n });\n\n function getLoadingAnimation() {\n return loadingAnimation;\n }\n\n function setSmallLoadingAnimation(value) {\n loadingAnimation.showSmall = value;\n }\n\n function showSmallLoadingAnimation() {\n loadingAnimation.showSmall = true;\n }\n\n function hideSmallLoadingAnimation() {\n loadingAnimation.showSmall = false;\n }\n\n return {\n getLoadingAnimation: getLoadingAnimation,\n setSmallLoadingAnimation: setSmallLoadingAnimation,\n showSmallLoadingAnimation: showSmallLoadingAnimation,\n hideSmallLoadingAnimation: hideSmallLoadingAnimation,\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('commonServices').factory('lockFactory', ['$q', lockFactory]);\n\nfunction lockFactory($q) {\n var locks = {};\n return {\n create: function(key, callback) {\n //Validation\n if (!key) throw new Error('The key is requred');\n if (typeof key !== 'string') throw new Error('The key must be a string');\n if (!angular.isFunction(callback))\n throw new Error('Callback must be a function');\n //Chekc if lock already exists\n if (locks[key]) return locks[key].promise; //Return lock promise\n\n //Create new lock promise\n locks[key] = $q.defer();\n //Call callback function\n $q.when(callback())\n .then(locks[key].resolve, locks[key].reject) //Resolve/reject lock when callback is finised\n .finally(function() {\n //Clear the lock\n locks[key] = null;\n });\n\n return locks[key].promise;\n },\n };\n}\n","import angular from 'angular';\n\nangular.module('commonServices').factory('objectFactorySvc', ['appSettings', objectFactory]);\n\nfunction objectFactory(appSettings) {\n var hasType = function(typesArray, type) {\n // if type is in typesArray return true, else return false\n for (var t = 0; t < typesArray.length; t++) {\n if (typesArray[t] === parseInt(type)) return true;\n }\n return false;\n };\n\n var newLinkObject = function(relId, linkType, targetRelation) {\n // the fields we select need to have targetRelation.type in targetTypes\n var fields = [];\n angular.forEach(linkType.fields, function(field) {\n if (!field.targetTypes || hasType(field.targetTypes, targetRelation.type))\n fields.push(angular.copy(field));\n });\n\n return {\n fields: fields,\n from: relId,\n isPrincipal: true,\n isRemoved: false,\n label: linkType.labelTo,\n linkType: linkType,\n target: targetRelation,\n to: targetRelation.id,\n };\n };\n\n var newAddressObject = function(medium, country) {\n var address = {\n id: '00000000-0000-0000-0000-000000000000',\n addressData: null,\n postAddress: null,\n isMain: false,\n medium: medium !== null ? medium : null,\n };\n // Physical address or postbox\n if (medium === 0 || medium === 5)\n address.postAddress = {\n street1: null,\n number: null,\n box: null,\n street2: null,\n zipCode: null,\n city: null,\n region: null,\n country: country || appSettings.defaultCountry,\n };\n return address;\n };\n\n var newCommObject = function() {\n return {\n addressId: '00000000-0000-0000-0000-000000000000',\n id: '00000000-0000-0000-0000-000000000000', //'00000000-0000-0000-0000-000000000000',\n label: null,\n medium: null,\n purpose: null,\n type: 0,\n };\n };\n\n return {\n address: newAddressObject,\n commSetting: newCommObject,\n link: newLinkObject,\n };\n}\n","import angular from 'angular';\n\nangular\n .module('commonServices')\n .factory('openIbanSvc', ['$q', '$http', 'appUrls', openIbanSvc]);\n\nfunction openIbanSvc($q, $http, appUrls) {\n var getBic = function(iban) {\n var deferred = $q.defer();\n $http.get(appUrls.api + '/api/transaction/bic/' + iban).then(\n function(data) {\n var result = data;\n if (!result) {\n deferred.reject({\n code: '06018',\n parameters: [],\n });\n return;\n }\n if (result.data) {\n deferred.resolve(result.data);\n } else {\n deferred.resolve('');\n }\n },\n function(error) {\n if (error) console.error(error);\n deferred.reject({\n code: '00032',\n parameters: error,\n });\n },\n );\n\n return deferred.promise;\n };\n\n return {\n getBic: getBic,\n };\n}\n","import angular from 'angular';\n\nangular\n .module('commonServices')\n .factory('optionsSvc', ['$q', '$filter', 'dataCache', 'zipCodes', optionsSvc]);\n\nfunction optionsSvc($q, $filter, dataCache, zipCodes) {\n // This Service keeps the lists from dataCache and adds the defaultvalues for these lists if needed, and returns the list either with or without default.\n var optionsObject = null;\n\n function ready() {\n var deferred = $q.defer();\n\n var stripObjectsToListIds = function (idPropName, baseList) {\n var idList = [];\n for (var t = 0; t < baseList.length; t++) {\n idList.push(baseList[t][idPropName]);\n }\n return idList;\n };\n\n if (!optionsObject) {\n dataCache.ready().then(\n function () {\n optionsObject = {};\n optionsObject.defaults = {};\n\n optionsObject.country = stripObjectsToListIds('code', dataCache.getArray('country'));\n optionsObject.language = stripObjectsToListIds('code', dataCache.getArray('language'));\n optionsObject.legalForm = stripObjectsToListIds('id', dataCache.getArray('legalForm'));\n optionsObject.salutation = stripObjectsToListIds(\n 'id',\n dataCache.getArray('salutation').sort(),\n );\n\n optionsObject.currency = ['EUR'];\n optionsObject.vatPercentage = dataCache.getArray('vatCategories');\n optionsObject.zipCodes = zipCodes.reduce(function (ar, el) {\n ar.push({\n code: el.code,\n name: el.name,\n label: el.code + ' ' + el.name,\n });\n if (el.nameNL && el.nameNL !== el.name)\n ar.push({\n code: el.code,\n name: el.nameNL,\n label: el.code + ' ' + el.nameNL,\n });\n if (el.nameFR && el.nameFR !== el.name && el.nameFR !== el.nameNL)\n ar.push({\n code: el.code,\n name: el.nameFR,\n label: el.code + ' ' + el.nameFR,\n });\n return ar;\n }, []);\n optionsObject.tenantConfiguration = [\n { label: 'Default', value: 0 },\n { label: 'Accountancy', value: 1 },\n { label: 'AccountancySouthAfrica', value: 2 },\n { label: 'AccountancyLuxembourg', value: 3 },\n { label: 'AccountancySpain', value: 4 },\n { label: 'AccountancyNetherlands', value: 5 },\n ];\n\n // Add defaults\n // TO AVOID CHANGING THE ORIGINAL lists, we put every default value in its own array, so we can work with concat in getOptionsWithDefaults\n\n // Creating the default object is different for different situations\n // Sometimes the element that is bound needs to be removed, sometimes set to null and sometimes set to empty string ('').\n // One factor seems to be the syntax for ng-options: when value is the whole object wich is recognised by 'track by' =>\n // track by int: empty string. track by string: remove\n // When the value is an int (Syntax with 'as': crmType.key as crmType.value) key needs to be set to null.\n\n //optionsObject.defaults.country = [{ name: 'Set a country' }];\n optionsObject.defaults.country = [null];\n //optionsObject.defaults.crmType = [{ key: null, value: 'Set a status' }];\n optionsObject.defaults.currency = [null];\n //optionsObject.defaults.emailType = [{ key: null, value: 'Set type' }];\n //optionsObject.defaults.language = [{ description: 'Set a language' }];\n optionsObject.defaults.language = [null];\n //optionsObject.defaults.legalForm = [{ id: '', description: 'Set a legalForm' }]; // Check\n optionsObject.defaults.legalForm = [null]; // Check\n //optionsObject.defaults.medium = [{ key: null, value: 'Set a medium' }];\n //optionsObject.defaults.purpose = [{ key: null, value: 'Set a purpose' }];\n //optionsObject.defaults.relationType = [{ key: null, value: 'Unknown' }];\n //optionsObject.defaults.salutation = [{ id: '', description: 'Set salutation' }];\n optionsObject.defaults.salutation = [null];\n optionsObject.defaults.vatPercentage = [\n {\n label: 'Set a percentage',\n value: null,\n },\n ];\n deferred.resolve(true);\n },\n function () {\n deferred.reject('dataCache not ready');\n },\n );\n } else {\n deferred.resolve('true');\n }\n return deferred.promise;\n }\n\n var getOptions = function (type) {\n return optionsObject[type];\n };\n\n var getOptionsWithDefault = function (type) {\n return optionsObject.defaults[type].concat(optionsObject[type]);\n };\n\n var getDefault = function (type) {\n return optionsObject.defaults[type];\n };\n\n return {\n ready: ready,\n getOptions: getOptions,\n getOptionsWithDefault: getOptionsWithDefault,\n getDefault: getDefault,\n };\n}\n","import angular from 'angular';\n\nimport { DraftInvoice } from '../../invoicing/model/draftInvoice';\nimport { InvoiceLine } from '../../invoicing/model/invoiceLine';\nimport { Registration } from '../../registrations/model/registration';\nimport { BillableRegistration } from '../../invoicing/model/billableRegistration';\nimport { Invoice } from '../../invoicing/model/invoice';\nimport { castJSON } from '../../helpers';\nimport utils from '@/shared/utils/adminpulse';\nimport moment from 'moment';\n\nangular\n .module('commonServices')\n .factory('resourceFactorySvc', ['$resource', '$http', 'appUrls', resourceFactorySvc]);\n\nfunction resourceFactorySvc($resource, $http, appUrls) {\n var wrapResponse = function() {\n return [\n function(data, headers, status) {\n //Only wrap if request was successfull\n if (status === 200)\n return {\n result: JSON.parse(data),\n };\n return data;\n },\n ].concat($http.defaults.transformResponse);\n };\n\n var castResponse = function(type) {\n return [].concat($http.defaults.transformResponse, [\n function(data, headers, status) {\n if (status !== 200) return data;\n return castJSON(data, type);\n },\n ]);\n };\n\n var fileResponse = function() {\n return function(data, headers, status) {\n //Only wrap if request was successfull\n if (status !== 200) {\n return angular.fromJson(String.fromCharCode.apply(null, new Uint8Array(data)));\n }\n\n var headers = headers();\n\n var fileType = headers['content-type'];\n var blob = null;\n if (data)\n blob = new Blob(\n [data],\n fileType\n ? {\n type: fileType,\n }\n : {},\n );\n var fileName = utils.getFileNameFromHeader(headers['content-disposition']);\n return {\n blob: blob,\n fileName: fileName,\n headers: headers,\n };\n };\n };\n\n function transformRegistration(data) {\n for (var i = 0; i < data.length; i++) {\n data[i].date2 = data[i].date;\n data[i].date =\n data[i].date.getFullYear() +\n '-' +\n (data[i].date.getMonth() + 1) +\n '-' +\n data[i].date.getDate();\n }\n\n var result = JSON.stringify(data);\n\n for (var j = 0; j < data.length; j++) {\n //TFS 5323\n data[j].date = data[j].date2;\n }\n\n return result;\n }\n\n var dateTimeRegex = /\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d(?:\\.\\d+)?Z?/;\n var dateRegex = /^(\\d{4}-\\d{1,2}-\\d{1,2})(T0+:0+:0+)?$/;\n\n var transformDate = function(value) {\n var match;\n var matchDate;\n // Check for string properties which look like dates.\n if (typeof value === 'string' && (match = value.match(dateTimeRegex))) {\n var milliseconds;\n if ((matchDate = value.match(dateRegex)))\n milliseconds = moment.utc(matchDate[1]).utcOffset(0);\n else milliseconds = Date.parse(match[0]);\n if (!isNaN(milliseconds)) {\n return new Date(milliseconds);\n }\n }\n return null;\n };\n\n var setDatePropsToISO = function(input) {\n // Ignore things that aren't objects.\n if (typeof input !== 'object') return input;\n\n for (var key in input) {\n if (!input.hasOwnProperty(key)) continue;\n if (key.substr(0, 1) === '$') continue; //Ignore angular properties & promises\n var value = input[key];\n if (typeof value === 'undefined' || value === null) continue;\n if (typeof value === 'string') continue;\n if (value instanceof Date) input[key] = value.ISO();\n else if (typeof value === 'object') setDatePropsToISO(value);\n }\n return input;\n };\n\n var convertDateStringsToDates = function() {\n var transform = function(input) {\n // Ignore things that aren't objects.\n if (typeof input !== 'object') return input;\n\n for (var key in input) {\n if (!input.hasOwnProperty(key)) continue;\n\n var value = input[key];\n var match;\n var matchDate;\n // Check for string properties which look like dates.\n if (typeof value === 'string' && (match = value.match(dateTimeRegex))) {\n var milliseconds;\n if ((matchDate = value.match(dateRegex))) milliseconds = Date.parse(matchDate[1]);\n else milliseconds = Date.parse(match[0]);\n if (!isNaN(milliseconds)) {\n input[key] = new Date(milliseconds);\n }\n } else if (typeof value === 'object') {\n // Recurse into object\n transform(value);\n }\n }\n return input;\n };\n\n return [].concat($http.defaults.transformResponse, [transform]);\n };\n\n var convertDateToString = function() {\n var transform = function(input) {\n return setDatePropsToISO(input);\n };\n return [].concat([transform], $http.defaults.transformRequest);\n };\n\n var convertDateToUtcString = function() {\n var transform = function(input) {\n for (const key in input) {\n const value = input[key];\n if (value instanceof Date) {\n input[key] = moment\n .utc(input[key])\n .utcOffset(0)\n .toISOString(false)\n .substr(0, 10);\n }\n }\n return setDatePropsToISO(input);\n };\n return [].concat([transform], $http.defaults.transformRequest);\n };\n\n // Swith statement with strings: these strings are used in dataCache\n var getResource = function(type) {\n switch (type) {\n case 'address': {\n return $resource(appUrls.api + '/api/address/:id', null, {\n update: {\n method: 'PUT',\n },\n save: {\n method: 'POST',\n },\n delete: {\n method: 'DELETE',\n },\n mailSuggestions: {\n method: 'GET',\n url: appUrls.api + '/api/address/MailSuggestions/:id',\n isArray: true,\n },\n });\n }\n case 'commSetting': {\n return $resource(appUrls.api + '/api/communicationsetting', null, {\n update: {\n method: 'PUT',\n },\n save: {\n method: 'POST',\n }, // , transformResponse: function (data) { return { id: data.replace(/\"/g, '') }; }\n });\n }\n case 'company': {\n return $resource(appUrls.api + '/api/company/:action', null, {\n getAll: {\n method: 'GET',\n params: {\n action: 'GetAll',\n },\n isArray: true,\n },\n update: {\n method: 'PUT',\n params: {\n action: 'Put',\n },\n },\n deleteFile: {\n method: 'DELETE',\n params: {\n action: 'Delete',\n },\n },\n });\n }\n case 'country': {\n return $resource(appUrls.api + '/api/country', null, {});\n }\n case 'currency': {\n return $resource(appUrls.api + '/api/currency', null, {});\n }\n case 'employee': {\n return $resource(appUrls.api + '/api/employee/:action', null, {\n query: {\n method: 'GET',\n params: {\n action: 'Get',\n },\n isArray: true,\n cancellable: true,\n },\n get: {\n method: 'GET',\n url: appUrls.api + '/api/employee/:id',\n params: {\n id: '00000000-0000-0000-0000-000000000000',\n },\n },\n getProfile: {\n method: 'GET',\n url: appUrls.api + '/api/employee/profile',\n },\n create: {\n method: 'POST',\n params: {\n action: 'Create',\n },\n isArray: false,\n },\n update: {\n method: 'PUT',\n params: {\n action: 'PUT',\n },\n transformRequest: convertDateToString(),\n },\n updateMyProfile: {\n method: 'PUT',\n params: {\n action: 'profile',\n },\n },\n registration: {\n method: 'GET',\n params: {\n action: 'Registration',\n },\n isArray: true,\n },\n delete: {\n method: 'DELETE',\n params: {\n action: 'Delete',\n },\n isArray: false,\n },\n undelete: {\n method: 'DELETE',\n params: {\n action: 'Undelete',\n },\n isArray: false,\n },\n updateTeams: {\n method: 'PUT',\n url: appUrls.api + '/api/employee/UpdateEmployeeTeams?id=:id',\n params: {},\n },\n updateTags: {\n method: 'PUT',\n url: appUrls.api + '/api/employee/tags?id=:id',\n params: {},\n isArray: true,\n },\n updateProfile: {\n method: 'PUT',\n url: appUrls.api + '/api/employee/UpdateProfile',\n params: {},\n isArray: false,\n },\n setHidden: {\n method: 'PUT',\n url: appUrls.api + '/api/employee/Hidden/:id/:hidden',\n params: {},\n isArray: false,\n },\n });\n }\n case 'employeeProfile': {\n return $resource(appUrls.api + '/api/employeeProfile/:action/:id', null, {\n query: {\n method: 'GET',\n params: {\n action: 'Get',\n },\n isArray: true,\n },\n overview: {\n method: 'GET',\n params: {\n action: 'Overview',\n },\n isArray: true,\n },\n update: {\n method: 'PUT',\n },\n post: {\n method: 'POST',\n },\n delete: {\n method: 'DELETE',\n params: {\n action: 'Delete',\n },\n },\n setDefault: {\n method: 'PUT',\n params: {\n action: 'SetDefault',\n },\n isArray: true,\n },\n });\n }\n case 'field': {\n return $resource(\n appUrls.api + '/api/field/:action',\n {\n action: 'Get',\n },\n {\n update: {\n method: 'PUT',\n params: {\n action: 'Put',\n },\n },\n save: {\n method: 'POST',\n params: {\n action: 'Post',\n },\n },\n delete: {\n method: 'DELETE',\n params: {\n action: 'Delete',\n },\n },\n },\n );\n }\n case 'fieldRequired': {\n return $resource(appUrls.api + '/api/field/required', null, {\n wizard: {\n method: 'GET',\n url: appUrls.api + '/api/field/wizard',\n isArray: true,\n },\n });\n }\n case 'kbo':\n case 'KBO': {\n return $resource(\n 'api/KBO/:action/:id',\n {\n action: 'Get',\n },\n {\n search: {\n method: 'GET',\n params: {\n action: 'Search',\n },\n isArray: true,\n },\n copy: {\n method: 'GET',\n params: {\n action: 'Copy',\n },\n isArray: false,\n },\n },\n );\n }\n case 'language': {\n return $resource(appUrls.api + '/api/language', null, {\n ignoreLoadingBar: true,\n });\n }\n case 'link': {\n return $resource(appUrls.api + '/api/link', null, {\n update: {\n method: 'PUT',\n },\n });\n }\n case 'relationLink': {\n return $resource(appUrls.api + '/api/relationlink/:action/:id', null, {\n update: {\n method: 'PUT',\n params: {\n action: 'Put',\n },\n },\n save: {\n method: 'POST',\n },\n delete: {\n method: 'DELETE',\n params: {\n action: 'Delete',\n },\n },\n getDetails: {\n method: 'GET',\n params: {\n action: 'Details',\n },\n transformResponse: convertDateStringsToDates(),\n },\n updateDetails: {\n method: 'PUT',\n params: {\n action: 'UpdateDetails',\n },\n transformResponse: convertDateStringsToDates(),\n },\n shareholderGroups: {\n method: 'GET',\n params: {\n action: 'ShareholderGroups',\n },\n isArray: true,\n },\n linkInfo: {\n method: 'GET',\n params: {\n action: 'LinkInfo',\n },\n transformResponse: convertDateStringsToDates(),\n },\n });\n }\n case 'linkType': {\n return $resource(appUrls.api + '/api/link', null, {});\n }\n case 'registration': {\n return $resource(\n appUrls.api + '/api/registration/:action/:id',\n {\n action: 'Get',\n },\n {\n query: {\n method: 'GET',\n params: {\n action: 'Get',\n },\n cancellable: true,\n },\n kpi: {\n method: 'GET',\n params: {\n action: 'kpi',\n },\n cancellable: true,\n },\n update: {\n method: 'PUT',\n params: {\n action: 'Put',\n },\n isArray: true,\n transformRequest: transformRegistration,\n },\n save: {\n method: 'POST',\n params: {\n action: 'Post',\n },\n isArray: true,\n transformRequest: transformRegistration,\n },\n delete: {\n method: 'DELETE',\n params: {\n action: 'Delete',\n },\n },\n report: {\n method: 'GET',\n params: {\n action: 'Report',\n },\n },\n toggleNeverInvoice: {\n method: 'PUT',\n params: { action: 'NeverInvoice' },\n isArray: false,\n },\n toggleBillable: {\n method: 'PUT',\n params: { action: 'Billable' },\n isArray: false,\n },\n toggleInForfait: {\n method: 'PUT',\n params: { action: 'InForfait' },\n isArray: false,\n },\n calcDurationInDays: {\n method: 'POST',\n params: { action: 'CalcDurationInDays' },\n isArray: true,\n cancellable: true,\n },\n },\n );\n }\n case 'resource': {\n return $resource(appUrls.api + '/api/resource/:action/:id/:id2', null, {\n reg: {\n method: 'GET',\n params: {\n action: 'Registration',\n type: -1,\n },\n isArray: true,\n cancellable: true,\n },\n names: {\n method: 'GET',\n params: {\n action: 'Names',\n type: -1,\n },\n isArray: true,\n },\n updateResource: {\n method: 'PUT',\n params: {\n action: 'Put',\n },\n },\n updateCategory: {\n method: 'PUT',\n params: {\n action: 'UpdateCategory',\n },\n },\n updatePrice: {\n method: 'PUT',\n params: {\n action: 'Price',\n },\n },\n saveResource: {\n method: 'POST',\n params: {\n action: 'Post',\n },\n },\n saveCategory: {\n method: 'POST',\n params: {\n action: 'CreateCategory',\n },\n },\n deleteResource: {\n method: 'POST',\n params: {\n action: 'DeleteResource',\n },\n isArray: false,\n transformResponse: wrapResponse(),\n },\n deleteCategory: {\n method: 'POST',\n params: {\n action: 'DeleteCategory',\n },\n isArray: false,\n transformResponse: wrapResponse(),\n },\n restoreResource: {\n method: 'GET',\n url: appUrls.api + '/api/resource/restoreResource?id=:id',\n },\n restoreCategory: {\n method: 'GET',\n url: appUrls.api + '/api/resource/RestoreCategory?id=:id',\n isArray: false,\n },\n subresources: {\n method: 'GET',\n params: {\n action: 'ResourcesInCategory',\n },\n isArray: true,\n },\n tags: {\n method: 'GET',\n params: {\n action: 'Tags',\n },\n isArray: true,\n },\n priceOptions: {\n method: 'GET',\n params: {\n action: 'PriceOptions',\n },\n },\n });\n }\n case 'team': {\n return $resource(appUrls.api + '/api/team/:action/:id', null, {\n flatTeams: {\n method: 'GET',\n params: {\n action: 'flatTeams',\n },\n isArray: true,\n },\n myTeams: {\n method: 'GET',\n params: {\n action: 'myTeams',\n },\n isArray: true,\n },\n });\n }\n case 'price': {\n return $resource(appUrls.api + '/api/price/:action/:id', null, {\n update: {\n method: 'PUT',\n params: {\n action: 'Put',\n },\n transformResponse: convertDateStringsToDates(),\n transformRequest: convertDateToString(),\n },\n save: {\n method: 'POST',\n params: {\n action: 'Post',\n },\n transformResponse: convertDateStringsToDates(),\n transformRequest: convertDateToString(),\n },\n delete: {\n method: 'DELETE',\n params: {\n action: 'Delete',\n },\n },\n setTags: {\n method: 'PUT',\n params: {\n action: 'Tags',\n },\n },\n });\n }\n case 'discount': {\n return $resource(appUrls.api + '/api/discount/:action/:id', null, {\n update: {\n method: 'PUT',\n params: {\n action: 'Put',\n },\n transformResponse: convertDateStringsToDates(),\n transformRequest: convertDateToString(),\n },\n save: {\n method: 'POST',\n params: {\n action: 'Post',\n },\n transformResponse: convertDateStringsToDates(),\n transformRequest: convertDateToString(),\n },\n delete: {\n method: 'DELETE',\n params: {\n action: 'Delete',\n },\n },\n addTag: {\n method: 'GET',\n params: {\n action: 'Add',\n },\n },\n removeTag: {\n method: 'GET',\n params: {\n action: 'Remove',\n },\n },\n });\n }\n case 'relation': {\n return $resource(\n appUrls.api + '/api/Relation/:action/',\n {\n action: 'Get',\n },\n {\n get: {\n method: 'GET',\n params: {\n action: 'Get',\n },\n isArray: false,\n transformResponse: convertDateStringsToDates(),\n },\n getData: {\n method: 'POST',\n params: {\n action: 'Data',\n },\n isArray: false,\n transformResponse: convertDateStringsToDates(),\n },\n update: {\n method: 'PUT',\n params: {\n action: 'Put',\n },\n isArray: false,\n transformRequest: convertDateToString(),\n transformResponse: convertDateStringsToDates(),\n },\n list: {\n method: 'GET',\n params: {\n action: 'List',\n },\n isArray: true,\n },\n names: {\n method: 'GET',\n params: {\n action: 'Names',\n searchValue: '',\n includeInactive: false,\n crmTypes: [],\n type: null,\n take: 20,\n },\n isArray: true,\n cancellable: true,\n },\n ids: {\n method: 'POST',\n params: {\n action: 'Names',\n },\n isArray: true,\n },\n save: {\n method: 'POST',\n params: {\n action: 'Create',\n },\n isArray: false,\n },\n delete: {\n method: 'DELETE',\n params: {\n action: 'Delete',\n },\n isArray: false,\n transformResponse: wrapResponse(),\n },\n undelete: {\n method: 'DELETE',\n params: {\n action: 'Undelete',\n },\n url: appUrls.api + '/api/Relation/:action/:id',\n },\n changeType: {\n method: 'PUT',\n params: {\n action: 'Type',\n },\n isArray: false,\n transformRequest: convertDateToString(),\n },\n sections: {\n method: 'GET',\n params: { action: 'sections' },\n isArray: true,\n },\n },\n );\n }\n case 'settings': {\n return $resource(\n appUrls.api + '/api/settings/:action',\n {\n action: 'Get',\n },\n {\n query: {\n isArray: false,\n },\n update: {\n method: 'PUT',\n params: {\n action: 'PUT',\n },\n },\n company: {\n method: 'GET',\n params: {\n action: 'Company',\n },\n transformResponse: convertDateStringsToDates(),\n },\n hrm: {\n method: 'GET',\n params: {\n action: 'hrm',\n },\n transformResponse: convertDateStringsToDates(),\n },\n saveCompany: {\n method: 'PUT',\n params: {\n action: 'Company',\n },\n transformResponse: convertDateStringsToDates(),\n transformRequest: convertDateToString(),\n },\n saveHrm: {\n method: 'PUT',\n params: {\n action: 'hrm',\n },\n transformResponse: convertDateStringsToDates(),\n transformRequest: convertDateToString(),\n },\n deleteAttachment: {\n method: 'DELETE',\n params: {\n action: 'DeleteInvoiceAttachment',\n },\n },\n },\n );\n }\n case 'section': {\n return $resource(\n appUrls.api + '/api/section/:action',\n {\n action: 'Get',\n },\n {\n update: {\n method: 'PUT',\n params: {\n action: 'Put',\n },\n },\n save: {\n method: 'POST',\n params: {\n action: 'Post',\n },\n },\n delete: {\n method: 'DELETE',\n params: {\n action: 'Delete',\n },\n },\n },\n );\n }\n case 'sectionConfig': {\n return $resource(\n appUrls.api + '/api/SectionConfiguration/:action',\n {\n action: 'Get',\n },\n {\n update: {\n method: 'PUT',\n params: {\n action: 'Put',\n },\n },\n save: {\n method: 'POST',\n params: {\n action: 'Post',\n },\n },\n delete: {\n method: 'DELETE',\n params: {\n action: 'Delete',\n },\n },\n },\n );\n }\n case 'user': {\n return $resource(\n appUrls.api + '/api/user/:action',\n {\n action: 'all',\n },\n {\n reset: {\n method: 'GET',\n url: appUrls.api + '/api/user/:action/:id',\n params: {\n action: 'reset',\n id: '00000000-0000-0000-0000-000000000000',\n },\n },\n delete: {\n method: 'DELETE',\n url: appUrls.api + '/api/user/:id',\n params: {\n id: '00000000-0000-0000-0000-000000000000',\n },\n },\n create: {\n method: 'POST',\n url: appUrls.api + '/api/user',\n },\n forgotPassword: {\n method: 'GET',\n url: appUrls.api + '/api/user/:action',\n params: {\n action: 'forgotPassword',\n username: '',\n },\n },\n changePassword: {\n method: 'POST',\n params: {\n action: 'changePassword',\n },\n },\n get2FA: {\n method: 'POST',\n url: appUrls.api + '/api/user/:action',\n params: {\n action: 'get2fa',\n },\n },\n enable2FA: {\n method: 'POST',\n url: appUrls.api + '/api/user/:action',\n params: {\n action: 'Enable2FA',\n },\n },\n disable2FA: {\n method: 'POST',\n url: appUrls.api + '/api/user/:action',\n params: {\n action: 'Disable2FA',\n },\n },\n changeUsername: {\n method: 'POST',\n params: {\n action: 'changeUsername',\n },\n },\n language: {\n method: 'PUT',\n params: {\n action: 'language',\n },\n },\n },\n );\n }\n\n case 'invoice': {\n return $resource(\n appUrls.api + '/api/Invoice/:action',\n {\n action: 'Get',\n },\n {\n query: {\n method: 'GET',\n params: {\n action: 'Get',\n },\n isArray: true,\n transformResponse: castResponse(Invoice),\n cancellable: true,\n },\n lines: {\n method: 'GET',\n params: {\n action: 'Lines',\n },\n isArray: false,\n cancellable: true,\n },\n update: {\n method: 'PUT',\n params: {\n action: 'Put',\n },\n },\n info: {\n method: 'GET',\n params: {\n action: 'Info',\n },\n isArray: false,\n ignoreLoadingBar: true,\n cancellable: true,\n },\n topcustomerdebt: {\n method: 'GET',\n params: {\n action: 'TopCustomerDebt',\n },\n ignoreLoadingBar: true,\n },\n topcustomerbillable: {\n method: 'GET',\n params: {\n action: 'TopCustomerBillable',\n },\n ignoreLoadingBar: true,\n },\n topcustomerrevenue: {\n method: 'GET',\n params: {\n action: 'TopCustomerRevenue',\n },\n ignoreLoadingBar: true,\n },\n billedpermonth: {\n method: 'GET',\n params: {\n action: 'BilledPerMonth',\n },\n ignoreLoadingBar: true,\n },\n customerBillable: {\n method: 'GET',\n params: {\n action: 'CustomerBillable',\n },\n isArray: true,\n ignoreLoadingBar: true,\n },\n copy: {\n method: 'POST',\n params: {\n action: 'Copy',\n },\n isArray: true,\n },\n number: {\n method: 'POST',\n params: {\n action: 'Post',\n },\n false: true,\n },\n unnumber: {\n method: 'DELETE',\n params: {\n action: 'Unnumber',\n },\n isArray: false,\n },\n credit: {\n method: 'POST',\n params: {\n action: 'Credit',\n },\n isArray: true,\n },\n quickSend: {\n method: 'POST',\n params: {\n action: 'QuickSend',\n },\n isArray: false,\n transformResponse: wrapResponse(),\n },\n getMail: {\n method: 'GET',\n params: {\n action: 'Mail',\n },\n isArray: false,\n },\n sendMail: {\n method: 'POST',\n params: {\n action: 'Send',\n },\n isArray: false,\n },\n initEdit: {\n method: 'GET',\n params: {\n action: 'EditFinalizedInvoice',\n id: 'Init',\n },\n isArray: false,\n },\n commitEdit: {\n method: 'GET',\n params: {\n action: 'EditFinalizedInvoice',\n id: 'Commit',\n },\n isArray: false,\n },\n cancelEdit: {\n method: 'GET',\n params: {\n action: 'EditFinalizedInvoice',\n id: 'Cancel',\n },\n isArray: false,\n },\n export: {\n method: 'POST',\n params: {\n action: 'Export',\n },\n isArray: false,\n transformResponse: wrapResponse(),\n },\n markSent: {\n method: 'POST',\n params: {\n action: 'markSent',\n },\n transformResponse: castResponse(Invoice),\n },\n markExported: {\n method: 'POST',\n params: {\n action: 'markExported',\n },\n transformResponse: castResponse(Invoice),\n },\n clearExportStatus: {\n method: 'POST',\n params: {\n action: 'clearExportStatus',\n },\n transformResponse: castResponse(Invoice),\n },\n report: {\n method: 'POST',\n params: {\n action: 'Report',\n },\n cache: false,\n },\n linesReport: {\n method: 'POST',\n params: {\n action: 'LinesReport',\n },\n cache: false,\n },\n },\n );\n }\n case 'invoiceLine': {\n return $resource(\n appUrls.api + '/api/InvoiceLine/:action/:id',\n {\n action: 'Get',\n },\n {\n query: {\n method: 'GET',\n isArray: true,\n transformResponse: castResponse(InvoiceLine),\n cancellable: true,\n },\n update: {\n method: 'PUT',\n params: {\n action: 'Put',\n },\n },\n save: {\n method: 'POST',\n params: {\n action: 'Post',\n },\n },\n reset: {\n method: 'POST',\n params: {\n action: 'Reset',\n },\n },\n discount: {\n method: 'POST',\n params: {\n action: 'Discount',\n },\n },\n delete: {\n method: 'DELETE',\n params: {\n action: 'Delete',\n },\n },\n move: {\n method: 'POST',\n params: {\n action: 'Move',\n up: true,\n },\n isArray: true,\n transformResponse: castResponse(InvoiceLine),\n },\n registrations: {\n method: 'GET',\n params: {\n action: 'Registrations',\n },\n isArray: true,\n transformResponse: castResponse(BillableRegistration),\n },\n },\n );\n }\n case 'invoiceRegistration': {\n return $resource(appUrls.api + '/api/InvoiceRegistration/:action', null, {\n bill: {\n method: 'POST',\n params: {\n action: 'Bill',\n },\n transformResponse: wrapResponse(),\n },\n create: {\n method: 'POST',\n url: appUrls.api + '/api/InvoiceRegistration/Create/:invoiceId',\n transformRequest: convertDateToString(),\n },\n update: {\n method: 'PUT',\n url: appUrls.api + '/api/InvoiceRegistration/Put/:invoiceId',\n transformRequest: convertDateToString(),\n },\n billRegistrations: {\n method: 'POST',\n params: {\n action: 'POST',\n },\n isArray: true,\n },\n delete: {\n method: 'DELETE',\n url: appUrls.api + '/api/InvoiceRegistration/Delete/:invoiceId/:id',\n },\n\n changeResource: {\n method: 'PUT',\n url: appUrls.api + '/api/InvoiceRegistration/ChangeResource',\n transformRequest: convertDateToString(),\n },\n });\n }\n case 'draftInvoice': {\n return $resource(\n appUrls.api + '/api/DraftInvoice/:id',\n {\n id: '@id',\n },\n {\n query: {\n method: 'GET',\n isArray: true,\n url: appUrls.api + '/api/DraftInvoice/DraftInvoices',\n transformResponse: castResponse(DraftInvoice),\n cancellable: true,\n },\n get: {\n method: 'GET',\n isArray: false,\n url: appUrls.api + '/api/DraftInvoice/:id',\n transformResponse: castResponse(DraftInvoice),\n },\n update: {\n method: 'PUT',\n isArray: false,\n transformRequest: convertDateToUtcString(),\n transformResponse: castResponse(DraftInvoice),\n },\n recalculateDiscounts: {\n method: 'GET',\n url: appUrls.api + '/api/DraftInvoice/RecalculateDiscounts/:id',\n isArray: false,\n transformResponse: wrapResponse(),\n },\n bookyearInfo: {\n method: 'GET',\n url: appUrls.api + '/api/DraftInvoice/BookyearInfo',\n isArray: true,\n ignoreLoadingBar: true,\n cancellable: true,\n },\n info: {\n method: 'GET',\n params: {\n id: 'Info',\n },\n isArray: false,\n ignoreLoadingBar: true,\n cancellable: true,\n },\n report: {\n method: 'POST',\n url: appUrls.api + '/api/DraftInvoice/Report',\n cache: false,\n },\n },\n );\n }\n case 'authorization': {\n return $resource(appUrls.api + '/api/Authorization/:action', null, {\n update: {\n params: {\n action: 'PUT',\n },\n method: 'PUT',\n transformRequest: convertDateToString(),\n },\n save: {\n params: {\n action: 'CreateAuthorization',\n },\n method: 'POST',\n isArray: false,\n transformRequest: convertDateToString(),\n transformResponse: convertDateStringsToDates(),\n },\n });\n }\n case 'relationBankAccount': {\n return $resource(appUrls.api + '/api/RelationBankAccount/:action', null, {\n save: {\n params: {\n action: 'Post',\n },\n method: 'POST',\n isArray: true,\n },\n delete: {\n params: {\n action: 'Delete',\n },\n method: 'DELETE',\n isArray: true,\n },\n domiciliation: {\n params: {\n action: 'Domiciliation',\n },\n method: 'PUT',\n isArray: true,\n },\n pitRefund: {\n params: {\n action: 'PitRefund',\n },\n method: 'PUT',\n isArray: true,\n },\n });\n }\n\n case 'invoiceSchedule': {\n return $resource(appUrls.api + '/api/InvoiceSchedule/:action', {\n action: 'Get',\n });\n }\n case 'invoiceText': {\n return $resource(appUrls.api + '/api/InvoiceText/:action', null, {\n update: {\n method: 'PUT',\n params: {\n action: 'Put',\n },\n },\n get: {\n method: 'GET',\n isArray: true,\n params: {\n action: 'InvoiceTexts',\n },\n },\n });\n }\n case 'invoiceStream': {\n return $resource(\n appUrls.api + '/api/InvoiceStream/:action',\n {\n action: 'Get',\n },\n {\n update: {\n method: 'PUT',\n params: {\n action: 'Put',\n },\n transformRequest: convertDateToString(),\n transformResponse: convertDateStringsToDates(),\n },\n save: {\n method: 'POST',\n params: {\n action: 'Post',\n },\n },\n schedules: {\n method: 'GET',\n params: {\n action: 'Schedule',\n },\n isArray: true,\n transformResponse: convertDateStringsToDates(),\n },\n hasDraftInvoices: {\n method: 'GET',\n params: {\n action: 'InvoiceStreamHasDraftInvoices',\n },\n isArray: false,\n },\n clearActiveSchedule: {\n method: 'DELETE',\n params: {\n action: 'ClearActiveSchedule',\n },\n },\n updateSchedule: {\n method: 'PUT',\n params: {\n action: 'Schedule',\n },\n transformRequest: convertDateToString(),\n transformResponse: convertDateStringsToDates(),\n isArray: false,\n },\n deleteSchedule: {\n method: 'DELETE',\n params: {\n action: 'DeleteSchedule',\n },\n },\n getResources: {\n method: 'GET',\n params: {\n action: 'Resources',\n },\n isArray: true,\n },\n saveResources: {\n method: 'POST',\n params: {\n action: 'Resources',\n },\n isArray: false,\n },\n invoiceStreams: {\n method: 'GET',\n params: {\n action: 'InvoiceStreams',\n },\n isArray: true,\n transformRequest: convertDateToString(),\n transformResponse: convertDateStringsToDates(),\n },\n unsettledAdvances: {\n method: 'GET',\n params: {\n action: 'UnsettledAdvances',\n },\n isArray: false,\n },\n },\n );\n }\n case 'plannedRegistration': {\n return $resource(\n appUrls.api + '/api/PlannedRegistration/:action',\n {\n action: 'Get',\n },\n {\n query: {\n method: 'GET',\n params: {\n action: 'Get',\n },\n transformResponse: convertDateStringsToDates(),\n isArray: true,\n },\n delete: {\n method: 'DELETE',\n params: {\n action: 'Delete',\n },\n },\n update: {\n method: 'PUT',\n params: {\n action: 'Put',\n },\n transformRequest: convertDateToString(),\n transformResponse: convertDateStringsToDates(),\n },\n save: {\n method: 'POST',\n params: {\n action: 'Post',\n },\n transformRequest: convertDateToString(),\n transformResponse: convertDateStringsToDates(),\n },\n schedules: {\n method: 'GET',\n params: {\n action: 'Schedules',\n },\n isArray: true,\n transformRequest: convertDateToString(),\n transformResponse: convertDateStringsToDates(),\n },\n scheduleLines: {\n method: 'GET',\n params: {\n action: 'Schedule',\n id: null,\n },\n isArray: true,\n transformRequest: convertDateToString(),\n transformResponse: convertDateStringsToDates(),\n },\n updateSchedule: {\n method: 'PUT',\n params: {\n action: 'Schedule',\n },\n transformRequest: convertDateToString(),\n transformResponse: convertDateStringsToDates(),\n isArray: false,\n },\n deleteSchedule: {\n method: 'DELETE',\n params: {\n action: 'DeleteSchedule',\n },\n },\n },\n );\n }\n default: {\n console.warn(\"The resourceFactory doesn't support the type \" + type + '.');\n return null;\n }\n }\n };\n\n return {\n get: getResource,\n transformDate: transformDate,\n setDatePropsToISO: setDatePropsToISO,\n };\n}\n","import angular from 'angular';\n\nangular\n .module('commonServices')\n .constant('timerConfig', {\n tickEvent: 'timer-service-tick',\n storageKey: 'clx-timerData',\n })\n .factory('timerSvc', ['$interval', '$rootScope', 'timerConfig', timerSvc]);\n\nfunction timerSvc($interval, $rootScope, timerConfig) {\n var initialized = false;\n\n var subscribe = function(scope, callback) {\n var handler = $rootScope.$on(timerConfig.tickEvent, callback);\n scope.$on('$destroy', handler);\n };\n var notify = function() {\n $rootScope.$emit(timerConfig.tickEvent);\n };\n\n //Called every minute\n var tick = function() {\n notify();\n };\n\n //Called when service is created\n var init = function() {\n if (initialized) return;\n initialized = true;\n //Start timer\n $interval(tick, 60000);\n };\n\n return {\n subscribe: subscribe,\n init: init,\n };\n}\n","import angular from 'angular';\n\nangular\n .module('commonServices')\n .factory('userData', ['localStorageService', 'authService', userDataStore]);\n\nfunction userDataStore(localStorageService, authService) {\n var userData = {};\n var storageKey = null;\n var defaultSettings = {\n relSections: JSON.stringify({\n relDashboard: true, // Dashboard\n '3fd70070-f8c0-45a4-b3f2-23afff37061f': true, // Identificatie\n }),\n };\n\n var hashCode = function(s) {\n return s.split('').reduce(function(a, b) {\n a = (a << 5) - a + b.charCodeAt(0);\n return a & a;\n }, 0);\n };\n var load = function() {\n if (!storageKey)\n storageKey = 'UserData_' + hashCode(authService.getClaims().Sid);\n var key = storageKey;\n userData = key\n ? localStorageService.get(key) || angular.copy(defaultSettings)\n : {};\n return !!key;\n };\n var save = function() {\n var key = storageKey;\n if (key) return localStorageService.set(key, userData);\n return false;\n };\n\n var setValue = function(key, value) {\n userData[key] = JSON.stringify(value);\n };\n\n var getValue = function(key, fallback) {\n if (!userData[key]) return fallback;\n return JSON.parse(userData[key]);\n };\n\n //First argument is the key\n //Second argument is a function witch receives the old value and must return the new value\n var updateValue = function(key, fnc) {\n setValue(key, fnc(getValue(key)));\n };\n\n var removeValue = function(key) {\n delete userData[key];\n };\n authService.addOnLogOut(function() {\n storageKey = null;\n userData = null;\n });\n\n return {\n //Override value, returns true if successfull\n set: function(key, value) {\n if (!load()) return false;\n setValue(key, value);\n return save();\n },\n //Retrieve value, returns fallback if not logged in\n get: function(key, fallback) {\n if (!load()) return fallback;\n return getValue(key, fallback);\n },\n //Update value using an update function, returns true if successfull\n //The function has 1 parameter: the current value\n //It should return the new value\n update: function(key, fnc) {\n if (!load()) return false;\n updateValue(key, fnc);\n return save();\n },\n //Remove a value, returns true if successfull\n remove: function(key) {\n if (!load()) return false;\n removeValue(key);\n return save();\n },\n };\n}\n","import angular from 'angular';\nimport adminpulse from '../../../shared/utils/adminpulse';\n\nangular.module('commonServices').factory('validationSvc', ['flySvc', validationSvc]);\n\nfunction validationSvc(flySvc) {\n // The regex to test if a string is a guid\n var guidRegex = /^\\{?[a-fA-F0-9]{8}-([a-fA-F0-9]{4}-){3}[a-fA-F0-9]{12}\\}?$/;\n\n var ibanReplaceLetters = function(ibanString) {\n ibanString = ibanString.replace('A', '10');\n ibanString = ibanString.replace('B', '11');\n ibanString = ibanString.replace('C', '12');\n ibanString = ibanString.replace('D', '13');\n ibanString = ibanString.replace('E', '14');\n ibanString = ibanString.replace('F', '15');\n ibanString = ibanString.replace('G', '16');\n ibanString = ibanString.replace('H', '17');\n ibanString = ibanString.replace('I', '18');\n ibanString = ibanString.replace('J', '19');\n ibanString = ibanString.replace('K', '20');\n ibanString = ibanString.replace('L', '21');\n ibanString = ibanString.replace('M', '22');\n ibanString = ibanString.replace('N', '23');\n ibanString = ibanString.replace('O', '24');\n ibanString = ibanString.replace('P', '25');\n ibanString = ibanString.replace('Q', '26');\n ibanString = ibanString.replace('R', '27');\n ibanString = ibanString.replace('S', '28');\n ibanString = ibanString.replace('T', '29');\n ibanString = ibanString.replace('U', '30');\n ibanString = ibanString.replace('V', '31');\n ibanString = ibanString.replace('W', '32');\n ibanString = ibanString.replace('X', '33');\n ibanString = ibanString.replace('Y', '34');\n ibanString = ibanString.replace('Z', '35');\n return ibanString;\n };\n\n // This function validates specific types and holds the rules for it itself\n // returns true if valid, string with errorMsg when validation fails\n var validateType = function(type, value, noFlyIn) {\n switch (type) {\n case 'iban': {\n // regex is for BELGIAN iban number\n if (!/^BE[0-9]{2} [0-9]{4} [0-9]{4} [0-9]{4}$/.test(value)) {\n if (!noFlyIn) flySvc.error(9, ['IBAN']);\n return false;\n }\n // valideer de samenstelling (op basis van de landcode? (eerste twee tekens)\n // zie hierboven\n // verplaats de eerste 4 chars naar achteraan\n var ibanString = value.replace(/ /g, ''); // remove all spaces\n var firstFourChars = ibanString.substring(0, 4);\n var rest = ibanString.substring(4);\n var toTest = rest + firstFourChars;\n // vervang elke letter door twee cijfers (A=10, ... Z=35)\n toTest = ibanReplaceLetters(toTest);\n // getal modulo 97 == 1 => correcte iban\n // we moeten dit in stukken doen omdat het getal te groot is om mee te rekenen in javascript\n var numTest;\n var mod = '';\n\n while (toTest.length > 9) {\n numTest = mod + toTest.substring(0, 9);\n toTest = toTest.substring(9);\n mod = parseInt(numTest) % 97;\n }\n numTest = mod + toTest;\n mod = parseInt(numTest) % 97;\n\n if (mod !== 1) {\n if (!noFlyIn) flySvc.error(6005);\n return false;\n }\n return true;\n }\n case 'vatNumber':\n case 'enterpriseNumber': {\n //TODO: Use adminpulse.isValidVATNumber and adminpulse.isValidEnterpriseNumber defined in _Auxiliary.js.\n var fieldName = type === 'vatNumber' ? 'VAT number' : 'Enterprise number';\n if (type === 'vatNumber') {\n var validVat = true;\n var countryMatch = value.match(/^([a-zA-Z]{2}).+$/); //Check country code\n if (countryMatch) {\n if (countryMatch[1].toUpperCase() !== 'BE') return true; //Only do regex and checksum for Belgium vat numbers\n validVat = /^BE [0-9]{4}.[0-9]{3}.[0-9]{3}$/.test(value);\n } else {\n validVat = false;\n }\n if (!validVat) {\n if (!noFlyIn) flySvc.error(9, [fieldName]);\n return false;\n }\n }\n if (type === 'enterpriseNumber' && !/^[0-9]{4}.[0-9]{3}.[0-9]{3}$/.test(value)) {\n if (!noFlyIn) flySvc.error(9, [fieldName]);\n return false;\n }\n var myString = value.replace(/\\D/g, ''); // remove all non-digits.\n var number = parseInt(myString.substring(0, myString.length - 2));\n var check = parseInt(myString.substring(myString.length - 2));\n if (97 - (number % 97) !== check) {\n if (!noFlyIn) flySvc.error(9, [fieldName]);\n return false;\n }\n return true;\n }\n case 'email':\n case 'emailReplyTo': {\n var fieldName = type === 'email' ? 'Email address' : 'Reply to email';\n if (!/^[^@]+@.+\\..+$/.test(value)) {\n if (!noFlyIn) flySvc.error(9, [fieldName]);\n return false;\n }\n return true;\n }\n case 'mobile':\n case 'phone': {\n //TODO: Use adminpulse.isValidPhoneNumber.\n if (value === null || typeof value === 'undefined') return false;\n if (!adminpulse.isValidPhoneNumber(value)) {\n if (!noFlyIn) flySvc.error(9, ['Phone number']);\n return false;\n }\n\n return true;\n }\n case 'street':\n case 'street1':\n case 'street2':\n case 'box':\n case 'city': {\n // no validation so far\n return true;\n }\n case 'number': {\n // 0 to 5 digits (so empty is allowed !!! Carla says so...)\n if (!/^[0-9]{0,5}/.test(value)) {\n if (!noFlyIn) flySvc.error(9, ['No.']);\n return false;\n }\n return true;\n }\n case 'webAddress':\n case 'website': {\n if (value === '') return true;\n var regexString =\n '^(http[s]?:\\\\/\\\\/(www\\\\.)?|ftp:\\\\/\\\\/(www\\\\.)?|(www\\\\.)?){1}([0-9A-Za-z-\\\\.@:%_+~#=]+)+((\\\\.[a-zA-Z]{2,3})+)(/(.)*)?(\\\\?(.)*)?';\n var regex = new RegExp(regexString);\n if (!regex.test(value)) {\n if (!noFlyIn) flySvc.error(9, ['Website']);\n return false;\n }\n return true;\n }\n case 'zipCode': {\n // no validation so far (regex for 4 digits: /^[0-9]{4}$|^$/\n return true;\n }\n case 'invoiceCounter':\n case 'creditNoteCounter': {\n var fieldName =\n type === 'invoiceCounter' ? 'Invoice number start value' : 'Credit note start value';\n var regexString = '[Counter:N[0-9]{1}]';\n var regex = new RegExp(regexString);\n if (!regex.test(value)) {\n if (!noFlyIn) flySvc.error(6016, [fieldName]);\n return false;\n }\n return true;\n }\n default: {\n console.warn('ValidationSvc: unknown type, type = ' + type);\n return true;\n }\n }\n };\n\n // This function validates fields where validation is in the field definition. Returns true (validation success) or string with errorMsg\n var validateFieldWithDef = function(definition, valueToValidate, relation, blockFlyIn) {\n // if definition.type === 3 (Date) and value is undefined => invalid Date\n if (definition.type === 3 && typeof valueToValidate === 'undefined') {\n if (!blockFlyIn) flySvc.error(16002);\n return false;\n }\n\n // First check for required\n if (definition.isRequired) {\n // special case: vatNumber: Even when required an empty string should pass, because that means 'not liable'\n if (definition.type === 38) {\n if (valueToValidate === null || typeof valueToValidate === 'undefined') {\n if (!blockFlyIn) flySvc.error(3017);\n return false;\n } else {\n if (valueToValidate !== '' && !validateType('vatNumber', valueToValidate))\n //Other validation function to check the vat number\n return false;\n }\n }\n\n // all other cases\n if (\n definition.type !== 38 &&\n ((!valueToValidate && valueToValidate !== 0) ||\n // for Date we need to check for the null value (0001-01-01T00:00:00) as well\n (definition.type === 3 &&\n (valueToValidate === '0001-01-01T00:00:00' ||\n valueToValidate === '0001-01-01T00:00:00Z')))\n ) {\n if (!blockFlyIn) flySvc.error(3017);\n return false;\n }\n }\n\n // If not required, then null is allowed and leads to no further validation\n if (!definition.isRequired && !valueToValidate && valueToValidate !== 0) {\n return true;\n }\n // If no validators are present, return true\n if (!definition.validators) return true;\n\n var passesValidation = true;\n // The validator(s) are wrapped in an array, so we need to loop over them\n for (var t = 0; t < definition.validators.length; t++) {\n var validator = definition.validators[t];\n if (valueToValidate === null) continue;\n\n // Each rule is a property of the validator, so we loop again\n angular.forEach(validator, function(refValue, key, obj) {\n switch (key) {\n // Date / number validator - maximum\n case 'maximum': {\n // String validator - maximumLength\n if ([5, 6, 7, 8, 37, 38].indexOf(definition.type) >= 0) {\n if (typeof refValue !== 'number') refValue = parseInt(refValue);\n if (valueToValidate.length > refValue) {\n flySvc.error(8, [refValue]);\n passesValidation = false;\n }\n break;\n }\n\n var refMaxDate;\n // if maximum === 'TODAY'\n if (typeof refValue === 'string' && refValue === 'TODAY') {\n if (valueToValidate > new Date()) {\n flySvc.error(28);\n passesValidation = false;\n }\n break;\n }\n // if maximum is a GUID (references the value of another field)\n if (typeof refValue === 'string' && guidRegex.test(refValue)) {\n if (typeof relation[refValue].value != 'number') {\n refMaxDate = new Date(relation[refValue].value);\n if (valueToValidate > refMaxDate) {\n flySvc.error(25, [refValue]);\n passesValidation = false;\n }\n }\n break;\n }\n // if maximum is another string (we assume it is a Date)\n if (typeof refValue === 'string') {\n refMaxDate = new Date(refValue);\n if (valueToValidate > refMaxDate) {\n flySvc.error(6, [refMaxDate.toDateString]);\n passesValidation = false;\n }\n break;\n }\n // if maximum is a number\n if (typeof refValue === 'number') {\n if (valueToValidate > refValue) {\n if (definition.type === 41) flySvc.error(6, [(refValue * 100).toFixed(2) + '%']);\n else flySvc.error(6, [refValue]);\n passesValidation = false;\n }\n break;\n }\n // if maximum is null or undefined\n if (refValue == null) {\n // Do nothing\n console.debug(\n 'Max value for validation of field ' +\n definition.label +\n ' ' +\n definition.id +\n 'is not defined',\n );\n break;\n }\n console.error(\n 'Apparently the reference value for maximum is string, number nor null and lacks an implementation',\n );\n break;\n }\n case 'minimum': {\n // Date / number validator - minimum\n // String validator - minimumLength\n if ([5, 6, 7, 8, 37, 38].indexOf(definition.type) >= 0) {\n if (typeof refValue !== 'number') refValue = parseInt(refValue);\n if (valueToValidate.length < refValue) {\n flySvc.error(7, [refValue]);\n passesValidation = false;\n }\n break;\n }\n\n var refMinDate;\n // if minimum === 'TODAY'\n if (typeof refValue === 'string' && refValue === 'TODAY') {\n if (valueToValidate < new Date()) {\n flySvc.error(29);\n passesValidation = false;\n }\n break;\n }\n // if minimum is a GUID (references the value of another field)\n if (typeof refValue === 'string' && guidRegex.test(refValue)) {\n // if the value in that field is not a number, we assume it is a date\n if (typeof relation[refValue].value != 'number') {\n refMinDate = new Date(relation[refValue].value);\n if (valueToValidate < refMinDate) {\n flySvc.error(24, [refValue]);\n passesValidation = false;\n }\n }\n break;\n }\n // if minimum is another string (we assume it is a Date)\n if (typeof refValue === 'string') {\n refMinDate = new Date(refValue);\n if (valueToValidate < refMinDate) {\n flySvc.error(5, [refMinDate.toDateString()]);\n passesValidation = false;\n }\n break;\n }\n // if minimum is a number\n if (typeof refValue === 'number') {\n if (valueToValidate < refValue) {\n if (definition.type === 41) flySvc.error(5, [(refValue * 100).toFixed(2) + '%']);\n else flySvc.error(5, [refValue]);\n passesValidation = false;\n }\n break;\n }\n // if minimum is null or undefined\n if (refValue == null) {\n // no validation\n console.debug(\n 'Min value for validation of field ' +\n definition.label +\n ' ' +\n definition.id +\n 'is not defined',\n );\n break;\n }\n console.warn(\n 'Apparently the reference value for minimum is string, number nor null and lacks an implementation',\n );\n break;\n }\n case 'regularExpression': {\n // String validator - regex\n if (refValue) {\n var regex = new RegExp(refValue);\n if (!regex.test(valueToValidate)) {\n flySvc.error(9, [definition.id]);\n passesValidation = false;\n }\n }\n console.log(\n 'Regex validation for field ' + definition.label + ' lacks a reference value.',\n );\n break;\n }\n case 'vies': {\n // Do vies validation on client?\n console.log('Vies validation from client side is not implemented.');\n break;\n }\n default: {\n console.warn('Validation rule not implemented!' + key + ' ' + refValue);\n break;\n }\n }\n });\n }\n return passesValidation;\n };\n\n return {\n validateFieldWithDef: validateFieldWithDef,\n validateType: validateType,\n };\n}\n","import angular from 'angular';\n\nangular.module('commonServices').constant('zipCodes', [\n {\n code: '0612',\n name: 'Sinterklaas',\n },\n {\n code: '1000',\n name: 'Brussel',\n nameNL: 'Brussel',\n nameFR: 'Bruxelles',\n },\n {\n code: '1005',\n name: 'Verenigde Vergadering van de Gemeenschappelijke Gemeenschapscommissie',\n\n nameFR: 'Assemblée Réunie de la Commission Communautaire Commune',\n },\n {\n code: '1005',\n name: 'Brussels Hoofdstedelijk Parlement',\n\n nameFR: 'Parlement de la Région de Bruxelles-Capitale',\n },\n {\n code: '1006',\n name: 'Raad van de Vlaamse Gemeenschapscommissie',\n\n nameFR: 'Conseil de la Commission communautaire flamande',\n },\n {\n code: '1007',\n name: 'Raad van de Franse Gemeenschapscommissie',\n\n nameFR: 'Assemblée de la Commission Communautaire Française',\n },\n {\n code: '1008',\n name: 'Kamer van Volksvertegenwoordigers',\n\n nameFR: 'Chambre des Représentants',\n },\n {\n code: '1009',\n name: 'Belgische Senaat',\n\n nameFR: 'Senat de Belgique',\n },\n {\n code: '1011',\n name: 'Vlaams Parlement',\n\n nameFR: 'Parlement flamand',\n },\n {\n code: '1012',\n name: 'Parlement van de Franse Gemeenschap',\n\n nameFR: 'Parlement de la Communauté française',\n },\n {\n code: '1020',\n name: 'Laken',\n\n nameFR: 'Laeken',\n },\n {\n code: '1030',\n name: 'Schaarbeek',\n\n nameFR: 'Schaerbeek',\n },\n {\n code: '1031',\n name: 'Christelijke Sociale Organisaties',\n\n nameFR: 'Organisations Sociales Chrétiennes',\n },\n {\n code: '1033',\n name: 'Rtl-Tvi',\n },\n {\n code: '1035',\n name: 'Ministerie van het Brussels Hoofdstedelijk Gewest',\n\n nameFR: 'Ministère de la Région de Bruxelles Capitale',\n },\n {\n code: '1040',\n name: 'Etterbeek',\n },\n {\n code: '1041',\n name: 'International press center',\n },\n {\n code: '1043',\n name: 'Vrt',\n },\n {\n code: '1044',\n name: 'Rtbf',\n },\n {\n code: '1045',\n name: 'D.I.V.',\n },\n {\n code: '1046',\n name: 'European External Action Service',\n },\n {\n code: '1047',\n name: 'Europees Parlement',\n\n nameFR: 'Parlement Européen',\n },\n {\n code: '1048',\n name: 'Europese unie - Raad',\n\n nameFR: 'Union Européenne - Conseil',\n },\n {\n code: '1049',\n name: 'Europese unie - Commissie',\n\n nameFR: 'Union Européenne - Commission',\n },\n {\n code: '1050',\n name: 'Elsene',\n nameNL: 'Elsene',\n nameFR: 'Ixelles',\n },\n {\n code: '1060',\n name: 'Sint-Gillis',\n nameNL: 'Sint-Gillis',\n nameFR: 'Saint-Gilles',\n },\n {\n code: '1070',\n name: 'Anderlecht',\n },\n {\n code: '1080',\n name: 'Sint-Jans-Molenbeek',\n\n nameFR: 'Molenbeek-Sint-Jean',\n },\n {\n code: '1081',\n name: 'Koekelberg',\n },\n {\n code: '1082',\n name: 'Sint-Agatha-Berchem',\n\n nameFR: 'Berchem-Sainte-Agathe',\n },\n {\n code: '1083',\n name: 'Ganshoren',\n },\n {\n code: '1090',\n name: 'Jette',\n },\n {\n code: '1099',\n name: 'Brussel X',\n\n nameFR: 'Bruxelles X',\n },\n {\n code: '1100',\n name: 'Postcheque',\n\n nameFR: 'Chèques postaux',\n },\n {\n code: '1101',\n name: 'Scanning',\n },\n {\n code: '1105',\n name: 'Sociale Dienst van Bpost (SOC)',\n\n nameFR: 'Service social de la Poste (SOC)',\n },\n {\n code: '1110',\n name: 'Navo',\n\n nameFR: 'OTAN',\n },\n {\n code: '1120',\n name: 'Neder-Over-Heembeek',\n },\n {\n code: '1130',\n name: 'Haren',\n },\n {\n code: '1140',\n name: 'Evere',\n },\n {\n code: '1150',\n name: 'Sint-Pieters-Woluwe',\n nameNL: 'Sint-Pieters-Woluwe',\n nameFR: 'Woluwe-Saint-Pierre',\n },\n {\n code: '1160',\n name: 'Oudergem',\n nameNL: 'Oudergem',\n nameFR: 'Auderghem',\n },\n {\n code: '1170',\n name: 'Watermaal-Bosvoorde',\n nameNL: 'Watermaal-Bosvoorde',\n nameFR: 'Watermael-Boitsfort',\n },\n {\n code: '1180',\n name: 'Ukkel',\n nameNL: 'Ukkel',\n nameFR: 'Uccle',\n },\n {\n code: '1190',\n name: 'Vorst',\n nameNL: 'Vorst',\n nameFR: 'Forest',\n },\n {\n code: '1200',\n name: 'Sint-Lambrechts-Woluwe',\n nameNL: 'Sint-Lambrechts-Woluwe',\n nameFR: 'Woluwe-Saint-Lambert',\n },\n {\n code: '1210',\n name: 'Sint-Joost-ten-Node',\n nameNL: 'Sint-Joost-ten-Node',\n nameFR: 'Saint-Josse-ten-Noode',\n },\n {\n code: '1212',\n name: 'FOD Mobiliteit',\n\n nameFR: 'SPF Mobilité',\n },\n {\n code: '1300',\n name: 'Limal',\n },\n {\n code: '1300',\n name: 'Wavre',\n nameNL: 'Waver',\n nameFR: 'Wavre',\n },\n {\n code: '1301',\n name: 'Bierges',\n },\n {\n code: '1310',\n name: 'La Hulpe',\n nameNL: 'Terhulpen',\n nameFR: 'La Hulpe',\n },\n {\n code: '1315',\n name: 'Glimes',\n },\n {\n code: '1315',\n name: 'Incourt',\n },\n {\n code: '1315',\n name: 'Opprebais',\n },\n {\n code: '1315',\n name: 'Piètrebais',\n },\n {\n code: '1315',\n name: 'Roux-Miroir',\n },\n {\n code: '1320',\n name: 'Beauvechain',\n nameNL: 'Bevekom',\n nameFR: 'Beauvechain',\n },\n {\n code: '1320',\n name: 'Hamme-Mille',\n },\n {\n code: '1320',\n name: \"L'Ecluse\",\n nameNL: 'Sluizen',\n nameFR: \"l'Ecluse\",\n },\n {\n code: '1320',\n name: 'Nodebais',\n },\n {\n code: '1320',\n name: 'Tourinnes-La-Grosse',\n nameNL: 'Deurne',\n nameFR: 'Tourinnes-la-Grosse',\n },\n {\n code: '1325',\n name: 'Bonlez',\n },\n {\n code: '1325',\n name: 'Chaumont-Gistoux',\n },\n {\n code: '1325',\n name: 'Corroy-Le-Grand',\n },\n {\n code: '1325',\n name: 'Dion-Valmont',\n },\n {\n code: '1325',\n name: 'Longueville',\n },\n {\n code: '1330',\n name: 'Rixensart',\n },\n {\n code: '1331',\n name: 'Rosières',\n },\n {\n code: '1332',\n name: 'Genval',\n },\n {\n code: '1340',\n name: 'Ottignies',\n },\n {\n code: '1340',\n name: 'Ottignies-Louvain-La-Neuve',\n },\n {\n code: '1341',\n name: 'Céroux-Mousty',\n },\n {\n code: '1342',\n name: 'Limelette',\n },\n {\n code: '1348',\n name: 'Louvain-La-Neuve',\n },\n {\n code: '1350',\n name: 'Enines',\n },\n {\n code: '1350',\n name: 'Folx-Les-Caves',\n },\n {\n code: '1350',\n name: 'Jandrain-Jandrenouille',\n },\n {\n code: '1350',\n name: 'Jauche',\n nameNL: 'Geten',\n nameFR: 'Jauche',\n },\n {\n code: '1350',\n name: 'Marilles',\n },\n {\n code: '1350',\n name: 'Noduwez',\n },\n {\n code: '1350',\n name: 'Orp-Jauche',\n },\n {\n code: '1350',\n name: 'Orp-Le-Grand',\n },\n {\n code: '1357',\n name: 'Hélecine',\n },\n {\n code: '1357',\n name: 'Linsmeau',\n nameNL: 'Linsmeel',\n nameFR: 'Linsmeau',\n },\n {\n code: '1357',\n name: 'Neerheylissem',\n },\n {\n code: '1357',\n name: 'Opheylissem',\n },\n {\n code: '1360',\n name: 'Malèves-Sainte-Marie-Wastines',\n },\n {\n code: '1360',\n name: 'Orbais',\n },\n {\n code: '1360',\n name: 'Perwez',\n nameNL: 'Perwijs',\n nameFR: 'Perwez',\n },\n {\n code: '1360',\n name: 'Thorembais-Les-Béguines',\n },\n {\n code: '1360',\n name: 'Thorembais-Saint-Trond',\n },\n {\n code: '1367',\n name: 'Autre-Eglise',\n },\n {\n code: '1367',\n name: 'Bomal',\n },\n {\n code: '1367',\n name: 'Geest-Gérompont-Petit-Rosière',\n },\n {\n code: '1367',\n name: 'Gérompont',\n },\n {\n code: '1367',\n name: 'Grand-Rosière-Hottomont',\n },\n {\n code: '1367',\n name: 'Huppaye',\n },\n {\n code: '1367',\n name: 'Mont-Saint-André',\n },\n {\n code: '1367',\n name: 'Ramilies',\n },\n {\n code: '1370',\n name: 'Dongelberg',\n },\n {\n code: '1370',\n name: 'Jauchelette',\n },\n {\n code: '1370',\n name: 'Jodoigne',\n nameNL: 'Geldenaken',\n nameFR: 'Jodoigne',\n },\n {\n code: '1370',\n name: 'Jodoigne-Souveraine',\n nameNL: 'Opgeldenaken',\n nameFR: 'Jodoigne-Souveraine',\n },\n {\n code: '1370',\n name: 'Lathuy',\n },\n {\n code: '1370',\n name: 'Mélin',\n nameNL: 'Malen',\n nameFR: 'Mélin',\n },\n {\n code: '1370',\n name: 'Piétrain',\n nameNL: 'Petrem',\n nameFR: 'Piétrain',\n },\n {\n code: '1370',\n name: 'Saint-Jean-Geest',\n nameNL: 'Sint-Jans-Geest',\n nameFR: 'Saint-Jean-Geest',\n },\n {\n code: '1370',\n name: 'Saint-Remy-Geest',\n nameNL: 'Sant-Remigius-Geeest',\n nameFR: 'Saint-Remy-Geest',\n },\n {\n code: '1370',\n name: 'Zétrud-Lumay',\n nameNL: 'Zittert-Lummen',\n nameFR: 'Zétrud-Lumay',\n },\n {\n code: '1380',\n name: 'Couture-Saint-Germain',\n },\n {\n code: '1380',\n name: 'Lasne',\n },\n {\n code: '1380',\n name: 'Lasne-Chapelle-Saint-Lambert',\n },\n {\n code: '1380',\n name: 'Maransart',\n },\n {\n code: '1380',\n name: 'Ohain',\n },\n {\n code: '1380',\n name: 'Plancenoit',\n },\n {\n code: '1390',\n name: 'Archennes',\n nameNL: 'Eerken',\n nameFR: 'Archennes',\n },\n {\n code: '1390',\n name: 'Biez',\n },\n {\n code: '1390',\n name: 'Bossut-Gottechain',\n },\n {\n code: '1390',\n name: 'Grez-Doiceau',\n nameNL: 'Graven',\n nameFR: 'Grez-Doiceau',\n },\n {\n code: '1390',\n name: 'Nethen',\n },\n {\n code: '1400',\n name: 'Monstreux',\n },\n {\n code: '1400',\n name: 'Nivelles',\n nameNL: 'Nijvel',\n nameFR: 'Nivelles',\n },\n {\n code: '1401',\n name: 'Baulers',\n },\n {\n code: '1402',\n name: 'Thines',\n },\n {\n code: '1404',\n name: 'Bornival',\n },\n {\n code: '1410',\n name: 'Waterloo',\n },\n {\n code: '1420',\n name: \"Braine-l'Alleud\",\n nameNL: 'Eigenbrakel',\n nameFR: \"Braine-l'Alleud\",\n },\n {\n code: '1421',\n name: 'Ophain-Bois-Seigneur-Isaac',\n },\n {\n code: '1428',\n name: 'Lillois-Witterzée',\n },\n {\n code: '1430',\n name: 'Bierghes',\n nameNL: 'Bierk',\n },\n {\n code: '1430',\n name: 'Quenast',\n },\n {\n code: '1430',\n name: 'Rebecq',\n },\n {\n code: '1430',\n name: 'Rebecq-Rognon',\n nameNL: 'Roosbeek',\n nameFR: 'Rebecq-Rognon',\n },\n {\n code: '1435',\n name: 'Corbais',\n },\n {\n code: '1435',\n name: 'Hévillers',\n },\n {\n code: '1435',\n name: 'Mont-Saint-Guibert',\n },\n {\n code: '1440',\n name: 'Braine-Le-Château',\n nameNL: 'Kasteelbrakel',\n nameFR: 'Braine-le-Château',\n },\n {\n code: '1440',\n name: 'Wauthier-Braine',\n nameNL: 'Woutersbrakel',\n nameFR: 'Wauthier-Braine',\n },\n {\n code: '1450',\n name: 'Chastre',\n },\n {\n code: '1450',\n name: 'Chastre-Villeroux-Blanmont',\n },\n {\n code: '1450',\n name: 'Cortil-Noirmont',\n },\n {\n code: '1450',\n name: 'Gentinnes',\n },\n {\n code: '1450',\n name: 'Saint-Géry',\n nameNL: 'Sint-Goriks',\n nameFR: 'Saint-Géry',\n },\n {\n code: '1457',\n name: 'Nil-Saint-Vincent-Saint-Martin',\n },\n {\n code: '1457',\n name: 'Tourinnes-Saint-Lambert',\n },\n {\n code: '1457',\n name: 'Walhain',\n },\n {\n code: '1457',\n name: 'Walhain-Saint-Paul',\n },\n {\n code: '1460',\n name: 'Ittre',\n nameNL: 'Itter',\n nameFR: 'Ittre',\n },\n {\n code: '1460',\n name: 'Virginal-Samme',\n },\n {\n code: '1461',\n name: 'Haut-Ittre',\n },\n {\n code: '1470',\n name: 'Baisy-Thy',\n },\n {\n code: '1470',\n name: 'Bousval',\n },\n {\n code: '1470',\n name: 'Genappe',\n nameNL: 'Genepiën',\n nameFR: 'Genappe',\n },\n {\n code: '1471',\n name: 'Loupoigne',\n },\n {\n code: '1472',\n name: 'Vieux-Genappe',\n nameNL: 'Oud-Genepiën',\n nameFR: 'Vieux-Genappe',\n },\n {\n code: '1473',\n name: 'Glabais',\n },\n {\n code: '1474',\n name: 'Ways',\n },\n {\n code: '1476',\n name: 'Houtain-Le-Val',\n },\n {\n code: '1480',\n name: 'Clabecq',\n nameNL: 'Klabbeek',\n nameFR: 'Clabecq',\n },\n {\n code: '1480',\n name: 'Oisquercq',\n nameNL: 'Oostkerk',\n nameFR: 'Oisquercq',\n },\n {\n code: '1480',\n name: 'Saintes',\n nameNL: 'Sint-Renelde',\n nameFR: 'Saintes',\n },\n {\n code: '1480',\n name: 'Tubize',\n nameNL: 'Tubeke',\n nameFR: 'Tubize',\n },\n {\n code: '1490',\n name: 'Court-Saint-Étienne',\n nameNL: 'Court-Saint-Etienne',\n },\n {\n code: '1495',\n name: 'Marbais',\n },\n {\n code: '1495',\n name: 'Mellery',\n },\n {\n code: '1495',\n name: 'Sart-Dames-Avelines',\n },\n {\n code: '1495',\n name: 'Tilly',\n },\n {\n code: '1495',\n name: 'Villers-La-Ville',\n nameNL: 'Villers-de-Stad',\n nameFR: 'Villers-la-Ville',\n },\n {\n code: '1500',\n name: 'Halle',\n nameNL: 'Halle',\n nameFR: 'Hal',\n },\n {\n code: '1501',\n name: 'Buizingen',\n },\n {\n code: '1502',\n name: 'Lembeek',\n nameNL: 'Lembeek',\n nameFR: 'Lembecq',\n },\n {\n code: '1540',\n name: 'Herfelingen',\n },\n {\n code: '1540',\n name: 'Pajottegem',\n nameNL: 'Pajottegem',\n nameFR: 'Pajottegem',\n },\n {\n code: '1541',\n name: 'Sint-Pieters-Kapelle',\n nameNL: 'Sint-Pieters-Kapelle',\n nameFR: 'Saint-Pierre-Capelle',\n },\n {\n code: '1547',\n name: 'Bever',\n nameNL: 'Bever',\n nameFR: 'Biévène',\n },\n {\n code: '1560',\n name: 'Hoeilaart',\n },\n {\n code: '1570',\n name: 'Pajottegem',\n nameNL: 'Pajottegem',\n nameFR: 'Pajottegem',\n },\n {\n code: '1570',\n name: 'Tollembeek',\n },\n {\n code: '1570',\n name: 'Vollezele',\n },\n {\n code: '1600',\n name: 'Oudenaken',\n },\n {\n code: '1600',\n name: 'Sint-Laureins-Berchem',\n },\n {\n code: '1600',\n name: 'Sint-Pieters-Leeuw',\n nameNL: 'Sint-Pieters-Leeuw',\n nameFR: 'Leeuw-Saint-Pierre',\n },\n {\n code: '1601',\n name: 'Ruisbroek',\n },\n {\n code: '1602',\n name: 'Vlezenbeek',\n },\n {\n code: '1620',\n name: 'Drogenbos',\n },\n {\n code: '1630',\n name: 'Linkebeek',\n },\n {\n code: '1640',\n name: 'Sint-Genesius-Rode',\n nameNL: 'Sint-Genesius-Rode',\n nameFR: 'Rhode-Saint-Genèse',\n },\n {\n code: '1650',\n name: 'Beersel',\n },\n {\n code: '1651',\n name: 'Lot',\n nameNL: 'Lot',\n nameFR: 'Loth',\n },\n {\n code: '1652',\n name: 'Alsemberg',\n },\n {\n code: '1653',\n name: 'Dworp',\n nameNL: 'Dworp',\n nameFR: 'Tourneppe',\n },\n {\n code: '1654',\n name: 'Huizingen',\n nameNL: 'Huizingen',\n nameFR: 'Huyssinghen',\n },\n {\n code: '1670',\n name: 'Bogaarden',\n },\n {\n code: '1670',\n name: 'Heikruis',\n nameNL: 'Heikruis',\n nameFR: 'Hautecroix',\n },\n {\n code: '1670',\n name: 'Pepingen',\n },\n {\n code: '1671',\n name: 'Elingen',\n },\n {\n code: '1673',\n name: 'Beert',\n nameNL: 'Beert',\n nameFR: 'Brages',\n },\n {\n code: '1674',\n name: 'Bellingen',\n },\n {\n code: '1700',\n name: 'Dilbeek',\n },\n {\n code: '1700',\n name: 'Sint-Martens-Bodegem',\n\n nameFR: 'Bodeghem-Saint-Martin',\n },\n {\n code: '1700',\n name: 'Sint-Ulriks-Kapelle',\n nameNL: 'Sint-Ulriks-Kapelle',\n nameFR: 'Chapelle-Saint-Ulric',\n },\n {\n code: '1701',\n name: 'Itterbeek',\n },\n {\n code: '1702',\n name: 'Groot-Bijgaarden',\n nameNL: 'Groot-Bijgaarden',\n nameFR: 'Grand-Bigard',\n },\n {\n code: '1703',\n name: 'Schepdaal',\n },\n {\n code: '1730',\n name: 'Asse',\n },\n {\n code: '1730',\n name: 'Bekkerzeel',\n },\n {\n code: '1730',\n name: 'Kobbegem',\n },\n {\n code: '1730',\n name: 'Mollem',\n },\n {\n code: '1731',\n name: 'Relegem',\n },\n {\n code: '1731',\n name: 'Zellik',\n },\n {\n code: '1733',\n name: 'HighCo DATA',\n },\n {\n code: '1740',\n name: 'Ternat',\n },\n {\n code: '1741',\n name: 'Wambeek',\n },\n {\n code: '1742',\n name: 'Sint-Katherina-Lombeek',\n },\n {\n code: '1745',\n name: 'Mazenzele',\n nameNL: 'Mazenzele',\n nameFR: 'Maxenzele',\n },\n {\n code: '1745',\n name: 'Opwijk',\n },\n {\n code: '1750',\n name: 'Gaasbeek',\n },\n {\n code: '1750',\n name: 'Lennik',\n },\n {\n code: '1750',\n name: 'Sint-Kwintens-Lennik',\n nameNL: 'Sint-Kwintens-Lennik',\n nameFR: 'Lennick-Saint-Quentin',\n },\n {\n code: '1750',\n name: 'Sint-Martens-Lennik',\n nameNL: 'Sint-Martens-Lennik',\n nameFR: 'Lennick-Saint-Martin',\n },\n {\n code: '1755',\n name: 'Pajottegem',\n },\n {\n code: '1755',\n name: 'Kester',\n },\n {\n code: '1755',\n name: 'Leerbeek',\n },\n {\n code: '1755',\n name: 'Oetingen',\n },\n {\n code: '1760',\n name: 'Onze-Lieve-Vrouw-Lombeek',\n\n nameFR: 'Lombeek-Notre-Dame',\n },\n {\n code: '1760',\n name: 'Pamel',\n },\n {\n code: '1760',\n name: 'Roosdaal',\n },\n {\n code: '1760',\n name: 'Strijtem',\n },\n {\n code: '1761',\n name: 'Borchtlombeek',\n },\n {\n code: '1770',\n name: 'Liedekerke',\n },\n {\n code: '1780',\n name: 'Wemmel',\n },\n {\n code: '1785',\n name: 'Brussegem',\n },\n {\n code: '1785',\n name: 'Hamme',\n },\n {\n code: '1785',\n name: 'Merchtem',\n },\n {\n code: '1790',\n name: 'Affligem',\n },\n {\n code: '1790',\n name: 'Essene',\n },\n {\n code: '1790',\n name: 'Hekelgem',\n },\n {\n code: '1790',\n name: 'Teralfene',\n },\n {\n code: '1800',\n name: 'Peutie',\n },\n {\n code: '1800',\n name: 'Vilvoorde',\n nameNL: 'Vilvoorde',\n nameFR: 'Volvorde',\n },\n {\n code: '1804',\n name: 'Cargovil',\n },\n {\n code: '1818',\n name: 'Vtm',\n },\n {\n code: '1820',\n name: 'Melsbroek',\n },\n {\n code: '1820',\n name: 'Perk',\n },\n {\n code: '1820',\n name: 'Steenokkerzeel',\n },\n {\n code: '1830',\n name: 'Machelen',\n },\n {\n code: '1831',\n name: 'Diegem',\n },\n {\n code: '1840',\n name: 'Londerzeel',\n },\n {\n code: '1840',\n name: 'Malderen',\n },\n {\n code: '1840',\n name: 'Steenhuffel',\n },\n {\n code: '1850',\n name: 'Grimbergen',\n },\n {\n code: '1851',\n name: 'Humbeek',\n },\n {\n code: '1852',\n name: 'Beigem',\n nameNL: 'Beigem',\n nameFR: 'Beyghem',\n },\n {\n code: '1853',\n name: 'Strombeek-Bever',\n },\n {\n code: '1860',\n name: 'Meise',\n },\n {\n code: '1861',\n name: 'Wolvertem',\n },\n {\n code: '1880',\n name: 'Kapelle-Op-Den-Bos',\n nameNL: 'Kapelle-op-den-Bos',\n nameFR: 'Cap(p)elle-au-Bois',\n },\n {\n code: '1880',\n name: 'Nieuwenrode',\n },\n {\n code: '1880',\n name: 'Ramsdonk',\n },\n {\n code: '1910',\n name: 'Berg',\n },\n {\n code: '1910',\n name: 'Buken',\n },\n {\n code: '1910',\n name: 'Kampenhout',\n },\n {\n code: '1910',\n name: 'Nederokkerzeel',\n },\n {\n code: '1930',\n name: 'Nossegem',\n },\n {\n code: '1930',\n name: 'Zaventem',\n },\n {\n code: '1931',\n name: 'Brucargo',\n },\n {\n code: '1932',\n name: 'Sint-Stevens-Woluwe',\n nameNL: 'Sint-Stevens-Woluwe',\n nameFR: 'Woluwe-Saint-Étienne',\n },\n {\n code: '1933',\n name: 'Sterrebeek',\n },\n {\n code: '1934',\n name: 'Office Exchange Brussels Airpor Remailing',\n },\n {\n code: '1935',\n name: 'Corporate Village',\n },\n {\n code: '1950',\n name: 'Kraainem',\n\n nameFR: 'Crainhem',\n },\n {\n code: '1970',\n name: 'Wezembeek-Oppem',\n },\n {\n code: '1980',\n name: 'Eppegem',\n },\n {\n code: '1980',\n name: 'Zemst',\n },\n {\n code: '1981',\n name: 'Hofstade',\n },\n {\n code: '1982',\n name: 'Elewijt',\n },\n {\n code: '1982',\n name: 'Weerde',\n },\n {\n code: '2000',\n name: 'Antwerpen',\n nameNL: 'Antwerpen',\n nameFR: 'Anvers',\n },\n {\n code: '2018',\n name: 'Antwerpen',\n\n nameFR: 'Anvers',\n },\n {\n code: '2020',\n name: 'Antwerpen',\n\n nameFR: 'Anvers',\n },\n {\n code: '2030',\n name: 'Antwerpen',\n\n nameFR: 'Anvers',\n },\n {\n code: '2040',\n name: 'Antwerpen',\n\n nameFR: 'Anvers',\n },\n {\n code: '2040',\n name: 'Berendrecht',\n },\n {\n code: '2040',\n name: 'Lillo',\n },\n {\n code: '2040',\n name: 'Zandvliet',\n },\n {\n code: '2050',\n name: 'Antwerpen',\n\n nameFR: 'Anvers',\n },\n {\n code: '2060',\n name: 'Antwerpen',\n\n nameFR: 'Anvers',\n },\n {\n code: '2070',\n name: 'Burcht',\n },\n {\n code: '2070',\n name: 'Beveren-Kruibeke-Zwijndrecht',\n },\n {\n code: '2075',\n name: 'CSM Antwerpen X',\n },\n {\n code: '2099',\n name: 'Antwerpen X',\n },\n {\n code: '2100',\n name: 'Deurne',\n },\n {\n code: '2110',\n name: 'Wijnegem',\n },\n {\n code: '2140',\n name: 'Borgerhout',\n },\n {\n code: '2150',\n name: 'Antwerpen',\n },\n {\n code: '2160',\n name: 'Wommelgem',\n },\n {\n code: '2170',\n name: 'Merksem',\n },\n {\n code: '2180',\n name: 'Ekeren',\n },\n {\n code: '2200',\n name: 'Herentals',\n },\n {\n code: '2200',\n name: 'Morkhoven',\n },\n {\n code: '2200',\n name: 'Noorderwijk',\n },\n {\n code: '2220',\n name: 'Hallaar',\n },\n {\n code: '2220',\n name: 'Heist-Op-Den-Berg',\n },\n {\n code: '2221',\n name: 'Booischot',\n },\n {\n code: '2222',\n name: 'Itegem',\n },\n {\n code: '2222',\n name: 'Wiekevorst',\n },\n {\n code: '2223',\n name: 'Schriek',\n },\n {\n code: '2230',\n name: 'Herselt',\n },\n {\n code: '2230',\n name: 'Ramsel',\n },\n {\n code: '2235',\n name: 'Houtvenne',\n },\n {\n code: '2235',\n name: 'Hulshout',\n },\n {\n code: '2235',\n name: 'Westmeerbeek',\n },\n {\n code: '2240',\n name: 'Massenhoven',\n },\n {\n code: '2240',\n name: 'Viersel',\n },\n {\n code: '2240',\n name: 'Zandhoven',\n },\n {\n code: '2242',\n name: 'Pulderbos',\n },\n {\n code: '2243',\n name: 'Pulle',\n },\n {\n code: '2250',\n name: 'Olen',\n },\n {\n code: '2260',\n name: 'Oevel',\n },\n {\n code: '2260',\n name: 'Tongerlo',\n },\n {\n code: '2260',\n name: 'Westerlo',\n },\n {\n code: '2260',\n name: 'Zoerle-Parwijs',\n },\n {\n code: '2270',\n name: 'Herenthout',\n },\n {\n code: '2275',\n name: 'Gierle',\n },\n {\n code: '2275',\n name: 'Lille',\n },\n {\n code: '2275',\n name: 'Poederlee',\n },\n {\n code: '2275',\n name: 'Wechelderzande',\n },\n {\n code: '2280',\n name: 'Grobbendonk',\n },\n {\n code: '2288',\n name: 'Bouwel',\n },\n {\n code: '2290',\n name: 'Vorselaar',\n },\n {\n code: '2300',\n name: 'Turnhout',\n },\n {\n code: '2310',\n name: 'Rijkevorsel',\n },\n {\n code: '2320',\n name: 'Hoogstraten',\n },\n {\n code: '2321',\n name: 'Meer',\n },\n {\n code: '2322',\n name: 'Minderhout',\n },\n {\n code: '2323',\n name: 'Wortel',\n },\n {\n code: '2328',\n name: 'Meerle',\n },\n {\n code: '2330',\n name: 'Merksplas',\n },\n {\n code: '2340',\n name: 'Beerse',\n },\n {\n code: '2340',\n name: 'Vlimmeren',\n },\n {\n code: '2350',\n name: 'Vosselaar',\n },\n {\n code: '2360',\n name: 'Oud-Turnhout',\n\n nameFR: 'Vieux-Turnhout',\n },\n {\n code: '2370',\n name: 'Arendonk',\n },\n {\n code: '2380',\n name: 'Ravels',\n },\n {\n code: '2381',\n name: 'Weelde',\n },\n {\n code: '2382',\n name: 'Poppel',\n },\n {\n code: '2387',\n name: 'Baarle-Hertog',\n nameNL: 'Baarle-Hertog',\n nameFR: 'Baerle-Duc',\n },\n {\n code: '2390',\n name: 'Malle',\n },\n {\n code: '2390',\n name: 'Oostmalle',\n },\n {\n code: '2390',\n name: 'Westmalle',\n },\n {\n code: '2400',\n name: 'Mol',\n },\n {\n code: '2430',\n name: 'Eindhout',\n },\n {\n code: '2430',\n name: 'Laakdal',\n },\n {\n code: '2430',\n name: 'Vorst',\n },\n {\n code: '2431',\n name: 'Varendonk',\n },\n {\n code: '2431',\n name: 'Veerle',\n },\n {\n code: '2440',\n name: 'Geel',\n },\n {\n code: '2450',\n name: 'Meerhout',\n },\n {\n code: '2460',\n name: 'Kasterlee',\n },\n {\n code: '2460',\n name: 'Lichtaart',\n },\n {\n code: '2460',\n name: 'Tielen',\n },\n {\n code: '2470',\n name: 'Retie',\n nameNL: 'Retie',\n nameFR: 'Rethy',\n },\n {\n code: '2480',\n name: 'Dessel',\n },\n {\n code: '2490',\n name: 'Balen',\n },\n {\n code: '2491',\n name: 'Olmen',\n },\n {\n code: '2500',\n name: 'Koningshooikt',\n },\n {\n code: '2500',\n name: 'Lier',\n nameNL: 'Lier',\n nameFR: 'Lierre',\n },\n {\n code: '2520',\n name: 'Broechem',\n },\n {\n code: '2520',\n name: 'Emblem',\n nameNL: 'Emblem',\n nameFR: 'Emblehem',\n },\n {\n code: '2520',\n name: 'Oelegem',\n },\n {\n code: '2520',\n name: 'Ranst',\n },\n {\n code: '2530',\n name: 'Boechout',\n },\n {\n code: '2531',\n name: 'Vremde',\n },\n {\n code: '2540',\n name: 'Hove',\n },\n {\n code: '2547',\n name: 'Lint',\n },\n {\n code: '2550',\n name: 'Kontich',\n },\n {\n code: '2550',\n name: 'Waarloos',\n },\n {\n code: '2560',\n name: 'Bevel',\n },\n {\n code: '2560',\n name: 'Kessel',\n },\n {\n code: '2560',\n name: 'Nijlen',\n },\n {\n code: '2570',\n name: 'Duffel',\n },\n {\n code: '2580',\n name: 'Beerzel',\n },\n {\n code: '2580',\n name: 'Putte',\n },\n {\n code: '2590',\n name: 'Berlaar',\n },\n {\n code: '2590',\n name: 'Gestel',\n },\n {\n code: '2600',\n name: 'Berchem',\n },\n {\n code: '2610',\n name: 'Wilrijk',\n },\n {\n code: '2620',\n name: 'Hemiksem',\n },\n {\n code: '2627',\n name: 'Schelle',\n },\n {\n code: '2630',\n name: 'Aartselaar',\n },\n {\n code: '2640',\n name: 'Mortsel',\n },\n {\n code: '2650',\n name: 'Edegem',\n },\n {\n code: '2660',\n name: 'Hoboken',\n },\n {\n code: '2800',\n name: 'Mechelen',\n nameNL: 'Mechelen',\n nameFR: 'Malines',\n },\n {\n code: '2800',\n name: 'Walem',\n },\n {\n code: '2801',\n name: 'Heffen',\n },\n {\n code: '2811',\n name: 'Hombeek',\n },\n {\n code: '2811',\n name: 'Leest',\n },\n {\n code: '2812',\n name: 'Muizen',\n },\n {\n code: '2820',\n name: 'Bonheiden',\n },\n {\n code: '2820',\n name: 'Rijmenam',\n },\n {\n code: '2830',\n name: 'Blaasveld',\n },\n {\n code: '2830',\n name: 'Heindonk',\n },\n {\n code: '2830',\n name: 'Tisselt',\n },\n {\n code: '2830',\n name: 'Willebroek',\n },\n {\n code: '2840',\n name: 'Reet',\n },\n {\n code: '2840',\n name: 'Rumst',\n },\n {\n code: '2840',\n name: 'Terhagen',\n },\n {\n code: '2845',\n name: 'Niel',\n },\n {\n code: '2850',\n name: 'Boom',\n },\n {\n code: '2860',\n name: 'Sint-Katelijne-Waver',\n nameFR: 'Wavre-Sainte-Catherine',\n },\n {\n code: '2861',\n name: 'Onze-Lieve-Vrouw-Waver',\n\n nameFR: 'Wavre-Notre-Dame',\n },\n {\n code: '2870',\n name: 'Breendonk',\n },\n {\n code: '2870',\n name: 'Liezele',\n },\n {\n code: '2870',\n name: 'Puurs-Sint-Amands',\n },\n {\n code: '2870',\n name: 'Ruisbroek',\n },\n {\n code: '2880',\n name: 'Bornem',\n },\n {\n code: '2880',\n name: 'Hingene',\n },\n {\n code: '2880',\n name: 'Mariekerke',\n },\n {\n code: '2880',\n name: 'Weert',\n },\n {\n code: '2890',\n name: 'Lippelo',\n },\n {\n code: '2890',\n name: 'Oppuurs',\n },\n {\n code: '2890',\n name: 'Sint-Amands',\n nameNL: 'Puurs-Sint-Amands',\n nameFR: 'Puurs-Saint-Amand',\n },\n {\n code: '2900',\n name: 'Schoten',\n },\n {\n code: '2910',\n name: 'Essen',\n },\n {\n code: '2920',\n name: 'Kalmthout',\n },\n {\n code: '2930',\n name: 'Brasschaat',\n },\n {\n code: '2940',\n name: 'Hoevenen',\n },\n {\n code: '2940',\n name: 'Stabroek',\n },\n {\n code: '2950',\n name: 'Kapellen',\n },\n {\n code: '2960',\n name: 'Brecht',\n },\n {\n code: '2960',\n name: \"Sint-Job-In-'T-Goor\",\n },\n {\n code: '2960',\n name: 'Sint-Lenaarts',\n nameNL: 'Sint-Lenaarts',\n nameFR: 'Saint-Léonard',\n },\n {\n code: '2970',\n name: \"'S Gravenwezel\",\n },\n {\n code: '2970',\n name: 'Schilde',\n },\n {\n code: '2980',\n name: 'Halle',\n },\n {\n code: '2980',\n name: 'Zoersel',\n },\n {\n code: '2990',\n name: 'Loenhout',\n },\n {\n code: '2990',\n name: 'Wuustwezel',\n },\n {\n code: '3000',\n name: 'Leuven',\n nameNL: 'Leuven',\n nameFR: 'Louvain',\n },\n {\n code: '3001',\n name: 'Heverlee',\n },\n {\n code: '3010',\n name: 'Kessel-Lo',\n },\n {\n code: '3012',\n name: 'Wilsele',\n },\n {\n code: '3018',\n name: 'Wijgmaal',\n },\n {\n code: '3020',\n name: 'Herent',\n },\n {\n code: '3020',\n name: 'Veltem-Beisem',\n },\n {\n code: '3020',\n name: 'Winksele',\n },\n {\n code: '3040',\n name: 'Huldenberg',\n },\n {\n code: '3040',\n name: 'Loonbeek',\n },\n {\n code: '3040',\n name: 'Neerijse',\n },\n {\n code: '3040',\n name: 'Ottenburg',\n nameNL: 'Ottenburg',\n nameFR: 'Ottenbourg',\n },\n {\n code: '3040',\n name: 'Sint-Agatha-Rode',\n nameNL: 'Sint-Agatha-Rode',\n nameFR: 'Rhode-Sainte-Agathe',\n },\n {\n code: '3050',\n name: 'Oud-Heverlee',\n },\n {\n code: '3051',\n name: 'Sint-Joris-Weert',\n nameNL: 'Sint-Joris-Weert',\n nameFR: 'Weert-Saint-Georges',\n },\n {\n code: '3052',\n name: 'Blanden',\n },\n {\n code: '3053',\n name: 'Haasrode',\n },\n {\n code: '3054',\n name: 'Vaalbeek',\n },\n {\n code: '3060',\n name: 'Bertem',\n },\n {\n code: '3060',\n name: 'Korbeek-Dijle',\n },\n {\n code: '3061',\n name: 'Leefdaal',\n },\n {\n code: '3070',\n name: 'Kortenberg',\n },\n {\n code: '3071',\n name: 'Erps-Kwerps',\n },\n {\n code: '3078',\n name: 'Everberg',\n },\n {\n code: '3078',\n name: 'Meerbeek',\n },\n {\n code: '3080',\n name: 'Duisburg',\n },\n {\n code: '3080',\n name: 'Tervuren',\n },\n {\n code: '3080',\n name: 'Vossem',\n },\n {\n code: '3090',\n name: 'Overijse',\n },\n {\n code: '3110',\n name: 'Rotselaar',\n },\n {\n code: '3111',\n name: 'Wezemaal',\n },\n {\n code: '3118',\n name: 'Werchter',\n },\n {\n code: '3120',\n name: 'Tremelo',\n },\n {\n code: '3128',\n name: 'Baal',\n },\n {\n code: '3130',\n name: 'Begijnendijk',\n },\n {\n code: '3130',\n name: 'Betekom',\n },\n {\n code: '3140',\n name: 'Keerbergen',\n },\n {\n code: '3150',\n name: 'Haacht',\n },\n {\n code: '3150',\n name: 'Tildonk',\n },\n {\n code: '3150',\n name: 'Wespelaar',\n },\n {\n code: '3190',\n name: 'Boortmeerbeek',\n },\n {\n code: '3191',\n name: 'Hever',\n },\n {\n code: '3200',\n name: 'Aarschot',\n },\n {\n code: '3200',\n name: 'Gelrode',\n nameNL: 'Gelrode',\n nameFR: 'Gelderode',\n },\n {\n code: '3201',\n name: 'Langdorp',\n },\n {\n code: '3202',\n name: 'Rillaar',\n },\n {\n code: '3210',\n name: 'Linden',\n },\n {\n code: '3210',\n name: 'Lubbeek',\n },\n {\n code: '3211',\n name: 'Binkom',\n },\n {\n code: '3212',\n name: 'Pellenberg',\n },\n {\n code: '3220',\n name: 'Holsbeek',\n },\n {\n code: '3220',\n name: 'Kortrijk-Dutsel',\n nameNL: 'Kortrijk-Dutsel',\n nameFR: 'Courtrai-Dutsel',\n },\n {\n code: '3220',\n name: 'Sint-Pieters-Rode',\n nameNL: 'Sint-Pieters-Rode',\n nameFR: 'Rhode-Saint-Pierre',\n },\n {\n code: '3221',\n name: 'Nieuwrode',\n },\n {\n code: '3270',\n name: 'Scherpenheuvel',\n nameNL: 'Scherpenheuvel',\n nameFR: 'Montaigu',\n },\n {\n code: '3270',\n name: 'Scherpenheuvel-Zichem',\n },\n {\n code: '3271',\n name: 'Averbode',\n },\n {\n code: '3271',\n name: 'Zichem',\n },\n {\n code: '3272',\n name: 'Messelbroek',\n },\n {\n code: '3272',\n name: 'Testelt',\n },\n {\n code: '3290',\n name: 'Deurne',\n },\n {\n code: '3290',\n name: 'Diest',\n },\n {\n code: '3290',\n name: 'Schaffen',\n },\n {\n code: '3290',\n name: 'Webbekom',\n },\n {\n code: '3293',\n name: 'Kaggevinne',\n },\n {\n code: '3294',\n name: 'Molenstede',\n },\n {\n code: '3300',\n name: 'Bost',\n },\n {\n code: '3300',\n name: 'Goetsenhoven',\n nameNL: 'Goetsenhoven',\n nameFR: 'Gossoncourt',\n },\n {\n code: '3300',\n name: 'Hakendover',\n },\n {\n code: '3300',\n name: 'Kumtich',\n },\n {\n code: '3300',\n name: 'Oorbeek',\n nameNL: 'Oorbeek',\n nameFR: 'Oirbeek',\n },\n {\n code: '3300',\n name: 'Oplinter',\n },\n {\n code: '3300',\n name: 'Sint-Margriete-Houtem',\n nameNL: 'Sint-Margriete-Houtem',\n nameFR: 'Hautem-Sainte-Marguerite',\n },\n {\n code: '3300',\n name: 'Tienen',\n nameNL: 'Tienen',\n nameFR: 'Tirlemont',\n },\n {\n code: '3300',\n name: 'Vissenaken',\n },\n {\n code: '3320',\n name: 'Hoegaarden',\n },\n {\n code: '3320',\n name: 'Meldert',\n },\n {\n code: '3321',\n name: 'Outgaarden',\n nameNL: 'Outgaarden',\n nameFR: 'Autgaerden',\n },\n {\n code: '3350',\n name: 'Drieslinter',\n },\n {\n code: '3350',\n name: 'Linter',\n },\n {\n code: '3350',\n name: 'Melkwezer',\n },\n {\n code: '3350',\n name: 'Neerhespen',\n },\n {\n code: '3350',\n name: 'Neerlinter',\n },\n {\n code: '3350',\n name: 'Orsmaal-Gussenhoven',\n },\n {\n code: '3350',\n name: 'Overhespen',\n },\n {\n code: '3350',\n name: 'Wommersom',\n },\n {\n code: '3360',\n name: 'Bierbeek',\n },\n {\n code: '3360',\n name: 'Korbeek-Lo',\n },\n {\n code: '3360',\n name: 'Lovenjoel',\n },\n {\n code: '3360',\n name: 'Opvelp',\n },\n {\n code: '3370',\n name: 'Boutersem',\n },\n {\n code: '3370',\n name: 'Kerkom',\n },\n {\n code: '3370',\n name: 'Neervelp',\n },\n {\n code: '3370',\n name: 'Roosbeek',\n },\n {\n code: '3370',\n name: 'Vertrijk',\n },\n {\n code: '3370',\n name: 'Willebringen',\n },\n {\n code: '3380',\n name: 'Bunsbeek',\n },\n {\n code: '3380',\n name: 'Glabbeek',\n },\n {\n code: '3381',\n name: 'Kapellen',\n },\n {\n code: '3384',\n name: 'Attenrode',\n },\n {\n code: '3390',\n name: 'Houwaart',\n },\n {\n code: '3390',\n name: 'Sint-Joris-Winge',\n nameNL: 'Sint-Joris-Winge',\n nameFR: 'Winghe-Saint-Georges',\n },\n {\n code: '3390',\n name: 'Tielt',\n },\n {\n code: '3390',\n name: 'Tielt-Winge',\n },\n {\n code: '3391',\n name: 'Meensel-Kiezegem',\n },\n {\n code: '3400',\n name: 'Eliksem',\n },\n {\n code: '3400',\n name: 'Ezemaal',\n },\n {\n code: '3400',\n name: 'Laar',\n },\n {\n code: '3400',\n name: 'Landen',\n },\n {\n code: '3400',\n name: 'Neerwinden',\n },\n {\n code: '3400',\n name: 'Overwinden',\n },\n {\n code: '3400',\n name: 'Rumsdorp',\n },\n {\n code: '3400',\n name: 'Wange',\n },\n {\n code: '3401',\n name: 'Waasmont',\n nameNL: 'Waasmont',\n nameFR: 'Wamont',\n },\n {\n code: '3401',\n name: 'Walsbets',\n },\n {\n code: '3401',\n name: 'Walshoutem',\n nameNL: 'Walshoutem',\n nameFR: \"Hautain-l'Evêque\",\n },\n {\n code: '3401',\n name: 'Wezeren',\n },\n {\n code: '3404',\n name: 'Attenhoven',\n },\n {\n code: '3404',\n name: 'Neerlanden',\n },\n {\n code: '3440',\n name: 'Budingen',\n },\n {\n code: '3440',\n name: 'Dormaal',\n },\n {\n code: '3440',\n name: 'Halle-Booienhoven',\n },\n {\n code: '3440',\n name: 'Helen-Bos',\n },\n {\n code: '3440',\n name: 'Zoutleeuw',\n nameNL: 'Zoutleeuw',\n nameFR: 'Léau',\n },\n {\n code: '3450',\n name: 'Geetbets',\n },\n {\n code: '3450',\n name: 'Grazen',\n nameNL: 'Grazen',\n nameFR: 'Graesen',\n },\n {\n code: '3454',\n name: 'Rummen',\n },\n {\n code: '3460',\n name: 'Assent',\n },\n {\n code: '3460',\n name: 'Bekkevoort',\n },\n {\n code: '3461',\n name: 'Molenbeek-Wersbeek',\n },\n {\n code: '3470',\n name: 'Kortenaken',\n },\n {\n code: '3470',\n name: 'Ransberg',\n },\n {\n code: '3470',\n name: 'Sint-Margriete-Houtem',\n nameNL: 'Sint-Margriete-Houtem',\n nameFR: 'Hautem-Sainte-Marguerite',\n },\n {\n code: '3471',\n name: 'Hoeleden',\n },\n {\n code: '3472',\n name: 'Kersbeek-Miskom',\n },\n {\n code: '3473',\n name: 'Waanrode',\n },\n {\n code: '3500',\n name: 'Hasselt',\n },\n {\n code: '3500',\n name: 'Sint-Lambrechts-Herk',\n nameNL: 'Sint-Lambrechts-Herk',\n nameFR: 'Herck-Saint-Lambert',\n },\n {\n code: '3501',\n name: 'Wimmertingen',\n },\n {\n code: '3510',\n name: 'Kermt',\n },\n {\n code: '3510',\n name: 'Spalbeek',\n },\n {\n code: '3511',\n name: 'Kuringen',\n nameNL: 'Kuringen',\n nameFR: 'Curange',\n },\n {\n code: '3511',\n name: 'Stokrooie',\n },\n {\n code: '3512',\n name: 'Stevoort',\n },\n {\n code: '3520',\n name: 'Zonhoven',\n },\n {\n code: '3530',\n name: 'Helchteren',\n },\n {\n code: '3530',\n name: 'Houthalen',\n },\n {\n code: '3530',\n name: 'Houthalen-Helchteren',\n },\n {\n code: '3540',\n name: 'Berbroek',\n },\n {\n code: '3540',\n name: 'Donk',\n },\n {\n code: '3540',\n name: 'Herk-de-Stad',\n nameNL: 'Herk-de-Stad',\n nameFR: 'Herck-la-Ville',\n },\n {\n code: '3540',\n name: 'Schulen',\n },\n {\n code: '3545',\n name: 'Halen',\n },\n {\n code: '3545',\n name: 'Loksbergen',\n },\n {\n code: '3545',\n name: 'Zelem',\n nameNL: 'Zelem',\n nameFR: 'Zeelhem',\n },\n {\n code: '3550',\n name: 'Heusden',\n },\n {\n code: '3550',\n name: 'Heusden-Zolder',\n },\n {\n code: '3550',\n name: 'Zolder',\n },\n {\n code: '3560',\n name: 'Linkhout',\n },\n {\n code: '3560',\n name: 'Lummen',\n },\n {\n code: '3560',\n name: 'Meldert',\n },\n {\n code: '3570',\n name: 'Alken',\n },\n {\n code: '3580',\n name: 'Beringen',\n },\n {\n code: '3581',\n name: 'Beverlo',\n },\n {\n code: '3582',\n name: 'Koersel',\n nameNL: 'Koersel',\n nameFR: 'Coursel',\n },\n {\n code: '3583',\n name: 'Paal',\n },\n {\n code: '3590',\n name: 'Diepenbeek',\n },\n {\n code: '3600',\n name: 'Genk',\n },\n {\n code: '3620',\n name: 'Gellik',\n },\n {\n code: '3620',\n name: 'Lanaken',\n },\n {\n code: '3620',\n name: 'Neerharen',\n },\n {\n code: '3620',\n name: 'Veldwezelt',\n },\n {\n code: '3621',\n name: 'Rekem',\n nameNL: 'Rekem',\n nameFR: 'Reckheim',\n },\n {\n code: '3630',\n name: 'Eisden',\n },\n {\n code: '3630',\n name: 'Leut',\n nameNL: 'Leut',\n nameFR: 'Leuth',\n },\n {\n code: '3630',\n name: 'Maasmechelen',\n },\n {\n code: '3630',\n name: 'Mechelen-Aan-De-Maas',\n nameNL: 'Mechelen-aan-de-Maas',\n nameFR: 'Malines-sur-Meuse',\n },\n {\n code: '3630',\n name: 'Meeswijk',\n },\n {\n code: '3630',\n name: 'Opgrimbie',\n },\n {\n code: '3630',\n name: 'Vucht',\n },\n {\n code: '3631',\n name: 'Boorsem',\n nameNL: 'Boorsem',\n nameFR: 'Boorsheim',\n },\n {\n code: '3631',\n name: 'Uikhoven',\n },\n {\n code: '3640',\n name: 'Kessenich',\n },\n {\n code: '3640',\n name: 'Kinrooi',\n },\n {\n code: '3640',\n name: 'Molenbeersel',\n },\n {\n code: '3640',\n name: 'Ophoven',\n },\n {\n code: '3650',\n name: 'Dilsen',\n },\n {\n code: '3650',\n name: 'Dilsen-Stokkem',\n },\n {\n code: '3650',\n name: 'Elen',\n },\n {\n code: '3650',\n name: 'Lanklaar',\n },\n {\n code: '3650',\n name: 'Rotem',\n },\n {\n code: '3650',\n name: 'Stokkem',\n },\n {\n code: '3660',\n name: 'Oudsbergen',\n },\n {\n code: '3665',\n name: 'As',\n },\n {\n code: '3668',\n name: 'Niel-Bij-As',\n },\n {\n code: '3670',\n name: 'Ellikom',\n },\n {\n code: '3670',\n name: 'Gruitrode',\n },\n {\n code: '3670',\n name: 'Meeuwen',\n },\n {\n code: '3670',\n name: 'Oudsbergen',\n },\n {\n code: '3670',\n name: 'Neerglabbeek',\n },\n {\n code: '3670',\n name: 'Wijshagen',\n },\n {\n code: '3680',\n name: 'Maaseik',\n },\n {\n code: '3680',\n name: 'Neeroeteren',\n },\n {\n code: '3680',\n name: 'Opoeteren',\n },\n {\n code: '3690',\n name: 'Zutendaal',\n },\n {\n code: '3700',\n name: \"'S Herenelderen\",\n },\n {\n code: '3700',\n name: 'Berg',\n },\n {\n code: '3700',\n name: 'Diets-Heur',\n nameNL: 'Diets-Heur',\n nameFR: 'Heur-le-Tiexhe',\n },\n {\n code: '3700',\n name: 'Haren',\n },\n {\n code: '3700',\n name: 'Henis',\n },\n {\n code: '3700',\n name: 'Kolmont',\n },\n {\n code: '3700',\n name: 'Koninksem',\n nameNL: 'Koninksem',\n nameFR: 'Conincxheim',\n },\n {\n code: '3700',\n name: 'Lauw',\n nameNL: 'Lauw',\n nameFR: 'Lowaige',\n },\n {\n code: '3700',\n name: 'Mal',\n },\n {\n code: '3700',\n name: 'Neerrepen',\n },\n {\n code: '3700',\n name: 'Nerem',\n nameNL: 'Nerem',\n nameFR: 'Nederheim',\n },\n {\n code: '3700',\n name: 'Overrepen',\n },\n {\n code: '3700',\n name: 'Piringen',\n nameNL: 'Piringen',\n nameFR: 'Pirange',\n },\n {\n code: '3700',\n name: 'Riksingen',\n },\n {\n code: '3700',\n name: 'Rutten',\n nameNL: 'Rutten',\n nameFR: 'Russon',\n },\n {\n code: '3700',\n name: 'Sluizen',\n nameNL: 'Sluizen',\n nameFR: 'Sluse',\n },\n {\n code: '3700',\n name: 'Tongeren-Borgloon',\n nameNL: 'Tongeren-Borgloon',\n nameFR: 'Tongres-Looz',\n },\n {\n code: '3700',\n name: 'Vreren',\n nameNL: 'Vreren',\n nameFR: 'Freeren',\n },\n {\n code: '3700',\n name: 'Widooie',\n nameNL: 'Widooie',\n nameFR: 'Widoye',\n },\n {\n code: '3717',\n name: 'Herstappe',\n },\n {\n code: '3720',\n name: 'Hasselt',\n },\n {\n code: '3721',\n name: 'Vliermaalroot',\n },\n {\n code: '3722',\n name: 'Wintershoven',\n },\n {\n code: '3723',\n name: 'Guigoven',\n },\n {\n code: '3724',\n name: 'Vliermaal',\n },\n {\n code: '3730',\n name: 'Bilzen-Hoeselt',\n },\n {\n code: '3730',\n name: 'Romershoven',\n },\n {\n code: '3730',\n name: 'Sint-Huibrechts-Hern',\n },\n {\n code: '3730',\n name: 'Werm',\n },\n {\n code: '3732',\n name: 'Schalkhoven',\n },\n {\n code: '3740',\n name: 'Beverst',\n },\n {\n code: '3740',\n name: 'Bilzen-Hoeselt',\n },\n {\n code: '3740',\n name: 'Eigenbilzen',\n },\n {\n code: '3740',\n name: 'Grote-Spouwen',\n nameNL: 'Grote-Spouwen',\n nameFR: 'Grand-Spauwen',\n },\n {\n code: '3740',\n name: 'Hees',\n },\n {\n code: '3740',\n name: 'Kleine-Spouwen',\n nameNL: 'Kleine-Spouwen',\n nameFR: 'Petit-Spauwen',\n },\n {\n code: '3740',\n name: 'Mopertingen',\n },\n {\n code: '3740',\n name: 'Munsterbilzen',\n },\n {\n code: '3740',\n name: 'Rijkhoven',\n },\n {\n code: '3740',\n name: 'Rosmeer',\n },\n {\n code: '3740',\n name: 'Waltwilder',\n },\n {\n code: '3742',\n name: 'Martenslinde',\n },\n {\n code: '3746',\n name: 'Hoelbeek',\n },\n {\n code: '3770',\n name: 'Genoelselderen',\n },\n {\n code: '3770',\n name: 'Herderen',\n },\n {\n code: '3770',\n name: 'Kanne',\n },\n {\n code: '3770',\n name: 'Membruggen',\n },\n {\n code: '3770',\n name: 'Millen',\n },\n {\n code: '3770',\n name: 'Riemst',\n },\n {\n code: '3770',\n name: 'Val-Meer',\n nameNL: 'Val-Meer',\n nameFR: 'Falle-et-Mheer',\n },\n {\n code: '3770',\n name: 'Vlijtingen',\n },\n {\n code: '3770',\n name: 'Vroenhoven',\n },\n {\n code: '3770',\n name: 'Zichen-Zussen-Bolder',\n },\n {\n code: '3790',\n name: 'Moelingen',\n nameNL: 'Moelingen',\n nameFR: 'Mouland',\n },\n {\n code: '3790',\n name: 'Sint-Martens-Voeren',\n nameNL: 'Sint-Martens-Voeren',\n nameFR: 'Fouron-Saint-Martin',\n },\n {\n code: '3790',\n name: 'Voeren',\n nameNL: 'Voeren',\n nameFR: 'Fourons',\n },\n {\n code: '3791',\n name: 'Remersdaal',\n },\n {\n code: '3792',\n name: 'Sint-Pieters-Voeren',\n nameNL: 'Sint-Pieters-Voeren',\n nameFR: 'Fouron-Saint-Pierre',\n },\n {\n code: '3793',\n name: 'Teuven',\n },\n {\n code: '3798',\n name: 'S Gravenvoeren',\n },\n {\n code: '3800',\n name: 'Aalst',\n\n nameFR: 'Alost',\n },\n {\n code: '3800',\n name: 'Brustem',\n },\n {\n code: '3800',\n name: 'Engelmanshoven',\n },\n {\n code: '3800',\n name: 'Gelinden',\n },\n {\n code: '3800',\n name: 'Groot-Gelmen',\n nameNL: 'Groot-Gelmen',\n nameFR: 'Grand-Jamine',\n },\n {\n code: '3800',\n name: 'Halmaal',\n },\n {\n code: '3800',\n name: 'Kerkom-Bij-Sint-Truiden',\n },\n {\n code: '3800',\n name: 'Ordingen',\n nameNL: 'Ordingen',\n nameFR: 'Ordange',\n },\n {\n code: '3800',\n name: 'Sint-Truiden',\n nameNL: 'Sint-Truiden',\n nameFR: 'Sint-Trond',\n },\n {\n code: '3800',\n name: 'Zepperen',\n },\n {\n code: '3803',\n name: 'Duras',\n },\n {\n code: '3803',\n name: 'Gorsem',\n nameNL: 'Gorsem',\n nameFR: 'Gorssum',\n },\n {\n code: '3803',\n name: 'Runkelen',\n },\n {\n code: '3803',\n name: 'Wilderen',\n },\n {\n code: '3806',\n name: 'Velm',\n },\n {\n code: '3830',\n name: 'Berlingen',\n },\n {\n code: '3830',\n name: 'Wellen',\n },\n {\n code: '3831',\n name: 'Herten',\n },\n {\n code: '3832',\n name: 'Ulbeek',\n },\n {\n code: '3840',\n name: 'Bommershoven',\n },\n {\n code: '3840',\n name: 'Tongeren-Borgloon',\n nameNL: 'Tongeren-Borgloon',\n nameFR: 'Tongres-Looz',\n },\n {\n code: '3840',\n name: 'Broekom',\n },\n {\n code: '3840',\n name: 'Gors-Opleeuw',\n },\n {\n code: '3840',\n name: 'Gotem',\n },\n {\n code: '3840',\n name: 'Groot-Loon',\n nameNL: 'Groot-Loon',\n nameFR: 'Grand-Looz',\n },\n {\n code: '3840',\n name: 'Haren',\n },\n {\n code: '3840',\n name: 'Hendrieken',\n },\n {\n code: '3840',\n name: 'Hoepertingen',\n },\n {\n code: '3840',\n name: 'Jesseren',\n },\n {\n code: '3840',\n name: 'Kerniel',\n },\n {\n code: '3840',\n name: 'Kolmont',\n },\n {\n code: '3840',\n name: 'Kuttekoven',\n },\n {\n code: '3840',\n name: 'Rijkel',\n },\n {\n code: '3840',\n name: 'Voort',\n },\n {\n code: '3850',\n name: 'Binderveld',\n },\n {\n code: '3850',\n name: 'Kozen',\n nameNL: 'Kozen',\n nameFR: 'Cosen',\n },\n {\n code: '3850',\n name: 'Nieuwerkerken',\n },\n {\n code: '3850',\n name: 'Wijer',\n nameNL: 'Wijer',\n nameFR: 'Weyer',\n },\n {\n code: '3870',\n name: 'Batsheers',\n nameNL: 'Batsheers',\n nameFR: 'Bas-Heers',\n },\n {\n code: '3870',\n name: 'Bovelingen',\n },\n {\n code: '3870',\n name: 'Gutshoven',\n },\n {\n code: '3870',\n name: 'Heers',\n },\n {\n code: '3870',\n name: 'Heks',\n nameNL: 'Heks',\n nameFR: 'Hex',\n },\n {\n code: '3870',\n name: 'Horpmaal',\n },\n {\n code: '3870',\n name: 'Klein-Gelmen',\n nameNL: 'Klein-Gelmen',\n nameFR: 'Petit(e)-Jamine',\n },\n {\n code: '3870',\n name: 'Mechelen-Bovelingen',\n nameNL: 'Mechelen-Bovelingen',\n nameFR: 'Marlinne',\n },\n {\n code: '3870',\n name: 'Mettekoven',\n },\n {\n code: '3870',\n name: 'Opheers',\n },\n {\n code: '3870',\n name: 'Rukkelingen-Loon',\n nameNL: 'Rukkelingen-Loon',\n nameFR: 'Roclenge-Looz',\n },\n {\n code: '3870',\n name: 'Vechmaal',\n },\n {\n code: '3870',\n name: 'Veulen',\n nameNL: 'Veulen',\n nameFR: 'Fologne',\n },\n {\n code: '3890',\n name: 'Boekhout',\n },\n {\n code: '3890',\n name: 'Gingelom',\n },\n {\n code: '3890',\n name: 'Jeuk',\n nameNL: 'Jeuk',\n nameFR: 'Goyer',\n },\n {\n code: '3890',\n name: 'Kortijs',\n },\n {\n code: '3890',\n name: 'Montenaken',\n },\n {\n code: '3890',\n name: 'Niel-Bij-Sint-Truiden',\n },\n {\n code: '3890',\n name: 'Vorsen',\n nameNL: 'Vorsen',\n nameFR: 'Frésin',\n },\n {\n code: '3891',\n name: 'Borlo',\n },\n {\n code: '3891',\n name: 'Buvingen',\n },\n {\n code: '3891',\n name: 'Mielen-Boven-Aalst',\n },\n {\n code: '3891',\n name: 'Muizen',\n },\n {\n code: '3900',\n name: 'Pelt',\n },\n {\n code: '3910',\n name: 'Pelt',\n },\n {\n code: '3910',\n name: 'Sint-Huibrechts-Lille',\n },\n {\n code: '3920',\n name: 'Lommel',\n },\n {\n code: '3930',\n name: 'Achel',\n },\n {\n code: '3930',\n name: 'Hamont',\n },\n {\n code: '3930',\n name: 'Hamont-Achel',\n },\n {\n code: '3940',\n name: 'Hechtel',\n },\n {\n code: '3940',\n name: 'Hechtel-Eksel',\n },\n {\n code: '3941',\n name: 'Eksel',\n },\n {\n code: '3945',\n name: 'Tessenderlo-Ham',\n },\n {\n code: '3945',\n name: 'Kwaadmechelen',\n nameNL: 'Kwaadmechelen',\n nameFR: 'Quaedmechelen',\n },\n {\n code: '3945',\n name: 'Oostham',\n },\n {\n code: '3950',\n name: 'Bocholt',\n },\n {\n code: '3950',\n name: 'Kaulille',\n nameNL: 'Kaulille',\n nameFR: 'Caulille',\n },\n {\n code: '3950',\n name: 'Reppel',\n },\n {\n code: '3960',\n name: 'Beek',\n },\n {\n code: '3960',\n name: 'Bree',\n },\n {\n code: '3960',\n name: 'Gerdingen',\n },\n {\n code: '3960',\n name: 'Opitter',\n },\n {\n code: '3960',\n name: 'Tongerlo',\n },\n {\n code: '3970',\n name: 'Leopoldsburg',\n nameNL: 'Leopoldsburg',\n nameFR: 'Bourg-Léopold',\n },\n {\n code: '3971',\n name: 'Heppen',\n },\n {\n code: '3980',\n name: 'Tessenderlo-Ham',\n },\n {\n code: '3990',\n name: 'Grote-Brogel',\n },\n {\n code: '3990',\n name: 'Kleine-Brogel',\n nameNL: 'Kleine-Brogel',\n nameFR: 'Petit-Brogel',\n },\n {\n code: '3990',\n name: 'Peer',\n },\n {\n code: '3990',\n name: 'Wijchmaal',\n },\n {\n code: '4000',\n name: 'Glain',\n },\n {\n code: '4000',\n name: 'Liège',\n nameNL: 'Luik',\n nameFR: 'Liège',\n },\n {\n code: '4000',\n name: 'Rocourt',\n },\n {\n code: '4020',\n name: 'Bressoux',\n },\n {\n code: '4020',\n name: 'Jupille-Sur-Meuse',\n },\n {\n code: '4020',\n name: 'Liège',\n },\n {\n code: '4020',\n name: 'Wandre',\n },\n {\n code: '4030',\n name: 'Grivegnee',\n },\n {\n code: '4031',\n name: 'Angleur',\n },\n {\n code: '4032',\n name: 'Chênee',\n },\n {\n code: '4040',\n name: 'Herstal',\n },\n {\n code: '4041',\n name: 'Milmort',\n },\n {\n code: '4041',\n name: 'Vottem',\n },\n {\n code: '4042',\n name: 'Liers',\n },\n {\n code: '4050',\n name: 'Chaudfontaine',\n },\n {\n code: '4051',\n name: 'Vaux-Sous-Chèvremont',\n },\n {\n code: '4052',\n name: 'Beaufays',\n },\n {\n code: '4053',\n name: 'Embourg',\n },\n {\n code: '4075',\n name: 'CSM Liege X',\n },\n {\n code: '4099',\n name: 'Liège X',\n },\n {\n code: '4100',\n name: 'Boncelles',\n },\n {\n code: '4100',\n name: 'Seraing',\n },\n {\n code: '4101',\n name: 'Jemeppe-Sur-Meuse',\n },\n {\n code: '4102',\n name: 'Ougrée',\n },\n {\n code: '4120',\n name: 'Ehein',\n },\n {\n code: '4120',\n name: 'Neupré',\n },\n {\n code: '4120',\n name: 'Rotheux-Rimière',\n },\n {\n code: '4121',\n name: 'Neuville-En-Condroz',\n },\n {\n code: '4122',\n name: 'Plainevaux',\n },\n {\n code: '4130',\n name: 'Esneux',\n },\n {\n code: '4130',\n name: 'Tilff',\n },\n {\n code: '4140',\n name: 'Dolembreux',\n },\n {\n code: '4140',\n name: 'Gomzé-Andoumont',\n },\n {\n code: '4140',\n name: 'Rouvreux',\n },\n {\n code: '4140',\n name: 'Sprimont',\n },\n {\n code: '4141',\n name: 'Louveigné',\n },\n {\n code: '4160',\n name: 'Anthisnes',\n },\n {\n code: '4161',\n name: 'Villers-Aux-Tours',\n },\n {\n code: '4162',\n name: 'Hody',\n },\n {\n code: '4163',\n name: 'Tavier',\n },\n {\n code: '4170',\n name: 'Comblain-Au-Pont',\n },\n {\n code: '4171',\n name: 'Poulseur',\n },\n {\n code: '4180',\n name: 'Comblain-Fairon',\n },\n {\n code: '4180',\n name: 'Comblain-La-Tour',\n },\n {\n code: '4180',\n name: 'Hamoir',\n },\n {\n code: '4181',\n name: 'Filot',\n },\n {\n code: '4190',\n name: 'Ferrières',\n },\n {\n code: '4190',\n name: 'My',\n },\n {\n code: '4190',\n name: 'Vieuxville',\n },\n {\n code: '4190',\n name: 'Werbomont',\n },\n {\n code: '4190',\n name: 'Xhoris',\n },\n {\n code: '4210',\n name: 'Burdinne',\n },\n {\n code: '4210',\n name: 'Hannêche',\n },\n {\n code: '4210',\n name: 'Lamontzée',\n },\n {\n code: '4210',\n name: 'Marneffe',\n },\n {\n code: '4210',\n name: 'Oteppe',\n },\n {\n code: '4217',\n name: 'Héron',\n },\n {\n code: '4217',\n name: 'Lavoir',\n },\n {\n code: '4217',\n name: \"Waret-L'Evêque\",\n },\n {\n code: '4218',\n name: 'Couthuin',\n },\n {\n code: '4219',\n name: 'Acosse',\n },\n {\n code: '4219',\n name: 'Ambresin',\n nameNL: 'Embresin',\n nameFR: 'Ambresin',\n },\n {\n code: '4219',\n name: 'Meeffe',\n },\n {\n code: '4219',\n name: 'Wasseiges',\n },\n {\n code: '4250',\n name: 'Boëlhe',\n },\n {\n code: '4250',\n name: 'Geer',\n },\n {\n code: '4250',\n name: 'Hollogne-Sur-Geer',\n },\n {\n code: '4250',\n name: 'Lens-Saint-Servais',\n },\n {\n code: '4252',\n name: 'Omal',\n },\n {\n code: '4253',\n name: 'Darion',\n },\n {\n code: '4254',\n name: 'Ligney',\n },\n {\n code: '4257',\n name: 'Berloz',\n },\n {\n code: '4257',\n name: 'Corswarem',\n nameNL: 'Korsworm',\n nameFR: 'Corswarem',\n },\n {\n code: '4257',\n name: 'Rosoux-Crenwick',\n nameNL: 'Roost-Krenwick',\n nameFR: 'Rosoux-Crenwick',\n },\n {\n code: '4260',\n name: 'Avennes',\n },\n {\n code: '4260',\n name: 'Braives',\n },\n {\n code: '4260',\n name: 'Ciplet',\n },\n {\n code: '4260',\n name: 'Fallais',\n },\n {\n code: '4260',\n name: 'Fumal',\n },\n {\n code: '4260',\n name: 'Ville-En-Hesbaye',\n },\n {\n code: '4261',\n name: 'Latinne',\n },\n {\n code: '4263',\n name: 'Tourinne',\n },\n {\n code: '4280',\n name: 'Abolens',\n },\n {\n code: '4280',\n name: 'Avernas-Le-Bauduin',\n },\n {\n code: '4280',\n name: 'Avin',\n },\n {\n code: '4280',\n name: 'Bertrée',\n },\n {\n code: '4280',\n name: 'Blehen',\n },\n {\n code: '4280',\n name: 'Cras-Avernas',\n },\n {\n code: '4280',\n name: 'Crehen',\n },\n {\n code: '4280',\n name: 'Grand-Hallet',\n },\n {\n code: '4280',\n name: 'Hannut',\n nameNL: 'Hannuit',\n nameFR: 'Hannut',\n },\n {\n code: '4280',\n name: 'Lens-Saint-Remy',\n },\n {\n code: '4280',\n name: 'Merdorp',\n },\n {\n code: '4280',\n name: 'Moxhe',\n },\n {\n code: '4280',\n name: 'Petit-Hallet',\n },\n {\n code: '4280',\n name: 'Poucet',\n },\n {\n code: '4280',\n name: 'Thisnes',\n },\n {\n code: '4280',\n name: 'Trognée',\n nameNL: 'Truielingen',\n nameFR: 'Trognée',\n },\n {\n code: '4280',\n name: 'Villers-Le-Peuplier',\n },\n {\n code: '4280',\n name: 'Wansin',\n },\n {\n code: '4287',\n name: 'Lincent',\n nameNL: 'Lijsem',\n nameFR: 'Lincent',\n },\n {\n code: '4287',\n name: 'Pellaines',\n nameNL: 'Pellen',\n nameFR: 'Pellaines',\n },\n {\n code: '4287',\n name: 'Racour',\n nameNL: 'Raatshoven',\n nameFR: 'Racour',\n },\n {\n code: '4300',\n name: 'Bettincourt',\n nameNL: 'Bettenhoven',\n nameFR: 'Bettincourt',\n },\n {\n code: '4300',\n name: 'Bleret',\n },\n {\n code: '4300',\n name: 'Bovenistier',\n },\n {\n code: '4300',\n name: 'Grand-Axhe',\n },\n {\n code: '4300',\n name: 'Lantremange',\n },\n {\n code: '4300',\n name: 'Oleye',\n nameNL: 'Liek',\n nameFR: 'Oleye',\n },\n {\n code: '4300',\n name: 'Waremme',\n nameNL: 'Borgworm',\n nameFR: 'Waremme',\n },\n {\n code: '4317',\n name: 'Aineffe',\n },\n {\n code: '4317',\n name: 'Borlez',\n },\n {\n code: '4317',\n name: 'Celles',\n },\n {\n code: '4317',\n name: 'Faimes',\n },\n {\n code: '4317',\n name: 'Les Waleffes',\n },\n {\n code: '4317',\n name: 'Viemme',\n },\n {\n code: '4340',\n name: 'Awans',\n },\n {\n code: '4340',\n name: 'Fooz',\n },\n {\n code: '4340',\n name: 'Othée',\n nameNL: 'Elch',\n nameFR: 'Othée',\n },\n {\n code: '4340',\n name: \"Villers-L'Evêque\",\n },\n {\n code: '4342',\n name: 'Hognoul',\n },\n {\n code: '4347',\n name: 'Fexhe-Le-Haut-Clocher',\n },\n {\n code: '4347',\n name: 'Freloux',\n },\n {\n code: '4347',\n name: 'Noville',\n },\n {\n code: '4347',\n name: 'Roloux',\n },\n {\n code: '4347',\n name: 'Voroux-Goreux',\n },\n {\n code: '4350',\n name: 'Lamine',\n },\n {\n code: '4350',\n name: 'Momalle',\n },\n {\n code: '4350',\n name: 'Pousset',\n },\n {\n code: '4350',\n name: 'Remicourt',\n },\n {\n code: '4351',\n name: 'Hodeige',\n },\n {\n code: '4357',\n name: 'Donceel',\n },\n {\n code: '4357',\n name: 'Haneffe',\n },\n {\n code: '4357',\n name: 'Jeneffe',\n },\n {\n code: '4357',\n name: 'Limont',\n },\n {\n code: '4360',\n name: 'Bergilers',\n nameNL: 'Belliek',\n nameFR: 'Bergilers',\n },\n {\n code: '4360',\n name: 'Grandville',\n },\n {\n code: '4360',\n name: 'Lens-Sur-Geer',\n },\n {\n code: '4360',\n name: 'Oreye',\n nameNL: 'Oerle',\n nameFR: 'Oreye',\n },\n {\n code: '4360',\n name: 'Otrange',\n nameNL: 'Wouteringen',\n nameFR: 'Otrange',\n },\n {\n code: '4367',\n name: 'Crisnée',\n },\n {\n code: '4367',\n name: 'Fize-Le-Marsal',\n },\n {\n code: '4367',\n name: 'Kemexhe',\n },\n {\n code: '4367',\n name: 'Odeur',\n },\n {\n code: '4367',\n name: 'Thys',\n },\n {\n code: '4400',\n name: 'Awirs',\n },\n {\n code: '4400',\n name: 'Chokier',\n },\n {\n code: '4400',\n name: 'Flémalle',\n },\n {\n code: '4400',\n name: 'Flémalle-Grande',\n },\n {\n code: '4400',\n name: 'Flémalle-Haute',\n },\n {\n code: '4400',\n name: 'Gleixhe',\n },\n {\n code: '4400',\n name: 'Ivoz-Ramet',\n },\n {\n code: '4400',\n name: 'Mons-Lez-Liège',\n },\n {\n code: '4420',\n name: 'Montegnée',\n },\n {\n code: '4420',\n name: 'Saint-Nicolas',\n },\n {\n code: '4420',\n name: 'Tilleur',\n },\n {\n code: '4430',\n name: 'Ans',\n },\n {\n code: '4431',\n name: 'Loncin',\n },\n {\n code: '4432',\n name: 'Alleur',\n },\n {\n code: '4432',\n name: 'Xhendremael',\n },\n {\n code: '4450',\n name: 'Juprelle',\n },\n {\n code: '4450',\n name: 'Lantin',\n },\n {\n code: '4450',\n name: 'Slins',\n },\n {\n code: '4451',\n name: 'Voroux-Lez-Liers',\n },\n {\n code: '4452',\n name: 'Paifve',\n },\n {\n code: '4452',\n name: 'Wihogne',\n nameNL: 'Nudorp',\n nameFR: 'Wihogne',\n },\n {\n code: '4453',\n name: 'Villers-Saint-Siméon',\n },\n {\n code: '4458',\n name: 'Fexhe-Slins',\n },\n {\n code: '4460',\n name: 'Bierset',\n },\n {\n code: '4460',\n name: 'Grâce-Berleur',\n },\n {\n code: '4460',\n name: 'Grâce-Hollogne',\n },\n {\n code: '4460',\n name: 'Hollogne-Aux-Pierres',\n },\n {\n code: '4460',\n name: 'Horion-Hozémont',\n },\n {\n code: '4460',\n name: 'Velroux',\n },\n {\n code: '4470',\n name: 'Saint-Georges-Sur-Meuse',\n },\n {\n code: '4480',\n name: 'Clermont-Sous-Huy',\n },\n {\n code: '4480',\n name: 'Ehein',\n },\n {\n code: '4480',\n name: 'Engis',\n },\n {\n code: '4480',\n name: 'Hermalle-Sous-Huy',\n },\n {\n code: '4500',\n name: 'Ben-Ahin',\n },\n {\n code: '4500',\n name: 'Huy',\n nameNL: 'Hoei',\n nameFR: 'Huy',\n },\n {\n code: '4500',\n name: 'Tihange',\n },\n {\n code: '4520',\n name: 'Antheit',\n },\n {\n code: '4520',\n name: 'Bas-Oha',\n },\n {\n code: '4520',\n name: 'Huccorgne',\n },\n {\n code: '4520',\n name: 'Moha',\n },\n {\n code: '4520',\n name: 'Vinalmont',\n },\n {\n code: '4520',\n name: 'Wanze',\n },\n {\n code: '4530',\n name: 'Fize-Fontaine',\n },\n {\n code: '4530',\n name: 'Vaux-Et-Borset',\n },\n {\n code: '4530',\n name: 'Vieux-Waleffe',\n },\n {\n code: '4530',\n name: 'Villers-Le-Bouillet',\n },\n {\n code: '4530',\n name: 'Warnant-Dreye',\n },\n {\n code: '4537',\n name: 'Bodegnée',\n },\n {\n code: '4537',\n name: 'Chapon-Seraing',\n },\n {\n code: '4537',\n name: 'Seraing-Le-Château',\n },\n {\n code: '4537',\n name: 'Verlaine',\n },\n {\n code: '4540',\n name: 'Amay',\n },\n {\n code: '4540',\n name: 'Ampsin',\n },\n {\n code: '4540',\n name: 'Flône',\n },\n {\n code: '4540',\n name: 'Jehay',\n },\n {\n code: '4540',\n name: 'Ombret',\n },\n {\n code: '4550',\n name: 'Nandrin',\n },\n {\n code: '4550',\n name: 'Saint-Séverin',\n },\n {\n code: '4550',\n name: 'Villers-Le-Temple',\n },\n {\n code: '4550',\n name: 'Yernée-Fraineux',\n },\n {\n code: '4557',\n name: 'Abée',\n },\n {\n code: '4557',\n name: 'Fraiture',\n },\n {\n code: '4557',\n name: 'Ramelot',\n },\n {\n code: '4557',\n name: 'Seny',\n },\n {\n code: '4557',\n name: 'Soheit-Tinlot',\n },\n {\n code: '4557',\n name: 'Tinlot',\n },\n {\n code: '4560',\n name: 'Bois-Et-Borsu',\n },\n {\n code: '4560',\n name: 'Clavier',\n },\n {\n code: '4560',\n name: 'Les Avins',\n },\n {\n code: '4560',\n name: 'Ocquier',\n },\n {\n code: '4560',\n name: 'Pailhe',\n },\n {\n code: '4560',\n name: 'Terwagne',\n },\n {\n code: '4570',\n name: 'Marchin',\n },\n {\n code: '4570',\n name: 'Vyle-Et-Tharoul',\n },\n {\n code: '4577',\n name: 'Modave',\n },\n {\n code: '4577',\n name: 'Outrelouxhe',\n },\n {\n code: '4577',\n name: 'Strée-Lez-Huy',\n },\n {\n code: '4577',\n name: 'Vierset-Barse',\n },\n {\n code: '4590',\n name: 'Ellemelle',\n },\n {\n code: '4590',\n name: 'Ouffet',\n },\n {\n code: '4590',\n name: 'Warzée',\n },\n {\n code: '4600',\n name: 'Lanaye',\n nameNL: 'Ternaaien',\n nameFR: 'Lanaye',\n },\n {\n code: '4600',\n name: 'Lixhe',\n nameNL: 'Lieze',\n nameFR: 'Lixhe',\n },\n {\n code: '4600',\n name: 'Richelle',\n },\n {\n code: '4600',\n name: 'Visé',\n nameNL: 'Wezet',\n nameFR: 'Visé',\n },\n {\n code: '4601',\n name: 'Argenteau',\n },\n {\n code: '4602',\n name: 'Cheratte',\n },\n {\n code: '4606',\n name: 'Saint-André',\n },\n {\n code: '4607',\n name: 'Berneau',\n },\n {\n code: '4607',\n name: 'Bombaye',\n nameNL: 'Bolbeek',\n nameFR: 'Bombaye',\n },\n {\n code: '4607',\n name: 'Dalhem',\n },\n {\n code: '4607',\n name: 'Feneur',\n },\n {\n code: '4607',\n name: 'Mortroux',\n },\n {\n code: '4608',\n name: 'Neufchâteau',\n },\n {\n code: '4608',\n name: 'Warsage',\n nameNL: 'Weerst',\n nameFR: 'Warsage',\n },\n {\n code: '4610',\n name: 'Bellaire',\n },\n {\n code: '4610',\n name: 'Beyne-Heusay',\n },\n {\n code: '4610',\n name: 'Queue-Du-Bois',\n },\n {\n code: '4620',\n name: 'Fléron',\n },\n {\n code: '4621',\n name: 'Retinne',\n },\n {\n code: '4623',\n name: 'Magnée',\n },\n {\n code: '4624',\n name: 'Romsée',\n },\n {\n code: '4630',\n name: 'Ayeneux',\n },\n {\n code: '4630',\n name: 'Micheroux',\n },\n {\n code: '4630',\n name: 'Soumagne',\n },\n {\n code: '4630',\n name: 'Tignée',\n },\n {\n code: '4631',\n name: 'Evegnée',\n },\n {\n code: '4632',\n name: 'Cérexhe-Heuseux',\n },\n {\n code: '4633',\n name: 'Melen',\n },\n {\n code: '4650',\n name: 'Chaineux',\n },\n {\n code: '4650',\n name: 'Grand-Rechain',\n },\n {\n code: '4650',\n name: 'Herve',\n },\n {\n code: '4650',\n name: 'Julémont',\n },\n {\n code: '4651',\n name: 'Battice',\n },\n {\n code: '4652',\n name: 'Xhendelesse',\n },\n {\n code: '4653',\n name: 'Bolland',\n },\n {\n code: '4654',\n name: 'Charneux',\n },\n {\n code: '4670',\n name: 'Blégny',\n },\n {\n code: '4670',\n name: 'Mortier',\n },\n {\n code: '4670',\n name: 'Trembleur',\n },\n {\n code: '4671',\n name: 'Barchon',\n },\n {\n code: '4671',\n name: 'Housse',\n },\n {\n code: '4671',\n name: 'Saive',\n },\n {\n code: '4672',\n name: 'Saint-Remy',\n },\n {\n code: '4680',\n name: 'Hermée',\n },\n {\n code: '4680',\n name: 'Oupeye',\n },\n {\n code: '4681',\n name: 'Hermalle-Sous-Argenteau',\n },\n {\n code: '4682',\n name: 'Heure-Le-Romain',\n },\n {\n code: '4682',\n name: 'Houtain-Saint-Siméon',\n },\n {\n code: '4683',\n name: 'Vivegnis',\n },\n {\n code: '4684',\n name: 'Haccourt',\n },\n {\n code: '4690',\n name: 'Bassenge',\n nameNL: 'Bitsingen',\n nameFR: 'Bassenge',\n },\n {\n code: '4690',\n name: 'Boirs',\n },\n {\n code: '4690',\n name: 'Eben-Emael',\n },\n {\n code: '4690',\n name: 'Glons',\n nameNL: 'Glaaien',\n nameFR: 'Glons',\n },\n {\n code: '4690',\n name: 'Roclenge-Sur-Geer',\n nameNL: 'Rukkelingen-aan-de-Jeker',\n nameFR: 'Roclenge-sur-Geer',\n },\n {\n code: '4690',\n name: 'Wonck',\n },\n {\n code: '4700',\n name: 'Eupen',\n },\n {\n code: '4701',\n name: 'Kettenis',\n },\n {\n code: '4710',\n name: 'Lontzen',\n },\n {\n code: '4711',\n name: 'Walhorn',\n },\n {\n code: '4720',\n name: 'Kelmis',\n },\n {\n code: '4721',\n name: 'Neu-Moresnet',\n },\n {\n code: '4728',\n name: 'Hergenrath',\n },\n {\n code: '4730',\n name: 'Hauset',\n },\n {\n code: '4730',\n name: 'Raeren',\n },\n {\n code: '4731',\n name: 'Eynatten',\n },\n {\n code: '4750',\n name: 'Butgenbach',\n },\n {\n code: '4750',\n name: 'Elsenborn',\n },\n {\n code: '4760',\n name: 'Büllingen',\n nameNL: 'Bullange',\n nameFR: 'Büllingen',\n },\n {\n code: '4760',\n name: 'Manderfeld',\n },\n {\n code: '4761',\n name: 'Rocherath',\n },\n {\n code: '4770',\n name: 'Amel',\n nameNL: 'Amblève',\n nameFR: 'Amel',\n },\n {\n code: '4770',\n name: 'Meyerode',\n },\n {\n code: '4771',\n name: 'Heppenbach',\n },\n {\n code: '4780',\n name: 'Recht',\n },\n {\n code: '4780',\n name: 'Sankt-Vith',\n },\n {\n code: '4782',\n name: 'Schönberg',\n },\n {\n code: '4783',\n name: 'Lommersweiler',\n },\n {\n code: '4784',\n name: 'Crombach',\n },\n {\n code: '4790',\n name: 'Burg-Reuland',\n },\n {\n code: '4790',\n name: 'Reuland',\n },\n {\n code: '4791',\n name: 'Thommen',\n },\n {\n code: '4800',\n name: 'Ensival',\n },\n {\n code: '4800',\n name: 'Lambermont',\n },\n {\n code: '4800',\n name: 'Petit-Rechain',\n },\n {\n code: '4800',\n name: 'Polleur',\n },\n {\n code: '4800',\n name: 'Verviers',\n },\n {\n code: '4801',\n name: 'Stembert',\n },\n {\n code: '4802',\n name: 'Heusy',\n },\n {\n code: '4820',\n name: 'Dison',\n },\n {\n code: '4821',\n name: 'Andrimont',\n },\n {\n code: '4830',\n name: 'Limbourg',\n nameNL: 'Limburg',\n nameFR: 'Limbourg',\n },\n {\n code: '4831',\n name: 'Bilstain',\n },\n {\n code: '4834',\n name: 'Goé',\n nameNL: 'Gulke',\n nameFR: 'Goé',\n },\n {\n code: '4837',\n name: 'Baelen',\n },\n {\n code: '4837',\n name: 'Membach',\n },\n {\n code: '4840',\n name: 'Welkenraedt',\n },\n {\n code: '4841',\n name: 'Henri-Chapelle',\n nameNL: 'Hendrik-Kapelle',\n nameFR: 'Henri-Chapelle',\n },\n {\n code: '4845',\n name: 'Jalhay',\n },\n {\n code: '4845',\n name: 'Sart-Lez-Spa',\n },\n {\n code: '4850',\n name: 'Montzen',\n },\n {\n code: '4850',\n name: 'Moresnet',\n },\n {\n code: '4850',\n name: 'Plombières',\n },\n {\n code: '4851',\n name: 'Gemmenich',\n },\n {\n code: '4851',\n name: 'Sippenaeken',\n },\n {\n code: '4852',\n name: 'Hombourg',\n nameNL: 'Homburg',\n nameFR: 'Hombourg',\n },\n {\n code: '4860',\n name: 'Cornesse',\n },\n {\n code: '4860',\n name: 'Pepinster',\n },\n {\n code: '4860',\n name: 'Wegnez',\n },\n {\n code: '4861',\n name: 'Soiron',\n },\n {\n code: '4870',\n name: 'Forêt',\n },\n {\n code: '4870',\n name: 'Fraipont',\n },\n {\n code: '4870',\n name: 'Nessonvaux',\n },\n {\n code: '4870',\n name: 'Trooz',\n },\n {\n code: '4877',\n name: 'Olne',\n },\n {\n code: '4880',\n name: 'Aubel',\n },\n {\n code: '4890',\n name: 'Clermont',\n },\n {\n code: '4890',\n name: 'Thimister',\n },\n {\n code: '4890',\n name: 'Thimister-Clermont',\n },\n {\n code: '4900',\n name: 'Spa',\n },\n {\n code: '4910',\n name: 'La Reid',\n },\n {\n code: '4910',\n name: 'Polleur',\n },\n {\n code: '4910',\n name: 'Theux',\n },\n {\n code: '4920',\n name: 'Aywaille',\n },\n {\n code: '4920',\n name: 'Ernonheid',\n },\n {\n code: '4920',\n name: 'Harzé',\n },\n {\n code: '4920',\n name: 'Louveigné',\n },\n {\n code: '4920',\n name: 'Sougné-Remouchamps',\n },\n {\n code: '4950',\n name: 'Faymonville',\n },\n {\n code: '4950',\n name: 'Robertville',\n },\n {\n code: '4950',\n name: 'Sourbrodt',\n },\n {\n code: '4950',\n name: 'Weismes',\n },\n {\n code: '4960',\n name: 'Bellevaux-Ligneuville',\n },\n {\n code: '4960',\n name: 'Bevercé',\n },\n {\n code: '4960',\n name: 'Malmedy',\n },\n {\n code: '4970',\n name: 'Francorchamps',\n },\n {\n code: '4970',\n name: 'Stavelot',\n },\n {\n code: '4980',\n name: 'Fosse',\n },\n {\n code: '4980',\n name: 'Trois-Ponts',\n },\n {\n code: '4980',\n name: 'Wanne',\n },\n {\n code: '4983',\n name: 'Basse-Bodeux',\n },\n {\n code: '4987',\n name: 'Chevron',\n },\n {\n code: '4987',\n name: 'La Gleize',\n },\n {\n code: '4987',\n name: 'Lorcé',\n },\n {\n code: '4987',\n name: 'Rahier',\n },\n {\n code: '4987',\n name: 'Stoumont',\n },\n {\n code: '4990',\n name: 'Arbrefontaine',\n },\n {\n code: '4990',\n name: 'Bra',\n },\n {\n code: '4990',\n name: 'Lierneux',\n },\n {\n code: '5000',\n name: 'Beez',\n },\n {\n code: '5000',\n name: 'Namur',\n nameNL: 'Namen',\n nameFR: 'Namur',\n },\n {\n code: '5001',\n name: 'Belgrade',\n },\n {\n code: '5002',\n name: 'Saint-Servais',\n },\n {\n code: '5003',\n name: 'Saint-Marc',\n },\n {\n code: '5004',\n name: 'Bouge',\n },\n {\n code: '5010',\n name: 'SA SudPresse',\n },\n {\n code: '5012',\n name: 'Parlement Wallon',\n },\n {\n code: '5020',\n name: 'Champion',\n },\n {\n code: '5020',\n name: 'Daussoulx',\n },\n {\n code: '5020',\n name: 'Flawinne',\n },\n {\n code: '5020',\n name: 'Malonne',\n },\n {\n code: '5020',\n name: 'Suarlée',\n },\n {\n code: '5020',\n name: 'Temploux',\n },\n {\n code: '5020',\n name: 'Vedrin',\n },\n {\n code: '5021',\n name: 'Boninne',\n },\n {\n code: '5022',\n name: 'Cognelée',\n },\n {\n code: '5024',\n name: 'Gelbressée',\n },\n {\n code: '5024',\n name: 'Marche-Les-Dames',\n },\n {\n code: '5030',\n name: 'Beuzet',\n },\n {\n code: '5030',\n name: 'Ernage',\n },\n {\n code: '5030',\n name: 'Gembloux',\n },\n {\n code: '5030',\n name: 'Grand-Manil',\n },\n {\n code: '5030',\n name: 'Lonzée',\n },\n {\n code: '5030',\n name: 'Sauvenière',\n },\n {\n code: '5031',\n name: 'Grand-Leez',\n nameNL: 'Groot-Leez',\n nameFR: 'Grand-Leez',\n },\n {\n code: '5032',\n name: 'Bossière',\n },\n {\n code: '5032',\n name: 'Bothey',\n },\n {\n code: '5032',\n name: 'Corroy-Le-Château',\n },\n {\n code: '5032',\n name: 'Isnes',\n },\n {\n code: '5032',\n name: 'Mazy',\n },\n {\n code: '5060',\n name: 'Arsimont',\n },\n {\n code: '5060',\n name: 'Auvelais',\n },\n {\n code: '5060',\n name: 'Falisolle',\n },\n {\n code: '5060',\n name: 'Keumiée',\n },\n {\n code: '5060',\n name: 'Moignelée',\n },\n {\n code: '5060',\n name: 'Sambreville',\n },\n {\n code: '5060',\n name: 'Tamines',\n },\n {\n code: '5060',\n name: 'Velaine-Sur-Sambre',\n },\n {\n code: '5070',\n name: 'Aisemont',\n },\n {\n code: '5070',\n name: 'Fosses-La-Ville',\n },\n {\n code: '5070',\n name: 'Le Roux',\n },\n {\n code: '5070',\n name: 'Sart-Eustache',\n },\n {\n code: '5070',\n name: 'Sart-Saint-Laurent',\n },\n {\n code: '5070',\n name: 'Vitrival',\n },\n {\n code: '5080',\n name: 'Emines',\n },\n {\n code: '5080',\n name: 'La Bruyère',\n },\n {\n code: '5080',\n name: 'Rhisnes',\n },\n {\n code: '5080',\n name: 'Villers-Lez-Heest',\n },\n {\n code: '5080',\n name: 'Warisoulx',\n },\n {\n code: '5081',\n name: 'Bovesse',\n },\n {\n code: '5081',\n name: 'Meux',\n },\n {\n code: '5081',\n name: 'Saint-Denis-Bovesse',\n },\n {\n code: '5100',\n name: 'Dave',\n },\n {\n code: '5100',\n name: 'Jambes',\n },\n {\n code: '5100',\n name: 'Naninne',\n },\n {\n code: '5100',\n name: 'Wépion',\n },\n {\n code: '5100',\n name: 'Wierde',\n },\n {\n code: '5101',\n name: 'Erpent',\n },\n {\n code: '5101',\n name: 'Lives-Sur-Meuse',\n },\n {\n code: '5101',\n name: 'Loyers',\n },\n {\n code: '5140',\n name: 'Boignée',\n },\n {\n code: '5140',\n name: 'Ligny',\n },\n {\n code: '5140',\n name: 'Sombreffe',\n },\n {\n code: '5140',\n name: 'Tongrinne',\n },\n {\n code: '5150',\n name: 'Floreffe',\n },\n {\n code: '5150',\n name: 'Floriffoux',\n },\n {\n code: '5150',\n name: 'Franière',\n },\n {\n code: '5150',\n name: 'Soye',\n },\n {\n code: '5170',\n name: 'Arbre',\n },\n {\n code: '5170',\n name: 'Bois-De-Villers',\n },\n {\n code: '5170',\n name: 'Lesve',\n },\n {\n code: '5170',\n name: 'Lustin',\n },\n {\n code: '5170',\n name: 'Profondeville',\n },\n {\n code: '5170',\n name: 'Rivière',\n },\n {\n code: '5190',\n name: 'Balâtre',\n },\n {\n code: '5190',\n name: 'Ham-Sur-Sambre',\n },\n {\n code: '5190',\n name: 'Jemeppe-Sur-Sambre',\n },\n {\n code: '5190',\n name: 'Mornimont',\n },\n {\n code: '5190',\n name: 'Moustier-Sur-Sambre',\n },\n {\n code: '5190',\n name: 'Onoz',\n },\n {\n code: '5190',\n name: 'Saint-Martin',\n },\n {\n code: '5190',\n name: 'Spy',\n },\n {\n code: '5300',\n name: 'Andenne',\n },\n {\n code: '5300',\n name: 'Bonneville',\n },\n {\n code: '5300',\n name: 'Coutisse',\n },\n {\n code: '5300',\n name: 'Landenne',\n },\n {\n code: '5300',\n name: 'Maizeret',\n },\n {\n code: '5300',\n name: 'Namêche',\n },\n {\n code: '5300',\n name: 'Sclayn',\n },\n {\n code: '5300',\n name: 'Seilles',\n },\n {\n code: '5300',\n name: 'Thon',\n },\n {\n code: '5300',\n name: 'Vezin',\n },\n {\n code: '5310',\n name: 'Aische-En-Refail',\n },\n {\n code: '5310',\n name: 'Bolinne',\n },\n {\n code: '5310',\n name: 'Boneffe',\n },\n {\n code: '5310',\n name: 'Branchon',\n },\n {\n code: '5310',\n name: 'Dhuy',\n },\n {\n code: '5310',\n name: 'Eghezée',\n },\n {\n code: '5310',\n name: 'Hanret',\n },\n {\n code: '5310',\n name: 'Leuze',\n },\n {\n code: '5310',\n name: 'Liernu',\n },\n {\n code: '5310',\n name: 'Longchamps',\n },\n {\n code: '5310',\n name: 'Mehaigne',\n },\n {\n code: '5310',\n name: 'Noville-Sur-Méhaigne',\n },\n {\n code: '5310',\n name: 'Saint-Germain',\n },\n {\n code: '5310',\n name: 'Taviers',\n },\n {\n code: '5310',\n name: 'Upigny',\n },\n {\n code: '5310',\n name: 'Waret-La-Chaussée',\n },\n {\n code: '5330',\n name: 'Assesse',\n },\n {\n code: '5330',\n name: 'Maillen',\n },\n {\n code: '5330',\n name: 'Sart-Bernard',\n },\n {\n code: '5332',\n name: 'Crupet',\n },\n {\n code: '5333',\n name: 'Sorinne-La-Longue',\n },\n {\n code: '5334',\n name: 'Florée',\n },\n {\n code: '5336',\n name: 'Courrière',\n },\n {\n code: '5340',\n name: 'Faulx-Les-Tombes',\n },\n {\n code: '5340',\n name: 'Gesves',\n },\n {\n code: '5340',\n name: 'Haltinne',\n },\n {\n code: '5340',\n name: 'Mozet',\n },\n {\n code: '5340',\n name: 'Sorée',\n },\n {\n code: '5350',\n name: 'Evelette',\n },\n {\n code: '5350',\n name: 'Ohey',\n },\n {\n code: '5351',\n name: 'Haillot',\n },\n {\n code: '5352',\n name: 'Perwez-Haillot',\n },\n {\n code: '5353',\n name: 'Goesnes',\n },\n {\n code: '5354',\n name: 'Jallet',\n },\n {\n code: '5360',\n name: 'Hamois',\n },\n {\n code: '5360',\n name: 'Natoye',\n },\n {\n code: '5361',\n name: 'Mohiville',\n },\n {\n code: '5361',\n name: 'Scy',\n },\n {\n code: '5362',\n name: 'Achet',\n },\n {\n code: '5363',\n name: 'Emptinne',\n },\n {\n code: '5364',\n name: 'Schaltin',\n },\n {\n code: '5370',\n name: 'Barvaux-Condroz',\n },\n {\n code: '5370',\n name: 'Flostoy',\n },\n {\n code: '5370',\n name: 'Havelange',\n },\n {\n code: '5370',\n name: 'Jeneffe',\n },\n {\n code: '5370',\n name: 'Porcheresse',\n },\n {\n code: '5370',\n name: 'Verlée',\n },\n {\n code: '5372',\n name: 'Méan',\n },\n {\n code: '5374',\n name: 'Maffe',\n },\n {\n code: '5376',\n name: 'Miécret',\n },\n {\n code: '5377',\n name: 'Baillonville',\n },\n {\n code: '5377',\n name: 'Bonsin',\n },\n {\n code: '5377',\n name: 'Heure',\n },\n {\n code: '5377',\n name: 'Hogne',\n },\n {\n code: '5377',\n name: 'Nettinne',\n },\n {\n code: '5377',\n name: 'Noiseux',\n },\n {\n code: '5377',\n name: 'Sinsin',\n },\n {\n code: '5377',\n name: 'Somme-Leuze',\n },\n {\n code: '5377',\n name: 'Waillet',\n },\n {\n code: '5380',\n name: 'Bierwart',\n },\n {\n code: '5380',\n name: 'Cortil-Wodon',\n },\n {\n code: '5380',\n name: 'Fernelmont',\n },\n {\n code: '5380',\n name: 'Forville',\n },\n {\n code: '5380',\n name: 'Franc-Waret',\n },\n {\n code: '5380',\n name: 'Hemptinne',\n },\n {\n code: '5380',\n name: 'Hingeon',\n },\n {\n code: '5380',\n name: 'Marchovelette',\n },\n {\n code: '5380',\n name: 'Noville-Les-Bois',\n },\n {\n code: '5380',\n name: 'Pontillas',\n },\n {\n code: '5380',\n name: 'Tillier',\n },\n {\n code: '5500',\n name: 'Anseremme',\n },\n {\n code: '5500',\n name: 'Bouvignes-Sur-Meuse',\n },\n {\n code: '5500',\n name: 'Dinant',\n },\n {\n code: '5500',\n name: 'Dréhance',\n },\n {\n code: '5500',\n name: 'Falmagne',\n },\n {\n code: '5500',\n name: 'Falmignoul',\n },\n {\n code: '5500',\n name: 'Furfooz',\n },\n {\n code: '5501',\n name: 'Lisogne',\n },\n {\n code: '5502',\n name: 'Thynes',\n },\n {\n code: '5503',\n name: 'Sorinnes',\n },\n {\n code: '5504',\n name: 'Foy-Notre-Dame',\n },\n {\n code: '5520',\n name: 'Anthée',\n },\n {\n code: '5520',\n name: 'Onhaye',\n },\n {\n code: '5521',\n name: 'Serville',\n },\n {\n code: '5522',\n name: 'Falaen',\n },\n {\n code: '5523',\n name: 'Sommière',\n },\n {\n code: '5523',\n name: 'Weillen',\n },\n {\n code: '5524',\n name: 'Gerin',\n },\n {\n code: '5530',\n name: 'Dorinne',\n },\n {\n code: '5530',\n name: 'Durnal',\n },\n {\n code: '5530',\n name: 'Evrehailles',\n },\n {\n code: '5530',\n name: 'Godinne',\n },\n {\n code: '5530',\n name: 'Houx',\n },\n {\n code: '5530',\n name: 'Mont',\n },\n {\n code: '5530',\n name: 'Purnode',\n },\n {\n code: '5530',\n name: 'Spontin',\n },\n {\n code: '5530',\n name: 'Yvoir',\n },\n {\n code: '5537',\n name: 'Anhée',\n },\n {\n code: '5537',\n name: 'Annevoie-Rouillon',\n },\n {\n code: '5537',\n name: 'Bioul',\n },\n {\n code: '5537',\n name: 'Denée',\n },\n {\n code: '5537',\n name: 'Haut-Le-Wastia',\n },\n {\n code: '5537',\n name: 'Sosoye',\n },\n {\n code: '5537',\n name: 'Warnant',\n },\n {\n code: '5540',\n name: 'Hastière',\n },\n {\n code: '5540',\n name: 'Hastière-Lavaux',\n },\n {\n code: '5540',\n name: 'Hermeton-Sur-Meuse',\n },\n {\n code: '5540',\n name: 'Waulsort',\n },\n {\n code: '5541',\n name: 'Hastière-Par-Delà',\n },\n {\n code: '5542',\n name: 'Blaimont',\n },\n {\n code: '5543',\n name: 'Heer',\n },\n {\n code: '5544',\n name: 'Agimont',\n },\n {\n code: '5550',\n name: 'Alle',\n },\n {\n code: '5550',\n name: 'Bagimont',\n },\n {\n code: '5550',\n name: 'Bohan',\n },\n {\n code: '5550',\n name: 'Chairière',\n },\n {\n code: '5550',\n name: 'Laforet',\n },\n {\n code: '5550',\n name: 'Membre',\n },\n {\n code: '5550',\n name: 'Mouzaive',\n },\n {\n code: '5550',\n name: 'Nafraiture',\n },\n {\n code: '5550',\n name: 'Orchimont',\n },\n {\n code: '5550',\n name: 'Pussemange',\n },\n {\n code: '5550',\n name: 'Sugny',\n },\n {\n code: '5550',\n name: 'Vresse-Sur-Semois',\n },\n {\n code: '5555',\n name: 'Baillamont',\n },\n {\n code: '5555',\n name: 'Bellefontaine',\n },\n {\n code: '5555',\n name: 'Bièvre',\n },\n {\n code: '5555',\n name: 'Cornimont',\n },\n {\n code: '5555',\n name: 'Graide',\n },\n {\n code: '5555',\n name: 'Gros-Fays',\n },\n {\n code: '5555',\n name: 'Monceau-En-Ardenne',\n },\n {\n code: '5555',\n name: 'Naomé',\n },\n {\n code: '5555',\n name: 'Oizy',\n },\n {\n code: '5555',\n name: 'Petit-Fays',\n },\n {\n code: '5560',\n name: 'Ciergnon',\n },\n {\n code: '5560',\n name: 'Finnevaux',\n },\n {\n code: '5560',\n name: 'Houyet',\n },\n {\n code: '5560',\n name: 'Hulsonniaux',\n },\n {\n code: '5560',\n name: 'Mesnil-Eglise',\n },\n {\n code: '5560',\n name: 'Mesnil-Saint-Blaise',\n },\n {\n code: '5561',\n name: 'Celles',\n },\n {\n code: '5562',\n name: 'Custinne',\n },\n {\n code: '5563',\n name: 'Hour',\n },\n {\n code: '5564',\n name: 'Wanlin',\n },\n {\n code: '5570',\n name: 'Baronville',\n },\n {\n code: '5570',\n name: 'Beauraing',\n },\n {\n code: '5570',\n name: 'Dion',\n },\n {\n code: '5570',\n name: 'Felenne',\n },\n {\n code: '5570',\n name: 'Feschaux',\n },\n {\n code: '5570',\n name: 'Honnay',\n },\n {\n code: '5570',\n name: 'Javingue',\n },\n {\n code: '5570',\n name: 'Vonêche',\n },\n {\n code: '5570',\n name: 'Wancennes',\n },\n {\n code: '5570',\n name: 'Winenne',\n },\n {\n code: '5571',\n name: 'Wiesme',\n },\n {\n code: '5572',\n name: 'Focant',\n },\n {\n code: '5573',\n name: 'Martouzin-Neuville',\n },\n {\n code: '5574',\n name: 'Pondrôme',\n },\n {\n code: '5575',\n name: 'Bourseigne-Neuve',\n },\n {\n code: '5575',\n name: 'Bourseigne-Vieille',\n },\n {\n code: '5575',\n name: 'Gedinne',\n },\n {\n code: '5575',\n name: 'Houdremont',\n },\n {\n code: '5575',\n name: 'Louette-Saint-Denis',\n },\n {\n code: '5575',\n name: 'Louette-Saint-Pierre',\n },\n {\n code: '5575',\n name: 'Malvoisin',\n },\n {\n code: '5575',\n name: 'Patignies',\n },\n {\n code: '5575',\n name: 'Rienne',\n },\n {\n code: '5575',\n name: 'Sart-Custinne',\n },\n {\n code: '5575',\n name: 'Vencimont',\n },\n {\n code: '5575',\n name: 'Willerzie',\n },\n {\n code: '5576',\n name: 'Froidfontaine',\n },\n {\n code: '5580',\n name: 'Ave-Et-Auffe',\n },\n {\n code: '5580',\n name: 'Buissonville',\n },\n {\n code: '5580',\n name: 'Eprave',\n },\n {\n code: '5580',\n name: 'Han-Sur-Lesse',\n },\n {\n code: '5580',\n name: 'Jemelle',\n },\n {\n code: '5580',\n name: 'Lavaux-Saint-Anne',\n },\n {\n code: '5580',\n name: 'Lessive',\n },\n {\n code: '5580',\n name: 'Mont-Gauthier',\n },\n {\n code: '5580',\n name: 'Rochefort',\n },\n {\n code: '5580',\n name: 'Villers-Sur-Lesse',\n },\n {\n code: '5580',\n name: 'Wavreille',\n },\n {\n code: '5589',\n name: 'Jemelle',\n },\n {\n code: '5590',\n name: 'Achêne',\n },\n {\n code: '5590',\n name: 'Braibant',\n },\n {\n code: '5590',\n name: 'Chevetogne',\n },\n {\n code: '5590',\n name: 'Ciney',\n },\n {\n code: '5590',\n name: 'Conneux',\n },\n {\n code: '5590',\n name: 'Haversin',\n },\n {\n code: '5590',\n name: 'Leignon',\n },\n {\n code: '5590',\n name: 'Pessoux',\n },\n {\n code: '5590',\n name: 'Serinchamps',\n },\n {\n code: '5590',\n name: 'Sovet',\n },\n {\n code: '5600',\n name: 'Fagnolle',\n },\n {\n code: '5600',\n name: 'Franchimont',\n },\n {\n code: '5600',\n name: 'Jamagne',\n },\n {\n code: '5600',\n name: 'Jamiolle',\n },\n {\n code: '5600',\n name: 'Merlemont',\n },\n {\n code: '5600',\n name: 'Neuville',\n },\n {\n code: '5600',\n name: 'Omezée',\n },\n {\n code: '5600',\n name: 'Philippeville',\n },\n {\n code: '5600',\n name: 'Roly',\n },\n {\n code: '5600',\n name: 'Romedenne',\n },\n {\n code: '5600',\n name: 'Samart',\n },\n {\n code: '5600',\n name: 'Sart-En-Fagne',\n },\n {\n code: '5600',\n name: 'Sautour',\n },\n {\n code: '5600',\n name: 'Surice',\n },\n {\n code: '5600',\n name: 'Villers-En-Fagne',\n },\n {\n code: '5600',\n name: 'Villers-Le-Gambon',\n },\n {\n code: '5600',\n name: 'Vodecée',\n },\n {\n code: '5620',\n name: 'Corenne',\n },\n {\n code: '5620',\n name: 'Flavion',\n },\n {\n code: '5620',\n name: 'Florennes',\n },\n {\n code: '5620',\n name: 'Hemptinne-Lez-Florennes',\n },\n {\n code: '5620',\n name: 'Morville',\n },\n {\n code: '5620',\n name: 'Rosée',\n },\n {\n code: '5620',\n name: 'Saint-Aubin',\n },\n {\n code: '5621',\n name: 'Hanzinelle',\n },\n {\n code: '5621',\n name: 'Hanzinne',\n },\n {\n code: '5621',\n name: 'Morialmé',\n },\n {\n code: '5621',\n name: 'Thy-Le-Baudouin',\n },\n {\n code: '5630',\n name: 'Cerfontaine',\n },\n {\n code: '5630',\n name: 'Daussois',\n },\n {\n code: '5630',\n name: 'Senzeille',\n },\n {\n code: '5630',\n name: 'Silenrieux',\n },\n {\n code: '5630',\n name: 'Soumoy',\n },\n {\n code: '5630',\n name: 'Villers-Deux-Eglises',\n },\n {\n code: '5640',\n name: 'Biesme',\n },\n {\n code: '5640',\n name: 'Biesmerée',\n },\n {\n code: '5640',\n name: 'Graux',\n },\n {\n code: '5640',\n name: 'Mettet',\n },\n {\n code: '5640',\n name: 'Oret',\n },\n {\n code: '5640',\n name: 'Saint-Gérard',\n },\n {\n code: '5641',\n name: 'Furnaux',\n },\n {\n code: '5644',\n name: 'Ermeton-Sur-Biert',\n },\n {\n code: '5646',\n name: 'Stave',\n },\n {\n code: '5650',\n name: 'Castillon',\n },\n {\n code: '5650',\n name: 'Chastrès',\n },\n {\n code: '5650',\n name: 'Clermont',\n },\n {\n code: '5650',\n name: 'Fontenelle',\n },\n {\n code: '5650',\n name: 'Fraire',\n },\n {\n code: '5650',\n name: 'Pry',\n },\n {\n code: '5650',\n name: 'Vogenée',\n },\n {\n code: '5650',\n name: 'Walcourt',\n },\n {\n code: '5650',\n name: 'Yves-Gomezée',\n },\n {\n code: '5651',\n name: 'Berzée',\n },\n {\n code: '5651',\n name: 'Gourdinne',\n },\n {\n code: '5651',\n name: 'Laneffe',\n },\n {\n code: '5651',\n name: 'Rognée',\n },\n {\n code: '5651',\n name: 'Somzée',\n },\n {\n code: '5651',\n name: 'Tarcienne',\n },\n {\n code: '5651',\n name: 'Thy-Le-Château',\n },\n {\n code: '5660',\n name: 'Aublain',\n },\n {\n code: '5660',\n name: 'Boussu-En-Fagne',\n },\n {\n code: '5660',\n name: 'Brûly',\n },\n {\n code: '5660',\n name: 'Brûly-De-Pesche',\n },\n {\n code: '5660',\n name: 'Couvin',\n },\n {\n code: '5660',\n name: 'Cul-Des-Sarts',\n },\n {\n code: '5660',\n name: 'Dailly',\n },\n {\n code: '5660',\n name: 'Frasnes',\n },\n {\n code: '5660',\n name: 'Gonrieux',\n },\n {\n code: '5660',\n name: 'Mariembourg',\n },\n {\n code: '5660',\n name: 'Pesche',\n },\n {\n code: '5660',\n name: 'Petigny',\n },\n {\n code: '5660',\n name: 'Petite-Chapelle',\n },\n {\n code: '5660',\n name: 'Presgaux',\n },\n {\n code: '5670',\n name: 'Dourbes',\n },\n {\n code: '5670',\n name: 'Le Mesnil',\n },\n {\n code: '5670',\n name: 'Mazée',\n },\n {\n code: '5670',\n name: 'Nismes',\n },\n {\n code: '5670',\n name: 'Oignies-En-Thiérache',\n },\n {\n code: '5670',\n name: 'Olloy-Sur-Viroin',\n },\n {\n code: '5670',\n name: 'Treignes',\n },\n {\n code: '5670',\n name: 'Vierves-Sur-Viroin',\n },\n {\n code: '5670',\n name: 'Viroinval',\n },\n {\n code: '5680',\n name: 'Doische',\n },\n {\n code: '5680',\n name: 'Gimnée',\n },\n {\n code: '5680',\n name: 'Gochenée',\n },\n {\n code: '5680',\n name: 'Matagne-La-Grande',\n },\n {\n code: '5680',\n name: 'Matagne-La-Petite',\n },\n {\n code: '5680',\n name: 'Niverlée',\n },\n {\n code: '5680',\n name: 'Romerée',\n },\n {\n code: '5680',\n name: 'Soulme',\n },\n {\n code: '5680',\n name: 'Vaucelles',\n },\n {\n code: '5680',\n name: 'Vodelée',\n },\n {\n code: '6000',\n name: 'Charleroi',\n },\n {\n code: '6001',\n name: 'Marcinelle',\n },\n {\n code: '6010',\n name: 'Couillet',\n },\n {\n code: '6020',\n name: 'Dampremy',\n },\n {\n code: '6030',\n name: 'Goutroux',\n },\n {\n code: '6030',\n name: 'Marchienne-Au-Pont',\n },\n {\n code: '6031',\n name: 'Monceau-Sur-Sambre',\n },\n {\n code: '6032',\n name: 'Mont-Sur-Marchienne',\n },\n {\n code: '6040',\n name: 'Jumet',\n },\n {\n code: '6041',\n name: 'Gosselies',\n },\n {\n code: '6042',\n name: 'Lodelinsart',\n },\n {\n code: '6043',\n name: 'Ransart',\n },\n {\n code: '6044',\n name: 'Roux',\n },\n {\n code: '6060',\n name: 'Gilly',\n },\n {\n code: '6061',\n name: 'Montignies-Sur-Sambre',\n },\n {\n code: '6075',\n name: 'CSM Charleroi X',\n },\n {\n code: '6099',\n name: 'Charleroi X',\n },\n {\n code: '6110',\n name: 'Montigny-Le-Tilleul',\n },\n {\n code: '6111',\n name: 'Landelies',\n },\n {\n code: '6120',\n name: 'Cour-Sur-Heure',\n },\n {\n code: '6120',\n name: 'Ham-Sur-Heure',\n },\n {\n code: '6120',\n name: 'Jamioulx',\n },\n {\n code: '6120',\n name: 'Marbaix',\n },\n {\n code: '6120',\n name: 'Nalinnes',\n },\n {\n code: '6140',\n name: \"Fontaine-L'Evêque\",\n },\n {\n code: '6141',\n name: 'Forchies-La-Marche',\n },\n {\n code: '6142',\n name: 'Leernes',\n },\n {\n code: '6150',\n name: 'Anderlues',\n },\n {\n code: '6180',\n name: 'Courcelles',\n },\n {\n code: '6181',\n name: 'Gouy-Lez-Piéton',\n },\n {\n code: '6182',\n name: 'Souvret',\n },\n {\n code: '6183',\n name: 'Trazegnies',\n },\n {\n code: '6200',\n name: 'Bouffioulx',\n },\n {\n code: '6200',\n name: 'Châtelet',\n },\n {\n code: '6200',\n name: 'Châtelineau',\n },\n {\n code: '6210',\n name: 'Frasnes-Lez-Gosselies',\n },\n {\n code: '6210',\n name: 'Les Bons Villers',\n },\n {\n code: '6210',\n name: 'Rèves',\n },\n {\n code: '6210',\n name: 'Villers-Perwin',\n },\n {\n code: '6210',\n name: 'Wayaux',\n },\n {\n code: '6211',\n name: 'Mellet',\n },\n {\n code: '6220',\n name: 'Fleurus',\n },\n {\n code: '6220',\n name: 'Heppignies',\n },\n {\n code: '6220',\n name: 'Lambusart',\n },\n {\n code: '6220',\n name: 'Wangenies',\n },\n {\n code: '6221',\n name: 'Saint-Amand',\n },\n {\n code: '6222',\n name: 'Brye',\n },\n {\n code: '6223',\n name: 'Wagnelée',\n },\n {\n code: '6224',\n name: 'Wanfercée-Baulet',\n },\n {\n code: '6230',\n name: 'Buzet',\n },\n {\n code: '6230',\n name: 'Obaix',\n },\n {\n code: '6230',\n name: 'Pont-À-Celles',\n },\n {\n code: '6230',\n name: 'Thiméon',\n },\n {\n code: '6230',\n name: 'Viesville',\n },\n {\n code: '6238',\n name: 'Liberchies',\n },\n {\n code: '6238',\n name: 'Luttre',\n },\n {\n code: '6240',\n name: 'Farciennes',\n },\n {\n code: '6240',\n name: 'Pironchamps',\n },\n {\n code: '6250',\n name: 'Aiseau',\n },\n {\n code: '6250',\n name: 'Aiseau-Presles',\n },\n {\n code: '6250',\n name: 'Pont-De-Loup',\n },\n {\n code: '6250',\n name: 'Presles',\n },\n {\n code: '6250',\n name: 'Roselies',\n },\n {\n code: '6280',\n name: 'Acoz',\n },\n {\n code: '6280',\n name: 'Gerpinnes',\n },\n {\n code: '6280',\n name: 'Gougnies',\n },\n {\n code: '6280',\n name: 'Joncret',\n },\n {\n code: '6280',\n name: 'Loverval',\n },\n {\n code: '6280',\n name: 'Villers-Poterie',\n },\n {\n code: '6440',\n name: 'Boussu-Lez-Walcourt',\n },\n {\n code: '6440',\n name: 'Fourbechies',\n },\n {\n code: '6440',\n name: 'Froidchapelle',\n },\n {\n code: '6440',\n name: 'Vergnies',\n },\n {\n code: '6441',\n name: 'Erpion',\n },\n {\n code: '6460',\n name: 'Bailièvre',\n },\n {\n code: '6460',\n name: 'Chimay',\n },\n {\n code: '6460',\n name: 'Robechies',\n },\n {\n code: '6460',\n name: 'Saint-Remy',\n },\n {\n code: '6460',\n name: 'Salles',\n },\n {\n code: '6460',\n name: 'Villers-La-Tour',\n },\n {\n code: '6461',\n name: 'Virelles',\n },\n {\n code: '6462',\n name: 'Vaulx-Lez-Chimay',\n },\n {\n code: '6463',\n name: 'Lompret',\n },\n {\n code: '6464',\n name: 'Baileux',\n },\n {\n code: '6464',\n name: 'Bourlers',\n },\n {\n code: '6464',\n name: 'Forges',\n },\n {\n code: '6464',\n name: \"L'Escaillère\",\n },\n {\n code: '6464',\n name: 'Rièzes',\n },\n {\n code: '6470',\n name: 'Grandrieu',\n },\n {\n code: '6470',\n name: 'Montbliart',\n },\n {\n code: '6470',\n name: 'Rance',\n },\n {\n code: '6470',\n name: 'Sautin',\n },\n {\n code: '6470',\n name: 'Sivry',\n },\n {\n code: '6470',\n name: 'Sivry-Rance',\n },\n {\n code: '6500',\n name: 'Barbençon',\n },\n {\n code: '6500',\n name: 'Beaumont',\n },\n {\n code: '6500',\n name: 'Leugnies',\n },\n {\n code: '6500',\n name: 'Leval-Chaudeville',\n },\n {\n code: '6500',\n name: 'Renlies',\n },\n {\n code: '6500',\n name: 'Solre-Saint-Géry',\n },\n {\n code: '6500',\n name: 'Thirimont',\n },\n {\n code: '6511',\n name: 'Strée',\n },\n {\n code: '6530',\n name: 'Leers-Et-Fosteau',\n },\n {\n code: '6530',\n name: 'Thuin',\n },\n {\n code: '6531',\n name: 'Biesme-Sous-Thuin',\n },\n {\n code: '6532',\n name: 'Ragnies',\n },\n {\n code: '6533',\n name: 'Biercée',\n },\n {\n code: '6534',\n name: 'Gozée',\n },\n {\n code: '6536',\n name: 'Donstiennes',\n },\n {\n code: '6536',\n name: 'Thuillies',\n },\n {\n code: '6540',\n name: 'Lobbes',\n },\n {\n code: '6540',\n name: 'Mont-Sainte-Geneviève',\n },\n {\n code: '6542',\n name: 'Sars-La-Buissière',\n },\n {\n code: '6543',\n name: 'Bienne-Lez-Happart',\n },\n {\n code: '6560',\n name: \"Bersillies-L'Abbaye\",\n },\n {\n code: '6560',\n name: 'Erquelinnes',\n },\n {\n code: '6560',\n name: 'Grand-Reng',\n },\n {\n code: '6560',\n name: 'Hantes-Wihéries',\n },\n {\n code: '6560',\n name: 'Montignies-Saint-Christophe',\n },\n {\n code: '6560',\n name: 'Solre-Sur-Sambre',\n },\n {\n code: '6567',\n name: 'Fontaine-Valmont',\n },\n {\n code: '6567',\n name: 'Labuissière',\n },\n {\n code: '6567',\n name: 'Merbes-Le-Château',\n },\n {\n code: '6567',\n name: 'Merbes-Sainte-Marie',\n },\n {\n code: '6590',\n name: 'Momignies',\n },\n {\n code: '6591',\n name: 'Macon',\n },\n {\n code: '6592',\n name: 'Monceau-Imbrechies',\n },\n {\n code: '6593',\n name: 'Macquenoise',\n },\n {\n code: '6594',\n name: 'Beauwelz',\n },\n {\n code: '6596',\n name: 'Forge-Philippe',\n },\n {\n code: '6596',\n name: 'Seloignes',\n },\n {\n code: '6600',\n name: 'Bastogne',\n nameNL: 'Bastenaken',\n nameFR: 'Bastogne',\n },\n {\n code: '6600',\n name: 'Longvilly',\n },\n {\n code: '6600',\n name: 'Noville',\n },\n {\n code: '6600',\n name: 'Villers-La-Bonne-Eau',\n },\n {\n code: '6600',\n name: 'Wardin',\n },\n {\n code: '6630',\n name: 'Martelange',\n nameNL: 'Martelingen',\n nameFR: 'Martelange',\n },\n {\n code: '6637',\n name: 'Fauvillers',\n },\n {\n code: '6637',\n name: 'Hollange',\n },\n {\n code: '6637',\n name: 'Tintange',\n },\n {\n code: '6640',\n name: 'Hompré',\n },\n {\n code: '6640',\n name: 'Morhet',\n },\n {\n code: '6640',\n name: 'Nives',\n },\n {\n code: '6640',\n name: 'Sibret',\n },\n {\n code: '6640',\n name: 'Vaux-Lez-Rosières',\n },\n {\n code: '6640',\n name: 'Vaux-Sur-Sûre',\n },\n {\n code: '6642',\n name: 'Juseret',\n },\n {\n code: '6660',\n name: 'Houffalize',\n },\n {\n code: '6660',\n name: 'Nadrin',\n },\n {\n code: '6661',\n name: 'Mont',\n },\n {\n code: '6661',\n name: 'Tailles',\n },\n {\n code: '6662',\n name: 'Tavigny',\n },\n {\n code: '6663',\n name: 'Mabompré',\n },\n {\n code: '6666',\n name: 'Wibrin',\n },\n {\n code: '6670',\n name: 'Gouvy',\n },\n {\n code: '6670',\n name: 'Limerlé',\n nameNL: 'Lomerslaer',\n nameFR: 'Limerlé',\n },\n {\n code: '6671',\n name: 'Bovigny',\n },\n {\n code: '6672',\n name: 'Beho',\n },\n {\n code: '6673',\n name: 'Cherain',\n },\n {\n code: '6674',\n name: 'Montleban',\n },\n {\n code: '6680',\n name: 'Amberloup',\n },\n {\n code: '6680',\n name: 'Sainte-Ode',\n },\n {\n code: '6680',\n name: 'Tillet',\n },\n {\n code: '6681',\n name: 'Lavacherie',\n },\n {\n code: '6686',\n name: 'Flamierge',\n },\n {\n code: '6687',\n name: 'Bastenaken',\n nameNL: 'Bastenaken',\n nameFR: 'Bastogne',\n },\n {\n code: '6688',\n name: 'Longchamps',\n },\n {\n code: '6690',\n name: 'Bihain',\n },\n {\n code: '6690',\n name: 'Vielsalm',\n },\n {\n code: '6692',\n name: 'Petit-Thier',\n },\n {\n code: '6698',\n name: 'Grand-Halleux',\n },\n {\n code: '6700',\n name: 'Arlon',\n nameNL: 'Aarlen',\n nameFR: 'Arlon',\n },\n {\n code: '6700',\n name: 'Bonnert',\n },\n {\n code: '6700',\n name: 'Heinsch',\n },\n {\n code: '6700',\n name: 'Toernich',\n },\n {\n code: '6704',\n name: 'Guirsch',\n },\n {\n code: '6706',\n name: 'Autelbas',\n },\n {\n code: '6717',\n name: 'Attert',\n },\n {\n code: '6717',\n name: 'Nobressart',\n },\n {\n code: '6717',\n name: 'Nothomb',\n },\n {\n code: '6717',\n name: 'Thiaumont',\n nameNL: 'Diedenberg',\n nameFR: 'Thiaumont',\n },\n {\n code: '6717',\n name: 'Tontelange',\n },\n {\n code: '6720',\n name: 'Habay',\n },\n {\n code: '6720',\n name: 'Habay-La-Neuve',\n },\n {\n code: '6720',\n name: 'Hachy',\n },\n {\n code: '6721',\n name: 'Anlier',\n },\n {\n code: '6723',\n name: 'Habay-La-Vieille',\n },\n {\n code: '6724',\n name: 'Houdemont',\n },\n {\n code: '6724',\n name: 'Rulles',\n },\n {\n code: '6730',\n name: 'Bellefontaine',\n },\n {\n code: '6730',\n name: 'Rossignol',\n },\n {\n code: '6730',\n name: 'Saint-Vincent',\n },\n {\n code: '6730',\n name: 'Tintigny',\n },\n {\n code: '6740',\n name: 'Etalle',\n },\n {\n code: '6740',\n name: 'Sainte-Marie-Sur-Semois',\n },\n {\n code: '6740',\n name: 'Villers-Sur-Semois',\n },\n {\n code: '6741',\n name: 'Vance',\n },\n {\n code: '6742',\n name: 'Chantemelle',\n },\n {\n code: '6743',\n name: 'Buzenol',\n },\n {\n code: '6747',\n name: 'Châtillon',\n },\n {\n code: '6747',\n name: 'Meix-Le-Tige',\n },\n {\n code: '6747',\n name: 'Saint-Léger',\n },\n {\n code: '6750',\n name: 'Musson',\n },\n {\n code: '6750',\n name: 'Mussy-La-Ville',\n },\n {\n code: '6750',\n name: 'Signeulx',\n },\n {\n code: '6760',\n name: 'Bleid',\n },\n {\n code: '6760',\n name: 'Ethe',\n },\n {\n code: '6760',\n name: 'Ruette',\n },\n {\n code: '6760',\n name: 'Virton',\n },\n {\n code: '6761',\n name: 'Latour',\n },\n {\n code: '6762',\n name: 'Saint-Mard',\n },\n {\n code: '6767',\n name: 'Dampicourt',\n },\n {\n code: '6767',\n name: 'Harnoncourt',\n },\n {\n code: '6767',\n name: 'Lamorteau',\n },\n {\n code: '6767',\n name: 'Rouvroy',\n },\n {\n code: '6767',\n name: 'Torgny',\n },\n {\n code: '6769',\n name: 'Gérouville',\n },\n {\n code: '6769',\n name: 'Meix-Devant-Virton',\n },\n {\n code: '6769',\n name: 'Robelmont',\n },\n {\n code: '6769',\n name: 'Sommethonne',\n },\n {\n code: '6769',\n name: 'Villers-La-Loue',\n },\n {\n code: '6780',\n name: 'Hondelange',\n nameNL: 'Hondelingen',\n nameFR: 'Hondelange',\n },\n {\n code: '6780',\n name: 'Messancy',\n },\n {\n code: '6780',\n name: 'Wolkrange',\n },\n {\n code: '6781',\n name: 'Sélange',\n },\n {\n code: '6782',\n name: 'Habergy',\n },\n {\n code: '6790',\n name: 'Aubange',\n },\n {\n code: '6791',\n name: 'Athus',\n },\n {\n code: '6792',\n name: 'Halanzy',\n nameNL: 'Helsingen',\n nameFR: 'Halanzy',\n },\n {\n code: '6792',\n name: 'Rachecourt',\n nameNL: 'Roesig',\n nameFR: 'Rachecourt',\n },\n {\n code: '6800',\n name: 'Bras',\n },\n {\n code: '6800',\n name: 'Freux',\n },\n {\n code: '6800',\n name: 'Libramont-Chevigny',\n },\n {\n code: '6800',\n name: 'Moircy',\n },\n {\n code: '6800',\n name: 'Recogne',\n },\n {\n code: '6800',\n name: 'Remagne',\n },\n {\n code: '6800',\n name: 'Saint-Pierre',\n },\n {\n code: '6800',\n name: 'Sainte-Marie-Chevigny',\n },\n {\n code: '6810',\n name: 'Chiny',\n },\n {\n code: '6810',\n name: 'Izel',\n },\n {\n code: '6810',\n name: 'Jamoigne',\n },\n {\n code: '6811',\n name: 'Les Bulles',\n },\n {\n code: '6812',\n name: 'Suxy',\n },\n {\n code: '6813',\n name: 'Termes',\n },\n {\n code: '6820',\n name: 'Florenville',\n },\n {\n code: '6820',\n name: 'Fontenoille',\n },\n {\n code: '6820',\n name: 'Muno',\n },\n {\n code: '6820',\n name: 'Sainte-Cécile',\n },\n {\n code: '6821',\n name: 'Lacuisine',\n },\n {\n code: '6823',\n name: 'Villers-Devant-Orval',\n },\n {\n code: '6824',\n name: 'Chassepierre',\n },\n {\n code: '6830',\n name: 'Bouillon',\n },\n {\n code: '6830',\n name: 'Les Hayons',\n },\n {\n code: '6830',\n name: 'Poupehan',\n },\n {\n code: '6830',\n name: 'Rochehaut',\n },\n {\n code: '6831',\n name: 'Noirfontaine',\n },\n {\n code: '6832',\n name: 'Sensenruth',\n },\n {\n code: '6833',\n name: 'Ucimont',\n },\n {\n code: '6833',\n name: 'Vivy',\n },\n {\n code: '6834',\n name: 'Bellevaux',\n },\n {\n code: '6836',\n name: 'Dohan',\n },\n {\n code: '6838',\n name: 'Corbion',\n },\n {\n code: '6840',\n name: 'Grandvoir',\n },\n {\n code: '6840',\n name: 'Grapfontaine',\n },\n {\n code: '6840',\n name: 'Hamipré',\n },\n {\n code: '6840',\n name: 'Longlier',\n },\n {\n code: '6840',\n name: 'Neufchâteau',\n },\n {\n code: '6840',\n name: 'Tournay',\n },\n {\n code: '6850',\n name: 'Carlsbourg',\n },\n {\n code: '6850',\n name: 'Offagne',\n },\n {\n code: '6850',\n name: 'Paliseul',\n },\n {\n code: '6851',\n name: 'Nollevaux',\n },\n {\n code: '6852',\n name: 'Maissin',\n },\n {\n code: '6852',\n name: 'Opont',\n },\n {\n code: '6853',\n name: 'Framont',\n },\n {\n code: '6856',\n name: 'Fays-Les-Veneurs',\n },\n {\n code: '6860',\n name: 'Assenois',\n },\n {\n code: '6860',\n name: 'Ebly',\n },\n {\n code: '6860',\n name: 'Léglise',\n },\n {\n code: '6860',\n name: 'Mellier',\n },\n {\n code: '6860',\n name: 'Witry',\n },\n {\n code: '6870',\n name: 'Arville',\n },\n {\n code: '6870',\n name: 'Awenne',\n },\n {\n code: '6870',\n name: 'Hatrival',\n },\n {\n code: '6870',\n name: 'Mirwart',\n },\n {\n code: '6870',\n name: 'Saint-Hubert',\n nameNL: 'Sint-Hubertus',\n nameFR: 'Saint-Hubert',\n },\n {\n code: '6870',\n name: 'Vesqueville',\n },\n {\n code: '6880',\n name: 'Auby-Sur-Semois',\n },\n {\n code: '6880',\n name: 'Bertrix',\n },\n {\n code: '6880',\n name: 'Cugnon',\n },\n {\n code: '6880',\n name: 'Jehonville',\n },\n {\n code: '6880',\n name: 'Orgeo',\n },\n {\n code: '6887',\n name: 'Herbeumont',\n },\n {\n code: '6887',\n name: 'Saint-Médard',\n },\n {\n code: '6887',\n name: 'Straimont',\n },\n {\n code: '6890',\n name: 'Anloy',\n },\n {\n code: '6890',\n name: 'Libin',\n },\n {\n code: '6890',\n name: 'Ochamps',\n },\n {\n code: '6890',\n name: 'Redu',\n },\n {\n code: '6890',\n name: 'Smuid',\n },\n {\n code: '6890',\n name: 'Transinne',\n },\n {\n code: '6890',\n name: 'Villance',\n },\n {\n code: '6900',\n name: 'Aye',\n },\n {\n code: '6900',\n name: 'Hargimont',\n },\n {\n code: '6900',\n name: 'Humain',\n },\n {\n code: '6900',\n name: 'Marche-En-Famenne',\n },\n {\n code: '6900',\n name: 'On',\n },\n {\n code: '6900',\n name: 'Roy',\n },\n {\n code: '6900',\n name: 'Waha',\n },\n {\n code: '6920',\n name: 'Sohier',\n },\n {\n code: '6920',\n name: 'Wellin',\n },\n {\n code: '6921',\n name: 'Chanly',\n },\n {\n code: '6922',\n name: 'Halma',\n },\n {\n code: '6924',\n name: 'Lomprez',\n },\n {\n code: '6927',\n name: 'Bure',\n },\n {\n code: '6927',\n name: 'Grupont',\n },\n {\n code: '6927',\n name: 'Resteigne',\n },\n {\n code: '6927',\n name: 'Tellin',\n },\n {\n code: '6929',\n name: 'Daverdisse',\n },\n {\n code: '6929',\n name: 'Gembes',\n },\n {\n code: '6929',\n name: 'Haut-Fays',\n },\n {\n code: '6929',\n name: 'Porcheresse',\n },\n {\n code: '6940',\n name: 'Barvaux-Sur-Ourthe',\n },\n {\n code: '6940',\n name: 'Durbuy',\n },\n {\n code: '6940',\n name: 'Grandhan',\n nameNL: 'Groothan',\n nameFR: 'Grandhan',\n },\n {\n code: '6940',\n name: 'Septon',\n },\n {\n code: '6940',\n name: 'Wéris',\n },\n {\n code: '6941',\n name: 'Bende',\n },\n {\n code: '6941',\n name: 'Bomal-Sur-Ourthe',\n },\n {\n code: '6941',\n name: 'Borlon',\n },\n {\n code: '6941',\n name: 'Heyd',\n },\n {\n code: '6941',\n name: 'Izier',\n },\n {\n code: '6941',\n name: 'Tohogne',\n },\n {\n code: '6941',\n name: 'Villers-Sainte-Gertrude',\n },\n {\n code: '6950',\n name: 'Harsin',\n },\n {\n code: '6950',\n name: 'Nassogne',\n },\n {\n code: '6951',\n name: 'Bande',\n },\n {\n code: '6952',\n name: 'Grune',\n },\n {\n code: '6953',\n name: 'Ambly',\n },\n {\n code: '6953',\n name: 'Forrières',\n },\n {\n code: '6953',\n name: 'Lesterny',\n },\n {\n code: '6953',\n name: 'Masbourg',\n },\n {\n code: '6960',\n name: 'Dochamps',\n },\n {\n code: '6960',\n name: 'Grandmenil',\n nameNL: 'Grootmenil',\n nameFR: 'Grandmenil',\n },\n {\n code: '6960',\n name: 'Harre',\n },\n {\n code: '6960',\n name: 'Malempré',\n },\n {\n code: '6960',\n name: 'Manhay',\n },\n {\n code: '6960',\n name: 'Odeigne',\n },\n {\n code: '6960',\n name: 'Vaux-Chavanne',\n },\n {\n code: '6970',\n name: 'Tenneville',\n },\n {\n code: '6971',\n name: 'Champlon',\n },\n {\n code: '6972',\n name: 'Erneuville',\n },\n {\n code: '6980',\n name: 'Beausaint',\n },\n {\n code: '6980',\n name: 'La Roche-En-Ardenne',\n },\n {\n code: '6982',\n name: 'Samrée',\n },\n {\n code: '6983',\n name: 'Ortho',\n },\n {\n code: '6984',\n name: 'Hives',\n },\n {\n code: '6986',\n name: 'Halleux',\n },\n {\n code: '6987',\n name: 'Beffe',\n },\n {\n code: '6987',\n name: 'Hodister',\n },\n {\n code: '6987',\n name: 'Marcourt',\n },\n {\n code: '6987',\n name: 'Rendeux',\n },\n {\n code: '6990',\n name: 'Fronville',\n },\n {\n code: '6990',\n name: 'Hampteau',\n },\n {\n code: '6990',\n name: 'Hotton',\n },\n {\n code: '6990',\n name: 'Marenne',\n },\n {\n code: '6997',\n name: 'Amonines',\n },\n {\n code: '6997',\n name: 'Erezée',\n },\n {\n code: '6997',\n name: 'Mormont',\n },\n {\n code: '6997',\n name: 'Soy',\n },\n {\n code: '7000',\n name: 'Mons',\n nameNL: 'Mons',\n nameFR: 'Bergen',\n },\n {\n code: '7010',\n name: 'Shape',\n },\n {\n code: '7011',\n name: 'Ghlin',\n },\n {\n code: '7012',\n name: 'Flénu',\n },\n {\n code: '7012',\n name: 'Jemappes',\n },\n {\n code: '7020',\n name: 'Maisières',\n },\n {\n code: '7020',\n name: 'Nimy',\n },\n {\n code: '7021',\n name: 'Havre',\n },\n {\n code: '7022',\n name: 'Harmignies',\n },\n {\n code: '7022',\n name: 'Harveng',\n },\n {\n code: '7022',\n name: 'Hyon',\n },\n {\n code: '7022',\n name: 'Mesvin',\n },\n {\n code: '7022',\n name: 'Nouvelles',\n },\n {\n code: '7024',\n name: 'Ciply',\n },\n {\n code: '7030',\n name: 'Saint-Symphorien',\n },\n {\n code: '7031',\n name: 'Villers-Saint-Ghislain',\n },\n {\n code: '7032',\n name: 'Spiennes',\n },\n {\n code: '7033',\n name: 'Cuesmes',\n },\n {\n code: '7034',\n name: 'Obourg',\n },\n {\n code: '7034',\n name: 'Saint-Denis',\n },\n {\n code: '7040',\n name: 'Asquillies',\n },\n {\n code: '7040',\n name: 'Aulnois',\n },\n {\n code: '7040',\n name: 'Blaregnies',\n },\n {\n code: '7040',\n name: 'Bougnies',\n },\n {\n code: '7040',\n name: 'Genly',\n },\n {\n code: '7040',\n name: 'Goegnies-Chaussée',\n },\n {\n code: '7040',\n name: 'Quévy',\n },\n {\n code: '7040',\n name: 'Quévy-Le-Grand',\n nameNL: 'Quévy-le-Grand',\n nameFR: 'Groot-Quevy',\n },\n {\n code: '7040',\n name: 'Quévy-Le-Petit',\n },\n {\n code: '7041',\n name: 'Givry',\n },\n {\n code: '7041',\n name: 'Havay',\n },\n {\n code: '7050',\n name: 'Erbaut',\n },\n {\n code: '7050',\n name: 'Erbisoeul',\n },\n {\n code: '7050',\n name: 'Herchies',\n },\n {\n code: '7050',\n name: 'Jurbise',\n nameNL: 'Jurbise',\n nameFR: 'Jurbeke',\n },\n {\n code: '7050',\n name: 'Masnuy-Saint-Jean',\n },\n {\n code: '7050',\n name: 'Masnuy-Saint-Pierre',\n },\n {\n code: '7060',\n name: 'Horrues',\n },\n {\n code: '7060',\n name: 'Soignies',\n nameNL: 'Soignies',\n nameFR: 'Zinnik',\n },\n {\n code: '7061',\n name: 'Casteau',\n },\n {\n code: '7061',\n name: 'Thieusies',\n },\n {\n code: '7062',\n name: 'Naast',\n },\n {\n code: '7063',\n name: 'Chaussée-Notre-Dame-Louvignies',\n },\n {\n code: '7063',\n name: 'Neufvilles',\n },\n {\n code: '7070',\n name: 'Gottignies',\n },\n {\n code: '7070',\n name: 'Le Roeulx',\n },\n {\n code: '7070',\n name: 'Mignault',\n },\n {\n code: '7070',\n name: 'Thieu',\n },\n {\n code: '7070',\n name: 'Ville-Sur-Haine',\n },\n {\n code: '7080',\n name: 'Eugies',\n },\n {\n code: '7080',\n name: 'Frameries',\n },\n {\n code: '7080',\n name: 'La Bouverie',\n },\n {\n code: '7080',\n name: 'Noirchain',\n },\n {\n code: '7080',\n name: 'Sars-La-Bruyère',\n },\n {\n code: '7090',\n name: 'Braine-Le-Comte',\n nameNL: 'Braine-le-Comte',\n nameFR: \"Gravenbrakel ('s--)\",\n },\n {\n code: '7090',\n name: 'Hennuyères',\n },\n {\n code: '7090',\n name: 'Henripont',\n },\n {\n code: '7090',\n name: 'Petit-Roeulx-Lez-Braine',\n },\n {\n code: '7090',\n name: 'Ronquières',\n },\n {\n code: '7090',\n name: 'Steenkerque',\n nameNL: 'Steenkerque',\n nameFR: 'Steenkerke',\n },\n {\n code: '7100',\n name: 'Haine-Saint-Paul',\n },\n {\n code: '7100',\n name: 'Haine-Saint-Pierre',\n },\n {\n code: '7100',\n name: 'La Louvière',\n },\n {\n code: '7100',\n name: 'Saint-Vaast',\n },\n {\n code: '7100',\n name: 'Trivières',\n },\n {\n code: '7110',\n name: 'Boussoit',\n },\n {\n code: '7110',\n name: 'Houdeng-Aimeries',\n },\n {\n code: '7110',\n name: 'Houdeng-Goegnies',\n },\n {\n code: '7110',\n name: 'Maurage',\n },\n {\n code: '7110',\n name: 'Strépy-Bracquegnies',\n },\n {\n code: '7120',\n name: 'Croix-Lez-Rouveroy',\n },\n {\n code: '7120',\n name: 'Estinnes',\n },\n {\n code: '7120',\n name: 'Estinnes-Au-Mont',\n },\n {\n code: '7120',\n name: 'Estinnes-Au-Val',\n },\n {\n code: '7120',\n name: 'Fauroeulx',\n },\n {\n code: '7120',\n name: 'Haulchin',\n },\n {\n code: '7120',\n name: 'Peissant',\n },\n {\n code: '7120',\n name: 'Rouveroy',\n },\n {\n code: '7120',\n name: 'Vellereille-Le-Sec',\n },\n {\n code: '7120',\n name: 'Vellereille-Les-Brayeux',\n },\n {\n code: '7130',\n name: 'Battignies',\n },\n {\n code: '7130',\n name: 'Binche',\n nameNL: 'Binche',\n nameFR: 'Bing',\n },\n {\n code: '7130',\n name: 'Bray',\n },\n {\n code: '7131',\n name: 'Waudrez',\n },\n {\n code: '7133',\n name: 'Buvrinnes',\n },\n {\n code: '7134',\n name: 'Epinois',\n },\n {\n code: '7134',\n name: 'Leval-Trahegnies',\n },\n {\n code: '7134',\n name: 'Péronnes-Lez-Binche',\n },\n {\n code: '7134',\n name: 'Ressaix',\n },\n {\n code: '7140',\n name: 'Morlanwelz',\n },\n {\n code: '7140',\n name: 'Morlanwelz-Mariemont',\n },\n {\n code: '7141',\n name: 'Carnières',\n },\n {\n code: '7141',\n name: 'Mont-Sainte-Aldegonde',\n },\n {\n code: '7160',\n name: 'Chapelle-Lez-Herlaimont',\n },\n {\n code: '7160',\n name: 'Godarville',\n },\n {\n code: '7160',\n name: 'Piéton',\n },\n {\n code: '7170',\n name: 'Bellecourt',\n },\n {\n code: '7170',\n name: \"Bois-D'Haine\",\n },\n {\n code: '7170',\n name: 'Fayt-Lez-Manage',\n },\n {\n code: '7170',\n name: 'La Hestre',\n },\n {\n code: '7170',\n name: 'Manage',\n },\n {\n code: '7180',\n name: 'Seneffe',\n },\n {\n code: '7181',\n name: 'Arquennes',\n },\n {\n code: '7181',\n name: 'Familleureux',\n },\n {\n code: '7181',\n name: 'Feluy',\n },\n {\n code: '7181',\n name: 'Petit-Roeulx-Lez-Nivelles',\n },\n {\n code: '7190',\n name: 'Ecaussinnes',\n },\n {\n code: '7190',\n name: \"Ecaussinnes-D'Enghien\",\n },\n {\n code: '7190',\n name: 'Marche-Lez-Ecaussinnes',\n },\n {\n code: '7191',\n name: 'Ecaussinnes-Lalaing',\n },\n {\n code: '7300',\n name: 'Boussu',\n },\n {\n code: '7301',\n name: 'Hornu',\n },\n {\n code: '7320',\n name: 'Bernissart',\n },\n {\n code: '7321',\n name: 'Blaton',\n },\n {\n code: '7321',\n name: 'Harchies',\n },\n {\n code: '7322',\n name: 'Pommeroeul',\n },\n {\n code: '7322',\n name: 'Ville-Pommeroeul',\n },\n {\n code: '7330',\n name: 'Saint-Ghislain',\n },\n {\n code: '7331',\n name: 'Baudour',\n },\n {\n code: '7332',\n name: 'Neufmaison',\n },\n {\n code: '7332',\n name: 'Sirault',\n },\n {\n code: '7333',\n name: 'Tertre',\n },\n {\n code: '7334',\n name: 'Hautrage',\n },\n {\n code: '7334',\n name: 'Villerot',\n },\n {\n code: '7340',\n name: 'Colfontaine',\n },\n {\n code: '7340',\n name: 'Paturages',\n },\n {\n code: '7340',\n name: 'Warquignies',\n },\n {\n code: '7340',\n name: 'Wasmes',\n },\n {\n code: '7350',\n name: 'Hainin',\n },\n {\n code: '7350',\n name: 'Hensies',\n },\n {\n code: '7350',\n name: 'Montroeul-Sur-Haine',\n },\n {\n code: '7350',\n name: 'Thulin',\n },\n {\n code: '7370',\n name: 'Blaugies',\n },\n {\n code: '7370',\n name: 'Dour',\n },\n {\n code: '7370',\n name: 'Elouges',\n },\n {\n code: '7370',\n name: 'Wihéries',\n },\n {\n code: '7380',\n name: 'Baisieux',\n },\n {\n code: '7380',\n name: 'Quiévrain',\n },\n {\n code: '7382',\n name: 'Audregnies',\n },\n {\n code: '7387',\n name: 'Angre',\n },\n {\n code: '7387',\n name: 'Angreau',\n },\n {\n code: '7387',\n name: 'Athis',\n },\n {\n code: '7387',\n name: 'Autreppe',\n },\n {\n code: '7387',\n name: 'Erquennes',\n },\n {\n code: '7387',\n name: 'Fayt-Le-Franc',\n },\n {\n code: '7387',\n name: 'Honnelles',\n },\n {\n code: '7387',\n name: 'Marchipont',\n },\n {\n code: '7387',\n name: 'Montignies-Sur-Roc',\n },\n {\n code: '7387',\n name: 'Onnezies',\n },\n {\n code: '7387',\n name: 'Roisin',\n },\n {\n code: '7390',\n name: 'Quaregnon',\n },\n {\n code: '7390',\n name: 'Wasmuel',\n },\n {\n code: '7500',\n name: 'Ere',\n },\n {\n code: '7500',\n name: 'Saint-Maur',\n },\n {\n code: '7500',\n name: 'Tournai',\n nameNL: 'Tournai',\n nameFR: 'Doornik',\n },\n {\n code: '7501',\n name: 'Orcq',\n },\n {\n code: '7502',\n name: 'Esplechin',\n },\n {\n code: '7503',\n name: 'Froyennes',\n },\n {\n code: '7504',\n name: 'Froidmont',\n },\n {\n code: '7506',\n name: 'Willemeau',\n },\n {\n code: '7510',\n name: '3 Suisses',\n },\n {\n code: '7511',\n name: 'Vitrine Magique',\n },\n {\n code: '7512',\n name: 'Yves Rocher',\n },\n {\n code: '7513',\n name: 'Yves Rocher',\n },\n {\n code: '7520',\n name: 'Ramegnies-Chin',\n },\n {\n code: '7520',\n name: 'Templeuve',\n },\n {\n code: '7521',\n name: 'Chercq',\n },\n {\n code: '7522',\n name: 'Blandain',\n },\n {\n code: '7522',\n name: 'Hertain',\n },\n {\n code: '7522',\n name: 'Lamain',\n },\n {\n code: '7522',\n name: 'Marquain',\n },\n {\n code: '7530',\n name: 'Gaurain-Ramecroix',\n },\n {\n code: '7531',\n name: 'Havinnes',\n },\n {\n code: '7532',\n name: 'Beclers',\n },\n {\n code: '7533',\n name: 'Thimougies',\n },\n {\n code: '7534',\n name: 'Barry',\n },\n {\n code: '7534',\n name: 'Maulde',\n },\n {\n code: '7536',\n name: 'Vaulx',\n },\n {\n code: '7538',\n name: 'Vezon',\n },\n {\n code: '7540',\n name: 'Kain',\n },\n {\n code: '7540',\n name: 'Melles',\n },\n {\n code: '7540',\n name: 'Quartes',\n },\n {\n code: '7540',\n name: 'Rumillies',\n },\n {\n code: '7542',\n name: 'Mont-Saint-Aubert',\n },\n {\n code: '7543',\n name: 'Mourcourt',\n },\n {\n code: '7548',\n name: 'Warchin',\n },\n {\n code: '7600',\n name: 'Péruwelz',\n },\n {\n code: '7601',\n name: 'Roucourt',\n },\n {\n code: '7602',\n name: 'Bury',\n },\n {\n code: '7603',\n name: 'Bon-Secours',\n },\n {\n code: '7604',\n name: 'Baugnies',\n },\n {\n code: '7604',\n name: 'Braffe',\n },\n {\n code: '7604',\n name: 'Brasmenil',\n },\n {\n code: '7604',\n name: 'Callenelle',\n },\n {\n code: '7604',\n name: 'Wasmes-Audemez-Briffoeil',\n },\n {\n code: '7608',\n name: 'Wiers',\n },\n {\n code: '7610',\n name: 'Rumes',\n },\n {\n code: '7611',\n name: 'La Glanerie',\n },\n {\n code: '7618',\n name: 'Taintignies',\n },\n {\n code: '7620',\n name: 'Bléharies',\n },\n {\n code: '7620',\n name: 'Brunehaut',\n },\n {\n code: '7620',\n name: 'Guignies',\n },\n {\n code: '7620',\n name: 'Hollain',\n },\n {\n code: '7620',\n name: 'Jollain-Merlin',\n },\n {\n code: '7620',\n name: 'Wez-Velvain',\n },\n {\n code: '7621',\n name: 'Lesdain',\n },\n {\n code: '7622',\n name: 'Laplaigne',\n },\n {\n code: '7623',\n name: 'Rongy',\n },\n {\n code: '7624',\n name: 'Howardries',\n },\n {\n code: '7640',\n name: 'Antoing',\n },\n {\n code: '7640',\n name: 'Maubray',\n },\n {\n code: '7640',\n name: 'Péronnes-Lez-Antoing',\n },\n {\n code: '7641',\n name: 'Bruyelle',\n nameNL: 'Bruyelle',\n nameFR: 'Briel',\n },\n {\n code: '7642',\n name: 'Calonne',\n },\n {\n code: '7643',\n name: 'Fontenoy',\n },\n {\n code: '7700',\n name: 'Luingne',\n },\n {\n code: '7700',\n name: 'Moeskroen',\n },\n {\n code: '7711',\n name: 'Dottenijs',\n },\n {\n code: '7712',\n name: 'Herseaux',\n nameNL: 'Herseaux',\n nameFR: 'Herseeuw',\n },\n {\n code: '7730',\n name: 'Bailleul',\n },\n {\n code: '7730',\n name: 'Estaimbourg',\n },\n {\n code: '7730',\n name: 'Estaimpuis',\n nameNL: 'Estaimpuis',\n nameFR: 'Steenput',\n },\n {\n code: '7730',\n name: 'Evregnies',\n },\n {\n code: '7730',\n name: 'Leers-Nord',\n },\n {\n code: '7730',\n name: 'Néchin',\n },\n {\n code: '7730',\n name: 'Saint-Léger',\n },\n {\n code: '7740',\n name: 'Pecq',\n },\n {\n code: '7740',\n name: 'Warcoing',\n },\n {\n code: '7742',\n name: 'Hérinnes-Lez-Pecq',\n },\n {\n code: '7743',\n name: 'Esquelmes',\n },\n {\n code: '7743',\n name: 'Obigies',\n },\n {\n code: '7750',\n name: 'Amougies',\n nameNL: 'Amougies',\n nameFR: 'Amengijs',\n },\n {\n code: '7750',\n name: 'Anseroeul',\n },\n {\n code: '7750',\n name: \"Mont-De-L'Enclus\",\n nameNL: \"Mont-de-l'Enclus\",\n nameFR: \"Mont-de-l'Enclus\",\n },\n {\n code: '7750',\n name: 'Orroir',\n },\n {\n code: '7750',\n name: 'Russeignies',\n nameNL: 'Russeignies',\n nameFR: 'Rozenaken',\n },\n {\n code: '7760',\n name: 'Celles',\n },\n {\n code: '7760',\n name: 'Escanaffles',\n nameNL: 'Escanaffles',\n nameFR: 'Schalafie',\n },\n {\n code: '7760',\n name: 'Molenbaix',\n },\n {\n code: '7760',\n name: 'Popuelles',\n },\n {\n code: '7760',\n name: 'Pottes',\n },\n {\n code: '7760',\n name: 'Velaines',\n },\n {\n code: '7780',\n name: 'Komen',\n },\n {\n code: '7780',\n name: 'Komen-Waasten',\n },\n {\n code: '7781',\n name: 'Houthem',\n },\n {\n code: '7782',\n name: 'Ploegsteert',\n },\n {\n code: '7783',\n name: 'Bizet',\n },\n {\n code: '7784',\n name: 'Neerwaasten',\n },\n {\n code: '7784',\n name: 'Waasten',\n },\n {\n code: '7800',\n name: 'Ath',\n nameNL: 'Ath',\n nameFR: 'Aat',\n },\n {\n code: '7800',\n name: 'Lanquesaint',\n },\n {\n code: '7801',\n name: 'Irchonwelz',\n },\n {\n code: '7802',\n name: 'Ormeignies',\n },\n {\n code: '7803',\n name: 'Bouvignies',\n },\n {\n code: '7804',\n name: 'Ostiches',\n },\n {\n code: '7804',\n name: 'Rebaix',\n },\n {\n code: '7810',\n name: 'Maffle',\n },\n {\n code: '7811',\n name: 'Arbre',\n },\n {\n code: '7812',\n name: 'Houtaing',\n },\n {\n code: '7812',\n name: 'Ligne',\n },\n {\n code: '7812',\n name: 'Mainvault',\n },\n {\n code: '7812',\n name: 'Moulbaix',\n },\n {\n code: '7812',\n name: 'Villers-Notre-Dame',\n },\n {\n code: '7812',\n name: 'Villers-Saint-Amand',\n },\n {\n code: '7822',\n name: 'Ghislenghien',\n nameNL: 'Ghislenghien',\n nameFR: 'Gellingen',\n },\n {\n code: '7822',\n name: 'Isières',\n },\n {\n code: '7822',\n name: \"Meslin-L'Evêque\",\n },\n {\n code: '7823',\n name: 'Gibecq',\n },\n {\n code: '7830',\n name: 'Bassilly',\n nameNL: 'Bassilly',\n nameFR: 'Zullik',\n },\n {\n code: '7830',\n name: 'Fouleng',\n },\n {\n code: '7830',\n name: 'Gondregnies',\n },\n {\n code: '7830',\n name: 'Graty',\n },\n {\n code: '7830',\n name: 'Hellebecq',\n },\n {\n code: '7830',\n name: 'Hoves',\n nameNL: 'Hoves',\n nameFR: 'Hove',\n },\n {\n code: '7830',\n name: 'Silly',\n nameNL: 'Silly',\n nameFR: 'Opzullik',\n },\n {\n code: '7830',\n name: 'Thoricourt',\n },\n {\n code: '7850',\n name: 'Edingen',\n },\n {\n code: '7850',\n name: 'Lettelingen',\n },\n {\n code: '7850',\n name: 'Mark',\n },\n {\n code: '7860',\n name: 'Lessines',\n },\n {\n code: '7861',\n name: 'Papignies',\n nameNL: 'Papignies',\n nameFR: 'Papegem',\n },\n {\n code: '7861',\n name: 'Wannebecq',\n },\n {\n code: '7862',\n name: 'Ogy',\n },\n {\n code: '7863',\n name: 'Ghoy',\n },\n {\n code: '7864',\n name: 'Deux-Acren',\n },\n {\n code: '7866',\n name: 'Bois-De-Lessines',\n nameNL: 'Bois-de-Lessines',\n nameFR: 'Lessenbos',\n },\n {\n code: '7866',\n name: 'Ollignies',\n nameNL: 'Ollignies',\n nameFR: 'Woelingen',\n },\n {\n code: '7870',\n name: 'Bauffe',\n },\n {\n code: '7870',\n name: 'Cambron-Saint-Vincent',\n },\n {\n code: '7870',\n name: 'Lens',\n },\n {\n code: '7870',\n name: 'Lombise',\n },\n {\n code: '7870',\n name: 'Montignies-Lez-Lens',\n },\n {\n code: '7880',\n name: 'Vloesberg',\n },\n {\n code: '7890',\n name: 'Ellezelles',\n nameNL: 'Ellezelles',\n nameFR: 'Elzele',\n },\n {\n code: '7890',\n name: 'Lahamaide',\n },\n {\n code: '7890',\n name: 'Wodecq',\n },\n {\n code: '7900',\n name: 'Grandmetz',\n },\n {\n code: '7900',\n name: 'Leuze-En-Hainaut',\n },\n {\n code: '7901',\n name: 'Thieulain',\n },\n {\n code: '7903',\n name: 'Blicquy',\n },\n {\n code: '7903',\n name: 'Chapelle-À-Oie',\n },\n {\n code: '7903',\n name: 'Chapelle-À-Wattines',\n },\n {\n code: '7904',\n name: 'Pipaix',\n },\n {\n code: '7904',\n name: 'Tourpes',\n },\n {\n code: '7904',\n name: 'Willaupuis',\n },\n {\n code: '7906',\n name: 'Gallaix',\n },\n {\n code: '7910',\n name: 'Anvaing',\n },\n {\n code: '7910',\n name: 'Arc-Ainières',\n },\n {\n code: '7910',\n name: 'Arc-Wattripont',\n },\n {\n code: '7910',\n name: 'Cordes',\n },\n {\n code: '7910',\n name: 'Ellignies-Lez-Frasnes',\n },\n {\n code: '7910',\n name: 'Forest',\n },\n {\n code: '7910',\n name: 'Frasnes-Lez-Anvaing',\n },\n {\n code: '7910',\n name: 'Wattripont',\n },\n {\n code: '7911',\n name: 'Buissenal',\n },\n {\n code: '7911',\n name: 'Frasnes-Lez-Buissenal',\n },\n {\n code: '7911',\n name: 'Hacquegnies',\n },\n {\n code: '7911',\n name: 'Herquegies',\n },\n {\n code: '7911',\n name: 'Montroeul-Au-Bois',\n },\n {\n code: '7911',\n name: 'Moustier',\n },\n {\n code: '7911',\n name: 'Oeudeghien',\n },\n {\n code: '7912',\n name: 'Dergneau',\n },\n {\n code: '7912',\n name: 'Saint-Sauveur',\n },\n {\n code: '7940',\n name: 'Brugelette',\n },\n {\n code: '7940',\n name: 'Cambron-Casteau',\n },\n {\n code: '7941',\n name: 'Attre',\n },\n {\n code: '7942',\n name: 'Mévergnies-Lez-Lens',\n },\n {\n code: '7943',\n name: 'Gages',\n },\n {\n code: '7950',\n name: 'Chièvres',\n },\n {\n code: '7950',\n name: 'Grosage',\n },\n {\n code: '7950',\n name: 'Huissignies',\n },\n {\n code: '7950',\n name: 'Ladeuze',\n },\n {\n code: '7950',\n name: 'Tongre-Saint-Martin',\n },\n {\n code: '7951',\n name: 'Tongre-Notre-Dame',\n nameNL: 'Tongre-Notre-Dame',\n nameFR: 'Onze Lieve Vrouw-Tongeren',\n },\n {\n code: '7970',\n name: 'Beloeil',\n },\n {\n code: '7971',\n name: 'Basècles',\n },\n {\n code: '7971',\n name: 'Ramegnies',\n },\n {\n code: '7971',\n name: 'Thumaide',\n },\n {\n code: '7971',\n name: 'Wadelincourt',\n },\n {\n code: '7972',\n name: 'Aubechies',\n },\n {\n code: '7972',\n name: 'Ellignies-Saint-Anne',\n },\n {\n code: '7972',\n name: 'Quevaucamps',\n },\n {\n code: '7973',\n name: 'Grandglise',\n },\n {\n code: '7973',\n name: 'Stambruges',\n },\n {\n code: '8000',\n name: 'Brugge',\n nameNL: 'Brugge',\n nameFR: 'Bruges',\n },\n {\n code: '8000',\n name: 'Koolkerke',\n },\n {\n code: '8020',\n name: 'Hertsberge',\n },\n {\n code: '8020',\n name: 'Oostkamp',\n },\n {\n code: '8020',\n name: 'Ruddervoorde',\n },\n {\n code: '8020',\n name: 'Waardamme',\n },\n {\n code: '8200',\n name: 'Sint-Andries',\n nameNL: 'Sint-Andries',\n nameFR: 'Saint-André',\n },\n {\n code: '8200',\n name: 'Sint-Michiels',\n nameNL: 'Sint-Michiels',\n nameFR: 'Saint-Michel',\n },\n {\n code: '8210',\n name: 'Loppem',\n },\n {\n code: '8210',\n name: 'Veldegem',\n },\n {\n code: '8210',\n name: 'Zedelgem',\n },\n {\n code: '8211',\n name: 'Aartrijke',\n },\n {\n code: '8300',\n name: 'Knokke',\n },\n {\n code: '8300',\n name: 'Knokke-Heist',\n },\n {\n code: '8300',\n name: 'Westkapelle',\n },\n {\n code: '8301',\n name: 'Heist-Aan-Zee',\n },\n {\n code: '8301',\n name: 'Ramskapelle',\n },\n {\n code: '8310',\n name: 'Assebroek',\n },\n {\n code: '8310',\n name: 'Sint-Kruis',\n nameNL: 'Sint-Kruis',\n nameFR: 'Sainte-Croix',\n },\n {\n code: '8340',\n name: 'Damme',\n },\n {\n code: '8340',\n name: 'Hoeke',\n nameNL: 'Hoeke',\n nameFR: 'Houcke',\n },\n {\n code: '8340',\n name: 'Lapscheure',\n },\n {\n code: '8340',\n name: 'Moerkerke',\n },\n {\n code: '8340',\n name: 'Oostkerke',\n },\n {\n code: '8340',\n name: 'Sijsele',\n },\n {\n code: '8370',\n name: 'Blankenberge',\n },\n {\n code: '8370',\n name: 'Uitkerke',\n },\n {\n code: '8377',\n name: 'Houtave',\n },\n {\n code: '8377',\n name: 'Meetkerke',\n },\n {\n code: '8377',\n name: 'Nieuwmunster',\n },\n {\n code: '8377',\n name: 'Zuienkerke',\n },\n {\n code: '8380',\n name: 'Dudzele',\n },\n {\n code: '8380',\n name: 'Lissewege',\n },\n {\n code: '8380',\n name: 'Zeebrugge',\n },\n {\n code: '8400',\n name: 'Oostende',\n nameNL: 'Oostende',\n nameFR: 'Ostende',\n },\n {\n code: '8400',\n name: 'Stene',\n },\n {\n code: '8400',\n name: 'Zandvoorde',\n },\n {\n code: '8420',\n name: 'De Haan',\n nameNL: 'De Haan',\n nameFR: 'Le Coq',\n },\n {\n code: '8420',\n name: 'Klemskerke',\n },\n {\n code: '8420',\n name: 'Wenduine',\n },\n {\n code: '8421',\n name: 'Vlissegem',\n },\n {\n code: '8430',\n name: 'Middelkerke',\n },\n {\n code: '8431',\n name: 'Wilskerke',\n },\n {\n code: '8432',\n name: 'Leffinge',\n },\n {\n code: '8433',\n name: 'Mannekensvere',\n },\n {\n code: '8433',\n name: 'Schore',\n },\n {\n code: '8433',\n name: 'Sint-Pieters-Kapelle',\n },\n {\n code: '8433',\n name: 'Slijpe',\n },\n {\n code: '8434',\n name: 'Lombardsijde',\n },\n {\n code: '8434',\n name: 'Westende',\n },\n {\n code: '8450',\n name: 'Bredene',\n },\n {\n code: '8460',\n name: 'Ettelgem',\n },\n {\n code: '8460',\n name: 'Oudenburg',\n },\n {\n code: '8460',\n name: 'Roksem',\n },\n {\n code: '8460',\n name: 'Westkerke',\n },\n {\n code: '8470',\n name: 'Gistel',\n nameNL: 'Gistel',\n nameFR: 'Ghistelles',\n },\n {\n code: '8470',\n name: 'Moere',\n },\n {\n code: '8470',\n name: 'Snaaskerke',\n },\n {\n code: '8470',\n name: 'Zevekote',\n },\n {\n code: '8480',\n name: 'Bekegem',\n },\n {\n code: '8480',\n name: 'Eernegem',\n },\n {\n code: '8480',\n name: 'Ichtegem',\n },\n {\n code: '8490',\n name: 'Jabbeke',\n },\n {\n code: '8490',\n name: 'Snellegem',\n },\n {\n code: '8490',\n name: 'Stalhille',\n },\n {\n code: '8490',\n name: 'Varsenare',\n },\n {\n code: '8490',\n name: 'Zerkegem',\n },\n {\n code: '8500',\n name: 'Kortrijk',\n nameNL: 'Kortrijk',\n nameFR: 'Courtrai',\n },\n {\n code: '8501',\n name: 'Bissegem',\n },\n {\n code: '8501',\n name: 'Heule',\n },\n {\n code: '8510',\n name: 'Bellegem',\n },\n {\n code: '8510',\n name: 'Kooigem',\n },\n {\n code: '8510',\n name: 'Marke',\n },\n {\n code: '8510',\n name: 'Rollegem',\n },\n {\n code: '8511',\n name: 'Aalbeke',\n },\n {\n code: '8520',\n name: 'Kuurne',\n },\n {\n code: '8530',\n name: 'Harelbeke',\n nameNL: 'Harelbeke',\n nameFR: 'Harlebeke',\n },\n {\n code: '8531',\n name: 'Bavikhove',\n },\n {\n code: '8531',\n name: 'Hulste',\n },\n {\n code: '8540',\n name: 'Deerlijk',\n },\n {\n code: '8550',\n name: 'Zwevegem',\n },\n {\n code: '8551',\n name: 'Heestert',\n },\n {\n code: '8552',\n name: 'Moen',\n },\n {\n code: '8553',\n name: 'Otegem',\n },\n {\n code: '8554',\n name: 'Sint-Denijs',\n },\n {\n code: '8560',\n name: 'Gullegem',\n },\n {\n code: '8560',\n name: 'Moorsele',\n },\n {\n code: '8560',\n name: 'Wevelgem',\n },\n {\n code: '8570',\n name: 'Anzegem',\n },\n {\n code: '8570',\n name: 'Gijzelbrechtegem',\n },\n {\n code: '8570',\n name: 'Ingooigem',\n },\n {\n code: '8570',\n name: 'Vichte',\n },\n {\n code: '8572',\n name: 'Kaster',\n },\n {\n code: '8573',\n name: 'Tiegem',\n },\n {\n code: '8580',\n name: 'Avelgem',\n },\n {\n code: '8581',\n name: 'Kerkhove',\n },\n {\n code: '8581',\n name: 'Waarmaarde',\n },\n {\n code: '8582',\n name: 'Outrijve',\n nameNL: 'Outrijve',\n nameFR: 'Autrijve',\n },\n {\n code: '8583',\n name: 'Bossuit',\n },\n {\n code: '8587',\n name: 'Helkijn',\n },\n {\n code: '8587',\n name: 'Spiere',\n nameNL: 'Spiere',\n nameFR: 'Espierres',\n },\n {\n code: '8587',\n name: 'Spiere-Helkijn',\n nameNL: 'Spiere-Helkijn',\n nameFR: 'Espierres-Helchin',\n },\n {\n code: '8600',\n name: 'Beerst',\n },\n {\n code: '8600',\n name: 'Diksmuide',\n nameNL: 'Diksmuide',\n nameFR: 'Dixmude',\n },\n {\n code: '8600',\n name: 'Driekapellen',\n },\n {\n code: '8600',\n name: 'Esen',\n nameNL: 'Esen',\n nameFR: 'Eessen',\n },\n {\n code: '8600',\n name: 'Kaaskerke',\n },\n {\n code: '8600',\n name: 'Keiem',\n },\n {\n code: '8600',\n name: 'Lampernisse',\n },\n {\n code: '8600',\n name: 'Leke',\n },\n {\n code: '8600',\n name: 'Nieuwkapelle',\n nameNL: 'Nieuwkapelle',\n nameFR: 'Nieucapelle',\n },\n {\n code: '8600',\n name: 'Oostkerke',\n },\n {\n code: '8600',\n name: 'Oudekapelle',\n },\n {\n code: '8600',\n name: 'Pervijze',\n },\n {\n code: '8600',\n name: 'Sint-Jacobs-Kapelle',\n nameNL: 'Sint-Jacobs-Kapelle',\n nameFR: 'Saint-Jacques-Capelle',\n },\n {\n code: '8600',\n name: 'Stuivekenskerke',\n },\n {\n code: '8600',\n name: 'Vladslo',\n },\n {\n code: '8600',\n name: 'Woumen',\n },\n {\n code: '8610',\n name: 'Handzame',\n },\n {\n code: '8610',\n name: 'Kortemark',\n },\n {\n code: '8610',\n name: 'Werken',\n },\n {\n code: '8610',\n name: 'Zarren',\n },\n {\n code: '8620',\n name: 'Nieuwpoort',\n nameNL: 'Nieuwpoort',\n nameFR: 'Nieuport',\n },\n {\n code: '8620',\n name: 'Ramskapelle',\n },\n {\n code: '8620',\n name: 'Sint-Joris',\n nameNL: 'Sint-Joris',\n nameFR: 'Saint-Georges',\n },\n {\n code: '8630',\n name: 'Avekapelle',\n nameNL: 'Avekapelle',\n nameFR: 'Avecappelle',\n },\n {\n code: '8630',\n name: 'Booitshoeke',\n },\n {\n code: '8630',\n name: 'Bulskamp',\n },\n {\n code: '8630',\n name: 'De Moeren',\n },\n {\n code: '8630',\n name: 'Eggewaartskapelle',\n },\n {\n code: '8630',\n name: 'Houtem',\n },\n {\n code: '8630',\n name: 'Steenkerke',\n },\n {\n code: '8630',\n name: 'Veurne',\n nameNL: 'Veurne',\n nameFR: 'Furnes',\n },\n {\n code: '8630',\n name: 'Vinkem',\n },\n {\n code: '8630',\n name: 'Wulveringem',\n },\n {\n code: '8630',\n name: 'Zoutenaaie',\n },\n {\n code: '8640',\n name: 'Oostvleteren',\n },\n {\n code: '8640',\n name: 'Vleteren',\n },\n {\n code: '8640',\n name: 'Westvleteren',\n },\n {\n code: '8640',\n name: 'Woesten',\n },\n {\n code: '8647',\n name: 'Lo',\n },\n {\n code: '8647',\n name: 'Lo-Reninge',\n },\n {\n code: '8647',\n name: 'Noordschote',\n },\n {\n code: '8647',\n name: 'Pollinkhove',\n },\n {\n code: '8647',\n name: 'Reninge',\n },\n {\n code: '8650',\n name: 'Houthulst',\n },\n {\n code: '8650',\n name: 'Klerken',\n },\n {\n code: '8650',\n name: 'Merkem',\n },\n {\n code: '8660',\n name: 'Adinkerke',\n },\n {\n code: '8660',\n name: 'De Panne',\n nameNL: 'De Panne',\n nameFR: 'La Panne',\n },\n {\n code: '8670',\n name: 'Koksijde',\n },\n {\n code: '8670',\n name: 'Oostduinkerke',\n },\n {\n code: '8670',\n name: 'Wulpen',\n },\n {\n code: '8680',\n name: 'Bovekerke',\n },\n {\n code: '8680',\n name: 'Koekelare',\n },\n {\n code: '8680',\n name: 'Zande',\n },\n {\n code: '8690',\n name: 'Alveringem',\n },\n {\n code: '8690',\n name: 'Hoogstade',\n },\n {\n code: '8690',\n name: 'Oeren',\n },\n {\n code: '8690',\n name: 'Sint-Rijkers',\n nameNL: 'Sint-Rijkers',\n nameFR: 'Saint-Riquier',\n },\n {\n code: '8691',\n name: 'Beveren-Aan-De-Ijzer',\n },\n {\n code: '8691',\n name: 'Gijverinkhove',\n },\n {\n code: '8691',\n name: 'Izenberge',\n },\n {\n code: '8691',\n name: 'Leisele',\n },\n {\n code: '8691',\n name: 'Stavele',\n },\n {\n code: '8700',\n name: 'Aarsele',\n },\n {\n code: '8700',\n name: 'Kanegem',\n },\n {\n code: '8700',\n name: 'Schuiferskapelle',\n },\n {\n code: '8700',\n name: 'Tielt',\n },\n {\n code: '8710',\n name: 'Ooigem',\n },\n {\n code: '8710',\n name: 'Sint-Baafs-Vijve',\n nameNL: 'Sint-Baafs-Vijve',\n nameFR: 'Vive-Saint-Bavon',\n },\n {\n code: '8710',\n name: 'Wielsbeke',\n },\n {\n code: '8720',\n name: 'Dentergem',\n },\n {\n code: '8720',\n name: 'Markegem',\n },\n {\n code: '8720',\n name: 'Oeselgem',\n },\n {\n code: '8720',\n name: 'Wakken',\n },\n {\n code: '8730',\n name: 'Beernem',\n },\n {\n code: '8730',\n name: 'Oedelem',\n },\n {\n code: '8730',\n name: 'Sint-Joris',\n },\n {\n code: '8740',\n name: 'Egem',\n },\n {\n code: '8740',\n name: 'Pittem',\n },\n {\n code: '8750',\n name: 'Wingene',\n },\n {\n code: '8750',\n name: 'Zwevezele',\n },\n {\n code: '8755',\n name: 'Wingene',\n },\n {\n code: '8760',\n name: 'Tielt',\n },\n {\n code: '8770',\n name: 'Ingelmunster',\n },\n {\n code: '8780',\n name: 'Oostrozebeke',\n },\n {\n code: '8790',\n name: 'Waregem',\n },\n {\n code: '8791',\n name: 'Beveren',\n },\n {\n code: '8792',\n name: 'Desselgem',\n },\n {\n code: '8793',\n name: 'Sint-Eloois-Vijve',\n nameNL: 'Sint-Eloois-Vijve',\n nameFR: 'Vive-Saint-Eloi',\n },\n {\n code: '8800',\n name: 'Beveren',\n },\n {\n code: '8800',\n name: 'Oekene',\n },\n {\n code: '8800',\n name: 'Roeselare',\n nameNL: 'Roeselare',\n nameFR: 'Roulers',\n },\n {\n code: '8800',\n name: 'Rumbeke',\n },\n {\n code: '8810',\n name: 'Lichtervelde',\n },\n {\n code: '8820',\n name: 'Torhout',\n nameNL: 'Torhout',\n nameFR: 'Thourout',\n },\n {\n code: '8830',\n name: 'Gits',\n },\n {\n code: '8830',\n name: 'Hooglede',\n },\n {\n code: '8840',\n name: 'Oostnieuwkerke',\n },\n {\n code: '8840',\n name: 'Staden',\n },\n {\n code: '8840',\n name: 'Westrozebeke',\n },\n {\n code: '8850',\n name: 'Ardooie',\n },\n {\n code: '8851',\n name: 'Koolskamp',\n },\n {\n code: '8860',\n name: 'Lendelede',\n },\n {\n code: '8870',\n name: 'Emelgem',\n },\n {\n code: '8870',\n name: 'Izegem',\n },\n {\n code: '8870',\n name: 'Kachtem',\n },\n {\n code: '8880',\n name: 'Ledegem',\n },\n {\n code: '8880',\n name: 'Rollegem-Kapelle',\n },\n {\n code: '8880',\n name: 'Sint-Eloois-Winkel',\n nameNL: 'Sint-Eloois-Winkel',\n nameFR: 'Winckel-Saint-Eloi',\n },\n {\n code: '8890',\n name: 'Dadizele',\n },\n {\n code: '8890',\n name: 'Moorslede',\n },\n {\n code: '8900',\n name: 'Brielen',\n },\n {\n code: '8900',\n name: 'Dikkebus',\n },\n {\n code: '8900',\n name: 'Ieper',\n nameNL: 'Ieper',\n nameFR: 'Ypres',\n },\n {\n code: '8900',\n name: 'Sint-Jan',\n nameNL: 'Sint-Jan',\n nameFR: 'Saint-Jean',\n },\n {\n code: '8902',\n name: 'Hollebeke',\n },\n {\n code: '8902',\n name: 'Voormezele',\n },\n {\n code: '8902',\n name: 'Zillebeke',\n },\n {\n code: '8904',\n name: 'Boezinge',\n },\n {\n code: '8904',\n name: 'Zuidschote',\n },\n {\n code: '8906',\n name: 'Elverdinge',\n },\n {\n code: '8908',\n name: 'Vlamertinge',\n },\n {\n code: '8920',\n name: 'Bikschote',\n nameNL: 'Bikschote',\n nameFR: 'Bixcote',\n },\n {\n code: '8920',\n name: 'Langemark',\n },\n {\n code: '8920',\n name: 'Langemark-Poelkapelle',\n },\n {\n code: '8920',\n name: 'Poelkapelle',\n },\n {\n code: '8930',\n name: 'Lauwe',\n },\n {\n code: '8930',\n name: 'Menen',\n nameNL: 'Menen',\n nameFR: 'Menin',\n },\n {\n code: '8930',\n name: 'Rekkem',\n nameNL: 'Rekkem',\n nameFR: 'Recheim',\n },\n {\n code: '8940',\n name: 'Geluwe',\n },\n {\n code: '8940',\n name: 'Wervik',\n },\n {\n code: '8950',\n name: 'Heuvelland',\n },\n {\n code: '8950',\n name: 'Nieuwkerke',\n nameNL: 'Nieuwkerke',\n nameFR: 'Neuve-Eglise',\n },\n {\n code: '8951',\n name: 'Dranouter',\n },\n {\n code: '8952',\n name: 'Wulvergem',\n },\n {\n code: '8953',\n name: 'Wijtschate',\n },\n {\n code: '8954',\n name: 'Westouter',\n },\n {\n code: '8956',\n name: 'Kemmel',\n },\n {\n code: '8957',\n name: 'Mesen',\n nameNL: 'Mesen',\n nameFR: 'Messines',\n },\n {\n code: '8958',\n name: 'Loker',\n nameNL: 'Loker',\n nameFR: 'Locre',\n },\n {\n code: '8970',\n name: 'Poperinge',\n },\n {\n code: '8970',\n name: 'Reningelst',\n },\n {\n code: '8972',\n name: 'Krombeke',\n },\n {\n code: '8972',\n name: 'Proven',\n },\n {\n code: '8972',\n name: 'Roesbrugge-Haringe',\n },\n {\n code: '8978',\n name: 'Watou',\n },\n {\n code: '8980',\n name: 'Beselare',\n },\n {\n code: '8980',\n name: 'Geluveld',\n },\n {\n code: '8980',\n name: 'Passendale',\n },\n {\n code: '8980',\n name: 'Zandvoorde',\n },\n {\n code: '8980',\n name: 'Zonnebeke',\n },\n {\n code: '9000',\n name: 'Gent',\n nameNL: 'Gent',\n nameFR: 'Gand',\n },\n {\n code: '9030',\n name: 'Mariakerke',\n },\n {\n code: '9031',\n name: 'Drongen',\n nameNL: 'Drongen',\n nameFR: 'Tronchiennes',\n },\n {\n code: '9032',\n name: 'Wondelgem',\n },\n {\n code: '9040',\n name: 'Sint-Amandsberg',\n nameNL: 'Sint-Amandsberg',\n nameFR: 'Mont-Saint-Amand',\n },\n {\n code: '9041',\n name: 'Oostakker',\n },\n {\n code: '9042',\n name: 'Desteldonk',\n },\n {\n code: '9042',\n name: 'Mendonk',\n },\n {\n code: '9042',\n name: 'Sint-Kruis-Winkel',\n nameNL: 'Sint-Kruis-Winkel',\n nameFR: 'Winckel-Sainte-Croix',\n },\n {\n code: '9050',\n name: 'Gentbrugge',\n },\n {\n code: '9050',\n name: 'Ledeberg',\n },\n {\n code: '9051',\n name: 'Afsnee',\n },\n {\n code: '9051',\n name: 'Sint-Denijs-Westrem',\n nameNL: 'Sint-Denijs-Westrem',\n nameFR: 'Saint-Denis-Westrem',\n },\n {\n code: '9052',\n name: 'Zwijnaarde',\n },\n {\n code: '9060',\n name: 'Zelzate',\n },\n {\n code: '9070',\n name: 'Destelbergen',\n },\n {\n code: '9070',\n name: 'Heusden',\n },\n {\n code: '9075',\n name: 'CSM Gent X',\n },\n {\n code: '9080',\n name: 'Beervelde',\n },\n {\n code: '9080',\n name: 'Lochristi',\n },\n {\n code: '9080',\n name: 'Zaffelare',\n },\n {\n code: '9080',\n name: 'Zeveneken',\n },\n {\n code: '9090',\n name: 'Gontrode',\n },\n {\n code: '9090',\n name: 'Merelbeke-Melle',\n },\n {\n code: '9099',\n name: 'Gent X',\n },\n {\n code: '9100',\n name: 'Nieuwkerken-Waas',\n },\n {\n code: '9100',\n name: 'Sint-Niklaas',\n nameNL: 'Sint-Niklaas',\n nameFR: 'Saint-Nicolas',\n },\n {\n code: '9111',\n name: 'Belsele',\n },\n {\n code: '9112',\n name: 'Sinaai-Waas',\n },\n {\n code: '9120',\n name: 'Beveren-Kruibeke-Zwijndrecht',\n },\n {\n code: '9120',\n name: 'Haasdonk',\n },\n {\n code: '9120',\n name: 'Kallo',\n },\n {\n code: '9120',\n name: 'Melsele',\n },\n {\n code: '9120',\n name: 'Vrasene',\n },\n {\n code: '9130',\n name: 'Doel',\n },\n {\n code: '9130',\n name: 'Kallo',\n },\n {\n code: '9130',\n name: 'Kieldrecht',\n },\n {\n code: '9130',\n name: 'Verrebroek',\n },\n {\n code: '9140',\n name: 'Elversele',\n },\n {\n code: '9140',\n name: 'Steendorp',\n },\n {\n code: '9140',\n name: 'Temse',\n nameNL: 'Temse',\n nameFR: 'Tamise',\n },\n {\n code: '9140',\n name: 'Tielrode',\n },\n {\n code: '9150',\n name: 'Bazel',\n },\n {\n code: '9150',\n name: 'Beveren-Kruibeke-Zwijndrecht',\n },\n {\n code: '9150',\n name: 'Rupelmonde',\n },\n {\n code: '9160',\n name: 'Daknam',\n },\n {\n code: '9160',\n name: 'Eksaarde',\n },\n {\n code: '9160',\n name: 'Lokeren',\n },\n {\n code: '9170',\n name: 'De Klinge',\n },\n {\n code: '9170',\n name: 'Meerdonk',\n },\n {\n code: '9170',\n name: 'Sint-Gillis-Waas',\n nameNL: 'Sint-Gillis-Waas',\n nameFR: 'Saint-Gilles-Waes',\n },\n {\n code: '9170',\n name: 'Sint-Pauwels',\n nameNL: 'Sint-Pauwels',\n nameFR: 'Saint-Paul',\n },\n {\n code: '9180',\n name: 'Moerbeke-Waas',\n },\n {\n code: '9185',\n name: 'Lochristi',\n },\n {\n code: '9190',\n name: 'Kemzeke',\n },\n {\n code: '9190',\n name: 'Stekene',\n },\n {\n code: '9200',\n name: 'Appels',\n },\n {\n code: '9200',\n name: 'Baasrode',\n },\n {\n code: '9200',\n name: 'Dendermonde',\n },\n {\n code: '9200',\n name: 'Grembergen',\n },\n {\n code: '9200',\n name: 'Mespelare',\n },\n {\n code: '9200',\n name: 'Oudegem',\n },\n {\n code: '9200',\n name: 'Schoonaarde',\n },\n {\n code: '9200',\n name: 'Sint-Gillis-Dendermonde',\n },\n {\n code: '9220',\n name: 'Hamme',\n },\n {\n code: '9220',\n name: 'Moerzeke',\n },\n {\n code: '9230',\n name: 'Massemen',\n },\n {\n code: '9230',\n name: 'Westrem',\n },\n {\n code: '9230',\n name: 'Wetteren',\n },\n {\n code: '9240',\n name: 'Zele',\n },\n {\n code: '9250',\n name: 'Waasmunster',\n },\n {\n code: '9255',\n name: 'Buggenhout',\n },\n {\n code: '9255',\n name: 'Opdorp',\n },\n {\n code: '9260',\n name: 'Schellebelle',\n },\n {\n code: '9260',\n name: 'Serskamp',\n nameNL: 'Serskamp',\n nameFR: 'Cherskamp',\n },\n {\n code: '9260',\n name: 'Wichelen',\n },\n {\n code: '9270',\n name: 'Kalken',\n },\n {\n code: '9270',\n name: 'Laarne',\n },\n {\n code: '9280',\n name: 'Denderbelle',\n },\n {\n code: '9280',\n name: 'Lebbeke',\n },\n {\n code: '9280',\n name: 'Wieze',\n },\n {\n code: '9290',\n name: 'Berlare',\n },\n {\n code: '9290',\n name: 'Overmere',\n },\n {\n code: '9290',\n name: 'Uitbergen',\n },\n {\n code: '9300',\n name: 'Aalst',\n nameNL: 'Aalst',\n nameFR: 'Alost',\n },\n {\n code: '9308',\n name: 'Gijzegem',\n },\n {\n code: '9308',\n name: 'Hofstade',\n },\n {\n code: '9310',\n name: 'Baardegem',\n },\n {\n code: '9310',\n name: 'Herdersem',\n },\n {\n code: '9310',\n name: 'Meldert',\n },\n {\n code: '9310',\n name: 'Moorsel',\n },\n {\n code: '9320',\n name: 'Erembodegem',\n },\n {\n code: '9320',\n name: 'Nieuwerkerken',\n },\n {\n code: '9340',\n name: 'Impe',\n },\n {\n code: '9340',\n name: 'Lede',\n },\n {\n code: '9340',\n name: 'Oordegem',\n },\n {\n code: '9340',\n name: 'Smetlede',\n },\n {\n code: '9340',\n name: 'Wanzele',\n },\n {\n code: '9400',\n name: 'Appelterre-Eichem',\n },\n {\n code: '9400',\n name: 'Denderwindeke',\n },\n {\n code: '9400',\n name: 'Lieferinge',\n },\n {\n code: '9400',\n name: 'Nederhasselt',\n },\n {\n code: '9400',\n name: 'Ninove',\n },\n {\n code: '9400',\n name: 'Okegem',\n },\n {\n code: '9400',\n name: 'Voorde',\n },\n {\n code: '9401',\n name: 'Pollare',\n },\n {\n code: '9402',\n name: 'Meerbeke',\n },\n {\n code: '9403',\n name: 'Neigem',\n },\n {\n code: '9404',\n name: 'Aspelare',\n },\n {\n code: '9406',\n name: 'Outer',\n nameNL: 'Outer',\n nameFR: 'Oultre',\n },\n {\n code: '9420',\n name: 'Aaigem',\n },\n {\n code: '9420',\n name: 'Bambrugge',\n },\n {\n code: '9420',\n name: 'Burst',\n },\n {\n code: '9420',\n name: 'Erondegem',\n },\n {\n code: '9420',\n name: 'Erpe',\n },\n {\n code: '9420',\n name: 'Erpe-Mere',\n },\n {\n code: '9420',\n name: 'Mere',\n },\n {\n code: '9420',\n name: 'Ottergem',\n },\n {\n code: '9420',\n name: 'Vlekkem',\n },\n {\n code: '9450',\n name: 'Denderhoutem',\n },\n {\n code: '9450',\n name: 'Haaltert',\n },\n {\n code: '9450',\n name: 'Heldergem',\n },\n {\n code: '9451',\n name: 'Kerksken',\n },\n {\n code: '9470',\n name: 'Denderleeuw',\n },\n {\n code: '9472',\n name: 'Iddergem',\n },\n {\n code: '9473',\n name: 'Welle',\n },\n {\n code: '9500',\n name: 'Geraardsbergen',\n nameNL: 'Geraardsbergen',\n nameFR: 'Grammont',\n },\n {\n code: '9500',\n name: 'Goeferdinge',\n },\n {\n code: '9500',\n name: 'Lokeren',\n },\n {\n code: '9500',\n name: 'Nederboelare',\n },\n {\n code: '9500',\n name: 'Onkerzele',\n },\n {\n code: '9500',\n name: 'Ophasselt',\n },\n {\n code: '9500',\n name: 'Overboelare',\n },\n {\n code: '9500',\n name: 'Viane',\n },\n {\n code: '9500',\n name: 'Zarlardinge',\n },\n {\n code: '9506',\n name: 'Grimminge',\n },\n {\n code: '9506',\n name: 'Idegem',\n },\n {\n code: '9506',\n name: 'Nieuwenhove',\n },\n {\n code: '9506',\n name: 'Schendelbeke',\n },\n {\n code: '9506',\n name: 'Smeerebbe-Vloerzegem',\n },\n {\n code: '9506',\n name: 'Waarbeke',\n },\n {\n code: '9506',\n name: 'Zandbergen',\n },\n {\n code: '9520',\n name: 'Bavegem',\n },\n {\n code: '9520',\n name: 'Oombergen',\n },\n {\n code: '9520',\n name: 'Sint-Lievens-Houtem',\n nameNL: 'Sint-Lievens-Houtem',\n nameFR: 'Houtem-Saint-Liévin',\n },\n {\n code: '9520',\n name: 'Vlierzele',\n },\n {\n code: '9520',\n name: 'Zonnegem',\n },\n {\n code: '9521',\n name: 'Letterhoutem',\n },\n {\n code: '9550',\n name: 'Herzele',\n },\n {\n code: '9550',\n name: 'Hillegem',\n },\n {\n code: '9550',\n name: 'Sint-Antelinks',\n },\n {\n code: '9550',\n name: 'Sint-Lievens-Esse',\n nameNL: 'Sint-Lievens-Esse',\n nameFR: 'Essche-St-Liévin',\n },\n {\n code: '9550',\n name: 'Steenhuize-Wijnhuize',\n },\n {\n code: '9550',\n name: 'Woubrechtegem',\n },\n {\n code: '9551',\n name: 'Ressegem',\n },\n {\n code: '9552',\n name: 'Borsbeke',\n },\n {\n code: '9570',\n name: 'Deftinge',\n },\n {\n code: '9570',\n name: 'Lierde',\n },\n {\n code: '9570',\n name: 'Sint-Maria-Lierde',\n nameNL: 'Sint-Maria-Lierde',\n nameFR: 'Lierde-Sainte-Marie',\n },\n {\n code: '9571',\n name: 'Hemelveerdegem',\n },\n {\n code: '9572',\n name: 'Sint-Martens-Lierde',\n },\n {\n code: '9600',\n name: 'Ronse',\n nameNL: 'Ronse',\n nameFR: 'Renaix',\n },\n {\n code: '9620',\n name: 'Elene',\n },\n {\n code: '9620',\n name: 'Erwetegem',\n },\n {\n code: '9620',\n name: 'Godveerdegem',\n },\n {\n code: '9620',\n name: 'Grotenberge',\n },\n {\n code: '9620',\n name: 'Leeuwergem',\n },\n {\n code: '9620',\n name: 'Oombergen',\n },\n {\n code: '9620',\n name: 'Sint-Goriks-Oudenhove',\n nameNL: 'Sint-Goriks-Oudenhove',\n nameFR: 'Audenhove-Saint-Géry',\n },\n {\n code: '9620',\n name: 'Sint-Maria-Oudenhove',\n nameNL: 'Sint-Maria-Oudenhove',\n nameFR: 'Audenhove-Sainte-Marie',\n },\n {\n code: '9620',\n name: 'Strijpen',\n },\n {\n code: '9620',\n name: 'Velzeke-Ruddershove',\n nameNL: 'Velzeke-Ruddershove',\n nameFR: 'Velsique-Ruddershove',\n },\n {\n code: '9620',\n name: 'Zottegem',\n },\n {\n code: '9630',\n name: 'Beerlegem',\n },\n {\n code: '9630',\n name: 'Dikkele',\n },\n {\n code: '9630',\n name: 'Hundelgem',\n },\n {\n code: '9630',\n name: 'Meilegem',\n },\n {\n code: '9630',\n name: 'Munkzwalm',\n },\n {\n code: '9630',\n name: 'Paulatem',\n },\n {\n code: '9630',\n name: 'Roborst',\n },\n {\n code: '9630',\n name: 'Rozebeke',\n },\n {\n code: '9630',\n name: 'Sint-Blasius-Boekel',\n nameNL: 'Sint-Blasius-Boekel',\n nameFR: 'Boucle-Saint-Blaise',\n },\n {\n code: '9630',\n name: 'Sint-Denijs-Boekel',\n nameNL: 'Sint-Denijs-Boekel',\n nameFR: 'Boucle-Saint-Denis',\n },\n {\n code: '9630',\n name: 'Sint-Maria-Latem',\n nameNL: 'Sint-Maria-Latem',\n nameFR: 'Lathem-Sainte-Marie',\n },\n {\n code: '9630',\n name: 'Zwalm',\n },\n {\n code: '9636',\n name: 'Nederzwalm-Hermelgem',\n },\n {\n code: '9660',\n name: 'Brakel',\n },\n {\n code: '9660',\n name: 'Elst',\n },\n {\n code: '9660',\n name: 'Everbeek',\n },\n {\n code: '9660',\n name: 'Michelbeke',\n },\n {\n code: '9660',\n name: 'Nederbrakel',\n },\n {\n code: '9660',\n name: 'Opbrakel',\n },\n {\n code: '9660',\n name: 'Sint-Maria-Oudenhove',\n nameNL: 'Sint-Maria-Oudenhove',\n nameFR: 'Audenhove-Sainte-Marie',\n },\n {\n code: '9660',\n name: 'Zegelsem',\n },\n {\n code: '9661',\n name: 'Parike',\n },\n {\n code: '9667',\n name: 'Horebeke',\n },\n {\n code: '9667',\n name: 'Sint-Kornelis-Horebeke',\n nameNL: 'Sint-Kornelis-Horebeke',\n nameFR: 'Horebeke-Saint-Corneille',\n },\n {\n code: '9667',\n name: 'Sint-Maria-Horebeke',\n nameNL: 'Sint-Maria-Horebeke',\n nameFR: 'Horebeke-Sainte-Marie',\n },\n {\n code: '9680',\n name: 'Etikhove',\n },\n {\n code: '9680',\n name: 'Maarke-Kerkem',\n },\n {\n code: '9680',\n name: 'Maarkedal',\n },\n {\n code: '9681',\n name: 'Nukerke',\n },\n {\n code: '9688',\n name: 'Schorisse',\n nameNL: 'Schorisse',\n nameFR: 'Escornaix',\n },\n {\n code: '9690',\n name: 'Berchem',\n },\n {\n code: '9690',\n name: 'Kluisbergen',\n nameNL: 'Kluisbergen',\n nameFR: \"(niet Mont de l'Enclus ! )\",\n },\n {\n code: '9690',\n name: 'Kwaremont',\n nameNL: 'Kwaremont',\n nameFR: 'Quaremont',\n },\n {\n code: '9690',\n name: 'Ruien',\n },\n {\n code: '9690',\n name: 'Zulzeke',\n nameNL: 'Zulzeke',\n nameFR: 'Sulsique',\n },\n {\n code: '9700',\n name: 'Bevere',\n },\n {\n code: '9700',\n name: 'Edelare',\n },\n {\n code: '9700',\n name: 'Eine',\n },\n {\n code: '9700',\n name: 'Ename',\n },\n {\n code: '9700',\n name: 'Heurne',\n },\n {\n code: '9700',\n name: 'Leupegem',\n },\n {\n code: '9700',\n name: 'Mater',\n },\n {\n code: '9700',\n name: 'Melden',\n },\n {\n code: '9700',\n name: 'Mullem',\n },\n {\n code: '9700',\n name: 'Nederename',\n },\n {\n code: '9700',\n name: 'Ooike',\n },\n {\n code: '9700',\n name: 'Oudenaarde',\n nameNL: 'Oudenaarde',\n nameFR: 'Audenarde',\n },\n {\n code: '9700',\n name: 'Volkegem',\n },\n {\n code: '9700',\n name: 'Welden',\n },\n {\n code: '9750',\n name: 'Huise',\n nameNL: 'Huise',\n nameFR: 'Huysse',\n },\n {\n code: '9750',\n name: 'Ouwegem',\n nameNL: 'Ouwegem',\n nameFR: 'Auwegem',\n },\n {\n code: '9750',\n name: 'Zingem',\n },\n {\n code: '9770',\n name: 'Zingem',\n },\n {\n code: '9771',\n name: 'Nokere',\n },\n {\n code: '9772',\n name: 'Wannegem-Lede',\n },\n {\n code: '9790',\n name: 'Elsegem',\n },\n {\n code: '9790',\n name: 'Moregem',\n },\n {\n code: '9790',\n name: 'Ooike',\n },\n {\n code: '9790',\n name: 'Petegem-Aan-De-Schelde',\n },\n {\n code: '9790',\n name: 'Wortegem',\n },\n {\n code: '9790',\n name: 'Wortegem-Petegem',\n },\n {\n code: '9800',\n name: 'Astene',\n },\n {\n code: '9800',\n name: 'Bachte-Maria-Leerne',\n },\n {\n code: '9800',\n name: 'Deinze',\n },\n {\n code: '9800',\n name: 'Gottem',\n },\n {\n code: '9800',\n name: 'Grammene',\n },\n {\n code: '9800',\n name: 'Meigem',\n },\n {\n code: '9800',\n name: 'Petegem-Aan-De-Leie',\n },\n {\n code: '9800',\n name: 'Sint-Martens-Leerne',\n nameNL: 'Sint-Martens-Leerne',\n nameFR: 'Leerne-Saint-Martin',\n },\n {\n code: '9800',\n name: 'Vinkt',\n },\n {\n code: '9800',\n name: 'Wontergem',\n },\n {\n code: '9800',\n name: 'Zeveren',\n },\n {\n code: '9810',\n name: 'Eke',\n },\n {\n code: '9810',\n name: 'Nazareth-De Pinte',\n },\n {\n code: '9820',\n name: 'Bottelare',\n },\n {\n code: '9820',\n name: 'Lemberge',\n },\n {\n code: '9820',\n name: 'Melsen',\n },\n {\n code: '9820',\n name: 'Merelbeke-Melle',\n },\n {\n code: '9820',\n name: 'Munte',\n },\n {\n code: '9820',\n name: 'Schelderode',\n },\n {\n code: '9830',\n name: 'Sint-Martens-Latem',\n nameNL: 'Sint-Martens-Latem',\n nameFR: 'Lathem-Saint-Martin',\n },\n {\n code: '9831',\n name: 'Deurle',\n },\n {\n code: '9840',\n name: 'Nazareth-De Pinte',\n nameNL: 'Nazareth-De Pinte',\n nameFR: 'Nazareth-La Pinte',\n },\n {\n code: '9840',\n name: 'Zevergem',\n },\n {\n code: '9850',\n name: 'Hansbeke',\n },\n {\n code: '9850',\n name: 'Landegem',\n },\n {\n code: '9850',\n name: 'Merendree',\n },\n {\n code: '9850',\n name: 'Deinze',\n },\n {\n code: '9850',\n name: 'Poesele',\n },\n {\n code: '9850',\n name: 'Vosselare',\n },\n {\n code: '9860',\n name: 'Balegem',\n },\n {\n code: '9860',\n name: 'Gijzenzele',\n },\n {\n code: '9860',\n name: 'Landskouter',\n },\n {\n code: '9860',\n name: 'Moortsele',\n },\n {\n code: '9860',\n name: 'Oosterzele',\n },\n {\n code: '9860',\n name: 'Scheldewindeke',\n },\n {\n code: '9870',\n name: 'Machelen',\n },\n {\n code: '9870',\n name: 'Olsene',\n },\n {\n code: '9870',\n name: 'Zulte',\n },\n {\n code: '9880',\n name: 'Aalter',\n },\n {\n code: '9880',\n name: 'Lotenhulle',\n },\n {\n code: '9880',\n name: 'Poeke',\n nameNL: 'Poeke',\n nameFR: 'Poucke / Poucques',\n },\n {\n code: '9881',\n name: 'Bellem',\n },\n {\n code: '9890',\n name: 'Asper',\n },\n {\n code: '9890',\n name: 'Baaigem',\n },\n {\n code: '9890',\n name: 'Dikkelvenne',\n },\n {\n code: '9890',\n name: 'Gavere',\n },\n {\n code: '9890',\n name: 'Semmerzake',\n },\n {\n code: '9890',\n name: 'Vurste',\n },\n {\n code: '9900',\n name: 'Eeklo',\n },\n {\n code: '9910',\n name: 'Aalter',\n },\n {\n code: '9910',\n name: 'Ursel',\n },\n {\n code: '9920',\n name: 'Lievegem',\n },\n {\n code: '9921',\n name: 'Vinderhoute',\n },\n {\n code: '9930',\n name: 'Lievegem',\n },\n {\n code: '9931',\n name: 'Oostwinkel',\n },\n {\n code: '9932',\n name: 'Ronsele',\n },\n {\n code: '9940',\n name: 'Ertvelde',\n },\n {\n code: '9940',\n name: 'Evergem',\n },\n {\n code: '9940',\n name: 'Kluizen',\n },\n {\n code: '9940',\n name: 'Sleidinge',\n },\n {\n code: '9950',\n name: 'Lievegem',\n },\n {\n code: '9960',\n name: 'Assenede',\n },\n {\n code: '9961',\n name: 'Boekhoute',\n },\n {\n code: '9968',\n name: 'Bassevelde',\n },\n {\n code: '9968',\n name: 'Oosteeklo',\n },\n {\n code: '9970',\n name: 'Kaprijke',\n },\n {\n code: '9971',\n name: 'Lembeke',\n },\n {\n code: '9980',\n name: 'Sint-Laureins',\n nameNL: 'Sint-Laureins',\n nameFR: 'Saint-Laurent',\n },\n {\n code: '9981',\n name: 'Sint-Margriete',\n nameNL: 'Sint-Margriete',\n nameFR: 'Sainte-Marguerite',\n },\n {\n code: '9982',\n name: 'Sint-Jan-In-Eremo',\n nameNL: 'Sint-Jan-in-Eremo',\n nameFR: 'Saint-Jean-in-Eremo',\n },\n {\n code: '9988',\n name: 'Waterland-Oudeman',\n },\n {\n code: '9988',\n name: 'Watervliet',\n },\n {\n code: '9990',\n name: 'Maldegem',\n },\n {\n code: '9991',\n name: 'Adegem',\n },\n {\n code: '9992',\n name: 'Middelburg',\n },\n]);\n","import angular from 'angular';\n\nangular\n .module('commonServices')\n .service('insights', [\n 'resourceFactorySvc',\n '$q',\n 'authService',\n '$http',\n 'appUrls',\n 'checkSecurity',\n insights,\n ]);\n\nfunction insights(resourceFactorySvc, $q, authService, $http, appUrls, checkSecurity) {\n var cache = this;\n var lock = null;\n cache.ready = false;\n cache.insights = {};\n\n var loadInsights = function() {\n var deferred = $q.defer();\n var userId = authService.getUserId();\n const segmentsPromise = $http.get(appUrls.api + `/api/user/segments/${userId}`);\n\n Promise.all([segmentsPromise]).then(\n ([{ data: segments }]) => {\n cache.insights = {\n ...cache.insights,\n segments,\n };\n deferred.resolve(true);\n },\n error => {\n deferred.reject(error);\n },\n );\n return deferred.promise;\n };\n\n var ready = function() {\n if (lock != null) return lock.promise;\n lock = $q.defer();\n\n if (!cache.ready) {\n loadInsights().then(\n function() {\n lock.resolve(cache);\n cache.ready = true;\n },\n function(error) {\n cache.ready = false;\n if (lock != null) lock.reject(error);\n lock = null;\n },\n );\n } else {\n lock.resolve(cache);\n }\n return lock.promise;\n };\n ready();\n\n var destroy = function() {\n cache = {\n ready: false,\n };\n lock = null;\n };\n\n authService.addOnLogOut(function() {\n destroy();\n });\n\n return {\n ready: ready,\n get: function() {\n return cache.insights;\n },\n };\n}\n","import angular from 'angular';\n\nangular.module('cxTable').directive('cxFilterColumn', [\n '$compile',\n function($compile) {\n var defaultOptions = {\n items: null, //Set to true to autogenerate else pass array or function that returns array\n itemTemplate: null,\n //Url to item template, it uses ng-include to display item in filter list (not tested)\n itemExpression: null, //Expression to execute for each item, use item.value in expression\n type: 'items', //Filter type, possible values: items, number, date\n search: false, //Show search box\n withoutMargin: false,\n };\n return {\n require: '^^cxTable',\n scope: true,\n link: function(scope, element, attrs, table) {\n if (typeof attrs.key === 'undefined' || attrs.key.length <= 0) {\n console.warn('[cxFilterColumn]: Missing \"key\" attribute');\n return;\n }\n /*Key attribute\n * Possible values:\n * name of property\n * array with names of properties */\n if (!scope.key) scope.key = scope.$eval(attrs.key) || attrs.key || '';\n var safeKey = (angular.isArray(scope.key) ? scope.key[0] : scope.key).toString();\n\n scope.filterItems = [];\n //Set filterOptions\n scope.filterOptions = angular.extend({}, defaultOptions, scope.$eval(attrs.cxFilterColumn));\n scope.isChanged = false;\n\n scope.initPopup = function() {\n //Function which is executed if the filter popup opens\n //It reads the filter settings from the table and initializes the popup\n scope.filterItems.clear();\n var propFilter = table.tableInfo.filters[safeKey];\n\n //Item filter: multiselect with checkboxes\n if (scope.filterOptions.type === 'items') {\n var items = scope.filterOptions.items;\n if (items) {\n if (typeof items === 'string') items = scope.$eval(items);\n if (items === true) {\n //Auto generate items\n //Try getting unique values from table rows\n items = table.rows.map(function(el) {\n return el[safeKey];\n });\n items.sort();\n var li;\n for (var i = 0; i < items.length; i++)\n if ((li = items.lastIndexOf(items[i])) !== i) items.splice(i + 1, li - i);\n } else if (items) {\n //Try getting the real array or function\n if (angular.isFunction(items)) items = items();\n //Return result from function\n if (!angular.isArray(items)) items = []; //Return array\n }\n }\n if (items) {\n angular.forEach(items, function(el) {\n var checked = false;\n if (\n propFilter &&\n typeof propFilter.items !== 'undefined' &&\n angular.isArray(propFilter.items)\n ) {\n checked = propFilter.items.indexOf(el) >= 0;\n }\n scope.filterItems.push({\n value: el,\n checked: checked,\n });\n });\n }\n }\n //Number compare filter\n if (scope.filterOptions.type === 'number') {\n if (typeof propFilter !== 'undefined') {\n scope.numberFilter.lesser =\n typeof propFilter.lesser !== 'undefined' ? propFilter.lesser : null;\n scope.numberFilter.greater =\n typeof propFilter.greater !== 'undefined' ? propFilter.greater : null;\n } else {\n scope.numberFilter = {\n lesser: null,\n greater: null,\n };\n }\n }\n //Date compare filter\n if (scope.filterOptions.type === 'date') {\n if (typeof propFilter !== 'undefined') {\n scope.dateFilter.lesser =\n typeof propFilter.lesser !== 'undefined' ? propFilter.lesser : null;\n scope.dateFilter.greater =\n typeof propFilter.greater !== 'undefined' ? propFilter.greater : null;\n } else {\n scope.dateFilter = {\n lesser: null,\n greater: null,\n };\n }\n }\n\n //Search box\n if (\n scope.filterOptions.search &&\n table.tableInfo.search &&\n table.tableInfo.search[safeKey]\n ) {\n scope.filterSearch = table.tableInfo.search[safeKey];\n } else {\n scope.filterSearch = '';\n }\n scope.isChanged = false;\n };\n\n scope.numberFilter = {\n lesser: null,\n greater: null,\n };\n scope.dateFilter = {\n lesser: null,\n greater: null,\n };\n scope.filterSearch = '';\n scope.search = function(term) {\n if (term) table.setSearch(safeKey, term);\n else {\n table.clearSearch(safeKey);\n }\n scope.closePopup();\n };\n scope.clearFilter = function() {\n table.clearFilter(safeKey);\n table.clearSearch(safeKey);\n scope.filterSearch = '';\n\n /* istanbul ignore else */\n if (scope.filterItems)\n angular.forEach(scope.filterItems, function(el) {\n el.checked = false;\n });\n\n scope.closePopup();\n };\n scope.isFiltered = function() {\n /* istanbul ignore if */\n if (!table.tableInfo.filters) return false;\n return (\n typeof table.tableInfo.filters[safeKey] !== 'undefined' ||\n table.tableInfo.search[safeKey]\n );\n };\n scope.filterPopupOpen = false;\n\n scope.searchOnEnter = function(event, value) {\n if (event.keyCode === 27) {\n scope.clearFilter();\n } else if (event.keyCode === 13) {\n /* istanbul ignore else */\n scope.search(value);\n }\n };\n\n scope.itemFilterChanged = function() {\n scope.closePopup();\n /* istanbul ignore if */\n if (scope.filterOptions.type !== 'items') return;\n var items = scope.filterItems\n .filter(function(el) {\n return el.checked;\n })\n .map(function(el) {\n return el.value;\n });\n if (items.length === 0) scope.clearFilter();\n else\n table.setFilter(safeKey, {\n items: items,\n });\n };\n scope.compareFilterChanged = function(value) {\n if (typeof value.lesser === 'undefined' || typeof value.greater === 'undefined') return;\n scope.closePopup();\n if (value.lesser !== null || value.greater !== null) {\n table.setFilter(safeKey, {\n lesser: value.lesser,\n greater: value.greater,\n });\n } else {\n scope.clearFilter();\n }\n };\n scope.compareFilterKeyPress = function(event, value) {\n if (event.keyCode === 27) {\n value.lesser = null;\n value.greater = null;\n scope.clearFilter();\n } else if (event.keyCode === 13) {\n /* istanbul ignore else */\n scope.compareFilterChanged(value);\n }\n };\n\n scope.closePopup = function() {\n scope.filterPopupOpen = false;\n };\n\n //Add clickable filter icon to element\n var icon = angular.element(\n scope.filterOptions.withoutMargin\n ? ''\n : '',\n );\n icon\n .attr(\n 'uib-popover-template',\n \"'assets/templates/common/table/filterColumnPopup.tpl.html'\",\n )\n .attr('popover-append-to-body', true)\n .attr('popover-is-open', 'filterPopupOpen')\n .attr('popover-placement', 'bottom')\n .attr('popover-trigger', \"'outsideClick'\");\n $compile(icon)(scope);\n icon.bind('click', function() {\n scope.$apply(function() {\n //Toggle filter popup\n scope.filterPopupOpen = !scope.filterPopupOpen;\n if (scope.filterPopupOpen) scope.initPopup();\n });\n return false; //Prevent other click events\n });\n element.append(icon);\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cxTable').directive('cxScrollTable', [\n '$compile',\n function($compile) {\n return {\n restrict: 'A',\n priority: 50,\n terminal: true,\n compile: function(el) {\n el.removeAttr('cx-scroll-table'); //Remove own attribute to prevent endless compile loop\n //Inject infinite scroll attributes\n el.attr('infinite-scroll', 'table.getNextPage()');\n el.attr('infinite-scroll-disabled', 'table.retrieving');\n el.attr('cx-loading', 'table.showSpinner');\n var fn = $compile(el); //Recompile\n return function(scope) {\n fn(scope);\n };\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cxTable').directive('cxSortColumn', [\n '$compile',\n function($compile) {\n return {\n restrict: 'A',\n require: '^^cxTable',\n scope: true,\n link: function(scope, element, attrs, table) {\n if (typeof attrs.key === 'undefined' || attrs.key.length <= 0) {\n console.warn('[cxSortColumn]: Missing \"key\" attribute');\n return;\n }\n /*Key attribute\n * Possible values:\n * name of property\n * array with names of properties\n * sort function (don't use with scroll tables)\n *\n * See orderByFilter: https://docs.angularjs.org/api/ng/filter/orderBy\n */\n if (!scope.key) scope.key = scope.$eval(attrs.key) || attrs.key || '';\n\n //Compare column key with the current table sorting, if it's the same show a caret icon.\n scope.sortVisible = function() {\n if (typeof scope.key === 'function' && typeof table.tableInfo.sortBy === 'function')\n return scope.key === table.tableInfo.sortBy;\n if (typeof scope.key === 'undefined' || typeof table.tableInfo.sortBy === 'undefined')\n return false;\n return angular.equals(scope.key, table.tableInfo.sortBy);\n };\n\n //Create and add caret icon to element\n var icon = angular.element(\n '',\n );\n $compile(icon)(scope);\n element.prepend(icon);\n element.addClass('clickable').addClass('unselectable');\n element.bind('click', function() {\n //Sort column on click\n scope.$apply(table.sort(scope.key));\n });\n\n /* if cxSortColumn attribute is true => sort*/\n if (\n typeof attrs.cxSortColumn !== 'undefined' &&\n (typeof attrs.cxSortColumn !== 'string' || attrs.cxSortColumn !== '') &&\n !table.tableInfo.sortBy\n ) {\n table.sort(scope.key, !scope.$eval(attrs.cxSortColumn));\n }\n },\n };\n },\n]);\n","import angular from 'angular';\nimport moment from 'moment';\nangular.module('cxTable').directive('cxTable', [\n '$http',\n '$timeout',\n 'resourceFactorySvc',\n 'flySvc',\n '$q',\n function($http, $timeout, resourceFactorySvc, flySvc, $q) {\n return {\n restrict: 'A',\n priority: 51,\n compile: function() {\n return {\n pre: function(scope, element, attrs, ctrl) {\n var name = attrs.name || 'table';\n var bindTo = scope.$eval(attrs.bindTo) || scope.$parent;\n //Put the contoller on the parent scope\n bindTo[name] = ctrl;\n\n var cxTable = scope.$eval(attrs.cxTable) || attrs.cxTable;\n if (!cxTable) return;\n if (angular.isArray(cxTable)) {\n //If the cxTable attr is an array, add all items in array to table rows\n scope.$watchCollection(attrs.cxTable, function(newValue) {\n ctrl.setRows(newValue);\n });\n return;\n }\n //Init sort column if provided\n if (cxTable.sortBy) {\n ctrl.initSort(cxTable.sortBy, cxTable.sortDesc);\n }\n if (cxTable.initParams) {\n ctrl.initializeParams(cxTable.initParams);\n }\n\n //If the cxTable attr is an object with property source, the table is a scroll table\n if (cxTable.source) {\n //Required property: source\n //There are other required properties, but it depends on the source (see below).\n //Optional property: take (number of items per paging request, default 50)\n\n //Helper functions:\n var handlePromise = function(params) {\n //Creates a function to handle the promise result\n //Store page nr in variable for reference\n var page = params.page;\n\n return function(data) {\n //Check if the referenced page nr is the same as the table page nr\n if (page !== ctrl.tableInfo.page) return null; //If it's not the same, abort appending data. There probably was a reload at the same moment.\n //If there is a property data which is an array, that's probably our data. (See $http response)\n if (data && angular.isArray(data.data)) return data.data;\n return data;\n };\n };\n\n var handleError = function(error) {\n //Show fly-in when there's an error\n if (error && error.data) flySvc.error(error.data.code, error.data.parameters);\n return error;\n };\n\n //Scroll table source, allowed values: 'URL', 'R', 'F'\n cxTable.source = cxTable.source.toUpperCase();\n if (cxTable.source === 'URL') {\n //Http get with url\n //Extra required param: url\n if (cxTable.url)\n ctrl.enablePaging(\n function(params) {\n return $http\n .get(cxTable.url, {\n params: params,\n })\n .then(handlePromise(params), handleError);\n },\n cxTable.take,\n cxTable.noResultMsg,\n );\n } else if (cxTable.source === 'R') {\n //Resource factory\n //Extra required param: type (the type of the resource in the resource factory)\n //Optional param: action (the action that's called on the resource, default 'query')\n if (cxTable.type) {\n cxTable.action = cxTable.action || 'query';\n var resource = resourceFactorySvc.get(cxTable.type);\n if (resource !== null)\n ctrl.enablePaging(\n function(params) {\n return resource[cxTable.action](params, handlePromise(params), handleError)\n .$promise;\n },\n cxTable.take,\n cxTable.noResultMsg,\n );\n }\n } else if (cxTable.source === 'F') {\n //Function with promise\n //Extra required param: func (this function is called with a params argument, it must return a promise which returns an array)\n if (typeof cxTable.func == 'function')\n ctrl.enablePaging(\n function(params) {\n return $q.when(cxTable.func(params)).then(handlePromise(params), handleError);\n },\n cxTable.take,\n cxTable.noResultMsg,\n );\n } else console.warn('ScrollTable: Unknown source');\n }\n },\n post: function() {},\n };\n },\n scope: true,\n controllerAs: 'table',\n controller: function() {\n var table = this;\n\n table.rows = null;\n //table.columns = [];\n table.tableInfo = {\n sortBy: null,\n sortDesc: false,\n search: {}, //Should be an object with properties\n filters: {}, //Should be an object with properties\n };\n //Default no paging\n table.paging = false;\n\n table.filterTable = function(row) {\n //Filtering in backend\n if (table.paging) return true;\n\n var filters = table.tableInfo.filters;\n if (!filters || !row) return true;\n\n //Loop over every property in the table filter\n for (var prop in filters) {\n if (filters.hasOwnProperty(prop) && typeof row[prop] != 'undefined') {\n var filter = filters[prop];\n if (angular.isFunction(filter)) {\n //Filter is a function so call the filter function with the property value\n if (!filter(row[prop])) return false;\n } else if (filter.items && angular.isArray(filter.items)) {\n //The property filter has an array\n //Check if the property of the row matches one of the filters.\n var found = false;\n for (var i = 0; i < filter.items.length && !found; i++)\n if (row[prop] === filter.items[i]) found = true; //Filter matches property\n if (!found) return false; //Not found\n } else {\n //Number & Date filters\n if (typeof filter.lesser !== 'undefined' && typeof filter.greater !== 'undefined') {\n var value = row[prop];\n if (typeof value === 'string' && !isNaN(value)) value = parseFloat(value);\n if (typeof value === 'string' && Date.parse(value) !== null)\n value = new moment(value).toDate();\n\n if (filter.lesser !== null && value > filter.lesser) return false;\n if (filter.greater !== null && value < filter.greater) return false;\n }\n }\n }\n }\n return true;\n };\n\n //table.addColumn = function (column) {\n // if (!column) return;\n // table.columns.push(column);\n //};\n\n //Remove all table rows\n table.clearRows = function() {\n if (!table.rows) return;\n table.rows.clear();\n };\n\n //Append rows to the end of the table\n table.appendRows = function(rows) {\n if (!rows || !angular.isArray(rows)) return;\n if (!table.rows) table.rows = [];\n for (var i = 0; i < rows.length; i++) table.rows.push(rows[i]);\n };\n\n //Replace all rows\n table.setRows = function(rows, stopPaging) {\n if (!rows || !angular.isArray(rows)) return;\n table.clearRows();\n table.appendRows(rows);\n if (stopPaging) {\n table.retrieving = true;\n }\n };\n\n //Sort on a column\n table.sort = function(column, sortDesc = undefined) {\n table.tableInfo.sortDesc = angular.equals(column, table.tableInfo.sortBy)\n ? !table.tableInfo.sortDesc\n : false;\n if (typeof sortDesc !== 'undefined') table.tableInfo.sortDesc = !!sortDesc;\n table.tableInfo.sortBy = column;\n\n if (table.paging && table.reload) table.reload();\n };\n\n //Replace a property filter\n table.setFilter = function(prop, filter) {\n if (!prop) return;\n table.tableInfo.filters[prop] = filter;\n\n if (table.paging && table.reload) table.reload();\n };\n\n //Clear property filter for 1 column or all\n table.clearFilter = function(prop) {\n if (prop) {\n delete table.tableInfo.filters[prop];\n } else {\n table.tableInfo.filters = {};\n }\n\n if (table.paging && table.reload) table.reload();\n };\n\n //Replace search filter on a column\n table.setSearch = function(prop, search) {\n if (!prop) return;\n table.tableInfo.search[prop] = search;\n\n if (table.paging && table.reload) table.reload();\n };\n\n //Clear search filter for 1 column or all\n table.clearSearch = function(prop) {\n if (prop) {\n delete table.tableInfo.search[prop];\n } else {\n table.tableInfo.search = {};\n }\n\n if (table.paging && table.reload) table.reload();\n };\n\n table.initSort = function(sortBy, sortDesc) {\n table.tableInfo.sortDesc = !!sortDesc;\n table.tableInfo.sortBy = sortBy;\n };\n\n //Initialize paging\n table.enablePaging = function(retrieve, take, noResultMsg) {\n if (typeof retrieve !== 'function') return;\n if (table.paging === true) return;\n table.retrieve = retrieve;\n table.tableInfo.page = -1; //Init page nr to -1 so page 0 is loaded next time\n table.tableInfo.take = take || 50; //Nr of items per paging request\n table.retrieving = false; //Only 1 page can be retrieved a time\n table.noResultMsg = noResultMsg;\n\n //Create getNextPage function\n table.getNextPage = function() {\n if (table.retrieving && table.tableInfo.page !== -1) {\n return; //Block next page request if there is already a request in progress. Except if a reload is requested (page nr -1)\n }\n //Increment page nr\n table.tableInfo.page += 1;\n //Create params object\n var params = table.currentParams();\n //Set retrieving to true\n table.retrieving = true;\n\n //Retrieve\n table.retrieve(params).then(function(rows) {\n table.appendRows(rows);\n if (table.tableInfo.page === 0) table.showSpinner = false;\n\n //Render new lines first before setting retrieving prop\n $timeout(function() {\n //Stop retrieving if the result isn't an array or if the nr of result is lower than the \"items per paging request\".\n table.retrieving = !angular.isArray(rows) || rows.length !== table.tableInfo.take;\n }, 0);\n\n if (rows && rows.length === 0 && params.page === 0 && table.noResultMsg)\n flySvc.message('msgPagingNoResults');\n });\n };\n\n table.paging = true;\n table.reloading = null; //Placeholder to store the reload timeout promise\n table.reload = function() {\n //Set page nr to -1 to load page 0 next time\n table.tableInfo.page = -1;\n //Remove all rows from table\n table.clearRows();\n\n //Because many actions trigger a reload, reloads are grouped together.\n //If there's a previous reloading request, cancel it.\n if (table.reloading !== null) $timeout.cancel(table.reloading);\n //Call getNextPage after timeout, set cancel promise reference\n table.reloading = $timeout(table.getNextPage, 100).then(function() {\n table.reloading = null;\n });\n };\n };\n\n table.currentParams = function() {\n return {\n take: table.tableInfo.take,\n page: table.tableInfo.page,\n sort: table.tableInfo.sortBy,\n desc: table.tableInfo.sortDesc,\n search: table.tableInfo.search,\n filter: table.tableInfo.filters,\n };\n };\n\n table.initializeParams = function(params) {\n if (!params) return;\n\n table.tableInfo = {\n ...table.tableInfo,\n sortBy: params.sort ?? table.tableInfo.sortBy ?? null,\n sortDesc: params.desc ?? table.tableInfo.sortDesc ?? true,\n search: params.search || {},\n filters: params.filter || {}, //Should be an object with properties\n };\n };\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cxTable').directive('cxTableRow', [\n '$compile',\n function($compile) {\n return {\n restrict: 'A',\n priority: 1001,\n terminal: true,\n require: '^^cxTable',\n compile: function(el, attrs) {\n var rowVar = attrs.cxTableRow || 'row';\n el.removeAttr('cx-table-row'); //Remove own attribute to prevent endless compile loop\n //Inject ng-repeat with necessary filters & sorting\n return function(scope, element, attributes, cxTable) {\n if (cxTable.paging) {\n element.attr('ng-repeat', rowVar + ' in table.rows'); //Add ng-repeat to element\n } else {\n element.attr(\n 'ng-repeat',\n rowVar +\n ' in table.rows | filter:table.tableInfo.search | filter:table.filterTable | orderBy:table.tableInfo.sortBy:table.tableInfo.sortDesc',\n ); //Add ng-repeat to element\n }\n $compile(element, null, 1001)(scope); //Recompile\n };\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('bindErrors', function() {\n return {\n restrict: 'A',\n require: 'bindErrors',\n link: function(scope, element, attrs, bindErrors) {\n if (!bindErrors) return; // do nothing if no bindErrors controller\n if (attrs.bindErrors) {\n bindErrors.init(attrs.bindErrors);\n }\n },\n controller: [\n '$scope',\n '$parse',\n function($scope, $parse) {\n var ctrl = this;\n ctrl.$errorTypes = {\n required: {\n code: 3000,\n parameters: [],\n },\n date: {\n code: 16002,\n parameters: [],\n },\n };\n ctrl.$errorBinder = null;\n ctrl.init = function(bindAttr) {\n if (!bindAttr) return;\n ctrl.$errorBinder = $parse(bindAttr);\n ctrl.refreshErrors();\n };\n\n ctrl.addError = function(type, code, parameters) {\n ctrl.$errorTypes[type] = {\n code: code,\n parameters: parameters || [],\n };\n };\n\n ctrl.refreshErrors = function(modelErrors) {\n if (!ctrl.$errorBinder) return;\n var errors = {\n $invalid: false,\n };\n if (modelErrors) {\n for (var error in modelErrors) {\n if (modelErrors.hasOwnProperty(error) && error[0] !== '$') {\n if (ctrl.$errorTypes.hasOwnProperty(error))\n errors[error] = angular.copy(ctrl.$errorTypes[error]);\n errors.$invalid = true;\n }\n }\n }\n ctrl.$errorBinder.assign($scope, errors);\n };\n },\n ],\n };\n});\n","import angular from 'angular';\n\nangular.module('cloudX').directive('compareTo', [\n function() {\n return {\n restrict: 'A',\n require: 'ngModel',\n scope: {\n otherModelValue: '=compareTo',\n },\n link: function(scope, element, attributes, ngModel) {\n ngModel.$validators.compareTo = function(modelValue) {\n return modelValue == scope.otherModelValue;\n };\n\n scope.$watch('otherModelValue', function() {\n ngModel.$validate();\n });\n },\n };\n },\n]);\n","import moment from 'moment';\n\nexport const dateTimeRegex = /^(\\d{4}-\\d{1,2}-\\d{1,2})(T\\d{1,2}:\\d{1,2}:\\d{1,2}([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?$/;\nexport const dateRegex = /^(\\d{4}-\\d{1,2}-\\d{1,2})(T0+:0+:0+)?$/;\nexport const toDate = function(value) {\n if (typeof value === 'undefined' || value === null) return value;\n var match;\n var matchDate;\n if (typeof value === 'string') {\n if (value.toLowerCase() === 'today')\n return moment\n .utc()\n .startOf('day')\n .toDate();\n if ((match = value.match(dateTimeRegex))) {\n var milliseconds;\n if ((matchDate = value.match(dateRegex))) milliseconds = Date.parse(matchDate[1]);\n else milliseconds = Date.parse(match[0]);\n if (!isNaN(milliseconds)) {\n return new Date(milliseconds);\n }\n }\n }\n if (value instanceof Date) return value;\n return undefined;\n};\n","import angular from 'angular';\nimport moment from 'moment';\nimport { toDate } from './helpers';\n\nconst minDateFallback = new Date(1900, 0, 1);\n\n/*\nCheck minDate and maxDate on input based on datepickerOption values\n */\nangular.module('cloudX').directive('uibDatepickerPopup', [\n '$window',\n '$filter',\n 'relBindSvc',\n function($window, $filter, relBindSvc) {\n return {\n restrict: 'A',\n require: ['?ngModel', '^?bindErrors'],\n link: function(scope, element, attributes, ctrls) {\n let ngModel = ctrls[0];\n const bindErrors = ctrls[1];\n if (!ngModel) {\n const input = element.find('input[ng-model][uib-datepicker-popup]');\n if (!input || !input.length) return;\n ngModel = input.controller('ngModel');\n if (!ngModel) return;\n }\n if (typeof attributes.datepickerOptions !== 'undefined') {\n //Datepicker has options\n scope.$watch(\n attributes.datepickerOptions + '.minDate',\n minDateOption => {\n let minDate = toDate(minDateOption);\n if (typeof minDate === 'undefined' || minDate === null) minDate = minDateFallback;\n if (bindErrors)\n bindErrors.addError('min', 5, [$filter('formatDate')(minDate)]);\n\n ngModel.$validators.min = function(modelValue) {\n if (modelValue === null || modelValue === undefined) return true;\n var value = toDate(modelValue);\n if (typeof value === 'undefined' || value === null) return false;\n return value >= minDate;\n };\n },\n true,\n );\n scope.$watch(\n attributes.datepickerOptions + '.maxDate',\n maxDateOption => {\n const maxDate = toDate(maxDateOption);\n if (typeof maxDate === 'undefined' || maxDate === null) {\n //Clear validation if it exists\n delete ngModel.$validators.max;\n return true;\n }\n\n if (bindErrors)\n bindErrors.addError('max', 6, [$filter('formatDate')(maxDate)]);\n\n ngModel.$validators.max = function(modelValue) {\n if (modelValue === null || modelValue === undefined) return true;\n var value = toDate(modelValue);\n if (typeof value === 'undefined' || value === null) return false;\n return value <= maxDate;\n };\n },\n true,\n );\n } else {\n //Add minimum date validation\n\n if (bindErrors)\n bindErrors.addError('min', 5, [$filter('formatDate')(minDateFallback)]);\n\n ngModel.$validators.min = function(modelValue) {\n if (modelValue === null || modelValue === undefined) return true;\n var value = toDate(modelValue);\n if (typeof value === 'undefined' || value === null) return false;\n return value >= minDateFallback;\n };\n }\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('ngModel', [\n function() {\n return {\n restrict: 'A',\n require: ['ngModel', '^?bindErrors'],\n link: function(scope, element, attributes, ctrls) {\n var ngModel = ctrls[0];\n var bindErrors = ctrls[1];\n if (!ngModel) return;\n if (!bindErrors) return;\n ngModel.$viewChangeListeners.push(function() {\n bindErrors.refreshErrors(ngModel.$error);\n });\n scope.$on('$destroy', function() {\n bindErrors.refreshErrors();\n });\n },\n };\n },\n]);\n","import angular from 'angular';\nimport moment from 'moment';\nimport { toDate } from './helpers';\n\nangular.module('cloudX').directive('validateDateField', [\n '$window',\n '$filter',\n 'relBindSvc',\n function($window, $filter, relBindSvc) {\n return {\n restrict: 'A',\n require: ['?ngModel', '^?bindErrors'],\n link: function(scope, element, attributes, ctrls) {\n var ngModel = ctrls[0];\n var bindErrors = ctrls[1];\n if (!ngModel) {\n var input = element.find('input[ng-model][uib-datepicker-popup]');\n if (!input || !input.length) return;\n ngModel = input.controller('ngModel');\n if (!ngModel) return;\n }\n attributes.$observe('validateDateField', function(value) {\n if (!value) return;\n var fieldDef = scope.$eval(value);\n if (!fieldDef || !fieldDef.validators || !fieldDef.validators.length) return;\n fieldDef.errors = {};\n var getFieldValue = function(field) {\n var relation = relBindSvc.relations[scope.relId];\n if (!relation || !relation[field]) return undefined;\n if (typeof relation[field].value !== 'undefined') return relation[field].value;\n return relation[field];\n };\n\n ngModel.$validators.date = function(modelValue) {\n if (modelValue === null) return true;\n return angular.isDate(modelValue);\n };\n for (var i = 0; i < fieldDef.validators.length; i++) {\n var validator = fieldDef.validators[i];\n if (!validator) continue;\n if (validator.maximum !== null) {\n if ($window.isGuid(validator.maximum)) {\n if (bindErrors) bindErrors.addError('max', 25, [validator.maximum]);\n ngModel.$validators.max = (function(max) {\n return function(modelValue) {\n if (modelValue === null) return true;\n var other = toDate(getFieldValue(max));\n if (typeof other === 'undefined' || other === null || isNaN(other)) return true;\n var value = toDate(modelValue);\n if (typeof value === 'undefined' || value === null) return false;\n return value <= other;\n };\n })(validator.maximum);\n } else {\n if (bindErrors)\n bindErrors.addError('max', 6, [$filter('formatDate')(validator.maximum)]);\n ngModel.$validators.max = (function(max) {\n return function(modelValue) {\n if (modelValue === null) return true;\n var other = toDate(max);\n if (typeof other === 'undefined' || other === null) return true;\n var value = toDate(modelValue);\n if (typeof value === 'undefined' || value === null) return false;\n return value <= other;\n };\n })(validator.maximum);\n }\n }\n if (validator.minimum !== null) {\n if ($window.isGuid(validator.minimum)) {\n if (bindErrors) bindErrors.addError('min', 24, [validator.minimum]);\n ngModel.$validators.min = (function(min) {\n return function(modelValue) {\n if (modelValue === null) return true;\n var other = toDate(getFieldValue(min));\n if (typeof other === 'undefined' || other === null || isNaN(other)) return true;\n var value = toDate(modelValue);\n if (typeof value === 'undefined' || value === null) return false;\n return value >= other;\n };\n })(validator.minimum);\n } else {\n if (bindErrors)\n bindErrors.addError('min', 5, [$filter('formatDate')(validator.minimum)]);\n ngModel.$validators.min = (function(min) {\n return function(modelValue) {\n if (modelValue === null) return true;\n var other = toDate(min);\n if (typeof other === 'undefined' || other === null) return true;\n var value = toDate(modelValue);\n if (typeof value === 'undefined' || value === null) return false;\n return value >= other;\n };\n })(validator.minimum);\n }\n }\n }\n //if (bindErrors) {\n // ngModel.$viewChangeListeners.push(function () {\n // bindErrors.refreshErrors(ngModel.$error);\n // });\n // scope.$on('$destroy', function () {\n // bindErrors.refreshErrors();\n // });\n //}\n });\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('validateEmail', [\n function() {\n return {\n restrict: 'A',\n require: ['?ngModel', '^?bindErrors'],\n link: function(scope, element, attributes, ctrls) {\n var ngModel = ctrls[0];\n var bindErrors = ctrls[1];\n if (!ngModel) return;\n ngModel.$validators.email = function(modelValue) {\n //Allow empty, use the required validator to block empty values\n if (typeof modelValue === 'undefined' || modelValue === null || modelValue.length === 0)\n return true;\n if (!/^[^@]+@.+\\..+$/.test(modelValue)) return false; //easy regex\n // Used html email input regex:\n // https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address\n return /^[a-zA-Z0-9.!#$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/i.test(\n modelValue,\n );\n };\n if (bindErrors) {\n bindErrors.addError('email', 9, ['email']);\n //ngModel.$viewChangeListeners.push(function () {\n // bindErrors.refreshErrors(ngModel.$error);\n //});\n //scope.$on('$destroy', function () {\n // bindErrors.refreshErrors();\n //});\n }\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('validateMagicmail', [\n function() {\n return {\n restrict: 'A',\n require: ['?ngModel', '^?bindErrors'],\n link: function(scope, element, attributes, ctrls) {\n var ngModel = ctrls[0];\n var bindErrors = ctrls[1];\n if (!ngModel) return;\n ngModel.$validators.email = function(modelValue) {\n //Allow empty, use the required validator to block empty values\n if (typeof modelValue === 'undefined' || modelValue === null || modelValue.length === 0)\n return true;\n if (!/^[^@]+$/.test(modelValue)) return false; //easy regex\n\n return /^(([^<>()\\[\\]\\.,;:\\s@\\\"]+(\\.[^<>()\\[\\]\\.,;:\\s@\\\"]+)*)|(\\\".+\\\"))$/i.test(\n modelValue,\n );\n };\n if (bindErrors) {\n bindErrors.addError('email', 9, ['email']);\n }\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('validateEnterpriseNumber', function() {\n return {\n restrict: 'A',\n require: ['?ngModel', '^?bindErrors'],\n link: function(scope, element, attrs, ctrls) {\n var ngModel = ctrls[0];\n var bindErrors = ctrls[1];\n if (!ngModel) return; // do nothing if no ng-model\n attrs.$observe('validateEnterpriseNumber', function(country) {\n var ctry = scope.$eval(country) || country || '';\n if (!ctry) return;\n ngModel.$validators.enterpriseNumber = function(modelValue, viewValue) {\n var value = modelValue || viewValue || null;\n if (value === null) return true; //Allow null and empty values\n //Only check for Belgian numbers\n if (ctry.toUpperCase() !== 'BE') return true;\n if (!/^[0-9]{4}.?[0-9]{3}.?[0-9]{3}$/.test(value)) return false;\n //Replace invalid characters and spaces\n value = value.replace(/[^0-9]/g, '');\n if (value.length !== 10) return false;\n var toTest = value.substr(0, 8);\n var mod = parseInt(toTest) % 97;\n return mod + parseInt(value.substr(8)) === 97;\n };\n });\n if (bindErrors) {\n bindErrors.addError('enterpriseNumber', 6017);\n //ngModel.$viewChangeListeners.push(function () {\n // bindErrors.refreshErrors(ngModel.$error);\n //});\n //scope.$on('$destroy', function () {\n // bindErrors.refreshErrors();\n //});\n }\n },\n };\n});\n","import angular from 'angular';\n\nvar ibanReplaceLetters = function(ibanString) {\n ibanString = ibanString.replace(/A/g, '10');\n ibanString = ibanString.replace(/B/g, '11');\n ibanString = ibanString.replace(/C/g, '12');\n ibanString = ibanString.replace(/D/g, '13');\n ibanString = ibanString.replace(/E/g, '14');\n ibanString = ibanString.replace(/F/g, '15');\n ibanString = ibanString.replace(/G/g, '16');\n ibanString = ibanString.replace(/H/g, '17');\n ibanString = ibanString.replace(/I/g, '18');\n ibanString = ibanString.replace(/J/g, '19');\n ibanString = ibanString.replace(/K/g, '20');\n ibanString = ibanString.replace(/L/g, '21');\n ibanString = ibanString.replace(/M/g, '22');\n ibanString = ibanString.replace(/N/g, '23');\n ibanString = ibanString.replace(/O/g, '24');\n ibanString = ibanString.replace(/P/g, '25');\n ibanString = ibanString.replace(/Q/g, '26');\n ibanString = ibanString.replace(/R/g, '27');\n ibanString = ibanString.replace(/S/g, '28');\n ibanString = ibanString.replace(/T/g, '29');\n ibanString = ibanString.replace(/U/g, '30');\n ibanString = ibanString.replace(/V/g, '31');\n ibanString = ibanString.replace(/W/g, '32');\n ibanString = ibanString.replace(/X/g, '33');\n ibanString = ibanString.replace(/Y/g, '34');\n ibanString = ibanString.replace(/Z/g, '35');\n return ibanString;\n};\n\nangular.module('cloudX').directive('validateIban', function() {\n return {\n restrict: 'A',\n require: ['?ngModel', '^?bindErrors'],\n link: function(scope, element, attrs, ctrls) {\n var ngModel = ctrls[0];\n var bindErrors = ctrls[1];\n if (!ngModel) return; // do nothing if no ng-model\n ngModel.$validators.iban = function(modelValue, viewValue) {\n var value = modelValue || viewValue || null;\n if (value === null) return true; //Allow null and empty values\n //Replace invalid characters and spaces\n value = value.replace(/[^0-9a-zA-Z]/g, '');\n if (value.length <= 4) return false;\n\n //Als iban Belgisch is, controleer de lengte\n if (value.substr(0, 2).toUpperCase() === 'BE' && value.length !== 16)\n return false;\n\n // verplaats de eerste 4 chars naar achteraan\n var toTest = value.substr(4) + value.substr(0, 4);\n // vervang elke letter door twee cijfers (A=10, ... Z=35)\n toTest = ibanReplaceLetters(toTest.toUpperCase());\n // getal modulo 97 == 1 => correcte iban\n // we moeten dit in stukken doen omdat het getal te groot is om mee te rekenen in javascript\n var numTest;\n var mod = '';\n\n while (toTest.length > 9) {\n numTest = mod + toTest.substring(0, 9);\n toTest = toTest.substring(9);\n mod = parseInt(numTest) % 97;\n }\n numTest = mod + toTest;\n mod = parseInt(numTest) % 97;\n\n return mod === 1;\n };\n if (bindErrors) {\n bindErrors.addError('iban', 6018);\n }\n },\n };\n});\n","import angular from 'angular';\n\nangular.module('cloudX').directive('validateNotNull', [\n function() {\n return {\n restrict: 'A',\n require: ['?ngModel', '^?bindErrors'],\n link: function(scope, element, attributes, ctrls) {\n var ngModel = ctrls[0];\n var bindErrors = ctrls[1];\n if (!ngModel) return;\n\n ngModel.$validators.notNull = function(modelValue) {\n if (\n attributes.validateNotNull === '' ||\n !scope.$eval(attributes.validateNotNull)\n )\n return true;\n if (typeof modelValue === 'undefined') return true;\n return modelValue !== null;\n };\n if (bindErrors) {\n bindErrors.addError('notNull', 3017);\n //ngModel.$viewChangeListeners.push(function () {\n // bindErrors.refreshErrors(ngModel.$error);\n //});\n //scope.$on('$destroy', function () {\n // bindErrors.refreshErrors();\n //});\n }\n attributes.$observe('validateNotNull', function() {\n ngModel.$validate();\n });\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('validateNumberField', [\n '$window',\n 'relBindSvc',\n function($window, relBindSvc) {\n return {\n restrict: 'A',\n require: ['ngModel', '^?bindErrors'],\n link: function(scope, element, attributes, ctrls) {\n var ngModel = ctrls[0];\n var bindErrors = ctrls[1];\n attributes.$observe('validateNumberField', function(value) {\n if (!value) return;\n var fieldDef = scope.$eval(value);\n if (!fieldDef || !fieldDef.validators || !fieldDef.validators.length)\n return;\n fieldDef.errors = {};\n var getFieldValue = function(field) {\n var relation = relBindSvc.relations[scope.relId];\n if (!relation || !relation[field]) return undefined;\n if (typeof relation[field].value !== 'undefined')\n return relation[field].value;\n return relation[field];\n };\n ngModel.$validators.number = function(modelValue) {\n if (modelValue === null) return true;\n return !isNaN(modelValue);\n };\n for (var i = 0; i < fieldDef.validators.length; i++) {\n var validator = fieldDef.validators[i];\n if (!validator) continue;\n if (validator.maximum !== null) {\n if ($window.isGuid(validator.maximum)) {\n if (bindErrors)\n bindErrors.addError('max', 24, [validator.maximum]);\n ngModel.$validators.max = (function(max) {\n return function(modelValue) {\n if (modelValue === null) return true;\n var other = getFieldValue(max);\n if (\n typeof other === 'undefined' ||\n other === null ||\n isNaN(other)\n )\n return true;\n\n if (Number(modelValue) <= Number(other)) return true;\n return false;\n };\n })(validator.maximum);\n } else {\n if (bindErrors)\n bindErrors.addError(\n 'max',\n 6,\n fieldDef.type === 41\n ? [(validator.maximum * 100).toFixed(2) + '%']\n : [validator.maximum],\n );\n ngModel.$validators.max = (function(max) {\n return function(modelValue) {\n if (modelValue === null) return true;\n if (isNaN(modelValue)) return false;\n if (Number(modelValue) <= Number(max)) return true;\n fieldDef.errors.max = {\n code: 6,\n parameters:\n fieldDef.type === 41\n ? [(max * 100).toFixed(2) + '%']\n : [max],\n };\n return false;\n };\n })(validator.maximum);\n }\n }\n if (validator.minimum !== null) {\n if ($window.isGuid(validator.minimum)) {\n if (bindErrors)\n bindErrors.addError('min', 24, [validator.minimum]);\n ngModel.$validators.min = (function(min) {\n return function(modelValue) {\n if (modelValue === null) return true;\n var other = getFieldValue(min);\n if (\n typeof other === 'undefined' ||\n other === null ||\n isNaN(other)\n )\n return true;\n if (Number(modelValue) >= Number(other)) return true;\n fieldDef.errors.min = {\n code: 24,\n parameters: [min],\n };\n return false;\n };\n })(validator.minimum);\n } else {\n if (bindErrors)\n bindErrors.addError(\n 'min',\n 5,\n fieldDef.type === 41\n ? [(validator.minimum * 100).toFixed(2) + '%']\n : [validator.minimum],\n );\n ngModel.$validators.min = (function(min) {\n return function(modelValue) {\n if (modelValue === null) return true;\n if (isNaN(modelValue)) return false;\n if (Number(modelValue) >= Number(min)) return true;\n return false;\n };\n })(validator.minimum);\n }\n }\n }\n //if (bindErrors) {\n // ngModel.$viewChangeListeners.push(function () {\n // bindErrors.refreshErrors(ngModel.$error);\n // });\n // scope.$on('$destroy', function () {\n // bindErrors.refreshErrors();\n // });\n //}\n });\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('validatePassword', [\n function() {\n return {\n restrict: 'A',\n require: 'ngModel',\n link: function(scope, element, attributes, ngModel) {\n ngModel.$validators.pwdLength = function(modelValue) {\n return modelValue.length >= 8; //Minimum 8 characters\n };\n\n ngModel.$validators.pwdCapital = function(modelValue) {\n return !!modelValue.match(/[A-Z]/); //Minimum 1 capital\n };\n ngModel.$validators.pwdNonCapital = function(modelValue) {\n return !!modelValue.match(/[a-z]/); //Minimum 1 non-capital\n };\n ngModel.$validators.pwdNumber = function(modelValue) {\n return !!modelValue.match(/\\d/); //Minimum 1 number\n };\n ngModel.$validators.pwdSpecial = function(modelValue) {\n return !!modelValue.match(/[~\\-!@@#\\$%\\^&\\*\\\\.]/); //Minimum 1 special character\n };\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular\n .module('cloudX')\n .directive('validateStructuredCommunication', function() {\n return {\n restrict: 'A',\n require: ['?ngModel', '^?bindErrors'],\n link: function(scope, element, attrs, ctrls) {\n var ngModel = ctrls[0];\n var bindErrors = ctrls[1];\n if (!ngModel) return; // do nothing if no ng-model\n\n ngModel.$validators.structuredCommunication = function(\n modelValue,\n viewValue,\n ) {\n var value = modelValue || viewValue || null;\n if (value === null) return true; //Allow null and empty values\n //Replace invalid characters and spaces\n value = value.replace(/[^0-9]/g, '');\n if (value.length !== 12) return false;\n var toTest = value.substr(0, 10);\n var mod = parseInt(toTest) % 97 || 97;\n return mod === parseInt(value.substr(10));\n };\n if (bindErrors) {\n bindErrors.addError('structuredCommunication', 6017);\n }\n },\n };\n });\n","import angular from 'angular';\n\nangular.module('cloudX').directive('validateTextField', [\n '$parse',\n function($parse) {\n return {\n restrict: 'A',\n require: ['ngModel', '^?bindErrors'],\n link: function(scope, element, attributes, ctrls) {\n var ngModel = ctrls[0];\n var bindErrors = ctrls[1];\n\n attributes.$observe('validateTextField', function(value) {\n if (!value) return;\n var fieldDef = scope.$eval(value);\n if (!fieldDef || !fieldDef.validators || !fieldDef.validators.length) return;\n for (var i = 0; i < fieldDef.validators.length; i++) {\n var validator = fieldDef.validators[i];\n if (!validator) continue;\n if (validator.maximum !== null) {\n if (bindErrors) bindErrors.addError('maxLength', 8, [validator.maximum]);\n ngModel.$validators.maxLength = (function(max) {\n return function(modelValue) {\n if (modelValue === null) return true;\n if (modelValue.length <= Number(max)) return true;\n return false;\n };\n })(validator.maximum);\n }\n\n if (validator.minimum !== null) {\n if (bindErrors) bindErrors.addError('minLength', 7, [validator.minimum]);\n ngModel.$validators.minLength = (function(min) {\n return function(modelValue) {\n if (modelValue === null) return true;\n if (modelValue.length >= Number(min)) return true;\n return false;\n };\n })(validator.minimum);\n }\n if (validator.regularExpression !== null && validator.regularExpression.length) {\n if (bindErrors) bindErrors.addError('pattern', 9, [fieldDef.id]);\n ngModel.$validators.pattern = (function(regex) {\n return function(modelValue) {\n if (modelValue === null) return true;\n if (typeof modelValue === 'undefined') return false;\n if (!modelValue.length) return true; //Empty strings are valid\n //Only test regex if there is a value\n if (regex.test(modelValue)) return true;\n return false;\n };\n })(new RegExp(validator.regularExpression));\n }\n }\n });\n //if (bindErrors) {\n // ngModel.$viewChangeListeners.push(function () {\n // bindErrors.refreshErrors(ngModel.$error);\n // });\n // scope.$on('$destroy', function () {\n // bindErrors.refreshErrors();\n // });\n //}\n },\n };\n },\n]);\n","import angular from 'angular';\nimport { checkVAT, countries } from 'jsvat';\n\nangular.module('cloudX').directive('validateVatNumber', [\n 'dataCache',\n function(dataCache) {\n return {\n restrict: 'A',\n require: ['?ngModel', '^?bindErrors'],\n link: function(scope, element, attrs, ctrls) {\n var ngModel = ctrls[0];\n var bindErrors = ctrls[1];\n if (!ngModel) return; // do nothing if no ng-model\n\n var tenantConfiguration = dataCache.getArray('tenantConfiguration');\n if (tenantConfiguration == 2) return; // Skip vat number validation for south africa\n\n ngModel.$validators.vatNumber = function(modelValue, viewValue) {\n var value = modelValue || viewValue || null;\n if (value === null) return true; //Allow null and empty values\n //Replace invalid characters and spaces\n value = value.replace(/[^0-9a-zA-Z]/g, '');\n if (value.length <= 2) return false;\n\n // we manually validate Belgian VAT numbers based on the jsvat library's code, because the library doesn't support\n // VAT numbers starting with a 1 yet. These are introduced starting 01/01/2023\n if (value && (value.startsWith('BE') || value.startsWith('be'))) {\n return validateBelgianVatNumber(value);\n } else {\n var vatCheckResult = checkVAT(value, countries);\n\n return vatCheckResult.isValid;\n }\n };\n\n if (bindErrors) {\n bindErrors.addError('vatNumber', 14006);\n }\n\n function validateBelgianVatNumber(value) {\n if (Number(value.slice(1, 2)) === 0) {\n return false;\n }\n const valueWithoutPrefix = value.length === 9 ? value : value.substring(2);\n const check = 97 - (Number(valueWithoutPrefix.slice(0, 8)) % 97);\n return check === Number(valueWithoutPrefix.slice(8, 10));\n }\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('validateWebsite', [\n function() {\n return {\n restrict: 'A',\n require: ['?ngModel', '^?bindErrors'],\n link: function(scope, element, attributes, ctrls) {\n var ngModel = ctrls[0];\n var bindErrors = ctrls[1];\n if (!ngModel) return;\n ngModel.$validators.website = function(modelValue) {\n //Allow empty, use the required validator to block empty values\n if (\n typeof modelValue === 'undefined' ||\n modelValue === null ||\n modelValue.length === 0\n )\n return true;\n return /^(http\\:\\/\\/|https\\:\\/\\/)?([a-z0-9][a-z0-9\\\\-]*\\.)+[a-z0-9][a-z0-9\\\\-]*([\\/?#].*)?$/i.test(\n modelValue,\n );\n };\n if (bindErrors) {\n bindErrors.addError('website', 9, ['Website']);\n //ngModel.$viewChangeListeners.push(function () {\n // bindErrors.refreshErrors(ngModel.$error);\n //});\n //scope.$on('$destroy', function () {\n // bindErrors.refreshErrors();\n //});\n }\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxConfigRelevancy', [\n function() {\n return {\n restrict: 'E',\n template: require('./configRelevancy.html'),\n scope: {\n nullValue: '=',\n disabled: '=ngDisabled',\n },\n require: ['ngModel', 'cxConfigRelevancy'],\n link: function(scope, el, attrs, ctrl) {\n if (!ctrl || ctrl.length !== 2) return;\n ctrl[1].init(ctrl[0]);\n },\n controller: [\n '$scope',\n function($scope) {\n $scope.collapsed = true;\n $scope.crmTypes = [];\n $scope.allChecked = [false, false];\n // Other = 0,\n // Prospect = 2,\n // Customer = 3\n // OwnCompany = 4\n $scope.crmTypes = [0, 2, 3, 4];\n\n $scope.transformBack = function() {\n var rel = $scope.relevancy;\n if (!rel) return;\n var all = true;\n var none = true;\n var output = [];\n\n for (var j = 0; j <= 2; j++) {\n var typeOutput = [];\n var typeAll = true;\n var typeNone = true;\n for (var i = 0; i < $scope.crmTypes.length; i++) {\n if (rel[j][$scope.crmTypes[i]]) {\n typeOutput.push($scope.crmTypes[i]);\n typeNone = false;\n none = false;\n } else typeAll = false;\n }\n if (typeAll) typeOutput = null;\n else all = false;\n if (!typeNone)\n output.push({\n relationType: j,\n crmTypes: typeOutput,\n });\n }\n if (all) output = $scope.nullValue ? null : [];\n if (none) output = !$scope.nullValue ? null : [];\n $scope.setViewValue(output);\n };\n\n $scope.toggleChecked = function(type) {\n if ($scope.disabled) return;\n $scope.allChecked[type] = !$scope.allChecked[type];\n for (var i = 0; i < $scope.crmTypes.length; i++) {\n $scope.relevancy[type][$scope.crmTypes[i]] = $scope.allChecked[type];\n }\n $scope.transformBack();\n };\n\n this.init = function(ngModel) {\n // when angular detects a change to the model,\n // we update our inner value\n ngModel.$render = function() {\n $scope.relevancy = [{}, {}, {}];\n for (var i = 0; i < $scope.crmTypes.length; i++) {\n var crm = $scope.crmTypes[i];\n var data = ngModel.$viewValue;\n if (data) {\n if (data.length > 0) {\n for (var j = 0; j < data.length; j++) {\n var relType = data[j].relationType;\n var maxRelType = typeof relType === 'undefined' ? 2 : relType;\n relType = relType || 0;\n for (var r = relType; r <= maxRelType; r++) {\n if (data[j].crmTypes) {\n $scope.relevancy[r][crm] = data[j].crmTypes.indexOf(crm) >= 0;\n } else {\n $scope.relevancy[r][crm] = true;\n }\n }\n }\n } else {\n //Empty array\n $scope.relevancy[0][crm] = !$scope.nullValue;\n $scope.relevancy[1][crm] = !$scope.nullValue;\n $scope.relevancy[2][crm] = !$scope.nullValue;\n }\n } else {\n $scope.relevancy[0][crm] = $scope.nullValue;\n $scope.relevancy[1][crm] = $scope.nullValue;\n $scope.relevancy[2][crm] = $scope.nullValue;\n }\n }\n };\n $scope.setViewValue = function(value) {\n ngModel.$setViewValue(value);\n };\n };\n },\n ],\n };\n },\n]);\n","import angular from 'angular';\n\nangular\n .module('cloudX')\n .controller('ConfigFieldDialogCtrl', [\n 'resourceFactorySvc',\n 'flySvc',\n 'close',\n 'field',\n 'fields',\n ConfigFieldDialogCtrl,\n ]);\n\nfunction ConfigFieldDialogCtrl(resourceFactorySvc, flySvc, close, field, fields) {\n var validatorTypes = [1, 2, 3, 5, 6, 7, 8, 37, 38, 41, 44, 86];\n var inputMaskTypes = [5, 6, 7, 37, 38, 44];\n var vm = this;\n vm.editMode = !!field.id;\n vm.fields = angular.copy(fields);\n\n vm.field = angular.copy(field);\n\n vm.save = function() {\n if (vm.editMode)\n resourceFactorySvc.get('field').update(\n vm.field,\n function() {\n close(vm.field, 500);\n flySvc.success('Field updated');\n },\n function(response) {\n flySvc.error(response.data.exceptionMessage);\n },\n );\n else\n resourceFactorySvc.get('field').save(\n vm.field,\n function() {\n close(vm.field, 500);\n flySvc.success('Field added');\n },\n function(response) {\n flySvc.error(response.data.exceptionMessage);\n },\n );\n };\n vm.cancel = function() {\n close(null, 500);\n };\n vm.delete = function() {\n resourceFactorySvc.get('field').delete(\n {\n id: vm.field.id,\n },\n function() {\n vm.field.removed = true;\n close(vm.field, 500);\n flySvc.success('Field config removed');\n },\n function(response) {\n flySvc.error(response.data.exceptionMessage);\n },\n );\n };\n\n vm.showValidators = function(type) {\n return validatorTypes.indexOf(type) >= 0;\n };\n vm.deleteValidation = function(index) {\n if (index > -1) vm.field.validators.splice(index, 1);\n };\n vm.addValidation = function() {\n if (!vm.field.validators) vm.field.validators = [];\n vm.field.validators.push({});\n };\n\n vm.showInputMasks = function(type) {\n return inputMaskTypes.indexOf(type) >= 0;\n };\n vm.deleteInputMask = function(country) {\n if (!country) return;\n country = country.toUpperCase();\n delete vm.field.inputMasks[country];\n };\n vm.addInputMask = function(country) {\n if (!country) return;\n country = country.toUpperCase();\n if (!vm.field.inputMasks) vm.field.inputMasks = {};\n if (vm.field.inputMasks.hasOwnProperty(country)) return;\n vm.field.inputMasks[country] = '';\n };\n}\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxConfigValidator', [\n function() {\n return {\n restrict: 'E',\n template: require('./configValidator.html'),\n replace: true,\n scope: {\n validator: '=',\n fields: '=',\n fieldType: '@',\n fieldId: '@',\n idx: '@',\n remove: '&delete',\n },\n controller: [\n '$scope',\n function($scope) {\n $scope.validatorType = -1;\n $scope.fields = $scope.fields.filter(function(el) {\n return '' + el.type === '' + $scope.fieldType && el.id !== $scope.fieldId;\n });\n\n function getType(value) {\n if (isGuid(value)) return 1;\n if (\n $scope.validatorType === 2 &&\n typeof value === 'string' &&\n value.toUpperCase() === 'TODAY'\n )\n return 2;\n\n return 0;\n }\n\n switch ($scope.fieldType) {\n case '1':\n $scope.validatorType = 1;\n $scope.numStep = 1;\n break;\n case '2':\n case '41':\n $scope.validatorType = 1;\n $scope.numStep = 0.01;\n break;\n case '3':\n $scope.dateMin = {\n today: $scope.validator.minimum === 'TODAY',\n opened: false,\n };\n $scope.dateMax = {\n today: $scope.validator.maximum === 'TODAY',\n opened: false,\n };\n if (\n typeof $scope.validator.minimum === 'string' &&\n $scope.validator.minimum !== 'TODAY' &&\n !isGuid($scope.validator.minimum)\n )\n $scope.validator.minimum = Date.parse($scope.validator.minimum);\n if (\n typeof $scope.validator.maximum === 'string' &&\n $scope.validator.maximum !== 'TODAY' &&\n !isGuid($scope.validator.maximum)\n )\n $scope.validator.maximum = Date.parse($scope.validator.maximum);\n $scope.validatorType = 2;\n break;\n case '5':\n $scope.maxStringLength = 25;\n $scope.validatorType = 3;\n break;\n case '6':\n $scope.maxStringLength = 100;\n $scope.validatorType = 3;\n break;\n case '7':\n case '37':\n case '38':\n case '44':\n $scope.maxStringLength = 255;\n $scope.validatorType = 3;\n break;\n case '8':\n case '86':\n $scope.maxStringLength = undefined;\n $scope.validatorType = 3;\n break;\n }\n\n $scope.show = {\n country: $scope.validator.country != null,\n minimum: $scope.validator.minimum != null,\n maximum: $scope.validator.maximum != null,\n regularExpression: $scope.validator.regularExpression != null,\n\n minimumType: getType($scope.validator.minimum),\n maximumType: getType($scope.validator.maximum),\n };\n\n $scope.validator.type = $scope.validatorType;\n\n $scope.toggle = function(prop) {\n if (!$scope.show[prop]) $scope.validator[prop] = null;\n };\n },\n ],\n };\n },\n]);\n","import angular from 'angular';\n\nangular\n .module('cloudX')\n .controller('FieldConfigCtrl', ['resourceFactorySvc', 'ModalService', FieldConfigCtrl]);\n\nfunction FieldConfigCtrl(resourceFactorySvc, ModalService) {\n var vm = this;\n vm.fields = [];\n\n vm.predicate = 'label';\n vm.reverse = false;\n\n vm.sort = function(predicate) {\n vm.reverse = vm.predicate === predicate ? !vm.reverse : false;\n vm.predicate = predicate;\n };\n\n vm.editField = function(field) {\n ModalService.showModal({\n template: require('./configFieldDialog.html'),\n controller: 'ConfigFieldDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n field: field,\n fields: vm.fields,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.close.then(function(result) {\n if (result) {\n var index = vm.fields.indexOf(field);\n if (~index) vm.fields[index] = result;\n }\n });\n });\n };\n vm.addField = function() {\n ModalService.showModal({\n template: require('./configFieldDialog.html'),\n controller: 'ConfigFieldDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n field: {},\n fields: vm.fields,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.close.then(function(result) {\n if (result) vm.fields.push(result);\n });\n });\n };\n\n vm.reload = function() {\n vm.fields = resourceFactorySvc.get('field').query();\n };\n vm.reload();\n}\n","import angular from 'angular';\n\nangular\n .module('cloudX')\n .controller('ConfigAddSectionConfigCtrl', [\n 'dataCache',\n 'resourceFactorySvc',\n 'flySvc',\n 'translateListFilter',\n 'close',\n 'sectionId',\n 'column',\n 'position',\n ConfigAddSectionConfigCtrl,\n ]);\n\nfunction ConfigAddSectionConfigCtrl(\n dataCache,\n resourceFactorySvc,\n flySvc,\n translateListFilter,\n close,\n sectionId,\n column,\n position,\n) {\n var vm = this;\n vm.fields = [];\n resourceFactorySvc.get('field').query(function(data) {\n vm.fields = data.map(x => ({\n ...x,\n display: translateListFilter(x.id, 'field', x.label),\n }));\n });\n\n vm.config = {\n sectionId: sectionId,\n column: column,\n position: position,\n visibility: null,\n required: [],\n completeness: null,\n countries: null,\n countriesNot: null,\n configurations: null,\n };\n var sectionConfig = resourceFactorySvc.get('sectionConfig');\n\n vm.save = function() {\n if (!vm.config.fieldId) return;\n sectionConfig.save(\n vm.config,\n function(response) {\n close(response, 500);\n flySvc.success('Field config added');\n },\n function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n },\n );\n };\n vm.cancel = function() {\n close(null, 500);\n };\n\n vm.changeField = function(field) {\n vm.config.fieldId = field ? field.id : null;\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cloudX')\n .controller('ConfigEditSectionConfigCtrl', [\n 'dataCache',\n 'resourceFactorySvc',\n 'flySvc',\n 'close',\n 'config',\n 'fields',\n ConfigEditSectionConfigCtrl,\n ]);\n\nfunction ConfigEditSectionConfigCtrl(dataCache, resourceFactorySvc, flySvc, close, config, fields) {\n var vm = this;\n vm.field = fields[config.fieldId];\n\n vm.config = config;\n var sectionConfig = resourceFactorySvc.get('sectionConfig');\n\n vm.save = function() {\n sectionConfig.update(\n [vm.config],\n function(response) {\n close(response, 500);\n flySvc.success('Field config modified');\n },\n function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n },\n );\n };\n vm.delete = function() {\n sectionConfig.delete(\n {\n id: config.id,\n },\n function(response) {\n config.removed = true;\n close(config, 500);\n flySvc.success('Field config removed');\n },\n function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n },\n );\n };\n\n vm.cancel = function() {\n close(null, 500);\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cloudX')\n .controller('ConfigSectionCtrl', [\n '$scope',\n '$timeout',\n 'dataCache',\n 'resourceFactorySvc',\n 'ModalService',\n ConfigSectionCtrl,\n ]);\n\nfunction ConfigSectionCtrl($scope, $timeout, dataCache, resourceFactorySvc, ModalService) {\n $scope.collapsed = true;\n $scope.loaded = false;\n var colWatch = function(colIndex) {\n var index = colIndex;\n return function(newValues, oldValues) {\n if (!$scope.loaded) return;\n\n var column = $scope.columns[index];\n for (var pos = 0; pos < column.length; pos++) {\n column[pos].column = parseInt(index);\n column[pos].position = pos;\n column[pos].sectionId = $scope.section.id;\n }\n //console.log(\"saving\");\n resourceFactorySvc.get('sectionConfig').update(column);\n };\n };\n\n var configWatch = function() {\n var configs = $scope.configs[$scope.section.id] || [];\n var tmpColumns = {\n 0: [],\n 1: [],\n 2: [],\n };\n\n for (var j = 0; j < configs.length; j++)\n if (configs[j].column < 3) tmpColumns[configs[j].column].push(configs[j]);\n\n for (var i = 0; i < $scope.section.columns; i++) {\n tmpColumns[i].sort(function(a, b) {\n return a.position - b.position;\n });\n $scope.$watchCollection('columns[' + i + ']', colWatch(i));\n }\n $scope.columns = tmpColumns;\n };\n $scope.$watch('configs', configWatch);\n\n $scope.getRelevancyInfo = function(value) {\n if (value == null) return 0; //Non selected\n return value.length > 0\n ? 1 //Partial selected\n : 2; //All selected\n };\n\n $scope.add = function(col) {\n var pos = $scope.columns[col].length || 0;\n ModalService.showModal({\n template: require('./configAddSectionConfig.html'),\n controller: 'ConfigAddSectionConfigCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n sectionId: $scope.section.id,\n column: col,\n position: pos,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.close.then(function(result) {\n if (result) {\n $scope.columns[result.column].push(result);\n }\n });\n });\n };\n\n $scope.editConfig = function(config) {\n ModalService.showModal({\n template: require('./configEditSectionConfig.html'),\n controller: 'ConfigEditSectionConfigCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n config: config,\n fields: $scope.fields,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.close.then(function(result) {\n if (result && result.removed) {\n var idx = $scope.columns[result.column].indexOf(config);\n if (idx >= 0) $scope.columns[result.column].splice(idx, 1);\n }\n });\n });\n };\n $timeout(function() {\n $scope.loaded = true;\n }, 100);\n}\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxConfigSection', [\n function() {\n return {\n restrict: 'E',\n template: require('./configSection.html'),\n replace: true,\n scope: {\n section: '=',\n fields: '=',\n configs: '=',\n },\n controller: 'ConfigSectionCtrl',\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxConfigSubSection', [\n function() {\n return {\n restrict: 'E',\n template: require('./configSubSection.html'),\n replace: true,\n scope: {\n section: '=',\n fields: '=',\n configs: '=',\n },\n controller: 'ConfigSectionCtrl',\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').controller('SectionConfigCtrl', ['resourceFactorySvc', SectionConfigCtrl]);\n\nfunction SectionConfigCtrl(resourceFactorySvc) {\n var vm = this;\n vm.sections = [];\n vm.fields = {};\n vm.configs = {};\n\n vm.reload = function() {\n resourceFactorySvc.get('field').query(function(data) {\n vm.fields = data.reduce(function(o, e) {\n o[e.id] = e;\n return o;\n }, {});\n });\n resourceFactorySvc.get('sectionConfig').query(function(data) {\n //Group by sectionid\n vm.configs = data.reduce(function(o, e) {\n o[e.sectionId] = o[e.sectionId] || [];\n o[e.sectionId].push(e);\n return o;\n }, {});\n });\n vm.sections = resourceFactorySvc.get('section').query();\n };\n vm.reload();\n}\n","import { dynamicSort } from '@/shared/utils/dynamicSort';\nimport angular from 'angular';\nimport moment from 'moment';\n\nangular\n .module('cloudX')\n .controller('EmployeeDetailCtrl', [\n 'employee',\n 'resourceFactorySvc',\n 'flySvc',\n '$filter',\n '$q',\n '$state',\n 'dataCache',\n 'appSettings',\n 'ModalService',\n '$http',\n 'appUrls',\n '$translate',\n 'dialogsSvc',\n 'licensingSvc',\n 'authService',\n 'enumCacheSvc',\n employeeDetailCtrl,\n ]);\n\nfunction employeeDetailCtrl(\n employee,\n resourceFactorySvc,\n flySvc,\n $filter,\n $q,\n $state,\n dataCache,\n appSettings,\n ModalService,\n $http,\n appUrls,\n $translate,\n dialogsSvc,\n licensingSvc,\n authService,\n enumCacheSvc,\n) {\n var vm = this;\n var auth = authService.getClaims();\n vm.su = auth.su || 0;\n vm.errors = {};\n vm.userRoles = [];\n vm.licenseInfo = licensingSvc.getLicenseInformation();\n vm.currentEmployee = dataCache.getArray('employee').employeeID;\n vm.employeeProfiles = employee.employeeProfiles.map(x => ({\n ...x,\n name: x.isDefault ? `${x.name} 🟊` : x.name,\n }));\n vm.timeTable = null;\n vm.overtimeRemaining = null;\n if (!vm.licenseInfo || Object.keys(vm.licenseInfo).length === 0) {\n licensingSvc.reloadLicenseInformation().then(info => {\n vm.licenseInfo = info;\n });\n }\n vm.setEmployee = function(e) {\n vm.employee = { ...e };\n if (vm.employee.userID === '00000000-0000-0000-0000-000000000000') vm.employee.userID = null;\n if (typeof vm.employee.employeeStartDate === 'string')\n vm.employee.employeeStartDate = new Date(vm.employee.employeeStartDate);\n if (typeof vm.employee.employeeEndDate === 'string')\n vm.employee.employeeEndDate = new Date(vm.employee.employeeEndDate);\n vm.userRole =\n vm.employee.userRoles && vm.employee.userRoles.length ? vm.employee.userRoles[0] : null;\n if (vm.employee.license && vm.employee.license.isTemporary) {\n vm.employee.license.beginDate = moment(vm.employee.license.beginDate).toDate();\n vm.employee.license.endDate = moment(vm.employee.license.endDate).toDate();\n vm.employee.license.beginDateWarning = vm.employee.license.beginDate > new Date();\n vm.employee.license.endDateWarning = vm.employee.license.endDate < new Date();\n }\n };\n\n vm.setEmployee(employee);\n\n vm.select = function(employee) {\n $state.go('employees.detail', {\n id: employee.employeeID,\n });\n };\n\n var resource = resourceFactorySvc.get('employee');\n\n var handleEmployeeResponse = function(data) {\n vm.setEmployee(data);\n\n dataCache.getArray('employee').workDayStartHour = data.workDayStartHour;\n dataCache.getArray('employee').workDayEndHour = data.workDayEndHour;\n\n licensingSvc.reloadLicenseInformation();\n\n flySvc.success('msgConfirmChange');\n };\n\n vm.submit = function(newValue, field) {\n if (typeof newValue === 'undefined') {\n if (vm.errors) {\n for (var error in vm.errors) {\n if (vm.errors.hasOwnProperty(error) && error[0] !== '$') {\n if (vm.errors[error].code) {\n flySvc.error(\n vm.errors[error].code,\n vm.errors[error].code === 3000\n ? [field]\n : angular.copy(vm.errors[error].parameters),\n );\n }\n }\n }\n }\n return '';\n }\n if (field === 'userRole') {\n field = 'userRoles';\n newValue = newValue != null ? [newValue] : [];\n }\n if (field === 'employeeProfileId' && newValue) {\n newValue = newValue.id;\n }\n\n if (field === 'workDayStartHour' || field === 'workDayEndHour') {\n var date = moment(newValue, 'HH:mm:ss');\n if (!date.isValid()) return '';\n }\n\n // if value hasn't changed: return\n if (angular.equals(vm.employee[field], newValue)) return false;\n\n // try and save (a copy of) the emp with the new value...\n var empToSave = angular.copy(vm.employee);\n // user is a special case: the whole userObject is replaced.\n empToSave[field] = newValue;\n return resource.update(empToSave, handleEmployeeResponse, function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n return '';\n }).$promise;\n };\n\n vm.saveEmployeeTeams = function(data) {\n return resource.updateTeams(\n { id: vm.employee.employeeID },\n data,\n function(response) {\n flySvc.success('msgConfirmChange');\n },\n function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n return '';\n },\n ).$promise;\n };\n\n vm.saveEmployeeTags = function(data) {\n return resource.updateTags(\n { id: vm.employee.employeeID },\n data,\n function(response) {\n flySvc.success('msgConfirmChange');\n return response;\n },\n function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n return '';\n },\n ).$promise;\n };\n\n var saveUser = function(data) {\n if (data && data.userEmail) {\n var empToSave = angular.copy(vm.employee);\n angular.extend(empToSave, data);\n return resource.update(empToSave, handleEmployeeResponse).$promise;\n }\n return $q.when(true);\n };\n\n vm.updateInternalPrice = function(internalPrice) {\n if (vm.employee.internalPrice === internalPrice) return false;\n\n return dialogsSvc.updateInternalPrice(internalPrice).then(\n function(result) {\n if (!result) return false;\n\n result.employeeId = vm.employee.employeeID;\n\n $http.put(appUrls.api + '/api/employee/updateInternalPrice', result).then(\n function(result) {\n flySvc.success();\n return true;\n },\n function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n return '';\n },\n );\n },\n function(error) {\n return false;\n },\n );\n };\n\n vm.addUser = function() {\n ModalService.showModal({\n template: require('../dialogs/createUserProfileDialog.html'),\n controller: 'CreateUserProfileDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n employee: angular.copy(vm.employee),\n save: saveUser,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n });\n };\n vm.deleteEmployee = function() {\n if (!vm.employee.isActive) return;\n\n ModalService.showModal({\n template: require('../dialogs/deleteEmployeeDialog.html'),\n controller: 'DeleteEmployeeDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n employeeId: vm.employee.employeeID,\n userId: vm.employee.userID,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n modal.close.then(function(result) {\n if (!result) return;\n angular.extend(vm.employee, result);\n });\n });\n };\n vm.undeleteEmployee = function() {\n if (vm.employee.isActive) return;\n ModalService.showModal({\n template: require('../dialogs/undeleteEmployeeDialog.html'),\n controller: 'UndeleteEmployeeDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n employeeId: vm.employee.employeeID,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n modal.close.then(function(result) {\n if (result) {\n flySvc.success('msgEmployeeRestoreSuccesful');\n angular.extend(vm.employee, result);\n }\n });\n });\n };\n vm.deleteTimeTable = function() {\n dialogsSvc.showYesNo('msgConfirmDeleteTitle', 'msgConfirmDeleteTimeTable').then(function() {\n $http.delete(`${appUrls.api}/api/employee/TimeTable/${vm.employee.employeeID}`).then(() => {\n vm.timeTable = null;\n });\n });\n };\n\n $http.get(`${appUrls.api}/api/employee/TimeTable/${vm.employee.employeeID}`).then(({ data }) => {\n if (data) {\n vm.timeTable = data;\n $http\n .get(`${appUrls.api}/api/employee/OvertimeRemaining/${vm.employee.employeeID}`)\n .then(({ data: overtime }) => {\n vm.overtimeRemaining = overtime;\n });\n } else {\n vm.timeTable = null;\n vm.overtimeRemaining = null;\n }\n });\n\n vm.editTimeTable = function() {\n ModalService.showModal({\n template: require('../dialogs/employeeTimeTableDialog.html'),\n controller: 'EmployeeTimeTableDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n employee: vm.employee,\n timeTable: vm.timeTable,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n modal.close.then(function(result) {\n if (result) {\n vm.timeTable = result;\n }\n });\n });\n };\n vm.editOvertime = function() {\n ModalService.showModal({\n template: require('../dialogs/employeeOvertimeDialog.html'),\n controller: 'EmployeeOvertimeDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n employee: vm.employee,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n modal.close.then(function(result) {\n if (result !== null) {\n vm.overtimeRemaining = result;\n }\n });\n });\n };\n vm.translateEmailRemark = function() {\n if (!vm.employee?.userID) return;\n dialogsSvc\n .translateListItem('useremailremark', vm.employee.userID, '', {\n inputRows: 7,\n defaultRequired: false,\n maxlength: 500,\n })\n .then(function(result) {\n if (result) {\n //This is a special case for the translations.\n //If we use the default as fallback, you can't leave another language empty.\n flySvc.success();\n }\n });\n };\n $q.all([$http.get(`${appUrls.api}/api/TenantRole`), enumCacheSvc.get('role')]).then(\n ([{ data: tenantRoles }, defaultRoles]) => {\n vm.userRoles = [\n ...defaultRoles\n .map(x => ({\n role: x.key,\n label: $filter('translateList')(x.key, 'role', x.value),\n customRoleId: null,\n customRoleName: null,\n group: $translate.instant('DefaultRoles'),\n }))\n .sort(dynamicSort('role')),\n ...(tenantRoles || [])\n .map(x => ({\n role: 99,\n label: x.name,\n customRoleId: x.id,\n customRoleName: x.name,\n group: $translate.instant('CustomRoles'),\n }))\n .sort(dynamicSort('label')),\n ];\n if (vm.userRole) {\n vm.userRole = vm.userRoles.find(\n x =>\n x.role === vm.userRole.role &&\n (x.role != 99 || x.customRoleId == vm.userRole.customRoleId),\n );\n }\n },\n );\n}\n","import angular from 'angular';\n\nangular\n .module('cloudX')\n .controller('CreateUserProfileDialogCtrl', [\n '$element',\n '$q',\n 'flySvc',\n 'close',\n 'employee',\n 'save',\n createUserProfileDialogCtrl,\n ]);\n\nfunction createUserProfileDialogCtrl($element, $q, flySvc, close, employee, save) {\n var vm = this;\n\n vm.employee = employee;\n vm.data = {\n userEmail: employee.employeeEmail || '',\n userEnabled: true,\n userLanguage: 'nl',\n userTravelFromHome: false,\n userTravelOneWay: false,\n };\n\n vm.save = function() {\n vm.data.userRoles = vm.data.userRole !== null ? [vm.data.userRole] : [];\n\n $q.when(save(vm.data)).then(\n function(result) {\n close(result, 500);\n $element.modal('hide');\n },\n function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n },\n );\n };\n vm.cancel = function() {\n close(null, 500);\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cloudX')\n .controller('AddEmployeeProfileDialogCtrl', [\n '$element',\n '$scope',\n 'flySvc',\n 'close',\n '$window',\n 'resourceFactorySvc',\n addEmployeeProfileDialogCtrl,\n ]);\n\nfunction addEmployeeProfileDialogCtrl(\n $element,\n $scope,\n flySvc,\n close,\n $window,\n resourceFactorySvc,\n) {\n var vm = this;\n\n var resource = resourceFactorySvc.get('employeeProfile');\n\n vm.employeeProfile = {\n name: '',\n };\n\n vm.save = function() {\n if (!vm.employeeProfile.name || vm.saving) return false;\n var model = angular.copy(vm.employeeProfile);\n vm.saving = true;\n resource.post(model).$promise.then(\n function(result) {\n vm.saving = false;\n close(result, 500);\n $element.modal('hide');\n },\n function(error) {\n vm.saving = false;\n flySvc.error(error.data.code, error.data.parameters);\n },\n );\n };\n\n vm.cancel = function() {\n vm.saving = false;\n close(null, 500);\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cloudX')\n .controller('DeleteEmployeeDialogCtrl', [\n 'close',\n '$element',\n 'resourceFactorySvc',\n 'licensingSvc',\n 'dataCache',\n 'flySvc',\n 'employeeId',\n 'userId',\n\n deleteEmployeeDialogCtrl,\n ]);\n\nfunction deleteEmployeeDialogCtrl(\n close,\n $element,\n resourceFactorySvc,\n licensingSvc,\n dataCache,\n flySvc,\n employeeId,\n userId,\n) {\n const vm = this;\n vm.keepVisible = true;\n vm.saving = false;\n\n vm.save = () => {\n if (vm.saving) return;\n vm.saving = true;\n resourceFactorySvc.get('employee').delete(\n {\n id: employeeId,\n hidden: !vm.keepVisible,\n },\n function(data) {\n var cached = userId ? dataCache.getObject('user')[userId] : null;\n if (cached) {\n cached.hidden = !vm.keepVisible;\n cached.isActive = false;\n }\n licensingSvc.reloadLicenseInformation();\n flySvc.success('msgEmpRemoved');\n vm.saving = false;\n close(data);\n $element.modal('hide');\n },\n function(error) {\n flySvc.error(error);\n vm.saving = false;\n },\n );\n };\n vm.cancel = () => {\n close(null, 500);\n };\n}\n","import angular from 'angular';\nimport moment from 'moment';\nimport { dynamicSortMultiple } from '@/shared/utils/dynamicSort';\nimport dateFormatService from '../../../shared/services/DateFormatService';\n\nangular\n .module('cxSettings')\n .controller('UndeleteEmployeeDialogCtrl', [\n '$element',\n '$http',\n 'appUrls',\n 'flySvc',\n 'close',\n 'employeeId',\n undeleteEmployeeDialogCtrl,\n ]);\n\nfunction undeleteEmployeeDialogCtrl($element, $http, appUrls, flySvc, close, employeeId) {\n var vm = this;\n vm.licenceType = 2;\n\n const today = moment().utc().startOf('day');\n vm.months = 1;\n vm.licenseInformation = {};\n vm.licenses = [];\n vm.licenseId = null;\n vm.loaded = false;\n\n vm.beginDate = moment.utc(today).toDate();\n vm.endDate = moment.utc(today).add(1, 'months').toDate();\n\n $http.get(appUrls.api + '/api/License/Info').then(({ data }) => {\n vm.licenseInformation = data;\n vm.licenses = [\n ...(data.temporaryLicenses || [])\n .filter((x) => !x.userId)\n .map((x) => ({\n ...x,\n name: `${dateFormatService.formatDate(x.beginDate)} - ${dateFormatService.formatDate(\n x.endDate,\n )}`,\n }))\n .sort(dynamicSortMultiple('beginDate', 'endDate')),\n ];\n\n if (vm.licenseInformation.availableLicenses > 0) vm.licenceType = 1;\n if (!vm.licenseInformation.billPerLicense) {\n vm.save();\n } else {\n vm.loaded = true;\n }\n });\n\n vm.beginDateOptions = {\n minDate: moment.utc(today).toDate(),\n };\n vm.endDateOptions = {\n minDate: moment.utc(today).add(1, 'months').toDate(),\n maxDate: moment.utc(today).add(7, 'months').toDate(),\n };\n\n vm.datesChanged = function () {\n if (vm.beginDate) {\n vm.endDateOptions.minDate = moment.utc(vm.beginDate).add(1, 'months').toDate();\n vm.endDateOptions.maxDate = moment.utc(vm.beginDate).add(6, 'months').toDate();\n }\n if (vm.endDate) {\n if (vm.endDate > vm.endDateOptions.maxDate) {\n vm.endDate = vm.endDateOptions.maxDate;\n }\n if (vm.endDate < vm.endDateOptions.minDate) {\n vm.endDate = vm.endDateOptions.minDate;\n }\n vm.months = moment.utc(vm.endDate).diff(moment.utc(vm.beginDate), 'months', true).round(5);\n }\n };\n vm.datesChanged();\n vm.addMonths = function (nr) {\n vm.endDate = moment.utc(vm.endDate).add(nr, 'months').toDate();\n vm.datesChanged();\n };\n vm.setDuration = function (nr) {\n vm.endDate = moment.utc(vm.beginDate).add(nr, 'months').toDate();\n vm.datesChanged();\n };\n vm.save = function () {\n var model = {\n employeeId,\n license: null,\n buyNewLicense: vm.licenceType === 2 || vm.licenceType === 4,\n };\n if (vm.licenceType === 3) {\n const license = vm.licenses.find((x) => x.id === vm.licenseId);\n if (!license) return;\n model.license = license;\n } else if (vm.licenceType === 4) {\n model.license = {\n id: null,\n isTemporary: true,\n beginDate: vm.beginDate,\n endDate: vm.endDate,\n };\n }\n if (model.license) {\n //Dates are required for temp licenses\n if (!model.license.beginDate || !model.license.endDate) return;\n if (model.license.beginDate instanceof Date)\n model.license.beginDate = moment.utc(model.license.beginDate);\n if (model.license.endDate instanceof Date)\n model.license.endDate = moment.utc(model.license.endDate);\n }\n vm.saving = true;\n\n return $http\n .post(`${appUrls.api}/api/Employee/Undelete`, model)\n .then(({ data }) => {\n $element.modal('hide');\n close(data, 500);\n }, flySvc.error)\n .finally(function () {\n vm.saving = false;\n });\n };\n\n vm.cancel = function () {\n close(null, 500);\n };\n}\n","import angular from 'angular';\nimport moment from 'moment';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\n\nangular\n .module('cloudX')\n .controller('EmployeeOvertimeDialogCtrl', [\n '$element',\n '$q',\n '$http',\n 'appUrls',\n 'flySvc',\n 'close',\n 'employee',\n employeeOvertimeDialogCtrl,\n ]);\nconst mapCorrection = x => ({\n ...x,\n date: moment.utc(x.date).toDate(),\n createDate: x.createDate ? moment.utc(x.createDate).toDate() : null,\n});\n\nfunction employeeOvertimeDialogCtrl($element, $q, $http, appUrls, flySvc, close, employee) {\n var vm = this;\n vm.loading = true;\n vm.saving = false;\n vm.employee = employee;\n vm.data = [];\n vm.model = {};\n vm.overtimeRemaining = null;\n vm.correction = 0;\n vm.factor = 1;\n vm.remark = '';\n\n vm.reloadData = function() {\n return $http\n .get(`${appUrls.api}/api/employee/OvertimeCorrection/${vm.employee.employeeID}`)\n .then(({ data }) => {\n vm.data = (data || []).map(mapCorrection);\n }, flySvc.error);\n };\n vm.refreshRemainingOvertime = function() {\n return $http\n .get(`${appUrls.api}/api/employee/OvertimeRemaining/${vm.employee.employeeID}`)\n .then(({ data }) => {\n vm.overtimeRemaining = data;\n vm.factor = data > 0 ? -1 : 1;\n }, flySvc.error);\n };\n $q.all([vm.reloadData(), vm.refreshRemainingOvertime()]).finally(() => {\n vm.loading = false;\n });\n\n vm.resetModel = function() {\n vm.model = {\n employeeId: employee.employeeID,\n date: moment\n .utc()\n .startOf('day')\n .toDate(),\n correction: null,\n remark: '',\n };\n vm.correction = 0;\n if (vm.inputForm) {\n vm.inputForm.$setPristine();\n vm.inputForm.$setUntouched();\n }\n };\n\n vm.addRow = function() {\n if (vm.inputForm.$invalid) return;\n if (!vm.correction) return;\n if (vm.saving) return;\n vm.saving = true;\n var model = angular.copy(vm.model);\n model.correction = vm.correction * vm.factor;\n return $http\n .post(`${appUrls.api}/api/employee/OvertimeCorrection`, model)\n .then(({ data }) => {\n if (!data) return;\n var row = mapCorrection(data);\n vm.data.push(row);\n vm.data.sort(dynamicSort('-date'));\n vm.resetModel();\n return vm.refreshRemainingOvertime().then(() => {\n close(vm.overtimeRemaining, 500);\n $element.modal('hide');\n });\n }, flySvc.error)\n .finally(() => {\n vm.saving = false;\n });\n };\n\n vm.deleteRow = function(row) {\n if (vm.saving) return;\n vm.saving = true;\n\n return $http\n .delete(`${appUrls.api}/api/employee/OvertimeCorrection/${row.id}`)\n .then(() => {\n var idx = vm.data.indexOf(row);\n if (idx >= 0) {\n vm.data.splice(idx, 1);\n\n return vm.refreshRemainingOvertime();\n }\n }, flySvc.error)\n .finally(() => {\n vm.saving = false;\n });\n };\n\n vm.resetModel();\n vm.cancel = function() {\n close(vm.overtimeRemaining, 500);\n };\n}\n","import angular from 'angular';\nimport utils from '@/shared/utils/adminpulse';\nimport moment from 'moment';\n\nconst dayPrefix = ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday'];\n\nconst calculateLineTotal = line => {\n let total = 0;\n if (!line.skipMorning) {\n total += (line.endMorning || 0) - (line.startMorning || 0);\n }\n if (!line.skipAfternoon) {\n total += (line.endAfternoon || 0) - (line.startAfternoon || 0);\n }\n return total;\n};\nconst getValidationErrors = line => {\n const errors = {};\n\n const startMorning = line.startMorning || 0;\n const endMorning = line.endMorning || 0;\n const startAfternoon = line.startAfternoon || 0;\n const endAfternoon = line.endAfternoon || 0;\n\n const skipMorning = startMorning === endMorning;\n const skipAfternoon = startAfternoon === endAfternoon;\n\n if (!skipMorning && startMorning > endMorning) {\n errors.startMorning = true;\n errors.endMorning = true;\n }\n if (!skipAfternoon && startAfternoon > endAfternoon) {\n errors.startAfternoon = true;\n errors.endAfternoon = true;\n }\n if (!skipMorning && !skipAfternoon && endMorning > startAfternoon) {\n errors.endMorning = true;\n errors.startAfternoon = true;\n }\n return errors;\n};\n\nconst emptyTimeSpan = '00:00:00';\nangular\n .module('cloudX')\n .controller('EmployeeTimeTableDialogCtrl', [\n '$element',\n '$translate',\n '$http',\n 'appUrls',\n 'dataCache',\n 'flySvc',\n 'close',\n 'employee',\n 'timeTable',\n employeeTimeTableDialogCtrl,\n ]);\nfunction employeeTimeTableDialogCtrl(\n $element,\n $translate,\n $http,\n appUrls,\n dataCache,\n flySvc,\n close,\n employee,\n timeTable,\n) {\n var vm = this;\n vm.invalid = false;\n vm.startDate = null;\n vm.prevStartDate = null;\n vm.saving = false;\n vm.employee = employee;\n vm.weekTotal = 0;\n vm.homeWorkingTotal = 0;\n\n vm.dayLabels = [\n $translate.instant('Sunday'),\n $translate.instant('Monday'),\n $translate.instant('Tuesday'),\n $translate.instant('Wednesday'),\n $translate.instant('Thursday'),\n $translate.instant('Friday'),\n $translate.instant('Saturday'),\n ];\n\n vm.save = function() {\n if (!vm.validate()) return;\n\n const model = vm.data.reduce(\n (result, line) => {\n const prefix = dayPrefix[line.day];\n result[`${prefix}StartMorning`] = utils.minutesToTimeSpan(\n line.skipMorning ? 0 : line.startMorning,\n );\n result[`${prefix}EndMorning`] = utils.minutesToTimeSpan(\n line.skipMorning ? 0 : line.endMorning,\n );\n result[`${prefix}StartAfternoon`] = utils.minutesToTimeSpan(\n line.skipAfternoon ? 0 : line.startAfternoon,\n );\n result[`${prefix}EndAfternoon`] = utils.minutesToTimeSpan(\n line.skipAfternoon ? 0 : line.endAfternoon,\n );\n result[`${prefix}HomeWorkingMinutes`] = line.homeWorking;\n return result;\n },\n {\n employeeId: employee.employeeID,\n dateFrom: vm.startDate,\n },\n );\n vm.saving = true;\n $http.put(`${appUrls.api}/api/employee/TimeTable`, model).then(\n ({ data }) => {\n if (!dataCache.getArray('employeeTimeTables')) {\n dataCache.update('employeeTimeTables', true);\n $translate.refresh(); //Reload translations (a new resource was probably added)\n }\n close(data, 500);\n $element.modal('hide');\n vm.saving = false;\n },\n function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n vm.saving = false;\n },\n );\n };\n vm.cancel = function() {\n close(null, 500);\n };\n\n vm.lineChanged = function(line) {\n line.skipMorning = (line.startMorning || 0) === (line.endMorning || 0);\n line.skipAfternoon = (line.startAfternoon || 0) === (line.endAfternoon || 0);\n line.total = calculateLineTotal(line);\n line.homeWorking = Math.max(0, Math.min(line.total, line.homeWorking));\n line.error = getValidationErrors(line);\n const wasInvalid = !!line.invalid;\n line.invalid = Object.keys(line.error).length > 0;\n if (line.invalid) {\n vm.invalid = true;\n } else if (wasInvalid && vm.invalid) {\n vm.validate(); //Run full validation\n }\n vm.weekTotal = vm.data.reduce((sum, line) => sum + line.total, 0);\n vm.homeWorkingTotal = vm.data.reduce((sum, line) => sum + line.homeWorking, 0);\n };\n vm.startDateChanged = function() {\n if (!vm.startDate) {\n vm.invalid = true;\n } else if (vm.invalid) {\n vm.validate(); //Run full validation\n }\n };\n vm.validate = function() {\n if (!vm.startDate) {\n vm.invalid = true;\n return false;\n }\n vm.invalid = false;\n vm.data.forEach(line => {\n line.error = getValidationErrors(line);\n line.invalid = Object.keys(line.error).length > 0;\n if (line.invalid) {\n vm.invalid = true;\n }\n });\n return !vm.invalid;\n };\n\n //Init timetable\n vm.data = [];\n for (let i = 1; i < 8; i += 1) {\n const day = i % 7;\n const line = {\n day,\n label: vm.dayLabels[day],\n total: 0,\n };\n if (timeTable) {\n const prefix = dayPrefix[day];\n line.startMorning = utils.timeSpanToMinutes(timeTable[`${prefix}StartMorning`]);\n line.endMorning = utils.timeSpanToMinutes(timeTable[`${prefix}EndMorning`]);\n line.startAfternoon = utils.timeSpanToMinutes(timeTable[`${prefix}StartAfternoon`]);\n line.endAfternoon = utils.timeSpanToMinutes(timeTable[`${prefix}EndAfternoon`]);\n line.homeWorking = parseInt(timeTable[`${prefix}HomeWorkingMinutes`]);\n } else {\n //New timetable\n if (day === 0 || day === 6) {\n //Weekend\n line.startMorning = null;\n line.endMorning = null;\n line.startAfternoon = null;\n line.endAfternoon = null;\n line.homeWorking = 0;\n } else {\n line.startMorning = 480; //8:00\n line.endMorning = 720; //12:00\n line.startAfternoon = 780; //13:00\n line.endAfternoon = 1020; //17:00\n line.homeWorking = 0;\n }\n }\n vm.lineChanged(line);\n vm.data.push(line);\n }\n if (timeTable) {\n vm.prevStartDate = moment.utc(timeTable.dateFrom).toDate();\n }\n}\n","import angular from 'angular';\nimport moment from 'moment';\nimport { dynamicSort, dynamicSortMultiple } from '@/shared/utils/dynamicSort';\nimport dateFormatService from '../../../shared/services/DateFormatService';\n\nangular\n .module('cloudX')\n .controller('EmpNewCtrl', [\n 'resourceFactorySvc',\n '$state',\n 'flySvc',\n 'licensingSvc',\n 'dataCache',\n '$translate',\n 'appSettings',\n '$stateParams',\n '$q',\n 'enumCacheSvc',\n '$filter',\n '$http',\n 'appUrls',\n empNewCtrl,\n ]);\n\nfunction empNewCtrl(\n resourceFactorySvc,\n $state,\n flySvc,\n licensingSvc,\n dataCache,\n $translate,\n appSettings,\n $stateParams,\n $q,\n enumCacheSvc,\n $filter,\n $http,\n appUrls,\n) {\n var vm = this;\n vm.isTrial = false;\n vm.appSettings = appSettings;\n vm.userRoles = [];\n vm.employeeProfiles = [];\n vm.showValidation = false;\n vm.isTemporary = $stateParams.temporary || false;\n vm.emp = {\n lastName: '',\n firstName: '',\n employeePhone: '',\n employeeAddress: {\n country: appSettings.defaultCountry,\n },\n employeeEmail: '',\n employeeStartDate: new Date(),\n employeeEndDate: '0001-01-01T00:00:00Z',\n employeeInitials: '',\n\n userID: null,\n userEmail: null,\n userRole: null,\n userEnabled: true,\n userLanguage: 'nl',\n userTravelFromHome: false,\n userTravelOneWay: false,\n license: null,\n companyId: dataCache.getDefaultCompany()?.id,\n };\n vm.licenses = [];\n vm.companies = dataCache.getArray('company');\n var resource = resourceFactorySvc.get('employee');\n var employeeProfileResource = resourceFactorySvc.get('employeeProfile');\n\n licensingSvc.reloadLicenseInformation().then(function(result) {\n if (result) {\n vm.licenseInformation = result;\n if (vm.isTemporary) {\n const newLicense = {\n beginDate: moment()\n .utc()\n .startOf('day')\n .toDate(),\n endDate: moment()\n .utc()\n .startOf('day')\n .add(1, 'months')\n .toDate(),\n name: $translate.instant('New temporary license'),\n isTemporary: true,\n };\n vm.licenses = [\n newLicense,\n ...(result.temporaryLicenses || [])\n .filter(x => !x.userId)\n .map(x => ({\n ...x,\n name: `${dateFormatService.formatDate(x.beginDate)} - ${dateFormatService.formatDate(\n x.endDate,\n )}`,\n }))\n .sort(dynamicSortMultiple('beginDate', 'endDate')),\n ];\n\n if (vm.licenses.length === 1) {\n vm.emp.license = newLicense;\n vm.licenseMonths = moment\n .utc(vm.emp.license.endDate)\n .diff(moment.utc(vm.emp.license.beginDate), 'months', true);\n } else if (vm.licenses.length > 1) {\n vm.emp.license = vm.licenses[1];\n vm.licenseChanged();\n }\n }\n }\n });\n\n employeeProfileResource.query().$promise.then(\n result => {\n vm.employeeProfiles = result;\n var defaultEmployeeProfile = vm.employeeProfiles.find(x => x.isDefault);\n\n if (defaultEmployeeProfile) {\n defaultEmployeeProfile.name = `${defaultEmployeeProfile.name} 🟊`;\n vm.emp.employeeProfileId = defaultEmployeeProfile.id;\n vm.emp.employeeProfile = defaultEmployeeProfile;\n }\n },\n error => {\n flySvc.error(error.data.code);\n },\n );\n\n dataCache.ready().then(function() {\n vm.emp.employeeAddress.country = appSettings.defaultCountry;\n });\n\n vm.submitNewEmp = function() {\n if (vm.newRelForm.$invalid) return;\n\n if (\n !vm.isTemporary &&\n vm.licenseInformation.availableLicenses === 0 &&\n !vm.emp.agreedNewLicense &&\n !vm.licenseInformation.isTrial &&\n vm.licenseInformation.billPerLicense\n )\n return;\n if (\n vm.isTemporary &&\n !vm.emp.license.id &&\n !vm.emp.agreedNewLicense &&\n vm.licenseInformation.billPerLicense\n )\n return;\n vm.emp.userRoles = vm.emp.userRole !== null ? [vm.emp.userRole] : [];\n vm.emp.employeeProfileId = vm.emp.employeeProfile ? vm.emp.employeeProfile.id : null;\n\n vm.saving = true;\n // save new employee\n return resource.create(\n vm.emp,\n function(success) {\n vm.saving = false;\n flySvc.success('msgNewEmpCreated');\n licensingSvc.reloadLicenseInformation();\n dataCache.getArray('user').push({\n employeeID: success.employeeID,\n userID: success.userID,\n firstName: success.firstName,\n lastName: success.lastName,\n isActive: success.isActive,\n languageCode: success.languageCode,\n email: success.userEmail,\n });\n $state.go('employees.overview');\n },\n function(error) {\n vm.saving = false;\n flySvc.error(error);\n },\n ).$promise;\n };\n\n vm.cancel = function() {\n $state.go('employees.overview');\n };\n\n vm.licBeginDateOptions = {\n minDate: moment()\n .utc()\n .startOf('day')\n .toDate(),\n };\n vm.licEndDateOptions = {};\n vm.licenseChanged = function() {\n vm.datesChanged();\n vm.emp.agreedNewLicense = !!vm.emp.license && !!vm.emp.license.id;\n };\n\n vm.datesChanged = function() {\n if (!vm.emp.license || vm.emp.license.id) return;\n if (vm.emp.license.beginDate) {\n vm.licEndDateOptions.minDate = moment\n .utc(vm.emp.license.beginDate)\n .add(1, 'months')\n .toDate();\n vm.licEndDateOptions.maxDate = moment\n .utc(vm.emp.license.beginDate)\n .add(6, 'months')\n .toDate();\n }\n if (vm.emp.license.endDate) {\n if (vm.emp.license.endDate > vm.licEndDateOptions.maxDate) {\n vm.emp.license.endDate = vm.licEndDateOptions.maxDate;\n }\n if (vm.emp.license.endDate < vm.licEndDateOptions.minDate) {\n vm.emp.license.endDate = vm.licEndDateOptions.minDate;\n }\n vm.licenseMonths = moment\n .utc(vm.emp.license.endDate)\n .diff(moment.utc(vm.emp.license.beginDate), 'months', true);\n }\n };\n $q.all([$http.get(`${appUrls.api}/api/TenantRole`), enumCacheSvc.get('role')]).then(\n ([{ data: tenantRoles }, defaultRoles]) => {\n vm.userRoles = [\n ...defaultRoles\n .map(x => ({\n role: x.key,\n label: $filter('translateList')(x.key, 'role', x.value),\n customRoleId: null,\n customRoleName: null,\n group: $translate.instant('DefaultRoles'),\n }))\n .sort(dynamicSort('role')),\n ...(tenantRoles || [])\n .map(x => ({\n role: 99,\n label: x.name,\n customRoleId: x.id,\n customRoleName: x.name,\n group: $translate.instant('CustomRoles'),\n }))\n .sort(dynamicSort('label')),\n ];\n },\n );\n}\n","import angular from 'angular';\nimport moment from 'moment';\nimport dateFormatService from '../../../shared/services/DateFormatService';\nimport SignalRService from '@/shared/services/SignalRService';\nimport userStorage from '@/shared/services/userStorage';\nimport { $q } from 'angular-ui-router';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\n\nconst columnSelectionStorageKey = 'EmployeeOverviewHiddenColumns';\nconst overviewParamsStorageKey = 'EmployeeOverviewParams';\nconst defaultFilters = {\n search: null,\n companyId: null,\n includeInvisible: false,\n activeEmployeeFilter: 1,\n employeeTypes: [],\n withLabels: [],\n customRoleId: null,\n userRoleId: null,\n userRole: null,\n};\n\nangular\n .module('cloudX')\n .controller('EmployeeOverviewCtrl', [\n 'resourceFactorySvc',\n 'dataCache',\n '$state',\n 'flySvc',\n 'checkSecurity',\n 'dialogsSvc',\n 'licensingSvc',\n '$translate',\n '$scope',\n 'ModalService',\n 'checkTenantConfiguration',\n '$http',\n 'appUrls',\n '$q',\n 'enumCacheSvc',\n '$filter',\n employeeOverviewCtrl,\n ]);\n\nfunction employeeOverviewCtrl(\n resourceFactorySvc,\n dataCache,\n $state,\n flySvc,\n checkSecurity,\n dialogsSvc,\n licensingSvc,\n $translate,\n $scope,\n ModalService,\n checkTenantConfiguration,\n $http,\n appUrls,\n $q,\n enumCacheSvc,\n $filter,\n) {\n var vm = this;\n vm.filters = {\n ...defaultFilters,\n };\n const resource = resourceFactorySvc.get('employee');\n const userResource = resourceFactorySvc.get('user');\n const employeeResource = resourceFactorySvc.get('employee');\n\n vm.employees = null;\n vm.totalEmployees = 0;\n vm.currentUser = dataCache.getArray('employee');\n vm.companies = dataCache.getArray('company');\n vm.userRoles = [];\n vm.licenseInformation = null;\n vm.usesSSO = checkTenantConfiguration('sso');\n vm.employeeProfiles = [];\n vm.tags = [];\n\n const dateFormat = dateFormatService.dateFormat();\n vm.retrieveTags = $http.get(appUrls.api + '/api/employee/tags');\n\n const getLicenseInfo = function(lic) {\n if (!lic) return lic;\n if (lic.isFree) {\n return { ...lic, icon: 'fa-gift', info: $translate.instant('Free license') };\n }\n if (!lic.isTemporary) {\n return { ...lic, icon: 'fa-check', info: $translate.instant('Standard license') };\n }\n const beginDate = moment(lic.beginDate);\n const endDate = moment(lic.endDate);\n\n const info = `${$translate.instant('Temporary license')}: ${beginDate.format(\n dateFormat,\n )} - ${endDate.format(dateFormat)}`;\n\n if (beginDate.isAfter(moment())) return { ...lic, icon: 'fa-hourglass-start text-blue', info };\n if (endDate.isAfter(moment())) return { ...lic, icon: 'fa-hourglass-half', info };\n return { ...lic, icon: 'fa-hourglass-end text-danger', info };\n };\n\n const mapEmployee = function(e) {\n if (e.license && e.license.id) {\n e.license = getLicenseInfo(e.license);\n }\n if (e.teams) {\n e.teamsText = vm.renderTeams(e);\n }\n return e;\n };\n vm.hasFilters = function() {\n return !angular.equals(defaultFilters, vm.filters);\n };\n vm.clearFilters = function() {\n vm.filters = { ...defaultFilters };\n if (vm.employees) {\n vm.employees.clearFilter();\n vm.employees.reload();\n }\n };\n vm.retrieveEmployees = p => {\n const params = { ...p, ...vm.filters };\n userStorage.setItem(overviewParamsStorageKey, { table: p, filters: vm.filters });\n // Check if userRole is present and modify params accordingly\n params.userRoleId = vm.filters.userRole ? vm.filters.userRole.role : null;\n params.customRoleId = vm.filters.userRole ? vm.filters.userRole.customRoleId : null;\n vm.hasFilter = vm.hasFilters();\n\n return $http.get(`${appUrls.api}/api/employee/Get`, { params }).then(function({ data }) {\n vm.totalEmployees = data.total;\n return data.data.map(mapEmployee);\n });\n };\n\n vm.reloadList = () => {\n vm.employees.reload();\n };\n\n function init() {\n const { table, filters } = userStorage.getItem(overviewParamsStorageKey) || {};\n if (table) {\n if (vm.employees) {\n vm.employees.initializeParams(table);\n } else {\n vm.initialTableParams = table;\n }\n }\n if (filters) {\n vm.filters = { ...vm.filters, ...filters };\n }\n vm.hasFilter = vm.hasFilters();\n\n licensingSvc.reloadLicenseInformation();\n resourceFactorySvc.get('employeeProfile').query(function(data) {\n vm.employeeProfiles = data.map(x => ({\n ...x,\n label: x.isDefault ? `${x.name} 🟊` : x.name,\n }));\n });\n }\n\n init();\n\n $scope.$watch(\n function() {\n return licensingSvc.getLicenseInformation();\n },\n function() {\n vm.licenseInformation = licensingSvc.getLicenseInformation();\n },\n );\n vm.open = function(employee) {\n if (checkSecurity('Users:r'))\n $state.go('employees.detail', {\n id: employee.employeeID,\n });\n };\n\n vm.renderTeams = function(employee) {\n if (!employee || !employee.teams) return '';\n return employee.teams.map(x => x.name).join(', ');\n };\n\n vm.delete = function(employee) {\n if (!employee.isActive) return;\n\n ModalService.showModal({\n template: require('../dialogs/deleteEmployeeDialog.html'),\n controller: 'DeleteEmployeeDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n employeeId: employee.employeeID,\n userId: employee.userID,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n modal.close.then(function(result) {\n if (!result) return;\n angular.extend(employee, mapEmployee(result));\n\n if (vm.filters.includeRemoved) return;\n var idx = vm.employees.indexOf(employee);\n if (idx >= 0) vm.employees.splice(idx, 1);\n });\n });\n };\n vm.reset = function(employee) {\n if (!employee.userID) return;\n if (employee.saving) return;\n userResource.reset(\n {\n id: employee.userID,\n },\n function(data) {\n employee.userConfirmed = false;\n flySvc.success('msgPasswordResetOtherUser');\n // update dataCache\n var cached = dataCache.getObject('user')[employee.userID];\n if (cached) cached.userConfirmed = false;\n employee.saving = false;\n },\n function(error) {\n flySvc.error(error);\n employee.saving = false;\n },\n );\n };\n vm.toggleHidden = function(employee) {\n if (employee.saving) return;\n employee.saving = true;\n const hidden = !employee.hidden;\n const employeeResource = resourceFactorySvc.get('employee');\n employeeResource.setHidden(\n { id: employee.employeeID, hidden },\n null,\n function() {\n employee.hidden = hidden;\n var cached = dataCache.getObject('user')[employee.userID];\n if (cached) cached.hidden = hidden;\n employee.saving = false;\n flySvc.success();\n },\n error => {\n flySvc.error(error);\n employee.saving = false;\n },\n );\n };\n\n vm.undelete = function(employee) {\n if (employee.isActive) return;\n if (employee.saving) return;\n\n ModalService.showModal({\n template: require('../dialogs/undeleteEmployeeDialog.html'),\n controller: 'UndeleteEmployeeDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n employeeId: employee.employeeID,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n modal.close.then(function(result) {\n if (result) {\n flySvc.success('msgEmployeeRestoreSuccesful');\n angular.extend(employee, mapEmployee(result));\n\n var cached = dataCache.getObject('user')[employee.userID];\n if (cached) {\n cached.hidden = false;\n cached.isActive = true;\n }\n licensingSvc.reloadLicenseInformation();\n }\n });\n });\n };\n vm.editEmployeeProfile = function(employee, profile) {\n if (!profile || !profile.id) return '';\n if (employee.employeeProfile && employee.employeeProfile.id === profile.id) return false;\n return resource\n .updateProfile({ id: employee.employeeID, profileId: profile.id }, null)\n .$promise.then(\n function() {\n employee.employeeProfile = profile;\n return false;\n },\n function(error) {\n flySvc.error(error);\n return '';\n },\n );\n };\n\n vm.launchReport = (path, parameters) => {\n vm.creatingReport = true;\n parameters.userRoleId = vm.filters.userRole ? vm.filters.userRole.role : null;\n parameters.customRoleId = vm.filters.userRole ? vm.filters.userRole.customRoleId : null;\n const params = {\n ...parameters,\n culture: $translate.use(),\n connectionId: SignalRService.getConnectionId(),\n };\n\n return $http.get(`${appUrls.api}/api/${path}`, { params }).then(\n function() {\n vm.creatingReport = false;\n flySvc.success('ExportToExcelStarted');\n },\n function(error) {\n vm.creatingReport = false;\n flySvc.error(error);\n },\n );\n };\n\n vm.createEmployeeReport = () => vm.launchReport('Employee/Report', vm.filters);\n vm.createOvertimeCorrectionsReport = filters =>\n vm.launchReport('Employee/OvertimeCorrection/Report', filters);\n\n vm.openSelectPeriodModal = () => {\n ModalService.showModal({\n template: require('./selectPeriodDialog.html'),\n controller: 'SelectPeriodDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {},\n }).then(modal => {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n modal.close.then(result => {\n if (!result) return;\n vm.createOvertimeCorrectionsReport(Object.assign(vm.filters, result));\n });\n });\n };\n\n //Column selection\n //List of columns that can be hidden\n vm.hideableColumns = [\n {\n key: 'phone',\n label: $translate.instant('Phone'),\n selected: true,\n },\n {\n key: 'email',\n label: $translate.instant('Email'),\n selected: true,\n },\n {\n key: 'dateOfBirth',\n label: $translate.instant('DateOfBirth'),\n selected: true,\n },\n { key: 'profile', label: $translate.instant('Price profile'), selected: true },\n {\n key: 'company',\n label: $translate.instant('OwnCompany'),\n show: true,\n hiddenBySecurity: vm.companies.length === 1,\n },\n {\n key: 'teams',\n label: $translate.instant('Team(s)'),\n show: true,\n selected: true,\n },\n { key: 'role', label: $translate.instant('Role(s)'), selected: true },\n { key: 'employeeType', label: $translate.instant('EmployeeType'), selected: true },\n {\n key: 'employeeNumber',\n label: $translate.instant('EmployeeNumber'),\n selected: false,\n },\n {\n key: 'startDate',\n label: $translate.instant('Employed since'),\n selected: true,\n },\n {\n key: 'endDate',\n label: $translate.instant('End date'),\n selected: true,\n },\n {\n key: 'employmentStartDate',\n label: $translate.instant('EmploymentStartDate'),\n selected: false,\n },\n {\n key: 'employmentEndDate',\n label: $translate.instant('EmploymentEndDate'),\n selected: false,\n },\n {\n key: 'license',\n label: $translate.instant('License'),\n selected: true,\n },\n {\n key: 'confirmed',\n label: $translate.instant('Confirmed'),\n selected: true,\n },\n {\n key: 'twoFaEnabled',\n label: $translate.instant('2FA'),\n selected: true,\n },\n ];\n //Store hidden columns in object for easy use\n vm.hiddenColumns = {};\n vm.rebuildHiddenColumns = function() {\n vm.hiddenColumns = vm.hideableColumns.reduce((r, i) => {\n r[i.key] = !i.selected;\n if (!i.selected) {\n vm.colspan -= 1;\n }\n return r;\n }, {});\n };\n vm.initHiddenColumns = function() {\n const hiddenColumns = userStorage.getItem(columnSelectionStorageKey) || [];\n if (hiddenColumns && Object.keys(hiddenColumns).length) {\n vm.hideableColumns.forEach(col => {\n if (typeof hiddenColumns[col.key] !== 'undefined') {\n col.selected = !hiddenColumns[col.key];\n }\n if (typeof col.hiddenBySecurity !== 'undefined' && !!col.hiddenBySecurity) {\n col.selected = false;\n }\n });\n }\n vm.rebuildHiddenColumns();\n };\n vm.openColumnConfigDialog = function() {\n dialogsSvc\n .showCheckboxList(\n 'msgSelectTableColumns',\n vm.hideableColumns\n .filter(x => !x.hiddenBySecurity)\n .map(({ key, label, selected }) => ({ key, label, selected })),\n )\n .then(function(result) {\n if (result) {\n vm.hideableColumns.forEach(col => {\n var item = result.find(x => x.key === col.key);\n if (!item) return;\n col.selected = !!item.selected;\n });\n vm.rebuildHiddenColumns();\n //Save hidden columns\n userStorage.setItem(columnSelectionStorageKey, vm.hiddenColumns);\n }\n });\n };\n vm.initHiddenColumns();\n $q.all([$http.get(`${appUrls.api}/api/TenantRole`), enumCacheSvc.get('role')]).then(\n ([{ data: tenantRoles }, defaultRoles]) => {\n vm.userRoles = [\n ...defaultRoles\n .map(x => ({\n role: x.key,\n label: $filter('translateList')(x.key, 'role', x.value),\n customRoleId: null,\n customRoleName: null,\n group: $translate.instant('DefaultRoles'),\n }))\n .sort(dynamicSort('role')),\n ...(tenantRoles || [])\n .map(x => ({\n role: 99,\n label: x.name,\n customRoleId: x.id,\n customRoleName: x.name,\n group: $translate.instant('CustomRoles'),\n }))\n .sort(dynamicSort('label')),\n ];\n if (vm.filters && vm.filters.userRole) {\n const { role, customRoleId } = vm.filters.userRole;\n vm.filters.userRole = vm.userRoles.find(\n x =>\n x.role === role &&\n (!customRoleId || (x.role === 99 && customRoleId === x.customRoleId)),\n );\n }\n },\n );\n}\n","import angular from 'angular';\nimport moment from \"moment\";\n\nangular\n .module('cloudX')\n .controller('SelectPeriodDialogCtrl', [\n 'close',\n '$element',\n selectPeriodDialogCtrl\n ]);\n\nfunction selectPeriodDialogCtrl(\n close,\n $element,\n) {\n const vm = this;\n vm.from = null;\n vm.until = null;\n vm.saving = false;\n vm.fromDateOpen = false;\n vm.untilDateOpen = false;\n vm.validPeriod = false;\n\n vm.dateFiltersChanged = () => {\n vm.validPeriod = !!vm.from && !!vm.until && vm.from < vm.until;\n }\n\n vm.save = () => {\n vm.saving = true;\n close({dateFrom: vm.from, dateUntil: vm.until});\n $element.modal('hide');\n };\n vm.cancel = () => {\n close(null, 500);\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cloudX')\n .factory('licensingSvc', ['$q', '$state', 'flySvc', '$http', 'appUrls', licensingSvc]);\n\nfunction licensingSvc($q, $state, flySvc, $http, appUrls) {\n var licenseInformation = {};\n\n function showError(error) {\n flySvc.error(error.data.code, error.data.parameters);\n }\n\n function getLicenseInformation() {\n return licenseInformation;\n }\n\n function reloadLicenseInformation() {\n return $http.get(appUrls.api + '/api/license/Info').then(\n function(result) {\n if (result.data) licenseInformation = result.data;\n return licenseInformation;\n },\n function(error) {\n showError(error);\n },\n );\n }\n\n return {\n getLicenseInformation: getLicenseInformation,\n reloadLicenseInformation: reloadLicenseInformation,\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cloudX')\n .controller('EmployeeProfileOverviewCtrl', [\n 'resourceFactorySvc',\n 'flySvc',\n 'dialogsSvc',\n 'ModalService',\n employeeProfileOverviewCtrl,\n ]);\n\nfunction employeeProfileOverviewCtrl(resourceFactorySvc, flySvc, dialogsSvc, ModalService) {\n var vm = this;\n var resource = resourceFactorySvc.get('employeeProfile');\n\n const retrieveProfiles = () => {\n resource.overview().$promise.then(\n result => (vm.employeeProfiles = result),\n error => {\n vm.employeeProfiles = [];\n console.error(error);\n },\n );\n };\n retrieveProfiles();\n\n var showError = function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n };\n\n vm.submit = function(employeeProfile, value, field) {\n if (angular.equals(employeeProfile[field], value)) return false;\n if (!value) return false;\n\n var model = angular.copy(employeeProfile);\n model[field] = value;\n\n resource.update(model).$promise.then(\n function(result) {\n if (result) {\n flySvc.success('msgConfirmChange');\n return true;\n }\n return '';\n },\n function(error) {\n showError(error);\n return '';\n },\n );\n };\n\n vm.delete = function(employeeProfile) {\n if (!employeeProfile.id || employeeProfile.isDefault) return false;\n\n return dialogsSvc.showYesNo('comfirmDeleteTitle', 'msgConfirmDeleteEmployeeProfile').then(\n function(result) {\n resource.delete({ id: employeeProfile.id }).$promise.then(function() {\n var idx = vm.employeeProfiles.indexOf(employeeProfile);\n if (idx >= 0) vm.employeeProfiles.splice(idx, 1);\n flySvc.success('msgConfirmChange');\n }, showError);\n return true;\n },\n function() {\n return false;\n },\n );\n };\n\n vm.add = function() {\n ModalService.showModal({\n template: require('../dialogs/addEmployeeProfileDialog.html'),\n controller: 'AddEmployeeProfileDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n modal.close.then(function(employeeProfile) {\n if (!employeeProfile) return;\n vm.employeeProfiles.push(employeeProfile);\n flySvc.success('msgConfirmChange');\n });\n });\n };\n\n vm.setDefault = function(employeeProfile) {\n if (!employeeProfile.id || employeeProfile.isDefault) return;\n resource.setDefault(\n { id: employeeProfile.id },\n null,\n function(result) {\n if (result && result.length) {\n result.forEach(p => {\n var profile = vm.employeeProfiles.find(x => x.id === p.id);\n if (profile) profile.isDefault = p.isDefault;\n });\n }\n\n flySvc.success('msgConfirmChange');\n },\n function(error) {\n showError(error);\n return '';\n },\n );\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cloudX')\n .factory('dashboardSvc', [\n '$q',\n '$state',\n 'resourceFactorySvc',\n 'flySvc',\n 'dataCache',\n 'checkSecurity',\n '$http',\n 'appUrls',\n '$timeout',\n dashboardSvc,\n ]);\n\nfunction dashboardSvc(\n $q,\n $state,\n resourceFactorySvc,\n flySvc,\n dataCache,\n checkSecurity,\n $http,\n appUrls,\n $timeout,\n) {\n var topCustomerRevenue = [];\n var billedPerMonth = [];\n var topCustomerDebt = [];\n var complianceStatistics = undefined;\n\n function showError(error) {\n flySvc.error(error.data.code, error.data.parameters);\n }\n\n function safeGetTopCustomerRevenue(companyId) {\n if (!checkSecurity('InvoiceFinal:r')) return $q.when([]);\n return resourceFactorySvc\n .get('invoice')\n .topcustomerrevenue({ companyId: companyId }, function (result) {\n topCustomerRevenue = result;\n }).$promise;\n }\n\n function reloadTopCustomerRevenue(companyId) {\n if (!companyId) {\n return dataCache.ready().then(() => {\n companyId = dataCache.getDefaultCompany().id;\n return safeGetTopCustomerRevenue(companyId);\n });\n } else {\n return safeGetTopCustomerRevenue(companyId);\n }\n }\n\n function safeGetBilledPerMonth(companyId) {\n if (!checkSecurity('InvoiceFinal:r')) return $q.when([]);\n return resourceFactorySvc\n .get('invoice')\n .billedpermonth({ companyId: companyId }, function (result) {\n billedPerMonth = result;\n }).$promise;\n }\n\n function reloadBilledPerMonth(companyId) {\n if (!companyId) {\n return dataCache.ready().then(() => {\n companyId = dataCache.getDefaultCompany().id;\n return safeGetBilledPerMonth(companyId);\n });\n } else {\n return safeGetBilledPerMonth(companyId);\n }\n }\n\n function safeGetTopCustomerDebt(companyId) {\n if (!checkSecurity('InvoiceFinal:r')) return $q.when([]);\n return resourceFactorySvc.get('invoice').topcustomerdebt(\n {\n companyId: companyId,\n },\n function (result) {\n topCustomerDebt = result;\n },\n ).$promise;\n }\n\n function reloadTopCustomerDebt(companyId) {\n if (!companyId) {\n return dataCache.ready().then(() => {\n companyId = dataCache.getDefaultCompany().id;\n return safeGetTopCustomerDebt(companyId);\n });\n } else {\n return safeGetTopCustomerDebt(companyId);\n }\n }\n\n function safeComplianceStatistics(companyId) {\n const promise = $http.get(appUrls.api + '/api/compliance/statistics?companyId=' + companyId);\n\n promise\n .then(function onfullFilled(response) {\n complianceStatistics = response.data;\n //return for chaining\n return response;\n });\n\n return promise;\n }\n\n function reloadComplianceStatistics(companyId) {\n if (!companyId) {\n return dataCache.ready().then(() => {\n companyId = dataCache.getDefaultCompany().id;\n return safeComplianceStatistics(companyId);\n });\n } else {\n return safeComplianceStatistics(companyId);\n }\n }\n\n return {\n getTopCustomerRevenue: function () {\n return topCustomerRevenue;\n },\n reloadTopCustomerRevenue: reloadTopCustomerRevenue,\n\n getBilledPerMonth: function () {\n return billedPerMonth;\n },\n reloadBilledPerMonth: reloadBilledPerMonth,\n\n getTopCustomerDebt: function () {\n return topCustomerDebt;\n },\n reloadTopCustomerDebt: reloadTopCustomerDebt,\n getComplianceStatistics: function () {\n return complianceStatistics;\n },\n reloadComplianceStatistics: reloadComplianceStatistics,\n };\n}\n","import angular from 'angular';\nimport eventBus from 'pubsub-js';\n\nangular.module('cloudX').directive('cxDashboardOwnCompanySelector', [\n function() {\n return {\n restrict: 'E',\n template: require('./dashboardOwnCompanySelector.html'),\n scope: { target: '@' },\n controller: [\n '$scope',\n 'dashboardSvc',\n 'dataCache',\n function($scope, dashboardSvc, dataCache) {\n $scope.companies = [];\n $scope.selectedCompany = {};\n\n dataCache.ready().then(() => {\n $scope.companies = dataCache.getArray('company');\n $scope.selectedCompany = $scope.companies.find(\n x => x.id == dataCache.getDefaultCompany().id,\n );\n });\n\n $scope.companyChanged = function(company) {\n Promise.all([\n dashboardSvc.reloadTopCustomerDebt(company.id),\n dashboardSvc.reloadBilledPerMonth(company.id),\n dashboardSvc.reloadTopCustomerRevenue(company.id),\n dashboardSvc.reloadComplianceStatistics(company.id),\n ]).then(function() {\n eventBus.publish('dashboardOwnCompanyChanged');\n });\n };\n },\n ],\n };\n },\n]);\n","import angular from 'angular';\nimport { dynamicSortMultiple, dynamicSort } from '@/shared/utils/dynamicSort';\nimport { $q } from '@uirouter/core';\nangular\n .module('cxInvoicing')\n .controller('BatchMailInvoicesDialogCtrl', [\n '$q',\n '$element',\n '$filter',\n 'templateHttpSvc',\n 'flySvc',\n 'close',\n '$http',\n '$translate',\n 'appUrls',\n 'dataCache',\n 'filters',\n 'batchParams',\n 'languages',\n 'companyId',\n 'dialogsSvc',\n batchMailInvoicesDialogCtrl,\n ]);\n\nfunction batchMailInvoicesDialogCtrl(\n $q,\n $element,\n $filter,\n templateHttpSvc,\n flySvc,\n close,\n $http,\n $translate,\n appUrls,\n dataCache,\n filters,\n batchParams,\n languages,\n companyId,\n dialogSvc,\n) {\n var vm = this;\n vm.templates = [];\n vm.template = null;\n vm.collapsedLanguages = { nl: true, fr: true, en: true };\n vm.userLanguage = $translate.use().split('-')[0];\n vm.companyId = companyId;\n vm.sendByPeppolIfStrategySetToPeppol = true;\n\n const company = companyId\n ? dataCache.getCompanySettings(companyId)\n : dataCache.getDefaultCompany();\n\n const { sendInvoiceTemplateId = null } = company || {};\n\n const contexts = dataCache.showPaymentMonitoring ? [0, 1, 2, 8, 16, 23] : [0, 1, 16, 23];\n\n if (languages && languages.length) {\n languages.forEach(lang => {\n vm.collapsedLanguages[lang] = false;\n });\n } else {\n vm.collapsedLanguages[vm.userLanguage] = false;\n }\n\n var showError = function(error) {\n vm.sending = false;\n flySvc.error(error);\n };\n\n templateHttpSvc.getTemplates().then(function(data) {\n vm.templates = data\n .filter(item => contexts.indexOf(item.context) >= 0)\n .map(item => {\n item.label = $filter('translateList')(item.id, 'template', item.name);\n item.contextLabel = $filter('translateList')(item.context, 'templatecontext');\n return item;\n })\n .sort(dynamicSortMultiple('context', 'label'));\n if (sendInvoiceTemplateId) {\n vm.template = vm.templates.find(x => x.id === sendInvoiceTemplateId);\n if (vm.template) vm.refreshPreview();\n }\n });\n\n vm.refreshPreview = function() {\n if (!vm.template || !vm.template.id) {\n vm.previews = null;\n return;\n }\n\n vm.previews = (languages && languages.length\n ? vm.template.languages.filter(x => languages.indexOf(x.languageCode) >= 0)\n : vm.template.languages\n ).sort((a, b) => {\n // Sort by user language first, then by language code\n if (a.languageCode === b.languageCode) return 0;\n if (a.languageCode === vm.userLanguage) return -1;\n if (b.languageCode === vm.userLanguage) return 1;\n return dynamicSort('languageCode')(a, b);\n });\n\n const withoutContent = vm.previews.filter(x => !x.content);\n if (withoutContent.length === 0) return;\n\n $q.all(\n withoutContent.map(x => templateHttpSvc.getContent(vm.template.id, x.languageCode)),\n ).then(data => {\n vm.previews = vm.previews.map(preview => {\n if (preview.content) return preview;\n var content = data.find(x => x.id === preview.id);\n return content || preview;\n });\n });\n };\n vm.toggleLanguageCollapse = function(lang) {\n vm.collapsedLanguages[lang] = !vm.collapsedLanguages[lang];\n };\n\n vm.save = function() {\n if (!vm.template.id || vm.sending) return;\n vm.sending = true;\n\n const sendEmails = () => {\n $http\n .post(\n `${appUrls.api}/api/invoice/BatchMail`,\n {\n ...batchParams,\n templateId: vm.template.id,\n sendByPeppolIfStrategySetToPeppol:\n vm.template.context === 0 ? vm.sendByPeppolIfStrategySetToPeppol : false,\n },\n { params: filters },\n )\n .then(() => {\n vm.sending = false;\n $element.modal('hide');\n close(true, 500);\n }, showError);\n };\n\n $http\n .post(\n `${appUrls.api}/api/invoice/BatchMailHasSentEmails`,\n { ...batchParams, templateId: vm.template.id },\n { params: filters },\n )\n .then(({ data }) => {\n const hasSentEmails = !!data;\n\n if (!hasSentEmails) {\n sendEmails();\n } else {\n $element.modal('hide');\n dialogSvc\n .showOkCancel('WarningTitle', 'msgOneOfInvoicesAlreadySent')\n .then(sendEmails, () => {\n vm.sending = false;\n });\n }\n }, showError);\n };\n\n vm.cancel = function() {\n close(false, 500);\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cxInvoicing')\n .controller('CodaDialogCtrl', [\n '$element',\n '$http',\n 'flySvc',\n 'dataCache',\n 'close',\n 'appUrls',\n 'companyId',\n codaDialogCtrl,\n ]);\n\nfunction codaDialogCtrl($element, $http, flySvc, dataCache, close, appUrls, companyId) {\n var vm = this;\n\n vm.cancel = function() {\n close(null, 500);\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cloudX')\n .controller('DeleteWithNeverInvoiceDialogCtrl', [\n '$scope',\n '$element',\n 'appMessages',\n '$translate',\n 'close',\n 'message',\n 'btnMessage',\n 'extraButtons',\n deleteWithNeverInvoiceDialogCtrl,\n ]);\n\nfunction deleteWithNeverInvoiceDialogCtrl(\n $scope,\n $element,\n appMessages,\n $translate,\n close,\n message,\n btnMessage,\n extraButtons,\n) {\n $scope.message = appMessages(message);\n $scope.btnMessage = btnMessage\n ? appMessages(btnMessage)\n : $translate.instant('Never invoice registration(s) again');\n\n $scope.extraButtons = (extraButtons || []).map(\n ({ value = null, icon = 'fa fa-ban text-danger', message = null, title = null }) => ({\n value,\n icon,\n message: message ? appMessages(message) : message,\n title,\n }),\n );\n\n $scope.close = function(result) {\n close(result, 500);\n };\n $scope.cancel = function() {\n close(null, 500);\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cxInvoicing')\n .controller('DraftInvoiceLineDialogCtrl', [\n '$element',\n '$scope',\n 'dataCache',\n 'resourceFactorySvc',\n 'flySvc',\n 'enumCacheSvc',\n 'close',\n 'invoice',\n '$filter',\n 'priceService',\n 'resourceNameFilter',\n draftInvoiceLineDialogCtrl,\n ]);\n\nfunction draftInvoiceLineDialogCtrl(\n $element,\n $scope,\n dataCache,\n resourceFactorySvc,\n flySvc,\n enumCacheSvc,\n close,\n invoice,\n $filter,\n priceService,\n resourceNameFilter,\n) {\n var vm = this;\n vm.resourceTypes = [];\n vm.loading = 2;\n enumCacheSvc.get('resourceType').then(function(data) {\n vm.resourceTypes = data.filter(x => x.key !== 3 && x.key !== 4);\n vm.loading--;\n });\n vm.currentUser = dataCache.getArray('employee');\n vm.invoice = invoice;\n\n vm.lineType = null;\n vm.line = {\n quantity: 1,\n vatRate: dataCache.getDefaultCompany().resourceVATRate,\n vatType: 0,\n discountPercentage: 0,\n invoiceStreamId: invoice.invoiceStreamId,\n ledger: dataCache.getCompanySettings(vm.invoice.companyId)\n .onlyUseDefaultLedgerForNewPriceListItems\n ? null\n : dataCache.getCompanySettings(vm.invoice.companyId).resourceLedgerAccount,\n };\n\n //If false, a billing registration will be created, otherwise it's only an invoice line\n vm.isFreeInvoice =\n vm.invoice.invoiceType === 5 || //Free Invoice\n vm.invoice.invoiceType === 6 || //Intra company invoice\n (vm.invoice.invoiceType === 2 && !vm.invoice.hasRegistrations()) || //Advance without registrations\n !!vm.invoice.status; //Numbered invoice\n vm.showValidation = false;\n vm.price = null;\n\n resourceFactorySvc.get('resource').reg({}, function(data) {\n var resources = data\n .filter(x => x.type !== 3 && x.type !== 4)\n .map(item => ({ ...item, label: resourceNameFilter(item), code: item.code || '' }));\n vm.resources = resources.reduce(function(a, e) {\n if (!a[e.type]) a[e.type] = [];\n a[e.type].push(e);\n return a;\n }, {});\n vm.loading--;\n });\n if (!vm.invoice.isInvoice) {\n vm.line.quantity = -1;\n }\n\n vm.validate = function() {\n if ($scope.form && $scope.form.$invalid) {\n return false;\n }\n if (vm.lineType == null) return false;\n if (\n (vm.lineType == -3 || vm.lineType == -5 || vm.lineType == -4 || vm.lineType == -7) &&\n !vm.line.resource\n )\n return false;\n if (vm.lineType >= 0 && !vm.resource) return false;\n if (vm.lineType >= 0 && vm.resource.isOther && !vm.resource) return false;\n if (vm.line.quantity == null && vm.lineType != -7) return false;\n if (vm.line.unitPrice == null && vm.lineType != -7) return false;\n if (vm.line.vatRate == null && vm.lineType != -7) return false;\n return true;\n };\n vm.lineTypeChanged = function() {\n const { companyId } = vm.invoice;\n\n vm.resource = null;\n vm.line.resource = null;\n vm.line.ledger = dataCache.getCompanySettings(companyId)\n .onlyUseDefaultLedgerForNewPriceListItems\n ? null\n : dataCache.getCompanySettings(companyId).resourceLedgerAccount;\n vm.line.resourceCode = null;\n vm.line.quantity = !vm.line.quantity && !(vm.line.quantity < 0) ? 1 : vm.line.quantity;\n vm.line.unitPrice = null;\n vm.line.vatRate = null;\n vm.line.vatType = null;\n vm.line.billable = true;\n vm.line.price = null;\n vm.line.discountPercentage = 0;\n vm.price = null;\n vm.line.type = vm.lineType;\n vm.priceOptions = null;\n\n if (vm.lineType == -5) {\n vm.line.quantity = 1; //Advances are always positive\n vm.line.ledger = dataCache.getCompanySettings(companyId).advanceSettlementLedgerAccount;\n } else {\n if (!vm.invoice.isInvoice) {\n //Set quantity to negative because it is a credit note\n vm.line.quantity = Math.abs(vm.line.quantity) * -1;\n } else {\n //Set quantity to positive because it is an invoice\n vm.line.quantity = Math.abs(vm.line.quantity);\n }\n }\n if (vm.lineType < 0) {\n // 'LineType' in front-end does not match with the enum in backend since front-end also contains 'Resource types'\n // If the linetype is negative, get the absolute value so it matches with the back-end line type enum\n\n const invoiceLineType = Math.abs(vm.lineType);\n vm.line.type = invoiceLineType;\n\n vm.line.vatRate = dataCache.getDefaultCompany().resourceVATRate;\n vm.line.vatType = 0;\n }\n };\n vm.resourceChanged = function() {\n if (!vm.resource) return;\n vm.line.unitPrice = 0;\n vm.line.price = null;\n vm.line.ledger = vm.resource.ledger;\n if (\n !vm.line.ledger &&\n !dataCache.getCompanySettings(vm.invoice.companyId).onlyUseDefaultLedgerForNewPriceListItems\n ) {\n vm.line.ledger = dataCache.getCompanySettings(vm.invoice.companyId).resourceLedgerAccount;\n }\n vm.price = null;\n vm.line.vatRate = vm.resource.vatPercentage;\n vm.line.vatType = vm.resource.vatType;\n if (!vm.isFreeInvoice) vm.line.billable = vm.resource.isBillable;\n\n vm.priceOptions = null;\n priceService\n .getPrice({\n category: vm.resource.categoryId,\n invoiceStream: vm.line.invoiceStreamId,\n user: vm.currentUser.userID,\n })\n .then(function(price) {\n if (price) {\n vm.priceOptions = [price];\n vm.price = price;\n }\n });\n };\n vm.unitPriceChanged = function() {\n vm.line.price = null;\n vm.price = null;\n };\n\n vm.selectPrice = function(price) {\n vm.line.price = price;\n if (price) vm.line.unitPrice = price.amount;\n };\n\n $scope.$watch('vm.price', vm.selectPrice);\n\n vm.saving = false;\n vm.save = function() {\n if (vm.saving) return;\n if (!vm.validate()) return;\n vm.saving = true;\n if (vm.lineType < 0 || vm.isFreeInvoice) {\n if (!vm.line.resource) {\n vm.line.resource = resourceNameFilter(vm.resource, true);\n vm.line.resourceCode = vm.resource.code;\n }\n if (vm.resource) {\n vm.line.resourceCategoryId = vm.resource.categoryId;\n }\n resourceFactorySvc.get('invoiceLine').save(\n {\n id: vm.invoice.id,\n },\n vm.line,\n function(result) {\n result.resultType = 0;\n $element.modal('hide');\n close(result, 500);\n flySvc.success('Line added');\n vm.saving = false;\n },\n function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n vm.saving = false;\n },\n );\n } else {\n if (!vm.resource.isOther) {\n vm.line.resource = null;\n vm.line.resourceCode = null;\n }\n\n resourceFactorySvc.get('invoiceRegistration').create(\n {\n invoiceId: vm.invoice.id,\n },\n angular.extend(vm.line, {\n resourceId: vm.resource.id,\n type: vm.lineType,\n userId: vm.currentUser.userID,\n date: new Date(),\n }),\n function(result) {\n result.resultType = 1;\n $element.modal('hide');\n close(result, 500);\n flySvc.success('Line added');\n vm.saving = false;\n },\n function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n vm.saving = false;\n },\n );\n }\n };\n vm.cancel = function() {\n close(null, 500);\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cxInvoicing')\n .controller('EditInvoiceDialogCtrl', [\n '$element',\n '$timeout',\n 'flySvc',\n 'resourceFactorySvc',\n 'dataCache',\n '$translate',\n 'close',\n 'invoice',\n editInvoiceDialogCtrl,\n ]);\n\nfunction editInvoiceDialogCtrl(\n $element,\n $timeout,\n flySvc,\n resourceFactorySvc,\n dataCache,\n $translate,\n close,\n invoice,\n) {\n var vm = this;\n var invoiceResource = resourceFactorySvc.get('invoice');\n vm.invoice = invoice;\n vm.editingCustomer = false;\n vm.saving = false;\n vm.customer = null;\n\n var showError = function(error) {\n vm.saving = false;\n flySvc.error(error.data.code, error.data.parameters);\n };\n\n vm.editCustomer = function() {\n if (!vm.customer || vm.customer.id !== vm.invoice.customer.id)\n vm.customer = vm.invoice.customer;\n vm.editingCustomer = true;\n };\n\n vm.customerChanged = function(customer) {\n if (customer == null) {\n vm.editingCustomer = false;\n return;\n }\n invoiceResource.update(\n {},\n angular.extend({}, vm.invoice, {\n customer: customer,\n }),\n function() {\n vm.invoice.customer = customer;\n vm.editingCustomer = false;\n },\n showError,\n );\n };\n\n vm.updateInvoice = function(value, property) {\n vm.invoice[property] = value;\n invoiceResource.update({}, angular.extend({}, vm.invoice), function() {}, showError);\n };\n vm.getErrorMsg = flySvc.getErrorMsg;\n\n vm.save = function(send) {\n vm.saving = true;\n $timeout(function() {\n invoiceResource.commitEdit(\n {\n id2: vm.invoice.id,\n sendMail: send,\n },\n function() {\n $element.modal('hide');\n close(vm.invoice.id, 500);\n },\n showError,\n );\n }, 0);\n };\n vm.cancel = function() {\n $timeout(function() {\n invoiceResource.cancelEdit(\n {\n id2: vm.invoice.id,\n },\n function() {\n close(null, 500);\n },\n showError,\n );\n }, 100);\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cxInvoicing')\n .factory('invoiceDialogsSvc', ['$q', 'ModalService', invoiceDialogsSvc]);\n\nfunction invoiceDialogsSvc($q, ModalService) {\n function showModal(modalOptions) {\n var deferred = $q.defer();\n ModalService.showModal(modalOptions).then(function(modal) {\n modal.element.modal();\n modal.close.then(function(result) {\n if (result) deferred.resolve(result);\n else deferred.reject(null);\n }, deferred.reject);\n });\n return deferred.promise;\n }\n\n function showTransactionDialog(transaction, companyId) {\n return showModal({\n template: require('./transactionDialog.html'),\n controller: 'TransactionDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n transaction: transaction,\n companyId: companyId,\n },\n });\n }\n\n return {\n newTransaction: function(companyId) {\n return showTransactionDialog(null, companyId);\n },\n editTransaction: function(transaction) {\n return showTransactionDialog(transaction, transaction.companyId);\n },\n newDraftInvoiceLine: function(invoice) {\n return showModal({\n template: require('./draftInvoiceLineDialog.html'),\n controller: 'DraftInvoiceLineDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n invoice: invoice,\n },\n });\n },\n invoiceAudit: function(invoice) {\n return showModal({\n template: require('./invoiceAuditDialog.html'),\n controller: 'InvoiceAuditDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n invoice: invoice,\n },\n });\n },\n batchMailInvoices: function(filters, batchParams, languages = [], companyId = null) {\n return showModal({\n template: require('./batchMailInvoicesDialog.html'),\n controller: 'BatchMailInvoicesDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n filters,\n batchParams,\n languages,\n companyId,\n },\n });\n },\n mailHistory: function(invoice) {\n return showModal({\n template: require('./mailHistoryDialog.html'),\n controller: 'MailHistoryDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n invoice: invoice,\n },\n });\n },\n mailInvoice: function(invoice) {\n return showModal({\n template: require('./mailTemplateDialog.html'),\n controller: 'MailTemplateDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n invoice: invoice,\n context: 0,\n },\n });\n },\n mailReminder: function(invoice) {\n return showModal({\n template: require('./mailTemplateDialog.html'),\n controller: 'MailTemplateDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n invoice: invoice,\n context: 1,\n },\n });\n },\n newTransactionPayment: function(transaction, invoice) {\n var deferred = $q.defer();\n\n ModalService.showModal({\n template: require('./transactionPaymentDialog.html'),\n controller: 'TransactionPaymentDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n transaction: transaction,\n invoice: invoice,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.close.then(function(result) {\n deferred.resolve(result);\n }, deferred.reject);\n });\n return deferred.promise;\n },\n newInvoicePayment: function(invoice, transaction) {\n return showModal({\n template: require('./invoicePaymentDialog.html'),\n controller: 'InvoicePaymentDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n invoice: invoice,\n transaction: transaction,\n },\n });\n },\n previewDraftInvoice: function(invoice, finalize) {\n return showModal({\n template: require('./previewDraftInvoiceDialog.html'),\n controller: 'PreviewDraftInvoiceDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n invoice: invoice,\n finalize: finalize,\n },\n });\n },\n uploadCODA: function(companyId) {\n return showModal({\n template: require('./codaDialog.html'),\n controller: 'CodaDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n companyId,\n },\n });\n },\n editInvoice: function(invoice) {\n return showModal({\n template: require('./editInvoiceDialog.html'),\n controller: 'EditInvoiceDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n invoice: invoice,\n },\n });\n },\n numberInvoices: function(filters, batchParams, bookyearinfos, invoicesOrCreditNotes) {\n return showModal({\n template: require('./numberInvoicesDialog.html'),\n controller: 'NumberInvoicesDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n filters,\n batchParams,\n bookyearinfos,\n invoicesOrCreditNotes, // 1: only invoices; 2: only credit notes; 3: both/unknown\n },\n });\n },\n deleteWithNeverInvoice: function(message, btnMessage = null, extraButtons = []) {\n var deferred = $q.defer();\n ModalService.showModal({\n template: require('./deleteWithNeverInvoiceDialog.html'),\n controller: 'DeleteWithNeverInvoiceDialogCtrl',\n locationChangeSuccess: false,\n inputs: {\n message,\n btnMessage,\n extraButtons, //Array of {value, message, icon, title}\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.close.then(function(result) {\n //Null or undefined=cancelled\n if (typeof result === 'undefined' || result === null) deferred.reject(null);\n //False = move to next period\n //True = never invoice\n //Or value from clicked extra button\n deferred.resolve(result);\n }, deferred.reject);\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n });\n return deferred.promise;\n },\n showInvoicingHistory: function(invoiceStreamId, invoice = null, relationId = null) {\n return showModal({\n template: require('./invoicingHistoryDialog.html'),\n controller: 'InvoicingHistoryDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n invoiceStreamId,\n invoice,\n relationId,\n },\n });\n },\n updateRegistrationRelation: function(registration, showAddToDraft = false) {\n return showModal({\n template: require('./updateRegistrationRelationDialog.html'),\n controller: 'UpdateRegistrationRelationDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n registration,\n showAddToDraft,\n },\n });\n },\n };\n}\n","import { Invoice } from '../model/invoice';\n\nimport angular from 'angular';\nimport moment from 'moment';\n\nangular\n .module('cxInvoicing')\n .controller('InvoicePaymentDialogCtrl', [\n '$element',\n 'invoicingSvc',\n 'transactionHttpSvc',\n 'dataCache',\n 'flySvc',\n '$filter',\n 'openIbanSvc',\n 'close',\n 'invoice',\n 'transaction',\n 'appUrls',\n '$http',\n invoicePaymentDialogCtrl,\n ]);\n\nfunction invoicePaymentDialogCtrl(\n $element,\n invoicingSvc,\n transactionHttpSvc,\n dataCache,\n flySvc,\n $filter,\n openIbanSvc,\n close,\n invoice,\n transaction,\n appUrls,\n $http,\n) {\n var vm = this;\n if (!invoice || !invoice.id) {\n console.error('Invoice required');\n return;\n }\n\n vm.saving = false;\n vm.showValidation = false;\n vm.titleType = !transaction || !transaction.id ? 0 : 1;\n vm.paymentType = 0;\n vm.invoice = invoice;\n if (vm.invoice && !(vm.invoice instanceof Invoice)) vm.invoice = new Invoice(vm.invoice);\n\n vm.documents = null;\n vm.document = null;\n vm.bankAccounts = [];\n vm.transaction = transaction;\n\n const getCompanyBankAccounts = () => {\n $http\n .get(`${appUrls.api}/api/company/${invoice.companyId}/bankaccounts`)\n .then(({ data }) => {\n vm.bankAccounts = data;\n\n const mainBankAccount = data.find(x => x.isMain);\n\n if (mainBankAccount) {\n vm.transaction.companyIBAN = mainBankAccount.bankAccountNr;\n }\n })\n .catch(error => flySvc.error(error));\n };\n\n function calcAmount() {\n if (vm.paymentType === 0) {\n if (!vm.transaction || !vm.transaction.id) return vm.invoice.dueAmount();\n return Math.abs(vm.invoice.dueAmount()) < Math.abs(vm.transaction.openAmount())\n ? vm.invoice.dueAmount()\n : vm.transaction.openAmount();\n } else {\n if (!vm.document || !vm.document.id) return vm.invoice.dueAmount();\n return Math.abs(\n Math.abs(vm.invoice.dueAmount()) < Math.abs(vm.document.dueAmount())\n ? vm.invoice.dueAmount()\n : vm.document.dueAmount(),\n );\n }\n }\n vm.payment = {\n invoiceId: invoice.id,\n amount: calcAmount().round(2),\n remark: '',\n };\n\n if (vm.transaction && vm.transaction.id) {\n vm.payment.remark = vm.transaction.description;\n } else {\n vm.transaction = {\n date: moment\n .utc()\n .startOf('day')\n .toDate(),\n iban: '',\n bic: '',\n };\n getCompanyBankAccounts();\n }\n\n if (typeof vm.transaction.date === 'string')\n vm.transaction.date = new moment(vm.transaction.date).toDate();\n\n vm.changePaymentType = function(type) {\n vm.paymentType = type;\n if (type === 1 && vm.documents === null) {\n transactionHttpSvc.getLinkableDocs(vm.invoice.id).then(\n function(data) {\n vm.documents =\n data.map(function(d) {\n return new Invoice(d);\n }) || [];\n },\n function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n },\n );\n }\n vm.payment.amount = calcAmount().round(2);\n };\n\n function createPayment() {\n vm.payment.invoiceId = vm.invoice.id;\n transactionHttpSvc.createPayment(vm.transaction.id, vm.payment).then(\n function(result) {\n if (result) {\n if (vm.transaction) vm.transaction.payments.push(result);\n }\n $element.modal('hide');\n close(result, 500);\n vm.saving = false;\n },\n function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n vm.saving = false;\n },\n );\n }\n\n vm.save = function() {\n if (vm.saving) return;\n vm.saving = true;\n if (vm.paymentType === 0) {\n if (vm.transaction.id) {\n createPayment();\n return;\n }\n\n vm.transaction.amount = vm.payment.amount;\n vm.transaction.name = vm.invoice.customer.displayName;\n vm.transaction.description =\n vm.invoice.number + (vm.payment.remark ? ':' + vm.payment.remark : '');\n vm.transaction.source = 1;\n\n transactionHttpSvc.createTransaction(vm.transaction).then(\n function(data) {\n vm.transaction = data;\n createPayment();\n },\n function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n vm.saving = false;\n },\n );\n } else {\n vm.payment.invoiceId = vm.invoice.id;\n transactionHttpSvc.createLink(vm.document.id, vm.payment).then(\n function(result) {\n vm.saving = false;\n $element.modal('hide');\n close(result, 500);\n },\n function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n vm.saving = false;\n },\n );\n }\n };\n\n vm.cancel = function() {\n close(null, 500);\n };\n vm.getBic = function() {\n if (!vm.transaction || !vm.transaction.iban) return;\n openIbanSvc.getBic(vm.transaction.iban).then(\n function(bic) {\n if (bic) vm.transaction.bic = bic;\n },\n function(error) {\n if (error && error.code) flySvc.error(error.code, error.parameters);\n },\n );\n };\n\n vm.documentLabel = function(item) {\n return (\n item.number +\n '    (' +\n $filter('formatDate')(item.date) +\n ')    ' +\n $filter('translate')('Invoice Total') +\n ': ' +\n $filter('number')(item.amount, 2) +\n '    ' +\n $filter('translate')('Balance') +\n ': ' +\n $filter('number')(item.dueAmount(), 2)\n );\n };\n\n vm.documentChanged = function() {\n if (!vm.document || !vm.document.id) return;\n if (!(vm.document instanceof Invoice)) vm.document = new Invoice(vm.document);\n vm.payment.amount = calcAmount().round(2);\n vm.payment.remark = vm.document.number;\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cxInvoicing')\n .controller('InvoiceAuditDialogCtrl', [\n '$element',\n '$window',\n 'reminderHttpSvc',\n 'close',\n 'invoice',\n '$http',\n 'Blob',\n 'FileSaver',\n 'appUrls',\n 'flySvc',\n 'dataCache',\n invoiceAuditDialogCtrl,\n ]);\n\nfunction invoiceAuditDialogCtrl(\n $element,\n $window,\n reminderHttpSvc,\n close,\n invoice,\n $http,\n Blob,\n FileSaver,\n appUrls,\n flySvc,\n dataCache,\n) {\n var vm = this;\n vm.invoice = invoice;\n vm.data = [];\n const helpArticles = [\n { auditAction: 33, articleNumber: '6207683197852' },\n { auditAction: 52, articleNumber: '6661724370204', anchor: '#h_01GJZEMZH57WRPJV6M8EGNFTVY' },\n ];\n\n var getAuditLines = function() {\n $http\n .get(appUrls.api + '/api/invoice/auditlines/' + invoice.id)\n .success(function(result) {\n if (result && result.length > 0) {\n vm.data = result.map(line => ({\n ...line,\n article: helpArticles.some(article => article.auditAction === line.auditAction)\n ? helpArticles.find(article => article.auditAction === line.auditAction)\n : undefined,\n }));\n }\n })\n .error(function(error) {});\n };\n getAuditLines();\n\n vm.cancel = function() {\n close(null, 500);\n };\n}\n","import angular from 'angular';\nimport moment from 'moment';\nangular\n .module('cxInvoicing')\n .controller('InvoicingHistoryDialogCtrl', [\n '$element',\n '$window',\n 'close',\n '$http',\n 'appUrls',\n 'flySvc',\n 'dataCache',\n 'checkSecurity',\n '$state',\n 'relBudgetSvc',\n 'invoiceStreamId',\n 'invoice',\n 'relationId',\n invoicingHistoryDialogCtrl,\n ]);\n\nconst getDateFilters = (year, monthIndex = -1) => {\n //monthIndex -1 = full year, otherwise only that month\n const startMonth = monthIndex < 0 ? 0 : monthIndex;\n const endMonth = monthIndex < 0 ? 11 : monthIndex;\n\n return {\n period: 'none',\n dateFrom: moment.utc([year, startMonth, 1]),\n dateUntil: moment.utc([year, endMonth, 1]).endOf('M'),\n };\n};\n\nfunction invoicingHistoryDialogCtrl(\n $element,\n $window,\n close,\n $http,\n appUrls,\n flySvc,\n dataCache,\n checkSecurity,\n $state,\n relBudgetSvc,\n invoiceStreamId, //Is required\n invoice, //Can be null\n relationId,\n) {\n var vm = this;\n vm.invoiceStreamId = invoiceStreamId || null;\n vm.relationId = relationId;\n vm.invoice = invoice || null;\n vm.data = {};\n vm.loading = true;\n vm.relation = null;\n vm.isCombined = false;\n vm.budget = null;\n vm.canViewInvoices = checkSecurity('InvoiceFinal');\n if (!invoiceStreamId && !relationId) {\n console.warn('Missing invoiceStreamId and relationId');\n $element.modal('hide');\n close(null, 500);\n return;\n }\n if (vm.relationId) {\n $http.post(`${appUrls.api}/api/Relation/Names`, [relationId]).then(({ data: [relation] }) => {\n vm.relation = relation;\n });\n }\n\n vm.getHistory = function() {\n vm.loading = true;\n $http\n .post(`${appUrls.reporting}/api/invoicinghistory`, {\n invoiceStreamId: vm.invoiceStreamId,\n relationId: vm.relationId,\n })\n .success(\n function(result) {\n vm.loading = false;\n vm.isCombined = false;\n if (!result || result.length === 0) {\n vm.data = null;\n return;\n }\n\n if (result.length === 1) {\n vm.data = result[0];\n if (!vm.relation) {\n vm.relation = {\n id: vm.data.relationId,\n type: vm.data.relationType,\n name: vm.data.relationName || null,\n firstName: vm.data.relationFirstName || null,\n title: vm.data.relationTitle || null,\n };\n }\n return;\n }\n\n vm.isCombined = true;\n vm.data = result.reduce(\n (o, i) => {\n o.totalAmount += i.totalAmount ?? 0;\n o.draftAmount += i.draftAmount ?? 0;\n o.potential += i.potential ?? 0;\n o.toInvoice += i.toInvoice ?? 0;\n if (i.months && i.months.length > 0) {\n i.months.forEach(m => {\n const month = o.months.find(x => x.month === m.month);\n if (month) {\n month.totalAmount += m.totalAmount ?? 0;\n } else {\n o.months.push(m);\n }\n });\n }\n if (i.years && i.years.length > 0) {\n i.years.forEach(y => {\n const year = o.years.find(x => x.year === y.year);\n if (year) {\n year.totalAmount += y.totalAmount ?? 0;\n year.hours += y.hours ?? 0;\n for (var a = 0; a < 12; a++) {\n year.amounts[a] += y.amounts[a] ?? 0;\n }\n } else {\n o.years.push(y);\n }\n });\n }\n\n return o;\n },\n {\n totalAmount: 0,\n draftAmount: 0,\n potential: 0,\n toInvoice: 0,\n months: [],\n years: [],\n },\n );\n },\n function(error) {\n flySvc.error(error);\n vm.loading = false;\n },\n );\n relBudgetSvc.retrieveBudget(vm.relationId, vm.invoiceStreamId).then(data => {\n vm.budget = { data };\n });\n };\n\n vm.openInvoiceOverview = function(line, monthIndex) {\n const dates = line\n ? getDateFilters(line.year, monthIndex)\n : { period: 'all', dateFrom: null, dateUntil: null }; //If there is no line, open all invoices\n const params = {\n relationId: vm.relationId,\n invoiceStreamId: vm.invoiceStreamId || null,\n ...dates,\n };\n const url = $state.href('invoicing.overview', { json: JSON.stringify(params) });\n $window.open(url, '_blank');\n };\n vm.openDraftInvoices = function() {\n const params = {\n relationId: vm.relationId,\n invoiceStreamId: vm.invoiceStreamId || null,\n };\n const url = $state.href('invoicing.draft', { json: JSON.stringify(params) });\n $window.open(url, '_blank');\n };\n\n vm.getHistory();\n\n vm.cancel = function() {\n close(null, 500);\n };\n}\n","import angular from 'angular';\nimport DocumentService from '@/shared/services/DocumentService';\n\nangular\n .module('cxInvoicing')\n .controller('MailHistoryDialogCtrl', [\n '$element',\n '$window',\n 'reminderHttpSvc',\n 'close',\n 'invoice',\n '$http',\n 'appUrls',\n 'flySvc',\n 'dataCache',\n mailHistoryDialogCtrl,\n ]);\n\nfunction mailHistoryDialogCtrl(\n $element,\n $window,\n reminderHttpSvc,\n close,\n invoice,\n $http,\n appUrls,\n flySvc,\n dataCache,\n) {\n var vm = this;\n vm.invoice = invoice;\n vm.data = null;\n vm.sentDate = vm.invoice.sentOn;\n vm.sentUser = null;\n vm.showCc = false;\n vm.showBcc = false;\n\n dataCache.ready().then(function() {\n vm.sentUser = dataCache.getArray('user').find(function(user) {\n return user.userID === vm.invoice.sentBy;\n });\n });\n\n var getEmails = function() {\n $http\n .get(appUrls.documents + '/api/emails/InvoiceHistory/' + invoice.id)\n .success(function(result) {\n if (!vm.data) vm.data = [];\n if (result && result.length > 0) {\n vm.showCc = result.some(x => x.cc.length > 0);\n vm.showBcc = result.some(x => x.bcc.length > 0);\n result.forEach(function(email) {\n vm.data.push(email);\n });\n }\n });\n };\n getEmails();\n\n vm.previewMail = function(html, subject) {\n var preview = $window.open(\n '',\n 'MailPreviewWindow',\n 'location=0,menubar=0,titlebar=0,toolbar=0',\n );\n preview.document.write(html);\n preview.document.title = subject;\n };\n\n vm.cancel = function() {\n close(null, 500);\n };\n\n vm.downloadAttachment = attachment => DocumentService.download(attachment.id);\n}\n","import angular from 'angular';\nimport DocumentService from '@/shared/services/DocumentService';\nimport adminpulse from '@/shared/utils/adminpulse';\nimport { mapSuggestedMailAddressAngularFilter } from '@/shared/services/ObjectDisplayService';\n\nangular\n .module('cxInvoicing')\n .controller('MailTemplateDialogCtrl', [\n '$scope',\n '$element',\n '$timeout',\n '$translate',\n '$filter',\n 'templateHttpSvc',\n 'resourceFactorySvc',\n 'flySvc',\n 'close',\n 'invoice',\n 'context',\n '$http',\n 'appUrls',\n 'FileSaver',\n 'Blob',\n 'dialogsSvc',\n 'dataCache',\n '$q',\n mailTemplateDialogCtrl,\n ]);\n\nfunction mailTemplateDialogCtrl(\n $scope,\n $element,\n $timeout,\n $translate,\n $filter,\n templateHttpSvc,\n resourceFactorySvc,\n flySvc,\n close,\n invoice,\n context,\n $http,\n appUrls,\n FileSaver,\n Blob,\n dialogsSvc,\n dataCache,\n $q,\n) {\n var vm = this;\n vm.templates = [];\n vm.preview = null;\n vm.invoice = invoice;\n vm.sending = false;\n vm.email = {};\n vm.invoiceImage = null;\n vm.loadingPreview = true;\n vm.addresses = [];\n vm.addressLabels = {};\n vm.sendTo = [];\n vm.cc = [];\n vm.bcc = [];\n\n var showError = function(error) {\n vm.sending = false;\n\n flySvc.error(error);\n };\n\n var initializeEmail = function() {\n const data = {\n invoiceId: invoice.id,\n companyId: invoice.companyId,\n relationId: invoice.customer.id,\n invoiceEmailAttachmentOptions: invoice.invoiceEmailAttachmentOptions,\n };\n\n const invoiceEmailPromise = $http.post(\n `${appUrls.documents}/api/emails/${context === 1 ? 'InvoiceReminder' : 'InvoiceEmail'}`,\n data,\n );\n\n const isCreditNote = context === 0 && !invoice.isInvoice;\n const emailTemplatesPromise = templateHttpSvc.getTemplates(context);\n const cnEmailTemplatesPromise = isCreditNote ? templateHttpSvc.getTemplates(23) : $q.when([]);\n\n $q.all([invoiceEmailPromise, emailTemplatesPromise, cnEmailTemplatesPromise]).then(\n ([{ data: email }, templates, cnTemplates]) => {\n if (email) {\n vm.email = email;\n }\n vm.templates = [...(cnTemplates || []), ...(templates || [])].map(item => {\n item.label = $filter('translateList')(item.id, 'template', item.name);\n return item;\n });\n\n if (context === 0) {\n const {\n sendInvoiceTemplateId = null,\n sendCreditNoteTemplateId = null,\n } = dataCache.getCompanySettings(invoice.companyId);\n if (isCreditNote && sendCreditNoteTemplateId) {\n vm.template = vm.templates.find(x => x.id === sendCreditNoteTemplateId);\n } else if (sendInvoiceTemplateId) {\n vm.template = vm.templates.find(x => x.id === sendInvoiceTemplateId);\n }\n }\n\n vm.refreshPreview();\n },\n error => {\n flySvc.error(error);\n },\n );\n };\n var showArrayBufferError = function(error) {\n if (!error) return;\n try {\n var buffer = error.data || error;\n const errorObject = adminpulse.arrayBufferToObject(buffer) || {};\n flySvc.error(errorObject);\n } catch (ex) {\n console.error(ex);\n //Parsing error?\n flySvc.error();\n }\n };\n vm.generatePreview = function() {\n vm.loadingPreview = true;\n vm.invoiceImage = null;\n $http\n .get(`${appUrls.api}/Api/Invoice/Image/${vm.invoice.id}?now=${new Date().getTime()}`, {\n responseType: 'arraybuffer',\n })\n .then(\n response => {\n vm.loadingPreview = false;\n if (!response || !response.data) return;\n var blob = new Blob([response.data], { type: 'image/png' });\n var reader = new FileReader();\n reader.onload = function(evt) {\n $timeout(function() {\n vm.invoiceImage = evt.target.result;\n }, 0);\n };\n reader.readAsDataURL(blob);\n },\n error => {\n vm.loadingPreview = false;\n showArrayBufferError(error);\n },\n );\n };\n\n dataCache.ready().then(() => {\n initializeEmail();\n vm.generatePreview();\n });\n\n var invoiceResource = resourceFactorySvc.get('invoice');\n\n resourceFactorySvc.get('address').mailSuggestions(\n {\n id: invoice.customer.id,\n },\n function(addresses) {\n vm.addressLabels = addresses.reduce((o, x) => {\n if (!x || !x.emailAddress) return o;\n if (o[x.emailAddress.toLowerCase()]) return o;\n const label = mapSuggestedMailAddressAngularFilter(x, $filter);\n if (!label) return o;\n o[x.emailAddress.toLowerCase()] = label;\n return o;\n }, {});\n vm.addresses = addresses.reduce((a, x) => {\n if (!x) return a;\n if (a.some(y => y.toLowerCase() === x.emailAddress.toLowerCase())) return a;\n a.push(x.emailAddress);\n return a;\n }, []);\n\n //Add empty input for now, addresses will be loaded when selecting template\n vm.sendTo.push('');\n },\n showError,\n );\n vm.getAddressLabel = address => {\n if (!address) return address;\n if (typeof address !== 'string') {\n console.log(address);\n return address;\n }\n return vm.addressLabels[address.toLowerCase()] || address;\n };\n\n var retrieveAttachments = function() {\n vm.preview.attachments = [];\n\n return $http\n .get(appUrls.documents + '/api/documents/links/' + invoice.id + '/2')\n .success(function(result) {\n if (result && result.length > 0) {\n result.forEach(function(attachment) {\n attachment.isInvoice =\n attachment.documentType === 0 ||\n attachment.documentType === 4 ||\n attachment.documentType === 6;\n vm.preview.attachments.push(attachment);\n });\n }\n return null;\n })\n .error(function(error) {\n showError(error);\n return null;\n });\n };\n\n vm.refreshPreview = function() {\n vm.preview = null;\n vm.previewError = null;\n if (!vm.template || !vm.template.id) return;\n invoiceResource.getMail(\n {\n id: invoice.id,\n id2: vm.template.id,\n },\n function(data) {\n vm.preview = data;\n if (data.body === null && data.subject === null) {\n flySvc.message('msgTemplateNotInLanguage');\n }\n if (vm.preview.templateLanguageId) {\n $http\n .get(appUrls.documents + '/api/documents/links/' + vm.preview.templateLanguageId + '/4')\n .success(function(result) {\n if (result && result.length > 0) {\n if (!vm.email.attachments) vm.email.attachments = [];\n result.forEach(function(attachment) {\n vm.email.attachments.push(attachment);\n });\n }\n })\n .error(function(error) {\n showError(error);\n });\n }\n vm.sendTo = data.recipients || [''];\n vm.cc = data.cc || [];\n vm.bcc = data.bcc || [];\n },\n function(error) {\n vm.previewError = flySvc.getErrorMsg(error.data.code, error.data.parameters);\n flySvc.error(error);\n },\n );\n };\n\n vm.addToAddress = function() {\n vm.sendTo.push('');\n $timeout(function() {\n $element\n .find('.form-group .row.email .dropdown input[type=\"text\"]')\n .filter(':visible')\n .last()\n .focus();\n }, 200);\n };\n vm.addCcAddress = function() {\n vm.cc.push('');\n $timeout(function() {\n $element\n .find('.form-group .row.cc .dropdown input[type=\"text\"]')\n .filter(':visible')\n .last()\n .focus();\n }, 200);\n };\n\n vm.addBccAddress = function() {\n vm.bcc.push('');\n $timeout(function() {\n $element\n .find('.form-group .row.bcc .dropdown input[type=\"text\"]')\n .filter(':visible')\n .last()\n .focus();\n }, 200);\n };\n\n vm.validateEmail = function(value, emptyValid) {\n if (!value && emptyValid) return true;\n return /^[^@]+@.+\\..+$/.test(value);\n };\n\n vm.validate = function() {\n if (!vm.template || !vm.template.id) return false;\n if (!vm.preview || !vm.preview.subject || !vm.preview.body) return false;\n\n for (var j = 0; j < vm.sendTo.length; j++) {\n if (!vm.validateEmail(vm.sendTo[j], false)) {\n flySvc.error('msgInvalidEmailAddress');\n return false;\n }\n }\n for (var j = 0; j < vm.cc.length; j++) {\n if (!vm.validateEmail(vm.cc[j], false)) {\n flySvc.error('msgInvalidEmailAddress');\n return false;\n }\n }\n for (var j = 0; j < vm.bcc.length; j++) {\n if (!vm.validateEmail(vm.bcc[j], false)) {\n flySvc.error('msgInvalidEmailAddress');\n return false;\n }\n }\n return true;\n };\n\n vm.save = function() {\n if ($scope.form.$invalid || vm.sending) return;\n if (!vm.validate()) return;\n\n vm.sending = true;\n vm.preview.recipients = vm.sendTo;\n vm.preview.cc = vm.cc;\n vm.preview.bcc = vm.bcc;\n vm.preview.emailId = vm.email.id;\n\n if (vm.email.attachments && vm.email.attachments.length) {\n vm.preview.attachmentDocumentIds = vm.email.attachments.map(x => x.documentId || x.id);\n }\n\n invoiceResource.sendMail(\n {\n id: invoice.id,\n },\n vm.preview,\n function() {\n vm.sending = false;\n\n invoice.reminders++;\n invoice.sentOn = new Date();\n $element.modal('hide');\n close(true, 500);\n },\n function(error) {\n vm.sending = false;\n flySvc.error(error);\n $element.modal('hide');\n close(false, 500);\n },\n );\n };\n\n vm.cancel = function() {\n $http\n .delete(appUrls.documents + '/api/emails/' + vm.email.id)\n .success(function(result) {\n close(false, 500);\n })\n .error(function(error) {\n flySvc.error(error);\n close(false, 500);\n return '';\n });\n };\n\n vm.downloadAttachment = function(attachment) {\n DocumentService.download(attachment.documentId || attachment.id);\n };\n\n vm.uploadAttachment = function(files, invoice) {\n if (!files || files.length < 1) return;\n\n var newAttachments = [];\n var formData = new FormData();\n formData.append('relationId', invoice.customer.id);\n\n if (!vm.email.attachments) vm.email.attachments = [];\n\n files.forEach(function(file) {\n var attachment = {\n name: file.name,\n scanStatus: 1,\n invoiceId: invoice.id,\n };\n vm.email.attachments.push(attachment);\n newAttachments.push(attachment);\n formData.append('data', file.data);\n });\n\n $http({\n method: 'POST',\n url:\n appUrls.documents + '/api/documents?documentType=9&informQueues=false&recognitionStatus=4',\n headers: {\n 'Content-Type': undefined,\n },\n data: formData,\n })\n .success(function(result) {\n if (result && result.length > 0) {\n result.forEach(function(file) {\n var attachment = newAttachments.find(function(el) {\n return el.name === file.name;\n });\n if (attachment) angular.extend(attachment, file);\n });\n }\n })\n .error(function(error) {\n newAttachments.forEach(function(attachment) {\n var index = vm.email.attachments.indexOf(attachment);\n vm.email.attachments.splice(index, 1);\n });\n flySvc.error(error);\n return '';\n });\n };\n\n vm.deleteAttachment = function(attachment) {\n dialogsSvc.showYesNo('comfirmDeleteTitle', 'confirmDeleteEmailAttachment').then(function() {\n // the attachment is a new document that was uploaded in the email modal. Delete the corresponding document\n if (attachment.documentType === 9) {\n $http\n .delete(appUrls.documents + '/api/documents/' + attachment.id)\n .success(function(result) {\n var index = vm.email.attachments.indexOf(attachment);\n vm.email.attachments.splice(index, 1);\n })\n .error(function(error) {\n flySvc.error(error);\n return '';\n });\n } else if (attachment.documentType === 1) {\n // invoice attachment: delete it from the email, but keep it linked to the invoice\n $http\n .delete(appUrls.documents + '/api/emails/DeleteAttachment/' + attachment.id)\n .success(function(result) {\n var index = vm.email.attachments.indexOf(attachment);\n vm.email.attachments.splice(index, 1);\n })\n .error(function(error) {\n flySvc.error(error);\n return '';\n });\n } else {\n // the attachment is an existing document, presumably an email attachment. Dont delete the document from the doc-store\n var index = vm.email.attachments.indexOf(attachment);\n vm.email.attachments.splice(index, 1);\n }\n });\n };\n}\n","import angular from 'angular';\nimport moment from 'moment';\n\nangular\n .module('cxInvoicing')\n .controller('NumberInvoicesDialogCtrl', [\n '$element',\n 'close',\n 'filters',\n 'batchParams',\n 'bookyearinfos',\n 'invoicesOrCreditNotes',\n 'appUrls',\n 'dataCache',\n '$http',\n 'flySvc',\n numberInvoicesDialogCtrl,\n ]);\n\nconst maxDate = (a, b) => {\n if (!a) return b;\n if (!b) return a;\n if (moment(a).isBefore(b)) return b;\n return a;\n};\n\nconst maxDateProp = (array, prop) =>\n array.reduce((max, item) => (max ? maxDate(max, item[prop]) : item[prop]), null);\n\nfunction numberInvoicesDialogCtrl(\n $element,\n close,\n filters,\n batchParams,\n bookyearinfos,\n invoicesOrCreditNotes,\n appUrls,\n dataCache,\n $http,\n flySvc,\n) {\n var vm = this;\n vm.numbering = false;\n vm.dateToNumber = null;\n vm.sendMails = false;\n vm.isFuture = false;\n vm.numberZeroInvoices = false;\n\n dataCache.ready().then(() => {\n vm.sendMails = dataCache.getDefaultCompany().autoSendInvoices;\n });\n vm.multipleCompanies = bookyearinfos.length > 1;\n\n //Init bookyear info\n if (invoicesOrCreditNotes === 1) {\n // Only invoices\n // Only allow previous bookyear if there is only one\n vm.boundaryPreviousBookyear =\n bookyearinfos.length === 1 ? bookyearinfos[0].lastInvoiceDatePreviousBookyear : null;\n // Take max of all bookyears\n vm.boundaryCurrentBookyear = maxDateProp(bookyearinfos, 'lastInvoiceDateCurrentBookyear');\n } else if (invoicesOrCreditNotes === 2) {\n // Only credit notes\n // Only allow previous bookyear if there is only one\n vm.boundaryPreviousBookyear =\n bookyearinfos.length === 1 ? bookyearinfos[0].lastCreditnoteDatePreviousBookyear : null;\n // Take max of all bookyears\n vm.boundaryCurrentBookyear = maxDateProp(bookyearinfos, 'lastCreditnoteDateCurrentBookyear');\n } else {\n // Both or unknown, so taking max date of both\n // Only allow previous bookyear if there is only one\n vm.boundaryPreviousBookyear =\n bookyearinfos.length === 1\n ? maxDate(\n bookyearinfos[0].lastInvoiceDatePreviousBookyear,\n bookyearinfos[0].lastCreditnoteDatePreviousBookyear,\n )\n : null;\n // Take max of all bookyears\n vm.boundaryCurrentBookyear = maxDate(\n maxDateProp(bookyearinfos, 'lastCreditnoteDateCurrentBookyear'),\n maxDateProp(bookyearinfos, 'lastInvoiceDateCurrentBookyear'),\n );\n }\n vm.endDatePreviousBookyear =\n bookyearinfos.length === 1 ? bookyearinfos[0].endDatePreviousBookyear : null;\n\n vm.dateToNumber = moment\n .utc()\n .startOf('day')\n .toDate();\n\n vm.dateToNumberChanged = function(date) {\n if (!date) {\n vm.isFuture = false;\n vm.dateToNumber = moment\n .utc()\n .startOf('day')\n .toDate();\n } else {\n vm.isFuture = moment(date).isAfter(moment.utc(), 'day');\n }\n if (vm.isFuture) vm.sendMails = dataCache.getDefaultCompany().autoSendInvoices;\n };\n\n vm.save = function() {\n if (vm.numbering || !vm.dateToNumber) return;\n vm.numbering = true;\n $http\n .post(\n `${appUrls.api}/api/draftinvoice/finalizeAll`,\n {\n ...batchParams,\n dateToNumber: vm.dateToNumber.ISO(),\n sendMails: vm.sendMails,\n numberZeroInvoices: vm.numberZeroInvoices,\n },\n { params: filters },\n )\n .then(\n function({ data }) {\n vm.numbering = false;\n $element.modal('hide');\n close(data, 500);\n },\n function(error) {\n vm.numbering = false;\n flySvc.error(error.data.code, error.data.parameters);\n },\n );\n };\n vm.cancel = function() {\n close(null, 500);\n };\n}\n","import angular from 'angular';\nimport moment from 'moment';\n\nangular.module('cloudX').directive('cxNumberOn', [\n function() {\n return {\n restrict: 'E',\n replace: true,\n template: require('./numberOn.html'),\n controllerAs: 'vm',\n bindToController: true,\n scope: {\n ngModel: '=',\n boundaryPreviousBookyear: '@',\n boundaryCurrentBookyear: '@',\n endDatePreviousBookyear: '@',\n onChanged: '&',\n todayText: '@',\n clearText: '@',\n numberText: '@',\n cancelText: '@',\n closeOnSelect: '@?',\n },\n controller: [\n '$q',\n function($q) {\n var vm = this;\n vm.isOpen = false;\n if (typeof vm.ngModel === 'string') {\n vm.ngModel = moment.utc(vm.ngModel.substr(0, 10)).toDate();\n }\n vm.bookyear =\n vm.ngModel && vm.endDatePreviousBookyear && vm.ngModel <= vm.endDatePreviousBookyear\n ? '-1'\n : '0';\n vm.options = {\n initDate: moment.utc().toDate(),\n };\n vm.today = moment.utc().toDate();\n if (typeof vm.ngModel === 'string') {\n vm.ngModel = moment.utc(vm.ngModel.substr(0, 10)).toDate();\n }\n vm.value = vm.ngModel;\n vm.init = false;\n vm.toggle = function(isOpen) {\n if (isOpen) {\n if (typeof vm.ngModel === 'string') {\n vm.ngModel = moment.utc(vm.ngModel.substr(0, 10)).toDate();\n }\n vm.value = vm.ngModel;\n vm.setOptions();\n vm.init = true;\n }\n };\n\n vm.setOptions = function(resetValue) {\n vm.options.minDate =\n vm.bookyear < 0\n ? moment.utc(vm.boundaryPreviousBookyear.substr(0, 10)).toDate()\n : moment.utc(vm.boundaryCurrentBookyear.substr(0, 10)).toDate();\n\n vm.options.maxDate =\n vm.bookyear < 0\n ? moment.utc(vm.endDatePreviousBookyear.substr(0, 10)).toDate()\n : null;\n console.debug(\n 'Available dates from %s until %s.',\n vm.options.minDate,\n vm.options.maxDate,\n );\n //Min-max check\n if (vm.value < vm.options.minDate) vm.value = vm.options.minDate;\n if (vm.options.maxDate !== null && vm.value > vm.options.maxDate)\n vm.value = vm.options.maxDate;\n //Select first available date\n if (resetValue) {\n vm.value = vm.options.minDate;\n }\n };\n vm.setOptions();\n\n vm.dateChanged = function() {\n if (vm.closeOnSelect) vm.updateValue(vm.value);\n };\n vm.setToday = function() {\n vm.value = vm.today;\n if (vm.closeOnSelect) vm.updateValue(vm.value);\n };\n\n vm.updateValue = function(value) {\n vm.isOpen = false;\n if (!vm.onChanged) {\n vm.ngModel = value;\n } else {\n $q.when(\n vm.onChanged({\n $data: value,\n }),\n ).then(\n result => {\n if (typeof result === 'string') {\n //error\n vm.isOpen = true;\n } else if (result !== false) {\n vm.ngModel = value;\n }\n },\n () => {\n vm.isOpen = true;\n },\n );\n }\n };\n\n vm.clearNumber = function() {\n return vm.updateValue(null);\n };\n\n vm.number = function() {\n return vm.updateValue(vm.value);\n };\n },\n ],\n };\n },\n]);\n","import angular from 'angular';\nimport adminpulse from '@/shared/utils/adminpulse';\n\nangular\n .module('cxInvoicing')\n .controller('PreviewDraftInvoiceDialogCtrl', [\n '$element',\n 'close',\n 'invoice',\n 'finalize',\n 'appUrls',\n '$http',\n '$timeout',\n 'flySvc',\n 'FileSaver',\n previewDraftInvoiceDialogCtrl,\n ]);\n\nfunction previewDraftInvoiceDialogCtrl(\n $element,\n close,\n invoice,\n finalize,\n appUrls,\n $http,\n $timeout,\n flySvc,\n FileSaver,\n) {\n var vm = this;\n vm.invoice = invoice;\n vm.showSaveButtons = typeof finalize === 'function';\n vm.numbering = false;\n vm.sending = false;\n vm.invoicePreviewImage = null;\n vm.loadingPreview = true;\n\n var showArrayBufferError = function(error) {\n if (!error) return;\n try {\n var buffer = error.data || error;\n const errorObject = adminpulse.arrayBufferToObject(buffer) || {};\n flySvc.error(errorObject);\n } catch (ex) {\n console.error(ex);\n //Parsing error?\n flySvc.error();\n }\n };\n\n vm.downloadPdf = () => {\n $http.get(`${appUrls.api}/api/draftInvoice/PreviewPdf/${invoice.id}`, { responseType: 'arraybuffer' }).then(\n result => {\n const contentDisposition = result.headers('Content-Disposition');\n const filename = adminpulse.getFileNameFromHeader(contentDisposition);\n\n const blob = new Blob([result.data], {type: 'application/pdf'});\n if (blob) {\n FileSaver.saveAs(blob, filename);\n }\n }\n )\n }\n\n vm.generatePreview = function() {\n vm.loadingPreview = true;\n vm.invoicePreviewImage = null;\n $http\n .get(`${appUrls.api}/Api/DraftInvoice/Preview/${vm.invoice.id}?now=${new Date().getTime()}`, {\n responseType: 'arraybuffer',\n })\n .then(\n response => {\n vm.loadingPreview = false;\n if (!response || !response.data) return;\n var blob = new Blob([response.data], { type: 'image/png' });\n var reader = new FileReader();\n reader.onload = function(evt) {\n $timeout(function() {\n vm.invoicePreviewImage = evt.target.result;\n }, 0);\n };\n reader.readAsDataURL(blob);\n },\n error => {\n vm.loadingPreview = false;\n showArrayBufferError(error);\n },\n );\n };\n vm.generatePreview();\n vm.save = function(sendMail) {\n var promise = finalize(invoice, sendMail);\n if (promise) {\n if (sendMail) {\n vm.sending = true;\n } else {\n vm.numbering = true;\n }\n promise.then(\n function() {\n vm.sending = false;\n vm.numbering = false;\n $element.modal('hide');\n close(true, 500);\n },\n function(error) {\n vm.sending = false;\n vm.numbering = false;\n },\n );\n }\n };\n\n vm.cancel = function() {\n close(null, 500);\n };\n}\n","import angular from 'angular';\nimport { error } from 'loglevel';\nimport moment from 'moment';\n\nangular\n .module('cxInvoicing')\n .controller('TransactionDialogCtrl', [\n '$element',\n 'transactionHttpSvc',\n 'resourceFactorySvc',\n 'flySvc',\n 'openIbanSvc',\n 'dataCache',\n 'close',\n 'transaction',\n 'companyId',\n '$http',\n 'appUrls',\n transactionDialogCtrl,\n ]);\n\nfunction transactionDialogCtrl(\n $element,\n transactionHttpSvc,\n resourceFactorySvc,\n flySvc,\n openIbanSvc,\n dataCache,\n close,\n transaction,\n companyId,\n $http,\n appUrls,\n) {\n var vm = this;\n vm.saving = false;\n vm.showValidation = false;\n vm.transactionIban = '';\n vm.bankAccounts = [];\n vm.transaction = transaction || {\n date: moment.utc().startOf('day').toDate(),\n amount: 0,\n name: '',\n iban: '',\n bic: '',\n description: '',\n companyId: companyId || dataCache.getDefaultCompany().id,\n };\n if (typeof vm.transaction.date === 'string')\n vm.transaction.date = new moment(vm.transaction.date).toDate();\n vm.companies = dataCache.getArray('company');\n\n const getCompanyBankAccounts = (companyId) => {\n $http.get(`${appUrls.api}/api/company/${companyId}/bankaccounts`).then(({ data }) => {\n vm.bankAccounts = data;\n\n const mainBankAccount = data.find((x) => x.isMain);\n\n if (mainBankAccount && !vm.transaction.id) {\n vm.transaction.companyIBAN = mainBankAccount.bankAccountNr;\n }\n });\n };\n\n vm.companyChanged = function () {\n getCompanyBankAccounts(vm.transaction.companyId);\n };\n vm.companyChanged();\n\n vm.save = function () {\n if (vm.saving) return;\n vm.saving = true;\n if (vm.transaction.id) {\n transactionHttpSvc.updateTransaction(vm.transaction).then(\n function (result) {\n vm.saving = false;\n $element.modal('hide');\n close(result, 500);\n },\n function (error) {\n flySvc.error(error.data.code, error.data.parameters);\n vm.saving = false;\n },\n );\n } else {\n transactionHttpSvc.createTransaction(vm.transaction).then(\n function (result) {\n vm.saving = false;\n $element.modal('hide');\n close(result, 500);\n },\n function (error) {\n vm.saving = false;\n flySvc.error(error.data.code, error.data.parameters);\n },\n );\n }\n };\n vm.cancel = function () {\n close(null, 500);\n };\n vm.getBic = function () {\n if (!vm.transaction.iban) return;\n\n //https://syneton.visualstudio.com/CloudX/_workitems/edit/13446\n //Temporarily disabled because iban service is down\n //openIbanSvc.getBic(vm.transaction.iban).then(function (bic) {\n // if (bic)\n // vm.transaction.bic = bic;\n //}, function (error) {\n // if (error && error.code)\n // flySvc.error(error.code, error.parameters);\n //});\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cloudX')\n .controller('UpdateRegistrationRelationDialogCtrl', [\n '$scope',\n '$element',\n 'flySvc',\n 'appUrls',\n '$http',\n 'close',\n 'registration',\n 'showAddToDraft',\n updateRegistrationRelationDialogCtrl,\n ]);\n\nfunction updateRegistrationRelationDialogCtrl(\n $scope,\n $element,\n flySvc,\n appUrls,\n $http,\n close,\n registration,\n showAddToDraft,\n) {\n const vm = this;\n if (!registration) return;\n vm.registration = registration;\n vm.showAddToDraft = showAddToDraft;\n vm.relation = null;\n vm.invoiceStreamId = null;\n vm.invoiceStreams = [];\n vm.addToDraftInvoice = false;\n vm.saving = false;\n\n vm.relationChanged = function(relation) {\n vm.relation = relation;\n\n if (!vm.relation || !vm.relation.id) {\n vm.invoiceStreamId = null;\n vm.invoiceStreams = [];\n } else {\n vm.invoiceStreamId = vm.relation.invoiceStreamId;\n vm.invoiceStreams = vm.relation.invoiceStreams || [];\n }\n };\n\n vm.save = function() {\n if (!vm.invoiceStreamId) return;\n if (vm.saving) return;\n vm.saving = true;\n $http\n .put(`${appUrls.api}/api/InvoiceRegistration/ChangeRelation`, {\n id: vm.registration.id,\n\n invoiceStreamId: vm.invoiceStreamId,\n addToDraftInvoice: vm.addToDraftInvoice,\n })\n .then(\n ({ data }) => {\n $element.modal('hide');\n close(data, 500);\n vm.saving = false;\n },\n error => {\n flySvc.error(error);\n vm.saving = false;\n },\n );\n };\n vm.cancel = function() {\n close(null, 500);\n };\n}\n","import angular from 'angular';\nimport { castJSON } from '../../helpers';\nimport { DraftInvoice } from '../model/draftInvoice';\nimport moment from 'moment';\nimport DocumentService from '@/shared/services/DocumentService';\nimport SignalRService from '@/shared/services/SignalRService';\nimport userStorage from '@/shared/services/userStorage';\nimport guid from '@/shared/utils/guid';\nimport adminpulse from '@/shared/utils/adminpulse';\n\nconst columnSelectionStorageKey = 'DraftInvoiceOverviewExtraColumns';\n\nconst emptyFilters = {\n relationId: null, // Guid?\n invoiceId: null, // Guid?\n isInvoice: null, // Bool?\n searchValue: '', // string\n assistant: null, // Guid?\n assistantBackup: null, // Guid?\n responsible: null, // Guid?\n billingUser: null, // UserId\n seniorUser: null, // UserId\n relationType: [], // int[]\n legalForms: [], // int[]\n withLabels: [], // string[]\n withoutLabels: [], // string[]\n status: null, // int\n invoiceType: [], // int[]\n hasDateToNumber: null, // bool?\n ownCompanies: [], //Guid[]\n assignmentTemplateId: null, //Guid?\n invoiceStreamId: null, //Guid?\n sendInvoiceStrategy: [], // int[]\n invoiceScheduleTypes: [], //Guid[]\n relationGroups: [], //Guid[]\n crmTypes: [], //int[]\n};\n\nangular\n .module('cloudX')\n .controller('DraftInvoiceOverviewCtrl', [\n '$scope',\n '$filter',\n '$timeout',\n '$state',\n '$anchorScroll',\n 'resourceFactorySvc',\n 'dialogsSvc',\n 'invoiceDialogsSvc',\n 'flySvc',\n 'dataCache',\n 'invoicingSvc',\n 'appUrls',\n '$http',\n '$q',\n '$translate',\n 'ModalService',\n 'registrationService',\n 'FileSaver',\n draftInvoiceOverviewCtrl,\n ]);\n\nfunction draftInvoiceOverviewCtrl(\n $scope,\n $filter,\n $timeout,\n $state,\n $anchorScroll,\n resourceFactorySvc,\n dialogsSvc,\n invoiceDialogsSvc,\n flySvc,\n dataCache,\n invoicingSvc,\n appUrls,\n $http,\n $q,\n $translate,\n ModalService,\n registrationService,\n FileSaver,\n) {\n var vm = this;\n var draftInvoiceResource = resourceFactorySvc.get('draftInvoice');\n var invoiceLineResource = resourceFactorySvc.get('invoiceLine');\n vm.sendingAll = false;\n vm.numberingAll = false;\n vm.loading = false;\n vm.bookyearInfo = {};\n vm.bookyearInfos = [];\n vm.initFilters = true;\n vm.hasFilter = false;\n vm.showAdvanceFilters = false;\n vm.selectAll = false;\n\n vm.filters = { ...emptyFilters };\n vm.currentFilters = null;\n vm.customer = null;\n vm.currentSearchParams = {};\n vm.showAssignments = dataCache.getArray('assignmentsEnabled');\n vm.isMultiCompany = dataCache.getArray('company').length > 1;\n vm.billingInformation = {}; //Key=relationId\n vm.processingInvoicesInfo = invoicingSvc.getProcessingInvoicesInfo();\n\n const detailRequests = {};\n\n var showError = function(error) {\n flySvc.error(error.data.code, error.data.parameters, null, error.data.type);\n };\n\n vm.hideableColumns = [\n {\n key: 'ownCompany',\n label: $filter('translate')('OwnCompany'),\n show: false,\n hiddenBySecurity: !vm.isMultiCompany,\n },\n {\n key: 'exForfaitAmount',\n label: $filter('translate')('NotIncludedInFixedAmount'),\n show: false,\n },\n {\n key: 'originalAmount',\n label: $filter('translate')('OriginalAmount'),\n show: false,\n },\n {\n key: 'adjustedAmount',\n label: $filter('translate')('AdjustedAmount'),\n show: false,\n },\n {\n key: 'modifiedDate',\n label: $filter('translate')('ModifiedOn'),\n show: false,\n },\n {\n key: 'relationCode',\n label: $filter('translate')('RelationCode'),\n show: false,\n },\n ];\n //Store hidden columns in object for easy use\n vm.hiddenColumns = {};\n\n vm.rebuildHiddenColumns = function() {\n vm.hiddenColumns = vm.hideableColumns.reduce((r, i) => {\n r[i.key] = !i.show;\n return r;\n }, {});\n\n vm.countVisibleExtraColumns = 0;\n\n Object.keys(vm.hiddenColumns).forEach(column => {\n if (!vm.hiddenColumns[column]) vm.countVisibleExtraColumns++;\n });\n };\n\n vm.initHiddenColumns = function() {\n const extraColumns = userStorage.getItem(columnSelectionStorageKey) || [];\n if (extraColumns.length) {\n vm.hideableColumns.forEach(col => {\n const hidden = extraColumns.indexOf(col.key) < 0;\n col.show = !hidden;\n });\n }\n vm.rebuildHiddenColumns();\n };\n vm.initHiddenColumns();\n\n vm.retrieveRequest = null;\n vm.retrieve = function(params) {\n //Cancel previous request, cancelling a completed request will have no effect\n if (vm.retrieveRequest && vm.retrieveRequest.$cancelRequest)\n vm.retrieveRequest.$cancelRequest();\n\n const requestParams = { ...(params || {}), ...(vm.filters || {}) };\n\n vm.hasFilter = vm.hasFilters();\n\n vm.currentFilters = { ...vm.filters };\n sessionStorage.setItem(\n 'DraftInvoiceOverviewParams',\n JSON.stringify({\n tableParams: params,\n filters: vm.currentFilters,\n showAdvanceFilters: vm.showAdvanceFilters,\n }),\n );\n\n if (requestParams.page === 0) vm.reloadKPIs(requestParams);\n vm.retrieveRequest = draftInvoiceResource.query(requestParams);\n return vm.retrieveRequest.$promise.then(function(invoices) {\n vm.currentSearchParams = requestParams;\n\n angular.forEach(invoices, function(invoice) {\n invoice.discountActive = invoice.discountAmount > 0;\n invoice.transactionTypeActive = invoice.taxCategory !== invoice.customerTaxCategory;\n invoice.selected = vm.selectAll;\n invoice.isRemoving =\n invoice.removingStartDate &&\n moment.utc(invoice.removingStartDate) &&\n moment\n .utc(invoice.removingStartDate)\n .add(1, 'hours')\n .isAfter(moment.utc());\n });\n\n return invoices;\n });\n };\n const initStateParams = () => {\n if (!$state.params) return false;\n let hasParams = false;\n const {\n relation = null,\n relationId = null,\n invoiceId = null,\n invoiceStreamId = null,\n } = $state.params;\n\n if (relation && relation.id) {\n hasParams = true;\n vm.filters.relationId = relation.id;\n if (relation.name) {\n vm.customer = { ...relation };\n }\n } else if (relationId) {\n hasParams = true;\n vm.filters.relationId = relationId;\n }\n if (invoiceStreamId) {\n hasParams = true;\n vm.filters.invoiceStreamId = invoiceStreamId;\n }\n if (invoiceId) {\n hasParams = true;\n vm.filters.invoiceId = invoiceId;\n }\n\n return hasParams;\n };\n const initCustomer = relationId => {\n $http.post(appUrls.api + '/api/Relation/Names', [relationId]).then(({ data }) => {\n if (data && data.length) {\n vm.customer = data[0];\n }\n });\n };\n\n const bookyearInfoRequest = draftInvoiceResource.bookyearInfo(null, function(bookyearInfo) {\n vm.bookyearInfos = bookyearInfo;\n vm.bookyearInfo = bookyearInfo.reduce((o, i) => {\n o[i.companyId] = i;\n return o;\n }, {});\n });\n\n vm.clearFilters = function() {\n vm.filters = { ...emptyFilters };\n vm.hasFilter = false;\n vm.customer = null;\n if (vm.table) {\n vm.table.clearFilter();\n\n vm.table.reload();\n }\n };\n vm.updateFilter = function(value, noReload) {\n if (value) {\n vm.filters = { ...vm.filters, ...value };\n }\n if (!noReload && !angular.equals(vm.currentFilters, vm.filters)) vm.table.reload();\n };\n vm.customerFilterChanged = function(value) {\n const cust = typeof value === 'undefined' ? vm.customer : value;\n vm.updateFilter({ relationId: cust && cust.id ? cust.id : null, invoiceStreamId: null });\n };\n\n vm.kpiRequest = null;\n vm.reloadKPIs = function(filters) {\n //Cancel previous request, cancelling a completed request will have no effect\n if (vm.kpiRequest && vm.kpiRequest.$cancelRequest) vm.kpiRequest.$cancelRequest();\n vm.kpiRequest = draftInvoiceResource.info(filters || { ...vm.currentSearchParams }, function(\n data,\n ) {\n vm.dashboard = data;\n });\n };\n\n vm.discountTypes = [0, 1, 2];\n vm.minDate = moment\n .utc()\n .startOf('day')\n .add(1, 'days');\n\n vm.toggleDiscount = function(invoice) {\n invoice.discountActive = !invoice.discountActive;\n if (!invoice.discountActive && invoice.discountAmount > 0) {\n vm.updateInvoice(invoice, 0, 'discountAmount');\n }\n };\n\n const setParamsFromSessionStorage = () => {\n try {\n const sessionParams = JSON.parse(sessionStorage.getItem('DraftInvoiceOverviewParams'));\n\n if (sessionParams) {\n const {\n filterType = null,\n filters = {},\n tableParams = {},\n showAdvanceFilters = false,\n } = sessionParams;\n vm.filters = { ...vm.filters, ...filters };\n vm.showAdvanceFilters = showAdvanceFilters;\n if (vm.table) {\n vm.table.initializeParams(tableParams);\n }\n }\n } catch (error) {\n console.error('Error while setting parameters from session storage');\n console.error(error);\n }\n };\n\n vm.openColumnConfigDialog = function() {\n dialogsSvc\n .showCheckboxList(\n 'msgSelectTableColumns',\n vm.hideableColumns\n .filter(x => !x.hiddenBySecurity)\n .map(({ key, label, show }) => ({ key, label, selected: show })),\n )\n .then(function(result) {\n if (result) {\n vm.hideableColumns.forEach(col => {\n var item = result.find(x => x.key === col.key);\n if (!item) return;\n col.show = !!item.selected;\n });\n vm.rebuildHiddenColumns();\n //Save hidden columns\n userStorage.setItem(\n columnSelectionStorageKey,\n vm.hideableColumns.filter(x => x.show).map(x => x.key),\n );\n }\n });\n };\n\n vm.revertSelectedInvoices = function() {\n if (vm.selectedCount() === 0) return;\n invoiceDialogsSvc\n .deleteWithNeverInvoice('confirmRevertDraftInvoices')\n .then(function(neverInvoice) {\n const batchParams = vm.getBatchSelectionParams();\n const params = { ...vm.currentSearchParams };\n vm.loadingGlobalAction = true;\n $http\n .post(\n `${appUrls.api}/api/draftinvoice/revertAll`,\n {\n ...batchParams,\n neverInvoice,\n },\n { params },\n )\n .then(\n function({ data }) {\n vm.loadingGlobalAction = false;\n vm.table.reload();\n },\n function(error) {\n vm.loadingGlobalAction = false;\n flySvc.error(error.data.code, error.data.parameters);\n },\n );\n });\n };\n\n vm.numberAll = function() {\n if (vm.selectedCount(true) === 0) return;\n var params = { ...vm.currentSearchParams };\n var invoicesOrCreditNotes = 3;\n var bookyearInfos = vm.bookyearInfos;\n const batchParams = vm.getBatchSelectionParams(true);\n\n if (vm.selectAll) {\n invoicesOrCreditNotes =\n typeof params.isInvoice === 'undefined' || params.isInvoice === null\n ? 3 // All\n : params.isInvoice\n ? 1 // Only invoices\n : 2; // Only credit notes\n if (bookyearInfos.length > 1 && vm.filters.ownCompanies.length) {\n bookyearInfos = bookyearInfos.filter(x => vm.filters.ownCompanies.includes(x.companyId));\n }\n } else {\n var selectedRows = vm.table.rows.filter(x => x.selected && x.canNumber(true));\n invoicesOrCreditNotes = selectedRows.reduce((o, r) => o | (r.isInvoice ? 1 : 2), 0);\n if (bookyearInfos.length > 1) {\n if (vm.filters.ownCompanies.length)\n bookyearInfos = bookyearInfos.filter(x => vm.filters.ownCompanies.includes(x.companyId));\n\n bookyearInfos = bookyearInfos.filter(x =>\n selectedRows.some(r => r.companyId === x.companyId),\n );\n }\n }\n\n invoiceDialogsSvc\n .numberInvoices(params, batchParams, bookyearInfos, invoicesOrCreditNotes)\n .then(function(data) {\n if (!data) return;\n\n var errorCount = 0;\n var succeededCount = 0;\n var processed = false;\n var dateToNumber = null;\n data.forEach(function(result) {\n if (result.movedToProcessing) processed = true;\n if (result.dateToNumber) dateToNumber = result.dateToNumber;\n if (result.error) {\n errorCount++;\n } else {\n succeededCount++;\n }\n var idx = vm.table.rows.findIndex(x => x.id === result.invoiceId);\n if (idx < 0) return;\n if (result.movedToProcessing) {\n vm.table.rows.splice(idx, 1);\n return;\n }\n var invoice = vm.table.rows[idx];\n if (result.error) {\n invoice.invoiceErrors = [\n ...(invoice.invoiceErrors || []),\n { code: result.error, parameters: null },\n ];\n } else if (result.dateToNumber) {\n invoice.dateToNumber = result.dateToNumber;\n }\n });\n if (succeededCount > 0) {\n vm.reloadKPIs();\n if (processed) {\n flySvc.success('msgInvoiceCountProcessed', { count: succeededCount });\n } else {\n flySvc.success('msgInvoiceCountDateToNumber', {\n count: succeededCount,\n date: $filter('formatDate')(dateToNumber),\n });\n }\n }\n if (errorCount > 0) {\n flySvc.error('msgInvoiceCountErrors', {\n count: errorCount,\n });\n }\n });\n };\n\n vm.lockInvoice = invoice => {\n const locked = !invoice.locked;\n invoice.updating = true;\n $http.put(`${appUrls.api}/api/draftInvoice/Locked/${invoice.id}?locked=${locked}`).then(\n ({ data }) => {\n invoice.updating = false;\n angular.extend(invoice, data);\n },\n error => {\n invoice.updating = false;\n flySvc.error(error);\n },\n );\n };\n\n vm.downloadDraftInvoice = invoice => {\n $http\n .get(`${appUrls.api}/api/draftInvoice/PreviewPdf/${invoice.id}`, {\n responseType: 'arraybuffer',\n })\n .then(result => {\n const contentDisposition = result.headers('Content-Disposition');\n const filename = adminpulse.getFileNameFromHeader(contentDisposition);\n\n var blob = new Blob([result.data], { type: 'application/pdf' });\n if (blob) {\n FileSaver.saveAs(blob, filename);\n }\n });\n };\n\n vm.uploadAttachment = function(files, invoice) {\n if (!files || files.length < 1) return;\n\n var newAttachments = [];\n var formData = new FormData();\n formData.append('documentType', 1);\n formData.append('documentLinkType', 2);\n formData.append('linkId', invoice.id);\n formData.append('relationId', invoice.customer.id);\n\n files.forEach(function(file) {\n var attachment = {\n name: file.name,\n scanStatus: 1,\n invoiceId: invoice.id,\n };\n invoice.attachments.push(attachment);\n newAttachments.push(attachment);\n formData.append('data', file.data);\n });\n\n $http({\n method: 'POST',\n url: appUrls.documents + '/api/documents/',\n headers: {\n 'Content-Type': undefined,\n },\n data: formData,\n })\n .success(function(result) {\n if (result && result.length > 0) {\n result.forEach(function(file) {\n var attachment = newAttachments.find(function(el) {\n return el.name === file.name;\n });\n if (attachment) angular.extend(attachment, file);\n });\n if (\n !invoice.hasAttachment &&\n newAttachments.some(function(el) {\n return el.scanStatus === 2;\n })\n )\n vm.updateInvoice(invoice, true, 'hasAttachments');\n }\n })\n .error(function(error) {\n newAttachments.forEach(function(attachment) {\n var index = invoice.attachments.indexOf(attachment);\n invoice.attachments.splice(index, 1);\n });\n flySvc.error(error.code, error.parameters, null, error.type);\n return '';\n });\n };\n\n vm.deleteAttachment = function(invoice, attachment) {\n dialogsSvc.showYesNo('comfirmDeleteTitle', 'confirmDeleteInvoiceAttachment').then(function() {\n $http\n .delete(appUrls.documents + '/api/documents/' + attachment.id)\n .success(function(result) {\n var index = invoice.attachments.indexOf(attachment);\n invoice.attachments.splice(index, 1);\n if (invoice.attachments.length === 0) vm.updateInvoice(invoice, false, 'hasAttachments');\n })\n .error(function(error) {\n flySvc.error(error.code, error.parameters);\n return '';\n });\n });\n };\n\n vm.downloadAttachment = attachment => DocumentService.download(attachment.id);\n\n vm.changeTransactionType = function(invoice) {\n invoice.transactionTypeActive = !invoice.transactionTypeActive;\n\n if (invoice.taxCategory !== invoice.customerTaxCategory)\n vm.updateInvoice(invoice, invoice.customerTaxCategory, 'taxCategory');\n\n if (invoice.taxExemptionReason !== invoice.customerTaxExemptionReason)\n vm.updateInvoice(invoice, invoice.customerTaxExemptionReason, 'taxExemptionReason');\n };\n\n vm.changeIsInvoice = function(invoice) {\n const isInvoice = !invoice.isInvoice;\n vm.updateInvoice(invoice, isInvoice, 'isInvoice');\n };\n\n var retrieveAttachments = function(invoice) {\n $http\n .get(appUrls.documents + '/api/documents/links/' + invoice.id + '/2/1')\n .success(function(result) {\n if (result && result.length > 0) {\n result.forEach(function(attachment) {\n invoice.attachments.push(attachment);\n });\n }\n })\n .error(function(error) {\n showError(error);\n });\n };\n\n vm.toggleDetails = function(invoice, expandDetails) {\n if (\n (invoice.loadingDetails &&\n detailRequests[invoice.id] &&\n detailRequests[invoice.id].$cancelRequest) ||\n invoice.isRemoving\n ) {\n detailRequests[invoice.id].$cancelRequest();\n invoice.loadingDetails = false;\n return;\n }\n\n if (\n !invoice.showDetails &&\n (!invoice.isLoaded() || (!!expandDetails && !invoice.detailsLoaded))\n ) {\n invoice.loadingDetails = true;\n detailRequests[invoice.id] = invoiceLineResource.query(\n {\n id: invoice.id,\n full: !!expandDetails,\n },\n function(data) {\n invoice.invoiceLines = data;\n invoice.showDetails = true;\n invoice.loadingDetails = false;\n invoice.attachments = [];\n invoice.detailsLoaded = !!expandDetails;\n if (invoice.hasAttachments) retrieveAttachments(invoice);\n if (typeof expandDetails !== 'undefined') {\n invoice.invoiceLines.forEach(line => {\n line.showDetails = !!expandDetails;\n line.showRelation =\n line.registrations &&\n line.registrations.some(r => r.invoiceStreamId !== invoice.invoiceStreamId);\n });\n }\n },\n function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n invoice.loadingDetails = false;\n },\n );\n } else {\n invoice.showDetails = !invoice.showDetails;\n if (typeof expandDetails !== 'undefined') {\n invoice.invoiceLines.forEach(line => (line.showDetails = !!expandDetails));\n }\n }\n };\n\n vm.deleteInvoiceRequest = function(invoice, neverInvoice, neverSettleAdvances = false) {\n return draftInvoiceResource.remove(\n {\n id: invoice.id,\n neverInvoice: !!neverInvoice,\n neverSettleAdvances: !!neverSettleAdvances,\n },\n function() {\n flySvc.success($filter('translate')('Invoice removed'));\n\n if (vm.table) {\n for (var t = 0; t < vm.table.rows.length; t++) {\n if (vm.table.rows[t].id === invoice.id) {\n vm.table.rows.splice(t, 1);\n break;\n }\n }\n vm.reloadKPIs();\n }\n\n invoicingSvc.reloadBillableRelations();\n },\n function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n },\n );\n };\n\n vm.deleteInvoice = function(invoice) {\n if (!invoice.isLoaded()) {\n //If invoice type is settlement, show never settle advance button\n if (invoice.invoiceType === 3) {\n return invoiceDialogsSvc\n .deleteWithNeverInvoice('comfirmUndoInvoice', null, [\n {\n message: 'neverSettleAdvancesAndNeverInvoiceRegistrations',\n value: { neverInvoice: true, neverSettleAdvances: true },\n },\n ])\n .then(function(result) {\n if (typeof result === 'object') {\n const { neverInvoice = false, neverSettleAdvances = false } = result;\n return vm.deleteInvoiceRequest(invoice, neverInvoice, neverSettleAdvances);\n } else {\n return vm.deleteInvoiceRequest(invoice, !!result, false);\n }\n });\n }\n //Show only never invoice reg button\n return invoiceDialogsSvc\n .deleteWithNeverInvoice('comfirmUndoInvoice')\n .then(function(neverInvoice) {\n return vm.deleteInvoiceRequest(invoice, !!neverInvoice, false);\n });\n }\n //Invoice is loaded so we can fine tune buttons\n\n const hasRegistrations = invoice.hasRegistrations();\n const hasSettledAdvances = invoice.hasLineType(6);\n if (!hasRegistrations && !hasSettledAdvances) {\n //Probably a free invoice, show delete dialog\n return dialogsSvc.showYesNo('comfirmDeleteTitle', 'comfirmDeleteInvoice').then(function() {\n vm.deleteInvoiceRequest(invoice, false);\n });\n }\n\n if (hasRegistrations && hasSettledAdvances) {\n //Show dialog with extra button for advances\n return invoiceDialogsSvc\n .deleteWithNeverInvoice('comfirmUndoInvoice', null, [\n {\n message: 'neverSettleAdvancesAndNeverInvoiceRegistrations',\n value: { neverInvoice: true, neverSettleAdvances: true },\n },\n ])\n .then(function(result) {\n if (typeof result === 'object') {\n const { neverInvoice = false, neverSettleAdvances = false } = result;\n return vm.deleteInvoiceRequest(invoice, neverInvoice, neverSettleAdvances);\n } else {\n return vm.deleteInvoiceRequest(invoice, !!result, false);\n }\n });\n }\n\n if (hasRegistrations) {\n //Show only never invoice reg button\n return invoiceDialogsSvc\n .deleteWithNeverInvoice('comfirmUndoInvoice')\n .then(function(neverInvoice) {\n return vm.deleteInvoiceRequest(invoice, !!neverInvoice, false);\n });\n }\n\n if (hasSettledAdvances) {\n //Show never settle instead of never invoice reg button\n return invoiceDialogsSvc\n .deleteWithNeverInvoice('comfirmUndoInvoice', 'neverSettleAdvance')\n .then(function(neverSettleAdvances) {\n return vm.deleteInvoiceRequest(invoice, false, neverSettleAdvances);\n });\n }\n };\n\n vm.updateInvoice = function(invoice, value, prop) {\n if (!invoice || value === undefined || invoice[prop] === value) return false;\n if (prop === 'discountAmount') {\n if (invoice.discountType === 0) {\n if (Math.abs(value) > 1) {\n flySvc.error(10015, ['0', '100']);\n return '';\n } else if (value < 0) flySvc.message('msgNegativeDiscountWarning');\n }\n }\n\n if (\n prop === 'dateToNumber' &&\n value &&\n !invoice.canSend &&\n dataCache.getDefaultCompany().autoSendInvoices\n ) {\n flySvc.action('', 'msgCannotSendNoRelationEmail', 'relations.detail', 'btnOpenRelation');\n }\n\n var model = angular.copy(invoice);\n model[prop] = value;\n if (prop === 'discountType') {\n if (\n (invoice.discountType === 0 && value !== 0) ||\n (invoice.discountType !== 0 && value === 0)\n ) {\n model.discountAmount = 0;\n }\n }\n\n invoice.updating = true;\n\n return draftInvoiceResource.update({}, model).$promise.then(\n function(data) {\n invoice.updating = false;\n delete data.invoiceLines;\n angular.extend(invoice, data);\n if (invoice.invoiceErrors) {\n for (var i = 0; i < invoice.invoiceErrors.length; i++) {\n if (invoice.invoiceErrors[i].code === 11037)\n flySvc.error(invoice.invoiceErrors[i].code, invoice.invoiceErrors[i].parameters);\n }\n }\n\n const dateToNumber = moment.utc(invoice.dateToNumber).startOf('day');\n const currentDate = moment.utc().startOf('day');\n\n if (dateToNumber.isBefore(currentDate)) {\n var idx = vm.table.rows.findIndex(function(el) {\n return el.id === invoice.id;\n });\n if (idx >= 0) vm.table.rows.splice(idx, 1);\n\n flySvc.success('msgInvoiceProcessed', {\n name: $filter('relationName')(invoice.customer),\n });\n vm.reloadKPIs();\n } else if (dateToNumber.isSame(currentDate)) {\n flySvc.success('msgInvoiceWillBeProcessedTonight', {\n date: moment\n .utc()\n .startOf('day')\n .format('DD/MM/YYYY'),\n });\n }\n return false;\n },\n function(error) {\n invoice.updating = false;\n flySvc.error(error.data.code, error.data.parameters);\n return '';\n },\n );\n };\n vm.gotoInvoice = function(invoiceId, expand = false) {\n if (!invoiceId || !vm.table?.rows) return;\n var idx = vm.table.rows.findIndex(function(el) {\n return el.id === invoiceId;\n });\n if (idx < 0) return;\n vm.toggleDetails(vm.table.rows[idx], expand);\n $anchorScroll(`DraftInvoice-${invoiceId}`);\n };\n vm.reloadInvoice = function(id) {\n if (!id) return;\n return draftInvoiceResource.get({ id }).$promise.then(function(invoice) {\n var idx = vm.table.rows.findIndex(function(el) {\n return el.id === invoice.id;\n });\n invoice.invoiceLines = null;\n invoice.loadingDetails = false;\n\n if (idx >= 0) {\n if (vm.table.rows[idx].showDetails) {\n invoice.showDetails = false;\n angular.extend(vm.table.rows[idx], invoice);\n vm.toggleDetails(vm.table.rows[idx]);\n } else {\n angular.extend(vm.table.rows[idx], invoice);\n }\n } else {\n invoice.selected = vm.selectAll;\n invoice.discountActive = invoice.discountAmount > 0;\n invoice.transactionTypeActive = invoice.taxCategory !== invoice.customerTaxCategory;\n\n vm.table.rows.unshift(invoice);\n }\n });\n };\n\n vm.finalizeInvoice = function(invoice, sendMail) {\n if (!invoice || !invoice.id) return null;\n\n const doFinalizeInvoice = sendViaPeppol => {\n if (sendMail) {\n invoice.sending = true;\n } else {\n invoice.numbering = true;\n }\n\n return resourceFactorySvc.get('invoice').number(\n {\n sendMail: sendMail,\n sendViaPeppol: sendViaPeppol,\n },\n [invoice.id],\n function(result) {\n invoice.sending = false;\n invoice.numbering = false;\n\n if (result && result.hasOwnProperty(invoice.id)) {\n invoice.error = result[invoice.id];\n } else {\n if (vm.table) {\n for (var t = 0; t < vm.table.rows.length; t++) {\n if (vm.table.rows[t].id === invoice.id) {\n vm.table.rows.splice(t, 1);\n break;\n }\n }\n vm.reloadKPIs();\n }\n\n flySvc.success('msgInvoiceProcessed', {\n name: $filter('relationName')(invoice.customer),\n });\n }\n },\n function(error) {\n invoice.sending = false;\n invoice.numbering = false;\n flySvc.error(error.data.code, error.data.parameters);\n },\n ).$promise;\n };\n\n return doFinalizeInvoice();\n };\n\n vm.fixErrors = function(invoice) {\n if (invoice.companyErrors.length) {\n if (\n invoice.companyErrors.length &&\n (invoice.companyErrors[0].code === 1043 ||\n invoice.companyErrors[0].code === 1044 ||\n invoice.companyErrors[0].code === 1045)\n ) {\n $state.go('settings.invoicetemplates');\n } else {\n $state.go('settings.company', { companyId: invoice.companyId });\n }\n } else if (invoice.relationErrors.length) {\n $state.go('relations.detail', {\n relId: invoice.customer.id,\n });\n }\n };\n\n vm.preview = function(invoice) {\n invoiceDialogsSvc.previewDraftInvoice(invoice, vm.finalizeInvoice);\n };\n\n vm.hasFilters = function() {\n if (vm.table && vm.table.tableInfo && !angular.equals(vm.table.tableInfo.filters, {}))\n return true;\n return !angular.equals(vm.filters, emptyFilters);\n };\n vm.toggleAdvanceFilters = function() {\n vm.showAdvanceFilters = !vm.showAdvanceFilters;\n const params = JSON.parse(sessionStorage.getItem('DraftInvoiceOverviewParams')) || {};\n\n sessionStorage.setItem(\n 'DraftInvoiceOverviewParams',\n JSON.stringify({\n ...params,\n showAdvanceFilters: vm.showAdvanceFilters,\n }),\n );\n };\n vm.selectAllChanged = function() {\n if (!vm.table || !vm.table.rows) return;\n angular.forEach(vm.table.rows, function(el) {\n el.selected = vm.selectAll;\n });\n };\n\n vm.selectedCount = function(canNumber = false) {\n if (!vm.table || !vm.table.rows) return 0;\n const total = (vm.dashboard && vm.dashboard.totalInvoices) || 0;\n const count = vm.table.rows.reduce(\n (cnt, inv) =>\n cnt + (vm.selectAll !== (inv.selected && (!canNumber || inv.canNumber(true))) ? 1 : 0),\n 0,\n );\n\n return vm.selectAll ? total - count : count;\n };\n\n vm.getErrorMsg = flySvc.getErrorMsg;\n\n vm.getBookyearInfo = function(invoice) {\n if (!vm.bookyearInfo) return null;\n return vm.bookyearInfo[invoice.companyId];\n };\n vm.getPreviousBookyear = function(invoice) {\n const info = vm.getBookyearInfo(invoice);\n if (!info) return null;\n return invoice.isInvoice\n ? info.lastInvoiceDatePreviousBookyear\n : info.lastCreditnoteDatePreviousBookyear;\n };\n vm.getCurrentBookyear = function(invoice) {\n const info = vm.getBookyearInfo(invoice);\n if (!info) return null;\n return invoice.isInvoice\n ? info.lastInvoiceDateCurrentBookyear\n : info.lastCreditnoteDateCurrentBookyear;\n };\n\n vm.getBatchSelectionParams = function(canNumber = false) {\n return {\n selectAll: vm.selectAll,\n invoiceIds:\n vm.table && vm.table.rows\n ? vm.table.rows\n .filter(inv => vm.selectAll !== (inv.selected && (!canNumber || inv.canNumber(true))))\n .map(inv => inv.id)\n : [],\n };\n };\n\n vm.createInvoiceReport = function() {\n vm.creatingReport = true;\n\n const requestQueryParams = {\n ...vm.currentSearchParams,\n culture: $translate.use(),\n connectionId: SignalRService.getConnectionId(),\n };\n\n const requestBody = vm.getBatchSelectionParams();\n\n return draftInvoiceResource.report(requestQueryParams, requestBody).$promise.then(\n function() {\n vm.creatingReport = false;\n\n flySvc.success('ExportToExcelStarted');\n },\n function(error) {\n vm.creatingReport = false;\n showError(error);\n },\n );\n };\n vm.exportRegistrations = invoice => {\n const filters = {\n [invoice.invoiceType === 6 ? 'intraCompanyInvoiceId' : 'invoiceId']: invoice.id,\n from: null,\n to: null,\n };\n\n return registrationService\n .createReport(filters, null, null, guid.empty)\n .$promise.then(function() {\n flySvc.success('ExportToExcelStarted');\n }, showError);\n };\n\n vm.canExportRegistrations = invoice => {\n if (!invoice) return false;\n if (invoice.invoiceType === 2) return false; //Advance\n if (invoice.invoiceType === 5) return false; //Free\n if (invoice.isLoaded()) return invoice.hasRegistrations(); //If the lines are loaded, check if there are registrations\n return true;\n };\n vm.showInvoicingHistory = function(invoice) {\n return invoiceDialogsSvc.showInvoicingHistory(\n invoice.invoiceStreamId,\n invoice,\n invoice.customer.id,\n );\n };\n vm.showInvoiceAudit = function(invoice) {\n invoiceDialogsSvc.invoiceAudit(invoice);\n };\n vm.getBillingInformation = invoice => {\n if (!invoice.hasBillingInformation) return;\n const relationId = invoice.customer.id;\n if (typeof vm.billingInformation[relationId] !== 'undefined') {\n invoice.showBillingInformation = true;\n return vm.billingInformation[relationId];\n }\n vm.billingInformation[relationId] = null;\n return $http\n .get(`${appUrls.api}/api/Relation/BillingInformation/${invoice.customer.id}`)\n .then(({ data }) => {\n vm.billingInformation[relationId] = data;\n invoice.showBillingInformation = true;\n return data;\n }, showError);\n };\n\n const draftInvoiceRemovedHandler = invoiceId => {\n if (!vm.table || !vm.table.rows) return;\n $timeout(function() {\n var idx = vm.table.rows.findIndex(x => x.id === invoiceId);\n if (idx >= 0) vm.table.rows.splice(idx, 1);\n }, 0);\n };\n const refreshProcessingInvoices = () => {\n $timeout(() => invoicingSvc.reloadProcessingInvoicesInfo(), 0);\n };\n\n SignalRService.subscribe('draftInvoiceRemoved', draftInvoiceRemovedHandler);\n SignalRService.subscribe('refreshProcessingInvoices', refreshProcessingInvoices);\n\n $scope.$on('$destroy', function() {\n SignalRService.unsubscribe('draftInvoiceRemoved', draftInvoiceRemovedHandler);\n SignalRService.unsubscribe('refreshProcessingInvoices', refreshProcessingInvoices);\n if (vm.retrieveRequest && vm.retrieveRequest.$cancelRequest)\n vm.retrieveRequest.$cancelRequest();\n if (vm.kpiRequest && vm.kpiRequest.$cancelRequest) vm.kpiRequest.$cancelRequest();\n if (bookyearInfoRequest && bookyearInfoRequest.$cancelRequest)\n bookyearInfoRequest.$cancelRequest();\n });\n if (vm.initFilters) {\n vm.initFilters = false;\n if (!initStateParams()) {\n setParamsFromSessionStorage();\n }\n if (vm.filters.relationId && !vm.customer) {\n initCustomer(vm.filters.relationId);\n }\n }\n}\n","import angular from 'angular';\nimport moment from 'moment';\nimport { BillableRegistration } from '../model/billableRegistration';\nimport { guid1 } from '@/shared/utils/guid';\n\nangular.module('cloudX').directive('cxDraftInvoiceRow', function () {\n return {\n restrict: 'E',\n template: require('./draftInvoiceRow.html'),\n scope: {\n invoice: '=',\n reloadInvoice: '&',\n gotoInvoice: '&',\n },\n controllerAs: 'vm',\n bindToController: true,\n controller: [\n '$filter',\n 'resourceFactorySvc',\n 'dataCache',\n 'dialogsSvc',\n 'flySvc',\n 'invoiceDialogsSvc',\n 'appMessages',\n 'appInsights',\n '$q',\n '$timeout',\n '$translate',\n function (\n $filter,\n resourceFactorySvc,\n dataCache,\n dialogsSvc,\n flySvc,\n invoiceDialogsSvc,\n appMessages,\n appInsights,\n $q,\n $timeout,\n $translate,\n ) {\n var vm = this;\n var draftInvoiceLineResource = resourceFactorySvc.get('invoiceLine');\n var invoiceRegistrationResource = resourceFactorySvc.get('invoiceRegistration');\n vm.datepickerOptions = {\n startingDay: 1,\n initDate: moment.utc().startOf('day').toDate(),\n };\n vm.currentUser = dataCache.getArray('employee');\n vm.users = dataCache.getObject('user');\n\n //Invoice line actions\n vm.addInvoiceLine = function () {\n invoiceDialogsSvc.newDraftInvoiceLine(vm.invoice).then(function (result) {\n vm.processServerResult(result, null, null);\n var idx = vm.invoice.invoiceErrors.findIndex(function (el) {\n return el.code === 11026;\n });\n if (idx >= 0) vm.invoice.invoiceErrors.splice(idx, 1);\n });\n };\n\n const deleteInvoiceLineRequest = function (line, neverInvoice = false) {\n return draftInvoiceLineResource.delete(\n {\n id: vm.invoice.id,\n invoiceLineId: line.id,\n neverInvoice,\n },\n null,\n function (result) {\n vm.processServerResult(result, line, null);\n },\n vm.showError,\n ).$promise;\n };\n\n vm.deleteInvoiceLine = function (line) {\n if (line.type === 6) {\n //SettledAdvance, postpone to next billing period/invoice\n return invoiceDialogsSvc\n .deleteWithNeverInvoice('comfirmUndoOrNeverSettledAdvanceLine', 'neverSettleAdvance')\n .then(function (neverInvoice) {\n return deleteInvoiceLineRequest(line, neverInvoice);\n });\n }\n if (!vm.invoice.status && line.hasRegistrations) {\n //Line has registrations, provide never invoice option\n return invoiceDialogsSvc\n .deleteWithNeverInvoice('comfirmUndoOrNeverInvoiceLine')\n .then(function (neverInvoice) {\n return deleteInvoiceLineRequest(line, neverInvoice);\n });\n }\n //Show normal delete confirm for all other types\n return dialogsSvc\n .showYesNo('comfirmDeleteTitle', 'comfirmDeleteInvoiceLine')\n .then(function () {\n return deleteInvoiceLineRequest(line, false);\n });\n };\n\n vm.undoLine = function (line) {\n draftInvoiceLineResource.reset(\n {\n id: vm.invoice.id,\n id2: line.id,\n },\n null,\n function (result) {\n vm.processServerResult(result, line, null);\n },\n );\n };\n\n vm.updateLineVatRate = function (line, vatRate, vatType) {\n if (line.billedVatRate === vatRate && line.billedVatType === vatType) return false;\n var model = angular.copy(line);\n\n model.vatRate = vatRate;\n model.vatType = vatType;\n return draftInvoiceLineResource\n .update(\n {\n id: vm.invoice.id,\n },\n model,\n )\n .$promise.then(function (result) {\n vm.processServerResult(result, line, null);\n return false;\n }, vm.showError);\n };\n\n vm.saveLine = function (line, prop, value) {\n //Called from outside somewhere...\n if (!line || !prop || typeof line[prop] === 'undefined') return '';\n if (prop === 'discountPercentage') {\n if (Math.abs(value) > 1) {\n flySvc.error(10015, ['0', '100']);\n return '';\n } else if (value < 0) flySvc.message('msgNegativeDiscountWarning');\n }\n if (prop === 'quantity' && value !== null) {\n if (vm.invoice.isInvoice && value < 0) {\n flySvc.message('Attention: an amount in an invoice is usually positive');\n } else if (!vm.invoice.isInvoice && value > 0) {\n flySvc.message('Attention: an amount in a credit note is usually negative');\n }\n }\n if (line[prop] === value) return false;\n var model = angular.copy(line);\n model[prop] = value;\n\n return draftInvoiceLineResource\n .update(\n {\n id: vm.invoice.id,\n },\n model,\n )\n .$promise.then(function (result) {\n vm.processServerResult(result, line, null);\n return false;\n }, vm.showError);\n };\n\n vm.moveLine = function (line, up) {\n if (!line || !line.id) return false;\n return draftInvoiceLineResource.move(\n {\n id: vm.invoice.id,\n id2: line.id,\n up: !!up,\n },\n null,\n function (data) {\n if (data.length !== 2) return;\n var line2;\n if (data[0].id === line.id) {\n line.nr = data[0].nr;\n line2 = data[1];\n } else {\n line.nr = data[1].nr;\n line2 = data[0];\n }\n\n var line3 = vm.invoice.invoiceLines.find(function (el) {\n return el.id === line2.id;\n });\n if (line3) line3.nr = line2.nr;\n },\n vm.showError,\n );\n };\n\n vm.toggleDetails = function (line) {\n if (!line.hasRegistrations) return;\n if (!line.registrations) {\n line.registrations = [];\n draftInvoiceLineResource.registrations(\n { id: vm.invoice.id, invoiceLineId: line.id },\n function (registrations) {\n line.registrations = registrations;\n line.showRelation =\n registrations &&\n registrations.some((r) => r.invoiceStreamId !== vm.invoice.invoiceStreamId);\n\n line.showDetails = !line.showDetails;\n },\n );\n } else {\n line.showDetails = !line.showDetails;\n }\n };\n\n //Invoice detail registration actions\n vm.addDetailLine = function (line) {\n line.newDetailLines = line.newDetailLines || [];\n if (line.registrations.length) {\n var first = line.registrations[0];\n line.newDetailLines.push(\n new BillableRegistration({\n userId: vm.currentUser.userID,\n date: new Date(),\n customer: first.customer,\n type: first.type,\n resourceId: first.resourceId,\n resource: first.resource,\n originalQuantity: 0.0,\n originalUnitPrice: first.billedUnitPrice(),\n originalDiscountPercentage: first.billedDiscountPercentage(),\n originalVatRate: first.billedVatRate(),\n originalVatType: first.billedVatType(),\n remark: '',\n internalRemark: '',\n quantity: 1.0,\n unitPrice: first.billedUnitPrice(),\n discountPercentage: first.billedDiscountPercentage(),\n price: first.currentPrice(),\n vatRate: first.billedVatRate(),\n vatType: first.billedVatType(),\n originalBillable: false,\n billable: true,\n invoiceStreamId: line.invoiceStreamId,\n originalInForfait: first.originalInForfait,\n inForfait: first.inForfait,\n }),\n );\n line.showDetails = true;\n }\n };\n\n vm.toggleBillable = function (line, detail) {\n vm.saveDetailLine(\n line,\n detail,\n 'billable',\n detail.billable == null ? !detail.originalBillable : !detail.billable,\n );\n };\n\n vm.validateDetailLine = function (detail) {\n if (typeof detail.quantity === 'undefined') return false;\n if (detail.quantity === 0) return false;\n if (typeof detail.discountPercentage === 'undefined') return false;\n if (detail.discountPercentage < 0 || detail.discountPercentage > 1) return false;\n if (detail.unitPrice < 0) return false;\n return true;\n };\n\n vm.submitDetailLine = function (line, detail) {\n if (!vm.validateDetailLine(detail)) return;\n invoiceRegistrationResource.create(\n {\n invoiceId: vm.invoice.id,\n },\n detail,\n function (result) {\n var idx = line.newDetailLines.indexOf(detail);\n if (idx >= 0) line.newDetailLines.splice(idx, 1);\n vm.processServerResult(result, line, detail);\n },\n vm.showError,\n );\n };\n\n const deleteDetailLineRequest = (line, detail, neverInvoice = false) => {\n return invoiceRegistrationResource.delete(\n {\n invoiceId: vm.invoice.id,\n id: detail.id,\n neverInvoice,\n },\n null,\n function (result) {\n vm.processServerResult(result, line, detail);\n },\n vm.showError,\n ).$promise;\n };\n vm.deleteDetailLine = function (line, detail) {\n if (!detail.id) {\n var idx = line.newDetailLines.indexOf(detail);\n if (idx >= 0) line.newDetailLines.splice(idx, 1);\n return;\n }\n\n if (!!vm.invoice.status || detail.source === 1) {\n //Show normal delete if this is a numbered invoice or this is a billing registration\n dialogsSvc\n .showYesNo(\n 'comfirmDeleteTitle',\n detail.source === 1\n ? 'comfirmDeleteInvoiceDetailLine'\n : 'comfirmUndoInvoiceDetailLine',\n )\n .then(function () {\n deleteDetailLineRequest(line, detail, false);\n });\n } else {\n invoiceDialogsSvc\n .deleteWithNeverInvoice('comfirmUndoOrNeverInvoiceDetailLine')\n .then(function (neverInvoice) {\n deleteDetailLineRequest(line, detail, neverInvoice);\n });\n }\n };\n\n vm.undoDetailLine = function (line, detail) {\n detail.undo();\n vm.saveDetailLine(line, detail);\n };\n vm.updateDetailVatRate = function (line, detail, vatRate, vatType) {\n if (!line || !detail) return '';\n if (detail.billedVatRate() === vatRate && detail.billedVatType() === vatType)\n return false;\n var model = angular.copy(detail);\n if (detail.originalVatRate === vatRate && detail.originalVatType === vatType) {\n model.vatRate = null;\n model.vatType = null;\n } else {\n model.vatRate = vatRate;\n model.vatType = vatType;\n }\n\n return invoiceRegistrationResource\n .update(\n {\n invoiceId: vm.invoice.id,\n },\n model,\n )\n .$promise.then(function (result) {\n vm.processServerResult(result, line, detail);\n return false;\n }, vm.showError);\n };\n\n vm.saveDetailLine = function (line, detail, field, value) {\n var model;\n if (!line || !detail) return '';\n if (typeof field !== 'undefined' && field !== null) {\n if (typeof detail[field] === 'undefined') return '';\n if (field === 'discountPercentage') {\n if (Math.abs(value) > 1) {\n flySvc.error(10015, ['0', '100']);\n return '';\n } else if (value < 0) flySvc.message('msgNegativeDiscountWarning');\n }\n\n if (field === 'quantity' && value !== null) {\n if (vm.invoice.isInvoice && value < 0) {\n flySvc.message('Attention: an amount in an invoice is usually positive');\n } else if (!vm.invoice.isInvoice && value > 0) {\n flySvc.message('Attention: an amount in a credit note is usually negative');\n }\n }\n if (field === 'date' && !value) return '';\n\n if (detail[field] === value) return false;\n model = angular.copy(detail);\n model[field] = value;\n } else {\n //Save without checking if value changed\n model = angular.copy(detail);\n }\n if (model.date instanceof Date) model.date = model.date.ISO();\n try {\n if (!!vm.invoice.status && appInsights)\n appInsights.trackEvent(\n { name: 'InvoiceDetailUpdatedOnNumberedInvoice' },\n {\n lineId: line.id,\n detailId: detail.id,\n field,\n newValue: JSON.stringify(model[field]),\n oldValue: JSON.stringify(detail[field]),\n },\n );\n } catch (e) {\n //ignore\n }\n\n return invoiceRegistrationResource\n .update(\n {\n invoiceId: vm.invoice.id,\n },\n model,\n )\n .$promise.then(function (result) {\n vm.processServerResult(result, line, detail);\n return false;\n }, vm.showError);\n };\n\n vm.resourceChanged = function (line, detail, resource) {\n if (!resource || !resource.id) return '';\n if (!line || !detail) return '';\n if (detail.resourceId === resource.id) return false;\n return invoiceRegistrationResource\n .changeResource(null, {\n id: detail.id,\n resourceId: resource.id,\n })\n .$promise.then(function (result) {\n vm.processServerResult(result, line, detail);\n return false;\n }, vm.showError);\n };\n\n vm.getUserName = function (userId) {\n if (!userId) return '';\n if (userId === guid1) return $translate.instant('SystemUser');\n if (!vm.users) vm.users = dataCache.getObject('user') || {};\n var user = vm.users[userId];\n if (!user) return '';\n return ((user.firstName || '') + ' ' + (user.lastName || '')).trim();\n };\n\n vm.processServerResult = function (result, line, registration) {\n var emptyGuid = '00000000-0000-0000-0000-000000000000';\n\n vm.invoice.baseAmount = result.baseAmount;\n vm.invoice.vatAmount = result.vatAmount;\n vm.invoice.totalExclusive = result.totalExclusive;\n vm.invoice.totalInclusive = result.totalInclusive;\n vm.invoice.exForfaitAmount = result.exForfaitAmount;\n vm.invoice.originalAmount = result.originalAmount;\n vm.invoice.adjustedAmount = result.adjustedAmount;\n vm.invoice.modifiedDate = result.modifiedDate;\n\n if (result.updatedLines != null && result.updatedLines.length > 0) {\n for (var i = 0; i < result.updatedLines.length; i++) {\n var line2 = vm.invoice.findLine(result.updatedLines[i].id);\n if (line2 == null) {\n line2 = result.updatedLines[i];\n if (line2.registrations.length) line2.showDetails = true;\n vm.invoice.addLine(line2);\n } else {\n line2.update(result.updatedLines[i]);\n }\n }\n }\n\n if (result.deletedRegistrationId != null && result.deletedRegistrationId !== emptyGuid) {\n if (angular.isDefined(line) && typeof line === 'string')\n line = vm.invoice.findLine(line);\n\n if (line) {\n line.deleteRegistration(result.deletedRegistrationId);\n line.showDetails = true;\n }\n }\n\n if (result.deletedLine != null && result.deletedLine !== emptyGuid) {\n vm.invoice.deleteLine(result.deletedLine);\n }\n if (result.otherInvoiceId != null && result.otherInvoiceId !== emptyGuid) {\n if (vm.reloadInvoice)\n $q.when(vm.reloadInvoice({ invoiceId: result.otherInvoiceId })).then(() => {\n if (vm.gotoInvoice) {\n flySvc.action(\n 'msgRegistrationMovedToOtherDraftInvoice',\n 'msgClickToOpenDraftInvoice',\n function () {\n vm.gotoInvoice({ invoiceId: result.otherInvoiceId, expand: true });\n },\n );\n } else {\n flySvc.info('msgRegistrationMovedToOtherDraftInvoice');\n }\n });\n }\n\n vm.invoice.discountType = result.discountType;\n vm.invoice.discountAmount = result.discountAmount;\n\n if (result.billingErrors) {\n const billingErrors = JSON.parse(result.billingErrors);\n vm.invoice.parseBillingErrors(billingErrors);\n } else {\n vm.invoice.parseBillingErrors([]);\n }\n };\n\n vm.updateRegistrationRelation = function (line, detail) {\n if (!detail.id || detail.source === 1) return;\n if (!!vm.invoice.status) return;\n\n invoiceDialogsSvc.updateRegistrationRelation(detail, true).then(function (result) {\n if (result) vm.processServerResult(result, line, detail);\n });\n };\n\n vm.showError = function (error) {\n flySvc.error(error.data.code, error.data.parameters);\n return '';\n };\n\n vm.resourcesCache = {};\n vm.getResourcesForType = function (type) {\n if (type > 2) return [];\n if (typeof vm.resourcesCache[type] !== 'undefined') return vm.resourcesCache[type];\n\n vm.resourcesCache[type] = resourceFactorySvc\n .get('resource')\n .reg({ type: type })\n .$promise.then(function (data) {\n vm.resourcesCache[type] = data.map((item) => ({\n ...item,\n label: $filter('resourceName')(item),\n code: item.code || '',\n }));\n return vm.resourcesCache[type];\n });\n return vm.resourcesCache[type];\n };\n\n vm.openTaskDetail = function(detail) {\n vm.taskDetail = { id: detail.plannedTaskId };\n };\n\n vm.closeTaskDetail = function() {\n $timeout(() => {\n vm.taskDetail = null;\n }, 0);\n };\n },\n ],\n };\n});\n","import angular from 'angular';\nimport { InvoiceLine } from '../model/invoiceLine';\nimport { DraftInvoice } from '../model/draftInvoice';\nimport { Invoice } from '../model/invoice';\nimport axios from 'axios';\nimport SignalRService from '@/shared/services/SignalRService';\nimport adminpulse from '@/shared/utils/adminpulse';\nimport moment from 'moment';\nimport DocumentService from '@/shared/services/DocumentService';\nimport { getZendeskUrl } from '@/shared/components/ZendeskHelp';\nimport userStorage from '@/shared/services/userStorage';\nimport guid, { guid1 } from '@/shared/utils/guid';\n\nconst emptyFilters = {\n relationId: null, // Guid?\n invoiceId: null, // Guid?\n isInvoice: null, // Bool?\n isPaid: null, // Bool?\n searchValue: null, // string\n associate: null, // Guid?\n assistantBackup: null, // Guid?\n assistant: null, // Guid?\n responsible: null, // Guid?\n billingUser: null, // UserId\n seniorUser: null, // UserId\n relationType: [], // int[]\n legalForms: [], // int[]\n withLabels: [], // string[]\n withoutLabels: [], // string[]\n invoiceDateFrom: moment\n .utc()\n .startOf('year')\n .toDate(), // date?\n invoiceDateTo: moment\n .utc()\n .endOf('year')\n .toDate(), // date?\n expiryDateFrom: null, // date?\n expiryDateTo: null, // date?\n status: {\n invoiceStatus: [],\n sendStatus: [],\n exportStatus: [],\n peppolExportStatus: [],\n },\n invoiceType: [], // int[]\n ownCompanies: [],\n paymentMethod: [],\n sendInvoiceStrategy: [],\n assignmentTemplateId: null, //Guid?\n invoiceStreamId: null, //Guid?\n invoiceScheduleTypes: [], //Guid[]\n deliveryFailed: null,\n withBillingErrors: null,\n relationGroups: [],\n crmTypes: [],\n};\n\nconst columnSelectionStorageKey = 'InvoicingOverviewHiddenColumns';\nangular\n .module('cloudX')\n .controller('InvoicingOverviewCtrl', [\n '$scope',\n '$timeout',\n '$state',\n '$q',\n '$filter',\n 'resourceFactorySvc',\n 'flySvc',\n 'dataCache',\n 'invoiceDialogsSvc',\n 'invoicingSvc',\n 'dialogsSvc',\n 'transactionHttpSvc',\n '$anchorScroll',\n 'appUrls',\n '$http',\n 'Blob',\n 'FileSaver',\n '$translate',\n '$window',\n 'registrationService',\n invoicingOverviewCtrl,\n ]);\n\nfunction invoicingOverviewCtrl(\n $scope,\n $timeout,\n $state,\n $q,\n $filter,\n resourceFactorySvc,\n flySvc,\n dataCache,\n invoiceDialogsSvc,\n invoicingSvc,\n dialogsSvc,\n transactionHttpSvc,\n $anchorScroll,\n appUrls,\n $http,\n Blob,\n FileSaver,\n $translate,\n $window,\n registrationService,\n) {\n var vm = this;\n var invoiceResource = resourceFactorySvc.get('invoice');\n vm.users = dataCache.getObject('user');\n vm.companies = dataCache.getArray('company');\n vm.isMultiCompany = vm.companies.length > 1;\n vm.showAssignments = dataCache.getArray('assignmentsEnabled');\n const detailRequests = {};\n vm.billingInformation = {}; //Key=relationId\n\n vm.showPaymentMonitoring = dataCache.showPaymentMonitoring;\n\n vm.getCompanySettings = companyId => {\n return dataCache.getCompanySettings(companyId);\n };\n\n vm.today = new Date();\n vm.year = moment.utc().year();\n vm.todayMin30 = new Date().setTime(vm.today.getTime() - 30 * 86400000);\n vm.wizardType = '0';\n vm.selectAll = false;\n vm.initFilters = true;\n vm.showAdvanceFilters = false;\n vm.period = 'year';\n vm.filters = { ...emptyFilters };\n vm.currentFilters = null;\n vm.customer = null;\n vm.hasFilter = false;\n vm.processingInvoicesInfo = invoicingSvc.getProcessingInvoicesInfo();\n\n vm.showInvoicingHistory = function(invoice) {\n return invoiceDialogsSvc.showInvoicingHistory(\n invoice.invoiceStream.id,\n invoice,\n invoice.customer.id,\n );\n };\n\n try {\n vm.isFileSaverSupported = !!new Blob();\n } catch (e) {\n vm.isFileSaverSupported = false;\n }\n\n var showError = function(error) {\n flySvc.error(error);\n };\n var showArrayBufferError = function(error) {\n if (!error) return;\n try {\n var buffer = error.data || error;\n const errorObject = adminpulse.arrayBufferToObject(buffer) || {};\n flySvc.error(errorObject);\n } catch (ex) {\n console.error(ex);\n //Parsing error?\n flySvc.error();\n }\n };\n\n vm.refreshTotalsRequest = null;\n vm.refreshTotals = function(filters) {\n //Cancel previous request, cancelling a completed request will have no effect\n if (vm.refreshTotalsRequest && vm.refreshTotalsRequest.$cancelRequest)\n vm.refreshTotalsRequest.$cancelRequest();\n vm.refreshTotalsRequest = invoiceResource.info(\n filters || { ...vm.currentFilters, ...((vm.table && vm.table.currentParams()) || {}) },\n function(data) {\n vm.dashboard = data;\n },\n );\n };\n\n vm.retrieveRequest = null;\n vm.retrieve = function(params) {\n //Cancel previous request, cancelling a completed request will have no effect\n if (vm.retrieveRequest && vm.retrieveRequest.$cancelRequest)\n vm.retrieveRequest.$cancelRequest();\n\n let requestParams = { ...(params || {}) };\n\n if (\n requestParams.sort &&\n angular.isArray(requestParams.sort) &&\n requestParams.sort[0] === 'date'\n ) {\n requestParams.sort.unshift('isProcessing');\n }\n\n vm.hasFilter = vm.hasFilters();\n\n vm.currentFilters = { ...vm.filters };\n\n // spread out object of status into separate props for ease of access on backend\n const urlCompatibleFilters = {\n ...vm.filters,\n ...vm.filters.status,\n };\n delete urlCompatibleFilters.status;\n\n sessionStorage.setItem(\n 'InvoicingOverviewParams',\n JSON.stringify({\n tableParams: params,\n filterType: vm.filterType,\n filters: vm.currentFilters,\n period: vm.period,\n showAdvanceFilters: vm.showAdvanceFilters,\n }),\n );\n\n requestParams = { ...requestParams, ...urlCompatibleFilters };\n if (requestParams.page === 0) vm.refreshTotals(requestParams);\n vm.retrieveRequest = invoiceResource.query(requestParams);\n return vm.retrieveRequest.$promise.then(function(data) {\n vm.currentSearchParams = requestParams;\n\n if (requestParams.invoiceId && data && data.length === 1) {\n vm.toggleDetails(data[0]); // Load details when filter on 1 invoice\n }\n\n angular.forEach(data, function(el) {\n el.selected = vm.selectAll;\n });\n\n return data;\n });\n };\n\n const initStateParams = () => {\n if (!$state.params) return false;\n let hasParams = false;\n const {\n relation = null,\n relationId = null,\n invoiceId = null,\n filterType = null,\n dateFrom = null,\n dateUntil = null,\n period = null,\n invoiceStreamId = null,\n } = $state.params;\n\n if (filterType && filterType > 0) {\n hasParams = true;\n vm.setFilter(filterType, true);\n }\n\n if (relation && relation.id) {\n hasParams = true;\n vm.filters.relationId = relation.id;\n if (relation.name) {\n vm.customer = { ...relation };\n }\n } else if (relationId) {\n hasParams = true;\n vm.filters.relationId = relationId;\n }\n if (invoiceStreamId) {\n hasParams = true;\n vm.filters.invoiceStreamId = invoiceStreamId;\n }\n if (dateFrom) {\n hasParams = true;\n vm.filters.invoiceDateFrom = moment.utc(dateFrom).toDate();\n }\n if (dateUntil) {\n hasParams = true;\n vm.filters.invoiceDateTo = moment.utc(dateUntil).toDate();\n }\n if (period) {\n hasParams = true;\n vm.setPeriod(period, true);\n }\n\n if (invoiceId) {\n hasParams = true;\n vm.filters.invoiceId = invoiceId;\n }\n\n return hasParams;\n };\n const initCustomer = relationId => {\n $http.post(appUrls.api + '/api/Relation/Names', [relationId]).then(({ data }) => {\n if (data && data.length) {\n vm.customer = data[0];\n }\n });\n };\n\n const setParamsFromSessionStorage = () => {\n try {\n const sessionParams = JSON.parse(sessionStorage.getItem('InvoicingOverviewParams'));\n\n if (sessionParams) {\n const {\n filterType = null,\n filters = {},\n tableParams = {},\n showAdvanceFilters = false,\n period,\n } = sessionParams;\n vm.filterType = filterType;\n vm.filters = { ...vm.filters, ...filters };\n if (typeof vm.filters.invoiceDateFrom === 'string')\n vm.filters.invoiceDateFrom = moment.utc(vm.filters.invoiceDateFrom).toDate();\n if (typeof vm.filters.invoiceDateTo === 'string')\n vm.filters.invoiceDateTo = moment.utc(vm.filters.invoiceDateTo).toDate();\n if (typeof vm.filters.expiryDateFrom === 'string')\n vm.filters.expiryDateFrom = moment.utc(vm.filters.expiryDateFrom).toDate();\n if (typeof vm.filters.expiryDateTo === 'string')\n vm.filters.expiryDateTo = moment.utc(vm.filters.expiryDateTo).toDate();\n if (period) vm.setPeriod(period, true);\n\n vm.showAdvanceFilters = showAdvanceFilters;\n if (vm.table) {\n vm.table.initializeParams(tableParams);\n }\n }\n } catch (error) {\n console.error('Error while setting parameters from session storage');\n console.error(error);\n }\n };\n vm.setPeriod = function(period, noReload = false) {\n vm.period = period || 'year';\n\n switch (vm.period) {\n case 'none':\n vm.period = null;\n break;\n case 'month':\n case 'quarter':\n case 'year':\n vm.updateFilter(\n {\n invoiceDateFrom: moment\n .utc()\n .startOf(vm.period)\n .toDate(),\n invoiceDateTo: moment\n .utc()\n .endOf(vm.period)\n .toDate(),\n },\n noReload,\n );\n break;\n case 'prevMonth':\n vm.updateFilter(\n {\n invoiceDateFrom: moment\n .utc()\n .add(-1, 'months')\n .startOf('month')\n .toDate(),\n invoiceDateTo: moment\n .utc()\n .add(-1, 'months')\n .endOf('month')\n .toDate(),\n },\n noReload,\n );\n break;\n case 'prevQuarter':\n vm.updateFilter(\n {\n invoiceDateFrom: moment\n .utc()\n .add(-3, 'months')\n .startOf('quarter')\n .toDate(),\n invoiceDateTo: moment\n .utc()\n .add(-3, 'months')\n .endOf('quarter')\n .toDate(),\n },\n noReload,\n );\n break;\n case 'prevYear':\n vm.updateFilter(\n {\n invoiceDateFrom: moment\n .utc()\n .add(-1, 'year')\n .startOf('year')\n .toDate(),\n invoiceDateTo: moment\n .utc()\n .add(-1, 'year')\n .endOf('year')\n .toDate(),\n },\n noReload,\n );\n break;\n case 'all':\n default:\n vm.updateFilter(\n {\n invoiceDateFrom: null,\n invoiceDateTo: null,\n },\n noReload,\n );\n break;\n }\n };\n\n vm.details = {};\n\n vm.getUserName = function(userId) {\n if (userId === guid1) return $translate.instant('SystemUser');\n var user = vm.users[userId];\n if (!user) return '';\n return ((user.firstName || '') + ' ' + (user.lastName || '')).trim();\n };\n\n var retrieveAttachments = function(invoice) {\n return $http\n .get(appUrls.documents + '/api/documents/links/' + invoice.id + '/2/1')\n .success(function(result) {\n if (result && result.length > 0) {\n vm.details[invoice.id].attachments = result;\n }\n return null;\n })\n .error(function(error) {\n showError(error);\n return null;\n });\n };\n\n vm.downloadAttachment = attachment => DocumentService.download(attachment.id);\n\n vm.toggleDetails = function(invoice, expandDetails) {\n if (\n invoice.loadingDetails &&\n detailRequests[invoice.id] &&\n detailRequests[invoice.id].$cancelRequest\n ) {\n detailRequests[invoice.id].$cancelRequest();\n invoice.loadingDetails = false;\n return;\n }\n\n if (!invoice.showDetails && !vm.details[invoice.id]?.completed) {\n invoice.loadingDetails = true;\n vm.details[invoice.id] = {};\n vm.details[invoice.id].attachments = [];\n\n if (invoice.hasAttachments) retrieveAttachments(invoice);\n\n detailRequests[invoice.id] = invoiceResource.lines(\n {\n id: invoice.id,\n },\n function(data) {\n detailRequests[invoice.id] = null;\n vm.details[invoice.id].lines = data.lines.map(function(l) {\n var line = new InvoiceLine(l);\n line.showRelation =\n line.registrations &&\n invoice.invoiceStream &&\n line.registrations.some(r => r.invoiceStreamId !== invoice.invoiceStream.id);\n if (typeof expandDetails !== 'undefined') {\n line.showDetails = !!expandDetails;\n }\n return line;\n });\n vm.details[invoice.id].payments = data.payments;\n vm.details[invoice.id].completed = true;\n invoice.showDetails = true;\n invoice.loadingDetails = false;\n },\n function(error) {\n detailRequests[invoice.id] = null;\n flySvc.error(error.data.code, error.data.parameters);\n invoice.loadingDetails = false;\n },\n );\n } else {\n invoice.showDetails = !invoice.showDetails;\n if (typeof expandDetails !== 'undefined') {\n vm.details[invoice.id].lines.forEach(line => (line.showDetails = !!expandDetails));\n }\n }\n };\n\n vm.copyInvoice = function(invoice) {\n if (!invoice || !invoice.id) return;\n invoiceResource.copy(\n {},\n [invoice.id],\n function(result) {\n $state.go('invoicing.draft', {\n relation: invoice.customer,\n });\n },\n showError,\n );\n };\n vm.creditInvoice = function(invoice) {\n if (!invoice || !invoice.id) return;\n invoiceResource.credit(\n {},\n [invoice.id],\n function(result) {\n $state.go('invoicing.draft', {\n relation: invoice.customer,\n });\n },\n showError,\n );\n };\n\n vm.selectAllChanged = function() {\n if (!vm.table || !vm.table.rows) return;\n angular.forEach(vm.table.rows, function(el) {\n if (!el.isProcessing) el.selected = vm.selectAll;\n });\n };\n\n vm.selectedCount = function() {\n if (!vm.table || !vm.table.rows) return 0;\n const total = (vm.dashboard && vm.dashboard.totalInvoices) || 0;\n const count = vm.table.rows.reduce(\n (cnt, inv) => cnt + (!inv.isProcessing && inv.selected !== vm.selectAll ? 1 : 0),\n 0,\n );\n return vm.selectAll ? total - count : count;\n };\n\n vm.filterType = 0;\n vm.setFilter = function(type, noReload) {\n if (!vm.table) return;\n const emptyFilter = {\n status: {\n invoiceStatus: [],\n exportStatus: [],\n sendStatus: [],\n peppolExportStatus: [],\n },\n isInvoice: null,\n isPaid: null,\n expiryDateFrom: null,\n expiryDateTo: null,\n deliveryFailed: null,\n notExported: false,\n };\n if (type === 0) {\n vm.updateFilter(emptyFilter, noReload);\n } else if (type === 1) {\n vm.updateFilter(\n {\n ...emptyFilter,\n isInvoice: true,\n isPaid: false,\n expiryDateFrom: null,\n expiryDateTo: null,\n },\n noReload,\n );\n } else if (type === 2) {\n vm.updateFilter(\n {\n ...emptyFilter,\n isInvoice: true,\n isPaid: false,\n expiryDateFrom: moment\n .utc()\n .startOf('day')\n .add(-1, 'months')\n .toDate(),\n expiryDateTo: moment\n .utc()\n .startOf('day')\n .toDate(),\n },\n noReload,\n );\n } else if (type === 3) {\n vm.updateFilter(\n {\n ...emptyFilter,\n isInvoice: true,\n isPaid: false,\n expiryDateFrom: null,\n expiryDateTo: moment\n .utc()\n .startOf('day')\n .add(-1, 'months')\n .toDate(),\n },\n noReload,\n );\n } else if (type === 5) {\n vm.updateFilter(\n {\n ...emptyFilter,\n status: {\n ...emptyFilter.status,\n sendStatus: [0],\n peppolExportStatus: [0, 3], // not exported & export failed\n },\n },\n noReload,\n );\n } else if (type === 6) {\n vm.updateFilter(\n {\n ...emptyFilter,\n status: {\n ...emptyFilter.status,\n exportStatus: [0],\n },\n },\n noReload,\n );\n } else if (type === 7) {\n vm.updateFilter(\n {\n ...emptyFilter,\n deliveryFailed: true,\n },\n noReload,\n );\n } else if (type === 8) {\n vm.updateFilter(\n {\n ...emptyFilter,\n notExported: true,\n },\n noReload,\n );\n }\n\n vm.filterType = type;\n };\n vm.updateFilter = function(value, noReload) {\n if (value) {\n vm.filters = { ...vm.filters, ...value };\n }\n\n if (!noReload && !angular.equals(vm.currentFilters, vm.filters)) {\n //vm.filterType = 999; // Custom filter\n vm.table.reload();\n }\n };\n\n vm.customerFilterChanged = function(value) {\n const cust = typeof value === 'undefined' ? vm.customer : value;\n vm.updateFilter({ relationId: cust && cust.id ? cust.id : null, invoiceStreamId: null });\n };\n\n vm.hasFilters = function() {\n if (vm.table && vm.table.tableInfo && !angular.equals(vm.table.tableInfo.filters, {}))\n return true;\n return !angular.equals(vm.filters, emptyFilters);\n };\n vm.clearFilters = function() {\n if (vm.table) vm.table.clearFilter();\n vm.filters = { ...emptyFilters };\n vm.period = 'year';\n vm.filterType = -1;\n vm.customer = null;\n vm.table.reload();\n };\n\n vm.downloadSeparatePdf = function(dl, documentPdfId) {\n if (typeof dl === 'undefined') dl = true;\n if (!documentPdfId) {\n if (!vm.table || !vm.table.rows) return;\n var invoices = vm.table.rows.filter(el => el.selected && !el.isProcessing);\n if (invoices.length > 10) {\n flySvc.warning('msgOpenInvoicesInTabsIsLimited');\n } else {\n angular.forEach(invoices, function(el) {\n if (el.documentPdfId) {\n DocumentService.open(el.documentPdfId);\n } else {\n flySvc.error('msgCouldNotFindInvoicePdf');\n }\n });\n }\n } else {\n if (!documentPdfId) {\n flySvc.error('msgCouldNotFindInvoicePdf');\n return;\n }\n DocumentService.open(documentPdfId);\n }\n };\n\n vm.downloadInvoices = function(invoiceId) {\n if (vm.downloading) return;\n if (vm.selectedCount() === 0 && !invoiceId) {\n return;\n }\n\n let batchParams = {};\n\n if (invoiceId) {\n batchParams = {\n selectAll: false,\n invoiceIds: [invoiceId],\n };\n } else {\n batchParams = vm.getBatchSelectionParams();\n }\n\n const params = { ...vm.currentSearchParams };\n\n const connectionId = SignalRService.getConnectionId();\n\n vm.downloading = true;\n $http\n .post(appUrls.api + '/api/Invoice/zip?connectionId=' + connectionId, batchParams, { params })\n .then(\n function(result) {\n vm.downloading = false;\n flySvc.message('msgDownloadingFile');\n },\n function(error) {\n flySvc.message('msgCreateFileInBackgroundFailed');\n vm.downloading = false;\n },\n );\n };\n\n vm.renderInvoiceDetail = function(invoiceId) {\n dialogsSvc\n .showYesNoCancel(\n 'msgIncludeNonBillableRegistrationsTitle',\n 'msgIncludeNonBillableRegistrationsMsg',\n )\n .then(\n function(includeNonBillableRegistrations) {\n if (includeNonBillableRegistrations === null) return false; // Cancel changes\n\n const endpoint =\n appUrls.api +\n '/api/invoice/renderInvoiceDetail?id=' +\n invoiceId +\n '&includeNonBillableRegistrations=' +\n includeNonBillableRegistrations;\n\n return $http\n .get(endpoint, {\n responseType: 'arraybuffer',\n })\n .then(\n result => {\n const contentDisposition = result.headers('Content-Disposition');\n const filename = adminpulse.getFileNameFromHeader(contentDisposition);\n var fileType = result.headers('Content-Type');\n\n var blob = new Blob([result.data], { type: 'application/pdf' });\n if (blob) {\n FileSaver.saveAs(blob, filename);\n }\n },\n error => {\n showArrayBufferError(error);\n },\n );\n },\n function() {\n return false; // Cancel changes\n },\n );\n };\n\n vm.export = function() {\n let companyId = vm.getSingleCompanyId();\n\n if (!companyId) {\n flySvc.message('msgExporterMultipleCompanies');\n return;\n }\n\n if (vm.loadingExporter) return;\n vm.loadingExporter = true;\n const batchParams = vm.getBatchSelectionParams();\n const params = {\n ...vm.currentSearchParams,\n onlyNotExportedInvoices: vm.selectedCount() === 0,\n };\n\n invoiceResource.export(\n params,\n batchParams,\n function({ result }) {\n vm.loadingExporter = false;\n if (result.containsAlreadyExportedInvoices) {\n dialogsSvc.showOkCancel('WarningTitle', 'msgSelectionContainedAlreadyExportedInvoices');\n }\n if (result.exportedUsingAdminConnect) {\n flySvc.success('msgInvoicesSentToConnect');\n return;\n }\n const config = { headers: { 'Content-Type': 'multipart/form-data' } };\n\n const formData = new FormData();\n var BASE_URL = 'https://www.admin-export.be/';\n formData.append('id', companyId);\n formData.append('file', new Blob([result.exporterXml], { type: 'application/xml' }));\n\n axios({\n method: 'post',\n url: BASE_URL + 'Plugin/External',\n data: formData,\n })\n .then(function(response) {\n window.open(BASE_URL + '?id=' + companyId + '&file=1');\n })\n .catch(function(response) {\n if (response.request.readyState == 4) {\n //There will be a cross-domain error, so don't validate the status.\n window.open(BASE_URL + '?id=' + companyId + '&file=1');\n } else {\n console.error('Error : ', response);\n }\n });\n },\n function(error) {\n vm.loadingExporter = false;\n if (error.data.code != 11033) return showError(error);\n vm.table.reload();\n return flySvc.action('ErrorTitle', 'msgExporterMissingAccNr');\n },\n );\n };\n\n vm.quickSend = function(invoice) {\n const useMailEditor = dataCache.getCompanySettings(invoice.companyId).sendInvoiceUseMailEditor;\n\n if (!useMailEditor) {\n if (invoice.canSend) {\n invoice.quickSending = true;\n invoiceResource.quickSend(\n {},\n [invoice.id],\n function(result) {\n if (result && result.result) {\n invoice.quickSending = false;\n vm.refreshTotals();\n flySvc.success('msgMailsSent', {\n p0: result.result,\n });\n\n invoice.reminders++;\n invoice.sentOn = new Date();\n invoice.emailStatus = 1; // Mark as sent\n }\n },\n showError,\n );\n\n return;\n } else {\n flySvc.message('msgCannotSendNoRelationEmail');\n }\n }\n //Open in editor\n vm.openMailDialog(invoice);\n };\n\n vm.openMailDialog = function(invoice) {\n if (!vm.table || !vm.table.rows) return false;\n\n invoiceDialogsSvc.mailInvoice(invoice).then(function(result) {\n if (result) {\n flySvc.success('msgSingleInvoiceEmailSent', {\n relation: $filter('relationName')(invoice.customer),\n });\n\n invoice.sentOn = new Date();\n invoice.emailStatus = 1; // Mark as sent\n }\n });\n\n return true;\n };\n\n vm.mergePdf = function() {\n if (vm.openingMergedPdf) return;\n if (vm.selectedCount() === 0) return;\n const batchParams = vm.getBatchSelectionParams();\n const params = { ...vm.currentSearchParams };\n\n vm.openingMergedPdf = true;\n const connectionId = SignalRService.getConnectionId();\n $http\n .post(appUrls.api + '/api/invoice/mergedpdf?connectionId=' + connectionId, batchParams, {\n responseType: 'arraybuffer',\n params,\n })\n .then(\n function(result) {\n vm.openingMergedPdf = false;\n flySvc.message('msgDownloadingFile');\n },\n function(error) {\n vm.openingMergedPdf = false;\n showError(error);\n },\n );\n };\n\n vm.batchMarkSent = function() {\n if (vm.markingSent) return;\n if (vm.selectedCount() === 0) return;\n const batchParams = vm.getBatchSelectionParams();\n const params = { ...vm.currentSearchParams };\n\n vm.markingSent = true;\n $http\n .post(appUrls.api + '/api/invoice/BatchMarkSent', batchParams, {\n params,\n })\n .then(\n function({ data }) {\n vm.markingSent = false;\n\n if (!data) {\n flySvc.success('msgInvoicesWillBeMarkedAsSent');\n } else {\n if (data.length > 0) {\n flySvc.success('msgConfirmChange');\n invoicesUpdatedHandler(data);\n }\n }\n },\n function(error) {\n vm.markingSent = false;\n showError(error);\n },\n );\n };\n\n vm.batchMarkExported = function() {\n if (vm.markingExported) return;\n if (vm.selectedCount() === 0) return;\n const batchParams = vm.getBatchSelectionParams();\n const params = { ...vm.currentSearchParams };\n\n vm.markingExported = true;\n $http\n .post(appUrls.api + '/api/invoice/BatchMarkExported', batchParams, {\n params,\n })\n .then(\n function({ data }) {\n vm.markingExported = false;\n\n if (!data) {\n flySvc.success('msgInvoicesWillBeMarkedAsExported');\n } else {\n if (data.length > 0) {\n flySvc.success('msgConfirmChange');\n invoicesUpdatedHandler(data);\n }\n }\n },\n function(error) {\n vm.markingExported = false;\n showError(error);\n },\n );\n };\n\n vm.batchMarkPaid = function() {\n if (vm.markingPaid) return;\n if (vm.selectedCount() === 0) return;\n const batchParams = vm.getBatchSelectionParams();\n const params = { ...vm.currentSearchParams };\n\n vm.markingPaid = true;\n $http\n .post(appUrls.api + '/api/invoice/BatchMarkPaid', batchParams, {\n params,\n })\n .then(\n function({ data }) {\n vm.markingPaid = false;\n flySvc.success('msgInvoicesWillBeMarkedAsPaid');\n },\n function(error) {\n vm.markingPaid = false;\n showError(error);\n },\n );\n };\n\n vm.batchClearExportStatus = function() {\n if (vm.clearingExportStatus) return;\n if (vm.selectedCount() === 0) return;\n const batchParams = vm.getBatchSelectionParams();\n const params = { ...vm.currentSearchParams };\n\n vm.clearingExportStatus = true;\n $http\n .post(appUrls.api + '/api/invoice/BatchClearExportStatus', batchParams, {\n params,\n })\n .then(\n function({ data }) {\n vm.clearingExportStatus = false;\n flySvc.success('msgInvoiceExportStatusWillBeCleared');\n },\n function(error) {\n vm.clearingExportStatus = false;\n showError(error);\n },\n );\n };\n\n vm.addPayment = function(invoice) {\n if (!(invoice.status > 0 && invoice.dueAmount() !== 0)) return;\n invoiceDialogsSvc.newInvoicePayment(invoice, null).then(function(payment) {\n if (vm.details[invoice.id] && vm.details[invoice.id].payments)\n vm.details[invoice.id].payments.push(payment);\n\n if (payment.isCreditNote) {\n invoice.paidAmount += payment.amount * (invoice.isInvoice ? 1 : -1);\n var otherId = invoice.isInvoice ? payment.referenceId : payment.invoiceId;\n var other = vm.table.rows.find(function(i) {\n return i.id === otherId;\n });\n if (other) {\n other.paidAmount += payment.amount * (other.isInvoice ? 1 : -1);\n }\n if (vm.details[otherId]) {\n vm.details[otherId].payments.push(\n angular.extend(angular.copy(payment), {\n remark: invoice.number,\n referenceId: invoice.id,\n }),\n );\n }\n } else {\n invoice.paidAmount += payment.amount;\n }\n\n vm.refreshTotals();\n });\n };\n vm.editPayment = function(invoice, payment, prop, value) {\n if (payment[prop] === value) return false;\n var copy = angular.copy(payment);\n copy[prop] = value;\n\n return (payment.isCreditNote\n ? transactionHttpSvc.updateLink\n : transactionHttpSvc.updatePayment)(copy).then(\n function() {\n if (payment.isCreditNote) {\n invoice.paidAmount += (copy.amount - payment.amount) * (invoice.isInvoice ? 1 : -1);\n var otherId = invoice.isInvoice ? payment.referenceId : payment.invoiceId;\n var other = vm.table.rows.find(function(i) {\n return i.id === otherId;\n });\n if (other) {\n other.paidAmount += (copy.amount - payment.amount) * (other.isInvoice ? 1 : -1);\n }\n if (vm.details[otherId]) {\n var p = vm.details[otherId].payments.find(function(p) {\n return (\n p.isCreditNote &&\n (invoice.isInvoice ? p.invoiceId === invoice.id : p.referenceId === invoice.id)\n );\n });\n if (p) p.amount = copy.amount;\n }\n } else {\n invoice.paidAmount += copy.amount - payment.amount;\n }\n payment[prop] = value;\n vm.refreshTotals();\n },\n function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n throw error; //rethrow error for xeditable\n },\n );\n };\n vm.deletePayment = function(invoice, payment) {\n if (payment.id)\n dialogsSvc.showYesNo('comfirmDeleteTitle', 'comfirmDeletePayment').then(function() {\n (payment.isCreditNote ? transactionHttpSvc.removeLink : transactionHttpSvc.removePayment)(\n payment.id,\n ).then(function() {\n var idx = vm.details[invoice.id].payments.indexOf(payment);\n if (idx >= 0) vm.details[invoice.id].payments.splice(idx, 1);\n if (payment.isCreditNote) {\n invoice.paidAmount -= payment.amount * (invoice.isInvoice ? 1 : -1);\n var otherId = invoice.isInvoice ? payment.referenceId : payment.invoiceId;\n var other = vm.table.rows.find(function(i) {\n return i.id === otherId;\n });\n if (other) {\n other.paidAmount -= payment.amount * (other.isInvoice ? 1 : -1);\n }\n if (vm.details[otherId]) {\n var idx2 = vm.details[otherId].payments.findIndex(function(p) {\n return (\n p.isCreditNote &&\n (invoice.isInvoice ? p.invoiceId === invoice.id : p.referenceId === invoice.id)\n );\n });\n if (idx2 >= 0) vm.details[otherId].payments.splice(idx2, 1);\n }\n } else {\n invoice.paidAmount -= payment.amount;\n vm.refreshTotals();\n }\n }, showError);\n });\n };\n\n vm.showEmailHistory = function(invoice) {\n invoiceDialogsSvc.mailHistory(invoice);\n };\n vm.showInvoiceAudit = function(invoice) {\n invoiceDialogsSvc.invoiceAudit(invoice);\n };\n vm.mailReminder = function(invoice) {\n invoiceDialogsSvc.mailReminder(invoice);\n };\n\n vm.markSent = function(invoice) {\n invoiceResource.markSent(\n {\n id: invoice.id,\n },\n null,\n function(data) {\n if (data) {\n invoice.sentOn = data.sentOn;\n invoice.sentBy = data.sentBy;\n invoice.emailStatus = data.emailStatus;\n vm.dashboard.nrNotSentInvoices--;\n flySvc.success(\n invoice.isInvoice ? 'msgInvoiceMarkedAsSent' : 'msgCreditNoteMarkedAsSent',\n );\n }\n },\n showError,\n );\n };\n\n vm.markExported = function(invoice) {\n invoiceResource.markExported(\n {\n id: invoice.id,\n },\n null,\n function(data) {\n if (data) {\n angular.extend(invoice, data);\n\n flySvc.success('SuccessTitle');\n }\n },\n showError,\n );\n };\n\n vm.clearExportStatus = function(invoice) {\n invoice.loading = true;\n invoiceResource.clearExportStatus(\n {\n id: invoice.id,\n },\n null,\n function(data) {\n invoice.loading = false;\n if (data) {\n angular.extend(invoice, data);\n\n flySvc.success('SuccessTitle');\n }\n },\n function(error) {\n invoice.loading = true;\n showError(error);\n },\n );\n };\n\n vm.editInvoice = function(invoice) {\n if (\n dataCache.getCompanySettings(invoice.companyId) &&\n dataCache.getCompanySettings(invoice.companyId).invoicePaymentProvider === 2\n ) {\n flySvc.message('msgEditInvoiceTwikeyWarning', null, 20000);\n return;\n }\n\n if (!invoice || !invoice.id || invoice.isProcessing || invoice.state & 4) return;\n invoiceResource.initEdit(\n {\n id2: invoice.id,\n },\n function(data) {\n var copy = new DraftInvoice(data.invoice);\n copy.invoiceLines = data.invoiceLines.map(function(l) {\n return new InvoiceLine(l);\n });\n invoiceDialogsSvc.editInvoice(copy).then(function(result) {\n if (result) {\n vm.details[invoice.id] = null;\n vm.table.reload();\n }\n });\n },\n showError,\n );\n };\n\n vm.unnumberInvoice = function(invoice) {\n const hasPaymentProvider =\n dataCache.getCompanySettings(invoice.companyId) &&\n dataCache.getCompanySettings(invoice.companyId).invoicePaymentProvider > 0;\n\n const message = hasPaymentProvider\n ? 'comfirmUnnumberInvoiceMessagePaymentProvider'\n : 'comfirmUnnumberInvoiceMessage';\n\n dialogsSvc.showYesNo('comfirmUnnumberInvoiceTitle', message).then(function() {\n invoiceResource.unnumber(\n { id: invoice.id },\n function(data) {\n flySvc.success('msgInvoiceSuccessfullyUnnumbered');\n\n if (vm.table.rows) {\n var idx = vm.table.rows.findIndex(x => x.id === invoice.id);\n if (idx >= 0) vm.table.rows.splice(idx, 1);\n }\n },\n error => {\n if (error.data.code === 11065) {\n const zendeskUrl = getZendeskUrl(\n '6009136333970',\n $translate.use(),\n false,\n '#h_01GANHWVF8WWNHP34GPQFQTVN2',\n );\n flySvc.custom({\n toastrType: 'error',\n titleMessage: '',\n content: $filter('translateList')(error.data.code, error.data.type),\n onClick: () => $window.open(zendeskUrl, '_blank'),\n });\n } else {\n flySvc.error(error);\n }\n },\n );\n });\n };\n\n vm.goToInvoice = function(invoiceId, showDetails) {\n var invoice = vm.table.rows.find(function(inv) {\n return inv.id === invoiceId;\n });\n if (invoice) {\n if (typeof showDetails !== 'undefined' && invoice.showDetails !== !!showDetails)\n vm.toggleDetails(invoice);\n $timeout(function() {\n $anchorScroll('inv-' + invoiceId);\n }, 100);\n } else {\n invoiceResource.query(\n {\n filter: {\n id: {\n items: [invoiceId],\n },\n },\n },\n function(data) {\n if (data && data.length === 1) {\n var el = data[0];\n if (!el.isProcessing && !el.loadingDetails && !el.showDetails) vm.toggleDetails(el);\n vm.table.rows.push(el);\n $timeout(function() {\n $anchorScroll('inv-' + invoiceId);\n }, 100);\n }\n },\n );\n }\n };\n\n vm.setHasAttachments = function(invoice, hasAttachments) {\n var model = angular.copy(invoice);\n model.hasAttachments = hasAttachments;\n\n return $http\n .put(appUrls.api + '/api/invoice/updateHasAttachments', model)\n .success(function(result) {\n return '';\n })\n .error(function(error) {\n showError(error);\n return null;\n });\n };\n\n vm.searchRelationOnPeppolNetwork = function(invoice) {\n invoice.loading = true;\n\n return $http\n .post(appUrls.api + '/api/relation/SearchRelationInPeppol?id=' + invoice.customer.id)\n .success(function(data) {\n invoice.loading = false;\n invoice.relationPeppolStatus = data.peppolStatus;\n\n if (data.peppolStatus === 1) {\n flySvc.error('msgRelationNotFoundOnPeppolNetwork');\n } else if (data.peppolStatus === 2) {\n flySvc.warning('msgRelationFoundOnPeppolNetworkButNoSupportedDocumentFormats');\n } else if (data.peppolStatus === 3) {\n // ask the user if he wants to switch the invoice strategy to peppol if the relation was found on peppol network\n if (data.currentSendInvoiceStrategy != 5) {\n return dialogsSvc\n .showYesNo('SuccessTitle', 'msgSwitchInvoiceStrategyToPeppolAfterLookup')\n .then(function() {\n return switchInvoiceStrategyToPeppol(invoice.customer.id);\n });\n } else {\n flySvc.success('msgRelationFoundOnPeppolNetwork');\n }\n }\n return '';\n })\n .error(function(error) {\n invoice.loading = false;\n showError(error);\n return null;\n });\n };\n\n vm.sendViaPeppol = function(invoice) {\n invoice.loading = true;\n\n const doSendInvoiceViaPeppol = () =>\n $http\n .post(appUrls.api + `/api/invoice/SendViaPeppol?id=${invoice.id}`)\n .success(function(result) {\n invoice.loading = false;\n flySvc.success('msgInvoiceSentViaPeppol');\n if (result) {\n return dialogsSvc\n .showYesNo('SuccessTitle', 'msgSwitchInvoiceStrategyToPeppolAfterInvoiceSent')\n .then(function() {\n return switchInvoiceStrategyToPeppol(invoice.customer.id);\n });\n }\n return '';\n })\n .error(function(error) {\n invoice.loading = false;\n const { code, type } = error;\n if (type && type.toLowerCase() === 'connectexceptioncode' && code === 603) {\n // if no peppol config found: guide user to connect page\n flySvc.action(null, flySvc.getErrorMsg(code, null, null, type), function() {\n $window.open(`${appUrls.connect}?companyId=${invoice.companyId}`, '_blank');\n });\n } else {\n showError(error);\n }\n return null;\n });\n\n if (invoice.peppolExportStatus === 2) {\n return dialogsSvc.showYesNo('WarningTitle', 'msgInvoiceAlreadyExportedViaPeppol').then(\n function() {\n return doSendInvoiceViaPeppol();\n },\n () => {\n invoice.loading = false;\n },\n );\n } else {\n return doSendInvoiceViaPeppol();\n }\n\n return;\n };\n\n var switchInvoiceStrategyToPeppol = relationId => {\n return $http\n .put(\n appUrls.api +\n `/api/relation/ModifySendInvoiceStrategy?id=${relationId}&sendInvoiceStrategy=5`,\n )\n .success(function(result) {\n flySvc.success('SuccessTitle');\n return '';\n })\n .error(function(error) {\n showError(error);\n return null;\n });\n };\n\n vm.uploadAttachment = function(files, invoice) {\n if (!files || files.length < 1) return;\n\n var newAttachments = [];\n\n var formData = new FormData();\n formData.append('documentType', 1);\n formData.append('documentLinkType', 2);\n formData.append('linkId', invoice.id);\n formData.append('relationId', invoice.customer.id);\n\n files.forEach(function(file) {\n var attachment = {\n name: file.name,\n scanStatus: 1,\n invoiceId: invoice.id,\n };\n if (!vm.details[invoice.id] || !vm.details[invoice.id].attachments) {\n vm.toggleDetails(invoice);\n }\n if (vm.details[invoice.id] && vm.details[invoice.id].attachments)\n vm.details[invoice.id].attachments.push(attachment);\n newAttachments.push(attachment);\n formData.append('data', file.data);\n });\n\n $http({\n method: 'POST',\n url: appUrls.documents + '/api/documents/',\n headers: {\n 'Content-Type': undefined,\n },\n data: formData,\n })\n .success(function(result) {\n if (result && result.length > 0) {\n result.forEach(function(file) {\n var attachment = newAttachments.find(function(el) {\n return el.name === file.name;\n });\n if (attachment) angular.extend(attachment, file);\n });\n if (\n !vm.details[invoice.id].hasAttachments &&\n newAttachments.some(function(el) {\n return el.scanStatus === 2;\n })\n )\n vm.setHasAttachments(invoice, true);\n }\n })\n .error(function(error) {\n newAttachments.forEach(function(attachment) {\n if (vm.details[invoice.id] && vm.details[invoice.id].attachments) {\n var index = vm.details[invoice.id].attachments.indexOf(attachment);\n if (index >= 0) {\n vm.details[invoice.id].attachments.splice(index, 1);\n }\n }\n });\n\n flySvc.error(error.code, error.parameters, null, error.type);\n return '';\n });\n };\n\n vm.deleteAttachment = function(invoice, attachment) {\n dialogsSvc.showYesNo('comfirmDeleteTitle', 'confirmDeleteInvoiceAttachment').then(function() {\n $http\n .delete(appUrls.documents + '/api/documents/' + attachment.id)\n .success(function(result) {\n var index = vm.details[invoice.id].attachments.indexOf(attachment);\n if (index >= 0) {\n vm.details[invoice.id].attachments.splice(index, 1);\n }\n if (vm.details[invoice.id].attachments.length === 0) vm.setHasAttachments(invoice, false);\n })\n .error(function(error) {\n flySvc.error(error.code, error.parameters);\n return '';\n });\n });\n };\n\n const invoiceUpdatedHandler = invoice => {\n if (!vm.table || !vm.table.rows) return;\n $timeout(function() {\n var updatedInvoice = new Invoice(invoice);\n var oldInvoice = vm.table.rows.find(function(inv) {\n return inv.id === invoice.id;\n });\n\n if (!!oldInvoice) {\n if (oldInvoice.isProcessing && !updatedInvoice.isProcessing) {\n updatedInvoice.selected = vm.selectAll;\n }\n angular.extend(oldInvoice, updatedInvoice);\n }\n }, 0);\n };\n\n const invoicesUpdatedHandler = invoices => {\n if (invoices && invoices.length) {\n for (let i = 0; i < invoices.length; i++) {\n const invoice = invoices[i];\n invoiceUpdatedHandler(invoice);\n }\n }\n };\n\n vm.createInvoiceReport = function() {\n vm.creatingReport = true;\n\n const requestQueryParams = {\n ...vm.currentSearchParams,\n culture: $translate.use(),\n connectionId: SignalRService.getConnectionId(),\n };\n\n const requestBody = vm.getBatchSelectionParams();\n\n return invoiceResource.report(requestQueryParams, requestBody).$promise.then(\n function() {\n vm.creatingReport = false;\n flySvc.success('ExportToExcelStarted');\n },\n function(error) {\n vm.creatingReport = false;\n showError(error);\n },\n );\n };\n vm.createInvoiceLinesReport = function() {\n vm.creatingReport = true;\n\n const requestQueryParams = {\n ...vm.currentSearchParams,\n culture: $translate.use(),\n connectionId: SignalRService.getConnectionId(),\n };\n\n const requestBody = vm.getBatchSelectionParams();\n\n return invoiceResource.linesReport(requestQueryParams, requestBody).$promise.then(\n function() {\n vm.creatingReport = false;\n flySvc.success('ExportToExcelStarted');\n },\n function(error) {\n vm.creatingReport = false;\n showError(error);\n },\n );\n };\n\n const documentScannedHandler = document => {\n if (!document || !document.id) return;\n\n Object.keys(vm.details).forEach(function(key, index) {\n if (vm.details[key] && vm.details[key].attachments) {\n for (var i = 0; i < vm.details[key].attachments.length; i++) {\n var attachment = vm.details[key].attachments[i];\n if (attachment.id === document.id) {\n angular.extend(attachment, document);\n\n var invoice = vm.table.rows.find(function(invoice) {\n return invoice.id === key;\n });\n\n if (invoice && !invoice.hasAttachments && attachment.scanStatus === 2)\n vm.setHasAttachments(invoice, true);\n\n return;\n }\n }\n }\n });\n };\n const refreshProcessingInvoices = () => {\n $timeout(() => invoicingSvc.reloadProcessingInvoicesInfo(), 0);\n };\n\n SignalRService.subscribe('invoiceUpdated', invoiceUpdatedHandler);\n SignalRService.subscribe('invoicesUpdated', invoicesUpdatedHandler);\n SignalRService.subscribe('refreshProcessingInvoices', refreshProcessingInvoices);\n\n $scope.$on('$destroy', function() {\n SignalRService.unsubscribe('invoiceUpdated', invoiceUpdatedHandler);\n SignalRService.unsubscribe('invoicesUpdated', invoicesUpdatedHandler);\n SignalRService.unsubscribe('refreshProcessingInvoices', refreshProcessingInvoices);\n if (vm.refreshTotalsRequest && vm.refreshTotalsRequest.$cancelRequest)\n vm.refreshTotalsRequest.$cancelRequest();\n if (vm.retrieveRequest && vm.retrieveRequest.$cancelRequest)\n vm.retrieveRequest.$cancelRequest();\n });\n\n vm.getErrorMsg = flySvc.getErrorMsg;\n\n vm.fixErrors = function(invoice) {\n if (invoice.exportErrors.length) {\n $state.go('relations.detail', {\n relId: invoice.customer.id,\n });\n }\n };\n\n vm.toggleAdvanceFilters = function() {\n vm.showAdvanceFilters = !vm.showAdvanceFilters;\n const params = JSON.parse(sessionStorage.getItem('InvoicingOverviewParams')) || {};\n\n sessionStorage.setItem(\n 'InvoicingOverviewParams',\n JSON.stringify({\n ...params,\n showAdvanceFilters: vm.showAdvanceFilters,\n }),\n );\n };\n\n vm.getBatchSelectionParams = function() {\n return {\n selectAll: vm.selectAll,\n invoiceIds:\n vm.table && vm.table.rows\n ? vm.table.rows\n .filter(inv => !inv.isProcessing && !!inv.selected !== vm.selectAll)\n .map(inv => inv.id)\n : [],\n };\n };\n\n vm.batchMailInvoices = function() {\n if (vm.selectedCount() === 0) return;\n\n const params = { ...vm.currentSearchParams };\n const batchParams = vm.getBatchSelectionParams();\n let languages = [];\n const companyId = vm.getSingleCompanyId();\n\n if (!vm.selectAll) {\n languages = Object.keys(\n vm.table.rows\n .filter(el => el.selected && !el.isProcessing)\n .reduce((l, i) => {\n l[i.customer.languageCode] = true;\n return l;\n }, {}),\n );\n }\n\n invoiceDialogsSvc.batchMailInvoices(params, batchParams, languages, companyId);\n };\n vm.getSingleCompanyId = function() {\n if (vm.companies.length === 1) return vm.companies[0].id; //There is only 1 company, return it\n if (vm.filters && vm.filters.ownCompanies && vm.filters.ownCompanies.length === 1) {\n //Has company filter with only 1 company selected\n const company = vm.companies.find(x => x.id === vm.filters.ownCompanies[0]);\n if (company) return company.id;\n }\n if (!vm.selectAll) {\n //Select all not selected, get company id from selected invoices\n const selectedInvoiceCompanyIds = [\n ...new Set(\n vm.table.rows.filter(el => el.selected && !el.isProcessing).map(x => x.companyId),\n ),\n ];\n\n if (selectedInvoiceCompanyIds.length === 1) {\n // Only invoices for 1 company were selected\n return selectedInvoiceCompanyIds[0];\n }\n }\n //Multiple companies\n return null;\n };\n\n vm.exportRegistrations = invoice => {\n const filters = {\n [invoice.invoiceType === 6 ? 'intraCompanyInvoiceId' : 'invoiceId']: invoice.id,\n from: null,\n to: null,\n };\n\n return registrationService\n .createReport(filters, null, null, guid.empty)\n .$promise.then(function() {\n flySvc.success('ExportToExcelStarted');\n }, showError);\n };\n vm.canExportRegistrations = invoice => {\n if (!invoice) return false;\n if (invoice.invoiceType === 2) return false; //Advance\n if (invoice.invoiceType === 5) return false; //Free\n if (vm.details[invoice.id]?.lines) {\n //If the lines are loaded, check if there are registrations\n return vm.details[invoice.id].lines.some(x => x.hasRegistrations);\n }\n return true;\n };\n vm.getBillingInformation = invoice => {\n if (!invoice.hasBillingInformation) return;\n const relationId = invoice.customer.id;\n if (typeof vm.billingInformation[relationId] !== 'undefined') {\n invoice.showBillingInformation = true;\n return vm.billingInformation[relationId];\n }\n vm.billingInformation[relationId] = null;\n return $http\n .get(`${appUrls.api}/api/Relation/BillingInformation/${invoice.customer.id}`)\n .then(({ data }) => {\n vm.billingInformation[relationId] = data;\n invoice.showBillingInformation = true;\n return data;\n }, showError);\n };\n\n //Column selection\n //List of columns that can be hidden\n vm.hideableColumns = [\n {\n key: 'isInvoice',\n label: $filter('translate')('InvoiceAbbr') + '/' + $filter('translate')('CreditNoteAbbr'),\n selected: true,\n },\n {\n key: 'assignment',\n label: $filter('translate')('Assignment'),\n selected: true,\n hiddenBySecurity: !vm.showAssignments,\n },\n {\n key: 'ownCompany',\n label: $filter('translate')('OwnCompany'),\n show: false,\n hiddenBySecurity: !vm.isMultiCompany,\n },\n { key: 'relationCode', label: $filter('translate')('RelationCode'), show: false },\n { key: 'accountingNr', label: $filter('translate')('AccountingNr'), selected: false },\n { key: 'expiryDate', label: $filter('translate')('Due Date'), selected: true },\n {\n key: 'originalAmount',\n label: $filter('translate')('OriginalAmount'),\n show: false,\n },\n {\n key: 'adjustedAmount',\n label: $filter('translate')('AdjustedAmount'),\n show: false,\n },\n { key: 'totalExclusive', label: $filter('translate')('AmountExVat'), selected: false },\n\n {\n key: 'amount',\n label: vm.showPaymentMonitoring()\n ? $filter('translate')('Invoice Amount')\n : $filter('translate')('Invoiced amount'),\n selected: true,\n },\n {\n key: 'paidAmount',\n label: $filter('translate')('Paid Amount'),\n selected: true,\n hiddenBySecurity: !vm.showPaymentMonitoring(),\n },\n {\n key: 'dueAmount',\n label: $filter('translate')('Balance'),\n selected: true,\n hiddenBySecurity: !vm.showPaymentMonitoring(),\n },\n { key: 'invoiceType', label: $filter('translate')('Invoice type'), selected: true },\n {\n key: 'peppol',\n label: $filter('translate')('Peppol'),\n selected: true,\n hiddenBySecurity: !$filter('tenantConfiguration')('[0,1]') && !$filter('feature')('32'),\n },\n {\n key: 'status',\n label: $filter('translate')('Invoice State'),\n selected: true,\n },\n ];\n //Store hidden columns in object for easy use\n vm.hiddenColumns = {};\n\n vm.rebuildHiddenColumns = function() {\n vm.hiddenColumns = vm.hideableColumns.reduce((r, i) => {\n r[i.key] = !i.selected;\n return r;\n }, {});\n\n vm.countVisibleExtraColumns = 0;\n Object.keys(vm.hiddenColumns).forEach(column => {\n if (!vm.hiddenColumns[column]) vm.countVisibleExtraColumns++;\n });\n };\n vm.initHiddenColumns = function() {\n const hiddenColumns = userStorage.getItem(columnSelectionStorageKey) || [];\n if (hiddenColumns && Object.keys(hiddenColumns).length) {\n vm.hideableColumns.forEach(col => {\n if (typeof hiddenColumns[col.key] !== 'undefined') {\n col.selected = !hiddenColumns[col.key];\n }\n if (typeof col.hiddenBySecurity !== 'undefined' && !!col.hiddenBySecurity) {\n col.selected = false;\n }\n });\n }\n vm.rebuildHiddenColumns();\n };\n\n vm.openColumnConfigDialog = function() {\n dialogsSvc\n .showCheckboxList(\n 'msgSelectTableColumns',\n vm.hideableColumns\n .filter(x => !x.hiddenBySecurity)\n .map(({ key, label, selected }) => ({ key, label, selected })),\n )\n .then(function(result) {\n if (result) {\n vm.hideableColumns.forEach(col => {\n var item = result.find(x => x.key === col.key);\n if (!item) return;\n col.selected = !!item.selected;\n });\n vm.rebuildHiddenColumns();\n //Save hidden columns\n userStorage.setItem(columnSelectionStorageKey, vm.hiddenColumns);\n }\n });\n };\n if (vm.initFilters) {\n vm.initFilters = false;\n if (!initStateParams()) {\n setParamsFromSessionStorage();\n }\n if (vm.filters.relationId && !vm.customer) {\n initCustomer(vm.filters.relationId);\n }\n }\n vm.initHiddenColumns();\n}\n","import moment from 'moment';\n\nexport function Transaction(data) {\n // ReSharper disable MisuseOfOwnerFunctionThis\n this.date = moment\n .utc()\n .startOf('day')\n .toDate();\n this.amount = 0;\n this.name = '';\n this.iban = '';\n this.bic = '';\n this.description = '';\n this.payments = [];\n if (data) {\n angular.extend(this, data);\n if (typeof this.date === 'string') this.date = new moment(this.date).toDate();\n }\n\n this.openAmount = function() {\n if (!this.payments || !this.payments.length) return this.amount;\n return (\n this.amount -\n this.payments.reduce(function(sum, pay) {\n return sum + (pay.amount || 0);\n }, 0)\n );\n };\n}\n","import angular from 'angular';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\n\nangular.module('cloudX').directive('cxInvoiceStatusFilter', [\n 'enumCacheSvc',\n '$filter',\n '$rootScope',\n function(enumCacheSvc, $filter, $rootScope) {\n return {\n restrict: 'E',\n require: '^ngModel',\n template: `
    \n
    \n \n
    \n \n \n
    \n
    \n \n
    `,\n scope: {\n placeholder: '@?',\n },\n link: function(scope, el, attrs, ngModel) {\n if (!ngModel) return;\n scope.initOnload = null;\n scope.displayValue = '';\n scope.ddwOpen = false;\n\n const invoiceFilters = [3, 1]; // processing, finalized\n const sendFilters = [0, 1, 4]; // not sent, sent, send failed\n const exportFilters = [0, 4, 1, 3]; // not exported,export started, exported, export failed,\n const peppolFilters = [0, 1, 2, 3]; // not exported,export started, exported succeeded, export failed,\n\n scope.invoiceFilters = invoiceFilters.map(x => ({\n key: x,\n label: $filter('translateList')(x, 'invoiceStatus', x),\n selected: false,\n }));\n scope.sendFilters = sendFilters.map(x => ({\n key: x,\n label: $filter('translateList')(x, 'emailStatus', x),\n selected: false,\n }));\n scope.exportFilters = exportFilters.map(x => ({\n key: x,\n label: $filter('translateList')(x, 'invoiceExportState', x),\n selected: false,\n }));\n scope.peppolFilters = peppolFilters.map(x => ({\n key: x,\n label: $filter('translateList')(x, 'invoicePeppolStatus', x),\n selected: false,\n }));\n scope.toggleItem = function(item) {\n item.selected = !item.selected;\n scope.setDisplayValue();\n };\n\n scope.setDisplayValue = function() {\n const selectedItems = scope.invoiceFilters\n .filter(x => x.selected)\n .concat(scope.sendFilters.filter(x => x.selected))\n .concat(scope.exportFilters.filter(x => x.selected))\n .concat(scope.peppolFilters.filter(x => x.selected));\n scope.displayValue = selectedItems.map(x => x.label).join(', ');\n };\n scope.clearSelected = function() {\n if (scope.invoiceFilters) {\n scope.invoiceFilters.forEach(x => {\n x.selected = false;\n });\n }\n if (scope.sendFilters) {\n scope.sendFilters.forEach(x => {\n x.selected = false;\n });\n }\n if (scope.exportFilters) {\n scope.exportFilters.forEach(x => {\n x.selected = false;\n });\n }\n if (scope.peppolFilters) {\n scope.peppolFilters.forEach(x => {\n x.selected = false;\n });\n }\n scope.displayValue = '';\n ngModel.$setViewValue({\n invoiceStatus: [],\n sendStatus: [],\n exportStatus: [],\n peppolExportStatus: [],\n });\n scope.ddwOpen = false;\n };\n\n scope.toggleDropDown = function(open) {\n if (!open) {\n const model = {\n invoiceStatus: scope.invoiceFilters.filter(x => x.selected).map(x => x.key),\n sendStatus: scope.sendFilters.filter(x => x.selected).map(x => x.key),\n exportStatus: scope.exportFilters.filter(x => x.selected).map(x => x.key),\n peppolExportStatus: scope.peppolFilters.filter(x => x.selected).map(x => x.key),\n };\n if (\n !angular.equals(\n model,\n ngModel.$viewValue || {\n invoiceStatus: [],\n sendStatus: [],\n exportStatus: [],\n peppolExportStatus: [],\n },\n )\n )\n ngModel.$setViewValue(model);\n }\n };\n\n ngModel.$render = function() {\n const model = ngModel.$viewValue || {\n invoiceStatus: [],\n sendStatus: [],\n exportStatus: [],\n peppolExportStatus: [],\n };\n let hasFilters = false;\n\n if (model.invoiceStatus && model.invoiceStatus.length) {\n hasFilters = true;\n scope.invoiceFilters.forEach(x => {\n x.selected = model.invoiceStatus && model.invoiceStatus.indexOf(x.key) >= 0;\n });\n }\n if (model.sendStatus && model.sendStatus.length) {\n hasFilters = true;\n scope.sendFilters.forEach(x => {\n x.selected = model.sendStatus && model.sendStatus.indexOf(x.key) >= 0;\n });\n }\n if (model.exportStatus && model.exportStatus.length) {\n hasFilters = true;\n scope.exportFilters.forEach(x => {\n x.selected = model.exportStatus && model.exportStatus.indexOf(x.key) >= 0;\n });\n }\n if (model.peppolExportStatus && model.peppolExportStatus.length) {\n hasFilters = true;\n scope.peppolFilters.forEach(x => {\n x.selected = model.peppolExportStatus && model.peppolExportStatus.indexOf(x.key) >= 0;\n });\n }\n if (hasFilters) {\n scope.setDisplayValue();\n } else {\n scope.clearSelected();\n }\n };\n },\n };\n },\n]);\n","import angular from 'angular';\nangular\n .module('cloudX')\n .factory('invoicingSvc', [\n '$q',\n 'resourceFactorySvc',\n 'transactionHttpSvc',\n 'flySvc',\n '$timeout',\n '$http',\n 'appUrls',\n invoicingSvc,\n ]);\n\nfunction invoicingSvc(\n $q,\n resourceFactorySvc,\n transactionHttpSvc,\n flySvc,\n $timeout,\n $http,\n appUrls,\n) {\n var billableRegistrations = [];\n var transactions = [];\n var unpaidInvoices = [];\n const processingInvoicesInfo = {\n count: 0,\n reloading: false,\n currentRequest: null,\n refreshAgain: false,\n };\n\n function showError(error) {\n flySvc.error(error.data.code, error.data.parameters);\n }\n\n function reloadRegistrations() {\n billableRegistrations.clear();\n return resourceFactorySvc.get('invoice').customerBillable({}, function(data) {\n data.forEach(function(item) {\n billableRegistrations.push(item);\n });\n }).$promise;\n }\n\n function reloadTransactions() {\n transactions.clear();\n return transactionHttpSvc.openTransactions(null, true).then(function(data) {\n data.forEach(function(item) {\n transactions.push(item);\n });\n });\n }\n\n function reloadUnpaidInvoices(takeNrOfInvoices = 10, invoiceFilters = {}) {\n unpaidInvoices.clear();\n return retrieveUnpaidInvoices(takeNrOfInvoices, invoiceFilters).then(result => {\n result.forEach(function(inv) {\n unpaidInvoices.push(inv);\n });\n }).$promise;\n }\n\n function retrieveUnpaidInvoices(takeNrOfInvoices = 10, invoiceFilters = {}) {\n return resourceFactorySvc.get('invoice').query(\n {\n filter: {\n dueAmount: {\n greater: 0.001,\n },\n status: {\n greater: 1, // Greater or equals\n },\n isInvoice: {\n items: [true],\n },\n },\n ...invoiceFilters,\n sort: ['date', 'number'],\n desc: false,\n page: 0,\n take: takeNrOfInvoices,\n },\n function(data) {\n return data;\n },\n showError,\n ).$promise;\n }\n\n function searchUnpaidInvoices(searchValue, invoiceFilters = {}) {\n return resourceFactorySvc.get('invoice').query(\n {\n filter: {\n dueAmount: {\n greater: 0.001,\n },\n status: {\n greater: 1, // Greater or equals\n },\n isInvoice: {\n items: [true],\n },\n },\n ...invoiceFilters,\n searchValue,\n sort: ['date', 'number'],\n desc: false,\n page: 0,\n take: 20,\n },\n function(data) {\n return data;\n },\n showError,\n ).$promise;\n }\n\n //reloadRegistrations();\n\n function reloadProcessingInvoicesInfo(force = false) {\n if (!force && processingInvoicesInfo.currentRequest !== null) {\n processingInvoicesInfo.refreshAgain = true; //Prevent multiple calls at the same time\n return;\n }\n\n processingInvoicesInfo.refreshAgain = false;\n processingInvoicesInfo.reloading = true;\n processingInvoicesInfo.currentRequest = $http\n .get(`${appUrls.api}/api/Invoice/ProcessingCount`)\n .then(\n ({ data }) => {\n processingInvoicesInfo.count = data || 0;\n $timeout(() => {\n if (processingInvoicesInfo.refreshAgain) {\n reloadProcessingInvoicesInfo(true);\n } else {\n processingInvoicesInfo.currentRequest = null;\n }\n }, 1000);\n },\n error => {\n flySvc.error(error);\n processingInvoicesInfo.currentRequest = null;\n },\n )\n .finally(() => {\n processingInvoicesInfo.reloading = false;\n });\n }\n\n return {\n getBillableRelations: function() {\n return billableRegistrations;\n },\n reloadBillableRelations: reloadRegistrations,\n\n getTransactions: function() {\n return transactions;\n },\n reloadTransactions: reloadTransactions,\n\n getUnpaidInvoices: function() {\n return unpaidInvoices;\n },\n retrieveUnpaidInvoices: retrieveUnpaidInvoices,\n reloadUnpaidInvoices: reloadUnpaidInvoices,\n searchUnpaidInvoices: searchUnpaidInvoices,\n\n getProcessingInvoicesInfo: function() {\n reloadProcessingInvoicesInfo();\n return processingInvoicesInfo;\n },\n reloadProcessingInvoicesInfo,\n };\n}\n","import angular from 'angular';\nangular\n .module('cxHttpServices')\n .factory('moneyAccountHttpSvc', ['$http', moneyAccountHttpSvc]);\n\nfunction moneyAccountHttpSvc($http) {\n var baseUrl = '/api/MoneyAccount/';\n\n function handleSuccess(response) {\n return response.data;\n }\n return {\n getAccounts: function() {\n return $http.get(baseUrl + 'Get').then(handleSuccess);\n },\n createCashRegister: function(account) {\n return $http\n .post(baseUrl + 'CreateCashRegister', account)\n .then(handleSuccess);\n },\n createBankAccount: function(account) {\n return $http\n .post(baseUrl + 'CreateBankAccount', account)\n .then(handleSuccess);\n },\n updateCashRegister: function(account) {\n return $http\n .get(baseUrl + 'UpdateCashRegister', account)\n .then(handleSuccess);\n },\n updateBankAccount: function(account) {\n return $http\n .get(baseUrl + 'UpdateBankAccount', account)\n .then(handleSuccess);\n },\n remove: function(accountId) {\n return $http.delete(baseUrl + 'Delete/' + accountId).then(handleSuccess);\n },\n };\n}\n","import angular from 'angular';\n\nimport { Transaction } from '../model/transaction';\n\nangular\n .module('cxHttpServices')\n .factory('transactionHttpSvc', ['$http', 'appUrls', '$q', transactionHttpSvc]);\n\nfunction transactionHttpSvc($http, appUrls, $q) {\n var baseUrl = appUrls.api + '/api/Transaction/';\n var basePaymentUrl = appUrls.api + '/api/Payment/';\n\n function handleSuccess(response) {\n return response.data;\n }\n\n function transformArray(response) {\n return response.data.map(function(val) {\n return new Transaction(val);\n });\n }\n //return $http.get(baseUrl + 'Open', { params: { sort: ['date', 'name'], take: 50, skip: 0, search: { name: 'e' }, filter: { name: { items: ['Kenji','Test'] } } } }).then(transformArray);\n function getTransactions(params) {\n var deferred = $q.defer();\n return $http\n .get(`${baseUrl}Get/`, {\n params: params,\n timeout: deferred.promise,\n cancel: deferred,\n })\n .then(transformArray);\n }\n\n return {\n getTransactions,\n openTransactions: params => getTransactions({ ...params, closed: false }),\n closedTransactions: params => getTransactions({ ...params, closed: true }),\n matchTransaction: function(transId) {\n return $http.get(baseUrl + 'Match/' + transId).then(handleSuccess);\n },\n matchAllTransactions: function(params) {\n return $http.get(baseUrl + 'MatchAll', { params }).then(handleSuccess);\n },\n createTransaction: function(transaction) {\n return $http.post(baseUrl + 'Post', transaction).then(function(response) {\n return new Transaction(response.data);\n });\n },\n updateTransaction: function(transaction) {\n return $http.put(baseUrl + 'Put', transaction).then(handleSuccess);\n },\n unarchiveTransaction: function(transaction) {\n return $http.post(baseUrl + 'Unarchive', transaction).then(handleSuccess);\n },\n removeTransaction: function(transId) {\n return $http.delete(baseUrl + 'Delete/' + transId).then(handleSuccess);\n },\n createPayment: function(transId, payment) {\n return $http.post(basePaymentUrl + 'Post/' + transId, payment).then(handleSuccess);\n },\n updatePayment: function(payment) {\n return $http.put(basePaymentUrl + 'Put', payment);\n },\n removePayment: function(paymentId) {\n return $http.delete(basePaymentUrl + 'Delete/' + paymentId);\n },\n createLink: function(documentId, payment) {\n return $http.post(basePaymentUrl + 'Link/' + documentId, payment).then(handleSuccess);\n },\n updateLink: function(payment) {\n return $http.put(basePaymentUrl + 'Link', payment);\n },\n removeLink: function(paymentId) {\n return $http.delete(basePaymentUrl + 'Link/' + paymentId);\n },\n getLinkableDocs: function(invoiceId) {\n return $http.get(basePaymentUrl + 'LinkableDocuments/' + invoiceId).then(handleSuccess);\n },\n };\n}\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxTransactionBar', [\n function() {\n return {\n restrict: 'E',\n //replace: true,\n template: require('./transactionBar.html'),\n scope: true,\n link: function(scope, element, attrs) {\n scope.limit = Number(attrs['limit']) || -1; //Default no limit\n },\n controller: [\n '$scope',\n 'invoicingSvc',\n 'invoiceDialogsSvc',\n function($scope, invoicingSvc, invoiceDialogsSvc) {\n $scope.data = invoicingSvc.getTransactions();\n invoicingSvc.reloadTransactions();\n\n $scope.linkTransaction = function(transaction) {\n invoiceDialogsSvc\n .newTransactionPayment(transaction, null)\n .then(function() {\n invoicingSvc.reloadTransactions();\n });\n };\n },\n ],\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxUnpaidInvoiceBar', [\n function() {\n return {\n restrict: 'E',\n //replace: true,\n template: require('./unpaidInvoiceBar.html'),\n scope: true,\n link: function(scope, element, attrs) {\n scope.limit = Number(attrs['limit']) || -1; //Default no limit\n },\n controller: [\n '$scope',\n 'invoicingSvc',\n function($scope, invoicingSvc) {\n $scope.data = invoicingSvc.getUnpaidInvoices();\n invoicingSvc.reloadUnpaidInvoices(10);\n },\n ],\n };\n },\n]);\n","import angular from 'angular';\nimport SignalRService from '@/shared/services/SignalRService';\nimport { Transaction } from '../model/transaction';\n\nangular\n .module('cxInvoicing')\n .controller('TransactionOverviewCtrl', [\n '$scope',\n '$state',\n '$q',\n 'transactionHttpSvc',\n 'flySvc',\n 'invoicingSvc',\n 'invoiceDialogsSvc',\n 'appMessages',\n 'dialogsSvc',\n '$http',\n 'appUrls',\n 'localStorageService',\n 'enumCacheSvc',\n transactionOverviewCtrl,\n ]);\nconst emptyFilters = {\n closed: false,\n ownCompanies: [],\n};\nfunction transactionOverviewCtrl(\n $scope,\n $state,\n $q,\n transactionHttpSvc,\n flySvc,\n invoicingSvc,\n invoiceDialogsSvc,\n appMessages,\n dialogsSvc,\n $http,\n appUrls,\n localStorageService,\n enumCacheSvc,\n) {\n var vm = this;\n var filterStorageKey = 'cx-transactions-filters';\n vm.transactionSources = [];\n\n vm.selectAll = false;\n vm.autoLinkAttempted = false;\n vm.dropObject = null;\n vm.isClosed = false;\n vm.filters = {\n ...emptyFilters,\n ...(localStorageService.get(filterStorageKey) || {}),\n };\n\n vm.currentFilters = { ...vm.filters };\n vm.documents = [];\n vm.document = null;\n vm.tableParams = null;\n\n enumCacheSvc.get('transactionSource').then(function(data) {\n vm.transactionSources = (data || []).map(x => x.key);\n });\n\n var showError = function(error) {\n flySvc.error(error);\n };\n\n vm.retrieve = function(params) {\n vm.selectAll = false;\n vm.currentFilters = { ...vm.filters };\n vm.tableParams = params;\n return transactionHttpSvc.getTransactions({ ...params, ...vm.filters });\n };\n\n vm.selectedCount = function() {\n if (!vm.transactions || !vm.transactions.rows) return 0;\n const count = vm.transactions.rows.reduce(\n (cnt, x) => cnt + (!!x.selected !== vm.selectAll ? 1 : 0),\n 0,\n );\n return vm.selectAll ? 1 : count;\n };\n\n vm.documentChanged = function() {\n const id = vm.document ? vm.document.id : null;\n vm.updateFilter({ documentId: id });\n };\n\n var refresh = function() {\n if (vm.transactions && vm.transactions.reload) {\n vm.transactions.reload();\n }\n retrieveDocuments();\n };\n\n vm.selectAllChanged = function() {\n if (!vm.transactions || !vm.transactions.rows) return;\n angular.forEach(vm.transactions.rows, function(el) {\n el.selected = vm.selectAll;\n });\n };\n vm.getBatchSelectionParams = function() {\n return {\n selectAll: vm.selectAll,\n ids:\n vm.transactions && vm.transactions.rows\n ? vm.transactions.rows.filter(x => !!x.selected !== vm.selectAll).map(x => x.id)\n : [],\n };\n };\n vm.batchDeleteTransactions = function() {\n var batchParams = vm.getBatchSelectionParams();\n\n const bodyParams = {\n ...vm.currentFilters,\n ...batchParams,\n };\n\n const queryParams = vm.tableParams;\n $http\n .post(appUrls.api + '/api/transaction/DeleteTransactions', bodyParams, {\n params: queryParams,\n })\n .then(result => {\n flySvc.success('msgXTransactionsDeleted', {\n p0: result.data,\n });\n if (batchParams.selectAll && vm.currentFilters.documentId) {\n delete vm.currentFilters.documentId;\n }\n refresh();\n }, showError);\n };\n vm.togglePayments = function(trans) {\n if (trans.payments.length) trans.showPayments = !trans.showPayments;\n };\n vm.deletePayment = function(payment) {\n if (!payment || !payment.id) return;\n transactionHttpSvc.removePayment(payment.id).then(function() {\n vm.reloadUnpaidInvoices();\n refresh();\n }, showError);\n };\n\n var retrieveDocuments = () => {\n const { closed } = vm.filters;\n var deferred = $q.defer();\n $http\n .get(appUrls.api + '/api/transaction/GetCodaFiles?closed=' + closed, {\n timeout: deferred.promise,\n cancel: deferred,\n })\n .then(result => {\n if (result && result.data) {\n vm.documents = result.data.map(x => ({\n id: x.documentId,\n label: x.documentName,\n }));\n const filters = localStorageService.get(filterStorageKey) || {};\n const { documentId } = vm.filters;\n\n if (documentId) {\n vm.document = vm.documents.find(x => x.id === documentId);\n if (!vm.document) {\n delete vm.filters.documentId;\n if (vm.transactions && vm.transactions.reload) {\n vm.transactions.reload();\n }\n }\n } else {\n vm.document = undefined;\n }\n }\n });\n };\n retrieveDocuments();\n vm.addTransaction = function() {\n const companyId =\n vm.filters.ownCompanies && vm.filters.ownCompanies.length === 1\n ? vm.filters.ownCompanies[0]\n : null;\n\n invoiceDialogsSvc.newTransaction(companyId).then(function(result) {\n refresh();\n });\n };\n\n vm.linkTransaction = function(transaction) {\n invoiceDialogsSvc.newTransactionPayment(transaction, null).then(function(result) {\n if (result) {\n vm.reloadUnpaidInvoices();\n refresh();\n }\n });\n };\n\n vm.editTransaction = function(trans) {\n invoiceDialogsSvc.editTransaction(angular.copy(trans)).then(function(result) {\n if (result) {\n if (result.status !== 0) {\n // transaction was closed, probably because the amount was edited\n if (!vm.transactions || !vm.transactions.rows) return;\n var idx = vm.transactions.rows.indexOf(trans);\n if (idx >= 0) vm.transactions.rows.splice(idx, 1);\n } else {\n angular.copy(new Transaction(result), trans);\n }\n }\n });\n };\n\n vm.removeTransaction = function(trans) {\n const information =\n trans.payments && trans.payments.length && trans.payments.length > 0\n ? 'msgArchiveTransactionExplanation'\n : 'msgDeleteTransaction';\n return dialogsSvc.showYesNo('comfirmDeleteTitle', information).then(\n function(result) {\n transactionHttpSvc.removeTransaction(trans.id).then(function() {\n if (!vm.transactions || !vm.transactions.rows) return;\n var idx = vm.transactions.rows.indexOf(trans);\n if (idx >= 0) vm.transactions.rows.splice(idx, 1);\n }, showError);\n return true;\n },\n function() {\n return false;\n },\n );\n };\n\n vm.unarchiveTransaction = function(trans) {\n transactionHttpSvc.unarchiveTransaction(trans).then(function() {\n if (!vm.transactions || !vm.transactions.rows) return;\n var idx = vm.transactions.rows.indexOf(trans);\n if (idx >= 0) vm.transactions.rows.splice(idx, 1);\n flySvc.info('msgTransactionMovedToOpenTransactions');\n }, showError);\n };\n\n vm.dropInvoice = function(e, ui, transaction, invoice) {\n if (vm.filters.closed || !invoice || !transaction) return;\n invoiceDialogsSvc.newTransactionPayment(transaction, invoice).then(function() {\n vm.reloadUnpaidInvoices();\n });\n };\n\n vm.canAutoLink = function() {\n if (vm.filters.closed || !vm.transactions || !vm.transactions.rows) return false;\n for (var i = 0; i < vm.transactions.rows.length; i++)\n if (vm.transactions.rows[i].openAmount() !== 0 && vm.transactions.rows[i].linkStatus == null)\n return true;\n return false;\n };\n\n vm.linkAll = function() {\n if (vm.filters.closed || !vm.transactions || !vm.transactions.rows) return;\n vm.linking = true;\n return transactionHttpSvc\n .matchAllTransactions({ ...vm.transactions.currentParams(), ...vm.filters })\n .then(function(result) {\n vm.autoLinkAttempted = true;\n vm.linking = false;\n if (result && result.length) {\n var rows = result.map(res => {\n var trans = new Transaction(res.transaction);\n trans.matches = res.matches || [];\n trans.candidates = res.candidates || [];\n if (res.matches && res.matches.length) {\n trans.linkStatus = 2;\n trans.linkMsg = appMessages('linkTransSuccess', {\n invNr: res.matches[0].number,\n });\n } else if (res.candidates && res.candidates.length) {\n trans.linkStatus = 1;\n trans.linkMsg = appMessages('linkTransMultiple', {\n nr: res.candidates.length,\n });\n } else {\n trans.linkStatus = 0;\n trans.linkMsg = appMessages('linkTransFailed');\n }\n return trans;\n });\n\n vm.transactions.setRows(rows, true);\n if (rows.some(x => x.linkStatus === 2)) vm.reloadUnpaidInvoices();\n }\n });\n };\n\n vm.toggleClosed = function(param) {\n if (param === 1) {\n vm.updateFilter({ closed: true });\n } else {\n vm.updateFilter({ closed: false });\n }\n };\n\n vm.companyFilterChanged = function() {\n vm.updateFilter();\n vm.reloadUnpaidInvoices();\n };\n\n vm.updateFilter = function(value, noReload) {\n if (value) {\n vm.filters = { ...vm.filters, ...value };\n localStorageService.set(filterStorageKey, vm.filters);\n }\n if (!noReload && !angular.equals(vm.currentFilters, vm.filters)) {\n refresh();\n }\n };\n\n vm.uploadCODA = function() {\n const companyId =\n vm.filters.ownCompanies && vm.filters.ownCompanies.length === 1\n ? vm.filters.ownCompanies[0]\n : null;\n invoiceDialogsSvc.uploadCODA(companyId);\n };\n\n vm.reloadUnpaidInvoices = function() {\n const filters =\n vm.filters.ownCompanies && vm.filters.ownCompanies.length\n ? { ownCompanies: vm.filters.ownCompanies }\n : {};\n\n return invoicingSvc.reloadUnpaidInvoices(10, filters);\n };\n}\n","import angular from 'angular';\nimport { DraftInvoice } from '../model/draftInvoice';\n\nangular\n .module('cloudX')\n .controller('InvoiceFromScratchCtrl', [\n '$state',\n '$filter',\n 'resourceFactorySvc',\n 'flySvc',\n 'relBindSvc',\n 'dialogsSvc',\n 'ModalService',\n 'dataCache',\n invoiceFromScratchCtrl,\n ]);\n\nfunction invoiceFromScratchCtrl(\n $state,\n $filter,\n resourceFactorySvc,\n flySvc,\n relBindSvc,\n dialogsSvc,\n ModalService,\n dataCache,\n) {\n var vm = this;\n var draftInvoiceResource = resourceFactorySvc.get('draftInvoice');\n vm.companies = dataCache.getArray('company');\n vm.isInvoice = $state.current.data.isInvoice;\n\n vm.invoiceDateOpen = false;\n vm.invoice = {\n date: new Date(),\n customer: null,\n isInvoice: vm.isInvoice,\n };\n\n vm.create = function() {\n if (!vm.invoice.customer || !vm.invoice.customer.id) return;\n vm.saving = true;\n draftInvoiceResource.save(\n { id: 'Post' },\n vm.invoice,\n function(result) {\n vm.saving = false;\n vm.invoice = new DraftInvoice(result);\n vm.invoice.invoiceLines = [];\n },\n function(error) {\n vm.saving = false;\n flySvc.error(error.data.code, error.data.parameters);\n },\n );\n };\n vm.cancel = function() {\n if (!vm.invoice || !vm.invoice.id) return;\n draftInvoiceResource.remove(\n {\n id: vm.invoice.id,\n },\n function() {\n $state.go('invoicing.draft');\n },\n function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n },\n );\n };\n vm.next = function() {\n if (!vm.invoice || !vm.invoice.id) return;\n $state.go('invoicing.draft', {\n relation: vm.invoice.customer,\n });\n };\n vm.finalize = function(sendMail) {\n if (!vm.invoice || !vm.invoice.id) return;\n\n const doFinalizeInvoice = () => {\n vm.saving = true;\n resourceFactorySvc.get('invoice').number(\n {\n sendMail: sendMail,\n },\n [vm.invoice.id],\n function(result) {\n vm.saving = false;\n if (result && result.hasOwnProperty(vm.invoice.id)) {\n $state.go('invoicing.draft', {\n relation: vm.invoice.customer,\n });\n } else {\n flySvc.success('msgInvoiceProcessed', {\n name: $filter('relationName')(vm.invoice.customer),\n });\n $state.go('invoicing.overview');\n }\n },\n function(error) {\n vm.saving = false;\n flySvc.error(error.data.code, error.data.parameters);\n },\n );\n };\n\n return doFinalizeInvoice();\n };\n\n vm.newCustomer = function() {\n dialogsSvc\n .showRelationWizard('newCustomer', {\n crmType: 3,\n crmTypeDisabled: true,\n showKBO: false,\n })\n .then(function(result) {\n if (result && result.relation && result.relation.id) {\n vm.invoice.customer = result.relation;\n vm.customerChanged();\n }\n });\n };\n\n vm.getErrorMsg = flySvc.getErrorMsg;\n\n vm.fixErrors = function(invoice) {\n if (invoice.companyErrors.length) {\n $state.go('settings.company');\n } else if (invoice.relationErrors.length) {\n $state.go('relations.detail', {\n relId: invoice.customer.id,\n });\n }\n };\n vm.customerChanged = function() {\n const { customer } = vm.invoice;\n //console.log(customer);\n if (!customer || !customer.id) {\n vm.invoice.invoiceStreamId = null;\n vm.invoiceStreams = [];\n } else {\n vm.invoice.companyId = customer.companyId;\n vm.invoice.invoiceStreamId = customer.invoiceStreamId;\n vm.invoiceStreams = customer.invoiceStreams || [];\n const invoiceStream = vm.invoiceStreams.find(x => x.id == customer.invoiceStreamId);\n if (invoiceStream?.companyId) {\n vm.invoice.companyId = invoiceStream.companyId;\n }\n }\n };\n vm.assignmentChanged = function() {\n if (!vm.invoice.customer) {\n vm.invoice.companyId = null;\n return;\n }\n const invoiceStream = (vm.invoiceStreams || []).find(x => x.id == vm.invoice.invoiceStreamId);\n if (invoiceStream?.companyId) {\n vm.invoice.companyId = invoiceStream.companyId;\n } else {\n vm.invoice.companyId = vm.invoice.customer?.companyId;\n }\n };\n\n vm.updateInvoice = function(value, property) {\n if (value === undefined || vm.invoice[property] === value) return false;\n\n vm.invoice[property] = value;\n var model = angular.copy(vm.invoice);\n\n return draftInvoiceResource.update(model).$promise.then(\n function(data) {\n delete data.invoiceLines;\n angular.extend(vm.invoice, data);\n return false;\n },\n function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n return '';\n },\n );\n };\n}\n","import angular from 'angular';\n\nangular.module('cxNotifications').directive('notificationBar', [\n function() {\n return {\n restrict: 'E',\n replace: true,\n template: require('./notificationBar.html'),\n controllerAs: 'vm',\n\n link: function(scope, element, attrs) {\n scope.limit = Number(attrs['limit']) || -1; //Default no limit\n },\n controller: [\n '$scope',\n 'notificationSvc',\n 'flySvc',\n '$http',\n '$state',\n 'moment',\n function($scope, notificationSvc, flySvc, $http, $state, moment) {\n const vm = this;\n vm.notificationSvc = notificationSvc;\n vm.now = moment.utc();\n\n $scope.$watch('vm.notificationSvc.barVisible', visible => {\n if (visible) {\n vm.now = moment.utc();\n }\n });\n\n const base = 'assets/templates/notifications/types/';\n vm.getNotificationTemplateUrl = function(item) {\n switch (item.type) {\n case 0:\n return base + 'other.tpl.html';\n case 104:\n case 200:\n case 201:\n case 202:\n case 203:\n case 205:\n case 206:\n case 207:\n case 210:\n case 211:\n case 212:\n case 213:\n case 214:\n case 215:\n case 218:\n case 219:\n return base + 'relationList.tpl.html';\n case 208:\n case 209:\n return base + 'companyOwnerExpiration.tpl.html';\n case 100:\n case 103:\n case 204:\n case 400:\n case 1100:\n case 1101:\n case 1102:\n return base + 'action.tpl.html';\n case 1200:\n return base + 'employeeList.tpl.html';\n case 501:\n case 502:\n return base + 'todo.tpl.html';\n case 500:\n case 600:\n return base + 'custom.tpl.html';\n case 700:\n return base + 'jobList.tpl.html';\n case 751:\n return base + 'error.tpl.html';\n case 800:\n case 801:\n return base + 'document.tpl.html';\n case 900:\n return base + 'connectAuthentication.tpl.html';\n case 901:\n return base + 'connectExternalProviderMessage.tpl.html';\n case 1000:\n case 1001:\n case 1002:\n case 1003:\n case 1004:\n return base + 'shareItem.tpl.html';\n default:\n return item.type >= 200 && item.type <= 300\n ? `${base}relationList.tpl.html`\n : `${base}default.tpl.html`;\n }\n };\n },\n ],\n };\n },\n]);\n","import angular from 'angular';\nimport SignalRService from '@/shared/services/SignalRService';\nimport moment from 'moment';\n\nangular.module('cxNotifications').directive('notificationBanner', [\n function() {\n return {\n restrict: 'E',\n replace: true,\n template: require('./notificationBanner.html'),\n scope: true,\n controller: [\n '$scope',\n '$timeout',\n 'localStorageService',\n '$translate',\n '$rootScope',\n function($scope, $timeout, localStorageService, $translate, $rootScope) {\n var storageKey = 'clx-bannerMessage';\n\n $scope.showUpdateMessage = false;\n $scope.customMessage = null;\n\n var shouldMessageBeDisplayed = function(bannerMessage) {\n if (!bannerMessage.visibleUntil) return false;\n\n const visibleUntil = moment.utc(bannerMessage.visibleUntil);\n return moment.utc().isBefore(visibleUntil);\n };\n\n var displayCustomMessage = message => {\n var language = $translate.use().split('-')[0];\n\n switch (language.toLowerCase()) {\n case 'en':\n $timeout(function() {\n $scope.customMessage = message.textEn;\n }, 100);\n break;\n case 'fr':\n $timeout(function() {\n $scope.customMessage = message.textFr;\n }, 100);\n break;\n case 'nl':\n $timeout(function() {\n $scope.customMessage = message.textNl;\n }, 100);\n break;\n }\n };\n\n var showMessage = bannerMessage => {\n if (bannerMessage.type.toLowerCase() === 'update') {\n $timeout(function() {\n $scope.showUpdateMessage = true;\n $scope.updateHour = bannerMessage.hour;\n }, 100);\n } else if (bannerMessage.type.toLowerCase() === 'custom') {\n displayCustomMessage(bannerMessage);\n }\n };\n\n var checkIfBannerMessagePresentInLocalStorage = function() {\n const bannerMessage = localStorageService.get(storageKey) || {};\n if (!bannerMessage || !bannerMessage.type) return;\n if (!shouldMessageBeDisplayed(bannerMessage)) return;\n showMessage(bannerMessage);\n };\n checkIfBannerMessagePresentInLocalStorage();\n\n const showVcdmUpdateMessage = () => {\n const startTimeUtc = moment.utc('06-08-2023 18:00', 'DD-MM-YYYY hh:mm');\n const endTimeUtc = moment.utc('12-08-2023 15:00', 'DD-MM-YYYY hh:mm');\n const now = moment.utc();\n if (now.isAfter(startTimeUtc) && now.isBefore(endTimeUtc)) {\n var language = $translate.use().split('-')[0];\n\n switch (language.toLowerCase()) {\n case 'en':\n $timeout(function() {\n $scope.showVcdmEnglish = true;\n }, 100);\n break;\n case 'fr':\n $timeout(function() {\n $scope.showVcdmFrench = true;\n }, 100);\n break;\n case 'nl':\n $timeout(function() {\n $scope.showVcdmDutch = true;\n }, 100);\n break;\n }\n }\n };\n\n if ($translate.isReady()) {\n showVcdmUpdateMessage();\n } else {\n // Still loading translations, wait for it to finish and then init translations\n $translate.onReady(() => {\n showVcdmUpdateMessage();\n });\n }\n\n var handleSignalRMessage = function(bannerMessage) {\n if (!bannerMessage.type) {\n console.warn('bannerMessage type was empty');\n return;\n }\n\n if (bannerMessage.type === 'vcdm') {\n showVcdmUpdateMessage();\n return;\n }\n\n localStorageService.set(storageKey, bannerMessage);\n\n showMessage(bannerMessage);\n };\n\n SignalRService.subscribe('bannerMessage', handleSignalRMessage);\n\n var deregistration = $rootScope.$on('$translateChangeSuccess', function() {\n checkIfBannerMessagePresentInLocalStorage();\n });\n $scope.$on('$destroy', deregistration);\n },\n ],\n };\n },\n]);\n","import angular from 'angular';\n\nangular\n .module('cloudX')\n .controller('ProfileCtrl', [\n 'resourceFactorySvc',\n 'dataCache',\n 'flySvc',\n 'ModalService',\n 'dialogsSvc',\n 'appUrls',\n '$window',\n 'checkSecurity',\n 'checkTenantConfiguration',\n '$http',\n profileCtrl,\n ]);\n\nfunction profileCtrl(\n resourceFactorySvc,\n dataCache,\n flySvc,\n ModalService,\n dialogsSvc,\n appUrls,\n $window,\n checkSecurity,\n checkTenantConfiguration,\n $http,\n) {\n var vm = this;\n vm.usesSSO = checkTenantConfiguration('sso');\n vm.employee = dataCache.getArray('employee');\n vm.connectWebUrl = `${appUrls.connect}`;\n vm.isRealUser = !checkSecurity('Support');\n dataCache.ready().then(function() {\n const companyId = dataCache.getArray('defaultcompany').id;\n vm.connectWebUrl = `${appUrls.connect}?companyId=${companyId}`;\n });\n\n vm.openConnect = function() {\n $window.open(vm.connectWebUrl, '_blank');\n };\n\n var resource = resourceFactorySvc.get('employee');\n\n if (vm.isRealUser) {\n $http.get(`${appUrls.api}/api/employee/profile`).then(function({ data }) {\n vm.profile = data;\n });\n } else {\n vm.profile = vm.employee;\n }\n\n vm.submit = function(value, field) {\n if (!vm.isRealUser) return false;\n if (vm.profile[field] === value) return false;\n\n var model = angular.copy(vm.profile);\n model[field] = value;\n return resource.updateMyProfile(model).$promise.then(\n function(result) {\n if (result) {\n vm.profile = result;\n dataCache.update('employee', result);\n }\n flySvc.success('msgConfirmChange');\n return false;\n },\n function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n return '';\n },\n );\n };\n\n vm.changePassword = function() {\n if (!vm.isRealUser) return;\n ModalService.showModal({\n template: require('./dialogs/changePasswordDialog.html'),\n controller: 'ChangePasswordDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n });\n };\n\n vm.changeUsername = function() {\n if (!vm.isRealUser) return;\n ModalService.showModal({\n template: require('./dialogs/changeUsernameDialog.html'),\n controller: 'ChangeUsernameDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n });\n };\n\n vm.refreshEmployee = function() {\n resource.getProfile({}, function(profile) {\n vm.profile = profile;\n vm.employee = profile;\n });\n };\n\n vm.enable2Fa = function() {\n if (!vm.isRealUser) return;\n ModalService.showModal({\n template: require('./dialogs/enable2FADialog.html'),\n controller: 'Enable2FADialog',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n vm.refreshEmployee();\n });\n });\n };\n\n vm.disable2Fa = function() {\n if (!vm.isRealUser) return;\n ModalService.showModal({\n template: require('./dialogs/disable2FADialog.html'),\n controller: 'Disable2FADialog',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n vm.refreshEmployee();\n });\n });\n };\n vm.translateEmailRemark = function() {\n if (!vm.profile?.userId) return;\n dialogsSvc\n .translateListItem('useremailremark', vm.profile.userId, '', {\n inputRows: 7,\n defaultRequired: false,\n maxlength: 500,\n })\n .then(function(result) {\n if (result) {\n //This is a special case for the translations.\n //If we use the default as fallback, you can't leave another language empty.\n flySvc.success();\n }\n });\n };\n}\n","import angular from 'angular';\nimport config from '@/config';\n\nangular\n .module('cloudX')\n .controller('ChangePasswordDialogCtrl', [\n '$element',\n 'resourceFactorySvc',\n 'flySvc',\n 'close',\n '$timeout',\n '$window',\n changePasswordDialogCtrl,\n ]);\n\nfunction changePasswordDialogCtrl($element, resourceFactorySvc, flySvc, close, $timeout, $window) {\n var vm = this;\n\n vm.data = {\n oldPassword: '',\n newPassword: '',\n newPassword2: '',\n captcha: '',\n captchaAction: 'change_password',\n };\n\n vm.showCaptcha = function() {\n $window.grecaptcha.enterprise.render('g-recaptcha', {\n sitekey: config.recaptchaKey,\n action: vm.data.captchaAction,\n callback: function(token) {\n $timeout(() => {\n vm.data.captcha = token;\n });\n },\n });\n };\n\n $timeout(vm.showCaptcha);\n\n vm.save = function() {\n vm.saving = true;\n resourceFactorySvc.get('user').changePassword(\n null,\n vm.data,\n function() {\n vm.saving = false;\n flySvc.success('msgPasswordChanged');\n close(true, 500);\n $element.modal('hide');\n },\n function(error) {\n vm.saving = false;\n flySvc.error(error);\n },\n );\n };\n vm.cancel = function() {\n close(null, 500);\n };\n}\n","import angular from 'angular';\nimport config from '@/config';\n\nangular\n .module('cloudX')\n .controller('ChangeUsernameDialogCtrl', [\n '$element',\n 'resourceFactorySvc',\n 'flySvc',\n 'close',\n '$window',\n '$timeout',\n changeUsernameDialogCtrl,\n ]);\n\nfunction changeUsernameDialogCtrl($element, resourceFactorySvc, flySvc, close, $window, $timeout) {\n var vm = this;\n\n vm.data = {\n password: '',\n email: '',\n captcha: '',\n captchaAction: 'change_username',\n };\n\n vm.showCaptcha = function() {\n $window.grecaptcha.enterprise.render('g-recaptcha', {\n sitekey: config.recaptchaKey,\n action: vm.data.captchaAction,\n callback: function(token) {\n $timeout(() => {\n vm.data.captcha = token;\n });\n },\n });\n };\n\n $timeout(vm.showCaptcha);\n\n vm.save = function() {\n vm.saving = true;\n resourceFactorySvc.get('user').changeUsername(\n null,\n vm.data,\n function() {\n vm.saving = false;\n flySvc.success('msgEmailChangeUsernameSent');\n close(true, 500);\n $element.modal('hide');\n },\n function(error) {\n vm.saving = false;\n flySvc.error(error.data.code, error.data.parameters);\n },\n );\n };\n vm.cancel = function() {\n close(null, 500);\n };\n}\n","import angular from 'angular';\nimport QrCreator from 'qr-creator';\nimport handleHttpError from '@/shared/services/HandleHttpError';\n\nangular\n .module('cloudX')\n .controller('Enable2FADialog', [\n '$element',\n 'resourceFactorySvc',\n 'dataCache',\n 'flySvc',\n 'close',\n 'appSettings',\n Enable2FADialog,\n ]);\n\nfunction Enable2FADialog($element, resourceFactorySvc, dataCache, flySvc, close, appSettings) {\n var vm = this;\n vm.employee = dataCache.getArray('employee');\n vm.showPhoneNumber = !vm.employee.employeeMobilePhone;\n\n vm.data = {\n code: '',\n backupPhone: vm.employee.employeeMobilePhone,\n };\n\n vm.getDefaultCountry = () => appSettings.defaultCountry;\n\n resourceFactorySvc.get('user').get2FA(\n null,\n null,\n function(data) {\n const appName = `AdminPulse${data.environment === 'prd' ? '' : `${data.environment}`}`;\n const otpUrl = `otpauth://totp/${appName}:${vm.employee.employeeEmail}?secret=` + data.key;\n QrCreator.render(\n {\n text: otpUrl,\n size: 128,\n },\n document.getElementById('qrcode'),\n );\n },\n function(error) {\n handleHttpError(error);\n throw error;\n },\n );\n\n vm.save = function() {\n vm.saving = true;\n resourceFactorySvc.get('user').enable2FA(\n null,\n vm.data,\n function(e) {\n vm.saving = false;\n flySvc.success('msg2FAEnabled');\n close(true, 500);\n $element.modal('hide');\n },\n function(error) {\n vm.saving = false;\n flySvc.error(error.data.code, error.data.parameters);\n },\n );\n };\n vm.cancel = function() {\n close(null, 500);\n };\n}\n","import angular from 'angular';\nimport QrCreator from 'qr-creator';\n\nangular\n .module('cloudX')\n .controller('Disable2FADialog', [\n '$element',\n 'resourceFactorySvc',\n 'dataCache',\n 'flySvc',\n 'close',\n Disable2FADialog,\n ]);\n\nfunction Disable2FADialog($element, resourceFactorySvc, dataCache, flySvc, close) {\n var vm = this;\n vm.data = {\n password: undefined,\n };\n\n vm.save = function() {\n vm.saving = true;\n resourceFactorySvc.get('user').disable2FA(\n null,\n vm.data,\n function() {\n vm.saving = false;\n flySvc.success('msg2FADisabled');\n close(true, 500);\n $element.modal('hide');\n },\n function(error) {\n vm.saving = false;\n flySvc.error(error.data.code, error.data.parameters);\n },\n );\n };\n vm.cancel = function() {\n close(null, 500);\n };\n}\n","import angular from 'angular';\nimport { RegistrationGroup } from './model/registrationGroup';\nimport { Registration } from './model/registration';\nimport { castJSON } from '../helpers';\nimport moment from 'moment';\n\nangular\n .module('cxRegistrations')\n .controller('RegDayCtrl', [\n '$filter',\n 'resourceFactorySvc',\n 'registrationService',\n 'flySvc',\n 'dialogsSvc',\n '$window',\n 'dataCache',\n '$q',\n 'regDialogsSvc',\n '$http',\n 'appUrls',\n 'localStorageService',\n 'checkSecurity',\n dayCtrl,\n ]);\n\nfunction dayCtrl(\n $filter,\n resourceFactorySvc,\n registrationService,\n flySvc,\n dialogsSvc,\n $window,\n dataCache,\n $q,\n regDialogsSvc,\n $http,\n appUrls,\n localStorageService,\n checkSecurity,\n) {\n var registrationResource = resourceFactorySvc.get('registration');\n var vm = this;\n vm.registrationService = registrationService;\n vm.date = moment()\n .local()\n .toDate();\n vm.filterBillable = false;\n vm.isBusy = false;\n vm.registration = null;\n vm.registrations = [];\n vm.startTime = null;\n var sortStorageKey = 'cx-registration-day-sort-desc';\n var displayDetailsStorageKey = 'cx-registration-day-show-details';\n\n vm.sortDesc = localStorageService.get(sortStorageKey) || false;\n vm.expectedWorkingMinutes = null;\n vm.homeWorkingMinutes = null;\n vm.currentUser = dataCache.getArray('employee');\n vm.taskStatusCache = {};\n vm.displayDetails = localStorageService.get(displayDetailsStorageKey) || false;\n\n vm.getTotalHours = function() {\n if (!vm.registrations) return 0;\n return vm.registrations.reduce(function(sum, reg) {\n if (reg && reg.work) return sum + reg.work.durationMinutes;\n return sum;\n }, 0.0);\n };\n vm.getMissingHours = function() {\n if (vm.expectedWorkingMinutes === null) return null;\n return Math.max(0, vm.expectedWorkingMinutes - vm.getTotalHours());\n };\n vm.changeSorting = function() {\n vm.sortDesc = !vm.sortDesc;\n localStorageService.set(sortStorageKey, vm.sortDesc);\n };\n\n //Creates an empty registration\n var createEmptyRegistration = function(startTime) {\n var defered = $q.defer();\n var registration = new RegistrationGroup();\n var durationMinutes = 0; //Set to \"0\" instead of \"15\" due to TFS 4717.4730.\n registration.date = vm.date;\n var vat = dataCache.getDefaultCompany().resourceVATRate || 0.21;\n registration.work.setVatRate(vat, 0);\n registration.cost.setVatRate(vat, 0);\n registration.travel.setVatRate(vat, 0);\n\n if (startTime && typeof startTime.Hour === 'number' && typeof startTime.Minute === 'number') {\n registration.work.initTime(startTime.Hour, startTime.Minute, durationMinutes);\n defered.resolve(registration);\n } else {\n registrationService.getNextRegistrationTime(vm.date).then(function(data) {\n registration.work.initTime(data.Hour, data.Minute, durationMinutes);\n defered.resolve(registration);\n });\n }\n\n return defered.promise;\n };\n\n vm.editRegistration = function(registration) {\n if (\n registration &&\n (registration.date.getFullYear() != vm.date.getFullYear() ||\n registration.date.getMonth() != vm.date.getMonth() ||\n registration.date.getDay() != vm.date.getDay())\n )\n return; //In case the user already changed date.\n if (registration && (registration.work.type === 3 || registration.work.type === 4))\n return vm.editAbsence(registration.work);\n\n $window.scrollTo(0, 0);\n vm.registration = registration;\n if (vm.registration && vm.registration.group && checkSecurity('InteractionsOwn:r')) {\n $http.get(appUrls.interactions + '/api/interactions/object/1/' + vm.registration.group).then(\n function({ data }) {\n if (data && data.length) {\n const interaction = data[0];\n vm.registration.interactionType = interaction.interactionType;\n vm.registration.interactionDescription = interaction.description;\n vm.registration.interactionId = interaction.id;\n vm.registration.interactionTitle = interaction.title;\n\n vm.registration.originalInteractionDescription = interaction.description;\n vm.registration.originalInteractionType = interaction.interactionType;\n vm.registration.originalInteractionTitle = interaction.title;\n vm.registration.originalInteraction = interaction;\n }\n },\n function(error) {\n console.error(error);\n },\n );\n }\n\n if (!vm.registration) {\n createEmptyRegistration().then(function(data) {\n vm.registration = data;\n });\n }\n };\n\n vm.removeRegistration = function(registration) {\n var index = vm.registrations.indexOf(registration);\n if (index >= 0) vm.registrations.splice(index, 1);\n };\n\n //Retrieve data\n vm.retrieveRequest = null;\n vm.retrieveRegistrations = function(date) {\n vm.registrations = [];\n vm.startTime = null;\n //Cancel previous request, cancelling a completed request will have no effect\n if (vm.retrieveRequest && vm.retrieveRequest.$cancelRequest)\n vm.retrieveRequest.$cancelRequest();\n vm.retrieveRequest = registrationService.retrieveRegistrations(null, date);\n return vm.retrieveRequest.then(function({ data }) {\n let {\n registrations,\n maxTime = null,\n expectedWorkingMinutes = null,\n homeWorkingMinutes = null,\n } = data;\n registrations = registrations.map(x => {\n var reg = castJSON(x, Registration);\n if (reg) {\n reg.translate($filter);\n }\n return reg;\n });\n\n var groups = registrations.reduce(function(o, v, i) {\n //Group registrations by group.\n if (!o[v.group]) o[v.group] = [];\n o[v.group].push(v);\n return o;\n }, {});\n\n for (var group in groups) {\n if (groups.hasOwnProperty(group)) {\n vm.registrations.push(registrationService.createGroup(groups[group], date));\n }\n }\n vm.expectedWorkingMinutes = expectedWorkingMinutes;\n vm.homeWorkingMinutes = homeWorkingMinutes;\n\n if (maxTime) {\n const momentDate = moment(maxTime, 'HH:mm:ss');\n var h = momentDate.hour();\n var m = momentDate.minutes();\n vm.startTime = {\n Hour: h,\n Minute: m,\n };\n } else {\n vm.startTime = {\n Hour: 9,\n Minute: 0,\n };\n }\n vm.retrieveTaskStatus();\n return vm.registrations;\n });\n };\n vm.retrieveRegistrations().then(function() {\n vm.init();\n });\n\n vm.init = function() {\n vm.newRegistration(vm.startTime);\n };\n\n vm.dateChanged = function(date) {\n vm.registrations = [];\n vm.startTime = null;\n vm.date = date;\n vm.retrieveRegistrations(vm.date).then(function() {\n if (vm.registration) {\n if (vm.registration.group) {\n vm.newRegistration(vm.startTime);\n } else {\n vm.registration.date = vm.date;\n if (vm.startTime) {\n vm.registration.work.initTime(\n vm.startTime.Hour,\n vm.startTime.Minute,\n vm.registration.work.durationMinutes,\n );\n } else {\n registrationService.getNextRegistrationTime(vm.date).then(function(data) {\n vm.registration.work.initTime(\n data.Hour,\n data.Minute,\n vm.registration.work.durationMinutes,\n );\n });\n }\n }\n }\n });\n };\n\n /* Refresh all data */\n vm.refresh = function() {\n //Clear, so we can determine when all the data has arrived.\n vm.registrations = [];\n vm.retrieveRegistrations(vm.date);\n vm.newRegistration();\n };\n\n //Create new registration\n vm.newRegistration = function(startTime) {\n var registration = createEmptyRegistration(startTime).then(function(data) {\n vm.editRegistration(data);\n });\n };\n\n vm.saveReg = function(registration) {\n if (!registration) return $q.reject();\n\n if (registration.group) {\n vm.isBusy = true;\n\n return registrationResource\n .update([registration.work, registration.travel, registration.cost])\n .$promise.then(\n data => {\n var group = registrationService.createGroup(data, vm.date);\n group.setInteractionInfo(registration); //Copy interaction info\n group.translate($filter);\n\n flySvc.success('Registration modified');\n vm.retrieveTaskStatus(false, group.getPlannedTaskId());\n\n return group;\n },\n function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n return error;\n },\n )\n .finally(function() {\n vm.isBusy = false;\n });\n } else {\n return vm.createReg(registration, false);\n }\n };\n\n vm.createReg = function(registration, editOnFail) {\n registration.date = vm.date;\n vm.isBusy = true;\n\n return registrationResource\n .save([registration.work, registration.travel, registration.cost])\n .$promise.then(\n function(data) {\n if (data.length) {\n var newReg = registrationService.createGroup(data, vm.date);\n newReg.translate($filter);\n flySvc.proposal(\n 'Registration created',\n 'msgRegistrationCreated',\n function() {\n vm.editRegistration(newReg);\n },\n 'Edit registration',\n null,\n {\n relation: $filter('relationName')(newReg.relation),\n resource: newReg.resourceText,\n },\n );\n\n if (\n newReg.hasWork &&\n newReg.hasWork &&\n newReg.work.toMinutes != newReg.work.toMinutes\n ) {\n flySvc.message('The end time was truncated');\n }\n return newReg;\n }\n return null;\n },\n function(error) {\n if (editOnFail) {\n vm.editRegistration(registration);\n }\n\n flySvc.error(error.data.code, error.data.parameters);\n },\n )\n .finally(function() {\n vm.isBusy = false;\n });\n };\n vm.afterSave = function(reg) {\n if (reg) {\n const sameDate = moment(vm.date).isSame(moment(reg.date), 'day');\n const idx = vm.registrations.findIndex(x => x.group === reg.group);\n if (idx >= 0) {\n if (sameDate) {\n //Replace\n vm.registrations[idx] = reg;\n vm.retrieveTaskStatus(false, reg.getPlannedTaskId());\n } else {\n //Moved to other day, remove registration\n vm.registrations.splice(idx, 1);\n }\n } else if (sameDate) {\n //Add\n vm.registrations.push(reg);\n vm.retrieveTaskStatus(false, reg.getPlannedTaskId());\n }\n }\n vm.editRegistration(null);\n $window.scrollTo(0, 0);\n vm.isBusy = false;\n };\n vm.deleteRegistration = function(registration) {\n return dialogsSvc.showYesNo('msgConfirmDeleteTitle', 'msgConfirmDeleteRegistration').then(\n function(result) {\n if (vm.registration === registration) vm.editRegistration(null);\n\n if (registration.group) {\n // console.log('Delete registration group %s.', registration.group);\n vm.isBusy = true;\n\n registrationResource.delete(\n {\n id: registration.group,\n deleteGroup: true,\n },\n function(response) {\n vm.isBusy = false;\n vm.removeRegistration(registration);\n flySvc.success('Registration removed');\n },\n function(error) {\n vm.isBusy = false;\n flySvc.error(error.data.code, error.data.parameters);\n },\n );\n } else {\n vm.removeRegistration(registration);\n }\n return true;\n },\n function() {\n return false;\n },\n );\n };\n\n vm.createAbsence = function(type = 3) {\n registrationService.getNextRegistrationTime(vm.date).then(function(data) {\n var absence = new Registration({ type });\n absence.date = vm.date;\n absence.initTime(data.Hour, data.Minute, 0);\n\n regDialogsSvc.newAbsence(absence, {}).then(function(result) {\n if (result) {\n if (moment(vm.date).isSame(moment(result.date), 'day')) {\n var reg = registrationService.createGroup([result], result.date);\n reg.translate($filter);\n vm.registrations.push(reg);\n $window.scrollTo(0, 0);\n }\n }\n });\n });\n };\n vm.editAbsence = function(absence) {\n var copy = angular.copy(absence);\n\n regDialogsSvc.editAbsence(copy, {}).then(function(result) {\n if (result) {\n if (moment(vm.date).isSame(moment(result.date), 'day')) {\n absence.set(result);\n absence.translate($filter);\n } else {\n var idx = vm.registrations.findIndex(x => x.group === absence.group);\n if (idx >= 0) vm.registrations.splice(idx, 1);\n }\n }\n });\n };\n\n vm.updateHomeWorkingMinutes = function(value) {\n if (value === vm.homeWorkingMinutes) return false;\n return $http\n .post(appUrls.api + '/api/Employee/HomeWorking', {\n userId: vm.currentUser.userID,\n date: vm.date,\n homeWorkingMinutes: value,\n })\n .then(\n function({ data }) {\n vm.homeWorkingMinutes = data;\n return false;\n },\n function(error) {\n console.error(error);\n },\n );\n };\n vm.fillHomeWorkingMinutes = function() {\n return vm.updateHomeWorkingMinutes(vm.expectedWorkingMinutes);\n };\n\n vm.setTaskStatus = status => {\n if (!status) return;\n if (angular.isArray(status)) {\n status.forEach(vm.setTaskStatus);\n return;\n }\n if (!status.id) return;\n vm.taskStatusCache[status.id] = status;\n };\n\n vm.retrieveTaskStatus = (reload = false, taskId = null) => {\n let taskIds = vm.registrations.map(x => x.getPlannedTaskId()).filter(x => !!x);\n if (!taskIds || taskIds.length === 0) return;\n if (!reload) {\n taskIds = taskIds.filter(x => !vm.taskStatusCache[x]);\n }\n if (taskId) taskIds.push(taskId);\n if (!taskIds || taskIds.length === 0) return;\n\n return $http.post(appUrls.tasks + '/api/PlannedTasks/GetStatus', taskIds).then(\n function({ data }) {\n if (!data || !data.length) return;\n vm.setTaskStatus(data);\n },\n function(error) {\n console.error(error);\n },\n );\n };\n\n vm.toggleDetails = function() {\n vm.displayDetails = !vm.displayDetails;\n localStorageService.set(displayDetailsStorageKey, vm.displayDetails);\n };\n}\n","import angular from 'angular';\nimport moment from 'moment';\n\nimport { RegistrationGroup } from './model/registrationGroup';\nimport { Registration } from './model/registration';\nimport { castJSON } from '../helpers';\nimport { emptyGuid, guid1, isGuid } from '@/shared/utils/guid';\nimport AuthService from '@/shared/services/AuthService';\n\nimport SignalRService from '@/shared/services/SignalRService';\nimport userStorage from '@/shared/services/userStorage';\n\nconst columnSelectionStorageKey = 'RegistrationOverviewHiddenColumns';\nconst knownStateParams = [\n 'relation',\n 'period',\n 'finalInvoiceStreamId',\n 'userId',\n 'dateFrom',\n 'dateUntil',\n 'invoiceDateFrom',\n 'invoiceDateUntil',\n 'resourceId',\n 'invoiceId',\n 'intraCompanyInvoiceId',\n 'filters',\n];\n\nangular\n .module('cxRegistrations')\n .controller('RegOverviewCtrl', [\n '$q',\n 'resourceFactorySvc',\n 'flySvc',\n 'registrationService',\n 'dataCache',\n '$filter',\n '$stateParams',\n '$locale',\n 'regDialogsSvc',\n 'checkSecurity',\n 'dialogsSvc',\n '$state',\n 'resourceNameFilter',\n 'invoiceDialogsSvc',\n '$http',\n 'appUrls',\n '$timeout',\n '$scope',\n '$translate',\n regOverviewCtrl,\n ]);\n\nfunction regOverviewCtrl(\n $q,\n resourceFactorySvc,\n flySvc,\n registrationService,\n dataCache,\n $filter,\n $stateParams,\n $locale,\n regDialogsSvc,\n checkSecurity,\n dialogsSvc,\n $state,\n resourceNameFilter,\n invoiceDialogsSvc,\n $http,\n appUrls,\n $timeout,\n $scope,\n $translate,\n) {\n var registrationResource = resourceFactorySvc.get('registration');\n var vm = this;\n vm.registrationService = registrationService;\n vm.relation = null;\n vm.resources = [];\n vm.locale = $locale;\n vm.currentUser = dataCache.getArray('employee');\n vm.period = null;\n vm.year = moment.utc().year();\n vm.filtersInitialised = false;\n vm.hasFilter = false;\n vm.addingToDraft = false;\n var invoiceRegistrationResource = resourceFactorySvc.get('invoiceRegistration');\n var canViewOthers = checkSecurity('RegistrationOthers');\n var canEditOthers = checkSecurity('RegistrationOthers:u');\n vm.showAssignments = dataCache.getArray('assignmentsEnabled');\n\n vm.employees = canViewOthers ? dataCache.getArray('user') : [vm.currentUser];\n vm.userId = canViewOthers ? null : vm.currentUser.userID;\n vm.systemUserId = guid1;\n vm.ownCompanies = [];\n vm.taskTemplates = [];\n vm.finalInvoiceStreamId = null;\n vm.retrieveRequest = null;\n vm.kpiRequest = null;\n vm.crmTypes = [];\n vm.withLabels = [];\n vm.withoutLabels = [];\n vm.withEmployeeLabels = [];\n vm.withoutEmployeeLabels = [];\n vm.relationGroups = [];\n vm.showAdvanceFilters = false;\n vm.selectAll = false;\n vm.globalActionRunning = false;\n vm.invoiceDateFrom = null;\n vm.invoiceDateUntil = null;\n vm.assignmentTemplateId = null;\n vm.endFiscalYears = [];\n vm.referenceYear = null;\n vm.invoiceId = null;\n vm.intraCompanyInvoiceId = null;\n if (checkSecurity('RegistrationOthers:r'))\n vm.retrieveEmployeeTags = $http.get(appUrls.api + '/api/employee/tags');\n\n vm.getFilters = function() {\n var userId = vm.userId || '00000000-0000-0000-0000-000000000000';\n var relationId = vm.relation && !vm.finalInvoiceStreamId ? vm.relation.id : null;\n var resourceId = vm.resource ? vm.resource.id : null;\n var ownCompanies = vm.ownCompanies || [];\n const filters = {\n relationId,\n resourceId,\n ownCompanies,\n taskTemplates: vm.taskTemplates || [],\n finalInvoiceStreamId: vm.finalInvoiceStreamId,\n crmTypes: vm.crmTypes || [],\n withLabels: vm.withLabels,\n withoutLabels: vm.withoutLabels,\n withEmployeeLabels: vm.withEmployeeLabels,\n withoutEmployeeLabels: vm.withoutEmployeeLabels,\n invoiceDateFrom: vm.invoiceDateFrom\n ? moment.utc(vm.invoiceDateFrom).format('YYYY-MM-DD')\n : null,\n invoiceDateUntil: vm.invoiceDateUntil\n ? moment.utc(vm.invoiceDateUntil).format('YYYY-MM-DD')\n : null,\n userId,\n from: vm.from ? moment.utc(vm.from).format('YYYY-MM-DD') : null,\n to: vm.to ? moment.utc(vm.to).format('YYYY-MM-DD') : null,\n assignmentTemplateId: vm.assignmentTemplateId,\n endFiscalYears: vm.endFiscalYears,\n referenceYear: vm.referenceYear,\n invoiceId: vm.invoiceId,\n intraCompanyInvoiceId: vm.intraCompanyInvoiceId,\n relationGroups: vm.relationGroups,\n };\n return filters;\n };\n\n const retrieveResources = () => {\n return resourceFactorySvc\n .get('resource')\n .reg({})\n .$promise.then(function(data) {\n vm.resources = data.map(item => ({\n ...item,\n label: resourceNameFilter(item),\n code: item.code || '',\n }));\n\n return null;\n });\n };\n retrieveResources();\n\n vm.retrieve = function(params) {\n if (!vm.filtersInitialised) return;\n if (params == null) params = {};\n\n if (vm.to >= vm.from || vm.to === null || vm.from === null) {\n var userId = vm.userId || '00000000-0000-0000-0000-000000000000';\n const filters = vm.getFilters();\n\n sessionStorage.setItem(\n 'RegistrationOverviewParams',\n JSON.stringify({\n tableParams: params,\n ...filters,\n relation: vm.relation,\n resource: vm.resource,\n period: vm.period,\n showAdvanceFilters: vm.showAdvanceFilters,\n }),\n );\n\n //Cancel previous request, cancelling a completed request will have no effect\n if (vm.retrieveRequest && vm.retrieveRequest.$cancelRequest)\n vm.retrieveRequest.$cancelRequest();\n\n vm.retrieveRequest = registrationService.retrieveRegistrations(\n { ...params, ...filters },\n moment.utc(vm.from).format('YYYY-MM-DD'),\n moment.utc(vm.to).format('YYYY-MM-DD'),\n userId,\n );\n return vm.retrieveRequest.then(function({ data }) {\n let registrations = data.registrations.map(x => {\n var reg = castJSON(x, Registration);\n reg.user = vm.getUserName(reg.userId);\n reg.translate($filter);\n reg.selected = vm.selectAll;\n return reg;\n });\n\n if (params.page === 0) {\n refreshTotals();\n }\n\n vm.currentParams = params;\n vm.hasFilter = vm.hasFilters();\n\n return registrations;\n }, showError);\n }\n };\n\n const refreshTotals = () => {\n const sessionParams = JSON.parse(sessionStorage.getItem('RegistrationOverviewParams'));\n if (!sessionParams) return;\n\n const tableParams = sessionParams.tableParams;\n if (!tableParams) return;\n //Cancel previous request, cancelling a completed request will have no effect\n if (vm.kpiRequest && vm.kpiRequest.$cancelRequest) vm.kpiRequest.$cancelRequest();\n\n var userId = vm.userId || '00000000-0000-0000-0000-000000000000';\n const filters = vm.getFilters();\n vm.kpiRequest = registrationService.retrieveKpis(\n { ...tableParams, ...filters },\n moment.utc(vm.from).format('YYYY-MM-DD'),\n moment.utc(vm.to).format('YYYY-MM-DD'),\n userId,\n );\n return vm.kpiRequest.$promise.then(function(data) {\n vm.totalMinutesFormatted = data.totalMinutes.minuteToTime();\n vm.totalAmount = data.totalAmount;\n vm.billableAmount = data.billableAmount;\n vm.billablePerHour = data.billablePerHour;\n vm.openRegCount = data.openRegCount;\n vm.totalRowCount = data.totalRowCount;\n vm.originalAmount = data.originalAmount;\n vm.selectableCount = data.selectableCount;\n });\n };\n\n const initStateParams = () => {\n if (!$stateParams) return;\n const params = $stateParams;\n\n let hasStateParams = knownStateParams.some(x => !!params[x]);\n\n if (params.relation && params.relation.id) {\n vm.relation = params.relation;\n hasStateParams = true;\n }\n\n if (params.period) vm.setPeriod(params.period, true);\n if (params.finalInvoiceStreamId) vm.finalInvoiceStreamId = params.finalInvoiceStreamId;\n if (params.userId) vm.userId = params.userId === emptyGuid ? null : params.userId;\n if (params.dateFrom) vm.from = moment.utc(params.dateFrom).toDate();\n if (params.dateUntil) vm.to = moment.utc(params.dateUntil).toDate();\n if (params.invoiceDateFrom) vm.invoiceDateFrom = moment.utc(params.invoiceDateFrom).toDate();\n if (params.invoiceDateUntil) vm.invoiceDateUntil = moment.utc(params.invoiceDateUntil).toDate();\n if (params.resourceId)\n vm.resource = (vm.resources || []).find(x => x.id === params.resourceId) || {\n id: params.resourceId,\n };\n\n if (params.invoiceId) vm.invoiceId = params.invoiceId;\n if (params.intraCompanyInvoiceId) vm.intraCompanyInvoiceId = params.intraCompanyInvoiceId;\n if (params.filters) return { filter: params.filters };\n\n if (hasStateParams) return {};\n };\n const setParamsFromSessionStorage = () => {\n try {\n var tableParams = null;\n var stateParams = initStateParams();\n const sessionParams = JSON.parse(sessionStorage.getItem('RegistrationOverviewParams'));\n if (sessionParams) {\n vm.showAdvanceFilters = sessionParams.showAdvanceFilters || false;\n if (!stateParams) {\n //Don't override stateparams\n vm.from = sessionParams.from ? moment.utc(sessionParams.from).toDate() : null;\n vm.to = sessionParams.to ? moment.utc(sessionParams.to).toDate() : null;\n vm.userId =\n sessionParams.userId === '00000000-0000-0000-0000-000000000000'\n ? null\n : sessionParams.userId;\n // Don't override relation when it has been set by state params (navigating from relation-file to here)\n vm.relation = vm.relation || sessionParams.relation;\n vm.resource = sessionParams.resource;\n vm.ownCompanies = sessionParams.ownCompanies || [];\n vm.crmTypes = sessionParams.crmTypes || [];\n vm.taskTemplates = sessionParams.taskTemplates || [];\n vm.finalInvoiceStreamId = sessionParams.finalInvoiceStreamId;\n vm.withLabels = sessionParams.withLabels || [];\n vm.withoutLabels = sessionParams.withoutLabels || [];\n vm.withEmployeeLabels = sessionParams.withEmployeeLabels || [];\n vm.withoutEmployeeLabels = sessionParams.withoutEmployeeLabels || [];\n vm.relationGroups = sessionParams.relationGroups || [];\n vm.period = sessionParams.period;\n vm.invoiceDateFrom = sessionParams.invoiceDateFrom\n ? moment.utc(sessionParams.invoiceDateFrom).toDate()\n : null;\n vm.invoiceDateUntil = sessionParams.invoiceDateUntil\n ? moment.utc(sessionParams.invoiceDateUntil).toDate()\n : null;\n vm.assignmentTemplateId = sessionParams.assignmentTemplateId;\n vm.endFiscalYears = sessionParams.endFiscalYears;\n vm.referenceYear = sessionParams.referenceYear;\n vm.invoiceId = sessionParams.invoiceId;\n vm.intraCompanyInvoiceId = sessionParams.intraCompanyInvoiceId;\n tableParams = sessionParams.tableParams;\n }\n }\n if (stateParams) tableParams = { ...stateParams };\n\n if (!vm.period) vm.setPeriod('month', true);\n\n if (tableParams) {\n if (vm.table) {\n vm.table.initializeParams(tableParams);\n vm.hasFilter = vm.hasFilters();\n vm.filtersInitialised = true;\n } else {\n vm.initialTableParams = tableParams;\n vm.hasFilter = vm.hasFilters() || !angular.equals(tableParams.filters, {});\n vm.filtersInitialised = true;\n }\n } else {\n vm.hasFilter = vm.hasFilters();\n vm.filtersInitialised = true;\n }\n } catch (error) {\n console.error('Error while setting parameters from session storage');\n console.error(error);\n }\n };\n\n vm.reloadRegistrations = () => {\n if (vm.table) {\n vm.table.reload();\n }\n };\n\n var showError = function(error) {\n if (error.status === -1) return; //Request cancelled\n flySvc.error(error);\n };\n\n vm.getUserName = function(userId) {\n if (!vm.employees || !userId) return;\n if (userId === guid1) return $translate.instant('SystemUser');\n const employee = vm.employees.find(e => e.userID === userId);\n if (!employee) return;\n return employee.firstName + ' ' + employee.lastName;\n };\n\n vm.dateFiltersChanged = function() {\n vm.period = '';\n vm.reloadRegistrations();\n };\n\n vm.setPeriod = function(period, noReload = false) {\n vm.period = period || 'month';\n\n const today = moment.utc().startOf('day');\n const currentMonth = today.month() + 1;\n\n switch (vm.period) {\n case 'today':\n vm.from = today.toDate();\n vm.to = today.toDate();\n break;\n case 'yesterday':\n vm.from = today\n .clone()\n .add(-1, 'days')\n .toDate();\n vm.to = today\n .clone()\n .add(-1, 'days')\n .toDate();\n break;\n case 'week':\n vm.from = today\n .clone()\n .startOf('isoWeek')\n .toDate();\n vm.to = moment\n .utc(vm.from)\n .clone()\n .add(6, 'days')\n .toDate();\n break;\n case 'month':\n vm.from = today\n .clone()\n .date(1)\n .toDate();\n vm.to = moment\n .utc()\n .endOf('month')\n .toDate();\n break;\n case 'quarter':\n vm.from = moment\n .utc()\n .startOf('quarter')\n .toDate();\n vm.to = moment\n .utc()\n .endOf('quarter')\n .toDate();\n break;\n case 'year':\n vm.from = moment\n .utc()\n .startOf('year')\n .toDate();\n vm.to = moment\n .utc()\n .endOf('year')\n .toDate();\n break;\n case 'prevWeek':\n vm.from = today\n .clone()\n .startOf('isoWeek')\n .week(today.week() - 1)\n .toDate();\n vm.to = moment\n .utc(vm.from)\n .clone()\n .add(6, 'days')\n .toDate();\n break;\n case 'prevMonth':\n vm.from = today\n .clone()\n .date(1)\n .add(-1, 'months')\n .toDate();\n vm.to = moment\n .utc(vm.from)\n .clone()\n .endOf('month')\n .toDate();\n break;\n case 'prevQuarter':\n vm.from = moment\n .utc()\n .add(-3, 'months')\n .startOf('quarter')\n .toDate();\n vm.to = moment\n .utc()\n .add(-3, 'months')\n .endOf('quarter')\n .toDate();\n break;\n case 'prevYear':\n vm.from = moment\n .utc()\n .add(-1, 'year')\n .startOf('year')\n .toDate();\n vm.to = moment\n .utc()\n .add(-1, 'year')\n .endOf('year')\n .toDate();\n break;\n case 'all':\n default:\n vm.from = null;\n vm.to = null;\n break;\n }\n if (vm.table && !noReload) {\n vm.table.reload();\n }\n };\n\n vm.editRegistration = function(registration) {\n if (registration.type === 3 || registration.type === 4) return vm.editAbsence(registration);\n var group = registration.group;\n var reg = new RegistrationGroup();\n var date;\n for (var j = 0; j < vm.table.rows.length; j++) {\n if (vm.table.rows[j].group && vm.table.rows[j].group === group) {\n reg.setPart(vm.table.rows[j]);\n date = vm.table.rows[j].date;\n }\n }\n reg.initDate(\n date ||\n moment\n .utc()\n .startOf('day')\n .toDate(),\n );\n reg.setRelation();\n\n regDialogsSvc.editRegistrationGroup(reg).then(function(result) {\n if (result) {\n flySvc.success('Registration modified');\n //Result should already be a RegistrationGroup\n var registrations = result.getRegistrationsWithId();\n registrations.forEach(function(reg) {\n reg.user = vm.getUserName(reg.userId);\n var idx = vm.table.rows.findIndex(x => x.id === reg.id);\n if (idx >= 0) {\n vm.table.rows[idx] = reg;\n } else if (\n moment.utc(reg.date).isBetween(moment.utc(vm.from), moment.utc(vm.to), 'day', '[]')\n ) {\n vm.table.rows.unshift(reg);\n }\n });\n\n refreshTotals();\n }\n });\n };\n\n vm.createRegistration = function(userId) {\n var reg = new RegistrationGroup();\n reg.date = moment\n .utc()\n .startOf('day')\n .toDate();\n if (!!vm.relation && vm.relation.crm !== 0) {\n reg.relation = vm.relation;\n reg.invoiceStreamId = vm.relation.invoiceStreamId;\n reg.setRelation();\n }\n\n registrationService\n .getNextRegistrationTime(\n moment\n .utc()\n .startOf('day')\n .toDate(),\n )\n .then(function(data) {\n if (data) reg.work.initTime(data.Hour, data.Minute, 0);\n userId = userId || vm.currentUser.userID;\n\n reg.setUser(userId, vm.getUserName(userId));\n\n var vat = dataCache.getDefaultCompany().resourceVATRate || 0.21;\n reg.work.setVatRate(vat, 0);\n reg.cost.setVatRate(vat, 0);\n reg.travel.setVatRate(vat, 0);\n regDialogsSvc.editRegistrationGroup(reg).then(function(result) {\n if (result) {\n flySvc.success('Registration created');\n //Result should already be a RegistrationGroup\n var registrations = result.getRegistrationsWithId();\n registrations.forEach(function(reg) {\n reg.user = vm.getUserName(reg.userId);\n if (\n moment.utc(reg.date).isBetween(moment.utc(vm.from), moment.utc(vm.to), 'day', '[]')\n ) {\n vm.table.rows.unshift(reg);\n }\n });\n refreshTotals();\n }\n });\n });\n };\n\n vm.deleteRegistration = function(registration) {\n dialogsSvc.showYesNo('msgConfirmDeleteTitle', 'msgConfirmDeleteRegistration').then(function() {\n registration.removing = true;\n registrationResource.delete(\n {\n id: registration.id,\n deleteGroup: false,\n },\n function() {\n registration.removing = false;\n var index = vm.table.rows.indexOf(registration);\n if (index >= 0) {\n vm.table.rows.splice(index, 1);\n\n refreshTotals();\n }\n },\n function(error) {\n registration.removing = false;\n showError(error);\n },\n );\n });\n };\n\n vm.removeRegistrationFromDraft = function(registration) {\n invoiceDialogsSvc\n .deleteWithNeverInvoice('comfirmUndoOrNeverInvoiceDetailLine')\n .then(function(neverInvoice) {\n registration.removingFromDraft = true;\n invoiceRegistrationResource.delete(\n {\n invoiceId: registration.invoiceId,\n id: registration.id,\n neverInvoice,\n },\n null,\n function(result) {\n registration.removingFromDraft = false;\n if (\n result &&\n result.updatedRegistration &&\n result.updatedRegistration.id == registration.id\n ) {\n flySvc.success('msgRemovedRegistrationFromDraftInvoice');\n registration.set(result.updatedRegistration);\n registration.translate($filter);\n }\n },\n function(error) {\n showError(error);\n registration.removingFromDraft = false;\n },\n );\n });\n };\n\n vm.addRegistrationToDraft = registration => {\n if (vm.addingToDraft) return;\n registration.addingToDraft = true;\n vm.addingToDraft = true;\n invoiceRegistrationResource.billRegistrations(null, [registration.id]).$promise.then(\n function(data) {\n registration.addingToDraft = false;\n vm.addingToDraft = false;\n if (data && data.length > 0) {\n const billedRegistration = data.find(x => x.id == registration.id);\n if (billedRegistration && billedRegistration.invoiceStatus === 1) {\n registration.set(billedRegistration);\n registration.translate($filter);\n flySvc.success('msgAddedRegistrationToDraftInvoice');\n }\n if (billedRegistration && billedRegistration.invoiceStatus === 0) {\n flySvc.proposal('msgInvoiceRegistrationNoInvoiceCreated');\n }\n }\n },\n function(error) {\n registration.addingToDraft = false;\n vm.addingToDraft = false;\n flySvc.error(error);\n },\n );\n };\n vm.toggleNeverInvoice = (registration, checked) => {\n if (registration.invoiceStatus > 0) return ''; //Only allowed on registrations not linked to invoice\n return registrationResource\n .toggleNeverInvoice({ id: registration.id, neverInvoice: checked }, null)\n .$promise.then(\n data => {\n registration.invoiceStatus = data.invoiceStatus;\n registration.neverInvoice = data.neverInvoice;\n return false;\n },\n error => {\n flySvc.error(error);\n return '';\n },\n );\n };\n vm.toggleBillable = (registration, checked) => {\n if (registration.invoiceStatus > 0) return ''; //Only allowed on registrations not linked to invoice\n return registrationResource\n .toggleBillable({ id: registration.id, billable: checked }, null)\n .$promise.then(\n data => {\n registration.invoiceStatus = data.invoiceStatus;\n registration.isBillable = data.isBillable;\n return false;\n },\n error => {\n flySvc.error(error);\n return '';\n },\n );\n };\n vm.toggleInForfait = (registration, checked) => {\n if (registration.invoiceStatus > 0) return ''; //Only allowed on registrations not linked to invoice\n return registrationResource\n .toggleInForfait({ id: registration.id, inForfait: checked }, null)\n .$promise.then(\n data => {\n registration.invoiceStatus = data.invoiceStatus;\n registration.inForfait = data.inForfait;\n return false;\n },\n error => {\n flySvc.error(error);\n return '';\n },\n );\n };\n vm.createReport = () => {\n if (vm.to >= vm.from) {\n var userId = vm.userId || '00000000-0000-0000-0000-000000000000';\n var relationId = vm.relation ? vm.relation.id : null;\n var resourceId = vm.resource ? vm.resource.id : null;\n vm.creatingReport = true;\n const filters = vm.getFilters();\n\n return registrationService\n .createReport({ ...vm.currentParams, ...filters }, vm.from, vm.to, userId)\n .$promise.then(\n function() {\n vm.creatingReport = false;\n flySvc.success('ExportToExcelStarted');\n },\n function(error) {\n vm.creatingReport = false;\n showError(error);\n },\n );\n }\n };\n vm.createAbsence = function(type = 3, userId) {\n var absence = new Registration({ type });\n absence.date = moment\n .utc()\n .startOf('day')\n .toDate();\n registrationService\n .getNextRegistrationTime(\n moment\n .utc()\n .startOf('day')\n .toDate(),\n )\n .then(function(data) {\n if (data) absence.initTime(data.Hour, data.Minute, 0);\n absence.userId = userId || vm.currentUser.userID;\n absence.user = vm.getUserName(absence.userId);\n\n regDialogsSvc.newAbsence(absence, {}).then(function(result) {\n if (result) {\n var reg = result instanceof Registration ? result : new Registration(result);\n if (\n moment.utc(reg.date).isBetween(moment.utc(vm.from), moment.utc(vm.to), 'day', '[]')\n ) {\n reg.user = vm.getUserName(reg.userId);\n reg.translate($filter);\n vm.table.rows.push(reg);\n }\n\n refreshTotals();\n }\n });\n });\n };\n\n vm.editAbsence = function(absence) {\n var copy = angular.copy(absence);\n regDialogsSvc.editAbsence(copy, {}).then(function(result) {\n if (result) {\n absence.set(result);\n absence.translate($filter);\n }\n });\n };\n\n vm.hasFilters = function() {\n if (vm.table && vm.table.tableInfo && !angular.equals(vm.table.tableInfo.filters, {}))\n return true;\n\n if (canViewOthers && vm.userId && vm.userId !== '00000000-0000-0000-0000-000000000000')\n return true;\n if (vm.relation && vm.relation.id) return true;\n if (vm.resource && vm.resource.id) return true;\n if (vm.ownCompanies && vm.ownCompanies.length) return true;\n if (vm.crmTypes && vm.crmTypes.length) return true;\n if (vm.taskTemplates && vm.taskTemplates.length) return true;\n if (vm.withLabels && vm.withLabels.length) return true;\n if (vm.withoutLabels && vm.withoutLabels.length) return true;\n if (vm.withEmployeeLabels && vm.withEmployeeLabels.length) return true;\n if (vm.withoutEmployeeLabels && vm.withoutEmployeeLabels.length) return true;\n if (vm.finalInvoiceStreamId) return true;\n if (vm.invoiceDateFrom) return true;\n if (vm.invoiceDateUntil) return true;\n if (vm.assignmentTemplateId) return true;\n if (vm.endFiscalYears && vm.endFiscalYears.length) return true;\n if (vm.period !== 'month') return true;\n if (vm.referenceYear !== null) return true;\n if (vm.invoiceId !== null) return true;\n if (vm.intraCompanyInvoiceId !== null) return true;\n if (vm.relationGroups && vm.relationGroups.length) return true;\n return false;\n };\n vm.clearFilters = function() {\n vm.relation = null;\n vm.resource = null;\n vm.userId = canViewOthers ? null : vm.currentUser.userID;\n vm.ownCompanies = [];\n vm.taskTemplates = [];\n vm.finalInvoiceStreamId = null;\n vm.crmTypes = [];\n vm.withLabels = [];\n vm.withoutLabels = [];\n vm.withEmployeeLabels = [];\n vm.withoutEmployeeLabels = [];\n vm.invoiceDateFrom = null;\n vm.invoiceDateUntil = null;\n vm.assignmentTemplateId = null;\n vm.endFiscalYears = [];\n vm.referenceYear = null;\n vm.invoiceId = null;\n vm.intraCompanyInvoiceId = null;\n vm.relationGroups = [];\n vm.setPeriod('month', true);\n if (vm.table) {\n vm.table.clearFilter();\n vm.table.reload();\n }\n };\n vm.relationChanged = function(oldRelationId) {\n if (oldRelationId !== vm.relation?.id) {\n vm.finalInvoiceStreamId = null;\n vm.reloadRegistrations();\n }\n };\n\n vm.toggleCrmType = crmType => {\n document.activeElement.blur();\n const idx = vm.crmTypes.indexOf(crmType);\n if (idx >= 0) {\n vm.crmTypes.splice(idx, 1);\n } else {\n vm.crmTypes.push(crmType);\n }\n vm.reloadRegistrations();\n };\n\n vm.toggleAdvanceFilters = function() {\n vm.showAdvanceFilters = !vm.showAdvanceFilters;\n const params = JSON.parse(sessionStorage.getItem('RegistrationOverviewParams')) || {};\n\n sessionStorage.setItem(\n 'RegistrationOverviewParams',\n JSON.stringify({\n ...params,\n showAdvanceFilters: vm.showAdvanceFilters,\n }),\n );\n };\n //Column selection\n //List of columns that can be hidden\n vm.hideableColumns = [\n { key: 'date', label: $filter('translate')('Date'), selected: true },\n {\n key: 'referenceYear',\n label: $filter('translate')('ReferenceYear'),\n selected: true,\n hiddenBySecurity: !AuthService.hasFeature('ReferenceYear'),\n },\n { key: 'user', label: $filter('translate')('User'), selected: true },\n { key: 'relation', label: $filter('translate')('Relation'), selected: true },\n { key: 'customerCode', label: $filter('translate')('CustomerCode'), selected: true },\n {\n key: 'assignment',\n label: $filter('translate')('Assignment'),\n selected: true,\n hiddenBySecurity: !dataCache.getArray('assignmentsEnabled'),\n },\n { key: 'resourceType', label: $filter('translate')('Type'), selected: true },\n { key: 'resource', label: $filter('translate')('Resource'), selected: true },\n { key: 'taskName', label: $filter('translate')('Task'), selected: true },\n\n { key: 'fromMinutes', label: $filter('translate')('From'), selected: true },\n { key: 'toMinutes', label: $filter('translate')('To'), selected: true },\n { key: 'quantity', label: $filter('translate')('Quantity'), selected: true },\n {\n key: 'unitPrice',\n label: $filter('translate')('Unit price'),\n selected: true,\n hiddenBySecurity: !checkSecurity('Pricelist:r'),\n },\n {\n key: 'vatPercentage',\n label: $filter('translate')('% VAT'),\n selected: true,\n hiddenBySecurity: !checkSecurity('Pricelist:r'),\n },\n {\n key: 'totalAmount',\n label: $filter('translate')('Amount'),\n selected: true,\n hiddenBySecurity: !checkSecurity('Pricelist:r'),\n },\n {\n key: 'isFixedPrice',\n label: $filter('translate')('IsFixedPrice'),\n selected: false,\n hiddenBySecurity: !checkSecurity('Pricelist:r'),\n },\n {\n key: 'isBillable',\n label: $filter('translate')('Billable'),\n selected: true,\n hiddenBySecurity: !checkSecurity('Pricelist:r'),\n },\n {\n key: 'forfaitStatus',\n label: $filter('translate')('In forfait'),\n selected: true,\n hiddenBySecurity: !checkSecurity('Pricelist:r'),\n },\n {\n key: 'neverInvoice',\n label: $filter('translate')('Never invoice'),\n selected: true,\n hiddenBySecurity: !checkSecurity('InvoiceDraft:u'),\n },\n {\n key: 'invoiceStatus',\n label: $filter('translate')('Invoice'),\n selected: true,\n hiddenBySecurity: !checkSecurity('InvoiceDraft:r'),\n },\n { key: 'remark', label: $filter('translate')('Remark'), selected: true },\n ];\n //Store hidden columns in object for easy use\n vm.hiddenColumns = {};\n\n vm.rebuildHiddenColumns = function() {\n vm.hiddenColumns = vm.hideableColumns.reduce((r, i) => {\n r[i.key] = !i.selected;\n return r;\n }, {});\n };\n vm.initHiddenColumns = function() {\n const hiddenColumns = userStorage.getItem(columnSelectionStorageKey) || [];\n if (hiddenColumns.length) {\n vm.hideableColumns.forEach(col => {\n const selected = hiddenColumns.indexOf(col.key) < 0;\n col.selected = selected;\n });\n }\n vm.rebuildHiddenColumns();\n };\n\n vm.openColumnConfigDialog = function() {\n dialogsSvc\n .showCheckboxList(\n 'msgSelectTableColumns',\n vm.hideableColumns\n .filter(x => !x.hiddenBySecurity)\n .map(({ key, label, selected }) => ({ key, label, selected })),\n )\n .then(function(result) {\n if (result) {\n vm.hideableColumns.forEach(col => {\n var item = result.find(x => x.key === col.key);\n if (!item) return;\n col.selected = !!item.selected;\n });\n vm.rebuildHiddenColumns();\n //Save hidden columns\n userStorage.setItem(\n columnSelectionStorageKey,\n vm.hideableColumns.filter(x => !x.selected).map(x => x.key),\n );\n }\n });\n };\n vm.initHiddenColumns();\n\n vm.canSelect = reg => {\n if (reg.isBilled) return false;\n if (reg.userId === vm.currentUser.userID) return true;\n return canEditOthers;\n };\n vm.selectAllChanged = function() {\n if (!vm.table || !vm.table.rows) return;\n angular.forEach(vm.table.rows, function(el) {\n if (vm.canSelect(el)) el.selected = vm.selectAll;\n });\n };\n\n vm.selectedCount = function() {\n if (!vm.table || !vm.table.rows) return 0;\n const total = vm.selectableCount || 0;\n const count = vm.table.rows.reduce(\n (cnt, reg) => cnt + (vm.canSelect(reg) && !!reg.selected !== vm.selectAll ? 1 : 0),\n 0,\n );\n return vm.selectAll ? total - count : count;\n };\n vm.getBatchSelectionParams = function() {\n return {\n selectAll: vm.selectAll,\n ids:\n vm.table && vm.table.rows\n ? vm.table.rows\n .filter(reg => vm.canSelect(reg) && !!reg.selected !== vm.selectAll)\n .map(reg => reg.id)\n : [],\n };\n };\n vm.batchUpdateField = function() {\n const sessionParams = JSON.parse(sessionStorage.getItem('RegistrationOverviewParams'));\n if (!sessionParams) return;\n\n const tableParams = sessionParams.tableParams;\n if (!tableParams) return;\n var batchParams = vm.getBatchSelectionParams();\n var filters = vm.getFilters();\n vm.globalActionRunning = true;\n\n regDialogsSvc\n .batchUpdateField(1, { ...filters, ...tableParams }, batchParams)\n .then(result => {\n if (!result || !result.count) return;\n if (!vm.table || !vm.table.rows) return;\n const boolValue = !!result.boolValue;\n\n vm.table.rows.forEach(reg => {\n if (!vm.canSelect(reg)) return;\n if (!reg.selected) return;\n switch (parseInt(result.field)) {\n case 1:\n reg.neverInvoice = boolValue;\n return;\n case 2:\n reg.isBillable = boolValue;\n return;\n case 3:\n if (reg.inForfait === null) return;\n reg.inForfait = boolValue;\n return;\n }\n });\n }, showError)\n .finally(() => {\n vm.globalActionRunning = false;\n });\n };\n vm.batchBillRegistrations = function() {\n const sessionParams = JSON.parse(sessionStorage.getItem('RegistrationOverviewParams'));\n if (!sessionParams) return;\n\n const tableParams = sessionParams.tableParams;\n if (!tableParams) return;\n dialogsSvc.showYesNo('comfirmTitle', 'msgConfirmBillRegistrations').then(function() {\n vm.globalActionRunning = true;\n var batchParams = vm.getBatchSelectionParams();\n var filters = vm.getFilters();\n vm.table.rows\n .filter(reg => vm.canSelect(reg) && !!reg.selected !== vm.selectAll)\n .forEach(reg => {\n reg.addingToDraft = true;\n });\n vm.addingToDraft = true;\n $http\n .post(`${appUrls.api}/api/Registration/BatchBill`, batchParams, {\n params: { ...filters, ...tableParams },\n })\n .then(\n function({ data }) {\n if (data && data.id) {\n flySvc.action('msgJobStarted', undefined, 'jobs.detail', undefined, {\n jobId: data.id,\n });\n }\n\n vm.globalActionRunning = false;\n },\n function(error) {\n showError(error);\n vm.globalActionRunning = false;\n },\n );\n });\n\n function jobUpdateHandler(job) {\n if (job.jobType !== 38 || (job.status !== 2 && job.status !== 3)) return;\n //Batch bill registrations finished\n $timeout(function() {\n vm.addingToDraft = false;\n vm.reloadRegistrations();\n }, 100);\n }\n SignalRService.subscribe('jobUpdated', jobUpdateHandler);\n\n $scope.$on('$destroy', function() {\n if (vm.retrieveRequest && vm.retrieveRequest.$cancelRequest)\n vm.retrieveRequest.$cancelRequest();\n if (vm.kpiRequest && vm.kpiRequest.$cancelRequest) vm.kpiRequest.$cancelRequest();\n SignalRService.unsubscribe('jobUpdated', jobUpdateHandler);\n });\n };\n\n vm.openTaskDetail = function(registration) {\n vm.taskDetail = { id: registration.plannedTaskId };\n };\n\n vm.closeTaskDetail = function() {\n $timeout(() => {\n vm.taskDetail = null;\n }, 0);\n };\n\n if (!vm.filtersInitialised) {\n setParamsFromSessionStorage();\n }\n\n vm.canEditTask = function(registration) {\n if (!registration) return false;\n\n const hasTodoPermission = AuthService.hasPermission({\n functionality: 'Todo',\n privilege: 'Update',\n });\n const hasPlannedTaskPermission = AuthService.hasPermission({\n functionality: 'PlannedTask',\n privilege: 'Update',\n });\n\n return hasTodoPermission && hasPlannedTaskPermission;\n };\n}\n","import angular from 'angular';\nimport { Registration } from '../model/registration';\nangular\n .module('cxRegistrations')\n .controller('AbsenceDialogCtrl', [\n '$element',\n 'dataCache',\n 'resourceFactorySvc',\n 'flySvc',\n 'dialogsSvc',\n 'close',\n 'registration',\n 'settings',\n absenceDialogCtrl,\n ]);\nfunction absenceDialogCtrl(\n $element,\n dataCache,\n resourceFactorySvc,\n flySvc,\n dialogsSvc,\n close,\n registration,\n settings,\n) {\n var vm = this;\n vm.showValidation = false;\n vm.saving = false;\n vm.currentUser = dataCache.getArray('employee')?.userID;\n\n vm.registration = new Registration({ type: 3 });\n if (registration) {\n if (registration instanceof Object) {\n vm.registration = new Registration(registration);\n }\n }\n\n vm.settings = settings || {};\n\n vm.canSave = () => {\n return !!vm.registration.resource;\n }\n\n var registrationResource = resourceFactorySvc.get('registration');\n resourceFactorySvc\n .get('relation')\n .names({ take: 20, includeInactive: false, crmTypes: [4] }, function(data) {\n vm.relations = data;\n if (data.length === 0) return;\n if (data.length === 1) {\n vm.registration.relation = data[0];\n } else if (!vm.registration.relation) {\n const relationId = dataCache.getAbsenceRelationIdForUser(vm.registration.userId);\n const relation = relationId ? data.find(x => x.id === relationId) : null;\n vm.registration.relation = relation ?? data[0];\n }\n });\n\n vm.save = function() {\n if (!vm.canSave()) return;\n if (vm.saving) return;\n vm.saving = true;\n if (vm.registration.group)\n return registrationResource.update([vm.registration]).$promise.then(\n function(result) {\n vm.saving = false;\n $element.modal('hide');\n close(result[0], 500);\n },\n function(error) {\n flySvc.error(error);\n vm.saving = false;\n },\n );\n else\n return registrationResource.save([vm.registration]).$promise.then(\n function(result) {\n vm.saving = false;\n $element.modal('hide');\n close(result[0], 500);\n },\n function(error) {\n flySvc.error(error);\n vm.saving = false;\n },\n );\n };\n\n vm.selectRelation = function(relation) {\n if (!relation && !relation.id) {\n vm.registration.relation = null;\n return;\n }\n vm.registration.relation = relation;\n vm.registration.invoiceStreamId = relation.invoiceStreamId;\n vm.registration.invoiceStream =\n (relation.invoiceStreamId &&\n relation &&\n relation.invoiceStreams &&\n relation.invoiceStreams.find(x => x.id === relation.invoiceStreamId)) ||\n null;\n };\n\n vm.cancel = function() {\n $element.modal('hide');\n close(null, 500);\n };\n}\n","import angular from 'angular';\nimport { type } from 'jquery';\nimport moment from 'moment';\n\nangular\n .module('cxInvoicing')\n .controller('BatchUpdateRegistrationFieldDialogCtrl', [\n '$element',\n 'close',\n 'filters',\n 'batchParams',\n 'fieldType',\n 'appUrls',\n '$http',\n 'flySvc',\n batchUpdateRegistrationFieldDialogCtrl,\n ]);\n\nfunction batchUpdateRegistrationFieldDialogCtrl(\n $element,\n close,\n filters,\n batchParams,\n fieldType,\n appUrls,\n $http,\n flySvc,\n) {\n var vm = this;\n vm.saving = false;\n vm.model = {\n field: fieldType,\n boolValue: true,\n };\n vm.showWarning = !!batchParams.selectAll;\n\n vm.save = function() {\n if (vm.model.field <= 0) return;\n if (vm.saving) return;\n vm.saving = true;\n\n $http\n .post(\n `${appUrls.api}/api/registration/BatchUpdateField`,\n {\n ...batchParams,\n ...vm.model,\n },\n { params: filters },\n )\n .then(\n function({ data }) {\n vm.saving = false;\n flySvc.success('msgBatchUpdateRegistrationsSuccess', { count: data || 0 });\n $element.modal('hide');\n close(\n {\n count: data || 0,\n ...vm.model,\n },\n 500,\n );\n },\n function(error) {\n vm.saving = false;\n flySvc.error(error.data.code, error.data.parameters);\n },\n );\n };\n vm.cancel = function() {\n close(null, 500);\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cxRegistrations')\n .controller('DeleteResourceCategoryDialogCtrl', [\n 'close',\n 'resourceFactorySvc',\n 'flySvc',\n 'category',\n '$element',\n '$http',\n 'appUrls',\n '$q',\n 'appMessages',\n 'translateListFilter',\n 'resourceNameFilter',\n deleteResourceCategoryDialogCtrl,\n ]);\n\nfunction deleteResourceCategoryDialogCtrl(\n close,\n resourceFactorySvc,\n flySvc,\n category,\n $element,\n $http,\n appUrls,\n $q,\n appMessages,\n translateListFilter,\n resourceNameFilter,\n) {\n const vm = this;\n vm.message = appMessages('comfirmDeleteResource', { name: category.name });\n\n const resources = [{ ...category.resource, isDefault: true }, ...(category.resources || [])];\n const resourceIds = resources.map(x => x.id);\n vm.usedResources = [];\n vm.allResources = [];\n vm.saving = false;\n const regResource = resourceFactorySvc.get('resource');\n\n function getTaskData() {\n //Only do request for work & costs\n if (category.type !== 0 && category.type !== 1) return $q.when([]);\n return $http\n .post(`${appUrls.tasks}/api/PlannedTasks/ResourcesUsage`, {\n resourceIds,\n isCost: category.type === 1,\n })\n .then(({ data }) => data || {});\n }\n\n function getMainData() {\n return $http\n .post(`${appUrls.api}/api/Resource/ResourcesUsage`, resourceIds)\n .then(({ data }) => data || {});\n }\n\n $q.all([getTaskData(), getMainData()]).then(\n ([taskData, mainData]) => {\n vm.usedResources = resources.reduce((result, resource) => {\n const r = {\n ...resource,\n taskTemplates: ((taskData.taskTemplates || {})[resource.id] || []).map(t => {\n //Translate task names\n const mainTemplateName = translateListFilter(\n t.mainTemplateId,\n 'TaskTemplate',\n t.mainTemplateName,\n );\n if (t.mainTemplateId === t.id) return { ...t, label: mainTemplateName };\n const subTemplateName = translateListFilter(t.id, 'TaskTemplate', t.name);\n return { ...t, label: `${mainTemplateName} - ${subTemplateName}` };\n }),\n tasksWithTemplate: (taskData.tasksWithTemplate || {})[resource.id] || 0,\n tasksWithoutTemplate: (taskData.tasksWithoutTemplate || {})[resource.id] || 0,\n plannedRegistrations: (mainData.plannedRegistrations || {})[resource.id] || 0,\n settings: (mainData.settings || {})[resource.id] || 0,\n collapsed: true,\n replaceWith: null,\n };\n if (r.taskTemplates.length > 0) r.collapsed = false;\n\n if (\n r.taskTemplates.length === 0 &&\n r.tasksWithTemplate === 0 &&\n r.tasksWithoutTemplate === 0 &&\n r.plannedRegistrations === 0 &&\n r.settings === 0\n )\n return result;\n\n result.push(r);\n return result;\n }, []);\n\n if (vm.usedResources.length > 0) {\n regResource.reg({ type: category.type }).$promise.then(function(data) {\n vm.allResources = data.filter(x => resourceIds.indexOf(x.id) < 0).map(item => ({\n ...item,\n label: resourceNameFilter(item),\n code: item.code || '',\n }));\n });\n }\n },\n error => {\n flySvc.error(error);\n },\n );\n\n vm.isValid = function() {\n if (vm.usedResources.length === 0) return true;\n if (vm.usedResources.some(x => !x.replaceWith || !x.replaceWith.id)) return false;\n return true;\n };\n vm.save = function() {\n if (vm.saving || !vm.isValid()) return;\n vm.saving = true;\n regResource.deleteCategory(\n {\n id: category.id,\n },\n {\n replacements: vm.usedResources.reduce((o, r) => {\n o[r.id] = r.replaceWith.id;\n return o;\n }, {}),\n },\n ({ data: isRemoved }) => {\n $element.modal('hide');\n close({ isRemoved }, 500);\n },\n error => {\n flySvc.error(error);\n },\n );\n };\n vm.cancel = function() {\n $element.modal('hide');\n close(null, 500);\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cxRegistrations')\n .controller('DeleteResourceDialogCtrl', [\n 'close',\n 'resourceFactorySvc',\n 'flySvc',\n 'category',\n 'resource',\n '$element',\n '$http',\n 'appUrls',\n '$q',\n 'appMessages',\n 'translateListFilter',\n 'resourceNameFilter',\n deleteResourceDialogCtrl,\n ]);\n\nfunction deleteResourceDialogCtrl(\n close,\n resourceFactorySvc,\n flySvc,\n category,\n resource,\n $element,\n $http,\n appUrls,\n $q,\n appMessages,\n translateListFilter,\n resourceNameFilter,\n) {\n const vm = this;\n vm.message = appMessages('comfirmDeleteResource', { name: resource.name });\n\n const resources = [resource];\n const resourceIds = resources.map(x => x.id);\n vm.usedResources = [];\n vm.allResources = [];\n vm.saving = false;\n const regResource = resourceFactorySvc.get('resource');\n\n function getTaskData() {\n //Only do request for work & costs\n if (category.type !== 0 && category.type !== 1) return $q.when([]);\n return $http\n .post(`${appUrls.tasks}/api/PlannedTasks/ResourcesUsage`, {\n resourceIds,\n isCost: category.type === 1,\n })\n .then(({ data }) => data || {});\n }\n\n function getMainData() {\n return $http\n .post(`${appUrls.api}/api/Resource/ResourcesUsage`, resourceIds)\n .then(({ data }) => data || {});\n }\n\n $q.all([getTaskData(), getMainData()]).then(\n ([taskData, mainData]) => {\n vm.usedResources = resources.reduce((result, resource) => {\n const r = {\n ...resource,\n taskTemplates: ((taskData.taskTemplates || {})[resource.id] || []).map(t => {\n //Translate task names\n const mainTemplateName = translateListFilter(\n t.mainTemplateId,\n 'TaskTemplate',\n t.mainTemplateName,\n );\n if (t.mainTemplateId === t.id) return { ...t, label: mainTemplateName };\n const subTemplateName = translateListFilter(t.id, 'TaskTemplate', t.name);\n return { ...t, label: `${mainTemplateName} - ${subTemplateName}` };\n }),\n tasksWithTemplate: (taskData.tasksWithTemplate || {})[resource.id] || 0,\n tasksWithoutTemplate: (taskData.tasksWithoutTemplate || {})[resource.id] || 0,\n plannedRegistrations: (mainData.plannedRegistrations || {})[resource.id] || 0,\n settings: (mainData.settings || {})[resource.id] || 0,\n collapsed: true,\n replaceWith: null,\n };\n if (r.taskTemplates.length > 0) r.collapsed = false;\n\n if (\n r.taskTemplates.length === 0 &&\n r.tasksWithTemplate === 0 &&\n r.tasksWithoutTemplate === 0 &&\n r.plannedRegistrations === 0 &&\n r.settings === 0\n )\n return result;\n\n result.push(r);\n return result;\n }, []);\n\n if (vm.usedResources.length > 0) {\n regResource.reg({ type: category.type }).$promise.then(function(data) {\n vm.allResources = data.filter(x => resourceIds.indexOf(x.id) < 0).map(item => ({\n ...item,\n label: resourceNameFilter(item),\n code: item.code || '',\n }));\n });\n }\n },\n error => {\n flySvc.error(error);\n },\n );\n\n vm.isValid = function() {\n if (vm.usedResources.length === 0) return true;\n if (vm.usedResources.some(x => !x.replaceWith || !x.replaceWith.id)) return false;\n return true;\n };\n vm.save = function() {\n if (vm.saving || !vm.isValid()) return;\n vm.saving = true;\n regResource.deleteResource(\n {\n id: resource.id,\n },\n {\n replacements: vm.usedResources.reduce((o, r) => {\n o[r.id] = r.replaceWith.id;\n return o;\n }, {}),\n },\n ({ data: isRemoved }) => {\n $element.modal('hide');\n close({ isRemoved }, 500);\n },\n error => {\n flySvc.error(error);\n },\n );\n };\n vm.cancel = function() {\n $element.modal('hide');\n close(null, 500);\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cxRegistrations')\n .controller('NewCategoryDialogCtrl', [\n '$element',\n 'dataCache',\n 'resourceFactorySvc',\n 'flySvc',\n 'close',\n '$http',\n 'appUrls',\n 'enumCacheSvc',\n 'checkSecurity',\n '$filter',\n newCategoryDialogCtrl,\n ]);\n\nfunction newCategoryDialogCtrl(\n $element,\n dataCache,\n resourceFactorySvc,\n flySvc,\n close,\n $http,\n appUrls,\n enumCacheSvc,\n checkSecurity,\n $filter,\n) {\n var vm = this;\n vm.showValidation = false;\n vm.resourceTypes = [];\n vm.translation = {};\n vm.category = {\n type: null,\n name: '',\n code: null,\n price: null,\n vatPercentage: dataCache.getDefaultCompany().resourceVATRate || 0.21,\n vatType: 0,\n isBillable: true,\n inForfait: false,\n ledgerAccount: dataCache.getDefaultCompany().resourceLedgerAccount,\n };\n\n enumCacheSvc.get('resourceType').then(data => {\n const canCreateResource = checkSecurity('Pricelist:c');\n const canCreateAbsence = checkSecurity('AbsenceAndCounters:c');\n vm.resourceTypes = data\n .filter(x => (x.key === 3 || x.key === 4 ? canCreateAbsence : canCreateResource))\n .map(x => ({ ...x, label: $filter('translateList')(x.key, 'resourceType', x.value) }));\n });\n vm.resourceTypeChanged = function() {\n vm.category.inForfait = vm.category.type === 0;\n\n if (vm.category.type === 3 || vm.category.type === 4) {\n vm.category.price = 0;\n }\n };\n\n var regResource = resourceFactorySvc.get('resource');\n\n vm.save = function() {\n if (vm.category.type === 3 || vm.category.type === 4) {\n //Absence\n vm.category.inForfait = false;\n vm.category.isBillable = false;\n vm.category.ledgerAccount = null;\n vm.category.price = 0;\n }\n vm.saving = true;\n regResource.saveCategory(\n vm.category,\n function(result) {\n if (result.id && vm.translation && vm.translation.save) {\n vm.translation.save(result.id).then(function(translationResult) {\n // save resource that was created by category to translations as well\n if (result.resource && translationResult && translationResult.length) {\n var key = `resource_${result.resource.id}`;\n var changes = translationResult.map(x => ({ ...x, key: key }));\n $http.put(appUrls.api + '/api/translation/lists/0', changes);\n }\n\n $element.modal('hide');\n close(result, 500);\n });\n } else {\n $element.modal('hide');\n close(result, 500);\n }\n },\n function(error) {\n vm.saving = false;\n flySvc.error(error.data.code, error.data.parameters);\n },\n );\n };\n vm.updateName = function(value) {\n vm.category.name = value;\n };\n vm.showValidationErrors = function() {\n vm.showValidation = true;\n if (vm.translation && vm.translation.isValid) vm.translation.isValid(true);\n };\n vm.cancel = function() {\n $element.modal('hide');\n close(null, 500);\n };\n}\n","import angular from 'angular';\nimport { Registration } from '../model/registration';\n\nangular\n .module('cxRegistrations')\n .factory('regDialogsSvc', ['$q', 'ModalService', '$timeout', regDialogsSvc]);\n\nfunction regDialogsSvc($q, ModalService, $timeout) {\n function showModal(modalOptions) {\n var deferred = $q.defer();\n ModalService.showModal(modalOptions).then(function(modal) {\n modal.element.modal();\n modal.close.then(function(result) {\n if (result) deferred.resolve(result);\n else deferred.reject(null);\n }, deferred.reject);\n\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n $timeout(() => {\n deferred.reject(null);\n }, 1000);\n });\n });\n return deferred.promise;\n }\n\n function showEditGroupDialog(registration) {\n return showModal({\n template: require('./regEditGroupDialog.html'),\n controller: 'RegEditGroupDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n registration: registration,\n },\n });\n }\n\n function showEditDialog(registration, settings) {\n return showModal({\n template: require('./registrationEditDialog.html'),\n controller: 'RegistrationEditDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n registration: registration,\n settings: settings,\n },\n });\n }\n function showAbsenceDialog(registration, settings) {\n return showModal({\n template: require('./absenceDialog.html'),\n controller: 'AbsenceDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n registration: registration,\n settings: settings,\n },\n });\n }\n\n return {\n newRegistrationGroup: function(relations) {\n return showEditGroupDialog(null, relations);\n },\n editRegistrationGroup: function(registration) {\n return showEditGroupDialog(registration);\n },\n newRegistration: function(settings) {\n return showEditDialog(null, settings);\n },\n editRegistration: function(registration, settings) {\n return showEditDialog(registration, settings);\n },\n newCategory: function() {\n return showModal({\n template: require('./newCategoryDialog.html'),\n controller: 'NewCategoryDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n });\n },\n newSubResource: function(category) {\n return showModal({\n template: require('./newSubResourceDialog.html'),\n controller: 'NewSubResourceDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n category: category,\n },\n });\n },\n newAbsence: function(registration, settings) {\n return showAbsenceDialog(registration, settings);\n },\n editAbsence: function(registration, settings) {\n return showAbsenceDialog(registration, settings);\n },\n batchUpdateField: function(fieldType, filters, batchParams) {\n return showModal({\n template: require('./batchUpdateRegistrationFieldDialog.html'),\n controller: 'BatchUpdateRegistrationFieldDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n fieldType,\n filters,\n batchParams,\n },\n });\n },\n deleteResourceCategory: function(category) {\n return showModal({\n template: require('./deleteResourceCategoryDialog.html'),\n controller: 'DeleteResourceCategoryDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n category: category,\n },\n });\n },\n deleteResource: function(category, resource) {\n return showModal({\n template: require('./deleteResourceDialog.html'),\n controller: 'DeleteResourceDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n category: category,\n resource: resource,\n },\n });\n },\n };\n}\n","import angular from 'angular';\nimport { RegistrationGroup } from '../model/registrationGroup';\nimport moment from 'moment';\nangular\n .module('cxRegistrations')\n .controller('RegEditGroupDialogCtrl', [\n '$element',\n 'dataCache',\n 'resourceFactorySvc',\n 'registrationService',\n 'flySvc',\n 'close',\n 'registration',\n 'appUrls',\n '$http',\n '$filter',\n 'checkSecurity',\n regEditGroupDialogCtrl,\n ]);\n\nfunction regEditGroupDialogCtrl(\n $element,\n dataCache,\n resourceFactorySvc,\n registrationService,\n flySvc,\n close,\n registration,\n appUrls,\n $http,\n $filter,\n checkSecurity,\n) {\n var vm = this;\n\n vm.showValidation = false;\n vm.registration = registration || new RegistrationGroup();\n vm.date =\n vm.registration.date ||\n moment\n .utc()\n .startOf('day')\n .toDate();\n var registrationResource = resourceFactorySvc.get('registration');\n\n var retrieveInteraction = function() {\n if (!vm.registration || !vm.registration.group || !checkSecurity('InteractionsOwn:r')) return;\n $http.get(appUrls.interactions + '/api/interactions/object/1/' + vm.registration.group).then(\n function({ data }) {\n if (data && data.length) {\n const interaction = data[0];\n vm.registration.interactionType = interaction.interactionType;\n vm.registration.interactionDescription = interaction.description;\n vm.registration.interactionId = interaction.id;\n vm.registration.interactionTitle = interaction.title;\n\n vm.registration.originalInteractionDescription = interaction.description;\n vm.registration.originalInteractionType = interaction.interactionType;\n vm.registration.originalInteractionTitle = interaction.title;\n vm.registration.originalInteraction = interaction;\n }\n },\n function(error) {\n console.error(error);\n },\n );\n };\n retrieveInteraction();\n\n vm.dateChanged = function(date) {\n if (vm.registration.group) return;\n\n registrationService.getNextRegistrationTime(date).then(function(data) {\n vm.registration.work.initTime(data.Hour, data.Minute, vm.registration.work.durationMinutes);\n });\n };\n\n vm.save = function() {\n if (vm.registration.group) {\n return registrationResource\n .update([vm.registration.work, vm.registration.travel, vm.registration.cost])\n .$promise.then(\n function(result) {\n var newReg = registrationService.createGroup(result, vm.date);\n newReg.translate($filter);\n return newReg;\n },\n function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n },\n );\n } else {\n return registrationResource\n .save([vm.registration.work, vm.registration.travel, vm.registration.cost])\n .$promise.then(\n function(result) {\n var newReg = registrationService.createGroup(result, vm.date);\n newReg.translate($filter);\n return newReg;\n },\n function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n },\n );\n }\n };\n vm.close = function(result) {\n $element.modal('hide');\n close(result, 500);\n };\n\n vm.cancel = function() {\n $element.modal('hide');\n close(null, 500);\n };\n}\n","import angular from 'angular';\nimport { Registration } from '../model/registration';\n\nangular\n .module('cxRegistrations')\n .controller('RegistrationEditDialogCtrl', [\n '$element',\n 'dataCache',\n 'resourceFactorySvc',\n 'flySvc',\n 'close',\n 'registration',\n 'settings',\n '$http',\n 'appUrls',\n registrationEditDialogCtrl,\n ]);\n\nfunction registrationEditDialogCtrl(\n $element,\n dataCache,\n resourceFactorySvc,\n flySvc,\n close,\n registration,\n settings,\n $http,\n appUrls,\n) {\n var vm = this;\n vm.showValidation = false;\n vm.registration = registration || new Registration();\n vm.settings = settings || {};\n var registrationResource = resourceFactorySvc.get('registration');\n\n const emptyDescription =\n '\\n\\n\\t\\n\\n\\n\\n';\n\n vm.save = function() {\n vm.registration.plannedTaskId = registration.plannedTaskId; //TODO add to mapper (?)\n if (vm.registration.group)\n return registrationResource.update([vm.registration]).$promise.then(\n function(result) {\n const interactionChanged =\n (!vm.registration.originalInteraction &&\n ((vm.registration.interactionDescription &&\n vm.registration.interactionDescription !== emptyDescription) ||\n vm.registration.interactionTitle)) ||\n (vm.registration.originalInteraction &&\n ((vm.registration.interactionDescription !=\n vm.registration.originalInteraction.description &&\n vm.registration.interactionDescription !== emptyDescription) ||\n vm.registration.interactionType !=\n vm.registration.originalInteraction.interactionType ||\n vm.registration.interactionTitle != vm.registration.originalInteraction.title ||\n vm.registration.originalInteraction.relationId != vm.registration.relation.id ||\n !moment(vm.registration.originalInteraction.date).isSame(\n moment(vm.registration.date),\n 'day',\n )));\n if (interactionChanged) {\n createOrUpdateInteraction();\n }\n\n $element.modal('hide');\n close(result, 500);\n },\n function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n },\n );\n else\n return registrationResource.save([vm.registration]).$promise.then(\n function(result) {\n $element.modal('hide');\n close(result, 500);\n },\n function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n },\n );\n };\n\n function createOrUpdateInteraction() {\n if (vm.registration.interactionId) {\n // update\n const updatedInteraction = {\n id: vm.registration.interactionId,\n description: vm.registration.interactionDescription,\n interactionType: vm.registration.interactionType,\n title: vm.registration.interactionTitle,\n isPinned: vm.registration.originalInteraction.isPinned,\n date: vm.registration.date,\n relationId: vm.registration.relation.id,\n };\n $http.put(appUrls.interactions + '/api/interactions', updatedInteraction);\n } else {\n const newInteraction = {\n title: vm.registration.interactionTitle,\n description: vm.registration.interactionDescription,\n interactionType: vm.registration.interactionType,\n date: vm.registration.date,\n relationId: vm.registration.relation.id,\n objectType: 1,\n objectId: vm.registration.group,\n interactionSource: 1,\n };\n $http.post(appUrls.interactions + '/api/interactions/create', newInteraction);\n }\n }\n\n vm.cancel = function() {\n $element.modal('hide');\n close(null, 500);\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cxRegistrations')\n .controller('NewSubResourceDialogCtrl', [\n '$element',\n 'resourceFactorySvc',\n 'flySvc',\n 'close',\n 'category',\n\n newSubResourceDialogCtrl,\n ]);\n\nfunction newSubResourceDialogCtrl($element, resourceFactorySvc, flySvc, close, category) {\n var vm = this;\n vm.showValidation = false;\n vm.category = category;\n vm.translation = {};\n vm.resource = {\n categoryId: category.id,\n code: null,\n name: '',\n inForfait: category.resource ? !!category.resource.inForfait : true,\n isBillable: category.resource ? !!category.resource.isBillable : true,\n };\n\n var regResource = resourceFactorySvc.get('resource');\n\n vm.save = function() {\n vm.saving = true;\n regResource.saveResource(\n vm.resource,\n function(result) {\n if (result.id && vm.translation && vm.translation.save) {\n vm.translation.save(result.id).then(function() {\n $element.modal('hide');\n close(result, 500);\n });\n } else {\n $element.modal('hide');\n close(result, 500);\n }\n },\n function(error) {\n vm.saving = false;\n flySvc.error(error.data.code, error.data.parameters);\n },\n );\n };\n\n vm.updateName = function(value) {\n vm.resource.name = value;\n };\n\n vm.showValidationErrors = function() {\n vm.showValidation = true;\n if (vm.translation && vm.translation.isValid) vm.translation.isValid(true);\n };\n\n vm.cancel = function() {\n $element.modal('hide');\n close(null, 500);\n };\n}\n","import angular from 'angular';\nangular.module('cxRegistrations').directive('editableResourceTypeahead', [\n 'editableDirectiveFactory',\n '$timeout',\n function(editableDirectiveFactory, $timeout) {\n var dir = editableDirectiveFactory({\n directiveName: 'editableResourceTypeahead',\n inputTpl: '',\n render: function() {\n this.parent.render.call(this);\n },\n autosubmit: function() {\n var self = this;\n self.scope.submitOnChange = function() {\n $timeout(function() {\n self.scope.$form.$submit();\n }, 100);\n };\n self.editorEl.on('keyup', function(e) {\n if (!self.single) {\n return;\n }\n switch (e.keyCode) {\n // hide on `escape` press\n case 27:\n self.scope.$apply(function() {\n self.scope.$form.$cancel();\n });\n break;\n }\n });\n },\n });\n return dir;\n },\n]);\n","import angular from 'angular';\n\nangular.module('cxRegistrations').directive('cxPriceOptions', [\n '$filter',\n function($filter) {\n return {\n restrict: 'E',\n template:\n '
    ' +\n '' +\n '
      ' +\n '
      ',\n replace: true,\n scope: {\n options: '=',\n data: '=',\n disabled: '=?ngDisabled',\n visible: '=',\n id: '@',\n },\n controller: [\n '$scope',\n function($scope) {\n $scope.select = function(item) {\n $scope.data = item;\n $scope.isOpen = false;\n };\n\n $scope.isVisible = function() {\n if ($scope.disabled || !$scope.options) return false;\n if (!!$scope.data) {\n if ($scope.options) {\n //Show if there is only 1 price and it doesn't match the current price\n if (\n $scope.options.length === 1 &&\n ($scope.data.id !== $scope.options[0].id ||\n $scope.data.amount !== $scope.options[0].amount)\n ) {\n return true;\n }\n\n //Show if there are more than 1 price options\n if ($scope.options.length > 1) return true;\n }\n } else {\n //Show if there is no current price and there are price options\n return $scope.options && $scope.options.length > 0;\n }\n return false;\n };\n\n $scope.toggleDropdown = function($event) {\n $event.preventDefault();\n $event.stopPropagation();\n $scope.isOpen = !$scope.isOpen;\n };\n\n $scope.showWarning = function() {\n if (!$scope.options || !$scope.options.length) return false;\n if (!$scope.data || !$scope.data.id) return true;\n return false;\n };\n\n $scope.$watch($scope.isVisible, function(newValue) {\n $scope.visible = newValue;\n });\n },\n ],\n };\n },\n]);\n","import angular from 'angular';\nimport { Registration } from '../model/registration';\nimport { dynamicSortMultiple } from '@/shared/utils/dynamicSort';\nimport moment from 'moment';\nimport { emptyInteractionDescription } from '@/shared/components/registration/resourceApi';\n\nangular.module('cxRegistrations').directive('cxRegistrationInput', [\n function() {\n return {\n restrict: 'E',\n replace: true,\n template:\n \"
      \",\n scope: {\n registration: '=reg',\n resources: '=?',\n disabled: '=?',\n settings: '=?',\n },\n bindToController: true,\n controllerAs: 'vm',\n controller: [\n '$scope',\n 'resourceFactorySvc',\n 'flySvc',\n 'dialogsSvc',\n '$rootScope',\n 'checkSecurity',\n 'priceService',\n 'resourceNameFilter',\n '$q',\n 'appUrls',\n '$http',\n 'registrationService',\n function(\n $scope,\n resourceFactorySvc,\n flySvc,\n dialogsSvc,\n $rootScope,\n checkSecurity,\n priceService,\n resourceNameFilter,\n $q,\n appUrls,\n $http,\n registrationService,\n ) {\n var vm = this;\n vm.resources = [];\n vm.durationInDays = 0;\n vm.isAfternoon = false;\n vm.absenceCounter = null;\n vm.maxDays = 200;\n var showError = function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n return '';\n };\n\n vm.ckeditorOptions = {\n autoGrow_minHeight: 50,\n height: 50,\n };\n\n vm.options = angular.extend(\n {\n hideFromUntil: false,\n hideDuration: false,\n hidePriceDiscount: false,\n hideBillable: false,\n hideQuantity: false,\n hideRemarks: false,\n hideDate: false,\n hideInteractions: !checkSecurity('InteractionsOwn:r'),\n },\n vm.settings,\n );\n\n var translateResources = function() {\n vm.resources = vm.resources\n .map(item => ({ ...item, name: resourceNameFilter(item), code: item.code || '' }))\n .sort(dynamicSortMultiple('code', 'name'));\n };\n\n var deregistration = $rootScope.$on('$translateChangeSuccess', translateResources);\n $scope.$on('$destroy', deregistration);\n\n vm.loadResources = function() {\n if (\n !vm.registration ||\n typeof vm.registration.type === 'undefined' ||\n vm.registration.type === null\n )\n return null;\n if (\n vm.resources != null &&\n vm.resources.length &&\n vm.resources[0].type === vm.registration.type\n )\n return null;\n return resourceFactorySvc.get('resource').reg(\n {\n type: vm.registration.type,\n },\n function(data) {\n vm.resources = data;\n translateResources();\n },\n showError,\n ).$promise;\n };\n var resourceSelected = function(retrieveOnly) {\n vm.registration.priceOptions = null;\n if (\n vm.registration.hasResource &&\n (vm.registration.resource.type === 3 || vm.registration.resource.type === 4)\n ) {\n if (!retrieveOnly) {\n vm.registration.quantity = 0.0;\n vm.registration.price = null;\n vm.registration.amount = 0.0;\n vm.registration.discountPercentage = 0.0;\n vm.registration.isBillable = false;\n vm.registration.inForfait = null;\n vm.registration.isFixedPrice = false;\n if (vm.registration.resource.useCounter) {\n vm.durationInDays = 1;\n vm.durationInDaysChanged(false);\n }\n vm.retrieveAbsenceCounter();\n }\n } else if (vm.registration.hasResource && !vm.registration.resource.isOther) {\n // Only load price options when user has permissions\n if (checkSecurity('Pricelist:r')) {\n priceService\n .getPrice({\n category: vm.registration.resource.categoryId,\n invoiceStream:\n vm.registration.invoiceStreamId || vm.registration.relation.invoiceStreamId,\n user: vm.registration.userId,\n })\n .then(function(price) {\n if (price) {\n vm.registration.priceOptions = [price];\n if (!retrieveOnly && !vm.registration.price) {\n vm.registration.price = price;\n }\n if (!vm.registration.group) {\n vm.registration.price = price;\n }\n }\n });\n if (!retrieveOnly || vm.registration.inForfait === null) {\n priceService\n .isResourceInForfait({\n resource: vm.registration.resource.id,\n invoiceStream:\n vm.registration.invoiceStreamId || vm.registration.relation.invoiceStreamId,\n })\n .then(function(inForfait) {\n vm.registration.inForfait = inForfait;\n });\n }\n }\n if (!retrieveOnly) {\n if (\n (vm.registration.resource.type === 1 || vm.registration.resource.type === 2) &&\n vm.registration.quantity === 0\n )\n vm.registration.quantity = 1;\n vm.registration.vatPercentage = vm.registration.resource.vatPercentage;\n vm.registration.vatType = vm.registration.resource.vatType;\n vm.registration.isBillable = vm.registration.resource.isBillable;\n vm.registration.isFixedPrice = registration.resource.isFixedPrice;\n //if (vm.registration.type === 0 && vm.registration.durationMinutes === 0) vm.registration.durationMinute = 15; TFS 10935\n }\n } else if (!retrieveOnly) {\n vm.registration.quantity = 0.0;\n vm.registration.price = null;\n vm.registration.amount = 0.0;\n vm.registration.discountPercentage = 0.0;\n vm.registration.isBillable = true;\n vm.registration.isFixedPrice = false;\n }\n };\n\n vm.selectResource = function() {\n vm.registration.price = null;\n resourceSelected();\n };\n\n vm.calcDistance = function() {\n if (!vm.registration || vm.registration.type !== 2 || !vm.registration.relation.id)\n return;\n dialogsSvc\n .showDistanceDialog(vm.registration.relation.id, vm.registration.relation.companyId)\n .then(function(result) {\n if (result) {\n if (result.distance) vm.registration.quantity = result.distance;\n /*if (result.description) {\n $scope.editReg.remark = ($scope.editReg.remark ? $scope.editReg.remark + '\\n' : '') + result.description;\n }*/\n }\n });\n };\n\n var getTemplateType = function(type) {\n if (typeof type === 'undefined' || type === null) return 'Time';\n switch (type) {\n case 0:\n return 'Time';\n case 1:\n return 'Cost';\n case 2:\n return 'Travel';\n case 3:\n return 'Absence';\n case 4:\n return 'Recuperation';\n default:\n return '';\n }\n };\n vm.dateChanged = function() {\n console.log(vm.registration.durationDays);\n if (\n !vm.registration.group &&\n (vm.registration.type === 0 ||\n vm.registration.type === 3 ||\n vm.registration.type === 4)\n ) {\n // New registration\n if (!vm.registration.date) return;\n\n registrationService\n .getNextRegistrationTime(moment.utc(vm.registration.date).toDate())\n .then(function(data) {\n if (data)\n vm.registration.initTime(\n data.Hour,\n data.Minute,\n vm.registration.durationMinutes,\n );\n });\n vm.calculateDurationInDays();\n }\n };\n vm.durationInDaysChanged = function(calculateDurationInDays) {\n if (vm.durationInDays === 1) {\n vm.registration.durationDays = 1;\n if (calculateDurationInDays) vm.calculateDurationInDays();\n } else if (vm.durationInDays === 2) {\n vm.registration.durationDays = 0.5;\n vm.registration.isAfternoon = false;\n if (calculateDurationInDays) vm.calculateDurationInDays();\n } else {\n vm.registration.durationDays = 0;\n vm.durationDaysInfo = null;\n vm.durationDaysEndDate = null;\n }\n };\n\n vm.calcDurationInDaysRequest = null;\n vm.calculateDurationInDays = function() {\n if (vm.calcDurationInDaysRequest && vm.calcDurationInDaysRequest.$cancelRequest) {\n vm.calcDurationInDaysRequest.$cancelRequest();\n vm.calcDurationInDaysRequest = null;\n }\n if (!vm.durationInDays > 0) return;\n if (!vm.registration.durationDays) {\n vm.durationDaysInfo = null;\n vm.durationDaysEndDate = null;\n return;\n }\n\n vm.calcDurationInDaysRequest = resourceFactorySvc\n .get('registration')\n .calcDurationInDays(\n {\n userId: vm.registration.userId,\n date: vm.registration.date,\n durationDays: vm.registration.durationDays,\n isAfternoon: vm.registration.isAfternoon,\n },\n function(data) {\n vm.durationDaysInfo = data;\n if (data.length > 0) {\n vm.durationDaysEndDate = data.slice(-1)[0].date;\n } else {\n vm.durationDaysEndDate = null;\n }\n },\n function(error) {\n flySvc.error(error);\n },\n );\n };\n\n vm.setInteractionType = function(interactionType) {\n if (vm.registration.interactionType === interactionType) {\n vm.registration.interactionType = null;\n } else {\n vm.registration.interactionType = interactionType;\n }\n };\n vm.retrieveAbsenceCounter = function() {\n vm.absenceCounter = null;\n vm.maxDays = 200;\n if (!vm.registration.resource?.useCounter) return;\n const { resource, date, userId } = vm.registration;\n\n var deferred = $q.defer();\n $http\n .get(`${appUrls.api}/api/AbsenceCounter/Balance`, {\n params: { resourceId: resource.id, date, userId: userId },\n timeout: deferred.promise,\n cancel: deferred,\n })\n .then(({ data }) => {\n //Check if counter was initialised\n if (\n typeof data.balance === 'undefined' ||\n data.balance === null ||\n data.hoursInDays <= 0\n )\n return;\n\n vm.absenceCounter = {\n ...data,\n balanceDays: data.balance / data.hoursInDay,\n };\n\n vm.maxDays = Math.max(0, vm.absenceCounter.balanceDays);\n }, showError);\n return deferred.promise;\n };\n\n vm.maxDuration = function() {\n if (!vm.absenceCounter) return 1439 - vm.registration.fromMinutes;\n return Math.max(\n 0,\n Math.min(1439 - vm.registration.fromMinutes, vm.absenceCounter.balance * 60),\n );\n };\n\n $scope.$watch(\n function() {\n return vm.registration;\n },\n function(newValue) {\n if (typeof newValue === 'undefined') return;\n if (!(vm.registration instanceof Registration)) {\n vm.registration = new Registration(vm.registration);\n retrieveInteraction();\n } else {\n retrieveInteraction();\n }\n\n vm.templateType = getTemplateType(vm.registration.type);\n $q.when(vm.loadResources()).then(function() {\n if (vm.registration) {\n resourceSelected(!!vm.registration.id);\n }\n });\n },\n );\n vm.interactionChanged = function() {\n const hasValue =\n !!vm.registration.interactionTitle ||\n vm.registration.interactionDescription !== emptyInteractionDescription;\n if (hasValue && vm.registration.interactionType === null) {\n vm.setInteractionType(0);\n } else if (!hasValue && vm.registration.interactionType !== null) {\n setInteractionType(null);\n }\n };\n\n var retrieveInteraction = function() {\n if (!vm.registration || !vm.registration.group || vm.registration.type !== 0) return;\n $http\n .get(appUrls.interactions + '/api/interactions/object/1/' + vm.registration.group)\n .then(\n function({ data }) {\n if (data && data.length) {\n const interaction = data[0];\n vm.registration.interactionType = interaction.interactionType;\n vm.registration.interactionDescription = interaction.description;\n vm.registration.interactionId = interaction.id;\n vm.registration.interactionTitle = interaction.title;\n vm.registration.originalInteraction = interaction;\n }\n },\n function(error) {\n console.error(error);\n },\n );\n };\n },\n ],\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cxRegistrations').directive('cxTaskTypeahead', [\n '$parse',\n function($parse) {\n return {\n restrict: 'E',\n replace: true,\n template: `
      \n
      \n \n \n \n \n
      \n \n \n
      `,\n require: 'ngModel',\n scope: {\n orgOptions: '=options',\n disabled: '=?ngDisabled',\n placeholder: '@?',\n iClass: '@?',\n },\n link: function(scope, el, attrs, ngModel) {\n if (!ngModel) return;\n scope.limit = attrs.limit || 9999;\n\n scope.view2model = function(value) {\n ngModel.$setViewValue(value);\n };\n\n function findSelected(value) {\n return value == null || !scope.options.length\n ? null\n : scope.options.find(function(el) {\n //Match by id\n if (\n typeof el === 'object' &&\n typeof value === 'object' &&\n typeof el.id === 'string' &&\n typeof value.id === 'string'\n )\n return angular.equals(el.id, value.id);\n return angular.equals(el, value);\n });\n }\n\n // when angular detects a change to the model,\n // we update our inner value\n ngModel.$render = function() {\n scope.value = ngModel.$viewValue;\n scope.selected = findSelected(scope.value) || scope.value;\n };\n\n var getLabel = function(item) {\n if (!item) return null;\n return item.label;\n };\n\n scope.onSelect = function(i, event) {\n scope.selected = i;\n scope.value = i;\n scope.view2model(scope.value);\n };\n\n function mapOptions() {\n scope.options =\n !scope.orgOptions || !angular.isArray(scope.orgOptions) ? [] : [...scope.orgOptions];\n scope.selected = findSelected(scope.value) || scope.value;\n }\n mapOptions();\n scope.$watchCollection('orgOptions', function(newValue, oldValue) {\n mapOptions();\n if (scope.autoSelect == 'true' && scope.options.length === 1 && !scope.selected)\n scope.onSelect(scope.options[0]);\n });\n\n //Clear textbox if value is not in option list\n scope.onBlur = function() {\n if (scope.selected == null) return;\n if (typeof scope.selected === 'string') {\n scope.onSelect(null);\n return;\n }\n if (scope.options.indexOf(scope.selected) < 0) scope.onSelect(null);\n };\n },\n };\n },\n]);\n","import angular from 'angular';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport { sanitize } from '@/shared/utils/htmlHelpers';\n\nangular.module('cxRegistrations').component('cxResourceCrmType', {\n bindings: {\n resource: '<',\n onChange: '&',\n disabled: '<',\n },\n controller: [\n 'translateListFilter',\n function(translateListFilter) {\n const ctrl = this;\n\n ctrl.editMode = false;\n ctrl.toggleMode = () => {\n if (ctrl.disabled) return;\n ctrl.editMode = !ctrl.editMode;\n };\n ctrl.setDisplayValue = () => {\n ctrl.displayValue = ctrl.options\n .filter(x => x.checked)\n .map(x => translateListFilter(x.key, 'crmtype'))\n .join(', ');\n };\n\n ctrl.$onChanges = function() {\n const {\n crmOthers = false,\n crmProspects = false,\n crmCustomers = false,\n crmOwnCompanies = false,\n } = ctrl.resource ?? {};\n ctrl.options = [\n { key: 3, checked: crmCustomers },\n { key: 4, checked: crmOwnCompanies },\n { key: 2, checked: crmProspects },\n { key: 0, checked: crmOthers },\n ];\n ctrl.setDisplayValue();\n };\n ctrl.toggleChecked = (option, e) => {\n e.stopPropagation();\n option.checked = !option.checked;\n ctrl.setDisplayValue();\n };\n ctrl.handleMenuToggle = open => {\n if (!open) {\n const data = {\n crmOthers: false,\n crmProspects: false,\n crmCustomers: false,\n crmOwnCompanies: false,\n };\n const allChecked = !ctrl.options.some(x => !x.checked);\n if (allChecked) {\n ctrl.options.forEach(e => (e.checked = false));\n ctrl.setDisplayValue();\n } else {\n ctrl.options.forEach(e => {\n switch (e.key) {\n case 0:\n data.crmOthers = e.checked;\n break;\n case 2:\n data.crmProspects = e.checked;\n break;\n case 3:\n data.crmCustomers = e.checked;\n break;\n case 4:\n data.crmOwnCompanies = e.checked;\n break;\n }\n });\n }\n ctrl.onChange({ $data: data });\n }\n };\n },\n ],\n template: `\n \n \n \n \n \n `,\n});\n","import angular from 'angular';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport { sanitize } from '@/shared/utils/htmlHelpers';\n\nangular.module('cxRegistrations').directive('cxResourceTypeahead', [\n '$parse',\n 'resourceNameFilter',\n function($parse, resourceNameFilter) {\n return {\n restrict: 'E',\n replace: true,\n template: `
      \n
      \n \n \n \n \n
      \n \n \n
      `,\n require: 'ngModel',\n scope: {\n orgOptions: '=options',\n disabled: '=?ngDisabled',\n placeholder: '@?',\n iClass: '@?',\n crmType: '=?',\n assignmentTemplateId: '=?',\n autoSelect: '@?',\n },\n link: function(scope, el, attrs, ngModel) {\n if (!ngModel) return;\n scope.limit = attrs.limit || 9999;\n\n scope.view2model = function(value) {\n ngModel.$setViewValue(value);\n };\n\n function findSelected(value) {\n return value == null || !scope.options.length\n ? null\n : scope.options.find(function(el) {\n //Match by id\n if (\n typeof el === 'object' &&\n typeof value === 'object' &&\n typeof el.id === 'string' &&\n typeof value.id === 'string'\n )\n return angular.equals(el.id, value.id);\n return angular.equals(el, value);\n });\n }\n\n // when angular detects a change to the model,\n // we update our inner value\n ngModel.$render = function() {\n scope.value = ngModel.$viewValue;\n scope.selected = findSelected(scope.value) || scope.value;\n };\n\n var getLabel = function(item) {\n if (!item) return null;\n return item.label;\n };\n\n scope.onSelect = function(i, event) {\n scope.selected = i;\n scope.value = i;\n scope.view2model(scope.value);\n };\n scope.crmTypeFilter = function(e) {\n if (typeof scope.crmType === 'undefined' || scope.crmType === null) return true;\n if (scope.selected === e) return true; //Allow if set externally (tasks, existing reg)\n //Crm type enabled\n if (scope.crmType === 0 && e.crmOthers) return true;\n if (scope.crmType === 2 && e.crmProspects) return true;\n if (scope.crmType === 3 && e.crmCustomers) return true;\n if (scope.crmType === 4 && e.crmOwnCompanies) return true;\n //None selected = All selected\n return !e.crmOthers && !e.crmProspects && !e.crmCustomers && !e.crmOwnCompanies;\n };\n function mapOptions() {\n if (!scope.orgOptions || !angular.isArray(scope.orgOptions)) {\n scope.options = [];\n } else {\n scope.options = scope.orgOptions\n .filter(x => x.isDefault && x.categoryId)\n .reduce((array, category) => {\n const categoryLabel = resourceNameFilter(category, false, false);\n const subResources = scope.orgOptions\n .filter(x => !x.isDefault && x.categoryId && x.categoryId === category.categoryId)\n .map(resource => {\n const label = resourceNameFilter(resource, false, true);\n return {\n ...resource,\n label: label,\n categoryLabel,\n search: `${categoryLabel};${label}`,\n level: 1,\n };\n });\n //const subResourcesLabels = subResources.map(x => x.label).join(';');\n return array.concat([\n {\n ...category,\n label: categoryLabel,\n categoryLabel,\n search: categoryLabel,\n level: 0,\n },\n ...subResources,\n ]);\n }, [])\n .sort(dynamicSort('categoryLabel', 'isDefault', 'label'));\n }\n scope.selected = findSelected(scope.value) || scope.value;\n }\n mapOptions();\n scope.$watchCollection('orgOptions', function(newValue, oldValue) {\n mapOptions();\n if (scope.autoSelect == 'true' && scope.options.length === 1 && !scope.selected)\n scope.onSelect(scope.options[0]);\n });\n\n //Clear textbox if value is not in option list\n scope.onBlur = function() {\n if (scope.selected == null) return;\n if (typeof scope.selected === 'string') {\n scope.onSelect(null);\n return;\n }\n if (scope.options.indexOf(scope.selected) < 0) scope.onSelect(null);\n };\n },\n };\n },\n]);\n","import angular from 'angular';\nimport TimerRegistrationService from '@/shared/services/TimerRegistrationService';\nimport RecentRelationsService from '@/shared/services/RecentRelationsService';\nimport eventBus from 'pubsub-js';\n\nangular.module('cxRegistrations').directive('timerRegistrationButton', [\n function() {\n return {\n restrict: 'E',\n template: `\n

      \n \n \n \n \n \n \n \n \n \n \n \n

      `,\n\n replace: true,\n controllerAs: 'tmr',\n controller: [\n '$scope',\n '$timeout',\n 'flySvc',\n '$filter',\n 'regDialogsSvc',\n 'recentRelationsSvc',\n 'checkSecurity',\n timerButtonCtrl,\n ],\n };\n },\n]);\n\nconst timerButtonCtrl = function(\n $scope,\n $timeout,\n flySvc,\n $filter,\n regDialogsSvc,\n recentRelationsSvc,\n checkSecurity,\n) {\n const tmr = this;\n tmr.isRunning = false;\n tmr.registration = null;\n tmr.showModal = false;\n tmr.showPopover = false;\n\n tmr.refreshRunningRegistration = () => {\n $timeout(() => {\n tmr.registration = TimerRegistrationService.getRunningRegistration();\n tmr.isRunning = TimerRegistrationService.isRunning();\n tmr.isPaused = TimerRegistrationService.isPaused();\n }, 100);\n };\n const subscription = eventBus.subscribe(\n 'timerRegistrationChanged',\n tmr.refreshRunningRegistration,\n );\n $scope.$on('$destroy', function() {\n if (subscription) eventBus.unsubscribe(subscription);\n });\n const handleError = (error, rejectFunc = undefined) => {\n $timeout(() => {\n if (error?.response?.data) {\n flySvc.error(error.response.data);\n } else {\n flySvc.error(error);\n }\n\n if (typeof rejectFunc === 'function') rejectFunc();\n }, 0);\n };\n tmr.start = () => {\n if (!checkSecurity('RegistrationOwn:c')) {\n return;\n }\n tmr.registration = null;\n tmr.showPopover = false;\n tmr.showModal = true;\n };\n tmr.restart = () => {\n if (!checkSecurity('RegistrationOwn:c')) {\n return;\n }\n if (!tmr.isPaused) return tmr.start();\n TimerRegistrationService.restartTimerRegistration().then(reg => {\n $timeout(() => {\n if (reg) {\n tmr.registration = reg;\n }\n tmr.showModal = false;\n }, 0);\n }, handleError);\n };\n\n tmr.stop = (pause = false) => {\n TimerRegistrationService.stopTimerRegistration(pause).then(result => {\n $timeout(() => {\n const { registration, discarded } = result;\n tmr.showPopover = false;\n tmr.registration = null;\n if (discarded) {\n flySvc.proposal('msgTaskTimeRegistrationDiscarded');\n return;\n }\n if (!registration) return;\n\n var duration = $filter('time')(registration.durationMinutes);\n\n flySvc.action(\n 'Registration created', //title\n 'msgTaskTimeRegistrationCreated', //content\n function() {\n //action\n regDialogsSvc.editRegistration(registration, {}).then(function(result) {\n flySvc.success('Registration modified');\n });\n },\n 'Edit registration', //Action label\n null, //action param\n {\n duration: duration,\n relation: registration.relation.name,\n }, //title param\n 'success',\n ); //display method\n }, 0);\n }, handleError);\n };\n\n tmr.createRegistration = value => {\n if (!checkSecurity('RegistrationOwn:c')) {\n return;\n }\n return new Promise((resolve, reject) => {\n $timeout(() => {\n if (!value) {\n resolve();\n tmr.showModal = false;\n return;\n }\n TimerRegistrationService.createTimerRegistration(value).then(\n reg => {\n $timeout(() => {\n if (reg) {\n tmr.registration = reg;\n }\n resolve();\n tmr.showModal = false;\n }, 0);\n },\n error => {\n handleError(error, reject);\n },\n );\n }, 0);\n });\n };\n tmr.closeModal = () => {\n $timeout(() => {\n tmr.showModal = false;\n }, 0);\n };\n\n tmr.refreshRunningRegistration();\n if (!RecentRelationsService.get()) recentRelationsSvc.reloadRecentRelations();\n};\n","import angular from 'angular';\n\nangular.module('cxRegistrations').directive('cxTypeaheadCarla', function() {\n return {\n restrict: 'E',\n replace: true,\n template: `
      \n
      \n \n \n \n \n
      \n
        \n
      • \n \n \n
      • \n
      \n
      `,\n require: 'ngModel',\n scope: {\n registration: '=ngModel',\n options: '=',\n disabled: '=ngDisabled',\n onChanged: '&',\n id: '@',\n },\n controller: [\n '$scope',\n 'translateListFilter',\n function($scope, translateListFilter) {\n $scope.onSelect = function(item) {\n $scope.registration.resource = item;\n $scope.registration.resourceDescription = '';\n $scope.value = item.name;\n $scope.onChanged();\n };\n\n $scope.onChange = function() {\n $scope.registration.resourceDescription = $scope.value;\n if (!$scope.registration.resource || !$scope.registration.resource.isOther) {\n $scope.registration.resource = {\n isOther: true,\n };\n $scope.registration.price = null;\n $scope.registration.priceOptions = null;\n }\n };\n\n $scope.search = function(searchValue) {\n if (!searchValue) return null;\n return function(resource) {\n if (resource.code && resource.code.indexOf(searchValue) === 0) return true;\n if (\n resource.name &&\n resource.name.toLowerCase().indexOf(searchValue.toLowerCase()) >= 0\n )\n return true;\n if (\n resource.categoryName &&\n resource.categoryName.toLowerCase().indexOf(searchValue.toLowerCase()) >= 0\n )\n return true;\n return false;\n };\n };\n\n $scope.onBlur = function() {\n if (\n $scope.registration.resource != $scope.value &&\n $scope.options.indexOf($scope.value) >= 0\n ) {\n $scope.registration.resource = $scope.value;\n $scope.registration.resourceDescription = '';\n $scope.value = $scope.value.name;\n $scope.onChanged();\n }\n };\n\n $scope.$watch('registration', function(newValue, oldValue) {\n $scope.value =\n $scope.registration.resource && !$scope.registration.resource.isOther\n ? translateListFilter(\n $scope.registration.resource.id,\n 'resource',\n $scope.registration.resource.name,\n )\n : $scope.registration.resourceDescription;\n });\n\n $scope.$watch('registration.resource', function(newValue, oldValue) {\n if (newValue == null) {\n $scope.value = '';\n } else if (newValue && newValue.id && newValue.name !== $scope.value) {\n $scope.value = translateListFilter(newValue.id, 'resource', newValue.name);\n }\n });\n },\n ],\n };\n});\n","import angular from 'angular';\nimport { dynamicSortMultiple } from '@/shared/utils/dynamicSort';\nimport adminpulse from '@/shared/utils/adminpulse';\nimport SignalRService from '@/shared/services/SignalRService';\n\nangular\n .module('cxRegistrations')\n .controller('PriceListCtrl', [\n '$rootScope',\n '$scope',\n 'dataCache',\n 'resourceFactorySvc',\n 'registrationService',\n 'flySvc',\n '$filter',\n 'dialogsSvc',\n 'regDialogsSvc',\n '$http',\n 'appUrls',\n '$translate',\n 'FileSaver',\n 'checkSecurity',\n priceListCtrl,\n ]);\n\nfunction priceListCtrl(\n $rootScope,\n $scope,\n dataCache,\n resourceFactorySvc,\n registrationService,\n flySvc,\n $filter,\n dialogsSvc,\n regDialogsSvc,\n $http,\n appUrls,\n $translate,\n FileSaver,\n checkSecurity,\n) {\n var vm = this;\n var regResource = resourceFactorySvc.get('resource');\n vm.registrationService = registrationService;\n vm.showHistory = false;\n vm.creatingReport = false;\n\n var showError = function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n return '';\n };\n vm.hasPermission = (resourceType, privilege) => {\n const functionality =\n resourceType === 3 || resourceType === 4 ? 'AbsenceAndCounters' : 'Pricelist';\n return checkSecurity(functionality + ':' + privilege);\n };\n\n vm.openTranslateDialog = function(item, type) {\n if (!item || item.isRemoved) return;\n dialogsSvc\n .translateListItem(type, item.id, item.name, { maxlength: 255 })\n .then(function(result) {\n if (result) {\n if (result.defaultValue) {\n if (type === 'resource') vm.saveResource(item, 'name', result.defaultValue);\n if (type === 'resourcecategory') vm.saveCategory(item, 'name', result.defaultValue);\n }\n if (\n type === 'resourcecategory' &&\n result.changes &&\n result.changes.length &&\n item.resource\n ) {\n var key = `resource_${item.resource.id}`;\n var changes = result.changes.map(x => ({ ...x, key: key }));\n $http.put(appUrls.api + '/api/translation/lists/0', changes);\n }\n\n // No need to update the translations in the resource.\n // The reload of the translations triggers the $translateChangeSuccess event\n }\n });\n };\n\n //#region Retrieve\n vm.retrieveResources = function(params) {\n console.trace(params)\n params.includeRemoved = !!vm.showHistory;\n params.type = -1; // show all resources\n console.log(params)\n return $http.get(`${appUrls.api}/api/resource/list`, { params }).then(function({ data }) {\n return data;\n });\n };\n var translateResource = resource => {\n return {\n ...resource,\n translatedName: $filter('translateList')(resource.id, 'resource', resource.name),\n };\n };\n var retrieveDetails = function(category) {\n if (category.loadingDetails) return;\n\n category.loadingDetails = true;\n return regResource.subresources(\n {\n id: category.id,\n showHistory: !!vm.showHistory,\n },\n function(data) {\n if (data) {\n category.resources = data.map(translateResource);\n category.showDetails = true;\n }\n\n category.loadingDetails = false;\n },\n function(error) {\n showError(error);\n category.loadingDetails = false;\n },\n ).$promise;\n };\n vm.toggleDetails = function(category) {\n if (category.isRemoved) return;\n if (category.type === 1 || category.type === 2 || category.type === 4) return; //Cost, travel & recup\n if (!category.showDetails && !category.resources) {\n retrieveDetails(category);\n } else {\n category.showDetails = !category.showDetails;\n }\n };\n vm.toggleResourceHistory = function() {\n vm.showHistory = !vm.showHistory;\n vm.resources.reload();\n };\n //#endregion\n\n //#region Category actions\n\n vm.addCategory = function() {\n regDialogsSvc.newCategory().then(function(data) {\n if (vm.resources && vm.resources.rows) vm.resources.rows.push(data);\n flySvc.success('msgNewItemSaved');\n });\n };\n\n vm.showDeleteCategoryDialog = function(category) {\n return regDialogsSvc.deleteResourceCategory(category).then(function(result) {\n if (!result) return;\n if (vm.showHistory && !result.isRemoved) {\n category.isRemoved = true;\n category.showDetails = false;\n return;\n }\n if (vm.resources && vm.resources.rows) {\n var idx = vm.resources.rows.findIndex(x => x.id === category.id);\n if (idx >= 0) vm.resources.rows.splice(idx, 1);\n }\n });\n };\n\n vm.deleteCategory = function(category) {\n if (category.deleting) return;\n category.deleting = true;\n if (!category.resources && category.type !== 1 && category.type !== 2 && category.type !== 4) {\n //Make sure sub resources are loaded\n retrieveDetails(category)\n .then(function() {\n return vm.showDeleteCategoryDialog(category);\n })\n .finally(() => {\n category.deleting = false;\n });\n } else {\n vm.showDeleteCategoryDialog(category).finally(() => {\n category.deleting = false;\n });\n }\n };\n vm.restoreCategory = function(category) {\n regResource.restoreCategory(\n {\n id: category.id,\n },\n function(data) {\n angular.extend(category, data, {\n loadingDetails: false,\n showDetails: false,\n resources: null,\n });\n },\n showError,\n );\n };\n\n vm.saveCategory = function(category, field, value) {\n if (!category || !field) return '';\n if (category[field] === value) return false;\n var model = angular.copy(category);\n model[field] = value;\n\n return regResource.updateCategory(model).$promise.then(function() {\n category[field] = value;\n flySvc.success('msgConfirmChange');\n return true;\n }, showError);\n };\n\n vm.updatePrice = function(category, value) {\n if (category.price === value) return false;\n return regResource\n .updatePrice({ id: category.id, price: value }, null)\n .$promise.then(function() {\n flySvc.success('msgConfirmChange');\n return true;\n }, showError);\n };\n vm.updateVatRate = function(category, vatRate, vatType) {\n if (category.vatPercentage === vatRate && category.vatType === vatType) return false;\n var model = angular.copy(category);\n model.vatPercentage = vatRate;\n model.vatType = vatType;\n\n return regResource.updateCategory(model).$promise.then(function(data) {\n angular.extend(category, data);\n flySvc.success('msgConfirmChange');\n return true;\n }, showError);\n };\n\n //#endregion\n\n //#region Resource actions\n vm.addResource = function(category) {\n regDialogsSvc.newSubResource(category).then(function(data) {\n flySvc.success('msgNewItemSaved');\n\n if (!category.resources) category.resources = [];\n category.resources.push(translateResource(data));\n });\n };\n\n vm.restoreResource = function(resource) {\n regResource.restoreResource(\n {\n id: resource.id,\n },\n function() {\n resource.isRemoved = false;\n },\n showError,\n );\n };\n\n vm.saveResource = function(resource, field, value) {\n if (!resource || !field) return '';\n if (resource[field] === value) return false;\n\n var model = angular.copy(resource);\n model[field] = value;\n\n if (field === 'inForfait') {\n return dialogsSvc\n .showYesNoCancel(\n 'msgConfirmPropogateChangesTitle',\n 'msgConfirmPropogateResourceForfaitChanges',\n )\n .then(\n function(result) {\n if (result === null) return false; // Cancel changes\n\n // This field is interpreted on the backend (but never used in the frontend)\n model.updateForfaitStatus = !!result;\n\n return regResource.updateResource(model).$promise.then(function() {\n resource[field] = value;\n flySvc.success('msgConfirmChange');\n return true;\n }, showError);\n },\n function() {\n // We get here on dialog box cancellation. We want to return true\n // otherwise the checkbox remains disabled\n return false;\n },\n );\n } else {\n return regResource.updateResource(model).$promise.then(function() {\n resource[field] = value;\n flySvc.success('msgConfirmChange');\n return true;\n }, showError);\n }\n };\n\n vm.updateCrmType = function(resource, data) {\n var model = { ...angular.copy(resource), ...(data || {}) };\n if (angular.equals(model, resource)) return false;\n return regResource.updateResource(model).$promise.then(function() {\n angular.extend(resource, data);\n flySvc.success('msgConfirmChange');\n return true;\n }, showError);\n };\n\n vm.deleteResource = function(category, resource) {\n return regDialogsSvc.deleteResource(category, resource).then(function(result) {\n if (!result) return;\n if (vm.showHistory && !result.isRemoved) {\n resource.isRemoved = true;\n return;\n }\n\n var idx = category.resources.findIndex(x => x.id === resource.id);\n if (idx >= 0) category.resources.splice(idx, 1);\n });\n };\n\n vm.updateInternalPrice = function(category, internalPrice) {\n if (category.internalPrice === internalPrice) return false;\n\n return dialogsSvc.updateInternalPrice(internalPrice).then(\n function(result) {\n if (!result) return false;\n result.categoryId = category.id;\n\n $http.put(appUrls.api + '/api/resource/updateInternalPrice', result).then(\n function(result) {\n flySvc.success();\n return true;\n },\n function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n return '';\n },\n );\n },\n function(error) {\n return false;\n },\n );\n };\n\n vm.updateUseCounter = function(resource, data) {\n if (!resource) return false;\n if (resource.useCounter === data) return false;\n if (!!data) return vm.saveResource(resource, 'useCounter', data); //Turn on without confirmation\n\n return dialogsSvc.showYesNo('comfirmTitle', 'msgConfirmTurnOffAbsenceCounter').then(\n () => {\n return vm.saveResource(resource, 'useCounter', data);\n },\n () => false,\n );\n };\n vm.createReport = () => {\n vm.creatingReport = true;\n const filters = {\n ...vm.resources.currentParams(),\n culture: $translate.use(),\n connectionId: SignalRService.getConnectionId(),\n includeRemoved: !!vm.showHistory,\n type: -1, // show all resources\n };\n\n return $http.get(`${appUrls.api}/api/Resource/Report`, { params: filters }).then(\n function() {\n vm.creatingReport = false;\n\n flySvc.success('ExportToExcelStarted');\n },\n function(error) {\n vm.creatingReport = false;\n showError(error);\n },\n );\n };\n\n var deregistration = $rootScope.$on('$translateChangeSuccess', function() {\n // Redo subresource translations when the language changes\n // This code is also executed after translating a resource. The reload triggers this event.\n if (!vm.resources || !vm.resources.rows) return;\n vm.resources.rows.forEach(category => {\n if (category.resources && category.resources.length) {\n category.resources = category.resources.map(translateResource);\n }\n });\n });\n $scope.$on('$destroy', deregistration);\n}\n","import angular from 'angular';\nimport { RegistrationGroup } from '../model/registrationGroup';\nimport moment from 'moment';\nimport SignalRService from '@/shared/services/SignalRService';\n\nangular\n .module('cxRegistrations')\n .factory('registrationService', [\n 'resourceFactorySvc',\n '$translate',\n '$http',\n 'appUrls',\n '$q',\n '$http',\n registrationService,\n ]);\n\nfunction registrationService(resourceFactorySvc, $translate, $http, appUrls, $q, http) {\n return {\n retrieveRegistrations: function(params, from, to, user) {\n var fromString = null;\n var params = {\n ...params,\n };\n\n if (typeof from === 'undefined') from = new Date();\n if (from instanceof Date) {\n fromString = moment(from).format('YYYY-MM-DD');\n } else if (typeof from === 'string') {\n fromString = from;\n }\n if (typeof to !== 'undefined' && typeof user !== 'undefined') {\n // registration overview call\n params.from = fromString;\n if (to instanceof Date) {\n params.to = moment(to).format('YYYY-MM-DD');\n } else if (typeof to === 'string') params.to = to;\n params.userId = user;\n } else {\n // registration by date call\n var deferred = $q.defer();\n return $http.get(`${appUrls.api}/api/registration/date/${fromString}`, {\n timeout: deferred.promise,\n cancel: deferred,\n });\n }\n\n var deferred = $q.defer();\n return $http.get(`${appUrls.api}/api/registration`, {\n params,\n timeout: deferred.promise,\n cancel: deferred,\n });\n },\n retrieveKpis: function(params, from, to, user) {\n var fromString = null;\n var params = {\n ...params,\n };\n\n if (typeof from === 'undefined') from = new Date();\n if (from instanceof Date) {\n fromString = moment(from).format('YYYY-MM-DD');\n } else if (typeof from === 'string') fromString = from;\n if (typeof to !== 'undefined' && typeof user !== 'undefined') {\n params.from = fromString;\n if (to instanceof Date) {\n params.to = moment(to).format('YYYY-MM-DD');\n } else if (typeof to === 'string') params.to = to;\n params.userId = user;\n } else params.id = fromString;\n\n return resourceFactorySvc.get('registration').kpi(params);\n },\n\n createGroup: function(registrations, date) {\n var reg = new RegistrationGroup();\n\n for (var j = 0; j < registrations.length; j++) {\n reg.setPart(registrations[j]);\n }\n\n reg.initDate(\n date ||\n moment\n .utc()\n .startOf('day')\n .toDate(),\n );\n reg.setRelation();\n return reg;\n },\n\n getNextRegistrationTime: function(date) {\n var deferred = $q.defer();\n\n $http\n .get(\n `${appUrls.api}/api/registration/LastRegistrationTime?date=${moment(date).format(\n 'YYYY-MM-DD',\n )}`,\n )\n .then(\n function({ data }) {\n if (!data) {\n deferred.resolve({\n Hour: 9,\n Minute: 0,\n });\n }\n\n const momentDate = moment(data, 'HH:mm:ss');\n\n var h = momentDate.hour();\n var m = momentDate.minutes();\n\n deferred.resolve({\n Hour: h,\n Minute: m,\n });\n },\n function(error) {\n console.error(error);\n deferred.resolve({\n Hour: 9,\n Minute: 0,\n });\n },\n );\n return deferred.promise;\n },\n\n createReport: function(params, from, to, user) {\n var fromString = null;\n var params = {\n ...params,\n };\n if (typeof from === 'undefined') from = new Date();\n if (from instanceof Date) fromString = moment.utc(from).format('YYYY-MM-DD');\n else if (typeof from === 'string') fromString = from;\n\n if (typeof to !== 'undefined' && typeof user !== 'undefined') {\n params.from = fromString;\n if (to instanceof Date) params.to = moment.utc(to).format('YYYY-MM-DD');\n else if (typeof to === 'string') params.to = to;\n params.userId = user;\n } else params.id = fromString;\n\n params.languageCode = $translate.use();\n params.connectionId = SignalRService.getConnectionId();\n return resourceFactorySvc.get('registration').report(params);\n },\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cxRegistrations')\n .factory('priceService', ['$http', 'flySvc', 'appUrls', registrationService]);\n\nfunction registrationService($http, flySvc, appUrls) {\n var handleRetrieve = function(response) {\n vm.translations = (response.data || []).filter(function(el) {\n return el.language !== 'de';\n });\n };\n var handleError = function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n return error;\n };\n\n return {\n getPrice: function({ category, invoiceStream, user = null }) {\n return $http\n .get(appUrls.api + '/api/price/', { params: { category, invoiceStream, user } })\n .then(function({ data = null }) {\n return data;\n }, handleError);\n },\n isResourceInForfait: function({ resource, invoiceStream }) {\n return $http\n .get(appUrls.api + '/api/resource/InForfait', { params: { resource, invoiceStream } })\n .then(function({ data = null }) {\n if (data === null || typeof data === 'undefined' || data === '') return null;\n return data;\n }, handleError);\n },\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cxRelations')\n .controller('RelationFileCtrl', ['relBindSvc', '$state', relationFileCtrl]);\n\nfunction relationFileCtrl(relBindSvc, $state) {\n var vm = this;\n vm.relations = relBindSvc.relations;\n vm.current = relBindSvc.active;\n vm.relationId = $state.params.relId || relBindSvc.active.id;\n\n if ($state.params.relId) {\n vm.relationId = $state.params.relId;\n } else if (relBindSvc.active.id) {\n vm.relationId = relBindSvc.active.id;\n }\n\n if (!vm.relationId) {\n $state.go('relations.overview');\n }\n if (\n !vm.relations[vm.relationId] ||\n (!vm.relations[vm.relationId].sections && !vm.relations[vm.relationId].loading) ||\n (!$state.params.fromRelBindSvc && !vm.relations[vm.relationId].loading)\n )\n relBindSvc.open(vm.relationId);\n}\n","import angular from 'angular';\nimport moment from 'moment';\nimport guid from '@/shared/utils/guid';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\n\nconst taskPlanningSection = 'eb7ea273-82f2-4d9a-9bff-abf3b8ae25ac';\n\nangular\n .module('cloudX')\n .controller('AddAssignmentDialogCtrl', [\n '$http',\n 'appUrls',\n 'flySvc',\n '$filter',\n '$q',\n '$element',\n 'dataCache',\n 'relBindSvc',\n 'close',\n 'relation',\n addAssignmentDialogCtrl,\n ]);\n\nfunction addAssignmentDialogCtrl(\n $http,\n appUrls,\n flySvc,\n $filter,\n $q,\n $element,\n dataCache,\n relBindSvc,\n close,\n relation,\n) {\n var vm = this;\n vm.saving = false;\n vm.relation = relation;\n vm.templates = null;\n vm.editName = false;\n vm.taskSchedules = [];\n vm.showScheduleDate = false;\n vm.invoiceStream = null; // Used to store the new invoiceStream after saving, in case something went wrong with saving the task schedules\n vm.templateRequired = !dataCache.getArray('assignmentsWithoutTemplate');\n vm.companies = dataCache.getArray('company').sort(dynamicSort('name'));\n\n vm.assignment = {\n relationId: relation.id,\n name: '',\n startDate: moment\n .utc()\n .startOf('day')\n .toDate(),\n deadline: null,\n templateId: null,\n companyId: null,\n priceGridId: null,\n };\n $q.all([\n $http\n .get(`${appUrls.api}/api/AssignmentTemplate/Get?relationType=${vm.relation.type}`)\n .then(({ data }) => data),\n $http.get(appUrls.tasks + '/Api/AssignmentTemplate').then(({ data = [] }) => data),\n $http.get(`${appUrls.tasks}/api/TaskTemplates/Schedules`).then(({ data = [] }) => data),\n ]).then(function([assignments, taskConfig, taskTemplates]) {\n vm.taskConfig = taskConfig || [];\n vm.taskTemplates = taskTemplates || [];\n\n vm.templates = (assignments || [])\n .map(t => ({\n id: t.id,\n label: $filter('translateList')(t.id, 'assignmenttemplate', t.name),\n name: t.name,\n }))\n .sort(dynamicSort('label'));\n if (!vm.templateRequired) {\n vm.templates.unshift({\n id: guid.empty,\n label: $filter('translate')('Do not use a template'),\n name: '',\n });\n }\n }, showError);\n\n vm.templateChanged = function() {\n var template = vm.assignment.templateId\n ? vm.templates.find(t => t.id == vm.assignment.templateId)\n : null;\n vm.assignment.name = (template && template.name) || '';\n vm.editName = !vm.templateRequired && !vm.assignment.name;\n if (vm.assignment.templateId) {\n vm.taskSchedules = vm.taskConfig\n .filter(x => x.assignmentTemplateId === vm.assignment.templateId)\n .map(c => {\n const taskTemplate = vm.taskTemplates.find(x => x.id === c.taskTemplateId);\n if (!taskTemplate) return null;\n if (!taskTemplate.periodicities || !taskTemplate.periodicities.length) return null;\n let periodicity = c.taskPeriodicityId\n ? taskTemplate.periodicities.find(x => x.id === c.taskPeriodicityId)\n : null;\n if (!periodicity && taskTemplate.periodicities.length === 1)\n periodicity = taskTemplate.periodicities[0];\n\n return {\n invoiceSteamId: null, //Will be filled in after save\n relationId: vm.relation.id,\n type: 1,\n template: {\n id: taskTemplate.id,\n name: taskTemplate.name,\n },\n periodicities: taskTemplate.periodicities || [],\n periodicity,\n planningStart: new Date(),\n planningStop: null,\n scheduleDate: null,\n removed: false,\n };\n })\n .filter(x => !!x); // Filter out nulls\n } else {\n vm.taskSchedules = [];\n }\n vm.resetShowScheduleDate();\n };\n vm.periodicityChanged = function(item) {\n if (item.periodicity && item.periodicity.showScheduleDate) {\n vm.showScheduleDate = true;\n } else {\n item.scheduleDate = null;\n vm.resetShowScheduleDate();\n }\n };\n vm.resetShowScheduleDate = function() {\n vm.showScheduleDate = vm.taskSchedules.some(\n x => x.periodicity && x.periodicity.showScheduleDate,\n );\n };\n\n var showError = function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n return '';\n };\n vm.saveTaskSchedules = function(invoiceStreamId) {\n const schedules = (vm.taskSchedules || [])\n .filter(x => !x.removed)\n .map(x => {\n var model = angular.copy(x);\n model.invoiceStreamId = invoiceStreamId;\n\n if (model.planningStart instanceof Date)\n model.planningStart = moment.utc(model.planningStart);\n if (model.planningStop && model.planningStop instanceof Date)\n model.planningStop = moment.utc(model.planningStop);\n\n if (model.scheduleDate && model.scheduleDate instanceof Date)\n model.scheduleDate = moment.utc(model.scheduleDate);\n delete model.periodicities;\n delete model.removed;\n\n return model;\n });\n if (!schedules.length) return $q.when([]);\n return $http\n .post(appUrls.tasks + '/Api/TaskSchedules/Create', schedules)\n .then(function({ data: taskSchedules }) {\n const withErrors = taskSchedules\n .filter(x => !!x.planningError && !!x.template)\n .map(x => {\n const taskName = $filter('translateList')(\n x.template.id,\n 'tasktemplate',\n x.template.name,\n );\n\n const error = $filter('translateList')(\n `${x.planningError}`,\n 'TaskDomainExceptionCode',\n '',\n );\n return `${taskName}: ${error}`;\n });\n if (withErrors.length > 0) {\n flySvc.custom({\n toastrType: 'warning',\n titleMessage: 'msgSomeTaskSchedulesCouldNotBePlanned',\n content: withErrors.join('
      \\r\\n'),\n });\n }\n //Reload task section\n if (\n !vm.relation.sectionStatus ||\n typeof vm.relation.sectionStatus[taskPlanningSection] !== 'undefined'\n ) {\n relBindSvc.refreshSection(vm.relation.id, taskPlanningSection);\n }\n\n return taskSchedules;\n });\n };\n\n vm.save = function() {\n if (vm.saving) return '';\n vm.saving = true;\n if (vm.invoiceStream && vm.invoiceStream.id) {\n return vm\n .saveTaskSchedules(vm.invoiceStream.id)\n .then(\n schedules => {\n close(vm.invoiceStream, 500);\n $element.modal('hide');\n },\n error => {\n showError(error);\n },\n )\n .finally(() => {\n vm.saving = false;\n });\n } else {\n $http\n .post(appUrls.api + '/api/Assignment/Create', vm.assignment)\n .then(function({ data: invoiceStream }) {\n if (invoiceStream) {\n vm.invoiceStream = invoiceStream;\n\n return vm.saveTaskSchedules(invoiceStream.id).then(schedules => {\n close(invoiceStream, 500);\n $element.modal('hide');\n });\n }\n vm.saving = false;\n return false;\n })\n .catch(error => {\n showError(error);\n })\n .finally(() => {\n vm.saving = false;\n });\n }\n };\n vm.cancel = function() {\n close(null, 500);\n };\n vm.dayMonthOptions = {\n minMode: 'day',\n maxMode: 'month',\n showWeeks: false,\n formatDayTitle: 'MMMM',\n datepickerMode: 'month',\n formatMonthTitle: ' ',\n initDate: moment\n .utc()\n .startOf('day')\n .set({\n year: 2000,\n })\n .toDate(),\n // minDate: new Date(2000, 0, 1),\n // maxDate: new Date(2000, 11, 31),\n };\n}\n","import angular from 'angular';\nimport moment from 'moment';\nimport guid from '@/shared/utils/guid';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\n\nangular\n .module('cloudX')\n .controller('AddBankAccountDialogCtrl', [\n 'resourceFactorySvc',\n '$http',\n 'appUrls',\n 'flySvc',\n '$filter',\n '$element',\n 'close',\n 'relation',\n 'enumCacheSvc',\n 'translateListFilter',\n addBankAccountDialogCtrl,\n ]);\n\nfunction addBankAccountDialogCtrl(\n resourceFactorySvc,\n $http,\n appUrls,\n flySvc,\n $filter,\n $element,\n close,\n relation,\n enumCacheSvc,\n translateListFilter,\n) {\n var vm = this;\n vm.saving = false;\n vm.retrievingInfo = false;\n vm.showValidation = false;\n vm.dpDateOpen = false;\n vm.dpDateClosed = false;\n vm.dpCap = false;\n vm.bankAccountTypes = [];\n\n var resource = resourceFactorySvc.get('relationBankAccount');\n vm.bank = {\n relationId: relation.id,\n iban: '',\n bic: '',\n remark: '',\n bankName: '',\n isMain: false,\n bankAccountType: null,\n dateOpened: null,\n dateClosed: null,\n dateCap: null,\n countryCode: null,\n domiciliation: false,\n pitRefund: false,\n };\n\n enumCacheSvc.get('bankaccounttype').then(function(data) {\n vm.bankAccountTypes = data\n .map(x => ({\n ...x,\n label: translateListFilter(x.key, 'bankaccounttype', x.value),\n }))\n .sort(dynamicSort('label'));\n });\n\n vm.fillBankInfo = function() {\n if (vm.saving) return;\n if (!vm.bank.iban) return;\n if (vm.bankForm.iban.$invalid) return;\n if (vm.bank.iban.toLowerCase().startsWith('be')) {\n vm.retrievingInfo = true;\n const params = { iban: vm.bank.iban };\n $http.get(`${appUrls.api}/Api/Bank`, { params }).then(\n function({ data }) {\n if (!vm.saving && !!data && data.bic && vm.bank.iban === params.iban) {\n if (!vm.bank.bic) vm.bank.bic = data.bic;\n if (!vm.bank.bankName && data.name) vm.bank.bankName = data.name;\n }\n vm.retrievingInfo = false;\n },\n function() {\n vm.retrievingInfo = false;\n },\n );\n }\n vm.bank.countryCode = vm.bank.iban.substring(0, 2);\n };\n\n vm.save = function() {\n if (vm.bankForm.$invalid) return '';\n if (vm.saving) return '';\n\n vm.saving = true;\n resource.save(vm.bank).$promise.then(\n function(result) {\n vm.saving = false;\n flySvc.success();\n close(result, 500);\n $element.modal('hide');\n },\n function(error) {\n vm.saving = false;\n flySvc.error(error.data.code, error.data.parameters);\n return '';\n },\n );\n };\n vm.cancel = function() {\n close(null, 500);\n };\n}\n","import angular from 'angular';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport adminpulse from '../../../shared/utils/adminpulse';\nimport moment from 'moment';\n\nangular\n .module('cloudX')\n .controller('AddCommonTaskSchedulesDialogCtrl', [\n '$http',\n '$q',\n 'flySvc',\n '$element',\n 'appUrls',\n 'close',\n 'streamId',\n 'relationId',\n 'relType',\n 'existingSchedules',\n 'invoiceStreams',\n 'dialogsSvc',\n 'translateListFilter',\n addCommonTaskSchedulesDialogCtrl,\n ]);\n\nfunction addCommonTaskSchedulesDialogCtrl(\n $http,\n $q,\n flySvc,\n $element,\n appUrls,\n close,\n streamId,\n relationId,\n relType,\n existingSchedules,\n invoiceStreams,\n dialogsSvc,\n translateListFilter,\n) {\n var vm = this;\n vm.lines = [];\n vm.templates = [];\n vm.showScheduleDate = false;\n vm.invoiceStreams = invoiceStreams;\n vm.showValidation = false;\n\n var showError = function(error) {\n flySvc.error(error.data.code, error.data.parameters, null, error.data.type);\n return '';\n };\n\n function Schedule() {\n this.invoiceStreamId = streamId;\n this.relationId = relationId;\n this.type = 1;\n this.template = null;\n this.periodicity = null;\n this.planningStart = new Date();\n this.planningStop = null;\n this.scheduleDate = null;\n }\n\n $http.get(appUrls.tasks + '/Api/TaskTemplates/Schedules').then(function(response) {\n vm.templates = response.data\n .map(x => ({\n ...x,\n label: translateListFilter(x.id, 'tasktemplate', x.name),\n periodicities: (x.periodicities || [])\n .map(p => ({\n ...p,\n label: translateListFilter(p.id, 'taskperiodicity', p.name),\n }))\n .sort(dynamicSort('label')),\n }))\n .sort(dynamicSort('label'));\n for (var i = 0; i < vm.templates.length; i++) {\n if (\n (relType === 0 && vm.templates[i].appliesToCompany) ||\n (relType === 1 && vm.templates[i].appliesToSoleProprietor) ||\n (relType === 2 && vm.templates[i].appliesToPerson)\n ) {\n var schedule = new Schedule();\n schedule.template = vm.templates[i];\n vm.templateChanged(schedule);\n vm.lines.push(schedule);\n }\n }\n\n var notApplicableTemplates = vm.templates.filter(function(el) {\n if (\n (relType === 0 && !el.appliesToCompany) ||\n (relType === 1 && !el.appliesToSoleProprietor) ||\n (relType === 2 && !el.appliesToPerson)\n )\n return true;\n return false;\n });\n\n for (var x = 0; x < notApplicableTemplates.length; x++) {\n var idx = vm.templates.indexOf(notApplicableTemplates[x]);\n if (idx >= 0) vm.templates.splice(idx, 1);\n }\n\n if (vm.lines.length === 0) vm.lines.push(new Schedule()); //Show at least 1 schedule to add\n\n vm.resetShowScheduleDate();\n }, showError);\n\n vm.templateChanged = function(item) {\n if (!item.template || !item.template.periodicities) {\n item.periodicity = null;\n vm.resetShowScheduleDate();\n return;\n }\n if (item.template.periodicities.length > 0) {\n item.periodicity = item.template.periodicities[0];\n }\n vm.resetShowScheduleDate();\n };\n vm.resetShowScheduleDate = function() {\n vm.showScheduleDate = vm.lines.some(x => x.periodicity && x.periodicity.showScheduleDate);\n };\n vm.periodicityChanged = function(item) {\n if (item.periodicity && item.periodicity.showScheduleDate) {\n vm.showScheduleDate = true;\n } else {\n item.scheduleDate = null;\n vm.resetShowScheduleDate();\n }\n };\n vm.saving = false;\n\n var addSchedule = function(schedule) {\n return $http.post(appUrls.tasks + '/Api/TaskSchedules/', schedule).then(\n function(response) {\n return response.data;\n },\n function(error) {\n showError(error);\n return null;\n },\n );\n };\n\n vm.scheduleExists = function(model) {\n if (!model || !model.periodicity || !model.template) return false;\n if (model.periodicity.showScheduleDate) return false;\n if (\n vm.lines.some(\n schedule =>\n schedule !== model &&\n schedule.periodicity.id === model.periodicity.id &&\n schedule.template.id === model.template.id,\n )\n )\n return true;\n if (!existingSchedules) return false;\n return existingSchedules.some(function(schedule) {\n return (\n schedule.periodicity.id === model.periodicity.id &&\n schedule.template.id === model.template.id\n );\n });\n };\n vm.validate = function() {\n for (var i = 0; i < vm.lines.length - 1; i++) {\n var line = vm.lines[i];\n for (var j = i + 1; j < vm.lines.length; j++) {\n var other = vm.lines[j];\n if (line.periodicity.id === other.periodicity.id && line.template.id === other.template.id)\n return false;\n }\n }\n return true;\n };\n vm.save = function() {\n if (vm.saving) return;\n vm.saving = true;\n $q.all(\n vm.lines.map(function(item) {\n var model = angular.copy(item);\n if (model.planningStart instanceof Date)\n model.planningStart = moment.utc(model.planningStart);\n if (model.planningStop && model.planningStop instanceof Date)\n model.planningStop = moment.utc(model.planningStop);\n\n if (model.scheduleDate && model.scheduleDate instanceof Date)\n model.scheduleDate = moment.utc(model.scheduleDate);\n return addSchedule(model);\n }),\n )\n .then(function(data) {\n //Keep dialog open if all the schedules contain errors\n if (\n data.length > 0 &&\n data.every(function(element) {\n return element === null;\n }) === true\n )\n return;\n\n $element.modal('hide');\n close(data, 500);\n })\n .finally(function() {\n vm.saving = false;\n });\n };\n vm.removeItem = function(item) {\n var idx = vm.lines.indexOf(item);\n if (idx >= 0) vm.lines.splice(idx, 1);\n vm.resetShowScheduleDate();\n };\n vm.cancel = function() {\n close(null, 500);\n };\n // vm.scheduleDateChanged = function(item) {\n // item.scheduleDate = adminpulse.dayMonthDate(item.scheduleDate);\n // };\n vm.dayMonthOptions = {\n minMode: 'day',\n maxMode: 'month',\n showWeeks: false,\n formatDayTitle: 'MMMM',\n datepickerMode: 'month',\n formatMonthTitle: ' ',\n initDate: new Date(2000, 11, 31),\n // minDate: new Date(2000, 0, 1),\n // maxDate: new Date(2000, 11, 31),\n };\n}\n","import angular from 'angular';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport dataCacheService from '@/shared/services/DataCacheService';\n\n//List link types that should be hidden for a relation type\nconst linkTypesHiddenFor = {\n //Company\n 0: [5, 9],\n //SoleProp\n 1: [],\n //Person\n 2: [2, 3, 4, 6, 8, 11],\n};\n\nconst searchOptionsForLinkType = {\n 5: { type: [1, 2] }, //Partner\n 9: { type: [1, 2] }, //Child\n 11: { type: [0, 1] }, //Holding\n};\n\nangular\n .module('cloudX')\n .controller('AddRelationLinkDialogCtrl', [\n 'resourceFactorySvc',\n 'flySvc',\n '$element',\n 'close',\n 'enumCacheSvc',\n 'dialogsSvc',\n 'relationId',\n 'companyId',\n 'relationType',\n 'translateListFilter',\n 'checkTenantConfiguration',\n addRelationLinkDialogCtrl,\n ]);\n\nfunction addRelationLinkDialogCtrl(\n resourceFactorySvc,\n flySvc,\n $element,\n close,\n enumCacheSvc,\n dialogsSvc,\n relationId,\n companyId,\n relationType,\n translateListFilter,\n checkTenantConfiguration,\n) {\n var vm = this;\n vm.loading = false;\n vm.representedByWizardOptions = { allowedRelTypes: [1, 2], showKBO: false };\n vm.representedBySearchOptions = { type: [1, 2] };\n vm.relationSearchOptions = {};\n vm.shareholderGroups = null;\n vm.isNetherlandsConfiguration = checkTenantConfiguration('[5]');\n vm.netherlandsMate = 97;\n vm.netherlandsDirector = 98;\n vm.netherlandsAssociate = 99;\n vm.commonLinkTypes = [1, 2, 6, 4]; // contact, beneficiary, shareholder,company owner (last due to dropdown)\n vm.selectedCommonLinkTypes = [];\n vm.hasPortalConnectPlatform = dataCacheService.hasPortalConnectPlatform(companyId);\n vm.relationType = relationType;\n\n vm.relationLink = {\n linkType: null,\n remark: '',\n extraValues: {},\n };\n\n var resource = resourceFactorySvc.get('relationLink');\n enumCacheSvc.get('linkType').then(function(data) {\n vm.linkTypes = data\n .filter(x => linkTypesHiddenFor[relationType].indexOf(x.key) < 0)\n .map(x => ({\n ...x,\n label: translateListFilter(x.key, 'linktypeto', x.value),\n }))\n .sort(dynamicSort('label'));\n if (vm.isNetherlandsConfiguration) {\n // NL: remove bedrijfsleider label, add vennoot & bestuurder\n vm.linkTypes = [\n { key: vm.netherlandsMate, label: translateListFilter(17, 'CompanyOwnerPosition') }, // add maat\n { key: vm.netherlandsDirector, label: translateListFilter(3, 'CompanyOwnerPosition') }, // add bestuurder\n { key: vm.netherlandsAssociate, label: translateListFilter(5, 'CompanyOwnerPosition') }, // add vennoot\n ...vm.linkTypes.filter(x => x.key !== 4), // remove 'normal' company owner link type\n ].sort(dynamicSort('label'));\n }\n });\n enumCacheSvc.get('companyownerposition').then(function(data) {\n vm.positions = data\n .map(x => ({\n ...x,\n label: translateListFilter(x.key, 'companyownerposition', x.value),\n }))\n .sort(dynamicSort('label'));\n });\n enumCacheSvc.get('partnershiptype').then(function(data) {\n vm.partnershipTypes = data;\n });\n enumCacheSvc.get('marriageregime').then(function(data) {\n vm.marriageRegimes = data;\n });\n enumCacheSvc.get('propertyright').then(function(data) {\n vm.popertyRights = data;\n });\n\n vm.linkTypeChanged = function() {\n vm.relationLink.extraValues = {}; // Clear all extra values when selecting other link type\n vm.selectedCommonLinkTypes = [];\n vm.relationSearchOptions = searchOptionsForLinkType[vm.relationLink.linkType] || {};\n if (vm.relationLink.linkType === 6) {\n // Shareholders\n vm.relationLink.extraValues.propertyRight = 2; // FullOwnership\n vm.loadShareholderGroups();\n }\n };\n\n vm.showOtherCommonLinkTypes = () => {\n if (!vm.relationLink.linkType) return false;\n return vm.commonLinkTypes.includes(vm.relationLink.linkType);\n };\n\n vm.excludeCurrentLinkType = commonLinkType => {\n return commonLinkType !== vm.relationLink.linkType;\n };\n vm.commonLinkTypeSelectionChanged = (selected, commonLinkType) => {\n if (selected) {\n if (!vm.selectedCommonLinkTypes.includes(commonLinkType)) {\n vm.selectedCommonLinkTypes.push(commonLinkType);\n }\n } else {\n if (vm.selectedCommonLinkTypes.includes(commonLinkType)) {\n vm.selectedCommonLinkTypes = vm.selectedCommonLinkTypes.filter(x => x !== commonLinkType);\n }\n }\n };\n vm.validate = function() {\n return !!vm.toRelation && vm.toRelation.id !== undefined;\n };\n\n vm.validateRepresentedBy = function() {\n vm.invalidRepresentedBy = false;\n if (\n vm.relationLink &&\n vm.relationLink.extraValues &&\n vm.relationLink.extraValues.representedByRelation\n ) {\n // a relation has to be selected\n if (!vm.relationLink.extraValues.representedByRelation.id) {\n vm.invalidRepresentedBy = true;\n return false;\n }\n }\n return true;\n };\n\n vm.validateIsPortalUser = function() {\n const canSetIsPortalUser = vm.relationLink.linkType === 1 && relationType !== 2 && vm.toRelation.type !== 0;\n if (!canSetIsPortalUser) {\n delete vm.relationLink.extraValues.isPortalUser;\n }\n };\n\n vm.save = function() {\n if (!vm.validate()) return;\n if (!vm.validateRepresentedBy()) return;\n vm.validateIsPortalUser();\n\n vm.relationLink.toRelationId = vm.toRelation.id;\n vm.relationLink.fromRelationId = relationId;\n const copy = angular.copy(vm.relationLink);\n const transformed = resourceFactorySvc.setDatePropsToISO(copy);\n const model = angular.copy(transformed);\n\n // in NL they don't understand the concept of 'company owner/bedrijfsleider', they just want to select bestuurder or vennoot. We hacked the selection list so\n // that the tenant can just choose 'bestuurder', but we want to save it as link type company owner, with a position of vennoot.\n if (vm.relationLink.linkType === 97) {\n model.linkType = 4;\n model.extraValues.position = 17;\n }\n if (vm.relationLink.linkType === 98) {\n model.linkType = 4;\n model.extraValues.position = 3;\n }\n if (vm.relationLink.linkType === 99) {\n model.linkType = 4;\n model.extraValues.position = 5;\n }\n\n if (vm.createAsAdditionalCompanyOwnerPositions) {\n model.createAsAdditionalCompanyOwnerPositions = [vm.createAsAdditionalCompanyOwnerPositions];\n } else {\n model.createAsAdditionalCompanyOwnerPositions = [];\n }\n\n model.extraValues = JSON.stringify(model.extraValues);\n model.createAsAdditionalLinkTypes = vm.selectedCommonLinkTypes;\n vm.saving = true;\n resource.save(\n {},\n model,\n function(result) {\n vm.saving = false;\n $element.modal('hide');\n close(result, 500);\n },\n function(error) {\n vm.saving = false;\n flySvc.error(error.data.code, error.data.parameters);\n },\n );\n };\n\n vm.openNewRelationDialog = function() {\n if (vm.saving) return;\n\n dialogsSvc.showRelationWizard('newRelation', { companyId }).then(function(result) {\n if (result && result.relation && result.relation.id) {\n vm.toRelation = result.relation;\n }\n });\n };\n vm.openNewRepresentedByDialog = function() {\n if (vm.saving) return;\n const options = angular.extend({ companyId }, vm.representedByWizardOptions);\n\n dialogsSvc.showRelationWizard('newRelation', options).then(function(result) {\n if (result && result.relation && result.relation.id) {\n vm.relationLink.extraValues.representedByRelation = result.relation;\n }\n });\n };\n\n vm.votesChanged = false;\n vm.sharesChanged = function() {\n if (vm.votesChanged) return;\n //Copy value from shares to votes\n vm.relationLink.extraValues.votes = vm.relationLink.extraValues.shares;\n };\n vm.loadShareholderGroups = function() {\n if (vm.shareholderGroups !== null) return;\n vm.shareholderGroups = [];\n resource.shareholderGroups({ id: relationId }, function(result) {\n vm.shareholderGroups = result || [];\n });\n };\n\n vm.cancel = function() {\n $element.modal('hide');\n close(null, 500);\n };\n}\n","import angular from 'angular';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport moment from 'moment';\n\nangular\n .module('cloudX')\n .controller('AddTaskScheduleDialogCtrl', [\n '$http',\n '$q',\n 'flySvc',\n '$element',\n 'appUrls',\n 'close',\n 'streamId',\n 'relationId',\n 'relType',\n 'existingSchedules',\n 'invoiceStreams',\n 'dialogsSvc',\n 'translateListFilter',\n '$timeout',\n addTaskScheduleDialogCtrl,\n ]);\n\nfunction addTaskScheduleDialogCtrl(\n $http,\n $q,\n flySvc,\n $element,\n appUrls,\n close,\n streamId,\n relationId,\n relType,\n existingSchedules,\n invoiceStreams,\n dialogsSvc,\n translateListFilter,\n $timeout,\n) {\n var vm = this;\n vm.templates = [];\n vm.invoiceStreams = invoiceStreams;\n vm.showValidation = false;\n vm.deviations = [];\n vm.deviationsCollapsed = true;\n\n var showError = function(error) {\n flySvc.error(error.data.code, error.data.parameters, null, error.data.type);\n return '';\n };\n vm.schedule = {\n invoiceStreamId: streamId,\n relationId: relationId,\n type: 1,\n template: null,\n periodicity: null,\n planningStart: new Date(),\n planningStop: null,\n scheduleDate: null,\n };\n\n $http.get(appUrls.tasks + '/Api/TaskTemplates/Schedules').then(function({ data }) {\n vm.templates = data\n .filter(\n x =>\n (relType === 0 && x.appliesToCompany) ||\n (relType === 1 && x.appliesToSoleProprietor) ||\n (relType === 2 && x.appliesToPerson),\n )\n .map(x => ({\n ...x,\n label: translateListFilter(x.id, 'tasktemplate', x.name),\n periodicities: (x.periodicities || [])\n .map(p => ({\n ...p,\n label: translateListFilter(p.id, 'taskperiodicity', p.name),\n }))\n .sort(dynamicSort('label')),\n }))\n .sort(dynamicSort('label'));\n }, showError);\n\n vm.templateChanged = function() {\n vm.deviations = [];\n\n if (!vm.schedule.template || !vm.schedule.template.periodicities) {\n vm.schedule.periodicity = null;\n return;\n }\n if (vm.schedule.template.periodicities.length > 0) {\n vm.schedule.periodicity = vm.schedule.template.periodicities[0];\n }\n\n if (vm.schedule.template) {\n $http\n .get(`${appUrls.tasks}/api/TaskSchedules/deviationpossibilities/${vm.schedule.template.id}`)\n .then(\n function({ data }) {\n $timeout(function() {\n vm.deviations = data;\n }, 500);\n },\n function(error) {\n showError(error);\n },\n );\n }\n };\n\n vm.saving = false;\n\n var addSchedule = function(schedule) {\n return;\n };\n\n vm.scheduleExists = function() {\n if (\n !vm.schedule ||\n !vm.schedule.periodicity ||\n !vm.schedule.template ||\n !vm.schedule.invoiceStreamId\n )\n return false;\n if (vm.schedule.periodicity.showScheduleDate) return false;\n if (!existingSchedules) return false;\n return existingSchedules.some(function(schedule) {\n return (\n schedule.periodicity.id === vm.schedule.periodicity.id &&\n schedule.template.id === vm.schedule.template.id &&\n schedule.invoiceStreamId === vm.schedule.invoiceStreamId\n );\n });\n };\n vm.validate = function() {\n return !vm.scheduleExists();\n };\n vm.save = function() {\n if (vm.saving) return;\n vm.saving = true;\n var model = angular.copy(vm.schedule);\n model = {\n ...model,\n deviations: vm.deviations,\n };\n\n if (model.planningStart instanceof Date) model.planningStart = model.planningStart.ISO();\n if (model.planningStop && model.planningStop instanceof Date)\n model.planningStop = model.planningStop.ISO();\n\n if (model.scheduleDate && model.scheduleDate instanceof Date)\n model.scheduleDate = model.scheduleDate.ISO();\n\n $http.post(appUrls.tasks + '/Api/TaskSchedules/', model).then(\n function(response) {\n if (response && response.data) {\n $element.modal('hide');\n close([response.data], 500);\n }\n vm.saving = false;\n },\n function(error) {\n showError(error);\n vm.saving = false;\n },\n );\n };\n vm.cancel = function() {\n close(null, 500);\n };\n vm.dayMonthOptions = {\n minMode: 'day',\n maxMode: 'month',\n showWeeks: false,\n formatDayTitle: 'MMMM',\n datepickerMode: 'month',\n formatMonthTitle: ' ',\n initDate: new Date(2000, 11, 31),\n // minDate: new Date(2000, 0, 1),\n // maxDate: new Date(2000, 11, 31),\n };\n}\n","import angular from 'angular';\nimport adminpulse from '@/shared/utils/adminpulse';\nimport guid from '@/shared/utils/guid';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport { isDutchTenantConfiguration } from '@/shared/TenantConfigurationConstants';\n\nangular\n .module('cloudX')\n .controller('AmlDocumentDialogCtrl', [\n '$httpParamSerializer',\n 'flySvc',\n '$element',\n 'close',\n 'relation',\n 'appUrls',\n '$http',\n '$timeout',\n '$filter',\n 'translateListFilter',\n 'dataCache',\n AmlDocumentDialogCtrl,\n ]);\n\nfunction AmlDocumentDialogCtrl(\n $httpParamSerializer,\n flySvc,\n $element,\n close,\n relation,\n appUrls,\n $http,\n $timeout,\n $filter,\n translateListFilter,\n dataCache,\n) {\n var vm = this;\n vm.data = {\n relationId: relation.id,\n identificationTemplateId: null,\n beneficiaryTemplateId: null,\n derivedClientResearchTemplateId: null,\n riskTemplateId: null,\n companyTrusteesTemplateId: null,\n personTrusteesTemplateId: null,\n tags: {},\n selectedTrustees: null,\n addQrCode: false,\n };\n vm.isNlTenant = isDutchTenantConfiguration(dataCache.getArray('tenantConfiguration'));\n vm.hasCustomTags = false;\n vm.amlStatus = null;\n vm.loadingPreview = false;\n vm.saving = false;\n vm.preview = null;\n vm.identificationTemplates = null;\n vm.beneficiaryTemplates = null;\n vm.riskTemplates = null;\n vm.companyTrusteesTemplates = null;\n vm.personTrusteesTemplates = null;\n vm.derivedClientResearchTemplates = null;\n vm.templateTags = [];\n vm.hasQrCodeTag = false;\n\n /* For trustee checkboxes */\n vm.companyTrustees = [];\n vm.companyTrusteesSelected = false;\n vm.personTrustees = [];\n vm.personTrusteesSelected = false;\n\n var showError = function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n };\n var showArrayBufferError = function(error) {\n if (!error) return;\n try {\n var buffer = error.data || error;\n const errorObject = adminpulse.arrayBufferToObject(buffer) || {};\n flySvc.error(errorObject);\n } catch (ex) {\n //Parsing error?\n flySvc.error();\n }\n };\n vm.getStatus = function() {\n $http\n .get(appUrls.api + '/api/relation/AntiMoneyLaunderingInfo/' + relation.id)\n .then(function({ data }) {\n vm.amlStatus = data;\n if (data.trustees) {\n vm.companyTrustees = data.trustees\n .filter(x => x.type === 0)\n .map(x => ({ id: x.id, label: $filter('relationName')(x), selected: true }))\n .sort(dynamicSort('label'));\n vm.personTrustees = data.trustees\n .filter(x => x.type !== 0)\n .map(x => ({ id: x.id, label: $filter('relationName')(x), selected: true }))\n .sort(dynamicSort('label'));\n }\n });\n };\n vm.getStatus();\n\n vm.generateDocuments = function(dl) {\n if (vm.saving) return;\n vm.saving = true;\n const model = vm.getGenerateModel();\n $http.post(`${appUrls.api}/Api/Relation/AntiMoneyLaunderingDocuments/`, model).then(\n ({ data }) => {\n vm.saving = false;\n if (data) {\n close(data, 500);\n $element.modal('hide');\n }\n },\n error => {\n vm.saving = false;\n showError(error);\n },\n );\n };\n\n vm.generatePreview = function() {\n vm.loadingPreview = true;\n vm.preview = null;\n const model = vm.getGenerateModel();\n $http\n .post(`${appUrls.api}/Api/Relation/AntiMoneyLaunderingPreview/`, model, {\n responseType: 'arraybuffer',\n })\n .then(\n response => {\n vm.loadingPreview = false;\n if (!response || !response.data) return;\n var blob = new Blob([response.data], { type: 'image/png' });\n var reader = new FileReader();\n reader.onload = function(evt) {\n $timeout(function() {\n vm.preview = evt.target.result;\n }, 0);\n };\n reader.readAsDataURL(blob);\n },\n error => {\n vm.loadingPreview = false;\n showArrayBufferError(error);\n },\n );\n };\n\n vm.getGenerateModel = function() {\n const model = angular.copy(vm.data);\n\n model.tags = (vm.templateTags || []).reduce((o, e) => {\n if (!!e.value) {\n o[e.tag] = e.value;\n }\n return o;\n }, {});\n\n model.selectedTrustees = [\n ...(vm.data.companyTrusteesTemplateId\n ? vm.companyTrustees.filter(x => x.selected).map(x => x.id)\n : []),\n ...(vm.data.personTrusteesTemplateId\n ? vm.personTrustees.filter(x => x.selected).map(x => x.id)\n : []),\n ];\n\n if (vm.hasQrCodeTag) model.addQrCode = false;\n\n return model;\n };\n\n vm.retrieveTags = function() {\n vm.hasQrCodeTag = false;\n const model = vm.getGenerateModel();\n delete model.tags;\n\n $http.post(`${appUrls.api}/Api/Relation/AntiMoneyLaunderingCustomTags/`, model).then(\n ({ data }) => {\n if (data) {\n vm.templateTags = data.reduce((result, tag) => {\n //Lower case and remove {}\n const key = tag.toLowerCase().replace(/[{}]/, '');\n if (key === 'document.qr') {\n vm.hasQrCodeTag = true;\n return result; //Ignore qr code tag\n }\n const oldTag = vm.templateTags.find(x => x.key === key);\n\n result.push({\n tag,\n key,\n info: translateListFilter(`{${key}}`, 'mailplaceholder', ''),\n value: (oldTag && oldTag.value) || '', //Copy old value into new object\n });\n return result;\n }, []);\n } else {\n vm.templateTags = [];\n }\n },\n error => {\n showError(error);\n },\n );\n };\n\n var getBestMatchingTemplateId = function(templates) {\n if (!templates || !templates.length) return guid.empty;\n var filtered = templates.filter(x => x.languageCode === relation.languageCode);\n if (filtered.length === 1) return filtered[0];\n };\n\n vm.canGenerate = function() {\n //At least one document should be selected\n if (vm.data.identificationTemplateId) return true;\n if (vm.data.riskTemplateId) return true;\n if (vm.data.beneficiaryTemplateId) return true;\n if (vm.data.derivedClientResearchTemplateId && vm.isNlTenant) return true;\n\n //For the trustees, the template needs to be selected and there should be at least one trustee selected\n if (\n vm.data.companyTrusteesTemplateId &&\n vm.companyTrustees &&\n vm.companyTrustees.some(x => x.selected)\n )\n return true;\n if (\n vm.data.personTrusteesTemplateId &&\n vm.personTrustees &&\n vm.personTrustees.some(x => x.selected)\n )\n return true;\n\n // No documents will be generated\n return false;\n };\n\n vm.loadTemplates = function() {\n $http\n .get(`${appUrls.api}/Api/DocumentTemplate/Templates/`, {\n params: {\n templateTypes: [4, 5, 6, 7, 8, 9, 24],\n companyId: relation.companyId,\n },\n })\n .then(\n ({ data }) => {\n const relationType = relation.type;\n const templates = data\n .filter(x => x.relationType === null || x.relationType === relationType)\n .map(x => ({ ...x, label: `${x.name} (${x.languageCode})` }));\n const systemTemplate = {\n id: guid.empty,\n label: $filter('translate')('Use system template'),\n };\n\n vm.identificationTemplates = [\n systemTemplate,\n ...templates.filter(x => x.templateType === 4 || x.templateType === 5),\n ];\n vm.beneficiaryTemplates = [\n systemTemplate,\n ...templates.filter(x => x.templateType === 7),\n ];\n vm.companyTrusteesTemplates = [\n systemTemplate,\n ...templates.filter(x => x.templateType === 9),\n ];\n vm.personTrusteesTemplates = [\n systemTemplate,\n ...templates.filter(x => x.templateType === 8),\n ];\n if (vm.isNlTenant) {\n vm.derivedClientResearchTemplates = [\n systemTemplate,\n ...templates.filter(x => x.templateType === 24),\n ];\n } else {\n vm.derivedClientResearchTemplates = [];\n }\n vm.riskTemplates = [systemTemplate, ...templates.filter(x => x.templateType === 6)];\n vm.data.identificationTemplateId = (\n vm.identificationTemplates.find(x => x.languageCode === relation.languageCode) || {\n id: guid.empty,\n }\n ).id;\n vm.data.beneficiaryTemplateId = (\n vm.beneficiaryTemplates.find(x => x.languageCode === relation.languageCode) || {\n id: guid.empty,\n }\n ).id;\n vm.data.riskTemplateId = (\n vm.riskTemplates.find(x => x.languageCode === relation.languageCode) || {\n id: guid.empty,\n }\n ).id;\n vm.data.companyTrusteesTemplateId = (\n vm.companyTrusteesTemplates.find(x => x.languageCode === relation.languageCode) || {\n id: guid.empty,\n }\n ).id;\n vm.data.personTrusteesTemplateId = (\n vm.personTrusteesTemplates.find(x => x.languageCode === relation.languageCode) || {\n id: guid.empty,\n }\n ).id;\n if (vm.isNlTenant) {\n vm.data.derivedClientResearchTemplateId = (\n vm.derivedClientResearchTemplates.find(\n x => x.languageCode === relation.languageCode,\n ) || {\n id: guid.empty,\n }\n ).id;\n }\n vm.retrieveTags();\n },\n error => {\n showError(error);\n },\n );\n };\n\n vm.loadTemplates();\n\n vm.cancel = function() {\n close(null, 500);\n };\n}\n","import angular from 'angular';\nimport adminpulse from '@/shared/utils/adminpulse';\nimport guid from '@/shared/utils/guid';\nimport DocumentService from '@/shared/services/DocumentService';\n\nangular\n .module('cloudX')\n .controller('AmlSingleDocumentDialogCtrl', [\n 'flySvc',\n '$element',\n 'close',\n 'relation',\n 'appUrls',\n '$http',\n '$timeout',\n '$filter',\n 'translateListFilter',\n 'templateType',\n '$translate',\n AmlSingleDocumentDialogCtrl,\n ]);\n\nfunction AmlSingleDocumentDialogCtrl(\n flySvc,\n $element,\n close,\n relation,\n appUrls,\n $http,\n $timeout,\n $filter,\n translateListFilter,\n templateType,\n $translate,\n) {\n var vm = this;\n vm.data = {\n relationId: relation.id,\n templateId: null,\n templateType,\n tags: {},\n addQrCode: false,\n };\n vm.hasCustomTags = false;\n vm.loadingPreview = false;\n vm.loadingTags = false;\n vm.saving = false;\n vm.preview = null;\n vm.templates = null;\n vm.templateTags = [];\n vm.hasQrCodeTag = false;\n\n var showError = function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n };\n var showArrayBufferError = function(error) {\n if (!error) return;\n try {\n var buffer = error.data || error;\n const errorObject = adminpulse.arrayBufferToObject(buffer) || {};\n flySvc.error(errorObject);\n } catch (ex) {\n //Parsing error?\n flySvc.error();\n }\n };\n\n vm.generateAndEditDocuments = function(dl) {\n if (vm.saving) return;\n vm.saving = true;\n const model = vm.getGenerateModel();\n $http.post(`${appUrls.api}/Api/Relation/AmlSingleDocument/`, model).then(\n ({ data }) => {\n if (data) {\n const language = $translate.use().split('-')[0];\n DocumentService.edit(data.id, language).finally(() => {\n $timeout(function() {\n vm.saving = false;\n close(data, 500);\n $element.modal('hide');\n }, 0);\n });\n } else {\n vm.saving = false;\n }\n },\n error => {\n vm.saving = false;\n showError(error);\n },\n );\n };\n\n vm.generateDocuments = function(dl) {\n if (vm.saving) return;\n vm.saving = true;\n const model = vm.getGenerateModel();\n $http.post(`${appUrls.api}/Api/Relation/AmlSingleDocument/`, model).then(\n ({ data }) => {\n if (data) {\n const language = $translate.use().split('-')[0];\n close(data, 500);\n }\n }\n ).catch(error => {\n showError(error);\n }).finally(() => {\n vm.saving = false;\n $element.modal('hide');\n });\n};\n\n vm.generatePreview = function() {\n vm.loadingPreview = true;\n vm.preview = null;\n const model = vm.getGenerateModel();\n $http\n .post(`${appUrls.api}/Api/Relation/AMLSinglePreview/`, model, {\n responseType: 'arraybuffer',\n })\n .then(\n response => {\n vm.loadingPreview = false;\n if (!response || !response.data) return;\n var blob = new Blob([response.data], { type: 'image/png' });\n var reader = new FileReader();\n reader.onload = function(evt) {\n $timeout(function() {\n vm.preview = evt.target.result;\n }, 0);\n };\n reader.readAsDataURL(blob);\n },\n error => {\n vm.loadingPreview = false;\n showArrayBufferError(error);\n },\n );\n };\n\n vm.getGenerateModel = function() {\n const model = angular.copy(vm.data);\n\n model.tags = (vm.templateTags || []).reduce((o, e) => {\n if (!!e.value) {\n o[e.tag] = e.value;\n }\n return o;\n }, {});\n\n if (vm.hasQrCodeTag) model.addQrCode = false;\n\n return model;\n };\n\n vm.retrieveTags = function() {\n vm.hasQrCodeTag = false;\n vm.loadingTags = true;\n const model = vm.getGenerateModel();\n delete model.tags;\n\n $http.post(`${appUrls.api}/Api/Relation/AMLSingleDocumentCustomTags/`, model).then(\n ({ data }) => {\n if (data) {\n vm.templateTags = data.reduce((result, tag) => {\n //Lower case and remove {}\n const key = tag.toLowerCase().replace(/[{}]/, '');\n if (key === 'document.qr') {\n vm.hasQrCodeTag = true;\n return result; //Ignore qr code tag\n }\n const oldTag = vm.templateTags.find(x => x.key === key);\n\n result.push({\n tag,\n key,\n info: translateListFilter(`{${key}}`, 'mailplaceholder', ''),\n value: (oldTag && oldTag.value) || '', //Copy old value into new object\n });\n return result;\n }, []);\n } else {\n vm.templateTags = [];\n }\n vm.loadingTags = false;\n },\n error => {\n showError(error);\n vm.loadingTags = false;\n },\n );\n };\n\n vm.canGenerate = function() {\n //At least one document should be selected\n if (vm.data.templateId) return true;\n\n // No documents will be generated\n return false;\n };\n\n vm.loadTemplates = function() {\n $http\n .get(`${appUrls.api}/Api/DocumentTemplate/Templates/`, {\n params: {\n templateTypes: [templateType],\n companyId: relation.companyId,\n },\n })\n .then(\n ({ data }) => {\n const relationType = relation.type;\n const templates = data\n .filter(x => x.relationType === null || x.relationType === relationType)\n .map(x => ({ ...x, label: `${x.name} (${x.languageCode})` }));\n const systemTemplate = {\n id: guid.empty,\n label: $filter('translate')('Use system template'),\n };\n\n vm.templates = [systemTemplate, ...templates];\n vm.data.templateId = (\n vm.templates.find(x => x.languageCode === relation.languageCode) || {\n id: guid.empty,\n }\n ).id;\n vm.retrieveTags();\n },\n error => {\n showError(error);\n },\n );\n };\n\n vm.loadTemplates();\n\n vm.cancel = function() {\n close(null, 500);\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cloudX')\n .controller('AuthResourcesDialogCtrl', [\n 'resourceFactorySvc',\n 'flySvc',\n '$element',\n 'close',\n 'stream',\n '$filter',\n 'dialogsSvc',\n authResourcesDialogCtrl,\n ]);\n\nfunction authResourcesDialogCtrl(\n resourceFactorySvc,\n flySvc,\n $element,\n close,\n stream,\n $filter,\n dialogsSvc,\n) {\n var vm = this;\n vm.useDefault = false;\n vm.search = '';\n var showError = function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n return '';\n };\n var streamResource = resourceFactorySvc.get('invoiceStream');\n\n vm.categories = [];\n streamResource.getResources(\n {\n id: stream.id,\n },\n function(data) {\n vm.categories = data.map(item => {\n item.resource = item.items.find(x => x.isDefault);\n item.code = (item.resource && item.resource.code) || '';\n item.name =\n (item.code ? `${item.code} – ` : '') + //Prepend code of default resource\n $filter('translateList')(item.categoryId, 'resourcecategory', item.categoryName);\n\n item.items = item.items\n .filter(x => !x.isDefault)\n .map(r => ({\n ...r,\n name:\n (r.code ? `${r.code} – ` : '') + $filter('translateList')(r.id, 'resource', r.name),\n categoryName: item.name,\n }));\n\n item.search = item.name + ';' + item.items.map(x => x.name).join(';');\n return item;\n });\n },\n showError,\n );\n\n vm.searchResource = function(resource) {\n if (!vm.search) return true;\n if (resource.categoryName.toLowerCase().indexOf(vm.search.toLowerCase()) >= 0) return true;\n return resource.name.toLowerCase().indexOf(vm.search.toLowerCase()) >= 0;\n };\n\n var flattenResources = () =>\n vm.categories.reduce((a, category) => [...a, category.resource, ...category.items], []);\n\n vm.default = function() {\n if (vm.useDefault) return;\n vm.useDefault = true;\n return dialogsSvc\n .showYesNoCancel(\n 'msgConfirmPropogateChangesTitle',\n 'msgConfirmPropogateResourceForfaitChanges',\n )\n .then(\n function(result) {\n if (result === null) return false; // Cancel changes\n\n streamResource.saveResources(\n {\n id: stream.id,\n updateForfaitStatus: result,\n },\n [],\n function() {\n close(true, 500);\n $element.modal('hide');\n },\n showError,\n );\n },\n function() {\n return false; // Cancel changes\n },\n );\n };\n\n vm.save = function() {\n return dialogsSvc\n .showYesNoCancel(\n 'msgConfirmPropogateChangesTitle',\n 'msgConfirmPropogateResourceForfaitChanges',\n )\n .then(\n function(result) {\n if (result === null) return false; // Cancel changes\n var resources = flattenResources();\n\n streamResource.saveResources(\n {\n id: stream.id,\n updateForfaitStatus: result,\n },\n resources,\n function() {\n close(true, 500);\n $element.modal('hide');\n },\n showError,\n );\n },\n function() {\n return false; // Cancel changes\n },\n );\n };\n\n vm.cancel = function() {\n close(null, 500);\n };\n}\n","import angular, { equals } from 'angular';\nimport moment from 'moment';\n\nangular\n .module('cloudX')\n .controller('BillingSettingsDialogCtrl', [\n 'resourceFactorySvc',\n 'ModalService',\n 'dataCache',\n 'checkSecurity',\n 'flySvc',\n '$element',\n '$http',\n 'appUrls',\n '$translate',\n '$q',\n 'close',\n 'invoicestream',\n 'relation',\n billingSettingsDialogCtrl,\n ]);\n\nconst userProfiles = [\n { key: 'fileResponsibleUser', profile: 1, fieldId: '68988c03-3b65-4b90-a53a-f4114d9c46bc' },\n { key: 'fileAssistantUser', profile: 2, fieldId: '5b5c42ce-0232-43c3-816a-154840dc2b2c' },\n { key: 'fileAssistantBackupUser', profile: 3, fieldId: '0543ff8b-36bb-4638-b7f6-641484b3ca4b' },\n { key: 'fileAssociateUser', profile: 4, fieldId: 'bef9f50d-9002-40a0-816f-13c2b507f9f4' },\n { key: 'fileBillingUser', profile: 5, fieldId: '69ae92f6-cf99-4bf8-9503-f47311fc401d' },\n { key: 'fileSeniorUser', profile: 6, fieldId: 'd2876d8b-5157-4c2d-9a19-dcd6aedfd985' },\n];\n\nfunction billingSettingsDialogCtrl(\n resourceFactorySvc,\n ModalService,\n dataCache,\n checkSecurity,\n flySvc,\n $element,\n $http,\n appUrls,\n $translate,\n $q,\n close,\n invoicestream,\n relation,\n) {\n var vm = this;\n vm.saving = false;\n\n vm.showValidation = false;\n vm.invoiceStream = angular.copy(invoicestream);\n vm.relation = relation;\n vm.readOnly = !checkSecurity('InvoiceDraft:u') || !relation.hasInvoiceTeamAccess;\n\n vm.invoiceTemplates = [];\n vm.detailTemplates = [];\n vm.creditNoteTemplates = [];\n vm.invoiceTemplateMismatch = false;\n vm.detailTemplateMismatch = false;\n vm.creditNoteTemplateMismatch = false;\n vm.addresses = [];\n vm.priceGrids = [];\n vm.autosendPaymentReminders = [\n { label: $translate.instant('UseRelationSetting'), value: null },\n { label: $translate.instant('Yes'), value: true },\n { label: $translate.instant('No'), value: false },\n ];\n vm.loadMismatchTemplate = (templateId, templateType, templates) => {\n return $http\n .get(`${appUrls.api}/api/documentTemplate/Templates`, {\n params: {\n templateType: templateType,\n templateId,\n },\n })\n .then(({ data }) => {\n if (!data || data.length === 0) return null;\n const [template] = data;\n template.isMismatch = true;\n templates.push(template);\n return template;\n });\n };\n vm.checkMismatchTemplate = (templateId, templateType, templates) => {\n if (!templateId) return false; //Null is no problem\n if (templates.some(x => x.id === templateId)) return false; //If it exists, also no mismatch\n vm.loadMismatchTemplate(templateId, templateType, templates); //Try to load the template using the id\n return true;\n };\n var showError = function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n return '';\n };\n\n vm.loadInvoiceTemplates = () => {\n const companyId = vm.invoiceStream.companyId ?? vm.relation.companyId;\n if (!companyId) return;\n\n vm.invoiceTemplates = [];\n vm.detailTemplates = [];\n vm.creditNoteTemplates = [];\n $http\n .get(`${appUrls.api}/api/documentTemplate/Templates`, {\n params: {\n templateTypes: [0, 1, 2],\n language: vm.relation.languageCode,\n companyId,\n },\n })\n .then(({ data }) => {\n if (!data) return;\n data.forEach(template => {\n if (template.templateType === 0) vm.invoiceTemplates.push(template);\n if (template.templateType === 1) vm.detailTemplates.push(template);\n if (template.templateType === 2) vm.creditNoteTemplates.push(template);\n });\n vm.invoiceTemplateMismatch = vm.checkMismatchTemplate(\n vm.invoiceStream.invoiceDocumentTemplateId,\n 0,\n vm.invoiceTemplates,\n );\n\n vm.detailTemplateMismatch = vm.checkMismatchTemplate(\n vm.invoiceStream.invoiceDetailDocumentTemplateId,\n 1,\n vm.detailTemplates,\n );\n\n vm.creditNoteTemplateMismatch = vm.checkMismatchTemplate(\n vm.invoiceStream.creditNoteDocumentTemplateId,\n 2,\n vm.creditNoteTemplates,\n );\n }, showError);\n };\n\n vm.loadAddresses = () =>\n $http\n .get(`${appUrls.api}/api/Address/${relation.id}`, {\n params: {\n medium: 0,\n },\n })\n .then(({ data }) => {\n if (!data || data.length === 0) return;\n vm.addresses = data;\n }, showError);\n\n vm.loadPriceGrids = () => {\n $http.get(`${appUrls.api}/api/Price/Grid`).then(({ data }) => {\n if (!data || data.length === 0) return;\n\n vm.priceGrids = data.map(x => ({\n ...x,\n name: x.name === 'Default' ? $translate.instant('Default') : x.name,\n }));\n }, showError);\n };\n\n vm.loadAddresses();\n vm.loadInvoiceTemplates();\n vm.loadPriceGrids();\n\n vm.adminCostMethodChanged = () => {\n vm.invoiceStream.administrativeCostAmount = 0;\n };\n\n vm.showResetTaskUserModal = inputs => {\n const { profile } = inputs;\n var deferred = $q.defer();\n ModalService.showModal({\n template: require('../../common/directives/resetTaskAssignedToDialog.html'),\n controller: 'ResetTaskAssignedToDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs,\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n modal.close.then(function(result) {\n if (!result) return false;\n const model = {\n ...result,\n relationId: vm.relation.id,\n invoiceStreamId: vm.invoiceStream.id,\n oldProfile: profile,\n };\n $http.post(`${appUrls.tasks}/api/plannedtasks/ResetAssignedUser`, model).then(\n result2 => {\n flySvc.success('SuccessTitle');\n //console.log(result2);\n deferred.resolve(true);\n return true;\n },\n error => {\n flySvc.success('msgTaskUserChangedError');\n console.error(error);\n deferred.reject(error);\n return false;\n },\n );\n }, deferred.reject);\n });\n return deferred.promise;\n };\n\n vm.checkUserChanged = data => {\n const changedUsers = userProfiles.filter(p => {\n return !equals(data[p.key], invoicestream[p.key]);\n });\n if (changedUsers.length === 0) return $q.when();\n return $q\n .all(\n changedUsers.map(p =>\n $http.get(`${appUrls.tasks}/api/plannedtasks/HasOpenTasks`, {\n params: {\n relationId: vm.relation.id,\n invoiceStreamId: vm.invoiceStream.id,\n assignedUserId: invoicestream[p.key],\n profile: p.profile,\n },\n }),\n ),\n )\n .then(results => {\n const updateModels = [];\n\n for (let i = 0; i < results.length; i++) {\n const hasOpenTasks = results[i]?.data;\n if (!hasOpenTasks || (hasOpenTasks.count || 0) === 0) continue;\n const userProfile = changedUsers[i];\n if (!userProfile) continue;\n\n updateModels.push({\n oldUserId: invoicestream[userProfile.key],\n newUserId: data[userProfile.key] ?? vm.relation[userProfile.fieldId], //In case it's null, fallback to relation user\n tasksForUser: hasOpenTasks.forUser || 0,\n profile: userProfile.profile,\n });\n }\n if (updateModels.length === 0) return;\n return updateModels.reduce((prevPromise, model) => {\n return prevPromise.then(() => vm.showResetTaskUserModal(model));\n }, $q.when());\n });\n };\n\n var updateInvoiceStream = function(data) {\n vm.saving = true;\n return resourceFactorySvc\n .get('invoiceStream')\n .update(data)\n .$promise.then(\n function(response) {\n if (response) {\n flySvc.success('msgConfirmChange');\n return vm.checkUserChanged(data).finally(() => {\n close(response, 500);\n $element.modal('hide');\n vm.saving = false;\n return false;\n });\n }\n return false;\n },\n function(error) {\n showError(error);\n vm.saving = false;\n },\n );\n };\n vm.isValid = () => {\n if (!vm.form) return false;\n if (vm.form.$invalid) return false;\n\n return true;\n };\n vm.save = function() {\n if (vm.saving) return '';\n var invoicestream = angular.copy(vm.invoiceStream);\n\n return updateInvoiceStream(invoicestream);\n };\n vm.cancel = function() {\n close(null, 500);\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cloudX')\n .controller('ChangeRelTypeDialogCtrl', [\n 'flySvc',\n 'relBindSvc',\n 'resourceFactorySvc',\n 'appSettings',\n '$element',\n 'close',\n 'relId',\n 'options',\n ChangeRelTypeDialog,\n ]);\n\nfunction ChangeRelTypeDialog(\n flySvc,\n relBindSvc,\n resourceFactorySvc,\n appSettings,\n $element,\n close,\n relId,\n options,\n) {\n var vm = this;\n vm.saving = false;\n vm.relation = angular.copy(relBindSvc.relations[relId]);\n vm.options = angular.extend(\n {\n relType: vm.relation.type,\n crmType: vm.relation.crm,\n country: vm.relation.country || appSettings.defaultCountry,\n relTypeDisabled: false,\n crmTypeDisabled: false,\n countryDisabled: false,\n },\n options || {},\n );\n vm.relType = vm.options.relType;\n vm.crmType = vm.options.crmType;\n vm.country = vm.options.country;\n vm.fields = [];\n var showError = function(error) {\n vm.saving = false;\n flySvc.error(error.data.code, error.data.parameters);\n };\n\n vm.change = function() {\n vm.fields = [];\n vm.formReady = false;\n if (vm.relType !== null && vm.crmType !== null && vm.country) {\n vm.relation['04c56e09-eeff-4982-a243-0688b6f45a74'].value = vm.country;\n vm.relation['8e18c532-ed32-49b5-bd7b-1c5529c38d15'].value = vm.crmType;\n vm.relation['ef5606cf-21ec-4de9-97f2-71a9d8192748'].value = vm.relType;\n\n resourceFactorySvc.get('fieldRequired').query(\n {\n type: vm.relType,\n crm: vm.crmType,\n country: vm.country,\n },\n function(fields) {\n vm.fields = [];\n for (var i = 0; i < fields.length; i++) {\n var field = fields[i];\n if (field.id === '04c56e09-eeff-4982-a243-0688b6f45a74') continue; //Country\n if (field.id === '8e18c532-ed32-49b5-bd7b-1c5529c38d15') continue; //Crm type\n if (field.id === 'ef5606cf-21ec-4de9-97f2-71a9d8192748') continue; //Relation type\n if (field.id === 'e31bb7ad-afb4-4a37-bd1e-46d4a9a71cf0') continue; //Own Company\n if (!vm.relation[field.id])\n vm.relation[field.id] = {\n value: null,\n type: field.type,\n };\n vm.fields.push({\n definition: field,\n value: vm.relation[field.id].value,\n });\n }\n vm.formReady = true;\n },\n showError,\n );\n }\n };\n\n vm.change();\n vm.save = function() {\n if (vm.saving) return;\n vm.saving = true;\n resourceFactorySvc.get('relation').changeType(\n {\n id: relId,\n },\n {\n relationType: vm.relType,\n crmType: vm.crmType,\n countryCode: vm.country,\n fields: vm.fields,\n },\n function() {\n vm.saving = false;\n close(true, 500);\n $element.modal('hide');\n },\n showError,\n );\n };\n\n vm.cancel = function() {\n close(null, 500);\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cxTaskflow')\n .controller('DeleteAssignmentDialogCtrl', [\n '$element',\n '$q',\n 'translateListFilter',\n '$http',\n 'appUrls',\n 'flySvc',\n 'close',\n 'invoiceStreamId',\n 'relationId',\n deleteAssignmentDialogCtrl,\n ]);\n\nfunction deleteAssignmentDialogCtrl(\n $element,\n $q,\n translateListFilter,\n $http,\n appUrls,\n flySvc,\n close,\n invoiceStreamId,\n relationId,\n) {\n var vm = this;\n vm.updateRegistrations = true;\n vm.deleting = false;\n vm.loading = true;\n //To show which relation use this assignment for invoicing via\n vm.viaRelations = [];\n vm.hasRegistrations = false;\n vm.updateRegistrations = false;\n\n vm.taskSchedules = [];\n var scheduleRequest = $http\n .get(`${appUrls.tasks}/Api/TaskSchedules?relationId=${relationId}`)\n .then(({ data }) => {\n vm.taskSchedules = data\n .filter(x => x.invoiceStreamId === invoiceStreamId)\n .map(\n x =>\n `${translateListFilter(\n x.template.id,\n 'tasktemplate',\n x.template.name,\n )} - ${translateListFilter(x.periodicity.id, 'taskperiodicity', x.periodicity.name)}`,\n )\n .sort();\n });\n var registrationRequest = $http\n .get(`${appUrls.api}/Api/Registration/Get`, {\n params: {\n invoiceStreamId,\n take: 1,\n page: 0,\n filter: { invoiceStatus: { items: [0] }, neverInvoice: { items: [false] } },\n },\n })\n .then(({ data = {} }) => {\n const { registrations = [] } = data;\n vm.hasRegistrations = registrations.length > 0;\n });\n $q.all([scheduleRequest, registrationRequest]).then(function() {\n if (vm.taskSchedules.length === 0) vm.loading = false;\n });\n\n vm.delete = function() {\n if (vm.deleting) return;\n vm.deleting = true;\n\n $http\n .delete(`${appUrls.api}/api/InvoiceStream/Delete/${invoiceStreamId}`, {\n params: {\n updateRegistrations: vm.updateRegistrations,\n },\n })\n .then(\n () => {\n $element.modal('hide');\n close(true, 500);\n flySvc.success();\n vm.deleting = false;\n },\n function(error) {\n vm.deleting = false;\n if (error) {\n var code = error.code || (error.data && error.data.code);\n if (code === 2073) {\n // NotAllowedDeleteInvoiceStreamUsedForInvoicingVia\n var params = error.parameters || error.data.parameters || [];\n if (params.length > 0 && params[0].indexOf('[') === 0) {\n vm.viaRelations = JSON.parse(params[0]);\n }\n }\n }\n\n flySvc.error(error);\n },\n );\n };\n\n vm.cancel = function() {\n $element.modal('hide');\n close(null, 500);\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cloudX')\n .controller('EditAssignmentDialogCtrl', [\n '$http',\n 'appUrls',\n 'flySvc',\n '$element',\n 'close',\n 'invoiceStream',\n editAssignmentDialogCtrl,\n ]);\n\nfunction editAssignmentDialogCtrl($http, appUrls, flySvc, $element, close, invoiceStream) {\n var vm = this;\n vm.saving = false;\n vm.invoiceStream = invoiceStream;\n vm.assignment = {\n assignmentId: invoiceStream.assignmentId,\n assignmentName: invoiceStream.assignmentName,\n };\n\n var showError = function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n return '';\n };\n\n vm.save = function() {\n if (vm.saving) return '';\n vm.saving = true;\n\n $http\n .put(appUrls.api + '/api/Assignment/Update', vm.assignment)\n .then(function({ data: invoiceStream }) {\n if (invoiceStream) {\n vm.invoiceStream = invoiceStream;\n close(invoiceStream, 500);\n $element.modal('hide');\n }\n vm.saving = false;\n })\n .catch(error => {\n showError(error);\n })\n .finally(() => {\n vm.saving = false;\n });\n };\n vm.cancel = function() {\n close(null, 500);\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cloudX')\n .controller('EditRelationLinkDialogCtrl', [\n 'resourceFactorySvc',\n 'flySvc',\n '$element',\n 'close',\n 'relationLink',\n 'updateLink',\n editRelationLinkDialogCtrl,\n ]);\n\nfunction editRelationLinkDialogCtrl(\n resourceFactorySvc,\n flySvc,\n $element,\n close,\n relationLink,\n updateLink,\n) {\n var vm = this;\n vm.loading = true;\n vm.shareholderGroups = null;\n\n vm.relationLink = relationLink || {\n extraValues: {},\n };\n\n var resource = resourceFactorySvc.get('relationLink');\n\n if (relationLink.id) {\n resource\n .getDetails({\n id: relationLink.id,\n })\n .$promise.then(\n function(result) {\n vm.loading = false;\n if (result) {\n vm.relationLink.toRelation = result.target;\n delete result.target;\n vm.relationLink.extraValues = result;\n }\n },\n function(error) {\n vm.loading = false;\n showError(error);\n },\n );\n }\n\n var showError = function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n return '';\n };\n\n vm.updateValue = function(property, value) {\n var model = angular.copy(vm.relationLink);\n\n if (model[property] === value) return false;\n\n model[property] = value;\n\n return updateLink(model);\n};\n\n vm.submit = function(value, field) {\n if (vm.relationLink.extraValues[field] === value) return false;\n\n if (field === 'representedByRelation') {\n if (!!value && !value.id) {\n return '';\n }\n }\n\n var model = angular.copy(vm.relationLink);\n\n model.extraValues[field] = value;\n\n //Remove unnecessary properties before submitting\n if (model.extraValues.target) delete model.extraValues.target;\n if (model.info) delete model.info;\n if (model.target) delete model.target;\n\n const transformed = resourceFactorySvc.setDatePropsToISO(model);\n transformed.extraValues = JSON.stringify(transformed.extraValues);\n\n return resource.updateDetails(transformed).$promise.then(\n function(result) {\n if (result) {\n vm.relationLink.extraValues = result;\n }\n flySvc.success('msgConfirmChange');\n return false;\n },\n function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n return '';\n },\n );\n };\n\n vm.loadShareholderGroups = function() {\n if (vm.shareholderGroups !== null) return;\n vm.shareholderGroups = [];\n resource.shareholderGroups({ id: vm.relationLink.from }, function(result) {\n vm.shareholderGroups = result || [];\n });\n };\n if (vm.relationLink.linkType === 6) {\n vm.loadShareholderGroups();\n }\n\n vm.cancel = function() {\n $element.modal('hide');\n close(true, 500); // always refresh changes after because we cant rely on setting a property to check for changes (if editable component is open and user clicked on close for example)\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cloudX')\n .controller('EditTaskScheduleRemarkDialogCtrl', [\n '$element',\n '$http',\n 'appUrls',\n 'flySvc',\n 'close',\n 'taskScheduleId',\n 'value',\n editTaskScheduleRemarkDialogCtrl,\n ]);\n\nfunction editTaskScheduleRemarkDialogCtrl(\n $element,\n $http,\n appUrls,\n flySvc,\n close,\n taskScheduleId,\n value,\n) {\n const vm = this;\n vm.saving = false;\n vm.value = value || '';\n vm.save = function() {\n if (vm.saving) return;\n if ((value || '') === (vm.value || '')) {\n //Value not changed -> cancel\n $element.modal('hide');\n close(null, 500);\n return;\n }\n vm.saving = true;\n $http\n .put(`${appUrls.tasks}/api/TaskSchedules/Remark`, { taskScheduleId, remark: vm.value })\n .then(() => {\n $element.modal('hide');\n close({ value: vm.value }, 500);\n }, flySvc.error)\n .finally(() => {\n vm.saving = false;\n });\n };\n vm.close = function() {\n $element.modal('hide');\n close(null, 500);\n };\n\n vm.loaded = true;\n}\n","import angular from 'angular';\n\nangular\n .module('cloudX')\n .controller('EmployeeAccessDialogCtrl', [\n 'flySvc',\n '$http',\n 'appUrls',\n 'close',\n 'relationId',\n employeeAccessDialogCtrl,\n ]);\n\nfunction employeeAccessDialogCtrl(flySvc, $http, appUrls, close, relationId) {\n var vm = this;\n vm.lines = [];\n\n var showError = function(error) {\n flySvc.error(error.data.code, error.data.parameters, null, error.data.type);\n return '';\n };\n\n $http.get(appUrls.api + '/Api/Relation/EmployeeAccess/' + relationId).then(\n function({ data = [] }) {\n vm.lines = data;\n },\n function(error) {\n vm.lines = [];\n showError(error);\n },\n );\n\n vm.cancel = function() {\n close(null, 500);\n };\n}\n","import angular from 'angular';\nimport moment from 'moment';\n\nconst isGMValid = (gm, fiscalYearEnd) =>\n !gm || //Empty is valid\n (!moment(gm).isBefore(moment(fiscalYearEnd)) && //Not before end fiscal year\n !moment(gm).isAfter(\n moment(fiscalYearEnd)\n .clone()\n .add(6, 'months')\n .endOf('month'),\n )); //Max 6 months after end fiscal year\n\nangular\n .module('cloudX')\n .controller('FiscalYearDialogCtrl', [\n '$http',\n 'appUrls',\n 'flySvc',\n 'resourceFactorySvc',\n '$element',\n 'close',\n 'relationId',\n 'gmType',\n 'relPersistSvc',\n 'checkTenantConfiguration',\n fiscalYearDialogCtrl,\n ]);\n\nfunction fiscalYearDialogCtrl(\n $http,\n appUrls,\n flySvc,\n resourceFactorySvc,\n $element,\n close,\n relationId,\n gmType,\n relPersistSvc,\n checkTenantConfiguration,\n) {\n var vm = this;\n vm.lines = null;\n vm.showHistory = false;\n vm.reloadRelationData = false;\n vm.gmType = gmType;\n const isNetherlandsConfiguration = checkTenantConfiguration('[5]');\n\n var showError = function(error) {\n flySvc.error(error.data.code, error.data.parameters, null, error.data.type);\n return '';\n };\n var parseDate = date => (!date ? null : moment(date.substr(0, 10)).toDate());\n\n var mapLine = x => {\n var line = {\n ...x,\n fiscalYearStart: parseDate(x.fiscalYearStart),\n fiscalYearEnd: parseDate(x.fiscalYearEnd),\n generalMeeting: parseDate(x.generalMeeting),\n generalMeetingPostponed: parseDate(x.generalMeetingPostponed),\n };\n line.invalidGM =\n !isNetherlandsConfiguration && !isGMValid(line.generalMeeting, line.fiscalYearEnd);\n line.invalidGMPostponed =\n !isNetherlandsConfiguration && !isGMValid(line.generalMeetingPostponed, line.fiscalYearEnd);\n\n return line;\n };\n\n vm.retrieve = function() {\n return $http\n .get(appUrls.api + '/Api/FiscalYear/' + relationId, { params: { history: vm.showHistory } })\n .then(\n function({ data }) {\n vm.lines = data.map(mapLine);\n },\n function(error) {\n vm.lines = [];\n showError(error);\n },\n );\n };\n\n vm.submit = function(line, value, field) {\n if (field !== 'locked' && field !== 'generalMeetingPostponed' && field !== 'generalMeeting')\n return false;\n if (field === 'generalMeeting' && vm.gmType !== 3) return false;\n if (field === 'generalMeetingPostponed' && typeof value === 'undefined') return ''; //invalid date\n if (field === 'generalMeeting' && typeof value === 'undefined') return ''; //invalid date\n var copy = angular.copy(line);\n copy[field] = value;\n copy = resourceFactorySvc.setDatePropsToISO(copy);\n return $http.put(appUrls.api + '/Api/FiscalYear/Put', copy).then(function({ data }) {\n angular.extend(line, mapLine(data));\n if (field === 'generalMeetingPostponed' || field === 'generalMeeting')\n vm.reloadRelationData = true;\n return false;\n }, showError);\n };\n vm.getPostponedDateOptions = function(line) {\n var maxDate = moment(line.fiscalYearEnd)\n .clone()\n .add(6, 'month')\n .toDate();\n\n var minDate = moment(line.fiscalYearEnd)\n .clone()\n .add(1, 'day')\n .toDate();\n\n const initialDate = line.generalMeeting ? new Date(line.generalMeeting) : minDate;\n return {\n initDate: initialDate,\n minDate: minDate,\n maxDate: maxDate,\n startingDay: 1,\n };\n };\n vm.getGMDateOptions = function(line) {\n var maxDate = moment(line.fiscalYearEnd)\n .clone()\n .add(6, 'month')\n .toDate();\n var minDate = moment(line.fiscalYearEnd)\n .clone()\n .add(1, 'day')\n .toDate();\n\n return {\n initDate: minDate,\n minDate: minDate,\n maxDate: maxDate,\n startingDay: 1,\n };\n };\n vm.getEFYDateOptions = function(line) {\n var maxDate = moment(line.fiscalYearEnd)\n .clone()\n .add(1, 'year')\n .toDate();\n\n return {\n initDate: line.fiscalYearEnd,\n minDate: line.fiscalYearStart,\n maxDate: maxDate,\n startingDay: 1,\n };\n };\n vm.retrieveHistory = function() {\n vm.showHistory = true;\n return vm.retrieve();\n };\n vm.updateEndFiscalYear = function(line, newDate) {\n if (!newDate) return '';\n if (newDate === line.fiscalYearEnd) return false;\n var mDate = moment.utc(newDate);\n if (!mDate.isValid()) return '';\n if (mDate.isBefore(moment.utc(line.fiscalYearStart))) return '';\n if (\n mDate.isAfter(\n moment\n .utc(line.fiscalYearEnd)\n .clone()\n .add(1, 'year'),\n )\n )\n return '';\n return $http\n .put(appUrls.api + '/Api/FiscalYear/EndFiscalYear', {\n relationId,\n year: line.fiscalYear,\n endFiscalYear: mDate.toDate().ISO(),\n fiscalYearId: line.id,\n })\n .then(\n function({ data }) {\n vm.lines = data.map(mapLine);\n vm.showHistory = true; //Update returns all lines\n\n vm.reloadRelationData = true;\n relPersistSvc.recalcFiscalYearDeadlines(relationId);\n return false;\n },\n function(error) {\n showError(error);\n return '';\n },\n );\n };\n\n vm.retrieve();\n\n vm.cancel = function() {\n close(vm.reloadRelationData, 500);\n };\n}\n","import angular from 'angular';\nimport moment from 'moment';\nimport guid from '@/shared/utils/guid';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport DocumentService from '@/shared/services/DocumentService';\n\nangular\n .module('cloudX')\n .controller('FiscalCostDialog', [\n '$http',\n 'appUrls',\n 'flySvc',\n 'checkSecurity',\n '$element',\n 'close',\n 'relationId',\n 'data',\n 'documents',\n fiscalCostDialog,\n ]);\n\nfunction fiscalCostDialog(\n $http,\n appUrls,\n flySvc,\n checkSecurity,\n $element,\n close,\n relationId,\n data,\n documents,\n) {\n var vm = this;\n vm.saving = false;\n vm.loading = false;\n vm.readOnly = !checkSecurity('Relation:u');\n vm.showValidation = false;\n vm.datepickerOptions = {\n startingDay: 1,\n initDate: moment\n .utc()\n .startOf('day')\n .toDate(),\n };\n vm.relationId = relationId;\n vm.documentsAccessor = {};\n vm.documentLinkType = 7;\n vm.documents = [...(documents || [])];\n vm.documentsChanged = false;\n vm.onDocumentsChanged = function() {\n vm.documentsChanged = true;\n };\n vm.realEstates = [];\n vm.selectedRealEstate = {};\n\n var getRealEstates = () => {\n vm.loading = true;\n $http.get(`${appUrls.api}/api/Fiscal/realEstates/${relationId}`).then(\n function(result) {\n vm.realEstates = result.data;\n setupViewModels();\n },\n function(error) {\n flySvc.error(error);\n setupViewModels();\n },\n );\n };\n getRealEstates();\n\n var setupViewModels = () => {\n vm.cost = angular.extend(\n {\n relationId: relationId,\n type: null,\n reference: null,\n professionalUsePercentage: null,\n remark: null,\n endUser: null,\n vatDeductionPercentage: null,\n },\n data,\n );\n\n vm.endUser = {\n relation: vm.cost.endUser,\n text: vm.cost.endUserName,\n };\n vm.selectedRealEstate = vm.cost.realEstateId\n ? vm.realEstates.find(x => x.id === vm.cost.realEstateId)\n : null;\n vm.loading = false;\n };\n\n vm.endUserChanged = function() {\n const { relation = null, text = null } = vm.endUser || {};\n\n vm.cost.endUser = relation;\n vm.cost.endUserName = text;\n };\n vm.isValid = function() {\n if (!vm.form) return false;\n if (vm.form.$invalid) return false;\n if (vm.cost.endUser && !vm.cost.endUser.id) return false;\n\n return true;\n };\n\n vm.save = function() {\n if (!vm.isValid()) return '';\n if (vm.saving) return '';\n\n var model = {\n ...vm.cost,\n realEstateId: vm.selectedRealEstate?.id,\n };\n\n vm.saving = true;\n $http.post(`${appUrls.api}/api/Fiscal/Cost`, model).then(\n function({ data }) {\n if (data.id) {\n vm.cost.id = data.id;\n if (vm.documentsAccessor && vm.documentsAccessor.uploadNewDocuments) {\n return vm.documentsAccessor.uploadNewDocuments(data.id).then(changed => {\n vm.saving = false;\n flySvc.success();\n\n close([data, changed || vm.documentsChanged ? vm.documents : null], 500);\n $element.modal('hide');\n });\n }\n }\n\n vm.saving = false;\n flySvc.success();\n\n close([data, vm.documentsChanged ? vm.documents : null], 500);\n $element.modal('hide');\n },\n function(error) {\n vm.saving = false;\n flySvc.error(error);\n return '';\n },\n );\n };\n\n vm.cancel = function() {\n close([null, vm.documentsChanged ? vm.documents : null], 500);\n };\n}\n","import angular from 'angular';\nimport moment from 'moment';\nimport guid from '@/shared/utils/guid';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport DocumentService from '@/shared/services/DocumentService';\n\nangular\n .module('cloudX')\n .controller('FiscalInsuranceDialog', [\n '$http',\n 'appUrls',\n 'flySvc',\n 'checkSecurity',\n '$element',\n 'close',\n 'relationId',\n 'data',\n 'documents',\n fiscalInsuranceDialog,\n ]);\n\nfunction fiscalInsuranceDialog(\n $http,\n appUrls,\n flySvc,\n checkSecurity,\n $element,\n close,\n relationId,\n data,\n documents,\n) {\n var vm = this;\n vm.saving = false;\n vm.readOnly = !checkSecurity('Relation:u');\n vm.showValidation = false;\n vm.datepickerOptions = {\n startingDay: 1,\n initDate: moment\n .utc()\n .startOf('day')\n .toDate(),\n };\n\n vm.relationId = relationId;\n vm.documentsAccessor = {};\n vm.documentLinkType = 8;\n vm.documents = [...(documents || [])];\n vm.documentsChanged = false;\n vm.onDocumentsChanged = function() {\n vm.documentsChanged = true;\n };\n\n vm.realEstates = [];\n vm.selectedRealEstate = {};\n\n var getRealEstates = () => {\n vm.loading = true;\n $http.get(`${appUrls.api}/api/Fiscal/realEstates/${relationId}`).then(\n function(result) {\n vm.realEstates = result.data;\n setupViewModels();\n },\n function(error) {\n flySvc.error(error);\n setupViewModels();\n },\n );\n };\n getRealEstates();\n var setupViewModels = () => {\n vm.insurance = angular.extend(\n {\n relationId: relationId,\n creditInstitution: null,\n reference: null,\n amount: null,\n date: null,\n purpose: null,\n repaymentAmount: null,\n repaymentMonths: null,\n professionalUsePercentage: null,\n remark: null,\n },\n data,\n );\n vm.endUser = {\n relation: vm.insurance.endUser,\n text: vm.insurance.endUserName,\n };\n\n vm.selectedRealEstate = vm.insurance.realEstateId\n ? vm.realEstates.find(x => x.id === vm.insurance.realEstateId)\n : null;\n vm.loading = false;\n };\n\n vm.endUserChanged = function() {\n const { relation = null, text = null } = vm.endUser || {};\n\n vm.insurance.endUser = relation;\n vm.insurance.endUserName = text;\n };\n\n vm.save = function() {\n if (vm.form.$invalid) return '';\n if (vm.saving) return '';\n\n var model = {\n ...vm.insurance,\n realEstateId: vm.selectedRealEstate?.id,\n };\n\n vm.saving = true;\n $http.post(`${appUrls.api}/api/Fiscal/Insurance`, model).then(\n function({ data }) {\n if (typeof data.date === 'string') data.date = moment.utc(data.date.substr(0, 10)).toDate();\n\n if (data.id) {\n vm.insurance.id = data.id;\n if (vm.documentsAccessor && vm.documentsAccessor.uploadNewDocuments) {\n return vm.documentsAccessor.uploadNewDocuments(data.id).then(changed => {\n vm.saving = false;\n flySvc.success();\n\n close([data, changed || vm.documentsChanged ? vm.documents : null], 500);\n $element.modal('hide');\n });\n }\n }\n\n vm.saving = false;\n flySvc.success();\n close([data, vm.documentsChanged ? vm.documents : null], 500);\n $element.modal('hide');\n },\n function(error) {\n vm.saving = false;\n flySvc.error(error);\n return '';\n },\n );\n };\n vm.cancel = function() {\n close([null, vm.documentsChanged ? vm.documents : null], 500);\n };\n}\n","import angular from 'angular';\nimport moment from 'moment';\nimport guid from '@/shared/utils/guid';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport DocumentService from '@/shared/services/DocumentService';\n\nangular\n .module('cloudX')\n .controller('FiscalLoanDialog', [\n '$http',\n 'appUrls',\n 'flySvc',\n 'checkSecurity',\n '$element',\n 'close',\n 'relationId',\n 'data',\n 'documents',\n fiscalLoanDialog,\n ]);\n\nfunction fiscalLoanDialog(\n $http,\n appUrls,\n flySvc,\n checkSecurity,\n $element,\n close,\n relationId,\n data,\n documents,\n) {\n var vm = this;\n vm.saving = false;\n vm.readOnly = !checkSecurity('Relation:u');\n vm.showValidation = false;\n vm.datepickerOptions = {\n startingDay: 1,\n initDate: moment\n .utc()\n .startOf('day')\n .toDate(),\n };\n vm.relationId = relationId;\n vm.documentsAccessor = {};\n vm.documentLinkType = 9;\n vm.documents = [...(documents || [])];\n vm.documentsChanged = false;\n vm.onDocumentsChanged = function() {\n vm.documentsChanged = true;\n };\n vm.loan = angular.extend(\n {\n relationId: relationId,\n creditInstitution: null,\n reference: null,\n amount: null,\n startDate: null,\n endDate: null,\n purpose: null,\n repaymentAmount: null,\n repaymentMonths: null,\n remark: null,\n },\n data,\n );\n\n vm.save = function() {\n if (vm.form.$invalid) return '';\n if (vm.saving) return '';\n\n vm.saving = true;\n $http.post(`${appUrls.api}/api/Fiscal/Loan`, vm.loan).then(\n function({ data }) {\n if (typeof data.startDate === 'string')\n data.startDate = moment.utc(data.startDate.substr(0, 10)).toDate();\n if (typeof data.endDate === 'string')\n data.endDate = moment.utc(data.endDate.substr(0, 10)).toDate();\n if (data.id) {\n vm.loan.id = data.id;\n if (vm.documentsAccessor && vm.documentsAccessor.uploadNewDocuments) {\n return vm.documentsAccessor.uploadNewDocuments(data.id).then(changed => {\n vm.saving = false;\n flySvc.success();\n\n close([data, changed || vm.documentsChanged ? vm.documents : null], 500);\n $element.modal('hide');\n });\n }\n }\n\n vm.saving = false;\n flySvc.success();\n close([data, vm.documentsChanged ? vm.documents : null], 500);\n $element.modal('hide');\n },\n function(error) {\n vm.saving = false;\n flySvc.error(error);\n return '';\n },\n );\n };\n vm.cancel = function() {\n close([null, vm.documentsChanged ? vm.documents : null], 500);\n };\n}\n","import angular from 'angular';\nimport moment from 'moment';\nimport guid from '@/shared/utils/guid';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport DocumentService from '@/shared/services/DocumentService';\n\nangular\n .module('cloudX')\n .controller('FiscalRealEstateDialog', [\n '$http',\n 'appUrls',\n 'flySvc',\n 'checkSecurity',\n '$element',\n 'close',\n 'relationId',\n 'data',\n 'documents',\n fiscalRealEstateDialog,\n ]);\n\nfunction fiscalRealEstateDialog(\n $http,\n appUrls,\n flySvc,\n checkSecurity,\n $element,\n close,\n relationId,\n data,\n documents,\n) {\n var vm = this;\n vm.saving = false;\n vm.readOnly = !checkSecurity('Relation:u');\n vm.showValidation = false;\n vm.datepickerOptions = {\n startingDay: 1,\n initDate: moment\n .utc()\n .startOf('day')\n .toDate(),\n };\n vm.relationId = relationId;\n vm.documentsAccessor = {};\n vm.documentLinkType = 10;\n vm.documents = [...(documents || [])];\n vm.documentsChanged = false;\n vm.onDocumentsChanged = function() {\n vm.documentsChanged = true;\n };\n vm.item = angular.extend(\n {\n relationId: relationId,\n amount: null,\n remark: null,\n cadastralIncome: null,\n monthlyRent: null,\n parcelNumber: null,\n vatDeductionPercentage: null,\n dateOfFirstUse: null,\n },\n data,\n );\n\n vm.save = function() {\n if (vm.form.$invalid) return '';\n if (vm.saving) return '';\n\n vm.saving = true;\n $http.post(`${appUrls.api}/api/Fiscal/RealEstate`, vm.item).then(\n function({ data }) {\n if (typeof data.dateOfFirstUse === 'string') data.dateOfFirstUse = moment.utc(data.dateOfFirstUse.substr(0, 10)).toDate();\n if (data.id) {\n vm.item.id = data.id;\n if (vm.documentsAccessor && vm.documentsAccessor.uploadNewDocuments) {\n return vm.documentsAccessor.uploadNewDocuments(data.id).then(changed => {\n vm.saving = false;\n flySvc.success();\n\n close([data, changed || vm.documentsChanged ? vm.documents : null], 500);\n $element.modal('hide');\n });\n }\n }\n vm.saving = false;\n flySvc.success();\n close([data, vm.documentsChanged ? vm.documents : null], 500);\n $element.modal('hide');\n },\n function(error) {\n vm.saving = false;\n flySvc.error(error);\n return '';\n },\n );\n };\n vm.cancel = function() {\n close([null, vm.documentsChanged ? vm.documents : null], 500);\n };\n}\n","import angular from 'angular';\nimport moment from 'moment';\nimport guid from '@/shared/utils/guid';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport DocumentService from '@/shared/services/DocumentService';\n\nangular\n .module('cloudX')\n .controller('FiscalVehicleDialog', [\n '$http',\n 'appUrls',\n 'flySvc',\n 'checkSecurity',\n '$element',\n 'close',\n 'relationId',\n 'data',\n 'documents',\n fiscalVehicleDialog,\n ]);\n\nfunction fiscalVehicleDialog(\n $http,\n appUrls,\n flySvc,\n checkSecurity,\n $element,\n close,\n relationId,\n data,\n documents,\n) {\n var vm = this;\n vm.saving = false;\n vm.readOnly = !checkSecurity('Relation:u');\n vm.showValidation = false;\n vm.datepickerOptions = {\n startingDay: 1,\n initDate: moment\n .utc()\n .startOf('day')\n .toDate(),\n };\n vm.relationId = relationId;\n vm.documentsAccessor = {};\n vm.documentLinkType = 11;\n vm.documents = [...(documents || [])];\n vm.documentsChanged = false;\n vm.onDocumentsChanged = function() {\n vm.documentsChanged = true;\n };\n vm.vehicle = angular.extend(\n {\n relationId: relationId,\n type: 1,\n fuelType: null,\n brandAndModel: null,\n purchaseDate: null,\n saleDate: null,\n firstRegistrationDate: null,\n licensePlate: null,\n co2: null,\n co2WLTP: null,\n catalogValue: null,\n purchaseValue: null,\n professionalUsePercentage: null,\n vatDeductionPercentage: null,\n remark: null,\n endUser: null,\n },\n data,\n );\n vm.endUser = {\n relation: vm.vehicle.endUser,\n text: vm.vehicle.endUserName,\n };\n\n vm.endUserChanged = function() {\n const { relation = null, text = null } = vm.endUser || {};\n\n vm.vehicle.endUser = relation;\n vm.vehicle.endUserName = text;\n };\n\n vm.isValid = function() {\n if (!vm.form) return false;\n if (vm.form.$invalid) return false;\n if (vm.vehicle.endUser && !vm.vehicle.endUser.id) return false;\n\n return true;\n };\n\n vm.save = function() {\n if (!vm.isValid()) return '';\n if (vm.saving) return '';\n\n vm.saving = true;\n $http.post(`${appUrls.api}/api/Fiscal/Vehicle`, vm.vehicle).then(\n function({ data }) {\n if (typeof data.purchaseDate === 'string')\n data.purchaseDate = moment.utc(data.purchaseDate.substr(0, 10)).toDate();\n if (typeof data.saleDate === 'string')\n data.saleDate = moment.utc(data.saleDate.substr(0, 10)).toDate();\n if (typeof data.firstRegistrationDate === 'string')\n data.firstRegistrationDate = moment\n .utc(data.firstRegistrationDate.substr(0, 10))\n .toDate();\n\n if (data.id) {\n vm.vehicle.id = data.id;\n if (vm.documentsAccessor && vm.documentsAccessor.uploadNewDocuments) {\n return vm.documentsAccessor.uploadNewDocuments(data.id).then(changed => {\n vm.saving = false;\n flySvc.success();\n\n close([data, changed || vm.documentsChanged ? vm.documents : null], 500);\n $element.modal('hide');\n });\n }\n }\n vm.saving = false;\n flySvc.success();\n\n close([data, vm.documentsChanged ? vm.documents : null], 500);\n $element.modal('hide');\n },\n function(error) {\n vm.saving = false;\n flySvc.error(error);\n return '';\n },\n );\n };\n vm.cancel = function() {\n close([null, vm.documentsChanged ? vm.documents : null], 500);\n };\n}\n","import angular from 'angular';\nimport moment from 'moment';\nimport adminpulse from '@/shared/utils/adminpulse';\nimport { v4 as uuidv4 } from 'uuid';\n\nangular\n .module('cxRelations')\n .controller('GenerateRelationDocumentDialogCtrl', [\n '$element',\n 'translateListFilter',\n '$translate',\n 'relationNameFilter',\n 'flySvc',\n '$http',\n 'appUrls',\n 'close',\n 'relationId',\n 'language',\n 'companyId',\n 'relationType',\n 'templateTypes',\n 'FileSaver',\n 'Blob',\n generateRelationDocumentDialogCtrl,\n ]);\n\nfunction generateRelationDocumentDialogCtrl(\n $element,\n translateListFilter,\n $translate,\n relationNameFilter,\n flySvc,\n $http,\n appUrls,\n close,\n relationId,\n language,\n companyId,\n relationType,\n templateTypes,\n FileSaver,\n Blob,\n) {\n var vm = this;\n vm.loading = true;\n vm.preview = null;\n vm.loadingPreview = false;\n vm.templates = [];\n vm.template = null;\n vm.hasEmptyTags = false;\n vm.templateTags = [];\n vm.saving = false;\n vm.generating = false;\n vm.validatingTemplate = false;\n vm.linkedRelations = null;\n vm.hasQrCodeTag = false;\n\n vm.document = {\n documentDate: moment\n .utc()\n .startOf('day')\n .toDate(),\n relationId: relationId,\n documentStartDate: null,\n addQrCode: false,\n desiredDocumentId: uuidv4(),\n };\n\n $http\n .get(`${appUrls.api}/api/documentTemplate/Templates`, {\n params: {\n templateTypes: templateTypes || [99],\n companyId,\n relationType,\n },\n })\n .then(function(result) {\n vm.templates = (result.data || []).map(x => ({\n ...x,\n group: translateListFilter(x.templateType, 'TemplateType'),\n }));\n if (typeof language === 'string' && language) {\n vm.templates = vm.templates.filter(x => x.languageCode === language);\n }\n vm.loading = false;\n });\n\n vm.cancel = function() {\n $element.modal('hide');\n close(null, 500);\n };\n\n vm.generate = function(type) {\n if (!vm.template || !vm.template.id) return;\n vm.saving = true;\n\n const model = vm.getGenerateModel();\n\n if (type === 'preview') {\n vm.loadingPreview = true;\n $http.post(appUrls.api + '/Api/RelationDocument/Preview', model).then(\n function(result) {\n vm.loadingPreview = false;\n vm.saving = false;\n if (result && result.data) {\n vm.preview = result.data.file;\n }\n },\n function(error) {\n vm.saving = false;\n vm.loadingPreview = false;\n flySvc.error(error);\n },\n );\n } else if (type === 'download') {\n vm.downloading = true;\n model.asPdf = false;\n $http.post(appUrls.api + '/Api/RelationDocument/download', model).then(\n function(result) {\n vm.downloading = false;\n vm.saving = false;\n if (result && result.data) {\n var arrayBuffer = adminpulse.base64ToArrayBuffer(result.data.file);\n var blob = new Blob([arrayBuffer], { type: result.data.mime });\n FileSaver.saveAs(blob, result.data.name);\n }\n },\n function(error) {\n vm.saving = false;\n vm.downloading = false;\n flySvc.error(error.code, error.parameters);\n },\n );\n } else if (type === 'downloadPdf') {\n vm.downloadingPdf = true;\n model.asPdf = true;\n $http.post(appUrls.api + '/Api/RelationDocument/download', model).then(\n function(result) {\n vm.downloadingPdf = false;\n vm.saving = false;\n if (result && result.data) {\n var arrayBuffer = adminpulse.base64ToArrayBuffer(result.data.file);\n var blob = new Blob([arrayBuffer], { type: result.data.mime });\n FileSaver.saveAs(blob, result.data.name);\n }\n },\n function(error) {\n vm.saving = false;\n vm.downloadingPdf = false;\n flySvc.error(error.code, error.parameters);\n },\n );\n } else if (type === 'email') {\n vm.preparingEmail = true;\n $http.post(appUrls.api + '/Api/RelationDocument/PrepareForEmail', model).then(\n function(result) {\n vm.preparingEmail = false;\n vm.saving = false;\n if (result && result.data) {\n close(\n {\n document: result.data,\n openEmailDialog: true,\n },\n 500,\n );\n $element.modal('hide');\n }\n },\n function(error) {\n vm.saving = false;\n vm.preparingEmail = false;\n flySvc.error(error.code, error.parameters);\n },\n );\n } else if (type === 'save') {\n vm.generating = true;\n $http.post(appUrls.api + '/Api/RelationDocument/Generate', model).then(\n function(result) {\n vm.saving = false;\n if (result && result.data) {\n vm.generating = false;\n close(\n {\n document: result.data,\n openEmailDialog: false,\n },\n 500,\n );\n $element.modal('hide');\n }\n },\n function(error) {\n vm.saving = false;\n vm.generating = false;\n flySvc.error(error);\n },\n );\n }\n };\n\n vm.getGenerateModel = function() {\n const model = angular.copy(vm.document);\n if (model.documentDate instanceof Date) model.documentDate = moment.utc(model.documentDate);\n if (model.documentStartDate && model.documentStartDate instanceof Date)\n model.documentStartDate = moment.utc(model.documentStartDate);\n model.tags = (vm.templateTags || []).reduce((o, e) => {\n if (!!e.value) {\n o[e.tag] = e.value;\n }\n return o;\n }, {});\n return model;\n };\n\n vm.loadLinkedRelations = function() {\n if (vm.linkedRelations) return;\n vm.linkedRelations = [];\n $http.get(`${appUrls.api}/api/RelationLink/Get/${relationId}`).then(function(result) {\n let activeRelationLinks = [];\n\n const now = moment.utc();\n\n result.data.forEach(linkedRelation => {\n const endDate = linkedRelation.info?.endDate ?? linkedRelation.info?.mandateEndDate;\n\n if (!endDate || now.isBefore(moment.utc(endDate))) {\n activeRelationLinks.push(linkedRelation);\n }\n });\n\n let grouped = Object.groupBy(\n activeRelationLinks,\n x => x.target.id + '/' + (x.info && x.info.representedBy),\n );\n\n let labelFor = link =>\n translateListFilter(link.linkType, 'linktypeto') +\n (link.info && link.info.position\n ? ': ' + translateListFilter(link.info && link.info.position, 'companyownerposition')\n : '');\n\n vm.linkedRelations = Object.values(grouped)\n .map(x => ({\n name: relationNameFilter(x[0].target),\n linkTypes: x\n .map(link => labelFor(link))\n .sort()\n .join(', '),\n representative: x[0].info && x[0].info.representedBy,\n }))\n .sort((a, b) => a.name.localeCompare(b.name))\n .map(x => {\n let label = x.name + ' (' + x.linkTypes + ')';\n let self = { name: x.name, label };\n let representative = x.representative\n ? {\n name: x.representative,\n label:\n '- ' +\n x.representative +\n ': ' +\n $translate.instant('RepresentativeOf', { relation: x.name }),\n }\n : null;\n return representative ? [self, representative] : [self];\n })\n .reduce((a, b) => a.concat(b), []);\n });\n };\n\n vm.templateChanged = function() {\n if (!vm.template?.id) {\n vm.template = null;\n vm.document.templateId = null;\n vm.document.documentStartDate = null;\n vm.templateTags = [];\n vm.preview = null;\n vm.loadingPreview = false;\n\n return;\n }\n vm.document.templateId = vm.template.id;\n vm.document.documentStartDate = null;\n\n const model = vm.getGenerateModel();\n vm.validatingTemplate = true;\n vm.templateTags = [];\n vm.hasEmptyTags = false;\n vm.hasQrCodeTag = false;\n\n $http.post(appUrls.api + '/api/RelationDocument/ResolveTemplateTags', model).then(\n function(result) {\n vm.validatingTemplate = false;\n if (result && result.data) {\n if (result.data.assignmentStartDate) {\n vm.document.documentStartDate = moment\n .utc(result.data.assignmentStartDate)\n .startOf('day')\n .toDate();\n }\n\n vm.hasEmptyTags = !!result.data.emptyTags && result.data.emptyTags.length;\n result.data.emptyTags.forEach(tag => {\n //Lower case and remove {}\n const key = tag.toLowerCase().replace(/[{}]/, '');\n\n if (key === 'document.qr') {\n vm.hasQrCodeTag = true;\n return;\n }\n if (key === 'representedby' && vm.linkedRelations === null) {\n vm.loadLinkedRelations();\n }\n vm.templateTags.push({\n tag,\n key,\n info: translateListFilter(`{${key}}`, 'mailplaceholder', ''),\n value: '',\n });\n });\n }\n },\n function(error) {\n vm.validatingTemplate = false;\n flySvc.error(error.code, error.parameters);\n },\n );\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cxTaskflow')\n .controller('InvoiceMethodChangedDialogCtrl', [\n '$element',\n '$filter',\n 'close',\n 'advances',\n invoiceMethodChangedDialogCtrl,\n ]);\n\nfunction invoiceMethodChangedDialogCtrl($element, $filter, close, advances) {\n var vm = this;\n vm.advances = {\n count: advances.count || 0,\n amount: $filter('dynCurrency')(advances.amount || 0),\n };\n vm.save = function(removeAdvances) {\n $element.modal('hide');\n close(removeAdvances, 500);\n };\n\n vm.cancel = function() {\n $element.modal('hide');\n close(null, 500);\n };\n}\n","import angular from 'angular';\nimport moment from 'moment';\n\nimport adminpulse from '@/shared/utils/adminpulse';\nimport { emptyGuid } from '@/shared/utils/guid';\nimport { getPercentageColorClass } from '@/modules/relations/budgets/budgetHelpers';\nangular\n .module('cloudX')\n .controller('InvoiceStreamBudgetDialogCtrl', [\n '$http',\n 'dialogsSvc',\n 'flySvc',\n '$element',\n 'close',\n 'stream',\n 'readOnly',\n 'appUrls',\n 'checkSecurity',\n invoiceStreamBudgetDialogCtrl,\n ]);\n\nconst mapBudget = data => {\n if (!data) {\n return null;\n }\n data.percentageAmount = data.budgetAmount ? (data.actualAmount || 0) / data.budgetAmount : null;\n data.percentageHours = data.budgetHours ? (data.actualHours || 0) / data.budgetHours : null;\n data.amountClass = getPercentageColorClass(data.percentageAmount);\n data.hoursClass = getPercentageColorClass(data.percentageHours);\n return data;\n};\n\nfunction invoiceStreamBudgetDialogCtrl(\n $http,\n dialogsSvc,\n flySvc,\n $element,\n close,\n stream,\n readOnly,\n appUrls,\n checkSecurity,\n) {\n var vm = this;\n vm.lines = [];\n vm.hasChanges = false;\n vm.years = [];\n vm.readOnly = readOnly;\n\n var showError = function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n return '';\n };\n vm.recalcYears = function() {\n const currentYear = moment.utc().year();\n vm.years = [];\n for (let y = currentYear - 3; y <= currentYear + 1; y++) {\n if (vm.lines && !vm.lines.some(x => x.year === y)) {\n vm.years.push(y);\n }\n }\n };\n $http.get(`${appUrls.api}/api/Budget/All/${stream.id}`).then(({ data }) => {\n vm.lines = (data || []).map(mapBudget);\n vm.recalcYears();\n }, showError);\n\n vm.cancel = function() {\n close(vm.hasChanges, 500);\n };\n vm.saveBudget = function(line, field, data) {\n //Validation error\n if (typeof data === 'undefined') return '';\n if (angular.equals(line, data)) return false;\n var model = angular.copy(line);\n model[field] = data;\n vm.hasChanges = true;\n return $http.put(`${appUrls.api}/api/budget/`, model).then(({ data }) => {\n const newBudget = mapBudget(data);\n angular.extend(line, newBudget);\n return false;\n }, showError);\n };\n\n vm.deleteBudget = function(line) {\n if (!line || !line.id) return;\n if (line.id === emptyGuid) {\n var idx = vm.lines.indexOf(line);\n if (idx >= 0) vm.lines.splice(idx, 1);\n return;\n }\n dialogsSvc.showYesNo('msgConfirmDeleteTitle', 'msgDeleteBudget').then(function() {\n line.deleting = true;\n $http.delete(`${appUrls.api}/api/Budget/${line.id}`).then(function() {\n vm.hasChanges = true;\n flySvc.success();\n var idx = vm.lines.indexOf(line);\n if (idx >= 0) vm.lines.splice(idx, 1);\n\n vm.recalcYears();\n return false;\n }, showError);\n });\n };\n\n vm.addBudget = function(year) {\n const model = {\n invoiceStreamId: stream.id,\n year,\n budgetAmount: null,\n budgetHours: null,\n };\n return $http.put(`${appUrls.api}/api/budget/`, model).then(({ data }) => {\n const newBudget = mapBudget(data);\n vm.lines.push(newBudget);\n vm.recalcYears();\n return false;\n }, showError);\n };\n}\n","import angular from 'angular';\nimport moment from 'moment';\nimport DocumentService from '@/shared/services/DocumentService';\n\nconst mapScheduleLine = line => ({\n ...line,\n invoiceTextType:\n line.invoicingType === 0\n ? 3 // RegistrationBased\n : line.invoicingType === 1\n ? 0 // FixedAmount\n : line.fixed\n ? 1 // Advance\n : 2, // Settlement\n isHistory: !!line.processed || !!line.isRemoved,\n isCurrentSchedule: !line.isRemoved || !line.processed,\n});\n\nangular\n .module('cloudX')\n .controller('InvoiceStreamScheduleDialogCtrl', [\n 'resourceFactorySvc',\n 'dialogsSvc',\n 'flySvc',\n '$element',\n 'close',\n 'stream',\n 'appUrls',\n 'checkSecurity',\n '$http',\n '$timeout',\n invoiceStreamScheduleDialogCtrl,\n ]);\n\nfunction invoiceStreamScheduleDialogCtrl(\n resourceFactorySvc,\n dialogsSvc,\n flySvc,\n $element,\n close,\n stream,\n appUrls,\n checkSecurity,\n $http,\n $timeout,\n) {\n var vm = this;\n vm.lines = [];\n vm.showHistory = false;\n vm.historyEnabled = false;\n vm.showTaskInfo = false;\n vm.taskDetail = null;\n vm.invoicingType = (\n stream.schedule || {\n invoicingType: -1,\n }\n ).invoicingType;\n vm.invoiceTexts = null;\n var hasChanges = false;\n vm.streamAmount = stream.amount;\n vm.scheduleId = (stream.schedule || {}).id;\n\n vm.showInvoiceTextInfo = false;\n vm.hasLinesFromOlderSchedules = false;\n\n var showError = function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n return '';\n };\n\n var resource = resourceFactorySvc.get('invoiceStream');\n resource.schedules(\n {\n id: stream.id,\n },\n function(data) {\n vm.lines = data.map(mapScheduleLine);\n vm.historyEnabled = vm.lines.some(function(line) {\n return line.processed === true || line.isRemoved;\n });\n vm.showHistory =\n vm.lines.some(\n line =>\n !line.isRemoved &&\n line.processed &&\n moment(line.invoiceCreationDate).isAfter(moment().utc()),\n ) || vm.lines.every(line => line.processed || line.isRemoved);\n vm.hasLinesFromOlderSchedules = vm.lines.some(line => !line.isCurrentSchedule);\n\n vm.showTaskInfo = vm.lines.some(x => x.taskId);\n },\n showError,\n );\n\n vm.showInvoice = function(documentPdfId) {\n if (!documentPdfId) {\n flySvc.error('msgCouldNotFindInvoicePdf');\n return;\n }\n DocumentService.open(documentPdfId);\n };\n\n vm.save = function() {\n close(hasChanges, 500);\n $element.modal('hide');\n };\n\n vm.cancel = function() {\n close(hasChanges, 500);\n };\n\n vm.loadInvoiceTexts = function() {\n if (vm.invoiceTexts != null) return null;\n return resourceFactorySvc.get('invoiceText').get(\n {},\n function(data) {\n vm.invoiceTexts = data;\n },\n showError,\n ).$promise;\n };\n vm.updateLine = function(line, field, data, ignoreDateCheck = false) {\n //Validation error\n if (typeof data === 'undefined') return '';\n if (angular.equals(line[field], data)) return false;\n if (field === 'invoiceText' && !!vm.scheduleId && checkSecurity('Settings:u')) {\n vm.showInvoiceTextInfo = true;\n }\n\n if (!ignoreDateCheck) {\n if (\n (field === 'date' && Math.abs(moment(data).diff(moment(line.date), 'months')) >= 1) ||\n (field === 'invoiceCreationDate' &&\n Math.abs(moment(data).diff(moment(line.invoiceCreationDate), 'months')) >= 1)\n ) {\n return dialogsSvc.showYesNo('comfirmTitle', 'msgConfirmChangeScheduleDateMessage').then(\n function() {\n return vm.updateLine(line, field, data, true);\n },\n function() {\n return false;\n },\n );\n }\n }\n\n var model = angular.copy(line);\n var dateChanged = false;\n if (field === 'date' && moment(data).isAfter(moment(line.invoiceCreationDate))) {\n model.invoiceCreationDate = moment(data)\n .clone()\n .add(1, 'day')\n .toDate();\n dateChanged = true;\n } else if (field === 'invoiceCreationDate' && moment(data).isBefore(moment(line.date))) {\n model.date = moment(data)\n .clone()\n .add(-1, 'day')\n .toDate();\n dateChanged = true;\n }\n model[field] = data;\n return resource.updateSchedule(model).$promise.then(function(response) {\n if (response) {\n hasChanges = true;\n angular.extend(line, response);\n if (dateChanged) {\n flySvc.message(\n `msgInvoiceScheduleDateChanged${field === 'date' ? 'InvoiceCreationDate' : 'Date'}`,\n );\n }\n }\n return false;\n }, showError);\n };\n\n vm.deleteLine = function(id) {\n dialogsSvc\n .showYesNo('msgConfirmDeleteTitle', 'msgDeleteInvoiceStreamScheduleLine')\n .then(function() {\n resource\n .deleteSchedule({\n id: id,\n })\n .$promise.then(function(response) {\n if (response) {\n hasChanges = true;\n flySvc.success('msgInvoiceStreamScheduleLineDeleted');\n if (vm.lines) {\n for (var t = 0; t < vm.lines.length; t++) {\n if (vm.lines[t].id === id) {\n vm.lines[t].isRemoved = true;\n vm.lines[t].isHistory = true;\n vm.historyEnabled = true;\n //vm.lines.splice(t, 1);\n break;\n }\n }\n }\n }\n return false;\n }, showError);\n });\n };\n\n vm.reprocessLine = function(line) {\n if (!line || line.invoice || line.isRemoved || !line.processed || !line.id) return;\n line.saving = true;\n return $http\n .post(`${appUrls.api}/api/InvoiceStream/ReprocessSchedule`, null, {\n params: { id: line.id },\n })\n .then(({ data = null }) => {\n if (data) {\n angular.extend(line, mapScheduleLine(data));\n hasChanges = true;\n }\n }, showError)\n .finally(() => {\n line.saving = false;\n });\n };\n\n vm.openTask = function(taskId) {\n if (!taskId) return;\n vm.taskDetail = { id: taskId };\n };\n vm.closeTaskDetail = function() {\n $timeout(() => {\n vm.taskDetail = null;\n }, 0);\n };\n}\n","import { dynamicSort } from '@/shared/utils/dynamicSort';\nimport angular from 'angular';\nimport moment from 'moment';\n\nangular\n .module('cloudX')\n .controller('InvoiceStreamSettingsDialogCtrl', [\n 'resourceFactorySvc',\n 'ModalService',\n 'dataCache',\n 'checkSecurity',\n '$translate',\n 'translateListFilter',\n 'flySvc',\n '$element',\n 'close',\n 'invoicestream',\n 'relation',\n 'forInvoicingVia',\n invoiceStreamSettingsDialogCtrl,\n ]);\n\nfunction invoiceStreamSettingsDialogCtrl(\n resourceFactorySvc,\n ModalService,\n dataCache,\n checkSecurity,\n $translate,\n translateListFilter,\n flySvc,\n $element,\n close,\n invoicestream,\n relation,\n forInvoicingVia,\n) {\n var vm = this;\n vm.saving = false;\n vm.hasInvoiceTeamAccess = checkSecurity('InvoiceDraft:r') && relation.hasInvoiceTeamAccess;\n vm.readOnly = !checkSecurity('InvoiceDraft:u') || !relation.hasInvoiceTeamAccess;\n vm.invoicestream = angular.copy(invoicestream);\n if (invoicestream.schedule) {\n vm.invoicestream.startDate = invoicestream.startDate;\n } else {\n vm.invoicestream.startDate = moment\n .utc()\n .startOf('day')\n .toDate();\n }\n vm.isInvoicingVia = forInvoicingVia;\n vm.originalHasInvoicingVia = false;\n vm.schedule = null;\n vm.schedules = null;\n vm.invTypeCnt = [0, 0, 0];\n vm.datepickerOptions = {\n minDate: moment\n .utc()\n .startOf('day')\n .subtract(1, 'years')\n .toDate(),\n startingDay: 1,\n };\n vm.showValidation = false;\n\n var originalInvoicingType = vm.invoicestream.schedule\n ? vm.invoicestream.schedule.invoicingType\n : null;\n\n var showError = function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n return '';\n };\n\n vm.loadSchedules = function() {\n return resourceFactorySvc.get('invoiceSchedule').query(\n {},\n function(data) {\n vm.schedules = [\n {\n key: '0',\n label: $translate.instant('No invoice schedule'),\n },\n ...data\n .map(x => {\n const name = translateListFilter(x.id, 'invoiceSchedule', x.name);\n const invType = translateListFilter(x.invoicingType, 'invoicingType');\n return {\n ...x,\n key: `2;${x.id}`,\n label: `${name} (${invType})`,\n };\n })\n .sort(dynamicSort('label')),\n ];\n\n if (invoicestream.invoicingViaRelation) {\n vm.schedule = null;\n vm.isInvoicingVia = true;\n vm.originalHasInvoicingVia = true;\n } else if (invoicestream.schedule) {\n vm.schedule = vm.schedules.find(x => x.key === `2;${invoicestream.schedule.id}`);\n } else {\n vm.schedule = vm.schedules.find(x => x.key === '0');\n }\n },\n showError,\n ).$promise;\n };\n vm.loadSchedules();\n\n var updateInvoiceStream = function(invoicestream) {\n vm.saving = true;\n resourceFactorySvc\n .get('invoiceStream')\n .update(invoicestream)\n .$promise.then(\n function(response) {\n if (response) {\n flySvc.success('msgConfirmChange');\n if (vm.invoicestream.startDate > new Date())\n flySvc.message('msgInvoiceScheduleExistingLinesBeforeStartDateNotDeleted');\n close(response, 500);\n $element.modal('hide');\n vm.saving = false;\n }\n return false;\n },\n function(error) {\n showError(error);\n vm.saving = false;\n },\n );\n };\n\n vm.save = function() {\n if (vm.saving) return '';\n var invoicestream = angular.copy(vm.invoicestream);\n\n //Show warning message if previous invoicing type was advance/settlement and has now changed and if the schedule should start today\n if (\n originalInvoicingType === 2 &&\n (!invoicestream.schedule || invoicestream.schedule.invoicingType !== 2)\n ) {\n if (vm.hasUnsettledAdvances === null) return ''; //Still retrieving unsettled invoices\n if (vm.hasUnsettledAdvances) {\n return ModalService.showModal({\n template: require('./invoiceMethodChangedDialog.html'),\n controller: 'InvoiceMethodChangedDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n advances: vm.hasUnsettledAdvances,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n modal.close.then(function(result) {\n if (result === null) return false;\n invoicestream.removeUnsettledAdvances = !!result;\n return updateInvoiceStream(invoicestream);\n });\n });\n }\n }\n\n return updateInvoiceStream(invoicestream);\n };\n\n vm.cancel = function() {\n close(null, 500);\n };\n\n vm.validateTemplate = function() {\n if (vm.isInvoicingVia) {\n if (!vm.invoicestream.invoicingViaRelation?.id) return false;\n if (!vm.invoicestream.invoicingViaStream?.id) return false;\n } else if (!vm.schedule) return false;\n\n var invoicingType = vm.invoicestream.schedule ? vm.invoicestream.schedule.invoicingType : null;\n if (invoicingType && (invoicingType == 1 || invoicingType == 2) && !vm.invoicestream.amount) {\n // vm.showValidation = true;\n return false;\n }\n if (!vm.invoicestream.startDate) {\n return false;\n }\n vm.showValidation = false;\n return true;\n };\n\n vm.hasUnsettledAdvances = null;\n vm.scheduleChanged = function() {\n const companySettings = null;\n let defaultLedger = '';\n\n if (!vm.schedule || vm.schedule.key === '0') {\n vm.invoicestream.schedule = null;\n vm.invoicestream.invoicingViaRelation = null;\n vm.invoicestream.invoicingViaStream = null;\n } else {\n vm.invoicestream.schedule = vm.schedule;\n vm.invoicestream.invoicingViaRelation = null;\n vm.invoicestream.invoicingViaStream = null;\n }\n\n if (vm.invoicestream.schedule) {\n const companyId = vm.invoicestream.companyId ?? relation.companyId;\n if (vm.invoicestream.schedule.invoicingType === 1) {\n defaultLedger = dataCache.getCompanySettings(companyId).fixedAmountLedgerAccount;\n }\n if (vm.invoicestream.schedule.invoicingType === 2) {\n defaultLedger = dataCache.getCompanySettings(companyId).advanceSettlementLedgerAccount;\n }\n }\n vm.invoicestream.ledgerAccount = defaultLedger;\n\n //Retrieve unsettled advances if old schedule was advance/settlement\n if (\n vm.hasUnsettledAdvances === null &&\n originalInvoicingType === 2 &&\n (!vm.invoicestream.schedule || vm.invoicestream.schedule.invoicingType !== 2)\n ) {\n resourceFactorySvc.get('invoiceStream').unsettledAdvances(\n { id: vm.invoicestream.id },\n function({ amount = 0, invoiceIds = [] }) {\n if (invoiceIds.length) {\n vm.hasUnsettledAdvances = { amount, invoiceIds, count: invoiceIds.length };\n } else {\n vm.hasUnsettledAdvances = false;\n }\n },\n showError,\n );\n }\n };\n\n vm.invoicingViaRelationChanged = function() {\n if (!vm.invoicestream.invoicingViaRelation) {\n vm.invoicestream.invoicingViaStream = null;\n return;\n }\n if (vm.invoicestream.invoicingViaRelation.invoiceStreams) {\n const id =\n vm.invoicestream.invoicingViaStream?.id ??\n vm.invoicestream.invoicingViaRelation.invoiceStreamId;\n vm.invoicestream.invoicingViaStream = vm.invoicestream.invoicingViaRelation.invoiceStreams.find(\n x => x.id === id,\n );\n }\n };\n\n vm.clearInvoicingVia = function() {\n vm.invoicestream.schedule = null;\n vm.invoicestream.invoicingViaRelation = null;\n vm.invoicestream.invoicingViaStream = null;\n vm.save();\n };\n}\n","import angular from 'angular';\nimport { Registration } from '../../registrations/model/registration';\nimport moment from 'moment';\nimport { guid1 } from '@/shared/utils/guid';\n\nangular\n .module('cloudX')\n .controller('PlannedRegistrationDialogCtrl', [\n 'resourceFactorySvc',\n 'flySvc',\n '$element',\n 'close',\n 'plannedReg',\n 'relationId',\n 'invoiceStreamId',\n 'invoiceStreams',\n 'crmType',\n plannedRegistrationDialogCtrl,\n ]);\n\nfunction plannedRegistrationDialogCtrl(\n resourceFactorySvc,\n flySvc,\n $element,\n close,\n plannedReg,\n relationId,\n invoiceStreamId,\n invoiceStreams,\n crmType,\n) {\n var vm = this;\n var resource = resourceFactorySvc.get('plannedRegistration');\n vm.regType = plannedReg && plannedReg.template ? plannedReg.template.type : null;\n vm.showValidation = false;\n vm.invoiceStreams = invoiceStreams;\n vm.planned = plannedReg || {\n relationId: relationId,\n\n invoiceStreamId: invoiceStreamId,\n schedule: null,\n template: null,\n startDate: moment\n .utc()\n .add(1, 'days')\n .startOf('day')\n .toDate(),\n endDate: null,\n };\n vm.regSettings = {\n hideFromUntil: true,\n hidePriceDiscount: true,\n hideDate: true,\n hideInteractions: true,\n };\n\n vm.dayMonthOptions = {\n minMode: 'day',\n maxMode: 'month',\n showWeeks: false,\n formatDayTitle: 'MMMM',\n datepickerMode: 'month',\n formatMonthTitle: ' ',\n initDate: moment\n .utc()\n .startOf('day')\n .set({\n year: 2000,\n })\n .toDate(),\n // minDate: new Date(2000, 0, 1),\n // maxDate: new Date(2000, 11, 31),\n };\n vm.startDateOptions = {\n minDate: moment\n .utc()\n .startOf('day')\n .add(1, 'days')\n .toDate(),\n };\n\n var showError = function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n return '';\n };\n vm.regTypeChanged = function() {\n vm.planned.template = new Registration({\n relation: {\n id: relationId,\n invoiceStreamId: invoiceStreamId,\n crm: crmType,\n },\n invoiceStream: invoiceStreams.find(x => x.id === vm.planned.invoiceStreamId),\n ...(vm.planned.template || { userId: guid1 }),\n type: vm.regType,\n isBillable: true,\n resource: null,\n inForfait: null,\n });\n };\n vm.assignmentChanged = function() {\n vm.planned.template = new Registration({\n relation: {\n id: relationId,\n invoiceStreamId: invoiceStreamId,\n crm: crmType,\n },\n ...(vm.planned.template || { userId: guid1 }),\n invoiceStream: invoiceStreams.find(x => x.id === vm.planned.invoiceStreamId),\n invoiceStreamId: vm.planned.invoiceStreamId,\n inForfait: null,\n });\n };\n\n vm.schedules = [];\n resource.schedules(function(data) {\n vm.schedules = data;\n }, showError);\n\n vm.validateTemplate = function() {\n if (!vm.planned.template) return false;\n if (vm.planned.template.type < 0) return false;\n if (!vm.planned.template.resource) return false;\n if (vm.planned.template.type === 0 && vm.planned.template.durationMinutes <= 0) return false;\n if (vm.planned.template.type !== 0 && vm.planned.template.quantity <= 0) return false;\n return true;\n };\n\n vm.save = function() {\n if (vm.saving) return;\n var model = angular.copy(vm.planned);\n\n // For the yearly schedule, set the month accordingly to easily use in back-end\n if (model.schedule.numberOfLines === 1) {\n model.day = model.date.getDate();\n model.month = model.date.getMonth() + 1; // getMonth() starts at 0\n }\n vm.saving = true;\n (vm.planned.id ? resource.update : resource.save)(\n {},\n model,\n function(result) {\n vm.saving = false;\n\n $element.modal('hide');\n close(result, 500);\n },\n function(error) {\n vm.saving = false;\n\n flySvc.error(error.data.code, error.data.parameters);\n },\n );\n };\n vm.cancel = function() {\n $element.modal('hide');\n close(null, 500);\n };\n}\n","import angular from 'angular';\nimport moment from 'moment';\n\nangular\n .module('cloudX')\n .controller('PlannedregistrationScheduleDialogCtrl', [\n 'resourceFactorySvc',\n 'flySvc',\n 'dialogsSvc',\n '$element',\n 'close',\n 'plannedRegistration',\n plannedregistrationScheduleDialogCtrl,\n ]);\n\nfunction plannedregistrationScheduleDialogCtrl(\n resourceFactorySvc,\n flySvc,\n dialogsSvc,\n $element,\n close,\n plannedRegistration,\n) {\n var vm = this;\n vm.lines = [];\n vm.showHistory = false;\n vm.historyEnabled = false;\n var today = moment\n .utc()\n .startOf('day')\n .toDate();\n vm.dateOptions = {\n minDate: today,\n };\n\n var resource = resourceFactorySvc.get('plannedRegistration');\n\n var showError = function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n return '';\n };\n\n resource.scheduleLines(\n {\n id: plannedRegistration.id,\n },\n function(data) {\n vm.lines = data;\n\n vm.historyEnabled = vm.lines.some(function(line) {\n return line.processed === true;\n });\n },\n showError,\n );\n\n vm.cancel = function() {\n close(null, 500);\n };\n\n vm.updateLine = function(line, field, data) {\n //Validation error\n if (typeof data === 'undefined') return '';\n if (field === 'date' && !data) return '';\n if (angular.equals(line[field], data)) return false;\n var model = angular.copy(line);\n model[field] = data;\n return resource.updateSchedule(model).$promise.then(function(response) {\n if (response) {\n angular.extend(line, response);\n flySvc.success('msgConfirmChange');\n }\n return false;\n }, showError);\n };\n\n vm.deleteLine = function(id) {\n dialogsSvc\n .showYesNo('msgConfirmDeleteTitle', 'msgDeletePlannedRegistrationLine')\n .then(function() {\n resource\n .deleteSchedule({\n id: id,\n })\n .$promise.then(function(response) {\n if (response) {\n flySvc.success('msgPlannedRegistrationLineDeleted');\n\n if (vm.lines) {\n for (var t = 0; t < vm.lines.length; t++) {\n if (vm.lines[t].id === id) {\n vm.lines.splice(t, 1);\n break;\n }\n }\n }\n }\n return false;\n }, showError);\n });\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cloudX')\n .controller('PlannedTasksDialogCtrl', [\n 'resourceFactorySvc',\n 'flySvc',\n 'dialogsSvc',\n '$element',\n 'close',\n 'schedule',\n '$http',\n 'appUrls',\n '$timeout',\n plannedTasksDialogCtrl,\n ]);\n\nfunction plannedTasksDialogCtrl(\n resourceFactorySvc,\n flySvc,\n dialogsSvc,\n $element,\n close,\n schedule,\n $http,\n appUrls,\n $timeout,\n) {\n var vm = this;\n vm.lines = null;\n vm.schedule = schedule;\n vm.showHistory = false;\n\n var showError = function(error) {\n flySvc.error(error.data.code, error.data.parameters, null, error.data.type);\n return '';\n };\n\n $http.get(appUrls.tasks + '/Api/TaskSchedules/Lines/' + schedule.id).then(\n function({ data: { lines = [], errorCode = null } = {} }) {\n vm.lines = lines;\n vm.errorCode = errorCode;\n },\n function(error) {\n vm.lines = [];\n showError(error);\n },\n );\n\n vm.retrieveHistory = function() {\n vm.showHistory = true;\n $http.get(appUrls.tasks + '/Api/TaskSchedules/Lines/' + schedule.id + '?history=true').then(\n function({ data: { lines = [], errorCode = null } = {} }) {\n vm.lines = lines;\n vm.errorCode = errorCode;\n },\n function(error) {\n vm.lines = [];\n showError(error);\n },\n );\n };\n vm.openTaskDetail = function(line) {\n vm.taskDetail = { id: line.plannedTaskId };\n };\n vm.taskSaved = function(task) {\n $timeout(() => {\n if (task) {\n const line = vm.lines.find(x => x.plannedTaskId === task.id);\n if (line) {\n line.plannedTaskStatus = task.status;\n line.deadline = task.deadline;\n }\n }\n vm.closeTaskDetail();\n }, 0);\n };\n vm.closeTaskDetail = function() {\n $timeout(() => {\n vm.taskDetail = null;\n }, 0);\n };\n\n vm.cancel = function() {\n close(null, 500);\n };\n}\n","import angular from 'angular';\nimport moment from 'moment';\n\nangular\n .module('cxTaskflow')\n .controller('ReadEidDialogCtrl', [\n '$timeout',\n '$element',\n 'flySvc',\n '$http',\n 'appUrls',\n 'close',\n 'relationId',\n 'relBindSvc',\n readEidDialogCtrl,\n ]);\n\nfunction readEidDialogCtrl(\n $timeout,\n $element,\n flySvc,\n $http,\n appUrls,\n close,\n relationId,\n relBindSvc,\n) {\n var vm = this;\n vm.saving = false;\n vm.cardInformation = null;\n\n vm.uploadEid = function(eid) {\n vm.cardInformation = eid;\n };\n\n vm.cancel = function() {\n $element.modal('hide');\n close(null, 500);\n };\n\n vm.save = function() {\n vm.saving = true;\n if (!vm.cardInformation) return;\n var model = angular.copy(vm.cardInformation);\n model.relationId = relationId;\n model.dateOfBirth = moment.utc(model.dateOfBirth);\n model.cardExpiryDate = moment.utc(model.cardExpiryDate);\n\n $http.put(appUrls.api + '/api/relation/UpdateRelationEid', model).then(\n function(result) {\n vm.saving = false;\n relBindSvc.updateRelation(relationId, result.data.changes, null);\n flySvc.success('msgRelationUpdated');\n $element.modal('hide');\n close(null, 500);\n },\n function(error) {\n vm.saving = false;\n flySvc.error(error.data.code, error.data.parameters);\n },\n );\n };\n}\n","import angular from 'angular';\nimport DocumentService from '@/shared/services/DocumentService';\nimport { isWord, isPdf } from '@/shared/utils/mime';\nimport { mapSuggestedMailAddressAngularFilter } from '@/shared/services/ObjectDisplayService';\n\nangular\n .module('cxTaskflow')\n .controller('MailDocumentDialogCtrl', [\n '$scope',\n '$element',\n '$timeout',\n '$translate',\n '$q',\n '$filter',\n 'templateHttpSvc',\n 'resourceFactorySvc',\n 'flySvc',\n '$http',\n 'appUrls',\n 'dialogsSvc',\n 'close',\n 'document',\n 'asPdf',\n 'relationId',\n 'companyId',\n mailDocumentDialogCtrl,\n ]);\n\nfunction mailDocumentDialogCtrl(\n $scope,\n $element,\n $timeout,\n $translate,\n $q,\n $filter,\n templateHttpSvc,\n resourceFactorySvc,\n flySvc,\n $http,\n appUrls,\n dialogsSvc,\n close,\n document,\n asPdf,\n relationId,\n companyId,\n) {\n var vm = this;\n vm.templates = [];\n vm.sending = false;\n vm.email = {};\n vm.showValidation = false;\n vm.addresses = [];\n vm.addressLabels = {};\n vm.sendTo = [];\n vm.cc = [];\n vm.bcc = [];\n vm.attachments = [];\n vm.loadingAttachments = false;\n vm.loadingTemplate = true;\n vm.document = {\n ...document,\n signingStatus: document.signingStatus === 2 ? 10 : document.signingStatus, // if current status is required, we'll set it to pending\n };\n\n vm.signingStatus = [2, 10, 20];\n\n var initializeAttachments = () => {\n const { mime, id: documentId, name } = document;\n if (asPdf) {\n // no conversion needed if there was a document uploaded and it's a pdf\n if (isPdf(mime)) {\n vm.attachments = [\n {\n documentId,\n name,\n mime,\n },\n ];\n } else {\n // conversion needed, convert the document (Word) to pdf and save it to our doc-ms so it can be emailed\n vm.loadingAttachments = true;\n DocumentService.convertAndSaveToPdf(documentId).then(\n result => {\n $timeout(function() {\n vm.loadingAttachments = false;\n vm.attachments.push({\n documentId: result.id,\n name: result.name,\n mime: result.mime,\n documentType: result.documentType,\n });\n vm.document = {\n ...document,\n signingStatus: vm.document.signingStatus,\n name: result.name,\n mime: result.mime,\n documentType: result.documentType,\n };\n }, 0);\n },\n error => {\n vm.loadingAttachments = false;\n flySvc.error(error);\n console.error(error);\n },\n );\n }\n } else {\n // attachment is the original document\n vm.attachments = [\n {\n documentId,\n name,\n mime,\n },\n ];\n }\n };\n initializeAttachments();\n\n var showError = function(error) {\n vm.sending = false;\n flySvc.error(error);\n };\n\n templateHttpSvc.getTemplates(13).then(function(data) {\n vm.templates = data.map(item => {\n item.label = $filter('translateList')(item.id, 'template', item.name);\n return item;\n });\n if (vm.templates.length === 1) vm.template = vm.templates[0];\n vm.refreshPreview();\n });\n\n $q.all({\n addresses: resourceFactorySvc.get('address').mailSuggestions({\n id: relationId,\n }).$promise,\n commSetting: resourceFactorySvc.get('commSetting').query({\n id: relationId,\n }).$promise,\n }).then(function({ addresses, commSetting }) {\n vm.addressLabels = addresses.reduce((o, x) => {\n if (!x || !x.emailAddress) return o;\n if (o[x.emailAddress.toLowerCase()]) return o;\n const label = mapSuggestedMailAddressAngularFilter(x, $filter);\n if (!label) return o;\n o[x.emailAddress.toLowerCase()] = label;\n return o;\n }, {});\n vm.addresses = addresses.reduce((a, x) => {\n if (!x) return a;\n if (a.some(y => y.toLowerCase() === x.emailAddress.toLowerCase())) return a;\n a.push(x.emailAddress);\n return a;\n }, []);\n var main = addresses.find(a => !!a.emailAddress && a.isMain && a.linkType === null);\n if (vm.addresses.length) {\n vm.sendTo = commSetting.reduce(function(a, e) {\n if (e.purpose === 0 && e.medium === 1 && e.type === 0) {\n var address = addresses.find(function(addr) {\n return !!addr.emailAddress && addr.addressId === e.addressId;\n });\n if (address) a.push(address.emailAddress);\n }\n return a;\n }, []);\n vm.cc = commSetting.reduce(function(a, e) {\n if (e.purpose === 0 && e.medium === 1 && e.type === 1) {\n var address = addresses.find(function(addr) {\n return !!addr.emailAddress && addr.addressId === e.addressId;\n });\n if (address) a.push(address.emailAddress);\n }\n return a;\n }, []);\n vm.bcc = commSetting.reduce(function(a, e) {\n if (e.purpose === 0 && e.medium === 1 && e.type === 2) {\n var address = addresses.find(function(addr) {\n return !!addr.emailAddress && addr.addressId === e.addressId;\n });\n if (address) a.push(address.emailAddress);\n }\n return a;\n }, []);\n\n if (!vm.sendTo.length) {\n //No comm settings, add main or first or empty\n vm.sendTo.push((main && main.emailAddress) || vm.addresses[0] || '');\n }\n } else {\n //No addresses, add empty input\n vm.sendTo.push('');\n }\n }, showError);\n vm.getAddressLabel = address => {\n if (!address) return address;\n if (typeof address !== 'string') {\n console.log(address);\n return address;\n }\n return vm.addressLabels[address.toLowerCase()] || address;\n };\n\n vm.refreshPreview = function() {\n vm.preview = null;\n vm.previewError = null;\n vm.loadingTemplate = true;\n if (!vm.template) {\n vm.preview = {\n body: null,\n subject: null,\n };\n vm.loadingTemplate = false;\n\n return;\n }\n $http\n .post(appUrls.api + '/api/template/GetRelationMail', {\n templateId: vm.template && vm.template.id,\n relationId: relationId,\n })\n .success(function(result) {\n if (result) {\n vm.preview = result;\n if (vm.preview.body === null && vm.preview.subject === null) {\n flySvc.message('msgTemplateNotInLanguage');\n }\n if (\n vm.preview.recipients &&\n vm.preview.recipients.length &&\n (!vm.sendTo.length || !vm.sendTo[0])\n ) {\n vm.sendTo = vm.preview.recipients;\n }\n if (vm.preview.templateLanguageId) {\n $http\n .get(\n appUrls.documents + '/api/documents/links/' + vm.preview.templateLanguageId + '/4',\n )\n .success(function(result) {\n if (result && result.length > 0) {\n if (!vm.attachments) vm.attachments = [];\n result.forEach(function(attachment) {\n vm.attachments.push(attachment);\n });\n }\n })\n .error(function(error) {\n showError(error);\n });\n }\n\n vm.loadingTemplate = false;\n }\n })\n .error(function(error) {\n console.error(error);\n vm.previewError = flySvc.getErrorMsg(error);\n flySvc.error(error);\n vm.loadingTemplate = false;\n });\n };\n\n vm.uploadAttachment = function(files) {\n if (!files || files.length < 1) return;\n\n var formData = new FormData();\n formData.append('relationId', relationId);\n\n files.forEach(function(file) {\n formData.append('data', file.data);\n });\n\n $http({\n method: 'POST',\n url: appUrls.documents + '/api/documents?documentType=15',\n headers: {\n 'Content-Type': undefined,\n },\n data: formData,\n })\n .success(function(result) {\n if (result && result.length > 0) {\n result.forEach(function(file) {\n vm.attachments.push(file);\n });\n }\n })\n .error(function(error) {\n flySvc.error(error);\n return '';\n });\n };\n\n vm.addToAddress = function() {\n vm.sendTo.push('');\n $timeout(function() {\n $element\n .find('.form-group .row.email .dropdown input[type=\"text\"]')\n .filter(':visible')\n .last()\n .focus();\n }, 200);\n };\n vm.addCcAddress = function() {\n vm.cc.push('');\n $timeout(function() {\n $element\n .find('.form-group .row.cc .dropdown input[type=\"text\"]')\n .filter(':visible')\n .last()\n .focus();\n }, 200);\n };\n\n vm.addBccAddress = function() {\n vm.bcc.push('');\n $timeout(function() {\n $element\n .find('.form-group .row.bcc .dropdown input[type=\"text\"]')\n .filter(':visible')\n .last()\n .focus();\n }, 200);\n };\n vm.validateEmail = function(value, emptyValid) {\n if (!value && emptyValid) return true;\n return /^[^@]+@.+\\..+$/.test(value);\n };\n\n vm.validate = function() {\n if (!vm.preview || !vm.preview.subject || !vm.preview.body) return false;\n\n for (var j = 0; j < vm.sendTo.length; j++) {\n if (!vm.validateEmail(vm.sendTo[j], false)) {\n flySvc.error('msgInvalidEmailAddress');\n return false;\n }\n }\n for (var j = 0; j < vm.cc.length; j++) {\n if (!vm.validateEmail(vm.cc[j], false)) {\n flySvc.error('msgInvalidEmailAddress');\n return false;\n }\n }\n for (var j = 0; j < vm.bcc.length; j++) {\n if (!vm.validateEmail(vm.bcc[j], false)) {\n flySvc.error('msgInvalidEmailAddress');\n return false;\n }\n }\n return true;\n };\n\n vm.save = function() {\n if ($scope.form.$invalid || vm.sending) return;\n if (!vm.validate()) return;\n vm.sending = true;\n vm.preview.cc = vm.cc;\n vm.preview.bcc = vm.bcc;\n vm.preview.to = vm.sendTo;\n vm.preview.emailId = vm.email.id;\n vm.preview.relationId = relationId;\n vm.preview.linkId = relationId;\n vm.preview.emailLinkType = 4; // relation\n vm.preview.companyId = companyId;\n vm.preview.emailTemplateId = vm.template && vm.template.id;\n if (vm.attachments && vm.attachments.length) {\n vm.preview.attachmentDocumentIds = vm.attachments.map(x => x.documentId || x.id);\n }\n\n vm.preview.attachmentSigningStatusUpdates = [\n { documentId: vm.document.id, signingStatus: vm.document.signingStatus },\n ];\n\n $http\n .post(appUrls.documents + '/api/emails/CreateAndSend', vm.preview)\n .success(function() {\n vm.sending = false;\n flySvc.success('EmailSent');\n $element.modal('hide');\n const updatedDocument = {\n ...document,\n signingStatus: vm.document.signingStatus,\n };\n close(updatedDocument, 500);\n }, showError)\n .error(showError);\n };\n\n vm.deleteAttachment = function(attachment) {\n dialogsSvc.showYesNo('comfirmDeleteTitle', 'confirmDeleteEmailAttachment').then(function() {\n // the attachment is a new document that was uploaded in the email modal. Delete the corresponding document\n const documentId = attachment.documentId || attachment.id;\n if (attachment.documentType === 15) {\n $http\n .delete(appUrls.documents + '/api/documents/' + documentId)\n .success(function(result) {\n var index = vm.attachments.indexOf(attachment);\n vm.attachments.splice(index, 1);\n })\n .error(function(error) {\n flySvc.error(error);\n return '';\n });\n } else {\n // the attachment is an existing document, presumably an email attachment. Dont delete the document from the doc-store\n var index = vm.attachments.indexOf(attachment);\n vm.attachments.splice(index, 1);\n }\n });\n };\n vm.cancel = function() {\n close(false, 500);\n };\n\n vm.downloadAttachment = attachment =>\n DocumentService.download(attachment.documentId || attachment.id);\n}\n","import angular from 'angular';\n\nangular\n .module('cxTaskflow')\n .controller('TaskScheduleChangeAssignmentDialogCtrl', [\n '$element',\n '$http',\n 'appUrls',\n 'flySvc',\n 'close',\n 'schedule',\n 'invoiceStreamId',\n taskScheduleChangeAssignmentDialogCtrl,\n ]);\n\nfunction taskScheduleChangeAssignmentDialogCtrl(\n $element,\n $http,\n appUrls,\n flySvc,\n close,\n schedule,\n invoiceStreamId,\n) {\n var vm = this;\n vm.updateRegistrations = true;\n vm.saving = false;\n\n vm.save = function() {\n if (vm.saving) return;\n vm.saving = true;\n\n var taskModel = {\n id: schedule.id,\n invoiceStreamId,\n };\n\n $http.put(appUrls.tasks + '/api/TaskSchedules/ChangeAssignment', taskModel).then(\n ({ data }) => {\n const newSchedule = data;\n if (!vm.updateRegistrations) {\n $element.modal('hide');\n close(newSchedule, 500);\n vm.saving = false;\n return;\n }\n //Update registrations\n var regModel = {\n taskTemplateId: schedule.taskTemplateId,\n oldInvoiceStreamId: schedule.invoiceStreamId,\n newInvoiceStreamId: invoiceStreamId,\n };\n $http.put(appUrls.api + '/api/Registration/ChangeAssignment', regModel).then(\n function({ data }) {\n $element.modal('hide');\n close(newSchedule, 500);\n vm.saving = false;\n },\n function(error) {\n flySvc.error(error);\n vm.saving = false;\n },\n );\n },\n function(error) {\n flySvc.error(error);\n vm.saving = false;\n },\n );\n };\n\n vm.cancel = function() {\n $element.modal('hide');\n close(null, 500);\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cxRelations')\n .controller('UploadRelationDocumentDialogCtrl', [\n '$element',\n '$http',\n 'appUrls',\n 'dataCache',\n 'flySvc',\n 'relationId',\n 'documentTypes',\n 'close',\n uploadRelationDocumentDialogCtrl,\n ]);\n\nfunction uploadRelationDocumentDialogCtrl(\n $element,\n $http,\n appUrls,\n dataCache,\n flySvc,\n relationId,\n documentTypes,\n close,\n) {\n var vm = this;\n vm.documentTypes = documentTypes;\n\n vm.document = {\n relationId: relationId,\n documentType: vm.documentTypes.length === 1 ? vm.documentTypes[0] : null,\n signed: true,\n file: null,\n };\n vm.showValidation = false;\n\n vm.fileUploaded = function(file) {\n if (!file) return;\n vm.document.file = file;\n };\n vm.isValid = function() {\n if (vm.document.documentType === null) return false;\n if (vm.document.file === null) return false;\n return true;\n };\n\n vm.save = function() {\n if (!vm.isValid()) return;\n vm.saving = true;\n var data = new FormData();\n data.append('relationId', vm.document.relationId);\n data.append('documentType', vm.document.documentType);\n data.append('signed', vm.document.signed);\n data.append('data', vm.document.file.data);\n\n $http({\n method: 'post',\n url: appUrls.api + '/api/RelationDocument/Upload',\n headers: {\n 'Content-Type': undefined,\n },\n data: data,\n })\n .success(function(result) {\n $element.modal('hide');\n close(result, 500);\n })\n .error(function(error) {\n flySvc.error(error.code, error.parameters);\n })\n .finally(function() {\n vm.saving = false;\n });\n };\n\n vm.cancel = function() {\n close(null, 500);\n };\n\n vm.isAdvancedUpload = (function() {\n var div = document.createElement('div');\n return (\n ('draggable' in div || ('ondragstart' in div && 'ondrop' in div)) &&\n 'FormData' in window &&\n 'FileReader' in window\n );\n })();\n}\n","import angular from 'angular';\nimport moment from 'moment';\nimport DocumentService from '@/shared/services/DocumentService';\nimport AuthService from '@/shared/services/AuthService';\nimport { getZendeskUrl } from '@/shared/components/ZendeskHelp';\n\nangular\n .module('cloudX')\n .controller('RequestDocumentSignatureDialogCtrl', [\n 'resourceFactorySvc',\n 'dialogsSvc',\n 'flySvc',\n '$element',\n 'close',\n 'documents',\n 'companyId',\n 'relationId',\n 'languageCode',\n 'appUrls',\n '$http',\n 'dataCache',\n '$q',\n '$translate',\n 'templateHttpSvc',\n '$filter',\n requestDocumentSignatureDialogCtrl,\n ]);\n\nfunction requestDocumentSignatureDialogCtrl(\n resourceFactorySvc,\n dialogsSvc,\n flySvc,\n $element,\n close,\n documents,\n companyId,\n relationId,\n languageCode,\n appUrls,\n $http,\n dataCache,\n $q,\n $translate,\n templateHttpSvc,\n $filter,\n) {\n var vm = this;\n vm.relationCandidates = [];\n vm.employeeCandidates = [];\n vm.loading = false;\n vm.error = null;\n vm.signers = [];\n vm.zendeskUrl = '';\n vm.scheduledDate = undefined;\n vm.scheduledHour = 0;\n vm.scheduledMinute = 0;\n const today = new Date();\n today.setDate(today.getDate());\n today.setHours(0, 0, 0, 0);\n vm.datepickerOptions = {\n minDate: today,\n startingDay: 1,\n };\n const signingProvidersWithDelayedSending = [3, 5, 6];\n const signingProvidersWithCustomEmail = [3, 5, 6, 7];\n\n var initializeModal = () => {\n vm.signingProvider = dataCache.getCompanySettings(companyId).documentSigningProvider;\n vm.delayedSendingEnabled = signingProvidersWithDelayedSending.includes(vm.signingProvider);\n vm.customEmailEnabled = signingProvidersWithCustomEmail.includes(vm.signingProvider);\n\n switch (vm.signingProvider) {\n case 1: // connective\n case 2: // signhere\n vm.zendeskUrl = getZendeskUrl('5434782112530', $translate.use());\n break;\n case 3: // oksign\n vm.zendeskUrl = getZendeskUrl('5434756702482', $translate.use());\n break;\n case 4: // adobe\n vm.zendeskUrl = getZendeskUrl('5434788833554', $translate.use());\n break;\n case 5: // penneo\n vm.zendeskUrl = getZendeskUrl('5525438841746', $translate.use());\n break;\n case 6: // docusign\n vm.zendeskUrl = getZendeskUrl('5585448587922', $translate.use());\n break;\n }\n\n vm.loading = true;\n\n const signingCandidatesPromise = $http.post(\n appUrls.api + `/api/RelationDocument/GetSigningCandidates`,\n [relationId],\n );\n\n const emptyPromise = () => Promise.resolve();\n\n // if Penneo is the signing provider, we dont need to find signature fields because Penneo doesn't support these markers\n const signaturesPromise =\n vm.signingProvider === 5\n ? emptyPromise\n : $http.post(\n appUrls.documentsConverter + `/api/getsigningfields/${vm.signingProvider}`,\n documents.map(x => x.id),\n );\n\n const emailTemplatesPromise = vm.customEmailEnabled\n ? templateHttpSvc.getTemplates(15)\n : emptyPromise;\n\n $q.all([signaturesPromise, signingCandidatesPromise, emailTemplatesPromise]).then(\n ([{ data: signers }, { data: signingCandidates }, templates]) => {\n vm.documentHasMarkers = !!signers;\n vm.signers = signers;\n\n if (signingCandidates) {\n vm.relationCandidates = signingCandidates.relationCandidates;\n vm.relationCandidates.sort((a,b) => a.fullName.localeCompare(b.fullName));\n vm.employeeCandidates = signingCandidates.employeeCandidates;\n vm.employeeCandidates.sort((a,b) => a.fullName.localeCompare(b.fullName));\n }\n if (vm.customEmailEnabled) {\n vm.templates = templates.map(item => {\n item.label = $filter('translateList')(item.id, 'template', item.name);\n return item;\n });\n if (vm.templates.length === 0) {\n // no digital signing email template, retrieve default\n $http\n .get(\n appUrls.documentSigning +\n `/api/DefaultEmailTemplate/${vm.signingProvider}/${languageCode ||\n 'nl'}/${companyId}/${encodeURIComponent(documents[0].name)}`,\n )\n .then(\n function({ data }) {\n if (data) {\n vm.email = data;\n }\n },\n function(error) {\n flySvc.error(error);\n },\n );\n } else if (vm.template == null && vm.templates.length === 1) {\n vm.template = vm.templates[0];\n vm.refreshEmail();\n }\n }\n\n vm.loading = false;\n },\n error => {\n vm.loading = false;\n flySvc.error(error);\n vm.cancel();\n },\n );\n };\n initializeModal();\n\n vm.formatWithLeadingZero = function(value) {\n return value < 10 ? '0' + value : value;\n };\n\n vm.refreshEmail = () => {\n vm.email = null;\n vm.loadingEmail = true;\n if (!vm.template || !vm.template.id) {\n vm.email = {\n body: '',\n subject: '',\n };\n }\n $http\n .get(\n appUrls.api +\n `/api/template/GetDigitalSigningMail?relationId=${relationId}&templateId=${vm.template.id}&filename=${documents[0].name}`,\n )\n .success(function(result) {\n if (result) {\n vm.email = result;\n vm.loadingEmail = false;\n }\n })\n .error(function(error) {\n flySvc.error(error);\n vm.email = {\n body: '',\n subject: '',\n };\n vm.loadingEmail = false;\n });\n };\n\n vm.signerIsSelfSignature = function(signer) {\n if (!signer || !signer.fields) return false;\n if (signer.fields && angular.isArray(signer.fields)) {\n for (var i = 0; i < signer.fields.length; i++) {\n if (signer.fields[i].isSelfSignature) {\n return true;\n }\n }\n }\n\n return false;\n };\n\n vm.containsSelfSignature = function() {\n return vm.signers.some(x => vm.signerIsSelfSignature(x));\n };\n\n vm.initAppendSignatures = function(isSelfSignature) {\n vm.appendSignaturesToDocument = true;\n\n vm.signers = [\n {\n fields: [{ type: 1, isSelfSignature }],\n marker: null,\n signerId: null,\n },\n ];\n };\n\n vm.addSigner = function(isSelfSignature) {\n vm.signers = [\n ...vm.signers,\n {\n marker: null,\n signerId: null,\n fields: [{ type: 1, isSelfSignature }],\n },\n ];\n };\n\n vm.removeSigner = function(signer) {\n var index = vm.signers.indexOf(signer);\n if (index != -1) {\n vm.signers.splice(index, 1);\n }\n };\n\n vm.setSigner = function() {\n for (let i = 0; i < vm.signers.length; i++) {\n let signer = vm.signers[i];\n if (!signer.signerId) continue;\n\n const employee = vm.employeeCandidates.find(x => x.id == signer.signerId);\n if (employee) {\n vm.signers[i] = {\n ...signer,\n ...employee,\n };\n } else {\n const relation = vm.relationCandidates.find(x => x.id == signer.signerId);\n if (relation) {\n vm.signers[i] = {\n ...signer,\n ...relation,\n };\n }\n }\n }\n };\n\n vm.validate = () => {\n if (!vm.signers || vm.signers.length === 0) {\n flySvc.error('msgRequiredDocumentSigner');\n return false;\n }\n for (let i = 0; i < vm.signers.length; i++) {\n const signer = vm.signers[i];\n if (!vm.signerIsSelfSignature(signer) && !signer.signerId) {\n flySvc.error('msgRequiredDocumentSigner');\n return false;\n }\n }\n\n if (vm.customEmailEnabled && (!vm.email || !vm.email.subject || !vm.email.body)) {\n flySvc.error('msgRequiredEmailSubjectAndBody');\n return false;\n }\n\n return true;\n };\n\n vm.save = function() {\n if (!vm.validate()) return;\n\n const combineDateAndTime = (date, hour, minute) => {\n if (!date || hour === null || minute === null) {\n return null;\n }\n const scheduledDate = new Date(date);\n if(hour === 0 && minute === 0){\n return scheduledDate;\n }\n scheduledDate.setHours(hour);\n scheduledDate.setMinutes(minute);\n return scheduledDate.toISOString();\n };\n\n const signingRequest = {\n name: documents[0].name,\n relationId: relationId,\n documentLanguage: languageCode || 'nl',\n companyId: companyId,\n initiator: AuthService.getEmail(),\n signingProvider: vm.signingProvider,\n appendSignaturesToDocument: vm.appendSignaturesToDocument,\n scheduledDate: combineDateAndTime(vm.scheduledDate, vm.scheduledHour, vm.scheduledMinute),\n documents: documents.map(x => ({\n documentId: x.id,\n fileName: x.name,\n contentType: x.mime,\n })),\n signers: vm.signers,\n };\n\n if (vm.customEmailEnabled) {\n signingRequest.emailSubject = vm.email.subject;\n signingRequest.emailBody = vm.email.body;\n }\n\n vm.sending = true;\n vm.error = null;\n $http.post(appUrls.documentSigning + '/api/CreateDocumentSigningRequest', signingRequest).then(\n function(result) {\n vm.sending = false;\n close(true, 500);\n $element.modal('hide');\n flySvc.success('msgDocumentSigningRequestSent');\n },\n function(error) {\n console.error(error);\n vm.sending = false;\n\n if (error.status === 400) {\n if (error.data && error.data.code) {\n flySvc.error(error);\n } else {\n flySvc.error('msgDocumentSigningRequestFailed');\n vm.error = error.data;\n }\n } else {\n flySvc.error(error);\n }\n },\n );\n };\n\n vm.cancel = function() {\n close(null, 500);\n $element.modal('hide');\n };\n}\n","import angular from 'angular';\nimport moment from 'moment';\n\nangular\n .module('cloudX')\n .controller('EstoxConfirmationDialogCtrl', [\n '$http',\n 'appUrls',\n 'flySvc',\n 'resourceFactorySvc',\n '$element',\n 'close',\n 'data',\n estoxConfirmationDialogCtrl,\n ]);\n\nfunction estoxConfirmationDialogCtrl(\n $http,\n appUrls,\n flySvc,\n resourceFactorySvc,\n $element,\n close,\n data,\n) {\n var vm = this;\n vm.model = data;\n //console.log(data);\n\n var showError = function(error) {\n flySvc.error(error.data.code, error.data.parameters, null, error.data.type);\n return '';\n };\n\n vm.cancel = function() {\n close(null, 500);\n };\n\n vm.create = function() {\n vm.creating = true;\n vm.error = null;\n return $http.post(appUrls.api + '/api/relation/CreateInEstox', vm.model).then(\n function({ data }) {\n vm.creating = false;\n if (data.created) {\n flySvc.success('msgCompanyCreatedInEstox');\n $element.modal('hide');\n close(null, 500);\n } else {\n vm.error = data.error\n .replace(/\\\\n|\\\\r/g, '
      ')\n .replace(/\\\"/g, '')\n .trim();\n return '';\n }\n },\n function(error) {\n vm.creating = false;\n flySvc.error(error);\n return '';\n },\n );\n };\n}\n","import angular from 'angular';\nimport moment from 'moment';\nimport guid from '@/shared/utils/guid';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\n\nangular\n .module('cloudX')\n .controller('InviteRelationDirectDebitDialogCtrl', [\n '$http',\n 'appUrls',\n 'flySvc',\n '$filter',\n '$q',\n '$element',\n 'dataCache',\n 'close',\n 'companyId',\n 'relationId',\n inviteRelationDirectDebitDialogCtrl,\n ]);\n\nfunction inviteRelationDirectDebitDialogCtrl(\n $http,\n appUrls,\n flySvc,\n $filter,\n $q,\n $element,\n dataCache,\n close,\n companyId,\n relationId,\n) {\n var vm = this;\n vm.saving = false;\n vm.templates = null;\n vm.templateId = null;\n vm.loading = true;\n $q.all([\n $http\n .get(`${appUrls.api}/api/relation/TwikeyContractTemplates?companyId=${companyId}`)\n .then(({ data }) => data),\n ]).then(\n function([templates]) {\n vm.templates = templates || [];\n vm.loading = false;\n },\n error => {\n flySvc.error(error);\n vm.loading = false;\n },\n );\n\n vm.save = function() {\n if (vm.saving) return '';\n vm.saving = true;\n $http\n .post(\n `${appUrls.api}/api/relation/DirectDebitInvite?id=${relationId}&contractTemplate=${vm.templateId}`,\n )\n .then(\n function(result) {\n flySvc.success('msgDirectDebitInviteSent');\n $element.modal('hide');\n close(null, 500);\n },\n error => {\n flySvc.error(error);\n vm.saving = false;\n },\n );\n };\n\n vm.cancel = function() {\n $element.modal('hide');\n close(null, 500);\n };\n}\n","import angular from 'angular';\nimport moment from 'moment';\n\nangular\n .module('cloudX')\n .controller('MollieDirectDebitDialogCtrl', [\n '$http',\n 'appUrls',\n 'flySvc',\n '$filter',\n '$q',\n '$element',\n 'dataCache',\n 'close',\n 'relationId',\n mollieDirectDebitDialogCtrl,\n ]);\n\nfunction mollieDirectDebitDialogCtrl(\n $http,\n appUrls,\n flySvc,\n $filter,\n $q,\n $element,\n dataCache,\n close,\n relationId,\n) {\n var vm = this;\n vm.saving = false;\n vm.loading = true;\n vm.iban = undefined;\n vm.option = 1;\n vm.loading = true;\n $q.all([\n $http\n .get(`${appUrls.api}/api/relation/DirectDebitAccount?id=${relationId}`)\n .then(({ data }) => data),\n ]).then(\n function([iban]) {\n vm.iban = iban;\n vm.loading = false;\n },\n error => {\n flySvc.error(error);\n vm.loading = false;\n },\n );\n\n vm.save = function() {\n if (vm.saving) return '';\n\n if (vm.option === 2 && !vm.iban) return '';\n\n vm.saving = true;\n\n if (vm.option === 1) {\n $http.post(`${appUrls.api}/api/relation/MollieFirstPayment?id=${relationId}`).then(\n function(result) {\n flySvc.success('msgFirstPaymentMollieCreated');\n $element.modal('hide');\n close(null, 500);\n },\n error => {\n flySvc.error(error);\n vm.saving = false;\n },\n );\n } else {\n $http\n .post(`${appUrls.api}/api/relation/MollieCreateMandate?id=${relationId}&iban=${vm.iban}`)\n .then(\n function(result) {\n flySvc.success('msgMandateCreatedInMollie');\n $element.modal('hide');\n close(null, 500);\n },\n error => {\n flySvc.error(error);\n vm.saving = false;\n },\n );\n }\n };\n\n vm.cancel = function() {\n $element.modal('hide');\n close(null, 500);\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cloudX')\n .controller('TaskScheduleDeviationsDialogCtrl', [\n 'flySvc',\n '$element',\n 'close',\n 'schedule',\n '$http',\n 'appUrls',\n taskScheduleDeviationsDialogCtrl,\n ]);\n\nfunction taskScheduleDeviationsDialogCtrl(flySvc, $element, close, schedule, $http, appUrls) {\n var vm = this;\n vm.deviations = null;\n vm.schedule = schedule;\n vm.loading = true;\n\n $http.get(`${appUrls.tasks}/api/TaskSchedules/${schedule.id}/deviations`).then(\n function({ data }) {\n vm.deviations = data;\n vm.loading = false;\n },\n function(error) {\n vm.loading = false;\n showError(error);\n },\n );\n\n vm.save = function() {\n const model = angular.copy(vm.deviations);\n vm.saving = true;\n $http.put(`${appUrls.tasks}/api/TaskSchedules/${schedule.id}/deviations`, model).then(\n ({ data }) => {\n vm.saving = false;\n flySvc.changesSaved();\n $element.modal('hide');\n close(null, 500);\n },\n error => {\n flySvc.error(error);\n vm.saving = false;\n },\n );\n };\n\n vm.cancel = function() {\n $element.modal('hide');\n close(null, 500);\n };\n}\n","import angular from 'angular';\nimport moment from 'moment';\n\nangular\n .module('cloudX')\n .controller('InvoicingViaRelationsDialogCtrl', [\n '$http',\n 'appUrls',\n 'flySvc',\n '$element',\n 'close',\n '$q',\n '$timeout',\n 'relationId',\n invoicingViaRelationsDialogCtrl,\n ]);\n\nfunction invoicingViaRelationsDialogCtrl(\n $http,\n appUrls,\n flySvc,\n $element,\n close,\n $q,\n $timeout,\n relationId,\n) {\n var vm = this;\n vm.modalLoaded = false;\n vm.cancel = function() {\n close(null, 500);\n };\n\n vm.getInvoicedRelations = function(params) {\n return $http\n .get(appUrls.api + '/api/relation/invoicingvia/invoicedRelations', {\n params: {\n id: relationId,\n ...params,\n },\n })\n .then(\n ({ data }) => {\n return data;\n },\n error => {\n flySvc.error(error);\n return '';\n },\n );\n };\n\n // the infinite scroll table directive doesn't work if the modal controller is still not fully initialized (the retrieve func is not yet set)\n // to fix this we only load the scrollable table when we retrieve func is definitely set (at the end of the controller)\n vm.modalLoaded = true;\n}\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxFiscalCostList', function() {\n return {\n restrict: 'E',\n template: require('./fiscalCostList.html'),\n bindToController: { field: '=', relId: '@', list: '=value' },\n controllerAs: 'vm',\n require: ['^cxRelationFile', 'cxFiscalCostList'],\n link: function(scope, el, attrs, controllers) {\n if (!controllers || controllers.length !== 2) return;\n var cxRelFile = controllers[0];\n var controller = controllers[1];\n controller.setRelationFile(cxRelFile);\n },\n controller: [\n '$http',\n 'appUrls',\n 'flySvc',\n 'ModalService',\n 'dialogsSvc',\n 'checkSecurity',\n function($http, appUrls, flySvc, ModalService, dialogsSvc, checkSecurity) {\n const vm = this;\n if (!vm.list) vm.list = [];\n\n vm.documents = {};\n vm.documentLinkType = 7;\n var relationFile = null;\n\n vm.setRelationFile = function(relFile) {\n relationFile = relFile;\n };\n\n if (vm.list && vm.list.length && checkSecurity('Documents:r')) {\n $http\n .post(\n `${appUrls.documents}/api/documents/GetLinks/${vm.documentLinkType}`,\n vm.list.map(x => x.id),\n )\n .success(function(result) {\n angular.extend(vm.documents, result);\n })\n .error(function(error) {\n flySvc.error(error);\n return '';\n });\n }\n\n vm.showDialog = function(item = null) {\n ModalService.showModal({\n template: require('../dialogs/fiscalCostDialog.html'),\n controller: 'FiscalCostDialog',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n relationId: vm.relId,\n data: item,\n documents: item ? vm.documents[item.id] : [],\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n modal.close.then(function([result = null, documents = null] = []) {\n if (result) {\n if (item && item.id) {\n //Update\n angular.extend(item, result);\n } else {\n //Add\n vm.list.push(result);\n }\n if (relationFile) {\n relationFile.refreshOpenSections();\n }\n }\n const itemId = (item ? item.id : null) || (result ? result.id : null);\n if (documents && itemId) {\n vm.documents[itemId] = [...documents];\n }\n });\n });\n };\n\n vm.add = () => vm.showDialog(null);\n vm.edit = item => vm.showDialog(item);\n\n vm.remove = function(item) {\n if (item.deleting) return;\n return dialogsSvc.showYesNo('comfirmDeleteTitle', 'comfirmDeleteItem').then(\n function() {\n item.deleting = true;\n return $http.delete(`${appUrls.api}/api/Fiscal/Cost/${item.id}`).then(\n () => {\n item.deleting = false;\n const idx = vm.list.indexOf(item);\n if (idx >= 0) {\n vm.list.splice(idx, 1);\n }\n if (vm.documents[item.id] && vm.documents[item.id].length > 0) {\n //Delete document links\n return $http\n .delete(\n `${appUrls.documents}/api/documents/Links/${item.id}/${vm.documentLinkType}`,\n )\n .then(() => {\n delete vm.documents[item.id];\n flySvc.success('msgItemRemoved');\n });\n }\n flySvc.success('msgItemRemoved');\n },\n error => {\n item.deleting = false;\n flySvc.error(error);\n },\n );\n },\n function() {\n return false;\n },\n );\n };\n vm.uploadDocuments = function(files, item) {\n if (!item || !item.id) return;\n if (!files || files.length < 1) return;\n var formData = new FormData();\n formData.append('relationId', vm.relId);\n formData.append('documentLinkType', vm.documentLinkType);\n formData.append('linkId', item.id);\n\n files.forEach(function(file) {\n formData.append('data', file.data);\n });\n\n $http({\n method: 'POST',\n url: appUrls.documents + '/api/documents?documentType=-1',\n headers: {\n 'Content-Type': undefined,\n },\n data: formData,\n })\n .success(function(result) {\n if (result && result.length > 0) {\n if (!vm.documents[item.id]) vm.documents[item.id] = [];\n\n result.forEach(function(file) {\n vm.documents[item.id].push(file);\n });\n flySvc.success();\n }\n })\n .error(function(error) {\n flySvc.error(error);\n return '';\n });\n };\n },\n ],\n };\n});\n","import angular from 'angular';\nimport moment from 'moment';\nimport DocumentService from '@/shared/services/DocumentService';\nimport SignalRService from '@/shared/services/SignalRService';\n\nconst ensureDate = value => {\n if (!value) return null;\n if (typeof value === 'string') return new moment(value.substr(0, 10)).toDate();\n if (moment.isMoment(value)) return value.toDate();\n if (value instanceof Date) return value;\n return value;\n};\nconst mapDocument = ({\n createDate,\n documentDate,\n documentStartDate,\n documentEndDate,\n ...other\n}) => ({\n ...other,\n createDate: ensureDate(createDate),\n documentDate: ensureDate(documentDate),\n documentStartDate: ensureDate(documentStartDate),\n documentEndDate: ensureDate(documentEndDate),\n});\n\nangular.module('cloudX').directive('cxFiscalDocumentList', function() {\n return {\n restrict: 'E',\n template: require('./fiscalDocumentList.html'),\n scope: {\n relId: '=',\n linkType: '=',\n linkId: '=',\n documents: '=?',\n onChange: '&',\n accessor: '=?',\n },\n bindToController: true,\n controllerAs: 'vm',\n controller: [\n '$scope',\n '$http',\n 'appUrls',\n '$q',\n 'flySvc',\n 'ModalService',\n 'dialogsSvc',\n '$timeout',\n function($scope, $http, appUrls, $q, flySvc, ModalService, dialogsSvc, $timeout) {\n const vm = this;\n vm.newDocuments = [];\n vm.showUploadSpinner = false;\n\n vm.triggerChanged = function() {\n vm.onChange({ $documents: vm.documents });\n };\n\n vm.sendDeleteDocumentRequest = function(documentId) {\n return $http.delete(`${appUrls.documents}/api/documents/${documentId}`);\n };\n vm.sendDeleteDocumentLinkRequest = function(documentId) {\n if (!vm.linkId || !vm.linkType) return $q.reject();\n\n return $http.delete(\n `${appUrls.documents}/api/documents/Links/${documentId}/${vm.linkId}/${vm.linkType}`,\n );\n };\n\n vm.onPreviewClosed = () => {\n $timeout(function() {\n vm.showPreview = false;\n vm.activeDocumentId = null;\n }, 0);\n };\n\n vm.onPreviewSaved = document => {\n $timeout(function() {\n vm.showPreview = false;\n vm.activeDocument = null;\n vm.documents = vm.documents.map(x => {\n if (x.id === document.id) {\n return {\n ...x,\n ...document,\n };\n }\n return x;\n });\n }, 0);\n };\n\n vm.previewDocument = document => {\n vm.activeDocument = document;\n vm.showPreview = true;\n };\n\n vm.deleteDocument = function(document, isNew) {\n if (isNew) {\n const idx = vm.newDocuments.indexOf(document);\n if (idx >= 0) vm.newDocuments.splice(idx, 1);\n return;\n } else {\n return dialogsSvc\n .showYesNoCancel('comfirmDeleteTitle', 'msgConfirmDeleteDocumentOrLink')\n .then(function(confirm) {\n if (confirm === null) return false; //cancel\n document.showSpinner = true;\n const request = confirm\n ? vm.sendDeleteDocumentRequest(document.id)\n : vm.sendDeleteDocumentLinkRequest(document.id);\n\n return request\n .success(function(result) {\n flySvc.success();\n var index = vm.documents.indexOf(document);\n if (index >= 0) vm.documents.splice(index, 1);\n document.showSpinner = false;\n vm.triggerChanged();\n })\n .error(function(error) {\n flySvc.error(error);\n document.showSpinner = false;\n return '';\n });\n });\n }\n };\n\n vm.uploadDocuments = function(files, isSaveNew = false) {\n if (!files || files.length < 1) return $q.when(false);\n if (!vm.linkId) {\n if (isSaveNew) return $q.reject();\n files.forEach(x => {\n vm.newDocuments.push({\n ...x,\n documentType: null,\n });\n });\n return $q.when();\n }\n vm.showUploadSpinner = true;\n\n var filesPerDocumentType = files.reduce((o, file) => {\n const documentType = file.documentType ?? -1;\n\n let item = o.find(x => x.documentType === documentType);\n if (!item) {\n item = {\n documentType,\n files: [],\n };\n o.push(item);\n }\n item.files.push(file);\n return o;\n }, []);\n const requests = filesPerDocumentType.map(x => {\n const formData = new FormData();\n formData.append('relationId', vm.relId);\n formData.append('documentLinkType', vm.linkType);\n formData.append('linkId', vm.linkId);\n formData.append('documentType', x.documentType);\n\n x.files.forEach(function(file) {\n formData.append('data', file.data);\n });\n\n return $http({\n method: 'POST',\n url: appUrls.documents + '/api/documents',\n headers: {\n 'Content-Type': undefined,\n },\n data: formData,\n });\n });\n return $q.all(requests).then(\n result => {\n if (!result) return;\n const documents = result.flatMap(({ data = [] }) => data);\n if (!vm.documents) vm.documents = [];\n if (isSaveNew) {\n files.forEach(function(file) {\n const idx = vm.newDocuments.indexOf(file);\n if (idx >= 0) vm.newDocuments.splice(idx, 1);\n });\n }\n\n documents.forEach(function(file) {\n vm.documents.push(mapDocument(file));\n });\n vm.triggerChanged();\n\n if (!isSaveNew) flySvc.success();\n\n vm.showUploadSpinner = false;\n return true;\n },\n error => {\n flySvc.error(error);\n vm.showUploadSpinner = false;\n return '';\n },\n );\n };\n\n vm.uploadNewDocuments = function(linkId) {\n if (!vm.newDocuments || vm.newDocuments.length <= 0) return $q.when(false);\n vm.linkId = linkId || vm.linkId;\n return vm.uploadDocuments(vm.newDocuments, true);\n };\n vm.updateDocument = function(document, field, value) {\n if (typeof value === 'undefined') return '';\n if (field === 'documentDate' && !value) return ''; //Document date is required\n\n var model = angular.copy(document);\n if (angular.equals(model[field], value)) return true;\n model[field] = value;\n if (field === 'documentType' && typeof value === 'string')\n model[field] = parseInt(newType);\n\n if (model.documentDate instanceof Date) model.documentDate = model.documentDate.ISO();\n if (model.documentStartDate instanceof Date)\n model.documentStartDate = model.documentStartDate.ISO();\n if (model.documentEndDate instanceof Date)\n model.documentEndDate = model.documentEndDate.ISO();\n\n return $http.put(appUrls.documents + '/api/Documents/Update', model).then(\n function(result) {\n if (result && result.data) {\n angular.extend(document, mapDocument(result.data));\n flySvc.success();\n }\n return false;\n },\n function(error) {\n flySvc.error(error);\n return '';\n },\n );\n };\n\n $scope.$watch('vm.accessor', function() {\n if (vm.accessor) {\n vm.accessor.uploadNewDocuments = vm.uploadNewDocuments;\n }\n });\n $scope.$watch('vm.documents', function() {\n if (!vm.documents) return;\n vm.documents.forEach(x => angular.extend(x, mapDocument(x)));\n });\n const documentUpdatedHandler = document => {\n if (!document) return;\n $timeout(function() {\n var doc = vm.documents.find(x => x.id == document.id);\n if (!doc) return;\n\n angular.extend(doc, mapDocument(document));\n }, 0);\n };\n SignalRService.subscribe('documentUpdated', documentUpdatedHandler);\n $scope.$on('$destroy', function() {\n SignalRService.unsubscribe('documentUpdated', documentUpdatedHandler);\n });\n },\n ],\n };\n});\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxFiscalInsuranceList', function() {\n return {\n restrict: 'E',\n template: require('./fiscalInsuranceList.html'),\n bindToController: { field: '=', relId: '@', list: '=value' },\n controllerAs: 'vm',\n require: ['^cxRelationFile', 'cxFiscalInsuranceList'],\n link: function(scope, el, attrs, controllers) {\n if (!controllers || controllers.length !== 2) return;\n var cxRelFile = controllers[0];\n var controller = controllers[1];\n controller.setRelationFile(cxRelFile);\n },\n controller: [\n '$http',\n 'appUrls',\n 'flySvc',\n 'ModalService',\n 'dialogsSvc',\n 'checkSecurity',\n function($http, appUrls, flySvc, ModalService, dialogsSvc, checkSecurity) {\n const vm = this;\n if (!vm.list) vm.list = [];\n vm.documents = {};\n vm.documentLinkType = 8;\n var relationFile = null;\n\n vm.setRelationFile = function(relFile) {\n relationFile = relFile;\n };\n if (vm.list && vm.list.length && checkSecurity('Documents:r')) {\n $http\n .post(\n `${appUrls.documents}/api/documents/GetLinks/${vm.documentLinkType}`,\n vm.list.map(x => x.id),\n )\n .success(function(result) {\n angular.extend(vm.documents, result);\n })\n .error(function(error) {\n flySvc.error(error);\n return '';\n });\n }\n\n vm.showDialog = function(item = null) {\n ModalService.showModal({\n template: require('../dialogs/fiscalInsuranceDialog.html'),\n controller: 'FiscalInsuranceDialog',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n relationId: vm.relId,\n data: item,\n documents: item ? vm.documents[item.id] : [],\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n modal.close.then(function([result = null, documents = null] = []) {\n if (result) {\n if (item && item.id) {\n //Update\n angular.extend(item, result);\n } else {\n //Add\n vm.list.push(result);\n }\n if (relationFile) {\n relationFile.refreshOpenSections();\n }\n }\n const itemId = (item ? item.id : null) || (result ? result.id : null);\n if (documents && itemId) {\n vm.documents[itemId] = [...documents];\n }\n });\n });\n };\n\n vm.add = () => vm.showDialog(null);\n vm.edit = item => vm.showDialog(item);\n\n vm.remove = function(item) {\n if (item.deleting) return;\n return dialogsSvc.showYesNo('comfirmDeleteTitle', 'comfirmDeleteItem').then(\n function() {\n item.deleting = true;\n return $http.delete(`${appUrls.api}/api/Fiscal/Insurance/${item.id}`).then(\n () => {\n item.deleting = false;\n const idx = vm.list.indexOf(item);\n if (idx >= 0) {\n vm.list.splice(idx, 1);\n }\n if (vm.documents[item.id] && vm.documents[item.id].length > 0) {\n //Delete document links\n return $http\n .delete(\n `${appUrls.documents}/api/documents/Links/${item.id}/${vm.documentLinkType}`,\n )\n .then(() => {\n delete vm.documents[item.id];\n flySvc.success('msgItemRemoved');\n });\n }\n flySvc.success('msgItemRemoved');\n },\n error => {\n item.deleting = false;\n flySvc.error(error);\n },\n );\n },\n function() {\n return false;\n },\n );\n };\n vm.uploadDocuments = function(files, item) {\n if (!item || !item.id) return;\n if (!files || files.length < 1) return;\n var formData = new FormData();\n formData.append('relationId', vm.relId);\n formData.append('documentLinkType', vm.documentLinkType);\n formData.append('linkId', item.id);\n\n files.forEach(function(file) {\n formData.append('data', file.data);\n });\n\n $http({\n method: 'POST',\n url: appUrls.documents + '/api/documents?documentType=-1',\n headers: {\n 'Content-Type': undefined,\n },\n data: formData,\n })\n .success(function(result) {\n if (result && result.length > 0) {\n if (!vm.documents[item.id]) vm.documents[item.id] = [];\n\n result.forEach(function(file) {\n vm.documents[item.id].push(file);\n });\n flySvc.success();\n }\n })\n .error(function(error) {\n flySvc.error(error);\n return '';\n });\n };\n },\n ],\n };\n});\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxFiscalLoanList', function() {\n return {\n restrict: 'E',\n template: require('./fiscalLoanList.html'),\n bindToController: { field: '=', relId: '@', list: '=value' },\n controllerAs: 'vm',\n controller: [\n '$http',\n 'appUrls',\n 'flySvc',\n 'ModalService',\n 'dialogsSvc',\n 'checkSecurity',\n function($http, appUrls, flySvc, ModalService, dialogsSvc, checkSecurity) {\n const vm = this;\n if (!vm.list) vm.list = [];\n vm.documents = {};\n vm.documentLinkType = 9;\n\n if (vm.list && vm.list.length && checkSecurity('Documents:r')) {\n $http\n .post(\n `${appUrls.documents}/api/documents/GetLinks/${vm.documentLinkType}`,\n vm.list.map(x => x.id),\n )\n .success(function(result) {\n angular.extend(vm.documents, result);\n })\n .error(function(error) {\n flySvc.error(error);\n return '';\n });\n }\n\n vm.showInactiveLoans = false;\n vm.isInactive = item => item.endDate && item.endDate <= new Date();\n vm.inactiveFilter = item => vm.showInactiveLoans || !vm.isInactive(item);\n\n vm.showDialog = function(item = null) {\n ModalService.showModal({\n template: require('../dialogs/fiscalLoanDialog.html'),\n controller: 'FiscalLoanDialog',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n relationId: vm.relId,\n data: item,\n documents: item ? vm.documents[item.id] : [],\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n modal.close.then(function([result = null, documents = null] = []) {\n if (result) {\n if (item && item.id) {\n //Update\n angular.extend(item, result);\n } else {\n //Add\n vm.list.push(result);\n }\n }\n const itemId = (item ? item.id : null) || (result ? result.id : null);\n if (documents && itemId) {\n vm.documents[itemId] = [...documents];\n }\n });\n });\n };\n\n vm.add = () => vm.showDialog(null);\n vm.edit = item => vm.showDialog(item);\n\n vm.remove = function(item) {\n if (item.deleting) return;\n return dialogsSvc.showYesNo('comfirmDeleteTitle', 'comfirmDeleteItem').then(\n function() {\n item.deleting = true;\n return $http.delete(`${appUrls.api}/api/Fiscal/Loan/${item.id}`).then(\n () => {\n item.deleting = false;\n const idx = vm.list.indexOf(item);\n if (idx >= 0) {\n vm.list.splice(idx, 1);\n }\n if (vm.documents[item.id] && vm.documents[item.id].length > 0) {\n //Delete document links\n return $http\n .delete(\n `${appUrls.documents}/api/documents/Links/${item.id}/${vm.documentLinkType}`,\n )\n .then(() => {\n delete vm.documents[item.id];\n flySvc.success('msgItemRemoved');\n });\n }\n flySvc.success('msgItemRemoved');\n },\n error => {\n item.deleting = false;\n flySvc.error(error);\n },\n );\n },\n function() {\n return false;\n },\n );\n };\n vm.uploadDocuments = function(files, item) {\n if (!item || !item.id) return;\n if (!files || files.length < 1) return;\n var formData = new FormData();\n formData.append('relationId', vm.relId);\n formData.append('documentLinkType', vm.documentLinkType);\n formData.append('linkId', item.id);\n\n files.forEach(function(file) {\n formData.append('data', file.data);\n });\n\n $http({\n method: 'POST',\n url: appUrls.documents + '/api/documents?documentType=-1',\n headers: {\n 'Content-Type': undefined,\n },\n data: formData,\n })\n .success(function(result) {\n if (result && result.length > 0) {\n if (!vm.documents[item.id]) vm.documents[item.id] = [];\n\n result.forEach(function(file) {\n vm.documents[item.id].push(file);\n });\n flySvc.success();\n }\n })\n .error(function(error) {\n flySvc.error(error);\n return '';\n });\n };\n },\n ],\n };\n});\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxFiscalRealEstateList', function() {\n return {\n restrict: 'E',\n template: require('./fiscalRealEstateList.html'),\n bindToController: { field: '=', relId: '@', list: '=value' },\n controllerAs: 'vm',\n require: ['^cxRelationFile', 'cxFiscalRealEstateList'],\n link: function(scope, el, attrs, controllers) {\n if (!controllers || controllers.length !== 2) return;\n var cxRelFile = controllers[0];\n var controller = controllers[1];\n controller.setRelationFile(cxRelFile);\n },\n controller: [\n '$http',\n 'appUrls',\n 'flySvc',\n 'ModalService',\n 'dialogsSvc',\n 'checkSecurity',\n function($http, appUrls, flySvc, ModalService, dialogsSvc, checkSecurity) {\n const vm = this;\n if (!vm.list) vm.list = [];\n vm.documents = {};\n vm.documentLinkType = 10;\n var relationFile = null;\n\n vm.setRelationFile = function(relFile) {\n relationFile = relFile;\n };\n\n if (vm.list && vm.list.length && checkSecurity('Documents:r')) {\n $http\n .post(\n `${appUrls.documents}/api/documents/GetLinks/${vm.documentLinkType}`,\n vm.list.map(x => x.id),\n )\n .success(function(result) {\n angular.extend(vm.documents, result);\n })\n .error(function(error) {\n flySvc.error(error);\n return '';\n });\n }\n\n vm.showDialog = function(item = null) {\n ModalService.showModal({\n template: require('../dialogs/fiscalRealEstateDialog.html'),\n controller: 'FiscalRealEstateDialog',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n relationId: vm.relId,\n data: item,\n documents: item ? vm.documents[item.id] : [],\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n modal.close.then(function([result = null, documents = null] = []) {\n if (result) {\n if (item && item.id) {\n //Update\n angular.extend(item, result);\n } else {\n //Add\n vm.list.push(result);\n }\n }\n const itemId = (item ? item.id : null) || (result ? result.id : null);\n if (documents && itemId) {\n vm.documents[itemId] = [...documents];\n }\n });\n });\n };\n\n vm.add = () => vm.showDialog(null);\n vm.edit = item => vm.showDialog(item);\n\n vm.remove = function(item) {\n if (item.deleting) return;\n return dialogsSvc.showYesNo('comfirmDeleteTitle', 'comfirmDeleteItem').then(\n function() {\n item.deleting = true;\n return $http.delete(`${appUrls.api}/api/Fiscal/RealEstate/${item.id}`).then(\n () => {\n item.deleting = false;\n const idx = vm.list.indexOf(item);\n if (idx >= 0) {\n vm.list.splice(idx, 1);\n }\n if (vm.documents[item.id] && vm.documents[item.id].length > 0) {\n //Delete document links\n return $http\n .delete(\n `${appUrls.documents}/api/documents/Links/${item.id}/${vm.documentLinkType}`,\n )\n .then(() => {\n delete vm.documents[item.id];\n if (relationFile) {\n relationFile.refreshOpenSections();\n }\n flySvc.success('msgItemRemoved');\n });\n }\n flySvc.success('msgItemRemoved');\n if (relationFile) {\n relationFile.refreshOpenSections();\n }\n },\n error => {\n item.deleting = false;\n flySvc.error(error);\n },\n );\n },\n function() {\n return false;\n },\n );\n };\n vm.uploadDocuments = function(files, item) {\n if (!item || !item.id) return;\n if (!files || files.length < 1) return;\n var formData = new FormData();\n formData.append('relationId', vm.relId);\n formData.append('documentLinkType', vm.documentLinkType);\n formData.append('linkId', item.id);\n\n files.forEach(function(file) {\n formData.append('data', file.data);\n });\n\n $http({\n method: 'POST',\n url: appUrls.documents + '/api/documents?documentType=-1',\n headers: {\n 'Content-Type': undefined,\n },\n data: formData,\n })\n .success(function(result) {\n if (result && result.length > 0) {\n if (!vm.documents[item.id]) vm.documents[item.id] = [];\n\n result.forEach(function(file) {\n vm.documents[item.id].push(file);\n });\n flySvc.success();\n }\n })\n .error(function(error) {\n flySvc.error(error);\n return '';\n });\n };\n },\n ],\n };\n});\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxFiscalVehicleList', function() {\n return {\n restrict: 'E',\n template: require('./fiscalVehicleList.html'),\n bindToController: { field: '=', relId: '@', list: '=value' },\n controllerAs: 'vm',\n controller: [\n '$http',\n 'appUrls',\n 'flySvc',\n 'ModalService',\n 'dialogsSvc',\n 'checkSecurity',\n function($http, appUrls, flySvc, ModalService, dialogsSvc, checkSecurity) {\n const vm = this;\n if (!vm.list) vm.list = [];\n vm.documents = {};\n vm.documentLinkType = 11;\n vm.collapsed = false;\n vm.showInactiveVehicles = false;\n vm.inactiveFilter = item => {\n return !vm.showInactiveVehicles ? !item.saleDate : true;\n };\n\n if (vm.list && vm.list.length && checkSecurity('Documents:r')) {\n $http\n .post(\n `${appUrls.documents}/api/documents/GetLinks/${vm.documentLinkType}`,\n vm.list.map(x => x.id),\n )\n .success(function(result) {\n angular.extend(vm.documents, result);\n })\n .error(function(error) {\n flySvc.error(error);\n return '';\n });\n }\n\n vm.showDialog = function(item = null) {\n ModalService.showModal({\n template: require('../dialogs/fiscalVehicleDialog.html'),\n controller: 'FiscalVehicleDialog',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n relationId: vm.relId,\n data: item,\n documents: item ? vm.documents[item.id] : [],\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n modal.close.then(function([result = null, documents = null] = []) {\n if (result) {\n if (item && item.id) {\n //Update\n angular.extend(item, result);\n } else {\n //Add\n vm.list.push(result);\n }\n }\n const itemId = (item ? item.id : null) || (result ? result.id : null);\n if (documents && itemId) {\n vm.documents[itemId] = [...documents];\n }\n });\n });\n };\n\n vm.add = () => vm.showDialog(null);\n vm.edit = item => vm.showDialog(item);\n\n vm.remove = function(item) {\n if (item.deleting) return;\n return dialogsSvc.showYesNo('comfirmDeleteTitle', 'comfirmDeleteItem').then(\n function() {\n item.deleting = true;\n return $http.delete(`${appUrls.api}/api/Fiscal/Vehicle/${item.id}`).then(\n () => {\n item.deleting = false;\n const idx = vm.list.indexOf(item);\n if (idx >= 0) {\n vm.list.splice(idx, 1);\n }\n if (vm.documents[item.id] && vm.documents[item.id].length > 0) {\n //Delete document links\n return $http\n .delete(\n `${appUrls.documents}/api/documents/Links/${item.id}/${vm.documentLinkType}`,\n )\n .then(() => {\n delete vm.documents[item.id];\n flySvc.success('msgItemRemoved');\n });\n }\n flySvc.success('msgItemRemoved');\n },\n error => {\n item.deleting = false;\n flySvc.error(error);\n },\n );\n },\n function() {\n return false;\n },\n );\n };\n vm.uploadDocuments = function(files, item) {\n if (!item || !item.id) return;\n if (!files || files.length < 1) return;\n var formData = new FormData();\n formData.append('relationId', vm.relId);\n formData.append('documentLinkType', vm.documentLinkType);\n formData.append('linkId', item.id);\n\n files.forEach(function(file) {\n formData.append('data', file.data);\n });\n\n $http({\n method: 'POST',\n url: appUrls.documents + '/api/documents?documentType=-1',\n headers: {\n 'Content-Type': undefined,\n },\n data: formData,\n })\n .success(function(result) {\n if (result && result.length > 0) {\n if (!vm.documents[item.id]) vm.documents[item.id] = [];\n\n result.forEach(function(file) {\n vm.documents[item.id].push(file);\n });\n flySvc.success();\n }\n })\n .error(function(error) {\n flySvc.error(error);\n return '';\n });\n };\n },\n ],\n };\n});\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxFiscalYearDialogButton', [\n '$q',\n 'ModalService',\n function($q, ModalService) {\n return {\n restrict: 'E',\n replace: true,\n scope: {\n relation: '=',\n gmType: '=',\n relationId: '=',\n },\n template: `\n \n \n `,\n require: ['^cxRelationFile'],\n link: function($scope, element, attrs, ctrl) {\n var cxRelFile = ctrl[0];\n $scope.showFiscalYearsDialog = function() {\n let relationId = $scope.relationId;\n let gmType = $scope.gmType;\n if ($scope.relation && $scope.relation.id) {\n relationId = $scope.relation.id;\n const { value: gm = {} } =\n $scope.relation['cd2ee705-f073-44e0-8e68-be67c9549683'] || {};\n gmType = gm.type || 0;\n }\n\n ModalService.showModal({\n template: require('../../relations/dialogs/fiscalYearDialog.html'),\n controller: 'FiscalYearDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n relationId,\n gmType,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n modal.close.then(function(result) {\n if (!result) return;\n if (cxRelFile && cxRelFile.refreshOpenSections) cxRelFile.refreshOpenSections();\n });\n });\n };\n },\n };\n },\n]);\n","import angular from 'angular';\nimport adminpulse from '@/shared/utils/adminpulse';\n\nconst mapBudget = function(data) {\n if (!data) {\n return null;\n }\n data.periodFrom = adminpulse.toDateOnly(data.periodFrom);\n data.periodUntil = adminpulse.toDateOnly(data.periodUntil);\n return data;\n};\n\nangular.module('cxRelations').directive('cxInvoiceStream', function() {\n return {\n restrict: 'E',\n template: require('./invoiceStream.html'),\n scope: {\n list: '=data',\n field: '=field',\n relation: '=',\n },\n controller: [\n '$scope',\n 'resourceFactorySvc',\n 'flySvc',\n 'ModalService',\n 'dialogsSvc',\n 'invoiceDialogsSvc',\n '$http',\n 'appUrls',\n 'checkFeature',\n 'relBudgetSvc',\n 'checkInvoiceTeamAccess',\n function(\n $scope,\n resourceFactorySvc,\n flySvc,\n ModalService,\n dialogsSvc,\n invoiceDialogsSvc,\n $http,\n appUrls,\n checkFeature,\n relBudgetSvc,\n checkInvoiceTeamAccess,\n ) {\n var showError = function(error) {\n flySvc.error(error);\n return '';\n };\n var resource = resourceFactorySvc.get('invoiceStream');\n $scope.invTypeCnt = [0, 0, 0];\n\n $scope.defaultStream = null;\n $scope.budgets = {}; //store per invoicestreamId\n $scope.showInvoicingViaColumn = false;\n\n var recalcInvTypeCnt = function() {\n $scope.invTypeCnt[0] = $scope.invTypeCnt[1] = $scope.invTypeCnt[2] = 0;\n $scope.showInvoicingViaColumn = false;\n if (!$scope.list) return;\n for (var i = 0; i < $scope.list.length; i++)\n if ($scope.list[i].schedule && $scope.list[i].schedule.id)\n $scope.invTypeCnt[$scope.list[i].schedule.invoicingType]++;\n\n $scope.showInvoicingViaColumn = $scope.list.some(\n x => !x.schedule || !!x.invoicingViaRelation,\n );\n };\n\n var reloadInvoiceStreams = function() {\n resourceFactorySvc.get('invoiceStream').invoiceStreams(\n {\n id: $scope.relation.id,\n },\n function(data) {\n if (data) {\n $scope.list = data;\n $scope.defaultStream = data.find(x => !x.assignmentId);\n loadBudgets();\n }\n },\n );\n };\n var setDefaultStream = function() {\n $scope.defaultStream = $scope.list ? $scope.list.find(x => !x.assignmentId) : null;\n };\n\n $scope.$watchCollection('list', function() {\n recalcInvTypeCnt();\n setDefaultStream();\n loadBudgets();\n });\n\n recalcInvTypeCnt();\n setDefaultStream();\n\n var reloadBudget = function(invoiceStreamId) {\n if (!invoiceStreamId) return;\n return $http\n .get(`${appUrls.api}/api/Budget/Current/${invoiceStreamId}`)\n .then(({ data }) => {\n const budget = mapBudget(data);\n $scope.budgets[invoiceStreamId] = budget;\n return budget;\n }, showError);\n };\n var loadBudgets = function(reload = false) {\n if (!$scope.list) return;\n const streams = reload\n ? $scope.list\n : $scope.list.filter(x => typeof $scope.budgets[x.id] === 'undefined');\n\n if (streams.length === 0) return;\n streams.forEach(stream => {\n reloadBudget(stream.id);\n });\n };\n\n $scope.save = function(stream, field, data) {\n //Validation error\n if (typeof data === 'undefined') return '';\n if (field === 'startDate' && !data) return '';\n\n if (angular.equals(stream[field], data)) return false;\n var model = angular.copy(stream);\n\n model.deleteExistingLines = true;\n\n var updateFunction = function(updatedModel) {\n return resource.update(updatedModel).$promise.then(function(response) {\n if (response) angular.extend(stream, response);\n flySvc.success('msgConfirmChange');\n if (field === 'schedule') recalcInvTypeCnt();\n if (field === 'companyId') {\n reloadBudget(stream.id);\n relBudgetSvc.reload($scope.relation.id);\n }\n return false;\n }, showError);\n };\n\n var showChangeScheduleDialog = function(callback, model) {\n return dialogsSvc\n .showYesNoCancel(\n 'msgChangeInvoiceStreamScheduleTitle',\n 'msgInvoiceStreamChangeExistingSchedules',\n )\n .then(\n function(result) {\n if (result == null) return false;\n model.deleteExistingLines = result;\n\n return callback(model);\n },\n function() {\n return false;\n },\n );\n };\n\n var fieldHadValue = model[field];\n\n model[field] = data;\n\n if (field === 'schedule' && fieldHadValue) {\n //If the schedule was not empty before and has now changed, show dialog asking if existing lines should be deleted\n return showChangeScheduleDialog(updateFunction, model);\n } else {\n return updateFunction(model);\n }\n };\n\n $scope.showPlannedSchedules = function(stream) {\n ModalService.showModal({\n template: require('../dialogs/invoiceStreamScheduleDialog.html'),\n controller: 'InvoiceStreamScheduleDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n stream: stream,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n modal.close.then(function(result) {\n if (result) {\n reloadInvoiceStreams();\n }\n });\n });\n };\n\n $scope.showAuthResources = function(stream) {\n ModalService.showModal({\n template: require('../dialogs/authResourcesDialog.html'),\n controller: 'AuthResourcesDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n stream: stream,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.close.then(function(result) {\n if (typeof result === 'undefined' || result === null) return false;\n\n return flySvc.success('msgConfirmChange');\n });\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n });\n };\n\n $scope.showInvoiceStreamSettings = function(stream, forInvoicingVia = false) {\n ModalService.showModal({\n template: require('../dialogs/invoiceStreamSettingsDialog.html'),\n controller: 'InvoiceStreamSettingsDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n invoicestream: stream,\n relation: $scope.relation,\n forInvoicingVia,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n modal.close.then(function(result) {\n if (result) {\n angular.extend(stream, result);\n recalcInvTypeCnt();\n }\n });\n });\n };\n $scope.showBillingSettings = function(stream) {\n ModalService.showModal({\n template: require('../dialogs/billingSettingsDialog.html'),\n controller: 'BillingSettingsDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n invoicestream: stream,\n relation: $scope.relation,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n modal.close.then(function(result) {\n if (result) {\n angular.extend(stream, result);\n recalcInvTypeCnt();\n }\n });\n });\n };\n\n $scope.addAssignment = function() {\n ModalService.showModal({\n template: require('../dialogs/addAssignmentDialog.html'),\n controller: 'AddAssignmentDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n relation: $scope.relation,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n modal.close.then(function(result) {\n if (result) {\n $scope.list.push(result);\n if ($scope.relation.invoiceStreams) {\n const { id, assignmentId, assignmentTemplateId, assignmentName } = result;\n // Add new invoice stream to array on relation, this is used by other fields\n $scope.relation.invoiceStreams.push({\n id,\n assignmentId,\n assignmentTemplateId,\n assignmentName,\n isActive: true,\n isMain: false,\n });\n }\n recalcInvTypeCnt();\n loadBudgets();\n }\n });\n });\n };\n\n $scope.deleteAssignment = function(stream) {\n if (!stream || !stream.id || !stream.assignmentId) return;\n ModalService.showModal({\n template: require('../dialogs/deleteAssignmentDialog.html'),\n controller: 'DeleteAssignmentDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n invoiceStreamId: stream.id,\n relationId: $scope.relation.id,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n modal.close.then(function(result) {\n if (result) {\n if ($scope.budgets[stream.id]) relBudgetSvc.reload($scope.relation.id);\n delete $scope.budgets[stream.id];\n var idx = $scope.list.indexOf(stream);\n if (idx >= 0) {\n $scope.list.splice(idx, 1);\n }\n if ($scope.relation.invoiceStreams) {\n idx = $scope.relation.invoiceStreams.findIndex(x => x.id === stream.id);\n if (idx >= 0) $scope.relation.invoiceStreams.splice(idx, 1);\n }\n }\n });\n });\n };\n\n $scope.editAssignment = function(stream) {\n if (!stream || !stream.id || !stream.assignmentId) return;\n ModalService.showModal({\n template: require('../dialogs/editAssignmentDialog.html'),\n controller: 'EditAssignmentDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n invoiceStream: { ...stream },\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n modal.close.then(function(result) {\n if (result) {\n angular.extend(stream, result);\n if ($scope.relation.invoiceStreams) {\n const {\n id,\n assignmentId,\n assignmentTemplateId,\n assignmentName,\n isActive = true,\n } = result;\n const updatedRelStream = {\n id,\n assignmentId,\n assignmentTemplateId,\n assignmentName,\n isActive: true,\n isMain: false,\n };\n const relStream = $scope.relation.invoiceStreams.find(x => x.id === id);\n if (relStream) {\n angular.extend(relStream, updatedRelStream);\n } else {\n // Add new invoice stream to array on relation, this is used by other fields\n $scope.relation.invoiceStreams.push(updatedRelStream);\n }\n }\n recalcInvTypeCnt();\n }\n });\n });\n };\n\n $scope.showInvoicingHistory = function(stream) {\n invoiceDialogsSvc.showInvoicingHistory(stream.id, null, $scope.relation.id);\n };\n\n $scope.deleteActiveSchedule = function(stream) {\n return $http\n .get(`${appUrls.api}/api/invoiceStream/InvoiceStreamHasDraftInvoices/${stream.id}`)\n .then(\n ({ data }) => {\n if (data) {\n return dialogsSvc\n .showYesNo(\n 'msgConfirmDeleteTitle',\n 'msgConfirmDeleteActiveInvoiceScheduleWithDraftInvoices',\n )\n .then(function() {\n return doDeleteActiveSchedule(stream);\n });\n } else {\n return dialogsSvc\n .showYesNo('msgConfirmDeleteTitle', 'msgConfirmDeleteActiveInvoiceSchedule')\n .then(function() {\n return doDeleteActiveSchedule(stream);\n });\n }\n },\n function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n return '';\n },\n );\n };\n\n var doDeleteActiveSchedule = stream => {\n stream.deletingActiveSchedule = true;\n return resourceFactorySvc\n .get('invoiceStream')\n .clearActiveSchedule({\n id: stream.id,\n })\n .$promise.then(\n function(response) {\n stream.deletingActiveSchedule = false;\n if (response) {\n if (response) angular.extend(stream, response);\n flySvc.success('msgConfirmChange');\n recalcInvTypeCnt();\n return false;\n }\n return false;\n },\n function(error) {\n stream.deletingActiveSchedule = false;\n showError(error);\n },\n );\n };\n $scope.saveBudget = function(invoiceStreamId, field, data) {\n //Validation error\n if (typeof data === 'undefined') return '';\n const budget = $scope.budgets[invoiceStreamId] || { invoiceStreamId };\n if (angular.equals(budget[field], data)) return false;\n var model = angular.copy(budget);\n model[field] = data;\n if (model.budgetFrom instanceof Date) model.budgetFrom = model.budgetFrom.ISO();\n if (model.budgetUntil instanceof Date) model.budgetUntil = model.budgetUntil.ISO();\n return $http.put(`${appUrls.api}/api/budget/`, model).then(({ data }) => {\n const newBudget = mapBudget(data);\n $scope.budgets[invoiceStreamId] = newBudget;\n relBudgetSvc.reload($scope.relation.id);\n return false;\n }, showError);\n };\n\n $scope.showBudgetDialog = function(invoiceStream) {\n ModalService.showModal({\n template: require('../dialogs/invoiceStreamBudgetDialog.html'),\n controller: 'InvoiceStreamBudgetDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n stream: invoiceStream,\n readOnly: !$scope.relation.hasInvoiceTeamAccess,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n modal.close.then(function(result) {\n if (result) {\n reloadBudget(invoiceStream.id);\n relBudgetSvc.reload($scope.relation.id);\n }\n });\n });\n };\n },\n ],\n };\n});\n","import angular from 'angular';\nimport moment from 'moment';\n\nangular.module('cxRelations').directive('cxInvoicingVia', [\n function() {\n return {\n restrict: 'E',\n template: require('./invoicingVia.html'),\n scope: {\n relation: '=',\n disabled: '=',\n },\n bindToController: true,\n controllerAs: 'vm',\n controller: [\n '$scope',\n '$http',\n 'appUrls',\n 'flySvc',\n '$timeout',\n '$q',\n 'dataCache',\n 'resourceFactorySvc',\n function($scope, $http, appUrls, flySvc, $timeout, $q, dataCache, resourceFactorySvc) {\n var vm = this;\n vm.invoicedRelations = [];\n vm.showAllInvoicedRelations = false;\n vm.showInvoicingVia = !dataCache.getArray('assignmentsEnabled');\n vm.selectedRelation = null;\n vm.selectedInvoiceStream = null;\n vm.mainInvoiceStream = null;\n vm.saving = false;\n vm.hasInvoicingViaForMainInvoiceStream = false;\n\n var getInvoicedRelations = function() {\n var deferred = $q.defer();\n return $http\n .get(appUrls.api + '/api/relation/invoicingvia/invoicedRelations/preview', {\n params: {\n id: vm.relation.id,\n },\n cancel: deferred,\n })\n .then(\n ({ data }) => {\n vm.invoicedRelations = data.relations;\n vm.hasMoreInvoicedRelations = data.hasMore;\n vm.hasInvoicingViaForMainInvoiceStream =\n vm.mainInvoiceStream &&\n vm.invoicedRelations &&\n vm.invoicedRelations.some(\n x => x.invoicingViaStream.id === vm.mainInvoiceStream.id,\n );\n\n return data;\n },\n error => {\n flySvc.error(error);\n return '';\n },\n );\n };\n getInvoicedRelations();\n\n vm.seeAllInvoicedRelations = () => {\n vm.showAllInvoicedRelations = !vm.showAllInvoicedRelations;\n };\n\n vm.onShowAllInvoicedRelationsClosed = () => {\n $timeout(() => {\n vm.showAllInvoicedRelations = false;\n }, 100);\n };\n\n vm.save = function(relationId, invoiceStreamId) {\n if (!vm.mainInvoiceStream) return $q.error();\n vm.saving = true;\n const model = angular.copy(vm.mainInvoiceStream);\n\n model.invoicingViaRelation = relationId && invoiceStreamId ? { id: relationId } : null;\n model.invoicingViaStream =\n relationId && invoiceStreamId ? { id: invoiceStreamId } : null;\n model.startDate = moment\n .utc()\n .startOf('d')\n .toDate();\n model.schedule = null;\n\n return resourceFactorySvc\n .get('invoiceStream')\n .update(model)\n .$promise.then(\n response => {\n flySvc.success('msgConfirmChange');\n angular.extend(vm.mainInvoiceStream, response);\n vm.saving = false;\n return vm.mainInvoiceStream;\n },\n error => {\n flySvc.error(error);\n vm.saving = false;\n return '';\n },\n );\n };\n\n vm.relationChanged = function(selectedValue) {\n var invoiceStreamId = null;\n if (!selectedValue || selectedValue.id === vm.relation.id) {\n //Empty or main relation selected\n //Clear invoicing via\n invoiceStreamId = null;\n } else {\n if (!vm.selectedRelation || selectedValue.id !== vm.selectedRelation.id) {\n //Other relation selected, select default invoiceStream\n invoiceStreamId = selectedValue.invoiceStreamId;\n if (!invoiceStreamId) return ''; //Error, relation has no default invoiceStream!\n } else {\n //Same relation\n return false; // Not changed\n }\n }\n\n return vm.save(selectedValue.id, invoiceStreamId).then(function(data) {\n if (!data) return data;\n vm.value = data;\n vm.selectedRelation = selectedValue;\n return vm.getInvoiceStreams().then(streams => {\n vm.selectedInvoiceStream = invoiceStreamId\n ? (streams || []).find(x => x.id === invoiceStreamId)\n : null;\n return true;\n });\n });\n };\n vm.invoiceStreamChanged = function(selectedValue) {\n var invoiceStreamId = selectedValue ? selectedValue.id : null;\n if (!invoiceStreamId && vm.selectedRelation && vm.selectedRelation.invoiceStreamId) {\n invoiceStreamId = vm.selectedRelation.invoiceStreamId; //Reset to default invoice stream\n }\n if (vm.selectedInvoiceStream && invoiceStreamId === vm.selectedInvoiceStream.id)\n return false; //Not changed\n\n return vm.save(vm.selectedRelation.id, invoiceStreamId).then(function(data) {\n if (!data) return data;\n vm.value = data;\n vm.selectedInvoiceStream = selectedValue;\n return true;\n });\n };\n vm.clearInvoicingVia = function() {\n return vm.save(null, null).then(function(data) {\n if (!data) return;\n vm.selectedRelation = null;\n vm.selectedInvoiceStream = null;\n });\n };\n\n var findRelationName = relationId => {\n return $http\n .post(appUrls.api + '/api/relation/Names', [relationId])\n .then(({ data = [] }) => {\n return data.length ? data[0] : null;\n });\n };\n\n vm.getInvoiceStreams = () => {\n if (!vm.selectedRelation) return $q.when([]);\n if (vm.selectedRelation.invoiceStreams && vm.selectedRelation.invoiceStreams.length > 0)\n return $q.when(vm.selectedRelation.invoiceStreams);\n\n //Retrieve\n return findRelationName(vm.selectedRelation.id).then(function(value) {\n if (value) {\n angular.extend(vm.selectedRelation, {\n invoiceStreams: value.invoiceStreams || [],\n });\n if (vm.selectedInvoiceStream && vm.selectedRelation.invoiceStreams) {\n vm.selectedInvoiceStream = vm.selectedRelation.invoiceStreams.find(\n x => x.id === vm.selectedInvoiceStream.id,\n );\n }\n } else {\n vm.selectedRelation.invoiceStreams;\n }\n return vm.selectedRelation.invoiceStreams;\n });\n };\n\n $scope.$watch(`vm.relation['00ac639e-027a-4589-90fa-9017873c8e5a'].value`, function(\n newValue,\n ) {\n if (\n typeof newValue === 'undefined' &&\n vm.relation &&\n typeof vm.relation['00ac639e-027a-4589-90fa-9017873c8e5a'] === 'undefined' &&\n vm.relation.crm === 0\n ) {\n resourceFactorySvc\n .get('invoiceStream')\n .invoiceStreams({ id: vm.relation.id }, data => {\n if (\n vm.relation &&\n typeof vm.relation['00ac639e-027a-4589-90fa-9017873c8e5a'] === 'undefined'\n ) {\n vm.relation['00ac639e-027a-4589-90fa-9017873c8e5a'] = { value: data };\n }\n });\n return;\n } else if (!newValue) {\n vm.selectedRelation = null;\n vm.selectedInvoiceStream = null;\n vm.mainInvoiceStream = null;\n return;\n }\n vm.mainInvoiceStream = newValue.find(x => !x.assignmentId);\n\n vm.selectedRelation = vm.mainInvoiceStream.invoicingViaRelation || null;\n vm.selectedInvoiceStream = vm.mainInvoiceStream.invoicingViaStream || null;\n vm.showInvoicingVia =\n newValue.length === 1 || !dataCache.getArray('assignmentsEnabled');\n\n vm.hasInvoicingViaForMainInvoiceStream =\n vm.mainInvoiceStream &&\n vm.invoicedRelations &&\n vm.invoicedRelations.some(x => x.invoicingViaStream.id === vm.mainInvoiceStream.id);\n });\n },\n ],\n };\n },\n]);\n","import angular from 'angular';\nimport { Registration } from '../../registrations/model/registration';\nimport { guid1 } from '@/shared/utils/guid';\n\nangular.module('cxRelations').directive('cxPlannedRegistrations', function() {\n return {\n restrict: 'E',\n template: require('./plannedRegistrations.html'),\n scope: {\n relation: '=',\n },\n controllerAs: 'vm',\n bindToController: true,\n controller: [\n 'resourceFactorySvc',\n 'flySvc',\n 'userData',\n 'ModalService',\n 'dialogsSvc',\n 'resourceNameFilter',\n '$translate',\n 'dataCache',\n function(\n resourceFactorySvc,\n flySvc,\n userData,\n ModalService,\n dialogsSvc,\n resourceNameFilter,\n $translate,\n dataCache,\n ) {\n var vm = this;\n var resource = resourceFactorySvc.get('plannedRegistration');\n var showError = function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n return '';\n };\n vm.schedules = null;\n vm.users = dataCache\n .getArray('user')\n .filter(x => x.isActive || !x.hidden)\n .map(({ userID, firstName, lastName, isActive }) => ({\n id: userID,\n name: `${firstName} ${lastName}`,\n text: (isActive ? '' : 'âš  ') + `${firstName} ${lastName}`,\n isActive,\n }));\n var mapPlanning = function(item) {\n if (item.template && !(item.template instanceof Registration)) {\n item.template = new Registration(item.template);\n item.template.setResourceName(resourceNameFilter);\n }\n if (item.invoiceStreamId) {\n item.invoiceStream = vm.relation.invoiceStreams.find(\n x => x.id === item.invoiceStreamId,\n );\n }\n if (item.template) {\n if (item.template.userId === guid1) {\n item.template.userName = $translate.instant('SystemUser');\n } else {\n item.template.userName = vm.users.find(x => x.id === item.template.userId)?.text;\n }\n }\n return item;\n };\n\n vm.loadSchedules = function() {\n if (vm.schedules != null) return null;\n return resource.schedules(\n {},\n function(data) {\n vm.schedules = data;\n },\n showError,\n ).$promise;\n };\n vm.loading = true;\n resource.query(\n {\n id: vm.relation.id,\n },\n function(data) {\n vm.list = data.map(mapPlanning);\n vm.loading = false;\n },\n showError,\n );\n\n vm.editRegTemplate = function(planning) {\n ModalService.showModal({\n template: require('../dialogs/plannedRegistrationDialog.html'),\n controller: 'PlannedRegistrationDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n invoiceStreamId: planning.invoiceStreamId,\n invoiceStreams: vm.relation.invoiceStreams,\n relationId: vm.relation.id,\n plannedReg: angular.copy(planning),\n crmType: vm.relation.crm,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n modal.close.then(function(result) {\n if (!result) return;\n\n angular.extend(planning, mapPlanning(result));\n\n flySvc.success('msgConfirmChange');\n });\n });\n };\n\n vm.save = function(planning, field, data) {\n //Validation error\n if (typeof data === 'undefined') return '';\n if (field === 'startDate' && !data) return '';\n\n if (angular.equals(planning[field], data)) return false;\n var model = angular.copy(planning);\n model[field] = data;\n delete model.template;\n return resource.update(model).$promise.then(function(response) {\n if (!response) return false;\n\n angular.extend(planning, mapPlanning(response));\n\n flySvc.success('msgConfirmChange');\n return false;\n }, showError);\n };\n\n vm.delete = function(planning) {\n if (!planning || !planning.id) return;\n\n dialogsSvc\n .showYesNo('msgConfirmDeleteTitle', 'msgDeletePlannedRegistration')\n .then(function() {\n resource.delete(\n {\n id: planning.id,\n },\n function() {\n var idx = vm.list.indexOf(planning);\n if (idx >= 0) vm.list.splice(idx, 1);\n\n flySvc.success('msgRegistrationRemoved');\n },\n showError,\n );\n });\n };\n\n vm.addPlannedRegistration = function() {\n ModalService.showModal({\n template: require('../dialogs/plannedRegistrationDialog.html'),\n controller: 'PlannedRegistrationDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n invoiceStreamId: vm.relation.invoiceStreamId,\n relationId: vm.relation.id,\n invoiceStreams: vm.relation.invoiceStreams,\n plannedReg: null,\n crmType: vm.relation.crm,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n modal.close.then(function(result) {\n if (result) {\n vm.list.push(mapPlanning(result));\n flySvc.success('msgConfirmChange');\n }\n });\n });\n };\n\n vm.showPlannedSchedules = function(plannedRegistration) {\n ModalService.showModal({\n template: require('../dialogs/plannedRegistrationScheduleDialog.html'),\n controller: 'PlannedregistrationScheduleDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n plannedRegistration: plannedRegistration,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n });\n };\n },\n ],\n };\n});\n","import angular from 'angular';\nimport { $q } from '@uirouter/core';\nimport SignalRService from '@/shared/services/SignalRService';\nimport moment from 'moment';\nimport DocumentService from '@/shared/services/DocumentService';\nimport getFieldIdForCompliancy from '@/modules/compliancy/getFieldIdForCompliancy';\nimport eventBus from 'pubsub-js';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport { RegistrationGroup } from '../../registrations/model/registrationGroup';\nimport { compactRelation } from '@/ajs/common/Filters/relationNameFilter';\nimport dataCacheService from '@/shared/services/DataCacheService';\n\nconst templateTypes = [\n 3, // Assignment letters\n 10, // Authorization letters\n 13, // EID\n 18, // Questionnaire,\n 21, // Contract - Rental\n 22, // Inventory\n 23, // Provision note\n 26, // CompositionStatement\n 27, // TerminationConfirmation\n 99, // Others\n];\n\nangular.module('cxRelations').directive('cxRelationFile', function () {\n return {\n restrict: 'E',\n template: require('./relationFile.html'),\n scope: {\n relId: '@',\n },\n controllerAs: 'vm',\n bindToController: true,\n controller: [\n '$filter',\n 'relBindSvc',\n '$anchorScroll',\n 'userData',\n '$timeout',\n 'flySvc',\n 'dataCache',\n 'ModalService',\n 'checkFeature',\n '$http',\n 'appUrls',\n '$q',\n '$scope',\n 'checkSecurity',\n '$stateParams',\n '$state',\n 'invoiceDialogsSvc',\n 'relBudgetSvc',\n 'dialogsSvc',\n 'regDialogsSvc',\n 'registrationService',\n function (\n $filter,\n relBindSvc,\n $anchorScroll,\n userData,\n $timeout,\n flySvc,\n dataCache,\n ModalService,\n checkFeature,\n $http,\n appUrls,\n $q,\n $scope,\n checkSecurity,\n $stateParams,\n $state,\n invoiceDialogsSvc,\n relBudgetSvc,\n dialogsSvc,\n regDialogsSvc,\n registrationService,\n ) {\n var vm = this;\n vm.error = false;\n vm.relation = relBindSvc.relations[vm.relId];\n vm.sections = relBindSvc.sections;\n vm.isPerson = vm.relation.type !== 0; // ok\n vm.moreActionsRunning = false;\n vm.companyWebEnabled = false;\n vm.companyInfoEnabled = false;\n vm.openTheBoxEnabled = false;\n vm.estoxEnabled = false;\n vm.kboEnabled = false;\n vm.hasDapas = false;\n vm.listeningOnDocumentUpdate = false;\n vm.showCompliancy = function () {\n return checkFeature('Compliancy');\n };\n\n vm.showBudgetInfo = () => relBudgetSvc.showBudgetInfo(vm.relId);\n\n dataCache.ready().then(() => {\n vm.companySettings = dataCache.getCompanySettings(vm.relation.companyId);\n\n const searchProviders = dataCache.getArray('relationSearchProviders');\n if (vm.relation.type !== 2) {\n vm.estoxEnabled = searchProviders.some((x) => x === 2); // external relation provider 2 is estox\n vm.companyWebEnabled = searchProviders.some((x) => x === 3); // external relation provider 3 is company web\n vm.companyInfoEnabled = searchProviders.some((x) => x === 4);\n vm.openTheBoxEnabled = searchProviders.some((x) => x === 5);\n vm.kboEnabled = searchProviders.some((x) => x === 0) && vm.relation.isActive; // external relation provider 0 is kbo\n }\n vm.hasTwikey =\n dataCache.getCompanySettings(vm.relation.companyId).invoicePaymentProvider === 2;\n vm.hasMollie =\n dataCache.getCompanySettings(vm.relation.companyId).invoicePaymentProvider === 3;\n vm.hasGrub = dataCacheService.hasConnectPlatform(vm.relation.companyId, 37);\n vm.hasDapas = dataCacheService.hasConnectPlatform(vm.relation.companyId, 38);\n });\n\n eventBus.subscribe('relationTypeChanged', function () {\n $timeout(function () {\n refreshCompliancy();\n }, 100);\n });\n\n vm.getRelationKPIData = function () {\n if (!checkSecurity('PlannedTask:r') && !checkSecurity('Todo:r')) return;\n $http\n .get(`${appUrls.tasks}/api/plannedtasks/RelationKPI/${vm.relation.id}`)\n .then(function (response) {\n var result = response.data; // Extract response data\n vm.relation.numberOfTasks = result.totalTasks || 0;\n vm.relation.numberOfTodos = result.totalTodos || 0;\n vm.relation.expiredTodos = result.expiredTodos || 0;\n\n vm.relation.allExpired =\n vm.relation.numberOfTodos > 0 &&\n vm.relation.numberOfTodos === vm.relation.expiredTodos;\n vm.relation.anyExpired = vm.relation.expiredTodos > 0;\n })\n .catch(function (error) {\n console.error('Error refreshing data:', error);\n // Handle error scenario if needed\n vm.relation.numberOfTasks = 0;\n vm.relation.numberOfTodos = 0;\n vm.relation.expiredTodos = 0;\n });\n };\n\n vm.getRelationKPIData();\n\n if (vm.relation.eidPhotoDocumentId) {\n DocumentService.getLink(vm.relation.eidPhotoDocumentId)\n .then((result) => {\n vm.relation.eidPhotoUrl = result;\n })\n .catch(() => (vm.relation.eidPhotoUrl = null));\n }\n\n function getLastContactDate() {\n if (!checkSecurity('InteractionsOwn:r')) return;\n $http\n .get(appUrls.interactions + '/api/interactions/lastcontact/' + vm.relation.id)\n .success(function (result) {\n if (result) {\n vm.relation.lastContactDate = moment(result).toDate();\n } else {\n vm.relation.lastContactDate = null;\n }\n })\n .error(function () {\n vm.relation.lastContactDate = null;\n });\n }\n getLastContactDate();\n\n function refreshCompliancy() {\n $http\n .get(appUrls.api + '/api/Compliance/Relation/' + vm.relation.id)\n .success(function (result) {\n if (!result) return;\n vm.relation.compliance = result\n .map((x) => {\n return {\n ...x,\n label: $filter('translateList')(x.type, 'complianceType', x.type),\n };\n })\n .sort(dynamicSort('label'));\n })\n .error(function () {\n vm.relation.compliance = null;\n });\n }\n refreshCompliancy();\n\n function sectionContainsField(section, fieldId) {\n if (section.lists)\n for (var l = 0; l < section.lists.length; l++) {\n if (section.lists[l].id === fieldId) return section.lists[l];\n }\n if (section.columns)\n for (var c = 0; c < section.columns.length; c++) {\n for (var e = 0; e < section.columns[c].length; e++) {\n if (section.columns[c][e].id === fieldId) return section.columns[c][e];\n }\n }\n return null;\n }\n\n vm.findFieldInSections = function (fieldId) {\n if (!vm.relation || !vm.relation.sections) return null;\n\n for (var s = 0; s < vm.relation.sections.length; s++) {\n var mainSection = vm.relation.sections[s];\n var field = sectionContainsField(mainSection, fieldId);\n if (!!field) return { mainSection, field, subSection: null };\n if (mainSection.sections)\n for (var ss = 0; ss < mainSection.sections.length; ss++) {\n var subSection = mainSection.sections[ss];\n var field = sectionContainsField(subSection, fieldId);\n if (!!field) return { mainSection, field, subSection: subSection };\n }\n }\n return null;\n };\n\n vm.gotoField = function (fieldIdArg, retryCount) {\n if (!vm.relation) return;\n if (vm.relation.sectionConfigKey && !vm.relation.sections) {\n if (retryCount > 5) return $q.reject();\n // Still loading sections, wait for 500ms and try again\n return $timeout(function () {\n return vm.gotoField(fieldIdArg, (retryCount || 0) + 1);\n }, 500);\n }\n //Split fieldId and optional custom anchor\n const [fieldId, customAnchor] = (fieldIdArg || '').split(';');\n var fieldInfo = vm.findFieldInSections(fieldId);\n if (!fieldInfo) return $q.reject();\n return vm.openSection(fieldInfo.mainSection).then(function () {\n return $timeout(function () {\n if (customAnchor) {\n //After opening section with field, scroll to custom anchor\n $anchorScroll(customAnchor);\n } else {\n const sectionId = (fieldInfo.subSection || fieldInfo.mainSection).id;\n $anchorScroll(`${sectionId}-${fieldId}`);\n }\n }, 500);\n });\n };\n vm.openSection = function (section) {\n if (!vm.relation || !section) return $q.reject();\n if (typeof section === 'string') {\n if (!vm.relation.sections) return $q.reject();\n section = vm.relation.sections.find((x) => x.id === section);\n }\n if (!section.id) return $q.reject();\n\n if (vm.relation.collapsedSections[section.id])\n vm.relation.collapsedSections[section.id] = false;\n if (!section.loaded) {\n return relBindSvc.loadSection(vm.relId, section.id).then(() => {\n vm.relation.collapsedSections[section.id] = false;\n });\n }\n return $q.when();\n };\n\n vm.goToSectionLinks = function () {\n var linksSectionId = vm.relation.linksSectionId;\n vm.openSection(linksSectionId);\n $timeout(function () {\n $anchorScroll(linksSectionId);\n }, 250);\n };\n\n var addressList = [];\n if (\n vm.relation[vm.relation.addressesFieldId] &&\n vm.relation[vm.relation.addressesFieldId].value\n )\n addressList = vm.relation[vm.relation.addressesFieldId].value;\n var getAddress = function (medium) {\n // the logic for: wich address (phone/email) to display.\n for (var t = 0; t < addressList.length; t++) {\n if (addressList[t].medium === medium && addressList[t].isMain === true)\n return addressList[t].addressData;\n }\n // If there are no addresses (of given type) or mainAddress is not set\n return null;\n };\n\n vm.getPhone = function () {\n if (vm.relation.contactPhone) return vm.relation.contactPhone;\n return getAddress(2);\n };\n\n vm.getEmail = function () {\n if (vm.relation.contactEmail) return vm.relation.contactEmail;\n return getAddress(1);\n };\n\n vm.openInteractionsMailModal = function () {\n $state.go('interactions', {\n relationId: vm.relation.id,\n openMailModal: true,\n });\n };\n\n vm.getMobile = function () {\n if (vm.relation.contactMobile) return vm.relation.contactMobile;\n return getAddress(4);\n };\n vm.toggleDashboard = function () {\n vm.isDashboardCollapsed = !vm.isDashboardCollapsed;\n userData.update('relSections', function (value) {\n if (value == null) value = {};\n value['relDashboard'] = !vm.isDashboardCollapsed;\n return value;\n });\n };\n\n vm.isDashboardCollapsed = !userData.get('relSections', {}).relDashboard;\n\n var filterEmpty = function (fieldId) {\n if (typeof vm.relation[fieldId] === 'undefined') return false;\n var value = vm.relation[fieldId].value;\n if (typeof value === 'undefined' || value === null) return false; //Null values==> false\n\n var fieldType = vm.relation[fieldId].type;\n if (!fieldType) return true;\n\n switch (fieldType) {\n case 1: //Integer\n case 2: //Decimal\n case 41: //Percentage\n return !isNaN(value) && value != 0;\n case 3: //Date\n const date = moment.utc(value).toDate();\n return !isNaN(date) && date > new Date('1901-01-01T00:00:00Z');\n case 5:\n case 6:\n case 7:\n case 8:\n case 18: //Strings\n return ('' + value).trim().length > 0;\n default:\n return true;\n }\n };\n\n vm.calcCompleteness = function () {\n if (!vm.relation.completeness) return 0;\n var filledIn = vm.relation.completeness.filter(filterEmpty).length;\n return (filledIn * 100.0) / vm.relation.completeness.length;\n };\n\n vm.missingFields = function () {\n //TFS 5693\n if (!vm.relation.completeness || !vm.relation.completeness.length) return;\n const fields = vm.relation.completeness.filter(function (item) {\n return !filterEmpty(item);\n });\n const list = fields\n .map(function (fieldId) {\n return $filter('translateList')(fieldId, 'field');\n })\n .join(', ');\n\n if (list !== '') {\n const firstId = fields[0];\n flySvc.action(\n null,\n 'msgFieldsNeededCompleteFile',\n function () {\n vm.gotoField(firstId);\n },\n null,\n null,\n {\n list: list + '.',\n },\n );\n }\n };\n\n vm.refreshOpenSections = () => {\n if (!vm.relation || !vm.relation.collapsedSections) return;\n\n // vm.relation.collapsedSections is an object with key section and value true/false indicating whether or not its collapsed\n const entries = Object.entries(vm.relation.collapsedSections);\n\n const openSections = entries\n .filter(([key, value]) => value === false)\n .map(([key, value]) => key);\n\n if (openSections.length === 0) return;\n relBindSvc.refreshSections(vm.relation.id, openSections);\n };\n\n vm.gotoCompliancyField = function (compliance) {\n const fieldId = getFieldIdForCompliancy(\n compliance.type,\n compliance.status,\n vm.relation.type,\n );\n if (fieldId) vm.gotoField(fieldId);\n };\n\n if ($stateParams.gotoField) {\n vm.gotoField($stateParams.gotoField);\n }\n\n vm.openTwikeyContractTemplateModal = () => {\n ModalService.showModal({\n template: require('../dialogs/inviteRelationDirectDebitDialog.html'),\n controller: 'InviteRelationDirectDebitDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n relationId: vm.relation.id,\n companyId: vm.relation.companyId,\n },\n }).then(function (modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function (e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n });\n };\n\n vm.openMollieDirectDebitDialog = () => {\n ModalService.showModal({\n template: require('../dialogs/mollieDirectDebitDialog.html'),\n controller: 'MollieDirectDebitDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n relationId: vm.relation.id,\n },\n }).then(function (modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function (e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n });\n };\n\n vm.CreateExternalRelationInPartnerApplication = function (platform) {\n if (vm.moreActionsRunning) return;\n vm.moreActionsRunning = true;\n $http\n .post(\n `${appUrls.api}/api/relation/CreateExternalRelationInPartnerApplication?relationId=${vm.relation.id}&platform=${platform}`,\n )\n .then(\n function (result) {\n vm.moreActionsRunning = false;\n flySvc.success();\n vm.refreshOpenSections();\n },\n function (error) {\n vm.moreActionsRunning = false;\n flySvc.error(error);\n },\n );\n };\n\n vm.deleteRelation = () => {\n dialogsSvc\n .showYesNo('msgConfirmDeleteTitle', 'msgConfirmDeleteRelation')\n .then(function () {\n $http.delete(`${appUrls.api}/api/relation/delete/${vm.relation.id}`).then(\n ({ data: setToInactive }) => {\n if (setToInactive) {\n flySvc.info('msgRelationSetToInactive');\n } else {\n flySvc.success();\n }\n $state.go('relations.overview');\n },\n function (error) {\n flySvc.error(error);\n },\n );\n });\n };\n\n vm.toggleComplianceInapplicable = (compliance) => {\n $http\n .put(\n appUrls.api +\n '/api/compliance/ToggleInapplicable?relationId=' +\n vm.relation.id +\n '&complianceType=' +\n compliance.type,\n )\n .success(function (result) {\n flySvc.success('msgConfirmChange');\n refreshCompliancy();\n })\n .error(function (error) {\n flySvc.error(error);\n });\n };\n\n vm.createDocument = function () {\n ModalService.showModal({\n template: require('../dialogs/generateRelationDocumentDialog.html'),\n controller: 'GenerateRelationDocumentDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n relationId: vm.relation.id,\n companyId: vm.relation.companyId,\n language: vm.relation.languageCode,\n relationType: vm.relation.type, // relation type\n templateTypes,\n },\n }).then(function (modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function (e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n\n modal.close.then(function (result) {\n if (result && result.document) {\n if (result.openEmailDialog) {\n vm.openEmailDocumentDialog(result.document, true);\n } else {\n vm.refreshOpenSections();\n flySvc.success();\n }\n }\n });\n });\n };\n\n vm.openEmailDocumentDialog = function (document, asPdf) {\n ModalService.showModal({\n template: require('../dialogs/mailDocumentDialog.html'),\n controller: 'MailDocumentDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n document: document,\n asPdf: asPdf,\n relationId: vm.relation.id,\n companyId: vm.relation.companyId,\n },\n }).then(function (modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function (e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n modal.close.then(function (result) {\n if (result) {\n angular.extend(document, result);\n }\n });\n });\n };\n\n vm.uploadingFiles = [];\n vm.fileUploaded = function (file) {\n if (!file) return;\n var data = new FormData();\n data.append('relationId', vm.relation.id);\n data.append('documentType', -1);\n data.append('data', file.data);\n var fileInfo = {\n status: 1,\n name: file.name,\n error: null,\n };\n vm.uploadingFiles.push(fileInfo);\n\n $http({\n method: 'POST',\n url: appUrls.documents + '/api/documents/',\n headers: {\n 'Content-Type': undefined,\n },\n data,\n })\n .success(function (result) {\n flySvc.success('UploadSuccessful');\n fileInfo.status = 2;\n if (vm.relation && typeof vm.relation.numberOfDocuments === 'number')\n vm.relation.numberOfDocuments += 1;\n\n $timeout(function () {\n var idx = vm.uploadingFiles.indexOf(fileInfo);\n if (idx >= 0) vm.uploadingFiles.splice(idx, 1);\n }, 2000);\n })\n .error(function (error) {\n fileInfo.status = -1;\n fileInfo.error = flySvc.getErrorMsg(error.code, error.parameters, null, error.type);\n flySvc.error(error);\n });\n };\n vm.uploadFiles = function (files) {\n //upload multiple files\n if (!files || !files.length) return;\n files.forEach((file) => {\n vm.fileUploaded(file);\n });\n };\n\n const complianceUpdateHandler = (relationId) => {\n if (relationId !== vm.relation.id) return;\n $timeout(function () {\n refreshCompliancy();\n }, 0);\n };\n\n const relationDocumentProcessedHandler = (relationId) => {\n if (relationId !== vm.relation.id) return;\n $timeout(() => vm.refreshOpenSections(), 0);\n };\n\n if (vm.showCompliancy())\n SignalRService.subscribe('compliancyUpdated', complianceUpdateHandler);\n\n SignalRService.subscribe('relationDocumentProcessed', relationDocumentProcessedHandler);\n $scope.$on('$destroy', function () {\n if (vm.showCompliancy()) {\n SignalRService.unsubscribe('compliancyUpdated', complianceUpdateHandler);\n }\n SignalRService.unsubscribe('relationDocumentProcessed', relationDocumentProcessedHandler);\n });\n\n vm.expandAllSections = function () {\n if (!vm.relation || !vm.relation.sections) return;\n var collapsedSections = vm.relation.sections.filter(\n (section) => !!vm.relation.collapsedSections[section.id],\n );\n if (collapsedSections.length === 0) return;\n relBindSvc.loadSections(\n vm.relId,\n collapsedSections.map((x) => x.id),\n );\n vm.relation.sections.forEach((x) => (vm.relation.collapsedSections[x.id] = false));\n };\n vm.collapseAllSections = function () {\n if (!vm.relation || !vm.relation.sections) return;\n Object.keys(vm.relation.collapsedSections).forEach(\n (x) => (vm.relation.collapsedSections[x] = true),\n );\n };\n\n vm.updateFromExternalProvider = function (actionName) {\n if (vm.moreActionsRunning) return;\n vm.moreActionsRunning = true;\n $http.post(`${appUrls.api}/api/relation/${actionName}?id=${vm.relation.id}`).then(\n function (result) {\n vm.moreActionsRunning = false;\n flySvc.success();\n vm.refreshOpenSections();\n },\n function (error) {\n vm.moreActionsRunning = false;\n flySvc.error(error);\n },\n );\n };\n vm.updateFromEstox = () => vm.updateFromExternalProvider('RetrieveFromEstox');\n vm.updateFromCompanyWeb = () => vm.updateFromExternalProvider('RetrieveFromCompanyWeb');\n vm.updateFromCompanyInfo = () => vm.updateFromExternalProvider('RetrieveFromCompanyInfo');\n vm.updateFromOpenTheBox = () => vm.updateFromExternalProvider('RetrieveFromOpenTheBox');\n vm.updateFromKBO = () => vm.updateFromExternalProvider('RetrieveFromKbo');\n\n vm.updateFromConnectPlatform = function (platform) {\n if (vm.moreActionsRunning) return;\n vm.moreActionsRunning = true;\n $http\n .post(`${appUrls.api}/api/relation/RetrieveFromPlatform/${vm.relation.id}/${platform}`)\n .then(\n function (result) {\n vm.moreActionsRunning = false;\n flySvc.success();\n vm.refreshOpenSections();\n },\n function (error) {\n vm.moreActionsRunning = false;\n flySvc.error(error);\n },\n );\n };\n\n vm.showInvoiceHistory = function () {\n return invoiceDialogsSvc.showInvoicingHistory(\n vm.relation.invoiceStreamId,\n null,\n vm.relation.id,\n );\n };\n\n vm.disableCreateRegistration = false;\n vm.createRegistration = function () {\n if (vm.disableCreateRegistration) return;\n vm.disableCreateRegistration = true;\n var reg = new RegistrationGroup();\n reg.date = moment.utc().startOf('day').toDate();\n\n const relation = {\n ...compactRelation(vm.relation),\n invoiceStreamId: vm.relation.invoiceStreamId,\n invoiceStreams: vm.relation.invoiceStreams,\n };\n reg.relation = relation;\n reg.invoiceStreamId = vm.relation.invoiceStreamId;\n reg.setRelation();\n const userId = dataCache.getArray('employee').userID;\n\n registrationService\n .getNextRegistrationTime(moment.utc().startOf('day').toDate())\n .then(function (data) {\n if (data) reg.work.initTime(data.Hour, data.Minute, 0);\n\n reg.setUser(userId);\n\n var vat = dataCache.getDefaultCompany().resourceVATRate || 0.21;\n reg.work.setVatRate(vat, 0);\n reg.cost.setVatRate(vat, 0);\n reg.travel.setVatRate(vat, 0);\n return regDialogsSvc.editRegistrationGroup(reg).then(function (result) {\n if (result) {\n flySvc.success('Registration created');\n }\n });\n })\n .finally(() => {\n vm.disableCreateRegistration = false;\n });\n };\n relBudgetSvc.getBudgetInfo(vm.relation.id, true).then((x) => {\n vm.relationBudget = x;\n });\n vm.reloadBudget = function () {\n relBudgetSvc.reload(vm.relation.id);\n };\n\n vm.createTodo = function () {\n vm.showCreateTodoModal = true;\n };\n vm.onCreateTodoModalClosed = () => {\n $timeout(function () {\n vm.showCreateTodoModal = false;\n }, 0);\n };\n vm.onCreateTodoModalSaved = (todo) => {\n $timeout(function () {\n vm.showCreateTodoModal = false;\n vm.getRelationKPIData();\n vm.refreshOpenSections();\n }, 0);\n };\n },\n ],\n };\n});\n","import angular from 'angular';\nimport moment from 'moment';\n\nangular.module('cxRelations').directive('cxRelAuthorization', function() {\n return {\n restrict: 'E',\n template: require('./relAuthorization.html'),\n scope: {\n list: '=data',\n field: '=field',\n relation: '=',\n },\n controller: [\n '$scope',\n 'resourceFactorySvc',\n 'flySvc',\n '$http',\n 'appUrls',\n 'Blob',\n 'FileSaver',\n 'dialogsSvc',\n function($scope, resourceFactorySvc, flySvc, $http, appUrls, Blob, FileSaver, dialogsSvc) {\n var resource = resourceFactorySvc.get('authorization');\n if (!$scope.list) $scope.list = [];\n $scope.newAuth = null;\n $scope.showErrors = false;\n $scope.today = moment\n .utc()\n .startOf('day')\n .toDate();\n $scope.datepickerOptions = {\n startingDay: 1,\n };\n var linksFieldId = $scope.relation.linksFieldId;\n $scope.contacts = [];\n $scope.$watchCollection('relation[\"' + linksFieldId + '\"].value', function(links) {\n if (!links) {\n $scope.contacts = [];\n } else {\n $scope.contacts = links.reduce(function(result, item) {\n if (item.isPrincipal && item.target)\n if (item.target.firstName != null)\n result.push(item.target.name + ' ' + item.target.firstName);\n else result.push(item.target.name);\n return result;\n }, []);\n }\n });\n\n $scope.save = function(auth, field, data) {\n //Validation error\n if (typeof data === 'undefined') return '';\n\n if (angular.equals(auth[field], data)) return false;\n var model = angular.copy(auth);\n model[field] = data;\n\n return resource.update(model).$promise.then(\n function(result) {\n angular.extend(auth, result);\n flySvc.success('msgConfirmChange');\n return false;\n },\n function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n return '';\n },\n );\n };\n\n $scope.submitNew = function() {\n if (!$scope.newAuth) return false;\n\n var model = angular.copy($scope.newAuth);\n $scope.saving = true;\n return resource\n .save(\n {\n id: $scope.relation.id,\n },\n model,\n )\n .$promise.then(\n function(response) {\n flySvc.success('msgNewItemSaved');\n $scope.list.push(response);\n $scope.newAuth = null;\n $scope.saving = false;\n\n return false;\n },\n function(error) {\n $scope.saving = false;\n\n flySvc.error(error.data.code, error.data.parameters);\n return '';\n },\n );\n };\n\n $scope.addNewAuth = function() {\n if ($scope.newAuth) $scope.cancelEdit();\n else {\n if ($scope.newAuthForm) {\n $scope.newAuthForm.$setPristine();\n $scope.newAuthForm.$setUntouched();\n }\n $scope.showErrors = false;\n $scope.newAuth = {\n name: null,\n type: 0,\n signedBy: null,\n date: moment\n .utc()\n .startOf('day')\n .toDate(),\n validUntil: null,\n };\n }\n };\n\n $scope.remove = function(auth) {\n if (!auth || !auth.id) return;\n auth.removing = true;\n resource.delete(\n {\n id: auth.id,\n },\n function() {\n var idx = $scope.list.indexOf(auth);\n if (idx >= 0) $scope.list.splice(idx, 1);\n },\n function(error) {\n auth.removing = false;\n flySvc.error(error.data.code, error.data.parameters);\n },\n );\n };\n\n $scope.cancelEdit = function() {\n $scope.newAuth = null;\n };\n },\n ],\n };\n});\n","import angular from 'angular';\nimport moment from 'moment';\n\nangular.module('cxRelations').directive('cxRelEidWizard', [\n function() {\n return {\n restrict: 'E',\n template: require('./relEidWizard.html'),\n controllerAs: 'vm',\n scope: {\n success: '&',\n options: '=',\n saving: '=?disabled',\n },\n bindToController: true,\n controller: [\n '$http',\n 'appUrls',\n 'flySvc',\n 'enumCacheSvc',\n 'dataCache',\n 'relBindSvc',\n function($http, appUrls, flySvc, enumCacheSvc, dataCache, relBindSvc) {\n const vm = this;\n vm.saving = false;\n vm.similar = [];\n vm.relTypes = [];\n vm.crmTypes = [];\n vm.languages = dataCache.getArray('language');\n vm.showValidation = false;\n vm.teams = [];\n\n vm.companies = dataCache.getArray('company');\n\n enumCacheSvc.get('relationType').then(function(data) {\n vm.relTypes = data.filter(x => x.key !== 0);\n });\n enumCacheSvc.get('crmType').then(function(data) {\n vm.crmTypes = data;\n });\n vm.setCardInfo = function(eid) {\n vm.cardInformation = eid;\n vm.similar = [];\n if (!!eid) {\n if (vm.cardInformation.nationality === 'Belge') {\n vm.cardInformation.language = 'fr';\n } else if (vm.cardInformation.nationality === 'Belg') {\n vm.cardInformation.language = 'nl';\n }\n if (!vm.cardInformation.companyId) {\n vm.cardInformation.companyId = vm.options.company.id;\n }\n $http\n .post(`${appUrls.api}/api/relation/SimilarEid`, vm.cardInformation)\n .then(function(response) {\n if (response && response.data) {\n vm.similar = response.data.similar || [];\n\n if (response.data.kbo && response.data.kbo.length) {\n vm.cardInformation.enterpriseNumber = response.data.kbo[0].number;\n if (!vm.options.relTypeDisabled) vm.cardInformation.relationType = 1;\n } else if (!vm.options.relTypeDisabled) {\n vm.cardInformation.relationType = 2;\n }\n }\n });\n }\n };\n vm.validate = function() {\n if (!vm.cardInformation) return false;\n if (!vm.cardInformation.lastName) return false;\n if (!vm.cardInformation.relationType && vm.cardInformation.relationType !== 0)\n return false;\n if (!vm.cardInformation.crmType && vm.cardInformation.crmType !== 0) return false;\n if (!vm.cardInformation.language) return false;\n return true;\n };\n vm.create = function() {\n if (vm.saving || !vm.validate()) return;\n vm.saving = true;\n vm.cardInformation.teams = vm.teams;\n\n $http.post(appUrls.api + '/api/relation/CreateRelationEid', vm.cardInformation).then(\n function(result) {\n vm.saving = false;\n vm.success({\n relation: result.data,\n isNew: true,\n });\n },\n function(error) {\n vm.saving = false;\n flySvc.error(error.data.code, error.data.parameters);\n },\n );\n };\n vm.open = function(rel) {\n if (vm.saving || !vm.cardInformation) return;\n vm.success({\n relation: rel,\n isNew: false,\n });\n };\n vm.update = function(rel) {\n if (vm.saving || !vm.cardInformation) return;\n vm.saving = true;\n var model = angular.copy(vm.cardInformation);\n\n model.relationId = rel.id;\n model.dateOfBirth = moment.utc(model.dateOfBirth);\n model.cardExpiryDate = moment.utc(model.cardExpiryDate);\n\n $http.put(appUrls.api + '/api/relation/UpdateRelationEid', model).then(\n function(result) {\n vm.saving = false;\n relBindSvc.updateRelation(rel.id, result.data.changes, null);\n flySvc.success('msgRelationUpdated');\n vm.success({\n relation: rel,\n isNew: false,\n });\n },\n function(error) {\n vm.saving = false;\n flySvc.error(error.data.code, error.data.parameters);\n },\n );\n };\n },\n ],\n };\n },\n]);\n","import angular from 'angular';\nimport moment from 'moment';\nimport DocumentService from '@/shared/services/DocumentService';\nimport { isWord, isPdf, isExcel } from '@/shared/utils/mime';\nimport SignalRService from '@/shared/services/SignalRService';\nimport dataCacheService from '@/shared/services/DataCacheService';\nimport AuthService from '@/shared/services/AuthService';\n\n//What document template types should be shown in the relation letters?\nconst templateTypes = [\n 3, // Assignment letters\n 10, // Authorization letters\n 13, // EID\n 18, // Questionnaire\n 21, // ContractRentalAgreement\n 22, // Inventory\n 23, // ProvisionNote\n 26, // CompositionStatement\n 27, // TerminationConfirmation\n 99, // Others\n];\n\nconst documentTypes = [\n 11, //Assignment letters\n 12, //Authorization letters\n 29, //Generated document\n 78, //QuestionnairePersonalIncomeTax\n 93, //Inventory\n 94, //ProvisionNote\n 144, //TerminationConfirmation\n 150, //CompositionStatement\n 5000, //ContractRentalAgreement\n];\n\nconst ensureDate = value => {\n if (!value) return null;\n if (typeof value === 'string') return new moment(value.substr(0, 10)).toDate();\n if (moment.isMoment(value)) return value.toDate();\n if (value instanceof Date) return value;\n return value;\n};\n\nconst mapDocument = ({\n createDate,\n documentDate,\n documentStartDate,\n documentEndDate,\n mime,\n ...other\n}) => ({\n ...other,\n mime,\n createDate: ensureDate(createDate),\n documentDate: ensureDate(documentDate),\n documentStartDate: ensureDate(documentStartDate),\n documentEndDate: ensureDate(documentEndDate),\n isPdf: isPdf(mime),\n isWord: isWord(mime),\n isExcel: isExcel(mime),\n});\n\nconst consolidateDocuments = documents => {\n return documents\n .filter(x => {\n if (!x.scannedDocumentId) return true;\n if (x.id === x.scannedDocumentId) return true;\n return !documents.some(y => y.id === x.scannedDocumentId);\n })\n .map(mapDocument);\n};\n\nangular.module('cxRelations').directive('cxRelGeneratedDocuments', function() {\n return {\n restrict: 'E',\n template: require('./relGeneratedDocuments.html'),\n scope: {\n relation: '=',\n },\n bindToController: true,\n controllerAs: 'vm',\n controller: [\n '$scope',\n '$http',\n 'appUrls',\n 'flySvc',\n 'FileSaver',\n 'dialogsSvc',\n 'ModalService',\n '$timeout',\n 'dataCache',\n '$translate',\n function(\n $scope,\n $http,\n appUrls,\n flySvc,\n FileSaver,\n dialogsSvc,\n ModalService,\n $timeout,\n dataCache,\n $translate,\n ) {\n var vm = this;\n vm.documents = [];\n vm.loading = false;\n\n const settings = dataCache.getCompanySettings(vm.relation.companyId);\n vm.hasSigningProvider = settings && settings.documentSigningProvider !== 0;\n\n vm.datepickerOptions = {\n startingDay: 1,\n };\n\n const documentUpdatedHandler = (document, originalDocumentId) => {\n if (!document) return;\n $timeout(function() {\n // if the original document was replaced by the signed document, we have to replace this document in the array.\n const documentId = originalDocumentId || document.id;\n\n var doc = vm.documents.find(x => x.id == documentId);\n\n if (doc != null) {\n angular.extend(doc, mapDocument(document));\n }\n }, 0);\n };\n const documentDeletedHandler = documentId => {\n if (!documentId) return;\n $timeout(function() {\n var idx = vm.documents.findIndex(x => x.id == documentId);\n if (idx >= 0) vm.documents.splice(idx, 1);\n }, 0);\n };\n\n var init = () => {\n SignalRService.subscribe('documentSigningStatusUpdated', documentUpdatedHandler);\n SignalRService.subscribe('documentUpdated', documentUpdatedHandler);\n SignalRService.subscribe('documentDeleted', documentDeletedHandler);\n $scope.$on('$destroy', function() {\n SignalRService.unsubscribe('documentSigningStatusUpdated', documentUpdatedHandler);\n SignalRService.unsubscribe('documentUpdated', documentUpdatedHandler);\n SignalRService.unsubscribe('documentDeleted', documentDeletedHandler);\n });\n };\n init();\n\n var loadDocuments = function() {\n vm.loading = true;\n\n $http\n .get(`${appUrls.documents}/api/Documents/Links/${vm.relation.id}/3`, {\n params: { documentTypes },\n })\n .then(function(result) {\n vm.documents = consolidateDocuments(result.data);\n vm.loading = false;\n });\n };\n\n vm.onPreviewClosed = () => {\n $timeout(function() {\n vm.showPreview = false;\n vm.activeDocumentId = null;\n }, 0);\n };\n\n vm.onPreviewSaved = document => {\n $timeout(function() {\n vm.showPreview = false;\n vm.activeDocument = null;\n vm.documents = vm.documents.map(x => {\n if (x.id === document.id) {\n return {\n ...x,\n ...document,\n };\n }\n return x;\n });\n }, 0);\n };\n\n vm.previewDocument = document => {\n vm.activeDocument = document;\n vm.showPreview = true;\n };\n\n vm.downloadDocument = function(document, asPdf) {\n const { id: documentId, name, mime } = document;\n if (!documentId) return;\n\n if (!asPdf || isPdf(mime)) {\n //Normal download\n document.showSpinner = true;\n DocumentService.download(documentId).finally(() => {\n $timeout(function() {\n document.showSpinner = false;\n }, 0);\n });\n } else {\n document.showSpinner = true;\n //Convert to pdf\n DocumentService.convertToPdf(documentId, name).finally(() => {\n $timeout(function() {\n document.showSpinner = false;\n }, 0);\n });\n }\n };\n\n vm.editDocument = function(document) {\n const language = $translate.use().split('-')[0];\n DocumentService.edit(document.id, language);\n };\n\n vm.deleteDocument = function(document) {\n dialogsSvc.showYesNo('comfirmDeleteTitle', 'msgConfirmDeleteDocument').then(function() {\n document.showSpinner = true;\n $http.delete(`${appUrls.documents}/api/Documents/${document.id}`).then(\n function() {\n flySvc.success();\n var index = vm.documents.indexOf(document);\n if (index >= 0) vm.documents.splice(index, 1);\n },\n function(error) {\n flySvc.error(error);\n document.showSpinner = false;\n return '';\n },\n );\n });\n };\n vm.deleteSelectedDocuments = function() {\n const selectedDocuments = vm.documents.filter(x => x.selected);\n if (!selectedDocuments || selectedDocuments.length === 0) return;\n\n dialogsSvc.showYesNo('comfirmDeleteTitle', 'msgConfirmDeleteDocuments').then(function() {\n selectedDocuments.map(document => {\n document.showSpinner = true;\n $http.delete(`${appUrls.documents}/api/Documents/${document.id}`).then(\n function() {\n var index = vm.documents.indexOf(document);\n if (index >= 0) vm.documents.splice(index, 1);\n },\n function(error) {\n flySvc.error(error);\n document.showSpinner = false;\n return '';\n },\n );\n });\n });\n };\n vm.createDocument = function() {\n ModalService.showModal({\n template: require('../dialogs/generateRelationDocumentDialog.html'),\n controller: 'GenerateRelationDocumentDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n relationId: vm.relation.id,\n companyId: vm.relation.companyId,\n language: vm.relation.languageCode,\n relationType: vm.relation.type, // relation type\n templateTypes,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n\n modal.close.then(function(result) {\n if (result && result.document) {\n if (result.openEmailDialog) {\n vm.openEmailDocumentDialog(result.document, true);\n } else {\n flySvc.success();\n vm.documents.unshift(mapDocument(result.document));\n }\n }\n });\n });\n };\n\n loadDocuments();\n\n vm.replaceDocument = function(files, document) {\n if (!files || files.length < 1) return;\n\n var data = new FormData();\n data.append('data', files[0].data);\n document.showSpinner = true;\n $http({\n method: 'post',\n url: appUrls.documents + '/api/Documents/Replace',\n params: { documentId: document.id },\n headers: {\n 'Content-Type': undefined,\n },\n data: data,\n })\n .success(function(result) {\n if (!result) return;\n angular.extend(document, mapDocument(result));\n flySvc.success();\n })\n .error(function(error) {\n flySvc.error(error);\n })\n .finally(function() {\n document.showSpinner = false;\n });\n };\n\n vm.uploadDocument = function() {\n ModalService.showModal({\n template: require('../dialogs/uploadRelationDocumentDialog.html'),\n controller: 'UploadRelationDocumentDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n relationId: vm.relation.id,\n documentTypes,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n\n modal.close.then(function(result) {\n if (result) {\n flySvc.success();\n if (result.length === 1) {\n // If only one document returns, it couldn't be matched to another document\n // Just add it to the list\n vm.documents.push(mapDocument(result[0]));\n return;\n } else if (result.length === 2) {\n let original = null;\n let scanned = null;\n\n if (result[0].scannedDocumentId === result[1].id) {\n [original, scanned] = result;\n } else if (result[1].scannedDocumentId === result[0].id) {\n [scanned, original] = result;\n }\n if (original != null && scanned != null) {\n //The first document is the original\n if (original != null) {\n const idx = vm.documents.findIndex(x => x.id === original.id);\n if (idx >= 0) {\n vm.documents.splice(idx, 1); //Remove original from list\n }\n }\n //Add scanned document\n vm.documents.push(mapDocument(scanned));\n return;\n }\n }\n\n //Fallback merge docuemnts\n result.foreach(doc => {\n var document = vm.documents.find(l => l.id == doc.id);\n if (document != null) {\n angular.extend(document, mapDocument(doc));\n } else {\n vm.documents.push(mapDocument(doc));\n }\n });\n }\n });\n });\n };\n\n vm.markSigned = function(document) {\n if (document.signingStatus >= 10) return; //Already signed or pending\n document.showSpinner = true;\n const model = {\n documentId: document.id,\n signingStatus: 20, // SigningComplete\n signingProvider: 0, // None\n };\n return $http.put(appUrls.documents + '/api/Documents/Sign', model).then(\n function(result) {\n if (result && result.data) {\n angular.extend(document, mapDocument(result.data));\n flySvc.success();\n }\n document.showSpinner = false;\n return false;\n },\n function(error) {\n flySvc.error(error);\n document.showSpinner = false;\n return '';\n },\n );\n };\n\n vm.update = function(document, field, value) {\n if (field === 'documentDate' && !value) return ''; //Document date is required\n if (\n (field === 'documentStartDate' || field === 'documentEndDate') &&\n typeof value === 'undefined'\n )\n return '';\n\n var model = angular.copy(document);\n\n if (angular.equals(model[field], value)) return true;\n\n model[field] = value;\n\n if (model.documentDate instanceof Date) model.documentDate = model.documentDate.ISO();\n if (model.documentStartDate instanceof Date)\n model.documentStartDate = model.documentStartDate.ISO();\n if (model.documentEndDate instanceof Date)\n model.documentEndDate = model.documentEndDate.ISO();\n\n return $http.put(appUrls.documents + '/api/Documents/Update', model).then(\n function(result) {\n if (result && result.data) {\n angular.extend(document, mapDocument(result.data));\n flySvc.success();\n }\n return false;\n },\n function(error) {\n flySvc.error(error);\n return '';\n },\n );\n };\n\n vm.openEmailDocumentDialog = function(document, asPdf) {\n ModalService.showModal({\n template: require('../dialogs/mailDocumentDialog.html'),\n controller: 'MailDocumentDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n document: document,\n asPdf: asPdf,\n relationId: vm.relation.id,\n companyId: vm.relation.companyId,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n modal.close.then(function(result) {\n if (result) {\n angular.extend(document, result);\n }\n });\n });\n };\n\n vm.openInApp = function(document) {\n DocumentService.openInApp(document.id);\n };\n\n vm.revokeSignatureRequest = function(document) {\n if (!vm.hasSigningProvider) {\n flySvc.error('MsgNoSigningProviderConfiguredSeeSettings');\n return;\n }\n\n dialogsSvc.showYesNo('comfirmTitle', 'msgConfirmRevokeSignature').then(function() {\n document.showSpinner = true;\n\n let url =\n appUrls.documentSigning +\n `/api/RevokeDocumentSigningRequest/${vm.relation.companyId}/${document.signingId}/`;\n if (document.signingPackageId) {\n url += `${document.signingPackageId}`;\n }\n $http.post(url).then(\n function(result) {\n if (result && result.data) {\n document.showSpinner = false;\n flySvc.success('msgDocumentSingingRequestRevoked');\n }\n },\n function(error) {\n document.showSpinner = false;\n flySvc.error(error);\n },\n );\n });\n };\n\n vm.openSignatureDialog = function(documents) {\n // use direct reference on datacache to prevent not being able to sign a document when provider was just configured\n var hasSigningProvider =\n dataCache.getCompanySettings(vm.relation.companyId).documentSigningProvider !== 0;\n\n if (!hasSigningProvider) {\n flySvc.error('MsgNoSigningProviderConfiguredSeeSettings');\n return;\n }\n\n ModalService.showModal({\n template: require('../dialogs/requestDocumentSignatureDialog.html'),\n controller: 'RequestDocumentSignatureDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n documents: documents,\n companyId: vm.relation.companyId,\n relationId: vm.relation.id,\n languageCode: vm.relation.languageCode,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n modal.close.then(function(result) {\n if (!result) return;\n\n // signing request sent successfully, update document status.\n documents.map(x => {\n angular.extend(x, {\n ...x,\n signingStatus: 10,\n });\n });\n });\n });\n };\n\n vm.selectedCount = function() {\n if (!vm.documents) return 0;\n const count = vm.documents.reduce(\n (cnt, document) => cnt + (document.selected ? 1 : 0),\n 0,\n );\n\n return count;\n };\n\n vm.openSignatureDialogForSelectedDocuments = function() {\n const selectedDocuments = vm.documents.filter(x => x.selected);\n if (!selectedDocuments || selectedDocuments.length === 0) return;\n\n if (\n selectedDocuments.some(\n x => x.signingStatus == 10 || x.signingStatus == 20 || x.signingStatus == 21,\n )\n ) {\n flySvc.error('selectionContainsDocumentPendingOrAlreadySigned');\n return;\n }\n return vm.openSignatureDialog(selectedDocuments);\n };\n\n vm.canCheckout = function(document) {\n return dataCacheService.hasUserConnectPlatform(46) && document.storageType !== 1;\n };\n\n vm.canCheckin = function(document) {\n return (\n dataCacheService.hasUserConnectPlatform(46) &&\n document.checkedOutByUserId == AuthService.getUserId() &&\n document.storageType !== 1\n );\n };\n\n vm.canDiscardCheckout = function(document) {\n return (\n dataCacheService.hasUserConnectPlatform(46) &&\n AuthService.hasPermission({ functionality: 'CompanyOwn', privilege: 'Update' }) &&\n document.checkedOutByUserId == AuthService.getUserId() &&\n document.storageType !== 1\n );\n };\n\n vm.checkinDocument = function(document) {\n if (document.checkedOutByUserId == AuthService.getUserId()) {\n checkin(document);\n }\n };\n\n vm.onDiscardCheckout = function(document) {\n dialogsSvc\n .showYesNo('comfirmTitle', 'msgDiscardCheckout', {\n name: dataCacheService.getUserName(document.checkedOutByUserId),\n })\n .then(function() {\n checkin(document);\n });\n };\n\n vm.openEditing = function(document) {\n DocumentService.getCheckedOutLink(document.id).then(link => {\n if (!link) return;\n window.open(link);\n });\n };\n\n vm.discardCheckout = function(document) {\n document.showSpinner = true;\n DocumentService.discardCheckout(document.id).then(\n () => {\n document.checkedOutByUserId = null;\n flySvc.success();\n document.showSpinner = false;\n },\n error => {\n console.error(error);\n if (error.response && error.response.data && error.response.data.code) {\n flySvc.error(error);\n document.showSpinner = false;\n } else {\n flySvc.success();\n }\n log.error('error discarding checkout ', error);\n },\n );\n };\n\n const checkin = function(document) {\n document.showSpinner = true;\n DocumentService.checkin(document.id).then(\n () => {\n document.checkedOutByUserId = null;\n flySvc.success();\n document.showSpinner = false;\n },\n error => {\n console.error(error);\n if (error.response && error.response.data && error.response.data.code) {\n flySvc.error(error);\n document.showSpinner = false;\n } else {\n flySvc.success();\n }\n log.error('error checking in document ', error);\n },\n );\n };\n\n vm.checkoutDocument = function(document, openinApp) {\n if (!document || !document.canEdit) return;\n document.showSpinner = true;\n DocumentService.checkout(document.id, openinApp).then(\n data => {\n if (!!data) {\n document.checkedOutByUserId = AuthService.getUserId();\n flySvc.success();\n }\n document.showSpinner = false;\n },\n error => {\n console.error(error);\n if (error.response && error.response.data && error.response.data.code) {\n flySvc.error(error);\n document.showSpinner = false;\n } else {\n flySvc.success();\n }\n log.error('error checking out document ', error);\n },\n );\n };\n },\n ],\n };\n});\n","import angular from 'angular';\n\nconst optionalKpis = [\n 'nextUserIsMe',\n 'blocked',\n 'pastDeadline',\n 'deadlineOneWeek',\n 'deadlineTwoWeeks',\n 'deadlineThreeWeeks',\n];\nconst getWidgetClass = (kpi) => {\n switch (kpi) {\n case 'total':\n return 'info-block-dark';\n\n default:\n return 'info-block db-bg-ok';\n }\n};\nconst getWidgetValueClass = (kpi) => {\n switch (kpi) {\n case 'blocked':\n return 'kpi-purple';\n case 'pastDeadline':\n return 'kpi-red';\n case 'deadlineOneWeek':\n return 'kpi-orange';\n case 'nextUserIsMe':\n case 'deadlineTwoWeeks':\n case 'deadlineThreeWeeks':\n return 'kpi-blue';\n default:\n return '';\n }\n};\n\nangular.module('cloudX').directive('cxRelTaskDashboard', [\n function () {\n return {\n restrict: 'E',\n template: require('./relTaskDashboard.html'),\n scope: { relation: '=' },\n controllerAs: 'vm',\n controller: [\n '$scope',\n '$state',\n '$http',\n 'appUrls',\n '$filter',\n 'checkSecurity',\n 'invoiceDialogsSvc',\n function ($scope, $state, $http, appUrls, $filter, checkSecurity, invoiceDialogsSvc) {\n const vm = this;\n if (!checkSecurity(['Todo:r', 'PlannedTask:r'])) return;\n vm.loading = false;\n vm.widgetList = [];\n vm.relation = $filter('compactRelation')($scope.relation);\n vm.relationId = $scope.relation.id;\n const getTaskKpis = () => {\n vm.loading = true;\n $http\n .get(`${appUrls.tasks}/api/plannedTasks/kpi`, {\n params: {\n relationId: $scope.relation.id,\n },\n })\n .then(({ data }) => {\n vm.widgetList = [\n {\n kpi: 'total',\n value: data.total ?? 0,\n class: getWidgetClass('total'),\n valueClass: getWidgetValueClass('total'),\n },\n ];\n for (let i = 0; i < optionalKpis.length && vm.widgetList.length <= 5; i++) {\n const kpi = optionalKpis[i];\n const value = data[kpi] ?? 0;\n if (value <= 0) continue;\n\n vm.widgetList.push({\n kpi,\n value,\n class: getWidgetClass(kpi),\n valueClass: getWidgetValueClass(kpi),\n });\n }\n\n vm.loading = false;\n });\n };\n\n if (checkSecurity(['PlannedTask:r'])) {\n getTaskKpis();\n }\n\n vm.getLabel = (kpi) => {\n switch (kpi) {\n case 'total':\n return $filter('translate')('Total');\n case 'nextUserIsMe':\n return $filter('translate')('Where i can start');\n case 'blocked':\n return $filter('translate')('Blocked');\n case 'pastDeadline':\n return $filter('translate')('PastDeadline');\n case 'deadlineOneWeek':\n return $filter('translate')('DeadlineOneWeek');\n case 'deadlineTwoWeeks':\n return $filter('translate')('DeadlineTwoWeeks');\n case 'deadlineThreeWeeks':\n return $filter('translate')('DeadlineThreeWeeks');\n default:\n return kpi;\n }\n };\n },\n ],\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cxRelations').directive('relReadEid', function() {\n return {\n restrict: 'E',\n template: require('./relReadEid.html'),\n scope: {\n relation: '=',\n },\n controllerAs: 'vm',\n bindToController: true,\n controller: [\n 'ModalService',\n 'checkFeature',\n function(ModalService, checkFeature) {\n var vm = this;\n\n vm.hasEidFeature = checkFeature('Eid');\n\n vm.openEidDialog = function() {\n ModalService.showModal({\n template: require('../dialogs/readEidDialog.html'),\n controller: 'ReadEidDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n relationId: vm.relation.id,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n });\n };\n },\n ],\n };\n});\n","import angular from 'angular';\n\nangular.module('cloudX').component('relBudgetProgressbar', {\n bindings: {\n kpi: '<',\n onReload: '&',\n readOnly: '\n \n
      \n \n
      \n
      \n \n `,\n controller: [\n 'relBudgetSvc',\n 'ModalService',\n 'dataCache',\n function(relBudgetSvc, ModalService, dataCache) {\n const ctrl = this;\n ctrl.showAssignments = dataCache.getArray('assignmentsEnabled');\n\n ctrl.showBudgetDialog = function(invoiceStream) {\n if (!invoiceStream) return;\n ModalService.showModal({\n template: require('../dialogs/invoiceStreamBudgetDialog.html'),\n controller: 'InvoiceStreamBudgetDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n stream: invoiceStream,\n readOnly: !!ctrl.readOnly,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n modal.close.then(function(result) {\n if (result) {\n ctrl.onReload();\n }\n });\n });\n };\n },\n ],\n});\n","import angular from 'angular';\nimport { func } from 'prop-types';\n\nangular.module('cxRelations').directive('cxRelBankAccounts', function() {\n return {\n restrict: 'E',\n template: require('./relBankAccounts.html'),\n scope: {\n field: '=',\n relation: '=',\n bankAccounts: '=data',\n },\n bindToController: true,\n controllerAs: 'vm',\n controller: [\n '$scope',\n 'resourceFactorySvc',\n 'flySvc',\n '$http',\n 'ModalService',\n 'enumCacheSvc',\n 'translateListFilter',\n function(\n $scope,\n resourceFactorySvc,\n flySvc,\n $http,\n ModalService,\n enumCacheSvc,\n translateListFilter,\n ) {\n var resource = resourceFactorySvc.get('relationBankAccount');\n var vm = this;\n\n vm.countryEditorOpened = false;\n\n vm.datepickerOptions = {\n startingDay: 1,\n };\n vm.handleServerResponse = function(result) {\n if (result) {\n if (!vm.bankAccounts) vm.bankAccounts = [];\n result.forEach(data => {\n var bank = vm.bankAccounts.find(x => x.id === data.id);\n if (bank == null) {\n //Add bank\n vm.bankAccounts.push(data);\n } else {\n //Update bank\n angular.extend(bank, data);\n }\n });\n flySvc.success();\n }\n\n return false;\n };\n\n vm.addBank = function() {\n ModalService.showModal({\n template: require('../dialogs/addBankAccountDialog.html'),\n controller: 'AddBankAccountDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n relation: vm.relation\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n modal.close.then(vm.handleServerResponse);\n });\n };\n vm.setAsMain = function(item) {\n if (!item) return;\n if (item.isMain) return; //Already main\n vm.update(item, 'isMain', true).then(function() {\n var oldMain = vm.bankAccounts.find(x => x.id !== item.id && x.isMain);\n if (oldMain) oldMain.isMain = false;\n });\n };\n\n vm.update = function(item, field, data) {\n //Validation error\n if (typeof data === 'undefined') return '';\n\n // No change\n if (angular.equals(item[field], data) && field !== 'countryCode') return false;\n\n var model = angular.copy(item);\n model[field] = data;\n if (field === 'iban') {\n model.countryCode = model.iban.substring(0, 2);\n }\n return resource.save(model).$promise.then(vm.handleServerResponse, function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n return '';\n });\n };\n vm.delete = function(item) {\n if (!item || !item.id) return;\n resource.delete(\n { id: item.id, relationId: item.relationId },\n function(result) {\n const idx = vm.bankAccounts.indexOf(item);\n if (idx >= 0) vm.bankAccounts.splice(idx, 1);\n if (result) {\n //IsMain could have been changed, delete returns full list with updated values\n return vm.handleServerResponse(result);\n }\n flySvc.success();\n },\n function(error) {\n flySvc.error(error);\n return '';\n },\n ).$promise;\n };\n vm.setDomiciliation = function(item, checked) {\n if (!item || !item.id) return false;\n if (!checked) return vm.update(item, 'domiciliation', false);\n\n return resource\n .domiciliation({ id: item.id, relationId: item.relationId }, null)\n .$promise.then(vm.handleServerResponse, function(error) {\n flySvc.error(error);\n return '';\n });\n };\n vm.setPitRefund = function(item, checked) {\n if (!item || !item.id) return false;\n if (!checked) return vm.update(item, 'pitRefund', false);\n return resource\n .pitRefund({ id: item.id, relationId: item.relationId }, null)\n .$promise.then(vm.handleServerResponse, function(error) {\n flySvc.error(error);\n return '';\n }).$promise;\n };\n },\n ],\n };\n});\n","import angular from 'angular';\n\nangular.module('cxRelations').directive('cxRelSearchBox', [\n function() {\n return {\n restrict: 'E',\n //replace: true,\n template: require('./relSearchBox.html'),\n scope: true,\n controller: [\n '$scope',\n '$rootScope',\n 'relBindSvc',\n 'userData',\n '$transitions',\n '$state',\n function($scope, $rootScope, relBindSvc, userData, $transitions, $state) {\n $scope.relSearch = undefined;\n $scope.searchRelations = function(searchValue) {\n return resource.names({\n searchValue: searchValue,\n take: 15,\n includeInactive: false,\n }).$promise;\n };\n\n $scope.goToRelation = function() {\n relBindSvc.open($scope.relSearch.id).then(function() {\n $scope.relSearch = null;\n });\n };\n $scope.keyUp = function(event) {\n if (event.keyCode === 27) {\n $scope.form.search.$rollbackViewValue();\n $scope.relSearch = null;\n }\n if (event.keyCode === 13) {\n $scope.search();\n }\n };\n\n $scope.search = function() {\n $scope.form.search.$commitViewValue();\n if ($scope.relSearch && $scope.relSearch.id) {\n //$scope.goToRelation();\n return;\n }\n const relationName = $scope.relSearch ? $scope.relSearch.name || $scope.relSearch : '';\n $state.go('relations.overview', { relationName: relationName }).then(function() {\n $scope.relSearch = null;\n });\n };\n\n $scope.clearSearch = function() {\n $scope.relSearch = null;\n $state.go('relations.overview', { relationName: undefined });\n };\n\n $scope.toggleExpand = function() {\n $scope.expand = !$scope.expand;\n };\n },\n ],\n };\n },\n]);\n","import angular from 'angular';\nimport moment from 'moment';\nimport { compactRelation } from '../../common/Filters/relationNameFilter';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\n\nangular.module('cxRelations').directive('relTaskScheduling', function() {\n return {\n restrict: 'E',\n template: require('./relTaskScheduling.html'),\n scope: {\n relation: '=',\n fieldId: '@id',\n },\n controllerAs: 'vm',\n bindToController: true,\n controller: [\n '$http',\n '$q',\n 'flySvc',\n 'appUrls',\n 'ModalService',\n '$filter',\n 'dialogsSvc',\n 'checkSecurity',\n function($http, $q, flySvc, appUrls, ModalService, $filter, dialogsSvc, checkSecurity) {\n var vm = this;\n vm.today = moment.utc().startOf('day');\n vm.items = null;\n vm.loading = false;\n vm.datepickerOptions = {\n startingDay: 1,\n };\n vm.relationName = compactRelation(vm.relation);\n\n var mapTaskSchedule = function(item) {\n item.name = $filter('translateList')(item.template.id, 'tasktemplate');\n item.invoiceStream = vm.relation.invoiceStreams.find(x => x.id === item.invoiceStreamId);\n return item;\n };\n\n var loadTaskSchedules = function(reload) {\n if (!checkSecurity('TaskSchedules:r')) return;\n if (!reload && vm.items != null) return;\n vm.loading = true;\n vm.items = [];\n $http\n .get(appUrls.tasks + '/Api/TaskSchedules?relationId=' + vm.relation.id)\n .then(function(response) {\n vm.items = response.data.map(mapTaskSchedule).sort(dynamicSort('name'));\n vm.loading = false;\n });\n };\n vm.showScheduleDate = function() {\n if (!vm.items || !vm.items.length) return false;\n return vm.items.some(x => x.periodicity.showScheduleDate && !!x.scheduleDate);\n };\n\n vm.add = function(isCommon) {\n const modalConfig = !!isCommon\n ? {\n template: require('../dialogs/addCommonTaskSchedulesDialog.html'),\n controller: 'AddCommonTaskSchedulesDialogCtrl',\n }\n : {\n template: require('../dialogs/addTaskScheduleDialog.html'),\n controller: 'AddTaskScheduleDialogCtrl',\n };\n\n ModalService.showModal({\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n streamId: vm.relation.invoiceStreamId,\n invoiceStreams: vm.relation.invoiceStreams,\n relationId: vm.relation.id,\n isCommon: !!isCommon,\n relType: vm.relation.type,\n existingSchedules: vm.items,\n },\n ...modalConfig,\n }).then(function(modal) {\n modal.element.modal();\n modal.close.then(function(result) {\n if (typeof result === 'undefined' || result === null) return false;\n\n for (var i = 0; i < result.length; i++) {\n if (result[i] === null) continue;\n var item = mapTaskSchedule(result[i]);\n vm.items.push(item);\n vm.planNow(item); //Automatically plan the first task in the schedule\n }\n\n return true;\n });\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n });\n };\n vm.save = function(item, field, data) {\n if (typeof data === 'undefined') return '';\n if (angular.equals(item[field], data)) return false;\n var model = angular.copy(item);\n model[field] = data;\n if (!!model.planningStop && model.planningStop instanceof Date)\n model.planningStop = model.planningStop.ISO();\n return $http\n .post(appUrls.tasks + '/api/TaskSchedules/Update', model)\n .then(function(response) {\n angular.extend(item, mapTaskSchedule(response.data));\n flySvc.success('msgConfirmChange');\n return false;\n });\n };\n\n vm.remove = function(item) {\n if (item.removing) return;\n return dialogsSvc\n .showYesNoCancel('msgDeleteTaskSchedule', 'msgDeleteTaskScheduleAlsoDeletePlannedTasks')\n .then(\n function(result) {\n if (result === null) return false; //Cancelled\n item.removing = true;\n $http\n .delete(\n appUrls.tasks +\n '/api/TaskSchedules/?id=' +\n item.id +\n '&deletePlannedTasks=' +\n result,\n )\n .then(\n function() {\n var idx = vm.items.indexOf(item);\n if (idx >= 0) vm.items.splice(idx, 1);\n flySvc.success('msgItemRemoved');\n },\n function(error) {\n flySvc.error(error);\n item.removing = false;\n },\n );\n return true;\n },\n function() {\n return false;\n },\n );\n };\n\n vm.planNow = function(item) {\n if (item.planningNow || item.removing) return;\n item.planningNow = true;\n $http\n .post(appUrls.tasks + '/api/TaskSchedules/Plan/' + item.id)\n .then(\n function(response) {\n if (response && response.data)\n var name =\n response.data.name ||\n $filter('translateList')(response.data.templateId, 'tasktemplate');\n flySvc.success('msgTaskPlannedOn', {\n name: name,\n deadline: $filter('date')(response.data.deadline, 'dd-MM-yyyy'),\n });\n },\n function(error) {\n flySvc.error(error);\n },\n )\n .finally(() => {\n item.planningNow = false;\n });\n };\n\n vm.editDeviations = function(item) {\n ModalService.showModal({\n template: require('../dialogs/taskScheduleDeviationsDialog.html'),\n controller: 'TaskScheduleDeviationsDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n schedule: item,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n });\n };\n\n vm.showPlanning = function(item) {\n ModalService.showModal({\n template: require('../dialogs/plannedTasksDialog.html'),\n controller: 'PlannedTasksDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n schedule: item,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n });\n };\n\n vm.changeAssignment = function(item, newInvoiceStream) {\n if (!newInvoiceStream || !newInvoiceStream.id) return '';\n if (item.invoiceStreamId === newInvoiceStream.id) return false;\n ModalService.showModal({\n template: require('../dialogs/taskScheduleChangeAssignmentDialog.html'),\n controller: 'TaskScheduleChangeAssignmentDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n schedule: item,\n invoiceStreamId: newInvoiceStream.id,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.close.then(function(result) {\n if (!result) return; //Cancelled\n angular.extend(item, mapTaskSchedule(result));\n flySvc.success('msgConfirmChange');\n });\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n });\n\n return false; //Tell xEditable we will update the model\n };\n\n vm.toggleCollapsed = function(collapsed) {\n if (!collapsed) loadTaskSchedules();\n };\n\n vm.editRemark = function(item) {\n ModalService.showModal({\n template: require('../dialogs/editTaskScheduleRemarkDialog.html'),\n controller: 'EditTaskScheduleRemarkDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n taskScheduleId: item.id,\n value: item.remark,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.close.then(function(result) {\n if (!result) return; //Cancelled\n\n const { value = '' } = result;\n item.remark = value;\n\n flySvc.success('msgConfirmChange');\n });\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n });\n };\n },\n ],\n };\n});\n","import angular from 'angular';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport DocumentService from '@/shared/services/DocumentService';\nimport moment from 'moment';\n\nconst documentTypes = [\n 17, //UBO register pdf\n];\n\nangular.module('cxRelations').directive('cxRelUbo', [\n function() {\n return {\n restrict: 'E',\n template: require('./relUbo.html'),\n bindToController: {\n snapshotOverview: '=data',\n field: '=',\n relation: '=',\n saveRemote: '&save',\n disabled: '=?',\n },\n controllerAs: 'vm',\n controller: [\n '$scope',\n '$q',\n 'ModalService',\n 'flySvc',\n 'appUrls',\n '$http',\n 'checkSecurity',\n 'dialogsSvc',\n '$timeout',\n function(\n $scope,\n $q,\n ModalService,\n flySvc,\n appUrls,\n $http,\n checkSecurity,\n dialogsSvc,\n $timeout,\n ) {\n var vm = this;\n vm.snapshot = null;\n vm.highlightRelation = null;\n vm.documents = [];\n vm.showRelativePercentages = false;\n\n const mapSnapshotLine = ({ errors, ...line }) => {\n var result = { ...line };\n if (errors && typeof errors === 'string') result.errors = JSON.parse(errors);\n return result;\n };\n\n const mapSnapshot = ({ lines = [], ...snapshot }) => ({\n ...snapshot,\n lines: lines.map(mapSnapshotLine),\n });\n vm.getDocumentInfo = function() {\n vm.documentInfo = null;\n if (!checkSecurity('Documents:r')) return;\n if (vm.snapshot && vm.snapshot.documentId) {\n $http.get(appUrls.documents + '/api/documents/info/' + vm.snapshot.documentId).then(\n function({ data }) {\n vm.documentInfo = data;\n },\n function(error) {},\n );\n }\n };\n vm.loadDocuments = function() {\n if (!checkSecurity('Documents:r')) return;\n $http\n .get(`${appUrls.documents}/api/Documents/Links/${vm.relation.id}/3`, {\n params: { documentTypes },\n })\n .then(function(result) {\n vm.documents = result.data || [];\n });\n };\n vm.setShowRelativePercentages = function() {\n vm.showRelativePercentages = !!(\n vm.snapshot &&\n vm.snapshot.lines &&\n vm.snapshot.lines.some(x => x.relativeSharesPercentage || x.relativeVotesPercentage)\n );\n };\n\n vm.initializeOverview = function() {\n vm.snapshotDates = [];\n vm.snapshot = null;\n vm.documentInfo = null;\n\n if (\n vm.snapshotOverview &&\n vm.snapshotOverview.snapshots &&\n vm.snapshotOverview.snapshots.length > 0\n ) {\n vm.snapshotDates = vm.snapshotOverview.snapshots;\n }\n if (vm.snapshotOverview && vm.snapshotOverview.latestSnapshot) {\n vm.snapshot = mapSnapshot(vm.snapshotOverview.latestSnapshot);\n vm.setShowRelativePercentages();\n\n vm.currentSnapshotDate = vm.snapshotDates.find(x => x.id === vm.snapshot.id);\n if (!vm.currentSnapshotDate && vm.snapshotDates.length) {\n vm.currentSnapshotDate = vm.snapshotDates[0];\n }\n }\n\n vm.getDocumentInfo();\n };\n vm.loadDocuments();\n $scope.$watch('vm.snapshotOverview', vm.initializeOverview);\n\n vm.setResponsibilityType = function(value) {\n const relationId = $scope.relation.id;\n\n return $http\n .get(\n appUrls.api +\n '/api/ubo/SetResponsibilityType?id=' +\n relationId +\n '&responsibilityType=' +\n value,\n )\n .then(\n function({ data }) {\n vm.snapshotOverview = data;\n flySvc.success('SuccessTitle');\n },\n function(error) {\n flySvc.error(error);\n },\n );\n };\n vm.setOnlineSinceDate = function(value) {\n const relationId = $scope.relation.id;\n\n return $http\n .put(`${appUrls.api}/api/ubo/UpdateOnlineSinceDate/${relationId}`, null, {\n params: { date: value ? value.ISO() : '' },\n })\n .then(\n function({ data }) {\n vm.snapshotOverview = data;\n flySvc.success('SuccessTitle');\n },\n function(error) {\n flySvc.error(error);\n },\n );\n };\n vm.updateSnapshot = function(data) {\n vm.snapshot = mapSnapshot(data);\n if (\n vm.snapshotOverview.latestSnapshot &&\n vm.snapshotOverview.latestSnapshot.id === vm.snapshot.id\n ) {\n vm.snapshotOverview.latestSnapshot = vm.snapshot;\n }\n vm.setShowRelativePercentages();\n };\n\n vm.executeVerification = function() {\n const relationId = $scope.relation.id;\n vm.creatingSnapshot = true;\n\n $http.post(appUrls.api + '/api/ubo/CreateSnapshot/' + relationId).then(\n function({ data }) {\n var snapshot = mapSnapshot(data);\n vm.snapshotOverview.selfResponsibleForUbo = false;\n vm.snapshotDates.unshift(snapshot);\n vm.snapshot = snapshot;\n vm.currentSnapshotDate = snapshot;\n vm.snapshotOverview.latestSnapshot = snapshot;\n vm.creatingSnapshot = false;\n vm.documentInfo = null;\n\n vm.setShowRelativePercentages();\n flySvc.success();\n },\n function(error) {\n vm.creatingSnapshot = false;\n\n flySvc.error(error);\n },\n );\n };\n\n vm.update = function(field, value) {\n var model = angular.copy(vm.snapshot);\n\n if (angular.equals(model[field], value)) return true;\n\n model[field] = value;\n\n if (model.onlineSinceDate instanceof Date)\n model.onlineSinceDate = moment.utc(model.onlineSinceDate);\n\n return $http.put(appUrls.api + '/api/ubo/updatesnapshot/', model).then(\n function({ data }) {\n vm.updateSnapshot(data);\n\n flySvc.success('SuccessTitle');\n },\n function(error) {\n flySvc.error(error);\n },\n );\n };\n\n vm.removeDocument = function() {\n const oldDocumentId = vm.snapshot.documentId;\n if (!oldDocumentId) return;\n return $http.delete(appUrls.api + '/api/ubo/DeleteUboDocument/' + vm.snapshot.id).then(\n function({ data }) {\n vm.updateSnapshot(data);\n vm.documentInfo = null;\n vm.documents = vm.documents.filter(x => x.id !== oldDocumentId);\n flySvc.success('SuccessTitle');\n },\n function(error) {\n flySvc.error(error);\n },\n );\n };\n\n vm.markSnapshotEnteredOnline = function() {\n var id = vm.currentSnapshotDate.id;\n\n $http.put(appUrls.api + '/api/ubo/MarkSnapshotEnteredOnline/' + id).then(\n function({ data }) {\n vm.updateSnapshot(data);\n flySvc.success('msgConfirmChange');\n },\n function(error) {\n flySvc.error(error);\n },\n );\n };\n\n vm.markSnapshotRevisionOk = function() {\n var id = vm.currentSnapshotDate.id;\n\n vm.markingRevisionOk = true;\n\n $http.put(appUrls.api + '/api/ubo/MarkSnapshotRevisionOk/' + id).then(\n function({ data }) {\n vm.markingRevisionOk = false;\n\n vm.updateSnapshot(data);\n\n flySvc.success('msgConfirmChange');\n },\n function(error) {\n vm.markingRevisionOk = false;\n\n flySvc.error(error);\n },\n );\n };\n\n vm.deleteSnapshot = function() {\n dialogsSvc\n .showYesNo('msgConfirmDeleteTitle', 'msgConfirmDeleteUBOVerification')\n .then(function() {\n var id = vm.currentSnapshotDate.id;\n\n $http.delete(appUrls.api + '/api/ubo/DeleteSnapshot/' + id).then(\n function({ data }) {\n flySvc.success('msgConfirmChange');\n vm.snapshotOverview = data;\n vm.initializeOverview();\n },\n function(error) {\n flySvc.error(error);\n },\n );\n });\n };\n\n vm.snapshotDateChanged = function() {\n if (!vm.snapshot) return;\n\n var id = vm.currentSnapshotDate.id;\n\n $http.get(appUrls.api + '/api/ubo/getsnapshot/' + id).then(\n function({ data }) {\n vm.updateSnapshot(data);\n vm.documentInfo = null;\n\n vm.getDocumentInfo();\n },\n function(error) {\n flySvc.error(error);\n },\n );\n };\n\n vm.onPreviewClosed = () => {\n $timeout(function() {\n vm.showPreview = false;\n vm.activeDocumentId = null;\n }, 0);\n };\n\n vm.onPreviewSaved = document => {\n $timeout(function() {\n vm.showPreview = false;\n vm.activeDocument = null;\n vm.documents = vm.documents.map(x => {\n if (x.id === document.id) {\n return {\n ...x,\n ...document,\n };\n }\n return x;\n });\n }, 0);\n };\n\n vm.previewDocument = document => {\n vm.activeDocument = document;\n vm.showPreview = true;\n };\n vm.downloadAttachment = attachment => DocumentService.download(attachment.id);\n\n vm.uploadDocument = function(files) {\n if (!files || files.length < 1) return;\n\n var data = new FormData();\n data.append('data', files[0].data);\n\n vm.uploadingDocument = true;\n $http({\n method: 'post',\n url: appUrls.api + '/api/ubo/UploadUboDocument/' + vm.snapshot.id,\n headers: {\n 'Content-Type': undefined,\n },\n data: data,\n })\n .success(function(result) {\n if (!result) return;\n\n vm.updateSnapshot(result);\n flySvc.success();\n\n $http.get(appUrls.documents + '/api/documents/info/' + vm.snapshot.documentId).then(\n function({ data }) {\n vm.documentInfo = data;\n vm.documents.push(data);\n vm.uploadingDocument = false;\n if (vm.snapshotOverview.uboResponsibilityType !== 2) {\n vm.markSnapshotEnteredOnline();\n }\n },\n function(error) {\n vm.uploadingDocument = false;\n },\n );\n })\n .error(function(error) {\n vm.uploadingDocument = false;\n flySvc.error(error.code, error.parameters);\n });\n };\n },\n ],\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cxRelations').directive('cxRelWizard', [\n function() {\n return {\n restrict: 'E',\n template: require('./relWizard.html'),\n controllerAs: 'vm',\n scope: {\n userOptions: '=options',\n success: '&',\n },\n bindToController: true,\n controller: [\n '$state',\n '$filter',\n 'relPersistSvc',\n 'optionsSvc',\n 'flySvc',\n 'dialogsSvc',\n 'externalRelationHttpSvc',\n 'objectFactorySvc',\n 'enumCacheSvc',\n '$q',\n '$element',\n '$timeout',\n 'checkFeature',\n 'appSettings',\n 'dataCache',\n '$translate',\n 'environment',\n '$http',\n 'appUrls',\n function(\n $state,\n $filter,\n relPersistSvc,\n optionsSvc,\n flySvc,\n dialogsSvc,\n externalRelationHttpSvc,\n objectFactorySvc,\n enumCacheSvc,\n $q,\n $element,\n $timeout,\n checkFeature,\n appSettings,\n dataCache,\n $translate,\n environment,\n $http,\n appUrls,\n ) {\n var vm = this;\n vm.relTypes = [];\n vm.isLoading = false;\n vm.showValidation = false;\n vm.options = {};\n\n vm.searchProvider = undefined;\n\n vm.hasTeams = false;\n $http.get(`${appUrls.api}/api/Team/MyTeams`).then(({ data }) => {\n vm.options.hasTeams = (data || []).length > 0;\n });\n\n dataCache.ready().then(function() {\n let availableCompanies = dataCache\n .getArray('company')\n .map(x => ({ id: x.id, name: x.name }));\n\n availableCompanies = $filter('orderBy')(availableCompanies, 'name');\n\n let defaultCompany = dataCache.getDefaultCompanyForUser() || availableCompanies[0] || appSettings.defaultCompany;\n\n vm.options = angular.extend(\n {\n relType: null,\n crmType: null,\n country: appSettings.defaultCountry,\n company: defaultCompany,\n relTypeDisabled: false,\n crmTypeDisabled: false,\n countryDisabled: false,\n companyDisabled: false,\n teams: [],\n allowedRelTypes: [0, 1, 2],\n showEID: true,\n },\n vm.userOptions || {},\n );\n\n vm.companies = availableCompanies;\n vm.options.showEID = vm.options.showEID && checkFeature('Eid');\n vm.relType = vm.options.relType;\n vm.crmType = vm.options.crmType;\n vm.country = vm.options.country;\n vm.company = vm.options.company;\n vm.teams = vm.options.teams;\n if (vm.options.companyId) {\n vm.company =\n availableCompanies.find(x => x.id === vm.options.companyId) || vm.company;\n }\n\n vm.options.searchProviders = dataCache.getArray('relationSearchProviders');\n vm.options.searchProvidersFormatted = $filter('joinBy')(\n vm.options.searchProviders.map(x => {\n return $filter('translateList')(x, 'ExternalRelationSearchProvider', x);\n }),\n ', ',\n );\n\n if (vm.options.searchProviders && vm.options.searchProviders.length > 0) {\n vm.searchProvider = vm.options.searchProviders[0];\n setSearchCriteriaString();\n }\n\n if (vm.relType !== null && vm.crmType !== null && vm.country) vm.create();\n });\n\n enumCacheSvc.get('relationType').then(function(data) {\n vm.relTypes = data;\n });\n vm.crmTypes = [];\n enumCacheSvc.get('crmType').then(function(data) {\n vm.crmTypes = data;\n });\n\n const teamField = {\n definition: {\n id: 'b5a73c11-4b57-436c-9236-2424594e16fe',\n },\n value: vm.teams,\n };\n vm.fields = [teamField];\n\n vm.formReady = false;\n var showError = function(error) {\n vm.searching = false;\n console.log(error);\n flySvc.error(error);\n };\n\n vm.create = function() {\n vm.fields = [teamField];\n vm.formReady = false;\n if (vm.relType !== null && vm.crmType !== null && vm.country) {\n relPersistSvc\n .getWizardFields(vm.relType, vm.crmType, vm.country)\n .then(function(response) {\n // todo remove this and replace by initFieldsSvc\n for (var t = 0; t < response.length; t++) {\n var definition = response[t];\n\n //Set sort order\n definition.order = definition.column * 3 + definition.position;\n var value = null;\n // Initialize the values of the fields coming in...\n //console.log(definition.type);\n switch (definition.type) {\n case 3: {\n if (definition.id === 'a54bd3dc-c415-48f3-afd4-ca2c5b457121')\n value = new Date();\n break;\n }\n case 10: {\n value = optionsSvc.getDefault('currency')[0];\n break;\n }\n case 12:\n value = [\n objectFactorySvc.address(1, vm.country),\n objectFactorySvc.address(2, vm.country),\n objectFactorySvc.address(4, vm.country),\n objectFactorySvc.address(0, vm.country),\n ];\n break;\n case 13:\n case 14: {\n value = [];\n break;\n }\n case 15: {\n value = $translate.use().split('-')[0]; //Use interface language\n break;\n }\n case 19: {\n if (definition.id === '04c56e09-eeff-4982-a243-0688b6f45a74')\n value = vm.country;\n break;\n }\n case 20: {\n value = vm.relType;\n break;\n }\n case 21: {\n value = vm.crmType;\n break;\n }\n case 82:\n value = vm.company.id;\n break;\n\n case 67: // teams\n value = vm.teams;\n break;\n default:\n break;\n }\n var field = {\n definition: definition,\n value: value,\n inValid: false,\n };\n vm.fields.push(field);\n // vm.collapsed = 1;\n }\n console.log(vm.fields);\n vm.formReady = true;\n vm.focusFirstField();\n }, showError);\n }\n };\n\n var setSearchCriteriaString = () => {\n // display on which fields a relation can be found\n switch (vm.searchProvider) {\n case 0: // kbo\n vm.options.searchCriteriaString = $translate.instant('Name or enterprise number');\n break;\n case 1: // kvk\n vm.options.searchCriteriaString = $translate.instant('Name or KvK number');\n break;\n case 2: //estox\n vm.options.searchCriteriaString = $translate.instant('Enterprise number');\n break;\n default:\n vm.options.searchCriteriaString = $translate.instant('Name or enterprise number');\n break;\n }\n };\n\n vm.validateRequiredFields = function() {\n vm.showValidation = true;\n vm.fields.map(x => {\n if (x.definition.id === 'dfd0fd1c-8c4d-4e9e-be98-a79f26310960') {\n if (x.value === null) {\n x.inValid = true;\n } else {\n x.inValid = false;\n }\n }\n });\n };\n\n // todo: remove these hardcoded id's somehow\n vm.filterFields = function(field) {\n if (field.definition.id === '04c56e09-eeff-4982-a243-0688b6f45a74') return false; //Country\n if (field.definition.id === '8e18c532-ed32-49b5-bd7b-1c5529c38d15') return false; //Crm type\n if (field.definition.id === 'ef5606cf-21ec-4de9-97f2-71a9d8192748') return false; //Relation type\n if (field.definition.id === 'e31bb7ad-afb4-4a37-bd1e-46d4a9a71cf0') return false; //Own Company\n\n return true;\n };\n\n var save = function(fields) {\n vm.isLoading = true;\n relPersistSvc\n .save(fields)\n .then(function(data) {\n if (data) {\n $q.when(\n vm.success({\n relation: data,\n isNew: true,\n }),\n ).then(function() {\n vm.isLoading = false;\n });\n }\n }) //no showError needed, relPersistSvc already handles error\n .finally(() => {\n vm.isLoading = false;\n });\n };\n var getFieldValue = function(defId) {\n var fields = vm.fields.filter(function(el) {\n return el.definition && el.definition.id && el.definition.id === defId;\n });\n if (fields.length > 0 && typeof fields[0].value !== 'undefined') return fields[0].value;\n return null;\n };\n\n vm.submit = function() {\n vm.isLoading = true;\n\n var fieldsToSave = vm.fields;\n\n const teamsField = fieldsToSave.find(\n x => x.definition && x.definition.id === 'b5a73c11-4b57-436c-9236-2424594e16fe',\n );\n\n if (teamsField) {\n teamsField.value = vm.teams;\n }\n\n let name = null;\n let firstName = null;\n let vatNumber = null;\n let nationalNumber = null;\n let enterpriseNumber = null;\n let kvkNumber = null;\n let rsinNumber = null;\n let bsnNumber = null;\n vatNumber = getFieldValue('dfd0fd1c-8c4d-4e9e-be98-a79f26310960') || null;\n if (vatNumber === 'VatPending') vatNumber = null;\n if (vm.relType === 0) {\n name = getFieldValue('ccb058e7-f972-4215-82f1-0efdd16deb7d') || null;\n } else {\n name = getFieldValue('fa994e2f-20ce-427d-a300-29bb197ae197') || null;\n firstName = getFieldValue('3ae9604f-fbbd-4eaa-ad0d-954cbcbcf21d') || null;\n }\n nationalNumber = getFieldValue('3b8e7746-100e-4e5c-930b-4de7628a574b') || null;\n enterpriseNumber = getFieldValue('11cbb373-2ad8-496f-872f-f4a4be31b9a5') || null;\n kvkNumber = getFieldValue('c7cc236a-1c66-4d35-88d9-ca8bb27872f2') || null;\n rsinNumber = getFieldValue('f59eefa9-4197-4978-b976-17cab69d05ae') || null;\n bsnNumber = getFieldValue('082502ef-031b-4c37-9cf4-95dd4fb59905') || null;\n\n return getSimilarRelations(name, firstName, vatNumber,nationalNumber,enterpriseNumber,kvkNumber,rsinNumber,bsnNumber).then(function(similarRelations) {\n if (similarRelations.length) {\n return dialogsSvc.showSimilarRelations(similarRelations).then(\n function(result) {\n if (result) {\n $q.when(\n vm.success({\n relation: result,\n isNew: false,\n }),\n ).then(function() {\n vm.isLoading = false;\n });\n } else if (result === null) {\n vm.isLoading = false; //Cancel\n } else {\n save(fieldsToSave); //Continue\n }\n },\n function() {\n vm.isLoading = false;\n },\n );\n } else {\n save(fieldsToSave);\n }\n });\n };\n\n var getSimilarRelations = (\n name = null,\n firstName = null,\n vatNumber = null,\n nationalNumber = null,\n enterpriseNumber = null,\n kvkNumber = null,\n rsinNumber = null,\n bsnNumber = null,\n ) => {\n var params = new URLSearchParams();\n\n if (name !== null) params.append('name', name);\n if (firstName !== null) params.append('firstName', firstName);\n if (vatNumber !== null) params.append('vatNumber', vatNumber);\n if (nationalNumber !== null) params.append('nationalNumber', nationalNumber);\n if (enterpriseNumber !== null) params.append('enterpriseNumber', enterpriseNumber);\n if (kvkNumber !== null) params.append('kvkNumber', kvkNumber);\n if (rsinNumber !== null) params.append('rsinNumber', rsinNumber);\n if (bsnNumber !== null) params.append('bsnNumber', bsnNumber);\n\n return $http\n .get(`${appUrls.api}/api/relation/Similar?${params.toString()}`)\n .then(({ data }) => {\n return data;\n });\n };\n\n vm.externalRelationSearchResult = null;\n vm.externalRelationSearchTerm = null;\n\n vm.searchExternalRelation = function(val) {\n vm.externalRelationSearchResult = null;\n vm.searching = true;\n return externalRelationHttpSvc\n .search(val, 25, vm.searchProvider, vm.company.id)\n .then(function(data) {\n vm.externalRelationSearchTerm = val;\n vm.searching = false;\n if (data.length === 25)\n data.push({\n id: -1,\n officialName: '- ' + $filter('translate')('Show all'),\n number: '',\n });\n return data;\n }, showError);\n };\n\n vm.searchProviderChanged = () => {\n vm.externalRelationSearchResult = null;\n vm.externalRelationSearchTerm = null;\n vm.externalRelationSearch = null;\n setSearchCriteriaString();\n };\n\n vm.openExternalRelationSearchDialog = function() {\n dialogsSvc\n .showExternalRelationSearchDialog(vm.externalRelationSearchTerm, vm.searchProvider)\n .then(function(result) {\n vm.externalRelationSearchTerm = null;\n vm.externalRelationSearchResult = null;\n\n if (result) {\n let uniqueIdentifier = '';\n switch (vm.searchProvider) {\n case 0:\n uniqueIdentifier = result.id;\n break;\n case 1:\n uniqueIdentifier = result.kvkNumber;\n break;\n case 3:\n uniqueIdentifier = result.number;\n break;\n }\n if (uniqueIdentifier) {\n externalRelationHttpSvc\n .details(uniqueIdentifier, vm.searchProvider)\n .then(function(data) {\n vm.externalRelationSearchResult = data;\n vm.externalRelationSearchResult.crmType =\n vm.options.crmType !== null ? vm.options.crmType : 3;\n // vm.collapsed = -1;\n }, showError);\n }\n }\n });\n };\n\n vm.selectionChanged = function(item) {\n // \"show all\" was selected\n if (item.id === -1) {\n vm.openExternalRelationSearchDialog();\n } else {\n vm.externalRelationSearchResult = {\n ...item,\n crmType: vm.options.crmType !== null ? vm.options.crmType : 3,\n };\n // the initial search result for certain external relation sources like KBO only contains minimal data.\n // we will do a detail call to retrieve and display additional info.\n const retrieveDetailsRelationSourceTypes = [2, 15, 17, 25, 26];\n if (\n retrieveDetailsRelationSourceTypes.includes(\n vm.externalRelationSearchResult.sourceType,\n )\n ) {\n let uniqueIdentifier = '';\n switch (vm.externalRelationSearchResult.sourceType) {\n case 2:\n uniqueIdentifier = vm.externalRelationSearchResult.id;\n break;\n case 15:\n case 25:\n uniqueIdentifier = vm.externalRelationSearchResult.kvkNumber;\n break;\n case 17:\n case 26:\n uniqueIdentifier = vm.externalRelationSearchResult.number;\n break;\n\n }\n externalRelationHttpSvc\n .details(uniqueIdentifier, vm.searchProvider)\n .then(function(data) {\n vm.externalRelationSearchResult = {\n ...vm.externalRelationSearchResult,\n ...data,\n };\n }, showError);\n }\n }\n };\n\n vm.externalRelationSearchInputKeyUp = function(event, term) {\n if (event.keyCode === 27) {\n vm.externalRelationSearchTerm = null;\n vm.externalRelationSearchResult = null;\n }\n if (event.keyCode === 13 && term && term.length < 4) {\n vm.externalRelationSearchTerm = term;\n vm.openExternalRelationSearchDialog();\n }\n };\n\n vm.addRelation = function() {\n vm.isLoading = true;\n if (!vm.externalRelationSearchResult) return;\n\n const model = {\n ...vm.externalRelationSearchResult,\n searchProvider: vm.searchProvider,\n companyId: vm.company.id,\n teams: vm.teams.map(x => x.id),\n };\n\n var doCreateRelation = () =>\n externalRelationHttpSvc.create(model).then(\n function(response) {\n vm.success({\n relation: response,\n isNew: true,\n });\n vm.isLoading = false;\n },\n function(error) {\n flySvc.error(error);\n vm.isLoading = false;\n },\n );\n\n return getSimilarRelations(null, null, null, null, model.number, model.kvkNumber, model.rsinNumber, model.bsnNumber).then(\n function(similarRelations) {\n if (similarRelations.length) {\n return dialogsSvc.showSimilarRelations(similarRelations).then(\n function(result) {\n if (result) {\n $q.when(\n vm.success({\n relation: result,\n isNew: false,\n }),\n ).then(function() {\n vm.isLoading = false;\n });\n } else if (result === null) {\n vm.isLoading = false; //Cancel\n } else {\n return doCreateRelation(); //Continue\n }\n },\n function() {\n vm.isLoading = false;\n },\n );\n } else {\n return doCreateRelation();\n }\n },\n );\n };\n\n vm.focusFirstField = function() {\n $timeout(function() {\n $element\n .find(\n '.form-horizontal .fields .form-group input, .form-horizontal .fields .form-group textarea, .form-horizontal .fields .form-group select',\n )\n .filter(':visible')\n .first()\n .focus();\n }, 200);\n };\n\n if (vm.relType !== null && vm.crmType !== null && vm.country) vm.create();\n },\n ],\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').component('cxRelFieldSearch', {\n require: {\n relFileCtrl: '^cxRelationFile',\n },\n bindings: {\n sections: '<',\n },\n template: require('./relFieldSearch.html'),\n controllerAs: 'vm',\n controller: [\n 'translateListFilter',\n '$timeout',\n '$anchorScroll',\n function(translateListFilter, $timeout, $anchorScroll) {\n const vm = this;\n vm.searchValue = null;\n vm.fields = [];\n vm.show = false;\n\n vm.gotoField = field => {\n if (!vm.relFileCtrl) return;\n const { fieldId, mainSectionId, parentSections } = field;\n if (!fieldId) return;\n const [lastSection] = parentSections.slice(-1) || [];\n if (mainSectionId && lastSection) {\n return vm.relFileCtrl.openSection(mainSectionId).then(() => {\n return $timeout(function() {\n $anchorScroll(`${lastSection.id}-${fieldId}`);\n vm.searchValue = null;\n }, 500);\n });\n }\n vm.relFileCtrl.gotoField(fieldId).then(() => {\n vm.searchValue = null;\n });\n };\n\n const extractFieldsFromColumn = (column, parentInfo) => {\n if (!column || column.length === 0) return [];\n return column.map(x => ({\n ...parentInfo,\n fieldId: x.id,\n fieldLabel: x.label,\n fieldType: x.type,\n isList: x.isList,\n label: translateListFilter(x.id, 'field', x.label),\n }));\n };\n const extractFieldsFromListField = (list, parentInfo) => {\n if (!list) return [];\n return {\n ...parentInfo,\n fieldId: list.id,\n fieldLabel: list.label,\n fieldType: list.type,\n isList: list.isList,\n label: translateListFilter(list.id, 'field', list.label),\n };\n };\n const extractFieldsFromSection = (\n section,\n { parentSections = [], mainSectionId, ...parentInfo } = {},\n ) => {\n if (!section) return [];\n\n const info = {\n ...parentInfo,\n parentSections: [\n ...parentSections,\n {\n id: section.id,\n label: translateListFilter(section.id, 'section', section.label),\n },\n ],\n mainSectionId: mainSectionId || section.id,\n };\n\n return [\n ...(section.lists ? section.lists.flatMap(x => extractFieldsFromListField(x, info)) : []),\n ...(section.columns\n ? section.columns.flatMap(x => extractFieldsFromColumn(x, info))\n : []),\n ...(section.sections\n ? section.sections.flatMap(x => extractFieldsFromSection(x, info))\n : []),\n ];\n };\n\n vm.reloadFields = function() {\n if (!vm.sections) {\n vm.fields = [];\n vm.show = false;\n return;\n }\n\n vm.fields = vm.sections.flatMap(x => extractFieldsFromSection(x));\n vm.show = vm.fields && vm.fields.length > 0;\n //console.log(vm.fields);\n };\n\n vm.$onChanges = function() {\n vm.reloadFields();\n };\n },\n ],\n});\n","import angular from 'angular';\nimport moment from 'moment';\nimport { dynamicSortMultiple } from '@/shared/utils/dynamicSort';\nimport dataCacheService from '@/shared/services/DataCacheService';\n\nangular.module('cxRelations').directive('cxLinkedRelationsList', function() {\n return {\n restrict: 'E',\n template: require('./linkedRelationsList.html'),\n scope: true,\n bindToController: {\n data: '=data',\n field: '=',\n relId: '@',\n },\n controllerAs: 'vm',\n require: ['^cxRelationFile', 'cxLinkedRelationsList'],\n link: function(scope, el, attrs, controllers) {\n if (!controllers || controllers.length !== 2) return;\n var cxRelFile = controllers[0];\n var controller = controllers[1];\n controller.setRelationFile(cxRelFile);\n },\n controller: [\n '$q',\n '$http',\n '$state',\n 'appUrls',\n 'dataCache',\n 'relBindSvc',\n 'flySvc',\n 'ModalService',\n 'dialogsSvc',\n 'resourceFactorySvc',\n '$translate',\n 'translateListFilter',\n '$scope',\n function(\n $q,\n $http,\n $state,\n appUrls,\n dataCache,\n relBindSvc,\n flySvc,\n ModalService,\n dialogsSvc,\n resourceFactorySvc,\n $translate,\n translateListFilter,\n $scope,\n ) {\n const vm = this;\n vm.relation = relBindSvc.relations[vm.relId];\n vm.saving = false;\n var resource = resourceFactorySvc.get('relationLink');\n vm.linksPerType = [];\n var relationFile = null;\n vm.hasPortalConnectPlatform = dataCacheService.hasPortalConnectPlatform(vm.relation.companyId);\n const mapLink = link => {\n return link;\n };\n\n vm.setRelationFile = function(relFile) {\n relationFile = relFile;\n };\n\n vm.update = function(link) {\n if (vm.saving) return $q.when('');\n vm.saving = true;\n return resource.update(link).$promise.then(\n function(result) {\n vm.saving = false;\n flySvc.success('msgLinkSaved');\n if (result) relBindSvc.updateRelation(vm.relId, result.changes, result.billingErrors);\n\n return true;\n },\n function(error) {\n vm.saving = false;\n flySvc.error(error.data.code, error.data.parameters);\n return '';\n },\n );\n };\n\n vm.submit = function(relationLink, value, field) {\n if (angular.equals(relationLink[field], value)) return false;\n\n var model = angular.copy(relationLink);\n model[field] = value;\n\n if (model.info) {\n model.info.isPortalUser = model.info.isPortalUser;\n delete model.isPortalUser;\n }\n\n return vm.update(model);\n };\n\n vm.setAsMain = function(link) {\n if (vm.saving) return;\n vm.data.forEach(function(item) {\n if (item.id !== link.id) item.isMain = false;\n });\n link.isMain = !link.isMain;\n vm.update(link);\n };\n vm.openInteractionsMailModal = function(link) {\n return () =>\n $state.go('interactions', {\n relationId: link.to,\n openMailModal: true,\n });\n };\n vm.remove = function(link) {\n if (vm.saving) return;\n return dialogsSvc.showYesNo('comfirmDeleteTitle', 'msgConfirmDeleteRelationLink').then(\n function(result) {\n vm.saving = true;\n\n resource.delete({ id: link.id }).$promise.then(\n function(result) {\n vm.saving = false;\n flySvc.success('msgLinkRemoved');\n if (result)\n relBindSvc.updateRelation(vm.relId, result.changes, result.billingErrors);\n\n var index = vm.data.indexOf(link);\n if (index >= 0) vm.data.splice(index, 1);\n vm.rebuildLinksPerType();\n if (relationFile) {\n relationFile.refreshOpenSections();\n }\n return true;\n },\n function(error) {\n vm.saving = false;\n flySvc.error(error.data.code, error.data.parameters);\n return false;\n },\n );\n },\n function() {\n return false;\n },\n );\n };\n\n vm.addRelationLink = function() {\n ModalService.showModal({\n template: require('../dialogs/addRelationLinkDialog.html'),\n controller: 'AddRelationLinkDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n relationId: vm.relation.id,\n companyId: vm.relation.companyId,\n relationType: vm.relation.type,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n modal.close.then(function(result) {\n if (result) {\n vm.data.push(mapLink(result));\n vm.rebuildLinksPerType();\n if (relationFile) {\n relationFile.refreshOpenSections();\n }\n flySvc.success('msgConfirmChange');\n }\n });\n });\n };\n\n vm.openRelationLinkDetails = function(link) {\n ModalService.showModal({\n template: require('../dialogs/editRelationLinkDialog.html'),\n controller: 'EditRelationLinkDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n relationLink: angular.copy(link),\n updateLink: vm.update,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n modal.close.then(function(result) {\n if (!result) return false;\n // Something was changed reloading link\n if (relationFile) {\n relationFile.refreshOpenSections();\n }\n resource.linkInfo({ id: link.id }, function(data) {\n link.info = data;\n });\n });\n });\n };\n\n vm.rebuildLinksPerType = function() {\n vm.linksPerType = [];\n\n vm.data.forEach(link => {\n let type = vm.linksPerType.find(\n x =>\n x.type === link.linkType &&\n (link.linkType === 5 || //Group all partners together\n x.isPrincipal === link.isPrincipal),\n );\n\n if (link.linkType === 10 || link.linkType >= 100) {\n type = {\n type: link.linkType,\n isPrincipal: link.isPrincipal,\n label: $translate.instant('Other'),\n links: [],\n isOther: true,\n };\n vm.linksPerType.push(type);\n link.label = translateListFilter(\n link.linkType,\n link.isPrincipal ? 'linktypeto' : 'linktypeback',\n );\n }\n\n if (!type) {\n type = {\n type: link.linkType,\n isPrincipal: link.isPrincipal,\n label: translateListFilter(\n link.linkType,\n link.isPrincipal ? 'linktypeto' : 'linktypeback',\n ),\n links: [],\n isOther: false,\n };\n vm.linksPerType.push(type);\n }\n type.links.push(link);\n\n if (link.info?.endDate) {\n link.expired = moment.utc(link.info.endDate).isBefore(moment.utc(), 'd');\n }\n if (link.linkType === 5 && link.info.partnershipType == 4) {\n link.expired = true;\n }\n const otherLinks = vm.linksPerType.filter(x => x.isOther === true);\n\n if (otherLinks.length > 1) {\n const links = vm.linksPerType.filter(x => x.isOther === false);\n const singleOtherLink = otherLinks[0];\n\n otherLinks\n .filter((_, i) => i > 0)\n .forEach(x => x.links.forEach(link => singleOtherLink.links.push(link)));\n vm.linksPerType = [...links, singleOtherLink];\n }\n }, []);\n vm.linksPerType.sort(dynamicSortMultiple('label', 'isPrincipal'));\n };\n\n $scope.$watch(\n 'vm.data',\n function(newValue) {\n if (newValue) {\n vm.data = newValue.map(mapLink);\n vm.rebuildLinksPerType();\n }\n },\n true,\n );\n },\n ],\n };\n});\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxPushShareholderInfoEstoxButton', [\n '$q',\n '$http',\n 'appUrls',\n '$filter',\n '$translate',\n 'flySvc',\n 'ModalService',\n 'dataCache',\n function($q, $http, appUrls, $filter, $translate, flySvc, ModalService, dataCache) {\n return {\n restrict: 'E',\n replace: true,\n scope: {\n relation: '=',\n gmType: '=',\n },\n template: ``,\n require: ['^cxRelationFile'],\n link: function($scope, element, attrs, ctrl) {\n var cxRelFile = ctrl[0];\n\n const searchProviders = dataCache.getArray('relationSearchProviders');\n $scope.estoxEnabled = searchProviders.some(x => x === 2); // external relation provider 2 is estox\n\n $scope.relationName = $scope.relation\n ? $filter('relationName')($scope.relation)\n : $translate.instant('Company');\n\n $scope.retrieveModel = function() {\n if ($scope.relation && $scope.relation.id) {\n const relationId = $scope.relation.id;\n $scope.retrievingModel = true;\n return $http.post(appUrls.api + '/api/relation/GetEstoxModel?id=' + relationId).then(\n function({ data }) {\n $scope.retrievingModel = false;\n if (!data) return;\n return ModalService.showModal({\n template: require('../../relations/dialogs/estoxConfirmationDialog.html'),\n controller: 'EstoxConfirmationDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n data,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n modal.close.then(function(result) {\n if (!result) return;\n });\n });\n },\n function(error) {\n $scope.retrievingModel = false;\n flySvc.error(error.data.code, error.data.parameters);\n return '';\n },\n );\n }\n };\n\n $scope.retrieveFromEstox = function() {\n if ($scope.relation && $scope.relation.id) {\n const relationId = $scope.relation.id;\n $scope.retrievingFromEstox = true;\n $http.post(appUrls.api + '/api/relation/RetrieveFromEstox?id=' + relationId).then(\n function(result) {\n $scope.retrievingFromEstox = false;\n flySvc.success('SuccessTitle');\n if (cxRelFile && cxRelFile.refreshOpenSections) cxRelFile.refreshOpenSections();\n },\n function(error) {\n $scope.retrievingFromEstox = false;\n flySvc.error(error);\n },\n );\n }\n };\n },\n };\n },\n]);\n","import angular from 'angular';\n\nangular.module('cloudX').directive('cxSearchRelationInPeppolButton', [\n '$q',\n '$http',\n 'appUrls',\n '$filter',\n '$translate',\n 'flySvc',\n 'ModalService',\n 'dataCache',\n function($q, $http, appUrls, $filter, $translate, flySvc, ModalService, dataCache) {\n return {\n restrict: 'E',\n replace: true,\n scope: {\n relation: '=',\n },\n template: ``,\n require: ['^cxRelationFile'],\n link: function($scope, element, attrs, ctrl) {\n var cxRelFile = ctrl[0];\n\n $scope.searchRelationInPeppolNetwork = function() {\n if ($scope.relation && $scope.relation.id) {\n const relationId = $scope.relation.id;\n $scope.searching = true;\n $http.post(appUrls.api + '/api/relation/SearchRelationInPeppol?id=' + relationId).then(\n function({ data }) {\n $scope.relation.peppolStatus = data.peppolStatus;\n $scope.searching = false;\n if (data.peppolStatus === 1) {\n flySvc.error('msgRelationNotFoundOnPeppolNetwork');\n } else if (data.peppolStatus === 2) {\n flySvc.warning('msgRelationFoundOnPeppolNetworkButNoSupportedDocumentFormats');\n } else if (data.peppolStatus === 3) {\n flySvc.success('msgRelationFoundOnPeppolNetwork');\n }\n },\n function(error) {\n $scope.searching = false;\n flySvc.error(error);\n },\n );\n }\n };\n },\n };\n },\n]);\n","import angular from 'angular';\nimport moment from 'moment';\nimport { compactRelation } from '../../common/Filters/relationNameFilter';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport { RegistrationGroup } from '../../registrations/model/registrationGroup';\n\nangular.module('cxRelations').directive('relTodos', function() {\n return {\n restrict: 'E',\n template: require('./relTodos.html'),\n scope: {\n relation: '=',\n fieldId: '@id',\n },\n controllerAs: 'vm',\n bindToController: true,\n require: ['^cxRelationFile', 'relTodos'],\n link: function(scope, el, attrs, controllers) {\n if (!controllers || controllers.length !== 2) return;\n var cxRelFile = controllers[0];\n var controller = controllers[1];\n controller.setRelationFile(cxRelFile);\n },\n controller: [\n '$http',\n '$q',\n 'flySvc',\n 'appUrls',\n 'ModalService',\n '$filter',\n 'dialogsSvc',\n 'dataCache',\n 'registrationService',\n 'regDialogsSvc',\n '$timeout',\n function(\n $http,\n $q,\n flySvc,\n appUrls,\n ModalService,\n $filter,\n dialogsSvc,\n dataCache,\n registrationService,\n regDialogsSvc,\n $timeout,\n ) {\n var vm = this;\n const now = moment.utc();\n const users = dataCache.getArray('user');\n\n vm.items = null;\n vm.loading = false;\n\n var relationFile = null;\n vm.setRelationFile = function(relFile) {\n relationFile = relFile;\n };\n const isPastDeadline = todo => {\n const deadlineUtc = moment.utc(todo.deadline);\n return now.isAfter(deadlineUtc);\n };\n\n const isNearingDeadline = todo => {\n const deadlineUtc = moment.utc(todo.deadline);\n return deadlineUtc.isAfter(now) && deadlineUtc.isBefore(now.add(1, 'weeks'));\n };\n\n const getUserName = function(userId) {\n if (!users || !userId) return;\n const employee = users.find(e => e.userID === userId);\n if (!employee) return;\n return employee.firstName + ' ' + employee.lastName;\n };\n\n const mapStatus = (originalTodo, statusResult) => {\n if (statusResult.isBlocked) {\n originalTodo.status = 3;\n } else if (statusResult.inapplicable) {\n originalTodo.status = 4;\n } else if (statusResult.rejected) {\n originalTodo.status = 6;\n } else if (statusResult.status <= 2) {\n originalTodo.status = statusResult.status;\n }\n if (statusResult.deadline) {\n originalTodo.deadline = statusResult.deadline;\n }\n if (statusResult.userId) {\n originalTodo.userId = statusResult.userId;\n originalTodo.user = getUserName(statusResult.userId);\n }\n return originalTodo;\n };\n\n var mapTodo = function(item) {\n item.isNearingDeadline = isNearingDeadline(item);\n item.isPastDeadline = isPastDeadline(item);\n item.user = getUserName(item.userId);\n return item;\n };\n\n var loadTodos = function(reload) {\n if (!reload && vm.items != null) return;\n vm.loading = true;\n vm.items = [];\n\n const requestParameters = {\n relationId: vm.relation.id,\n desc: false,\n page: 0,\n mainStatus: [0, 1, 3],\n ownCompanies: [],\n period: 'all',\n relationTypes: [],\n taskLevels: [2], // Todo's\n sortKey: 'deadline',\n take: 50,\n };\n\n $http.post(appUrls.tasks + '/api/tasklist', requestParameters).then(\n function(response) {\n vm.items = response.data.tasks.map(mapTodo);\n vm.loading = false;\n },\n error => {\n vm.loading = false;\n flySvc.error(error);\n },\n );\n };\n\n vm.add = function() {\n vm.showCreateTodoModal = true;\n };\n\n vm.onStatusChanged = todos => {\n if (angular.isArray(todos)) {\n todos.forEach(todo => {\n vm.items = vm.items.map(x => {\n if (x.id === todo.id) {\n return {\n ...x,\n ...mapStatus(x, todo),\n };\n }\n return x;\n });\n });\n } else if (todos?.id) {\n vm.items = vm.items.map(x => {\n if (x.id === todos.id) {\n return {\n ...x,\n ...mapStatus(x, todos),\n };\n }\n return x;\n });\n }\n };\n\n vm.remove = function(item) {\n if (item.removing) return;\n return dialogsSvc\n .showYesNo('msgConfirmDeleteTitle', 'msgConfirmDeleteTodo')\n .then(function() {\n item.removing = true;\n $http.delete(appUrls.tasks + '/api/plannedtasks/' + item.id).then(\n function() {\n var idx = vm.items.indexOf(item);\n if (idx >= 0) vm.items.splice(idx, 1);\n flySvc.success('msgItemRemoved');\n },\n function(error) {\n flySvc.error(error);\n item.removing = false;\n },\n );\n return true;\n });\n };\n\n vm.openTaskModal = todo => {\n vm.showTaskModal = true;\n vm.activeTask = todo;\n };\n\n vm.onTaskModalClosed = () => {\n $timeout(function() {\n vm.showTaskModal = false;\n vm.activeTask = null;\n }, 0);\n };\n\n vm.onCreateTodoModalClosed = () => {\n $timeout(function() {\n vm.showCreateTodoModal = false;\n }, 0);\n };\n\n vm.onCreateTodoModalSaved = todo => {\n $timeout(function() {\n vm.showCreateTodoModal = false;\n if (todo.relationId === vm.relation.id) vm.items.push(mapTodo(todo));\n relationFile.getRelationKPIData();\n }, 0);\n };\n\n vm.onTaskModalSaved = updatedTasks => {\n $timeout(function() {\n vm.showTaskModal = false;\n vm.activeTask = null;\n\n if (angular.isArray(updatedTasks)) {\n updatedTasks.forEach(todo => {\n vm.items = vm.items.map(x => {\n if (x.id === todo.id) {\n return {\n ...x,\n ...mapTodo(todo),\n };\n }\n return x;\n });\n });\n }\n }, 0);\n };\n\n vm.createRegistration = function(todo) {\n vm.disableCreateRegistration = true;\n var reg = new RegistrationGroup();\n reg.date = moment\n .utc()\n .startOf('day')\n .toDate();\n\n const relation = {\n ...compactRelation(vm.relation),\n invoiceStreamId: todo.invoiceStreamId,\n invoiceStreams: vm.relation.invoiceStreams,\n };\n reg.relation = relation;\n reg.invoiceStreamId = todo.invoiceStreamId;\n reg.setRelation();\n reg.task = todo.id;\n\n reg.setTaskFields({\n plannedTaskId: todo.id,\n plannedTaskName: todo.name,\n });\n const userId = dataCache.getArray('employee').userID;\n\n registrationService\n .getNextRegistrationTime(\n moment\n .utc()\n .startOf('day')\n .toDate(),\n )\n .then(function(data) {\n if (data) reg.work.initTime(data.Hour, data.Minute, 0);\n\n reg.setUser(userId);\n\n var vat = dataCache.getDefaultCompany().resourceVATRate || 0.21;\n reg.work.setVatRate(vat, 0);\n reg.cost.setVatRate(vat, 0);\n reg.travel.setVatRate(vat, 0);\n regDialogsSvc.editRegistrationGroup(reg).then(function(result) {\n if (result) {\n flySvc.success('Registration created');\n }\n });\n })\n .finally(() => {\n vm.disableCreateRegistration = false;\n });\n };\n\n vm.toggleCollapsed = function(collapsed) {\n if (!collapsed) loadTodos();\n };\n },\n ],\n };\n});\n","import angular from 'angular';\nimport { func } from 'prop-types';\n\nangular.module('cxRelations').directive('cxRelNaceCodes', function() {\n return {\n restrict: 'E',\n template: require('./relNaceCodes.html'),\n scope: {\n field: '=',\n relation: '=',\n naceCodeString: '=data',\n },\n bindToController: true,\n controllerAs: 'vm',\n controller: [\n '$scope',\n 'flySvc',\n '$http',\n 'translateListFilter',\n 'appUrls',\n function($scope, flySvc, $http, translateListFilter, appUrls) {\n var vm = this;\n\n $scope.$watch('vm.naceCodeString', () => {\n vm.naceCodes = vm.naceCodeString\n ? vm.naceCodeString\n .split(',')\n .filter(x => x !== undefined && x !== '')\n .sort()\n : [];\n });\n\n vm.naceCodes = vm.naceCodeString\n ? vm.naceCodeString\n .split(',')\n .filter(x => x !== undefined && x !== '')\n .sort()\n : [];\n vm.adding = false;\n\n vm.addNaceCode = () => {\n if (!vm.adding) {\n vm.adding = true;\n } else {\n vm.adding = false;\n vm.newNaceCode = null;\n }\n };\n\n vm.cancelNew = () => {\n vm.adding = false;\n vm.newNaceCode = null;\n };\n\n vm.submitNewNaceCode = () => {\n if (!vm.newNaceCode) return;\n vm.saving = true;\n return $http\n .post(appUrls.api + '/api/relation/nace/' + vm.relation.id + '/' + vm.newNaceCode)\n .then(\n result => {\n vm.naceCodes.push(vm.newNaceCode);\n vm.naceCodes = vm.naceCodes.sort();\n vm.saving = false;\n vm.adding = false;\n vm.newNaceCode = null;\n },\n error => {\n flySvc.error(error);\n vm.saving = false;\n },\n );\n };\n\n vm.delete = function(naceCode) {\n if (!naceCode) return;\n\n vm.deleting = true;\n return $http\n .delete(appUrls.api + '/api/relation/nace/' + vm.relation.id + '/' + naceCode)\n .then(\n result => {\n const idx = vm.naceCodes.indexOf(naceCode);\n if (idx >= 0) vm.naceCodes.splice(idx, 1);\n vm.deleting = false;\n flySvc.success();\n },\n error => {\n flySvc.error(error);\n vm.deleting = false;\n },\n );\n };\n },\n ],\n };\n});\n","import angular from 'angular';\n\nangular\n .module('cxRelations')\n .controller('RelNewCtrl', ['$state', 'userData', 'flySvc', relNewCtrl]);\n\nfunction relNewCtrl($state, userData, flySvc) {\n var vm = this;\n\n vm.success = function(relation, isNew) {\n if (!relation) return;\n\n userData.update('relSections', function(value) {\n value = value || {};\n value.relDashboard = true;\n value['3fd70070-f8c0-45a4-b3f2-23afff37061f'] = true;\n return value;\n });\n\n return $state\n .go('relations.detail', {\n relId: relation.id,\n })\n .then(function() {\n if (isNew) flySvc.success('msgNewRelCreated');\n });\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cxHttpServices')\n .factory('externalRelationHttpSvc', ['$http', 'appUrls', externalRelationHttpSvc]);\n\nfunction externalRelationHttpSvc($http, appUrls) {\n var baseUrl = appUrls.api + '/api/externalRelation/';\n\n function handleSuccess(response) {\n return response.data;\n }\n\n return {\n search: function(value, take, searchProvider, companyId, cancelPromise) {\n var options = {};\n if (typeof cancelPromise != 'undefined') options.timeout = cancelPromise;\n return $http\n .get(\n baseUrl +\n 'search/?id=' +\n encodeURIComponent(value) +\n '&take=' +\n (take || 20) +\n '&searchProvider=' +\n searchProvider +\n '&companyId=' +\n companyId,\n options,\n )\n .then(handleSuccess);\n },\n details: function(uniqueIdentifier, searchProvider) {\n return $http\n .get(baseUrl + 'details?id=' + uniqueIdentifier + '&searchProvider=' + searchProvider)\n .then(handleSuccess);\n },\n create: function(model) {\n return $http.post(baseUrl + 'create', model).then(handleSuccess); //...which contains dots that are interpreted as an extension.\n },\n };\n}\n","import angular from 'angular';\n\nangular.module('cloudX').factory('openNewAddressSvc', [openNewAddress]);\n\nfunction openNewAddress() {\n // register the newAddress function from addressListDrv\n var openAddress = null;\n var callBacks = [];\n\n var openNewAddress = function(medium) {\n if (openAddress) {\n openAddress(medium);\n } else console.warn('function not registered in openNewAddressSvc');\n };\n\n return {\n register: function(scope, openAddressFunction) {\n openAddress = openAddressFunction;\n scope.$on('$destroy', function() {\n openAddress = null;\n });\n },\n registerCallback: function(scope, callBackFunc) {\n if (typeof callBackFunc !== 'function') return;\n callBacks.push(callBackFunc);\n scope.$on('$destroy', function() {\n var idx = callBacks.indexOf(callBackFunc);\n if (idx >= 0) callBacks.splice(idx, 1);\n });\n },\n openNewAddress: openNewAddress,\n notifyRefresh: function() {\n for (var i = 0; i < callBacks.length; i++) callBacks[i]();\n },\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cxRelations')\n .factory('relBindSvc', [\n '$state',\n '$q',\n 'userData',\n 'resourceFactorySvc',\n 'authService',\n 'recentRelationsSvc',\n '$timeout',\n 'flySvc',\n 'checkInvoiceTeamAccess',\n relBindSvc,\n ]);\n\nfunction relBindSvc(\n $state,\n $q,\n userData,\n resourceFactorySvc,\n authService,\n recentRelationsSvc,\n $timeout,\n flySvc,\n checkInvoiceTeamAccess,\n) {\n // This service keeps the relation in the format to bind to....\n var relations = {};\n var relationResource = resourceFactorySvc.get('relation');\n // Wrapped id in reference object\n var active = {\n id: null,\n };\n var loaded = false;\n var sections = {};\n var fieldTypes = {};\n\n var defaultOpenSections = [\n '3fd70070-f8c0-45a4-b3f2-23afff37061f', //Identification\n ];\n\n var goTo = function(id, options) {\n active.id = id;\n\n if (options.reloadState) {\n $state.go(\n 'relations.detail',\n {\n relId: id,\n options: {\n reload: false,\n },\n fromRelBindSvc: true,\n },\n {\n reload: true,\n },\n );\n return true;\n } else {\n $state.go('relations.detail', {\n relId: id,\n fromRelBindSvc: true,\n });\n\n return true;\n }\n\n return false;\n };\n\n var updateFieldTypes = function(section) {\n if (!section) return;\n if (section.columns) {\n angular.forEach(section.columns, function(col) {\n angular.forEach(col, function(field) {\n if (!fieldTypes[field.id]) fieldTypes[field.id] = field.type;\n });\n });\n }\n if (section.lists) {\n angular.forEach(section.lists, function(field) {\n if (!fieldTypes[field.id]) fieldTypes[field.id] = field.type;\n });\n }\n if (section.sections) {\n angular.forEach(section.sections, updateFieldTypes);\n }\n };\n\n var getData = function(relationId, openSections, forceReload = false) {\n var rel = relations[relationId];\n if (!openSections || openSections.length === 0) openSections = defaultOpenSections;\n if (!rel.sectionStatus) rel.sectionStatus = {};\n\n //Reset section status (0: loading, 1: data available but loading new data, 2: done)\n openSections.forEach(s => (rel.sectionStatus[s] = rel.sectionStatus[s] === 2 ? 1 : 0));\n\n return relationResource.getData(\n {\n id: relationId,\n dataOnly: !!sections[rel.sectionConfigKey],\n },\n openSections,\n function(data) {\n if (data.sections) {\n sections[rel.sectionConfigKey] = data.sections;\n\n sections[rel.sectionConfigKey].forEach(section => {\n section.defaultOpen = defaultOpenSections.indexOf(section.id) >= 0;\n updateFieldTypes(section);\n });\n\n delete data.sections;\n }\n\n angular.forEach(data, function(value, key) {\n if (typeof fieldTypes[key] !== 'undefined') value.type = fieldTypes[key];\n });\n angular.extend(rel, data);\n openSections.forEach(s => (rel.sectionStatus[s] = 2));\n\n if (sections[rel.sectionConfigKey] && (!rel.sections || forceReload)) {\n rel.sections = angular.copy(sections[rel.sectionConfigKey]);\n }\n },\n ).$promise;\n };\n\n var loadSections = function(sectionConfigKey) {\n return relationResource.sections(\n {\n id: sectionConfigKey,\n },\n function(data) {\n sections[sectionConfigKey] = data;\n sections[sectionConfigKey].forEach(section => {\n section.defaultOpen = defaultOpenSections.indexOf(section.id) >= 0;\n updateFieldTypes(section);\n });\n },\n ).$promise;\n };\n var close = function(id) {\n if (relations.hasOwnProperty(id)) delete relations[id];\n if (active.id === id) active.id = null;\n };\n var open = function(id, options) {\n if (!id) return null;\n id = id.toLowerCase();\n\n // Make sure relation cache doesn't get too full\n if (relations && Object.keys(relations).length > 5) {\n clearCache();\n }\n\n //Extend default options with parameter options\n options = angular.extend(\n {\n reload: true,\n reloadSections: false,\n changeState: true,\n reloadState: false,\n },\n options || {},\n );\n\n goTo(id, options);\n\n var deferred = $q.defer();\n if (!relations[id] || !relations[id].sections || options.reload || options.reloadSections) {\n if (!relations[id]) relations[id] = { loading: true };\n if (!relations[id].sectionStatus) {\n relations[id].sectionStatus = {};\n }\n if (!relations[id].collapsedSections) relations[id].collapsedSections = {};\n if (!relations[id].sections) relations[id].loading = true;\n relationResource.get(\n {\n id: id,\n },\n function(relation) {\n $timeout(recentRelationsSvc.reloadRecentRelations, 100);\n\n if (!relations[relation.id]) relations[relation.id] = {};\n var rel = relations[relation.id];\n\n defaultOpenSections.forEach(s => (rel.collapsedSections[s] = false));\n\n //Clear sections if config key is changed\n if (relation.sectionConfigKey !== rel.sectionConfigKey) rel.sections = null;\n\n // Comment: this way we overwrite fields that appear more than once, but that does not matter.\n // First the values that are in the relation object directly\n angular.forEach(relation, function(value, key) {\n if (key === 'sections' && value === null) return;\n if (key === 'loadedSections') return;\n\n //Set field type property in relation fields\n if (typeof fieldTypes[key] !== 'undefined') value.type = fieldTypes[key];\n rel[key] = value;\n });\n\n rel.hasInvoiceTeamAccess = checkInvoiceTeamAccess(rel.teamSecurityCode);\n rel.loading = false;\n\n var sectionsToLoad = [];\n angular.forEach(rel.collapsedSections, function(value, key) {\n if (!value) sectionsToLoad.push(key);\n });\n\n if (relation.loadedSections)\n angular.forEach(relation.loadedSections, function(s) {\n sectionsToLoad = sectionsToLoad.filter(l => s !== l);\n rel.sectionStatus[s] = 2;\n });\n\n if (!sectionsToLoad.length) {\n if (!sections[rel.sectionConfigKey]) {\n loadSections(rel.sectionConfigKey).then(function() {\n if (sections[rel.sectionConfigKey] && !rel.sections) {\n rel.sections = angular.copy(sections[rel.sectionConfigKey]);\n }\n //Set field type property in relation fields after loading sections\n angular.forEach(rel, function(value, key) {\n if (!value) return;\n if (typeof value.value === 'undefined') return;\n if (typeof value.type !== 'undefined') return;\n if (typeof fieldTypes[key] !== 'undefined') value.type = fieldTypes[key];\n });\n deferred.resolve(relations[id]);\n });\n } else {\n if (!rel.sections) {\n rel.sections = angular.copy(sections[rel.sectionConfigKey]);\n }\n deferred.resolve(relations[id]);\n }\n } else {\n getData(rel.id, sectionsToLoad).then(function() {\n deferred.resolve(relations[id]);\n });\n }\n },\n function(error) {\n //Close tab on error\n console.error(\n 'Error retrieving relation \"' + id + '\": Closing tab\\n' + JSON.stringify(error),\n );\n relations[id].loading = false;\n relations[id].error = error;\n flySvc.error(error);\n deferred.reject(error);\n },\n );\n } else {\n deferred.resolve(relations[id]);\n }\n\n return deferred.promise;\n };\n\n var clearCache = function() {\n for (var key in relations) if (relations.hasOwnProperty(key)) delete relations[key];\n active.id = null;\n loaded = false;\n };\n\n var updateRelation = function(relId, changes, billingErrors, relationName = null) {\n var rel = relations[relId];\n if (!rel) return;\n if (relationName) {\n //Copy companyId and language code from relation name dto to relation object\n const { companyId, languageCode } = relationName;\n if (companyId && rel.companyId !== companyId) rel.companyId = companyId;\n if (languageCode && rel.languageCode !== languageCode) rel.languageCode = languageCode;\n }\n\n // update the relation object with the changes (if any)\n if (changes)\n angular.forEach(changes, function(value, key) {\n if (rel[key] == null || typeof rel[key].value === 'undefined') {\n rel[key] = value;\n } else {\n if (angular.isArray(rel[key].value) && angular.isArray(value)) {\n rel[key].value.clear();\n Array.prototype.push.apply(rel[key].value, value);\n } else {\n rel[key].value = value;\n }\n }\n });\n rel.hasInvoiceTeamAccess = checkInvoiceTeamAccess(rel.teamSecurityCode);\n // update the billing errors: remove all billingErrors ...\n angular.forEach(rel, function(fieldValue, fieldId) {\n if (fieldValue && fieldValue.billingError) fieldValue.billingError = null;\n });\n // ... and add the new ones\n rel.billingErrors = billingErrors;\n\n if (billingErrors)\n angular.forEach(billingErrors, function(billingError) {\n if (rel[billingError.fieldId])\n rel[billingError.fieldId].billingError = billingError.exception;\n });\n };\n\n authService.addOnLogOut(function() {\n clearCache();\n });\n\n const getHelpArticleForField = fieldId => {\n switch (fieldId) {\n // example:\n // case '40ae0a55-fd7d-4577-830f-22589642e875':\n // return '6784503678492';\n case '42266463-8da3-46a2-822a-cd99ffd96bc8':\n return '15870358904988';\n default:\n return undefined;\n }\n };\n\n return {\n active: active,\n relations: relations,\n open: open,\n close: close,\n\n updateRelation: updateRelation,\n\n loadSection: function(relationId, sectionId) {\n return getData(relationId, [sectionId]);\n },\n loadSections: function(relationId, sections) {\n return getData(relationId, sections);\n },\n refreshSection: function(relationId, sectionId) {\n return getData(relationId, [sectionId], true);\n },\n refreshSections: function(relationId, sections) {\n return getData(relationId, sections, true);\n },\n sections: sections,\n getHelpArticleForField: getHelpArticleForField,\n };\n}\n","import angular from 'angular';\nimport { mapBudgetKpi } from '@/modules/relations/budgets/budgetHelpers';\n\nangular\n .module('cxRelations')\n .factory('relBudgetSvc', ['$http', 'appUrls', '$q', 'authService', 'dataCache', relBudgetSvc]);\nfunction relBudgetSvc($http, appUrls, $q, authService, dataCache) {\n const cache = {}; //Budget info by relationId\n\n const retrieveBudget = (relationId, invoiceStreamId = null) => {\n return $http\n .get(`${appUrls.api}/api/budget/relationKpi/${relationId}`, { params: { invoiceStreamId } })\n .then(\n function({ data }) {\n return mapBudgetKpi(data);\n },\n function(error) {\n console.error(error);\n return null;\n },\n );\n };\n const reload = relationId => {\n if (!relationId) return $q.when(null);\n if (!dataCache.getArray('budgetsEnabled')) return $q.when(null);\n if (!cache[relationId]) cache[relationId] = { data: null };\n return retrieveBudget(relationId).then(data => {\n cache[relationId].data = data;\n return cache[relationId];\n });\n };\n\n const getBudgetInfo = (relationId, forceRefresh = false) => {\n if (!relationId) return $q.when(null);\n if (!forceRefresh && typeof cache[relationId] !== 'undefined')\n return $q.when(cache[relationId]);\n\n return reload(relationId);\n };\n\n const clearCache = () => {\n for (var key in cache) if (cache.hasOwnProperty(key)) delete cache[key];\n };\n\n authService.addOnLogOut(function() {\n clearCache();\n });\n\n return {\n retrieveBudget,\n getBudgetInfo,\n reload,\n showBudgetInfo: relationId => {\n if (!relationId) return false;\n if (typeof cache[relationId] === 'undefined') return true; //Give the control the chance to retrieve data\n if (!cache[relationId]) return false;\n return !!cache[relationId].data;\n },\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cxRelations')\n .factory('relPersistSvc', [\n 'resourceFactorySvc',\n '$q',\n '$filter',\n 'flySvc',\n 'relBindSvc',\n 'dataCache',\n 'recentRelationsSvc',\n '$http',\n 'appUrls',\n 'dialogsSvc',\n 'relBudgetSvc',\n relPersistSvc,\n ]);\n\nfunction relPersistSvc(\n resourceFactory,\n $q,\n $filter,\n flySvc,\n relBindSvc,\n dataCache,\n recentRelationsSvc,\n $http,\n appUrls,\n dialogsSvc,\n relBudgetSvc,\n) {\n // This service always saves a list of fields !\n // get the resourceObject\n var resource = resourceFactory.get('relation');\n var fieldReqResource = resourceFactory.get('fieldRequired');\n\n var recalcFiscalYearDeadlines = function(relationId) {\n const recalcDeadlinesParams = {\n relationId,\n onlyBasedOnFiscalYears: true,\n recalcSubtasks: true,\n };\n return $http\n .post(`${appUrls.tasks}/api/plannedTasks/RecalculateDeadlinesCount`, recalcDeadlinesParams)\n .then(({ data }) => {\n if (!data) return;\n return dialogsSvc\n .showYesNo('msgRecalcDeadlinesTitle', 'msgRecalcDeadlinesMessage', { count: data })\n .then(\n function() {\n return $http\n .post(\n `${appUrls.tasks}/api/plannedTasks/RecalculateDeadlines`,\n recalcDeadlinesParams,\n )\n .then(\n ({ data }) => {\n if (data && data.id) {\n flySvc.action('msgJobStarted', undefined, 'jobs.detail', undefined, {\n jobId: data.id,\n });\n }\n },\n error => {\n flySvc.error(error);\n },\n );\n },\n function() {\n //Don't recalc\n return undefined;\n },\n );\n });\n };\n\n var update = function(id, fieldToSave) {\n // convert dateObjects to strings\n //var fieldToSave = typeConversionSvc.toDb(field);\n if (fieldToSave.definition.type === 3 && fieldToSave.value) {\n //fieldToSave.value = fieldToSave.value.toUTCString();\n var dateToSave =\n fieldToSave.value.getFullYear() +\n '/' +\n (fieldToSave.value.getMonth() + 1) +\n '/' +\n fieldToSave.value.getDate();\n fieldToSave.value = dateToSave;\n }\n // update\n return resource.update(\n {\n id: id,\n },\n fieldToSave,\n function(response) {\n //var prevCompl = relBindSvc.relations[id].completeness;\n //relBindSvc.relations[id].completeness = response.completeness; //This is een object with an array \"missingFields\" and a number \"percentage\".\n\n if (response.relationsUsingAccountingNr && response.relationsUsingAccountingNr.length > 0) {\n var relations = response.relationsUsingAccountingNr.join(', ');\n flySvc.warning('msgRelationsWithSameAccountingNr', {\n p0: relations,\n });\n return;\n }\n\n if (response.relationsUsingCustomerCode && response.relationsUsingCustomerCode.length > 0) {\n var relations = response.relationsUsingCustomerCode.join(', ');\n flySvc.warning('msgRelationsSameCustomerCode', {\n p0: relations,\n });\n return;\n }\n\n flySvc.success('msgConfirmChange');\n\n // For fields where 2way binding is not working\n // var rel = relBindSvc.relations[id];\n // rel[fieldToSave.definition.id].value = fieldToSave.value;\n\n // update the relation with changes and billingErrors\n relBindSvc.updateRelation(id, response.changes, response.billingErrors, response.name);\n\n if (response.canUpdateInvoiceDiscounts) {\n flySvc.action(\n null,\n 'msgApplyDiscountsToInvoices',\n function() {\n resourceFactory.get('draftInvoice').recalculateDiscounts(\n {\n id: id,\n },\n function(result) {\n flySvc.message('msgXDraftInvoicesChanged', {\n p0: result.result,\n });\n },\n function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n },\n );\n },\n 'btnApply',\n );\n }\n if (response.fiscalYearsUpdated) {\n return recalcFiscalYearDeadlines(id);\n }\n if (typeof response?.changes?.companyId === 'string') {\n //CompanyId changed\n relBudgetSvc.reload(id);\n }\n },\n function(error) {\n flySvc.error(error.data.code, error.data.parameters, fieldToSave.definition.id);\n },\n ).$promise;\n };\n\n var save = function(fields) {\n // var fieldsToSave = typeConversionSvc.toDb(fields);\n var deferred = $q.defer();\n resource.save(\n {},\n fields,\n function(response) {\n deferred.resolve(response);\n },\n function(error) {\n flySvc.error(error);\n deferred.reject(error);\n },\n );\n return deferred.promise;\n };\n\n var remove = function(relId, name) {\n var deferred = $q.defer();\n resource.delete(\n {\n id: relId,\n },\n function(success) {\n var doRemove = true;\n var delFunc = function() {\n if (doRemove) {\n // in both cases: close relation file (if open) (= delete from relBindSvc)\n relBindSvc.close(relId);\n\n recentRelationsSvc.reloadRecentRelations();\n deferred.resolve();\n } else {\n deferred.reject();\n }\n };\n\n // Delete returns a boolean (that is put in success.result by tranform) to indicate if rel is set inactive instead of deleted\n if (success.result) {\n flySvc.proposal(\n 'msgInactive_name',\n 'Because of linked invoices/registrations.',\n function() {\n resource.undelete({\n id: relId,\n });\n doRemove = false;\n },\n 'Undo/Make active',\n null,\n {\n name: name,\n },\n );\n delFunc();\n } else {\n flySvc.success('msgRemoved_name', {\n name: name,\n });\n delFunc();\n }\n },\n function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n deferred.reject(error);\n },\n );\n\n return deferred.promise;\n };\n\n var getRequiredFields = function(type, crm, countryCode) {\n return fieldReqResource.query({\n type: type,\n crm: crm,\n country: countryCode,\n }).$promise;\n };\n var getWizardFields = function(type, crm, countryCode) {\n return fieldReqResource.wizard({\n type: type,\n crm: crm,\n country: countryCode,\n }).$promise;\n };\n var getSimilar = function(name, name2) {\n return resource.similar({\n id: name,\n id2: name2,\n }).$promise;\n };\n return {\n save: save,\n update: update,\n remove: remove,\n getRequiredFields: getRequiredFields,\n getSimilar: getSimilar,\n getWizardFields: getWizardFields,\n recalcFiscalYearDeadlines,\n };\n}\n","import angular from 'angular';\n\nangular.module('cloudX').factory('typeConversionSvc', function() {\n // field.value = new Date(field.value)\n function fromDb(listOfFields) {\n angular.forEach(listOfFields, function(field) {\n if (field.value) {\n switch (field.type) {\n //case 0: // boolean\n // if (field.value === null | field.value === undefined) break;\n // field.value = (field.value ? 1 : 0); break;\n case 3: // date\n if (field.value) field.value = new Date(field.value);\n break;\n case 4: // time\n // No conversion for now. Time = string\n // if (field.value) field.value = new Date(field.value);\n case 14: // linkList\n for (var t = 0; t < field.value.length; t++) {\n if (field.value[t].fields) {\n for (var t2 = 0; t2 < field.value[t].fields.length; t2++) {\n if (field.value[t].fields[t2].type === 3) {\n field.value[t].fields[t2].value = new Date(\n field.value[t].fields[t2].value,\n );\n }\n }\n }\n }\n break;\n default:\n break;\n }\n }\n });\n return listOfFields;\n }\n\n /* Boolean = 0,\n Integer = 1,\n Decimal = 2,\n Date = 3,\n Time = 4,\n StringShort = 5,\n StringMedium = 6,\n StringLong = 7,\n Text = 8,\n Address = 9,\n Currency = 10,\n LegalForm = 11,\n Addresses = 12,\n Communication = 13,\n Links = 14,\n Language = 15\n */\n\n // field.value = field.value.toISOString();\n // + field is put in an array (for sending to backend)\n function toDb(field) {\n var fieldToSave = field;\n if (field.value) {\n switch (field.type) {\n case 3: // date\n // We need to make a copy of the field, because if we don't the value that is displayed is also changed\n fieldToSave = angular.copy(field);\n if (fieldToSave.value instanceof Date)\n fieldToSave.value = fieldToSave.value.toISOString();\n break;\n case 4: // date (time)\n // No conversion for now. Time = string\n //fieldToSave = angular.copy(field);\n //if (fieldToSave.value instanceof Date) fieldToSave.value = fieldToSave.value.toISOString();\n //break;\n case 14: // linkList\n for (var t = 0; t < field.value.length; t++) {\n if (field.value[t].fields) {\n for (var t2 = 0; t2 < field.value[t].fields.length; t2++) {\n if (field.value[t].fields[t2].type === 3) {\n field.value[t].fields[t2].value = field.value[t].fields[\n t2\n ].value.toISOString();\n }\n }\n }\n }\n break;\n default:\n break;\n }\n }\n return fieldToSave;\n }\n\n return {\n fromDb: fromDb,\n toDb: toDb,\n };\n});\n","import angular from 'angular';\nimport eventBus from 'pubsub-js';\nimport RecentRelationsService, { filterRelations } from '@/shared/services/RecentRelationsService';\n\nangular\n .module('cloudX')\n .factory('recentRelationsSvc', ['flySvc', '$q', '$http', 'appUrls', recentRelationsSvc]);\n\nfunction recentRelationsSvc(flySvc, $q, $http, appUrls) {\n let recentRelations = [];\n function showError(error) {\n flySvc.error(error.data.code, error.data.parameters);\n }\n\n function reloadRecentRelations() {\n return $http.get(`${appUrls.api}/api/relation/recent`).then(\n ({ data }) => {\n recentRelations = data;\n RecentRelationsService.set(recentRelations);\n return data;\n },\n error => {\n showError(error);\n return null;\n },\n );\n }\n\n // used to trigger recent relations from react-components\n var reloadRecentRelationsSubscription = function(msg, data) {\n reloadRecentRelations();\n };\n\n eventBus.subscribe('reloadRecentRelations', reloadRecentRelationsSubscription);\n\n return {\n reloadRecentRelations: reloadRecentRelations,\n get: function() {\n return recentRelations;\n },\n getFiltered: searchOptions => filterRelations(recentRelations, searchOptions),\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cloudX')\n .controller('CompanyCtrl', [\n '$scope',\n '$q',\n 'Blob',\n 'dataCache',\n 'resourceFactorySvc',\n 'flySvc',\n '$http',\n 'optionsSvc',\n '$timeout',\n 'checkSecurity',\n 'checkTenantConfiguration',\n 'ModalService',\n '$stateParams',\n compCtrl,\n ]);\n\nfunction compCtrl(\n $scope,\n $q,\n Blob,\n dataCache,\n resourceFactorySvc,\n flySvc,\n $http,\n optionsSvc,\n $timeout,\n checkSecurity,\n checkTenantConfiguration,\n ModalService,\n $stateParams,\n) {\n var vm = this;\n var resource = resourceFactorySvc.get('company');\n vm.errors = {};\n\n $scope.companies = [];\n $scope.activeCompany = null;\n $scope.ownCompanyRelations = [];\n\n resourceFactorySvc.get('relation').names({ crmTypes: [4] }, function(data) {\n $scope.ownCompanyRelations = data;\n });\n resource.getAll(null, function(data) {\n $scope.companies = data;\n $scope.activeCompany =\n ($stateParams.companyId\n ? $scope.companies.find(x => x.id === $stateParams.companyId)\n : null) || $scope.companies[0];\n\n $scope.notVatLiable = $scope.activeCompany.vatNumber === '';\n $scope.oldValue = $scope.activeCompany.vatNumber;\n\n if (\n !$scope.activeCompany.enterpriseNumber &&\n checkSecurity('CompanyOwn:u') &&\n checkTenantConfiguration('[0,1]')\n ) {\n flySvc.proposal(\n '',\n 'msgCompanyFillInEnterpriseNrCBE',\n function() {\n $scope.enterpriseNumberForm.$show();\n },\n 'btnEditEnterpriceNr',\n );\n }\n });\n\n vm.profassnumber = [\n {\n id: 0,\n text: 'AIB',\n },\n {\n id: 1,\n text: 'BIBF',\n },\n {\n id: 2,\n text: 'IBA',\n },\n {\n id: null,\n text: 'Other',\n },\n ];\n\n var showError = function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n return '';\n };\n\n // Everthing for vatNumber logic\n $scope.maskOptions = {\n clearOnBlur: false,\n };\n\n $scope.setFocus = function(id) {\n angular.element(document.querySelector('#' + id)).focus();\n };\n\n $scope.setActiveCompany = companyId => {\n if (!companyId) return;\n const company = $scope.companies.find(x => x.id === companyId);\n $scope.activeCompany = company;\n };\n\n $scope.changeFormState = function() {\n if ($scope.notVatLiable) {\n $scope.vatForm.$cancel();\n // we submit here with required = false so that '' would pass the validation!\n $scope.submit('', 'vatNumber', false).then(function() {\n $scope.activeCompany.vatNumber = '';\n $scope.oldValue = '';\n });\n } else {\n $scope.vatForm.$show();\n $timeout(function() {\n $scope.setFocus('vatString');\n }, 50);\n }\n };\n\n $scope.handleKeyUp = function($event) {\n if ($event.keyCode === 27) {\n $scope.vatNumber = $scope.oldValue;\n $scope.notVatLiable = $scope.vatNumber === '';\n $scope.vatForm.$cancel();\n }\n\n if ($event.keyCode === 13) {\n $scope.vatForm.$submit();\n }\n };\n\n $scope.submitVat = function($data) {\n //Validation error\n if (typeof $data === 'undefined') return '';\n if ($scope.notVatLiable) return $scope.submit('', 'vatNumber');\n else {\n // If no value is returned (empty string) we need to save null => Update: vatNumber is required, so we don't save if no value is returned\n // (Convention: null = not filled out, \"\" = not VAT liable)\n // BUT if value is undefined entry is incomplete: warning + return '' for xEditable\n if (typeof $data.vatString === 'undefined') {\n flySvc.message('msgIncompleteEntryInMaskIsNoSave');\n return '';\n }\n if ($data.vatString === '') {\n // If vatNumber is required, making it empty is not allowed\n flySvc.error('msgRequiredField');\n return ''; // return undefined = close input - reject: stays open!\n }\n return $scope.submit($data.vatString, 'vatNumber').then(function() {\n $scope.activeCompany.vatNumber = $data.vatString;\n $scope.oldValue = $data.vatString;\n });\n }\n };\n $scope.saving = false;\n $scope.submit = function($data, field, showSuccess = true) {\n if ($scope.saving) return $q.when('');\n //Validation error\n if (typeof $data === 'undefined') {\n if (vm.errors) {\n for (var error in vm.errors) {\n if (vm.errors.hasOwnProperty(error) && error[0] !== '$') {\n if (vm.errors[error].code) {\n if (vm.errors[error].code === 3000) flySvc.error('msgRequiredField');\n else flySvc.error(vm.errors[error].code, vm.errors[error].parameters, field);\n }\n }\n }\n }\n return $q.when('');\n }\n\n // if new value = old value do nothing\n if (angular.equals($scope.activeCompany[field], $data)) return $q.when(false);\n\n var model = angular.copy($scope.activeCompany);\n model[field] = $data;\n\n $scope.saving = true;\n // put copy to server\n return resource.update(model).$promise.then(\n function(success) {\n $timeout(function() {\n angular.extend($scope.activeCompany, success);\n dataCache.updateCompany($scope.activeCompany);\n }, 100);\n\n if (success.foundInKBO === null || success.foundInKBO === true) {\n if (showSuccess) flySvc.success('msgConfirmChange');\n } else if (checkTenantConfiguration('[0,1]')) {\n flySvc.message('msgCompanyCBENotFound');\n }\n $scope.saving = false;\n return false;\n },\n function(error) {\n $scope.saving = false;\n // error callback return error? (edit remains open)\n flySvc.error(error.data.code, error.data.parameters);\n return '';\n },\n );\n };\n $scope.ownCompanyRelationChanged = id => {\n if (id === $scope.activeCompany.ownCompanyRelation?.id) return false;\n const relation = id ? $scope.ownCompanyRelations.find(x => x.id === id) : null;\n return $scope.submit(relation, 'ownCompanyRelation');\n };\n\n $scope.openBankAccountsDialog = () => {\n ModalService.showModal({\n template: require('./dialogs/companyBankAccountsDialog.html'),\n controller: 'CompanyBankAccountsDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n companyId: $scope.activeCompany.id,\n bankAccounts: $scope.activeCompany.bankAccounts,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n\n modal.close.then(function(result) {\n $timeout(function() {\n $scope.activeCompany.bankAccounts = result;\n }, 100);\n });\n });\n };\n\n $scope.showCreateCompanyModal = function() {\n ModalService.showModal({\n template: require('./dialogs/addCompanyDialog.html'),\n controller: 'AddCompanyDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n\n modal.close.then(function(result) {\n if (!result) return;\n $scope.companies.push(result);\n var dataCacheCompanies = dataCache.getArray('company');\n dataCacheCompanies.push(result);\n flySvc.success('msgConfirmChange');\n // run in timeout to change active tab, dont use angular.extend\n // because it will cause the \"old\" active company to have the new company's property\n $timeout(function() {\n $scope.activeCompany = result;\n }, 100);\n });\n });\n };\n}\n","import angular from 'angular';\nimport DocumentService from '@/shared/services/DocumentService';\n\nangular\n .module('cxSettings')\n .controller('EditMailTemplateSettingsCtrl', [\n '$state',\n '$timeout',\n '$q',\n '$translate',\n 'templateHttpSvc',\n 'flySvc',\n 'dataCache',\n 'dialogsSvc',\n 'ModalService',\n '$http',\n 'appUrls',\n 'template',\n 'companyId',\n 'enumCacheSvc',\n '$filter',\n 'checkSecurity',\n editMailTemplateSettingsCtrl,\n ]);\n\nfunction editMailTemplateSettingsCtrl(\n $state,\n $timeout,\n $q,\n $translate,\n templateHttpSvc,\n flySvc,\n dataCache,\n dialogsSvc,\n ModalService,\n $http,\n appUrls,\n template,\n companyId,\n enumCacheSvc,\n $filter,\n checkSecurity,\n) {\n var vm = this;\n vm.dataCache = dataCache;\n vm.tags = [];\n vm.template = template || {\n autoLinkDocumentTypes: [],\n name: '',\n context: null,\n languages: [],\n companyId: companyId,\n };\n vm.validation = {};\n if (vm.template.autoLinkDocumentTypes && vm.template.autoLinkDocumentTypes.length > 0) {\n vm.template.autoLinkDocumentTypes = vm.template.autoLinkDocumentTypes.map(x => ({\n id: x,\n name: $filter('translateList')(x, 'documentType', x),\n }));\n } else {\n vm.template.autoLinkDocumentTypes = [];\n }\n\n var retrieveDocumentTags = function() {\n $http\n .get(appUrls.documents + '/api/tag')\n .success(function(result) {\n vm.tags = result;\n })\n .error(function(error) {\n showError(error);\n });\n };\n\n if (checkSecurity('Settings:u')) {\n retrieveDocumentTags();\n }\n\n vm.filterTags = function(search) {\n return $filter('filter')(vm.tags, search);\n };\n\n vm.selectableDocumentTypes = [];\n\n enumCacheSvc.get('documentType').then(function(data) {\n const unselectableDocumentTypes = [0, 1, 3, 4, 6, 7, 8, 9, 13, 14, 15, 18, 19, 23, -1, 1000];\n vm.selectableDocumentTypes = data\n .filter(x => !unselectableDocumentTypes.some(y => y === x.key))\n .map(x => ({\n id: x.key,\n name: $filter('translateList')(x.key, 'documentType', x.value),\n }));\n\n vm.selectableDocumentTypes = $filter('orderBy')(vm.selectableDocumentTypes, 'name');\n });\n\n vm.updateValue = () => {};\n\n vm.loadSelectableDocumentTypes = function(search) {\n if (vm.selectableDocumentTypes !== null) {\n return $filter('filter')(vm.selectableDocumentTypes, search);\n }\n };\n\n var retrieveAttachmentsForLanguage = function(lang) {\n return $http\n .get(appUrls.documents + '/api/documents/links/' + lang.id + '/4')\n .success(function(result) {\n vm.attachments[lang.id] = [...(vm.attachments[lang.id] || []), ...result];\n return result;\n })\n .error(function(error) {\n showError(error);\n return null;\n });\n };\n vm.template.languages\n .filter(x => !!x.id)\n .forEach(lang => {\n if (checkSecurity('Settings:u')) {\n retrieveAttachmentsForLanguage(lang);\n }\n });\n vm.templateContextChanged = function() {\n vm.taskParameterPlaceholders = [];\n if (vm.template.context === 11 && checkSecurity('Settings:u')) {\n $http.get(`${appUrls.tasks}/api/taskparameters/placeholders`).then(\n function({ data }) {\n vm.taskParameterPlaceholders = data;\n },\n function(error) {\n console.error(error);\n },\n );\n }\n };\n\n if (vm.template.context) {\n // retrieve task placeholders if needed\n vm.templateContextChanged();\n }\n\n vm.taskParameterPlaceholders = [];\n\n vm.translation = {};\n vm.collapsed = [];\n vm.languages = dataCache.getArray('language');\n vm.companies = dataCache.getArray('company');\n\n vm.saving = false;\n vm.placeholders = {};\n templateHttpSvc.getPlaceholders().then(function(data) {\n vm.placeholders = data;\n });\n\n var showError = function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n };\n\n vm.toggleOpen = function(lang) {\n vm.collapsed[lang.languageCode] = !vm.collapsed[lang.languageCode];\n };\n\n vm.gotoList = function() {\n if (vm.form && vm.form.$dirty) {\n vm.form.$rollbackViewValue();\n vm.form.$setPristine();\n }\n $state.go('settings.templates.list', {\n companyId: companyId,\n });\n };\n vm.isValid = function() {\n if (!vm.template || !vm.form.$valid) return false;\n // for (var i = 0; i < vm.template.languages.length; i++) {\n // var lang = vm.template.languages[i];\n // if (!vm.templateForm['lang_' + lang.languageCode].$valid) return false;\n // }\n\n if (vm.template.context === 15 && !vm.template.companyId) return false;\n\n return true;\n };\n var sortLanguages = function() {\n if (!vm.template || !vm.template.languages) return;\n var currentLang = $translate.use().split('-')[0];\n vm.template.languages.sort(function(a, b) {\n if (a.languageCode === currentLang) return -1;\n if (b.languageCode === currentLang) return 1;\n if (a.languageCode < b.languageCode) return -1;\n if (a.languageCode > b.languageCode) return 1;\n return 0;\n });\n };\n sortLanguages();\n\n vm.removeLanguage = function(lang) {\n var idx = vm.template.languages.indexOf(lang);\n if (idx < 0) return;\n dialogsSvc.showYesNo('comfirmDeleteTitle', 'comfirmDeleteTranslation').then(function() {\n if (vm.template.id && !lang.isNew)\n templateHttpSvc.removeLanguage(vm.template.id, lang.languageCode).then(function() {\n vm.template.languages.splice(idx, 1);\n });\n else vm.template.languages.splice(idx, 1);\n });\n };\n\n var saveLanguages = function() {\n if (!vm.template.id) return $q.reject();\n return $q.all(\n vm.template.languages\n // .filter(function(lang) {\n // return vm.form['lang_' + lang.languageCode].$dirty;\n // })\n .map(function(lang) {\n return !lang.isNew\n ? templateHttpSvc.updateLanguage(vm.template.id, lang)\n : templateHttpSvc.createLanguage(vm.template.id, lang);\n }),\n );\n };\n\n let mapValidationError = x => {\n let message = $filter('translateList')(x.type, 'templatevalidationwarningtype', x.type, x.parameters);\n if (!!x.taskName) {\n if (!!x.subTaskName) {\n return $translate.instant('TaskTemplate') + ' ' + x.taskName + '/' + x.subTaskName + ' ' + message\n }\n return $translate.instant('TaskTemplate') + ' ' + x.taskName + ' ' + message\n }\n return message\n }\n\n var validateLanguages = function() {\n if (!vm.template.id) return $q.reject();\n return $q.all(\n vm.template.languages.map(lang =>\n templateHttpSvc.validateLanguage(vm.template.id, lang).then(\n data => {\n if (!data || data.length === 0) {\n delete vm.validation[lang.languageCode];\n } else {\n vm.validation[lang.languageCode] = data\n .map(x => mapValidationError(x))\n .join('\\n')\n }\n },\n error => {\n flySvc.error(error);\n },\n ),\n ),\n );\n };\n\n var saveTranslations = function() {\n if (!vm.translation || !vm.translation.save) return $q.when();\n return vm.translation.save(vm.template.id);\n };\n\n vm.validate = (saveFirst = false) => {\n $timeout(function() {\n vm.validating = true;\n if (saveFirst) {\n return vm\n .save(false, false)\n .then(() => {\n return validateLanguages().then(x => {\n if (Object.keys(vm.validation).length) {\n flySvc.error('msgSomeLanguagesContainValidationErrors');\n } else {\n flySvc.success();\n }\n });\n })\n .finally(() => {\n vm.validating = false;\n });\n }\n\n if (vm.template.id) {\n validateLanguages()\n .then(x => {\n if (Object.keys(vm.validation).length) {\n flySvc.error('msgSomeLanguagesContainValidationErrors');\n } else {\n flySvc.success();\n }\n })\n .finally(() => {\n vm.validating = false;\n });\n }\n }, 0);\n };\n\n vm.save = function(navigateAway = true, showSuccess = true) {\n var deferred = $q.defer();\n\n $timeout(function() {\n if (!vm.isValid() || vm.saving) return deferred.reject();\n if (vm.translation && !vm.translation.isValid(true)) return deferred.reject();\n vm.saving = true;\n if (vm.template.id) {\n $q.all([saveLanguages(), saveTranslations()])\n .then(function() {\n // if (vm.form.template.$dirty) {\n const model = {\n ...vm.template,\n documentTags: vm.template.documentTags ? vm.template.documentTags.map(x => x.id) : [],\n autoLinkDocumentTypes: vm.template.autoLinkDocumentTypes\n ? vm.template.autoLinkDocumentTypes.map(x => x.id)\n : [],\n };\n return templateHttpSvc.updateTemplate(model);\n //}\n return $q.resolve();\n })\n .then(\n function() {\n vm.saving = false;\n deferred.resolve();\n if (showSuccess) flySvc.success();\n if (navigateAway) vm.gotoList();\n },\n function(errors) {\n flySvc.error(errors);\n //todo: check error response\n\n deferred.reject();\n vm.saving = false;\n },\n );\n } else {\n const model = {\n ...vm.template,\n documentTags: vm.template.documentTags ? vm.template.documentTags.map(x => x.id) : [],\n autoLinkDocumentTypes: vm.template.autoLinkDocumentTypes\n ? vm.template.autoLinkDocumentTypes.map(x => x.id)\n : [],\n };\n templateHttpSvc.createTemplate(vm.template.companyId, model).then(\n function(template) {\n vm.template.id = template.id;\n $q.all([saveLanguages(), saveTranslations()]).then(\n function() {\n vm.template.languages.forEach(x => (x.isNew = false));\n template.languages = vm.template.languages;\n vm.saving = false;\n deferred.resolve();\n if (showSuccess) flySvc.success();\n if (navigateAway) vm.gotoList();\n },\n function(errors) {\n //todo: check error response\n deferred.reject();\n vm.saving = false;\n },\n );\n },\n function(error) {\n deferred.reject();\n showError(error);\n vm.saving = false;\n },\n );\n }\n }, 0);\n\n return deferred.promise;\n };\n vm.addLanguage = function(langCode) {\n if (!langCode) return;\n vm.template.languages.push({\n languageCode: langCode,\n content: '',\n title: '',\n isNew: true,\n });\n sortLanguages();\n };\n\n vm.filterLanguages = function(lang) {\n if (vm.template == null) return true;\n for (var i = 0; i < vm.template.languages.length; i++)\n if (vm.template.languages[i].languageCode === lang.code) return false;\n return true;\n };\n\n vm.showPlaceholders = function() {\n if (!vm.template.context && vm.template.context !== 0) return;\n if (!vm.placeholders[vm.template.context]) return;\n\n ModalService.showModal({\n template: require('./dialogs/placeholderDialog.html'),\n controller: 'PlaceholderDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n placeholders: vm.placeholders[vm.template.context],\n taskParameterPlaceholders: vm.taskParameterPlaceholders,\n context: 'email',\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n });\n };\n vm.updateName = function(value) {\n vm.template.name = value;\n };\n\n vm.attachments = {};\n\n vm.downloadAttachment = function(attachment) {\n DocumentService.download(attachment.id);\n };\n vm.uploadAttachment = function(files, lang) {\n if (!files || files.length < 1 || !lang || !lang.id) return;\n\n var formData = new FormData();\n formData.append('documentType', 7);\n formData.append('documentLinkType', 4);\n formData.append('linkId', lang.id);\n files.forEach(file => formData.append('data', file.data));\n\n $http({\n method: 'POST',\n url: appUrls.documents + '/api/documents/',\n headers: {\n 'Content-Type': undefined,\n },\n data: formData,\n })\n .success(function(result) {\n if (result && result.length > 0) {\n result.forEach(function(file) {\n vm.attachments[lang.id] = [...(vm.attachments[lang.id] || []), file];\n });\n }\n })\n .error(function(error) {\n flySvc.error(error.code, error.parameters, null, error.type);\n return '';\n });\n };\n vm.deleteAttachment = function(attachment, lang) {\n dialogsSvc.showYesNo('comfirmDeleteTitle', 'confirmDeleteAttachment').then(function() {\n $http\n .delete(\n `${appUrls.documents}/api/Documents/Links/${attachment.id}/${lang.id}/4?deletedocument=false`,\n )\n .success(function(result) {\n var index = vm.attachments[lang.id].indexOf(attachment);\n if (index >= 0) {\n vm.attachments[lang.id].splice(index, 1);\n }\n })\n .error(function(error) {\n flySvc.error(error.code, error.parameters);\n return '';\n });\n });\n };\n}\n","import angular from 'angular';\nimport SignalRService from '@/shared/services/SignalRService';\nimport DocumentService from '@/shared/services/DocumentService';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport moment from 'moment';\n\nangular\n .module('cxSettings')\n .controller('GeneralSettingsCtrl', [\n '$scope',\n '$http',\n 'flySvc',\n 'optionsSvc',\n 'dataCache',\n 'templateHttpSvc',\n 'resourceFactorySvc',\n 'appUrls',\n '$translate',\n '$rootScope',\n '$timeout',\n '$window',\n 'companyId',\n 'resourceNameFilter',\n 'dialogsSvc',\n 'environment',\n '$filter',\n 'ModalService',\n 'translateListFilter',\n 'settingsDialogsSvc',\n '$location',\n '$anchorScroll',\n 'enumCacheSvc',\n 'checkSecurity',\n generalSettingsCtrl,\n ]);\n\nfunction generalSettingsCtrl(\n $scope,\n $http,\n flySvc,\n optionsSvc,\n dataCache,\n templateHttpSvc,\n resourceFactorySvc,\n appUrls,\n $translate,\n $rootScope,\n $timeout,\n $window,\n companyId,\n resourceNameFilter,\n dialogsSvc,\n environment,\n $filter,\n ModalService,\n translateListFilter,\n settingsDialogsSvc,\n $location,\n $anchorScroll,\n enumCacheSvc,\n checkSecurity,\n) {\n $scope.exampleLanguage = $translate.use();\n $scope.templates = [];\n $scope.resources = [];\n $scope.connectWebUrl = `${appUrls.connect}`;\n $scope.companies = [];\n $scope.documentSettings = {};\n $scope.selectedCompany = {};\n $scope.ownCompanyRelations = [];\n $scope.employeeProfiles = [];\n $scope.absenceRelation = null;\n $scope.environment = (environment || '').toLowerCase();\n $scope.isProduction = $scope.environment === 'production';\n $scope.savingComplianceSettings = false;\n $scope.hideLedgerSetting = false;\n $scope.minimumDateOptions = {\n minDate: new Date(1900, 0, 1),\n maxDate: new Date(),\n initDate: new Date(),\n startingDay: 1,\n };\n const hideSettingsIfNeeded = () => {\n let createdOn = dataCache.getArray('createdOn');\n\n if (createdOn) {\n var releaseDate = moment('08-11-2021', 'DD-MM-YYYY');\n if (moment.utc(createdOn).isAfter(releaseDate)) {\n $scope.hideLedgerSetting = true;\n }\n }\n };\n hideSettingsIfNeeded();\n\n const retrieveCompanies = () => {\n dataCache.ready().then(function() {\n $scope.companies = dataCache.getArray('company');\n if (companyId) {\n $scope.selectedCompany = $scope.companies.find(x => x.id == companyId); // select company based on passed CompanyId\n } else {\n $scope.selectedCompany = $scope.companies[0];\n }\n\n $scope.companyChanged($scope.selectedCompany, true);\n });\n };\n retrieveCompanies();\n\n const setAbsenceRelation = relationId => {\n if (!relationId) {\n $scope.absenceRelation = null;\n return;\n }\n\n resourceFactorySvc.get('relation').ids([relationId], function(data) {\n if (data?.length > 0) {\n $scope.absenceRelation = data[0];\n } else {\n $scope.absenceRelation = null;\n }\n });\n };\n\n $scope.companyChanged = (company, initialLoad = false) => {\n if (!company) return;\n $scope.settings = null;\n $scope.loading = true;\n $scope.selectedCompany = $scope.companies.find(x => x.id == company.id);\n $scope.connectWebUrl = `${appUrls.connect}?companyId=${$scope.selectedCompany.id}`;\n\n if (checkSecurity('Settings:r')) {\n resourceFactorySvc\n .get('settings')\n .company({ id: company.id })\n .$promise.then(\n function(result) {\n $scope.settings = result;\n result.complianceSettings = result.complianceSettings\n .map(x => {\n return {\n ...x,\n label: $filter('translateList')(\n x.complianceType,\n 'complianceType',\n x.complianceType,\n ),\n };\n })\n .sort(dynamicSort('label'));\n const half = Math.ceil((result.complianceSettings || []).length / 2);\n $scope.complianceSettingsCol1 = result.complianceSettings\n ? result.complianceSettings.slice(0, half)\n : [];\n $scope.complianceSettingsCol2 = result.complianceSettings\n ? result.complianceSettings.slice(half)\n : [];\n\n $scope.attachResources();\n\n if (initialLoad) {\n const hash = $location.hash();\n if (hash) {\n $timeout(() => {\n $anchorScroll(hash);\n }, 100);\n }\n }\n },\n function(error) {\n flySvc.error(error.data.code);\n $scope.settings = {};\n },\n );\n }\n\n if (checkSecurity(['Settings:r', 'Users:u'])) {\n resourceFactorySvc\n .get('settings')\n .hrm({ id: company.id })\n .$promise.then(\n function(result) {\n $scope.hrmSettings = result;\n setAbsenceRelation(result.absenceRelationId);\n },\n function(error) {\n flySvc.error(error);\n },\n );\n }\n\n $scope.loading = false;\n };\n\n const companyUpdatedHandler = company => {\n if (!$scope.settings || $scope.settings.companyId != company.companyId) return;\n $timeout(function() {\n $scope.settings = { ...$scope.settings, ...company };\n }, 100);\n };\n SignalRService.subscribe('companyUpdated', companyUpdatedHandler);\n\n $scope.$on('$destroy', function() {\n SignalRService.unsubscribe('companyUpdated', companyUpdatedHandler);\n });\n\n if (checkSecurity('Settings:r')) {\n $http.get(appUrls.documents + '/api/settings/').then(({ data }) => {\n $scope.documentSettings = data;\n });\n\n templateHttpSvc.getTemplates().then(function(data) {\n // add ability to select \"none\" for payment registration template context\n $scope.templates = [\n ...data,\n {\n context: 8,\n name: $translate.instant('None'),\n id: null,\n },\n {\n context: 2,\n name: $translate.instant('None'),\n id: null,\n },\n ];\n });\n\n resourceFactorySvc.get('resource').reg(\n {\n type: 0,\n },\n function(data) {\n $scope.resources = data.map(x => ({\n ...x,\n code: x.code || '',\n name: resourceNameFilter(x),\n }));\n $scope.attachResources();\n },\n );\n }\n\n $scope.VATPercentages = optionsSvc.getOptions('vatPercentage');\n\n $scope.attachResources = function() {\n if (!$scope.settings || !$scope.resources) return;\n $scope.settings.defaultTaskResource = $scope.settings.defaultTaskResourceId\n ? $scope.resources.find(function(r) {\n return r.id === $scope.settings.defaultTaskResourceId;\n })\n : null;\n };\n\n $scope.openConnect = function() {\n $window.open($scope.connectWebUrl, '_blank');\n };\n\n $scope.openRecognitionOptions = function() {\n ModalService.showModal({\n template: require('./dialogs/recognitionOptionsDialog.html'),\n controller: 'RecognitionOptionsDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n magicMailAllowedRecognitionSenders:\n $scope.documentSettings.magicMailAllowedRecognitionSenders,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n\n modal.close.then(function(result) {\n if (result === null) return;\n $scope.submitDocSettings(result, 'magicMailAllowedRecognitionSenders');\n });\n });\n };\n\n $scope.openCreateEmailDomain = function() {\n if (!$scope.selectedCompany.email) {\n flySvc.error('msgCompanyEmailRequiredBeforeVerification');\n return;\n }\n\n ModalService.showModal({\n template: require('./dialogs/addEmailDomainDialog.html'),\n controller: 'AddEmailDomainDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n suggestedEmailDomain: $scope.settings.suggestedEmailDomain,\n companyId: $scope.settings.companyId,\n companyEmail: $scope.selectedCompany.email,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n\n modal.close.then(function(result) {\n if (!result) return;\n const model = {\n ...$scope.settings,\n emailDomain: result,\n };\n\n angular.extend($scope.settings, model);\n flySvc.success('msgEmailDomainAddedVerificationPending', { domain: result.domain });\n $scope.openCnameInfoDialog();\n });\n });\n };\n\n $scope.openDeleteEmailDomain = function() {\n if (!$scope.settings || !$scope.settings.companyId) return;\n\n dialogsSvc.showYesNo('comfirmDeleteTitle', 'confirmDeleteEmailDomain').then(function() {\n $http\n .delete(appUrls.api + '/api/settings/DeleteEmailDomain?id=' + $scope.settings.companyId)\n .success(function(result) {\n const model = {\n ...$scope.settings,\n emailUseCustomFrom: false,\n emailDomain: undefined,\n };\n\n angular.extend($scope.settings, model);\n flySvc.success();\n })\n .error(function(error) {\n flySvc.error(error);\n return '';\n });\n });\n };\n\n $scope.verifyEmailDomain = function() {\n if (!$scope.settings || !$scope.settings.companyId) return;\n $scope.verifying = true;\n\n $http({\n method: 'get',\n url: appUrls.api + '/api/settings/VerifyEmailDomain?id=' + $scope.settings.companyId,\n })\n .success(function(result) {\n const model = {\n ...$scope.settings,\n emailUseCustomFrom: result.status === 1,\n emailDomain: result,\n };\n\n angular.extend($scope.settings, model);\n if (result.status === 0) {\n // verification failed\n flySvc.error('msgEmailDomainVerificationFailed', {\n domain: result.domain,\n });\n } else if (result.status === 1) {\n // verification succeeded\n flySvc.success('msgEmailDomainVerificationSucceeded', {\n domain: result.domain,\n });\n }\n })\n .error(function(error) {\n flySvc.error(error);\n })\n .finally(function() {\n $scope.verifying = false;\n });\n };\n\n $scope.openCnameInfoDialog = function() {\n if (!$scope.settings || !$scope.settings.emailDomain) return;\n ModalService.showModal({\n template: require('./dialogs/emailDomainCnameInfoDialog.html'),\n controller: 'EmailDomainCnameInfoDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n emailDomain: $scope.settings.emailDomain,\n companyId: $scope.settings.companyId,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n\n modal.close.then(function(result) {\n if (!result) return;\n const model = {\n ...$scope.settings,\n emailUseCustomFrom: result.status === 1,\n emailDomain: result,\n };\n\n angular.extend($scope.settings, model);\n });\n });\n };\n\n var updateCompany = (model, showSuccess, customFromEnabled) => {\n return resourceFactorySvc\n .get('settings')\n .saveCompany(model)\n .$promise.then(\n function(result) {\n if (result) {\n $scope.settings = result;\n var dataCacheCompany = dataCache.getCompanySettings(result.companyId);\n if (dataCacheCompany) {\n const model = {\n ...result,\n sendInvoiceTemplateId: result.templateSendInvoice // settings object has entire template object iso only id\n ? result.templateSendInvoice.id\n : null,\n };\n angular.extend(dataCacheCompany, model);\n }\n //Propagate settings to all companies\n const {\n defaultTaskResourceId,\n taskTimeRegistrationMethod,\n sendInvoiceUseMailEditor,\n forceLinkingDocumentsToRelation,\n registrationMinimumDate,\n absenceMinimumDate,\n } = result;\n dataCache.updateAllCompanies({\n defaultTaskResourceId,\n taskTimeRegistrationMethod,\n sendInvoiceUseMailEditor,\n forceLinkingDocumentsToRelation,\n registrationMinimumDate,\n absenceMinimumDate,\n });\n $scope.attachResources();\n }\n if (customFromEnabled && (!result.emailDomain || result.emailDomain.status !== 1)) {\n flySvc.info('msgEmailDomainVerificationRequired', {\n companyEmail: $scope.selectedCompany.email,\n });\n return false;\n }\n if (showSuccess) {\n flySvc.success('msgChangesSavedForName', { name: $scope.selectedCompany.name });\n }\n return false;\n },\n error => flySvc.error(error),\n );\n };\n\n $scope.submitHrmSettings = function(value, field, showSuccess = true) {\n if ($scope.hrmSettings[field] === value) return false;\n if (typeof value === 'undefined' && field != 'absenceRelationId') return ''; // Validation error\n\n var model = angular.copy($scope.hrmSettings);\n model[field] = value;\n\n return resourceFactorySvc\n .get('settings')\n .saveHrm({ id: $scope.selectedCompany.id }, model)\n .$promise.then(\n function(result) {\n $scope.hrmSettings = model;\n flySvc.success('msgChangesSavedForName', { name: $scope.selectedCompany.name });\n return false;\n },\n error => flySvc.error(error),\n );\n };\n\n $scope.submit = function(value, field, showSuccess = true) {\n if ($scope.settings[field] === value) return false;\n if (typeof value === 'undefined' && field != 'absenceRelationId') return ''; // Validation error\n\n var model = angular.copy($scope.settings);\n model[field] = value;\n\n if (field === 'defaultTaskResource') {\n model.defaultTaskResourceId = value ? value.id : null;\n delete model.resource;\n }\n\n if (field === 'fixedAmountLedgerAccount' || field === 'advanceSettlementLedgerAccount') {\n return dialogsSvc\n .showYesNoCancel(\n 'msgConfirmPropogateChangesTitle',\n 'msgPropagateLedgerAccountChangesToExistingSchedule',\n )\n .then(\n function(result) {\n if (result === null) return false; // Cancel changes\n\n if (result) {\n model.propagateLedgerChanges = true;\n } else {\n model.propagateLedgerChanges = false;\n }\n\n return updateCompany(model, showSuccess);\n },\n function() {\n return false; // Cancel changes\n },\n );\n } else {\n var customFromEnabled = field === 'emailUseCustomFrom' && value;\n return updateCompany(model, showSuccess, customFromEnabled);\n }\n };\n\n $scope.submitDocSettings = function(value, field, showSuccess = true) {\n if ($scope.documentSettings[field] === value) return false;\n if (typeof value === 'undefined') return ''; // Validation error\n\n var model = angular.copy($scope.documentSettings);\n model[field] = value;\n\n return $http.put(appUrls.documents + '/api/settings/', model).then(\n ({ data }) => {\n if (data) {\n $scope.documentSettings = data;\n }\n if (showSuccess) flySvc.success('msgConfirmChange');\n return false;\n },\n ({ data: { code, parameters } = {} }) => {\n flySvc.error(code, parameters, null, 'documentdomainexceptioncode');\n return '';\n },\n );\n };\n $scope.translateInvoiceText = function() {\n if (!$scope.settings || !$scope.settings.companyId) return;\n dialogsSvc\n .translateListItem(\n 'companyinvoicetext',\n $scope.settings.companyId,\n $scope.settings.invoiceText,\n {\n inputRows: 7,\n defaultRequired: false,\n maxlength: 500,\n },\n )\n .then(function(result) {\n if (result) {\n //This is a special case for the translations.\n //If we use the default as fallback, you can't leave another language empty.\n //It will use the fallback.\n $scope.submit(null, 'invoiceText');\n }\n });\n };\n\n $scope.translateAdminCostText = function() {\n if (!$scope.settings || !$scope.settings.companyId) return;\n dialogsSvc.translateListItem('companyadmincosttext', $scope.settings.companyId, null, {\n inputRows: 1,\n defaultRequired: false,\n maxlength: 500,\n placeholders: {\n //Hardcoded, back-end uses invoicelinetype 8 translations\n nl: 'Administratieve kost',\n fr: 'Coûts administratifs',\n en: 'Administrative cost',\n },\n });\n };\n\n $scope.translateEmailRemark = function() {\n if (!$scope.settings || !$scope.settings.companyId) return;\n dialogsSvc\n .translateListItem(\n 'companyemailremark',\n $scope.settings.companyId,\n $scope.settings.emailRemark,\n {\n inputRows: 7,\n defaultRequired: false,\n maxlength: 500,\n },\n )\n .then(function(result) {\n if (result) {\n //This is a special case for the translations.\n //If we use the default as fallback, you can't leave another language empty.\n //It will use the fallback.\n $scope.submit(null, 'emailRemark');\n }\n });\n };\n\n $scope.updateComplianceSetting = function(setting) {\n if (!setting) return;\n $scope.savingComplianceSettings = true;\n\n return $http.put(appUrls.api + '/api/settings/UpdateComplianceSettings', setting).then(\n () => {\n $scope.savingComplianceSettings = false;\n if (setting.shouldTrack) {\n flySvc.success('msgComplianceRecalculationStarted');\n } else {\n flySvc.success('msgConfirmChange');\n }\n return true;\n },\n error => {\n $scope.savingComplianceSettings = false;\n flySvc.error(error);\n return '';\n },\n );\n };\n\n enumCacheSvc.get('employeeprofile').then(function(data) {\n $scope.employeeProfiles = data.sort(dynamicSort('key'));\n });\n\n $scope.getDefaultTranslationForEmployeeProfile = function(profile) {\n switch (profile) {\n case 1:\n return $translate.instant('Responsible');\n case 2:\n return $translate.instant('Assistant');\n case 3:\n return $translate.instant('AssistantBackup');\n case 4:\n return $translate.instant('Associate');\n case 5:\n return $translate.instant('BillingUser');\n case 6:\n return $translate.instant('SeniorUser');\n default:\n return null;\n }\n };\n\n $scope.translateEmployeeProfile = function(profile) {\n dialogsSvc.translateListItem(\n 'employeeprofile',\n profile,\n $scope.getDefaultTranslationForEmployeeProfile(profile),\n {\n inputRows: 1,\n defaultRequired: false,\n maxlength: 250,\n },\n );\n };\n\n $scope.absenceRelationChanged = relation => {\n $scope.absenceRelation = relation;\n return $scope.submitHrmSettings(relation?.id, 'absenceRelationId');\n };\n\n $scope.editEmailSignatures = function() {\n if (!$scope.settings || !$scope.settings.companyId) return;\n settingsDialogsSvc.openEmailSignaturesDialog($scope.settings.companyId);\n };\n\n // for the \"general setting\" of the \"general\" reply-to type, we want to display a custom text without changing the enum\n $scope.displayReplyToType = function(value) {\n if (value === 0) return $translate.instant('E-mail of the own company');\n return translateListFilter(value, 'emailReplyToType', value);\n };\n\n // for the \"general setting\" of the \"general\" sender name type, we want to display a custom text without changing the enum\n $scope.displaySenderNameType = function(value) {\n if (value === 0) return $translate.instant('Name of the own company');\n return translateListFilter(value, 'emailSenderNameType', value);\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cxSettings')\n .controller('InvoiceTextSettingsCtrl', [\n '$rootScope',\n '$scope',\n '$translate',\n 'settingsDialogsSvc',\n 'flySvc',\n 'data',\n '$http',\n 'appUrls',\n 'ModalService',\n 'dialogsSvc',\n invoiceTextSettingsCtrl,\n ]);\n\nfunction invoiceTextSettingsCtrl(\n $rootScope,\n $scope,\n $translate,\n settingsDialogsSvc,\n flySvc,\n data,\n $http,\n appUrls,\n ModalService,\n dialogsSvc,\n) {\n var vm = this;\n vm.invoiceTexts = data;\n vm.exampleLanguage = $translate.use().split('-')[0];\n vm.languages = ['nl', 'fr', 'en'];\n\n var showError = function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n };\n var generateExample = function(invoiceText) {\n if (!invoiceText) return;\n invoiceText.example = invoiceText.languages[vm.exampleLanguage] || '';\n //Todo: Replace parameters\n };\n\n vm.add = function() {\n settingsDialogsSvc.newInvoiceText().then(function(item) {\n if (item) {\n generateExample(item);\n vm.invoiceTexts.push(item);\n }\n });\n };\n\n vm.edit = function(item) {\n settingsDialogsSvc.editInvoiceText(item).then(function(result) {\n if (result) {\n angular.extend(item, result);\n generateExample(item);\n }\n });\n };\n vm.clone = function(item) {\n const newItem = angular.copy(item);\n newItem.name = '';\n delete newItem.id;\n settingsDialogsSvc.editInvoiceText(newItem).then(function(result) {\n if (result) {\n generateExample(result);\n vm.invoiceTexts.push(result);\n }\n });\n };\n vm.remove = function(item) {\n alert(\"Remove doesn't work yet\");\n };\n\n vm.changeLanguage = function(lang) {\n vm.exampleLanguage = lang;\n vm.invoiceTexts.forEach(generateExample);\n };\n vm.changeLanguage(vm.exampleLanguage);\n\n //Listen to global language change event\n var deregistration = $rootScope.$on('$translateChangeSuccess', function() {\n vm.exampleLanguage = $translate.use().split('-')[0];\n vm.changeLanguage(vm.exampleLanguage);\n });\n $scope.$on('$destroy', deregistration);\n\n vm.showPlaceholders = function() {\n if (!vm.placeholders) {\n $http.get(appUrls.api + '/api/invoicetext/placeholders').then(\n function(result) {\n vm.placeholders = result.data;\n vm.showPlaceholders();\n },\n function(error) {\n flySvc.error(error.code, error.parameters);\n },\n );\n return;\n }\n\n ModalService.showModal({\n template: require('./dialogs/placeholderDialog.html'),\n controller: 'PlaceholderDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n placeholders: vm.placeholders,\n taskParameterPlaceholders: [],\n context: 'invoicetext',\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n });\n };\n\n vm.deleteInvoiceText = function(item) {\n return $http.delete(`${appUrls.api}/api/invoicetext/delete/${item.id}`).then(function() {\n var idx = vm.invoiceTexts.findIndex(x => x.id === item.id);\n if (idx >= 0) {\n vm.invoiceTexts.splice(idx, 1);\n }\n flySvc.success('msgItemRemoved');\n });\n };\n\n vm.delete = function(item) {\n $http.get(`${appUrls.api}/api/invoicetext/usage/${item.id}`).then(({ data }) => {\n const { relations = [], schedules = [] } = data || {};\n\n var hasUsage = relations.length > 0 || schedules.length > 0;\n if (hasUsage) {\n ModalService.showModal({\n template: require('./dialogs/deleteInvoiceTextConfirmDialog.html'),\n controller: 'DeleteInvoiceTextConfirmDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n relations,\n schedules,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n modal.close.then(function(result) {\n if (result) {\n vm.deleteInvoiceText(item);\n }\n });\n });\n } else {\n dialogsSvc.showYesNo('comfirmDeleteTitle', 'confirmDeleteInvoiceText').then(function() {\n vm.deleteInvoiceText(item);\n });\n }\n });\n };\n}\n","import angular from 'angular';\nangular\n .module('cxSettings')\n .controller('MailTemplateSettingsCtrl', [\n '$state',\n 'templateHttpSvc',\n 'flySvc',\n 'dialogsSvc',\n 'companyId',\n 'translateListFilter',\n mailTemplateSettingsCtrl,\n ]);\nfunction mailTemplateSettingsCtrl(\n $state,\n templateHttpSvc,\n flySvc,\n dialogsSvc,\n companyId,\n translateListFilter,\n) {\n var vm = this;\n vm.search = '';\n vm.context = null;\n vm.languageCode = null;\n vm.templates = [];\n vm.contexts = [];\n vm.languages = [];\n\n var showError = function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n };\n var retrieveTemplates = function(companyId) {\n templateHttpSvc.getTemplates().then(function(templates) {\n vm.templates = templates;\n vm.contexts = [...new Set(templates.map(p => p.context))].sort();\n vm.languages = [\n ...new Set(templates.flatMap(t => t.languages.map(l => l.languageCode))),\n ].sort();\n\n const filters = JSON.parse(sessionStorage.getItem('MailTemplateSettingsParams')) || {};\n vm.search = filters.search;\n vm.context = filters.context;\n vm.languageCode = filters.languageCode;\n }, showError);\n };\n retrieveTemplates(companyId);\n vm.getLanguages = function(template) {\n return template.languages\n .map(function(lang) {\n return lang.languageCode;\n })\n .join(', ');\n };\n vm.add = function() {\n $state.go('settings.templates.new');\n };\n vm.edit = function(template) {\n $state.go('settings.templates.edit', {\n templateId: template.id,\n companyId: companyId,\n });\n };\n vm.saveFilters = function() {\n sessionStorage.setItem(\n 'MailTemplateSettingsParams',\n JSON.stringify({\n context: vm.context,\n search: vm.search,\n languageCode: vm.languageCode,\n }),\n );\n };\n vm.copy = function(template) {\n if (!template || !template.id) return;\n templateHttpSvc.copyTemplate(template.id).then(\n function(response) {\n var newTemplate = response;\n var idx = vm.templates.indexOf(template);\n if (idx >= 0) {\n vm.templates.splice(idx + 1, 0, newTemplate);\n }\n flySvc.success();\n },\n function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n },\n )\n };\n vm.remove = function(template) {\n if (!template || !template.id) return;\n dialogsSvc.showYesNo('comfirmDeleteTitle', 'comfirmDeleteTemplate').then(function() {\n templateHttpSvc.removeTemplate(template.id).then(\n function() {\n var idx = vm.templates.indexOf(template);\n if (idx >= 0) vm.templates.splice(idx, 1);\n flySvc.success();\n },\n function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n },\n );\n });\n };\n vm.contextChanged = () => {\n if (vm.context) {\n vm.context = parseInt(vm.context);\n } else {\n vm.context = undefined;\n }\n vm.saveFilters();\n };\n\n vm.applyFilters = value => {\n if ((vm.context || vm.context === 0) && value.context !== vm.context) return false;\n if (\n !!vm.search &&\n value.name.toUpperCase().indexOf(vm.search.toUpperCase()) < 0 &&\n translateListFilter(value.id, 'template', value.name)\n .toUpperCase()\n .indexOf(vm.search.toUpperCase()) < 0\n )\n return false;\n\n if (vm.languageCode && !value.languages.some(x => x.languageCode === vm.languageCode))\n return false;\n return true;\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cxSettings')\n .controller('ReminderSettingsCtrl', [\n 'templateHttpSvc',\n 'reminderHttpSvc',\n 'dialogsSvc',\n 'flySvc',\n 'dataCache',\n 'reminders',\n 'translateListFilter',\n reminderSettingsCtrl,\n ]);\n\nfunction reminderSettingsCtrl(\n templateHttpSvc,\n reminderHttpSvc,\n dialogsSvc,\n flySvc,\n dataCache,\n reminders,\n translateListFilter,\n) {\n var vm = this;\n vm.company = dataCache.getArray('defaultcompany');\n vm.reminders = angular.copy(reminders);\n vm.templates = {};\n templateHttpSvc.getTemplates().then(function(templates) {\n vm.templates = templates\n .filter(x => x.context === 1)\n .map(x => ({ id: x.id, name: translateListFilter(x.id, 'template', x.name) }))\n .sort(function(a, b) {\n return a.name > b.name ? 1 : a.name < b.name ? -1 : 0;\n })\n .reduce(function(o, e) {\n o[e.id] = e.name;\n return o;\n }, {});\n });\n var showError = function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n };\n var clean = function(reminder) {\n return {\n id: reminder.id,\n companyId: reminder.companyId,\n template: reminder.template,\n dueDateOffsetDays: reminder.dueDateOffsetDays,\n frequencyDays: reminder.frequencyDays,\n enabled: reminder.enabled,\n };\n };\n\n vm.save = function(reminder) {\n if (!reminder || !reminder.id) return;\n reminderHttpSvc.updateReminder(clean(reminder)).then(function() {\n if (reminder.original) delete reminder.original;\n reminder.form.$setPristine();\n vm.editing = null;\n }, showError);\n };\n vm.saveNew = function() {\n if (!vm.newReminder) return;\n reminderHttpSvc.createReminder(clean(vm.newReminder)).then(function(reminder) {\n vm.reminders.push(reminder);\n vm.newReminder = null;\n vm.newReminderForm.$setPristine();\n }, showError);\n };\n vm.remove = function(reminder) {\n if (!reminder || !reminder.id) return;\n dialogsSvc.showYesNo('comfirmDeleteTitle', 'comfirmDeleteReminder').then(function() {\n reminderHttpSvc.removeReminder(reminder.id).then(function() {\n var idx = vm.reminders.indexOf(reminder);\n if (idx >= 0) vm.reminders.splice(idx, 1);\n }, showError);\n });\n };\n vm.edit = function(reminder) {\n vm.editing = reminder.id;\n reminder.original = angular.copy(reminder);\n };\n\n vm.cancel = function(reminder) {\n if (reminder.original) angular.copy(reminder.original, reminder);\n vm.editing = null;\n };\n\n vm.add = function() {\n vm.newReminder = {\n companyId: vm.company.id,\n template: null,\n dueDateOffsetDays: 0,\n frequencyDays: 0,\n enabled: true,\n isNew: true,\n };\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cxSettings')\n .controller('SettingMenuCtrl', [\n '$scope',\n 'checkFeature',\n 'dataCache',\n 'appUrls',\n '$window',\n settingMenuCtrl,\n ]);\n\nfunction settingMenuCtrl($scope, checkFeature, dataCache, appUrls, $window) {\n $scope.hasEid = checkFeature('Eid');\n $scope.connectWebUrl = appUrls.connect;\n dataCache.ready().then(function() {\n var company = dataCache.getArray('defaultcompany');\n $scope.connectWebUrl = `${appUrls.connect}?companyId=${company.id}`;\n });\n $scope.openConnect = function() {\n $window.open($scope.connectWebUrl, '_blank');\n };\n}\n","import angular from 'angular';\nimport SignalRService from '@/shared/services/SignalRService';\nimport { dynamicSortMultiple } from '@/shared/utils/dynamicSort';\n\nangular\n .module('cxSettings')\n .controller('taskTemplatesCtrl', [\n '$scope',\n '$http',\n '$q',\n '$timeout',\n 'appUrls',\n 'resourceFactorySvc',\n '$filter',\n 'flySvc',\n 'dialogsSvc',\n 'ModalService',\n 'settingsDialogsSvc',\n 'dataCache',\n 'checkFeature',\n 'templateHttpSvc',\n '$translate',\n 'translateListFilter',\n 'resourceNameFilter',\n taskTemplatesCtrl,\n ]);\n\nfunction taskTemplatesCtrl(\n $scope,\n $http,\n $q,\n $timeout,\n appUrls,\n resourceFactorySvc,\n $filter,\n flySvc,\n dialogsSvc,\n ModalService,\n settingsDialogsSvc,\n dataCache,\n checkFeature,\n templateHttpSvc,\n $translate,\n translateListFilter,\n resourceNameFilter,\n) {\n var vm = this;\n vm.taskTemplates = null;\n vm.resources = null;\n vm.costResources = null;\n vm.mailTemplates = null;\n vm.users = [];\n vm.uploadingSnippet = false;\n\n function attachResource(task) {\n task.resource = task.resourceId\n ? vm.resources.find(function(r) {\n return r.id === task.resourceId;\n })\n : null;\n }\n function attachCostResource(task) {\n task.costResource = task.costResourceId\n ? vm.costResources.find(function(r) {\n return r.id === task.costResourceId;\n })\n : null;\n }\n\n function attachMailTemplate(task) {\n task.mailTemplate = task.mailTemplateId\n ? vm.mailTemplates.find(t => t.id === task.mailTemplateId)\n : null;\n }\n\n function mapAssignedTo(task) {\n const { assignedType = 0, userId = null, profile = null } = task;\n task.assignedTo = {\n assignedType,\n userId,\n profile,\n };\n }\n\n function mapTask(task) {\n attachResource(task);\n attachCostResource(task);\n attachMailTemplate(task);\n mapAssignedTo(task);\n if (task.children) {\n task.children.forEach(mapTask);\n task.children = task.children.sortByProperty('priority');\n }\n return task;\n }\n $q.all([\n $http.get(appUrls.tasks + '/api/tasktemplates/templates').then(function(result) {\n vm.taskTemplates = result.data\n .map(item => ({\n ...item,\n name: $filter('translateList')(item.id, 'tasktemplate', item.name),\n }))\n .sortByProperty('name');\n }),\n resourceFactorySvc.get('resource').reg(\n {\n type: 0,\n },\n function(data) {\n vm.resources = data\n .map(item => ({\n ...item,\n label: resourceNameFilter(item),\n code: item.code || '',\n }))\n .sort(dynamicSortMultiple('code', 'label'));\n },\n ).$promise,\n resourceFactorySvc.get('resource').reg(\n {\n type: 1,\n },\n function(data) {\n vm.costResources = data\n .map(item => ({\n ...item,\n label: resourceNameFilter(item),\n code: item.code || '',\n }))\n .sort(dynamicSortMultiple('code', 'label'));\n },\n ).$promise,\n templateHttpSvc.getTemplates(11).then(function(data) {\n const label = template => translateListFilter(template.id, 'template', template.name);\n vm.mailTemplates = data;\n vm.mailTemplates.sort((a,b) => label(a).localeCompare(label(b)));\n }),\n ]).then(function() {\n vm.taskTemplates.forEach(mapTask);\n vm.taskTemplates = vm.taskTemplates.sortByProperty('name');\n });\n\n var updateTaskTemplate = function(task, model, field, $data) {\n return $http.put(appUrls.tasks + '/api/tasktemplates/templates', model).then(\n function(result) {\n if (result.tags === null) delete result.tags; //Don't reset tags property\n if (field === 'resource') {\n task.resourceId = $data ? $data.id : null;\n task.resource = $data;\n } else if (field === 'costResource') {\n task.costResourceId = $data ? $data.id : null;\n task.costResource = $data;\n } else {\n task[field] = $data;\n }\n if (field === 'assignedTo' && $data) {\n angular.extend(task, $data);\n }\n\n if (result && result.data && result.data.countPlannedTasksUpdated) {\n const count = result.data.countPlannedTasksUpdated;\n flySvc.proposal('msgPropogateTaskTemplateChangesCount', null, null, null, null, {\n count,\n });\n } else {\n flySvc.success();\n }\n\n return false;\n },\n function(error) {\n flySvc.error(error);\n return '';\n },\n );\n };\n\n vm.updateTaskTemplates = function(task, $data, field, showPropogateDialog) {\n if (field.indexOf('appliesTo') !== 0 && angular.equals(task[field], $data)) return false; //Not changed\n var model = angular.copy(task);\n\n model.PropogateTemplateChanges = false;\n\n if (field === 'mailTemplate') {\n model.mailTemplateId = $data ? $data.id : null;\n }\n if (field === 'assignedTo' && $data) {\n angular.extend(model, $data);\n }\n if (field === 'resource') {\n model.resourceId = $data ? $data.id : null;\n delete model.resource;\n } else if (field === 'costResource') {\n model.costResourceId = $data ? $data.id : null;\n delete model.costResource;\n } else {\n model[field] = $data;\n }\n\n delete model.assignedTo;\n delete model.mailTemplate;\n delete model.tags;\n\n if (showPropogateDialog) {\n return dialogsSvc\n .showYesNoCancel(\n 'msgConfirmPropogateTemplateChangesTitle',\n 'msgConfirmPropogateTemplateChanges',\n )\n .then(\n function(result) {\n if (result === null) return false; // Cancel changes\n\n if (!result) return updateTaskTemplate(task, model, field, $data);\n\n model.PropogateTemplateChanges = true;\n return updateTaskTemplate(task, model, field, $data);\n },\n function() {\n return false; // Cancel changes\n },\n );\n } else {\n return updateTaskTemplate(task, model, field, $data);\n }\n };\n\n var saving = false;\n vm.copyTaskTemplate = function(task) {\n if (saving) return;\n saving = true;\n settingsDialogsSvc\n .copyTaskTemplate(task)\n .then(function(result) {\n if (result) {\n var newTask = mapTask(result);\n newTask.isOpen = true;\n newTask.isNew = true;\n var idx = vm.taskTemplates.indexOf(task);\n if (idx >= 0) {\n vm.taskTemplates.splice(idx + 1, 0, newTask);\n } else {\n vm.taskTemplates.push(newTask);\n vm.taskTemplates = vm.taskTemplates.sortByProperty('name');\n }\n }\n })\n .finally(function() {\n saving = false;\n });\n };\n\n vm.addTaskTemplate = function() {\n settingsDialogsSvc.addTaskTemplate(vm.resources, vm.costResources).then(function(result) {\n if (result) {\n var newTask = mapTask(result);\n newTask.isOpen = true;\n newTask.isNew = true;\n vm.taskTemplates.push(newTask);\n vm.taskTemplates = vm.taskTemplates.sortByProperty('name');\n }\n });\n };\n vm.addSubtask = function(taskTemplate) {\n settingsDialogsSvc\n .addSubTaskTemplate(taskTemplate, vm.resources, vm.mailTemplates)\n .then(function(result) {\n if (result) {\n if (taskTemplate.children === null) taskTemplate.children = [];\n var newTask = mapTask(result);\n taskTemplate.children.push(newTask);\n }\n });\n };\n vm.deleteTaskTemplate = function(task) {\n if (!task || !task.id) return;\n\n return dialogsSvc\n .showYesNoCancel('msgConfirmDeleteTitle', 'msgConfirmPropagateTemplateDelete')\n .then(\n function(result) {\n if (result === null) return false; // Cancel changes\n\n return $http\n .delete(appUrls.tasks + '/api/tasktemplates/templates/' + task.id, {\n params: { propagate: !!result },\n })\n .then(\n function() {\n var idx = vm.taskTemplates.indexOf(task);\n if (idx >= 0) vm.taskTemplates.splice(idx, 1);\n },\n error => {\n flySvc.error(error);\n },\n );\n },\n function() {\n return false; // Cancel changes\n },\n );\n };\n\n function editTaskTemplate(mainTaskTemplateId, taskTemplate) {\n const { costResources, parameterDefinitions } = vm\n ModalService.showModal({\n template: require('./dialogs/editTaskTemplateDialog.html'),\n controller: 'EditTaskTemplateDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {costResources, parameterDefinitions, mainTaskTemplateId, taskTemplate },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n attachCostResource(taskTemplate)\n });\n })\n }\n\n vm.editTaskTemplate = function(taskTemplate) {\n if (!taskTemplate || !taskTemplate.id) return;\n editTaskTemplate(taskTemplate.id, taskTemplate)\n }\n\n vm.editSubTask = function(taskTemplate, subTaskTemplate) {\n if (!subTaskTemplate || !subTaskTemplate.id || !taskTemplate || !taskTemplate.id) return;\n editTaskTemplate(taskTemplate.id, subTaskTemplate)\n }\n\n vm.deleteSubTask = function(task, subtask) {\n if (!subtask || !subtask.id) return;\n return dialogsSvc\n .showYesNoCancel('msgConfirmDeleteTitle', 'msgConfirmPropagateSubtaskTemplateDelete')\n .then(\n function(result) {\n if (result === null) return false; // Cancel changes\n\n return $http\n .delete(appUrls.tasks + '/api/tasktemplates/templates/' + subtask.id, {\n params: { propagate: !!result },\n })\n .then(\n function() {\n var idx = task.children.indexOf(subtask);\n if (idx >= 0) task.children.splice(idx, 1);\n },\n error => {\n flySvc.error(error);\n },\n );\n },\n function() {\n return false; // Cancel changes\n },\n );\n };\n vm.updatePriority = function(task, subtask, newPriority) {\n if (!subtask || !subtask.id) return false;\n if (subtask.priority === newPriority) return false;\n return $http\n .post(`${appUrls.tasks}/api/tasktemplates/move/`, {\n id: subtask.id,\n up: false,\n priority: newPriority,\n })\n .then(({ data }) => {\n if (data && data.length) {\n data.forEach(item => {\n var t = task.children.find(x => x.id === item.id);\n if (!t) return;\n t.priority = item.priority;\n });\n task.children.sortByProperty('priority');\n }\n flySvc.success();\n return false;\n });\n };\n vm.moveSubtask = function(task, subtask, up) {\n if (!subtask || !subtask.id) return;\n $http\n .post(`${appUrls.tasks}/api/tasktemplates/move/`, {\n id: subtask.id,\n up,\n })\n .then(({ data }) => {\n if (data && data.length) {\n data.forEach(item => {\n var t = task.children.find(x => x.id === item.id);\n if (!t) return;\n t.priority = item.priority;\n });\n task.children.sortByProperty('priority');\n }\n flySvc.success();\n });\n };\n\n vm.openTranslation = function(task) {\n dialogsSvc\n .translateListItem('tasktemplate', task.id, task.name, { maxlength: 500 })\n .then(function(result) {\n if (result && result.defaultValue) {\n vm.updateTaskTemplates(task, result.defaultValue, 'name');\n }\n });\n };\n\n vm.hasMailTypes = function(task) {\n if (!task || !task.children || !task.children.length) return false;\n return task.children.some(subtask => subtask.type === 3 || subtask.type === 4);\n };\n\n vm.openTaskSchedules = function(task) {\n if (!task || !task.id) return;\n settingsDialogsSvc.openTaskSchedules(task.id).then(function(result) {\n if (result && typeof result.count !== 'undefined') {\n task.periodicityCount = result.count;\n }\n });\n };\n vm.openParameterDefinitions = function(task) {\n if (!task || !task.id) return;\n settingsDialogsSvc.openTaskParameterDefinitions(task.id).then(function(result) {\n if (result && typeof result.count !== 'undefined') {\n task.parameterCount = result.count;\n }\n });\n };\n\n vm.exportSnippet = function(task) {\n settingsDialogsSvc.exportTaskTemplateSnippet(task);\n };\n vm.uploadSnippet = function(files) {\n const [file] = files || [];\n if (!file) return;\n if (vm.uploadingSnippet) return;\n\n var data = new FormData();\n data.append('language', $translate.use());\n data.append('file', file.data);\n\n vm.uploadingSnippet = true;\n\n $http({\n method: 'POST',\n url: appUrls.api + '/api/Snippet/Upload/TaskTemplate',\n headers: {\n 'Content-Type': undefined,\n },\n data,\n }).then(\n response => {\n if (response && response.data) {\n //open dialog\n settingsDialogsSvc.importTaskTemplateSnippet(response.data).then(function(result) {\n if (result) {\n const [taskResult, hasNewMailTemplates] = result;\n if (hasNewMailTemplates) {\n //Reload mail templates first\n return templateHttpSvc.getTemplates(11).then(function(data) {\n vm.mailTemplates = data;\n vm.mailTemplates.sortByProperty('name');\n\n var newTask = mapTask(taskResult);\n newTask.isOpen = true;\n newTask.isNew = true;\n vm.taskTemplates.push(newTask);\n vm.taskTemplates = vm.taskTemplates.sortByProperty('name');\n vm.uploadingSnippet = false;\n });\n }\n var newTask = mapTask(taskResult);\n newTask.isOpen = true;\n newTask.isNew = true;\n vm.taskTemplates.push(newTask);\n vm.taskTemplates = vm.taskTemplates.sortByProperty('name');\n }\n });\n }\n\n vm.uploadingSnippet = false;\n },\n error => {\n flySvc.error(error);\n vm.uploadingSnippet = false;\n },\n );\n };\n vm.getTagsTooltip = task => {\n if (!task) return '';\n if (!task.tags || task.tags.length === 0) return $translate.instant('EditTaskTemplateTags');\n return task.tags.map(x => x.name).join(', ');\n };\n vm.getRequiredDocumentTypesTooltip = task => {\n if (!task) return '';\n if (!task.requiredDocumentTypes || task.requiredDocumentTypes.length === 0)\n return $translate.instant('EditTaskTemplateRequiredDocumentTypes');\n return task.requiredDocumentTypes\n .map(x => $filter('translateList')(x, 'documenttype', x))\n .join(', ');\n };\n vm.openRequiredDocumentTypes = task => {\n if (!task || !task.id) return;\n settingsDialogsSvc\n .editTaskTemplateRequiredDocumentTypes(task.id, task.requiredDocumentTypes)\n .then(function(result) {\n if (result) {\n task.requiredDocumentTypes = result;\n }\n });\n };\n vm.openTags = task => {\n if (!task || !task.id) return;\n settingsDialogsSvc.editTaskTemplateTags(task.id, task.tags).then(function(result) {\n if (result) {\n task.tags = result;\n }\n });\n };\n\n const emailTemplateCreatedHandler = emailTemplate => {\n if (emailTemplate.context === 11) {\n if (!vm.mailTemplates) {\n $timeout(function() {\n vm.mailTemplates = [emailTemplate];\n }, 100);\n } else {\n $timeout(function() {\n vm.mailTemplates.push(emailTemplate);\n }, 100);\n }\n }\n };\n\n SignalRService.subscribe('emailTemplateCreated', emailTemplateCreatedHandler);\n}\n","import angular from 'angular';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nconst yearlyDiscountPercentage = 0.1;\nconst stackedLabelRegex = /{\\s*([^}]+)\\s*}/;\nangular\n .module('cxSettings')\n .controller('licenseCtrl', [\n '$scope',\n '$http',\n '$q',\n '$translate',\n 'appUrls',\n 'flySvc',\n 'dialogsSvc',\n 'checkSecurity',\n 'ModalService',\n '$window',\n '$location',\n 'authService',\n 'enumCacheSvc',\n 'dataCache',\n licenseCtrl,\n ]);\n\nfunction licenseCtrl(\n $scope,\n $http,\n $q,\n $translate,\n appUrls,\n flySvc,\n dialogsSvc,\n checkSecurity,\n ModalService,\n $window,\n $location,\n authService,\n enumCacheSvc,\n dataCache,\n) {\n var vm = this;\n // Block access\n if (!checkSecurity(['CompanyOwn:u', 'Support'])) return;\n\n $location.search({});\n\n vm.modules = [];\n vm.nrLicenses = 1;\n vm.minNrLicenses = 1;\n vm.totalAmount = 0;\n vm.promoCode = '';\n vm.billingPeriod = undefined;\n\n enumCacheSvc.get('tenantbillingperiod').then(function(data) {\n vm.billingPeriods = data;\n });\n var users = dataCache.getArray('user').map(u => ({\n userId: u.userID,\n employeeId: u.employeeID,\n name: `${u.firstName} ${u.lastName}`,\n }));\n\n vm.hasChanged = function() {\n if (vm.licenseInformation && vm.nrLicenses !== undefined && vm.nrLicenses !== vm.licenseInformation.totalLicenses) return true;\n return false;\n };\n\n vm.saving = false;\n\n vm.submit = function(showSuccess = true) {\n if (vm.saving) return;\n\n if (typeof vm.nrLicenses === 'undefined' || vm.nrLicenses < vm.minNrLicenses) {\n flySvc.warning('msgNumberLicensesLowerThanEmployees');\n return;\n }\n\n vm.saving = true;\n\n return $http.post(appUrls.api + '/api/License/UpdateLicenses', vm.nrLicenses).then(\n function(result) {\n if (showSuccess) {\n flySvc.success('msgModuleConfigurationSaved');\n }\n if (result && result.data) {\n vm.licenseInformation.totalLicenses = result.data;\n }\n vm.saving = false;\n },\n function(error) {\n flySvc.error(error);\n vm.saving = false;\n },\n );\n };\n\n var mapTmpLicense = l => {\n const { name = null, employeeId = null } =\n (l.userId ? users.find(x => x.userId === l.userId) : null) || {};\n return {\n ...l,\n userName: name,\n employeeId: employeeId,\n };\n };\n\n vm.paymentInformation = null;\n vm.licenseInformation = null;\n vm.licensePrices = [];\n vm.perRelationPrice = null;\n vm.bucketPrice = null;\n\n var handleInfoResponse = function(response) {\n if (response.data) {\n vm.licenseInformation = response.data;\n vm.paymentInformation = response.data.paymentInformation;\n\n vm.perRelationPrice = vm.licenseInformation.perRelationPrice;\n vm.bucketPrice = vm.licenseInformation.bucketPrice;\n vm.nrLicenses = vm.licenseInformation.totalLicenses;\n vm.minNrLicenses =\n vm.licenseInformation.totalLicenses - vm.licenseInformation.availableLicenses;\n\n vm.licensePrices = vm.licenseInformation.prices.map(\n ({ quantityFrom, price, description }) => {\n const values = {};\n if (vm.bucketPrice) {\n values.BucketsQuantityIncluded = '' + vm.bucketPrice.quantityIncluded;\n }\n\n const label = description.replace(\n stackedLabelRegex,\n (match, p1) => $translate.instant(p1, values) || p1,\n );\n\n return { quantityFrom, price, label, count: 0 };\n },\n );\n if (vm.perRelationPrice) {\n vm.perRelationPrice.extraQuantity = Math.max(\n vm.licenseInformation.activeRelations - vm.perRelationPrice.quantityIncluded,\n 0,\n );\n vm.perRelationPrice.extraAmount =\n Math.round(vm.perRelationPrice.extraQuantity * vm.perRelationPrice.extraPrice * 100) /\n 100;\n }\n if (vm.bucketPrice) {\n vm.bucketPrice.nrBuckets = Math.ceil(\n Math.max(0, vm.licenseInformation.activeRelations - vm.bucketPrice.quantityIncluded) /\n vm.bucketPrice.bucketSize,\n );\n vm.bucketPrice.extraQuantity = vm.bucketPrice.nrBuckets * vm.bucketPrice.bucketSize;\n vm.bucketPrice.extraAmount =\n Math.round(vm.bucketPrice.extraQuantity * vm.bucketPrice.pricePerRelation * 100) / 100;\n\n vm.bucketPrice.baseTranslationValues = {\n Quantity: vm.bucketPrice.quantityIncluded,\n };\n vm.bucketPrice.extraTranslationValues = {\n QuantityIncluded: vm.bucketPrice.quantityIncluded,\n 'QuantityIncluded+1': vm.bucketPrice.quantityIncluded + 1,\n Buckets: vm.bucketPrice.nrBuckets,\n BucketSize: vm.bucketPrice.bucketSize,\n Quantity: vm.bucketPrice.extraQuantity,\n };\n }\n vm.billingPeriod =\n vm.licenseInformation.nextBillingPeriod === null\n ? vm.licenseInformation.billingPeriod\n : vm.licenseInformation.nextBillingPeriod;\n vm.discountPercentage = vm.licenseInformation.discount;\n if (vm.licenseInformation.temporaryLicenses)\n vm.licenseInformation.temporaryLicenses = vm.licenseInformation.temporaryLicenses.map(\n mapTmpLicense,\n );\n\n vm.recalcTotals();\n }\n };\n vm.changeBillingPeriod = function(value) {\n if (vm.saving) return;\n vm.saving = true;\n\n return $http\n .put(appUrls.api + '/api/License/UpdateLicenseInformation', {\n billingPeriod: value,\n })\n .then(handleInfoResponse, function(error) {\n flySvc.error(error);\n vm.saving = false;\n return '';\n });\n };\n vm.recalcTotals = function() {\n vm.licensePrices.forEach(x => (x.count = 0));\n vm.baseAmount = 0;\n vm.discountAmount = 0;\n if (vm.licenseInformation.billPerLicense && vm.licensePrices.length > 0) {\n const prices = [...vm.licensePrices].sort(dynamicSort('-quantityFrom'));\n for (var i = 1; i <= vm.nrLicenses; i++) {\n const price = prices.find(x => x.quantityFrom <= i);\n price.count += 1;\n vm.baseAmount += price.price;\n }\n }\n if (vm.licenseInformation.billPerRelation && vm.perRelationPrice) {\n const { basePrice, extraAmount } = vm.perRelationPrice;\n\n vm.baseAmount += basePrice + extraAmount;\n }\n\n if (vm.licenseInformation.billPerRelationBucket && vm.bucketPrice) {\n const { basePrice, extraAmount } = vm.bucketPrice;\n vm.baseAmount += basePrice + extraAmount;\n }\n if (vm.discountPercentage > 0) {\n vm.discountAmount = vm.baseAmount * vm.discountPercentage;\n vm.totalAmount = vm.baseAmount - vm.discountAmount;\n } else {\n vm.discountAmount = 0;\n vm.totalAmount = vm.baseAmount;\n }\n };\n\n vm.reloadLicenseInfo = function() {\n return $http.get(appUrls.api + '/api/License/Info').then(handleInfoResponse, function(error) {\n flySvc.error(error);\n });\n };\n vm.reloadLicenseInfo();\n\n var activateLicense = function(provider, billingPeriod, promoCode) {\n vm.saving = true;\n return $http.get(appUrls.api + '/api/license/activate/' + billingPeriod + '/' + promoCode).then(\n response => {\n // currently hardcoded because only bank transfers are possible\n var paymentProviderTranslated = $translate.instant('BankTransfer').toLowerCase();\n\n flySvc.success('msgPaymentProviderChangedSuccess', {\n provider: paymentProviderTranslated,\n });\n vm.saving = false;\n\n handleInfoResponse(response);\n },\n function(error) {\n flySvc.error(error);\n },\n );\n };\n\n vm.changePaymentMethod = function(provider) {\n if (vm.saving) return;\n\n // If no payment info is present, the tenant is setting his payment provider for the first time\n // And a confirmation message should be shown with invoice info\n if (!vm.paymentInformation) {\n return ModalService.showModal({\n template: require('./dialogs/setPaymentProviderConfirmDialog.html'),\n controller: 'SetPaymentProviderConfirmDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n nrLicenses: vm.nrLicenses,\n paymentProvider: provider,\n promoCode: vm.promoCode,\n billingPeriod: vm.billingPeriod,\n totalAmount: vm.totalAmount,\n discountAmount: vm.discountAmount,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n modal.close.then(function(result) {\n if (result) {\n if (vm.hasChanged()) {\n vm.submit(false).then(\n function(result) {\n activateLicense(provider, vm.billingPeriod, vm.promoCode);\n },\n function(error) {\n flySvc.error(error);\n },\n );\n } else {\n activateLicense(provider, vm.billingPeriod, vm.promoCode);\n }\n }\n });\n });\n } else {\n dialogsSvc\n .showYesNo('msgConfirmChangePaymentProvidertitle', 'msgConfirmChangePaymentProvider')\n .then(function() {\n activateLicense(provider, vm.billingPeriod, vm.promoCode);\n });\n }\n };\n\n vm.nrLicensesChanged = function() {\n vm.recalcTotals();\n };\n\n vm.addTempLicense = function() {\n ModalService.showModal({\n template: require('./dialogs/addTemporaryLicenseDialog.html'),\n controller: 'AddTemporaryLicenseDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n licenseInfo: vm.licenseInformation,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n modal.close.then(function(result) {\n if (result) {\n vm.licenseInformation.temporaryLicenses.push(mapTmpLicense(result));\n }\n });\n });\n };\n\n vm.deleteTempLicense = function(lic) {\n if (!lic || !lic.id || !lic.isNew || lic.userId) return;\n return $http.delete(`${appUrls.api}/api/License/TemporaryLicense/${lic.id}`).then(\n function() {\n const idx = vm.licenseInformation.temporaryLicenses.indexOf(lic);\n if (idx >= 0) {\n vm.licenseInformation.temporaryLicenses.splice(idx, 1);\n flySvc.success();\n }\n },\n function(error) {\n flySvc.error(error);\n return '';\n },\n );\n };\n}\n","import angular from 'angular';\nimport DocumentService from '@/shared/services/DocumentService';\nimport moment from 'moment';\nimport { dynamicSort } from '@/shared/utils/dynamicSort';\nimport { isDutchTenantConfiguration } from '@/shared/TenantConfigurationConstants';\nimport dataCacheService from '@/shared/services/DataCacheService';\nimport AuthService from '@/shared/services/AuthService';\n\nconst SessionStorageKey = 'InvoiceTemplatesSettings';\nconst CollapsedStorageKey = 'cx-invoice-template-examples-collapsed';\nexport const invoiceTemplateTypes = [0, 1, 2, 11, 12, 14, 15, 16, 17, 25];\n\nangular\n .module('cxSettings')\n .controller('InvoiceTemplatesCtrl', [\n 'flySvc',\n 'ModalService',\n '$http',\n 'appUrls',\n 'Blob',\n 'FileSaver',\n 'dialogsSvc',\n 'enumCacheSvc',\n 'checkFeature',\n '$window',\n '$translate',\n '$timeout',\n 'localStorageService',\n 'dataCache',\n '$rootScope',\n '$scope',\n 'translateListFilter',\n invoiceTemplatesCtrl,\n ]);\n\nfunction invoiceTemplatesCtrl(\n flySvc,\n ModalService,\n $http,\n appUrls,\n Blob,\n FileSaver,\n dialogsSvc,\n enumCacheSvc,\n checkFeature,\n $window,\n $translate,\n $timeout,\n localStorageService,\n dataCache,\n $rootScope,\n $scope,\n translateListFilter,\n) {\n var vm = this;\n vm.invoiceTemplates = [];\n vm.templateTypes = [];\n vm.exampleTemplatesCollapsed = false;\n vm.company = null;\n vm.languageCode = null;\n vm.templateType = null;\n vm.activeOnly = false;\n vm.companies = dataCache.getArray('company');\n vm.multipleCompanies = vm.companies.length > 1;\n vm.showEditTemplate = false;\n vm.templateCheckoutInfo = null;\n\n // TODO: this info should be stored somewhere on a central location\n // These are the default templates, that are seeded into the tenants, but they should also be available to download at any time\n // The documentId corresponds to the filename of the document in storage\\00000-0000\\document-templates\\\n vm.sampleTemplates = [\n {\n templateType: 0,\n name: isDutchTenantConfiguration(dataCache.getArray('tenantConfiguration'))\n ? 'Factuur, met factuurregels'\n : 'Factuur, met factuurlijnen',\n languageCode: 'nl',\n documentId: isDutchTenantConfiguration(dataCache.getArray('tenantConfiguration'))\n ? '1BCD8B0C-4418-FA2B-9CCC-D84FE12FA1D2'\n : '1BCD8B0C-4418-4E72-9CCC-D84FE12FA1D2',\n },\n {\n templateType: 0,\n name: isDutchTenantConfiguration(dataCache.getArray('tenantConfiguration'))\n ? 'Factuur, met factuurregels (gegroepeerd op omschrijving)'\n : 'Factuur, met factuurlijnen (gegroepeerd op omschrijving)',\n languageCode: 'nl',\n documentId: isDutchTenantConfiguration(dataCache.getArray('tenantConfiguration'))\n ? '8ADB8306-6143-FA2B-8100-000D3A1125E9'\n : '8ADB8306-6143-11EB-8100-000D3A1125E9',\n },\n {\n templateType: 0,\n name: isDutchTenantConfiguration(dataCache.getArray('tenantConfiguration'))\n ? 'Factuur, zonder factuurregels. Enkel omschrijving en totaal'\n : 'Factuur, zonder factuurlijnen. Enkel omschrijving en totaal',\n languageCode: 'nl',\n documentId: isDutchTenantConfiguration(dataCache.getArray('tenantConfiguration'))\n ? '1BCD8B0C-4418-FA2B-9CCC-D84FE12FA1D1'\n : '1BCD8B0C-4418-4E72-9CCC-D84FE12FA1D1',\n },\n {\n templateType: 0,\n name: 'Facture, avec lignes de facture',\n languageCode: 'fr',\n documentId: '1BCD8B0C-4418-4E72-9CCC-D84FE12FA1E2',\n },\n {\n templateType: 0,\n name: 'Facture, avec lignes de facture (regroupées par description)',\n languageCode: 'fr',\n documentId: '8ADB8305-6143-11EB-8100-000D3A1125E9',\n },\n {\n templateType: 0,\n name: 'Facture, sans lignes de facture. Seulement description et total',\n languageCode: 'fr',\n documentId: '1BCD8B0C-4418-4E72-9CCC-D84FE12FA1E1',\n },\n {\n templateType: 0,\n name: 'Invoice, with invoice lines',\n languageCode: 'en',\n documentId: isDutchTenantConfiguration(dataCache.getArray('tenantConfiguration'))\n ? '1BCD8B0C-4418-FA2B-9CCC-D84FE12FA1C2'\n : '1BCD8B0C-4418-4E72-9CCC-D84FE12FA1C2',\n },\n {\n templateType: 0,\n name: 'Invoice, with invoice lines (grouped by description)',\n languageCode: 'en',\n documentId: isDutchTenantConfiguration(dataCache.getArray('tenantConfiguration'))\n ? '8ADB8307-6143-FA2B-8100-000D3A1125E9'\n : '8ADB8307-6143-11EB-8100-000D3A1125E9',\n },\n {\n templateType: 0,\n name: 'Invoice, without invoice lines. Only description and total',\n languageCode: 'en',\n documentId: isDutchTenantConfiguration(dataCache.getArray('tenantConfiguration'))\n ? '1BCD8B0C-4418-FA2B-9CCC-D84FE12FA1C1'\n : '1BCD8B0C-4418-4E72-9CCC-D84FE12FA1C1',\n },\n {\n templateType: 2,\n name: 'Creditnota',\n languageCode: 'nl',\n documentId: isDutchTenantConfiguration(dataCache.getArray('tenantConfiguration'))\n ? '1BCD8B0C-4418-FA2B-9CCC-D84FE12FA1D5'\n : '1BCD8B0C-4418-4E72-9CCC-D84FE12FA1D5',\n },\n {\n templateType: 2,\n name: 'Note de crédit',\n languageCode: 'fr',\n documentId: '1BCD8B0C-4418-4E72-9CCC-D84FE12FA1E5',\n },\n {\n templateType: 2,\n name: 'Credit note',\n languageCode: 'en',\n documentId: isDutchTenantConfiguration(dataCache.getArray('tenantConfiguration'))\n ? '1BCD8B0C-4418-FA2B-9CCC-D84FE12FA1C5'\n : '1BCD8B0C-4418-4E72-9CCC-D84FE12FA1C5',\n },\n ];\n\n var initialize = () => {\n vm.exampleTemplatesCollapsed = localStorageService.get(CollapsedStorageKey) || false;\n vm.languageCode = $translate.use().split('-')[0];\n\n vm.invoiceSampleTemplates = vm.sampleTemplates.filter(\n x => x.languageCode == vm.languageCode && x.templateType == 0,\n );\n vm.creditNoteSampleTemplates = vm.sampleTemplates.filter(\n x => x.languageCode == vm.languageCode && x.templateType == 2,\n );\n\n vm.templateTypes = vm.templateTypes\n .map(x => ({\n ...x,\n label: translateListFilter(x.key, 'templateType', x.value),\n }))\n .sort(dynamicSort('label'));\n\n // if the tenant was created after the release of 29/04/2021, he will be using the {moustache} syntax of the invoice fields\n // tenants created before that date, will be using the merge field syntax.\n var filename = `AdminPulse-invoice-template-fields.docx`;\n let createdOn = dataCache.getArray('createdOn');\n vm.showActionSpinner = false;\n vm.isLoading = false;\n if (createdOn) {\n var releaseDate = moment('29-04-2021', 'DD-MM-YYYY');\n if (moment.utc(createdOn).isAfter(releaseDate)) {\n vm.showEditTemplate = false;\n if (dataCacheService.hasUserConnectPlatform(46)) {\n vm.showEditTemplate = true;\n }\n }\n }\n };\n initialize();\n\n var deregistration = $rootScope.$on('$translateChangeSuccess', initialize);\n $scope.$on('$destroy', deregistration);\n\n var initFilters = () => {\n const filtersInStorage = JSON.parse(sessionStorage.getItem(SessionStorageKey)) || {};\n let {\n templateType = null,\n languageCode = null,\n companyId = null,\n active = false,\n } = filtersInStorage;\n vm.templateType = templateType;\n vm.company = companyId;\n vm.language = languageCode;\n vm.activeOnly = active;\n if (vm.table && filtersInStorage !== {}) {\n const tableFilters = Object.keys(filtersInStorage).reduce((result, key) => {\n const value = filtersInStorage[key];\n if (value === null) return result;\n result[key] = { items: [value] };\n return result;\n }, {});\n vm.table.initializeParams({ filter: tableFilters });\n }\n };\n\n var showError = function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n };\n\n vm.collapseExamples = () => {\n vm.exampleTemplatesCollapsed = !vm.exampleTemplatesCollapsed;\n localStorageService.set(CollapsedStorageKey, vm.exampleTemplatesCollapsed);\n };\n\n enumCacheSvc.get('templateType').then(function(data) {\n // Filter out invoce / invoicedetail / creditnote templatetypes\n vm.templateTypes = data\n .filter(x => invoiceTemplateTypes.indexOf(x.key) >= 0)\n .map(x => ({\n ...x,\n label: translateListFilter(x.key, 'templateType', x.value),\n }))\n .sort(dynamicSort('label'));\n });\n\n var mapTemplate = function(template) {\n return {\n ...template,\n company: vm.companies.find(x => x.id === template.companyId),\n };\n };\n\n vm.editTemplate = template => {\n DocumentService.edit(template.documentId, vm.languageCode);\n };\n\n var loadTemplateCheckoutInfo = () => {\n const templateIds = vm.invoiceTemplates.map(t => t.documentId);\n DocumentService.getTemplateCheckoutInfo(templateIds).then(data => {\n vm.templateCheckoutInfo = data;\n });\n };\n\n vm.retrieveDocumentTemplates = function() {\n $http.post(appUrls.api + '/api/documentTemplate/templates', invoiceTemplateTypes).then(\n function(result) {\n if (result && result.data) {\n vm.invoiceTemplates = result.data.map(mapTemplate);\n loadTemplateCheckoutInfo();\n initFilters();\n }\n },\n function(error) {\n showError(error);\n },\n );\n };\n vm.retrieveDocumentTemplates();\n\n vm.downloadTemplate = function(invoiceTemplate) {\n if (!invoiceTemplate.documentId) return;\n\n invoiceTemplate.downloading = true;\n\n DocumentService.download(invoiceTemplate.documentId).then(\n () => {\n $timeout(function() {\n invoiceTemplate.downloading = false;\n }, 0);\n },\n () => {\n $timeout(function() {\n invoiceTemplate.downloading = false;\n }, 0);\n },\n );\n };\n\n vm.activateTemplate = function(invoiceTemplate) {\n if (!invoiceTemplate) return;\n invoiceTemplate.activating = true;\n\n $http.post(appUrls.api + '/api/documentTemplate/activate/' + invoiceTemplate.id).then(\n function(result) {\n invoiceTemplate.activating = false;\n if (result && result.data) {\n flySvc.success('msgConfirmChange');\n var activationResult = result.data;\n if (activationResult.activatedDocumentTemplate) {\n var activatedTemplate = vm.invoiceTemplates.find(\n x => x.id === activationResult.activatedDocumentTemplate.id,\n );\n if (activatedTemplate) {\n angular.extend(activatedTemplate, activationResult.activatedDocumentTemplate);\n }\n }\n if (activationResult.deactivatedDocumentTemplate) {\n var deactivatedTemplate = vm.invoiceTemplates.find(\n x => x.id === activationResult.deactivatedDocumentTemplate.id,\n );\n if (deactivatedTemplate) {\n angular.extend(deactivatedTemplate, activationResult.deactivatedDocumentTemplate);\n }\n }\n }\n },\n function(error) {\n invoiceTemplate.activating = false;\n showError(error);\n },\n );\n };\n\n vm.submit = function(invoiceTemplate, value, field) {\n if (angular.equals(invoiceTemplate[field], value)) return false;\n\n var model = angular.copy(invoiceTemplate);\n model[field] = value;\n\n return $http.put(appUrls.api + '/api/documentTemplate/UpdateTemplate', model).then(\n function(result) {\n if (result) {\n flySvc.success('msgConfirmChange');\n return true;\n }\n return '';\n },\n function(error) {\n showError(error);\n return '';\n },\n );\n };\n\n vm.previewTemplate = function(invoiceTemplate) {\n ModalService.showModal({\n template: require('./dialogs/previewInvoiceTemplateDialog.html'),\n controller: 'PreviewInvoiceTemplateDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n documentTemplateId: invoiceTemplate.id,\n documentUrl: null,\n sampleTemplateId: null,\n sampleTemplateType: null,\n },\n }).then(function(modal) {\n modal.element.modal();\n });\n };\n\n vm.previewExample = function(documentUrl) {\n ModalService.showModal({\n template: require('./dialogs/previewInvoiceTemplateDialog.html'),\n controller: 'PreviewInvoiceTemplateDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n documentTemplateId: null,\n documentUrl: documentUrl,\n sampleTemplateId: null,\n sampleTemplateType: null,\n },\n }).then(function(modal) {\n modal.element.modal();\n });\n };\n\n vm.previewSample = function(templateId, templateType) {\n ModalService.showModal({\n template: require('./dialogs/previewInvoiceTemplateDialog.html'),\n controller: 'PreviewInvoiceTemplateDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n documentTemplateId: null,\n documentUrl: null,\n sampleTemplateId: templateId,\n sampleTemplateType: templateType,\n },\n }).then(function(modal) {\n modal.element.modal();\n });\n };\n\n vm.add = function() {\n ModalService.showModal({\n template: require('./dialogs/addInvoiceTemplateDialog.html'),\n controller: 'AddInvoiceTemplateDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n companyId: vm.company,\n templateTypes: vm.templateTypes,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n modal.close.then(function(invoiceTemplate) {\n if (!invoiceTemplate) return;\n vm.invoiceTemplates.push(mapTemplate(invoiceTemplate));\n flySvc.success('msgConfirmAddInvoiceTemplate');\n });\n });\n };\n\n vm.delete = function(invoiceTemplate) {\n if (!invoiceTemplate.id) return false;\n\n return dialogsSvc.showYesNo('comfirmDeleteTitle', 'msgConfirmDeleteInvoiceTemplate').then(\n function(result) {\n invoiceTemplate.deleting = true;\n $http.delete(appUrls.api + '/api/documentTemplate/delete/' + invoiceTemplate.id).then(\n function() {\n flySvc.success('msgConfirmChange');\n invoiceTemplate.deleting = false;\n var idx = vm.invoiceTemplates.indexOf(invoiceTemplate);\n if (idx >= 0) vm.invoiceTemplates.splice(idx, 1);\n },\n function(error) {\n invoiceTemplate.deleting = false;\n showError(error);\n return false;\n },\n );\n return true;\n },\n function() {\n return false;\n },\n );\n };\n\n vm.replaceTemplate = function(files, item) {\n if (!files || files.length < 1) return;\n\n var data = new FormData();\n data.append('data', files[0].data);\n\n item.replacing = true;\n\n $http({\n method: 'post',\n url: appUrls.api + '/api/documentTemplate/ReplaceTemplate/' + item.id,\n headers: {\n 'Content-Type': undefined,\n },\n data: data,\n })\n .success(function(result) {\n item.replacing = false;\n if (!result) return;\n angular.extend(item, result);\n flySvc.success('msgConfirmChange');\n })\n .error(function(error) {\n item.replacing = false;\n flySvc.error(error.code, error.parameters);\n });\n };\n\n vm.downloadDocumentation = function() {\n var language = $translate.use().split('-')[0];\n var url = `https://cloudxprdpubliccontent.blob.core.windows.net/public/Documentation%20files/${language}/AdminPulse-invoice-template-fields.pdf`;\n $window.open(url);\n };\n\n vm.downloadSample = function(sample) {\n const endpoint = appUrls.api + '/api/documentTemplate/DownloadSample/' + sample.documentId;\n $http\n .get(endpoint, {\n responseType: 'arraybuffer',\n })\n .then(\n result => {\n const contentDisposition = result.headers('Content-Disposition');\n const filename = `${sample.name}.docx`;\n var fileType = result.headers('Content-Type');\n\n var blob = new Blob([result.data], {\n type: 'application/vnd.openxmlformats-officedocument.wordprocessing',\n });\n if (blob) {\n FileSaver.saveAs(blob, filename);\n }\n },\n error => {\n showArrayBufferError(error);\n },\n );\n };\n var showArrayBufferError = function(error) {\n if (!error) return;\n try {\n var buffer = error.data || error;\n const errorObject = adminpulse.arrayBufferToObject(buffer) || {};\n flySvc.error(errorObject);\n } catch (ex) {\n console.error(ex);\n //Parsing error?\n flySvc.error();\n }\n };\n vm.filter = function(column, value) {\n let filters = JSON.parse(sessionStorage.getItem(SessionStorageKey)) || {};\n\n if (value === null || value === '') {\n vm.table.clearFilter(column);\n delete filters[column];\n } else {\n vm.table.setFilter(column, { items: [value] });\n filters = { ...filters, [column]: value };\n }\n sessionStorage.setItem(SessionStorageKey, JSON.stringify(filters));\n };\n\n vm.copyTemplate = function(item) {\n var formData = new FormData();\n formData.append('id', item.id);\n\n $http({\n method: 'post',\n url: appUrls.api + '/api/documentTemplate/Copy/' + item.id,\n headers: {\n 'Content-Type': undefined,\n },\n data: formData,\n })\n .then(function(response) {\n var copiedTemplate = response.data;\n\n if (copiedTemplate) {\n vm.invoiceTemplates.push(mapTemplate(copiedTemplate));\n flySvc.success('msgConfirmChange');\n } else {\n console.error('Copied template data not received.');\n }\n })\n .catch(function(error) {\n console.error('Error copying template:', error);\n flySvc.error(error.data && error.data.code, error.data && error.data.parameters);\n });\n };\n\n vm.isCheckedOut = documentId => {\n return vm.templateCheckoutInfo && vm.templateCheckoutInfo[documentId];\n };\n\n vm.isCheckedOutByCurrentUser = documentId => {\n return (\n vm.templateCheckoutInfo &&\n vm.templateCheckoutInfo[documentId] &&\n vm.templateCheckoutInfo[documentId] === AuthService.getUserId()\n );\n };\n\n vm.canDiscardCheckout = function() {\n return AuthService.hasPermission({ functionality: 'CompanyOwn', privilege: 'Update' });\n };\n\n vm.checkinDocument = function(item) {\n if (vm.isCheckedOutByCurrentUser(item.documentId)) {\n checkin(item);\n }\n };\n\n vm.onDiscardCheckout = function(item) {\n dialogsSvc\n .showYesNo('comfirmTitle', 'msgDiscardCheckout', {\n name: dataCacheService.getUserName(vm.templateCheckoutInfo[item.documentId]),\n })\n .then(function() {\n discardCheckout(item);\n });\n };\n\n vm.openEdit = function(item) {\n DocumentService.getCheckedOutLink(item.documentId).then(link => {\n if (!link) return;\n window.open(link);\n });\n };\n\n const checkin = function(item) {\n vm.showActionSpinner = true;\n DocumentService.checkin(item.documentId).then(\n () => {\n flySvc.success();\n vm.showActionSpinner = false;\n vm.templateCheckoutInfo[item.documentId] = null;\n },\n error => {\n console.error(error);\n if (error.response && error.response.data && error.response.data.code) {\n flySvc.error(error);\n } else {\n flySvc.success();\n }\n log.error('error checking in document ', error);\n vm.showActionSpinner = false;\n },\n );\n };\n\n const discardCheckout = function(item) {\n vm.showActionSpinner = true;\n DocumentService.discardCheckout(item.documentId).then(\n () => {\n flySvc.success();\n vm.showActionSpinner = false;\n loadTemplateCheckoutInfo();\n },\n error => {\n console.error(error);\n if (error.response && error.response.data && error.response.data.code) {\n flySvc.error(error);\n vm.showActionSpinner = false;\n } else {\n flySvc.success();\n }\n log.error('error discarding checkout ', error);\n },\n );\n };\n\n vm.checkoutDocument = function(item, openinApp) {\n vm.showActionSpinner = true;\n DocumentService.checkout(item.documentId, openinApp).then(\n data => {\n if (!!data) {\n flySvc.success();\n loadTemplateCheckoutInfo();\n }\n vm.showActionSpinner = false;\n },\n error => {\n console.error(error);\n if (error.response && error.response.data && error.response.data.code) {\n flySvc.error(error);\n vm.showActionSpinner = false;\n } else {\n flySvc.success();\n }\n log.error('error checking out document ', error);\n },\n );\n };\n\n vm.getDisabledStyles = function() {\n if (vm.showActionSpinner || vm.isLoading) {\n return {\n 'pointer-events': 'none',\n color: '#ccc',\n };\n }\n return {};\n };\n}\n","import angular from 'angular';\nimport SignalRService from '@/shared/services/SignalRService';\n\nangular\n .module('cxSettings')\n .controller('AddSubTaskTemplateDialogCtrl', [\n '$element',\n '$scope',\n '$http',\n 'appUrls',\n 'flySvc',\n '$timeout',\n 'resourceFactorySvc',\n 'templateHttpSvc',\n 'dataCache',\n 'translateListFilter',\n 'enumCacheSvc',\n 'dialogsSvc',\n 'close',\n 'taskTemplate',\n 'resources',\n addSubTaskTemplateDialogCtrl,\n ]);\n\nfunction addSubTaskTemplateDialogCtrl(\n $element,\n $scope,\n $http,\n appUrls,\n flySvc,\n $timeout,\n resourceFactorySvc,\n templateHttpSvc,\n dataCache,\n translateListFilter,\n enumCacheSvc,\n dialogsSvc,\n close,\n taskTemplate,\n resources,\n mailTemplates,\n) {\n var vm = this;\n vm.showValidation = false;\n vm.saving = false;\n vm.taskTemplate = taskTemplate;\n vm.translation = {};\n vm.subtask = {\n name: '',\n resourceId: null,\n defaultDuration: null,\n deadlineDeviation: null,\n type: 0,\n assignedType: 0,\n userId: null,\n profile: null,\n };\n vm.mailTemplates = mailTemplates;\n vm.assignedTo = {\n assignedType: 0,\n userId: null,\n profile: null,\n };\n\n vm.resources = resources;\n if (!vm.resources) {\n resourceFactorySvc.get('resource').reg(\n {\n type: 0,\n },\n function(data) {\n vm.resources = data.map(x => ({\n ...x,\n code: x.code | '',\n label: resourceNameFilter(x),\n }));\n },\n );\n }\n if (!vm.mailTemplates) {\n templateHttpSvc.getTemplates(11).then(function(data) {\n vm.mailTemplates = data;\n });\n }\n\n vm.taskTypeChanged = function() {\n if (vm.subtask.type === 3 || vm.subtask.type === 4) {\n vm.subtask.resourceId = null;\n } else {\n vm.subtask.mailTemplateId = null;\n }\n };\n\n vm.users = dataCache\n .getArray('user')\n .filter(x => x.isActive || !x.hidden)\n .map(function(user) {\n return {\n id: user.userID,\n label: `${user.firstName} ${user.lastName}`,\n isActive: user.isActive,\n };\n })\n .sortByProperty('name');\n\n vm.profiles = [];\n enumCacheSvc.get('employeeprofile').then(function(data) {\n vm.profiles = data.map(({ key, value }) => ({\n id: key,\n value,\n label: translateListFilter(key, 'employeeprofile', value),\n }));\n });\n\n vm.assignedToChanged = function() {\n angular.extend(vm.subtask, vm.assignedTo);\n };\n\n vm.updateName = function(value) {\n vm.subtask.name = value;\n };\n var handleSuccess = data => {\n if (data && data.countPlannedTasksUpdated) {\n flySvc.proposal('msgPropogateTaskTemplateChangesCount', null, null, null, null, {\n count: data.countPlannedTasksUpdated,\n });\n } else {\n flySvc.success();\n }\n $element.modal('hide');\n close(data, 500);\n vm.saving = false;\n return false;\n };\n vm.save = function() {\n if ($scope.form.$invalid || vm.saving) return;\n vm.saving = true;\n dialogsSvc\n .showYesNoCancel(\n 'msgConfirmPropogateTemplateChangesTitle',\n 'msgConfirmPropogateTemplateChanges',\n )\n .then(function(result) {\n if (result === null) {\n vm.saving = false;\n return false; // Cancel changes\n }\n vm.subtask.propogateTemplateChanges = !!result;\n\n $http\n .post(appUrls.tasks + '/api/tasktemplates/templates/' + taskTemplate.id, vm.subtask)\n .then(\n function({ data = {} }) {\n if (data && data.id && vm.translation && vm.translation.save) {\n return vm.translation.save(data.id).then(function() {\n return handleSuccess(data);\n });\n } else {\n return handleSuccess(data);\n }\n },\n function(error) {\n flySvc.error(error.data.code, error.data.parameters);\n vm.saving = false;\n },\n );\n });\n };\n\n vm.showValidationErrors = function() {\n vm.showValidation = true;\n if (vm.translation && vm.translation.isValid) vm.translation.isValid(true);\n };\n\n vm.cancel = function() {\n close(null, 500);\n };\n\n const emailTemplateCreatedHandler = emailTemplate => {\n if (emailTemplate.context === 11) {\n if (!vm.mailTemplates) {\n $timeout(function() {\n vm.mailTemplates = [emailTemplate];\n }, 100);\n } else {\n $timeout(function() {\n vm.mailTemplates.push(emailTemplate);\n }, 100);\n }\n }\n };\n\n SignalRService.subscribe('emailTemplateCreated', emailTemplateCreatedHandler);\n}\n","import angular from 'angular';\n\nangular\n .module('cxSettings')\n .controller('AddTaskPeriodicityDialogCtrl', [\n '$element',\n '$scope',\n '$http',\n 'appUrls',\n 'flySvc',\n 'enumCacheSvc',\n 'translateListFilter',\n 'close',\n 'taskTemplateId',\n addTaskPeriodicityDialogCtrl,\n ]);\n\nfunction addTaskPeriodicityDialogCtrl(\n $element,\n $scope,\n $http,\n appUrls,\n flySvc,\n enumCacheSvc,\n translateListFilter,\n close,\n taskTemplateId,\n) {\n var vm = this;\n vm.showValidation = false;\n vm.translation = {};\n vm.period = null;\n vm.currentYear = new Date().getFullYear();\n vm.nextYear = vm.currentYear + 1;\n vm.deadlineDeviation = 0;\n vm.deadlineDeviationFactor = -1;\n vm.schedule = {\n name: '',\n planningDeviation: 0,\n };\n vm.dayOfWeek = [];\n vm.numberOfWeeks = null;\n vm.updateName = function(value) {\n vm.schedule.name = value;\n };\n vm.dayMonthOptions = {\n minMode: 'day',\n maxMode: 'month',\n showWeeks: false,\n formatDayTitle: 'MMMM',\n datepickerMode: 'month',\n formatMonthTitle: ' ',\n initDate: new Date(2000, 11, 31),\n // minDate: new Date(2000, 0, 1),\n // maxDate: new Date(2000, 11, 31),\n };\n vm.dayMonth = new Date(2000, 11, 31);\n\n enumCacheSvc.get('dayOfWeek').then(function(data) {\n vm.dayOfWeek = data.map(item => ({\n ...item,\n label: translateListFilter(item.key, 'dayOfWeek', item.value),\n checked: false,\n }));\n });\n vm.isValid = () => {\n if (!$scope.form) return false;\n if ($scope.form.$invalid) return false;\n if (vm.period === '300' && !vm.dayOfWeek.some(x => x.checked)) return false;\n\n return true;\n };\n vm.save = function() {\n if ($scope.form.$invalid) return;\n if (vm.translation && !vm.translation.isValid(true)) return;\n if (vm.period) {\n vm.schedule.lines = [];\n var lineType =\n vm.period === '1' || vm.period === '10' || vm.period === '20' || vm.period === '30' ? 0 : 1;\n if (vm.period == 100) {\n // Yearly\n if (!vm.dayMonth) return;\n vm.schedule.lines.push({\n type: 0,\n date: `2000-${vm.dayMonth.getMonth() + 1}-${vm.dayMonth.getDate()}`,\n deviation: 0,\n planningDate: null,\n });\n } else if (vm.period === '300') {\n vm.dayOfWeek\n .filter(x => x.checked)\n .forEach(x => {\n vm.schedule.lines.push({\n type: 10,\n date: null,\n deviation: 0,\n planningDate: null,\n dayOfWeek: x.key,\n numberOfWeeks: vm.numberOfWeeks,\n });\n });\n } else if (vm.period >= 200) {\n // Based on dynamic date\n lineType = parseInt(vm.period.slice(-2)); //lineType = last 2 digits from period: 2xx\n vm.schedule.lines.push({\n type: lineType,\n date: null,\n deviation: (vm.deadlineDeviation || 0) * vm.deadlineDeviationFactor,\n planningDate: null,\n });\n } else if (vm.period >= 30) {\n // bi-monthly\n var year = '2000';\n for (var i = 1; i <= 12; i += 6) {\n vm.schedule.lines.push({\n type: lineType,\n date: `${year}-${i}-1`,\n deviation: 0,\n planningDate: null,\n });\n }\n } else if (vm.period >= 20) {\n // bi-monthly\n var year = '2000';\n for (var i = 1; i <= 12; i += 2) {\n vm.schedule.lines.push({\n type: lineType,\n date: `${year}-${i}-1`,\n deviation: 0,\n planningDate: null,\n });\n }\n } else if (vm.period >= 10) {\n // Quarterly\n var year = '2000';\n for (var i = 1; i <= 12; i += 3) {\n vm.schedule.lines.push({\n type: lineType,\n date: `${year}-${i}-1`,\n deviation: 0,\n planningDate: null,\n });\n }\n } else {\n // Monthly\n var year = '2000';\n for (var i = 1; i <= 12; i++) {\n vm.schedule.lines.push({\n type: lineType,\n date: `${year}-${i}-1`,\n deviation: 0,\n planningDate: null,\n });\n }\n }\n }\n if (!vm.schedule.planningDeviation) vm.schedule.planningDeviation = 0;\n $http.post(appUrls.tasks + '/api/taskperiodicity/' + taskTemplateId, vm.schedule).then(\n function({ data = {} }) {\n if (data && data.id && vm.translation && vm.translation.save) {\n return vm.translation.save(data.id).then(function() {\n $element.modal('hide');\n close(data, 500);\n flySvc.success();\n return false;\n });\n } else {\n $element.modal('hide');\n close(data, 500);\n flySvc.success();\n return false;\n }\n },\n function(error) {\n flySvc.error(error);\n },\n );\n };\n vm.showValidationErrors = function() {\n vm.showValidation = true;\n if (vm.translation && vm.translation.isValid) vm.translation.isValid(true);\n };\n vm.cancel = function() {\n close(null, 500);\n };\n}\n","import angular from 'angular';\nimport { dynamicSortMultiple } from '@/shared/utils/dynamicSort';\n\nangular\n .module('cxSettings')\n .controller('AddTaskTemplateDialogCtrl', [\n '$element',\n '$scope',\n '$http',\n 'appUrls',\n 'flySvc',\n 'resourceFactorySvc',\n 'dataCache',\n 'translateListFilter',\n 'resourceNameFilter',\n 'enumCacheSvc',\n 'close',\n 'resources',\n 'costResources',\n addTaskTemplateDialogCtrl,\n ]);\n\nfunction addTaskTemplateDialogCtrl(\n $element,\n $scope,\n $http,\n appUrls,\n flySvc,\n resourceFactorySvc,\n dataCache,\n translateListFilter,\n resourceNameFilter,\n enumCacheSvc,\n close,\n resources,\n costResources,\n) {\n var vm = this;\n vm.showValidation = false;\n vm.translation = {};\n vm.template = {\n name: '',\n appliesToPerson: true,\n appliesToSoleProprietor: true,\n appliesToCompany: true,\n resourceId: dataCache.getDefaultCompany().defaultTaskResourceId,\n assignedType: 0,\n userId: null,\n profile: null,\n };\n vm.assignedTo = {\n assignedType: 0,\n userId: null,\n profile: null,\n };\n vm.resources = resources;\n vm.costResources = costResources;\n if (!vm.resources) {\n resourceFactorySvc.get('resource').reg(\n {\n type: 0,\n },\n function(data) {\n vm.resources = data.map(x => ({\n ...x,\n code: x.code | '',\n label: resourceNameFilter(x),\n }));\n },\n );\n }\n if (!vm.costResources) {\n resourceFactorySvc.get('resource').reg(\n {\n type: 1,\n },\n function(data) {\n vm.costResources = data\n .map(item => ({\n ...item,\n label: resourceNameFilter(item),\n code: item.code || '',\n }))\n .sort(dynamicSortMultiple('code', 'label'));\n },\n );\n }\n\n vm.users = dataCache\n .getArray('user')\n .filter(x => x.isActive || !x.hidden)\n .map(function(user) {\n return {\n id: user.userID,\n label: `${user.firstName} ${user.lastName}`,\n isActive: user.isActive,\n };\n })\n .sortByProperty('name');\n\n vm.profiles = [];\n enumCacheSvc.get('employeeprofile').then(function(data) {\n vm.profiles = data.map(({ key, value }) => ({\n id: key,\n value,\n label: translateListFilter(key, 'employeeprofile', value),\n }));\n });\n\n vm.assignedToChanged = function() {\n angular.extend(vm.template, vm.assignedTo);\n };\n\n vm.updateName = function(value) {\n vm.template.name = value;\n };\n\n vm.save = function() {\n if ($scope.form.$invalid) return;\n if (vm.translation && !vm.translation.isValid(true)) return;\n vm.saving = true;\n $http.post(appUrls.tasks + '/api/tasktemplates/templates', vm.template).then(\n function({ data = {} }) {\n vm.saving = false;\n if (data && data.id && vm.translation && vm.translation.save) {\n return vm.translation.save(data.id).then(function() {\n $element.modal('hide');\n close(data, 500);\n flySvc.success();\n return false;\n });\n } else {\n $element.modal('hide');\n close(data, 500);\n flySvc.success();\n return false;\n }\n },\n function(error) {\n vm.saving = false;\n flySvc.error(error);\n },\n );\n };\n\n vm.showValidationErrors = function() {\n vm.showValidation = true;\n if (vm.translation && vm.translation.isValid) vm.translation.isValid(true);\n };\n vm.cancel = function() {\n close(null, 500);\n };\n}\n","import angular from 'angular';\nimport moment from 'moment';\n\nangular\n .module('cxSettings')\n .controller('AddTemporaryLicenseDialogCtrl', [\n '$element',\n '$http',\n 'appUrls',\n 'flySvc',\n 'close',\n 'licenseInfo',\n addTemporaryLicenseDialogCtrl,\n ]);\n\nfunction addTemporaryLicenseDialogCtrl($element, $http, appUrls, flySvc, close, licenseInfo) {\n var vm = this;\n vm.price = licenseInfo.temporaryLicensePrice;\n const today = moment()\n .utc()\n .startOf('day');\n vm.months = 1;\n vm.license = {\n beginDate: moment.utc(today).toDate(),\n endDate: moment\n .utc(today)\n .add(1, 'months')\n .toDate(),\n isTemporary: true,\n userId: null,\n };\n vm.durationText = '';\n\n vm.beginDateOptions = {\n minDate: moment.utc(today).toDate(),\n };\n vm.endDateOptions = {\n minDate: moment\n .utc(today)\n .add(1, 'months')\n .toDate(),\n maxDate: moment\n .utc(today)\n .add(7, 'months')\n .toDate(),\n };\n\n vm.datesChanged = function() {\n if (vm.license.beginDate) {\n vm.endDateOptions.minDate = moment\n .utc(vm.license.beginDate)\n .add(1, 'months')\n .toDate();\n vm.endDateOptions.maxDate = moment\n .utc(vm.license.beginDate)\n .add(6, 'months')\n .toDate();\n }\n if (vm.license.endDate) {\n if (vm.license.endDate > vm.endDateOptions.maxDate) {\n vm.license.endDate = vm.endDateOptions.maxDate;\n }\n if (vm.license.endDate < vm.endDateOptions.minDate) {\n vm.license.endDate = vm.endDateOptions.minDate;\n }\n vm.months = moment\n .utc(vm.license.endDate)\n .diff(moment.utc(vm.license.beginDate), 'months', true);\n }\n };\n vm.datesChanged();\n vm.addMonths = function(nr) {\n vm.license.endDate = moment\n .utc(vm.license.endDate)\n .add(nr, 'months')\n .toDate();\n vm.datesChanged();\n };\n vm.setDuration = function(nr) {\n vm.license.endDate = moment\n .utc(vm.license.beginDate)\n .add(nr, 'months')\n .toDate();\n vm.datesChanged();\n };\n vm.save = function() {\n vm.saving = true;\n var model = {\n ...vm.license,\n beginDate: vm.license.beginDate.ISO(),\n endDate: vm.license.endDate.ISO(),\n };\n\n $http({\n method: 'post',\n url: appUrls.api + '/api/License/TemporaryLicense',\n data: model,\n })\n .success(function(result) {\n $element.modal('hide');\n close(result, 500);\n })\n .error(function(error) {\n flySvc.error(error.code, error.parameters);\n })\n .finally(function() {\n vm.saving = false;\n });\n };\n\n vm.cancel = function() {\n close(null, 500);\n };\n}\n","import angular from 'angular';\nimport adminpulse from '@/shared/utils/adminpulse';\n\nangular\n .module('cxSettings')\n .controller('PreviewInvoiceTemplateDialogCtrl', [\n '$element',\n '$http',\n '$timeout',\n 'close',\n 'appUrls',\n 'documentTemplateId',\n 'documentUrl',\n 'sampleTemplateId',\n 'sampleTemplateType',\n 'flySvc',\n previewInvoiceTemplateDialogCtrl,\n ]);\n\nfunction previewInvoiceTemplateDialogCtrl(\n $element,\n $http,\n $timeout,\n close,\n appUrls,\n documentTemplateId,\n documentUrl,\n sampleTemplateId,\n sampleTemplateType,\n flySvc,\n) {\n var vm = this;\n vm.loadingPreview = true;\n vm.invoicePreviewImage = null;\n\n var showArrayBufferError = function(error) {\n if (!error) return;\n try {\n var buffer = error.data || error;\n const errorObject = adminpulse.arrayBufferToObject(buffer) || {};\n flySvc.error(errorObject);\n } catch (ex) {\n console.error(ex);\n //Parsing error?\n flySvc.error();\n }\n };\n\n vm.generatePreview = function() {\n var url = '';\n if (sampleTemplateId && sampleTemplateType >= 0) {\n url = `${\n appUrls.api\n }/Api/DraftInvoice/PreviewSampleTemplate?id=${sampleTemplateId}&templateType=${sampleTemplateType}&now=${new Date().getTime()}`;\n } else if (documentTemplateId) {\n url = `${\n appUrls.api\n }/Api/DraftInvoice/PreviewTemplate/${documentTemplateId}?now=${new Date().getTime()}`;\n } else if (documentUrl) {\n vm.invoicePreviewImage = `${documentUrl}?now=${new Date().getTime()}`;\n vm.loadingPreview = false;\n }\n if (!url) return;\n vm.loadingPreview = true;\n vm.invoicePreviewImage = null;\n $http\n .get(url, {\n responseType: 'arraybuffer',\n })\n .then(\n response => {\n vm.loadingPreview = false;\n if (!response || !response.data) return;\n var blob = new Blob([response.data], { type: 'image/png' });\n var reader = new FileReader();\n reader.onload = function(evt) {\n $timeout(function() {\n vm.invoicePreviewImage = evt.target.result;\n }, 0);\n };\n reader.readAsDataURL(blob);\n },\n error => {\n vm.loadingPreview = false;\n showArrayBufferError(error);\n },\n );\n };\n vm.generatePreview();\n\n vm.cancel = function() {\n close(null, 500);\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cxSettings')\n .controller('InvoiceTextDialogCtrl', [\n '$element',\n '$scope',\n 'resourceFactorySvc',\n 'flySvc',\n 'close',\n 'invoiceText',\n 'dataCache',\n '$http',\n 'ModalService',\n 'appUrls',\n invoiceTextDialogCtrl,\n ]);\n\nfunction invoiceTextDialogCtrl(\n $element,\n $scope,\n resourceFactorySvc,\n flySvc,\n close,\n invoiceText,\n dataCache,\n $http,\n ModalService,\n appUrls,\n) {\n var vm = this;\n vm.showValidation = false;\n vm.translation = {};\n vm.languages = ['en', 'nl', 'fr'];\n vm.hasDraftInvoices = false;\n vm.invoiceText = angular.extend(\n {\n name: '',\n type: null,\n languages: {\n nl: '',\n fr: '',\n en: '',\n },\n },\n invoiceText,\n );\n\n dataCache.ready().then(function() {\n vm.languages = dataCache.getArray('language').map(x => x.code);\n });\n\n vm.updateName = function(value) {\n vm.invoiceText.name = value;\n };\n\n vm.save = function() {\n if ($scope.form.$invalid) return;\n vm.saving = true;\n resourceFactorySvc.get('invoiceText')[vm.invoiceText.id ? 'update' : 'save'](\n {},\n vm.invoiceText,\n function(result) {\n vm.saving = false;\n if (vm.translation && vm.translation.save && result.id) {\n vm.translation.save(result.id).then(function() {\n $element.modal('hide');\n close(result, 500);\n });\n } else {\n $element.modal('hide');\n close(result, 500);\n }\n },\n function(error) {\n vm.saving = false;\n flySvc.error(error.data.code, error.data.parameters);\n },\n );\n };\n vm.showValidationErrors = function() {\n vm.showValidation = true;\n if (vm.translation && vm.translation.isValid) vm.translation.isValid(true);\n };\n vm.cancel = function() {\n close(null, 500);\n };\n\n vm.showPlaceholders = function() {\n if (!vm.placeholders) {\n $http.get(appUrls.api + '/api/invoicetext/placeholders').then(\n function(result) {\n vm.placeholders = result.data;\n vm.showPlaceholders();\n },\n function(error) {\n flySvc.error(error.code, error.parameters);\n },\n );\n return;\n }\n\n ModalService.showModal({\n template: require('./placeholderDialog.html'),\n controller: 'PlaceholderDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n placeholders: vm.placeholders,\n taskParameterPlaceholders: [],\n context: 'invoicetext',\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n });\n };\n\n if (invoiceText && invoiceText.id) {\n $http.get(`${appUrls.api}/api/invoicetext/DraftCount/${invoiceText.id}`).then(({ data }) => {\n if (data && data.count > 0) {\n vm.hasDraftInvoices = true;\n vm.invoiceText.regenerateInDraftInvoices = true;\n }\n });\n }\n}\n","import angular from 'angular';\n\nangular\n .module('cxSettings')\n .factory('settingsDialogsSvc', ['$q', 'ModalService', settingsDialogsSvc]);\n\nfunction settingsDialogsSvc($q, ModalService) {\n function showModal(modalOptions) {\n var deferred = $q.defer();\n ModalService.showModal(modalOptions).then(function(modal) {\n modal.element.modal();\n modal.close.then(function(result) {\n if (result) deferred.resolve(result);\n else deferred.reject(null);\n }, deferred.reject);\n });\n return deferred.promise;\n }\n\n function showInvoiceTextDialog(invoiceText) {\n return showModal({\n template: require('./invoiceTextDialog.html'),\n controller: 'InvoiceTextDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n invoiceText: invoiceText,\n },\n });\n }\n\n function showAddTaskTemplateDialog(resources, costResources) {\n return showModal({\n template: require('./addTaskTemplateDialog.html'),\n controller: 'AddTaskTemplateDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n resources: resources,\n costResources: costResources,\n },\n });\n }\n function showCopyTaskTemplateDialog(template) {\n return showModal({\n template: require('./copyTaskTemplateDialog.html'),\n controller: 'CopyTaskTemplateDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: { template },\n });\n }\n\n function showAddSubTaskTemplateDialog(taskTemplate, resources, mailTemplates) {\n return showModal({\n template: require('./addSubTaskTemplateDialog.html'),\n controller: 'AddSubTaskTemplateDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n taskTemplate,\n resources,\n mailTemplates,\n },\n });\n }\n\n function showAddTaskScheduleDialog(templateId) {\n return showModal({\n template: require('./addTaskPeriodicityDialog.html'),\n controller: 'AddTaskPeriodicityDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: { taskTemplateId: templateId },\n });\n }\n function showCopyTaskPeriodicityDialog(schedule) {\n return showModal({\n template: require('./copyTaskPeriodicityDialog.html'),\n controller: 'CopyTaskPeriodicityDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: { schedule },\n });\n }\n\n function showTaskScheduleDialog(templateId) {\n return showModal({\n template: require('./taskScheduleDialog.html'),\n controller: 'TaskScheduleDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: { taskTemplateId: templateId },\n });\n }\n\n function showTaskParameterDefinitionsDialog(templateId) {\n return showModal({\n template: require('./taskParameterDefinitionsDialog.html'),\n controller: 'TaskParameterDefinitionsDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: { taskTemplateId: templateId },\n });\n }\n\n function showExportTaskTemplateSnippet(template) {\n return showModal({\n template: require('./exportTaskTemplateSnippetDialog.html'),\n controller: 'ExportTaskTemplateSnippetDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: { taskTemplate: template },\n });\n }\n function showImportTaskTemplateSnippet(data) {\n return showModal({\n template: require('./importTaskTemplateSnippetDialog.html'),\n controller: 'ImportTaskTemplateSnippetDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: { data },\n });\n }\n function showTaskTemplateTagsDialog(taskTemplateId, tags) {\n return showModal({\n template: require('./taskTemplateTagsDialog.html'),\n controller: 'TaskTemplateTagsDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: { taskTemplateId, tags },\n });\n }\n function editTaskTemplateRequiredDocumentTypes(taskTemplateId, requiredDocumentTypes) {\n return showModal({\n template: require('./taskTemplateRequiredDocumentTypesDialog.html'),\n controller: 'TaskTemplateRequiredDocumentTypesDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: { taskTemplateId, requiredDocumentTypes },\n });\n }\n\n function showEmailSignaturesDialog(companyId) {\n return showModal({\n template: require('./emailSignatureDialog.html'),\n controller: 'EmailSignatureDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: { companyId },\n });\n }\n\n return {\n newInvoiceText: function() {\n return showInvoiceTextDialog(null);\n },\n editInvoiceText: function(invoiceText) {\n return showInvoiceTextDialog(invoiceText);\n },\n addTaskTemplate: showAddTaskTemplateDialog,\n copyTaskTemplate: showCopyTaskTemplateDialog,\n addSubTaskTemplate: showAddSubTaskTemplateDialog,\n addTaskSchedule: showAddTaskScheduleDialog,\n copyTaskSchedule: showCopyTaskPeriodicityDialog,\n editTaskTemplateTags: showTaskTemplateTagsDialog,\n editTaskTemplateRequiredDocumentTypes: editTaskTemplateRequiredDocumentTypes,\n\n openTaskSchedules: showTaskScheduleDialog,\n openTaskParameterDefinitions: showTaskParameterDefinitionsDialog,\n exportTaskTemplateSnippet: showExportTaskTemplateSnippet,\n importTaskTemplateSnippet: showImportTaskTemplateSnippet,\n\n openEmailSignaturesDialog: showEmailSignaturesDialog,\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cxSettings')\n .controller('ChangeTwikeyAccountNumberDialogCtrl', [\n '$element',\n '$scope',\n 'flySvc',\n 'appUrls',\n '$http',\n 'close',\n '$window',\n 'openIbanSvc',\n changeTwikeyAccountNumberDialogCtrl,\n ]);\n\nfunction changeTwikeyAccountNumberDialogCtrl(\n $element,\n $scope,\n flySvc,\n appUrls,\n $http,\n close,\n $window,\n openIbanSvc,\n) {\n var vm = this;\n vm.accountDetails = {\n iban: null,\n bic: null,\n };\n\n vm.getBic = function() {\n if (!vm.accountDetails || !vm.accountDetails.iban) return;\n\n openIbanSvc.getBic(vm.accountDetails.iban).then(\n function(bic) {\n if (bic) vm.accountDetails.bic = bic;\n },\n function(error) {\n if (error && error.code) flySvc.error(error.code, error.parameters);\n },\n );\n };\n\n vm.submit = function() {\n $http.post(appUrls.api + '/api/license/UpdateTwikeyAccountNumber', vm.accountDetails).then(\n function(response) {\n if (response && response.data) {\n flySvc.success('msgChangeTwikeyAccountNumberSuccess');\n $element.modal('hide');\n close(response.data.accountNumber, 500);\n } else {\n flySvc.error('msgChangeTwikeyAccountNumberError');\n }\n },\n function(error) {\n if (error.data && error.data.code) flySvc.error(error.data.code, error.data.code);\n else flySvc.error('msgChangeTwikeyAccountNumberError');\n },\n );\n };\n\n vm.cancel = function() {\n $element.modal('hide');\n close(null, 500);\n };\n}\n","import angular from 'angular';\nimport { dynamicSortMultiple } from '@/shared/utils/dynamicSort';\n\nangular\n .module('cxSettings')\n .controller('CopyTaskTemplateDialogCtrl', [\n '$element',\n '$scope',\n '$http',\n 'appUrls',\n 'flySvc',\n 'close',\n 'template',\n copyTaskTemplateDialogCtrl,\n ]);\n\nfunction copyTaskTemplateDialogCtrl($element, $scope, $http, appUrls, flySvc, close, template) {\n var vm = this;\n vm.showValidation = false;\n vm.translation = {};\n vm.name = template.name;\n vm.template = angular.extend({}, template);\n\n vm.updateName = function(value) {\n vm.name = value;\n };\n\n vm.save = function() {\n if ($scope.form.$invalid) return;\n if (vm.translation && !vm.translation.isValid(true)) return;\n vm.saving = true;\n $http\n .post(`${appUrls.tasks}/api/tasktemplates/copy/${vm.template.id}`, null, {\n params: { name: vm.name },\n })\n .then(\n function({ data = {} }) {\n vm.saving = false;\n if (data && data.id && vm.translation && vm.translation.save) {\n return vm.translation.save(data.id).then(function() {\n $element.modal('hide');\n close(data, 500);\n flySvc.success('msgTaskTemplateCopied');\n return false;\n });\n } else {\n $element.modal('hide');\n close(data, 500);\n flySvc.success('msgTaskTemplateCopied');\n return false;\n }\n },\n function(error) {\n vm.saving = false;\n flySvc.error(error);\n },\n );\n };\n\n vm.showValidationErrors = function() {\n vm.showValidation = true;\n if (vm.translation && vm.translation.isValid) vm.translation.isValid(true);\n };\n vm.cancel = function() {\n close(null, 500);\n };\n}\n","import angular from 'angular';\nimport { dynamicSortMultiple } from '@/shared/utils/dynamicSort';\n\nangular\n .module('cxSettings')\n .controller('CopyTaskPeriodicityDialogCtrl', [\n '$element',\n '$scope',\n '$http',\n 'appUrls',\n 'flySvc',\n 'close',\n 'schedule',\n copyTaskPeriodicityDialogCtrl,\n ]);\n\nfunction copyTaskPeriodicityDialogCtrl($element, $scope, $http, appUrls, flySvc, close, schedule) {\n var vm = this;\n vm.showValidation = false;\n vm.translation = {};\n vm.name = schedule.name;\n vm.schedule = angular.extend({}, schedule);\n\n vm.updateName = function(value) {\n vm.name = value;\n };\n\n vm.save = function() {\n if ($scope.form.$invalid) return;\n if (vm.translation && !vm.translation.isValid(true)) return;\n vm.saving = true;\n $http\n .post(`${appUrls.tasks}/api/TaskPeriodicity/copy/${vm.schedule.id}`, null, {\n params: { name: vm.name },\n })\n .then(\n function({ data = {} }) {\n vm.saving = false;\n if (data && data.id && vm.translation && vm.translation.save) {\n return vm.translation.save(data.id).then(function() {\n $element.modal('hide');\n close(data, 500);\n flySvc.success();\n return false;\n });\n } else {\n $element.modal('hide');\n close(data, 500);\n flySvc.success();\n return false;\n }\n },\n function(error) {\n vm.saving = false;\n flySvc.error(error);\n },\n );\n };\n\n vm.showValidationErrors = function() {\n vm.showValidation = true;\n if (vm.translation && vm.translation.isValid) vm.translation.isValid(true);\n };\n vm.cancel = function() {\n close(null, 500);\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cxSettings')\n .controller('DeleteInvoiceTextConfirmDialogCtrl', [\n '$element',\n '$scope',\n 'close',\n 'relations',\n 'schedules',\n deleteInvoiceTextConfirmDialogCtrl,\n ]);\n\nfunction deleteInvoiceTextConfirmDialogCtrl($element, $scope, close, relations, schedules) {\n var vm = this;\n vm.schedules = schedules;\n vm.relations = relations;\n\n vm.close = function(result) {\n close(result, 500);\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cloudX')\n .controller('DeleteTaskPeriodicityLineDialogCtrl', [\n '$scope',\n 'appMessages',\n 'close',\n 'relations',\n deleteTaskPeriodicityLineDialogCtrl,\n ]);\n\nfunction deleteTaskPeriodicityLineDialogCtrl($scope, appMessages, close, relations) {\n $scope.relations = relations;\n $scope.close = function(result) {\n close(result, 500);\n //$element.modal('hide');\n };\n $scope.cancel = function() {\n //$element.modal('hide');\n close(null, 500);\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cxSettings')\n .controller('PlaceholderDialogCtrl', [\n 'translateListFilter',\n 'placeholders',\n 'taskParameterPlaceholders',\n 'context',\n placeholderDialogCtrl,\n ]);\n\nfunction placeholderDialogCtrl(\n translateListFilter,\n placeholders,\n taskParameterPlaceholders,\n context,\n) {\n var vm = this;\n vm.searchValue = '';\n vm.placeholders = placeholders.map(p => {\n const tag = p;\n const description = translateListFilter(tag, 'mailplaceholder') || ' ';\n return { tag, description };\n });\n vm.taskParameterPlaceholders = taskParameterPlaceholders;\n vm.context = context;\n}\n","import angular from 'angular';\n\nangular\n .module('cxSettings')\n .controller('AddInvoiceTemplateDialogCtrl', [\n '$element',\n '$http',\n 'appUrls',\n 'dataCache',\n 'flySvc',\n 'companyId',\n 'templateTypes',\n 'close',\n addInvoiceTemplateDialogCtrl,\n ]);\n\nfunction addInvoiceTemplateDialogCtrl(\n $element,\n $http,\n appUrls,\n dataCache,\n flySvc,\n companyId,\n templateTypes,\n close,\n) {\n var vm = this;\n vm.companies = dataCache.getArray('company');\n vm.multipleCompanies = vm.companies.length > 1;\n vm.templateTypes = templateTypes;\n vm.documentTemplate = {\n languageCode: null,\n templateType: null,\n name: '',\n file: null,\n companyId: companyId || dataCache.getArray('defaultcompany').id,\n };\n vm.showValidation = false;\n\n vm.templateUploaded = function(file) {\n if (!file) return;\n vm.documentTemplate.file = file;\n };\n\n vm.save = function() {\n vm.saving = true;\n var data = new FormData();\n data.append('name', vm.documentTemplate.name);\n data.append('languageCode', vm.documentTemplate.languageCode);\n data.append('templateType', vm.documentTemplate.templateType);\n data.append('companyId', vm.documentTemplate.companyId);\n data.append('data', vm.documentTemplate.file.data);\n\n $http({\n method: 'post',\n url: appUrls.api + '/api/documentTemplate/template',\n headers: {\n 'Content-Type': undefined,\n },\n data: data,\n })\n .success(function(result) {\n $element.modal('hide');\n close(result, 500);\n })\n .error(function(error) {\n flySvc.error(error.code, error.parameters);\n })\n .finally(function() {\n vm.saving = false;\n });\n };\n\n vm.cancel = function() {\n close(null, 500);\n };\n\n vm.deleteAttachment = function() {\n if (!vm.documentTemplate.file) return;\n\n vm.documentTemplate.file = undefined;\n };\n\n vm.isAdvancedUpload = (function() {\n var div = document.createElement('div');\n return (\n ('draggable' in div || ('ondragstart' in div && 'ondrop' in div)) &&\n 'FormData' in window &&\n 'FileReader' in window\n );\n })();\n}\n","import angular from 'angular';\n\nangular\n .module('cxSettings')\n .controller('SetPaymentProviderConfirmDialogCtrl', [\n '$element',\n '$scope',\n 'close',\n '$window',\n 'nrLicenses',\n 'paymentProvider',\n 'billingPeriod',\n 'discountAmount',\n 'totalAmount',\n 'dataCache',\n 'resourceFactorySvc',\n 'flySvc',\n '$q',\n setPaymentProviderConfirmDialogCtrl,\n ]);\n\nfunction setPaymentProviderConfirmDialogCtrl(\n $element,\n $scope,\n close,\n $window,\n nrLicenses,\n paymentProvider,\n billingPeriod,\n discountAmount,\n totalAmount,\n dataCache,\n resourceFactorySvc,\n flySvc,\n $q,\n) {\n var vm = this;\n var resource = resourceFactorySvc.get('company');\n vm.totalAmount = totalAmount;\n vm.nrLicenses = nrLicenses;\n vm.paymentProvider = paymentProvider;\n vm.billingPeriod = billingPeriod;\n vm.discountAmount = discountAmount;\n vm.company = dataCache.getDefaultCompany();\n vm.saving = false;\n\n vm.saveCompany = function($data, field, showSuccess = true) {\n if (vm.saving) {\n return $q.when('');\n }\n //Validation error\n if (typeof $data === 'undefined') {\n if (vm.errors) {\n for (var error in vm.errors) {\n if (vm.errors.hasOwnProperty(error) && error[0] !== '$') {\n if (vm.errors[error].code) {\n if (vm.errors[error].code === 3000) flySvc.error('msgRequiredField');\n else flySvc.error(vm.errors[error].code, vm.errors[error].parameters, field);\n }\n }\n }\n }\n return $q.when('');\n }\n\n // if new value = old value do nothing\n if (angular.equals(vm.company[field], $data)) return $q.when(false);\n\n var model = angular.copy(vm.company);\n model[field] = $data;\n\n vm.saving = true;\n // put copy to server\n return resource.update(model).$promise.then(\n function(success) {\n // success callback: replace the value in (the field in) company with the new value\n // this is usually 1 field, but when Iban is changed it is 2 fields (iban + bic)\n angular.extend(vm.company, success);\n\n const dataCacheCompany = dataCache.getArray('company').find(x => x.id == vm.company.id);\n\n if (dataCacheCompany) {\n angular.extend(dataCacheCompany, $scope.activeCompany);\n }\n\n if (success.foundInKBO === null || success.foundInKBO === true) {\n } else if (checkTenantConfiguration('[0,1]')) {\n flySvc.message('msgCompanyCBENotFound');\n }\n vm.saving = false;\n return false;\n },\n function(error) {\n vm.saving = false;\n // error callback return error? (edit remains open)\n flySvc.error(error.data.code, error.data.parameters);\n return '';\n },\n );\n };\n\n vm.validate = function() {\n if (!vm.company.enterpriseNumber && !vm.company.kvkNumber) return false;\n if (\n !vm.company.address.street1 ||\n !vm.company.address.zipCode ||\n !vm.company.address.city ||\n !vm.company.address.country\n )\n return false;\n\n return true;\n };\n\n vm.submit = function() {\n if (vm.validate()) {\n $element.modal('hide');\n close(true, 500);\n } else {\n flySvc.error('msgRequiredEnterpriseNumberAndAddress');\n }\n };\n\n vm.cancel = function() {\n $element.modal('hide');\n close(null, 500);\n };\n}\n","import AuthService from '@/shared/services/AuthService';\nimport angular from 'angular';\nimport moment from 'moment';\n\nangular\n .module('cxSettings')\n .controller('TaskScheduleDialogCtrl', [\n '$http',\n '$q',\n '$timeout',\n 'appUrls',\n 'settingsDialogsSvc',\n 'flySvc',\n 'dialogsSvc',\n 'checkFeature',\n '$translate',\n '$element',\n '$scope',\n 'close',\n 'taskTemplateId',\n 'ModalService',\n 'enumCacheSvc',\n 'translateListFilter',\n taskScheduleDialogCtrl,\n ]);\nfunction taskScheduleDialogCtrl(\n $http,\n $q,\n $timeout,\n appUrls,\n settingsDialogsSvc,\n flySvc,\n dialogsSvc,\n checkFeature,\n $translate,\n $element,\n $scope,\n close,\n taskTemplateId,\n ModalService,\n enumCacheSvc,\n translateListFilter,\n) {\n const vm = this;\n vm.schedules = [];\n vm.loading = true;\n vm.dayMonthOptions = {\n minMode: 'day',\n maxMode: 'month',\n showWeeks: false,\n formatDayTitle: 'MMMM',\n datepickerMode: 'month',\n formatMonthTitle: ' ',\n initDate: moment\n .utc()\n .startOf('day')\n .set({\n year: 2000,\n })\n .toDate(),\n // minDate: new Date(2000, 0, 1),\n // maxDate: new Date(2000, 11, 31),\n };\n vm.datepickerOptions = {\n startingDay: 1,\n };\n vm.planningButtonDisabled = false;\n\n enumCacheSvc.get('periodicitylinetype').then(function (data) {\n // devops #20846, filter out \"fixed/eenmalige planningen\"\n vm.lineTypes = data\n .filter((x) => x.key !== 1)\n .map((item) => ({\n ...item,\n label: translateListFilter(item.key, 'periodicitylinetype', item.value),\n }));\n });\n\n const lang = $translate.use().split('-')[0];\n vm.fodUrl =\n lang === 'nl'\n ? 'https://financien.belgium.be/nl/E-services/biztax/indieningstermijnen-aangiften'\n : lang === 'fr'\n ? 'https://finances.belgium.be/fr/E-services/biztax/delais-de-rentree-des-declarations'\n : null;\n\n const mapLine = function (line) {\n if (!line) return line;\n if (line.date && typeof line.date === 'string') line.date = new Date(line.date.substr(0, 10));\n if (line.planningDate && typeof line.planningDate === 'string')\n line.planningDate = new Date(line.planningDate.substr(0, 10));\n\n return line;\n };\n const mapSchedule = function (schedule) {\n if (!schedule.lines) schedule.lines = [];\n schedule.lines = schedule.lines.map(mapLine);\n return schedule;\n };\n\n vm.getAllowedLineTypes = (schedule) => {\n if (!vm.lineTypes) return [];\n\n if (!schedule || !schedule.lines || schedule.lines.length <= 1) return vm.lineTypes;\n\n if (schedule.lines.some((x) => x.type === 10)) {\n return vm.lineTypes.filter((x) => x.key === 10);\n }\n return vm.lineTypes.filter((x) => x.key !== 10);\n };\n\n $http.get(appUrls.tasks + '/api/taskperiodicity/' + taskTemplateId).then(function (response) {\n vm.schedules = response.data.map(mapSchedule);\n if (vm.schedules.length < 3) {\n vm.schedules.forEach((x) => (x.showDetails = true));\n }\n vm.loading = false;\n });\n\n vm.toggleDetails = function (schedule) {\n schedule.showDetails = !schedule.showDetails;\n };\n\n vm.calcPlanningDate = function (schedule, line) {\n if (!schedule || !line || !line.date || line.type >= 2) return null;\n\n var date = line.date;\n if (typeof date === 'string') date = new moment(date.substr(0, 10)).toDate();\n else date = new Date(date.getTime()); //Create copy\n\n date.setDate(date.getDate() - (schedule.planningDeviation || 0));\n if (line.type === 0) {\n date.setFullYear(2000);\n }\n return date;\n };\n\n vm.duplicate = function (schedule) {\n if (schedule && schedule.lines && schedule.lines.some((l) => l.type === 1)) {\n flySvc.error(1042, null, null, 'TaskDomainExceptionCode');\n return;\n }\n\n settingsDialogsSvc.copyTaskSchedule(schedule).then(function (result) {\n if (result) {\n var idx = vm.schedules.indexOf(schedule);\n if (idx >= 0) {\n vm.schedules.splice(idx + 1, 0, result);\n } else {\n vm.schedules.push(result);\n vm.schedules = vm.schedules.sortByProperty('name');\n }\n }\n });\n };\n\n vm.remove = function (schedule) {\n if (!schedule || !schedule.id || schedule.isLocked) return;\n $http\n .get(appUrls.tasks + '/api/TaskPeriodicity/PeriodicityInUse/' + schedule.id)\n .then(function ({ data }) {\n if (data && data.length) {\n // cant delete periodicity while its used by schedules\n ModalService.showModal({\n template: require('./relationsUsingTaskPeriodicityDialog.html'),\n controller: 'RelationsUsingTaskPeriodicityDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n relations: data,\n },\n }).then(function (modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function (e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n });\n } else {\n dialogsSvc\n .showYesNo('msgConfirmDeleteTitle', 'msgConfirmDeleteTaskSchedule')\n .then(function () {\n $http.delete(appUrls.tasks + '/api/TaskPeriodicity/' + schedule.id).then(function () {\n var idx = vm.schedules.indexOf(schedule);\n if (idx >= 0) vm.schedules.splice(idx, 1);\n });\n });\n }\n });\n };\n\n vm.update = function (schedule, data, field) {\n if (field === 'planningDeviation' && !data) data = 0;\n if (schedule[field] === data) return false;\n var model = angular.copy(schedule);\n model[field] = data;\n\n delete model.lines;\n return $http.put(appUrls.tasks + '/api/TaskPeriodicity/', model).then(\n function (response) {\n if (response && response.data) {\n angular.extend(schedule, mapSchedule(response.data));\n }\n flySvc.success();\n return false;\n },\n function (error) {\n flySvc.error(error);\n return '';\n },\n );\n };\n\n vm.updateLine = function (schedule, line, data, field) {\n if (!line.id) return true; // =New lines\n if (typeof data === 'undefined') return ''; //Validation error\n if (line[field] === data) return false;\n\n if (field === 'date' && (line.type === 0 || line.type === 1) && !data) {\n return ' ';\n }\n var model = angular.copy(line);\n model[field] = data;\n\n if (field === 'type' && data === 1 && model.date) {\n if (model.date.getFullYear() <= 2000) {\n var now = new Date();\n model.date.setFullYear(now.getFullYear());\n if (model.date < now) model.date.setFullYear(now.getFullYear() + 1);\n }\n }\n\n if (model.date && model.date instanceof Date) model.date = moment.utc(model.date);\n if (model.planningDate && model.planningDate instanceof Date)\n model.planningDate = moment.utc(model.planningDate);\n\n return $http.put(appUrls.tasks + '/api/TaskPeriodicity/Lines', model).then(\n function (response) {\n if (response && response.data) angular.extend(line, mapLine(response.data));\n\n if (line.type === 10) {\n schedule.cleanupMonths = 12; //This was already updated in the backend (but it's not in the response)\n }\n flySvc.success();\n return false;\n },\n function (error) {\n flySvc.error(\n error.data ? error.data.code : null,\n error.data ? error.data.parameters : null,\n null,\n error.data ? error.data.type : null,\n );\n return '';\n },\n );\n };\n var deleteLineCall = function (schedule, line, deleteTasks = false) {\n return $http\n .delete(`${appUrls.tasks}/api/TaskPeriodicity/Lines/${line.id}`, {\n params: {\n deleteTasks,\n },\n })\n .then(\n function () {\n var idx = schedule.lines.indexOf(line);\n if (idx >= 0) schedule.lines.splice(idx, 1);\n flySvc.success();\n },\n function (error) {\n flySvc.error(error);\n return '';\n },\n );\n };\n\n vm.removeLine = function (schedule, line) {\n if (!schedule || !schedule.id || schedule.isLocked) return;\n if (!line.id) {\n // =New line\n var idx = schedule.lines.indexOf(line);\n if (idx >= 0) schedule.lines.splice(idx, 1);\n } else {\n $http\n .get(appUrls.tasks + '/api/TaskPeriodicity/PeriodicityInUse/' + schedule.id)\n .then(function ({ data }) {\n if (data && data.length) {\n // cant delete periodicity line while periodicty is used by schedules on relations\n ModalService.showModal({\n template: require('./deleteTaskPeriodicityLineDialog.html'),\n controller: 'DeleteTaskPeriodicityLineDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n relations: data,\n },\n }).then(function (modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function (e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n modal.close.then(function (deleteTasks) {\n if (deleteTasks === null) return;\n\n deleteLineCall(schedule, line, deleteTasks);\n });\n });\n } else {\n dialogsSvc\n .showYesNo('msgConfirmDeleteTitle', 'msgConfirmDeleteTaskScheduleLine')\n .then(function () {\n deleteLineCall(schedule, line, false);\n });\n }\n });\n }\n };\n\n vm.addNewLine = function (schedule) {\n var type = 0;\n var date = null;\n if (schedule.lines) {\n if (schedule.lines.length) {\n type = schedule.lines[schedule.lines.length - 1].type;\n }\n if (schedule.lines.length >= 2) {\n var date1 = schedule.lines[schedule.lines.length - 2].date;\n var date2 = schedule.lines[schedule.lines.length - 1].date;\n if (date1 && date2) {\n date = new Date(date2.getTime() + (date2 - date1));\n }\n }\n }\n if (type === 1) type = 0;\n var line = {\n type,\n date: date ? date.ISO() : null,\n planningDate: null,\n deviation: 0,\n };\n line.saving = true;\n $http\n .post(appUrls.tasks + '/api/TaskPeriodicity/Lines/' + schedule.id, line)\n .then(\n function (response) {\n if (response && response.data) schedule.lines.push(mapLine(response.data));\n flySvc.success();\n return false;\n },\n function (error) {\n flySvc.error(error);\n return '';\n },\n )\n .finally(function () {\n line.saving = false;\n });\n };\n\n vm.addSchedule = function () {\n settingsDialogsSvc.addTaskSchedule(taskTemplateId).then(function (result) {\n if (result) {\n var schedule = mapSchedule(result);\n schedule.showDetails = true;\n vm.schedules.push(schedule);\n }\n });\n };\n\n vm.translateSchedule = function (schedule) {\n dialogsSvc\n .translateListItem('taskperiodicity', schedule.id, schedule.name, { maxlength: 500 })\n .then(function (result) {\n if (result && result.defaultValue) {\n vm.update(schedule, result.defaultValue, 'name');\n }\n });\n };\n vm.getPlanningDateOptions = function (orgOptions, schedule, line) {\n var options = angular.extend({}, orgOptions);\n if (!line.planningDate) {\n const planningDate = vm.calcPlanningDate(schedule, line);\n if (planningDate) {\n options.initDate = new moment(planningDate).toDate();\n if (options.initDate) options.datepickerMode = 'day';\n }\n }\n return options;\n };\n vm.planTasks = function () {\n vm.planningButtonDisabled = true;\n $http.post(appUrls.tasks + '/api/TaskTemplates/Plan/' + taskTemplateId).then(\n function (response) {\n if (response && response.data) {\n flySvc.success('msgTaskPlanningXSchedulesQueued', { count: response.data });\n } else {\n flySvc.message('msgTaskPlanningNothingQueued');\n }\n return false;\n },\n function (error) {\n flySvc.error(error);\n return '';\n },\n );\n };\n vm.getCleanupMonthsLabel = (months) => {\n if (!months) return $translate.instant('NoCleanup');\n if (months === 12) return `1 ${$translate.instant('year')}`;\n if (months % 12 === 0) return `${months / 12} ${$translate.instant('years')}`;\n if (months === 1) return `1 ${$translate.instant('month')}`;\n return `${months} ${$translate.instant('months')}`;\n };\n vm.getCleanupMonthsLabelForColumn = (months) => {\n const label = vm.getCleanupMonthsLabel(months);\n if (!months) return label;\n return $translate.instant('Cleanup after {{value}} after deadline', { value: label });\n };\n vm.getCleanupMonthOptions = (schedule) => {\n if (schedule.lines.some((x) => x.type === 10)) return [12];\n return [null, 12, 24, 36, 48, 60];\n };\n vm.updateCleanupMonths = (schedule, months) => {\n if (schedule.cleanupMonths === months) return false;\n if (!months) return vm.update(schedule, null, 'cleanupMonths');\n\n //Get delete count\n return $http\n .get(appUrls.tasks + '/api/PlannedTasks/CleanupCount/' + schedule.id, {\n params: {\n months,\n },\n })\n .then(\n ({ data: count = 0 } = {}) => {\n if (count > 0) {\n //The count is limited to 1001 in the backend to make the query faster\n const msg =\n count > 1000 ? 'msgConfirmCleanupMonthsAtLeast1000' : 'msgConfirmCleanupMonths';\n\n return dialogsSvc\n .showYesNo('msgConfirmCleanupMonthsTitle', msg, {\n count,\n value: vm.getCleanupMonthsLabel(months),\n })\n .then(\n () => vm.update(schedule, months, 'cleanupMonths'), //Yes, do update\n () => false, //No, cancel\n );\n }\n\n return vm.update(schedule, months, 'cleanupMonths');\n },\n function (error) {\n flySvc.error(error);\n return '';\n },\n );\n };\n\n vm.cancel = function () {\n close({ count: vm.schedules.length }, 500);\n };\n\n vm.showReferenceYear = (schedule) => {\n if (!AuthService.hasFeature('ReferenceYear')) return false;\n\n if (schedule) {\n return schedule.lines.some((x) => x.type === 0);\n } else {\n for (var i = 0; i < vm.schedules.length; i++) {\n schedule = vm.schedules[i];\n const hasYearlyScheduleLine = schedule.lines.some((x) => x.type === 0);\n if (hasYearlyScheduleLine) return true;\n }\n }\n\n return false;\n };\n vm.showReferenceYearOnLine = (line) => {\n // only show on yearly schedules\n return AuthService.hasFeature('ReferenceYear') && line.type === 0;\n };\n\n vm.referenceYearTypePlaceholder = (schedule) => {\n if (!schedule.referenceYearType) return '';\n\n return `${translateListFilter(\n schedule.referenceYearType,\n 'taskReferenceYearType',\n schedule.referenceYearType,\n )} (${$translate.instant('GeneralSetting')})`;\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cxSettings')\n .controller('TaskParameterDefinitionsDialogCtrl', [\n 'resourceFactorySvc',\n 'dialogsSvc',\n 'flySvc',\n '$element',\n 'close',\n 'appUrls',\n '$http',\n 'taskTemplateId',\n 'ModalService',\n taskParameterDefinitionsDialogCtrl,\n ]);\n\nfunction taskParameterDefinitionsDialogCtrl(\n resourceFactorySvc,\n dialogsSvc,\n flySvc,\n $element,\n close,\n appUrls,\n $http,\n taskTemplateId,\n ModalService,\n) {\n var vm = this;\n vm.definitions = [];\n vm.taskTemplateId = taskTemplateId;\n\n var showError = function(error) {\n flySvc.error(error.data.code, error.data.parameters, null, error.data.type);\n return '';\n };\n\n $http\n .get(`${appUrls.tasks}/api/TaskParameters/Definitions/${taskTemplateId}`)\n .then(function({ data }) {\n vm.definitions = data;\n }, showError);\n\n vm.save = function() {\n $element.modal('hide');\n close({ count: vm.definitions.length }, 500);\n };\n\n vm.cancel = function() {\n $element.modal('hide');\n close({ count: vm.definitions.length }, 500);\n };\n\n vm.submit = function(definition, value, field) {\n if (field !== 'transferToNextPeriod' && !value) return false;\n if (angular.equals(definition[field], value)) return false;\n\n var model = angular.copy(definition);\n model[field] = value;\n\n return $http.put(appUrls.tasks + '/api/TaskParameters/UpdateDefinition', model).then(\n function(result) {\n if (result) {\n flySvc.success('msgConfirmChange');\n return true;\n }\n return '';\n },\n function(error) {\n showError(error);\n return '';\n },\n );\n };\n\n vm.openDefinitionOptions = parameterDefinition => {\n ModalService.showModal({\n template: require('./taskParameterDefinitionOptionsDialog.html'),\n controller: 'TaskParameterDefinitionOptionsDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n parameterDefinition: parameterDefinition,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n modal.close.then(function(parameterDefinition) {\n if (!parameterDefinition) return;\n var definition = vm.definitions.find(x => x.id === parameterDefinition.id);\n if (!!definition) {\n angular.extend(definition, parameterDefinition);\n }\n });\n });\n };\n\n const addParameterContinuation = modal => {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n modal.close.then(function(parameterDefinition) {\n if (!parameterDefinition) return;\n vm.definitions.push(parameterDefinition);\n flySvc.success('SuccessTitle');\n });\n };\n\n vm.openNewParameterDefinitionDialog = function() {\n ModalService.showModal({\n template: require('./addTaskParameterDefinitionDialog.html'),\n controller: 'AddTaskParameterDefinitionDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n taskTemplateId: taskTemplateId,\n },\n }).then(addParameterContinuation);\n };\n\n vm.openNewRelationFieldDefinitionDialog = function() {\n ModalService.showModal({\n template: require('./addRelationFieldDefinitionDialog.html'),\n controller: 'AddRelationFieldDefinitionDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n taskTemplateId: taskTemplateId,\n definitions: vm.definitions,\n },\n }).then(addParameterContinuation);\n };\n\n vm.deleteDefinition = function(id) {\n dialogsSvc.showYesNo('msgConfirmDeleteTitle', 'msgDeleteTaskParameter').then(function() {\n $http\n .delete(`${appUrls.tasks}/api/TaskParameters/DeleteDefinition/${id}`)\n .then(function(result) {\n if (vm.definitions) {\n for (var t = 0; t < vm.definitions.length; t++) {\n if (vm.definitions[t].id === id) {\n vm.definitions.splice(t, 1);\n break;\n }\n }\n }\n }, showError);\n });\n };\n\n vm.move = function(id, up) {\n if (!id) return false;\n return $http\n .put(appUrls.tasks + '/api/TaskParameters/MoveDefinition', {\n taskTemplateId: taskTemplateId,\n parameterId: id,\n up: !!up,\n })\n .then(\n function({ data }) {\n if (data && data.length) {\n data.forEach(r => {\n var definition = vm.definitions.find(x => x.id === r.id);\n if (!!definition) {\n angular.extend(definition, r);\n }\n });\n flySvc.success('msgConfirmChange');\n return true;\n }\n return '';\n },\n function(error) {\n showError(error);\n return '';\n },\n );\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cxSettings')\n .controller('AddTaskParameterDefinitionDialogCtrl', [\n '$http',\n 'appUrls',\n 'flySvc',\n 'resourceFactorySvc',\n 'close',\n 'taskTemplateId',\n '$element',\n '$filter',\n addTaskParameterDefinitionDialogCtrl,\n ]);\n\nfunction addTaskParameterDefinitionDialogCtrl(\n $http,\n appUrls,\n flySvc,\n resourceFactorySvc,\n close,\n taskTemplateId,\n $element,\n $filter,\n) {\n var vm = this;\n vm.parameterDefinition = {\n taskTemplateId: taskTemplateId,\n parameterValueType: 0, // Default to text\n systemParameterType: null,\n computedParameterType: null,\n };\n vm.showValidation = false;\n vm.selectionItems = [];\n\n // Copied from C# code to have labeled enum constants\n let systemParameterValueTypes = { text: 0, numeric: 1, date: 2, boolean: 3, selectionList: 4 };\n let systemParameterType = {\n vatBalanceAmount: 3,\n vatDecemberAdvanceAmount: 4,\n vatAdvanceOneAmount: 5,\n vatAdvanceTwoAmount: 6,\n fgovIntracomAmount: 7,\n submissionConfirmationNumber: 9,\n taxableIncome: 10,\n payableWithholdingTax: 11,\n nihilCustomerListingOnVatDeclaration: 12,\n noIntraCommunityVatDeclared: 13,\n nbbAnnualAccountFilingDate: 14,\n nbbAnnualAccountAmount: 15,\n pitCalculationAmount: 16,\n pitIsAmountToReceive: 17,\n structuredRemittanceInformation: 18,\n ibanNumberDestinationAccount: 19,\n vatRefundRequested: 20,\n vatAccountCurrentBalance: 21\n };\n\n // Copied from Packages => SystemParameterValueTypeMapping\n let mapSystemParameterType = systemParameter => {\n switch (systemParameter) {\n case systemParameterType.nihilCustomerListingOnVatDeclaration:\n case systemParameterType.noIntraCommunityVatDeclared:\n case systemParameterType.pitIsAmountToReceive:\n case systemParameterType.vatRefundRequested:\n return systemParameterValueTypes.boolean;\n case systemParameterType.nbbAnnualAccountFilingDate:\n return systemParameterValueTypes.date;\n case systemParameterType.ibanNumberDestinationAccount:\n case systemParameterType.structuredRemittanceInformation:\n case systemParameterType.submissionConfirmationNumber:\n return systemParameterValueTypes.text;\n default:\n return systemParameterValueTypes.numeric;\n }\n }\n\n let computedParameterType = {\n vatAmount: 1,\n vatAdvanceAmountOne: 2,\n vatAdvanceAmountTwo: 3,\n vatFlagToPay: 4,\n vatFlagToBeRefunded: 5,\n vatFlagTransferredToNextPeriod: 6\n }\n\n // Copied from Packages => SystemParameterValueTypeMapping\n let mapComputedParameterType = computedParameter => {\n switch (computedParameter) {\n case computedParameterType.vatAmount:\n case computedParameterType.vatAdvanceAmountOne:\n case computedParameterType.vatAdvanceAmountTwo:\n return systemParameterValueTypes.numeric;\n case computedParameterType.vatFlagToPay:\n case computedParameterType.vatFlagToBeRefunded:\n case computedParameterType.vatFlagTransferredToNextPeriod:\n return systemParameterValueTypes.boolean;\n default:\n return systemParameterValueTypes.numeric;\n }\n };\n\n vm.systemParameterTypeChanged = function (value) {\n vm.parameterDefinition.computedParameterType = undefined;\n if (vm.parameterDefinition.systemParameterType > 0) {\n vm.parameterDefinition.parameterValueType = mapSystemParameterType(vm.parameterDefinition.systemParameterType);\n }\n }\n\n vm.computedParameterTypeChanged = function (value) {\n vm.parameterDefinition.systemParameterType = undefined;\n if (vm.parameterDefinition.computedParameterType > 0) {\n vm.parameterDefinition.parameterValueType = mapComputedParameterType(vm.parameterDefinition.computedParameterType);\n }\n }\n\n vm.addSelectionItem = () => {\n vm.selectionItems.push('');\n };\n vm.onSelectionItemChanged = index => {\n vm.selectionItems[index] = vm.selectionItems[index].replace(';', '');\n };\n\n vm.save = function () {\n if (vm.parameterDefinition.parameterValueType === 4 && !vm.selectionItems.length) return;\n if (vm.parameterDefinition.parameterValueType === 4) {\n vm.parameterDefinition = {\n ...vm.parameterDefinition,\n selectionItems: vm.selectionItems.join(';'),\n };\n }\n\n vm.saving = true;\n $http.post(`${appUrls.tasks}/api/TaskParameters/CreateDefinition`, vm.parameterDefinition).then(\n function ({ data }) {\n vm.saving = false;\n $element.modal('hide');\n close(data, 500);\n },\n function (error) {\n vm.saving = false;\n flySvc.error(error);\n return '';\n },\n );\n };\n\n vm.cancel = function () {\n $element.modal('hide');\n close(null, 500);\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cxSettings')\n .controller('AddCompanyDialogCtrl', [\n '$element',\n '$http',\n '$scope',\n 'authService',\n 'appUrls',\n 'flySvc',\n 'close',\n 'dataCache',\n 'checkTenantConfiguration',\n addCompanyDialogCtrl,\n ]);\n\nfunction addCompanyDialogCtrl($element, $http, $scope,authService, appUrls, flySvc, close, dataCache,checkTenantConfiguration) {\n var vm = this;\n vm.isNetherlandsConfiguration = checkTenantConfiguration('[5]');\n vm.company = {\n name: undefined,\n enterpriseNumber: undefined,\n kvkNumber: undefined,\n countryCode:\n dataCache.getArray('defaultcompany') && dataCache.getArray('defaultcompany').countryCode\n ? dataCache.getArray('defaultcompany').countryCode || 'BE'\n : 'BE',\n };\n\n vm.save = function() {\n vm.saving = true;\n var model = { ...vm.company };\n\n $http({\n method: 'post',\n url: appUrls.api + '/api/company/create',\n data: model,\n })\n .success(function(result) {\n $element.modal('hide');\n close(result, 500);\n })\n .error(function(error) {\n flySvc.error(error.code, error.parameters);\n })\n .finally(function() {\n vm.saving = false;\n });\n };\n\n vm.cancel = function() {\n close(null, 500);\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cloudX')\n .controller('RelationsUsingTaskPeriodicityDialogCtrl', [\n '$scope',\n 'appMessages',\n 'close',\n 'relations',\n relationsUsingTaskPeriodicityDialogCtrl,\n ]);\n\nfunction relationsUsingTaskPeriodicityDialogCtrl($scope, appMessages, close, relations) {\n $scope.relations = relations;\n $scope.close = function(result) {\n close(result, 500);\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cxSettings')\n .controller('AddRelationFieldDefinitionDialogCtrl', [\n '$http',\n 'appUrls',\n 'flySvc',\n 'resourceFactorySvc',\n 'enumCacheSvc',\n 'translateListFilter',\n 'close',\n 'taskTemplateId',\n 'definitions',\n '$element',\n\n addRelationFieldDefinitionDialogCtrl,\n ]);\n\nfunction addRelationFieldDefinitionDialogCtrl(\n $http,\n appUrls,\n flySvc,\n resourceFactorySvc,\n enumCacheSvc,\n translateListFilter,\n close,\n taskTemplateId,\n definitions,\n $element,\n) {\n var vm = this;\n\n enumCacheSvc.get('TaskRelationFieldType').then(function(data) {\n var existingTypes = definitions\n .filter(x => !!x.relationFieldType)\n .map(x => x.relationFieldType);\n vm.fieldTypes = data.filter(x => existingTypes.indexOf(x.key) < 0).map(x => ({\n id: x.key,\n value: x.value,\n label: translateListFilter(x.key, 'TaskRelationFieldType', x.value),\n }));\n if (!vm.fieldTypes.length) {\n flySvc.warning('msgTaskTemplateHasAllAvailableRelationFields');\n $element.modal('hide');\n close(null);\n }\n });\n vm.parameterDefinition = {\n taskTemplateId: taskTemplateId,\n parameterValueType: 0, // Default to text\n systemParameterType: null,\n relationFieldType: null,\n };\n vm.showValidation = false;\n\n vm.relationFieldTypeChanged = function() {\n if (vm.parameterDefinition.relationFieldType > 0) {\n var type = vm.fieldTypes.find(x => x.id === vm.parameterDefinition.relationFieldType);\n if (type) {\n vm.parameterDefinition.name = type.label;\n }\n }\n };\n\n vm.save = function() {\n if (vm.parameterDefinition.relationFieldType <= 0) return '';\n vm.saving = true;\n\n $http.post(`${appUrls.tasks}/api/TaskParameters/CreateDefinition`, vm.parameterDefinition).then(\n function({ data }) {\n vm.saving = false;\n $element.modal('hide');\n close(data, 500);\n },\n function(error) {\n vm.saving = false;\n flySvc.error(error.data.code, error.data.parameters, null, error.data.type);\n return '';\n },\n );\n };\n\n vm.cancel = function() {\n $element.modal('hide');\n close(null, 500);\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cxSettings')\n .controller('AddEmailDomainDialogCtrl', [\n '$element',\n '$http',\n 'appUrls',\n 'flySvc',\n 'close',\n 'dataCache',\n 'suggestedEmailDomain',\n 'companyId',\n 'companyEmail',\n addEmailDomainDialogCtrl,\n ]);\n\nfunction addEmailDomainDialogCtrl(\n $element,\n $http,\n appUrls,\n flySvc,\n close,\n dataCache,\n suggestedEmailDomain,\n companyId,\n companyEmail,\n) {\n var vm = this;\n vm.suggestedEmailDomain = suggestedEmailDomain;\n vm.domainRequest = {\n companyId: companyId,\n domain: suggestedEmailDomain,\n };\n vm.companyEmail = companyEmail;\n vm.save = function() {\n vm.saving = true;\n var model = { ...vm.domainRequest };\n\n $http({\n method: 'post',\n url: appUrls.api + '/api/settings/CreateEmailDomain',\n data: model,\n })\n .success(function(result) {\n $element.modal('hide');\n close(result, 500);\n })\n .error(function(error) {\n flySvc.error(error);\n })\n .finally(function() {\n vm.saving = false;\n });\n };\n\n vm.cancel = function() {\n close(null, 500);\n };\n}\n","import angular from 'angular';\nimport { getZendeskUrl } from '@/shared/components/ZendeskHelp';\n\nangular\n .module('cxSettings')\n .controller('EmailDomainCnameInfoDialogCtrl', [\n '$element',\n '$http',\n 'appUrls',\n 'flySvc',\n 'close',\n 'dataCache',\n '$translate',\n 'ModalService',\n 'emailDomain',\n 'companyId',\n emailDomainCnameInfoDialogCtrl,\n ]);\n\nfunction emailDomainCnameInfoDialogCtrl(\n $element,\n $http,\n appUrls,\n flySvc,\n close,\n dataCache,\n $translate,\n ModalService,\n emailDomain,\n companyId,\n) {\n var vm = this;\n vm.emailDomain = emailDomain;\n\n vm.emailDomainResponse = undefined;\n\n vm.zendeskUrl = getZendeskUrl('5434786772242', $translate.use());\n\n vm.verify = function() {\n vm.verifying = true;\n vm.emailDomainResponse = undefined;\n\n $http({\n method: 'get',\n url: appUrls.api + '/api/settings/VerifyEmailDomain?id=' + companyId,\n })\n .success(function(result) {\n vm.emailDomainResponse = result;\n })\n .error(function(error) {\n flySvc.error(error.code, error.parameters);\n })\n .finally(function() {\n vm.verifying = false;\n });\n };\n\n vm.openEmailEditor = function() {\n ModalService.showModal({\n template: require('./mailEmailDomainCnameInfoDialog.html'),\n controller: 'MailEmailDomainCnameInfoDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n companyId: companyId,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n });\n };\n\n vm.cancel = function() {\n close(vm.emailDomainResponse, 500);\n };\n}\n","import angular from 'angular';\nimport DocumentService from '@/shared/services/DocumentService';\nimport { isWord, isPdf } from '@/shared/utils/mime';\n\nangular\n .module('cxTaskflow')\n .controller('MailEmailDomainCnameInfoDialogCtrl', [\n '$scope',\n '$element',\n '$timeout',\n '$translate',\n '$q',\n '$filter',\n 'templateHttpSvc',\n 'resourceFactorySvc',\n 'flySvc',\n '$http',\n 'appUrls',\n 'dialogsSvc',\n 'close',\n 'companyId',\n mailEmailDomainCnameInfoDialogCtrl,\n ]);\n\nfunction mailEmailDomainCnameInfoDialogCtrl(\n $scope,\n $element,\n $timeout,\n $translate,\n $q,\n $filter,\n templateHttpSvc,\n resourceFactorySvc,\n flySvc,\n $http,\n appUrls,\n dialogsSvc,\n close,\n companyId,\n) {\n var vm = this;\n vm.sending = false;\n vm.email = {};\n vm.showValidation = false;\n vm.addresses = [];\n vm.sendTo = [];\n vm.cc = [];\n vm.bcc = [];\n\n var showError = function(error) {\n vm.sending = false;\n flySvc.error(error.data.code, error.data.parameters);\n };\n\n vm.refreshPreview = function() {\n vm.preview = null;\n vm.previewError = null;\n\n $http\n .get(appUrls.api + '/api/settings/GetEmailDomainInfoMail?id=' + companyId)\n .success(function(result) {\n if (result) {\n vm.preview = result;\n if (vm.preview.body === null && vm.preview.subject === null) {\n flySvc.message('msgTemplateNotInLanguage');\n }\n\n if (vm.preview.cc && vm.preview.cc.length && (!vm.cc.length || !vm.cc[0])) {\n vm.cc = vm.preview.cc;\n }\n vm.addToAddress();\n }\n })\n .error(function(error) {\n vm.previewError = flySvc.getErrorMsg(error);\n flySvc.error(error);\n });\n };\n vm.refreshPreview();\n\n vm.addToAddress = function() {\n vm.sendTo.push('');\n $timeout(function() {\n $element\n .find('.form-group .row.email .dropdown input[type=\"text\"]')\n .filter(':visible')\n .last()\n .focus();\n }, 200);\n };\n vm.addCcAddress = function() {\n vm.cc.push('');\n $timeout(function() {\n $element\n .find('.form-group .row.cc .dropdown input[type=\"text\"]')\n .filter(':visible')\n .last()\n .focus();\n }, 200);\n };\n\n vm.addBccAddress = function() {\n vm.bcc.push('');\n $timeout(function() {\n $element\n .find('.form-group .row.bcc .dropdown input[type=\"text\"]')\n .filter(':visible')\n .last()\n .focus();\n }, 200);\n };\n vm.validateEmail = function(value, emptyValid) {\n if (!value && emptyValid) return true;\n return /^[^@]+@.+\\..+$/.test(value);\n };\n\n vm.validate = function() {\n if (!vm.preview || !vm.preview.subject || !vm.preview.body) return false;\n\n for (var j = 0; j < vm.sendTo.length; j++) {\n if (!vm.validateEmail(vm.sendTo[j], false)) {\n flySvc.error('msgInvalidEmailAddress');\n return false;\n }\n }\n for (var j = 0; j < vm.cc.length; j++) {\n if (!vm.validateEmail(vm.cc[j], false)) {\n flySvc.error('msgInvalidEmailAddress');\n return false;\n }\n }\n for (var j = 0; j < vm.bcc.length; j++) {\n if (!vm.validateEmail(vm.bcc[j], false)) {\n flySvc.error('msgInvalidEmailAddress');\n return false;\n }\n }\n return true;\n };\n\n vm.save = function() {\n if ($scope.form.$invalid || vm.sending) return;\n if (!vm.validate()) return;\n vm.sending = true;\n vm.preview.cc = vm.cc;\n vm.preview.bcc = vm.bcc;\n vm.preview.to = vm.sendTo;\n vm.preview.recipients = vm.sendTo;\n\n $http\n .post(appUrls.api + '/api/settings/SendEmailDomainInfoMail', vm.preview)\n .success(function() {\n vm.sending = false;\n flySvc.success('EmailSent');\n $element.modal('hide');\n }, showError);\n };\n\n vm.cancel = function() {\n close(false, 500);\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cxSettings')\n .controller('EmailSignatureDialogCtrl', [\n '$element',\n 'flySvc',\n 'close',\n '$http',\n 'ModalService',\n 'appUrls',\n 'companyId',\n emailSignatureDialogCtrl,\n ]);\n\nfunction emailSignatureDialogCtrl(\n $element,\n flySvc,\n close,\n $http,\n ModalService,\n appUrls,\n companyId,\n) {\n var vm = this;\n vm.signatures = [];\n vm.loading = true;\n\n $http\n .get(`${appUrls.api}/api/Template/EmailSignature/${companyId}`)\n .then(({ data }) => {\n if (data != null) {\n vm.signatures = data.map(x => ({ ...x, collapsed: !x.content }));\n if (vm.signatures.length > 0) vm.signatures[0].collapsed = false;\n }\n }, flySvc.error)\n .finally(() => {\n vm.loading = false;\n });\n\n vm.save = function() {\n if (vm.saving) return;\n vm.saving = true;\n $http.put(`${appUrls.api}/api/Template/EmailSignature`, vm.signatures).then(\n () => {\n vm.saving = false;\n $element.modal('hide');\n close(result, 500);\n },\n function(error) {\n vm.saving = false;\n flySvc.error(error.data.code, error.data.parameters);\n },\n );\n };\n\n vm.cancel = function() {\n close(null, 500);\n };\n\n vm.showPlaceholders = function() {\n if (!vm.placeholders) {\n $http.get(appUrls.api + '/api/Template/MailPlaceholders').then(\n function(result) {\n vm.placeholders = result.data[13];\n vm.showPlaceholders();\n },\n function(error) {\n flySvc.error(error.code, error.parameters);\n },\n );\n return;\n }\n\n ModalService.showModal({\n template: require('./placeholderDialog.html'),\n controller: 'PlaceholderDialogCtrl',\n controllerAs: 'vm',\n locationChangeSuccess: false,\n inputs: {\n placeholders: vm.placeholders,\n taskParameterPlaceholders: [],\n context: 13,\n },\n }).then(function(modal) {\n modal.element.modal();\n modal.element.on('hidden.bs.modal', function(e) {\n modal.element.off(e); //Remove event\n modal.element.remove(); //Remove element\n });\n });\n };\n}\n","import angular from 'angular';\nimport utils from '@/shared/utils/adminpulse';\n\nangular\n .module('cxSettings')\n .controller('ExportTaskTemplateSnippetDialogCtrl', [\n 'flySvc',\n 'translateListFilter',\n 'FileSaver',\n '$element',\n 'close',\n 'appUrls',\n '$http',\n 'taskTemplate',\n exportTaskTemplateSnippetDialogCtrl,\n ]);\n\nfunction exportTaskTemplateSnippetDialogCtrl(\n flySvc,\n translateListFilter,\n FileSaver,\n $element,\n close,\n appUrls,\n $http,\n taskTemplate,\n) {\n var vm = this;\n vm.taskTemplate = taskTemplate;\n vm.hasMails = taskTemplate.children.some(\n x => (x.type === 3 || x.type === 4) && !!x.mailTemplateId,\n );\n vm.hasParameters = taskTemplate.parameterCount > 0;\n vm.hasPeriodicities = taskTemplate.periodicityCount > 0;\n vm.saving = false;\n vm.showValidation = false;\n\n vm.model = {\n taskTemplateId: taskTemplate.id,\n name: translateListFilter(taskTemplate.id, 'tasktemplate', taskTemplate.name),\n exportMails: vm.hasMails,\n exportPeriodicities: vm.hasPeriodicities,\n exportParameters: vm.hasParameters,\n exportWorkflows: true,\n };\n\n var showError = function(error) {\n flySvc.error(error.data.code, error.data.parameters, null, error.data.type);\n return '';\n };\n vm.isValid = function() {\n if (!vm.model.name) return false;\n\n return true;\n };\n const showArrayBufferError = function(error) {\n if (!error) return;\n try {\n var buffer = error.data || error;\n const errorObject = utils.arrayBufferToObject(buffer) || {};\n flySvc.error(errorObject);\n } catch (ex) {\n console.error(ex);\n //Parsing error?\n flySvc.error();\n }\n };\n vm.save = function() {\n if (vm.saving) return;\n if (!vm.isValid()) return;\n\n vm.saving = true;\n return $http\n .post(appUrls.api + '/api/Snippet/Export/TaskTemplate', vm.model, {\n responseType: 'arraybuffer',\n })\n .then(\n result => {\n const contentDisposition = result.headers('Content-Disposition');\n const filename = utils.getFileNameFromHeader(contentDisposition);\n var fileType = result.headers('Content-Type');\n\n var blob = new Blob([result.data], { type: 'application/json' });\n if (blob) {\n FileSaver.saveAs(blob, filename);\n $element.modal('hide');\n flySvc.success('msgConfirmChange');\n close(true, 500);\n vm.saving = false;\n }\n },\n error => {\n showArrayBufferError(error);\n },\n );\n };\n\n vm.cancel = function() {\n $element.modal('hide');\n close(null, 500);\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cxTranslations')\n .controller('TranslateListsCtrl', [\n '$filter',\n 'translateSvc',\n 'localStorageService',\n TranslateListsCtrl,\n ]);\n\nfunction formatSource(source) {\n if (!source) return '';\n const parts = source\n .split(',')\n .map(x => x.trim())\n .unique();\n return parts.join(', ');\n}\n\nfunction TranslateListsCtrl($filter, translateSvc, localStorageService) {\n var vm = this;\n //Filters\n vm.fNotTranslated = true;\n vm.fSimilar = false;\n vm.fInherited = false;\n vm.fListName = null;\n //Data\n vm.loading = false;\n vm.languages = [];\n vm.allLanguages = [];\n vm.translations = [];\n vm.allTranslations = [];\n vm.listNames = [];\n vm.selectedLanguages = localStorageService.get('TranslationToolLanguages') || ['nl'];\n\n //Visibility Toggles\n vm.showModifiedDates = false;\n vm.showScanInfo = false;\n vm.showKey = false;\n\n //Language functions\n\n //Add a language column to the table\n vm.addLanguage = function(lang) {\n if (!lang) return;\n vm.selectedLanguages.push(lang);\n localStorageService.set('TranslationToolLanguages', vm.selectedLanguages);\n vm.filterLanguages();\n vm.getTranslations([lang]);\n };\n //Remove a language column\n vm.removeLanguage = function(lang) {\n if (!lang) return;\n var idx = vm.selectedLanguages.indexOf(lang);\n if (idx >= 0) {\n vm.selectedLanguages.splice(idx, 1);\n vm.filterLanguages();\n localStorageService.set('TranslationToolLanguages', vm.selectedLanguages);\n }\n };\n\n vm.filterLanguages = function() {\n vm.languages = vm.allLanguages.filter(function(lang) {\n return vm.selectedLanguages.indexOf(lang) < 0;\n });\n };\n\n //Translation functions\n vm.getTranslations = function(languages) {\n if (!languages || !languages.length) return;\n vm.loading = true;\n return translateSvc.getLists(vm.selectedLanguages).then(function(data) {\n if (vm.allTranslations.length) {\n //When adding language\n for (var i = 0; i < data.length; i++) {\n var group = data[i];\n var translation = vm.allTranslations.find(function(x) {\n return x.key === group.key;\n });\n if (!translation) {\n translation = {\n key: group.key,\n lastScanned: group.lastScanned,\n source: formatSource(group.source),\n defaultValue: group.defaultValue,\n list: group.list,\n };\n vm.allTranslations.push(translation);\n }\n if (group.translations)\n //Map translation object directly onto parent object\n angular.extend(translation, group.translations);\n\n if (\n !vm.listNames.find(function(x) {\n return x === group.list;\n })\n )\n vm.listNames.push(group.list);\n }\n } else {\n //Reloading all\n vm.allTranslations = data.map(function(group) {\n var translation = {\n key: group.key,\n lastScanned: group.lastScanned,\n source: formatSource(group.source),\n defaultValue: group.defaultValue,\n list: group.list,\n };\n\n if (group.translations)\n //Map translation object directly onto parent object\n angular.extend(translation, group.translations);\n\n if (\n !vm.listNames.find(function(x) {\n return x === group.list;\n })\n )\n vm.listNames.push(group.list);\n\n return translation;\n });\n }\n vm.listNames.sort();\n vm.filterTranslations();\n vm.loading = false;\n });\n };\n\n vm.reloadTranslations = function() {\n vm.allTranslations = [];\n vm.listNames = [];\n vm.getTranslations(vm.selectedLanguages);\n };\n\n vm.filterTranslations = function() {\n vm.translations = vm.allTranslations.filter(function(item) {\n if (vm.showNotScanned) {\n if (item.source || item.lastScanned) return false;\n }\n if (!!vm.fListName && item.list !== vm.fListName) return false;\n\n if (vm.fNotTranslated) {\n for (var i = 0; i < vm.selectedLanguages.length; i++) {\n var trans = item[vm.selectedLanguages[i]];\n if (!trans) return false;\n if (!(trans.value || (vm.fInherited && trans.inherited))) return true;\n }\n return false;\n }\n\n return true;\n });\n vm.translations = $filter(vm.fSimilar ? 'similar' : 'filter')(vm.translations, vm.search);\n\n vm.translations = $filter('orderBy')(vm.translations, vm.predicate, vm.reverse);\n };\n\n vm.removeTranslation = function(item) {\n translateSvc.removeList(item.key, 1).then(function() {\n var idx = vm.translations.findIndex(function(x) {\n return x.key === item.key;\n });\n if (idx >= 0) vm.translations.splice(idx, 1);\n\n idx = vm.allTranslations.findIndex(function(x) {\n return x.key === item.key;\n });\n if (idx >= 0) vm.allTranslations.splice(idx, 1);\n });\n };\n\n vm.save = function(item, lang, value) {\n translateSvc.saveList(lang, item.key, value, 1);\n };\n\n //Sorting\n vm.predicate = 'key';\n vm.reverse = false;\n vm.sort = function(predicate) {\n vm.reverse = vm.predicate === predicate ? !vm.reverse : false;\n vm.predicate = predicate;\n\n vm.translations = $filter('orderBy')(vm.translations, vm.predicate, vm.reverse);\n };\n //Load languages\n vm.allLanguages = translateSvc.languages;\n vm.filterLanguages();\n //Trigger initial load\n vm.reloadTranslations();\n}\n","import angular from 'angular';\nimport utils from '@/shared/utils/adminpulse';\nimport { dynamicSort, dynamicSortMultiple } from '@/shared/utils/dynamicSort';\n\nangular\n .module('cxSettings')\n .controller('ImportTaskTemplateSnippetDialogCtrl', [\n 'flySvc',\n 'translateListFilter',\n 'data',\n '$element',\n 'close',\n 'appUrls',\n '$http',\n 'templateHttpSvc',\n 'dataCache',\n 'resourceNameFilter',\n '$q',\n '$translate',\n importTaskTemplateSnippetDialogCtrl,\n ]);\n\nfunction importTaskTemplateSnippetDialogCtrl(\n flySvc,\n translateListFilter,\n data,\n $element,\n close,\n appUrls,\n $http,\n templateHttpSvc,\n dataCache,\n resourceNameFilter,\n $q,\n $translate,\n) {\n var vm = this;\n vm.data = data;\n\n vm.hasMails = !!data.mailTemplates && data.mailTemplates.length > 0;\n vm.hasParameters = !!data.taskParameters && data.taskParameters.length > 0;\n vm.hasPeriodicities = !!data.taskPeriodicities && data.taskPeriodicities.length > 0;\n vm.hasWorkflows = !!data.workflows && data.workflows.length > 0;\n vm.hasTimeResources = !!data.timeResources && data.timeResources.length > 0;\n vm.hasCostResources = !!data.costResources && data.costResources.length > 0;\n vm.hasUsers = !!data.users && data.users.length > 0;\n vm.saving = false;\n vm.showValidation = false;\n vm.mailTemplates = [];\n vm.mailTemplateActions = (vm.data.mailTemplates || []).map(x => ({\n ...x,\n canImport: !!x.originalId,\n action: x.originalId ? 'import' : '',\n }));\n vm.users = dataCache\n .getArray('user')\n .filter(x => x.isActive)\n .map(function(user) {\n return {\n id: user.userID,\n name: ((user.firstName || '') + ' ' + (user.lastName || '')).trim(),\n };\n })\n .sort(dynamicSort('name'));\n\n vm.model = {\n documentId: data.documentId,\n taskTemplateName: data.templateName,\n importMailTemplates: vm.hasMails,\n importPeriodicities: vm.hasPeriodicities,\n importTaskParameters: vm.hasParameters,\n importWorkflows: true,\n timeResources: data.timeResources,\n costResources: data.costResources,\n users: data.users.map(x => {\n const matchingUser = x.originalId ? vm.users.find(u => u.id === x.originalId) : null;\n\n return {\n ...x,\n snippetImportId: matchingUser ? matchingUser.id : null,\n };\n }),\n };\n\n if (vm.hasMails) {\n templateHttpSvc.getTemplates(11).then(function(data) {\n vm.mailTemplates = data.map(x => ({\n ...x,\n label: translateListFilter(x.id, 'template', x.name),\n }));\n\n vm.mailTemplateActions.forEach(x => {\n if (x.originalId) {\n //Match by id, should only work if same tenant\n const mailTemplate = vm.mailTemplates.find(r => r.id === x.originalId);\n if (mailTemplate) {\n x.action = `r;${mailTemplate.id}`;\n return;\n }\n }\n if (!x.name) return;\n //Match by name\n const mailTemplate = vm.mailTemplates.find(\n r => r.name === x.description || r.label === x.description,\n );\n if (mailTemplate) {\n x.action = `r;${mailTemplate.id}`;\n return;\n }\n });\n });\n }\n vm.timeResources = [];\n vm.costResources = [];\n if (vm.hasTimeResources) {\n $http.get(`${appUrls.api}/api/Resource/Registration?type=0`).then(({ data }) => {\n vm.timeResources = data\n .map(x => ({\n id: x.id,\n name: resourceNameFilter(x),\n code: x.code || '',\n }))\n .sort(dynamicSortMultiple('code', 'name'));\n\n vm.model.timeResources.forEach(x => {\n if (x.originalId) {\n //Match by id, should only work if same tenant\n const resource = vm.timeResources.find(r => r.id === x.originalId);\n if (resource) {\n x.snippetImportId = resource.id;\n return;\n }\n }\n if (!x.description) return;\n //Match by name\n const resource = vm.timeResources.find(r => r.name === x.description);\n if (resource) {\n x.snippetImportId = resource.id;\n return;\n }\n });\n });\n }\n if (vm.hasCostResources) {\n $http.get(`${appUrls.api}/api/Resource/Registration?type=1`).then(({ data }) => {\n vm.costResources = data\n .map(x => ({\n id: x.id,\n name: resourceNameFilter(x),\n code: x.code || '',\n }))\n .sort(dynamicSortMultiple('code', 'name'));\n vm.model.costResources.forEach(x => {\n if (x.originalId) {\n //Match by id, should only work if same tenant\n const resource = vm.costResources.find(r => r.id === x.originalId);\n if (resource) {\n x.snippetImportId = resource.id;\n return;\n }\n }\n if (!x.description) return;\n //Match by name\n const resource = vm.costResources.find(r => r.name === x.description);\n if (resource) {\n x.snippetImportId = resource.id;\n return;\n }\n });\n });\n }\n\n var showError = function(error) {\n flySvc.error(error.data.code, error.data.parameters, null, error.data.type);\n return '';\n };\n vm.isValid = function() {\n if (vm.form && vm.form.$invalid) return false;\n if (!vm.model.taskTemplateName) return false;\n if (vm.nameCheckError) return false;\n\n return true;\n };\n const showArrayBufferError = function(error) {\n if (!error) return;\n try {\n var buffer = error.data || error;\n const errorObject = utils.arrayBufferToObject(buffer) || {};\n flySvc.error(errorObject);\n } catch (ex) {\n console.error(ex);\n //Parsing error?\n flySvc.error();\n }\n };\n vm.save = function() {\n if (vm.saving) return;\n if (!vm.isValid()) return;\n\n const model = {\n ...vm.model,\n mailTemplates: vm.mailTemplateActions\n .map(({ action, canImport, ...x }) => {\n if (!action) return null;\n if (canImport && action === 'import') return x;\n if (action.indexOf('r;') === 0) {\n return { ...x, snippetImportId: action.substr(2) };\n }\n return null;\n })\n .filter(x => !!x),\n };\n const hasNewMailTemplates = model.mailTemplates.some(x => !x.snippetImportId);\n vm.saving = true;\n return $http.post(appUrls.api + '/api/Snippet/Import/TaskTemplate', model).then(\n ({ data }) => {\n if (data && data.taskTemplateId) {\n $translate.refresh(); //reload translations\n return $http\n .get(`${appUrls.tasks}/api/TaskTemplates/Templates/${data.taskTemplateId}`)\n .then(\n ({ data }) => {\n $element.modal('hide');\n flySvc.success('msgConfirmChange');\n close([data, hasNewMailTemplates], 500);\n vm.saving = false;\n },\n error => {\n vm.saving = false;\n return showError(error);\n },\n );\n }\n vm.saving = false;\n },\n error => {\n vm.saving = false;\n return showError(error);\n },\n );\n };\n\n vm.nameCheckError = null;\n vm.checkNameCanceller = null;\n vm.checkName = function() {\n //Cancel previous request, cancelling a completed request will have no effect\n if (vm.checkNameCanceller) vm.checkNameCanceller.resolve();\n\n if (!vm.model.taskTemplateName) {\n vm.nameCheckError = null;\n return;\n }\n\n vm.checkNameCanceller = $q.defer();\n $http\n .get(`${appUrls.tasks}/api/TaskTemplates/CheckName`, {\n params: {\n name: vm.model.taskTemplateName,\n },\n timeout: vm.checkNameCanceller.promise,\n })\n .then(\n () => {\n //OK\n vm.nameCheckError = null;\n },\n ({ data }) => {\n vm.nameCheckError = flySvc.getErrorMsg(data.code, data.parameters, null, data.type);\n },\n );\n };\n vm.checkName();\n\n vm.cancel = function() {\n if (vm.data && vm.data.documentId) {\n //Cleanup temp document\n $http.delete(`${appUrls.documents}/api/documents/${vm.data.documentId}`);\n }\n $element.modal('hide');\n close(null, 500);\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cxSettings')\n .controller('RecognitionOptionsDialogCtrl', [\n '$element',\n '$http',\n 'appUrls',\n 'flySvc',\n 'close',\n 'dataCache',\n 'magicMailAllowedRecognitionSenders',\n recognitionOptionsDialogCtrl,\n ]);\n\nfunction recognitionOptionsDialogCtrl(\n $element,\n $http,\n appUrls,\n flySvc,\n close,\n dataCache,\n magicMailAllowedRecognitionSenders,\n) {\n var vm = this;\n vm.magicMailAllowedRecognitionSendersArray = [];\n\n if (magicMailAllowedRecognitionSenders) {\n vm.magicMailAllowedRecognitionSendersArray = magicMailAllowedRecognitionSenders.split(';');\n }\n\n vm.addEmail = () => {\n vm.magicMailAllowedRecognitionSendersArray.push('');\n };\n\n vm.save = function() {\n if (vm.magicMailAllowedRecognitionSendersArray.length === 0) {\n close('', 500);\n $element.modal('hide');\n } else {\n close(vm.magicMailAllowedRecognitionSendersArray.join(';'), 500);\n $element.modal('hide');\n }\n };\n\n vm.cancel = function() {\n close(null, 500);\n $element.modal('hide');\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cxSettings')\n .controller('TaskTemplateTagsDialogCtrl', [\n '$filter',\n 'flySvc',\n '$element',\n 'close',\n 'appUrls',\n '$http',\n 'taskTemplateId',\n 'tags',\n taskTemplateTagsDialogCtrl,\n ]);\n\nfunction taskTemplateTagsDialogCtrl(\n $filter,\n flySvc,\n $element,\n close,\n appUrls,\n $http,\n taskTemplateId,\n tags,\n) {\n var vm = this;\n vm.tags = [];\n vm.taskTemplateId = taskTemplateId;\n vm.orgSelectedTags = angular.copy(tags || []);\n vm.selectedTags = angular.copy(tags || []);\n vm.removedTags = '';\n vm.propagate = true;\n vm.hasChanged = false;\n vm.saving = false;\n\n var showError = function(error) {\n flySvc.error(error);\n return '';\n };\n\n $http.get(`${appUrls.tasks}/api/Tags/`).then(function({ data }) {\n vm.tags = data;\n }, showError);\n\n vm.filterTags = function(search) {\n return $filter('filter')(vm.tags, search);\n };\n\n vm.tagsChanged = function() {\n vm.removedTags = vm.orgSelectedTags\n .filter(x => !vm.selectedTags.some(t => !!t.id && x.id === t.id))\n .map(x => x.name)\n .join(', ');\n vm.hasChanged =\n vm.selectedTags.length !== vm.orgSelectedTags.length ||\n JSON.stringify(vm.selectedTags.map(x => x.name).sort()) !==\n JSON.stringify(vm.orgSelectedTags.map(x => x.name).sort());\n };\n\n vm.save = function() {\n if (vm.saving) return;\n if (!vm.hasChanged) return vm.cancel();\n\n vm.saving = true;\n return $http\n .post(`${appUrls.tasks}/api/TaskTemplates/Tags/${taskTemplateId}`, {\n tags: vm.selectedTags,\n propagate: vm.propagate,\n })\n .then(\n ({ data }) => {\n vm.saving = false;\n $element.modal('hide');\n close(data, 500);\n },\n error => {\n showError(error);\n vm.saving = false;\n },\n );\n };\n\n vm.cancel = function() {\n $element.modal('hide');\n close(null, 500);\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cxSettings')\n .controller('TaskParameterDefinitionOptionsDialogCtrl', [\n '$http',\n 'appUrls',\n 'flySvc',\n 'resourceFactorySvc',\n 'close',\n 'parameterDefinition',\n '$element',\n taskParameterDefinitionOptionsDialogCtrl,\n ]);\n\nfunction taskParameterDefinitionOptionsDialogCtrl(\n $http,\n appUrls,\n flySvc,\n resourceFactorySvc,\n close,\n parameterDefinition,\n $element,\n) {\n var vm = this;\n vm.parameterDefinition = parameterDefinition;\n vm.showValidation = false;\n vm.selectionItems = parameterDefinition.selectionItems\n ? parameterDefinition.selectionItems.split(';').map((x, index) => ({ id: index, value: x }))\n : [];\n\n vm.updatedItems = vm.selectionItems.map(x => ({\n id: x.id,\n oldValue: x.value,\n newValue: x.value,\n removed: false,\n }));\n\n vm.addSelectionItem = () => {\n vm.selectionItems.push('');\n };\n\n vm.removeSelectionItem = (index, id) => {\n vm.updatedItems = vm.updatedItems.map(x => {\n if (x.id === id) {\n return {\n ...x,\n removed: true,\n };\n }\n\n return x;\n });\n vm.selectionItems.splice(index, 1);\n };\n\n vm.onSelectionItemChanged = (index, id) => {\n const newValue = vm.selectionItems[index].value.replace(';', '');\n vm.selectionItems[index].value = newValue;\n\n vm.updatedItems = vm.updatedItems.map(x => {\n if (x.id === id) {\n return {\n ...x,\n newValue: newValue,\n };\n }\n\n return x;\n });\n };\n\n vm.save = function() {\n if (vm.parameterDefinition.parameterValueType === 4 && !vm.selectionItems.length) return;\n if (vm.parameterDefinition.parameterValueType === 4) {\n vm.parameterDefinition = {\n ...vm.parameterDefinition,\n selectionItems: vm.selectionItems.map(x => x.value).join(';'),\n selectionItemUpdate: vm.updatedItems,\n };\n }\n\n vm.saving = true;\n $http.put(`${appUrls.tasks}/api/TaskParameters/UpdateDefinition`, vm.parameterDefinition).then(\n function({ data }) {\n vm.saving = false;\n $element.modal('hide');\n close(data, 500);\n },\n function(error) {\n vm.saving = false;\n flySvc.error(error);\n return '';\n },\n );\n };\n\n vm.cancel = function() {\n $element.modal('hide');\n close(null, 500);\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cxSettings')\n .controller('CompanyBankAccountsDialogCtrl', [\n '$element',\n '$http',\n '$scope',\n 'authService',\n 'appUrls',\n 'flySvc',\n 'close',\n 'openIbanSvc',\n '$q',\n '$timeout',\n 'companyId',\n 'bankAccounts',\n companyBankAccountsDialogCtrl,\n ]);\n\nfunction companyBankAccountsDialogCtrl(\n $element,\n $http,\n $scope,\n authService,\n appUrls,\n flySvc,\n close,\n openIbanSvc,\n $q,\n $timeout,\n companyId,\n bankAccounts,\n) {\n var vm = this;\n vm.bankAccounts = angular.copy(bankAccounts);\n const originalBankAccounts = [...bankAccounts];\n const bankAccountsToDelete = [];\n const bankAccountsToUpdate = [];\n vm.newBankAccounts = [];\n\n vm.addBankAccount = () => {\n vm.newBankAccounts.push({});\n };\n\n vm.deleteBankAccount = bankAccount => {\n bankAccountsToDelete.push(bankAccount);\n\n // make sure we dont try to update a deleted bank account later\n const foundInToUpdate = bankAccountsToUpdate.indexOf(bankAccount.id);\n if (foundInToUpdate > -1) {\n bankAccountsToUpdate.splice(foundInToUpdate, 1);\n }\n const foundInBankAccounts = vm.bankAccounts.indexOf(bankAccount);\n if (foundInBankAccounts > -1) {\n vm.bankAccounts.splice(foundInBankAccounts, 1);\n }\n };\n\n vm.getBic = newBankAccount => {\n const params = { iban: newBankAccount.bankAccountNr };\n\n return $http.get(`${appUrls.api}/Api/Bank`, { params }).then(function({ data }) {\n if (!data) return;\n const copy = [...vm.newBankAccounts];\n const index = copy.indexOf(newBankAccount);\n if (index > -1) {\n copy[index] = {\n ...newBankAccount,\n bic: data.bic,\n bankName: data.name,\n };\n $timeout(function() {\n vm.newBankAccounts = copy;\n }, 100);\n }\n });\n };\n\n vm.bankAccountChanged = bankAccount => {\n const foundInToUpdate = bankAccountsToUpdate.indexOf(bankAccount.id);\n if (foundInToUpdate === -1) {\n bankAccountsToUpdate.push(bankAccount.id);\n }\n };\n\n vm.setBankAccountAsMain = (bankAccount, isNew) => {\n if (isNew) {\n vm.newBankAccounts = vm.newBankAccounts.map(newBankAccount => {\n return {\n ...newBankAccount,\n isMain: bankAccount == newBankAccount,\n };\n });\n vm.bankAccounts = vm.bankAccounts.map(oldBankAccount => {\n return {\n ...oldBankAccount,\n isMain: false,\n };\n });\n } else {\n vm.bankAccounts = vm.bankAccounts.map(oldBankAccount => {\n return {\n ...oldBankAccount,\n isMain: oldBankAccount == bankAccount,\n };\n });\n vm.newBankAccounts = vm.newBankAccounts.map(newBankAccount => {\n return {\n ...newBankAccount,\n isMain: false,\n };\n });\n\n const foundInToUpdate = bankAccountsToUpdate.indexOf(bankAccount.id);\n if (foundInToUpdate === -1) {\n bankAccountsToUpdate.push(bankAccount.id);\n }\n }\n };\n\n vm.save = () => {\n if (\n !vm.newBankAccounts.length &&\n !bankAccountsToDelete.length &&\n !bankAccountsToUpdate.length\n ) {\n close(originalBankAccounts, 500);\n return;\n }\n\n const model = {\n companyId,\n newBankAccounts: vm.newBankAccounts,\n updatedBankAccounts: bankAccountsToUpdate.map(bankAccountId => {\n return vm.bankAccounts.find(x => x.id === bankAccountId);\n }),\n deletedBankAccounts: bankAccountsToDelete.map(x => x.id),\n };\n vm.saving = true;\n return $http.put(`${appUrls.api}/api/company/${companyId}/bankaccounts`, model).then(\n ({ data }) => {\n vm.saving = false;\n $element.modal('hide');\n close(data, 500);\n },\n error => {\n vm.saving = false;\n flySvc.error(error);\n },\n );\n };\n\n vm.cancel = function() {\n $element.modal('hide');\n close(originalBankAccounts, 500);\n };\n}\n","import angular from 'angular';\n\nangular\n .module('cxSettings')\n .controller('TaskTemplateRequiredDocumentTypesDialogCtrl', [\n '$filter',\n 'flySvc',\n '$element',\n 'close',\n 'appUrls',\n '$http',\n 'enumCacheSvc',\n 'taskTemplateId',\n 'requiredDocumentTypes',\n taskTemplateRequiredDocumentTypesDialogCtrl,\n ]);\n\nfunction taskTemplateRequiredDocumentTypesDialogCtrl(\n $filter,\n flySvc,\n $element,\n close,\n appUrls,\n $http,\n enumCacheSvc,\n taskTemplateId,\n requiredDocumentTypes,\n) {\n var vm = this;\n vm.taskTemplateId = taskTemplateId;\n\n vm.hasChanged = false;\n vm.saving = false;\n vm.selectableDocumentTypes = [];\n\n enumCacheSvc.get('documentType').then(function(data) {\n const unselectableDocumentTypes = [0, 1, 3, 4, 6, 7, 8, 9, 13, 14, 15, 18, 19, 23, -1, 1000];\n vm.selectableDocumentTypes = data\n .filter(x => !unselectableDocumentTypes.some(y => y === x.key))\n .map(x => ({\n id: x.key,\n name: $filter('translateList')(x.key, 'documentType', x.value),\n }));\n vm.documentTypes = requiredDocumentTypes\n ? vm.selectableDocumentTypes.filter(x => requiredDocumentTypes.includes(x.id))\n : [];\n vm.orgSelectedDocumentTypes = angular.copy(vm.documentTypes || []);\n vm.selectableDocumentTypes = $filter('orderBy')(vm.selectableDocumentTypes, 'name');\n });\n\n vm.loadSelectableDocumentTypes = function(search) {\n if (vm.selectableDocumentTypes !== null) {\n return $filter('filter')(vm.selectableDocumentTypes, search);\n }\n };\n\n vm.documentTypesChanged = function() {\n vm.hasChanged =\n vm.documentTypes.length !== vm.orgSelectedDocumentTypes.length ||\n JSON.stringify(vm.documentTypes.map(x => x.id).sort()) !==\n JSON.stringify(vm.orgSelectedDocumentTypes.map(x => x.id).sort());\n };\n\n vm.save = function() {\n if (vm.saving) return;\n if (!vm.hasChanged) return vm.cancel();\n\n vm.saving = true;\n return $http\n .post(\n `${appUrls.tasks}/api/TaskTemplates/DocumentTypes/${taskTemplateId}`,\n vm.documentTypes.map(x => x.id),\n )\n .then(\n () => {\n vm.saving = false;\n flySvc.changesSaved();\n $element.modal('hide');\n close(\n vm.documentTypes.map(x => x.id),\n 500,\n );\n },\n error => {\n flySvc.error(error);\n vm.saving = false;\n },\n );\n };\n\n vm.cancel = function() {\n $element.modal('hide');\n close(null, 500);\n };\n}\n","import angular from 'angular';\nimport { dynamicSortMultiple } from '@/shared/utils/dynamicSort';\nimport { guid1 } from '@/shared/utils/guid';\nimport dompurify from 'dompurify';\n\nangular\n .module('cxSettings')\n .controller('EditTaskTemplateDialogCtrl', [\n '$element',\n '$scope',\n '$http',\n 'appUrls',\n 'flySvc',\n 'resourceFactorySvc',\n 'resourceNameFilter',\n 'close',\n 'costResources',\n 'parameterDefinitions',\n 'mainTaskTemplateId',\n 'taskTemplate',\n editTaskTemplateDialogCtrl,\n ]);\n\nfunction editTaskTemplateDialogCtrl(\n $element,\n $scope,\n $http,\n appUrls,\n flySvc,\n resourceFactorySvc,\n resourceNameFilter,\n close,\n costResources,\n parameterDefinitions,\n mainTaskTemplateId,\n taskTemplate,\n) {\n var vm = this;\n vm.showValidation = false;\n vm.taskTemplate = taskTemplate;\n vm.model = {\n costResourceId: taskTemplate.costResourceId,\n costParameterDefinitionId: taskTemplate.costParameterDefinitionId,\n costRegistrationUserId: taskTemplate.costRegistrationUserId,\n documentation: taskTemplate.documentation,\n };\n vm.costResources = costResources;\n\n if (!vm.costResources) {\n resourceFactorySvc.get('resource').reg(\n {\n type: 1,\n },\n function(data) {\n vm.costResources = data\n .map(item => ({\n ...item,\n label: resourceNameFilter(item),\n code: item.code || '',\n }))\n .sort(dynamicSortMultiple('code', 'label'));\n },\n );\n }\n\n vm.parameterDefinitions = parameterDefinitions;\n if (!vm.parameterDefinitions) {\n $http.get(`${appUrls.tasks}/api/TaskParameters/Definitions/${mainTaskTemplateId}`).then(\n function({ data }) {\n vm.parameterDefinitions = data.sort(dynamicSortMultiple('name'));\n },\n error => flySvc.error(error),\n );\n }\n\n vm.isDocumentationEmpty = documentation => {\n // Small hack to render document in hidden div, and then retrieve text content\n // seemed more useful than regex replace. The inner content of the ckEditor always\n // contains some high-level HTML tags without content, so a simple 'empty' check\n // on the string value isn't sufficient.\n const div = document.createElement('div');\n div.innerHTML = dompurify.sanitize(documentation);\n return !div.textContent.trim();\n };\n\n vm.save = function() {\n if ($scope.form.$invalid) return;\n vm.saving = true;\n\n let model = angular.copy(taskTemplate);\n\n model.costResourceId = vm.model.costResourceId;\n model.costParameterDefinitionId = vm.model.costParameterDefinitionId;\n model.costRegistrationUserId = vm.model.costRegistrationUserId;\n model.documentation = vm.isDocumentationEmpty(vm.model.documentation)\n ? null\n : vm.model.documentation;\n\n delete model.assignedTo;\n delete model.mailTemplate;\n delete model.tags;\n\n $http.put(appUrls.tasks + '/api/tasktemplates/templates', model).then(\n function({ data = {} }) {\n vm.saving = false;\n $element.modal('hide');\n close(data, 500);\n flySvc.success();\n\n taskTemplate.costResourceId = model.costResourceId;\n taskTemplate.costParameterDefinitionId = model.costParameterDefinitionId;\n taskTemplate.costRegistrationUserId = model.costRegistrationUserId;\n taskTemplate.documentation = model.documentation;\n\n return false;\n },\n function(error) {\n vm.saving = false;\n flySvc.error(error);\n },\n );\n };\n\n vm.showValidationErrors = function() {\n vm.showValidation = true;\n if (vm.translation && vm.translation.isValid) vm.translation.isValid(true);\n };\n vm.cancel = function() {\n close(null, 500);\n };\n}\n","import angular from 'angular';\nimport moment from 'moment';\nimport { generateExample } from '../../common/directives/numberFormatDrv';\n\nangular.module('cxSettings').directive('cxBookyearSettings', [\n 'flySvc',\n '$q',\n function(flySvc, $q) {\n return {\n restrict: 'E',\n replace: true,\n scope: {\n data: '=',\n label: '@',\n save: '&',\n type: '@',\n disabled: '=?',\n yearFormat:'=?'\n },\n template: require('./bookyearSettings.html'),\n link: function(scope) {\n scope.collapsed = false;\n scope.toggleOpen = function() {\n scope.collapsed = !scope.collapsed;\n };\n scope.dateOptions = {\n maxMode: 'month',\n startingDay: 1,\n };\n scope.submit = function(value, field) {\n if (field === 'startDate') {\n if (!value) return false;\n var cleanValue = moment(value)\n .clone()\n .startOf('day')\n .toDate();\n var lowerBound =\n scope.type === 'CURRENT'\n ? moment\n .utc()\n .add(-1, 'years')\n .startOf('day')\n .toDate()\n : moment\n .utc()\n .startOf('day')\n .toDate();\n if (cleanValue <= lowerBound) {\n flySvc.message('msgDateCannotBeSetBefore', {\n date: lowerBound.ISO(),\n });\n return false;\n }\n }\n if (field === 'invoiceNumberStartValue' || field === 'creditNoteNumberStartValue') {\n if (!value || parseInt(value) <= 0) value = 1;\n }\n if (value === scope.data[field]) return false;\n var model = angular.copy(scope.data);\n model[field] = value;\n return $q.when(\n scope.save({\n newValue: model,\n }),\n );\n };\n scope.generateExample = generateExample;\n },\n };\n },\n]);\n","import angular from 'angular';\n\n/* Normal select directive */\nangular.module('cxTaskflow').directive('cxAssignedToSelect', function() {\n return {\n restrict: 'E',\n template: ``,\n scope: {\n users: '=',\n profiles: '=',\n placeholder: '@?',\n },\n bindToController: true,\n require: ['ngModel', 'cxAssignedToSelect'],\n link: function(scope, el, attrs, controllers) {\n if (!controllers || controllers.length !== 2) return;\n var ngModel = controllers[0];\n var ctrl = controllers[1];\n\n ctrl.view2model = function(value) {\n ngModel.$setViewValue(value);\n };\n\n // when angular detects a change to the model,\n // we update our inner value\n ngModel.$render = function() {\n ctrl.setValue(ngModel.$viewValue);\n };\n },\n controllerAs: 'ctrl',\n controller: [\n function() {\n const ctrl = this;\n ctrl.value = null;\n ctrl.valueChanged = function() {\n if (!ctrl.view2model) return;\n var oValue = {\n assignedType: 0,\n userId: null,\n profile: null,\n };\n\n if (typeof ctrl.value === 'string') {\n var parts = ctrl.value.split(';');\n if (parts[0].length && parts[1].length)\n if (parts.length === 2) {\n if (parts[0] === '1')\n oValue = {\n ...oValue,\n assignedType: 1,\n profile: parseInt(parts[1]),\n };\n else if (parts[0] === '2')\n oValue = {\n ...oValue,\n assignedType: 2,\n userId: parts[1],\n };\n }\n }\n\n ctrl.view2model(oValue);\n };\n\n ctrl.setValue = function({ assignedType = 0, userId = null, profile = null } = {}) {\n if (assignedType === 1 && profile) {\n ctrl.value = '1;' + profile;\n } else if (assignedType === 2 && userId) {\n ctrl.value = '2;' + userId;\n } else {\n ctrl.value = '0;';\n }\n };\n },\n ],\n };\n});\n","import angular from 'angular';\n\nangular.module('cxTaskflow').directive('cxAssignedToXedit', function() {\n return {\n restrict: 'E',\n template: `\n \n {{vm.getProfileLabel(vm.value.profile)}}\n {{vm.getUserName(vm.value.userId)}}\n `,\n scope: {\n value:\n '=data' /* should be object with (at least) these properties: assignedType, userId, profile */,\n unassignedLabel: '@',\n fallback: '=',\n beforeSave: '&',\n afterSave: '&',\n disabled: '=?',\n },\n bindToController: true,\n controllerAs: 'vm',\n controller: [\n '$scope',\n '$rootScope',\n '$translate',\n 'enumCacheSvc',\n 'dataCache',\n 'translateListFilter',\n function($scope, $rootScope, $translate, enumCacheSvc, dataCache, translateListFilter) {\n const vm = this;\n vm.users = [];\n vm.allUsers = [];\n vm.profiles = [];\n vm.showWarning = false;\n\n function translateProfiles() {\n vm.profiles.forEach(p => {\n p.label = translateListFilter(p.id, 'employeeprofile', p.value);\n });\n }\n vm.getProfileLabel = function(profile) {\n if (!profile) return null;\n const prof = vm.profiles.find(p => p.id === profile);\n vm.showWarning = false;\n return prof ? prof.label : '/';\n };\n vm.getUserName = function(userId) {\n if (!userId) return null;\n const user = vm.allUsers.find(u => u.id === userId);\n vm.showWarning = !user || !user.isActive;\n return user ? user.label : '/';\n };\n vm.getUnassingedLabel = function() {\n vm.showWarning = false;\n if (!vm.fallback || !vm.fallback.assignedType) return vm.unassignedLabel;\n if (vm.fallback.assignedType === 1) return vm.getProfileLabel(vm.fallback.profile);\n if (vm.fallback.assignedType === 2) return vm.getUserName(vm.fallback.userId);\n return vm.unassignedLabel;\n };\n enumCacheSvc.get('employeeprofile').then(function(data) {\n vm.profiles = data.map(({ key, value }) => ({ id: key, value, label: value }));\n translateProfiles();\n });\n dataCache.ready().then(function() {\n vm.allUsers = dataCache.getArray('user').map(u => ({\n id: u.userID,\n label: `${u.firstName} ${u.lastName}`,\n isActive: u.isActive,\n hidden: u.hidden,\n }));\n vm.users = vm.allUsers.filter(x => x.isActive || !x.hidden);\n });\n\n var deregistration = $rootScope.$on('$translateChangeSuccess', translateProfiles);\n $scope.$on('$destroy', deregistration);\n },\n ],\n };\n});\n","import angular from 'angular';\n\n/* X-editable wrapper for cxAssignedToSelect */\nangular.module('cxTaskflow').directive('editableAssignedTo', [\n 'editableDirectiveFactory',\n function(editableDirectiveFactory) {\n return editableDirectiveFactory({\n directiveName: 'editableAssignedTo',\n inputTpl: '',\n autosubmit: function() {\n var self = this;\n self.inputEl.bind('change', function() {\n self.scope.$apply(function() {\n self.scope.$form.$submit();\n });\n });\n },\n handleEmpty: function() {\n var self = this;\n var val = self.scope.$parent.$eval(self.attrs['editableAssignedTo']);\n var isEmpty =\n val === null ||\n val === undefined ||\n val === '' ||\n (angular.isArray(val) && val.length === 0) ||\n val.assignedType === 0;\n self.elem.toggleClass('editable-empty', isEmpty);\n },\n });\n },\n]);\n","import angular from 'angular';\n\nangular\n .module('cxTranslations')\n .controller('TranslateLabelsCtrl', [\n 'translateSvc',\n 'flySvc',\n 'localStorageService',\n translateLabelsCtrl,\n ]);\n\nfunction translateLabelsCtrl(translateSvc, flySvc, localStorageService) {\n var vm = this;\n vm.fNotTranslated = true;\n vm.fInvalidKeys = false;\n vm.showModifiedDates = false;\n vm.showScanInfo = false;\n vm.showDefaultValue = false;\n vm.languages = [];\n vm.allLanguages = [];\n vm.translations = [];\n\n vm.selectedLanguages = localStorageService.get('TranslationToolLanguages') || ['nl'];\n\n vm.addLanguage = function(lang) {\n if (!lang) return;\n vm.selectedLanguages.push(lang);\n localStorageService.set('TranslationToolLanguages', vm.selectedLanguages);\n vm.filterLanguages();\n vm.getTranslations([lang]);\n };\n\n vm.removeLanguage = function(lang) {\n if (!lang) return;\n var idx = vm.selectedLanguages.indexOf(lang);\n if (idx >= 0) {\n vm.selectedLanguages.splice(idx, 1);\n localStorageService.set('TranslationToolLanguages', vm.selectedLanguages);\n vm.filterLanguages();\n }\n };\n\n vm.filterLanguages = function() {\n vm.languages = vm.allLanguages.filter(function(lang) {\n return vm.selectedLanguages.indexOf(lang) < 0;\n });\n };\n vm.filterTranslations = function(item) {\n if (vm.showNotScanned) {\n if (item.source || item.lastScanned) return false;\n }\n if (vm.fInvalidKeys) {\n return vm.containsLineEnd(item.key);\n }\n if (vm.fNotTranslated) {\n for (var i = 0; i < vm.selectedLanguages.length; i++) {\n var trans = item[vm.selectedLanguages[i]];\n if (!trans) return false;\n if (!(trans.value || trans.inherited)) return true;\n }\n return false;\n }\n\n return true;\n };\n\n vm.getTranslations = function(languages) {\n if (!languages || !languages.length) return;\n return translateSvc.getLabels(languages).then(function(data) {\n if (vm.translations.length) {\n for (var i = 0; i < data.length; i++) {\n var group = data[i];\n var translation = vm.translations.find(function(x) {\n return x.key === group.key;\n });\n if (!translation) {\n translation = {\n key: group.key,\n lastScanned: group.lastScanned,\n source: group.source,\n defaultValue: group.defaultValue,\n };\n vm.translations.push(translation);\n }\n if (group.translations)\n //Map translation object directly onto parent object\n angular.extend(translation, group.translations);\n }\n } else {\n vm.translations = data.map(function(group) {\n var translation = {\n key: group.key,\n lastScanned: group.lastScanned,\n source: group.source,\n defaultValue: group.defaultValue,\n };\n\n if (group.translations)\n //Map translation object directly onto parent object\n angular.extend(translation, group.translations);\n\n return translation;\n });\n }\n });\n };\n\n vm.reloadTranslations = function() {\n vm.translations = [];\n vm.getTranslations(vm.selectedLanguages);\n };\n\n vm.addKey = function() {\n var key = (vm.search || prompt('New key:')).trim();\n if (key) {\n for (var i = 0; i < vm.translations.length; i++) if (vm.translations[i].key === key) return;\n\n var translation = {\n key: key,\n lastScanned: null,\n source: null,\n };\n for (var j = 0; j < vm.selectedLanguages.length; j++)\n translations[vm.selectedLanguages[j]] = {\n value: null,\n inherited: null,\n lastModified: null,\n };\n\n vm.translations.push(translation);\n }\n };\n\n vm.save = function(item, lang, value) {\n translateSvc.saveLabel(lang, item.key, value, 1);\n };\n\n vm.removeTranslation = function(item) {\n translateSvc.removeLabel(item.key, 1).then(function() {\n var idx = vm.translations.findIndex(function(x) {\n return x.key === item.key;\n });\n if (idx >= 0) vm.translations.splice(idx, 1);\n });\n };\n vm.containsLineEnd = function(value) {\n if (!value || typeof value !== 'string') return false;\n return /\\r|\\n/.exec(value);\n };\n\n vm.predicate = 'key';\n vm.reverse = false;\n vm.sort = function(predicate) {\n vm.reverse = vm.predicate === predicate ? !vm.reverse : false;\n vm.predicate = predicate;\n };\n vm.allLanguages = translateSvc.languages;\n vm.filterLanguages();\n vm.reloadTranslations();\n}\n","import angular from 'angular';\n\nangular.module('cxTranslations').factory('translateSvc', ['$http', 'appUrls', translateSvc]);\n\nfunction translateSvc($http, appUrls) {\n var getLabels = function(languages) {\n return $http\n .get(appUrls.api + '/api/translationTool/labels/' + languages.join(';'))\n .then(handleSuccess);\n };\n var saveLabel = function(language, key, value) {\n return $http\n .put(appUrls.api + '/api/translationTool/labels/', [\n {\n language: language,\n key: key,\n value: value,\n },\n ])\n .then(handleSuccess);\n };\n var removeLabel = function(key, defs) {\n return $http\n .post(appUrls.api + '/api/translationTool/removeLabel/' + (defs ? '1' : '0'), {\n key: key,\n })\n .then(handleSuccess);\n };\n var getLists = function(languages) {\n return $http\n .get(appUrls.api + '/api/translationTool/lists/' + languages.join(';'))\n .then(handleSuccess);\n };\n var saveList = function(language, key, value) {\n return $http\n .put(appUrls.api + '/api/translationTool/lists/', [\n {\n language: language,\n key: key,\n value: value,\n },\n ])\n .then(handleSuccess);\n };\n var removeList = function(key, defs) {\n return $http\n .post(appUrls.api + '/api/translationTool/removeList/' + (defs ? '1' : '0'), {\n key: key,\n })\n .then(handleSuccess);\n };\n /*var languages = function(all) {\n return $http\n .get(appUrls.api + '/api/translation/language/' + (all ? '1' : '0'))\n .then(handleSuccess);\n };*/\n\n function handleSuccess(response) {\n return response.data;\n }\n\n return {\n getLabels: getLabels,\n saveLabel: saveLabel,\n removeLabel: removeLabel,\n getLists: getLists,\n saveList: saveList,\n removeList: removeList,\n languages: ['nl', 'nl-nl', 'fr', 'en'],\n };\n}\n","import angular from 'angular';\nimport SignalRService from '@/shared/services/SignalRService';\n\nangular\n .module('commonServices')\n .factory('jobSvc', [\n '$http',\n '$rootScope',\n 'appUrls',\n 'authService',\n '$interval',\n '$timeout',\n jobSvc,\n ]);\n\nfunction jobSvc($http, $rootScope, appUrls, authService, $interval, $timeout) {\n var runningJobs = [];\n\n function isJobRunning() {\n return runningJobs && runningJobs.length > 0;\n }\n\n function reloadRunningJobs() {\n $http.get(appUrls.jobs + '/Api/jobs/jobsinprogress').then(function(response) {\n if (response.data) {\n runningJobs = [...response.data];\n }\n });\n }\n reloadRunningJobs();\n\n var updateJobStatus = function(job) {\n $timeout(function() {\n if (job.status === 0 || job.status === 1) {\n // Add it to the running jobs\n var exists = runningJobs.some(x => x == job.id);\n if (!exists) {\n runningJobs.push(job.id);\n }\n } else {\n var existingJob = runningJobs.find(x => x == job.id);\n if (existingJob) {\n var idx = runningJobs.indexOf(existingJob);\n if (idx >= 0) runningJobs.splice(idx, 1);\n }\n }\n }, 100);\n };\n\n SignalRService.subscribe('jobUpdated', updateJobStatus);\n\n return {\n isJobRunning: isJobRunning,\n };\n}\n","import oidc, { UserManager } from 'oidc-client';\nimport 'jquery';\nimport 'bootstrap/dist/js/bootstrap';\nimport 'react-dates/initialize';\nimport angular from 'angular';\nimport log from 'loglevel';\n\nimport './ajs';\nimport './style/main.scss';\nimport zendesk from './zendesk';\nimport config from './config';\nimport { onCkEditorLoaded } from './ckeditorConfig';\nimport { initAppInsights } from './appInsights';\n\nimport AuthService from './shared/services/AuthService';\nimport TimerRegistrationService from './shared/services/TimerRegistrationService';\n\nif (config.environment !== 'local') {\n // Force https\n if (window.location.protocol !== 'https:') {\n window.location.href = `https:${window.window.location.href.substring(\n window.location.protocol.length,\n )}`;\n }\n}\n\n// dump config in dev environment\nif (config.environment !== 'Production' && config.environment !== 'Acceptance') {\n console.log('App started with');\n console.log(' version: ', config.version);\n console.log(' environment: ', config.environment);\n console.log(' build: ', config.buildType);\n console.log(' inline manual: ', config.inlineManualUrl);\n console.log(' app insights: ', config.appInsightsKey);\n console.log(' logLevel: ', config.logLevel);\n\n console.log(' appUrls: ', { ...config.appUrls });\n console.log(' auth: ', { ...config.auth });\n console.log(' features: ', { ...config.features });\n\n // Enable oidc logging in dev\n oidc.Log.logger = console;\n}\n\n// setup logging\nlog.setDefaultLevel(config.logLevel);\nlog.setLevel(config.logLevel);\n\n// initialize Beamer whatsnew\nfunction initializeBeamerWhatsNew(user) {\n const { Sid, Name, Email, l, su } = user.profile;\n if (su) return; // dont init beamer for support user\n\n const configScript = document.createElement('script');\n const beamerConfig = {\n product_id: 'ngvcLvvG30699',\n selector: '.beamerTrigger',\n display: 'right',\n top: 10, // only numbers are allowed, not '-5px'\n language: l || 'nl', // init with language from token, later on actual (current) language will be used to re-init config\n lazy: true,\n alert: true,\n user_email: Email,\n user_id: Sid,\n };\n configScript.type = 'text/javascript';\n configScript.text = `var beamer_config = ${JSON.stringify(beamerConfig)}`;\n document.body.appendChild(configScript);\n\n const urlScript = document.createElement('script');\n urlScript.src = 'https://app.getbeamer.com/js/beamer-embed.js';\n urlScript.defer = 'defer';\n document.body.appendChild(urlScript);\n}\n\nconst setupZendeskTags = user => {\n // this method adds the tenantId to the zendesk tags. This makes it easier for support agents to find more info about the tenant requesting help\n if (user.profile && user.profile.GroupSid) {\n const {\n GroupSid: tenantId,\n Name: userName,\n Email: userEmail,\n TenantConfiguration,\n } = user.profile;\n\n zendesk.setUserInfo(tenantId, userName, userEmail, TenantConfiguration);\n }\n};\n\n// log in before angular startup\nconst manager = new UserManager(config.auth);\nmanager.clearStaleState();\n\n// when opening a new tab the getUser will return null and authentication should be performed\nmanager.getUser().then(user => {\n if (!user) {\n manager.signinRedirect({\n state: {\n url: window.location.href,\n },\n });\n } else {\n manager.events.addAccessTokenExpired(() => {\n console.debug('Access token expired!');\n manager.signinRedirect({\n state: {\n url: window.location.href,\n },\n });\n });\n manager.events.addSilentRenewError(err => {\n if (err && err.message === 'login_required') {\n manager.signoutRedirect();\n } else {\n console.error('SilentRenewError', err);\n }\n });\n\n // called on silent login callback\n manager.events.addUserLoaded(newUser => {\n // ccc = credentials changed count. Logout the user if their credentials have changed after the silent login\n if (\n user?.profile &&\n newUser?.profile &&\n (user.profile.ccc || user.profile.ccc === 0) &&\n parseInt(newUser.profile.ccc) > parseInt(user.profile.ccc)\n ) {\n manager.signoutRedirect();\n }\n\n if (user && user.profile && user.profile.sub !== newUser.profile.sub) {\n console.debug(\n `Tenant changed from ${user.profile.sub} to ${newUser.profile.sub}. Reloading...`,\n );\n window.location.reload();\n }\n });\n\n setupZendeskTags(user);\n initializeBeamerWhatsNew(user);\n // Initialize application insights -\n // - https://github.com/microsoft/ApplicationInsights-JS\n // - https://github.com/microsoft/ApplicationInsights-JS/blob/master/API-reference.md\n if (config.appInsightsKey && config.appInsightsKey !== 'null') {\n const appInsights = initAppInsights(config.appInsightsKey, user);\n angular.module('cloudX').constant('appInsights', appInsights);\n } else {\n angular.module('cloudX').constant('appInsights', null);\n }\n\n angular.module('cloudX').constant('appUrls', config.appUrls);\n angular.module('cloudX').constant('environment', config.environment);\n angular.module('cloudX').constant('buildversion', config.buildVersion);\n angular.module('cloudX').constant('featureflags', config.features);\n // Only to be used by the AuthService\n angular.module('cloudX').constant('authServiceConfig', {\n user,\n manager,\n });\n\n AuthService.setConfig({\n user,\n manager,\n });\n\n appendScript(`${config.appUrls.storage}/ckeditor_4.21.0/ckeditor.js`).then(\n () => onCkEditorLoaded(),\n error => {\n console.error(error);\n },\n );\n\n TimerRegistrationService.init();\n // start angular app\n angular.bootstrap(document, ['cloudX'], {\n strictDi: false,\n });\n }\n});\n\nfunction appendScript(url, defer, async) {\n const script = document.createElement('script');\n script.src = url;\n\n if (defer) {\n script.defer = true;\n }\n if (async) {\n script.async = true;\n }\n document.body.appendChild(script);\n return new Promise((res, rej) => {\n script.onload = () => res();\n script.onerror = e => rej(e);\n });\n}\n\n// initialize inline manual\nif (config.inlineManualUrl && config.inlineManualUrl !== 'null') {\n appendScript(config.inlineManualUrl);\n}\n\n// inject google map api\nappendScript(\n `https://maps.googleapis.com/maps/api/js?key=${config.googleApiKey}&callback=Function.prototype`,\n true,\n);\nappendScript(\n 'https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.0/js/intlTelInput.min.js',\n true,\n);\nappendScript('https://www.google.com/recaptcha/enterprise.js?render=explicit', true, true);\n\nappendScript('https://acrobatservices.adobe.com/view-sdk/viewer.js', true);\n\nif (config.environment !== 'local') {\n const subdomain =\n config.environment === 'Development'\n ? 'dev'\n : config.environment === 'Acceptance'\n ? 'acc'\n : 'app';\n\n document.write(\n ``,\n );\n\n // define the `plausible` function to manually trigger events\n document.write(\n '',\n );\n}\n"],"sourceRoot":""}
      \n this.onDocumentUpdated(document)} />\n this.onDocumentUpdated(document)} />\n\n {showMoveToSharepointModal && (\n this.documentMovedToSharepoint(data)}\n onClose={() => this.setState({ showMoveToSharepointModal: false })}\n />\n )}\n {showLinkFromSharepointModal && (\n this.documentLinkedToSharepoint(newDocument)}\n onClose={() => this.setState({ showLinkFromSharepointModal: false })}\n relationId={initialSearchParams?.mainFilters?.relationId}\n tags={initialSearchParams.tags}\n />\n )}\n {showSelectRelationModal && (\n this.setState({ showSelectRelationModal: false })}\n onSave={relation => {\n this.setState({ showSelectRelationModal: false }, () =>\n this.onSendViaEmail(activeDocument, asPdf, relation),\n );\n }}\n />\n )}\n {showForwardModal && (\n 0\n ? activeDocument.relations[0].id\n : undefined\n }\n show\n onClose={() =>\n this.setState(state => ({\n ...state,\n showForwardModal: false,\n }))\n }\n />\n )}\n {showSendByEmailModal && (\n \n this.setState(state => ({\n ...state,\n showSendByEmailModal: false,\n }))\n }\n onSave={this.sendEmail}\n />\n )}\n {showDocumentDetailsModal && (\n \n this.setState({ activeDocument: document, showSingleDeleteDocumentModal: true })\n }\n onSave={document =>\n this.setState({ showDocumentDetailsModal: false }, () =>\n this.onDocumentUpdated(document),\n )\n }\n onClose={() =>\n this.setState({ showDocumentDetailsModal: false, activeDocument: undefined }\n )\n }\n onCheckinCheckout={document => this.onDocumentUpdated(document)}\n onReplaceDocument={this.replaceDocument}\n />\n )}\n {showAdvancedUploadModal && (\n this.setState({ showAdvancedUploadModal: false })}\n onClose={() => this.setState({ showAdvancedUploadModal: false })}\n />\n )}\n {showProcessAuthorizationListModal && (\n this.setState({ showProcessAuthorizationListModal: false })}\n intl={intl}\n stateService={stateService}\n onClose={() =>\n this.setState({ showProcessAuthorizationListModal: false, activeDocument: undefined })\n }\n />\n )}\n {showProcessYukiRegistrationListModal && (\n this.setState({ showProcessYukiRegistrationListModal: false })}\n intl={intl}\n stateService={stateService}\n onClose={() =>\n this.setState({\n showProcessYukiRegistrationListModal: false,\n activeDocument: undefined,\n })\n }\n />\n )}\n {showPickRelationModal && (\n \n this.setState(state => ({\n ...state,\n showPickRelationModal: false,\n }))\n }\n onSave={document => this.linkDocumentToRelation(document)}\n />\n )}\n {showUpdateTagsModal && (\n \n this.setState(state => ({\n ...state,\n showUpdateTagsModal: false,\n }))\n }\n onSave={data =>\n this.executeBatchAction({\n action: 'updatetags',\n parameters: data,\n })\n }\n />\n )}\n {showUpdateRelationsModal && (\n \n this.setState(state => ({\n ...state,\n showUpdateRelationsModal: false,\n }))\n }\n onSave={data => {\n const parameters = {\n action: data.action,\n relations: data.relations.map(x => x.id),\n };\n return this.executeBatchAction({\n action: 'updaterelations',\n parameters,\n });\n }}\n />\n )}\n {showDeleteRelationLinkModal && (\n this.setState({ showDeleteRelationLinkModal: false })}\n onSave={() => {\n api.base\n .delete(\n `${config.appUrls.documents}/api/documents/Links/${activeDocument.id}/${activeRelationId}/3`,\n )\n .then(\n () => {\n ToastrService.success(intl.formatMessage(messages.RelationLinkDeleted));\n this.setState({\n showDeleteRelationLinkModal: false,\n documents: documents.map(x => {\n if (x.id === activeDocument.id) {\n return {\n ...x,\n relations: x.relations.filter(y => y.id !== activeRelationId),\n };\n }\n return x;\n }),\n });\n },\n error => {\n handleHttpError(intl)(error);\n },\n );\n }}\n />\n )}\n {showRemoveBatchDocumentsModal && (\n this.setState({ showRemoveBatchDocumentsModal: false })}\n onSave={() =>\n this.executeBatchAction({\n action: 'removedocuments',\n parameters: {},\n })\n }\n />\n )}\n {showSingleDeleteDocumentModal && (\n this.setState({ showSingleDeleteDocumentModal: false })}\n onSave={() => this.deleteDocument(activeDocument.id)}\n />\n )}\n {showDownloadZipModal && (\n \n this.executeBatchAction({\n action: 'downloadzip',\n parameters,\n })\n }\n onClose={() => this.setState({ showDownloadZipModal: false })}\n />\n )}\n {showSetPublicOnPortalModal && (\n \n this.setState(state => ({\n ...state,\n showSetPublicOnPortalModal: false,\n }))\n }\n onSave={data =>\n this.executeBatchAction({\n action: 'setispubliconportal',\n parameters: data,\n })\n }\n />\n )}\n {showChangeDocumentDateModal && (\n \n this.setState(state => ({\n ...state,\n showChangeDocumentDateModal: false,\n }))\n }\n onSave={data =>\n this.executeBatchAction({\n action: 'ChangeDocumentDate',\n parameters: data,\n })\n }\n />\n )}\n {showChangeDocumentTypeModal && (\n \n this.setState(state => ({\n ...state,\n showChangeDocumentTypeModal: false,\n }))\n }\n onSave={data =>\n this.executeBatchAction({\n action: 'ChangeDocumentType',\n parameters: data,\n })\n }\n />\n )}\n {showExtractZipModal && (\n this.setState({ showExtractZipModal: false, activeDocument: undefined })}\n onAccept={this.handleExtractZipAction}\n />\n )}\n {showCreateTodoModal && (\n 0\n ? activeDocument.relations[0].id\n : undefined\n }\n onSave={() => this.setState({ showCreateTodoModal: false, activeDocument: undefined })}\n onClose={() => this.setState({ showCreateTodoModal: false, activeDocument: undefined })}\n />\n )}\n\n {showSignatureRequestModal && (\n \n this.setState({\n showSignatureRequestModal: false,\n documents: documents.map(x => {\n const updatedDocument = updatedDocuments.find(y => y.id === x.id);\n if (updatedDocument) {\n return { ...updatedDocument };\n }\n return x;\n }),\n })\n }\n onClose={() =>\n this.setState({ showSignatureRequestModal: false, activeDocument: undefined })\n }\n />\n )}\n {showRevokeSignatureRequestModal && (\n this.setState({ showRevokeSignatureRequestModal: false })}\n onSave={() => this.revokeSignatureRequest(activeDocument)}\n />\n )}\n {showColumnSelectionModal && (\n this.setState({ showColumnSelectionModal: false })}\n show={showColumnSelectionModal}\n sortByLabel={false}\n />\n )}\n {showShareItemModal && (\n 0\n ? activeDocument.relations[0].id\n : undefined\n }\n relationName={\n activeDocument.relations && activeDocument.relations.length > 0\n ? getRelationName(intl, activeDocument.relations[0])\n : undefined\n }\n onClose={() => this.setState({ showShareItemModal: false })}\n />\n )}\n {showDiscardCheckoutModal && (\n this.setState({ showDiscardCheckoutModal: false })}\n onSave={() => this.discardCheckout(activeDocument)}\n />\n )}\n \n
      \n \n {\n this.pond = ref;\n }}\n removeSuccessfullAfter={5000}\n allowDrop\n onAdvancedUpload={() => this.setState({ showAdvancedUploadModal: true })}\n onLinkFromSharepoint={() => {\n this.setState({ showLinkFromSharepointModal: true });\n }}\n />\n \n
      \n
      \n {selectedCompany && (\n
      \n \n {intl.formatMessage(messages.AutoLinkDocumentsToCompanyExplanation)}\n \n }\n >\n \n \n \n \n {selectedCompany.name} }}\n />\n
      \n )}\n
      \n
      \n
      \n
      \n {relationName && (\n
      \n {relationName} }}\n />\n
      \n )}\n this.filterDocumentsByTags(tags, force)}\n onUploadDocument={this.onUploadDocument}\n initialTags={initialSearchParams.tags}\n onTreeLoaded={this.onTreeviewLoaded}\n />\n
      \n
      \n
      \n
      \n \n this.filtersChanged(filters)}\n selectionCount={this.getSelectionCountFormatted()}\n />\n \n\n
      \n
      \n this.setState({ showColumnSelectionModal: true })}\n >\n \n \n \n \n \n this.setState({ showUpdateTagsModal: true })}\n onUpdateRelations={() => this.setState({ showUpdateRelationsModal: true })}\n onRemoveDocuments={() => this.setState({ showRemoveBatchDocumentsModal: true })}\n onDownloadZip={() => this.setState({ showDownloadZipModal: true })}\n onCreateMergePdf={() =>\n this.executeBatchAction(\n {\n action: 'createmergedpdf',\n },\n {},\n )\n }\n onSendByEmail={() => this.openEmailOrSignatureModal('email')}\n onSendSignatureRequest={() => this.openEmailOrSignatureModal('signature')}\n onSetIsPublicOnPortal={() => this.setState({ showSetPublicOnPortalModal: true })}\n onChangeDocumentDate={() => this.setState({ showChangeDocumentDateModal: true })}\n onChangeDocumentType={() => this.setState({ showChangeDocumentTypeModal: true })}\n />\n
      \n
      \n\n this.handleListDragOver(e)}\n onDrop={e => this.handleListDrop(e)}\n style={{\n minHeight: '50vh',\n }}\n >\n {treeviewReady ? (\n \n this.loadDocuments(searchParams, requestNr)\n }\n renderRow={item => this.renderRow(item)}\n >\n \n }\n className=\"hidden-xs\"\n />\n\n \n \n \n \n \n \n \n \n\n \n \n ) : (\n \n )}\n
      \n