{"version":3,"sources":["helpers/Constants.ts","assets/images/power-bi-icon.png","layout-components/Sidebar/navItems.js","store/reducers/WeatherForecasts.ts","store/reducers/App.ts","store/reducers/ThemeOptions.ts","store/reducers/AppUserAdmin.ts","store/reducers/CaseSettings.ts","store/reducers/Vehicle.ts","store/reducers/MavoVehicle.ts","store/reducers/VehicleAuction.ts","store/reducers/Agenda.ts","store/actions/App.ts","store/actions/ThemeOptions.ts","store/actions/AppUserAdmin.ts","store/actions/CaseSettings.ts","store/actions/Vehicle.ts","store/index.ts","store/configureStore.ts","components/cases/CaseNewInNotification.tsx","components/cases/CaseMessageNotification.tsx","components/cases/CaseTask.tsx","components/cases/AppointmentNewInNotification.tsx","components/Home.tsx","components/auth/LogIn.tsx","components/auth/LogInCallBack.tsx","components/auth/RenewCallBack.tsx","helpers/MUITableTranslations.ts","components/admin/users/UsersTab.tsx","components/admin/users/RolesTab.tsx","components/_shared/Tabs.jsx","components/admin/users/AppUsers.tsx","components/admin/users/EditUser.tsx","components/admin/users/EditUserRoles.tsx","components/admin/users/ResetPassword.tsx","components/admin/users/UserDetails.tsx","components/admin/users/EditRole.tsx","components/admin/listOfValues/CityAppReferentials.tsx","components/admin/listOfValues/LeaseProviderAppReferentials.tsx","components/admin/listOfValues/AppReferentials.tsx","components/admin/mailPlaceHolders.ts","utils/toBase64.ts","components/admin/otherLists/OtherListsOfValues.tsx","assets/core/_variables-mui.scss","theme/index.js","theme/typography.js","assets/images/Brand_Mark.png","layout-components/HeaderLogo/index.js","assets/images/info.svg","layout-components/HeaderDots/index.js","layout-components/HeaderUserbox/index.js","helpers/VehicleHelper.ts","components/cases/SearchCase.tsx","helpers/Utils.ts","utils/orderUtils.ts","interfaces/OrderParts.ts","components/orders/OrderDetails.tsx","components/orders/SearchOrder.tsx","layout-components/HeaderSearch/index.js","layout-components/Header/index.js","layout-components/PageTitle/index.js","layout-components/WrapperSimple/index.js","layout-components/WrapperSeamless/index.js","layout-blueprints/LeftSidebar/index.js","components/userProfile/userProfile.tsx","components/admin/organizations/OrganizationBankAccounts.tsx","components/admin/organizations/OrganizationLogo.tsx","components/admin/organizations/OrganizationTokens.tsx","components/admin/organizations/EditOrganization.tsx","components/admin/organizations/OrganizationEntities.tsx","components/admin/organizations/OrganizationHierarchy.tsx","components/admin/organizations/OrganizationDetailsTab.tsx","components/admin/organizations/OrganizationUsers.tsx","components/admin/organizations/OrganizationInterfaces.tsx","components/admin/organizations/OrganizationParameters.tsx","components/admin/organizations/organizationCase/OrganizationCaseTypeTab.tsx","components/admin/organizations/organizationCase/OrganizationCaseTypeStepTab.tsx","components/admin/organizations/organizationCase/EditOrganizationFormDesign.tsx","components/admin/organizations/organizationCase/EditOrganizationForm.tsx","components/admin/organizations/organizationCase/OrganizationCaseTypeStepFormTab.tsx","components/admin/organizations/organizationCase/OrganizationNewCaseType.tsx","components/admin/tariffs/EditTariffLaborTab.tsx","components/admin/tariffs/EditTariff.tsx","components/admin/tariffs/Tariffs.tsx","components/admin/workflows/Workflows.tsx","components/admin/organizations/OrganizationFilters.tsx","components/admin/organizations/OrganizationJobTypes.tsx","components/admin/organizations/OrganizationMaintenancePackages.tsx","components/admin/organizations/OrganizationOilViscosities.tsx","components/admin/organizations/OrganizationInvoiceRanges.tsx","components/admin/organizations/OrganizationAdmin.tsx","components/admin/organizations/HOOrganizations.tsx","components/admin/xmlDocument/GtXML.tsx","helpers/forms/FormCode.ts","helpers/forms/FormButton.tsx","components/newCase/Workflows.tsx","components/newCase/SearchVehicleForm.tsx","components/newCase/searchClientForm.tsx","components/newCase/NewCase.tsx","components/admin/workflows/WorkflowGeneralData.tsx","components/admin/workflows/WorkflowParameters.tsx","components/admin/workflows/WorkflowOrganizationTypes.tsx","components/admin/workflows/WorkflowPartners.tsx","components/admin/workflows/WorkflowTariffs.tsx","components/admin/workflows/WorkflowCaseStructureSectionTab.tsx","components/admin/workflows/editWorkflowStep/EditWorkflowStepStatuses.tsx","components/admin/workflows/editWorkflowStep/EditWorkflowStep.tsx","components/admin/workflows/WorkflowCaseStructureStepsTab.tsx","components/admin/workflows/editWorkflowForm/EditWorkflowFormReport.tsx","components/admin/workflows/editWorkflowForm/EditWorkflowFormDesign.tsx","components/admin/workflows/editWorkflowForm/EditWorkflowFormActionTransStatus.tsx","components/admin/workflows/editWorkflowForm/EditWorkflowFormActionCaseAllocation.tsx","components/admin/workflows/editWorkflowForm/EditWorkflowFormActionSendEmail.tsx","components/admin/workflows/editWorkflowForm/EditWorkflowFormAction.tsx","components/admin/workflows/editWorkflowForm/EditWorkflowFormInterfaces.tsx","components/admin/workflows/WorkflowOptimizations.tsx","components/admin/workflows/WorkflowDocumentTypes.tsx","components/admin/workflows/WorkflowCalculations.tsx","components/admin/workflows/WorkflowPermissions.tsx","components/admin/workflows/editWorkflowForm/EditWorkflowForm.tsx","components/admin/workflows/WorkflowCaseStructureFormsTab.tsx","components/admin/workflows/WorkflowCaseStructure.tsx","components/admin/workflows/WorkflowSuppliers2.tsx","components/admin/workflows/WorkflowNotifications.tsx","components/admin/workflows/WorkflowInterfaces.tsx","components/admin/workflows/WorkflowCostCenters.tsx","components/admin/workflows/WorkflowAdmin.tsx","components/Loader.tsx","components/cases/Cases.tsx","components/cases/TariffProperties.tsx","components/cases/CaseDetailsCaseTabSummaryForm.tsx","components/cases/CaseDetailsCaseTabHistoryForm.tsx","helpers/forms/FormHelpers.ts","components/cases/CaseDetailsCaseTabModifyWorkflowForm.tsx","components/cases/CaseDetailsCaseTabDocumentsForm.tsx","components/cases/CaseDetailsCaseTabCarPhotosForm.tsx","interfaces/CalculationParts.ts","components/cases/CaseDetailsCaseTabCalculationDetails2.tsx","components/cases/CaseDetailsAlternativeCalculationPieces.tsx","components/cases/CaseDetailsAlternativeCalculationDetails.tsx","assets/images/car-image-not-available.jpg","components/evaluation/CarCard.tsx","components/cases/ValuationFiltersWizard/ValuationFiltersWizardComponent.tsx","components/cases/ValuationFiltersWizard/ValuationFiltersWizardContainer.tsx","components/cases/CaseDetailsValuation.tsx","components/cases/CaseDetailsCaseTabCompareCalculations.tsx","components/vehicles/CertificateOfControl.tsx","components/radar/RadarFilters.tsx","components/radar/RadarMap.tsx","components/radar/fuelTypes.ts","components/radar/RecentAdds.tsx","components/radar/RadarDonutChart.tsx","components/radar/RadarScatterChart.tsx","components/radar/RadarLineChart.tsx","components/radar/radarReducer.ts","components/radar/Radar.tsx","components/cases/CaseValuationHistory.tsx","components/cases/CaseDetailsCaseRequests.tsx","components/cases/CaseDetailsCaseTabCalculationsForm.tsx","components/_shared/DatePicker.tsx","components/cases/CaseDetailsCaseTabCarDetailsForm.tsx","components/cases/CaseDetailsCaseTabEventDetailsForm.tsx","components/cases/CaseDetailsCaseTabBackToServiceForm.tsx","enums/OfferType.ts","enums/PersonType.ts","components/cases/CaseDetailsCaseTabOtherServiceForm.tsx","enums/CurrencyEnum.ts","components/cases/CaseDetailsCaseTabPaymentDetailsForm.tsx","components/orders/UpdateOrderPart.tsx","components/cases/CaseDetailsCaseTabOrderForm.tsx","components/cases/CaseDetailsCaseServiceAppointmentsForm.tsx","components/cases/CaseDetailsCaseTabClientDataForm.tsx","components/_shared/TableSettings.tsx","components/cases/vehicleDetails/CaseDetailsCostDetailsForm.tsx","assets/images/vin/hand-pen-01.svg","components/cases/vehicleDetails/CaseDetailsCaseTabCarDetailsExtendedContainer.tsx","components/cases/CaseDetailsCaseTabCarRepairCostForm.tsx","components/cases/ContractModal/initialStateValue.ts","enums/AttachmentTypeIdEnum.ts","components/cases/ContractModal/ContractModal.tsx","components/cases/CaseDetailsCaseTabSaleOfferForm.tsx","components/cases/advert/CaseDetailsCaseTabVehicleAdvertComponent.tsx","components/cases/CaseDetailsCaseTabEventBillingDetailsForm.tsx","components/cases/CaseDetailsCaseTabSoldCarForm.tsx","components/agenda/agenda.requests.tsx","utils/appointments.ts","components/appointment/ClientAutocomplete.tsx","components/appointment/CarDetails.tsx","components/appointment/JobsMultipleSelection.tsx","components/appointment/JobDetails.tsx","components/agenda/BigCalendar.tsx","components/appointment/AppointmentCalendar.tsx","components/cases/CaseDetailsCaseServiceAddAppointmentForm.tsx","components/cases/CaseDetailsCaseTabInOutDataForm.tsx","components/cases/CaseDetailsCaseTabIntegrationClientDataForm.tsx","components/cases/CaseDetailsCaseCarfixAnalysisForm.tsx","components/cases/CaseDetailsCaseCarfixBackToServiceForm.tsx","components/cases/CaseDetailsCaseCarfixValidateAppointmentForm.tsx","components/cases/CaseDetailsCaseRepairInProgressForm.tsx","components/cases/CaseDetailsCarInServiceForm.tsx","components/cases/CaseDetailsCaseTab.tsx","components/cases/CaseDetailsCommentsTab.tsx","components/cases/CaseDetailsHistoryTab.tsx","components/cases/CaseDetailsSupportCommentsTab.tsx","components/cases/CaseDetails.tsx","interfaces/Dashboard/VehicleFiltersState.ts","components/dashboards/vehicles/VehicleDashboardAppliedFilters.tsx","components/dashboards/vehicles/VehicleBarChart.tsx","components/dashboards/vehicles/VehicleAverages.tsx","components/dashboards/vehicles/VehicleAverageAgeBarChart.tsx","components/dashboards/vehicles/VehicleMap.tsx","components/dashboards/vehicles/VehicleDonutChart.tsx","components/dashboards/vehicles/VehicleConditionTable.tsx","components/dashboards/vehicles/VehicleStockTable.tsx","interfaces/Dashboard/DashboardFiltersState.ts","components/dashboards/DashboardFilters.tsx","components/dashboards/vehicles/vehicleDashboardReducer.ts","components/dashboards/vehicles/VehicleDashboard.tsx","components/dashboards/acquisitions/AcquisitionDonutChart.tsx","components/dashboards/acquisitions/AcquisitionMainCards.tsx","interfaces/Dashboard/AcquisitionFiltersState.ts","components/dashboards/acquisitions/AcquisitionDashboardAppliedFilters.tsx","components/dashboards/acquisitions/RecentAcquisitions.tsx","components/dashboards/acquisitions/TopBuyers.tsx","components/dashboards/acquisitions/acquisitionDashboardReducer.tsx","components/dashboards/acquisitions/AcquisitionDashboard.tsx","components/dashboards/sales/SalesOfferEmailBarChart.tsx","components/dashboards/sales/SalesHeader.tsx","components/dashboards/sales/SalesDonutChart.tsx","components/dashboards/sales/VehicleAddSalesChart.tsx","components/dashboards/sales/SalesSummaryCard.tsx","components/dashboards/sales/SalesAggregateTable.tsx","components/dashboards/sales/salesDashboardReducer.tsx","interfaces/Dashboard/SalesFiltersState.ts","components/dashboards/sales/SalesDashboardAppliedFilters.tsx","components/dashboards/sales/SalesDashboard.tsx","components/dashboards/Dashboards.tsx","components/orders/Orders.tsx","components/vehicles/VehicleImportModal.tsx","components/vehicles/ImportVehiclesRenaultButton.tsx","components/cases/CaseDetailsCaseTabSaleOfferFormDialog.tsx","components/vehicles/VehicleImportOneCarModal.tsx","components/vehicles/Vehicles.tsx","components/vehicles/VehicleCase.tsx","components/vehicles/VehicleHistoryTimeline.tsx","components/vehicles/VehicleAttachments.tsx","components/vehicles/DetailsOfCarForm.tsx","components/settings/UserOrganizationInterfaces.tsx","components/vehicles/VehiclesHistory.tsx","components/admin/car-class-rent-price/CarClassRentalPrice.tsx","components/billing/Billing.tsx","components/billing/DgpciBilling.tsx","components/order-parts-history/OrderPartsHistory.tsx","components/nomenclature/version/VersionList.tsx","components/nomenclature/bodyType/BodyTypeList.tsx","components/nomenclature/bodyConditionType/BodyConditionTypeList.tsx","components/nomenclature/wheelConditionType/WheelConditionTypeList.tsx","components/nomenclature/invoiceRange/InvoiceRangeList.tsx","components/nomenclature/provenance/ProvenanceList.tsx","components/nomenclature/exchangeRateList/ExchangeRateList.tsx","components/nomenclature/alcorErrorLog/AlcorErrorLogList.tsx","components/nomenclature/financialParameterInfo/FinancialParameterInfoList.tsx","components/nomenclature/sellerData/SellerDataList.tsx","store/actions/MavoVehicle.ts","components/mavo-vehicles/MavoVehicleOrderDialog.tsx","components/mavo-vehicles/MavoVehicleAuctionDialog.tsx","components/mavo-vehicles/MavoVehicles.tsx","components/mavo-vehicles/MavoGeneralInformationContainer.tsx","components/mavo-vehicles/MavoVehicleOptionsContainer.tsx","components/mavo-vehicles/PreviewAttachment.tsx","components/mavo-vehicles/MavoAttachmentDataContainer.tsx","components/mavo-vehicles/MavoStatusDataContainer.tsx","components/mavo-vehicles/MavoVehicleDetailsForm.tsx","components/mavo-vehicles/MavoStockDataEditContainer.tsx","components/mavo-vehicles/MavoVehicleStockDetailsForm.tsx","store/actions/VehicleAuction.ts","components/mavo-vehicles/RealTimeDate.tsx","components/mavo-vehicles/AddAuctionOfferDialog.tsx","components/mavo-vehicles/MavoVehicleDetailsViewForm.tsx","components/mavo-vehicles/MavoVehiclesAuctions.tsx","components/mavo-vehicles/MavoVehiclesUserAuctions.tsx","components/mavo-vehicles/MavoAuctionDetailsForm.tsx","components/mavo-vehicles/MavoVehiclesAdminAuctions.tsx","components/mavo-vehicles/OrdersButtons.tsx","components/mavo-vehicles/MavoVehiclesOrders.tsx","components/admin/poeditor/LanguageApiCard.tsx","components/admin/poeditor/LanguageLocalCard.tsx","components/admin/poeditor/PoEditor.tsx","components/admin/maintenance-cupi-optional-part/MaintenanceCupiOptionalPartComponent.tsx","components/mavo-vehicles/VoInvoiceHistory.tsx","components/admin/users/MavoUsersTab.tsx","components/admin/users/MavoAppUsers.tsx","components/admin/users/MavoEditUser.tsx","components/admin/users/MavoUserDetails.tsx","components/nomenclature/alcorParameterInfo/AlcorParameterInfoList.tsx","components/user-manual/UserManual.tsx","components/admin/organizations/MavoHOOrganizations.tsx","components/admin/organizations/MavoEditOrganization.tsx","components/admin/organizations/MavoOrganizationEntities.tsx","components/admin/organizations/MavoOrganizationDetailsTab.tsx","components/admin/organizations/MavoOrganizationAdmin.tsx","components/admin/model-car-class/ModelCarClass.tsx","components/agenda/SmallCalendar.tsx","components/agenda/NewCaseAppointment.tsx","types/Agenda.ts","components/agenda/DropDownSelect.tsx","components/agenda/AppointmentsTable.tsx","components/appointment/AppointmentBigCalendar.tsx","components/agenda/AgendaPage.tsx","components/appointment/ContactForm.tsx","enums/Status.ts","components/appointment/ConfirmAppointment.tsx","components/appointment/AppointmentClientSelectionDetails.tsx","components/appointment/AppointmentDetails.tsx","components/appointment/AppointmentHistory.tsx","components/appointment/AppointmentTabDocumentsForm.tsx","components/appointment/AppointmentPage.tsx","components/appointment/CarAutocomplete.tsx","components/appointment/MileageInput.tsx","components/appointment/AddNewClientModal.tsx","components/appointment/LinkButton.tsx","components/appointment/AddNewCarModal.tsx","components/appointment/AddNewAppointmentPage.tsx","components/admin/maintenance-producer/MaintenanceProducerComponent.tsx","components/evaluation/DetailsValuation.tsx","components/evaluation/DetailsValuationContainer.tsx","components/evaluation/EvaluationPage.tsx","assets/images/logo_carfix_partner.png","components/evaluation/EvaluationReportFile.tsx","components/evaluation/EvaluationCarFile.tsx","components/evaluation/evaluation.requests.tsx","components/evaluation/EvaluationHistory.tsx","components/billing/GTWSBilling.tsx","components/admin/country-buffer/CountryBufferComponent.tsx","components/billing/NonStockPartBilling.tsx","components/orders/OrderDetailsPage.tsx","components/nomenclature/color/ColorList.tsx","components/mavo-vehicles/MavoVehiclesUserOrders.tsx","components/admin/country-support/CountrySupportComponent.tsx","components/general-notification/GeneralNotification.tsx","components/billing/NewBillingReport.tsx","components/admin/power-bi-report/PowerBiReportComponent.tsx","components/powerBi/PowerBiReport.tsx","App.tsx","utils/ScrollToTop.js","index.tsx","store/actions/ActionTypes.ts","helpers/PptConstants.ts","services/PptService.ts","services/OrganizationService.ts","assets/images/carfix_newlogo.svg","layout-components/SidebarHeader/index.js","utils/numberFormat.ts","layout-components/SidebarMenu/SidebarMenuListItem.js","layout-components/SidebarMenu/index.js","utils/useRouter.js","services/AuthService.ts","services/CRUDService.ts","services/AppUserService.ts","services/ReferentialService.ts","services/WorkflowService.ts","assets/images/OLX.png","assets/images/Autovit.jpg","assets/images/Renault.png","helpers/AxiosInstance.ts","helpers/API.ts","layout-components/SidebarUserbox/index.js","context/Contexts.ts","services/WeatherForecastsService.ts","services/TariffService.ts","services/VehicleService.ts","services/PowerBiService.ts","services/CaseService.ts","services/GtService.ts","services/CaseSettingsService.ts","services/DashboardService.ts","services/OrderService.ts","services/ReportsService.ts","services/TranslatorService.ts","layout-components/Sidebar/index.js"],"names":["RoleClaimsEnum","Administrator","Admin","AdminUsers","AdminValueList","AdminOrganization","SAMPLEPAGEV3","Agenda","Dashboard","Evaluation","NewCase","Home","Case","Order","Vehicle","Settings","ManagerExport","MavoVehicle","MavoAgent","MavoAdministrator","MavoContab","AdminCountryOrganization","AdminService","VehicleSearch","Supplier","AdminSupport","PowerBi","OwnerAdmin","OrganizationTypeCode","GT","SUPPLIER","LEASING","REP","OrganizationLevelTypeCode","HO","COST","TariffCategoryCode","WorkflowFormActionTypeCode","STATUS_TRANSITION","CASE_ALLOCATION","SEND_MAIL","CommentTypeCode","PUBLIC","PRIVATE","INTERNAL","SUPPORT_REQUEST","SUPPORT_RESPONSE","AttachmentTypeCode","RCA","VIC","ID","DL","IMG","OTHER","CONTRACT","MAIN_VEHICLE_PHOTO","MANUAL_UTILIZARE","WORK_ORDER","HAND_OVER","INVOICE_REPAIR","LEFT_SIDE_FRONT","VehicleAttachmentTypeCodeOrder","PurchaseOriginCode","NC","ParametreCode","TVA","CURRENCY","CalculationTypeCode","ORG","ALT","CaseStatusTypeCode","DRAFT","CarPartQualityTypeCode","OE","OEM","AM","CarPartQualityRatings","Rating","ReportTypeCode","ESTIMATE_OE","RENAULT_OFFER","RENAULT_INVOICE","RENAULT_CONTRACT","ADVERT_REPORT","DEVIZ_AUTOWORLD","DEVIZ_CLIENT","RENAULT_AVIZ_PLATA","RENAULT_FACTURA_LIVRARE","DEVIZ_ALT","FISA_EVALUARE_MASINA","DEVIZ_REPARATIE","DEVIZ_ALT_PRC","DEVIZ_REP_AP","DEVIZ_REP_OFERTA","InsuredTypeCode","PF","PJ","OrderStatusCode","REP_DRAFT","REP_LIVRATA","REP_PLASATA","REP_ANULATA","FZR_IN_LIVRARE","FZR_ACCEPTATA","FZR_REFUZATA","FZR_LIVRATA","FZR_COMANDA_CONFIRMATA","FZR_VERIFICARE_LA_FURNIZOR","REP_VERIFICATA_DE_FURNIZOR","REP_REINTEROGATED_PARTS","WorflowEditableReport","PROCES_VERBAL_PREDARE_PRIMIRE","OrderPartStatus","UNAVAILABLE","PROCESSED","PROCESSING","UNORDERED","ORDERED","RETURNED","OUT_OF_STOCK","MODIFICATA_DE_FURNIZOR","PIESA_SELECTATA","CalculationSectionCodeEnum","PART","LABOR","PAINT","PAINT_LABOR","OrderStatusTypesCode","FZR","OfferTypeCode","SELL","BUY","CurrencyCode","EUR","RON","USD","CHF","ReferentialCode","OrganizationType","OrganizationLevel","CompanyParameter","Currency","Country","Region","City","TariffCategory","TariffTypeGroup","Insurer","CarBrands","CaseType","NewCaseSteps","OptimizationType","Section","AttachmentType","CaseStatus","WorkflowSteps","EmailRecipientType","CarPartCategory","Report","ActionType","UserRole","CalculationType","CarCategory","CarClass","PolicyType","PersonType","SolutionValue","OrderStatus","FilterType","PaymentType","PaymentRequestNo","VehicleMake","BodyType","WheelsType","TractionType","TransmissionType","FuelType","TiresType","PaintType","VehicleCondition","PollutionNorm","GuaranteeType","OfferTye","AdvertRegion","AdvertCity","QCItemCategory","QCItem","VehicleStatus","Advertiser","Model","Color","AdvertDistrict","Bank","CountryOrigin","Version","BodyConditionType","WheelConditionType","InvoiceRangeType","InvoiceRangeStatus","FinancialParameter","VehicleType","MvoDvBattyp","PurchaseOrigin","SaleChannel","MaintenanceOptionalPartName","Refurbished","VehicleAttachmentType","AlcorParameter","JobType","MaintenanceOption","MaintenancePackage","OilViscosity","CostCenter","AppointmentCategoryType","ColorRCR","BodyTypeRCR","EInvoiceStatus","BodyCondition","InterventionType","LeaseProvider","LeaseProviderCategory","ImportAlternativePartsFileHeader","H1","H2","H3","H4","H5","H6","H7","H8","H9","H10","H11","ImportOriginalPartsFileHeader","ImportCalculationOriginalPartsFileHeader","ValuationLaguageId","en","ro","Constants","stsAuthority","process","clientId","clientRoot","clientScope","apiRoot","ClientSettings","authority","client_id","redirect_uri","concat","silent_redirect_uri","post_logout_redirect_uri","response_type","scope","automaticSilentRenew","CarDetailsSettings","numberOfKm","VehicleAdvertOperationTypes","publish","delete","RefConstants","vehicleMakeRef","Referentials","referential","find","item","code","bodyTypeRef","wheelsTypeRef","tractionTypeRef","transmissionTypeRef","fuelTypeRef","tiresTypeRef","paintTypeRef","vehicleConditionRef","pollutionNormRef","modelRef","colorRef","personTypeRef","attachementTypeRef","regionRef","cityRef","advertiserRef","districtRef","bankRef","countryOriginRef","invoiceRangeTypeRef","invoiceRangeStatusRef","currencyRef","financialParameterRef","vehicleTypeRef","mvoDvBattypRef","refurbishedRef","versionRef","vehicleAttachmentTypeRef","alcorParameterRef","guaranteeTypeRef","colorRCRRef","bodyTypeRCRRef","bodyConditionRef","eInvoiceRef","VehicleStatusCodeEnum","CaseStatusCodeEnum","CaseTypeCode","CaseStatusCode","allowedVehicleStatuses","Map","Aquisition","Available","Repair","Reserved","ForSale","Sold","AcquisitionRefused","SupplierApiType","enumToDescriptedArray","enumeration","Object","keys","filter","key","isNaN","Number","map","id","description","String","AlternativeCode","TAXAMEDIU","SupplierCode","AUGSBURG","AUTONET","ADTOTAL","MATEROM","CONEX","EUROEST","LKQ","NESTE","AdditionalInfoCode","PRODUS_NU_POATE_FI_RETURNAT","EventDetailsFieldsCode","CASENUMBER","UploadSizeLimit","GTErrorCode","LanguageCode","FuelTypeEnum","INDISPONIBIL","LICITATIE","COMANDA","AVIZ","FACTURAT","MavoVehicleStatusCodeEnum","MavoVehicleProvenanceType","mavoVehicleStatuses","MavoVehicelAttachementTypeCodeEnum","MavoImageUploadSizeLimit","disabledNewMavoVehicleStatuses","disabledMavoVehicleStatuses","MakeExceptionEnum","MakeException","FIAT","toString","ALFA","LANCIA","RenaultGoldList","MavoPersonTypeEnum","MavoOrderStatusCodeEnum","MavoVehicleInvoiceStatusEnum","OriginalPartShortNumberException","AppointmentStatusCodeEnum","InvoiceRangeCodeEnum","renaultMakeCodes","TariffCategoryCodeEnum","AdvertOptionCodeEnum","TariffTypeGroupCodeEnum","OwnStockCodeEnum","includedTariffTypeGroupCodes","CaseTypeCodeEnum","CountryCodeEnum","FilterTypeCodeEnum","AppointmentCategoryTypeCodeEnum","excludedCodes","SOLICITA_MODIFICARE_DEVIZ","IN_ANALIZA","COM_PI","ACTUALIZEAZA_CALCULATIE","OrganizationCaseTypeStepCode","aquisitionWorkflowSectionSteps","aquisitionSteps","excludedAdvertisers","AppointmentPaymentStatus","OrderNotificationTemplateEnum","hideButtonsSectionSteps","nontStockRoles","nonStockCheckedOERoles","MavoAuctionStatusEnum","MavoLanguageTranslationEnum","EInvoiceStatusEnum","InvoiceTypeCodeEnum","AuctionOfferStatusEnum","NotifySupportTemplateEnum","iconsMap","BarChartIcon","CalendarTodayIcon","ChatIcon","CodeIcon","DashboardIcon","ErrorIcon","FolderIcon","DashboardTwoToneIcon","GradeTwoTone","ListAltIcon","LockOpenIcon","MailIcon","PresentToAllIcon","PeopleIcon","PersonIcon","ReceiptIcon","SettingsIcon","ViewModuleIcon","HomeIcon","LocalShippingIcon","DescriptionIcon","DirectionsCarIcon","AirportShuttleIcon","BuildIcon","CommuteOutlinedIcon","PowerBIIcon","_ref","width","height","React","createElement","src","PowerBiLogo","alt","style","objectFit","className","label","content","JSON","parse","window","location","origin","value","initialState","forecasts","isLoading","user","appUser","showMessage","language","dateFormat","longDateFormat","tasks","comments","newInCases","isCommentsLoading","isTasksLoading","isNewInCasesLoading","currencyRates","newInAppointments","isNewInAppointmentsLoading","sidebarShadow","sidebarFixed","sidebarToggleMobile","sidebarToggle","sidebarHover","headerFixed","headerShadow","headerSearchHover","contentBackground","themeConfiguratorToggle","pageTitleStyle","pageTitleBackground","pageTitleShadow","pageTitleBreadcrumb","pageTitleIconBox","pageTitleDescription","pageTitleBackButton","userList","caseSettings","case","vehicle","mavoVehicle","vin","make","makeId","model","modelId","versionItem","versionId","color","colorId","fuelType","fuelTypeId","bodyTypeId","bodyType","transmissionTypeId","transmissionType","provenance","provenanceId","firstRegistrationDate","fabricationYear","kilometersNr","power","horsePower","engineManufactureCode","accessories","isReserved","reservations","cylinderCapacity","supplier","htPurchaseRonPrice","ttcEvaluationEurPrice","nirNumber","nirDate","currentStatus","vehicleOptions","mavoVehicleAttachments","isMavoVehicle","vehicleType","vehicleTypeId","vehicleOptionInfo","vehicleId","engineCapacity","emissionsClass","doorCount","seatCount","driveType","registration","vehicleCondition","metallicColor","upholstery","upholsteryColor","previousOwnersCount","countryOfOrigin","alarm","antiTheft","abs","esp","driverFrontAirbag","passengerFrontAirbag","frontSideAirbags","frontCurtainAirbag","xenonHeadlights","alloyWheels","glassRoof","towHook","protectionFrame","steeringWheelControls","onBoardComputer","cruiseControl","lockableDifferential","particleFilter","electricMirrors","frontElectricWindows","rearElectricWindows","tintedWindows","heatedSeats","rainSensors","parkingSensors","powerSteering","sunroof","rightHandDrive","fogLights","airConditioning","radio","cdPlayer","videoScreen","gps","vehicleConditionInfo","frontWingLeftPaintId","frontWingLeftPaint","frontWingRightPaintId","frontWingRightPaint","rearWingLeftPaintId","rearWingLeftPaint","rearWingRightPaintId","rearWingRightPaint","frontDoorLeftPaintId","frontDoorLeftPaint","frontDoorRightPaintId","frontDoorRightPaint","rearDoorLeftPaintId","rearDoorLeftPaint","rearDoorRightPaintId","rearDoorRightPaint","hoodPaintId","hoodPaint","faceMaskPaintId","faceMaskPaint","frontBumperPaintId","frontBumperPaint","rearBumperPaintId","rearBumperPaint","trunkPaintId","trunkPaint","spoilerPaintId","spoilerPaint","roofPaintId","roofPaint","superstructurePaintId","superstructurePaint","frontWingLeftBodyPaintId","frontWingLeftBodyPaint","frontWingRightBodyPaintId","frontWingRightBodyPaint","rearWingLeftBodyPaintId","rearWingLeftBodyPaint","rearWingRightBodyPaintId","rearWingRightBodyPaint","frontDoorLeftBodyPaintId","frontDoorLeftBodyPaint","frontDoorRightBodyPaintId","frontDoorRightBodyPaint","rearDoorLeftBodyPaintId","rearDoorLeftBodyPaint","rearDoorRightBodyPaintId","rearDoorRightBodyPaint","hoodBodyPaintId","hoodBodyPaint","faceMaskBodyPaintId","faceMaskBodyPaint","frontBumperBodyPaintId","frontBumperBodyPaint","rearBumperBodyPaintId","rearBumperBodyPaint","trunkBodyPaintId","trunkBodyPaint","spoilerBodyPaintId","spoilerBodyPaint","roofBodyPaintId","roofBodyPaint","superstructureBodyPaintId","superstructureBodyPaint","frontWingLeftReplacePaintId","frontWingLeftReplacePaint","frontWingRightReplacePaintId","frontWingRightReplacePaint","rearWingLeftReplacePaintId","rearWingLeftReplacePaint","rearWingRightReplacePaintId","rearWingRightReplacePaint","frontDoorLeftReplacePaintId","frontDoorLeftReplacePaint","frontDoorRightReplacePaintId","frontDoorRightReplacePaint","rearDoorLeftReplacePaintId","rearDoorLeftReplacePaint","rearDoorRightReplacePaintId","rearDoorRightReplacePaint","hoodReplacePaintId","hoodReplacePaint","faceMaskReplacePaintId","faceMaskReplacePaint","frontBumperReplacePaintId","frontBumperReplacePaint","rearBumperReplacePaintId","rearBumperReplacePaint","trunkReplacePaintId","trunkReplacePaint","spoilerReplacePaintId","spoilerReplacePaint","roofReplacePaintId","roofReplacePaint","superstructureReplacePaintId","superstructureReplacePaint","frontLeftSideWindowToReplace","frontLeftSideWindowToRepair","frontRightSideWindowToReplace","frontRightSideWindowToRepair","rearLeftSideWindowToReplace","rearLeftSideWindowToRepair","rearRightSideWindowToReplace","rearRightSideWindowToRepair","leftSideMirrorToReplace","leftSideMirrorToRepair","rightSideMirrorToReplace","rightSideMirrorToRepair","leftWiperToReplace","leftWiperToRepair","rightWiperToReplace","rightWiperToRepair","leftProjectorToReplace","leftProjectorToRepair","rightProjectorToReplace","rightProjectorToRepair","leftTurnSignalToReplace","leftTurnSignalToRepair","rightTurnSignalToReplace","rightTurnSignalToRepair","leftHeadlightToReplace","leftHeadlightToRepair","rightHeadlightToReplace","rightHeadlightToRepair","leftBrakeLightsToReplace","leftBrakeLightsToRepair","rightBrakeLightsToReplace","rightBrakeLightsToRepair","rearWindshieldToReplace","rearWindshieldToRepair","windshieldToReplace","windshieldToRepair","hoodGrilleToReplace","hoodGrilleToRepair","motor","clutch","gearbox","steering","battery","exhaust","tires","driveShaft","leftCvJoints","rightCvJoints","leftShockAbsorbers","rightShockAbsorbers","frontBrakes","backBrakes","itpValidateDate","leftSeatUpholstery","rightSeatUpholstery","rearSeatUpholstery","interiorMirror","firstAidKit","bulbKit","leftFrontHeadrest","rightFrontHeadrest","rearHeadrest","spareTireGood","spareTireReplace","frontFloorMats","fireExtinguisher","wheelWrench","rearFloorMats","reflectiveTriangle","carJack","mavoVehicleAuction","selectedRange","appointments","selectedAppointment","statusList","categoryType","LoadUserNotifications","async","dispatch","getState","context","_appState$appUser","_appState$appUser$org","_appState$appUser$org2","_appState$appUser$org3","caseService","organizationService","appUserService","appState","app","dateFrom","Date","setMonth","getMonth","dateTo","cases","caseNewComments","Promise","all","GetCases","isNew","isAssignedToId","organization","country","toUpperCase","CZ","dateFilterStartDate","setHours","toISOString","dateFilterEndDate","dateFilterCode","DS","GetUserComments","GetTaskList","GetAppointments","org","organizationOwnerId","taskOrg","appointmentOrg","serviceId","push","orgOwners","users","GetUserOrganizationsByIds","Array","from","Set","GetUsersInfo","isNullOrUndefined","userId","forEach","cd","organizationOwner","ap","service","cc","usr","stateTasks","isEqual","type","ActionTypes","setTimeout","AppActionCreators","SetUser","enqueueSnackbar","authService","authenticationService","translatorService","curentUser","getUserAsync","localStorage","startsWith","removeItem","setItem","access_token","GetLanguages","GetProfile","languageCode","GetLanguage","gtOrganization","languages","error","console","log","Tranlate","variant","autoHideDuration","RemoveUser","Message","isDisplayed","display","SetLanguage","LoadTasks","LoadComments","RemoveTask","RemoveComment","RemoveNewInCase","MarkAsViewedNewInCase","LoadCurrencyRates","vehicleService","rates","GetCurrencyRates","RemoveNewInAppointment","MarkAsViewedNewInAppointment","ThemeActionCreators","setSidebarToggle","toggle","setSidebarToggleMobile","setSidebarHover","hover","AppUserAdminActionCreators","LoadUsers","page","rowsPerPage","GetAppUsers","EditUser","CaseSettingsActionCreators","SetCaseSettings","caseId","caseSettingsService","curentCase","GetCaseDetails","currentCaseSettings","GetCaseSettings","caseWorkflow","workflowId","workflow","workflowSections","section","workflowSectionSteps","step","isCurrent","caseStatusId","undefined","this","workflowSectionStepCaseStatuses","cs","SetCaseClientData","clientData","caseClientData","SetCaseVehicleData","UpdateCaseParameters","caseParameterArg","caseParameter","UpdateCaseTariffvalue","tariffValue","SetCaseVehicle","caseVehicle","SetCaseEvent","event","caseEvent","SetCaseValuation","valuation","caseValuation","SetCaseStatus","caseStatus","assignedToId","assignedTo","AddPartner","organizationId","orgService","state","casePartners","GetOrganization","firstPrtner","partner","caseWorkflowHistoryId","date","SetCaseCalculationHistory","caseCalculationHistory","SetCarInService","carInService","carInServiceDate","VehicleActionCreators","setVehicle","loading","GetVehicle","setVehicleObject","changeVehicleStatus","statusHis","status","resetVehicleState","reducers","weatherForecasts","WeatherForecastsReducer","incomingAction","action","startDateIndex","AppReducer","commentList","index","findIndex","splice","indexNewIn","caseIndex","isViewed","indexNewInAppointment","appointmentIndex","appointmentStatusHistory","indexTask","themeOptions","ThemeOptionsReducer","appUserAdmin","AppUserAdminReducer","AppCaseSettingsReducer","caseClient","caseParameters","parameter","newCaseParameters","indexTariffValue","caseTariff","caseTariffValuesHistory","newTariffValues","caseCalculation","VehicleReducer","MavoVehicleReducer","VehicleAuctionReducer","agenda","AgendaReducer","payload","useAppDispatch","useDispatch","useAppSelector","useSelector","CaseNewInNotification","constructor","arguments","onClick","moveToViewed","notNew","SetCaseNotNew","props","currentPath","history","pathname","toLowerCase","indexOf","go","err","handleAddToTaskList","addToTaskList","render","ScaleLoader","length","FontAwesomeIcon","icon","List","_this$props$appState$","_this$props$appState$2","_this$props$appState$3","_this$props$appState$4","_this$props$appState$5","_this$props$appState$6","_this$props$appState$7","_this$props$appState$8","ListItem","divider","backgroundColor","Grid","container","spacing","xs","e","cursor","displayName","caseNumber","caseType","plateNumber","name","moment","utc","local","format","direction","IconButton","size","StarBorderIcon","fontSize","DeleteOutlineTwoToneIcon","contextType","ApplicationContext","connect","caseSettingsState","mergeProps","stateProps","dispatchProps","ownProps","withRouter","CaseMessageNotification","RemoveUserComment","ex","handleCheck","Button","firstName","lastName","hoName","text","CaseTasks","handleDeleteFromTaskList","RemoveUserTask","PerfectScrollbar","dateCreation","StarIcon","AppointmentNewInNotification","appointmentStatusHistoryId","SetAppointmentNotNew","IsAppointmentNotNew","appointmentStatus","appointmentCategoryType","_props$appState$appUs","_props$appState$appUs2","_props$appState$appUs3","_props$appState$appUs4","useContext","TranslatorService","changeUID","setUID","useState","Box","m","p","lg","Card","assign","taskAdded","Guid","create","CaseTask","Login","PureComponent","super","tariffService","login","loginAsync","callApi","GetTariffTypes","addApi","updateApi","orgType","gtId","isActive","translations","UpdateOrganizationType","renewToken","renewTokenAsync","then","catch","logout","logoutAsync","getUser","expires_at","info","componentDidMount","marginTop","profile","margin","withSnackbar","LogInCallBack","result","search","userManager","signinRedirectCallback","setState","_message","message","includes","href","Redirect","to","RenewCallBack","signinSilentCallback","MUITranslations","GetTranslations","body","noMatch","toolTip","columnHeaderTooltip","column","pagination","next","previous","displayRows","toolbar","downloadCsv","print","viewColumns","filterTable","title","reset","titleAria","selectedRows","deleteAria","GetDashboardTranslations","technicalCondition","field","stockTable","topBuyers","topTentaiveBuyers","groupedOfferAndSentEmail","advertListAndSoldVehicleListGrouped","salesTable","stockMap","UsersTab","loadUsers","handleUserActiveChange","tableMeta","rowData","usersClone","updUser","target","checked","UpdateUser","onRowClick","getColumns","options","customBodyRender","sortDirection","filterOptions","names","logic","filterVal","Switch","onChange","inputProps","selectableRows","selectableRowsOnClick","download","textLabels","customToolbar","Tooltip","AddCircleTwoToneIcon","MUIDataTable","data","columns","appUserAdminState","RolesTab","roles","loadRoles","roleList","GetAppUserRoles","handleActiveChange","rolesClone","role","UpdateRole","TabPanel","children","other","Typography","component","hidden","AppUsersAdmin","selectedTab","handleChangeTab","newValue","match","path","Fragment","CardContent","Tabs","indicatorColor","textColor","Tab","appReferentialService","organizations","managers","userRoles","email","phoneNumber","jobFunction","manager","managerId","roleId","isMavo","hideOrderPrices","countryId","costCenterId","costCenter","hasValidityDate","validityDate","countryList","costCenterList","handleTextChange","currentTarget","handleAutocompleteChange","property","propertyId","handleOrganizationChange","hoId","filterMangers","saveUser","totalCount","newUser","AddUser","userChanged","newOrganization","handleValidityDateChange","isValid","refRole","countryRef","costCenterRef","GetOrganizations","Get","baseUrl","params","GetAppUser","o","renderForm","alignContent","alignItems","ValidatorForm","onSubmit","instantValidate","TextValidator","fullWidth","validators","errorMessages","TextField","Autocomplete","getOptionLabel","option","renderInput","userName","MuiPickersUtilsProvider","libInstance","utils","MomentUtils","locale","DatePicker","openTo","views","autoOk","minDate","FormControlLabel","control","referentialService","EditUserRoles","selectedRole","loadUserRoles","userRoleList","GetUserAppUserRoles","newroles","filterRoles","deleteRole","getOptions","addRole","newRole","createdByUserFullName","newUserRoles","newRoles","i","AddAppUserRole","deletedRole","newUserRoleArray","DeleteAppUserRole","appuserRoles","r","renderAddForm","ResetUserPass","resetPass","ResetPassword","renderResetPassForm","disabled","UserDetails","loadUser","NavigationIcon","EditRole","roleClaims","selectedClaim","claims","loadRoleClaims","roleClaimsList","GetAppUserRoleClaims","newClaims","filterClaims","setCellHeaderProps","align","setCellProps","deleteClaim","filterType","addClaim","newClaim","AddRoleClaim","saveRole","AddRole","claimValue","deletedClaim","newRoleClaimsArray","DeleteRoleClaim","values","claimType","rolNameChange","GetAppUserRole","renderEditRoleForm","renderClaims","tableIcons","Add","forwardRef","ref","Check","Clear","Delete","DeleteOutline","DetailPanel","ChevronRight","Edit","Export","SaveAlt","Filter","FilterList","FirstPage","LastPage","NextPage","PreviousPage","ChevronLeft","ResetSearch","Search","SortArrow","ArrowDownward","ThirdStateCheck","Remove","ViewColumn","CityAppReferentials","referentials","selectedReferential","regionList","dependentReferentialConfig","selectedCountry","selectedRegion","filteredReferentials","initialCountryList","initialRegionList","x","activeLanguages","loadReferentialsList","_this$state$selectedC","_this$state$selectedR","referentialList","getUrl","GetFromDB","loadDependentReferentials","dependentReferentialList","refItem","lang","translation","R","referentialTypeId","selectedRegionList","dependencyId","handleCountryChange","handleRegionChange","dependencyConfig","dependency","handleIsActiveChange","newReferentials","updatedReferential","Update","updateUrl","charAt","slice","handleLocListChange","gridProps","newLocList","loc","onRowDataChange","searchable","val","InputProps","readOnly","disableUnderline","customFilterAndSearch","matchFilter","editComponent","locListItem","defaultSort","dateModification","Label","getLocalization","header","actions","searchPlaceholder","searchTooltip","editTooltip","addTooltip","emptyDataSourceMessage","editRow","cancelTooltip","saveTooltip","labelRowsSelect","firstTooltip","previousTooltip","nextTooltip","lastTooltip","labelDisplayedRows","renderTypeList","disableClearable","onRowUpdate","newData","oldData","resolve","reject","validateRef","prevState","resultRef","onRowAdd","addUrl","renderTable","MaterialTable","icons","actionsColumnIndex","addRowPosition","localization","editable","LeaseProviderAppReferentials","leaseCategoryList","selectedLeaseCategory","_this$state$selectedL","_this$state$selectedL2","handleLeaseCategoryChange","_this$state$selectedC2","AppReferentials","dependentReferencials","selectedDependentReferential","organizationTypeReferential","fuelTypeReferential","vehicleStatusReferential","onTagsChange","loadReferentials","handleDependentReferencial","_this$state$selectedD3","_this$state$selectedD5","_this$state$selectedD2","_this$state$selectedD","_ref2","_this$state$selectedD4","_ref3","_this$state$selectedD6","handleIsFleetStatusChange","isFleetStatus","handleIsRCRAvailableChange","isRCRAvailable","takeOrganizationTariff","hideAlternative","hideInsurerCalculation","hideOtherAttachments","ListsOFValueTypes","mailPlaceHolders","toBase64","file","reader","FileReader","readAsDataURL","onload","onerror","OtherListsOfValues","worflowService","otherListsOfValues","isDialogEmailTemplateOpen","emailTemplateId","selectedEmailBodyTemplate","EditorState","createEmpty","selectedEmailSubjectTemplate","GetEmailTemplates","newListsOfValues","UpdateEmailTemplate","onEmailTemplateClick","bodyEmailTemplate","subjectEmailTemplate","blocksFromHTML","htmlToDraft","contentState","ContentState","createFromBlockArray","contentBlocks","entityMap","createWithContent","subject","syncClick","syncUndocumentedModels","newListOfValues","newItem","AddEmailTemplate","closeDialog","onEditorStateChange","editorState","renderEditEmailTemplate","Editor","editorStyle","border","borderRadius","image","popupClassName","urlEnabled","uploadEnabled","alignmentEnabled","uploadCallback","imageBase64String","link","previewImage","inputAccept","present","mandatory","defaultSize","placeHolderClick","newBlockMap","convertFromHTML","getCurrentContent","getSelection","getAnchorKey","blocksAfter","getBlockMap","skipUntil","_","k","skip","toArray","blocksBefore","takeUntil","getBlockForKey","newContentState","newEditorState","addPlaceholderToSubject","renderMailPlaceHolders","subheader","ListSubheader","button","dense","ListItemText","primary","ListItemSecondaryAction","edge","SubjectIco","saveEmailTemplateChanges","emailBody","draftToHtml","convertToRaw","SyncModels","SyncUndocumentedModels","workflowService","Dialog","onClose","open","fullScreen","DialogTitle","CloseIcon","DialogContent","dividers","sm","elevation","DialogActions","MuiTheme","createMuiTheme","palette","main","vars","grey","inheritDefault1","A100","inheritDefault2","secondary","red","success","green","warning","orange","helpers","blue","contrastThreshold","tonalOffset","shape","overrides","MuiButton","paddingLeft","paddingRight","containedSizeSmall","root","textTransform","fontWeight","MuiTooltip","tooltip","second","padding","arrow","typography","h1","lineHeight","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","caption","overline","clsx","Link","projectLogoIcon","boxSizing","projectLogo","loadUserNotifications","_props$appState$appUs5","_props$appState$appUs6","_props$appState$appUs7","_props$appState$appUs8","useHistory","anchorEl1","setAnchorEl1","anchorEl2","setAnchorEl2","anchorEl3","setAnchorEl3","useEffect","unlisten","listen","AGENDA_SET_SELECTED_RANGE","handleClose1","handleClose2","open1","Boolean","open2","open3","setValue","countValue","setNewCasesCount","handleChange","useStyle","makeStyles","indicator","useStyle2","useStyle3","classes","classes2","classes3","Hidden","smDown","pr","NotificationsActiveIcon","Popover","onEntering","checkSelectedTab2","document","getElementById","getElementsByTagName","getAttribute","left","anchorEl","handleClose3","anchorOrigin","vertical","horizontal","transformOrigin","paper","checkSelectedTab","tabContainer","secondTabSelected","thirdTabSelected","PollIcon","MenuBookRoundedIcon","HelpRounded","StyledBadge","withStyles","badge","boxShadow","position","top","animation","transform","opacity","Badge","setLanguage","_currentLanguage","setAnchorEl","handleClose","buttonLanguages","handleCloseMenu","reload","anchorElMenu","setAnchorElMenu","overlap","Avatar","sizes","Menu","keepMounted","getContentAnchorEl","Divider","maxWidth","list","VehicleHelper","GetPlateNumber","casee","GetBrand","caseVehicleBrand","vehicleBrand","identifiedMake","brand","GetModel","caseVehicleModel","vehicleModel","identifiedModel","GetUMC","GetVIN","GetKmNr","numberOfKilometers","GetFirstRegistrationDate","dateObj","GetFirstRegistrationDateObject","toLocaleDateString","GetFirstRegistrationDateFormat","toDate","firstPlateDate","GetMakeDateObject","makeDate","registrationDate","GetMakeDate","GetMakeDateFormat","GetBrandModel","SearchCase","cbContext","vehicleList","loadCases","vehicles","loadData","vehicleExtensionList","searchValue","replace","countryCode","viewOwnerEntries","GetVehicles","total","vehicleIds","_this$props$appState$9","_this$props$appState$10","_this$props$appState$11","_this$props$appState$12","_this$props$appState$13","allCasesFromVehicles","makeSearchText","modelSearchText","unionBy","vehicleIdsFromCases","c","vehicleIdsFromVehicles","orphaneVehiclesIds","vid","orphaneCasesVehIds","orphaneCases","orphaneVehicles","GetVehicleList","usersAssignedLIst","userAssignedTo","vehiclesInStock","_item$make","_item$model","_item$currentStatus","_item$currentStatus$s","_i$vehicle","vehiclesNotInStock","_item$model2","_item$model3","_item$currentStatus2","_item$currentStatus2$","_i$caseVehicle","caseWithNoVehicles","isNil","emptyVehicles","onCaseClick","handleSearchPopverClose","onVehicleClick","renderVehicles","renderCases","componentDidUpdate","prevProps","searchId","maxHeight","overflow","Utils","GetValuationLanguageId","GetCurrencyRate","currencyCode","crrRate","currency","rate","ConvertCurrencyWithRoundedRate","fromCurrencyCode","toCurrencyCode","fromRate","toRate","parseFloat","toFixed","ConvertCurrency","validatePlateNumber","test","countryNumberFormat","numString","_country$code","RO","number","minimumFractionDigits","maximumFractionDigits","toLocaleString","_Utils","GetIdOrNull","GetProvenanceIdOrNull","FormatDateString","dateString","Moment","FormatDate","AddObjectToFormData","formData","parentKey","File","append","getPriceWithoutVat","priceWithVat","vatRate","getPriceWithVat","price","getPriceWithMarginVat","sellingPrice","purchasePrice","getMarginVat","removeVatFromPriceLabel","trim","pretUnitarFormat","part","pretOriginal","alternativePartQualityId","Math","round","alternativePrice","OrderParts","parts","vat","_parts","_vat","isDeleted","getPrice","_part$alternativePric","originalPrice","getDiscount","discount","alternativePartDiscount","getAmountPart","reduce","sum","pieceNr","getAmountPartWithDiscount","totalDiscount","totalWithoutVAT","totalVAT","OrderDetails","orderService","userStartCode","isLoadingOrderDetails","orderpartsList","isChangeOrderStatusDialogOpen","changeOrderStatusComment","statuses","selectedStatus","orderDetails","orderStatus","orderPartStatus","orderStatuses","selectedDisplayedStatus","attachments","orderStatusHistory","attachType","partsLocationOrganization","caseCalculationPartsThatChangedDuringPlacingOrder","showOrderPrice","executing","quality","rowsExpanded","partLoaders","firstCasePartToBeOrdered","hasSupplierRole","interventionType","_this$props$caseSetti","_this$props$caseSetti2","_this$props$caseSetti3","_this$props$caseSetti4","_this$props$orderDeta","_this$props$orderDeta2","_partQualityTypes$fin","_this$props$orderDeta4","_this$props$orderDeta5","refOrderStatus","refOrderPartStatus","refQualityPart","orderParts","statusHist","attachmentTypes","partQualityTypes","casePartToBeOrdered","suppliersInit","GetOrderStatusHistories","GetCurrentEvent","GetPartToBeOrdered","casePartToBeOrderedId","supplierId","GetModelById","createdBy","createdByUser","partsLocationOrganizationId","GetCostCenter","orgList","GetOrganizationsByHO","organizationType","amountWithoutTVA","amountTVA","tvaParam","GetCaseParameterHistory","parameterCode","startCode","orderPartStatusFiltered","hasRight","_this$props$orderDeta3","categoryPartId","row","hasBeenVerifiedBySupplier","right","displayOtherOrderDetails","orderPart","rest","availableStock","availableQuantity","isNull","alternativePartStockLocation","nullValue","displayDeliveryOrderDetails","_prevVal","_prevVal2","deliveryTime","prevVal","handleOECodeChange","updatedOrderPart","toBeUpdated","guideNumber","producer","validityTime","codeType","excludeFromOrder","orderCode","locationId","remarks","alternativeGuideNumber","alternativePartCode","alternativePartStockQuantity","alternativePartRemarks","productId","codEan","bundleItem","bundleNo","bundleQuantity","byOeCode","groupedUniqueId","toBeDeleted","updateAmount","handleAMCodeChange","handlePieceNrChange","alternativePartChecked","alternativeParts","originalPartId","selectedAlternativePart","_alternativePartCheck","_alternativePartCheck2","currentPacking","packing","split","secondItemOfPacking","currentPackingNumber","minQty","validateOrigPartUnitsAdd","validateOrigPartUnitsRemove","originalPartid","labelValidate","getElementsByClassName","firstChild","classList","add","inputValidate","closest","querySelector","remove","viewDeletePart","_this$props$orderDeta6","_this$props$orderDeta7","_this$props$orderDeta8","_this$props$orderDeta9","_this$props$orderDeta10","_this$props$orderDeta11","getPartsByColumns","_this$props$orderDeta12","_this$props$orderDeta13","_excludeFromOrder","minWidth","sort","_this$props$orderDeta14","_this$props$orderDeta15","_excludeFromOrder2","alternativePartDescription","alternativePartName","carPartCategory","alternativePartQuality","_this$props$appState$14","_this$props$appState$15","_this$props$orderDeta16","_this$props$orderDeta17","min","_excludeFromOrder3","_this$props$appState$19","_this$props$appState$20","_this$props$appState$21","_this$props$appState$16","_this$props$appState$17","_this$props$appState$18","_this$props$appState$25","_this$props$appState$26","_this$props$appState$27","_this$props$appState$22","_this$props$appState$23","_this$props$appState$24","partId","deleteOrderPart","hasRights","changeOrderStatusClick","_this$props$orderDeta18","_this$props$orderDeta19","validateOrder","getNextOrderStatus","_this$props$orderDeta20","_this$props$orderDeta21","_this$props$orderDeta22","_this$props$orderDeta23","_this$props$orderDeta24","_this$props$orderDeta25","_this$props$orderDeta26","_this$props$orderDeta27","canChangeNextOrderStatus","_this$props$orderDeta28","_this$props$orderDeta29","_this$props$orderDeta30","getOrderButton","order","_order$orderStatus","_order$orderStatus3","_order$orderStatus2","_order$orderStatus4","_order$orderStatus5","_order$orderStatus6","_order$orderStatus7","automatePlaceOrder","renderOrderDetailsSection","workflowAutomatePlaceOrder","changeOrderStatusSubmit","client","OWN_STOCK","address","interogateAlternativeParts","interogate","itemIndex","_orderPart$alternativ","_this$props$caseSetti5","_this$props$caseSetti6","_this$props$caseSetti7","_this$props$orderDeta31","_this$props$orderDeta32","InterogateCaseCalculationsAlternativePartsBySupplier","additionTariff","discountTariff","uuidToNumber","hexString","uuid","parseInt","handleAlternativePartChecked","selected","partFromGroup","handleAlternativePartSelect","orderPartIndex","alternativePart","_alternativePart$vali","_alternativePart$code","_alternativePart$type","_alternativePart$orde","_alternativePart$codE","_orderParts$orderPart","_orderParts$orderPart2","stockLocation","isChild","alternativePriceWithoutDiscount","specificAlternativeParts","findAlternativePartGroup","object","idList","initialCaseCalculationOriginalParts","package","displayPopup","alternativePartString","_findAlternativePartG","_findAlternativePartG2","_findAlternativePartG3","_findAlternativePartG4","whiteSpace","isInteger","getPackageFromOrderParts","newOrderParts","j","clearSelectedAlternativeParts","orderPartsCopy","alternativePartsCopy","renderExpandedRow","rowMeta","_orderPart$alternativ2","dataIndex","columnsCount","colSpan","transition","fontFamily","letterSpacing","zIndex","tableLayout","some","el","wordBreak","alternativePartindex","_this$props$appState$28","_this$props$appState$29","_this$props$appState$30","_this$props$appState$31","_this$props$appState$32","_this$props$appState$33","_alternativePart$supp","Radio","placement","textOverflow","quantityAdditionalInfo","supplierName","additionalInfo","partList","amount","onOrderChange","getMuiTheme","MuiTableCell","paddingCheckbox","MUIDataTableSelectCell","expandDisabled","visibility","interogateAll","cp","renderInterogateAllSection","renderOrderPartsSection","rowClassName","rowIndex","expandableRowsHeader","expandableRows","isRowExpandable","expandedRow","renderExpandableRow","MuiThemeProvider","theme","checkIfOrderPartsChangedDuringOrderPlacement","orderDatePlacement","validityTimeOkay","product","_this$props$caseSetti8","_this$props$caseSetti9","_this$props$caseSetti10","_this$props$orderDeta33","_this$props$orderDeta34","changedOrderedProducts","changedOrderedProduct","_this$props$orderDeta35","cloneDeep","newVal","orderedPart","UpdateOrderPart","newOrder","UpdateOrderAmounts","orderId","updateSupplierOrder","_this$props$caseSetti11","_this$props$caseSetti12","_this$props$caseSetti13","_this$props$orderDeta36","_this$props$orderDeta37","_statusHistory$create","_statusHistory$create2","orderedPartsChanged","_this$state$firstCase","_this$state$firstCase2","updateOrderInfoRequest","calculationId","caseCalculationHistoryId","UpdateOrderInfo","_orderPart$alternativ3","AddNonStockPart","oeCode","guideNumberBackup","oeSupplierCode","nextOrderStatus","request","statusId","comment","partsOrganizationId","ChangeOrderStatus","statusHistory","_x$orderStatus","notificationRequest","orderComment","template","VERIFIED_BY_SUPPLIER","SendVerifiedBySupplierOrderNotification","orderStatusId","unshift","nonInterogatedParts","join","validateError","errorString","decimalError","_item$packing","_item$packing2","filtercalculationParts","orderPartObject","sumBy","updateOrderAfterInterogation","_this$props$caseSetti14","_this$props$caseSetti15","_this$props$caseSetti16","_this$props$orderDeta38","_this$props$orderDeta39","_this$state$firstCase3","_this$state$firstCase4","GetOrder","_this$props$orderDeta40","_this$props$orderDeta41","_this$props$orderDeta42","_this$props$orderDeta43","interogatePartner","_this$props$caseSetti17","_this$props$caseSetti18","_this$props$caseSetti19","_this$props$orderDeta44","_this$props$orderDeta45","_this$props$appState$34","_this$props$orderDeta46","_this$props$orderDeta47","_this$props$orderDeta48","_this$props$orderDeta49","_this$props$orderDeta50","_this$props$orderDeta51","orderedPartStatus","supplierOrderNumber","_this$props$caseSetti20","_this$props$caseSetti21","_this$props$caseSetti22","_this$props$orderDeta52","_this$props$orderDeta53","_this$props$appState$35","proceedOrderStatus","SendConfirmedOrderNotification","automatePlaceOrderChange","handleAutocompleteOrderStatusChange","handleOrderPartsStatusChange","ChangeOrderPartStatus","newArray","handleUploadAttachment","attachmentTypeId","attachmentType","files","fileName","uploadDate","carPhotos","originalFileName","caseRequestId","paymentId","serviceAppointmentId","caseClientId","isSelection","handleDeleteAttachment","renderAttachmentBox","attach","downloadFile","justify","htmlFor","selectedPartIndex","groupedParts","DeleteOrderPart","renderChangeOrderStatusForm","multiline","rows","origFileName","fileBlob","GetCaseAttachment","FileSaver","saveAs","showOrdeStatusTimelineHistory","_this$props$appState$36","_this$props$appState$37","_this$props$appState$38","_this$props$appState$39","_this$props$appState$40","_this$props$appState$41","_this$props$appState$42","_this$props$appState$43","_this$props$appState$44","disableBackdropClick","textAlign","SearchOrder","orderList","isDialogOpen","selectedOrder","loadOrders","orders","GetOrders","orgIds","uniq","assignedToList","uniqueAssignedToList","a","b","orgEntities","od","onOrderClick","GetOrderParts","renderOrders","HeaderSearch","searchRef","useRef","triggerChange","setSearchId","setOpenSearchPopover","openSearchPopover","setSearchValue","timer","setTimer","SearchIcon","InputBase","placeholder","input","clearTimeout","onKeyDown","inputMode","Popper","current","ClickAwayListener","onClickAway","Paper","enable","AppBar","isCollapsedLayout","HeaderLogo","lgUp","mdDown","toggleSidebar","MenuRoundedIcon","MenuOpenRoundedIcon","HeaderDots","HeaderUserbox","toggleSidebarMobile","square","titleHeading","titleDescription","actionButton","backButtonName","_props$history","backButtonHref","onClickBack","WrapperSimple","Component","sectionHeading","Header","Sidebar","UserProfile","openModal","handleClickOpenModal","handleClickCloseModal","resetPassword","managerFullName","userRole","DialogContentText","autoFocus","OrganizationBankAccounts","bankAccounts","currencyList","GetOrganizationBankAccounts","lookup","acc","cur","cellStyle","initialEditValue","deleteTooltip","deleteText","UpdateOrganizationBankAccount","onRowDelete","RemoveOrganizationBankAccount","AddOrganizationBankAccount","mt","pt","OrganizationLogo","img","Image","URL","createObjectURL","saveImage","AddLogo","GetLogo","renderLogo","DropzoneArea","dropzoneClass","dropzoneText","showPreviews","showPreviewsInDropzone","filesLimit","previewText","showAlerts","acceptedFiles","OrganizationTokens","tokens","supplierList","OrganizationToken","GetHOOrganizationsByTypes","Select","MenuItem","EditOrganization","organizationLevelType","region","parent","newFeature","uploadFeature","mondayToFridayOpen","mondayToFridayClose","mondayToThursdayOpen","mondayToThursdayClose","fridayOpen","fridayClose","saturdayOpen","saturdayClose","cityInfo","bufferValue","categoryPart","organizationLevelTypes","parentOrganizations","organizationTypes","cityList","isMondayToFridayOpenValid","countryBuffers","handleValueChange","handleOrganizationLevelTypeChange","orgs","organizationLevelTypeId","parentId","handleOrganizationTypeChange","organizationTypeId","countryBuffer","regionId","cityId","handleCityInfoChange","handleCategoryPartChange","saveOrganization","AddOrganization","UpdateOrganization","organizationChanged","handleInputChange","fieldName","hourValue","NumberFormatCustom","inputRef","NumberFormat","getInputRef","onValueChange","allowNegative","thousandSeparator","decimalScale","isValidTime","hasRole","roleCode","onTabChange","orgLevelList","orgTypes","GetOrganizationLevels","GetCountryBuffers","addValidationRule","getRegionsOptions","getCitiesOptions","city","labelPlacement","showOrderDetails","changeCaseStatusBasedCalculation","bulkNotification","isMavoPartener","isCarfixPartener","hasAppointmentWorkflow","hasRepairWorkflow","hasMentainanceWorkflow","includeToMvo","showCaseStatus","hideOrganizationOwnerWorkflows","hidePartnerTab","showMakeModelSearch","hideLkqColumns","hideOrderCurrencyColumn","fullName","companyNumber","registryNumber","postalCode","contactPerson","phone","dealerId","latitude","longitude","inputComponent","localeCompare","paddingBottom","paddingTop","helperText","OrganizationEntities","isOpenDialog","selectedOrganizationId","loadOrganizations","editOrganization","newOrganizations","updatedOrgIndex","OrganizationHierarchy","organizationLevels","selectedOrganizationLevelType","loadOrganizationLevels","orgLevelTypes","filterLevels","filterLevelTypes","orglevels","levelTypes","deleteOrgLevel","RemoveOrganizationLevel","moveUp","cloneArray","itemToMoveUpIndex","itemToMoveDownIndex","UpdateOrganizationLevel","moveDown","itemToMoveIndex","itemToMoveToIndex","sortOrder","KeyboardArrowUpIcon","KeyboardArrowDownIcon","addOrgLevel","AddOrganizationLevel","OrganizationDetailsTab","OrganizationUsers","hoOrganization","ids","renderTree","nodes","u","childOrganizations","TreeItem","nodeId","isArray","node","TreeView","defaultCollapseIcon","ExpandMoreIcon","defaultExpanded","defaultExpandIcon","ChevronRightIcon","OrganizationInterfaces","interfaces","GetOrganizationInterfaces","clientAccess","supportsOAuth2","aftSupplier","refreshTokenValidUntil","isAfter","Chip","customerId","secondUser","token","UpdateOrganizationInterface","RemoveOrganizationInterface","AddOrganizationInterface","OrganizationParameters","parameters","parameterTypeList","parameterList","GetOrganizationParameters","isDate","toDateString","UpdateOrganizationParameter","RemoveOrganizationParameter","AddOrganizationParameter","OrganizationCaseTypeTab","organizationCases","organizationCaseTypes","selectedOrganizationCaseType","loadOrganizationCases","orgCaseList","orgCaseTypes","GetOrganizationCaseType","caseTypeId","deleteOrgCase","RemoveOrganizationCaseType","UpdateOrganizationCaseType","addOrgCase","AddOrganizationCaseType","OrganizationCaseTypeStepTab","organizationCaseTypeSteps","organizationCaseStepTypes","selectedOrganizationCaseStepType","loadOrganizationSteps","refCaseType","refSteps","orgStepList","orgStepTypes","GetOrganizationCaseTypeStep","orgCaseList1","reloadOrganizationSteps","RemoveOrganizationCaseTypeStep","UpdateOrganizationCaseTypeStep","addOrgStep","AddOrganizationCaseTypeStep","stepId","organizationCaseTypeId","handleAutocompleteCaseChange","handleAutocompleteStepChange","EditOrganizationFormDesign","organizationForm","loadOrganizationFormDesign","organizationFormId","GetOrganizationCaseTypeStepForm","handleEditorDidMountJsonSchema","ev","orgFormDesign","BAD_WORD","WORNING_MESSAGE","json1","handleEditorDidMountUISchema","json2","getSchema","json","getUISchema","save","UpdateOrganizationCaseTypeStepForm","ControlledEditor","selectOnLineNumber","lineNumbersMinChars","glyphMargin","minimap","enabled","JSONSchemaForm","schema","uiSchema","showErrorList","liveValidate","EditOrganizationForm","handleFormNameChange","newFormTransList","compare","bandA","bandB","comparison","renderNameTextFields","nameTextFieldsList","saveOrganizationForm","organizationFormChanged","formTranslations","trans","OrganizationCaseTypeStepFormTab","organizationCaseTypeStepForms","organizationCaseStepFormTypes","selectedOrganizationCaseTypeStep","selectedOrganizationCaseStepFormType","loadOrganizationForms","filterCaseTypeStepForms","GetOrganizationForms","reloadOrganizationForms","caseTypeStepId","orgCaseTypeStepFormList","GetOrganizationCaseTypeStepForms","RemoveOrganizationCaseTypeStepForm","close","addOrgForm","AddOrganizationCaseTypeStepForm","organizationCaseTypeStepId","formId","handleAutocompleteFormChange","orgCaseTypeStepList","organizationStep","OrganizationNewCaseType","LocalizedUtils","EditTarifLaborTabf","momutil","defaultBrand","defaultInsurer","tariffValues","isVehicleAge","activeAction","selectedTariffTypes","selectedBrands","tariffTypeList","brandList","insurerList","selectedInsurer","selectedSliderValues","selectedValues","selectedOfferValues","selectedValue","selectedOfferValue","selectedMarginValue","selectedMarginValues","compareName","nameA","nameB","brandRef","insurerRef","tariffGroupTypeId","GetTariffValues","tariffId","brandList1","insurerList1","handleTariffTypeChange","saveTariffValues","tariffValuesToSave","selectedDate","tariffType","insurer","brandId","tariffTypeId","offerValue","marginValue","startVehicleYear","endVehicleYear","insurerId","activeButton","dataLaborServices","structureTariffValuesAccordingToDate","itemsToBeUpdated","dataItem","saveItem","isMatchingItem","UpdateTariffValues","item1","item2","handleDateChange","handleBrandChange","allIndex","handleInsurerChange","isNumericString","handleOfferValueChange","handleMarginValueChange","handleValuesChange","newValues","handleOfferValuesChange","handleMarginValuesChange","newvalue","getMarks","removeSliderValue","tValues","tOfferValues","tMarginValues","pop","addSliderValue","renderEditTariffValues","tariffGroupTypeCode","ADAOS","multiple","filterSelectedOptions","tariffGroupTypeName","ADAOS_ASIGURATOR","ADAOS_ALT_PART","DISC","Slider","valueLabelDisplay","max","marks","track","RemoveIcon","getValidators","getErrorMessages","MAN","renderTariffValues","renderVehicleAge","tv","getDistinctTariffTypes","tt","arr","getDistinctInsurer","dateLS","groupBy","items","deleteTariff","dateLocal","DeleteTariffValues","showTimelineTariff","dateTariff","DeleteCircleTwoToneIcon","editInsertTarifLaborButton","_tariff$owner","_tariff$owner$country","_tariff$owner$country2","tariff","isManType","isCzechRepublic","owner","_tariff$owner2","_tariff$owner2$countr","_tariff$owner2$countr2","_tariff$owner3","messages","EditCircleTwoToneIcon","EditTariff","tariffCategoryId","tariffPartners","partnersTariff","tariffTypeGroupList","hoOrganizations","isUsed","handleNameGUIChange","handlePartnerTariffChange","partnerId","handleOtherPartnerTariffChange","saveTariff","AddTariff","UpdateTariff","tariffChanged","tariffList","GetTariffs","ownerId","filterList","createTabTariffGroupType","dataToRender","createTabPanelTariffGroupType","_code","EditTariffLaborTab","tariffCategoryRef","tariffGroupTypeRef","tariffCategoryList","tariffGroupTypeList","workflowsCount","GetOrganizationsForTariffPartners","GetTariffPartners","GetHOOrganizations","GetTariffWorkflowsCount","GetTariff","orgParameters","_item$code","tp","Tariffs","tariffs","selectedTariffId","newTariffs","editTariff","updatedTariffIndex","Workflows","workflows","newWorkflow","workflowParameters","workflowSteps","workflowPartners","workflowTariffs","workflowSuppliers","isPrcIntegration","isMvoIntegration","isCarfixIntegration","isDgpciIntegration","caseTypeList","hoList","GetWorkflows","ho","workflowCaseType","newWorkflows","workflowTranslations","activeLanguage","workflowParametersData","parameterId","updatedWorkflowIndex","UpdateWorkflow","handleIsPrcIntegrationChange","handleIsMvoIntegrationChange","handleIsCarfixIntegrationChange","handleIsDgpciIntegrationChange","handleUseRoundUpChange","useRoundUp","handleAutomatePlaceOrderChange","handleAutomateGenerateOrderChange","automateGenerateOrder","handleB2BIntegrationChange","b2BIntegration","handleOrderConfirmationToServiceChange","orderConfirmationToService","handleChangeCaseStatusBasedCalculationChange","handleChangeSaveDocumentsChange","saveDocuments","handleIsEvaluationWorklfowChange","isEvaluationWorkflow","handleHideRenewAdvertChange","hideRenewAdvert","handleHideCommentsChange","hideComments","handleHasNonStockValidationChange","hasNonStockValidation","handleVQInterogation","vqInterogationValue","saveWorkflow","workflowExist","indexFinded","AddWorkflow","onBlur","handleWorkflowNameChange","newWorkflowTransList","handleWorkflowCaseTypeChange","OrganizationFilters","organizationFilters","organizationFilterTypes","selectedOrganizationFilterType","loadOrganizationFilters","orgFilterList","filterTypes","GetOrganizationFilters","filterTypeId","deleteOrgFilter","RemoveOrganizationFilter","addOrgFilter","AddOrganizationFilter","OrganizationJobTypes","organizationJobTypes","jobTypes","selectedJobType","loadOrganizationJobTypes","organizationJobTypesList","GetOrganizationJobTypes","ojt","jobType","jobTypeId","deleteOrgJobType","RemoveOrganizationJobType","addOrganizationJobType","itemm","AddOrganizationJobType","handleOrganizationJobTypeChange","OrganizationMaintenancePackages","organizationMaintenancePackages","maintenancePackages","selectedMaintenancePackage","loadOrganizationMaintenancePackages","organizationMaintenancePackagesList","GetOrganizationMaintenancePackages","maintenancePackage","maintenancePackageId","deleteOrgMaintenancePackage","RemoveOrganizationMaintenancePackage","addOrganizationMaintenancePackage","AddOrganizationMaintenancePackage","handleOrganizationMaintenancePackageChange","OrganizationOilViscosities","newOrganizationOilViscosity","oilViscosityId","organizationOilViscosityList","selectedFilter","oilViscosityList","newOrganizationOilViscosityId","loadOrganizationOilViscosityList","organizationOilViscositiesList","oilViscosities","GetOrganizationOilViscosities","handleOilViscosityChange","oilViscosity","handlePriceChange","saveOrganizationOilViscosity","AddOrganizationOilViscosity","UpdateOrganizationOilViscosity","customSort","newOrganizationOilViscosityPopup","EditOutlinedIcon","deleteOrganizationOilViscosity","RemoveOrganizationOilViscosity","organizationOilViscosityId","OrganizationInvoiceRanges","newOrganizationInvoiceRange","invoiceRangeTypeId","invoiceRangeType","firstSeries","startingNumber","currentNumber","endingNumber","lastSeries","invoiceRangeStatusId","invoiceRangeStatus","organizationInvoiceRanges","invoiceRangeTypes","invoiceRangeStatuses","newOrganizationInvoiceRangeId","loadOrganizationInvoiceRanges","organizationInvoiceRangesList","GetOrganizationInvoiceRanges","FACTURA_SERVICE","handleOrganizationInvoiceRangeTypeChange","handleOrganizationInvoiceRangeStatusChange","saveOrganizationInvoiceRange","AddOrganizationInvoiceRange","UpdateOrganizationInvoiceRange","isNumber","newOrganizationInvoiceRatePopup","deleteOrganizationInvoiceRate","RemoveOrganizationInvoiceRange","organizationInvoiceRangeId","OrganizationAdmin","orgId","onButtonClick","PageTitle","borderColor","borderBottom","bgcolor","OrganizationTariffs","HOOrganizations","neworg","newHOOrg","filterOrganizations","filterChange","hoType","newOrg","renderFilters","GtXML","calculations","renderCalculations","calc","downloadXml","GetCaseCalculationXML","renderForms","loadCalculations","GetAdminCaseCalculationHistories","calculationType","FormCode","SectionCode","FormButton","GetButtons","scopeWorkflows","selectedWorkflow","createCase","newCase","selectedCase","ChangeCaseWorkflow","selectedVehicle","CreateCase","selectedNotice","selectedClient","response","renderWorkflowList","selectedItem","w","xl","renderWorkflows","hideWorkflow","GetByCompanyNumber","SearchVehicleForm","_this","isLoadingData","vehicleDtoList","modalOpen","modalMessage","modalYesNoButtons","modalData","_this$state$formData$","_this$state$formData$2","_this$state$formData$3","_this$state$formData$4","SearchVehicle","searchInVehicleStock","onRowlick","_currentVehicle$lastC","_currentVehicle$lastC2","_currentVehicle$lastC3","currentVehicle","v","handleModalConfirmation","handleOpenModal","lastCase","caseTypeCode","CLAIM","createdByUserName","message1","AQUISITION","DoubleArrowTwoTone","handleCloseModal","onVehicleSelected","class","renderModal","Modal","MUIDataTableBodyCell","stackedCommon","cellHide","MuiTableRow","handleRowClick","renderResults","renderSelectedForm","jsonSchema","jsonGUI","organizationCaseTypeStepForm","TranslateSchema","Form","transformErrors","TranslateErrors","form","SearchClientForm","clientDtoList","personTypes","displayNextActionBtn","refpersonType","personTypeList","cnpCui","personTypeId","CNP","clients","SearchClient","clientName","onClientSelected","updateValue","companyName","handleArraySchema","properties","anyOf","enum","organizationSteps","activeStep","organizationForms","selectedTabForm","selectedOrganizationForm","noticeList","claimReviewList","modelData","selectedModelData","caseStatuses","hideSaleNewWorkflow","loadCaseTypesStepsForms","refCaseStatus","GetUserOrganizationCaseType","GetUserWorkflows","GetOrganizationInfo","owners","GetUserOrganizationCaseTypeStep","GetUserOrganizationCaseTypeStepForms","loadOrganizationcaseTypeStepForms","renderCaseTypes","tabs","forms","noticeNumber","SearchNotice","cbCaseNumber","caseList","SearchByCaseNumber","tabPanels","renderStaticForm","renderJsonForm","_this$state$organizat","_this$state$organizat2","renderFormResults","submitSelectedModelData","_this$state$organizat3","_this$state$organizat4","SALE","makeDescription","modelDescription","handleAutocompleteModelDataChange","renderAddModelForm","vinDecoder","_this$state$organizat5","_this$state$organizat6","isSaleCase","latestCaseVehicleHistory","DecodeVin","GetLatestCaseVehicleHistory","GetVehicleFromVQRepo","errorInfo","THE_VIN_NUMBER_SENT_DOES_NOT_DECODE_ANY_MODEL","responseInfo","vehicleInfoDec","modelList","_this$state$organizat7","_this$state$organizat8","omit","loadOrganizationcaseTypeStepFormsAndVehicleInfo","renderSteps","_organizationCaseType","_organizationCaseType2","_organizationCaseType3","DOS_NOU","Step","StepButton","handleStep","StepLabel","handleChangeTabForm","renderNoticeResults","getNoticeColumns","renderClaimReviewResults","getClaimReviewColumns","onNoticeClick","notice","_casee$caseStatus","_casee$caseStatus2","_casee$caseStatus2$ca","renderStepper","Stepper","nonLinear","connector","StepConnector","renderTabForms","TabIndicatorProps","centered","renderCaseTypeTabPanel","mb","pb","WorkflowGeneralData","GetWorkflow","WorkflowParameters","GetWorkflowParameters","param","par","UpdateWorkflowParameter","RemoveWorkflowParameter","AddWorkflowParameter","WorkflowOrganizationTypes","workflowOrganizationTypes","selectedOrganizationType","loadWorkflowOrganizationTypes","workflowOrgTypes","GetWorkflowOrganizationTypes","deleteWorkflowOrgType","RemoveWorkflowOrganizationType","addWorkflowOrgType","AddWorkflowOrganizationType","WorkflowPartners","workflowOwnerList","workflowPartnerList","selectedWorkflowPartner","loadWorkflowPartners","workflowPartnersList","GetWorkflowPartners","workflowOwner","wp","partners","updatedWorkflowPartnerIndex","UpdateWorkflowPartner","handleIsOwnerTariffChange","isOwnerTariff","handleHideWorkflowChange","viewWorkflow","addWorkflowPartner","AddWorkflowPartner","handleWorkflowPartnerChange","WorkflowTariffs","selectedTariff","loadWorkflowTariffs","GetWorkflowTariffs","orgPartners","GetOrganizationsByIds","wpItem","wt","t","reloadWorkflowTariffs","workflowPartnerId","updatedWorkflowTariffIndex","UpdateWorkflowTariff","addTariff","AddWorkflowTariff","handleWorkflowTariffChange","createFilterOptions","matchFrom","stringify","WorkflowCaseStructureSectionTab","workflowSectionTypes","selectedWorkflowSectionType","workflowSectionId","loadWorkflowSections","workflowSectionList","sections","GetWorkflowSections","UpdateWorkflowSection","updatedWorkflowSectionIndex","AddWorkflowSection","sectionId","deleteWorkflowSection","RemoveWorkflowSection","WorkflowStepStatuses","workflowSectionStepCaseStatusList","caseStatusTypeList","selectedCaseStatusType","workflowSectionStepList","selectedUserRole","loadWorkflowSectionStepStatuses","workflowSectionStepStatusList","caseStatusTypes","GetWorkflowSectionStepCaseStatuses","workflowSectionStepId","deleteWorkflowSectionStepStatus","deletedStatus","newStatusesArray","RemoveWorkflowSectionStepCaseStatus","addStatus","AddWorkflowSectionStepCaseStatus","handleCaseStatusChange","EditWorkflowStep","workflowForm","workflowStepId","WorkflowCaseStructureStepsTab","workflowSectionStepTypes","selectedworkflowSectionType","selectedworkflowSectionStepType","isEditDialogOpen","modalFormTitle","loadWorkflowSectionSteps","sectionTypeId","GetWorkflowSectionSteps","reloadWorkflowSectionSteps","UpdateWorkflowSectionStep","updatedWorkflowSectionStepIndex","stepName","AddWorkflowSectionStep","handleAutocompleteSectionChange","deleteWorkflowSectionStep","RemoveWorkflowStep","showForm","scroll","workflowStepChanged","EditWorkflowFormReport","workflowReports","reportList","selectedOrganization","selectedReport","loadOrganizationFormReports","refReport","workflowFormReports","GetWorkflowFormReports","workflowFormId","wfrItem","wc","workflowPartner","deleteOrgFormReport","RemoveWorkflowFormReport","UpdateWorkflowFormReport","_value$partner","addOrgFormReport","userRoleId","reportId","AddWorkflowFormReport","workflowSectionStepFormId","handleAutocompleteStatusChange","handleUserRoleChange","handleAutocompleteOrganizationChange","handleAutocompleteReportChange","EditWorkflowFormDesign","GetWorkflowSectionStepForm","UpdateWorkflowSectionStepForm","WorkflowFormActionTransStatus","transitionStatus","statusTypeList","tranStatusActionType","refActionTypes","actionTypes","GetWorkflowSectionStepFormActions","activeWf","wf","currentWorkflowId","fromCs","itemCS","fromStatusId","toCs","toStatusId","toWf","toWorkflowId","fromStatus","toStatus","toWorkflow","actionTypeId","required","_rowData$toWorkflow","_this$state$workflows","RemoveWorkflowSectionStepFormAction","AddWorkflowSectionStepFormAction","EditOrganizationFormActionCaseAllocation","actionAllocationCase","isLastUser","workflowPartnerType","partnerList","selectedPartner","workFlowPartnerTypes","caseStatusList","disabledControls","proprietaryWorkflow","refOrgType","refRoles","workflowPartnerTypes","currentWorkFlow","allocationCase","currentUserWorkflowPartner","wpTypeItem","workflowPartnerTypeId","ur","sendEmailSameOrganization","sendEmailProprietaryOrganization","addOrgFormActionAllocationCase","UpdateWorkflowSectionStepAction","handleCheckBoxIsLastUserChange","handleCheckBoxSameOrganization","_currenctUserWorkflow","currenctUserWorkflowPartner","handleCheckBoxProprietaryOrganization","_currenctUserWorkflow2","_this$state$proprieta","handleAutocompleteOrgChange","handleAutocompleteRoleChange","handleAutocompleteOrgTypeChange","handleAutocompleteCaseStatusChange","handleAutocompleteUserChange","userHoId","userOrganizationId","Checkbox","EditWorkflowFormActionSendEmail","sendEmailList","emailTemplate","emailTemplates","stateList","sendEmailActionList","sendEmailToList","selectedState","selectedSendEmailAction","selectedSendEmailTo","selectedTemplate","actionType","actionId","loadOrganizationFormActionsSendEmail","caseStateRef","recipientTypeRef","actionTypeRef","recipientTypeList","emailTemplateList","actionTypeList","data1","element","sendMailStatusId","sendMailStatus","addOrgFormActionSendEmail","emailRecipientTypeId","sendMailActionTypeId","orgFormActionSendEmail","contor","actionList","sendMailActionType","emailRecipientType","reuseEmailTemplate","AddWorkflowSectionStepFormActions","handleStateChange","handleSendEmailActionChange","handleSendEmailToChange","handleEmailChange","EditOrganizationFormAction","EditWorkflowFormActionTransStatus","EditOrganizationFormActionSendEmail","WorkflowFormInterfaces","GetWorkflowFormInterfaces","UpdateWorkflowFormInterface","RemoveWorkflowFormInterface","AddWorkflowFormInterface","WorkflowOptimizations","workflowOptimization","optimizationTypeList","selectedOptimizationType","workflowPartnerTypeList","selecteWorkflowPartnerType","loadWorkflowOptimization","refStatus","optimizationTypes","workflowOptimizationTypes","GetWorkflowOptimizations","wo","deleteWorkflowOptimization","RemoveWorkflowOptimization","addWorkflowOptimization","optimizationTypeId","AddWorkflowOptimization","handleOptimizationTypeChange","WorkflowDocumentTypes","workflowDocumentTypes","documentTypeList","booleanList","GetWorkflowDocumentTypes","wdt","dt","documentTypeId","documentType","lookupDocumentTypes","displayNAme","lookupBoolean","sorting","isMandatory","isBoolean","isMultiple","isSelectionGroup","UpdateWorkflowDocumentType","RemoveWorkflowDocumentType","AddWorkflowDocumentType","WorkflowCalculations","workflowCalculations","isSelectedWorkflowCalculation","newWorkflowCalculation","loadWorkflowCalculations","GetWorkflowCalculations","wcItem","reloadWorkflowCalculation","updatedWorkflowCalculationIndex","UpdateWorkflowCalculation","workflowCalculationId","filterCaseStatus","deleteCalculation","deletedCalculation","newWorkflowCalculationsArray","RemoveWorkflowCalculation","addWorkflowCalcType","AddWorkflowCalculation","saveCalculationsChange","_this$state$newWorkfl","_this$state$newWorkfl2","md","originalCalculation","vinInterogation","hideEconomicParts","alternativeCalculation","gtValuation","qualityControlCertificate","radar","insurerCalculation","hasMultipleTariff","hasBackButton","editGuideNumber","editQuantity","addOriginalPart","addAlternativePart","deleteOriginalPart","importOriginalParts","importAlternativeParts","selectAlternativePart","tmlEditable","Input","defaultMaxDeliveryTime","alternativeCalculationWithoutOriginal","alternativePartner","alternativeNetPrice","viewOptim","viewPrcNewColumns","serviceOwnStock","oilMapping","allPartsHasBeenInterogated","viewClientCommentsHistory","byAquisitionPrice","hasHistoryInterogation","hasAlternativePartDescription","addNotifySupportOriginalPart","addCarParts","deleteCarParts","editCarParts","addLabor","deleteLabor","editLabor","addPaintingMaterials","deletePaintingMaterials","editPaintingMaterials","addPaintingLabor","deletePaintingLabor","editPaintingLabor","importParts","ownerSolutionView","ownerSolution","WorkflowPermissions","workflowPermissions","selecteWorkflowSectionStepType","loadWorkflowPermissions","GetWorkflowPermissions","createWorkflowPartner","updatedWorkflowPermissionIndex","UpdateWorkflowPermission","deletePermission","deletedPermission","newWorkflowPermissionsArray","RemoveWorkflowPermission","addWorkflowPermissionType","AddWorkflowPermission","read","execute","write","EditWorkflowForm","appointmentCategoryTypes","saveWorkflowForm","workflowFormChanged","handleAppointmentCategoryTypeChange","appointmentCategoryTypeId","firstButtonLabel","hideFirstButton","secondButtonLabel","hideSecondButton","_this$state$workflowF","hasDesign","hasPermissions","hasActions","hasCalculations","hasReports","hasOptimizations","hasDocumentTypes","hasInterfaces","EditWorkflowFormAction","workflowSectionStep","workflowSection","EditWorkflowFormInterfaces","WorkflowCaseStructureFormsTab","workflowSectionStepForms","workflowSectionStepFormTypes","selectedWorkflowSectionStepType","selectedWorkflowSectionStepFormType","formCode","isDialogDeleteOpen","deleteFormId","loadWorkflowForms","filterSectionStepForms","GetWorkflowForms","reloadWorkflowForms","sectionStepId","workflowSectionStepFormList","GetWorkflowSectionStepForms","formName","updatedWorkflowSectionStepFormIndex","_this$state$workflowS","_this$state$workflowS2","_this$state$workflowS3","wfSectionForm","AddWorkflowSectionStepForm","formTypeId","closeDeleteDialog","deleteWorkflowSectionStepForm","RemoveWorkflowForm","workflowStep","workflowFormCode","WorkflowCaseStructure","WorkflowSuppliers","newWorkflowSupplier","workflowSupplierTypes","workflowSupplierInterfaceTypes","selectedWorkflowSupplierType","selectedWorkflowSupplierInterfaceType","urlInterface","password","port","workflowSupplierId","supplierApiType","supplierApiTypes","loadWorkflowSuppliers","ws","GetWorkflowSuppliers","interfacePromises","supplierIds","organizationInterfaces","suppInterface","supplierInterfaceId","supplierInterface","updatedWorkflowSupplierIndex","UpdateWorkflowSupplier","reloadWorkflowSuppliers","supplierApiTypeId","AddWorkflowSuppliers","handleAutocompleteInterfaceChange","url","handleAutocompleteSupplierChange","orgInterfaceTypes","handleDiscountChange","handlePortChange","suffix","IntFormatCustom","deleteWorkflowSupplier","RemoveWorkflowSupplier","WorkflowReminders","workflowReminders","emailList","emailToList","reminderId","caseStatusRef","GetWorkflowReminders","alertItem","lookupOrganization","lookupCaseStatus","lookupEmail","lookupEmailTo","filtering","caseStatusIdList","numberOfHours","workflowAlert","UpdateWorkflowReminder","AddWorkflowReminder","RemoveWorkflowReminder","WorkflowInterfaces","loadWorkflowInterfaces","GetWorkflowInterfaces","UpdateWorkflowInterface","RemoveWorkflowInterface","AddWorkflowInterface","WorkflowCostCenters","workflowCostCenters","costCenters","selectedCostCenter","loadWorkflowCostCenters","workflowCostCenterList","GetWorkflowCostCenters","deleteWorkflowCostCenter","RemoveWorkflowCostCenter","addWorkflowCostCenter","AddWorkflowCostCenter","handleWorkflowCostCenterChange","WorkflowSuppliers2","Loader","Cases","organizationEntities","selectedOrgEntities","workflowsList","userWorkflowsList","selectedWorkflows","organizationCasePartnerList","selectedOrgFilter","selectedOrgCasePartner","selectedCaseStatus","caseTypesList","selectedCaseType","assignedToUserList","createdByUserList","selectedAssignedToUser","selectedCreatedByUser","casePolicyTypesList","selectedPolicyType","isLoadingCases","count","pageSize","filterStartDate","filterEndDate","showCopyCase","isLoadingDialog","isOrderDialogOpen","vinSearchText","plateNumberSearchText","caseNumberSearchText","isInternal","filters","createdByList","caseTypeIds","partnerIds","statusIds","workflowIds","organizationIds","policyTypeIds","datefilterEndDate","materializeCaseObject","workflowDisplayName","reloadFilters","GetCaseFilters","workflowList","orgCasePartnerList","caseTypes","onOrderRowClick","getOrderColumns","onSupplierOrderNumberRowClick","onDelete","currentCase","onCopyCase","FileCopyOutlined","loadPieces","CopyCase","RemoveCase","GetOrdersWithParts","closeOrderDialog","orderChange","handleOrgEntitiesChange","handleWorkflowsChange","handleOrgCasePartnersChange","handleOrFilterChange","handlePolicyTypeChange","handleCaseTypeChange","handleAssignedToChange","handleCreatedByChange","handleVinChange","handlePlateNumberChange","handleCaseNumberChange","handleMakeChange","handleModelChange","handlefilterStartDateChange","reloadCases","handlefilterEndDateChange","InputLabelProps","disableToolbar","onCellClick","colData","cellMeta","colIndex","viewPartnerCases","refpolicyType","policyTypes","caseDetailsList","serverSide","onTableChange","tableState","orderOptions","TariffProperties","caseTariffValues","caseTariffHistoryId","renderTariffGroupTypes","tariffGroupTypes","tariffGroupType","renderCaseTariffValues","caseTariffValuess","tariffTypeGroupId","CaseDetailsCaseTabSummaryForm","loadCaseSettingsSummaryForm","renderCaseDetails","renderPartners","renderParameters","CaseDetailsCaseTabHistoryForm","caseWorkflowHistory","caseParameterHistory","casePartenerHistory","caseTariffHistory","loadCaseWorkflowHistoryForm","orgTypeRef","GetCaseWorkflowHistory","GetCasePartnerHistory","GetCaseTariffHistory","caseWh","GetUserTariffs","partnerItem","paramItem","tariffItem","renderPartenersHistory","caseWorkflowId","renderParameterHistory","renderTariffHistory","showTimelineWorkflowHistory","FormHelpers","ParseAllocations","workflowFormActions","caseAllocation","GetUserInfo","_x$partner","HasRights","workflowFormPermissions","permission","VehicleDetailsHasRights","statusCode","GetCalculation","GetReports","CaseDetailsCaseTabModifyWorkflowForm","referencialService","selectedUser","isLoading2","isLoading3","isOrganizationsDisabled","isUsersDisabled","isUserHidden","loadCaseWorkflows","ststusList","GetUserWorkflowPartners","GetUserAppUsers","renderAssignementForm","changeWorkflow","handleUserChange","submitForm","caseSectionStepFormId","newStatus","SubmitForm","handleSelectWorkflow","setCaseAllocation","allocationResult","imageExtensions","CaseDetailsCaseTabDocumentsForm","reportsService","caseAttachments","attachmentTypeList","previewAttachFile","previewAttachFileExtension","isCameraDialogOpen","attachmentTypeClicked","showUploadMessage","isOpen","dialogVisible","selectedAttachment","wfTransitionStepAction","appointment","appointmentPaymentStatus","hideButton","loadCaseDocumentsForm","_appointmentPaymentSt2","_step$workflowStep$co","_step$workflowStep","refAppointmentCategoryType","workflowDocumentsTypes","GetAppointmentByType","wfDoc","paymentRequest","GetAppointmentPaymentStatus","GetCaseAppointmentAttachments","GetCaseAttachments","getWorkflowSectionStep","relevantAttachmentTypes","workflowDocumentType","_appointmentPaymentSt","generateReport","pre_appointment","photosProm","categ","photos","elem","_item$actionType","setCameraDetails","setAttachmentTypeList","reactImageSize","rejectTimeout","addEventListener","resizeImageFile","Resizer","imageFileResizer","uri","persist","unacceptedFileList","ext","SizeLimit","newFiles","AddCaseAttachment","handleUploadAttachmentFromCamera","handleCloseConfirmationDialog","handleOpenConfirmationDialog","openDeleteAttachmentPopUp","fileInputKey","RemoveCaseAttachment","now","handlePreviewAttachment","filename","extension","renderPreviewAttachment","FileViewer","fileType","filePath","renderPreviewImage","renderAttachments","workflowDocument","attachmentsToRender","VisibilityIcon","GetAppIcon","flexBasis","canUpload","attachemntType","generateInvoiceReport","generateInOutReport","_organization","reportParameters","GetInOutReport","appointmentId","includeInOtherTab","_organization2","_appointmentPaymentSt3","_appointmentPaymentSt4","payment","COMPLETED","GetInvoiceReport","renderWorkflowAttashmentTypes","downloadBasedOnAttachmentType","CardFooter","ButtonGroup","borderTopRightRadius","borderBottomRightRadius","PhotoCameraOutlinedIcon","downloadAll","GetCaseAttachmentsArchive","handleConfirmChanges","carfixAttachmentNotification","attachmentId","attachmentTypeCode","CarfixAttachmentNotification","attachment","closeCameraDialog","handleTakePhoto","dataUri","mime","bstr","atob","n","u8arr","Uint8Array","charCodeAt","random","hasIntegrationDocuments","_workflow","Camera","onTakePhoto","onTakePhotoAnimationDone","mirrored","CaseDetailsCaseTabCarPhotosForm","caseCarPhotos","imgType","currentImage","viewerIsOpen","isUploading","openLightbox","closeLightbox","clearOnUnmount","borderStyle","marginBottom","GridList","cellHeight","GridListTile","GridListTileBar","subtitle","actionIcon","ModalGateway","Carousel","currentIndex","source","CalculationParts","smallPartsPercent","ignoreAlternativePart","_sections","_ignoreAlternativePart","_smallPartPercentage","SmallPartPercentage","GetSmallPartsValue","GetAmountSalePartWithDiscount","GetPrice","GetDiscount","addition","additionInsurer","GetInsurerAddition","GetAmountPart","partsSectionId","calculationSectionId","GetAmountPieceTotal","GetAmountPartWithDiscount","TotalDiscount","GetTotalInsurerAddition","TotalWithoutVAT","totalParts","smallPartsValue","TotalVAT","Total","GetDiscountPercent","GetTotalPartsDiscount","CaseDetailsCaseTabCalculationDetails","appuserService","caseCalculationHistoryDetails","calculationSectionList","calculationParts","newCalculationPart","newCalculationPartId","currentSection","modified","workflowCalculation","solutionValues","deliveryAdress","loadCalculationDetails","refSolutionValue","maintenancePackageRef","currencyLIst","calculationSections","caseCalculationParts","GetCaseCalculationHistoryDetails","calculationHistoryId","GetCalculationSections","GetCaseCalculationParts","workflowSuppliersList","suppliers","getWorkflowForm","stepFormId","displayCalculationPartPrice","calculationPart","displayCalculationPartDiscount","calculationPartUnitOEPrice","calculationPartUnitSalePrice","_additionInsurer2","_additionInsurer","displayCalculationPartUnitSalePrice","displayCalculationPartTotalPrice","saleUnitPrice","calculationTotalPartsOEPrice","calculationTotalPartsAMPrice","amountPiecesWithDiscount","displayCalculationTotalPartsEconomy","originalTotal","alternativeTotal","displayCalculationPartPLPVProcent","salePrice","displayCalculationTotalPartsAMPriceBK","_additionInsurer4","_additionInsurer3","displayCalculationPartQuality","partQualityType","displayCalculationPartSupplier","handlePartInsurerAdditionChange","currentPartId","updatedCalculationParts","partDisabled","inputValue","numericValue","percentage","repairMethod","solutionValue","handleSolutionValueChange","solutionComment","handleSolutionCommentChange","deleteCalculationPart","calcPartList","amountPieces","amountLabor","amountPaintingMaterials","amountPaintingLabor","amountLaborWithDiscount","amountPaintingMaterialsWithDiscount","amountPaintingLaborWithDiscount","amountDiscount","additionInsurerParts","amountPiecesDiscount","calculationPartId","calculationSection","partQualityTypesFilter","qualityType","NumberFormatCustomDiscount","propName","calculationPartIndex","handleModifiedPropChanges","addCalculationPartForm","carPartCategoryId","handleAutocompletePartQualityChange","setAlternativePartQuality","carPartCategoryOriginal","handleImportOriginalParts","preventDefault","f","readedData","XLSX","wsname","SheetNames","Sheets","fullParsedContent","sheet_to_json","dataParse","defval","emptyRows","guideNumberImported","nameImported","originalPriceImported","qualityImported","unitsImported","supplierListFilter","supplierImported","readAsBinaryString","importedOriginalParts","deliveryTimeImported","discountImported","producerImported","remarksImported","rowHover","CloudDownloadTwoToneIcon","getPerson","insuredPersonType","insuredName","handleGeneralInsurerAdditionChange","renderCalculationGeneralData","offerNumber","handleOfferNumberChange","vinQuery","vehicleState","insurerName","renderCalculationPart","handleRemarksChange","solutionValueId","displayValueWithCurrency","renderCalculationTotal","amountAddition","UpdateCaseCalculationParts","organizationName","manipulationPercent","onSave","newCalcPartId","CaseDetailsAlternativeCalculationPieces","partSection","isAddOriginalPartDialogOpen","selectedAlternativePartValue","caseCalculationAlternativePart","newCaseCalculationAlternativePart","clearStateAlternativeParts","calculationPartFormTypeAdd","isDialogModifiedOpen","isConfirm","selectedOrganizationBranch","organizationBranches","currentWorkflowContainsOrderFormOrInterogatePartner","isDialogOpenConfirmationOrgPartner","isDialogOpenFunctionToBeCalled","orderPartList","calculationPartsOrdered","isDialogOpenOptimConfirmation","caseCalculationAlternativePartCopy","includeChild","carClassRentPrice","interogateParts","hasBillingForm","rentVehiclePrices","ownStockOrganization","packageCalculationParts","isNotifySupportDialogOpen","sendNotificationToSupportLoading","rowRefs","getInsurerId","loadPiecesDetails","_this$props$workflowC","_this$props$workflowC2","_order$orderParts","GetSupplierStockOrganization","packageCalculationId","carClassRentPrices","carClassId","GetCarClassRentPriceByClassId","FleetSearchVehicle","trimmedNumber","ceil","caseCalculationPartsCopy","_orderPart$deliveryTi","_orderPart$deliveryTi2","_orderPart$discount","isOrdered","currentWorkflowPartner","partnerOrganizations","organizationAddress","parentIds","GetOrganizationDescendents","deliveryOrganizationId","arrMap","roots","assignObjectPaths","_currentWorkflowPartn","selectedItemFromTree","findRecursive","checkPackageNotification","obj","stack","isDialogOpenOptimizeConfirmationHandler","validateOrginalParts","hasChildItem","optimizeAllParts","checkIfOptimIsPossible","getParentParts","parentParts","formatedDeliveryTime","excludedParentParts","childParts","optimize","_this$state$carClassR","_this$state$carClassR2","offerLines","quantity","offerParts","_part$availableQuanti","rowId","getBestOfferRequest","getPriceForInsurer","bestOfferResult","GetBestOffer","bestOfferLine","offerLine","bestOfferPart","scrollToSelectedItems","caseCalculationOriginalPartsCopy","reverse","calculationOriginalPart","altParts","_this$rowRefs$selecte","selectedAlternativePartId","_this$rowRefs$selecte2","scrollIntoView","behavior","block","calcPart","isDialogOpenConfirmationHandler","func","_this$state$selectedO","_this$state$selectedO2","GetOrganizationOilMapping","partCode","cupiCode","auxiliarInformation","_this$state$selectedO3","InterogateCaseCalculationsAlternativeParts","differentCaseCalculationAlternativePart","calculationsAlternativeParts","copyCalculationPart","closeAddOriginalPartDialog","notifySupportCalculationPart","closeNotifySupportDialog","sendNotificationToSupport","originalPart","supportComment","SendPartNotifySupport","addNewAlternativePart","originalPartIndex","handleUpdateAlternativeCalcAmount","handleAvailableQuantityChange","calculationAlternativeParts","addAlternativeCalculationPartForm","newPart","copyCalculationPartForm","_caseCalculationOrigi","_caseCalculationOrigi2","alternativePartNetPrice","nonStockSupplier","nonStockSuppliers","validateAlternativePartDescriptionAdd","validateAlternativePartDescriptionRemove","validateOriginalPartPriceAdd","borderValidate","validateOriginalPartPriceRemove","filterAlternativePartsByOptimization","optmizationType","filterAlternativePartsByDeliveryTime","filterAlternativePartsByPrice","filterAlternativePartsByQuality","altPart","_this$rowRefs$selecte3","_this$rowRefs$selecte4","prev","curr","bestQuality","handleTextChangeOriginalPart","trimLeft","handlePriceChangeOriginalPart","handleAutocompleteOriginalPartQualityChange","handleUnitsOriginalPart","handleSelectedWorkflowPartner","renderOrderedPartsTable","_this$state$selectedO4","_this$state$selectedO6","zeroPriceError","alternativePartDescriptionError","interogateList","calcPartObject","interogationList","calculationPartsList","editOriginalPrice","_this$props$workflowC3","_this$state$selectedO5","CreateCalculationHistory","calculationTypeId","manipulationTariff","calculationPartsToSave","getPackageFromCalculationParts","isOwnStock","caseStatusRequest","ChangeCaseStatus","newcalculationParts","loaders","handleImportAlternativeParts","originalParts","dataParseArr","originalPartsGuideNrs","originalPartGuideNumberImported","alternativePartGuideNumberImported","cls","importedAlternativeParts","availableQuantityImported","stockLocationImported","renderPartsButtons","minHeight","handleOriginalPartPriceChange","handleOriginalPartGuideNumberChange","handleAlternativePartDescriptionChange","handleOriginalPartQuantityChange","matchingParts","pkgPart","combinedMessage","renderCalculationPieces","FileCopyOutlinedIcon","NotificationImportantOutlinedIcon","createRef","closeModifiedDialog","onDropDownChange","currentNode","selectedNodes","newSelectionOrganizationBranch","oldSelectionOrganizationBranch","_selectedNodes$","newPartialSelectionOrganizationBranch","entry","_arr$entry$children","partialResult","resetOptimizatonType","_insurer$code$toLower","_insurer$code","insurerCode","hasOwnProperty","renderNotifySupportOriginalPartForm","CircularProgress","marginLeft","marginRight","renderAddOriginalPartForm","_this$state$selectedO7","_this$state$selectedO8","_this$state$selectedO9","DropdownTreeSelect","mode","texts","CaseDetailsAlternativeCalculationDetails","openMenuItem","totalAlternativeCalculation","totalAlternativeCalculationSmallParts","totalPartsAlternativeCalculation","setOptimizationType","workflowOptimizations","handleTml","_this$state$caseCalcu","renderSection1","optimizationType","originalCalculationPartsList","alternativeCalculationPartsList","CarCard","_option$extraData","_option$extraData2","_option$extraData3","_option$extraData4","_option$extraData5","_option$extraData6","_option$extraData7","_option$extraData8","_option$extraData9","_option$extraData10","_option$extraData11","_option$extraData12","_option$extraData13","_option$extraData14","_option$extraData15","_option$extraData16","_option$extraData17","_option$extraData18","_option$extraData19","extraData","gutterBottom","manufacturer","minPrice","maxPrice","CardMedia","imageUrl","ImageNotAvailable","generation","modelYear","doorsNo","CardActions","useStyles","instructions","renderAutocomplete","showNoDataMessage","onDateChange","isFromValuationModule","disableFuture","gap","ValuationFiltersWizardComponent","memo","steps","makeList","models","bodyTypesList","generationTypesList","fuelTypes","powerTypes","transmissionTypes","tractionTypes","onChangeFirstRegistrationDate","setShowNoDataMessage","_state$app","firstRegistrationDateLocal","setFirstRegistrationDate","orientation","labelProps","optional","_state$brand","_state$model","_state$body","_state$generation","_state$generation$ext","_state$generation2","_state$generation2$ex","_state$fuelType","_state$powerType","_state$transmissionTy","_state$tractionType","powerType","tractionType","getTextContent","getStepContent","initialVehicleInfo","brandTypes","modelTypes","bodyTypes","onWizardCallback","onFilterChanged","onShowCarList","setActiveStep","setVehicleInfo","filteredBodyTypes","setFilteredBodyTypes","generationTypes","setGenerationTypes","filteredModels","setFilteredModels","filteredFuelTypes","setFilteredFuelTypes","filteredPowerTypes","setFilteredPowerTypes","filteredVehicles","setFilteredVehicles","filteredTractionTypes","setFilteredTractionTypes","filteredTransmissionTypes","setFilteredTransmissionTypes","localMakeList","setLocalMakeList","localBodyTypes","setLocalBodyTypes","localModels","setLocalModels","localfuelTypes","setLocalfuelTypes","localTractionTypes","setLocalTractionTypes","localTransmissionTypes","setLocalTransmissionTypes","isFirstRender","loadMakeList","loadBodytypeList","loadModelList","loadFuelTypesList","localTractionTypesList","localTransmissionTypesList","d","prevActiveStep","checkIfIsValidDate","registrationTimestamp","getTime","fetchValuationModels","valuationModels","GetValuationModels","newModels","stateModel","valuationModel","_state$brand2","valModel","fetchValuationBodies","_state$brand3","valuationBodies","GetValuationBodies","newBodyTypes","stateBody","valuationBody","_stateBody$translatio","enBodyTranslation","_bodyType$translation","valBody","fetchValuationGeneration","_state$body$translati","_state$body2","_state$body2$extraDat","_state$brand4","_state$model2","_state$body3","_state$body3$extraDat","generationValuation","GetValuationGenerations","newGenerationType","generationBody","_stateBody$translatio2","enTranslation","generationType","_generationType$trans","valGen","updatedGenerationType","_state$body4","_state$body4$translat","_state$brand5","_state$model3","resultVehicles","newFuelTypes","stateFuelType","_stateFuelType$transl","enFuelTranslation","onWizardCallbackWrapper","filterVehicles","vehiclesResult","_state$fuelType$trans","kw","transmission","drivenWheels","newPowerTypes","newTransmissionTypes","newTractionTypes","useCallback","toNullProperties","_state$fieldName","newState","CaseDetailsValuation","viewOptions","optionCodes","optionsValue","selectedOptionIndexes","excludedOptionsIndexes","includedOptionsIndexes","requiredOptionsIndexes","showOtionalRequiredOptions","optinalRequiredOptionsIndexes","isloadingIncludeExcludeOptions","tireWear","bodyDamage","hasGpl","valuationLoading","showWizard","hideVehicleSelection","showCarTable","GetValuationVehiclesWithoutVin","extraOptionCodes","show","_this$props$vehicleSt","_this$props$vehicleSt2","workflowFlowCalculation","carSelectedOptionalCodes","isStandard","isSelected","valuationVehicleId","_this$props$optionCod","valuationVehicles","registration_date","ignore_date","override_existing_match","GetValuationVehiclesInfo","_vehicleState$vehicle","version","_vehicleState$vehicle2","_vehicleState$vehicle3","_vehicleState$vehicle4","_vehicleState$vehicle5","_vehicleState$vehicle6","_vehicleState$vehicle7","_vehicleState$vehicle8","perfectMatchFoundByVersionList","_vehicleState$vehicle9","loadOptions","valuationVehicle","GetValuationVehicle","getVehicleColumns","geOptionsColumns","optionCode","isExcluded","isIncluded","isRequired","getIncludedExcludedRequiredOptions","included","excluded","findIndexesByCode","extraOptions","codes","indexes","_this$props$vehicleSt3","GetValuationVehicleOptions","includedIndexex","excludedIndexex","requiredIndexex","updatedIncludedIndexes","updatedExcludedIndexes","updatedRequiredIndexes","getSelectedRows","getExtraOptionsPrice","extraoptions","indexArray","getVehicleOptions","selectableRowsHeader","disableToolbarSelect","onRowsSelect","rowSelected","onSelectedVehicle","selectedIndexes","_vatParameter$","vatValue","getOptionsOptions","rowsSelected","lastSelectedIndex","lastSelectedOptionIndex","optionId","includedOptionIds","excludedOptionIds","requiredOptionIds","fetchIncludeAndExcludeOptions","finalSelectedIndexes","finalIncludedIndexes","finalExcludedIndexes","finalRequiredIndexes","includedIndexes","findIndexes","removeIndexes","mandatoryIndexes","atLeastOne","excludedIndexes","atLeastOneIndexes","isRowSelectable","fetchIncludeOptions","includeOptionsRequest","GetIncludeOptions","extractIndexes","rule","fetchExcludeOptions","excludeOptionsRequest","GetExcludeOptions","fetchRequiredOptions","requiredOptionsRequest","GetRequiredOptions","parseRequiredConditions","matches","handleBodyDamageTextChange","handleTireWearTextChange","handleGplChange","performValuation","_this$state$selectedV","_this$state$selectedV2","valuationRequest","attritionValue","bodyDamageValue","extraOptionsPrice","gpl","priceAsNew","wholesalePrice","fabricationDate","equipmentVersion","trimLevel","powerHP","nrOfDoors","noOfDoors","PerformValuation","renderOptions","_caseParameters$find","_this$state$selectedV3","_this$props$vehicleSt4","_this$props$vehicleSt5","offerTypeCode","caseVatRate","_x$parameter","basePrice","optionsPrice","totalPrice","purchaseVatRate","tradeInPrice","offerPrice","retailPrice","basePriceLabel","optionsPriceLabel","totalPriceLabel","pointerEvents","renderMandatoryOptionsDialog","bottom","_this$state$options","allRows","_this$state$options2","selectedOptionIndexInExtraOptions","unselectedOptionsToBeRemoved","findOptionsToBeExcluded","renderVehicleSelection","_this$props$firstRegi","ValuationFiltersWizardContainer","allConditionsRegex","allConditions","exec","mandatoryPart","mandatoryRegex","mandatoryMatch","optionalPartMatch","optionalRegex","optionalMatch","num","CaseDetailsCaseTabCompareCalculations","firstCalculation","secondCalculation","first","caseFirstCalculationParts","caseSecondCalculationParts","calculationHistoryIds","y","backgroud","renderCalculationParts","calculationPartsForSectionId","firstCalculationPart","secondCalculationPart","dynamicPrice","dynamicDiscount","calculation","generalDiscount","renderCalculation","renderTotalCalculation","CertificateOfControlForm","qualityControlItems","submitData","VehicleQualityControlCert","SaveList","rendeCertificateOfControlForm","renderVehicleInfo","radioCode","handleToggleIsCheckedOption","qcItemId","indexValue","newQualityControlItems","isChecked","isReplaced","handleToggleIsReplacedOption","renderCertificateOfControlList","valuesCategories","qcItem","qcItemCategory","refQcItem","refQcItemCateg","vehicleQCList","qcItems","qcItemCateg","GetUser","itemQC","qcItemCategoryId","RadarFilters","setFilters","sliderMarks","useMemo","makes","selectedMakes","selectedMakesIds","selectedModels","filterModels","selectedMakeIds","selectedModelsIds","_ref4","handleFormChange","period","DefaultIcon","L","iconUrl","shadowUrl","iconShadow","iconSize","iconAnchor","Marker","prototype","CustomMarker","markerStyle","justifyContent","RadarMap","filteredMarketData","selectedMarketData","setSelectedMarketData","mapMarkers","setMapMarkers","mapLoading","setMapLoading","handleMapMarkerClick","geocoder","GeocoderArcGIS","markers","county","findAddressCandidates","candidates","lat","long","getGeoData","MapContainer","center","zoom","scrollWheelZoom","TileLayer","attribution","EnhancedMarker","eventHandlers","click","U","D","RecentAdds","overflowY","textDecoration","addId","offeredBy","substring","InfoIcon","float","manufacturerYear","kmNo","RadarDonutChart","handleDonutClick","sources","uniqBy","series","chart","events","dataPointSelection","chartContext","config","dataPointIndex","labels","legend","responsive","breakpoint","ReactApexChart","ScatterChart","currentVehicleMileage","handleScatterClick","custom","seriesIndex","annotations","xaxis","RadarLineChart","handleLineClick","meanKmArray","monthMap","dateEnd","dateStart","month","has","get","months","dataMin","results","addDate","minBy","dataMed","mean","meanBy","meanKm","minPriceSeries","mediumPriceSeries","categories","SET_FILTERS","SET_SELECTED_MARKET_DATA","SET_MARKET_DATA","SET_SELECTED_SELLER_TYPE","SET_SELECTED_SELLER","SET_MARKET_DATA_LOADING","SET_SELECTED_VEHICLE","radarReducer","_state$selectedMarket","marketData","selectedSellerType","selectedSeller","marketDataLoading","Radar","_state$selectedVehicl","useReducer","newFilters","setMarketDataLoading","setMarketData","setSelectedSeller","setSelectedVehicle","setSelectedSellerType","handleSelectedSellerDonutClick","handleSelectedSellerTypeDonutClick","vehicleFilters","GetVehiclesFilters","_vehicle$make","_vehicle$model","getVehicleFilters","GetVehicleMarketData","uuidv4","getMarketData","RadarScatterChart","noop","CaseValuationHistory","setIsLoading","historyList","setHistoryList","_state$app2","GetValuationHistory","userIds","modifiedBy","futureHistoryList","_users$i","_users$i2","updatedByUserFullName","fetchHistory","showHistory","labelStyle","priceStyle","boxStyle","CaseDetailsCaseRequests","caseRequests","pin","gdprAgreement","district","bankAccount","loadCaseRequests","GetCaseRequests","downloadVehicleCostFile","GetVehicleCostAttachment","showTimeline","requests","_this$state$clientDat","_request$costType","carfixOfferComments","dangerouslySetInnerHTML","__html","isVehicleCost","costType","secondValue","secondCurrency","caseRequest","CaseDetailsCaseTabCalculationsForm","ACTION_COMPARE","ACTION_GT_VAL","RADAR","ACTION_INSURER_CALCULATION","ACTION_BACK_BUTTON","caseCalculationHistoryCopy","caseCalculationActionTypeList","WorkflowOptimization","disableButtonForMoreThenOneRowChecked","disableButtonForMoreThenTwoRowsChecked","selectedCalculationButton","isValuationOpen","isDialogAlternativeCalculationOpen","isDialogQualityControlOpen","isDialogRadarOpen","maxDeliveryTime","unorderedParts","partsForFirstCalculation","discretionaryPriceDealer","discretionaryPriceEmployee","accoutingValue","showHistoryModal","ownerTariffPartner","isMultipleTariffDialogOpen","selectedCalculationTypeId","tariffBranches","selectedTariffBranch","isOwnTariffLoading","lastServiceCalculation","isClientCommentOpen","orginalCalculationTypeId","caseStatusHistory","backButtonDisabled","_this$props$appState","priceEmployee","priceDealer","accountingVal","_this$vehicleService","vehicleAdvert","GetVehicleAdvert","accountingValue","refCalculations","refInsurer","caseCalculations","calculationTypeList","GetCaseCalculationHistories","GetAttachmentTypeByCode","GetOwnerTariffPartner","GetCaseStatusHistory","GetNonStockSuppliers","caseCalculationCopy","sortBy","packageCalculation","GetPartsToBeOrdered","currentOrganizationId","serviceCalculation","organizationTypeCode","GetManipulationPercent","workflowOrganizationOwnerId","ownTariffId","GetTariffPercent","getInsurerIdInfo","tariffCode","ADD_PARTS","PSE_ALT","wr","atmUserRole","firstOriginalCalculationIndex","isExternal","background","getPartsHistoryInterogationReport","EN","GetPartsHistoryInterogationReport","closeAlternativeCalcDialog","closeQualityControlDialog","closeRadarDialog","closeMultipleTariffDialog","loadOrganizationTariff","tariffListBranches","ownOrganizationTariffs","GetOwnTariffs","tariffName","handleCalculationsTypesButton","calculationTypeCode","_caseStatus$caseStatu","_this$state$workflowC","lastClientComment","originalCalculationClick","insurerCalculationClick","_this$state$workflowC2","orgIndex","displayCalculationZeroAmountWarning","alternativeCalculationClick","indexNumber","selectedCaseCalculationHistory","selectedRowIndex","CreateCalculation","gtEstimateResponseDto","codeUrl","UpdateCalculationTariff","newCalculationId","UpdateCalculationPdfCallback","reportClick","reportCode","GetReport","GetCaseCalculationReport","_this$state$caseCalcu2","_this$state$caseCalcu3","GetRepairReport","_organization$country","_organization2$countr","_organization2$countr2","_this$state$caseCalcu4","_this$state$caseCalcu5","saveGeneratedFile","checkFileName","handleQualityControlButton","getForms","sortFunction","formIndex","lastOriginalCalculation","checkAlternativePartDescriptionForNonStocks","checkIfExistStockParts","_this$state$wfTransit","_this$state$wfTransit2","orderNonStockStatus","COMANDA_PIESE_NON_STOC","updateOE","CarfixAlternativeCalculation","alternativeCalculations","generateLKQReports","_this$props$appState2","_this$props$appState3","showManipulation","calculationHistory","checkIntegrationRequirements","_workflow2","_caseStatus$caseStatu2","newSelectionTariffBranch","oldSelectionTariffBranch","newPartialSelectionTariffBranch","onSubmitTariffForm","renderSelectTariffForm","handleCloseClientCommentModal","isButtonDisabled","rowNumber","_organization3","_organization$country2","_organization4","_organization4$countr","_organization4$countr2","reportServiceParameters","serviceFileBlob","endsWith","calcId","UpdateCalculationCallback","getErrorDetails","errorDetails","entries","_this$props$appState4","_this$props$appState5","_this$props$appState6","_workflow5","_this$state$workflowC3","accountingValueLabel","dealerPriceLabel","employPriceLabel","startIcon","ArrowBackTwoToneIcon","report","_workflow3","_workflow4","flexDirection","smallPartsAquisitionValue","manipulationValue","CaseDetailsCaseTabCalculationDetails2","CertificateOfControl","MaterialDatePicker","CaseDetailsCaseTabCarDetailsForm","carCategoryList","filteredModelList","undocumentedModelList","carClassList","hasAdminRole","refCarCateg","refCarBrand","refCarClass","GetCarModelsByBrand","GetCarUndocumentedModelsByBrand","modelList1","HTML5_FMT","DATE","motDate","initialNumberOfKilometers","validate","errors","addError","hasVinQuery","AddCaseVehicle","UpdateCaseVehicle","CustomDatePicker","umc","validateCaseCarDetails","renderFormData","widgets","DateWidget","onFormChange","onChangeVin","makeCode","vinRequest","GetVinByPlateNumberRequest","PlateNumber","externalClient","CaseDetailsCaseTabEventDetailsForm","policyTypeLIst","organizationsList","GetOrganizationHierarchy","eventDate","noticeDate","claimReviewDate","validateCaseEventDetails","isEmpty","AddCaseEvent","UpdateCaseEvent","CaseDetailsCaseTabBackToServiceForm","appReferentialServie","backToServiceFormData","formSubmitted","findTopParent","ob","loadCaseBackToServiceForm","_wfStepActions$find","_wfStepActions$find$w","userIdTo","wfStepActions","caseOrganizationTypeId","_item$actionType2","workflowPartnerIds","extendedWorkflowPartners","parentPartner","organizationBranch","_allocationResult$par","sendEmail","_this$state$selectedU","vinAquisitionCases","GetAcquisitionCases","AddCaseRequest","getWorkflowStep","appuser","_newStatus$caseStatus","_newStatus$caseStatus2","_prevCaseStatus$caseS","_newStatus$caseStatus3","prevCaseStatus","ChangeVehicleStatus","DeleteAllAdvertWhenCaseStatusBecameClosed","_prevCaseStatus$caseS2","rendeBackToServiceForm","FormHelperText","OfferType","CheckBoxOutlineBlankIcon","checkedIcon","CheckBoxIcon","CaseDetailsCaseTabOtherServiceForm","otherServiceFormData","selectedCaseAttachments","clientOffers","selectedClientOffers","hasInvoice","hasOffer","stringToArray","arrayToString","isSellOrBuyOffer","code17Steps","wfs","codeF17","wfssf","handleSwitchValue","renderEmailEditor","toolbarHidden","loadCaseOtherServiceForm","at","_orderBy","GetClientOffers","co","orderBy","offer","_a$actionType","templateSubject","templateBody","templateBodyText","BuildFilledInEmailTemplate","hasEmailTemplate","ca","handleSelectedClientOffer","_newValue$vehicle","_newValue$vehicle$mak","_newValue$vehicle2","_newValue$vehicle2$mo","_newValue$vehicle3","offerType","offerTypeId","renderGenerateDocsButtons","renderAttachementBoxInAppDocs","_option$caseClientHis","_option$caseClientHis2","_option$caseClientHis3","_option$caseClientHis4","_option$vehicle","_option$vehicle$make","_option$vehicle2","_option$vehicle2$mode","caseClientHistory","renderOption","_option$caseClientHis5","_option$caseClientHis6","_option$caseClientHis7","_option$caseClientHis8","_option$vehicle3","_option$vehicle3$make","_option$vehicle4","_option$vehicle4$mode","disableCloseOnSelect","caseClientHistoryId","gatewayServiceUrl","offerId","hideOrganizationLogo","rendeOtherServiceForm","freeSolo","CurrencyEnum","CaseDetailsCaseTabPaymentDetailsForm","paymentTypeId","paymentType","paymentRequestNoId","paymentRequestNo","paymentAmount","paymentAmountWithoutVAT","paymentAmountVAT","secondPaymentAmount","secondPaymentAmountWithoutVAT","hasFransiza","installments","IBANList","selectedIBAN","paymentTypeList","paymentRequestNoList","currencyType","paymentHistory","bankName","bankList","cursorBankAccount","outerValue","selectionStart","selectionEnd","checkIfCurrencyIsEurOrRon","showCostDetails","costTypes","costValues","caseVehicleCosts","currencyRate","inputTextValidator","loadVehicleOffer","offerTypeRef","offers","GetVehicleOffers","getSecondCurrency","_this$state$currencyT","_this$state$currencyT2","_this$state$currencyL","indexRon","indexEur","loadCasePaymentDetailsForm","_casee$caseClient","_banks$find","vatParameter","refPaymentType","refPaymentRequestNo","refCurrencyType","refBanks","serviceOrg","bankAccountList","currentCasePayment","paymentHistoryList","banks","GetUserOrganizationBankAccounts","GetCurrentCasePayment","GetCasePayments","vehicleOffer","GetCostRequests","currrency","selectedCurrency","selectedIban","iban","substr","futureCostTypes","GetVehicleCostTypes","futureCostValues","cost","_this$state$currencyT3","costTypeId","costTypeCode","withCurrency","secondOfferValue","handleUploadCostAttachment","handleDeleteCostAttachment","indexAttachment","renderAttachmentBoxForCosts","costIndex","sendCost","AddCost","paymentDetailsFormData","userToId","getSumWithVAT","getSecondSumWithVAT","AddCasePayment","loadCaseVehicleCosts","loadPayments","payments","handleBanckAccountChange","formatBankAccount","bankAccountValue","handleBankAccountChange","handlePaymentTypeChange","handleRequestNoChange","handlePaymentAmountChange","handlePaymentAmountWithoutVATChange","setSecondValueBasedOnCaseCurrency","handlePaymentAmountVATChange","handleInstallmentChange","sumWithoutVat","handleCurrencyTypeChange","_this$state$currencyT4","previousCurrencyCode","previousCurrencyRate","futureCurrencyRate","showPaymentHistoryTimeline","renderPaymentAttachmentBox","getLabel","_item$value","valueWithoutVat","uploadAttachment","deleteAttachment","renderCostType","indexLang","renderCostDetails","AddCircleOutlineIcon","renderCostDetailsFromCase","renderCostTypeFromCase","_cost$costType","_cost$costType2","renderPaymentDetailsWithCurrencyForm","_this$state$paymentAm","_this$state$currencyT5","_this$state$secondPay","_this$state$currencyT6","caseHasVAT","priceLabel","updateOnblur","maxLength","rendePaymentDetailsForm","IbanTools","valid","_prevState$currencyTy","_this$state$currencyT7","_this$state$currencyT8","focus","_this$state$bankList$","newBankName","_this$state$currencyT9","_this$state$currencyT10","resultValue","_this$state$currencyT11","_this$state$currencyT12","futureCurrencyCode","_this$state","_this$state2","_this$state2$caseVehi","qualityParts","selectedQualityPart","partLoader","partDetails","calculationPartsCopy","caseCalculationPartId","selectedCalculationPart","draggable","showTitle","paging","grouping","handleProducerChange","handleDeliveryTimeChange","handleStockChange","handleLocationChange","handleQualityChange","displayOrderPartOtherDetails","renderOrderPartDetailsEditable","FormControl","InputLabel","labelId","getCalculationParts","_part$package$j$valid","_part$package$j$codeT","_part$package$j$type","_part$package$j$order","_part$package$j$codEa","_alternativePart$pack","_alternativePart$pack2","UpdateCalculationPartsAndCasePartToBeOrdered","UpdatePartToBeOrdered","_alternativePart$vali2","_alternativePart$code2","_alternativePart$type2","_alternativePart$orde2","_alternativePart$codE2","CaseDetailsCaseTabOrderForm","orderIds","isAddSupplierOrderStatusDialogOpen","selectedWorkflowSupplier","isUpdateOrderPartDialogOpen","unorderedPartIds","hasRemainingNonStockParts","hasValidatorRole","partStock","nonStockOrder","CreatePartsToBeOrdered","COMANDA_ATM","caseInfo","GetCaseInfoById","unorderedPartsSupplierIds","updateRow","closeAddOrderSupplierDialog","closeUpdateOrderPartDialog","deleteOrder","DeleteOrder","partIndex","DeletePartToBeOrdered","displayUnorderedPartPrice","unorderedPart","getUnorderedPartsColumns","addOrder","addOrderSubmit","CreateOrder","unorderedPartsBySupplier","renderAddOrderForm","handleStockParts","lastNonExcludedStatus","CreateAutomateAppointment","checkConfirmChanges","firstOrder","_code2","pse_com","ChangeCaseStatusBasedCode","CaseDetailsCaseServiceAppointpentsForm","serviceInDate","serviceOutDate","loadCaseServiceAppointmentForm","currentCaseServiceAppointment","GetCurrentCaseServiceAppointment","currentCaseServiceAppointment1","createAppointment","appointmentFormData","AddCaseServiceAppointment","handleDateInChange","handleDateOutChange","CaseDetailsCaseTabClientDataForm","regionsTypes","citiesTypes","districtsTypes","loadCaseClientDataForm","refAttachemntType","regions","cities","districts","submitClientData","newCaseClient","AddCaseClient","UpdateCaseClient","handleCNPChange","handlePersonTypeChange","personType","handleAddressChange","handleIsActiveAgreement","isCnpCuiEnabled","_workflow$workflowSec","resultPart1","shouldEnableCnpCUi","_resultPart1$section","checkIsItsSaleWorkflow","_workflow$workflowSec2","showResetClientData","_resultPart1$section2","handleAdvertRegionTypeChange","handleAdvertDistrictTypeChange","handleCnpCuiOnBlur","pin_cui","_client$bankAccount$r","handleAdvertCityTypeChange","resetClientData","rendeClientDataForm","updateBankOnblur","_this$state$region","_this$state$city","_this$state$city2","_this$state$bankList$2","MaterialTableIcons","nRowsSelected","CaseDetailsCostDetailsForm","_this$props","futureCurrencyList","readonly","indexCurrency","_this$props$match","_this$props$match$par","currencyTypeCode","updateCostValues","_this$state2$currency","_this$state3","_this$state3$currency","_this$state$currencyL2","getValue","_this$props2","_this$props2$costValu","_this$state$costTypes","_this$props3","_this$props4","_this$props4$costValu","standardOptionsSchemaIds","CaseDetailsCaseTabCarDetailsExtendedContainer","versionTypes","vehicleTypes","refurbishedList","mvoDvBattypList","polutionNormTypes","paintTypes","tiresTypes","rimsTypes","colorTypes","carInteriorStateTypes","carExteriorStateTypes","carMechanicalStateTypes","carStandardOptions","carOptionalOptions","datePickerFirstRegistrationError","ignoreExistingMappingSwitch","ignoreTimeStampSwitch","carDetailsExtendedData","engineSize","co2","inConditionComments","outConditionComments","technicalConditionComments","pollutionNormId","tractionTypeId","wheelsTypeId","tiresTypeId","paintTypeId","inConditionId","outConditionId","technicalConditionId","pollutionNorm","wheelsType","tiresType","paintType","inCondition","outCondition","refurbished","refurbishedId","carDetailsFetchedData","includedExtraOptionIds","excludedExtraOptionIds","requiredExtraOptionIds","showOptionalRequiredOptions","optionalRequiredOptionsIds","loadCaseCarDetailsExtendedForm","vehicleInfo","caseCarDetailsExtended","_caseCarDetailsExtend","_caseCarDetailsExtend2","tableData","standardOptions","checkIfVinExistOnAcquisitionCase","submitVehicleData","newVehicle","standardOption","optionalOption","updateOptionStatus","OMV","AddVehicle","initialStatus","UpdateVehicle","ValuationSaveMapping","loadVehicleCosts","handleBrandTypeChange","vehicleCosts","GetVehicleCosts","newCostValues","handleModelTypeChange","updateCostValue","fieldNameId","updatedState","validateFirstRegistrationDate","currentDate","handleFirstRegistrationDateChange","handleYearOfFabricationDateChange","setSelectedOptions","getValuationInfoConfirmation","getValuationInfo","selectedVehicleHandler","getManualValuationInfo","optionsCodes","_selectedVehicle$cc","_selectedVehicle$engi","mvoDvBattyp","refurbishedItem","traction","pollution","valLanguageId","mvoDvBattypId","propulsionSystem","languageId","schemaId","op","getCarStandardOptionsColumns","getCarOptionalOptionsColumns","vehicleMakeList","bodyTypeList","wheelsTypeList","tractionTypeList","transmissionTypeList","fuelTypeList","tiresTypeList","paintTypeList","vehicleConditionList","pollutionNormList","modelTypesList","colorTypeList","vehicleTypeList","standardOnRowAdd","standardOnRowUpdate","dataUpdate","standardOnRowDelete","dataDelete","optionalOnRowAdd","optionalOnRowUpdate","optionalOnRowDelete","renderCarStandardOptionsTable","selection","selectionProps","isEditHidden","components","Container","onSelectionChange","renderCarOptionalOptionsTable","rowStyle","previousSelections","opt","newSelections","newlySelected","newlyDeselected","lastSelectedItem","lastSelectedOptionId","finalIncludedOptionIds","finalExcludedOptionIds","finalRequiredOptionIds","updateCheckedExtraOptionsStatus","addIndexes","convertKwToHp","convertHpToKw","hp","handlePowerChange","handleChassisNumberChange","handleVinNumberBlur","handleHPChange","isDisabled","fieldValue","_this$state$carDetail","_this$state$carDetail2","checkIfIsElectric","E","handlePlateNumberBlur","renderValidators","rules","_this$state$carDetail3","_this$state$carDetail4","_this$props$appState7","_this$props$appState8","_this$props$appState9","_this$props$appState10","_this$props$appState11","_this$props$appState12","_this$props$appState13","_this$props$appState14","_this$props$appState15","_this$props$appState16","_this$props$appState17","_this$props$appState18","_this$props$appState19","_this$props$appState20","_this$props$appState21","_this$props$appState22","_this$props$appState23","_this$props$appState24","_this$props$appState25","_this$props$appState26","_this$props$appState27","_this$props$appState28","_this$props$appState29","_this$props$appState30","_this$props$appState31","_this$props$appState32","_this$props$appState33","_this$props$appState34","_this$props$appState35","_this$props$appState36","_this$props$appState37","_this$props$appState38","_this$props$appState39","_this$props$appState40","_this$props$appState41","_this$props$appState42","_this$props$appState43","_this$props$appState44","_this$props$appState45","_this$props$appState46","_this$props$appState47","_this$props$appState48","_this$props$appState49","_this$props$appState50","_this$props$appState51","_this$props$appState52","_this$props$appState53","_this$props$appState54","_this$props$appState55","_this$props$appState56","_this$props$appState57","_this$props$appState58","_this$props$appState59","_this$props$appState60","_this$props$appState61","_this$props$appState62","_this$props$appState63","_this$props$appState64","_this$props$appState65","_this$props$appState66","_this$props$appState67","_this$props$appState68","_this$props$appState69","_this$props$appState70","_this$props$appState71","_this$props$appState72","_this$props$appState73","_this$props$appState74","_this$props$appState75","_this$props$appState76","_this$props$appState77","_this$props$appState78","_this$props$appState79","_this$props$appState80","_this$props$appState81","_this$props$appState82","_this$props$appState83","_this$props$appState84","_this$props$appState85","_this$props$appState86","_this$props$appState87","_this$props$appState88","_this$props$appState89","_this$props$appState90","_this$props$appState91","_this$props$appState92","_this$props$appState93","_this$props$appState94","_this$props$appState95","_this$props$appState96","_this$props$appState97","_this$props$appState98","_this$props$appState99","_this$props$appState100","_this$props$appState101","_this$props$appState102","_this$props$appState103","_this$props$appState104","_this$props$appState105","_this$props$appState106","_this$props$appState107","_this$props$appState108","_this$props$appState109","_this$state$carDetail5","_this$props$workflowF","_this$props$workflowF2","showAquisitionPrice","saleCase","plateNumberObject","endAdornment","InputAdornment","vehicleInfoDisabled","manualVinIdentification","getModelsOptions","getBodiesOptions","rcrEmployeeLastName","rcrEmployeeFirstName","rcrEmployeeEmail","rcrEmployeePhone","showCostTypes","flexWrap","_data$filter","selectedOption","finalRequiredIds","optionsToBeExcludedIds","finalExtraOptions","stateProperty","statusProperty","filteredModelTypes","CaseDetailsCaseTabCarRepairCostForm","onHandleTariffInputChange","newCaseTariffValues","caseParameterMandatoryField","_caseParameter$parame","_caseParameter$parame2","SaveParameterHistory","SaveCaseTariffHistory","getCarRepairCostParametersColumns","parametersOnRowAdd","parametersOnRowUpdate","_newData$parameter","_newData$parameter2","newItemIndex","parametersOnRowDelete","renderCarRepairCostParametersTable","caseParametersList","ControlType","initialStateValue","STRING","notMandatory","ORIGINAL_COPY","seller","onlyForDisplay","PERSONAL_DATA","buyer","NUMBER","others","BOOLEAN","footer","AttachmentTypeIdEnum","personalDataType","booleanType","originalCopyType","ContractModal","isSaleOfferType","reduxState","requiredFields","setRequiredFields","_caseClient$personTyp","personIsCompany","otherParameters","priceParamaters","vehicleParameters","buyerParameters","sellerParameters","_vehicle$engineSize","_vehicle$pollutionNor","setParameterValue","_caseClient$personTyp2","_caseClient$personTyp3","getVehicle","groupName","reportParametersExtended","requiredParameters","personalDataParams","caseAttachment","group","getControl","valuesArray","onlyForDisplayEditable","CaseDetailsCaseTabSaleOfferForm","reportService","guaranteeTypes","offerTypes","contractModalOpened","displaySecondCurrency","vehicleOfferData","damageValue","newVin","offerValueWithVAT","priceValue","tradeInValue","withNewVehicle","secondOfferVatAmount","secondOfferValueWithVAT","purchaseOrigins","saleChannels","closeContractModal","getCurrencyRates","openContractModal","contractOffer","contractPrice","caseContractAttachments","Error","attachmentBlob","documentName","getCurrentCurrency","getVATValue","getPriceWithVAT","getReverseVatValue","getPriceWithoutVAT","vehicleHasNoVAT","getOfferPriceWithoutVAT","_this$props$vehicleSt6","getVATFromOfferPrice","_this$props$vehicleSt7","_this$props$vehicleSt8","_this$props$vehicleSt9","offerPriceWithoutVAT","getValuationPrice","_caseValuation","_caseValuation2","valuationValue","caseValuationVatValue","setStatePriceAndVAT","caseHasNoVAT","getDamageValue","damage","loadCaseSaleOfferForm","purchaseOriginRef","saleChannelRef","offerTypeList","guaranteeTypeList","puchaseOriginList","saleChannelList","makeListFiltered","guaranteeType","guaranteeTypeId","loadOffers","NumberFormatCustomCurrencyRate","offerVatAmount","SaveVehicleOffer","handleGuaranteeTypeChange","handlePurchaseOriginChange","purchaseOrigin","purchaseOriginId","handleSaleChannelChange","saleChannel","saleChannelId","handleIsActiveNewVehicle","_purchaseOrigin$id","_purchaseOrigin","getInvoicePdf","getOfferPdf","showGetInvoiceButton","showOfferTimeline","_this$props$caseSetti23","_this$props$caseSetti24","_this$props$vehicleSt10","secondPrice","renderClientDataForm","_this$props$vehicleSt11","_this$props$vehicleSt12","_this$props$caseSetti25","_this$props$caseSetti26","_this$props$caseSetti27","_this$props$vehicleSt13","_this$state$vehicleOf","_this$state$vehicleOf2","_this$state$vehicleOf3","_this$props$caseSetti28","_this$props$caseSetti29","_this$props$caseSetti30","_this$props$caseSetti31","saleOfferPriceWithoutVatLabel","saleOfferPriceOfferedWithoutVatLabel","saleOfferPriceOfferedWithVatLabel","saleOfferCalculatedPriceWithoutVat","setSecondVatFromOfferPrice","_this$props$caseSetti32","_this$props$caseSetti33","_this$props$caseSetti34","_this$props$vehicleSt14","_this$props$vehicleSt15","_this$props$vehicleSt16","_this$props$caseSetti35","_this$props$caseSetti36","_this$props$caseSetti37","_this$state$contractO","CaseDetailsCaseTabVehicleAdvertComponent","advertiserOperations","valuationPrice","vehicleAdvertHistory","vehicleAdvertData","leasingConcession","individual","privateBusiness","authorizedDealer","hasFinanceEligibility","manufacturerWarrantyDate","isRegistered","isFirstOwner","hasAccident","hasServiceBook","hasParticlesFilter","hasStandardImages","hasOptionalImages","vehicleAdvertOptions","makeTypes","gearBoxTypes","pollutionNormTypes","carBodyTypes","originCountriesTypes","advertisers","isPublishLoading","loadCaseVehicleAdvert","_vehicleInfo","colors","advertDistricts","originCountries","getVehicleAdvertHistoryAmongWithUsers","initialOptions","o1","o2","vehicleOptionId","intermediaryArr","_x$code","getVatParameterValue","countryOrigin","countryOriginId","co2Emission","getDocForm","getCaseAttachements","dateDiffYears","date1","date2","diff","years","floor","age","days","checkMakeYearAndKilometersNr","operationType","makeYearAndKilometersNrValid","advertiserCode","today","vehicleAge","publishAdvert","selectedAdvertiserCodes","_a$attachmentType","fileUrl","_attachmentTypeCode","_attachmentTypeCode2","PublishAdvert","details","isImported","priceForEmployee","formattedPrice","adDetails","advertPublishedResults","AdvertiserCode","advertiser","AdUrl","Price","requestData","ConnectId","AdDetails","SendPublishedAdvertsToRcr","deleteAdvert","DeleteAdvert","vatAmount","SaveVehicleAdvert","handleIsActiveIndividual","handleIsActiveBusiness","getVATFromAdvertPrice","advertPrice","handleMakeTypeChange","handleFuelTypeChange","handleTransmissionTypeChange","handleGearBoxTypeChange","handlePollutionNormTypeChange","handleCarBodyTypeChange","districtId","handleAdvertOriginCountryTypeChange","handlePaintTypeChange","handleColorTypeChange","handleManufacturerWarrantyDateChange","handleManufacturerWarrantyDateClear","handleManufacturedYearDateChange","handleToggleOptions","idx","newOptions","vehicleAdvertId","gtid","onToogleAdvertiser","getAdvertReportWord","vehicleAdv","_vehicleAdv$createdBy","vehicleAdvertAdvertisers","_this$state$advertise","_this$state$advertise2","advertiserId","REN","externalId","rel","renderAdvertisers","isMavoAdvertPresent","MAVO","adv","isAdvertisersDisabled","getCarOptionsColumns","optionIsChecked","renderCarOptionsTable","scrollToRef","scrollTo","offsetTop","rendeVehicleAdvertForm","calculatedPriceWithVat","advertPriceWithVat","onError","ClearIcon","warrantyKmLimit","publishingAndDeletingAreAllowed","GetVehicleAdvertHistory","operation","CaseDetailsCaseTabEventBillingDetailsForm","organizationDeliveryBranches","selectedDeliveryOrganizationBranch","interventionTypesBranches","selectedInterventionTypeBranch","refInterventionType","newCaseEvent","interventionTypes","GetUserWorkflowCostCenters","interventionTypeId","organzationListBranches","interventionTypeListBranches","selectedInterventionType","selectedDeliveryOrganization","onDeliveryDropDownChange","_selectedNodes$2","onInteventionTypeDropDownChange","newInterventionTypeBranch","oldInterventionTypeBranch","_selectedNodes$3","newPartialSelectionInterventionTypeBranch","CaseDetailsCaseTabSoldCarForm","SaveVehicleOfferWithoutCaseId","getJobListRequest","API","GetAsync","getAppointmentsRequest","Post2Async","addAppointment","changeAppointmentStatus","getDay","getHourForAppointment","hours","getHours","minutes","getMinutes","setMinutes","getHour","indexHour","formatAppointmentForCalendar","appointmentDate","day","hour","start","end","resource","getStatusData","_statusList$CANCELED","_statusList$INITIATA","_statusList$RESCHEDUL","_statusList$CONFIRMED","_statusList$PAYMENT_C","_statusList$ESTIMATE_","statusItem","CANCELED","INITIATA","RESCHEDULED","CONFIRMED","PAYMENT_CONFIRMATION","ESTIMATE_ACCEPTED","getStatusList","responseData","getAppointmentStatus","futureStatusList","getCategoryTypeList","getAppointmentCategoryType","toStartOfWeek","dayOfWeek","getFullYear","getDate","formatDate","formattedDateString","ClientAutocomplete","setClients","getClientList","getClientListRequest","CarDetails","selectedCar","CategoryAppointmentDetails","_selectedCar$identifi","_selectedCar$engineSi","_selectedCar$power","_selectedCar$identifi2","_selectedCar$carColor","_selectedCar$engineTy","_selectedCar$carCateg","_selectedCar$carCateg2","_selectedCar$carCateg3","px","identifiedFuelType","identifiedCarBody","carColor","engineType","carCategory","CategoryAddAppointment","_selectedCar$model","_selectedCar$model2","_selectedCar$identifi3","_selectedCar$identifi4","_selectedCar$engineSi2","_selectedCar$power2","_selectedCar$engineTy2","_selectedCar$carCateg4","_selectedCar$carCateg5","_selectedCar$carCateg6","_selectedCar$carColor2","borderWidth","JobsMultipleSelection","setOptions","setSelected","getTranslations","jobOptions","job","fetchJobOptions","FormGroup","newSelected","JobDetails","defaultValue","BigCalendar","getAppointments","defaultView","setDefaultView","defaultDay","handleSlotSelect","localizer","momentLocalizer","zoomLevel","setZoomLevel","devicePixelRatio","_state$agenda","_state$agenda2","_appointment$appointm","start_date","end_date","formatedAppointments","handleZoomChange","matchMedia","removeEventListener","flex","Calendar","dayLayoutAlgorithm","week","selectable","view","onView","CustomEvent","customStyle","eventPropGetter","getEventStyle","time","allDay","work_week","ArrowLeftIcon","ArrowRightIcon","yesterday","tomorrow","noEventsInRange","showMore","defaultDate","onRangeChange","range","fullMonthRanges","startDate","endDate","monthStart","monthEnd","monthName","getFullMonthRangesInRange","setDate","startAccessor","endAccessor","onSelectEvent","onSelectSlot","popup","heigth","_resource$appointment","_resource$vehicle","_resource$vehicle2","_state$agenda3","AppointmentCalendar","setDay","setHour","showDefaultCalendar","showCalendar","setShowCalendar","showBigCalendar","setShowBigCalendar","generateArrayOfHours","minute","formattedHour","padStart","localAppointments","setLocalAppoitments","localLoading","setLocalLoading","setDefaultDay","showDropdown","setShowDropdown","useSnackbar","isLoadingDate","setIsLoadingDate","isLoadingHour","setIsLoadingHour","AGENDA_SET_STATUS_LIST","getSyles","generalStyle","fetchAppointments","onlyOneDay","AGENDA_SET_APPOINTMENTS","slotInfo","selectedHour","selectedMinute","mapAppointments","firstDayOfMonth","lastDayOfMonth","calendarStyle","showNeighboringMonth","hourDropdownStyle","ora","handleSelectOption","CaseDetailsCaseServiceAddAppointmentForm","isCarInService","requiresServiceScheduling","getAppointment","res","getAppointmentByCaseId","getPayloadFormat","_this$state$date","_this$state$appointme","_this$state$appointme2","_this$state$appointme3","_this$state$appointme4","_this$state$appointme5","selectedJobs","appointmentJobTypes","indexJob","finalDate","splitHour","appointmentClient","jobDetails","carBody","handleSwitchChange","addNewAppointment","_this$state$date2","hasErrors","validateFieldRequiredAdd","displayInfo","disableHoverListener","validateFieldRequiredRemove","_this$state$appointme6","_this$state$appointme7","_this$state$appointme8","_this$state$appointme9","_this$state$appointme10","CaseDetailsCaseTabInOutDataForm","caseVehicleDetails","repairDate","hasOkWindows","hasGlitchWindows","hasOkLights","hasGlitchLights","hasOkBodyAndPaint","hasGlitchBodyAndPaint","hasOkWipers","hasGlitchWipers","fuelInTheTank1","fuelInTheTank2","fuelInTheTank3","fuelInTheTank4","fuelInTheTank5","mandatoryEquipment1","mandatoryEquipment2","mandatoryEquipment3","mandatoryEquipment4","mandatoryEquipment5","otherEquipment1","otherEquipment2","otherEquipment3","otherEquipment4","otherEquipment5","hasPickUp","replacementVehicle","documentsReceived1","documentsReceived2","documentsReceived3","documentsReceived4","loadCaseInOutDataForm","lastApprovedCaseCalculationHistory","GetLastApprovedCaseCalculationHistory","GetCurrentVehicleDetails","repairPrice","isAllowed","floatValue","decimalSeparator","fixedDecimalScale","submitCaseVehicleDetailsData","newCaseVehicleDetails","AddCaseVehicleDetails","UpdateCaseVehicleDetails","onChangeCheckedField","handleHasOkWindows","handleHasOkLights","handleHasOkBodyAndPaint","handleHasOkWipers","handleCheckBoxFuelInTheTank1Change","handleCheckBoxFuelInTheTank2Change","handleCheckBoxFuelInTheTank3Change","handleCheckBoxFuelInTheTank4Change","handleCheckBoxFuelInTheTank5Change","handleCheckBoxMandatoryEquipment1Change","handleCheckBoxMandatoryEquipment2Change","handleCheckBoxMandatoryEquipment3Change","handleCheckBoxMandatoryEquipment4Change","handleCheckBoxMandatoryEquipment5Change","handleCheckBoxOtherEquipment1Change","handleCheckBoxOtherEquipment2Change","handleCheckBoxOtherEquipment3Change","handleCheckBoxOtherEquipment4Change","handleCheckBoxOtherEquipment5Change","handleHasPickUp","handleReplacementVehicle","handleCheckBoxDocumentsReceived1Change","handleCheckBoxDocumentsReceived2Change","handleCheckBoxDocumentsReceived3Change","handleCheckBoxDocumentsReceived4Change","handleRepairDateChange","repairDateError","validateDates","rendeCaseVehicleDetailsDataForm","parsedValue","serviceComment","hasWindowsComment","hasLightsComment","hasBodyAndPaintComment","hasWipersComment","pickUpCode","CaseDetailsCaseTabIntegrationClientDataForm","CaseDetailsCaseCarfixAnalysisForm","clientEmail","CaseDetailsCaseCarfixBackToServiceForm","externalCaseRequests","CaseDetailsCaseCarfixValidateAppointmentForm","GetAppointmentByCaseId","CaseDetailsCaseRepairInProgressForm","repairHasBeenFinished","updateOffer","CaseDetailsCarInServiceForm","continue","submitCaseCarInServiceData","CAR_LEAVE_WORKSHOP","rendeCarInServiceForm","excludedSteps","CaseDetailsCaseTab","workflowCaseSections","selectedWorkflowSection","selectedStep","workflowCaseSectionSteps","workflowForms","workflowCaseSectionStepForms","refreshDesign","isDialogFormOpen","loadCaseSettings","workflowCaseSectionId","initialWorkflowCaseSectionId","workflowCaseSection","loadInitialWorkflowSteps","loadWorkflowSteps","loadCurrentWorkflowSelectedStep","getSelectedWorkflowSection","handleTabChange","renderSectionTabs","sectionTabs","selectedItemId","renderSectionTabs2","AddCircleIcon","Xarrow","strokeWidth","loadWorkflowCurrentSteps","workflowCaseSectionStep","getStepBasedCaseStatus","isStepCurrent","renderSteps2","PlayCircleOutlineIcon","closeDialogForm","CaseDetailsCaseServiceAppointmentsForm","prevStatus","prevStep","CaseDetailsCommentsTab","caseComments","commentText","selectedCommentType","selectedCaseCommentId","editComment","editTextComment","loadCaseComments","GetCaseComments","mailHandleClick","handleDeleteComment","RemoveCaseComment","handleEditComment","editCaseComment","UpdateCaseComment","displayText","renderCaseComments","rowsMax","disableRipple","commentTypeCode","addCaseComment","caseComment","AddCaseComment","CaseDetailsHistoryTab","loadCaseStatusHistory","vehicleCost","renderCaseRequests","renderCaseRequestsForFirstStatus","req","CaseDetailsCaseSupportCommentsTab","caseSupportComments","loadCaseSupportComments","GetCaseCommentsByTab","adminSupport","userSupportComment","toUserId","CASE_SUPPORT_RESPONSE","CASE_NOTIFY_SUPPORT","SendNotifySupport","isFromSupportTab","CaseDetails","rejectedOfferModal","renderOfferPriceAndDate","_calculation$amount","renderLastOfferApproved","indexOfLastOfferApproved","hasBeenApproved","renderlastOfferRejectedModal","lastOfferRejected","PutAsync","setLastOfferRejected","renderLastStatus","getStatusDescription","resultCaseCalculations","getTitleDescription","casePlateNumber","carMake","carModel","carVersion","carPlateNumber","_this$props2$vehicleS","_this$props2$vehicleS2","CaseDetailsSupportCommentsTab","VehicleFilterStateKeys","VehicleDashboardAppliedFilters","setFiltersValueByName","resetInventoryFilters","orgName","setOrgName","lessThan","appliedFilters","_data$byMaker$find","_data$byModel$find","_data$byTechnicalCond","_data$byStatusType$fi","_data$byInventoryAge$","_data$byFuelType$find","_data$byTransmissionT","_data$byTractionType$","propertyName","MAKE_ID","byMaker","LOCATION_ID","MODEL_ID","byModel","TECHNICAL_CONDITION_ID","byTechnicalCondition","STATUS_ID","byStatusType","_ref5","INVENTORY_AGE_FILTER","byInventoryAge","_ref6","FUEL_ID","byFuelType","_ref7","TRANSMISSION_TYPE_ID","byTransmissionType","_ref8","TRACTION_TYPE_ID","byTractionType","_ref9","getOrgName","handleDelete","VehicleBarChart","selectedId","handleBarClick","numberOfVehicles","maxValue","fill","plotOptions","bar","distributed","dataLabels","tickAmount","formatter","yaxis","chartHeight","selectedItemName","VehicleAverages","averageMileage","averageVehicleAge","VehicleAverageAgeBarChart","vehicleCount","VehicleMap","vehicleLocationCount","setLocationId","parentCallback","VehicleDonutChart","VehicleConditionTable","setTechnicalCondtionId","exterior","interior","mechanical","Pagination","evt","selectedRow","VehicleStockTable","setStatusId","withMissingInfo","dashboardState","lackingInformation","moreThan90Days","nrOfVehiclesOlderThan90Days","getRowBackgroundColor","getRowColor","DashboardMainFilterStateKeys","DashboardFilters","vatFilterVisible","setOrganizations","handleFiltersChange","selectItems","getAllChildren","child","availableOrganizations","userOrganization","childItems","SELECTED_ORGANIZATIONS","START_DATE","END_DATE","selectedOrganisations","includeVat","INCLUDE_VAT","FormLabel","SET_MAKEID","SET_MODELID","SET_VALUE_BY_NAME","SET_TECHNICAL_CONDITION_ID","SET_STATUS_ID","SET_INVENTORY_AGE_FILTER","SET_FUEL_ID","SET_TRANSMISSION_TYPE_ID","SET_TRACTION_TYPE_ID","SET_LOCATION_ID","RESET_INVENTORY_FILTERS","vehicleDashboardReducer","fuelId","inventoryAgeFilter","VehicleDashboard","setData","updatedItems","setUpdatedItems","constantsData","setMakeId","setModelId","setTechnicalConditionId","setInventoryAgeFilter","setFuelId","setTransmissionTypeId","setTractionTypeId","handleFuelTypeDonutClick","handleTractionTypeDonutClick","handleTransmissionTypeDonutClick","handleInventoryAgeBarClick","handleMakeBarClick","handleModelBarClick","vehicleChartHeight","axios","CancelToken","makeIds","modelIds","inventoryAgeFilters","fuelTypeIds","tractionTypeIds","transmissionTypeIds","GetDashboardData","finalResult","byInOutAndTechnicalCondition","byOrganization","isCancel","getData","cancel","pptService","PptService","addFirstPage","addHorizontalChart","addTable","geTechnicalConditionFormatTable","formatTable","numberFormat","byInConditionValue","byOutCondition","byTehnicalConditionValue","inventoryAge","addVerticalChart","averageInventoryAge","addCircleChart","exportPpt","childData","AcquistionDonutChart","translateDisplayName","AcquisitionMainCards","purchasesCompleted","purchasesInProgress","purchasesFailed","newVehiclesSoldCount","purchasesCompletedPrice","amountInclVat","purchasesInProgressPrice","purchasesFailedPrice","averagePurchasePrice","AcquisitionFilterStateKeys","AcquisitionDashboardAppliedFilters","resetFilters","_data$purchasedVehicl","_data$purchasedVehicl2","_data$purchasedVehicl3","purchasedVehiclesByMaker","CLIENT_TYPE_ID","purchasedVehiclesByClientType","OFFER_TYPE_ID","purchasedVehiclesByOfferType","RecentAcquisitions","convertBlobToBase64","blobToBase64","blob","itemsWithImages","imageURL","base64Value","getAttachments","columnGap","makeName","modelName","makeYear","purchasePriceInclVat","buyerName","TopBuyers","isTentative","mainColumns","inProgressPurchasesEstimatedAveragePriceInclVat","inProgressPurchasesEstimatedAveragePrice","completedPurchases","damageAndOtherCostsInclVat","damageAndOtherCosts","averagePrice","SET_CLIENT_TYPE_ID","SET_OFFER_TYPE_ID","SET_MAKE_ID","RESET_FILTERS","acquisitionDashboardReducer","clientTypeId","AcquistionDashboard","setClientTypeId","setOfferTypeId","handleMakeDonutClick","handleClientTypeDonutClick","handleOfferTypeDonutClick","getTopBuyersFormatTable","firstPart","personTypeIds","offerTypeIds","GetDashboardAquisitionData","recentAcquisitions","topTentativeBuyers","AcquisitionDonutChart","SalesOfferEmailBarChart","offerGeneratedCountArray","emailSentCountArray","offerGeneratedCount","emailSentCount","SalesChannel","channelId","activeCount","autovitLogo","olxLogo","renaultLogo","SalesHeader","channels","topSellers","onClickSeller","channel","advertId","VehicleAddSalesChart","advertsCountArray","soldVehiclesCountArray","advertCount","soldVehicleCount","SalesSummaryCard","adsValue","SalesAggregateTable","carType","averageAge","fixesAndOtherCosts","profit","totalProfit","avgOfYear","purchaseValue","soldValue","profitPercent","profitValue","carInfo","numberOfUnitSold","groupedByFuelType","percentValue","groupedByTransmissionType","avgSoldValue","avgDamageValue","maxBodyHeight","headerStyle","actionsCellStyle","SET_VAL_BY_NAME","SET_PERSON_TYPE_ID","SET_SALE_PERSON_ID","RESET_SALES_FILTERS","salesDashboardReducer","salePersonId","SalesFilterStateKeys","SalesDashboardAppliedFilters","_data$topSellersBased","_data$vehiclesGrouped","SALE_PERSON_ID","topSellersBasedOnClosedFolders","vehiclesGroupedByClientType","SalesDashboard","_numberFormat","_numberFormat2","_numberFormat3","_numberFormat4","_numberFormat5","_numberFormat6","_numberFormat7","_numberFormat8","_numberFormat9","_numberFormat10","setPersonTypeId","setSalePersonId","salePersonIds","GetDashboardSalesData","handlePersonTypeDonutClick","addVerticalChart2","addScatterChar","salesProfit","vehiclesGroupedByMakerAndModel","lastSalePage","salesChannels","VehicleAdSalesChart","guaranteeCount","soldVehicleInformation","addsInformation","DashboardTab","Dashboards","setSelectedTab","VEHICLES","newTab","AquisitionDashboard","Orders","selectedClients","selectedSuppliers","madeByUsersList","selectedMadeByUsersList","locations","selectedLocations","orderStatusList","selectedOrderStatus","selectedDateFrom","selectedDateTo","isSupplier","descriptionSearchText","supplierOrderNumberSearchText","clientIds","locationIds","madeByList","orderDetailsList","checkIfIsSupplierAccount","GetOrderFilters","orderListStatusIds","reloadOrders","orderStatusHistories","_orderStatusHistory$o","_orderStatusHistory$o2","_orderStatusHistory$o3","_orderStatusHistory$o4","handleDateChangeFrom","handleDateChangeTo","handleClientsChange","handleSuppliersChange","handleMadeByUsersChange","handleLocationsChange","handleStatusesChange","handleDescriptionChange","handleSupplierOrderNumberChange","vatOptions","VehicleImportModal","setVehicles","setPurchaseVatRate","setDialogVisible","_props$firstRegistrat","checkIfDataIsValid","importCars","importedValues","trimmedValue","invalidValues","temp","importedVehicles","newVehicleArr","km","handleAutoImportFromCsv","simpleVehicles","SaveImportedVehicles","importedVehicleVins","copiedVehicleVins","duplicatedVehicleVins","CSVReader","cssClass","inputId","inputStyle","onFileLoaded","handleAutoImport","handleRowAdd","newVehicles","vehicleIndex","handleRowUpdate","handleRowDelete","ImportVehiclesRenaultButton","setFileInputKey","SaveImportedXlsxVehicles","prevKey","_document$getElementB","CaseDetailsCaseTabSaleOfferFormDialog","OF_VANZ","submitFormForClosedCase","Closed","initialVehicle","VehicleImportOneCarModal","vehicleData","setVehicleData","setDatePickerFirstRegistrationError","plateNumberError","setPlateNumberError","attributeName","isPlateNumberValid","SaveManualdVehicles","Vehicles","vehiclesList","makeEntities","selectedMakeEntities","modelEntities","selectedModelEntities","fuelEntities","selectedFuelEntities","transmissionEntities","selectedTransmissionEntities","tractionEntities","selectedTractionEntities","statusEntities","selectedStatusEntities","isLoadingVehicles","vehicleImportDialogOpenend","vehicleImportOneCarDialogOpenend","isCarSoldDialogOpen","vehiclesCaseList","salesWokflowForm","paramList","loadVehicles","vehiclesFilters","transmissionIds","tractionIds","vehicleHistory","GetLastCaseByVehicleId","vehicleCase","vehicleStatuses","closeCarSoldDialogOnSaveButton","_vehicleExtension$veh","_vehicleExtension$veh2","_vehicleExtension$veh3","_vehicleExtension$veh4","vehicleExtension","buttonsToBeRendered","_vehicleExtension$veh5","DATE_CLIENT","GetWorkflowSettingsForVehiclesTab","salesForm","Vin","RcrEmployeeMail","RcrEmployeePhone","SendVehicleToCarfix","handleMakeEntitiesChange","handleModelEntitiesChange","handleFuelEntitiesChange","handleTransmissionEntitiesChange","handleTractionEntitiesChange","handleStatusEntitiesChange","handleImportDialogOpen","handleImportDialogClose","tableOptions","_ref10","_ref11","refParam","_ref12","renderVehicleImport","VehicleCaseForm","vehicleCaseList","loadVehicleCaseForm","SearchByVehicle","vehicleCaseDetailsList","usersAssignedList","casesUrl","vehicelState","VehicleHistoryTimeline","vehicleStatusHistory","loadVehicleHistoryTimeline","vehicleFieldsUpdateHistory","GetVehicleStatuses","GetVehicleFieldsHistory","vehicleStatusHistoryDetailedList","vehicleUpdateHistory","vehicleStatusHistoryId","showVehicleStatusHistoryTimeline","renderFieldsUpdateHistory","vehicleUpdate","vehicleUpdateHistoryFields","_vehicleUpdate$user","vehicleFieldNameLocalized","oldValueLocalized","newValueLocalized","VehicleAttachments","setCaseAttachments","previewFile","setPreviewFile","setIsDialogOpen","getImage","GetCaseAttachmentsForVehicle","organizationOwnerName","picturesExpanded","documentsExpanded","setVehicleAttachmens","caseTypeDisplayName","pictureAttachments","documentAttachments","newAttachments","expandPictures","ExpandLessIcon","_attachment$attachmen","expandDocuments","_attachment$attachmen2","DetailsOfCarForm","statusOptions","isChangeVehicleStatusDialogOpen","loadDetailsOfCarForm","_vehicle$currentStatu","_vehicle$currentStatu2","_vehicle$currentStatu3","statusesTypeRef","getStatusOptions","currentStatusEnum","allowedStatuses","s","changeVehicleStatusSubmit","_this$state$selectedS","_this$state$selectedS2","handleAutocompleteVehicleStatusChange","renderChangeVehicleStatusForm","changeVehicleStatusClick","_this$state$vehicle","_this$state$vehicle$m","_this$state$vehicle2","_this$state$vehicle2$","_this$state$vehicle3","_this$state$vehicle4","_this$state$vehicle5","VehicleCase","GetInterfacesWithClientAccess","handleConnect","interfaceId","GetInterfaceAuthorizeUrl","SetInterfaceCredentials","clientSecret","VehiclesHistory","CarClassRentalPrice","newCarClassRentPrice","carClasses","newCarClassRentPriceId","loadCarClassRentPrices","carClassPrices","GetCarClassRentPrices","handleCarClassChange","carClass","saveCarClassRentalPrice","AddCarClassRentPrice","UpdateCarClassRentPrice","newCarClassPopup","deleteCarClassRentPrice","RemoveCarClassRentPrice","carClassRentalPriceId","Billing","startDateError","endDateError","exportInfo","formatedStartDate","formatedEndDate","requestPayload","isGtm","GetCaseBillingReport","DgpciBilling","GetCaseBillingReportDgpciRequest","OrderPartsHistory","GetOrderPartsHistory","VersionList","selectedMake","selectedModel","initialMakeList","initialModelList","_this$state$selectedM","_this$state$selectedM2","selectedModelList","BodyTypeList","BodyConditionTypeList","WheelConditionTypeList","InvoiceRangeList","newInvoiceRange","invoiceRanges","newInvoiceRangeId","loadInvoiceRanges","GetInvoiceRanges","FACTURA","handleInvoiceRangeTypeChange","handleInvoiceRangeStatusChange","saveInvoiceRange","AddInvoiceRange","UpdateInvoiceRange","newInvoiceRatePopup","deleteInvoiceRate","RemoveInvoiceRange","invoiceRateId","ProvenanceList","newProvenance","account","provenances","newProvenanceId","loadProvenance","GetProvenances","saveProvenance","AddProvenance","UpdateProvenance","newProvenancePopup","deleteProvenance","RemoveProvenance","ExchangeRateList","newExchangeRate","exchangeRatesHistory","exchangeRateHistory","startOf","endOf","exchangeRateId","exchangeRates","newExchangeRateId","selectedExchangeRate","isHistoryDialogOpen","lastExchangeRate","loadExchangeRatesList","GetExchangeRates","modifiedByUser","saveExchangeRate","_this$state$lastExcha","previousStartDate","AddExchangeRate","UpdateExchangeRate","handleStartDateDateChange","handleEndDateDateChange","newExchangeRatePopup","viewHistory","VisibilityOutlinedIcon","deleteExchangeRate","RemoveExchangeRate","showExchangeTimeline","closeHistoryDialog","renderViewHistory","AlcorErrorLogList","alcorErrors","loadAlcorErrorLogs","GetAlcorErrorLogs","FinancialParameterInfoList","newFinancialParameterInfo","financialParameterId","financialParameter","financialParameters","financialParametersInfoList","newFinancialParameterInfoId","loadFinancialParameterInfoList","GetFinancialParameterInfoList","handleFinancialParameterChange","saveFinancialParameterInfo","AddFinancialParameterInfo","UpdateFinancialParameterInfo","newFinancialParameterInfoPopup","deleteFinancialParameterInfo","RemoveFinancialParameterInfo","financialParameterInfoId","SellerDataList","sellerData","address2","address3","bank","sellerDataList","isDialogLoading","loadSellerDataList","GetSellerDataList","GetSellerLogo","saveSellerData","sellerId","AddSellerData","UpdateSellerData","AddSellerLogo","handleCityChange","ownCapital","MavoVehicleActionCreators","setMavoVehicle","GetMavoVehicle","setMavoVehicleObject","changeMavoVehicleStatus","MavoVehicleOrderDialog","orderDateError","isLoadingOrganizations","handleSaveOrder","orderForm","orderDate","mavoVehicleId","cnp","adress","AddMavoVehicleOrder","closeDialogOrder","NumberDecimalFormatCustom","renderOrderForm","_this$props$orderForm","_this$props$orderForm2","handleChangeOrder","RadioGroup","handleOrderDateChange","_this$props$orderForm3","renderOrderContent","GetMavoHOOrganizations","isDialogOpenOrder","MavoVehicleAuctionDialog","handleSaveAuction","auctionForm","checkIfEndDateIsBeforeStartDate","currentPrice","AddMavoVehicleAuction","closeDialogAuction","_this$props$auctionFo","_this$props$auctionFo2","_this$props$auctionFo3","_this$props$auctionFo4","isBefore","renderAuctionForm","_this$props$auctionFo5","_this$props$auctionFo6","_this$props$auctionFo7","startPrice","handleChangeAuction","disablePast","handleStartDateChange","handleEndDateChange","minDifference","renderAuctionContent","isDialogOpenAuction","MavoVehicles","provenanceEntities","selectedProvenanceEntities","selectedStartDate","selectedEndDate","isLoadingImportVehicles","isLoadingExport","isDeleteLoading","mavoVehiclesFilters","provenanceIds","GetMavoVehicles","GetMavoVehiclesFilters","provenanceList","makeSelectedVehicle","head","MuiCheckbox","colorSecondary","handleProvenanceEntitiesChange","isVehicleValid","RCI","handleDialogOpen","handleStockDialog","handleDeleteDialog","handleDeleteVehicle","DeleteMavoVehicle","handleExportMavoVehicles","ExportMavoVehicles","onRowDoubleClick","columnIndex","detail","importedTableOptions","handleImport","SaveImportedMavoVehicles","totalVehiclesNum","importedVehiclesNum","mavoVehicles","getImportedColumns","renderImportedResultBox","accept","handleAuctionStartDateChange","handleAuctionEndDateChange","renderMavoVehicleButtons","countryRo","renderSearchButtons","renderImportContent","_this$state$selectedV4","mavoVehicleState","MavoGeneralInformationContainer","provenanceTypes","vehicleAttachmentTypes","addMavoVehicleAttachments","mavoVehicleAttachmentsGrouped","AddMavoVehicleAttachments","submitMavoVehicleData","GetMavoVehicleByVin","AddMavoVehicle","bodyTypeRCR","bodyTypeRCRId","onChangeProvenance","versionTypeList","provenanceTypeList","vehicleAttachmentTypeList","GetRCRFuelTypes","dvsProvenance","DVS","sortedMakeList","handleFabricationYearChange","colorRCR","colorRCRId","chassisNumberValidation","isDisabledVin","_code3","renderGeneralInformationForm","getOptionSelected","getVersionsOptions","maxDate","filteredVersionTypes","_this$state$bodyTypes","MavoVehicleOptionsContainer","onCheckBoxChange","onVehicleChange","rendeVehicleOptionForm","userSelect","PreviewAttachment","scale","nextImage","_this$props$loadMavoA","nextIndex","loadMavoAttachmentData","_this$props$loadMavoA2","_this$props$loadMavoA3","prevImage","_this$props$loadMavoA4","prevIndex","_this$props$loadMavoA5","_this$props$loadMavoA6","TransformWrapper","initialScale","minScale","maxScale","wheel","doubleClick","zoomIn","zoomOut","TransformComponent","MavoAttachmentDataContainer","_processedFiles","vehicleAttachmentList","GetMavoVehicleAttachments","processedFiles","GetMavoVehicleAttachment","addWatermarkToImage","canvas","ctx","getContext","drawImage","font","fillStyle","textBaseline","translate","rotate","PI","fillText","restore","toBlob","watermarkedFile","MaxSizeKB","RemoveMavoVehicleAttachment","renderAttachTypeCard","attachImgType","attachDocType","renderGalleryAttashment","_this$props$mavoVehic","_attachmentType","maxNumberOfCharacters","MavoStatusDataContainer","bodyConditions","onRepairPriceChange","repairCostPrice","handleToggleIsChecked","fieldName2","renderBodySection","conditionInfo","renderMecanicsSection","handleITPValidateDateChange","renderInteriorAndAccesoriesSection","renderObservationsSection","observations","renderVehicleStatusForm","MavoVehicleDetailsForm","loadMavoVehicle","MavoStockDataEditContainer","NumberDecimalCurrencyFormatCustom","handleNirDateChange","renderVehicleDetails","_this$props$mavoVehic2","_this$props$mavoVehic3","_this$props$mavoVehic4","_this$props$mavoVehic5","renderStockDataForm","noticeNr","invoiceDate","invoiceNr","MavoVehicleStockDetailsForm","updateHasRightsValue","VehicleAuctionActionCreators","setMavoVehicleAuctionObject","RealTimeDate","showLastOffer","auctionStatus","remainingTime","setRemainingTime","isLastOffer","setIsLastOffer","updateRemainingTime","duration","TERMINATA","STOPATA","asMilliseconds","asMinutes","asDays","seconds","timeString","calculateRemainingTime","interval","setInterval","clearInterval","AddAuctionOfferDialog","selectedAuction","maxOffers","mavoVehicleAuctionOffer","mavoVehicleAuctionId","isOfferLoading","GetMavoAuction","minimumOffer","mavoVehicleAuctionOffers","addAuctionOffer","hasManualOffer","AddMavoAuctionOffer","goToUserAuctions","renderAuctionDetails","renderOfferContent","maximumOffer","mavoVehicleAuctionState","MavoVehicleDetailsViewForm","isOfferDialogOpen","openAddOfferDialog","closeAddOfferDialog","MavoVehiclesAuctions","auctionsList","isLoadingAuctions","loadAuctions","mavoVehiclesAuctionsFilters","GetAuctions","GetAuctionsFilters","makeSelectedAuction","auctions","auction","handleMinPriceChange","handleMaxPriceChange","closeOfferDialog","renderAuctionsButtons","MavoVehiclesUserAuctions","offerStatuses","selectedOfferStatus","loadUserAuctions","mavoVehiclesUserAuctionsFilters","GetUserAuctions","GetUserAuctionsFilters","getColor","userStatus","userOffer","handleOfferStatusChange","AUCTION_WINNER","AUCTION_LAST_BIDDER","AUCTION_LOSER","AUCTION_OFFER_EXCEEDED","MavoAuctionDetailsForm","showBidOfferTimeline","auctionCommentDetails","auctionDetails","_this$state$mavoVehic","_this$state$mavoVehic2","closeAuction","auctionId","CloseAuction","MavoVehiclesAdminAuctions","mavoAdminAuctionsFilters","GetAdminAuctions","GetAdminAuctionsFilters","handleExportAuctionOffers","ExportAuctionOffers","renderAdminAuctionsButtons","OrdersButtons","orderConfirmationLoading","cancelOrderLoading","orderRefuseLoading","printPaymentNoticeLoading","generateInvoiceLoading","rciCloseOrderLoading","handleOrderConfirm","_this$props$selectedO","_this$props$selectedO2","_this$props$selectedO3","CONFIRMAT","TRANSMIS","_this$props$selectedO4","mavoVehicleOrderId","ConfirmMavoVehicleOrder","handleCancelConfirmation","_this$props$selectedO5","_this$props$selectedO6","_this$props$selectedO7","CancelNoticeMavoVehicle","handleOrderRefuse","_this$props$selectedO8","_this$props$selectedO9","DeclineMavoVehicleOrder","handlePrintPaymentNotice","_this$props$selectedO10","_this$props$selectedO11","PrintMavoVehicleNotice","handleInvoiceGenerate","_this$props$selectedO12","_this$props$selectedO13","_this$props$selectedO14","GenerateInvoiceReport","existingValidInvoice","eInvoiceResponse","CreateEInvoice","invoiceId","invoiceTypeCode","statusMessage","handleRCICloseOrder","CloseMavoVehicleOrderRCI","orderButtonDisabled","rciButtonDisabled","MavoVehiclesOrders","ordersList","selectedOrganizationEntities","isLoadingOrders","mavoVehiclesOrdersFilters","GetMavoOrders","makeSelectedOrder","orderFilters","GetMavoOrdersFilters","organizationList","LanguageApiCard","processCountryFlag","LanguageLocalCard","showSnackbar","ImportLanguage","fetchLanguages","handleUpdate","UpdateLanguage","DeleteLanguage","checkIfLocalLanguageExists","languagesLocal","renderActionsButtons","buttonStyle","languageApi","PoEditor","fetchLanguagesList","languagesList","GetLanguagesList","languagesApi","_this$state$languages","MaintenanceCupiOptionalPartComponent","newMaintenanceCupiOptionalPart","maintenanceOptionalId","maintenanceCupiOptionalPartList","maintenanceOptionList","newMaintenanceCupiOptionalPartId","loadMaintenanceCupiOptionalPartList","MaintenanceCupiOptionalPartList","handleMaintenanceOptionChange","maintenanceOption","maintenanceOptionId","handleCupiCodeChange","saveMaintenanceCupiOptionalPart","AddMaintenanceCupiOptionalPart","UpdateMaintenanceCupiOptionalPart","newMaintenanceCupiOptionalPartPopup","deleteMaintenanceCupiOptionalPart","RemoveMaintenanceCupiOptionalPart","maintenanceCupiOptionalPartId","VoInvoiceHistory","invoicesList","invoiceNumber","isLoadingInvoices","selectedInvoice","isLoadingInvoice","isLoadingNotice","isLoadingBackToStock","isLoadingEInvoice","isLoadingResendInvoice","isModalOpen","loadInvoices","mavoInvoicesFilters","GetMavoInvoices","makeSelectedInvoice","invoices","invoice","anafStatus","renderAgentMavoFilters","handleBackToStock","invoiceStatus","STORNO","STORNATA","_this$state$selectedI","mavoVehicleOrder","CancelInvoiceMavoVehicle","handlePrintNotice","PrintMavoVehicleNoticeBasedInvoiceId","handlePrintInvoice","isStorno","PrintInvoice","handlePrintEInvoice","resultPath","DownloadResults","byteArray","byteContent","char","Blob","handleSendToEInvoice","FACTURA_CORECTATA","handleExportInvoices","ExportInvoices","disabledResendInvoice","PENDING","VERIFICATION_SUCCESS","disabledPrintEInvoice","invoicesFilters","GetMavoInvoicesFilters","renderMavoInvoicesButtons","MavoUsersTab","GetMavoUserAppUsers","MavoAppUsersAdmin","MavoEditUser","MavoUserDetails","AlcorParameterInfoList","newAlcorParameterInfo","alcorParameterId","alcorParameter","alcorParameters","alcorParametersInfoList","newAlcorParameterInfoId","loadAlcorParameterInfoList","GetAlcorParameterInfoList","handleAlcorParameterChange","saveAlcorParameterInfo","AddAlcorParameterInfo","UpdateAlcorParameterInfo","newAlcorParameterInfoPopup","deleteAlcorParameterInfo","RemoveAlcorParameterInfo","alcorParameterInfoId","UserManual","organizationAttachments","isLoadingAttachments","GetOrganizationAdminAttachments","GetOrganizationAttachments","loadOrganizationAttachments","saveOrganizationAttachments","AddOrganizationAttachments","getDistinctOrganization","GetOrganizationAttachment","RemoveOrganizationAttachment","renderOrganizationAttachments","organizationAttachment","organizationAttachmentList","renderOrganizations","MavoHOOrganizations","MavoEditOrganization","MavoOrganizationEntities","MavoOrganizationDetailsTab","MavoOrganizationAdmin","ModelCarClass","newModel","newModelId","loadModels","GetModelList","updateCarClassModel","UpdateCarClassModel","SmallCalendar","_selectedRange$start_","setModalOpen","currentRange","tileContent","appoimentsForDate","appointmentsInDay","dayAsString","getColorHueIntensity","newDate","setSeconds","onChangeDate","intensity","NewCaseAppointment","appAppointmentId","setSelectedItem","setWorkflows","newAppointmentCase","workflowServiceInstance","WorkflowService","organizationServiceInstance","OrganizationService","appReferentialServiceInstance","ReferentialService","orgCaseType","futureOrganizations","counter","_w$caseType","REPARATIE","Close","AppointmentFilterStateKeys","AppointmentTableColumns","MenuProps","PaperProps","DropDownSelect","_filterList$index","optionValues","allValue","_futureFilterList","_futureFilterList3","_futureFilterList4","futureFilterList","_futureFilterList2","shift","initialFilters","appointmentIds","services","formatedDateList","formatedHourList","plateNumberList","appointmentStatuses","formattedDateCreationList","formattedHourCreationList","appAppointmentIds","AppointmentsTable","tableProps","setOpenModal","setAppointmentId","selectedfilters","setSelectedFilters","formatedHours","setFormatedHours","_state$app3","viewPartnerAppointments","_state$app$appUser$or","_state$app4","_state$app4$appUser","_state$app4$appUser$o","_state$app$appUser$or2","_state$app5","_state$app5$appUser","_state$app5$appUser$o","getAppointmentFilters","getAppointmentFiltersRequest","formattedHourCreationListToLocal","_moment$utc","_moment$utc$local","getFormatedHour","generatePayload","_payload$appointmentS","_payload$appointmentC","_payload$services","_filterList$appointme","_filters$appointmentS","statusNameMap","getStatusIds","appointmentCategoryTypeIds","_filterList$appointme2","_filters$appointmentC","appointmentCategoryTypeList","appointmentCategoryTypeNameMap","selectedAppointmentCategoryType","getAppointmentCategoryTypeIds","serviceIds","_filterList$services","_filters$services","serviceList","serviceNameMap","selectedService","getServiceIds","enableNestedDataAccess","displayData","searchText","filterPayload","includedAdditionalData","onFilterChange","_selectedfilters$Appo","customFilterDialogFooter","currentFilterList","applyNewFilters","applyFilters","COLUMNS","_filterList$Appointme","_selectedfilters$appo","_filterList$Appointme2","_selectedfilters$serv","_filterList$Appointme3","_selectedfilters$form","_filterList$Appointme4","_selectedfilters$form2","uniqueArray","_filterList$Appointme5","_selectedfilters$make","_appointment$vehicle","_appointment$vehicle2","_appointment$vehicle3","_filterList$Appointme6","_selectedfilters$mode","_appointment$vehicle4","_appointment$vehicle5","_appointment$vehicle6","_filterList$Appointme7","_selectedfilters$plat","_filterList$Appointme8","_selectedfilters$form3","_filterList$Appointme9","_selectedfilters$form4","_filterList$Appointme10","_selectedfilters$appo2","_filterList$Appointme11","_selectedfilters$appA","_filterList$Appointme12","_selectedfilters$appo3","_tableMeta$rowIndex$a","Visibility","Folder","CreateNewFolder","AppointmentBigCalendar","AgendaPage","setTabelProps","_state$app2$appUser","_state$app2$appUser$o","_state$app3$appUser","_state$app3$appUser$o","changeBigCalendar","dates","firstDate","startOfWeek","areDatesInSameWeek","_filters$formatedDate","orgServices","formatRangeValue","AGENDA_SET_CATEGORY_TYPE","ContactForm","newFormData","phoneNo","AppointmentActionStatus","ConfirmAppointment","visible","setIsVisible","setComment","onClickButton","calendarText","buttonText","alignSelf","AppointmentClientSelectionDetails","clientDateSelections","getSelectedAppointment","changeStatus","viewActionColumn","openViewCalendar","setOpenViewCalendar","openRescheduleModal","setOpenRescheduleModal","openRescheduleCalendarModal","setOpenRescheduleCalendarModal","setSelectedHour","CustomToolbar","_value$translations","_value$translations$i","_value$translations2","_value$translations$i2","appointmentClientSelectionId","MAINTENANCE","REPAIR","handleApprove","setUTCHours","CONFIRMEDSERVICE","AppointmentDetails","contactFormData","setContactFormData","openCommentModal","setOpenCommentModal","_appointment$appointm3","_appointment$appointm4","_appointment$appointm5","_appointment$appointm6","_appointment$appointm7","_appointment$appointm8","_appointment$appointm9","_appointment$appointm10","username","appUsername","notchedOutline","_appointment$appointm2","hideCancelButton","appointmentClientSelections","AppointmentHistory","appointmentHistory","checkDate","dataA","dataB","appointmenObj","_appointmenObj$date","_appointmenObj$user","AppointmentTabDocumentsForm","appointmentAttachments","loadAppointmentDocumentsForm","GetAppointmentAttachments","renderAttachmentTypes","GetAppointmentAttachmentsArchive","AppointmentPage","useParams","setAppointment","setAppointmentHistory","_state$app$appUser","appointmentHistoryList","appUserServiceInstance","AppUserService","futureAppointmentHistory","appointmentObj","desiredStatus","appointmentStatusId","loadAppointmentStatusHistory","appointmentStatusHistories","getActionButton","CarAutocomplete","cars","setCars","getCarList","getCarListRequest","mappedCars","carData","_carData$model","_carData$model2","_carData$model3","_carData$model4","addManual","car","_car$plateNumber","MileageInput","AddNewClientModal","setFormData","formError","setFormError","prevData","closeModal","validateForm","canContinue","handleSave","LinkButton","onClickMethod","FORM_JSON","tag","minLength","AddNewCarModal","_formData$modelList3","_formData$brandList4","setModelData","setSelectedModelData","futureBrandList","futureModelList","_formData$brandList3","_formData$brandList","_formData$modelList","_formData$brandList2","_formData$modelList2","futureFormData","_formData$modelList$i","_formData$modelList$i2","indexModel","indexBrand","AddNewAppointmentPage","setSelectedClient","setSelectedCar","carMileage","setCarMileage","setSelectedJobs","setJobDetails","addCarModal","setAddCarModal","setCanContinue","saveData","indexCategory","categoryItem","organization_id","appFirstName","appLastName","appEmail","appPhone","getRequestPayload","goBack","handleClientChange","handleCarChange","mileage","futureCanContinue","MaintenanceProducerComponent","newMaintenanceProducer","maintenanceProducerList","maintenancePackageList","newMaintenanceProducerId","loadMaintenanceProducerList","MaintenanceProducerList","packageItem","countryItem","handleMaintenancePackageChange","saveMaintenanceProducer","AddMaintenanceProducer","UpdateMaintenanceProducer","newMaintenanceProducerPopup","deleteMaintenanceProducer","RemoveMaintenanceProducer","maintenanceProducerId","DetailsValuation","hideValuationWizzard","_vehicleState$vehicle10","checkIfImageExists","startSellingDate","endSellingDate","getStandardOptionsColumns","handleKmNoTextChange","handleColorChange","_this$state$selectedV5","_this$state$selectedV6","_this$state$selectedV7","_this$state$selectedV8","DetailsValuationContainer","showRequiredVinError","showSearchingLoader","goToValuationHistory","imgUrl","endIcon","ConnectedComponent","EvaluationPage","EvaluationReportFile","reportData","_carDetails$options","_carDetails$options2","carDetails","basicTableCellStyle","leftTableCellStyle","Table","TableBody","TableRow","TableCell","dateTimeString","year","formattedDate","formattedTime","formatDateTime","ListItemIcon","FiberManualRecord","primaryTypographyProps","EvaluationCarFile","valuationId","isOptionsLoading","setIsOptionsLoading","setCarDetails","reportRef","fetchCarDetails","carDetailsResponse","getCarValuationDetails","resetCarDetails","decodedOptions","getCarOptions","carOptionsResponse","getValuationVehicleOptions","valuationDate","extraOptionsDepreciationPrice","valuationSourceId","vehicleSourceId","downloadCarPdfRaport","html2canvas","useCORS","jsPDF","unit","worker","html2pdf","set","toPdf","pdf","totalPages","internal","getNumberOfPages","pageHeight","pageWidth","reportName","dateAndTime","formattedThisDateTime","toLocaleTimeString","setPage","setFontSize","EvaluationHistory","valuationHistory","setValuationHistory","historyValuationResponse","getValuationVehicleHistory","sortedHistory","rowsPerPageOptions","GTWSBilling","GetGTWSBillingReport","CountryBufferComponent","newCountryBuffer","newCountryBufferId","loadCountryBuffers","saveCountryBuffer","AddCountryBuffer","UpdateCountryBuffer","newCountryBufferPopup","deleteCountryBuffer","RemoveCountryBuffer","countryBufferId","NonStockPartBilling","GetNonStockPartBillingReport","OrderDetailsPage","GetOrderWithVehicle","ColorList","MavoVehiclesUserOrders","CountrySupportComponent","newCountrySupport","countrySupports","newCountrySupportId","loadCountrySupports","GetUserCountrySupports","saveCountrySupport","AddCountrySupport","UpdateCountrySupport","newCountrySupportPopup","deleteCountrySupport","RemoveCountrySupport","countrySupportId","GeneralNotification","companyId","DOMPurify","sanitize","notifySupport","GENERAL_NOTIFY_SUPPORT","SendGeneralNotifySupport","NewBillingReport","GetNewBillingReport","PowerBiReportComponent","newPowerBiReport","powerBiReports","newPowerBiReportId","loadPowerBiReports","GetUserPowerBiReports","handleCodeChange","handleWorkspaceIdChange","workspaceId","handleReportIdChange","savePowerBiReport","AddPowerBiReport","UpdatePowerBiReport","newPowerBiReportPopup","deletePowerBiReport","RemovePowerBiReport","powerBiReportId","PowerBiReport","embedToken","setEmbedToken","activity","setActivity","showTransparentScreen","setShowTransparentScreen","waitingForCapacity","setWaitingForCapacity","powerBiService","reportObjRef","getReportEmbedToken","activityDetected","refreshTokenIfNeeded","GetEmbedToken","setAccessToken","expiration","startCapacity","StartCapacity","PowerBIEmbed","embedConfig","embedUrl","tokenType","TokenType","Embed","accessToken","cssClassName","getEmbeddedComponent","embeddedReport","GetCapacityStatus","App","updateMomentLanguage","languageList","cz","pl","nl","sk","updateLocale","dow","doy","handleCloseMessage","reason","renderUserRoutes","Route","exact","UserOrganizationInterfaces","AppUser","MavoAppUsers","WorkflowAdmin","checkState","LoadLanguage","ThemeProvider","LeftSidebar","LoginCallBack","Snackbar","library","far","faSquare","faLifeRing","faCheckCircle","faTimesCircle","faDotCircle","faThumbsUp","faComments","faFolderOpen","faTrashAlt","faFileImage","faFileArchive","faCommentDots","faFolder","faKeyboard","faCalendarAlt","faEnvelope","faAddressCard","faMap","faObjectGroup","faImages","faUser","faLightbulb","faGem","faClock","faUserCircle","faQuestionCircle","faBuilding","faBell","faFileExcel","faFileAudio","faFileVideo","faFileWord","faFilePdf","faFileCode","faFileAlt","faEye","faChartBar","fab","faFacebook","faTwitter","faVuejs","faReact","faHtml5","faGoogle","faInstagram","faPinterest","faYoutube","faDiscord","fas","faAngleDoubleRight","faAngleDoubleLeft","faSmile","faHeart","faBatteryEmpty","faBatteryFull","faChevronRight","faSitemap","faPrint","faMapMarkedAlt","faTachometerAlt","faAlignCenter","faExternalLinkAlt","faShareSquare","faInfoCircle","faSync","faQuoteRight","faStarHalfAlt","faShapes","faCarBattery","faTable","faCubes","faPager","faCameraRetro","faBomb","faNetworkWired","faBusAlt","faBirthdayCake","faEyeDropper","faUnlockAlt","faDownload","faAward","faPlayCircle","faReply","faUpload","faBars","faEllipsisV","faSave","faSlidersH","faCaretRight","faChevronUp","faPlus","faLemon","faChevronLeft","faTimes","faChevronDown","faFilm","faSearch","faEllipsisH","faCog","faArrowsAltH","faPlusCircle","faAngleRight","faAngleUp","faAngleLeft","faAngleDown","faArrowUp","faArrowDown","faArrowRight","faArrowLeft","faStar","faSignOutAlt","faLink","createBrowserHistory","basename","store","appcontext","middleware","thunk","withExtraArgument","routerMiddleware","rootReducer","combineReducers","router","connectRouter","enhancers","windowIfDefined","__REDUX_DEVTOOLS_EXTENSION__","createStore","compose","applyMiddleware","configureStore","AppContext","ReactDOM","Provider","ConnectedRouter","CssBaseline","ScrollToTop","SnackbarProvider","maxSnack","transitionDuration","enter","exit","APP_SET_USER","APP_REMOVE_USER","APP_DISPLAY_MESSAGE","APP_SET_LANGUAGE","APP_LOAD_NOTIFICATION","APP_LOAD_TASKS","APP_LOAD_COMMENTS","APP_REMOVE_TASK","APP_REMOVE_COMMENT","APP_REMOVE_NEW_IN_CASE","APP_MARK_AS_VIEWED_NEW_IN_CASE","APP_REMOVE_NEW_IN_APPOINTMENT","APP_MARK_AS_VIEWED_NEW_IN_APPOINTMENT","APP_SET_NOTIFICATIONS_LOADERS","APP_SET_CURRENCY_RATES","APPUSER_USER_GET_LIST_START","APPUSER_USER_GET_LIST_END","APPUSER_USER_EDIT","RECEIVE_WEATHER_FORECASTS","THEME_SET_SIDEBAR_HOVER","THEME_SET_SIDEBAR_TOGGLE","THEME_SET_SIDEBAR_TOGGLE_MOBILE","CASE_SETTINGS_SET_CASE","CASE_SETTINGS_SET_LOADING","CASE_SETTINGS_SET_CASE_VEHICLE","CASE_SETTINGS_SET_CASE_EVENT","CASE_SETTINGS_SET_CASE_STATUS","CASE_SETTINGS_ADD_CASE_PARTNER","CASE_SETTINGS_SET_CASE_VALUATION","CASE_SETTINGS_SET_CLIENT_DATA","CASE_SETTINGS_SET_VEHICLE_DATA","CASE_SETTINGS_UPDATE_PARAMETERS","CASE_SETTINGS_UPDATE_TARIFF_VALUE","CASE_SETTINGS_SET_CASE_CALCULATION_HISTORY","CASE_SETTINGS_SET_CAR_IN_SERVICE","VEHICLE_SET_VEHICLE","VEHICLE_SET_VEHICLE_STATUS","VEHICLE_RESET_STATE","VEHICLE_SET_VEHICLE_LOADING","MAVO_VEHICLE_SET_VEHICLE","MAVO_VEHICLE_SET_VEHICLE_STATUS","VEHICLE_SET_VEHICLE_AUCTION","AGENDA_SET_SELECTED_APPOINTMENT","defaultChartColors","defaultChartPosition","h","titleOptions","bold","titlePosition","tabNameOptions","tabNamePosition","rectangletextOpts","wrap","cellOpt","sallerTableOptions","valign","autoPage","logos","dimension","recentAcquisitionLogos","recentAcquisitionOptions","salesChannelOptions","rectangleOptions","horizontalChartOptions","valAxisMinVal","catAxisLabelFontSize","valAxisHidden","catAxisLineShow","showValue","dataLabelColor","dataLabelFontSize","barGapWidthPct","chartColors","verticalCharOptions","barDir","chartColorsOpacity","barGrouping","verticalChar2Options","chartArea","plotArea","catAxisLabelFontFace","dataLabelFontFace","dataLabelPosition","showLegend","legendPos","circleChartOptions","dataBorder","firstSliceAng","dataLabelSize","dataLabelFormatCode","scatterChartOptions","lineSize","lineSmooth","catGridLine","catAxisLabelPos","pptData","pptx","addStockStructure","slide","addText","acquisitionMainCard","textOpts","salesTopSeller","_this$pptData$topSell","salesChannel","_this$pptData$salesCh","pos","addImage","addSlide","recentAcquisition","getFilterName","indexMake","getFiltersInfo","_filters$selectedOrga","firstPosition","textPostion","firstSlide","secondSlide","getDataForChart","formatData","dataChart","charData","infoChart","addChart","charts","BAR","valAxisMaxVal","tableFormat","customLabels","sectionTitle","firstCategoryChart","secondCategoryChart","PIE","addCarBox","firstCategoryName","secondCategoryName","LINE","writeFile","pptxgen","baseController","CRUDService","PostAsync","AddOrganizationType","organizationTyoe","types","typeList","minLevelId","GetGtOrganization","GetCurrentOrganization","organizationLevel","DeleteAsync","GetUserOrganizationFilters","organizationFilterType","organizationBankAccount","organizationInterface","organizationParameter","organizationCaseType","orgCaseTypeId","OrganizationCaseTypeStep","orgCaseTypeStepId","GetOrganizationForm","orgForm","UpdateOrganizationForm","GetOrganizationFormActions","orgFormId","AddOrganizationFormAction","organizationFormAction","RemoveOrganizationFormAction","FormData","GetFileAsync","GetUserOrganizationJobTypes","GetUserOrganizationMaintenancePackages","organizationOilViscosity","CupiCodeCorespondenceList","AddCupiCodeCorespondence","cupiCodeCorespondence","UpdateCupiCodeCorespondence","RemoveCupiCodeCorespondence","organizationInvoiceRange","GetCountryBuffer","RemoveSellerData","countrySupport","powerBiReport","GetPowerBiReportByCode","decimalPlaces","CustomRouterLink","flexGrow","RouterLink","SidebarMenuListItem","depth","Icon","redirectTo","openProp","needToken","setOpen","handleToggle","disableGutters","active","Collapse","in","activeClassName","defaultProps","SidebarMenuList","pages","propsContainer","reduceChildRoutes","rights","matchPath","SidebarMenu","__RouterContext","AuthService","UserManager","addUserSignedOut","signoutRedirect","resp","Log","logger","level","INFO","signinRedirect","signinSilent","id_token","expired","controller","itemController","baseAdminController","userUserRole","roleClaim","claimId","cache","referencial","GetUserWorkflow","GetWorkflowSettings","GetUserWorkflowParameters","workflowParameter","workflowOrgType","UpdateWorkflowOptimization","GetUserWorkflowTariffs","workflowTariff","GetWorkflowSteps","workflowSectionStepForm","workflowSectionStepCaseStatus","AddWorkflowSupplier","workflowSupplier","workflowReminder","workflowFormInterface","workflowPermission","workflowReport","workflowSectionStepFormAction","workflowSectionStepFormActions","workflowInterface","UpdateWorkflowCostCenter","workflowCostCenter","GetWorkflowSupplierDiscounts","AddWorkflowSupplierDiscount","workflowSupplierDiscount","AddWorkflowSupplierDiscounts","workflowSupplierDiscounts","UpdateWorkflowSupplierDiscount","RemoveWorkflowSupplierDiscount","instance","baseURL","withCredentials","interceptors","use","headers","getItem","_error$response","GetHeaders","responseType","PostFileAsync","post","Post2WithCancelAsync","cancelToken","put","Accept","Authorization","translatorSrv","authSrv","weatherForecastsService","GetWeather","appUserAdminService","tarriffId","GetUserTariff","tarriffIds","idLIst","groupId","AddTariffValues","idsList","typeId","advertiserCodes","_cost$currency","invoiceRange","exchangeRate","financialParameterInfo","ChangeMavoVehicleStatus","mavoVoInvoiceFilters","alcorParameterInfo","mavoAuctionAdminFilters","ObtainResults","RefreshStatus","userInteracted","GetValuationVehicles","calculationFormId","valuationVehiclesInfoRequest","VehicleId","optionsId","calculationRequest","caseFilters","brandsRef","brands","GetCaseEntity","assignedUser","orgOwner","noticeId","UpdateCase","GetCarModels","casePayment","GetAllCaseStatusHistory","AddCaseStatusHistory","AddCasePartnerHistory","casePartnerHistory","GetCaseTariffValueHistory","caseTariffValueHistory","mostRecentCaseTariffValues","tariffValuesForTariffGroupType","mostRecentTariffValuesDate","AddCaseTariffValueHistory","AddCaseCalculationPart","caseCalculationPart","UpdateCaseCalculationPart","isUpdate","RemoveCaseCalculationPart","assigned","partNUmber","organizationIdParam","encodeURIComponent","partNumber","caseCalculationHistId","moveToTasks","addtask","GetCarExceptions","AddCarException","carException","UpdateCarException","RemoveCarException","CarExceptionSearch","classId","billingFilters","dgpciBillingFilters","PrcClaimService","CalculationDifferences","PrcClaimServiceCalculation","PrcClaimStatus","PrcClaimServiceAlternativeCalculation","maintenanceCupiOptionalPart","vehicleDetails","maintenanceProducer","appoitmentFilters","appointmentStatusHistId","gtWsBillingFilters","nonStockBillingFilters","GenerateSmartBillInvoice","SendAlternativeCalculation","isSupportTab","gtService","dashboardService","GetDashboardOriginalCalc","Filters","GetDashboardAlternativeCalc","GetDashboardVinIdentifiersNumber","GetDashboardGTEstimateNumber","GetDashboardPiecesOrdersNumber","GetDashboardTotalCases","GetDashboardCostsStructure","closedCases","openedCases","GetDashboardCostOptimization","GetDashboardCasesAnalsysChartCaseOwner","GetDashboardCasesAnalsysChartCaseType","GetDashboardCasesAnalsysChartCaseStatus","GetDashboardCostStructureChartCaseOwner","GetDashboardCostStructureChartCostType","GetDashboardCostStructureChartVehicleBrand","GetDashboardCostOptimizationChartCaseOwner","GetDashboardCostOptimizationChartCostType","GetDashboardCostOptimizationChartVehicleBrand","GetDashboardNewCases","GetDashboardUpdatedCases","GetDashboardWaitingCases","GetDashboardFilters","casePartnerIds","caseStatusIds","orderFilter","withParts","ordId","orderStatusChangeRequestDto","_orderStatusChangeReq","_orderStatusChangeReq2","orderPartsFilters","DeleteCasePartTobeOrdered","createContext","cookienName","transRO","transEN","safetyLanguages","transNL","transPL","localStorageLanguages","defaultLanguage","dependencies","pKey","pKey2","keyF","limit","defaulValue","languagesCopy","transArray","cookie","getCookie","cname","decodeURIComponent","setCookie","cvalue","domain","sidebarMenuContent","navItems","iOS","browser","navigator","userAgent","SwipeableDrawer","sx","anchor","onOpen","disableBackdropTransition","disableDiscovery","BackdropProps","invisible","disableSwipeToOpen","SidebarHeader","SidebarUserbox","wheelPropagation"],"mappings":"kHAAA,0iGAEO,MAAMA,EAAiB,CAC5BC,cAAe,gBACfC,MAAO,QACPC,WAAY,cACZC,eAAgB,mBAChBC,kBAA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CAAC5kM,MAAOpmB,IACpBjpC,gBAACk0P,GAAW,KACVl0P,gBAACouB,IAAM,KACLpuB,gBAACyzP,IAAK,CAACnjO,KAAK,kBAAkBP,UAAWxH,IACzCvoB,gBAACyzP,IAAK,CAACnjO,KAAK,YAAYP,UAAWokO,IACnCn0P,gBAACyzP,IAAK,CAACnjO,KAAK,iBAAiBP,UAAW/E,KACvC3O,KAAKm3O,oBAGRxzP,gBAACo0P,KAAQ,CACP5rN,KAAMnsB,KAAKiG,MAAMjhB,YACjBgY,iBAAkB,KAClBkvB,QAASlsB,KAAKi3O,sBAKxB,EAzUIV,GAIGttO,YAAcC,IAwURC,oBAASxH,GAA4BA,EAAMxJ,KAAKqD,IAAhD2N,CAAmE2E,YAAayoO,K,WCpahF9sO,oBAZKjmB,IAA2C,IAA1C,SAAE+vB,EAAU/uB,UAAU,SAAE4hB,IAAY5iB,EASvD,OARAotC,qBAAU,KACRrsC,OAAO+rL,SAAS,CACdr8I,IAAK,EACLpB,KAAM,EACNukF,SAAU,UACV,GACD,CAAChxG,IAEGmN,GAAY,IAAI,I,wDC6HzBykO,KAAQpwM,IACNqwM,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,MAEFtC,KAAQpwM,IACN2yM,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,MAEFjD,KAAQpwM,IACNszM,MACAC,KACAC,KACAC,MACAC,KACAC,KACAC,KACAC,KACAC,MACAC,KACAC,KACAC,MACAC,KACAC,KACAC,KACAC,KACAC,MACAC,KACAC,MACAC,KACAC,KACAC,MACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,KACAC,MACAC,KACAC,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ASA,KACPjmB,EAAMzO,SAAS0G,IAAoBG,wBAAuB,GAAO,EAEnE69P,OAAQA,KACNj2P,EAAMzO,SAAS0G,IAAoBG,wBAAuB,GAAM,EAElE89P,2BAA4BR,EAC5BS,iBAAkBT,EAClBU,cAAe,CAAEC,WAAW,GAC5BC,oBAAoB,GAEpB54Q,IAAAC,cAAC44Q,IAAa,MACd74Q,IAAAC,cAAC0mB,IAAgB,KACd3mB,IAAAC,cAAC64Q,IAAc,CAAC7O,eAAgB3nP,IAChCw1P,KAMP93Q,IAAAC,cAACsuC,IAAM,CAAC+sB,QAAM,GACZt7D,IAAAC,cAAC+6D,IAEC,CACAz6D,UAAWyrC,YAAK,sBAAuB,CACrC,4BAA6B3pC,EAC7B,2BAA4BC,EAC5B,4BAA6BH,IAE/B05D,QAAM,EACNrzB,KAAMnmC,EACN0mC,UAAW7mC,EAAgB,GAAK,GAEhClC,IAAAC,cAAC44Q,IAAa,MACd74Q,IAAAC,cAAA,OACEM,UAAWyrC,YAAK,CACd,mBAAoB7pC,EACpB,wBAAyBE,IAAkBC,KAG7CtC,IAAAC,cAAC0mB,IAAgB,CAACkH,QAAS,CAAEkrP,kBAAkB,IAC1B,OAAlBxkQ,EAASpT,KAAgBnB,IAAAC,cAAC64Q,IAAc,CAAC7O,eAAgB3nP,IAAW,KACpEw1P,MAMA,G","file":"static/js/main.f08e4073.chunk.js","sourcesContent":["import Referentials from './Referentials.json';\r\n\r\nexport const RoleClaimsEnum = {\r\n Administrator: 'Administrator',\r\n Admin: 'ADMIN',\r\n AdminUsers: 'ADMIN_USERS',\r\n AdminValueList: 'ADMIN_VALUELISTS',\r\n AdminOrganization: 'ADMIN_ORGANIZATION',\r\n SAMPLEPAGEV3: 'SAMPLEPAGEV3',\r\n Agenda: 'AGENDA',\r\n Dashboard: 'DASHBOARD',\r\n Evaluation: 'EVALUATION',\r\n NewCase: 'NEW_CASE',\r\n Home: 'HOME',\r\n Case: 'CASE',\r\n Order: 'ORDER',\r\n Vehicle: 'VEHICLE',\r\n Settings: 'SETTINGS',\r\n ManagerExport: 'MANAGER_EXPORT',\r\n MavoVehicle: 'MAVO_VEHICLE',\r\n MavoAgent: 'MAVO_AGENT',\r\n MavoAdministrator: 'MAVO_ADMINISTRATOR',\r\n MavoContab: 'MAVO_CONTAB',\r\n AdminCountryOrganization: 'ADMIN_COUNTRY_ORGANIZATION',\r\n AdminService: 'ADMIN_SERVICE',\r\n VehicleSearch: 'VEHICLE_SEARCH',\r\n Supplier: 'SUPPLIER',\r\n AdminSupport: 'ADMIN_SUPPORT',\r\n PowerBi: 'POWERBI',\r\n OwnerAdmin: 'OWNER_ADMIN'\r\n};\r\n\r\nexport const OrganizationTypeCode = {\r\n GT: 'GT',\r\n SUPPLIER: 'FRZ',\r\n LEASING: 'LEA',\r\n REP: 'REP'\r\n};\r\n\r\nexport const OrganizationLevelTypeCode = {\r\n HO: 'HO',\r\n COST: 'COST'\r\n};\r\n\r\nexport const TariffCategoryCode = {\r\n REP: 'REP'\r\n};\r\n\r\nexport const WorkflowFormActionTypeCode = {\r\n STATUS_TRANSITION: 'TRAN_ST',\r\n CASE_ALLOCATION: 'CS_ALLOC',\r\n SEND_MAIL: 'SD_MAIL'\r\n};\r\n\r\nexport const CommentTypeCode = {\r\n PUBLIC: 'Public',\r\n PRIVATE: 'Private',\r\n INTERNAL: 'Internal',\r\n SUPPORT_REQUEST: 'SUPPORT_REQUEST',\r\n SUPPORT_RESPONSE: 'SUPPORT_RESPONSE'\r\n};\r\n\r\nexport const AttachmentTypeCode = {\r\n RCA: 'RCA',\r\n VIC: 'VIC',\r\n ID: 'ID',\r\n DL: 'DL',\r\n IMG: 'IMG',\r\n OTHER: 'OTHER',\r\n CONTRACT: 'CONTRACT',\r\n MAIN_VEHICLE_PHOTO: '104',\r\n MANUAL_UTILIZARE: 'MANUAL_UTILIZARE',\r\n WORK_ORDER: 'WORK_ORDER',\r\n HAND_OVER: 'HAND_OVER',\r\n INVOICE_REPAIR: 'INVOICE_REPAIR',\r\n LEFT_SIDE_FRONT: '104'\r\n};\r\n\r\nexport const VehicleAttachmentTypeCodeOrder = ['104','199','105','108','106', '102'];\r\n\r\nexport const PurchaseOriginCode = {\r\n NC: '01'\r\n};\r\n\r\nexport const ParametreCode = {\r\n TVA: 'TVA',\r\n CURRENCY: 'CUR'\r\n};\r\nexport const CalculationTypeCode = {\r\n ORG: 'ORG',\r\n ALT: 'ALT'\r\n};\r\nexport const CaseStatusTypeCode = {\r\n DRAFT: 'DRAFT'\r\n};\r\n\r\nexport const CarPartQualityTypeCode = {\r\n OE: 'OE',\r\n OEM: 'OEM',\r\n AM: 'AM'\r\n};\r\n\r\nexport const CarPartQualityRatings = [\r\n {\r\n CarPartQualityTypeCode: CarPartQualityTypeCode.OE,\r\n Rating: 3\r\n },\r\n {\r\n CarPartQualityTypeCode: CarPartQualityTypeCode.OEM,\r\n Rating: 2\r\n },\r\n {\r\n CarPartQualityTypeCode: CarPartQualityTypeCode.AM,\r\n Rating: 1\r\n }\r\n];\r\n\r\nexport const ReportTypeCode = {\r\n ESTIMATE_OE: 'DEVIZ_OE',\r\n RENAULT_OFFER: 'RENAULT_OFFER',\r\n RENAULT_INVOICE: 'RENAULT_INVOICE',\r\n RENAULT_CONTRACT: 'RENAULT_CONTRACT',\r\n ADVERT_REPORT: 'ADVERT_REPORT',\r\n DEVIZ_AUTOWORLD: 'DEVIZ_AUTOWORLD',\r\n DEVIZ_CLIENT: 'DEVIZ_CLIENT',\r\n RENAULT_AVIZ_PLATA: 'RENAULT_AVIZ_PLATA',\r\n RENAULT_FACTURA_LIVRARE: 'RENAULT_FACTURA_LIVRARE',\r\n DEVIZ_ALT: 'DEVIZ_ALT',\r\n FISA_EVALUARE_MASINA: 'FISA_EVALUARE_MASINA',\r\n WORK_ORDER: 'WORK_ORDER',\r\n HAND_OVER: 'HAND_OVER',\r\n DEVIZ_REPARATIE: 'DEVIZ_REPARATIE',\r\n DEVIZ_ALT_PRC: 'DEVIZ_ALT_PRC',\r\n DEVIZ_REP_AP: 'DEVIZ_REP_AP',\r\n DEVIZ_REP_OFERTA : 'DEVIZ_REP_OFERTA'\r\n};\r\n\r\nexport const InsuredTypeCode = {\r\n PF: 'PF',\r\n PJ: 'PJ'\r\n};\r\nexport const OrderStatusCode = {\r\n REP_DRAFT: 'REP_DRAFT',\r\n REP_LIVRATA: 'REP_LIVRATA',\r\n REP_PLASATA: 'REP_PLASATA',\r\n REP_ANULATA: 'REP_ANULATA',\r\n FZR_IN_LIVRARE: 'FZR_IN_LIVRARE',\r\n FZR_ACCEPTATA: 'FZR_ACCEPTATA',\r\n FZR_REFUZATA: 'FZR_REFUZATA',\r\n FZR_LIVRATA: 'FZR_LIVRATA',\r\n FZR_COMANDA_CONFIRMATA: 'FZR_COMANDA_CONFIRMATA',\r\n FZR_VERIFICARE_LA_FURNIZOR: 'FZR_VERIFICARE_LA_FURNIZOR',\r\n REP_VERIFICATA_DE_FURNIZOR: 'REP_VERIFICATA_DE_FURNIZOR',\r\n REP_REINTEROGATED_PARTS: 'REP_REINTEROGATED_PARTS'\r\n};\r\n\r\nexport const WorflowEditableReport = {\r\n FISA_EVALUARE_MASINA: 'FISA_EVALUARE_MASINA',\r\n PROCES_VERBAL_PREDARE_PRIMIRE: 'PROCES_VERBAL_PREDARE_PRIMIRE'\r\n};\r\nexport const OrderPartStatus = {\r\n UNAVAILABLE: 'NU_DISP',\r\n PROCESSED: 'PRC',\r\n PROCESSING: 'IN_PRC',\r\n UNORDERED: 'NEC',\r\n ORDERED: 'ACT',\r\n RETURNED: 'RET',\r\n OUT_OF_STOCK: 'LIPSA_STOC',\r\n MODIFICATA_DE_FURNIZOR: 'MODIFICATA_DE_FURNIZOR',\r\n PIESA_SELECTATA: 'PIESA_SELECTATA'\r\n};\r\n\r\nexport const CalculationSectionCodeEnum = {\r\n PART: 'PART',\r\n LABOR: 'LABOR',\r\n PAINT: 'PAINT',\r\n PAINT_LABOR: 'PAINT_LABOR'\r\n};\r\n\r\nexport const OrderStatusTypesCode = {\r\n FZR: 'FZR_',\r\n REP: 'REP_'\r\n};\r\n\r\nexport const OfferTypeCode = {\r\n SELL: 'SELL',\r\n BUY: 'BUY'\r\n};\r\n\r\nexport const CurrencyCode = {\r\n EUR: 'EUR',\r\n RON: 'RON',\r\n USD: 'USD',\r\n CHF: 'CHF'\r\n};\r\n\r\nexport const ReferentialCode = {\r\n OrganizationType: 'OrganizationType',\r\n OrganizationLevel: 'OrganizationLevel',\r\n CompanyParameter: 'CompanyParameter',\r\n Currency: 'Currency',\r\n Country: 'Country',\r\n Region: 'Region',\r\n City: 'City',\r\n TariffCategory: 'TariffCategory',\r\n TariffTypeGroup: 'TariffTypeGroup',\r\n Insurer: 'Insurer',\r\n CarBrands: 'CarBrands',\r\n CaseType: 'CaseType',\r\n NewCaseSteps: 'NewCaseSteps',\r\n OptimizationType: 'OptimizationType',\r\n Section: 'Section',\r\n AttachmentType: 'AttachmentType',\r\n CaseStatus: 'CaseStatus',\r\n WorkflowSteps: 'WorkflowStep',\r\n EmailRecipientType: 'EmailRecipientType',\r\n CarPartCategory: 'CarPartCategory',\r\n Report: 'Report',\r\n ActionType: 'ActionType',\r\n UserRole: 'UserRole',\r\n CalculationType: 'CalculationType',\r\n CarCategory: 'CarCategory',\r\n CarClass: 'CarClass',\r\n PolicyType: 'PolicyType',\r\n PersonType: 'PersonType',\r\n SolutionValue: 'SolutionValue',\r\n OrderStatus: 'OrderStatus',\r\n OrderPartStatus: 'OrderPartStatus',\r\n FilterType: 'FilterType',\r\n PaymentType: 'PaymentType',\r\n PaymentRequestNo: 'PaymentRequestNo',\r\n VehicleMake: 'Make',\r\n BodyType: 'BodyType',\r\n WheelsType: 'WheelsType',\r\n TractionType: 'TractionType',\r\n TransmissionType: 'TransmissionType',\r\n FuelType: 'FuelType',\r\n TiresType: 'TiresType',\r\n PaintType: 'PaintType',\r\n VehicleCondition: 'VehicleCondition',\r\n PollutionNorm: 'PollutionNorm',\r\n GuaranteeType: 'GuaranteeType',\r\n OfferTye: 'OfferType',\r\n AdvertRegion: 'AdvertRegion',\r\n AdvertCity: 'AdvertCity',\r\n QCItemCategory: 'QCItemCategory',\r\n QCItem: 'QCItem',\r\n VehicleStatus: 'VehicleStatus',\r\n Advertiser: 'Advertiser',\r\n Model: 'Model',\r\n Color: 'Color',\r\n AdvertDistrict: 'AdvertDistrict',\r\n Bank: 'Bank',\r\n CountryOrigin: 'CountryOrigin',\r\n Version: 'Version',\r\n BodyConditionType: 'BodyConditionType',\r\n WheelConditionType: 'WheelConditionType',\r\n InvoiceRangeType: 'InvoiceRangeType',\r\n InvoiceRangeStatus: 'InvoiceRangeStatus',\r\n FinancialParameter: 'FinancialParameter',\r\n VehicleType: 'VehicleType',\r\n MvoDvBattyp: 'MvoDvBattyp',\r\n PurchaseOrigin: 'PurchaseOrigin',\r\n SaleChannel: 'SaleChannel',\r\n MaintenanceOptionalPartName: 'MaintenanceOptionalPartName',\r\n Refurbished: 'Refurbished',\r\n VehicleAttachmentType: 'VehicleAttachmentType',\r\n AlcorParameter: 'AlcorParameter',\r\n JobType: 'JobType',\r\n MaintenanceOption: 'MaintenanceOption',\r\n MaintenancePackage: 'MaintenancePackage',\r\n OilViscosity: 'OilViscosity',\r\n CostCenter: 'CostCenter',\r\n AppointmentCategoryType: 'AppointmentCategoryType',\r\n ColorRCR: 'ColorRCR',\r\n BodyTypeRCR: 'BodyTypeRCR',\r\n EInvoiceStatus: 'EInvoiceStatus',\r\n BodyCondition: 'BodyCondition',\r\n InterventionType: 'InterventionType',\r\n LeaseProvider: 'LeaseProvider',\r\n LeaseProviderCategory: 'LeaseProviderCategory',\r\n};\r\n\r\nexport const ImportAlternativePartsFileHeader = {\r\n H1: 'COD_ORIGINALA',\r\n H2: 'COD_ALTERNATIVA',\r\n H3: 'NUME_ALTERNATIVA',\r\n H4: 'PRET_UNITAR_ALTERNATIVA',\r\n H5: 'CALITATE_ALTERNATIVA',\r\n H6: 'PRODUCATOR',\r\n H7: 'FURNIZOR',\r\n H8: 'TIMP_LIVRARE',\r\n H9: 'CANTITATE_DISPONIBILA',\r\n H10: 'LOCATIE_STOC',\r\n H11: 'OBSERVATII'\r\n};\r\n\r\nexport const ImportOriginalPartsFileHeader = {\r\n H1: 'COD_ORIGINALA',\r\n H2: 'NUME_ORIGINALA',\r\n H3: 'PRET_UNITAR_ORIGINALA',\r\n H4: 'CALITATE_ORIGINALA',\r\n H5: 'UNITATI_ORIGINALA'\r\n};\r\n\r\nexport const ImportCalculationOriginalPartsFileHeader = {\r\n H1: 'COD',\r\n H2: 'NUME',\r\n H3: 'PRET_UNITAR',\r\n H4: 'CALITATE',\r\n H5: 'UNITATI',\r\n H6: 'DISCOUNT',\r\n H7: 'FURNIZOR',\r\n H8: 'TIMP_LIVRARE',\r\n H9: 'PRODUCATOR',\r\n H10: 'OBSERVATII'\r\n};\r\n\r\nexport const ValuationLaguageId = {\r\n en: 19,\r\n ro: 55\r\n};\r\n\r\nexport class Constants {\r\n public static stsAuthority = process.env.REACT_APP_IDENTITY_URL;\r\n public static clientId = 'ClaimBoxSPA';\r\n public static clientRoot = process.env.REACT_APP_APP_ROOT;\r\n public static clientScope =\r\n 'openid profile ApiGateway TariffService OrganizationService CaseService WorkflowService roles AdministratorClientId_api VehicleService';\r\n public static apiRoot = process.env.REACT_APP_API_ENDPOINT;\r\n}\r\n\r\nexport const ClientSettings = {\r\n authority: Constants.stsAuthority,\r\n client_id: Constants.clientId,\r\n redirect_uri: `${Constants.clientRoot}callback`,\r\n silent_redirect_uri: `${Constants.clientRoot}renewcallback`,\r\n post_logout_redirect_uri: `${Constants.clientRoot}`,\r\n response_type: 'code',\r\n scope: Constants.clientScope,\r\n automaticSilentRenew: true\r\n};\r\n\r\nexport const CarDetailsSettings = {\r\n numberOfKm: 1000000\r\n};\r\n\r\nexport const VehicleAdvertOperationTypes = {\r\n publish: 'Publish',\r\n delete: 'Delete'\r\n};\r\n\r\nexport const RefConstants = {\r\n vehicleMakeRef: Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.VehicleMake\r\n ),\r\n bodyTypeRef: Referentials.referential.find((item) => item.code === ReferentialCode.BodyType),\r\n wheelsTypeRef: Referentials.referential.find((item) => item.code === ReferentialCode.WheelsType),\r\n tractionTypeRef: Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.TractionType\r\n ),\r\n transmissionTypeRef: Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.TransmissionType\r\n ),\r\n fuelTypeRef: Referentials.referential.find((item) => item.code === ReferentialCode.FuelType),\r\n tiresTypeRef: Referentials.referential.find((item) => item.code === ReferentialCode.TiresType),\r\n paintTypeRef: Referentials.referential.find((item) => item.code === ReferentialCode.PaintType),\r\n vehicleConditionRef: Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.VehicleCondition\r\n ),\r\n pollutionNormRef: Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.PollutionNorm\r\n ),\r\n modelRef: Referentials.referential.find((item) => item.code === ReferentialCode.Model),\r\n colorRef: Referentials.referential.find((item) => item.code === ReferentialCode.Color),\r\n personTypeRef: Referentials.referential.find((item) => item.code === ReferentialCode.PersonType),\r\n attachementTypeRef: Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.AttachmentType\r\n ),\r\n regionRef: Referentials.referential.find((item) => item.code === ReferentialCode.AdvertRegion),\r\n cityRef: Referentials.referential.find((item) => item.code === ReferentialCode.AdvertCity),\r\n advertiserRef: Referentials.referential.find((item) => item.code === ReferentialCode.Advertiser),\r\n districtRef: Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.AdvertDistrict\r\n ),\r\n bankRef: Referentials.referential.find((item) => item.code === ReferentialCode.Bank),\r\n countryOriginRef: Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.CountryOrigin\r\n ),\r\n invoiceRangeTypeRef: Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.InvoiceRangeType\r\n ),\r\n invoiceRangeStatusRef: Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.InvoiceRangeStatus\r\n ),\r\n currencyRef: Referentials.referential.find((item) => item.code === ReferentialCode.Currency),\r\n financialParameterRef: Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.FinancialParameter\r\n ),\r\n vehicleTypeRef: Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.VehicleType\r\n ),\r\n mvoDvBattypRef: Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.MvoDvBattyp\r\n ),\r\n refurbishedRef: Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.Refurbished\r\n ),\r\n versionRef: Referentials.referential.find((item) => item.code === ReferentialCode.Version),\r\n vehicleAttachmentTypeRef: Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.VehicleAttachmentType\r\n ),\r\n alcorParameterRef: Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.AlcorParameter\r\n ),\r\n guaranteeTypeRef: Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.GuaranteeType\r\n ),\r\n colorRCRRef: Referentials.referential.find((item) => item.code === ReferentialCode.ColorRCR),\r\n bodyTypeRCRRef: Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.BodyTypeRCR\r\n ),\r\n bodyConditionRef: Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.BodyCondition\r\n ),\r\n eInvoiceRef: Referentials.referential.find(\r\n (item) => item.code == ReferentialCode.EInvoiceStatus\r\n )\r\n};\r\n\r\nexport enum VehicleStatusCodeEnum {\r\n Available = 1,\r\n Sold = 2,\r\n Repair = 3,\r\n Reserved = 4,\r\n Aquisition = 5,\r\n AcquisitionRefused = 6,\r\n ForSale = 7,\r\n LICITATIE = 8,\r\n INDISPONIBIL = 9,\r\n COMANDA = 10,\r\n AVIZ = 11,\r\n FACTURAT = 12,\r\n REZERVAT = 13\r\n}\r\n\r\nexport enum CaseStatusCodeEnum {\r\n Closed = 2,\r\n OF_VANZ = 47,\r\n OE = 'OE',\r\n AM = 'AM',\r\n COM_PI = 'COM_PI',\r\n PRELUAT_SERVICE = 'PRELUAT_SERVICE',\r\n SOLICITARE_APROBARE_DEVIZ = 'SOLICITARE_APROBARE_DEVIZ',\r\n REFUZAT_PRC = 'REFUZAT_PRC',\r\n COMANDA_ATM = 'COMANDA_ATM',\r\n INITIATED = 'INITIATED',\r\n IN_ANALIZA = 'IN_ANALIZA',\r\n WORK_ORDER_GENERATED = 'WORK_ORDER_GENERATED',\r\n ACTUALIZARE_DEVIZ = 'ACTUALIZARE_DEVIZ',\r\n PROGRAMARE_REPARATIE_CONFIRMATA = 'PROGRAMARE_REPARATIE_CONFIRMATA',\r\n SOLICITA_MODIFICARE_DEVIZ = 'SOLICITA_MODIFICARE_DEVIZ',\r\n ACTUALIZEAZA_CALCULATIE = 'ACTUALIZEAZA_CALCULATIE',\r\n WAITING_FOR_BILLING_DATA = 'WAITING_FOR_BILLING_DATA',\r\n CAR_LEAVE_WORKSHOP = 'CAR_LEAVE_WORKSHOP',\r\n COMANDA_PIESE_NON_STOC = 'COMANDA_PIESE_NON_STOC',\r\n SUPLIMENTARE_PIESE = 'SUPLIMENTARE_PIESE',\r\n pse_com\t= 'pse_com',\r\n INTEROGARE_PIESE_NON_STOC = 'INTEROGARE_PIESE_NON_STOC'\r\n}\r\n\r\nexport enum GuaranteeTypeEnum {\r\n FG = 'FG'\r\n}\r\n\r\nexport enum CaseTypeCode {\r\n AQUISITION = 'ACHIZITIE',\r\n SALE = 'VANZARE',\r\n CLAIM = 'CLAIM',\r\n REP = 'REP',\r\n OFFER = 'OFFER',\r\n Avizare = 'Avizare',\r\n OMV = 'OMV'\r\n}\r\n\r\nexport enum CaseStatusCode {\r\n DATE_CLIENT = 'DATE_CLIENT'\r\n}\r\n\r\nexport const allowedVehicleStatuses = new Map([\r\n [VehicleStatusCodeEnum.Aquisition, []],\r\n [VehicleStatusCodeEnum.Available, [VehicleStatusCodeEnum.Repair, VehicleStatusCodeEnum.Reserved]],\r\n [VehicleStatusCodeEnum.ForSale, []],\r\n [VehicleStatusCodeEnum.Repair, [VehicleStatusCodeEnum.Available]],\r\n [VehicleStatusCodeEnum.Reserved, [VehicleStatusCodeEnum.Available]],\r\n [VehicleStatusCodeEnum.Sold, []],\r\n [VehicleStatusCodeEnum.AcquisitionRefused, []]\r\n]);\r\n\r\nexport enum SupplierApiType {\r\n GetParts = 1,\r\n Comenzi = 2\r\n}\r\n\r\nexport type Descripted = {\r\n [K in keyof T]: {\r\n readonly id: T[K];\r\n readonly description: string;\r\n };\r\n}[keyof T];\r\n\r\nexport function enumToDescriptedArray(enumeration: T): Descripted[] {\r\n return (Object.keys(enumeration) as Array)\r\n .filter((key) => isNaN(Number(key)))\r\n .filter((key) => typeof enumeration[key] === 'number' || typeof enumeration[key] === 'string')\r\n .map((key) => ({\r\n id: enumeration[key],\r\n description: String(key)\r\n }));\r\n}\r\n\r\nexport const AlternativeCode = {\r\n TAXAMEDIU: 'TAXAMEDIU'\r\n};\r\n\r\nexport const SupplierCode = {\r\n AUGSBURG: 'Augsburg',\r\n AUTONET: 'Autonet',\r\n ADTOTAL: 'AD Autototal',\r\n MATEROM: 'Materom',\r\n CONEX: 'Conex',\r\n EUROEST: 'Euroest',\r\n LKQ: 'LKQ',\r\n NESTE: 'Neste'\r\n};\r\n\r\nexport const AdditionalInfoCode = {\r\n PRODUS_NU_POATE_FI_RETURNAT: 'Acest produs nu poate fi returnat'\r\n};\r\n\r\nexport const EventDetailsFieldsCode = {\r\n CASENUMBER: 'caseNumber'\r\n};\r\n\r\nexport enum UploadSizeLimit {\r\n SizeLimit = 524288000,\r\n RenaultSelectionPhotoSizeLimit = 5242880\r\n}\r\n\r\nexport enum GTErrorCode {\r\n THE_VIN_NUMBER_SENT_DOES_NOT_DECODE_ANY_MODEL = '9'\r\n}\r\n\r\nexport enum LanguageCode {\r\n RO = 'ro',\r\n EN = 'en',\r\n CZ = 'cz'\r\n}\r\n\r\nexport enum FuelTypeEnum {\r\n E = 'E'\r\n}\r\n\r\nexport const allowedMavoVehicleStatuses = new Map([\r\n [\r\n VehicleStatusCodeEnum.INDISPONIBIL,\r\n [\r\n VehicleStatusCodeEnum.LICITATIE,\r\n VehicleStatusCodeEnum.COMANDA,\r\n VehicleStatusCodeEnum.AVIZ,\r\n VehicleStatusCodeEnum.FACTURAT\r\n ]\r\n ],\r\n [\r\n VehicleStatusCodeEnum.LICITATIE,\r\n [\r\n VehicleStatusCodeEnum.INDISPONIBIL,\r\n VehicleStatusCodeEnum.COMANDA,\r\n VehicleStatusCodeEnum.AVIZ,\r\n VehicleStatusCodeEnum.FACTURAT\r\n ]\r\n ],\r\n [\r\n VehicleStatusCodeEnum.COMANDA,\r\n [\r\n VehicleStatusCodeEnum.INDISPONIBIL,\r\n VehicleStatusCodeEnum.LICITATIE,\r\n VehicleStatusCodeEnum.AVIZ,\r\n VehicleStatusCodeEnum.FACTURAT\r\n ]\r\n ],\r\n [\r\n VehicleStatusCodeEnum.AVIZ,\r\n [\r\n VehicleStatusCodeEnum.INDISPONIBIL,\r\n VehicleStatusCodeEnum.LICITATIE,\r\n VehicleStatusCodeEnum.COMANDA,\r\n VehicleStatusCodeEnum.FACTURAT\r\n ]\r\n ],\r\n [\r\n VehicleStatusCodeEnum.FACTURAT,\r\n [\r\n VehicleStatusCodeEnum.INDISPONIBIL,\r\n VehicleStatusCodeEnum.LICITATIE,\r\n VehicleStatusCodeEnum.COMANDA,\r\n VehicleStatusCodeEnum.AVIZ\r\n ]\r\n ]\r\n]);\r\n\r\nexport enum MavoVehicleStatusCodeEnum {\r\n INDISPONIBIL = 'INDISPONIBIL',\r\n LICITATIE = 'LICITATIE',\r\n COMANDA = 'COMANDA',\r\n AVIZ = 'AVIZ',\r\n FACTURAT = 'FACTURAT'\r\n}\r\n\r\nexport enum MavoVehicleProvenanceType {\r\n RCI = 'RCI',\r\n DVS = 'DVS'\r\n}\r\n\r\nexport const mavoVehiclesForNirEnabled: string[] = [MavoVehicleStatusCodeEnum.INDISPONIBIL];\r\nexport const mavoVehicleStatuses = [\r\n VehicleStatusCodeEnum.INDISPONIBIL,\r\n VehicleStatusCodeEnum.LICITATIE,\r\n VehicleStatusCodeEnum.COMANDA,\r\n VehicleStatusCodeEnum.AVIZ,\r\n VehicleStatusCodeEnum.FACTURAT\r\n];\r\n\r\nexport enum MavoVehicelAttachementTypeCodeEnum {\r\n IMG = 'IMG',\r\n OTHER = 'OTHER'\r\n}\r\n\r\nexport enum MavoImageUploadSizeLimit {\r\n MaxSizeKB = 1024\r\n}\r\n\r\nexport const disabledNewMavoVehicleStatuses: string[] = [\r\n MavoVehicleStatusCodeEnum.LICITATIE,\r\n MavoVehicleStatusCodeEnum.COMANDA,\r\n MavoVehicleStatusCodeEnum.AVIZ,\r\n MavoVehicleStatusCodeEnum.FACTURAT\r\n];\r\nexport const enabledVinMavoVehicleStatuses: string[] = [MavoVehicleStatusCodeEnum.INDISPONIBIL];\r\nexport const disabledMavoVehicleStatuses: string[] = [\r\n MavoVehicleStatusCodeEnum.COMANDA,\r\n MavoVehicleStatusCodeEnum.AVIZ,\r\n MavoVehicleStatusCodeEnum.FACTURAT\r\n];\r\n\r\nexport enum MakeExceptionEnum {\r\n FIAT = 'FIAT',\r\n ALFA = 'ALFA ROMEO',\r\n LANCIA = 'LANCIA'\r\n}\r\n\r\nexport const MakeException = [\r\n MakeExceptionEnum.FIAT.toString(),\r\n MakeExceptionEnum.ALFA.toString(),\r\n MakeExceptionEnum.LANCIA.toString()\r\n];\r\nexport const RenaultGoldList = ['06', '05', '04'];\r\n\r\nexport enum MavoPersonTypeEnum {\r\n PF = 2,\r\n PJ = 1\r\n}\r\n\r\nexport enum MavoOrderStatusCodeEnum {\r\n TRANSMIS = 'TRANSMIS',\r\n CONFIRMAT = 'CONFIRMAT'\r\n}\r\n\r\nexport enum MavoVehicleInvoiceStatusEnum {\r\n VALIDA = 'VALIDA',\r\n STORNO = 'STORNO',\r\n STORNATA = 'STORNATA'\r\n}\r\n\r\nexport const OriginalPartShortNumberException = ['G0600', 'G1401', 'G2205', 'HG060'];\r\n\r\nexport enum AppointmentStatusCodeEnum {\r\n CONFIRMED = 'CONFIRMED',\r\n INITIATA = 'INITIATA',\r\n RESCHEDULED = 'RESCHEDULED',\r\n CANCELED = 'CANCELED'\r\n}\r\n\r\nexport enum InvoiceRangeCodeEnum {\r\n FACTURA_REPARATIE = 'FACTURA_REPARATIE',\r\n FACTURA_SERVICE = 'FACTURA_SERVICE',\r\n AVIZ = 'AVIZ',\r\n FACTURA = 'FACTURA'\r\n}\r\n\r\nexport const renaultMakeCodes = ['RENAULT', 'DACIA'];\r\n\r\nexport enum TariffCategoryCodeEnum {\r\n ADAOS = 'ADAOS',\r\n ADAOS_ASIGURATOR = 'ADAOS_ASIGURATOR',\r\n ADAOS_ALT_PART = 'ADAOS_ALT_PART',\r\n DISC = 'DISC',\r\n MAN = 'MAN'\r\n}\r\n\r\nexport enum AdvertOptionCodeEnum {\r\n MAVO = 'MAVO',\r\n REN = 'REN'\r\n}\r\n\r\nexport enum TariffTypeGroupCodeEnum {\r\n ADD_PARTS = 'ADD_PARTS',\r\n PSE_ALT = 'PSE_ALT'\r\n}\r\n\r\nexport enum RoleCodeEnum {\r\n ADMIN_COUNTRY_ORGANIZATION = 'ADMIN_COUNTRY_ORGANIZATION'\r\n}\r\n\r\nexport enum OwnStockCodeEnum {\r\n OWN_STOCK = 'STOC PROPRIU'\r\n}\r\n\r\nexport const includedTariffTypeGroupCodes = ['MAN', 'DISC'];\r\n\r\nexport enum CaseTypeCodeEnum {\r\n REPARATIE = 'REPARATIE',\r\n MAINTENANCE = 'REP'\r\n}\r\n\r\nexport enum CountryCodeEnum {\r\n CZ = 'CZ',\r\n RO = 'RO'\r\n}\r\n\r\nexport enum FilterTypeCodeEnum {\r\n DS = 'DS'\r\n}\r\n\r\nexport enum AppointmentCategoryTypeCodeEnum {\r\n MAINTENANCE = 'MAINTENANCE',\r\n REPAIR = 'REPAIR'\r\n}\r\n\r\n// List of codes to exclude\r\nexport const excludedCodes = [\r\n CaseStatusCodeEnum.OE.toString(),\r\n CaseStatusCodeEnum.AM.toString(),\r\n CaseStatusCodeEnum.SOLICITA_MODIFICARE_DEVIZ.toString(),\r\n CaseStatusCodeEnum.IN_ANALIZA.toString(),\r\n CaseStatusCodeEnum.COM_PI.toString(),\r\n CaseStatusCodeEnum.ACTUALIZEAZA_CALCULATIE.toString()\r\n];\r\n\r\nexport enum OrganizationCaseTypeStepCode {\r\n DOS_NOU = 'DOS_NOU'\r\n}\r\n\r\nexport const aquisitionWorkflowSectionSteps = [\r\n 'VALIDARE OFERTA',\r\n 'RED_DOSAR'\r\n];\r\n\r\nexport const aquisitionSteps = [\r\n 'OFERTA ACCEPTATA'\r\n];\r\n\r\nexport const smartBillInvoiceWorkflowSectionSteps = [\r\n 'S_TEP'\r\n];\r\n\r\nexport const excludedAdvertisers = ['REN', 'MAVO'];\r\n\r\nexport enum AppointmentPaymentStatus {\r\n COMPLETED = 'completed'\r\n}\r\n\r\nexport enum OrderNotificationTemplateEnum {\r\n VERIFIED_BY_SUPPLIER = 'VERIFIED_BY_SUPPLIER'\r\n}\r\n\r\nexport const hideButtonsSectionSteps = [\r\n 'CAZ_INCHIS'\r\n];\r\n\r\nexport const nontStockRoles = ['VD']\r\n\r\nexport const nonStockCheckedOERoles = ['USER ATM']\r\n\r\nexport enum MavoAuctionStatusEnum {\r\n TERMINATA = 'TERMINATA',\r\n STOPATA = 'STOPATA'\r\n}\r\n\r\nexport enum MavoLanguageTranslationEnum {\r\n RO = 'ro'\r\n}\r\n\r\nexport enum EInvoiceStatusEnum {\r\n VERIFICATION_SUCCESS = 'VERIFICATION_SUCCESS',\r\n VERIFICATION_FAILED = 'VERIFICATION_FAILED',\r\n ERROR = 'ERROR',\r\n PENDING = 'PENDING'\r\n}\r\n\r\nexport enum InvoiceTypeCodeEnum {\r\n FACTURA = \"380\",\r\n FACTURA_CORECTATA = \"384\"\r\n}\r\n\r\nexport enum AuctionOfferStatusEnum {\r\n AUCTION_WINNER = 'AUCTION_WINNER',\r\n AUCTION_LOSER = 'AUCTION_LOSER',\r\n AUCTION_OFFER_EXCEEDED = 'AUCTION_OFFER_EXCEEDED',\r\n AUCTION_LAST_BIDDER = 'AUCTION_LAST_BIDDER'\r\n}\r\n\r\nexport enum NotifySupportTemplateEnum {\r\n CASE_NOTIFY_SUPPORT = 'CASE_NOTIFY_SUPPORT',\r\n CASE_SUPPORT_RESPONSE = 'CASE_SUPPORT_RESPONSE',\r\n GENERAL_NOTIFY_SUPPORT = 'GENERAL_NOTIFY_SUPPORT'\r\n}\r\n\r\nexport enum PowerBiReportCodeEnum {\r\n POWER_BI_ORDERS = 'POWER_BI_ORDERS'\r\n}","export default __webpack_public_path__ + \"static/media/power-bi-icon.954962e6.png\";","import BarChartIcon from '@material-ui/icons/BarChart';\r\nimport CalendarTodayIcon from '@material-ui/icons/CalendarToday';\r\nimport ChatIcon from '@material-ui/icons/ChatOutlined';\r\nimport CodeIcon from '@material-ui/icons/Code';\r\nimport DashboardIcon from '@material-ui/icons/DashboardOutlined';\r\nimport ErrorIcon from '@material-ui/icons/ErrorOutline';\r\nimport FolderIcon from '@material-ui/icons/Folder';\r\nimport DashboardTwoToneIcon from '@material-ui/icons/DashboardTwoTone';\r\nimport GradeTwoTone from '@material-ui/icons/GradeTwoTone';\r\nimport ListAltIcon from '@material-ui/icons/ListAlt';\r\nimport LockOpenIcon from '@material-ui/icons/LockOpenOutlined';\r\nimport MailIcon from '@material-ui/icons/MailOutlined';\r\nimport PresentToAllIcon from '@material-ui/icons/PresentToAll';\r\nimport PeopleIcon from '@material-ui/icons/PeopleOutlined';\r\nimport PersonIcon from '@material-ui/icons/PersonOutlined';\r\nimport ReceiptIcon from '@material-ui/icons/ReceiptOutlined';\r\nimport SettingsIcon from '@material-ui/icons/SettingsOutlined';\r\nimport ViewModuleIcon from '@material-ui/icons/ViewModule';\r\nimport DescriptionIcon from '@material-ui/icons/Description';\r\n\r\nimport HomeIcon from '@material-ui/icons/Home';\r\nimport LocalShippingIcon from '@material-ui/icons/LocalShipping';\r\nimport DirectionsCarIcon from '@material-ui/icons/DirectionsCar';\r\nimport { RoleClaimsEnum } from './../../helpers/Constants';\r\nimport AirportShuttleIcon from '@material-ui/icons/AirportShuttle';\r\nimport BuildIcon from '@material-ui/icons/Build';\r\nimport CommuteOutlinedIcon from '@material-ui/icons/CommuteOutlined';\r\nimport React from \"react\";\r\nimport PowerBiLogo from '../../assets/images/power-bi-icon.png';\r\n\r\nconst PowerBIIcon = ({ width = 24, height = 24 }) => {\r\n return (\r\n \r\n );\r\n};\r\n\r\n\r\nvar iconsMap = {\r\n BarChartIcon: BarChartIcon,\r\n CalendarTodayIcon: CalendarTodayIcon,\r\n ChatIcon: ChatIcon,\r\n CodeIcon: CodeIcon,\r\n DashboardIcon: DashboardIcon,\r\n ErrorIcon: ErrorIcon,\r\n FolderIcon: FolderIcon,\r\n DashboardTwoToneIcon: DashboardTwoToneIcon,\r\n GradeTwoTone: GradeTwoTone,\r\n ListAltIcon: ListAltIcon,\r\n LockOpenIcon: LockOpenIcon,\r\n MailIcon: MailIcon,\r\n PresentToAllIcon: PresentToAllIcon,\r\n PeopleIcon: PeopleIcon,\r\n PersonIcon: PersonIcon,\r\n ReceiptIcon: ReceiptIcon,\r\n SettingsIcon: SettingsIcon,\r\n ViewModuleIcon: ViewModuleIcon,\r\n HomeIcon: HomeIcon,\r\n LocalShippingIcon: LocalShippingIcon,\r\n DescriptionIcon: DescriptionIcon,\r\n DirectionsCarIcon: DirectionsCarIcon,\r\n AirportShuttleIcon: AirportShuttleIcon,\r\n BuildIcon: BuildIcon,\r\n CommuteOutlinedIcon: CommuteOutlinedIcon,\r\n PowerBIIcon: PowerBIIcon\r\n};\r\n\r\nexport default [\r\n {\r\n label: ' ',\r\n content: JSON.parse(\r\n `[ \r\n {\r\n \"label\": \"Acasa\",\r\n \"tag\": \"MENU_HOME\",\r\n \"icon\": \"HomeIcon\",\r\n \"to\": \"/\",\r\n \"right\": \"${RoleClaimsEnum.Home}\"\r\n },\r\n {\r\n \"label\": \"Sample Page V3\",\r\n \"tag\": \"MENU_SAMPLEPAGEV3\",\r\n \"icon\": \"CommuteOutlinedIcon\",\r\n \"needToken\":\"true\",\r\n \"redirectTo\":\"${window.location.origin}/v3/sample-page?\",\r\n \"right\": \"${RoleClaimsEnum.SAMPLEPAGEV3}\"\r\n }, \r\n {\r\n \"label\": \"Dosar nou\",\r\n \"tag\": \"MENU_NEW_CASE\",\r\n \"icon\": \"DescriptionIcon\",\r\n \"to\": \"/newCase\",\r\n \"right\": \"${RoleClaimsEnum.NewCase}\"\r\n },\r\n {\r\n \"label\": \"Dashboards\",\r\n \"tag\": \"MENU_DASHBOARDS\",\r\n \"icon\": \"DashboardTwoToneIcon\",\r\n \"to\": \"/dashboards\",\r\n \"right\": \"${RoleClaimsEnum.Dashboard}\"\r\n },\r\n {\r\n \"label\": \"Raport Power BI\",\r\n \"tag\": \"POWER_BI_REPORT\",\r\n \"icon\": \"PowerBIIcon\",\r\n \"description\": \"Raport Power BI\",\r\n \"to\": \"/power-bi/POWER_BI_ORDERS\",\r\n \"right\": \"${RoleClaimsEnum.PowerBi}\"\r\n },\r\n {\r\n \"label\": \"Dosare\",\r\n \"tag\": \"MENU_FILES\",\r\n \"icon\": \"FolderIcon\",\r\n \"to\": \"/cases\",\r\n \"right\": \"${RoleClaimsEnum.Case}\"\r\n },\r\n {\r\n \"label\": \"Evaluare\",\r\n \"tag\": \"EVALUATION\",\r\n \"icon\": \"FolderIcon\",\r\n \"to\": \"/valuation\",\r\n \"right\": \"${RoleClaimsEnum.Evaluation}\"\r\n },\r\n {\r\n \"label\": \"Agenda\",\r\n \"tag\": \"AGENDA\",\r\n \"icon\": \"CalendarTodayIcon\",\r\n \"to\": \"/agenda\",\r\n \"right\": \"${RoleClaimsEnum.Agenda}\"\r\n },\r\n {\r\n \"label\": \"Vehicles History\",\r\n \"tag\": \"MENU_HISTORY_VEHICLES\",\r\n \"icon\": \"FolderIcon\",\r\n \"to\": \"/vehicles-history\",\r\n \"right\": \"${RoleClaimsEnum.Vehicle}\"\r\n },\r\n {\r\n \"label\": \"Vehicles\",\r\n \"tag\": \"MENU_VEHICLES\",\r\n \"icon\": \"DirectionsCarIcon\",\r\n \"to\": \"/vehicles\",\r\n \"right\": \"${RoleClaimsEnum.Vehicle}\"\r\n },\r\n {\r\n \"label\": \"Comenzi\",\r\n \"tag\": \"MENU_ORDERS\",\r\n \"icon\": \"LocalShippingIcon\",\r\n \"to\": \"/orders\",\r\n \"right\": \"${RoleClaimsEnum.Order}\"\r\n },\r\n {\r\n \"label\": \"Istoric Comanda Auto\",\r\n \"tag\": \"MENU_ORDER_PARTS_HISTORY\",\r\n \"icon\": \"BuildIcon\",\r\n \"to\": \"/order-parts-history\",\r\n \"right\": \"${RoleClaimsEnum.Order}\"\r\n },\r\n {\r\n \"label\": \"Raportare\",\r\n \"tag\": \"MENU_BILLING\",\r\n \"icon\": \"FolderIcon\",\r\n \"to\": \"/billing\",\r\n \"right\": \"${RoleClaimsEnum.ManagerExport}\"\r\n },\r\n {\r\n \"label\": \"Raportare facturare\",\r\n \"tag\": \"MENU_BILLING_CASE\",\r\n \"icon\": \"FolderIcon\",\r\n \"to\": \"/case-billing\",\r\n \"right\": \"${RoleClaimsEnum.Admin}\"\r\n },\r\n {\r\n \"label\": \"Raportare DGPCI\",\r\n \"tag\": \"MENU_BILLING_DGPCI\",\r\n \"icon\": \"FolderIcon\",\r\n \"to\": \"/billing-dgpci\",\r\n \"right\": \"${RoleClaimsEnum.Admin}\"\r\n },\r\n {\r\n \"label\": \"Raportare WS\",\r\n \"tag\": \"MENU_BILLING_GT_WS\",\r\n \"icon\": \"FolderIcon\",\r\n \"to\": \"/billing-ws\",\r\n \"right\": \"${RoleClaimsEnum.Admin}\"\r\n },\r\n {\r\n \"label\": \"Raportare Piese Non Stoc\",\r\n \"tag\": \"MENU_BILLING_NON_STOCK_PART\",\r\n \"icon\": \"FolderIcon\",\r\n \"to\": \"/billing-non-stock\",\r\n \"right\": \"${RoleClaimsEnum.Admin}\"\r\n },\r\n {\r\n \"label\": \"Mavo Vehicles\",\r\n \"tag\": \"MENU_MAVO_VEHICLES_RECORD\",\r\n \"icon\": \"DirectionsCarIcon\",\r\n \"to\": \"/mavo-vehicles\",\r\n \"right\": \"${RoleClaimsEnum.MavoAdministrator}\"\r\n },\r\n {\r\n \"label\": \"Licitatii\",\r\n \"tag\": \"MENU_VO_AVAILABLE_AUCTIONS\",\r\n \"icon\": \"FolderIcon\",\r\n \"right\": \"${RoleClaimsEnum.MavoVehicle}\",\r\n \"rights\" : [\"${RoleClaimsEnum.MavoAgent}\", \"${RoleClaimsEnum.MavoAdministrator}\"],\r\n \"content\": [\r\n {\r\n \"label\": \"Licitatii active\",\r\n \"tag\": \"MENU_ACTIVE_AUCTIONS\",\r\n \"description\": \"Licitatii active\",\r\n \"to\": \"/auctions\",\r\n \"right\": \"${RoleClaimsEnum.MavoVehicle}\",\r\n \"rights\" : [\"${RoleClaimsEnum.MavoAgent}\", \"${RoleClaimsEnum.MavoAdministrator}\"]\r\n },\r\n {\r\n \"label\": \"Licitatiile mele\",\r\n \"tag\": \"MENU_USER_AUCTIONS\",\r\n \"description\": \"Licitatiile mele\",\r\n \"to\": \"/user/auctions\",\r\n \"right\": \"${RoleClaimsEnum.MavoVehicle}\",\r\n \"rights\" : [\"${RoleClaimsEnum.MavoAgent}\"]\r\n },\r\n {\r\n \"label\": \"Administrare licitatii\",\r\n \"tag\": \"MENU_ADMINISTRATION_AUCTIONS\",\r\n \"description\": \"Administrare licitatii\",\r\n \"to\": \"/admin/auctions\",\r\n \"right\": \"${RoleClaimsEnum.MavoAdministrator}\"\r\n }\r\n ]\r\n },\r\n {\r\n \"label\": \"Comenzi\",\r\n \"tag\": \"MENU_MAVO_ORDERS\",\r\n \"icon\": \"LocalShippingIcon\",\r\n \"to\": \"/mavo/orders\",\r\n \"right\": \"${RoleClaimsEnum.MavoVehicle}\",\r\n \"rights\" : [\"${RoleClaimsEnum.MavoAdministrator}\"]\r\n\r\n },\r\n {\r\n \"label\": \"Comenzile mele\",\r\n \"tag\": \"MENU_MAVO_USER_ORDERS\",\r\n \"icon\": \"LocalShippingIcon\",\r\n \"to\": \"/mavo/user/orders\",\r\n \"right\": \"${RoleClaimsEnum.MavoVehicle}\",\r\n \"rights\" : [\"${RoleClaimsEnum.MavoAgent}\"]\r\n\r\n },\r\n {\r\n \"label\": \"Istoric VO facturat\",\r\n \"tag\": \"MENU_VO_INVOICE_HISTORY\",\r\n \"icon\": \"FolderIcon\",\r\n \"to\": \"/invoice-history\",\r\n \"right\": \"${RoleClaimsEnum.MavoVehicle}\",\r\n \"rights\" : [\"${RoleClaimsEnum.MavoAgent}\", \"${RoleClaimsEnum.MavoAdministrator}\", \"${RoleClaimsEnum.MavoContab}\"]\r\n },\r\n {\r\n \"label\": \"Nomeclatoare\",\r\n \"tag\": \"MENU_NOMENCLATURES\",\r\n \"icon\": \"SettingsIcon\",\r\n \"right\": \"${RoleClaimsEnum.MavoAdministrator}\",\r\n \"rights\" : [\"${RoleClaimsEnum.MavoAdministrator}\", \"${RoleClaimsEnum.MavoContab}\"],\r\n \"content\": [\r\n {\r\n \"label\": \"Agent\",\r\n \"tag\": \"MENU_NOMENCLATURES_TAB_AGENT\",\r\n \"description\": \"Configurarea agentilor, a rolurilor si a permisiunilor.\",\r\n \"to\": \"/admin/mavo/users\",\r\n \"right\": \"${RoleClaimsEnum.MavoAdministrator}\"\r\n },\r\n {\r\n \"label\": \"Organizatii\",\r\n \"tag\": \"MENU_ADMIN_TAB_ORGANIZATIONS\",\r\n \"description\": \"Adaugarea, stergerea, editarea si configurarea unei organizatii.\",\r\n \"to\": \"/admin/mavo/hoorganizations\",\r\n \"right\": \"${RoleClaimsEnum.MavoAdministrator}\"\r\n },\r\n {\r\n \"label\": \"Versiune\",\r\n \"tag\": \"MENU_NOMENCLATURES_TAB_VERSION\",\r\n \"description\": \"Configurarea versiunilor\",\r\n \"to\": \"/nomenclature/version\",\r\n \"right\": \"${RoleClaimsEnum.MavoAdministrator}\"\r\n },\r\n {\r\n \"label\": \"Culori\",\r\n \"tag\": \"MENU_NOMENCLATURES_TAB_COLOR\",\r\n \"description\": \"Configurarea culorilor\",\r\n \"to\": \"/nomenclature/color\",\r\n \"right\": \"${RoleClaimsEnum.MavoAdministrator}\"\r\n },\r\n {\r\n \"label\": \"Caroserie\",\r\n \"tag\": \"MENU_NOMENCLATURES_TAB_BODY_TYPE\",\r\n \"description\": \"Configurarea caroseriei\",\r\n \"to\": \"/nomenclature/bodyType\",\r\n \"right\": \"${RoleClaimsEnum.MavoAdministrator}\"\r\n },\r\n {\r\n \"label\": \"Stare componente\",\r\n \"tag\": \"MENU_NOMENCLATURES_TAB_BODY_CONDITION_TYPE\",\r\n \"description\": \"Configurare tipuri de stari caroserie\",\r\n \"to\": \"/nomenclature/bodyConditionType\",\r\n \"right\": \"${RoleClaimsEnum.MavoAdministrator}\"\r\n },\r\n {\r\n \"label\": \"Stare roata\",\r\n \"tag\": \"MENU_NOMENCLATURES_TAB_WHEEL_CONDITION_TYPE\",\r\n \"description\": \"Configurare tipuri de stari roata\",\r\n \"to\": \"/nomenclature/wheelConditionType\",\r\n \"right\": \"${RoleClaimsEnum.MavoAdministrator}\"\r\n },\r\n {\r\n \"label\": \"Parametri financiari\",\r\n \"tag\": \"MENU_NOMENCLATURES_TAB_FINANCIAL_PARAMETERS\",\r\n \"description\": \"Configurare Parametrii financiari\",\r\n \"to\": \"/nomenclature/financial-parameter\",\r\n \"right\": \"${RoleClaimsEnum.MavoAdministrator}\"\r\n },\r\n {\r\n \"label\": \"Plaje avize/facturi\",\r\n \"tag\": \"MENU_NOMENCLATURES_TAB_INVOICE_RANGE\",\r\n \"description\": \"Configurare Plaje avize/facturi\",\r\n \"to\": \"/nomenclature/invoice-range\",\r\n \"right\": \"${RoleClaimsEnum.MavoAdministrator}\"\r\n },\r\n {\r\n \"label\": \"Provenienta\",\r\n \"tag\": \"MENU_NOMENCLATURES_TAB_PROVENANCE\",\r\n \"description\": \"Configurare Provenienta\",\r\n \"to\": \"/nomenclature/provenance\",\r\n \"right\": \"${RoleClaimsEnum.MavoAdministrator}\"\r\n },\r\n {\r\n \"label\": \"Curs valutar\",\r\n \"tag\": \"MENU_NOMENCLATURES_TAB_CURRENCY\",\r\n \"description\": \"Configurare Curs valutar\",\r\n \"to\": \"/nomenclature/currency\",\r\n \"right\": \"${RoleClaimsEnum.MavoAdministrator}\"\r\n },\r\n {\r\n \"label\": \"Erori\",\r\n \"tag\": \"MENU_NOMENCLATURES_TAB_ALCOR_ERROR\",\r\n \"description\": \"Alcor Error\",\r\n \"to\": \"/nomenclature/alcor-error-log\",\r\n \"right\": \"${RoleClaimsEnum.MavoVehicle}\",\r\n \"rights\" : [\"${RoleClaimsEnum.MavoAdministrator}\", \"${RoleClaimsEnum.MavoContab}\"]\r\n },\r\n {\r\n \"label\": \"Parametrare Alcor\",\r\n \"tag\": \"MENU_NOMENCLATURES_TAB_ALCOR_PARAMETERS\",\r\n \"description\": \"Parametrare Alcor\",\r\n \"to\": \"/nomenclature/alcor-parameters\",\r\n \"right\": \"${RoleClaimsEnum.MavoVehicle}\",\r\n \"rights\" : [\"${RoleClaimsEnum.MavoAdministrator}\", \"${RoleClaimsEnum.MavoContab}\"]\r\n },\r\n {\r\n \"label\": \"Date vanzator\",\r\n \"tag\": \"MENU_NOMENCLATURES_TAB_SELLER_DATA\",\r\n \"description\": \"Configurare date vanzator\",\r\n \"to\": \"/nomenclature/seller-data\",\r\n \"right\": \"${RoleClaimsEnum.MavoAdministrator}\"\r\n }\r\n ]\r\n },\r\n {\r\n \"label\": \"Admin\",\r\n \"tag\": \"MENU_ADMIN\",\r\n \"icon\": \"SettingsIcon\",\r\n \"right\": \"${RoleClaimsEnum.Admin}\",\r\n \"rights\" : [\"${RoleClaimsEnum.Admin}\", \"${RoleClaimsEnum.AdminCountryOrganization}\", \"${RoleClaimsEnum.AdminService}\"],\r\n \"content\": [\r\n {\r\n \"label\": \"Utilizatori\",\r\n \"tag\": \"MENU_ADMIN_TAB_USERS\",\r\n \"description\": \"Configurarea utilizatorilor, a rolurilor si a permisiunilor.\",\r\n \"to\": \"/admin/users\",\r\n \"right\": \"${RoleClaimsEnum.AdminUsers}\"\r\n },\r\n {\r\n \"label\": \"Liste de valori\",\r\n \"tag\": \"MENU_ADMIN_TAB_LIST_OF_VALUES\",\r\n \"description\": \"Adaugarea, stergerea si modificarea listelor de valori.\",\r\n \"to\": \"/admin/listOfValues\",\r\n \"right\": \"${RoleClaimsEnum.AdminValueList}\"\r\n },\r\n {\r\n \"label\": \"Alte liste de valori\",\r\n \"tag\": \"MENU_ADMIN_TAB_OTHER_LIST_OF_VALUES\",\r\n \"description\": \"Adaugarea, stergerea si modificarea altor listelor de valori.\",\r\n \"to\": \"/admin/otherListOfValues\",\r\n \"right\": \"${RoleClaimsEnum.AdminValueList}\"\r\n },\r\n {\r\n \"label\": \"Modele\",\r\n \"tag\": \"NOMENCLATURE_MODEL_LIST\",\r\n \"description\": \"Modele\",\r\n \"to\": \"/admin/model-car-class\",\r\n \"right\": \"${RoleClaimsEnum.AdminValueList}\"\r\n },\r\n {\r\n \"label\": \"Preturi inchiriere/zi\",\r\n \"tag\": \"CAR_CLASS_RENTAL_PRICE\",\r\n \"description\": \"Preturi inchiriere/zi\",\r\n \"to\": \"/admin/car-class-rent-price\",\r\n \"right\": \"${RoleClaimsEnum.Admin}\"\r\n },\r\n {\r\n \"label\": \"Cupi Piese Optionale Revizie\",\r\n \"tag\": \"MAINTENANCE_CUPI_PART_OPTIONAL\",\r\n \"description\": \"Cupi Piese Optionale Revizie\",\r\n \"to\": \"/admin/maintenance-cupi-part\",\r\n \"right\": \"${RoleClaimsEnum.AdminValueList}\"\r\n },\r\n {\r\n \"label\": \"Producatori Mentenanta\",\r\n \"tag\": \"MAINTENANCE_PRODUCER\",\r\n \"description\": \"Producatori Mentenanta\",\r\n \"to\": \"/admin/maintenance-producer\",\r\n \"right\": \"${RoleClaimsEnum.AdminValueList}\"\r\n },\r\n {\r\n \"label\": \"Tampon tari\",\r\n \"tag\": \"COUNTRY_BUFFER\",\r\n \"description\": \"Tampon tari\",\r\n \"to\": \"/admin/country-buffer\",\r\n \"right\": \"${RoleClaimsEnum.AdminValueList}\"\r\n },\r\n {\r\n \"label\": \"Email-uri support pe tara\",\r\n \"tag\": \"COUNTRY_SUPPORT\",\r\n \"description\": \"Email-uri support pe tara\",\r\n \"to\": \"/admin/country-support\",\r\n \"right\": \"${RoleClaimsEnum.AdminValueList}\"\r\n },\r\n {\r\n \"label\": \"Rapoarte Power BI\",\r\n \"tag\": \"POWER_BI_REPORT_CONFIGURATION\",\r\n \"description\": \"Rapoarte Power BI\",\r\n \"to\": \"/admin/power-bi-reports\",\r\n \"right\": \"${RoleClaimsEnum.AdminValueList}\"\r\n },\r\n {\r\n \"label\": \"XML\",\r\n \"tag\": \"MENU_ADMIN_TAB_XML\",\r\n \"description\": \"Download XML.\",\r\n \"to\": \"/admin/xml\",\r\n \"right\": \"${RoleClaimsEnum.Admin}\"\r\n },\r\n {\r\n \"label\": \"Organizatii\",\r\n \"tag\": \"MENU_ADMIN_TAB_ORGANIZATIONS\",\r\n \"description\": \"Adaugarea, stergerea, editarea si configurarea unei organizatii.\",\r\n \"to\": \"/admin/hoorganizations\",\r\n \"right\": \"${RoleClaimsEnum.AdminOrganization}\",\r\n \"rights\" : [\"${RoleClaimsEnum.AdminOrganization}\", \"${RoleClaimsEnum.AdminCountryOrganization}\"]\r\n }, \r\n {\r\n \"label\": \"Organizatia mea\",\r\n \"tag\": \"MENU_ADMIN_SERVICE_TAB_ORGANIZATIONS\",\r\n \"description\": \"Configurarea unei organizatii.\",\r\n \"to\": \"/admin/hoorganizations/\",\r\n \"right\": \"${RoleClaimsEnum.AdminService}\"\r\n },\r\n {\r\n \"label\": \"Poeditor\",\r\n \"tag\": \"MENU_ADMIN_TAB_POEDITOR\",\r\n \"description\": \"Poeditor\",\r\n \"to\": \"/admin/poeditor\",\r\n \"right\": \"${RoleClaimsEnum.Admin}\",\r\n \"rights\" : [\"${RoleClaimsEnum.Admin}\", \"${RoleClaimsEnum.AdminCountryOrganization}\"]\r\n }\r\n ]\r\n },\r\n {\r\n \"label\": \"Setari\",\r\n \"tag\": \"MENU_SETTINGS\",\r\n \"icon\": \"SettingsIcon\",\r\n \"right\": \"${RoleClaimsEnum.Settings}\",\r\n \"content\": [\r\n {\r\n \"label\": \"Interfete\",\r\n \"tag\": \"MENU_SETTINGS_TAB_INTERFACES\",\r\n \"description\": \"Configurarea utilizatorilor pentru interfetele organizatiei.\",\r\n \"to\": \"/settings/interfaces\",\r\n \"right\": \"${RoleClaimsEnum.Settings}\"\r\n }\r\n ]\r\n } \r\n]`,\r\n (key, value) => {\r\n if (key === 'icon') {\r\n return iconsMap[value];\r\n } else {\r\n return value;\r\n }\r\n }\r\n )\r\n }\r\n];\r\n","import { Action, Reducer } from 'redux';\r\nimport { WeatherForecastsAction } from '../actions/WeatherForecasts';\r\nimport { WeatherForecast } from '../../interfaces/WeatherForecast';\r\n\r\nexport interface WeatherForecastsState {\r\n isLoading: boolean;\r\n startDateIndex?: number;\r\n forecasts: WeatherForecast[];\r\n}\r\n\r\nconst initialState: WeatherForecastsState = {\r\n forecasts: [],\r\n isLoading: false\r\n};\r\n\r\nexport const WeatherForecastsReducer: Reducer = (\r\n state: WeatherForecastsState | undefined,\r\n incomingAction: Action\r\n): WeatherForecastsState => {\r\n if (state === undefined) {\r\n return initialState;\r\n }\r\n\r\n const action = incomingAction as WeatherForecastsAction;\r\n switch (action.type) {\r\n case 'REQUEST_WEATHER_FORECASTS':\r\n return {\r\n startDateIndex: action.startDateIndex,\r\n forecasts: state.forecasts,\r\n isLoading: true\r\n };\r\n case 'RECEIVE_WEATHER_FORECASTS':\r\n if (action.startDateIndex === state.startDateIndex) {\r\n return {\r\n startDateIndex: action.startDateIndex,\r\n forecasts: action.forecasts,\r\n isLoading: false\r\n };\r\n }\r\n break;\r\n }\r\n\r\n return state;\r\n};\r\n","import { Action, Reducer } from 'redux';\r\nimport { User } from 'oidc-client';\r\nimport { AppAction } from '../actions/App';\r\nimport * as ActionTypes from '../actions/ActionTypes';\r\nimport { AppUser } from '../../interfaces/AppUser';\r\nimport { Appointment, Case, CaseComment } from '../../interfaces/Case';\r\nimport { CurrencyRate } from '../../interfaces/Vehicle';\r\n\r\nexport interface AppState {\r\n user: User | null;\r\n appUser: AppUser | null;\r\n showMessage: boolean;\r\n language: string;\r\n dateFormat: string;\r\n longDateFormat: string;\r\n tasks: Case[];\r\n comments: CaseComment[];\r\n newInCases: Case[];\r\n isCommentsLoading: boolean;\r\n isTasksLoading: boolean;\r\n isNewInCasesLoading: boolean;\r\n currencyRates: CurrencyRate[];\r\n newInAppointments: Appointment[];\r\n isNewInAppointmentsLoading: boolean;\r\n}\r\n\r\nconst initialState: AppState = {\r\n user: null,\r\n appUser: null,\r\n showMessage: false,\r\n language: '',\r\n dateFormat: '',\r\n longDateFormat: '',\r\n tasks: [],\r\n comments: [],\r\n newInCases: [],\r\n isCommentsLoading: false,\r\n isTasksLoading: false,\r\n isNewInCasesLoading: false,\r\n currencyRates: [],\r\n newInAppointments: [],\r\n isNewInAppointmentsLoading: false\r\n};\r\n\r\nexport const AppReducer: Reducer = (\r\n state: AppState | undefined,\r\n incomingAction: Action\r\n): AppState | undefined => {\r\n if (state === undefined) {\r\n return initialState;\r\n }\r\n\r\n const action = incomingAction as AppAction;\r\n\r\n switch (action.type) {\r\n case ActionTypes.APP_SET_USER:\r\n return {\r\n ...state,\r\n user: action.user,\r\n appUser: action.appUser\r\n };\r\n case ActionTypes.APP_DISPLAY_MESSAGE:\r\n return {\r\n ...state,\r\n showMessage: action.display\r\n };\r\n case ActionTypes.APP_REMOVE_USER:\r\n return {\r\n ...state,\r\n user: null,\r\n appUser: null\r\n };\r\n\r\n case ActionTypes.APP_SET_LANGUAGE:\r\n return {\r\n ...state,\r\n language: action.language,\r\n dateFormat: action.dateFormat,\r\n longDateFormat: action.longDateFormat\r\n };\r\n case ActionTypes.APP_LOAD_NOTIFICATION:\r\n return {\r\n ...state,\r\n tasks: action.tasks,\r\n comments: action.comments,\r\n newInCases: action.newInCases,\r\n newInAppointments: action.newInAppointments,\r\n isTasksLoading: false,\r\n isCommentsLoading: false,\r\n isNewInCasesLoading: false,\r\n isNewInAppointmentsLoading: false\r\n };\r\n case ActionTypes.APP_LOAD_TASKS:\r\n return {\r\n ...state,\r\n tasks: action.tasks,\r\n isTasksLoading: false\r\n };\r\n case ActionTypes.APP_LOAD_COMMENTS:\r\n return {\r\n ...state,\r\n comments: action.comments,\r\n isCommentsLoading: false\r\n };\r\n case ActionTypes.APP_REMOVE_COMMENT:\r\n const commentList = [...state.comments];\r\n const index = commentList.findIndex((item) => item.id === action.id);\r\n commentList.splice(index, 1);\r\n\r\n return {\r\n ...state,\r\n comments: commentList\r\n };\r\n case ActionTypes.APP_REMOVE_NEW_IN_CASE:\r\n const newInCases = [...state.newInCases];\r\n const indexNewIn = newInCases.findIndex((item) => item.id === action.id);\r\n newInCases.splice(indexNewIn, 1);\r\n\r\n return {\r\n ...state,\r\n newInCases: newInCases\r\n };\r\n case ActionTypes.APP_MARK_AS_VIEWED_NEW_IN_CASE:\r\n const cases = [...state.newInCases];\r\n const caseIndex = cases.findIndex((item) => item.id === action.id);\r\n cases[caseIndex].caseStatus.isViewed = true;\r\n \r\n return {\r\n ...state,\r\n newInCases: cases\r\n };\r\n case ActionTypes.APP_REMOVE_NEW_IN_APPOINTMENT:\r\n const newInAppointments = [...state.newInAppointments];\r\n const indexNewInAppointment = newInAppointments.findIndex((item) => item.id === action.id);\r\n newInAppointments.splice(indexNewInAppointment, 1);\r\n\r\n return {\r\n ...state,\r\n newInAppointments: newInAppointments\r\n };\r\n case ActionTypes.APP_MARK_AS_VIEWED_NEW_IN_APPOINTMENT:\r\n const appointments = [...state.newInAppointments];\r\n const appointmentIndex = appointments.findIndex((item) => item.id === action.id);\r\n appointments[appointmentIndex].appointmentStatusHistory.isViewed = true;\r\n\r\n return {\r\n ...state,\r\n newInAppointments: appointments\r\n };\r\n case ActionTypes.APP_REMOVE_TASK:\r\n const tasks = [...state.tasks];\r\n const indexTask = tasks.findIndex((item) => item.id === action.id);\r\n tasks.splice(indexTask, 1);\r\n\r\n return {\r\n ...state,\r\n tasks: tasks\r\n };\r\n case ActionTypes.APP_SET_NOTIFICATIONS_LOADERS:\r\n return {\r\n ...state,\r\n isCommentsLoading: action.isCommentsLoading,\r\n isTasksLoading: action.isTasksLoading,\r\n isNewInCasesLoading: action.isNewInCasesLoading,\r\n isNewInAppointmentsLoading: action.isNewInAppointmentsLoading\r\n };\r\n case ActionTypes.APP_SET_CURRENCY_RATES:\r\n return {\r\n ...state,\r\n currencyRates: action.currencyRates\r\n };\r\n }\r\n\r\n return state;\r\n};\r\n","import { Action, Reducer } from 'redux';\r\nimport { ThemeAction } from '../actions/ThemeOptions';\r\nimport * as ActionTypes from '../actions/ActionTypes';\r\n\r\nexport interface ThemeState {\r\n // Sidebar\r\n\r\n sidebarShadow: boolean;\r\n sidebarFixed: boolean;\r\n sidebarToggleMobile: boolean;\r\n // sidebarUserbox: boolean,\r\n sidebarToggle: boolean;\r\n sidebarHover: boolean;\r\n // Header\r\n\r\n headerFixed: boolean;\r\n headerShadow: boolean;\r\n headerSearchHover: boolean;\r\n\r\n // Main content\r\n\r\n contentBackground: string;\r\n themeConfiguratorToggle: boolean;\r\n\r\n // Page title\r\n\r\n pageTitleStyle: string;\r\n pageTitleBackground: string;\r\n pageTitleShadow: boolean;\r\n pageTitleBreadcrumb: boolean;\r\n pageTitleIconBox: boolean;\r\n pageTitleDescription: boolean;\r\n pageTitleBackButton: boolean;\r\n}\r\n\r\nconst initialState: ThemeState = {\r\n sidebarShadow: false,\r\n sidebarFixed: true,\r\n sidebarToggleMobile: false,\r\n // sidebarUserbox: true,\r\n sidebarToggle: false,\r\n sidebarHover: false,\r\n // Header\r\n\r\n headerFixed: true,\r\n headerShadow: true,\r\n headerSearchHover: false,\r\n\r\n // Main content\r\n\r\n contentBackground: '',\r\n themeConfiguratorToggle: false,\r\n\r\n // Page title\r\n\r\n pageTitleStyle: '',\r\n pageTitleBackground: '',\r\n pageTitleShadow: false,\r\n pageTitleBreadcrumb: false,\r\n pageTitleIconBox: false,\r\n pageTitleDescription: true,\r\n pageTitleBackButton: true\r\n};\r\n\r\nexport const ThemeOptionsReducer: Reducer = (\r\n state: ThemeState | undefined,\r\n incomingAction: Action\r\n): ThemeState | undefined => {\r\n if (state === undefined) {\r\n return initialState;\r\n }\r\n\r\n const action = incomingAction as ThemeAction;\r\n\r\n switch (action.type) {\r\n case ActionTypes.THEME_SET_SIDEBAR_HOVER:\r\n return {\r\n ...state,\r\n sidebarHover: action.hover\r\n };\r\n case ActionTypes.THEME_SET_SIDEBAR_TOGGLE:\r\n return {\r\n ...state,\r\n sidebarToggle: action.toggle\r\n };\r\n case ActionTypes.THEME_SET_SIDEBAR_TOGGLE_MOBILE:\r\n return {\r\n ...state,\r\n sidebarToggleMobile: action.toggle\r\n };\r\n }\r\n\r\n return state;\r\n};\r\n","import { Action, Reducer } from 'redux';\r\nimport { AppUserAction } from '../actions/AppUserAdmin';\r\nimport { AppuserList } from '../../interfaces/AppUser';\r\nimport * as ActionTypes from '../actions/ActionTypes';\r\n\r\nexport interface AppUserAdminState {\r\n userList: AppuserList;\r\n isLoading: boolean;\r\n}\r\n\r\nconst initialState: AppUserAdminState = {\r\n userList: {} as AppuserList,\r\n isLoading: false\r\n};\r\n\r\nexport const AppUserAdminReducer: Reducer = (\r\n state: AppUserAdminState | undefined,\r\n incomingAction: Action\r\n): AppUserAdminState => {\r\n if (state === undefined) {\r\n return initialState;\r\n }\r\n\r\n const action = incomingAction as AppUserAction;\r\n\r\n switch (action.type) {\r\n case ActionTypes.APPUSER_USER_GET_LIST_START:\r\n return {\r\n ...state,\r\n isLoading: true\r\n };\r\n case ActionTypes.APPUSER_USER_GET_LIST_END:\r\n return {\r\n ...state,\r\n userList: action.userList,\r\n isLoading: false\r\n };\r\n }\r\n\r\n return state;\r\n};\r\n","import { Action, Reducer } from 'redux';\r\nimport { CaseSettingsAction } from '../actions/CaseSettings';\r\nimport * as ActionTypes from '../actions/ActionTypes';\r\nimport { CaseSettings } from '../../interfaces/CaseSettings';\r\nimport { Case } from '../../interfaces/Case';\r\n\r\nexport interface CaseSettingsState {\r\n caseSettings: CaseSettings | null;\r\n isLoading: boolean;\r\n case: Case | null;\r\n}\r\n\r\nconst initialState: CaseSettingsState = {\r\n caseSettings: null,\r\n isLoading: false,\r\n case: null\r\n};\r\n\r\nexport const AppCaseSettingsReducer: Reducer = (\r\n state: CaseSettingsState | undefined,\r\n incomingAction: Action\r\n): CaseSettingsState | undefined => {\r\n if (state === undefined) {\r\n return initialState;\r\n }\r\n\r\n const action = incomingAction as CaseSettingsAction;\r\n\r\n switch (action.type) {\r\n case ActionTypes.CASE_SETTINGS_SET_CASE:\r\n return {\r\n ...state,\r\n caseSettings: action.caseSettings,\r\n case: action.case,\r\n isLoading: false\r\n };\r\n case ActionTypes.CASE_SETTINGS_SET_LOADING:\r\n return {\r\n ...state,\r\n isLoading: action.isLoading\r\n };\r\n case ActionTypes.CASE_SETTINGS_SET_CASE_VEHICLE:\r\n return {\r\n ...state,\r\n case: {\r\n ...state.case!,\r\n caseVehicle: action.caseVehicle\r\n }\r\n };\r\n case ActionTypes.CASE_SETTINGS_SET_CASE_EVENT:\r\n return {\r\n ...state,\r\n case: {\r\n ...state.case!,\r\n caseEvent: action.caseEvent\r\n }\r\n };\r\n case ActionTypes.CASE_SETTINGS_SET_CASE_VALUATION:\r\n return {\r\n ...state,\r\n case: {\r\n ...state.case!,\r\n caseValuation: action.caseValuation\r\n }\r\n };\r\n case ActionTypes.CASE_SETTINGS_SET_CASE_STATUS:\r\n return {\r\n ...state,\r\n case: {\r\n ...state.case!,\r\n caseStatus: action.caseStatus\r\n }\r\n };\r\n\r\n case ActionTypes.CASE_SETTINGS_ADD_CASE_PARTNER:\r\n return {\r\n ...state,\r\n case: {\r\n ...state.case!,\r\n casePartners: [...state.case!.casePartners, action.partner]\r\n }\r\n };\r\n case ActionTypes.CASE_SETTINGS_SET_CLIENT_DATA:\r\n return {\r\n ...state,\r\n case: {\r\n ...state.case!,\r\n caseClient: { ...action.caseClientData }\r\n }\r\n };\r\n case ActionTypes.CASE_SETTINGS_SET_VEHICLE_DATA:\r\n return {\r\n ...state,\r\n case: {\r\n ...state.case!,\r\n vehicleId: action.vehicleId\r\n }\r\n };\r\n case ActionTypes.CASE_SETTINGS_UPDATE_PARAMETERS:\r\n const index = state.case!.caseParameters.findIndex(\r\n (parameter) => parameter.id === action.caseParameter.id\r\n );\r\n const newCaseParameters = [...state.case!.caseParameters];\r\n\r\n newCaseParameters[index] = { ...action.caseParameter };\r\n\r\n return {\r\n ...state,\r\n case: {\r\n ...state.case!,\r\n caseParameters: newCaseParameters\r\n }\r\n };\r\n case ActionTypes.CASE_SETTINGS_UPDATE_TARIFF_VALUE:\r\n const indexTariffValue = state.case!.caseTariff.caseTariffValuesHistory.findIndex(\r\n (parameter) => parameter.id === action.tariffValue.id\r\n );\r\n const newTariffValues = [...state.case!.caseTariff.caseTariffValuesHistory];\r\n\r\n newTariffValues[indexTariffValue] = { ...action.tariffValue };\r\n\r\n return {\r\n ...state,\r\n case: {\r\n ...state.case!,\r\n caseTariff: {\r\n ...state.case!.caseTariff,\r\n caseTariffValuesHistory: newTariffValues\r\n }\r\n }\r\n };\r\n\r\n case ActionTypes.CASE_SETTINGS_SET_CASE_CALCULATION_HISTORY:\r\n return {\r\n ...state,\r\n case: {\r\n ...state.case!,\r\n caseCalculation: {\r\n ...action.caseCalculationHistory\r\n }\r\n }\r\n };\r\n\r\n case ActionTypes.CASE_SETTINGS_SET_CAR_IN_SERVICE:\r\n return {\r\n ...state,\r\n case: {\r\n ...state.case!,\r\n carInService: action.carInService,\r\n carInServiceDate: action.carInServiceDate\r\n }\r\n };\r\n\r\n }\r\n\r\n return state;\r\n};\r\n","import { Action, Reducer } from 'redux';\r\nimport { VehicleAction } from '../actions/Vehicle';\r\nimport * as ActionTypes from '../actions/ActionTypes';\r\nimport { Vehicle } from '../../interfaces/Vehicle';\r\n\r\nexport interface VehicleState {\r\n vehicle: Vehicle | null;\r\n}\r\n\r\nconst initialState: VehicleState = {\r\n vehicle: null\r\n};\r\n\r\nexport const VehicleReducer: Reducer = (\r\n state: VehicleState | undefined,\r\n incomingAction: Action\r\n): VehicleState | undefined => {\r\n if (state === undefined) {\r\n return initialState;\r\n }\r\n\r\n const action = incomingAction as VehicleAction;\r\n\r\n switch (action.type) {\r\n case ActionTypes.VEHICLE_SET_VEHICLE:\r\n if (action.vehicle === null)\r\n return {\r\n ...state,\r\n vehicle: null\r\n };\r\n\r\n return {\r\n ...state,\r\n vehicle: {\r\n ...action.vehicle\r\n }\r\n };\r\n case ActionTypes.VEHICLE_SET_VEHICLE_STATUS:\r\n return {\r\n ...state,\r\n vehicle: {\r\n ...state.vehicle!,\r\n currentStatus: { ...action.status }\r\n }\r\n };\r\n case ActionTypes.VEHICLE_RESET_STATE:\r\n return {\r\n ...state,\r\n vehicle: initialState.vehicle\r\n };\r\n case ActionTypes.VEHICLE_SET_VEHICLE_LOADING:\r\n return {\r\n ...state,\r\n vehicle: {\r\n ...state.vehicle!,\r\n loading: action?.loading\r\n }\r\n };\r\n }\r\n\r\n return state;\r\n};\r\n","import { Action, Reducer } from 'redux';\r\nimport * as ActionTypes from '../actions/ActionTypes';\r\nimport { MavoVehicle, MavoVehicleAttachment, MavoVehicleOption, VehicleConditionInfo, VehicleOptionInfo } from '../../interfaces/Vehicle';\r\nimport { MavoVehicleAction } from '../actions/MavoVehicle';\r\n\r\nexport interface MavoVehicleState {\r\n mavoVehicle: MavoVehicle;\r\n}\r\n\r\nconst initialState: MavoVehicleState = {\r\n mavoVehicle: {\r\n id: 0,\r\n vin: '',\r\n make: null,\r\n makeId: null,\r\n model: null,\r\n modelId: null,\r\n versionItem: null,\r\n versionId: null,\r\n color: null,\r\n colorId: null,\r\n fuelType: null,\r\n fuelTypeId: null,\r\n bodyTypeId: null,\r\n bodyType: null,\r\n transmissionTypeId: null,\r\n transmissionType: null,\r\n provenance: null,\r\n provenanceId: null,\r\n firstRegistrationDate: null,\r\n fabricationYear: null,\r\n kilometersNr: null,\r\n power: null,\r\n horsePower: null,\r\n engineManufactureCode: null,\r\n accessories: null,\r\n isReserved: false,\r\n reservations: null,\r\n cylinderCapacity: null,\r\n supplier: null,\r\n location: null,\r\n htPurchaseRonPrice: null,\r\n ttcEvaluationEurPrice: null,\r\n nirNumber: null,\r\n nirDate: null,\r\n currentStatus: null,\r\n vehicleOptions: [] as MavoVehicleOption[],\r\n mavoVehicleAttachments: [] as MavoVehicleAttachment[],\r\n isMavoVehicle: true,\r\n vehicleType: null,\r\n vehicleTypeId: null,\r\n vehicleOptionInfo: {\r\n vehicleId: 0,\r\n engineCapacity: null,\r\n emissionsClass: null,\r\n doorCount: null,\r\n seatCount: null,\r\n driveType: null,\r\n registration: null,\r\n vehicleCondition: null,\r\n metallicColor: null,\r\n upholstery: null,\r\n upholsteryColor: null,\r\n previousOwnersCount: null,\r\n countryOfOrigin: null,\r\n alarm: false,\r\n antiTheft: false,\r\n abs: false,\r\n esp: false,\r\n driverFrontAirbag: false,\r\n passengerFrontAirbag: false,\r\n frontSideAirbags: false,\r\n frontCurtainAirbag: false,\r\n xenonHeadlights: false,\r\n alloyWheels: false,\r\n glassRoof: false,\r\n towHook: false,\r\n protectionFrame: false,\r\n steeringWheelControls: false,\r\n onBoardComputer: false,\r\n cruiseControl: false,\r\n lockableDifferential: false,\r\n particleFilter: false,\r\n electricMirrors: false,\r\n frontElectricWindows: false,\r\n rearElectricWindows: false,\r\n tintedWindows: false,\r\n heatedSeats: false,\r\n rainSensors: false,\r\n parkingSensors: false,\r\n powerSteering: false,\r\n sunroof: false,\r\n rightHandDrive: false,\r\n fogLights: false,\r\n airConditioning: false,\r\n radio: false,\r\n cdPlayer: false,\r\n videoScreen: false,\r\n gps: false\r\n } as VehicleOptionInfo,\r\n vehicleConditionInfo: {\r\n vehicleId: 0,\r\n frontWingLeftPaintId: null,\r\n frontWingLeftPaint: null,\r\n frontWingRightPaintId: null,\r\n frontWingRightPaint: null,\r\n rearWingLeftPaintId: null,\r\n rearWingLeftPaint: null,\r\n rearWingRightPaintId: null,\r\n rearWingRightPaint: null,\r\n frontDoorLeftPaintId: null,\r\n frontDoorLeftPaint: null,\r\n frontDoorRightPaintId: null,\r\n frontDoorRightPaint: null,\r\n rearDoorLeftPaintId: null,\r\n rearDoorLeftPaint: null,\r\n rearDoorRightPaintId: null,\r\n rearDoorRightPaint: null,\r\n hoodPaintId: null,\r\n hoodPaint: null,\r\n faceMaskPaintId: null,\r\n faceMaskPaint: null,\r\n frontBumperPaintId: null,\r\n frontBumperPaint: null,\r\n rearBumperPaintId: null,\r\n rearBumperPaint: null,\r\n trunkPaintId: null,\r\n trunkPaint: null,\r\n spoilerPaintId: null,\r\n spoilerPaint: null,\r\n roofPaintId: null,\r\n roofPaint: null,\r\n superstructurePaintId: null,\r\n superstructurePaint: null,\r\n \r\n // Tinichigerie + Vopsitorie (Bodywork + Painting)\r\n frontWingLeftBodyPaintId: null,\r\n frontWingLeftBodyPaint: null,\r\n frontWingRightBodyPaintId: null,\r\n frontWingRightBodyPaint: null,\r\n rearWingLeftBodyPaintId: null,\r\n rearWingLeftBodyPaint: null,\r\n rearWingRightBodyPaintId: null,\r\n rearWingRightBodyPaint: null,\r\n frontDoorLeftBodyPaintId: null,\r\n frontDoorLeftBodyPaint: null,\r\n frontDoorRightBodyPaintId: null,\r\n frontDoorRightBodyPaint: null,\r\n rearDoorLeftBodyPaintId: null,\r\n rearDoorLeftBodyPaint: null,\r\n rearDoorRightBodyPaintId: null,\r\n rearDoorRightBodyPaint: null,\r\n hoodBodyPaintId: null,\r\n hoodBodyPaint: null,\r\n faceMaskBodyPaintId: null,\r\n faceMaskBodyPaint: null,\r\n frontBumperBodyPaintId: null,\r\n frontBumperBodyPaint: null,\r\n rearBumperBodyPaintId: null,\r\n rearBumperBodyPaint: null,\r\n trunkBodyPaintId: null,\r\n trunkBodyPaint: null,\r\n spoilerBodyPaintId: null,\r\n spoilerBodyPaint: null,\r\n roofBodyPaintId: null,\r\n roofBodyPaint: null,\r\n superstructureBodyPaintId: null,\r\n superstructureBodyPaint: null,\r\n \r\n // Replacement & Painting (Inlcuire + vopsire)\r\n frontWingLeftReplacePaintId: null,\r\n frontWingLeftReplacePaint: null,\r\n frontWingRightReplacePaintId: null,\r\n frontWingRightReplacePaint: null,\r\n rearWingLeftReplacePaintId: null,\r\n rearWingLeftReplacePaint: null,\r\n rearWingRightReplacePaintId: null,\r\n rearWingRightReplacePaint: null,\r\n frontDoorLeftReplacePaintId: null,\r\n frontDoorLeftReplacePaint: null,\r\n frontDoorRightReplacePaintId: null,\r\n frontDoorRightReplacePaint: null,\r\n rearDoorLeftReplacePaintId: null,\r\n rearDoorLeftReplacePaint: null,\r\n rearDoorRightReplacePaintId: null,\r\n rearDoorRightReplacePaint: null,\r\n hoodReplacePaintId: null,\r\n hoodReplacePaint: null,\r\n faceMaskReplacePaintId: null,\r\n faceMaskReplacePaint: null,\r\n frontBumperReplacePaintId: null,\r\n frontBumperReplacePaint: null,\r\n rearBumperReplacePaintId: null,\r\n rearBumperReplacePaint: null,\r\n trunkReplacePaintId: null,\r\n trunkReplacePaint: null,\r\n spoilerReplacePaintId: null,\r\n spoilerReplacePaint: null,\r\n roofReplacePaintId: null,\r\n roofReplacePaint: null,\r\n superstructureReplacePaintId: null,\r\n superstructureReplacePaint: null,\r\n //Inlocuire/Reparatie\r\n frontLeftSideWindowToReplace: false,\r\n frontLeftSideWindowToRepair: false,\r\n frontRightSideWindowToReplace: false,\r\n frontRightSideWindowToRepair: false,\r\n \r\n rearLeftSideWindowToReplace: false,\r\n rearLeftSideWindowToRepair: false,\r\n rearRightSideWindowToReplace: false,\r\n rearRightSideWindowToRepair: false,\r\n \r\n leftSideMirrorToReplace: false,\r\n leftSideMirrorToRepair: false,\r\n rightSideMirrorToReplace: false,\r\n rightSideMirrorToRepair: false,\r\n \r\n leftWiperToReplace: false,\r\n leftWiperToRepair: false,\r\n rightWiperToReplace: false,\r\n rightWiperToRepair: false,\r\n \r\n leftProjectorToReplace: false,\r\n leftProjectorToRepair: false,\r\n rightProjectorToReplace: false,\r\n rightProjectorToRepair: false,\r\n \r\n leftTurnSignalToReplace: false,\r\n leftTurnSignalToRepair: false,\r\n rightTurnSignalToReplace: false,\r\n rightTurnSignalToRepair: false,\r\n \r\n leftHeadlightToReplace: false,\r\n leftHeadlightToRepair: false,\r\n rightHeadlightToReplace: false,\r\n rightHeadlightToRepair: false,\r\n \r\n leftBrakeLightsToReplace: false,\r\n leftBrakeLightsToRepair: false,\r\n rightBrakeLightsToReplace: false,\r\n rightBrakeLightsToRepair: false,\r\n \r\n rearWindshieldToReplace: false,\r\n rearWindshieldToRepair: false,\r\n \r\n windshieldToReplace: false,\r\n windshieldToRepair: false,\r\n \r\n hoodGrilleToReplace: false,\r\n hoodGrilleToRepair: false,\r\n \r\n //Mecanica\r\n motor: null,\r\n clutch: null,\r\n gearbox: null,\r\n steering: null,\r\n battery: null,\r\n exhaust: null,\r\n tires: null,\r\n driveShaft: null,\r\n leftCvJoints: null,\r\n rightCvJoints: null,\r\n leftShockAbsorbers: null,\r\n rightShockAbsorbers: null,\r\n frontBrakes: null,\r\n backBrakes: null,\r\n itpValidateDate: null,\r\n \r\n //Interior si accesorii\r\n leftSeatUpholstery: null,\r\n rightSeatUpholstery: null,\r\n rearSeatUpholstery: null,\r\n interiorMirror: null,\r\n firstAidKit: null, \r\n bulbKit: null, \r\n leftFrontHeadrest: null, \r\n rightFrontHeadrest: null,\r\n rearHeadrest: null,\r\n spareTireGood: false,\r\n spareTireReplace: false,\r\n frontFloorMats: false,\r\n fireExtinguisher: false,\r\n wheelWrench: false,\r\n rearFloorMats: false,\r\n reflectiveTriangle: false, \r\n carJack: false,\r\n } as VehicleConditionInfo\r\n } as unknown as MavoVehicle\r\n};\r\n\r\nexport const MavoVehicleReducer: Reducer = (\r\n state: MavoVehicleState | undefined,\r\n incomingAction: Action\r\n): MavoVehicleState | undefined => {\r\n if (state === undefined) {\r\n return initialState;\r\n }\r\n\r\n const action = incomingAction as MavoVehicleAction;\r\n\r\n switch (action.type) {\r\n case ActionTypes.MAVO_VEHICLE_SET_VEHICLE:\r\n if (action.mavoVehicle === null)\r\n return {\r\n ...state,\r\n mavoVehicle: initialState.mavoVehicle\r\n };\r\n\r\n return {\r\n ...state,\r\n mavoVehicle: {\r\n ...action.mavoVehicle\r\n }\r\n };\r\n case ActionTypes.MAVO_VEHICLE_SET_VEHICLE_STATUS:\r\n return {\r\n ...state,\r\n mavoVehicle: {\r\n ...state.mavoVehicle!,\r\n currentStatus: { ...action.status }\r\n }\r\n };\r\n }\r\n\r\n return state;\r\n};\r\n","import { Action, Reducer } from 'redux';\r\nimport * as ActionTypes from '../actions/ActionTypes';\r\nimport { VehicleAuctionAction } from '../actions/VehicleAuction';\r\nimport { MavoVehicleAuction } from '../../interfaces/Vehicle';\r\n\r\nexport interface VehicleAuctionState {\r\n mavoVehicleAuction: MavoVehicleAuction | null;\r\n}\r\n\r\nconst initialState: VehicleAuctionState = {\r\n mavoVehicleAuction: null\r\n};\r\n\r\nexport const VehicleAuctionReducer: Reducer = (\r\n state: VehicleAuctionState | undefined,\r\n incomingAction: Action\r\n): VehicleAuctionState | undefined => {\r\n if (state === undefined) {\r\n return initialState;\r\n }\r\n\r\n const action = incomingAction as VehicleAuctionAction;\r\n\r\n switch (action.type) {\r\n case ActionTypes.VEHICLE_SET_VEHICLE_AUCTION:\r\n if (action.mavoVehicleAuction === null)\r\n return {\r\n ...state,\r\n mavoVehicleAuction: null\r\n };\r\n\r\n return {\r\n ...state,\r\n mavoVehicleAuction: {\r\n ...action.mavoVehicleAuction\r\n }\r\n };\r\n }\r\n\r\n return state;\r\n};\r\n","import { Action, AnyAction, Reducer } from 'redux';\r\nimport * as ActionTypes from '../actions/ActionTypes';\r\nimport { AppointmentType } from '../../types/Agenda';\r\n\r\nexport interface InitialState {\r\n selectedRange: {\r\n start_date: Date;\r\n end_date: Date;\r\n } | null;\r\n appointments: AppointmentType[];\r\n selectedAppointment: AppointmentType | null;\r\n statusList: any,\r\n categoryType:any\r\n}\r\n\r\nconst initialState: InitialState = {\r\n selectedRange: null,\r\n appointments: [],\r\n selectedAppointment: null,\r\n statusList:{},\r\n categoryType:[]\r\n};\r\n\r\nexport const AgendaReducer: Reducer = (\r\n state: InitialState | undefined,\r\n incomingAction: Action\r\n): InitialState | undefined => {\r\n if (state === undefined) {\r\n return initialState;\r\n }\r\n\r\n const action = incomingAction as AnyAction;\r\n\r\n switch (action.type) {\r\n case ActionTypes.AGENDA_SET_SELECTED_RANGE:\r\n return {\r\n ...state,\r\n selectedRange: action.payload\r\n };\r\n\r\n case ActionTypes.AGENDA_SET_APPOINTMENTS:\r\n return {\r\n ...state,\r\n appointments: action.payload\r\n };\r\n\r\n case ActionTypes.AGENDA_SET_SELECTED_APPOINTMENT:\r\n return {\r\n ...state,\r\n selectedAppointment: action.payload\r\n };\r\n case ActionTypes.AGENDA_SET_STATUS_LIST:\r\n return {\r\n ...state,\r\n statusList:action.payload\r\n }\r\n case ActionTypes.AGENDA_SET_CATEGORY_TYPE:\r\n return {\r\n ...state,\r\n categoryType: action.payload\r\n }\r\n }\r\n\r\n return state;\r\n};\r\n","import { ApplicationState, AppThunkAction } from '.././';\r\nimport * as ActionTypes from './ActionTypes';\r\nimport { User } from 'oidc-client';\r\nimport { AppContext } from '../../context/Contexts';\r\nimport { AppUser } from '../../interfaces/AppUser';\r\nimport { Language } from '../../interfaces/Organization';\r\nimport { Appointment, AppointmentFilters, Case, CaseComment, CaseFilters } from '../../interfaces/Case';\r\nimport { isNullOrUndefined } from 'util';\r\nimport { CurrencyRate } from '../../interfaces/Vehicle';\r\nimport isEqual from 'lodash/isEqual';\r\nimport { CountryCodeEnum, FilterTypeCodeEnum } from '../../helpers/Constants';\r\nimport { useSnackbar } from 'notistack';\r\n\r\ninterface AppSetUserAction {\r\n type: typeof ActionTypes.APP_SET_USER;\r\n user: User;\r\n appUser: AppUser;\r\n}\r\n\r\ninterface AppRemoveUserAction {\r\n type: typeof ActionTypes.APP_REMOVE_USER;\r\n}\r\n\r\ninterface AppDisplayMessageAction {\r\n type: typeof ActionTypes.APP_DISPLAY_MESSAGE;\r\n display: boolean;\r\n}\r\n\r\ninterface AppSetLanguageAction {\r\n type: typeof ActionTypes.APP_SET_LANGUAGE;\r\n language: string;\r\n dateFormat: string;\r\n longDateFormat: string;\r\n}\r\n\r\ninterface AppLoadUserNotifications {\r\n type: typeof ActionTypes.APP_LOAD_NOTIFICATION;\r\n newInCases: Case[];\r\n comments: CaseComment[];\r\n tasks: Case[];\r\n newInAppointments: Appointment[];\r\n}\r\n\r\ninterface AppLoadUserTasks {\r\n type: typeof ActionTypes.APP_LOAD_TASKS;\r\n tasks: Case[];\r\n}\r\n\r\ninterface AppLoadUserComments {\r\n type: typeof ActionTypes.APP_LOAD_COMMENTS;\r\n comments: CaseComment[];\r\n}\r\n\r\ninterface AppRemoveTask {\r\n type: typeof ActionTypes.APP_REMOVE_TASK;\r\n id: number;\r\n}\r\ninterface AppRemoveComment {\r\n type: typeof ActionTypes.APP_REMOVE_COMMENT;\r\n id: number;\r\n}\r\n\r\ninterface AppRemoveNewInCase {\r\n type: typeof ActionTypes.APP_REMOVE_NEW_IN_CASE;\r\n id: number;\r\n}\r\n\r\ninterface AppRemoveNewInAppointment {\r\n type: typeof ActionTypes.APP_REMOVE_NEW_IN_APPOINTMENT;\r\n id: number;\r\n}\r\n\r\ninterface AppSetNotificationsLoaders {\r\n type: typeof ActionTypes.APP_SET_NOTIFICATIONS_LOADERS;\r\n isCommentsLoading: boolean;\r\n isNewInCasesLoading: boolean;\r\n isTasksLoading: boolean;\r\n isNewInAppointmentsLoading: boolean;\r\n}\r\n\r\ninterface AppSetCurrencyRates {\r\n type: typeof ActionTypes.APP_SET_CURRENCY_RATES;\r\n currencyRates: CurrencyRate[];\r\n}\r\n\r\ninterface AppMarkAsViewedNewInCase {\r\n type: typeof ActionTypes.APP_MARK_AS_VIEWED_NEW_IN_CASE;\r\n id: number;\r\n}\r\n\r\ninterface AppMarkAsViewedNewInAppointment {\r\n type: typeof ActionTypes.APP_MARK_AS_VIEWED_NEW_IN_APPOINTMENT;\r\n id: number;\r\n}\r\n\r\nexport type AppAction =\r\n | AppSetUserAction\r\n | AppRemoveUserAction\r\n | AppDisplayMessageAction\r\n | AppSetLanguageAction\r\n | AppLoadUserNotifications\r\n | AppLoadUserTasks\r\n | AppRemoveComment\r\n | AppRemoveNewInCase\r\n | AppRemoveTask\r\n | AppLoadUserComments\r\n | AppSetNotificationsLoaders\r\n | AppSetCurrencyRates\r\n | AppRemoveNewInAppointment\r\n | AppMarkAsViewedNewInCase\r\n | AppMarkAsViewedNewInAppointment;\r\n\r\nconst LoadUserNotifications = async (\r\n dispatch: (Action: AppAction) => void,\r\n getState: () => ApplicationState,\r\n context: any\r\n) => {\r\n const caseService = (context as AppContext).caseService;\r\n const organizationService = (context as AppContext).organizationService;\r\n const appUserService = (context as AppContext).appUserService;\r\n const appState = getState().app;\r\n // Comment out this loading, since we are continuously pooling the notifications\r\n // dispatch({\r\n // type: ActionTypes.APP_SET_NOTIFICATIONS_LOADERS,\r\n // isCommentsLoading: true,\r\n // isNewInCasesLoading: true,\r\n // isTasksLoading: true\r\n // });\r\n const dateFrom = new Date(new Date().setMonth(new Date().getMonth() - 1));\r\n const dateTo = new Date();\r\n\r\n const [cases, caseNewComments, tasks, appointments] = await Promise.all([\r\n caseService.GetCases({ \r\n isNew: true, \r\n isAssignedToId: appState?.appUser?.organization?.country?.code?.toUpperCase() === CountryCodeEnum.CZ.toString() ? false : true ,\r\n dateFilterStartDate: new Date(dateFrom.setHours(0, 0, 0, 0)).toISOString(),\r\n dateFilterEndDate: new Date(dateTo.setHours(23, 59, 59, 999)).toISOString(),\r\n dateFilterCode: FilterTypeCodeEnum.DS.toString()\r\n } as any as CaseFilters),\r\n caseService.GetUserComments(),\r\n caseService.GetTaskList(),\r\n caseService.GetAppointments({ \r\n isNew: true, \r\n dateFilterStartDate: new Date(dateFrom.setHours(0, 0, 0, 0)).toISOString(), \r\n dateFilterEndDate: new Date(dateTo.setHours(23, 59, 59, 999)).toISOString()\r\n } as AppointmentFilters),\r\n ]);\r\n\r\n const org = cases.cases.map((item) => item.organizationOwnerId);\r\n const taskOrg = tasks.map((item) => item.organizationOwnerId);\r\n const appointmentOrg = appointments.appointments.map((item) => item.serviceId);\r\n org.push(...taskOrg);\r\n org.push(...appointmentOrg);\r\n\r\n const [orgOwners, users] = await Promise.all([\r\n organizationService.GetUserOrganizationsByIds(Array.from(new Set(org))),\r\n appUserService.GetUsersInfo(\r\n Array.from(\r\n new Set(\r\n caseNewComments.map((item) => (isNullOrUndefined(item) ? '' : item!.userId.toString()))\r\n )\r\n )\r\n )\r\n ]);\r\n\r\n cases.cases.forEach((cd) => {\r\n const organizationOwner = orgOwners.find((item) => item.id === cd.organizationOwnerId);\r\n cd.organizationOwner = isNullOrUndefined(organizationOwner) ? null : organizationOwner;\r\n });\r\n\r\n tasks.forEach((cd) => {\r\n const organizationOwner = orgOwners.find((item) => item.id === cd.organizationOwnerId);\r\n cd.organizationOwner = isNullOrUndefined(organizationOwner) ? null : organizationOwner;\r\n });\r\n\r\n appointments.appointments.forEach((ap) => {\r\n const organizationOwner = orgOwners.find((item) => item.id === ap.serviceId);\r\n ap.service = isNullOrUndefined(organizationOwner) ? null : organizationOwner;\r\n });\r\n\r\n for (const cc of caseNewComments) {\r\n const usr = users.find((item) => item.id === cc.userId.toString());\r\n cc.user = isNullOrUndefined(usr) ? null : usr;\r\n }\r\n\r\n const { newInCases, comments, tasks: stateTasks, newInAppointments } = getState().app || {};\r\n const updateNeeded =\r\n !isEqual(newInCases, cases.cases) ||\r\n !isEqual(comments, caseNewComments) ||\r\n !isEqual(stateTasks, tasks) ||\r\n !isEqual(newInAppointments, appointments.appointments);\r\n\r\n if (updateNeeded) {\r\n dispatch({\r\n type: ActionTypes.APP_LOAD_NOTIFICATION,\r\n newInCases: cases.cases,\r\n comments: caseNewComments,\r\n tasks: tasks,\r\n newInAppointments: appointments.appointments\r\n });\r\n }\r\n\r\n setTimeout(() => LoadUserNotifications(dispatch, getState, context), 60000);\r\n};\r\n\r\nexport const AppActionCreators = {\r\n SetUser: (enqueueSnackbar: any): AppThunkAction => async (dispatch, getState, context) => {\r\n const authService = (context as AppContext).authenticationService;\r\n const appUserService = (context as AppContext).appUserService;\r\n const translatorService = (context as AppContext).translatorService;\r\n const curentUser = await authService.getUserAsync();\r\n \r\n if (curentUser !== null) {\r\n //Remove everything except access_token\r\n Object.keys(localStorage).forEach((key) => {\r\n if (key !== 'access_token' && !key.startsWith('oidc.')) {\r\n localStorage.removeItem(key);\r\n }\r\n }); \r\n localStorage.setItem('access_token', curentUser.access_token);\r\n \r\n await translatorService.GetLanguages();\r\n \r\n try {\r\n const appUser = await appUserService.GetProfile();\r\n dispatch({ type: ActionTypes.APP_SET_USER, user: curentUser, appUser: appUser });\r\n \r\n const languageCode = translatorService.GetLanguage();\r\n const language = appUser.organization!.gtOrganization!.languages!.find(\r\n (item) => item.code === languageCode\r\n ) as Language;\r\n \r\n dispatch({\r\n type: ActionTypes.APP_SET_LANGUAGE,\r\n language: languageCode,\r\n dateFormat: language ? language.dateFormat : 'DD.MM.YYYY',\r\n longDateFormat: language ? language.longDateFormat : 'DD.MM.YYYY HH:mm'\r\n });\r\n } catch (error) {\r\n console.log(error);\r\n enqueueSnackbar(\r\n translatorService.Tranlate('ERROR_INACTIVE_USER_MSG', 'Utilizator inactiv!'),\r\n { \r\n variant: 'error',\r\n autoHideDuration: 6000\r\n }\r\n );\r\n }\r\n \r\n // LoadUserNotifications(dispatch, getState, context);\r\n }\r\n },\r\n\r\n RemoveUser: (): AppThunkAction => async (dispatch, getState, context) => {\r\n dispatch({ type: ActionTypes.APP_REMOVE_USER });\r\n },\r\n Message:\r\n (isDisplayed: boolean): AppThunkAction =>\r\n async (dispatch, getState, context) => {\r\n dispatch({ type: ActionTypes.APP_DISPLAY_MESSAGE, display: isDisplayed });\r\n },\r\n SetLanguage: (): AppThunkAction => async (dispatch, getState, context) => {\r\n const translatorService = (context as AppContext).translatorService;\r\n const languageCode = translatorService.GetLanguage();\r\n\r\n const language = getState().app!.appUser!.organization!.gtOrganization!.languages!.find(\r\n (item) => item.code === languageCode\r\n ) as Language;\r\n\r\n dispatch({\r\n type: ActionTypes.APP_SET_LANGUAGE,\r\n language: languageCode,\r\n dateFormat: language.dateFormat,\r\n longDateFormat: language.longDateFormat\r\n });\r\n },\r\n LoadUserNotifications: (): AppThunkAction => async (dispatch, getState, context) => {\r\n LoadUserNotifications(dispatch, getState, context);\r\n },\r\n\r\n LoadTasks: (): AppThunkAction => async (dispatch, getState, context) => {\r\n const caseService = (context as AppContext).caseService;\r\n const organizationService = (context as AppContext).organizationService;\r\n\r\n dispatch({\r\n type: ActionTypes.APP_SET_NOTIFICATIONS_LOADERS,\r\n isCommentsLoading: false,\r\n isNewInCasesLoading: false,\r\n isTasksLoading: true,\r\n isNewInAppointmentsLoading: false\r\n });\r\n\r\n const [tasks] = await Promise.all([caseService.GetTaskList()]);\r\n\r\n const taskOrg = tasks.map((item) => item.organizationOwnerId);\r\n\r\n const [orgOwners] = await Promise.all([\r\n organizationService.GetUserOrganizationsByIds(Array.from(new Set(taskOrg)))\r\n ]);\r\n\r\n tasks.forEach((cd) => {\r\n const organizationOwner = orgOwners.find((item) => item.id === cd.organizationOwnerId);\r\n cd.organizationOwner = isNullOrUndefined(organizationOwner) ? null : organizationOwner;\r\n });\r\n\r\n dispatch({\r\n type: ActionTypes.APP_LOAD_TASKS,\r\n tasks: tasks\r\n });\r\n },\r\n\r\n LoadComments: (): AppThunkAction => async (dispatch, getState, context) => {\r\n const caseService = (context as AppContext).caseService;\r\n const appUserService = (context as AppContext).appUserService;\r\n\r\n dispatch({\r\n type: ActionTypes.APP_SET_NOTIFICATIONS_LOADERS,\r\n isCommentsLoading: true,\r\n isNewInCasesLoading: false,\r\n isTasksLoading: false,\r\n isNewInAppointmentsLoading: false\r\n });\r\n\r\n const [caseNewComments] = await Promise.all([caseService.GetUserComments()]);\r\n\r\n const [users] = await Promise.all([\r\n appUserService.GetUsersInfo(\r\n Array.from(\r\n new Set(\r\n caseNewComments.map((item) => (isNullOrUndefined(item) ? '' : item!.userId.toString()))\r\n )\r\n )\r\n )\r\n ]);\r\n\r\n for (const cc of caseNewComments) {\r\n const usr = users.find((item) => item.id === cc.userId.toString());\r\n cc.user = isNullOrUndefined(usr) ? null : usr;\r\n }\r\n\r\n dispatch({\r\n type: ActionTypes.APP_LOAD_COMMENTS,\r\n comments: caseNewComments\r\n });\r\n },\r\n RemoveTask:\r\n (id: number): AppThunkAction =>\r\n async (dispatch, getState, context) => {\r\n dispatch({\r\n type: ActionTypes.APP_REMOVE_TASK,\r\n id: id\r\n });\r\n },\r\n RemoveComment:\r\n (id: number): AppThunkAction =>\r\n async (dispatch, getState, context) => {\r\n dispatch({\r\n type: ActionTypes.APP_REMOVE_COMMENT,\r\n id: id\r\n });\r\n },\r\n RemoveNewInCase:\r\n (id: number): AppThunkAction =>\r\n async (dispatch, getState, context) => {\r\n dispatch({\r\n type: ActionTypes.APP_REMOVE_NEW_IN_CASE,\r\n id: id\r\n });\r\n },\r\n MarkAsViewedNewInCase:\r\n (id: number): AppThunkAction =>\r\n async (dispatch, getState, context) => {\r\n dispatch({\r\n type: ActionTypes.APP_MARK_AS_VIEWED_NEW_IN_CASE,\r\n id: id\r\n });\r\n },\r\n LoadCurrencyRates: (): AppThunkAction => async (dispatch, getState, context) => {\r\n const vehicleService = (context as AppContext).vehicleService;\r\n\r\n const rates = await vehicleService.GetCurrencyRates();\r\n\r\n dispatch({\r\n type: ActionTypes.APP_SET_CURRENCY_RATES,\r\n currencyRates: rates\r\n });\r\n },\r\n RemoveNewInAppointment:\r\n (id: number): AppThunkAction =>\r\n async (dispatch, getState, context) => {\r\n dispatch({\r\n type: ActionTypes.APP_REMOVE_NEW_IN_APPOINTMENT,\r\n id: id\r\n });\r\n },\r\n MarkAsViewedNewInAppointment:\r\n (id: number): AppThunkAction =>\r\n async (dispatch, getState, context) => {\r\n dispatch({\r\n type: ActionTypes.APP_MARK_AS_VIEWED_NEW_IN_APPOINTMENT,\r\n id: id\r\n });\r\n }\r\n};\r\n","import { AppThunkAction } from '.././';\r\nimport * as ActionTypes from './ActionTypes';\r\n\r\ninterface ThemeSetSidebarToggleAction {\r\n type: typeof ActionTypes.THEME_SET_SIDEBAR_TOGGLE;\r\n toggle: boolean;\r\n}\r\n\r\ninterface ThemeSetSidebarToggleMobileAction {\r\n type: typeof ActionTypes.THEME_SET_SIDEBAR_TOGGLE_MOBILE;\r\n toggle: boolean;\r\n}\r\n\r\ninterface ThemeSetSidebarHoverAction {\r\n type: typeof ActionTypes.THEME_SET_SIDEBAR_HOVER;\r\n hover: boolean;\r\n}\r\n\r\nexport type ThemeAction =\r\n | ThemeSetSidebarHoverAction\r\n | ThemeSetSidebarToggleAction\r\n | ThemeSetSidebarToggleMobileAction;\r\n\r\nexport const ThemeActionCreators = {\r\n setSidebarToggle:\r\n (toggle: boolean): AppThunkAction =>\r\n async (dispatch, getState, context) => {\r\n dispatch({ type: ActionTypes.THEME_SET_SIDEBAR_TOGGLE, toggle: toggle });\r\n },\r\n setSidebarToggleMobile:\r\n (toggle: boolean): AppThunkAction =>\r\n async (dispatch, getState, context) => {\r\n dispatch({ type: ActionTypes.THEME_SET_SIDEBAR_TOGGLE_MOBILE, toggle: toggle });\r\n },\r\n\r\n setSidebarHover:\r\n (hover: boolean): AppThunkAction =>\r\n async (dispatch, getState, context) => {\r\n dispatch({ type: ActionTypes.THEME_SET_SIDEBAR_HOVER, hover: hover });\r\n }\r\n};\r\n","import { AppThunkAction } from '..';\r\nimport * as ActionTypes from './ActionTypes';\r\nimport { AppContext } from '../../context/Contexts';\r\nimport { AppuserList, AppUser } from '../../interfaces/AppUser';\r\n\r\ninterface AppUserGetListStartAction {\r\n type: typeof ActionTypes.APPUSER_USER_GET_LIST_START;\r\n}\r\ninterface AppUserGetListEndAction {\r\n type: typeof ActionTypes.APPUSER_USER_GET_LIST_END;\r\n userList: AppuserList;\r\n}\r\n\r\ninterface AppUserEditAction {\r\n type: typeof ActionTypes.APPUSER_USER_EDIT;\r\n appUser: AppUser;\r\n}\r\n\r\nexport type AppUserAction = AppUserGetListStartAction | AppUserGetListEndAction | AppUserEditAction;\r\n\r\nexport const AppUserAdminActionCreators = {\r\n LoadUsers:\r\n (page: number, rowsPerPage: number): AppThunkAction =>\r\n async (dispatch, getState, context) => {\r\n const service = (context as AppContext).appUserService;\r\n\r\n dispatch({ type: ActionTypes.APPUSER_USER_GET_LIST_START });\r\n\r\n const users = await service.GetAppUsers();\r\n\r\n dispatch({ type: ActionTypes.APPUSER_USER_GET_LIST_END, userList: users });\r\n },\r\n\r\n EditUser:\r\n (appUser: AppUser): AppThunkAction =>\r\n async (dispatch, getState, context) => {\r\n dispatch({ type: ActionTypes.APPUSER_USER_EDIT, appUser: appUser });\r\n }\r\n};\r\n","import { AppThunkAction } from '.././';\r\nimport * as ActionTypes from './ActionTypes';\r\nimport { AppContext } from '../../context/Contexts';\r\nimport { CaseSettings } from '../../interfaces/CaseSettings';\r\nimport {\r\n Case,\r\n CaseVehicleHistory,\r\n CaseEventHistory,\r\n CaseStatusHistory,\r\n CasePartnerHistory,\r\n CaseValuationHistory,\r\n CaseClient,\r\n CaseParameterHistory,\r\n CaseTariffValueHistory,\r\n CaseCalculationHistory\r\n} from '../../interfaces/Case';\r\nimport { WorkflowSectionStep } from '../../interfaces/Workflow';\r\n\r\ninterface CaseSettingsSetCaseAction {\r\n type: typeof ActionTypes.CASE_SETTINGS_SET_CASE;\r\n caseSettings: CaseSettings | null;\r\n case: Case;\r\n}\r\n\r\ninterface CaseSettingsSetCaseVehicleAction {\r\n type: typeof ActionTypes.CASE_SETTINGS_SET_CASE_VEHICLE;\r\n caseVehicle: CaseVehicleHistory;\r\n}\r\n\r\ninterface CaseSettingsSetCaseEventAction {\r\n type: typeof ActionTypes.CASE_SETTINGS_SET_CASE_EVENT;\r\n caseEvent: CaseEventHistory;\r\n}\r\ninterface CaseSettingsSetCaseStatusAction {\r\n type: typeof ActionTypes.CASE_SETTINGS_SET_CASE_STATUS;\r\n caseStatus: CaseStatusHistory;\r\n}\r\ninterface CaseSettingsSetCaseValuationAction {\r\n type: typeof ActionTypes.CASE_SETTINGS_SET_CASE_VALUATION;\r\n caseValuation: CaseValuationHistory;\r\n}\r\ninterface CaseSettingsSetLoadingAction {\r\n type: typeof ActionTypes.CASE_SETTINGS_SET_LOADING;\r\n isLoading: boolean;\r\n}\r\n\r\ninterface CaseSettingsAddPartnerAction {\r\n type: typeof ActionTypes.CASE_SETTINGS_ADD_CASE_PARTNER;\r\n partner: CasePartnerHistory;\r\n}\r\n\r\ninterface CaseSettingsSetClientDataAction {\r\n type: typeof ActionTypes.CASE_SETTINGS_SET_CLIENT_DATA;\r\n caseClientData: CaseClient;\r\n}\r\n\r\ninterface CaseSettingsSetVehicleDataAction {\r\n type: typeof ActionTypes.CASE_SETTINGS_SET_VEHICLE_DATA;\r\n vehicleId: number;\r\n}\r\n\r\ninterface CaseSettingsUpdateParametersAction {\r\n type: typeof ActionTypes.CASE_SETTINGS_UPDATE_PARAMETERS;\r\n caseParameter: CaseParameterHistory;\r\n}\r\n\r\ninterface CaseSettingsUpdateTariffValueAction {\r\n type: typeof ActionTypes.CASE_SETTINGS_UPDATE_TARIFF_VALUE;\r\n tariffValue: CaseTariffValueHistory;\r\n}\r\n\r\ninterface CaseSettingsSetCaseCalculationHistoryAction {\r\n type: typeof ActionTypes.CASE_SETTINGS_SET_CASE_CALCULATION_HISTORY;\r\n caseCalculationHistory: CaseCalculationHistory;\r\n}\r\n\r\ninterface CaseSettingsSetCarInServiceAction {\r\n type: typeof ActionTypes.CASE_SETTINGS_SET_CAR_IN_SERVICE;\r\n carInService: boolean;\r\n carInServiceDate: Date | null;\r\n}\r\n\r\nexport type CaseSettingsAction =\r\n | CaseSettingsSetCaseAction\r\n | CaseSettingsSetCaseStatusAction\r\n | CaseSettingsSetLoadingAction\r\n | CaseSettingsSetCaseVehicleAction\r\n | CaseSettingsSetCaseEventAction\r\n | CaseSettingsAddPartnerAction\r\n | CaseSettingsSetCaseValuationAction\r\n | CaseSettingsSetClientDataAction\r\n | CaseSettingsSetVehicleDataAction\r\n | CaseSettingsUpdateParametersAction\r\n | CaseSettingsUpdateTariffValueAction\r\n | CaseSettingsSetCaseCalculationHistoryAction\r\n | CaseSettingsSetCarInServiceAction;\r\n\r\nexport const CaseSettingsActionCreators = {\r\n SetCaseSettings:\r\n (caseId: number): AppThunkAction =>\r\n async (dispatch, getState, context) => {\r\n const caseSettingsService = (context as AppContext).caseSettingsService;\r\n const caseService = (context as AppContext).caseService;\r\n\r\n dispatch({ type: ActionTypes.CASE_SETTINGS_SET_LOADING, isLoading: true });\r\n\r\n const curentCase = await caseService.GetCaseDetails(caseId);\r\n const currentCaseSettings = await caseSettingsService.GetCaseSettings(\r\n curentCase.caseWorkflow.workflowId\r\n );\r\n\r\n currentCaseSettings!.workflow.workflowSections!.forEach((section) => {\r\n section.workflowSectionSteps.forEach((step) => {\r\n step.isCurrent = function (caseStatusId: number) {\r\n const result = this.workflowSectionStepCaseStatuses.find(\r\n (cs) => cs.caseStatusId === caseStatusId\r\n );\r\n return result !== undefined;\r\n };\r\n });\r\n\r\n section.isCurrent = function (caseStatusId: number) {\r\n return (\r\n this.workflowSectionSteps.find((item) => item.isCurrent(caseStatusId)) !== undefined\r\n );\r\n };\r\n });\r\n\r\n dispatch({\r\n type: ActionTypes.CASE_SETTINGS_SET_CASE,\r\n caseSettings: currentCaseSettings,\r\n case: curentCase\r\n });\r\n },\r\n\r\n SetCaseClientData:\r\n (clientData: CaseClient): AppThunkAction =>\r\n async (dispatch, getState, context) => {\r\n dispatch({\r\n type: ActionTypes.CASE_SETTINGS_SET_CLIENT_DATA,\r\n caseClientData: clientData\r\n });\r\n },\r\n\r\n SetCaseVehicleData:\r\n (vehicleId: number): AppThunkAction =>\r\n async (dispatch, getState, context) => {\r\n dispatch({\r\n type: ActionTypes.CASE_SETTINGS_SET_VEHICLE_DATA,\r\n vehicleId: vehicleId\r\n });\r\n },\r\n\r\n UpdateCaseParameters:\r\n (caseParameterArg: CaseParameterHistory): AppThunkAction =>\r\n async (dispatch, getState, context) => {\r\n dispatch({\r\n type: ActionTypes.CASE_SETTINGS_UPDATE_PARAMETERS,\r\n caseParameter: caseParameterArg\r\n });\r\n },\r\n\r\n UpdateCaseTariffvalue:\r\n (tariffValue: CaseTariffValueHistory): AppThunkAction =>\r\n async (dispatch, getState, context) => {\r\n dispatch({\r\n type: ActionTypes.CASE_SETTINGS_UPDATE_TARIFF_VALUE,\r\n tariffValue: tariffValue\r\n });\r\n },\r\n\r\n SetCaseVehicle:\r\n (vehicle: CaseVehicleHistory): AppThunkAction =>\r\n async (dispatch, getState, context) => {\r\n dispatch({\r\n type: ActionTypes.CASE_SETTINGS_SET_CASE_VEHICLE,\r\n caseVehicle: vehicle\r\n });\r\n },\r\n\r\n SetCaseEvent:\r\n (event: CaseEventHistory): AppThunkAction =>\r\n async (dispatch, getState, context) => {\r\n dispatch({\r\n type: ActionTypes.CASE_SETTINGS_SET_CASE_EVENT,\r\n caseEvent: event\r\n });\r\n },\r\n\r\n SetCaseValuation:\r\n (valuation: CaseValuationHistory): AppThunkAction =>\r\n async (dispatch, getState, context) => {\r\n dispatch({\r\n type: ActionTypes.CASE_SETTINGS_SET_CASE_VALUATION,\r\n caseValuation: valuation\r\n });\r\n },\r\n\r\n SetCaseStatus:\r\n (caseStatus: CaseStatusHistory): AppThunkAction =>\r\n async (dispatch, getState, context) => {\r\n if (caseStatus === null) {\r\n return;\r\n }\r\n const appUserService = (context as AppContext).appUserService;\r\n const users = await appUserService.GetUsersInfo(\r\n Array.from(new Set([caseStatus.assignedToId, caseStatus.userId]))\r\n );\r\n\r\n caseStatus.assignedTo = users.find((item) => item.id === caseStatus.assignedToId)!;\r\n caseStatus.user = users.find((item) => item.id === caseStatus.userId)!;\r\n\r\n dispatch({\r\n type: ActionTypes.CASE_SETTINGS_SET_CASE_STATUS,\r\n caseStatus: caseStatus\r\n });\r\n },\r\n\r\n AddPartner:\r\n (organizationId: number | null): AppThunkAction =>\r\n async (dispatch, getState, context) => {\r\n if (organizationId === null) {\r\n return;\r\n }\r\n const orgService = (context as AppContext).organizationService;\r\n\r\n const state = getState();\r\n if (\r\n state.caseSettings!.case!.casePartners.find(\r\n (item) => item.organizationId === organizationId\r\n ) !== undefined\r\n ) {\r\n return;\r\n }\r\n\r\n const organization = await orgService.GetOrganization(organizationId);\r\n\r\n const firstPrtner = state.caseSettings!.case!.casePartners[0];\r\n\r\n dispatch({\r\n type: ActionTypes.CASE_SETTINGS_ADD_CASE_PARTNER,\r\n partner: {\r\n id: 0,\r\n caseWorkflowHistoryId: firstPrtner.caseWorkflowHistoryId,\r\n caseId: firstPrtner.caseWorkflowHistoryId,\r\n organization: organization,\r\n organizationId: organization.id,\r\n date: new Date(),\r\n user: state.app!.appUser,\r\n userId: state.app!.appUser!.id!\r\n }\r\n });\r\n },\r\n\r\n SetCaseCalculationHistory:\r\n (caseCalculationHistory: CaseCalculationHistory): AppThunkAction =>\r\n async (dispatch, getState, context) => {\r\n dispatch({\r\n type: ActionTypes.CASE_SETTINGS_SET_CASE_CALCULATION_HISTORY,\r\n caseCalculationHistory: caseCalculationHistory\r\n });\r\n },\r\n\r\n SetCarInService:\r\n (carInService: boolean, carInServiceDate: Date | null): AppThunkAction =>\r\n async (dispatch, getState, context) => {\r\n dispatch({\r\n type: ActionTypes.CASE_SETTINGS_SET_CAR_IN_SERVICE,\r\n carInService: carInService,\r\n carInServiceDate: carInServiceDate\r\n });\r\n },\r\n};\r\n\r\nconst isStepCurrent = (step: WorkflowSectionStep, caseStatusId: number): boolean => {\r\n const result = step.workflowSectionStepCaseStatuses.find(\r\n (cs) => cs.caseStatusId === caseStatusId\r\n );\r\n return result !== undefined;\r\n};\r\n","import { AppContext } from '../../context/Contexts';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport { Vehicle, VehicleStatusHistory } from '../../interfaces/Vehicle';\r\nimport { AppThunkAction } from '.././';\r\nimport * as ActionTypes from './ActionTypes';\r\n\r\ninterface SetVehicleAction {\r\n type: typeof ActionTypes.VEHICLE_SET_VEHICLE;\r\n vehicle: Vehicle | null;\r\n}\r\ninterface SetVehicleStatusAction {\r\n type: typeof ActionTypes.VEHICLE_SET_VEHICLE_STATUS;\r\n status: VehicleStatusHistory;\r\n}\r\ninterface ResetVehicleStateAction {\r\n type: typeof ActionTypes.VEHICLE_RESET_STATE;\r\n}\r\ninterface SetVehicleLoadingAction {\r\n type: typeof ActionTypes.VEHICLE_SET_VEHICLE_LOADING;\r\n loading: boolean;\r\n}\r\n\r\nexport type VehicleAction =\r\n | SetVehicleAction\r\n | SetVehicleStatusAction\r\n | SetVehicleLoadingAction\r\n | ResetVehicleStateAction;\r\n\r\nexport const VehicleActionCreators = {\r\n setVehicle:\r\n (vehicleId: number): AppThunkAction =>\r\n async (dispatch, getState, context) => {\r\n dispatch({ type: ActionTypes.VEHICLE_SET_VEHICLE_LOADING, loading: true });\r\n const vehicleService = (context as AppContext).vehicleService;\r\n\r\n const vehicle = await vehicleService.GetVehicle(vehicleId);\r\n dispatch({ type: ActionTypes.VEHICLE_SET_VEHICLE, vehicle: vehicle });\r\n dispatch({ type: ActionTypes.VEHICLE_SET_VEHICLE_LOADING, loading: false });\r\n },\r\n\r\n setVehicleObject:\r\n (vehicle: Vehicle | null): AppThunkAction =>\r\n async (dispatch, getState, context) => {\r\n dispatch({ type: ActionTypes.VEHICLE_SET_VEHICLE, vehicle: vehicle });\r\n },\r\n\r\n changeVehicleStatus:\r\n (statusHis: VehicleStatusHistory): AppThunkAction =>\r\n async (dispatch, getState, context) => {\r\n dispatch({ type: ActionTypes.VEHICLE_SET_VEHICLE_STATUS, status: statusHis });\r\n },\r\n\r\n resetVehicleState: (): AppThunkAction => async (dispatch, getState, context) => {\r\n dispatch({ type: ActionTypes.VEHICLE_RESET_STATE });\r\n }\r\n};\r\n","import { WeatherForecastsReducer, WeatherForecastsState } from './reducers/WeatherForecasts';\r\nimport { AppReducer, AppState } from './reducers/App';\r\nimport { ThemeState, ThemeOptionsReducer } from './reducers/ThemeOptions';\r\nimport { AppUserAdminState, AppUserAdminReducer } from './reducers/AppUserAdmin';\r\nimport { CaseSettingsState, AppCaseSettingsReducer } from './reducers/CaseSettings';\r\nimport { VehicleState, VehicleReducer } from './reducers/Vehicle';\r\nimport { MavoVehicleReducer } from './reducers/MavoVehicle';\r\nimport { VehicleAuctionReducer, VehicleAuctionState } from './reducers/VehicleAuction';\r\nimport { AgendaReducer } from './reducers/Agenda';\r\n\r\nexport * from './reducers/WeatherForecasts';\r\nexport * from './actions/WeatherForecasts';\r\nexport * from './reducers/App';\r\nexport * from './actions/App';\r\nexport * from './reducers/ThemeOptions';\r\nexport * from './actions/ThemeOptions';\r\nexport * from './reducers/AppUserAdmin';\r\nexport * from './actions/AppUserAdmin';\r\nexport * from './reducers/CaseSettings';\r\nexport * from './actions/CaseSettings';\r\nexport * from './reducers/Vehicle';\r\nexport * from './actions/Vehicle';\r\n\r\n// state object\r\nexport interface ApplicationState {\r\n weatherForecasts: WeatherForecastsState | undefined;\r\n app: AppState | undefined;\r\n themeOptions: ThemeState | undefined;\r\n appUserAdmin: AppUserAdminState | undefined;\r\n caseSettings: CaseSettingsState | undefined;\r\n vehicle: VehicleState | undefined;\r\n mavoVehicle: VehicleState | undefined;\r\n mavoVehicleAuction: VehicleAuctionState | undefined;\r\n}\r\n\r\n// reducers\r\nexport const reducers = {\r\n weatherForecasts: WeatherForecastsReducer,\r\n app: AppReducer,\r\n themeOptions: ThemeOptionsReducer,\r\n appUserAdmin: AppUserAdminReducer,\r\n caseSettings: AppCaseSettingsReducer,\r\n vehicle: VehicleReducer,\r\n mavoVehicle: MavoVehicleReducer,\r\n mavoVehicleAuction: VehicleAuctionReducer,\r\n agenda: AgendaReducer\r\n};\r\n\r\n// This type can be used as a hint on action creators so that its 'dispatch' and 'getState' params are\r\n// correctly typed to match your store.\r\nexport interface AppThunkAction {\r\n (dispatch: (action: TAction) => void, getState: () => ApplicationState, context: any): void;\r\n}\r\n","import { AnyAction, applyMiddleware, combineReducers, compose, createStore } from 'redux';\r\nimport thunk, { ThunkDispatch } from 'redux-thunk';\r\nimport { connectRouter, routerMiddleware } from 'connected-react-router';\r\nimport { History } from 'history';\r\nimport { ApplicationState, reducers } from './';\r\nimport { AppContext } from '../context/Contexts';\r\nimport { TypedUseSelectorHook, useDispatch, useSelector } from 'react-redux';\r\nimport { store } from '..';\r\n\r\nexport default function configureStore(\r\n history: History,\r\n appcontext: AppContext,\r\n initialState?: ApplicationState\r\n) {\r\n const middleware = [thunk.withExtraArgument(appcontext), routerMiddleware(history)];\r\n\r\n const rootReducer = combineReducers({\r\n ...reducers,\r\n router: connectRouter(history)\r\n });\r\n\r\n const enhancers = [];\r\n const windowIfDefined = typeof window === 'undefined' ? null : (window as any);\r\n if (windowIfDefined && windowIfDefined.__REDUX_DEVTOOLS_EXTENSION__) {\r\n enhancers.push(windowIfDefined.__REDUX_DEVTOOLS_EXTENSION__());\r\n }\r\n\r\n return createStore(\r\n rootReducer,\r\n initialState,\r\n compose(applyMiddleware(...middleware), ...enhancers)\r\n );\r\n}\r\n\r\nexport type AppThunkDispatch = ThunkDispatch;\r\nexport const useAppDispatch = () => useDispatch();\r\nexport const useAppSelector: TypedUseSelectorHook = useSelector;\r\n\r\nexport type RootState = ReturnType;","import * as React from 'react';\r\n\r\nimport { IAuthService } from '../../services/Interfaces/IAuthService';\r\nimport { ApplicationContext, AppContext } from '../../context/Contexts';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport { AppActionCreators, ApplicationState, AppState } from '../../store';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { Button, Grid, IconButton, List, ListItem } from '@material-ui/core';\r\nimport { isNullOrUndefined } from 'util';\r\nimport { withRouter } from 'react-router';\r\nimport moment from 'moment';\r\nimport StarBorderIcon from '@material-ui/icons/StarBorder';\r\nimport CheckIcon from '@material-ui/icons/Check';\r\nimport { IAppUserService } from '../../services/Interfaces/IAppUserService';\r\nimport { IOrganizationService } from '../../services/Interfaces/IOrganizationService';\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { CountryCodeEnum } from '../../helpers/Constants';\r\nimport DeleteOutlineTwoToneIcon from '@material-ui/icons/DeleteOutlineTwoTone';\r\n\r\nexport interface ExternalCaseNewInNotificationProps {\r\n onClick?: () => void;\r\n}\r\n\r\ntype CaseNewInNotificationProps = { appState: AppState } & typeof AppActionCreators &\r\n RouteComponentProps &\r\n ExternalCaseNewInNotificationProps;\r\n\r\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\r\ninterface ICaseNewInNotificationState {}\r\n\r\nclass CaseNewInNotification extends React.PureComponent<\r\n CaseNewInNotificationProps,\r\n ICaseNewInNotificationState\r\n> {\r\n private authService!: IAuthService;\r\n private translatorService!: ITranslatorService;\r\n private caseService!: ICaseService;\r\n private appUserService!: IAppUserService;\r\n private organizationService!: IOrganizationService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {} as ICaseNewInNotificationState;\r\n\r\n onClick = async (id: number, caseStatusId: number, moveToViewed: boolean, notNew: boolean) => {\r\n try {\r\n await this.caseService.SetCaseNotNew(id, caseStatusId, false, moveToViewed, notNew);\r\n\r\n this.props.MarkAsViewedNewInCase(id);\r\n\r\n const currentPath = this.props.history.location.pathname.toLowerCase();\r\n this.props.history.push('/cases/' + id);\r\n\r\n if (currentPath.indexOf('/cases/') !== -1) {\r\n this.props.history.go(0);\r\n }\r\n\r\n if (this.props.onClick !== undefined) {\r\n this.props.onClick();\r\n }\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n };\r\n\r\n handleAddToTaskList = async (id: number, caseStatusId: number, addToTaskList: boolean, moveToViewed: boolean, notNew: boolean) => {\r\n try {\r\n await this.caseService.SetCaseNotNew(id, caseStatusId, addToTaskList, moveToViewed, notNew);\r\n\r\n if (notNew) {\r\n this.props.RemoveNewInCase(id);\r\n }\r\n\r\n if (addToTaskList) {\r\n this.props.LoadTasks();\r\n }\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n };\r\n\r\n public render() {\r\n this.authService = (this.context as AppContext).authenticationService;\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n this.appUserService = (this.context as AppContext).appUserService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.props.appState.isNewInCasesLoading && this.props.appState.newInCases.length === 0 ? (\r\n
\r\n
\r\n
\r\n {/* */}\r\n \r\n
\r\n
\r\n
\r\n ) : null}\r\n\r\n {!this.props.appState.isNewInCasesLoading && this.props.appState.newInCases.length !== 0 ? (\r\n \r\n {this.props.appState.newInCases.map((item, index) => (\r\n \r\n \r\n \r\n \r\n {index + 1}\r\n \r\n \r\n \r\n this.onClick(item.id, item.caseStatus.id, true, false)}\r\n style={{ cursor: 'pointer' }}\r\n >\r\n {item.id}\r\n \r\n
\r\n {item.caseStatus.caseStatus!.displayName}\r\n
\r\n
\r\n {isNullOrUndefined(item.caseEvent) ? '' : item.caseEvent.caseNumber}\r\n
\r\n
\r\n\r\n \r\n
{item.caseType!.displayName}
\r\n
\r\n {isNullOrUndefined(item.caseVehicle) ? '' : item.caseVehicle.plateNumber}\r\n
\r\n
\r\n \r\n
\r\n {this.props.appState.appUser?.organization?.country?.code?.toUpperCase() === CountryCodeEnum.CZ.toString() ? null : item.organizationOwner!.name}\r\n
\r\n
\r\n {moment\r\n .utc(item.caseStatus.date)\r\n .local()\r\n .format(this.props.appState.longDateFormat)}\r\n
\r\n
\r\n \r\n {this.props.appState.appUser?.organization?.country?.code?.toUpperCase() === CountryCodeEnum.CZ.toString() ? null : (\r\n {\r\n this.handleAddToTaskList(item.id, item.caseStatus.id, true, false, true);\r\n }}\r\n >\r\n \r\n \r\n )}\r\n {\r\n this.handleAddToTaskList(item.id, item.caseStatus.id, false, false, true);\r\n }} \r\n >\r\n \r\n \r\n \r\n
\r\n
\r\n ))}\r\n
\r\n ) : null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalCaseNewInNotificationProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app\r\n }),\r\n AppActionCreators,\r\n mergeProps\r\n)(withRouter(CaseNewInNotification as any));\r\n","import * as React from 'react';\r\n\r\nimport { IAuthService } from '../../services/Interfaces/IAuthService';\r\nimport { ApplicationContext, AppContext } from '../../context/Contexts';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport { AppActionCreators, ApplicationState, AppState } from '../../store';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { Button, Grid, IconButton, List, ListItem } from '@material-ui/core';\r\nimport { isNullOrUndefined } from 'util';\r\nimport { withRouter } from 'react-router';\r\nimport StarBorderIcon from '@material-ui/icons/StarBorder';\r\nimport { IAppUserService } from '../../services/Interfaces/IAppUserService';\r\nimport moment from 'moment';\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { CountryCodeEnum } from '../../helpers/Constants';\r\nimport DeleteOutlineTwoToneIcon from '@material-ui/icons/DeleteOutlineTwoTone';\r\n\r\nexport interface ExternalCaseMessageNotificationProps {\r\n onClick?: () => void;\r\n}\r\n\r\ntype CaseMessageNotificationProps = { appState: AppState } & typeof AppActionCreators &\r\n ExternalCaseMessageNotificationProps &\r\n RouteComponentProps;\r\n\r\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\r\ninterface ICaseMessageNotificationState {}\r\n\r\nclass CaseMessageNotification extends React.PureComponent<\r\n CaseMessageNotificationProps,\r\n ICaseMessageNotificationState\r\n> {\r\n private authService!: IAuthService;\r\n private translatorService!: ITranslatorService;\r\n private caseService!: ICaseService;\r\n private appUserService!: IAppUserService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {} as ICaseMessageNotificationState;\r\n\r\n onClick = async (id: number) => {\r\n try {\r\n await this.caseService.RemoveUserComment(id, false);\r\n this.props.RemoveComment(id);\r\n\r\n const currentPath = this.props.history.location.pathname.toLowerCase();\r\n this.props.history.push('/cases/' + id);\r\n\r\n if (currentPath.indexOf('/cases/') !== -1) {\r\n this.props.history.go(0);\r\n }\r\n if (this.props.onClick !== undefined) {\r\n this.props.onClick();\r\n }\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n };\r\n\r\n handleAddToTaskList = async (id: number) => {\r\n try {\r\n await this.caseService.RemoveUserComment(id, true);\r\n this.props.RemoveComment(id);\r\n this.props.LoadTasks();\r\n } catch (ex) {\r\n console.log(ex);\r\n }\r\n };\r\n\r\n handleCheck = async (id: number) => {\r\n try {\r\n await this.caseService.RemoveUserComment(id, false);\r\n this.props.RemoveComment(id);\r\n } catch (ex) {\r\n console.log(ex);\r\n }\r\n };\r\n\r\n public render() {\r\n this.authService = (this.context as AppContext).authenticationService;\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n this.appUserService = (this.context as AppContext).appUserService;\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n\r\n {!this.props.appState.isCommentsLoading && this.props.appState.comments.length === 0 ? (\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n ) : null}\r\n\r\n {!this.props.appState.isCommentsLoading && this.props.appState.comments.length !== 0 ? (\r\n \r\n {this.props.appState.comments.map((item, index) => (\r\n \r\n \r\n \r\n \r\n this.onClick(isNullOrUndefined(item) ? 0 : item.caseId)}\r\n >\r\n {isNullOrUndefined(item) ? '' : item.caseId}\r\n \r\n
{item.case.caseStatus.caseStatus!.displayName}
\r\n
\r\n\r\n \r\n
\r\n {isNullOrUndefined(item.user)\r\n ? ''\r\n : item.user.firstName +\r\n ' ' +\r\n item.user.lastName +\r\n ' (' +\r\n item.user.organization!.hoName +\r\n ')'}\r\n
\r\n
\r\n {moment\r\n .utc(item.date)\r\n .local()\r\n .format(this.props.appState.longDateFormat)}\r\n
\r\n
\r\n \r\n {this.props.appState.appUser?.organization?.country?.code?.toUpperCase() === CountryCodeEnum.CZ.toString() ? null : (\r\n {\r\n this.handleAddToTaskList(item.id);\r\n }}\r\n >\r\n \r\n \r\n )}\r\n \r\n
\r\n \r\n \r\n
\r\n {isNullOrUndefined(item) ? '' : item.text}\r\n
\r\n
\r\n \r\n {\r\n this.handleCheck(item.id);\r\n }}\r\n >\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n ))}\r\n
\r\n ) : null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalCaseMessageNotificationProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app\r\n }),\r\n AppActionCreators,\r\n mergeProps\r\n)(withRouter(CaseMessageNotification as any));\r\n","import * as React from 'react';\r\n\r\nimport { IAuthService } from '../../services/Interfaces/IAuthService';\r\nimport { ApplicationContext, AppContext } from '../../context/Contexts';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport { AppActionCreators, ApplicationState, AppState } from '../../store';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { Button, Grid, IconButton, ListItem } from '@material-ui/core';\r\nimport { isNullOrUndefined } from 'util';\r\nimport { withRouter } from 'react-router';\r\nimport moment from 'moment';\r\nimport StarIcon from '@material-ui/icons/Star';\r\nimport PerfectScrollbar from 'react-perfect-scrollbar';\r\nimport { IOrganizationService } from '../../services/Interfaces/IOrganizationService';\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\n\r\nexport interface ExternalCaseNotificationsProps {\r\n onClick?: () => void;\r\n}\r\n\r\ntype CaseTaskProps = { appState: AppState } & typeof AppActionCreators &\r\n RouteComponentProps &\r\n ExternalCaseNotificationsProps;\r\n\r\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\r\ninterface ICaseTaskState {}\r\n\r\nclass CaseTasks extends React.PureComponent {\r\n private authService!: IAuthService;\r\n private translatorService!: ITranslatorService;\r\n private caseService!: ICaseService;\r\n private organizationService!: IOrganizationService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {} as ICaseTaskState;\r\n\r\n onClick = (id: number) => {\r\n const currentPath = this.props.history.location.pathname.toLowerCase();\r\n this.props.history.push('/cases/' + id);\r\n\r\n if (currentPath.indexOf('/cases/') !== -1) {\r\n this.props.history.go(0);\r\n }\r\n\r\n if (this.props.onClick !== undefined) {\r\n this.props.onClick();\r\n }\r\n };\r\n\r\n handleDeleteFromTaskList = async (id: number) => {\r\n try {\r\n await this.caseService.RemoveUserTask(id);\r\n\r\n this.props.RemoveTask(id);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n };\r\n\r\n public render() {\r\n this.authService = (this.context as AppContext).authenticationService;\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n\r\n {!this.props.appState.isTasksLoading && this.props.appState.tasks.length === 0 ? (\r\n
\r\n
\r\n
\r\n {/* */}\r\n \r\n
\r\n
\r\n
\r\n ) : null}\r\n {!this.props.appState.isTasksLoading && this.props.appState.tasks.length !== 0 ? (\r\n \r\n {this.props.appState.tasks.map((item, index) => (\r\n \r\n \r\n \r\n this.onClick(item.id)}\r\n >\r\n {item.id}\r\n \r\n
{item.caseStatus.caseStatus!.displayName}
\r\n
\r\n {isNullOrUndefined(item.caseEvent) ? '' : item.caseEvent.caseNumber}\r\n
\r\n
\r\n\r\n \r\n
{isNullOrUndefined(item.caseType) ? '' : item.caseType.displayName}
\r\n
\r\n {isNullOrUndefined(item.caseVehicle) ? '' : item.caseVehicle.plateNumber}\r\n
\r\n
\r\n \r\n
\r\n {isNullOrUndefined(item.organizationOwner) ? '' : item.organizationOwner.name}\r\n
\r\n
\r\n {moment\r\n .utc(item.dateCreation)\r\n .local()\r\n .format(this.props.appState.longDateFormat)}\r\n
\r\n
\r\n \r\n {\r\n this.handleDeleteFromTaskList(item.id);\r\n }}\r\n >\r\n \r\n \r\n \r\n
\r\n
\r\n ))}\r\n
\r\n ) : null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app\r\n }),\r\n AppActionCreators\r\n)(withRouter(CaseTasks as any));\r\n","import * as React from 'react';\r\n\r\nimport { ApplicationContext, AppContext } from '../../context/Contexts';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport { AppActionCreators, ApplicationState, AppState } from '../../store';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { Button, Grid, IconButton, List, ListItem } from '@material-ui/core';\r\nimport { isNullOrUndefined } from 'util';\r\nimport { withRouter } from 'react-router';\r\nimport moment from 'moment';\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport DeleteOutlineTwoToneIcon from '@material-ui/icons/DeleteOutlineTwoTone';\r\n\r\nexport interface ExternalAppointmentNewInNotificationProps {\r\n onClick?: () => void;\r\n}\r\n\r\ntype AppointmentNewInNotificationProps = { appState: AppState } & typeof AppActionCreators &\r\n RouteComponentProps &\r\n ExternalAppointmentNewInNotificationProps;\r\n\r\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\r\ninterface IAppointmentNewInNotificationState {}\r\n\r\nclass AppointmentNewInNotification extends React.PureComponent<\r\n AppointmentNewInNotificationProps,\r\n IAppointmentNewInNotificationState\r\n> {\r\n private caseService!: ICaseService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {} as IAppointmentNewInNotificationState;\r\n\r\n onClick = async (id: number, appointmentStatusHistoryId: number, moveToViewed: boolean, notNew: boolean) => {\r\n try {\r\n await this.caseService.SetAppointmentNotNew(id, appointmentStatusHistoryId, moveToViewed, notNew);\r\n\r\n this.props.MarkAsViewedNewInAppointment(id);\r\n\r\n const currentPath = this.props.history.location.pathname.toLowerCase();\r\n this.props.history.push('/appointment/' + id);\r\n\r\n if (currentPath.indexOf('/appointment/') !== -1) {\r\n this.props.history.go(0);\r\n }\r\n\r\n if (this.props.onClick !== undefined) {\r\n this.props.onClick();\r\n }\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n };\r\n\r\n IsAppointmentNotNew = async (id: number, appointmentStatusHistoryId: number, moveToViewed: boolean, notNew: boolean) => {\r\n try {\r\n await this.caseService.SetAppointmentNotNew(id, appointmentStatusHistoryId, moveToViewed, notNew);\r\n\r\n if (notNew) {\r\n this.props.RemoveNewInAppointment(id);\r\n }\r\n\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n };\r\n\r\n public render() {\r\n this.caseService = (this.context as AppContext).caseService;\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.props.appState.isNewInAppointmentsLoading && this.props.appState.newInAppointments.length === 0 ? (\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n ) : null}\r\n\r\n {!this.props.appState.isNewInAppointmentsLoading && this.props.appState.newInAppointments.length !== 0 ? (\r\n \r\n {this.props.appState.newInAppointments.map((item, index) => (\r\n \r\n \r\n \r\n \r\n {index + 1}\r\n \r\n \r\n \r\n this.onClick(item.id, item.appointmentStatusHistory.id, true, false)}\r\n style={{ cursor: 'pointer' }}\r\n >\r\n {item.id}\r\n \r\n
\r\n {item.appointmentStatusHistory.appointmentStatus!.displayName}\r\n
\r\n
\r\n\r\n \r\n
\r\n {item.appointmentCategoryType!.displayName}\r\n
\r\n
\r\n {isNullOrUndefined(item.vehicle) ? '' : item.vehicle.plateNumber}\r\n
\r\n
\r\n \r\n
\r\n {moment\r\n .utc(item.appointmentStatusHistory.date)\r\n .local()\r\n .format(this.props.appState.longDateFormat)}\r\n
\r\n
\r\n \r\n {\r\n this.IsAppointmentNotNew(item.id, item.appointmentStatusHistory.id, false, true);\r\n }}\r\n >\r\n \r\n \r\n \r\n
\r\n
\r\n ))}\r\n
\r\n ) : null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalAppointmentNewInNotificationProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app\r\n }),\r\n AppActionCreators,\r\n mergeProps\r\n)(withRouter(AppointmentNewInNotification as any));\r\n","import { Grid, Card, Box } from '@material-ui/core';\r\nimport * as React from 'react';\r\nimport { ApplicationContext } from '../context/Contexts';\r\nimport { useContext } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport CaseNewInNotification from '../components/cases/CaseNewInNotification';\r\nimport CaseMessageNotification from '../components/cases/CaseMessageNotification';\r\nimport CaseTask from '../components/cases/CaseTask';\r\nimport PerfectScrollbar from 'react-perfect-scrollbar';\r\nimport { useState } from 'react';\r\nimport { Guid } from 'guid-typescript';\r\nimport AppointmentNewInNotification from './cases/AppointmentNewInNotification';\r\nimport { AppActionCreators, ApplicationState, AppState } from '../store';\r\nimport { withRouter } from 'react-router';\r\nimport { CountryCodeEnum } from '../helpers/Constants';\r\nimport { TranslatorService } from '../services/TranslatorService';\r\n\r\nconst Home = (props: any) => {\r\n const context = useContext(ApplicationContext);\r\n const translatorService = new TranslatorService();\r\n\r\n const [changeUID, setUID] = useState('');\r\n return (\r\n \r\n \r\n {props.appState.appUser?.organization?.country?.code?.toUpperCase() === CountryCodeEnum.CZ.toString() ? (\r\n <>\r\n \r\n \r\n \r\n
\r\n
\r\n {translatorService.Tranlate('APPOINTMENTS_NEW_ENTRIES', 'Programari')}\r\n
\r\n
\r\n
\r\n \r\n {\r\n setUID(Guid.create().toString());\r\n } }\r\n >\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n {translatorService.Tranlate('CASE_NEW_ENTRIES', 'Dosare')}\r\n
\r\n
\r\n
\r\n \r\n {\r\n setUID(Guid.create().toString());\r\n } }\r\n >\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n {translatorService.Tranlate('CASE_MESSAGES', 'Mesaje')}\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n ) : (\r\n <>\r\n \r\n \r\n \r\n
\r\n
\r\n {translatorService.Tranlate('CASE_NEW_ENTRIES', 'Dosare')}\r\n
\r\n
\r\n
\r\n \r\n {\r\n setUID(Guid.create().toString());\r\n } }\r\n >\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n {translatorService.Tranlate('APPOINTMENTS_NEW_ENTRIES', 'Programari')}\r\n
\r\n
\r\n
\r\n \r\n {\r\n setUID(Guid.create().toString());\r\n } }\r\n >\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n {translatorService.Tranlate('CASE_MESSAGES', 'Mesaje')}\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n {translatorService.Tranlate('CASE_TASKS', 'Lista sarcini')}\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n ) }\r\n
\r\n
\r\n );\r\n};\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: any\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app\r\n }),\r\n AppActionCreators,\r\n mergeProps\r\n)(withRouter(Home as any));","import React from 'react';\r\nimport { ApplicationContext, AppContext } from '../../context/Contexts';\r\nimport { IAuthService } from '../../services/Interfaces/IAuthService';\r\nimport { IOrganizationService } from '../../services/Interfaces/IOrganizationService';\r\nimport { AppState, ApplicationState, AppActionCreators } from '../../store';\r\nimport { connect } from 'react-redux';\r\nimport { Organization, OrganizationType } from '../../interfaces/Organization';\r\nimport { ITariffService } from '../../services/Interfaces/ITariffService';\r\nimport { ProviderContext, withSnackbar } from 'notistack';\r\n\r\ntype LogInProps = AppState & typeof AppActionCreators & ProviderContext;\r\n\r\nclass Login extends React.PureComponent<\r\n LogInProps,\r\n { user: any; api: Organization[]; organization: any }\r\n> {\r\n private authService!: IAuthService;\r\n private organizationService!: IOrganizationService;\r\n private tariffService!: ITariffService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n constructor(props: any) {\r\n super(props);\r\n }\r\n\r\n public componentDidMount() {\r\n this.authService = (this.context as AppContext).authenticationService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.tariffService = (this.context as AppContext).tariffService;\r\n\r\n this.getUser();\r\n }\r\n\r\n public login = () => {\r\n this.authService!.loginAsync();\r\n };\r\n\r\n public callApi = async () => {\r\n try {\r\n const result = await this.tariffService.GetTariffTypes(1);\r\n // this.setState({ api: result });\r\n\r\n console.log('Api return successfully data, check in section - Api response');\r\n } catch (error) {\r\n console.log('msg - ' + error);\r\n }\r\n };\r\n\r\n public addApi = async () => {\r\n try {\r\n //let result = await this.organizationService.AddOrganizationType(orgType);\r\n //this.setState({ organization: result });\r\n\r\n console.log('Api return successfully data, check in section - Api response');\r\n } catch (error) {\r\n console.log('msg - ' + error);\r\n }\r\n };\r\n\r\n public updateApi = async () => {\r\n try {\r\n const orgType: OrganizationType = {\r\n code: 'TEST',\r\n gtId: 1,\r\n id: 6,\r\n isActive: true,\r\n name: 'TEST',\r\n translations: [\r\n { language: 'ro-RO', name: 'TEST', id: 0 },\r\n { language: 'en-EN', name: 'TEST', id: 0 }\r\n ],\r\n displayName: ''\r\n };\r\n\r\n await this.organizationService.UpdateOrganizationType(orgType);\r\n // this.setState({ api: result });\r\n\r\n console.log('Api return successfully data, check in section - Api response');\r\n } catch (error) {\r\n console.log('msg - ' + error);\r\n }\r\n };\r\n\r\n public renewToken = () => {\r\n this.authService\r\n .renewTokenAsync()\r\n .then((user) => {\r\n console.log('Token has been sucessfully renewed. :-)');\r\n this.props.SetUser(this.props.enqueueSnackbar);\r\n })\r\n .catch((error) => {\r\n console.error(error);\r\n });\r\n };\r\n\r\n public logout = () => {\r\n this.authService.logoutAsync();\r\n };\r\n\r\n public getUser = () => {\r\n this.authService.getUserAsync().then((user) => {\r\n if (user) {\r\n console.log(user);\r\n console.log(user!.expires_at);\r\n console.log('User has been successfully loaded from store.');\r\n } else {\r\n console.info('You are not logged in.');\r\n }\r\n });\r\n };\r\n\r\n public render() {\r\n return (\r\n
\r\n
\r\n {this.props.user != null ? this.props.user.expires_at : ''}\r\n {this.props.user != null ? this.props.user.profile.name : ''}\r\n \r\n Login\r\n \r\n \r\n Get User info\r\n \r\n \r\n Call API\r\n \r\n\r\n \r\n Add API\r\n \r\n\r\n \r\n Update API\r\n \r\n \r\n Renew Token\r\n \r\n \r\n Logout\r\n \r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect((state: ApplicationState) => state.app, AppActionCreators)(withSnackbar(Login as any));\r\n","import * as React from 'react';\r\nimport { Redirect } from 'react-router';\r\nimport { AppState, AppActionCreators, ApplicationState } from '../../store';\r\nimport { connect } from 'react-redux';\r\nimport { IAuthService } from '../../services/Interfaces/IAuthService';\r\nimport { ApplicationContext, AppContext } from '../../context/Contexts';\r\nimport { History } from 'history';\r\nimport { ProviderContext, withSnackbar } from 'notistack';\r\n\r\ntype LogInCallBackProps = AppState & typeof AppActionCreators & History & ProviderContext;\r\n\r\ninterface LogInCallBackState {\r\n result: string;\r\n}\r\n\r\nclass LogInCallBack extends React.PureComponent {\r\n private authService!: IAuthService;\r\n static contextType = ApplicationContext;\r\n state = {\r\n result: ''\r\n } as LogInCallBackState;\r\n\r\n public async componentDidMount() {\r\n this.authService = (this.context as AppContext).authenticationService;\r\n if (this.props.user === null && this.props.location!.search !== '') {\r\n try { \r\n const result = await this.authService.userManager.signinRedirectCallback();\r\n this.setState({ result: result.state });\r\n } catch (error) {\r\n console.error('Eroare la procesarea callback-ului de autentificare:', error);\r\n // Redirectioneaza utilizatorul catre pagina principala în caz de eroare\r\n if ((error as Error).message?.includes(\"No matching state found in storage\")) {\r\n // Redirectioneaza catre homepage DOAR daca nu a fost gasit \"state\"-ul\r\n console.log(\"No matching state found in storage\");\r\n window.location.href = \"/\";\r\n }\r\n }\r\n }\r\n this.props.SetUser(this.props.enqueueSnackbar);\r\n // await this.authService.checkState();\r\n }\r\n \r\n\r\n public render() {\r\n if (this.props.user === null) {\r\n return null;\r\n }\r\n if (this.state.result !== '') {\r\n return ;\r\n }\r\n\r\n return ;\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => state.app,\r\n AppActionCreators\r\n)(withSnackbar(LogInCallBack as any));\r\n","import * as React from 'react';\r\nimport { AppState, AppActionCreators, ApplicationState } from '../../store';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationContext, AppContext } from '../../context/Contexts';\r\nimport { IAuthService } from '../../services/Interfaces/IAuthService';\r\nimport { History, LocationState } from 'history';\r\nimport { Redirect } from 'react-router';\r\nimport { ProviderContext, withSnackbar } from 'notistack';\r\n\r\ntype RenewCallBackProps = AppState & typeof AppActionCreators & History & ProviderContext;\r\n\r\nclass RenewCallBack extends React.PureComponent {\r\n private authService!: IAuthService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n public async componentDidMount() {\r\n if (this.props.user === null && this.props.location!.search === '') {\r\n this.props.SetUser(this.props.enqueueSnackbar);\r\n return;\r\n }\r\n\r\n this.authService = (this.context as AppContext).authenticationService;\r\n try {\r\n await this.authService.userManager.signinSilentCallback();\r\n } catch (error) {\r\n console.error(error);\r\n }\r\n }\r\n\r\n public render() {\r\n if (this.props.location!.search === '') {\r\n return ;\r\n }\r\n\r\n return null;\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => state.app,\r\n AppActionCreators\r\n)(withSnackbar(RenewCallBack as any));\r\n","import { ITranslatorService } from '../services/Interfaces/ITranslatorService';\r\n\r\nexport class MUITranslations {\r\n public static GetTranslations(translatorService: ITranslatorService): any {\r\n return {\r\n body: {\r\n noMatch: translatorService.Tranlate('NO_RECORDS_TO_DISPLAY', 'Nu exista date de afisat'),\r\n toolTip: translatorService.Tranlate('SORT', 'Sorteaza'),\r\n columnHeaderTooltip: (column: any) =>\r\n `${translatorService.Tranlate('SORT_BY', 'Sorteaza dupa')} ${column.label}`\r\n },\r\n pagination: {\r\n next: translatorService.Tranlate('NEXT_PAGE', 'Pagina urmatoare'),\r\n previous: translatorService.Tranlate('PREVIOUS_PAGE', 'Pagina precedenta'),\r\n rowsPerPage: translatorService.Tranlate('ROWS_PER_PAGE', 'Randuri pe pagina'),\r\n displayRows: translatorService.Tranlate('OF', 'din')\r\n },\r\n toolbar: {\r\n search: translatorService.Tranlate('SEARCH', 'Cauta'),\r\n downloadCsv: 'Download CSV',\r\n print: 'Print',\r\n viewColumns: translatorService.Tranlate('VIEW_COLUMNS', 'Vizualizare coloane'),\r\n filterTable: translatorService.Tranlate('FILTER_TABLE', 'Filtreaza')\r\n },\r\n filter: {\r\n all: translatorService.Tranlate('FILTER_ALL', 'Toate'),\r\n title: translatorService.Tranlate('FILTER_FILTERS', 'Filtre'),\r\n reset: translatorService.Tranlate('FILTER_RESET', 'Reseteaza')\r\n },\r\n viewColumns: {\r\n title: translatorService.Tranlate('SHOW_COLUMNS', 'Vizualizare coloane'),\r\n titleAria: translatorService.Tranlate('SHOW_COLUMNS_TITLE', 'Vizualizeaza/ascunde coloane')\r\n },\r\n selectedRows: {\r\n text: 'row(s) selected',\r\n delete: 'Delete',\r\n deleteAria: 'Delete Selected Rows'\r\n }\r\n };\r\n }\r\n\r\n public static GetDashboardTranslations(translatorService:ITranslatorService):any{\r\n return {\r\n technicalCondition:[\r\n { title: '', field: 'displayName' },\r\n {\r\n title: translatorService.Tranlate('DASHBOARD_INTERIOR', 'Interior'),\r\n field: 'byInConditionValue' \r\n },\r\n {\r\n title: translatorService.Tranlate('DASHBOARD_EXTERIOR', 'Exterior'),\r\n field: 'byOutCondition'\r\n },\r\n {\r\n title: translatorService.Tranlate('DASHBOARD_MECHANICAL', 'Mecanica'),\r\n field: 'byTehnicalConditionValue'\r\n }\r\n ],\r\n stockTable:[\r\n {\r\n title: translatorService.Tranlate('DASHBOARD_VEHICLE_COUNT','Numar vehicule'),\r\n field: 'value'\r\n },\r\n {\r\n title: translatorService.Tranlate('DASHBOARD_STATE', 'Status'),\r\n field: 'displayName'\r\n }\r\n ],\r\n topBuyers:[\r\n {\r\n title: translatorService.Tranlate('DASHBOARD_ORGANIZATION', 'Organizatie'),\r\n field: 'organizationName'\r\n },\r\n {\r\n title: translatorService.Tranlate('DASHBOARD_BUYER_NAME', 'Cumparator'),\r\n field: 'buyerName'\r\n }\r\n ],\r\n topTentaiveBuyers:[\r\n {\r\n title: translatorService.Tranlate('DASHBOARD_ORGANIZATION', 'Organizatie'),\r\n field: 'organizationName'\r\n },\r\n {\r\n title: translatorService.Tranlate('DASHBOARD_BUYER_NAME', 'Cumparator'),\r\n field: 'buyerName'\r\n },\r\n {\r\n title: translatorService.Tranlate(\r\n 'DASHBOARD_ACQUISITION_IN_PROGRESS_TABLE_HEADER',\r\n 'Achizitii in desfasurare'\r\n ),\r\n field: 'inProgressPurchasesCount'\r\n }\r\n ],\r\n groupedOfferAndSentEmail:[\r\n {\r\n label: 'date',\r\n value: 'offerGeneratedCount'\r\n },\r\n {\r\n label: 'date',\r\n value: 'emailSentCount'\r\n }\r\n ],\r\n advertListAndSoldVehicleListGrouped: [\r\n {\r\n label: 'date',\r\n value: 'advertCount'\r\n },\r\n {\r\n label: 'date',\r\n value: 'soldVehicleCount'\r\n }\r\n ],\r\n salesTable:[\r\n { title: translatorService.Tranlate('DASHBOARD_CAR_TYPE', 'Marca'), field: 'makeName' },\r\n { title: translatorService.Tranlate('DASHBOARD_MODEL', 'Model'), field: 'modelName' },\r\n { title: translatorService.Tranlate('DASHBOARD_QUANTITY', 'Nr. Unitati vandute'), field: 'numberOfUnitSold'}\r\n ],\r\n stockMap:[\r\n {\r\n title: translatorService.Tranlate('DASHBOARD_ORGANIZATION', 'Organizatie'),\r\n field: 'name'\r\n },\r\n {\r\n title: translatorService.Tranlate('CLIENT_DATA_FORM_ADDRESS', 'Adresa'),\r\n field: 'address'\r\n },\r\n {\r\n title: translatorService.Tranlate('DASHBOARD_VEHICLE_COUNT','Numar vehicule'),\r\n field: 'count'\r\n }\r\n ],\r\n\r\n }\r\n }\r\n}\r\n","import React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n ApplicationState,\r\n AppUserAdminActionCreators,\r\n AppUserAdminState,\r\n AppState\r\n} from '../../../store';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport MUIDataTable, {\r\n SelectableRows,\r\n MUIDataTableColumnOptions,\r\n MUIDataTableMeta\r\n} from 'mui-datatables';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { IconButton, Box, Switch, Button, Tooltip } from '@material-ui/core';\r\nimport AddCircleTwoToneIcon from '@material-ui/icons/AddCircleTwoTone';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { IAppUserService } from '../../../services/Interfaces/IAppUserService';\r\nimport { AppUser } from '../../../interfaces/AppUser';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { Organization } from '../../../interfaces/Organization';\r\nimport moment from 'moment';\r\nimport { MUITranslations } from '../../../helpers/MUITableTranslations';\r\n\r\ntype UsersTabProps = {\r\n appUserAdminState: AppUserAdminState;\r\n appState: AppState;\r\n} & ProviderContext &\r\n typeof AppUserAdminActionCreators &\r\n RouteComponentProps;\r\n\r\ninterface IUsersTabState {\r\n users: AppUser[];\r\n isLoading: boolean;\r\n}\r\nclass UsersTab extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private appUserService!: IAppUserService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n users: [],\r\n isLoading: false\r\n } as IUsersTabState;\r\n\r\n public componentDidMount() {\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadUsers();\r\n }\r\n );\r\n }\r\n\r\n loadUsers = async () => {\r\n const userList = await this.appUserService.GetAppUsers();\r\n\r\n this.setState({\r\n users: userList.users,\r\n isLoading: false\r\n });\r\n };\r\n\r\n handleUserActiveChange = async (\r\n event: React.ChangeEvent,\r\n tableMeta: MUIDataTableMeta\r\n ) => {\r\n const id = tableMeta.rowData[0];\r\n const usersClone = [...this.state.users];\r\n const updUser = usersClone.find((item) => item.id === id);\r\n\r\n if (updUser !== undefined) {\r\n updUser.isActive = event.target.checked;\r\n\r\n try {\r\n await this.appUserService.UpdateUser(updUser);\r\n this.setState({\r\n users: usersClone\r\n });\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n\r\n onRowClick = (e: any, id: string) => {\r\n this.props.history.push('/admin/users/' + id);\r\n };\r\n\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'email',\r\n label: this.translatorService.Tranlate('USERS_EMAIL_HEADER', 'Email'),\r\n options: {\r\n filter: false,\r\n customBodyRender: (value: string, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.onRowClick(e, tableMeta.rowData[0])}\r\n >\r\n {value}\r\n \r\n );\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'lastName',\r\n label: this.translatorService.Tranlate('USERS_LAST_NAME_HEADER', 'Nume'),\r\n options: {\r\n filter: false\r\n }\r\n },\r\n {\r\n name: 'firstName',\r\n label: this.translatorService.Tranlate('USERS_FIRST_NAME_HEADER', 'Prenume'),\r\n options: {\r\n filter: false\r\n }\r\n },\r\n {\r\n name: 'organization',\r\n label: this.translatorService.Tranlate('USERS_ORGANIZATION_HEADER', 'Organizatie'),\r\n options: {\r\n customBodyRender: (value: Organization) => {\r\n return value.hoName;\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'updatedByUserFullName',\r\n label: this.translatorService.Tranlate('USERS_UPDATEDBY_HEADER', 'Modificat de')\r\n },\r\n {\r\n name: 'dateModification',\r\n label: this.translatorService.Tranlate('USERS_DATE_MODIFICATION_HEADER', 'Data MOdificare'),\r\n\r\n options: {\r\n sortDirection: 'desc',\r\n customBodyRender: (value: Date) =>\r\n moment.utc(value).local().format(this.props.appState.longDateFormat)\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'isActive',\r\n label: this.translatorService.Tranlate('USERS_IS_ACTIVE_HEADER', 'Activ'),\r\n options: {\r\n filterOptions: {\r\n names: [\r\n this.translatorService.Tranlate('TABLE_IS_ACTIVE_COLUMN_ACTIVE', 'Activ'),\r\n this.translatorService.Tranlate('TABLE_IS_ACTIVE_COLUMN_INACTIVE', 'Inactiv')\r\n ],\r\n logic(isActive: any, filterVal: string[]) {\r\n const show =\r\n (filterVal.indexOf(this.names[0]) !== -1 && isActive === true) ||\r\n (filterVal.indexOf(this.names[1]) !== -1 && isActive === false);\r\n return !show;\r\n }\r\n },\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.handleUserActiveChange(e, tableMeta)}\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n );\r\n }\r\n }\r\n }\r\n ];\r\n\r\n return columns;\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.appUserService = (this.context as AppContext).appUserService;\r\n\r\n const options = {\r\n filter: true,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n // responsive: \"stacked\",\r\n customToolbar: () => {\r\n return (\r\n \r\n {\r\n this.props.history.push('/admin/users/new');\r\n }}\r\n >\r\n \r\n \r\n \r\n );\r\n }\r\n };\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n ) : null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appUserAdminState: state.appUserAdmin,\r\n appState: state.app\r\n }),\r\n AppUserAdminActionCreators // Selects which action creators are merged into the component's props\r\n)(withSnackbar(UsersTab as any));\r\n","import React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppUserAdminActionCreators, AppState } from '../../../store';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport MUIDataTable, {\r\n SelectableRows,\r\n MUIDataTableColumnOptions,\r\n MUIDataTableMeta\r\n} from 'mui-datatables';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { IconButton, Box, Switch, Button, Tooltip } from '@material-ui/core';\r\nimport AddCircleTwoToneIcon from '@material-ui/icons/AddCircleTwoTone';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { IAppUserService } from '../../../services/Interfaces/IAppUserService';\r\nimport { AppUserRole } from '../../../interfaces/AppUser';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport moment from 'moment';\r\nimport { MUITranslations } from '../../../helpers/MUITableTranslations';\r\n\r\ntype RolesTabProps = ProviderContext & RouteComponentProps & { appState: AppState };\r\n\r\ninterface IRolesTabState {\r\n roles: AppUserRole[];\r\n isLoading: boolean;\r\n}\r\nclass RolesTab extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private appUserService!: IAppUserService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n roles: [],\r\n isLoading: false\r\n } as IRolesTabState;\r\n\r\n public async componentDidMount() {\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n () => {\r\n this.loadRoles();\r\n }\r\n );\r\n }\r\n\r\n loadRoles = async () => {\r\n const roleList = await this.appUserService.GetAppUserRoles();\r\n\r\n this.setState({\r\n roles: roleList.roles,\r\n isLoading: false\r\n });\r\n };\r\n\r\n handleActiveChange = async (\r\n event: React.ChangeEvent,\r\n tableMeta: MUIDataTableMeta\r\n ) => {\r\n const id = tableMeta.rowData[0];\r\n const rolesClone = [...this.state.roles];\r\n const role = rolesClone.find((item) => item.id === id);\r\n\r\n if (role !== undefined) {\r\n role.isActive = event.target.checked;\r\n\r\n try {\r\n await this.appUserService.UpdateRole(role);\r\n this.setState({\r\n roles: rolesClone\r\n });\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n\r\n onRowClick = (e: any, id: string) => {\r\n this.props.history.push('/admin/roles/' + id);\r\n };\r\n\r\n getColumns = () => {\r\n return [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'name',\r\n label: this.translatorService.Tranlate('ROLES_NAME_HEADER', 'Grup Permisiuni'),\r\n options: {\r\n filter: false,\r\n customBodyRender: (value: string, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.onRowClick(e, tableMeta.rowData[0])}\r\n >\r\n {value}\r\n \r\n );\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'dateModification',\r\n label: this.translatorService.Tranlate('ROLES_DATE_MODIFICATION_HEADER', 'Data Modificare'),\r\n\r\n options: {\r\n sortDirection: 'desc',\r\n customBodyRender: (value: Date) =>\r\n moment.utc(value).local().format(this.props.appState.longDateFormat)\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'isActive',\r\n label: this.translatorService.Tranlate('ROLES_IS_ACTIVE_HEADER', 'Activ'),\r\n options: {\r\n filterOptions: {\r\n names: [\r\n this.translatorService.Tranlate('TABLE_IS_ACTIVE_COLUMN_ACTIVE', 'Activ'),\r\n this.translatorService.Tranlate('TABLE_IS_ACTIVE_COLUMN_INACTIVE', 'Inactiv')\r\n ],\r\n logic(isActive: any, filterVal: string[]) {\r\n const show =\r\n (filterVal.indexOf(this.names[0]) !== -1 && isActive === true) ||\r\n (filterVal.indexOf(this.names[1]) !== -1 && isActive === false);\r\n return !show;\r\n }\r\n },\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.handleActiveChange(e, tableMeta)}\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n );\r\n }\r\n }\r\n }\r\n ];\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.appUserService = (this.context as AppContext).appUserService;\r\n\r\n const options = {\r\n filter: true,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n // responsive: \"stacked\",\r\n customToolbar: () => {\r\n return (\r\n \r\n {\r\n this.props.history.push('/admin/roles/new');\r\n }}\r\n >\r\n \r\n \r\n \r\n );\r\n }\r\n };\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n {this.state.isLoading ? null : (\r\n \r\n )}\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({ appState: state.app }), // Selects which state properties are merged into the component's props\r\n AppUserAdminActionCreators // Selects which action creators are merged into the component's props\r\n)(withSnackbar(RolesTab as any));\r\n","import React, { Fragment } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Grid, Box, Typography, Tabs, Tab, Card } from '@material-ui/core';\r\n\r\nfunction TabPanel(props) {\r\n const { children, value, index, ...other } = props;\r\n\r\n return (\r\n \r\n );\r\n}\r\n\r\nTabPanel.propTypes = {\r\n children: PropTypes.node,\r\n index: PropTypes.any.isRequired,\r\n value: PropTypes.any.isRequired\r\n};\r\n\r\nconst LivePreviewExample = () => {\r\n const [value, setValue] = React.useState(0);\r\n\r\n const handleChange = (event, newValue) => {\r\n setValue(newValue);\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n sasa\r\n \r\n
\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default TabPanel;\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppUserAdminActionCreators, AppUserAdminState } from '../../../store';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport UsersTab from './UsersTab';\r\nimport RolesTab from './RolesTab';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport TabPanel from '../../_shared/Tabs';\r\nimport { Card, Tab, Tabs, Box, CardContent } from '@material-ui/core';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { IAppUserService } from '../../../services/Interfaces/IAppUserService';\r\n\r\nexport interface ExternalAppUsersAdminProps {\r\n selectedTab: number;\r\n}\r\ntype AppUserAdminProps = AppUserAdminState &\r\n typeof AppUserAdminActionCreators &\r\n ExternalAppUsersAdminProps &\r\n RouteComponentProps<{ startDateIndex: string }>;\r\n\r\nclass AppUsersAdmin extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private appUserService!: IAppUserService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n selectedTab: 0\r\n };\r\n\r\n public componentDidMount() {\r\n if (this.props.match.path.toLowerCase() === '/admin/users') {\r\n this.setState({ selectedTab: 0 });\r\n }\r\n if (this.props.match.path.toLowerCase() === '/admin/roles') {\r\n this.setState({ selectedTab: 1 });\r\n }\r\n }\r\n\r\n handleChangeTab = async (event: React.ChangeEvent, newValue: number) => {\r\n this.setState({ selectedTab: newValue });\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.appUserService = (this.context as AppContext).appUserService;\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => state.app, // Selects which state properties are merged into the component's props\r\n AppUserAdminActionCreators // Selects which action creators are merged into the component's props\r\n)(AppUsersAdmin as any);\r\n","import React, { Fragment } from 'react';\r\nimport {\r\n AppUserAdminActionCreators,\r\n AppUserAdminState,\r\n ApplicationState,\r\n AppActionCreators,\r\n AppState\r\n} from '../../../store';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n Grid,\r\n TextField,\r\n Switch,\r\n FormControlLabel,\r\n Button,\r\n Box,\r\n Card,\r\n CardContent\r\n} from '@material-ui/core';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { IAppUserService } from '../../../services/Interfaces/IAppUserService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport { Organization } from '../../../interfaces/Organization';\r\nimport { IOrganizationService } from '../../../services/Interfaces/IOrganizationService';\r\nimport { AppUser } from '../../../interfaces/AppUser';\r\nimport { ValidatorForm, TextValidator } from 'react-material-ui-form-validator';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { IReferential } from '../../../interfaces/IReferential';\r\nimport { ReferentialCode } from '../../../helpers/Constants';\r\nimport Referentials from '../../../helpers/Referentials.json';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport { isNullOrUndefined } from 'util';\r\nimport { DatePicker, MuiPickersUtilsProvider } from '@material-ui/pickers';\r\nimport moment from 'moment';\r\nimport MomentUtils from '@date-io/moment';\r\nimport { MaterialUiPickersDate } from '@material-ui/pickers/typings/date';\r\n\r\nexport interface ExternalEditUserProps {\r\n userChanged: () => Promise;\r\n}\r\n\r\ntype EditUserProps = { appState: AppState } & AppUserAdminState &\r\n ProviderContext &\r\n typeof AppUserAdminActionCreators &\r\n typeof AppActionCreators &\r\n RouteComponentProps<{ id: string }> &\r\n ExternalEditUserProps;\r\n\r\ninterface IEditUserState {\r\n organizations: Organization[];\r\n managers: AppUser[];\r\n userRoles: IReferential[];\r\n users: AppUser[];\r\n user: AppUser;\r\n countryList: IReferential[];\r\n costCenterList: IReferential[];\r\n}\r\n\r\nclass EditUser extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private appUserService!: IAppUserService;\r\n private organizationService!: IOrganizationService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n organizations: [],\r\n managers: [] as AppUser[],\r\n users: [] as AppUser[],\r\n userRoles: [],\r\n user: {\r\n email: '',\r\n firstName: '',\r\n lastName: '',\r\n phoneNumber: '',\r\n isActive: true,\r\n organization: null,\r\n organizationId: 0,\r\n jobFunction: '',\r\n manager: null,\r\n managerId: '',\r\n role: null,\r\n roleId: null,\r\n id: null,\r\n isMavo: false,\r\n hideOrderPrices: false,\r\n country: null,\r\n countryId: null,\r\n costCenterId: null,\r\n costCenter: null,\r\n hasValidityDate: false,\r\n validityDate: null\r\n } as AppUser,\r\n countryList: [],\r\n costCenterList: []\r\n };\r\n\r\n public async componentDidMount() {\r\n const refRole = Referentials.referential.find((item) => item.code === ReferentialCode.UserRole);\r\n const countryRef = Referentials.referential.find((item) => item.code === ReferentialCode.Country);\r\n const costCenterRef = Referentials.referential.find((item) => item.code === ReferentialCode.CostCenter);\r\n const [org, users, userRoles, countryList, costCenterList] = await Promise.all([\r\n this.organizationService.GetOrganizations(),\r\n this.appUserService.GetAppUsers(),\r\n this.appReferentialService.Get(refRole!.baseUrl),\r\n this.appReferentialService.Get(countryRef!.baseUrl),\r\n this.appReferentialService.Get(costCenterRef!.baseUrl)\r\n ]);\r\n\r\n let user = this.state.user;\r\n\r\n if (this.props.match.params.id.toUpperCase() !== 'NEW') {\r\n try {\r\n user = await this.appUserService.GetAppUser(this.props.match.params.id);\r\n\r\n const organization = org.find((o) => o.id === user.organizationId);\r\n user.organization = organization === undefined ? null : organization;\r\n\r\n const manager = users.users.find((m) => m.id === user.managerId);\r\n user.manager = manager === undefined ? null : manager;\r\n\r\n user.role = null;\r\n if (!isNullOrUndefined(user.roleId)) {\r\n const role = userRoles.find((item) => item.id === user.roleId);\r\n user.role = isNullOrUndefined(role) ? null : role;\r\n }\r\n user.country = null;\r\n if (!isNullOrUndefined(user.countryId)) {\r\n const country = countryList.find((item) => item.id === user.countryId);\r\n user.country = isNullOrUndefined(country) ? null : country;\r\n }\r\n user.costCenter = null;\r\n if (!isNullOrUndefined(user.costCenterId)) {\r\n const costCenter = costCenterList.find((item) => item.id === user.costCenterId);\r\n user.costCenter = isNullOrUndefined(costCenter) ? null : costCenter;\r\n }\r\n } catch (error) {}\r\n }\r\n\r\n this.setState({\r\n organizations: org,\r\n users: users.users,\r\n user: user,\r\n userRoles: userRoles.filter((item) => item.isActive),\r\n managers: this.filterMangers(users.users, user.organization),\r\n countryList: countryList,\r\n costCenterList: costCenterList\r\n });\r\n }\r\n\r\n private handleTextChange = (event: React.ChangeEvent) => {\r\n let value: any;\r\n if (event.target.type === 'text') {\r\n value = event.currentTarget.value;\r\n }\r\n if (event.target.type === 'checkbox') {\r\n value = event.currentTarget.checked;\r\n }\r\n\r\n this.setState({\r\n ...this.state,\r\n user: {\r\n ...this.state.user,\r\n [event.target.id]: value\r\n }\r\n });\r\n };\r\n\r\n private handleAutocompleteChange = (\r\n property: string,\r\n propertyId: string,\r\n newValue: Organization | null | undefined | AppUser | IReferential\r\n ) => {\r\n this.setState({\r\n user: {\r\n ...this.state.user,\r\n [property]: newValue,\r\n [propertyId]: newValue === null || newValue === undefined ? null : newValue.id\r\n // gtId: newValue === null || newValue === undefined || property === \"manager\" ?\r\n // this.state.user.gtId : newValue.gtId\r\n }\r\n });\r\n };\r\n\r\n private handleOrganizationChange = (newValue: Organization | null) => {\r\n this.setState({\r\n user: {\r\n ...this.state.user,\r\n organization: newValue,\r\n organizationId: newValue === null ? null : newValue.id,\r\n gtId: newValue === null || newValue === undefined ? this.state.user.gtId : newValue.gtId,\r\n hoId:\r\n newValue === null || newValue === undefined\r\n ? this.state.user.hoId\r\n : isNullOrUndefined(newValue.hoId)\r\n ? newValue.id\r\n : newValue.hoId,\r\n manager: null,\r\n managerId: null\r\n },\r\n managers: this.filterMangers(this.state.users, newValue)\r\n });\r\n };\r\n \r\n\r\n private saveUser = async () => {\r\n try {\r\n const users = await this.appUserService.GetAppUsers(this.state.user.email);\r\n\r\n if (users.totalCount > 1) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('ERROR_MSG_USER_EXISTS', 'Utilizatorul exista deja!'),\r\n { variant: 'error' }\r\n );\r\n return;\r\n }\r\n if (users.totalCount === 1 && users.users[0].id !== this.state.user.id) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('ERROR_MSG_USER_EXISTS', 'Utilizatorul exista deja!'),\r\n { variant: 'error' }\r\n );\r\n return;\r\n }\r\n\r\n if (this.state.user.id !== null) {\r\n await this.appUserService.UpdateUser(this.state.user);\r\n } else {\r\n const newUser = await this.appUserService.AddUser(this.state.user);\r\n this.props.history.push('/admin/users/' + newUser.id);\r\n }\r\n\r\n this.props.userChanged();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n public filterMangers = (users: AppUser[], newOrganization: Organization | null | undefined) => {\r\n return newOrganization === null || newOrganization === undefined\r\n ? []\r\n : users.filter((value) => value.organization!.hoId === newOrganization!.hoId);\r\n };\r\n\r\n \r\n handleValidityDateChange = (date: MaterialUiPickersDate | null) => {\r\n if (date === null || !date.isValid) {\r\n return;\r\n }\r\n\r\n this.setState({\r\n user: {\r\n ...this.state.user,\r\n validityDate: new Date(date.format('YYYY-MM-DD'))\r\n }\r\n });\r\n };\r\n\r\n public renderForm() {\r\n return (\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n this.handleOrganizationChange(newValue)\r\n }\r\n getOptionLabel={(option: Organization) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n \r\n this.handleAutocompleteChange('manager', 'managerId', newValue)\r\n }\r\n getOptionLabel={(option: AppUser) => option.userName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n this.handleAutocompleteChange('role', 'roleId', newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n \r\n this.handleAutocompleteChange('country', 'countryId', newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n \r\n this.handleAutocompleteChange('costCenter', 'costCenterId', newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n {this.state.user.hasValidityDate ? (\r\n \r\n \r\n \r\n ) : null}\r\n \r\n {\r\n this.setState({\r\n user: {\r\n ...this.state.user,\r\n hasValidityDate: e.target.checked,\r\n validityDate: !e.target.checked ? null : this.state.user.validityDate\r\n }\r\n });\r\n }}\r\n color=\"primary\"\r\n id=\"hasValidityDate\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={this.translatorService.Tranlate('EDIT_USER_HAS_VALIDITY_DATE_FIELD', 'Cu perioada de valabilitate')}\r\n />\r\n\r\n this.handleTextChange(e)}\r\n color=\"primary\"\r\n id=\"isActive\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={this.translatorService.Tranlate('EDIT_USER_ISACTIVE_FIELD', 'Stare')}\r\n />\r\n\r\n this.handleTextChange(e)}\r\n color=\"primary\"\r\n id=\"isMavo\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={this.translatorService.Tranlate('EDIT_USER_ISMAVO_FIELD', 'User MAVO')}\r\n />\r\n this.handleTextChange(e)}\r\n color=\"primary\"\r\n id=\"hideOrderPrices\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={this.translatorService.Tranlate('EDIT_USER_HIDE_ORDER_PRICES_FIELD', 'Nu trimite email de confirmare comanda')}\r\n />\r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.appUserService = (this.context as AppContext).appUserService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n return (\r\n \r\n \r\n \r\n {this.renderForm()}\r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (stateProps: any, dispatchProps: any, ownProps: ExternalEditUserProps) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\n//export default EditUser as any\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n userList: state.appUserAdmin,\r\n appState: state.app\r\n }),\r\n { ...AppUserAdminActionCreators, ...AppActionCreators },\r\n mergeProps\r\n)(withSnackbar(EditUser as any));\r\n","import React, { Fragment } from 'react';\r\nimport {\r\n AppUserAdminActionCreators,\r\n ApplicationState,\r\n AppActionCreators,\r\n AppState\r\n} from '../../../store';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport { TextField, Card, Button, Box, IconButton, CardContent } from '@material-ui/core';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { IAppUserService } from '../../../services/Interfaces/IAppUserService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport { AppUser, AppUserRole } from '../../../interfaces/AppUser';\r\nimport { ValidatorForm, TextValidator } from 'react-material-ui-form-validator';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport MUIDataTable, {\r\n MUIDataTableColumnOptions,\r\n SelectableRows,\r\n MUIDataTableOptions,\r\n MUIDataTableMeta\r\n} from 'mui-datatables';\r\nimport DeleteOutlineTwoToneIcon from '@material-ui/icons/DeleteOutlineTwoTone';\r\nimport moment from 'moment';\r\nimport { MUITranslations } from '../../../helpers/MUITableTranslations';\r\n\r\ninterface IUserDetailsUser {\r\n appUser: AppUser;\r\n}\r\n\r\ntype EditUserRolesProps = { appState: AppState } & ProviderContext &\r\n typeof AppUserAdminActionCreators &\r\n typeof AppActionCreators &\r\n RouteComponentProps<{ id: string }> &\r\n IUserDetailsUser;\r\n\r\ninterface IEditUserRolesState {\r\n isLoading: boolean;\r\n userRoles: AppUserRole[];\r\n selectedRole: AppUserRole | null;\r\n roles: AppUserRole[];\r\n}\r\n\r\nclass EditUserRoles extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private appUserService!: IAppUserService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n isLoading: false,\r\n userRoles: [] as AppUserRole[],\r\n selectedRole: {} as AppUserRole,\r\n roles: [] as AppUserRole[]\r\n };\r\n\r\n public async componentDidMount() {\r\n if (this.props.appUser.id === null) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n () => {\r\n this.loadUserRoles();\r\n }\r\n );\r\n }\r\n\r\n loadUserRoles = async () => {\r\n const [userRoleList, roles] = await Promise.all([\r\n this.appUserService.GetUserAppUserRoles(this.props.appUser.id, 1, 10000),\r\n this.appUserService.GetAppUserRoles()\r\n ]);\r\n\r\n const newroles = this.filterRoles(roles.roles, userRoleList.roles);\r\n this.setState({\r\n userRoles: userRoleList.roles,\r\n roles: newroles,\r\n isLoading: false\r\n });\r\n };\r\n\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'name',\r\n label: this.translatorService.Tranlate('USER_ROLE_NAME_HEADER', 'Rol')\r\n },\r\n {\r\n name: 'dateCreation',\r\n label: this.translatorService.Tranlate('USER_ROLE_DATE_CREATION_HEADER', 'Data Creare'),\r\n\r\n options: {\r\n sortDirection: 'desc',\r\n customBodyRender: (value: Date) =>\r\n moment.utc(value).local().format(this.props.appState.longDateFormat)\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'createdByUserFullName',\r\n label: this.translatorService.Tranlate('USER_ROL_CREATEDBY_HEADER', 'Creat de')\r\n },\r\n {\r\n name: '',\r\n options: {\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.deleteRole(e, tableMeta)}\r\n >\r\n \r\n \r\n );\r\n }\r\n }\r\n }\r\n ];\r\n\r\n return columns;\r\n };\r\n\r\n getOptions = () => {\r\n const options = {\r\n print: false,\r\n download: false,\r\n filter: true,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService)\r\n } as MUIDataTableOptions;\r\n\r\n return options;\r\n };\r\n\r\n addRole = async () => {\r\n const newRole = this.state.selectedRole;\r\n newRole.dateCreation = moment.utc().toISOString();\r\n newRole.createdByUserFullName =\r\n this.props.appState.appUser!.lastName + ' ' + this.props.appState.appUser!.firstName;\r\n\r\n const newUserRoles = [...this.state.userRoles, newRole];\r\n const newRoles = [...this.state.roles];\r\n newRoles.splice(\r\n newRoles.findIndex((i) => i.id === this.state.selectedRole.id),\r\n 1\r\n );\r\n try {\r\n await this.appUserService.AddAppUserRole({\r\n userId: this.props.appUser.id!,\r\n roleId: this.state.selectedRole.id!\r\n });\r\n // this.setState({\r\n // isLoading: true,\r\n // selectedRole: null\r\n // }, () => {\r\n // this.loadUserRoles();\r\n // });\r\n this.setState({ userRoles: newUserRoles, roles: newRoles, selectedRole: null });\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n deleteRole = async (event: any, tableMeta: MUIDataTableMeta) => {\r\n try {\r\n const index = this.state.userRoles.findIndex((i) => i.id === tableMeta.rowData[0]);\r\n const deletedRole = this.state.userRoles[index];\r\n\r\n const newUserRoleArray = [...this.state.userRoles];\r\n newUserRoleArray.splice(index, 1);\r\n\r\n await this.appUserService.DeleteAppUserRole({\r\n userId: this.props.appUser.id!,\r\n roleId: deletedRole.id!\r\n });\r\n\r\n if (deletedRole.isActive) {\r\n this.setState({ userRoles: newUserRoleArray, roles: [...this.state.roles, deletedRole] });\r\n } else {\r\n this.setState({ userRoles: newUserRoleArray });\r\n }\r\n\r\n // this.setState({\r\n // isLoading: true,\r\n // selectedRole: null\r\n // }, () => {\r\n // this.loadUserRoles();\r\n // });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n handleAutocompleteChange = (newValue: AppUserRole | null) => {\r\n this.setState({ selectedRole: newValue });\r\n };\r\n\r\n filterRoles = (roles: AppUserRole[], appuserRoles: AppUserRole[]) => {\r\n return roles.filter(\r\n (item) => appuserRoles.find((r) => r.id === item.id) === undefined && item.isActive\r\n );\r\n };\r\n\r\n public renderAddForm() {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n this.handleAutocompleteChange(newValue)\r\n }\r\n getOptionLabel={(option: AppUserRole) => option.name || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.appUserService = (this.context as AppContext).appUserService;\r\n\r\n return (\r\n \r\n {this.props.appUser.id !== null ? this.renderAddForm() : null}\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n ) : null}\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({ appState: state.app }), // Selects which state properties are merged into the component's props\r\n { ...AppUserAdminActionCreators, ...AppActionCreators } // Selects which action creators are merged into the component's props\r\n)(withSnackbar(EditUserRoles as any));\r\n","import React from 'react';\r\nimport { AppUser } from '../../../interfaces/AppUser';\r\nimport { connect } from 'react-redux';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { Box, TextField, Button, CardContent, Card } from '@material-ui/core';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { IAppUserService } from '../../../services/Interfaces/IAppUserService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport { ApplicationState } from '../../../store';\r\n\r\ninterface IUserDetailsUser {\r\n appUser: AppUser;\r\n}\r\n\r\ntype ResetPassProps = IUserDetailsUser & RouteComponentProps<{ id: string }> & ProviderContext;\r\n\r\ninterface IResetPassState {\r\n isLoading: boolean;\r\n}\r\n\r\nclass ResetUserPass extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private appUserService!: IAppUserService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n public resetPass = async () => {\r\n try {\r\n if (this.props.appUser.id === null) {\r\n return;\r\n }\r\n\r\n await this.appUserService.ResetPassword(this.props.appUser.id);\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n public renderResetPassForm() {\r\n return (\r\n \r\n \r\n \r\n \r\n
\r\n \r\n {this.translatorService.Tranlate(\r\n 'ADMIN_EDIT_USER_RESETPASS_BTN',\r\n 'Trimite mail resetare parola'\r\n )}\r\n \r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.appUserService = (this.context as AppContext).appUserService;\r\n\r\n return this.renderResetPassForm();\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => state.appUserAdmin // Selects which state properties are merged into the component's props\r\n)(withSnackbar(ResetUserPass as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppUserAdminActionCreators, AppUserAdminState } from '../../../store';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport NavigationIcon from '@material-ui/icons/Navigation';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport TabPanel from '../../_shared/Tabs';\r\nimport { Card, Tab, Tabs, Button, CardContent, Box } from '@material-ui/core';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { IAppUserService } from '../../../services/Interfaces/IAppUserService';\r\nimport EditUser from './EditUser';\r\nimport EditUserRoles from './EditUserRoles';\r\nimport ResetPassword from './ResetPassword';\r\nimport { AppUser } from '../../../interfaces/AppUser';\r\n\r\ntype UserDetailsProps = AppUserAdminState &\r\n typeof AppUserAdminActionCreators &\r\n RouteComponentProps<{ id: string }>;\r\n\r\ninterface IUserDetailsState {\r\n user: AppUser;\r\n selectedTab: number;\r\n}\r\n\r\nclass UserDetails extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private appUserService!: IAppUserService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n selectedTab: 0,\r\n user: {\r\n email: '',\r\n firstName: '',\r\n lastName: '',\r\n phoneNumber: '',\r\n isActive: false,\r\n organization: {},\r\n organizationId: 0,\r\n jobFunction: '',\r\n id: null\r\n } as AppUser\r\n };\r\n\r\n public async componentDidMount() {\r\n await this.loadUser();\r\n }\r\n\r\n loadUser = async () => {\r\n let user = this.state.user;\r\n\r\n if (this.props.match.params.id.toUpperCase() !== 'NEW') {\r\n try {\r\n user = await this.appUserService.GetAppUser(this.props.match.params.id);\r\n } catch (error) {}\r\n }\r\n this.setState({\r\n user: user\r\n });\r\n };\r\n\r\n handleChangeTab = async (event: React.ChangeEvent, newValue: number) => {\r\n this.setState({ selectedTab: newValue });\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.appUserService = (this.context as AppContext).appUserService;\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n
\r\n {\r\n this.props.history.push('/admin/users');\r\n }}\r\n >\r\n \r\n {this.translatorService.Tranlate('EDIT_USER_BACK_TO_USERS_BTN', 'Utilizatori')}\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n this.loadUser()} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => state.appUserAdmin, // Selects which state properties are merged into the component's props\r\n AppUserAdminActionCreators // Selects which action creators are merged into the component's props\r\n)(UserDetails as any);\r\n","import React, { Fragment } from 'react';\r\nimport { AppUserAdminActionCreators, ApplicationState, AppActionCreators } from '../../../store';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport { Card, Button, Box, IconButton, CardContent, Tabs, Tab } from '@material-ui/core';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { IAppUserService } from '../../../services/Interfaces/IAppUserService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport { AppUserRole, AppUserRoleClaim } from '../../../interfaces/AppUser';\r\nimport { ValidatorForm, TextValidator } from 'react-material-ui-form-validator';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport MUIDataTable, {\r\n MUIDataTableColumnOptions,\r\n SelectableRows,\r\n MUIDataTableOptions,\r\n MUIDataTableMeta\r\n} from 'mui-datatables';\r\nimport DeleteOutlineTwoToneIcon from '@material-ui/icons/DeleteOutlineTwoTone';\r\nimport { RoleClaimsEnum } from '../../../helpers/Constants';\r\nimport TabPanel from '../../_shared/Tabs';\r\nimport NavigationIcon from '@material-ui/icons/Navigation';\r\nimport { MUITranslations } from '../../../helpers/MUITableTranslations';\r\n\r\ntype EditRoleProps = ProviderContext & RouteComponentProps<{ id: string }>;\r\n\r\ninterface IEditRoleState {\r\n isLoading: boolean;\r\n roleClaims: AppUserRoleClaim[];\r\n selectedClaim: AppUserRoleClaim | null;\r\n role: AppUserRole | null;\r\n claims: AppUserRoleClaim[];\r\n}\r\n\r\nclass EditRole extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private appUserService!: IAppUserService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n isLoading: false,\r\n roleClaims: [] as AppUserRoleClaim[],\r\n selectedClaim: {} as AppUserRoleClaim,\r\n role: {\r\n id: null,\r\n name: '',\r\n dateCreation: new Date(),\r\n isActive: true\r\n } as AppUserRole,\r\n claims: [] as AppUserRoleClaim[]\r\n };\r\n\r\n public async componentDidMount() {\r\n if (this.props.match.params.id.toUpperCase() !== 'NEW') {\r\n try {\r\n const role = await this.appUserService.GetAppUserRole(this.props.match.params.id);\r\n\r\n this.setState(\r\n {\r\n role: role,\r\n isLoading: true\r\n },\r\n () => {\r\n this.loadRoleClaims();\r\n }\r\n );\r\n } catch (error) {}\r\n }\r\n }\r\n\r\n loadRoleClaims = async () => {\r\n const roleClaimsList = await this.appUserService.GetAppUserRoleClaims(\r\n this.state.role.id,\r\n 1,\r\n 10000\r\n );\r\n\r\n const newClaims = this.filterClaims(roleClaimsList.claims);\r\n this.setState({\r\n roleClaims: roleClaimsList.claims,\r\n isLoading: false,\r\n claims: newClaims,\r\n selectedClaim: null\r\n });\r\n };\r\n\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'claimId',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'claimValue',\r\n label: ' ', //this.translatorService.Tranlate(\"ROLE_CLAIM_NAME_HEADER\", \"Nume\"),\r\n options: {\r\n setCellHeaderProps: () => ({ align: 'center' }),\r\n setCellProps: () => ({ align: 'center' })\r\n }\r\n },\r\n {\r\n name: '',\r\n options: {\r\n setCellHeaderProps: () => ({ align: 'center' }),\r\n setCellProps: () => ({ align: 'center' }),\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.deleteClaim(e, tableMeta)}\r\n >\r\n \r\n \r\n );\r\n }\r\n }\r\n }\r\n ];\r\n\r\n return columns;\r\n };\r\n\r\n getOptions = () => {\r\n const options = {\r\n print: false,\r\n download: false,\r\n filter: false,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n viewColumns: false,\r\n filterType: 'checkbox',\r\n textLabels: MUITranslations.GetTranslations(this.translatorService)\r\n } as MUIDataTableOptions;\r\n\r\n return options;\r\n };\r\n\r\n addClaim = async () => {\r\n const newClaim = this.state.selectedClaim;\r\n newClaim.roleId = this.state.role.id;\r\n\r\n try {\r\n await this.appUserService.AddRoleClaim(newClaim);\r\n this.setState({ isLoading: true }, async () => {\r\n await this.loadRoleClaims();\r\n });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n saveRole = async () => {\r\n try {\r\n const roles = await this.appUserService.GetAppUserRoles(this.state.role.name);\r\n\r\n if (roles.totalCount > 1) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('ERROR_MSG_ROLE_EXISTS', 'Rolul exista deja!'),\r\n { variant: 'error' }\r\n );\r\n return;\r\n }\r\n if (roles.totalCount === 1 && roles.roles[0].id !== this.state.role.id) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('ERROR_MSG_ROLE_EXISTS', 'Rolul exista deja!'),\r\n { variant: 'error' }\r\n );\r\n return;\r\n }\r\n if (this.state.role.id !== null) {\r\n await this.appUserService.UpdateRole(this.state.role);\r\n } else {\r\n const newRole = await this.appUserService.AddRole(this.state.role);\r\n this.props.history.push('/admin/roles/' + newRole.id);\r\n this.setState({ role: newRole }, () => this.loadRoleClaims());\r\n }\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n deleteClaim = async (event: any, tableMeta: MUIDataTableMeta) => {\r\n try {\r\n const index = this.state.roleClaims.findIndex((i) => i.claimValue === tableMeta.rowData[1]);\r\n const deletedClaim = this.state.roleClaims[index];\r\n const newRoleClaimsArray = [...this.state.roleClaims];\r\n newRoleClaimsArray.splice(index, 1);\r\n\r\n await this.appUserService.DeleteRoleClaim(deletedClaim);\r\n\r\n this.setState({\r\n roleClaims: newRoleClaimsArray,\r\n claims: this.filterClaims(newRoleClaimsArray)\r\n });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n handleAutocompleteChange = (newValue: AppUserRoleClaim | null) => {\r\n this.setState({ selectedClaim: newValue });\r\n };\r\n\r\n filterClaims = (appuserRoles: AppUserRoleClaim[]) => {\r\n const values = Object.values(RoleClaimsEnum);\r\n\r\n const roleClaims = values.map((item) => {\r\n return { claimType: 'role', claimValue: item };\r\n });\r\n\r\n return roleClaims.filter(\r\n (item) => appuserRoles.find((r) => r.claimValue === item.claimValue) === undefined\r\n ) as AppUserRoleClaim[];\r\n };\r\n\r\n rolNameChange = (e: React.ChangeEvent) => {\r\n this.setState({\r\n role: {\r\n ...this.state.role,\r\n name: e.target.value\r\n }\r\n });\r\n };\r\n\r\n public renderEditRoleForm() {\r\n return (\r\n \r\n \r\n \r\n \r\n this.rolNameChange(e)}\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n />\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n public renderAddForm() {\r\n if (this.state.role.id === null) {\r\n return;\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n this.handleAutocompleteChange(newValue)\r\n }\r\n getOptionLabel={(option: AppUserRoleClaim) => option.claimValue || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n\r\n public renderClaims() {\r\n if (this.state.role.id === null) {\r\n return;\r\n }\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n {this.state.isLoading ? null : (\r\n \r\n )}\r\n
\r\n );\r\n }\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.appUserService = (this.context as AppContext).appUserService;\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n {\r\n this.props.history.push('/admin/roles');\r\n }}\r\n >\r\n \r\n {this.translatorService.Tranlate(\r\n 'EDIT_ROL_BACK_TO_ROLS_BTN',\r\n 'Grupuri Permisiuni'\r\n )}\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n {this.renderEditRoleForm()}\r\n {this.renderAddForm()}\r\n {this.renderClaims()}\r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => state.appUserAdmin, // Selects which state properties are merged into the component's props\r\n { ...AppUserAdminActionCreators, ...AppActionCreators } // Selects which action creators are merged into the component's props\r\n)(withSnackbar(EditRole as any));\r\n","import React, { Fragment, ChangeEvent } from 'react';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { Box, Switch, Card, TextField } from '@material-ui/core';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport { ITranslation, IReferential, IReferentialConfig } from '../../../interfaces/IReferential';\r\nimport Autocomplete, { RenderInputParams } from '@material-ui/lab/Autocomplete';\r\nimport MaterialTable, { Icons, EditComponentProps, Column } from 'material-table';\r\nimport Referentials from '../../../helpers/Referentials.json';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../store';\r\nimport { forwardRef } from 'react';\r\nimport ArrowDownward from '@material-ui/icons/ArrowDownward';\r\nimport Check from '@material-ui/icons/Check';\r\nimport ChevronLeft from '@material-ui/icons/ChevronLeft';\r\nimport ChevronRight from '@material-ui/icons/ChevronRight';\r\nimport Clear from '@material-ui/icons/Clear';\r\nimport DeleteOutline from '@material-ui/icons/DeleteOutline';\r\nimport Edit from '@material-ui/icons/Edit';\r\nimport FilterList from '@material-ui/icons/FilterList';\r\nimport FirstPage from '@material-ui/icons/FirstPage';\r\nimport LastPage from '@material-ui/icons/LastPage';\r\nimport Remove from '@material-ui/icons/Remove';\r\nimport SaveAlt from '@material-ui/icons/SaveAlt';\r\nimport Search from '@material-ui/icons/Search';\r\nimport ViewColumn from '@material-ui/icons/ViewColumn';\r\nimport { Label } from 'reactstrap';\r\nimport moment from 'moment';\r\nimport AddCircleTwoToneIcon from '@material-ui/icons/AddCircleTwoTone';\r\nimport { Language } from '../../../interfaces/Organization';\r\nimport * as R from 'ramda';\r\nimport { ReferentialCode } from '../../../helpers/Constants';\r\nimport _ from 'lodash';\r\n\r\nconst tableIcons = {\r\n Add: forwardRef((props, ref) => ),\r\n Check: forwardRef((props, ref) => ),\r\n Clear: forwardRef((props, ref) => ),\r\n Delete: forwardRef((props, ref) => ),\r\n DetailPanel: forwardRef((props, ref) => ),\r\n Edit: forwardRef((props, ref) => ),\r\n Export: forwardRef((props, ref) => ),\r\n Filter: forwardRef((props, ref) => ),\r\n FirstPage: forwardRef((props, ref) => ),\r\n LastPage: forwardRef((props, ref) => ),\r\n NextPage: forwardRef((props, ref) => ),\r\n PreviousPage: forwardRef((props, ref) => ),\r\n ResetSearch: forwardRef((props, ref) => ),\r\n Search: forwardRef((props, ref) => ),\r\n SortArrow: forwardRef((props, ref) => ),\r\n ThirdStateCheck: forwardRef((props, ref) => ),\r\n ViewColumn: forwardRef((props, ref) => )\r\n} as Icons;\r\n\r\ntype CityListProps = { appState: AppState } & ProviderContext;\r\n\r\ninterface ICityListState {\r\n countryList: IReferential[];\r\n regionList: IReferential[];\r\n initialRegionList: IReferential[];\r\n referentials: IReferential[];\r\n filteredReferentials: IReferential[];\r\n isLoading: boolean;\r\n selectedReferential: IReferentialConfig | null;\r\n selectedCountry: IReferential | null;\r\n selectedRegion: IReferential | null;\r\n languages: Language[];\r\n}\r\n\r\nclass CityAppReferentials extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n referentials: [],\r\n isLoading: false,\r\n selectedReferential: null,\r\n languages: [] as Language[],\r\n countryList: [],\r\n regionList: [],\r\n dependentReferentialConfig: null,\r\n selectedCountry: null,\r\n selectedRegion: null,\r\n filteredReferentials: [],\r\n initialCountryList: [],\r\n initialRegionList: [],\r\n } as ICityListState;\r\n\r\n componentDidMount = () => {\r\n const referential = Referentials.referential.find(x => x.code === ReferentialCode.City) as IReferentialConfig;\r\n this.setState({\r\n isLoading: true,\r\n languages: this.activeLanguages(),\r\n },\r\n async () => {\r\n this.loadReferentialsList(referential);\r\n });\r\n };\r\n\r\n loadReferentialsList = async (value: IReferentialConfig | null) => {\r\n let referentialList: IReferential[] = [];\r\n let countryList: IReferential[] = [];\r\n let regionList: IReferential[] = [];\r\n if (value !== null && value.getUrl !== '') {\r\n try {\r\n referentialList = await this.appReferentialService.GetFromDB(value.getUrl);\r\n countryList = (await this.loadDependentReferentials(ReferentialCode.Country)).dependentReferentialList.filter(x => x.isActive === true);\r\n regionList = (await this.loadDependentReferentials(ReferentialCode.Region)).dependentReferentialList.filter(x => x.isActive === true);\r\n referentialList.forEach((refItem) => {\r\n this.state.languages.forEach((lang) => {\r\n const translation = refItem.translations.find((item) => item.language === lang.code);\r\n if (R.isNil(translation)) {\r\n refItem.translations.push({\r\n id: 0,\r\n name: '',\r\n language: lang.code,\r\n referentialTypeId: refItem.id\r\n } as ITranslation);\r\n }\r\n });\r\n });\r\n\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n\r\n const selectedCountry = this.state.selectedCountry ?? countryList[0];\r\n const selectedRegionList = regionList.filter((ref) => ref.dependencyId === selectedCountry.id);\r\n const selectedRegion = this.state.selectedRegion ?? selectedRegionList[0];\r\n \r\n this.setState({\r\n referentials: referentialList,\r\n isLoading: false,\r\n selectedReferential: value!,\r\n countryList: countryList, \r\n initialRegionList: regionList,\r\n selectedCountry: selectedCountry,\r\n selectedRegion: selectedRegion,\r\n regionList: selectedRegionList,\r\n filteredReferentials: referentialList.filter(\r\n (ref) => ref.dependencyId === selectedRegion?.id)\r\n });\r\n };\r\n\r\n handleCountryChange = (newValue: IReferential | null) => {\r\n if (R.isNil(newValue)) {\r\n this.setState({\r\n ...this.state,\r\n selectedCountry: newValue,\r\n filteredReferentials: this.state.referentials,\r\n selectedRegion: null\r\n });\r\n return;\r\n }\r\n\r\n const regionList = this.state.initialRegionList.filter((ref) => ref.dependencyId === newValue.id);\r\n this.setState({\r\n ...this.state,\r\n selectedCountry: newValue,\r\n regionList: regionList,\r\n selectedRegion: regionList.length ? regionList[0] : null,\r\n filteredReferentials: regionList.length ? this.state.referentials.filter(\r\n (ref) => ref.dependencyId === regionList[0].id) : []\r\n });\r\n };\r\n\r\n handleRegionChange = (newValue: IReferential | null) => {\r\n if (R.isNil(newValue)) {\r\n this.setState({\r\n ...this.state,\r\n selectedRegion: newValue,\r\n filteredReferentials: this.state.referentials\r\n });\r\n return;\r\n }\r\n\r\n const filteredReferentials = this.state.referentials.filter((ref) => ref.dependencyId === newValue.id);\r\n this.setState({\r\n ...this.state,\r\n selectedRegion: newValue,\r\n filteredReferentials: filteredReferentials\r\n });\r\n }\r\n\r\n loadDependentReferentials = async (dependency: string) => {\r\n const dependencyConfig = Referentials.referential.find(\r\n (r) => r.code === dependency\r\n ) as IReferentialConfig;\r\n const dependentReferentialList = await this.appReferentialService.GetFromDB(\r\n dependencyConfig.getUrl\r\n );\r\n return { dependentReferentialList, dependencyConfig };\r\n };\r\n\r\n handleIsActiveChange = async (event: ChangeEvent, rowData: any) => {\r\n const id = rowData.id;\r\n const newReferentials = [...this.state.filteredReferentials];\r\n const updatedReferential = newReferentials.find((ref) => ref.id === id);\r\n if (updatedReferential !== undefined) {\r\n updatedReferential.isActive = event.target.checked;\r\n\r\n try {\r\n await this.appReferentialService.Update(\r\n updatedReferential,\r\n this.state.selectedReferential!.updateUrl\r\n );\r\n this.setState({\r\n referentials: newReferentials\r\n });\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n\r\n activeLanguages = () => {\r\n const activeLanguages =\r\n this.props.appState.appUser!.organization!.gtOrganization!.languages!.filter((language) => {\r\n if (language.isActive === true) {\r\n return language;\r\n }\r\n });\r\n activeLanguages.forEach((language) => {\r\n language.displayName =\r\n language.displayName.charAt(0).toUpperCase() + language.displayName.slice(1);\r\n });\r\n return activeLanguages;\r\n };\r\n\r\n handleLocListChange = (event: any, gridProps: any, code: string | null) => {\r\n let newLocList = [] as ITranslation[];\r\n if (gridProps.rowData.translations) {\r\n newLocList = gridProps.rowData.translations.map((loc: any) => {\r\n if (loc.language === code) {\r\n loc.name = event.target.value;\r\n }\r\n return loc;\r\n });\r\n }\r\n\r\n gridProps.onRowDataChange({\r\n ...gridProps.rowData,\r\n translations: newLocList\r\n });\r\n };\r\n\r\n getColumns = () => {\r\n return [\r\n {\r\n field: 'code',\r\n title: this.translatorService.Tranlate('LIST_OF_VALUES_COD_HEADER', 'Cod'),\r\n searchable: true\r\n // initialEditValue: Guid.create().toString()\r\n } as Column,\r\n {\r\n field: 'translations',\r\n title: this.translatorService.Tranlate('LIST_OF_VALUES_NAME_HEADER', 'Nume'),\r\n searchable: true,\r\n render: (rowData: any) => {\r\n return rowData.translations.map((val: ITranslation, index: number) => {\r\n const language = this.state.languages.find((language: any) => {\r\n return language.code === val.language;\r\n });\r\n return language ? (\r\n
\r\n {' '}\r\n
\r\n ) : null;\r\n });\r\n },\r\n customFilterAndSearch: (value, rowData) => {\r\n let matchFilter = false;\r\n rowData.translations.map((val: any) => {\r\n const findMatch = val.name.toLowerCase().indexOf(value.toLowerCase()) != -1;\r\n if (findMatch) {\r\n matchFilter = true;\r\n }\r\n });\r\n return matchFilter;\r\n },\r\n editComponent: (props: any) => {\r\n if (!R.isNil(props.value)) {\r\n return props.value.map((val: ITranslation, index: number) => {\r\n const language = this.state.languages.find(\r\n (language: any) => language.code === val.language\r\n );\r\n\r\n return language ? (\r\n
\r\n this.handleLocListChange(e, props, val.language)}\r\n >\r\n
\r\n ) : null;\r\n });\r\n } else {\r\n //add\r\n const newLocList = [] as ITranslation[];\r\n for (let i = 0; i < this.state.languages!.length; i++) {\r\n const locListItem = {} as ITranslation;\r\n locListItem.language = this.state.languages[i].code;\r\n locListItem.name = '';\r\n newLocList.push(locListItem);\r\n }\r\n\r\n props.onChange(newLocList);\r\n\r\n return null;\r\n }\r\n }\r\n } as Column,\r\n {\r\n field: 'dateModification',\r\n title: this.translatorService.Tranlate('LIST_OF_VALUES_DATE_HEADER', 'Data'),\r\n defaultSort: 'desc',\r\n searchable: true,\r\n render: (rowData: any) => {\r\n return moment\r\n .utc(rowData.dateModification)\r\n .local()\r\n .format(this.props.appState.longDateFormat);\r\n },\r\n editComponent: (props: EditComponentProps) => {\r\n return ;\r\n }\r\n } as Column,\r\n {\r\n field: 'isActive',\r\n title: this.translatorService.Tranlate('LIST_OF_VALUES_ISACTIVE_HEADER', 'Stare'),\r\n render: (rowData: any) => {\r\n return (\r\n this.handleIsActiveChange(e, rowData)}\r\n value={rowData.isActive}\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n );\r\n },\r\n\r\n editComponent: (props: EditComponentProps) => {\r\n return (\r\n props.onChange(e.target.checked)}\r\n />\r\n );\r\n }\r\n }\r\n ];\r\n\r\n };\r\n public getLocalization = () => {\r\n return {\r\n header: { actions: '' },\r\n toolbar: {\r\n searchPlaceholder: this.translatorService.Tranlate('SEARCH', 'Cauta'),\r\n searchTooltip: this.translatorService.Tranlate('SEARCH', 'Cauta')\r\n },\r\n body: {\r\n editTooltip: this.translatorService.Tranlate('EDIT', 'Editeaza'),\r\n addTooltip: this.translatorService.Tranlate('Add', 'Adauga'),\r\n emptyDataSourceMessage: this.translatorService.Tranlate(\r\n 'NO_RECORDS_TO_DISPLAY',\r\n 'Nu exista date de afisat'\r\n ),\r\n editRow: {\r\n cancelTooltip: this.translatorService.Tranlate('CANCEL', 'Anuleaza'),\r\n saveTooltip: this.translatorService.Tranlate('SAVE', 'Salveaza')\r\n }\r\n },\r\n pagination: {\r\n labelRowsSelect: this.translatorService.Tranlate('ROWS', 'inregistrari'),\r\n firstTooltip: this.translatorService.Tranlate('FIRST_PAGE', 'Prima pagina'),\r\n previousTooltip: this.translatorService.Tranlate('PREVIOUS_PAGE', 'Pagina precedenta'),\r\n nextTooltip: this.translatorService.Tranlate('NEXT_PAGE', 'Pagina urmatoare'),\r\n lastTooltip: this.translatorService.Tranlate('LAST_PAGE', 'Ultima pagina'),\r\n labelDisplayedRows:\r\n '{from}-{to} ' + this.translatorService.Tranlate('OF', 'din') + ' {count}'\r\n }\r\n };\r\n };\r\n public renderTypeList = () => {\r\n return (\r\n \r\n \r\n \r\n this.handleCountryChange(newValue)\r\n }\r\n getOptionLabel={(option) => option.displayName || ''}\r\n renderInput={(params: RenderInputParams) => (\r\n \r\n )}\r\n />\r\n \r\n this.handleRegionChange(newValue)\r\n }\r\n getOptionLabel={(option) => option.displayName || ''}\r\n renderInput={(params: RenderInputParams) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n );\r\n };\r\n\r\n onRowUpdate = (newData: IReferential, oldData?: IReferential): Promise =>\r\n new Promise(async (resolve, reject) => {\r\n if (!this.validateRef(newData)) {\r\n reject();\r\n return;\r\n }\r\n\r\n if (oldData) {\r\n this.setState((prevState: ICityListState) => {\r\n const newReferentials = !R.isEmpty(this.state.filteredReferentials)\r\n ? [...this.state.filteredReferentials]\r\n : [...this.state.referentials];\r\n newReferentials[newReferentials.indexOf(oldData)] = newData;\r\n\r\n return { ...prevState, referentials: newReferentials };\r\n });\r\n\r\n try {\r\n await this.appReferentialService.Update(\r\n newData,\r\n this.state.selectedReferential!.updateUrl\r\n );\r\n await this.loadReferentialsList(this.state.selectedReferential);\r\n resolve();\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n }\r\n });\r\n\r\n validateRef = (referential: IReferential): boolean => {\r\n if (referential.code === '' || referential.code === undefined || referential.code === null) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('LIST_OF_VALUES_ERROR_CODE_EMPTY', 'Eroare'),\r\n { variant: 'error' }\r\n );\r\n return false;\r\n }\r\n const referentials = !R.isEmpty(this.state.filteredReferentials)\r\n ? this.state.filteredReferentials\r\n : this.state.referentials;\r\n let resultRef = referentials.find((item) => item.code === referential.code);\r\n if (referential.id !== undefined) {\r\n resultRef = referentials.find(\r\n (item) => item.code === referential.code && item.id !== referential.id\r\n );\r\n }\r\n if (resultRef !== undefined) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('LIST_OF_VALUES_ERROR_CODE_UNIQUE', 'Eroare'),\r\n { variant: 'error' }\r\n );\r\n return false;\r\n }\r\n if (referential.translations === undefined) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('LIST_OF_VALUES_ERROR_NAME', 'Eroare'),\r\n { variant: 'error' }\r\n );\r\n return false;\r\n }\r\n for (const item of referential.translations) {\r\n if (item.name === '' || item.name === undefined || item.name === null) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('LIST_OF_VALUES_ERROR_NAME', 'Eroare'),\r\n { variant: 'error' }\r\n );\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n };\r\n\r\n onRowAdd = (newData: IReferential): Promise =>\r\n new Promise(async (resolve, reject) => {\r\n if (!this.validateRef(newData)) {\r\n reject();\r\n return;\r\n }\r\n try {\r\n newData.name = newData.translations[0].name;\r\n newData.gtId = this.props.appState.appUser!.gtId!;\r\n if (!R.isNil(this.state.selectedRegion)) {\r\n newData.dependencyId = this.state.selectedRegion.id;\r\n }\r\n await this.appReferentialService.Add(newData, this.state.selectedReferential!.addUrl);\r\n await this.loadReferentialsList(this.state.selectedReferential);\r\n resolve();\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n });\r\n\r\n public renderTable = () => {\r\n if (this.state.selectedReferential === null) {\r\n return;\r\n }\r\n\r\n return (\r\n this.onRowAdd(newData),\r\n onRowUpdate: (newData: any, oldData?: any) => this.onRowUpdate(newData, oldData)\r\n }}\r\n />\r\n );\r\n };\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? this.renderTypeList() : null}\r\n {!this.state.isLoading ? this.renderTable() : null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect((state: ApplicationState) => ({ appState: state.app }))(\r\n withSnackbar(CityAppReferentials as any)\r\n);\r\n","import React, { Fragment, ChangeEvent } from 'react';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { Box, Switch, Card, TextField } from '@material-ui/core';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport { ITranslation, IReferential, IReferentialConfig } from '../../../interfaces/IReferential';\r\nimport Autocomplete, { RenderInputParams } from '@material-ui/lab/Autocomplete';\r\nimport MaterialTable, { Icons, EditComponentProps, Column } from 'material-table';\r\nimport Referentials from '../../../helpers/Referentials.json';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../store';\r\nimport { forwardRef } from 'react';\r\nimport ArrowDownward from '@material-ui/icons/ArrowDownward';\r\nimport Check from '@material-ui/icons/Check';\r\nimport ChevronLeft from '@material-ui/icons/ChevronLeft';\r\nimport ChevronRight from '@material-ui/icons/ChevronRight';\r\nimport Clear from '@material-ui/icons/Clear';\r\nimport DeleteOutline from '@material-ui/icons/DeleteOutline';\r\nimport Edit from '@material-ui/icons/Edit';\r\nimport FilterList from '@material-ui/icons/FilterList';\r\nimport FirstPage from '@material-ui/icons/FirstPage';\r\nimport LastPage from '@material-ui/icons/LastPage';\r\nimport Remove from '@material-ui/icons/Remove';\r\nimport SaveAlt from '@material-ui/icons/SaveAlt';\r\nimport Search from '@material-ui/icons/Search';\r\nimport ViewColumn from '@material-ui/icons/ViewColumn';\r\nimport { Label } from 'reactstrap';\r\nimport moment from 'moment';\r\nimport AddCircleTwoToneIcon from '@material-ui/icons/AddCircleTwoTone';\r\nimport { Language } from '../../../interfaces/Organization';\r\nimport * as R from 'ramda';\r\nimport { ReferentialCode } from '../../../helpers/Constants';\r\nimport _ from 'lodash';\r\n\r\nconst tableIcons = {\r\n Add: forwardRef((props, ref) => ),\r\n Check: forwardRef((props, ref) => ),\r\n Clear: forwardRef((props, ref) => ),\r\n Delete: forwardRef((props, ref) => ),\r\n DetailPanel: forwardRef((props, ref) => ),\r\n Edit: forwardRef((props, ref) => ),\r\n Export: forwardRef((props, ref) => ),\r\n Filter: forwardRef((props, ref) => ),\r\n FirstPage: forwardRef((props, ref) => ),\r\n LastPage: forwardRef((props, ref) => ),\r\n NextPage: forwardRef((props, ref) => ),\r\n PreviousPage: forwardRef((props, ref) => ),\r\n ResetSearch: forwardRef((props, ref) => ),\r\n Search: forwardRef((props, ref) => ),\r\n SortArrow: forwardRef((props, ref) => ),\r\n ThirdStateCheck: forwardRef((props, ref) => ),\r\n ViewColumn: forwardRef((props, ref) => )\r\n} as Icons;\r\n\r\ntype LeaseProviderListProps = { appState: AppState } & ProviderContext;\r\n\r\ninterface ILeaseProviderListState {\r\n countryList: IReferential[];\r\n leaseCategoryList: IReferential[];\r\n referentials: IReferential[];\r\n filteredReferentials: IReferential[];\r\n isLoading: boolean;\r\n selectedReferential: IReferentialConfig | null;\r\n selectedCountry: IReferential | null;\r\n selectedLeaseCategory: IReferential | null;\r\n languages: Language[];\r\n}\r\n\r\nclass LeaseProviderAppReferentials extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n referentials: [],\r\n isLoading: false,\r\n selectedReferential: null,\r\n languages: [] as Language[],\r\n countryList: [],\r\n leaseCategoryList: [],\r\n dependentReferentialConfig: null,\r\n selectedCountry: null,\r\n selectedLeaseCategory: null,\r\n filteredReferentials: []\r\n } as ILeaseProviderListState;\r\n\r\n componentDidMount = () => {\r\n const referential = Referentials.referential.find(x => x.code === ReferentialCode.LeaseProvider) as IReferentialConfig;\r\n this.setState({\r\n isLoading: true,\r\n languages: this.activeLanguages(),\r\n },\r\n async () => {\r\n this.loadReferentialsList(referential);\r\n });\r\n };\r\n\r\n loadReferentialsList = async (value: IReferentialConfig | null) => {\r\n let referentialList: IReferential[] = [];\r\n let countryList: IReferential[] = [];\r\n let leaseCategoryList: IReferential[] = [];\r\n if (value !== null && value.getUrl !== '') {\r\n try {\r\n referentialList = await this.appReferentialService.GetFromDB(value.getUrl);\r\n countryList = (await this.loadDependentReferentials(ReferentialCode.Country)).dependentReferentialList.filter(x => x.isActive === true);\r\n leaseCategoryList = (await this.loadDependentReferentials(ReferentialCode.LeaseProviderCategory)).dependentReferentialList.filter(x => x.isActive === true);\r\n referentialList.forEach((refItem) => {\r\n this.state.languages.forEach((lang) => {\r\n const translation = refItem.translations.find((item) => item.language === lang.code);\r\n if (R.isNil(translation)) {\r\n refItem.translations.push({\r\n id: 0,\r\n name: '',\r\n language: lang.code,\r\n referentialTypeId: refItem.id\r\n } as ITranslation);\r\n }\r\n });\r\n });\r\n\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n\r\n const selectedCountry = this.state.selectedCountry ?? countryList[0];\r\n const selectedLeaseCategory = this.state.selectedLeaseCategory ?? leaseCategoryList[0];\r\n \r\n this.setState({\r\n referentials: referentialList,\r\n isLoading: false,\r\n selectedReferential: value!,\r\n countryList: countryList, \r\n selectedCountry: selectedCountry,\r\n selectedLeaseCategory: selectedLeaseCategory,\r\n leaseCategoryList: leaseCategoryList,\r\n filteredReferentials: referentialList.filter(\r\n (ref) => ref.dependencyId === selectedLeaseCategory?.id && ref.countryId === selectedCountry?.id)\r\n });\r\n };\r\n\r\n handleCountryChange = (newValue: IReferential | null) => {\r\n if (R.isNil(newValue)) {\r\n this.setState({\r\n ...this.state,\r\n selectedCountry: newValue,\r\n filteredReferentials: this.state.referentials\r\n });\r\n return;\r\n }\r\n\r\n this.setState({\r\n ...this.state,\r\n selectedCountry: newValue,\r\n filteredReferentials: this.state.referentials.filter((ref) => ref.countryId === newValue.id && ref.dependencyId === this.state.selectedLeaseCategory?.id)\r\n });\r\n };\r\n\r\n handleLeaseCategoryChange = (newValue: IReferential | null) => {\r\n if (R.isNil(newValue)) {\r\n this.setState({\r\n ...this.state,\r\n selectedLeaseCategory: newValue,\r\n filteredReferentials: this.state.referentials\r\n });\r\n return;\r\n }\r\n\r\n this.setState({\r\n ...this.state,\r\n selectedLeaseCategory: newValue,\r\n filteredReferentials: this.state.referentials.filter((ref) => ref.dependencyId === newValue.id && ref.countryId === this.state.selectedCountry?.id)\r\n });\r\n }\r\n\r\n loadDependentReferentials = async (dependency: string) => {\r\n const dependencyConfig = Referentials.referential.find(\r\n (r) => r.code === dependency\r\n ) as IReferentialConfig;\r\n const dependentReferentialList = await this.appReferentialService.GetFromDB(\r\n dependencyConfig.getUrl\r\n );\r\n return { dependentReferentialList, dependencyConfig };\r\n };\r\n\r\n handleIsActiveChange = async (event: ChangeEvent, rowData: any) => {\r\n const id = rowData.id;\r\n const newReferentials = [...this.state.filteredReferentials];\r\n const updatedReferential = newReferentials.find((ref) => ref.id === id);\r\n if (updatedReferential !== undefined) {\r\n updatedReferential.isActive = event.target.checked;\r\n\r\n try {\r\n await this.appReferentialService.Update(\r\n updatedReferential,\r\n this.state.selectedReferential!.updateUrl\r\n );\r\n this.setState({\r\n referentials: newReferentials\r\n });\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n\r\n activeLanguages = () => {\r\n const activeLanguages =\r\n this.props.appState.appUser!.organization!.gtOrganization!.languages!.filter((language) => {\r\n if (language.isActive === true) {\r\n return language;\r\n }\r\n });\r\n activeLanguages.forEach((language) => {\r\n language.displayName =\r\n language.displayName.charAt(0).toUpperCase() + language.displayName.slice(1);\r\n });\r\n return activeLanguages;\r\n };\r\n\r\n handleLocListChange = (event: any, gridProps: any, code: string | null) => {\r\n let newLocList = [] as ITranslation[];\r\n if (gridProps.rowData.translations) {\r\n newLocList = gridProps.rowData.translations.map((loc: any) => {\r\n if (loc.language === code) {\r\n loc.name = event.target.value;\r\n }\r\n return loc;\r\n });\r\n }\r\n\r\n gridProps.onRowDataChange({\r\n ...gridProps.rowData,\r\n translations: newLocList\r\n });\r\n };\r\n\r\n getColumns = () => {\r\n return [\r\n {\r\n field: 'code',\r\n title: this.translatorService.Tranlate('LIST_OF_VALUES_COD_HEADER', 'Cod'),\r\n searchable: true\r\n // initialEditValue: Guid.create().toString()\r\n } as Column,\r\n {\r\n field: 'translations',\r\n title: this.translatorService.Tranlate('LIST_OF_VALUES_NAME_HEADER', 'Nume'),\r\n searchable: true,\r\n render: (rowData: any) => {\r\n return rowData.translations.map((val: ITranslation, index: number) => {\r\n const language = this.state.languages.find((language: any) => {\r\n return language.code === val.language;\r\n });\r\n return language ? (\r\n
\r\n {' '}\r\n
\r\n ) : null;\r\n });\r\n },\r\n customFilterAndSearch: (value, rowData) => {\r\n let matchFilter = false;\r\n rowData.translations.map((val: any) => {\r\n const findMatch = val.name.toLowerCase().indexOf(value.toLowerCase()) != -1;\r\n if (findMatch) {\r\n matchFilter = true;\r\n }\r\n });\r\n return matchFilter;\r\n },\r\n editComponent: (props: any) => {\r\n if (!R.isNil(props.value)) {\r\n return props.value.map((val: ITranslation, index: number) => {\r\n const language = this.state.languages.find(\r\n (language: any) => language.code === val.language\r\n );\r\n\r\n return language ? (\r\n
\r\n this.handleLocListChange(e, props, val.language)}\r\n >\r\n
\r\n ) : null;\r\n });\r\n } else {\r\n //add\r\n const newLocList = [] as ITranslation[];\r\n for (let i = 0; i < this.state.languages!.length; i++) {\r\n const locListItem = {} as ITranslation;\r\n locListItem.language = this.state.languages[i].code;\r\n locListItem.name = '';\r\n newLocList.push(locListItem);\r\n }\r\n\r\n props.onChange(newLocList);\r\n\r\n return null;\r\n }\r\n }\r\n } as Column,\r\n {\r\n field: 'dateModification',\r\n title: this.translatorService.Tranlate('LIST_OF_VALUES_DATE_HEADER', 'Data'),\r\n defaultSort: 'desc',\r\n searchable: true,\r\n render: (rowData: any) => {\r\n return moment\r\n .utc(rowData.dateModification)\r\n .local()\r\n .format(this.props.appState.longDateFormat);\r\n },\r\n editComponent: (props: EditComponentProps) => {\r\n return ;\r\n }\r\n } as Column,\r\n {\r\n field: 'isActive',\r\n title: this.translatorService.Tranlate('LIST_OF_VALUES_ISACTIVE_HEADER', 'Stare'),\r\n render: (rowData: any) => {\r\n return (\r\n this.handleIsActiveChange(e, rowData)}\r\n value={rowData.isActive}\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n );\r\n },\r\n\r\n editComponent: (props: EditComponentProps) => {\r\n return (\r\n props.onChange(e.target.checked)}\r\n />\r\n );\r\n }\r\n }\r\n ];\r\n\r\n };\r\n public getLocalization = () => {\r\n return {\r\n header: { actions: '' },\r\n toolbar: {\r\n searchPlaceholder: this.translatorService.Tranlate('SEARCH', 'Cauta'),\r\n searchTooltip: this.translatorService.Tranlate('SEARCH', 'Cauta')\r\n },\r\n body: {\r\n editTooltip: this.translatorService.Tranlate('EDIT', 'Editeaza'),\r\n addTooltip: this.translatorService.Tranlate('Add', 'Adauga'),\r\n emptyDataSourceMessage: this.translatorService.Tranlate(\r\n 'NO_RECORDS_TO_DISPLAY',\r\n 'Nu exista date de afisat'\r\n ),\r\n editRow: {\r\n cancelTooltip: this.translatorService.Tranlate('CANCEL', 'Anuleaza'),\r\n saveTooltip: this.translatorService.Tranlate('SAVE', 'Salveaza')\r\n }\r\n },\r\n pagination: {\r\n labelRowsSelect: this.translatorService.Tranlate('ROWS', 'inregistrari'),\r\n firstTooltip: this.translatorService.Tranlate('FIRST_PAGE', 'Prima pagina'),\r\n previousTooltip: this.translatorService.Tranlate('PREVIOUS_PAGE', 'Pagina precedenta'),\r\n nextTooltip: this.translatorService.Tranlate('NEXT_PAGE', 'Pagina urmatoare'),\r\n lastTooltip: this.translatorService.Tranlate('LAST_PAGE', 'Ultima pagina'),\r\n labelDisplayedRows:\r\n '{from}-{to} ' + this.translatorService.Tranlate('OF', 'din') + ' {count}'\r\n }\r\n };\r\n };\r\n public renderTypeList = () => {\r\n return (\r\n \r\n \r\n \r\n this.handleCountryChange(newValue)\r\n }\r\n getOptionLabel={(option) => option.displayName || ''}\r\n renderInput={(params: RenderInputParams) => (\r\n \r\n )}\r\n />\r\n \r\n this.handleLeaseCategoryChange(newValue)\r\n }\r\n getOptionLabel={(option) => option.displayName || ''}\r\n renderInput={(params: RenderInputParams) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n );\r\n };\r\n\r\n onRowUpdate = (newData: IReferential, oldData?: IReferential): Promise =>\r\n new Promise(async (resolve, reject) => {\r\n if (!this.validateRef(newData)) {\r\n reject();\r\n return;\r\n }\r\n\r\n if (oldData) {\r\n this.setState((prevState: ILeaseProviderListState) => {\r\n const newReferentials = !R.isEmpty(this.state.filteredReferentials)\r\n ? [...this.state.filteredReferentials]\r\n : [...this.state.referentials];\r\n newReferentials[newReferentials.indexOf(oldData)] = newData;\r\n\r\n return { ...prevState, referentials: newReferentials };\r\n });\r\n\r\n try {\r\n await this.appReferentialService.Update(\r\n newData,\r\n this.state.selectedReferential!.updateUrl\r\n );\r\n await this.loadReferentialsList(this.state.selectedReferential);\r\n resolve();\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n }\r\n });\r\n\r\n validateRef = (referential: IReferential): boolean => {\r\n if (referential.code === '' || referential.code === undefined || referential.code === null) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('LIST_OF_VALUES_ERROR_CODE_EMPTY', 'Eroare'),\r\n { variant: 'error' }\r\n );\r\n return false;\r\n }\r\n const referentials = !R.isEmpty(this.state.filteredReferentials)\r\n ? this.state.filteredReferentials\r\n : this.state.referentials;\r\n let resultRef = referentials.find((item) => item.code === referential.code);\r\n if (referential.id !== undefined) {\r\n resultRef = referentials.find(\r\n (item) => item.code === referential.code && item.id !== referential.id\r\n );\r\n }\r\n if (resultRef !== undefined) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('LIST_OF_VALUES_ERROR_CODE_UNIQUE', 'Eroare'),\r\n { variant: 'error' }\r\n );\r\n return false;\r\n }\r\n if (referential.translations === undefined) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('LIST_OF_VALUES_ERROR_NAME', 'Eroare'),\r\n { variant: 'error' }\r\n );\r\n return false;\r\n }\r\n for (const item of referential.translations) {\r\n if (item.name === '' || item.name === undefined || item.name === null) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('LIST_OF_VALUES_ERROR_NAME', 'Eroare'),\r\n { variant: 'error' }\r\n );\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n };\r\n\r\n onRowAdd = (newData: IReferential): Promise =>\r\n new Promise(async (resolve, reject) => {\r\n if (!this.validateRef(newData)) {\r\n reject();\r\n return;\r\n }\r\n try {\r\n newData.name = newData.translations[0].name;\r\n newData.gtId = this.props.appState.appUser!.gtId!;\r\n if (!R.isNil(this.state.selectedLeaseCategory)) {\r\n newData.dependencyId = this.state.selectedLeaseCategory.id;\r\n }\r\n if (!R.isNil(this.state.selectedCountry)) {\r\n newData.countryId = this.state.selectedCountry.id;\r\n }\r\n await this.appReferentialService.Add(newData, this.state.selectedReferential!.addUrl);\r\n await this.loadReferentialsList(this.state.selectedReferential);\r\n resolve();\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n });\r\n\r\n public renderTable = () => {\r\n if (this.state.selectedReferential === null) {\r\n return;\r\n }\r\n\r\n return (\r\n this.onRowAdd(newData),\r\n onRowUpdate: (newData: any, oldData?: any) => this.onRowUpdate(newData, oldData)\r\n }}\r\n />\r\n );\r\n };\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? this.renderTypeList() : null}\r\n {!this.state.isLoading ? this.renderTable() : null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect((state: ApplicationState) => ({ appState: state.app }))(\r\n withSnackbar(LeaseProviderAppReferentials as any)\r\n);\r\n","import React, { Fragment, ChangeEvent } from 'react';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { Box, Switch, Card, TextField } from '@material-ui/core';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport { ITranslation, IReferential, IReferentialConfig } from '../../../interfaces/IReferential';\r\nimport Autocomplete, { RenderInputParams } from '@material-ui/lab/Autocomplete';\r\nimport MaterialTable, { Icons, EditComponentProps, Column } from 'material-table';\r\nimport Referentials from '../../../helpers/Referentials.json';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../store';\r\nimport { forwardRef } from 'react';\r\nimport ArrowDownward from '@material-ui/icons/ArrowDownward';\r\nimport Check from '@material-ui/icons/Check';\r\nimport ChevronLeft from '@material-ui/icons/ChevronLeft';\r\nimport ChevronRight from '@material-ui/icons/ChevronRight';\r\nimport Clear from '@material-ui/icons/Clear';\r\nimport DeleteOutline from '@material-ui/icons/DeleteOutline';\r\nimport Edit from '@material-ui/icons/Edit';\r\nimport FilterList from '@material-ui/icons/FilterList';\r\nimport FirstPage from '@material-ui/icons/FirstPage';\r\nimport LastPage from '@material-ui/icons/LastPage';\r\nimport Remove from '@material-ui/icons/Remove';\r\nimport SaveAlt from '@material-ui/icons/SaveAlt';\r\nimport Search from '@material-ui/icons/Search';\r\nimport ViewColumn from '@material-ui/icons/ViewColumn';\r\nimport { Label } from 'reactstrap';\r\nimport moment from 'moment';\r\nimport AddCircleTwoToneIcon from '@material-ui/icons/AddCircleTwoTone';\r\nimport { Language } from '../../../interfaces/Organization';\r\nimport * as R from 'ramda';\r\nimport { ReferentialCode } from '../../../helpers/Constants';\r\nimport CityAppReferentials from './CityAppReferentials';\r\nimport LeaseProviderAppReferentials from './LeaseProviderAppReferentials';\r\n\r\nconst tableIcons = {\r\n Add: forwardRef((props, ref) => ),\r\n Check: forwardRef((props, ref) => ),\r\n Clear: forwardRef((props, ref) => ),\r\n Delete: forwardRef((props, ref) => ),\r\n DetailPanel: forwardRef((props, ref) => ),\r\n Edit: forwardRef((props, ref) => ),\r\n Export: forwardRef((props, ref) => ),\r\n Filter: forwardRef((props, ref) => ),\r\n FirstPage: forwardRef((props, ref) => ),\r\n LastPage: forwardRef((props, ref) => ),\r\n NextPage: forwardRef((props, ref) => ),\r\n PreviousPage: forwardRef((props, ref) => ),\r\n ResetSearch: forwardRef((props, ref) => ),\r\n Search: forwardRef((props, ref) => ),\r\n SortArrow: forwardRef((props, ref) => ),\r\n ThirdStateCheck: forwardRef((props, ref) => ),\r\n ViewColumn: forwardRef((props, ref) => )\r\n} as Icons;\r\n\r\ntype ReferentialProps = { appState: AppState } & ProviderContext;\r\n\r\ninterface IReferentialState {\r\n dependentReferencials: IReferential[];\r\n referentials: IReferential[];\r\n filteredReferentials: IReferential[];\r\n isLoading: boolean;\r\n selectedReferential: IReferentialConfig | null;\r\n selectedDependentReferential: IReferential | null;\r\n dependentReferentialConfig: IReferentialConfig | null;\r\n languages: Language[];\r\n organizationTypeReferential: boolean;\r\n fuelTypeReferential: boolean;\r\n vehicleStatusReferential: boolean;\r\n}\r\n\r\nclass AppReferentials extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n referentials: [],\r\n isLoading: false,\r\n selectedReferential: null,\r\n languages: [] as Language[],\r\n dependentReferencials: [],\r\n dependentReferentialConfig: null,\r\n selectedDependentReferential: null,\r\n filteredReferentials: [],\r\n organizationTypeReferential: false,\r\n fuelTypeReferential: false,\r\n vehicleStatusReferential: false\r\n } as IReferentialState;\r\n\r\n componentDidMount = () => {\r\n this.setState({\r\n languages: this.activeLanguages()\r\n });\r\n };\r\n\r\n onTagsChange = (event: React.ChangeEvent, value: IReferentialConfig | null) => {\r\n if (value?.code === ReferentialCode.City) {\r\n this.setState(\r\n {\r\n selectedReferential: value!,\r\n dependentReferencials: [],\r\n dependentReferentialConfig: null,\r\n selectedDependentReferential: null\r\n }\r\n );\r\n return;\r\n }\r\n\r\n if (value?.code === ReferentialCode.LeaseProvider) {\r\n this.setState(\r\n {\r\n selectedReferential: value!,\r\n dependentReferencials: [],\r\n dependentReferentialConfig: null,\r\n selectedDependentReferential: null\r\n }\r\n );\r\n return;\r\n }\r\n \r\n this.setState(\r\n {\r\n isLoading: true,\r\n dependentReferencials: [],\r\n dependentReferentialConfig: null,\r\n selectedDependentReferential: null,\r\n organizationTypeReferential: value?.code === ReferentialCode.OrganizationType ? true : false,\r\n fuelTypeReferential: value?.code === ReferentialCode.FuelType ? true : false,\r\n vehicleStatusReferential: value?.code === ReferentialCode.VehicleStatus ? true : false\r\n },\r\n () => {\r\n this.loadReferentials(value);\r\n }\r\n );\r\n };\r\n\r\n handleDependentReferencial = (newValue: IReferential | null) => {\r\n if (R.isNil(newValue)) {\r\n this.setState({\r\n ...this.state,\r\n selectedDependentReferential: newValue,\r\n filteredReferentials: this.state.referentials\r\n });\r\n return;\r\n }\r\n\r\n const referentials = this.state.referentials.filter((ref) => ref.dependencyId === newValue.id);\r\n this.setState({\r\n ...this.state,\r\n selectedDependentReferential: newValue,\r\n filteredReferentials: referentials\r\n });\r\n };\r\n\r\n loadDependentReferentials = async (dependency: string) => {\r\n const dependencyConfig = Referentials.referential.find(\r\n (r) => r.code === dependency\r\n ) as IReferentialConfig;\r\n const dependentReferentialList = await this.appReferentialService.GetFromDB(\r\n dependencyConfig.getUrl\r\n );\r\n return { dependentReferentialList, dependencyConfig };\r\n };\r\n\r\n loadReferentials = async (value: IReferentialConfig | null) => {\r\n let referentialList: IReferential[] = [];\r\n let dependentReferencials: IReferential[] = [];\r\n let dependentReferentialConfig: IReferentialConfig | null = null;\r\n if (value !== null && value.getUrl !== '') {\r\n try {\r\n referentialList = await this.appReferentialService.GetFromDB(value.getUrl);\r\n\r\n if (!R.isNil(value.dependency)) {\r\n const { dependentReferentialList, dependencyConfig } =\r\n await this.loadDependentReferentials(value.dependency);\r\n dependentReferencials = dependentReferentialList.filter(x => x.isActive === true);\r\n dependentReferentialConfig = dependencyConfig;\r\n\r\n this.setState({\r\n filteredReferentials: referentialList.filter(\r\n (ref) =>\r\n ref.dependencyId === this.state.selectedDependentReferential?.id ??\r\n dependentReferencials[0].id\r\n ),\r\n dependentReferencials: dependentReferencials,\r\n dependentReferentialConfig: dependentReferentialConfig,\r\n selectedDependentReferential:\r\n this.state.selectedDependentReferential ?? dependentReferencials[0]\r\n });\r\n }\r\n\r\n referentialList.forEach((refItem) => {\r\n this.state.languages.forEach((lang) => {\r\n const translation = refItem.translations.find((item) => item.language === lang.code);\r\n if (R.isNil(translation)) {\r\n refItem.translations.push({\r\n id: 0,\r\n name: '',\r\n language: lang.code,\r\n referentialTypeId: refItem.id\r\n } as ITranslation);\r\n }\r\n });\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n\r\n console.log(this.state);\r\n console.log(this.state.selectedDependentReferential ?? dependentReferencials[0]);\r\n console.log(referentialList.filter(\r\n (ref) =>\r\n ref.dependencyId === this.state.selectedDependentReferential?.id ??\r\n dependentReferencials[0].id\r\n ));\r\n this.setState({\r\n referentials: referentialList,\r\n isLoading: false,\r\n selectedReferential: value!,\r\n selectedDependentReferential: this.state.selectedDependentReferential ?? dependentReferencials[0],\r\n filteredReferentials: referentialList.filter(\r\n (ref) =>\r\n ref.dependencyId === this.state.selectedDependentReferential?.id ??\r\n dependentReferencials[0].id\r\n )\r\n });\r\n };\r\n\r\n handleIsActiveChange = async (event: ChangeEvent, rowData: any) => {\r\n const id = rowData.id;\r\n const newReferentials = [...this.state.filteredReferentials];\r\n const updatedReferential = newReferentials.find((ref) => ref.id === id);\r\n if (updatedReferential !== undefined) {\r\n updatedReferential.isActive = event.target.checked;\r\n\r\n try {\r\n await this.appReferentialService.Update(\r\n updatedReferential,\r\n this.state.selectedReferential!.updateUrl\r\n );\r\n this.setState({\r\n referentials: newReferentials\r\n });\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n\r\n handleIsFleetStatusChange = async (event: ChangeEvent, rowData: any) => {\r\n const id = rowData.id;\r\n const newReferentials = [...this.state.filteredReferentials];\r\n const updatedReferential = newReferentials.find((ref) => ref.id === id);\r\n if (updatedReferential !== undefined) {\r\n updatedReferential.isFleetStatus = event.target.checked;\r\n\r\n try {\r\n await this.appReferentialService.Update(\r\n updatedReferential,\r\n this.state.selectedReferential!.updateUrl\r\n );\r\n this.setState({\r\n referentials: newReferentials\r\n });\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n\r\n handleIsRCRAvailableChange = async (event: ChangeEvent, rowData: any) => {\r\n const id = rowData.id;\r\n const newReferentials = [...this.state.filteredReferentials];\r\n const updatedReferential = newReferentials.find((ref) => ref.id === id);\r\n if (updatedReferential !== undefined) {\r\n updatedReferential.isRCRAvailable = event.target.checked;\r\n\r\n try {\r\n await this.appReferentialService.Update(\r\n updatedReferential,\r\n this.state.selectedReferential!.updateUrl\r\n );\r\n this.setState({\r\n referentials: newReferentials\r\n });\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n\r\n\r\n activeLanguages = () => {\r\n const activeLanguages =\r\n this.props.appState.appUser!.organization!.gtOrganization!.languages!.filter((language) => {\r\n if (language.isActive === true) {\r\n return language;\r\n }\r\n });\r\n activeLanguages.forEach((language) => {\r\n language.displayName =\r\n language.displayName.charAt(0).toUpperCase() + language.displayName.slice(1);\r\n });\r\n return activeLanguages;\r\n };\r\n\r\n handleLocListChange = (event: any, gridProps: any, code: string | null) => {\r\n let newLocList = [] as ITranslation[];\r\n if (gridProps.rowData.translations) {\r\n newLocList = gridProps.rowData.translations.map((loc: any) => {\r\n if (loc.language === code) {\r\n loc.name = event.target.value;\r\n }\r\n return loc;\r\n });\r\n }\r\n\r\n gridProps.onRowDataChange({\r\n ...gridProps.rowData,\r\n translations: newLocList\r\n });\r\n };\r\n\r\n getColumns = () => {\r\n if (this.state.vehicleStatusReferential) {\r\n return [\r\n {\r\n field: 'code',\r\n title: this.translatorService.Tranlate('LIST_OF_VALUES_COD_HEADER', 'Cod'),\r\n searchable: true\r\n // initialEditValue: Guid.create().toString()\r\n } as Column,\r\n {\r\n field: 'translations',\r\n title: this.translatorService.Tranlate('LIST_OF_VALUES_NAME_HEADER', 'Nume'),\r\n searchable: true,\r\n render: (rowData: any) => {\r\n return rowData.translations.map((val: ITranslation, index: number) => {\r\n const language = this.state.languages.find((language: any) => {\r\n return language.code === val.language;\r\n });\r\n return language ? (\r\n
\r\n {' '}\r\n
\r\n ) : null;\r\n });\r\n },\r\n customFilterAndSearch: (value, rowData) => {\r\n let matchFilter = false;\r\n rowData.translations.map((val: any) => {\r\n const findMatch = val.name.toLowerCase().indexOf(value.toLowerCase()) != -1;\r\n if (findMatch) {\r\n matchFilter = true;\r\n }\r\n });\r\n return matchFilter;\r\n },\r\n editComponent: (props: any) => {\r\n if (!R.isNil(props.value)) {\r\n return props.value.map((val: ITranslation, index: number) => {\r\n const language = this.state.languages.find(\r\n (language: any) => language.code === val.language\r\n );\r\n\r\n return language ? (\r\n
\r\n this.handleLocListChange(e, props, val.language)}\r\n >\r\n
\r\n ) : null;\r\n });\r\n } else {\r\n //add\r\n const newLocList = [] as ITranslation[];\r\n for (let i = 0; i < this.state.languages!.length; i++) {\r\n const locListItem = {} as ITranslation;\r\n locListItem.language = this.state.languages[i].code;\r\n locListItem.name = '';\r\n newLocList.push(locListItem);\r\n }\r\n\r\n props.onChange(newLocList);\r\n\r\n return null;\r\n }\r\n }\r\n } as Column,\r\n {\r\n field: 'dateModification',\r\n title: this.translatorService.Tranlate('LIST_OF_VALUES_DATE_HEADER', 'Data'),\r\n defaultSort: 'desc',\r\n searchable: true,\r\n render: (rowData: any) => {\r\n return moment\r\n .utc(rowData.dateModification)\r\n .local()\r\n .format(this.props.appState.longDateFormat);\r\n },\r\n editComponent: (props: EditComponentProps) => {\r\n return ;\r\n }\r\n } as Column,\r\n {\r\n field: 'isFleetStatus',\r\n title: this.translatorService.Tranlate('LIST_OF_VALUES_ISFLEET_STATUS_HEADER', 'Status Fleet'),\r\n render: (rowData: any) => {\r\n return (\r\n this.handleIsFleetStatusChange(e, rowData)}\r\n value={rowData.isFleetStatus}\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n );\r\n },\r\n\r\n editComponent: (props: EditComponentProps) => {\r\n return (\r\n props.onChange(e.target.checked)}\r\n />\r\n );\r\n }\r\n },\r\n {\r\n field: 'isActive',\r\n title: this.translatorService.Tranlate('LIST_OF_VALUES_ISACTIVE_HEADER', 'Stare'),\r\n render: (rowData: any) => {\r\n return (\r\n this.handleIsActiveChange(e, rowData)}\r\n value={rowData.isActive}\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n );\r\n },\r\n\r\n editComponent: (props: EditComponentProps) => {\r\n return (\r\n props.onChange(e.target.checked)}\r\n />\r\n );\r\n }\r\n }\r\n ];\r\n }\r\n if (this.state.fuelTypeReferential) {\r\n return [\r\n {\r\n field: 'code',\r\n title: this.translatorService.Tranlate('LIST_OF_VALUES_COD_HEADER', 'Cod'),\r\n searchable: true\r\n // initialEditValue: Guid.create().toString()\r\n } as Column,\r\n {\r\n field: 'translations',\r\n title: this.translatorService.Tranlate('LIST_OF_VALUES_NAME_HEADER', 'Nume'),\r\n searchable: true,\r\n render: (rowData: any) => {\r\n return rowData.translations.map((val: ITranslation, index: number) => {\r\n const language = this.state.languages.find((language: any) => {\r\n return language.code === val.language;\r\n });\r\n return language ? (\r\n
\r\n {' '}\r\n
\r\n ) : null;\r\n });\r\n },\r\n customFilterAndSearch: (value, rowData) => {\r\n let matchFilter = false;\r\n rowData.translations.map((val: any) => {\r\n const findMatch = val.name.toLowerCase().indexOf(value.toLowerCase()) != -1;\r\n if (findMatch) {\r\n matchFilter = true;\r\n }\r\n });\r\n return matchFilter;\r\n },\r\n editComponent: (props: any) => {\r\n if (!R.isNil(props.value)) {\r\n return props.value.map((val: ITranslation, index: number) => {\r\n const language = this.state.languages.find(\r\n (language: any) => language.code === val.language\r\n );\r\n\r\n return language ? (\r\n
\r\n this.handleLocListChange(e, props, val.language)}\r\n >\r\n
\r\n ) : null;\r\n });\r\n } else {\r\n //add\r\n const newLocList = [] as ITranslation[];\r\n for (let i = 0; i < this.state.languages!.length; i++) {\r\n const locListItem = {} as ITranslation;\r\n locListItem.language = this.state.languages[i].code;\r\n locListItem.name = '';\r\n newLocList.push(locListItem);\r\n }\r\n\r\n props.onChange(newLocList);\r\n\r\n return null;\r\n }\r\n }\r\n } as Column,\r\n {\r\n field: 'dateModification',\r\n title: this.translatorService.Tranlate('LIST_OF_VALUES_DATE_HEADER', 'Data'),\r\n defaultSort: 'desc',\r\n searchable: true,\r\n render: (rowData: any) => {\r\n return moment\r\n .utc(rowData.dateModification)\r\n .local()\r\n .format(this.props.appState.longDateFormat);\r\n },\r\n editComponent: (props: EditComponentProps) => {\r\n return ;\r\n }\r\n } as Column,\r\n {\r\n field: 'isRCRAvailable',\r\n title: this.translatorService.Tranlate('LIST_OF_VALUES_RCR_AVAILABLE_HEADER', 'Disponibil RCR'),\r\n render: (rowData: any) => {\r\n return (\r\n this.handleIsRCRAvailableChange(e, rowData)}\r\n value={rowData.isRCRAvailable}\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n );\r\n },\r\n\r\n editComponent: (props: EditComponentProps) => {\r\n return (\r\n props.onChange(e.target.checked)}\r\n />\r\n );\r\n }\r\n },\r\n {\r\n field: 'isActive',\r\n title: this.translatorService.Tranlate('LIST_OF_VALUES_ISACTIVE_HEADER', 'Stare'),\r\n render: (rowData: any) => {\r\n return (\r\n this.handleIsActiveChange(e, rowData)}\r\n value={rowData.isActive}\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n );\r\n },\r\n\r\n editComponent: (props: EditComponentProps) => {\r\n return (\r\n props.onChange(e.target.checked)}\r\n />\r\n );\r\n }\r\n } \r\n ];\r\n } else if (this.state.organizationTypeReferential) {\r\n return [\r\n {\r\n field: 'code',\r\n title: this.translatorService.Tranlate('LIST_OF_VALUES_COD_HEADER', 'Cod'),\r\n searchable: true\r\n // initialEditValue: Guid.create().toString()\r\n } as Column,\r\n {\r\n field: 'translations',\r\n title: this.translatorService.Tranlate('LIST_OF_VALUES_NAME_HEADER', 'Nume'),\r\n searchable: true,\r\n render: (rowData: any) => {\r\n return rowData.translations.map((val: ITranslation, index: number) => {\r\n const language = this.state.languages.find((language: any) => {\r\n return language.code === val.language;\r\n });\r\n return language ? (\r\n
\r\n {' '}\r\n
\r\n ) : null;\r\n });\r\n },\r\n customFilterAndSearch: (value, rowData) => {\r\n let matchFilter = false;\r\n rowData.translations.map((val: any) => {\r\n const findMatch = val.name.toLowerCase().indexOf(value.toLowerCase()) != -1;\r\n if (findMatch) {\r\n matchFilter = true;\r\n }\r\n });\r\n return matchFilter;\r\n },\r\n editComponent: (props: any) => {\r\n if (!R.isNil(props.value)) {\r\n return props.value.map((val: ITranslation, index: number) => {\r\n const language = this.state.languages.find(\r\n (language: any) => language.code === val.language\r\n );\r\n\r\n return language ? (\r\n
\r\n this.handleLocListChange(e, props, val.language)}\r\n >\r\n
\r\n ) : null;\r\n });\r\n } else {\r\n //add\r\n const newLocList = [] as ITranslation[];\r\n for (let i = 0; i < this.state.languages!.length; i++) {\r\n const locListItem = {} as ITranslation;\r\n locListItem.language = this.state.languages[i].code;\r\n locListItem.name = '';\r\n newLocList.push(locListItem);\r\n }\r\n\r\n props.onChange(newLocList);\r\n\r\n return null;\r\n }\r\n }\r\n } as Column,\r\n {\r\n field: 'dateModification',\r\n title: this.translatorService.Tranlate('LIST_OF_VALUES_DATE_HEADER', 'Data'),\r\n defaultSort: 'desc',\r\n searchable: true,\r\n render: (rowData: any) => {\r\n return moment\r\n .utc(rowData.dateModification)\r\n .local()\r\n .format(this.props.appState.longDateFormat);\r\n },\r\n editComponent: (props: EditComponentProps) => {\r\n return ;\r\n }\r\n } as Column,\r\n {\r\n field: 'takeOrganizationTariff',\r\n title: this.translatorService.Tranlate('LIST_OF_VALUES_TAKE_ORGANIZATION_TARIFF_HEADER', 'Tarif Organizatie'),\r\n render: (rowData: any) => {\r\n return (\r\n \r\n );\r\n },\r\n\r\n editComponent: (props: EditComponentProps) => {\r\n return (\r\n props.onChange(e.target.checked)}\r\n />\r\n );\r\n }\r\n },\r\n {\r\n field: 'hideAlternative',\r\n title: this.translatorService.Tranlate('LIST_OF_VALUES_HIDE_ALTERNATIVE_HEADER', 'Ascunde Alternative'),\r\n render: (rowData: any) => {\r\n return (\r\n \r\n );\r\n },\r\n\r\n editComponent: (props: EditComponentProps) => {\r\n return (\r\n props.onChange(e.target.checked)}\r\n />\r\n );\r\n }\r\n },\r\n {\r\n field: 'hideInsurerCalculation',\r\n title: this.translatorService.Tranlate('LIST_OF_VALUES_HIDE_INSURER_TARIFF_HEADER', 'Ascunde calculatie OE cu tarife asigurator'),\r\n render: (rowData: any) => {\r\n return (\r\n \r\n );\r\n },\r\n\r\n editComponent: (props: EditComponentProps) => {\r\n return (\r\n props.onChange(e.target.checked)}\r\n />\r\n );\r\n }\r\n },\r\n {\r\n field: 'hideOrderPrices',\r\n title: this.translatorService.Tranlate('LIST_OF_VALUES_HIDE_ORDER_PRICES_HEADER', 'Ascunde Preturi Comanda'),\r\n render: (rowData: any) => {\r\n return (\r\n \r\n );\r\n },\r\n\r\n editComponent: (props: EditComponentProps) => {\r\n return (\r\n props.onChange(e.target.checked)}\r\n />\r\n );\r\n }\r\n },\r\n {\r\n field: 'hideOtherAttachments',\r\n title: this.translatorService.Tranlate('LIST_OF_VALUES_HIDE_OTHER_ATTACHMENTS_HEADER', 'Ascunde Altele'),\r\n render: (rowData: any) => {\r\n return (\r\n \r\n );\r\n },\r\n\r\n editComponent: (props: EditComponentProps) => {\r\n return (\r\n props.onChange(e.target.checked)}\r\n />\r\n );\r\n }\r\n },\r\n {\r\n field: 'isActive',\r\n title: this.translatorService.Tranlate('LIST_OF_VALUES_ISACTIVE_HEADER', 'Stare'),\r\n render: (rowData: any) => {\r\n return (\r\n this.handleIsActiveChange(e, rowData)}\r\n value={rowData.isActive}\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n );\r\n },\r\n\r\n editComponent: (props: EditComponentProps) => {\r\n return (\r\n props.onChange(e.target.checked)}\r\n />\r\n );\r\n }\r\n } \r\n ];\r\n } else {\r\n return [\r\n {\r\n field: 'code',\r\n title: this.translatorService.Tranlate('LIST_OF_VALUES_COD_HEADER', 'Cod'),\r\n searchable: true\r\n // initialEditValue: Guid.create().toString()\r\n } as Column,\r\n {\r\n field: 'translations',\r\n title: this.translatorService.Tranlate('LIST_OF_VALUES_NAME_HEADER', 'Nume'),\r\n searchable: true,\r\n render: (rowData: any) => {\r\n return rowData.translations.map((val: ITranslation, index: number) => {\r\n const language = this.state.languages.find((language: any) => {\r\n return language.code === val.language;\r\n });\r\n return language ? (\r\n
\r\n {' '}\r\n
\r\n ) : null;\r\n });\r\n },\r\n customFilterAndSearch: (value, rowData) => {\r\n let matchFilter = false;\r\n rowData.translations.map((val: any) => {\r\n const findMatch = val.name.toLowerCase().indexOf(value.toLowerCase()) != -1;\r\n if (findMatch) {\r\n matchFilter = true;\r\n }\r\n });\r\n return matchFilter;\r\n },\r\n editComponent: (props: any) => {\r\n if (!R.isNil(props.value)) {\r\n return props.value.map((val: ITranslation, index: number) => {\r\n const language = this.state.languages.find(\r\n (language: any) => language.code === val.language\r\n );\r\n\r\n return language ? (\r\n
\r\n this.handleLocListChange(e, props, val.language)}\r\n >\r\n
\r\n ) : null;\r\n });\r\n } else {\r\n //add\r\n const newLocList = [] as ITranslation[];\r\n for (let i = 0; i < this.state.languages!.length; i++) {\r\n const locListItem = {} as ITranslation;\r\n locListItem.language = this.state.languages[i].code;\r\n locListItem.name = '';\r\n newLocList.push(locListItem);\r\n }\r\n\r\n props.onChange(newLocList);\r\n\r\n return null;\r\n }\r\n }\r\n } as Column,\r\n {\r\n field: 'dateModification',\r\n title: this.translatorService.Tranlate('LIST_OF_VALUES_DATE_HEADER', 'Data'),\r\n defaultSort: 'desc',\r\n searchable: true,\r\n render: (rowData: any) => {\r\n return moment\r\n .utc(rowData.dateModification)\r\n .local()\r\n .format(this.props.appState.longDateFormat);\r\n },\r\n editComponent: (props: EditComponentProps) => {\r\n return ;\r\n }\r\n } as Column,\r\n {\r\n field: 'isActive',\r\n title: this.translatorService.Tranlate('LIST_OF_VALUES_ISACTIVE_HEADER', 'Stare'),\r\n render: (rowData: any) => {\r\n return (\r\n this.handleIsActiveChange(e, rowData)}\r\n value={rowData.isActive}\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n );\r\n },\r\n\r\n editComponent: (props: EditComponentProps) => {\r\n return (\r\n props.onChange(e.target.checked)}\r\n />\r\n );\r\n }\r\n }\r\n ];\r\n }\r\n };\r\n public getLocalization = () => {\r\n return {\r\n header: { actions: '' },\r\n toolbar: {\r\n searchPlaceholder: this.translatorService.Tranlate('SEARCH', 'Cauta'),\r\n searchTooltip: this.translatorService.Tranlate('SEARCH', 'Cauta')\r\n },\r\n body: {\r\n editTooltip: this.translatorService.Tranlate('EDIT', 'Editeaza'),\r\n addTooltip: this.translatorService.Tranlate('Add', 'Adauga'),\r\n emptyDataSourceMessage: this.translatorService.Tranlate(\r\n 'NO_RECORDS_TO_DISPLAY',\r\n 'Nu exista date de afisat'\r\n ),\r\n editRow: {\r\n cancelTooltip: this.translatorService.Tranlate('CANCEL', 'Anuleaza'),\r\n saveTooltip: this.translatorService.Tranlate('SAVE', 'Salveaza')\r\n }\r\n },\r\n pagination: {\r\n labelRowsSelect: this.translatorService.Tranlate('ROWS', 'inregistrari'),\r\n firstTooltip: this.translatorService.Tranlate('FIRST_PAGE', 'Prima pagina'),\r\n previousTooltip: this.translatorService.Tranlate('PREVIOUS_PAGE', 'Pagina precedenta'),\r\n nextTooltip: this.translatorService.Tranlate('NEXT_PAGE', 'Pagina urmatoare'),\r\n lastTooltip: this.translatorService.Tranlate('LAST_PAGE', 'Ultima pagina'),\r\n labelDisplayedRows:\r\n '{from}-{to} ' + this.translatorService.Tranlate('OF', 'din') + ' {count}'\r\n }\r\n };\r\n };\r\n public renderTypeList = () => {\r\n const ListsOFValueTypes = Referentials.referential;\r\n\r\n return (\r\n \r\n \r\n
\r\n option.name}\r\n style={{ width: '100%' }}\r\n onChange={this.onTagsChange}\r\n renderInput={(params: RenderInputParams) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n\r\n {this.state.dependentReferentialConfig && (\r\n \r\n \r\n this.handleDependentReferencial(newValue)\r\n }\r\n getOptionLabel={(option) => option.displayName || ''}\r\n renderInput={(params: RenderInputParams) => (\r\n \r\n )}\r\n />\r\n \r\n )}\r\n
\r\n );\r\n };\r\n\r\n onRowUpdate = (newData: IReferential, oldData?: IReferential): Promise =>\r\n new Promise(async (resolve, reject) => {\r\n if (!this.validateRef(newData)) {\r\n reject();\r\n return;\r\n }\r\n\r\n if (oldData) {\r\n this.setState((prevState: IReferentialState) => {\r\n const newReferentials = !R.isEmpty(this.state.filteredReferentials)\r\n ? [...this.state.filteredReferentials]\r\n : [...this.state.referentials];\r\n newReferentials[newReferentials.indexOf(oldData)] = newData;\r\n\r\n return { ...prevState, referentials: newReferentials };\r\n });\r\n\r\n try {\r\n await this.appReferentialService.Update(\r\n newData,\r\n this.state.selectedReferential!.updateUrl\r\n );\r\n await this.loadReferentials(this.state.selectedReferential);\r\n resolve();\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n }\r\n });\r\n\r\n validateRef = (referential: IReferential): boolean => {\r\n if (referential.code === '' || referential.code === undefined || referential.code === null) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('LIST_OF_VALUES_ERROR_CODE_EMPTY', 'Eroare'),\r\n { variant: 'error' }\r\n );\r\n return false;\r\n }\r\n const referentials = !R.isEmpty(this.state.filteredReferentials)\r\n ? this.state.filteredReferentials\r\n : this.state.referentials;\r\n let resultRef = referentials.find((item) => item.code === referential.code);\r\n if (referential.id !== undefined) {\r\n resultRef = referentials.find(\r\n (item) => item.code === referential.code && item.id !== referential.id\r\n );\r\n }\r\n if (resultRef !== undefined) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('LIST_OF_VALUES_ERROR_CODE_UNIQUE', 'Eroare'),\r\n { variant: 'error' }\r\n );\r\n return false;\r\n }\r\n if (referential.translations === undefined) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('LIST_OF_VALUES_ERROR_NAME', 'Eroare'),\r\n { variant: 'error' }\r\n );\r\n return false;\r\n }\r\n for (const item of referential.translations) {\r\n if (item.name === '' || item.name === undefined || item.name === null) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('LIST_OF_VALUES_ERROR_NAME', 'Eroare'),\r\n { variant: 'error' }\r\n );\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n };\r\n\r\n onRowAdd = (newData: IReferential): Promise =>\r\n new Promise(async (resolve, reject) => {\r\n if (!this.validateRef(newData)) {\r\n reject();\r\n return;\r\n }\r\n try {\r\n newData.name = newData.translations[0].name;\r\n newData.gtId = this.props.appState.appUser!.gtId!;\r\n if (!R.isNil(this.state.selectedDependentReferential)) {\r\n newData.dependencyId = this.state.selectedDependentReferential.id;\r\n }\r\n await this.appReferentialService.Add(newData, this.state.selectedReferential!.addUrl);\r\n await this.loadReferentials(this.state.selectedReferential);\r\n resolve();\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n });\r\n\r\n public renderTable = () => {\r\n if (this.state.selectedReferential === null) {\r\n return;\r\n }\r\n\r\n return (\r\n this.onRowAdd(newData),\r\n onRowUpdate: (newData: any, oldData?: any) => this.onRowUpdate(newData, oldData)\r\n }}\r\n />\r\n );\r\n };\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n return (\r\n \r\n {this.renderTypeList()}\r\n
\r\n \r\n
\r\n {!this.state.isLoading ? \r\n (this.state.selectedReferential !== null && this.state.selectedReferential.code === ReferentialCode.City ? (\r\n \r\n )\r\n : \r\n ((this.state.selectedReferential !== null && this.state.selectedReferential.code === ReferentialCode.LeaseProvider ? (\r\n \r\n ) : this.renderTable()))\r\n ) : null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect((state: ApplicationState) => ({ appState: state.app }))(\r\n withSnackbar(AppReferentials as any)\r\n);\r\n","export const mailPlaceHolders = [\r\n 'CaseId',\r\n 'CaseLink',\r\n 'CaseStatus',\r\n 'CurrentAssignee',\r\n 'CaseCreatedBy',\r\n 'AssignedBy',\r\n 'CaseType',\r\n 'CaseCreationDate',\r\n 'ClaimNumber',\r\n 'CarRegistrationNumber',\r\n 'Vin',\r\n 'CalculationDate',\r\n 'CalculationBy',\r\n 'CalculationAmount',\r\n 'ServiceInDate',\r\n 'ServiceOutDate',\r\n 'ServiceContractNumber',\r\n 'CaseRequestText',\r\n 'VehicleBrand',\r\n 'VehicleModel',\r\n 'VehicleFabricationDate',\r\n 'VehiclePowerKw',\r\n 'VehicleEngineSizeCc',\r\n 'VehicleEngineCode',\r\n 'OrganizationAddress',\r\n 'UserFirstName',\r\n 'UserLastName',\r\n 'UserPhoneNumber',\r\n 'UserName',\r\n 'ClientFirstName',\r\n 'ClientLastName',\r\n 'ClientCompanyName',\r\n 'ClientContactPerson',\r\n 'OrganizationName',\r\n 'OrganizationCity',\r\n 'OrganizationPhone',\r\n 'OrganizationLogo',\r\n 'VehicleVersion',\r\n 'VehicleEquipmentVersion',\r\n 'CaseClient',\r\n 'NumberOfKilometers',\r\n 'CostCenter',\r\n 'DeliveryAdress',\r\n 'AppointmentId',\r\n 'AppointmentLink',\r\n 'RcrEmployeeEmail',\r\n 'RcrEmployeePhone',\r\n 'RcrEmployeeFirstName',\r\n 'RcrEmployeeLastName',\r\n 'AlertTypeName',\r\n 'AlertExpirationDate',\r\n 'OrderId',\r\n 'OrderLink',\r\n 'NotificationClientFirstName',\r\n 'NotificationClientLastName',\r\n 'NotificationClientCompanyName',\r\n 'NotificationClientEmail',\r\n 'NotificationClientPhone',\r\n 'NotificationClientComment',\r\n 'NotificationClientCaseId',\r\n 'NotificationClientCaseLink',\r\n 'CaseComment'\r\n];\r\n","export const toBase64 = (file: File) =>\r\n new Promise((resolve, reject) => {\r\n const reader = new FileReader();\r\n reader.readAsDataURL(file);\r\n reader.onload = () => resolve(reader.result);\r\n reader.onerror = (error) => reject(error);\r\n });\r\n","import React, { Fragment, ChangeEvent } from 'react';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\n\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport {\r\n Box,\r\n Switch,\r\n Card,\r\n TextField,\r\n Button,\r\n Dialog,\r\n DialogTitle,\r\n Grid,\r\n Typography,\r\n IconButton,\r\n DialogContent,\r\n DialogActions,\r\n List,\r\n ListSubheader,\r\n ListItem,\r\n ListItemSecondaryAction,\r\n ListItemText\r\n} from '@material-ui/core';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport { ITranslation, IReferentialConfig } from '../../../interfaces/IReferential';\r\nimport { IAuthService } from '../../../services/Interfaces/IAuthService';\r\nimport Autocomplete, { RenderInputParams } from '@material-ui/lab/Autocomplete';\r\nimport MaterialTable, { Icons, EditComponentProps, Column } from 'material-table';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../store';\r\nimport { forwardRef } from 'react';\r\nimport ArrowDownward from '@material-ui/icons/ArrowDownward';\r\nimport Check from '@material-ui/icons/Check';\r\nimport ChevronLeft from '@material-ui/icons/ChevronLeft';\r\nimport ChevronRight from '@material-ui/icons/ChevronRight';\r\nimport Clear from '@material-ui/icons/Clear';\r\nimport DeleteOutline from '@material-ui/icons/DeleteOutline';\r\nimport Edit from '@material-ui/icons/Edit';\r\nimport FilterList from '@material-ui/icons/FilterList';\r\nimport FirstPage from '@material-ui/icons/FirstPage';\r\nimport LastPage from '@material-ui/icons/LastPage';\r\nimport Remove from '@material-ui/icons/Remove';\r\nimport SaveAlt from '@material-ui/icons/SaveAlt';\r\nimport Search from '@material-ui/icons/Search';\r\nimport ViewColumn from '@material-ui/icons/ViewColumn';\r\nimport { Label } from 'reactstrap';\r\nimport moment from 'moment';\r\nimport AddCircleTwoToneIcon from '@material-ui/icons/AddCircleTwoTone';\r\nimport { Language } from '../../../interfaces/Organization';\r\nimport { isNullOrUndefined } from 'util';\r\nimport { EmailTemplate } from '../../../interfaces/Workflow';\r\nimport { IWorkflowService } from '../../../services/Interfaces/IWorkflowService';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport { Editor } from 'react-draft-wysiwyg';\r\nimport 'react-draft-wysiwyg/dist/react-draft-wysiwyg.css';\r\nimport { convertToRaw, EditorState, ContentState, convertFromHTML } from 'draft-js';\r\nimport draftToHtml from 'draftjs-to-html';\r\nimport htmlToDraft from 'html-to-draftjs';\r\nimport SubjectIco from '@material-ui/icons/Subject';\r\nimport { ICaseService } from '../../../services/Interfaces/ICaseService';\r\nimport { mailPlaceHolders } from '../mailPlaceHolders';\r\nimport { toBase64 } from '../../../utils/toBase64';\r\n\r\nconst tableIcons = {\r\n Add: forwardRef((props, ref) => ),\r\n Check: forwardRef((props, ref) => ),\r\n Clear: forwardRef((props, ref) => ),\r\n Delete: forwardRef((props, ref) => ),\r\n DetailPanel: forwardRef((props, ref) => ),\r\n Edit: forwardRef((props, ref) => ),\r\n Export: forwardRef((props, ref) => ),\r\n Filter: forwardRef((props, ref) => ),\r\n FirstPage: forwardRef((props, ref) => ),\r\n LastPage: forwardRef((props, ref) => ),\r\n NextPage: forwardRef((props, ref) => ),\r\n PreviousPage: forwardRef((props, ref) => ),\r\n ResetSearch: forwardRef((props, ref) => ),\r\n Search: forwardRef((props, ref) => ),\r\n SortArrow: forwardRef((props, ref) => ),\r\n ThirdStateCheck: forwardRef((props, ref) => ),\r\n ViewColumn: forwardRef((props, ref) => )\r\n} as Icons;\r\n\r\ntype OtherListsOfValuesProps = { appState: AppState } & ProviderContext;\r\n\r\ninterface IOtherListsOfValuesState {\r\n otherListsOfValues: EmailTemplate[];\r\n isLoading: boolean;\r\n selectedReferential: IReferentialConfig | null;\r\n languages: Language[];\r\n isDialogEmailTemplateOpen: boolean;\r\n emailTemplateId: number;\r\n selectedEmailBodyTemplate: EditorState;\r\n selectedEmailSubjectTemplate: string;\r\n}\r\n\r\nclass OtherListsOfValues extends React.PureComponent<\r\n OtherListsOfValuesProps,\r\n IOtherListsOfValuesState\r\n> {\r\n private authService!: IAuthService;\r\n private translatorService!: ITranslatorService;\r\n private appReferentialService!: IReferentialService;\r\n private worflowService!: IWorkflowService;\r\n private caseService!: ICaseService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n otherListsOfValues: [],\r\n isLoading: false,\r\n selectedReferential: null,\r\n languages: [] as Language[],\r\n isDialogEmailTemplateOpen: false,\r\n emailTemplateId: 0,\r\n selectedEmailBodyTemplate: EditorState.createEmpty(),\r\n selectedEmailSubjectTemplate: ''\r\n } as IOtherListsOfValuesState;\r\n\r\n componentDidMount = () => {\r\n this.setState({\r\n languages: this.activeLanguages()\r\n });\r\n };\r\n\r\n onTagsChange = (event: React.ChangeEvent, values: IReferentialConfig | null) => {\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n () => {\r\n this.loadReferentials(values);\r\n }\r\n );\r\n };\r\n\r\n loadReferentials = async (value: IReferentialConfig | null) => {\r\n let otherListsOfValues: EmailTemplate[] = [];\r\n if (value !== null && value.getUrl !== '') {\r\n try {\r\n otherListsOfValues = await this.worflowService.GetEmailTemplates();\r\n\r\n otherListsOfValues.forEach((refItem) => {\r\n this.state.languages.forEach((lang) => {\r\n const translation = refItem.translations.find((item) => item.language === lang.code);\r\n if (isNullOrUndefined(translation)) {\r\n refItem.translations.push({\r\n id: 0,\r\n name: '',\r\n language: lang.code,\r\n referentialTypeId: refItem.id\r\n } as ITranslation);\r\n }\r\n });\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n\r\n this.setState({\r\n otherListsOfValues: otherListsOfValues,\r\n isLoading: false,\r\n selectedReferential: value!\r\n });\r\n };\r\n\r\n handleIsActiveChange = async (event: ChangeEvent, rowData: any) => {\r\n const id = rowData.id;\r\n const newListsOfValues = [...this.state.otherListsOfValues];\r\n // let updatedValue = newListsOfValues.find(ref => ref.id === id);\r\n const index = newListsOfValues.findIndex((ref) => ref.id === id);\r\n if (newListsOfValues[index] !== undefined) {\r\n newListsOfValues[index].isActive = event.target.checked;\r\n\r\n try {\r\n await this.worflowService.UpdateEmailTemplate(newListsOfValues[index]);\r\n this.setState({\r\n otherListsOfValues: newListsOfValues\r\n });\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n\r\n activeLanguages = () => {\r\n const activeLanguages =\r\n this.props.appState.appUser!.organization!.gtOrganization!.languages!.filter((language) => {\r\n if (language.isActive === true) {\r\n return language;\r\n }\r\n });\r\n activeLanguages.forEach((language) => {\r\n language.displayName =\r\n language.displayName.charAt(0).toUpperCase() + language.displayName.slice(1);\r\n });\r\n return activeLanguages;\r\n };\r\n\r\n handleLocListChange = (event: any, gridProps: any, code: string | null) => {\r\n let newLocList = [] as ITranslation[];\r\n if (gridProps.rowData.translations) {\r\n newLocList = gridProps.rowData.translations.map((loc: any) => {\r\n if (loc.language === code) {\r\n loc.name = event.target.value;\r\n }\r\n return loc;\r\n });\r\n }\r\n\r\n gridProps.onRowDataChange({\r\n ...gridProps.rowData,\r\n translations: newLocList\r\n });\r\n };\r\n\r\n onEmailTemplateClick = (\r\n e: any,\r\n id: number,\r\n bodyEmailTemplate: string,\r\n subjectEmailTemplate: string\r\n ) => {\r\n const blocksFromHTML = htmlToDraft(bodyEmailTemplate);\r\n const contentState = ContentState.createFromBlockArray(\r\n blocksFromHTML.contentBlocks,\r\n blocksFromHTML.entityMap\r\n );\r\n\r\n this.setState({\r\n isDialogEmailTemplateOpen: true,\r\n emailTemplateId: id,\r\n selectedEmailBodyTemplate: EditorState.createWithContent(contentState),\r\n selectedEmailSubjectTemplate: subjectEmailTemplate\r\n });\r\n };\r\n\r\n getColumns = () => {\r\n return [\r\n {\r\n field: 'code',\r\n title: this.translatorService.Tranlate('LIST_OF_VALUES_COD_HEADER', 'Cod'),\r\n searchable: true,\r\n // initialEditValue: Guid.create().toString()\r\n render: (rowData: EmailTemplate) => {\r\n return (\r\n \r\n this.onEmailTemplateClick(e, rowData.id, rowData.body, rowData.subject)\r\n }\r\n >\r\n {rowData.code}\r\n \r\n );\r\n }\r\n } as Column,\r\n {\r\n field: 'translations',\r\n title: this.translatorService.Tranlate('LIST_OF_VALUES_NAME_HEADER', 'Nume'),\r\n searchable: true,\r\n render: (rowData: any) => {\r\n return rowData.translations.map((val: ITranslation, index: number) => {\r\n const language = this.state.languages.find((language: any) => {\r\n return language.code === val.language;\r\n });\r\n return language ? (\r\n
\r\n {' '}\r\n
\r\n ) : null;\r\n });\r\n },\r\n customFilterAndSearch: (value, rowData) => {\r\n let matchFilter = false;\r\n rowData.translations.map((val: any) => {\r\n const findMatch = val.name.toLowerCase().indexOf(value.toLowerCase()) != -1;\r\n if (findMatch) {\r\n matchFilter = true;\r\n }\r\n });\r\n return matchFilter;\r\n },\r\n editComponent: (props: any) => {\r\n if (!isNullOrUndefined(props.value)) {\r\n return props.value.map((val: ITranslation, index: number) => {\r\n const language = this.state.languages.find(\r\n (language: any) => language.code === val.language\r\n );\r\n\r\n return language ? (\r\n
\r\n this.handleLocListChange(e, props, val.language)}\r\n >\r\n
\r\n ) : null;\r\n });\r\n } else {\r\n //add\r\n const newLocList = [] as ITranslation[];\r\n for (let i = 0; i < this.state.languages!.length; i++) {\r\n const locListItem = {} as ITranslation;\r\n locListItem.language = this.state.languages[i].code;\r\n locListItem.name = '';\r\n newLocList.push(locListItem);\r\n }\r\n\r\n props.onChange(newLocList);\r\n\r\n return null;\r\n }\r\n }\r\n } as Column,\r\n {\r\n field: 'dateModification',\r\n title: this.translatorService.Tranlate('LIST_OF_VALUES_DATE_HEADER', 'Data'),\r\n defaultSort: 'desc',\r\n searchable: true,\r\n render: (rowData: any) => {\r\n return moment\r\n .utc(rowData.dateModification)\r\n .local()\r\n .format(this.props.appState.longDateFormat);\r\n },\r\n editComponent: (props: EditComponentProps) => {\r\n return ;\r\n }\r\n } as Column,\r\n {\r\n field: 'isActive',\r\n title: this.translatorService.Tranlate('LIST_OF_VALUES_ISACTIVE_HEADER', 'Stare'),\r\n render: (rowData: any) => {\r\n return (\r\n this.handleIsActiveChange(e, rowData)}\r\n value={rowData.isActive}\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n );\r\n },\r\n\r\n editComponent: (props: EditComponentProps) => {\r\n return (\r\n props.onChange(e.target.checked)}\r\n />\r\n );\r\n }\r\n }\r\n ];\r\n };\r\n public getLocalization = () => {\r\n return {\r\n header: { actions: '' },\r\n toolbar: {\r\n searchPlaceholder: this.translatorService.Tranlate('SEARCH', 'Cauta'),\r\n searchTooltip: this.translatorService.Tranlate('SEARCH', 'Cauta')\r\n },\r\n body: {\r\n editTooltip: this.translatorService.Tranlate('EDIT', 'Editeaza'),\r\n addTooltip: this.translatorService.Tranlate('Add', 'Adauga'),\r\n emptyDataSourceMessage: this.translatorService.Tranlate(\r\n 'NO_RECORDS_TO_DISPLAY',\r\n 'Nu exista date de afisat'\r\n ),\r\n editRow: {\r\n cancelTooltip: this.translatorService.Tranlate('CANCEL', 'Anuleaza'),\r\n saveTooltip: this.translatorService.Tranlate('SAVE', 'Salveaza')\r\n }\r\n },\r\n pagination: {\r\n labelRowsSelect: this.translatorService.Tranlate('ROWS', 'inregistrari'),\r\n firstTooltip: this.translatorService.Tranlate('FIRST_PAGE', 'Prima pagina'),\r\n previousTooltip: this.translatorService.Tranlate('PREVIOUS_PAGE', 'Pagina precedenta'),\r\n nextTooltip: this.translatorService.Tranlate('NEXT_PAGE', 'Pagina urmatoare'),\r\n lastTooltip: this.translatorService.Tranlate('LAST_PAGE', 'Ultima pagina'),\r\n labelDisplayedRows:\r\n '{from}-{to} ' + this.translatorService.Tranlate('OF', 'din') + ' {count}'\r\n }\r\n };\r\n };\r\n public renderTypeList = () => {\r\n // const ListsOFValueTypes = Referentials.referential;\r\n const ListsOFValueTypes = [\r\n {\r\n name: 'Email Template',\r\n getUrl: 'string',\r\n updateUrl: 'string',\r\n addUrl: 'string'\r\n } as IReferentialConfig\r\n ];\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n
\r\n option.name}\r\n style={{ width: '100%' }}\r\n onChange={this.onTagsChange}\r\n renderInput={(params: RenderInputParams) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n
\r\n );\r\n };\r\n\r\n onRowUpdate = (newData: EmailTemplate, oldData?: EmailTemplate): Promise =>\r\n new Promise(async (resolve, reject) => {\r\n if (!this.validateRef(newData)) {\r\n reject();\r\n return;\r\n }\r\n\r\n if (oldData) {\r\n this.setState((prevState: IOtherListsOfValuesState) => {\r\n const newListOfValues = [...this.state.otherListsOfValues];\r\n newListOfValues[newListOfValues.indexOf(oldData)] = newData;\r\n\r\n return { ...prevState, otherListsOfValues: newListOfValues };\r\n });\r\n\r\n try {\r\n await this.worflowService.UpdateEmailTemplate(newData);\r\n // await this.loadReferentials(this.state.selectedReferential);\r\n resolve();\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n }\r\n });\r\n\r\n validateRef = (referential: EmailTemplate): boolean => {\r\n if (referential.code === '' || referential.code === undefined || referential.code === null) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('LIST_OF_VALUES_ERROR_CODE_EMPTY', 'Eroare'),\r\n { variant: 'error' }\r\n );\r\n return false;\r\n }\r\n let resultRef = this.state.otherListsOfValues.find((item) => item.code === referential.code);\r\n if (referential.id !== undefined) {\r\n resultRef = this.state.otherListsOfValues.find(\r\n (item) => item.code === referential.code && item.id !== referential.id\r\n );\r\n }\r\n if (resultRef !== undefined) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('LIST_OF_VALUES_ERROR_CODE_UNIQUE', 'Eroare'),\r\n { variant: 'error' }\r\n );\r\n return false;\r\n }\r\n if (referential.translations === undefined) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('LIST_OF_VALUES_ERROR_NAME', 'Eroare'),\r\n { variant: 'error' }\r\n );\r\n return false;\r\n }\r\n for (const item of referential.translations) {\r\n if (item.name === '' || item.name === undefined || item.name === null) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('LIST_OF_VALUES_ERROR_NAME', 'Eroare'),\r\n { variant: 'error' }\r\n );\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n };\r\n\r\n onRowAdd = (newData: EmailTemplate): Promise =>\r\n new Promise(async (resolve, reject) => {\r\n if (!this.validateRef(newData)) {\r\n reject();\r\n return;\r\n }\r\n try {\r\n newData.id = 0;\r\n newData.name = newData.translations[0].name;\r\n newData.gtId = this.props.appState.appUser!.gtId!;\r\n newData.body = '';\r\n newData.subject = '';\r\n\r\n const newItem = await this.worflowService.AddEmailTemplate(newData);\r\n const newListOfValues = [...this.state.otherListsOfValues];\r\n newListOfValues.push(newItem);\r\n this.setState({ otherListsOfValues: newListOfValues });\r\n //await this.loadReferentials(this.state.selectedReferential);\r\n resolve();\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n });\r\n\r\n public renderTable = () => {\r\n if (this.state.selectedReferential === null) {\r\n return;\r\n }\r\n\r\n return (\r\n this.onRowAdd(newData),\r\n onRowUpdate: (newData: any, oldData?: any) => this.onRowUpdate(newData, oldData)\r\n }}\r\n />\r\n );\r\n };\r\n\r\n closeDialog = () => {\r\n this.setState({ isDialogEmailTemplateOpen: false });\r\n };\r\n onEditorStateChange = (editorState: EditorState) => {\r\n this.setState({ selectedEmailBodyTemplate: editorState });\r\n };\r\n\r\n renderEditEmailTemplate = () => {\r\n return (\r\n this.onEditorStateChange(editorState)}\r\n toolbar={{\r\n options: [\r\n 'inline',\r\n 'blockType',\r\n 'fontSize',\r\n 'fontFamily',\r\n 'list',\r\n 'textAlign',\r\n 'colorPicker',\r\n 'link',\r\n 'emoji',\r\n 'history',\r\n 'image'\r\n ],\r\n image: {\r\n className: undefined,\r\n component: undefined,\r\n popupClassName: undefined,\r\n urlEnabled: false,\r\n uploadEnabled: true,\r\n alignmentEnabled: true,\r\n uploadCallback: async (file: File) => {\r\n const imageBase64String = await toBase64(file);\r\n return Promise.resolve({ data: { link: imageBase64String } });\r\n },\r\n previewImage: true,\r\n inputAccept: 'image/gif,image/jpeg,image/jpg,image/png,image/svg',\r\n alt: { present: false, mandatory: false },\r\n defaultSize: {\r\n height: '140',\r\n width: 'auto'\r\n }\r\n }\r\n }}\r\n />\r\n );\r\n };\r\n\r\n placeHolderClick = (text: string) => {\r\n const editorState = this.state.selectedEmailBodyTemplate;\r\n const newBlockMap = convertFromHTML('{{' + text + '}}');\r\n const contentState = editorState.getCurrentContent();\r\n const selectionState = editorState.getSelection();\r\n const key = selectionState.getAnchorKey();\r\n const blocksAfter = contentState\r\n .getBlockMap()\r\n .skipUntil(function (_, k) {\r\n return k === key;\r\n })\r\n .skip(1)\r\n .toArray();\r\n const blocksBefore = contentState\r\n .getBlockMap()\r\n .takeUntil(function (_, k) {\r\n return k === key;\r\n })\r\n .toArray();\r\n\r\n newBlockMap.contentBlocks = blocksBefore\r\n .concat([contentState.getBlockForKey(key)])\r\n .concat(newBlockMap.contentBlocks)\r\n .concat(blocksAfter);\r\n\r\n const newContentState = ContentState.createFromBlockArray(\r\n newBlockMap.contentBlocks,\r\n newBlockMap.entityMap\r\n );\r\n const newEditorState = EditorState.createWithContent(newContentState);\r\n this.setState({ selectedEmailBodyTemplate: newEditorState });\r\n };\r\n addPlaceholderToSubject = (text: string) => {\r\n this.setState({\r\n selectedEmailSubjectTemplate: this.state.selectedEmailSubjectTemplate + '{{' + text + '}}'\r\n });\r\n };\r\n\r\n renderMailPlaceHolders = () => {\r\n return (\r\n Placeholders}>\r\n {mailPlaceHolders.map((val, index) => (\r\n \r\n this.placeHolderClick(val)} />\r\n \r\n this.addPlaceholderToSubject(val)}>\r\n \r\n \r\n \r\n \r\n ))}\r\n \r\n );\r\n };\r\n\r\n saveEmailTemplateChanges = async () => {\r\n const id = this.state.emailTemplateId;\r\n const otherListsOfValues = [...this.state.otherListsOfValues];\r\n const index = otherListsOfValues.findIndex((item) => item.id === id);\r\n const emailBody = draftToHtml(\r\n convertToRaw(this.state.selectedEmailBodyTemplate.getCurrentContent())\r\n );\r\n\r\n otherListsOfValues[index] = {\r\n ...otherListsOfValues[index],\r\n body: emailBody,\r\n subject: this.state.selectedEmailSubjectTemplate\r\n };\r\n\r\n const data = otherListsOfValues.find((item) => item.id === id);\r\n await this.worflowService.UpdateEmailTemplate(data!);\r\n\r\n this.setState(\r\n {\r\n // isLoading: true,\r\n isDialogEmailTemplateOpen: false,\r\n otherListsOfValues: otherListsOfValues\r\n }\r\n // , async () => await this.loadData()\r\n );\r\n };\r\n\r\n syncClick = async () => {\r\n try {\r\n await this.caseService.SyncModels();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n syncUndocumentedModels = async () => {\r\n try {\r\n await this.caseService.SyncUndocumentedModels();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n this.worflowService = (this.context as AppContext).workflowService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n\r\n return (\r\n \r\n \r\n {this.renderTypeList()}\r\n
\r\n \r\n
\r\n {!this.state.isLoading ? this.renderTable() : null}\r\n \r\n fullScreen\r\n >\r\n \r\n \r\n \r\n \r\n {this.translatorService.Tranlate(\r\n 'EDIT_ORGANIZATION_FORM_ACTION_SEND_EMAIL_EDIT_EMAIL_TEMPLATE_MODAL_TITLE',\r\n 'Editeaza template-ul email-ului'\r\n )}\r\n \r\n \r\n \r\n this.closeDialog()}\r\n size={'small'}\r\n style={{ color: '#ffffff' }}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n this.setState({ selectedEmailSubjectTemplate: e.target.value })\r\n }\r\n variant=\"outlined\"\r\n size=\"small\"\r\n />\r\n {this.renderEditEmailTemplate()}\r\n \r\n \r\n \r\n {this.renderMailPlaceHolders()}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect((state: ApplicationState) => ({ appState: state.app }))(\r\n withSnackbar(OtherListsOfValues as any)\r\n);\r\n","export var primary = \"#5383ff\"\nexport var primaryLight = \"#495368\"\nexport var primaryDark = \"#09142a\"\nexport var secondary = \"#3d4977\"\nexport var inheritDefault1 = \"#fefefe\"\nexport var inheritDefault2 = \"#f8f9ff\"\nexport var second = \"#070919\"\nexport var indigo = \"#7420ff\"\nexport var purple = \"#793de6\"\nexport var pink = \"#fc26a4\"\nexport var red = \"#f83245\"\nexport var orange = \"#f4772e\"\nexport var yellow = \"#ffc926\"\nexport var green = \"#1bc943\"\nexport var teal = \"#18e1a5\"\nexport var cyan = \"#27dcf3\"\nexport default {\"primary\":\"#5383ff\",\"primaryLight\":\"#495368\",\"primaryDark\":\"#09142a\",\"secondary\":\"#3d4977\",\"inheritDefault1\":\"#fefefe\",\"inheritDefault2\":\"#f8f9ff\",\"second\":\"#070919\",\"indigo\":\"#7420ff\",\"purple\":\"#793de6\",\"pink\":\"#fc26a4\",\"red\":\"#f83245\",\"orange\":\"#f4772e\",\"yellow\":\"#ffc926\",\"green\":\"#1bc943\",\"teal\":\"#18e1a5\",\"cyan\":\"#27dcf3\"}\n","import { createMuiTheme } from '@material-ui/core';\r\nimport typography from './typography';\r\n\r\nimport vars from '!!sass-vars-to-js-loader!../assets/core/_variables-mui.scss';\r\n\r\nconst MuiTheme = createMuiTheme({\r\n palette: {\r\n primary: {\r\n main: vars.primary\r\n },\r\n grey: {\r\n 300: vars.inheritDefault1,\r\n A100: vars.inheritDefault2\r\n },\r\n secondary: {\r\n main: vars.secondary\r\n },\r\n error: {\r\n main: vars.red\r\n },\r\n success: {\r\n main: vars.green\r\n },\r\n warning: {\r\n main: vars.orange\r\n },\r\n helpers: {\r\n primary: vars.blue,\r\n main: 'rgba(25, 46, 91, .035)'\r\n },\r\n contrastThreshold: 3,\r\n tonalOffset: 0.1\r\n },\r\n shape: {\r\n borderRadius: '0.5rem'\r\n },\r\n overrides: {\r\n MuiButton: {\r\n text: {\r\n paddingLeft: '14px',\r\n paddingRight: '14px'\r\n },\r\n containedSizeSmall: {\r\n paddingLeft: '14px',\r\n paddingRight: '14px'\r\n },\r\n root: {\r\n textTransform: 'none',\r\n fontWeight: 'normal'\r\n }\r\n },\r\n MuiTooltip: {\r\n tooltip: {\r\n backgroundColor: vars.second,\r\n padding: '8px 16px',\r\n fontSize: '13px'\r\n },\r\n arrow: {\r\n color: vars.second\r\n }\r\n }\r\n },\r\n typography\r\n});\r\n\r\nexport default MuiTheme;\r\n","export default {\r\n h1: {\r\n fontWeight: 500,\r\n fontSize: '35px',\r\n lineHeight: '40px'\r\n },\r\n h2: {\r\n fontWeight: 500,\r\n fontSize: '29px',\r\n lineHeight: '32px'\r\n },\r\n h3: {\r\n fontWeight: 500,\r\n fontSize: '24px',\r\n lineHeight: '28px'\r\n },\r\n h4: {\r\n fontWeight: 500,\r\n fontSize: '20px',\r\n lineHeight: '24px'\r\n },\r\n h5: {\r\n fontWeight: 500,\r\n fontSize: '16px',\r\n lineHeight: '20px'\r\n },\r\n h6: {\r\n fontWeight: 500,\r\n fontSize: '14px',\r\n lineHeight: '20px'\r\n },\r\n subtitle1: {\r\n fontSize: '16px',\r\n lineHeight: '25px'\r\n },\r\n subtitle2: {\r\n fontWeight: 400,\r\n fontSize: '14px'\r\n },\r\n body1: {\r\n fontSize: '14px'\r\n },\r\n body2: {\r\n fontSize: '14px'\r\n },\r\n button: {\r\n fontSize: '14px'\r\n },\r\n caption: {\r\n fontSize: '12px'\r\n },\r\n overline: {\r\n fontSize: '12px',\r\n fontWeight: 500,\r\n textTransform: 'uppercase'\r\n }\r\n};\r\n","export default __webpack_public_path__ + \"static/media/Brand_Mark.4543c78d.png\";","import React, { Fragment } from 'react';\r\n\r\nimport clsx from 'clsx';\r\nimport { Link } from 'react-router-dom';\r\n\r\nimport { IconButton, Box } from '@material-ui/core';\r\n\r\nimport { connect } from 'react-redux';\r\n\r\nimport projectLogo from '../../assets/images/carfix_newlogo.svg';\r\nimport projectLogoIcon from '../../assets/images/Brand_Mark.png';\r\n\r\nconst HeaderLogo = (props) => {\r\n const { sidebarToggle, sidebarHover } = props;\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n {sidebarToggle ? (\r\n \r\n ) : (\r\n \"ClaimBox\r\n )}\r\n \r\n \r\n {/* Carolina */}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nconst mapStateToProps = (state) => ({\r\n sidebarToggle: state.themeOptions.sidebarToggle,\r\n sidebarHover: state.themeOptions.sidebarHover\r\n});\r\n\r\nexport default connect(mapStateToProps)(HeaderLogo);\r\n","export default __webpack_public_path__ + \"static/media/info.ba347ef9.svg\";","import React, { Fragment, useContext, useEffect } from 'react';\r\nimport { ApplicationContext } from '../../context/Contexts';\r\nimport PerfectScrollbar from 'react-perfect-scrollbar';\r\nimport { Hidden, IconButton, Box, Tabs, Tab, Popover, makeStyles } from '@material-ui/core';\r\nimport NotificationsActiveIcon from '@material-ui/icons/NotificationsActive';\r\nimport PollIcon from '@material-ui/icons/Poll';\r\nimport CaseNewInNotification from '../../components/cases/CaseNewInNotification';\r\nimport CaseMessageNotification from '../../components/cases/CaseMessageNotification';\r\nimport CaseTask from '../../components/cases/CaseTask';\r\nimport TabPanel from '../../components/_shared/Tabs';\r\nimport { connect } from 'react-redux';\r\nimport helpLogo from '../../assets/images/info.svg';\r\nimport MenuBookRoundedIcon from '@material-ui/icons/MenuBookRounded';\r\nimport AppointmentNewInNotification from '../../components/cases/AppointmentNewInNotification';\r\nimport { CountryCodeEnum } from '../../helpers/Constants';\r\nimport { withRouter } from 'react-router';\r\nimport { AppActionCreators } from '../../store';\r\nimport { useHistory } from 'react-router-dom'; // Import useHistory hook\r\nimport { TranslatorService } from '../../services/TranslatorService';\r\nimport { useAppDispatch, useAppSelector } from '../../store/configureStore';\r\nimport {\r\n AGENDA_SET_SELECTED_RANGE\r\n} from '../../store/actions/ActionTypes';\r\nimport HelpRounded from '@material-ui/icons/HelpRounded';\r\n\r\n\r\nconst HeaderDots = (props) => {\r\n const context = useContext(ApplicationContext);\r\n const translatorService = new TranslatorService();\r\n\r\n const { appState, loadUserNotifications } = props;\r\n const history = useHistory(); // Initialize useHistory\r\n const dispatch = useAppDispatch();\r\n\r\n const [anchorEl1, setAnchorEl1] = React.useState(null);\r\n const [anchorEl2, setAnchorEl2] = React.useState(null);\r\n const [anchorEl3, setAnchorEl3] = React.useState(null);\r\n\r\n useEffect(() => {\r\n console.log('HeaderDots mounted');\r\n // Call loadUserNotifications on component mount\r\n loadUserNotifications();\r\n\r\n // Listen for navigation changes\r\n const unlisten = history.listen(() => {\r\n console.log('Navigation occurred');\r\n dispatch({\r\n type: AGENDA_SET_SELECTED_RANGE,\r\n payload: null\r\n });\r\n loadUserNotifications();\r\n });\r\n\r\n // Cleanup\r\n return () => {\r\n unlisten();\r\n };\r\n }, [loadUserNotifications, history]); // Include loadUserNotifications and history in the dependency array\r\n\r\n\r\n const handleClick1 = (event) => {\r\n setAnchorEl1(event.currentTarget);\r\n };\r\n const handleClose1 = () => {\r\n setAnchorEl1(null);\r\n };\r\n\r\n const handleClick2 = (event) => {\r\n setValue(0);\r\n setAnchorEl2(event.currentTarget);\r\n };\r\n const handleClose2 = () => {\r\n setAnchorEl2(null);\r\n };\r\n\r\n const handleClick3 = (event) => {\r\n setAnchorEl3(event.currentTarget);\r\n };\r\n const handleClose3 = () => {\r\n setAnchorEl3(null);\r\n };\r\n const open1 = Boolean(anchorEl1);\r\n const open2 = Boolean(anchorEl2);\r\n const open3 = Boolean(anchorEl3);\r\n\r\n const [value, setValue] = React.useState(0);\r\n const [countValue, setNewCasesCount] = React.useState(0);\r\n\r\n const handleChange = (event, newValue) => {\r\n setValue(newValue);\r\n };\r\n\r\n const useStyle = makeStyles({\r\n indicator: {\r\n width: '100% !important'\r\n }\r\n });\r\n const useStyle2 = makeStyles({\r\n indicator: {\r\n width: '33.33% !important'\r\n }\r\n });\r\n\r\n const useStyle3 = makeStyles({\r\n indicator: {\r\n width: '50% !important'\r\n }\r\n });\r\n\r\n const classes = useStyle();\r\n const classes2 = useStyle2();\r\n const classes3 = useStyle3();\r\n\r\n const checkSelectedTab = () => {\r\n let tabContainer = document.getElementById('tabs-container');\r\n let secondTabSelected = tabContainer\r\n .getElementsByTagName('button')[1]\r\n .getAttribute('aria-selected');\r\n let thirdTabSelected = tabContainer\r\n .getElementsByTagName('button')[2]\r\n .getAttribute('aria-selected');\r\n\r\n if (secondTabSelected === 'true') {\r\n document.getElementById('tabs-container').getElementsByTagName('span')[6].style.left = '33.33%';\r\n } else if (thirdTabSelected === 'true') {\r\n document.getElementById('tabs-container').getElementsByTagName('span')[6].style.left = '66.66%'; \r\n }\r\n };\r\n\r\n const checkSelectedTab2 = () => {\r\n let tabContainer = document.getElementById('tabs-container');\r\n let casesTabSelected = tabContainer\r\n .getElementsByTagName('button')[1]\r\n .getAttribute('aria-selected');\r\n\r\n if (casesTabSelected === 'true') {\r\n document.getElementById('tabs-container').getElementsByTagName('span')[4].style.left = '50%';\r\n }\r\n };\r\n\r\n return (\r\n \r\n
\r\n {props.appState.appUser?.organization?.country?.code?.toUpperCase() === CountryCodeEnum.CZ.toString() ? (\r\n \r\n \r\n \r\n
\r\n {props.appState.comments.length + props.appState.newInCases.filter(item => !item.caseStatus.isViewed).length + props.appState.newInAppointments.filter(item => !item.appointmentStatusHistory.isViewed).length}\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {/* */}\r\n
\r\n
\r\n \r\n
\r\n
\r\n ) : (\r\n \r\n \r\n \r\n
\r\n {props.appState.comments.length + props.appState.newInCases.filter(item => !item.caseStatus.isViewed).length + props.appState.newInAppointments.filter(item => !item.appointmentStatusHistory.isViewed).length}\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {/* */}\r\n
\r\n
\r\n \r\n
\r\n
\r\n )}\r\n \r\n {props.appState.appUser?.organization?.country?.code?.toUpperCase() === CountryCodeEnum.CZ.toString() ? null : (\r\n \r\n
\r\n {props.appState.tasks.length}\r\n
\r\n \r\n
\r\n )\r\n }\r\n {\r\n props.history.push('/user-manual');\r\n }} \r\n color=\"inherit\"\r\n className=\"btn-inverse mx-1 d-50\">\r\n \r\n \r\n {\r\n props.history.push('/general-notification');\r\n }} \r\n color=\"inherit\"\r\n className=\"btn-inverse mx-1 d-50\">\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nconst mapStateToProps = (state) => ({\r\n user: state.app.user,\r\n appState: state.app\r\n});\r\n\r\nconst mapDispatchToProps = (dispatch) => ({\r\n loadUserNotifications: () => dispatch(AppActionCreators.LoadUserNotifications())\r\n});\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(withRouter(HeaderDots));\r\n","import React, { Fragment, useContext } from 'react';\r\n\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { Grid, Avatar, Box, Badge, Menu, Button, List, ListItem, Divider } from '@material-ui/core';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport { ApplicationContext } from '../../context/Contexts';\r\nimport { connect } from 'react-redux';\r\nimport { AppActionCreators } from '../../store';\r\nimport { withRouter } from 'react-router';\r\n\r\nconst StyledBadge = withStyles({\r\n badge: {\r\n backgroundColor: 'var(--success)',\r\n color: 'var(--success)',\r\n boxShadow: '0 0 0 2px #fff',\r\n '&::after': {\r\n position: 'absolute',\r\n top: 0,\r\n left: 0,\r\n width: '100%',\r\n height: '100%',\r\n borderRadius: '50%',\r\n animation: '$ripple 1.2s infinite ease-in-out',\r\n border: '1px solid currentColor',\r\n content: '\"\"'\r\n }\r\n },\r\n '@keyframes ripple': {\r\n '0%': {\r\n transform: 'scale(.8)',\r\n opacity: 1\r\n },\r\n '100%': {\r\n transform: 'scale(2.4)',\r\n opacity: 0\r\n }\r\n }\r\n})(Badge);\r\n\r\nconst HeaderUserbox = (props) => {\r\n const [anchorEl, setAnchorEl] = React.useState(null);\r\n const context = useContext(ApplicationContext);\r\n\r\n const handleClick = (event) => {\r\n setAnchorEl(event.currentTarget);\r\n };\r\n\r\n const handleClose = () => {\r\n setAnchorEl(null);\r\n };\r\n\r\n const currentLanguage = () => {\r\n return props.appUser.organization.gtOrganization.languages.find(\r\n (item) => item.code === translatorService.GetLanguage()\r\n );\r\n };\r\n\r\n const activeLanguages = () => {\r\n let activeLanguages = props.appUser.organization.gtOrganization.languages.filter(\r\n (language) => language.isActive === true\r\n );\r\n\r\n activeLanguages.forEach((language) => {\r\n language.displayName =\r\n language.displayName.charAt(0).toUpperCase() + language.displayName.slice(1);\r\n });\r\n return activeLanguages;\r\n };\r\n\r\n let buttonLanguages = [];\r\n\r\n const languages = activeLanguages();\r\n for (let i = 0; i < languages.length; i++) {\r\n buttonLanguages.push(\r\n \r\n {\r\n translatorService.SetLanguage(languages[i].code);\r\n props.setLanguage();\r\n handleCloseMenu();\r\n window.location.reload();\r\n }}\r\n className=\"w-100 d-block text-center\"\r\n >\r\n { languages[i].displayName}\r\n \r\n \r\n );\r\n }\r\n\r\n const logout = async () => {\r\n const authService = context.authenticationService;\r\n handleClose();\r\n await authService.logoutAsync();\r\n };\r\n\r\n const translatorService = context.translatorService;\r\n const [anchorElMenu, setAnchorElMenu] = React.useState(null);\r\n\r\n const handleClickMenu = (event) => {\r\n setAnchorElMenu(event.currentTarget);\r\n };\r\n const handleCloseMenu = () => {\r\n setAnchorElMenu(null);\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n {/* src={avatar4} */}\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n
\r\n \r\n \r\n \r\n \r\n {/* src={avatar4} */}\r\n \r\n \r\n
\r\n
\r\n {props.appUser ? props.appUser.lastName + ' ' + props.appUser.firstName : null}\r\n
\r\n
\r\n {props.appUser ? props.appUser.email : null}\r\n
\r\n
\r\n {props.appUser ? props.appUser.jobFunction : null}\r\n
\r\n
\r\n \r\n
\r\n
\r\n {props.appUser ? props.appUser.organization.hoName : null}\r\n
\r\n
\r\n {props.appUser ? props.appUser.organization.name : null}\r\n
\r\n
\r\n \r\n \r\n \r\n {currentLanguage()?.displayName}\r\n\r\n \r\n \r\n
\r\n
\r\n \r\n {buttonLanguages}\r\n \r\n
\r\n
\r\n \r\n {\r\n props.history.push('/profile');\r\n handleClose();\r\n }}\r\n >\r\n {translatorService.Tranlate('PROFILE', 'Profil')}\r\n \r\n
\r\n\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n );\r\n};\r\nconst mapStateToProps = (state) => ({\r\n // sidebarToggle: state.themeOptions.sidebarToggle,\r\n // sidebarHover: state.themeOptions.sidebarHover,\r\n appUser: state.app.appUser,\r\n appState: state.app\r\n});\r\nconst mapDispatchToProps = (dispatch) => ({\r\n setLanguage: () => dispatch(AppActionCreators.SetLanguage())\r\n});\r\nexport default connect(mapStateToProps, mapDispatchToProps)(withRouter(HeaderUserbox));\r\n","import moment from 'moment';\r\nimport { Case } from '../interfaces/Case';\r\nimport { Vehicle } from '../interfaces/Vehicle';\r\nimport * as R from 'ramda';\r\n\r\nexport class VehicleHelper {\r\n public static GetPlateNumber(casee: Case | null, vehicle: Vehicle | null): string {\r\n if (!R.isNil(casee) && !R.isNil(casee.caseVehicle)) {\r\n return casee.caseVehicle.plateNumber!;\r\n }\r\n if (!R.isNil(vehicle)) {\r\n return vehicle.plateNumber;\r\n }\r\n\r\n return '';\r\n }\r\n\r\n public static GetBrand(casee: Case | null, vehicle: Vehicle | null): string {\r\n let caseVehicleBrand = '';\r\n let vehicleBrand = '';\r\n if (!R.isNil(casee) && !R.isNil(casee.caseVehicle)) {\r\n caseVehicleBrand = !R.isNil(casee.caseVehicle.identifiedMake) ? casee.caseVehicle.identifiedMake : R.isNil(casee.caseVehicle.model) ? '' : casee.caseVehicle.model.brand;\r\n }\r\n if (!R.isNil(vehicle)) {\r\n vehicleBrand = R.isNil(vehicle.make) ? '' : vehicle.make.displayName;\r\n }\r\n\r\n return vehicleBrand || caseVehicleBrand;\r\n }\r\n\r\n public static GetModel(casee: Case | null, vehicle: Vehicle | null): string {\r\n let caseVehicleModel = '';\r\n let vehicleModel = '';\r\n if (!R.isNil(casee) && !R.isNil(casee.caseVehicle)) {\r\n caseVehicleModel =!R.isNil(casee.caseVehicle.identifiedModel) ? casee.caseVehicle.identifiedModel : R.isNil(casee.caseVehicle.model) ? '' : casee.caseVehicle.model.name;\r\n }\r\n if (!R.isNil(vehicle)) {\r\n vehicleModel = R.isNil(vehicle.model) ? '' : vehicle.model.name!;\r\n }\r\n\r\n return vehicleModel || caseVehicleModel;\r\n }\r\n\r\n public static GetUMC(casee: Case | null, vehicle: Vehicle | null): string {\r\n if (!R.isNil(casee) && !R.isNil(casee.caseVehicle)) {\r\n return R.isNil(casee.caseVehicle.model) ? '' : casee.caseVehicle.model.code;\r\n }\r\n if (!R.isNil(vehicle)) {\r\n return 'N/A';\r\n }\r\n\r\n return '';\r\n }\r\n\r\n public static GetVIN(casee: Case | null, vehicle: Vehicle | null): string {\r\n if (!R.isNil(casee) && !R.isNil(casee.caseVehicle)) {\r\n return R.isNil(casee.caseVehicle.vin) ? 'N/A' : casee.caseVehicle.vin;\r\n }\r\n if (!R.isNil(vehicle)) {\r\n return vehicle.vin;\r\n }\r\n\r\n return '';\r\n }\r\n\r\n public static GetKmNr(casee: Case | null, vehicle: Vehicle | null): number {\r\n if (!R.isNil(casee) && !R.isNil(casee.caseVehicle)) {\r\n return R.isNil(casee.caseVehicle.numberOfKilometers)\r\n ? 0\r\n : casee.caseVehicle.numberOfKilometers;\r\n }\r\n if (!R.isNil(vehicle)) {\r\n return R.isNil(vehicle.kilometersNr) ? 0 : vehicle.kilometersNr;\r\n }\r\n\r\n return 0;\r\n }\r\n\r\n public static GetFirstRegistrationDate(\r\n casee: Case | null,\r\n vehicle: Vehicle | null,\r\n language: string\r\n ): string {\r\n const dateObj = this.GetFirstRegistrationDateObject(casee, vehicle);\r\n\r\n return R.isNil(dateObj) ? 'N/A' : dateObj.toLocaleDateString(language);\r\n }\r\n public static GetFirstRegistrationDateFormat(\r\n casee: Case | null,\r\n vehicle: Vehicle | null,\r\n format: string\r\n ): string {\r\n const dateObj = this.GetFirstRegistrationDateObject(casee, vehicle);\r\n\r\n return moment(dateObj).format(format);\r\n }\r\n\r\n public static GetFirstRegistrationDateObject(\r\n casee: Case | null,\r\n vehicle: Vehicle | null\r\n ): Date | null {\r\n if (!R.isNil(casee) && !R.isNil(casee.caseVehicle)) {\r\n return R.isNil(casee.caseVehicle.firstPlateDate)\r\n ? null\r\n : moment.utc(casee.caseVehicle.firstPlateDate).local().toDate();\r\n }\r\n if (!R.isNil(vehicle)) {\r\n return R.isNil(vehicle.firstRegistrationDate)\r\n ? null\r\n : moment.utc(vehicle.firstRegistrationDate).local().toDate();\r\n }\r\n\r\n return null;\r\n }\r\n\r\n public static GetMakeDateObject(casee: Case | null, vehicle: Vehicle | null): Date | null {\r\n if (!R.isNil(casee) && !R.isNil(casee.caseVehicle)) {\r\n return R.isNil(casee.caseVehicle.registrationDate)\r\n ? null\r\n : moment.utc(casee.caseVehicle.registrationDate).local().toDate();\r\n }\r\n if (!R.isNil(vehicle)) {\r\n return R.isNil(vehicle.makeDate) ? null : moment.utc(vehicle.makeDate).local().toDate();\r\n }\r\n\r\n return new Date();\r\n }\r\n\r\n public static GetMakeDate(casee: Case | null, vehicle: Vehicle | null, language: string): string {\r\n const dateObj = this.GetMakeDateObject(casee, vehicle);\r\n\r\n return R.isNil(dateObj) ? 'N/A' : dateObj.toLocaleDateString(language);\r\n }\r\n\r\n public static GetMakeDateFormat(\r\n casee: Case | null,\r\n vehicle: Vehicle | null,\r\n format: string\r\n ): string | null {\r\n const dateObj = this.GetMakeDateObject(casee, vehicle);\r\n if (dateObj == null) return null;\r\n return moment(dateObj).format(format);\r\n }\r\n\r\n public static GetBrandModel(casee: Case | null, vehicle: Vehicle | null): string {\r\n return this.GetBrand(casee, vehicle) + ' ' + this.GetModel(casee, vehicle);\r\n }\r\n}\r\n","import * as React from 'react';\r\n\r\nimport { ApplicationContext, AppContext } from '../../context/Contexts';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../store';\r\nimport { Case, CaseFilters, CaseList } from '../../interfaces/Case';\r\nimport { Organization } from '../../interfaces/Organization';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { Box, Grid, ListItem } from '@material-ui/core';\r\nimport { withRouter } from 'react-router';\r\nimport moment from 'moment';\r\nimport { VehicleFilters, VehicleList } from '../../interfaces/Vehicle';\r\nimport * as R from 'ramda';\r\nimport { VehicleHelper } from '../../helpers/VehicleHelper';\r\nimport { RoleClaimsEnum } from '../../helpers/Constants';\r\nimport isNil from 'lodash/isNil';\r\nimport unionBy from 'lodash/unionBy';\r\n\r\ninterface Vehicle {\r\n id: number;\r\n plateNumber: string;\r\n name: string;\r\n vin: string;\r\n status?: string;\r\n firstRegistrationDate: string;\r\n cases: Case[];\r\n}\r\n\r\nexport interface ExternalSearchCaseProps {\r\n handleSearchPopverClose: () => void;\r\n searchValue: string;\r\n searchId: string;\r\n}\r\ntype SearchCaseProps = { appState: AppState } & ExternalSearchCaseProps & RouteComponentProps;\r\n\r\ninterface ISearchCaseState {\r\n vehicleList: Vehicle[];\r\n\r\n isLoading: boolean;\r\n}\r\n\r\nclass SearchCase extends React.PureComponent {\r\n private cbContext!: AppContext;\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n vehicleList: [],\r\n isLoading: false\r\n } as ISearchCaseState;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-empty-function\r\n public async componentDidMount() {}\r\n\r\n async componentDidUpdate(prevProps: SearchCaseProps) {\r\n if (this.props.searchId !== prevProps.searchId) {\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n this.loadCases\r\n );\r\n }\r\n }\r\n\r\n loadCases = async () => {\r\n const vehicles = await this.loadData();\r\n\r\n this.setState({\r\n isLoading: false,\r\n vehicleList: vehicles\r\n });\r\n };\r\n\r\n /**\r\n * Warning! dragons in here due to the API.\r\n * Case and Vehicle and kept in different databases and are accessed with different services.\r\n * Steps needed for searching are:\r\n * 1. Search by VIN, case id or registration number in Case DB => some cases are returned\r\n * 2. Search in Vehicle DB => some vehicles are returned\r\n * 3. Back to Case DB and grab all the cases associated with the vehicles found on step 2.\r\n * 4. In order to be safe, combine cases found on step 1 and step 3 and remove duplicates\r\n */\r\n loadData = async (): Promise => {\r\n const vehicleEmptyList = { vehicles: [], total: 0, page: 0 } as VehicleList;\r\n\r\n // Step 1 and 2 from the description above\r\n const [cases, vehicleExtensionList] = await Promise.all([\r\n this.cbContext.caseService.GetCases({ \r\n text: this.props.searchValue.replace(/\\s+/g, ''), \r\n countryCode: this.props.appState.appUser?.organization?.country?.code,\r\n organizationOwnerId: (this.props.appState.appUser?.organization?.viewOwnerEntries ?? false) ? this.props.appState.appUser?.organization?.hoId : null\r\n } as any as CaseFilters),\r\n this.cbContext.vehicleService.GetVehicles({\r\n text: this.props.searchValue.replace(/\\s+/g, '')\r\n } as any as VehicleFilters)\r\n ]);\r\n\r\n const vehicleList: VehicleList = {\r\n vehicles: vehicleExtensionList.vehicles.map(({ vehicle }) => vehicle),\r\n page: vehicleExtensionList.page,\r\n total: vehicleExtensionList.total\r\n };\r\n\r\n const vehicles = this.props.appState.user!.profile.role.includes(RoleClaimsEnum.Vehicle)\r\n ? vehicleList\r\n : vehicleEmptyList;\r\n\r\n const vehicleIds = vehicles.vehicles.map(({ id }) => id);\r\n if (vehicleIds.length) {\r\n // Step 3 from the description above\r\n const allCasesFromVehicles = await this.cbContext.caseService.GetCases({\r\n vehicleIds: vehicleIds,\r\n makeSearchText: '',\r\n modelSearchText: '',\r\n organizationOwnerId: (this.props.appState.appUser?.organization?.viewOwnerEntries ?? false) ? this.props.appState.appUser?.organization?.hoId : null\r\n } as any as CaseFilters);\r\n\r\n // Step 4 from the description above\r\n cases.cases = unionBy(cases.cases, allCasesFromVehicles.cases, 'id');\r\n }\r\n\r\n const vehicleIdsFromCases = Array.from(\r\n new Set(cases.cases.filter((c) => c.vehicleId !== null).map((item) => item.vehicleId!))\r\n );\r\n const vehicleIdsFromVehicles = Array.from(new Set(vehicleIds));\r\n\r\n const orphaneVehiclesIds = vehicleIdsFromVehicles.filter(\r\n (vid) => vehicleIdsFromCases.find((item) => item === vid) === undefined\r\n );\r\n const orphaneCasesVehIds = vehicleIdsFromCases.filter(\r\n (vid) => vehicleIdsFromVehicles.find((item) => item === vid) === undefined\r\n );\r\n\r\n // We also need to check for vehicles which are not associated with a case => orphan vehicles\r\n // and cases which are not associated with a vehicle => orphan cases\r\n const [orphaneCases, orphaneVehicles] = await Promise.all([\r\n orphaneVehiclesIds.length === 0\r\n ? ({ cases: [], page: 0, total: 0 } as CaseList)\r\n : this.cbContext.caseService.GetCases({\r\n vehicleIds: orphaneVehiclesIds,\r\n makeSearchText: '',\r\n modelSearchText: ''\r\n } as any as CaseFilters),\r\n this.cbContext.vehicleService.GetVehicleList(orphaneCasesVehIds)\r\n ]);\r\n\r\n cases.cases.push(...orphaneCases.cases);\r\n vehicles.vehicles.push(...orphaneVehicles);\r\n\r\n let usersAssignedLIst: any[] = [];\r\n let orgOwners: Organization[] = [];\r\n\r\n if (cases.cases.length) {\r\n [usersAssignedLIst, orgOwners] = await Promise.all([\r\n this.cbContext.appUserService.GetUsersInfo(\r\n Array.from(new Set(cases.cases.map((item) => item.caseStatus.assignedToId)))\r\n ),\r\n this.cbContext.organizationService.GetUserOrganizationsByIds(\r\n Array.from(new Set(cases.cases.map((item) => item.organizationOwnerId)))\r\n )\r\n ]);\r\n }\r\n cases.cases.forEach((cd) => {\r\n const userAssignedTo = usersAssignedLIst.find(\r\n (item) => item.id === cd.caseStatus.assignedToId\r\n );\r\n const organizationOwner = orgOwners.find((item) => item.id === cd.organizationOwnerId);\r\n const vehicle = vehicles.vehicles.find((item) => item.id === cd.vehicleId);\r\n\r\n cd.caseStatus.assignedTo = R.isNil(userAssignedTo) ? null : userAssignedTo;\r\n cd.organizationOwner = R.isNil(organizationOwner) ? null : organizationOwner;\r\n cd.vehicle = R.isNil(vehicle) ? null : vehicle;\r\n });\r\n\r\n const vehiclesInStock = vehicles.vehicles.map((item) => {\r\n return {\r\n id: item.id,\r\n vin: item.vin,\r\n plateNumber: item.plateNumber,\r\n name: item.make && item.model ? `${item.make?.displayName} ${item.model?.displayName}` : '',\r\n status: item.currentStatus?.status?.displayName,\r\n firstRegistrationDate: item.firstRegistrationDate,\r\n cases: cases.cases.filter((i) => i.vehicle?.id === item.id)\r\n };\r\n });\r\n\r\n const caseVehicles = cases.cases\r\n .filter((i) => !i.vehicle && i.caseVehicle)\r\n .map((i) => i.caseVehicle);\r\n\r\n const vehiclesNotInStock = caseVehicles.map((item) => {\r\n return {\r\n id: -1,\r\n vin: item.vin || '',\r\n plateNumber: item.plateNumber || '',\r\n name: item.model ? `${item.model?.brand} ${item.model?.name}` : '',\r\n status: item.currentStatus?.status?.displayName,\r\n firstRegistrationDate: item.registrationDate ? item.registrationDate : '',\r\n cases: cases.cases.filter((i) => i.caseVehicle?.id === item.id)\r\n };\r\n });\r\n\r\n const caseWithNoVehicles = cases.cases.filter(\r\n (i) => isNil(i.caseVehicle) && isNil(i.vehicleId)\r\n );\r\n\r\n const emptyVehicles = [];\r\n if (caseWithNoVehicles.length)\r\n emptyVehicles.push({\r\n id: -1,\r\n vin: ' - ',\r\n plateNumber: ' - ',\r\n name: ' - ',\r\n status: undefined,\r\n firstRegistrationDate: '',\r\n cases: caseWithNoVehicles\r\n });\r\n\r\n return [...vehiclesInStock, ...vehiclesNotInStock, ...emptyVehicles];\r\n };\r\n\r\n onCaseClick = (id: number) => {\r\n if (!R.isNil(this.props.handleSearchPopverClose)) {\r\n this.props.handleSearchPopverClose();\r\n }\r\n\r\n const currentPath = this.props.history.location.pathname.toLowerCase();\r\n this.props.history.push('/cases/' + id);\r\n\r\n if (currentPath.indexOf('/cases/') !== -1) {\r\n this.props.history.go(0);\r\n }\r\n };\r\n\r\n onVehicleClick = (id: number) => {\r\n if (!id || id < 0) {\r\n return;\r\n }\r\n\r\n if (!R.isNil(this.props.handleSearchPopverClose)) {\r\n this.props.handleSearchPopverClose();\r\n }\r\n\r\n const currentPath = this.props.history.location.pathname.toLowerCase();\r\n this.props.history.push('/vehicle/' + id);\r\n\r\n if (currentPath.indexOf('/vehicle/') !== -1) {\r\n this.props.history.go(0);\r\n }\r\n };\r\n\r\n renderVehicles = (vehicles: Vehicle[]) => {\r\n return vehicles.map((item, index) => (\r\n
\r\n this.onVehicleClick(item.id)}\r\n >\r\n \r\n \r\n
{item.plateNumber}
\r\n
\r\n \r\n
{item.status}
\r\n
{item.vin}
\r\n
\r\n \r\n
{item.name}
\r\n
\r\n \r\n
\r\n
\r\n {item.firstRegistrationDate\r\n ? moment\r\n .utc(item.firstRegistrationDate)\r\n .local()\r\n .format(this.props.appState.dateFormat)\r\n : ' - '}\r\n
\r\n
\r\n
\r\n \r\n {this.renderCases(item.cases)}\r\n
\r\n ));\r\n };\r\n\r\n renderCases = (cases: Case[]) => {\r\n return cases.map((item, index) => (\r\n this.onCaseClick(item.id)}>\r\n \r\n \r\n
{item.id}
\r\n
\r\n {VehicleHelper.GetPlateNumber(item, item.vehicle)}\r\n
\r\n
\r\n \r\n
{item.caseType!.displayName}
\r\n
\r\n {R.isNil(item.caseEvent) ? '' : item.caseEvent.caseNumber}\r\n
\r\n
\r\n {VehicleHelper.GetVIN(item, item.vehicle)}\r\n
\r\n
\r\n\r\n \r\n
{item.organizationOwner!.name}
\r\n {/*
{item.createdByUser!.userName}
*/}\r\n
{item.caseStatus.assignedTo!.userName}
\r\n
\r\n \r\n
{item.caseStatus!.caseStatus!.displayName}
\r\n
\r\n {moment\r\n .utc(item.caseStatus!.date)\r\n .local()\r\n .format(this.props.appState.dateFormat)}\r\n
\r\n
\r\n
\r\n
\r\n ));\r\n };\r\n\r\n public render() {\r\n this.cbContext = this.context as AppContext;\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n\r\n {!this.state.isLoading && this.state.vehicleList.length != 0 ? (\r\n \r\n {this.renderVehicles(this.state.vehicleList)}\r\n \r\n ) : null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app\r\n }),\r\n null\r\n)(withRouter(SearchCase));\r\n","import * as R from 'ramda';\r\nimport { IReferential } from '../interfaces/IReferential';\r\nimport { CurrencyRate, Provenance } from '../interfaces/Vehicle';\r\nimport { CountryCodeEnum, ValuationLaguageId } from './Constants';\r\nimport Moment from 'moment';\r\nimport { isNullOrUndefined } from 'util';\r\nexport class Utils {\r\n public static GetValuationLanguageId(language: string): number {\r\n if (language === 'en') {\r\n return ValuationLaguageId.ro;\r\n }\r\n if (language === 'ro') {\r\n return ValuationLaguageId.ro;\r\n }\r\n if (language === 'nl') {\r\n return ValuationLaguageId.en;\r\n }\r\n\r\n return ValuationLaguageId.ro;\r\n }\r\n\r\n public static GetCurrencyRate(currencyRates: CurrencyRate[], currencyCode: string): number {\r\n const crrRate = currencyRates.find((item) => item.currency === currencyCode);\r\n if (R.isNil(crrRate)) {\r\n return 1;\r\n }\r\n\r\n return currencyRates.find((item) => item.currency === currencyCode)!.rate;\r\n }\r\n\r\n public static ConvertCurrencyWithRoundedRate(\r\n currencyRates: CurrencyRate[],\r\n fromCurrencyCode: string,\r\n toCurrencyCode: string,\r\n fromRate: number,\r\n value: number\r\n ): number {\r\n if (toCurrencyCode === fromCurrencyCode) {\r\n return value;\r\n }\r\n const toRate = parseFloat(this.GetCurrencyRate(currencyRates, toCurrencyCode).toFixed(2));\r\n return Number.parseFloat((value * (fromRate / toRate)).toFixed(2));\r\n }\r\n\r\n public static ConvertCurrency(\r\n currencyRates: CurrencyRate[],\r\n fromCurrencyCode: string,\r\n toCurrencyCode: string,\r\n value: number\r\n ): number {\r\n if (toCurrencyCode === fromCurrencyCode) {\r\n return value;\r\n }\r\n\r\n const fromRate = this.GetCurrencyRate(currencyRates, fromCurrencyCode);\r\n const toRate = this.GetCurrencyRate(currencyRates, toCurrencyCode);\r\n\r\n return Number.parseFloat((value * (fromRate / toRate)).toFixed(2));\r\n }\r\n\r\n /* eslint eqeqeq: 0 */\r\n public static GetIdOrNull = (model: IReferential | undefined | null): number | null =>\r\n model != undefined ? model.id : null;\r\n \r\n public static GetProvenanceIdOrNull = (model: Provenance | undefined | null): number | null =>\r\n model != undefined ? model.id : null;\r\n\r\n public static FormatDateString = (dateString: string): string => {\r\n return Moment.utc(dateString).local().format('YYYY/MM/DD hh:mm:ss');\r\n };\r\n public static FormatDate = (date: Date): string => {\r\n return Moment.utc(date).local().format('YYYY/MM/DD hh:mm:ss');\r\n };\r\n\r\n public static AddObjectToFormData = (formData: FormData, data: any, parentKey: string) => {\r\n if (data && typeof data === 'object' && !(data instanceof Date) && !(data instanceof File)) {\r\n Object.keys(data).forEach((key) => {\r\n Utils.AddObjectToFormData(formData, data[key], parentKey ? `${parentKey}[${key}]` : key);\r\n });\r\n } else {\r\n const value = data == null ? '' : data;\r\n\r\n formData.append(parentKey, value);\r\n }\r\n };\r\n\r\n public static getPriceWithoutVat = (priceWithVat: number, vatRate: number): number => {\r\n if (vatRate <= 0) {\r\n return priceWithVat;\r\n }\r\n\r\n return priceWithVat / (1 + vatRate / 100);\r\n };\r\n\r\n public static getPriceWithVat = (price: number, vatRate: number): number => {\r\n if (vatRate <= 0) {\r\n return price;\r\n }\r\n\r\n return price * (1 + vatRate / 100);\r\n };\r\n\r\n public static getPriceWithMarginVat = (\r\n sellingPrice: number,\r\n purchasePrice: number,\r\n vatRate: number\r\n ) => {\r\n if (sellingPrice <= purchasePrice) {\r\n return sellingPrice;\r\n }\r\n\r\n return sellingPrice + (sellingPrice - purchasePrice) * (vatRate / 100);\r\n };\r\n\r\n public static getMarginVat = (sellingPrice: number, purchasePrice: number, vatRate: number) => {\r\n if (sellingPrice <= purchasePrice) {\r\n return 0;\r\n }\r\n\r\n return (sellingPrice - purchasePrice) * (vatRate / 100);\r\n };\r\n\r\n public static removeVatFromPriceLabel = (label: string): string => {\r\n return label.replace(/ *\\([^)]*\\) */g, '').trim();\r\n };\r\n\r\n public static validatePlateNumber(plateNumber:string):boolean {\r\n const plateRegex = /^[A-Z]{1,2}[0-9]{2,3}[A-Z]{3}$/;\r\n\r\n return plateRegex.test(plateNumber);\r\n }\r\n\r\n \r\n public static countryNumberFormat(numString: string, country: IReferential | null): string {\r\n const countryCode = country?.code ?? CountryCodeEnum.RO.toString();\r\n if (countryCode == CountryCodeEnum.CZ.toString()) { \r\n // Convert the string to a decimal number\r\n const number = parseFloat(numString); \r\n // Check if conversion was successful\r\n if (isNaN(number)) {\r\n return \"Invalid number\";\r\n }\r\n \r\n // Specify options for number formatting\r\n const options: Intl.NumberFormatOptions = {\r\n style: 'decimal',\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2,\r\n };\r\n\r\n return number.toLocaleString('cs-CZ', options);\r\n }\r\n \r\n return numString;\r\n } \r\n}\r\n","import { Utils } from '../helpers/Utils';\r\nimport { IReferential } from '../interfaces/IReferential';\r\nimport { OrderPart, OrderPartDTO } from '../interfaces/Order';\r\nimport { isNullOrUndefined } from 'util';\r\nexport const pretUnitarFormat = (\r\n part: OrderPart | OrderPartDTO | undefined,\r\n pretOriginal: number,\r\n currencyCode: string,\r\n country: IReferential | null\r\n) => {\r\n if (part!.alternativePartQualityId === null) {\r\n return (\r\n Utils.countryNumberFormat((Math.round(pretOriginal * 100) / 100).toFixed(2), country) +\r\n ' ' +\r\n (!isNullOrUndefined(currencyCode) && currencyCode !== '' ? currencyCode : '')\r\n );\r\n } else {\r\n if (isNullOrUndefined(part!.alternativePrice)) {\r\n return 0;\r\n }\r\n return (\r\n Utils.countryNumberFormat((Math.round(part!.alternativePrice * 100) / 100).toFixed(2), country) +\r\n ' ' +\r\n (!isNullOrUndefined(currencyCode) && currencyCode !== '' ? currencyCode : '')\r\n );\r\n }\r\n};\r\n","import { OrderPart } from \"./Order\";\r\n\r\nexport class OrderParts {\r\n private _parts: OrderPart[];\r\n private _vat: number;\r\n\r\n public constructor(parts: OrderPart[], vat: number) {\r\n // Filtrare pentru a exclude piesele șterse\r\n this._parts = parts.filter(item => !item.isDeleted);\r\n this._vat = vat / 100;\r\n }\r\n\r\n // Metoda pentru a calcula prețul unei piese\r\n private getPrice(part: OrderPart): number {\r\n return part.alternativePartQualityId === null ? part.originalPrice\r\n : part.alternativePrice ?? 0;\r\n }\r\n\r\n // Metoda pentru a calcula discount-ul unei piese\r\n private getDiscount(part: OrderPart): number {\r\n const discount = part.alternativePartQualityId === null ? part.discount\r\n : part.alternativePartDiscount;\r\n return discount ? discount / 100 : 0;\r\n }\r\n\r\n // Calcularea sumei totale a pieselor fără discount\r\n public getAmountPart(): number {\r\n return this._parts.reduce((sum, part) =>\r\n sum + part.pieceNr * this.getPrice(part), 0);\r\n }\r\n\r\n // Calcularea sumei totale a pieselor cu discount\r\n public getAmountPartWithDiscount(): number {\r\n return this._parts.reduce((sum, part) =>\r\n sum + part.pieceNr * this.getPrice(part) * (1 - this.getDiscount(part)), 0);\r\n }\r\n\r\n // Calcularea totalului discountului\r\n public totalDiscount(): number {\r\n return this._parts.reduce((sum, part) =>\r\n sum + part.pieceNr * this.getPrice(part) * this.getDiscount(part), 0);\r\n }\r\n\r\n // Calcularea totalului fără TVA\r\n public totalWithoutVAT(): number {\r\n const totalParts = this.getAmountPart();\r\n const discount = this.totalDiscount();\r\n return totalParts - discount;\r\n }\r\n\r\n // Calcularea TVA-ului\r\n public totalVAT(): number {\r\n return this.totalWithoutVAT() * this._vat;\r\n }\r\n\r\n // Calcularea totalului final cu TVA\r\n public total(): number {\r\n const totalWithoutVAT = this.totalWithoutVAT();\r\n return totalWithoutVAT + this.totalVAT();\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { ApplicationState, AppState, CaseSettingsState, VehicleState } from '../../store';\r\nimport { ApplicationContext, AppContext } from '../../context/Contexts';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { IReferentialService } from '../../services/Interfaces/IReferentialService';\r\nimport { IAppUserService } from '../../services/Interfaces/IAppUserService';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { IOrderService } from '../../services/Interfaces/IOrderService';\r\nimport {\r\n Box,\r\n Button,\r\n Card,\r\n CardContent,\r\n Dialog,\r\n DialogContent,\r\n DialogTitle,\r\n FormControlLabel,\r\n Grid,\r\n IconButton,\r\n Radio,\r\n TextField,\r\n Tooltip\r\n} from '@material-ui/core';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport MUIDataTable, {\r\n MUIDataTableColumnOptions,\r\n MUIDataTableMeta,\r\n SelectableRows,\r\n MUIDataTableColumnDef\r\n} from 'mui-datatables';\r\nimport { MUITranslations } from '../../helpers/MUITableTranslations';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport DeleteOutlineTwoToneIcon from '@material-ui/icons/DeleteOutlineTwoTone';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport {\r\n CaseAttachment,\r\n CaseCalculationAlternativePart,\r\n CaseCalculationPart,\r\n CaseCalculationSupplierAlternativePart,\r\n Model,\r\n NonStockPart,\r\n TariffPercentResponse,\r\n UpdateOrderInfoRequest\r\n} from '../../interfaces/Case';\r\nimport {\r\n Order,\r\n OrderPart,\r\n OrderPartDTO,\r\n OrderStatusChangeRequestDto,\r\n OrderStatusHistory,\r\n PartToBeOrdered,\r\n UpdateOrderAmountsRequestDto\r\n} from '../../interfaces/Order';\r\nimport { isNull, isNullOrUndefined } from 'util';\r\nimport moment from 'moment';\r\nimport 'moment/locale/en-gb';\r\nimport 'moment/locale/ro';\r\nimport Referentials from '../../helpers/Referentials.json';\r\nimport {\r\n ReferentialCode,\r\n ParametreCode,\r\n OrganizationTypeCode,\r\n OrderStatusTypesCode,\r\n AttachmentTypeCode,\r\n OrderStatusCode,\r\n OrderPartStatus,\r\n SupplierCode,\r\n OwnStockCodeEnum,\r\n AdditionalInfoCode,\r\n AlternativeCode,\r\n RoleClaimsEnum,\r\n CarPartQualityTypeCode,\r\n OrderNotificationTemplateEnum\r\n} from '../../helpers/Constants';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport FileSaver from 'file-saver';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { FormHelpers } from '../../helpers/forms/FormHelpers';\r\nimport { WorkflowSectionStepForm } from '../../interfaces/Workflow';\r\nimport * as R from 'ramda';\r\nimport { map } from 'ramda';\r\nimport { isUndefined, rest } from 'lodash';\r\nimport { red } from '@material-ui/core/colors';\r\nimport { pretUnitarFormat } from '../../utils/orderUtils';\r\nimport { OrganizationService } from '../../services/OrganizationService';\r\nimport { IOrganizationService } from '../../services/Interfaces/IOrganizationService';\r\nimport { Organization } from '../../interfaces/Organization';\r\nimport { AlignRight } from 'react-feather';\r\nimport _ from 'lodash';\r\nimport { VehicleHelper } from '../../helpers/VehicleHelper';\r\nimport { Utils } from '../../helpers/Utils';\r\nimport { IWorkflowService } from '../../services/Interfaces/IWorkflowService';\r\nimport {MuiThemeProvider, createMuiTheme } from '@material-ui/core';\r\nimport { v4 as uuid } from 'uuid';\r\nimport { OrderParts } from '../../interfaces/OrderParts';\r\nimport { EditComponentProps } from 'material-table';\r\n\r\nexport interface ExternalOrderDetailsProps {\r\n orderDetails: Order;\r\n onOrderChange: (order: Order) => void;\r\n hasRights: boolean;\r\n additionTariff: TariffPercentResponse;\r\n discountTariff: TariffPercentResponse;\r\n automatePlaceOrder: boolean;\r\n workflowAutomatePlaceOrder: boolean;\r\n automatePlaceOrderChange: () => Promise;\r\n}\r\n\r\ntype OrderDetailsProps = ExternalOrderDetailsProps & {\r\n caseSettingsState: CaseSettingsState;\r\n appState: AppState;\r\n vehicleState: VehicleState;\r\n} & ProviderContext &\r\n RouteComponentProps;\r\n\r\ninterface IOrderDetailsState {\r\n userStartCode: string;\r\n isLoadingOrderDetails: boolean;\r\n orderpartsList: OrderPartDTO[];\r\n isChangeOrderStatusDialogOpen: boolean;\r\n changeOrderStatusComment: string;\r\n statuses: IReferential[];\r\n selectedStatus: IReferential;\r\n orderPartStatus: IReferential[];\r\n orderStatuses: IReferential[];\r\n selectedDisplayedStatus: string;\r\n attachments: CaseAttachment[];\r\n orderStatusHistory: OrderStatusHistory[];\r\n TVA: string;\r\n attachType: IReferential | null;\r\n partsLocationOrganization: Organization | null;\r\n caseCalculationPartsThatChangedDuringPlacingOrder: CaseCalculationSupplierAlternativePart[];\r\n organizationId: number | null;\r\n organizations: Organization[];\r\n showOrderPrice: boolean;\r\n costCenter: IReferential | null;\r\n executing: boolean;\r\n quality: IReferential | null;\r\n rowsExpanded: number[];\r\n partLoaders: boolean[];\r\n firstCasePartToBeOrdered: PartToBeOrdered | null;\r\n hasSupplierRole: boolean;\r\n model: Model | null;\r\n interventionType: IReferential | null;\r\n}\r\n\r\nclass OrderDetails extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private orderService!: IOrderService;\r\n private appReferentialService!: IReferentialService;\r\n private appUserService!: IAppUserService;\r\n private caseService!: ICaseService;\r\n private organizationService!: IOrganizationService;\r\n private workflowService!: IWorkflowService;\r\n static contextType = ApplicationContext;\r\n \r\n state = {\r\n userStartCode: '',\r\n isLoadingOrderDetails: true,\r\n orderpartsList: [],\r\n isChangeOrderStatusDialogOpen: false,\r\n changeOrderStatusComment: '',\r\n statuses: [] as IReferential[],\r\n selectedStatus: this.props.orderDetails.orderStatus,\r\n orderPartStatus: [],\r\n orderStatuses: [],\r\n selectedDisplayedStatus: '',\r\n attachments: [],\r\n orderStatusHistory: [],\r\n TVA: '0',\r\n attachType: null,\r\n partsLocationOrganization: null,\r\n caseCalculationPartsThatChangedDuringPlacingOrder: [],\r\n organizationId: this.props.appState.appUser!.organizationId,\r\n organizations: [],\r\n showOrderPrice: false,\r\n costCenter: null,\r\n executing: false,\r\n quality: null,\r\n rowsExpanded: [],\r\n partLoaders: [],\r\n firstCasePartToBeOrdered: null,\r\n hasSupplierRole: false,\r\n model: null,\r\n interventionType: null\r\n } as IOrderDetailsState;\r\n\r\n public componentDidMount() {\r\n this.setState(\r\n {\r\n isLoadingOrderDetails: true\r\n },\r\n async () => {\r\n await this.loadData();\r\n }\r\n );\r\n }\r\n\r\n loadData = async () => {\r\n const refOrderStatus = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.OrderStatus\r\n );\r\n const refOrderPartStatus = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.OrderPartStatus\r\n );\r\n const ref = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.AttachmentType\r\n );\r\n const refQualityPart = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.CarPartCategory\r\n );\r\n\r\n const orderParts = this.props.orderDetails.orderParts;\r\n const [orderStatus, orderPartStatus, statusHist, attachmentTypes, caseEvent, partQualityTypes, casePartToBeOrdered, suppliersInit] = await Promise.all([\r\n this.appReferentialService.Get(refOrderStatus!.baseUrl),\r\n this.appReferentialService.Get(refOrderPartStatus!.baseUrl),\r\n this.orderService.GetOrderStatusHistories(this.props.orderDetails.id),\r\n this.appReferentialService.Get(ref!.baseUrl),\r\n this.caseService.GetCurrentEvent(this.props.orderDetails.caseId) ,\r\n this.appReferentialService.Get(refQualityPart!.baseUrl),\r\n orderParts && orderParts.length > 0 ? this.orderService.GetPartToBeOrdered(orderParts[0].casePartToBeOrderedId) : null,\r\n !this.props.orderDetails.supplier ? this.organizationService.GetUserOrganizationsByIds([this.props.orderDetails.supplierId]) : []\r\n ]);\r\n\r\n if (!this.props.orderDetails.supplier) {\r\n const supplier = suppliersInit.find((item) => item.id === this.props.orderDetails.supplierId);\r\n this.props.orderDetails.supplier = supplier === undefined ? null : supplier;\r\n }\r\n\r\n const modelId = this.props.caseSettingsState?.case?.caseVehicle?.modelId ?? this.props.orderDetails?.caseVehicle?.modelId;\r\n const model = modelId ? await this.caseService.GetModelById(modelId) : null;\r\n\r\n const [users] = await Promise.all([\r\n this.appUserService.GetUsersInfo(\r\n Array.from(new Set(statusHist.map((item) => item.createdBy)))\r\n )\r\n ]);\r\n\r\n statusHist.forEach((p) => {\r\n const user = users.find((item) => item.id === p.createdBy);\r\n p.createdByUser = user === undefined ? null : user;\r\n });\r\n\r\n let partsLocationOrganization = null;\r\n if (!isNullOrUndefined(this.props.orderDetails.partsLocationOrganizationId)) {\r\n partsLocationOrganization = await this.organizationService.GetOrganization(\r\n this.props.orderDetails.partsLocationOrganizationId!\r\n );\r\n }\r\n\r\n let costCenter = null;\r\n if (!R.isNil(caseEvent)) {\r\n if (!isNullOrUndefined(caseEvent.organizationId)) {\r\n costCenter = await this.workflowService.GetCostCenter(\r\n caseEvent.organizationId!\r\n );\r\n }\r\n }\r\n let orgList: Organization[] = [];\r\n if (!isNullOrUndefined(this.props.caseSettingsState.case)) {\r\n orgList = await this.organizationService.GetOrganizationsByHO(\r\n this.props.caseSettingsState.case!.organizationOwnerId,\r\n null\r\n );\r\n }\r\n const showOrderPrice = !this.props.appState.appUser!.organization!.organizationType!.hideOrderPrices;\r\n let TVA = '0';\r\n if (this.props.orderDetails.amountWithoutTVA !== 0) {\r\n TVA = (\r\n (this.props.orderDetails.amountTVA / this.props.orderDetails.amountWithoutTVA) *\r\n 100\r\n ).toFixed(0);\r\n } else {\r\n const caseParameterHistory = await this.caseService.GetCaseParameterHistory(this.props.orderDetails.caseId);\r\n const tvaParam = caseParameterHistory.find((item) => item.parameterCode === ParametreCode.TVA);\r\n if (tvaParam) {\r\n TVA = tvaParam.value;\r\n }\r\n }\r\n\r\n const startCode =\r\n this.props.appState.appUser!.organization!.organizationType!.code ===\r\n OrganizationTypeCode.SUPPLIER\r\n ? OrderStatusTypesCode.FZR\r\n : OrderStatusTypesCode.REP;\r\n\r\n const orderPartStatusFiltered = orderPartStatus.filter((item) => item.isActive === true);\r\n const partLoaders: boolean[] = [];\r\n const x = this.props.orderDetails.orderParts!.map((item) => {\r\n return { ...item } as OrderPartDTO;\r\n });\r\n for (let i = 0; i < x.length; i++) {\r\n partLoaders.push(false);\r\n }\r\n const hasSupplierRole = this.hasRight(RoleClaimsEnum.Supplier);\r\n this.setState({\r\n userStartCode: startCode,\r\n orderpartsList: x,\r\n statuses: orderStatus.filter((item) => item.isActive === true),\r\n orderStatuses: orderStatus.filter((item) => item.isActive === true),\r\n orderPartStatus: orderPartStatusFiltered,\r\n selectedDisplayedStatus: !isNullOrUndefined(this.props.orderDetails.orderStatus)\r\n ? this.props.orderDetails.orderStatus.displayName\r\n : '',\r\n selectedStatus: this.props.orderDetails.orderStatus!,\r\n orderStatusHistory: statusHist,\r\n TVA: TVA,\r\n isLoadingOrderDetails: false,\r\n attachType: attachmentTypes.find((item) => item.code === AttachmentTypeCode.OTHER)!,\r\n partsLocationOrganization: partsLocationOrganization,\r\n organizations: orgList,\r\n showOrderPrice: showOrderPrice,\r\n costCenter: costCenter,\r\n quality: partQualityTypes.find((item) => item.id === this.props.orderDetails.supplier?.categoryPartId) ?? null,\r\n rowsExpanded: this.props.orderDetails?.orderStatus?.code === OrderStatusCode.REP_VERIFICATA_DE_FURNIZOR && !hasSupplierRole ? x.map((row, index) => row.hasBeenVerifiedBySupplier ? index : null).filter(index => index !== null) as number[] : [],\r\n partLoaders: partLoaders,\r\n hasSupplierRole: hasSupplierRole,\r\n firstCasePartToBeOrdered: casePartToBeOrdered,\r\n model: model,\r\n interventionType: !R.isNil(caseEvent) ? caseEvent.interventionType : null\r\n });\r\n };\r\n\r\n public hasRight = (right: string): boolean => {\r\n return this.props.appState!.user!.profile.role.includes(right);\r\n };\r\n\r\n displayOtherOrderDetails = (value: any, row: any) => {\r\n const orderPart = this.state.orderpartsList.find((item) => item.id === row[0]);\r\n return (\r\n \r\n
\r\n {this.translatorService.Tranlate('ORDER_PART_DETAILS_STOCK_LABEL', 'Disponibil') +\r\n ': ' +\r\n (orderPart!.alternativePartQualityId === null\r\n ? orderPart!.availableStock\r\n : orderPart!.availableQuantity === null\r\n ? ''\r\n : orderPart!.availableQuantity)}\r\n
\r\n
\r\n {this.translatorService.Tranlate('ORDER_PART_DETAILS_LOCATION_LABEL', 'Locatie') +\r\n ': ' +\r\n (orderPart!.alternativePartQualityId === null\r\n ? this.isNull(orderPart!.location, '')\r\n : this.isNull(orderPart!.alternativePartStockLocation, ''))}\r\n
\r\n \r\n }\r\n >\r\n
\r\n {(isNullOrUndefined(value) || value === '' ? 'N/A' : value) + ' '}\r\n \r\n
\r\n \r\n );\r\n };\r\n\r\n isNull = (value: any, nullValue: any) => {\r\n if (isNullOrUndefined(value)) {\r\n return nullValue;\r\n }\r\n\r\n return value;\r\n };\r\n\r\n displayDeliveryOrderDetails = (value: any, row: any) => {\r\n const orderPart = this.state.orderpartsList.find((item) => item.id === row[0]);\r\n return (\r\n \r\n {isNullOrUndefined(orderPart!.deliveryTime) ? '' : orderPart!.deliveryTime}\r\n {!isNullOrUndefined(orderPart?.prevVal) && (\r\n \r\n {this.translatorService.Tranlate(\r\n 'ORDER_PART_DETAILS_DELIVERY_TIME_LABEL11',\r\n 'Livrare valoare anterioara'\r\n ) +\r\n ': ' +\r\n (isNullOrUndefined(orderPart!.prevVal?.deliveryTime)\r\n ? ''\r\n : orderPart!.prevVal?.deliveryTime)}\r\n \r\n )}\r\n \r\n );\r\n };\r\n\r\n handleOECodeChange = (\r\n event: React.ChangeEvent, \r\n orderPart: OrderPart\r\n ) => {\r\n const orderParts = [...this.state.orderpartsList];\r\n const index = orderParts.findIndex((item) => item.id === orderPart.id);\r\n if (index !== -1) {\r\n const updatedOrderPart = { \r\n ...orderParts[index],\r\n toBeUpdated: true,\r\n guideNumber: event.target.value,\r\n // Reset fields when guideNumber is changed\r\n alternativePartQualityId: null,\r\n originalPrice: 0,\r\n producer: null,\r\n deliveryTime: null,\r\n validityTime: null,\r\n codeType: null,\r\n excludeFromOrder: null,\r\n orderCode: null,\r\n type: null,\r\n locationId: null,\r\n availableStock: null,\r\n location: null,\r\n remarks: null,\r\n alternativeGuideNumber: null,\r\n alternativePartCode: null,\r\n alternativePrice: 0,\r\n alternativePartStockQuantity: null,\r\n alternativePartStockLocation: null,\r\n alternativePartRemarks: null,\r\n productId: null,\r\n codEan: null,\r\n bundleItem: null,\r\n bundleNo: null,\r\n bundleQuantity: null,\r\n availableQuantity: null,\r\n supplierId: null,\r\n hasBeenVerifiedBySupplier: true,\r\n byOeCode: true\r\n };\r\n // Update the orderParts list\r\n orderParts[index] = updatedOrderPart;\r\n \r\n //Delete grouped parts\r\n const orderPart = orderParts[index];\r\n for (let i = 0; i < orderParts.length; i++) {\r\n if (orderPart.groupedUniqueId === orderParts[i].groupedUniqueId && orderPart.id !== orderParts[i].id) {\r\n orderParts[i].isDeleted = true;\r\n orderParts[i].toBeDeleted = true;\r\n orderParts[i].hasBeenVerifiedBySupplier = true;\r\n }\r\n }\r\n // Set the updated state\r\n this.setState({ \r\n orderpartsList: orderParts \r\n }, () => {\r\n this.updateAmount();\r\n });\r\n }\r\n };\r\n\r\n handleAMCodeChange = (\r\n event: React.ChangeEvent, \r\n orderPart: OrderPart\r\n ) => {\r\n const orderParts = [...this.state.orderpartsList];\r\n const index = orderParts.findIndex((item) => item.id === orderPart.id);\r\n\r\n if (index !== -1) {\r\n const updatedOrderPart = { \r\n ...orderParts[index],\r\n toBeUpdated: true,\r\n alternativeGuideNumber: event.target.value,\r\n // Reset fields when guideNumber is changed\r\n alternativePartQualityId: null,\r\n originalPrice: 0,\r\n producer: null,\r\n deliveryTime: null,\r\n validityTime: null,\r\n codeType: null,\r\n excludeFromOrder: null,\r\n orderCode: null,\r\n type: null,\r\n locationId: null,\r\n availableStock: null,\r\n location: null,\r\n remarks: null,\r\n alternativePartCode: null,\r\n alternativePrice: 0,\r\n alternativePartStockQuantity: null,\r\n alternativePartStockLocation: null,\r\n alternativePartRemarks: null,\r\n productId: null,\r\n codEan: null,\r\n bundleItem: null,\r\n bundleNo: null,\r\n bundleQuantity: null,\r\n availableQuantity: null,\r\n supplierId: null,\r\n hasBeenVerifiedBySupplier: true,\r\n byOeCode: false\r\n };\r\n \r\n // Update the orderParts list\r\n orderParts[index] = updatedOrderPart;\r\n\r\n //Delete grouped parts\r\n const orderPart = orderParts[index];\r\n for (let i = 0; i < orderParts.length; i++) {\r\n if (orderPart.groupedUniqueId === orderParts[i].groupedUniqueId && orderPart.id !== orderParts[i].id) {\r\n orderParts[i].isDeleted = true;\r\n orderParts[i].toBeDeleted = true;\r\n orderParts[i].hasBeenVerifiedBySupplier = true;\r\n }\r\n }\r\n // Set the updated state\r\n this.setState({ \r\n orderpartsList: orderParts \r\n }, () => {\r\n this.updateAmount();\r\n });\r\n }\r\n };\r\n\r\n handlePieceNrChange = (\r\n event: React.ChangeEvent, \r\n orderPart: OrderPart\r\n ) => {\r\n const orderParts = [...this.state.orderpartsList];\r\n const index = orderParts.findIndex((item) => item.id === orderPart.id);\r\n\r\n if (index !== -1) {\r\n const updatedOrderPart = { \r\n ...orderParts[index],\r\n pieceNr: event.target.value === null ? 0 : parseFloat(event.target.value),\r\n };\r\n // Update the orderParts list\r\n orderParts[index] = updatedOrderPart;\r\n\r\n const caseCalculationAlternativePartCopy = [...orderParts[index].alternativeParts];\r\n const alternativePartChecked = caseCalculationAlternativePartCopy.find(\r\n (item) =>\r\n item.originalPartId === orderParts[index].id &&\r\n item.selectedAlternativePart !== 9999999999999\r\n );\r\n \r\n if (!R.isNil(alternativePartChecked)) {\r\n const currentPacking = alternativePartChecked.packing?.split('|')[0];\r\n const secondItemOfPacking = alternativePartChecked.packing?.split('|')[1];\r\n if (currentPacking && secondItemOfPacking) {\r\n const currentPackingNumber = parseFloat(currentPacking);\r\n if (\r\n parseFloat(event.target.value) % currentPackingNumber != 0 ||\r\n parseFloat(event.target.value) < alternativePartChecked.minQty\r\n ) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'MIN_PACKING_ERROR_MSG',\r\n 'Cantitatea comandata trebuie sa fie '\r\n ) +\r\n currentPackingNumber +\r\n this.translatorService.Tranlate('MIN_PACKING_MULTIPLE_ERROR_MSG', ' sau multiplul acesteia!'),\r\n { variant: 'error',\r\n autoHideDuration: 5000 }\r\n );\r\n }\r\n } else if (parseFloat(event.target.value) < alternativePartChecked.minQty) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'MIN_PACKING_ERROR_MSG',\r\n 'Cantitatea comandata trebuie sa fie '\r\n ) +\r\n alternativePartChecked.minQty +\r\n this.translatorService.Tranlate('MIN_PACKING_MULTIPLE_ERROR_MSG', ' sau multiplul acesteia!'),\r\n { variant: 'error',\r\n autoHideDuration: 5000 }\r\n );\r\n }\r\n if (\r\n !R.isNil(alternativePartChecked!.availableQuantity) &&\r\n alternativePartChecked!.availableQuantity < parseFloat(event.target.value)\r\n ) {\r\n this.validateOrigPartUnitsAdd(orderParts[index].id);\r\n } else {\r\n this.validateOrigPartUnitsRemove(orderParts[index].id);\r\n }\r\n }\r\n\r\n // Set the updated state\r\n this.setState({ \r\n orderpartsList: orderParts \r\n }, () => {\r\n this.updateAmount();\r\n });\r\n }\r\n };\r\n\r\n validateOrigPartUnitsAdd = (originalPartid: number) => {\r\n const labelParent = document.getElementsByClassName('id-' + originalPartid)[0] as HTMLElement;\r\n const identifylabel = labelParent.firstChild as any;\r\n const labelValidate = identifylabel.classList.add('Mui-error');\r\n\r\n const inputParent = document\r\n .getElementsByClassName('id-' + originalPartid)[0]\r\n .closest('div') as HTMLElement;\r\n const inputElement = inputParent.querySelector('input') as HTMLInputElement;\r\n const inputValidate = inputElement.classList.add('text-danger');\r\n\r\n return labelValidate && inputValidate;\r\n };\r\n\r\n validateOrigPartUnitsRemove = (originalPartid: number) => {\r\n const labelParent = document.getElementsByClassName('id-' + originalPartid)[0] as HTMLElement;\r\n const identifylabel = labelParent.firstChild as any;\r\n const labelValidate = identifylabel.classList.remove('Mui-error');\r\n\r\n const inputParent = document\r\n .getElementsByClassName('id-' + originalPartid)[0]\r\n .closest('div') as HTMLElement;\r\n const inputElement = inputParent.querySelector('input') as HTMLInputElement;\r\n const inputValidate = inputElement.classList.remove('text-danger');\r\n\r\n return labelValidate && inputValidate;\r\n };\r\n\r\n viewDeletePart = () : boolean => {\r\n if (this.props.orderDetails?.orderStatus?.code === OrderStatusCode.REP_DRAFT || this.props.orderDetails?.orderStatus?.code === OrderStatusCode.REP_REINTEROGATED_PARTS) {\r\n return true;\r\n }\r\n\r\n if (this.props.orderDetails?.orderStatus?.code === OrderStatusCode.REP_VERIFICATA_DE_FURNIZOR && this.state.rowsExpanded.length == 0) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n \r\n getPartsByColumns = (): MUIDataTableColumnDef[] => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: {\r\n /*display: 'excluded',*/\r\n filter: false\r\n } as MUIDataTableColumnOptions\r\n }, \r\n {\r\n name: 'guideNumber',\r\n label: this.translatorService.Tranlate('ORDER_PART_DETAILS_OE_CODE_LABEL', 'Cod OE'),\r\n options: {\r\n customBodyRender: (value: number, tableMeta: MUIDataTableMeta) => {\r\n const part = this.state.orderpartsList.find((item) => item.id === tableMeta.rowData[0]);\r\n if (part === null) {\r\n return;\r\n }\r\n\r\n if (this.props.orderDetails?.orderStatus?.code === OrderStatusCode.FZR_VERIFICARE_LA_FURNIZOR) {\r\n if (!R.isNil(this.state.quality) && this.state.quality.code === CarPartQualityTypeCode.OE && this.state.hasSupplierRole) {\r\n return (\r\n this.handleOECodeChange(e, part!)}\r\n disabled={part!.excludeFromOrder ?? false}\r\n />\r\n )\r\n }\r\n }\r\n\r\n return part!.guideNumber;\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'alternativeGuideNumber',\r\n label: this.translatorService.Tranlate('ORDER_PART_DETAILS_SUPPLIER_CODE_LABEL', 'Cod Furnizor'),\r\n options: {\r\n filter: false,\r\n sort: false,\r\n customBodyRender: (value: number, tableMeta: MUIDataTableMeta) => {\r\n const part = this.state.orderpartsList.find((item) => item.id === tableMeta.rowData[0]);\r\n if (part === null) {\r\n return;\r\n }\r\n\r\n if (this.props.orderDetails?.orderStatus?.code === OrderStatusCode.FZR_VERIFICARE_LA_FURNIZOR) {\r\n if (!R.isNil(this.state.quality) && this.state.quality.code === CarPartQualityTypeCode.AM && this.state.hasSupplierRole) {\r\n return (\r\n this.handleAMCodeChange(e, part!)}\r\n disabled={part!.excludeFromOrder ?? false}\r\n />\r\n )\r\n }\r\n }\r\n \r\n return part!.alternativeGuideNumber;\r\n }\r\n }\r\n },\r\n {\r\n name: 'name',\r\n label: this.translatorService.Tranlate('ORDER_PART_DETAILS_NAME_LABEL', 'Denumire'),\r\n options: {\r\n filter: false,\r\n sort: false,\r\n customBodyRender: (value: number, tableMeta: MUIDataTableMeta) => {\r\n const part = this.state.orderpartsList.find((item) => item.id === tableMeta.rowData[0]);\r\n\r\n if (this.state.hasSupplierRole && part?.alternativePartDescription) {\r\n return part!.alternativePartDescription;\r\n }\r\n\r\n if (!isNullOrUndefined(part!.alternativePartQualityId)) {\r\n return part!.alternativePartName;\r\n }\r\n\r\n return part!.name;\r\n }\r\n }\r\n },\r\n {\r\n name: 'carPartCategory.displayName',\r\n label: this.translatorService.Tranlate('ORDER_PART_DETAILS_QUALITY_LABEL', 'Calitate'),\r\n options: {\r\n filter: false,\r\n sort: false,\r\n customBodyRender: (value: number, tableMeta: MUIDataTableMeta) => {\r\n const part = this.state.orderpartsList.find((item) => item.id === tableMeta.rowData[0]);\r\n if (part!.alternativePartQualityId === null) {\r\n return part!.carPartCategory!.displayName;\r\n } else {\r\n if (isNullOrUndefined(part!.alternativePartQuality)) {\r\n return '';\r\n }\r\n return part!.alternativePartQuality.displayName;\r\n }\r\n }\r\n }\r\n },\r\n {\r\n name: 'originalPrice',\r\n label: this.translatorService.Tranlate(\r\n 'ORDER_PART_DETAILS_ORIGINAL_PRICE_LABEL',\r\n 'Pret unitar'\r\n ),\r\n options: {\r\n filter: false,\r\n sort: false,\r\n customBodyRender: (value: number, tableMeta: MUIDataTableMeta) => {\r\n const part = this.state.orderpartsList.find((item) => item.id === tableMeta.rowData[0]);\r\n const order = this.props.orderDetails;\r\n\r\n if (\r\n !isNullOrUndefined(part?.prevVal) &&\r\n pretUnitarFormat(\r\n part!.prevVal,\r\n part!.prevVal!.originalPrice,\r\n this.props.orderDetails.currencyCode,\r\n this.props.appState.appUser?.organization?.country ?? null\r\n ) !== pretUnitarFormat(part, value, this.props.orderDetails.currencyCode, this.props.appState.appUser?.organization?.country ?? null)\r\n ) {\r\n return (\r\n \r\n \r\n \r\n );\r\n }\r\n return this.state.showOrderPrice\r\n ? pretUnitarFormat(part, value, this.props.orderDetails.currencyCode, this.props.appState.appUser?.organization?.country ?? null)\r\n : '';\r\n }\r\n }\r\n },\r\n {\r\n name: 'pieceNr',\r\n label: this.translatorService.Tranlate('ORDER_PART_DETAILS_PIECE_NR_LABEL', 'Unitati'),\r\n options: {\r\n filter: false,\r\n sort: false,\r\n customBodyRender: (value: number, tableMeta: MUIDataTableMeta) => {\r\n const part = this.state.orderpartsList.find((item) => item.id === tableMeta.rowData[0]);\r\n if (!isNullOrUndefined(part?.prevVal) && part?.prevVal.pieceNr !== value) {\r\n return (\r\n \r\n \r\n \r\n );\r\n }\r\n if (this.props.orderDetails?.orderStatus?.code === OrderStatusCode.REP_VERIFICATA_DE_FURNIZOR && !this.state.hasSupplierRole && part!.hasBeenVerifiedBySupplier) {\r\n return (\r\n this.handlePieceNrChange(e, part!)}\r\n disabled={part!.excludeFromOrder ?? false}\r\n />\r\n )\r\n }\r\n return value;\r\n }\r\n }\r\n },\r\n {\r\n name: 'discount',\r\n label: this.translatorService.Tranlate('ORDER_PART_DETAILS_DISCOUNT_LABEL', 'Discount (%)'),\r\n options: {\r\n filter: false,\r\n sort: false,\r\n customBodyRender: (value: number, tableMeta: MUIDataTableMeta) => {\r\n const part = this.state.orderpartsList.find((item) => item.id === tableMeta.rowData[0]);\r\n\r\n if (part!.alternativePartQualityId === null) {\r\n return part!.discount;\r\n } else {\r\n return part!.alternativePartDiscount;\r\n }\r\n }\r\n }\r\n },\r\n {\r\n name: '',\r\n label: this.translatorService.Tranlate(\r\n 'ORDER_PART_DETAILS_TOTAL_PRICE_LABEL',\r\n 'Pret total'\r\n ),\r\n options: {\r\n filter: false,\r\n sort: false,\r\n customBodyRender: (value: number, tableMeta: MUIDataTableMeta) => {\r\n const part = this.state.orderpartsList.find((item) => item.id === tableMeta.rowData[0]);\r\n const order = this.props.orderDetails;\r\n if (part!.alternativePartQualityId === null) {\r\n if (isNullOrUndefined(tableMeta.rowData[7])) {\r\n return this.state.showOrderPrice\r\n ? Utils.countryNumberFormat(\r\n (Math.round(tableMeta.rowData[6] * tableMeta.rowData[5] * 100) / 100).toFixed(\r\n 2\r\n ), \r\n this.props.appState.appUser?.organization?.country ?? null) +\r\n ' ' +\r\n (!isNullOrUndefined(this.props.orderDetails.currencyCode) &&\r\n this.props.orderDetails.currencyCode !== ''\r\n ? this.props.orderDetails.currencyCode\r\n : '')\r\n : '';\r\n }\r\n return this.state.showOrderPrice\r\n ? Utils.countryNumberFormat((\r\n Math.round(\r\n (tableMeta.rowData[6] * tableMeta.rowData[5] -\r\n (tableMeta.rowData[6] * tableMeta.rowData[5] * tableMeta.rowData[7]) /\r\n 100) *\r\n 100\r\n ) / 100\r\n ).toFixed(2), this.props.appState.appUser?.organization?.country ?? null) +\r\n ' ' +\r\n (!isNullOrUndefined(this.props.orderDetails.currencyCode) &&\r\n this.props.orderDetails.currencyCode !== ''\r\n ? this.props.orderDetails.currencyCode\r\n : '')\r\n : '';\r\n } else {\r\n if (isNullOrUndefined(part!.alternativePrice)) {\r\n return 0;\r\n }\r\n if (isNullOrUndefined(part!.alternativePartDiscount)) {\r\n return this.state.showOrderPrice\r\n ? Utils.countryNumberFormat((Math.round(tableMeta.rowData[6] * part!.alternativePrice * 100) / 100).toFixed(\r\n 2\r\n ), this.props.appState.appUser?.organization?.country ?? null) +\r\n ' ' +\r\n (!isNullOrUndefined(this.props.orderDetails.currencyCode) &&\r\n this.props.orderDetails.currencyCode !== ''\r\n ? this.props.orderDetails.currencyCode\r\n : '')\r\n : '';\r\n }\r\n return this.state.showOrderPrice\r\n ? Utils.countryNumberFormat((\r\n Math.round(\r\n (tableMeta.rowData[6] * part!.alternativePrice -\r\n (tableMeta.rowData[6] *\r\n part!.alternativePrice *\r\n part!.alternativePartDiscount) /\r\n 100) *\r\n 100\r\n ) / 100\r\n ).toFixed(2), this.props.appState.appUser?.organization?.country ?? null) +\r\n ' ' +\r\n (!isNullOrUndefined(this.props.orderDetails.currencyCode) &&\r\n this.props.orderDetails.currencyCode !== ''\r\n ? this.props.orderDetails.currencyCode\r\n : '')\r\n : '';\r\n }\r\n }\r\n }\r\n },\r\n {\r\n name: 'producer',\r\n label: this.translatorService.Tranlate('ORDER_PART_DETAILS_PRODUCER_LABEL', 'Producator'),\r\n options: {\r\n filter: false,\r\n sort: false,\r\n customBodyRender: (value: any, tableMeta: MUIDataTableMeta) => {\r\n return this.displayOtherOrderDetails(value, tableMeta.rowData);\r\n }\r\n }\r\n },\r\n {\r\n name: 'remarks',\r\n label: this.translatorService.Tranlate('ORDER_PART_DETAILS_DELIVERY_TIME_LABEL', 'Livrare'),\r\n options: {\r\n filter: false,\r\n sort: false,\r\n customBodyRender: (value: number, tableMeta: MUIDataTableMeta) => {\r\n return this.displayDeliveryOrderDetails(value, tableMeta.rowData);\r\n }\r\n }\r\n },\r\n {\r\n name: '',\r\n label: this.translatorService.Tranlate('ORDER_PART_DETAILS_STATUS_LABEL', 'Status'),\r\n options: {\r\n customBodyRender: (value: number, tableMeta: MUIDataTableMeta) => {\r\n const partId = tableMeta.rowData[0];\r\n const part = this.state.orderpartsList.find((item) => item.id === partId);\r\n\r\n if (part == null) {\r\n return;\r\n }\r\n return part!.status!.displayName;\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: '',\r\n options: {\r\n viewColumns: false,\r\n filter: false,\r\n setCellHeaderProps: () => ({ align: 'center' }),\r\n setCellProps: () => ({ align: 'center' }),\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n const id = tableMeta.rowData[0];\r\n const part = this.state.orderpartsList.find((item) => item.id === id);\r\n if (part!.isDeleted) {\r\n return (\r\n \r\n {this.translatorService.Tranlate('ORDER_PART_DETAILS_DELETED_LABEL', 'Sters')}\r\n \r\n );\r\n }\r\n\r\n if (this.props.orderDetails.clientId !== this.props.appState.appUser!.organizationId) {\r\n return '';\r\n }\r\n\r\n return this.viewDeletePart() && (\r\n this.deleteOrderPart(e, tableMeta)}\r\n aria-label=\"delete\"\r\n color=\"inherit\"\r\n hidden={!this.props.hasRights}\r\n className=\"text-danger\"\r\n size=\"small\"\r\n >\r\n \r\n \r\n );\r\n }\r\n }\r\n }\r\n ];\r\n\r\n return columns;\r\n };\r\n\r\n closeDialog = async () => {\r\n this.setState({ isChangeOrderStatusDialogOpen: false });\r\n };\r\n\r\n changeOrderStatusClick = async () => {\r\n if (this.props.orderDetails?.orderStatus?.code === OrderStatusCode.REP_VERIFICATA_DE_FURNIZOR) {\r\n const hasError = this.validateOrder();\r\n if (hasError) {\r\n return;\r\n }\r\n }\r\n\r\n this.setState({ isChangeOrderStatusDialogOpen: true });\r\n };\r\n\r\n getNextOrderStatus = (): IReferential | undefined => {\r\n if (this.props.orderDetails?.orderStatus?.code === OrderStatusCode.REP_DRAFT) {\r\n return this.state.statuses.find((item) => item.code === OrderStatusCode.REP_PLASATA);\r\n }\r\n\r\n if (this.props.orderDetails?.orderStatus?.code === OrderStatusCode.FZR_VERIFICARE_LA_FURNIZOR) {\r\n return this.state.statuses.find((item) => item.code === OrderStatusCode.REP_VERIFICATA_DE_FURNIZOR);\r\n }\r\n\r\n if (this.props.orderDetails?.orderStatus?.code === OrderStatusCode.REP_VERIFICATA_DE_FURNIZOR) {\r\n return this.state.rowsExpanded.length > 0 ? this.state.statuses.find((item) => item.code === OrderStatusCode.REP_REINTEROGATED_PARTS) : this.state.statuses.find((item) => item.code === OrderStatusCode.REP_PLASATA);\r\n }\r\n\r\n if (this.props.orderDetails?.orderStatus?.code === OrderStatusCode.REP_REINTEROGATED_PARTS) {\r\n return this.state.statuses.find((item) => item.code === OrderStatusCode.REP_PLASATA);\r\n }\r\n\r\n return undefined;\r\n };\r\n\r\n canChangeNextOrderStatus = () => {\r\n return (\r\n !this.props.hasRights ||\r\n !this.props.orderDetails?.orderStatus?.code?.includes(this.state.userStartCode) ||\r\n !(this.getNextOrderStatus() != undefined)\r\n );\r\n };\r\n\r\n getOrderButton = (order: Order) => {\r\n if (order.orderStatus?.code == OrderStatusCode.REP_VERIFICATA_DE_FURNIZOR.toString() && this.state.hasSupplierRole){\r\n return order.orderStatus?.displayName;\r\n }\r\n\r\n if (order.orderStatus?.code == 'REP_DRAFT') {\r\n return this.props.automatePlaceOrder ? this.translatorService.Tranlate('CASE_CAR_CALCULATIONS_CONFIRM_BUTTON', 'Confirma') \r\n : this.translatorService.Tranlate('ORDER_PART_PLACE_ORDER_LABEL', 'Lanseaza Comanda');\r\n } else {\r\n if (order.orderStatus?.code == OrderStatusCode.FZR_VERIFICARE_LA_FURNIZOR.toString()) {\r\n return this.translatorService.Tranlate('ORDER_DETAILS_SAVE_BUTTON', 'Salveaza');\r\n }\r\n\r\n if (order.orderStatus?.code == OrderStatusCode.REP_VERIFICATA_DE_FURNIZOR.toString()) {\r\n return this.state.rowsExpanded.length > 0 ? this.translatorService.Tranlate('ORDER_DETAILS_SAVE_BUTTON', 'Salveaza') : this.translatorService.Tranlate('ORDER_PART_PLACE_ORDER_LABEL', 'Lanseaza Comanda');\r\n }\r\n\r\n if (order.orderStatus?.code == OrderStatusCode.REP_REINTEROGATED_PARTS.toString()) {\r\n return this.translatorService.Tranlate('ORDER_PART_PLACE_ORDER_LABEL', 'Lanseaza Comanda');\r\n }\r\n\r\n return order.orderStatus?.displayName;\r\n }\r\n };\r\n\r\n renderOrderDetailsSection = () => {\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoadingOrderDetails ? (\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n {this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_VEHICAL_PLATE_NUMBER',\r\n 'Numar inmatriculare'\r\n )}\r\n {''}:\r\n {' '}\r\n {!R.isNil(this.props.caseSettingsState.case) ? this.props.caseSettingsState.case.caseVehicle.plateNumber : this.props.orderDetails.caseVehicle.plateNumber}\r\n
\r\n
\r\n \r\n {this.translatorService.Tranlate('CALCULATION_DETAILS_VIN', 'VIN')}\r\n {''}:\r\n {' '}\r\n {!R.isNil(this.props.caseSettingsState.case) ? this.props.caseSettingsState.case.caseVehicle.vin : this.props.orderDetails.caseVehicle.vin}\r\n
\r\n
\r\n \r\n {this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_VEHICAL_NUMBER_OF_KM',\r\n 'Numar kilometri'\r\n )}\r\n {''}:\r\n {' '}\r\n {!R.isNil(this.props.caseSettingsState.case) ? this.props.caseSettingsState.case.caseVehicle.numberOfKilometers : this.props.orderDetails.caseVehicle.numberOfKilometers}\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n this.props.automatePlaceOrder || this.props.workflowAutomatePlaceOrder ? this.changeOrderStatusSubmit() \r\n : this.changeOrderStatusClick()}\r\n color=\"inherit\"\r\n className=\"text-white bg-success mr-2\"\r\n disabled={this.canChangeNextOrderStatus()}\r\n >\r\n {this.getOrderButton(this.props.orderDetails)}\r\n {/*{this.state.selectedDisplayedStatus}*/}\r\n \r\n
\r\n {this.props.orderDetails.id} \r\n \r\n {!isNullOrUndefined(this.props.orderDetails.client)\r\n ? this.props.orderDetails.client.name\r\n : ''}\r\n \r\n \r\n {!isNullOrUndefined(this.props.orderDetails.supplier)\r\n ? ' - ' + (this.props.orderDetails.supplier.name.toUpperCase() == OwnStockCodeEnum.OWN_STOCK.toString() ? this.translatorService.Tranlate('CALCULATION_DETAILS_OWN_STOCK_HEADER', 'Stoc Propriu') : this.props.orderDetails.supplier.name)\r\n : ''}\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n {!isNullOrUndefined(this.state.partsLocationOrganization)\r\n ? this.translatorService.Tranlate(\r\n 'ORDER_PART_DETAILS_SUPPLIER_LABEL11',\r\n 'Adresa livrare:'\r\n ) +\r\n ' ' +\r\n this.state.partsLocationOrganization.name +\r\n '; ' +\r\n (!isNullOrUndefined(this.state.partsLocationOrganization.address)\r\n ? 'strada: ' + this.state.partsLocationOrganization.address\r\n : '')\r\n : ''}\r\n \r\n
\r\n
\r\n \r\n {!isNullOrUndefined(this.state.costCenter)\r\n ? this.translatorService.Tranlate(\r\n 'CASE_EVENT_COST_CENTER',\r\n 'Centru de cost'\r\n ) + ':' + \r\n ' ' +\r\n this.state.costCenter.name \r\n : ''}\r\n \r\n
\r\n
\r\n \r\n {!isNullOrUndefined(this.state.interventionType)\r\n ? this.translatorService.Tranlate('CASE_EVENT_INTERVENTION_TYPE_LABEL','Tip Interventie') + ':' + \r\n ' ' +\r\n this.state.interventionType.displayName \r\n : ''}\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n {!isNullOrUndefined(this.props.orderDetails.createdByUser)\r\n ? this.props.orderDetails.createdByUser.userName\r\n : ''}{' '}\r\n \r\n \r\n {moment\r\n .utc(this.props.orderDetails.date)\r\n .local()\r\n .format(this.props.appState.longDateFormat)}\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n ) : null}\r\n
\r\n );\r\n };\r\n\r\n interogateAlternativeParts = async (orderPart: OrderPart, index: number) => {\r\n try {\r\n this.interogate(orderPart, index);\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n interogate = async (orderPart: OrderPart, index: number) => {\r\n this.setState(\r\n {\r\n partLoaders: this.state.partLoaders.map((item, itemIndex) =>\r\n itemIndex === index ? true : item\r\n )\r\n },\r\n async () => {\r\n const alternativeParts = await this.caseService.InterogateCaseCalculationsAlternativePartsBySupplier(\r\n orderPart.id,\r\n !R.isNil(this.state.quality) && this.state.quality.code === CarPartQualityTypeCode.OE ? orderPart.guideNumber : orderPart.alternativeGuideNumber ?? \"\", \r\n this.props.additionTariff.value,\r\n this.props.discountTariff.value,\r\n this.props.caseSettingsState?.caseSettings?.workflow.id ?? this.props.orderDetails.case?.caseWorkflow?.workflowId,\r\n this.props.orderDetails.supplierId,\r\n this.props.orderDetails.partsLocationOrganizationId\r\n );\r\n\r\n [...alternativeParts].forEach((item, index) => {\r\n item.id = this.uuidToNumber();\r\n });\r\n\r\n const orderParts = [...this.state.orderpartsList];\r\n orderParts[index].alternativeParts = alternativeParts;\r\n\r\n this.setState({\r\n partLoaders: this.state.partLoaders.map((item, itemIndex) =>\r\n itemIndex === index ? false : item\r\n ),\r\n orderpartsList: orderParts\r\n });\r\n }\r\n );\r\n };\r\n\r\n uuidToNumber = (): number => {\r\n const uniqueId = uuid();\r\n const hexString = uniqueId.replace(/-/g, '');\r\n const numericValue = parseInt(hexString, 16);\r\n //number with 9 characters\r\n return numericValue % 1000000000;\r\n }\r\n\r\n handleAlternativePartChecked = (selected: number, id: number, partFromGroup: number) => {\r\n return selected === id || partFromGroup == id;\r\n };\r\n\r\n handleAlternativePartSelect = (\r\n id: number,\r\n orderPartIndex: number,\r\n originalPartid: number,\r\n alternativePart: CaseCalculationAlternativePart\r\n ) => {\r\n const orderParts = [...this.state.orderpartsList];\r\n\r\n orderParts[orderPartIndex] = {\r\n ...orderParts[orderPartIndex],\r\n alternativePrice: alternativePart.alternativePrice,\r\n alternativePartDiscount: alternativePart.alternativePartDiscount,\r\n alternativeGuideNumber: alternativePart.alternativeGuideNumber,\r\n alternativePartCode: alternativePart.alternativePartCode,\r\n alternativePartQuality: alternativePart.alternativePartQuality,\r\n alternativePartQualityId: alternativePart.alternativePartQualityId,\r\n alternativePartName: alternativePart.name,\r\n alternativePartStockLocation: alternativePart.stockLocation,\r\n alternativePartStockQuantity: alternativePart.availableQuantity,\r\n supplier: alternativePart.supplier,\r\n supplierId: alternativePart.supplierId,\r\n producer: alternativePart.producer,\r\n deliveryTime: alternativePart.deliveryTime,\r\n validityTime: alternativePart.validityTime?.toString() || null,\r\n codeType: alternativePart.codeType?.toString() || null,\r\n type: alternativePart.type?.toString() || null,\r\n orderCode: alternativePart.orderCode?.toString() || null,\r\n locationId: alternativePart.locationId || null,\r\n alternativePartRemarks: alternativePart.remarks,\r\n minQty: alternativePart.minQty,\r\n packing: alternativePart.packing,\r\n bundleItem: alternativePart.bundleItem,\r\n bundleNo: alternativePart.bundleNo,\r\n bundleQuantity: alternativePart.bundleQuantity,\r\n excludeFromOrder: alternativePart.excludeFromOrder,\r\n isChild: alternativePart.isChild,\r\n productId: alternativePart.productId || null,\r\n codEan: alternativePart.codEan?.toString() || null,\r\n alternativePriceWithoutDiscount: alternativePart.alternativePriceWithoutDiscount,\r\n availableQuantity: alternativePart.availableQuantity,\r\n toBeUpdated: true\r\n };\r\n console.log('Selected Part', orderParts[orderPartIndex]);\r\n\r\n const currentPacking = orderParts[orderPartIndex].packing?.split('|')[0];\r\n const secondItemOfPacking = orderParts[orderPartIndex].packing?.split('|')[1];\r\n \r\n const specificAlternativeParts = [...orderParts[orderPartIndex].alternativeParts];\r\n const findAlternativePartGroup = _.filter(specificAlternativeParts, function (object) {\r\n return (\r\n object.bundleNo != null &&\r\n object.bundleNo == orderParts[orderPartIndex].bundleNo &&\r\n object.alternativePartCode !=\r\n orderParts[orderPartIndex].alternativePartCode\r\n );\r\n });\r\n \r\n const idList: any = [];\r\n for (let i = 0; i < findAlternativePartGroup.length; i++) {\r\n idList.push(findAlternativePartGroup[i].id);\r\n }\r\n \r\n specificAlternativeParts.forEach((item) => {\r\n item.selectedAlternativePart =\r\n item.originalPartId === originalPartid\r\n ? item.id === id\r\n ? id\r\n : 9999999999999\r\n : item.selectedAlternativePart;\r\n item.partFromGroup =\r\n item.originalPartId === originalPartid\r\n ? idList.includes(item.id)\r\n ? item.id\r\n : 9999999999999\r\n : item.partFromGroup;\r\n if (\r\n item.originalPartId === originalPartid &&\r\n item.selectedAlternativePart !== 9999999999999\r\n ) {\r\n const initialCaseCalculationOriginalParts = {\r\n ...orderParts[orderPartIndex]\r\n };\r\n orderParts[orderPartIndex].package = [];\r\n if (currentPacking && secondItemOfPacking) {\r\n const currentPackingNumber = parseFloat(currentPacking);\r\n if (\r\n orderParts[orderPartIndex].pieceNr % currentPackingNumber !=\r\n 0 ||\r\n orderParts[orderPartIndex].pieceNr <\r\n orderParts[orderPartIndex].minQty\r\n ) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'MIN_PACKING_ERROR_MSG',\r\n 'Cantitatea comandata trebuie sa fie '\r\n ) +\r\n currentPackingNumber +\r\n this.translatorService.Tranlate('MIN_PACKING_MULTIPLE_ERROR_MSG', ' sau multiplul acesteia!'),\r\n { variant: 'error',\r\n autoHideDuration: 5000 }\r\n );\r\n }\r\n } else if (\r\n orderParts[orderPartIndex].pieceNr <\r\n orderParts[orderPartIndex].minQty\r\n ) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'MIN_PACKING_ERROR_MSG',\r\n 'Cantitatea comandata trebuie sa fie '\r\n ) +\r\n orderParts[orderPartIndex].minQty +\r\n this.translatorService.Tranlate('MIN_PACKING_MULTIPLE_ERROR_MSG', ' sau multiplul acesteia!'),\r\n { variant: 'error',\r\n autoHideDuration: 5000 }\r\n );\r\n }\r\n if (findAlternativePartGroup.length) {\r\n let displayPopup = true;\r\n let alternativePartString = '';\r\n for (let i = 0; i < findAlternativePartGroup.length; i++) {\r\n if (\r\n findAlternativePartGroup[i].alternativePartCode == AlternativeCode.TAXAMEDIU &&\r\n findAlternativePartGroup.length == 1\r\n ) {\r\n displayPopup = false;\r\n }\r\n alternativePartString +=\r\n findAlternativePartGroup[i].name +\r\n '(' +\r\n findAlternativePartGroup[i].alternativePrice +\r\n ' RON)' +\r\n '\\n';\r\n orderParts[orderPartIndex].package.push({\r\n ...initialCaseCalculationOriginalParts,\r\n id: 0,\r\n originalPrice: 0,\r\n alternativePrice: findAlternativePartGroup[i].alternativePrice,\r\n alternativePartDiscount: findAlternativePartGroup[i].alternativePartDiscount,\r\n alternativeGuideNumber: findAlternativePartGroup[i].alternativeGuideNumber,\r\n alternativePartCode: findAlternativePartGroup[i].alternativePartCode,\r\n alternativePartQuality: findAlternativePartGroup[i].alternativePartQuality,\r\n alternativePartQualityId: findAlternativePartGroup[i].alternativePartQualityId,\r\n alternativePartName: findAlternativePartGroup[i].name,\r\n alternativePartStockLocation: findAlternativePartGroup[i].stockLocation,\r\n alternativePartStockQuantity: findAlternativePartGroup[i].availableQuantity,\r\n supplier: findAlternativePartGroup[i].supplier,\r\n supplierId: findAlternativePartGroup[i].supplierId,\r\n producer: findAlternativePartGroup[i].producer,\r\n deliveryTime: findAlternativePartGroup[i].deliveryTime.toString(),\r\n validityTime: findAlternativePartGroup[i].validityTime?.toString() || null,\r\n codeType: findAlternativePartGroup[i].codeType?.toString() || null,\r\n type: findAlternativePartGroup[i].type?.toString() || null,\r\n orderCode: findAlternativePartGroup[i].orderCode?.toString() || null,\r\n locationId: findAlternativePartGroup[i].locationId || null,\r\n alternativePartRemarks: findAlternativePartGroup[i].remarks,\r\n minQty: findAlternativePartGroup[i].minQty,\r\n packing: findAlternativePartGroup[i].packing,\r\n bundleItem: findAlternativePartGroup[i].bundleItem,\r\n bundleNo: findAlternativePartGroup[i].bundleNo,\r\n bundleQuantity: findAlternativePartGroup[i].bundleQuantity,\r\n excludeFromOrder: true,\r\n productId: findAlternativePartGroup[i].productId || null,\r\n codEan: findAlternativePartGroup[i].codEan || null,\r\n alternativePriceWithoutDiscount: findAlternativePartGroup[i].alternativePriceWithoutDiscount,\r\n availableQuantity: findAlternativePartGroup[i].availableQuantity,\r\n hasBeenVerifiedBySupplier: true\r\n });\r\n }\r\n if (displayPopup) {\r\n this.props.enqueueSnackbar(\r\n ' Componente adaugate la comanda: \\n' + alternativePartString,\r\n {\r\n variant: 'error',\r\n style: { whiteSpace: 'pre-line' },\r\n autoHideDuration: 5000 \r\n }\r\n );\r\n }\r\n }\r\n\r\n if (!Number.isInteger(orderParts[orderPartIndex].pieceNr)) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'DECIMAL_ERROR_MSG',\r\n 'Cantitatea comandata trebuie sa fie un numar intreg fara zecimale'\r\n ),\r\n {\r\n variant: 'error',\r\n autoHideDuration: 5000 \r\n }\r\n );\r\n }\r\n\r\n if (\r\n item.availableQuantity !== null &&\r\n item.availableQuantity < orderParts[orderPartIndex].pieceNr\r\n ) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'ORDER_MAX_QUANTITY_ALERT_MSG',\r\n 'Cantitatea disponibila este insuficienta!'\r\n ),\r\n { variant: 'error' }\r\n );\r\n }\r\n }\r\n });\r\n\r\n this.setState({\r\n orderpartsList: orderParts\r\n }, () => {\r\n this.updateAmount();\r\n });\r\n };\r\n\r\n getPackageFromOrderParts = (orderParts: OrderPart[]) => {\r\n const newOrderParts = [];\r\n for (let i = 0; i < orderParts.length; i++) {\r\n if (orderParts[i].package && orderParts[i].package.length) {\r\n for (let j = 0; j < orderParts[i].package.length; j++) {\r\n newOrderParts.push(orderParts[i].package[j]);\r\n }\r\n }\r\n }\r\n return newOrderParts;\r\n };\r\n\r\n\r\n clearSelectedAlternativeParts = async (originalPartId: number, index: number) => {\r\n const orderPartsCopy = [...this.state.orderpartsList];\r\n let alternativePartsCopy = [...this.state.orderpartsList[index].alternativeParts];\r\n alternativePartsCopy = alternativePartsCopy.map((item) => {\r\n item.selectedAlternativePart =\r\n item.originalPartId === originalPartId ? 9999999999999 : item.selectedAlternativePart;\r\n item.partFromGroup =\r\n item.originalPartId === originalPartId ? 9999999999999 : item.partFromGroup;\r\n return item;\r\n });\r\n\r\n orderPartsCopy[index] = {\r\n ...orderPartsCopy[index],\r\n alternativeParts: alternativePartsCopy\r\n }\r\n\r\n this.setState({\r\n orderpartsList: orderPartsCopy\r\n });\r\n };\r\n\r\n renderExpandedRow = (rowData: any, rowMeta: any) => {\r\n const index = rowMeta.dataIndex;\r\n const orderPart = this.state.orderpartsList[index];\r\n const alternativeParts = orderPart.alternativeParts ?? [];\r\n // Calculate the number of columns in the table\r\n const columnsCount = this.getPartsByColumns().length + 2;\r\n \r\n return (\r\n \r\n \r\n \r\n {\r\n await this.interogateAlternativeParts(\r\n orderPart,\r\n index\r\n );\r\n }}\r\n className=\"float-right mb-3\"\r\n variant=\"contained\"\r\n color=\"primary\"\r\n style={{\r\n backgroundColor: '#5383ff',\r\n padding: '6px 16px',\r\n fontSize: '14px',\r\n minWidth: '64px',\r\n boxSizing: 'border-box',\r\n transition: 'background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, border 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms',\r\n fontFamily: '\"Roboto\", \"Helvetica\", \"Arial\", sans-serif',\r\n fontWeight: 'normal',\r\n lineHeight: '1.75',\r\n borderRadius: '0.5rem',\r\n letterSpacing: '0.02857em',\r\n textTransform: 'none'\r\n }} \r\n >\r\n {this.translatorService.Tranlate('INTEROGATE', 'Interogheaza')}\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n {this.state.partLoaders[index] ? null : (\r\n
\r\n \r\n \r\n \r\n {/* Table headers */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {/* Display data rows */}\r\n {alternativeParts.length > 0 ? (\r\n alternativeParts.map((alternativePart : CaseCalculationAlternativePart, alternativePartindex) => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n })\r\n ) : (\r\n \r\n \r\n \r\n )}\r\n \r\n
\r\n 0 &&\r\n alternativeParts.some(\r\n (el) => el.selectedAlternativePart !== 9999999999999\r\n )\r\n ? this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_ALTERNATIVE_CALCULATION_DETAILS_CLEAR_LABEL',\r\n 'Goleste'\r\n )\r\n : ''\r\n }\r\n >\r\n
\r\n 0 &&\r\n alternativeParts.some(\r\n (el) => el.selectedAlternativePart !== 9999999999999\r\n )\r\n ? false\r\n : true\r\n }\r\n onClick={(e) =>\r\n this.clearSelectedAlternativeParts(orderPart!.id, index)\r\n }\r\n className=\"ml-1 min min-w-auto\"\r\n size=\"small\"\r\n variant=\"contained\"\r\n color=\"primary\"\r\n >\r\n \r\n \r\n \r\n \r\n
\r\n \r\n
{this.translatorService.Tranlate('CASE_CALCULATION_ALTERNATIVE_CALCULATION_DETAILS_CODE_LABEL', 'Cod')}{this.translatorService.Tranlate('ORDER_PART_DETAILS_NAME_LABEL', 'Denumire')}{this.translatorService.Tranlate('CASE_CALCULATION_ALTERNATIVE_CALCULATION_DETAILS_PRICE_LABEL', 'Pret')}{this.translatorService.Tranlate('CASE_CALCULATION_ALTERNATIVE_CALCULATION_DETAILS_QUALITY_LABEL', 'Calitate')}{this.translatorService.Tranlate('CASE_CALCULATION_ALTERNATIVE_CALCULATION_DETAILS_DELIVERY_LABEL', 'Livrare')}{this.translatorService.Tranlate('CASE_CALCULATION_ALTERNATIVE_CALCULATION_DETAILS_OWNER_LABEL_ACRONYM', 'Producator')}{this.translatorService.Tranlate('CASE_CALCULATION_ALTERNATIVE_CALCULATION_DETAILS_SUPLIER_LABEL', 'Furnizor')}{this.translatorService.Tranlate('CASE_CALCULATION_ALTERNATIVE_CALCULATION_DETAILS_QUANTITY_INFO_LABEL', 'Cant.')}{this.translatorService.Tranlate('CASE_CALCULATION_ALTERNATIVE_CALCULATION_DETAILS_STOCK_LOCATION_LABEL', 'Locatie')}
\r\n \r\n this.handleAlternativePartSelect(\r\n alternativePart.id,\r\n index,\r\n orderPart.id,\r\n alternativePart\r\n )\r\n }\r\n disabled={\r\n alternativePart.isChild\r\n }\r\n value={alternativePart.id}\r\n id={alternativePart.id.toString()}\r\n name={orderPart.id.toString()}\r\n color=\"primary\" \r\n />\r\n {alternativePart.alternativeGuideNumber}\r\n {!R.isNil(alternativePart.remarks) && alternativePart.remarks !== '' ? (\r\n \r\n
\r\n {this.translatorService.Tranlate('CASE_CALCULATION_ALTERNATIVE_CALCULATION_DETAILS_REMARKS_LABEL', 'Observatii')}\r\n
\r\n
{alternativePart.remarks}
\r\n \r\n }>\r\n
{alternativePart.name}
\r\n
\r\n ) : (\r\n
{alternativePart.name}
}\r\n >\r\n
{alternativePart.name}
\r\n \r\n )}\r\n
\r\n {R.isNil(alternativePart!.alternativePartDiscount)\r\n ? Utils.countryNumberFormat(\r\n (Math.round(alternativePart.alternativePrice * 100) / 100).toFixed(2),\r\n this.props.appState.appUser?.organization?.country ?? null\r\n )\r\n : Utils.countryNumberFormat(\r\n (\r\n Math.round(\r\n alternativePart.alternativePrice * (1 - alternativePart!.alternativePartDiscount / 100) * 100\r\n ) / 100\r\n ).toFixed(2),\r\n this.props.appState.appUser?.organization?.country ?? null\r\n )}\r\n {R.isNil(alternativePart.alternativePartQuality) ? '' : alternativePart.alternativePartQuality.code}\r\n \r\n {alternativePart.deliveryTime.toString().includes(\"in cazul in care piesa se afla in stocul extern\") ? (\r\n <>\r\n {alternativePart.deliveryTime.toString().split(\"in cazul in care piesa se afla in stocul extern\")[0]}\r\n in cazul in care piesa se afla in stocul extern\r\n \r\n ) : (\r\n alternativePart.deliveryTime\r\n )}\r\n \r\n }\r\n >\r\n
{alternativePart.deliveryTime.toString().includes(\"in cazul in care piesa se afla in stocul extern\") ? (\r\n <>\r\n {alternativePart.deliveryTime.toString().split(\"in cazul in care piesa se afla in stocul extern\")[0]}\r\n in cazul in care piesa se afla in stocul extern\r\n \r\n ) : (\r\n alternativePart.deliveryTime\r\n )}
\r\n \r\n
{alternativePart.producer}{!R.isNil(alternativePart.supplier) ? alternativePart.supplier!.name : ''}\r\n {alternativePart.quantityAdditionalInfo && alternativePart.availableQuantity ? (\r\n {alternativePart.quantityAdditionalInfo}}>\r\n
\r\n {alternativePart.availableQuantity}\r\n \r\n
\r\n
\r\n ) : (\r\n (alternativePart.supplierName?.toUpperCase() === SupplierCode.LKQ.toString().toUpperCase()\r\n ? (\r\n {isNaN(alternativePart.availableQuantity) ? null : alternativePart.availableQuantity > 5 ? '5+' : alternativePart.availableQuantity}\r\n )\r\n : {alternativePart.availableQuantity})\r\n )}\r\n
\r\n {alternativePart.stockLocation ? (\r\n \r\n
\r\n {this.translatorService.Tranlate(\r\n 'ORDER_PART_DETAILS_LOCATION_LABEL',\r\n 'Locatie'\r\n ) +\r\n ': ' +\r\n alternativePart.stockLocation}\r\n
\r\n \r\n }\r\n >\r\n
\r\n \r\n {\r\n alternativePart.stockLocation.split(\r\n '\\n'\r\n )[0]\r\n }\r\n \r\n \r\n
\r\n \r\n ) : (\r\n alternativePart.stockLocation\r\n )}\r\n\r\n {!R.isNil(alternativePart.additionalInfo) && alternativePart.additionalInfo !== '' &&\r\n AdditionalInfoCode.PRODUS_NU_POATE_FI_RETURNAT ==\r\n alternativePart.additionalInfo ? (\r\n \r\n {alternativePart.additionalInfo}\r\n

\r\n ) : (\r\n ''\r\n )}\r\n
\r\n \r\n {this.translatorService.Tranlate(\r\n 'NO_RECORDS_TO_DISPLAY',\r\n 'Nu exista inregistrari de afisat'\r\n )}\r\n \r\n
\r\n
\r\n )}\r\n
\r\n
\r\n \r\n \r\n );\r\n };\r\n \r\n updateAmount = () => {\r\n const partList = new OrderParts(\r\n this.state.orderpartsList.concat(this.getPackageFromOrderParts(this.state.orderpartsList)),\r\n parseFloat(this.state.TVA)\r\n );\r\n \r\n const order = { ...this.props.orderDetails };\r\n order.amountWithoutTVA = partList.totalWithoutVAT();\r\n order.amountTVA = partList.totalVAT();\r\n order.amount = partList.total();\r\n\r\n this.props.onOrderChange(order);\r\n };\r\n\r\n getMuiTheme = () => createMuiTheme({\r\n overrides: {\r\n MuiTableCell: {\r\n paddingCheckbox: {\r\n padding: '0px'\r\n },\r\n },\r\n MUIDataTableSelectCell: {\r\n expandDisabled: {\r\n visibility: 'hidden',\r\n },\r\n }\r\n } as any\r\n });\r\n\r\n \r\n interogateAll = async () => {\r\n try {\r\n const parts = [...this.state.orderpartsList];\r\n for (const cp of parts) {\r\n const index = parts.indexOf(cp);\r\n if (cp.hasBeenVerifiedBySupplier) {\r\n await this.interogate(cp, index);\r\n }\r\n }\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n renderInterogateAllSection = () => {\r\n return (\r\n this.state.rowsExpanded.length > 0 ? (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoadingOrderDetails ? (\r\n \r\n \r\n \r\n
\r\n {\r\n this.interogateAll();\r\n }}\r\n >\r\n {this.translatorService.Tranlate('INTEROGATE', 'Interogheaza')}\r\n \r\n
\r\n
\r\n
\r\n
\r\n ) : null}\r\n
\r\n ) : null\r\n );\r\n } \r\n\r\n renderOrderPartsSection = () => {\r\n const options = {\r\n filter: false,\r\n sort: false,\r\n search: false,\r\n pagination: false,\r\n viewColumns: false,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n elevation: 0,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n // Folosește rowClassName pentru a aplica o clasă pe rânduri\r\n rowClassName: (rowData: any, rowIndex: number) => {\r\n const row = this.state.orderpartsList[rowIndex];\r\n // Aplică o clasă diferită pentru fiecare rând, în funcție de `hasBeenVerifiedBySupplier`\r\n return row && row.hasBeenVerifiedBySupplier ? 'verified-row' : 'unverified-row';\r\n },\r\n expandableRowsHeader: false,\r\n expandableRows: this.state.rowsExpanded.length > 0 ? true : false,\r\n // Prevent expand icon from rendering for rows that are not verified\r\n isRowExpandable: (dataIndex: number, expandedRow: any) => {\r\n const row = this.state.orderpartsList[dataIndex];\r\n return row && row.hasBeenVerifiedBySupplier; // Only allow expansion if verified\r\n },\r\n renderExpandableRow: (rowData: any, rowMeta: any) => {\r\n const row = this.state.orderpartsList[rowMeta.dataIndex];\r\n // Only render expandable content if the row is verified by the supplier\r\n if (row && row.hasBeenVerifiedBySupplier) {\r\n return this.renderExpandedRow(rowData, rowMeta);\r\n }\r\n return null; // No expandable content for unverified rows\r\n },\r\n rowsExpanded: this.state.rowsExpanded\r\n };\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoadingOrderDetails ? (\r\n \r\n \r\n \r\n \r\n \r\n ) : null}\r\n
\r\n );\r\n }; \r\n\r\n checkIfOrderPartsChangedDuringOrderPlacement = async () => {\r\n const orderDatePlacement = new Date();\r\n let validityTimeOkay = true;\r\n const caseCalculationPartsThatChangedDuringPlacingOrder: CaseCalculationSupplierAlternativePart[] =\r\n [];\r\n\r\n this.state.orderpartsList.forEach((orderPart) => {\r\n orderPart.prevVal = null;\r\n });\r\n this.setState({\r\n caseCalculationPartsThatChangedDuringPlacingOrder: []\r\n });\r\n\r\n //Detect if the order part list was changed during the order placemenent\r\n (await Promise.all(\r\n this.state.orderpartsList.map(async (product) => {\r\n if (!product.isDeleted) {\r\n const freshOrderedParts =\r\n await this.caseService.InterogateCaseCalculationsAlternativePartsBySupplier(\r\n product.id,\r\n product.guideNumber,\r\n this.props.additionTariff.value,\r\n this.props.discountTariff.value,\r\n this.props.caseSettingsState?.caseSettings?.workflow.id ?? this.props.orderDetails.case?.caseWorkflow?.workflowId, this.props.orderDetails.supplierId,\r\n this.props.orderDetails.partsLocationOrganizationId\r\n );\r\n const changedOrderedProducts = freshOrderedParts.filter(\r\n (part) =>\r\n part.supplierId == product.supplierId &&\r\n part.producer == product.producer &&\r\n part.alternativeGuideNumber == product.alternativeGuideNumber &&\r\n part.name == product.alternativePartName &&\r\n part.alternativePartCode == product.alternativePartCode &&\r\n part.locationId == product.locationId\r\n );\r\n console.log('changedOrderedProducts', changedOrderedProducts);\r\n if (changedOrderedProducts.length == 1) {\r\n const changedOrderedProduct = changedOrderedProducts[0];\r\n if (\r\n changedOrderedProduct.alternativePriceWithoutDiscount !== product.alternativePrice ||\r\n changedOrderedProduct.deliveryTime !== product.deliveryTime ||\r\n changedOrderedProduct.validityTime !== product.validityTime ||\r\n changedOrderedProduct.type != product.type ||\r\n changedOrderedProduct.orderCode != product.orderCode\r\n ) {\r\n caseCalculationPartsThatChangedDuringPlacingOrder.push({\r\n prevVal: _.cloneDeep(product),\r\n newVal: _.cloneDeep(changedOrderedProduct)\r\n });\r\n product.prevVal = {\r\n ...product\r\n };\r\n if (product.alternativePrice != changedOrderedProduct.alternativePriceWithoutDiscount) {\r\n product.alternativePrice = changedOrderedProduct.alternativePriceWithoutDiscount;\r\n }\r\n if (product.deliveryTime != changedOrderedProduct.deliveryTime) {\r\n product.deliveryTime = changedOrderedProduct.deliveryTime;\r\n }\r\n if (product.type != changedOrderedProduct.type) {\r\n product.type = changedOrderedProduct.type;\r\n }\r\n if (product.orderCode != changedOrderedProduct.orderCode) {\r\n product.orderCode = changedOrderedProduct.orderCode;\r\n }\r\n if (product.validityTime != changedOrderedProduct.validityTime) {\r\n product.validityTime = changedOrderedProduct.validityTime;\r\n }\r\n }\r\n if (product.validityTime) {\r\n if (new Date(orderDatePlacement) > new Date(product.validityTime)) {\r\n validityTimeOkay = false;\r\n this.props.enqueueSnackbar(\r\n 'Codul: ' +\r\n changedOrderedProduct.alternativeGuideNumber +\r\n ' producator: ' +\r\n changedOrderedProduct.producer +\r\n ' furnizor: ' +\r\n this.props.orderDetails.supplier?.name +\r\n ' nu mai este valid. \\n' +\r\n 'A fost valid pana la : ' +\r\n moment\r\n .utc(changedOrderedProduct.validityTime)\r\n .local()\r\n .format(this.props.appState.longDateFormat),\r\n {\r\n variant: 'error'\r\n }\r\n );\r\n }\r\n }\r\n }\r\n }\r\n })\r\n )) || [];\r\n\r\n console.log(\r\n 'caseCalculationPartsThatChangedDuringPlacingOrder',\r\n caseCalculationPartsThatChangedDuringPlacingOrder\r\n );\r\n\r\n if (!validityTimeOkay) {\r\n return true;\r\n }\r\n\r\n if (caseCalculationPartsThatChangedDuringPlacingOrder.length > 0) {\r\n this.setState({\r\n caseCalculationPartsThatChangedDuringPlacingOrder:\r\n caseCalculationPartsThatChangedDuringPlacingOrder,\r\n isChangeOrderStatusDialogOpen: false,\r\n isLoadingOrderDetails: false\r\n });\r\n\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('ERROR_MSG_SMTH', 'Produsele comandate au fost modificate'),\r\n {\r\n variant: 'error'\r\n }\r\n );\r\n\r\n //Update the order parts\r\n await Promise.all([\r\n caseCalculationPartsThatChangedDuringPlacingOrder.map(async (row) => {\r\n const part = row.newVal;\r\n const orderedPart = this.state.orderpartsList.filter(\r\n (product) =>\r\n part!.supplierId == product.supplierId &&\r\n part!.producer == product.producer &&\r\n part!.alternativeGuideNumber == product.alternativeGuideNumber &&\r\n part!.name == product.alternativePartName &&\r\n part.alternativePartCode == product.alternativePartCode\r\n )[0];\r\n await this.orderService.UpdateOrderPart(orderedPart!);\r\n })\r\n ]);\r\n\r\n const order = { ...this.props.orderDetails };\r\n const newOrder = await this.orderService.UpdateOrderAmounts({\r\n orderId: this.props.orderDetails.id,\r\n } as UpdateOrderAmountsRequestDto);\r\n\r\n order.amountWithoutTVA = newOrder!.amountWithoutTVA;\r\n order.amountTVA = newOrder!.amountTVA;\r\n order.amount = newOrder!.amount;\r\n\r\n this.props.onOrderChange(order);\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n };\r\n\r\n updateSupplierOrder = async () => {\r\n try {\r\n const orderStatusHistory = [...this.state.orderStatusHistory];\r\n\r\n this.setState({ isLoadingOrderDetails: true, executing: true });\r\n\r\n const orderedPartsChanged = [...this.state.orderpartsList]\r\n .filter(orderPart => orderPart.hasBeenVerifiedBySupplier) \r\n .map(orderPart => ({\r\n ...orderPart,\r\n alternativePartQuality: null,\r\n carPartCategory: null,\r\n supplier: null,\r\n status: null\r\n }));\r\n\r\n if (orderedPartsChanged.length > 0) {\r\n const updateOrderInfoRequest = {\r\n orderId: this.props.orderDetails.id,\r\n calculationId: this.state.firstCasePartToBeOrdered?.caseCalculationHistoryId ?? 0,\r\n parts: orderedPartsChanged\r\n } as UpdateOrderInfoRequest;\r\n\r\n await this.caseService.UpdateOrderInfo(updateOrderInfoRequest);\r\n\r\n const vin = !R.isNil(this.props.caseSettingsState.case) ? this.props.caseSettingsState.case.caseVehicle.vin : this.props.orderDetails.caseVehicle.vin;\r\n const make = this.state.model ? this.state.model.brand : \"\";\r\n const model = this.state.model ? this.state.model.description : \"\";\r\n await Promise.all([\r\n orderedPartsChanged.map(async (orderPart) => {\r\n await this.caseService.AddNonStockPart({\r\n vin: vin,\r\n make: make,\r\n model: model,\r\n oeCode: orderPart.guideNumberBackup,\r\n oeSupplierCode: !R.isNil(this.state.quality) && this.state.quality.code === CarPartQualityTypeCode.OE ? orderPart.guideNumber : orderPart.alternativeGuideNumber ?? \"\",\r\n supplierId: this.props.orderDetails.supplierId\r\n } as NonStockPart);\r\n })\r\n ]);\r\n }\r\n\r\n const nextOrderStatus = this.getNextOrderStatus();\r\n const request = {\r\n statusId: nextOrderStatus?.id,\r\n comment: this.state.changeOrderStatusComment,\r\n orderId: this.props.orderDetails.id,\r\n attachments: this.state.attachments,\r\n partsLocationOrganizationId: this.props.orderDetails.partsLocationOrganizationId,\r\n workflowId: this.props.caseSettingsState?.caseSettings?.workflow.id ?? this.props.orderDetails.case?.caseWorkflow?.workflowId,\r\n partsOrganizationId: this.props.orderDetails.partsOrganizationId\r\n } as OrderStatusChangeRequestDto;\r\n await this.orderService.ChangeOrderStatus(request);\r\n\r\n const statusHistory = this.state.orderStatusHistory.find(x => x.orderStatus?.code == OrderStatusCode.FZR_VERIFICARE_LA_FURNIZOR);\r\n const notificationRequest = {\r\n orderId: this.props.orderDetails.id,\r\n orderComment: this.state.changeOrderStatusComment,\r\n caseId: this.props.orderDetails.caseId,\r\n template: OrderNotificationTemplateEnum.VERIFIED_BY_SUPPLIER,\r\n email: statusHistory ? statusHistory.createdByUser?.email ?? \"\" : \"\"\r\n }\r\n await this.caseService.SendVerifiedBySupplierOrderNotification(notificationRequest);\r\n\r\n const order = { ...this.props.orderDetails };\r\n order.orderStatus = nextOrderStatus!;\r\n order.orderStatusId = nextOrderStatus!.id;\r\n\r\n this.props.onOrderChange(order);\r\n\r\n orderStatusHistory.unshift({\r\n id: 1,\r\n orderId: this.props.orderDetails.id,\r\n orderStatusId: this.props.orderDetails.orderStatusId,\r\n orderStatus: nextOrderStatus!,\r\n date: new Date(),\r\n createdBy: this.props.appState.appUser!.id!,\r\n createdByUser: this.props.appState.appUser,\r\n comment: this.state.changeOrderStatusComment,\r\n attachments: this.state.attachments.length > 0 ? this.state.attachments : null\r\n });\r\n\r\n this.setState({\r\n orderStatusHistory: orderStatusHistory,\r\n isLoadingOrderDetails: false, \r\n isChangeOrderStatusDialogOpen: false, \r\n executing: false \r\n });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (ex) {\r\n this.setState({ \r\n isLoadingOrderDetails: false,\r\n executing: false \r\n });\r\n console.log('Exception:' + ex);\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n validateOrder = () : boolean => {\r\n const nonInterogatedParts = [...this.state.orderpartsList]\r\n .filter(orderPart => orderPart.hasBeenVerifiedBySupplier && !orderPart.supplierId);\r\n if (nonInterogatedParts.length > 0) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('ORDER_PLEASE_SELECT_PART', 'Selectati piese pentru urmatoarele id-uri: ')\r\n + nonInterogatedParts.map(x => x.id).join(', '),\r\n {\r\n variant: 'error'\r\n }\r\n );\r\n return true;\r\n }\r\n\r\n const orderParts = [...this.state.orderpartsList.filter(x => x.hasBeenVerifiedBySupplier)];\r\n let validateError = 0;\r\n let errorString = '';\r\n let decimalError = false;\r\n orderParts.map((orderPart) => {\r\n [...orderPart.alternativeParts].map((item) => {\r\n if (item.originalPartId === orderPart.id) {\r\n if (item.selectedAlternativePart !== 9999999999999) {\r\n const filtercalculationParts = _.filter(\r\n [...orderParts],\r\n function (orderPartObject) {\r\n return (\r\n orderPartObject.alternativeGuideNumber == orderPart.alternativeGuideNumber &&\r\n orderPartObject.alternativePartCode == orderPart.alternativePartCode &&\r\n orderPartObject.supplierId == orderPart.supplierId\r\n );\r\n }\r\n );\r\n \r\n const currentPacking = item.packing?.split('|')[0];\r\n const secondItemOfPacking = item.packing?.split('|')[1];\r\n if (currentPacking && secondItemOfPacking) {\r\n const currentPackingNumber = parseFloat(currentPacking);\r\n if (filtercalculationParts && filtercalculationParts.length) {\r\n const pieceNr = _.sumBy(filtercalculationParts, 'pieceNr');\r\n console.log('filtercalculationParts');\r\n console.log(filtercalculationParts);\r\n console.log(pieceNr);\r\n if (pieceNr % currentPackingNumber == 0) {\r\n return;\r\n }\r\n }\r\n if (\r\n orderPart.pieceNr % currentPackingNumber != 0 ||\r\n orderPart.pieceNr < orderPart.minQty\r\n ) {\r\n errorString +=\r\n this.translatorService.Tranlate(\r\n 'MIN_PACKING_ERROR_MSG',\r\n 'Cantitatea comandata trebuie sa fie '\r\n ) +\r\n currentPackingNumber +\r\n this.translatorService.Tranlate('MIN_PACKING_MULTIPLE_ERROR_MSG', ' sau multiplul acesteia!') + ' \\n';\r\n this.validateOrigPartUnitsAdd(orderPart.id);\r\n return;\r\n }\r\n } else {\r\n if (orderPart.pieceNr < orderPart.minQty) {\r\n errorString +=\r\n this.translatorService.Tranlate(\r\n 'MIN_PACKING_ERROR_MSG',\r\n 'Cantitatea comandata trebuie sa fie '\r\n ) +\r\n orderPart.minQty +\r\n this.translatorService.Tranlate('MIN_PACKING_MULTIPLE_ERROR_MSG', ' sau multiplul acesteia!') + ' \\n';\r\n this.validateOrigPartUnitsAdd(orderPart.id);\r\n return;\r\n }\r\n }\r\n if (!Number.isInteger(orderPart.pieceNr)) {\r\n decimalError = true;\r\n this.validateOrigPartUnitsAdd(orderPart.id);\r\n return;\r\n }\r\n if (!R.isNil(item.availableQuantity) && item.availableQuantity < orderPart.pieceNr) {\r\n validateError++;\r\n this.validateOrigPartUnitsAdd(orderPart.id);\r\n } else {\r\n this.validateOrigPartUnitsRemove(orderPart.id);\r\n } \r\n \r\n }\r\n }\r\n });\r\n });\r\n\r\n if (errorString) {\r\n this.props.enqueueSnackbar(errorString, {\r\n variant: 'error',\r\n style: { whiteSpace: 'pre-line' }\r\n });\r\n return true;\r\n }\r\n\r\n if (decimalError) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'DECIMAL_ERROR_MSG',\r\n 'Cantitatea comandata trebuie sa fie un numar intreg fara zecimale'\r\n ),\r\n {\r\n variant: 'error'\r\n }\r\n );\r\n return true;\r\n }\r\n\r\n if (validateError > 0) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n return true;\r\n }\r\n\r\n\r\n return false;\r\n };\r\n\r\n updateOrderAfterInterogation = async () => {\r\n try {\r\n console.log('updateOrderAfterInterogation');\r\n const orderStatusHistory = [...this.state.orderStatusHistory];\r\n\r\n this.setState({ isLoadingOrderDetails: true, executing: true });\r\n\r\n const orderParts = this.state.orderpartsList.concat(this.getPackageFromOrderParts(this.state.orderpartsList));\r\n const orderedPartsChanged = [...orderParts]\r\n .filter(orderPart => orderPart.hasBeenVerifiedBySupplier) \r\n .map(orderPart => ({\r\n ...orderPart,\r\n alternativePartQuality: null,\r\n carPartCategory: null,\r\n supplier: null,\r\n status: null\r\n }));\r\n\r\n if (orderedPartsChanged.length > 0) {\r\n const updateOrderInfoRequest = {\r\n orderId: this.props.orderDetails.id,\r\n calculationId: this.state.firstCasePartToBeOrdered?.caseCalculationHistoryId ?? 0,\r\n parts: orderedPartsChanged\r\n } as UpdateOrderInfoRequest;\r\n await this.caseService.UpdateOrderInfo(updateOrderInfoRequest);\r\n }\r\n\r\n const nextOrderStatus = this.getNextOrderStatus();\r\n const request = {\r\n statusId: nextOrderStatus?.id,\r\n comment: this.state.changeOrderStatusComment,\r\n orderId: this.props.orderDetails.id,\r\n attachments: this.state.attachments,\r\n partsLocationOrganizationId: this.props.orderDetails.partsLocationOrganizationId,\r\n workflowId: this.props.caseSettingsState?.caseSettings?.workflow.id ?? this.props.orderDetails.case?.caseWorkflow?.workflowId,\r\n partsOrganizationId: this.props.orderDetails.partsOrganizationId\r\n } as OrderStatusChangeRequestDto;\r\n await this.orderService.ChangeOrderStatus(request);\r\n\r\n const order = await this.orderService.GetOrder(this.props.orderDetails.id, true);\r\n this.props.onOrderChange(order);\r\n\r\n orderStatusHistory.unshift({\r\n id: 1,\r\n orderId: this.props.orderDetails.id,\r\n orderStatusId: this.props.orderDetails.orderStatusId,\r\n orderStatus: nextOrderStatus!,\r\n date: new Date(),\r\n createdBy: this.props.appState.appUser!.id!,\r\n createdByUser: this.props.appState.appUser,\r\n comment: this.state.changeOrderStatusComment,\r\n attachments: this.state.attachments.length > 0 ? this.state.attachments : null\r\n });\r\n\r\n this.setState({\r\n orderStatusHistory: orderStatusHistory,\r\n isLoadingOrderDetails: false, \r\n isChangeOrderStatusDialogOpen: false, \r\n executing: false,\r\n rowsExpanded: [],\r\n orderpartsList: order.orderParts!.map((item) => {\r\n return { ...item } as OrderPartDTO;\r\n })\r\n });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (ex) {\r\n this.setState({ \r\n isLoadingOrderDetails: false,\r\n executing: false \r\n });\r\n console.log('Exception:' + ex);\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n changeOrderStatusSubmit = async () => {\r\n if (this.props.orderDetails?.orderStatus?.code === OrderStatusCode.FZR_VERIFICARE_LA_FURNIZOR) {\r\n await this.updateSupplierOrder();\r\n return;\r\n }\r\n if (this.props.orderDetails?.orderStatus?.code === OrderStatusCode.REP_VERIFICATA_DE_FURNIZOR && this.state.rowsExpanded.length > 0) {\r\n const hasError = this.validateOrder();\r\n if (hasError) {\r\n return;\r\n }\r\n await this.updateOrderAfterInterogation();\r\n return;\r\n }\r\n\r\n if (this.props.orderDetails.interogatePartner && !this.props.orderDetails.partsLocationOrganizationId) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ORDER_WITHOUT_DELIVERY_ADRESS_MSG', 'Comanda nu poata fi lansata pentru ca nu are adresa de livrare!'), {\r\n variant: 'warning'\r\n });\r\n return;\r\n }\r\n \r\n try {\r\n this.setState({ isLoadingOrderDetails: true, executing: true });\r\n const orderedPartsChanged = await this.checkIfOrderPartsChangedDuringOrderPlacement();\r\n console.log(\r\n 'Changed Order Part List ',\r\n this.state.caseCalculationPartsThatChangedDuringPlacingOrder\r\n );\r\n if (orderedPartsChanged) {\r\n this.setState({ executing: false });\r\n return;\r\n }\r\n const nextOrderStatus = this.getNextOrderStatus();\r\n const request = {\r\n statusId: nextOrderStatus?.id,\r\n comment: this.state.changeOrderStatusComment,\r\n orderId: this.props.orderDetails.id,\r\n attachments: this.state.attachments,\r\n partsLocationOrganizationId: this.props.orderDetails.partsLocationOrganizationId,\r\n workflowId: this.props.caseSettingsState?.caseSettings?.workflow.id ?? this.props.orderDetails.case?.caseWorkflow?.workflowId,\r\n partsOrganizationId: this.props.appState.appUser?.organizationId\r\n } as OrderStatusChangeRequestDto;\r\n\r\n await this.orderService.ChangeOrderStatus(request);\r\n\r\n await Promise.all([\r\n this.state.orderpartsList.map(async (product) => {\r\n const orderedPartStatus = this.state.orderPartStatus.find(\r\n (item) => item.code === OrderPartStatus.PROCESSING\r\n )!;\r\n if (!product.isDeleted) {\r\n product.status = orderedPartStatus;\r\n product.statusId = orderedPartStatus.id;\r\n await this.orderService.UpdateOrderPart(product!);\r\n }\r\n })\r\n ]);\r\n\r\n const orderStatusHistory = [...this.state.orderStatusHistory];\r\n\r\n const order = { ...this.props.orderDetails };\r\n order.orderStatus = nextOrderStatus!;\r\n order.orderStatusId = nextOrderStatus!.id;\r\n\r\n this.props.onOrderChange(order);\r\n\r\n orderStatusHistory.unshift({\r\n id: 1,\r\n orderId: this.props.orderDetails.id,\r\n orderStatusId: this.props.orderDetails.orderStatusId,\r\n orderStatus: nextOrderStatus!,\r\n date: new Date(),\r\n createdBy: this.props.appState.appUser!.id!,\r\n createdByUser: this.props.appState.appUser,\r\n comment: this.state.changeOrderStatusComment,\r\n attachments: this.state.attachments.length > 0 ? this.state.attachments : null\r\n });\r\n\r\n if (\r\n this.props.orderDetails.supplier?.name == SupplierCode.MATEROM ||\r\n this.props.orderDetails.supplier?.name == SupplierCode.ADTOTAL ||\r\n this.props.orderDetails.supplier?.name == SupplierCode.CONEX ||\r\n this.props.orderDetails.supplier?.name == SupplierCode.EUROEST ||\r\n this.props.orderDetails.supplier?.name == SupplierCode.LKQ || \r\n this.props.orderDetails.supplier?.name == SupplierCode.NESTE\r\n ) {\r\n const order = await this.orderService.GetOrder(this.props.orderDetails.id, false);\r\n if (order.supplierOrderNumber) {\r\n const proceedOrderStatus = this.state.orderStatuses.find(\r\n (item) => item.code === OrderStatusCode.FZR_COMANDA_CONFIRMATA\r\n );\r\n const request = {\r\n statusId: proceedOrderStatus?.id,\r\n comment: '',\r\n orderId: this.props.orderDetails.id,\r\n attachments: [],\r\n partsLocationOrganizationId: this.props.orderDetails.partsLocationOrganizationId,\r\n workflowId: this.props.caseSettingsState?.caseSettings?.workflow.id ?? this.props.orderDetails.case?.caseWorkflow?.workflowId,\r\n partsOrganizationId: this.props.appState.appUser?.organizationId\r\n } as OrderStatusChangeRequestDto;\r\n\r\n await this.orderService.ChangeOrderStatus(request);\r\n\r\n await Promise.all([\r\n this.state.orderpartsList.map(async (product) => {\r\n const orderedPartStatus = this.state.orderPartStatus.find(\r\n (item) => item.code === OrderPartStatus.PROCESSED\r\n )!;\r\n if (!product.isDeleted) {\r\n product.status = orderedPartStatus;\r\n product.statusId = orderedPartStatus.id;\r\n await this.orderService.UpdateOrderPart(product!);\r\n }\r\n })\r\n ]);\r\n\r\n await this.caseService.SendConfirmedOrderNotification(this.props.orderDetails.caseId, this.props.orderDetails.id);\r\n\r\n const order = { ...this.props.orderDetails };\r\n order.orderStatus = proceedOrderStatus!;\r\n order.orderStatusId = proceedOrderStatus!.id;\r\n\r\n this.props.onOrderChange(order);\r\n\r\n orderStatusHistory.unshift({\r\n id: 0,\r\n orderId: this.props.orderDetails.id,\r\n orderStatusId: this.props.orderDetails.orderStatusId,\r\n orderStatus: proceedOrderStatus!,\r\n date: new Date(),\r\n createdBy: this.props.appState.appUser!.id!,\r\n createdByUser: this.props.appState.appUser,\r\n comment: '',\r\n attachments: []\r\n });\r\n\r\n }\r\n }\r\n\r\n console.log(orderStatusHistory);\r\n\r\n await this.props.automatePlaceOrderChange();\r\n this.setState({\r\n orderStatusHistory: orderStatusHistory,\r\n isChangeOrderStatusDialogOpen: false,\r\n selectedDisplayedStatus: this.state.selectedStatus.displayName,\r\n changeOrderStatusComment: '',\r\n attachments: [],\r\n isLoadingOrderDetails: false,\r\n executing: false\r\n });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (ex) {\r\n this.setState({ \r\n isLoadingOrderDetails: false,\r\n executing: false \r\n });\r\n console.log('Exception:' + ex);\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n handleAutocompleteOrderStatusChange = async (newValue: any | null) => {\r\n this.setState({\r\n selectedStatus: newValue\r\n });\r\n };\r\n\r\n handleOrderPartsStatusChange = async (part: OrderPart, newVal: IReferential | null) => {\r\n try {\r\n await this.orderService.ChangeOrderPartStatus(part.id, newVal!.id);\r\n const order = await this.orderService.GetOrder(this.props.orderDetails.id, false);\r\n\r\n const newArray = [...this.state.orderpartsList];\r\n const index = newArray.findIndex((item) => item.id === part.id);\r\n newArray[index] = {\r\n ...newArray[index],\r\n status: newVal,\r\n statusId: newVal !== null ? newVal.id : null\r\n };\r\n\r\n order.orderParts = newArray;\r\n\r\n this.props.onOrderChange(order);\r\n this.setState({\r\n orderpartsList: newArray\r\n });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n handleUploadAttachment = async (e: React.ChangeEvent) => {\r\n try {\r\n const attachments = [...this.state.attachments];\r\n\r\n attachments.push({\r\n id: 0,\r\n caseId: this.props.orderDetails.caseId,\r\n attachmentTypeId: this.state.attachType!.id,\r\n attachmentType: this.state.attachType,\r\n file: e.target.files![0],\r\n fileName: e.target.files![0].name,\r\n uploadDate: new Date(),\r\n carPhotos: false,\r\n originalFileName: e.target.files![0].name,\r\n caseRequestId: null,\r\n paymentId: null,\r\n serviceAppointmentId: null,\r\n caseClientId: null,\r\n isSelection: false\r\n });\r\n\r\n this.setState({\r\n attachments: attachments\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n handleDeleteAttachment = async (id: number, fileName: string) => {\r\n try {\r\n const attachments = [...this.state.attachments];\r\n const index = attachments.findIndex((item) => item.id === id);\r\n attachments.splice(index, 1);\r\n\r\n this.setState({\r\n attachments: attachments\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n renderAttachmentBox = () => {\r\n return (\r\n \r\n \r\n {this.state.attachments.length !== 0\r\n ? this.state.attachments.map((attach, index) => {\r\n return (\r\n
\r\n
\r\n this.downloadFile(attach.fileName, attach.originalFileName)}\r\n >\r\n {attach.originalFileName}\r\n \r\n
\r\n
\r\n this.handleDeleteAttachment(attach.id, attach.fileName)}\r\n disabled={false}\r\n >\r\n \r\n \r\n
\r\n
\r\n );\r\n })\r\n : null}\r\n
\r\n \r\n {\r\n return this.handleUploadAttachment(e);\r\n }}\r\n type=\"file\"\r\n />\r\n \r\n \r\n
\r\n );\r\n };\r\n\r\n deleteOrderPart = async (event: any, tableMeta: MUIDataTableMeta) => {\r\n try {\r\n const id = tableMeta.rowData[0];\r\n const newArray = [...this.state.orderpartsList];\r\n const selectedPartIndex = newArray.findIndex((item) => item.id === id);\r\n const part = newArray[selectedPartIndex];\r\n const groupedParts = newArray.filter((item) => item.groupedUniqueId === part.groupedUniqueId);\r\n console.log('part', part);\r\n console.log('groupedParts', groupedParts);\r\n for (let i = 0; i < newArray.length; i++) {\r\n if (newArray[i].groupedUniqueId === part.groupedUniqueId) {\r\n await this.orderService.DeleteOrderPart(newArray[i].id);\r\n newArray[i].isDeleted = true;\r\n }\r\n }\r\n const order = await this.orderService.GetOrder(this.props.orderDetails.id, false);\r\n const orderStatusHistory = await this.orderService.GetOrderStatusHistories(\r\n this.props.orderDetails.id\r\n );\r\n\r\n order.orderParts = newArray;\r\n this.props.onOrderChange(order);\r\n this.setState({\r\n orderpartsList: newArray,\r\n orderStatusHistory: orderStatusHistory\r\n });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n renderChangeOrderStatusForm = () => {\r\n return (\r\n {\r\n this.changeOrderStatusSubmit();\r\n }}\r\n >\r\n
\r\n {\r\n !this.props.workflowAutomatePlaceOrder\r\n ? (\r\n ) => {\r\n this.setState({\r\n changeOrderStatusComment: e.target.value\r\n });\r\n }}\r\n variant=\"outlined\"\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n />\r\n ): (\r\n ) => {\r\n this.setState({\r\n changeOrderStatusComment: e.target.value\r\n });\r\n }}\r\n variant=\"outlined\"\r\n />\r\n )\r\n }\r\n {this.renderAttachmentBox()}\r\n
\r\n \r\n {this.translatorService.Tranlate('CASE_COMMENT_SEND', 'Trimite')}\r\n \r\n \r\n );\r\n };\r\n\r\n downloadFile = async (fileName: string, origFileName: string) => {\r\n const fileBlob = await this.caseService.GetCaseAttachment(fileName);\r\n FileSaver.saveAs(fileBlob, origFileName);\r\n };\r\n\r\n showOrdeStatusTimelineHistory = () => {\r\n const orderStatusHistory = this.state.orderStatusHistory;\r\n\r\n if (orderStatusHistory.length === 0) {\r\n return (\r\n \r\n {this.translatorService.Tranlate(\r\n 'ORDER_DETAILS_HISTORY_NO_DATA',\r\n 'Nu exista date de afisat!'\r\n )}\r\n \r\n );\r\n }\r\n\r\n return (\r\n
\r\n {orderStatusHistory.map((orderStatus, index) => (\r\n
\r\n
\r\n
\r\n

\r\n {' '}\r\n {orderStatus.orderStatus!.displayName}\r\n

\r\n

\r\n {moment\r\n .utc(orderStatus.date)\r\n .local()\r\n .format(this.props.appState.longDateFormat)}\r\n {!isNullOrUndefined(orderStatus.createdByUser)\r\n ? '(' + orderStatus.createdByUser.userName + ')'\r\n : ''}\r\n

\r\n

{orderStatus.comment}

\r\n\r\n {orderStatus.attachments === null\r\n ? null\r\n : orderStatus.attachments.map((attach, index) => {\r\n return (\r\n
\r\n
\r\n \r\n this.downloadFile(attach.fileName, attach.originalFileName)\r\n }\r\n >\r\n {attach.originalFileName}\r\n \r\n
\r\n
\r\n );\r\n })}\r\n
\r\n
\r\n ))}\r\n
\r\n );\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.orderService = (this.context as AppContext).orderService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n this.appUserService = (this.context as AppContext).appUserService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.workflowService = (this.context as AppContext).workflowService;\r\n \r\n const options = {\r\n filter: false,\r\n viewColumns: false,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n elevation: 0,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService)\r\n // responsive: \"stacked\",\r\n };\r\n\r\n return (\r\n \r\n {this.renderOrderDetailsSection()}\r\n {this.renderInterogateAllSection()}\r\n {this.renderOrderPartsSection()}\r\n \r\n
\r\n \r\n
\r\n\r\n {!this.state.isLoadingOrderDetails && this.state.showOrderPrice ? (\r\n
\r\n
\r\n \r\n {this.translatorService.Tranlate('ORDER_DETAILS_TOTAL_TITLE', 'TOTAL COMANDA')}\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n

\r\n \r\n {this.translatorService.Tranlate(\r\n 'ORDER_DETAILS_TOTAL_NO_TVA_LABEL',\r\n 'Total fara TVA'\r\n ) + ': '}{' '}\r\n \r\n {Utils.countryNumberFormat(this.props.orderDetails.amountWithoutTVA.toFixed(2), this.props.appState.appUser?.organization?.country ?? null) +\r\n ' ' +\r\n (!isNullOrUndefined(this.props.orderDetails.currencyCode) &&\r\n this.props.orderDetails.currencyCode !== ''\r\n ? this.props.orderDetails.currencyCode\r\n : '')}\r\n

\r\n

\r\n \r\n {this.translatorService.Tranlate('ORDER_DETAILS_TVA_LABEL', 'TVA')}\r\n {this.state.TVA !== '' && !isNullOrUndefined(this.state.TVA)\r\n ? ' (' + this.state.TVA + '%)'\r\n : ''}\r\n :{' '}\r\n \r\n {Utils.countryNumberFormat(this.props.orderDetails.amountTVA.toFixed(2), this.props.appState.appUser?.organization?.country ?? null) +\r\n ' ' +\r\n (!isNullOrUndefined(this.props.orderDetails.currencyCode) &&\r\n this.props.orderDetails.currencyCode !== ''\r\n ? this.props.orderDetails.currencyCode\r\n : '')}\r\n

\r\n

\r\n \r\n {this.translatorService.Tranlate('ORDER_DETAILS_TOTAL_LABEL', 'Total') +\r\n ': '}\r\n \r\n {Utils.countryNumberFormat(this.props.orderDetails.amount.toFixed(2), this.props.appState.appUser?.organization?.country ?? null) +\r\n ' ' +\r\n (!isNullOrUndefined(this.props.orderDetails.currencyCode) &&\r\n this.props.orderDetails.currencyCode !== ''\r\n ? this.props.orderDetails.currencyCode\r\n : '')}\r\n

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n ) : null}\r\n
\r\n\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoadingOrderDetails ? (\r\n
\r\n
\r\n \r\n {this.translatorService.Tranlate(\r\n 'ORDER_DETAILS_HISTORY_TITLE',\r\n 'ISTORIC COMANDA'\r\n )}\r\n \r\n
\r\n \r\n \r\n \r\n {this.showOrdeStatusTimelineHistory()}\r\n \r\n \r\n \r\n
\r\n ) : null}\r\n
\r\n \r\n \r\n \r\n {this.translatorService.Tranlate(\r\n 'ORDER_DETAILS_DIALOG_TITLE',\r\n 'Modificare stare comanda'\r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.renderChangeOrderStatusForm()}\r\n \r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (stateProps: any, dispatchProps: any, ownProps: ExternalOrderDetailsProps) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app\r\n }),\r\n null,\r\n mergeProps\r\n)(withSnackbar(OrderDetails as any));\r\n","import * as React from 'react';\r\n\r\nimport { ApplicationContext, AppContext } from '../../context/Contexts';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../store';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { Box, Grid, ListItem } from '@material-ui/core';\r\nimport { withRouter } from 'react-router';\r\nimport moment from 'moment';\r\nimport * as R from 'ramda';\r\n\r\nimport { Order, OrderFilters } from '../../interfaces/Order';\r\nimport { Dialog, DialogContent, DialogTitle, IconButton } from '@material-ui/core';\r\nimport OrderDetails from './OrderDetails';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport _ from 'lodash';\r\nimport { TariffPercentResponse } from '../../interfaces/Case';\r\n\r\ninterface Vehicle {\r\n id: number;\r\n plateNumber: string;\r\n name: string;\r\n vin: string;\r\n status?: string;\r\n firstRegistrationDate: string;\r\n orders: Order[];\r\n}\r\n\r\nexport interface ExternalSearchOrderProps {\r\n handleSearchPopverClose: () => void;\r\n searchValue: string;\r\n searchId: string;\r\n}\r\ntype SearchOrderProps = { appState: AppState } & ExternalSearchOrderProps & RouteComponentProps;\r\n\r\ninterface ISearchOrderState {\r\n vehicleList: Vehicle[];\r\n isLoading: boolean;\r\n orderList: Order[];\r\n isDialogOpen: boolean;\r\n selectedOrder: Order | null;\r\n}\r\n\r\nclass SearchOrder extends React.PureComponent {\r\n private cbContext!: AppContext;\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n vehicleList: [],\r\n isLoading: false,\r\n orderList: [],\r\n isDialogOpen: false,\r\n selectedOrder: null\r\n } as ISearchOrderState;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-empty-function\r\n public async componentDidMount() {}\r\n\r\n async componentDidUpdate(prevProps: SearchOrderProps) {\r\n if (this.props.searchId !== prevProps.searchId) {\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n this.loadOrders\r\n );\r\n }\r\n }\r\n\r\n loadOrders = async () => {\r\n const vehicles = await this.loadData();\r\n\r\n this.setState({\r\n isLoading: false,\r\n vehicleList: vehicles\r\n });\r\n };\r\n\r\n loadData = async (): Promise => {\r\n const [orders] = await Promise.all([\r\n this.cbContext.orderService.GetOrders({\r\n text: this.props.searchValue.replace(/\\s+/g, '')\r\n } as any as OrderFilters)\r\n ]);\r\n const orderList = orders.orders;\r\n this.setState({\r\n orderList: orderList\r\n });\r\n const orgIds = _.uniq(orderList.map(({ clientId }) => clientId));\r\n\r\n const assignedToList = _.uniq(orderList.map(({ createdBy }) => createdBy));\r\n const uniqueAssignedToList = assignedToList.filter((a, b) => assignedToList.indexOf(a) === b);\r\n\r\n const [users, orgEntities] = await Promise.all([\r\n this.cbContext.appUserService.GetUsersInfo(uniqueAssignedToList),\r\n orgIds.length == 0 ? [] : this.cbContext.organizationService.GetUserOrganizationsByIds(orgIds)\r\n ]);\r\n\r\n orders.orders.forEach((od) => {\r\n const client = orgEntities.find((item) => item.id === od.clientId);\r\n const user = users.find((item) => item.id === od.createdBy);\r\n\r\n od.createdByUser = R.isNil(user) ? null : user;\r\n od.client = R.isNil(client) ? null : client;\r\n });\r\n\r\n const orderVehicles = orders.orders.filter((i) => i.caseVehicle).map((i) => i.caseVehicle);\r\n const vehicles = orderVehicles.map((item) => {\r\n return {\r\n id: -1,\r\n vin: item.vin || '',\r\n plateNumber: item.plateNumber || '',\r\n name: item.model ? `${item.model?.brand} ${item.model?.name}` : '',\r\n numberOfKilometers: item.numberOfKilometers,\r\n status: item.currentStatus?.status?.displayName,\r\n firstRegistrationDate: item.registrationDate ? item.registrationDate : '',\r\n orders: orders.orders.filter((i) => i.caseVehicle?.id === item.id)\r\n };\r\n });\r\n\r\n return [...vehicles];\r\n };\r\n\r\n onOrderClick = async (id: number) => {\r\n const orderParts = await this.cbContext.orderService.GetOrderParts(id);\r\n const order = this.state.orderList.find((item) => item.id === id);\r\n order!.orderParts = orderParts;\r\n\r\n this.setState({\r\n isDialogOpen: true,\r\n selectedOrder: order!\r\n });\r\n };\r\n\r\n onVehicleClick = (id: number) => {\r\n if (!id || id < 0) {\r\n return;\r\n }\r\n\r\n if (!R.isNil(this.props.handleSearchPopverClose)) {\r\n this.props.handleSearchPopverClose();\r\n }\r\n\r\n const currentPath = this.props.history.location.pathname.toLowerCase();\r\n this.props.history.push('/vehicle/' + id);\r\n\r\n if (currentPath.indexOf('/vehicle/') !== -1) {\r\n this.props.history.go(0);\r\n }\r\n };\r\n\r\n closeDialog = async () => {\r\n this.setState({\r\n isDialogOpen: false,\r\n isLoading: true\r\n });\r\n };\r\n\r\n onOrderChange = (order: Order) => {\r\n this.setState({\r\n selectedOrder: \r\n {\r\n ...this.state.selectedOrder!,\r\n amount: order.amount,\r\n amountTVA: order.amountTVA,\r\n amountWithoutTVA: order.amountWithoutTVA,\r\n orderParts: [...order.orderParts!],\r\n orderStatus: order.orderStatus,\r\n orderStatusId: order.orderStatusId\r\n }\r\n });\r\n };\r\n\r\n renderVehicles = (vehicles: Vehicle[]) => {\r\n return vehicles.map((item, index) => (\r\n
\r\n this.onVehicleClick(item.id)}\r\n >\r\n \r\n \r\n
{item.plateNumber}
\r\n
\r\n \r\n
{item.status}
\r\n
{item.vin}
\r\n
\r\n \r\n
{item.name}
\r\n
\r\n \r\n
\r\n
\r\n {item.firstRegistrationDate\r\n ? moment\r\n .utc(item.firstRegistrationDate)\r\n .local()\r\n .format(this.props.appState.dateFormat)\r\n : ' - '}\r\n
\r\n
\r\n
\r\n \r\n {this.renderOrders(item.orders)}\r\n
\r\n ));\r\n };\r\n\r\n renderOrders = (orders: Order[]) => {\r\n return orders.map((item, index) => (\r\n this.onOrderClick(item.id)}>\r\n \r\n \r\n
{item.id}
\r\n
\r\n \r\n
{item.client!.displayName}
\r\n
{item.createdByUser!.userName}
\r\n
\r\n \r\n
{item.amount}
\r\n
{item.currencyCode}
\r\n
\r\n\r\n \r\n
{item!.orderStatus!.displayName}
\r\n
\r\n {moment\r\n .utc(item.date)\r\n .local()\r\n .format(this.props.appState.dateFormat)}\r\n
\r\n
\r\n
\r\n
\r\n ));\r\n };\r\n\r\n public render() {\r\n this.cbContext = this.context as AppContext;\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n\r\n {!this.state.isLoading && !this.state.isDialogOpen && this.state.vehicleList.length != 0 ? (\r\n \r\n {this.renderVehicles(this.state.vehicleList)}\r\n \r\n ) : null}\r\n\r\n \r\n \r\n \r\n {this.cbContext.translatorService.Tranlate('ORDERS_DIALOG_TITLE', 'Detalii comanda')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.state.selectedOrder === null ? null : (\r\n {console.log('automatePlaceOrderChange')}} \r\n />\r\n )}\r\n \r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app\r\n }),\r\n null\r\n)(withRouter(SearchOrder));\r\n","import React, { Fragment, useRef, useState, useContext } from 'react';\r\n\r\nimport { ClickAwayListener, InputBase, Popper, Paper } from '@material-ui/core';\r\n\r\nimport SearchIcon from '@material-ui/icons/Search';\r\nimport { ApplicationContext } from '../../context/Contexts';\r\nimport SearchCase from '../../components/cases/SearchCase';\r\nimport SearchOrder from '../../components/orders/SearchOrder';\r\nimport { Guid } from 'guid-typescript';\r\n\r\nconst WAIT_INTERVAL = 750;\r\n\r\nconst HeaderSearch = () => {\r\n const searchRef = useRef(null);\r\n\r\n const handleKeyDown = (e) => {\r\n clearTimeout(timer);\r\n };\r\n\r\n const triggerChange = (e) => {\r\n setSearchId(Guid.create().toString());\r\n };\r\n\r\n const handleSearchChange = (event) => {\r\n setSearchValue(event.target.value);\r\n\r\n clearTimeout(timer);\r\n setTimer(setTimeout(triggerChange, WAIT_INTERVAL));\r\n\r\n if (event.target.value) {\r\n if (!openSearchPopover) {\r\n setOpenSearchPopover(true);\r\n }\r\n } else {\r\n setOpenSearchPopover(false);\r\n }\r\n };\r\n\r\n const handleSearchPopverClose = () => {\r\n setOpenSearchPopover(false);\r\n };\r\n\r\n const [openSearchPopover, setOpenSearchPopover] = useState(false);\r\n const [searchValue, setSearchValue] = useState('');\r\n const [searchId, setSearchId] = useState('');\r\n let [timer, setTimer] = useState(null);\r\n const context = useContext(ApplicationContext);\r\n const translatorService = context.translatorService;\r\n\r\n return (\r\n \r\n
\r\n \r\n \r\n
\r\n {window.location.href.indexOf('orders') == -1 ? \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n : \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n }\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default HeaderSearch;\r\n","import React, { Fragment } from 'react';\r\n\r\nimport clsx from 'clsx';\r\nimport { Link } from 'react-router-dom';\r\nimport { Hidden, IconButton, AppBar, Box } from '@material-ui/core';\r\nimport { connect } from 'react-redux';\r\nimport { ThemeActionCreators } from '../../store';\r\nimport projectLogo from '../../assets/images/carfix_newlogo.svg';\r\nimport HeaderLogo from '../../layout-components/HeaderLogo';\r\nimport HeaderDots from '../../layout-components/HeaderDots';\r\nimport HeaderUserbox from '../../layout-components/HeaderUserbox';\r\nimport HeaderSearch from '../../layout-components/HeaderSearch';\r\n\r\nimport MenuOpenRoundedIcon from '@material-ui/icons/MenuOpenRounded';\r\nimport MenuRoundedIcon from '@material-ui/icons/MenuRounded';\r\n\r\nconst Header = (props) => {\r\n const toggleSidebar = () => {\r\n setSidebarToggle(!sidebarToggle);\r\n };\r\n\r\n const toggleSidebarMobile = () => {\r\n setSidebarToggleMobile(!sidebarToggleMobile);\r\n };\r\n\r\n const {\r\n headerShadow,\r\n headerFixed,\r\n sidebarToggleMobile,\r\n setSidebarToggleMobile,\r\n setSidebarToggle,\r\n sidebarToggle,\r\n user\r\n } = props;\r\n\r\n return (\r\n \r\n \r\n {!props.isCollapsedLayout && }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {!props.isCollapsedLayout && (\r\n \r\n \r\n {sidebarToggle ? (\r\n \r\n ) : (\r\n //style={{color:\"#1F2857\"}}\r\n )}\r\n \r\n \r\n )}\r\n {user != null ? : null}\r\n \r\n \r\n {user != null ? (\r\n \r\n \r\n \r\n \r\n \r\n {sidebarToggleMobile ? : }\r\n \r\n \r\n \r\n ) : null}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nconst mapStateToProps = (state) => ({\r\n headerShadow: state.themeOptions.headerShadow,\r\n headerFixed: state.themeOptions.headerFixed,\r\n sidebarToggleMobile: state.themeOptions.sidebarToggleMobile,\r\n sidebarToggle: state.themeOptions.sidebarToggle,\r\n user: state.app.user,\r\n appState: state.app\r\n});\r\n\r\nconst mapDispatchToProps = (dispatch) => ({\r\n setSidebarToggle: (enable) => dispatch(ThemeActionCreators.setSidebarToggle(enable)),\r\n setSidebarToggleMobile: (enable) => dispatch(ThemeActionCreators.setSidebarToggleMobile(enable))\r\n});\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(Header);\r\n","import React, { Fragment } from 'react';\r\nimport clsx from 'clsx';\r\nimport NavigationIcon from '@material-ui/icons/Navigation';\r\nimport { Hidden, Paper, Box, Button } from '@material-ui/core';\r\n\r\nimport DashboardTwoToneIcon from '@material-ui/icons/DashboardTwoTone';\r\n\r\nimport { connect } from 'react-redux';\r\n\r\n// function TabPanel(props) {\r\n// const { children, value, index, ...other } = props;\r\n\r\n// return (\r\n//
\r\n \r\n \r\n );\r\n};\r\n\r\nLeftSidebar.propTypes = {\r\n children: PropTypes.node\r\n};\r\n\r\nconst mapStateToProps = (state) => ({\r\n sidebarToggle: state.themeOptions.sidebarToggle,\r\n sidebarToggleMobile: state.themeOptions.sidebarToggleMobile,\r\n sidebarFixed: state.themeOptions.sidebarFixed,\r\n\r\n headerFixed: state.themeOptions.headerFixed,\r\n headerSearchHover: state.themeOptions.headerSearchHover,\r\n\r\n contentBackground: state.themeOptions.contentBackground,\r\n appState: state.app\r\n});\r\n\r\nexport default connect(mapStateToProps)(LeftSidebar);\r\n","import React from 'react';\r\nimport { ApplicationState, AppState } from '../../store';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n Grid,\r\n TextField,\r\n Button,\r\n Box,\r\n Dialog,\r\n DialogTitle,\r\n DialogContent,\r\n DialogContentText,\r\n DialogActions\r\n} from '@material-ui/core';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { IAppUserService } from '../../services/Interfaces/IAppUserService';\r\nimport { ApplicationContext, AppContext } from '../../context/Contexts';\r\nimport { IOrganizationService } from '../../services/Interfaces/IOrganizationService';\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { WrapperSimple } from '../../layout-components';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { IAuthService } from '../../services/Interfaces/IAuthService';\r\nimport { isNullOrUndefined } from 'util';\r\n\r\ntype UserProfileProps = AppState & ProviderContext;\r\n\r\ninterface IUserProfileState {\r\n openModal: boolean;\r\n}\r\n\r\nclass UserProfile extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private appUserService!: IAppUserService;\r\n private organizationService!: IOrganizationService;\r\n private authService!: IAuthService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n openModal: false\r\n };\r\n\r\n public handleClickOpenModal = () => {\r\n this.setState({ openModal: true });\r\n };\r\n public handleClickCloseModal = () => {\r\n this.setState({ openModal: false });\r\n };\r\n\r\n // apasa reseteaza parola\r\n // se trimite mail\r\n //apare mesaj Operatiune efectuata cu sucess\r\n // se deschide modalul\r\n // se apasa ok si se face delogarea\r\n public resetPassword = async () => {\r\n try {\r\n if (this.props.appUser!.id === null) {\r\n return;\r\n }\r\n await this.appUserService.ResetPassword('');\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n\r\n this.handleClickOpenModal();\r\n } catch {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n public logout = () => {\r\n this.setState({ openModal: false });\r\n return this.authService.logoutAsync();\r\n };\r\n\r\n public renderForm() {\r\n return (\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n
\r\n \r\n {this.translatorService.Tranlate(\r\n 'ADMIN_USERS_TAB_USER_PASSWORD',\r\n 'Reseteaza parola'\r\n )}\r\n \r\n
\r\n \r\n \r\n {this.translatorService.Tranlate(\r\n 'ADMIN_USERS_TAB_USER_PASSWORD',\r\n 'Reseteaza parola'\r\n )}\r\n \r\n \r\n \r\n {this.translatorService.Tranlate(\r\n 'PROFILE_RESET_PASSWORD_MESSAGE',\r\n 'A fost trimis un mail de resetare a parolei. Dupa resetare va rugam sa va reautentificati!'\r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n );\r\n }\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.appUserService = (this.context as AppContext).appUserService;\r\n this.authService = (this.context as AppContext).authenticationService;\r\n return this.renderForm();\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => state.app // Selects which state properties are merged into the component's props\r\n)(withSnackbar(UserProfile as any));\r\n","import React from 'react';\r\nimport {\r\n AppUserAdminActionCreators,\r\n ApplicationState,\r\n AppActionCreators,\r\n AppState\r\n} from '../../../store';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport { Box, TextField } from '@material-ui/core';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport { OrganizationBankAccount, Currency } from '../../../interfaces/Organization';\r\nimport { IOrganizationService } from '../../../services/Interfaces/IOrganizationService';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport Referentials from '../../../helpers/Referentials.json';\r\nimport { ReferentialCode } from '../../../helpers/Constants';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport MaterialTable, { Column, EditComponentProps, Icons } from 'material-table';\r\nimport ArrowDownward from '@material-ui/icons/ArrowDownward';\r\nimport Check from '@material-ui/icons/Check';\r\nimport ChevronLeft from '@material-ui/icons/ChevronLeft';\r\nimport ChevronRight from '@material-ui/icons/ChevronRight';\r\nimport Clear from '@material-ui/icons/Clear';\r\nimport DeleteOutline from '@material-ui/icons/DeleteOutline';\r\nimport Edit from '@material-ui/icons/Edit';\r\nimport FilterList from '@material-ui/icons/FilterList';\r\nimport FirstPage from '@material-ui/icons/FirstPage';\r\nimport LastPage from '@material-ui/icons/LastPage';\r\nimport Remove from '@material-ui/icons/Remove';\r\nimport SaveAlt from '@material-ui/icons/SaveAlt';\r\nimport Search from '@material-ui/icons/Search';\r\nimport ViewColumn from '@material-ui/icons/ViewColumn';\r\nimport { Label } from 'reactstrap';\r\nimport moment from 'moment';\r\nimport AddCircleTwoToneIcon from '@material-ui/icons/AddCircleTwoTone';\r\nimport { forwardRef } from 'react';\r\n\r\nconst tableIcons = {\r\n Add: forwardRef((props, ref) => ),\r\n Check: forwardRef((props, ref) => ),\r\n Clear: forwardRef((props, ref) => ),\r\n Delete: forwardRef((props, ref) => ),\r\n DetailPanel: forwardRef((props, ref) => ),\r\n Edit: forwardRef((props, ref) => ),\r\n Export: forwardRef((props, ref) => ),\r\n Filter: forwardRef((props, ref) => ),\r\n FirstPage: forwardRef((props, ref) => ),\r\n LastPage: forwardRef((props, ref) => ),\r\n NextPage: forwardRef((props, ref) => ),\r\n PreviousPage: forwardRef((props, ref) => ),\r\n ResetSearch: forwardRef((props, ref) => ),\r\n Search: forwardRef((props, ref) => ),\r\n SortArrow: forwardRef((props, ref) => ),\r\n ThirdStateCheck: forwardRef((props, ref) => ),\r\n ViewColumn: forwardRef((props, ref) => )\r\n} as Icons;\r\n\r\ninterface IOrganizationBankAccountsState {\r\n bankAccounts: OrganizationBankAccount[];\r\n isLoading: boolean;\r\n currencyList: Currency[];\r\n}\r\n\r\nexport interface ExternalBankAccountsProps {\r\n organizationId: number;\r\n}\r\n\r\ntype OrganizationBankAccountsProps = { appState: AppState } & ProviderContext &\r\n RouteComponentProps<{ id: string }> &\r\n ExternalBankAccountsProps;\r\n\r\nclass OrganizationBankAccounts extends React.PureComponent<\r\n OrganizationBankAccountsProps,\r\n IOrganizationBankAccountsState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private organizationService!: IOrganizationService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n bankAccounts: [],\r\n isLoading: true,\r\n currencyList: [] as Currency[]\r\n } as IOrganizationBankAccountsState;\r\n\r\n componentDidMount = () => {\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n () => {\r\n this.loadData();\r\n }\r\n );\r\n };\r\n\r\n loadData = async () => {\r\n try {\r\n const data = await this.organizationService.GetOrganizationBankAccounts(\r\n this.props.organizationId\r\n );\r\n const ref = Referentials.referential.find((item) => item.code === ReferentialCode.Currency);\r\n\r\n const currencyList = await this.appReferentialService.Get(ref!.baseUrl);\r\n\r\n this.setState({\r\n bankAccounts: data,\r\n isLoading: false,\r\n currencyList: currencyList.filter((item) => item.isActive === true) as any as Currency[]\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n getColumns = () => {\r\n const lookup = this.state.currencyList.reduce(function (acc: any, cur: Currency, i: number) {\r\n acc[cur.id] = cur.displayName;\r\n\r\n return acc;\r\n }, {});\r\n\r\n return [\r\n {\r\n field: 'bank',\r\n title: this.translatorService.Tranlate('ORGANIZATION_BANK_ACCOUNTS_BANK_HEADER', 'Banca'),\r\n searchable: true\r\n } as Column,\r\n {\r\n field: 'bankAccount',\r\n title: this.translatorService.Tranlate(\r\n 'ORGANIZATION_BANK_ACCOUNTS_BANK_ACCOUNT_HEADER',\r\n 'Bank Account'\r\n ),\r\n searchable: true,\r\n cellStyle: {\r\n minWidth: 250\r\n },\r\n editComponent: (props) => (\r\n props.onChange(e.target.value)}\r\n />\r\n )\r\n } as Column,\r\n {\r\n field: 'currencyId',\r\n title: this.translatorService.Tranlate(\r\n 'ORGANIZATION_BANK_ACCOUNTS_CURRENCY_HEADER',\r\n 'Moneda'\r\n ),\r\n initialEditValue: this.state.currencyList[0].id,\r\n lookup: lookup\r\n },\r\n {\r\n field: 'dateModification',\r\n title: this.translatorService.Tranlate(\r\n 'ORGANIZATION_BANK_ACCOUNTS_DATE_MODIFICATION_HEADER',\r\n 'Data modificare'\r\n ),\r\n defaultSort: 'desc',\r\n searchable: true,\r\n render: (rowData: any) => {\r\n return moment\r\n .utc(rowData.dateModification)\r\n .local()\r\n .format(this.props.appState.longDateFormat);\r\n },\r\n editComponent: (props: EditComponentProps) => {\r\n return ;\r\n }\r\n } as Column\r\n ];\r\n };\r\n\r\n public getLocalization = () => {\r\n return {\r\n header: { actions: '' },\r\n toolbar: {\r\n searchPlaceholder: this.translatorService.Tranlate('SEARCH', 'Cauta'),\r\n searchTooltip: this.translatorService.Tranlate('SEARCH', 'Cauta')\r\n },\r\n body: {\r\n editTooltip: this.translatorService.Tranlate('EDIT', 'Editeaza'),\r\n deleteTooltip: this.translatorService.Tranlate('DELETE', 'Sterge'),\r\n addTooltip: this.translatorService.Tranlate('Add', 'Adauga'),\r\n emptyDataSourceMessage: this.translatorService.Tranlate(\r\n 'NO_RECORDS_TO_DISPLAY',\r\n 'Nu exista date de afisat'\r\n ),\r\n editRow: {\r\n cancelTooltip: this.translatorService.Tranlate('CANCEL', 'Anuleaza'),\r\n saveTooltip: this.translatorService.Tranlate('SAVE', 'Salveaza'),\r\n deleteText: this.translatorService.Tranlate(\r\n 'DELETE_TEXT',\r\n 'Sigur doriti sa stergeti aceasta inregistrare?'\r\n )\r\n }\r\n },\r\n pagination: {\r\n labelRowsSelect: this.translatorService.Tranlate('ROWS', 'inregistrari'),\r\n firstTooltip: this.translatorService.Tranlate('FIRST_PAGE', 'Prima pagina'),\r\n previousTooltip: this.translatorService.Tranlate('PREVIOUS_PAGE', 'Pagina precedenta'),\r\n nextTooltip: this.translatorService.Tranlate('NEXT_PAGE', 'Pagina urmatoare'),\r\n lastTooltip: this.translatorService.Tranlate('LAST_PAGE', 'Ultima pagina'),\r\n labelDisplayedRows:\r\n '{from}-{to} ' + this.translatorService.Tranlate('OF', 'din') + ' {count}'\r\n }\r\n };\r\n };\r\n\r\n onRowUpdate = (\r\n newData: OrganizationBankAccount,\r\n oldData?: OrganizationBankAccount\r\n ): Promise =>\r\n new Promise(async (resolve, reject) => {\r\n if (oldData) {\r\n try {\r\n newData.currency = null;\r\n await this.organizationService.UpdateOrganizationBankAccount(newData);\r\n await this.loadData();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n resolve();\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n }\r\n });\r\n\r\n onRowDelete = (oldData: OrganizationBankAccount): Promise =>\r\n new Promise(async (resolve, reject) => {\r\n if (oldData) {\r\n try {\r\n await this.organizationService.RemoveOrganizationBankAccount(oldData.id);\r\n await this.loadData();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n\r\n resolve();\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n }\r\n });\r\n\r\n onRowAdd = (newData: OrganizationBankAccount): Promise =>\r\n new Promise(async (resolve, reject) => {\r\n try {\r\n newData.organizationId = this.props.organizationId;\r\n\r\n await this.organizationService.AddOrganizationBankAccount(newData);\r\n await this.loadData();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n resolve();\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n });\r\n\r\n public renderTable = () => {\r\n return (\r\n this.onRowAdd(newData),\r\n onRowUpdate: (newData: any, oldData?: any) => this.onRowUpdate(newData, oldData),\r\n onRowDelete: (oldData: any) => this.onRowDelete(oldData)\r\n }}\r\n />\r\n );\r\n };\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? this.renderTable() : null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (stateProps: any, dispatchProps: any, ownProps: ExternalBankAccountsProps) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\nexport default connect(\r\n (state: ApplicationState) => ({ appState: state.app }),\r\n { ...AppUserAdminActionCreators, ...AppActionCreators },\r\n mergeProps\r\n)(withSnackbar(OrganizationBankAccounts as any));\r\n","import React from 'react';\r\nimport {\r\n AppUserAdminActionCreators,\r\n ApplicationState,\r\n AppActionCreators,\r\n AppState\r\n} from '../../../store';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport { Box, Card, CardContent } from '@material-ui/core';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport { IOrganizationService } from '../../../services/Interfaces/IOrganizationService';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { DropzoneArea } from 'material-ui-dropzone';\r\nimport { isNullOrUndefined } from 'util';\r\n\r\ninterface IOrganizationLogoState {\r\n isLoading: boolean;\r\n image: File;\r\n}\r\n\r\nexport interface ExternalOrganizationLogoProps {\r\n organizationId: number;\r\n}\r\n\r\ntype OrganizationLogoProps = { appState: AppState } & ProviderContext &\r\n RouteComponentProps<{ id: string }> &\r\n ExternalOrganizationLogoProps;\r\n\r\nclass OrganizationLogo extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private organizationService!: IOrganizationService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n isLoading: true\r\n } as IOrganizationLogoState;\r\n\r\n componentDidMount = () => {\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n () => {\r\n this.loadData();\r\n }\r\n );\r\n };\r\n\r\n handleUploadAttachment = async (files: File[]) => {\r\n if (files.length === 0) {\r\n return;\r\n }\r\n\r\n const img = new Image();\r\n img.src = window.URL.createObjectURL(files[0]);\r\n img.onload = async () => {\r\n // if (img.width === 158 && img.height === 66) {\r\n await this.saveImage(files);\r\n return;\r\n // }\r\n\r\n // this.props.enqueueSnackbar(\r\n // this.translatorService.Tranlate(\r\n // 'ERROR_INCORECT_FILE_SIZE',\r\n // 'Dimensiune imaginii este invalida'\r\n // ),\r\n // { variant: 'error' }\r\n // );\r\n // return true;\r\n };\r\n };\r\n\r\n saveImage = async (files: File[]) => {\r\n try {\r\n if (files.length === 0) {\r\n return;\r\n }\r\n\r\n await this.organizationService.AddLogo(this.props.organizationId, files![0]);\r\n\r\n this.setState({\r\n image: files![0]\r\n });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n loadData = async () => {\r\n try {\r\n const image = await this.organizationService.GetLogo(this.props.organizationId);\r\n\r\n if (image === null) {\r\n this.setState({\r\n isLoading: false\r\n });\r\n return;\r\n }\r\n\r\n this.setState({\r\n isLoading: false,\r\n image: new File([image], 'logo')\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n renderLogo = () => {\r\n return (\r\n \r\n \r\n \r\n
\r\n {isNullOrUndefined(this.state.image) ? (\r\n ''\r\n ) : (\r\n \"\"\r\n )}\r\n
\r\n this.handleUploadAttachment(files)}\r\n previewText=\"\"\r\n showAlerts={false}\r\n acceptedFiles={['image/*']}\r\n />\r\n
\r\n
\r\n
\r\n );\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? this.renderLogo() : null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalOrganizationLogoProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\nexport default connect(\r\n (state: ApplicationState) => ({ appState: state.app }),\r\n { ...AppUserAdminActionCreators, ...AppActionCreators },\r\n mergeProps\r\n)(withSnackbar(OrganizationLogo as any));\r\n","import React, { Fragment } from 'react';\r\nimport {\r\n AppUserAdminActionCreators,\r\n ApplicationState,\r\n AppActionCreators,\r\n AppState\r\n} from '../../../store';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport { Box, Select, MenuItem } from '@material-ui/core';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport {\r\n Organization,\r\n OrganizationParameter,\r\n OrganizationToken\r\n} from '../../../interfaces/Organization';\r\nimport { IOrganizationService } from '../../../services/Interfaces/IOrganizationService';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { OrganizationTypeCode, RoleClaimsEnum } from '../../../helpers/Constants';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport MaterialTable, { Column, EditComponentProps, Icons } from 'material-table';\r\nimport ArrowDownward from '@material-ui/icons/ArrowDownward';\r\nimport Check from '@material-ui/icons/Check';\r\nimport ChevronLeft from '@material-ui/icons/ChevronLeft';\r\nimport ChevronRight from '@material-ui/icons/ChevronRight';\r\nimport Clear from '@material-ui/icons/Clear';\r\nimport DeleteOutline from '@material-ui/icons/DeleteOutline';\r\nimport Edit from '@material-ui/icons/Edit';\r\nimport FilterList from '@material-ui/icons/FilterList';\r\nimport FirstPage from '@material-ui/icons/FirstPage';\r\nimport LastPage from '@material-ui/icons/LastPage';\r\nimport Remove from '@material-ui/icons/Remove';\r\nimport SaveAlt from '@material-ui/icons/SaveAlt';\r\nimport Search from '@material-ui/icons/Search';\r\nimport ViewColumn from '@material-ui/icons/ViewColumn';\r\nimport { Label } from 'reactstrap';\r\nimport moment from 'moment';\r\nimport AddCircleTwoToneIcon from '@material-ui/icons/AddCircleTwoTone';\r\nimport { forwardRef } from 'react';\r\n\r\nconst tableIcons = {\r\n Add: forwardRef((props, ref) => ),\r\n Check: forwardRef((props, ref) => ),\r\n Clear: forwardRef((props, ref) => ),\r\n Delete: forwardRef((props, ref) => ),\r\n DetailPanel: forwardRef((props, ref) => ),\r\n Edit: forwardRef((props, ref) => ),\r\n Export: forwardRef((props, ref) => ),\r\n Filter: forwardRef((props, ref) => ),\r\n FirstPage: forwardRef((props, ref) => ),\r\n LastPage: forwardRef((props, ref) => ),\r\n NextPage: forwardRef((props, ref) => ),\r\n PreviousPage: forwardRef((props, ref) => ),\r\n ResetSearch: forwardRef((props, ref) => ),\r\n Search: forwardRef((props, ref) => ),\r\n SortArrow: forwardRef((props, ref) => ),\r\n ThirdStateCheck: forwardRef((props, ref) => ),\r\n ViewColumn: forwardRef((props, ref) => )\r\n} as Icons;\r\n\r\ninterface IOrganizationTokensState {\r\n tokens: OrganizationToken[];\r\n isLoading: boolean;\r\n supplierList: Organization[];\r\n}\r\n\r\nexport interface ExternalOrganizationTokenProps {\r\n organizationId: number;\r\n}\r\ntype OrganizationTokensProps = { appState: AppState } & ExternalOrganizationTokenProps &\r\n ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass OrganizationTokens extends React.PureComponent<\r\n OrganizationTokensProps,\r\n IOrganizationTokensState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private organizationService!: IOrganizationService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n tokens: [],\r\n isLoading: true,\r\n supplierList: []\r\n } as IOrganizationTokensState;\r\n\r\n componentDidMount = () => {\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n () => {\r\n this.loadData();\r\n }\r\n );\r\n };\r\n\r\n loadData = async () => {\r\n try {\r\n const [data, supplierList] = await Promise.all([\r\n this.organizationService.OrganizationToken.Get(this.props.organizationId),\r\n this.organizationService.GetHOOrganizationsByTypes([OrganizationTypeCode.SUPPLIER])\r\n ]);\r\n\r\n this.setState({\r\n tokens: data,\r\n isLoading: false,\r\n supplierList: supplierList.filter((item) => item.isActive === true)\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n getColumns = () => {\r\n const lookup = this.state.supplierList.reduce(function (\r\n acc: any,\r\n cur: Organization,\r\n i: number\r\n ) {\r\n acc[cur.id] = cur.displayName;\r\n return acc;\r\n },\r\n {});\r\n\r\n return [\r\n {\r\n field: 'partnerId',\r\n title: this.translatorService.Tranlate('ORGANIZATION_TOKENS_PARTNER_HEADER', 'Partener'),\r\n searchable: true,\r\n lookup: lookup,\r\n render: (rowData: OrganizationToken) => {\r\n return rowData.partner!.displayName;\r\n },\r\n editComponent: (props: EditComponentProps) => {\r\n return (\r\n props.onChange(e.target.value)}\r\n >\r\n {this.state.supplierList.map((item) => (\r\n \r\n {item.displayName}\r\n \r\n ))}\r\n \r\n );\r\n }\r\n } as Column,\r\n {\r\n field: 'token',\r\n title: this.translatorService.Tranlate('ORGANIZATION_TOKENS_TOKEN_HEADER', 'Token'),\r\n searchable: true\r\n } as Column,\r\n {\r\n field: 'idLocation',\r\n title: this.translatorService.Tranlate(\r\n 'ORGANIZATION_TOKENS_TOKEN_HEADER_IDLOCATION',\r\n 'Id Locatie'\r\n ),\r\n searchable: true\r\n } as Column,\r\n {\r\n field: 'serviceCode',\r\n title: this.translatorService.Tranlate(\r\n 'ORGANIZATION_TOKENS_TOKEN_HEADER_SERVICECODE',\r\n 'Code Service'\r\n ),\r\n searchable: true\r\n } as Column,\r\n {\r\n field: 'dateModification',\r\n title: this.translatorService.Tranlate(\r\n 'ORGANIZATION_PARAMETERS_MODIFIED_DATE_HEADER',\r\n 'Data modificare'\r\n ),\r\n searchable: true,\r\n render: (rowData: any) => {\r\n return moment\r\n .utc(rowData.dateModification)\r\n .local()\r\n .format(this.props.appState.longDateFormat);\r\n },\r\n editComponent: (props: EditComponentProps) => {\r\n return ;\r\n }\r\n } as Column\r\n ];\r\n };\r\n\r\n public getLocalization = () => {\r\n return {\r\n header: { actions: '' },\r\n toolbar: {\r\n searchPlaceholder: this.translatorService.Tranlate('SEARCH', 'Cauta'),\r\n searchTooltip: this.translatorService.Tranlate('SEARCH', 'Cauta')\r\n },\r\n body: {\r\n editTooltip: this.translatorService.Tranlate('EDIT', 'Editeaza'),\r\n deleteTooltip: this.translatorService.Tranlate('DELETE', 'Sterge'),\r\n addTooltip: this.translatorService.Tranlate('Add', 'Adauga'),\r\n emptyDataSourceMessage: this.translatorService.Tranlate(\r\n 'NO_RECORDS_TO_DISPLAY',\r\n 'Nu exista date de afisat'\r\n ),\r\n editRow: {\r\n cancelTooltip: this.translatorService.Tranlate('CANCEL', 'Anuleaza'),\r\n saveTooltip: this.translatorService.Tranlate('SAVE', 'Salveaza'),\r\n deleteText: this.translatorService.Tranlate(\r\n 'DELETE_TEXT',\r\n 'Sigur doriti sa stergeti aceasta inregistrare?'\r\n )\r\n }\r\n },\r\n pagination: {\r\n labelRowsSelect: this.translatorService.Tranlate('ROWS', 'inregistrari'),\r\n firstTooltip: this.translatorService.Tranlate('FIRST_PAGE', 'Prima pagina'),\r\n previousTooltip: this.translatorService.Tranlate('PREVIOUS_PAGE', 'Pagina precedenta'),\r\n nextTooltip: this.translatorService.Tranlate('NEXT_PAGE', 'Pagina urmatoare'),\r\n lastTooltip: this.translatorService.Tranlate('LAST_PAGE', 'Ultima pagina'),\r\n labelDisplayedRows:\r\n '{from}-{to} ' + this.translatorService.Tranlate('OF', 'din') + ' {count}'\r\n }\r\n };\r\n };\r\n\r\n onRowUpdate = (newData: OrganizationToken, oldData?: OrganizationToken): Promise =>\r\n new Promise(async (resolve, reject) => {\r\n if (oldData) {\r\n try {\r\n newData.partner = null;\r\n await this.organizationService.OrganizationToken.Update(newData);\r\n await this.loadData();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n resolve();\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n }\r\n });\r\n\r\n onRowDelete = (oldData: OrganizationParameter): Promise =>\r\n new Promise(async (resolve, reject) => {\r\n if (oldData) {\r\n try {\r\n await this.organizationService.OrganizationToken.Remove(oldData.id);\r\n await this.loadData();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n\r\n resolve();\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n }\r\n });\r\n\r\n onRowAdd = (newData: OrganizationToken): Promise =>\r\n new Promise(async (resolve, reject) => {\r\n try {\r\n newData.organizationId = this.props.organizationId;\r\n\r\n await this.organizationService.OrganizationToken.Add(newData);\r\n await this.loadData();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n resolve();\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n });\r\n\r\n public renderTable = () => {\r\n if (this.hasRight(RoleClaimsEnum.AdminService)) {\r\n return (\r\n \r\n )\r\n }\r\n\r\n return (\r\n this.onRowAdd(newData),\r\n onRowUpdate: (newData: any, oldData?: any) => this.onRowUpdate(newData, oldData),\r\n onRowDelete: (oldData: any) => this.onRowDelete(oldData)\r\n }}\r\n />\r\n );\r\n };\r\n\r\n public hasRight = (right: string): boolean => {\r\n return this.props.appState!.user!.profile.role.includes(right);\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n\r\n return (\r\n \r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? this.renderTable() : null}\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (stateProps: any, dispatchProps: any, ownProps: OrganizationTokensProps) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\nexport default connect(\r\n (state: ApplicationState) => ({ appState: state.app }),\r\n { ...AppUserAdminActionCreators, ...AppActionCreators },\r\n mergeProps\r\n)(withSnackbar(OrganizationTokens as any));\r\n","import React, { ChangeEvent, Fragment } from 'react';\r\nimport {\r\n AppUserAdminActionCreators,\r\n ApplicationState,\r\n AppActionCreators,\r\n AppState\r\n} from '../../../store';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport { Grid, Button, Card, Tabs, Tab, CardContent, TextField, Box } from '@material-ui/core';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport {\r\n CountryBuffer,\r\n Organization,\r\n OrganizationLevelType,\r\n OrganizationType\r\n} from '../../../interfaces/Organization';\r\nimport { IOrganizationService } from '../../../services/Interfaces/IOrganizationService';\r\nimport { ValidatorForm, TextValidator } from 'react-material-ui-form-validator';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { WrapperSimple } from '../../../layout-components';\r\nimport Referentials from '../../../helpers/Referentials.json';\r\nimport { ReferentialCode, OrganizationLevelTypeCode, RoleCodeEnum, RoleClaimsEnum, OrganizationTypeCode } from '../../../helpers/Constants';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport TabPanel from '../../_shared/Tabs';\r\nimport OrganizationBankAccounts from './OrganizationBankAccounts';\r\nimport OrganizationLogo from './OrganizationLogo';\r\nimport OrganizationTokens from './OrganizationTokens';\r\nimport { IReferential } from '../../../interfaces/IReferential';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { Switch, FormControlLabel, Typography } from '@material-ui/core';\r\nimport moment from 'moment';\r\nimport * as R from 'ramda';\r\nimport NumberFormat from 'react-number-format';\r\nimport { count } from 'console';\r\n\r\ninterface IEditOrganizationState {\r\n organization: Organization;\r\n organizationLevelTypes: OrganizationLevelType[];\r\n parentOrganizations: Organization[];\r\n organizationTypes: OrganizationType[];\r\n selectedTab: number;\r\n countryList: IReferential[];\r\n regionList: IReferential[];\r\n cityList: IReferential[];\r\n isLoading: boolean;\r\n countryBuffers: CountryBuffer[];\r\n partQualityTypes: IReferential[];\r\n}\r\n\r\nexport interface ExternalEditOrganizationsProps {\r\n organizationChanged?: () => void;\r\n organizationId: number;\r\n}\r\n\r\ntype EditOrganizationProps = { appState: AppState } & ProviderContext &\r\n ExternalEditOrganizationsProps &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass EditOrganization extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private appReferentialService!: IReferentialService;\r\n private organizationService!: IOrganizationService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n organization: {\r\n id: 0,\r\n name: '',\r\n organizationType: null,\r\n organizationLevelType: null,\r\n country: null,\r\n region: null,\r\n parent: null,\r\n gtId: this.props.appState.appUser!.gtId,\r\n isActive: true,\r\n newFeature: false,\r\n uploadFeature: false,\r\n mondayToFridayOpen: null,\r\n mondayToFridayClose: null,\r\n mondayToThursdayOpen: null,\r\n mondayToThursdayClose: null,\r\n fridayOpen: null,\r\n fridayClose: null,\r\n saturdayOpen: null,\r\n saturdayClose: null,\r\n cityInfo: null,\r\n bufferValue: 0,\r\n categoryPart: null,\r\n categoryPartId: null\r\n } as Organization,\r\n organizationLevelTypes: [] as OrganizationLevelType[],\r\n parentOrganizations: [] as Organization[],\r\n organizationTypes: [] as OrganizationType[],\r\n selectedTab: 0,\r\n countryList: [] as IReferential[],\r\n regionList: [] as IReferential[],\r\n cityList: [] as IReferential[],\r\n isLoading: true,\r\n isMondayToFridayOpenValid: true,\r\n countryBuffers: [] as CountryBuffer[],\r\n partQualityTypes: [] as IReferential[]\r\n };\r\n\r\n public hasRight = (right: string): boolean => {\r\n return this.props.appState!.user!.profile.role.includes(right);\r\n };\r\n\r\n public async componentDidMount() {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n\r\n //let organization = this.state.organization;\r\n\r\n // if (this.props.organizationId !== 0) {\r\n // organization = ;\r\n // }\r\n\r\n const ref = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.OrganizationType\r\n );\r\n const countryRef = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.Country\r\n );\r\n const regionRef = Referentials.referential.find((item) => item.code === ReferentialCode.Region);\r\n const cityRef = Referentials.referential.find((item) => item.code === ReferentialCode.City);\r\n const refQualityPart = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.CarPartCategory\r\n );\r\n\r\n const [organization, orgLevelList, orgTypes, countryList, regionList, cityList, countryBuffers, partQualityTypes] = await Promise.all([\r\n this.props.organizationId !== 0\r\n ? this.organizationService.GetOrganization(this.props.organizationId)\r\n : this.state.organization,\r\n this.organizationService.GetOrganizationLevels(hoId),\r\n this.appReferentialService.Get(ref!.baseUrl),\r\n this.appReferentialService.Get(countryRef!.baseUrl),\r\n this.appReferentialService.Get(regionRef!.baseUrl),\r\n this.appReferentialService.Get(cityRef!.baseUrl),\r\n this.organizationService.GetCountryBuffers(),\r\n this.appReferentialService.Get(refQualityPart!.baseUrl)\r\n ]);\r\n organization.hoId = hoId;\r\n const organizationLevelTypes = orgLevelList.map((item) => item.organizationLevelType);\r\n\r\n organization.categoryPart = organization.categoryPartId != null ? partQualityTypes.find((item) => item.id === organization.categoryPartId) ?? null : null\r\n this.setState(\r\n {\r\n organization: organization,\r\n organizationLevelTypes: organizationLevelTypes.filter(\r\n (item) => item.code !== OrganizationLevelTypeCode.HO\r\n ),\r\n organizationTypes: orgTypes as any as OrganizationType[],\r\n //parentOrganizations: [],\r\n regionList: regionList.filter((item) => item.isActive === true),\r\n countryList: countryList.filter((item) => item.isActive === true),\r\n cityList: cityList.filter((item) => item.isActive === true),\r\n isLoading: false,\r\n countryBuffers: countryBuffers,\r\n partQualityTypes: partQualityTypes\r\n },\r\n async () => {\r\n const organizations =\r\n this.props.organizationId === 0\r\n ? ([] as Organization[])\r\n : await this.organizationService.GetOrganizationsByHO(\r\n hoId,\r\n this.state.organization.organizationLevelTypeId\r\n );\r\n\r\n this.setState({\r\n parentOrganizations: organizations\r\n });\r\n }\r\n );\r\n\r\n ValidatorForm.addValidationRule('isTimeValid', (value) => {\r\n if (value) {\r\n return /^([01]?[0-9]|2[0-3]):[0-5][0-9]$/.test(value);\r\n }\r\n return true;\r\n });\r\n }\r\n\r\n private handleTextChange = (event: React.ChangeEvent) => {\r\n let value: any;\r\n if (event.target.type === 'text') {\r\n value = event.currentTarget.value;\r\n }\r\n this.setState({\r\n organization: {\r\n ...this.state.organization,\r\n [event.target.id]: value\r\n }\r\n });\r\n };\r\n\r\n private handleValueChange = (value: string) => {\r\n this.setState({\r\n organization: {\r\n ...this.state.organization,\r\n bufferValue: parseFloat(value)\r\n }\r\n });\r\n };\r\n\r\n private handleOrganizationLevelTypeChange = async (newValue: OrganizationLevelType | null) => {\r\n let orgs = [] as Organization[];\r\n if (newValue !== null) {\r\n orgs = await this.organizationService.GetOrganizationsByHO(\r\n this.state.organization.hoId,\r\n newValue.id\r\n );\r\n }\r\n this.setState({\r\n organization: {\r\n ...this.state.organization,\r\n organizationLevelType: newValue,\r\n organizationLevelTypeId: newValue !== null ? newValue!.id : 0,\r\n parent:\r\n newValue !== null && newValue.code === OrganizationLevelTypeCode.HO\r\n ? null\r\n : this.state.organization.parent,\r\n parentId:\r\n newValue !== null && newValue.code === OrganizationLevelTypeCode.HO\r\n ? null\r\n : this.state.organization.parentId\r\n },\r\n parentOrganizations: orgs\r\n });\r\n };\r\n\r\n private handleOrganizationTypeChange = (newValue: OrganizationType | null) => {\r\n this.setState({\r\n organization: {\r\n ...this.state.organization,\r\n organizationType: newValue,\r\n organizationTypeId: newValue !== null ? newValue!.id : 0\r\n }\r\n });\r\n };\r\n\r\n private handleCountryChange = (newValue: IReferential | null) => {\r\n const countryId = newValue !== null ? newValue!.id : null;\r\n const countryBuffer = this.state.countryBuffers.find((item) => item.countryId === countryId);\r\n this.setState({\r\n organization: {\r\n ...this.state.organization,\r\n country: newValue,\r\n countryId: countryId,\r\n region: null,\r\n regionId: null,\r\n cityInfo: null,\r\n cityId: null,\r\n bufferValue: countryBuffer ? countryBuffer.value : null\r\n }\r\n });\r\n };\r\n\r\n private handleRegionChange = (newValue: IReferential | null) => {\r\n this.setState({\r\n organization: {\r\n ...this.state.organization,\r\n region: newValue,\r\n regionId: newValue !== null ? newValue!.id : null,\r\n cityInfo: null,\r\n cityId: null\r\n }\r\n });\r\n };\r\n\r\n private handleCityInfoChange = (newValue: IReferential | null) => {\r\n this.setState({\r\n organization: {\r\n ...this.state.organization,\r\n cityInfo: newValue,\r\n cityId: newValue !== null ? newValue!.id : null\r\n }\r\n });\r\n };\r\n\r\n private handleCategoryPartChange = (newValue: IReferential | null) => {\r\n this.setState({\r\n organization: {\r\n ...this.state.organization,\r\n categoryPart: newValue,\r\n categoryPartId: newValue !== null ? newValue!.id : null\r\n }\r\n });\r\n };\r\n\r\n private handleOrganizationChange = (newValue: Organization | null) => {\r\n this.setState({\r\n organization: {\r\n ...this.state.organization,\r\n parent: newValue,\r\n parentId: newValue !== null ? newValue!.id : 0,\r\n organizationType: newValue !== null ? newValue.organizationType : null\r\n }\r\n });\r\n };\r\n\r\n public saveOrganization = async () => {\r\n try {\r\n if (this.state.organization.id === 0) {\r\n await this.organizationService.AddOrganization(this.state.organization);\r\n } else {\r\n await this.organizationService.UpdateOrganization(this.state.organization);\r\n }\r\n\r\n if (this.props.organizationChanged) {\r\n this.props.organizationChanged();\r\n }\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n handleInputChange = (event: ChangeEvent, fieldName: string) => {\r\n const hourValue = event.target.value.trim();\r\n this.setState({\r\n organization: {\r\n ...this.state.organization,\r\n [fieldName]: hourValue === '' ? null : hourValue\r\n }\r\n });\r\n };\r\n\r\n NumberFormatCustom = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n },\r\n currentTarget: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n allowNegative={false}\r\n thousandSeparator={false}\r\n decimalScale={2}\r\n />\r\n );\r\n };\r\n\r\n isValidTime = (value : string | null) => {\r\n if (value) {\r\n return /^([01]?[0-9]|2[0-3]):[0-5][0-9]$/.test(value);\r\n }\r\n return true;\r\n };\r\n\r\n private getRegionsOptions(): IReferential[] {\r\n const filteredRegions = this.state.regionList.filter(\r\n (region) => (this.state.organization.countryId && region.dependencyId) && region.dependencyId === this.state.organization.countryId\r\n );\r\n\r\n return filteredRegions || [];\r\n }\r\n\r\n private getCitiesOptions(): IReferential[] {\r\n const filteredCities = this.state.cityList.filter(\r\n (city) => (this.state.organization.regionId && city.dependencyId) && city.dependencyId === this.state.organization.regionId\r\n );\r\n\r\n return filteredCities || [];\r\n }\r\n\r\n public hasRole = (roleCode: string): boolean => {\r\n return this.props.appState.appUser?.userRole?.code === roleCode;\r\n };\r\n\r\n public renderForm() {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n this.handleOrganizationLevelTypeChange(newValue)\r\n }\r\n getOptionLabel={(option: OrganizationLevelType) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n \r\n this.handleOrganizationChange(newValue)\r\n }\r\n getOptionLabel={(option: Organization) => option.name || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n \r\n this.handleOrganizationTypeChange(newValue)\r\n }\r\n getOptionLabel={(option: OrganizationType) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n \r\n this.setState({\r\n organization: {\r\n ...this.state.organization!,\r\n newFeature: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate('COPY_CASE', 'Copiaza dosar')}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n hidden={this.hasRight(RoleClaimsEnum.AdminCountryOrganization) || this.hasRight(RoleClaimsEnum.AdminService)}\r\n />\r\n \r\n this.setState({\r\n organization: {\r\n ...this.state.organization!,\r\n uploadFeature: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate('UPLOAD_MESSAGE', 'Caracteristici Upload')}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n hidden={this.hasRight(RoleClaimsEnum.AdminCountryOrganization) || this.hasRight(RoleClaimsEnum.AdminService)}\r\n />\r\n \r\n this.setState({\r\n organization: {\r\n ...this.state.organization!,\r\n showOrderDetails: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate('ORDERS_DIALOG_TITLE', 'Detalii comanda')}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n hidden={this.hasRight(RoleClaimsEnum.AdminCountryOrganization) || this.hasRight(RoleClaimsEnum.AdminService)}\r\n />\r\n\r\n \r\n this.setState({\r\n organization: {\r\n ...this.state.organization!,\r\n changeCaseStatusBasedCalculation: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate('CHANGE_STATUS_BASED_CALCULATION', 'Stare calculatie')}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n hidden={this.hasRight(RoleClaimsEnum.AdminCountryOrganization) || this.hasRight(RoleClaimsEnum.AdminService)}\r\n />\r\n \r\n this.setState({\r\n organization: {\r\n ...this.state.organization!,\r\n bulkNotification: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate('NOTIFICATION_HISTORY_LABEL', 'Notificari cu istoric')}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n hidden={this.hasRight(RoleClaimsEnum.AdminCountryOrganization) || this.hasRight(RoleClaimsEnum.AdminService)}\r\n />\r\n \r\n this.setState({\r\n organization: {\r\n ...this.state.organization!,\r\n isMavoPartener: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate('MAVO_ORG_PARTNER', 'Partener Mavo')}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n hidden={this.hasRight(RoleClaimsEnum.AdminCountryOrganization) || this.hasRight(RoleClaimsEnum.AdminService)}\r\n />\r\n \r\n this.setState({\r\n organization: {\r\n ...this.state.organization!,\r\n isCarfixPartener: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate('CARFIX_ORG_PARTNER', 'Partener Carfix App')}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n \r\n this.setState({\r\n organization: {\r\n ...this.state.organization!,\r\n hasAppointmentWorkflow: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate('CARFIX_ORG_APPOINTMENT_WORKFLOW', 'Programare simpla')}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n \r\n this.setState({\r\n organization: {\r\n ...this.state.organization!,\r\n hasRepairWorkflow: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate('CARFIX_ORG_REPAIR_WORKFLOW', 'Flux Reparatie')}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n \r\n this.setState({\r\n organization: {\r\n ...this.state.organization!,\r\n hasMentainanceWorkflow: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate('CARFIX_ORG_MAINTENANCE_WORKFLOW', 'Flux Mentenanta')}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n \r\n this.setState({\r\n organization: {\r\n ...this.state.organization!,\r\n includeToMvo: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate('INCLUDE_TO_MVO_LABEL', 'Include in MVO')}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n hidden={this.hasRight(RoleClaimsEnum.AdminCountryOrganization) || this.hasRight(RoleClaimsEnum.AdminService)}\r\n />\r\n \r\n this.setState({\r\n organization: {\r\n ...this.state.organization!,\r\n showCaseStatus: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate('SHOW_CASE_STATUS_COLUMN_LABEL', 'Include Coloana Status')}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n hidden={this.hasRight(RoleClaimsEnum.AdminCountryOrganization) || this.hasRight(RoleClaimsEnum.AdminService)}\r\n />\r\n \r\n this.setState({\r\n organization: {\r\n ...this.state.organization!,\r\n hideOrganizationOwnerWorkflows: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate('HIDE_ORGANIZATION_OWNER_WORKFLOWS_COLUMN_LABEL', 'Ascunde fluxuri pe care nu este partener')}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n hidden={this.hasRight(RoleClaimsEnum.AdminCountryOrganization) || this.hasRight(RoleClaimsEnum.AdminService)}\r\n />\r\n \r\n this.setState({\r\n organization: {\r\n ...this.state.organization!,\r\n hidePartnerTab: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate('HIDE_ORGANIZATION_PARTNER_TAB_COLUMN_LABEL', 'Ascunde tab dosare partneri + intern')}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n hidden={this.hasRight(RoleClaimsEnum.AdminCountryOrganization) || this.hasRight(RoleClaimsEnum.AdminService)}\r\n />\r\n \r\n this.setState({\r\n organization: {\r\n ...this.state.organization!,\r\n showMakeModelSearch: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate('ORGANIZATION_SHOW_MAKE_MODEL_SEARCH_COLUMN_LABEL', 'Cautare dupa marca + model in dosare')}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n hidden={this.hasRight(RoleClaimsEnum.AdminCountryOrganization) || this.hasRight(RoleClaimsEnum.AdminService)}\r\n />\r\n \r\n this.setState({\r\n organization: {\r\n ...this.state.organization!,\r\n hideLkqColumns: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate('ORGANIZATION_HIDE_LKQ_COLUMN_LABEL', 'Ascunde coloane LKQ in dosare')}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n hidden={this.hasRight(RoleClaimsEnum.AdminCountryOrganization) || this.hasRight(RoleClaimsEnum.AdminService)}\r\n />\r\n \r\n this.setState({\r\n organization: {\r\n ...this.state.organization!,\r\n hideOrderCurrencyColumn: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate('ORGANIZATION_HIDE_ORDER_CURRENCY_COLUMN_LABEL', 'Ascunde coloana moneda in comenzi')}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n hidden={this.hasRight(RoleClaimsEnum.AdminCountryOrganization) || this.hasRight(RoleClaimsEnum.AdminService)}\r\n />\r\n \r\n this.setState({\r\n organization: {\r\n ...this.state.organization!,\r\n viewOwnerEntries: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate('ORGANIZATION_VIEW_OWNER_ENTRIES', 'Dosare parteneri')}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n hidden={this.hasRight(RoleClaimsEnum.AdminCountryOrganization) || this.hasRight(RoleClaimsEnum.AdminService)}\r\n />\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n this.handleCountryChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n\r\n \r\n \r\n this.handleRegionChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n \r\n this.handleCityInfoChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n this.handleValueChange(e.target.value)}\r\n label={this.translatorService.Tranlate(\r\n 'COUNTRY_BUFFER_ORGANIZATION_VALUE_LABEL',\r\n 'Nr. zile'\r\n )}\r\n validators={['minNumber:0']}\r\n InputProps={{\r\n inputComponent: this.NumberFormatCustom\r\n }}\r\n />\r\n \r\n {this.state.organization.organizationType && this.state.organization.organizationType!.code == OrganizationTypeCode.SUPPLIER && (\r\n \r\n \r\n this.handleCategoryPartChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n )}\r\n \r\n \r\n \r\n\r\n \r\n \r\n {/* Luni-Vineri */}\r\n \r\n {this.translatorService.Tranlate(\r\n 'EDIT_ORGANIZATION_WORK_PROGRAM_MONDAY_TO_FRIDAY_SECTION',\r\n 'Luni-Vineri')} \r\n \r\n \r\n ) => this.handleInputChange(e, 'mondayToFridayOpen')}\r\n error={!this.isValidTime(this.state.organization.mondayToFridayOpen)}\r\n helperText={!this.isValidTime(this.state.organization.mondayToFridayOpen) ? this.translatorService.Tranlate('INVALID_TIME_FORMAT', 'Invalid time format. Please enter a time in HH:mm format.') : \"\"}\r\n fullWidth\r\n validators={['isTimeValid']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('INVALID_TIME_FORMAT', 'Invalid time format. Please enter a time in HH:mm format.')\r\n ]}\r\n disabled={!!this.state.organization.mondayToThursdayOpen || !!this.state.organization.mondayToThursdayClose}\r\n />\r\n \r\n \r\n ) => this.handleInputChange(e, 'mondayToFridayClose')}\r\n error={!this.isValidTime(this.state.organization.mondayToFridayClose)}\r\n helperText={!this.isValidTime(this.state.organization.mondayToFridayClose) ? this.translatorService.Tranlate('INVALID_TIME_FORMAT', 'Invalid time format. Please enter a time in HH:mm format.') : \"\"}\r\n fullWidth\r\n validators={['isTimeValid']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('INVALID_TIME_FORMAT', 'Invalid time format. Please enter a time in HH:mm format.')\r\n ]}\r\n disabled={!!this.state.organization.mondayToThursdayOpen || !!this.state.organization.mondayToThursdayClose}\r\n />\r\n \r\n\r\n {/* Luni-Joi */}\r\n \r\n {this.translatorService.Tranlate(\r\n 'EDIT_ORGANIZATION_WORK_PROGRAM_MONDAY_TO_THURSDAY_SECTION',\r\n 'Luni-Joi')} \r\n \r\n \r\n ) => this.handleInputChange(e, 'mondayToThursdayOpen')}\r\n error={!this.isValidTime(this.state.organization.mondayToThursdayOpen)}\r\n helperText={!this.isValidTime(this.state.organization.mondayToThursdayOpen) ? this.translatorService.Tranlate('INVALID_TIME_FORMAT', 'Invalid time format. Please enter a time in HH:mm format.') : \"\"}\r\n fullWidth\r\n validators={['isTimeValid']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('INVALID_TIME_FORMAT', 'Invalid time format. Please enter a time in HH:mm format.')\r\n ]}\r\n disabled={!!this.state.organization.mondayToFridayOpen || !!this.state.organization.mondayToFridayClose}\r\n />\r\n \r\n \r\n ) => this.handleInputChange(e, 'mondayToThursdayClose')}\r\n error={!this.isValidTime(this.state.organization.mondayToThursdayClose)}\r\n helperText={!this.isValidTime(this.state.organization.mondayToThursdayClose) ? this.translatorService.Tranlate('INVALID_TIME_FORMAT', 'Invalid time format. Please enter a time in HH:mm format.') : \"\"}\r\n fullWidth\r\n validators={['isTimeValid']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('INVALID_TIME_FORMAT', 'Invalid time format. Please enter a time in HH:mm format.')\r\n ]}\r\n disabled={!!this.state.organization.mondayToFridayOpen || !!this.state.organization.mondayToFridayClose}\r\n />\r\n \r\n\r\n {/* Vineri */}\r\n \r\n {this.translatorService.Tranlate(\r\n 'EDIT_ORGANIZATION_WORK_PROGRAM_FRIDAY_SECTION',\r\n 'Vineri')} \r\n \r\n \r\n ) => this.handleInputChange(e, 'fridayOpen')}\r\n error={!this.isValidTime(this.state.organization.fridayOpen)}\r\n helperText={!this.isValidTime(this.state.organization.fridayOpen) ? this.translatorService.Tranlate('INVALID_TIME_FORMAT', 'Invalid time format. Please enter a time in HH:mm format.') : \"\"}\r\n fullWidth\r\n validators={['isTimeValid']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('INVALID_TIME_FORMAT', 'Invalid time format. Please enter a time in HH:mm format.')\r\n ]}\r\n disabled={!!this.state.organization.mondayToFridayOpen || !!this.state.organization.mondayToFridayClose}\r\n />\r\n \r\n \r\n ) => this.handleInputChange(e, 'fridayClose')}\r\n error={!this.isValidTime(this.state.organization.fridayClose)}\r\n helperText={!this.isValidTime(this.state.organization.fridayClose) ? this.translatorService.Tranlate('INVALID_TIME_FORMAT', 'Invalid time format. Please enter a time in HH:mm format.') : \"\"}\r\n fullWidth\r\n validators={['isTimeValid']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('INVALID_TIME_FORMAT', 'Invalid time format. Please enter a time in HH:mm format.')\r\n ]}\r\n disabled={!!this.state.organization.mondayToFridayOpen || !!this.state.organization.mondayToFridayClose}\r\n />\r\n \r\n\r\n {/* Sambata */}\r\n \r\n {this.translatorService.Tranlate(\r\n 'EDIT_ORGANIZATION_WORK_PROGRAM_SATURDAY_SECTION',\r\n 'Sambata')} \r\n \r\n \r\n ) => this.handleInputChange(e, 'saturdayOpen')}\r\n error={!this.isValidTime(this.state.organization.saturdayOpen)}\r\n helperText={!this.isValidTime(this.state.organization.saturdayOpen) ? this.translatorService.Tranlate('INVALID_TIME_FORMAT', 'Invalid time format. Please enter a time in HH:mm format.') : \"\"}\r\n fullWidth\r\n validators={['isTimeValid']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('INVALID_TIME_FORMAT', 'Invalid time format. Please enter a time in HH:mm format.')\r\n ]}\r\n />\r\n \r\n \r\n ) => this.handleInputChange(e, 'saturdayClose')}\r\n error={!this.isValidTime(this.state.organization.saturdayClose)}\r\n helperText={!this.isValidTime(this.state.organization.saturdayClose) ? this.translatorService.Tranlate('INVALID_TIME_FORMAT', 'Invalid time format. Please enter a time in HH:mm format.') : \"\"}\r\n fullWidth\r\n validators={['isTimeValid']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('INVALID_TIME_FORMAT', 'Invalid time format. Please enter a time in HH:mm format.')\r\n ]}\r\n />\r\n \r\n \r\n \r\n\r\n
\r\n \r\n {this.translatorService.Tranlate('EDIT_ORGANIZATION_CANCEL_BTN', 'Anuleaza')}\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n\r\n onTabChange = (event: any, newValue: number) => {\r\n this.setState({ selectedTab: newValue });\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? this.renderForm() : null}\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalEditOrganizationsProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\nexport default connect(\r\n (state: ApplicationState) => ({ appState: state.app }),\r\n { ...AppUserAdminActionCreators, ...AppActionCreators },\r\n mergeProps\r\n)(withSnackbar(EditOrganization as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { Organization } from '../../../interfaces/Organization';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport { IOrganizationService } from '../../../services/Interfaces/IOrganizationService';\r\nimport {\r\n Box,\r\n Switch,\r\n Button,\r\n Tooltip,\r\n IconButton,\r\n Dialog,\r\n DialogTitle,\r\n DialogContent,\r\n Typography,\r\n Grid\r\n} from '@material-ui/core';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport MUIDataTable, {\r\n MUIDataTableColumnOptions,\r\n MUIDataTableMeta,\r\n SelectableRows\r\n} from 'mui-datatables';\r\nimport moment from 'moment';\r\nimport { MUITranslations } from '../../../helpers/MUITableTranslations';\r\nimport AddCircleTwoToneIcon from '@material-ui/icons/AddCircleTwoTone';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { IReferential } from '../../../interfaces/IReferential';\r\nimport { isNullOrUndefined } from 'util';\r\nimport EditOrganization from './EditOrganization';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport { RoleClaimsEnum } from '../../../helpers/Constants';\r\n\r\ninterface IOrganizationEntitiesState {\r\n organizations: Organization[];\r\n isLoading: boolean;\r\n isOpenDialog: boolean;\r\n selectedOrganizationId: number;\r\n}\r\n\r\ntype IOrganizationEntitiesPros = { appState: AppState } & ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass OrganizationEntities extends React.PureComponent<\r\n IOrganizationEntitiesPros,\r\n IOrganizationEntitiesState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private organizationService!: IOrganizationService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n organizations: [],\r\n isLoading: false,\r\n isOpenDialog: false,\r\n selectedOrganizationId: 0\r\n } as IOrganizationEntitiesState;\r\n\r\n public componentDidMount() {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n\r\n if (Number.isNaN(hoId)) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadOrganizations();\r\n }\r\n );\r\n }\r\n\r\n loadOrganizations = async () => {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n\r\n if (Number.isNaN(hoId)) {\r\n return;\r\n }\r\n\r\n const orgList = await this.organizationService.GetOrganizationsByHO(hoId, null);\r\n\r\n this.setState({\r\n organizations: orgList,\r\n isLoading: false\r\n });\r\n };\r\n\r\n onRowClick = (e: any, id: number) => {\r\n this.editOrganization(id);\r\n };\r\n\r\n handleIsActiveChange = async (\r\n event: React.ChangeEvent,\r\n tableMeta: MUIDataTableMeta\r\n ) => {\r\n const id = tableMeta.rowData[0];\r\n const newOrganizations = [...this.state.organizations];\r\n const updatedOrgIndex = newOrganizations.findIndex((o) => o.id === id);\r\n\r\n if (updatedOrgIndex >= 0) {\r\n newOrganizations[updatedOrgIndex] = {\r\n ...newOrganizations[updatedOrgIndex],\r\n isActive: event.target.checked\r\n };\r\n\r\n try {\r\n await this.organizationService.UpdateOrganization(newOrganizations[updatedOrgIndex]);\r\n\r\n this.setState({ organizations: newOrganizations });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n};\r\n\r\n\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'name',\r\n label: this.translatorService.Tranlate(\r\n 'ORGANIZATIONS_ORGANIZATION_NAME_HEADER',\r\n 'Organizatie'\r\n ),\r\n options: {\r\n filter: false,\r\n sort: false,\r\n customBodyRender: (value: string, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.onRowClick(e, tableMeta.rowData[0])}\r\n >\r\n {value}\r\n \r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'organizationLevelType',\r\n label: this.translatorService.Tranlate(\r\n 'ORGANIZATION_ENTITIES_HIERARCHY_LEVEL',\r\n 'Nivel ierarhic'\r\n ),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: IReferential) => {\r\n return value.displayName;\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'parent',\r\n label: this.translatorService.Tranlate(\r\n 'ORGANIZATIONS_ORGANIZATION_PARENT_HEADER',\r\n 'Entitate Superioara'\r\n ),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: Organization) => {\r\n return isNullOrUndefined(value) ? '' : value.name;\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'dateModification',\r\n label: this.translatorService.Tranlate(\r\n 'ORGANIZATIONS_DATE_MODIFICATION_HEADER',\r\n 'Data Modificare'\r\n ),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: Date) =>\r\n moment.utc(value).local().format(this.props.appState.longDateFormat)\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'isActive',\r\n label: this.translatorService.Tranlate('USERS_IS_ACTIVE_HEADER', 'Activ'),\r\n options: {\r\n sort: false,\r\n filterOptions: {\r\n names: [\r\n this.translatorService.Tranlate('TABLE_IS_ACTIVE_COLUMN_ACTIVE', 'Activ'),\r\n this.translatorService.Tranlate('TABLE_IS_ACTIVE_COLUMN_INACTIVE', 'Inactiv')\r\n ],\r\n logic(isActive: any, filterVal: string[]) {\r\n const show =\r\n (filterVal.indexOf(this.names[0]) !== -1 && isActive === true) ||\r\n (filterVal.indexOf(this.names[1]) !== -1 && isActive === false);\r\n return !show;\r\n }\r\n },\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n <>\r\n this.handleIsActiveChange(e, tableMeta)}\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n { \r\n this.hasRight(RoleClaimsEnum.AdminCountryOrganization) || this.hasRight(RoleClaimsEnum.AdminService) ?\r\n (\r\n value ? this.translatorService.Tranlate('ORGANIZATION_ENTITY_ENABLED', 'Enabled') : \r\n this.translatorService.Tranlate('ORGANIZATION_ENTITY_DISABLED', 'Disabled')\r\n ) : \r\n (\r\n ''\r\n )\r\n }\r\n \r\n );\r\n }\r\n }\r\n }\r\n ];\r\n\r\n return columns;\r\n };\r\n\r\n editOrganization = (id: number) => {\r\n this.setState({ isOpenDialog: true, selectedOrganizationId: id });\r\n };\r\n\r\n handleClose = (reload: boolean) => {\r\n if (reload) {\r\n this.setState({ isOpenDialog: false }, async () => {\r\n await this.loadOrganizations();\r\n });\r\n } else {\r\n this.setState({ isOpenDialog: false });\r\n }\r\n };\r\n\r\n \r\n public hasRight = (right: string): boolean => {\r\n return this.props.appState!.user!.profile.role.includes(right);\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n\r\n const options = {\r\n filter: true,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n sort: false,\r\n // responsive: \"stacked\",\r\n customToolbar: () => {\r\n return (\r\n this.hasRight(RoleClaimsEnum.AdminService) ? null : (\r\n \r\n {\r\n this.setState({ selectedOrganizationId: 0, isOpenDialog: true });\r\n }}\r\n >\r\n \r\n \r\n \r\n ) \r\n );\r\n }\r\n };\r\n\r\n return (\r\n \r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n ) : null}\r\n
\r\n\r\n \r\n \r\n \r\n \r\n \r\n {this.translatorService.Tranlate(\r\n 'ORGANIZATION_EDIT_MODAL_TITLE',\r\n 'Editare Organizatie'\r\n )}\r\n \r\n \r\n \r\n this.handleClose(false)}\r\n size={'small'}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n this.handleClose(true)}\r\n />\r\n \r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app\r\n }),\r\n null\r\n)(withSnackbar(OrganizationEntities as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { OrganizationLevelType, OrganizationLevel } from '../../../interfaces/Organization';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport { IOrganizationService } from '../../../services/Interfaces/IOrganizationService';\r\nimport { Box, Button, IconButton, Card, CardContent } from '@material-ui/core';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport MUIDataTable, {\r\n MUIDataTableColumnOptions,\r\n MUIDataTableMeta,\r\n SelectableRows\r\n} from 'mui-datatables';\r\nimport moment from 'moment';\r\nimport { MUITranslations } from '../../../helpers/MUITableTranslations';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { IReferential } from '../../../interfaces/IReferential';\r\nimport { ValidatorForm, TextValidator } from 'react-material-ui-form-validator';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport Referentials from '../../../helpers/Referentials.json';\r\nimport { ReferentialCode } from '../../../helpers/Constants';\r\nimport DeleteOutlineTwoToneIcon from '@material-ui/icons/DeleteOutlineTwoTone';\r\nimport KeyboardArrowDownIcon from '@material-ui/icons/KeyboardArrowDown';\r\nimport KeyboardArrowUpIcon from '@material-ui/icons/KeyboardArrowUp';\r\n\r\ninterface IOrganizationHierarchyState {\r\n organizationLevels: OrganizationLevel[];\r\n isLoading: boolean;\r\n organizationLevelTypes: OrganizationLevelType[];\r\n selectedOrganizationLevelType: OrganizationLevelType | null;\r\n organizationId: number;\r\n}\r\n\r\ntype IOrganizationHierarchyPros = { appState: AppState } & ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass OrganizationHierarchy extends React.PureComponent<\r\n IOrganizationHierarchyPros,\r\n IOrganizationHierarchyState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private organizationService!: IOrganizationService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n organizationLevels: [],\r\n isLoading: false,\r\n organizationLevelTypes: [],\r\n selectedOrganizationLevelType: null,\r\n organizationId: 0\r\n } as IOrganizationHierarchyState;\r\n\r\n public componentDidMount() {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n\r\n if (Number.isNaN(hoId)) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadOrganizationLevels();\r\n }\r\n );\r\n }\r\n\r\n loadOrganizationLevels = async () => {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n\r\n if (Number.isNaN(hoId)) {\r\n return;\r\n }\r\n const ref = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.OrganizationLevel\r\n );\r\n\r\n const orgList = await this.organizationService.GetOrganizationLevels(hoId);\r\n const orgLevelTypes = await this.appReferentialService.Get(ref!.baseUrl);\r\n\r\n const filterLevels = this.filterLevelTypes(\r\n orgList,\r\n orgLevelTypes as any as OrganizationLevelType[]\r\n );\r\n\r\n this.setState({\r\n organizationLevels: orgList.sort(function (a, b) {\r\n return a.order - b.order;\r\n }),\r\n organizationLevelTypes: filterLevels,\r\n isLoading: false,\r\n organizationId: hoId\r\n });\r\n };\r\n\r\n filterLevelTypes = (orglevels: OrganizationLevel[], levelTypes: OrganizationLevelType[]) => {\r\n return levelTypes.filter(\r\n (item) =>\r\n orglevels.find((r) => r.organizationLevelTypeId === item.id) === undefined &&\r\n item.isActive === true\r\n ) as OrganizationLevelType[];\r\n };\r\n\r\n deleteOrgLevel = async (event: any, tableMeta: MUIDataTableMeta) => {\r\n try {\r\n const id = tableMeta.rowData[0];\r\n\r\n await this.organizationService.RemoveOrganizationLevel(id);\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n () => {\r\n this.loadOrganizationLevels();\r\n }\r\n );\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n moveUp = async (event: any, tableMeta: MUIDataTableMeta) => {\r\n const id = tableMeta.rowData[0];\r\n const cloneArray = [...this.state.organizationLevels];\r\n const itemToMoveUpIndex = cloneArray.findIndex((item) => item.id === id);\r\n\r\n if (itemToMoveUpIndex === -1) {\r\n return;\r\n }\r\n if (cloneArray[itemToMoveUpIndex].order === 1) {\r\n return;\r\n }\r\n\r\n const itemToMoveDownIndex = cloneArray.findIndex(\r\n (item) => item.order === cloneArray[itemToMoveUpIndex].order - 1\r\n );\r\n\r\n cloneArray[itemToMoveUpIndex] = {\r\n ...cloneArray[itemToMoveUpIndex],\r\n order: cloneArray[itemToMoveUpIndex].order - 1\r\n };\r\n cloneArray[itemToMoveDownIndex] = {\r\n ...cloneArray[itemToMoveDownIndex],\r\n order: cloneArray[itemToMoveDownIndex].order + 1\r\n };\r\n\r\n try {\r\n await this.organizationService.UpdateOrganizationLevel(cloneArray[itemToMoveUpIndex]);\r\n await this.organizationService.UpdateOrganizationLevel(cloneArray[itemToMoveDownIndex]);\r\n\r\n this.setState({\r\n organizationLevels: cloneArray.sort(function (a, b) {\r\n return a.order - b.order;\r\n })\r\n });\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n moveDown = async (event: any, tableMeta: MUIDataTableMeta) => {\r\n const id = tableMeta.rowData[0];\r\n const cloneArray = [...this.state.organizationLevels];\r\n const itemToMoveIndex = cloneArray.findIndex((item) => item.id === id);\r\n\r\n if (itemToMoveIndex === -1) {\r\n return;\r\n }\r\n if (cloneArray[itemToMoveIndex].order === cloneArray.length) {\r\n return;\r\n }\r\n\r\n const itemToMoveToIndex = cloneArray.findIndex(\r\n (item) => item.order === cloneArray[itemToMoveIndex].order + 1\r\n );\r\n\r\n cloneArray[itemToMoveIndex] = {\r\n ...cloneArray[itemToMoveIndex],\r\n order: cloneArray[itemToMoveIndex].order + 1\r\n };\r\n cloneArray[itemToMoveToIndex] = {\r\n ...cloneArray[itemToMoveToIndex],\r\n order: cloneArray[itemToMoveToIndex].order - 1\r\n };\r\n\r\n try {\r\n await this.organizationService.UpdateOrganizationLevel(cloneArray[itemToMoveIndex]);\r\n await this.organizationService.UpdateOrganizationLevel(cloneArray[itemToMoveToIndex]);\r\n\r\n this.setState({\r\n organizationLevels: cloneArray.sort(function (a, b) {\r\n return a.order - b.order;\r\n })\r\n });\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'organizationLevelType',\r\n label: this.translatorService.Tranlate(\r\n 'ORGANIZATIONS_ORGANIZATION_NAME_HEADER',\r\n 'Organizatie'\r\n ),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: IReferential) => {\r\n return value.displayName;\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'dateModification',\r\n label: this.translatorService.Tranlate(\r\n 'ORGANIZATIONS_DATE_MODIFICATION_HEADER',\r\n 'Data Modificare'\r\n ),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: Date) =>\r\n moment.utc(value).local().format(this.props.appState.longDateFormat)\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'order',\r\n sortDirection: 'asc',\r\n label: this.translatorService.Tranlate('ORGANIZATION_HIERARCHY_ORDER_HEADER', 'Ord'),\r\n options: { sort: false }\r\n },\r\n {\r\n name: '',\r\n options: {\r\n setCellHeaderProps: () => ({ align: 'center' }),\r\n setCellProps: () => ({ align: 'center' }),\r\n sortOrder: {\r\n name: 'order',\r\n direction: 'asc'\r\n },\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n \r\n this.moveUp(e, tableMeta)}>\r\n \r\n \r\n this.moveDown(e, tableMeta)}\r\n >\r\n \r\n \r\n \r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: '',\r\n options: {\r\n setCellHeaderProps: () => ({ align: 'center' }),\r\n setCellProps: () => ({ align: 'center' }),\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.deleteOrgLevel(e, tableMeta)}\r\n >\r\n \r\n \r\n );\r\n }\r\n }\r\n }\r\n ];\r\n\r\n return columns;\r\n };\r\n\r\n addOrgLevel = async () => {\r\n try {\r\n await this.organizationService.AddOrganizationLevel({\r\n order: this.state.organizationLevels.length + 1,\r\n organizationLevelTypeId: this.state.selectedOrganizationLevelType!.id,\r\n organizationId: this.state.organizationId\r\n } as OrganizationLevel);\r\n\r\n this.setState(\r\n {\r\n isLoading: true,\r\n selectedOrganizationLevelType: null\r\n },\r\n () => {\r\n this.loadOrganizationLevels();\r\n }\r\n );\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n handleAutocompleteChange = (newValue: OrganizationLevelType | null) => {\r\n this.setState({ selectedOrganizationLevelType: newValue });\r\n };\r\n\r\n public renderAddForm() {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n this.handleAutocompleteChange(newValue)\r\n }\r\n getOptionLabel={(option: OrganizationLevelType) => option.displayName}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n const options = {\r\n filter: false,\r\n search: false,\r\n viewColumns: false,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n elevation: 1\r\n // responsive: \"stacked\",\r\n // customToolbar: () => {\r\n // return (\r\n // \r\n // { this.props.history.push(\"/admin/users/new\") }}>\r\n // \r\n // \r\n // )\r\n // }\r\n };\r\n\r\n return (\r\n \r\n {this.renderAddForm()}\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n ) : null}\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app\r\n }),\r\n null\r\n)(withSnackbar(OrganizationHierarchy as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState } from '../../../store';\r\nimport { withSnackbar } from 'notistack';\r\nimport { Card, Tabs, Tab, CardContent, Box } from '@material-ui/core';\r\nimport TabPanel from '../../_shared/Tabs';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { IOrganizationService } from '../../../services/Interfaces/IOrganizationService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport OrganizationEntities from '../organizations/OrganizationEntities';\r\nimport OrganizationHierarchy from '../organizations/OrganizationHierarchy';\r\nimport { RoleClaimsEnum, RoleCodeEnum } from '../../../helpers/Constants';\r\n\r\ninterface IOrganizationDetailsTabState {\r\n selectedTab: number;\r\n}\r\nclass OrganizationDetailsTab extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private organizationService!: IOrganizationService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = { selectedTab: 0 };\r\n\r\n onTabChange = (event: any, newValue: number) => {\r\n this.setState({ selectedTab: newValue });\r\n };\r\n\r\n public hasRight = (right: string): boolean => {\r\n return this.props.appState!.user!.profile.role.includes(right);\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app\r\n }),\r\n null\r\n)(withSnackbar(OrganizationDetailsTab as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { withSnackbar } from 'notistack';\r\nimport { ApplicationState } from '../../../store';\r\nimport TreeView from '@material-ui/lab/TreeView';\r\nimport ExpandMoreIcon from '@material-ui/icons/ExpandMore';\r\nimport ChevronRightIcon from '@material-ui/icons/ChevronRight';\r\nimport TreeItem from '@material-ui/lab/TreeItem';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { IOrganizationService } from '../../../services/Interfaces/IOrganizationService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport { Organization } from '../../../interfaces/Organization';\r\nimport { Typography, Box, CardContent, Card, Tabs, Tab } from '@material-ui/core';\r\nimport { IAppUserService } from '../../../services/Interfaces/IAppUserService';\r\nimport { AppUser } from '../../../interfaces/AppUser';\r\nimport { ScaleLoader } from 'react-spinners';\r\n\r\ninterface IOrganizationUsersState {\r\n hoOrganization: Organization | null;\r\n organizations: Organization[];\r\n users: AppUser[];\r\n ids: string[];\r\n isLoading: boolean;\r\n}\r\nclass OrganizationUsers extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private organizationService!: IOrganizationService;\r\n private appUserService!: IAppUserService;\r\n\r\n static contextType = ApplicationContext;\r\n state = {\r\n hoOrganization: null,\r\n organizations: [] as Organization[],\r\n users: [] as AppUser[],\r\n ids: [] as string[],\r\n isLoading: true\r\n };\r\n\r\n public async componentDidMount() {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n const [organizations, users] = await Promise.all([\r\n this.organizationService.GetOrganizationsByHO(hoId, null),\r\n this.appUserService.GetAppUsers()\r\n ]);\r\n\r\n const organization = organizations.find((item) => item.id === hoId);\r\n\r\n this.setState({\r\n hoOrganization: organization === undefined ? null : organization,\r\n organizations: organizations,\r\n ids: organizations.map((item) => item.id.toString()),\r\n users: users.users.filter(\r\n (user) =>\r\n user.organization!.hoId === organization!.id || user.organizationId === organization!.id\r\n ),\r\n isLoading: false\r\n });\r\n }\r\n\r\n renderTree = (nodes: Organization | null) => {\r\n if (nodes === null) {\r\n return;\r\n }\r\n\r\n const users = this.state.users.filter((u) => u.organization!.id === nodes.id);\r\n\r\n nodes.childOrganizations = this.state.organizations.filter(\r\n (item) => item.parentId === nodes.id\r\n );\r\n\r\n return (\r\n \r\n \r\n {nodes.name}\r\n \r\n \r\n }\r\n >\r\n {users.map((user) => {\r\n return (\r\n \r\n {user.lastName + ' ' + user.firstName}
\r\n \r\n );\r\n })}\r\n {Array.isArray(nodes.childOrganizations)\r\n ? nodes.childOrganizations.map((node) => this.renderTree(node))\r\n : null}\r\n \r\n );\r\n };\r\n\r\n render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.appUserService = (this.context as AppContext).appUserService;\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n\r\n {this.state.isLoading ? null : (\r\n }\r\n defaultExpanded={this.state.ids}\r\n defaultExpandIcon={}\r\n >\r\n {this.renderTree(this.state.hoOrganization)}\r\n \r\n )}\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app\r\n }),\r\n null\r\n)(withSnackbar(OrganizationUsers as any));\r\n","import React, { Fragment } from 'react';\r\nimport {\r\n AppUserAdminActionCreators,\r\n ApplicationState,\r\n AppActionCreators,\r\n AppState\r\n} from '../../../store';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n Box,\r\n TextField,\r\n Card,\r\n CardContent,\r\n Tabs,\r\n Tab,\r\n Switch,\r\n FormControlLabel,\r\n Chip\r\n} from '@material-ui/core';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport { OrganizationInterface } from '../../../interfaces/Organization';\r\nimport { IOrganizationService } from '../../../services/Interfaces/IOrganizationService';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport MaterialTable, { Column, Icons } from 'material-table';\r\nimport ArrowDownward from '@material-ui/icons/ArrowDownward';\r\nimport Check from '@material-ui/icons/Check';\r\nimport ChevronLeft from '@material-ui/icons/ChevronLeft';\r\nimport ChevronRight from '@material-ui/icons/ChevronRight';\r\nimport Clear from '@material-ui/icons/Clear';\r\nimport DeleteOutline from '@material-ui/icons/DeleteOutline';\r\nimport Edit from '@material-ui/icons/Edit';\r\nimport FilterList from '@material-ui/icons/FilterList';\r\nimport FirstPage from '@material-ui/icons/FirstPage';\r\nimport LastPage from '@material-ui/icons/LastPage';\r\nimport Remove from '@material-ui/icons/Remove';\r\nimport SaveAlt from '@material-ui/icons/SaveAlt';\r\nimport Search from '@material-ui/icons/Search';\r\nimport ViewColumn from '@material-ui/icons/ViewColumn';\r\nimport { Label } from 'reactstrap';\r\nimport moment from 'moment';\r\nimport AddCircleTwoToneIcon from '@material-ui/icons/AddCircleTwoTone';\r\nimport { forwardRef } from 'react';\r\n\r\nconst tableIcons = {\r\n Add: forwardRef((props, ref) => ),\r\n Check: forwardRef((props, ref) => ),\r\n Clear: forwardRef((props, ref) => ),\r\n Delete: forwardRef((props, ref) => ),\r\n DetailPanel: forwardRef((props, ref) => ),\r\n Edit: forwardRef((props, ref) => ),\r\n Export: forwardRef((props, ref) => ),\r\n Filter: forwardRef((props, ref) => ),\r\n FirstPage: forwardRef((props, ref) => ),\r\n LastPage: forwardRef((props, ref) => ),\r\n NextPage: forwardRef((props, ref) => ),\r\n PreviousPage: forwardRef((props, ref) => ),\r\n ResetSearch: forwardRef((props, ref) => ),\r\n Search: forwardRef((props, ref) => ),\r\n SortArrow: forwardRef((props, ref) => ),\r\n ThirdStateCheck: forwardRef((props, ref) => ),\r\n ViewColumn: forwardRef((props, ref) => )\r\n} as Icons;\r\n\r\ninterface IOrganizationInterfacesState {\r\n interfaces: OrganizationInterface[];\r\n isLoading: boolean;\r\n organizationId: number;\r\n}\r\n\r\ntype OrganizationInterfacesProps = { appState: AppState } & ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass OrganizationInterfaces extends React.PureComponent<\r\n OrganizationInterfacesProps,\r\n IOrganizationInterfacesState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private organizationService!: IOrganizationService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n interfaces: [],\r\n isLoading: true,\r\n organizationId: 0\r\n } as IOrganizationInterfacesState;\r\n\r\n componentDidMount = () => {\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n () => {\r\n this.loadData();\r\n }\r\n );\r\n };\r\n\r\n loadData = async () => {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n\r\n if (isNaN(hoId)) {\r\n return;\r\n }\r\n\r\n try {\r\n const data = await this.organizationService.GetOrganizationInterfaces(hoId);\r\n\r\n this.setState({\r\n interfaces: data,\r\n isLoading: false,\r\n organizationId: hoId\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n getColumns = () => {\r\n return [\r\n {\r\n field: 'clientAccess',\r\n title: this.translatorService.Tranlate(\r\n 'ORGANIZATION_INTERFACE_CLIENT_ACCESS_HEADER',\r\n 'Acces client'\r\n ),\r\n render: (rowData: any) => {\r\n return (\r\n \r\n }\r\n label={''}\r\n />\r\n );\r\n },\r\n editComponent: (props) => (\r\n props.onChange(e.target.checked)}\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={''}\r\n />\r\n )\r\n } as Column,\r\n {\r\n field: 'supportsOAuth2',\r\n title: this.translatorService.Tranlate(\r\n 'ORGANIZATION_INTERFACE_CLIENT_OAUTH2_HEADER',\r\n 'OAuth2'\r\n ),\r\n render: (rowData: any) => {\r\n return (\r\n \r\n }\r\n label={''}\r\n />\r\n );\r\n },\r\n editComponent: (props) => (\r\n props.onChange(e.target.checked)}\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={''}\r\n />\r\n )\r\n } as Column,\r\n {\r\n field: 'aftSupplier',\r\n title: this.translatorService.Tranlate(\r\n 'ORGANIZATION_INTERFACE_AFT_SUPPLIER_HEADER',\r\n 'Uleiul Grupului'\r\n ),\r\n render: (rowData: any) => {\r\n return (\r\n \r\n }\r\n label={''}\r\n />\r\n );\r\n },\r\n editComponent: (props) => (\r\n props.onChange(e.target.checked)}\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={''}\r\n />\r\n )\r\n } as Column,\r\n {\r\n field: 'smallPartPercentage',\r\n title: this.translatorService.Tranlate('ORGANIZATION_INTERFACE_SMALL_PART_PERCENTAGE_HEADER', 'Piese mici %'),\r\n searchable: true\r\n } as Column,\r\n {\r\n field: 'code',\r\n title: this.translatorService.Tranlate('ORGANIZATION_INTERFACE_CODE_HEADER', 'Cod'),\r\n searchable: true\r\n } as Column,\r\n {\r\n field: 'url',\r\n title: this.translatorService.Tranlate('ORGANIZATION_INTERFACE_URL_HEADER', 'URL'),\r\n searchable: true\r\n } as Column,\r\n {\r\n field: 'port',\r\n title: this.translatorService.Tranlate('ORGANIZATION_INTERFACE_PORT_HEADER', 'Port'),\r\n searchable: true\r\n } as Column,\r\n {\r\n field: 'refreshTokenValidUntil',\r\n title: this.translatorService.Tranlate('ORGANIZATION_INTERFACE_STATUS_HEADER', 'Status'),\r\n editable: 'never',\r\n render: (rowData: OrganizationInterface) => {\r\n if (!rowData.supportsOAuth2) {\r\n return (\r\n \r\n );\r\n }\r\n\r\n if (!rowData.refreshTokenValidUntil) {\r\n return (\r\n \r\n );\r\n }\r\n\r\n if (\r\n rowData.refreshTokenValidUntil &&\r\n moment.utc(rowData.refreshTokenValidUntil).isAfter(moment.utc())\r\n ) {\r\n return (\r\n \r\n );\r\n }\r\n\r\n return (\r\n \r\n );\r\n },\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n editComponent: (props: any) => {\r\n if (!props.rowData.supportsOAuth2) {\r\n return <>;\r\n }\r\n return (\r\n props.onChange(e.target.value)}\r\n />\r\n );\r\n }\r\n } as Column,\r\n {\r\n field: 'userName',\r\n title: this.translatorService.Tranlate('ORGANIZATION_INTERFACE_UER_HEADER', 'Utilizator'),\r\n searchable: true,\r\n render: (props: OrganizationInterface) => {\r\n if (props.clientAccess) {\r\n return '-';\r\n }\r\n\r\n return props.userName;\r\n },\r\n editComponent: (props: any) => {\r\n if (props.rowData.clientAccess) {\r\n return <>;\r\n }\r\n\r\n return (\r\n props.onChange(e.target.value)}\r\n />\r\n );\r\n }\r\n },\r\n {\r\n field: 'password',\r\n title: this.translatorService.Tranlate('ORGANIZATION_INTERFACE_PASSWORD_HEADER', 'Parola'),\r\n render: (props: OrganizationInterface) => {\r\n if (props.clientAccess) {\r\n return '-';\r\n }\r\n return '***';\r\n },\r\n editComponent: (props: any) => {\r\n if (props.rowData.clientAccess) {\r\n return <>;\r\n }\r\n\r\n return (\r\n props.onChange(e.target.value)}\r\n />\r\n );\r\n }\r\n } as Column,\r\n {\r\n field: 'customerId',\r\n title: this.translatorService.Tranlate(\r\n 'ORGANIZATION_INTERFACE_CUSTOMER_ID_HEADER',\r\n 'Client Id'\r\n ),\r\n searchable: true,\r\n render: (props: OrganizationInterface) => {\r\n if (props.clientAccess) {\r\n return '-';\r\n }\r\n\r\n if (props.supportsOAuth2) {\r\n return '***';\r\n }\r\n\r\n return props.customerId;\r\n },\r\n editComponent: (props: any) => {\r\n if (props.rowData.clientAccess) {\r\n return <>;\r\n }\r\n\r\n return (\r\n props.onChange(e.target.value)}\r\n />\r\n );\r\n }\r\n },\r\n {\r\n field: 'secondUser',\r\n title: this.translatorService.Tranlate(\r\n 'ORGANIZATION_INTERFACE_SECOND_USER_HEADER',\r\n 'Utilizator 2'\r\n ),\r\n searchable: true,\r\n render: (props: OrganizationInterface) => {\r\n if (props.clientAccess || props.supportsOAuth2) {\r\n return '-';\r\n }\r\n\r\n return props.secondUser;\r\n },\r\n editComponent: (props: any) => {\r\n if (props.rowData.clientAccess || props.supportsOAuth2) {\r\n return <>;\r\n }\r\n\r\n return (\r\n props.onChange(e.target.value)}\r\n />\r\n );\r\n }\r\n },\r\n {\r\n field: 'token',\r\n title: this.translatorService.Tranlate(\r\n 'ORGANIZATION_INTERFACE_TOKEN_HEADER',\r\n 'Token'\r\n ),\r\n searchable: true,\r\n render: (props: OrganizationInterface) => {\r\n if (props.clientAccess) {\r\n return '-';\r\n }\r\n\r\n if (props.supportsOAuth2) {\r\n return '***';\r\n }\r\n\r\n return props.token;\r\n },\r\n editComponent: (props: any) => {\r\n if (props.rowData.clientAccess || props.supportsOAuth2) {\r\n return <>;\r\n }\r\n\r\n return (\r\n props.onChange(e.target.value)}\r\n />\r\n );\r\n }\r\n }\r\n ];\r\n };\r\n\r\n public getLocalization = () => {\r\n return {\r\n header: { actions: '' },\r\n toolbar: {\r\n searchPlaceholder: this.translatorService.Tranlate('SEARCH', 'Cauta'),\r\n searchTooltip: this.translatorService.Tranlate('SEARCH', 'Cauta')\r\n },\r\n body: {\r\n editTooltip: this.translatorService.Tranlate('EDIT', 'Editeaza'),\r\n deleteTooltip: this.translatorService.Tranlate('DELETE', 'Sterge'),\r\n addTooltip: this.translatorService.Tranlate('Add', 'Adauga'),\r\n emptyDataSourceMessage: this.translatorService.Tranlate(\r\n 'NO_RECORDS_TO_DISPLAY',\r\n 'Nu exista date de afisat'\r\n ),\r\n editRow: {\r\n cancelTooltip: this.translatorService.Tranlate('CANCEL', 'Anuleaza'),\r\n saveTooltip: this.translatorService.Tranlate('SAVE', 'Salveaza'),\r\n deleteText: this.translatorService.Tranlate(\r\n 'DELETE_TEXT',\r\n 'Sigur doriti sa stergeti aceasta inregistrare?'\r\n )\r\n }\r\n },\r\n pagination: {\r\n labelRowsSelect: this.translatorService.Tranlate('ROWS', 'inregistrari'),\r\n firstTooltip: this.translatorService.Tranlate('FIRST_PAGE', 'Prima pagina'),\r\n previousTooltip: this.translatorService.Tranlate('PREVIOUS_PAGE', 'Pagina precedenta'),\r\n nextTooltip: this.translatorService.Tranlate('NEXT_PAGE', 'Pagina urmatoare'),\r\n lastTooltip: this.translatorService.Tranlate('LAST_PAGE', 'Ultima pagina'),\r\n labelDisplayedRows:\r\n '{from}-{to} ' + this.translatorService.Tranlate('OF', 'din') + ' {count}'\r\n }\r\n };\r\n };\r\n\r\n onRowUpdate = (newData: OrganizationInterface, oldData?: OrganizationInterface): Promise =>\r\n new Promise(async (resolve, reject) => {\r\n if (oldData) {\r\n try {\r\n await this.organizationService.UpdateOrganizationInterface(newData);\r\n await this.loadData();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n resolve();\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n }\r\n });\r\n\r\n onRowDelete = (oldData: OrganizationInterface): Promise =>\r\n new Promise(async (resolve, reject) => {\r\n if (oldData) {\r\n try {\r\n await this.organizationService.RemoveOrganizationInterface(oldData.id);\r\n await this.loadData();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n\r\n resolve();\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n }\r\n });\r\n\r\n onRowAdd = (newData: OrganizationInterface): Promise =>\r\n new Promise(async (resolve, reject) => {\r\n try {\r\n newData.organizationId = this.state.organizationId;\r\n\r\n await this.organizationService.AddOrganizationInterface(newData);\r\n await this.loadData();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n resolve();\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n });\r\n\r\n public renderTable = () => {\r\n return (\r\n this.onRowAdd(newData),\r\n onRowUpdate: (newData: any, oldData?: any) => this.onRowUpdate(newData, oldData),\r\n onRowDelete: (oldData: any) => this.onRowDelete(oldData)\r\n }}\r\n />\r\n );\r\n };\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? this.renderTable() : null}\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: OrganizationInterfacesProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\nexport default connect(\r\n (state: ApplicationState) => ({ appState: state.app }),\r\n { ...AppUserAdminActionCreators, ...AppActionCreators },\r\n mergeProps\r\n)(withSnackbar(OrganizationInterfaces as any));\r\n","import React, { Fragment } from 'react';\r\nimport {\r\n AppUserAdminActionCreators,\r\n ApplicationState,\r\n AppActionCreators,\r\n AppState\r\n} from '../../../store';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport { Box, Select, MenuItem, Card, CardContent, Tabs, Tab } from '@material-ui/core';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport { OrganizationParameter } from '../../../interfaces/Organization';\r\nimport { IOrganizationService } from '../../../services/Interfaces/IOrganizationService';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport Referentials from '../../../helpers/Referentials.json';\r\nimport { ReferentialCode } from '../../../helpers/Constants';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport MaterialTable, { Column, EditComponentProps, Icons } from 'material-table';\r\nimport ArrowDownward from '@material-ui/icons/ArrowDownward';\r\nimport Check from '@material-ui/icons/Check';\r\nimport ChevronLeft from '@material-ui/icons/ChevronLeft';\r\nimport ChevronRight from '@material-ui/icons/ChevronRight';\r\nimport Clear from '@material-ui/icons/Clear';\r\nimport DeleteOutline from '@material-ui/icons/DeleteOutline';\r\nimport Edit from '@material-ui/icons/Edit';\r\nimport FilterList from '@material-ui/icons/FilterList';\r\nimport FirstPage from '@material-ui/icons/FirstPage';\r\nimport LastPage from '@material-ui/icons/LastPage';\r\nimport Remove from '@material-ui/icons/Remove';\r\nimport SaveAlt from '@material-ui/icons/SaveAlt';\r\nimport Search from '@material-ui/icons/Search';\r\nimport ViewColumn from '@material-ui/icons/ViewColumn';\r\nimport { Label } from 'reactstrap';\r\nimport moment from 'moment';\r\nimport AddCircleTwoToneIcon from '@material-ui/icons/AddCircleTwoTone';\r\nimport { forwardRef } from 'react';\r\nimport { IReferential } from '../../../interfaces/IReferential';\r\n\r\nconst tableIcons = {\r\n Add: forwardRef((props, ref) => ),\r\n Check: forwardRef((props, ref) => ),\r\n Clear: forwardRef((props, ref) => ),\r\n Delete: forwardRef((props, ref) => ),\r\n DetailPanel: forwardRef((props, ref) => ),\r\n Edit: forwardRef((props, ref) => ),\r\n Export: forwardRef((props, ref) => ),\r\n Filter: forwardRef((props, ref) => ),\r\n FirstPage: forwardRef((props, ref) => ),\r\n LastPage: forwardRef((props, ref) => ),\r\n NextPage: forwardRef((props, ref) => ),\r\n PreviousPage: forwardRef((props, ref) => ),\r\n ResetSearch: forwardRef((props, ref) => ),\r\n Search: forwardRef((props, ref) => ),\r\n SortArrow: forwardRef((props, ref) => ),\r\n ThirdStateCheck: forwardRef((props, ref) => ),\r\n ViewColumn: forwardRef((props, ref) => )\r\n} as Icons;\r\n\r\ninterface IOrganizationParametersState {\r\n parameters: OrganizationParameter[];\r\n isLoading: boolean;\r\n organizationId: number;\r\n parameterTypeList: IReferential[];\r\n}\r\n\r\ntype OrganizationParametersProps = { appState: AppState } & ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass OrganizationParameters extends React.PureComponent<\r\n OrganizationParametersProps,\r\n IOrganizationParametersState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private organizationService!: IOrganizationService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n parameters: [],\r\n isLoading: true,\r\n organizationId: 0,\r\n parameterTypeList: []\r\n } as IOrganizationParametersState;\r\n\r\n componentDidMount = () => {\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n () => {\r\n this.loadData();\r\n }\r\n );\r\n };\r\n\r\n loadData = async () => {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n\r\n if (isNaN(hoId)) {\r\n return;\r\n }\r\n\r\n try {\r\n const ref = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.CompanyParameter\r\n );\r\n const [data, parameterList] = await Promise.all([\r\n this.organizationService.GetOrganizationParameters(hoId),\r\n this.appReferentialService.Get(ref!.baseUrl)\r\n ]);\r\n\r\n this.setState({\r\n parameters: data,\r\n isLoading: false,\r\n organizationId: hoId,\r\n parameterTypeList: parameterList.filter((item) => item.isActive === true)\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n getColumns = () => {\r\n const lookup = this.state.parameterTypeList.reduce(function (\r\n acc: any,\r\n cur: IReferential,\r\n i: number\r\n ) {\r\n acc[cur.id] = cur.displayName;\r\n\r\n return acc;\r\n },\r\n {});\r\n\r\n return [\r\n {\r\n field: 'parameterId',\r\n title: this.translatorService.Tranlate(\r\n 'ORGANIZATION_PARAMETERS_PARAMETER_TYPE_HEADER',\r\n 'Parametru'\r\n ),\r\n searchable: true,\r\n lookup: lookup,\r\n render: (rowData: OrganizationParameter) => {\r\n return rowData.parameter!.displayName;\r\n },\r\n editComponent: (props: EditComponentProps) => {\r\n return (\r\n props.onChange(e.target.value)}\r\n >\r\n {this.state.parameterTypeList.map((item) => (\r\n \r\n {item.displayName}\r\n \r\n ))}\r\n \r\n );\r\n }\r\n } as Column,\r\n {\r\n field: 'value',\r\n title: this.translatorService.Tranlate(\r\n 'ORGANIZATION_PARAMETERS_PARAMETER_VALUE_HEADER',\r\n 'Valoare'\r\n ),\r\n searchable: true\r\n } as Column,\r\n {\r\n field: 'date',\r\n title: this.translatorService.Tranlate(\r\n 'ORGANIZATION_PARAMETERS_PARAMETER_DATE_HEADER',\r\n 'De la'\r\n ),\r\n defaultSort: 'desc',\r\n type: 'date',\r\n searchable: true,\r\n render: (rowData: OrganizationParameter) => {\r\n return moment(rowData.date).format(this.props.appState.dateFormat);\r\n }\r\n } as Column,\r\n {\r\n field: 'dateModification',\r\n title: this.translatorService.Tranlate(\r\n 'ORGANIZATION_PARAMETERS_MODIFIED_DATE_HEADER',\r\n 'Data modificare'\r\n ),\r\n searchable: true,\r\n render: (rowData: any) => {\r\n return moment\r\n .utc(rowData.dateModification)\r\n .local()\r\n .format(this.props.appState.longDateFormat);\r\n },\r\n editComponent: (props: EditComponentProps) => {\r\n return ;\r\n }\r\n } as Column\r\n ];\r\n };\r\n\r\n public getLocalization = () => {\r\n return {\r\n header: { actions: '' },\r\n toolbar: {\r\n searchPlaceholder: this.translatorService.Tranlate('SEARCH', 'Cauta'),\r\n searchTooltip: this.translatorService.Tranlate('SEARCH', 'Cauta')\r\n },\r\n body: {\r\n editTooltip: this.translatorService.Tranlate('EDIT', 'Editeaza'),\r\n deleteTooltip: this.translatorService.Tranlate('DELETE', 'Sterge'),\r\n addTooltip: this.translatorService.Tranlate('Add', 'Adauga'),\r\n emptyDataSourceMessage: this.translatorService.Tranlate(\r\n 'NO_RECORDS_TO_DISPLAY',\r\n 'Nu exista date de afisat'\r\n ),\r\n editRow: {\r\n cancelTooltip: this.translatorService.Tranlate('CANCEL', 'Anuleaza'),\r\n saveTooltip: this.translatorService.Tranlate('SAVE', 'Salveaza'),\r\n deleteText: this.translatorService.Tranlate(\r\n 'DELETE_TEXT',\r\n 'Sigur doriti sa stergeti aceasta inregistrare?'\r\n )\r\n }\r\n },\r\n pagination: {\r\n labelRowsSelect: this.translatorService.Tranlate('ROWS', 'inregistrari'),\r\n firstTooltip: this.translatorService.Tranlate('FIRST_PAGE', 'Prima pagina'),\r\n previousTooltip: this.translatorService.Tranlate('PREVIOUS_PAGE', 'Pagina precedenta'),\r\n nextTooltip: this.translatorService.Tranlate('NEXT_PAGE', 'Pagina urmatoare'),\r\n lastTooltip: this.translatorService.Tranlate('LAST_PAGE', 'Ultima pagina'),\r\n labelDisplayedRows:\r\n '{from}-{to} ' + this.translatorService.Tranlate('OF', 'din') + ' {count}'\r\n }\r\n };\r\n };\r\n\r\n onRowUpdate = (newData: OrganizationParameter, oldData?: OrganizationParameter): Promise =>\r\n new Promise(async (resolve, reject) => {\r\n if (oldData) {\r\n try {\r\n if (moment.isDate(newData.date)) {\r\n newData.date = moment.utc(newData.date.toDateString()).local().toDate();\r\n }\r\n newData.parameter = null;\r\n await this.organizationService.UpdateOrganizationParameter(newData);\r\n await this.loadData();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n resolve();\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n }\r\n });\r\n\r\n onRowDelete = (oldData: OrganizationParameter): Promise =>\r\n new Promise(async (resolve, reject) => {\r\n if (oldData) {\r\n try {\r\n await this.organizationService.RemoveOrganizationParameter(oldData.id);\r\n await this.loadData();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n\r\n resolve();\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n }\r\n });\r\n\r\n onRowAdd = (newData: OrganizationParameter): Promise =>\r\n new Promise(async (resolve, reject) => {\r\n try {\r\n newData.organizationId = this.state.organizationId;\r\n\r\n await this.organizationService.AddOrganizationParameter(newData);\r\n await this.loadData();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n resolve();\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n });\r\n\r\n public renderTable = () => {\r\n return (\r\n this.onRowAdd(newData),\r\n onRowUpdate: (newData: any, oldData?: any) => this.onRowUpdate(newData, oldData),\r\n onRowDelete: (oldData: any) => this.onRowDelete(oldData)\r\n }}\r\n />\r\n );\r\n };\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? this.renderTable() : null}\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: OrganizationParametersProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\nexport default connect(\r\n (state: ApplicationState) => ({ appState: state.app }),\r\n { ...AppUserAdminActionCreators, ...AppActionCreators },\r\n mergeProps\r\n)(withSnackbar(OrganizationParameters as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { OrganizationCaseType } from '../../../../interfaces/Organization';\r\nimport { ITranslatorService } from '../../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../../context/Contexts';\r\nimport { IOrganizationService } from '../../../../services/Interfaces/IOrganizationService';\r\nimport { Box, Button, IconButton, Card, CardContent } from '@material-ui/core';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport MUIDataTable, {\r\n MUIDataTableColumnOptions,\r\n MUIDataTableMeta,\r\n SelectableRows\r\n} from 'mui-datatables';\r\nimport moment from 'moment';\r\nimport { MUITranslations } from '../../../../helpers/MUITableTranslations';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { IReferential } from '../../../../interfaces/IReferential';\r\nimport { ValidatorForm, TextValidator } from 'react-material-ui-form-validator';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport { IReferentialService } from '../../../../services/Interfaces/IReferentialService';\r\nimport Referentials from '../../../../helpers/Referentials.json';\r\nimport { ReferentialCode } from '../../../../helpers/Constants';\r\nimport DeleteOutlineTwoToneIcon from '@material-ui/icons/DeleteOutlineTwoTone';\r\nimport KeyboardArrowDownIcon from '@material-ui/icons/KeyboardArrowDown';\r\nimport KeyboardArrowUpIcon from '@material-ui/icons/KeyboardArrowUp';\r\n\r\ninterface IOrganizationCaseState {\r\n organizationCases: OrganizationCaseType[];\r\n isLoading: boolean;\r\n organizationCaseTypes: IReferential[];\r\n selectedOrganizationCaseType: IReferential | null;\r\n organizationId: number;\r\n}\r\n\r\ntype IOrganizationCaseProps = { appState: AppState } & ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass OrganizationCaseTypeTab extends React.PureComponent<\r\n IOrganizationCaseProps,\r\n IOrganizationCaseState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private organizationService!: IOrganizationService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n organizationCases: [],\r\n isLoading: false,\r\n organizationCaseTypes: [],\r\n selectedOrganizationCaseType: null,\r\n organizationId: 0\r\n } as IOrganizationCaseState;\r\n\r\n public componentDidMount() {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n\r\n if (Number.isNaN(hoId)) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadOrganizationCases();\r\n }\r\n );\r\n }\r\n\r\n loadOrganizationCases = async () => {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n\r\n if (Number.isNaN(hoId)) {\r\n return;\r\n }\r\n const ref = Referentials.referential.find((item) => item.code === ReferentialCode.CaseType);\r\n\r\n const [orgCaseList, orgCaseTypes] = await Promise.all([\r\n this.organizationService.GetOrganizationCaseType(hoId),\r\n this.appReferentialService.Get(ref!.baseUrl)\r\n ]);\r\n\r\n let organizationCases = orgCaseList.sort(function (a, b) {\r\n return a.order - b.order;\r\n });\r\n organizationCases = organizationCases.map((item: OrganizationCaseType) => {\r\n item.caseType = orgCaseTypes.find(\r\n (caseType: IReferential) => caseType.id === item.caseTypeId\r\n )!;\r\n return item;\r\n });\r\n\r\n this.setState({\r\n organizationCases: organizationCases,\r\n organizationCaseTypes: orgCaseTypes.filter((item) => item.isActive === true),\r\n isLoading: false,\r\n organizationId: hoId\r\n });\r\n };\r\n\r\n deleteOrgCase = async (event: any, tableMeta: MUIDataTableMeta) => {\r\n try {\r\n const id = tableMeta.rowData[0];\r\n\r\n await this.organizationService.RemoveOrganizationCaseType(id);\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n () => {\r\n this.loadOrganizationCases();\r\n }\r\n );\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n moveUp = async (event: any, tableMeta: MUIDataTableMeta) => {\r\n const id = tableMeta.rowData[0];\r\n const cloneArray = [...this.state.organizationCases];\r\n const itemToMoveUpIndex = cloneArray.findIndex((item) => item.id === id);\r\n\r\n if (itemToMoveUpIndex === -1) {\r\n return;\r\n }\r\n if (cloneArray[itemToMoveUpIndex].order === 1) {\r\n return;\r\n }\r\n\r\n const itemToMoveDownIndex = cloneArray.findIndex(\r\n (item) => item.order === cloneArray[itemToMoveUpIndex].order - 1\r\n );\r\n\r\n cloneArray[itemToMoveUpIndex] = {\r\n ...cloneArray[itemToMoveUpIndex],\r\n order: cloneArray[itemToMoveUpIndex].order - 1\r\n };\r\n cloneArray[itemToMoveDownIndex] = {\r\n ...cloneArray[itemToMoveDownIndex],\r\n order: cloneArray[itemToMoveDownIndex].order + 1\r\n };\r\n\r\n try {\r\n await this.organizationService.UpdateOrganizationCaseType(cloneArray[itemToMoveUpIndex]);\r\n await this.organizationService.UpdateOrganizationCaseType(cloneArray[itemToMoveDownIndex]);\r\n\r\n this.setState({\r\n organizationCases: cloneArray.sort(function (a, b) {\r\n return a.order - b.order;\r\n })\r\n });\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n moveDown = async (event: any, tableMeta: MUIDataTableMeta) => {\r\n const id = tableMeta.rowData[0];\r\n const cloneArray = [...this.state.organizationCases];\r\n const itemToMoveIndex = cloneArray.findIndex((item) => item.id === id);\r\n\r\n if (itemToMoveIndex === -1) {\r\n return;\r\n }\r\n if (cloneArray[itemToMoveIndex].order === cloneArray.length) {\r\n return;\r\n }\r\n\r\n const itemToMoveToIndex = cloneArray.findIndex(\r\n (item) => item.order === cloneArray[itemToMoveIndex].order + 1\r\n );\r\n\r\n cloneArray[itemToMoveIndex] = {\r\n ...cloneArray[itemToMoveIndex],\r\n order: cloneArray[itemToMoveIndex].order + 1\r\n };\r\n cloneArray[itemToMoveToIndex] = {\r\n ...cloneArray[itemToMoveToIndex],\r\n order: cloneArray[itemToMoveToIndex].order - 1\r\n };\r\n\r\n try {\r\n await this.organizationService.UpdateOrganizationCaseType(cloneArray[itemToMoveIndex]);\r\n await this.organizationService.UpdateOrganizationCaseType(cloneArray[itemToMoveToIndex]);\r\n\r\n this.setState({\r\n organizationCases: cloneArray.sort(function (a, b) {\r\n return a.order - b.order;\r\n })\r\n });\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'caseType',\r\n label: this.translatorService.Tranlate('ORGANIZATIONS_CASE_TYPE_HEADER', 'Tip dosar'),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: IReferential) => {\r\n return value.displayName;\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'dateModification',\r\n label: this.translatorService.Tranlate(\r\n 'ORGANIZATIONS_DATE_MODIFICATION_HEADER',\r\n 'Data Modificare'\r\n ),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: Date) =>\r\n moment.utc(value).local().format(this.props.appState.longDateFormat)\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'order',\r\n sortDirection: 'asc',\r\n label: this.translatorService.Tranlate('ORGANIZATION_CASE_ORDER_HEADER', 'Ord'),\r\n options: { sort: false }\r\n },\r\n {\r\n name: '',\r\n options: {\r\n setCellHeaderProps: () => ({ align: 'center' }),\r\n setCellProps: () => ({ align: 'center' }),\r\n sortOrder: {\r\n name: 'order',\r\n direction: 'asc'\r\n },\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n \r\n this.moveUp(e, tableMeta)}>\r\n \r\n \r\n this.moveDown(e, tableMeta)}\r\n >\r\n \r\n \r\n \r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: '',\r\n options: {\r\n setCellHeaderProps: () => ({ align: 'center' }),\r\n setCellProps: () => ({ align: 'center' }),\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.deleteOrgCase(e, tableMeta)}\r\n >\r\n \r\n \r\n );\r\n }\r\n }\r\n }\r\n ];\r\n\r\n return columns;\r\n };\r\n\r\n addOrgCase = async () => {\r\n try {\r\n await this.organizationService.AddOrganizationCaseType({\r\n order: this.state.organizationCases.length + 1,\r\n caseTypeId: this.state.selectedOrganizationCaseType!.id,\r\n organizationId: this.state.organizationId\r\n } as OrganizationCaseType);\r\n\r\n this.setState(\r\n {\r\n isLoading: true,\r\n selectedOrganizationCaseType: null\r\n },\r\n () => {\r\n this.loadOrganizationCases();\r\n }\r\n );\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n handleAutocompleteChange = (newValue: IReferential | null) => {\r\n this.setState({ selectedOrganizationCaseType: newValue });\r\n };\r\n\r\n public renderAddForm() {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n this.handleAutocompleteChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n const options = {\r\n filter: false,\r\n search: false,\r\n viewColumns: false,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n elevation: 1\r\n };\r\n\r\n return (\r\n \r\n {this.renderAddForm()}\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n ) : null}\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app\r\n }),\r\n null\r\n)(withSnackbar(OrganizationCaseTypeTab as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport {\r\n OrganizationCaseType,\r\n OrganizationCaseTypeStep\r\n} from '../../../../interfaces/Organization';\r\nimport { ITranslatorService } from '../../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../../context/Contexts';\r\nimport { IOrganizationService } from '../../../../services/Interfaces/IOrganizationService';\r\nimport { Box, Button, IconButton, Card, CardContent } from '@material-ui/core';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport MUIDataTable, {\r\n MUIDataTableColumnOptions,\r\n MUIDataTableMeta,\r\n SelectableRows\r\n} from 'mui-datatables';\r\nimport moment from 'moment';\r\nimport { MUITranslations } from '../../../../helpers/MUITableTranslations';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { IReferential } from '../../../../interfaces/IReferential';\r\nimport { ValidatorForm, TextValidator } from 'react-material-ui-form-validator';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport { IReferentialService } from '../../../../services/Interfaces/IReferentialService';\r\nimport Referentials from '../../../../helpers/Referentials.json';\r\nimport { ReferentialCode } from '../../../../helpers/Constants';\r\nimport DeleteOutlineTwoToneIcon from '@material-ui/icons/DeleteOutlineTwoTone';\r\nimport KeyboardArrowDownIcon from '@material-ui/icons/KeyboardArrowDown';\r\nimport KeyboardArrowUpIcon from '@material-ui/icons/KeyboardArrowUp';\r\n\r\ninterface IOrganizationCaseTypeStepState {\r\n organizationCaseTypeSteps: OrganizationCaseTypeStep[];\r\n isLoading: boolean;\r\n organizationCaseTypes: OrganizationCaseType[];\r\n organizationCaseStepTypes: IReferential[];\r\n selectedOrganizationCaseType: OrganizationCaseType | null;\r\n selectedOrganizationCaseStepType: IReferential | null;\r\n organizationId: number;\r\n}\r\n\r\ntype IOrganizationCaseTypeStepProps = { appState: AppState } & ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass OrganizationCaseTypeStepTab extends React.PureComponent<\r\n IOrganizationCaseTypeStepProps,\r\n IOrganizationCaseTypeStepState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private organizationService!: IOrganizationService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n organizationCaseTypeSteps: [],\r\n isLoading: false,\r\n organizationCaseTypes: [],\r\n organizationCaseStepTypes: [],\r\n selectedOrganizationCaseType: null,\r\n selectedOrganizationCaseStepType: null,\r\n organizationId: 0\r\n } as IOrganizationCaseTypeStepState;\r\n\r\n public componentDidMount() {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n\r\n if (Number.isNaN(hoId)) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadOrganizationSteps(null);\r\n }\r\n );\r\n }\r\n\r\n loadOrganizationSteps = async (caseTypeId: number | null) => {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n\r\n if (Number.isNaN(hoId)) {\r\n return;\r\n }\r\n const refCaseType = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.CaseType\r\n );\r\n const refSteps = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.NewCaseSteps\r\n );\r\n\r\n const [orgCaseList, orgCaseTypes, orgStepList, orgStepTypes] = await Promise.all([\r\n this.organizationService.GetOrganizationCaseType(hoId),\r\n this.appReferentialService.Get(refCaseType!.baseUrl),\r\n caseTypeId === null ? [] : this.organizationService.GetOrganizationCaseTypeStep(caseTypeId),\r\n this.appReferentialService.Get(refSteps!.baseUrl)\r\n ]);\r\n\r\n const orgCaseList1 = orgCaseList.map((item: OrganizationCaseType) => {\r\n item.caseType = orgCaseTypes.find(\r\n (caseType: IReferential) => caseType.id === item.caseTypeId\r\n )!;\r\n return item;\r\n });\r\n\r\n this.setState({\r\n organizationCaseTypeSteps: orgStepList.sort(function (a, b) {\r\n return a.order - b.order;\r\n }),\r\n organizationCaseTypes: orgCaseList1,\r\n organizationCaseStepTypes: orgStepTypes.filter((item) => item.isActive === true),\r\n isLoading: false,\r\n organizationId: hoId\r\n });\r\n };\r\n\r\n reloadOrganizationSteps = async (caseTypeId: number | null) => {\r\n const [orgStepList] = await Promise.all([\r\n caseTypeId === null ? [] : this.organizationService.GetOrganizationCaseTypeStep(caseTypeId)\r\n ]);\r\n\r\n this.setState({\r\n organizationCaseTypeSteps: orgStepList.sort(function (a, b) {\r\n return a.order - b.order;\r\n }),\r\n isLoading: false\r\n });\r\n };\r\n\r\n deleteOrgLevel = async (event: any, tableMeta: MUIDataTableMeta) => {\r\n try {\r\n const id = tableMeta.rowData[0];\r\n\r\n await this.organizationService.RemoveOrganizationCaseTypeStep(id);\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n () => {\r\n this.reloadOrganizationSteps(this.state.selectedOrganizationCaseType!.id);\r\n }\r\n );\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n moveUp = async (event: any, tableMeta: MUIDataTableMeta) => {\r\n const id = tableMeta.rowData[0];\r\n const cloneArray = [...this.state.organizationCaseTypeSteps];\r\n const itemToMoveUpIndex = cloneArray.findIndex((item) => item.id === id);\r\n\r\n if (itemToMoveUpIndex === -1) {\r\n return;\r\n }\r\n if (cloneArray[itemToMoveUpIndex].order === 1) {\r\n return;\r\n }\r\n\r\n const itemToMoveDownIndex = cloneArray.findIndex(\r\n (item) => item.order === cloneArray[itemToMoveUpIndex].order - 1\r\n );\r\n\r\n cloneArray[itemToMoveUpIndex] = {\r\n ...cloneArray[itemToMoveUpIndex],\r\n order: cloneArray[itemToMoveUpIndex].order - 1\r\n };\r\n cloneArray[itemToMoveDownIndex] = {\r\n ...cloneArray[itemToMoveDownIndex],\r\n order: cloneArray[itemToMoveDownIndex].order + 1\r\n };\r\n\r\n try {\r\n await this.organizationService.UpdateOrganizationCaseTypeStep(cloneArray[itemToMoveUpIndex]);\r\n await this.organizationService.UpdateOrganizationCaseTypeStep(\r\n cloneArray[itemToMoveDownIndex]\r\n );\r\n\r\n this.setState({\r\n organizationCaseTypeSteps: cloneArray.sort(function (a, b) {\r\n return a.order - b.order;\r\n })\r\n });\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n moveDown = async (event: any, tableMeta: MUIDataTableMeta) => {\r\n const id = tableMeta.rowData[0];\r\n const cloneArray = [...this.state.organizationCaseTypeSteps];\r\n const itemToMoveIndex = cloneArray.findIndex((item) => item.id === id);\r\n\r\n if (itemToMoveIndex === -1) {\r\n return;\r\n }\r\n if (cloneArray[itemToMoveIndex].order === cloneArray.length) {\r\n return;\r\n }\r\n\r\n const itemToMoveToIndex = cloneArray.findIndex(\r\n (item) => item.order === cloneArray[itemToMoveIndex].order + 1\r\n );\r\n\r\n cloneArray[itemToMoveIndex] = {\r\n ...cloneArray[itemToMoveIndex],\r\n order: cloneArray[itemToMoveIndex].order + 1\r\n };\r\n cloneArray[itemToMoveToIndex] = {\r\n ...cloneArray[itemToMoveToIndex],\r\n order: cloneArray[itemToMoveToIndex].order - 1\r\n };\r\n\r\n try {\r\n await this.organizationService.UpdateOrganizationCaseTypeStep(cloneArray[itemToMoveIndex]);\r\n await this.organizationService.UpdateOrganizationCaseTypeStep(cloneArray[itemToMoveToIndex]);\r\n\r\n this.setState({\r\n organizationCaseTypeSteps: cloneArray.sort(function (a, b) {\r\n return a.order - b.order;\r\n })\r\n });\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'organizationStep',\r\n label: this.translatorService.Tranlate('ORGANIZATIONS_CASE_STEP_HEADER', 'Pas'),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: IReferential) => {\r\n return value.displayName;\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'dateModification',\r\n label: this.translatorService.Tranlate(\r\n 'ORGANIZATIONS_DATE_MODIFICATION_HEADER',\r\n 'Data Modificare'\r\n ),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: Date) =>\r\n moment.utc(value).local().format(this.props.appState.longDateFormat)\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'order',\r\n sortDirection: 'asc',\r\n label: this.translatorService.Tranlate('ORGANIZATION_CASE_STEP_ORDER_HEADER', 'Ord'),\r\n options: { sort: false }\r\n },\r\n {\r\n name: '',\r\n options: {\r\n setCellHeaderProps: () => ({ align: 'center' }),\r\n setCellProps: () => ({ align: 'center' }),\r\n sortOrder: {\r\n name: 'order',\r\n direction: 'asc'\r\n },\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n \r\n this.moveUp(e, tableMeta)}>\r\n \r\n \r\n this.moveDown(e, tableMeta)}\r\n >\r\n \r\n \r\n \r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: '',\r\n options: {\r\n setCellHeaderProps: () => ({ align: 'center' }),\r\n setCellProps: () => ({ align: 'center' }),\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.deleteOrgLevel(e, tableMeta)}\r\n >\r\n \r\n \r\n );\r\n }\r\n }\r\n }\r\n ];\r\n\r\n return columns;\r\n };\r\n\r\n addOrgStep = async () => {\r\n try {\r\n await this.organizationService.AddOrganizationCaseTypeStep({\r\n order: this.state.organizationCaseTypeSteps.length + 1,\r\n stepId: this.state.selectedOrganizationCaseStepType!.id,\r\n organizationCaseTypeId: this.state.selectedOrganizationCaseType!.id\r\n } as OrganizationCaseTypeStep);\r\n\r\n this.setState(\r\n {\r\n isLoading: true,\r\n selectedOrganizationCaseStepType: null\r\n },\r\n () => {\r\n this.reloadOrganizationSteps(this.state.selectedOrganizationCaseType!.id);\r\n }\r\n );\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n handleAutocompleteCaseChange = (newValue: any | null) => {\r\n this.setState(\r\n {\r\n selectedOrganizationCaseType: newValue,\r\n isLoading: true\r\n },\r\n () => {\r\n this.reloadOrganizationSteps(newValue === null ? null : newValue.id);\r\n }\r\n );\r\n };\r\n\r\n handleAutocompleteStepChange = (newValue: IReferential | null) => {\r\n this.setState({ selectedOrganizationCaseStepType: newValue });\r\n };\r\n\r\n public renderAddForm() {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n this.handleAutocompleteCaseChange(newValue)\r\n }\r\n getOptionLabel={(option: OrganizationCaseType) => option.caseType!.displayName}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n \r\n this.handleAutocompleteStepChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n const options = {\r\n filter: false,\r\n search: false,\r\n viewColumns: false,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n elevation: 1\r\n };\r\n\r\n return (\r\n \r\n {this.renderAddForm()}\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n ) : null}\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app\r\n }),\r\n null\r\n)(withSnackbar(OrganizationCaseTypeStepTab as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { OrganizationCaseTypeStepForm } from '../../../../interfaces/Organization';\r\nimport { ITranslatorService } from '../../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../../context/Contexts';\r\nimport { IOrganizationService } from '../../../../services/Interfaces/IOrganizationService';\r\nimport { Box, Button, Card, CardContent, Grid } from '@material-ui/core';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { IReferentialService } from '../../../../services/Interfaces/IReferentialService';\r\nimport * as monacoEditor from 'monaco-editor/esm/vs/editor/editor.api';\r\nimport { ControlledEditor } from '@monaco-editor/react';\r\nimport { WrapperSimple } from '../../../../layout-components';\r\nimport JSONSchemaForm from '@rjsf/material-ui';\r\n\r\ninterface IOrganizationFormDesignState {\r\n organizationForm: OrganizationCaseTypeStepForm;\r\n formData: any;\r\n isLoading: boolean;\r\n}\r\nexport interface ExternalOrganizationFormDesignProps {\r\n organizationFormId: number;\r\n}\r\n\r\ntype IOrganizationFormDesignProps = ExternalOrganizationFormDesignProps & {\r\n appState: AppState;\r\n} & ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass EditOrganizationFormDesign extends React.PureComponent<\r\n IOrganizationFormDesignProps,\r\n IOrganizationFormDesignState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private organizationService!: IOrganizationService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n organizationForm: {},\r\n formData: {},\r\n isLoading: false\r\n } as IOrganizationFormDesignState;\r\n\r\n public componentDidMount() {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n\r\n if (Number.isNaN(hoId)) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadOrganizationFormDesign();\r\n }\r\n );\r\n }\r\n\r\n loadOrganizationFormDesign = async () => {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n\r\n if (Number.isNaN(hoId)) {\r\n return;\r\n }\r\n\r\n let organizationForm = {} as OrganizationCaseTypeStepForm;\r\n if (this.props.organizationFormId !== 0) {\r\n organizationForm = await this.organizationService.GetOrganizationCaseTypeStepForm(\r\n this.props.organizationFormId\r\n );\r\n }\r\n\r\n // organizationForm.json2 = JSON.stringify(json2, null, 2);\r\n this.setState({\r\n organizationForm: organizationForm,\r\n isLoading: false\r\n });\r\n };\r\n handleEditorDidMountJsonSchema = (\r\n ev: monacoEditor.editor.IModelContentChangedEvent,\r\n value: string | undefined\r\n ) => {\r\n const orgFormDesign = { ...this.state.organizationForm };\r\n //= value ? value : \"\";\r\n const BAD_WORD = 'eval';\r\n const WORNING_MESSAGE = \" <- hey man, what's this?\";\r\n orgFormDesign.json1 =\r\n value !== undefined && value.includes(BAD_WORD) && !value.includes(WORNING_MESSAGE)\r\n ? value.replace(BAD_WORD, BAD_WORD + WORNING_MESSAGE)\r\n : value!.includes(WORNING_MESSAGE) && !value!.includes(BAD_WORD)\r\n ? value!.replace(WORNING_MESSAGE, '')\r\n : value!;\r\n\r\n this.setState({ organizationForm: orgFormDesign });\r\n };\r\n handleEditorDidMountUISchema = (\r\n ev: monacoEditor.editor.IModelContentChangedEvent,\r\n value: string | undefined\r\n ) => {\r\n const orgFormDesign = { ...this.state.organizationForm };\r\n orgFormDesign.json2 = value ? value : '';\r\n this.setState({ organizationForm: orgFormDesign });\r\n };\r\n // handleChandeFormData = (e: IChangeEvent) => {\r\n // // const formData = value ? value : \"\";\r\n // debugger\r\n // this.setState({ formData: e.formData })\r\n // }\r\n getSchema = () => {\r\n let json = {};\r\n\r\n if (Object.keys(this.state.organizationForm).length !== 0) {\r\n try {\r\n json = JSON.parse(this.state.organizationForm.json1);\r\n } catch (error) {}\r\n }\r\n return json;\r\n };\r\n\r\n getUISchema = () => {\r\n let json = {};\r\n\r\n if (Object.keys(this.state.organizationForm).length !== 0) {\r\n try {\r\n json = JSON.parse(this.state.organizationForm.json2);\r\n } catch (error) {}\r\n }\r\n return json;\r\n };\r\n\r\n save = async () => {\r\n try {\r\n await this.organizationService.UpdateOrganizationCaseTypeStepForm(\r\n this.state.organizationForm\r\n );\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n return (\r\n \r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {/* \r\n \r\n \r\n \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {/* formData={this.state.formData} onChange={(e) => this.handleChandeFormData(e)} */}\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n ) : null}\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalOrganizationFormDesignProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({ appState: state.app }),\r\n null,\r\n mergeProps\r\n)(withSnackbar(EditOrganizationFormDesign as any));\r\n","import React, { Fragment } from 'react';\r\nimport {\r\n AppUserAdminActionCreators,\r\n ApplicationState,\r\n AppActionCreators,\r\n AppState\r\n} from '../../../../store';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport { Grid, Button, Card, Tabs, Tab, CardContent } from '@material-ui/core';\r\nimport { ITranslatorService } from '../../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../../context/Contexts';\r\nimport { Language, OrganizationCaseTypeStepForm } from '../../../../interfaces/Organization';\r\nimport { IOrganizationService } from '../../../../services/Interfaces/IOrganizationService';\r\nimport { ValidatorForm, TextValidator } from 'react-material-ui-form-validator';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { WrapperSimple } from '../../../../layout-components';\r\nimport { IReferentialService } from '../../../../services/Interfaces/IReferentialService';\r\nimport TabPanel from '../../../_shared/Tabs';\r\nimport EditOrganizationFormDesign from './EditOrganizationFormDesign';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { ITranslation } from '../../../../interfaces/IReferential';\r\n\r\ninterface IEditOrganizationFormState {\r\n organizationForm: OrganizationCaseTypeStepForm;\r\n selectedTab: number;\r\n languages: Language[];\r\n isLoading: boolean;\r\n}\r\n\r\nexport interface ExternalEditOrganizationFormsProps {\r\n organizationFormChanged?: (close: boolean) => void;\r\n organizationFormId: number;\r\n}\r\n\r\ntype EditOrganizationFormProps = { appState: AppState } & ProviderContext &\r\n ExternalEditOrganizationFormsProps &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass EditOrganizationForm extends React.PureComponent<\r\n EditOrganizationFormProps,\r\n IEditOrganizationFormState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private appReferentialService!: IReferentialService;\r\n private organizationService!: IOrganizationService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n organizationForm: {} as OrganizationCaseTypeStepForm,\r\n selectedTab: 0,\r\n languages: [],\r\n isLoading: true\r\n } as IEditOrganizationFormState;\r\n\r\n public async componentDidMount() {\r\n // const hoId = Number.parseInt(this.props.match.params.id);\r\n\r\n let organizationForm = {} as OrganizationCaseTypeStepForm;\r\n const languages = this.activeLanguages();\r\n\r\n if (this.props.organizationFormId !== 0) {\r\n organizationForm = await this.organizationService.GetOrganizationCaseTypeStepForm(\r\n this.props.organizationFormId\r\n );\r\n }\r\n\r\n const formTranslations = organizationForm.translations;\r\n languages.forEach((language: Language, index: number) => {\r\n if (formTranslations.length === 0) {\r\n formTranslations.push({\r\n id: 0,\r\n referentialTypeId: organizationForm.id,\r\n name: null,\r\n language: language.code\r\n });\r\n } else {\r\n const indexTrans = formTranslations.findIndex((trans: ITranslation) => {\r\n return language.code === trans.language;\r\n });\r\n if (indexTrans === -1) {\r\n formTranslations.push({\r\n id: 0,\r\n referentialTypeId: organizationForm.id,\r\n name: null,\r\n language: language.code\r\n });\r\n }\r\n }\r\n });\r\n organizationForm.translations = [...formTranslations];\r\n\r\n this.setState({\r\n organizationForm: organizationForm,\r\n languages: languages,\r\n isLoading: false\r\n });\r\n }\r\n activeLanguages = () => {\r\n const activeLanguages =\r\n this.props.appState.appUser!.organization!.gtOrganization!.languages!.filter(\r\n (language) => language.isActive === true\r\n );\r\n\r\n activeLanguages.forEach((language) => {\r\n language.displayName =\r\n language.displayName.charAt(0).toUpperCase() + language.displayName.slice(1);\r\n });\r\n return activeLanguages;\r\n };\r\n\r\n handleFormNameChange = (event: any, code: string | null) => {\r\n let newFormTransList = [] as ITranslation[];\r\n if (this.state.organizationForm.translations) {\r\n newFormTransList = this.state.organizationForm.translations.map((loc: any) => {\r\n if (loc.language === code) {\r\n loc.name = event.target.value;\r\n }\r\n return loc;\r\n });\r\n }\r\n this.setState({\r\n organizationForm: {\r\n ...this.state.organizationForm,\r\n translations: newFormTransList\r\n }\r\n });\r\n };\r\n\r\n compare = (a: ITranslation, b: ITranslation) => {\r\n const bandA = a.language!.toUpperCase();\r\n const bandB = b.language!.toUpperCase();\r\n\r\n let comparison = 0;\r\n if (bandA > bandB) {\r\n comparison = -1;\r\n } else if (bandA < bandB) {\r\n comparison = 1;\r\n }\r\n return comparison;\r\n };\r\n\r\n renderNameTextFields = () => {\r\n if (Object.keys(this.state.organizationForm).length === 0) {\r\n return null;\r\n } else {\r\n const nameTextFieldsList = [] as any[];\r\n\r\n this.state\r\n .organizationForm!.translations.sort(this.compare)\r\n .forEach((item: ITranslation, index: number) => {\r\n nameTextFieldsList.push(\r\n this.handleFormNameChange(e, item.language)}\r\n label={item.language}\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n />\r\n );\r\n });\r\n return nameTextFieldsList;\r\n }\r\n };\r\n\r\n public saveOrganizationForm = async () => {\r\n try {\r\n await this.organizationService.UpdateOrganizationCaseTypeStepForm(\r\n this.state.organizationForm\r\n );\r\n\r\n if (this.props.organizationFormChanged) {\r\n this.props.organizationFormChanged(false);\r\n }\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n public renderForm() {\r\n return (\r\n \r\n \r\n \r\n \r\n {this.renderNameTextFields()}\r\n \r\n\r\n
\r\n \r\n this.props.organizationFormChanged\r\n ? this.props.organizationFormChanged(true)\r\n : null\r\n }\r\n >\r\n {this.translatorService.Tranlate('EDIT_ORGANIZATION_CANCEL_BTN', 'Anuleaza')}\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n\r\n onTabChange = (event: any, newValue: number) => {\r\n this.setState({ selectedTab: newValue });\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n {/* \r\n */}\r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? this.renderForm() : null}\r\n
\r\n \r\n \r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalEditOrganizationFormsProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\nexport default connect(\r\n (state: ApplicationState) => ({ appState: state.app }),\r\n { ...AppUserAdminActionCreators, ...AppActionCreators },\r\n mergeProps\r\n)(withSnackbar(EditOrganizationForm as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport {\r\n OrganizationCaseType,\r\n OrganizationCaseTypeStep,\r\n OrganizationCaseTypeStepForm,\r\n OrganizationForm\r\n} from '../../../../interfaces/Organization';\r\nimport { ITranslatorService } from '../../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../../context/Contexts';\r\nimport { IOrganizationService } from '../../../../services/Interfaces/IOrganizationService';\r\nimport {\r\n Box,\r\n Button,\r\n IconButton,\r\n Card,\r\n CardContent,\r\n DialogTitle,\r\n Dialog,\r\n Grid,\r\n Typography,\r\n DialogContent\r\n} from '@material-ui/core';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport MUIDataTable, {\r\n MUIDataTableColumnOptions,\r\n MUIDataTableMeta,\r\n SelectableRows\r\n} from 'mui-datatables';\r\nimport moment from 'moment';\r\nimport { MUITranslations } from '../../../../helpers/MUITableTranslations';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { IReferential } from '../../../../interfaces/IReferential';\r\nimport { ValidatorForm, TextValidator } from 'react-material-ui-form-validator';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport { IReferentialService } from '../../../../services/Interfaces/IReferentialService';\r\nimport Referentials from '../../../../helpers/Referentials.json';\r\nimport { ReferentialCode } from '../../../../helpers/Constants';\r\nimport DeleteOutlineTwoToneIcon from '@material-ui/icons/DeleteOutlineTwoTone';\r\nimport KeyboardArrowDownIcon from '@material-ui/icons/KeyboardArrowDown';\r\nimport KeyboardArrowUpIcon from '@material-ui/icons/KeyboardArrowUp';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport EditOrganizationForm from './EditOrganizationForm';\r\n\r\ninterface IOrganizationCaseTypeStepFormState {\r\n organizationCaseTypes: OrganizationCaseType[];\r\n organizationCaseTypeStepForms: OrganizationCaseTypeStepForm[];\r\n isLoading: boolean;\r\n organizationCaseTypeSteps: OrganizationCaseTypeStep[];\r\n organizationCaseStepFormTypes: OrganizationForm[];\r\n selectedOrganizationCaseTypeStep: OrganizationCaseTypeStep | null;\r\n selectedOrganizationCaseStepFormType: OrganizationForm | null;\r\n selectedOrganizationCaseType: OrganizationCaseType | null;\r\n organizationId: number;\r\n organizationFormId: number;\r\n isOpenDialog: boolean;\r\n}\r\n\r\ntype IOrganizationCaseTypeStepFormProps = { appState: AppState } & ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass OrganizationCaseTypeStepFormTab extends React.PureComponent<\r\n IOrganizationCaseTypeStepFormProps,\r\n IOrganizationCaseTypeStepFormState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private organizationService!: IOrganizationService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n organizationCaseTypeStepForms: [],\r\n organizationCaseTypes: [],\r\n isLoading: false,\r\n organizationCaseTypeSteps: [],\r\n organizationCaseStepFormTypes: [],\r\n\r\n selectedOrganizationCaseTypeStep: null,\r\n selectedOrganizationCaseStepFormType: null,\r\n selectedOrganizationCaseType: null,\r\n organizationId: 0,\r\n organizationFormId: 0,\r\n isOpenDialog: false\r\n } as IOrganizationCaseTypeStepFormState;\r\n\r\n public componentDidMount() {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n\r\n if (Number.isNaN(hoId)) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadOrganizationForms(0);\r\n }\r\n );\r\n }\r\n\r\n loadOrganizationForms = async (caseTypeStepId: number) => {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n\r\n if (Number.isNaN(hoId)) {\r\n return;\r\n }\r\n const refCaseType = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.CaseType\r\n );\r\n\r\n const [orgCaseList, orgCaseTypes, filterCaseTypeStepForms] = await Promise.all([\r\n this.organizationService.GetOrganizationCaseType(hoId),\r\n this.appReferentialService.Get(refCaseType!.baseUrl),\r\n this.organizationService.GetOrganizationForms()\r\n ]);\r\n\r\n const organizationCaseTypes = orgCaseList.map((item: OrganizationCaseType) => {\r\n item.caseType = orgCaseTypes.find(\r\n (caseType: IReferential) => caseType.id === item.caseTypeId\r\n )!;\r\n return item;\r\n });\r\n\r\n this.setState({\r\n organizationCaseTypes: organizationCaseTypes,\r\n organizationCaseStepFormTypes: filterCaseTypeStepForms,\r\n isLoading: false,\r\n organizationId: hoId\r\n });\r\n };\r\n\r\n reloadOrganizationForms = async (caseTypeStepId: number | null) => {\r\n if (caseTypeStepId === null) {\r\n this.setState({\r\n organizationCaseTypeStepForms: [],\r\n isLoading: false\r\n });\r\n return;\r\n }\r\n\r\n const orgCaseTypeStepFormList = await this.organizationService.GetOrganizationCaseTypeStepForms(\r\n caseTypeStepId\r\n ); //orgCaseList[0].id);\r\n\r\n this.setState({\r\n organizationCaseTypeStepForms: orgCaseTypeStepFormList.sort(function (a, b) {\r\n return a.order - b.order;\r\n }),\r\n isLoading: false\r\n });\r\n };\r\n\r\n deleteOrgLevel = async (event: any, tableMeta: MUIDataTableMeta) => {\r\n try {\r\n const id = tableMeta.rowData[0];\r\n\r\n await this.organizationService.RemoveOrganizationCaseTypeStepForm(id);\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n () => {\r\n this.reloadOrganizationForms(this.state.selectedOrganizationCaseTypeStep!.id);\r\n }\r\n );\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n moveUp = async (event: any, tableMeta: MUIDataTableMeta) => {\r\n const id = tableMeta.rowData[0];\r\n const cloneArray = [...this.state.organizationCaseTypeStepForms];\r\n const itemToMoveUpIndex = cloneArray.findIndex((item) => item.id === id);\r\n\r\n if (itemToMoveUpIndex === -1) {\r\n return;\r\n }\r\n if (cloneArray[itemToMoveUpIndex].order === 1) {\r\n return;\r\n }\r\n\r\n const itemToMoveDownIndex = cloneArray.findIndex(\r\n (item) => item.order === cloneArray[itemToMoveUpIndex].order - 1\r\n );\r\n\r\n cloneArray[itemToMoveUpIndex] = {\r\n ...cloneArray[itemToMoveUpIndex],\r\n order: cloneArray[itemToMoveUpIndex].order - 1\r\n };\r\n cloneArray[itemToMoveDownIndex] = {\r\n ...cloneArray[itemToMoveDownIndex],\r\n order: cloneArray[itemToMoveDownIndex].order + 1\r\n };\r\n\r\n try {\r\n await this.organizationService.UpdateOrganizationCaseTypeStepForm(\r\n cloneArray[itemToMoveUpIndex]\r\n );\r\n await this.organizationService.UpdateOrganizationCaseTypeStepForm(\r\n cloneArray[itemToMoveDownIndex]\r\n );\r\n\r\n this.setState({\r\n organizationCaseTypeStepForms: cloneArray.sort(function (a, b) {\r\n return a.order - b.order;\r\n })\r\n });\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n moveDown = async (event: any, tableMeta: MUIDataTableMeta) => {\r\n const id = tableMeta.rowData[0];\r\n const cloneArray = [...this.state.organizationCaseTypeStepForms];\r\n const itemToMoveIndex = cloneArray.findIndex((item) => item.id === id);\r\n\r\n if (itemToMoveIndex === -1) {\r\n return;\r\n }\r\n if (cloneArray[itemToMoveIndex].order === cloneArray.length) {\r\n return;\r\n }\r\n\r\n const itemToMoveToIndex = cloneArray.findIndex(\r\n (item) => item.order === cloneArray[itemToMoveIndex].order + 1\r\n );\r\n\r\n cloneArray[itemToMoveIndex] = {\r\n ...cloneArray[itemToMoveIndex],\r\n order: cloneArray[itemToMoveIndex].order + 1\r\n };\r\n cloneArray[itemToMoveToIndex] = {\r\n ...cloneArray[itemToMoveToIndex],\r\n order: cloneArray[itemToMoveToIndex].order - 1\r\n };\r\n\r\n try {\r\n await this.organizationService.UpdateOrganizationCaseTypeStepForm(\r\n cloneArray[itemToMoveIndex]\r\n );\r\n await this.organizationService.UpdateOrganizationCaseTypeStepForm(\r\n cloneArray[itemToMoveToIndex]\r\n );\r\n\r\n this.setState({\r\n organizationCaseTypeStepForms: cloneArray.sort(function (a, b) {\r\n return a.order - b.order;\r\n })\r\n });\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n onRowClick = (e: any, id: number) => {\r\n this.setState({ isOpenDialog: true, organizationFormId: id });\r\n };\r\n\r\n handleClose = (close: boolean) => {\r\n // if (reload)\r\n // {\r\n // this.setState({isOpenDialog: false}, async () => { await this.loadOrganizationForms()})\r\n // }\r\n // else{\r\n this.setState({ isOpenDialog: !close });\r\n // }\r\n };\r\n\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'form',\r\n label: this.translatorService.Tranlate('ORGANIZATIONS_CASE_STEP_FORM_HEADER', 'Forma'),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: any, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.onRowClick(e, tableMeta.rowData[0])}\r\n >\r\n {value.displayName}\r\n \r\n );\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'dateModification',\r\n label: this.translatorService.Tranlate(\r\n 'ORGANIZATIONS_DATE_MODIFICATION_HEADER',\r\n 'Data Modificare'\r\n ),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: Date) =>\r\n moment.utc(value).local().format(this.props.appState.longDateFormat)\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'order',\r\n sortDirection: 'asc',\r\n label: this.translatorService.Tranlate('ORGANIZATION_CASE_STEP_FORM_ORDER_HEADER', 'Ord'),\r\n options: { sort: false }\r\n },\r\n {\r\n name: '',\r\n options: {\r\n setCellHeaderProps: () => ({ align: 'center' }),\r\n setCellProps: () => ({ align: 'center' }),\r\n sortOrder: {\r\n name: 'order',\r\n direction: 'asc'\r\n },\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n \r\n this.moveUp(e, tableMeta)}>\r\n \r\n \r\n this.moveDown(e, tableMeta)}\r\n >\r\n \r\n \r\n \r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: '',\r\n options: {\r\n setCellHeaderProps: () => ({ align: 'center' }),\r\n setCellProps: () => ({ align: 'center' }),\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.deleteOrgLevel(e, tableMeta)}\r\n >\r\n \r\n \r\n );\r\n }\r\n }\r\n }\r\n ];\r\n\r\n return columns;\r\n };\r\n\r\n addOrgForm = async () => {\r\n try {\r\n const translations = this.state.selectedOrganizationCaseStepFormType!.translations;\r\n translations.forEach((item) => {\r\n item.id = 0;\r\n item.referentialTypeId = 0;\r\n });\r\n\r\n await this.organizationService.AddOrganizationCaseTypeStepForm({\r\n id: 0,\r\n order: this.state.organizationCaseTypeStepForms.length + 1,\r\n json1: this.state.selectedOrganizationCaseStepFormType!.json1,\r\n json2: this.state.selectedOrganizationCaseStepFormType!.json2,\r\n translations: translations,\r\n organizationCaseTypeStepId: this.state.selectedOrganizationCaseTypeStep!.id,\r\n formId: this.state.selectedOrganizationCaseStepFormType!.id\r\n } as OrganizationCaseTypeStepForm);\r\n\r\n this.setState(\r\n {\r\n isLoading: true,\r\n selectedOrganizationCaseStepFormType: null\r\n },\r\n () => {\r\n this.reloadOrganizationForms(this.state.selectedOrganizationCaseTypeStep!.id);\r\n }\r\n );\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n handleAutocompleteStepChange = (newValue: any | null) => {\r\n this.setState({ selectedOrganizationCaseTypeStep: newValue, isLoading: true }, () => {\r\n this.reloadOrganizationForms(newValue === null ? null : newValue.id);\r\n });\r\n };\r\n\r\n handleAutocompleteFormChange = (newValue: any | null) => {\r\n this.setState({ selectedOrganizationCaseStepFormType: newValue });\r\n };\r\n\r\n handleAutocompleteCaseChange = async (newValue: any | null) => {\r\n if (newValue === null) {\r\n this.setState(\r\n {\r\n selectedOrganizationCaseType: null,\r\n organizationCaseTypeSteps: [],\r\n selectedOrganizationCaseTypeStep: null,\r\n isLoading: true\r\n },\r\n () => {\r\n this.reloadOrganizationForms(newValue === null ? null : newValue.id);\r\n }\r\n );\r\n return;\r\n }\r\n const orgCaseTypeStepList = await this.organizationService.GetOrganizationCaseTypeStep(\r\n newValue.id\r\n );\r\n this.setState(\r\n {\r\n selectedOrganizationCaseType: newValue,\r\n organizationCaseTypeSteps: orgCaseTypeStepList,\r\n selectedOrganizationCaseTypeStep: null,\r\n isLoading: true\r\n },\r\n () => {\r\n this.reloadOrganizationForms(null);\r\n }\r\n );\r\n };\r\n\r\n public renderAddForm() {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n this.handleAutocompleteCaseChange(newValue)\r\n }\r\n getOptionLabel={(option: OrganizationCaseType) => option.caseType!.displayName}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n \r\n this.handleAutocompleteStepChange(newValue)\r\n }\r\n getOptionLabel={(option: OrganizationCaseTypeStep) =>\r\n option.organizationStep!.displayName || ''\r\n }\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n \r\n this.handleAutocompleteFormChange(newValue)\r\n }\r\n getOptionLabel={(option: any) => option.displayName}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n const options = {\r\n filter: false,\r\n search: false,\r\n viewColumns: false,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n elevation: 1\r\n };\r\n\r\n return (\r\n \r\n {this.renderAddForm()}\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n ) : null}\r\n
\r\n \r\n \r\n \r\n \r\n \r\n {this.translatorService.Tranlate(\r\n 'ORGANIZATION_EDIT_FORM_MODAL_TITLE',\r\n 'Configurare forma'\r\n )}\r\n \r\n \r\n \r\n this.handleClose(true)}\r\n size={'small'}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n this.handleClose(close)}\r\n />\r\n \r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app\r\n }),\r\n null\r\n)(withSnackbar(OrganizationCaseTypeStepFormTab as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState } from '../../../../store';\r\nimport { withSnackbar } from 'notistack';\r\nimport { Card, Tabs, Tab, CardContent, Box } from '@material-ui/core';\r\nimport TabPanel from '../../../_shared/Tabs';\r\nimport { ITranslatorService } from '../../../../services/Interfaces/ITranslatorService';\r\nimport { IOrganizationService } from '../../../../services/Interfaces/IOrganizationService';\r\nimport { ApplicationContext, AppContext } from '../../../../context/Contexts';\r\nimport OrganizationCaseTypeTab from './OrganizationCaseTypeTab';\r\nimport OrganizationCaseTypeStepTab from './OrganizationCaseTypeStepTab';\r\nimport OrganizationCaseTypeStepFormTab from './OrganizationCaseTypeStepFormTab';\r\n\r\ninterface ICaseState {\r\n selectedTab: number;\r\n}\r\nclass OrganizationNewCaseType extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private organizationService!: IOrganizationService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = { selectedTab: 0 };\r\n\r\n onTabChange = (event: any, newValue: number) => {\r\n this.setState({ selectedTab: newValue });\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app\r\n }),\r\n null\r\n)(withSnackbar(OrganizationNewCaseType as any));\r\n","import React, { Fragment } from 'react';\r\nimport {\r\n AppUserAdminActionCreators,\r\n ApplicationState,\r\n AppActionCreators,\r\n AppState\r\n} from '../../../store';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n Button,\r\n Card,\r\n Box,\r\n Divider,\r\n Grid,\r\n IconButton,\r\n Tooltip,\r\n Slider,\r\n FormControlLabel,\r\n Switch\r\n} from '@material-ui/core';\r\nimport Autocomplete, { RenderInputParams } from '@material-ui/lab/Autocomplete';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport { ValidatorForm, TextValidator } from 'react-material-ui-form-validator';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport { DateLaborService, Tariff, TariffType, TariffValue } from '../../../interfaces/Tariff';\r\nimport { ITariffService } from '../../../services/Interfaces/ITariffService';\r\nimport moment from 'moment';\r\n\r\nimport { MuiPickersUtilsProvider, DatePicker } from '@material-ui/pickers';\r\nimport NumberFormat from 'react-number-format';\r\nimport { IReferential } from '../../../interfaces/IReferential';\r\nimport { CountryCodeEnum, ReferentialCode, RoleClaimsEnum, TariffCategoryCodeEnum } from '../../../helpers/Constants';\r\nimport Referentials from '../../../helpers/Referentials.json';\r\nimport AddCircleTwoToneIcon from '@material-ui/icons/AddCircleTwoTone';\r\nimport EditCircleTwoToneIcon from '@material-ui/icons/EditTwoTone';\r\nimport DeleteCircleTwoToneIcon from '@material-ui/icons/DeleteOutlineTwoTone';\r\nimport RemoveIcon from '@material-ui/icons/RemoveCircleOutlineTwoTone';\r\nimport MomentUtils from '@date-io/moment';\r\nimport 'moment/locale/en-gb';\r\nimport 'moment/locale/ro';\r\nimport { MaterialUiPickersDate } from '@material-ui/pickers/typings/date';\r\nimport _ from 'lodash';\r\n\r\nclass LocalizedUtils extends MomentUtils {\r\n // dateFormat = \"DD MM YYYY\";\r\n}\r\ninterface TariffIntervalValue {\r\n start: number;\r\n end: number;\r\n value: number;\r\n}\r\n\r\ninterface IEditTarifLaborTabState {\r\n tariffValues: TariffValue[];\r\n isLoading: boolean;\r\n activeAction: number;\r\n\r\n selectedTariffTypes: TariffType[];\r\n selectedBrands: IReferential[];\r\n selectedDate: Date | null;\r\n selectedValue: number;\r\n selectedOfferValue: number;\r\n selectedMarginValue: number;\r\n isVehicleAge: boolean;\r\n selectedSliderValues: number[];\r\n selectedValues: number[];\r\n selectedOfferValues: number[];\r\n selectedMarginValues: number[];\r\n\r\n minDate: Date;\r\n tariffTypeList: TariffType[];\r\n brandList: IReferential[];\r\n insurerList: IReferential[];\r\n selectedInsurer: IReferential[];\r\n}\r\n\r\nexport interface ExternalEditTarifLaborTabProps {\r\n tariffId: number;\r\n tariffGroupTypeId: number;\r\n tariffGroupTypeName: string;\r\n tariffGroupTypeCode: string;\r\n currency: string;\r\n tariff: Tariff;\r\n}\r\n\r\ntype EditTarifLaborTabProps = { appState: AppState } & ProviderContext &\r\n ExternalEditTarifLaborTabProps &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nconst START = 0;\r\nconst END = 10;\r\nconst DEFAULT = 5;\r\nconst MAXLOBOURVALUE = 600;\r\n\r\nclass EditTarifLaborTabf extends React.PureComponent<\r\n EditTarifLaborTabProps,\r\n IEditTarifLaborTabState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private appReferentialService!: IReferentialService;\r\n private tariffService!: ITariffService;\r\n\r\n momutil = new MomentUtils();\r\n static contextType = ApplicationContext;\r\n\r\n defaultBrand = {\r\n name: 'All', //this.translatorService.Tranlate(\"SELECT_ALL_OPTION\", \"Toate\"),\r\n displayName: 'All', //this.translatorService.Tranlate(\"SELECT_ALL_OPTION\", \"Toate\"),\r\n id: -1,\r\n isActive: true\r\n } as IReferential;\r\n\r\n defaultInsurer = {\r\n name: 'None', //this.translatorService.Tranlate('SELECT_NONE_OPTION', 'Niciunul'),\r\n displayName: 'None', //this.translatorService.Tranlate('SELECT_NONE_OPTION', 'Niciunul'),\r\n id: -1,\r\n isActive: true\r\n } as IReferential;\r\n\r\n state = {\r\n tariffValues: [] as TariffValue[],\r\n isLoading: true,\r\n isVehicleAge: false,\r\n activeAction: 0,\r\n selectedTariffTypes: [] as TariffType[],\r\n selectedBrands: [this.defaultBrand] as IReferential[],\r\n minDate: new Date(),\r\n tariffTypeList: [] as TariffType[],\r\n brandList: [] as IReferential[],\r\n insurerList: [] as IReferential[],\r\n selectedInsurer: [this.defaultInsurer] as IReferential[],\r\n selectedSliderValues: [DEFAULT] as number[],\r\n selectedValues: [0, 0] as number[],\r\n selectedOfferValues: [0, 0] as number[],\r\n selectedValue: 0,\r\n selectedOfferValue: 0,\r\n selectedMarginValue: 0,\r\n selectedMarginValues: [0, 0] as number[]\r\n } as IEditTarifLaborTabState;\r\n\r\n componentDidMount = () => {\r\n moment.locale(this.props.appState.language);\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n () => {\r\n this.loadData();\r\n }\r\n );\r\n\r\n \r\n ValidatorForm.addValidationRule('isGreaterThanZero', (value) => {\r\n if (value == 0) {\r\n return false;\r\n }\r\n return true;\r\n });\r\n\r\n ValidatorForm.addValidationRule('isGratterThanMinValue', (value) => {\r\n if (value < MAXLOBOURVALUE) {\r\n return false;\r\n }\r\n return true;\r\n });\r\n };\r\n\r\n compareName = (a: IReferential, b: IReferential) => {\r\n const nameA = a === null ? '' : a.displayName!.toUpperCase();\r\n const nameB = b === null ? '' : b.displayName!.toUpperCase();\r\n if (nameA < nameB) {\r\n return -1;\r\n }\r\n if (nameA > nameB) {\r\n return 1;\r\n }\r\n\r\n return 0;\r\n };\r\n\r\n loadData = async () => {\r\n try {\r\n this.defaultBrand.name = this.translatorService.Tranlate('SELECT_ALL_OPTION', 'Toate');\r\n this.defaultBrand.displayName = this.translatorService.Tranlate('SELECT_ALL_OPTION', 'Toate');\r\n\r\n this.defaultInsurer.name = this.translatorService.Tranlate('SELECT_NONE_OPTION', 'Niciunul');\r\n this.defaultInsurer.displayName = this.translatorService.Tranlate(\r\n 'SELECT_NONE_OPTION',\r\n 'Niciunul'\r\n );\r\n\r\n const brandRef = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.CarBrands\r\n );\r\n const insurerRef = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.Insurer\r\n );\r\n\r\n const [tariffTypeList, brandList, insurerList, tariffValues] = await Promise.all([\r\n this.tariffService.GetTariffTypes(this.props.tariffGroupTypeId),\r\n this.appReferentialService.Get(brandRef!.baseUrl),\r\n this.appReferentialService.Get(insurerRef!.baseUrl),\r\n this.tariffService.GetTariffValues(this.props.tariffId, this.props.tariffGroupTypeId)\r\n ]);\r\n\r\n const brandList1 = brandList.sort(this.compareName);\r\n brandList.unshift(this.defaultBrand);\r\n \r\n const insurerList1 = _.cloneDeep(insurerList).sort(this.compareName);\r\n insurerList1.unshift(this.defaultInsurer);\r\n \r\n this.setState({\r\n tariffTypeList: tariffTypeList.filter((item) => item.isActive === true),\r\n tariffValues: tariffValues,\r\n brandList: brandList1.filter((item) => item.isActive === true),\r\n insurerList: insurerList1.filter((item) => item.isActive === true),\r\n isLoading: false\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n handleTariffTypeChange = (event: React.ChangeEvent, values: TariffType[]) => {\r\n this.setState({ selectedTariffTypes: values });\r\n };\r\n\r\n saveTariffValues = async (activeButton: number) => {\r\n const tariffValuesToSave = [] as TariffValue[];\r\n\r\n let date = new Date();\r\n if (moment.isDate(this.state.selectedDate)) {\r\n date = moment.utc(this.state.selectedDate.toDateString()).local().toDate();\r\n } else {\r\n date = moment.utc(this.state.selectedDate).local().toDate();\r\n }\r\n\r\n for (const tariffType of this.state.selectedTariffTypes) {\r\n for (const insurer of this.state.selectedInsurer) {\r\n for (const brand of this.state.selectedBrands) {\r\n if (this.state.isVehicleAge) {\r\n for (let i = 0; i < this.state.selectedSliderValues.length; i++) {\r\n const tariffValue = {\r\n brandId: brand.id === this.defaultBrand.id ? null : brand.id,\r\n tariffId: this.props.tariffId,\r\n tariffTypeId: tariffType.id,\r\n date: date,\r\n value: this.state.selectedValues[i],\r\n offerValue: this.state.selectedOfferValues[i],\r\n marginValue: this.state.selectedMarginValues[i],\r\n startVehicleYear: i === 0 ? null : this.state.selectedSliderValues[i - 1],\r\n endVehicleYear: this.state.selectedSliderValues[i],\r\n insurerId: insurer.id === this.defaultInsurer.id ? null : insurer.id\r\n } as TariffValue;\r\n tariffValuesToSave.push(tariffValue);\r\n\r\n if (i === this.state.selectedSliderValues.length - 1) {\r\n tariffValuesToSave.push({\r\n brandId: brand.id === this.defaultBrand.id ? null : brand.id,\r\n tariffId: this.props.tariffId,\r\n tariffTypeId: tariffType.id,\r\n date: date,\r\n value: this.state.selectedValues[i + 1],\r\n offerValue: this.state.selectedOfferValues[i + 1],\r\n marginValue: this.state.selectedMarginValues[i + 1], \r\n startVehicleYear: this.state.selectedSliderValues[i],\r\n endVehicleYear: null,\r\n insurerId: insurer.id === this.defaultInsurer.id ? null : insurer.id\r\n } as TariffValue);\r\n }\r\n }\r\n } else {\r\n const tariffValue = {\r\n brandId: brand.id === this.defaultBrand.id ? null : brand.id,\r\n tariffId: this.props.tariffId,\r\n tariffTypeId: tariffType.id,\r\n date: date,\r\n value: this.state.selectedValue,\r\n offerValue: this.state.selectedOfferValue,\r\n marginValue: this.state.selectedMarginValue,\r\n startVehicleYear: null,\r\n endVehicleYear: null,\r\n insurerId: insurer.id === this.defaultInsurer.id ? null : insurer.id\r\n } as TariffValue;\r\n tariffValuesToSave.push(tariffValue);\r\n }\r\n }\r\n }\r\n }\r\n if (activeButton === 1) {\r\n const dataLaborServices = this.structureTariffValuesAccordingToDate(); \r\n // Get tariffValues from the first element of dataLaborServices, or an empty array if not present\r\n const data = dataLaborServices.length > 0 ? dataLaborServices[0].tariffValues : [];\r\n console.log('tariffValuesToSave', tariffValuesToSave, 'dataLaborServices:', dataLaborServices, 'data:', data);\r\n if (tariffValuesToSave.length > 0) {\r\n const date = tariffValuesToSave[0].date;\r\n // Filter out items in 'data' that are not in 'tariffValuesToSave', and update their date\r\n const itemsToBeUpdated = data\r\n .filter(dataItem =>\r\n !tariffValuesToSave.some(saveItem => this.isMatchingItem(dataItem, saveItem))\r\n )\r\n .map(item => (\r\n {\r\n brandId: item.brandId,\r\n tariffId: item.tariffId,\r\n tariffTypeId: item.tariffTypeId,\r\n date: date,\r\n value: item.value,\r\n offerValue: item.offerValue,\r\n marginValue: item.marginValue,\r\n startVehicleYear: item.startVehicleYear,\r\n endVehicleYear: item.endVehicleYear,\r\n insurerId: item.insurerId\r\n } as TariffValue\r\n )); \r\n console.log('Items in data but not in tariffValuesToSave:', itemsToBeUpdated);\r\n // Add the items to 'tariffValuesToSave'\r\n tariffValuesToSave.push(...itemsToBeUpdated);\r\n console.log('tariffValuesToSave after adding items:', tariffValuesToSave);\r\n }\r\n }\r\n \r\n try {\r\n await this.tariffService.UpdateTariffValues(tariffValuesToSave);\r\n\r\n this.setState(\r\n {\r\n isLoading: true,\r\n selectedTariffTypes: []\r\n },\r\n () => {\r\n this.loadData();\r\n }\r\n );\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n public isMatchingItem = (item1: TariffValue, item2 : TariffValue) : boolean => {\r\n return item1.tariffId === item2.tariffId &&\r\n item1.tariffTypeId === item2.tariffTypeId &&\r\n item1.insurerId === item2.insurerId &&\r\n (!item1.brandId || item1.brandId === item2.brandId || !item2.brandId);\r\n }\r\n\r\n public hasRight = (right: string): boolean => {\r\n return this.props.appState!.user!.profile.role.includes(right);\r\n };\r\n\r\n\r\n handleDateChange = (date: MaterialUiPickersDate | null, value?: string | null) => {\r\n if (date === null || !date.isValid) {\r\n return;\r\n }\r\n this.setState({ selectedDate: date!.toDate() });\r\n };\r\n\r\n handleBrandChange = (newValue: IReferential[]) => {\r\n const allIndex = newValue.findIndex((item) => item.id === this.defaultBrand.id);\r\n\r\n if (allIndex === newValue.length - 1) {\r\n this.setState({ selectedBrands: [this.defaultBrand] });\r\n return;\r\n }\r\n if (allIndex === 0 && newValue.length > 1) {\r\n this.setState({ selectedBrands: [newValue[1]] });\r\n return;\r\n }\r\n\r\n this.setState({ selectedBrands: newValue });\r\n };\r\n\r\n handleInsurerChange = (newValue: IReferential[]) => {\r\n this.setState({ selectedInsurer: newValue });\r\n };\r\n\r\n NumberFormatCustom = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n allowNegative={false}\r\n decimalScale={2}\r\n isNumericString\r\n />\r\n );\r\n };\r\n\r\n handleValueChange = (event: React.ChangeEvent) => {\r\n if (event.target.value === '') {\r\n this.setState({ selectedValue: 0 });\r\n return;\r\n }\r\n\r\n this.setState({\r\n selectedValue: event.target.value === null ? 0 : parseFloat(event.target.value)\r\n });\r\n };\r\n\r\n handleOfferValueChange = (event: React.ChangeEvent) => {\r\n if (event.target.value === '') {\r\n this.setState({ selectedOfferValue: 0 });\r\n return;\r\n }\r\n this.setState({\r\n selectedOfferValue: event.target.value === null ? 0 : parseFloat(event.target.value)\r\n });\r\n };\r\n\r\n handleMarginValueChange = (event: React.ChangeEvent) => {\r\n if (event.target.value === '') {\r\n this.setState({ selectedMarginValue: 0 });\r\n return;\r\n }\r\n this.setState({\r\n selectedMarginValue: event.target.value === null ? 0 : parseFloat(event.target.value)\r\n });\r\n };\r\n\r\n handleValuesChange = (event: React.ChangeEvent, index: number) => {\r\n const newValues = [...this.state.selectedValues];\r\n if (event.target.value === '') {\r\n newValues[index] = 0;\r\n } else {\r\n newValues[index] = event.target.value === null ? 0 : parseFloat(event.target.value);\r\n }\r\n\r\n this.setState({ selectedValues: newValues });\r\n };\r\n\r\n handleOfferValuesChange = (event: React.ChangeEvent, index: number) => {\r\n const newValues = [...this.state.selectedOfferValues];\r\n if (event.target.value === '') {\r\n newValues[index] = 0;\r\n } else {\r\n newValues[index] = event.target.value === null ? 0 : parseFloat(event.target.value);\r\n }\r\n newValues[index] = event.target.value === null ? 0 : parseFloat(event.target.value);\r\n\r\n this.setState({ selectedOfferValues: newValues });\r\n };\r\n\r\n handleMarginValuesChange = (event: React.ChangeEvent, index: number) => {\r\n const newValues = [...this.state.selectedMarginValues];\r\n if (event.target.value === '') {\r\n newValues[index] = 0;\r\n } else {\r\n newValues[index] = event.target.value === null ? 0 : parseFloat(event.target.value);\r\n }\r\n newValues[index] = event.target.value === null ? 0 : parseFloat(event.target.value);\r\n\r\n this.setState({ selectedMarginValues: newValues });\r\n };\r\n\r\n handleChange = (event: any, newvalue: number | number[]) => {\r\n const newValues = newvalue as number[];\r\n\r\n this.setState({ selectedSliderValues: newValues });\r\n\r\n return;\r\n };\r\n\r\n getMarks = (total: number) => {\r\n const result: any[] = [];\r\n for (let i = 0; i <= total; i++) {\r\n result.push({\r\n value: i,\r\n label: i.toString()\r\n });\r\n }\r\n\r\n return result;\r\n };\r\n\r\n removeSliderValue = () => {\r\n if (this.state.selectedSliderValues.length === 1) {\r\n return;\r\n }\r\n\r\n const values = [...this.state.selectedSliderValues];\r\n const tValues = [...this.state.selectedValues];\r\n const tOfferValues = [...this.state.selectedOfferValues];\r\n const tMarginValues = [...this.state.selectedMarginValues];\r\n\r\n values.pop();\r\n tValues.pop();\r\n tOfferValues.pop();\r\n\r\n this.setState({\r\n selectedSliderValues: values,\r\n selectedValues: tValues,\r\n selectedOfferValues: tOfferValues,\r\n selectedMarginValues: tMarginValues\r\n });\r\n };\r\n\r\n addSliderValue = () => {\r\n this.setState({\r\n selectedSliderValues: [...this.state.selectedSliderValues, END],\r\n selectedValues: [...this.state.selectedValues, 0],\r\n selectedOfferValues: [...this.state.selectedOfferValues, 0],\r\n selectedMarginValues: [...this.state.selectedMarginValues, 0]\r\n });\r\n };\r\n\r\n getValidators() {\r\n const { tariffGroupTypeCode, tariff } = this.props;\r\n const isManType = tariffGroupTypeCode === TariffCategoryCodeEnum.MAN.toString();\r\n const isCzechRepublic = tariff?.owner?.country?.code?.toUpperCase() === CountryCodeEnum.CZ.toString();\r\n \r\n const validators = ['required'];\r\n \r\n if (isManType) {\r\n validators.push('isGreaterThanZero');\r\n if (isCzechRepublic) validators.push('isGratterThanMinValue');\r\n }\r\n \r\n return validators;\r\n }\r\n \r\n getErrorMessages() {\r\n const { tariffGroupTypeCode, tariff } = this.props;\r\n const isManType = tariffGroupTypeCode === TariffCategoryCodeEnum.MAN.toString();\r\n const isCzechRepublic = tariff?.owner?.country?.code?.toUpperCase() === CountryCodeEnum.CZ.toString();\r\n console.log(tariff.owner?.country);\r\n const messages = [\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ];\r\n \r\n if (isManType) {\r\n messages.push(\r\n this.translatorService.Tranlate(\r\n 'LABOR_VALUE_SHOULD_BE_GREATER_THAN_ZERO',\r\n 'Valoarea trebuie sa fie mai mare decat 0'\r\n )\r\n );\r\n \r\n if (isCzechRepublic) {\r\n messages.push(\r\n this.translatorService.Tranlate(\r\n 'LABOR_VALUE_CZ_SHOULD_BE_GREATER_THAN',\r\n `Valoarea trebuie sa fie mai mare decat ${MAXLOBOURVALUE}`\r\n )\r\n );\r\n }\r\n }\r\n \r\n return messages;\r\n } \r\n\r\n renderEditTariffValues = (activeButton: number) => {\r\n return (\r\n this.saveTariffValues(activeButton)} instantValidate={true}>\r\n \r\n \r\n \r\n \r\n \r\n {this.props.tariffGroupTypeCode === TariffCategoryCodeEnum.ADAOS.toString() ? null : (\r\n !this.hasRight(RoleClaimsEnum.AdminService) && (\r\n this.handleInsurerChange(newValue)}\r\n getOptionLabel={(option: IReferential) => option.name || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n )\r\n ) }\r\n option.displayName}\r\n value={this.state.selectedTariffTypes}\r\n onChange={(e: any, newValue: TariffType[]) => this.handleTariffTypeChange(e, newValue)}\r\n renderInput={(params: RenderInputParams) => (\r\n \r\n )}\r\n />\r\n {this.props.tariffGroupTypeCode === TariffCategoryCodeEnum.ADAOS.toString() || \r\n this.props.tariffGroupTypeCode === TariffCategoryCodeEnum.ADAOS_ASIGURATOR.toString() || \r\n this.props.tariffGroupTypeCode === TariffCategoryCodeEnum.ADAOS_ALT_PART.toString() || \r\n this.props.tariffGroupTypeCode === TariffCategoryCodeEnum.DISC ? null : (\r\n this.handleBrandChange(newValue)}\r\n getOptionLabel={(option: IReferential) => option.name || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n )}\r\n \r\n {this.props.tariffGroupTypeCode === TariffCategoryCodeEnum.ADAOS.toString() || \r\n this.props.tariffGroupTypeCode === TariffCategoryCodeEnum.ADAOS_ASIGURATOR.toString() || \r\n this.props.tariffGroupTypeCode === TariffCategoryCodeEnum.ADAOS_ALT_PART.toString() || \r\n this.props.tariffGroupTypeCode === TariffCategoryCodeEnum.DISC ? null :\r\n (\r\n
\r\n \r\n this.setState({\r\n isVehicleAge: e.currentTarget.checked\r\n })\r\n }\r\n color=\"primary\"\r\n id=\"isActive\"\r\n inputProps={{\r\n 'aria-label': 'primary checkbox'\r\n }}\r\n />\r\n }\r\n label={this.translatorService.Tranlate(\r\n 'TARIFF_EDIT_LABOR_TAB_HAS_INTERVAL_LABEL',\r\n 'Stare'\r\n )}\r\n />\r\n
\r\n )}\r\n\r\n {!this.state.isVehicleAge ? null : (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n\r\n \r\n {!this.state.isVehicleAge\r\n ? null\r\n : this.state.selectedValues.map((value: number, index: number) => (\r\n \r\n \r\n ) =>\r\n this.handleValuesChange(e, index)\r\n }\r\n label={\r\n this.translatorService.Tranlate(\r\n 'TARIFF_EDIT_LABOR_TAB_VALUE_LABEL',\r\n 'Valoare'\r\n ) +\r\n '(' +\r\n index +\r\n ')'\r\n }\r\n validators={this.getValidators()}\r\n errorMessages={this.getErrorMessages()}\r\n InputProps={{\r\n inputComponent: this.NumberFormatCustom\r\n }}\r\n />\r\n \r\n \r\n {!this.hasRight(RoleClaimsEnum.AdminService) && (\r\n ) =>\r\n this.handleOfferValuesChange(e, index)\r\n }\r\n label={\r\n this.translatorService.Tranlate(\r\n 'TARIFF_EDIT_LABOR_TAB_OFFER_VALUE_LABEL',\r\n 'Valoare'\r\n ) +\r\n '(' +\r\n index +\r\n ')'\r\n }\r\n validators={this.getValidators()}\r\n errorMessages={this.getErrorMessages()}\r\n InputProps={{\r\n inputComponent: this.NumberFormatCustom\r\n }}\r\n />\r\n )}\r\n \r\n \r\n ))}\r\n \r\n\r\n {this.state.isVehicleAge ? null : (\r\n \r\n {\r\n this.props.tariffGroupTypeCode === TariffCategoryCodeEnum.ADAOS.toString() ? (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ) : (\r\n <>\r\n \r\n \r\n \r\n {this.props.tariffGroupTypeCode === TariffCategoryCodeEnum.MAN.toString() ? (\r\n \r\n \r\n \r\n ) : (\r\n \r\n \r\n )}\r\n \r\n {!this.hasRight(RoleClaimsEnum.AdminService) && (\r\n \r\n )}\r\n \r\n \r\n )\r\n\r\n }\r\n \r\n \r\n )}\r\n
\r\n {\r\n this.setState({ activeAction: 0 });\r\n }}\r\n >\r\n {this.translatorService.Tranlate('TARIFF_EDIT_LABOR_TAB_CANCEL_BUTTON', 'Anuleaza')}\r\n \r\n \r\n
\r\n
\r\n
\r\n );\r\n };\r\n\r\n structureTariffValuesAccordingToDate = () => {\r\n const dataLaborServices = [] as DateLaborService[];\r\n\r\n this.state.tariffValues.forEach((tariffValue: TariffValue) => {\r\n const index = dataLaborServices.findIndex(\r\n (item: DateLaborService) => item.date.toString() === tariffValue.date.toString()\r\n );\r\n\r\n if (index !== -1) {\r\n dataLaborServices[index].tariffValues.push(tariffValue);\r\n } else {\r\n dataLaborServices.push({\r\n date: tariffValue.date, \r\n tariffValues: [tariffValue]\r\n });\r\n }\r\n });\r\n //dataLaborServices = dataLaborServices.sort().reverse();\r\n\r\n return dataLaborServices;\r\n };\r\n\r\n renderTariffValues = (list: TariffValue[]) => {\r\n list = list.sort((a: TariffValue, b: TariffValue) => {\r\n return this.compareName(a.brand!, b.brand!);\r\n });\r\n return this.props.tariffGroupTypeCode == TariffCategoryCodeEnum.ADAOS.toString() ? (list.map((item) => (\r\n

\r\n {(item.brand === null ? this.defaultBrand.displayName : item.brand.displayName) +\r\n ' ' +\r\n this.renderVehicleAge(item) +\r\n ' - ' +\r\n item.value +\r\n ' (' +\r\n item.marginValue +\r\n ') ' + \r\n item.offerValue}\r\n

\r\n ))) : (list.map((item) => (\r\n

\r\n {(item.brand === null ? this.defaultBrand.displayName : item.brand.displayName) +\r\n ' ' +\r\n this.renderVehicleAge(item) +\r\n ' - ' +\r\n item.value +\r\n (\r\n !this.hasRight(RoleClaimsEnum.AdminService) ? (\r\n ' (' +\r\n item.offerValue +\r\n ')'\r\n ) : ''\r\n )}\r\n

\r\n )));\r\n };\r\n\r\n renderVehicleAge = (tv: TariffValue) => {\r\n if (tv.startVehicleYear === null && tv.endVehicleYear === null) {\r\n return '';\r\n }\r\n const start = tv.startVehicleYear === null ? '0' : tv.startVehicleYear;\r\n const end = tv.endVehicleYear === null ? '' : tv.endVehicleYear;\r\n\r\n return '(' + start + '<' + end + ')';\r\n };\r\n\r\n getDistinctTariffTypes = (tariffValues: TariffValue[]) => {\r\n return tariffValues\r\n .map((item) => item.tariffType)\r\n .filter((tt, index, arr) => arr.findIndex((i) => i.id === tt.id) == index);\r\n };\r\n\r\n getDistinctInsurer = (dateLS: DateLaborService) => {\r\n return _.map(_.groupBy(dateLS.tariffValues, 'insurerId'), \r\n (items, insurerId) => ({\r\n insurer: items[0].insurer,\r\n tariffValues: items,\r\n }));\r\n };\r\n\r\n deleteTariff = async (date: Date) => {\r\n try {\r\n const dateLocal = moment.utc(date.toDateString()).local().toDate();\r\n await this.tariffService.DeleteTariffValues(this.props.tariffId, dateLocal);\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n () => {\r\n this.loadData();\r\n }\r\n );\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (err) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n showTimelineTariff = () => {\r\n const dataLaborServices = this.structureTariffValuesAccordingToDate();\r\n if (dataLaborServices.length === 0) {\r\n return (\r\n \r\n {this.translatorService.Tranlate(\r\n 'TARIFF_EDIT_LABOR_TAB_NO_DATA',\r\n 'Nu exista date de afisat!'\r\n )}\r\n \r\n );\r\n }\r\n\r\n return dataLaborServices.map((dateTariff) => (\r\n
\r\n
\r\n
\r\n

\r\n {moment(dateTariff.date).format(this.props.appState.dateFormat)}\r\n {moment(dateTariff.date).toDate() > new Date() ? (\r\n \r\n this.deleteTariff(moment(dateTariff.date).toDate())}\r\n >\r\n \r\n \r\n \r\n ) : null}\r\n

\r\n {this.getDistinctInsurer(dateTariff).map((item) => {\r\n return (\r\n <>\r\n

\r\n {item.insurer ? item.insurer!.displayName : this.translatorService.Tranlate('SELECT_NONE_OPTION', 'Niciunul')}\r\n

\r\n \r\n {this.getDistinctTariffTypes(item.tariffValues).map((tt) => {\r\n const tariffValues = item.tariffValues.filter(\r\n (item) => item.tariffTypeId === tt.id\r\n );\r\n\r\n return (\r\n \r\n
{tt.displayName}
\r\n {this.renderTariffValues(tariffValues)}\r\n
\r\n );\r\n })}\r\n
\r\n \r\n );\r\n })}\r\n \r\n
\r\n
\r\n ));\r\n };\r\n\r\n editInsertTarifLaborButton = (button: number) => {\r\n const dataLaborServices = this.structureTariffValuesAccordingToDate();\r\n\r\n if (button === 2) {\r\n this.setState({\r\n activeAction: button,\r\n selectedDate: new Date(),\r\n minDate: new Date()\r\n });\r\n } else {\r\n this.setState({\r\n activeAction: button,\r\n selectedDate: new Date(),\r\n minDate: new Date()\r\n });\r\n }\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.tariffService = (this.context as AppContext).tariffService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n return (\r\n \r\n \r\n {this.state.tariffValues.length > 0 ? (\r\n \r\n
\r\n \r\n this.editInsertTarifLaborButton(1)}\r\n >\r\n \r\n \r\n \r\n \r\n this.editInsertTarifLaborButton(2)}\r\n >\r\n \r\n \r\n \r\n
\r\n\r\n {this.state.activeAction !== 0\r\n ? this.renderEditTariffValues(this.state.activeAction)\r\n : null}\r\n
\r\n ) : (\r\n \r\n
\r\n \r\n this.editInsertTarifLaborButton(2)}\r\n >\r\n \r\n \r\n \r\n
\r\n\r\n {this.state.activeAction !== 0\r\n ? this.renderEditTariffValues(this.state.activeAction)\r\n : null}\r\n
\r\n )}\r\n
\r\n\r\n \r\n \r\n \r\n \r\n
\r\n {' '}\r\n {this.showTimelineTariff()}{' '}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalEditTarifLaborTabProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\nexport default connect(\r\n (state: ApplicationState) => ({ appState: state.app }),\r\n { ...AppUserAdminActionCreators, ...AppActionCreators },\r\n mergeProps\r\n)(withSnackbar(EditTarifLaborTabf as any));\r\n","import React, { Fragment } from 'react';\r\nimport {\r\n AppUserAdminActionCreators,\r\n ApplicationState,\r\n AppActionCreators,\r\n AppState\r\n} from '../../../store';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport { Button, Card, Tabs, Tab, CardContent, Box } from '@material-ui/core';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport { Organization } from '../../../interfaces/Organization';\r\nimport { IOrganizationService } from '../../../services/Interfaces/IOrganizationService';\r\nimport { ValidatorForm, TextValidator } from 'react-material-ui-form-validator';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport TabPanel from '../../_shared/Tabs';\r\nimport { Tariff, TariffPartner } from '../../../interfaces/Tariff';\r\nimport { ITariffService } from '../../../services/Interfaces/ITariffService';\r\nimport { ParametreCode, ReferentialCode, RoleClaimsEnum, RoleCodeEnum, TariffCategoryCode, includedTariffTypeGroupCodes } from '../../../helpers/Constants';\r\nimport Referentials from '../../../helpers/Referentials.json';\r\nimport { IReferential } from '../../../interfaces/IReferential';\r\nimport EditTariffLaborTab from './EditTariffLaborTab';\r\nimport { IWorkflowService } from '../../../services/Interfaces/IWorkflowService';\r\n\r\ninterface IEditTariffState {\r\n tariff: Tariff;\r\n partnersTariff: Organization[];\r\n selectedTab: number;\r\n tariffTypeGroupList: IReferential[];\r\n hoOrganizations: Organization[];\r\n isUsed: boolean;\r\n currency: string;\r\n}\r\n\r\nexport interface ExternalEditTariffProps {\r\n tariffChanged?: () => void;\r\n tariffId: number;\r\n}\r\n\r\ntype EditTariffProps = { appState: AppState } & ProviderContext &\r\n ExternalEditTariffProps &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass EditTariff extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private appReferentialService!: IReferentialService;\r\n private organizationService!: IOrganizationService;\r\n private tariffService!: ITariffService;\r\n private workflowService!: IWorkflowService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n tariff: {\r\n id: 0,\r\n name: '',\r\n owner: null,\r\n partner: null,\r\n gtId: this.props.appState.appUser!.gtId,\r\n tariffCategoryId: 0,\r\n isActive: true,\r\n tariffPartners: [] as TariffPartner[]\r\n } as Tariff,\r\n partnersTariff: [],\r\n selectedTab: 0,\r\n tariffTypeGroupList: [],\r\n hoOrganizations: [] as Organization[],\r\n isUsed: false,\r\n currency: ''\r\n } as IEditTariffState;\r\n\r\n public async componentDidMount() {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n\r\n let tariff = this.state.tariff;\r\n\r\n const tariffCategoryRef = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.TariffCategory\r\n );\r\n const tariffGroupTypeRef = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.TariffTypeGroup\r\n );\r\n\r\n const insurerRef = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.Insurer\r\n );\r\n\r\n const countryId = this.hasRight(RoleClaimsEnum.AdminCountryOrganization) || this.hasRight(RoleClaimsEnum.AdminService) ? this.props.appState.appUser!.countryId : null;\r\n const [\r\n organizations,\r\n tariffCategoryList,\r\n tariffGroupTypeList,\r\n insurerList,\r\n tariffPartners,\r\n hoOrganizations,\r\n workflowsCount\r\n ] = await Promise.all([\r\n this.organizationService.GetOrganizationsForTariffPartners(hoId, countryId),\r\n this.appReferentialService.Get(tariffCategoryRef!.baseUrl),\r\n this.appReferentialService.Get(tariffGroupTypeRef!.baseUrl),\r\n this.appReferentialService.Get(insurerRef!.baseUrl),\r\n this.tariffService.GetTariffPartners(this.props.tariffId),\r\n this.organizationService.GetHOOrganizations(countryId),\r\n this.workflowService.GetTariffWorkflowsCount(this.props.tariffId)\r\n ]);\r\n\r\n tariff.ownerId = hoId;\r\n\r\n if (this.props.tariffId !== 0) {\r\n tariff = await this.tariffService.GetTariff(this.props.tariffId);\r\n tariff.tariffPartners = tariffPartners;\r\n\r\n const partner = organizations.find((item) => item.id === tariff.partnerId);\r\n tariff.partner = partner !== undefined ? partner : null;\r\n\r\n tariff.tariffPartners.forEach((p) => {\r\n const partner = hoOrganizations.find((o) => o.id === p.partnerId);\r\n p.partner = partner !== undefined ? partner : null;\r\n });\r\n }\r\n\r\n const [owner, orgParameters] = await Promise.all([\r\n this.organizationService.GetOrganization(tariff.ownerId),\r\n this.organizationService.GetOrganizationParameters(tariff.ownerId)\r\n ]);\r\n tariff.owner = owner !== undefined ? owner : null;\r\n\r\n tariff.tariffCategoryId = tariffCategoryList.find(\r\n (item) => item.code === TariffCategoryCode.REP\r\n )!.id;\r\n\r\n console.log('tariff', tariff);\r\n\r\n console.log('parameters', orgParameters);\r\n const currency = orgParameters.find(\r\n (item) => item.parameter!.code === ParametreCode.CURRENCY\r\n );\r\n\r\n this.setState({\r\n tariff: tariff,\r\n partnersTariff: organizations.filter((item) => item.isActive === true),\r\n tariffTypeGroupList: this.hasRight(RoleClaimsEnum.AdminService) ? tariffGroupTypeList.filter((item) => includedTariffTypeGroupCodes.includes(item.code ?? \"\")) : tariffGroupTypeList.filter((item) => item.isActive === true),\r\n hoOrganizations: hoOrganizations,\r\n isUsed: workflowsCount > 0,\r\n currency: currency ? currency.value : ''\r\n });\r\n }\r\n\r\n public hasRole = (roleCode: string): boolean => {\r\n return this.props.appState.appUser?.userRole?.code === roleCode;\r\n };\r\n\r\n public hasRight = (right: string): boolean => {\r\n return this.props.appState!.user!.profile.role.includes(right);\r\n };\r\n\r\n private handleNameGUIChange = (event: React.ChangeEvent) => {\r\n let value: any;\r\n if (event.target.type === 'text') {\r\n value = event.currentTarget.value;\r\n }\r\n this.setState({\r\n tariff: {\r\n ...this.state.tariff,\r\n name: value\r\n }\r\n });\r\n };\r\n\r\n private handlePartnerTariffChange = (newValue: Organization | null) => {\r\n this.setState({\r\n tariff: {\r\n ...this.state.tariff,\r\n name:\r\n newValue === null ? '' : this.state.tariff.owner!.name + ' - ' + newValue!.displayName,\r\n partner: newValue,\r\n partnerId: newValue === null ? 0 : newValue!.id\r\n }\r\n });\r\n };\r\n\r\n private handleOtherPartnerTariffChange = (newValue: Organization[]) => {\r\n this.setState({\r\n tariff: {\r\n ...this.state.tariff,\r\n tariffPartners: newValue.map((item) => {\r\n return {\r\n id: 0,\r\n partner: item,\r\n partnerId: item.id,\r\n tariffId: this.props.tariffId\r\n } as TariffPartner;\r\n })\r\n }\r\n });\r\n };\r\n public saveTariff = async () => {\r\n try {\r\n if (!(await this.isValid(this.state.tariff))) {\r\n return;\r\n }\r\n\r\n if (this.props.tariffId === 0) {\r\n await this.tariffService.AddTariff(this.state.tariff);\r\n } else {\r\n await this.tariffService.UpdateTariff(this.state.tariff);\r\n }\r\n\r\n if (this.props.tariffChanged) {\r\n this.props.tariffChanged();\r\n }\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n public isValid = async (tariff: Tariff): Promise => {\r\n const tariffList = await this.tariffService.GetTariffs(tariff.ownerId);\r\n\r\n let filterList = tariffList.filter((item) => item.name === tariff.name);\r\n\r\n if (filterList.length > 1) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('ERROR_MSG_TARIFF_EXISTS', 'Tariful exista deja!'),\r\n { variant: 'error' }\r\n );\r\n return false;\r\n }\r\n if (filterList.length === 1 && filterList[0].id !== tariff.id) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('ERROR_MSG_TARIFF_EXISTS', 'Tariful exista deja!'),\r\n { variant: 'error' }\r\n );\r\n return false;\r\n }\r\n\r\n filterList = tariffList.filter(\r\n (item) => item.ownerId === tariff.ownerId && item.partnerId === tariff.partnerId\r\n );\r\n\r\n if (filterList.length > 1) {\r\n // this.props.enqueueSnackbar(\r\n // this.translatorService.Tranlate('ERROR_WARNING_TARIFF_EXISTS', 'Tariful exista deja!'),\r\n // { variant: 'warning' }\r\n // );\r\n return true;\r\n }\r\n if (filterList.length === 1 && filterList[0].id !== tariff.id) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('ERROR_WARNING_TARIFF_EXISTS', 'Tariful exista deja!'),\r\n { variant: 'warning' }\r\n );\r\n return true;\r\n }\r\n\r\n return true;\r\n };\r\n\r\n public renderForm() {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n this.handlePartnerTariffChange(newValue)\r\n }\r\n getOptionLabel={(option: Organization) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n {\r\n !this.hasRight(RoleClaimsEnum.AdminService) && (\r\n \r\n )\r\n }\r\n {\r\n !this.hasRight(RoleClaimsEnum.AdminService) && (\r\n item.isActive)}\r\n value={this.state.tariff.tariffPartners.map((tp) => tp.partner!)}\r\n onChange={(e: any, newValue: Organization[]) =>\r\n this.handleOtherPartnerTariffChange(newValue)\r\n }\r\n getOptionLabel={(option: Organization) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n )\r\n }\r\n \r\n \r\n \r\n \r\n\r\n
\r\n \r\n {this.translatorService.Tranlate('EDIT_TARIFF_CANCEL_BTN', 'Anuleaza')}\r\n \r\n \r\n
\r\n
\r\n );\r\n }\r\n\r\n onTabChange = (event: any, newValue: number) => {\r\n this.setState({ selectedTab: newValue });\r\n };\r\n\r\n createTabTariffGroupType = () => {\r\n const dataToRender = [] as any;\r\n this.state.tariffTypeGroupList.forEach((item: IReferential, index: number) => {\r\n dataToRender.push();\r\n });\r\n return dataToRender;\r\n };\r\n\r\n createTabPanelTariffGroupType = () => {\r\n const dataToRender = [] as any;\r\n this.state.tariffTypeGroupList.forEach((item: IReferential, index: number) => {\r\n dataToRender.push(\r\n \r\n \r\n \r\n );\r\n });\r\n return dataToRender;\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.tariffService = (this.context as AppContext).tariffService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n this.workflowService = (this.context as AppContext).workflowService;\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n {this.createTabTariffGroupType()}\r\n \r\n \r\n \r\n \r\n {this.renderForm()}\r\n \r\n {this.createTabPanelTariffGroupType()}\r\n \r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (stateProps: any, dispatchProps: any, ownProps: ExternalEditTariffProps) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\nexport default connect(\r\n (state: ApplicationState) => ({ appState: state.app }),\r\n { ...AppUserAdminActionCreators, ...AppActionCreators },\r\n mergeProps\r\n)(withSnackbar(EditTariff as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n AppUserAdminActionCreators,\r\n ApplicationState,\r\n AppActionCreators,\r\n AppState\r\n} from '../../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport {\r\n Button,\r\n Card,\r\n Tabs,\r\n Tab,\r\n CardContent,\r\n Box,\r\n Tooltip,\r\n IconButton,\r\n Dialog,\r\n DialogTitle,\r\n Grid,\r\n Typography,\r\n DialogContent,\r\n Switch\r\n} from '@material-ui/core';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { IOrganizationService } from '../../../services/Interfaces/IOrganizationService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport { Tariff } from '../../../interfaces/Tariff';\r\nimport { Organization } from '../../../interfaces/Organization';\r\nimport { ITariffService } from '../../../services/Interfaces/ITariffService';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport MUIDataTable, {\r\n SelectableRows,\r\n MUIDataTableColumnOptions,\r\n MUIDataTableMeta\r\n} from 'mui-datatables';\r\nimport { MUITranslations } from '../../../helpers/MUITableTranslations';\r\nimport AddCircleTwoToneIcon from '@material-ui/icons/AddCircleTwoTone';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport { isNullOrUndefined } from 'util';\r\nimport moment from 'moment';\r\nimport EditTariff from './EditTariff';\r\nimport { RoleClaimsEnum } from '../../../helpers/Constants';\r\n\r\ninterface ITariffsState {\r\n selectedTab: number;\r\n tariffs: Tariff[];\r\n isLoading: boolean;\r\n isOpenDialog: boolean;\r\n organizationId: number;\r\n selectedTariffId: number;\r\n}\r\n\r\ntype ITariffsProps = { appState: AppState } & ProviderContext & RouteComponentProps<{ id: string }>;\r\n\r\nclass Tariffs extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private organizationService!: IOrganizationService;\r\n private tariffService!: ITariffService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n public hasRight = (right: string): boolean => {\r\n return this.props.appState!.user!.profile.role.includes(right);\r\n };\r\n\r\n state = {\r\n selectedTab: this.hasRight(RoleClaimsEnum.AdminService) ? 1 : 0,\r\n tariffs: [],\r\n isLoading: false,\r\n isOpenDialog: false,\r\n organizationId: 0,\r\n selectedTariffId: 0\r\n } as ITariffsState;\r\n\r\n componentDidMount = () => {\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n () => {\r\n this.loadData(this.hasRight(RoleClaimsEnum.AdminService) ? 1 : 0);\r\n }\r\n );\r\n };\r\n\r\n loadData = async (selectedTab: number) => {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n\r\n if (isNaN(hoId)) {\r\n return;\r\n }\r\n\r\n try {\r\n const data = await this.tariffService.GetTariffs(hoId);\r\n const newTariffs = data.filter(\r\n (tariff: Tariff) =>\r\n (selectedTab === 0 && tariff.ownerId === hoId) ||\r\n (selectedTab === 1 && tariff.ownerId !== hoId)\r\n );\r\n\r\n this.setState({\r\n tariffs: newTariffs,\r\n isLoading: false,\r\n organizationId: hoId\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n editTariff = (id: number) => {\r\n this.setState({ isOpenDialog: true, selectedTariffId: id });\r\n };\r\n\r\n onRowClick = (e: any, id: number) => {\r\n this.editTariff(id);\r\n };\r\n\r\n handleIsActiveChange = async (\r\n event: React.ChangeEvent,\r\n tableMeta: MUIDataTableMeta\r\n ) => {\r\n const id = tableMeta.rowData[0];\r\n const newTariffs = [...this.state.tariffs];\r\n const updatedTariffIndex = newTariffs.findIndex((o) => o.id === id);\r\n\r\n if (updatedTariffIndex >= 0) {\r\n newTariffs[updatedTariffIndex] = {\r\n ...newTariffs[updatedTariffIndex],\r\n isActive: event.target.checked\r\n };\r\n\r\n try {\r\n await this.tariffService.UpdateTariff(newTariffs[updatedTariffIndex]);\r\n\r\n this.setState({ tariffs: newTariffs });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'name',\r\n label: this.translatorService.Tranlate('TARIFFS_TARIFF_NAME_HEADER', 'Tarif'),\r\n options: {\r\n sort: false,\r\n filter: false,\r\n customBodyRender: (value: string, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.onRowClick(e, tableMeta.rowData[0])}\r\n >\r\n {value}\r\n \r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'owner',\r\n label: this.translatorService.Tranlate('TARIFFS_TARIFF_OWNER_HEADER', 'Proprietar Tarif'),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: Organization) => {\r\n return isNullOrUndefined(value) ? '' : value.name;\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'partner',\r\n label: this.translatorService.Tranlate('TARIFFS_TARIFF_PARTNER_HEADER', 'Partener Tarif'),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: Organization) => {\r\n return isNullOrUndefined(value) ? '' : value.displayName;\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'dateModification',\r\n label: this.translatorService.Tranlate(\r\n 'TARIFFS_TARIFF_DATE_MODIFICATION_HEADER',\r\n 'Data Modificare'\r\n ),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: Date) =>\r\n moment(value).format(this.props.appState.longDateFormat)\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'isActive',\r\n label: this.translatorService.Tranlate('USERS_IS_ACTIVE_HEADER', 'Activ'),\r\n options: {\r\n sort: false,\r\n filterOptions: {\r\n names: [\r\n this.translatorService.Tranlate('TABLE_IS_ACTIVE_COLUMN_ACTIVE', 'Activ'),\r\n this.translatorService.Tranlate('TABLE_IS_ACTIVE_COLUMN_INACTIVE', 'Inactiv')\r\n ],\r\n logic(isActive: any, filterVal: string[]) {\r\n const show =\r\n (filterVal.indexOf(this.names[0]) !== -1 && isActive === true) ||\r\n (filterVal.indexOf(this.names[1]) !== -1 && isActive === false);\r\n return !show;\r\n }\r\n },\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.handleIsActiveChange(e, tableMeta)}\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n );\r\n }\r\n }\r\n }\r\n ];\r\n\r\n return columns;\r\n };\r\n\r\n onTabChange = (event: any, newValue: number) => {\r\n this.setState(\r\n {\r\n selectedTab: newValue,\r\n isLoading: true\r\n },\r\n () => {\r\n this.loadData(newValue);\r\n }\r\n );\r\n };\r\n\r\n handleClose = (reload: boolean) => {\r\n if (reload) {\r\n this.setState({ isOpenDialog: false }, async () => {\r\n await this.loadData(this.state.selectedTab);\r\n });\r\n } else {\r\n this.setState({ isOpenDialog: false });\r\n }\r\n };\r\n\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.tariffService = (this.context as AppContext).tariffService;\r\n\r\n const options = {\r\n filter: true,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n sort: false,\r\n // responsive: \"stacked\",\r\n customToolbar: () => {\r\n if (this.hasRight(RoleClaimsEnum.AdminService)) {\r\n return null;\r\n }\r\n return (\r\n \r\n {\r\n this.setState({ selectedTariffId: 0, isOpenDialog: true });\r\n }}\r\n >\r\n \r\n \r\n \r\n );\r\n }\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n ) : null}\r\n
\r\n\r\n \r\n \r\n \r\n \r\n \r\n {this.translatorService.Tranlate('TARIFFS_EDIT_MODAL_TITLE', 'Editare Tarif')}\r\n \r\n \r\n \r\n this.handleClose(false)}\r\n size={'small'}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n this.handleClose(true)}\r\n />\r\n \r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect((state: ApplicationState) => ({ appState: state.app }), {\r\n ...AppUserAdminActionCreators,\r\n ...AppActionCreators\r\n})(withSnackbar(Tariffs as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n AppUserAdminActionCreators,\r\n ApplicationState,\r\n AppActionCreators,\r\n AppState\r\n} from '../../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport {\r\n Button,\r\n Card,\r\n Tabs,\r\n Tab,\r\n CardContent,\r\n Box,\r\n Tooltip,\r\n IconButton,\r\n Dialog,\r\n DialogTitle,\r\n Grid,\r\n Typography,\r\n DialogContent,\r\n Switch,\r\n TextField\r\n} from '@material-ui/core';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { IOrganizationService } from '../../../services/Interfaces/IOrganizationService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport { Workflow, WorkflowParameter } from '../../../interfaces/Workflow';\r\nimport {\r\n Organization,\r\n OrganizationCaseType,\r\n Language,\r\n OrganizationParameter\r\n} from '../../../interfaces/Organization';\r\nimport { IWorkflowService } from '../../../services/Interfaces/IWorkflowService';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport MUIDataTable, {\r\n SelectableRows,\r\n MUIDataTableColumnOptions,\r\n MUIDataTableMeta\r\n} from 'mui-datatables';\r\nimport { MUITranslations } from '../../../helpers/MUITableTranslations';\r\nimport AddCircleTwoToneIcon from '@material-ui/icons/AddCircleTwoTone';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport { isNullOrUndefined } from 'util';\r\nimport moment from 'moment';\r\nimport { ValidatorForm, TextValidator } from 'react-material-ui-form-validator';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport Referentials from '../../../helpers/Referentials.json';\r\nimport { ReferentialCode, RoleClaimsEnum, RoleCodeEnum } from '../../../helpers/Constants';\r\nimport { IReferential, ITranslation } from '../../../interfaces/IReferential';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport NumberFormat from 'react-number-format';\r\n\r\ninterface IWorkflowsState {\r\n selectedTab: number;\r\n workflows: Workflow[];\r\n isLoading: boolean;\r\n organizationId: number;\r\n isDialogOpen: boolean;\r\n newWorkflow: Workflow;\r\n caseTypeList: IReferential[];\r\n}\r\n\r\ntype IWorkflowsProps = { appState: AppState } & ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass Workflows extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private organizationService!: IOrganizationService;\r\n private appReferentialService!: IReferentialService;\r\n private workflowService!: IWorkflowService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n selectedTab: 0,\r\n workflows: [],\r\n isLoading: false,\r\n organizationId: 0,\r\n isDialogOpen: false,\r\n newWorkflow: {\r\n id: 0,\r\n name: '',\r\n displayName: '',\r\n isActive: true,\r\n organizationOwnerId: 0,\r\n organizationOwner: null,\r\n caseType: null,\r\n caseTypeId: 0,\r\n translations: [],\r\n workflowParameters: [],\r\n workflowSections: [],\r\n workflowSteps: [],\r\n workflowPartners: [],\r\n workflowTariffs: [],\r\n workflowSuppliers: [],\r\n isPrcIntegration: false,\r\n isMvoIntegration: false,\r\n isCarfixIntegration: false,\r\n isDgpciIntegration: false\r\n } as unknown as Workflow,\r\n caseTypeList: []\r\n } as IWorkflowsState;\r\n\r\n componentDidMount = () => {\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n () => {\r\n this.loadData(0);\r\n }\r\n );\r\n };\r\n\r\n public hasRole = (roleCode: string): boolean => {\r\n return this.props.appState.appUser?.userRole?.code === roleCode;\r\n };\r\n \r\n loadData = async (selectedTab: number) => {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n\r\n if (Number.isNaN(hoId)) {\r\n return;\r\n }\r\n\r\n try {\r\n const ref = Referentials.referential.find((item) => item.code === ReferentialCode.CaseType);\r\n const [data, hoList, orgCaseTypes] = await Promise.all([\r\n this.workflowService.GetWorkflows(hoId),\r\n this.organizationService.GetHOOrganizations(this.hasRight(RoleClaimsEnum.AdminCountryOrganization) ? this.props.appState.appUser!.countryId : null),\r\n this.appReferentialService.Get(ref!.baseUrl)\r\n ]);\r\n\r\n data.forEach((value) => {\r\n const ho = hoList.find((org) => org.id === value.organizationOwnerId);\r\n value.organizationOwner = isNullOrUndefined(ho) ? null : ho;\r\n\r\n const workflowCaseType = orgCaseTypes.find((item) => item.id === value.caseTypeId);\r\n value.caseType = isNullOrUndefined(workflowCaseType) ? null : workflowCaseType;\r\n });\r\n\r\n const newWorkflows = data.filter(\r\n (workflow: Workflow) =>\r\n (selectedTab === 0 && workflow.organizationOwnerId === hoId) ||\r\n (selectedTab === 1 && workflow.organizationOwnerId !== hoId)\r\n );\r\n\r\n this.setState({\r\n workflows: newWorkflows,\r\n isLoading: false,\r\n organizationId: hoId\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n public hasRight = (right: string): boolean => {\r\n return this.props.appState!.user!.profile.role.includes(right);\r\n };\r\n\r\n newWorkflow = async () => {\r\n const newWorkflow = { ...this.state.newWorkflow };\r\n newWorkflow.organizationOwnerId = this.state.organizationId;\r\n\r\n const ref = Referentials.referential.find((item) => item.code === ReferentialCode.CaseType);\r\n const [owner, parameters, orgCaseList, orgCaseTypes] = await Promise.all([\r\n this.organizationService.GetOrganization(newWorkflow.organizationOwnerId),\r\n this.organizationService.GetOrganizationParameters(newWorkflow.organizationOwnerId),\r\n this.organizationService.GetOrganizationCaseType(newWorkflow.organizationOwnerId),\r\n this.appReferentialService.Get(ref!.baseUrl)\r\n ]);\r\n\r\n newWorkflow.organizationOwner = owner !== undefined ? owner : ({} as Organization);\r\n\r\n const languages = this.activeLanguages();\r\n\r\n let organizationCases = orgCaseList.sort(function (a, b) {\r\n return a.order - b.order;\r\n });\r\n organizationCases = organizationCases.map((item: OrganizationCaseType) => {\r\n item.caseType = orgCaseTypes.find(\r\n (caseType: IReferential) => caseType.id === item.caseTypeId\r\n )!;\r\n return item;\r\n });\r\n\r\n const workflowTranslations = newWorkflow.translations;\r\n languages.forEach((language: Language, index: number) => {\r\n if (workflowTranslations.length === 0) {\r\n workflowTranslations.push({\r\n id: 0,\r\n referentialTypeId: 0,\r\n name: newWorkflow.organizationOwner!.name + ' - ',\r\n language: language.code\r\n });\r\n } else {\r\n const indexTrans = workflowTranslations.findIndex((trans: ITranslation) => {\r\n return language.code === trans.language;\r\n });\r\n if (indexTrans === -1) {\r\n workflowTranslations.push({\r\n id: 0,\r\n referentialTypeId: 0,\r\n name: newWorkflow.organizationOwner!.name + ' - ',\r\n language: language.code\r\n });\r\n }\r\n }\r\n });\r\n newWorkflow.translations = [...workflowTranslations];\r\n const activeLanguage = this.translatorService.GetLanguage();\r\n\r\n const workflowParametersData = parameters.map((item: OrganizationParameter) => {\r\n const workflowParameter = {\r\n id: 0,\r\n parameterId: item.parameterId,\r\n date: item.date,\r\n workflowId: 0,\r\n value: item.value\r\n } as WorkflowParameter;\r\n return workflowParameter;\r\n });\r\n newWorkflow.name =\r\n workflowTranslations.length === 0\r\n ? ''\r\n : workflowTranslations.find((item) => item.language === activeLanguage)!.name!;\r\n newWorkflow.displayName = newWorkflow.name;\r\n newWorkflow.workflowParameters = workflowParametersData;\r\n\r\n this.setState({\r\n newWorkflow: newWorkflow,\r\n caseTypeList: organizationCases.map((item) => item.caseType!),\r\n isDialogOpen: true\r\n });\r\n };\r\n\r\n onRowClick = async (e: any, workflowId: number, value: string) => {\r\n const workflow = this.state.workflows.find((item) => item.id === workflowId);\r\n if (workflow === undefined) {\r\n return;\r\n }\r\n this.props.history.push(\r\n '/admin/hoorganizations/' + workflow.organizationOwnerId + '/workflow/' + workflowId,\r\n value\r\n );\r\n };\r\n\r\n handleIsActiveChange = async (\r\n event: React.ChangeEvent,\r\n tableMeta: MUIDataTableMeta\r\n ) => {\r\n const id = tableMeta.rowData[0];\r\n const newWorkflows = [...this.state.workflows];\r\n const updatedWorkflowIndex = newWorkflows.findIndex((o) => o.id === id);\r\n\r\n if (updatedWorkflowIndex >= 0) {\r\n newWorkflows[updatedWorkflowIndex] = {\r\n ...newWorkflows[updatedWorkflowIndex],\r\n isActive: event.target.checked\r\n };\r\n\r\n try {\r\n await this.workflowService.UpdateWorkflow(newWorkflows[updatedWorkflowIndex]);\r\n\r\n this.setState({ workflows: newWorkflows });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n\r\n handleIsPrcIntegrationChange = async (\r\n event: React.ChangeEvent,\r\n tableMeta: MUIDataTableMeta\r\n ) => {\r\n const id = tableMeta.rowData[0];\r\n const newWorkflows = [...this.state.workflows];\r\n const updatedWorkflowIndex = newWorkflows.findIndex((o) => o.id === id);\r\n\r\n if (updatedWorkflowIndex >= 0) {\r\n newWorkflows[updatedWorkflowIndex] = {\r\n ...newWorkflows[updatedWorkflowIndex],\r\n isPrcIntegration: event.target.checked\r\n };\r\n\r\n try {\r\n await this.workflowService.UpdateWorkflow(newWorkflows[updatedWorkflowIndex]);\r\n\r\n this.setState({ workflows: newWorkflows });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n\r\n handleIsMvoIntegrationChange = async (\r\n event: React.ChangeEvent,\r\n tableMeta: MUIDataTableMeta\r\n ) => {\r\n const id = tableMeta.rowData[0];\r\n const newWorkflows = [...this.state.workflows];\r\n const updatedWorkflowIndex = newWorkflows.findIndex((o) => o.id === id);\r\n\r\n if (updatedWorkflowIndex >= 0) {\r\n newWorkflows[updatedWorkflowIndex] = {\r\n ...newWorkflows[updatedWorkflowIndex],\r\n isMvoIntegration: event.target.checked\r\n };\r\n\r\n try {\r\n await this.workflowService.UpdateWorkflow(newWorkflows[updatedWorkflowIndex]);\r\n\r\n this.setState({ workflows: newWorkflows });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n\r\n handleIsCarfixIntegrationChange = async (\r\n event: React.ChangeEvent,\r\n tableMeta: MUIDataTableMeta\r\n ) => {\r\n const id = tableMeta.rowData[0];\r\n const newWorkflows = [...this.state.workflows];\r\n const updatedWorkflowIndex = newWorkflows.findIndex((o) => o.id === id);\r\n\r\n if (updatedWorkflowIndex >= 0) {\r\n newWorkflows[updatedWorkflowIndex] = {\r\n ...newWorkflows[updatedWorkflowIndex],\r\n isCarfixIntegration: event.target.checked\r\n };\r\n\r\n try {\r\n await this.workflowService.UpdateWorkflow(newWorkflows[updatedWorkflowIndex]);\r\n\r\n this.setState({ workflows: newWorkflows });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n\r\n handleIsDgpciIntegrationChange = async (\r\n event: React.ChangeEvent,\r\n tableMeta: MUIDataTableMeta\r\n ) => {\r\n const id = tableMeta.rowData[0];\r\n const newWorkflows = [...this.state.workflows];\r\n const updatedWorkflowIndex = newWorkflows.findIndex((o) => o.id === id);\r\n\r\n if (updatedWorkflowIndex >= 0) {\r\n newWorkflows[updatedWorkflowIndex] = {\r\n ...newWorkflows[updatedWorkflowIndex],\r\n isDgpciIntegration: event.target.checked\r\n };\r\n\r\n try {\r\n await this.workflowService.UpdateWorkflow(newWorkflows[updatedWorkflowIndex]);\r\n\r\n this.setState({ workflows: newWorkflows });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n\r\n handleUseRoundUpChange = async (\r\n event: React.ChangeEvent,\r\n tableMeta: MUIDataTableMeta\r\n ) => {\r\n const id = tableMeta.rowData[0];\r\n const newWorkflows = [...this.state.workflows];\r\n const updatedWorkflowIndex = newWorkflows.findIndex((o) => o.id === id);\r\n\r\n if (updatedWorkflowIndex >= 0) {\r\n newWorkflows[updatedWorkflowIndex] = {\r\n ...newWorkflows[updatedWorkflowIndex],\r\n useRoundUp: event.target.checked\r\n };\r\n\r\n try {\r\n await this.workflowService.UpdateWorkflow(newWorkflows[updatedWorkflowIndex]);\r\n\r\n this.setState({ workflows: newWorkflows });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n\r\n handleAutomatePlaceOrderChange = async (\r\n event: React.ChangeEvent,\r\n tableMeta: MUIDataTableMeta\r\n ) => {\r\n const id = tableMeta.rowData[0];\r\n const newWorkflows = [...this.state.workflows];\r\n const updatedWorkflowIndex = newWorkflows.findIndex((o) => o.id === id);\r\n\r\n if (updatedWorkflowIndex >= 0) {\r\n newWorkflows[updatedWorkflowIndex] = {\r\n ...newWorkflows[updatedWorkflowIndex],\r\n automatePlaceOrder: event.target.checked\r\n };\r\n\r\n try {\r\n await this.workflowService.UpdateWorkflow(newWorkflows[updatedWorkflowIndex]);\r\n\r\n this.setState({ workflows: newWorkflows });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n\r\n handleAutomateGenerateOrderChange = async (\r\n event: React.ChangeEvent,\r\n tableMeta: MUIDataTableMeta\r\n ) => {\r\n const id = tableMeta.rowData[0];\r\n const newWorkflows = [...this.state.workflows];\r\n const updatedWorkflowIndex = newWorkflows.findIndex((o) => o.id === id);\r\n\r\n if (updatedWorkflowIndex >= 0) {\r\n newWorkflows[updatedWorkflowIndex] = {\r\n ...newWorkflows[updatedWorkflowIndex],\r\n automateGenerateOrder: event.target.checked\r\n };\r\n\r\n try {\r\n await this.workflowService.UpdateWorkflow(newWorkflows[updatedWorkflowIndex]);\r\n\r\n this.setState({ workflows: newWorkflows });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n\r\n handleB2BIntegrationChange = async (\r\n event: React.ChangeEvent,\r\n tableMeta: MUIDataTableMeta\r\n ) => {\r\n const id = tableMeta.rowData[0];\r\n const newWorkflows = [...this.state.workflows];\r\n const updatedWorkflowIndex = newWorkflows.findIndex((o) => o.id === id);\r\n\r\n if (updatedWorkflowIndex >= 0) {\r\n newWorkflows[updatedWorkflowIndex] = {\r\n ...newWorkflows[updatedWorkflowIndex],\r\n b2BIntegration: event.target.checked\r\n };\r\n\r\n try {\r\n await this.workflowService.UpdateWorkflow(newWorkflows[updatedWorkflowIndex]);\r\n\r\n this.setState({ workflows: newWorkflows });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n\r\n handleOrderConfirmationToServiceChange = async (\r\n event: React.ChangeEvent,\r\n tableMeta: MUIDataTableMeta\r\n ) => {\r\n const id = tableMeta.rowData[0];\r\n const newWorkflows = [...this.state.workflows];\r\n const updatedWorkflowIndex = newWorkflows.findIndex((o) => o.id === id);\r\n\r\n if (updatedWorkflowIndex >= 0) {\r\n newWorkflows[updatedWorkflowIndex] = {\r\n ...newWorkflows[updatedWorkflowIndex],\r\n orderConfirmationToService: event.target.checked\r\n };\r\n\r\n try {\r\n await this.workflowService.UpdateWorkflow(newWorkflows[updatedWorkflowIndex]);\r\n\r\n this.setState({ workflows: newWorkflows });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n\r\n handleChangeCaseStatusBasedCalculationChange = async (\r\n event: React.ChangeEvent,\r\n tableMeta: MUIDataTableMeta\r\n ) => {\r\n const id = tableMeta.rowData[0];\r\n const newWorkflows = [...this.state.workflows];\r\n const updatedWorkflowIndex = newWorkflows.findIndex((o) => o.id === id);\r\n\r\n if (updatedWorkflowIndex >= 0) {\r\n newWorkflows[updatedWorkflowIndex] = {\r\n ...newWorkflows[updatedWorkflowIndex],\r\n changeCaseStatusBasedCalculation: event.target.checked\r\n };\r\n\r\n try {\r\n await this.workflowService.UpdateWorkflow(newWorkflows[updatedWorkflowIndex]);\r\n\r\n this.setState({ workflows: newWorkflows });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n\r\n handleChangeSaveDocumentsChange = async (\r\n event: React.ChangeEvent,\r\n tableMeta: MUIDataTableMeta\r\n ) => {\r\n const id = tableMeta.rowData[0];\r\n const newWorkflows = [...this.state.workflows];\r\n const updatedWorkflowIndex = newWorkflows.findIndex((o) => o.id === id);\r\n\r\n if (updatedWorkflowIndex >= 0) {\r\n newWorkflows[updatedWorkflowIndex] = {\r\n ...newWorkflows[updatedWorkflowIndex],\r\n saveDocuments: event.target.checked\r\n };\r\n\r\n try {\r\n await this.workflowService.UpdateWorkflow(newWorkflows[updatedWorkflowIndex]);\r\n\r\n this.setState({ workflows: newWorkflows });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n\r\n handleIsEvaluationWorklfowChange = async (\r\n event: React.ChangeEvent,\r\n tableMeta: MUIDataTableMeta\r\n ) => {\r\n const id = tableMeta.rowData[0];\r\n const newWorkflows = [...this.state.workflows];\r\n const updatedWorkflowIndex = newWorkflows.findIndex((o) => o.id === id);\r\n\r\n if (updatedWorkflowIndex >= 0) {\r\n newWorkflows[updatedWorkflowIndex] = {\r\n ...newWorkflows[updatedWorkflowIndex],\r\n isEvaluationWorkflow: event.target.checked\r\n };\r\n\r\n try {\r\n await this.workflowService.UpdateWorkflow(newWorkflows[updatedWorkflowIndex]);\r\n\r\n this.setState({ workflows: newWorkflows });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n\r\n handleHideRenewAdvertChange = async (\r\n event: React.ChangeEvent,\r\n tableMeta: MUIDataTableMeta\r\n ) => {\r\n const id = tableMeta.rowData[0];\r\n const newWorkflows = [...this.state.workflows];\r\n const updatedWorkflowIndex = newWorkflows.findIndex((o) => o.id === id);\r\n\r\n if (updatedWorkflowIndex >= 0) {\r\n newWorkflows[updatedWorkflowIndex] = {\r\n ...newWorkflows[updatedWorkflowIndex],\r\n hideRenewAdvert: event.target.checked\r\n };\r\n\r\n try {\r\n await this.workflowService.UpdateWorkflow(newWorkflows[updatedWorkflowIndex]);\r\n\r\n this.setState({ workflows: newWorkflows });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n\r\n\r\n handleHideCommentsChange = async (\r\n event: React.ChangeEvent,\r\n tableMeta: MUIDataTableMeta\r\n ) => {\r\n const id = tableMeta.rowData[0];\r\n const newWorkflows = [...this.state.workflows];\r\n const updatedWorkflowIndex = newWorkflows.findIndex((o) => o.id === id);\r\n\r\n if (updatedWorkflowIndex >= 0) {\r\n newWorkflows[updatedWorkflowIndex] = {\r\n ...newWorkflows[updatedWorkflowIndex],\r\n hideComments: event.target.checked\r\n };\r\n\r\n try {\r\n await this.workflowService.UpdateWorkflow(newWorkflows[updatedWorkflowIndex]);\r\n\r\n this.setState({ workflows: newWorkflows });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n\r\n handleHasNonStockValidationChange = async (\r\n event: React.ChangeEvent,\r\n tableMeta: MUIDataTableMeta\r\n ) => {\r\n const id = tableMeta.rowData[0];\r\n const newWorkflows = [...this.state.workflows];\r\n const updatedWorkflowIndex = newWorkflows.findIndex((o) => o.id === id);\r\n\r\n if (updatedWorkflowIndex >= 0) {\r\n newWorkflows[updatedWorkflowIndex] = {\r\n ...newWorkflows[updatedWorkflowIndex],\r\n hasNonStockValidation: event.target.checked\r\n };\r\n\r\n try {\r\n await this.workflowService.UpdateWorkflow(newWorkflows[updatedWorkflowIndex]);\r\n\r\n this.setState({ workflows: newWorkflows });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n\r\n handleVQInterogation = async (\r\n value: string | null,\r\n tableMeta: MUIDataTableMeta\r\n ) => {\r\n const id = tableMeta.rowData[0];\r\n const newWorkflows = [...this.state.workflows];\r\n const updatedWorkflowIndex = newWorkflows.findIndex((o) => o.id === id);\r\n\r\n if (updatedWorkflowIndex >= 0) {\r\n newWorkflows[updatedWorkflowIndex] = {\r\n ...newWorkflows[updatedWorkflowIndex],\r\n vqInterogationValue: value === null ? null : parseFloat(value)\r\n };\r\n\r\n this.setState({ workflows: newWorkflows });\r\n\r\n try {\r\n await this.workflowService.UpdateWorkflow(newWorkflows[updatedWorkflowIndex]);\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n\r\n\r\n saveWorkflow = async () => {\r\n try {\r\n let workflowExist = -1;\r\n this.state.workflows.forEach((item: Workflow, index: number) => {\r\n if (\r\n item.caseTypeId === this.state.newWorkflow.caseTypeId &&\r\n item.organizationOwnerId === this.state.newWorkflow.organizationOwnerId\r\n ) {\r\n let indexFinded = -1;\r\n for (const i of item.translations) {\r\n indexFinded = Math.max(\r\n indexFinded,\r\n this.state.newWorkflow.translations.findIndex(\r\n (item) => item.language === i.language && item.name === i.name\r\n )\r\n );\r\n }\r\n workflowExist = indexFinded;\r\n return;\r\n } else {\r\n workflowExist = Math.max(workflowExist, -1);\r\n }\r\n });\r\n\r\n if (workflowExist !== -1) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('ERROR_MSG_WORKFLOW_EXISTS', 'Fluxul exista deja!'),\r\n { variant: 'error' }\r\n );\r\n return;\r\n }\r\n\r\n await this.workflowService.AddWorkflow(this.state.newWorkflow);\r\n\r\n this.closeDialog();\r\n\r\n await this.loadData(this.state.selectedTab);\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'displayName',\r\n label: this.translatorService.Tranlate('WORKFLOWS_WORKFLOW_NAME_HEADER', 'Flux'),\r\n options: {\r\n sort: false,\r\n filter: false,\r\n customBodyRender: (value: string, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.onRowClick(e, tableMeta.rowData[0], value)}\r\n >\r\n {value}\r\n \r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'organizationOwner',\r\n label: this.translatorService.Tranlate(\r\n 'WORKFLOWS_WORKFLOW_OWNER_HEADER',\r\n 'Proprietar Flux'\r\n ),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: Organization) => {\r\n return isNullOrUndefined(value) ? '' : value.name;\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'caseType',\r\n label: this.translatorService.Tranlate('WORKFLOWS_WORKFLOW_CASE_TYPE_HEADER', 'Tip Dosar'),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: IReferential) => {\r\n return isNullOrUndefined(value) ? '' : value.displayName;\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'dateModification',\r\n label: this.translatorService.Tranlate(\r\n 'WORKFLOWS_WORKFLOW_DATE_MODIFICATION_HEADER',\r\n 'Data Modificare'\r\n ),\r\n options: {\r\n sort: false,\r\n filter: false,\r\n customBodyRender: (value: Date) =>\r\n moment(value).toDate().toLocaleString(this.props.appState.language)\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'isActive',\r\n label: this.translatorService.Tranlate('USERS_IS_ACTIVE_HEADER', 'Activ'),\r\n options: {\r\n sort: false,\r\n filterOptions: {\r\n names: [\r\n this.translatorService.Tranlate('TABLE_IS_ACTIVE_COLUMN_ACTIVE', 'Activ'),\r\n this.translatorService.Tranlate('TABLE_IS_ACTIVE_COLUMN_INACTIVE', 'Inactiv')\r\n ],\r\n logic(isActive: any, filterVal: string[]) {\r\n const show =\r\n (filterVal.indexOf(this.names[0]) !== -1 && isActive === true) ||\r\n (filterVal.indexOf(this.names[1]) !== -1 && isActive === false);\r\n return !show;\r\n }\r\n },\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.handleIsActiveChange(e, tableMeta)}\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'isEvaluationWorkflow',\r\n label: this.translatorService.Tranlate(\r\n 'EVALUATION_WORKFLOW_HEADER',\r\n 'Flux Evaluare'\r\n ),\r\n options: {\r\n sort: false,\r\n filter: false,\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.handleIsEvaluationWorklfowChange(e, tableMeta)}\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'hideRenewAdvert',\r\n label: this.translatorService.Tranlate(\r\n 'HIDE_RENEW_ADVERT_WORKFLOW_HEADER',\r\n 'Ascunde anunturi Renew'\r\n ),\r\n options: {\r\n sort: false,\r\n filter: false,\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.handleHideRenewAdvertChange(e, tableMeta)}\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'isPrcIntegration',\r\n label: this.translatorService.Tranlate(\r\n 'PRC_INTEGRATION_WORKFLOW_HEADER',\r\n 'Flux Integrare PRC'\r\n ),\r\n options: {\r\n sort: false,\r\n filter: false,\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.handleIsPrcIntegrationChange(e, tableMeta)}\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'isMvoIntegration',\r\n label: this.translatorService.Tranlate(\r\n 'MVO_INTEGRATION_WORKFLOW_HEADER',\r\n 'Flux MVO'\r\n ),\r\n options: {\r\n sort: false,\r\n filter: false,\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.handleIsMvoIntegrationChange(e, tableMeta)}\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'isCarfixIntegration',\r\n label: this.translatorService.Tranlate(\r\n 'REPAIR_INTEGRATION_CARFIX_WORKFLOW_HEADER',\r\n 'Flux Integrare Carfix'\r\n ),\r\n options: {\r\n sort: false,\r\n filter: false,\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.handleIsCarfixIntegrationChange(e, tableMeta)}\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'isDgpciIntegration',\r\n label: this.translatorService.Tranlate(\r\n 'DGPCI_INTEGRATION_WORKFLOW_HEADER',\r\n 'Flux Integrare DGPCI'\r\n ),\r\n options: {\r\n sort: false,\r\n filter: false,\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.handleIsDgpciIntegrationChange(e, tableMeta)}\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'useRoundUp',\r\n label: this.translatorService.Tranlate(\r\n 'USER_ROUND_UP_WORKFLOW_HEADER',\r\n 'Cu/fara rotunjire ulei'\r\n ),\r\n options: {\r\n sort: false,\r\n filter: false,\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.handleUseRoundUpChange(e, tableMeta)}\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'automateGenerateOrder',\r\n label: this.translatorService.Tranlate(\r\n 'AUTOMATE_GENERATE_ORDER_WORKFLOW_HEADER',\r\n 'Automatizare generare comenzi'\r\n ),\r\n options: {\r\n sort: false,\r\n filter: false,\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.handleAutomateGenerateOrderChange(e, tableMeta)}\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'automatePlaceOrder',\r\n label: this.translatorService.Tranlate(\r\n 'AUTOMATE_PLACE_ORDER_WORKFLOW_HEADER',\r\n 'Automatizare comanda piese'\r\n ),\r\n options: {\r\n sort: false,\r\n filter: false,\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.handleAutomatePlaceOrderChange(e, tableMeta)}\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'hideComments',\r\n label: this.translatorService.Tranlate(\r\n 'HIDE_COMMENTS_WORKFLOW_HEADER',\r\n 'Ascunde tab comentarii'\r\n ),\r\n options: {\r\n sort: false,\r\n filter: false,\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.handleHideCommentsChange(e, tableMeta)}\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'hasNonStockValidation',\r\n label: this.translatorService.Tranlate(\r\n 'HAS_NON_STOCK_VALIDATION_WORKFLOW_HEADER',\r\n 'Verificare non-stock furnizori'\r\n ),\r\n options: {\r\n sort: false,\r\n filter: false,\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.handleHasNonStockValidationChange(e, tableMeta)}\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'orderConfirmationToService',\r\n label: this.translatorService.Tranlate(\r\n 'ORDER_CONFIRMATION_TO_SERVICE_WORKFLOW_HEADER',\r\n 'Notificare catre service'\r\n ),\r\n options: {\r\n sort: false,\r\n filter: false,\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.handleOrderConfirmationToServiceChange(e, tableMeta)}\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'b2BIntegration',\r\n label: this.translatorService.Tranlate(\r\n 'B2B_INTEGRATION_WORKFLOW_HEADER',\r\n 'Integrare calculatii B2B'\r\n ),\r\n options: {\r\n sort: false,\r\n filter: false,\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.handleB2BIntegrationChange(e, tableMeta)}\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'changeCaseStatusBasedCalculation',\r\n label: this.translatorService.Tranlate('CHANGE_STATUS_BASED_CALCULATION', 'Stare calculatie'),\r\n options: {\r\n sort: false,\r\n filter: false,\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.handleChangeCaseStatusBasedCalculationChange(e, tableMeta)}\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'saveDocuments',\r\n label: this.translatorService.Tranlate('SAVE_DOCUMENTS_LABEL', 'Salveaza documente'),\r\n options: {\r\n sort: false,\r\n filter: false,\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.handleChangeSaveDocumentsChange(e, tableMeta)}\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'vqInterogationValue',\r\n label: this.translatorService.Tranlate(\r\n 'VQ_INTEROGATION_VALUE_WORKFLOW_HEADER',\r\n 'Nr. apelari VQ'\r\n ), options: {\r\n sort: false,\r\n filter: false,\r\n customBodyRender: (value: number | null, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.handleVQInterogation(e.target.value, tableMeta)}\r\n InputProps={{\r\n inputComponent: this.NumberFormatCustom\r\n }}\r\n />\r\n );\r\n }\r\n }\r\n }\r\n ];\r\n\r\n return columns;\r\n };\r\n\r\n NumberFormatCustom = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n thousandSeparator={false}\r\n decimalScale={2}\r\n isNumericString\r\n />\r\n );\r\n };\r\n\r\n\r\n onTabChange = (event: any, newValue: number) => {\r\n this.setState(\r\n {\r\n selectedTab: newValue,\r\n isLoading: true\r\n },\r\n () => {\r\n this.loadData(newValue);\r\n }\r\n );\r\n };\r\n\r\n closeDialog = async () => {\r\n this.setState({ isDialogOpen: false });\r\n };\r\n\r\n activeLanguages = () => {\r\n const activeLanguages =\r\n this.props.appState.appUser!.organization!.gtOrganization!.languages!.filter(\r\n (language: any) => {\r\n if (language.isActive === true) {\r\n return language;\r\n }\r\n }\r\n );\r\n activeLanguages.forEach((language: any) => {\r\n language.displayName =\r\n language.displayName.charAt(0).toUpperCase() + language.displayName.slice(1);\r\n });\r\n return activeLanguages;\r\n };\r\n\r\n renderNameTextFields = () => {\r\n if (Object.keys(this.state.newWorkflow).length === 0) {\r\n return null;\r\n } else {\r\n const nameTextFieldsList = [] as any[];\r\n this.state.newWorkflow!.translations.forEach((item: ITranslation, index: number) => {\r\n nameTextFieldsList.push(\r\n \r\n this.handleWorkflowNameChange(e, item.language)}\r\n label={\r\n this.translatorService.Tranlate('EDIT_WORKFLOW_GUI_NAME_LABEL', 'Nume GUI') +\r\n ' - ' +\r\n item.language\r\n }\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n />\r\n \r\n );\r\n });\r\n return nameTextFieldsList;\r\n }\r\n };\r\n\r\n handleWorkflowNameChange = (event: any, code: string | null) => {\r\n let newWorkflowTransList = [] as ITranslation[];\r\n if (this.state.newWorkflow.translations) {\r\n newWorkflowTransList = this.state.newWorkflow.translations.map((loc: any) => {\r\n if (loc.language === code) {\r\n loc.name = event.target.value;\r\n }\r\n return loc;\r\n });\r\n }\r\n this.setState({\r\n newWorkflow: {\r\n ...this.state.newWorkflow,\r\n translations: newWorkflowTransList,\r\n displayName: newWorkflowTransList[0].name!\r\n }\r\n });\r\n };\r\n\r\n handleWorkflowCaseTypeChange = (newValue: IReferential | null) => {\r\n this.setState({\r\n newWorkflow: {\r\n ...this.state.newWorkflow,\r\n caseType: newValue,\r\n caseTypeId: newValue !== null ? newValue!.id : 0\r\n }\r\n });\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n this.workflowService = (this.context as AppContext).workflowService;\r\n\r\n const options = {\r\n filter: true,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n sort: false,\r\n // responsive: \"stacked\",\r\n customToolbar: () => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n ) : null}\r\n
\r\n\r\n \r\n \r\n \r\n \r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLORS_NEW_WORKFLOW_MODAL_TITLE',\r\n 'Adauga flux'\r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n this.handleWorkflowCaseTypeChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n \r\n {this.renderNameTextFields()}\r\n \r\n\r\n
\r\n \r\n {this.translatorService.Tranlate('EDIT_ORGANIZATION_CANCEL_BTN', 'Anuleaza')}\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect((state: ApplicationState) => ({ appState: state.app }), {\r\n ...AppUserAdminActionCreators,\r\n ...AppActionCreators\r\n})(withSnackbar(Workflows as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { OrganizationFilterType } from '../../../interfaces/Organization';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport { IOrganizationService } from '../../../services/Interfaces/IOrganizationService';\r\nimport { Box, Button, IconButton, Card, CardContent, Tabs } from '@material-ui/core';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport MUIDataTable, {\r\n MUIDataTableColumnOptions,\r\n MUIDataTableMeta,\r\n SelectableRows\r\n} from 'mui-datatables';\r\nimport moment from 'moment';\r\nimport { MUITranslations } from '../../../helpers/MUITableTranslations';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { IReferential } from '../../../interfaces/IReferential';\r\nimport { ValidatorForm, TextValidator } from 'react-material-ui-form-validator';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport Referentials from '../../../helpers/Referentials.json';\r\nimport { ReferentialCode } from '../../../helpers/Constants';\r\nimport DeleteOutlineTwoToneIcon from '@material-ui/icons/DeleteOutlineTwoTone';\r\nimport { Tab } from '@material-ui/core';\r\n\r\ninterface IOrganizationFiltersState {\r\n organizationFilters: OrganizationFilterType[];\r\n isLoading: boolean;\r\n organizationFilterTypes: IReferential[];\r\n selectedOrganizationFilterType: IReferential | null;\r\n organizationId: number;\r\n}\r\n\r\ntype IOrganizationFiltersProps = { appState: AppState } & ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass OrganizationFilters extends React.PureComponent<\r\n IOrganizationFiltersProps,\r\n IOrganizationFiltersState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private organizationService!: IOrganizationService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n organizationFilters: [],\r\n isLoading: false,\r\n organizationFilterTypes: [],\r\n selectedOrganizationFilterType: null,\r\n organizationId: 0\r\n } as IOrganizationFiltersState;\r\n\r\n public componentDidMount() {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n\r\n if (Number.isNaN(hoId)) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadOrganizationFilters();\r\n }\r\n );\r\n }\r\n\r\n loadOrganizationFilters = async () => {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n\r\n if (Number.isNaN(hoId)) {\r\n return;\r\n }\r\n const ref = Referentials.referential.find((item) => item.code === ReferentialCode.FilterType);\r\n\r\n const [orgFilterList, filterTypes] = await Promise.all([\r\n this.organizationService.GetOrganizationFilters(hoId),\r\n this.appReferentialService.Get(ref!.baseUrl)\r\n ]);\r\n\r\n let organizationFilters = orgFilterList;\r\n organizationFilters = organizationFilters.map((item: OrganizationFilterType) => {\r\n item.filterType = filterTypes.find(\r\n (filterType: IReferential) => filterType.id === item.filterTypeId\r\n )!;\r\n return item;\r\n });\r\n\r\n this.setState({\r\n organizationFilters: organizationFilters,\r\n organizationFilterTypes: filterTypes.filter((item) => item.isActive === true),\r\n isLoading: false,\r\n organizationId: hoId\r\n });\r\n };\r\n\r\n deleteOrgFilter = async (event: any, tableMeta: MUIDataTableMeta) => {\r\n try {\r\n const id = tableMeta.rowData[0];\r\n\r\n await this.organizationService.RemoveOrganizationFilter(id);\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n () => {\r\n this.loadOrganizationFilters();\r\n }\r\n );\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'filterType',\r\n label: this.translatorService.Tranlate('ORGANIZATION_FILTER_TYPE_LABEL', 'Tip dosar'),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: IReferential) => {\r\n return value.displayName;\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'dateModification',\r\n label: this.translatorService.Tranlate(\r\n 'ORGANIZATIONS_DATE_MODIFICATION_HEADER',\r\n 'Data Modificare'\r\n ),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: Date) =>\r\n moment.utc(value).local().format(this.props.appState.longDateFormat)\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: '',\r\n options: {\r\n setCellHeaderProps: () => ({ align: 'center' }),\r\n setCellProps: () => ({ align: 'center' }),\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.deleteOrgFilter(e, tableMeta)}\r\n >\r\n \r\n \r\n );\r\n }\r\n }\r\n }\r\n ];\r\n\r\n return columns;\r\n };\r\n\r\n addOrgFilter = async () => {\r\n try {\r\n await this.organizationService.AddOrganizationFilter({\r\n filterTypeId: this.state.selectedOrganizationFilterType!.id,\r\n organizationId: this.state.organizationId\r\n } as OrganizationFilterType);\r\n\r\n this.setState(\r\n {\r\n isLoading: true,\r\n selectedOrganizationFilterType: null\r\n },\r\n () => {\r\n this.loadOrganizationFilters();\r\n }\r\n );\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n handleAutocompleteChange = (newValue: IReferential | null) => {\r\n this.setState({ selectedOrganizationFilterType: newValue });\r\n };\r\n\r\n public renderAddForm() {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n this.handleAutocompleteChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n const options = {\r\n filter: false,\r\n search: false,\r\n viewColumns: false,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n elevation: 1\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.renderAddForm()}\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n ) : null}\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app\r\n }),\r\n null\r\n)(withSnackbar(OrganizationFilters as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { Organization, OrganizationJobType } from '../../../interfaces/Organization';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport { IOrganizationService } from '../../../services/Interfaces/IOrganizationService';\r\nimport { Box, Button, Card, CardContent, Tabs, Tab, IconButton } from '@material-ui/core';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport MUIDataTable, {\r\n MUIDataTableColumnOptions,\r\n MUIDataTableMeta,\r\n SelectableRows\r\n} from 'mui-datatables';\r\nimport moment from 'moment';\r\nimport { MUITranslations } from '../../../helpers/MUITableTranslations';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ValidatorForm, TextValidator } from 'react-material-ui-form-validator';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport { IWorkflowService } from '../../../services/Interfaces/IWorkflowService';\r\nimport { isNullOrUndefined } from 'util';\r\nimport _ from 'lodash';\r\nimport { ReferentialCode } from '../../../helpers/Constants';\r\nimport Referentials from '../../../helpers/Referentials.json';\r\nimport { IReferential } from '../../../interfaces/IReferential';\r\nimport DeleteOutlineTwoToneIcon from '@material-ui/icons/DeleteOutlineTwoTone';\r\n\r\ninterface IOrganizationJobTypesState {\r\n organizationJobTypes: OrganizationJobType[];\r\n isLoading: boolean;\r\n jobTypes: IReferential[];\r\n selectedJobType: IReferential[];\r\n organizationId: number;\r\n}\r\n\r\ntype IOrganizationJobTypesProps = { appState: AppState } & ProviderContext &\r\n RouteComponentProps<{ id: string;}>;\r\n\r\nclass OrganizationJobTypes extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private organizationService!: IOrganizationService;\r\n private workflowService!: IWorkflowService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n organizationJobTypes: [],\r\n isLoading: false,\r\n jobTypes: [],\r\n selectedJobType: [],\r\n organizationId: 0\r\n } as IOrganizationJobTypesState;\r\n\r\n public componentDidMount() {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadOrganizationJobTypes();\r\n }\r\n );\r\n }\r\n\r\n loadOrganizationJobTypes = async () => {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n\r\n if (Number.isNaN(hoId)) {\r\n return;\r\n }\r\n const ref = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.JobType\r\n );\r\n\r\n const [organizationJobTypesList, jobTypes] = await Promise.all([\r\n this.organizationService.GetOrganizationJobTypes(hoId),\r\n this.appReferentialService.Get(ref!.baseUrl + '/all')\r\n ]);\r\n\r\n console.log('organizationJobTypesList', organizationJobTypesList);\r\n console.log('jobTypes', jobTypes);\r\n\r\n\r\n organizationJobTypesList.forEach((ojt) => {\r\n const jobType = jobTypes.find((item) => item.id === ojt.jobTypeId);\r\n\r\n ojt.jobType = isNullOrUndefined(jobType) ? null : jobType;\r\n });\r\n\r\n this.setState({\r\n organizationJobTypes: organizationJobTypesList,\r\n jobTypes: jobTypes.filter((item) => item.isActive === true),\r\n isLoading: false,\r\n organizationId: hoId\r\n });\r\n };\r\n\r\n \r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'jobType',\r\n label: this.translatorService.Tranlate(\r\n 'ORGANIZATIONS_TAB_JOB_TYPE',\r\n 'Job Type'\r\n ),\r\n options: {\r\n filter: false,\r\n sort: false,\r\n customBodyRender: (value: Organization) => {\r\n return value ? value.displayName : \"\";\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'dateModification',\r\n label: this.translatorService.Tranlate(\r\n 'WORKFLOW_PARTNERS_TAB_DATE_MODIFICATION_HEADER',\r\n 'Data Modificare'\r\n ),\r\n options: {\r\n filter: false,\r\n sort: false,\r\n customBodyRender: (value: Date) =>\r\n moment.utc(value).local().format(this.props.appState.longDateFormat)\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: '',\r\n options: {\r\n setCellHeaderProps: () => ({ align: 'center' }),\r\n setCellProps: () => ({ align: 'center' }),\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.deleteOrgJobType(e, tableMeta)}\r\n >\r\n \r\n \r\n );\r\n }\r\n }\r\n }\r\n ];\r\n\r\n return columns;\r\n };\r\n\r\n deleteOrgJobType = async (event: any, tableMeta: MUIDataTableMeta) => {\r\n try {\r\n const id = tableMeta.rowData[0];\r\n\r\n await this.organizationService.RemoveOrganizationJobType(id);\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n () => {\r\n this.loadOrganizationJobTypes();\r\n }\r\n );\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n addOrganizationJobType = async () => {\r\n try {\r\n if (\r\n this.state.organizationJobTypes.findIndex(\r\n (item) =>\r\n this.state.selectedJobType.findIndex((itemm) => itemm.id === item.jobTypeId) !==\r\n -1\r\n ) !== -1\r\n ) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('ERROR_MSG_PARTNER_EXISTS', 'Partenerul exista deja!'),\r\n { variant: 'error' }\r\n );\r\n return;\r\n }\r\n\r\n const organizationJobTypes = [];\r\n for (const jobType of this.state.selectedJobType) {\r\n organizationJobTypes.push({\r\n id: 0,\r\n organizationId: this.state.organizationId,\r\n jobTypeId: jobType!.id,\r\n jobType: jobType\r\n } as OrganizationJobType);\r\n }\r\n\r\n await this.organizationService.AddOrganizationJobType(organizationJobTypes);\r\n\r\n this.setState(\r\n {\r\n isLoading: true,\r\n selectedJobType: []\r\n },\r\n () => {\r\n this.loadOrganizationJobTypes();\r\n }\r\n );\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n\r\n handleOrganizationJobTypeChange = (newValue: any[]) => {\r\n this.setState({ selectedJobType: newValue });\r\n };\r\n\r\n renderAddForm() {\r\n return (\r\n \r\n \r\n \r\n \r\n this.handleOrganizationJobTypeChange(newValue)}\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.workflowService = (this.context as AppContext).workflowService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n const options = {\r\n viewColumns: false,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n elevation: 1\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.renderAddForm()}\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n ) : null}\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app\r\n }),\r\n null\r\n)(withSnackbar(OrganizationJobTypes as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { Organization, OrganizationJobType, OrganizationMaintenancePackage } from '../../../interfaces/Organization';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport { IOrganizationService } from '../../../services/Interfaces/IOrganizationService';\r\nimport { Box, Button, Card, CardContent, Tabs, Tab, IconButton } from '@material-ui/core';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport MUIDataTable, {\r\n MUIDataTableColumnOptions,\r\n MUIDataTableMeta,\r\n SelectableRows\r\n} from 'mui-datatables';\r\nimport moment from 'moment';\r\nimport { MUITranslations } from '../../../helpers/MUITableTranslations';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ValidatorForm, TextValidator } from 'react-material-ui-form-validator';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport { IWorkflowService } from '../../../services/Interfaces/IWorkflowService';\r\nimport { isNullOrUndefined } from 'util';\r\nimport _ from 'lodash';\r\nimport { ReferentialCode } from '../../../helpers/Constants';\r\nimport Referentials from '../../../helpers/Referentials.json';\r\nimport { IReferential } from '../../../interfaces/IReferential';\r\nimport DeleteOutlineTwoToneIcon from '@material-ui/icons/DeleteOutlineTwoTone';\r\n\r\ninterface IOrganizationMaintenancePackagesState {\r\n organizationMaintenancePackages: OrganizationMaintenancePackage[];\r\n isLoading: boolean;\r\n maintenancePackages: IReferential[];\r\n selectedMaintenancePackage: IReferential[];\r\n organizationId: number;\r\n}\r\n\r\ntype IOrganizationMaintenancePackagesProps = { appState: AppState } & ProviderContext &\r\n RouteComponentProps<{ id: string;}>;\r\n\r\nclass OrganizationMaintenancePackages extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private organizationService!: IOrganizationService;\r\n private workflowService!: IWorkflowService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n organizationMaintenancePackages: [],\r\n isLoading: false,\r\n maintenancePackages: [],\r\n organizationId: 0,\r\n selectedMaintenancePackage: []\r\n } as IOrganizationMaintenancePackagesState;\r\n\r\n public componentDidMount() {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadOrganizationMaintenancePackages();\r\n }\r\n );\r\n }\r\n\r\n loadOrganizationMaintenancePackages = async () => {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n\r\n if (Number.isNaN(hoId)) {\r\n return;\r\n }\r\n const ref = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.MaintenancePackage\r\n );\r\n\r\n const [organizationMaintenancePackagesList, maintenancePackages] = await Promise.all([\r\n this.organizationService.GetOrganizationMaintenancePackages(hoId),\r\n this.appReferentialService.Get(ref!.baseUrl)\r\n ]);\r\n\r\n console.log('organizationMaintenancePackagesList', organizationMaintenancePackagesList);\r\n console.log('maintenancePackages', maintenancePackages);\r\n\r\n\r\n organizationMaintenancePackagesList.forEach((ojt) => {\r\n const maintenancePackage = maintenancePackages.find((item) => item.id === ojt.maintenancePackageId);\r\n\r\n ojt.maintenancePackage = isNullOrUndefined(maintenancePackage) ? null : maintenancePackage;\r\n });\r\n\r\n this.setState({\r\n organizationMaintenancePackages: organizationMaintenancePackagesList,\r\n maintenancePackages: maintenancePackages.filter((item) => item.isActive === true),\r\n isLoading: false,\r\n organizationId: hoId\r\n });\r\n };\r\n\r\n \r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'maintenancePackage',\r\n label: this.translatorService.Tranlate(\r\n 'ORGANIZATIONS_TAB_MAINTENANCE_PACKAGE',\r\n 'Pachet Mentenanta'\r\n ),\r\n options: {\r\n filter: false,\r\n sort: false,\r\n customBodyRender: (value: Organization) => {\r\n return value.displayName;\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'dateModification',\r\n label: this.translatorService.Tranlate(\r\n 'WORKFLOW_PARTNERS_TAB_DATE_MODIFICATION_HEADER',\r\n 'Data Modificare'\r\n ),\r\n options: {\r\n filter: false,\r\n sort: false,\r\n customBodyRender: (value: Date) =>\r\n moment.utc(value).local().format(this.props.appState.longDateFormat)\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: '',\r\n options: {\r\n setCellHeaderProps: () => ({ align: 'center' }),\r\n setCellProps: () => ({ align: 'center' }),\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.deleteOrgMaintenancePackage(e, tableMeta)}\r\n >\r\n \r\n \r\n );\r\n }\r\n }\r\n }\r\n ];\r\n\r\n return columns;\r\n };\r\n\r\n deleteOrgMaintenancePackage = async (event: any, tableMeta: MUIDataTableMeta) => {\r\n try {\r\n const id = tableMeta.rowData[0];\r\n\r\n await this.organizationService.RemoveOrganizationMaintenancePackage(id);\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n () => {\r\n this.loadOrganizationMaintenancePackages();\r\n }\r\n );\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n addOrganizationMaintenancePackage = async () => {\r\n try {\r\n if (\r\n this.state.organizationMaintenancePackages.findIndex(\r\n (item) =>\r\n this.state.selectedMaintenancePackage.findIndex((itemm) => itemm.id === item.maintenancePackageId) !==\r\n -1\r\n ) !== -1\r\n ) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('ERROR_MSG_PARTNER_EXISTS', 'Partenerul exista deja!'),\r\n { variant: 'error' }\r\n );\r\n return;\r\n }\r\n\r\n const organizationMaintenancePackages = [];\r\n for (const maintenancePackage of this.state.selectedMaintenancePackage) {\r\n organizationMaintenancePackages.push({\r\n id: 0,\r\n organizationId: this.state.organizationId,\r\n maintenancePackageId: maintenancePackage!.id,\r\n maintenancePackage: maintenancePackage\r\n } as OrganizationMaintenancePackage);\r\n }\r\n\r\n await this.organizationService.AddOrganizationMaintenancePackage(organizationMaintenancePackages);\r\n\r\n this.setState(\r\n {\r\n isLoading: true,\r\n selectedMaintenancePackage: []\r\n },\r\n () => {\r\n this.loadOrganizationMaintenancePackages();\r\n }\r\n );\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n\r\n handleOrganizationMaintenancePackageChange = (newValue: any[]) => {\r\n this.setState({ selectedMaintenancePackage: newValue });\r\n };\r\n\r\n renderAddForm() {\r\n return (\r\n \r\n \r\n \r\n \r\n this.handleOrganizationMaintenancePackageChange(newValue)}\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.workflowService = (this.context as AppContext).workflowService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n const options = {\r\n viewColumns: false,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n elevation: 1\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.renderAddForm()}\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n ) : null}\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app\r\n }),\r\n null\r\n)(withSnackbar(OrganizationMaintenancePackages as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport {\r\n Tooltip,\r\n Box,\r\n Button,\r\n IconButton,\r\n Dialog,\r\n DialogTitle,\r\n Grid,\r\n Typography,\r\n DialogContent\r\n} from '@material-ui/core';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport AddCircleTwoToneIcon from '@material-ui/icons/AddCircleTwoTone';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ValidatorForm, TextValidator } from 'react-material-ui-form-validator';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport MUIDataTable, {\r\n SelectableRows,\r\n MUIDataTableMeta,\r\n MUIDataTableColumnOptions\r\n} from 'mui-datatables';\r\nimport { MUITranslations } from '../../../helpers/MUITableTranslations';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport DeleteOutlineTwoToneIcon from '@material-ui/icons/DeleteOutlineTwoTone';\r\nimport { ReferentialCode } from '../../../helpers/Constants';\r\nimport Referentials from '../../../helpers/Referentials.json';\r\nimport { ICaseService } from '../../../services/Interfaces/ICaseService';\r\nimport { IReferential } from '../../../interfaces/IReferential';\r\nimport moment from 'moment';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport EditOutlinedIcon from '@material-ui/icons/EditOutlined';\r\nimport * as R from 'ramda';\r\nimport { MaintenanceProducer } from '../../../interfaces/Case';\r\nimport { OrganizationOilViscosity } from '../../../interfaces/Organization';\r\nimport { IOrganizationService } from '../../../services/Interfaces/IOrganizationService';\r\nimport NumberFormat from 'react-number-format';\r\n\r\ninterface IOrganizationOilViscosityState {\r\n newOrganizationOilViscosity: OrganizationOilViscosity;\r\n oilViscosityList: IReferential[];\r\n organizationOilViscosityList: OrganizationOilViscosity[];\r\n isLoading: boolean;\r\n isDialogOpen: boolean;\r\n newOrganizationOilViscosityId: number | null;\r\n organizationId: number;\r\n}\r\ntype IOrganizationOilViscosityProps = { appState: AppState } & ProviderContext &\r\n RouteComponentProps<{ id: string; }>;\r\n\r\nclass OrganizationOilViscosities extends React.PureComponent<\r\n IOrganizationOilViscosityProps,\r\n IOrganizationOilViscosityState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private caseService!: ICaseService;\r\n private appReferentialService!: IReferentialService;\r\n private organizationService!: IOrganizationService;\r\n static contextType = ApplicationContext;\r\n private newOrganizationOilViscosity = {\r\n id: 0,\r\n organizationId: 0,\r\n oilViscosityId: 0,\r\n price: 0\r\n } as OrganizationOilViscosity;\r\n\r\n state = {\r\n organizationOilViscosityList: [],\r\n isLoading: false,\r\n selectedFilter: 0,\r\n isDialogOpen: false,\r\n newOrganizationOilViscosity: this.newOrganizationOilViscosity,\r\n oilViscosityList: [] as IReferential[],\r\n newOrganizationOilViscosityId: null,\r\n organizationId: 0\r\n } as IOrganizationOilViscosityState;\r\n\r\n public componentDidMount() {\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadOrganizationOilViscosityList();\r\n }\r\n );\r\n }\r\n\r\n loadOrganizationOilViscosityList = async () => {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n\r\n if (Number.isNaN(hoId)) {\r\n return;\r\n }\r\n const ref = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.OilViscosity\r\n );\r\n\r\n const [organizationOilViscositiesList, oilViscosities] = await Promise.all([\r\n this.organizationService.GetOrganizationOilViscosities(hoId),\r\n this.appReferentialService.Get(ref!.baseUrl)\r\n ]);\r\n\r\n console.log('organizationOilViscositiesList', organizationOilViscositiesList);\r\n console.log('oilViscosities', oilViscosities);\r\n\r\n this.setState({\r\n organizationOilViscosityList: organizationOilViscositiesList,\r\n isLoading: false,\r\n oilViscosityList: oilViscosities,\r\n newOrganizationOilViscosity: { ...this.newOrganizationOilViscosity },\r\n organizationId: hoId\r\n });\r\n };\r\n\r\n private handleOilViscosityChange = (newValue: IReferential | null) => {\r\n this.setState({\r\n newOrganizationOilViscosity: {\r\n ...this.state.newOrganizationOilViscosity,\r\n oilViscosity: newValue,\r\n oilViscosityId: newValue !== null ? newValue!.id : 0\r\n }\r\n });\r\n };\r\n\r\n private handlePriceChange = (value: string) => {\r\n this.setState({\r\n newOrganizationOilViscosity: {\r\n ...this.state.newOrganizationOilViscosity,\r\n price: parseFloat(value)\r\n }\r\n });\r\n };\r\n\r\n public saveOrganizationOilViscosity = async () => {\r\n if (this.state.newOrganizationOilViscosityId === null) {\r\n try {\r\n if (\r\n this.state.organizationOilViscosityList.findIndex(\r\n (item) =>\r\n this.state.newOrganizationOilViscosity.oilViscosityId === item.oilViscosityId \r\n ) !== -1\r\n ) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('ERROR_MSG_OIL_VISCOSITIES_EXISTS', 'Pretul pentru aceasta viscozitate exista deja!'),\r\n { variant: 'error' }\r\n );\r\n return;\r\n }\r\n\r\n await this.organizationService.AddOrganizationOilViscosity({\r\n ...this.state.newOrganizationOilViscosity,\r\n organizationId : this.state.organizationId\r\n });\r\n await this.loadOrganizationOilViscosityList();\r\n this.closeDialog();\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n \r\n } else {\r\n try {\r\n await this.organizationService.UpdateOrganizationOilViscosity(this.state.newOrganizationOilViscosity);\r\n await this.loadOrganizationOilViscosityList();\r\n this.closeDialog();\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n\r\n NumberFormatCustom = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n },\r\n currentTarget: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n allowNegative={false}\r\n thousandSeparator={false}\r\n decimalScale={2}\r\n />\r\n );\r\n };\r\n \r\n public renderAddForm() {\r\n return (\r\n \r\n this.handlePriceChange(e.target.value)}\r\n label={this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_ALTERNATIVE_CALCULATION_DETAILS_PRICE_LABEL',\r\n 'Pret'\r\n )}\r\n validators={['required', 'minNumber:1']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n InputProps={{\r\n inputComponent: this.NumberFormatCustom,\r\n style: { fontWeight: 500 }\r\n }}\r\n />\r\n \r\n this.handleOilViscosityChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n
\r\n \r\n {this.translatorService.Tranlate('EDIT_ORGANIZATION_CANCEL_BTN', 'Anuleaza')}\r\n \r\n \r\n
\r\n
\r\n );\r\n }\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'oilViscosity',\r\n label: this.translatorService.Tranlate(\r\n 'ORGANIZATIONS_TAB_OIL_VISCOSITY',\r\n 'Viscozitate Ulei'\r\n ),\r\n options: {\r\n sort: true,\r\n customSort: (a: IReferential, b: IReferential) => {\r\n return a.name!.localeCompare(b.displayName!);\r\n },\r\n customBodyRender: (value: IReferential) => {\r\n return value ? value.displayName : '';\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'price',\r\n label: this.translatorService.Tranlate(\r\n 'ORGANIZATIONS_TAB_OIL_VISCOSITY_PRICE',\r\n 'Pret'\r\n ) \r\n },\r\n {\r\n name: 'dateModification',\r\n label: this.translatorService.Tranlate('USERS_DATE_MODIFICATION_HEADER', 'Data Modificare'),\r\n options: {\r\n filter: false,\r\n sortDirection: 'desc',\r\n customBodyRender: (value: Date) =>\r\n moment.utc(value).local().format(this.props.appState.longDateFormat)\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: '',\r\n options: {\r\n viewColumns: false,\r\n filter: false,\r\n setCellHeaderProps: () => ({ align: 'center' }),\r\n setCellProps: () => ({ align: 'center' }),\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n <>\r\n this.newOrganizationOilViscosityPopup(tableMeta.rowData[0])}\r\n >\r\n \r\n \r\n this.deleteOrganizationOilViscosity(e, tableMeta)}\r\n >\r\n \r\n \r\n \r\n );\r\n }\r\n }\r\n }];\r\n return columns;\r\n };\r\n\r\n deleteOrganizationOilViscosity = async (event: any, tableMeta: MUIDataTableMeta) => {\r\n try {\r\n const id = tableMeta.rowData[0];\r\n await this.organizationService.RemoveOrganizationOilViscosity(id);\r\n await this.loadOrganizationOilViscosityList();\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n newOrganizationOilViscosityPopup = async (organizationOilViscosityId: number | null) => {\r\n let newOrganizationOilViscosity: OrganizationOilViscosity;\r\n if (organizationOilViscosityId == null) {\r\n newOrganizationOilViscosity = { ...this.state.newOrganizationOilViscosity } as OrganizationOilViscosity;\r\n } else {\r\n newOrganizationOilViscosity = this.state.organizationOilViscosityList.find((item) => item.id === organizationOilViscosityId)!;\r\n }\r\n this.setState({\r\n isDialogOpen: true,\r\n newOrganizationOilViscosity: newOrganizationOilViscosity,\r\n newOrganizationOilViscosityId: organizationOilViscosityId\r\n });\r\n };\r\n\r\n closeDialog = async () => {\r\n this.setState(\r\n { \r\n isDialogOpen: false, \r\n newOrganizationOilViscosity: this.newOrganizationOilViscosity\r\n }\r\n );\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n\r\n\r\n const options = {\r\n filter: true,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n sort: false,\r\n // responsive: \"stacked\",\r\n customToolbar: () => {\r\n return (\r\n \r\n this.newOrganizationOilViscosityPopup(null)}\r\n >\r\n \r\n \r\n \r\n );\r\n }\r\n };\r\n return (\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n ) : null}\r\n
\r\n {this.state.isDialogOpen ? (\r\n \r\n \r\n \r\n \r\n \r\n {!this.state.newOrganizationOilViscosityId ? \r\n this.translatorService.Tranlate(\r\n 'ORGANIZATION_OIL_VISCOSITIES_ADD_MODAL_TITLE',\r\n 'Adauga Pret Viscozitate Ulei'\r\n ) : this.translatorService.Tranlate(\r\n 'ORGANIZATION_OIL_VISCOSITIES_UPDATE_MODAL_TITLE',\r\n 'Actualizeaza Pret Viscozitate Ulei'\r\n )} \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.renderAddForm()}\r\n ) : null}\r\n
\r\n );\r\n }\r\n}\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app\r\n }),\r\n null\r\n)(withSnackbar(OrganizationOilViscosities as any));","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { OrganizationInvoiceRange} from '../../../interfaces/Organization';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport { IOrganizationService } from '../../../services/Interfaces/IOrganizationService';\r\nimport { Box, Button, Card, CardContent, Tabs, Tab, IconButton, Dialog, DialogTitle, Grid, Typography, DialogContent, Tooltip } from '@material-ui/core';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport MUIDataTable, {\r\n MUIDataTableColumnOptions,\r\n MUIDataTableMeta,\r\n SelectableRows\r\n} from 'mui-datatables';\r\nimport { MUITranslations } from '../../../helpers/MUITableTranslations';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ValidatorForm, TextValidator } from 'react-material-ui-form-validator';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport { IWorkflowService } from '../../../services/Interfaces/IWorkflowService';\r\nimport { isNullOrUndefined } from 'util';\r\nimport _ from 'lodash';\r\nimport { InvoiceRangeCodeEnum, RefConstants } from '../../../helpers/Constants';\r\nimport { IReferential } from '../../../interfaces/IReferential';\r\nimport DeleteOutlineTwoToneIcon from '@material-ui/icons/DeleteOutlineTwoTone';\r\nimport * as R from 'ramda';\r\nimport NumberFormat from 'react-number-format';\r\nimport EditOutlinedIcon from '@material-ui/icons/EditOutlined';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport AddCircleTwoToneIcon from '@material-ui/icons/AddCircleTwoTone';\r\n\r\ninterface IOrganizationInvoiceRangesState {\r\n organizationInvoiceRanges: OrganizationInvoiceRange[];\r\n isLoading: boolean;\r\n invoiceRangeTypes: IReferential[];\r\n invoiceRangeStatuses: IReferential[];\r\n organizationId: number;\r\n newOrganizationInvoiceRange: OrganizationInvoiceRange;\r\n newOrganizationInvoiceRangeId: number | null;\r\n isDialogOpen: boolean;\r\n}\r\n\r\ntype IOrganizationInvoiceRangesProps = { appState: AppState } & ProviderContext &\r\n RouteComponentProps<{ id: string;}>;\r\n\r\nclass OrganizationInvoiceRanges extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private organizationService!: IOrganizationService;\r\n private workflowService!: IWorkflowService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n private newOrganizationInvoiceRange = {\r\n id: 0,\r\n organizationId: 0,\r\n invoiceRangeTypeId: null,\r\n invoiceRangeType: null,\r\n firstSeries: null,\r\n startingNumber: null,\r\n currentNumber: null,\r\n endingNumber: null,\r\n lastSeries: null,\r\n invoiceRangeStatusId: null,\r\n invoiceRangeStatus: null\r\n } as unknown as OrganizationInvoiceRange;\r\n\r\n state = {\r\n organizationInvoiceRanges: [],\r\n isLoading: false,\r\n invoiceRangeTypes: [],\r\n invoiceRangeStatuses: [],\r\n organizationId: 0,\r\n newOrganizationInvoiceRange: this.newOrganizationInvoiceRange,\r\n newOrganizationInvoiceRangeId: null,\r\n isDialogOpen: false,\r\n } as IOrganizationInvoiceRangesState;\r\n\r\n public componentDidMount() {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadOrganizationInvoiceRanges();\r\n }\r\n );\r\n }\r\n\r\n loadOrganizationInvoiceRanges = async () => {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n\r\n if (Number.isNaN(hoId)) {\r\n return;\r\n }\r\n const { invoiceRangeTypeRef, invoiceRangeStatusRef } = RefConstants;\r\n\r\n const [invoiceRangeTypes, invoiceRangeStatuses, organizationInvoiceRangesList] = await Promise.all([\r\n this.appReferentialService.Get(invoiceRangeTypeRef!.baseUrl),\r\n this.appReferentialService.Get(invoiceRangeStatusRef!.baseUrl),\r\n this.organizationService.GetOrganizationInvoiceRanges(hoId),\r\n ]);\r\n\r\n organizationInvoiceRangesList.forEach((ojt) => {\r\n const invoiceRangeType = invoiceRangeTypes.find((item) => item.id === ojt.invoiceRangeTypeId);\r\n const invoiceRangeStatus = invoiceRangeStatuses.find((item) => item.id === ojt.invoiceRangeStatusId);\r\n\r\n ojt.invoiceRangeType = isNullOrUndefined(invoiceRangeType) ? null : invoiceRangeType;\r\n ojt.invoiceRangeStatus = isNullOrUndefined(invoiceRangeStatus) ? null : invoiceRangeStatus;\r\n });\r\n\r\n this.setState({\r\n organizationInvoiceRanges: organizationInvoiceRangesList,\r\n invoiceRangeTypes: invoiceRangeTypes.filter((item) => item!.code === InvoiceRangeCodeEnum.FACTURA_SERVICE.toString()),\r\n invoiceRangeStatuses: invoiceRangeStatuses,\r\n isLoading: false,\r\n organizationId: hoId\r\n });\r\n };\r\n\r\n public hasRight = (right: string): boolean => {\r\n return this.props.appState!.user!.profile.role.includes(right);\r\n };\r\n\r\n private handleOrganizationInvoiceRangeTypeChange = (newValue: IReferential | null) => {\r\n this.setState({\r\n newOrganizationInvoiceRange: {\r\n ...this.state.newOrganizationInvoiceRange,\r\n invoiceRangeType: newValue,\r\n invoiceRangeTypeId: newValue !== null ? newValue!.id : 0\r\n }\r\n });\r\n };\r\n\r\n \r\n private handleOrganizationInvoiceRangeStatusChange = (newValue: IReferential | null) => {\r\n this.setState({\r\n newOrganizationInvoiceRange: {\r\n ...this.state.newOrganizationInvoiceRange,\r\n invoiceRangeStatus: newValue,\r\n invoiceRangeStatusId: newValue !== null ? newValue!.id : 0\r\n }\r\n });\r\n };\r\n\r\n public saveOrganizationInvoiceRange = async () => {\r\n if (!R.isNil(this.state.newOrganizationInvoiceRange.startingNumber) && !R.isNil(this.state.newOrganizationInvoiceRange.endingNumber)) {\r\n if (this.state.newOrganizationInvoiceRange.endingNumber < this.state.newOrganizationInvoiceRange.startingNumber) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('INVOICE_RANGE_ENDING_NUMBER_ERROR', 'Numarul de sfarsit trebuie sa fie mai mare decat numarul de inceput!'), {\r\n variant: 'error'\r\n });\r\n return;\r\n }\r\n }\r\n\r\n if (this.state.newOrganizationInvoiceRangeId === null) {\r\n try {\r\n await this.organizationService.AddOrganizationInvoiceRange({\r\n ...this.state.newOrganizationInvoiceRange,\r\n organizationId: this.state.organizationId\r\n });\r\n\r\n await this.loadOrganizationInvoiceRanges();\r\n\r\n this.closeDialog();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n } else {\r\n try {\r\n\r\n await this.organizationService.UpdateOrganizationInvoiceRange({\r\n ...this.state.newOrganizationInvoiceRange,\r\n organizationId: this.state.organizationId\r\n });\r\n\r\n await this.loadOrganizationInvoiceRanges();\r\n\r\n this.closeDialog();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n \r\n \r\n NumberFormatCustom = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n },\r\n currentTarget: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n allowNegative={false}\r\n thousandSeparator={false}\r\n decimalScale={0}\r\n />\r\n );\r\n };\r\n \r\n onChange =\r\n (fieldName: string, isNumber: boolean) => (e: any, newValue?: IReferential | null) => {\r\n isNumber\r\n ? this.setState({\r\n newOrganizationInvoiceRange: {\r\n ...this.state.newOrganizationInvoiceRange,\r\n [fieldName]: parseFloat(newValue || e.target.value)\r\n }\r\n })\r\n : this.setState({\r\n newOrganizationInvoiceRange: {\r\n ...this.state.newOrganizationInvoiceRange,\r\n [fieldName]: newValue || e.target.value\r\n }\r\n });\r\n };\r\n\r\n public renderAddForm() {\r\n return (\r\n \r\n \r\n this.handleOrganizationInvoiceRangeTypeChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n /> \r\n\r\n \r\n this.onChange('firstSeries', false)(e)\r\n }\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n label={this.translatorService.Tranlate('ORGANIZATION_INVOICE_RANGE_FIRST_SERIES', 'Serie 1')}\r\n />\r\n\r\n this.onChange('startingNumber', true)(e)}\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n label={this.translatorService.Tranlate('ORGANIZATION_INVOICE_RANGE_STARTING_NUMBER', 'Numar inceput')}\r\n InputProps={{\r\n inputComponent: this.NumberFormatCustom\r\n }}\r\n />\r\n this.onChange('endingNumber', true)(e)}\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n label={this.translatorService.Tranlate('ORGANIZATION_INVOICE_RANGE_ENDING_NUMBER', 'Numar sfarsit')}\r\n InputProps={{\r\n inputComponent: this.NumberFormatCustom\r\n }}\r\n error={!R.isNil(this.state.newOrganizationInvoiceRange.startingNumber) && !R.isNil(this.state.newOrganizationInvoiceRange.endingNumber) ? \r\n (this.state.newOrganizationInvoiceRange.endingNumber < this.state.newOrganizationInvoiceRange.startingNumber ? true : false) : false}\r\n helperText={\r\n !R.isNil(this.state.newOrganizationInvoiceRange.startingNumber) && !R.isNil(this.state.newOrganizationInvoiceRange.endingNumber) ? \r\n (this.state.newOrganizationInvoiceRange.endingNumber < this.state.newOrganizationInvoiceRange.startingNumber ? \r\n this.translatorService.Tranlate(\r\n 'ORGANIZATION_INVOICE_RANGE_ENDING_NUMBER_ERROR',\r\n 'Numarul de sfarsit trebuie sa fie mai mare decat numarul de inceput!'\r\n ) : '') : ''\r\n }\r\n />\r\n\r\n this.onChange('lastSeries', false)(e)}\r\n label={this.translatorService.Tranlate('ORGANIZATION_INVOICE_RANGE_LAST_SERIES', 'Serie 2')}\r\n />\r\n\r\n \r\n this.handleOrganizationInvoiceRangeStatusChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n /> \r\n\r\n
\r\n \r\n {this.translatorService.Tranlate('EDIT_ORGANIZATION_CANCEL_BTN', 'Anuleaza')}\r\n \r\n \r\n
\r\n
\r\n );\r\n }\r\n\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n label: this.translatorService.Tranlate('INVOICE_RANGE_NR', 'NR'),\r\n options: {\r\n display: 'excluded',\r\n filter: false\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'invoiceRangeType',\r\n label: this.translatorService.Tranlate(\r\n 'ORGANIZATION_INVOICE_RANGE_TYPE',\r\n 'Tip'\r\n ),\r\n options: {\r\n sort: true,\r\n customSort: (a: IReferential, b: IReferential) => {\r\n return a.displayName!.localeCompare(b.displayName!);\r\n },\r\n customBodyRender: (value: IReferential) => {\r\n return value.displayName;\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'firstSeries',\r\n label: this.translatorService.Tranlate('ORGANIZATION_INVOICE_RANGE_FIRST_SERIES', 'Serie 1'),\r\n options: {\r\n filter: false,\r\n customBodyRender: (value: string, tableMeta: MUIDataTableMeta) => {\r\n return value;\r\n }\r\n }\r\n },\r\n {\r\n name: 'startingNumber',\r\n label: this.translatorService.Tranlate('ORGANIZATION_INVOICE_RANGE_STARTING_NUMBER', 'Numar inceput'),\r\n options: {\r\n filter: false,\r\n customBodyRender: (value: number, tableMeta: MUIDataTableMeta) => {\r\n return value;\r\n }\r\n }\r\n },\r\n {\r\n name: 'currentNumber',\r\n label: this.translatorService.Tranlate('ORGANIZATION_INVOICE_RANGE_CURRENT_NUMBER', 'Numar curent'),\r\n options: {\r\n filter: false,\r\n customBodyRender: (value: number | null, tableMeta: MUIDataTableMeta) => {\r\n return R.isNil(value) ? '' : value;\r\n }\r\n }\r\n },\r\n {\r\n name: 'endingNumber',\r\n label: this.translatorService.Tranlate('ORGANIZATION_INVOICE_RANGE_ENDING_NUMBER', 'Numar sfarsit'),\r\n options: {\r\n filter: false,\r\n customBodyRender: (value: number, tableMeta: MUIDataTableMeta) => {\r\n return value;\r\n }\r\n }\r\n },\r\n {\r\n name: 'lastSeries',\r\n label: this.translatorService.Tranlate('ORGANIZATION_INVOICE_RANGE_LAST_SERIES', 'Serie 2'),\r\n options: {\r\n filter: false,\r\n customBodyRender: (value: string, tableMeta: MUIDataTableMeta) => {\r\n return value;\r\n }\r\n }\r\n },\r\n {\r\n name: 'invoiceRangeStatus',\r\n label: this.translatorService.Tranlate(\r\n 'ORGANIZATION_INVOICE_RANGE_STATUS',\r\n 'Status'\r\n ),\r\n options: {\r\n sort: true,\r\n customSort: (a: IReferential, b: IReferential) => {\r\n return a.displayName!.localeCompare(b.displayName!);\r\n },\r\n customBodyRender: (value: IReferential) => {\r\n return value.displayName;\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: '',\r\n options: {\r\n viewColumns: false,\r\n filter: false,\r\n setCellHeaderProps: () => ({ align: 'center' }),\r\n setCellProps: () => ({ align: 'center' }),\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n const invoiceRange = this.state.organizationInvoiceRanges.find((item) => item.id === tableMeta.rowData[0]);\r\n\r\n return (\r\n <>\r\n this.newOrganizationInvoiceRatePopup(tableMeta.rowData[0])}\r\n >\r\n \r\n \r\n this.deleteOrganizationInvoiceRate(e, tableMeta)}\r\n >\r\n \r\n \r\n \r\n );\r\n }\r\n }\r\n }];\r\n\r\n return columns;\r\n };\r\n\r\n deleteOrganizationInvoiceRate = async (event: any, tableMeta: MUIDataTableMeta) => {\r\n try {\r\n const id = tableMeta.rowData[0];\r\n\r\n await this.organizationService.RemoveOrganizationInvoiceRange(id);\r\n\r\n await this.loadOrganizationInvoiceRanges();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n\r\n newOrganizationInvoiceRatePopup = async (organizationInvoiceRangeId: number | null) => {\r\n let newOrganizationInvoiceRange: OrganizationInvoiceRange;\r\n if (organizationInvoiceRangeId == null) {\r\n newOrganizationInvoiceRange = { ...this.state.newOrganizationInvoiceRange } as OrganizationInvoiceRange;\r\n } else {\r\n newOrganizationInvoiceRange = this.state.organizationInvoiceRanges.find((item) => item.id === organizationInvoiceRangeId)!;\r\n }\r\n this.setState({\r\n isDialogOpen: true,\r\n newOrganizationInvoiceRange: newOrganizationInvoiceRange,\r\n newOrganizationInvoiceRangeId: organizationInvoiceRangeId\r\n });\r\n };\r\n\r\n closeDialog = async () => {\r\n this.setState(\r\n { \r\n isDialogOpen: false, \r\n newOrganizationInvoiceRange: this.newOrganizationInvoiceRange ,\r\n newOrganizationInvoiceRangeId: null\r\n }\r\n );\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.workflowService = (this.context as AppContext).workflowService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n const options = {\r\n filter: true,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n sort: false,\r\n customToolbar: () => {\r\n return (\r\n \r\n this.newOrganizationInvoiceRatePopup(null)}\r\n >\r\n \r\n \r\n \r\n );\r\n }\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n ) : null}\r\n
\r\n {this.state.isDialogOpen ? (\r\n \r\n \r\n \r\n \r\n \r\n {!this.state.newOrganizationInvoiceRangeId ? \r\n this.translatorService.Tranlate(\r\n 'ORGANIZATION_INVOICE_RANGE_NEW_MODAL_TITLE',\r\n 'Adauga plaja facturi'\r\n ) : this.translatorService.Tranlate(\r\n 'ORGANIZATION_INVOICE_RANGE_UPDATE_MODAL_TITLE',\r\n 'Actualizeaza plaja facturi'\r\n )} \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.renderAddForm()}\r\n \r\n \r\n ) : (\r\n ''\r\n )}\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app\r\n }),\r\n null\r\n)(withSnackbar(OrganizationInvoiceRanges as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { Grid, Button, Box } from '@material-ui/core';\r\nimport OrganizationDetailsTab from '../organizations/OrganizationDetailsTab';\r\nimport { AppContext, ApplicationContext } from '../../../context/Contexts';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { IOrganizationService } from '../../../services/Interfaces/IOrganizationService';\r\nimport OrganizationUsers from '../organizations/OrganizationUsers';\r\nimport OrganizationInterfaces from '../organizations/OrganizationInterfaces';\r\nimport OrganizationParameters from '../organizations/OrganizationParameters';\r\nimport OrganizationNewCaseType from './organizationCase/OrganizationNewCaseType';\r\nimport OrganizationTariffs from '../tariffs/Tariffs';\r\nimport Workflows from '../workflows/Workflows';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { PageTitle } from '../../../layout-components';\r\nimport OrganizationFilters from '../../admin/organizations/OrganizationFilters';\r\nimport { Organization } from '../../../interfaces/Organization';\r\nimport OrganizationJobTypes from './OrganizationJobTypes';\r\nimport { RoleClaimsEnum } from '../../../helpers/Constants';\r\nimport OrganizationMaintenancePackages from './OrganizationMaintenancePackages';\r\nimport OrganizationOilViscosities from './OrganizationOilViscosities';\r\nimport OrganizationInvoiceRanges from './OrganizationInvoiceRanges';\r\n\r\ninterface IOrganizationAdminStateState {\r\n selectedTab: number;\r\n organization: Organization | null;\r\n}\r\n\r\ntype IOrganizationAdminProps = { appState: AppState } & ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass OrganizationAdmin extends React.PureComponent<\r\n IOrganizationAdminProps,\r\n IOrganizationAdminStateState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private organizationService!: IOrganizationService;\r\n\r\n static contextType = ApplicationContext;\r\n state = {\r\n selectedTab: 0,\r\n organization: null\r\n } as IOrganizationAdminStateState;\r\n\r\n componentDidMount = async () => {\r\n const orgId = Number.parseInt(this.props.match.params.id);\r\n\r\n if (Number.isNaN(orgId)) {\r\n return;\r\n }\r\n const organizations = await this.organizationService.GetUserOrganizationsByIds([orgId]);\r\n\r\n this.setState({\r\n organization: organizations.length === 1 ? organizations[0] : null\r\n });\r\n };\r\n\r\n onButtonClick = (newValue: number) => {\r\n this.setState({ selectedTab: newValue });\r\n };\r\n\r\n public hasRole = (roleCode: string): boolean => {\r\n return this.props.appState.appUser?.userRole?.code === roleCode;\r\n };\r\n\r\n public hasRight = (right: string): boolean => {\r\n return this.props.appState!.user!.profile.role.includes(right);\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n\r\n return (\r\n \r\n {\r\n this.hasRight(RoleClaimsEnum.AdminService) ? (\r\n \r\n ) : (\r\n \r\n )\r\n }\r\n \r\n \r\n \r\n \r\n this.onButtonClick(0)}\r\n >\r\n \r\n {this.translatorService.Tranlate(\r\n 'ORGANIZATIONS_TAB_GENERAL_DATA',\r\n 'Date Generale'\r\n )}\r\n \r\n \r\n \r\n \r\n \r\n {this.state.selectedTab === 0 ? (\r\n \r\n ) : null}\r\n {this.state.selectedTab === 1 ? (\r\n \r\n ) : null}\r\n {this.state.selectedTab === 2 ? : null}\r\n {this.state.selectedTab === 3 ? (\r\n \r\n ) : null}\r\n {this.state.selectedTab === 4 ? (\r\n \r\n ) : null}\r\n {this.state.selectedTab === 5 ? (\r\n \r\n ) : null}\r\n {this.state.selectedTab === 6 ? : null}\r\n {this.state.selectedTab === 7 ? (\r\n \r\n ) : null}\r\n {this.state.selectedTab === 8 ? (\r\n \r\n ) : null}\r\n {this.state.selectedTab === 9 ? (\r\n \r\n ) : null}\r\n {this.state.selectedTab === 10 ? (\r\n \r\n ) : null}\r\n {this.state.selectedTab === 11 ? (\r\n \r\n ) : null}\r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app\r\n }),\r\n null\r\n)(withSnackbar(OrganizationAdmin as any));\r\n","import React, { Fragment, ChangeEvent } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport {\r\n Organization,\r\n OrganizationType,\r\n OrganizationLevelType\r\n} from '../../../interfaces/Organization';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport { IOrganizationService } from '../../../services/Interfaces/IOrganizationService';\r\nimport {\r\n Box,\r\n Switch,\r\n Button,\r\n Tooltip,\r\n IconButton,\r\n Card,\r\n CardContent,\r\n Tabs,\r\n Tab,\r\n Dialog,\r\n DialogTitle,\r\n Grid,\r\n Typography,\r\n DialogContent\r\n} from '@material-ui/core';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport MUIDataTable, {\r\n MUIDataTableColumnOptions,\r\n MUIDataTableMeta,\r\n SelectableRows\r\n} from 'mui-datatables';\r\nimport moment from 'moment';\r\nimport { MUITranslations } from '../../../helpers/MUITableTranslations';\r\nimport AddCircleTwoToneIcon from '@material-ui/icons/AddCircleTwoTone';\r\nimport {\r\n OrganizationTypeCode,\r\n ReferentialCode,\r\n OrganizationLevelTypeCode,\r\n RoleCodeEnum,\r\n RoleClaimsEnum\r\n} from '../../../helpers/Constants';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport Referentials from '../../../helpers/Referentials.json';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { IReferential } from '../../../interfaces/IReferential';\r\n\r\ninterface IHOOrganizationsState {\r\n organizations: Organization[];\r\n isLoading: boolean;\r\n selectedFilter: number;\r\n isDialogOpen: boolean;\r\n newHOOrg: Organization;\r\n organizationTypes: OrganizationType[];\r\n}\r\n\r\ntype HOOrganizationsProps = { appState: AppState } & ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\nclass HOOrganizations extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private organizationService!: IOrganizationService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n private neworg = {\r\n name: '',\r\n id: 0,\r\n gtId: this.props.appState.appUser!.gtId,\r\n organizationTypeId: 0,\r\n organizationType: null,\r\n organizationLevelTypeId: 1,\r\n parent: null,\r\n isActive: true\r\n } as Organization;\r\n\r\n state = {\r\n organizations: [],\r\n isLoading: false,\r\n selectedFilter: 0,\r\n isDialogOpen: false,\r\n newHOOrg: this.neworg,\r\n organizationTypes: [] as OrganizationType[]\r\n } as IHOOrganizationsState;\r\n\r\n public componentDidMount() {\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadOrganizations();\r\n }\r\n );\r\n }\r\n\r\n loadOrganizations = async () => {\r\n const orgList = await this.organizationService.GetHOOrganizations(this.hasRight(RoleClaimsEnum.AdminCountryOrganization) ? this.props.appState.appUser!.countryId : null);\r\n\r\n this.setState({\r\n organizations: orgList,\r\n isLoading: false,\r\n newHOOrg: { ...this.neworg }\r\n });\r\n };\r\n\r\n filterOrganizations = (orgList: Organization[]): Organization[] => {\r\n if (this.state.selectedFilter === 1) {\r\n orgList = orgList.filter((item) => item.organizationType!.code === OrganizationTypeCode.GT);\r\n }\r\n if (this.state.selectedFilter === 2) {\r\n orgList = orgList.filter((item) => item.organizationType!.code !== OrganizationTypeCode.GT);\r\n }\r\n\r\n return orgList;\r\n };\r\n\r\n newHOOrg = async () => {\r\n const ref = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.OrganizationType\r\n );\r\n const orgTypes = await this.appReferentialService.Get(ref!.baseUrl);\r\n\r\n this.setState({\r\n isDialogOpen: true,\r\n organizationTypes: orgTypes.filter(\r\n (item) => item.isActive === true\r\n ) as any as OrganizationType[]\r\n });\r\n };\r\n\r\n onRowClick = async (e: any, id: string, value: string) => {\r\n this.props.history.push('/admin/hoorganizations/' + id, value);\r\n };\r\n\r\n filterChange = (event: React.ChangeEvent, newValue: number) => {\r\n this.setState(\r\n { selectedFilter: newValue }\r\n // , async () => await this.loadOrganizations()\r\n );\r\n };\r\n\r\n handleIsActiveChange = async (\r\n event: React.ChangeEvent,\r\n tableMeta: MUIDataTableMeta\r\n ) => {\r\n const id = tableMeta.rowData[0];\r\n const newOrganizations = [...this.state.organizations];\r\n const updatedOrgIndex = newOrganizations.findIndex((o) => o.id === id);\r\n\r\n if (updatedOrgIndex >= 0) {\r\n newOrganizations[updatedOrgIndex] = {\r\n ...newOrganizations[updatedOrgIndex],\r\n isActive: event.target.checked\r\n };\r\n\r\n try {\r\n await this.organizationService.UpdateOrganization(newOrganizations[updatedOrgIndex]);\r\n\r\n this.setState({ organizations: newOrganizations });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n\r\n public hasRole = (roleCode: string): boolean => {\r\n return this.props.appState.appUser?.userRole?.code === roleCode;\r\n };\r\n\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'name',\r\n label: this.translatorService.Tranlate(\r\n 'ORGANIZATIONS_ORGANIZATION_NAME_HEADER',\r\n 'Organizatie'\r\n ),\r\n options: {\r\n filter: false,\r\n customBodyRender: (value: string, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.onRowClick(e, tableMeta.rowData[0], value)}\r\n >\r\n {value}\r\n \r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'organizationType',\r\n label: this.translatorService.Tranlate('ORGANIZATIONS_ORGANIZATION_TYPE_HEADER', 'Tip'),\r\n // customSort: (a:IReferential, b:IReferential) => { debugger; return a.name!.localeCompare(b.name!)},\r\n options: {\r\n sort: true,\r\n customSort: (a: IReferential, b: IReferential) => {\r\n debugger;\r\n return a.name!.localeCompare(b.name!);\r\n },\r\n customBodyRender: (value: OrganizationType) => {\r\n return value.displayName;\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'companyNumber',\r\n label: this.translatorService.Tranlate('ORGANIZATIONS_COMPANY_NUMBER_HEADER', 'CUI'),\r\n options: {\r\n filter: false\r\n }\r\n },\r\n {\r\n name: 'country',\r\n label: this.translatorService.Tranlate('ORGANIZATIONS_COUNTRY_HEADER', 'Tara'),\r\n options: {\r\n sort: true,\r\n customSort: (a: IReferential, b: IReferential) => {\r\n debugger;\r\n return a.name!.localeCompare(b.name!);\r\n },\r\n customBodyRender: (value: IReferential) => {\r\n return value ? value.displayName : '';\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'dateModification',\r\n label: this.translatorService.Tranlate('USERS_DATE_MODIFICATION_HEADER', 'Data Modificare'),\r\n options: {\r\n filter: false,\r\n customBodyRender: (value: Date) =>\r\n moment.utc(value).local().format(this.props.appState.longDateFormat)\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'isActive',\r\n label: this.translatorService.Tranlate('USERS_IS_ACTIVE_HEADER', 'Activ'),\r\n options: {\r\n sortDirection: 'desc',\r\n filterOptions: {\r\n names: [\r\n this.translatorService.Tranlate('TABLE_IS_ACTIVE_COLUMN_ACTIVE', 'Activ'),\r\n this.translatorService.Tranlate('TABLE_IS_ACTIVE_COLUMN_INACTIVE', 'Inactiv')\r\n ],\r\n logic(isActive: any, filterVal: string[]) {\r\n const show =\r\n (filterVal.indexOf(this.names![0]) !== -1 && isActive === true) ||\r\n (filterVal.indexOf(this.names![1]) !== -1 && isActive === false);\r\n return !show;\r\n }\r\n },\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.handleIsActiveChange(e, tableMeta)}\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n );\r\n }\r\n } as MUIDataTableColumnOptions\r\n }\r\n ];\r\n\r\n return columns;\r\n };\r\n\r\n private handleTextChange = (event: React.ChangeEvent) => {\r\n let value: any;\r\n if (event.target.type === 'text') {\r\n value = event.currentTarget.value;\r\n }\r\n this.setState({\r\n newHOOrg: {\r\n ...this.state.newHOOrg,\r\n [event.target.id]: value\r\n }\r\n });\r\n };\r\n\r\n private handleOrganizationTypeChange = (newValue: OrganizationType | null) => {\r\n this.setState({\r\n newHOOrg: {\r\n ...this.state.newHOOrg,\r\n organizationType: newValue,\r\n organizationTypeId: newValue !== null ? newValue!.id : 0\r\n }\r\n });\r\n };\r\n\r\n public saveOrganization = async () => {\r\n try {\r\n const ref = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.OrganizationLevel\r\n );\r\n const orgLevelTypes = await this.appReferentialService.Get(ref!.baseUrl);\r\n\r\n const hoType = orgLevelTypes.find((item) => item.code === OrganizationLevelTypeCode.HO);\r\n\r\n const newOrg = this.state.newHOOrg;\r\n\r\n if (hoType !== undefined) {\r\n newOrg.organizationLevelTypeId = hoType.id;\r\n newOrg.organizationLevelType = hoType as any as OrganizationLevelType;\r\n }\r\n\r\n if (this.hasRight(RoleClaimsEnum.AdminCountryOrganization) && this.props.appState.appUser?.countryId) {\r\n newOrg.countryId = this.props.appState.appUser?.countryId;\r\n }\r\n\r\n await this.organizationService.AddOrganization(this.state.newHOOrg);\r\n\r\n await this.loadOrganizations();\r\n\r\n this.closeDialog();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n public renderFilters = () => {\r\n return (\r\n \r\n \r\n \r\n , newValue: number) =>\r\n this.filterChange(event, newValue)\r\n }\r\n >\r\n \r\n \r\n \r\n \r\n );\r\n };\r\n\r\n public hasRight = (right: string): boolean => {\r\n return this.props.appState!.user!.profile.role.includes(right);\r\n };\r\n\r\n closeDialog = () => {\r\n this.setState({ isDialogOpen: false });\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n const options = {\r\n filter: true,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n // responsive: \"stacked\",\r\n customToolbar: () => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n };\r\n\r\n return (\r\n \r\n {this.renderFilters()}\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n ) : null}\r\n
\r\n\r\n \r\n \r\n \r\n \r\n \r\n {this.translatorService.Tranlate(\r\n 'ORGANIZATIONS_NEW_HO_MODAL_TITLE',\r\n 'Adauga organizatie'\r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n this.handleOrganizationTypeChange(newValue)\r\n }\r\n getOptionLabel={(option: OrganizationType) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n \r\n {this.translatorService.Tranlate('EDIT_ORGANIZATION_CANCEL_BTN', 'Anuleaza')}\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app\r\n }),\r\n null\r\n)(withSnackbar(HOOrganizations as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport { Box, Button, Grid, TextField } from '@material-ui/core';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport moment from 'moment';\r\nimport { CalculationTypeCode } from '../../../helpers/Constants';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ICaseService } from '../../../services/Interfaces/ICaseService';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport { CaseCalculationHistory } from '../../../interfaces/Case';\r\nimport FileSaver from 'file-saver';\r\n\r\ninterface IGtXMLState {\r\n caseId: string;\r\n isLoading: boolean;\r\n calculations: CaseCalculationHistory[];\r\n}\r\n\r\ntype GtXMLProps = { appState: AppState } & ProviderContext & RouteComponentProps<{ id: string }>;\r\n\r\nclass GtXML extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private caseService!: ICaseService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n caseId: '',\r\n calculations: [] as CaseCalculationHistory[]\r\n } as IGtXMLState;\r\n\r\n public componentDidMount() {\r\n this.setState({\r\n isLoading: false\r\n });\r\n }\r\n\r\n private handleTextChange = (event: React.ChangeEvent) => {\r\n this.setState({\r\n caseId: event.target.value\r\n });\r\n };\r\n\r\n renderCalculations = () => {\r\n return (\r\n \r\n {this.state.calculations.map((calc) => (\r\n \r\n this.downloadXml(calc.id)}\r\n >\r\n {calc.id}\r\n \r\n \r\n {moment.utc(calc.date).local().toDate().toLocaleString(this.props.appState.language)}\r\n \r\n \r\n {calc.amount}\r\n \r\n \r\n ))}\r\n \r\n );\r\n };\r\n\r\n downloadXml = async (id: number) => {\r\n const fileBlob = await this.caseService.GetCaseCalculationXML(\r\n Number.parseInt(this.state.caseId),\r\n id\r\n );\r\n\r\n FileSaver.saveAs(fileBlob, `GtResponse.xml`);\r\n };\r\n\r\n renderForms = () => {\r\n return (\r\n \r\n \r\n \r\n {this.renderCalculations()}\r\n \r\n );\r\n };\r\n\r\n loadCalculations = async () => {\r\n const calculations = await this.caseService.GetAdminCaseCalculationHistories(\r\n Number.parseInt(this.state.caseId)\r\n );\r\n\r\n this.setState({\r\n isLoading: false,\r\n calculations: calculations.filter(\r\n (item) => item.calculationType.code === CalculationTypeCode.ORG\r\n )\r\n });\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n return (\r\n \r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? this.renderForms() : null}\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app\r\n }),\r\n null\r\n)(withSnackbar(GtXML as any));\r\n","export const FormCode = {\r\n SEARCH_NOTICE: 'SEARCH_NOTICE',\r\n SEARCH_VEHICLE: 'SEARCH_VEHICLE',\r\n SEARCH_CLIENT: 'SEARCH_CLIENT',\r\n SEARCH_CLAIM_REVIEW: 'SEARCH_CLAIM_REVIEW',\r\n SELECT_WORKFLOW: 'SELECT_WORKFLOW',\r\n CASE_SUMMARY: 'F1',\r\n CASE_HISTORY: 'F7',\r\n CASE_CHANGE_WORKFLOW: 'F6',\r\n CASE_ATTACHMENTS: 'F4',\r\n CASE_CAR_PHOTOS: 'F5',\r\n CASE_CAR_DATA: 'F2',\r\n CASE_EVENT_DATA: 'F3',\r\n CASE_CALCULATIONS: 'F8',\r\n CASE_BACK_TO_SERVICE: 'F9',\r\n CASE_OTHER_SERVICE: 'F10',\r\n CASE_PAYMENT_DETAILS_SERVICE: 'F11',\r\n CASE_ORDER: 'F12',\r\n CASE_SERVICE_APPOINTMENT: 'F13',\r\n CASE_CLIENT_DATA: 'F14',\r\n CASE_CAR_DETAILS: 'F15',\r\n CASE_CAR_REPAIR_COST: 'F16',\r\n CASE_SALE_OFFER: 'F17',\r\n CASE_BUY_OFFER: 'F18',\r\n CASE_PAYMENT_DETAILS_WITH_CURRENCY: 'F19',\r\n CASE_VEHICLE_ADVERT: 'F20',\r\n CASE_VEHICLE_PB_ANUNT: 'PB_ANUNT',\r\n CASE_EVENT_DATE_FACT: 'F21',\r\n CASE_SOLD_CAR: 'F22',\r\n CASE_LKQ_APPOINTMENT:'F23',\r\n CASE_IN_OUT_REPORT: 'F24',\r\n CARFIX_CASE_CLIENT_DATA: 'F25',\r\n CARFIX_ANALYSIS_STEP: 'F26',\r\n CARFIX_BACK_TO_SERVICE_STEP: 'F27',\r\n CARFIX_APPOINTMENT_VALIDATION_STEP: 'F28',\r\n CARFIX_REPAIR_IN_PROGRESS_STEP: 'F29',\r\n CAR_IN_SERVICE: 'F30'\r\n};\r\n\r\nexport const SectionCode = {\r\n S1: 'S1',\r\n S2: 'S2',\r\n Calculatii: 'S3',\r\n Comenzi: 'S4',\r\n Constatare: 'S5',\r\n Reparatie: 'S6',\r\n Plati: 'S7',\r\n Cautare: 'Caut_are',\r\n Constatare_Efectuata: 'Cons_efct',\r\n Reconstatare: 'REC',\r\n Operati_speciale: 'OPE',\r\n Ofertare: 'OFR',\r\n Comanda_Piese: 'COM_PES',\r\n Inchidere_Dosar: 'IN_DOS',\r\n Oferte: 'S9',\r\n Anunturi: 'S10',\r\n Evaluare: 'S25',\r\n};\r\n","import { FormCode } from './FormCode';\r\nimport { Button } from 'reactstrap';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport React from 'react';\r\n\r\nexport class FormButton {\r\n public static GetButtons(\r\n code: string,\r\n translatorService: ITranslatorService,\r\n hasRights: boolean,\r\n executing: boolean\r\n ) {\r\n if (\r\n code === FormCode.SEARCH_CLIENT ||\r\n code === FormCode.SEARCH_NOTICE ||\r\n code === FormCode.SEARCH_CLAIM_REVIEW ||\r\n code === FormCode.SEARCH_VEHICLE\r\n ) {\r\n return (\r\n \r\n {translatorService.Tranlate('SEARCH_BTN', 'CAUTA')}\r\n \r\n );\r\n }\r\n if (code === FormCode.CASE_CAR_DATA || code === FormCode.CASE_EVENT_DATA) {\r\n return (\r\n \r\n {translatorService.Tranlate('SAVE', 'Salveaza')}\r\n \r\n );\r\n }\r\n if (code === FormCode.CASE_CAR_DATA) {\r\n return (\r\n \r\n {translatorService.Tranlate('SAVE_BTN', 'Salveaza')}\r\n \r\n );\r\n }\r\n\r\n return null;\r\n }\r\n}\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n ApplicationState,\r\n CaseSettingsState,\r\n AppState,\r\n CaseSettingsActionCreators\r\n} from '../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { Button, Typography, Grid, Box } from '@material-ui/core';\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { isNullOrUndefined } from 'util';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport { IReferentialService } from '../../services/Interfaces/IReferentialService';\r\nimport { Workflow } from '../../interfaces/Workflow';\r\nimport { OrganizationTypeCode } from '../../helpers/Constants';\r\nimport { Organization, OrganizationCaseType } from '../../interfaces/Organization';\r\nimport { IWorkflowService } from '../../services/Interfaces/IWorkflowService';\r\nimport { IOrganizationService } from '../../services/Interfaces/IOrganizationService';\r\nimport { Case, ClientDto, VehicleDto } from '../../interfaces/Case';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport _ from 'lodash';\r\n\r\ninterface IWorkflowstate {\r\n scopeWorkflows: Workflow[];\r\n selectedWorkflow: Workflow | null;\r\n isLoading: boolean;\r\n}\r\nexport interface ExternalWorkflowsProps {\r\n selectedOrganizationCaseType: OrganizationCaseType | null;\r\n selectedNotice: { id: number; orgId: number; companyNumber: string } | null;\r\n selectedCase: Case | null;\r\n selectedVehicle: VehicleDto | null;\r\n selectedClient: ClientDto | null;\r\n workflows: Workflow[];\r\n caseStatuses: IReferential[];\r\n organization: Organization | null;\r\n}\r\n\r\ntype IWorkflowsProps = {\r\n caseSettingsState: CaseSettingsState;\r\n appState: AppState;\r\n} & typeof CaseSettingsActionCreators &\r\n ExternalWorkflowsProps &\r\n ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass Workflows extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private caseService!: ICaseService;\r\n private organizationService!: IOrganizationService;\r\n private workflowService!: IWorkflowService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n state = {\r\n scopeWorkflows: [],\r\n selectedWorkflow: null,\r\n isLoading: true\r\n } as IWorkflowstate;\r\n\r\n public async componentDidMount() {\r\n let scopeWorkflows = this.props.workflows.filter(\r\n (item) => item.caseTypeId === this.props.selectedOrganizationCaseType!.caseTypeId\r\n );\r\n\r\n if (!isNullOrUndefined(this.props.selectedNotice)) {\r\n scopeWorkflows = scopeWorkflows.filter(\r\n (item) => item.organizationOwnerId === this.props.selectedNotice!.orgId\r\n );\r\n if (\r\n !isNullOrUndefined(this.props.selectedNotice!.companyNumber) &&\r\n this.props.selectedNotice!.companyNumber !== ''\r\n ) {\r\n const organization = await this.organizationService.GetByCompanyNumber(\r\n this.props.selectedNotice.companyNumber\r\n );\r\n if (\r\n !isNullOrUndefined(organization) &&\r\n organization.organizationType!.code === OrganizationTypeCode.LEASING\r\n ) {\r\n scopeWorkflows = scopeWorkflows.filter(\r\n (item) =>\r\n item.organizationOwnerId === organization.id ||\r\n item.workflowPartners.findIndex(\r\n (item) => item.partnerId === organization.id && item.isActive\r\n ) !== -1\r\n );\r\n }\r\n }\r\n\r\n this.setState({\r\n scopeWorkflows: scopeWorkflows,\r\n isLoading: false\r\n });\r\n return;\r\n }\r\n\r\n if (this.props.organization == null) {\r\n this.setState({\r\n scopeWorkflows: scopeWorkflows,\r\n isLoading: false\r\n });\r\n return;\r\n }\r\n\r\n console.log('before scopeWorkflows', scopeWorkflows);\r\n console.log('organization', this.props.organization);\r\n\r\n //Acolo unde o organizatie are mai multe fluxuri de lucru dar are si parteneri,\r\n //parteneri care nu sunt adaugati pe toate aceste fluxuri trebuie sa avem posibilitatea de setare pentru afisare \r\n //sau nu a fluxurilor organizatiei proprietare\r\n if (this.props.organization.hideOrganizationOwnerWorkflows) {\r\n scopeWorkflows = scopeWorkflows.filter(\r\n (item) =>\r\n item.workflowPartners.findIndex(\r\n (item) => item.partnerId === this.props.organization!.id && item.isActive && !item.hideWorkflow\r\n ) !== -1\r\n );\r\n } else {\r\n scopeWorkflows = scopeWorkflows.filter(\r\n (item) =>\r\n //nu e partener pe fluxul de lucru\r\n item.workflowPartners.findIndex(\r\n (item) => item.partnerId === this.props.organization!.id\r\n ) === -1 \r\n ||\r\n //este partener pe fluxul de lucru si este activ si nu are flag-ul de ascundere setat\r\n item.workflowPartners.findIndex(\r\n (item) => item.partnerId === this.props.organization!.id && item.isActive && !item.hideWorkflow\r\n ) !== -1 \r\n );\r\n }\r\n console.log('after scopeWorkflows', scopeWorkflows);\r\n\r\n this.setState({\r\n scopeWorkflows: scopeWorkflows,\r\n isLoading: false\r\n });\r\n }\r\n\r\n createCase = async () => {\r\n if (isNullOrUndefined(this.state.selectedWorkflow)) {\r\n return;\r\n }\r\n\r\n console.log('selectedWorkflow', this.state.selectedWorkflow);\r\n console.log('is PRC Integration', this.state.selectedWorkflow.isPrcIntegration);\r\n try {\r\n this.setState({ isLoading: true });\r\n let newCase = this.props.selectedCase;\r\n if (this.props.selectedCase !== null) {\r\n console.log(this.props.selectedCase);\r\n await this.caseService.ChangeCaseWorkflow(\r\n this.state.selectedWorkflow.id,\r\n this.props.selectedCase.id,\r\n this.props.appState.appUser!.id!,\r\n this.props.selectedCase.caseStatus.caseStatusId\r\n );\r\n \r\n } else {\r\n console.log('Selected Vehicle', this.props.selectedVehicle);\r\n newCase = await this.caseService.CreateCase(\r\n this.state.selectedWorkflow.id,\r\n isNullOrUndefined(this.props.selectedNotice) ? null : this.props.selectedNotice.id,\r\n this.props.selectedVehicle,\r\n isNullOrUndefined(this.props.selectedClient) ? null : this.props.selectedClient.id\r\n \r\n );\r\n }\r\n\r\n this.props.history.push('/cases/' + newCase!.id, 'Case xx');\r\n } catch (ex) {\r\n this.setState({ isLoading: false });\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(ex.response.data, 'Eroare creare dosar!'),\r\n { \r\n variant: 'error' , \r\n autoHideDuration: 5000\r\n }\r\n );\r\n //console.log(ex.response.data);\r\n }\r\n };\r\n\r\n renderWorkflowList = () => {\r\n let selectedItem = -1;\r\n if (!isNullOrUndefined(this.state.selectedWorkflow)) {\r\n selectedItem = this.state.selectedWorkflow.id;\r\n }\r\n\r\n const organizations: Organization[] = [];\r\n this.state.scopeWorkflows.forEach((w) => {\r\n if (organizations.find((item) => item.id === w.organizationOwnerId) === undefined) {\r\n organizations.push(w.organizationOwner!);\r\n }\r\n });\r\n\r\n return organizations.map((org, index) => (\r\n \r\n \r\n {org.displayName}\r\n \r\n \r\n {this.state.scopeWorkflows\r\n .filter((w) => w.organizationOwnerId === org.id)\r\n .map((item, index) => (\r\n \r\n \r\n {\r\n this.setState({ selectedWorkflow: item });\r\n }}\r\n >\r\n {item.displayName}\r\n \r\n \r\n \r\n ))}\r\n \r\n \r\n ));\r\n };\r\n\r\n renderWorkflows = () => {\r\n return (\r\n \r\n {this.renderWorkflowList()}\r\n \r\n \r\n );\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n this.workflowService = (this.context as AppContext).workflowService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ?
{this.renderWorkflows()}
: null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (stateProps: any, dispatchProps: any, ownProps: ExternalWorkflowsProps) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app\r\n }),\r\n CaseSettingsActionCreators,\r\n mergeProps\r\n)(withSnackbar(Workflows as any));\r\n","import React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n ApplicationState,\r\n CaseSettingsState,\r\n AppState,\r\n CaseSettingsActionCreators\r\n} from '../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { Button, IconButton, Modal, MuiThemeProvider, createMuiTheme } from '@material-ui/core';\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport { OrganizationCaseTypeStepForm } from '../../interfaces/Organization';\r\nimport MUIDataTable, {\r\n MUIDataTableColumnOptions,\r\n MUIDataTableMeta,\r\n SelectableRows\r\n} from 'mui-datatables';\r\nimport { MUITranslations } from '../../helpers/MUITableTranslations';\r\nimport DoubleArrowTwoTone from '@material-ui/icons/DoubleArrowTwoTone';\r\nimport { SearchVehicleFormData } from '../../interfaces/FormData';\r\nimport { FormButton } from '../../helpers/forms/FormButton';\r\nimport { VehicleDto } from '../../interfaces/Case';\r\nimport Form from '@rjsf/material-ui';\r\nimport { ISubmitEvent } from '@rjsf/core';\r\nimport { isNullOrUndefined } from 'util';\r\nimport { CaseTypeCode, VehicleStatusCodeEnum } from '../../helpers/Constants';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport moment from 'moment';\r\n\r\ninterface ISearchVehicleFormState {\r\n isLoading: boolean;\r\n isLoadingData: boolean;\r\n formData: SearchVehicleFormData;\r\n vehicleDtoList: VehicleDto[];\r\n modalOpen: boolean;\r\n modalMessage?: string;\r\n modalYesNoButtons: boolean;\r\n modalData?: any;\r\n}\r\n\r\nexport interface ExternalSearchVehicleFormProps {\r\n onVehicleSelected: (vehicleDto: VehicleDto) => void;\r\n organizationCaseTypeStepForm: OrganizationCaseTypeStepForm;\r\n searchInVehicleStock: boolean;\r\n}\r\n\r\ntype ISearchVehicleFormProps = ExternalSearchVehicleFormProps & {\r\n caseSettingsState: CaseSettingsState;\r\n appState: AppState;\r\n} & typeof CaseSettingsActionCreators &\r\n ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass SearchVehicleForm extends React.PureComponent<\r\n ISearchVehicleFormProps,\r\n ISearchVehicleFormState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private caseService!: ICaseService;\r\n\r\n static contextType = ApplicationContext;\r\n state = {\r\n isLoading: true,\r\n isLoadingData: false,\r\n vehicleDtoList: [],\r\n formData: {} as SearchVehicleFormData,\r\n modalOpen: false,\r\n modalMessage: undefined,\r\n modalYesNoButtons: false,\r\n modalData: undefined\r\n } as ISearchVehicleFormState;\r\n\r\n public async componentDidMount() {\r\n this.setState({\r\n isLoading: false\r\n });\r\n }\r\n\r\n onSubmit = async () => {\r\n if (!this.state.formData.vin?.trim() && !this.state.formData.plateNumber?.trim()) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'SEARCH_NOTICE_EMPTY_FIELDS_MSG',\r\n 'Completati cel putin un criteriu de cautare'\r\n ),\r\n { variant: 'info' }\r\n );\r\n return;\r\n }\r\n\r\n if (this.state.formData.vin || this.state.formData.plateNumber) {\r\n this.setState({ isLoadingData: true });\r\n const vehicles = await this.caseService.SearchVehicle(\r\n this.state.formData.vin?.toUpperCase(),\r\n this.state.formData.plateNumber?.toUpperCase(),\r\n this.props.searchInVehicleStock\r\n );\r\n\r\n this.setState({\r\n isLoadingData: false,\r\n vehicleDtoList: vehicles\r\n });\r\n }\r\n };\r\n\r\n onRowlick = async (e: any, rowData: any[]) => {\r\n const currentVehicle = this.state.vehicleDtoList.find((v) => v.id === rowData[0]);\r\n\r\n if (currentVehicle?.status) {\r\n const vehicleStatus = currentVehicle.status.id;\r\n switch (vehicleStatus) {\r\n case VehicleStatusCodeEnum.Available:\r\n this.handleModalConfirmation(rowData);\r\n break;\r\n case VehicleStatusCodeEnum.Sold:\r\n this.handleOpenModal(\r\n this.translatorService.Tranlate(\r\n 'VEHICLE_SEARCH_FORM_VEHICLE_SOLD',\r\n 'Autovehiculul selectat este vandut.'\r\n ),\r\n undefined\r\n );\r\n break;\r\n case VehicleStatusCodeEnum.Repair:\r\n let message = this.translatorService.Tranlate(\r\n 'VEHICLE_SEARCH_FORM_VEHICLE_REPAIR',\r\n 'Autovehiculul selectat se afla in proces de reparatie'\r\n );\r\n\r\n if (\r\n currentVehicle.lastCase?.caseTypeCode === CaseTypeCode.CLAIM ||\r\n currentVehicle.lastCase?.caseTypeCode === CaseTypeCode.REP\r\n ) {\r\n message = `${this.translatorService.Tranlate(\r\n 'VEHICLE_SEARCH_FORM_VEHICLE_REPAIR_CASE',\r\n 'Autovehiculul selectat se afla in proces de reparatie pe dosarul'\r\n )} ${currentVehicle.lastCase.id}, ${this.translatorService.Tranlate(\r\n 'VEHICLE_SEARCH_FORM_VEHICLE_OPENED_BY',\r\n 'deschis de catre'\r\n )}\r\n ${currentVehicle.lastCase.createdByUserName}, \r\n ${moment\r\n .utc(currentVehicle.lastCase.dateCreation)\r\n .local()\r\n .format(this.props.appState.longDateFormat)}.`;\r\n } else {\r\n message = `${this.translatorService.Tranlate(\r\n 'VEHICLE_SEARCH_FORM_VEHICLE_REPAIR',\r\n 'Autovehiculul selectat se afla in proces de reparatie'\r\n )} ${this.translatorService.Tranlate(\r\n 'VEHICLE_SEARCH_FORM_VEHICLE_OPENED_BY',\r\n 'deschis de catre'\r\n )}\r\n ${currentVehicle.status.userName}, \r\n ${moment\r\n .utc(currentVehicle.status.date)\r\n .local()\r\n .format(this.props.appState.longDateFormat)}.`;\r\n }\r\n\r\n this.handleOpenModal(message, rowData, true);\r\n break;\r\n case VehicleStatusCodeEnum.Reserved:\r\n this.handleOpenModal(\r\n `${this.translatorService.Tranlate(\r\n 'VEHICLE_SEARCH_FORM_VEHICLE_RESERVED',\r\n 'Autovehiculul selectat a fost rezervat de catre'\r\n )} ${currentVehicle.status.userName}, \r\n ${moment\r\n .utc(currentVehicle.status.date)\r\n .local()\r\n .format(this.props.appState.longDateFormat)}.`,\r\n rowData,\r\n true\r\n );\r\n break;\r\n case VehicleStatusCodeEnum.Aquisition:\r\n let message1 = this.translatorService.Tranlate(\r\n 'VEHICLE_SEARCH_FORM_VEHICLE_AQUISITION',\r\n 'Autovehiculul selectat se afla in proces de achizitie.'\r\n );\r\n\r\n if (currentVehicle.lastCase?.caseTypeCode === CaseTypeCode.AQUISITION) {\r\n message1 = `${this.translatorService.Tranlate(\r\n 'VEHICLE_SEARCH_FORM_VEHICLE_AQUISITION_CASE',\r\n 'Autovehiculul selectat se afla in proces de achizitie pe dosarul'\r\n )} ${currentVehicle.lastCase.id}, ${this.translatorService.Tranlate(\r\n 'VEHICLE_SEARCH_FORM_VEHICLE_OPENED_BY',\r\n 'deschis de catre'\r\n )} ${currentVehicle.lastCase.createdByUserName}, \r\n ${moment\r\n .utc(currentVehicle.lastCase.dateCreation)\r\n .local()\r\n .format(this.props.appState.longDateFormat)}.`;\r\n }\r\n this.handleOpenModal(message1, undefined);\r\n break;\r\n case VehicleStatusCodeEnum.AcquisitionRefused:\r\n this.handleOpenModal(\r\n this.translatorService.Tranlate(\r\n 'VEHICLE_SEARCH_FORM_VEHICLE_AQUISITION_REFUSED',\r\n 'Autovehiculul selectat nu a fost achizitionat.'\r\n ),\r\n undefined\r\n );\r\n break;\r\n case VehicleStatusCodeEnum.ForSale:\r\n this.props.history.push('/cases/' + currentVehicle.lastCase.id);\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n };\r\n\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n label: ' ',\r\n options: {\r\n filter: false,\r\n customBodyRender: (value: any, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n \r\n \r\n \r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'vin',\r\n label: this.translatorService.Tranlate('VEHICLE_SEARCH_FORM_VEHICLE_VIN_LABEL', 'Vin')\r\n },\r\n {\r\n name: 'plateNumber',\r\n label: this.translatorService.Tranlate(\r\n 'VEHICLE_SEARCH_FORM_VEHICLE_PLATE_NUMBER_LABEL',\r\n 'Numar Inmatriculare'\r\n )\r\n },\r\n {\r\n name: 'make',\r\n label: this.translatorService.Tranlate('VEHICLE_SEARCH_FORM_VEHICLE_MAKE_LABEL', 'Marca')\r\n },\r\n {\r\n name: 'model',\r\n label: this.translatorService.Tranlate('VEHICLE_SEARCH_FORM_VEHICLE_MODEL_LABEL', 'Model')\r\n },\r\n {\r\n name: 'status.nameLocalized',\r\n label: this.translatorService.Tranlate('VEHICLE_SEARCH_FORM_VEHICLE_MODEL_STATUS', 'Status')\r\n },\r\n {\r\n name: 'registrationDate',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'class',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'region',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n }\r\n ];\r\n\r\n return columns;\r\n };\r\n\r\n handleCloseModal = () => {\r\n this.setState({\r\n modalOpen: false,\r\n modalMessage: undefined,\r\n modalYesNoButtons: false,\r\n modalData: undefined\r\n });\r\n };\r\n\r\n handleOpenModal = (modalMessage: string, modalData?: any[], modalYesNoButtons = false) => {\r\n this.setState({\r\n modalOpen: true,\r\n modalMessage,\r\n modalYesNoButtons,\r\n modalData\r\n });\r\n };\r\n\r\n handleModalConfirmation = (rowData: any[]) => {\r\n this.props.onVehicleSelected({\r\n id: rowData[0],\r\n vin: rowData[1],\r\n plateNumber: rowData[2],\r\n make: rowData[3],\r\n model: rowData[4],\r\n firstPlateDate: rowData[6],\r\n class: rowData[7],\r\n region: rowData[8]\r\n } as VehicleDto);\r\n };\r\n\r\n renderModal = () => {\r\n return (\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
{this.state.modalMessage}
\r\n {this.state.modalYesNoButtons && (\r\n
\r\n {' '}\r\n {this.translatorService.Tranlate(\r\n 'VEHICLE_SEARCH_FORM_VEHICLE_CONTINUE',\r\n 'Doriti sa continuati?'\r\n )}\r\n
\r\n )}\r\n
\r\n
\r\n {!this.state.modalYesNoButtons ? (\r\n \r\n Ok\r\n \r\n ) : (\r\n
\r\n this.handleModalConfirmation(this.state.modalData)}\r\n >\r\n {this.translatorService.Tranlate('VEHICLE_SEARCH_FORM_VEHICLE_YES', 'Da')}\r\n \r\n        \r\n \r\n {this.translatorService.Tranlate('VEHICLE_SEARCH_FORM_VEHICLE_NO', 'NU')}\r\n \r\n
\r\n )}\r\n
\r\n
\r\n
\r\n
\r\n );\r\n };\r\n\r\n \r\n getMuiTheme = () => createMuiTheme({\r\n overrides: {\r\n MuiTableCell: {\r\n root: {\r\n '@media (max-width:599.98px)': { \r\n borderBottom: \"none\",\r\n padding: \"1px\",\r\n },\r\n },\r\n },\r\n MUIDataTableBodyCell: {\r\n stackedCommon: {\r\n '@media (max-width:599.98px)': { \r\n display: \"block\",\r\n width: \"100% !important\",\r\n whiteSpace: \"normal\",\r\n height: \"100%\",\r\n // fontSize: \"12px\",\r\n paddingLeft: \"5px\",\r\n paddingTop: \"5px\"\r\n },\r\n },\r\n cellHide:{\r\n fontWeight: \"bold\",\r\n paddingTop: \"15px\",\r\n }\r\n },\r\n MuiTableRow: {\r\n root: {\r\n borderBottom: \"1px solid rgba(224, 224, 224, 1)\"\r\n }\r\n }\r\n } as any\r\n });\r\n \r\n handleRowClick = async (rowData: any[], rowMeta: MUIDataTableMeta) => {\r\n rowData[0] = this.state.vehicleDtoList[rowMeta.rowIndex].id;\r\n await this.onRowlick(rowData, rowData);\r\n }\r\n\r\n renderResults = () => {\r\n const options = {\r\n filter: false,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n // responsive: \"stacked\",\r\n elevation: 0,\r\n search: false,\r\n viewColumns: false,\r\n pagination: false,\r\n onRowClick: this.handleRowClick as any\r\n };\r\n\r\n return (\r\n
\r\n
\r\n \r\n
\r\n {this.state.isLoadingData ? (\r\n ''\r\n ) : (\r\n <>\r\n \r\n \r\n \r\n {this.renderModal()}\r\n \r\n )}\r\n
\r\n );\r\n };\r\n\r\n renderSelectedForm = () => {\r\n let jsonSchema = {};\r\n let jsonGUI = {};\r\n try {\r\n jsonSchema = JSON.parse(this.props.organizationCaseTypeStepForm.json1);\r\n jsonGUI = JSON.parse(this.props.organizationCaseTypeStepForm.json2);\r\n } catch {\r\n console.log('json schema/gui error');\r\n }\r\n const schema = this.translatorService.TranslateSchema(jsonSchema);\r\n\r\n return (\r\n this.setState({ formData: e.formData })}\r\n onSubmit={async (e: ISubmitEvent) => await this.onSubmit()}\r\n transformErrors={this.translatorService.TranslateErrors}\r\n >\r\n
\r\n {FormButton.GetButtons(\r\n this.props.organizationCaseTypeStepForm.form.code,\r\n this.translatorService,\r\n true,\r\n false\r\n )}\r\n
\r\n \r\n );\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n\r\n return (\r\n \r\n {this.renderSelectedForm()}\r\n {this.state.isLoading ? '' : this.renderResults()}\r\n \r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalSearchVehicleFormProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app\r\n }),\r\n CaseSettingsActionCreators,\r\n mergeProps\r\n)(withSnackbar(SearchVehicleForm as any));\r\n","import React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n ApplicationState,\r\n CaseSettingsState,\r\n AppState,\r\n CaseSettingsActionCreators\r\n} from '../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { IconButton } from '@material-ui/core';\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport { IReferentialService } from '../../services/Interfaces/IReferentialService';\r\nimport { OrganizationCaseTypeStepForm } from '../../interfaces/Organization';\r\nimport MUIDataTable, {\r\n MUIDataTableColumnOptions,\r\n MUIDataTableMeta,\r\n SelectableRows\r\n} from 'mui-datatables';\r\nimport { MUITranslations } from '../../helpers/MUITableTranslations';\r\nimport DoubleArrowTwoTone from '@material-ui/icons/DoubleArrowTwoTone';\r\nimport { SearchClientFormData } from '../../interfaces/FormData';\r\nimport { FormButton } from '../../helpers/forms/FormButton';\r\nimport { ClientDto } from '../../interfaces/Case';\r\nimport Form from '@rjsf/material-ui';\r\nimport { ISubmitEvent } from '@rjsf/core';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport { ReferentialCode } from '../../helpers/Constants';\r\nimport Referentials from '../../helpers/Referentials.json';\r\nimport { CNP } from 'romanian-personal-identity-code-validator';\r\nimport * as R from 'ramda';\r\nimport { Button } from 'reactstrap';\r\n\r\ninterface ISearchClientFormState {\r\n clientDtoList: ClientDto[];\r\n isLoading: boolean;\r\n isLoadingData: boolean;\r\n formData: SearchClientFormData;\r\n personTypes: IReferential[];\r\n displayNextActionBtn: boolean;\r\n}\r\n\r\nexport interface ExternalSearchClientFormProps {\r\n onClientSelected: (clientDto: ClientDto) => void;\r\n organizationCaseTypeStepForm: OrganizationCaseTypeStepForm;\r\n}\r\n\r\ntype ISearchClientFormProps = ExternalSearchClientFormProps & {\r\n caseSettingsState: CaseSettingsState;\r\n appState: AppState;\r\n} & typeof CaseSettingsActionCreators &\r\n ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass SearchClientForm extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private caseService!: ICaseService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n state = {\r\n clientDtoList: [],\r\n isLoading: true,\r\n isLoadingData: false,\r\n vehicleDtoList: [],\r\n formData: {} as SearchClientFormData,\r\n personTypes: [],\r\n displayNextActionBtn: false\r\n } as ISearchClientFormState;\r\n\r\n public async componentDidMount() {\r\n this.setState(\r\n {\r\n isLoading: false\r\n },\r\n async () => {\r\n await this.loadData();\r\n }\r\n );\r\n }\r\n\r\n loadData = async () => {\r\n const refpersonType = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.PersonType\r\n );\r\n const [personTypeList] = await Promise.all([\r\n this.appReferentialService.Get(refpersonType!.baseUrl)\r\n ]);\r\n\r\n this.setState({\r\n personTypes: personTypeList\r\n });\r\n };\r\n\r\n onSubmit = async () => {\r\n if (R.isNil(this.state.formData.cnpCui) && R.isNil(this.state.formData.personTypeId)) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'SEARCH_NOTICE_EMPTY_FIELDS_MSG',\r\n 'Completati cel putin un criteriu de cautare'\r\n ),\r\n { variant: 'info' }\r\n );\r\n return;\r\n }\r\n\r\n if (this.state.formData.personTypeId === 1) {\r\n if (!R.isNil(this.state.formData.cnpCui)) {\r\n const cnp = new CNP(this.state.formData.cnpCui);\r\n\r\n if (!cnp.isValid()) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('FRM_EVENT_DATA_PIN_ERROR', 'CNP invalid!'),\r\n { variant: 'error' }\r\n );\r\n return;\r\n }\r\n }\r\n }\r\n\r\n this.setState({ isLoadingData: true });\r\n\r\n const clients = await this.caseService.SearchClient(\r\n this.state.formData.personTypeId,\r\n this.state.formData.cnpCui,\r\n this.state.formData.clientName\r\n );\r\n this.setState({\r\n isLoadingData: false,\r\n clientDtoList: clients,\r\n displayNextActionBtn: clients.length === 0\r\n });\r\n };\r\n\r\n onRowlick = async (e: any, rowData: any[]) => {\r\n const client = this.state.clientDtoList.find((item) => item.id === rowData[0]);\r\n this.props.onClientSelected(client!);\r\n };\r\n\r\n getColumns = () => {\r\n let columns;\r\n if (this.state.formData.personTypeId === 1) {\r\n columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: '',\r\n label: '',\r\n options: {\r\n filter: false,\r\n customBodyRender: (value: any, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n await this.onRowlick(e, tableMeta.rowData)}\r\n >\r\n \r\n \r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'personType.displayName',\r\n label: this.translatorService.Tranlate(\r\n 'CLIENT_SEARCH_FORM_PERSON_TYPE_LABEL',\r\n 'Tip Persoana'\r\n ),\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'pin',\r\n label: this.translatorService.Tranlate('CLIENT_SEARCH_FORM_PIN_LABEL', 'CNP')\r\n },\r\n {\r\n name: 'firstName',\r\n label: this.translatorService.Tranlate('CLIENT_SEARCH_FORM_FIRST_NAME_LABEL', 'Nume'),\r\n options: {\r\n filter: false,\r\n customBodyRender: (value: any, tableMeta: MUIDataTableMeta, updateValue: any) => {\r\n const client = this.state.clientDtoList.find(\r\n (item) => item.id === tableMeta.rowData[0]\r\n );\r\n return
{client!.firstName + ' ' + client!.lastName}
;\r\n }\r\n }\r\n },\r\n {\r\n name: 'lastName',\r\n label: this.translatorService.Tranlate('CLIENT_SEARCH_FORM_LAST_NAME_LABEL', 'Nume'),\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'email',\r\n label: this.translatorService.Tranlate('CLIENT_SEARCH_FORM_EMAIL_LABEL', 'E-mail')\r\n },\r\n {\r\n name: 'phone',\r\n label: this.translatorService.Tranlate('CLIENT_SEARCH_FORM_PHONE_LABEL', 'Telefon')\r\n }\r\n ];\r\n } else {\r\n columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: '',\r\n label: '',\r\n options: {\r\n filter: false,\r\n customBodyRender: (value: any, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n await this.onRowlick(e, tableMeta.rowData)}\r\n >\r\n \r\n \r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'personType.displayName',\r\n label: this.translatorService.Tranlate(\r\n 'CLIENT_SEARCH_FORM_PERSON_TYPE_LABEL',\r\n 'Tip Persoana'\r\n ),\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'companyNumber',\r\n label: this.translatorService.Tranlate('CLIENT_SEARCH_FORM_COMPANY_NUMBER_LABEL', 'CUI')\r\n },\r\n {\r\n name: 'firstName',\r\n label: this.translatorService.Tranlate('CLIENT_SEARCH_FORM_FIRST_NAME_LABEL', 'Nume'),\r\n options: {\r\n filter: false,\r\n customBodyRender: (value: any, tableMeta: MUIDataTableMeta, updateValue: any) => {\r\n const client = this.state.clientDtoList.find(\r\n (item) => item.id === tableMeta.rowData[0]\r\n );\r\n return
{client!.companyName}
;\r\n }\r\n }\r\n },\r\n {\r\n name: 'lastName',\r\n label: this.translatorService.Tranlate('CLIENT_SEARCH_FORM_LAST_NAME_LABEL', 'Nume'),\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'email',\r\n label: this.translatorService.Tranlate('CLIENT_SEARCH_FORM_EMAIL_LABEL', 'E-mail')\r\n },\r\n {\r\n name: 'phone',\r\n label: this.translatorService.Tranlate('CLIENT_SEARCH_FORM_PHONE_LABEL', 'Telefon')\r\n }\r\n ];\r\n }\r\n\r\n return columns;\r\n };\r\n\r\n renderResults = () => {\r\n const options = {\r\n filter: false,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n // responsive: \"stacked\",\r\n elevation: 0,\r\n search: false,\r\n viewColumns: false,\r\n pagination: false\r\n };\r\n\r\n return (\r\n
\r\n
\r\n \r\n
\r\n {this.state.isLoadingData ? (\r\n ''\r\n ) : (\r\n \r\n )}\r\n
\r\n );\r\n };\r\n\r\n handleArraySchema = (schema: any) => {\r\n if (R.isNil(schema.properties)) {\r\n return schema;\r\n }\r\n\r\n if (this.state.personTypes.length > 0) {\r\n for (const key of Object.keys(schema.properties)) {\r\n if (\r\n schema.properties[key].anyOf !== undefined &&\r\n schema.properties[key].anyOf[0].title === 'PERSON_TYPE_ENUM'\r\n ) {\r\n schema.properties[key].anyOf = this.state.personTypes.map((item) => {\r\n return {\r\n type: 'number',\r\n title: item.displayName,\r\n enum: [item.id]\r\n };\r\n });\r\n }\r\n }\r\n }\r\n\r\n return schema;\r\n };\r\n\r\n renderSelectedForm = () => {\r\n let jsonSchema = {};\r\n let jsonGUI = {};\r\n try {\r\n jsonSchema = JSON.parse(this.props.organizationCaseTypeStepForm.json1);\r\n jsonGUI = JSON.parse(this.props.organizationCaseTypeStepForm.json2);\r\n } catch {\r\n console.log('json schema/gui error');\r\n }\r\n let schema = this.translatorService.TranslateSchema(jsonSchema);\r\n schema = this.handleArraySchema(jsonSchema);\r\n\r\n return (\r\n this.setState({ formData: e.formData })}\r\n onSubmit={async (e: ISubmitEvent) => await this.onSubmit()}\r\n transformErrors={this.translatorService.TranslateErrors}\r\n >\r\n
\r\n {FormButton.GetButtons(\r\n this.props.organizationCaseTypeStepForm.form.code,\r\n this.translatorService,\r\n true,\r\n false\r\n )}\r\n {this.state.displayNextActionBtn ? (\r\n {\r\n this.props.onClientSelected({} as ClientDto);\r\n }}\r\n >\r\n {this.translatorService.Tranlate('SEARCH_NewClient', 'Client Nou')}\r\n \r\n ) : null}\r\n
\r\n \r\n );\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n return (\r\n \r\n {this.renderSelectedForm()}\r\n {this.state.isLoading ? '' : this.renderResults()}\r\n \r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalSearchClientFormProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app\r\n }),\r\n CaseSettingsActionCreators,\r\n mergeProps\r\n)(withSnackbar(SearchClientForm as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { omit } from 'lodash';\r\nimport { ApplicationState, AppState } from '../../store';\r\nimport { ApplicationContext, AppContext } from '../../context/Contexts';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport TabPanel from '../_shared/Tabs';\r\nimport {\r\n Tab,\r\n Tabs,\r\n Stepper,\r\n StepConnector,\r\n Step,\r\n StepLabel,\r\n AppBar,\r\n StepButton\r\n} from '@material-ui/core';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { IAppUserService } from '../../services/Interfaces/IAppUserService';\r\nimport { ProviderContext, withSnackbar } from 'notistack';\r\nimport { IOrganizationService } from '../../services/Interfaces/IOrganizationService';\r\nimport {\r\n Organization,\r\n OrganizationCaseType,\r\n OrganizationCaseTypeStep,\r\n OrganizationCaseTypeStepForm\r\n} from '../../interfaces/Organization';\r\nimport { IReferentialService } from '../../services/Interfaces/IReferentialService';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport Referentials from '../../helpers/Referentials.json';\r\nimport { CaseStatusCodeEnum, GTErrorCode, OrganizationCaseTypeStepCode, ReferentialCode } from '../../helpers/Constants';\r\nimport { isNullOrUndefined } from 'util';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { Card } from 'reactstrap';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport Form from '@rjsf/material-ui';\r\nimport { FormButton } from '../../helpers/forms/FormButton';\r\nimport { FormCode } from '../../helpers/forms/FormCode';\r\nimport { ISubmitEvent } from '@rjsf/core';\r\nimport { SearchCaseFormData, SearchNoticeFormData } from '../../interfaces/FormData';\r\nimport MUIDataTable, {\r\n MUIDataTableColumnOptions,\r\n SelectableRows,\r\n MUIDataTableMeta\r\n} from 'mui-datatables';\r\nimport { MUITranslations } from '../../helpers/MUITableTranslations';\r\nimport DoubleArrowTwoTone from '@material-ui/icons/DoubleArrowTwoTone';\r\nimport { IWorkflowService } from '../../services/Interfaces/IWorkflowService';\r\nimport { Workflow } from '../../interfaces/Workflow';\r\nimport Workflows from '../newCase/Workflows';\r\nimport moment from 'moment';\r\nimport SearchVehicleForm from './SearchVehicleForm';\r\nimport SearchClientForm from './searchClientForm';\r\nimport { CaseTypeCode } from '../../helpers/Constants';\r\nimport { Case, ClientDto, ModelData, Notice, VehicleDto } from '../../interfaces/Case';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport { Autocomplete } from '@material-ui/lab';\r\nimport { Button, Typography, Grid, Box, Dialog, DialogTitle, IconButton, DialogContent } from '@material-ui/core';\r\nimport * as R from 'ramda';\r\n\r\ntype NewCaseProps = AppState & ProviderContext & RouteComponentProps;\r\n\r\ninterface INewCaseState {\r\n selectedTab: number;\r\n isLoading: boolean;\r\n organizationCaseTypes: OrganizationCaseType[];\r\n selectedOrganizationCaseType: OrganizationCaseType | null;\r\n organizationSteps: OrganizationCaseTypeStep[];\r\n activeStep: number;\r\n organizationForms: OrganizationCaseTypeStepForm[];\r\n selectedTabForm: number;\r\n selectedOrganizationForm: OrganizationCaseTypeStepForm | null;\r\n noticeList: Notice[];\r\n claimReviewList: Case[];\r\n formData: any;\r\n workflows: Workflow[];\r\n selectedWorkflow: Workflow | null;\r\n selectedNotice: { id: number; orgId: number; companyNumber: string } | null;\r\n selectedVehicle: VehicleDto | null;\r\n selectedClient: ClientDto | null;\r\n selectedCase: Case | null;\r\n isDialogOpen: boolean;\r\n modelData: ModelData[];\r\n selectedModelData: ModelData | null;\r\n caseStatuses: IReferential[];\r\n organization: Organization | null;\r\n hideSaleNewWorkflow: boolean;\r\n}\r\nclass NewCase extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private appUserService!: IAppUserService;\r\n private organizationService!: IOrganizationService;\r\n private workflowService!: IWorkflowService;\r\n private appReferentialService!: IReferentialService;\r\n private caseService!: ICaseService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n selectedTab: 0,\r\n isLoading: false,\r\n organizationCaseTypes: [],\r\n selectedOrganizationCaseType: null,\r\n organizationSteps: [],\r\n activeStep: 0,\r\n organizationForms: [],\r\n selectedTabForm: 0,\r\n selectedOrganizationForm: null,\r\n noticeList: [],\r\n claimReviewList: [],\r\n formData: null,\r\n workflows: [],\r\n selectedWorkflow: null,\r\n selectedNotice: null,\r\n selectedVehicle: null,\r\n selectedClient: null,\r\n selectedCase: null,\r\n isDialogOpen: false,\r\n modelData: [],\r\n selectedModelData: null,\r\n caseStatuses: [],\r\n organization: null,\r\n hideSaleNewWorkflow: true\r\n } as INewCaseState;\r\n\r\n public componentDidMount() {\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadCaseTypesStepsForms(null);\r\n }\r\n );\r\n }\r\n\r\n loadCaseTypesStepsForms = async (caseType: OrganizationCaseType | null) => {\r\n const hoId =\r\n this.props.appUser!.organization!.hoId === null\r\n ? this.props.appUser!.organizationId\r\n : this.props.appUser!.organization!.hoId;\r\n\r\n if (hoId === null) {\r\n return;\r\n }\r\n\r\n if (Number.isNaN(hoId)) {\r\n return;\r\n }\r\n\r\n const refCaseType = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.CaseType\r\n );\r\n\r\n const refCaseStatus = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.CaseStatus\r\n );\r\n\r\n const [orgCaseList, orgCaseTypes, caseStatuses, workflows, organization] = await Promise.all([\r\n this.organizationService.GetUserOrganizationCaseType(),\r\n this.appReferentialService.Get(refCaseType!.baseUrl),\r\n this.appReferentialService.Get(refCaseStatus!.baseUrl),\r\n this.workflowService.GetUserWorkflows(),\r\n R.isNil(this.props!.appUser!.organizationId) ? null :\r\n this.organizationService.GetOrganizationInfo(this.props!.appUser!.organizationId)\r\n ]);\r\n\r\n const owners = await this.organizationService.GetUserOrganizationsByIds(\r\n Array.from(new Set(workflows.map((item) => item.organizationOwnerId)))\r\n );\r\n workflows.forEach((w) => {\r\n const owner = owners.find((item) => item.id === w.organizationOwnerId);\r\n w.organizationOwner = isNullOrUndefined(owner) ? null : owner;\r\n });\r\n\r\n const organizationCaseTypes = orgCaseList.map((item: OrganizationCaseType) => {\r\n item.caseType = orgCaseTypes.find(\r\n (caseType: IReferential) => caseType.id === item.caseTypeId\r\n )!;\r\n\r\n return item;\r\n });\r\n\r\n if (caseType === null) {\r\n caseType = organizationCaseTypes.sort(function (a, b) {\r\n return a.order - b.order;\r\n })[0];\r\n }\r\n\r\n this.setState(\r\n {\r\n isLoading: false,\r\n organizationCaseTypes: organizationCaseTypes.sort(function (a, b) {\r\n return a.order - b.order;\r\n }),\r\n selectedOrganizationCaseType: caseType,\r\n selectedTabForm: 0,\r\n noticeList: [],\r\n claimReviewList: [],\r\n workflows: workflows,\r\n caseStatuses: caseStatuses,\r\n organization: organization\r\n },\r\n async () => {\r\n await this.loadOrganizationSteps();\r\n }\r\n );\r\n };\r\n\r\n loadOrganizationSteps = async () => {\r\n if (isNullOrUndefined(this.state.selectedOrganizationCaseType)) {\r\n return;\r\n }\r\n\r\n let orgCaseTypeStepList = await this.organizationService.GetUserOrganizationCaseTypeStep(\r\n this.state.selectedOrganizationCaseType!.id\r\n );\r\n orgCaseTypeStepList = orgCaseTypeStepList.sort(function (a, b) {\r\n return a.order - b.order;\r\n });\r\n\r\n const orgCaseTypeStepFormList =\r\n this.state.activeStep > orgCaseTypeStepList.length - 1\r\n ? []\r\n : await this.organizationService.GetUserOrganizationCaseTypeStepForms(\r\n orgCaseTypeStepList[this.state.activeStep].id\r\n ); //orgCaseList[0].id);\r\n\r\n this.setState({\r\n isLoading: false,\r\n organizationSteps: orgCaseTypeStepList,\r\n organizationForms: orgCaseTypeStepFormList.sort(function (a, b) {\r\n return a.order - b.order;\r\n }),\r\n selectedTabForm: 0,\r\n //this.state.activeStep > orgCaseTypeStepList.length - 1 ? null :\r\n selectedOrganizationForm: orgCaseTypeStepFormList.sort(function (a, b) {\r\n return a.order - b.order;\r\n })[0],\r\n noticeList: [],\r\n claimReviewList: []\r\n });\r\n };\r\n\r\n loadOrganizationcaseTypeStepForms = async () => {\r\n const orgCaseTypeStepFormList =\r\n await this.organizationService.GetUserOrganizationCaseTypeStepForms(\r\n this.state.organizationSteps[this.state.activeStep].id\r\n ); //orgCaseList[0].id);\r\n\r\n this.setState({\r\n isLoading: false,\r\n organizationForms: orgCaseTypeStepFormList.sort(function (a, b) {\r\n return a.order - b.order;\r\n }),\r\n selectedOrganizationForm: orgCaseTypeStepFormList.sort(function (a, b) {\r\n return a.order - b.order;\r\n })[0],\r\n selectedTabForm: 0,\r\n noticeList: [],\r\n claimReviewList: []\r\n });\r\n };\r\n\r\n handleChangeTab = async (event: React.ChangeEvent, newValue: number) => {\r\n this.setState(\r\n {\r\n selectedTab: newValue,\r\n activeStep: 0,\r\n selectedOrganizationCaseType: this.state.organizationCaseTypes[newValue]\r\n },\r\n async () => {\r\n await this.loadOrganizationSteps();\r\n }\r\n );\r\n };\r\n\r\n renderCaseTypes = () => {\r\n const tabs = [] as any[];\r\n if (Object.keys(this.state.organizationCaseTypes).length !== 0) {\r\n this.state.organizationCaseTypes.forEach((item: OrganizationCaseType, index: number) => {\r\n tabs.push();\r\n });\r\n }\r\n\r\n return tabs;\r\n };\r\n\r\n renderForms = () => {\r\n const forms = [] as any[];\r\n if (Object.keys(this.state.organizationForms).length !== 0) {\r\n this.state.organizationForms.forEach((form: OrganizationCaseTypeStepForm, index: number) => {\r\n // const className = this.state.selectedOrganizationForm !== null && this.state.selectedOrganizationForm === form ? \"contained\" : \"outlined\";\r\n forms.push();\r\n });\r\n }\r\n\r\n return forms;\r\n };\r\n\r\n onSubmit = async (e: ISubmitEvent, code: string) => {\r\n if (code === FormCode.SEARCH_NOTICE) {\r\n const data = e.formData as SearchNoticeFormData;\r\n\r\n if (\r\n isNullOrUndefined(data.vin) &&\r\n isNullOrUndefined(data.plateNumber) &&\r\n isNullOrUndefined(data.noticeNumber) &&\r\n isNullOrUndefined(data.caseNumber)\r\n ) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'SEARCH_NOTICE_EMPTY_FIELDS_MSG',\r\n 'Completati cel putin un criteriu de cautare'\r\n ),\r\n { variant: 'info' }\r\n );\r\n return;\r\n }\r\n\r\n const noticeList = await this.caseService.SearchNotice(\r\n isNullOrUndefined(data.vin) ? '' : data.vin,\r\n isNullOrUndefined(data.plateNumber) ? '' : data.plateNumber,\r\n isNullOrUndefined(data.noticeNumber) ? '' : data.noticeNumber,\r\n isNullOrUndefined(data.caseNumber) ? '' : data.caseNumber\r\n );\r\n\r\n if (noticeList.length === 0) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'SEARCH_NOTICE_RESULT_EMPTY_MSG',\r\n 'Nu au fost gasite notificari'\r\n ),\r\n { variant: 'info' }\r\n );\r\n }\r\n this.setState({ noticeList: noticeList, selectedNotice: null, selectedCase: null });\r\n }\r\n if (code === FormCode.SEARCH_CLAIM_REVIEW) {\r\n const data = e.formData as SearchCaseFormData;\r\n\r\n if (isNullOrUndefined(data.caseNumber) && isNullOrUndefined(data.cbCaseNumber)) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'SEARCH_NOTICE_EMPTY_FIELDS_MSG',\r\n 'Completati cel putin un criteriu de cautare'\r\n ),\r\n { variant: 'info' }\r\n );\r\n return;\r\n }\r\n\r\n const caseList = await this.caseService.SearchByCaseNumber(\r\n isNullOrUndefined(data.cbCaseNumber) ? 0 : Number.parseInt(data.cbCaseNumber),\r\n isNullOrUndefined(data.caseNumber) ? '' : data.caseNumber,\r\n );\r\n\r\n if (caseList.length === 0) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'SEARCH_CLAIM_REVIEW_RESULT_EMPTY_MSG',\r\n 'Nu au fost gasite constatari'\r\n ),\r\n { variant: 'info' }\r\n );\r\n }\r\n this.setState({ claimReviewList: caseList });\r\n }\r\n };\r\n\r\n renderSelectedForm = () => {\r\n const tabPanels = [] as any[];\r\n\r\n if (Object.keys(this.state.organizationForms).length !== 0) {\r\n this.state.organizationForms.forEach((item: OrganizationCaseTypeStepForm, index: number) => {\r\n if (\r\n item.form.code === FormCode.SEARCH_VEHICLE ||\r\n item.form.code === FormCode.SEARCH_CLIENT\r\n ) {\r\n this.renderStaticForm(tabPanels, item, index);\r\n } else {\r\n this.renderJsonForm(tabPanels, item, index);\r\n }\r\n });\r\n }\r\n return tabPanels;\r\n };\r\n\r\n renderStaticForm = (\r\n tabPanels = [] as any[],\r\n item: OrganizationCaseTypeStepForm,\r\n index: number\r\n ) => {\r\n tabPanels.push(\r\n \r\n
\r\n {item.form.code === FormCode.SEARCH_VEHICLE ? (\r\n \r\n ) : (\r\n ''\r\n )}\r\n {item.form.code === FormCode.SEARCH_CLIENT ? (\r\n \r\n ) : (\r\n ''\r\n )}\r\n
\r\n {this.renderFormResults(item.form.code)}\r\n \r\n
\r\n );\r\n };\r\n\r\n closeDialog = async () => {\r\n this.setState({\r\n isDialogOpen: false\r\n });\r\n };\r\n\r\n submitSelectedModelData = async () => {\r\n try {\r\n const isSaleCase = this.state.organizationCaseTypes[this.state.selectedTab]?.caseType?.code === CaseTypeCode.SALE; \r\n if (!isSaleCase) {\r\n if (this.state.selectedVehicle !== null) {\r\n this.setState(\r\n {\r\n selectedVehicle: {\r\n ...this.state.selectedVehicle, \r\n make: this.state.selectedModelData!.makeDescription, \r\n model: this.state.selectedModelData!.modelDescription\r\n }\r\n\r\n }\r\n );\r\n }\r\n }\r\n this.setState({\r\n isDialogOpen: false\r\n });\r\n } catch (ex) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n handleAutocompleteModelDataChange = async (newValue: ModelData | null) => {\r\n this.setState({\r\n selectedModelData: newValue\r\n });\r\n };\r\n \r\n \r\n renderAddModelForm = () => {\r\n return (\r\n {\r\n this.submitSelectedModelData();\r\n }}\r\n >\r\n
\r\n \r\n this.handleAutocompleteModelDataChange(newValue)\r\n }\r\n getOptionLabel={(option: ModelData) => option.modelDescription || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n \r\n {this.translatorService.Tranlate('EDIT_ORGANIZATION_CANCEL_BTN', 'Anuleaza')}\r\n \r\n \r\n
\r\n \r\n );\r\n };\r\n\r\n vinDecoder = async () => {\r\n try {\r\n const isSaleCase = this.state.organizationCaseTypes[this.state.selectedTab]?.caseType?.code === CaseTypeCode.SALE; \r\n console.log('isSaleCase', isSaleCase);\r\n if (!isSaleCase) {\r\n if (this.state.selectedVehicle !== null) {\r\n const value = this.state.selectedVehicle.vin;\r\n const [result, latestCaseVehicleHistory, vehicle] = await Promise.all([\r\n this.caseService.DecodeVin(value),\r\n this.caseService.GetLatestCaseVehicleHistory(value),\r\n this.caseService.GetVehicleFromVQRepo(value)\r\n ]); \r\n\r\n if (latestCaseVehicleHistory !== null) {\r\n this.setState(\r\n {\r\n selectedVehicle: {\r\n ...this.state.selectedVehicle, \r\n numberOfKilometers: latestCaseVehicleHistory.numberOfKilometers\r\n }\r\n }\r\n );\r\n } \r\n \r\n if (result.error !== null) {\r\n if (result.error.errorInfo.code == GTErrorCode.THE_VIN_NUMBER_SENT_DOES_NOT_DECODE_ANY_MODEL) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('THE_VIN_NUMBER_SENT_DOES_NOT_DECODE_ANY_MODEL', 'Din păcate autovehiculul selectat nu poate fi identificat în aplicație !'), {\r\n variant: 'warning',\r\n autoHideDuration: 5000\r\n });\r\n this.setState({\r\n selectedVehicle: null\r\n });\r\n return;\r\n }\r\n }\r\n \r\n if (result.responseInfo.vehicleInfoDec.modelList.modelData.length > 1) {\r\n if (vehicle === null) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SELECT_MODEL_DIALOG', 'Va rugam selectati modelul auto!'), {\r\n variant: 'warning',\r\n autoHideDuration: 5000\r\n });\r\n this.setState({\r\n isDialogOpen: true,\r\n modelData: result.responseInfo.vehicleInfoDec.modelList.modelData\r\n });\r\n } else {\r\n this.setState(\r\n {\r\n selectedVehicle: {\r\n ...this.state.selectedVehicle, \r\n make: vehicle.make, \r\n model: vehicle.model\r\n }\r\n }\r\n );\r\n }\r\n } else if (result.responseInfo.vehicleInfoDec.modelList.modelData.length === 1) {\r\n this.setState(\r\n {\r\n selectedVehicle: {\r\n ...this.state.selectedVehicle, \r\n make: result.responseInfo.vehicleInfoDec.modelList.modelData[0].makeDescription, \r\n model: result.responseInfo.vehicleInfoDec.modelList.modelData[0].modelDescription\r\n }\r\n\r\n }\r\n );\r\n }\r\n }\r\n }\r\n }catch (ex) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n\r\n onVehicleSelected = async (vehicle: VehicleDto) => {\r\n const isSaleCase =\r\n this.state.organizationCaseTypes[this.state.selectedTab]?.caseType?.code ===\r\n CaseTypeCode.SALE;\r\n // on sale cases don't send the firstPlateDate as this field will be populated from DB\r\n const selectedVehicle = isSaleCase ? omit(vehicle, ['firstPlateDate']) : vehicle;\r\n this.setState(\r\n {\r\n selectedVehicle,\r\n hideSaleNewWorkflow: isSaleCase ? false : true,\r\n activeStep: this.state.activeStep + 1\r\n //isLoading: true\r\n },\r\n () => {\r\n this.loadOrganizationcaseTypeStepFormsAndVehicleInfo();\r\n }\r\n );\r\n };\r\n\r\n loadOrganizationcaseTypeStepFormsAndVehicleInfo = async () => {\r\n await Promise.all([this.loadOrganizationcaseTypeStepForms(), this.vinDecoder()]);\r\n }\r\n\r\n onClientSelected = (client: ClientDto) => {\r\n this.setState(\r\n {\r\n selectedClient: client,\r\n activeStep: this.state.activeStep + 1\r\n //isLoading:true\r\n },\r\n () => {\r\n this.loadOrganizationcaseTypeStepForms();\r\n }\r\n );\r\n };\r\n\r\n renderJsonForm = (tabPanels = [] as any[], item: OrganizationCaseTypeStepForm, index: number) => {\r\n let jsonSchema = {};\r\n let jsonGUI = {};\r\n try {\r\n jsonSchema = JSON.parse(item.json1);\r\n jsonGUI = JSON.parse(item.json2);\r\n } catch {\r\n console.log('json schema/gui error');\r\n }\r\n const schema = this.translatorService.TranslateSchema(jsonSchema);\r\n\r\n tabPanels.push(\r\n \r\n
\r\n this.setState({ formData: e.formData })}\r\n onSubmit={async (e: ISubmitEvent) => await this.onSubmit(e, item.form.code)}\r\n transformErrors={this.translatorService.TranslateErrors}\r\n >\r\n
{FormButton.GetButtons(item.form.code, this.translatorService, true, false)}
\r\n \r\n
\r\n {this.renderFormResults(item.form.code)}\r\n
\r\n );\r\n };\r\n\r\n renderSteps = () => {\r\n const { organizationSteps, organizationCaseTypes, selectedTab, hideSaleNewWorkflow } = this.state;\r\n \r\n // Early return if organizationSteps is empty\r\n if (!organizationSteps.length) return [];\r\n \r\n const caseType = organizationCaseTypes[selectedTab]?.caseType?.code?.toUpperCase();\r\n \r\n // Filter steps based on the condition for sale and hideSaleNewWorkflow\r\n const stepsToRender = (caseType === CaseTypeCode.SALE && hideSaleNewWorkflow)\r\n ? organizationSteps.filter((step: OrganizationCaseTypeStep) => step.organizationStep!.code !== OrganizationCaseTypeStepCode.DOS_NOU)\r\n : organizationSteps;\r\n \r\n return stepsToRender.map((step: OrganizationCaseTypeStep, index: number) => (\r\n \r\n \r\n {step.organizationStep!.displayName}\r\n \r\n \r\n ));\r\n };\r\n \r\n\r\n handleChangeTabForm = (event: React.ChangeEvent, newValue: number) => {\r\n this.setState({\r\n selectedTabForm: newValue,\r\n selectedOrganizationForm: this.state.organizationForms[newValue]\r\n });\r\n };\r\n\r\n renderNoticeResults = () => {\r\n const options = {\r\n filter: false,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n // responsive: \"stacked\",\r\n elevation: 0,\r\n search: false,\r\n viewColumns: false,\r\n pagination: false\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n );\r\n };\r\n\r\n renderClaimReviewResults = () => {\r\n const options = {\r\n filter: false,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n // responsive: \"stacked\",\r\n elevation: 0,\r\n search: false,\r\n viewColumns: false,\r\n pagination: false\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n );\r\n };\r\n\r\n renderFormResults = (code: string) => {\r\n if (code === FormCode.SEARCH_NOTICE) {\r\n return this.renderNoticeResults();\r\n }\r\n if (code === FormCode.SEARCH_CLAIM_REVIEW) {\r\n return this.renderClaimReviewResults();\r\n }\r\n if (code === FormCode.SELECT_WORKFLOW) {\r\n return (\r\n \r\n );\r\n }\r\n\r\n return '';\r\n };\r\n\r\n onNoticeClick = async (e: any, notice: { id: number; orgId: number; companyNumber: string }) => {\r\n this.setState(\r\n {\r\n selectedNotice: notice,\r\n activeStep: this.state.activeStep + 1\r\n //isLoading: true\r\n },\r\n () => {\r\n this.loadOrganizationcaseTypeStepForms();\r\n }\r\n );\r\n };\r\n\r\n onCaseClick = async (e: any, id: number) => {\r\n const casee = this.state.claimReviewList.find((item) => item.id === id);\r\n if (casee?.caseStatus?.caseStatus) {\r\n const caseStatus = casee?.caseStatus?.caseStatus?.code;\r\n // switch (caseStatus) {\r\n // case CaseStatusCodeEnum.PRELUAT_SERVICE:\r\n // this.props.enqueueSnackbar(\r\n // this.translatorService.Tranlate(\r\n // 'CASE_STATUS_PRELUAT_SERVICE_MSG',\r\n // 'Dosarul a fost preluat deja de service!'\r\n // ),\r\n // { variant: 'info' }\r\n // );\r\n // return;\r\n // default:\r\n // break;\r\n // }\r\n }\r\n\r\n this.setState(\r\n {\r\n selectedCase: casee === undefined ? null : casee,\r\n activeStep: this.state.activeStep + 1\r\n //isLoading: true\r\n },\r\n () => {\r\n this.loadOrganizationcaseTypeStepForms();\r\n }\r\n );\r\n };\r\n\r\n getNoticeColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'organizationOwnerId',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'companyNumber',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: '',\r\n label: '',\r\n options: {\r\n filter: false,\r\n customBodyRender: (value: any, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n \r\n await this.onNoticeClick(e, {\r\n id: tableMeta.rowData[0],\r\n orgId: tableMeta.rowData[1],\r\n companyNumber: tableMeta.rowData[2]\r\n })\r\n }\r\n >\r\n \r\n \r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'noticeNumber',\r\n label: this.translatorService.Tranlate('NOTICE_NOTICE_NUMBER_HEADER', 'Numar avizare'),\r\n options: {}\r\n },\r\n {\r\n name: 'caseNumber',\r\n label: this.translatorService.Tranlate('NOTICE_CASE_NUMBER_HEADER', 'Numar Dosar'),\r\n options: {}\r\n },\r\n {\r\n name: 'policyNumber',\r\n label: this.translatorService.Tranlate('NOTICE_POLICY_NUMBER_HEADER', 'Numar Polita'),\r\n options: {}\r\n },\r\n {\r\n name: 'vin',\r\n label: this.translatorService.Tranlate('NOTICE_VIN_HEADER', 'Serie Sasiu'),\r\n options: {\r\n filter: false\r\n }\r\n },\r\n {\r\n name: 'plateNumber',\r\n label: this.translatorService.Tranlate('NOTICE_PLATE_NUMBER_HEADER', 'Numar inmatriculare'),\r\n options: {\r\n sort: true\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'claimBoxCaseNumber',\r\n label: this.translatorService.Tranlate(\r\n 'NOTICE_CLAIMBOX_CASE_NUMBER_HEADER',\r\n 'Numar dosar Claimbox'\r\n ),\r\n options: {}\r\n }\r\n ];\r\n\r\n return columns;\r\n };\r\n\r\n getClaimReviewColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: '',\r\n label: '',\r\n options: {\r\n filter: false,\r\n customBodyRender: (value: any, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n await this.onCaseClick(e, tableMeta.rowData[0])}\r\n >\r\n \r\n \r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'id',\r\n label: this.translatorService.Tranlate(\r\n 'NOTICE_CLAIMBOX_CASE_NUMBER_HEADER',\r\n 'Numar dosar Claimbox'\r\n ),\r\n options: {}\r\n },\r\n // {\r\n // name: \"caseWorkflow.workflowDisplayName\",\r\n // label: this.translatorService.Tranlate(\"CLAIMREVIEW_WORKFLOW_OWNER_HEADER\", \"Proprietar Flux\")\r\n // },\r\n {\r\n name: 'caseVehicle.vin',\r\n label: this.translatorService.Tranlate('NOTICE_VIN_HEADER', 'Serie Sasiu'),\r\n options: {\r\n filter: false\r\n }\r\n },\r\n {\r\n name: 'caseVehicle.plateNumber',\r\n label: this.translatorService.Tranlate('NOTICE_PLATE_NUMBER_HEADER', 'Numar inmatriculare'),\r\n options: {\r\n sort: true\r\n }\r\n },\r\n {\r\n name: 'caseEvent.caseNumber',\r\n label: this.translatorService.Tranlate('NOTICE_CASE_NUMBER_HEADER', 'Numar Dosar'),\r\n options: {}\r\n },\r\n {\r\n name: 'caseEvent.policyNumber',\r\n label: this.translatorService.Tranlate('NOTICE_POLICY_NUMBER_HEADER', 'Numar Polita')\r\n },\r\n {\r\n name: 'caseStatus.caseStatus.displayName',\r\n label: this.translatorService.Tranlate('CLAIM_REVIEW_STATE_HEADER', 'Stare')\r\n },\r\n // {\r\n // name: \"createdBy\",\r\n // label: this.translatorService.Tranlate(\"CLAIM_REVIEW_CREATEDBY_HEADER\", \"Creat De\")\r\n // },\r\n {\r\n name: 'dateCreation',\r\n label: this.translatorService.Tranlate('CLAIM_REVIEW_DATE_CREATION_HEADER', 'Data Creare'),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: any, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n
\r\n {moment.utc(value).local().format(this.props.dateFormat)}\r\n
\r\n );\r\n }\r\n } as MUIDataTableColumnOptions\r\n }\r\n ];\r\n\r\n return columns;\r\n };\r\n\r\n handleStep = (step: number) => () => {\r\n this.setState(\r\n {\r\n activeStep: step\r\n //isLoading: true\r\n },\r\n () => {\r\n this.loadOrganizationcaseTypeStepForms();\r\n }\r\n );\r\n };\r\n\r\n renderStepper = () => {\r\n return (\r\n
\r\n }\r\n activeStep={this.state.activeStep}\r\n style={{ backgroundColor: 'transparent' }}\r\n >\r\n {this.renderSteps()}\r\n \r\n
\r\n );\r\n };\r\n\r\n renderTabForms = () => {\r\n return (\r\n
\r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n
\r\n \r\n \r\n {this.renderForms()}\r\n \r\n \r\n\r\n {this.renderSelectedForm()}\r\n
\r\n ) : null}\r\n\r\n {this.state.isDialogOpen ? (\r\n \r\n \r\n {this.translatorService.Tranlate('FRM_CAR_DATA_MODEL', 'Model Autovehicul')}\r\n \r\n \r\n \r\n \r\n \r\n {this.renderAddModelForm()}\r\n \r\n \r\n ) : (\r\n ''\r\n )}\r\n {/* {this.renderStepsButtons()} */}\r\n
\r\n );\r\n };\r\n\r\n renderCaseTypeTabPanel = () => {\r\n const tabs = [] as any[];\r\n if (Object.keys(this.state.organizationCaseTypes).length !== 0) {\r\n this.state.organizationCaseTypes.forEach((item: OrganizationCaseType, index: number) => {\r\n tabs.push(\r\n
\r\n \r\n {/* }> */}\r\n {/* */}\r\n {this.renderStepper()}\r\n {/* */}\r\n {this.renderTabForms()}\r\n \r\n
\r\n );\r\n });\r\n }\r\n\r\n return tabs;\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.appUserService = (this.context as AppContext).appUserService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.workflowService = (this.context as AppContext).workflowService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n {this.renderCaseTypes()}\r\n \r\n \r\n \r\n\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ?
{this.renderCaseTypeTabPanel()}
: null}\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => state.app // Selects which action creators are merged into the component's props\r\n)(withSnackbar(NewCase as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { withSnackbar } from 'notistack';\r\nimport { ApplicationState } from '../../../store';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { IOrganizationService } from '../../../services/Interfaces/IOrganizationService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport { Organization, OrganizationCaseType, Language } from '../../../interfaces/Organization';\r\nimport { Box, CardContent, Card, Tabs, Tab, Button, Grid } from '@material-ui/core';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport { ValidatorForm, TextValidator } from 'react-material-ui-form-validator';\r\nimport { Workflow } from '../../../interfaces/Workflow';\r\nimport { IWorkflowService } from '../../../services/Interfaces/IWorkflowService';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport Referentials from '../../../helpers/Referentials.json';\r\nimport { ReferentialCode } from '../../../helpers/Constants';\r\nimport { IReferential, ITranslation } from '../../../interfaces/IReferential';\r\nimport { isNullOrUndefined } from 'util';\r\n\r\ninterface IWorkflowGeneralDataState {\r\n workflows: Workflow[];\r\n workflow: Workflow;\r\n caseTypeList: IReferential[];\r\n isLoading: boolean;\r\n}\r\nclass WorkflowGeneralData extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private workflowService!: IWorkflowService;\r\n private organizationService!: IOrganizationService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n state = {\r\n workflows: [],\r\n workflow: {} as Workflow,\r\n caseTypeList: [],\r\n isLoading: true\r\n } as IWorkflowGeneralDataState;\r\n\r\n public async componentDidMount() {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n const workflowId = Number.parseInt(this.props.match.params.workflowId);\r\n\r\n const languages = this.activeLanguages();\r\n\r\n const ref = Referentials.referential.find((item) => item.code === ReferentialCode.CaseType);\r\n const [workflows, workflow, orgCaseList, orgCaseTypes, owner] = await Promise.all([\r\n this.workflowService.GetWorkflows(hoId),\r\n this.workflowService.GetWorkflow(workflowId),\r\n this.organizationService.GetOrganizationCaseType(hoId),\r\n this.appReferentialService.Get(ref!.baseUrl),\r\n this.organizationService.GetOrganization(hoId)\r\n ]);\r\n\r\n let organizationCases = orgCaseList.sort(function (a, b) {\r\n return a.order - b.order;\r\n });\r\n organizationCases = organizationCases.map((item: OrganizationCaseType) => {\r\n item.caseType = orgCaseTypes.find(\r\n (caseType: IReferential) => caseType.id === item.caseTypeId\r\n )!;\r\n return item;\r\n });\r\n\r\n workflow.organizationOwnerId = hoId;\r\n const workflowCaseType = orgCaseTypes.find((item) => item.id === workflow.caseTypeId);\r\n workflow.caseType = isNullOrUndefined(workflowCaseType) ? null : workflowCaseType;\r\n\r\n workflow.organizationOwner = owner !== undefined ? owner : ({} as Organization);\r\n\r\n const workflowTranslations = workflow.translations;\r\n languages.forEach((language: Language, index: number) => {\r\n if (workflowTranslations.length === 0) {\r\n workflowTranslations.push({\r\n id: 0,\r\n referentialTypeId: workflow.id,\r\n name: workflow.organizationOwner!.name + ' - ',\r\n language: language.code\r\n });\r\n } else {\r\n const indexTrans = workflowTranslations.findIndex((trans: ITranslation) => {\r\n return language.code === trans.language;\r\n });\r\n if (indexTrans === -1) {\r\n workflowTranslations.push({\r\n id: 0,\r\n referentialTypeId: workflow.id,\r\n name: workflow.organizationOwner!.name + ' - ',\r\n language: language.code\r\n });\r\n }\r\n }\r\n });\r\n workflow.translations = [...workflowTranslations];\r\n\r\n this.setState({\r\n workflows: workflows,\r\n workflow: workflow === undefined ? ({} as Workflow) : workflow,\r\n caseTypeList: organizationCases.map((item) => item.caseType!),\r\n isLoading: false\r\n });\r\n }\r\n\r\n handleWorkflowCaseTypeChange = (newValue: IReferential | null) => {\r\n this.setState({\r\n workflow: {\r\n ...this.state.workflow,\r\n caseType: newValue,\r\n caseTypeId: newValue !== null ? newValue!.id : 0\r\n }\r\n });\r\n };\r\n\r\n saveWorkflow = async () => {\r\n try {\r\n let workflowExist = -1;\r\n this.state.workflows.forEach((item: Workflow, index: number) => {\r\n if (\r\n item.caseTypeId === this.state.workflow.caseTypeId &&\r\n item.organizationOwnerId === this.state.workflow.organizationOwnerId &&\r\n item.id !== this.state.workflow.id\r\n ) {\r\n let indexFinded = -1;\r\n for (const i of item.translations) {\r\n indexFinded = Math.max(\r\n indexFinded,\r\n this.state.workflow.translations.findIndex(\r\n (item) => item.language === i.language && item.name === i.name\r\n )\r\n );\r\n }\r\n workflowExist = Math.max(workflowExist, indexFinded);\r\n return;\r\n } else {\r\n workflowExist = Math.max(workflowExist, -1);\r\n }\r\n });\r\n if (workflowExist !== -1) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('ERROR_MSG_WORKFLOW_EXISTS', 'Fluxul exista deja!'),\r\n { variant: 'error' }\r\n );\r\n return;\r\n }\r\n\r\n if (Number.parseInt(this.props.match.params.workflowId) === 0) {\r\n await this.workflowService.AddWorkflow(this.state.workflow);\r\n } else {\r\n await this.workflowService.UpdateWorkflow(this.state.workflow);\r\n }\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n activeLanguages = () => {\r\n const activeLanguages =\r\n this.props.appState.appUser!.organization!.gtOrganization!.languages!.filter(\r\n (language: any) => {\r\n if (language.isActive === true) {\r\n return language;\r\n }\r\n }\r\n );\r\n activeLanguages.forEach((language: any) => {\r\n language.displayName =\r\n language.displayName.charAt(0).toUpperCase() + language.displayName.slice(1);\r\n });\r\n return activeLanguages;\r\n };\r\n\r\n handleWorkflowNameChange = (event: any, code: string | null) => {\r\n let newWorkflowTransList = [] as ITranslation[];\r\n if (this.state.workflow.translations) {\r\n newWorkflowTransList = this.state.workflow.translations.map((loc: any) => {\r\n if (loc.language === code) {\r\n loc.name = event.target.value;\r\n }\r\n return loc;\r\n });\r\n }\r\n this.setState({\r\n workflow: {\r\n ...this.state.workflow,\r\n translations: newWorkflowTransList\r\n }\r\n });\r\n };\r\n\r\n renderNameTextFields = () => {\r\n if (Object.keys(this.state.workflow).length === 0) {\r\n return null;\r\n } else {\r\n const nameTextFieldsList = [] as any[];\r\n this.state.workflow!.translations.forEach((item: ITranslation, index: number) => {\r\n nameTextFieldsList.push(\r\n \r\n this.handleWorkflowNameChange(e, item.language)}\r\n label={\r\n this.translatorService.Tranlate('EDIT_WORKFLOW_GUI_NAME_LABEL', 'Nume GUI') +\r\n ' - ' +\r\n item.language\r\n }\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n />\r\n \r\n );\r\n });\r\n return nameTextFieldsList;\r\n }\r\n };\r\n\r\n render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.workflowService = (this.context as AppContext).workflowService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n\r\n {this.state.isLoading ? null : (\r\n \r\n \r\n\r\n \r\n this.handleWorkflowCaseTypeChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n {this.renderNameTextFields()}\r\n \r\n
\r\n \r\n
\r\n
\r\n )}\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({ appState: state.app }),\r\n null\r\n)(withSnackbar(WorkflowGeneralData as any));\r\n","import React, { Fragment } from 'react';\r\nimport {\r\n AppUserAdminActionCreators,\r\n ApplicationState,\r\n AppActionCreators,\r\n AppState\r\n} from '../../../store';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport { Box, Select, MenuItem, Card, CardContent, Tabs, Tab } from '@material-ui/core';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport { WorkflowParameter } from '../../../interfaces/Workflow';\r\nimport { IOrganizationService } from '../../../services/Interfaces/IOrganizationService';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport Referentials from '../../../helpers/Referentials.json';\r\nimport { ReferentialCode } from '../../../helpers/Constants';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport MaterialTable, { Column, EditComponentProps, Icons } from 'material-table';\r\nimport ArrowDownward from '@material-ui/icons/ArrowDownward';\r\nimport Check from '@material-ui/icons/Check';\r\nimport ChevronLeft from '@material-ui/icons/ChevronLeft';\r\nimport ChevronRight from '@material-ui/icons/ChevronRight';\r\nimport Clear from '@material-ui/icons/Clear';\r\nimport DeleteOutline from '@material-ui/icons/DeleteOutline';\r\nimport Edit from '@material-ui/icons/Edit';\r\nimport FilterList from '@material-ui/icons/FilterList';\r\nimport FirstPage from '@material-ui/icons/FirstPage';\r\nimport LastPage from '@material-ui/icons/LastPage';\r\nimport Remove from '@material-ui/icons/Remove';\r\nimport SaveAlt from '@material-ui/icons/SaveAlt';\r\nimport Search from '@material-ui/icons/Search';\r\nimport ViewColumn from '@material-ui/icons/ViewColumn';\r\nimport { Label } from 'reactstrap';\r\nimport moment from 'moment';\r\nimport AddCircleTwoToneIcon from '@material-ui/icons/AddCircleTwoTone';\r\nimport { forwardRef } from 'react';\r\nimport { IReferential } from '../../../interfaces/IReferential';\r\nimport { IWorkflowService } from '../../../services/Interfaces/IWorkflowService';\r\nimport { isNullOrUndefined } from 'util';\r\n\r\nconst tableIcons = {\r\n Add: forwardRef((props, ref) => ),\r\n Check: forwardRef((props, ref) => ),\r\n Clear: forwardRef((props, ref) => ),\r\n Delete: forwardRef((props, ref) => ),\r\n DetailPanel: forwardRef((props, ref) => ),\r\n Edit: forwardRef((props, ref) => ),\r\n Export: forwardRef((props, ref) => ),\r\n Filter: forwardRef((props, ref) => ),\r\n FirstPage: forwardRef((props, ref) => ),\r\n LastPage: forwardRef((props, ref) => ),\r\n NextPage: forwardRef((props, ref) => ),\r\n PreviousPage: forwardRef((props, ref) => ),\r\n ResetSearch: forwardRef((props, ref) => ),\r\n Search: forwardRef((props, ref) => ),\r\n SortArrow: forwardRef((props, ref) => ),\r\n ThirdStateCheck: forwardRef((props, ref) => ),\r\n ViewColumn: forwardRef((props, ref) => )\r\n} as Icons;\r\n\r\ninterface IWorkflowParametersState {\r\n parameters: WorkflowParameter[];\r\n isLoading: boolean;\r\n workflowId: number;\r\n parameterTypeList: IReferential[];\r\n}\r\n\r\ntype WorkflowParametersProps = { appState: AppState } & ProviderContext &\r\n RouteComponentProps<{ id: string; workflowId: string }>;\r\n\r\nclass WorkflowParameters extends React.PureComponent<\r\n WorkflowParametersProps,\r\n IWorkflowParametersState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private organizationService!: IOrganizationService;\r\n private workflowService!: IWorkflowService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n parameters: [],\r\n isLoading: true,\r\n workflowId: 0,\r\n parameterTypeList: []\r\n } as IWorkflowParametersState;\r\n\r\n componentDidMount = () => {\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n () => {\r\n this.loadData();\r\n }\r\n );\r\n };\r\n\r\n loadData = async () => {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n const workflowId = Number.parseInt(this.props.match.params.workflowId);\r\n if (isNaN(hoId) || isNaN(workflowId)) {\r\n return;\r\n }\r\n\r\n try {\r\n const ref = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.CompanyParameter\r\n );\r\n const [data, parameterList] = await Promise.all([\r\n this.workflowService.GetWorkflowParameters(workflowId),\r\n this.appReferentialService.Get(ref!.baseUrl)\r\n ]);\r\n\r\n data.forEach((item) => {\r\n const param = parameterList.find((par) => par.id === item.parameterId);\r\n item.parameter = isNullOrUndefined(param) ? null : param;\r\n });\r\n\r\n this.setState({\r\n parameters: data,\r\n isLoading: false,\r\n workflowId: workflowId,\r\n parameterTypeList: parameterList.filter((item) => item.isActive === true)\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n getColumns = () => {\r\n const lookup = this.state.parameterTypeList.reduce(function (\r\n acc: any,\r\n cur: IReferential,\r\n i: number\r\n ) {\r\n acc[cur.id] = cur.displayName;\r\n\r\n return acc;\r\n },\r\n {});\r\n\r\n return [\r\n {\r\n field: 'parameterId',\r\n title: this.translatorService.Tranlate(\r\n 'ORGANIZATION_PARAMETERS_PARAMETER_TYPE_HEADER',\r\n 'Parametru'\r\n ),\r\n searchable: true,\r\n lookup: lookup,\r\n render: (rowData: WorkflowParameter) => {\r\n return rowData.parameter!.displayName;\r\n },\r\n editComponent: (props: EditComponentProps) => {\r\n return (\r\n props.onChange(e.target.value)}\r\n >\r\n {this.state.parameterTypeList.map((item) => (\r\n \r\n {item.displayName}\r\n \r\n ))}\r\n \r\n );\r\n }\r\n } as Column,\r\n {\r\n field: 'value',\r\n title: this.translatorService.Tranlate(\r\n 'ORGANIZATION_PARAMETERS_PARAMETER_VALUE_HEADER',\r\n 'Valoare'\r\n ),\r\n searchable: true\r\n } as Column,\r\n {\r\n field: 'date',\r\n title: this.translatorService.Tranlate(\r\n 'ORGANIZATION_PARAMETERS_PARAMETER_DATE_HEADER',\r\n 'De La'\r\n ),\r\n defaultSort: 'desc',\r\n type: 'date',\r\n searchable: true,\r\n render: (rowData: WorkflowParameter) => {\r\n return moment(rowData.date).format(this.props.appState.dateFormat);\r\n }\r\n } as Column,\r\n {\r\n field: 'dateModification',\r\n title: this.translatorService.Tranlate(\r\n 'ORGANIZATION_PARAMETERS_MODIFIED_DATE_HEADER',\r\n 'Data Modificare'\r\n ),\r\n searchable: true,\r\n render: (rowData: any) => {\r\n return moment\r\n .utc(rowData.dateModification)\r\n .local()\r\n .format(this.props.appState.longDateFormat);\r\n },\r\n editComponent: (props: EditComponentProps) => {\r\n return ;\r\n }\r\n } as Column\r\n ];\r\n };\r\n\r\n public getLocalization = () => {\r\n return {\r\n header: { actions: '' },\r\n toolbar: {\r\n searchPlaceholder: this.translatorService.Tranlate('SEARCH', 'Cauta'),\r\n searchTooltip: this.translatorService.Tranlate('SEARCH', 'Cauta')\r\n },\r\n body: {\r\n editTooltip: this.translatorService.Tranlate('EDIT', 'Editeaza'),\r\n deleteTooltip: this.translatorService.Tranlate('DELETE', 'Sterge'),\r\n addTooltip: this.translatorService.Tranlate('Add', 'Adauga'),\r\n emptyDataSourceMessage: this.translatorService.Tranlate(\r\n 'NO_RECORDS_TO_DISPLAY',\r\n 'Nu exista date de afisat'\r\n ),\r\n editRow: {\r\n cancelTooltip: this.translatorService.Tranlate('CANCEL', 'Anuleaza'),\r\n saveTooltip: this.translatorService.Tranlate('SAVE', 'Salveaza'),\r\n deleteText: this.translatorService.Tranlate(\r\n 'DELETE_TEXT',\r\n 'Sigur doriti sa stergeti aceasta inregistrare?'\r\n )\r\n }\r\n },\r\n pagination: {\r\n labelRowsSelect: this.translatorService.Tranlate('ROWS', 'inregistrari'),\r\n firstTooltip: this.translatorService.Tranlate('FIRST_PAGE', 'Prima pagina'),\r\n previousTooltip: this.translatorService.Tranlate('PREVIOUS_PAGE', 'Pagina precedenta'),\r\n nextTooltip: this.translatorService.Tranlate('NEXT_PAGE', 'Pagina urmatoare'),\r\n lastTooltip: this.translatorService.Tranlate('LAST_PAGE', 'Ultima pagina'),\r\n labelDisplayedRows:\r\n '{from}-{to} ' + this.translatorService.Tranlate('OF', 'din') + ' {count}'\r\n }\r\n };\r\n };\r\n\r\n onRowUpdate = (newData: WorkflowParameter, oldData?: WorkflowParameter): Promise =>\r\n new Promise(async (resolve, reject) => {\r\n if (oldData) {\r\n try {\r\n if (\r\n isNullOrUndefined(newData.parameterId) ||\r\n isNullOrUndefined(newData.value) ||\r\n newData.value === '' ||\r\n isNullOrUndefined(newData.date)\r\n ) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n return;\r\n }\r\n\r\n if (moment.isDate(newData.date)) {\r\n newData.date = moment.utc(newData.date.toDateString()).local().toDate();\r\n }\r\n // newData.parameter = null;\r\n await this.workflowService.UpdateWorkflowParameter(newData);\r\n // await this.loadData();\r\n const parameters = [...this.state.parameters];\r\n const index = parameters.findIndex((item) => item.id === newData.id);\r\n parameters[index] = newData;\r\n this.setState({ parameters: parameters });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n resolve();\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n }\r\n });\r\n\r\n onRowDelete = (oldData: WorkflowParameter): Promise =>\r\n new Promise(async (resolve, reject) => {\r\n if (oldData) {\r\n try {\r\n const parameters = [...this.state.parameters];\r\n const index = parameters.findIndex((item) => item.id === oldData.id);\r\n parameters.splice(index, 1);\r\n await this.workflowService.RemoveWorkflowParameter(oldData.id);\r\n //await this.loadData();\r\n this.setState({ parameters: parameters });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n\r\n resolve();\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n }\r\n });\r\n\r\n onRowAdd = (newData: WorkflowParameter): Promise =>\r\n new Promise(async (resolve, reject) => {\r\n try {\r\n if (\r\n isNullOrUndefined(newData.parameterId) ||\r\n isNullOrUndefined(newData.value) ||\r\n newData.value === '' ||\r\n isNullOrUndefined(newData.date)\r\n ) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n return;\r\n }\r\n\r\n newData.workflowId = this.state.workflowId;\r\n newData.id = 0;\r\n\r\n await this.workflowService.AddWorkflowParameter(newData);\r\n await this.loadData();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n resolve();\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n });\r\n\r\n public renderTable = () => {\r\n return (\r\n this.onRowAdd(newData),\r\n onRowUpdate: (newData: any, oldData?: any) => this.onRowUpdate(newData, oldData),\r\n onRowDelete: (oldData: any) => this.onRowDelete(oldData)\r\n }}\r\n />\r\n );\r\n };\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.workflowService = (this.context as AppContext).workflowService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? this.renderTable() : null}\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (stateProps: any, dispatchProps: any, ownProps: WorkflowParametersProps) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\nexport default connect(\r\n (state: ApplicationState) => ({ appState: state.app }),\r\n { ...AppUserAdminActionCreators, ...AppActionCreators },\r\n mergeProps\r\n)(withSnackbar(WorkflowParameters as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { OrganizationType } from '../../../interfaces/Organization';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport { IOrganizationService } from '../../../services/Interfaces/IOrganizationService';\r\nimport { Box, Button, IconButton, Card, CardContent, Tabs, Tab } from '@material-ui/core';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport MUIDataTable, {\r\n MUIDataTableColumnOptions,\r\n MUIDataTableMeta,\r\n SelectableRows\r\n} from 'mui-datatables';\r\nimport moment from 'moment';\r\nimport { MUITranslations } from '../../../helpers/MUITableTranslations';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ValidatorForm, TextValidator } from 'react-material-ui-form-validator';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport Referentials from '../../../helpers/Referentials.json';\r\nimport { ReferentialCode } from '../../../helpers/Constants';\r\nimport DeleteOutlineTwoToneIcon from '@material-ui/icons/DeleteOutlineTwoTone';\r\nimport { WorkflowPartnerType } from '../../../interfaces/Workflow';\r\nimport { IWorkflowService } from '../../../services/Interfaces/IWorkflowService';\r\nimport { isNullOrUndefined } from 'util';\r\n\r\ninterface IWorkflowOrganizationTypesState {\r\n workflowOrganizationTypes: WorkflowPartnerType[];\r\n isLoading: boolean;\r\n organizationTypes: OrganizationType[];\r\n selectedOrganizationType: OrganizationType | null;\r\n workflowId: number;\r\n}\r\n\r\ntype IWorkflowOrganizationTypesProps = { appState: AppState } & ProviderContext &\r\n RouteComponentProps<{ id: string; workflowId: string }>;\r\n\r\nclass WorkflowOrganizationTypes extends React.PureComponent<\r\n IWorkflowOrganizationTypesProps,\r\n IWorkflowOrganizationTypesState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private organizationService!: IOrganizationService;\r\n private workflowService!: IWorkflowService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n workflowOrganizationTypes: [],\r\n isLoading: false,\r\n organizationTypes: [],\r\n selectedOrganizationType: null,\r\n workflowId: 0\r\n } as IWorkflowOrganizationTypesState;\r\n\r\n public componentDidMount() {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n const workflowId = Number.parseInt(this.props.match.params.workflowId);\r\n\r\n if (Number.isNaN(hoId) || Number.isNaN(workflowId)) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadWorkflowOrganizationTypes();\r\n }\r\n );\r\n }\r\n\r\n loadWorkflowOrganizationTypes = async () => {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n const workflowId = Number.parseInt(this.props.match.params.workflowId);\r\n\r\n if (Number.isNaN(hoId) || Number.isNaN(workflowId)) {\r\n return;\r\n }\r\n\r\n const ref = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.OrganizationType\r\n );\r\n const [orgTypes, workflowOrgTypes] = await Promise.all([\r\n this.appReferentialService.Get(ref!.baseUrl),\r\n this.workflowService.GetWorkflowOrganizationTypes(workflowId)\r\n ]);\r\n\r\n workflowOrgTypes.forEach((item) => {\r\n const type = orgTypes.find((orgType) => orgType.id === item.organizationTypeId);\r\n item.organizationType = isNullOrUndefined(type) ? null : type;\r\n });\r\n\r\n this.setState({\r\n workflowOrganizationTypes: workflowOrgTypes,\r\n organizationTypes: orgTypes.filter(\r\n (item) => item.isActive === true\r\n ) as any as OrganizationType[],\r\n isLoading: false,\r\n workflowId: workflowId\r\n });\r\n };\r\n\r\n deleteWorkflowOrgType = async (event: any, tableMeta: MUIDataTableMeta) => {\r\n try {\r\n const id = tableMeta.rowData[0];\r\n\r\n await this.workflowService.RemoveWorkflowOrganizationType(id);\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n () => {\r\n this.loadWorkflowOrganizationTypes();\r\n }\r\n );\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'organizationType',\r\n label: this.translatorService.Tranlate(\r\n 'WORKFLOW_ORGANIZATION_TYPE_TAB_ORG_TYPE_HEADER',\r\n 'Tip Organizatie'\r\n ),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: OrganizationType) => {\r\n return value.displayName;\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'dateModification',\r\n label: this.translatorService.Tranlate(\r\n 'WORKFLOW_ORGANIZATION_TYPE_TAB_DATE_MODIFICATION_HEADER',\r\n 'Data Modificare'\r\n ),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: Date) =>\r\n moment.utc(value).local().toDate().toLocaleString(this.props.appState.language)\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: '',\r\n options: {\r\n setCellHeaderProps: () => ({ align: 'center' }),\r\n setCellProps: () => ({ align: 'center' }),\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.deleteWorkflowOrgType(e, tableMeta)}\r\n >\r\n \r\n \r\n );\r\n }\r\n }\r\n }\r\n ];\r\n\r\n return columns;\r\n };\r\n\r\n addWorkflowOrgType = async () => {\r\n try {\r\n if (\r\n this.state.workflowOrganizationTypes.findIndex(\r\n (item) => item.organizationTypeId === this.state.selectedOrganizationType!.id\r\n ) !== -1\r\n ) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'ERROR_MSG_ORGANIZATION_TYPE_EXISTS',\r\n 'Tipul de organizatie exista deja!'\r\n ),\r\n { variant: 'error' }\r\n );\r\n return;\r\n }\r\n\r\n await this.workflowService.AddWorkflowOrganizationType({\r\n id: 0,\r\n organizationTypeId: this.state.selectedOrganizationType!.id,\r\n workflowId: this.state.workflowId\r\n } as WorkflowPartnerType);\r\n\r\n this.setState(\r\n {\r\n isLoading: true,\r\n selectedOrganizationType: null\r\n },\r\n () => {\r\n this.loadWorkflowOrganizationTypes();\r\n }\r\n );\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n handleOrganizationTypeChange = (newValue: OrganizationType | null) => {\r\n this.setState({ selectedOrganizationType: newValue });\r\n };\r\n\r\n renderAddForm() {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n this.handleOrganizationTypeChange(newValue)\r\n }\r\n getOptionLabel={(option: OrganizationType) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.workflowService = (this.context as AppContext).workflowService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n const options = {\r\n filter: false,\r\n search: false,\r\n viewColumns: false,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n elevation: 1\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.renderAddForm()}\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n ) : null}\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app\r\n }),\r\n null\r\n)(withSnackbar(WorkflowOrganizationTypes as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { Organization } from '../../../interfaces/Organization';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport { IOrganizationService } from '../../../services/Interfaces/IOrganizationService';\r\nimport { Box, Button, Card, CardContent, Tabs, Tab, Switch } from '@material-ui/core';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport MUIDataTable, {\r\n MUIDataTableColumnOptions,\r\n MUIDataTableMeta,\r\n SelectableRows\r\n} from 'mui-datatables';\r\nimport moment from 'moment';\r\nimport { MUITranslations } from '../../../helpers/MUITableTranslations';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ValidatorForm, TextValidator } from 'react-material-ui-form-validator';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport { WorkflowPartner } from '../../../interfaces/Workflow';\r\nimport { IWorkflowService } from '../../../services/Interfaces/IWorkflowService';\r\nimport { isNullOrUndefined } from 'util';\r\nimport _ from 'lodash';\r\nimport { RoleClaimsEnum, RoleCodeEnum } from '../../../helpers/Constants';\r\n\r\ninterface IWorkflowPartnersState {\r\n workflowPartners: WorkflowPartner[];\r\n isLoading: boolean;\r\n workflowOwnerList: Organization[];\r\n // selectedWorkflowOwner: Organization | null,\r\n workflowPartnerList: Organization[];\r\n selectedWorkflowPartner: Organization[];\r\n workflowId: number;\r\n}\r\n\r\ntype IWorkflowPartnersProps = { appState: AppState } & ProviderContext &\r\n RouteComponentProps<{ id: string; workflowId: string }>;\r\n\r\nclass WorkflowPartners extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private organizationService!: IOrganizationService;\r\n private workflowService!: IWorkflowService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n workflowPartners: [],\r\n isLoading: false,\r\n workflowOwnerList: [],\r\n // selectedWorkflowOwner: null,\r\n workflowPartnerList: [],\r\n selectedWorkflowPartner: [],\r\n workflowId: 0\r\n } as IWorkflowPartnersState;\r\n\r\n public componentDidMount() {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n const workflowId = Number.parseInt(this.props.match.params.workflowId);\r\n\r\n if (Number.isNaN(hoId) || Number.isNaN(workflowId)) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadWorkflowPartners();\r\n }\r\n );\r\n }\r\n \r\n public hasRole = (roleCode: string): boolean => {\r\n return this.props.appState.appUser?.userRole?.code === roleCode;\r\n };\r\n\r\n loadWorkflowPartners = async () => {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n const workflowId = Number.parseInt(this.props.match.params.workflowId);\r\n\r\n if (Number.isNaN(hoId) || Number.isNaN(workflowId)) {\r\n return;\r\n }\r\n\r\n const [workflowPartnersList, workflowOrgTypes, organizations] = await Promise.all([\r\n this.workflowService.GetWorkflowPartners(workflowId),\r\n this.workflowService.GetWorkflowOrganizationTypes(workflowId),\r\n this.organizationService.GetHOOrganizations(this.hasRight(RoleClaimsEnum.AdminCountryOrganization) ? this.props.appState.appUser!.countryId : null),\r\n ]);\r\n\r\n const workflowOwner = organizations.find((item) => item.id === hoId);\r\n\r\n //let workflowPartners = [] as Organization[];\r\n\r\n workflowPartnersList.forEach((wp) => {\r\n const partner = organizations.find((item) => item.id === wp.partnerId);\r\n\r\n wp.partner = isNullOrUndefined(partner) ? null : partner;\r\n });\r\n\r\n const partners = _.cloneDeep(organizations);\r\n if (\r\n !isNullOrUndefined(workflowOwner) &&\r\n isNullOrUndefined(partners.find((item) => item.id === workflowOwner!.id))\r\n ) {\r\n partners.push(workflowOwner);\r\n }\r\n\r\n this.setState({\r\n workflowPartners: workflowPartnersList,\r\n //workflowOwnerList: workflowOwners.filter(item => item.isActive === true),\r\n workflowPartnerList: partners.filter((item) => item.isActive === true),\r\n isLoading: false,\r\n workflowId: workflowId\r\n });\r\n };\r\n\r\n public hasRight = (right: string): boolean => {\r\n return this.props.appState!.user!.profile.role.includes(right);\r\n };\r\n\r\n handleIsActiveChange = async (\r\n event: React.ChangeEvent,\r\n tableMeta: MUIDataTableMeta\r\n ) => {\r\n const id = tableMeta.rowData[0];\r\n const workflowPartners = [...this.state.workflowPartners];\r\n const updatedWorkflowPartnerIndex = workflowPartners.findIndex((o) => o.id === id);\r\n\r\n if (updatedWorkflowPartnerIndex >= 0) {\r\n workflowPartners[updatedWorkflowPartnerIndex] = {\r\n ...workflowPartners[updatedWorkflowPartnerIndex],\r\n isActive: event.target.checked\r\n };\r\n\r\n try {\r\n await this.workflowService.UpdateWorkflowPartner(\r\n workflowPartners[updatedWorkflowPartnerIndex]\r\n );\r\n\r\n this.setState({ workflowPartners: workflowPartners });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n\r\n handleIsOwnerTariffChange = async (\r\n event: React.ChangeEvent,\r\n tableMeta: MUIDataTableMeta\r\n ) => {\r\n const id = tableMeta.rowData[0];\r\n const workflowPartners = [...this.state.workflowPartners];\r\n const updatedWorkflowPartnerIndex = workflowPartners.findIndex((o) => o.id === id);\r\n\r\n if (updatedWorkflowPartnerIndex >= 0) {\r\n workflowPartners[updatedWorkflowPartnerIndex] = {\r\n ...workflowPartners[updatedWorkflowPartnerIndex],\r\n isOwnerTariff: event.target.checked\r\n };\r\n\r\n try {\r\n await this.workflowService.UpdateWorkflowPartner(\r\n workflowPartners[updatedWorkflowPartnerIndex]\r\n );\r\n\r\n this.setState({ workflowPartners: workflowPartners });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n\r\n handleHideWorkflowChange = async (\r\n event: React.ChangeEvent,\r\n tableMeta: MUIDataTableMeta\r\n ) => {\r\n const id = tableMeta.rowData[0];\r\n const workflowPartners = [...this.state.workflowPartners];\r\n const updatedWorkflowPartnerIndex = workflowPartners.findIndex((o) => o.id === id);\r\n\r\n if (updatedWorkflowPartnerIndex >= 0) {\r\n workflowPartners[updatedWorkflowPartnerIndex] = {\r\n ...workflowPartners[updatedWorkflowPartnerIndex],\r\n hideWorkflow: event.target.checked\r\n };\r\n\r\n try {\r\n await this.workflowService.UpdateWorkflowPartner(\r\n workflowPartners[updatedWorkflowPartnerIndex]\r\n );\r\n\r\n this.setState({ workflowPartners: workflowPartners });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n\r\n\r\n\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n // {\r\n // name: \"owner\",\r\n // label: this.translatorService.Tranlate(\"WORKFLOW_PARTNERS_TAB_ENTITY_WORKFLOW_OWNER_HEADER\", \"Entitate Proprietar Flux\"),\r\n // options: {\r\n // sort: false,\r\n // customBodyRender: (value: Organization) => { return (value.displayName) }\r\n // } as MUIDataTableColumnOptions\r\n // },\r\n {\r\n name: 'partner',\r\n label: this.translatorService.Tranlate(\r\n 'WORKFLOW_PARTNERS_TAB_ENTITY_WORKFLOW_PARTNER_HEADER',\r\n 'Entitate Partener Flux'\r\n ),\r\n options: {\r\n filter: false,\r\n sort: false,\r\n customBodyRender: (value: Organization) => {\r\n return value.displayName;\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'dateModification',\r\n label: this.translatorService.Tranlate(\r\n 'WORKFLOW_PARTNERS_TAB_DATE_MODIFICATION_HEADER',\r\n 'Data Modificare'\r\n ),\r\n options: {\r\n filter: false,\r\n sort: false,\r\n customBodyRender: (value: Date) =>\r\n moment.utc(value).local().toDate().toLocaleString(this.props.appState.language)\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'isOwnerTariff',\r\n label: this.translatorService.Tranlate('WORKFLOW_PARTNERS_OWNER_TARIFF_HEADER', 'Proprietar Actualizare Tarif'),\r\n options: {\r\n sort: false,\r\n filterOptions: {\r\n names: [\r\n this.translatorService.Tranlate('TABLE_IS_ACTIVE_COLUMN_ACTIVE', 'Activ'),\r\n this.translatorService.Tranlate('TABLE_IS_ACTIVE_COLUMN_INACTIVE', 'Inactiv')\r\n ],\r\n logic(isActive: any, filterVal: string[]) {\r\n const show =\r\n (filterVal.indexOf(this.names[0]) !== -1 && isActive === true) ||\r\n (filterVal.indexOf(this.names[1]) !== -1 && isActive === false);\r\n return !show;\r\n }\r\n },\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.handleIsOwnerTariffChange(e, tableMeta)}\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'hideWorkflow',\r\n label: this.translatorService.Tranlate('WORKFLOW_PARTNERS_HIDE_WORKFLOW_HEADER', 'Ascunde posibilitate dosar nou'),\r\n options: {\r\n sort: false,\r\n filterOptions: {\r\n names: [\r\n this.translatorService.Tranlate('TABLE_IS_ACTIVE_COLUMN_ACTIVE', 'Activ'),\r\n this.translatorService.Tranlate('TABLE_IS_ACTIVE_COLUMN_INACTIVE', 'Inactiv')\r\n ],\r\n logic(viewWorkflow: any, filterVal: string[]) {\r\n const show =\r\n (filterVal.indexOf(this.names[0]) !== -1 && viewWorkflow === true) ||\r\n (filterVal.indexOf(this.names[1]) !== -1 && viewWorkflow === false);\r\n return !show;\r\n }\r\n },\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.handleHideWorkflowChange(e, tableMeta)}\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'isActive',\r\n label: this.translatorService.Tranlate('USERS_IS_ACTIVE_HEADER', 'Activ'),\r\n options: {\r\n sort: false,\r\n filterOptions: {\r\n names: [\r\n this.translatorService.Tranlate('TABLE_IS_ACTIVE_COLUMN_ACTIVE', 'Activ'),\r\n this.translatorService.Tranlate('TABLE_IS_ACTIVE_COLUMN_INACTIVE', 'Inactiv')\r\n ],\r\n logic(isActive: any, filterVal: string[]) {\r\n const show =\r\n (filterVal.indexOf(this.names[0]) !== -1 && isActive === true) ||\r\n (filterVal.indexOf(this.names[1]) !== -1 && isActive === false);\r\n return !show;\r\n }\r\n },\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.handleIsActiveChange(e, tableMeta)}\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n );\r\n }\r\n }\r\n }\r\n ];\r\n\r\n return columns;\r\n };\r\n\r\n addWorkflowPartner = async () => {\r\n try {\r\n if (\r\n this.state.workflowPartners.findIndex(\r\n (item) =>\r\n this.state.selectedWorkflowPartner.findIndex((itemm) => itemm.id === item.partnerId) !==\r\n -1\r\n ) !== -1\r\n ) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('ERROR_MSG_PARTNER_EXISTS', 'Partenerul exista deja!'),\r\n { variant: 'error' }\r\n );\r\n return;\r\n }\r\n\r\n const workflowPartners = [];\r\n for (const partner of this.state.selectedWorkflowPartner) {\r\n workflowPartners.push({\r\n id: 0,\r\n workflowId: this.state.workflowId,\r\n // ownerId: this.state.selectedWorkflowOwner!.id,\r\n partnerId: partner!.id,\r\n partner: partner,\r\n isActive: true\r\n } as WorkflowPartner);\r\n }\r\n\r\n await this.workflowService.AddWorkflowPartner(workflowPartners);\r\n\r\n this.setState(\r\n {\r\n isLoading: true,\r\n //selectedWorkflowOwner: null,\r\n selectedWorkflowPartner: []\r\n },\r\n () => {\r\n this.loadWorkflowPartners();\r\n }\r\n );\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n // handleWorkflowOwnerChange = (newValue: Organization | null) => {\r\n // this.setState({ selectedWorkflowOwner: newValue });\r\n // }\r\n\r\n handleWorkflowPartnerChange = (newValue: any[]) => {\r\n this.setState({ selectedWorkflowPartner: newValue });\r\n };\r\n\r\n renderAddForm() {\r\n return (\r\n \r\n \r\n \r\n \r\n {/* this.handleWorkflowOwnerChange(newValue)}\r\n getOptionLabel={(option: Organization) => option.displayName || \"\"}\r\n renderInput={params => (\r\n \r\n )}\r\n /> */}\r\n\r\n this.handleWorkflowPartnerChange(newValue)}\r\n getOptionLabel={(option: Organization) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.workflowService = (this.context as AppContext).workflowService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n const options = {\r\n viewColumns: false,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n elevation: 1\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.renderAddForm()}\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n ) : null}\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app\r\n }),\r\n null\r\n)(withSnackbar(WorkflowPartners as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport { IOrganizationService } from '../../../services/Interfaces/IOrganizationService';\r\nimport {\r\n Box,\r\n Button,\r\n Card,\r\n CardContent,\r\n Tabs,\r\n Tab,\r\n Switch,\r\n Dialog,\r\n DialogTitle,\r\n Grid,\r\n Typography,\r\n IconButton,\r\n DialogContent\r\n} from '@material-ui/core';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport MUIDataTable, {\r\n MUIDataTableColumnOptions,\r\n MUIDataTableMeta,\r\n SelectableRows\r\n} from 'mui-datatables';\r\nimport moment from 'moment';\r\nimport { MUITranslations } from '../../../helpers/MUITableTranslations';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ValidatorForm, TextValidator } from 'react-material-ui-form-validator';\r\nimport Autocomplete, { createFilterOptions } from '@material-ui/lab/Autocomplete';\r\nimport { WorkflowPartner, WorkflowTariff } from '../../../interfaces/Workflow';\r\nimport { IWorkflowService } from '../../../services/Interfaces/IWorkflowService';\r\nimport { Tariff } from '../../../interfaces/Tariff';\r\nimport { ITariffService } from '../../../services/Interfaces/ITariffService';\r\nimport EditTariff from '../tariffs/EditTariff';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport { isNullOrUndefined } from 'util';\r\n\r\ninterface IWorkflowTariffsState {\r\n workflowTariffs: WorkflowTariff[];\r\n isLoading: boolean;\r\n workflowPartnerList: WorkflowPartner[];\r\n selectedWorkflowPartner: WorkflowPartner | null;\r\n tariffList: Tariff[];\r\n selectedTariff: Tariff | null;\r\n workflowId: number;\r\n isOpenDialog: boolean;\r\n selectedTariffId: number;\r\n}\r\n\r\ntype IWorkflowTariffsProps = { appState: AppState } & ProviderContext &\r\n RouteComponentProps<{ id: string; workflowId: string }>;\r\n\r\nclass WorkflowTariffs extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private organizationService!: IOrganizationService;\r\n private workflowService!: IWorkflowService;\r\n private tariffService!: ITariffService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n workflowTariffs: [],\r\n isLoading: false,\r\n workflowPartnerList: [],\r\n selectedWorkflowPartner: null,\r\n tariffList: [],\r\n selectedTariff: null,\r\n workflowId: 0,\r\n isOpenDialog: false,\r\n selectedTariffId: 0\r\n } as IWorkflowTariffsState;\r\n\r\n public componentDidMount() {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n const workflowId = Number.parseInt(this.props.match.params.workflowId);\r\n\r\n if (Number.isNaN(hoId) || Number.isNaN(workflowId)) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadWorkflowTariffs();\r\n }\r\n );\r\n }\r\n\r\n loadWorkflowTariffs = async () => {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n const workflowId = Number.parseInt(this.props.match.params.workflowId);\r\n\r\n if (Number.isNaN(hoId) || Number.isNaN(workflowId)) {\r\n return;\r\n }\r\n\r\n const [tariffList, workflowTariffs, workflowPartnerList] = await Promise.all([\r\n this.tariffService.GetTariffs(hoId),\r\n this.workflowService.GetWorkflowTariffs(workflowId),\r\n this.workflowService.GetWorkflowPartners(workflowId)\r\n ]);\r\n\r\n const orgPartners = await this.organizationService.GetOrganizationsByIds(\r\n workflowPartnerList.map((item) => item.partnerId)\r\n );\r\n\r\n workflowPartnerList.forEach((wpItem) => {\r\n const part = orgPartners.find((item) => item.id === wpItem.partnerId);\r\n wpItem.partner = isNullOrUndefined(part) ? null : part;\r\n });\r\n\r\n workflowTariffs.forEach((wt) => {\r\n const tariff = tariffList.find((t) => t.id === wt.tariffId);\r\n wt.tariff = isNullOrUndefined(tariff) ? null : tariff;\r\n });\r\n\r\n this.setState({\r\n workflowTariffs: workflowTariffs,\r\n workflowPartnerList: workflowPartnerList.filter((item) => item.isActive === true),\r\n isLoading: false,\r\n workflowId: workflowId\r\n });\r\n };\r\n\r\n reloadWorkflowTariffs = async (workflowPartnerId: number | null) => {\r\n let [tariffList, workflowTariffs] = await Promise.all([\r\n this.tariffService.GetTariffs(Number.parseInt(this.props.match.params.id)),\r\n this.workflowService.GetWorkflowTariffs(this.state.workflowId)\r\n ]);\r\n\r\n const organizations = await this.organizationService.GetOrganizationsByIds(\r\n tariffList.map((item) => item.partnerId)\r\n );\r\n tariffList.forEach((tariff) => {\r\n const part = organizations.find((t) => t.id === tariff.partnerId);\r\n tariff.partner = isNullOrUndefined(part) ? null : part;\r\n });\r\n workflowTariffs.forEach((wt) => {\r\n const tariff = tariffList.find((t) => t.id === wt.tariffId);\r\n wt.tariff = isNullOrUndefined(tariff) ? null : tariff;\r\n });\r\n\r\n if (workflowPartnerId !== null) {\r\n workflowTariffs = workflowTariffs.filter(\r\n (item: WorkflowTariff) =>\r\n item.tariff !== null &&\r\n (item.tariff!.partner!.hoId === workflowPartnerId ||\r\n item.tariff!.partnerId === workflowPartnerId)\r\n );\r\n }\r\n tariffList =\r\n workflowPartnerId === null\r\n ? []\r\n : tariffList.filter(\r\n (item: Tariff) =>\r\n item.partner!.hoId === workflowPartnerId || item.partnerId === workflowPartnerId\r\n );\r\n\r\n this.setState({\r\n tariffList: tariffList.filter((item) => item.isActive === true),\r\n workflowTariffs: workflowTariffs,\r\n isLoading: false\r\n });\r\n };\r\n\r\n handleIsActiveChange = async (\r\n event: React.ChangeEvent,\r\n tableMeta: MUIDataTableMeta\r\n ) => {\r\n const id = tableMeta.rowData[0];\r\n const workflowTariffs = [...this.state.workflowTariffs];\r\n const updatedWorkflowTariffIndex = workflowTariffs.findIndex((o) => o.id === id);\r\n\r\n if (updatedWorkflowTariffIndex >= 0) {\r\n workflowTariffs[updatedWorkflowTariffIndex] = {\r\n ...workflowTariffs[updatedWorkflowTariffIndex],\r\n isActive: event.target.checked\r\n };\r\n\r\n try {\r\n await this.workflowService.UpdateWorkflowTariff(\r\n workflowTariffs[updatedWorkflowTariffIndex]\r\n );\r\n\r\n this.setState({ workflowTariffs: workflowTariffs });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n\r\n editTariff = (id: number) => {\r\n this.setState({ isOpenDialog: true, selectedTariffId: id });\r\n };\r\n\r\n onRowClick = (e: any, id: number) => {\r\n this.editTariff(id);\r\n };\r\n\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'tariff',\r\n label: this.translatorService.Tranlate('WORKFLOW_TARIFFS_TAB_TARIFF_HEADER', 'Tarif'),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: Tariff) => {\r\n return (\r\n this.onRowClick(e, value.id)}\r\n >\r\n {value.name}\r\n \r\n );\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n // {\r\n // name: \"workflowPartner\",\r\n // label: this.translatorService.Tranlate(\"WORKFLOW_TARIFFS_TAB_WORKFLOW_PARTNER_HEADER\", \"Partener\"),\r\n // options: {\r\n // sort: false,\r\n // customBodyRender: (value: WorkflowPartner) => { return (value.workflowPartner!.name) }\r\n // } as MUIDataTableColumnOptions\r\n // },\r\n {\r\n name: 'dateModification',\r\n label: this.translatorService.Tranlate(\r\n 'WORKFLOW_TARIFFS_TAB_DATE_MODIFICATION_HEADER',\r\n 'Data Modificare'\r\n ),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: Date) =>\r\n moment.utc(value).local().toDate().toLocaleString(this.props.appState.language)\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'isActive',\r\n label: this.translatorService.Tranlate('USERS_IS_ACTIVE_HEADER', 'Activ'),\r\n options: {\r\n sort: false,\r\n filterOptions: {\r\n names: [\r\n this.translatorService.Tranlate('TABLE_IS_ACTIVE_COLUMN_ACTIVE', 'Activ'),\r\n this.translatorService.Tranlate('TABLE_IS_ACTIVE_COLUMN_INACTIVE', 'Inactiv')\r\n ],\r\n logic(isActive: any, filterVal: string[]) {\r\n const show =\r\n (filterVal.indexOf(this.names[0]) !== -1 && isActive === true) ||\r\n (filterVal.indexOf(this.names[1]) !== -1 && isActive === false);\r\n return !show;\r\n }\r\n },\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.handleIsActiveChange(e, tableMeta)}\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n );\r\n }\r\n }\r\n }\r\n ];\r\n\r\n return columns;\r\n };\r\n\r\n addTariff = async () => {\r\n try {\r\n if (\r\n this.state.workflowTariffs.findIndex(\r\n (item) =>\r\n item.workflowPartnerId === this.state.selectedWorkflowPartner!.id ||\r\n item.tariffId === this.state.selectedTariff!.id\r\n ) !== -1\r\n ) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'ERROR_MSG_WORKFLOW_TARIFF_EXISTS',\r\n 'Tariful exista deja!'\r\n ),\r\n { variant: 'error' }\r\n );\r\n return;\r\n }\r\n\r\n await this.workflowService.AddWorkflowTariff({\r\n // workflowPartnerId: this.state.selectedWorkflowPartner!.id,\r\n tariffId: this.state.selectedTariff!.id,\r\n workflowId: this.state.workflowId,\r\n isActive: true,\r\n id: 0\r\n } as WorkflowTariff);\r\n\r\n this.setState(\r\n {\r\n isLoading: true,\r\n selectedTariff: null\r\n },\r\n async () => {\r\n await this.reloadWorkflowTariffs(this.state.selectedWorkflowPartner!.partnerId);\r\n }\r\n );\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n handleWorkflowPartnerChange = (newValue: WorkflowPartner | null) => {\r\n this.setState({ selectedWorkflowPartner: newValue }, () => {\r\n this.reloadWorkflowTariffs(newValue === null ? null : newValue.partnerId);\r\n });\r\n };\r\n\r\n handleWorkflowTariffChange = (newValue: Tariff | null) => {\r\n this.setState({ selectedTariff: newValue });\r\n };\r\n\r\n renderAddForm() {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n this.handleWorkflowPartnerChange(newValue)\r\n }\r\n getOptionLabel={(option: WorkflowPartner) => option.partner!.displayName || ''}\r\n filterOptions={createFilterOptions({\r\n matchFrom: 'any',\r\n stringify: (option: WorkflowPartner) => option.partner!.displayName\r\n })}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n \r\n this.handleWorkflowTariffChange(newValue)\r\n }\r\n getOptionLabel={(option: Tariff) => option.name || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n\r\n handleClose = (reload: boolean) => {\r\n if (reload) {\r\n this.setState({ isOpenDialog: false }, async () => {\r\n await this.reloadWorkflowTariffs(this.state.selectedWorkflowPartner!.partnerId);\r\n });\r\n } else {\r\n this.setState({ isOpenDialog: false });\r\n }\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.tariffService = (this.context as AppContext).tariffService;\r\n this.workflowService = (this.context as AppContext).workflowService;\r\n\r\n const options = {\r\n filter: false,\r\n search: false,\r\n viewColumns: false,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n elevation: 1\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.renderAddForm()}\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n ) : null}\r\n
\r\n\r\n \r\n \r\n \r\n \r\n \r\n {this.translatorService.Tranlate('TARIFFS_EDIT_MODAL_TITLE', 'Editare Tarif')}\r\n \r\n \r\n \r\n this.handleClose(false)}\r\n size={'small'}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n this.handleClose(true)}\r\n />\r\n \r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app\r\n }),\r\n null\r\n)(withSnackbar(WorkflowTariffs as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport { Box, Button, IconButton, Card, CardContent, Switch, Dialog } from '@material-ui/core';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport MUIDataTable, {\r\n MUIDataTableColumnOptions,\r\n MUIDataTableMeta,\r\n SelectableRows\r\n} from 'mui-datatables';\r\nimport moment from 'moment';\r\nimport { MUITranslations } from '../../../helpers/MUITableTranslations';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { IReferential } from '../../../interfaces/IReferential';\r\nimport { ValidatorForm, TextValidator } from 'react-material-ui-form-validator';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport Referentials from '../../../helpers/Referentials.json';\r\nimport { ReferentialCode } from '../../../helpers/Constants';\r\nimport DeleteOutlineTwoToneIcon from '@material-ui/icons/DeleteOutlineTwoTone';\r\nimport KeyboardArrowDownIcon from '@material-ui/icons/KeyboardArrowDown';\r\nimport KeyboardArrowUpIcon from '@material-ui/icons/KeyboardArrowUp';\r\nimport { WorkflowSection } from '../../../interfaces/Workflow';\r\nimport { IWorkflowService } from '../../../services/Interfaces/IWorkflowService';\r\n\r\ninterface IWorkflowSection {\r\n workflowSections: WorkflowSection[];\r\n isLoading: boolean;\r\n workflowSectionTypes: IReferential[];\r\n selectedWorkflowSectionType: IReferential | null;\r\n workflowId: number;\r\n isDialogOpen: boolean;\r\n workflowSectionId: number | null;\r\n}\r\n\r\ntype IWorkflowSectionProps = { appState: AppState } & ProviderContext &\r\n RouteComponentProps<{ id: string; workflowId: string }>;\r\n\r\nclass WorkflowCaseStructureSectionTab extends React.PureComponent<\r\n IWorkflowSectionProps,\r\n IWorkflowSection\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private workflowService!: IWorkflowService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n workflowSections: [],\r\n isLoading: false,\r\n workflowSectionTypes: [],\r\n selectedWorkflowSectionType: null,\r\n workflowId: 0,\r\n isDialogOpen: false,\r\n workflowSectionId: null\r\n } as IWorkflowSection;\r\n\r\n public componentDidMount() {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n const workflowId = Number.parseInt(this.props.match.params.workflowId);\r\n\r\n if (Number.isNaN(hoId) || Number.isNaN(workflowId)) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadWorkflowSections();\r\n }\r\n );\r\n }\r\n\r\n loadWorkflowSections = async () => {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n const workflowId = Number.parseInt(this.props.match.params.workflowId);\r\n\r\n if (Number.isNaN(hoId) || Number.isNaN(workflowId)) {\r\n return;\r\n }\r\n\r\n const ref = Referentials.referential.find((item) => item.code === ReferentialCode.Section);\r\n\r\n const [workflowSectionList, sections] = await Promise.all([\r\n this.workflowService.GetWorkflowSections(workflowId),\r\n this.appReferentialService.Get(ref!.baseUrl)\r\n ]);\r\n\r\n const workflowSections = workflowSectionList.sort(function (a, b) {\r\n return a.order - b.order;\r\n });\r\n\r\n this.setState({\r\n workflowSections: workflowSections,\r\n workflowSectionTypes: sections, //.filter(item => item.isActive === true),\r\n isLoading: false,\r\n workflowId: workflowId\r\n });\r\n };\r\n\r\n moveUp = async (event: any, tableMeta: MUIDataTableMeta) => {\r\n const id = tableMeta.rowData[0];\r\n const cloneArray = [...this.state.workflowSections];\r\n const itemToMoveUpIndex = cloneArray.findIndex((item) => item.id === id);\r\n\r\n if (itemToMoveUpIndex === -1) {\r\n return;\r\n }\r\n if (cloneArray[itemToMoveUpIndex].order === 1) {\r\n return;\r\n }\r\n\r\n const itemToMoveDownIndex = cloneArray.findIndex(\r\n (item) => item.order === cloneArray[itemToMoveUpIndex].order - 1\r\n );\r\n\r\n cloneArray[itemToMoveUpIndex] = {\r\n ...cloneArray[itemToMoveUpIndex],\r\n order: cloneArray[itemToMoveUpIndex].order - 1\r\n };\r\n cloneArray[itemToMoveDownIndex] = {\r\n ...cloneArray[itemToMoveDownIndex],\r\n order: cloneArray[itemToMoveDownIndex].order + 1\r\n };\r\n\r\n try {\r\n await this.workflowService.UpdateWorkflowSection(cloneArray[itemToMoveUpIndex]);\r\n await this.workflowService.UpdateWorkflowSection(cloneArray[itemToMoveDownIndex]);\r\n\r\n this.setState({\r\n workflowSections: cloneArray.sort(function (a, b) {\r\n return a.order - b.order;\r\n })\r\n });\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n moveDown = async (event: any, tableMeta: MUIDataTableMeta) => {\r\n const id = tableMeta.rowData[0];\r\n const cloneArray = [...this.state.workflowSections];\r\n const itemToMoveIndex = cloneArray.findIndex((item) => item.id === id);\r\n\r\n if (itemToMoveIndex === -1) {\r\n return;\r\n }\r\n if (cloneArray[itemToMoveIndex].order === cloneArray.length) {\r\n return;\r\n }\r\n\r\n const itemToMoveToIndex = cloneArray.findIndex(\r\n (item) => item.order === cloneArray[itemToMoveIndex].order + 1\r\n );\r\n\r\n cloneArray[itemToMoveIndex] = {\r\n ...cloneArray[itemToMoveIndex],\r\n order: cloneArray[itemToMoveIndex].order + 1\r\n };\r\n cloneArray[itemToMoveToIndex] = {\r\n ...cloneArray[itemToMoveToIndex],\r\n order: cloneArray[itemToMoveToIndex].order - 1\r\n };\r\n\r\n try {\r\n await this.workflowService.UpdateWorkflowSection(cloneArray[itemToMoveIndex]);\r\n await this.workflowService.UpdateWorkflowSection(cloneArray[itemToMoveToIndex]);\r\n\r\n this.setState({\r\n workflowSections: cloneArray.sort(function (a, b) {\r\n return a.order - b.order;\r\n })\r\n });\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n handleIsActiveChange = async (\r\n event: React.ChangeEvent,\r\n tableMeta: MUIDataTableMeta\r\n ) => {\r\n const id = tableMeta.rowData[0];\r\n const workflowSections = [...this.state.workflowSections];\r\n const updatedWorkflowSectionIndex = workflowSections.findIndex((o) => o.id === id);\r\n\r\n if (updatedWorkflowSectionIndex >= 0) {\r\n workflowSections[updatedWorkflowSectionIndex] = {\r\n ...workflowSections[updatedWorkflowSectionIndex],\r\n isActive: event.target.checked\r\n };\r\n\r\n try {\r\n await this.workflowService.UpdateWorkflowSection(\r\n workflowSections[updatedWorkflowSectionIndex]\r\n );\r\n\r\n this.setState({ workflowSections: workflowSections });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'section',\r\n label: this.translatorService.Tranlate(\r\n 'WORKFLOWS_TAB_CASE_STRUCTURE_TAB_SECTION_SECTION_HEADER',\r\n 'Sectiune Dosar'\r\n ),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: any) => {\r\n return value.displayName;\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'dateModification',\r\n label: this.translatorService.Tranlate(\r\n 'WORKFLOWS_TAB_CASE_STRUCTURE_TAB_SECTION_DATE_MODIFICATION_HEADER',\r\n 'Data Modificare'\r\n ),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: Date) =>\r\n moment.utc(value).local().format(this.props.appState.longDateFormat)\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'order',\r\n sortDirection: 'asc',\r\n label: this.translatorService.Tranlate(\r\n 'WORKFLOWS_TAB_CASE_STRUCTURE_TAB_SECTION_CASE_ORDER_HEADER',\r\n 'Ord'\r\n ),\r\n options: { sort: false }\r\n },\r\n {\r\n name: '',\r\n options: {\r\n setCellHeaderProps: () => ({ align: 'center' }),\r\n setCellProps: () => ({ align: 'center' }),\r\n sortOrder: {\r\n name: 'order',\r\n direction: 'asc'\r\n },\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n \r\n this.moveUp(e, tableMeta)}>\r\n \r\n \r\n this.moveDown(e, tableMeta)}\r\n >\r\n \r\n \r\n \r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'isActive',\r\n label: this.translatorService.Tranlate('USERS_IS_ACTIVE_HEADER', 'Activ'),\r\n options: {\r\n sort: false,\r\n filterOptions: {\r\n names: [\r\n this.translatorService.Tranlate('TABLE_IS_ACTIVE_COLUMN_ACTIVE', 'Activ'),\r\n this.translatorService.Tranlate('TABLE_IS_ACTIVE_COLUMN_INACTIVE', 'Inactiv')\r\n ],\r\n logic(isActive: any, filterVal: string[]) {\r\n const show =\r\n (filterVal.indexOf(this.names[0]) !== -1 && isActive === true) ||\r\n (filterVal.indexOf(this.names[1]) !== -1 && isActive === false);\r\n return !show;\r\n }\r\n },\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.handleIsActiveChange(e, tableMeta)}\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: '',\r\n options: {\r\n setCellHeaderProps: () => ({ align: 'center' }),\r\n setCellProps: () => ({ align: 'center' }),\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n \r\n this.setState({ isDialogOpen: true, workflowSectionId: tableMeta.rowData[0] })\r\n }\r\n >\r\n \r\n \r\n );\r\n }\r\n }\r\n }\r\n ];\r\n\r\n return columns;\r\n };\r\n\r\n addOrgCase = async () => {\r\n try {\r\n await this.workflowService.AddWorkflowSection({\r\n order: this.state.workflowSections.length + 1,\r\n sectionId: this.state.selectedWorkflowSectionType!.id,\r\n workflowId: this.state.workflowId,\r\n isActive: true\r\n } as WorkflowSection);\r\n\r\n this.setState(\r\n {\r\n isLoading: true,\r\n selectedWorkflowSectionType: null\r\n },\r\n () => {\r\n this.loadWorkflowSections();\r\n }\r\n );\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n handleAutocompleteChange = (newValue: any | null) => {\r\n this.setState({ selectedWorkflowSectionType: newValue });\r\n };\r\n\r\n public renderAddForm() {\r\n return (\r\n \r\n \r\n \r\n \r\n this.handleAutocompleteChange(newValue)}\r\n getOptionLabel={(option: any) => option.displayName}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n\r\n closeDialog = async () => {\r\n this.setState({ isDialogOpen: false });\r\n };\r\n\r\n deleteWorkflowSection = async () => {\r\n try {\r\n await this.workflowService.RemoveWorkflowSection(this.state.workflowSectionId!);\r\n await this.loadWorkflowSections();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.workflowService = (this.context as AppContext).workflowService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n const options = {\r\n filter: false,\r\n search: false,\r\n viewColumns: false,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n elevation: 1\r\n };\r\n\r\n return (\r\n \r\n {this.renderAddForm()}\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n ) : null}\r\n
\r\n\r\n \r\n
\r\n

\r\n {this.translatorService.Tranlate(\r\n 'DELETE_TEXT',\r\n 'Sigur doriti sa stergeti aceasta inregistrare?'\r\n )}\r\n

\r\n
\r\n \r\n \r\n {this.translatorService.Tranlate('CANCEL', 'Anuleaza')}\r\n \r\n \r\n {\r\n this.setState(\r\n { isDialogOpen: false },\r\n async () => await this.deleteWorkflowSection()\r\n );\r\n }}\r\n color=\"primary\"\r\n variant=\"contained\"\r\n className=\"mx-1\"\r\n >\r\n \r\n {this.translatorService.Tranlate('DELETE', 'Sterge')}\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app\r\n }),\r\n null\r\n)(withSnackbar(WorkflowCaseStructureSectionTab as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { ITranslatorService } from '../../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../../context/Contexts';\r\nimport { IOrganizationService } from '../../../../services/Interfaces/IOrganizationService';\r\nimport { Box, Button, Card, CardContent, IconButton } from '@material-ui/core';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport MUIDataTable, {\r\n MUIDataTableColumnOptions,\r\n MUIDataTableMeta,\r\n SelectableRows\r\n} from 'mui-datatables';\r\nimport moment from 'moment';\r\nimport { MUITranslations } from '../../../../helpers/MUITableTranslations';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ValidatorForm, TextValidator } from 'react-material-ui-form-validator';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport { IReferentialService } from '../../../../services/Interfaces/IReferentialService';\r\nimport Referentials from '../../../../helpers/Referentials.json';\r\nimport { ReferentialCode } from '../../../../helpers/Constants';\r\nimport { WorkflowSectionStepCaseStatus } from '../../../../interfaces/Workflow';\r\nimport { IWorkflowService } from '../../../../services/Interfaces/IWorkflowService';\r\nimport { IReferential } from '../../../../interfaces/IReferential';\r\nimport DeleteOutlineTwoToneIcon from '@material-ui/icons/DeleteOutlineTwoTone';\r\nimport { isNullOrUndefined } from 'util';\r\n\r\ninterface IWorkflowStepStatusesState {\r\n workflowSectionStepCaseStatusList: WorkflowSectionStepCaseStatus[];\r\n isLoading: boolean;\r\n\r\n caseStatusTypeList: IReferential[];\r\n selectedCaseStatusType: IReferential | null;\r\n}\r\nexport interface ExternalWorkflowStepStatusesProps {\r\n workflowSectionStepId: number;\r\n}\r\n\r\ntype IWorkflowStepStatusesProps = ExternalWorkflowStepStatusesProps & {\r\n appState: AppState;\r\n} & ProviderContext &\r\n RouteComponentProps<{ id: string; workflowId: string }>;\r\n\r\nclass WorkflowStepStatuses extends React.PureComponent<\r\n IWorkflowStepStatusesProps,\r\n IWorkflowStepStatusesState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private organizationService!: IOrganizationService;\r\n private workflowService!: IWorkflowService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n workflowSectionStepCaseStatusList: [],\r\n isLoading: false,\r\n\r\n caseStatusTypeList: [],\r\n selectedCaseStatusType: null,\r\n workflowSectionStepList: [],\r\n selectedUserRole: null,\r\n userRoles: []\r\n // workflowId: 0\r\n } as IWorkflowStepStatusesState;\r\n\r\n public componentDidMount() {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n const workflowId = Number.parseInt(this.props.match.params.workflowId);\r\n\r\n if (Number.isNaN(hoId) || Number.isNaN(workflowId)) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadWorkflowSectionStepStatuses();\r\n }\r\n );\r\n }\r\n\r\n loadWorkflowSectionStepStatuses = async () => {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n const workflowId = Number.parseInt(this.props.match.params.workflowId);\r\n\r\n if (Number.isNaN(hoId) || Number.isNaN(workflowId)) {\r\n return;\r\n }\r\n\r\n const ref = Referentials.referential.find((item) => item.code === ReferentialCode.CaseStatus);\r\n\r\n const [workflowSectionStepStatusList, caseStatusTypes] = await Promise.all([\r\n this.workflowService.GetWorkflowSectionStepCaseStatuses(this.props.workflowSectionStepId),\r\n this.appReferentialService.Get(ref!.baseUrl)\r\n ]);\r\n\r\n workflowSectionStepStatusList.forEach((wpItem) => {\r\n const caseStatus = caseStatusTypes.find((item) => item.id === wpItem.caseStatusId);\r\n wpItem.caseStatus = isNullOrUndefined(caseStatus) ? null : caseStatus;\r\n });\r\n this.setState({\r\n workflowSectionStepCaseStatusList: workflowSectionStepStatusList,\r\n caseStatusTypeList: caseStatusTypes.filter((item) => item.isActive === true),\r\n isLoading: false\r\n });\r\n };\r\n\r\n deleteWorkflowSectionStepStatus = async (event: any, tableMeta: MUIDataTableMeta) => {\r\n try {\r\n const index = this.state.workflowSectionStepCaseStatusList.findIndex(\r\n (i) => i.id === tableMeta.rowData[0]\r\n );\r\n const deletedStatus = this.state.workflowSectionStepCaseStatusList[index];\r\n const newStatusesArray = [...this.state.workflowSectionStepCaseStatusList];\r\n newStatusesArray.splice(index, 1);\r\n\r\n await this.workflowService.RemoveWorkflowSectionStepCaseStatus(deletedStatus.id);\r\n\r\n this.setState({\r\n workflowSectionStepCaseStatusList: newStatusesArray\r\n });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n\r\n {\r\n name: 'caseStatus',\r\n label: this.translatorService.Tranlate(\r\n 'WORKFLOW_PERMISSION_TAB_CASE_STATUS_HEADER',\r\n 'Status Dosar'\r\n ),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: any) => {\r\n return value.displayName;\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n\r\n {\r\n name: 'dateModification',\r\n label: this.translatorService.Tranlate(\r\n 'WORKFLOW_PERMISSION_TAB_DATE_MODIFICATION_HEADER',\r\n 'Data Modificare'\r\n ),\r\n options: {\r\n filter: false,\r\n sort: false,\r\n customBodyRender: (value: Date) =>\r\n moment.utc(value).local().toDate().toLocaleString(this.props.appState.language)\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: '',\r\n options: {\r\n filter: false,\r\n setCellHeaderProps: () => ({ align: 'center' }),\r\n setCellProps: () => ({ align: 'center' }),\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.deleteWorkflowSectionStepStatus(e, tableMeta)}\r\n >\r\n \r\n \r\n );\r\n }\r\n }\r\n }\r\n ];\r\n\r\n return columns;\r\n };\r\n\r\n addStatus = async () => {\r\n try {\r\n if (\r\n this.state.workflowSectionStepCaseStatusList.findIndex(\r\n (item) => item.caseStatusId === this.state.selectedCaseStatusType!.id\r\n ) !== -1\r\n ) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'ERROR_MSG_WORKFLOW_PERMISSION_EXISTS',\r\n 'Permisiunea exista deja!'\r\n ),\r\n { variant: 'error' }\r\n );\r\n return;\r\n }\r\n await this.workflowService.AddWorkflowSectionStepCaseStatus({\r\n caseStatusId: this.state.selectedCaseStatusType!.id,\r\n workflowSectionStepId: this.props.workflowSectionStepId\r\n } as WorkflowSectionStepCaseStatus);\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n //selecteWorkflowSectionStepType : null,\r\n },\r\n () => {\r\n this.loadWorkflowSectionStepStatuses();\r\n }\r\n );\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n handleCaseStatusChange = async (newValue: any | null) => {\r\n this.setState({\r\n selectedCaseStatusType: newValue\r\n // workflowSectionStepList: await this.filterSectionSteps(this.state.workflowPermissions, this.state.selecteWorkflowPartnerType, newValue)\r\n });\r\n };\r\n\r\n renderAddForm() {\r\n return (\r\n \r\n \r\n \r\n \r\n this.handleCaseStatusChange(newValue)}\r\n getOptionLabel={(option: any) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.workflowService = (this.context as AppContext).workflowService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n const options = {\r\n filter: true,\r\n search: true,\r\n viewColumns: false,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n elevation: 1\r\n };\r\n\r\n return (\r\n \r\n {this.renderAddForm()}\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n ) : null}\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalWorkflowStepStatusesProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\nexport default connect(\r\n (state: ApplicationState) => ({ appState: state.app }),\r\n null,\r\n mergeProps\r\n)(withSnackbar(WorkflowStepStatuses as any));\r\n","import React, { Fragment } from 'react';\r\nimport {\r\n AppUserAdminActionCreators,\r\n ApplicationState,\r\n AppActionCreators,\r\n AppState\r\n} from '../../../../store';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport { Card, Tabs, Tab, CardContent } from '@material-ui/core';\r\nimport { ITranslatorService } from '../../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../../context/Contexts';\r\nimport { Language } from '../../../../interfaces/Organization';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport TabPanel from '../../../_shared/Tabs';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { WorkflowSectionStepForm } from '../../../../interfaces/Workflow';\r\nimport WorkflowStepStatuses from '../editWorkflowStep/EditWorkflowStepStatuses';\r\n\r\ninterface IEditWorkflowFormState {\r\n workflowForm: WorkflowSectionStepForm;\r\n selectedTab: number;\r\n languages: Language[];\r\n isLoading: boolean;\r\n}\r\n\r\nexport interface ExternalEditWorkflowStepProps {\r\n workflowStepChanged?: (close: boolean) => void;\r\n workflowStepId: number;\r\n}\r\n\r\ntype EditWorkflowStepProps = { appState: AppState } & ProviderContext &\r\n ExternalEditWorkflowStepProps &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass EditWorkflowStep extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n workflowForm: {} as WorkflowSectionStepForm,\r\n selectedTab: 0,\r\n languages: [],\r\n isLoading: true\r\n } as IEditWorkflowFormState;\r\n\r\n public async componentDidMount() {\r\n this.setState({ isLoading: false });\r\n }\r\n\r\n onTabChange = (event: any, newValue: number) => {\r\n this.setState({ selectedTab: newValue });\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n\r\n if (this.state.isLoading) {\r\n return (\r\n
\r\n \r\n
\r\n );\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalEditWorkflowStepProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({ appState: state.app }),\r\n { ...AppUserAdminActionCreators, ...AppActionCreators },\r\n mergeProps\r\n)(withSnackbar(EditWorkflowStep as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport { IOrganizationService } from '../../../services/Interfaces/IOrganizationService';\r\nimport {\r\n Box,\r\n Button,\r\n IconButton,\r\n Card,\r\n CardContent,\r\n Switch,\r\n Dialog,\r\n DialogContent,\r\n DialogTitle,\r\n Grid,\r\n Typography\r\n} from '@material-ui/core';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport MUIDataTable, {\r\n MUIDataTableColumnOptions,\r\n MUIDataTableMeta,\r\n SelectableRows\r\n} from 'mui-datatables';\r\nimport moment from 'moment';\r\nimport { MUITranslations } from '../../../helpers/MUITableTranslations';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { IReferential } from '../../../interfaces/IReferential';\r\nimport { ValidatorForm, TextValidator } from 'react-material-ui-form-validator';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport Referentials from '../../../helpers/Referentials.json';\r\nimport { ReferentialCode } from '../../../helpers/Constants';\r\nimport DeleteOutlineTwoToneIcon from '@material-ui/icons/DeleteOutlineTwoTone';\r\nimport KeyboardArrowDownIcon from '@material-ui/icons/KeyboardArrowDown';\r\nimport KeyboardArrowUpIcon from '@material-ui/icons/KeyboardArrowUp';\r\nimport { WorkflowSectionStep, WorkflowSection } from '../../../interfaces/Workflow';\r\nimport { IWorkflowService } from '../../../services/Interfaces/IWorkflowService';\r\nimport EditWorkflowStep from './editWorkflowStep/EditWorkflowStep';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\n\r\ninterface IWorkflowSectionStepState {\r\n workflowSectionSteps: WorkflowSectionStep[];\r\n isLoading: boolean;\r\n workflowSectionTypes: WorkflowSection[];\r\n workflowSectionStepTypes: IReferential[];\r\n selectedworkflowSectionType: WorkflowSection | null;\r\n selectedworkflowSectionStepType: IReferential | null;\r\n workflowId: number;\r\n isDialogOpen: boolean;\r\n isEditDialogOpen: boolean;\r\n workflowSectionStepId: number | null;\r\n modalFormTitle: string;\r\n stepId: number;\r\n}\r\n\r\ntype IWorkflowSectionStepProps = { appState: AppState } & ProviderContext &\r\n RouteComponentProps<{ id: string; workflowId: string }>;\r\n\r\nclass WorkflowCaseStructureStepsTab extends React.PureComponent<\r\n IWorkflowSectionStepProps,\r\n IWorkflowSectionStepState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private organizationService!: IOrganizationService;\r\n private workflowService!: IWorkflowService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n workflowSectionSteps: [],\r\n isLoading: false,\r\n workflowSectionTypes: [],\r\n workflowSectionStepTypes: [],\r\n selectedworkflowSectionType: null,\r\n selectedworkflowSectionStepType: null,\r\n workflowId: 0,\r\n isDialogOpen: false,\r\n workflowSectionStepId: null,\r\n isEditDialogOpen: false,\r\n modalFormTitle: '',\r\n stepId: 0\r\n } as IWorkflowSectionStepState;\r\n\r\n public componentDidMount() {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n const workflowId = Number.parseInt(this.props.match.params.workflowId);\r\n\r\n if (Number.isNaN(hoId) || Number.isNaN(workflowId)) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadWorkflowSectionSteps(null);\r\n }\r\n );\r\n }\r\n\r\n loadWorkflowSectionSteps = async (sectionTypeId: number | null) => {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n const workflowId = Number.parseInt(this.props.match.params.workflowId);\r\n\r\n if (Number.isNaN(hoId) || Number.isNaN(workflowId)) {\r\n return;\r\n }\r\n const refSteps = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.WorkflowSteps\r\n );\r\n\r\n const [workflowSectionList, workflowSectionStepList, workflowSectionStepTypes] =\r\n await Promise.all([\r\n this.workflowService.GetWorkflowSections(workflowId),\r\n sectionTypeId === null ? [] : this.workflowService.GetWorkflowSectionSteps(sectionTypeId),\r\n this.appReferentialService.Get(refSteps!.baseUrl)\r\n ]);\r\n\r\n this.setState({\r\n workflowSectionSteps: workflowSectionStepList.sort(function (a, b) {\r\n return a.order - b.order;\r\n }),\r\n workflowSectionTypes: workflowSectionList.sort(function (a, b) {\r\n return a.order - b.order;\r\n }),\r\n workflowSectionStepTypes: workflowSectionStepTypes.filter((item) => item.isActive === true),\r\n isLoading: false,\r\n workflowId: workflowId\r\n });\r\n };\r\n\r\n reloadWorkflowSectionSteps = async (sectionTypeId: number | null) => {\r\n const [workflowSectionStepList] = await Promise.all([\r\n sectionTypeId === null ? [] : this.workflowService.GetWorkflowSectionSteps(sectionTypeId)\r\n ]);\r\n\r\n this.setState({\r\n workflowSectionSteps: workflowSectionStepList.sort(function (a, b) {\r\n return a.order - b.order;\r\n }),\r\n isLoading: false\r\n });\r\n };\r\n\r\n moveUp = async (event: any, tableMeta: MUIDataTableMeta) => {\r\n const id = tableMeta.rowData[0];\r\n const cloneArray = [...this.state.workflowSectionSteps];\r\n const itemToMoveUpIndex = cloneArray.findIndex((item) => item.id === id);\r\n\r\n if (itemToMoveUpIndex === -1) {\r\n return;\r\n }\r\n if (cloneArray[itemToMoveUpIndex].order === 1) {\r\n return;\r\n }\r\n\r\n const itemToMoveDownIndex = cloneArray.findIndex(\r\n (item) => item.order === cloneArray[itemToMoveUpIndex].order - 1\r\n );\r\n\r\n cloneArray[itemToMoveUpIndex] = {\r\n ...cloneArray[itemToMoveUpIndex],\r\n order: cloneArray[itemToMoveUpIndex].order - 1\r\n };\r\n cloneArray[itemToMoveDownIndex] = {\r\n ...cloneArray[itemToMoveDownIndex],\r\n order: cloneArray[itemToMoveDownIndex].order + 1\r\n };\r\n\r\n try {\r\n await this.workflowService.UpdateWorkflowSectionStep(cloneArray[itemToMoveUpIndex]);\r\n await this.workflowService.UpdateWorkflowSectionStep(cloneArray[itemToMoveDownIndex]);\r\n\r\n this.setState({\r\n workflowSectionSteps: cloneArray.sort(function (a, b) {\r\n return a.order - b.order;\r\n })\r\n });\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n moveDown = async (event: any, tableMeta: MUIDataTableMeta) => {\r\n const id = tableMeta.rowData[0];\r\n const cloneArray = [...this.state.workflowSectionSteps];\r\n const itemToMoveIndex = cloneArray.findIndex((item) => item.id === id);\r\n\r\n if (itemToMoveIndex === -1) {\r\n return;\r\n }\r\n if (cloneArray[itemToMoveIndex].order === cloneArray.length) {\r\n return;\r\n }\r\n\r\n const itemToMoveToIndex = cloneArray.findIndex(\r\n (item) => item.order === cloneArray[itemToMoveIndex].order + 1\r\n );\r\n\r\n cloneArray[itemToMoveIndex] = {\r\n ...cloneArray[itemToMoveIndex],\r\n order: cloneArray[itemToMoveIndex].order + 1\r\n };\r\n cloneArray[itemToMoveToIndex] = {\r\n ...cloneArray[itemToMoveToIndex],\r\n order: cloneArray[itemToMoveToIndex].order - 1\r\n };\r\n\r\n try {\r\n await this.workflowService.UpdateWorkflowSectionStep(cloneArray[itemToMoveIndex]);\r\n await this.workflowService.UpdateWorkflowSectionStep(cloneArray[itemToMoveToIndex]);\r\n\r\n this.setState({\r\n workflowSectionSteps: cloneArray.sort(function (a, b) {\r\n return a.order - b.order;\r\n })\r\n });\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n handleIsActiveChange = async (\r\n event: React.ChangeEvent,\r\n tableMeta: MUIDataTableMeta\r\n ) => {\r\n const id = tableMeta.rowData[0];\r\n const workflowSectionSteps = [...this.state.workflowSectionSteps];\r\n const updatedWorkflowSectionStepIndex = workflowSectionSteps.findIndex((o) => o.id === id);\r\n\r\n if (updatedWorkflowSectionStepIndex >= 0) {\r\n workflowSectionSteps[updatedWorkflowSectionStepIndex] = {\r\n ...workflowSectionSteps[updatedWorkflowSectionStepIndex],\r\n isActive: event.target.checked\r\n };\r\n\r\n try {\r\n await this.workflowService.UpdateWorkflowSectionStep(\r\n workflowSectionSteps[updatedWorkflowSectionStepIndex]\r\n );\r\n\r\n this.setState({ workflowSectionSteps: workflowSectionSteps });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n onRowClick = (e: any, id: number, stepName: any) => {\r\n this.setState({ isEditDialogOpen: true, stepId: id, modalFormTitle: stepName });\r\n };\r\n\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'workflowStep',\r\n label: this.translatorService.Tranlate(\r\n 'WORKFLOWS_TAB_CASE_STRUCTURE_TAB_STEP_STEP_HEADER',\r\n 'Pas'\r\n ),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: any, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.onRowClick(e, tableMeta.rowData[0], value.displayName)}\r\n >\r\n {value.displayName}\r\n \r\n );\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'dateModification',\r\n label: this.translatorService.Tranlate(\r\n 'WORKFLOWS_TAB_CASE_STRUCTURE_TAB_STEP_DATE_MODIFICATION_HEADER',\r\n 'Data Modificare'\r\n ),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: Date) =>\r\n moment.utc(value).local().format(this.props.appState.longDateFormat)\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'order',\r\n sortDirection: 'asc',\r\n label: this.translatorService.Tranlate(\r\n 'WORKFLOWS_TAB_CASE_STRUCTURE_TAB_STEP_STEP_ORDER_HEADER',\r\n 'Ord'\r\n ),\r\n options: { sort: false }\r\n },\r\n {\r\n name: '',\r\n options: {\r\n setCellHeaderProps: () => ({ align: 'center' }),\r\n setCellProps: () => ({ align: 'center' }),\r\n sortOrder: {\r\n name: 'order',\r\n direction: 'asc'\r\n },\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n \r\n this.moveUp(e, tableMeta)}>\r\n \r\n \r\n this.moveDown(e, tableMeta)}\r\n >\r\n \r\n \r\n \r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'isActive',\r\n label: this.translatorService.Tranlate('USERS_IS_ACTIVE_HEADER', 'Activ'),\r\n options: {\r\n sort: false,\r\n filterOptions: {\r\n names: [\r\n this.translatorService.Tranlate('TABLE_IS_ACTIVE_COLUMN_ACTIVE', 'Activ'),\r\n this.translatorService.Tranlate('TABLE_IS_ACTIVE_COLUMN_INACTIVE', 'Inactiv')\r\n ],\r\n logic(isActive: any, filterVal: string[]) {\r\n const show =\r\n (filterVal.indexOf(this.names[0]) !== -1 && isActive === true) ||\r\n (filterVal.indexOf(this.names[1]) !== -1 && isActive === false);\r\n return !show;\r\n }\r\n },\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.handleIsActiveChange(e, tableMeta)}\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: '',\r\n options: {\r\n setCellHeaderProps: () => ({ align: 'center' }),\r\n setCellProps: () => ({ align: 'center' }),\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n \r\n this.setState({ isDialogOpen: true, workflowSectionStepId: tableMeta.rowData[0] })\r\n }\r\n >\r\n \r\n \r\n );\r\n }\r\n }\r\n }\r\n ];\r\n\r\n return columns;\r\n };\r\n\r\n addOrgStep = async () => {\r\n try {\r\n await this.workflowService.AddWorkflowSectionStep({\r\n order: this.state.workflowSectionSteps.length + 1,\r\n stepId: this.state.selectedworkflowSectionStepType!.id,\r\n workflowSectionId: this.state.selectedworkflowSectionType!.id,\r\n isActive: true\r\n } as WorkflowSectionStep);\r\n\r\n this.setState(\r\n {\r\n isLoading: true,\r\n selectedworkflowSectionStepType: null\r\n },\r\n () => {\r\n this.reloadWorkflowSectionSteps(this.state.selectedworkflowSectionType!.id);\r\n }\r\n );\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n handleAutocompleteSectionChange = (newValue: any | null) => {\r\n this.setState(\r\n {\r\n selectedworkflowSectionType: newValue,\r\n isLoading: true\r\n },\r\n () => {\r\n this.reloadWorkflowSectionSteps(newValue === null ? null : newValue.id);\r\n }\r\n );\r\n };\r\n\r\n handleAutocompleteStepChange = (newValue: IReferential | null) => {\r\n this.setState({ selectedworkflowSectionStepType: newValue });\r\n };\r\n\r\n public renderAddForm() {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n this.handleAutocompleteSectionChange(newValue)\r\n }\r\n getOptionLabel={(option: WorkflowSection) => option.section!.displayName}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n \r\n this.handleAutocompleteStepChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n\r\n closeDialog = async () => {\r\n this.setState({ isDialogOpen: false });\r\n };\r\n\r\n deleteWorkflowSectionStep = async () => {\r\n try {\r\n await this.workflowService.RemoveWorkflowStep(this.state.workflowSectionStepId!);\r\n await this.reloadWorkflowSectionSteps(this.state.selectedworkflowSectionType!.id);\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n handleClose = (showForm: boolean) => {\r\n this.setState({ isEditDialogOpen: showForm }, async () => {\r\n await this.reloadWorkflowSectionSteps(this.state.selectedworkflowSectionType!.id);\r\n });\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.workflowService = (this.context as AppContext).workflowService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n const options = {\r\n filter: false,\r\n search: false,\r\n viewColumns: false,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n elevation: 1\r\n };\r\n\r\n return (\r\n \r\n {this.renderAddForm()}\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n ) : null}\r\n
\r\n \r\n
\r\n

\r\n {this.translatorService.Tranlate(\r\n 'DELETE_TEXT',\r\n 'Sigur doriti sa stergeti aceasta inregistrare?'\r\n )}\r\n

\r\n
\r\n \r\n \r\n {this.translatorService.Tranlate('CANCEL', 'Anuleaza')}\r\n \r\n \r\n {\r\n this.setState(\r\n { isDialogOpen: false },\r\n async () => await this.deleteWorkflowSectionStep()\r\n );\r\n }}\r\n color=\"primary\"\r\n variant=\"contained\"\r\n className=\"mx-1\"\r\n >\r\n \r\n {this.translatorService.Tranlate('DELETE', 'Sterge')}\r\n \r\n \r\n
\r\n
\r\n \r\n\r\n \r\n \r\n \r\n \r\n {this.state.modalFormTitle}\r\n \r\n \r\n this.handleClose(false)}\r\n size={'small'}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app\r\n }),\r\n null\r\n)(withSnackbar(WorkflowCaseStructureStepsTab as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { ITranslatorService } from '../../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../../context/Contexts';\r\nimport { IOrganizationService } from '../../../../services/Interfaces/IOrganizationService';\r\nimport { Box, Button, IconButton, Card, CardContent } from '@material-ui/core';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport MUIDataTable, {\r\n MUIDataTableColumnOptions,\r\n MUIDataTableMeta,\r\n SelectableRows\r\n} from 'mui-datatables';\r\nimport moment from 'moment';\r\nimport { MUITranslations } from '../../../../helpers/MUITableTranslations';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { IReferential } from '../../../../interfaces/IReferential';\r\nimport { ValidatorForm, TextValidator } from 'react-material-ui-form-validator';\r\nimport Autocomplete, { createFilterOptions } from '@material-ui/lab/Autocomplete';\r\nimport { IReferentialService } from '../../../../services/Interfaces/IReferentialService';\r\nimport Referentials from '../../../../helpers/Referentials.json';\r\nimport { ReferentialCode } from '../../../../helpers/Constants';\r\nimport DeleteOutlineTwoToneIcon from '@material-ui/icons/DeleteOutlineTwoTone';\r\nimport KeyboardArrowDownIcon from '@material-ui/icons/KeyboardArrowDown';\r\nimport KeyboardArrowUpIcon from '@material-ui/icons/KeyboardArrowUp';\r\nimport { WorkflowFormReport, WorkflowPartner } from '../../../../interfaces/Workflow';\r\nimport { IWorkflowService } from '../../../../services/Interfaces/IWorkflowService';\r\nimport { isNullOrUndefined } from 'util';\r\n\r\ninterface IWorkflowReportState {\r\n workflowReports: WorkflowFormReport[];\r\n isLoading: boolean;\r\n statusList: IReferential[];\r\n organizations: WorkflowPartner[];\r\n reportList: IReferential[];\r\n selectedStatus: IReferential | null;\r\n selectedOrganization: WorkflowPartner | null;\r\n selectedReport: IReferential | null;\r\n selectedUserRole: IReferential | null;\r\n userRoles: IReferential[];\r\n}\r\nexport interface ExternalOrganizationFormReportProps {\r\n workflowFormId: number;\r\n}\r\n\r\ntype IOrganizationFormReportProps = ExternalOrganizationFormReportProps & {\r\n appState: AppState;\r\n} & ProviderContext &\r\n RouteComponentProps<{ id: string; workflowId: string }>;\r\n\r\nclass EditWorkflowFormReport extends React.PureComponent<\r\n IOrganizationFormReportProps,\r\n IWorkflowReportState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private organizationService!: IOrganizationService;\r\n private workflowService!: IWorkflowService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n workflowReports: [],\r\n isLoading: false,\r\n statusList: [],\r\n organizations: [],\r\n reportList: [],\r\n selectedStatus: null,\r\n selectedOrganization: null,\r\n selectedReport: null,\r\n selectedUserRole: null,\r\n userRoles: []\r\n } as IWorkflowReportState;\r\n\r\n public componentDidMount() {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n\r\n if (Number.isNaN(hoId)) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadOrganizationFormReports();\r\n }\r\n );\r\n }\r\n\r\n loadOrganizationFormReports = async () => {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n const workflowId = Number.parseInt(this.props.match.params.workflowId);\r\n\r\n if (Number.isNaN(hoId)) {\r\n return;\r\n }\r\n const ref = Referentials.referential.find((item) => item.code === ReferentialCode.CaseStatus);\r\n const refReport = Referentials.referential.find((item) => item.code === ReferentialCode.Report);\r\n const refRole = Referentials.referential.find((item) => item.code === ReferentialCode.UserRole);\r\n\r\n const [workflowFormReports, statusList, reportList, workflowPartnerList, userRoles] =\r\n await Promise.all([\r\n this.workflowService.GetWorkflowFormReports(this.props.workflowFormId),\r\n this.appReferentialService.Get(ref!.baseUrl),\r\n this.appReferentialService.Get(refReport!.baseUrl),\r\n this.workflowService.GetWorkflowPartners(workflowId),\r\n this.appReferentialService.Get(refRole!.baseUrl)\r\n ]);\r\n\r\n const partners = await this.organizationService.GetOrganizationsByIds(\r\n workflowPartnerList.map((item) => item.partnerId)\r\n );\r\n workflowPartnerList.forEach((wpItem) => {\r\n const partner = partners.find((item) => item.id === wpItem.partnerId);\r\n wpItem.partner = isNullOrUndefined(partner) ? null : partner;\r\n });\r\n\r\n workflowFormReports.forEach((wfrItem) => {\r\n const wc = workflowPartnerList.find((item) => item.id === wfrItem.workflowPartnerId);\r\n const cs = statusList.find((item) => item.id === wfrItem.caseStatusId);\r\n\r\n wfrItem.workflowPartner = isNullOrUndefined(wc) ? null : wc;\r\n wfrItem.caseStatus = isNullOrUndefined(cs) ? null : cs;\r\n });\r\n\r\n this.setState({\r\n workflowReports: workflowFormReports.sort(function (a, b) {\r\n return a.order - b.order;\r\n }),\r\n statusList: statusList.filter((item) => item.isActive),\r\n organizations: workflowPartnerList.filter((item) => item.isActive),\r\n reportList: reportList,\r\n isLoading: false,\r\n userRoles: userRoles.filter((item) => item.isActive === true)\r\n });\r\n };\r\n\r\n reloadOrganizationForms = async () => {\r\n const workflowFormReports = await this.workflowService.GetWorkflowFormReports(\r\n this.props.workflowFormId\r\n );\r\n workflowFormReports.forEach((wfrItem) => {\r\n const wc = this.state.organizations.find((item) => item.id === wfrItem.workflowPartnerId);\r\n const cs = this.state.statusList.find((item) => item.id === wfrItem.caseStatusId);\r\n\r\n wfrItem.workflowPartner = isNullOrUndefined(wc) ? null : wc;\r\n wfrItem.caseStatus = isNullOrUndefined(cs) ? null : cs;\r\n });\r\n\r\n this.setState({\r\n workflowReports: workflowFormReports.sort(function (a, b) {\r\n return a.order - b.order;\r\n }),\r\n isLoading: false\r\n });\r\n };\r\n\r\n deleteOrgFormReport = async (event: any, tableMeta: MUIDataTableMeta) => {\r\n try {\r\n const id = tableMeta.rowData[0];\r\n\r\n await this.workflowService.RemoveWorkflowFormReport(id);\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n () => {\r\n this.reloadOrganizationForms();\r\n }\r\n );\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n moveUp = async (event: any, tableMeta: MUIDataTableMeta) => {\r\n const id = tableMeta.rowData[0];\r\n const cloneArray = [...this.state.workflowReports];\r\n const itemToMoveUpIndex = cloneArray.findIndex((item) => item.id === id);\r\n\r\n if (itemToMoveUpIndex === -1) {\r\n return;\r\n }\r\n if (cloneArray[itemToMoveUpIndex].order === 1) {\r\n return;\r\n }\r\n\r\n const itemToMoveDownIndex = cloneArray.findIndex(\r\n (item) => item.order === cloneArray[itemToMoveUpIndex].order - 1\r\n );\r\n\r\n cloneArray[itemToMoveUpIndex] = {\r\n ...cloneArray[itemToMoveUpIndex],\r\n order: cloneArray[itemToMoveUpIndex].order - 1\r\n };\r\n cloneArray[itemToMoveDownIndex] = {\r\n ...cloneArray[itemToMoveDownIndex],\r\n order: cloneArray[itemToMoveDownIndex].order + 1\r\n };\r\n\r\n try {\r\n await this.workflowService.UpdateWorkflowFormReport(cloneArray[itemToMoveUpIndex]);\r\n await this.workflowService.UpdateWorkflowFormReport(cloneArray[itemToMoveDownIndex]);\r\n\r\n this.setState({\r\n workflowReports: cloneArray.sort(function (a, b) {\r\n return a.order - b.order;\r\n })\r\n });\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n moveDown = async (event: any, tableMeta: MUIDataTableMeta) => {\r\n const id = tableMeta.rowData[0];\r\n const cloneArray = [...this.state.workflowReports];\r\n const itemToMoveIndex = cloneArray.findIndex((item) => item.id === id);\r\n\r\n if (itemToMoveIndex === -1) {\r\n return;\r\n }\r\n if (cloneArray[itemToMoveIndex].order === cloneArray.length) {\r\n return;\r\n }\r\n\r\n const itemToMoveToIndex = cloneArray.findIndex(\r\n (item) => item.order === cloneArray[itemToMoveIndex].order + 1\r\n );\r\n\r\n cloneArray[itemToMoveIndex] = {\r\n ...cloneArray[itemToMoveIndex],\r\n order: cloneArray[itemToMoveIndex].order + 1\r\n };\r\n cloneArray[itemToMoveToIndex] = {\r\n ...cloneArray[itemToMoveToIndex],\r\n order: cloneArray[itemToMoveToIndex].order - 1\r\n };\r\n\r\n try {\r\n await this.workflowService.UpdateWorkflowFormReport(cloneArray[itemToMoveIndex]);\r\n await this.workflowService.UpdateWorkflowFormReport(cloneArray[itemToMoveToIndex]);\r\n\r\n this.setState({\r\n workflowReports: cloneArray.sort(function (a, b) {\r\n return a.order - b.order;\r\n })\r\n });\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'workflowPartner',\r\n label: this.translatorService.Tranlate(\r\n 'EDIT_ORGANIZATION_FORM_REPORT_ORGANIZATION_HEADER',\r\n 'Organizatie'\r\n ),\r\n options: {\r\n filter: true,\r\n sort: false,\r\n customBodyRender: (value: WorkflowPartner, tableMeta: MUIDataTableMeta) => {\r\n return value?.partner?.displayName;\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'caseStatus',\r\n label: this.translatorService.Tranlate(\r\n 'EDIT_ORGANIZATION_FORM_REPORT_STATUS_HEADER',\r\n 'Status'\r\n ),\r\n options: {\r\n filter: true,\r\n sort: false,\r\n customBodyRender: (value: any, tableMeta: MUIDataTableMeta) => {\r\n return value.displayName;\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'userRole',\r\n label: this.translatorService.Tranlate('WORKFLOW_USER_ROLE_LABEL', 'Rol'),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: any) => {\r\n return value ? value.displayName : '';\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'report',\r\n label: this.translatorService.Tranlate(\r\n 'EDIT_ORGANIZATION_FORM_REPORT_REPORT_HEADER',\r\n 'Raport'\r\n ),\r\n options: {\r\n filter: true,\r\n sort: false,\r\n customBodyRender: (value: any, tableMeta: MUIDataTableMeta) => {\r\n return value.displayName;\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'dateModification',\r\n label: this.translatorService.Tranlate(\r\n 'ORGANIZATIONS_DATE_MODIFICATION_HEADER',\r\n 'Data Modificare'\r\n ),\r\n options: {\r\n filter: false,\r\n sort: false,\r\n customBodyRender: (value: Date) =>\r\n moment.utc(value).local().toDate().toLocaleString(this.props.appState.language)\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'order',\r\n sortDirection: 'asc',\r\n label: this.translatorService.Tranlate('EDIT_ORGANIZATION_FORM_REPORT_ORDER_HEADER', 'Ord'),\r\n options: { filter: false, sort: false }\r\n },\r\n {\r\n name: '',\r\n options: {\r\n filter: false,\r\n setCellHeaderProps: () => ({ align: 'center' }),\r\n setCellProps: () => ({ align: 'center' }),\r\n sortOrder: {\r\n name: 'order',\r\n direction: 'asc'\r\n },\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n \r\n this.moveUp(e, tableMeta)}>\r\n \r\n \r\n this.moveDown(e, tableMeta)}\r\n >\r\n \r\n \r\n \r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: '',\r\n options: {\r\n filter: false,\r\n setCellHeaderProps: () => ({ align: 'center' }),\r\n setCellProps: () => ({ align: 'center' }),\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.deleteOrgFormReport(e, tableMeta)}\r\n >\r\n \r\n \r\n );\r\n }\r\n }\r\n }\r\n ];\r\n\r\n return columns;\r\n };\r\n\r\n addOrgFormReport = async () => {\r\n try {\r\n if (\r\n this.state.workflowReports.findIndex(\r\n (item) =>\r\n item.workflowPartnerId === this.state.selectedOrganization!.id &&\r\n ((this.state.selectedUserRole !== null &&\r\n item.userRoleId === this.state.selectedUserRole!.id) ||\r\n (this.state.selectedUserRole === null && item.userRoleId !== null) ||\r\n (this.state.selectedUserRole !== null && item.userRoleId === null) ||\r\n (this.state.selectedUserRole === null && item.userRoleId === null)) &&\r\n item.reportId === this.state.selectedReport!.id &&\r\n item.caseStatusId === this.state.selectedStatus!.id\r\n ) !== -1\r\n ) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'ERROR_MSG_WORKFLOW_REPORT_EXISTS',\r\n 'Raportul exista deja!'\r\n ),\r\n { variant: 'error' }\r\n );\r\n return;\r\n }\r\n await this.workflowService.AddWorkflowFormReport({\r\n id: 0,\r\n order: this.state.workflowReports.length + 1,\r\n workflowPartnerId: this.state.selectedOrganization!.id,\r\n reportId: this.state.selectedReport!.id,\r\n caseStatusId: this.state.selectedStatus!.id,\r\n workflowSectionStepFormId: this.props.workflowFormId,\r\n userRoleId: this.state.selectedUserRole ? this.state.selectedUserRole.id : null\r\n } as WorkflowFormReport);\r\n\r\n this.setState(\r\n {\r\n isLoading: true,\r\n selectedReport: null\r\n },\r\n () => {\r\n this.loadOrganizationFormReports();\r\n }\r\n );\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n handleAutocompleteStatusChange = (newValue: any | null) => {\r\n this.setState({\r\n selectedStatus: newValue\r\n });\r\n };\r\n\r\n handleUserRoleChange = (newValue: any | null) => {\r\n this.setState({ selectedUserRole: newValue });\r\n };\r\n handleAutocompleteOrganizationChange = (newValue: WorkflowPartner | null) => {\r\n this.setState({ selectedOrganization: newValue });\r\n };\r\n\r\n handleAutocompleteReportChange = async (newValue: any | null) => {\r\n this.setState({ selectedReport: newValue });\r\n };\r\n\r\n public renderAddForm() {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n this.handleAutocompleteOrganizationChange(newValue)\r\n }\r\n getOptionLabel={(option: WorkflowPartner) => option.partner!.displayName || ''}\r\n filterOptions={createFilterOptions({\r\n matchFrom: 'any',\r\n stringify: (option: WorkflowPartner) => option.partner!.displayName\r\n })}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n \r\n this.handleAutocompleteStatusChange(newValue)\r\n }\r\n getOptionLabel={(option: any) => option.displayName}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n this.handleUserRoleChange(newValue)}\r\n getOptionLabel={(option: any) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n \r\n this.handleAutocompleteReportChange(newValue)\r\n }\r\n getOptionLabel={(option: any) => option.displayName}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n this.workflowService = (this.context as AppContext).workflowService;\r\n\r\n const options = {\r\n filter: true,\r\n search: true,\r\n viewColumns: false,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n elevation: 1\r\n };\r\n\r\n return (\r\n \r\n {this.renderAddForm()}\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n ) : null}\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalOrganizationFormReportProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({ appState: state.app }),\r\n null,\r\n mergeProps\r\n)(withSnackbar(EditWorkflowFormReport as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { ITranslatorService } from '../../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../../context/Contexts';\r\nimport { IOrganizationService } from '../../../../services/Interfaces/IOrganizationService';\r\nimport { Box, Button, Card, CardContent, Grid } from '@material-ui/core';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { IReferentialService } from '../../../../services/Interfaces/IReferentialService';\r\nimport * as monacoEditor from 'monaco-editor/esm/vs/editor/editor.api';\r\nimport { ControlledEditor } from '@monaco-editor/react';\r\nimport { WrapperSimple } from '../../../../layout-components';\r\nimport JSONSchemaForm from '@rjsf/material-ui';\r\nimport { WorkflowSectionStepForm } from '../../../../interfaces/Workflow';\r\nimport { IWorkflowService } from '../../../../services/Interfaces/IWorkflowService';\r\n\r\ninterface IWorkflowFormDesignState {\r\n workflowForm: WorkflowSectionStepForm;\r\n formData: any;\r\n isLoading: boolean;\r\n}\r\nexport interface ExternalWorkflowFormDesignProps {\r\n workflowFormId: number;\r\n}\r\n\r\ntype IOrganizationFormDesignProps = ExternalWorkflowFormDesignProps & {\r\n appState: AppState;\r\n} & ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass EditWorkflowFormDesign extends React.PureComponent<\r\n IOrganizationFormDesignProps,\r\n IWorkflowFormDesignState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private organizationService!: IOrganizationService;\r\n private workflowService!: IWorkflowService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n workflowForm: {},\r\n formData: {},\r\n isLoading: false\r\n } as IWorkflowFormDesignState;\r\n\r\n public componentDidMount() {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n\r\n if (Number.isNaN(hoId)) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadOrganizationFormDesign();\r\n }\r\n );\r\n }\r\n\r\n loadOrganizationFormDesign = async () => {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n\r\n if (Number.isNaN(hoId)) {\r\n return;\r\n }\r\n\r\n let workflowForm = {} as WorkflowSectionStepForm;\r\n if (this.props.workflowFormId !== 0) {\r\n workflowForm = await this.workflowService.GetWorkflowSectionStepForm(\r\n this.props.workflowFormId\r\n );\r\n }\r\n\r\n // organizationForm.json2 = JSON.stringify(json2, null, 2);\r\n this.setState({\r\n workflowForm: workflowForm,\r\n isLoading: false\r\n });\r\n };\r\n handleEditorDidMountJsonSchema = (\r\n ev: monacoEditor.editor.IModelContentChangedEvent,\r\n value: string | undefined\r\n ) => {\r\n const orgFormDesign = { ...this.state.workflowForm };\r\n //= value ? value : \"\";\r\n const BAD_WORD = 'eval';\r\n const WORNING_MESSAGE = \" <- hey man, what's this?\";\r\n orgFormDesign.json1 =\r\n value !== undefined && value.includes(BAD_WORD) && !value.includes(WORNING_MESSAGE)\r\n ? value.replace(BAD_WORD, BAD_WORD + WORNING_MESSAGE)\r\n : value!.includes(WORNING_MESSAGE) && !value!.includes(BAD_WORD)\r\n ? value!.replace(WORNING_MESSAGE, '')\r\n : value!;\r\n\r\n this.setState({ workflowForm: orgFormDesign });\r\n };\r\n handleEditorDidMountUISchema = (\r\n ev: monacoEditor.editor.IModelContentChangedEvent,\r\n value: string | undefined\r\n ) => {\r\n const orgFormDesign = { ...this.state.workflowForm };\r\n orgFormDesign.json2 = value ? value : '';\r\n this.setState({ workflowForm: orgFormDesign });\r\n };\r\n // handleChandeFormData = (e: IChangeEvent) => {\r\n // // const formData = value ? value : \"\";\r\n // debugger\r\n // this.setState({ formData: e.formData })\r\n // }\r\n getSchema = () => {\r\n let json = {};\r\n\r\n if (Object.keys(this.state.workflowForm).length !== 0) {\r\n try {\r\n json = JSON.parse(this.state.workflowForm.json1);\r\n } catch (error) {}\r\n }\r\n return json;\r\n };\r\n\r\n getUISchema = () => {\r\n let json = {};\r\n\r\n if (Object.keys(this.state.workflowForm).length !== 0) {\r\n try {\r\n json = JSON.parse(this.state.workflowForm.json2);\r\n } catch (error) {}\r\n }\r\n return json;\r\n };\r\n\r\n save = async () => {\r\n try {\r\n await this.workflowService.UpdateWorkflowSectionStepForm(this.state.workflowForm);\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n this.workflowService = (this.context as AppContext).workflowService;\r\n\r\n return (\r\n \r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {/* formData={this.state.formData} onChange={(e) => this.handleChandeFormData(e)} */}\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n ) : null}\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalWorkflowFormDesignProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({ appState: state.app }),\r\n null,\r\n mergeProps\r\n)(withSnackbar(EditWorkflowFormDesign as any));\r\n","import React, { Fragment } from 'react';\r\nimport {\r\n AppUserAdminActionCreators,\r\n ApplicationState,\r\n AppActionCreators,\r\n AppState\r\n} from '../../../../store';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport { Box, Select, MenuItem, Card, CardContent, Tabs, Tab } from '@material-ui/core';\r\nimport { ITranslatorService } from '../../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../../context/Contexts';\r\nimport { OrganizationFormAction } from '../../../../interfaces/Organization';\r\nimport { IOrganizationService } from '../../../../services/Interfaces/IOrganizationService';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport Referentials from '../../../../helpers/Referentials.json';\r\nimport { ReferentialCode, WorkflowFormActionTypeCode } from '../../../../helpers/Constants';\r\nimport { IReferentialService } from '../../../../services/Interfaces/IReferentialService';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport MaterialTable, { Column, EditComponentProps, Icons } from 'material-table';\r\nimport ArrowDownward from '@material-ui/icons/ArrowDownward';\r\nimport Check from '@material-ui/icons/Check';\r\nimport ChevronLeft from '@material-ui/icons/ChevronLeft';\r\nimport ChevronRight from '@material-ui/icons/ChevronRight';\r\nimport Clear from '@material-ui/icons/Clear';\r\nimport DeleteOutline from '@material-ui/icons/DeleteOutline';\r\nimport Edit from '@material-ui/icons/Edit';\r\nimport FilterList from '@material-ui/icons/FilterList';\r\nimport FirstPage from '@material-ui/icons/FirstPage';\r\nimport LastPage from '@material-ui/icons/LastPage';\r\nimport Remove from '@material-ui/icons/Remove';\r\nimport SaveAlt from '@material-ui/icons/SaveAlt';\r\nimport Search from '@material-ui/icons/Search';\r\nimport ViewColumn from '@material-ui/icons/ViewColumn';\r\nimport { Label } from 'reactstrap';\r\nimport moment from 'moment';\r\nimport AddCircleTwoToneIcon from '@material-ui/icons/AddCircleTwoTone';\r\nimport { forwardRef } from 'react';\r\nimport { IReferential } from '../../../../interfaces/IReferential';\r\nimport { isNullOrUndefined } from 'util';\r\nimport { IWorkflowService } from '../../../../services/Interfaces/IWorkflowService';\r\nimport { WorkflowFormAction, Workflow } from '../../../../interfaces/Workflow';\r\nimport { FormCode } from '../../../../helpers/forms/FormCode';\r\n\r\nconst tableIcons = {\r\n Add: forwardRef((props, ref) => ),\r\n Check: forwardRef((props, ref) => ),\r\n Clear: forwardRef((props, ref) => ),\r\n Delete: forwardRef((props, ref) => ),\r\n DetailPanel: forwardRef((props, ref) => ),\r\n Edit: forwardRef((props, ref) => ),\r\n Export: forwardRef((props, ref) => ),\r\n Filter: forwardRef((props, ref) => ),\r\n FirstPage: forwardRef((props, ref) => ),\r\n LastPage: forwardRef((props, ref) => ),\r\n NextPage: forwardRef((props, ref) => ),\r\n PreviousPage: forwardRef((props, ref) => ),\r\n ResetSearch: forwardRef((props, ref) => ),\r\n Search: forwardRef((props, ref) => ),\r\n SortArrow: forwardRef((props, ref) => ),\r\n ThirdStateCheck: forwardRef((props, ref) => ),\r\n ViewColumn: forwardRef((props, ref) => )\r\n} as Icons;\r\n\r\ninterface IWorkflowFormActionTransStatusState {\r\n transitionStatus: WorkflowFormAction[];\r\n isLoading: boolean;\r\n statusTypeList: IReferential[];\r\n tranStatusActionType: IReferential | null;\r\n workflows: Workflow[] | null;\r\n}\r\nexport interface ExternalWorkflowFormActionTransStatusProps {\r\n workflowFormId: number;\r\n workflowFormCode: string | null;\r\n currentWorkflowId: number | null;\r\n}\r\n\r\ntype WorkflowFormActionTransStatusProps = ExternalWorkflowFormActionTransStatusProps & {\r\n appState: AppState;\r\n} & ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass WorkflowFormActionTransStatus extends React.PureComponent<\r\n WorkflowFormActionTransStatusProps,\r\n IWorkflowFormActionTransStatusState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private organizationService!: IOrganizationService;\r\n private workflowService!: IWorkflowService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n transitionStatus: [],\r\n isLoading: true,\r\n statusTypeList: [],\r\n tranStatusActionType: null,\r\n workflows: null\r\n } as IWorkflowFormActionTransStatusState;\r\n\r\n componentDidMount = () => {\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n () => {\r\n this.loadData();\r\n }\r\n );\r\n };\r\n\r\n loadData = async () => {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n\r\n if (Number.isNaN(hoId)) {\r\n return;\r\n }\r\n try {\r\n const ref = Referentials.referential.find((item) => item.code === ReferentialCode.CaseStatus);\r\n const refActionTypes = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.ActionType\r\n );\r\n const [data, caseStatus, actionTypes] = await Promise.all([\r\n this.workflowService.GetWorkflowSectionStepFormActions(this.props.workflowFormId),\r\n this.appReferentialService.Get(ref!.baseUrl),\r\n this.appReferentialService.Get(refActionTypes!.baseUrl)\r\n ]);\r\n\r\n const workflows = await this.workflowService.GetWorkflows(parseInt(this.props.match.params.id));\r\n\r\n const tranStatusActionType = actionTypes.find(\r\n (item) => item.code === WorkflowFormActionTypeCode.STATUS_TRANSITION\r\n );\r\n\r\n // filter out inactive workflows and the current workflow\r\n const activeWf = workflows.filter(\r\n (wf) => wf.isActive && wf.id !== this.props.currentWorkflowId\r\n );\r\n data.forEach((item) => {\r\n const fromCs = caseStatus.find((itemCS) => itemCS.id === item.fromStatusId);\r\n const toCs = caseStatus.find((itemCS) => itemCS.id === item.toStatusId);\r\n const toWf = workflows.find((wf) => wf.id === item.toWorkflowId);\r\n item.fromStatus = isNullOrUndefined(fromCs) ? null : fromCs;\r\n item.toStatus = isNullOrUndefined(toCs) ? null : toCs;\r\n item.toWorkflow = toWf || null;\r\n });\r\n\r\n this.setState({\r\n transitionStatus: data.filter((item) => item.actionTypeId === tranStatusActionType!.id),\r\n isLoading: false,\r\n statusTypeList: caseStatus.filter((item) => item.isActive == true),\r\n tranStatusActionType: isNullOrUndefined(tranStatusActionType) ? null : tranStatusActionType,\r\n workflows: activeWf\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n getColumns = () => {\r\n const lookup = this.state.statusTypeList.reduce(function (\r\n acc: any,\r\n cur: { id: number; displayName: string },\r\n i: number\r\n ) {\r\n acc[cur.id] = cur.displayName;\r\n\r\n return acc;\r\n },\r\n {});\r\n\r\n return [\r\n {\r\n field: 'fromStatusId',\r\n title: this.translatorService.Tranlate(\r\n 'EDIT_ORGANIZATION_FORM_ACTION_TRANS_STATUS_FROM_STATUS_HEADER',\r\n 'Din status'\r\n ),\r\n searchable: true,\r\n lookup: lookup,\r\n render: (rowData: WorkflowFormAction) => {\r\n return rowData.fromStatus!.displayName;\r\n },\r\n editComponent: (props: EditComponentProps) => {\r\n return (\r\n props.onChange(e.target.value)}\r\n >\r\n {this.state.statusTypeList.map((item) => (\r\n \r\n {item.displayName}\r\n \r\n ))}\r\n \r\n );\r\n }\r\n } as Column,\r\n {\r\n field: 'toStatusId',\r\n title: this.translatorService.Tranlate(\r\n 'EDIT_ORGANIZATION_FORM_ACTION_TRANS_STATUS_TO_STATUS_HEADER',\r\n 'In status'\r\n ),\r\n searchable: true,\r\n lookup: lookup,\r\n render: (rowData: WorkflowFormAction) => {\r\n return rowData.toStatus!.displayName;\r\n },\r\n editComponent: (props: EditComponentProps) => {\r\n return (\r\n props.onChange(e.target.value)}\r\n >\r\n {this.state.statusTypeList.map((item) => (\r\n \r\n {item.displayName}\r\n \r\n ))}\r\n \r\n );\r\n }\r\n } as Column,\r\n {\r\n field: 'toWorkflowId',\r\n title: this.translatorService.Tranlate(\r\n 'EDIT_ORGANIZATION_FORM_ACTION_TRANS_STATUS_TO_WORKFLOW_HEADER',\r\n 'In workflow'\r\n ),\r\n // hidden: this.props.workflowFormCode !== FormCode.CASE_BACK_TO_SERVICE,\r\n searchable: true,\r\n lookup: lookup,\r\n render: (rowData: WorkflowFormAction) => {\r\n return rowData.toWorkflow?.displayName;\r\n },\r\n editComponent: (props: EditComponentProps) => {\r\n return (\r\n props.onChange(e.target.value)}\r\n >\r\n {this.state.workflows?.map((item) => (\r\n \r\n {item.displayName}\r\n \r\n ))}\r\n \r\n );\r\n }\r\n } as Column,\r\n {\r\n field: 'dateModification',\r\n title: this.translatorService.Tranlate(\r\n 'EDIT_ORGANIZATION_FORM_ACTION_TRANS_STATUS_MODIFIED_DATE_HEADER',\r\n 'Data modificare'\r\n ),\r\n searchable: true,\r\n render: (rowData: any) => {\r\n return moment\r\n .utc(rowData.dateModification)\r\n .local()\r\n .toDate()\r\n .toLocaleString(this.props.appState.language);\r\n },\r\n editComponent: (props: EditComponentProps) => {\r\n return ;\r\n }\r\n } as Column\r\n ];\r\n };\r\n\r\n public getLocalization = () => {\r\n return {\r\n header: { actions: '' },\r\n toolbar: {\r\n searchPlaceholder: this.translatorService.Tranlate('SEARCH', 'Cauta'),\r\n searchTooltip: this.translatorService.Tranlate('SEARCH', 'Cauta')\r\n },\r\n body: {\r\n editTooltip: this.translatorService.Tranlate('EDIT', 'Editeaza'),\r\n deleteTooltip: this.translatorService.Tranlate('DELETE', 'Sterge'),\r\n addTooltip: this.translatorService.Tranlate('Add', 'Adauga'),\r\n emptyDataSourceMessage: this.translatorService.Tranlate(\r\n 'NO_RECORDS_TO_DISPLAY',\r\n 'Nu exista date de afisat'\r\n ),\r\n editRow: {\r\n cancelTooltip: this.translatorService.Tranlate('CANCEL', 'Anuleaza'),\r\n saveTooltip: this.translatorService.Tranlate('SAVE', 'Salveaza'),\r\n deleteText: this.translatorService.Tranlate(\r\n 'DELETE_TEXT',\r\n 'Sigur doriti sa stergeti aceasta inregistrare?'\r\n )\r\n }\r\n },\r\n pagination: {\r\n labelRowsSelect: this.translatorService.Tranlate('ROWS', 'inregistrari'),\r\n firstTooltip: this.translatorService.Tranlate('FIRST_PAGE', 'Prima pagina'),\r\n previousTooltip: this.translatorService.Tranlate('PREVIOUS_PAGE', 'Pagina precedenta'),\r\n nextTooltip: this.translatorService.Tranlate('NEXT_PAGE', 'Pagina urmatoare'),\r\n lastTooltip: this.translatorService.Tranlate('LAST_PAGE', 'Ultima pagina'),\r\n labelDisplayedRows:\r\n '{from}-{to} ' + this.translatorService.Tranlate('OF', 'din') + ' {count}'\r\n }\r\n };\r\n };\r\n\r\n // onRowUpdate = (newData: OrganizationFormTransactionStatus, oldData?: OrganizationFormTransactionStatus): Promise =>\r\n // new Promise(async (resolve, reject) => {\r\n // debugger\r\n // if (oldData) {\r\n\r\n // try {\r\n // debugger\r\n // newData.fromStatus = null;\r\n // newData.toStatus = null;\r\n // await this.organizationService.UpdateOrganizationFormC(newData);\r\n // await this.loadData();\r\n\r\n // this.props.enqueueSnackbar(this.translatorService.Tranlate(\"SUCCES_MSG\", \"OK\"), { variant: 'success' });\r\n // resolve();\r\n\r\n // } catch (error) {\r\n // this.props.enqueueSnackbar(this.translatorService.Tranlate(\"ERROR_MSG\", \"Eroare\"), { variant: 'error' });\r\n // reject();\r\n // };\r\n\r\n // }\r\n\r\n // });\r\n\r\n onRowDelete = (oldData: OrganizationFormAction): Promise =>\r\n new Promise(async (resolve, reject) => {\r\n if (oldData) {\r\n try {\r\n await this.workflowService.RemoveWorkflowSectionStepFormAction(oldData.id);\r\n await this.loadData();\r\n\r\n // const orgFormtransitionStatusList = [...this.state.transitionStatus];\r\n // const index = orgFormtransitionStatusList.findIndex(item => item.id === oldData.id);\r\n // orgFormtransitionStatusList.splice(index,1);\r\n // this.setState({transitionStatus: orgFormtransitionStatusList});\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n\r\n resolve();\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n }\r\n });\r\n\r\n onRowAdd = (newData: WorkflowFormAction): Promise =>\r\n new Promise(async (resolve, reject) => {\r\n try {\r\n if (isNullOrUndefined(newData.fromStatusId) || isNullOrUndefined(newData.toStatusId)) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'ERROR_MSG_MANDATORY_FIELDS',\r\n 'Campurile sunt obligatorii'\r\n ),\r\n { variant: 'error' }\r\n );\r\n reject();\r\n return;\r\n }\r\n\r\n if (\r\n this.state.transitionStatus.findIndex(\r\n (item) =>\r\n item.fromStatusId === newData.fromStatusId && item.toStatusId === newData.toStatusId\r\n ) !== -1\r\n ) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'ERROR_MSG_FORM_ACTION_TRANS_STATUS_EXISTS',\r\n 'Tranzitia de stare exista deja!'\r\n ),\r\n { variant: 'error' }\r\n );\r\n reject();\r\n return;\r\n }\r\n\r\n newData.workflowSectionStepFormId = this.props.workflowFormId;\r\n newData.actionTypeId = this.state.tranStatusActionType!.id;\r\n // newData.workflowPartnerId = null;\r\n // newData.emailRecipientTypeId = null;\r\n // newData.emailTemplateId = null;\r\n // newData.sendMailActionTypeId = null;\r\n // newData.sendMailStatusId= null;\r\n\r\n await this.workflowService.AddWorkflowSectionStepFormAction(newData);\r\n await this.loadData();\r\n // const orgFormtransitionStatusList = [...this.state.transitionStatus];\r\n // orgFormtransitionStatusList.push({\r\n // id: this.state.transitionStatus.length,\r\n // // formId: this.props.organizationFormId,\r\n // actionTypeId: 1,\r\n // fromStatusId: newData.fromStatusId,\r\n // fromStatus: this.state.statusTypeList.find(item=>item.id === newData.fromStatusId)!,\r\n // toStatusId: newData.toStatusId,\r\n // toStatus: this.state.statusTypeList.find(item=>item.id === newData.toStatusId)!,\r\n // isLastUser: null,\r\n // // organizationId:null,\r\n // // organization: null,\r\n // userId:null,\r\n // user: null,\r\n // // stateId: null,\r\n // // state: null,\r\n // //sendEmailActionId: null,\r\n // // sendEmailAction: null,\r\n // //sendEmailToId: null,\r\n // //sendEmailTo: null,\r\n // emailTemplate:null,\r\n // emailTemplateId:null\r\n\r\n // } );\r\n //this.setState({transitionStatus: orgFormtransitionStatusList});\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n resolve();\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n });\r\n\r\n public renderTable = () => {\r\n return (\r\n this.onRowAdd(newData),\r\n // onRowUpdate: (newData: any, oldData?: any) => this.onRowUpdate(newData, oldData),\r\n onRowDelete: (oldData: any) => this.onRowDelete(oldData)\r\n }}\r\n />\r\n );\r\n };\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.workflowService = (this.context as AppContext).workflowService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? this.renderTable() : null}\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalWorkflowFormActionTransStatusProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\nexport default connect(\r\n (state: ApplicationState) => ({ appState: state.app }),\r\n { ...AppUserAdminActionCreators, ...AppActionCreators },\r\n mergeProps\r\n)(withSnackbar(WorkflowFormActionTransStatus as any));\r\n","import React, { Fragment } from 'react';\r\nimport {\r\n AppUserAdminActionCreators,\r\n ApplicationState,\r\n AppActionCreators,\r\n AppState\r\n} from '../../../../store';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n Box,\r\n Card,\r\n CardContent,\r\n Tabs,\r\n Tab,\r\n Checkbox,\r\n FormControlLabel,\r\n Divider,\r\n Button,\r\n TextField,\r\n Grid\r\n} from '@material-ui/core';\r\nimport { ITranslatorService } from '../../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../../context/Contexts';\r\nimport { AppUser } from '../../../../interfaces/AppUser';\r\nimport { IOrganizationService } from '../../../../services/Interfaces/IOrganizationService';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport Referentials from '../../../../helpers/Referentials.json';\r\nimport { ReferentialCode, WorkflowFormActionTypeCode } from '../../../../helpers/Constants';\r\nimport { IReferentialService } from '../../../../services/Interfaces/IReferentialService';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { IAppUserService } from '../../../../services/Interfaces/IAppUserService';\r\nimport { ValidatorForm, TextValidator } from 'react-material-ui-form-validator';\r\nimport Autocomplete, { createFilterOptions } from '@material-ui/lab/Autocomplete';\r\nimport {\r\n Workflow,\r\n WorkflowFormAction,\r\n WorkflowPartner,\r\n WorkflowPartnerType\r\n} from '../../../../interfaces/Workflow';\r\nimport { IWorkflowService } from '../../../../services/Interfaces/IWorkflowService';\r\nimport { isNullOrUndefined } from 'util';\r\nimport { IReferential } from '../../../../interfaces/IReferential';\r\n\r\ninterface IWorkflowFormActionCaseAllocationState {\r\n actionAllocationCase: WorkflowFormAction;\r\n isLoading: boolean;\r\n partnerList: WorkflowPartner[];\r\n //selectedPartner: WorkflowPartner | null\r\n userList: AppUser[];\r\n //selectedUser: AppUser | null\r\n //isLastUser: boolean\r\n disabledControls: boolean[];\r\n tranStatusActionType: IReferential | null;\r\n caseStatusList: IReferential[];\r\n workFlowPartnerTypes: WorkflowPartnerType[];\r\n roles: IReferential[];\r\n proprietaryWorkflow: Workflow | null;\r\n}\r\nexport interface ExternalWorkflowFormActionCaseAllocationProps {\r\n workflowFormId: number;\r\n}\r\n\r\ntype OrganizationFormActionCaseAllocationProps = ExternalWorkflowFormActionCaseAllocationProps & {\r\n appState: AppState;\r\n} & ProviderContext &\r\n RouteComponentProps<{ id: string; workflowId: string }>;\r\n\r\nclass EditOrganizationFormActionCaseAllocation extends React.PureComponent<\r\n OrganizationFormActionCaseAllocationProps,\r\n IWorkflowFormActionCaseAllocationState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private organizationService!: IOrganizationService;\r\n private workflowService!: IWorkflowService;\r\n private appUserService!: IAppUserService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n actionAllocationCase: {\r\n id: 0,\r\n isLastUser: false,\r\n workflowPartner: null,\r\n workflowPartnerType: null,\r\n caseStatus: null,\r\n user: null,\r\n userRole: null,\r\n userRoleId: null\r\n } as WorkflowFormAction,\r\n isLoading: false,\r\n partnerList: [],\r\n selectedPartner: null,\r\n userList: [],\r\n workFlowPartnerTypes: [],\r\n caseStatusList: [],\r\n disabledControls: [false, false, false, false, false],\r\n tranStatusActionType: null,\r\n roles: [],\r\n proprietaryWorkflow: null\r\n } as IWorkflowFormActionCaseAllocationState;\r\n\r\n componentDidMount = () => {\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadData();\r\n }\r\n );\r\n };\r\n\r\n loadData = async () => {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n const workflowId = Number.parseInt(this.props.match.params.workflowId);\r\n\r\n if (Number.isNaN(hoId) || Number.isNaN(workflowId)) {\r\n return;\r\n }\r\n\r\n try {\r\n const refCaseStatus = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.CaseStatus\r\n );\r\n const refActionTypes = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.ActionType\r\n );\r\n const refOrgType = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.OrganizationType\r\n );\r\n const refRoles = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.UserRole\r\n );\r\n\r\n const [\r\n data,\r\n actionTypes,\r\n workflowPartnerList,\r\n userList,\r\n orgTypes,\r\n workflowPartnerTypes,\r\n caseStatusList,\r\n roles,\r\n currentWorkFlow\r\n ] = await Promise.all([\r\n this.workflowService.GetWorkflowSectionStepFormActions(this.props.workflowFormId),\r\n this.appReferentialService.Get(refActionTypes!.baseUrl),\r\n this.workflowService.GetWorkflowPartners(workflowId),\r\n this.appUserService.GetAppUsers(),\r\n this.appReferentialService.Get(refOrgType!.baseUrl),\r\n this.workflowService.GetWorkflowOrganizationTypes(workflowId),\r\n this.appReferentialService.Get(refCaseStatus!.baseUrl),\r\n this.appReferentialService.Get(refRoles!.baseUrl),\r\n this.workflowService.GetWorkflow(workflowId)\r\n ]);\r\n const tranStatusActionType = actionTypes.find(\r\n (item) => item.code === WorkflowFormActionTypeCode.CASE_ALLOCATION\r\n );\r\n\r\n let allocationCase = data.find((item) => item.actionTypeId === tranStatusActionType!.id);\r\n\r\n const partners = await this.organizationService.GetOrganizationsByIds(\r\n workflowPartnerList.map((item) => item.partnerId)\r\n );\r\n\r\n workflowPartnerList.forEach((wpItem) => {\r\n const partner = partners.find((item) => item.id === wpItem.partnerId);\r\n wpItem.partner = isNullOrUndefined(partner) ? null : partner;\r\n\r\n const currentUserWorkflowPartner = workflowPartnerList.find(\r\n (x) => x.partnerId === this.props.appState.appUser?.organizationId\r\n );\r\n\r\n if (!isNullOrUndefined(allocationCase) && allocationCase.workflowPartnerId === wpItem.id) {\r\n allocationCase!.workflowPartner = currentUserWorkflowPartner || wpItem;\r\n }\r\n });\r\n\r\n workflowPartnerTypes.forEach((wpTypeItem) => {\r\n const orgType = orgTypes.find((item) => item.id === wpTypeItem.organizationTypeId);\r\n wpTypeItem.organizationType = isNullOrUndefined(orgType) ? null : orgType;\r\n\r\n if (\r\n !isNullOrUndefined(allocationCase) &&\r\n allocationCase.workflowPartnerTypeId === wpTypeItem.id\r\n ) {\r\n allocationCase!.workflowPartnerType = wpTypeItem;\r\n }\r\n });\r\n\r\n if (!isNullOrUndefined(allocationCase) && !isNullOrUndefined(allocationCase.userId)) {\r\n const user = userList.users.find((item) => item.id === allocationCase!.userId);\r\n allocationCase!.user = isNullOrUndefined(user) ? null : user;\r\n }\r\n if (!isNullOrUndefined(allocationCase) && !isNullOrUndefined(allocationCase.caseStatusId)) {\r\n const cs = caseStatusList.find((item) => item.id === allocationCase!.caseStatusId);\r\n allocationCase!.caseStatus = isNullOrUndefined(cs) ? null : cs;\r\n }\r\n if (!isNullOrUndefined(allocationCase) && !isNullOrUndefined(allocationCase.userRoleId)) {\r\n const ur = roles.find((item) => item.id === allocationCase!.userRoleId);\r\n allocationCase!.userRole = isNullOrUndefined(ur) ? null : ur;\r\n }\r\n\r\n if (isNullOrUndefined(allocationCase)) {\r\n allocationCase = this.state.actionAllocationCase;\r\n }\r\n\r\n if (isNullOrUndefined(allocationCase!.user)) {\r\n allocationCase!.user = null;\r\n }\r\n\r\n this.setState({\r\n actionAllocationCase: allocationCase,\r\n isLoading: false,\r\n caseStatusList: caseStatusList,\r\n partnerList: workflowPartnerList,\r\n userList: userList.users,\r\n roles: roles.filter((item) => item.isActive),\r\n tranStatusActionType: isNullOrUndefined(tranStatusActionType) ? null : tranStatusActionType,\r\n workFlowPartnerTypes: workflowPartnerTypes,\r\n disabledControls:\r\n allocationCase === undefined ||\r\n (!allocationCase.isLastUser &&\r\n isNullOrUndefined(allocationCase.workflowPartnerId) &&\r\n isNullOrUndefined(allocationCase.workflowPartnerTypeId) &&\r\n isNullOrUndefined(allocationCase.user))\r\n ? [false, false, false, false, false]\r\n : [\r\n false,\r\n !isNullOrUndefined(allocationCase.workflowPartnerId) &&\r\n !(\r\n allocationCase.sendEmailSameOrganization ||\r\n allocationCase.sendEmailProprietaryOrganization\r\n )\r\n ? false\r\n : true,\r\n !isNullOrUndefined(allocationCase.user) ? false : true,\r\n !isNullOrUndefined(allocationCase.workflowPartnerType) ? false : true,\r\n !(\r\n allocationCase.sendEmailSameOrganization ||\r\n allocationCase.sendEmailProprietaryOrganization\r\n )\r\n ? false\r\n : true\r\n ],\r\n proprietaryWorkflow: currentWorkFlow\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n addOrgFormActionAllocationCase = async () => {\r\n try {\r\n const actionAllocationCase = { ...this.state.actionAllocationCase };\r\n\r\n if (actionAllocationCase.id !== 0) {\r\n //update\r\n actionAllocationCase.workflowPartner = null;\r\n actionAllocationCase.workflowPartnerType = null;\r\n actionAllocationCase.user = null;\r\n actionAllocationCase.caseStatus = null;\r\n actionAllocationCase.userRole = null;\r\n\r\n await this.workflowService.UpdateWorkflowSectionStepAction(actionAllocationCase);\r\n } else {\r\n //add\r\n actionAllocationCase.id = 0;\r\n actionAllocationCase.workflowSectionStepFormId = this.props.workflowFormId;\r\n actionAllocationCase.actionTypeId = this.state.tranStatusActionType!.id;\r\n actionAllocationCase.user = null;\r\n actionAllocationCase.userRole = null;\r\n actionAllocationCase.caseStatus = null;\r\n actionAllocationCase.workflowPartner = null;\r\n actionAllocationCase.workflowPartnerType = null;\r\n\r\n await this.workflowService.AddWorkflowSectionStepFormAction(actionAllocationCase);\r\n }\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n handleCheckBoxIsLastUserChange = async (checked: boolean) => {\r\n this.setState({\r\n actionAllocationCase: {\r\n ...this.state.actionAllocationCase,\r\n isLastUser: checked,\r\n sendEmailSameOrganization: false,\r\n sendEmailProprietaryOrganization: false,\r\n workflowPartner: checked === true ? null : this.state.actionAllocationCase.workflowPartner,\r\n workflowPartnerId:\r\n checked === true ? null : this.state.actionAllocationCase.workflowPartnerId\r\n },\r\n disabledControls:\r\n checked === true ? [false, true, true, true, true] : [false, false, false, false, false]\r\n });\r\n };\r\n\r\n handleCheckBoxSameOrganization = async (checked: boolean) => {\r\n let currenctUserWorkflowPartner = null;\r\n if (checked) {\r\n currenctUserWorkflowPartner = this.state.partnerList.find(\r\n (x) => x.partnerId === this.props.appState.appUser?.organizationId\r\n );\r\n }\r\n\r\n this.setState({\r\n actionAllocationCase: {\r\n ...this.state.actionAllocationCase,\r\n sendEmailSameOrganization: checked,\r\n sendEmailProprietaryOrganization: false,\r\n isLastUser: false,\r\n workflowPartner: currenctUserWorkflowPartner || null,\r\n workflowPartnerId: currenctUserWorkflowPartner?.id || null\r\n },\r\n disabledControls:\r\n checked === true ? [false, true, true, true, true] : [false, false, false, false, false]\r\n });\r\n };\r\n\r\n handleCheckBoxProprietaryOrganization = async (checked: boolean) => {\r\n let currenctUserWorkflowPartner = null;\r\n if (checked) {\r\n currenctUserWorkflowPartner = this.state.partnerList.find(\r\n (x) => x.partnerId === this.state.proprietaryWorkflow?.organizationOwnerId\r\n );\r\n }\r\n\r\n this.setState({\r\n actionAllocationCase: {\r\n ...this.state.actionAllocationCase,\r\n sendEmailProprietaryOrganization: checked,\r\n sendEmailSameOrganization: false,\r\n isLastUser: false,\r\n workflowPartner: currenctUserWorkflowPartner || null,\r\n workflowPartnerId: currenctUserWorkflowPartner?.id || null\r\n },\r\n disabledControls:\r\n checked === true ? [false, true, true, true, true] : [false, false, false, false, false]\r\n });\r\n };\r\n\r\n handleAutocompleteOrgChange = async (newValue: any | null) => {\r\n this.setState({\r\n actionAllocationCase: {\r\n ...this.state.actionAllocationCase,\r\n workflowPartner: newValue,\r\n workflowPartnerId: newValue === null ? null : newValue.id,\r\n userRole: newValue === null ? null : this.state.actionAllocationCase.userRole,\r\n userRoleId: newValue === null ? null : this.state.actionAllocationCase.userRoleId\r\n },\r\n disabledControls:\r\n newValue !== null ? [true, false, true, true, true] : [false, false, false, false, false]\r\n });\r\n };\r\n\r\n handleAutocompleteRoleChange = async (newValue: any | null) => {\r\n this.setState({\r\n actionAllocationCase: {\r\n ...this.state.actionAllocationCase,\r\n userRole: newValue,\r\n userRoleId: newValue === null ? null : newValue.id\r\n } //,\r\n //disabledControls: newValue !== null ? [true, false, true, true, true] : [false, false, false, false, false]\r\n });\r\n };\r\n\r\n handleAutocompleteOrgTypeChange = async (newValue: any | null) => {\r\n this.setState({\r\n actionAllocationCase: {\r\n ...this.state.actionAllocationCase,\r\n workflowPartnerType: newValue,\r\n workflowPartnerTypeId: newValue === null ? null : newValue.id\r\n },\r\n disabledControls:\r\n newValue !== null ? [true, true, true, false, true] : [false, false, false, false]\r\n });\r\n };\r\n\r\n handleAutocompleteCaseStatusChange = async (newValue: any | null) => {\r\n this.setState({\r\n actionAllocationCase: {\r\n ...this.state.actionAllocationCase,\r\n caseStatus: newValue,\r\n caseStatusId: newValue === null ? null : newValue.id\r\n },\r\n disabledControls:\r\n newValue !== null ? [true, true, true, true, false] : [false, false, false, false, false]\r\n });\r\n };\r\n\r\n handleAutocompleteUserChange = async (newValue: AppUser | null) => {\r\n this.setState({\r\n actionAllocationCase: {\r\n ...this.state.actionAllocationCase,\r\n user: newValue,\r\n userId: newValue === null ? null : newValue.id,\r\n userHoId: newValue === null ? null : newValue.hoId,\r\n userOrganizationId: newValue === null ? null : newValue.organizationId\r\n },\r\n disabledControls:\r\n newValue !== null ? [true, true, false, true, true] : [false, false, false, false, false]\r\n });\r\n };\r\n renderForm = () => {\r\n return (\r\n \r\n this.handleCheckBoxIsLastUserChange(e.target.checked)}\r\n disabled={this.state.disabledControls[0]}\r\n >\r\n }\r\n label={this.translatorService.Tranlate(\r\n 'EDIT_ORGANIZATION_FORM_ACTION_ALLOCATION_CASE_IS_LAST_USER_LABEL',\r\n 'Utilizatorul precedent'\r\n )}\r\n />\r\n this.handleCheckBoxSameOrganization(e.target.checked)}\r\n >\r\n }\r\n label={this.translatorService.Tranlate(\r\n 'EDIT_ORGANIZATION_FORM_ACTION_ALLOCATION_CASE_IS_LAST_USER_LABEL2',\r\n 'Aceeasi organizatie'\r\n )}\r\n />\r\n this.handleCheckBoxProprietaryOrganization(e.target.checked)}\r\n >\r\n }\r\n label={this.translatorService.Tranlate(\r\n 'EDIT_ORGANIZATION_FORM_ACTION_ALLOCATION_CASE_IS_LAST_USER_LABEL3',\r\n 'Organizatia proprietara flux'\r\n )}\r\n />\r\n \r\n \r\n \r\n \r\n this.handleAutocompleteOrgChange(newValue)\r\n }\r\n getOptionLabel={(option: WorkflowPartner) => option.partner!.displayName}\r\n filterOptions={createFilterOptions({\r\n matchFrom: 'any',\r\n stringify: (option: WorkflowPartner) => option.partner!.displayName\r\n })}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n \r\n this.handleAutocompleteRoleChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n\r\n \r\n\r\n \r\n this.handleAutocompleteUserChange(newValue)\r\n }\r\n getOptionLabel={(option: AppUser) => option.userName}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n this.handleAutocompleteOrgTypeChange(newValue)\r\n }\r\n getOptionLabel={(option: WorkflowPartnerType) => option.organizationType!.displayName}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n \r\n \r\n this.handleAutocompleteCaseStatusChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n
\r\n \r\n
\r\n
\r\n );\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.workflowService = (this.context as AppContext).workflowService;\r\n this.appUserService = (this.context as AppContext).appUserService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? this.renderForm() : null}\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalWorkflowFormActionCaseAllocationProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\nexport default connect(\r\n (state: ApplicationState) => ({ appState: state.app }),\r\n { ...AppUserAdminActionCreators, ...AppActionCreators },\r\n mergeProps\r\n)(withSnackbar(EditOrganizationFormActionCaseAllocation as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { Organization } from '../../../../interfaces/Organization';\r\nimport { ITranslatorService } from '../../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../../context/Contexts';\r\nimport {\r\n Box,\r\n Button,\r\n IconButton,\r\n Card,\r\n CardContent,\r\n Tabs,\r\n Tab,\r\n Dialog,\r\n DialogTitle,\r\n Typography,\r\n Grid,\r\n DialogContent,\r\n DialogActions,\r\n TextField,\r\n List,\r\n ListItem,\r\n ListItemText,\r\n ListSubheader,\r\n ListItemSecondaryAction,\r\n FormControlLabel,\r\n Switch\r\n} from '@material-ui/core';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport MUIDataTable, {\r\n MUIDataTableColumnOptions,\r\n MUIDataTableMeta,\r\n SelectableRows\r\n} from 'mui-datatables';\r\nimport moment from 'moment';\r\nimport { MUITranslations } from '../../../../helpers/MUITableTranslations';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { IReferential } from '../../../../interfaces/IReferential';\r\nimport { ValidatorForm, TextValidator } from 'react-material-ui-form-validator';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport { IReferentialService } from '../../../../services/Interfaces/IReferentialService';\r\nimport Referentials from '../../../../helpers/Referentials.json';\r\nimport { ReferentialCode, WorkflowFormActionTypeCode } from '../../../../helpers/Constants';\r\nimport DeleteOutlineTwoToneIcon from '@material-ui/icons/DeleteOutlineTwoTone';\r\nimport { IWorkflowService } from '../../../../services/Interfaces/IWorkflowService';\r\nimport { WorkflowFormAction, EmailTemplate } from '../../../../interfaces/Workflow';\r\nimport { isNullOrUndefined } from 'util';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport { Editor } from 'react-draft-wysiwyg';\r\nimport 'react-draft-wysiwyg/dist/react-draft-wysiwyg.css';\r\nimport { convertToRaw, EditorState, ContentState, convertFromHTML } from 'draft-js';\r\nimport draftToHtml from 'draftjs-to-html';\r\nimport htmlToDraft from 'html-to-draftjs';\r\nimport SubjectIco from '@material-ui/icons/Subject';\r\nimport { mailPlaceHolders } from '../../mailPlaceHolders';\r\nimport { toBase64 } from '../../../../utils/toBase64';\r\n\r\ninterface IWorkflowFormActionSendEmailState {\r\n sendEmailList: WorkflowFormAction[];\r\n isLoading: boolean;\r\n emailTemplate: EmailTemplate | null;\r\n emailTemplates: EmailTemplate[];\r\n stateList: IReferential[];\r\n sendEmailActionList: IReferential[];\r\n sendEmailToList: IReferential[];\r\n selectedState: IReferential[];\r\n selectedSendEmailAction: IReferential[];\r\n selectedSendEmailTo: IReferential[];\r\n selectedTemplate: boolean;\r\n actionType: IReferential | null;\r\n isDialogEmailTemplateOpen: boolean;\r\n actionId: number;\r\n selectedEmailBodyTemplate: EditorState;\r\n selectedEmailSubjectTemplate: string;\r\n}\r\nexport interface ExternalWorkflowFormActionSendEmailProps {\r\n workflowFormId: number;\r\n}\r\n\r\ntype WorkflowFormActionSendEmailProps = ExternalWorkflowFormActionSendEmailProps & {\r\n appState: AppState;\r\n} & ProviderContext &\r\n RouteComponentProps<{ id: string; workflowId: string }>;\r\n\r\nclass EditWorkflowFormActionSendEmail extends React.PureComponent<\r\n WorkflowFormActionSendEmailProps,\r\n IWorkflowFormActionSendEmailState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private workflowService!: IWorkflowService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n sendEmailList: [],\r\n emailTemplate: null,\r\n emailTemplates: [] as EmailTemplate[],\r\n isLoading: false,\r\n stateList: [],\r\n sendEmailActionList: [],\r\n sendEmailToList: [],\r\n selectedState: [],\r\n selectedSendEmailAction: [],\r\n selectedSendEmailTo: [],\r\n selectedTemplate: false,\r\n actionType: null,\r\n isDialogEmailTemplateOpen: false,\r\n actionId: 0,\r\n selectedEmailBodyTemplate: EditorState.createEmpty(),\r\n selectedEmailSubjectTemplate: ''\r\n } as IWorkflowFormActionSendEmailState;\r\n\r\n public componentDidMount() {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n\r\n if (Number.isNaN(hoId)) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadOrganizationFormActionsSendEmail();\r\n }\r\n );\r\n }\r\n\r\n loadOrganizationFormActionsSendEmail = async () => {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n const workflowId = Number.parseInt(this.props.match.params.workflowId);\r\n\r\n if (Number.isNaN(hoId) || Number.isNaN(workflowId)) {\r\n return;\r\n }\r\n\r\n try {\r\n const caseStateRef = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.CaseStatus\r\n );\r\n const recipientTypeRef = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.EmailRecipientType\r\n );\r\n const actionTypeRef = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.ActionType\r\n );\r\n\r\n const [data, caseStatusList, recipientTypeList, emailTemplateList, actionTypeList] =\r\n await Promise.all([\r\n this.workflowService.GetWorkflowSectionStepFormActions(this.props.workflowFormId),\r\n this.appReferentialService.Get(caseStateRef!.baseUrl),\r\n this.appReferentialService.Get(recipientTypeRef!.baseUrl),\r\n this.workflowService.GetEmailTemplates(),\r\n this.appReferentialService.Get(actionTypeRef!.baseUrl)\r\n ]);\r\n\r\n const tranStatusActionType = actionTypeList.find(\r\n (item) => item.code === WorkflowFormActionTypeCode.SEND_MAIL\r\n );\r\n const data1 = data.filter((item) => item.actionTypeId === tranStatusActionType!.id);\r\n\r\n data1.forEach((element) => {\r\n const cs = caseStatusList.find((item) => item.id === element.sendMailStatusId);\r\n\r\n element.sendMailStatus = isNullOrUndefined(cs) ? null : cs;\r\n });\r\n\r\n this.setState({\r\n sendEmailList: data1,\r\n isLoading: false,\r\n stateList: caseStatusList.filter((item) => item.isActive),\r\n sendEmailActionList: actionTypeList.filter((item) => item.isActive),\r\n sendEmailToList: recipientTypeList.filter((item) => item.isActive),\r\n actionType: isNullOrUndefined(tranStatusActionType) ? null : tranStatusActionType,\r\n emailTemplates: emailTemplateList.filter((item) => item.isActive),\r\n selectedSendEmailAction: isNullOrUndefined(tranStatusActionType)\r\n ? []\r\n : [tranStatusActionType]\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n deleteOrgFormReport = async (event: any, tableMeta: MUIDataTableMeta) => {\r\n try {\r\n const id = tableMeta.rowData[0];\r\n await this.workflowService.RemoveWorkflowSectionStepFormAction(id);\r\n const sendEmailList = [...this.state.sendEmailList];\r\n const index = sendEmailList.findIndex((item) => item.id === id);\r\n sendEmailList.splice(index, 1);\r\n this.setState({\r\n sendEmailList: sendEmailList\r\n });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n onEmailTemplateClick = (\r\n e: any,\r\n id: number,\r\n bodyEmailTemplate: string,\r\n subjectEmailTemplate: string\r\n ) => {\r\n const blocksFromHTML = htmlToDraft(bodyEmailTemplate);\r\n const contentState = ContentState.createFromBlockArray(\r\n blocksFromHTML.contentBlocks,\r\n blocksFromHTML.entityMap\r\n );\r\n\r\n this.setState({\r\n isDialogEmailTemplateOpen: true,\r\n actionId: id,\r\n selectedEmailBodyTemplate: EditorState.createWithContent(contentState),\r\n selectedEmailSubjectTemplate: subjectEmailTemplate\r\n });\r\n };\r\n\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: {\r\n display: 'excluded',\r\n filter: false\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'sendMailStatus',\r\n label: this.translatorService.Tranlate(\r\n 'EDIT_ORGANIZATION_FORM_ACTION_SEND_EMAIL_STATE_HEADER',\r\n 'Stare'\r\n ),\r\n options: {\r\n filter: true,\r\n sort: false,\r\n customBodyRender: (value: any, tableMeta: MUIDataTableMeta) => {\r\n return value.displayName;\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'sendMailActionType',\r\n\r\n label: this.translatorService.Tranlate(\r\n 'EDIT_ORGANIZATION_FORM_ACTION_SEND_EMAIL_ACTION_HEADER',\r\n 'Actiune'\r\n ),\r\n options: {\r\n display: 'excluded',\r\n filter: true,\r\n sort: false,\r\n customBodyRender: (value: Organization, tableMeta: MUIDataTableMeta) => {\r\n return value.displayName;\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'emailTemplate',\r\n label: this.translatorService.Tranlate(\r\n 'EDIT_ORGANIZATION_FORM_ACTION_EMAIL_STATE_HEADER',\r\n 'Email'\r\n ),\r\n options: {\r\n filter: false,\r\n customBodyRender: (value: any, tableMeta: MUIDataTableMeta) => {\r\n const id = tableMeta.rowData[0];\r\n const body = tableMeta.rowData[7];\r\n const subject = tableMeta.rowData[8];\r\n\r\n return (\r\n this.onEmailTemplateClick(e, id, body, subject)}\r\n >\r\n {value.displayName}\r\n \r\n );\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'emailRecipientType',\r\n label: this.translatorService.Tranlate(\r\n 'EDIT_ORGANIZATION_FORM_ACTION_SEND_EMAIL_TO_HEADER',\r\n 'Catre'\r\n ),\r\n options: {\r\n filter: false,\r\n sort: false,\r\n customBodyRender: (value: any, tableMeta: MUIDataTableMeta) => {\r\n return value.displayName;\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'dateModification',\r\n label: this.translatorService.Tranlate(\r\n 'ORGANIZATIONS_DATE_MODIFICATION_HEADER',\r\n 'Data Modificare'\r\n ),\r\n options: {\r\n filter: false,\r\n sort: false,\r\n customBodyRender: (value: Date) =>\r\n moment.utc(value).local().toDate().toLocaleString(this.props.appState.language)\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'reuseEmailTemplate',\r\n label: 'Template',\r\n options: {\r\n filter: false,\r\n sort: false,\r\n customBodyRender: (value: boolean) => (value ? 'Da' : 'Nu')\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'body',\r\n options: {\r\n display: 'excluded',\r\n filter: false\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'subject',\r\n options: {\r\n display: 'excluded',\r\n filter: false\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: '',\r\n options: {\r\n filter: false,\r\n setCellHeaderProps: () => ({ align: 'center' }),\r\n setCellProps: () => ({ align: 'center' }),\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.deleteOrgFormReport(e, tableMeta)}\r\n >\r\n \r\n \r\n );\r\n }\r\n }\r\n }\r\n ];\r\n\r\n return columns;\r\n };\r\n\r\n addOrgFormActionSendEmail = async () => {\r\n try {\r\n if (\r\n this.state.sendEmailList.findIndex(\r\n (item) =>\r\n item.emailTemplateId === this.state.emailTemplate!.id &&\r\n this.state.selectedSendEmailTo.findIndex(\r\n (itemm) => itemm.id === item.emailRecipientTypeId\r\n ) !== -1 &&\r\n this.state.selectedSendEmailAction.findIndex(\r\n (itemm) => itemm.id === item.sendMailActionTypeId\r\n ) !== -1 &&\r\n this.state.selectedState.findIndex((itemm) => itemm.id === item.sendMailStatusId) !== -1\r\n ) !== -1\r\n ) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'ERROR_MSG_WORKFLOW_FORM_ACTION_SEND_EMAIL_EXISTS',\r\n 'Posibilitatea trimiterii acestui e-mail exista deja!'\r\n ),\r\n { variant: 'error' }\r\n );\r\n return;\r\n }\r\n\r\n const orgFormActionSendEmail = [] as WorkflowFormAction[];\r\n let contor = 0;\r\n for (const stateList of this.state.selectedState) {\r\n for (const actionList of this.state.selectedSendEmailAction) {\r\n for (const to of this.state.selectedSendEmailTo) {\r\n orgFormActionSendEmail.push({\r\n id: 0,\r\n workflowSectionStepFormId: this.props.workflowFormId,\r\n actionTypeId: this.state.actionType!.id,\r\n fromStatusId: null,\r\n fromStatus: null,\r\n toStatusId: null,\r\n toStatus: null,\r\n toWorkflowId: null,\r\n toWorkflow: null,\r\n isLastUser: false,\r\n workflowPartnerId: null,\r\n workflowPartnerTypeId: null,\r\n workflowPartner: null,\r\n workflowPartnerType: null,\r\n userRoleId: null,\r\n userRole: null,\r\n userId: null,\r\n user: null,\r\n userHoId: null,\r\n userOrganizationId: null,\r\n sendMailStatusId: stateList.id,\r\n sendMailStatus: null,\r\n sendMailActionTypeId: actionList.id,\r\n sendMailActionType: null,\r\n emailRecipientTypeId: to.id,\r\n emailRecipientType: null,\r\n emailTemplate: null,\r\n emailTemplateId: this.state.emailTemplate!.id,\r\n subject: this.state.emailTemplate!.subject,\r\n body: this.state.emailTemplate!.body,\r\n actionType: null,\r\n caseStatus: null,\r\n caseStatusId: null,\r\n sendEmailSameOrganization: false,\r\n sendEmailProprietaryOrganization: false,\r\n reuseEmailTemplate: this.state.selectedTemplate\r\n });\r\n contor = contor + 1;\r\n }\r\n }\r\n }\r\n\r\n await this.workflowService.AddWorkflowSectionStepFormActions(orgFormActionSendEmail);\r\n\r\n this.setState(\r\n {\r\n isLoading: true,\r\n selectedState: [],\r\n selectedSendEmailAction: [],\r\n emailTemplate: null,\r\n selectedSendEmailTo: []\r\n },\r\n async () => await this.loadOrganizationFormActionsSendEmail()\r\n );\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n handleStateChange = (newValue: IReferential[]) => {\r\n this.setState({ selectedState: newValue });\r\n };\r\n\r\n handleSendEmailActionChange = (newValue: IReferential[]) => {\r\n this.setState({ selectedSendEmailAction: newValue });\r\n };\r\n\r\n handleSendEmailToChange = (newValue: IReferential[]) => {\r\n this.setState({ selectedSendEmailTo: newValue });\r\n };\r\n\r\n handleEmailChange = (newValue: any) => {\r\n this.setState({ emailTemplate: newValue });\r\n };\r\n\r\n public renderAddForm() {\r\n return (\r\n \r\n \r\n \r\n \r\n this.handleStateChange(newValue)}\r\n getOptionLabel={(option: { id: number; displayName: string }) =>\r\n option.displayName || ''\r\n }\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n \r\n \r\n \r\n \r\n );\r\n }\r\n\r\n closeDialog = () => {\r\n this.setState({ isDialogEmailTemplateOpen: false });\r\n };\r\n\r\n onEditorStateChange = (editorState: EditorState) => {\r\n this.setState({ selectedEmailBodyTemplate: editorState });\r\n };\r\n\r\n renderEditEmailTemplate = () => {\r\n return (\r\n this.onEditorStateChange(editorState)}\r\n toolbar={{\r\n options: [\r\n 'inline',\r\n 'blockType',\r\n 'fontSize',\r\n 'fontFamily',\r\n 'list',\r\n 'textAlign',\r\n 'colorPicker',\r\n 'link',\r\n 'emoji',\r\n 'history',\r\n 'image'\r\n ],\r\n image: {\r\n className: undefined,\r\n component: undefined,\r\n popupClassName: undefined,\r\n urlEnabled: false,\r\n uploadEnabled: true,\r\n alignmentEnabled: true,\r\n uploadCallback: async (file: File) => {\r\n const imageBase64String = await toBase64(file);\r\n return Promise.resolve({ data: { link: imageBase64String } });\r\n },\r\n previewImage: true,\r\n inputAccept: 'image/gif,image/jpeg,image/jpg,image/png,image/svg',\r\n alt: { present: false, mandatory: false },\r\n defaultSize: {\r\n height: '140',\r\n width: 'auto'\r\n }\r\n }\r\n }}\r\n />\r\n );\r\n };\r\n saveEmailTemplateChanges = async () => {\r\n const id = this.state.actionId;\r\n const sendEmailList = [...this.state.sendEmailList];\r\n const index = sendEmailList.findIndex((item) => item.id === id);\r\n if (index > -1) {\r\n sendEmailList[index] = {\r\n ...sendEmailList[index],\r\n body: draftToHtml(convertToRaw(this.state.selectedEmailBodyTemplate.getCurrentContent())),\r\n subject: this.state.selectedEmailSubjectTemplate\r\n };\r\n\r\n await this.workflowService.UpdateWorkflowSectionStepAction(sendEmailList[index]);\r\n\r\n this.setState(\r\n {\r\n isLoading: true,\r\n isDialogEmailTemplateOpen: false\r\n },\r\n async () => await this.loadOrganizationFormActionsSendEmail()\r\n );\r\n }\r\n };\r\n\r\n addPlaceholderToSubject = (text: string) => {\r\n this.setState({\r\n selectedEmailSubjectTemplate: this.state.selectedEmailSubjectTemplate + '{{' + text + '}}'\r\n });\r\n };\r\n\r\n placeHolderClick = (text: string) => {\r\n const editorState = this.state.selectedEmailBodyTemplate;\r\n const newBlockMap = convertFromHTML('{{' + text + '}}');\r\n const contentState = editorState.getCurrentContent();\r\n const selectionState = editorState.getSelection();\r\n const key = selectionState.getAnchorKey();\r\n const blocksAfter = contentState\r\n .getBlockMap()\r\n .skipUntil(function (_, k) {\r\n return k === key;\r\n })\r\n .skip(1)\r\n .toArray();\r\n const blocksBefore = contentState\r\n .getBlockMap()\r\n .takeUntil(function (_, k) {\r\n return k === key;\r\n })\r\n .toArray();\r\n\r\n newBlockMap.contentBlocks = blocksBefore\r\n .concat([contentState.getBlockForKey(key)])\r\n .concat(newBlockMap.contentBlocks)\r\n .concat(blocksAfter);\r\n\r\n const newContentState = ContentState.createFromBlockArray(\r\n newBlockMap.contentBlocks,\r\n newBlockMap.entityMap\r\n );\r\n const newEditorState = EditorState.createWithContent(newContentState);\r\n this.setState({ selectedEmailBodyTemplate: newEditorState });\r\n };\r\n\r\n renderMailPlaceHolders = () => {\r\n return (\r\n Placeholders}>\r\n {mailPlaceHolders.map((val, index) => (\r\n \r\n this.placeHolderClick(val)} />\r\n \r\n this.addPlaceholderToSubject(val)}>\r\n \r\n \r\n \r\n \r\n ))}\r\n \r\n );\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.workflowService = (this.context as AppContext).workflowService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n const options = {\r\n filter: true,\r\n search: true,\r\n viewColumns: false,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n elevation: 1\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.renderAddForm()}\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n ) : null}\r\n
\r\n \r\n fullScreen\r\n >\r\n \r\n \r\n \r\n \r\n {this.translatorService.Tranlate(\r\n 'EDIT_ORGANIZATION_FORM_ACTION_SEND_EMAIL_EDIT_EMAIL_TEMPLATE_MODAL_TITLE',\r\n 'Editeaza template-ul email-ului'\r\n )}\r\n \r\n \r\n \r\n this.closeDialog()}\r\n size={'small'}\r\n style={{ color: '#ffffff' }}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n this.setState({\r\n selectedEmailSubjectTemplate: e.target.value\r\n })\r\n }\r\n variant=\"outlined\"\r\n size=\"small\"\r\n />\r\n {this.renderEditEmailTemplate()}\r\n \r\n \r\n \r\n {this.renderMailPlaceHolders()}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalWorkflowFormActionSendEmailProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({ appState: state.app }),\r\n null,\r\n mergeProps\r\n)(withSnackbar(EditWorkflowFormActionSendEmail as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { Grid, Button, Box } from '@material-ui/core';\r\nimport { AppContext, ApplicationContext } from '../../../../context/Contexts';\r\nimport { ITranslatorService } from '../../../../services/Interfaces/ITranslatorService';\r\nimport { IOrganizationService } from '../../../../services/Interfaces/IOrganizationService';\r\nimport EditWorkflowFormActionTransStatus from '../editWorkflowForm/EditWorkflowFormActionTransStatus';\r\nimport EditOrganizationFormActionCaseAllocation from '../editWorkflowForm/EditWorkflowFormActionCaseAllocation';\r\nimport EditOrganizationFormActionSendEmail from '../editWorkflowForm/EditWorkflowFormActionSendEmail';\r\nimport { RouteComponentProps } from 'react-router';\r\ninterface IOrganizationFormActionState {\r\n selectedTab: number;\r\n}\r\nexport interface ExternalOrganizationFormActionProps {\r\n workflowFormId: number;\r\n workflowFormCode: string | null;\r\n currentWorkflowId: number | null;\r\n}\r\n\r\ntype IOrganizationFormActionProps = ExternalOrganizationFormActionProps & {\r\n appState: AppState;\r\n} & ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass EditOrganizationFormAction extends React.PureComponent<\r\n IOrganizationFormActionProps,\r\n IOrganizationFormActionState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private organizationService!: IOrganizationService;\r\n\r\n static contextType = ApplicationContext;\r\n state = {\r\n selectedTab: 0\r\n };\r\n\r\n onButtonClick = (newValue: number) => {\r\n this.setState({ selectedTab: newValue });\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n this.onButtonClick(0)}\r\n >\r\n \r\n {this.translatorService.Tranlate(\r\n 'EDIT_ORGANIZATION_FORM_ACTION_TRANSITION_STATUS_TAB',\r\n 'Transition status'\r\n )}\r\n \r\n \r\n \r\n \r\n this.onButtonClick(1)}\r\n >\r\n \r\n {this.translatorService.Tranlate(\r\n 'EDIT_ORGANIZATION_FORM_ACTION_CASE_ALLOCATION_TAB',\r\n 'Alocare dosar'\r\n )}\r\n \r\n \r\n \r\n \r\n this.onButtonClick(2)}\r\n >\r\n \r\n {this.translatorService.Tranlate(\r\n 'EDIT_ORGANIZATION_FORM_ACTION_SEND_EMAIL_TAB',\r\n 'Trimite e-mail'\r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.state.selectedTab === 0 ? (\r\n \r\n ) : null}\r\n {this.state.selectedTab === 1 ? (\r\n \r\n ) : null}\r\n {this.state.selectedTab === 2 ? (\r\n \r\n ) : null}\r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalOrganizationFormActionProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({ appState: state.app }),\r\n null,\r\n mergeProps\r\n)(withSnackbar(EditOrganizationFormAction as any));\r\n","import React, { Fragment } from 'react';\r\nimport {\r\n AppUserAdminActionCreators,\r\n ApplicationState,\r\n AppActionCreators,\r\n AppState\r\n} from '../../../../store';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport { Box, TextField } from '@material-ui/core';\r\nimport { ITranslatorService } from '../../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../../context/Contexts';\r\nimport { OrganizationInterface } from '../../../../interfaces/Organization';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { IReferentialService } from '../../../../services/Interfaces/IReferentialService';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport MaterialTable, { Column, EditComponentProps, Icons } from 'material-table';\r\nimport ArrowDownward from '@material-ui/icons/ArrowDownward';\r\nimport Check from '@material-ui/icons/Check';\r\nimport ChevronLeft from '@material-ui/icons/ChevronLeft';\r\nimport ChevronRight from '@material-ui/icons/ChevronRight';\r\nimport Clear from '@material-ui/icons/Clear';\r\nimport DeleteOutline from '@material-ui/icons/DeleteOutline';\r\nimport Edit from '@material-ui/icons/Edit';\r\nimport FilterList from '@material-ui/icons/FilterList';\r\nimport FirstPage from '@material-ui/icons/FirstPage';\r\nimport LastPage from '@material-ui/icons/LastPage';\r\nimport Remove from '@material-ui/icons/Remove';\r\nimport SaveAlt from '@material-ui/icons/SaveAlt';\r\nimport Search from '@material-ui/icons/Search';\r\nimport ViewColumn from '@material-ui/icons/ViewColumn';\r\nimport { Label } from 'reactstrap';\r\nimport moment from 'moment';\r\nimport AddCircleTwoToneIcon from '@material-ui/icons/AddCircleTwoTone';\r\nimport { forwardRef } from 'react';\r\nimport { WorkflowFormInterface } from '../../../../interfaces/Workflow';\r\nimport { IWorkflowService } from '../../../../services/Interfaces/IWorkflowService';\r\n\r\nconst tableIcons = {\r\n Add: forwardRef((props, ref) => ),\r\n Check: forwardRef((props, ref) => ),\r\n Clear: forwardRef((props, ref) => ),\r\n Delete: forwardRef((props, ref) => ),\r\n DetailPanel: forwardRef((props, ref) => ),\r\n Edit: forwardRef((props, ref) => ),\r\n Export: forwardRef((props, ref) => ),\r\n Filter: forwardRef((props, ref) => ),\r\n FirstPage: forwardRef((props, ref) => ),\r\n LastPage: forwardRef((props, ref) => ),\r\n NextPage: forwardRef((props, ref) => ),\r\n PreviousPage: forwardRef((props, ref) => ),\r\n ResetSearch: forwardRef((props, ref) => ),\r\n Search: forwardRef((props, ref) => ),\r\n SortArrow: forwardRef((props, ref) => ),\r\n ThirdStateCheck: forwardRef((props, ref) => ),\r\n ViewColumn: forwardRef((props, ref) => )\r\n} as Icons;\r\n\r\ninterface IWorkflowFormInterfacesState {\r\n interfaces: WorkflowFormInterface[];\r\n isLoading: boolean;\r\n}\r\n\r\nexport interface ExternalWorkflowFormInterfaceProps {\r\n workflowFormId: number;\r\n}\r\n\r\ntype WorkflowFormInterfacesProps = { appState: AppState } & ExternalWorkflowFormInterfaceProps &\r\n ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass WorkflowFormInterfaces extends React.PureComponent<\r\n WorkflowFormInterfacesProps,\r\n IWorkflowFormInterfacesState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private workflowService!: IWorkflowService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n interfaces: [],\r\n isLoading: true,\r\n organizationId: 0\r\n } as IWorkflowFormInterfacesState;\r\n\r\n componentDidMount = () => {\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n () => {\r\n this.loadData();\r\n }\r\n );\r\n };\r\n\r\n loadData = async () => {\r\n try {\r\n const data = await this.workflowService.GetWorkflowFormInterfaces(this.props.workflowFormId);\r\n\r\n this.setState({\r\n interfaces: data,\r\n isLoading: false\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n getColumns = () => {\r\n return [\r\n {\r\n field: 'code',\r\n title: this.translatorService.Tranlate('ORGANIZATION_INTERFACE_CODE_HEADER', 'Cod'),\r\n searchable: true\r\n } as Column,\r\n {\r\n field: 'url',\r\n title: this.translatorService.Tranlate('ORGANIZATION_INTERFACE_URL_HEADER', 'URL'),\r\n searchable: true\r\n } as Column,\r\n {\r\n field: 'userName',\r\n title: this.translatorService.Tranlate('ORGANIZATION_INTERFACE_UER_HEADER', 'Utilizator'),\r\n searchable: true\r\n },\r\n {\r\n field: 'password',\r\n title: this.translatorService.Tranlate('ORGANIZATION_INTERFACE_PASSWORD_HEADER', 'Parola'),\r\n render: (rowData: any) => {\r\n return '***';\r\n },\r\n editComponent: (props) => (\r\n props.onChange(e.target.value)}\r\n />\r\n )\r\n } as Column,\r\n {\r\n field: 'dateModification',\r\n title: this.translatorService.Tranlate(\r\n 'ORGANIZATION_INTERFACE_MODIFIED_DATE_HEADER',\r\n 'Data modificare'\r\n ),\r\n defaultSort: 'desc',\r\n searchable: true,\r\n render: (rowData: any) => {\r\n return moment\r\n .utc(rowData.dateModification)\r\n .local()\r\n .toDate()\r\n .toLocaleString(this.props.appState.language);\r\n },\r\n editComponent: (props: EditComponentProps) => {\r\n return ;\r\n }\r\n } as Column\r\n ];\r\n };\r\n\r\n public getLocalization = () => {\r\n return {\r\n header: { actions: '' },\r\n toolbar: {\r\n searchPlaceholder: this.translatorService.Tranlate('SEARCH', 'Cauta'),\r\n searchTooltip: this.translatorService.Tranlate('SEARCH', 'Cauta')\r\n },\r\n body: {\r\n editTooltip: this.translatorService.Tranlate('EDIT', 'Editeaza'),\r\n deleteTooltip: this.translatorService.Tranlate('DELETE', 'Sterge'),\r\n addTooltip: this.translatorService.Tranlate('Add', 'Adauga'),\r\n emptyDataSourceMessage: this.translatorService.Tranlate(\r\n 'NO_RECORDS_TO_DISPLAY',\r\n 'Nu exista date de afisat'\r\n ),\r\n editRow: {\r\n cancelTooltip: this.translatorService.Tranlate('CANCEL', 'Anuleaza'),\r\n saveTooltip: this.translatorService.Tranlate('SAVE', 'Salveaza'),\r\n deleteText: this.translatorService.Tranlate(\r\n 'DELETE_TEXT',\r\n 'Sigur doriti sa stergeti aceasta inregistrare?'\r\n )\r\n }\r\n },\r\n pagination: {\r\n labelRowsSelect: this.translatorService.Tranlate('ROWS', 'inregistrari'),\r\n firstTooltip: this.translatorService.Tranlate('FIRST_PAGE', 'Prima pagina'),\r\n previousTooltip: this.translatorService.Tranlate('PREVIOUS_PAGE', 'Pagina precedenta'),\r\n nextTooltip: this.translatorService.Tranlate('NEXT_PAGE', 'Pagina urmatoare'),\r\n lastTooltip: this.translatorService.Tranlate('LAST_PAGE', 'Ultima pagina'),\r\n labelDisplayedRows:\r\n '{from}-{to} ' + this.translatorService.Tranlate('OF', 'din') + ' {count}'\r\n }\r\n };\r\n };\r\n\r\n onRowUpdate = (newData: WorkflowFormInterface, oldData?: OrganizationInterface): Promise =>\r\n new Promise(async (resolve, reject) => {\r\n if (oldData) {\r\n try {\r\n await this.workflowService.UpdateWorkflowFormInterface(newData);\r\n await this.loadData();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n resolve();\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n }\r\n });\r\n\r\n onRowDelete = (oldData: OrganizationInterface): Promise =>\r\n new Promise(async (resolve, reject) => {\r\n if (oldData) {\r\n try {\r\n await this.workflowService.RemoveWorkflowFormInterface(oldData.id);\r\n await this.loadData();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n\r\n resolve();\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n }\r\n });\r\n\r\n onRowAdd = (newData: WorkflowFormInterface): Promise =>\r\n new Promise(async (resolve, reject) => {\r\n try {\r\n newData.workflowSectionStepFormId = this.props.workflowFormId;\r\n\r\n await this.workflowService.AddWorkflowFormInterface(newData);\r\n await this.loadData();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n resolve();\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n });\r\n\r\n public renderTable = () => {\r\n return (\r\n this.onRowAdd(newData),\r\n onRowUpdate: (newData: any, oldData?: any) => this.onRowUpdate(newData, oldData),\r\n onRowDelete: (oldData: any) => this.onRowDelete(oldData)\r\n }}\r\n />\r\n );\r\n };\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.workflowService = (this.context as AppContext).workflowService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n return (\r\n \r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? this.renderTable() : null}\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalWorkflowFormInterfaceProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\nexport default connect(\r\n (state: ApplicationState) => ({ appState: state.app }),\r\n { ...AppUserAdminActionCreators, ...AppActionCreators },\r\n mergeProps\r\n)(withSnackbar(WorkflowFormInterfaces as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport { IOrganizationService } from '../../../services/Interfaces/IOrganizationService';\r\nimport { Box, Button, IconButton, Card, CardContent } from '@material-ui/core';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport MUIDataTable, {\r\n MUIDataTableColumnOptions,\r\n MUIDataTableMeta,\r\n SelectableRows\r\n} from 'mui-datatables';\r\nimport moment from 'moment';\r\nimport { MUITranslations } from '../../../helpers/MUITableTranslations';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ValidatorForm, TextValidator } from 'react-material-ui-form-validator';\r\nimport Autocomplete, { createFilterOptions } from '@material-ui/lab/Autocomplete';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport Referentials from '../../../helpers/Referentials.json';\r\nimport { ReferentialCode } from '../../../helpers/Constants';\r\nimport DeleteOutlineTwoToneIcon from '@material-ui/icons/DeleteOutlineTwoTone';\r\nimport { WorkflowOptimization, WorkflowPartner } from '../../../interfaces/Workflow';\r\nimport { IWorkflowService } from '../../../services/Interfaces/IWorkflowService';\r\nimport { IReferential } from '../../../interfaces/IReferential';\r\nimport { isNullOrUndefined } from 'util';\r\n\r\ninterface IWorkflowOptimizationState {\r\n workflowOptimization: WorkflowOptimization[];\r\n isLoading: boolean;\r\n statusList: IReferential[];\r\n selectedStatus: IReferential | null;\r\n optimizationTypeList: IReferential[];\r\n selectedOptimizationType: IReferential | null;\r\n selectedUserRole: IReferential | null;\r\n userRoles: IReferential[];\r\n workflowPartnerTypeList: WorkflowPartner[];\r\n selecteWorkflowPartnerType: WorkflowPartner | null;\r\n}\r\nexport interface ExternalOptimizationFormActionProps {\r\n workflowFormId: number;\r\n}\r\n\r\ntype IWorkflowOptimizationProps = ExternalOptimizationFormActionProps & {\r\n appState: AppState;\r\n} & ProviderContext &\r\n RouteComponentProps<{ id: string; workflowId: string }>;\r\n\r\nclass WorkflowOptimizations extends React.PureComponent<\r\n IWorkflowOptimizationProps,\r\n IWorkflowOptimizationState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private organizationService!: IOrganizationService;\r\n private workflowService!: IWorkflowService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n workflowOptimization: [],\r\n isLoading: false,\r\n statusList: [],\r\n selectedStatus: null,\r\n optimizationTypeList: [],\r\n selectedOptimizationType: null,\r\n workflowPartnerTypeList: [],\r\n selecteWorkflowPartnerType: null,\r\n selectedUserRole: null,\r\n userRoles: [],\r\n workflowId: 0\r\n } as IWorkflowOptimizationState;\r\n\r\n public componentDidMount() {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n const workflowId = Number.parseInt(this.props.match.params.workflowId);\r\n\r\n if (Number.isNaN(hoId) || Number.isNaN(workflowId)) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadWorkflowOptimization();\r\n }\r\n );\r\n }\r\n\r\n loadWorkflowOptimization = async () => {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n const workflowId = Number.parseInt(this.props.match.params.workflowId);\r\n\r\n if (Number.isNaN(hoId) || Number.isNaN(workflowId)) {\r\n return;\r\n }\r\n\r\n const ref = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.OptimizationType\r\n );\r\n const refStatus = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.CaseStatus\r\n );\r\n const refRole = Referentials.referential.find((item) => item.code === ReferentialCode.UserRole);\r\n\r\n const [\r\n optimizationTypes,\r\n statusList,\r\n workflowOptimizationTypes,\r\n workflowPartnerList,\r\n userRoles\r\n ] = await Promise.all([\r\n this.appReferentialService.Get(ref!.baseUrl),\r\n this.appReferentialService.Get(refStatus!.baseUrl),\r\n this.workflowService.GetWorkflowOptimizations(this.props.workflowFormId),\r\n this.workflowService.GetWorkflowPartners(workflowId),\r\n this.appReferentialService.Get(refRole!.baseUrl)\r\n ]);\r\n\r\n const partners = await this.organizationService.GetOrganizationsByIds(\r\n workflowPartnerList.map((item) => item.partnerId)\r\n );\r\n workflowPartnerList.forEach((wpItem) => {\r\n const partner = partners.find((item) => item.id === wpItem.partnerId);\r\n wpItem.partner = isNullOrUndefined(partner) ? null : partner;\r\n });\r\n\r\n workflowOptimizationTypes.forEach((wo) => {\r\n const wp: any = workflowPartnerList.find((item) => item.id === wo.workflowPartnerId);\r\n const cs = statusList.find((item) => item.id === wo.caseStatusId);\r\n\r\n wo.workflowPartner = isNullOrUndefined(wp) ? null : wp;\r\n wo.caseStatus = isNullOrUndefined(cs) ? null : cs;\r\n });\r\n\r\n this.setState({\r\n workflowOptimization: workflowOptimizationTypes,\r\n statusList: statusList.filter((item) => item.isActive),\r\n optimizationTypeList: optimizationTypes.filter((item) => item.isActive === true),\r\n workflowPartnerTypeList: workflowPartnerList.filter((item) => item.isActive === true),\r\n userRoles: userRoles.filter((item) => item.isActive === true),\r\n isLoading: false\r\n });\r\n };\r\n\r\n // deleteWorkflowOrgType = async (event: any, tableMeta: MUIDataTableMeta) => {\r\n\r\n // try {\r\n // const id = tableMeta.rowData[0];\r\n\r\n // // await this.workflowService.RemoveWorkflowOrganizationType(id);\r\n\r\n // // this.setState({\r\n // // isLoading: true\r\n // // }, () => {\r\n // // this.loadWorkflowOptimization();\r\n // // });\r\n\r\n // const workflowOrgTypes = [...this.state.workflowOrganizationTypes];\r\n // const index = workflowOrgTypes.findIndex(item => item.id === id);\r\n // workflowOrgTypes.splice(index, 1);\r\n\r\n // this.setState({\r\n // workflowOrganizationTypes: workflowOrgTypes,\r\n // });\r\n\r\n // this.props.enqueueSnackbar(this.translatorService.Tranlate(\"SUCCES_MSG\", \"OK\"), { variant: 'success' });\r\n // }\r\n // catch (error) {\r\n // this.props.enqueueSnackbar(this.translatorService.Tranlate(\"ERROR_MSG\", \"Eroare\"), { variant: 'error' });\r\n // }\r\n // }\r\n\r\n deleteWorkflowOptimization = async (event: any, tableMeta: MUIDataTableMeta) => {\r\n try {\r\n const id = tableMeta.rowData[0];\r\n\r\n await this.workflowService.RemoveWorkflowOptimization(id);\r\n await this.loadWorkflowOptimization();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'optimizationType',\r\n label: this.translatorService.Tranlate(\r\n 'WORKFLOW_OPTIMIZATION_TAB_OPTIMIZATION_TYPE_HEADER',\r\n 'Optimizare'\r\n ),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: any) => {\r\n return value.displayName;\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'workflowPartner',\r\n label: this.translatorService.Tranlate(\r\n 'WORKFLOW_OPTIMIZATION_TAB_PARTNER_HEADER',\r\n 'Entitate Partener'\r\n ),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: WorkflowPartner) => {\r\n return value.partner!.displayName;\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'caseStatus',\r\n label: this.translatorService.Tranlate(\r\n 'EDIT_ORGANIZATION_FORM_REPORT_STATUS_HEADER',\r\n 'Status'\r\n ),\r\n options: {\r\n filter: true,\r\n sort: false,\r\n customBodyRender: (value: any, tableMeta: MUIDataTableMeta) => {\r\n return value !== null ? value.displayName : '';\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'userRole',\r\n label: this.translatorService.Tranlate('WORKFLOW_USER_ROLE_LABEL', 'Rol'),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: any) => {\r\n return value ? value.displayName : '';\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'dateModification',\r\n label: this.translatorService.Tranlate(\r\n 'WORKFLOW_OPTIMIZATION_TAB_DATE_MODIFICATION_HEADER',\r\n 'Data Modificare'\r\n ),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: Date) =>\r\n moment.utc(value).local().format(this.props.appState.longDateFormat)\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: '',\r\n options: {\r\n setCellHeaderProps: () => ({ align: 'center' }),\r\n setCellProps: () => ({ align: 'center' }),\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.deleteWorkflowOptimization(e, tableMeta)}\r\n >\r\n \r\n \r\n );\r\n }\r\n }\r\n }\r\n ];\r\n\r\n return columns;\r\n };\r\n\r\n addWorkflowOptimization = async () => {\r\n try {\r\n if (\r\n this.state.workflowOptimization.findIndex(\r\n (item) =>\r\n item.workflowPartnerId === this.state.selecteWorkflowPartnerType!.id &&\r\n ((this.state.selectedUserRole !== null &&\r\n item.userRoleId === this.state.selectedUserRole!.id) ||\r\n (this.state.selectedUserRole === null && item.userRoleId !== null) ||\r\n (this.state.selectedUserRole !== null && item.userRoleId === null) ||\r\n (this.state.selectedUserRole === null && item.userRoleId === null)) &&\r\n item.optimizationTypeId === this.state.selectedOptimizationType!.id &&\r\n item.caseStatusId === this.state.selectedStatus!.id\r\n ) !== -1\r\n ) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'ERROR_MSG_OPTIMIZATION_EXISTS',\r\n 'Optimizarea exista deja!'\r\n ),\r\n { variant: 'error' }\r\n );\r\n return;\r\n }\r\n\r\n await this.workflowService.AddWorkflowOptimization({\r\n id: 0,\r\n workflowPartnerId: this.state.selecteWorkflowPartnerType!.id,\r\n optimizationTypeId: this.state.selectedOptimizationType!.id,\r\n workflowSectionStepFormId: this.props.workflowFormId,\r\n userRoleId: this.state.selectedUserRole ? this.state.selectedUserRole.id : null,\r\n caseStatusId: this.state.selectedStatus!.id\r\n } as WorkflowOptimization);\r\n\r\n this.setState(\r\n {\r\n isLoading: true,\r\n selectedOptimizationType: null\r\n },\r\n () => {\r\n this.loadWorkflowOptimization();\r\n }\r\n );\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n handleOptimizationTypeChange = (newValue: any | null) => {\r\n this.setState({ selectedOptimizationType: newValue });\r\n };\r\n handleUserRoleChange = (newValue: any | null) => {\r\n this.setState({ selectedUserRole: newValue });\r\n };\r\n handleWorkflowPartnerChange = (newValue: WorkflowPartner | null) => {\r\n this.setState({ selecteWorkflowPartnerType: newValue });\r\n };\r\n\r\n handleAutocompleteStatusChange = (newValue: any | null) => {\r\n this.setState({\r\n selectedStatus: newValue\r\n });\r\n };\r\n\r\n renderAddForm() {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n this.handleWorkflowPartnerChange(newValue)\r\n }\r\n getOptionLabel={(option: WorkflowPartner) => option.partner!.displayName || ''}\r\n filterOptions={createFilterOptions({\r\n matchFrom: 'any',\r\n stringify: (option: WorkflowPartner) => option.partner!.displayName\r\n })}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n this.handleAutocompleteStatusChange(newValue)\r\n }\r\n getOptionLabel={(option: any) => option.displayName}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n this.handleUserRoleChange(newValue)}\r\n getOptionLabel={(option: any) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n \r\n this.handleOptimizationTypeChange(newValue)\r\n }\r\n getOptionLabel={(option: any) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.workflowService = (this.context as AppContext).workflowService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n const options = {\r\n filter: false,\r\n search: false,\r\n viewColumns: false,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n elevation: 1\r\n };\r\n\r\n return (\r\n \r\n {/* \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n */}\r\n {this.renderAddForm()}\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n ) : null}\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalOptimizationFormActionProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\nexport default connect(\r\n (state: ApplicationState) => ({ appState: state.app }),\r\n null,\r\n mergeProps\r\n)(withSnackbar(WorkflowOptimizations as any));\r\n","import React, { Fragment } from 'react';\r\nimport {\r\n AppUserAdminActionCreators,\r\n ApplicationState,\r\n AppActionCreators,\r\n AppState\r\n} from '../../../store';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport { Box, Select, MenuItem } from '@material-ui/core';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport { WorkflowDocumentType } from '../../../interfaces/Workflow';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport Referentials from '../../../helpers/Referentials.json';\r\nimport { ReferentialCode } from '../../../helpers/Constants';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport MaterialTable, { Column, EditComponentProps, Icons } from 'material-table';\r\nimport ArrowDownward from '@material-ui/icons/ArrowDownward';\r\nimport Check from '@material-ui/icons/Check';\r\nimport ChevronLeft from '@material-ui/icons/ChevronLeft';\r\nimport ChevronRight from '@material-ui/icons/ChevronRight';\r\nimport Clear from '@material-ui/icons/Clear';\r\nimport DeleteOutline from '@material-ui/icons/DeleteOutline';\r\nimport Edit from '@material-ui/icons/Edit';\r\nimport FilterList from '@material-ui/icons/FilterList';\r\nimport FirstPage from '@material-ui/icons/FirstPage';\r\nimport LastPage from '@material-ui/icons/LastPage';\r\nimport Remove from '@material-ui/icons/Remove';\r\nimport SaveAlt from '@material-ui/icons/SaveAlt';\r\nimport Search from '@material-ui/icons/Search';\r\nimport ViewColumn from '@material-ui/icons/ViewColumn';\r\nimport { Label } from 'reactstrap';\r\nimport moment from 'moment';\r\nimport AddCircleTwoToneIcon from '@material-ui/icons/AddCircleTwoTone';\r\nimport { forwardRef } from 'react';\r\nimport { IReferential } from '../../../interfaces/IReferential';\r\nimport { IWorkflowService } from '../../../services/Interfaces/IWorkflowService';\r\nimport { isNullOrUndefined, isBoolean } from 'util';\r\n\r\nconst tableIcons = {\r\n Add: forwardRef((props, ref) => ),\r\n Check: forwardRef((props, ref) => ),\r\n Clear: forwardRef((props, ref) => ),\r\n Delete: forwardRef((props, ref) => ),\r\n DetailPanel: forwardRef((props, ref) => ),\r\n Edit: forwardRef((props, ref) => ),\r\n Export: forwardRef((props, ref) => ),\r\n Filter: forwardRef((props, ref) => ),\r\n FirstPage: forwardRef((props, ref) => ),\r\n LastPage: forwardRef((props, ref) => ),\r\n NextPage: forwardRef((props, ref) => ),\r\n PreviousPage: forwardRef((props, ref) => ),\r\n ResetSearch: forwardRef((props, ref) => ),\r\n Search: forwardRef((props, ref) => ),\r\n SortArrow: forwardRef((props, ref) => ),\r\n ThirdStateCheck: forwardRef((props, ref) => ),\r\n ViewColumn: forwardRef((props, ref) => )\r\n} as Icons;\r\n\r\nexport interface ExternalorkflowDocumentTypesProps {\r\n workflowFormId: number;\r\n}\r\n\r\ninterface IWorkflowDocumentTypesState {\r\n workflowDocumentTypes: WorkflowDocumentType[];\r\n isLoading: boolean;\r\n workflowId: number;\r\n documentTypeList: IReferential[];\r\n booleanList: {\r\n id: number;\r\n displayName: string;\r\n }[];\r\n}\r\n\r\ntype WorkflowDocumentTypesProps = { appState: AppState } & ExternalorkflowDocumentTypesProps &\r\n ProviderContext &\r\n RouteComponentProps<{ id: string; workflowId: string }>;\r\n\r\nclass WorkflowDocumentTypes extends React.PureComponent<\r\n WorkflowDocumentTypesProps,\r\n IWorkflowDocumentTypesState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private workflowService!: IWorkflowService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n workflowDocumentTypes: [],\r\n isLoading: true,\r\n workflowId: 0,\r\n documentTypeList: [],\r\n booleanList: []\r\n } as IWorkflowDocumentTypesState;\r\n\r\n componentDidMount = () => {\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n () => {\r\n this.loadData();\r\n }\r\n );\r\n };\r\n\r\n loadData = async () => {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n const workflowId = Number.parseInt(this.props.match.params.workflowId);\r\n if (isNaN(hoId) || isNaN(workflowId)) {\r\n return;\r\n }\r\n\r\n try {\r\n const ref = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.AttachmentType\r\n );\r\n const [data, documentTypeList] = await Promise.all([\r\n this.workflowService.GetWorkflowDocumentTypes(this.props.workflowFormId),\r\n this.appReferentialService.Get(ref!.baseUrl)\r\n ]);\r\n\r\n const booleanList = [\r\n {\r\n id: 1,\r\n displayName: this.translatorService.Tranlate('WORKFLOW_DOCUMENTS_TYPE_TAB_YES', 'Da')\r\n },\r\n {\r\n id: 0,\r\n displayName: this.translatorService.Tranlate('WORKFLOW_DOCUMENTS_TYPE_TAB_NO', 'NU')\r\n }\r\n ];\r\n\r\n data.forEach((wdt) => {\r\n const dt = documentTypeList.find((item) => item.id === wdt.documentTypeId);\r\n wdt.documentType = isNullOrUndefined(dt) ? null : dt;\r\n });\r\n\r\n this.setState({\r\n workflowDocumentTypes: data,\r\n isLoading: false,\r\n workflowId: workflowId,\r\n documentTypeList: documentTypeList, //.filter(item => item.isActive === true),\r\n booleanList: booleanList\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n getColumns = () => {\r\n const lookupDocumentTypes = this.state.documentTypeList.reduce(function (\r\n acc: any,\r\n cur: any,\r\n i: number\r\n ) {\r\n acc[cur.id] = cur.displayNAme;\r\n\r\n return acc;\r\n },\r\n {});\r\n const lookupBoolean = this.state.booleanList.reduce(function (acc: any, cur: any, i: number) {\r\n acc[cur.id] = cur.displayName;\r\n\r\n return acc;\r\n }, {});\r\n\r\n return [\r\n {\r\n field: 'documentTypeId',\r\n title: this.translatorService.Tranlate(\r\n 'WORKFLOW_DOCUMENTS_TYPE_TAB_DOCUMENT_TYPE_HEADER',\r\n 'Tip Document'\r\n ),\r\n lookup: lookupDocumentTypes,\r\n sorting: false,\r\n render: (rowData: WorkflowDocumentType) => {\r\n return rowData.documentType!.displayName;\r\n },\r\n editComponent: (props: EditComponentProps) => {\r\n return (\r\n props.onChange(e.target.value)}\r\n >\r\n {this.state.documentTypeList.map((item) => (\r\n \r\n {item.displayName}\r\n \r\n ))}\r\n \r\n );\r\n }\r\n } as Column,\r\n {\r\n field: 'isMandatory',\r\n title: this.translatorService.Tranlate(\r\n 'WORKFLOW_DOCUMENTS_TYPE_TAB_MANDATORY_HEADER',\r\n 'Obligatoriu'\r\n ),\r\n lookup: lookupBoolean,\r\n sorting: false,\r\n render: (rowData: WorkflowDocumentType) => {\r\n return rowData.isMandatory\r\n ? this.state.booleanList[0].displayName\r\n : this.state.booleanList[1].displayName;\r\n },\r\n editComponent: (props: EditComponentProps) => {\r\n let value = 0;\r\n\r\n if (isBoolean(props.value)) {\r\n if (props.value) {\r\n value = this.state.booleanList[0].id;\r\n } else {\r\n value = this.state.booleanList[1].id;\r\n }\r\n } else {\r\n value = props.value;\r\n }\r\n\r\n return (\r\n props.onChange(e.target.value)}\r\n >\r\n {this.state.booleanList.map((item) => (\r\n \r\n {item.displayName}\r\n \r\n ))}\r\n \r\n );\r\n }\r\n } as Column,\r\n {\r\n field: 'isMultiple',\r\n title: this.translatorService.Tranlate(\r\n 'WORKFLOW_DOCUMENTS_TYPE_TAB_MULTPLE_HEADER',\r\n 'Multiple'\r\n ),\r\n lookup: lookupBoolean,\r\n sorting: false,\r\n render: (rowData: WorkflowDocumentType) => {\r\n return rowData.isMultiple\r\n ? this.state.booleanList[0].displayName\r\n : this.state.booleanList[1].displayName;\r\n },\r\n editComponent: (props: EditComponentProps) => {\r\n let value = 0;\r\n\r\n if (isBoolean(props.value)) {\r\n if (props.value) {\r\n value = this.state.booleanList[0].id;\r\n } else {\r\n value = this.state.booleanList[1].id;\r\n }\r\n } else {\r\n value = props.value;\r\n }\r\n\r\n return (\r\n props.onChange(e.target.value)}\r\n >\r\n {this.state.booleanList.map((item) => (\r\n \r\n {item.displayName}\r\n \r\n ))}\r\n \r\n );\r\n }\r\n } as Column,\r\n {\r\n field: 'isSelectionGroup',\r\n title: this.translatorService.Tranlate(\r\n 'WORKFLOW_DOCUMENTS_TYPE_TAB_SELECTION_HEADER',\r\n 'Selection'\r\n ),\r\n lookup: lookupBoolean,\r\n sorting: false,\r\n render: (rowData: WorkflowDocumentType) => {\r\n return rowData.isSelectionGroup\r\n ? this.state.booleanList[0].displayName\r\n : this.state.booleanList[1].displayName;\r\n },\r\n editComponent: (props: EditComponentProps) => {\r\n let value = 0;\r\n\r\n if (isBoolean(props.value)) {\r\n if (props.value) {\r\n value = this.state.booleanList[0].id;\r\n } else {\r\n value = this.state.booleanList[1].id;\r\n }\r\n } else {\r\n value = props.value;\r\n }\r\n\r\n return (\r\n props.onChange(e.target.value)}\r\n >\r\n {this.state.booleanList.map((item) => (\r\n \r\n {item.displayName}\r\n \r\n ))}\r\n \r\n );\r\n }\r\n } as Column,\r\n {\r\n field: 'dateModification',\r\n title: this.translatorService.Tranlate(\r\n 'WORKFLOW_DOCUMENTS_TYPE_TAB_MODIFIED_DATE_HEADER',\r\n 'Data modificare'\r\n ),\r\n render: (rowData: any) => {\r\n return moment\r\n .utc(rowData.dateModification)\r\n .local()\r\n .format(this.props.appState.longDateFormat);\r\n },\r\n editComponent: (props: EditComponentProps) => {\r\n return ;\r\n }\r\n } as Column\r\n ];\r\n };\r\n\r\n public getLocalization = () => {\r\n return {\r\n header: { actions: '' },\r\n toolbar: {\r\n searchPlaceholder: this.translatorService.Tranlate('SEARCH', 'Cauta'),\r\n searchTooltip: this.translatorService.Tranlate('SEARCH', 'Cauta')\r\n },\r\n body: {\r\n editTooltip: this.translatorService.Tranlate('EDIT', 'Editeaza'),\r\n deleteTooltip: this.translatorService.Tranlate('DELETE', 'Sterge'),\r\n addTooltip: this.translatorService.Tranlate('Add', 'Adauga'),\r\n emptyDataSourceMessage: this.translatorService.Tranlate(\r\n 'NO_RECORDS_TO_DISPLAY',\r\n 'Nu exista date de afisat'\r\n ),\r\n editRow: {\r\n cancelTooltip: this.translatorService.Tranlate('CANCEL', 'Anuleaza'),\r\n saveTooltip: this.translatorService.Tranlate('SAVE', 'Salveaza'),\r\n deleteText: this.translatorService.Tranlate(\r\n 'DELETE_TEXT',\r\n 'Sigur doriti sa stergeti aceasta inregistrare?'\r\n )\r\n }\r\n },\r\n pagination: {\r\n labelRowsSelect: this.translatorService.Tranlate('ROWS', 'inregistrari'),\r\n firstTooltip: this.translatorService.Tranlate('FIRST_PAGE', 'Prima pagina'),\r\n previousTooltip: this.translatorService.Tranlate('PREVIOUS_PAGE', 'Pagina precedenta'),\r\n nextTooltip: this.translatorService.Tranlate('NEXT_PAGE', 'Pagina urmatoare'),\r\n lastTooltip: this.translatorService.Tranlate('LAST_PAGE', 'Ultima pagina'),\r\n labelDisplayedRows:\r\n '{from}-{to} ' + this.translatorService.Tranlate('OF', 'din') + ' {count}'\r\n }\r\n };\r\n };\r\n\r\n onRowUpdate = (newData: WorkflowDocumentType, oldData?: WorkflowDocumentType): Promise =>\r\n new Promise(async (resolve, reject) => {\r\n if (oldData) {\r\n try {\r\n if (isNullOrUndefined(newData.documentTypeId) || isNullOrUndefined(newData.isMandatory)) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n return;\r\n }\r\n\r\n if (\r\n this.state.workflowDocumentTypes.findIndex(\r\n (item) => item.documentTypeId === newData.documentTypeId && item.id !== newData.id\r\n ) !== -1\r\n ) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'ERROR_MSG_DOCUMENT_TYPE_EXISTS',\r\n 'Tipul de document exista deja!'\r\n ),\r\n { variant: 'error' }\r\n );\r\n reject();\r\n return;\r\n }\r\n\r\n await this.workflowService.UpdateWorkflowDocumentType(newData);\r\n await this.loadData();\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n resolve();\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n }\r\n });\r\n\r\n onRowDelete = (oldData: WorkflowDocumentType): Promise =>\r\n new Promise(async (resolve, reject) => {\r\n if (oldData) {\r\n try {\r\n await this.workflowService.RemoveWorkflowDocumentType(oldData.id);\r\n await this.loadData();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n\r\n resolve();\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n }\r\n });\r\n\r\n onRowAdd = (newData: WorkflowDocumentType): Promise =>\r\n new Promise(async (resolve, reject) => {\r\n try {\r\n if (isNullOrUndefined(newData.documentTypeId) || isNullOrUndefined(newData.isMandatory)) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n return;\r\n }\r\n\r\n if (\r\n this.state.workflowDocumentTypes.findIndex(\r\n (item) => item.documentTypeId === newData.documentTypeId\r\n ) !== -1\r\n ) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'ERROR_MSG_DOCUMENT_TYPE_EXISTS',\r\n 'Tipul de document exista deja!'\r\n ),\r\n { variant: 'error' }\r\n );\r\n reject();\r\n return;\r\n }\r\n\r\n newData.workflowSectionStepFormId = this.props.workflowFormId;\r\n\r\n await this.workflowService.AddWorkflowDocumentType(newData);\r\n await this.loadData();\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n resolve();\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n });\r\n\r\n public renderTable = () => {\r\n return (\r\n this.onRowAdd(newData),\r\n onRowUpdate: (newData: any, oldData?: any) => this.onRowUpdate(newData, oldData),\r\n onRowDelete: (oldData: any) => this.onRowDelete(oldData)\r\n }}\r\n />\r\n );\r\n };\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.workflowService = (this.context as AppContext).workflowService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n return (\r\n \r\n {/* \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n */}\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? this.renderTable() : null}\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalorkflowDocumentTypesProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\nexport default connect(\r\n (state: ApplicationState) => ({ appState: state.app }),\r\n { ...AppUserAdminActionCreators, ...AppActionCreators },\r\n mergeProps\r\n)(withSnackbar(WorkflowDocumentTypes as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport { IOrganizationService } from '../../../services/Interfaces/IOrganizationService';\r\nimport {\r\n Box,\r\n Button,\r\n Card,\r\n CardContent,\r\n Switch,\r\n FormControlLabel,\r\n Typography,\r\n IconButton,\r\n Grid,\r\n Divider\r\n} from '@material-ui/core';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport MUIDataTable, {\r\n MUIDataTableColumnOptions,\r\n MUIDataTableMeta,\r\n SelectableRows\r\n} from 'mui-datatables';\r\nimport moment from 'moment';\r\nimport { MUITranslations } from '../../../helpers/MUITableTranslations';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ValidatorForm, TextValidator } from 'react-material-ui-form-validator';\r\nimport Autocomplete, { createFilterOptions } from '@material-ui/lab/Autocomplete';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport Referentials from '../../../helpers/Referentials.json';\r\nimport { ReferentialCode } from '../../../helpers/Constants';\r\nimport { WorkflowPartner, WorkflowCalculation } from '../../../interfaces/Workflow';\r\nimport { IWorkflowService } from '../../../services/Interfaces/IWorkflowService';\r\nimport { IReferential } from '../../../interfaces/IReferential';\r\nimport { Input } from 'reactstrap';\r\nimport DeleteOutlineTwoToneIcon from '@material-ui/icons/DeleteOutlineTwoTone';\r\nimport { WrapperSimple } from '../../../layout-components';\r\nimport { isNullOrUndefined } from 'util';\r\n\r\ninterface IWorkflowCalculationState {\r\n workflowCalculations: WorkflowCalculation[];\r\n isLoading: boolean;\r\n workflowPartnerTypeList: WorkflowPartner[];\r\n selecteWorkflowPartnerType: WorkflowPartner | null;\r\n caseStatusTypeList: IReferential[];\r\n selectedCaseStatusType: IReferential | null;\r\n isSelectedWorkflowCalculation: boolean;\r\n newWorkflowCalculation: WorkflowCalculation | null;\r\n selectedUserRole: IReferential | null;\r\n userRoles: IReferential[];\r\n}\r\n\r\nexport interface ExternalCalculationFormActionProps {\r\n workflowFormId: number;\r\n}\r\n\r\ntype IWorkflowCalculationProps = ExternalCalculationFormActionProps & {\r\n appState: AppState;\r\n} & ProviderContext &\r\n RouteComponentProps<{ id: string; workflowId: string }>;\r\n\r\nclass WorkflowCalculations extends React.PureComponent<\r\n IWorkflowCalculationProps,\r\n IWorkflowCalculationState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private organizationService!: IOrganizationService;\r\n private workflowService!: IWorkflowService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n workflowCalculations: [],\r\n isLoading: false,\r\n workflowPartnerTypeList: [],\r\n selecteWorkflowPartnerType: null,\r\n caseStatusTypeList: [],\r\n selectedCaseStatusType: null,\r\n isSelectedWorkflowCalculation: false,\r\n newWorkflowCalculation: null,\r\n selectedUserRole: null,\r\n userRoles: []\r\n } as IWorkflowCalculationState;\r\n\r\n public componentDidMount() {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n const workflowId = Number.parseInt(this.props.match.params.workflowId);\r\n\r\n if (Number.isNaN(hoId) || Number.isNaN(workflowId)) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadWorkflowCalculations();\r\n }\r\n );\r\n }\r\n\r\n loadWorkflowCalculations = async () => {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n const workflowId = Number.parseInt(this.props.match.params.workflowId);\r\n\r\n if (Number.isNaN(hoId) || Number.isNaN(workflowId)) {\r\n return;\r\n }\r\n\r\n const ref = Referentials.referential.find((item) => item.code === ReferentialCode.CaseStatus);\r\n const refRole = Referentials.referential.find((item) => item.code === ReferentialCode.UserRole);\r\n\r\n const [workflowCalculations, workflowPartnerList, caseStatusTypes, userRoles] =\r\n await Promise.all([\r\n this.workflowService.GetWorkflowCalculations(this.props.workflowFormId),\r\n this.workflowService.GetWorkflowPartners(workflowId),\r\n this.appReferentialService.Get(ref!.baseUrl),\r\n this.appReferentialService.Get(refRole!.baseUrl)\r\n ]);\r\n\r\n const partners = await this.organizationService.GetOrganizationsByIds(\r\n workflowPartnerList.map((item) => item.partnerId)\r\n );\r\n workflowPartnerList.forEach((wpItem) => {\r\n const partner = partners.find((item) => item.id === wpItem.partnerId);\r\n wpItem.partner = isNullOrUndefined(partner) ? null : partner;\r\n });\r\n\r\n workflowCalculations.forEach((wcItem) => {\r\n const wc = workflowPartnerList.find((item) => item.id === wcItem.workflowPartnerId);\r\n const cs = caseStatusTypes.find((item) => item.id === wcItem.caseStatusId);\r\n\r\n wcItem.workflowPartner = isNullOrUndefined(wc) ? null : wc;\r\n wcItem.caseStatus = isNullOrUndefined(cs) ? null : cs;\r\n });\r\n\r\n this.setState({\r\n workflowCalculations: workflowCalculations,\r\n caseStatusTypeList: caseStatusTypes.filter((item) => item.isActive === true),\r\n workflowPartnerTypeList: workflowPartnerList.filter((item) => item.isActive === true),\r\n userRoles: userRoles.filter((item) => item.isActive === true),\r\n isLoading: false\r\n });\r\n };\r\n\r\n reloadWorkflowCalculation = async (organizationId: number | null) => {\r\n let workflowCalculations = await this.workflowService.GetWorkflowCalculations(\r\n this.props.workflowFormId\r\n );\r\n\r\n workflowCalculations.forEach((wcItem) => {\r\n const wc = this.state.workflowPartnerTypeList.find(\r\n (item) => item.id === wcItem.workflowPartnerId\r\n );\r\n const cs = this.state.caseStatusTypeList.find((item) => item.id === wcItem.caseStatusId);\r\n\r\n wcItem.workflowPartner = isNullOrUndefined(wc) ? null : wc;\r\n wcItem.caseStatus = isNullOrUndefined(cs) ? null : cs;\r\n });\r\n\r\n if (organizationId !== null) {\r\n workflowCalculations = [\r\n ...workflowCalculations.filter((item) => item.workflowPartnerId === organizationId)\r\n ];\r\n }\r\n this.setState({\r\n isLoading: false,\r\n workflowCalculations: workflowCalculations\r\n });\r\n };\r\n\r\n handleIsActiveChange = async (event: React.ChangeEvent, id: number) => {\r\n const workflowCalculations = [...this.state.workflowCalculations];\r\n const updatedWorkflowCalculationIndex = workflowCalculations.findIndex((o) => o.id === id);\r\n\r\n if (updatedWorkflowCalculationIndex >= 0) {\r\n workflowCalculations[updatedWorkflowCalculationIndex] = {\r\n ...workflowCalculations[updatedWorkflowCalculationIndex],\r\n [event.target.id]: event.target.checked\r\n };\r\n\r\n try {\r\n await this.workflowService.UpdateWorkflowCalculation(\r\n workflowCalculations[updatedWorkflowCalculationIndex]\r\n );\r\n\r\n this.setState({ workflowCalculations: workflowCalculations });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n\r\n onRowClick = (workflowCalculationId: number) => {\r\n const newWorkflowCalculation = {\r\n ...this.state.workflowCalculations.find((item) => item.id === workflowCalculationId)\r\n } as WorkflowCalculation;\r\n this.setState({\r\n newWorkflowCalculation: newWorkflowCalculation,\r\n isSelectedWorkflowCalculation: true\r\n });\r\n };\r\n\r\n filterCaseStatus = (workflowCalculations: any[]) => {\r\n //const caseStatusTypes = [{ id: 0, displayName: \"Initiat\" }, { id: 1, displayName: \"Deviz OE\" }, { id: 2, displayName: \"Inchis\" }];\r\n\r\n return this.state.caseStatusTypeList.filter(\r\n (item) => workflowCalculations.find((r) => r.caseStatusId === item.id) === undefined\r\n );\r\n };\r\n\r\n deleteCalculation = async (event: any, tableMeta: MUIDataTableMeta) => {\r\n try {\r\n const index = this.state.workflowCalculations.findIndex((i) => i.id === tableMeta.rowData[0]);\r\n const deletedCalculation = this.state.workflowCalculations[index];\r\n const newWorkflowCalculationsArray = [...this.state.workflowCalculations];\r\n newWorkflowCalculationsArray.splice(index, 1);\r\n\r\n await this.workflowService.RemoveWorkflowCalculation(deletedCalculation.id);\r\n\r\n this.setState({\r\n workflowCalculations: newWorkflowCalculationsArray\r\n // caseStatusTypeList: this.filterCaseStatus(newWorkflowCalculationsArray)\r\n });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'workflowPartner.partner.displayName',\r\n label: this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_ORGANIZATION_HEADER',\r\n 'Organizatie'\r\n ),\r\n options: {\r\n customBodyRender: (value: string, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.onRowClick(tableMeta.rowData[0])}\r\n >\r\n {value}\r\n \r\n );\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'caseStatus',\r\n label: this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_CASE_STATUS_HEADER',\r\n 'Status Dosar'\r\n ),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: any) => {\r\n return value.displayName;\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'userRole',\r\n label: this.translatorService.Tranlate('WORKFLOW_USER_ROLE_LABEL', 'Rol'),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: any) => {\r\n return value ? value.displayName : '';\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n // {\r\n // name: 'originalCalculation',\r\n // label: this.translatorService.Tranlate(\"WORKFLOW_CALCULATION_TAB_ORIGINAL_CALCULATION_HEADER\", \"Calculatie Originala\"),\r\n // options: {\r\n // filter: false,\r\n // sort: false,\r\n // // filterOptions: {\r\n // // names: [this.translatorService.Tranlate(\"TABLE_IS_ACTIVE_COLUMN_ACTIVE\", \"Activ\"), this.translatorService.Tranlate(\"TABLE_IS_ACTIVE_COLUMN_INACTIVE\", \"Inactiv\")],\r\n // // logic(isActive: any, filterVal: string[]) {\r\n // // const show =\r\n // // (filterVal.indexOf(this.names[0]) !== -1 && isActive === true) ||\r\n // // (filterVal.indexOf(this.names[1]) !== -1 && isActive === false);\r\n // // return !show;\r\n // // },\r\n // // },\r\n // customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n // return (\r\n // this.handleIsActiveChange(e, tableMeta.rowData[0])}\r\n // color=\"primary\"\r\n // inputProps={{ 'aria-label': 'primary checkbox' }}\r\n // />)\r\n // }\r\n\r\n // }\r\n // },\r\n // {\r\n // name: 'alternativeCalculation',\r\n // label: this.translatorService.Tranlate(\"WORKFLOW_CALCULATION_TAB_ALTERNATIVE_CALCULATION_HEADER\", \"Calculatie Alternativa\"),\r\n // options: {\r\n // filter: false,\r\n // sort: false,\r\n // // filterOptions: {\r\n // // names: [this.translatorService.Tranlate(\"TABLE_IS_ACTIVE_COLUMN_ACTIVE\", \"Activ\"), this.translatorService.Tranlate(\"TABLE_IS_ACTIVE_COLUMN_INACTIVE\", \"Inactiv\")],\r\n // // logic(isActive: any, filterVal: string[]) {\r\n // // const show =\r\n // // (filterVal.indexOf(this.names[0]) !== -1 && isActive === true) ||\r\n // // (filterVal.indexOf(this.names[1]) !== -1 && isActive === false);\r\n // // return !show;\r\n // // },\r\n // // },\r\n // customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n // return (\r\n // this.handleIsActiveChange(e, tableMeta.rowData[0])}\r\n // color=\"primary\"\r\n // inputProps={{ 'aria-label': 'primary checkbox' }}\r\n // />)\r\n // }\r\n\r\n // }\r\n // },\r\n {\r\n name: 'dateModification',\r\n label: this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_DATE_MODIFICATION_HEADER',\r\n 'Data Modificare'\r\n ),\r\n options: {\r\n filter: false,\r\n customBodyRender: (value: Date) =>\r\n moment.utc(value).local().format(this.props.appState.longDateFormat)\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: '',\r\n options: {\r\n filter: false,\r\n setCellHeaderProps: () => ({ align: 'center' }),\r\n setCellProps: () => ({ align: 'center' }),\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.deleteCalculation(e, tableMeta)}\r\n >\r\n \r\n \r\n );\r\n }\r\n }\r\n }\r\n ];\r\n\r\n return columns;\r\n };\r\n\r\n addWorkflowCalcType = async () => {\r\n try {\r\n if (\r\n this.state.workflowCalculations.findIndex(\r\n (item) =>\r\n item.workflowPartnerId === this.state.selecteWorkflowPartnerType!.id &&\r\n ((this.state.selectedUserRole !== null &&\r\n item.userRoleId === this.state.selectedUserRole!.id) ||\r\n (this.state.selectedUserRole === null && item.userRoleId !== null) ||\r\n (this.state.selectedUserRole !== null && item.userRoleId === null) ||\r\n (this.state.selectedUserRole === null && item.userRoleId === null)) &&\r\n item.caseStatusId === this.state.selectedCaseStatusType!.id\r\n ) !== -1\r\n ) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'ERROR_MSG_WORKFLOW_CALCULATION_EXISTS',\r\n 'Calculatia exista deja!'\r\n ),\r\n { variant: 'error' }\r\n );\r\n return;\r\n }\r\n\r\n await this.workflowService.AddWorkflowCalculation({\r\n id: 0,\r\n workflowSectionStepFormId: this.props.workflowFormId,\r\n workflowPartnerId: this.state.selecteWorkflowPartnerType\r\n ? this.state.selecteWorkflowPartnerType!.id\r\n : 0,\r\n caseStatusId: this.state.selectedCaseStatusType ? this.state.selectedCaseStatusType!.id : 0,\r\n userRoleId: this.state.selectedUserRole ? this.state.selectedUserRole.id : null\r\n } as WorkflowCalculation);\r\n\r\n this.setState(\r\n {\r\n isLoading: true,\r\n selectedCaseStatusType: null,\r\n selectedUserRole: null\r\n },\r\n async () => {\r\n await this.reloadWorkflowCalculation(this.state.selecteWorkflowPartnerType!.id);\r\n }\r\n );\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n handleCaseStatusChange = (newValue: any | null) => {\r\n this.setState({ selectedCaseStatusType: newValue });\r\n };\r\n handleUserRoleChange = (newValue: any | null) => {\r\n this.setState({ selectedUserRole: newValue });\r\n };\r\n handleWorkflowPartnerChange = (newValue: WorkflowPartner | null) => {\r\n this.setState(\r\n {\r\n selecteWorkflowPartnerType: newValue,\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.reloadWorkflowCalculation(newValue ? newValue.id : null);\r\n }\r\n );\r\n };\r\n\r\n renderAddForm() {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n this.handleWorkflowPartnerChange(newValue)\r\n }\r\n getOptionLabel={(option: WorkflowPartner) => option.partner!.displayName || ''}\r\n filterOptions={createFilterOptions({\r\n matchFrom: 'any',\r\n stringify: (option: WorkflowPartner) => option.partner!.displayName\r\n })}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n this.handleCaseStatusChange(newValue)}\r\n getOptionLabel={(option: any) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n this.handleUserRoleChange(newValue)}\r\n getOptionLabel={(option: any) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n\r\n saveCalculationsChange = async () => {\r\n const workflowCalculations = [...this.state.workflowCalculations];\r\n const updatedWorkflowCalculationIndex = workflowCalculations.findIndex(\r\n (o) => o.id === this.state.newWorkflowCalculation!.id\r\n );\r\n\r\n if (updatedWorkflowCalculationIndex >= 0) {\r\n workflowCalculations[updatedWorkflowCalculationIndex] = this.state.newWorkflowCalculation!;\r\n\r\n try {\r\n await this.workflowService.UpdateWorkflowCalculation(this.state.newWorkflowCalculation!);\r\n\r\n this.setState({\r\n workflowCalculations: workflowCalculations,\r\n selectedCaseStatusType: null,\r\n newWorkflowCalculation: null,\r\n isSelectedWorkflowCalculation: false,\r\n selectedUserRole: null\r\n });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n renderCalculations = () => {\r\n return (\r\n \r\n this.saveCalculationsChange()}>\r\n \r\n \r\n \r\n
\r\n
\r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_CONFIGURE_CALCULATION_LIST_LABEL',\r\n 'Servicii GTM'\r\n )}\r\n
\r\n \r\n
\r\n \r\n this.setState({\r\n newWorkflowCalculation: {\r\n ...this.state.newWorkflowCalculation!,\r\n originalCalculation: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_ORIGINAL_CALCULATION_LABEL',\r\n 'Calculatie Originala'\r\n )}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n \r\n this.setState({\r\n newWorkflowCalculation: {\r\n ...this.state.newWorkflowCalculation!,\r\n vinInterogation: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_VIN_INTEROGATION_LABEL',\r\n 'Interogare VIN'\r\n )}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n \r\n this.setState({\r\n newWorkflowCalculation: {\r\n ...this.state.newWorkflowCalculation!,\r\n hideEconomicParts: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_HIDE_ECONOMIC_PARTS_LABEL',\r\n 'Ascunde piese de tip Economic'\r\n )}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n \r\n this.setState({\r\n newWorkflowCalculation: {\r\n ...this.state.newWorkflowCalculation!,\r\n alternativeCalculation: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_ALTERNATIVE_CALCULATION_LABEL',\r\n 'Calculatie alternativa'\r\n )}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n \r\n this.setState({\r\n newWorkflowCalculation: {\r\n ...this.state.newWorkflowCalculation!,\r\n gtValuation: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_GT_VALUATION_LABEL',\r\n 'GT Valuation'\r\n )}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n \r\n this.setState({\r\n newWorkflowCalculation: {\r\n ...this.state.newWorkflowCalculation!,\r\n compare: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_COMPARE_LABEL',\r\n 'Compara'\r\n )}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n \r\n this.setState({\r\n newWorkflowCalculation: {\r\n ...this.state.newWorkflowCalculation!,\r\n qualityControlCertificate: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_QUALITY_CONTROL_LABEL',\r\n 'Control calitate'\r\n )}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n \r\n this.setState({\r\n newWorkflowCalculation: {\r\n ...this.state.newWorkflowCalculation!,\r\n radar: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_RADAR_LABEL',\r\n 'Radar'\r\n )}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n \r\n this.setState({\r\n newWorkflowCalculation: {\r\n ...this.state.newWorkflowCalculation!,\r\n insurerCalculation: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_UPDATE_CALCULATION_LABEL',\r\n 'Actualizare calculatie cu tarife asigurator'\r\n )}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n \r\n this.setState({\r\n newWorkflowCalculation: {\r\n ...this.state.newWorkflowCalculation!,\r\n hasMultipleTariff: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_HAS_MULTIPLE_TARIFF_LABEL',\r\n 'Tarife multiple'\r\n )}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n \r\n this.setState({\r\n newWorkflowCalculation: {\r\n ...this.state.newWorkflowCalculation!,\r\n hasBackButton: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_HAS_BACK_BUTTON_LABEL',\r\n 'Buton de revenire'\r\n )}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_ALTERNATIVE_CALCULATION_LABEL',\r\n 'Calculatie alternativa'\r\n )}\r\n
\r\n \r\n
\r\n \r\n this.setState({\r\n newWorkflowCalculation: {\r\n ...this.state.newWorkflowCalculation!,\r\n editGuideNumber: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_EDIT_GUIDE_NUMBER_LABEL',\r\n 'Modifica Guide Number Manual'\r\n )}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n \r\n this.setState({\r\n newWorkflowCalculation: {\r\n ...this.state.newWorkflowCalculation!,\r\n editQuantity: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_EDIT_QUANTITY_LABEL',\r\n 'Modifica Cantitate Manual'\r\n )}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n \r\n this.setState({\r\n newWorkflowCalculation: {\r\n ...this.state.newWorkflowCalculation!,\r\n addOriginalPart: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_ADD_ORIGINAL_PART_LABEL',\r\n 'Adauga piese originale'\r\n )}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n \r\n this.setState({\r\n newWorkflowCalculation: {\r\n ...this.state.newWorkflowCalculation!,\r\n addAlternativePart: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_ADD_ALTERNATIV_PART_LABEL',\r\n 'Adauga Piese Alternative'\r\n )}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n \r\n this.setState({\r\n newWorkflowCalculation: {\r\n ...this.state.newWorkflowCalculation!,\r\n deleteOriginalPart: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_DELETE_ORIGINAL_PART_LABEL',\r\n 'Sterge Piese Originale Manual'\r\n )}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n \r\n this.setState({\r\n newWorkflowCalculation: {\r\n ...this.state.newWorkflowCalculation!,\r\n importOriginalParts: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_IMPORT_ORIGINAL_PARTS_LABEL',\r\n 'Importa Piese Originale Fisier'\r\n )}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n \r\n this.setState({\r\n newWorkflowCalculation: {\r\n ...this.state.newWorkflowCalculation!,\r\n importAlternativeParts: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_IMPORT_ALTERNATIVE_PART_LABEL',\r\n 'Importa Piese Alternative Fisier'\r\n )}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n \r\n this.setState({\r\n newWorkflowCalculation: {\r\n ...this.state.newWorkflowCalculation!,\r\n selectAlternativePart: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_SELECT_ALTERNATIV_PART_LABEL',\r\n 'Selecta Manual Piese Alternative'\r\n )}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n \r\n this.setState({\r\n newWorkflowCalculation: {\r\n ...this.state.newWorkflowCalculation!,\r\n tmlEditable: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_TML_EDITABLE_LABEL',\r\n 'TML Editabil'\r\n )}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n \r\n this.setState({\r\n newWorkflowCalculation: {\r\n ...this.state.newWorkflowCalculation!,\r\n defaultMaxDeliveryTime: parseInt(e.target.value)\r\n }\r\n })\r\n }\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_DEFAULT_MAX_DELIVERY_TIME_LABEL',\r\n 'Timp Maxim de Livrare Implicit'\r\n )}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n \r\n this.setState({\r\n newWorkflowCalculation: {\r\n ...this.state.newWorkflowCalculation!,\r\n alternativeCalculationWithoutOriginal: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_ALTERNATIVE_WITHOUT_ORIGINAL_EDITABLE_LABEL',\r\n 'Alternativa fara Calculatie Originala'\r\n )}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n \r\n this.setState({\r\n newWorkflowCalculation: {\r\n ...this.state.newWorkflowCalculation!,\r\n interogatePartner: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_INTEROGATE_PARTNER_EDITABLE_LABEL',\r\n 'Interogare la Partener'\r\n )}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n \r\n this.setState({\r\n newWorkflowCalculation: {\r\n ...this.state.newWorkflowCalculation!,\r\n alternativePartner: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_ALTERNATIVE_PARTNER_EDITABLE_LABEL',\r\n 'Alternativa la Partener'\r\n )}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n \r\n this.setState({\r\n newWorkflowCalculation: {\r\n ...this.state.newWorkflowCalculation!,\r\n alternativeNetPrice: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_ALTERNATIVE_LKQ_NET_PRICE_EDITABLE_LABEL',\r\n 'Pret Net LKQ Alternativ'\r\n )}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n \r\n this.setState({\r\n newWorkflowCalculation: {\r\n ...this.state.newWorkflowCalculation!,\r\n viewOptim: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_VIEW_OPTIM_EDITABLE_LABEL',\r\n 'Buton Optim'\r\n )}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n \r\n this.setState({\r\n newWorkflowCalculation: {\r\n ...this.state.newWorkflowCalculation!,\r\n viewPrcNewColumns: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_VIEW_PRC_COLUMNS_EDITABLE_LABEL',\r\n 'Coloane noi PRC'\r\n )}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n \r\n this.setState({\r\n newWorkflowCalculation: {\r\n ...this.state.newWorkflowCalculation!,\r\n serviceOwnStock: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_SERVICE_OWN_STOCK_EDITABLE_LABEL',\r\n 'Stoc propriu service'\r\n )}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n \r\n this.setState({\r\n newWorkflowCalculation: {\r\n ...this.state.newWorkflowCalculation!,\r\n oilMapping: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_OIL_MAPPING_EDITABLE_LABEL',\r\n 'Mapare uleiuri'\r\n )}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n \r\n this.setState({\r\n newWorkflowCalculation: {\r\n ...this.state.newWorkflowCalculation!,\r\n allPartsHasBeenInterogated: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_SERVICE_ALL_PARTS_INTEROGATED_LABEL',\r\n 'Mesaj daca nu are toate piesele interogate'\r\n )}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n \r\n this.setState({\r\n newWorkflowCalculation: {\r\n ...this.state.newWorkflowCalculation!,\r\n viewClientCommentsHistory: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_SERVICE_VIEW_CLIENT_COMMENTS_HISTORY_LABEL',\r\n 'Istoric comentarii client pe deviz'\r\n )}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n \r\n this.setState({\r\n newWorkflowCalculation: {\r\n ...this.state.newWorkflowCalculation!,\r\n byAquisitionPrice: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_SERVICE_BY_AQUISITION_PRICE_LABEL',\r\n 'Optim bazat pe pretul de achizitie'\r\n )}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n \r\n this.setState({\r\n newWorkflowCalculation: {\r\n ...this.state.newWorkflowCalculation!,\r\n hasHistoryInterogation: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_HAS_HISTORY_INTEROGATION_LABEL',\r\n 'Istoric interogari'\r\n )}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n \r\n this.setState({\r\n newWorkflowCalculation: {\r\n ...this.state.newWorkflowCalculation!,\r\n hasAlternativePartDescription: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_HAS_ALTERNATIVE_PART_DESCRIPTION_LABEL',\r\n 'Descriere piese alternative'\r\n )}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n \r\n this.setState({\r\n newWorkflowCalculation: {\r\n ...this.state.newWorkflowCalculation!,\r\n addNotifySupportOriginalPart: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_NOTIFY_SUPPORT_LABEL',\r\n 'Notifica support'\r\n )}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_CALCULATION_DATA_LABEL',\r\n 'Detalii Calculatie'\r\n )}\r\n
\r\n \r\n
\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_CALCULATION_DATA_CAR_PARTS_LABEL',\r\n 'PIESE'\r\n )}\r\n \r\n \r\n this.setState({\r\n newWorkflowCalculation: {\r\n ...this.state.newWorkflowCalculation!,\r\n addCarParts: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_CALCULATION_DATA_ADD_LABEL',\r\n 'Adauga'\r\n )}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n \r\n this.setState({\r\n newWorkflowCalculation: {\r\n ...this.state.newWorkflowCalculation!,\r\n deleteCarParts: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_CALCULATION_DATA_DELETE_LABEL',\r\n 'Sterge'\r\n )}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n \r\n this.setState({\r\n newWorkflowCalculation: {\r\n ...this.state.newWorkflowCalculation!,\r\n editCarParts: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_CALCULATION_DATA_EDIT_LABEL',\r\n 'Editeaza'\r\n )}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_CALCULATION_DATA_LABOR_LABEL',\r\n 'MANOPERA'\r\n )}\r\n \r\n \r\n this.setState({\r\n newWorkflowCalculation: {\r\n ...this.state.newWorkflowCalculation!,\r\n addLabor: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_CALCULATION_DATA_ADD_LABEL',\r\n 'Adauga'\r\n )}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n \r\n this.setState({\r\n newWorkflowCalculation: {\r\n ...this.state.newWorkflowCalculation!,\r\n deleteLabor: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_CALCULATION_DATA_DELETE_LABEL',\r\n 'Sterge'\r\n )}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n \r\n this.setState({\r\n newWorkflowCalculation: {\r\n ...this.state.newWorkflowCalculation!,\r\n editLabor: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_CALCULATION_DATA_EDIT_LABEL',\r\n 'Editeaza'\r\n )}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_CALCULATION_DATA_PAINTING_MATERIALS_LABEL',\r\n 'MATERIALE VOPSITORIE'\r\n )}\r\n \r\n \r\n this.setState({\r\n newWorkflowCalculation: {\r\n ...this.state.newWorkflowCalculation!,\r\n addPaintingMaterials: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_CALCULATION_DATA_ADD_LABEL',\r\n 'Adauga'\r\n )}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n \r\n this.setState({\r\n newWorkflowCalculation: {\r\n ...this.state.newWorkflowCalculation!,\r\n deletePaintingMaterials: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_CALCULATION_DATA_DELETE_LABEL',\r\n 'Sterge'\r\n )}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n \r\n this.setState({\r\n newWorkflowCalculation: {\r\n ...this.state.newWorkflowCalculation!,\r\n editPaintingMaterials: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_CALCULATION_DATA_EDIT_LABEL',\r\n 'Editeaza'\r\n )}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_CALCULATION_DATA_PAINTING_LABOR_LABEL',\r\n 'MANOPERA VOPSITORIE'\r\n )}\r\n \r\n \r\n this.setState({\r\n newWorkflowCalculation: {\r\n ...this.state.newWorkflowCalculation!,\r\n addPaintingLabor: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_CALCULATION_DATA_ADD_LABEL',\r\n 'Adauga'\r\n )}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n \r\n this.setState({\r\n newWorkflowCalculation: {\r\n ...this.state.newWorkflowCalculation!,\r\n deletePaintingLabor: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_CALCULATION_DATA_DELETE_LABEL',\r\n 'Sterge'\r\n )}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n \r\n this.setState({\r\n newWorkflowCalculation: {\r\n ...this.state.newWorkflowCalculation!,\r\n editPaintingLabor: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_CALCULATION_DATA_EDIT_LABEL',\r\n 'Editeaza'\r\n )}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n\r\n \r\n this.setState({\r\n newWorkflowCalculation: {\r\n ...this.state.newWorkflowCalculation!,\r\n importParts: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_CALCULATION_DATA_IMPORT_CAR_PARTS_LABEL',\r\n 'Importa Piese'\r\n )}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n \r\n this.setState({\r\n newWorkflowCalculation: {\r\n ...this.state.newWorkflowCalculation!,\r\n ownerSolutionView: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_CALCULATION_DATA_OWNER_SOLUTION_VIEW_LABEL',\r\n 'Solutie Proprietar-Citire'\r\n )}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n \r\n this.setState({\r\n newWorkflowCalculation: {\r\n ...this.state.newWorkflowCalculation!,\r\n ownerSolution: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_CALCULATION_DATA_OWNER_SOLUTION_LABEL',\r\n 'Solutie Proprietar'\r\n )}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n this.setState({\r\n selectedCaseStatusType: null,\r\n newWorkflowCalculation: null,\r\n isSelectedWorkflowCalculation: false\r\n })\r\n }\r\n >\r\n {this.translatorService.Tranlate('EDIT_ORGANIZATION_CANCEL_BTN', 'Anuleaza')}\r\n \r\n \r\n
\r\n
\r\n \r\n );\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.workflowService = (this.context as AppContext).workflowService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n const options = {\r\n filter: true,\r\n search: true,\r\n viewColumns: false,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n elevation: 1\r\n };\r\n\r\n return (\r\n \r\n {/* \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n */}\r\n {this.renderAddForm()}\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n this.state.isSelectedWorkflowCalculation === false ? (\r\n \r\n ) : (\r\n this.renderCalculations()\r\n )\r\n ) : null}\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalCalculationFormActionProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\nexport default connect(\r\n (state: ApplicationState) => ({ appState: state.app }),\r\n null,\r\n mergeProps\r\n)(withSnackbar(WorkflowCalculations as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport { IOrganizationService } from '../../../services/Interfaces/IOrganizationService';\r\nimport { Box, Button, Card, CardContent, IconButton } from '@material-ui/core';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport MUIDataTable, {\r\n MUIDataTableColumnOptions,\r\n MUIDataTableMeta,\r\n SelectableRows\r\n} from 'mui-datatables';\r\nimport moment from 'moment';\r\nimport { MUITranslations } from '../../../helpers/MUITableTranslations';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ValidatorForm, TextValidator } from 'react-material-ui-form-validator';\r\nimport Autocomplete, { createFilterOptions } from '@material-ui/lab/Autocomplete';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport Referentials from '../../../helpers/Referentials.json';\r\nimport { ReferentialCode } from '../../../helpers/Constants';\r\nimport { WorkflowPartner, WorkflowPermission } from '../../../interfaces/Workflow';\r\nimport { IWorkflowService } from '../../../services/Interfaces/IWorkflowService';\r\nimport { IReferential } from '../../../interfaces/IReferential';\r\nimport DeleteOutlineTwoToneIcon from '@material-ui/icons/DeleteOutlineTwoTone';\r\nimport { isNullOrUndefined } from 'util';\r\n\r\ninterface IWorkflowPermissionState {\r\n workflowPermissions: WorkflowPermission[];\r\n isLoading: boolean;\r\n workflowPartnerTypeList: WorkflowPartner[];\r\n selecteWorkflowPartnerType: WorkflowPartner | null;\r\n caseStatusTypeList: IReferential[];\r\n selectedCaseStatusType: IReferential | null;\r\n selectedUserRole: IReferential | null;\r\n userRoles: IReferential[];\r\n // workflowSectionStepList: WorkflowSectionStep[]\r\n // selecteWorkflowSectionStepType: WorkflowSectionStep | null\r\n // workflowId: number\r\n}\r\nexport interface ExternalPermissionFormActionProps {\r\n workflowFormId: number;\r\n}\r\n\r\ntype IWorkflowPermissionProps = ExternalPermissionFormActionProps & {\r\n appState: AppState;\r\n} & ProviderContext &\r\n RouteComponentProps<{ id: string; workflowId: string }>;\r\n\r\nclass WorkflowPermissions extends React.PureComponent<\r\n IWorkflowPermissionProps,\r\n IWorkflowPermissionState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private organizationService!: IOrganizationService;\r\n private workflowService!: IWorkflowService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n workflowPermissions: [],\r\n isLoading: false,\r\n workflowPartnerTypeList: [],\r\n selecteWorkflowPartnerType: null,\r\n caseStatusTypeList: [],\r\n selectedCaseStatusType: null,\r\n workflowSectionStepList: [],\r\n selecteWorkflowSectionStepType: null,\r\n selectedUserRole: null,\r\n userRoles: []\r\n // workflowId: 0\r\n } as IWorkflowPermissionState;\r\n\r\n public componentDidMount() {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n const workflowId = Number.parseInt(this.props.match.params.workflowId);\r\n\r\n if (Number.isNaN(hoId) || Number.isNaN(workflowId)) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadWorkflowPermissions();\r\n }\r\n );\r\n }\r\n\r\n loadWorkflowPermissions = async () => {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n const workflowId = Number.parseInt(this.props.match.params.workflowId);\r\n\r\n if (Number.isNaN(hoId) || Number.isNaN(workflowId)) {\r\n return;\r\n }\r\n\r\n const ref = Referentials.referential.find((item) => item.code === ReferentialCode.CaseStatus);\r\n const refRole = Referentials.referential.find((item) => item.code === ReferentialCode.UserRole);\r\n\r\n const [workflowPermissions, workflowPartnerList, caseStatusTypes, userRoles] =\r\n await Promise.all([\r\n this.workflowService.GetWorkflowPermissions(this.props.workflowFormId),\r\n this.workflowService.GetWorkflowPartners(workflowId),\r\n this.appReferentialService.Get(ref!.baseUrl),\r\n this.appReferentialService.Get(refRole!.baseUrl)\r\n // this.workflowService.GetWorkflowSteps(workflowId)\r\n ]);\r\n const partners = await this.organizationService.GetOrganizationsByIds(\r\n workflowPartnerList.map((item) => item.partnerId)\r\n );\r\n workflowPartnerList.forEach((wpItem) => {\r\n const partner = partners.find((item) => item.id === wpItem.partnerId);\r\n wpItem.partner = isNullOrUndefined(partner) ? null : partner;\r\n });\r\n\r\n workflowPermissions.forEach((wpItem) => {\r\n const partner = workflowPartnerList.find((item) => item.id === wpItem.workflowPartnerId);\r\n const caseStatus = caseStatusTypes.find((item) => item.id === wpItem.caseStatusId);\r\n\r\n wpItem.workflowPartner = isNullOrUndefined(partner) ? null : partner;\r\n wpItem.caseStatus = isNullOrUndefined(caseStatus) ? null : caseStatus;\r\n });\r\n this.setState({\r\n workflowPermissions: workflowPermissions,\r\n caseStatusTypeList: caseStatusTypes.filter((item) => item.isActive === true),\r\n workflowPartnerTypeList: workflowPartnerList.filter((item) => item.isActive === true),\r\n // workflowSectionStepList: workflowSectionStepList.filter(item => item.isActive === true),\r\n isLoading: false,\r\n userRoles: userRoles.filter((item) => item.isActive === true)\r\n // workflowId: workflowId\r\n });\r\n };\r\n\r\n createWorkflowPartner = async (item: WorkflowPartner) => {\r\n [item.partner] = await Promise.all([this.organizationService.GetOrganization(item.partnerId)]);\r\n\r\n return item;\r\n };\r\n\r\n handleIsActiveChange = async (event: React.ChangeEvent, id: number) => {\r\n const workflowPermissions = [...this.state.workflowPermissions];\r\n const updatedWorkflowPermissionIndex = workflowPermissions.findIndex((o) => o.id === id);\r\n\r\n if (updatedWorkflowPermissionIndex >= 0) {\r\n workflowPermissions[updatedWorkflowPermissionIndex] = {\r\n ...workflowPermissions[updatedWorkflowPermissionIndex],\r\n [event.target.id]: event.target.checked\r\n };\r\n\r\n try {\r\n await this.workflowService.UpdateWorkflowPermission(\r\n workflowPermissions[updatedWorkflowPermissionIndex]\r\n );\r\n\r\n this.setState({ workflowPermissions: workflowPermissions });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n\r\n deletePermission = async (event: any, tableMeta: MUIDataTableMeta) => {\r\n try {\r\n const index = this.state.workflowPermissions.findIndex((i) => i.id === tableMeta.rowData[0]);\r\n const deletedPermission = this.state.workflowPermissions[index];\r\n const newWorkflowPermissionsArray = [...this.state.workflowPermissions];\r\n newWorkflowPermissionsArray.splice(index, 1);\r\n\r\n await this.workflowService.RemoveWorkflowPermission(deletedPermission.id);\r\n\r\n this.setState({\r\n workflowPermissions: newWorkflowPermissionsArray\r\n // workflowSectionStepList: await this.filterSectionSteps(newWorkflowPermissionsArray, this.state.selecteWorkflowPartnerType, this.state.selectedCaseStatusType)\r\n });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'workflowPartner',\r\n label: this.translatorService.Tranlate(\r\n 'WORKFLOW_PERMISSION_TAB_ORGANIZATION_HEADER',\r\n 'Organizatie'\r\n ),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: WorkflowPartner, tableMeta: MUIDataTableMeta) => {\r\n return value.partner!.displayName;\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'caseStatus',\r\n label: this.translatorService.Tranlate(\r\n 'WORKFLOW_PERMISSION_TAB_CASE_STATUS_HEADER',\r\n 'Status Dosar'\r\n ),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: any) => {\r\n return value ? value.displayName : \"\";\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'userRole',\r\n label: this.translatorService.Tranlate('WORKFLOW_USER_ROLE_LABEL', 'Rol'),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: any) => {\r\n return value ? value.displayName : '';\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n\r\n // {\r\n // name: 'read',\r\n // label: this.translatorService.Tranlate(\"WORKFLOW_PERMISSION_TAB_READ_HEADER\", \"Citeste\"),\r\n\r\n // options: {\r\n // filter: false,\r\n // sort: false,\r\n\r\n // customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n // return (\r\n // this.handleIsActiveChange(e, tableMeta.rowData[0])}\r\n // color=\"primary\"\r\n // inputProps={{ 'aria-label': 'primary checkbox' }}\r\n // />)\r\n // }\r\n\r\n // }\r\n // },\r\n // {\r\n // name: 'write',\r\n // label: this.translatorService.Tranlate(\"WORKFLOW_PERMISSION_TAB_WRITE_HEADER\", \"Scrie\"),\r\n // options: {\r\n // filter: false,\r\n // sort: false,\r\n // customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n // return (\r\n // this.handleIsActiveChange(e, tableMeta.rowData[0])}\r\n // color=\"primary\"\r\n // inputProps={{ 'aria-label': 'primary checkbox' }}\r\n // />)\r\n // }\r\n\r\n // }\r\n // },\r\n // {\r\n // name: 'execute',\r\n // label: this.translatorService.Tranlate(\"WORKFLOW_PERMISSION_TAB_EXECUTE_HEADER\", \"Executa\"),\r\n // options: {\r\n // filter: false,\r\n // sort: false,\r\n // customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n // return (\r\n // this.handleIsActiveChange(e, tableMeta.rowData[0])}\r\n // color=\"primary\"\r\n // inputProps={{ 'aria-label': 'primary checkbox' }}\r\n // />)\r\n // }\r\n\r\n // }\r\n // },\r\n {\r\n name: 'dateModification',\r\n label: this.translatorService.Tranlate(\r\n 'WORKFLOW_PERMISSION_TAB_DATE_MODIFICATION_HEADER',\r\n 'Data Modificare'\r\n ),\r\n options: {\r\n filter: false,\r\n sort: false,\r\n customBodyRender: (value: Date) =>\r\n moment.utc(value).local().toDate().toLocaleString(this.props.appState.language)\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: '',\r\n options: {\r\n filter: false,\r\n setCellHeaderProps: () => ({ align: 'center' }),\r\n setCellProps: () => ({ align: 'center' }),\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.deletePermission(e, tableMeta)}\r\n >\r\n \r\n \r\n );\r\n }\r\n }\r\n }\r\n ];\r\n\r\n return columns;\r\n };\r\n\r\n addWorkflowPermissionType = async () => {\r\n try {\r\n if (\r\n this.state.workflowPermissions.findIndex(\r\n (item) =>\r\n item.workflowPartnerId === this.state.selecteWorkflowPartnerType!.id &&\r\n ((this.state.selectedUserRole !== null &&\r\n item.userRoleId === this.state.selectedUserRole!.id) ||\r\n (this.state.selectedUserRole === null && item.userRoleId !== null) ||\r\n (this.state.selectedUserRole !== null && item.userRoleId === null) ||\r\n (this.state.selectedUserRole === null && item.userRoleId === null)) &&\r\n item.caseStatusId === this.state.selectedCaseStatusType!.id\r\n ) !== -1\r\n ) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'ERROR_MSG_WORKFLOW_PERMISSION_EXISTS',\r\n 'Permisiunea exista deja!'\r\n ),\r\n { variant: 'error' }\r\n );\r\n return;\r\n }\r\n await this.workflowService.AddWorkflowPermission({\r\n workflowPartnerId: this.state.selecteWorkflowPartnerType!.id,\r\n caseStatusId: this.state.selectedCaseStatusType!.id,\r\n workflowSectionStepFormId: this.props.workflowFormId,\r\n userRoleId: this.state.selectedUserRole ? this.state.selectedUserRole.id : null,\r\n read: true,\r\n execute: true,\r\n write: true\r\n } as WorkflowPermission);\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n //selecteWorkflowSectionStepType : null,\r\n },\r\n () => {\r\n this.loadWorkflowPermissions();\r\n }\r\n );\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n handleUserRoleChange = (newValue: any | null) => {\r\n this.setState({ selectedUserRole: newValue });\r\n };\r\n handleCaseStatusChange = async (newValue: any | null) => {\r\n this.setState({\r\n selectedCaseStatusType: newValue\r\n // workflowSectionStepList: await this.filterSectionSteps(this.state.workflowPermissions, this.state.selecteWorkflowPartnerType, newValue)\r\n });\r\n };\r\n // handleSectionStepChange = (newValue: WorkflowSectionStep | null) => {\r\n // this.setState({ selecteWorkflowSectionStepType: newValue });\r\n // }\r\n handleWorkflowPartnerChange = (newValue: WorkflowPartner | null) => {\r\n this.setState(\r\n {\r\n selecteWorkflowPartnerType: newValue\r\n },\r\n async () => {\r\n // await this.reloadWorkflowPermission(newValue ? newValue.id : null);\r\n }\r\n );\r\n };\r\n\r\n renderAddForm() {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n this.handleWorkflowPartnerChange(newValue)\r\n }\r\n getOptionLabel={(option: WorkflowPartner) => option.partner!.displayName || ''}\r\n filterOptions={createFilterOptions({\r\n matchFrom: 'any',\r\n stringify: (option: WorkflowPartner) => option.partner!.displayName\r\n })}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n this.handleCaseStatusChange(newValue)}\r\n getOptionLabel={(option: any) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n this.handleUserRoleChange(newValue)}\r\n getOptionLabel={(option: any) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n {/* this.handleSectionStepChange(newValue)}\r\n getOptionLabel={(option: WorkflowSectionStep) => option.workflowSection.section!.displayName+ \"-\"+ option.workflowStep!.displayName || \"\"}\r\n renderInput={params => (\r\n \r\n )}\r\n /> */}\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.workflowService = (this.context as AppContext).workflowService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n const options = {\r\n filter: true,\r\n search: true,\r\n viewColumns: false,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n elevation: 1\r\n };\r\n\r\n return (\r\n \r\n {/* \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n */}\r\n {this.renderAddForm()}\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n ) : null}\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalPermissionFormActionProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\nexport default connect(\r\n (state: ApplicationState) => ({ appState: state.app }),\r\n null,\r\n mergeProps\r\n)(withSnackbar(WorkflowPermissions as any));\r\n","import React, { Fragment } from 'react';\r\nimport {\r\n AppUserAdminActionCreators,\r\n ApplicationState,\r\n AppActionCreators,\r\n AppState\r\n} from '../../../../store';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport { Grid, Button, Card, Tabs, Tab, CardContent } from '@material-ui/core';\r\nimport { ITranslatorService } from '../../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../../context/Contexts';\r\nimport { Language } from '../../../../interfaces/Organization';\r\nimport { ValidatorForm, TextValidator } from 'react-material-ui-form-validator';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { WrapperSimple } from '../../../../layout-components';\r\nimport { IReferentialService } from '../../../../services/Interfaces/IReferentialService';\r\nimport TabPanel from '../../../_shared/Tabs';\r\nimport EditWorkflowFormReport from './EditWorkflowFormReport';\r\nimport EditWorkflowFormDesign from './EditWorkflowFormDesign';\r\nimport EditWorkflowFormAction from './EditWorkflowFormAction';\r\nimport EditWorkflowFormInterfaces from './EditWorkflowFormInterfaces';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { IWorkflowService } from '../../../../services/Interfaces/IWorkflowService';\r\nimport { WorkflowSectionStepForm } from '../../../../interfaces/Workflow';\r\nimport WorkflowOptimizations from '../WorkflowOptimizations';\r\nimport WorkflowDocumentTypes from '../WorkflowDocumentTypes';\r\nimport WorkflowCalculations from '../WorkflowCalculations';\r\nimport WorkflowPermissions from '../WorkflowPermissions';\r\nimport { IReferential, ITranslation } from '../../../../interfaces/IReferential';\r\nimport { FormCode } from '../../../../helpers/forms/FormCode';\r\nimport Referentials from '../../../../helpers/Referentials.json';\r\nimport { ReferentialCode } from '../../../../helpers/Constants';\r\nimport { Autocomplete } from '@material-ui/lab';\r\nimport { Switch, FormControlLabel, Typography } from '@material-ui/core';\r\n\r\ninterface IEditWorkflowFormState {\r\n workflowForm: WorkflowSectionStepForm;\r\n selectedTab: number;\r\n languages: Language[];\r\n isLoading: boolean;\r\n appointmentCategoryTypes: IReferential[];\r\n}\r\n\r\nexport interface ExternalEditWorkflowFormsProps {\r\n workflowFormChanged?: (close: boolean) => void;\r\n workflowFormId: number;\r\n workflowFormCode: string | null;\r\n}\r\n\r\ntype EditWorkflowFormProps = { appState: AppState } & ProviderContext &\r\n ExternalEditWorkflowFormsProps &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass EditWorkflowForm extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private appReferentialService!: IReferentialService;\r\n private workflowService!: IWorkflowService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n workflowForm: {} as WorkflowSectionStepForm,\r\n selectedTab: 0,\r\n languages: [],\r\n isLoading: true,\r\n appointmentCategoryTypes: []\r\n } as IEditWorkflowFormState;\r\n\r\n public async componentDidMount() {\r\n // const hoId = Number.parseInt(this.props.match.params.id);\r\n\r\n let workflowForm = {} as WorkflowSectionStepForm;\r\n const languages = this.activeLanguages();\r\n\r\n if (this.props.workflowFormId !== 0) {\r\n workflowForm = await this.workflowService.GetWorkflowSectionStepForm(\r\n this.props.workflowFormId\r\n );\r\n }\r\n\r\n const formTranslations = workflowForm.translations;\r\n languages.forEach((language: Language, index: number) => {\r\n if (formTranslations.length === 0) {\r\n formTranslations.push({\r\n id: 0,\r\n referentialTypeId: workflowForm.id,\r\n name: null,\r\n language: language.code\r\n });\r\n } else {\r\n const indexTrans = formTranslations.findIndex((trans: ITranslation) => {\r\n return language.code === trans.language;\r\n });\r\n if (indexTrans === -1) {\r\n formTranslations.push({\r\n id: 0,\r\n referentialTypeId: workflowForm.id,\r\n name: null,\r\n language: language.code\r\n });\r\n }\r\n }\r\n });\r\n workflowForm.translations = [...formTranslations];\r\n\r\n let appointmentCategoryTypes = [] as IReferential[];\r\n if (workflowForm!.form!.code == FormCode.CASE_IN_OUT_REPORT || workflowForm!.form!.code == FormCode.CASE_ATTACHMENTS) {\r\n const ref = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.AppointmentCategoryType\r\n );\r\n \r\n appointmentCategoryTypes = await this.appReferentialService.Get(ref!.baseUrl);\r\n\r\n if (workflowForm!.appointmentCategoryTypeId) {\r\n const appointmentCategoryType = appointmentCategoryTypes.find(\r\n (item) => item.id === workflowForm!.appointmentCategoryTypeId\r\n );\r\n workflowForm.appointmentCategoryType = appointmentCategoryType || null;\r\n }\r\n }\r\n this.setState({\r\n workflowForm: workflowForm,\r\n languages: languages,\r\n isLoading: false,\r\n appointmentCategoryTypes: appointmentCategoryTypes\r\n });\r\n }\r\n activeLanguages = () => {\r\n const activeLanguages =\r\n this.props.appState.appUser!.organization!.gtOrganization!.languages!.filter(\r\n (language) => language.isActive === true\r\n );\r\n\r\n activeLanguages.forEach((language) => {\r\n language.displayName =\r\n language.displayName.charAt(0).toUpperCase() + language.displayName.slice(1);\r\n });\r\n return activeLanguages;\r\n };\r\n\r\n handleFormNameChange = (event: any, code: string | null) => {\r\n let newFormTransList = [] as ITranslation[];\r\n if (this.state.workflowForm.translations) {\r\n newFormTransList = this.state.workflowForm.translations.map((loc: any) => {\r\n if (loc.language === code) {\r\n loc.name = event.target.value;\r\n }\r\n return loc;\r\n });\r\n }\r\n this.setState({\r\n workflowForm: {\r\n ...this.state.workflowForm,\r\n translations: newFormTransList\r\n }\r\n });\r\n };\r\n\r\n compare = (a: ITranslation, b: ITranslation) => {\r\n const bandA = a.language!.toUpperCase();\r\n const bandB = b.language!.toUpperCase();\r\n\r\n let comparison = 0;\r\n if (bandA > bandB) {\r\n comparison = -1;\r\n } else if (bandA < bandB) {\r\n comparison = 1;\r\n }\r\n return comparison;\r\n };\r\n\r\n renderNameTextFields = () => {\r\n if (Object.keys(this.state.workflowForm).length === 0) {\r\n return null;\r\n } else {\r\n const nameTextFieldsList = [] as any[];\r\n\r\n this.state\r\n .workflowForm!.translations.sort(this.compare)\r\n .forEach((item: ITranslation, index: number) => {\r\n nameTextFieldsList.push(\r\n this.handleFormNameChange(e, item.language)}\r\n label={item.language}\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n />\r\n );\r\n });\r\n return nameTextFieldsList;\r\n }\r\n };\r\n\r\n public saveWorkflowForm = async () => {\r\n try {\r\n await this.workflowService.UpdateWorkflowSectionStepForm(this.state.workflowForm);\r\n\r\n if (this.props.workflowFormChanged) {\r\n this.props.workflowFormChanged(true);\r\n }\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n private handleAppointmentCategoryTypeChange = (newValue: IReferential | null) => {\r\n this.setState({\r\n workflowForm: {\r\n ...this.state.workflowForm,\r\n appointmentCategoryType: newValue,\r\n appointmentCategoryTypeId: newValue !== null ? newValue!.id : 0\r\n }\r\n });\r\n };\r\n\r\n public renderForm() {\r\n return (\r\n \r\n \r\n \r\n \r\n {this.renderNameTextFields()}\r\n \r\n {\r\n this.state.workflowForm!.form!.code == FormCode.CARFIX_ANALYSIS_STEP ||\r\n this.state.workflowForm!.form!.code == FormCode.CARFIX_APPOINTMENT_VALIDATION_STEP ?\r\n (\r\n \r\n ) => {\r\n this.setState({\r\n workflowForm: {\r\n ...this.state.workflowForm,\r\n comments: e.target.value\r\n }\r\n });\r\n }}\r\n label={this.translatorService.Tranlate(\r\n 'EDIT_ORGANIZATION_FORM_GENERAL_DATA_COMMENTS_POEDITOR_KEY',\r\n 'Cheie Comentariu Poeditor'\r\n )}\r\n />\r\n \r\n ) : ''\r\n }\r\n {\r\n this.state.workflowForm!.form!.code == FormCode.CARFIX_REPAIR_IN_PROGRESS_STEP ?\r\n (\r\n <>\r\n \r\n ) => {\r\n this.setState({\r\n workflowForm: {\r\n ...this.state.workflowForm,\r\n firstButtonLabel: e.target.value\r\n }\r\n });\r\n } }\r\n label={this.translatorService.Tranlate(\r\n 'EDIT_LABEL_FIRST_BUTTON_POEDITOR_KEY',\r\n 'Primul buton'\r\n )} \r\n />\r\n \r\n this.setState({\r\n workflowForm: {\r\n ...this.state.workflowForm!,\r\n hideFirstButton: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate('HIDE_FIRST_BUTTON_POEDITOR_KEY', 'Ascunde butonul')}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n \r\n \r\n ) => {\r\n this.setState({\r\n workflowForm: {\r\n ...this.state.workflowForm,\r\n secondButtonLabel: e.target.value\r\n }\r\n });\r\n } }\r\n label={this.translatorService.Tranlate(\r\n 'EDIT_LABEL_SECOND_BUTTON_POEDITOR_KEY',\r\n 'Al doilea buton'\r\n )} \r\n />\r\n \r\n this.setState({\r\n workflowForm: {\r\n ...this.state.workflowForm!,\r\n hideSecondButton: e.target.checked\r\n }\r\n })\r\n }\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate('HIDE_SECOND_BUTTON_POEDITOR_KEY', 'Ascunde butonul')}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n \r\n \r\n \r\n ) : ''\r\n }\r\n {\r\n this.state.workflowForm!.form!.code == FormCode.CASE_IN_OUT_REPORT || this.state.workflowForm!.form!.code == FormCode.CASE_ATTACHMENTS ?\r\n (\r\n <>\r\n \r\n \r\n this.handleAppointmentCategoryTypeChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n ) : ''\r\n }\r\n
\r\n \r\n this.props.workflowFormChanged ? this.props.workflowFormChanged(false) : null\r\n }\r\n >\r\n {this.translatorService.Tranlate('EDIT_ORGANIZATION_CANCEL_BTN', 'Anuleaza')}\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n\r\n onTabChange = (event: any, newValue: number) => {\r\n this.setState({ selectedTab: newValue });\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n this.workflowService = (this.context as AppContext).workflowService;\r\n\r\n if (this.state.isLoading) {\r\n return (\r\n
\r\n \r\n
\r\n );\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? this.renderForm() : null}\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalEditWorkflowFormsProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({ appState: state.app }),\r\n { ...AppUserAdminActionCreators, ...AppActionCreators },\r\n mergeProps\r\n)(withSnackbar(EditWorkflowForm as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport { IOrganizationService } from '../../../services/Interfaces/IOrganizationService';\r\nimport {\r\n Box,\r\n Switch,\r\n Button,\r\n IconButton,\r\n Card,\r\n CardContent,\r\n DialogTitle,\r\n Dialog,\r\n Grid,\r\n Typography,\r\n DialogContent\r\n} from '@material-ui/core';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport MUIDataTable, {\r\n MUIDataTableColumnOptions,\r\n MUIDataTableMeta,\r\n SelectableRows\r\n} from 'mui-datatables';\r\nimport moment from 'moment';\r\nimport { MUITranslations } from '../../../helpers/MUITableTranslations';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ValidatorForm, TextValidator } from 'react-material-ui-form-validator';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport DeleteOutlineTwoToneIcon from '@material-ui/icons/DeleteOutlineTwoTone';\r\nimport KeyboardArrowDownIcon from '@material-ui/icons/KeyboardArrowDown';\r\nimport KeyboardArrowUpIcon from '@material-ui/icons/KeyboardArrowUp';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport EditWorkflowForm from '../workflows/editWorkflowForm/EditWorkflowForm';\r\nimport {\r\n WorkflowSection,\r\n WorkflowSectionStep,\r\n WorkflowSectionStepForm,\r\n WorkflowForm\r\n} from '../../../interfaces/Workflow';\r\nimport { IWorkflowService } from '../../../services/Interfaces/IWorkflowService';\r\n\r\ninterface IWorkflowCaseStructureFormState {\r\n workflowSectionStepForms: WorkflowSectionStepForm[];\r\n isLoading: boolean;\r\n workflowSectionTypes: WorkflowSection[];\r\n workflowSectionStepTypes: WorkflowSectionStep[];\r\n workflowSectionStepFormTypes: WorkflowForm[];\r\n selectedWorkflowSectionType: WorkflowSection | null;\r\n selectedWorkflowSectionStepType: WorkflowSectionStep | null;\r\n selectedWorkflowSectionStepFormType: WorkflowForm | null;\r\n workflowId: number;\r\n formId: number;\r\n formCode: string | null;\r\n isOpenDialog: boolean;\r\n isDialogDeleteOpen: boolean;\r\n deleteFormId: number | null;\r\n modalFormTitle: string;\r\n}\r\n\r\ntype IWorkflowCaseStructureFormProps = { appState: AppState } & ProviderContext &\r\n RouteComponentProps<{ id: string; workflowId: string }>;\r\n\r\nclass WorkflowCaseStructureFormsTab extends React.PureComponent<\r\n IWorkflowCaseStructureFormProps,\r\n IWorkflowCaseStructureFormState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private organizationService!: IOrganizationService;\r\n private workflowService!: IWorkflowService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n workflowSectionStepForms: [],\r\n workflowSectionTypes: [],\r\n isLoading: false,\r\n workflowSectionStepTypes: [],\r\n workflowSectionStepFormTypes: [],\r\n\r\n selectedWorkflowSectionStepType: null,\r\n selectedWorkflowSectionStepFormType: null,\r\n selectedWorkflowSectionType: null,\r\n workflowId: 0,\r\n formId: 0,\r\n formCode: null,\r\n isOpenDialog: false,\r\n isDialogDeleteOpen: false,\r\n deleteFormId: null,\r\n modalFormTitle: 'Configurare forma'\r\n } as IWorkflowCaseStructureFormState;\r\n\r\n public componentDidMount() {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n const workflowId = Number.parseInt(this.props.match.params.workflowId);\r\n\r\n if (Number.isNaN(hoId) || Number.isNaN(workflowId)) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadWorkflowForms();\r\n }\r\n );\r\n }\r\n\r\n loadWorkflowForms = async () => {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n const workflowId = Number.parseInt(this.props.match.params.workflowId);\r\n\r\n if (Number.isNaN(hoId) || Number.isNaN(workflowId)) {\r\n return;\r\n }\r\n\r\n const [workflowSectionList, filterSectionStepForms] = await Promise.all([\r\n this.workflowService.GetWorkflowSections(workflowId),\r\n this.workflowService.GetWorkflowForms()\r\n ]);\r\n\r\n this.setState({\r\n workflowSectionTypes: workflowSectionList.sort(function (a, b) {\r\n return a.order - b.order;\r\n }),\r\n workflowSectionStepFormTypes: filterSectionStepForms,\r\n isLoading: false,\r\n workflowId: workflowId\r\n });\r\n };\r\n\r\n reloadWorkflowForms = async (sectionStepId: number | null) => {\r\n if (sectionStepId === null) {\r\n this.setState({\r\n workflowSectionStepForms: [],\r\n isLoading: false\r\n });\r\n return;\r\n }\r\n\r\n const workflowSectionStepFormList = await this.workflowService.GetWorkflowSectionStepForms(\r\n sectionStepId\r\n ); //orgCaseList[0].id);\r\n\r\n this.setState({\r\n workflowSectionStepForms: workflowSectionStepFormList.sort(function (a, b) {\r\n return a.order - b.order;\r\n }),\r\n isLoading: false\r\n });\r\n };\r\n\r\n moveUp = async (event: any, tableMeta: MUIDataTableMeta) => {\r\n const id = tableMeta.rowData[0];\r\n const cloneArray = [...this.state.workflowSectionStepForms];\r\n const itemToMoveUpIndex = cloneArray.findIndex((item) => item.id === id);\r\n\r\n if (itemToMoveUpIndex === -1) {\r\n return;\r\n }\r\n if (cloneArray[itemToMoveUpIndex].order === 1) {\r\n return;\r\n }\r\n\r\n const itemToMoveDownIndex = cloneArray.findIndex(\r\n (item) => item.order === cloneArray[itemToMoveUpIndex].order - 1\r\n );\r\n\r\n cloneArray[itemToMoveUpIndex] = {\r\n ...cloneArray[itemToMoveUpIndex],\r\n order: cloneArray[itemToMoveUpIndex].order - 1\r\n };\r\n cloneArray[itemToMoveDownIndex] = {\r\n ...cloneArray[itemToMoveDownIndex],\r\n order: cloneArray[itemToMoveDownIndex].order + 1\r\n };\r\n\r\n try {\r\n await this.workflowService.UpdateWorkflowSectionStepForm(cloneArray[itemToMoveUpIndex]);\r\n await this.workflowService.UpdateWorkflowSectionStepForm(cloneArray[itemToMoveDownIndex]);\r\n\r\n this.setState({\r\n workflowSectionStepForms: cloneArray.sort(function (a, b) {\r\n return a.order - b.order;\r\n })\r\n });\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n moveDown = async (event: any, tableMeta: MUIDataTableMeta) => {\r\n const id = tableMeta.rowData[0];\r\n const cloneArray = [...this.state.workflowSectionStepForms];\r\n const itemToMoveIndex = cloneArray.findIndex((item) => item.id === id);\r\n\r\n if (itemToMoveIndex === -1) {\r\n return;\r\n }\r\n if (cloneArray[itemToMoveIndex].order === cloneArray.length) {\r\n return;\r\n }\r\n\r\n const itemToMoveToIndex = cloneArray.findIndex(\r\n (item) => item.order === cloneArray[itemToMoveIndex].order + 1\r\n );\r\n\r\n cloneArray[itemToMoveIndex] = {\r\n ...cloneArray[itemToMoveIndex],\r\n order: cloneArray[itemToMoveIndex].order + 1\r\n };\r\n cloneArray[itemToMoveToIndex] = {\r\n ...cloneArray[itemToMoveToIndex],\r\n order: cloneArray[itemToMoveToIndex].order - 1\r\n };\r\n\r\n try {\r\n await this.workflowService.UpdateWorkflowSectionStepForm(cloneArray[itemToMoveIndex]);\r\n await this.workflowService.UpdateWorkflowSectionStepForm(cloneArray[itemToMoveToIndex]);\r\n\r\n this.setState({\r\n workflowSectionStepForms: cloneArray.sort(function (a, b) {\r\n return a.order - b.order;\r\n })\r\n });\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n onRowClick = (e: any, id: number, formCode: string | null, formName: any) => {\r\n this.setState({ isOpenDialog: true, formId: id, modalFormTitle: formName, formCode });\r\n };\r\n\r\n handleClose = (showForm: boolean) => {\r\n this.setState({ isOpenDialog: showForm }, async () => {\r\n await this.reloadWorkflowForms(this.state.selectedWorkflowSectionStepType!.id);\r\n });\r\n };\r\n\r\n handleIsActiveChange = async (\r\n event: React.ChangeEvent,\r\n tableMeta: MUIDataTableMeta\r\n ) => {\r\n const id = tableMeta.rowData[0];\r\n const workflowSectionStepForms = [...this.state.workflowSectionStepForms];\r\n const updatedWorkflowSectionStepFormIndex = workflowSectionStepForms.findIndex(\r\n (o) => o.id === id\r\n );\r\n\r\n if (updatedWorkflowSectionStepFormIndex >= 0) {\r\n workflowSectionStepForms[updatedWorkflowSectionStepFormIndex] = {\r\n ...workflowSectionStepForms[updatedWorkflowSectionStepFormIndex],\r\n isActive: event.target.checked\r\n };\r\n\r\n try {\r\n await this.workflowService.UpdateWorkflowSectionStepForm(\r\n workflowSectionStepForms[updatedWorkflowSectionStepFormIndex]\r\n );\r\n\r\n this.setState({ workflowSectionStepForms: workflowSectionStepForms });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'displayName',\r\n label: this.translatorService.Tranlate(\r\n 'WORKFLOWS_TAB_CASE_STRUCTURE_TAB_FORM_FORM_HEADER',\r\n 'Forma'\r\n ),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: any, tableMeta: MUIDataTableMeta) => {\r\n const formId = tableMeta.rowData[0];\r\n const formCode =\r\n this.state.workflowSectionStepForms?.find(\r\n (wfSectionForm) => wfSectionForm.id === formId\r\n )?.form?.code || null;\r\n return (\r\n this.onRowClick(e, formId, formCode, value)}\r\n >\r\n {value}\r\n \r\n );\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'dateModification',\r\n label: this.translatorService.Tranlate(\r\n 'WORKFLOWS_TAB_CASE_STRUCTURE_TAB_FORM_DATE_MODIFICATION_HEADER',\r\n 'Data Modificare'\r\n ),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: Date) =>\r\n moment.utc(value).local().format(this.props.appState.longDateFormat)\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'order',\r\n sortDirection: 'asc',\r\n label: this.translatorService.Tranlate(\r\n 'WORKFLOWS_TAB_CASE_STRUCTURE_TAB_FORM_ORDER_HEADER',\r\n 'Ord'\r\n ),\r\n options: { sort: false }\r\n },\r\n {\r\n name: '',\r\n options: {\r\n setCellHeaderProps: () => ({ align: 'center' }),\r\n setCellProps: () => ({ align: 'center' }),\r\n sortOrder: {\r\n name: 'order',\r\n direction: 'asc'\r\n },\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n \r\n this.moveUp(e, tableMeta)}>\r\n \r\n \r\n this.moveDown(e, tableMeta)}\r\n >\r\n \r\n \r\n \r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'isActive',\r\n label: this.translatorService.Tranlate('USERS_IS_ACTIVE_HEADER', 'Activ'),\r\n options: {\r\n sort: false,\r\n filterOptions: {\r\n names: [\r\n this.translatorService.Tranlate('TABLE_IS_ACTIVE_COLUMN_ACTIVE', 'Activ'),\r\n this.translatorService.Tranlate('TABLE_IS_ACTIVE_COLUMN_INACTIVE', 'Inactiv')\r\n ],\r\n logic(isActive: any, filterVal: string[]) {\r\n const show =\r\n (filterVal.indexOf(this.names[0]) !== -1 && isActive === true) ||\r\n (filterVal.indexOf(this.names[1]) !== -1 && isActive === false);\r\n return !show;\r\n }\r\n },\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.handleIsActiveChange(e, tableMeta)}\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: '',\r\n options: {\r\n setCellHeaderProps: () => ({ align: 'center' }),\r\n setCellProps: () => ({ align: 'center' }),\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n \r\n this.setState({ isDialogDeleteOpen: true, deleteFormId: tableMeta.rowData[0] })\r\n }\r\n >\r\n \r\n \r\n );\r\n }\r\n }\r\n }\r\n ];\r\n\r\n return columns;\r\n };\r\n\r\n addOrgForm = async () => {\r\n try {\r\n const translations = this.state.selectedWorkflowSectionStepFormType!.translations;\r\n translations.forEach((item) => {\r\n item.id = 0;\r\n item.referentialTypeId = 0;\r\n });\r\n\r\n await this.workflowService.AddWorkflowSectionStepForm({\r\n order: this.state.workflowSectionStepForms.length + 1,\r\n json1: this.state.selectedWorkflowSectionStepFormType!.json1,\r\n json2: this.state.selectedWorkflowSectionStepFormType!.json2,\r\n translations: translations,\r\n formTypeId: this.state.selectedWorkflowSectionStepFormType!.formTypeId,\r\n workflowSectionStepId: this.state.selectedWorkflowSectionStepType!.id,\r\n formId: this.state.selectedWorkflowSectionStepFormType!.id,\r\n isActive: true\r\n } as WorkflowSectionStepForm);\r\n\r\n this.setState(\r\n {\r\n isLoading: true,\r\n selectedWorkflowSectionStepFormType: null\r\n },\r\n () => {\r\n this.reloadWorkflowForms(this.state.selectedWorkflowSectionStepType!.id);\r\n }\r\n );\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n handleAutocompleteStepChange = (newValue: any | null) => {\r\n this.setState(\r\n {\r\n selectedWorkflowSectionStepType: newValue,\r\n isLoading: true\r\n },\r\n () => {\r\n this.reloadWorkflowForms(newValue === null ? null : newValue.id);\r\n }\r\n );\r\n };\r\n\r\n handleAutocompleteFormChange = (newValue: any | null) => {\r\n this.setState({ selectedWorkflowSectionStepFormType: newValue });\r\n };\r\n\r\n handleAutocompleteCaseChange = async (newValue: any | null) => {\r\n if (newValue === null) {\r\n this.setState(\r\n {\r\n selectedWorkflowSectionType: null,\r\n workflowSectionStepTypes: [],\r\n selectedWorkflowSectionStepType: null,\r\n isLoading: true\r\n },\r\n () => {\r\n this.reloadWorkflowForms(newValue === null ? null : newValue.id);\r\n }\r\n );\r\n return;\r\n }\r\n const workflowSectionStepList = await this.workflowService.GetWorkflowSectionSteps(newValue.id);\r\n\r\n this.setState(\r\n {\r\n selectedWorkflowSectionType: newValue,\r\n workflowSectionStepTypes: workflowSectionStepList.sort(function (a, b) {\r\n return a.order - b.order;\r\n }),\r\n selectedWorkflowSectionStepType: null,\r\n isLoading: true\r\n },\r\n () => {\r\n this.reloadWorkflowForms(null);\r\n }\r\n );\r\n };\r\n\r\n public renderAddForm() {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n this.handleAutocompleteCaseChange(newValue)\r\n }\r\n getOptionLabel={(option: WorkflowSection) => option.section!.displayName}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n \r\n this.handleAutocompleteStepChange(newValue)\r\n }\r\n getOptionLabel={(option: WorkflowSectionStep) =>\r\n option.workflowStep!.displayName || ''\r\n }\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n \r\n this.handleAutocompleteFormChange(newValue)\r\n }\r\n getOptionLabel={(option: WorkflowForm) => option.displayName}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n\r\n closeDeleteDialog = async () => {\r\n this.setState({ isDialogDeleteOpen: false });\r\n };\r\n\r\n deleteWorkflowSectionStepForm = async () => {\r\n try {\r\n await this.workflowService.RemoveWorkflowForm(this.state.deleteFormId!);\r\n await this.reloadWorkflowForms(this.state.selectedWorkflowSectionStepType!.id);\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.workflowService = (this.context as AppContext).workflowService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n const options = {\r\n filter: false,\r\n search: false,\r\n viewColumns: false,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n elevation: 1\r\n };\r\n\r\n return (\r\n \r\n {this.renderAddForm()}\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n ) : null}\r\n
\r\n \r\n \r\n \r\n \r\n {this.state.modalFormTitle}\r\n \r\n \r\n this.handleClose(false)}\r\n size={'small'}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n
\r\n

\r\n {this.translatorService.Tranlate(\r\n 'DELETE_TEXT',\r\n 'Sigur doriti sa stergeti aceasta inregistrare?'\r\n )}\r\n

\r\n
\r\n \r\n \r\n {this.translatorService.Tranlate('CANCEL', 'Anuleaza')}\r\n \r\n \r\n {\r\n this.setState(\r\n { isDialogDeleteOpen: false },\r\n async () => await this.deleteWorkflowSectionStepForm()\r\n );\r\n }}\r\n color=\"primary\"\r\n variant=\"contained\"\r\n className=\"mx-1\"\r\n >\r\n \r\n {this.translatorService.Tranlate('DELETE', 'Sterge')}\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app\r\n }),\r\n null\r\n)(withSnackbar(WorkflowCaseStructureFormsTab as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState } from '../../../store';\r\nimport { withSnackbar } from 'notistack';\r\nimport { Card, Tabs, Tab, CardContent, Box } from '@material-ui/core';\r\nimport TabPanel from '../../_shared/Tabs';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport WorkflowCaseStructureSectionTab from './WorkflowCaseStructureSectionTab';\r\nimport WorkflowCaseStructureStepsTab from './WorkflowCaseStructureStepsTab';\r\nimport WorkflowCaseStructureFormsTab from './WorkflowCaseStructureFormsTab';\r\n\r\ninterface ICaseStructureState {\r\n selectedTab: number;\r\n}\r\nclass WorkflowCaseStructure extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = { selectedTab: 0 };\r\n\r\n onTabChange = (event: any, newValue: number) => {\r\n this.setState({ selectedTab: newValue });\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app\r\n }),\r\n null\r\n)(withSnackbar(WorkflowCaseStructure as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport { IOrganizationService } from '../../../services/Interfaces/IOrganizationService';\r\nimport {\r\n Tooltip,\r\n Box,\r\n Button,\r\n Card,\r\n CardContent,\r\n Tabs,\r\n Tab,\r\n IconButton,\r\n Dialog,\r\n DialogTitle,\r\n Grid,\r\n Typography,\r\n DialogContent,\r\n Switch,\r\n FormControlLabel\r\n} from '@material-ui/core';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport AddCircleTwoToneIcon from '@material-ui/icons/AddCircleTwoTone';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ValidatorForm, TextValidator } from 'react-material-ui-form-validator';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport { WorkflowSupplier } from '../../../interfaces/Workflow';\r\nimport { Organization, OrganizationInterface } from '../../../interfaces/Organization';\r\nimport { IWorkflowService } from '../../../services/Interfaces/IWorkflowService';\r\nimport NumberFormat from 'react-number-format';\r\nimport MUIDataTable, {\r\n SelectableRows,\r\n MUIDataTableMeta,\r\n MUIDataTableColumnOptions\r\n} from 'mui-datatables';\r\nimport { MUITranslations } from '../../../helpers/MUITableTranslations';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport DeleteOutlineTwoToneIcon from '@material-ui/icons/DeleteOutlineTwoTone';\r\nimport { ReferentialCode, OrganizationTypeCode, SupplierApiType, Descripted, enumToDescriptedArray } from '../../../helpers/Constants';\r\nimport Referentials from '../../../helpers/Referentials.json';\r\nimport * as R from 'ramda';\r\nimport { X } from 'react-feather';\r\n\r\ninterface IWorkflowSupplierState {\r\n newWorkflowSupplier: WorkflowSupplier | null;\r\n workflowSuppliers: WorkflowSupplier[];\r\n isLoading: boolean;\r\n workflowSupplierTypes: Organization[];\r\n workflowSupplierInterfaceTypes: OrganizationInterface[];\r\n // workflowCarPartCategoryTypes: { id: number, displayName: string }[]\r\n selectedWorkflowSupplierType: Organization | null;\r\n selectedWorkflowSupplierInterfaceType: OrganizationInterface | null;\r\n // selectedWorkflowCarPartCategoryTypeMultiple: { id: number, displayName: string }[],\r\n // selectedWorkflowCarPartCategoryType: { id: number, displayName: string } | null,\r\n urlInterface: string;\r\n discountTariff: number;\r\n userName: string;\r\n password: string;\r\n port: number | null;\r\n workflowId: number;\r\n isDialogOpen: boolean;\r\n workflowSupplierId: number | null;\r\n supplierApiType: Descripted | null;\r\n supplierApiTypes: Descripted[];\r\n clientId: string;\r\n hasNonStockValidation: boolean;\r\n}\r\n\r\ntype IWorkflowSupplierProps = { appState: AppState } & ProviderContext &\r\n RouteComponentProps<{ id: string; workflowId: string }>;\r\n\r\nclass WorkflowSuppliers extends React.PureComponent<\r\n IWorkflowSupplierProps,\r\n IWorkflowSupplierState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private organizationService!: IOrganizationService;\r\n private workflowService!: IWorkflowService;\r\n\r\n static contextType = ApplicationContext;\r\n state = {\r\n newWorkflowSupplier: null,\r\n workflowSuppliers: [],\r\n workflowSupplierTypes: [],\r\n workflowSupplierInterfaceTypes: [],\r\n // workflowCarPartCategoryTypes: [],\r\n selectedWorkflowSupplierType: null,\r\n selectedWorkflowSupplierInterfaceType: null,\r\n // selectedWorkflowCarPartCategoryTypeMultiple: [],\r\n // selectedWorkflowCarPartCategoryType: null,\r\n urlInterface: '',\r\n discountTariff: 0,\r\n userName: '',\r\n password: '',\r\n port: 0,\r\n workflowId: 0,\r\n isLoading: false,\r\n isDialogOpen: false,\r\n workflowSupplierId: null,\r\n supplierApiType: null,\r\n supplierApiTypes: enumToDescriptedArray(SupplierApiType),\r\n clientId: '',\r\n hasNonStockValidation: false\r\n } as IWorkflowSupplierState;\r\n\r\n public componentDidMount() {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n const workflowId = Number.parseInt(this.props.match.params.workflowId);\r\n\r\n if (Number.isNaN(hoId) || Number.isNaN(workflowId)) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadWorkflowSuppliers();\r\n }\r\n );\r\n }\r\n\r\n loadWorkflowSuppliers = async () => {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n const workflowId = Number.parseInt(this.props.match.params.workflowId);\r\n\r\n if (Number.isNaN(hoId) || Number.isNaN(workflowId)) {\r\n return;\r\n }\r\n\r\n const [ws, workflowSuppliers] = await Promise.all([\r\n this.workflowService.GetWorkflowSuppliers(workflowId),\r\n this.organizationService.GetHOOrganizationsByTypes([OrganizationTypeCode.SUPPLIER])\r\n ]);\r\n\r\n const interfacePromises = [] as any[];\r\n const supplierIds: number[] = [];\r\n\r\n ws.forEach((ws) => {\r\n const supplier = workflowSuppliers.find((item) => item.id === ws.supplierId);\r\n // const carPartCategory = workflowCarPartCategoryTypes.find(item=> item.id === ws.carPartCategoryId);\r\n\r\n if (supplierIds.indexOf(ws.supplierId) === -1) {\r\n supplierIds.push(ws.supplierId);\r\n interfacePromises.push(this.organizationService.GetOrganizationInterfaces(ws.supplierId));\r\n }\r\n\r\n ws.supplier = R.isNil(supplier) ? null : supplier;\r\n // ws.carPartCategory = R.isNil(carPartCategory) ? null : carPartCategory;\r\n });\r\n\r\n const result = await Promise.all(interfacePromises);\r\n\r\n const organizationInterfaces: OrganizationInterface[] = [];\r\n result.forEach((item) => {\r\n organizationInterfaces.push(...item);\r\n });\r\n\r\n ws.forEach((ws) => {\r\n const suppInterface = organizationInterfaces.find(\r\n (item) => item.id === ws.supplierInterfaceId\r\n );\r\n ws.supplierInterface = R.isNil(suppInterface) ? null : suppInterface;\r\n });\r\n\r\n this.setState({\r\n workflowSupplierTypes: workflowSuppliers.filter((item) => item.isActive === true),\r\n // workflowCarPartCategoryTypes: workflowCarPartCategoryTypes,\r\n isLoading: false,\r\n workflowId: workflowId,\r\n workflowSuppliers: ws,\r\n });\r\n };\r\n\r\n handleIsActiveChange = async (\r\n event: React.ChangeEvent,\r\n tableMeta: MUIDataTableMeta\r\n ) => {\r\n const id = tableMeta.rowData[0];\r\n const workflowSuppliers = [...this.state.workflowSuppliers];\r\n const updatedWorkflowSupplierIndex = workflowSuppliers.findIndex((o) => o.id === id);\r\n\r\n if (updatedWorkflowSupplierIndex >= 0) {\r\n workflowSuppliers[updatedWorkflowSupplierIndex] = {\r\n ...workflowSuppliers[updatedWorkflowSupplierIndex],\r\n isActive: event.target.checked\r\n };\r\n\r\n try {\r\n await this.workflowService.UpdateWorkflowSupplier(\r\n workflowSuppliers[updatedWorkflowSupplierIndex]\r\n );\r\n\r\n this.setState({ workflowSuppliers: workflowSuppliers });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n\r\n handleHasNonStockValidationChange = async (\r\n event: React.ChangeEvent,\r\n tableMeta: MUIDataTableMeta\r\n ) => {\r\n const id = tableMeta.rowData[0];\r\n const workflowSuppliers = [...this.state.workflowSuppliers];\r\n const updatedWorkflowSupplierIndex = workflowSuppliers.findIndex((o) => o.id === id);\r\n\r\n if (updatedWorkflowSupplierIndex >= 0) {\r\n workflowSuppliers[updatedWorkflowSupplierIndex] = {\r\n ...workflowSuppliers[updatedWorkflowSupplierIndex],\r\n hasNonStockValidation: event.target.checked\r\n };\r\n\r\n try {\r\n await this.workflowService.UpdateWorkflowSupplier(\r\n workflowSuppliers[updatedWorkflowSupplierIndex]\r\n );\r\n\r\n this.setState({ workflowSuppliers: workflowSuppliers });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n\r\n reloadWorkflowSuppliers = async (supplierId: number | null) => {\r\n if (supplierId === null) {\r\n this.setState({\r\n workflowSuppliers: [],\r\n isLoading: false\r\n });\r\n return;\r\n }\r\n\r\n const workflowSupplierInterfaceTypes = await this.organizationService.GetOrganizationInterfaces(\r\n supplierId\r\n );\r\n\r\n this.setState({\r\n workflowSupplierInterfaceTypes: workflowSupplierInterfaceTypes,\r\n isLoading: false\r\n });\r\n };\r\n\r\n addOrgForm = async () => {\r\n try {\r\n debugger;\r\n const workflowSuppliers: WorkflowSupplier[] = [];\r\n if (this.state.workflowSupplierId === null) {\r\n if (\r\n this.state.workflowSuppliers.findIndex(\r\n (item) => item.supplierId === this.state.selectedWorkflowSupplierType!.id && item.supplierApiTypeId === this.state.supplierApiType!.id\r\n // && this.state.selectedWorkflowCarPartCategoryTypeMultiple.findIndex(itemm => itemm.id === item.carPartCategoryId)!==-1\r\n ) !== -1\r\n ) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'ERROR_MSG_WORKFLOW_SUPPLIER_EXISTS',\r\n 'Furnizorul exista deja!'\r\n ),\r\n { variant: 'error' }\r\n );\r\n return;\r\n }\r\n let contor = 0;\r\n // for (let carPart of this.state.selectedWorkflowCarPartCategoryTypeMultiple) {\r\n workflowSuppliers.push({\r\n id: 0,\r\n supplierId: this.state.selectedWorkflowSupplierType!.id,\r\n supplierInterfaceId: this.state.selectedWorkflowSupplierInterfaceType!.id,\r\n urlInterface: this.state.urlInterface,\r\n discountTariff: this.state.discountTariff,\r\n userName: this.state.userName,\r\n password: this.state.password,\r\n port: this.state.port,\r\n clientId: this.state.clientId,\r\n hasNonStockValidation: this.state.hasNonStockValidation,\r\n // carPartCategoryId: carPart!.id,\r\n workflowId: this.state.workflowId,\r\n supplierApiTypeId: this.state.supplierApiType!.id\r\n } as WorkflowSupplier);\r\n contor = contor + 1;\r\n // }\r\n\r\n await this.workflowService.AddWorkflowSuppliers(workflowSuppliers);\r\n } else {\r\n if (this.state.workflowSuppliers.findIndex(\r\n (item) => item.supplierId === this.state.selectedWorkflowSupplierType!.id && item.supplierApiTypeId === this.state.supplierApiType!.id && item.id !== this.state.workflowSupplierId\r\n ) !== -1\r\n ) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'ERROR_MSG_WORKFLOW_SUPPLIER_EXISTS',\r\n 'Furnizorul exista deja!'\r\n ),\r\n { variant: 'error' }\r\n );\r\n return;\r\n }\r\n\r\n await this.workflowService.UpdateWorkflowSupplier({\r\n id: this.state.workflowSupplierId,\r\n supplierId: this.state.selectedWorkflowSupplierType!.id,\r\n supplierInterfaceId: this.state.selectedWorkflowSupplierInterfaceType!.id,\r\n urlInterface: this.state.urlInterface,\r\n discountTariff: this.state.discountTariff,\r\n userName: this.state.userName,\r\n password: this.state.password,\r\n port: this.state.port,\r\n clientId: this.state.clientId,\r\n hasNonStockValidation: this.state.hasNonStockValidation,\r\n // carPartCategoryId: this.state.selectedWorkflowCarPartCategoryType!.id,\r\n workflowId: this.state.workflowId,\r\n supplierApiTypeId: this.state.supplierApiType!.id\r\n } as WorkflowSupplier);\r\n }\r\n\r\n this.setState(\r\n {\r\n isLoading: true,\r\n isDialogOpen: false\r\n },\r\n async () => await this.loadWorkflowSuppliers()\r\n );\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n handleAutocompleteInterfaceChange = (newValue: any | null) => {\r\n this.setState(\r\n {\r\n selectedWorkflowSupplierInterfaceType: newValue,\r\n urlInterface: newValue === null ? '' : newValue.url,\r\n port: newValue === null ? 80 : newValue.port\r\n //isLoading: true\r\n }\r\n // , () => {\r\n // this.reloadWorkflowSuppliers(newValue === null ? null : newValue.id);\r\n // }\r\n );\r\n };\r\n\r\n // handleAutocompleteCarPartMultipleChange = (newValue: any[]) => {\r\n // this.setState({ selectedWorkflowCarPartCategoryTypeMultiple: newValue });\r\n // }\r\n\r\n // handleAutocompleteCarPartChange = (newValue: any) => {\r\n // this.setState({ selectedWorkflowCarPartCategoryType: newValue });\r\n // }\r\n handleAutocompleteSupplierChange = async (newValue: Organization | null) => {\r\n if (newValue === null) {\r\n this.setState(\r\n {\r\n selectedWorkflowSupplierType: null,\r\n workflowSupplierInterfaceTypes: [],\r\n urlInterface: '',\r\n selectedWorkflowSupplierInterfaceType: null\r\n //isLoading: true\r\n }\r\n // , () => {\r\n // this.reloadWorkflowSuppliers(newValue === null ? null : newValue!.id);\r\n // }\r\n );\r\n return;\r\n }\r\n debugger;\r\n const orgInterfaceTypes = await this.organizationService.GetOrganizationInterfaces(newValue.id);\r\n this.setState(\r\n {\r\n selectedWorkflowSupplierType: newValue,\r\n workflowSupplierInterfaceTypes: orgInterfaceTypes,\r\n selectedWorkflowSupplierInterfaceType: null\r\n //isLoading: true\r\n }\r\n // , () => {\r\n // this.reloadWorkflowSuppliers(null);\r\n // }\r\n );\r\n };\r\n\r\n private handleTextChange = (event: React.ChangeEvent) => {\r\n let value: any;\r\n if (event.target.type === 'text' || 'password') {\r\n value = event.currentTarget.value;\r\n }\r\n this.setState({\r\n ...this.state,\r\n [event.target.id]: value\r\n });\r\n };\r\n\r\n handleDiscountChange = (event: React.ChangeEvent) => {\r\n this.setState({\r\n discountTariff: event.target.value === null ? 0 : parseInt(event.target.value)\r\n });\r\n };\r\n\r\n handlePortChange = (event: React.ChangeEvent) => {\r\n this.setState({ port: event.target.value === null ? 0 : parseInt(event.target.value) });\r\n };\r\n NumberFormatCustom = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n thousandSeparator\r\n decimalScale={2}\r\n isNumericString\r\n suffix=\" %\"\r\n />\r\n );\r\n };\r\n\r\n IntFormatCustom = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n min={0}\r\n decimalScale={0}\r\n isNumericString\r\n />\r\n );\r\n };\r\n\r\n public renderAddForm() {\r\n const isMultiple = this.state.workflowSupplierId === null ? true : false;\r\n return (\r\n this.addOrgForm()}>\r\n \r\n \r\n \r\n this.handleAutocompleteSupplierChange(newValue)\r\n }\r\n getOptionLabel={(option: Organization) => option.name}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n \r\n this.handleAutocompleteInterfaceChange(newValue)\r\n }\r\n getOptionLabel={(option: OrganizationInterface) => option.code || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n this.setState({ supplierApiType : newValue })\r\n }\r\n getOptionLabel={(option: any) => option.description}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n \r\n
\r\n
\r\n );\r\n }\r\n\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n\r\n {\r\n name: 'supplier.name',\r\n label: this.translatorService.Tranlate(\r\n 'WORKFLOW_SUPPLIERS_TAB_SUPPLIER_HEADER',\r\n 'Furnizor'\r\n ),\r\n options: {\r\n customBodyRender: (value: Organization, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.newWorkflowSupplier(tableMeta.rowData[0])}\r\n >\r\n {value}\r\n \r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'supplierInterface',\r\n label: this.translatorService.Tranlate(\r\n 'WORKFLOW_SUPPLIERS_TAB_SUPPLIER_INTERFACE_HEADER',\r\n 'Interfata Furnizor'\r\n ),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: OrganizationInterface) => {\r\n return R.isNil(value) ? '' : value.code;\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'urlInterface',\r\n label: this.translatorService.Tranlate(\r\n 'WORKFLOW_SUPPLIERS_TAB_SUPPLIER_INTERFACE_URL_HEADER',\r\n 'URL'\r\n ),\r\n searchable: true,\r\n options: {\r\n setCellProps: () => ({ style: { maxWidth: '300px', 'overflow-wrap': 'break-word' } })\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'discountTariff',\r\n label: this.translatorService.Tranlate(\r\n 'WORKFLOW_SUPPLIERS_TAB_DISCOUNT_HEADER',\r\n 'Discount (%)'\r\n ),\r\n searchable: true\r\n },\r\n {\r\n name: 'userName',\r\n label: this.translatorService.Tranlate(\r\n 'WORKFLOW_SUPPLIERS_TAB_USERNAME_HEADER',\r\n 'Utilizator'\r\n ),\r\n searchable: true\r\n },\r\n {\r\n name: 'password',\r\n label: this.translatorService.Tranlate('WORKFLOW_SUPPLIERS_TAB_PASSWORD_HEADER', 'Parola'),\r\n options: {\r\n sort: false,\r\n filter: false,\r\n customBodyRender: (value: string, tableMeta: MUIDataTableMeta) => {\r\n return ***;\r\n }\r\n }\r\n },\r\n {\r\n name: 'clientId',\r\n label: this.translatorService.Tranlate(\r\n 'WORKFLOW_SUPPLIERS_TAB_CLIENT_ID_HEADER',\r\n 'Client Id'\r\n ),\r\n searchable: true\r\n },\r\n {\r\n name: 'supplierApiTypeId',\r\n label: this.translatorService.Tranlate('WORKFLOW_SUPPLIERS_TAB_PASSWORD_HEADER11', 'Tip Api Furnizor'),\r\n searchable: true,\r\n options: {\r\n customBodyRender: (value: number, tableMeta: MUIDataTableMeta) => {\r\n return this.state.supplierApiTypes.find((item) => item.id === value)!.description\r\n }\r\n }\r\n },\r\n {\r\n name: 'isActive',\r\n label: this.translatorService.Tranlate('USERS_IS_ACTIVE_HEADER', 'Activ'),\r\n options: {\r\n sort: false,\r\n filterOptions: {\r\n names: [\r\n this.translatorService.Tranlate('TABLE_IS_ACTIVE_COLUMN_ACTIVE', 'Activ'),\r\n this.translatorService.Tranlate('TABLE_IS_ACTIVE_COLUMN_INACTIVE', 'Inactiv')\r\n ],\r\n logic(isActive: any, filterVal: string[]) {\r\n const show =\r\n (filterVal.indexOf(this.names[0]) !== -1 && isActive === true) ||\r\n (filterVal.indexOf(this.names[1]) !== -1 && isActive === false);\r\n return !show;\r\n }\r\n },\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.handleIsActiveChange(e, tableMeta)}\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'hasNonStockValidation',\r\n label: this.translatorService.Tranlate('WORKFLOW_SUPPLIERS_TAB_HAS_SUPPLIER_VALIDATION_LABEL', 'Verificare furnizor'),\r\n options: {\r\n sort: false,\r\n filterOptions: {\r\n names: [\r\n this.translatorService.Tranlate('TABLE_IS_ACTIVE_COLUMN_ACTIVE', 'Activ'),\r\n this.translatorService.Tranlate('TABLE_IS_ACTIVE_COLUMN_INACTIVE', 'Inactiv')\r\n ],\r\n logic(isActive: any, filterVal: string[]) {\r\n const show =\r\n (filterVal.indexOf(this.names[0]) !== -1 && isActive === true) ||\r\n (filterVal.indexOf(this.names[1]) !== -1 && isActive === false);\r\n return !show;\r\n }\r\n },\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.handleHasNonStockValidationChange(e, tableMeta)}\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: '',\r\n options: {\r\n viewColumns: false,\r\n filter: false,\r\n setCellHeaderProps: () => ({ align: 'center' }),\r\n setCellProps: () => ({ align: 'center' }),\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.deleteWorkflowSupplier(e, tableMeta)}\r\n >\r\n \r\n \r\n );\r\n }\r\n }\r\n }\r\n ];\r\n\r\n return columns;\r\n };\r\n\r\n deleteWorkflowSupplier = async (event: any, tableMeta: MUIDataTableMeta) => {\r\n try {\r\n const id = tableMeta.rowData[0];\r\n\r\n await this.workflowService.RemoveWorkflowSupplier(id);\r\n await this.loadWorkflowSuppliers();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n newWorkflowSupplier = async (supplierId: number | null) => {\r\n let newWorkflowSupplier: WorkflowSupplier;\r\n if (supplierId === null) {\r\n newWorkflowSupplier = { ...this.state.newWorkflowSupplier } as WorkflowSupplier;\r\n newWorkflowSupplier.workflowId = this.state.workflowId;\r\n newWorkflowSupplier.id = this.state.workflowSuppliers.length;\r\n } else {\r\n newWorkflowSupplier = this.state.workflowSuppliers.find((item) => item.id === supplierId)!;\r\n }\r\n this.setState({\r\n newWorkflowSupplier: newWorkflowSupplier,\r\n selectedWorkflowSupplierType: supplierId === null ? null : newWorkflowSupplier.supplier,\r\n selectedWorkflowSupplierInterfaceType:\r\n supplierId === null ? null : newWorkflowSupplier.supplierInterface,\r\n // selectedWorkflowCarPartCategoryType: supplierId === null ? null : newWorkflowSupplier.carPartCategory,\r\n // selectedWorkflowCarPartCategoryTypeMultiple: [],\r\n urlInterface: supplierId === null ? '' : newWorkflowSupplier.urlInterface,\r\n discountTariff: supplierId === null ? 0 : newWorkflowSupplier.discountTariff,\r\n userName: supplierId === null ? '' : newWorkflowSupplier.userName,\r\n password: supplierId === null ? '' : newWorkflowSupplier.password,\r\n clientId: supplierId === null ? '' : newWorkflowSupplier.clientId,\r\n hasNonStockValidation: supplierId === null ? false : newWorkflowSupplier.hasNonStockValidation,\r\n port: supplierId === null ? null : newWorkflowSupplier.port,\r\n workflowSupplierId: supplierId,\r\n supplierApiType: this.state.supplierApiTypes.find((item) => item.id === newWorkflowSupplier.supplierApiTypeId)!,\r\n isDialogOpen: true\r\n });\r\n };\r\n\r\n closeDialog = async () => {\r\n this.setState({ isDialogOpen: false });\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.workflowService = (this.context as AppContext).workflowService;\r\n\r\n const options = {\r\n filter: true,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n sort: false,\r\n // responsive: \"stacked\",\r\n customToolbar: () => {\r\n return (\r\n \r\n this.newWorkflowSupplier(null)}\r\n >\r\n \r\n \r\n \r\n );\r\n }\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n ) : null}\r\n
\r\n \r\n \r\n \r\n \r\n \r\n {this.state.workflowSupplierId === null\r\n ? this.translatorService.Tranlate(\r\n 'WORKFLOW_SUPPLIERS_TAB_NEW_MODAL_TITLE',\r\n 'Adauga furnizor'\r\n )\r\n : this.translatorService.Tranlate(\r\n 'WORKFLOW_SUPPLIERS_TAB_UPDATE_MODAL_TITLE',\r\n 'Actualizeaza furnizor'\r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.renderAddForm()}\r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app\r\n }),\r\n null\r\n)(withSnackbar(WorkflowSuppliers as any));\r\n","import React, { Fragment } from 'react';\r\nimport {\r\n AppUserAdminActionCreators,\r\n ApplicationState,\r\n AppActionCreators,\r\n AppState\r\n} from '../../../store';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n Box,\r\n Select,\r\n MenuItem,\r\n Card,\r\n CardContent,\r\n Tabs,\r\n Tab,\r\n Button,\r\n Dialog,\r\n DialogTitle,\r\n Grid,\r\n Typography,\r\n IconButton,\r\n DialogContent,\r\n DialogActions,\r\n TextField,\r\n List,\r\n ListSubheader,\r\n ListItem,\r\n ListItemSecondaryAction,\r\n ListItemText\r\n} from '@material-ui/core';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport { WorkflowReminder, WorkflowPartner, EmailTemplate } from '../../../interfaces/Workflow';\r\nimport { IOrganizationService } from '../../../services/Interfaces/IOrganizationService';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport Referentials from '../../../helpers/Referentials.json';\r\nimport { ReferentialCode } from '../../../helpers/Constants';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport MaterialTable, { Column, EditComponentProps, Icons } from 'material-table';\r\nimport ArrowDownward from '@material-ui/icons/ArrowDownward';\r\nimport Check from '@material-ui/icons/Check';\r\nimport ChevronLeft from '@material-ui/icons/ChevronLeft';\r\nimport ChevronRight from '@material-ui/icons/ChevronRight';\r\nimport Clear from '@material-ui/icons/Clear';\r\nimport DeleteOutline from '@material-ui/icons/DeleteOutline';\r\nimport Edit from '@material-ui/icons/Edit';\r\nimport FilterList from '@material-ui/icons/FilterList';\r\nimport FirstPage from '@material-ui/icons/FirstPage';\r\nimport LastPage from '@material-ui/icons/LastPage';\r\nimport Remove from '@material-ui/icons/Remove';\r\nimport SaveAlt from '@material-ui/icons/SaveAlt';\r\nimport Search from '@material-ui/icons/Search';\r\nimport ViewColumn from '@material-ui/icons/ViewColumn';\r\nimport { Label } from 'reactstrap';\r\nimport moment from 'moment';\r\nimport AddCircleTwoToneIcon from '@material-ui/icons/AddCircleTwoTone';\r\nimport { forwardRef } from 'react';\r\nimport { IReferential } from '../../../interfaces/IReferential';\r\nimport { IWorkflowService } from '../../../services/Interfaces/IWorkflowService';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport { Editor } from 'react-draft-wysiwyg';\r\nimport 'react-draft-wysiwyg/dist/react-draft-wysiwyg.css';\r\nimport { convertToRaw, EditorState, ContentState, convertFromHTML } from 'draft-js';\r\nimport draftToHtml from 'draftjs-to-html';\r\nimport htmlToDraft from 'html-to-draftjs';\r\nimport SubjectIco from '@material-ui/icons/Subject';\r\nimport * as R from 'ramda';\r\nimport { mailPlaceHolders } from '../mailPlaceHolders';\r\nimport { toBase64 } from '../../../utils/toBase64';\r\n\r\nconst tableIcons = {\r\n Add: forwardRef((props, ref) => ),\r\n Check: forwardRef((props, ref) => ),\r\n Clear: forwardRef((props, ref) => ),\r\n Delete: forwardRef((props, ref) => ),\r\n DetailPanel: forwardRef((props, ref) => ),\r\n Edit: forwardRef((props, ref) => ),\r\n Export: forwardRef((props, ref) => ),\r\n Filter: forwardRef((props, ref) => ),\r\n FirstPage: forwardRef((props, ref) => ),\r\n LastPage: forwardRef((props, ref) => ),\r\n NextPage: forwardRef((props, ref) => ),\r\n PreviousPage: forwardRef((props, ref) => ),\r\n ResetSearch: forwardRef((props, ref) => ),\r\n Search: forwardRef((props, ref) => ),\r\n SortArrow: forwardRef((props, ref) => ),\r\n ThirdStateCheck: forwardRef((props, ref) => ),\r\n ViewColumn: forwardRef((props, ref) => )\r\n} as Icons;\r\n\r\ninterface IWorkflowRemindersState {\r\n workflowReminders: WorkflowReminder[];\r\n isLoading: boolean;\r\n workflowId: number;\r\n workflowPartnerList: WorkflowPartner[];\r\n caseStatusTypeList: IReferential[];\r\n emailList: EmailTemplate[];\r\n emailToList: IReferential[];\r\n isDialogEmailTemplateOpen: boolean;\r\n reminderId: number;\r\n selectedEmailBodyTemplate: EditorState;\r\n selectedEmailSubjectTemplate: string;\r\n}\r\n\r\ntype WorkflowRemindersProps = { appState: AppState } & ProviderContext &\r\n RouteComponentProps<{ id: string; workflowId: string }>;\r\n\r\nclass WorkflowReminders extends React.PureComponent<\r\n WorkflowRemindersProps,\r\n IWorkflowRemindersState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private organizationService!: IOrganizationService;\r\n private workflowService!: IWorkflowService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n workflowReminders: [],\r\n isLoading: true,\r\n workflowId: 0,\r\n workflowPartnerList: [],\r\n caseStatusTypeList: [],\r\n emailList: [],\r\n emailToList: [],\r\n isDialogEmailTemplateOpen: false,\r\n reminderId: 0,\r\n selectedEmailBodyTemplate: EditorState.createEmpty(),\r\n selectedEmailSubjectTemplate: ''\r\n } as IWorkflowRemindersState;\r\n\r\n componentDidMount = () => {\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n () => {\r\n this.loadData();\r\n }\r\n );\r\n };\r\n\r\n loadData = async () => {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n const workflowId = Number.parseInt(this.props.match.params.workflowId);\r\n if (Number.isNaN(hoId) || Number.isNaN(workflowId)) {\r\n return;\r\n }\r\n\r\n try {\r\n const ref = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.EmailRecipientType\r\n );\r\n const caseStatusRef = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.CaseStatus\r\n );\r\n\r\n const [data, workflowPartnerList, caseStatusTypes, emailList, emailToList] =\r\n await Promise.all([\r\n this.workflowService.GetWorkflowReminders(workflowId),\r\n this.workflowService.GetWorkflowPartners(workflowId),\r\n this.appReferentialService.Get(caseStatusRef!.baseUrl),\r\n this.workflowService.GetEmailTemplates(),\r\n this.appReferentialService.Get(ref!.baseUrl)\r\n ]);\r\n\r\n const partners = await this.organizationService.GetOrganizationsByIds(\r\n workflowPartnerList.map((item) => item.partnerId)\r\n );\r\n workflowPartnerList.forEach((wpItem) => {\r\n const partner = partners.find((item) => item.id === wpItem.partnerId);\r\n wpItem.partner = R.isNil(partner) ? null : partner;\r\n });\r\n data.forEach((alertItem) => {\r\n const wp = workflowPartnerList.find((i) => i.id === alertItem.workflowPartnerId);\r\n const caseStatus = caseStatusTypes.find((item) => item.id === alertItem.caseStatusId);\r\n alertItem.workflowPartner = R.isNil(wp) ? null : wp;\r\n alertItem.caseStatus = R.isNil(caseStatus) ? null : caseStatus;\r\n });\r\n\r\n this.setState({\r\n workflowReminders: data,\r\n isLoading: false,\r\n workflowId: workflowId,\r\n workflowPartnerList: workflowPartnerList.filter((item) => item.isActive === true),\r\n caseStatusTypeList: caseStatusTypes.filter((item) => item.isActive === true),\r\n emailList: emailList.filter((item) => item.isActive === true),\r\n emailToList: emailToList.filter((item) => item.isActive === true)\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n createWorkflowPartner = async (item: WorkflowPartner) => {\r\n [item.partner] = await Promise.all([this.organizationService.GetOrganization(item.partnerId)]);\r\n return item;\r\n };\r\n\r\n onEmailTemplateClick = (\r\n e: any,\r\n id: number,\r\n bodyEmailTemplate: string,\r\n subjectEmailTemplate: string\r\n ) => {\r\n const blocksFromHTML = htmlToDraft(bodyEmailTemplate);\r\n const contentState = ContentState.createFromBlockArray(\r\n blocksFromHTML.contentBlocks,\r\n blocksFromHTML.entityMap\r\n );\r\n\r\n this.setState({\r\n isDialogEmailTemplateOpen: true,\r\n reminderId: id,\r\n selectedEmailBodyTemplate: EditorState.createWithContent(contentState),\r\n selectedEmailSubjectTemplate: subjectEmailTemplate\r\n });\r\n };\r\n\r\n getColumns = () => {\r\n const lookupOrganization = this.state.workflowPartnerList.reduce(function (\r\n acc: any,\r\n cur: any,\r\n i: number\r\n ) {\r\n acc[cur.id] = cur.partner!.name;\r\n\r\n return acc;\r\n },\r\n {});\r\n\r\n const lookupCaseStatus = this.state.caseStatusTypeList.reduce(function (\r\n acc: any,\r\n cur: any,\r\n i: number\r\n ) {\r\n acc[cur.id] = cur.displayName;\r\n\r\n return acc;\r\n },\r\n {});\r\n\r\n const lookupEmail = this.state.emailList.reduce(function (acc: any, cur: any, i: number) {\r\n acc[cur.id] = cur.displayName;\r\n\r\n return acc;\r\n }, {});\r\n\r\n const lookupEmailTo = this.state.emailToList.reduce(function (acc: any, cur: any, i: number) {\r\n acc[cur.id] = cur.displayName;\r\n\r\n return acc;\r\n }, {});\r\n\r\n return [\r\n {\r\n field: 'workflowPartnerId',\r\n title: this.translatorService.Tranlate(\r\n 'WORKFLOW_REMINDERS_TAB_ORGANIZATION_HEADER',\r\n 'Organizatie'\r\n ),\r\n searchable: true,\r\n lookup: lookupOrganization,\r\n filtering: true,\r\n render: (rowData: WorkflowReminder) => {\r\n return rowData.workflowPartner!.partner!.displayName;\r\n },\r\n editComponent: (props: EditComponentProps) => {\r\n return (\r\n props.onChange(e.target.value)}\r\n >\r\n {this.state.workflowPartnerList\r\n .sort(function (a: WorkflowPartner, b: WorkflowPartner) {\r\n return a.partner!.displayName.localeCompare(b.partner!.displayName);\r\n })\r\n .map((item) => (\r\n \r\n {item.partner!.displayName}\r\n \r\n ))}\r\n \r\n );\r\n }\r\n } as Column,\r\n {\r\n field: 'caseStatusId',\r\n title: this.translatorService.Tranlate(\r\n 'WORKFLOW_REMINDERS_TAB_CASE_STATUS_HEADER',\r\n 'Stare Dosar'\r\n ),\r\n searchable: true,\r\n filtering: false,\r\n lookup: lookupCaseStatus,\r\n render: (rowData: WorkflowReminder) => {\r\n return rowData.caseStatus === null ? '' : rowData.caseStatus!.displayName;\r\n },\r\n\r\n editComponent: (props: EditComponentProps) => {\r\n let caseStatusIdList = [] as any[];\r\n if (!Array.isArray(props.value) && R.isNil(props.value)) {\r\n caseStatusIdList = caseStatusIdList;\r\n } else if (!Array.isArray(props.value) && !R.isNil(props.value)) {\r\n caseStatusIdList.push(props.value);\r\n } else {\r\n caseStatusIdList = R.isNil(props.value) ? [] : props.value;\r\n }\r\n return (\r\n props.onChange(e.target.value)}\r\n >\r\n {this.state.caseStatusTypeList\r\n .sort(function (a: any, b: any) {\r\n return a.displayName.localeCompare(b.displayName);\r\n })\r\n .map((item) => (\r\n \r\n {item.displayName}\r\n \r\n ))}\r\n \r\n );\r\n }\r\n } as Column,\r\n {\r\n field: 'emailTemplateId',\r\n title: this.translatorService.Tranlate('WORKFLOW_REMINDERS_TAB_EMAIL_HEADER', 'Email'),\r\n searchable: true,\r\n filtering: false,\r\n lookup: lookupEmail,\r\n render: (rowData: WorkflowReminder) => {\r\n return (\r\n \r\n this.onEmailTemplateClick(e, rowData.id, rowData.body, rowData.subject)\r\n }\r\n >\r\n {rowData.emailTemplate!.displayName}\r\n \r\n );\r\n },\r\n editComponent: (props: EditComponentProps) => {\r\n return (\r\n props.onChange(e.target.value)}\r\n >\r\n {this.state.emailList\r\n .sort(function (a: any, b: any) {\r\n return a.displayName.localeCompare(b.displayName);\r\n })\r\n .map((item) => (\r\n \r\n {item.displayName}\r\n \r\n ))}\r\n \r\n );\r\n }\r\n } as Column,\r\n {\r\n field: 'numberOfHours',\r\n title: this.translatorService.Tranlate(\r\n 'WORKFLOW_REMINDERS_TAB_NR_HOURS_HEADER',\r\n 'Numar Ore'\r\n ),\r\n searchable: true,\r\n filtering: false,\r\n type: 'numeric'\r\n } as Column,\r\n {\r\n field: 'emailRecipientTypeId',\r\n title: this.translatorService.Tranlate('WORKFLOW_REMINDERS_TAB_EMAIL_TO_HEADER', 'Catre'),\r\n searchable: true,\r\n filtering: false,\r\n lookup: lookupEmailTo,\r\n render: (rowData: WorkflowReminder) => {\r\n return rowData.emailRecipientType!.displayName;\r\n },\r\n editComponent: (props: EditComponentProps) => {\r\n return (\r\n props.onChange(e.target.value)}\r\n >\r\n {this.state.emailToList\r\n .sort(function (a: any, b: any) {\r\n return a.displayName.localeCompare(b.displayName);\r\n })\r\n .map((item) => (\r\n \r\n {item.displayName}\r\n \r\n ))}\r\n \r\n );\r\n }\r\n } as Column,\r\n {\r\n field: 'dateModification',\r\n title: this.translatorService.Tranlate(\r\n 'WORKFLOW_REMINDERS_TAB_MODIFIED_DATE_HEADER',\r\n 'Data modificare'\r\n ),\r\n searchable: true,\r\n filtering: false,\r\n render: (rowData: any) => {\r\n return moment\r\n .utc(rowData.dateModification)\r\n .local()\r\n .format(this.props.appState.longDateFormat);\r\n },\r\n editComponent: (props: EditComponentProps) => {\r\n return ;\r\n }\r\n } as Column\r\n ];\r\n };\r\n\r\n public getLocalization = () => {\r\n return {\r\n header: { actions: '' },\r\n toolbar: {\r\n searchPlaceholder: this.translatorService.Tranlate('SEARCH', 'Cauta'),\r\n searchTooltip: this.translatorService.Tranlate('SEARCH', 'Cauta')\r\n },\r\n body: {\r\n editTooltip: this.translatorService.Tranlate('EDIT', 'Editeaza'),\r\n deleteTooltip: this.translatorService.Tranlate('DELETE', 'Sterge'),\r\n addTooltip: this.translatorService.Tranlate('Add', 'Adauga'),\r\n emptyDataSourceMessage: this.translatorService.Tranlate(\r\n 'NO_RECORDS_TO_DISPLAY',\r\n 'Nu exista date de afisat'\r\n ),\r\n editRow: {\r\n cancelTooltip: this.translatorService.Tranlate('CANCEL', 'Anuleaza'),\r\n saveTooltip: this.translatorService.Tranlate('SAVE', 'Salveaza'),\r\n deleteText: this.translatorService.Tranlate(\r\n 'DELETE_TEXT',\r\n 'Sigur doriti sa stergeti aceasta inregistrare?'\r\n )\r\n }\r\n },\r\n pagination: {\r\n labelRowsSelect: this.translatorService.Tranlate('ROWS', 'inregistrari'),\r\n firstTooltip: this.translatorService.Tranlate('FIRST_PAGE', 'Prima pagina'),\r\n previousTooltip: this.translatorService.Tranlate('PREVIOUS_PAGE', 'Pagina precedenta'),\r\n nextTooltip: this.translatorService.Tranlate('NEXT_PAGE', 'Pagina urmatoare'),\r\n lastTooltip: this.translatorService.Tranlate('LAST_PAGE', 'Ultima pagina'),\r\n labelDisplayedRows:\r\n '{from}-{to} ' + this.translatorService.Tranlate('OF', 'din') + ' {count}'\r\n }\r\n };\r\n };\r\n\r\n onRowUpdate = (newData: WorkflowReminder, oldData?: WorkflowReminder): Promise =>\r\n new Promise(async (resolve, reject) => {\r\n if (oldData) {\r\n try {\r\n if (\r\n R.isNil(newData.workflowPartnerId) ||\r\n R.isNil(newData.emailTemplateId) ||\r\n R.isNil(newData.emailRecipientTypeId) ||\r\n R.isNil(newData.numberOfHours)\r\n ) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n return;\r\n }\r\n let caseStatusIdList = [] as any[];\r\n if (!Array.isArray(newData.caseStatusId) && R.isNil(newData.caseStatusId)) {\r\n caseStatusIdList = caseStatusIdList;\r\n } else if (!Array.isArray(newData.caseStatusId) && !R.isNil(newData.caseStatusId)) {\r\n caseStatusIdList.push(newData.caseStatusId);\r\n } else {\r\n caseStatusIdList = [...newData.caseStatusId];\r\n }\r\n\r\n if (\r\n this.state.workflowReminders.findIndex(\r\n (item) =>\r\n item.workflowPartnerId === newData.workflowPartnerId &&\r\n item.emailTemplateId === newData.emailTemplateId &&\r\n item.numberOfHours.toString() === newData.numberOfHours.toString() &&\r\n item.emailRecipientTypeId === newData.emailRecipientTypeId &&\r\n (item.caseStatusId === null ||\r\n caseStatusIdList.length === 0 ||\r\n caseStatusIdList.findIndex((itemm) => itemm === item.caseStatusId) !== -1) &&\r\n item.id !== newData.id\r\n ) !== -1\r\n ) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'ERROR_MSG_WORKFLOW_PERMISSION_EXISTS',\r\n 'Permisiunea exista deja!'\r\n ),\r\n { variant: 'error' }\r\n );\r\n reject();\r\n return;\r\n }\r\n\r\n newData.workflowPartner = null;\r\n newData.emailRecipientType = null;\r\n\r\n if (newData.emailTemplateId !== oldData.emailTemplateId) {\r\n newData.subject = newData.emailTemplate!.subject;\r\n newData.body = newData.emailTemplate!.body;\r\n }\r\n newData.emailTemplate = null;\r\n newData.caseStatus = null;\r\n\r\n if (caseStatusIdList.length === 0) {\r\n const workflowAlert = newData;\r\n workflowAlert.caseStatusId = null;\r\n await this.workflowService.UpdateWorkflowReminder(workflowAlert);\r\n } else {\r\n let contor = 1;\r\n for (const statusId of caseStatusIdList) {\r\n const workflowAlert = newData;\r\n workflowAlert.caseStatusId = statusId;\r\n contor === 1\r\n ? await this.workflowService.UpdateWorkflowReminder(workflowAlert)\r\n : await this.workflowService.AddWorkflowReminder({ ...workflowAlert, id: 0 });\r\n contor = contor + 1;\r\n }\r\n }\r\n\r\n await this.loadData();\r\n resolve();\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n }\r\n });\r\n\r\n onRowDelete = (oldData: WorkflowReminder): Promise =>\r\n new Promise(async (resolve, reject) => {\r\n if (oldData) {\r\n try {\r\n await this.workflowService.RemoveWorkflowReminder(oldData.id);\r\n await this.loadData();\r\n resolve();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n }\r\n });\r\n\r\n onRowAdd = (newData: WorkflowReminder): Promise =>\r\n new Promise(async (resolve, reject) => {\r\n try {\r\n if (\r\n R.isNil(newData.workflowPartnerId) ||\r\n R.isNil(newData.emailTemplateId) ||\r\n R.isNil(newData.emailRecipientTypeId) ||\r\n R.isNil(newData.numberOfHours)\r\n ) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n return;\r\n }\r\n let caseStatusIdList = [] as any[];\r\n if (!Array.isArray(newData.caseStatusId) && R.isNil(newData.caseStatusId)) {\r\n caseStatusIdList = caseStatusIdList;\r\n } else if (!Array.isArray(newData.caseStatusId) && !R.isNil(newData.caseStatusId)) {\r\n caseStatusIdList.push(newData.caseStatusId);\r\n } else {\r\n caseStatusIdList = newData.caseStatusId;\r\n }\r\n\r\n if (\r\n this.state.workflowReminders.findIndex(\r\n (item) =>\r\n item.workflowPartnerId === newData.workflowPartnerId &&\r\n item.emailTemplateId === newData.emailTemplateId &&\r\n item.numberOfHours.toString() === newData.numberOfHours.toString() &&\r\n item.emailRecipientTypeId === newData.emailRecipientTypeId &&\r\n (item.caseStatusId === null ||\r\n caseStatusIdList.length === 0 ||\r\n caseStatusIdList.findIndex((itemm) => itemm === item.caseStatusId) !== -1)\r\n ) !== -1\r\n ) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'ERROR_MSG_WORKFLOW_PERMISSION_EXISTS',\r\n 'Permisiunea exista deja!'\r\n ),\r\n { variant: 'error' }\r\n );\r\n reject();\r\n return;\r\n }\r\n\r\n newData.workflowPartner = null;\r\n newData.emailRecipientType = null;\r\n\r\n const emailTemplate = this.state.emailList.find(\r\n (item) => item.id === newData.emailTemplateId\r\n );\r\n\r\n newData.subject = emailTemplate!.subject;\r\n newData.body = emailTemplate!.body;\r\n newData.emailTemplate = null;\r\n newData.caseStatus = null;\r\n\r\n if (caseStatusIdList.length === 0) {\r\n const workflowAlert = newData;\r\n workflowAlert.caseStatusId = null;\r\n await this.workflowService.AddWorkflowReminder(workflowAlert);\r\n } else {\r\n for (const statusId of caseStatusIdList) {\r\n const workflowAlert = newData;\r\n workflowAlert.caseStatusId = statusId;\r\n await this.workflowService.AddWorkflowReminder(workflowAlert);\r\n }\r\n }\r\n\r\n await this.loadData();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n resolve();\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n });\r\n\r\n public renderTable = () => {\r\n return (\r\n this.onRowAdd(newData),\r\n onRowUpdate: (newData: any, oldData?: any) => this.onRowUpdate(newData, oldData),\r\n onRowDelete: (oldData: any) => this.onRowDelete(oldData)\r\n }}\r\n />\r\n );\r\n };\r\n closeDialog = () => {\r\n this.setState({ isDialogEmailTemplateOpen: false });\r\n };\r\n\r\n onEditorStateChange = (editorState: EditorState) => {\r\n this.setState({ selectedEmailBodyTemplate: editorState });\r\n };\r\n\r\n renderEditEmailTemplate = () => {\r\n return (\r\n this.onEditorStateChange(editorState)}\r\n toolbar={{\r\n options: [\r\n 'inline',\r\n 'blockType',\r\n 'fontSize',\r\n 'fontFamily',\r\n 'list',\r\n 'textAlign',\r\n 'colorPicker',\r\n 'link',\r\n 'emoji',\r\n 'history',\r\n 'image'\r\n ],\r\n image: {\r\n className: undefined,\r\n component: undefined,\r\n popupClassName: undefined,\r\n urlEnabled: false,\r\n uploadEnabled: true,\r\n alignmentEnabled: true,\r\n uploadCallback: async (file: File) => {\r\n const imageBase64String = await toBase64(file);\r\n return Promise.resolve({ data: { link: imageBase64String } });\r\n },\r\n previewImage: true,\r\n inputAccept: 'image/gif,image/jpeg,image/jpg,image/png,image/svg',\r\n alt: { present: false, mandatory: false },\r\n defaultSize: {\r\n height: '140',\r\n width: 'auto'\r\n }\r\n }\r\n }}\r\n />\r\n );\r\n };\r\n\r\n saveEmailTemplateChanges = async () => {\r\n const id = this.state.reminderId;\r\n const workflowReminders = [...this.state.workflowReminders];\r\n const index = workflowReminders.findIndex((item) => item.id === id);\r\n workflowReminders[index] = {\r\n ...workflowReminders[index],\r\n body: draftToHtml(convertToRaw(this.state.selectedEmailBodyTemplate.getCurrentContent())),\r\n subject: this.state.selectedEmailSubjectTemplate\r\n };\r\n await this.workflowService.UpdateWorkflowReminder(workflowReminders[index]);\r\n\r\n this.setState(\r\n {\r\n isLoading: true,\r\n isDialogEmailTemplateOpen: false\r\n },\r\n async () => await this.loadData()\r\n );\r\n };\r\n\r\n placeHolderClick = (text: string) => {\r\n const editorState = this.state.selectedEmailBodyTemplate;\r\n const newBlockMap = convertFromHTML('{{' + text + '}}');\r\n const contentState = editorState.getCurrentContent();\r\n const selectionState = editorState.getSelection();\r\n const key = selectionState.getAnchorKey();\r\n const blocksAfter = contentState\r\n .getBlockMap()\r\n .skipUntil(function (_, k) {\r\n return k === key;\r\n })\r\n .skip(1)\r\n .toArray();\r\n const blocksBefore = contentState\r\n .getBlockMap()\r\n .takeUntil(function (_, k) {\r\n return k === key;\r\n })\r\n .toArray();\r\n\r\n newBlockMap.contentBlocks = blocksBefore\r\n .concat([contentState.getBlockForKey(key)])\r\n .concat(newBlockMap.contentBlocks)\r\n .concat(blocksAfter);\r\n\r\n const newContentState = ContentState.createFromBlockArray(\r\n newBlockMap.contentBlocks,\r\n newBlockMap.entityMap\r\n );\r\n const newEditorState = EditorState.createWithContent(newContentState);\r\n this.setState({ selectedEmailBodyTemplate: newEditorState });\r\n };\r\n addPlaceholderToSubject = (text: string) => {\r\n this.setState({\r\n selectedEmailSubjectTemplate: this.state.selectedEmailSubjectTemplate + '{{' + text + '}}'\r\n });\r\n };\r\n\r\n renderMailPlaceHolders = () => {\r\n return (\r\n Placeholders}>\r\n {mailPlaceHolders.map((val, index) => (\r\n \r\n this.placeHolderClick(val)} />\r\n \r\n this.addPlaceholderToSubject(val)}>\r\n \r\n \r\n \r\n \r\n ))}\r\n \r\n );\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.workflowService = (this.context as AppContext).workflowService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? this.renderTable() : null}\r\n
\r\n \r\n fullScreen\r\n >\r\n \r\n \r\n \r\n \r\n {this.translatorService.Tranlate(\r\n 'EDIT_ORGANIZATION_FORM_ACTION_SEND_EMAIL_EDIT_EMAIL_TEMPLATE_MODAL_TITLE',\r\n 'Editeaza template-ul email-ului'\r\n )}\r\n \r\n \r\n \r\n this.closeDialog()}\r\n size={'small'}\r\n style={{ color: '#ffffff' }}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n this.setState({\r\n selectedEmailSubjectTemplate: e.target.value\r\n })\r\n }\r\n variant=\"outlined\"\r\n size=\"small\"\r\n />\r\n {this.renderEditEmailTemplate()}\r\n \r\n \r\n \r\n {this.renderMailPlaceHolders()}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (stateProps: any, dispatchProps: any, ownProps: WorkflowRemindersProps) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\nexport default connect(\r\n (state: ApplicationState) => ({ appState: state.app }),\r\n { ...AppUserAdminActionCreators, ...AppActionCreators },\r\n mergeProps\r\n)(withSnackbar(WorkflowReminders as any));\r\n","import React, { Fragment } from 'react';\r\nimport {\r\n AppUserAdminActionCreators,\r\n ApplicationState,\r\n AppActionCreators,\r\n AppState\r\n} from '../../../store';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n Box,\r\n TextField,\r\n Card,\r\n CardContent,\r\n Tabs,\r\n Tab,\r\n Switch,\r\n FormControlLabel,\r\n Chip\r\n} from '@material-ui/core';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport { OrganizationInterface } from '../../../interfaces/Organization';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport MaterialTable, { Column, Icons } from 'material-table';\r\nimport ArrowDownward from '@material-ui/icons/ArrowDownward';\r\nimport Check from '@material-ui/icons/Check';\r\nimport ChevronLeft from '@material-ui/icons/ChevronLeft';\r\nimport ChevronRight from '@material-ui/icons/ChevronRight';\r\nimport Clear from '@material-ui/icons/Clear';\r\nimport DeleteOutline from '@material-ui/icons/DeleteOutline';\r\nimport Edit from '@material-ui/icons/Edit';\r\nimport FilterList from '@material-ui/icons/FilterList';\r\nimport FirstPage from '@material-ui/icons/FirstPage';\r\nimport LastPage from '@material-ui/icons/LastPage';\r\nimport Remove from '@material-ui/icons/Remove';\r\nimport SaveAlt from '@material-ui/icons/SaveAlt';\r\nimport Search from '@material-ui/icons/Search';\r\nimport ViewColumn from '@material-ui/icons/ViewColumn';\r\nimport { Label } from 'reactstrap';\r\nimport moment from 'moment';\r\nimport AddCircleTwoToneIcon from '@material-ui/icons/AddCircleTwoTone';\r\nimport { forwardRef } from 'react';\r\nimport { IWorkflowService } from '../../../services/Interfaces/IWorkflowService';\r\nimport { WorkflowInterface } from '../../../interfaces/Workflow';\r\nconst tableIcons = {\r\n Add: forwardRef((props, ref) => ),\r\n Check: forwardRef((props, ref) => ),\r\n Clear: forwardRef((props, ref) => ),\r\n Delete: forwardRef((props, ref) => ),\r\n DetailPanel: forwardRef((props, ref) => ),\r\n Edit: forwardRef((props, ref) => ),\r\n Export: forwardRef((props, ref) => ),\r\n Filter: forwardRef((props, ref) => ),\r\n FirstPage: forwardRef((props, ref) => ),\r\n LastPage: forwardRef((props, ref) => ),\r\n NextPage: forwardRef((props, ref) => ),\r\n PreviousPage: forwardRef((props, ref) => ),\r\n ResetSearch: forwardRef((props, ref) => ),\r\n Search: forwardRef((props, ref) => ),\r\n SortArrow: forwardRef((props, ref) => ),\r\n ThirdStateCheck: forwardRef((props, ref) => ),\r\n ViewColumn: forwardRef((props, ref) => )\r\n} as Icons;\r\ninterface IWorkflowInterfacesState {\r\n interfaces: WorkflowInterface[];\r\n isLoading: boolean;\r\n workflowId: number;\r\n}\r\ntype WorkflowInterfacesProps = { appState: AppState } & ProviderContext &\r\n RouteComponentProps<{ id: string; workflowId: string }>;\r\nclass WorkflowInterfaces extends React.PureComponent<\r\n WorkflowInterfacesProps,\r\n IWorkflowInterfacesState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private workflowService!: IWorkflowService;\r\n private appReferentialService!: IReferentialService;\r\n static contextType = ApplicationContext;\r\n state = {\r\n interfaces: [],\r\n isLoading: true,\r\n workflowId: 0\r\n } as IWorkflowInterfacesState;\r\n componentDidMount = () => {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n const workflowId = Number.parseInt(this.props.match.params.workflowId);\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n () => {\r\n this.loadWorkflowInterfaces();\r\n }\r\n );\r\n };\r\n loadWorkflowInterfaces = async () => {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n const workflowId = Number.parseInt(this.props.match.params.workflowId);\r\n if (Number.isNaN(hoId) || Number.isNaN(workflowId)) {\r\n return;\r\n }\r\n try {\r\n const data = await this.workflowService.GetWorkflowInterfaces(workflowId);\r\n this.setState({\r\n interfaces: data,\r\n isLoading: false,\r\n workflowId: workflowId\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n getColumns = () => {\r\n return [\r\n {\r\n field: 'clientAccess',\r\n title: this.translatorService.Tranlate(\r\n 'ORGANIZATION_INTERFACE_CLIENT_ACCESS_HEADER',\r\n 'Acces client'\r\n ),\r\n render: (rowData: any) => {\r\n return (\r\n \r\n }\r\n label={''}\r\n />\r\n );\r\n },\r\n editComponent: (props) => (\r\n props.onChange(e.target.checked)}\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={''}\r\n />\r\n )\r\n } as Column,\r\n {\r\n field: 'supportsOAuth2',\r\n title: this.translatorService.Tranlate(\r\n 'ORGANIZATION_INTERFACE_CLIENT_OAUTH2_HEADER',\r\n 'OAuth2'\r\n ),\r\n render: (rowData: any) => {\r\n return (\r\n \r\n }\r\n label={''}\r\n />\r\n );\r\n },\r\n editComponent: (props) => (\r\n props.onChange(e.target.checked)}\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={''}\r\n />\r\n )\r\n } as Column,\r\n {\r\n field: 'aftSupplier',\r\n title: this.translatorService.Tranlate(\r\n 'ORGANIZATION_INTERFACE_AFT_SUPPLIER_HEADER',\r\n 'Uleiul Grupului'\r\n ),\r\n render: (rowData: any) => {\r\n return (\r\n \r\n }\r\n label={''}\r\n />\r\n );\r\n },\r\n editComponent: (props) => (\r\n props.onChange(e.target.checked)}\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={''}\r\n />\r\n )\r\n } as Column,\r\n {\r\n field: 'smallPartPercentage',\r\n title: this.translatorService.Tranlate('ORGANIZATION_INTERFACE_SMALL_PART_PERCENTAGE_HEADER', 'Piese mici %'),\r\n searchable: true\r\n } as Column,\r\n {\r\n field: 'code',\r\n title: this.translatorService.Tranlate('ORGANIZATION_INTERFACE_CODE_HEADER', 'Cod'),\r\n searchable: true\r\n } as Column,\r\n {\r\n field: 'url',\r\n title: this.translatorService.Tranlate('ORGANIZATION_INTERFACE_URL_HEADER', 'URL'),\r\n searchable: true\r\n } as Column,\r\n {\r\n field: 'port',\r\n title: this.translatorService.Tranlate('ORGANIZATION_INTERFACE_PORT_HEADER', 'Port'),\r\n searchable: true\r\n } as Column,\r\n {\r\n field: 'refreshTokenValidUntil',\r\n title: this.translatorService.Tranlate('ORGANIZATION_INTERFACE_STATUS_HEADER', 'Status'),\r\n editable: 'never',\r\n render: (rowData: OrganizationInterface) => {\r\n if (!rowData.supportsOAuth2) {\r\n return (\r\n \r\n );\r\n }\r\n if (!rowData.refreshTokenValidUntil) {\r\n return (\r\n \r\n );\r\n }\r\n if (\r\n rowData.refreshTokenValidUntil &&\r\n moment.utc(rowData.refreshTokenValidUntil).isAfter(moment.utc())\r\n ) {\r\n return (\r\n \r\n );\r\n }\r\n return (\r\n \r\n );\r\n },\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n editComponent: (props: any) => {\r\n if (!props.rowData.supportsOAuth2) {\r\n return <>;\r\n }\r\n return (\r\n props.onChange(e.target.value)}\r\n />\r\n );\r\n }\r\n } as Column,\r\n {\r\n field: 'userName',\r\n title: this.translatorService.Tranlate('ORGANIZATION_INTERFACE_UER_HEADER', 'Utilizator'),\r\n searchable: true,\r\n render: (props: OrganizationInterface) => {\r\n if (props.clientAccess) {\r\n return '-';\r\n }\r\n return props.userName;\r\n },\r\n editComponent: (props: any) => {\r\n if (props.rowData.clientAccess) {\r\n return <>;\r\n }\r\n return (\r\n props.onChange(e.target.value)}\r\n />\r\n );\r\n }\r\n },\r\n {\r\n field: 'password',\r\n title: this.translatorService.Tranlate('ORGANIZATION_INTERFACE_PASSWORD_HEADER', 'Parola'),\r\n render: (props: OrganizationInterface) => {\r\n if (props.clientAccess) {\r\n return '-';\r\n }\r\n return '***';\r\n },\r\n editComponent: (props: any) => {\r\n if (props.rowData.clientAccess) {\r\n return <>;\r\n }\r\n return (\r\n props.onChange(e.target.value)}\r\n />\r\n );\r\n }\r\n } as Column,\r\n {\r\n field: 'customerId',\r\n title: this.translatorService.Tranlate(\r\n 'ORGANIZATION_INTERFACE_CUSTOMER_ID_HEADER',\r\n 'Client Id'\r\n ),\r\n searchable: true,\r\n render: (props: OrganizationInterface) => {\r\n if (props.clientAccess) {\r\n return '-';\r\n }\r\n if (props.supportsOAuth2) {\r\n return '***';\r\n }\r\n return props.customerId;\r\n },\r\n editComponent: (props: any) => {\r\n if (props.rowData.clientAccess) {\r\n return <>;\r\n }\r\n return (\r\n props.onChange(e.target.value)}\r\n />\r\n );\r\n }\r\n },\r\n {\r\n field: 'secondUser',\r\n title: this.translatorService.Tranlate(\r\n 'ORGANIZATION_INTERFACE_SECOND_USER_HEADER',\r\n 'Utilizator 2'\r\n ),\r\n searchable: true,\r\n render: (props: OrganizationInterface) => {\r\n if (props.clientAccess || props.supportsOAuth2) {\r\n return '-';\r\n }\r\n return props.secondUser;\r\n },\r\n editComponent: (props: any) => {\r\n if (props.rowData.clientAccess || props.supportsOAuth2) {\r\n return <>;\r\n }\r\n return (\r\n props.onChange(e.target.value)}\r\n />\r\n );\r\n }\r\n }\r\n ];\r\n };\r\n public getLocalization = () => {\r\n return {\r\n header: { actions: '' },\r\n toolbar: {\r\n searchPlaceholder: this.translatorService.Tranlate('SEARCH', 'Cauta'),\r\n searchTooltip: this.translatorService.Tranlate('SEARCH', 'Cauta')\r\n },\r\n body: {\r\n editTooltip: this.translatorService.Tranlate('EDIT', 'Editeaza'),\r\n deleteTooltip: this.translatorService.Tranlate('DELETE', 'Sterge'),\r\n addTooltip: this.translatorService.Tranlate('Add', 'Adauga'),\r\n emptyDataSourceMessage: this.translatorService.Tranlate(\r\n 'NO_RECORDS_TO_DISPLAY',\r\n 'Nu exista date de afisat'\r\n ),\r\n editRow: {\r\n cancelTooltip: this.translatorService.Tranlate('CANCEL', 'Anuleaza'),\r\n saveTooltip: this.translatorService.Tranlate('SAVE', 'Salveaza'),\r\n deleteText: this.translatorService.Tranlate(\r\n 'DELETE_TEXT',\r\n 'Sigur doriti sa stergeti aceasta inregistrare?'\r\n )\r\n }\r\n },\r\n pagination: {\r\n labelRowsSelect: this.translatorService.Tranlate('ROWS', 'inregistrari'),\r\n firstTooltip: this.translatorService.Tranlate('FIRST_PAGE', 'Prima pagina'),\r\n previousTooltip: this.translatorService.Tranlate('PREVIOUS_PAGE', 'Pagina precedenta'),\r\n nextTooltip: this.translatorService.Tranlate('NEXT_PAGE', 'Pagina urmatoare'),\r\n lastTooltip: this.translatorService.Tranlate('LAST_PAGE', 'Ultima pagina'),\r\n labelDisplayedRows:\r\n '{from}-{to} ' + this.translatorService.Tranlate('OF', 'din') + ' {count}'\r\n }\r\n };\r\n };\r\n onRowUpdate = (newData: WorkflowInterface, oldData?: WorkflowInterface): Promise =>\r\n new Promise(async (resolve, reject) => {\r\n if (oldData) {\r\n try {\r\n await this.workflowService.UpdateWorkflowInterface(newData);\r\n await this.loadWorkflowInterfaces();\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n resolve();\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n }\r\n });\r\n onRowDelete = (oldData: WorkflowInterface): Promise =>\r\n new Promise(async (resolve, reject) => {\r\n if (oldData) {\r\n try {\r\n await this.workflowService.RemoveWorkflowInterface(oldData.id);\r\n await this.loadWorkflowInterfaces();\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n resolve();\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n }\r\n });\r\n onRowAdd = (newData: WorkflowInterface): Promise =>\r\n new Promise(async (resolve, reject) => {\r\n try {\r\n newData.workflowId = this.state.workflowId;\r\n await this.workflowService.AddWorkflowInterface(newData);\r\n await this.loadWorkflowInterfaces();\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n resolve();\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n });\r\n public renderTable = () => {\r\n return (\r\n this.onRowAdd(newData),\r\n onRowUpdate: (newData: any, oldData?: any) => this.onRowUpdate(newData, oldData),\r\n onRowDelete: (oldData: any) => this.onRowDelete(oldData)\r\n }}\r\n />\r\n );\r\n };\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n this.workflowService = (this.context as AppContext).workflowService;\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? this.renderTable() : null}\r\n
\r\n
\r\n );\r\n }\r\n}\r\nconst mergeProps = (stateProps: any, dispatchProps: any, ownProps: WorkflowInterfacesProps) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\nexport default connect(\r\n (state: ApplicationState) => ({ appState: state.app }),\r\n { ...AppUserAdminActionCreators, ...AppActionCreators },\r\n mergeProps\r\n)(withSnackbar(WorkflowInterfaces as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { Organization } from '../../../interfaces/Organization';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport { IOrganizationService } from '../../../services/Interfaces/IOrganizationService';\r\nimport { Box, Button, Card, CardContent, Tabs, Tab, Switch, IconButton } from '@material-ui/core';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport MUIDataTable, {\r\n MUIDataTableColumnOptions,\r\n MUIDataTableMeta,\r\n SelectableRows\r\n} from 'mui-datatables';\r\nimport moment from 'moment';\r\nimport { MUITranslations } from '../../../helpers/MUITableTranslations';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ValidatorForm, TextValidator } from 'react-material-ui-form-validator';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport { WorkflowCostCenter } from '../../../interfaces/Workflow';\r\nimport { IWorkflowService } from '../../../services/Interfaces/IWorkflowService';\r\nimport { isNullOrUndefined } from 'util';\r\nimport _ from 'lodash';\r\nimport { ReferentialCode } from '../../../helpers/Constants';\r\nimport { IReferential } from '../../../interfaces/IReferential';\r\nimport Referentials from '../../../helpers/Referentials.json';\r\nimport DeleteOutlineTwoToneIcon from '@material-ui/icons/DeleteOutlineTwoTone';\r\n\r\ninterface IWorkflowCostCentersState {\r\n workflowCostCenters: WorkflowCostCenter[];\r\n isLoading: boolean;\r\n costCenters: IReferential[];\r\n selectedCostCenter: IReferential[];\r\n workflowId: number;\r\n}\r\n\r\ntype IWorkflowCostCentersProps = { appState: AppState } & ProviderContext &\r\n RouteComponentProps<{ id: string; workflowId: string }>;\r\n\r\nclass WorkflowCostCenters extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private workflowService!: IWorkflowService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n workflowCostCenters: [],\r\n isLoading: false,\r\n costCenters: [],\r\n selectedCostCenter: [],\r\n workflowId: 0\r\n } as IWorkflowCostCentersState;\r\n\r\n public componentDidMount() {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n const workflowId = Number.parseInt(this.props.match.params.workflowId);\r\n\r\n if (Number.isNaN(hoId) || Number.isNaN(workflowId)) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadWorkflowCostCenters();\r\n }\r\n );\r\n }\r\n \r\n public hasRole = (roleCode: string): boolean => {\r\n return this.props.appState.appUser?.userRole?.code === roleCode;\r\n };\r\n\r\n loadWorkflowCostCenters = async () => {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n const workflowId = Number.parseInt(this.props.match.params.workflowId);\r\n\r\n if (Number.isNaN(hoId) || Number.isNaN(workflowId)) {\r\n return;\r\n }\r\n\r\n const ref = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.CostCenter\r\n );\r\n\r\n const [workflowCostCenterList, costCenters] = await Promise.all([\r\n this.workflowService.GetWorkflowCostCenters(workflowId),\r\n this.appReferentialService.Get(ref!.baseUrl)\r\n ]);\r\n\r\n workflowCostCenterList.forEach((ojt) => {\r\n const costCenter = costCenters.find((item) => item.id === ojt.costCenterId);\r\n ojt.costCenter = isNullOrUndefined(costCenter) ? null : costCenter;\r\n });\r\n\r\n console.log('workflowCostCenterList', workflowCostCenterList);\r\n console.log('costCenters', costCenters);\r\n\r\n this.setState({\r\n workflowCostCenters: workflowCostCenterList,\r\n costCenters: costCenters.filter((item) => item.isActive === true),\r\n isLoading: false,\r\n workflowId: workflowId\r\n });\r\n };\r\n\r\n \r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'costCenter',\r\n label: this.translatorService.Tranlate(\r\n 'WORKFLOW_TAB_COST_CENTER',\r\n 'Centru de Cost'\r\n ),\r\n options: {\r\n filter: true,\r\n sort: false,\r\n customBodyRender: (value: Organization) => {\r\n return value.displayName;\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'dateModification',\r\n label: this.translatorService.Tranlate(\r\n 'WORKFLOW_PARTNERS_TAB_DATE_MODIFICATION_HEADER',\r\n 'Data Modificare'\r\n ),\r\n options: {\r\n filter: false,\r\n sort: false,\r\n customBodyRender: (value: Date) =>\r\n moment.utc(value).local().format(this.props.appState.longDateFormat)\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: '',\r\n options: {\r\n setCellHeaderProps: () => ({ align: 'center' }),\r\n setCellProps: () => ({ align: 'center' }),\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.deleteWorkflowCostCenter(e, tableMeta)}\r\n >\r\n \r\n \r\n );\r\n }\r\n }\r\n }\r\n ];\r\n\r\n return columns;\r\n };\r\n\r\n deleteWorkflowCostCenter = async (event: any, tableMeta: MUIDataTableMeta) => {\r\n try {\r\n const id = tableMeta.rowData[0];\r\n\r\n await this.workflowService.RemoveWorkflowCostCenter(id);\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n () => {\r\n this.loadWorkflowCostCenters();\r\n }\r\n );\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n addWorkflowCostCenter = async () => {\r\n try {\r\n if (\r\n this.state.workflowCostCenters.findIndex(\r\n (item) =>\r\n this.state.selectedCostCenter.findIndex((itemm) => itemm.id === item.costCenterId) !==\r\n -1\r\n ) !== -1\r\n ) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('ERROR_MSG_WORKFLOW_COST_CENTER_EXISTS', 'Centrul de cost exista deja!'),\r\n { variant: 'error' }\r\n );\r\n return;\r\n }\r\n\r\n const workflowCostCenters = [];\r\n for (const costCenter of this.state.selectedCostCenter) {\r\n workflowCostCenters.push({\r\n id: 0,\r\n workflowId: this.state.workflowId,\r\n costCenterId: costCenter!.id,\r\n costCenter: costCenter\r\n } as WorkflowCostCenter);\r\n }\r\n\r\n await this.workflowService.AddWorkflowCostCenter(workflowCostCenters);\r\n\r\n this.setState(\r\n {\r\n isLoading: true,\r\n selectedCostCenter: []\r\n },\r\n () => {\r\n this.loadWorkflowCostCenters();\r\n }\r\n );\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n\r\n handleWorkflowCostCenterChange = (newValue: any[]) => {\r\n this.setState({ selectedCostCenter: newValue });\r\n };\r\n\r\n renderAddForm() {\r\n return (\r\n \r\n \r\n \r\n \r\n this.handleWorkflowCostCenterChange(newValue)}\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.workflowService = (this.context as AppContext).workflowService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n const options = {\r\n viewColumns: false,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n elevation: 1\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.renderAddForm()}\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n ) : null}\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app\r\n }),\r\n null\r\n)(withSnackbar(WorkflowCostCenters as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { Grid, Button, Box } from '@material-ui/core';\r\nimport { AppContext, ApplicationContext } from '../../../context/Contexts';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport WorkflowGeneralData from './WorkflowGeneralData';\r\nimport WorkflowParameters from './WorkflowParameters';\r\nimport WorkflowOrganizationTypes from './WorkflowOrganizationTypes';\r\nimport WorkflowPartners from './WorkflowPartners';\r\nimport WorkflowTariffs from './WorkflowTariffs';\r\nimport WorkflowCaseStructure from '../workflows/WorkflowCaseStructure';\r\nimport WorkflowSuppliers2 from '../workflows/WorkflowSuppliers2';\r\nimport WorkflowReminders from '../workflows/WorkflowNotifications';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { PageTitle } from '../../../layout-components';\r\nimport WorkflowInterfaces from './WorkflowInterfaces';\r\nimport WorkflowCostCenters from './WorkflowCostCenters';\r\n\r\ninterface IOrganizationAdminStateState {\r\n selectedTab: number;\r\n}\r\n\r\ntype IOrganizationAdminProps = { appState: AppState } & ProviderContext &\r\n RouteComponentProps<{ id: string; workflowId: string }>;\r\n\r\nclass OrganizationAdmin extends React.PureComponent<\r\n IOrganizationAdminProps,\r\n IOrganizationAdminStateState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n\r\n static contextType = ApplicationContext;\r\n state = { selectedTab: 0 };\r\n\r\n onButtonClick = (newValue: number) => {\r\n this.setState({ selectedTab: newValue });\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n this.onButtonClick(0)}\r\n >\r\n \r\n {this.translatorService.Tranlate('WORKFLOWS_TAB_GENERAL_DATA', 'Date Generale')}\r\n \r\n \r\n \r\n \r\n this.onButtonClick(1)}\r\n >\r\n {this.translatorService.Tranlate('WORKFLOWS_TAB_PARAMETERS', 'Parametri')}\r\n \r\n \r\n \r\n this.onButtonClick(2)}\r\n >\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOWS_TAB_ORGANIZATION_TYPES',\r\n 'Tip organizatie'\r\n )}\r\n \r\n \r\n \r\n \r\n this.onButtonClick(3)}\r\n >\r\n {this.translatorService.Tranlate('WORKFLOWS_TAB_PARTNERS', 'Parteneri')}\r\n \r\n \r\n \r\n this.onButtonClick(4)}\r\n >\r\n {this.translatorService.Tranlate('WORKFLOWS_TAB_TARIFFS', 'Tarife')}\r\n \r\n \r\n \r\n this.onButtonClick(5)}\r\n >\r\n {this.translatorService.Tranlate('WORKFLOWS_TAB_SUPPLIERS', 'Furnizori')}\r\n \r\n \r\n {/* \r\n \r\n */}\r\n {/* \r\n \r\n */}\r\n \r\n this.onButtonClick(8)}\r\n >\r\n \r\n {this.translatorService.Tranlate(\r\n 'WORKFLOWS_TAB_CASE_STRUCTURE',\r\n 'Structura dosar'\r\n )}\r\n \r\n \r\n \r\n \r\n this.onButtonClick(9)}\r\n >\r\n {this.translatorService.Tranlate('WORKFLOWS_TAB_REMINDERS', 'Notificari')}\r\n \r\n \r\n \r\n this.onButtonClick(10)}\r\n >\r\n {this.translatorService.Tranlate('WORKFLOW_TAB_INTERFACES', 'Interfete')}\r\n \r\n \r\n \r\n this.onButtonClick(11)}\r\n >\r\n {this.translatorService.Tranlate('WORKFLOW_TAB_COST_CENTERS', 'Centre de Cost')}\r\n \r\n \r\n {/* \r\n \r\n */}\r\n {/* \r\n \r\n */}\r\n \r\n \r\n \r\n {this.state.selectedTab === 0 ? : null}\r\n {this.state.selectedTab === 1 ? : null}\r\n {this.state.selectedTab === 2 ? : null}\r\n {this.state.selectedTab === 3 ? : null}\r\n {this.state.selectedTab === 4 ? : null}\r\n {this.state.selectedTab === 5 ? : null}\r\n\r\n {this.state.selectedTab === 8 ? : null}\r\n {this.state.selectedTab === 9 ? : null}\r\n {this.state.selectedTab === 10 ? : null}\r\n {this.state.selectedTab === 11 ? : null}\r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app\r\n }),\r\n null\r\n)(withSnackbar(OrganizationAdmin as any));\r\n","import React from 'react';\r\nimport { ScaleLoader } from 'react-spinners';\r\n\r\nconst Loader: React.FC = () => {\r\n return (\r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default Loader;\r\n","import * as React from 'react';\r\nimport { ApplicationState, AppState, CaseSettingsActionCreators, CaseSettingsState } from '../../store';\r\nimport { ApplicationContext, AppContext } from '../../context/Contexts';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { Case, CaseFilters, TariffPercentResponse } from '../../interfaces/Case';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport { Card, Grid, IconButton, Tab, Tabs, AppBar, TextField, Tooltip, Button, Dialog, DialogTitle, DialogContent, Typography } from '@material-ui/core';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport TabPanel from '../_shared/Tabs';\r\nimport DeleteOutlineTwoToneIcon from '@material-ui/icons/DeleteOutlineTwoTone';\r\nimport MUIDataTable, {\r\n MUIDataTableColumnOptions,\r\n MUIDataTableMeta,\r\n SelectableRows\r\n} from 'mui-datatables';\r\nimport { MUITranslations } from '../../helpers/MUITableTranslations';\r\nimport moment from 'moment';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport { CaseStatusTypeCode, FilterTypeCodeEnum, ReferentialCode, SupplierCode } from '../../helpers/Constants';\r\nimport { IAppUserService } from '../../services/Interfaces/IAppUserService';\r\nimport { Organization, OrganizationFilterType } from '../../interfaces/Organization';\r\nimport { IOrganizationService } from '../../services/Interfaces/IOrganizationService';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport { AppUser } from '../../interfaces/AppUser';\r\nimport { IWorkflowService } from '../../services/Interfaces/IWorkflowService';\r\nimport { Workflow } from '../../interfaces/Workflow';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { MuiPickersUtilsProvider, DatePicker } from '@material-ui/pickers';\r\nimport MomentUtils from '@date-io/moment';\r\nimport { MaterialUiPickersDate } from '@material-ui/pickers/typings/date';\r\nimport * as R from 'ramda';\r\nimport { IVehicleService } from '../../services/Interfaces/IVehicleService';\r\nimport { Vehicle } from '../../interfaces/Vehicle';\r\nimport { VehicleHelper } from '../../helpers/VehicleHelper';\r\nimport Loader from '../Loader';\r\nimport FileCopyOutlined from '@material-ui/icons/FileCopyOutlined';\r\nimport _ from 'lodash';\r\nimport { Order } from '../../interfaces/Order';\r\nimport { IOrderService } from '../../services/Interfaces/IOrderService';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport OrderDetails from '../orders/OrderDetails';\r\nimport { CaseSettings } from '../../interfaces/CaseSettings';\r\nimport Referentials from '../../helpers/Referentials.json';\r\nimport { IReferentialService } from '../../services/Interfaces/IReferentialService';\r\n\r\ntype CasesProps = {\r\n appState: AppState;\r\n caseSettingsState: CaseSettingsState;\r\n } & ProviderContext &\r\n RouteComponentProps;\r\n\r\ninterface IWorkflow {\r\n workflowId: number;\r\n workflowDisplayName: string;\r\n}\r\n\r\ninterface ICasesState {\r\n caseList: Case[];\r\n organizationEntities: Organization[];\r\n selectedOrgEntities: Organization[];\r\n selectedOrgFilter: OrganizationFilterType | null;\r\n userWorkflowsList: Workflow[];\r\n workflowsList: IWorkflow[];\r\n selectedWorkflows: IWorkflow[];\r\n organizationCasePartnerList: Organization[];\r\n selectedOrgCasePartner: Organization[];\r\n caseStatusList: IReferential[];\r\n selectedCaseStatus: IReferential[];\r\n caseTypesList: IReferential[];\r\n selectedCaseType: IReferential[];\r\n assignedToUserList: AppUser[];\r\n createdByUserList: AppUser[];\r\n selectedAssignedToUser: AppUser[];\r\n selectedCreatedByUser: AppUser[];\r\n casePolicyTypesList: IReferential[];\r\n selectedPolicyType: IReferential[];\r\n selectedTab: number;\r\n isLoading: boolean;\r\n isLoadingCases: boolean;\r\n filterStartDate: Date | null;\r\n filterEndDate: Date | null;\r\n count: number;\r\n page: number;\r\n pageSize: number;\r\n showCopyCase: boolean;\r\n orderList: Order[];\r\n isDialogOpen: boolean;\r\n isLoadingDialog: boolean;\r\n isOrderDialogOpen: boolean;\r\n selectedOrder: Order | null;\r\n selectedCase: Case | null;\r\n showOrderDetails: boolean;\r\n vinSearchText: string;\r\n plateNumberSearchText: string;\r\n caseNumberSearchText: string;\r\n showCaseStatus: boolean;\r\n hidePartnerTab: boolean;\r\n makeSearchText: string;\r\n modelSearchText: string;\r\n showMakeModelSearch: boolean;\r\n hideLkqColumns: boolean;\r\n organizationOwnerId: number | null;\r\n}\r\n\r\nclass LocalizedUtils extends MomentUtils {\r\n // dateFormat = \"DD MM YYYY\";\r\n}\r\n\r\nclass Cases extends React.PureComponent {\r\n private workflowService!: IWorkflowService;\r\n private translatorService!: ITranslatorService;\r\n private caseService!: ICaseService;\r\n private appUserService!: IAppUserService;\r\n private organizationService!: IOrganizationService;\r\n private vehicleService!: IVehicleService;\r\n private orderService!: IOrderService;\r\n static contextType = ApplicationContext;\r\n private appReferentialService!: IReferentialService;\r\n\r\n state = {\r\n caseList: [],\r\n organizationEntities: [],\r\n selectedOrgEntities: [],\r\n workflowsList: [],\r\n userWorkflowsList: [],\r\n selectedWorkflows: [],\r\n organizationCasePartnerList: [],\r\n selectedOrgFilter: null,\r\n selectedOrgCasePartner: [],\r\n caseStatusList: [],\r\n selectedCaseStatus: [],\r\n caseTypesList: [],\r\n selectedCaseType: [],\r\n assignedToUserList: [],\r\n createdByUserList: [],\r\n selectedAssignedToUser: [],\r\n selectedCreatedByUser: [],\r\n casePolicyTypesList: [],\r\n selectedPolicyType: [],\r\n selectedTab: 0,\r\n isLoading: false,\r\n isLoadingCases: false,\r\n count: 1,\r\n page: 0,\r\n pageSize: 10,\r\n filterStartDate: null,\r\n filterEndDate: new Date(),\r\n showCopyCase: false,\r\n orderList: [],\r\n isDialogOpen: false,\r\n isLoadingDialog: false,\r\n isOrderDialogOpen: false,\r\n selectedOrder: null,\r\n selectedCase: null,\r\n showOrderDetails: false,\r\n vinSearchText: '',\r\n plateNumberSearchText: '',\r\n caseNumberSearchText: '',\r\n showCaseStatus: false,\r\n hidePartnerTab: false,\r\n makeSearchText: '',\r\n modelSearchText: '',\r\n showMakeModelSearch: false,\r\n hideLkqColumns: false,\r\n organizationOwnerId: null\r\n } as ICasesState;\r\n\r\n public async componentDidMount() {\r\n this.setState({\r\n isLoading: true\r\n });\r\n\r\n let organization: Organization | null = null;\r\n let viewPartnerCases = false;\r\n const organizationOwnerId = this.props.appState!.appUser!.organizationId;\r\n if (!R.isNil(this.props.appState!.appUser!.organizationId)) {\r\n organization = await this.organizationService.GetOrganizationInfo(\r\n this.props.appState!.appUser!.organizationId\r\n );\r\n viewPartnerCases = organization!.viewOwnerEntries;\r\n }\r\n const filterStartDate = viewPartnerCases ? new Date(new Date().setMonth(new Date().getMonth() - 1)) : new Date(new Date().setMonth(new Date().getMonth() - 3));\r\n const filterEndDate = new Date();\r\n\r\n const filters = {\r\n assignedToList: [],\r\n createdByList: [],\r\n caseTypeIds: [],\r\n partnerIds: [],\r\n statusIds: [],\r\n workflowIds: [],\r\n organizationIds: [],\r\n page: this.state.page + 1,\r\n pageSize: this.state.pageSize,\r\n isInternal: this.isInternal(),\r\n text: '',\r\n isNew: false,\r\n dateFilterCode: FilterTypeCodeEnum.DS.toString(),\r\n dateFilterStartDate: filterStartDate ? new Date(filterStartDate.setHours(0, 0, 0, 0)) : null,\r\n datefilterEndDate: filterEndDate ? new Date(filterEndDate.setHours(23, 59, 59, 999)) : null,\r\n vehicleIds: [],\r\n policyTypeIds: [],\r\n vinSearchText: '',\r\n plateNumberSearchText: '',\r\n caseNumberSearchText: '',\r\n countryCode: null,\r\n isAssignedToId: false,\r\n makeSearchText: '',\r\n modelSearchText: '',\r\n organizationOwnerId: viewPartnerCases ? organizationOwnerId : null\r\n } as CaseFilters;\r\n\r\n const refpolicyType = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.PolicyType\r\n );\r\n const [cases, workflows, policyTypes] = await Promise.all([\r\n this.caseService.GetCases(filters),\r\n this.workflowService.GetUserWorkflows(),\r\n this.appReferentialService.Get(refpolicyType!.baseUrl)\r\n ]);\r\n const caseDetailsList = cases;\r\n\r\n const [usersAssignedLIst, users, orgOwners, vehicles] = await Promise.all([\r\n this.appUserService.GetUsersInfo(\r\n Array.from(new Set(cases.cases.map((item) => item.caseStatus.assignedToId)))\r\n ),\r\n this.appUserService.GetUsersInfo(\r\n Array.from(new Set(cases.cases.map((item) => item.caseStatus.userId)))\r\n ),\r\n this.organizationService.GetUserOrganizationsByIds(\r\n Array.from(new Set(cases.cases.map((item) => item.organizationOwnerId)))\r\n ),\r\n this.vehicleService.GetVehicleList(\r\n Array.from(\r\n new Set(cases.cases.filter((c) => !R.isNil(c.vehicleId)).map((item) => item.vehicleId!))\r\n )\r\n )\r\n ]);\r\n\r\n\r\n users.push(...usersAssignedLIst);\r\n this.materializeCaseObject(caseDetailsList.cases, workflows, vehicles, users, orgOwners);\r\n\r\n this.setState(\r\n {\r\n caseList: caseDetailsList.cases,\r\n userWorkflowsList: workflows,\r\n count: cases.total,\r\n page: cases.page - 1,\r\n showCopyCase: organization!.newFeature,\r\n showOrderDetails: organization!.showOrderDetails,\r\n showCaseStatus: organization!.showCaseStatus,\r\n hidePartnerTab: organization!.hidePartnerTab,\r\n showMakeModelSearch: organization!.showMakeModelSearch,\r\n hideLkqColumns: organization!.hideLkqColumns,\r\n casePolicyTypesList: policyTypes,\r\n filterStartDate: filterStartDate,\r\n filterEndDate: filterEndDate,\r\n organizationOwnerId: viewPartnerCases ? organizationOwnerId : null\r\n },\r\n async () => {\r\n await this.reloadFilters();\r\n }\r\n );\r\n }\r\n\r\n isInternal = (): boolean | null => {\r\n if (this.state.selectedTab === 0) {\r\n return null;\r\n }\r\n if (this.state.selectedTab === 1) {\r\n return false;\r\n }\r\n\r\n return true;\r\n };\r\n\r\n loadCases = async (page: number, rowsPerPage: number) => {\r\n this.setState({ isLoadingCases: true });\r\n const filters = {\r\n assignedToList: this.state.selectedAssignedToUser.map((item) => item.id),\r\n createdByList: this.state.selectedCreatedByUser.map((item) => item.id),\r\n caseTypeIds: this.state.selectedCaseType.map((item) => item.id),\r\n partnerIds: this.state.selectedOrgCasePartner.map((item) => item.id),\r\n statusIds: this.state.selectedCaseStatus.map((item) => item.id),\r\n workflowIds: this.state.selectedWorkflows.map((item) => item.workflowId),\r\n organizationIds: this.state.selectedOrgEntities.map((item) => item.id),\r\n policyTypeIds: this.state.selectedPolicyType.map((item) => item.id),\r\n isInternal: this.isInternal(),\r\n page: page + 1,\r\n pageSize: rowsPerPage,\r\n text: '',\r\n isNew: false,\r\n dateFilterCode:\r\n this.state.selectedOrgFilter === null ? FilterTypeCodeEnum.DS.toString() : this.state.selectedOrgFilter!.filterType!.code,\r\n dateFilterStartDate: this.state.filterStartDate\r\n ? new Date(this.state.filterStartDate.setHours(0, 0, 0, 0))\r\n : null,\r\n datefilterEndDate: this.state.filterEndDate\r\n ? new Date(this.state.filterEndDate.setHours(23, 59, 59, 999))\r\n : null,\r\n plateNumberSearchText: this.state.plateNumberSearchText.replace(/\\s+/g, ''),\r\n vinSearchText: this.state.vinSearchText,\r\n caseNumberSearchText: this.state.caseNumberSearchText,\r\n makeSearchText: this.state.makeSearchText,\r\n modelSearchText: this.state.modelSearchText,\r\n organizationOwnerId: this.state.organizationOwnerId\r\n } as CaseFilters;\r\n\r\n const caseList = await this.caseService.GetCases(filters);\r\n const [users, orgOwners, vehicles] = await Promise.all([\r\n this.appUserService.GetUsersInfo(\r\n Array.from(new Set(caseList.cases.map((item) => item.caseStatus.userId)))\r\n ),\r\n this.organizationService.GetUserOrganizationsByIds(\r\n Array.from(new Set(caseList.cases.map((item) => item.organizationOwnerId)))\r\n ),\r\n this.vehicleService.GetVehicleList(\r\n Array.from(\r\n new Set(\r\n caseList.cases.filter((c) => !R.isNil(c.vehicleId)).map((item) => item.vehicleId!)\r\n )\r\n )\r\n )\r\n ]);\r\n\r\n this.materializeCaseObject(\r\n caseList.cases,\r\n this.state.userWorkflowsList,\r\n vehicles,\r\n users,\r\n orgOwners\r\n );\r\n\r\n this.setState({\r\n caseList: caseList.cases,\r\n page: caseList.page - 1,\r\n pageSize: rowsPerPage,\r\n count: caseList.total,\r\n isLoadingCases: false\r\n });\r\n };\r\n\r\n materializeCaseObject = (\r\n cases: Case[],\r\n workflows: Workflow[],\r\n vehicles: Vehicle[],\r\n users: AppUser[],\r\n organizations: Organization[]\r\n ) => {\r\n cases.forEach((cd) => {\r\n const workflow = workflows.find((item) => item.id === cd.caseWorkflow.workflowId);\r\n const userAssignedTo = users.find((item) => item.id === cd.caseStatus.assignedToId);\r\n const user = users.find((item) => item.id === cd.caseStatus.userId);\r\n const organizationOwner = organizations.find((item) => item.id === cd.organizationOwnerId);\r\n const vehicle = vehicles.find((item) => !R.isNil(cd.vehicleId) && item.id === cd.vehicleId);\r\n\r\n cd.caseWorkflow.workflowDisplayName = R.isNil(workflow) ? '' : workflow.displayName;\r\n cd.caseStatus.assignedTo = R.isNil(userAssignedTo) ? null : userAssignedTo;\r\n cd.caseStatus.user = R.isNil(user) ? null : user;\r\n cd.organizationOwner = R.isNil(organizationOwner) ? null : organizationOwner;\r\n cd.vehicle = R.isNil(vehicle) ? null : vehicle;\r\n });\r\n };\r\n\r\n reloadFilters = async () => {\r\n const filters = await this.caseService.GetCaseFilters({\r\n assignedToList: [],\r\n createdByList: [],\r\n caseTypeIds: [],\r\n partnerIds: [],\r\n statusIds: [],\r\n workflowIds: [],\r\n organizationIds: [],\r\n policyTypeIds: [],\r\n vehicleIds: [],\r\n isInternal: this.isInternal(),\r\n page: this.state.page + 1,\r\n pageSize: this.state.pageSize,\r\n text: '',\r\n isNew: false,\r\n dateFilterCode: this.state.selectedOrgFilter === null ? FilterTypeCodeEnum.DS.toString() : this.state.selectedOrgFilter!.filterType!.code,\r\n dateFilterStartDate: this.state.filterStartDate\r\n ? new Date(this.state.filterStartDate.setHours(0, 0, 0, 0))\r\n : null,\r\n datefilterEndDate: this.state.filterEndDate\r\n ? new Date(this.state.filterEndDate.setHours(23, 59, 59, 999))\r\n : null,\r\n plateNumberSearchText: '',\r\n vinSearchText: '',\r\n caseNumberSearchText: '',\r\n isAssignedToId: false,\r\n countryCode: null,\r\n makeSearchText: '',\r\n modelSearchText: '',\r\n organizationOwnerId: this.state.organizationOwnerId\r\n } as CaseFilters);\r\n\r\n const workFlows = this.state.userWorkflowsList.filter(\r\n (item) => filters.workflowIds.indexOf(item.id) !== -1\r\n );\r\n const workflowList = workFlows.map((item) => {\r\n const workflow = {} as IWorkflow;\r\n\r\n workflow.workflowId = item.id;\r\n workflow.workflowDisplayName = item.displayName;\r\n return workflow;\r\n });\r\n\r\n const [orgCasePartnerList, orgEntities, assignedToList, createdByList] = await Promise.all([\r\n this.organizationService.GetUserOrganizationsByIds(filters.partnerIds),\r\n this.organizationService.GetUserOrganizationsByIds(filters.organizationIds),\r\n this.appUserService.GetUsersInfo(filters.assignedToList),\r\n this.appUserService.GetUsersInfo(filters.createdByList)\r\n ]);\r\n\r\n this.setState({\r\n organizationEntities: orgEntities,\r\n workflowsList: workflowList,\r\n organizationCasePartnerList: orgCasePartnerList,\r\n caseStatusList: filters.caseStatuses,\r\n caseTypesList: filters.caseTypes,\r\n assignedToUserList: assignedToList,\r\n createdByUserList: createdByList,\r\n isLoading: false\r\n });\r\n };\r\n\r\n onClick = (id: number) => {\r\n this.props.history.push('/cases/' + id);\r\n };\r\n\r\n onOrderRowClick = async (e: any, id: number) => {\r\n const order = this.state.orderList.find((item) => item.id === id);\r\n order!.caseVehicle = this.state.selectedCase!.caseVehicle;\r\n this.setState({\r\n isOrderDialogOpen: true,\r\n selectedOrder: order!\r\n });\r\n };\r\n\r\n getOrderColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n label: 'ID',\r\n options: {\r\n filter: false,\r\n customBodyRender: (value: string, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.onOrderRowClick(e, tableMeta.rowData[0])}\r\n >\r\n {value}\r\n \r\n );\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'supplier.name',\r\n label: this.translatorService.Tranlate('ORDER_PART_DETAILS_SUPPLIER_LABEL', 'Furnizor'),\r\n options: { filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'amount',\r\n label: this.translatorService.Tranlate('ORDERS_VALUE_LABEL', 'Valoare'),\r\n options: {\r\n filter: false,\r\n customBodyRender: (value: number, tableMeta: MUIDataTableMeta) => {\r\n return value ? value.toFixed(2) : '';\r\n }\r\n }\r\n },\r\n {\r\n name: 'currencyCode',\r\n label: this.translatorService.Tranlate('ORDERS_CURRENCY_LABEL', 'Moneda'),\r\n options: {\r\n filter: false\r\n }\r\n },\r\n {\r\n name: 'createdByUser.userName',\r\n label: this.translatorService.Tranlate('ORDERS_MADE_BY_LABEL', 'Efectuat De'),\r\n options: {\r\n filter: false,\r\n sort: true\r\n }\r\n },\r\n {\r\n name: 'orderStatus.displayName',\r\n label: this.translatorService.Tranlate('ORDERS_STATUS_LABEL', 'Stare'),\r\n options: {\r\n filter: false,\r\n sort: false\r\n }\r\n },\r\n {\r\n name: 'supplierOrderNumber',\r\n label: this.translatorService.Tranlate('ORDERS_ID_FURNIZOR_LABEL', 'ID Furnizor'),\r\n options: {\r\n filter: false,\r\n customBodyRender: (value: string, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n {\r\n this.onSupplierOrderNumberRowClick(e, tableMeta.rowData[1]);\r\n }}\r\n >\r\n {value}\r\n \r\n );\r\n }\r\n } as MUIDataTableColumnOptions\r\n }\r\n ];\r\n\r\n return columns;\r\n };\r\n\r\n\r\n onSupplierOrderNumberRowClick = async (e: any, supplierName: string) => {\r\n if (supplierName == SupplierCode.AUGSBURG) {\r\n window.open('https://www.aicat.ro/csp/berta/portal/index.csp', '_blank');\r\n }\r\n };\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n label: this.translatorService.Tranlate('CASES_CASE_ID', 'ID'),\r\n options: {\r\n sort: false,\r\n setCellProps: () => ({ style: { cursor: 'pointer' } }),\r\n customBodyRender: (value: any, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n \r\n this.onClick(value)}\r\n >\r\n
{value}
\r\n
\r\n \r\n
{tableMeta.rowData[2]}
\r\n
\r\n \r\n
{tableMeta.rowData[3]}
\r\n
\r\n \r\n );\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'caseEvent.caseNumber',\r\n label: this.translatorService.Tranlate('CASES_CASE_NUMBER', 'Numar Dosar'),\r\n options: {\r\n sort: false,\r\n setCellProps: () => ({ style: { cursor: 'pointer' } })\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'caseType.displayName',\r\n options: {\r\n display: 'excluded',\r\n filter: false\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'organizationOwner.name',\r\n options: {\r\n display: 'excluded',\r\n filter: false\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'caseWorkflow.workflowDisplayName',\r\n label: this.translatorService.Tranlate('CASES_WORKFLOW_HEADER', 'Date Flux'),\r\n options: {\r\n sort: false,\r\n setCellProps: () => ({ style: { cursor: 'pointer' } }),\r\n customBodyRender: (value: any, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n \r\n \r\n
{value}
\r\n
\r\n \r\n
{tableMeta.rowData[5]}
\r\n
\r\n \r\n
\r\n {moment\r\n .utc(tableMeta.rowData[6])\r\n .local()\r\n .format(this.props.appState.longDateFormat)}\r\n
\r\n
\r\n
\r\n );\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'createdByUser.userName',\r\n options: {\r\n display: 'excluded',\r\n filter: false\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'dateCreation',\r\n options: {\r\n display: 'excluded',\r\n filter: false\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'caseVehicle.model',\r\n label: this.translatorService.Tranlate('CASES_VEHICLE_HEADER', 'Masina'),\r\n options: {\r\n sort: false,\r\n setCellProps: () => ({ style: { cursor: 'pointer' } }),\r\n customBodyRender: (value: any, tableMeta: MUIDataTableMeta) => {\r\n const casee = this.state.caseList.find((item) => item.id === tableMeta.rowData[0]);\r\n if (R.isNil(casee)) {\r\n return;\r\n }\r\n\r\n return (\r\n \r\n \r\n
{VehicleHelper.GetBrand(casee, casee.vehicle)}
\r\n
\r\n \r\n
{VehicleHelper.GetModel(casee, casee.vehicle)}
\r\n
\r\n \r\n
\r\n {VehicleHelper.GetPlateNumber(casee, casee.vehicle)}\r\n
\r\n
\r\n
\r\n );\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'caseVehicle.modelId',\r\n options: {\r\n display: 'excluded',\r\n filter: false\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'caseVehicle.plateNumber',\r\n options: {\r\n display: 'excluded',\r\n filter: false\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'caseStatus.user.userName',\r\n label: this.translatorService.Tranlate('CASES_MODIFIED_BY_HEADER', 'Modificat De'),\r\n options: {\r\n sort: false,\r\n setCellProps: () => ({ style: { cursor: 'pointer' } }),\r\n customBodyRender: (value: any, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n \r\n \r\n
{value}
\r\n
\r\n \r\n
\r\n {moment\r\n .utc(tableMeta.rowData[11])\r\n .local()\r\n .format(this.props.appState.longDateFormat)}\r\n
\r\n
\r\n
\r\n );\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'caseStatus.date',\r\n options: {\r\n display: 'excluded',\r\n filter: false\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'caseStatus.assignedTo.userName',\r\n label: this.translatorService.Tranlate('CASES_ASSIGNED_TO_HEADER', 'Asignat La'),\r\n options: {\r\n sort: false,\r\n setCellProps: () => ({ style: { cursor: 'pointer' } }),\r\n customBodyRender: (value: any, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n \r\n \r\n
{value}
\r\n
\r\n {!this.state.showCaseStatus && (\r\n \r\n
{tableMeta.rowData[13]}
\r\n
\r\n )}\r\n
\r\n );\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'caseStatus.caseStatus.displayName',\r\n options: {\r\n display: 'excluded',\r\n filter: false\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'caseStatus.caseStatus.code',\r\n options: {\r\n display: 'excluded',\r\n filter: false\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'caseStatus.caseStatus.displayName',\r\n label: this.translatorService.Tranlate('CASES_STATUS_HEADER', 'Status'),\r\n options: {\r\n display: this.state.showCaseStatus ? 'true' : 'false',\r\n filter: false\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: '',\r\n options: {\r\n setCellHeaderProps: () => ({\r\n align: 'center',\r\n style: { padding: '0px' }\r\n }),\r\n setCellProps: () => ({\r\n align: 'center',\r\n style: { padding: '0px' }\r\n }),\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return tableMeta.rowData[14] === CaseStatusTypeCode.DRAFT ? (\r\n await this.onDelete(tableMeta.rowData[0])}\r\n >\r\n \r\n \r\n ) : null;\r\n }\r\n }\r\n },\r\n {\r\n name: '',\r\n options: {\r\n setCellHeaderProps: () => ({\r\n align: 'center',\r\n style: { padding: '0px' }\r\n }),\r\n setCellProps: () => ({\r\n align: 'center',\r\n style: { padding: '0px' }\r\n }),\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return this.state.showCopyCase ? (\r\n \r\n {\r\n const currentCase = _.find([...this.state.caseList], function (object) {\r\n return object.id == tableMeta.rowData[0];\r\n });\r\n if (currentCase) {\r\n await this.onCopyCase(currentCase);\r\n }\r\n }}\r\n >\r\n \r\n \r\n \r\n ) : (\r\n ''\r\n );\r\n }\r\n }\r\n }\r\n ];\r\n if (this.state.showOrderDetails) {\r\n columns.push({\r\n name: '',\r\n label: this.translatorService.Tranlate('ORDERS_DIALOG_TITLE', 'Detalii comanda'),\r\n options: {\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n
\r\n {\r\n const currentCase = _.find([...this.state.caseList], function (object) {\r\n return object.id == tableMeta.rowData[0];\r\n });\r\n if (currentCase) {\r\n await this.loadPieces(tableMeta.rowData[0], currentCase);\r\n }\r\n }}\r\n >\r\n {this.translatorService.Tranlate('PIECES_LABEL', 'Piese')}\r\n \r\n
\r\n ) ;\r\n }\r\n }\r\n });\r\n }\r\n\r\n return columns;\r\n };\r\n\r\n onCopyCase = async (currentCase: Case) => {\r\n try {\r\n this.setState({ isLoading: true });\r\n const newCase = await this.caseService.CopyCase(\r\n currentCase.id,\r\n currentCase.caseWorkflow.workflowId,\r\n null,\r\n null,\r\n null\r\n );\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n this.props.history.push('/cases/' + newCase!.id, 'Case' + newCase!.id);\r\n } catch (err: any) {\r\n this.setState({ isLoading: false });\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(err.response.data, 'Eroare copiere dosar!'),\r\n { variant: 'error' }\r\n );\r\n }\r\n };\r\n\r\n onDelete = async (id: number) => {\r\n try {\r\n await this.caseService.RemoveCase(id);\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n\r\n const caseList = [...this.state.caseList];\r\n\r\n const index = caseList.findIndex((item) => item.id === id);\r\n caseList.splice(index, 1);\r\n this.setState({ caseList: caseList });\r\n } catch (err) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n loadPieces = async (id: number, selectedCase: Case) => {\r\n try {\r\n this.setState({\r\n isLoadingDialog: true,\r\n isDialogOpen: true,\r\n selectedCase: selectedCase\r\n });\r\n this.props.caseSettingsState.caseSettings = {\r\n workflow: { \r\n id: selectedCase.caseWorkflow.workflowId\r\n }\r\n } as CaseSettings;\r\n const orderList = await this.orderService.GetOrdersWithParts(id);\r\n const [users, clients, suppliersInit] = await Promise.all([\r\n this.appUserService.GetUsersInfo(\r\n Array.from(new Set(orderList.map((item) => item.createdBy)))\r\n ),\r\n this.organizationService.GetUserOrganizationsByIds(\r\n Array.from(new Set(orderList.map((item) => item.clientId)))\r\n ),\r\n this.organizationService.GetUserOrganizationsByIds(\r\n Array.from(new Set(orderList.map((item) => item.supplierId)))\r\n ),\r\n ]);\r\n\r\n orderList.forEach((p) => {\r\n const supplier = suppliersInit.find((item) => item.id === p.supplierId);\r\n const user = users.find((item) => item.id === p.createdBy);\r\n const client = clients.find((item) => item.id === p.clientId);\r\n \r\n p.createdByUser = user === undefined ? null : user;\r\n p.supplier = supplier === undefined ? null : supplier;\r\n p.client = client === undefined ? null : client;\r\n });\r\n\r\n console.log('caseSettings', this.props.caseSettingsState.caseSettings);\r\n console.log('orderList', orderList);\r\n\r\n this.setState({ orderList: orderList, isDialogOpen: true, isLoadingDialog: false });\r\n } catch (err) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n closeDialog = async () => {\r\n this.setState({\r\n isDialogOpen: false,\r\n orderList: []\r\n });\r\n };\r\n\r\n closeOrderDialog = async () => {\r\n this.setState({\r\n isOrderDialogOpen: false,\r\n // workflowSuppliers: suppliers,\r\n //isLoading: true\r\n });\r\n\r\n // await this.loadData();\r\n };\r\n\r\n \r\n public orderChange = (order: Order) => {\r\n this.setState({\r\n orderList: this.state.orderList.map((el: Order) =>\r\n el.id !== order.id\r\n ? el\r\n : {\r\n ...el,\r\n amount: order.amount,\r\n amountTVA: order.amountTVA,\r\n amountWithoutTVA: order.amountWithoutTVA,\r\n orderParts: [...order.orderParts!],\r\n orderStatus: order.orderStatus,\r\n orderStatusId: order.orderStatusId\r\n }\r\n )\r\n });\r\n };\r\n\r\n onTabChange = (event: any, newValue: number) => {\r\n this.setState(\r\n {\r\n selectedTab: newValue,\r\n page: 0\r\n },\r\n async () => await this.loadCases(0, this.state.pageSize)\r\n );\r\n };\r\n handleOrgEntitiesChange = (newValue: any[]) => {\r\n this.setState(\r\n {\r\n selectedOrgEntities: newValue\r\n },\r\n async () => await this.loadCases(this.state.page, this.state.pageSize)\r\n );\r\n };\r\n\r\n handleWorkflowsChange = (newValue: any[]) => {\r\n this.setState(\r\n {\r\n selectedWorkflows: newValue\r\n },\r\n async () => await this.loadCases(this.state.page, this.state.pageSize)\r\n );\r\n };\r\n\r\n handleOrgCasePartnersChange = (newValue: any[]) => {\r\n this.setState(\r\n {\r\n selectedOrgCasePartner: newValue\r\n },\r\n async () => await this.loadCases(this.state.page, this.state.pageSize)\r\n );\r\n };\r\n handleOrFilterChange = (newValue: OrganizationFilterType | null) => {\r\n this.setState(\r\n {\r\n selectedOrgFilter: newValue\r\n },\r\n async () => await this.loadCases(this.state.page, this.state.pageSize)\r\n );\r\n };\r\n handleCaseStatusChange = (newValue: any[]) => {\r\n this.setState(\r\n {\r\n selectedCaseStatus: newValue\r\n },\r\n async () => await this.loadCases(this.state.page, this.state.pageSize)\r\n );\r\n };\r\n\r\n handlePolicyTypeChange = (newValue: any[]) => {\r\n this.setState(\r\n {\r\n selectedPolicyType: newValue\r\n },\r\n async () => await this.loadCases(this.state.page, this.state.pageSize)\r\n );\r\n };\r\n\r\n handleCaseTypeChange = (newValue: any[]) => {\r\n this.setState(\r\n {\r\n selectedCaseType: newValue\r\n },\r\n async () => await this.loadCases(this.state.page, this.state.pageSize)\r\n );\r\n };\r\n handleAssignedToChange = (newValue: any[]) => {\r\n this.setState(\r\n {\r\n selectedAssignedToUser: newValue\r\n },\r\n async () => await this.loadCases(this.state.page, this.state.pageSize)\r\n );\r\n };\r\n\r\n handleCreatedByChange = (newValue: any[]) => {\r\n this.setState(\r\n {\r\n selectedCreatedByUser: newValue\r\n },\r\n async () => await this.loadCases(this.state.page, this.state.pageSize)\r\n );\r\n };\r\n\r\n\r\n handleVinChange = (newValue: string) => {\r\n this.setState({\r\n vinSearchText: newValue\r\n });\r\n };\r\n\r\n handlePlateNumberChange = (newValue: string) => {\r\n this.setState({\r\n plateNumberSearchText: newValue\r\n });\r\n };\r\n\r\n handleCaseNumberChange = (newValue: string) => {\r\n this.setState({\r\n caseNumberSearchText: newValue\r\n });\r\n };\r\n\r\n handleMakeChange = (newValue: string) => {\r\n this.setState({\r\n makeSearchText: newValue\r\n });\r\n };\r\n \r\n handleModelChange = (newValue: string) => {\r\n this.setState({\r\n modelSearchText: newValue\r\n });\r\n };\r\n\r\n handlefilterStartDateChange = async (date: MaterialUiPickersDate | null) => {\r\n if (date === null || !date.isValid) {\r\n return;\r\n }\r\n this.setState(\r\n {\r\n filterStartDate: date === null || !date.isValid ? null : date!.toDate()\r\n },\r\n async () => await this.reloadCases(this.state.page, this.state.pageSize)\r\n );\r\n };\r\n\r\n handlefilterEndDateChange = async (date: MaterialUiPickersDate | null) => {\r\n if (date === null || !date.isValid) {\r\n return;\r\n }\r\n this.setState(\r\n {\r\n filterEndDate: date === null || !date.isValid ? null : date!.toDate()\r\n },\r\n async () => await this.reloadCases(this.state.page, this.state.pageSize)\r\n );\r\n };\r\n\r\n reloadCases = async (page: number, rowsPerPage: number) => {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('CASE_FILTERS_LOADING', 'Filtrarea este in curs!'), \r\n {\r\n variant: 'info',\r\n autoHideDuration: 5000\r\n }\r\n );\r\n \r\n this.setState({ isLoadingCases: true });\r\n \r\n const caseList = await this.caseService.GetCases({\r\n assignedToList: this.state.selectedAssignedToUser.map((item) => item.id),\r\n createdByList: this.state.selectedCreatedByUser.map((item) => item.id),\r\n caseTypeIds: this.state.selectedCaseType.map((item) => item.id),\r\n partnerIds: this.state.selectedOrgCasePartner.map((item) => item.id),\r\n statusIds: this.state.selectedCaseStatus.map((item) => item.id),\r\n workflowIds: this.state.selectedWorkflows.map((item) => item.workflowId),\r\n organizationIds: this.state.selectedOrgEntities.map((item) => item.id),\r\n policyTypeIds: this.state.selectedPolicyType.map((item) => item.id),\r\n isInternal: this.isInternal(),\r\n page: page + 1,\r\n pageSize: rowsPerPage,\r\n text: '',\r\n isNew: false,\r\n dateFilterCode: this.state.selectedOrgFilter === null \r\n ? FilterTypeCodeEnum.DS.toString() \r\n : this.state.selectedOrgFilter!.filterType!.code,\r\n dateFilterStartDate: this.state.filterStartDate \r\n ? new Date(this.state.filterStartDate.setHours(0, 0, 0, 0)) \r\n : null,\r\n datefilterEndDate: this.state.filterEndDate \r\n ? new Date(this.state.filterEndDate.setHours(23, 59, 59, 999)) \r\n : null,\r\n plateNumberSearchText: this.state.plateNumberSearchText.replace(/\\s+/g, ''),\r\n vinSearchText: this.state.vinSearchText,\r\n caseNumberSearchText: this.state.caseNumberSearchText,\r\n makeSearchText: this.state.makeSearchText,\r\n modelSearchText: this.state.modelSearchText,\r\n organizationOwnerId: this.state.organizationOwnerId\r\n } as CaseFilters);\r\n \r\n const [users, orgOwners, vehicles] = await Promise.all([\r\n this.appUserService.GetUsersInfo(\r\n Array.from(new Set(caseList.cases.map((item) => item.caseStatus.userId)))\r\n ),\r\n this.organizationService.GetUserOrganizationsByIds(\r\n Array.from(new Set(caseList.cases.map((item) => item.organizationOwnerId)))\r\n ),\r\n this.vehicleService.GetVehicleList(\r\n Array.from(\r\n new Set(\r\n caseList.cases.filter((c) => !R.isNil(c.vehicleId)).map((item) => item.vehicleId!)\r\n )\r\n )\r\n )\r\n ]);\r\n \r\n this.materializeCaseObject(\r\n caseList.cases,\r\n this.state.userWorkflowsList,\r\n vehicles,\r\n users,\r\n orgOwners\r\n );\r\n \r\n this.setState({\r\n caseList: caseList.cases,\r\n page: caseList.page - 1,\r\n pageSize: rowsPerPage,\r\n count: caseList.total\r\n },\r\n async () => {\r\n await this.reloadFilters();\r\n this.setState({ isLoadingCases: false });\r\n });\r\n }; \r\n\r\n renderFilters = () => {\r\n return (\r\n
\r\n \r\n \r\n this.handleOrgEntitiesChange(newValue)}\r\n getOptionLabel={(option: Organization) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n {!this.state.hideLkqColumns && (\r\n this.handleWorkflowsChange(newValue)}\r\n getOptionLabel={(option: IWorkflow) => option.workflowDisplayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n )}\r\n {!this.state.hideLkqColumns && (\r\n \r\n this.handleOrgCasePartnersChange(newValue)\r\n }\r\n getOptionLabel={(option: Organization) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n )}\r\n\r\n this.handleOrFilterChange(newValue)}\r\n getOptionLabel={(option: OrganizationFilterType) =>\r\n option.filterType!.displayName || ''\r\n }\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n this.handleCreatedByChange(newValue)}\r\n getOptionLabel={(option: AppUser) => option.userName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n
\r\n this.handleVinChange(e.target.value)}\r\n onBlur={(e: any) => this.loadCases(this.state.page, this.state.pageSize)}\r\n />\r\n
\r\n\r\n
\r\n this.handleCaseNumberChange(e.target.value)}\r\n onBlur={(e: any) => this.loadCases(this.state.page, this.state.pageSize)}\r\n />\r\n
\r\n {this.state.showMakeModelSearch && (\r\n
\r\n this.handleMakeChange(e.target.value)}\r\n onBlur={(e: any) => this.loadCases(this.state.page, this.state.pageSize)}\r\n />\r\n
\r\n )}\r\n
\r\n \r\n this.handleCaseStatusChange(newValue)}\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n this.handleCaseTypeChange(newValue)}\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n this.handleAssignedToChange(newValue)}\r\n getOptionLabel={(option: AppUser) => option.userName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n {!this.state.hideLkqColumns && (\r\n this.handlePolicyTypeChange(newValue)}\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n )}\r\n
\r\n this.handlePlateNumberChange(e.target.value)}\r\n onBlur={(e: any) => this.loadCases(this.state.page, this.state.pageSize)}\r\n />\r\n
\r\n {this.state.showMakeModelSearch && (\r\n
\r\n this.handleModelChange(e.target.value)}\r\n onBlur={(e: any) => this.loadCases(this.state.page, this.state.pageSize)}\r\n />\r\n
\r\n )}\r\n
\r\n
\r\n
\r\n );\r\n };\r\n\r\n onCellClick = (\r\n colData: any,\r\n cellMeta: { colIndex: number; rowIndex: number; dataIndex: number }\r\n ) => {\r\n if (cellMeta.colIndex === 15 || cellMeta.colIndex == 16 || cellMeta.colIndex == 17 || cellMeta.colIndex == 18) {\r\n return;\r\n }\r\n\r\n this.onClick(this.state.caseList[cellMeta.dataIndex].id);\r\n };\r\n\r\n public render() {\r\n this.workflowService = (this.context as AppContext).workflowService;\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n this.appUserService = (this.context as AppContext).appUserService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.vehicleService = (this.context as AppContext).vehicleService;\r\n this.orderService = (this.context as AppContext).orderService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n const options = {\r\n filter: false,\r\n search: false,\r\n viewColumns: false,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n elevation: 0,\r\n serverSide: true,\r\n count: this.state.count,\r\n rowsPerPage: this.state.pageSize,\r\n page: this.state.page,\r\n onCellClick: this.onCellClick,\r\n onTableChange: async (action: any, tableState: any) => {\r\n switch (action) {\r\n case 'changePage':\r\n await this.loadCases(tableState.page, tableState.rowsPerPage);\r\n break;\r\n case 'changeRowsPerPage':\r\n await this.loadCases(tableState.page, tableState.rowsPerPage);\r\n break;\r\n case 'sort':\r\n // this.sort(tableState.page, tableState.sortOrder);\r\n break;\r\n default:\r\n //console.log('action not handled.');\r\n }\r\n }\r\n };\r\n\r\n const orderOptions = {\r\n filter: false,\r\n sort: false,\r\n search: false,\r\n pagination: false,\r\n viewColumns: false,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n elevation: 0,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService)\r\n };\r\n\r\n if (this.state.isLoading) {\r\n return ;\r\n }\r\n\r\n return (\r\n \r\n \r\n {this.state.hidePartnerTab ? ( \r\n <>\r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n \r\n
\r\n {this.renderFilters()}\r\n
\r\n \r\n
\r\n {this.state.isLoadingCases ? (\r\n \r\n ) : (\r\n \r\n )}\r\n
\r\n
\r\n {this.state.isDialogOpen && (\r\n \r\n \r\n \r\n \r\n \r\n {this.translatorService.Tranlate('ORDERS_LIST_TITLE', 'Lista comenzi')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoadingDialog && (\r\n \r\n )}\r\n
\r\n \r\n )}\r\n\r\n {this.state.isOrderDialogOpen && (\r\n \r\n \r\n \r\n {this.translatorService.Tranlate('ORDERS_DIALOG_TITLE', 'Detalii comanda')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.state.selectedOrder !== null && (\r\n {console.log('automatePlaceOrderChange')}}\r\n />\r\n )}\r\n \r\n \r\n )}\r\n
\r\n \r\n ) : (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n \r\n
\r\n {this.renderFilters()}\r\n
\r\n \r\n
\r\n {this.state.isLoadingCases ? (\r\n \r\n ) : (\r\n \r\n )}\r\n
\r\n
\r\n \r\n
\r\n {this.renderFilters()}\r\n
\r\n \r\n
\r\n {this.state.isLoadingCases ? (\r\n \r\n ) : (\r\n \r\n )}\r\n
\r\n
\r\n \r\n
\r\n {this.renderFilters()}\r\n
\r\n \r\n
\r\n {this.state.isLoadingCases ? (\r\n \r\n ) : (\r\n \r\n )}\r\n
\r\n
\r\n\r\n {this.state.isDialogOpen && (\r\n \r\n \r\n \r\n \r\n \r\n {this.translatorService.Tranlate('ORDERS_LIST_TITLE', 'Lista comenzi')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoadingDialog && (\r\n \r\n )}\r\n
\r\n \r\n )}\r\n\r\n {this.state.isOrderDialogOpen && (\r\n \r\n \r\n \r\n {this.translatorService.Tranlate('ORDERS_DIALOG_TITLE', 'Detalii comanda')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.state.selectedOrder !== null && (\r\n {console.log('automatePlaceOrderChange')}}\r\n />\r\n )}\r\n \r\n \r\n )}\r\n
\r\n \r\n )}\r\n \r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app,\r\n caseSettingsState: state.caseSettings\r\n }),\r\n null\r\n)(withSnackbar(Cases as any));\r\n","import React, { Fragment } from 'react';\r\nimport {\r\n AppUserAdminActionCreators,\r\n ApplicationState,\r\n AppActionCreators,\r\n CaseSettingsState\r\n} from '../../store';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport { Card, Grid } from '@material-ui/core';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../context/Contexts';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { IReferentialService } from '../../services/Interfaces/IReferentialService';\r\nimport { ReferentialCode } from '../../helpers/Constants';\r\nimport Referentials from '../../helpers/Referentials.json';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport { CaseTariffValueHistory } from '../../interfaces/Case';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport { ScaleLoader } from 'react-spinners';\r\n\r\ninterface ITariffPropertiesState {\r\n caseTariffValues: CaseTariffValueHistory[];\r\n tariffTypeGroupList: IReferential[];\r\n isLoading: boolean;\r\n}\r\n\r\nexport interface ExternalEditTariffProps {\r\n caseTariffHistoryId: number;\r\n}\r\n\r\ntype TariffPropertiesProps = { caseSettingsState: CaseSettingsState } & ProviderContext &\r\n ExternalEditTariffProps &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass TariffProperties extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private appReferentialService!: IReferentialService;\r\n private caseService!: ICaseService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n defaultBrand = {\r\n name: 'All', //this.translatorService.Tranlate(\"SELECT_ALL_OPTION\", \"Toate\"),\r\n displayName: 'All', //this.translatorService.Tranlate(\"SELECT_ALL_OPTION\", \"Toate\"),\r\n id: -1,\r\n isActive: true\r\n } as IReferential;\r\n\r\n state = {\r\n caseTariffValues: [],\r\n tariffTypeGroupList: [],\r\n isLoading: false\r\n } as ITariffPropertiesState;\r\n\r\n public componentDidMount() {\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadData();\r\n }\r\n );\r\n }\r\n\r\n compareName = (a: IReferential, b: IReferential) => {\r\n const nameA = a === null ? '' : a.displayName!.toUpperCase();\r\n const nameB = b === null ? '' : b.displayName!.toUpperCase();\r\n if (nameA < nameB) {\r\n return -1;\r\n }\r\n if (nameA > nameB) {\r\n return 1;\r\n }\r\n\r\n return 0;\r\n };\r\n\r\n loadData = async () => {\r\n try {\r\n if (this.props.caseTariffHistoryId === 0) {\r\n return;\r\n }\r\n this.defaultBrand.name = this.translatorService.Tranlate('SELECT_ALL_OPTION', 'Toate');\r\n this.defaultBrand.displayName = this.translatorService.Tranlate('SELECT_ALL_OPTION', 'Toate');\r\n\r\n const tariffGroupTypeRef = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.TariffTypeGroup\r\n );\r\n\r\n const tariffGroupTypeList = await this.appReferentialService.Get(tariffGroupTypeRef!.baseUrl);\r\n\r\n this.setState({\r\n caseTariffValues: this.props.caseSettingsState.case!.caseTariff.caseTariffValuesHistory,\r\n isLoading: false,\r\n tariffTypeGroupList: tariffGroupTypeList.filter((item) => item.isActive === true)\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n renderTariffGroupTypes = () => {\r\n const tariffGroupTypes = [] as any[];\r\n for (const tariffGroupType of this.state.tariffTypeGroupList) {\r\n tariffGroupTypes.push(\r\n
\r\n
\r\n

\r\n {tariffGroupType.displayName}\r\n

\r\n \r\n {this.renderCaseTariffValues(tariffGroupType.id)}\r\n \r\n
\r\n );\r\n }\r\n return tariffGroupTypes;\r\n };\r\n\r\n renderCaseTariffValues = (tariffGroupTypeId: number) => {\r\n const caseTariffValuess = [] as any[];\r\n const caseTariffValues = this.state.caseTariffValues.filter(\r\n (item) => item.tariffType!.tariffTypeGroupId === tariffGroupTypeId\r\n );\r\n this.getDistinctTariffTypes(caseTariffValues).map((tt) => {\r\n const tariffValues = caseTariffValues.filter((item) => item.tariffTypeId === tt!.id);\r\n\r\n caseTariffValuess.push(\r\n \r\n
{tt!.displayName}
\r\n {this.renderTariffValues(tariffValues)}\r\n
\r\n );\r\n });\r\n return caseTariffValuess;\r\n };\r\n\r\n getDistinctTariffTypes = (tariffValues: CaseTariffValueHistory[]) => {\r\n return tariffValues\r\n .map((item) => item.tariffType)\r\n .filter((tt, index, arr) => arr.findIndex((i) => i!.id === tt!.id) == index);\r\n };\r\n\r\n renderTariffValues = (list: CaseTariffValueHistory[]) => {\r\n list = list.sort((a: CaseTariffValueHistory, b: CaseTariffValueHistory) => {\r\n return this.compareName(a.brand!, b.brand!);\r\n });\r\n return list.map((item) => (\r\n

\r\n {(item.brand === null ? this.defaultBrand.displayName : item.brand.displayName) +\r\n ' ' +\r\n this.renderVehicleAge(item) +\r\n ' - ' +\r\n item.value +\r\n ' (' +\r\n item.offerValue +\r\n ')'}\r\n

\r\n ));\r\n };\r\n\r\n renderVehicleAge = (tv: CaseTariffValueHistory) => {\r\n if (tv.startVehicleYear === null && tv.endVehicleYear === null) {\r\n return '';\r\n }\r\n const start = tv.startVehicleYear === null ? '0' : tv.startVehicleYear;\r\n const end = tv.endVehicleYear === null ? '' : tv.endVehicleYear;\r\n\r\n return '(' + start + '<' + end + ')';\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n\r\n return (\r\n \r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n
{this.renderTariffGroupTypes()}
\r\n ) : null}\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (stateProps: any, dispatchProps: any, ownProps: ExternalEditTariffProps) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\nexport default connect(\r\n (state: ApplicationState) => {\r\n return { caseSettingsState: state.caseSettings };\r\n },\r\n { ...AppUserAdminActionCreators, ...AppActionCreators },\r\n mergeProps\r\n)(withSnackbar(TariffProperties as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, CaseSettingsState, AppState } from '../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport {\r\n Grid,\r\n Typography,\r\n Dialog,\r\n DialogTitle,\r\n IconButton,\r\n DialogContent\r\n} from '@material-ui/core';\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { Card } from 'reactstrap';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { isNullOrUndefined } from 'util';\r\nimport { Case, CaseParameterHistory, CasePartnerHistory } from '../../interfaces/Case';\r\nimport moment from 'moment';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport TariffProperties from './TariffProperties';\r\n\r\ninterface ICaseDetailsCaseTabSummaryFormState {\r\n case: Case;\r\n isLoading: boolean;\r\n isOpenDialog: boolean;\r\n}\r\n\r\ntype ICaseDetailsCaseTabSummaryFormProps = {\r\n caseSettingsState: CaseSettingsState;\r\n appState: AppState;\r\n} & ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass CaseDetailsCaseTabSummaryForm extends React.PureComponent<\r\n ICaseDetailsCaseTabSummaryFormProps,\r\n ICaseDetailsCaseTabSummaryFormState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n\r\n static contextType = ApplicationContext;\r\n state = {\r\n case: {},\r\n isLoading: true,\r\n isOpenDialog: false\r\n } as ICaseDetailsCaseTabSummaryFormState;\r\n\r\n public componentDidMount() {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n\r\n if (isNullOrUndefined(caseSettings) || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadCaseSettingsSummaryForm();\r\n }\r\n );\r\n }\r\n\r\n loadCaseSettingsSummaryForm = async () => {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n\r\n if (isNullOrUndefined(caseSettings) || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n\r\n const casee = this.props.caseSettingsState.case;\r\n if (casee === null) {\r\n return;\r\n }\r\n\r\n this.setState({\r\n case: casee,\r\n isLoading: false\r\n });\r\n };\r\n\r\n renderCaseDetails = () => {\r\n const casee = this.props.caseSettingsState.case;\r\n if (isNullOrUndefined(casee)) {\r\n return;\r\n }\r\n\r\n return Object.keys(casee).length === 0 ||\r\n Object.keys(casee.caseStatus).length === 0 ||\r\n isNullOrUndefined(this.props.caseSettingsState.caseSettings) ? null : (\r\n \r\n
\r\n \r\n \r\n
\r\n
{casee.caseType!.displayName}
\r\n
{casee.caseNumber}
\r\n
\r\n {casee.caseStatus.caseStatus!.displayName}\r\n
\r\n
\r\n {moment\r\n .utc(casee.caseStatus.date)\r\n .local()\r\n .format(this.props.appState.longDateFormat)}\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n {this.translatorService.Tranlate(\r\n 'CASE_DETAILS_WORKFLOW_OWNER',\r\n 'Proprietar flux'\r\n )}\r\n
\r\n
\r\n {this.props.caseSettingsState.caseSettings!.workflow.organizationOwner!.name}\r\n
\r\n {/*
Bucuresti
\r\n
Sector 1, Agentia Piata Victoriei
*/}\r\n
\r\n
\r\n \r\n
\r\n
\r\n {this.translatorService.Tranlate('CASE_DETAILS_CREATED_BY', 'Dosar creat de')}\r\n
\r\n
\r\n {this.state.case.createdByUser!.organization!.name}\r\n
\r\n
\r\n {this.state.case.createdByUser!.userName}\r\n
\r\n
\r\n {moment\r\n .utc(casee.dateCreation)\r\n .local()\r\n .format(this.props.appState.longDateFormat)}\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n {this.translatorService.Tranlate('CASE_DETAILS_ASSIGNED', 'Asignat')}\r\n
\r\n
\r\n {casee.caseStatus.assignedTo!.organization!.name}\r\n
\r\n
\r\n {this.state.case.caseStatus.assignedTo!.userName}\r\n
\r\n
\r\n {moment\r\n .utc(casee.caseStatus.date)\r\n .local()\r\n .format(this.props.appState.longDateFormat)}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n };\r\n\r\n renderPartners = () => {\r\n const partners = [] as any[];\r\n if (this.props.caseSettingsState.case !== null) {\r\n this.props.caseSettingsState.case.casePartners.forEach(\r\n (item: CasePartnerHistory, index: number) => {\r\n partners.push(\r\n
\r\n
\r\n
\r\n
\r\n {item.organization!.organizationType!.displayName}\r\n
\r\n
{item.organization!.name}
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n );\r\n }\r\n\r\n return partners;\r\n };\r\n\r\n renderParameters = () => {\r\n const parameters = [] as any[];\r\n if (this.props.caseSettingsState.case !== null) {\r\n this.props.caseSettingsState.case.caseParameters.forEach(\r\n (item: CaseParameterHistory, index: number) => {\r\n parameters.push(\r\n
\r\n
\r\n
\r\n
{item.parameter!.displayName}
\r\n
{item.value}
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n );\r\n }\r\n return parameters;\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n\r\n if (this.props.caseSettingsState === null || this.props.caseSettingsState.case === null) {\r\n return '';\r\n }\r\n\r\n const casee = this.props.caseSettingsState.case;\r\n if (isNullOrUndefined(casee)) {\r\n return;\r\n }\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n
\r\n
\r\n \r\n {this.props.caseSettingsState.caseSettings!.workflow.displayName}\r\n \r\n \r\n {'>> '}\r\n \r\n {\r\n this.setState({ isOpenDialog: true });\r\n }}\r\n >\r\n {!isNullOrUndefined(casee.caseTariff) &&\r\n !isNullOrUndefined(casee.caseTariff.tariff)\r\n ? casee.caseTariff.tariff!.name\r\n : ''}\r\n \r\n
\r\n
{this.renderCaseDetails()}
\r\n\r\n
\r\n
\r\n {this.translatorService.Tranlate('CASE_SUMMARY_FORM_PARTNERS', 'Parteneri')}\r\n
\r\n
\r\n
{this.renderPartners()}
\r\n\r\n
\r\n
\r\n {this.translatorService.Tranlate('CASE_SUMMARY_FORM_PARAMETERS', 'Parametri')}\r\n
\r\n
\r\n
{this.renderParameters()}
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n {!isNullOrUndefined(casee.caseTariff) &&\r\n !isNullOrUndefined(casee.caseTariff.tariff)\r\n ? casee.caseTariff.tariff!.name\r\n : ''}\r\n \r\n \r\n \r\n this.setState({ isOpenDialog: false })}\r\n size={'small'}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n {isNullOrUndefined(casee.caseTariff) ? (\r\n ''\r\n ) : (\r\n \r\n )}\r\n \r\n \r\n
\r\n ) : null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app\r\n }),\r\n null\r\n)(withSnackbar(CaseDetailsCaseTabSummaryForm as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, CaseSettingsState, AppState } from '../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport {\r\n Grid,\r\n Button,\r\n Typography,\r\n Dialog,\r\n DialogTitle,\r\n IconButton,\r\n DialogContent\r\n} from '@material-ui/core';\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { IOrganizationService } from '../../services/Interfaces/IOrganizationService';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { isNullOrUndefined } from 'util';\r\nimport {\r\n CaseWorkflowHistory,\r\n CaseParameterHistory,\r\n CasePartnerHistory,\r\n CaseTariffHistory\r\n} from '../../interfaces/Case';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport { IReferentialService } from '../../services/Interfaces/IReferentialService';\r\nimport Referentials from '../../helpers/Referentials.json';\r\nimport { ReferentialCode } from '../../helpers/Constants';\r\nimport moment from 'moment';\r\nimport { IWorkflowService } from '../../services/Interfaces/IWorkflowService';\r\nimport { OrganizationType } from '../../interfaces/Organization';\r\nimport { ITariffService } from '../../services/Interfaces/ITariffService';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport TariffProperties from './TariffProperties';\r\n\r\ninterface ICaseDetailsCaseTabHistoryFormState {\r\n caseWorkflowHistory: CaseWorkflowHistory[];\r\n casePartenerHistory: CasePartnerHistory[];\r\n caseParameterHistory: CaseParameterHistory[];\r\n caseTariffHistory: CaseTariffHistory[];\r\n isLoading: boolean;\r\n isOpenDialog: boolean;\r\n}\r\n\r\ntype ICaseDetailsCaseTabHistoryFormProps = {\r\n caseSettingsState: CaseSettingsState;\r\n appState: AppState;\r\n} & ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass CaseDetailsCaseTabHistoryForm extends React.PureComponent<\r\n ICaseDetailsCaseTabHistoryFormProps,\r\n ICaseDetailsCaseTabHistoryFormState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private organizationService!: IOrganizationService;\r\n private caseService!: ICaseService;\r\n private appReferentialService!: IReferentialService;\r\n private workflowService!: IWorkflowService;\r\n private tariffService!: ITariffService;\r\n\r\n static contextType = ApplicationContext;\r\n state = {\r\n caseWorkflowHistory: [],\r\n caseParameterHistory: [],\r\n casePartenerHistory: [],\r\n caseTariffHistory: [],\r\n isLoading: false,\r\n isOpenDialog: false\r\n } as ICaseDetailsCaseTabHistoryFormState;\r\n\r\n public componentDidMount() {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (isNullOrUndefined(caseSettings) || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadCaseWorkflowHistoryForm();\r\n }\r\n );\r\n }\r\n\r\n loadCaseWorkflowHistoryForm = async () => {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n\r\n if (isNullOrUndefined(caseSettings) || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n\r\n const ref = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.CompanyParameter\r\n );\r\n const orgTypeRef = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.OrganizationType\r\n );\r\n\r\n const [\r\n caseWorkflowHistory,\r\n workflows,\r\n casePartenerHistory,\r\n caseParameterHistory,\r\n caseTariffHistory\r\n ] = await Promise.all([\r\n this.caseService.GetCaseWorkflowHistory(caseId),\r\n this.workflowService.GetUserWorkflows(),\r\n this.caseService.GetCasePartnerHistory(caseId),\r\n this.caseService.GetCaseParameterHistory(caseId),\r\n this.caseService.GetCaseTariffHistory(caseId)\r\n ]);\r\n\r\n caseWorkflowHistory.forEach((caseWh) => {\r\n const workflow = workflows.find((item) => item.id === caseWh.workflowId);\r\n\r\n caseWh.workflowDisplayName = isNullOrUndefined(workflow) ? '' : workflow.displayName;\r\n caseWh.user = this.props.appState.appUser;\r\n });\r\n\r\n const [partners, parameterList, orgTypes, tariffList] = await Promise.all([\r\n this.organizationService.GetUserOrganizationsByIds(\r\n Array.from(new Set(casePartenerHistory.map((item) => item.organizationId)))\r\n ),\r\n this.appReferentialService.Get(ref!.baseUrl),\r\n this.appReferentialService.Get(orgTypeRef!.baseUrl),\r\n this.tariffService.GetUserTariffs(caseTariffHistory.map((item) => item.tariffId))\r\n ]);\r\n\r\n casePartenerHistory.forEach((partnerItem) => {\r\n const partner = partners.find((item) => item.id === partnerItem.organizationId);\r\n partnerItem.organization = isNullOrUndefined(partner) ? null : partner;\r\n const orgType = orgTypes.find(\r\n (item) => item.id === partnerItem.organization!.organizationTypeId\r\n );\r\n partnerItem.organization!.organizationType = (isNullOrUndefined(orgType)\r\n ? null\r\n : orgType) as any as OrganizationType;\r\n });\r\n\r\n caseParameterHistory.forEach((paramItem) => {\r\n const param = parameterList.find((item) => item.id === paramItem.parameterId);\r\n paramItem.parameter = isNullOrUndefined(param) ? null : param;\r\n });\r\n\r\n caseTariffHistory.forEach((tariffItem) => {\r\n const tariff = tariffList.find((item) => item.id === tariffItem.tariffId);\r\n tariffItem.tariff = isNullOrUndefined(tariff) ? null : tariff;\r\n });\r\n\r\n this.setState({\r\n caseWorkflowHistory: caseWorkflowHistory.sort(function (a: any, b: any) {\r\n return b.date - a.date;\r\n }),\r\n casePartenerHistory: casePartenerHistory,\r\n caseParameterHistory: caseParameterHistory,\r\n caseTariffHistory: caseTariffHistory,\r\n isLoading: false\r\n });\r\n };\r\n renderPartenersHistory = (caseWorkflowId: number) => {\r\n const partners = [] as any[];\r\n const casePartenerHistory = this.state.casePartenerHistory.filter(\r\n (item) => item.caseWorkflowHistoryId === caseWorkflowId\r\n );\r\n if (casePartenerHistory.length !== 0) {\r\n casePartenerHistory.forEach((partnerItem, index) => {\r\n partners.push(\r\n \r\n {partnerItem.organization!.name +\r\n ' (' +\r\n partnerItem.organization!.organizationType!.displayName +\r\n ')'}\r\n \r\n );\r\n });\r\n }\r\n return partners;\r\n };\r\n\r\n renderParameterHistory = (caseWorkflowId: number) => {\r\n const parameters = [] as any[];\r\n const caseParameterHistory = this.state.caseParameterHistory.filter(\r\n (item) => item.caseWorkflowHistoryId === caseWorkflowId\r\n );\r\n if (caseParameterHistory.length !== 0) {\r\n caseParameterHistory.forEach((paramItem, index) => {\r\n parameters.push(\r\n \r\n {paramItem.parameter!.displayName + ' = ' + paramItem.value}\r\n \r\n );\r\n });\r\n }\r\n return parameters;\r\n };\r\n\r\n renderTariffHistory = (caseWorkflowId: number) => {\r\n const tariffs = [] as any[];\r\n const caseTariffHistory = this.state.caseTariffHistory.filter(\r\n (item) => item.caseWorkflowHistoryId === caseWorkflowId\r\n );\r\n if (caseTariffHistory.length !== 0) {\r\n caseTariffHistory.forEach((tariffItem, index) => {\r\n tariffs.push(\r\n
\r\n {\r\n this.setState({ isOpenDialog: true });\r\n }}\r\n >\r\n {tariffItem.tariff === null ? 'N/A' : tariffItem.tariff!.name}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {' '}\r\n {tariffItem.tariff === null ? 'N/A' : tariffItem.tariff!.name}{' '}\r\n \r\n \r\n \r\n this.setState({ isOpenDialog: false })}\r\n size={'small'}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n
\r\n );\r\n });\r\n }\r\n return tariffs;\r\n };\r\n\r\n showTimelineWorkflowHistory = () => {\r\n const caseWorkflowHistory = this.state.caseWorkflowHistory;\r\n\r\n if (caseWorkflowHistory.length === 0) {\r\n return (\r\n \r\n {this.translatorService.Tranlate(\r\n 'TARIFF_EDIT_LABOR_TAB_NO_DATA',\r\n 'Nu exista date de afisat!'\r\n )}\r\n \r\n );\r\n }\r\n\r\n return caseWorkflowHistory.map((caseWorkflow) => (\r\n
\r\n
\r\n
\r\n

\r\n {caseWorkflow.workflowDisplayName +\r\n ' (' +\r\n this.props.caseSettingsState.caseSettings!.workflow.organizationOwner!.name +\r\n ' )'}\r\n

\r\n
\r\n
\r\n {this.translatorService.Tranlate('CASE_SUMMARY_FORM_PARTNERS', 'Parteneri')}\r\n
\r\n
\r\n {this.renderPartenersHistory(caseWorkflow.id)}\r\n
\r\n
\r\n {this.translatorService.Tranlate('CASE_SUMMARY_FORM_PARAMETERS', 'Parametri')}\r\n
\r\n
\r\n {this.renderParameterHistory(caseWorkflow.id)}\r\n
\r\n
\r\n {this.translatorService.Tranlate('CASE_SUMMARY_FORM_TARIFF', 'Tarif')}\r\n
\r\n
{this.renderTariffHistory(caseWorkflow.id)}
\r\n
\r\n \r\n {' '}\r\n {moment\r\n .utc(caseWorkflow.date)\r\n .local()\r\n .format(this.props.appState.longDateFormat) +\r\n ' (' +\r\n caseWorkflow.user!.userName +\r\n ' )'}{' '}\r\n \r\n
\r\n
\r\n ));\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n this.workflowService = (this.context as AppContext).workflowService;\r\n this.tariffService = (this.context as AppContext).tariffService;\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n
\r\n
\r\n
\r\n
\r\n {this.showTimelineWorkflowHistory()}{' '}\r\n
\r\n
\r\n
\r\n
\r\n ) : null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app\r\n }),\r\n null\r\n)(withSnackbar(CaseDetailsCaseTabHistoryForm as any));\r\n","import { AppUser } from '../../interfaces/AppUser';\r\nimport {\r\n WorkflowFormAction,\r\n WorkflowPartner,\r\n WorkflowPermission,\r\n WorkflowCalculation,\r\n WorkflowFormReport\r\n} from '../../interfaces/Workflow';\r\nimport { WorkflowFormActionTypeCode } from '../../helpers/Constants';\r\nimport { isNullOrUndefined } from 'util';\r\nimport { IAppUserService } from '../../services/Interfaces/IAppUserService';\r\n\r\nexport class FormHelpers {\r\n public static async ParseAllocations(\r\n workflowFormActions: WorkflowFormAction[],\r\n organizations: WorkflowPartner[],\r\n appUserService: IAppUserService,\r\n appUser: AppUser | null = null\r\n ): Promise {\r\n const caseAllocation = workflowFormActions.find(\r\n (item) => item.actionType!.code === WorkflowFormActionTypeCode.CASE_ALLOCATION\r\n );\r\n\r\n if (isNullOrUndefined(caseAllocation)) {\r\n return null;\r\n }\r\n if (\r\n (caseAllocation.isLastUser === null || !caseAllocation.isLastUser) &&\r\n caseAllocation.userId === null &&\r\n caseAllocation.workflowPartnerId === null &&\r\n caseAllocation.caseStatusId === null &&\r\n caseAllocation.workflowPartnerTypeId === null &&\r\n !(caseAllocation.sendEmailSameOrganization && appUser)\r\n ) {\r\n return null;\r\n }\r\n if (caseAllocation.isLastUser) {\r\n return {\r\n user: null,\r\n roleId: null,\r\n partners: [],\r\n partner: null,\r\n isLastUser: true,\r\n caseStatusId: null\r\n };\r\n }\r\n if (caseAllocation.caseStatusId !== null) {\r\n return {\r\n user: null,\r\n roleId: null,\r\n partners: [],\r\n partner: null,\r\n isLastUser: null,\r\n caseStatusId: caseAllocation.caseStatusId\r\n };\r\n }\r\n\r\n let workflowPartner: WorkflowPartner | null | undefined = null;\r\n let user: AppUser | null = null;\r\n if (!isNullOrUndefined(caseAllocation.workflowPartnerId)) {\r\n workflowPartner = organizations.find(\r\n (item) => item.partnerId === caseAllocation!.workflowPartner!.partnerId\r\n );\r\n }\r\n if (!isNullOrUndefined(caseAllocation.userId)) {\r\n user = await appUserService.GetUserInfo(caseAllocation.userId);\r\n }\r\n let partners = organizations;\r\n if (!isNullOrUndefined(caseAllocation.workflowPartnerTypeId)) {\r\n partners = organizations.filter(\r\n (item) =>\r\n item.partner &&\r\n item.partner.organizationTypeId ===\r\n caseAllocation!.workflowPartnerType!.organizationTypeId\r\n );\r\n }\r\n if (!isNullOrUndefined(user)) {\r\n workflowPartner = organizations.find(\r\n (item) => item.partnerId === user!.organizationId || item.partnerId === user!.hoId\r\n );\r\n partners = partners.filter((item) => item.id === workflowPartner!.id);\r\n }\r\n if (caseAllocation.sendEmailSameOrganization && appUser) {\r\n partners = partners.filter(\r\n (x) =>\r\n x.partnerId === appUser?.organizationId || x.partner?.parentId === appUser?.organizationId\r\n );\r\n\r\n workflowPartner = organizations.find(\r\n (item) => item.partnerId === appUser!.organizationId || item.partnerId === appUser!.hoId\r\n );\r\n }\r\n\r\n return {\r\n user: isNullOrUndefined(user) ? null : user,\r\n partners: partners,\r\n roleId: caseAllocation.userRoleId,\r\n partner: isNullOrUndefined(workflowPartner) ? null : workflowPartner,\r\n isLastUser: false,\r\n caseStatusId: null\r\n };\r\n }\r\n\r\n public static HasRights(\r\n workflowFormPermissions: WorkflowPermission[],\r\n appUser: AppUser,\r\n caseStatusId: number\r\n ): boolean {\r\n if (workflowFormPermissions.length === 0) {\r\n return false;\r\n }\r\n\r\n const permission = workflowFormPermissions.find(\r\n (item) =>\r\n item.workflowPartner!.partnerId === appUser.hoId &&\r\n (item.userRoleId === appUser.roleId || isNullOrUndefined(item.userRoleId)) &&\r\n item.caseStatusId === caseStatusId\r\n );\r\n\r\n return !isNullOrUndefined(permission);\r\n }\r\n\r\n public static VehicleDetailsHasRights(statusCode: string | null | undefined): boolean {\r\n if (!statusCode?.length) {\r\n return false;\r\n }\r\n\r\n return !['SOLD', 'AcquisitionRefused'].includes(statusCode);\r\n }\r\n\r\n public static GetCalculation(\r\n workflowCalculations: WorkflowCalculation[],\r\n appUser: AppUser,\r\n caseStatusId: number\r\n ): WorkflowCalculation | undefined {\r\n return workflowCalculations.find(\r\n (item) =>\r\n item.workflowPartner!.partnerId === appUser.hoId &&\r\n (item.userRoleId === appUser.roleId || isNullOrUndefined(item.userRoleId)) &&\r\n item.caseStatusId === caseStatusId\r\n );\r\n }\r\n\r\n public static GetReports(\r\n workflowReports: WorkflowFormReport[],\r\n appUser: AppUser,\r\n caseStatusId: number\r\n ): WorkflowFormReport[] {\r\n return workflowReports.filter(\r\n (item) =>\r\n item.workflowPartner!.partnerId === appUser!.hoId &&\r\n (item.userRoleId === appUser!.roleId || isNullOrUndefined(item.userRoleId)) &&\r\n item.caseStatusId === caseStatusId\r\n );\r\n }\r\n}\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n ApplicationState,\r\n CaseSettingsState,\r\n AppState,\r\n CaseSettingsActionCreators\r\n} from '../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { Box, Grid, Button, Typography, TextField } from '@material-ui/core';\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { IOrganizationService } from '../../services/Interfaces/IOrganizationService';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { Workflow, WorkflowPartner, WorkflowSectionStepForm } from '../../interfaces/Workflow';\r\nimport { isNullOrUndefined } from 'util';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport { IWorkflowService } from '../../services/Interfaces/IWorkflowService';\r\nimport { Organization } from '../../interfaces/Organization';\r\nimport { AppUser } from '../../interfaces/AppUser';\r\nimport { IAppUserService } from '../../services/Interfaces/IAppUserService';\r\nimport Autocomplete, { createFilterOptions } from '@material-ui/lab/Autocomplete';\r\nimport { FormHelpers } from '../../helpers/forms/FormHelpers';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport { ReferentialCode } from '../../helpers/Constants';\r\nimport Referentials from '../../helpers/Referentials.json';\r\nimport { IReferentialService } from '../../services/Interfaces/IReferentialService';\r\nimport { TextValidator } from 'react-material-ui-form-validator';\r\n\r\ninterface ICaseDetailsCaseTabModifyWorkflowFormState {\r\n workflows: Workflow[];\r\n selectedWorkflow: Workflow | null;\r\n organizations: WorkflowPartner[];\r\n selectedOrganization: WorkflowPartner | null;\r\n users: AppUser[];\r\n selectedUser: AppUser | null;\r\n isLoading: boolean;\r\n isLoading2: boolean;\r\n isLoading3: boolean;\r\n isOrganizationsDisabled: boolean;\r\n isUsersDisabled: boolean;\r\n hasRights: boolean;\r\n isUserHidden: boolean;\r\n executing: boolean;\r\n caseStatusList: IReferential[];\r\n selectedCaseStatus: IReferential;\r\n userRoleId: number | null;\r\n}\r\n\r\nexport interface ExternalCaseDetailsCaseTabModifyWorkflowFormProps {\r\n workflowForm: WorkflowSectionStepForm;\r\n}\r\n\r\ntype ICaseDetailsCaseTabModifyWorkflowFormProps =\r\n ExternalCaseDetailsCaseTabModifyWorkflowFormProps & {\r\n caseSettingsState: CaseSettingsState;\r\n appState: AppState;\r\n } & typeof CaseSettingsActionCreators &\r\n ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass CaseDetailsCaseTabModifyWorkflowForm extends React.PureComponent<\r\n ICaseDetailsCaseTabModifyWorkflowFormProps,\r\n ICaseDetailsCaseTabModifyWorkflowFormState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private organizationService!: IOrganizationService;\r\n private caseService!: ICaseService;\r\n private workflowService!: IWorkflowService;\r\n private appUserService!: IAppUserService;\r\n private referencialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n state = {\r\n workflows: [],\r\n selectedWorkflow: null,\r\n organizations: [],\r\n selectedOrganization: null,\r\n users: [],\r\n selectedUser: null,\r\n isLoading: true,\r\n isLoading2: false,\r\n isLoading3: false,\r\n isOrganizationsDisabled: false,\r\n isUsersDisabled: false,\r\n hasRights: false,\r\n isUserHidden: false,\r\n executing: false,\r\n caseStatusList: [],\r\n selectedCaseStatus: this.props.caseSettingsState.case!.caseStatus.caseStatus,\r\n userRoleId: null\r\n } as ICaseDetailsCaseTabModifyWorkflowFormState;\r\n\r\n public componentDidMount() {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (isNullOrUndefined(caseSettings) || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadCaseWorkflows();\r\n }\r\n );\r\n }\r\n\r\n loadCaseWorkflows = async () => {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (isNullOrUndefined(caseSettings) || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n const ref = Referentials.referential.find((item) => item.code === ReferentialCode.CaseStatus);\r\n\r\n const [workflows, ststusList] = await Promise.all([\r\n this.workflowService.GetUserWorkflows(),\r\n this.referencialService.Get(ref!.baseUrl)\r\n ]);\r\n\r\n const owners = await this.organizationService.GetUserOrganizationsByIds(\r\n Array.from(new Set(workflows.map((item) => item.organizationOwnerId)))\r\n );\r\n workflows.forEach((w) => {\r\n const owner = owners.find((item) => item.id === w.organizationOwnerId);\r\n w.organizationOwner = isNullOrUndefined(owner) ? null : owner;\r\n });\r\n\r\n const hasRights = FormHelpers.HasRights(\r\n this.props.workflowForm.workflowFormPermissions,\r\n this.props.appState.appUser!,\r\n this.props.caseSettingsState.case!.caseStatus.caseStatusId\r\n );\r\n this.setState({\r\n workflows: workflows,\r\n isLoading: false,\r\n hasRights: hasRights,\r\n caseStatusList: ststusList\r\n });\r\n };\r\n\r\n loadOrganizations = async (workflowId: number) => {\r\n const [workflowPartners] = await Promise.all([\r\n this.workflowService.GetUserWorkflowPartners(workflowId)\r\n ]);\r\n const organizations = await this.organizationService.GetUserOrganizationsByIds(\r\n workflowPartners.map((item) => item.partnerId)\r\n );\r\n\r\n workflowPartners.forEach((wp) => {\r\n const partner = organizations.find((item) => item.id === wp.partnerId);\r\n wp.partner = isNullOrUndefined(partner) ? null : partner;\r\n });\r\n\r\n this.setState({\r\n organizations: workflowPartners,\r\n isLoading2: false\r\n });\r\n };\r\n\r\n loadUsers = async (organizationId: number | null, roleId: number | null) => {\r\n if (organizationId === null) {\r\n this.setState({\r\n isLoading3: false\r\n });\r\n } else {\r\n const users = await this.appUserService.GetUserAppUsers();\r\n\r\n this.setState({\r\n users: users.users.filter(\r\n (user) =>\r\n (user.organization!.hoId === organizationId ||\r\n user.organizationId === organizationId) &&\r\n ((roleId !== null && user.roleId === roleId) || roleId === null)\r\n ),\r\n isLoading3: false\r\n });\r\n }\r\n };\r\n handleAutocompleteStatusChange = (newValue: any | null) => {\r\n this.setState({\r\n selectedCaseStatus: newValue\r\n });\r\n };\r\n\r\n renderWorkflows = () => {\r\n return (\r\n \r\n {this.renderWorkflowList()}\r\n
\r\n \r\n this.handleAutocompleteStatusChange(newValue)\r\n }\r\n getOptionLabel={(option: any) => option.displayName}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n \r\n
\r\n {this.renderAssignementForm()}\r\n \r\n {this.translatorService.Tranlate('SAVE', 'Salveaza')}\r\n \r\n
\r\n );\r\n };\r\n\r\n renderAssignementForm = () => {\r\n if (this.state.isUserHidden) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n {!this.state.isLoading2 ? (\r\n
\r\n \r\n this.handleOrganizationChange(newValue)\r\n }\r\n getOptionLabel={(option: WorkflowPartner) => option.partner!.displayName || ''}\r\n filterOptions={createFilterOptions({\r\n matchFrom: 'any',\r\n stringify: (option: WorkflowPartner) => option.partner!.displayName\r\n })}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n
\r\n \r\n
\r\n {!this.state.isLoading3 ? (\r\n this.handleUserChange(newValue)}\r\n getOptionLabel={(option: AppUser) => option.userName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n ) : null}\r\n
\r\n ) : null}\r\n
\r\n );\r\n };\r\n\r\n changeWorkflow = async () => {\r\n if (isNullOrUndefined(this.state.selectedWorkflow)) {\r\n return;\r\n }\r\n try {\r\n this.setState({ executing: true });\r\n\r\n await this.caseService.ChangeCaseWorkflow(\r\n this.state.selectedWorkflow.id,\r\n this.props.caseSettingsState.case!.id,\r\n isNullOrUndefined(this.state.selectedUser) ? '' : this.state.selectedUser.id!,\r\n this.state.selectedCaseStatus.id\r\n );\r\n\r\n if (this.props.workflowForm.form.hasActions) {\r\n const selectedOrganization = this.state.selectedOrganization;\r\n const hoId =\r\n selectedOrganization === null\r\n ? null\r\n : selectedOrganization.partner!.hoId === null\r\n ? selectedOrganization.partnerId\r\n : selectedOrganization.partner!.hoId;\r\n\r\n await this.submitForm(\r\n this.props.caseSettingsState.case!.id,\r\n this.props.workflowForm.id,\r\n this.state.selectedUser\r\n );\r\n }\r\n\r\n this.props.SetCaseSettings(this.props.caseSettingsState.case!.id);\r\n } catch (ex) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(ex.response.data, 'Eroare modificare flux!'),\r\n { variant: 'error' }\r\n );\r\n } finally {\r\n this.setState({ executing: false });\r\n }\r\n };\r\n\r\n submitForm = async (caseId: number, caseSectionStepFormId: number, appUser: AppUser | null) => {\r\n let newStatus = await this.caseService.SubmitForm(caseId, caseSectionStepFormId, appUser);\r\n\r\n if (newStatus === null) {\r\n newStatus = this.props.caseSettingsState.case!.caseStatus;\r\n }\r\n this.props.SetCaseStatus(newStatus);\r\n if (appUser !== null) {\r\n this.props.AddPartner(appUser!.hoId === null ? appUser!.organizationId : appUser!.hoId);\r\n }\r\n\r\n const hasRights = FormHelpers.HasRights(\r\n this.props.workflowForm.workflowFormPermissions,\r\n this.props.appState.appUser!,\r\n newStatus.caseStatusId\r\n );\r\n this.setState({ hasRights: hasRights });\r\n };\r\n\r\n renderWorkflowList = () => {\r\n let selectedItem = -1;\r\n if (!isNullOrUndefined(this.state.selectedWorkflow)) {\r\n selectedItem = this.state.selectedWorkflow.id;\r\n }\r\n\r\n const organizations: Organization[] = [];\r\n\r\n const scopeWorkflows = this.state.workflows.filter(\r\n (item) => item.caseTypeId === this.props.caseSettingsState.case!.caseTypeId\r\n );\r\n scopeWorkflows.forEach((w) => {\r\n if (organizations.find((item) => item.id === w.organizationOwnerId) === undefined) {\r\n organizations.push(w.organizationOwner!);\r\n }\r\n });\r\n\r\n return organizations.map((org, index) => (\r\n \r\n \r\n {org.displayName}\r\n \r\n \r\n {scopeWorkflows\r\n .filter((w) => w.organizationOwnerId === org.id)\r\n .map((item, index) => (\r\n \r\n \r\n this.handleSelectWorkflow(item)}\r\n >\r\n {item.displayName}\r\n \r\n \r\n \r\n ))}\r\n \r\n \r\n ));\r\n };\r\n\r\n handleSelectWorkflow = (item: Workflow) => {\r\n this.setState(\r\n {\r\n selectedWorkflow: item,\r\n isLoading2: true,\r\n selectedUser: null,\r\n selectedOrganization: null,\r\n isUsersDisabled: false,\r\n isOrganizationsDisabled: false\r\n },\r\n async () => {\r\n await this.loadOrganizations(item.id);\r\n await this.setCaseAllocation();\r\n }\r\n );\r\n };\r\n\r\n setCaseAllocation = async () => {\r\n const allocationResult = await FormHelpers.ParseAllocations(\r\n this.props.workflowForm.workflowFormActions,\r\n this.state.organizations,\r\n this.appUserService\r\n );\r\n\r\n if (isNullOrUndefined(allocationResult)) {\r\n const partner = this.state.organizations.find(\r\n (item) => item.partnerId === this.props.caseSettingsState.case!.caseStatus.assignedTo!.hoId\r\n );\r\n\r\n this.setState(\r\n {\r\n selectedOrganization: isNullOrUndefined(partner) ? null : partner,\r\n selectedUser: this.props.caseSettingsState.case!.caseStatus.assignedTo,\r\n organizations: this.state.organizations,\r\n isUsersDisabled: false,\r\n isOrganizationsDisabled: false\r\n },\r\n async () =>\r\n await this.loadUsers(isNullOrUndefined(partner) ? null : partner.partnerId, null)\r\n );\r\n return;\r\n }\r\n if (allocationResult.isLastUser || allocationResult.caseStatusId != null) {\r\n this.setState({ isUserHidden: true });\r\n return;\r\n }\r\n this.setState(\r\n {\r\n selectedOrganization: allocationResult.partner,\r\n selectedUser: allocationResult.user,\r\n organizations: allocationResult.partners,\r\n isUsersDisabled: !isNullOrUndefined(allocationResult.user),\r\n isOrganizationsDisabled: !isNullOrUndefined(allocationResult.partner),\r\n userRoleId: allocationResult.roleId\r\n },\r\n () => this.handleOrganizationChange(allocationResult.partner)\r\n );\r\n };\r\n\r\n handleOrganizationChange = (newValue: WorkflowPartner | null) => {\r\n this.setState(\r\n {\r\n selectedOrganization: newValue,\r\n users: [],\r\n isLoading3: true\r\n },\r\n async () => {\r\n await this.loadUsers(newValue === null ? null : newValue.partnerId, this.state.userRoleId);\r\n }\r\n );\r\n };\r\n\r\n handleUserChange = (newValue: AppUser | null) => {\r\n this.setState({ selectedUser: newValue });\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n this.workflowService = (this.context as AppContext).workflowService;\r\n this.appUserService = (this.context as AppContext).appUserService;\r\n this.referencialService = (this.context as AppContext).referentialService;\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n
\r\n
{this.renderWorkflows()}
\r\n
\r\n ) : null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalCaseDetailsCaseTabModifyWorkflowFormProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app\r\n }),\r\n CaseSettingsActionCreators,\r\n mergeProps\r\n)(withSnackbar(CaseDetailsCaseTabModifyWorkflowForm as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n ApplicationState,\r\n CaseSettingsState,\r\n AppState,\r\n CaseSettingsActionCreators\r\n} from '../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport {\r\n CardContent,\r\n Button,\r\n IconButton,\r\n DialogTitle,\r\n Grid,\r\n Typography,\r\n ButtonGroup,\r\n Tooltip,\r\n Box,\r\n Dialog,\r\n DialogContent,\r\n Modal,\r\n DialogActions,\r\n DialogContentText\r\n} from '@material-ui/core';\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { Card, CardFooter } from 'reactstrap';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { WorkflowDocumentType, WorkflowFormAction, WorkflowSectionStep, WorkflowSectionStepForm } from '../../interfaces/Workflow';\r\nimport { isNullOrUndefined } from 'util';\r\nimport { Appointment, AppointmentPaymentStatusRequest, CarfixAttachmentNotificationRequest, CarfixAttachmentNotificationResponse, CaseAttachment, CaseSelectedAttachment, PaymentDto, PreAppointment } from '../../interfaces/Case';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport { IReferentialService } from '../../services/Interfaces/IReferentialService';\r\nimport Referentials from '../../helpers/Referentials.json';\r\nimport { AppointmentPaymentStatus, AttachmentTypeCode, hideButtonsSectionSteps, ReferentialCode, UploadSizeLimit, WorkflowFormActionTypeCode } from '../../helpers/Constants';\r\nimport DeleteOutlineTwoToneIcon from '@material-ui/icons/DeleteOutlineTwoTone';\r\nimport VisibilityIcon from '@material-ui/icons/Visibility';\r\nimport DescriptionIcon from '@material-ui/icons/Description';\r\nimport FileSaver from 'file-saver';\r\nimport { FormHelpers } from '../../helpers/forms/FormHelpers';\r\nimport { AppUser } from '../../interfaces/AppUser';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\r\n// @ts-ignore\r\nimport FileViewer from 'react-file-viewer';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport GetAppIcon from '@material-ui/icons/GetApp';\r\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\r\n// @ts-ignore\r\nimport Camera from 'react-html5-camera-photo';\r\nimport 'react-html5-camera-photo/build/css/index.css';\r\nimport PhotoCameraOutlinedIcon from '@material-ui/icons/PhotoCameraOutlined';\r\nimport _, { at } from 'lodash';\r\nimport { Organization } from '../../interfaces/Organization';\r\nimport * as R from 'ramda';\r\nimport { IOrganizationService } from '../../services/Interfaces/IOrganizationService';\r\nimport { workers } from 'cluster';\r\nimport Resizer from \"react-image-file-resizer\";\r\nimport { ReportParameter } from '../../interfaces/Reports';\r\nimport { IReportsService } from '../../services/Interfaces/IReportsService';\r\n\r\ninterface ICaseDetailsCaseTabDocumentsFormState {\r\n caseAttachments: CaseAttachment[];\r\n attachmentTypeList: WorkflowDocumentType[];\r\n isLoading: boolean;\r\n hasRights: boolean;\r\n executing: boolean;\r\n isDialogOpen: boolean;\r\n previewAttachFile: any;\r\n previewAttachFileExtension: string;\r\n isCameraDialogOpen: boolean;\r\n isSelection: boolean;\r\n attachmentTypeClicked: any;\r\n showUploadMessage: boolean;\r\n isOpen: boolean;\r\n dialogVisible: boolean;\r\n selectedAttachment: CaseSelectedAttachment;\r\n caseStatuses: IReferential[];\r\n wfTransitionStepAction: WorkflowFormAction | null;\r\n appointment: Appointment | null;\r\n appointmentPaymentStatus: PreAppointment | null;\r\n hideButton: boolean;\r\n}\r\n\r\nexport interface ExternalCaseDetailsCaseTabDocumentsFormProps {\r\n workflowForm: WorkflowSectionStepForm;\r\n}\r\n\r\ntype ICaseDetailsCaseTabDocumentsFormProps = ExternalCaseDetailsCaseTabDocumentsFormProps & {\r\n caseSettingsState: CaseSettingsState;\r\n appState: AppState;\r\n} & typeof CaseSettingsActionCreators &\r\n ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\nexport const imageExtensions = ['png', 'jpeg', 'jpg', 'bmp'];\r\n\r\nclass CaseDetailsCaseTabDocumentsForm extends React.PureComponent<\r\n ICaseDetailsCaseTabDocumentsFormProps,\r\n ICaseDetailsCaseTabDocumentsFormState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private caseService!: ICaseService;\r\n private appReferentialService!: IReferentialService;\r\n private organizationService!: IOrganizationService;\r\n private reportsService!: IReportsService;\r\n static contextType = ApplicationContext;\r\n state = {\r\n caseAttachments: [],\r\n attachmentTypeList: [],\r\n isLoading: false,\r\n hasRights: false,\r\n executing: false,\r\n isDialogOpen: false,\r\n previewAttachFile: '',\r\n previewAttachFileExtension: '',\r\n isCameraDialogOpen: false,\r\n isSelection: false,\r\n attachmentTypeClicked: null,\r\n showUploadMessage: false,\r\n isOpen: false,\r\n dialogVisible: false,\r\n selectedAttachment: {\r\n id: -1,\r\n fileName: ''\r\n },\r\n caseStatuses: [],\r\n wfTransitionStepAction: null,\r\n appointment: null,\r\n appointmentPaymentStatus: null,\r\n hideButton: false\r\n } as ICaseDetailsCaseTabDocumentsFormState;\r\n\r\n public componentDidMount() {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (isNullOrUndefined(caseSettings) || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadCaseDocumentsForm();\r\n }\r\n );\r\n }\r\n\r\n loadCaseDocumentsForm = async () => {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (isNullOrUndefined(caseSettings) || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n\r\n const ref = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.AttachmentType\r\n );\r\n const refCaseStatus = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.CaseStatus\r\n );\r\n const refAppointmentCategoryType = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.AppointmentCategoryType\r\n );\r\n\r\n let workflowDocumentsTypes = this.props.workflowForm.workflowDocumentTypes;\r\n const [attachmentTypes, caseStatuses, appointment, appointmentCategoryTypes] = await Promise.all([\r\n this.appReferentialService.Get(ref!.baseUrl),\r\n this.appReferentialService.Get(refCaseStatus!.baseUrl),\r\n this.props.workflowForm.appointmentCategoryTypeId != null ? this.caseService.GetAppointmentByType(caseId, this.props.workflowForm.appointmentCategoryTypeId) : null,\r\n this.appReferentialService.Get(refAppointmentCategoryType!.baseUrl)\r\n ]);\r\n\r\n workflowDocumentsTypes.forEach((wfDoc) => {\r\n const documentType = attachmentTypes.find((item) => item.id === wfDoc.documentTypeId);\r\n wfDoc.documentType = isNullOrUndefined(documentType) ? null : documentType;\r\n });\r\n\r\n let appointmentPaymentStatus = null;\r\n if (workflowDocumentsTypes.some((item) => item.documentType!.code === AttachmentTypeCode.INVOICE_REPAIR)) {\r\n const paymentRequest = {\r\n caseId: caseId,\r\n workflowId: this.props.caseSettingsState.caseSettings!.workflow.id\r\n } as AppointmentPaymentStatusRequest;\r\n appointmentPaymentStatus = await this.caseService.GetAppointmentPaymentStatus(paymentRequest);\r\n }\r\n\r\n if (this.props.workflowForm!.appointmentCategoryTypeId) {\r\n const appointmentCategoryType = appointmentCategoryTypes.find(\r\n (item) => item.id === this.props.workflowForm!.appointmentCategoryTypeId\r\n );\r\n this.props.workflowForm.appointmentCategoryType = appointmentCategoryType || null;\r\n }\r\n\r\n let organization: Organization | null = null;\r\n if (!R.isNil(this.props.appState!.appUser!.organizationId)) {\r\n organization = await this.organizationService.GetOrganizationInfo(\r\n this.props.appState!.appUser!.organizationId\r\n );\r\n }\r\n \r\n let attachmentTypeList = _.cloneDeep(this.props.workflowForm.workflowDocumentTypes);\r\n console.log('isPrcIntegration', this.props.caseSettingsState.caseSettings!.workflow.isPrcIntegration);\r\n console.log('hideOtherAttachments', this.props.appState.appUser!.organization!.organizationType!.hideOtherAttachments);\r\n\r\n if (this.props.caseSettingsState.caseSettings!.workflow.isPrcIntegration && this.props.appState.appUser!.organization!.organizationType!.hideOtherAttachments) {\r\n workflowDocumentsTypes = workflowDocumentsTypes.filter((item) => item.documentType!.code != AttachmentTypeCode.OTHER);\r\n }\r\n\r\n let caseAttachments = appointment ? \r\n await this.caseService.GetCaseAppointmentAttachments(\r\n caseId,\r\n appointment.id,\r\n workflowDocumentsTypes.map((item) => item.documentType!.code!)\r\n )\r\n : \r\n await this.caseService.GetCaseAttachments(\r\n caseId,\r\n workflowDocumentsTypes.map((item) => item.documentType!.code!)\r\n )\r\n ;\r\n\r\n const step = this.getWorkflowSectionStep(this.props.workflowForm.workflowSectionStepId);\r\n console.log('step', step);\r\n console.log('current', step && step.isCurrent(this.props.caseSettingsState.case!.caseStatus.caseStatusId));\r\n if (\r\n this.props.caseSettingsState.caseSettings!.workflow.isCarfixIntegration &&\r\n step && \r\n step.isCurrent(this.props.caseSettingsState.case!.caseStatus.caseStatusId)\r\n ) {\r\n console.log('attachmentTypeList', attachmentTypeList);\r\n \r\n const relevantAttachmentTypes = [\r\n AttachmentTypeCode.WORK_ORDER.toString(),\r\n AttachmentTypeCode.HAND_OVER.toString(),\r\n AttachmentTypeCode.INVOICE_REPAIR.toString()\r\n ];\r\n \r\n const hasRelevantAttachment = attachmentTypeList.some(attach =>\r\n relevantAttachmentTypes.includes(attach.documentType!.code || '')\r\n );\r\n \r\n if (hasRelevantAttachment) {\r\n const hasRelevantCaseAttachment = caseAttachments.some(attach =>\r\n relevantAttachmentTypes.includes(attach.attachmentType!.code || '')\r\n );\r\n \r\n if (hasRelevantCaseAttachment) {\r\n console.log('The caseAttachments contains a relevant attachment.');\r\n } else {\r\n console.log('The caseAttachments does not contain any relevant attachments.');\r\n\r\n const workflowDocumentType = attachmentTypeList.find(attach =>\r\n relevantAttachmentTypes.includes(attach.documentType!.code || '')\r\n );\r\n console.log('workflowDocumentType', workflowDocumentType);\r\n \r\n if (workflowDocumentType) {\r\n await this.generateReport(workflowDocumentType, appointment, appointmentPaymentStatus?.pre_appointment || null);\r\n caseAttachments = appointment ? \r\n await this.caseService.GetCaseAppointmentAttachments(\r\n caseId,\r\n appointment.id,\r\n workflowDocumentsTypes.map((item) => item.documentType!.code!)\r\n )\r\n : \r\n await this.caseService.GetCaseAttachments(\r\n caseId,\r\n workflowDocumentsTypes.map((item) => item.documentType!.code!)\r\n )\r\n ;\r\n }\r\n }\r\n } else {\r\n console.log('The attachmentTypeList does not contain any relevant attachments.');\r\n }\r\n } \r\n\r\n const photosProm = [] as any[];\r\n caseAttachments.forEach((element) => {\r\n const categ = workflowDocumentsTypes.find(\r\n (wdt) => wdt.documentTypeId === element.attachmentTypeId\r\n );\r\n if (!categ!.isMultiple && categ!.isSelectionGroup) {\r\n photosProm.push(this.caseService.GetCaseAttachment(element.fileName));\r\n } else {\r\n photosProm.push(null);\r\n }\r\n });\r\n\r\n const photos = await Promise.all([...photosProm]);\r\n caseAttachments.forEach((elem, index) => {\r\n elem.file = photos[index];\r\n });\r\n\r\n const hasRights = FormHelpers.HasRights(\r\n this.props.workflowForm.workflowFormPermissions,\r\n this.props.appState.appUser!,\r\n this.props.caseSettingsState.case!.caseStatus.caseStatusId\r\n );\r\n\r\n if (this.props.caseSettingsState.caseSettings!.workflow.isPrcIntegration && this.props.appState.appUser!.organization!.organizationType!.hideOtherAttachments) {\r\n attachmentTypeList = attachmentTypeList.filter((item) => item.documentType!.code != AttachmentTypeCode.OTHER);\r\n }\r\n attachmentTypeList.forEach((attachmentType) => {\r\n attachmentType.isLoading = false;\r\n });\r\n\r\n const wfStepActions = this.props.workflowForm.workflowFormActions;\r\n const wfTransitionStepAction =\r\n wfStepActions.find(\r\n (item) =>\r\n item.actionType?.code === WorkflowFormActionTypeCode.STATUS_TRANSITION &&\r\n this.props.caseSettingsState.case!.caseStatus.caseStatusId === item.fromStatusId\r\n ) || (null);\r\n\r\n console.log('appointment', appointment, 'appointmentPaymentStatus', appointmentPaymentStatus);\r\n this.setState({\r\n caseAttachments: caseAttachments.sort(function (a: any, b: any) {\r\n return b.uploadDate - a.uploadDate;\r\n }),\r\n attachmentTypeList: attachmentTypeList,\r\n isLoading: false,\r\n hasRights: hasRights,\r\n showUploadMessage: organization!.uploadFeature,\r\n caseStatuses: caseStatuses,\r\n wfTransitionStepAction: wfTransitionStepAction,\r\n appointment: appointment,\r\n appointmentPaymentStatus: appointmentPaymentStatus?.pre_appointment || null,\r\n hideButton: hideButtonsSectionSteps.includes(step?.workflowStep?.code ?? \"\")\r\n });\r\n };\r\n\r\n getWorkflowSectionStep = (workflowSectionStepId: number): WorkflowSectionStep | null => {\r\n const sections = this.props.caseSettingsState.caseSettings!.workflow.workflowSections!;\r\n for (const section of sections) {\r\n for (const step of section.workflowSectionSteps) {\r\n if (step.id == workflowSectionStepId) {\r\n return step;\r\n }\r\n }\r\n }\r\n return null;\r\n };\r\n\r\n setCameraDetails = async (attachmentType: WorkflowDocumentType) => {\r\n this.setState({\r\n attachmentTypeClicked: attachmentType.documentType!,\r\n isCameraDialogOpen: true,\r\n isSelection: attachmentType.isSelectionGroup\r\n });\r\n };\r\n\r\n setAttachmentTypeList = (workflowDocumentType: WorkflowDocumentType, value: boolean) => {\r\n const attachmentTypeList = _.cloneDeep(this.state.attachmentTypeList);\r\n for (let i = 0; i < attachmentTypeList.length; i++) {\r\n if (attachmentTypeList[i].id === workflowDocumentType.id) {\r\n attachmentTypeList[i].isLoading = value;\r\n }\r\n }\r\n\r\n return attachmentTypeList;\r\n };\r\n\r\n /**\r\n * Get dimensions of any image by url\r\n * @param {string} url\r\n * @param {number} [rejectTimeout] timeout for reject\r\n * @return {Promise<{ width: number, height: number }>}\r\n */\r\n reactImageSize = (\r\n url: string,\r\n rejectTimeout: number\r\n ): Promise<{ width: number; height: number }> =>\r\n new Promise((resolve, reject) => {\r\n let timer: NodeJS.Timeout | null = null;\r\n\r\n const img = new Image();\r\n\r\n img.addEventListener('load', () => {\r\n if (timer) {\r\n clearTimeout(timer);\r\n }\r\n\r\n resolve({ width: img.width, height: img.height });\r\n });\r\n\r\n img.addEventListener('error', (event) => {\r\n if (timer) {\r\n clearTimeout(timer);\r\n }\r\n\r\n reject(`${event.type}: ${event.message}`);\r\n });\r\n\r\n img.src = url;\r\n\r\n if (rejectTimeout) {\r\n timer = setTimeout(() => reject('Timeout exception'), rejectTimeout);\r\n }\r\n });\r\n\r\n resizeImageFile = (file: any) : Promise =>\r\n new Promise((resolve, reject) => {\r\n try {\r\n //The Pixels value For 5 Megabytes at 4:3 Respect Ratio and 24 Bit depth is:\r\n //1526 X 1145\r\n Resizer.imageFileResizer(\r\n file,\r\n 1526,\r\n 1145,\r\n \"jpg\",\r\n 100,\r\n 0,\r\n (uri) => {\r\n resolve(uri as File);\r\n },\r\n \"file\",\r\n 600,\r\n 800\r\n );\r\n } catch (err) {\r\n\t\t\t\tconsole.log(err);\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n\t\t\t}\r\n \r\n });\r\n\r\n handleUploadAttachment = async (\r\n e: React.ChangeEvent,\r\n workflowDocumentType: WorkflowDocumentType\r\n ) => {\r\n try {\r\n if (e.target.files === null) {\r\n return;\r\n }\r\n e.persist();\r\n if (this.state.showUploadMessage) {\r\n if (e.target.files.length > 80 && workflowDocumentType.isMultiple) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('MORE_PHOTOS', 'Limita de 80 de poze a fost depasita!'),\r\n {\r\n variant: 'warning'\r\n }\r\n );\r\n e.target.value = '';\r\n return;\r\n }\r\n }\r\n this.setState({\r\n attachmentTypeList: this.setAttachmentTypeList(workflowDocumentType, true)\r\n });\r\n const unacceptedFileList: string[] = [];\r\n const attachments: CaseAttachment[] = [];\r\n for (let i = 0; i < e.target.files.length; i++) {\r\n let file = e.target.files![i];\r\n \r\n //pentru selection grup\r\n if (workflowDocumentType.isSelectionGroup) {\r\n const ext = file.name.toLowerCase().split('.').pop();\r\n if (ext && imageExtensions.includes(ext)) {\r\n console.log('Before', file);\r\n file = await this.resizeImageFile(e.target.files![i]);\r\n console.log('After', file);\r\n } else {\r\n unacceptedFileList.push(file.name);\r\n }\r\n }\r\n\r\n attachments.push({\r\n id: 0,\r\n caseId: this.props.caseSettingsState.case!.id,\r\n attachmentTypeId: workflowDocumentType.documentTypeId,\r\n attachmentType: workflowDocumentType.documentType,\r\n file: file,\r\n isSelection: workflowDocumentType.isSelectionGroup\r\n } as CaseAttachment);\r\n }\r\n\r\n if (workflowDocumentType.isSelectionGroup) {\r\n if (unacceptedFileList.length) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('RENAULT_ACCEPTED_FORMAT', 'Tipul fisierului acceptat este png, jpeg, jpg, bmp!') + ' \\n' +\r\n this.translatorService.Tranlate('RENAULT_ACCEPTED_FORMAT_MESSAGE', 'Urmatoarele fisiere nu indeplinesc acesta conditie: ') + ' \\n' +\r\n unacceptedFileList.join(', '),\r\n {\r\n variant: 'warning',\r\n style: { whiteSpace: 'pre-line' }\r\n }\r\n );\r\n e.target.value = '';\r\n\r\n this.setState({\r\n attachmentTypeList: this.setAttachmentTypeList(workflowDocumentType, false)\r\n });\r\n return;\r\n }\r\n }\r\n\r\n const size = _.sumBy(attachments, 'file.size');\r\n console.log('Dimensiune bytes', size);\r\n\r\n if (this.state.showUploadMessage) {\r\n if (size > UploadSizeLimit.SizeLimit) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('MAX_SIZE_PHOTOS', 'Limita de 500 MB a fost depasita!'),\r\n {\r\n variant: 'warning'\r\n }\r\n );\r\n e.target.value = '';\r\n\r\n this.setState({\r\n attachmentTypeList: this.setAttachmentTypeList(workflowDocumentType, false)\r\n });\r\n return;\r\n }\r\n }\r\n\r\n this.setState({\r\n attachmentTypeList: this.setAttachmentTypeList(workflowDocumentType, true)\r\n });\r\n\r\n const newFiles = await this.caseService.AddCaseAttachment(attachments);\r\n\r\n newFiles.forEach((item, index) => {\r\n item.file = attachments[index].file;\r\n });\r\n\r\n const caseAttachments = [...this.state.caseAttachments];\r\n caseAttachments.push(...newFiles);\r\n\r\n this.setState({\r\n caseAttachments: caseAttachments,\r\n attachmentTypeList: this.setAttachmentTypeList(workflowDocumentType, false)\r\n });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n e.target.value = '';\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n e.target.value = '';\r\n }\r\n };\r\n\r\n handleUploadAttachmentFromCamera = async (files: any, attachmentType: IReferential) => {\r\n try {\r\n if (files === null) {\r\n return;\r\n }\r\n if (this.state.showUploadMessage) {\r\n if (files.length > 80) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('MORE_PHOTOS', 'Limita de 80 de poze a fost depasita!'),\r\n {\r\n variant: 'warning'\r\n }\r\n );\r\n return;\r\n }\r\n }\r\n\r\n const attachments: CaseAttachment[] = [];\r\n for (let i = 0; i < files.length; i++) {\r\n attachments.push({\r\n id: 0,\r\n caseId: this.props.caseSettingsState.case!.id,\r\n attachmentTypeId: attachmentType.id,\r\n attachmentType: attachmentType,\r\n file: files![i],\r\n isSelection: this.state.isSelection\r\n } as CaseAttachment);\r\n }\r\n\r\n if (this.state.showUploadMessage) {\r\n const size = _.sumBy(attachments, 'file.size');\r\n if (size > UploadSizeLimit.SizeLimit) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('MAX_SIZE_PHOTOS', 'Limita de 500 MB a fost depasita!'),\r\n {\r\n variant: 'warning'\r\n }\r\n );\r\n return;\r\n }\r\n }\r\n\r\n const newFiles = await this.caseService.AddCaseAttachment(attachments);\r\n newFiles.forEach((item, index) => {\r\n item.file = attachments[index].file;\r\n });\r\n\r\n const caseAttachments = [...this.state.caseAttachments];\r\n caseAttachments.push(...newFiles);\r\n\r\n this.setState({\r\n caseAttachments: caseAttachments\r\n });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n handleCloseConfirmationDialog = () => {\r\n this.setState({\r\n isOpen: false,\r\n dialogVisible: false\r\n });\r\n };\r\n\r\n handleOpenConfirmationDialog = () => {\r\n this.setState({\r\n isOpen: true,\r\n dialogVisible: true\r\n });\r\n };\r\n\r\n handleCloseModal = () => {\r\n this.setState({\r\n isOpen: false,\r\n dialogVisible: false\r\n });\r\n };\r\n\r\n openDeleteAttachmentPopUp = (id: number, fileName: string, fileInputKey?: number) => {\r\n this.setState({\r\n isOpen: true,\r\n dialogVisible: true,\r\n selectedAttachment: {\r\n id: id,\r\n fileName: fileName,\r\n fileInputKey: fileInputKey\r\n }\r\n });\r\n };\r\n\r\n handleDeleteAttachment = async (id: number, fileName: string, fileInputKey?: number) => {\r\n try {\r\n this.setState({ isOpen: false, dialogVisible: false });\r\n await this.caseService.RemoveCaseAttachment(fileName);\r\n\r\n const caseAttachments = [...this.state.caseAttachments];\r\n const index = caseAttachments.findIndex((item) => item.id === id);\r\n caseAttachments.splice(index, 1);\r\n\r\n this.setState({\r\n caseAttachments: caseAttachments,\r\n attachmentTypeList: this.state.attachmentTypeList.map((item) => {\r\n if (item.fileInputKey === fileInputKey) {\r\n return { ...item, fileInputKey: Date.now() };\r\n }\r\n return item;\r\n })\r\n });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n handlePreviewAttachment = async (originalFileName: string, filename: string) => {\r\n try {\r\n const fileBlob = await this.caseService.GetCaseAttachment(filename);\r\n const url = URL.createObjectURL(fileBlob);\r\n const extension = originalFileName.split('.').pop();\r\n\r\n if (isNullOrUndefined(extension)) {\r\n return;\r\n }\r\n\r\n this.setState({\r\n previewAttachFile: url,\r\n previewAttachFileExtension: extension!.toLowerCase(),\r\n isDialogOpen: true\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n renderPreviewAttachment = () => {\r\n return (\r\n \r\n );\r\n };\r\n\r\n renderPreviewImage = (file: any, fileName: string) => {\r\n const url = URL.createObjectURL(file);\r\n\r\n return {fileName};\r\n };\r\n\r\n renderAttachments = (workflowDocument: WorkflowDocumentType) => {\r\n const attachments = this.state.caseAttachments.filter(\r\n (item) => item.attachmentTypeId === workflowDocument.documentTypeId\r\n );\r\n const attachmentsToRender = [] as any[];\r\n\r\n attachments.forEach((attach, index) => {\r\n attachmentsToRender.push(\r\n \r\n \r\n \r\n
\r\n \r\n this.handlePreviewAttachment(attach.originalFileName, attach.fileName)\r\n }\r\n >\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n this.downloadFile(attach.fileName, attach.originalFileName)}\r\n >\r\n {attach.originalFileName}\r\n {' '}\r\n \r\n
\r\n
\r\n\r\n \r\n
\r\n this.downloadFile(attach.fileName, attach.originalFileName)}\r\n >\r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n {workflowDocument.isMultiple === false && workflowDocument.isSelectionGroup ? (\r\n
\r\n
\r\n {this.renderPreviewImage(attach.file, attach.fileName)}\r\n
\r\n
\r\n ) : (\r\n ''\r\n )}\r\n
\r\n
\r\n
\r\n );\r\n });\r\n return attachmentsToRender;\r\n };\r\n\r\n downloadFile = async (fileName: string, origFileName: string) => {\r\n const fileBlob = await this.caseService.GetCaseAttachment(fileName);\r\n FileSaver.saveAs(fileBlob, origFileName);\r\n };\r\n\r\n canUpload = (attachemntType: WorkflowDocumentType): boolean => {\r\n const files = this.state.caseAttachments.filter(\r\n (attach) => attach.attachmentTypeId === attachemntType.documentTypeId\r\n );\r\n\r\n if (!attachemntType.isMultiple && files.length >= 1) {\r\n return false;\r\n }\r\n\r\n return true;\r\n };\r\n\r\n generateReport = async (workflowDocumentType: WorkflowDocumentType, appointment: Appointment | null, appointmentPaymentStatus: PreAppointment | null) => {\r\n if (workflowDocumentType.documentType!.code === AttachmentTypeCode.INVOICE_REPAIR.toString()) {\r\n await this.generateInvoiceReport(workflowDocumentType, appointmentPaymentStatus);\r\n } else {\r\n if (appointment === null) { \r\n return;\r\n }\r\n await this.generateInOutReport(workflowDocumentType, appointment);\r\n }\r\n }\r\n\r\n generateInOutReport = async (workflowDocumentType: WorkflowDocumentType, appointment: Appointment) => {\r\n try {\r\n this.setState({\r\n attachmentTypeList: this.setAttachmentTypeList(workflowDocumentType, true)\r\n });\r\n //Get the In/Out Report\r\n const reportParameters = [\r\n {\r\n name: 'caseId',\r\n value: this.props.caseSettingsState.case!.id.toString()\r\n } as ReportParameter,\r\n {\r\n name: 'appointmentId',\r\n value: appointment.id.toString()\r\n },\r\n {\r\n name: 'organizationId',\r\n value: this.props.appState.appUser!.organization?.id.toString()\r\n } as ReportParameter,\r\n {\r\n name: 'type',\r\n value: workflowDocumentType.documentType!.code!\r\n } as ReportParameter\r\n ];\r\n\r\n const fileBlob = await this.reportsService.GetInOutReport(workflowDocumentType.documentType!.code!, this.props.caseSettingsState.case!.id, appointment.id, reportParameters);\r\n\r\n //Save the IN/OUT Report into attachments\r\n const attachments: CaseAttachment[] = [];\r\n attachments.push({\r\n id: 0,\r\n caseId: this.props.caseSettingsState.case!.id,\r\n attachmentTypeId: workflowDocumentType.documentType!.id,\r\n attachmentType: workflowDocumentType.documentType!,\r\n file: new File([fileBlob], workflowDocumentType.documentType!.displayName! + \"-\" + this.props.workflowForm.appointmentCategoryType!.displayName! + '.pdf', { type: 'application/pdf' }),\r\n isSelection: false,\r\n appointmentId: appointment.id,\r\n includeInOtherTab: true\r\n } as CaseAttachment);\r\n\r\n console.log(attachments);\r\n const newFiles = await this.caseService.AddCaseAttachment(attachments);\r\n\r\n newFiles.forEach((item, index) => {\r\n item.file = attachments[index].file;\r\n });\r\n\r\n const caseAttachments = [...this.state.caseAttachments];\r\n caseAttachments.push(...newFiles);\r\n\r\n this.setState({\r\n caseAttachments: caseAttachments,\r\n attachmentTypeList: this.setAttachmentTypeList(workflowDocumentType, false)\r\n });\r\n\r\n } catch (error) {\r\n console.log('error', error);\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n\r\n generateInvoiceReport = async (workflowDocumentType: WorkflowDocumentType, appointmentPaymentStatus: PreAppointment | null) => {\r\n try {\r\n this.setState({\r\n attachmentTypeList: this.setAttachmentTypeList(workflowDocumentType, true)\r\n });\r\n //Get the invoice Data\r\n const reportParameters = [\r\n {\r\n name: 'caseId',\r\n value: this.props.caseSettingsState.case!.id.toString()\r\n } as ReportParameter,\r\n {\r\n name: 'organizationId',\r\n value: this.props.appState.appUser!.organization?.id.toString()\r\n } as ReportParameter\r\n ];\r\n\r\n if (appointmentPaymentStatus && appointmentPaymentStatus?.payment?.status === AppointmentPaymentStatus.COMPLETED.toString()) {\r\n reportParameters.push({\r\n name: 'paymentAmount',\r\n value: appointmentPaymentStatus?.payment.amount?.toString()\r\n } as ReportParameter);\r\n }\r\n\r\n const fileBlob = await this.reportsService.GetInvoiceReport(workflowDocumentType.documentType!.code!, this.props.caseSettingsState.case!.id, reportParameters);\r\n\r\n //Save the IN/OUT Report into attachments\r\n const attachments: CaseAttachment[] = [];\r\n attachments.push({\r\n id: 0,\r\n caseId: this.props.caseSettingsState.case!.id,\r\n attachmentTypeId: workflowDocumentType.documentType!.id,\r\n attachmentType: workflowDocumentType.documentType!,\r\n file: new File([fileBlob], workflowDocumentType.documentType!.displayName! + '.pdf', { type: 'application/pdf' }),\r\n isSelection: false,\r\n includeInOtherTab: true\r\n } as CaseAttachment);\r\n\r\n console.log(attachments);\r\n const newFiles = await this.caseService.AddCaseAttachment(attachments);\r\n\r\n newFiles.forEach((item, index) => {\r\n item.file = attachments[index].file;\r\n });\r\n\r\n const caseAttachments = [...this.state.caseAttachments];\r\n caseAttachments.push(...newFiles);\r\n\r\n this.setState({\r\n caseAttachments: caseAttachments,\r\n attachmentTypeList: this.setAttachmentTypeList(workflowDocumentType, false)\r\n });\r\n\r\n } catch (error) {\r\n console.log('error', error);\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n\r\n renderWorkflowAttashmentTypes = () => {\r\n const attachmentTypes = [] as any[];\r\n const attachmentTypeList = this.state.attachmentTypeList;\r\n if (attachmentTypeList.length !== 0) {\r\n attachmentTypeList.forEach((attach, index) => {\r\n attach.fileInputKey = Date.now();\r\n attachmentTypes.push(\r\n
\r\n \r\n
\r\n
\r\n {attach.isSelectionGroup ? 'Renew: ' : ''}\r\n \r\n {attach.documentType!.displayName}\r\n {attach.isMultiple ? (\r\n item.attachmentTypeId === attach.documentTypeId\r\n ).length === 0\r\n }\r\n onClick={(e) => {\r\n this.downloadBasedOnAttachmentType(attach);\r\n }}\r\n >\r\n \r\n \r\n ) : (\r\n ''\r\n )}\r\n \r\n
\r\n
\r\n\r\n \r\n
\r\n \r\n
\r\n {!attach.isLoading ? (\r\n
\r\n {this.state.caseAttachments.filter(\r\n (item) => item.attachmentTypeId === attach.documentTypeId\r\n ).length !== 0 ? (\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
{this.renderAttachments(attach)}
\r\n
\r\n ) : (\r\n
\r\n \r\n
\r\n )}\r\n
\r\n ) : (\r\n ''\r\n )}\r\n
\r\n \r\n {(attach.documentType!.code === AttachmentTypeCode.WORK_ORDER.toString() || \r\n attach.documentType!.code === AttachmentTypeCode.HAND_OVER.toString() || \r\n attach.documentType!.code === AttachmentTypeCode.INVOICE_REPAIR.toString()\r\n )\r\n ? ( \r\n this.state.caseAttachments.filter(\r\n (item) => item.attachmentTypeId === attach.documentTypeId\r\n ).length === 0 ? (\r\n \r\n this.generateReport(attach, this.state.appointment, this.state.appointmentPaymentStatus)}\r\n >\r\n {attach.documentType!.code === AttachmentTypeCode.INVOICE_REPAIR.toString() ? this.translatorService.Tranlate('INVOICE_REPAIR_GENERATION_LABEL', 'Genereaza factura') : this.translatorService.Tranlate('IN_OUT_REPORT_GENERATION_LABEL', 'Genereaza raport') }\r\n \r\n \r\n ) : null\r\n ) : (\r\n \r\n \r\n {\r\n return this.handleUploadAttachment(e, attach);\r\n }}\r\n type=\"file\"\r\n multiple={attach.isMultiple}\r\n />\r\n \r\n {this.translatorService.Tranlate(\r\n 'CASE_TAB_DOCUMENTS_FORM_UPLOAD',\r\n 'Upload'\r\n )}\r\n \r\n \r\n \r\n this.setCameraDetails(attach)}\r\n aria-label=\"photo\"\r\n color=\"primary\"\r\n size=\"medium\"\r\n className=\"p-0\"\r\n >\r\n \r\n \r\n \r\n \r\n )}\r\n \r\n
\r\n
\r\n );\r\n });\r\n }\r\n return attachmentTypes;\r\n };\r\n\r\n downloadAll = async () => {\r\n const fileBlob = await this.caseService.GetCaseAttachmentsArchive(\r\n this.props.caseSettingsState.case!.id,\r\n null,\r\n this.state.attachmentTypeList.map((item) => item.documentType!.code!)\r\n );\r\n FileSaver.saveAs(\r\n fileBlob,\r\n this.props.caseSettingsState.case!.id + '_' + this.props.workflowForm.displayName + '.zip'\r\n );\r\n };\r\n\r\n downloadBasedOnAttachmentType = async (item: WorkflowDocumentType) => {\r\n this.setState({\r\n attachmentTypeList: this.setAttachmentTypeList(item, true)\r\n });\r\n const fileBlob = await this.caseService.GetCaseAttachmentsArchive(\r\n this.props.caseSettingsState.case!.id,\r\n null,\r\n [item.documentType!.code!]\r\n );\r\n this.setState({\r\n attachmentTypeList: this.setAttachmentTypeList(item, false)\r\n });\r\n FileSaver.saveAs(\r\n fileBlob,\r\n this.props.caseSettingsState.case!.id + '_' + item.documentType!.displayName + '.zip'\r\n );\r\n };\r\n\r\n handleConfirmChanges = async () => {\r\n try {\r\n let error = false;\r\n this.state.attachmentTypeList.forEach((item) => {\r\n if (\r\n (item.isMandatory as unknown as boolean) === true &&\r\n this.state.caseAttachments.filter(\r\n (attach) => attach.attachmentTypeId === item.documentTypeId\r\n ).length === 0\r\n ) {\r\n this.props.enqueueSnackbar(\r\n item.documentType!.displayName +\r\n ' ' +\r\n this.translatorService.Tranlate(\r\n 'CASE_DOCUMENTS_FORM_IS_MANDATORY',\r\n 'este obligatoriu de adaugat!'\r\n ),\r\n { variant: 'error' }\r\n );\r\n error = true;\r\n }\r\n return;\r\n });\r\n\r\n this.setState({ executing: true });\r\n if (error === false) {\r\n\r\n\r\n if (this.props.workflowForm.form.hasActions) {\r\n await this.submitForm(\r\n this.props.caseSettingsState.case!.id,\r\n this.props.workflowForm.id,\r\n null\r\n );\r\n }\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n }\r\n } catch (ex) {\r\n this.props.enqueueSnackbar(\r\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\r\n // @ts-ignore\r\n this.translatorService.Tranlate(ex.response.data, 'Eroare incarcare documente!'),\r\n { variant: 'error' }\r\n );\r\n } finally {\r\n this.setState({ executing: false });\r\n }\r\n };\r\n\r\n carfixAttachmentNotification = async (attachmentType: IReferential | null, attachmentId: number) => {\r\n try {\r\n const request = {\r\n caseId: this.props.caseSettingsState.case!.id,\r\n workflowId: this.props.caseSettingsState.caseSettings!.workflow.id,\r\n attachmentId: attachmentId,\r\n attachmentTypeCode: attachmentType!.code!\r\n } as CarfixAttachmentNotificationRequest;\r\n const result = await this.caseService.CarfixAttachmentNotification(request) as CarfixAttachmentNotificationResponse;\r\n if (!result.success) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate(result.code, result.message), {\r\n variant: 'error'\r\n });\r\n return true;\r\n }\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n return true;\r\n }\r\n };\r\n\r\n submitForm = async (caseId: number, caseSectionStepFormId: number, appUser: AppUser | null) => {\r\n if (this.props.caseSettingsState.caseSettings!.workflow.isCarfixIntegration) {\r\n const attachment = this.state.caseAttachments.length > 0 ? this.state.caseAttachments[0] : null;\r\n if (attachment === null) {\r\n return;\r\n }\r\n const attachmentType = this.state.attachmentTypeList.find(\r\n (item) => item.documentTypeId === attachment.attachmentTypeId\r\n );\r\n const hasError = await this.carfixAttachmentNotification(attachmentType!.documentType, attachment.id);\r\n if (hasError) {\r\n return;\r\n }\r\n }\r\n\r\n let newStatus = await this.caseService.SubmitForm(caseId, caseSectionStepFormId, appUser);\r\n\r\n if (newStatus === null) {\r\n newStatus = this.props.caseSettingsState.case!.caseStatus;\r\n }\r\n this.props.SetCaseStatus(newStatus);\r\n if (appUser !== null) {\r\n this.props.AddPartner(appUser!.hoId === null ? appUser!.organizationId : appUser!.hoId);\r\n }\r\n\r\n const hasRights = FormHelpers.HasRights(\r\n this.props.workflowForm.workflowFormPermissions,\r\n this.props.appState.appUser!,\r\n newStatus.caseStatusId\r\n );\r\n this.setState({ hasRights: hasRights });\r\n };\r\n\r\n closeDialog = async () => {\r\n this.setState({\r\n isDialogOpen: false\r\n });\r\n };\r\n\r\n closeCameraDialog = async () => {\r\n this.setState({\r\n isCameraDialogOpen: false,\r\n isSelection: false\r\n });\r\n };\r\n\r\n handleTakePhoto = async (dataUri: any) => {\r\n const arr = dataUri.split(','),\r\n mime = arr[0].match(/:(.*?);/)[1],\r\n bstr = atob(arr[1]),\r\n n = bstr.length,\r\n u8arr = new Uint8Array(n);\r\n\r\n let i = n;\r\n\r\n while (i--) {\r\n u8arr[i] = bstr.charCodeAt(i);\r\n }\r\n\r\n const files = [\r\n new File([u8arr], 'captured_image_' + Math.random().toString(36).slice(2) + '.png', {\r\n type: mime\r\n })\r\n ];\r\n this.handleUploadAttachmentFromCamera(files, this.state.attachmentTypeClicked);\r\n };\r\n\r\n public hasIntegrationDocuments = () => {\r\n return this.state.attachmentTypeList.some((item) => item.documentType!.code === AttachmentTypeCode.INVOICE_REPAIR.toString() || item.documentType!.code === AttachmentTypeCode.HAND_OVER.toString() || item.documentType!.code === AttachmentTypeCode.WORK_ORDER.toString());\r\n }\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.reportsService = (this.context as AppContext).reportsService;\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n
\r\n {this.state.showUploadMessage ? (\r\n
\r\n
\r\n \r\n {this.translatorService.Tranlate(\r\n 'PHOTO_LIMIT_MESSAGE',\r\n 'Conditiile pentru 1 upload sunt urmatoarele : Numar Total Poze ≤ 80 si Dimensiune Totala ≤ 500MB .'\r\n )}\r\n \r\n
\r\n
\r\n ) : (\r\n ''\r\n )}\r\n
{this.renderWorkflowAttashmentTypes()}
\r\n
\r\n
\r\n

\r\n {this.state.hideButton ? null : (\r\n \r\n {this.props.caseSettingsState?.caseSettings!.workflow?.isCarfixIntegration && this.hasIntegrationDocuments() ? \r\n this.translatorService.Tranlate(\r\n 'TAB_DOCUMENTS_SEND_TO_CLIENT',\r\n 'Trimite la client'\r\n ) \r\n : this.translatorService.Tranlate('SAVE', 'Salveaza')}\r\n \r\n )\r\n }\r\n\r\n
\r\n ) : null}\r\n\r\n \r\n \r\n \r\n \r\n \r\n {this.translatorService.Tranlate('CASE_PREVIEW_DOC', 'Previzualizare document')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.renderPreviewAttachment()}\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n {`${this.translatorService.Tranlate(\r\n 'DOCUMENT_DELETE_CONFIRMATION_MESSAGE',\r\n 'Sunteti sigur ca doriti sa stergeti documentul?'\r\n )} `}\r\n \r\n \r\n \r\n {\r\n const selectedAttachment = this.state.selectedAttachment;\r\n this.handleDeleteAttachment(\r\n selectedAttachment.id,\r\n selectedAttachment.fileName,\r\n selectedAttachment.fileInputKey\r\n );\r\n }}\r\n >\r\n {this.translatorService.Tranlate('VEHICLE_SEARCH_FORM_VEHICLE_YES', 'Da')}\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n {this.translatorService.Tranlate('CASE_DATA_TAKE_PHOTO_TITLE', 'Fotografiaza')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n this.handleTakePhoto(dataUri);\r\n }}\r\n onTakePhotoAnimationDone={(dataUri: any) => {\r\n this.closeCameraDialog();\r\n }}\r\n mirrored={true}\r\n />\r\n \r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalCaseDetailsCaseTabDocumentsFormProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app\r\n }),\r\n CaseSettingsActionCreators,\r\n mergeProps\r\n)(withSnackbar(CaseDetailsCaseTabDocumentsForm as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n ApplicationState,\r\n CaseSettingsState,\r\n AppState,\r\n CaseSettingsActionCreators\r\n} from '../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport {\r\n IconButton,\r\n GridList,\r\n GridListTile,\r\n GridListTileBar,\r\n Button,\r\n Grid,\r\n Dialog,\r\n DialogTitle,\r\n Typography,\r\n DialogContent\r\n} from '@material-ui/core';\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { isNullOrUndefined } from 'util';\r\nimport { CaseAttachment } from '../../interfaces/Case';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport { IReferentialService } from '../../services/Interfaces/IReferentialService';\r\nimport Referentials from '../../helpers/Referentials.json';\r\nimport { ReferentialCode, AttachmentTypeCode } from '../../helpers/Constants';\r\nimport DeleteOutlineTwoToneIcon from '@material-ui/icons/DeleteOutlineTwoTone';\r\nimport { DropzoneArea } from 'material-ui-dropzone';\r\nimport FileSaver from 'file-saver';\r\nimport Carousel, { Modal, ModalGateway } from 'react-images';\r\nimport GetAppIcon from '@material-ui/icons/GetApp';\r\nimport { WorkflowSectionStepForm } from '../../interfaces/Workflow';\r\nimport { FormHelpers } from '../../helpers/forms/FormHelpers';\r\nimport { AppUser } from '../../interfaces/AppUser';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport PhotoCameraOutlinedIcon from '@material-ui/icons/PhotoCameraOutlined';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\r\n// @ts-ignore\r\nimport Camera from 'react-html5-camera-photo';\r\nimport 'react-html5-camera-photo/build/css/index.css';\r\n\r\ninterface ICaseDetailsCaseTabCarPhotosFormState {\r\n caseCarPhotos: CaseAttachment[];\r\n imgType: IReferential;\r\n isLoading: boolean;\r\n isUploading: boolean;\r\n currentImage: number;\r\n viewerIsOpen: boolean;\r\n hasRights: boolean;\r\n executing: boolean;\r\n isDialogOpen: boolean;\r\n}\r\n\r\nexport interface ExternalCaseDetailsCaseTabCarPhotosFormProps {\r\n workflowForm: WorkflowSectionStepForm;\r\n}\r\n\r\ntype ICaseDetailsCaseTabCarPhotosFormProps = ExternalCaseDetailsCaseTabCarPhotosFormProps & {\r\n caseSettingsState: CaseSettingsState;\r\n appState: AppState;\r\n} & typeof CaseSettingsActionCreators &\r\n ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass CaseDetailsCaseTabCarPhotosForm extends React.PureComponent<\r\n ICaseDetailsCaseTabCarPhotosFormProps,\r\n ICaseDetailsCaseTabCarPhotosFormState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private caseService!: ICaseService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n state = {\r\n caseCarPhotos: [],\r\n attachmentTypeList: [],\r\n imgType: {} as IReferential,\r\n isLoading: false,\r\n currentImage: 0,\r\n viewerIsOpen: false,\r\n hasRights: false,\r\n executing: false,\r\n isDialogOpen: false,\r\n isUploading: false\r\n } as ICaseDetailsCaseTabCarPhotosFormState;\r\n\r\n public componentDidMount() {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (isNullOrUndefined(caseSettings) || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadCaseDocumentsForm();\r\n }\r\n );\r\n }\r\n\r\n loadCaseDocumentsForm = async () => {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n\r\n if (isNullOrUndefined(caseSettings) || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n\r\n const ref = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.AttachmentType\r\n );\r\n\r\n const [caseCarPhotos, attachmentTypes] = await Promise.all([\r\n this.caseService.GetCaseAttachments(caseId, [AttachmentTypeCode.IMG]),\r\n this.appReferentialService.Get(ref!.baseUrl)\r\n ]);\r\n\r\n const photosProm = [] as any[];\r\n caseCarPhotos.forEach((element) => {\r\n photosProm.push(this.caseService.GetCaseAttachment(element.fileName));\r\n });\r\n\r\n const photos = await Promise.all([...photosProm]);\r\n\r\n caseCarPhotos.forEach((elem, index) => {\r\n elem.file = photos[index];\r\n });\r\n const hasRights = FormHelpers.HasRights(\r\n this.props.workflowForm.workflowFormPermissions,\r\n this.props.appState.appUser!,\r\n this.props.caseSettingsState.case!.caseStatus.caseStatusId\r\n );\r\n\r\n this.setState({\r\n caseCarPhotos: caseCarPhotos.sort(function (a: any, b: any) {\r\n return b.uploadDate - a.uploadDate;\r\n }),\r\n imgType: attachmentTypes.find((item) => item.code === AttachmentTypeCode.IMG)!,\r\n isLoading: false,\r\n hasRights: hasRights\r\n });\r\n };\r\n\r\n handleUploadAttachment = async (files: File[]) => {\r\n try {\r\n if (files.length === 0) {\r\n return;\r\n }\r\n this.setState({ isUploading: true });\r\n\r\n const attachments: CaseAttachment[] = [];\r\n files.forEach((file) => {\r\n attachments.push({\r\n id: 0,\r\n caseId: this.props.caseSettingsState.case!.id,\r\n attachmentTypeId: this.state.imgType.id,\r\n attachmentType: this.state.imgType,\r\n file: file,\r\n isSelection: false\r\n } as CaseAttachment);\r\n });\r\n\r\n const newFiles = await this.caseService.AddCaseAttachment(attachments);\r\n const caseCarPhotos = [...this.state.caseCarPhotos];\r\n\r\n for (const item of newFiles) {\r\n item.file = (await this.caseService.GetCaseAttachment(item.fileName)) as File;\r\n }\r\n\r\n caseCarPhotos.push(...newFiles);\r\n\r\n this.setState({\r\n caseCarPhotos: caseCarPhotos,\r\n isUploading: false\r\n });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n downloadFile = async (file: File, origFileName: string) => {\r\n FileSaver.saveAs(file, origFileName);\r\n };\r\n\r\n handleDeleteAttachment = async (id: number, fileName: string) => {\r\n try {\r\n await this.caseService.RemoveCaseAttachment(fileName);\r\n\r\n const caseAttachments = [...this.state.caseCarPhotos];\r\n const index = caseAttachments.findIndex((item) => item.id === id);\r\n caseAttachments.splice(index, 1);\r\n\r\n this.setState({\r\n caseCarPhotos: caseAttachments\r\n });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n handleConfirmChanges = async () => {\r\n try {\r\n if (this.state.caseCarPhotos.length === 0) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'CASE_CAR_PHOTOS_FORM_AT_LEAST_ONE_PICTURE_ERROR',\r\n 'Trebuie sa incarcati cel putin o poza!'\r\n ),\r\n { variant: 'error' }\r\n );\r\n return;\r\n }\r\n\r\n this.setState({ executing: true });\r\n\r\n await this.submitForm(\r\n this.props.caseSettingsState.case!.id,\r\n this.props.workflowForm.id,\r\n null\r\n );\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (ex) {\r\n this.props.enqueueSnackbar(\r\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\r\n // @ts-ignore\r\n this.translatorService.Tranlate(ex.response.data, 'Eroare incarcare poze!'),\r\n { variant: 'error' }\r\n );\r\n } finally {\r\n this.setState({ executing: false });\r\n }\r\n };\r\n\r\n submitForm = async (caseId: number, caseSectionStepFormId: number, appUser: AppUser | null) => {\r\n let newStatus = await this.caseService.SubmitForm(caseId, caseSectionStepFormId, appUser);\r\n\r\n if (newStatus === null) {\r\n newStatus = this.props.caseSettingsState.case!.caseStatus;\r\n }\r\n this.props.SetCaseStatus(newStatus);\r\n if (appUser !== null) {\r\n this.props.AddPartner(appUser!.hoId === null ? appUser!.organizationId : appUser!.hoId);\r\n }\r\n\r\n const hasRights = FormHelpers.HasRights(\r\n this.props.workflowForm.workflowFormPermissions,\r\n this.props.appState.appUser!,\r\n newStatus.caseStatusId\r\n );\r\n this.setState({ hasRights: hasRights });\r\n };\r\n\r\n openLightbox = (index: number) => {\r\n this.setState({ currentImage: index, viewerIsOpen: true });\r\n };\r\n\r\n closeLightbox = () => {\r\n this.setState({ currentImage: 0, viewerIsOpen: false });\r\n };\r\n\r\n downloadAll = async () => {\r\n const fileBlob = await this.caseService.GetCaseAttachmentsArchive(\r\n this.props.caseSettingsState.case!.id,\r\n null,\r\n [AttachmentTypeCode.IMG]\r\n );\r\n FileSaver.saveAs(\r\n fileBlob,\r\n this.props.caseSettingsState.case!.id + '_' + this.props.workflowForm.displayName + '.zip'\r\n );\r\n };\r\n\r\n handleTakePhoto = async (dataUri: any) => {\r\n const arr = dataUri.split(','),\r\n mime = arr[0].match(/:(.*?);/)[1],\r\n bstr = atob(arr[1]),\r\n n = bstr.length,\r\n u8arr = new Uint8Array(n);\r\n\r\n let i = n;\r\n\r\n while (i--) {\r\n u8arr[i] = bstr.charCodeAt(i);\r\n }\r\n\r\n const files = [\r\n new File([u8arr], 'captured_image_' + Math.random().toString(36).slice(2) + '.png', {\r\n type: mime\r\n })\r\n ];\r\n this.handleUploadAttachment(files);\r\n };\r\n\r\n closeDialog = async () => {\r\n this.setState({\r\n isDialogOpen: false\r\n });\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n
\r\n {this.state.hasRights ? (\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n {!this.state.isUploading ? (\r\n this.handleUploadAttachment(files)}\r\n previewText=\"\"\r\n showAlerts={true}\r\n acceptedFiles={['image/*']}\r\n />\r\n ) : null}\r\n
\r\n \r\n this.setState({ isDialogOpen: true })}\r\n style={{ borderRadius: '10px', cursor: 'pointer', borderStyle: 'dashed' }}\r\n className=\"h-100 border-2\"\r\n >\r\n \r\n {this.translatorService.Tranlate(\r\n 'CASE_DATA_TAKE_PHOTO_TITLE',\r\n 'Fotografiaza'\r\n )}\r\n

\r\n \r\n \r\n \r\n
\r\n \r\n \r\n
\r\n ) : (\r\n ''\r\n )}\r\n
\r\n \r\n {this.state.caseCarPhotos.map((item: CaseAttachment, index: number) => (\r\n \r\n
\r\n this.openLightbox(index)}\r\n />\r\n \r\n this.downloadFile(item.file, item.originalFileName)}\r\n >\r\n \r\n \r\n this.handleDeleteAttachment(item.id, item.fileName)}\r\n hidden={!this.state.hasRights}\r\n >\r\n \r\n \r\n
\r\n }\r\n />\r\n
\r\n \r\n ))}\r\n \r\n \r\n {this.state.viewerIsOpen ? (\r\n \r\n ({\r\n ...x,\r\n source: URL.createObjectURL(x.file)\r\n }))}\r\n />\r\n \r\n ) : null}\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n {this.translatorService.Tranlate('CASE_CAR_PHOTOS_FORM_CONFIRM_BUTTON', 'Confirma')}\r\n \r\n
\r\n
\r\n ) : null}\r\n \r\n \r\n \r\n \r\n \r\n {this.translatorService.Tranlate('CASE_DATA_TAKE_PHOTO_TITLE', 'Fotografiaza')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n this.handleTakePhoto(dataUri);\r\n }}\r\n onTakePhotoAnimationDone={(dataUri: any) => {\r\n this.closeDialog();\r\n }}\r\n mirrored={true}\r\n />\r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalCaseDetailsCaseTabCarPhotosFormProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app\r\n }),\r\n CaseSettingsActionCreators,\r\n mergeProps\r\n)(withSnackbar(CaseDetailsCaseTabCarPhotosForm as any));\r\n","import { CaseCalculationPart } from '../interfaces/Case';\r\nimport { IReferential } from './IReferential';\r\nimport { CalculationSectionCodeEnum } from '../helpers/Constants';\r\n\r\nexport class CalculationParts {\r\n private _parts: CaseCalculationPart[];\r\n private _sections: IReferential[];\r\n private _vat: number;\r\n private _ignoreAlternativePart: boolean;\r\n private _smallPartPercentage: number;\r\n\r\n public constructor(\r\n sections: IReferential[],\r\n parts: CaseCalculationPart[],\r\n vat: number,\r\n smallPartsPercent: number,\r\n ignoreAlternativePart = true\r\n ) {\r\n this._sections = sections;\r\n this._parts = parts;\r\n this._vat = vat / 100;\r\n this._smallPartPercentage = smallPartsPercent;\r\n this._ignoreAlternativePart = ignoreAlternativePart;\r\n }\r\n\r\n public get SmallPartPercentage(): number {\r\n return this._smallPartPercentage;\r\n }\r\n\r\n public GetSmallPartsValue(): number {\r\n return this.GetAmountSalePartWithDiscount(CalculationSectionCodeEnum.PART) * (this._smallPartPercentage / 100);\r\n }\r\n\r\n private GetPrice(part: CaseCalculationPart): number {\r\n return part.alternativePartQualityId === null || this._ignoreAlternativePart\r\n ? part.originalPrice\r\n : part.alternativePrice ?? 0;\r\n }\r\n\r\n private GetDiscount(part: CaseCalculationPart): number {\r\n const discount =\r\n part.alternativePartQualityId === null || this._ignoreAlternativePart\r\n ? part.discount\r\n : part.alternativePartDiscount;\r\n const addition = part.additionInsurer !== null ? part.additionInsurer : 0;\r\n\r\n return discount !== null ? (discount - addition) / 100 : (0 - addition) / 100;\r\n }\r\n\r\n private GetInsurerAddition(part: CaseCalculationPart): number {\r\n return part.additionInsurer !== null ? part.additionInsurer / 100 : 0;\r\n }\r\n\r\n public GetAmountPart(section: string): number {\r\n const partsSectionId: number = this._sections.find(\r\n (item) => item.isActive && item.code === section\r\n )!.id;\r\n return this._parts\r\n .filter((item) => item.calculationSectionId === partsSectionId)\r\n .reduce((sum, item) => sum + item.pieceNr * this.GetPrice(item), 0);\r\n }\r\n\r\n public GetAmountPieceTotal(): number {\r\n return this.GetAmountPart(CalculationSectionCodeEnum.PART);\r\n }\r\n\r\n public GetAmountPartWithDiscount(section: string): number {\r\n const partsSectionId: number = this._sections.find(\r\n (item) => item.isActive && item.code === section\r\n )!.id;\r\n const smallPartValue: number =\r\n section === CalculationSectionCodeEnum.PART ? this.GetSmallPartsValue() : 0;\r\n\r\n return (\r\n smallPartValue +\r\n this._parts\r\n .filter((item) => item.calculationSectionId === partsSectionId)\r\n .reduce(\r\n (sum, item) => sum + item.pieceNr * this.GetPrice(item) * (1 - this.GetDiscount(item)),\r\n 0\r\n )\r\n );\r\n }\r\n\r\n public GetAmountSalePartWithDiscount(section: string): number {\r\n const partsSectionId: number = this._sections.find(\r\n (item) => item.isActive && item.code === section\r\n )!.id;\r\n return (\r\n this._parts\r\n .filter((item) => item.calculationSectionId === partsSectionId)\r\n .reduce(\r\n (sum, item) => sum + item.pieceNr * this.GetPrice(item) * (1 - this.GetDiscount(item)),\r\n 0\r\n )\r\n );\r\n }\r\n\r\n public TotalDiscount(): number {\r\n return this._parts.reduce(\r\n (sum, item) => sum + item.pieceNr * this.GetPrice(item) * this.GetDiscount(item),\r\n 0\r\n );\r\n }\r\n\r\n public GetTotalInsurerAddition(section: string): number {\r\n const partsSectionId: number = this._sections.find(\r\n (item) => item.isActive && item.code === section\r\n )!.id;\r\n\r\n return (\r\n this._parts\r\n .filter((item) => item.calculationSectionId === partsSectionId)\r\n .reduce(\r\n (sum, item) => sum + item.pieceNr * this.GetPrice(item) * this.GetInsurerAddition(item),\r\n 0\r\n )\r\n );\r\n }\r\n\r\n public TotalWithoutVAT(): number {\r\n const totalParts: number = this._parts.reduce(\r\n (sum, item) => sum + item.pieceNr * this.GetPrice(item),\r\n 0\r\n );\r\n\r\n const smallPartsValue: number = this.GetSmallPartsValue();\r\n const discount: number = this.TotalDiscount();\r\n\r\n return totalParts - discount + smallPartsValue;\r\n }\r\n\r\n public TotalVAT(): number {\r\n return this.TotalWithoutVAT() * this._vat;\r\n }\r\n\r\n public Total(): number {\r\n const totalWithoutVAT: number = this.TotalWithoutVAT();\r\n return totalWithoutVAT + totalWithoutVAT * this._vat;\r\n }\r\n\r\n private GetDiscountPercent(part: CaseCalculationPart): number {\r\n const discount =\r\n part.alternativePartQualityId === null || this._ignoreAlternativePart\r\n ? part.discount\r\n : part.alternativePartDiscount;\r\n\r\n return discount !== null ? discount / 100 : 0;\r\n }\r\n\r\n public GetTotalPartsDiscount(section: string): number {\r\n const partsSectionId: number = this._sections.find(\r\n (item) => item.isActive && item.code === section\r\n )!.id;\r\n\r\n return (\r\n this._parts\r\n .filter((item) => item.calculationSectionId === partsSectionId)\r\n .reduce(\r\n (sum, item) => sum + item.pieceNr * this.GetPrice(item) * this.GetDiscountPercent(item),\r\n 0\r\n )\r\n );\r\n }\r\n \r\n}\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, CaseSettingsState, AppState, VehicleState } from '../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport {\r\n Tooltip,\r\n CardContent,\r\n Card,\r\n Button,\r\n IconButton,\r\n Grid,\r\n Dialog,\r\n DialogTitle,\r\n Typography,\r\n DialogContent,\r\n TextField,\r\n Input,\r\n FormControlLabel\r\n} from '@material-ui/core';\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { CaseCalculationHistory, CaseCalculationPart } from '../../interfaces/Case';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport { IReferentialService } from '../../services/Interfaces/IReferentialService';\r\nimport Referentials from '../../helpers/Referentials.json';\r\nimport {\r\n ReferentialCode,\r\n ParametreCode,\r\n InsuredTypeCode,\r\n CalculationSectionCodeEnum,\r\n CalculationTypeCode,\r\n OwnStockCodeEnum\r\n} from '../../helpers/Constants';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport MUIDataTable, {\r\n MUIDataTableColumnOptions,\r\n SelectableRows,\r\n MUIDataTableMeta\r\n} from 'mui-datatables';\r\nimport moment from 'moment';\r\nimport { MUITranslations } from '../../helpers/MUITableTranslations';\r\nimport AddCircleTwoToneIcon from '@material-ui/icons/AddCircleTwoTone';\r\nimport CloudDownloadTwoToneIcon from '@material-ui/icons/CloudDownloadTwoTone';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport NumberFormat from 'react-number-format';\r\nimport { Organization } from '../../interfaces/Organization';\r\nimport { IOrganizationService } from '../../services/Interfaces/IOrganizationService';\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport DeleteOutlineTwoToneIcon from '@material-ui/icons/DeleteOutlineTwoTone';\r\nimport { IAppUserService } from '../../services/Interfaces/IAppUserService';\r\nimport { WorkflowCalculation, WorkflowSectionStepForm } from '../../interfaces/Workflow';\r\nimport * as XLSX from 'xlsx';\r\nimport { ImportCalculationOriginalPartsFileHeader } from '../../helpers/Constants';\r\nimport { VehicleHelper } from '../../helpers/VehicleHelper';\r\nimport * as R from 'ramda';\r\nimport { CalculationParts } from '../../interfaces/CalculationParts';\r\nimport { isNullOrUndefined } from 'util';\r\nimport _ from 'lodash';\r\nimport { Utils } from '../../helpers/Utils';\r\nimport { IWorkflowService } from '../../services/Interfaces/IWorkflowService';\r\n\r\nexport interface ExternalCaseDetailsCaseTabCalculationDetailsProps {\r\n calculationHistoryId: number;\r\n handleModifiedPropChanges: (modified: boolean) => void;\r\n onSave: () => void;\r\n stepFormId: number;\r\n hasRights: boolean;\r\n}\r\n\r\ninterface ICaseDetailsCaseTabCalculationDetailsState {\r\n caseCalculationHistoryDetails: CaseCalculationHistory;\r\n calculationSectionList: IReferential[];\r\n calculationParts: CaseCalculationPart[];\r\n newCalculationPart: CaseCalculationPart | null;\r\n newCalculationPartId: number | null;\r\n partQualityTypes: IReferential[];\r\n supplierList: Organization[];\r\n isDialogOpen: boolean;\r\n isLoading: boolean;\r\n currentSection: IReferential | null;\r\n TVA: string;\r\n modified: boolean;\r\n workflowCalculation: WorkflowCalculation | undefined;\r\n solutionValues: IReferential[];\r\n costCenter: IReferential | null;\r\n deliveryAdress: Organization | null;\r\n maintenancePackage: IReferential | null;\r\n}\r\n\r\ntype ICaseDetailsCaseTabCalculationDetailsProps =\r\n ExternalCaseDetailsCaseTabCalculationDetailsProps & {\r\n caseSettingsState: CaseSettingsState;\r\n appState: AppState;\r\n vehicleState: VehicleState;\r\n } & ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass CaseDetailsCaseTabCalculationDetails extends React.PureComponent<\r\n ICaseDetailsCaseTabCalculationDetailsProps,\r\n ICaseDetailsCaseTabCalculationDetailsState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private caseService!: ICaseService;\r\n private appReferentialService!: IReferentialService;\r\n private appuserService!: IAppUserService;\r\n private organizationService!: IOrganizationService;\r\n private workflowService!: IWorkflowService;\r\n\r\n static contextType = ApplicationContext;\r\n state = {\r\n caseCalculationHistoryDetails: {} as CaseCalculationHistory,\r\n calculationSectionList: [],\r\n calculationParts: [],\r\n newCalculationPart: null,\r\n newCalculationPartId: null,\r\n partQualityTypes: [],\r\n supplierList: [],\r\n isDialogOpen: false,\r\n isLoading: true,\r\n currentSection: null,\r\n TVA: '',\r\n modified: false,\r\n workflowCalculation: undefined,\r\n solutionValues: [],\r\n costCenter: null,\r\n deliveryAdress: null,\r\n maintenancePackage: null\r\n } as ICaseDetailsCaseTabCalculationDetailsState;\r\n\r\n public componentDidMount() {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (caseSettings === null || caseSettings === undefined || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadCalculationDetails();\r\n }\r\n );\r\n }\r\n\r\n loadCalculationDetails = async () => {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (caseSettings === null || caseSettings === undefined || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n const casee = this.props.caseSettingsState.case;\r\n const TVA = this.props.caseSettingsState.case!.caseParameters.find(\r\n (item) => item.parameter!.code === ParametreCode.TVA\r\n )!.value;\r\n\r\n if (casee === null) {\r\n return;\r\n }\r\n\r\n const refQualityPart = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.CarPartCategory\r\n );\r\n const currencyRef = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.Currency\r\n );\r\n const refSolutionValue = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.SolutionValue\r\n );\r\n const maintenancePackageRef = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.MaintenancePackage\r\n );\r\n\r\n const [\r\n currencyLIst,\r\n caseCalculation,\r\n calculationSections,\r\n caseCalculationParts,\r\n partQualityTypes,\r\n solutionValues,\r\n maintenancePackages\r\n ] = await Promise.all([\r\n this.appReferentialService.Get(currencyRef!.baseUrl),\r\n this.caseService.GetCaseCalculationHistoryDetails(this.props.calculationHistoryId),\r\n this.caseService.GetCalculationSections(),\r\n this.caseService.GetCaseCalculationParts(this.props.calculationHistoryId),\r\n this.appReferentialService.Get(refQualityPart!.baseUrl),\r\n this.appReferentialService.Get(refSolutionValue!.baseUrl),\r\n this.appReferentialService.Get(maintenancePackageRef!.baseUrl)\r\n ]);\r\n const workflowSuppliersList =\r\n this.props.caseSettingsState.caseSettings!.workflow.workflowSuppliers;\r\n const suppliers =\r\n workflowSuppliersList.length > 0\r\n ? await this.organizationService.GetUserOrganizationsByIds(\r\n Array.from(new Set(workflowSuppliersList.map((item) => item.supplierId)))\r\n )\r\n : [];\r\n\r\n caseCalculation.currency = currencyLIst.find(\r\n (item) => item.code === caseCalculation.currencyCode\r\n )!;\r\n\r\n const usr = await this.appuserService.GetUserInfo(caseCalculation.userId);\r\n caseCalculation.user = usr;\r\n const form = this.getWorkflowForm(this.props.stepFormId);\r\n\r\n const workflowCalculation = form!.workflowCalculations.find(\r\n (item) =>\r\n item.workflowPartner!.partnerId === this.props.appState.appUser!.hoId &&\r\n (item.userRoleId === this.props.appState.appUser!.roleId || R.isNil(item.userRoleId)) &&\r\n item.caseStatusId === this.props.caseSettingsState.case!.caseStatus.caseStatusId\r\n );\r\n\r\n let costCenter = null;\r\n if (!R.isNil(this.props.caseSettingsState.case!.caseEvent)) {\r\n if (!isNullOrUndefined(this.props.caseSettingsState.case!.caseEvent.organizationId)) {\r\n costCenter = await this.workflowService.GetCostCenter(\r\n this.props.caseSettingsState.case!.caseEvent.organizationId!\r\n );\r\n }\r\n }\r\n\r\n \r\n let partsLocationOrganization = null;\r\n if (!isNullOrUndefined(caseCalculation.partsLocationOrganizationId)) {\r\n partsLocationOrganization = await this.organizationService.GetOrganization(\r\n caseCalculation.partsLocationOrganizationId!\r\n );\r\n }\r\n\r\n let maintenancePackage: IReferential | null = null;\r\n if (!isNullOrUndefined(caseCalculation.maintenancePackageId)) {\r\n maintenancePackage = maintenancePackages.find(\r\n (item) => item.id === caseCalculation.maintenancePackageId\r\n )!;\r\n }\r\n\r\n this.setState({\r\n caseCalculationHistoryDetails: caseCalculation,\r\n calculationSectionList: calculationSections,\r\n calculationParts: caseCalculationParts,\r\n partQualityTypes: partQualityTypes.filter((item) => item.isActive === true),\r\n TVA: TVA,\r\n supplierList: suppliers.filter((ws) => ws.isActive === true),\r\n workflowCalculation: workflowCalculation,\r\n solutionValues: solutionValues,\r\n isLoading: false,\r\n costCenter: costCenter,\r\n deliveryAdress: partsLocationOrganization,\r\n maintenancePackage: maintenancePackage\r\n });\r\n };\r\n\r\n getWorkflowForm = (id: number): WorkflowSectionStepForm | null => {\r\n const sections = this.props.caseSettingsState.caseSettings!.workflow.workflowSections!;\r\n for (const section of sections) {\r\n for (const step of section.workflowSectionSteps) {\r\n const form = step.workflowSectionStepForms.find((form) => form.id === id);\r\n if (!R.isNil(form)) {\r\n return form;\r\n }\r\n }\r\n }\r\n\r\n return null;\r\n };\r\n\r\n displayCalculationPartPrice = (value: number, partId: any) => {\r\n const calculationPartsFiltered = this.state.calculationParts.filter(\r\n (item) => item.calculationSectionId === 1\r\n );\r\n const calculationPart = calculationPartsFiltered.find((item) => item.id === partId);\r\n const price =\r\n calculationPart!.alternativePartQualityId === null\r\n ? value\r\n : calculationPart!.alternativePrice;\r\n return (Math.round(price! * 100) / 100).toFixed(2);\r\n };\r\n\r\n displayCalculationPartDiscount = (value: number, partId: any) => {\r\n const calculationPartsFiltered = this.state.calculationParts.filter(\r\n (item) => item.calculationSectionId === 1\r\n );\r\n const calculationPart = calculationPartsFiltered.find((item) => item.id === partId);\r\n const discount =\r\n calculationPart!.alternativePartQualityId === null\r\n ? R.isNil(value)\r\n ? 0\r\n : value\r\n : R.isNil(calculationPart!.alternativePartDiscount)\r\n ? 0\r\n : calculationPart!.alternativePartDiscount;\r\n return discount;\r\n };\r\n\r\n calculationPartUnitOEPrice = (calculationPart: CaseCalculationPart) => {\r\n if (R.isNil(calculationPart!.discount)) {\r\n return (\r\n Number((\r\n Math.round(calculationPart!.originalPrice * 100) / 100\r\n ).toFixed(2))\r\n );\r\n }\r\n const value = calculationPart!.originalPrice;\r\n const discount = calculationPart!.discount;\r\n \r\n return (\r\n Number((Math.round(value * (1 - discount / 100) * 100) / 100).toFixed(2))\r\n );\r\n };\r\n\r\n calculationPartUnitSalePrice = (calculationPart: CaseCalculationPart) => {\r\n if (calculationPart!.alternativePartQualityId === null) {\r\n if (R.isNil(calculationPart!.discount)) {\r\n return (\r\n Number((\r\n Math.round(calculationPart!.originalPrice * 100) / 100\r\n ).toFixed(2))\r\n );\r\n }\r\n const value = calculationPart!.originalPrice;\r\n const discount = calculationPart!.discount;\r\n return (\r\n Number((Math.round(value * (1 - discount / 100) * 100) / 100).toFixed(2))\r\n );\r\n } else {\r\n if (R.isNil(calculationPart!.alternativePartDiscount)) {\r\n return (\r\n Number((\r\n Math.round(calculationPart!.alternativePrice! * (1 + (calculationPart!.additionInsurer ?? 0) / 100) * 100) / 100\r\n ).toFixed(2))\r\n );\r\n }\r\n const value = calculationPart!.alternativePrice!;\r\n const discount = calculationPart!.alternativePartDiscount - (calculationPart!.additionInsurer ?? 0);\r\n return (\r\n Number((\r\n Math.round(value * (1 - discount / 100) * 100) / 100\r\n ).toFixed(2))\r\n );\r\n }\r\n };\r\n\r\n displayCalculationPartUnitSalePrice = (row: any) => {\r\n const calculationPartsFiltered = this.state.calculationParts.filter(\r\n (item) => item.calculationSectionId === 1\r\n );\r\n const calculationPart = calculationPartsFiltered.find((item) => item.id === row[0]);\r\n if (R.isNil(calculationPart)) {\r\n return 0;\r\n }\r\n \r\n const saleUnitPrice = this.calculationPartUnitSalePrice(calculationPart);\r\n return (saleUnitPrice +\r\n ' ' +\r\n this.state.caseCalculationHistoryDetails.currency!.displayName\r\n );\r\n };\r\n\r\n displayCalculationPartTotalPrice = (row: any) => {\r\n const calculationPartsFiltered = this.state.calculationParts.filter(\r\n (item) => item.calculationSectionId === 1\r\n );\r\n const calculationPart = calculationPartsFiltered.find((item) => item.id === row[0]);\r\n if (R.isNil(calculationPart)) {\r\n return 0;\r\n }\r\n const saleUnitPrice = this.calculationPartUnitSalePrice(calculationPart);\r\n console.log('calculationPart', calculationPart);\r\n console.log('saleUnitPrice', saleUnitPrice, 'pieceNr', calculationPart!.pieceNr, 'total', saleUnitPrice * calculationPart!.pieceNr);\r\n return (\r\n (\r\n Math.round(saleUnitPrice * calculationPart!.pieceNr * 100) / 100\r\n ).toFixed(2) +\r\n ' ' +\r\n this.state.caseCalculationHistoryDetails.currency!.displayName\r\n );\r\n };\r\n\r\n calculationTotalPartsOEPrice = () => {\r\n const calculationPartsFiltered = this.state.calculationParts.filter(\r\n (item) => item.calculationSectionId === 1\r\n );\r\n \r\n const total = calculationPartsFiltered.reduce((sum, calculationPart: CaseCalculationPart) => {\r\n if (R.isNil(calculationPart!.discount)) {\r\n return sum + (\r\n Number((\r\n Math.round(calculationPart!.originalPrice * calculationPart!.pieceNr * 100) / 100\r\n ).toFixed(2))\r\n );\r\n }\r\n const value = calculationPart!.originalPrice * calculationPart!.pieceNr;\r\n const discount = calculationPart!.discount;\r\n\r\n return sum + (\r\n Number((Math.round(value * (1 - discount / 100) * 100) / 100).toFixed(2))\r\n );\r\n }, 0);\r\n \r\n return total;\r\n };\r\n\r\n calculationTotalPartsAMPrice = () => {\r\n return this.state.caseCalculationHistoryDetails.amountPiecesWithDiscount;\r\n };\r\n\r\n displayCalculationTotalPartsEconomy = () => {\r\n const originalTotal = this.calculationTotalPartsOEPrice(); \r\n const alternativeTotal = this.calculationTotalPartsAMPrice(); \r\n console.log('originalTotal', originalTotal, 'alternativeTotal', alternativeTotal, 'percentage', ((originalTotal - alternativeTotal) * 100) / originalTotal);\r\n const percentageEconomy = (((originalTotal - alternativeTotal) * 100) / originalTotal).toFixed(2) + '%';\r\n return percentageEconomy;\r\n };\r\n\r\n displayCalculationPartPLPVProcent = (row: any) => {\r\n const calculationPartsFiltered = this.state.calculationParts.filter(\r\n (item) => item.calculationSectionId === 1\r\n );\r\n const calculationPart = calculationPartsFiltered.find((item) => item.id === row[0]);\r\n if (R.isNil(calculationPart)) {\r\n return 0;\r\n }\r\n\r\n const originalPrice = this.calculationPartUnitOEPrice(calculationPart);\r\n const salePrice = this.calculationPartUnitSalePrice(calculationPart);\r\n console.log('calculationPart', calculationPart);\r\n console.log('originalPrice', originalPrice, 'salePrice', salePrice, 'percentage', ((originalPrice - salePrice) * 100) / originalPrice);\r\n return ((originalPrice - salePrice) * 100) / originalPrice;\r\n };\r\n\r\n\r\n displayCalculationTotalPartsAMPriceBK = () => {\r\n const calculationPartsFiltered = this.state.calculationParts.filter(\r\n (item) => item.calculationSectionId === 1\r\n );\r\n const total = calculationPartsFiltered.reduce((sum, calculationPart: CaseCalculationPart) => {\r\n if (calculationPart!.alternativePartQualityId === null) {\r\n if (R.isNil(calculationPart!.discount)) {\r\n return sum + (\r\n Number((\r\n Math.round(calculationPart!.originalPrice * calculationPart!.pieceNr * 100) / 100\r\n ).toFixed(2))\r\n );\r\n }\r\n const value = calculationPart!.originalPrice * calculationPart!.pieceNr;\r\n const discount = calculationPart!.discount;\r\n return sum + (\r\n Number((Math.round(value * (1 - discount / 100) * 100) / 100).toFixed(2))\r\n );\r\n } else {\r\n if (R.isNil(calculationPart!.alternativePartDiscount)) {\r\n return sum + (\r\n Number((\r\n Math.round(calculationPart!.alternativePrice! * calculationPart!.pieceNr * (1 + (calculationPart!.additionInsurer ?? 0) / 100) * 100) / 100\r\n ).toFixed(2))\r\n );\r\n }\r\n const value = calculationPart!.alternativePrice! * calculationPart!.pieceNr;\r\n const discount = calculationPart!.alternativePartDiscount - (calculationPart!.additionInsurer ?? 0);\r\n return sum + (\r\n Number((\r\n Math.round(value * (1 - discount / 100) * 100) / 100\r\n ).toFixed(2))\r\n );\r\n }\r\n }, 0);\r\n\r\n return total;\r\n };\r\n\r\n displayCalculationPartQuality = (value: IReferential, row: any) => {\r\n const calculationPartsFiltered = this.state.calculationParts.filter(\r\n (item) => item.calculationSectionId === 1\r\n );\r\n const calculationPart = calculationPartsFiltered.find((item) => item.id === row[0]);\r\n if (calculationPart!.alternativePartQualityId === null) {\r\n return (\r\n \r\n
\r\n {this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_PRODUCER_HEADER',\r\n 'Producator'\r\n ) +\r\n ': ' +\r\n (R.isNil(row[6]) ? '' : row[6])}\r\n
\r\n
\r\n {this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_DELIVERY_TIME_HEADER',\r\n 'Timp livrare'\r\n ) +\r\n ': ' +\r\n (R.isNil(row[7]) ? '' : row[7])}\r\n
\r\n
\r\n }\r\n >\r\n
\r\n {value.displayName + ' '}\r\n \r\n
\r\n \r\n );\r\n } else {\r\n const partQualityType = this.state.partQualityTypes.find(\r\n (quality) => quality.id === calculationPart!.alternativePartQualityId\r\n );\r\n return (\r\n \r\n
\r\n {this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_ALT_PART_GN_LABEL',\r\n 'Cod alternativa'\r\n ) +\r\n ': ' +\r\n (R.isNil(calculationPart!.alternativeGuideNumber)\r\n ? ''\r\n : calculationPart!.alternativeGuideNumber)}\r\n
\r\n
\r\n {this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_ALT_PART_NAME_LABEL',\r\n 'Descriere alternativa'\r\n ) +\r\n ': ' +\r\n (R.isNil(calculationPart!.alternativePartName)\r\n ? ''\r\n : calculationPart!.alternativePartName)}\r\n
\r\n
\r\n {this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_PRODUCER_HEADER',\r\n 'Producator'\r\n ) +\r\n ': ' +\r\n (R.isNil(calculationPart!.producer) ? '' : calculationPart!.producer)}\r\n
\r\n
\r\n {this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_DELIVERY_TIME_HEADER',\r\n 'Timp livrare'\r\n ) +\r\n ': ' +\r\n (R.isNil(calculationPart!.deliveryTime) ? '' : calculationPart!.deliveryTime)}\r\n
\r\n
\r\n {this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_ALT_PART_QUANTITY_LABEL',\r\n 'Cantitate disponibila'\r\n ) +\r\n ': ' +\r\n (R.isNil(calculationPart!.availableQuantity)\r\n ? ''\r\n : calculationPart!.availableQuantity)}\r\n
\r\n
\r\n {this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_ALTERNATIVE_CALCULATION_DETAILS_STOCK_LOCATION_LABEL',\r\n 'Locatie'\r\n ) +\r\n ': ' +\r\n (R.isNil(calculationPart!.alternativePartStockLocation)\r\n ? ''\r\n : calculationPart!.alternativePartStockLocation)}\r\n
\r\n
\r\n {this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_ALTERNATIVE_CALCULATION_DETAILS_REMARKS_LABEL',\r\n 'Observatii'\r\n ) +\r\n ': ' +\r\n (R.isNil(calculationPart!.alternativePartRemarks)\r\n ? ''\r\n : calculationPart!.alternativePartRemarks)}\r\n
\r\n \r\n }\r\n >\r\n
\r\n {partQualityType!.displayName + ' '}\r\n \r\n
\r\n \r\n );\r\n }\r\n };\r\n\r\n displayCalculationPartSupplier = (supplierId: any) => {\r\n const supplier = this.state.supplierList.find((item) => item.id === supplierId);\r\n const supplierName = !R.isNil(supplier) ? (supplier.name.toUpperCase() == OwnStockCodeEnum.OWN_STOCK.toString() ? this.translatorService.Tranlate('CALCULATION_DETAILS_OWN_STOCK_HEADER', 'Stoc Propriu') : supplier.name) : '';\r\n return supplierName;\r\n };\r\n\r\n handlePartInsurerAdditionChange = (value: number | null, currentPartId: number) => {\r\n // Find the corresponding part in the calculationParts array\r\n const updatedCalculationParts = this.state.calculationParts.map((part) => {\r\n if (part.id === currentPartId) {\r\n // Reset the additionInsurer for the specific part\r\n return { ...part, \r\n additionInsurer: value\r\n };\r\n }\r\n return part;\r\n });\r\n \r\n // Update the state with the modified calculationParts array\r\n this.setState({\r\n calculationParts: updatedCalculationParts,\r\n },\r\n () => {\r\n this.updateAmount();\r\n });\r\n };\r\n \r\n partDisabled = (part: CaseCalculationPart) => {\r\n return part.alternativeGuideNumber === null || part.supplierId === null ? true : false;\r\n };\r\n\r\n viewPrcNewColumns = () => {\r\n return !R.isNil(this.state.workflowCalculation) && this.state.workflowCalculation!.viewPrcNewColumns && this.state.caseCalculationHistoryDetails.calculationType.code === CalculationTypeCode.ALT;\r\n };\r\n\r\n getColumns = (sectionId: number) => {\r\n let columns = [];\r\n if (sectionId === 1) {\r\n columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'supplierId',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'guideNumber',\r\n label: this.translatorService.Tranlate('CALCULATION_DETAILS_GUIDE_NUMBER_HEADER', 'Cod'),\r\n options: {\r\n customBodyRender: (value: string, tableMeta: MUIDataTableMeta) => {\r\n const item = this.state.calculationParts.find(\r\n (item) => item.id === tableMeta.rowData[0]\r\n );\r\n return (\r\n this.newCalculationPart(tableMeta.rowData[0], sectionId)}\r\n >\r\n {value}\r\n \r\n );\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'alternativeGuideNumber',\r\n label: this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_ALT_GUIDE_NUMBER_HEADER',\r\n 'Cod Aftermarket'\r\n ),\r\n options: { filter: false } as MUIDataTableColumnOptions\r\n }, \r\n {\r\n name: 'name',\r\n label: this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_DESCRIPTION_HEADER',\r\n 'Descriere'\r\n ),\r\n options: {\r\n customBodyRender: (value: string, tableMeta: MUIDataTableMeta) => {\r\n const item = this.state.calculationParts.find(\r\n (item) => item.id === tableMeta.rowData[0]\r\n );\r\n\r\n if (R.isNil(item)) {\r\n return '';\r\n }\r\n return R.isNil(item!.alternativePartQualityId)\r\n ? item!.name\r\n : item!.alternativePartName;\r\n }\r\n }\r\n },\r\n {\r\n name: 'alternativePartDescription',\r\n label: this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_ALTERNATIVE_PART_DESCRIPTION_HEADER',\r\n 'Descriere piesa alt'\r\n ),\r\n options: {\r\n display: !R.isNil(this.state.workflowCalculation) && this.state.workflowCalculation!.hasAlternativePartDescription ? 'true' : 'false'\r\n }\r\n },\r\n {\r\n name: '',\r\n label: this.translatorService.Tranlate('CALCULATION_DETAILS_SUPPLIER_HEADER', 'Furnizor'),\r\n options: {\r\n filter: false,\r\n customBodyRender: (value: IReferential, tableMeta: MUIDataTableMeta) => {\r\n return this.displayCalculationPartSupplier(tableMeta.rowData[1]);\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'producer',\r\n label: this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_PRODUCER_HEADER',\r\n 'Producator'\r\n ),\r\n options: { filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'deliveryTime',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'alternativePartQuality',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'carPartCategory',\r\n label: this.translatorService.Tranlate('CALCULATION_DETAILS_QUALITY_HEADER', 'Calitate'),\r\n options: {\r\n customBodyRender: (value: IReferential, tableMeta: MUIDataTableMeta) => {\r\n return this.displayCalculationPartQuality(value, tableMeta.rowData);\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'pieceNr',\r\n label: this.translatorService.Tranlate('CALCULATION_DETAILS_UNITS_HEADER', 'Unitati')\r\n },\r\n {\r\n name: 'alternativePrice',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'alternativeNetPrice',\r\n label: this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_NET_PRICE_LKQ_HEADER',\r\n 'Pret Net'\r\n ),\r\n options: {\r\n display: !R.isNil(this.state.workflowCalculation) && this.state.workflowCalculation!.alternativeNetPrice ? 'true' : 'false',\r\n customBodyRender: (value: number | null, tableMeta: MUIDataTableMeta) => {\r\n return value ? Utils.countryNumberFormat((Math.round(value * 100) / 100).toFixed(2), this.props.appState.appUser?.organization?.country ?? null) : '';\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'originalPrice',\r\n label: this.viewPrcNewColumns() ? this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_UNIT_AQUISITION_PRICE_HEADER',\r\n 'Pret Achizitie'\r\n ) :\r\n this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_UNIT_PRICE_HEADER',\r\n 'Pret Unitar'\r\n ),\r\n options: {\r\n customBodyRender: (value: number, tableMeta: MUIDataTableMeta) => {\r\n return Utils.countryNumberFormat(this.displayCalculationPartPrice(value, tableMeta.rowData[0]), this.props.appState.appUser?.organization?.country ?? null);\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'discount',\r\n label: this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_DISCOUNT_HEADER',\r\n 'Discount (%)'\r\n ),\r\n options: {\r\n display: this.viewPrcNewColumns() ? 'false' : 'true',\r\n customBodyRender: (value: number, tableMeta: MUIDataTableMeta) => {\r\n return this.displayCalculationPartDiscount(value, tableMeta.rowData[0]);\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'additionInsurer',\r\n label: this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_INSURER_ADDITION_HEADER',\r\n 'Adaos Asigurator (%)'\r\n ),\r\n options: {\r\n display: this.viewPrcNewColumns() ? 'true' : 'false',\r\n customBodyRender: (value: number, tableMeta: MUIDataTableMeta) => {\r\n const calculationPartsFiltered = this.state.calculationParts.filter(\r\n (item) => item.calculationSectionId === 1\r\n );\r\n const calculationPart = calculationPartsFiltered.find((item) => item.id === tableMeta.rowData[0]);\r\n \r\n if (R.isNil(calculationPart)) {\r\n return '';\r\n }\r\n \r\n return (\r\n \r\n \r\n {\r\n const inputValue = e.target.value.trim();\r\n const numericRegex = /^[0-9]+$/;\r\n if (numericRegex.test(inputValue) || inputValue === '0' || inputValue === '') {\r\n const numericValue = inputValue === '' ? null : parseFloat(inputValue);\r\n this.handlePartInsurerAdditionChange(numericValue, calculationPart.id);\r\n }\r\n }}\r\n disabled={this.partDisabled(calculationPart) || !this.props.hasRights ? true : false} \r\n inputMode=\"numeric\" \r\n />\r\n \r\n \r\n );\r\n },\r\n } as MUIDataTableColumnOptions\r\n }, \r\n {\r\n name: '',\r\n label: this.translatorService.Tranlate('CALCULATION_DETAILS_TOTAL_PRICE_HEADER', 'Pret Total'),\r\n options: {\r\n display: this.viewPrcNewColumns() ? 'false' : 'true',\r\n customBodyRender: (value: number, tableMeta: MUIDataTableMeta) => {\r\n return Utils.countryNumberFormat(this.displayCalculationPartTotalPrice(tableMeta.rowData).toString(), this.props.appState.appUser?.organization?.country ?? null);\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: '',\r\n label: this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_TOTAL_SALE_PRICE_HEADER',\r\n 'Pret Vanzare'\r\n ),\r\n options: {\r\n display: this.viewPrcNewColumns() ? 'true' : 'false',\r\n customBodyRender: (value: number, tableMeta: MUIDataTableMeta) => {\r\n return this.displayCalculationPartUnitSalePrice(tableMeta.rowData);\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: '',\r\n label: this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_PL_PV_PRICE_HEADER',\r\n 'PL/PV'\r\n ),\r\n options: {\r\n display: this.viewPrcNewColumns() ? 'true' : 'false',\r\n customBodyRender: (value: number, tableMeta: MUIDataTableMeta) => {\r\n const percentage = this.displayCalculationPartPLPVProcent(tableMeta.rowData);\r\n const style = percentage < 0 ? { color: 'red' } : { color: 'green' };\r\n return (\r\n \r\n {percentage.toFixed(2) + '%'}\r\n \r\n );\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: '',\r\n label: this.translatorService.Tranlate('CALCULATION_DETAILS_TOTAL_PRICE_VALUE_HEADER', 'Valoare'),\r\n options: {\r\n display: this.viewPrcNewColumns() ? 'true' : 'false',\r\n customBodyRender: (value: number, tableMeta: MUIDataTableMeta) => {\r\n return Utils.countryNumberFormat(this.displayCalculationPartTotalPrice(tableMeta.rowData).toString(), this.props.appState.appUser?.organization?.country ?? null);\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'remarks',\r\n label: this.translatorService.Tranlate('CALCULATION_DETAILS_REMARKS_HEADER', 'Observatii')\r\n },\r\n {\r\n name: '',\r\n label: this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_SOLUTION_HEADER',\r\n 'Solutie Proprietar'\r\n ),\r\n options: {\r\n display:\r\n !R.isNil(this.state.workflowCalculation) &&\r\n (this.state.workflowCalculation!.ownerSolutionView ||\r\n this.state.workflowCalculation!.ownerSolution)\r\n ? 'true'\r\n : 'false',\r\n customBodyRender: (value: number, tableMeta: MUIDataTableMeta) => {\r\n const partId = tableMeta.rowData[0];\r\n const part = this.state.calculationParts.find((item) => item.id === partId);\r\n\r\n if (part === null) {\r\n return '';\r\n }\r\n if (R.isNil(part!.repairMethod) || part!.repairMethod === '') {\r\n return '';\r\n }\r\n\r\n return (\r\n \r\n \r\n this.handleSolutionValueChange(part!, newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n this.handleSolutionCommentChange(e, part!)}\r\n label={this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_SOLUTION_DESCRIPTION',\r\n 'Descriere'\r\n )}\r\n fullWidth\r\n />\r\n \r\n );\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: '',\r\n options: {\r\n viewColumns: false,\r\n filter: false,\r\n setCellHeaderProps: () => ({ align: 'center' }),\r\n setCellProps: () => ({ align: 'center' }),\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n
\r\n {!R.isNil(this.state.workflowCalculation) &&\r\n !R.isNil(this.state.workflowCalculation.deleteCarParts) &&\r\n this.state.workflowCalculation.deleteCarParts ? (\r\n this.deleteCalculationPart(e, tableMeta)}\r\n >\r\n \r\n \r\n ) : null}\r\n
\r\n );\r\n }\r\n }\r\n }\r\n ];\r\n } else {\r\n columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'supplierId',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'alternativeGuideNumber',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'guideNumber',\r\n label: this.translatorService.Tranlate('CALCULATION_DETAILS_GUIDE_NUMBER_HEADER', 'Cod'),\r\n options: {\r\n customBodyRender: (value: string, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.newCalculationPart(tableMeta.rowData[0], sectionId)}\r\n >\r\n {value}\r\n \r\n );\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'name',\r\n label: this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_DESCRIPTION_HEADER',\r\n 'Descriere'\r\n )\r\n },\r\n {\r\n name: 'pieceNr',\r\n label: this.translatorService.Tranlate('CALCULATION_DETAILS_UNITS_HEADER', 'Unitati')\r\n },\r\n {\r\n name: 'alternativePrice',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'originalPrice',\r\n label: this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_UNIT_PRICE_HEADER',\r\n 'Pret Unitar'\r\n ),\r\n options: {\r\n customBodyRender: (value: number, tableMeta: MUIDataTableMeta) => {\r\n return Utils.countryNumberFormat((Math.round(value * 100) / 100).toFixed(2), this.props.appState.appUser?.organization?.country ?? null);\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'discount',\r\n label: this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_DISCOUNT_HEADER',\r\n 'Discount (%)'\r\n ),\r\n options: {\r\n customBodyRender: (value: number, tableMeta: MUIDataTableMeta) => {\r\n return R.isNil(value) ? 0 : value;\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: '',\r\n label: this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_TOTAL_PRICE_HEADER',\r\n 'Pret Total'\r\n ),\r\n options: {\r\n customBodyRender: (value: number, tableMeta: MUIDataTableMeta) => {\r\n if (R.isNil(tableMeta.rowData[8])) {\r\n return (\r\n Utils.countryNumberFormat((Math.round(tableMeta.rowData[5] * tableMeta.rowData[7] * 100) / 100).toFixed(2), this.props.appState.appUser?.organization?.country ?? null) +\r\n ' ' +\r\n this.state.caseCalculationHistoryDetails.currency!.displayName\r\n );\r\n }\r\n return (\r\n Utils.countryNumberFormat((\r\n Math.round(\r\n (tableMeta.rowData[5] * tableMeta.rowData[7] -\r\n (tableMeta.rowData[5] * tableMeta.rowData[7] * tableMeta.rowData[8]) / 100) *\r\n 100\r\n ) / 100\r\n ).toFixed(2), this.props.appState.appUser?.organization?.country ?? null) +\r\n ' ' +\r\n this.state.caseCalculationHistoryDetails.currency!.displayName\r\n );\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'remarks',\r\n label: this.translatorService.Tranlate('CALCULATION_DETAILS_REMARKS_HEADER', 'Observatii')\r\n },\r\n {\r\n name: '',\r\n label: this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_SOLUTION_HEADER',\r\n 'Solutie Proprietar'\r\n ),\r\n options: {\r\n display:\r\n !R.isNil(this.state.workflowCalculation) &&\r\n (this.state.workflowCalculation!.ownerSolutionView ||\r\n this.state.workflowCalculation!.ownerSolution)\r\n ? 'true'\r\n : 'false',\r\n customBodyRender: (value: number, tableMeta: MUIDataTableMeta) => {\r\n const partId = tableMeta.rowData[0];\r\n const part = this.state.calculationParts.find((item) => item.id === partId);\r\n\r\n if (part === null) {\r\n return '';\r\n }\r\n if (R.isNil(part!.repairMethod) || part!.repairMethod === '') {\r\n return '';\r\n }\r\n\r\n return (\r\n \r\n \r\n this.handleSolutionValueChange(part!, newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n this.handleSolutionCommentChange(e, part!)}\r\n label={this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_SOLUTION_DESCRIPTION',\r\n 'Descriere'\r\n )}\r\n fullWidth\r\n />\r\n \r\n );\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: '',\r\n options: {\r\n viewColumns: false,\r\n filter: false,\r\n setCellHeaderProps: () => ({ align: 'center' }),\r\n setCellProps: () => ({ align: 'center' }),\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n
\r\n {!R.isNil(this.state.workflowCalculation) &&\r\n !R.isNil(\r\n sectionId === 2\r\n ? this.state.workflowCalculation.deleteLabor\r\n : sectionId === 3\r\n ? this.state.workflowCalculation.deletePaintingMaterials\r\n : sectionId === 4\r\n ? this.state.workflowCalculation.deletePaintingLabor\r\n : false\r\n ) &&\r\n (sectionId === 2\r\n ? this.state.workflowCalculation.deleteLabor\r\n : sectionId === 3\r\n ? this.state.workflowCalculation.deletePaintingMaterials\r\n : sectionId === 4\r\n ? this.state.workflowCalculation.deletePaintingLabor\r\n : false) ? (\r\n this.deleteCalculationPart(e, tableMeta)}\r\n >\r\n \r\n \r\n ) : null}\r\n
\r\n );\r\n }\r\n }\r\n }\r\n ];\r\n }\r\n\r\n return columns;\r\n };\r\n\r\n updateAmount = () => {\r\n const calcPartList = new CalculationParts(\r\n this.state.calculationSectionList,\r\n this.state.calculationParts,\r\n parseInt(this.state.TVA),\r\n this.state.caseCalculationHistoryDetails.smallPartsPercent,\r\n false\r\n );\r\n\r\n this.setState({\r\n caseCalculationHistoryDetails: {\r\n ...this.state.caseCalculationHistoryDetails,\r\n amountPieces: calcPartList.GetAmountPieceTotal(),\r\n amountLabor: calcPartList.GetAmountPart(CalculationSectionCodeEnum.LABOR),\r\n amountPaintingMaterials: calcPartList.GetAmountPart(CalculationSectionCodeEnum.PAINT),\r\n amountPaintingLabor: calcPartList.GetAmountPart(CalculationSectionCodeEnum.PAINT_LABOR),\r\n amountPiecesWithDiscount: calcPartList.GetAmountPartWithDiscount(\r\n CalculationSectionCodeEnum.PART\r\n ),\r\n amountLaborWithDiscount: calcPartList.GetAmountPartWithDiscount(\r\n CalculationSectionCodeEnum.LABOR\r\n ),\r\n amountPaintingMaterialsWithDiscount: calcPartList.GetAmountPartWithDiscount(\r\n CalculationSectionCodeEnum.PAINT\r\n ),\r\n amountPaintingLaborWithDiscount: calcPartList.GetAmountPartWithDiscount(\r\n CalculationSectionCodeEnum.PAINT_LABOR\r\n ),\r\n amountDiscount: calcPartList.TotalDiscount(),\r\n amountWithoutTVA: calcPartList.TotalWithoutVAT(),\r\n amountTVA: calcPartList.TotalVAT(),\r\n amount: calcPartList.Total(),\r\n additionInsurerParts: calcPartList.GetTotalInsurerAddition(CalculationSectionCodeEnum.PART),\r\n amountPiecesDiscount: calcPartList.GetTotalPartsDiscount(CalculationSectionCodeEnum.PART),\r\n smallPartsValue: calcPartList.GetSmallPartsValue()\r\n }\r\n });\r\n };\r\n\r\n newCalculationPart = async (calculationPartId: number | null, sectionId: number) => {\r\n let newCalculationPart;\r\n if (calculationPartId === null) {\r\n newCalculationPart = { ...this.state.newCalculationPart } as CaseCalculationPart;\r\n newCalculationPart.caseCalculationHistoryId = this.props.calculationHistoryId;\r\n newCalculationPart.id = -1 * this.state.calculationParts.length;\r\n newCalculationPart.calculationSectionId = sectionId;\r\n newCalculationPart.discount = 0;\r\n newCalculationPart.calculationSection = this.state.calculationSectionList.find(\r\n (item) => item.id === sectionId\r\n )!;\r\n } else {\r\n newCalculationPart = this.state.calculationParts.find(\r\n (item) => item.id === calculationPartId\r\n )!;\r\n if (newCalculationPart.alternativePartQualityId === null) {\r\n newCalculationPart.discount = R.isNil(newCalculationPart.discount)\r\n ? 0\r\n : newCalculationPart.discount;\r\n } else {\r\n newCalculationPart.alternativePartDiscount = R.isNil(\r\n newCalculationPart.alternativePartDiscount\r\n )\r\n ? 0\r\n : newCalculationPart.alternativePartDiscount;\r\n }\r\n if (newCalculationPart.alternativePartQualityId !== null) {\r\n const alternativePartQualityId = newCalculationPart.alternativePartQualityId;\r\n const partQualityTypes = this.state.partQualityTypes.sort(function (a, b) {\r\n return a.displayName.localeCompare(b.displayName);\r\n });\r\n const partQualityTypesFilter = partQualityTypes.filter(\r\n (qualityType) => qualityType.id === alternativePartQualityId\r\n );\r\n newCalculationPart.alternativePartQuality = partQualityTypesFilter[0];\r\n }\r\n\r\n const supplierId = newCalculationPart.supplierId;\r\n const supplier = this.state.supplierList.find((item) => item.id === supplierId);\r\n newCalculationPart.supplier = !R.isNil(supplier) ? supplier : null;\r\n }\r\n\r\n this.setState({\r\n newCalculationPart: newCalculationPart,\r\n newCalculationPartId: calculationPartId,\r\n isDialogOpen: true,\r\n currentSection: this.state.calculationSectionList.find((item) => item.id === sectionId)!\r\n });\r\n };\r\n\r\n closeDialog = async () => {\r\n this.setState({\r\n isDialogOpen: false,\r\n newCalculationPart: null,\r\n newCalculationPartId: null\r\n });\r\n };\r\n NumberFormatCustomDiscount = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n thousandSeparator\r\n decimalScale={2}\r\n isNumericString\r\n suffix=\" %\"\r\n />\r\n );\r\n };\r\n NumberFormatCustom = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n thousandSeparator={false}\r\n decimalScale={2}\r\n />\r\n );\r\n };\r\n private handleTextChange = (event: React.ChangeEvent) => {\r\n let value: any;\r\n if (event.target.type === 'text' || 'password') {\r\n value = event.currentTarget.value;\r\n }\r\n\r\n this.setState({\r\n newCalculationPart: {\r\n ...this.state.newCalculationPart!,\r\n [event.target.id]: value\r\n }\r\n });\r\n };\r\n\r\n handlePriceChange = (event: React.ChangeEvent, propName: string) => {\r\n this.setState({\r\n newCalculationPart: {\r\n ...this.state.newCalculationPart!,\r\n [propName]: event.target.value === null ? 0 : parseFloat(event.target.value)\r\n }\r\n });\r\n };\r\n\r\n handleDiscountChange = (event: React.ChangeEvent, propName: string) => {\r\n this.setState({\r\n newCalculationPart: {\r\n ...this.state.newCalculationPart!,\r\n [propName]: event.target.value === null ? 0 : parseFloat(event.target.value)\r\n }\r\n });\r\n };\r\n\r\n deleteCalculationPart = async (event: any, tableMeta: MUIDataTableMeta) => {\r\n try {\r\n const id = tableMeta.rowData[0];\r\n\r\n const calculationPartIndex = this.state.calculationParts.findIndex((item) => item.id === id);\r\n const calculationParts = [...this.state.calculationParts];\r\n calculationParts.splice(calculationPartIndex, 1);\r\n\r\n this.setState(\r\n {\r\n calculationParts: calculationParts\r\n },\r\n () => {\r\n this.updateAmount();\r\n this.props.handleModifiedPropChanges(true);\r\n }\r\n );\r\n } catch (error) {\r\n // this.props.enqueueSnackbar(this.translatorService.Tranlate(\"ERROR_MSG\", \"Eroare\"), { variant: 'error' });\r\n }\r\n };\r\n\r\n addCalculationPartForm = async () => {\r\n try {\r\n const calculationParts = [...this.state.calculationParts];\r\n if (this.state.newCalculationPartId === null) {\r\n //add\r\n // if (this.state.workflowSuppliers.findIndex(item => item.supplierId === this.state.selectedWorkflowSupplierType!.id && this.state.selectedWorkflowCarPartCategoryTypeMultiple.findIndex(itemm => itemm.id === item.carPartCategoryId)!==-1 ) !== -1 ) {\r\n // this.props.enqueueSnackbar(this.translatorService.Tranlate(\"ERROR_MSG_WORKFLOW_SUPPLIER_EXISTS\", \"Furnizorul exista deja!\"), { variant: 'error' });\r\n // return;\r\n // }\r\n calculationParts.push({\r\n ...this.state.newCalculationPart,\r\n carPartCategoryId:\r\n this.state.currentSection!.id === 1\r\n ? this.state.newCalculationPart!.carPartCategory!.id\r\n : null,\r\n carPartCategory:\r\n this.state.currentSection!.id === 1\r\n ? this.state.newCalculationPart!.carPartCategory\r\n : null,\r\n supplier:\r\n this.state.currentSection!.id === 1\r\n ? R.isNil(this.state.newCalculationPart!.supplier)\r\n ? null\r\n : this.state.newCalculationPart!.supplier\r\n : null,\r\n supplierId:\r\n this.state.currentSection!.id === 1\r\n ? R.isNil(this.state.newCalculationPart!.supplier)\r\n ? null\r\n : this.state.newCalculationPart!.supplier.id\r\n : null,\r\n amount: 0,\r\n alternativePartQualityId: null\r\n } as CaseCalculationPart);\r\n } else {\r\n // update\r\n\r\n const index = calculationParts.findIndex(\r\n (item) => item.id === this.state.newCalculationPartId\r\n )!;\r\n calculationParts[index] = {\r\n ...this.state.newCalculationPart!,\r\n carPartCategoryId:\r\n this.state.currentSection!.code === CalculationSectionCodeEnum.PART\r\n ? this.state.newCalculationPart!.carPartCategory!.id\r\n : null,\r\n carPartCategory:\r\n this.state.currentSection!.code === CalculationSectionCodeEnum.PART\r\n ? this.state.newCalculationPart!.carPartCategory\r\n : null,\r\n alternativePartQualityId:\r\n this.state.currentSection!.code === CalculationSectionCodeEnum.PART\r\n ? this.state.newCalculationPart!.alternativePartQuality !== null &&\r\n this.state.newCalculationPart!.alternativePartQualityId !== null\r\n ? this.state.newCalculationPart!.alternativePartQuality!.id\r\n : null\r\n : null,\r\n alternativePartQuality:\r\n this.state.currentSection!.code === CalculationSectionCodeEnum.PART\r\n ? this.state.newCalculationPart!.alternativePartQualityId !== null &&\r\n this.state.newCalculationPart!.alternativePartQuality !== null\r\n ? this.state.newCalculationPart!.alternativePartQuality\r\n : null\r\n : null,\r\n supplier:\r\n this.state.currentSection!.code === CalculationSectionCodeEnum.PART\r\n ? R.isNil(this.state.newCalculationPart!.supplier)\r\n ? null\r\n : this.state.newCalculationPart!.supplier\r\n : null,\r\n supplierId:\r\n this.state.currentSection!.code === CalculationSectionCodeEnum.PART\r\n ? R.isNil(this.state.newCalculationPart!.supplier)\r\n ? null\r\n : this.state.newCalculationPart!.supplier.id\r\n : null,\r\n amount: 0\r\n };\r\n }\r\n\r\n this.setState(\r\n {\r\n calculationParts: calculationParts,\r\n newCalculationPartId: null,\r\n newCalculationPart: null,\r\n // isLoading: true,\r\n isDialogOpen: false\r\n },\r\n () => {\r\n this.updateAmount();\r\n this.props.handleModifiedPropChanges(true);\r\n }\r\n );\r\n } catch (error) {}\r\n };\r\n\r\n handleAutocompletePartQualityChange = async (newValue: IReferential | null, propName: any) => {\r\n if (newValue === null) {\r\n this.setState({\r\n // supplierList: [],\r\n newCalculationPart: {\r\n ...this.state.newCalculationPart!,\r\n [propName]: null\r\n }\r\n });\r\n return;\r\n }\r\n\r\n this.setState({\r\n newCalculationPart: {\r\n ...this.state.newCalculationPart!,\r\n [propName]: newValue\r\n }\r\n });\r\n };\r\n\r\n handleAutocompleteSupplierChange = (newValue: any | null) => {\r\n this.setState({\r\n newCalculationPart: {\r\n ...this.state.newCalculationPart!,\r\n supplier: newValue\r\n }\r\n });\r\n };\r\n\r\n setAlternativePartQuality = (\r\n sectionId: number,\r\n carPartCategoryOriginal: any,\r\n alternativePartQualityId: any,\r\n alternativePartQuality: any,\r\n newCalculationPartId: any\r\n ) => {\r\n if (sectionId === 1) {\r\n if (alternativePartQualityId === null || newCalculationPartId === null) {\r\n return carPartCategoryOriginal;\r\n } else {\r\n return alternativePartQuality;\r\n }\r\n } else {\r\n return carPartCategoryOriginal;\r\n }\r\n };\r\n\r\n public renderAddForm(sectionId: any, newCalcPartId: any) {\r\n return R.isNil(this.state.newCalculationPart) ? null : (\r\n this.addCalculationPartForm()}>\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n this.handlePriceChange(\r\n e,\r\n this.state.newCalculationPart!.alternativePartQualityId === null ||\r\n this.state.newCalculationPartId === null\r\n ? 'originalPrice'\r\n : 'alternativePrice'\r\n )\r\n }\r\n label={this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_UNIT_PRICE_HEADER',\r\n 'Pret Unitar'\r\n )}\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n InputProps={{\r\n inputComponent: this.NumberFormatCustom\r\n }}\r\n />\r\n\r\n \r\n this.handleDiscountChange(\r\n e,\r\n this.state.newCalculationPart!.alternativePartQualityId === null ||\r\n this.state.newCalculationPartId === null\r\n ? 'discount'\r\n : 'alternativePartDiscount'\r\n )\r\n }\r\n label={this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_DISCOUNT_HEADER',\r\n 'Discount (%)'\r\n )}\r\n validators={['minNumber:0', 'maxNumber:100']}\r\n errorMessages={[\r\n this.translatorService.Tranlate(\r\n 'WORKFLOW_SUPPLIERS_TAB_DISCOUNT_VALIDATORS_NUMBER_BETWENN',\r\n 'Valoarea discount-ului trebuie sa fie cuprinsa intre 0 si 100'\r\n ),\r\n this.translatorService.Tranlate(\r\n 'WORKFLOW_SUPPLIERS_TAB_DISCOUNT_VALIDATORS_NUMBER_BETWENN',\r\n 'Valoarea discount-ului trebuie sa fie cuprinsa intre 0 si 100'\r\n )\r\n ]}\r\n InputProps={{\r\n inputComponent: this.NumberFormatCustomDiscount\r\n }}\r\n />\r\n\r\n \r\n \r\n \r\n {this.state.currentSection!.id === 1 ? (\r\n
\r\n \r\n this.handleAutocompletePartQualityChange(\r\n newValue,\r\n this.state.newCalculationPart!.alternativePartQualityId === null ||\r\n this.state.newCalculationPartId === null\r\n ? 'carPartCategory'\r\n : 'alternativePartQuality'\r\n )\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n this.handleAutocompleteSupplierChange(newValue)\r\n }\r\n getOptionLabel={(option: Organization) => option.name}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n
\r\n ) : null}\r\n
\r\n
\r\n {newCalcPartId !== null ? (\r\n !R.isNil(this.state.workflowCalculation) &&\r\n !R.isNil(\r\n sectionId === 1\r\n ? this.state.workflowCalculation.editCarParts\r\n : sectionId === 2\r\n ? this.state.workflowCalculation.editLabor\r\n : sectionId === 3\r\n ? this.state.workflowCalculation.editPaintingMaterials\r\n : sectionId === 4\r\n ? this.state.workflowCalculation.editPaintingLabor\r\n : false\r\n ) &&\r\n (sectionId === 1\r\n ? this.state.workflowCalculation.editCarParts\r\n : sectionId === 2\r\n ? this.state.workflowCalculation.editLabor\r\n : sectionId === 3\r\n ? this.state.workflowCalculation.editPaintingMaterials\r\n : sectionId === 4\r\n ? this.state.workflowCalculation.editPaintingLabor\r\n : false) ? (\r\n
\r\n \r\n
\r\n ) : null\r\n ) : (\r\n
\r\n \r\n
\r\n )}\r\n
\r\n );\r\n }\r\n\r\n handleImportOriginalParts = (event: any) => {\r\n event.preventDefault();\r\n\r\n const files = event.target.files,\r\n f = files[0];\r\n const reader = new FileReader();\r\n reader.onload = (e) => {\r\n const data = e.target!.result;\r\n const readedData = XLSX.read(data, { type: 'binary' });\r\n const wsname = readedData.SheetNames[0];\r\n const ws = readedData.Sheets[wsname];\r\n\r\n const fullParsedContent = XLSX.utils.sheet_to_json(ws, { header: 1 });\r\n if (fullParsedContent.length === 0) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'ERROR_IMPORT_PARTS_BY_XLSX_FILE',\r\n 'Importul nu s-a putut efectua! Verificati fisierul!'\r\n ),\r\n { variant: 'error' }\r\n );\r\n return;\r\n }\r\n const header = fullParsedContent[0] as any;\r\n if (\r\n fullParsedContent.length > 0 &&\r\n (header[0] !== ImportCalculationOriginalPartsFileHeader.H1 ||\r\n header[1] !== ImportCalculationOriginalPartsFileHeader.H2 ||\r\n header[2] !== ImportCalculationOriginalPartsFileHeader.H3 ||\r\n header[3] !== ImportCalculationOriginalPartsFileHeader.H4 ||\r\n header[4] !== ImportCalculationOriginalPartsFileHeader.H5 ||\r\n (header[5] !== undefined && header[5] !== ImportCalculationOriginalPartsFileHeader.H6) ||\r\n (header[6] !== undefined && header[6] !== ImportCalculationOriginalPartsFileHeader.H7) ||\r\n (header[7] !== undefined && header[7] !== ImportCalculationOriginalPartsFileHeader.H8) ||\r\n (header[8] !== undefined && header[8] !== ImportCalculationOriginalPartsFileHeader.H9) ||\r\n (header[9] !== undefined && header[9] !== ImportCalculationOriginalPartsFileHeader.H10))\r\n ) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'ERROR_IMPORT_PARTS_BY_XLSX_FILE',\r\n 'Importul nu s-a putut efectua! Verificati fisierul!'\r\n ),\r\n { variant: 'error' }\r\n );\r\n return;\r\n }\r\n\r\n /* Convert array to json*/\r\n const dataParse = XLSX.utils\r\n .sheet_to_json(ws, {\r\n header: [\r\n 'guideNumberImported',\r\n 'nameImported',\r\n 'originalPriceImported',\r\n 'qualityImported',\r\n 'unitsImported',\r\n 'discountImported',\r\n 'supplierImported',\r\n 'deliveryTimeImported',\r\n 'producerImported',\r\n 'remarksImported'\r\n ],\r\n defval: ''\r\n })\r\n .slice(1);\r\n\r\n if (dataParse.length <= 0) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'ERROR_IMPORT_PARTS_BY_XLSX_FILE',\r\n 'Importul nu s-a putut efectua! Verificati fisierul!'\r\n ),\r\n { variant: 'error' }\r\n );\r\n return;\r\n }\r\n const partQualityTypes = this.state.partQualityTypes.sort(function (a, b) {\r\n return a.displayName.localeCompare(b.displayName);\r\n });\r\n const supplierList = this.state.supplierList;\r\n const dataParseArr = dataParse as any[];\r\n let emptyRows = false as boolean;\r\n\r\n dataParseArr.map((item) => {\r\n if (\r\n item.guideNumberImported.toString() === '' ||\r\n !item.guideNumberImported.toString().trim().length\r\n ) {\r\n emptyRows = true;\r\n }\r\n if (item.nameImported.toString() === '' || !item.nameImported.toString().trim().length) {\r\n emptyRows = true;\r\n }\r\n if (\r\n item.originalPriceImported.toString() === '' ||\r\n !item.originalPriceImported.toString().trim().length\r\n ) {\r\n emptyRows = true;\r\n }\r\n if (\r\n item.qualityImported.toString() === '' ||\r\n !item.qualityImported.toString().trim().length\r\n ) {\r\n emptyRows = true;\r\n }\r\n if (item.unitsImported.toString() === '' || !item.unitsImported.toString().trim().length) {\r\n emptyRows = true;\r\n }\r\n const partQualityTypesFilter = partQualityTypes.filter(\r\n (qualityType) => qualityType.code === item.qualityImported.toString()\r\n );\r\n if (partQualityTypesFilter.length <= 0) {\r\n emptyRows = true;\r\n }\r\n\r\n const supplierListFilter = supplierList.filter(\r\n (supplier) => supplier.companyNumber === item.supplierImported.toString()\r\n );\r\n if (item.supplierImported.toString() !== '' && supplierListFilter.length <= 0) {\r\n emptyRows = true;\r\n }\r\n });\r\n if (emptyRows === true) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'ERROR_IMPORT_PARTS_BY_XLSX_FILE',\r\n 'Importul nu s-a putut efectua! Verificati fisierul!'\r\n ),\r\n { variant: 'error' }\r\n );\r\n return;\r\n }\r\n this.importOriginalParts(dataParse);\r\n };\r\n reader.readAsBinaryString(f);\r\n event.target.value = '';\r\n };\r\n\r\n importOriginalParts = (importedOriginalParts: any) => {\r\n try {\r\n const partQualityTypes = this.state.partQualityTypes.sort(function (a, b) {\r\n return a.displayName.localeCompare(b.displayName);\r\n });\r\n const calculationSection = this.state.calculationSectionList.find((item) => item.id === 1);\r\n const calculationParts = this.state.calculationParts.filter(\r\n (item) => item.calculationSectionId === 1\r\n );\r\n const supplierList = this.state.supplierList;\r\n\r\n [...importedOriginalParts].map((item, index) => {\r\n const partQualityTypesFilter = partQualityTypes.filter(\r\n (qualityType) => qualityType.code === item.qualityImported.toString()\r\n );\r\n const supplierListFilter = supplierList.filter(\r\n (supplier) =>\r\n supplier.companyNumber !== '' &&\r\n supplier.companyNumber === item.supplierImported.toString()\r\n );\r\n calculationParts.push({\r\n amount: 0,\r\n calculationSection: calculationSection,\r\n calculationSectionId: 1,\r\n carPartCategory: partQualityTypesFilter.length > 0 ? partQualityTypesFilter[0] : null,\r\n carPartCategoryId:\r\n partQualityTypesFilter.length > 0 ? partQualityTypesFilter[0].id : null,\r\n caseCalculationHistoryId: this.props.calculationHistoryId,\r\n deliveryTime: item.deliveryTimeImported,\r\n guideNumber: item.guideNumberImported,\r\n id: -1 * this.state.calculationParts.length - index,\r\n name: item.nameImported,\r\n originalPrice: item.originalPriceImported,\r\n pieceNr: item.unitsImported,\r\n discount:\r\n !R.isNil(item.discountImported) && item.discountImported !== ''\r\n ? item.discountImported\r\n : 0,\r\n producer: item.producerImported,\r\n remarks: item.remarksImported,\r\n supplierId: supplierListFilter.length > 0 ? supplierListFilter[0].id : null,\r\n supplier: supplierListFilter.length > 0 ? supplierListFilter[0] : null,\r\n alternativePartQualityId: null,\r\n alternativePartQuality: null\r\n } as CaseCalculationPart);\r\n });\r\n\r\n this.setState({\r\n calculationParts: calculationParts\r\n });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n public renderTable = (sectionId: number) => {\r\n const options = {\r\n filter: false,\r\n search: false,\r\n viewColumns: false,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n rowHover: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n sort: false,\r\n elevation: 1,\r\n customToolbar: () => {\r\n return (\r\n
\r\n {sectionId === 1 &&\r\n !R.isNil(this.state.workflowCalculation) &&\r\n !R.isNil(this.state.workflowCalculation.importParts) &&\r\n this.state.workflowCalculation.importParts ? (\r\n \r\n {\r\n this.handleImportOriginalParts(e);\r\n }}\r\n className=\"ml-2\"\r\n component=\"label\"\r\n color=\"primary\"\r\n >\r\n \r\n \r\n \r\n \r\n ) : null}\r\n {!R.isNil(this.state.workflowCalculation) &&\r\n !R.isNil(\r\n sectionId === 1\r\n ? this.state.workflowCalculation.addCarParts\r\n : sectionId === 2\r\n ? this.state.workflowCalculation.addLabor\r\n : sectionId === 3\r\n ? this.state.workflowCalculation.addPaintingMaterials\r\n : sectionId === 4\r\n ? this.state.workflowCalculation.addPaintingLabor\r\n : false\r\n ) &&\r\n (sectionId === 1\r\n ? this.state.workflowCalculation.addCarParts\r\n : sectionId === 2\r\n ? this.state.workflowCalculation.addLabor\r\n : sectionId === 3\r\n ? this.state.workflowCalculation.addPaintingMaterials\r\n : sectionId === 4\r\n ? this.state.workflowCalculation.addPaintingLabor\r\n : false) ? (\r\n \r\n this.newCalculationPart(null, sectionId)}\r\n >\r\n \r\n \r\n \r\n ) : null}\r\n \r\n \r\n \r\n \r\n \r\n {(this.state.newCalculationPartId === null\r\n ? this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_NEW_MODAL_TITLE',\r\n 'Adauga '\r\n )\r\n : this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_UPDATE_MODAL_TITLE',\r\n 'Actualizeaza '\r\n )) +\r\n (R.isNil(this.state.currentSection)\r\n ? ' '\r\n : this.state.currentSection!.displayName)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.renderAddForm(\r\n R.isNil(this.state.currentSection) ? ' ' : this.state.currentSection!.id,\r\n this.state.newCalculationPartId\r\n )}\r\n \r\n \r\n
\r\n );\r\n }\r\n };\r\n return (\r\n
\r\n {sectionId === 1 && this.viewPrcNewColumns() ? (\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_TOTAL_PARTS_OE_TITLE',\r\n 'Total piese OE'\r\n ) + ' (' + this.state.caseCalculationHistoryDetails.currency!.displayName + ' ' + this.translatorService.Tranlate('WITHOUT_VAT_VALUE', 'fara TVA') + ')'}\r\n
\r\n
\r\n \r\n
\r\n {this.calculationTotalPartsOEPrice().toFixed(2)}\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n {this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_TOTAL_PARTS_AM_TITLE',\r\n 'Total piese AM'\r\n ) + ' (' + this.state.caseCalculationHistoryDetails.currency!.displayName + ' ' + this.translatorService.Tranlate('WITHOUT_VAT_VALUE', 'fara TVA') + ')'}\r\n
\r\n
\r\n \r\n
\r\n {this.calculationTotalPartsAMPrice().toFixed(2)}\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n {this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_TOTAL_PARTS_ECONOMY_TITLE',\r\n 'Economisire piese (%)'\r\n )}\r\n
\r\n
\r\n \r\n
\r\n {this.displayCalculationTotalPartsEconomy()}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n ) : ''}\r\n item.calculationSectionId === sectionId\r\n )}\r\n title={this.state.calculationSectionList\r\n .find((item) => item.id === sectionId)!\r\n .displayName.toUpperCase()}\r\n options={options}\r\n />\r\n
\r\n );\r\n };\r\n\r\n getPerson = () => {\r\n if (R.isNil(this.props.caseSettingsState.case!.caseEvent)) {\r\n return 'N/A';\r\n }\r\n if (R.isNil(this.props.caseSettingsState.case!.caseEvent.insuredPersonType)) {\r\n return 'N/A';\r\n }\r\n\r\n if (\r\n this.props.caseSettingsState.case!.caseEvent.insuredPersonType!.code === InsuredTypeCode.PF\r\n ) {\r\n return this.props.caseSettingsState.case!.caseEvent.insuredName;\r\n }\r\n\r\n return this.props.caseSettingsState.case!.caseEvent.companyName;\r\n };\r\n \r\n handleGeneralInsurerAdditionChange = (value: number | null) => {\r\n const updatedCalculationParts = this.state.calculationParts.map((part) => {\r\n if (part.calculationSection!.code === CalculationSectionCodeEnum.PART && !this.partDisabled(part)) {\r\n return { ...part, \r\n additionInsurer: value\r\n };\r\n }\r\n return part;\r\n });\r\n\r\n \r\n this.setState({\r\n caseCalculationHistoryDetails: {\r\n ...this.state.caseCalculationHistoryDetails!,\r\n additionInsurer: value\r\n },\r\n calculationParts: _.cloneDeep(updatedCalculationParts)\r\n }, \r\n () => {\r\n this.updateAmount();\r\n });\r\n };\r\n\r\n\r\n renderCalculationGeneralData = () => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {this.state.caseCalculationHistoryDetails.calculationType.displayName.toUpperCase() +\r\n ' ' +\r\n this.props.caseSettingsState.case!.id}\r\n
\r\n
\r\n \r\n this.handleOfferNumberChange(e)}\r\n />\r\n \r\n
\r\n\r\n \r\n \r\n
\r\n {this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_CALCULATION_DATE',\r\n 'Data calculatie'\r\n )}\r\n
\r\n
\r\n {this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_CALCULATION_VIN_INDENTIFICATION',\r\n 'Identificare Vin'\r\n )}\r\n
\r\n
\r\n {this.translatorService.Tranlate('CALCULATION_DETAILS_MADE_BY', 'Efectuat de')}\r\n
\r\n
\r\n {this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_INSURED_NAME',\r\n 'Proprietar/Utilizator'\r\n )}\r\n
\r\n
\r\n {this.translatorService.Tranlate(\r\n 'CASE_EVENT_COST_CENTER',\r\n 'Centru de cost'\r\n )}\r\n
\r\n
\r\n {this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_PACKAGE_TYPE',\r\n 'Tip Pachet'\r\n )}\r\n
\r\n
\r\n \r\n
\r\n {moment\r\n .utc(this.state.caseCalculationHistoryDetails.date)\r\n .local()\r\n .format(this.props.appState.longDateFormat)}\r\n
\r\n
\r\n {this.state.caseCalculationHistoryDetails.vinQuery ? 'GT (VQ)' : 'Local (VD)' }\r\n
\r\n
\r\n {this.state.caseCalculationHistoryDetails.user!.userName}\r\n
\r\n
{this.getPerson()}
\r\n
\r\n {!isNullOrUndefined(this.state.costCenter) ? this.state.costCenter.name : 'N/A'}\r\n
\r\n
\r\n {!isNullOrUndefined(this.state.maintenancePackage) ? this.state.maintenancePackage.displayName : 'N/A'}\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n {VehicleHelper.GetBrandModel(\r\n this.props.caseSettingsState.case,\r\n this.props.vehicleState.vehicle\r\n )}\r\n
\r\n\r\n \r\n \r\n \r\n \r\n
\r\n {this.translatorService.Tranlate('CALCULATION_DETAILS_UMC', 'UMC')}\r\n
\r\n
\r\n {this.translatorService.Tranlate('CALCULATION_DETAILS_VIN', 'VIN')}\r\n
\r\n
\r\n {this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_VEHICLE_MANUFACTURE_DATE',\r\n 'Data fabricatie'\r\n )}\r\n
\r\n
\r\n {this.translatorService.Tranlate(\r\n 'CASE_EVENT_LOCATION_LABEL',\r\n 'Adresa de livrare'\r\n )}\r\n
\r\n
\r\n {this.translatorService.Tranlate(\r\n 'CASE_EVENT_INSURER_NAME_LABEL',\r\n 'Nume Asigurator'\r\n )\r\n }\r\n
\r\n
\r\n \r\n
\r\n {VehicleHelper.GetUMC(\r\n this.props.caseSettingsState.case,\r\n this.props.vehicleState.vehicle\r\n )}\r\n
\r\n
\r\n {VehicleHelper.GetVIN(\r\n this.props.caseSettingsState.case,\r\n this.props.vehicleState.vehicle\r\n )}\r\n
\r\n
\r\n {VehicleHelper.GetMakeDate(\r\n this.props.caseSettingsState.case,\r\n this.props.vehicleState.vehicle,\r\n this.props.appState.language\r\n )}\r\n
\r\n
\r\n {!isNullOrUndefined(this.state.deliveryAdress)\r\n ? \r\n this.state.deliveryAdress.name +\r\n '; ' +\r\n (!isNullOrUndefined(this.state.deliveryAdress.address)\r\n ? 'strada: ' + this.state.deliveryAdress.address\r\n : '')\r\n : 'N/A'}\r\n
\r\n
\r\n {!R.isNil(this.props.caseSettingsState.case!.caseEvent) ? this.props.caseSettingsState.case!.caseEvent.insurerName : 'N/A'}\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n {this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_VEHICAL_PLATE_NUMBER',\r\n 'Numar inmatriculare'\r\n )}\r\n
\r\n
\r\n {this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_VEHICAL_FIRST_REGISTRATION_DATE',\r\n 'Data primei inmatriculari'\r\n )}\r\n
\r\n
\r\n {this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_VEHICAL_NUMBER_OF_KM',\r\n 'Numar kilometri'\r\n )}\r\n
\r\n
\r\n \r\n
\r\n {VehicleHelper.GetPlateNumber(\r\n this.props.caseSettingsState.case,\r\n this.props.vehicleState.vehicle\r\n )}\r\n
\r\n
\r\n {VehicleHelper.GetFirstRegistrationDate(\r\n this.props.caseSettingsState.case,\r\n this.props.vehicleState.vehicle,\r\n this.props.appState.language\r\n )}\r\n
\r\n
\r\n {VehicleHelper.GetKmNr(\r\n this.props.caseSettingsState.case,\r\n this.props.vehicleState.vehicle\r\n )}\r\n
\r\n
\r\n \r\n {this.viewPrcNewColumns() ? (\r\n <>\r\n
\r\n {\r\n const inputValue = e.target.value.trim();\r\n const numericRegex = /^[0-9]+$/;\r\n \r\n if (numericRegex.test(inputValue) || inputValue === '0' || inputValue === '') {\r\n const numericValue = inputValue === '' ? null : parseFloat(inputValue);\r\n this.handleGeneralInsurerAdditionChange(numericValue);\r\n }\r\n }}\r\n inputMode=\"numeric\"\r\n disabled={!this.props.hasRights ? true : false}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_INSURER_ADDITION_HEADER',\r\n 'Adaos Asigurator (%)'\r\n )}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n /> \r\n
\r\n ) : ''}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n };\r\n\r\n renderCalculationPart = () => {\r\n return this.state.calculationSectionList.map((item) => this.renderTable(item.id));\r\n };\r\n\r\n handleRemarksChange = (e: React.ChangeEvent) => {\r\n this.setState({\r\n caseCalculationHistoryDetails: {\r\n ...this.state.caseCalculationHistoryDetails,\r\n comment: e.target.value\r\n }\r\n });\r\n };\r\n\r\n handleOfferNumberChange = (e: React.ChangeEvent) => {\r\n this.setState({\r\n caseCalculationHistoryDetails: {\r\n ...this.state.caseCalculationHistoryDetails,\r\n offerNumber: e.target.value\r\n }\r\n });\r\n };\r\n\r\n handleSolutionCommentChange = (\r\n e: React.ChangeEvent,\r\n part: CaseCalculationPart\r\n ) => {\r\n const newArray = [...this.state.calculationParts];\r\n const index = newArray.findIndex((item) => item.id === part.id);\r\n newArray[index] = {\r\n ...newArray[index],\r\n solutionComment: e.target.value\r\n };\r\n this.setState({\r\n calculationParts: newArray\r\n });\r\n };\r\n\r\n handleSolutionValueChange = (part: CaseCalculationPart, newVal: IReferential | null) => {\r\n const newArray = [...this.state.calculationParts];\r\n const index = newArray.findIndex((item) => item.id === part.id);\r\n newArray[index] = {\r\n ...newArray[index],\r\n solutionValue: newVal,\r\n solutionValueId: newVal !== null ? newVal.id : null\r\n };\r\n this.setState({\r\n calculationParts: newArray\r\n });\r\n };\r\n\r\n displayValueWithCurrency = (value: number | null) => {\r\n let result = '0';\r\n if (!R.isNil(value)) {\r\n result = value.toFixed(2);\r\n }\r\n\r\n return Utils.countryNumberFormat(result, this.props.appState.appUser?.organization?.country ?? null) + ' ' + this.state.caseCalculationHistoryDetails.currency!.displayName;\r\n };\r\n\r\n renderCalculationTotal = () => {\r\n return (\r\n \r\n \r\n
\r\n
\r\n
u
\r\n
\r\n {this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_TOTAL_SMALL_PIECES',\r\n 'Piese mici'\r\n )}\r\n
\r\n
\r\n {this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_TOTAL_WITHOUT_DISCOUNT',\r\n 'Total fara discount'\r\n )}\r\n
\r\n
\r\n {this.translatorService.Tranlate('CALCULATION_DETAILS_TOTAL_DISCOUNT', 'Discount')}\r\n
\r\n {this.viewPrcNewColumns() ? (\r\n
\r\n {this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_TOTAL_ADAOS',\r\n 'Adaos Asigurator'\r\n )}\r\n
\r\n ) : ''}\r\n
\r\n {this.translatorService.Tranlate('CALCULATION_DETAILS_TOTAL_SECTION', 'TOTAL')}\r\n
\r\n
\r\n {this.state.calculationSectionList.map((item) => {\r\n return item.code === CalculationSectionCodeEnum.PART ? (\r\n
\r\n
{item.displayName}
\r\n
\r\n {this.displayValueWithCurrency(\r\n this.state.caseCalculationHistoryDetails.smallPartsValue\r\n )}\r\n
\r\n
\r\n {this.displayValueWithCurrency(\r\n this.state.caseCalculationHistoryDetails.amountPieces\r\n )}\r\n
\r\n
\r\n {this.displayValueWithCurrency(\r\n this.state.caseCalculationHistoryDetails.amountPiecesDiscount\r\n )}\r\n
\r\n {this.viewPrcNewColumns() ? ( \r\n
\r\n {this.displayValueWithCurrency(\r\n this.state.caseCalculationHistoryDetails.additionInsurerParts\r\n )}\r\n
\r\n ) : ''}\r\n
\r\n {this.displayValueWithCurrency(\r\n this.state.caseCalculationHistoryDetails.amountPiecesWithDiscount\r\n )}\r\n
\r\n
\r\n ) : item.code === CalculationSectionCodeEnum.LABOR ? (\r\n
\r\n
{item.displayName}
\r\n
-
\r\n
\r\n {this.displayValueWithCurrency(\r\n this.state.caseCalculationHistoryDetails.amountLabor\r\n )}\r\n
\r\n
\r\n {this.displayValueWithCurrency(\r\n (this.state.caseCalculationHistoryDetails.amountLabor || 0) -\r\n (this.state.caseCalculationHistoryDetails.amountLaborWithDiscount || 0)\r\n )}\r\n
\r\n {this.viewPrcNewColumns() ? ( \r\n
-
\r\n ) : ''}\r\n
\r\n {R.isNil(this.state.caseCalculationHistoryDetails.amountLaborWithDiscount)\r\n ? 0\r\n : Utils.countryNumberFormat(this.state.caseCalculationHistoryDetails.amountLaborWithDiscount.toFixed(\r\n 2\r\n ), this.props.appState.appUser?.organization?.country ?? null) +\r\n ' ' +\r\n this.state.caseCalculationHistoryDetails.currency!.displayName}\r\n
\r\n
\r\n ) : item.code === CalculationSectionCodeEnum.PAINT ? (\r\n
\r\n
{item.displayName}
\r\n
-
\r\n
\r\n {this.displayValueWithCurrency(\r\n this.state.caseCalculationHistoryDetails.amountPaintingMaterials\r\n )}\r\n
\r\n
\r\n {this.displayValueWithCurrency(\r\n (this.state.caseCalculationHistoryDetails.amountPaintingMaterials || 0) -\r\n (this.state.caseCalculationHistoryDetails\r\n .amountPaintingMaterialsWithDiscount || 0)\r\n )}\r\n
\r\n {this.viewPrcNewColumns() ? ( \r\n
-
\r\n ) : ''}\r\n
\r\n {this.displayValueWithCurrency(\r\n this.state.caseCalculationHistoryDetails.amountPaintingMaterialsWithDiscount\r\n )}\r\n
\r\n
\r\n ) : item.code === CalculationSectionCodeEnum.PAINT_LABOR ? (\r\n
\r\n
{item.displayName}
\r\n
-
\r\n
\r\n {this.displayValueWithCurrency(\r\n this.state.caseCalculationHistoryDetails.amountPaintingLabor\r\n )}\r\n
\r\n
\r\n {this.displayValueWithCurrency(\r\n (this.state.caseCalculationHistoryDetails.amountPaintingLabor || 0) -\r\n (this.state.caseCalculationHistoryDetails.amountPaintingLaborWithDiscount ||\r\n 0)\r\n )}\r\n
\r\n {this.viewPrcNewColumns() ? ( \r\n
-
\r\n ) : ''}\r\n
\r\n {this.displayValueWithCurrency(\r\n this.state.caseCalculationHistoryDetails.amountPaintingLaborWithDiscount\r\n )}\r\n
\r\n
\r\n ) : null;\r\n })}\r\n
\r\n
\r\n {this.translatorService.Tranlate('CALCULATION_DETAILS_TOTAL_SECTION', 'TOTAL')}\r\n
\r\n
\r\n
\r\n
\r\n {this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_ADDITION_AMOUNT',\r\n 'Adaos GTM'\r\n )}\r\n
\r\n
\r\n {this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_TOTAL_WITHOUT_VAT',\r\n 'Total fara TVA'\r\n )}\r\n
\r\n
\r\n {this.state.caseCalculationHistoryDetails.amountTVA != 0\r\n ? this.translatorService.Tranlate('CALCULATION_DETAILS_TOTAL_VAT', 'TVA') +\r\n ' (' +\r\n this.state.TVA +\r\n '%)'\r\n : this.translatorService.Tranlate('CALCULATION_DETAILS_TOTAL_VAT', 'TVA') +\r\n ' (0 %)'}\r\n
\r\n
\r\n {this.translatorService.Tranlate('CALCULATION_DETAILS_TOTAL_SECTION', 'TOTAL')}\r\n
\r\n
\r\n
\r\n
\r\n {this.displayValueWithCurrency(\r\n this.state.caseCalculationHistoryDetails.amountAddition\r\n )}\r\n
\r\n
\r\n {this.displayValueWithCurrency(\r\n this.state.caseCalculationHistoryDetails.amountWithoutTVA\r\n )}\r\n
\r\n
\r\n {this.displayValueWithCurrency(\r\n this.state.caseCalculationHistoryDetails.amountTVA\r\n )}\r\n
\r\n
\r\n {this.displayValueWithCurrency(this.state.caseCalculationHistoryDetails.amount)}\r\n
\r\n
\r\n
\r\n
\r\n {this.state.caseCalculationHistoryDetails.calculationType.code !== CalculationTypeCode.ORG && (\r\n
\r\n this.handleRemarksChange(e)}\r\n variant=\"outlined\"\r\n />\r\n
\r\n )}\r\n
\r\n\r\n
\r\n {this.state.caseCalculationHistoryDetails.calculationType.code !== CalculationTypeCode.ORG && (\r\n \r\n )}\r\n
\r\n
\r\n
\r\n );\r\n };\r\n\r\n save = async () => {\r\n const parts = this.state.calculationParts.map((item) => item);\r\n\r\n parts.forEach((item) => {\r\n item.calculationSection = null;\r\n item.carPartCategory = null;\r\n item.alternativePartQuality = null;\r\n item.supplier = null;\r\n });\r\n try {\r\n await this.caseService.UpdateCaseCalculationParts(\r\n this.state.calculationParts,\r\n this.state.caseCalculationHistoryDetails.comment,\r\n this.state.caseCalculationHistoryDetails.offerNumber,\r\n this.props.calculationHistoryId,\r\n this.state.caseCalculationHistoryDetails.partsLocationOrganizationId,\r\n this.state.caseCalculationHistoryDetails.partsOrganizationId,\r\n this.state.caseCalculationHistoryDetails.organizationId,\r\n this.state.caseCalculationHistoryDetails.organizationName,\r\n true,\r\n this.state.caseCalculationHistoryDetails.manipulationPercent,\r\n this.state.caseCalculationHistoryDetails.additionInsurer,\r\n this.state.caseCalculationHistoryDetails.formId,\r\n this.state.caseCalculationHistoryDetails.interogatePartner\r\n );\r\n\r\n this.props.handleModifiedPropChanges(false);\r\n this.props.onSave();\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n this.appuserService = (this.context as AppContext).appUserService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.workflowService = (this.context as AppContext).workflowService;\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n
\r\n {this.renderCalculationGeneralData()}\r\n {this.renderCalculationPart()}\r\n {this.renderCalculationTotal()}\r\n
\r\n ) : null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState, ownProps: ExternalCaseDetailsCaseTabCalculationDetailsProps) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app,\r\n vehicleState: state.vehicle\r\n }),\r\n null\r\n)(withSnackbar(CaseDetailsCaseTabCalculationDetails as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n ApplicationState,\r\n CaseSettingsState,\r\n AppState,\r\n CaseSettingsActionCreators\r\n} from '../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport {\r\n Tooltip,\r\n Card,\r\n CardContent,\r\n Button,\r\n IconButton,\r\n Grid,\r\n Dialog,\r\n DialogTitle,\r\n Typography,\r\n DialogContent,\r\n TextField,\r\n Radio,\r\n Divider,\r\n Box,\r\n CircularProgress\r\n} from '@material-ui/core';\r\nimport { isUndefined, rest } from 'lodash';\r\n\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport {\r\n CarClassRentPrice,\r\n CaseCalculationAlternativePart,\r\n CaseCalculationHistory,\r\n CaseCalculationPart,\r\n CaseVehicleHistory,\r\n ChangeCaseStatusRequest,\r\n ManipulationTariffPercentResponse,\r\n Offer,\r\n OfferLine,\r\n OfferPart,\r\n OriginalPart,\r\n PartNotifySuppportRequest,\r\n TariffPercentResponse,\r\n VehicleDto\r\n} from '../../interfaces/Case';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport { IReferentialService } from '../../services/Interfaces/IReferentialService';\r\nimport Referentials from '../../helpers/Referentials.json';\r\nimport {\r\n ReferentialCode,\r\n ParametreCode,\r\n CarPartQualityRatings,\r\n CalculationSectionCodeEnum,\r\n AlternativeCode,\r\n AdditionalInfoCode,\r\n CaseStatusCodeEnum,\r\n MakeExceptionEnum,\r\n MakeException,\r\n OriginalPartShortNumberException,\r\n SupplierCode,\r\n OrganizationTypeCode\r\n} from '../../helpers/Constants';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport AddCircleTwoToneIcon from '@material-ui/icons/AddCircleTwoTone';\r\nimport FileCopyOutlinedIcon from '@material-ui/icons/FileCopyOutlined';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport NumberFormat from 'react-number-format';\r\nimport { Organization, OrganizationOilMappingRequest } from '../../interfaces/Organization';\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { IAppUserService } from '../../services/Interfaces/IAppUserService';\r\nimport { WorkflowCalculation, WorkflowPartner, WorkflowSupplier } from '../../interfaces/Workflow';\r\nimport * as XLSX from 'xlsx';\r\nimport {\r\n ImportAlternativePartsFileHeader,\r\n ImportOriginalPartsFileHeader\r\n} from '../../helpers/Constants';\r\nimport { IOrganizationService } from '../../services/Interfaces/IOrganizationService';\r\nimport * as R from 'ramda';\r\nimport { FormCode } from '../../helpers/forms/FormCode';\r\nimport { CalculationRequest } from '../../interfaces/GtService';\r\nimport DropdownTreeSelect from 'react-dropdown-tree-select';\r\nimport 'react-dropdown-tree-select/dist/styles.css';\r\nimport _ from 'lodash';\r\nimport { Order, OrderPart, PartToBeOrdered } from '../../interfaces/Order';\r\nimport { IOrderService } from '../../services/Interfaces/IOrderService';\r\nimport MUIDataTable, {\r\n MUIDataTableColumnOptions,\r\n MUIDataTableMeta,\r\n SelectableRows\r\n} from 'mui-datatables';\r\nimport { MUITranslations } from '../../helpers/MUITableTranslations';\r\nimport { isNullOrUndefined } from 'util';\r\nimport { v4 as uuid } from 'uuid';\r\nimport { VehicleHelper } from '../../helpers/VehicleHelper';\r\nimport { Utils } from '../../helpers/Utils';\r\nimport NotificationImportantOutlinedIcon from '@material-ui/icons/NotificationImportantOutlined';\r\n\r\nexport interface ExternalCaseDetailsAlternativeCalculationPiecesProps {\r\n calculationHistoryId: number;\r\n workflowCalculation: WorkflowCalculation | undefined;\r\n handleUpdateAlternativeCalcAmount: (calculationParts: CaseCalculationPart[]) => void;\r\n defaultMaxDeliveryTime: number;\r\n optmizationType: number;\r\n resetOptimizatonType: () => void;\r\n onSave: () => void;\r\n orderList: Order[];\r\n manipulationTariff: ManipulationTariffPercentResponse;\r\n additionTariff: TariffPercentResponse;\r\n insurerList: IReferential[];\r\n serviceId: number | null;\r\n discountTariff: TariffPercentResponse;\r\n packageCalculationId: number | null;\r\n nonStockSuppliers: WorkflowSupplier[];\r\n}\r\n\r\ninterface ICaseDetailsAlternativeCalculationPiecesState {\r\n caseCalculationHistoryDetails: CaseCalculationHistory;\r\n calculationParts: CaseCalculationPart[];\r\n newCalculationPart: CaseCalculationPart | null;\r\n newCalculationPartId: number | null;\r\n partQualityTypes: IReferential[];\r\n supplierList: Organization[];\r\n isDialogOpen: boolean;\r\n isAddOriginalPartDialogOpen: boolean;\r\n isLoading: boolean;\r\n currentSection: IReferential | null;\r\n TVA: string;\r\n modified: boolean;\r\n selectedAlternativePartValue: number;\r\n caseCalculationAlternativePart: CaseCalculationAlternativePart[];\r\n newCaseCalculationAlternativePart: CaseCalculationAlternativePart | null;\r\n clearStateAlternativeParts: boolean;\r\n calculationPartFormTypeAdd: boolean;\r\n partLoaders: boolean[];\r\n partSection: IReferential | null;\r\n isDialogModifiedOpen: boolean;\r\n isConfirm: boolean;\r\n selectedOrganizationBranch: OrganizationBranch | null;\r\n organizationBranches: OrganizationBranch[];\r\n currentWorkflowContainsOrderFormOrInterogatePartner: boolean;\r\n isDialogOpenConfirmationOrgPartner: boolean;\r\n orderPartList: OrderPart[];\r\n calculationPartsOrdered: CaseCalculationPart[];\r\n isDialogOpenFunctionToBeCalled: GenericVoidFunc | null;\r\n caseStatuses: IReferential[];\r\n isDialogOpenOptimConfirmation: boolean;\r\n caseCalculationAlternativePartCopy: CaseCalculationAlternativePart[];\r\n includeChild: boolean;\r\n carClassRentPrice: CarClassRentPrice | null;\r\n interogateParts: boolean[];\r\n hasBillingForm: boolean;\r\n rentVehiclePrices: VehicleDto | null;\r\n ownStockOrganization: Organization | null;\r\n packageCalculationParts: CaseCalculationPart[];\r\n executing: boolean;\r\n isNotifySupportDialogOpen: boolean;\r\n sendNotificationToSupportLoading: boolean;\r\n}\r\n\r\ninterface OrganizationBranch {\r\n id: number;\r\n organizationId: number;\r\n organizationName: string;\r\n organizationAddress: string;\r\n children: OrganizationBranch[];\r\n parentId: number | null;\r\n path: string | null;\r\n label: string;\r\n checked: boolean | null;\r\n}\r\ntype GenericVoidFunc = (...args: any[]) => void;\r\n\r\ntype ICaseDetailsAlternativeCalculationPiecesProps =\r\n ExternalCaseDetailsAlternativeCalculationPiecesProps & {\r\n caseSettingsState: CaseSettingsState;\r\n appState: AppState;\r\n } & typeof CaseSettingsActionCreators &\r\n ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass CaseDetailsAlternativeCalculationPieces extends React.PureComponent<\r\n ICaseDetailsAlternativeCalculationPiecesProps,\r\n ICaseDetailsAlternativeCalculationPiecesState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private caseService!: ICaseService;\r\n private appReferentialService!: IReferentialService;\r\n private appuserService!: IAppUserService;\r\n private organizationService!: IOrganizationService;\r\n private orderService!: IOrderService;\r\n\r\n static contextType = ApplicationContext;\r\n state = {\r\n partSection: null,\r\n caseCalculationHistoryDetails: {} as CaseCalculationHistory,\r\n caseVehicle: {} as CaseVehicleHistory,\r\n calculationParts: [],\r\n newCalculationPart: null,\r\n newCalculationPartId: null,\r\n partQualityTypes: [],\r\n supplierList: [],\r\n isDialogOpen: false,\r\n isAddOriginalPartDialogOpen: false,\r\n isLoading: true,\r\n currentSection: null,\r\n TVA: '',\r\n modified: false,\r\n selectedAlternativePartValue: 9999999999999,\r\n caseCalculationAlternativePart: [],\r\n newCaseCalculationAlternativePart: null,\r\n clearStateAlternativeParts: false,\r\n calculationPartFormTypeAdd: true,\r\n partLoaders: [],\r\n isDialogModifiedOpen: false,\r\n isConfirm: false,\r\n selectedOrganizationBranch: null,\r\n organizationBranches: [],\r\n currentWorkflowContainsOrderFormOrInterogatePartner: false,\r\n isDialogOpenConfirmationOrgPartner: false,\r\n isDialogOpenFunctionToBeCalled: null,\r\n orderPartList: [],\r\n calculationPartsOrdered: [],\r\n caseStatuses: [],\r\n isDialogOpenOptimConfirmation: false,\r\n caseCalculationAlternativePartCopy: [],\r\n includeChild: false,\r\n carClassRentPrice: null,\r\n interogateParts: [],\r\n hasBillingForm: false,\r\n rentVehiclePrices: null,\r\n ownStockOrganization: null,\r\n packageCalculationParts: [],\r\n executing: false,\r\n isNotifySupportDialogOpen: false,\r\n sendNotificationToSupportLoading: false\r\n } as ICaseDetailsAlternativeCalculationPiecesState;\r\n rowRefs: { [key: number]: React.RefObject } = {};\r\n\r\n public componentDidMount() {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (caseSettings === null || caseSettings === undefined || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n console.log('nonStockSuppliers', this.props.nonStockSuppliers);\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadPiecesDetails();\r\n }\r\n );\r\n }\r\n\r\n componentDidUpdate(prevProps: ICaseDetailsAlternativeCalculationPiecesProps) {\r\n if (this.props.optmizationType === 0) {\r\n return;\r\n }\r\n if (this.props.optmizationType !== prevProps.optmizationType) {\r\n this.filterAlternativePartsByOptimization();\r\n this.props.resetOptimizatonType();\r\n }\r\n }\r\n\r\n getInsurerId = () : number | null => {\r\n if (isNullOrUndefined(this.props.workflowCalculation)) {\r\n return null;\r\n }\r\n \r\n if (R.isNil(this.props.caseSettingsState.case!.caseEvent)) {\r\n return null;\r\n }\r\n\r\n if (R.isNil(this.props.caseSettingsState.case!.caseEvent.insurerName)) {\r\n return null;\r\n }\r\n\r\n const insurerName = this.props.caseSettingsState.case!.caseEvent.insurerName;\r\n console.log('insurerName', insurerName);\r\n const insurer = _.find(this.props.insurerList, function (insurer) {\r\n return insurer.displayName.toLowerCase() === insurerName.toLowerCase();\r\n });\r\n console.log('insurer', insurer);\r\n if (R.isNil(insurer)) {\r\n return null;\r\n }\r\n return insurer.id;\r\n }\r\n\r\n loadPiecesDetails = async () => {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (caseSettings === null || caseSettings === undefined || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n const casee = this.props.caseSettingsState.case;\r\n const TVA = this.props.caseSettingsState.case!.caseParameters.find(\r\n (item) => item.parameter!.code === ParametreCode.TVA\r\n )!.value;\r\n\r\n if (casee === null) {\r\n return;\r\n }\r\n\r\n const refQualityPart = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.CarPartCategory\r\n );\r\n const currencyRef = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.Currency\r\n );\r\n const refCaseStatus = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.CaseStatus\r\n );\r\n\r\n const orderList = this.props.orderList;\r\n const orderPartList: OrderPart[] = [];\r\n orderList.forEach((order) => {\r\n if (order.orderParts?.length) {\r\n order.orderParts.forEach((orderPart) => {\r\n if (!orderPart.isDeleted) {\r\n orderPartList.push(orderPart);\r\n }\r\n });\r\n }\r\n });\r\n console.log('orderList', orderList);\r\n console.log('orderPartList', orderPartList);\r\n const [\r\n currencyLIst,\r\n caseCalculation,\r\n caseCalculationParts,\r\n partQualityTypes,\r\n sections,\r\n caseStatuses,\r\n ownStockOrganization,\r\n packageCalculationParts\r\n ] = await Promise.all([\r\n this.appReferentialService.Get(currencyRef!.baseUrl),\r\n this.props.calculationHistoryId\r\n ? this.caseService.GetCaseCalculationHistoryDetails(this.props.calculationHistoryId)\r\n : ({} as CaseCalculationHistory),\r\n this.props.calculationHistoryId\r\n ? this.caseService.GetCaseCalculationParts(this.props.calculationHistoryId)\r\n : ([] as CaseCalculationPart[]),\r\n this.appReferentialService.Get(refQualityPart!.baseUrl),\r\n this.caseService.GetCalculationSections(),\r\n this.appReferentialService.Get(refCaseStatus!.baseUrl),\r\n this.organizationService.GetSupplierStockOrganization(OrganizationTypeCode.SUPPLIER),\r\n this.props.packageCalculationId\r\n ? this.caseService.GetCaseCalculationParts(this.props.packageCalculationId)\r\n : ([] as CaseCalculationPart[]),\r\n ]);\r\n\r\n console.log('packageCalculationParts', packageCalculationParts);\r\n let carClassRentPrices: CarClassRentPrice[] = [];\r\n let rentVehiclePrices : VehicleDto[] = [];\r\n if (!R.isNil(casee) && !R.isNil(casee.caseVehicle)) {\r\n const carClassId = casee.caseVehicle.carClassId;\r\n if (!R.isNil(carClassId)) {\r\n carClassRentPrices = await this.caseService.GetCarClassRentPriceByClassId(carClassId);\r\n }\r\n\r\n //verify if is PRC integration\r\n if (this.props.caseSettingsState.caseSettings!.workflow.isPrcIntegration) {\r\n rentVehiclePrices = await this.caseService.FleetSearchVehicle(casee.caseVehicle.vin!, casee.caseVehicle.modelId!);\r\n console.log('rentVehiclePrices', rentVehiclePrices);\r\n //Check if the vehicle or the model class is found in the fleet\r\n if (!rentVehiclePrices.length) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('NO_CAR_CLASS_FOUNDED_IN_FLEET', 'Nu s-a gasit masina/clasa in flota!'), {\r\n variant: 'warning'\r\n });\r\n } \r\n }\r\n \r\n const brand = VehicleHelper.GetBrand(\r\n this.props.caseSettingsState.case,\r\n null\r\n );\r\n console.log('brand', brand);\r\n console.log('MakeException', MakeException);\r\n if (MakeException.includes(brand.toUpperCase())) {\r\n for (const cp of caseCalculationParts) {\r\n if (cp.calculationSection!.code === CalculationSectionCodeEnum.PART) {\r\n const trimmedNumber = cp.guideNumber.replace(/^0+/, '');\r\n console.log('before', cp.guideNumber);\r\n console.log('after', trimmedNumber);\r\n cp.guideNumber = _.cloneDeep(trimmedNumber);\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (this.props.caseSettingsState.caseSettings!.workflow.useRoundUp) {\r\n for (const cp of caseCalculationParts) {\r\n if (cp.calculationSection!.code === CalculationSectionCodeEnum.PART) {\r\n if (OriginalPartShortNumberException.includes(cp.repairMethod)) {\r\n const result = Math.ceil(cp.pieceNr);\r\n console.log('before', cp.pieceNr);\r\n console.log('after', result);\r\n cp.pieceNr = _.cloneDeep(result);\r\n }\r\n }\r\n }\r\n }\r\n const workflowSuppliersList =\r\n this.props.caseSettingsState.caseSettings!.workflow.workflowSuppliers;\r\n caseCalculation.currency = currencyLIst.find(\r\n (item) => item.code === caseCalculation.currencyCode\r\n )!;\r\n\r\n const caseCalculationPartsCopy = _.cloneDeep(caseCalculationParts);\r\n const calculationPartsOrdered: CaseCalculationPart[] = [];\r\n const packageCalculationId = this.props.packageCalculationId;\r\n console.log('caseCalculationParts before', caseCalculationParts);\r\n for (let i = 0; i < caseCalculationPartsCopy.length; i++) {\r\n if (caseCalculationPartsCopy[i].calculationSection!.code === CalculationSectionCodeEnum.PART) {\r\n if (this.props.packageCalculationId) {\r\n caseCalculationPartsCopy[i].isNew = true;\r\n }\r\n const orderPart = _.find(orderPartList, function (orderPart) {\r\n return (\r\n (orderPart.guideNumber === caseCalculationParts[i].guideNumber && orderPart.name === caseCalculationParts[i].name)\r\n ||\r\n (packageCalculationId != null && OriginalPartShortNumberException.includes(caseCalculationParts[i].repairMethod) && orderPart.repairMethod === caseCalculationParts[i].repairMethod)\r\n );\r\n });\r\n\r\n if (orderPart) {\r\n caseCalculationPartsCopy[i].isOrdered = true;\r\n caseCalculationPartsCopy[i].alternativeGuideNumber = orderPart.alternativeGuideNumber;\r\n caseCalculationPartsCopy[i].alternativePartCode = orderPart.alternativePartCode;\r\n caseCalculationPartsCopy[i].alternativePartDiscount = orderPart.alternativePartDiscount;\r\n caseCalculationPartsCopy[i].alternativePartName = orderPart.alternativePartName;\r\n caseCalculationPartsCopy[i].alternativePartQualityId = orderPart.alternativePartQualityId;\r\n caseCalculationPartsCopy[i].alternativePartRemarks = orderPart.alternativePartRemarks;\r\n caseCalculationPartsCopy[i].alternativePartStockLocation =\r\n orderPart.alternativePartStockLocation;\r\n caseCalculationPartsCopy[i].alternativePartStockQuantity =\r\n orderPart.alternativePartStockQuantity;\r\n caseCalculationPartsCopy[i].alternativePrice = orderPart.alternativePrice;\r\n caseCalculationPartsCopy[i].alternativePartDiscount = orderPart.alternativePartDiscount;\r\n caseCalculationPartsCopy[i].carPartCategoryId = orderPart.carPartCategoryId;\r\n caseCalculationPartsCopy[i].codeType = orderPart.codeType;\r\n caseCalculationPartsCopy[i].deliveryTime = orderPart.deliveryTime?.toString() ?? '';\r\n caseCalculationPartsCopy[i].discount = orderPart.discount ?? 0;\r\n caseCalculationPartsCopy[i].excludeFromOrder = orderPart.excludeFromOrder;\r\n caseCalculationPartsCopy[i].guideNumber = orderPart.guideNumber;\r\n caseCalculationPartsCopy[i].name = orderPart.name;\r\n caseCalculationPartsCopy[i].originalPrice = orderPart.originalPrice;\r\n caseCalculationPartsCopy[i].pieceNr = orderPart.pieceNr;\r\n caseCalculationPartsCopy[i].producer = orderPart.producer;\r\n caseCalculationPartsCopy[i].remarks = orderPart.remarks;\r\n caseCalculationPartsCopy[i].supplierId = orderPart.supplierId;\r\n caseCalculationPartsCopy[i].type = orderPart.type;\r\n caseCalculationPartsCopy[i].validityTime = orderPart.validityTime\r\n ? orderPart.validityTime.toString()\r\n : null;\r\n caseCalculationPartsCopy[i].orderCode = orderPart.orderCode;\r\n caseCalculationPartsCopy[i].locationId = orderPart.locationId;\r\n caseCalculationPartsCopy[i].productId = orderPart.productId;\r\n caseCalculationPartsCopy[i].codEan = orderPart.codEan;\r\n calculationPartsOrdered.push(caseCalculationPartsCopy[i]);\r\n } else {\r\n if (orderPartList.length > 0) { \r\n caseCalculationPartsCopy[i].isNew = true;\r\n }\r\n }\r\n }\r\n }\r\n\r\n console.log('after', caseCalculationPartsCopy);\r\n const usr = caseCalculation.userId\r\n ? await this.appuserService.GetUserInfo(caseCalculation.userId)\r\n : this.props.appState.appUser;\r\n\r\n caseCalculation.user = usr;\r\n\r\n const suppliers =\r\n workflowSuppliersList.length > 0\r\n ? await this.organizationService.GetUserOrganizationsByIds(\r\n Array.from(new Set(workflowSuppliersList.map((item) => item.supplierId)))\r\n )\r\n : [];\r\n const partLoaders: boolean[] = [];\r\n const interogateParts: boolean[] = [];\r\n caseCalculationPartsCopy\r\n .filter((item) => item.calculationSection!.code === CalculationSectionCodeEnum.PART)\r\n .forEach((item) => {\r\n partLoaders.push(false);\r\n if (!item.isOrdered) {\r\n interogateParts.push(false);\r\n }\r\n });\r\n\r\n let workflowPartners = [] as OrganizationBranch[];\r\n let currentWorkflowPartner = {} as OrganizationBranch | null;\r\n\r\n const workflowSectionStepForms =\r\n this.props.caseSettingsState.caseSettings?.workflow.workflowSections\r\n ?.map((x) => x.workflowSectionSteps)\r\n .reduce((acc, val) => acc.concat(val), [])\r\n .map((x) => x.workflowSectionStepForms)\r\n .reduce((acc, val) => acc.concat(val), []) || [];\r\n const currentWorkflowContainsOrderFormOrInterogatePartner =\r\n workflowSectionStepForms.some((x) => x.form.code === FormCode.CASE_ORDER) &&\r\n (this.props.workflowCalculation?.interogatePartner ?? false);\r\n\r\n const hasBillingForm = workflowSectionStepForms.some(\r\n (x) => x.form.code === FormCode.CASE_EVENT_DATE_FACT\r\n );\r\n\r\n if (\r\n this.props.caseSettingsState.caseSettings?.workflow.workflowPartners &&\r\n this.props.caseSettingsState.caseSettings?.workflow.workflowPartners.length > 0\r\n ) {\r\n const partnerOrganizations =\r\n this.props.caseSettingsState.caseSettings?.workflow.workflowPartners.map((x) => x.partner);\r\n for (const x of partnerOrganizations) {\r\n workflowPartners.push({\r\n id: x!.id,\r\n organizationId: x!.id,\r\n organizationName: x!.name,\r\n organizationAddress: x!.address,\r\n children: [],\r\n parentId: x!.parentId,\r\n path: null,\r\n label: x?.name + (x?.address ? ' ' + x?.address : ''),\r\n checked: false\r\n });\r\n }\r\n }\r\n\r\n const parentIds = workflowPartners.filter((x) => !x.parentId).map((x) => x.id);\r\n\r\n const organizationHierarchy = await this.organizationService.GetOrganizationDescendents(\r\n parentIds\r\n );\r\n\r\n const organizationBranches =\r\n organizationHierarchy.map((x) => {\r\n return {\r\n id: x.id,\r\n organizationId: x.id,\r\n organizationName: x.name,\r\n organizationAddress: x.address,\r\n children: [],\r\n parentId: x.parentId,\r\n path: null,\r\n label: x.name + (x.address ? ' ' + x.address : ''),\r\n checked: false\r\n } as OrganizationBranch;\r\n }) || [];\r\n\r\n organizationBranches.forEach((x) => {\r\n workflowPartners.push(x);\r\n });\r\n\r\n let deliveryOrganizationId: number | null | undefined;\r\n if (!isNullOrUndefined(this.props.caseSettingsState.case!.caseEvent)) {\r\n deliveryOrganizationId = this.props.caseSettingsState.case!.caseEvent!.deliveryOrganizationId;\r\n } else {\r\n deliveryOrganizationId = this.props.appState.appUser?.organizationId;\r\n }\r\n \r\n console.log('deliveryOrganizationId', deliveryOrganizationId);\r\n\r\n if (currentWorkflowContainsOrderFormOrInterogatePartner) {\r\n const arrMap = workflowPartners.reduce((acc: any, el: any, i) => {\r\n acc[el.id] = i;\r\n return acc;\r\n }, {});\r\n\r\n const roots = [] as OrganizationBranch[];\r\n\r\n // Push each element to parent's children array\r\n workflowPartners.forEach((el) => {\r\n if (el.parentId === null || arrMap[el.parentId] == null) {\r\n roots.push(el);\r\n } else {\r\n workflowPartners[arrMap[el.parentId]].children.push(el);\r\n }\r\n });\r\n\r\n currentWorkflowPartner =\r\n roots.find((x) => x.organizationId === deliveryOrganizationId) || null;\r\n workflowPartners = roots;\r\n this.assignObjectPaths(workflowPartners, '');\r\n if (currentWorkflowPartner) {\r\n const selectedItemFromTree = this.findRecursive(\r\n workflowPartners,\r\n currentWorkflowPartner?.organizationId\r\n );\r\n if (selectedItemFromTree) {\r\n selectedItemFromTree.checked = true;\r\n }\r\n }\r\n } else {\r\n currentWorkflowPartner =\r\n organizationBranches.find(\r\n (x) => x.organizationId === deliveryOrganizationId\r\n ) || null;\r\n }\r\n if (currentWorkflowPartner == null) {\r\n currentWorkflowPartner =\r\n organizationBranches.find(\r\n (x) => x.organizationId === deliveryOrganizationId\r\n ) || null;\r\n if (currentWorkflowPartner != null) {\r\n currentWorkflowPartner.checked = true;\r\n }\r\n }\r\n\r\n console.log('currentWorkflowPartner', currentWorkflowPartner);\r\n console.log('workflowPartners', workflowPartners);\r\n console.log('carClassRentPrices', carClassRentPrices);\r\n this.setState({\r\n caseCalculationHistoryDetails: caseCalculation,\r\n calculationParts: caseCalculationPartsCopy,\r\n partQualityTypes: partQualityTypes.filter((item) => item.isActive === true),\r\n TVA: TVA,\r\n supplierList: suppliers.filter((ws) => ws.isActive === true),\r\n isLoading: false,\r\n partLoaders: partLoaders,\r\n partSection: sections.find((item) => item.code === CalculationSectionCodeEnum.PART)!,\r\n selectedOrganizationBranch: currentWorkflowPartner || null,\r\n organizationBranches: workflowPartners || [],\r\n currentWorkflowContainsOrderFormOrInterogatePartner:\r\n currentWorkflowContainsOrderFormOrInterogatePartner,\r\n calculationPartsOrdered: calculationPartsOrdered,\r\n caseStatuses: caseStatuses,\r\n carClassRentPrice: carClassRentPrices.length ? carClassRentPrices[0] : null,\r\n interogateParts: interogateParts,\r\n hasBillingForm: hasBillingForm,\r\n rentVehiclePrices: rentVehiclePrices.length ? rentVehiclePrices[0] : null,\r\n ownStockOrganization: ownStockOrganization,\r\n packageCalculationParts: packageCalculationParts,\r\n orderPartList: orderPartList\r\n }, () => {\r\n this.checkPackageNotification();\r\n });\r\n };\r\n\r\n assignObjectPaths = (obj: any, stack: any) => {\r\n Object.keys(obj).forEach((k) => {\r\n const node = obj[k];\r\n if (node && typeof node === 'object' && !Array.isArray(node)) {\r\n node.path = stack ? `${stack}.${k}` : k;\r\n this.assignObjectPaths(node, node.path);\r\n }\r\n });\r\n };\r\n\r\n isDialogOpenOptimizeConfirmationHandler = () => {\r\n const decimalError = this.validateOrginalParts();\r\n console.log('Decimal Error: ', decimalError);\r\n if (decimalError) {\r\n return;\r\n }\r\n \r\n const hasChildItem = [...this.state.caseCalculationAlternativePartCopy].find(caseCalculationAlternativePart => caseCalculationAlternativePart.isChild);\r\n console.log('Has Child Items', hasChildItem);\r\n if (hasChildItem) {\r\n this.setState({\r\n isDialogOpenOptimConfirmation: true\r\n });\r\n return;\r\n } else {\r\n this.setState({\r\n isDialogOpenOptimConfirmation: false\r\n });\r\n this.optimizeAllParts(true);\r\n return;\r\n }\r\n };\r\n\r\n checkIfOptimIsPossible = () : boolean => {\r\n return _.findIndex(this.state.interogateParts, function(el) {\r\n return !el;\r\n }) != -1 ? false : true;\r\n }\r\n\r\n getParentParts = (originalPartId: number) => {\r\n //Toate piesele alternative\r\n const groupedParts = _.filter(\r\n [...this.state.caseCalculationAlternativePartCopy],\r\n function (object) {\r\n return object.originalPartId === originalPartId;\r\n }\r\n );\r\n\r\n //Toate piesele alternative care nu sunt copiii\r\n const parentParts = _.filter(_.cloneDeep(groupedParts), function (object) {\r\n return !object.isChild && object.formatedDeliveryTime != null;\r\n });\r\n const excludedParentParts = _.filter(_.cloneDeep(groupedParts), function (object) {\r\n return !object.isChild && object.formatedDeliveryTime == null;\r\n });\r\n\r\n console.log(groupedParts);\r\n console.log('Before: ', parentParts);\r\n console.log('Piese altenative excluse din cauza ca au formatedDeliveryTime = null:', excludedParentParts);\r\n\r\n if (this.state.includeChild) {\r\n for(let i = 0; i < parentParts.length; i++) {\r\n //Toti copiii asociati unei piese alternative parinte\r\n const childParts = _.filter(groupedParts, function (object) {\r\n return (\r\n object.isChild &&\r\n object.bundleNo != null &&\r\n object.bundleNo == parentParts[i].bundleNo &&\r\n object.alternativePartCode !=\r\n parentParts[i].alternativePartCode\r\n );\r\n });\r\n parentParts[i].alternativePrice = parentParts[i].alternativePrice + _.cloneDeep(_.sumBy(childParts, 'alternativePrice'));\r\n }\r\n }\r\n console.log('After: ', parentParts);\r\n\r\n return parentParts;\r\n }\r\n\r\n optimize = async () => {\r\n this.setState(\r\n {\r\n partLoaders: this.state.partLoaders.map(() => true)\r\n },\r\n async () => {\r\n const offerLines : OfferLine[] = [];\r\n\r\n const parts = this.state.calculationParts.filter(\r\n (item) => item.calculationSectionId === this.state.partSection!.id\r\n );\r\n for (const cp of parts) { \r\n if (cp.calculationSectionId === this.state.partSection!.id) {\r\n const parentParts = this.getParentParts(cp.id);\r\n if (parentParts.length == 0) {\r\n console.log('Nu avem piese alternative');\r\n } else {\r\n offerLines.push({\r\n originalPartId: cp.id,\r\n guideNumber: cp.guideNumber,\r\n quantity: cp.pieceNr,\r\n offerParts: parentParts.map((part: CaseCalculationAlternativePart) => {\r\n return {\r\n alternativePartCode: part.alternativePartCode,\r\n alternativePartName: part.name,\r\n alternativePrice: part.alternativePrice,\r\n deliveryTime: part.formatedDeliveryTime,\r\n availableQuantity: part.availableQuantity ?? 99999,\r\n rowId: part.id\r\n } as OfferPart;\r\n })\r\n } as OfferLine);\r\n }\r\n }\r\n }\r\n \r\n const getBestOfferRequest = {\r\n caseId: this.props.caseSettingsState.case!.id,\r\n price: this.props.caseSettingsState.caseSettings!.workflow.isPrcIntegration ? this.getPriceForInsurer(this.state.rentVehiclePrices) \r\n : this.state.carClassRentPrice?.price ?? 0,\r\n offerLines: offerLines\r\n } as Offer;\r\n\r\n console.log('Best offer request', getBestOfferRequest);\r\n const bestOfferResult = await this.caseService.GetBestOffer(\r\n getBestOfferRequest\r\n );\r\n console.log('Best offer result', bestOfferResult);\r\n for (const cp of parts) { \r\n if (cp.calculationSectionId === this.state.partSection!.id) {\r\n const bestOfferLine = _.find(bestOfferResult.offerLines, function(offerLine) {\r\n return offerLine.originalPartId == cp.id;\r\n });\r\n console.log('bestOfferLine', bestOfferLine);\r\n if (bestOfferLine) {\r\n if (bestOfferLine.offerParts.length) {\r\n const bestOfferPart = bestOfferLine!.offerParts[0];\r\n console.log('bestOfferPart', bestOfferPart);\r\n const alternativePart = this.state.caseCalculationAlternativePartCopy.find(\r\n (item) => item.id === bestOfferPart.rowId\r\n );\r\n console.log('alternativePart', alternativePart);\r\n this.handleAlternativePartSelect(\r\n bestOfferPart.rowId,\r\n bestOfferLine.originalPartId,\r\n this.state.includeChild ? alternativePart!\r\n : {...alternativePart!, bundleNo: null}\r\n );\r\n } else {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('NO_OPTIM', 'Nu s-a gasit niciun optim pentru:') + ' ' + cp.guideNumber, {\r\n variant: 'warning'\r\n });\r\n }\r\n }\r\n }\r\n }\r\n \r\n this.setState({\r\n partLoaders: this.state.partLoaders.map(() => false)\r\n }, () => {\r\n this.scrollToSelectedItems();\r\n });\r\n }\r\n );\r\n };\r\n\r\n\r\n scrollToSelectedItems = () => {\r\n console.log('rowRefs', this.rowRefs);\r\n const caseCalculationOriginalPartsCopy = [...this.state.calculationParts].reverse();\r\n const caseCalculationAlternativePartCopy = [...this.state.caseCalculationAlternativePart];\r\n caseCalculationOriginalPartsCopy\r\n .filter((item) => item.calculationSectionId === this.state.partSection!.id)\r\n .map((calculationOriginalPart, index) => {\r\n const altParts = caseCalculationAlternativePartCopy.filter(\r\n (item2) => item2.originalPartId === calculationOriginalPart.id && item2.selectedAlternativePart != 9999999999999\r\n );\r\n if (altParts.length > 0) {\r\n // Verifică dacă piesa selectată este vizibilă și derulează la ea\r\n const selectedAlternativePartId = altParts[0].selectedAlternativePart;\r\n if (this.rowRefs[selectedAlternativePartId]?.current) {\r\n console.log('Scroll to row', altParts[0]);\r\n this.rowRefs[selectedAlternativePartId].current?.scrollIntoView({\r\n behavior: 'smooth',\r\n block: 'center'\r\n });\r\n }\r\n }\r\n });\r\n }\r\n getPriceForInsurer(item: VehicleDto | null): number {\r\n if (item === null) return 0;\r\n\r\n if (R.isNil(this.props.caseSettingsState.case!.caseEvent)) {\r\n return 0;\r\n }\r\n //verify is insurerName is null or empty\r\n const insurerName = this.props.caseSettingsState.case!.caseEvent!.insurerName.toLowerCase();\r\n if (R.isNil(insurerName) || insurerName === '') {\r\n return 0;\r\n }\r\n const insurer = _.find(this.props.insurerList, function (insurer) {\r\n return insurer.displayName.toLowerCase() === insurerName.toLowerCase();\r\n });\r\n console.log('insurer', insurer);\r\n if (R.isNil(insurer)) {\r\n return 0;\r\n }\r\n\r\n let insurerCode = insurer.code?.toLowerCase() ?? '';\r\n insurerCode += 'Pret';\r\n // Check if the insurer name is a valid property in the item object\r\n if (item.hasOwnProperty(insurerCode)) {\r\n const value = item[insurerCode as keyof VehicleDto];\r\n if (typeof value === 'undefined' || value === null) {\r\n return 0;\r\n }\r\n\r\n // Convert the value to a number\r\n const numericValue = parseFloat(value.toString());\r\n\r\n \r\n // Check if the conversion was successful\r\n if (!isNaN(numericValue)) {\r\n return numericValue;\r\n } else {\r\n return 0; // Return 0 if the value cannot be converted to a number\r\n }\r\n } else {\r\n return 0; // Return 0 if the insurer name is not found\r\n }\r\n }\r\n\r\n validateOrginalParts = () : boolean => {\r\n const calculationParts = this.state.calculationParts.filter(\r\n (item) => item.calculationSectionId === this.state.partSection!.id && !item.isOrdered\r\n );\r\n let decimalError = false;\r\n calculationParts.map((calcPart) => {\r\n if (!this.props.caseSettingsState.caseSettings!.workflow.useRoundUp && OriginalPartShortNumberException.includes(calcPart.repairMethod)) {\r\n return;\r\n }\r\n if (!Number.isInteger(calcPart.pieceNr)) {\r\n decimalError = true;\r\n this.validateOrigPartUnitsAdd(calcPart.id);\r\n return;\r\n }\r\n });\r\n\r\n if (decimalError) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'DECIMAL_ERROR_MSG',\r\n 'Cantitatea comandata trebuie sa fie un numar intreg fara zecimale'\r\n ),\r\n {\r\n variant: 'error'\r\n }\r\n );\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n optimizeAllParts = async (includeChild: boolean) => {\r\n this.setState({\r\n isDialogOpenOptimConfirmation: false,\r\n includeChild: includeChild\r\n });\r\n \r\n try {\r\n await this.optimize();\r\n } catch (error) {\r\n console.log('Eroare', error);\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n this.setState({\r\n partLoaders: this.state.partLoaders.map(() => false)\r\n });\r\n }\r\n \r\n }\r\n\r\n\r\n isDialogOpenConfirmationHandler = (func: GenericVoidFunc) => {\r\n if (this.state.currentWorkflowContainsOrderFormOrInterogatePartner) {\r\n this.setState({\r\n isDialogOpenConfirmationOrgPartner:\r\n this.state.currentWorkflowContainsOrderFormOrInterogatePartner,\r\n isDialogOpenFunctionToBeCalled: func\r\n });\r\n } else {\r\n func();\r\n }\r\n };\r\n\r\n interogateAll = async () => {\r\n try {\r\n const parts = this.state.calculationParts.filter(\r\n (item) => item.calculationSectionId === this.state.partSection!.id && !item.isOrdered\r\n );\r\n this.setState({\r\n caseCalculationAlternativePart: [],\r\n caseCalculationAlternativePartCopy: []\r\n });\r\n\r\n for (const cp of parts) {\r\n const index = parts.indexOf(cp);\r\n if (cp.calculationSectionId === this.state.partSection!.id) {\r\n await Promise.all([\r\n this.oilMapping(cp),\r\n this.interogate(cp.id, cp.guideNumber, index)\r\n ]);\r\n }\r\n }\r\n\r\n // this.props.enqueueSnackbar(this.translatorService.Tranlate(\"SUCCES_MSG\", \"OK\"), { variant: 'success' });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n uuidToNumber = (): number => {\r\n const uniqueId = uuid();\r\n const hexString = uniqueId.replace(/-/g, '');\r\n const numericValue = parseInt(hexString, 16);\r\n //number with 9 characters\r\n return numericValue % 1000000000;\r\n }\r\n\r\n oilMapping = async (cp: CaseCalculationPart) => {\r\n const oilMapping = this.props.workflowCalculation!.oilMapping ? await this.organizationService.GetOrganizationOilMapping(\r\n {\r\n organizationId: this.state.selectedOrganizationBranch?.organizationId ?? this.props.appState.appUser!.organizationId,\r\n partCode: cp.guideNumber,\r\n cupiCode: cp.repairMethod,\r\n auxiliarInformation: cp.auxiliarInformation\r\n } as OrganizationOilMappingRequest\r\n ) : null;\r\n\r\n if (oilMapping != null && oilMapping.price) { \r\n console.log('oilMapping', oilMapping);\r\n cp.originalPrice = oilMapping.price;\r\n }\r\n }\r\n\r\n interogate = async (originalPartId: number, partCode: string, index: number) => {\r\n this.setState(\r\n {\r\n partLoaders: this.state.partLoaders.map((item, itemIndex) =>\r\n itemIndex === index ? true : item\r\n )\r\n },\r\n async () => {\r\n const alternativeParts = await this.caseService.InterogateCaseCalculationsAlternativeParts(\r\n originalPartId,\r\n partCode,\r\n this.props.additionTariff.value,\r\n this.props.discountTariff.value,\r\n this.props.caseSettingsState.caseSettings!.workflow.id,\r\n this.state.selectedOrganizationBranch?.organizationId\r\n );\r\n\r\n const differentCaseCalculationAlternativePart: CaseCalculationAlternativePart[] = _.filter(\r\n [...this.state.caseCalculationAlternativePart],\r\n function (object) {\r\n return object.originalPartId != originalPartId;\r\n }\r\n );\r\n const calculationsAlternativeParts = [...differentCaseCalculationAlternativePart];\r\n [...alternativeParts].forEach((item, index) => {\r\n item.id = this.uuidToNumber();\r\n console.log(item.id);\r\n });\r\n\r\n console.log(\r\n 'differentCaseCalculationAlternativePart',\r\n differentCaseCalculationAlternativePart\r\n );\r\n calculationsAlternativeParts.push(...alternativeParts);\r\n console.log('NEW calculationsAlternativeParts', calculationsAlternativeParts);\r\n this.setState({\r\n caseCalculationAlternativePart: calculationsAlternativeParts,\r\n caseCalculationAlternativePartCopy: calculationsAlternativeParts,\r\n partLoaders: this.state.partLoaders.map((item, itemIndex) =>\r\n itemIndex === index ? false : item\r\n ),\r\n interogateParts: this.state.interogateParts.map((item, itemIndex) => \r\n itemIndex === index ? true : item\r\n )\r\n });\r\n }\r\n );\r\n };\r\n\r\n interogateAlternativeParts = async (originalPartId: number, partCode: string, cp: CaseCalculationPart, index: number) => {\r\n try {\r\n await Promise.all([\r\n this.oilMapping(cp),\r\n this.interogate(originalPartId, partCode, index)\r\n ]);\r\n\r\n // this.props.enqueueSnackbar(this.translatorService.Tranlate(\"SUCCES_MSG\", \"OK\"), { variant: 'success' });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n newCalculationPart = async (calculationPartId: number | null) => {\r\n this.setState({\r\n calculationPartFormTypeAdd: true\r\n });\r\n\r\n let newCalculationPart;\r\n if (calculationPartId === null) {\r\n newCalculationPart = { ...this.state.newCalculationPart } as CaseCalculationPart;\r\n newCalculationPart.caseCalculationHistoryId = this.props.calculationHistoryId;\r\n newCalculationPart.id = -1 * this.state.calculationParts.length;\r\n newCalculationPart.discount = 0;\r\n newCalculationPart.alternativePartQualityId = null;\r\n newCalculationPart.additionInsurer = null;\r\n } else {\r\n newCalculationPart = this.state.calculationParts.find(\r\n (item) => item.id === calculationPartId\r\n )!;\r\n newCalculationPart.discount = R.isNil(newCalculationPart.discount)\r\n ? 0\r\n : newCalculationPart.discount;\r\n newCalculationPart.alternativePartQualityId = R.isNil(newCalculationPart.alternativePartQualityId)\r\n ? null\r\n : newCalculationPart.alternativePartQualityId;\r\n newCalculationPart.additionInsurer = R.isNil(newCalculationPart.additionInsurer) ? null : newCalculationPart.additionInsurer;\r\n }\r\n \r\n this.setState({\r\n newCalculationPart: newCalculationPart,\r\n newCalculationPartId: calculationPartId,\r\n isAddOriginalPartDialogOpen: true\r\n });\r\n };\r\n\r\n copyCalculationPart = async (calculationPartId: number | null) => {\r\n this.setState({\r\n calculationPartFormTypeAdd: false\r\n });\r\n const originalPart = this.state.calculationParts.find(\r\n (calcPart) => calcPart.id === calculationPartId\r\n );\r\n const newCalculationPart = { ...originalPart } as CaseCalculationPart;\r\n newCalculationPart.id = -1 * this.state.calculationParts.length;\r\n newCalculationPart.pieceNr = 0;\r\n newCalculationPart.alternativeGuideNumber = '';\r\n newCalculationPart.alternativePartCode = '';\r\n newCalculationPart.alternativePartQuality = null;\r\n newCalculationPart.alternativePrice = null;\r\n newCalculationPart.alternativePartDiscount = null;\r\n newCalculationPart.alternativePartName = null;\r\n newCalculationPart.alternativePartQualityId = null;\r\n newCalculationPart.alternativePartStockLocation = null;\r\n newCalculationPart.alternativePartStockQuantity = null;\r\n newCalculationPart.alternativePartRemarks = null;\r\n newCalculationPart.minQty = 0;\r\n newCalculationPart.packing = null;\r\n newCalculationPart.bundleItem = null;\r\n newCalculationPart.bundleNo = null;\r\n newCalculationPart.bundleQuantity = null;\r\n newCalculationPart.alternativeNetPrice = null;\r\n newCalculationPart.alternativePriceWithoutDiscount = null;\r\n\r\n this.setState({\r\n newCalculationPart: newCalculationPart,\r\n newCalculationPartId: newCalculationPart.id,\r\n isAddOriginalPartDialogOpen: true\r\n });\r\n };\r\n\r\n closeDialog = async () => {\r\n this.setState({\r\n isDialogOpen: false,\r\n newCalculationPart: null,\r\n newCalculationPartId: null\r\n });\r\n };\r\n\r\n closeAddOriginalPartDialog = async () => {\r\n this.setState({\r\n isAddOriginalPartDialogOpen: false,\r\n newCalculationPart: null,\r\n newCalculationPartId: null\r\n });\r\n };\r\n\r\n notifySupportCalculationPart = async (calculationPartId: number | null) => {\r\n const originalPart = this.state.calculationParts.find(\r\n (calcPart) => calcPart.id === calculationPartId\r\n );\r\n const newCalculationPart = { ...originalPart } as CaseCalculationPart;\r\n newCalculationPart.id = -1 * this.state.calculationParts.length;\r\n newCalculationPart.pieceNr = 0;\r\n newCalculationPart.alternativeGuideNumber = '';\r\n newCalculationPart.alternativePartCode = '';\r\n newCalculationPart.alternativePartQuality = null;\r\n newCalculationPart.alternativePrice = null;\r\n newCalculationPart.alternativePartDiscount = null;\r\n newCalculationPart.alternativePartName = null;\r\n newCalculationPart.alternativePartQualityId = null;\r\n newCalculationPart.alternativePartStockLocation = null;\r\n newCalculationPart.alternativePartStockQuantity = null;\r\n newCalculationPart.alternativePartRemarks = null;\r\n newCalculationPart.minQty = 0;\r\n newCalculationPart.packing = null;\r\n newCalculationPart.bundleItem = null;\r\n newCalculationPart.bundleNo = null;\r\n newCalculationPart.bundleQuantity = null;\r\n newCalculationPart.alternativeNetPrice = null;\r\n newCalculationPart.alternativePriceWithoutDiscount = null;\r\n this.setState({\r\n newCalculationPart: newCalculationPart,\r\n newCalculationPartId: newCalculationPart.id,\r\n isNotifySupportDialogOpen: true\r\n });\r\n };\r\n\r\n closeNotifySupportDialog = async () => {\r\n this.setState({\r\n isNotifySupportDialogOpen: false,\r\n newCalculationPart: null,\r\n newCalculationPartId: null\r\n });\r\n };\r\n\r\n sendNotificationToSupport = async () => {\r\n console.log('sendNotificationToSupport');\r\n try {\r\n this.setState({\r\n sendNotificationToSupportLoading: true\r\n });\r\n const request = {\r\n caseId: this.props.caseSettingsState.case!.id,\r\n organizationOwnerId: this.props.caseSettingsState.case!.organizationOwnerId,\r\n template: 'GTM_NOTIFY_SUPPORT',\r\n originalPart: {\r\n oeCode: this.state.newCalculationPart!.guideNumber,\r\n name: this.state.newCalculationPart!.name,\r\n price: this.state.newCalculationPart!.originalPrice,\r\n quality: this.state.newCalculationPart!.carPartCategory!.displayName,\r\n comment: this.state.newCalculationPart!.supportComment\r\n } as OriginalPart\r\n } as PartNotifySuppportRequest;\r\n await this.caseService.SendPartNotifySupport(request);\r\n this.setState({\r\n sendNotificationToSupportLoading: false,\r\n isNotifySupportDialogOpen: false\r\n });\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('NOTIFICATION_SEND_SUCCCESS_MSG', 'Notificarea catre support a fost trimisa cu succces!'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n public renderNotifySupportOriginalPartForm() {\r\n return R.isNil(this.state.newCalculationPart) ? null : (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n this.handleAutocompleteOriginalPartQualityChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n ) => {\r\n this.setState({\r\n newCalculationPart: {\r\n ...this.state.newCalculationPart!,\r\n supportComment: e.target.value\r\n }\r\n });\r\n }}\r\n variant=\"outlined\"\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n />\r\n \r\n \r\n
\r\n {this.state.sendNotificationToSupportLoading && \r\n \r\n }\r\n \r\n
\r\n \r\n );\r\n }\r\n\r\n\r\n addAlternativePart = async (id: number) => {\r\n const addNewAlternativePart = {\r\n id: this.state.caseCalculationAlternativePart.length,\r\n originalPartId: id,\r\n selectedAlternativePart: 9999999999999\r\n } as CaseCalculationAlternativePart;\r\n this.setState({\r\n isDialogOpen: true,\r\n newCaseCalculationAlternativePart: addNewAlternativePart\r\n });\r\n };\r\n\r\n clearSelectedAlternativeParts = async (originalPartId: number) => {\r\n let alternativePartsCopy = [...this.state.caseCalculationAlternativePart];\r\n alternativePartsCopy = alternativePartsCopy.map((item) => {\r\n item.selectedAlternativePart =\r\n item.originalPartId === originalPartId ? 9999999999999 : item.selectedAlternativePart;\r\n item.partFromGroup =\r\n item.originalPartId === originalPartId ? 9999999999999 : item.partFromGroup;\r\n return item;\r\n });\r\n\r\n const caseCalculationOriginalPartsCopy = [...this.state.calculationParts];\r\n const originalPartIndex = caseCalculationOriginalPartsCopy.findIndex(\r\n (item) => item.id === originalPartId\r\n );\r\n\r\n caseCalculationOriginalPartsCopy[originalPartIndex] = {\r\n ...caseCalculationOriginalPartsCopy[originalPartIndex],\r\n alternativePrice: null,\r\n alternativePartDiscount: null,\r\n alternativeGuideNumber: null,\r\n alternativePartCode: null,\r\n alternativePartName: null,\r\n alternativePartQuality: null,\r\n alternativePartQualityId: null,\r\n alternativePartStockLocation: null,\r\n alternativePartStockQuantity: null,\r\n alternativePartRemarks: null,\r\n alternativeNetPrice: null,\r\n alternativePriceWithoutDiscount: null\r\n };\r\n\r\n this.validateOrigPartUnitsRemove(originalPartId);\r\n this.setState(\r\n {\r\n caseCalculationAlternativePart: alternativePartsCopy,\r\n caseCalculationAlternativePartCopy: alternativePartsCopy,\r\n calculationParts: caseCalculationOriginalPartsCopy,\r\n clearStateAlternativeParts: true\r\n },\r\n () => this.props.handleUpdateAlternativeCalcAmount(caseCalculationOriginalPartsCopy)\r\n );\r\n };\r\n\r\n NumberFormatCustom = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n thousandSeparator={false}\r\n decimalScale={2}\r\n isNumericString\r\n />\r\n );\r\n };\r\n\r\n handleTextChange = (event: React.ChangeEvent) => {\r\n const value = event.currentTarget.value;\r\n\r\n this.setState({\r\n newCaseCalculationAlternativePart: {\r\n ...this.state.newCaseCalculationAlternativePart!,\r\n [event.target.id]: value\r\n }\r\n });\r\n };\r\n\r\n handlePriceChange = (event: React.ChangeEvent) => {\r\n this.setState({\r\n newCaseCalculationAlternativePart: {\r\n ...this.state.newCaseCalculationAlternativePart!,\r\n alternativePrice: event.target.value === null ? 0 : parseFloat(event.target.value)\r\n }\r\n });\r\n };\r\n handleAvailableQuantityChange = (event: React.ChangeEvent) => {\r\n this.setState({\r\n newCaseCalculationAlternativePart: {\r\n ...this.state.newCaseCalculationAlternativePart!,\r\n availableQuantity: event.target.value === null ? 0 : parseFloat(event.target.value)\r\n }\r\n });\r\n };\r\n\r\n handleDiscountChange = (event: React.ChangeEvent) => {\r\n this.setState({\r\n newCalculationPart: {\r\n ...this.state.newCalculationPart!,\r\n discount: event.target.value === null ? 0 : parseFloat(event.target.value)\r\n }\r\n });\r\n };\r\n\r\n deleteCalculationPart = async (id: number) => {\r\n try {\r\n const calculationPartIndex = this.state.calculationParts.findIndex((item) => item.id === id);\r\n const calculationParts = [...this.state.calculationParts];\r\n calculationParts.splice(calculationPartIndex, 1);\r\n\r\n const calculationAlternativeParts = this.state.caseCalculationAlternativePart.filter(\r\n (item) => item.originalPartId !== id\r\n );\r\n\r\n const interogateParts = _.cloneDeep(this.state.interogateParts);\r\n interogateParts.splice(calculationPartIndex, 1);\r\n\r\n this.setState(\r\n {\r\n calculationParts: calculationParts,\r\n caseCalculationAlternativePart: calculationAlternativeParts,\r\n caseCalculationAlternativePartCopy: calculationAlternativeParts,\r\n interogateParts: interogateParts\r\n },\r\n () => this.props.handleUpdateAlternativeCalcAmount(calculationParts)\r\n );\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n addAlternativeCalculationPartForm = async () => {\r\n try {\r\n const caseCalculationAlternativePart = [...this.state.caseCalculationAlternativePart];\r\n caseCalculationAlternativePart.push({\r\n ...this.state.newCaseCalculationAlternativePart!\r\n });\r\n\r\n this.setState({\r\n caseCalculationAlternativePart: caseCalculationAlternativePart,\r\n caseCalculationAlternativePartCopy: caseCalculationAlternativePart,\r\n newCaseCalculationAlternativePart: null,\r\n isDialogOpen: false\r\n });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n addCalculationPartForm = async () => {\r\n try {\r\n const calculationParts = [...this.state.calculationParts];\r\n let isNew = false;\r\n if (this.state.orderPartList.length > 0) { \r\n const newPart = {...this.state.newCalculationPart};\r\n const orderPart = _.find(this.state.orderPartList, function (orderPart) {\r\n return (\r\n orderPart.guideNumber === newPart.guideNumber &&\r\n orderPart.name === newPart.name \r\n );\r\n });\r\n \r\n if (!orderPart) {\r\n isNew = true;\r\n }\r\n } \r\n if (this.state.newCalculationPartId === null) {\r\n calculationParts.push({\r\n ...this.state.newCalculationPart,\r\n amount: 0,\r\n calculationSectionId: this.state.partSection!.id,\r\n calculationSection: this.state.partSection,\r\n isNew: isNew\r\n } as CaseCalculationPart);\r\n } else {\r\n const index = calculationParts.findIndex(\r\n (item) => item.id === this.state.newCalculationPartId\r\n )!;\r\n calculationParts[index] = {\r\n ...this.state.newCalculationPart!,\r\n carPartCategoryId:\r\n this.state.currentSection!.id === 1\r\n ? this.state.newCalculationPart!.carPartCategory!.id\r\n : null,\r\n carPartCategory:\r\n this.state.currentSection!.id === 1\r\n ? this.state.newCalculationPart!.carPartCategory\r\n : null,\r\n amount: 0,\r\n isNew: isNew\r\n };\r\n }\r\n\r\n this.setState(\r\n {\r\n calculationParts: calculationParts,\r\n newCalculationPartId: null,\r\n newCalculationPart: null,\r\n isAddOriginalPartDialogOpen: false,\r\n partLoaders: [...this.state.partLoaders, false],\r\n interogateParts: [...this.state.interogateParts, false]\r\n },\r\n () => this.props.handleUpdateAlternativeCalcAmount(calculationParts)\r\n );\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n copyCalculationPartForm = async () => {\r\n try {\r\n const calculationParts = [...this.state.calculationParts];\r\n calculationParts.push({\r\n ...this.state.newCalculationPart,\r\n amount: 0\r\n } as CaseCalculationPart);\r\n\r\n this.setState(\r\n {\r\n calculationParts: calculationParts,\r\n newCalculationPartId: null,\r\n newCalculationPart: null,\r\n isAddOriginalPartDialogOpen: false\r\n },\r\n () => this.props.handleUpdateAlternativeCalcAmount(calculationParts)\r\n );\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n handleAutocompletePartQualityChange = async (newValue: IReferential | null) => {\r\n this.setState({\r\n newCaseCalculationAlternativePart: {\r\n ...this.state.newCaseCalculationAlternativePart!,\r\n alternativePartQuality: newValue,\r\n alternativePartQualityId: R.isNil(newValue) ? 0 : newValue.id\r\n }\r\n });\r\n };\r\n\r\n handleAutocompleteSupplierChange = (newValue: any | null) => {\r\n this.setState({\r\n newCaseCalculationAlternativePart: {\r\n ...this.state.newCaseCalculationAlternativePart!,\r\n supplier: newValue,\r\n supplierId: R.isNil(newValue) ? null : newValue.id\r\n }\r\n });\r\n };\r\n\r\n handleAlternativePartSelect = (\r\n id: number,\r\n originalPartid: number,\r\n alternativePart: CaseCalculationAlternativePart\r\n ) => {\r\n const groupedUniqueId = uuid();\r\n const caseCalculationOriginalPartsCopy = [...this.state.calculationParts];\r\n const originalPartIndex = caseCalculationOriginalPartsCopy.findIndex(\r\n (item) => item.id === originalPartid\r\n );\r\n caseCalculationOriginalPartsCopy[originalPartIndex] = {\r\n ...caseCalculationOriginalPartsCopy[originalPartIndex],\r\n alternativePrice: alternativePart.alternativePrice,\r\n alternativePartDiscount: alternativePart.alternativePartDiscount,\r\n alternativeGuideNumber: alternativePart.alternativeGuideNumber,\r\n alternativePartCode: alternativePart.alternativePartCode,\r\n alternativePartQuality: alternativePart.alternativePartQuality,\r\n alternativePartQualityId: alternativePart.alternativePartQualityId,\r\n alternativePartName: alternativePart.name,\r\n alternativePartStockLocation: alternativePart.stockLocation,\r\n alternativePartStockQuantity: alternativePart.availableQuantity,\r\n supplier: alternativePart.supplier,\r\n supplierId: alternativePart.supplierId,\r\n producer: alternativePart.producer,\r\n deliveryTime: alternativePart.deliveryTime.toString(),\r\n validityTime: alternativePart.validityTime?.toString() || null,\r\n codeType: alternativePart.codeType?.toString() || null,\r\n type: alternativePart.type?.toString() || null,\r\n orderCode: alternativePart.orderCode?.toString() || null,\r\n locationId: alternativePart.locationId || null,\r\n alternativePartRemarks: alternativePart.remarks,\r\n minQty: alternativePart.minQty,\r\n packing: alternativePart.packing,\r\n bundleItem: alternativePart.bundleItem,\r\n bundleNo: alternativePart.bundleNo,\r\n bundleQuantity: alternativePart.bundleQuantity,\r\n excludeFromOrder: alternativePart.excludeFromOrder,\r\n isChild: alternativePart.isChild,\r\n productId: alternativePart.productId || null,\r\n codEan: alternativePart.codEan?.toString() || null,\r\n groupedUniqueId: groupedUniqueId || null,\r\n alternativeNetPrice: alternativePart.alternativeNetPrice,\r\n alternativePriceWithoutDiscount: alternativePart.alternativePriceWithoutDiscount,\r\n availableQuantity: alternativePart.availableQuantity\r\n };\r\n\r\n const currentPacking =\r\n caseCalculationOriginalPartsCopy[originalPartIndex].packing?.split('|')[0];\r\n const secondItemOfPacking =\r\n caseCalculationOriginalPartsCopy[originalPartIndex].packing?.split('|')[1];\r\n const caseCalculationAlternativePartCopy = [...this.state.caseCalculationAlternativePart];\r\n\r\n console.log('Specific alternative parts');\r\n const specificAlternativeParts = this.state.caseCalculationAlternativePart\r\n .filter(\r\n (alternativePart) =>\r\n alternativePart.originalPartId === caseCalculationOriginalPartsCopy[originalPartIndex].id\r\n )\r\n .sort(function (a: any, b: any) {\r\n return a.id - b.id;\r\n });\r\n console.log(specificAlternativeParts);\r\n const findAlternativePartGroup = _.filter(specificAlternativeParts, function (object) {\r\n return (\r\n object.bundleNo != null &&\r\n object.bundleNo == caseCalculationOriginalPartsCopy[originalPartIndex].bundleNo &&\r\n object.alternativePartCode !=\r\n caseCalculationOriginalPartsCopy[originalPartIndex].alternativePartCode\r\n );\r\n });\r\n console.log('Alternative Part Group');\r\n console.log(findAlternativePartGroup);\r\n\r\n const idList: any = [];\r\n for (let i = 0; i < findAlternativePartGroup.length; i++) {\r\n idList.push(findAlternativePartGroup[i].id);\r\n }\r\n\r\n caseCalculationAlternativePartCopy.forEach((item) => {\r\n item.selectedAlternativePart =\r\n item.originalPartId === originalPartid\r\n ? item.id === id\r\n ? id\r\n : 9999999999999\r\n : item.selectedAlternativePart;\r\n item.partFromGroup =\r\n item.originalPartId === originalPartid\r\n ? idList.includes(item.id)\r\n ? item.id\r\n : 9999999999999\r\n : item.partFromGroup;\r\n if (\r\n item.originalPartId === originalPartid &&\r\n item.selectedAlternativePart !== 9999999999999\r\n ) {\r\n const initialCaseCalculationOriginalParts = {\r\n ...caseCalculationOriginalPartsCopy[originalPartIndex]\r\n };\r\n caseCalculationOriginalPartsCopy[originalPartIndex].package = [];\r\n if (currentPacking && secondItemOfPacking) {\r\n const currentPackingNumber = parseFloat(currentPacking);\r\n if (\r\n caseCalculationOriginalPartsCopy[originalPartIndex].pieceNr % currentPackingNumber !=\r\n 0 ||\r\n caseCalculationOriginalPartsCopy[originalPartIndex].pieceNr <\r\n caseCalculationOriginalPartsCopy[originalPartIndex].minQty\r\n ) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'MIN_PACKING_ERROR_MSG',\r\n 'Cantitatea comandata trebuie sa fie '\r\n ) +\r\n currentPackingNumber +\r\n this.translatorService.Tranlate('MIN_PACKING_MULTIPLE_ERROR_MSG', ' sau multiplul acesteia!'),\r\n { variant: 'error',\r\n autoHideDuration: 5000 }\r\n );\r\n }\r\n } else if (\r\n caseCalculationOriginalPartsCopy[originalPartIndex].pieceNr <\r\n caseCalculationOriginalPartsCopy[originalPartIndex].minQty\r\n ) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'MIN_PACKING_ERROR_MSG',\r\n 'Cantitatea comandata trebuie sa fie '\r\n ) +\r\n caseCalculationOriginalPartsCopy[originalPartIndex].minQty +\r\n this.translatorService.Tranlate('MIN_PACKING_MULTIPLE_ERROR_MSG', ' sau multiplul acesteia!'),\r\n { variant: 'error',\r\n autoHideDuration: 5000 }\r\n );\r\n }\r\n if (findAlternativePartGroup.length) {\r\n let displayPopup = true;\r\n let alternativePartString = '';\r\n for (let i = 0; i < findAlternativePartGroup.length; i++) {\r\n if (\r\n findAlternativePartGroup[i].alternativePartCode == AlternativeCode.TAXAMEDIU &&\r\n findAlternativePartGroup.length == 1\r\n ) {\r\n displayPopup = false;\r\n }\r\n alternativePartString +=\r\n findAlternativePartGroup[i].name +\r\n '(' +\r\n findAlternativePartGroup[i].alternativePrice +\r\n ' RON)' +\r\n '\\n';\r\n caseCalculationOriginalPartsCopy[originalPartIndex].package.push({\r\n ...initialCaseCalculationOriginalParts,\r\n id: 0,\r\n originalPrice: 0,\r\n alternativePrice: findAlternativePartGroup[i].alternativePrice,\r\n alternativePartDiscount: findAlternativePartGroup[i].alternativePartDiscount,\r\n alternativeGuideNumber: findAlternativePartGroup[i].alternativeGuideNumber,\r\n alternativePartCode: findAlternativePartGroup[i].alternativePartCode,\r\n alternativePartQuality: findAlternativePartGroup[i].alternativePartQuality,\r\n alternativePartQualityId: findAlternativePartGroup[i].alternativePartQualityId,\r\n alternativePartName: findAlternativePartGroup[i].name,\r\n alternativePartStockLocation: findAlternativePartGroup[i].stockLocation,\r\n alternativePartStockQuantity: findAlternativePartGroup[i].availableQuantity,\r\n supplier: findAlternativePartGroup[i].supplier,\r\n supplierId: findAlternativePartGroup[i].supplierId,\r\n producer: findAlternativePartGroup[i].producer,\r\n deliveryTime: findAlternativePartGroup[i].deliveryTime.toString(),\r\n validityTime: findAlternativePartGroup[i].validityTime?.toString() || null,\r\n codeType: findAlternativePartGroup[i].codeType?.toString() || null,\r\n type: findAlternativePartGroup[i].type?.toString() || null,\r\n orderCode: findAlternativePartGroup[i].orderCode?.toString() || null,\r\n locationId: findAlternativePartGroup[i].locationId || null,\r\n alternativePartRemarks: findAlternativePartGroup[i].remarks,\r\n minQty: findAlternativePartGroup[i].minQty,\r\n packing: findAlternativePartGroup[i].packing,\r\n bundleItem: findAlternativePartGroup[i].bundleItem,\r\n bundleNo: findAlternativePartGroup[i].bundleNo,\r\n bundleQuantity: findAlternativePartGroup[i].bundleQuantity,\r\n excludeFromOrder: true,\r\n productId: findAlternativePartGroup[i].productId || null,\r\n codEan: findAlternativePartGroup[i].codEan || null,\r\n groupedUniqueId: groupedUniqueId || null,\r\n alternativePartNetPrice: findAlternativePartGroup[i].alternativeNetPrice,\r\n alternativePriceWithoutDiscount: findAlternativePartGroup[i].alternativePriceWithoutDiscount,\r\n availableQuantity: findAlternativePartGroup[i].availableQuantity\r\n });\r\n }\r\n if (displayPopup) {\r\n this.props.enqueueSnackbar(\r\n ' Componente adaugate la comanda: \\n' + alternativePartString,\r\n {\r\n variant: 'error',\r\n style: { whiteSpace: 'pre-line' },\r\n autoHideDuration: 5000 \r\n }\r\n );\r\n }\r\n }\r\n if (!Number.isInteger(caseCalculationOriginalPartsCopy[originalPartIndex].pieceNr)) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'DECIMAL_ERROR_MSG',\r\n 'Cantitatea comandata trebuie sa fie un numar intreg fara zecimale'\r\n ),\r\n {\r\n variant: 'error',\r\n autoHideDuration: 5000 \r\n }\r\n );\r\n }\r\n if (\r\n item.availableQuantity !== null &&\r\n item.availableQuantity < caseCalculationOriginalPartsCopy[originalPartIndex].pieceNr\r\n ) {\r\n this.validateOrigPartUnitsAdd(originalPartid);\r\n } else {\r\n this.validateOrigPartUnitsRemove(originalPartid);\r\n }\r\n if (!R.isNil(this.props.workflowCalculation) && this.props.workflowCalculation.hasAlternativePartDescription) {\r\n const nonStockSupplier = this.props.nonStockSuppliers.find(x => x.supplierId === item.supplierId);\r\n if (!R.isNil(nonStockSupplier) && R.isNil(item.availableQuantity) &&\r\n (R.isNil(caseCalculationOriginalPartsCopy[originalPartIndex].alternativePartDescription) || R.isEmpty(caseCalculationOriginalPartsCopy[originalPartIndex].alternativePartDescription))\r\n ) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'ALTERNATIVE_PART_DESCRIPTION_ERROR_MSG',\r\n 'Va rugam sa completati campul Descriere piesa alt'\r\n ),\r\n { \r\n variant: 'error',\r\n autoHideDuration: 5000 \r\n }\r\n );\r\n this.validateAlternativePartDescriptionAdd(originalPartid);\r\n } else {\r\n this.validateAlternativePartDescriptionRemove(originalPartid);\r\n }\r\n }\r\n }\r\n });\r\n\r\n console.log('caseCalculationOriginalPartsCopy');\r\n console.log(caseCalculationOriginalPartsCopy);\r\n\r\n this.setState(\r\n {\r\n caseCalculationAlternativePart: caseCalculationAlternativePartCopy,\r\n caseCalculationAlternativePartCopy: caseCalculationAlternativePartCopy,\r\n calculationParts: caseCalculationOriginalPartsCopy\r\n },\r\n () => this.props.handleUpdateAlternativeCalcAmount(caseCalculationOriginalPartsCopy)\r\n );\r\n };\r\n\r\n handleAlternativePartChecked = (selected: number, id: number, partFromGroup: number) => {\r\n return selected === id || partFromGroup == id;\r\n };\r\n\r\n validateOriginalPartPriceAdd = (originalPartid: number) => {\r\n const labelParent = document.getElementsByClassName('id-' + originalPartid + '-price')[0] as HTMLElement;\r\n const identifylabel = labelParent.firstChild as any;\r\n const labelValidate = identifylabel.classList.add('Mui-error');\r\n\r\n const inputParent = document\r\n .getElementsByClassName('id-' + originalPartid + '-price')[0]\r\n .closest('div') as HTMLElement;\r\n const identifyInput = inputParent.children[1].firstChild as any;\r\n const inputValidate = identifyInput.classList.add('text-danger');\r\n\r\n const borderParent = document\r\n .getElementsByClassName('id-' + originalPartid + '-price')[0]\r\n .closest('div') as HTMLElement;\r\n const borderIdentify = borderParent.children[1] as any;\r\n const borderValidate = borderIdentify.classList.add('Mui-error');\r\n\r\n return labelValidate && inputValidate && borderValidate;\r\n };\r\n\r\n validateOriginalPartPriceRemove = (originalPartid: number) => {\r\n const labelParent = document.getElementsByClassName('id-' + originalPartid + '-price')[0] as HTMLElement;\r\n const identifylabel = labelParent.firstChild as any;\r\n const labelValidate = identifylabel.classList.remove('Mui-error');\r\n\r\n const inputParent = document\r\n .getElementsByClassName('id-' + originalPartid + '-price')[0]\r\n .closest('div') as HTMLElement;\r\n const identifyInput = inputParent.children[1].firstChild as any;\r\n const inputValidate = identifyInput.classList.remove('text-danger');\r\n\r\n const borderParent = document\r\n .getElementsByClassName('id-' + originalPartid + '-price')[0]\r\n .closest('div') as HTMLElement;\r\n const borderIdentify = borderParent.children[1] as any;\r\n const borderValidate = borderIdentify.classList.remove('Mui-error');\r\n\r\n return labelValidate && inputValidate && borderValidate;\r\n };\r\n\r\n\r\n validateOrigPartUnitsAdd = (originalPartid: number) => {\r\n const labelParent = document.getElementsByClassName('id-' + originalPartid)[0] as HTMLElement;\r\n const identifylabel = labelParent.firstChild as any;\r\n const labelValidate = identifylabel.classList.add('Mui-error');\r\n\r\n const inputParent = document\r\n .getElementsByClassName('id-' + originalPartid)[0]\r\n .closest('div') as HTMLElement;\r\n const identifyInput = inputParent.children[1].firstChild as any;\r\n const inputValidate = identifyInput.classList.add('text-danger');\r\n\r\n const borderParent = document\r\n .getElementsByClassName('id-' + originalPartid)[0]\r\n .closest('div') as HTMLElement;\r\n const borderIdentify = borderParent.children[1] as any;\r\n const borderValidate = borderIdentify.classList.add('Mui-error');\r\n\r\n return labelValidate && inputValidate && borderValidate;\r\n };\r\n\r\n validateOrigPartUnitsRemove = (originalPartid: number) => {\r\n const labelParent = document.getElementsByClassName('id-' + originalPartid)[0] as HTMLElement;\r\n const identifylabel = labelParent.firstChild as any;\r\n const labelValidate = identifylabel.classList.remove('Mui-error');\r\n\r\n const inputParent = document\r\n .getElementsByClassName('id-' + originalPartid)[0]\r\n .closest('div') as HTMLElement;\r\n const identifyInput = inputParent.children[1].firstChild as any;\r\n const inputValidate = identifyInput.classList.remove('text-danger');\r\n\r\n const borderParent = document\r\n .getElementsByClassName('id-' + originalPartid)[0]\r\n .closest('div') as HTMLElement;\r\n const borderIdentify = borderParent.children[1] as any;\r\n const borderValidate = borderIdentify.classList.remove('Mui-error');\r\n\r\n return labelValidate && inputValidate && borderValidate;\r\n };\r\n\r\n validateAlternativePartDescriptionAdd = (originalPartid: number) => {\r\n const labelParent = document.getElementsByClassName('id-' + originalPartid + '-alternative-part-description')[0] as HTMLElement;\r\n const identifylabel = labelParent.firstChild as any;\r\n const labelValidate = identifylabel.classList.add('Mui-error');\r\n\r\n const inputParent = document\r\n .getElementsByClassName('id-' + originalPartid + '-alternative-part-description')[0]\r\n .closest('div') as HTMLElement;\r\n const identifyInput = inputParent.children[1].firstChild as any;\r\n const inputValidate = identifyInput.classList.add('text-danger');\r\n\r\n const borderParent = document\r\n .getElementsByClassName('id-' + originalPartid + '-alternative-part-description')[0]\r\n .closest('div') as HTMLElement;\r\n const borderIdentify = borderParent.children[1] as any;\r\n const borderValidate = borderIdentify.classList.add('Mui-error');\r\n\r\n return labelValidate && inputValidate && borderValidate;\r\n };\r\n\r\n validateAlternativePartDescriptionRemove = (originalPartid: number) => {\r\n const labelParent = document.getElementsByClassName('id-' + originalPartid + '-alternative-part-description')[0] as HTMLElement;\r\n const identifylabel = labelParent.firstChild as any;\r\n const labelValidate = identifylabel.classList.remove('Mui-error');\r\n\r\n const inputParent = document\r\n .getElementsByClassName('id-' + originalPartid + '-alternative-part-description')[0]\r\n .closest('div') as HTMLElement;\r\n const identifyInput = inputParent.children[1].firstChild as any;\r\n const inputValidate = identifyInput.classList.remove('text-danger');\r\n\r\n const borderParent = document\r\n .getElementsByClassName('id-' + originalPartid + '-alternative-part-description')[0]\r\n .closest('div') as HTMLElement;\r\n const borderIdentify = borderParent.children[1] as any;\r\n const borderValidate = borderIdentify.classList.remove('Mui-error');\r\n\r\n return labelValidate && inputValidate && borderValidate;\r\n };\r\n\r\n filterAlternativePartsByOptimization = () => {\r\n if (this.props.optmizationType === 1 || this.props.optmizationType === 2) {\r\n const caseCalculationOriginalPartsCopy = [...this.state.calculationParts].reverse();\r\n\r\n let caseCalculationAlternativePartCopy = [...this.state.caseCalculationAlternativePart];\r\n caseCalculationAlternativePartCopy = caseCalculationAlternativePartCopy.map((item) => {\r\n item.selectedAlternativePart = 9999999999999;\r\n return item;\r\n });\r\n caseCalculationOriginalPartsCopy\r\n .filter((item) => item.calculationSectionId === this.state.partSection!.id)\r\n .map((calculationOriginalPart, index) => {\r\n let altParts = caseCalculationAlternativePartCopy.filter(\r\n (item2) => item2.originalPartId === calculationOriginalPart.id\r\n );\r\n if (altParts.length > 0) {\r\n altParts = this.filterAlternativePartsByDeliveryTime(altParts);\r\n if (this.props.optmizationType === 1 && altParts.length > 0) {\r\n altParts = this.filterAlternativePartsByPrice(altParts);\r\n if (altParts.length > 1) {\r\n altParts = this.filterAlternativePartsByQuality(altParts);\r\n if (altParts.length > 1) {\r\n const altPart = altParts.sort(function (a, b) {\r\n return a.deliveryTime - b.deliveryTime;\r\n })[0];\r\n altParts = [altPart];\r\n }\r\n }\r\n } else if (this.props.optmizationType === 2 && altParts.length > 0) {\r\n altParts = this.filterAlternativePartsByQuality(altParts);\r\n if (altParts.length > 1) {\r\n altParts = this.filterAlternativePartsByPrice(altParts);\r\n if (altParts.length > 1) {\r\n const altPart = altParts.sort(function (a, b) {\r\n return a.deliveryTime - b.deliveryTime;\r\n })[0];\r\n altParts = [altPart];\r\n }\r\n }\r\n }\r\n }\r\n if (altParts.length > 0) {\r\n altParts[0].selectedAlternativePart = altParts[0].id;\r\n const index = caseCalculationAlternativePartCopy.findIndex(\r\n (item) => item.id === altParts[0].id\r\n );\r\n\r\n caseCalculationAlternativePartCopy[index] = altParts[0];\r\n calculationOriginalPart.alternativePrice = altParts[0].alternativePrice;\r\n calculationOriginalPart.alternativePartDiscount = altParts[0].alternativePartDiscount;\r\n calculationOriginalPart.alternativeGuideNumber = altParts[0].alternativeGuideNumber;\r\n calculationOriginalPart.alternativePartCode = altParts[0].alternativePartCode;\r\n calculationOriginalPart.alternativePartQuality = altParts[0].alternativePartQuality;\r\n calculationOriginalPart.alternativePartQualityId = altParts[0].alternativePartQualityId;\r\n calculationOriginalPart.alternativePartName = altParts[0].name;\r\n calculationOriginalPart.alternativePartStockLocation = altParts[0].stockLocation;\r\n calculationOriginalPart.alternativePartStockQuantity = altParts[0].availableQuantity;\r\n calculationOriginalPart.supplier = altParts[0].supplier;\r\n calculationOriginalPart.supplierId = altParts[0].supplierId;\r\n calculationOriginalPart.producer = altParts[0].producer;\r\n calculationOriginalPart.deliveryTime = altParts[0].deliveryTime.toString();\r\n calculationOriginalPart.alternativePartRemarks = altParts[0].remarks;\r\n calculationOriginalPart.minQty = altParts[0].minQty;\r\n calculationOriginalPart.packing = altParts[0].packing;\r\n calculationOriginalPart.bundleItem = altParts[0].bundleItem;\r\n calculationOriginalPart.bundleNo = altParts[0].bundleNo;\r\n calculationOriginalPart.bundleQuantity = altParts[0].bundleQuantity;\r\n calculationOriginalPart.excludeFromOrder = altParts[0].excludeFromOrder;\r\n calculationOriginalPart.validityTime = altParts[0].validityTime;\r\n calculationOriginalPart.codeType = altParts[0].codeType;\r\n calculationOriginalPart.locationId = altParts[0].locationId;\r\n calculationOriginalPart.type = altParts[0].type;\r\n calculationOriginalPart.orderCode = altParts[0].orderCode;\r\n calculationOriginalPart.productId = altParts[0].productId;\r\n calculationOriginalPart.codEan = altParts[0].codEan;\r\n calculationOriginalPart.alternativeNetPrice = altParts[0].alternativeNetPrice;\r\n calculationOriginalPart.alternativePriceWithoutDiscount = altParts[0].alternativePriceWithoutDiscount;\r\n calculationOriginalPart.availableQuantity = altParts[0].availableQuantity;\r\n if (\r\n calculationOriginalPart.id === altParts[0].originalPartId &&\r\n altParts[0].selectedAlternativePart !== 9999999999999\r\n ) {\r\n if (\r\n !R.isNil(altParts[0].availableQuantity) &&\r\n altParts[0].availableQuantity < calculationOriginalPart.pieceNr\r\n ) {\r\n this.validateOrigPartUnitsAdd(calculationOriginalPart.id);\r\n } else {\r\n this.validateOrigPartUnitsRemove(calculationOriginalPart.id);\r\n }\r\n\r\n if (!R.isNil(this.props.workflowCalculation) && this.props.workflowCalculation.hasAlternativePartDescription) {\r\n const nonStockSupplier = this.props.nonStockSuppliers.find(x => x.supplierId === altParts[0].supplierId);\r\n if (!R.isNil(nonStockSupplier) && R.isNil(altParts[0].availableQuantity) &&\r\n (R.isNil(calculationOriginalPart.alternativePartDescription) || R.isEmpty(calculationOriginalPart.alternativePartDescription))\r\n ) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'ALTERNATIVE_PART_DESCRIPTION_ERROR_MSG',\r\n 'Va rugam sa completati campul Descriere piesa alt'\r\n ),\r\n { \r\n variant: 'error',\r\n autoHideDuration: 5000 \r\n }\r\n );\r\n this.validateAlternativePartDescriptionAdd(calculationOriginalPart.id);\r\n } else {\r\n this.validateAlternativePartDescriptionRemove(calculationOriginalPart.id);\r\n }\r\n }\r\n }\r\n \r\n // Verifică dacă piesa selectată este vizibilă și derulează la ea\r\n const selectedAlternativePartId = altParts[0].selectedAlternativePart;\r\n if (selectedAlternativePartId !== 9999999999999 && this.rowRefs[selectedAlternativePartId]?.current) {\r\n console.log('Scroll to row', altParts[0]);\r\n this.rowRefs[selectedAlternativePartId].current?.scrollIntoView({\r\n behavior: 'smooth',\r\n block: 'center'\r\n });\r\n }\r\n }\r\n });\r\n\r\n this.setState(\r\n {\r\n caseCalculationAlternativePart: caseCalculationAlternativePartCopy,\r\n caseCalculationAlternativePartCopy: caseCalculationAlternativePartCopy,\r\n calculationParts: caseCalculationOriginalPartsCopy.reverse()\r\n },\r\n () => this.props.handleUpdateAlternativeCalcAmount(this.state.calculationParts)\r\n );\r\n }\r\n };\r\n\r\n filterAlternativePartsByDeliveryTime = (alternativeParts: CaseCalculationAlternativePart[]) => {\r\n return alternativeParts.filter(\r\n (item) =>\r\n item.deliveryTime <= this.props.defaultMaxDeliveryTime ||\r\n item.deliveryTime.toString().match(/^[0-9]+$/) === null\r\n );\r\n };\r\n\r\n filterAlternativePartsByPrice = (alternativeParts: CaseCalculationAlternativePart[]) => {\r\n if (this.props.workflowCalculation!.byAquisitionPrice) {\r\n const min = alternativeParts.reduce((prev, curr) =>\r\n prev.alternativeNetPrice! < curr.alternativeNetPrice! ? prev : curr\r\n ).alternativeNetPrice;\r\n \r\n return alternativeParts.filter((item) => item.alternativeNetPrice === min);\r\n } else {\r\n const min = alternativeParts.reduce((prev, curr) =>\r\n prev.alternativePrice < curr.alternativePrice ? prev : curr\r\n ).alternativePrice;\r\n \r\n return alternativeParts.filter((item) => item.alternativePrice === min);\r\n }\r\n };\r\n\r\n filterAlternativePartsByQuality = (alternativeParts: CaseCalculationAlternativePart[]) => {\r\n const qualityRatings = CarPartQualityRatings;\r\n const qualities = qualityRatings.filter((elem) =>\r\n alternativeParts.find(\r\n ({ alternativePartQuality }) => elem.CarPartQualityTypeCode === alternativePartQuality!.code\r\n )\r\n );\r\n const maxRatingQuality = qualities.sort(function (a, b) {\r\n return b.Rating - a.Rating;\r\n });\r\n const bestQuality = maxRatingQuality[0];\r\n\r\n return alternativeParts.filter(\r\n (item) => item.alternativePartQuality!.code === bestQuality.CarPartQualityTypeCode\r\n );\r\n };\r\n\r\n public renderAddForm() {\r\n return R.isNil(this.state.newCaseCalculationAlternativePart) ? null : (\r\n this.addAlternativeCalculationPartForm()}>\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n this.handleAutocompletePartQualityChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n this.handleAutocompleteSupplierChange(newValue)\r\n }\r\n getOptionLabel={(option: Organization) => option.name}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n );\r\n }\r\n\r\n handleTextChangeOriginalPart = (event: React.ChangeEvent) => {\r\n const value = event.currentTarget.value;\r\n \r\n this.setState({\r\n newCalculationPart: {\r\n ...this.state.newCalculationPart!,\r\n [event.target.id]: event.target.id == 'guideNumber' ? value.trimLeft() : value\r\n }\r\n });\r\n };\r\n\r\n handlePriceChangeOriginalPart = (event: React.ChangeEvent) => {\r\n this.setState({\r\n newCalculationPart: {\r\n ...this.state.newCalculationPart!,\r\n originalPrice: event.target.value === null ? 0 : parseFloat(event.target.value)\r\n }\r\n });\r\n };\r\n\r\n handleAutocompleteOriginalPartQualityChange = async (newValue: IReferential | null) => {\r\n this.setState({\r\n newCalculationPart: {\r\n ...this.state.newCalculationPart!,\r\n carPartCategory: newValue,\r\n carPartCategoryId: R.isNil(newValue) ? 0 : newValue.id\r\n }\r\n });\r\n };\r\n\r\n handleUnitsOriginalPart = (event: React.ChangeEvent) => {\r\n this.setState({\r\n newCalculationPart: {\r\n ...this.state.newCalculationPart!,\r\n pieceNr: event.target.value === null ? 0 : parseFloat(event.target.value)\r\n }\r\n });\r\n };\r\n\r\n handleSelectedWorkflowPartner = (newValue: OrganizationBranch | null) => {\r\n this.setState({\r\n ...this.state,\r\n selectedOrganizationBranch: newValue\r\n });\r\n };\r\n\r\n public renderAddOriginalPartForm() {\r\n return R.isNil(this.state.newCalculationPart) ? null : (\r\n \r\n this.state.calculationPartFormTypeAdd\r\n ? this.addCalculationPartForm()\r\n : this.copyCalculationPartForm()\r\n }\r\n >\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n this.handleAutocompleteOriginalPartQualityChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n );\r\n }\r\n\r\n displayCalculationPartSupplier = (supplierId: any) => {\r\n const supplier = this.state.supplierList.find((item) => item.id === supplierId);\r\n const supplierName = !R.isNil(supplier) ? supplier.name : '';\r\n return supplierName;\r\n };\r\n\r\n displayCalculationPartPrice = (value: number, partId: any) => {\r\n const calculationPartsFiltered = this.state.calculationPartsOrdered.filter(\r\n (item) => item.calculationSectionId === 1\r\n );\r\n const calculationPart = calculationPartsFiltered.find((item) => item.id === partId);\r\n const price =\r\n calculationPart!.alternativePartQualityId === null\r\n ? value\r\n : calculationPart!.alternativePrice;\r\n return (Math.round(price! * 100) / 100).toFixed(2);\r\n };\r\n\r\n displayCalculationPartDiscount = (value: number, partId: any) => {\r\n const calculationPartsFiltered = this.state.calculationPartsOrdered.filter(\r\n (item) => item.calculationSectionId === 1\r\n );\r\n const calculationPart = calculationPartsFiltered.find((item) => item.id === partId);\r\n const discount =\r\n calculationPart!.alternativePartQualityId === null\r\n ? R.isNil(value)\r\n ? 0\r\n : value\r\n : R.isNil(calculationPart!.alternativePartDiscount)\r\n ? 0\r\n : calculationPart!.alternativePartDiscount;\r\n return discount;\r\n };\r\n\r\n displayCalculationPartTotalPrice = (row: any) => {\r\n const calculationPartsFiltered = this.state.calculationPartsOrdered.filter(\r\n (item) => item.calculationSectionId === 1\r\n );\r\n const calculationPart = calculationPartsFiltered.find((item) => item.id === row[0]);\r\n\r\n if (calculationPart!.alternativePartQualityId === null) {\r\n if (R.isNil(calculationPart!.discount)) {\r\n return (\r\n (\r\n Math.round(calculationPart!.originalPrice * calculationPart!.pieceNr * 100) / 100\r\n ).toFixed(2) +\r\n ' ' +\r\n this.state.caseCalculationHistoryDetails.currency!.displayName\r\n );\r\n }\r\n const value = calculationPart!.originalPrice * calculationPart!.pieceNr;\r\n return (\r\n (Math.round(value * (1 - calculationPart!.discount / 100) * 100) / 100).toFixed(2) +\r\n ' ' +\r\n this.state.caseCalculationHistoryDetails.currency!.displayName\r\n );\r\n } else {\r\n if (R.isNil(calculationPart!.alternativePartDiscount)) {\r\n return (\r\n (\r\n Math.round(calculationPart!.alternativePrice! * calculationPart!.pieceNr * 100) / 100\r\n ).toFixed(2) +\r\n ' ' +\r\n this.state.caseCalculationHistoryDetails.currency!.displayName\r\n );\r\n }\r\n const value = calculationPart!.alternativePrice! * calculationPart!.pieceNr;\r\n return (\r\n (\r\n Math.round(value * (1 - calculationPart!.alternativePartDiscount / 100) * 100) / 100\r\n ).toFixed(2) +\r\n ' ' +\r\n this.state.caseCalculationHistoryDetails.currency!.displayName\r\n );\r\n }\r\n };\r\n\r\n displayCalculationPartQuality = (value: IReferential, row: any) => {\r\n const calculationPartsFiltered = this.state.calculationPartsOrdered.filter(\r\n (item) => item.calculationSectionId === 1\r\n );\r\n const calculationPart = calculationPartsFiltered.find((item) => item.id === row[0]);\r\n if (calculationPart!.alternativePartQualityId === null) {\r\n return (\r\n \r\n
\r\n {this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_PRODUCER_HEADER',\r\n 'Producator'\r\n ) +\r\n ': ' +\r\n (R.isNil(row[6]) ? '' : row[6])}\r\n
\r\n
\r\n {this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_DELIVERY_TIME_HEADER',\r\n 'Timp livrare'\r\n ) +\r\n ': ' +\r\n (R.isNil(row[7]) ? '' : row[7])}\r\n
\r\n \r\n }\r\n >\r\n
\r\n {value.displayName + ' '}\r\n \r\n
\r\n \r\n );\r\n } else {\r\n const partQualityType = this.state.partQualityTypes.find(\r\n (quality) => quality.id === calculationPart!.alternativePartQualityId\r\n );\r\n return (\r\n \r\n
\r\n {this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_ALT_PART_GN_LABEL',\r\n 'Cod alternativa'\r\n ) +\r\n ': ' +\r\n (R.isNil(calculationPart!.alternativeGuideNumber)\r\n ? ''\r\n : calculationPart!.alternativeGuideNumber)}\r\n
\r\n
\r\n {this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_ALT_PART_NAME_LABEL',\r\n 'Descriere alternativa'\r\n ) +\r\n ': ' +\r\n (R.isNil(calculationPart!.alternativePartName)\r\n ? ''\r\n : calculationPart!.alternativePartName)}\r\n
\r\n
\r\n {this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_PRODUCER_HEADER',\r\n 'Producator'\r\n ) +\r\n ': ' +\r\n (R.isNil(calculationPart!.producer) ? '' : calculationPart!.producer)}\r\n
\r\n
\r\n {this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_DELIVERY_TIME_HEADER',\r\n 'Timp livrare'\r\n ) +\r\n ': ' +\r\n (R.isNil(calculationPart!.deliveryTime) ? '' : calculationPart!.deliveryTime)}\r\n
\r\n
\r\n {this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_ALT_PART_QUANTITY_LABEL',\r\n 'Cantitate disponibila'\r\n ) +\r\n ': ' +\r\n (R.isNil(calculationPart!.availableQuantity)\r\n ? ''\r\n : calculationPart!.availableQuantity)}\r\n
\r\n
\r\n {this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_ALTERNATIVE_CALCULATION_DETAILS_STOCK_LOCATION_LABEL',\r\n 'Locatie'\r\n ) +\r\n ': ' +\r\n (R.isNil(calculationPart!.alternativePartStockLocation)\r\n ? ''\r\n : calculationPart!.alternativePartStockLocation)}\r\n
\r\n
\r\n {this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_ALTERNATIVE_CALCULATION_DETAILS_REMARKS_LABEL',\r\n 'Observatii'\r\n ) +\r\n ': ' +\r\n (R.isNil(calculationPart!.alternativePartRemarks)\r\n ? ''\r\n : calculationPart!.alternativePartRemarks)}\r\n
\r\n \r\n }\r\n >\r\n
\r\n {partQualityType!.displayName + ' '}\r\n \r\n
\r\n \r\n );\r\n }\r\n };\r\n\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'supplierId',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'guideNumber',\r\n label: this.translatorService.Tranlate('CALCULATION_DETAILS_GUIDE_NUMBER_HEADER', 'Cod'),\r\n options: {\r\n customBodyRender: (value: string, tableMeta: MUIDataTableMeta) => {\r\n const item = this.state.calculationPartsOrdered.find(\r\n (item) => item.id === tableMeta.rowData[0]\r\n );\r\n return {value};\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'alternativeGuideNumber',\r\n label: this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_ALT_GUIDE_NUMBER_HEADER',\r\n 'Cod Aftermarket'\r\n ),\r\n options: { filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'name',\r\n label: this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_DESCRIPTION_HEADER',\r\n 'Descriere'\r\n ),\r\n options: {\r\n customBodyRender: (value: string, tableMeta: MUIDataTableMeta) => {\r\n const item = this.state.calculationPartsOrdered.find(\r\n (item) => item.id === tableMeta.rowData[0]\r\n );\r\n\r\n if (R.isNil(item)) {\r\n return '';\r\n }\r\n return R.isNil(item!.alternativePartQualityId) ? item!.name : item!.alternativePartName;\r\n }\r\n }\r\n },\r\n {\r\n name: '',\r\n label: this.translatorService.Tranlate('CALCULATION_DETAILS_SUPPLIER_HEADER', 'Furnizor'),\r\n options: {\r\n filter: false,\r\n customBodyRender: (value: IReferential, tableMeta: MUIDataTableMeta) => {\r\n return this.displayCalculationPartSupplier(tableMeta.rowData[1]);\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'producer',\r\n label: this.translatorService.Tranlate('CALCULATION_DETAILS_PRODUCER_HEADER', 'Producator'),\r\n options: { filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'deliveryTime',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'alternativePartQuality',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'carPartCategory',\r\n label: this.translatorService.Tranlate('CALCULATION_DETAILS_QUALITY_HEADER', 'Calitate'),\r\n options: {\r\n customBodyRender: (value: IReferential, tableMeta: MUIDataTableMeta) => {\r\n return this.displayCalculationPartQuality(value, tableMeta.rowData);\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'pieceNr',\r\n label: this.translatorService.Tranlate('CALCULATION_DETAILS_UNITS_HEADER', 'Unitati')\r\n },\r\n {\r\n name: 'alternativePrice',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'originalPrice',\r\n label: this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_UNIT_PRICE_HEADER',\r\n 'Pret Unitar'\r\n ),\r\n options: {\r\n customBodyRender: (value: number, tableMeta: MUIDataTableMeta) => {\r\n return Utils.countryNumberFormat(this.displayCalculationPartPrice(value, tableMeta.rowData[0]), this.props.appState.appUser?.organization?.country ?? null);\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'discount',\r\n label: this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_DISCOUNT_HEADER',\r\n 'Discount (%)'\r\n ),\r\n options: {\r\n customBodyRender: (value: number, tableMeta: MUIDataTableMeta) => {\r\n return this.displayCalculationPartDiscount(value, tableMeta.rowData[0]);\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: '',\r\n label: this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_TOTAL_PRICE_HEADER',\r\n 'Pret Total'\r\n ),\r\n options: {\r\n customBodyRender: (value: number, tableMeta: MUIDataTableMeta) => {\r\n return Utils.countryNumberFormat(this.displayCalculationPartTotalPrice(tableMeta.rowData), this.props.appState.appUser?.organization?.country ?? null);\r\n }\r\n } as MUIDataTableColumnOptions\r\n }\r\n ];\r\n\r\n return columns;\r\n };\r\n public renderOrderedPartsTable = () => {\r\n const options = {\r\n filter: false,\r\n search: false,\r\n viewColumns: false,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n rowHover: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n sort: false,\r\n elevation: 1\r\n };\r\n return (\r\n
\r\n \r\n
\r\n );\r\n };\r\n\r\n save = async () => {\r\n if (this.state.hasBillingForm) {\r\n if (this.state.selectedOrganizationBranch?.organizationId == null) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('ALTERNATIVE_CALCULATION_NO_DELIVERY_ADDRESS', 'Va rugam selectati adresa de livrare!'),\r\n { \r\n variant: 'warning',\r\n autoHideDuration: 6000\r\n }\r\n );\r\n return;\r\n }\r\n }\r\n \r\n try {\r\n const calculationParts = this.state.calculationParts.filter(\r\n (item) => item.calculationSectionId === this.state.partSection!.id && !item.isOrdered\r\n );\r\n\r\n if (this.props.workflowCalculation!.allPartsHasBeenInterogated) {\r\n const allPartsHasBeenInterogated = this.checkIfOptimIsPossible();\r\n if (!allPartsHasBeenInterogated) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('ALTERNATIVE_CALCULATION_WITHOUT_ALL_PARTS_INTEROGATED', 'Va rugam interogati toate piesele!'),\r\n { \r\n variant: 'warning',\r\n autoHideDuration: 6000\r\n }\r\n );\r\n return;\r\n }\r\n } else {\r\n if (calculationParts.filter((item) => !R.isNil(item.alternativePartQualityId)).length == 0 && !this.state.isConfirm) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('ALTERNATIVE_CALCULATION_WITHOUT_INTEROGATE_PARTS', 'O calculatie alternativa nu poate fi salvata daca nu are niciun reper interogat!'),\r\n { \r\n variant: 'warning',\r\n autoHideDuration: 6000\r\n }\r\n );\r\n return;\r\n } \r\n }\r\n\r\n const alternativeParts = [...this.state.caseCalculationAlternativePart];\r\n let validateError = 0;\r\n let errorString = '';\r\n let decimalError = false;\r\n let zeroPriceError = false;\r\n let alternativePartDescriptionError = false;\r\n calculationParts.map((calcPart) => {\r\n const interogateList : CaseCalculationAlternativePart[] = [];\r\n [...alternativeParts].map((item) => {\r\n if (item.originalPartId === calcPart.id) {\r\n interogateList.push(item);\r\n if (item.selectedAlternativePart !== 9999999999999) {\r\n const filtercalculationParts = _.filter(\r\n [...calculationParts],\r\n function (calcPartObject) {\r\n return (\r\n calcPartObject.alternativeGuideNumber == calcPart.alternativeGuideNumber &&\r\n calcPartObject.alternativePartCode == calcPart.alternativePartCode &&\r\n calcPartObject.supplierId == calcPart.supplierId\r\n );\r\n }\r\n );\r\n if (!R.isNil(this.props.workflowCalculation) && this.props.workflowCalculation.hasAlternativePartDescription) {\r\n const nonStockSupplier = this.props.nonStockSuppliers.find(x => x.supplierId === item.supplierId);\r\n if (!R.isNil(nonStockSupplier) && R.isNil(item.availableQuantity) &&\r\n (R.isNil(calcPart.alternativePartDescription) || R.isEmpty(calcPart.alternativePartDescription))\r\n ) {\r\n alternativePartDescriptionError = true;\r\n this.validateAlternativePartDescriptionAdd(calcPart.id);\r\n } else {\r\n this.validateAlternativePartDescriptionRemove(calcPart.id);\r\n }\r\n }\r\n const currentPacking = item.packing?.split('|')[0];\r\n const secondItemOfPacking = item.packing?.split('|')[1];\r\n if (currentPacking && secondItemOfPacking) {\r\n const currentPackingNumber = parseFloat(currentPacking);\r\n if (filtercalculationParts && filtercalculationParts.length) {\r\n const pieceNr = _.sumBy(filtercalculationParts, 'pieceNr');\r\n console.log('filtercalculationParts');\r\n console.log(filtercalculationParts);\r\n console.log(pieceNr);\r\n if (pieceNr % currentPackingNumber == 0) {\r\n return;\r\n }\r\n }\r\n if (\r\n calcPart.pieceNr % currentPackingNumber != 0 ||\r\n calcPart.pieceNr < calcPart.minQty\r\n ) {\r\n errorString +=\r\n this.translatorService.Tranlate(\r\n 'MIN_PACKING_ERROR_MSG',\r\n 'Cantitatea comandata trebuie sa fie '\r\n ) +\r\n currentPackingNumber +\r\n this.translatorService.Tranlate('MIN_PACKING_MULTIPLE_ERROR_MSG', ' sau multiplul acesteia!') + ' \\n';\r\n this.validateOrigPartUnitsAdd(calcPart.id);\r\n return;\r\n }\r\n } else {\r\n if (calcPart.pieceNr < calcPart.minQty) {\r\n errorString +=\r\n this.translatorService.Tranlate(\r\n 'MIN_PACKING_ERROR_MSG',\r\n 'Cantitatea comandata trebuie sa fie '\r\n ) +\r\n calcPart.minQty +\r\n this.translatorService.Tranlate('MIN_PACKING_MULTIPLE_ERROR_MSG', ' sau multiplul acesteia!') + ' \\n';\r\n this.validateOrigPartUnitsAdd(calcPart.id);\r\n return;\r\n }\r\n }\r\n if (!Number.isInteger(calcPart.pieceNr)) {\r\n decimalError = true;\r\n this.validateOrigPartUnitsAdd(calcPart.id);\r\n return;\r\n }\r\n if (!R.isNil(item.availableQuantity) && item.availableQuantity < calcPart.pieceNr) {\r\n validateError++;\r\n this.validateOrigPartUnitsAdd(calcPart.id);\r\n } else {\r\n this.validateOrigPartUnitsRemove(calcPart.id);\r\n } \r\n \r\n }\r\n }\r\n });\r\n calcPart.interogationList = JSON.stringify(interogateList);\r\n });\r\n\r\n const calculationPartsList = _.cloneDeep(this.state.calculationParts);\r\n if (this.props.workflowCalculation!.serviceOwnStock && this.state.ownStockOrganization) {\r\n calculationPartsList.forEach((item) => {\r\n const alternativePartsList = [...alternativeParts].filter(x => x.originalPartId === item.id);\r\n if (alternativePartsList.length > 0) { \r\n return;\r\n }\r\n if (item.calculationSection!.code === CalculationSectionCodeEnum.PART &&\r\n !item.isOrdered && !item.supplierId && item.originalPrice === 0) {\r\n zeroPriceError = true;\r\n item.editOriginalPrice = true;\r\n }\r\n });\r\n }\r\n\r\n if (errorString) {\r\n this.props.enqueueSnackbar(errorString, {\r\n variant: 'error',\r\n style: { whiteSpace: 'pre-line' }\r\n });\r\n return;\r\n }\r\n\r\n if (decimalError) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'DECIMAL_ERROR_MSG',\r\n 'Cantitatea comandata trebuie sa fie un numar intreg fara zecimale'\r\n ),\r\n {\r\n variant: 'error'\r\n }\r\n );\r\n return;\r\n }\r\n\r\n if (alternativePartDescriptionError) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'ALTERNATIVE_PART_DESCRIPTION_ERROR_MSG',\r\n 'Va rugam completati descrierea piesei alternative!'\r\n ),\r\n {\r\n variant: 'error'\r\n }\r\n )\r\n return;\r\n }\r\n\r\n if (zeroPriceError) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'ZERO_PRICE_ERROR_MSG',\r\n 'Pretul trebuie sa fie diferit de 0!'\r\n ),\r\n {\r\n variant: 'error'\r\n }\r\n );\r\n this.setState({\r\n calculationParts: calculationPartsList\r\n }, () => {\r\n const calculationPartsList = _.cloneDeep(this.state.calculationParts);\r\n const alternativeParts = _.cloneDeep(this.state.caseCalculationAlternativePart);\r\n if (this.props.workflowCalculation!.serviceOwnStock && this.state.ownStockOrganization) {\r\n calculationPartsList.forEach((item) => {\r\n const alternativePartsList = [...alternativeParts].filter(x => x.originalPartId === item.id);\r\n if (alternativePartsList.length > 0) { \r\n return;\r\n }\r\n if (item.calculationSection!.code === CalculationSectionCodeEnum.PART &&\r\n !item.isOrdered && !item.supplierId && item.originalPrice === 0) {\r\n this.validateOriginalPartPriceAdd(item.id);\r\n }\r\n });\r\n }\r\n });\r\n return;\r\n }\r\n\r\n if (validateError > 0) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n return;\r\n }\r\n\r\n if (\r\n calculationParts.filter((item) => R.isNil(item.alternativePartQualityId)).length !== 0 &&\r\n !this.state.isConfirm\r\n ) {\r\n this.setState({ isDialogModifiedOpen: true });\r\n return;\r\n }\r\n\r\n this.setState({ executing: true });\r\n let caseCalculationHistoryId = this.props.calculationHistoryId;\r\n if (!caseCalculationHistoryId) {\r\n caseCalculationHistoryId = (\r\n await this.caseService.CreateCalculationHistory({\r\n caseId: this.props.caseSettingsState.case!.id,\r\n formId: this.props.workflowCalculation?.workflowSectionStepFormId,\r\n calculationId: null,\r\n calculationTypeId: 2, // Alternative\r\n workflowCalculationId: this.props.workflowCalculation!.id,\r\n partsLocationOrganizationId: this.state.selectedOrganizationBranch?.organizationId,\r\n partsOrganizationId: this.props.appState.appUser?.organizationId,\r\n organizationId: this.props.appState.appUser!.organizationId,\r\n organizationName: this.props.appState.appUser!.organization!.name,\r\n manipulationPercent: this.props.manipulationTariff!.value\r\n } as CalculationRequest)\r\n ).id;\r\n }\r\n\r\n let calculationPartsToSave = _.cloneDeep(this.state.calculationParts.concat(\r\n this.getPackageFromCalculationParts([...this.state.calculationParts])\r\n ));\r\n console.log('calculationPartsToSave before', calculationPartsToSave);\r\n console.log('ownStockOrganization: ', this.state.ownStockOrganization, 'serviceOwnStock: ', this.props.workflowCalculation!.serviceOwnStock);\r\n if (this.props.workflowCalculation!.serviceOwnStock && this.state.ownStockOrganization) {\r\n calculationPartsToSave.forEach((item) => {\r\n if (item.calculationSection!.code === CalculationSectionCodeEnum.PART && !item.isOrdered && !item.supplierId) {\r\n item.supplierId = this.state.ownStockOrganization!.id;\r\n item.isOwnStock = true;\r\n }\r\n });\r\n }\r\n calculationPartsToSave = calculationPartsToSave.concat([...this.state.packageCalculationParts]);\r\n console.log('calculationPartsToSave after', calculationPartsToSave);\r\n await this.caseService.UpdateCaseCalculationParts(\r\n calculationPartsToSave,\r\n this.state.caseCalculationHistoryDetails.comment,\r\n this.state.caseCalculationHistoryDetails.offerNumber,\r\n caseCalculationHistoryId,\r\n this.state.selectedOrganizationBranch?.organizationId || null,\r\n this.props.appState.appUser!.organizationId,\r\n this.props.appState.appUser!.organizationId,\r\n this.props.appState.appUser!.organization!.name,\r\n false,\r\n this.props.manipulationTariff!.value,\r\n null,\r\n this.props.workflowCalculation!.workflowSectionStepFormId,\r\n this.state.currentWorkflowContainsOrderFormOrInterogatePartner\r\n );\r\n\r\n if (this.props.appState.appUser!.organization!.changeCaseStatusBasedCalculation) {\r\n const status = _.find(this.state.caseStatuses, function (caseStatus) {\r\n return caseStatus.code === CaseStatusCodeEnum.AM;\r\n });\r\n const caseStatusRequest = {\r\n caseId: this.props.caseSettingsState.case!.id,\r\n statusId: status!.id\r\n } as ChangeCaseStatusRequest;\r\n\r\n const currentStatus = await this.caseService.ChangeCaseStatus(caseStatusRequest);\r\n this.props.SetCaseStatus(currentStatus);\r\n }\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n\r\n this.props.onSave();\r\n\r\n this.setState({ isConfirm: false });\r\n this.setState({ executing: false });\r\n } catch (err) {\r\n console.log(err);\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n this.setState({ executing: false });\r\n }\r\n };\r\n\r\n getPackageFromCalculationParts = (calculationParts: CaseCalculationPart[]) => {\r\n const newcalculationParts = [];\r\n for (let i = 0; i < calculationParts.length; i++) {\r\n if (calculationParts[i].package && calculationParts[i].package.length) {\r\n for (let j = 0; j < calculationParts[i].package.length; j++) {\r\n newcalculationParts.push({\r\n ...calculationParts[i].package[j],\r\n availableQuantity: calculationParts[i].availableQuantity,\r\n });\r\n }\r\n }\r\n }\r\n return newcalculationParts;\r\n };\r\n\r\n handleImportOriginalParts = (event: any) => {\r\n event.preventDefault();\r\n\r\n const files = event.target.files,\r\n f = files[0];\r\n const reader = new FileReader();\r\n reader.onload = (e) => {\r\n const data = e.target!.result;\r\n const readedData = XLSX.read(data, { type: 'binary' });\r\n const wsname = readedData.SheetNames[0];\r\n const ws = readedData.Sheets[wsname];\r\n\r\n const fullParsedContent = XLSX.utils.sheet_to_json(ws, { header: 1 });\r\n if (fullParsedContent.length === 0) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'ERROR_IMPORT_PARTS_BY_XLSX_FILE',\r\n 'Importul nu s-a putut efectua! Verificati fisierul!'\r\n ),\r\n { variant: 'error' }\r\n );\r\n return;\r\n }\r\n const header = fullParsedContent[0] as any;\r\n if (\r\n fullParsedContent.length > 0 &&\r\n (header[0] !== ImportOriginalPartsFileHeader.H1 ||\r\n header[1] !== ImportOriginalPartsFileHeader.H2 ||\r\n header[2] !== ImportOriginalPartsFileHeader.H3 ||\r\n header[3] !== ImportOriginalPartsFileHeader.H4 ||\r\n header[4] !== ImportOriginalPartsFileHeader.H5)\r\n ) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'ERROR_IMPORT_PARTS_BY_XLSX_FILE',\r\n 'Importul nu s-a putut efectua! Verificati fisierul!'\r\n ),\r\n { variant: 'error' }\r\n );\r\n return;\r\n }\r\n\r\n /* Convert array to json*/\r\n const dataParse = XLSX.utils\r\n .sheet_to_json(ws, {\r\n header: [\r\n 'guideNumberImported',\r\n 'nameImported',\r\n 'originalPriceImported',\r\n 'qualityImported',\r\n 'unitsImported'\r\n ],\r\n defval: ''\r\n })\r\n .slice(1);\r\n if (dataParse.length <= 0) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'ERROR_IMPORT_PARTS_BY_XLSX_FILE',\r\n 'Importul nu s-a putut efectua! Verificati fisierul!'\r\n ),\r\n { variant: 'error' }\r\n );\r\n return;\r\n }\r\n const partQualityTypes = this.state.partQualityTypes.sort(function (a, b) {\r\n return a.displayName.localeCompare(b.displayName);\r\n });\r\n const dataParseArr = dataParse as any[];\r\n let emptyRows = false as boolean;\r\n dataParseArr.map((item) => {\r\n if (\r\n item.guideNumberImported.toString() === '' ||\r\n !item.guideNumberImported.toString().trim().length\r\n ) {\r\n emptyRows = true;\r\n }\r\n if (item.nameImported.toString() === '' || !item.nameImported.toString().trim().length) {\r\n emptyRows = true;\r\n }\r\n if (\r\n item.originalPriceImported.toString() === '' ||\r\n !item.originalPriceImported.toString().trim().length\r\n ) {\r\n emptyRows = true;\r\n }\r\n if (\r\n item.qualityImported.toString() === '' ||\r\n !item.qualityImported.toString().trim().length\r\n ) {\r\n emptyRows = true;\r\n }\r\n if (item.unitsImported.toString() === '' || !item.unitsImported.toString().trim().length) {\r\n emptyRows = true;\r\n }\r\n const partQualityTypesFilter = partQualityTypes.filter(\r\n (qualityType) => qualityType.code === item.qualityImported.toString()\r\n );\r\n if (partQualityTypesFilter.length <= 0) {\r\n emptyRows = true;\r\n }\r\n });\r\n if (emptyRows === true) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'ERROR_IMPORT_PARTS_BY_XLSX_FILE',\r\n 'Importul nu s-a putut efectua! Verificati fisierul!'\r\n ),\r\n { variant: 'error' }\r\n );\r\n return;\r\n }\r\n this.importOriginalParts(dataParse);\r\n };\r\n reader.readAsBinaryString(f);\r\n event.target.value = '';\r\n };\r\n\r\n importOriginalParts = (importedOriginalParts: any) => {\r\n try {\r\n const partQualityTypes = this.state.partQualityTypes.sort(function (a, b) {\r\n return a.displayName.localeCompare(b.displayName);\r\n });\r\n const calculationParts = [...this.state.calculationParts];\r\n const loaders = [...this.state.partLoaders];\r\n const interogateParts = [...this.state.interogateParts];\r\n [...importedOriginalParts].map((item, index) => {\r\n const partQualityTypesFilter = partQualityTypes.filter(\r\n (qualityType) => qualityType.code === item.qualityImported\r\n );\r\n calculationParts.push({\r\n carPartCategory: partQualityTypesFilter[0],\r\n carPartCategoryId: partQualityTypesFilter[0].id,\r\n amount: 0,\r\n caseCalculationHistoryId: this.props.calculationHistoryId,\r\n id: -1 * this.state.calculationParts.length - index,\r\n discount: 0,\r\n calculationSectionId: this.state.partSection!.id,\r\n calculationSection: this.state.partSection,\r\n guideNumber: item.guideNumberImported,\r\n name: item.nameImported,\r\n originalPrice: item.originalPriceImported,\r\n pieceNr: item.unitsImported\r\n } as CaseCalculationPart);\r\n\r\n loaders.push(false);\r\n interogateParts.push(false);\r\n });\r\n\r\n this.setState(\r\n {\r\n calculationParts: calculationParts,\r\n partLoaders: loaders,\r\n interogateParts: interogateParts\r\n },\r\n () => this.props.handleUpdateAlternativeCalcAmount(calculationParts)\r\n );\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n handleImportAlternativeParts = (event: any) => {\r\n event.preventDefault();\r\n\r\n const originalParts = this.state.calculationParts.filter(\r\n (item) => item.calculationSectionId === this.state.partSection!.id\r\n );\r\n if (originalParts.length === 0) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'NO_ORIGINAL_PARTS_FOUND',\r\n 'Nu exista nicio piesa originala!'\r\n ),\r\n { variant: 'error' }\r\n );\r\n event.target.value = '';\r\n return;\r\n }\r\n\r\n const files = event.target.files,\r\n f = files[0];\r\n const reader = new FileReader();\r\n reader.onload = (e) => {\r\n const data = e.target!.result;\r\n const readedData = XLSX.read(data, { type: 'binary' });\r\n const wsname = readedData.SheetNames[0];\r\n const ws = readedData.Sheets[wsname];\r\n const fullParsedContent = XLSX.utils.sheet_to_json(ws, { header: 1 });\r\n if (fullParsedContent.length === 0) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'ERROR_IMPORT_PARTS_BY_XLSX_FILE',\r\n 'Importul nu s-a putut efectua! Verificati fisierul!'\r\n ),\r\n { variant: 'error' }\r\n );\r\n return;\r\n }\r\n const header = fullParsedContent[0] as any;\r\n if (\r\n fullParsedContent.length > 0 &&\r\n (header[0] !== ImportAlternativePartsFileHeader.H1 ||\r\n header[1] !== ImportAlternativePartsFileHeader.H2 ||\r\n header[2] !== ImportAlternativePartsFileHeader.H3 ||\r\n header[3] !== ImportAlternativePartsFileHeader.H4 ||\r\n header[4] !== ImportAlternativePartsFileHeader.H5 ||\r\n header[5] !== ImportAlternativePartsFileHeader.H6 ||\r\n header[6] !== ImportAlternativePartsFileHeader.H7 ||\r\n header[7] !== ImportAlternativePartsFileHeader.H8 ||\r\n (header[8] !== undefined && header[8] !== ImportAlternativePartsFileHeader.H9) ||\r\n (header[9] !== undefined && header[9] !== ImportAlternativePartsFileHeader.H10) ||\r\n (header[10] !== undefined && header[10] !== ImportAlternativePartsFileHeader.H11))\r\n ) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'ERROR_IMPORT_PARTS_BY_XLSX_FILE',\r\n 'Importul nu s-a putut efectua! Verificati fisierul!'\r\n ),\r\n { variant: 'error' }\r\n );\r\n return;\r\n }\r\n\r\n /* Convert array to json*/\r\n const dataParse = XLSX.utils\r\n .sheet_to_json(ws, {\r\n header: [\r\n 'originalPartGuideNumberImported',\r\n 'alternativePartGuideNumberImported',\r\n 'nameImported',\r\n 'originalPriceImported',\r\n 'qualityImported',\r\n 'producerImported',\r\n 'supplierImported',\r\n 'deliveryTimeImported',\r\n 'availableQuantityImported',\r\n 'stockLocationImported',\r\n 'remarksImported'\r\n ],\r\n defval: ''\r\n })\r\n .slice(1);\r\n\r\n if (dataParse.length <= 0) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'ERROR_IMPORT_PARTS_BY_XLSX_FILE',\r\n 'Importul nu s-a putut efectua! Verificati fisierul!'\r\n ),\r\n { variant: 'error' }\r\n );\r\n return;\r\n }\r\n const partQualityTypes = this.state.partQualityTypes.sort(function (a, b) {\r\n return a.displayName.localeCompare(b.displayName);\r\n });\r\n const supplierList = this.state.supplierList;\r\n const dataParseArr = dataParse as any[];\r\n let emptyRows = false as boolean;\r\n\r\n const originalPartsGuideNrs = [] as any[];\r\n originalParts.map((item) => {\r\n originalPartsGuideNrs.push({ guideNumber: item.guideNumber });\r\n });\r\n\r\n dataParseArr.map((item) => {\r\n if (\r\n item.originalPartGuideNumberImported.toString() === '' ||\r\n !item.originalPartGuideNumberImported.toString().trim().length\r\n ) {\r\n emptyRows = true;\r\n }\r\n if (\r\n item.alternativePartGuideNumberImported.toString() === '' ||\r\n !item.alternativePartGuideNumberImported.toString().trim().length\r\n ) {\r\n emptyRows = true;\r\n }\r\n if (item.nameImported.toString() === '' || !item.nameImported.toString().trim().length) {\r\n emptyRows = true;\r\n }\r\n if (\r\n item.originalPriceImported.toString() === '' ||\r\n !item.originalPriceImported.toString().trim().length\r\n ) {\r\n emptyRows = true;\r\n }\r\n if (\r\n item.qualityImported.toString() === '' ||\r\n !item.qualityImported.toString().trim().length\r\n ) {\r\n emptyRows = true;\r\n }\r\n if (\r\n item.producerImported.toString() === '' ||\r\n !item.producerImported.toString().trim().length\r\n ) {\r\n emptyRows = true;\r\n }\r\n if (\r\n item.supplierImported.toString() === '' ||\r\n !item.supplierImported.toString().trim().length\r\n ) {\r\n emptyRows = true;\r\n }\r\n if (\r\n item.deliveryTimeImported.toString() === '' ||\r\n !item.deliveryTimeImported.toString().trim().length\r\n ) {\r\n emptyRows = true;\r\n }\r\n const partQualityTypesFilter = partQualityTypes.filter(\r\n (qualityType) => qualityType.code === item.qualityImported.toString()\r\n );\r\n if (partQualityTypesFilter.length <= 0) {\r\n emptyRows = true;\r\n }\r\n const filterByOriginalGuideNumber = originalPartsGuideNrs.filter(\r\n (cls) => item.originalPartGuideNumberImported.toString() === cls.guideNumber.toString()\r\n );\r\n if (filterByOriginalGuideNumber.length === 0) {\r\n emptyRows = true;\r\n }\r\n\r\n const supplierListFilter = supplierList.filter(\r\n (supplier) => supplier.companyNumber === item.supplierImported.toString()\r\n );\r\n if (supplierListFilter.length <= 0) {\r\n emptyRows = true;\r\n }\r\n });\r\n if (emptyRows === true) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'ERROR_IMPORT_PARTS_BY_XLSX_FILE',\r\n 'Importul nu s-a putut efectua! Verificati fisierul!'\r\n ),\r\n { variant: 'error' }\r\n );\r\n return;\r\n }\r\n this.importAlternativeParts(dataParse);\r\n };\r\n reader.readAsBinaryString(f);\r\n event.target.value = '';\r\n };\r\n\r\n importAlternativeParts = (importedAlternativeParts: any) => {\r\n try {\r\n const partQualityTypes = this.state.partQualityTypes.sort(function (a, b) {\r\n return a.displayName.localeCompare(b.displayName);\r\n });\r\n const supplierList = this.state.supplierList;\r\n const calculationParts = this.state.calculationParts.filter(\r\n (item) => item.calculationSectionId === this.state.partSection!.id\r\n );\r\n const alternativeParts = [...this.state.caseCalculationAlternativePart];\r\n\r\n calculationParts.map((calcPart) => {\r\n [...importedAlternativeParts].map((item, index) => {\r\n if (item.originalPartGuideNumberImported.toString() === calcPart.guideNumber.toString()) {\r\n const partQualityTypesFilter = partQualityTypes.filter(\r\n (qualityType) => qualityType.code === item.qualityImported\r\n );\r\n const supplierListFilter = supplierList.filter(\r\n (supplier) =>\r\n supplier.companyNumber !== '' &&\r\n supplier.companyNumber === item.supplierImported.toString()\r\n );\r\n alternativeParts.push({\r\n id: this.state.caseCalculationAlternativePart.length + index,\r\n alternativeGuideNumber: item.alternativePartGuideNumberImported,\r\n alternativePartQuality: partQualityTypesFilter[0],\r\n alternativePartQualityId: partQualityTypesFilter[0].id,\r\n alternativePrice: item.originalPriceImported,\r\n availableQuantity: isNaN(Number.parseFloat(item.availableQuantityImported))\r\n ? null\r\n : Number.parseFloat(item.availableQuantityImported),\r\n deliveryTime: item.deliveryTimeImported,\r\n name: item.nameImported,\r\n originalPartId: calcPart.id,\r\n producer: item.producerImported,\r\n remarks: item.remarksImported,\r\n selectedAlternativePart: 9999999999999,\r\n stockLocation: item.stockLocationImported,\r\n supplierId: supplierListFilter.length > 0 ? supplierListFilter[0].id : null,\r\n supplier: supplierListFilter.length > 0 ? supplierListFilter[0] : null\r\n } as CaseCalculationAlternativePart);\r\n }\r\n });\r\n });\r\n\r\n this.setState(\r\n {\r\n // calculationParts: calculationParts,\r\n caseCalculationAlternativePart: alternativeParts,\r\n caseCalculationAlternativePartCopy: alternativeParts\r\n },\r\n () => this.props.handleUpdateAlternativeCalcAmount(calculationParts)\r\n );\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n renderPartsButtons = () => {\r\n return (\r\n \r\n
\r\n
\r\n {!R.isNil(this.props.workflowCalculation) &&\r\n !R.isNil(this.props.workflowCalculation.addOriginalPart) &&\r\n this.props.workflowCalculation.addOriginalPart ? (\r\n this.newCalculationPart(null)}\r\n className=\"mr-2\"\r\n variant=\"contained\"\r\n color=\"primary\"\r\n >\r\n {this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_ALTERNATIVE_CALCULATION_DETAILS_ADD_ORIGINAL_PART_LABEL',\r\n 'Adauga piesa originala'\r\n )}\r\n \r\n ) : null}\r\n {!R.isNil(this.props.workflowCalculation) &&\r\n !R.isNil(this.props.workflowCalculation.importOriginalParts) &&\r\n this.props.workflowCalculation.importOriginalParts ? (\r\n {\r\n this.handleImportOriginalParts(e);\r\n }}\r\n component=\"label\"\r\n variant=\"contained\"\r\n color=\"secondary\"\r\n >\r\n {this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_ALTERNATIVE_CALCULATION_DETAILS_IMPORT_NEW_PARTS_LABEL',\r\n 'Importa piese noi'\r\n )}\r\n \r\n \r\n ) : null}\r\n
\r\n
\r\n {!R.isNil(this.props.workflowCalculation) &&\r\n !R.isNil(this.props.workflowCalculation.importAlternativeParts) &&\r\n this.props.workflowCalculation.importAlternativeParts ? (\r\n {\r\n this.handleImportAlternativeParts(e);\r\n }}\r\n component=\"label\"\r\n variant=\"contained\"\r\n color=\"secondary\"\r\n >\r\n {this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_ALTERNATIVE_CALCULATION_DETAILS_IMPORT_ALTERNATIVE_PARTS_LABEL',\r\n 'Importa piese alternative'\r\n )}\r\n \r\n \r\n ) : null}\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n );\r\n };\r\n\r\n handleOriginalPartPriceChange = (e: React.ChangeEvent, id: number) => {\r\n const calculationParts = [...this.state.calculationParts];\r\n const index = calculationParts.findIndex((item) => item.id === id);\r\n calculationParts[index] = { ...calculationParts[index], originalPrice: e.target.value === null ? 0 : parseFloat(e.target.value)};\r\n \r\n if (this.props.workflowCalculation!.serviceOwnStock && this.state.ownStockOrganization) {\r\n if (!calculationParts[index].supplierId && calculationParts[index].originalPrice === 0) {\r\n this.validateOriginalPartPriceAdd(calculationParts[index].id);\r\n } else {\r\n this.validateOriginalPartPriceRemove(calculationParts[index].id);\r\n }\r\n }\r\n\r\n this.setState({ calculationParts: calculationParts });\r\n };\r\n\r\n handleOriginalPartGuideNumberChange = (e: React.ChangeEvent, id: number) => {\r\n const calculationParts = [...this.state.calculationParts];\r\n const index = calculationParts.findIndex((item) => item.id === id);\r\n calculationParts[index] = { ...calculationParts[index], guideNumber: (e.target.value).trimLeft()};\r\n this.setState({ calculationParts: calculationParts });\r\n };\r\n\r\n handleAlternativePartDescriptionChange = (e: React.ChangeEvent, id: number) => {\r\n const calculationParts = [...this.state.calculationParts];\r\n const index = calculationParts.findIndex((item) => item.id === id);\r\n calculationParts[index] = {\r\n ...calculationParts[index],\r\n alternativePartDescription: e.target.value\r\n };\r\n const caseCalculationAlternativePartCopy = [...this.state.caseCalculationAlternativePart];\r\n const alternativePartChecked = caseCalculationAlternativePartCopy.find(\r\n (item) =>\r\n item.originalPartId === calculationParts[index].id &&\r\n item.selectedAlternativePart !== 9999999999999\r\n );\r\n\r\n if (!R.isNil(alternativePartChecked)) {\r\n if (!R.isNil(this.props.workflowCalculation) && this.props.workflowCalculation.hasAlternativePartDescription) {\r\n if (R.isNil(calculationParts[index].alternativePartDescription) ||\r\n R.isEmpty(calculationParts[index].alternativePartDescription)\r\n ) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'ALTERNATIVE_PART_DESCRIPTION_ERROR_MSG',\r\n 'Va rugam sa completati campul Descriere piesa alt'\r\n ),\r\n { \r\n variant: 'error',\r\n autoHideDuration: 5000 \r\n }\r\n );\r\n this.validateAlternativePartDescriptionAdd(calculationParts[index].id);\r\n } else {\r\n this.validateAlternativePartDescriptionRemove(calculationParts[index].id);\r\n }\r\n }\r\n }\r\n\r\n this.setState({ calculationParts: calculationParts });\r\n };\r\n\r\n handleOriginalPartQuantityChange = (e: React.ChangeEvent, id: number) => {\r\n const calculationParts = [...this.state.calculationParts];\r\n const index = calculationParts.findIndex((item) => item.id === id);\r\n calculationParts[index] = {\r\n ...calculationParts[index],\r\n pieceNr: isNaN(parseFloat(e.target.value)) ? 0 : parseFloat(e.target.value)\r\n };\r\n if (calculationParts[index].package && calculationParts[index].package.length) {\r\n for (let i = 0; i < calculationParts[index].package.length; i++) {\r\n calculationParts[index].package[i].pieceNr = isNaN(parseFloat(e.target.value))\r\n ? 0\r\n : parseFloat(e.target.value);\r\n }\r\n }\r\n\r\n const caseCalculationAlternativePartCopy = [...this.state.caseCalculationAlternativePart];\r\n const alternativePartChecked = caseCalculationAlternativePartCopy.find(\r\n (item) =>\r\n item.originalPartId === calculationParts[index].id &&\r\n item.selectedAlternativePart !== 9999999999999\r\n );\r\n\r\n if (!R.isNil(alternativePartChecked)) {\r\n const currentPacking = alternativePartChecked.packing?.split('|')[0];\r\n const secondItemOfPacking = alternativePartChecked.packing?.split('|')[1];\r\n if (currentPacking && secondItemOfPacking) {\r\n const currentPackingNumber = parseFloat(currentPacking);\r\n if (\r\n parseFloat(e.target.value) % currentPackingNumber != 0 ||\r\n parseFloat(e.target.value) < alternativePartChecked.minQty\r\n ) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'MIN_PACKING_ERROR_MSG',\r\n 'Cantitatea comandata trebuie sa fie '\r\n ) +\r\n currentPackingNumber +\r\n this.translatorService.Tranlate('MIN_PACKING_MULTIPLE_ERROR_MSG', ' sau multiplul acesteia!'),\r\n { variant: 'error',\r\n autoHideDuration: 5000 }\r\n );\r\n }\r\n } else if (parseFloat(e.target.value) < alternativePartChecked.minQty) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'MIN_PACKING_ERROR_MSG',\r\n 'Cantitatea comandata trebuie sa fie '\r\n ) +\r\n alternativePartChecked.minQty +\r\n this.translatorService.Tranlate('MIN_PACKING_MULTIPLE_ERROR_MSG', ' sau multiplul acesteia!'),\r\n { variant: 'error',\r\n autoHideDuration: 5000 }\r\n );\r\n }\r\n if (\r\n !R.isNil(alternativePartChecked!.availableQuantity) &&\r\n alternativePartChecked!.availableQuantity < parseFloat(e.target.value)\r\n ) {\r\n this.validateOrigPartUnitsAdd(calculationParts[index].id);\r\n } else {\r\n this.validateOrigPartUnitsRemove(calculationParts[index].id);\r\n }\r\n }\r\n\r\n this.setState({ calculationParts: calculationParts }, () =>\r\n this.props.handleUpdateAlternativeCalcAmount(calculationParts)\r\n );\r\n };\r\n\r\n checkPackageNotification = () => {\r\n const { packageCalculationParts, calculationParts } = this.state;\r\n \r\n // Găsește piesele care se potrivesc pe baza guideNumber și name\r\n const matchingParts = calculationParts.filter(part => \r\n packageCalculationParts.some(pkgPart => \r\n (pkgPart.guideNumber === part.guideNumber && pkgPart.name === part.name)\r\n ||\r\n (pkgPart.repairMethod === part.repairMethod && OriginalPartShortNumberException.includes(pkgPart.repairMethod))\r\n )\r\n );\r\n \r\n if (matchingParts.length > 0) {\r\n const combinedMessage = matchingParts.map(({ guideNumber, name }) => \r\n `\\n ${guideNumber} - ${name} `\r\n ).join(\", \");\r\n\r\n\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'PARTS_ALREADY_EXIST_IN_PACKAGE',\r\n 'Piesele de mai jos se regasesc deja in pachetul selectat si nu mai pot fi adaugate: '\r\n ) + combinedMessage,\r\n {\r\n variant: 'warning',\r\n style: { whiteSpace: 'pre-line' },\r\n autoHideDuration: 5000 \r\n }\r\n );\r\n } \r\n };\r\n \r\n\r\n renderCalculationPieces = () => {\r\n return (\r\n
\r\n {this.state.calculationParts.filter(\r\n (item) => item.calculationSectionId === this.state.partSection!.id && !item.isOrdered\r\n ).length > 0 ? (\r\n this.state.calculationParts\r\n .filter(\r\n (item) => item.calculationSectionId === this.state.partSection!.id && !item.isOrdered\r\n )\r\n .map((item, index) => {\r\n return (\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n {R.isNil(item!.name) ? '' : item!.name}\r\n {!R.isNil(this.props.workflowCalculation) && (\r\n
\r\n {!R.isNil(this.props.workflowCalculation.addOriginalPart) && this.props.workflowCalculation.addOriginalPart ? (\r\n \r\n this.copyCalculationPart(item.id)}\r\n aria-label=\"copy\"\r\n color=\"primary\"\r\n className=\"pt-0\"\r\n >\r\n \r\n \r\n \r\n ) : null}\r\n {!R.isNil(this.props.workflowCalculation.addNotifySupportOriginalPart) && this.props.workflowCalculation.addNotifySupportOriginalPart ? (\r\n \r\n this.notifySupportCalculationPart(item.id)}\r\n >\r\n \r\n \r\n \r\n ) : null}\r\n
\r\n )}\r\n
\r\n
\r\n \r\n ) => {\r\n this.handleOriginalPartGuideNumberChange(e, item.id);\r\n }}\r\n />\r\n {!R.isNil(this.props.workflowCalculation) && this.props.workflowCalculation.hasAlternativePartDescription ? (\r\n ) => {\r\n this.handleAlternativePartDescriptionChange(e, item.id);\r\n }}\r\n />\r\n ) : null\r\n }\r\n {\r\n item!.editOriginalPrice ? (\r\n ) => {\r\n this.handleOriginalPartPriceChange(e, item.id);\r\n }}\r\n autoFocus={false}\r\n InputProps={{\r\n inputComponent: this.NumberFormatCustom\r\n }}\r\n />\r\n ) : (\r\n \r\n )\r\n }\r\n \r\n ) => {\r\n this.handleOriginalPartQuantityChange(e, item.id);\r\n }}\r\n autoFocus={false}\r\n InputProps={{\r\n inputComponent: this.NumberFormatCustom\r\n }}\r\n />\r\n
\r\n \r\n {!R.isNil(this.props.workflowCalculation) &&\r\n !R.isNil(this.props.workflowCalculation.deleteOriginalPart) &&\r\n this.props.workflowCalculation.deleteOriginalPart ? (\r\n this.deleteCalculationPart(item.id)}\r\n size=\"small\"\r\n variant=\"contained\"\r\n color=\"secondary\"\r\n className=\"mr-3\"\r\n >\r\n \r\n {this.translatorService.Tranlate(\r\n 'DELETE_ORIGINAL_PART_LABEL',\r\n 'Sterge piesa'\r\n )}\r\n \r\n \r\n \r\n \r\n \r\n ) : null}\r\n {\r\n this.isDialogOpenConfirmationHandler(async () => {\r\n await this.interogateAlternativeParts(\r\n item.id,\r\n item.guideNumber,\r\n item,\r\n index\r\n );\r\n });\r\n }}\r\n className=\"float-right\"\r\n size=\"small\"\r\n variant=\"contained\"\r\n color=\"primary\"\r\n >\r\n {this.translatorService.Tranlate('INTEROGATE', 'Interogheaza')}\r\n \r\n \r\n \r\n \r\n \r\n
\r\n {!R.isNil(this.props.workflowCalculation) &&\r\n !R.isNil(this.props.workflowCalculation.addAlternativePart) &&\r\n this.props.workflowCalculation.addAlternativePart ? (\r\n \r\n this.addAlternativePart(item.id)}\r\n aria-label=\"add\"\r\n color=\"primary\"\r\n className=\"pt-0 float-right\"\r\n >\r\n \r\n \r\n \r\n ) : null}\r\n
\r\n
\r\n
\r\n \r\n
\r\n {this.state.partLoaders[index] ? null : (\r\n
\r\n \r\n \r\n \r\n \r\n \r\n alternativePart.originalPartId === item.id\r\n ).length > 0 &&\r\n this.state.caseCalculationAlternativePart\r\n .filter(\r\n (alternativePart) =>\r\n alternativePart.originalPartId === item.id\r\n )\r\n .some(\r\n (el) => el.selectedAlternativePart !== 9999999999999\r\n )\r\n ? false\r\n : true\r\n }\r\n title={this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_ALTERNATIVE_CALCULATION_DETAILS_CLEAR_LABEL',\r\n 'Goleste'\r\n )}\r\n onClick={(e) =>\r\n this.clearSelectedAlternativeParts(item.id)\r\n }\r\n className=\"min min-w-auto\"\r\n size=\"small\"\r\n variant=\"contained\"\r\n color=\"secondary\"\r\n >\r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_ALTERNATIVE_CALCULATION_DETAILS_CODE_LABEL',\r\n 'Cod'\r\n )}\r\n \r\n \r\n {this.translatorService.Tranlate(\r\n 'ORDER_PART_DETAILS_NAME_LABEL',\r\n 'Denumire'\r\n )}\r\n \r\n {!R.isNil(this.props.workflowCalculation) && this.props.workflowCalculation!.alternativeNetPrice ? (\r\n \r\n {this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_NET_PRICE_LKQ_HEADER',\r\n 'Pret Net'\r\n )}\r\n \r\n ): null}\r\n \r\n {this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_ALTERNATIVE_CALCULATION_DETAILS_PRICE_LABEL',\r\n 'Pret'\r\n )}\r\n \r\n \r\n {this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_ALTERNATIVE_CALCULATION_DETAILS_QUALITY_LABEL',\r\n 'Calitate'\r\n )}\r\n \r\n \r\n {this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_ALTERNATIVE_CALCULATION_DETAILS_DELIVERY_LABEL',\r\n 'Livrare'\r\n )}\r\n \r\n \r\n {this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_ALTERNATIVE_CALCULATION_DETAILS_OWNER_LABEL_ACRONYM',\r\n 'Producator'\r\n )}\r\n \r\n \r\n {this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_ALTERNATIVE_CALCULATION_DETAILS_SUPLIER_LABEL',\r\n 'Furnizor'\r\n )}\r\n \r\n \r\n {this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_ALTERNATIVE_CALCULATION_DETAILS_QUANTITY_INFO_LABEL',\r\n 'Cant.'\r\n )}\r\n \r\n \r\n {this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_ALTERNATIVE_CALCULATION_DETAILS_STOCK_LOCATION_LABEL',\r\n 'Locatie'\r\n )}\r\n \r\n \r\n \r\n \r\n {this.state.caseCalculationAlternativePart.filter(\r\n (alternativePart) =>\r\n alternativePart.originalPartId === item.id\r\n ).length > 0 ? (\r\n this.state.caseCalculationAlternativePart\r\n .filter(\r\n (alternativePart) =>\r\n alternativePart.originalPartId === item.id\r\n )\r\n .sort(function (a: any, b: any) {\r\n console.log(a.supplierName);\r\n return a.supplierName - b.supplierName;\r\n })\r\n .map((alternativePart, alternativePartindex) => {\r\n // Creează o referință pentru fiecare rând\r\n this.rowRefs[alternativePart.id] = React.createRef();\r\n return (\r\n \r\n \r\n \r\n this.handleAlternativePartSelect(\r\n alternativePart.id,\r\n alternativePart.originalPartId,\r\n alternativePart\r\n )\r\n }\r\n value={alternativePart.id}\r\n id={alternativePart.id.toString()}\r\n name={item.id.toString()}\r\n />\r\n \r\n \r\n {alternativePart.alternativeGuideNumber}\r\n \r\n \r\n {!R.isNil(alternativePart.remarks) &&\r\n alternativePart.remarks !== '' ? (\r\n \r\n \r\n {this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_ALTERNATIVE_CALCULATION_DETAILS_REMARKS_LABEL',\r\n 'Observatii'\r\n )}\r\n \r\n
{alternativePart.remarks}
\r\n \r\n }\r\n >\r\n
{alternativePart.name}
\r\n \r\n ) : (\r\n \r\n
{alternativePart.name}
\r\n \r\n }\r\n >\r\n
{alternativePart.name}
\r\n \r\n )}\r\n \r\n {!R.isNil(this.props.workflowCalculation) && this.props.workflowCalculation!.alternativeNetPrice ? (\r\n \r\n {alternativePart.alternativeNetPrice ? Utils.countryNumberFormat((\r\n Math.round(\r\n alternativePart.alternativeNetPrice * 100\r\n ) / 100\r\n ).toFixed(2), this.props.appState.appUser?.organization?.country ?? null) \r\n : null}\r\n \r\n ) : null}\r\n \r\n {R.isNil(alternativePart!.alternativePartDiscount)\r\n ? Utils.countryNumberFormat(\r\n (Math.round(alternativePart.alternativePrice * 100) / 100).toFixed(2),\r\n this.props.appState.appUser?.organization?.country ?? null\r\n )\r\n : Utils.countryNumberFormat(\r\n (\r\n Math.round(\r\n alternativePart.alternativePrice * (1 - alternativePart!.alternativePartDiscount / 100) * 100\r\n ) / 100\r\n ).toFixed(2),\r\n this.props.appState.appUser?.organization?.country ?? null\r\n )\r\n }\r\n \r\n \r\n {R.isNil(alternativePart.alternativePartQuality)\r\n ? ''\r\n : alternativePart.alternativePartQuality.code}\r\n \r\n \r\n {alternativePart.deliveryTime.toString().includes(\"in cazul in care piesa se afla in stocul extern\") ? \r\n <>{alternativePart.deliveryTime.toString().split(\"in cazul in care piesa se afla in stocul extern\")[0]}in cazul in care piesa se afla in stocul extern: alternativePart.deliveryTime}\r\n }\r\n >\r\n
{alternativePart.deliveryTime.toString().includes(\"in cazul in care piesa se afla in stocul extern\") ? \r\n <>{alternativePart.deliveryTime.toString().split(\"in cazul in care piesa se afla in stocul extern\")[0]}in cazul in care piesa se afla in stocul extern: alternativePart.deliveryTime}
\r\n \r\n \r\n \r\n {alternativePart.producer}\r\n \r\n \r\n {!R.isNil(alternativePart.supplier)\r\n ? alternativePart.supplier!.name\r\n : ''}\r\n \r\n \r\n {alternativePart.quantityAdditionalInfo &&\r\n alternativePart.availableQuantity ? (\r\n \r\n
\r\n {alternativePart.quantityAdditionalInfo}\r\n
\r\n \r\n }\r\n >\r\n
\r\n \r\n {alternativePart.availableQuantity}\r\n \r\n \r\n
\r\n \r\n ) : (\r\n (this.displayCalculationPartSupplier(alternativePart.supplierId).toUpperCase() == SupplierCode.LKQ.toString().toUpperCase()\r\n ? (\r\n \r\n {isNaN(alternativePart.availableQuantity)\r\n ? null\r\n : alternativePart.availableQuantity > 5 ? '5+' : alternativePart.availableQuantity}\r\n \r\n ) \r\n : (\r\n \r\n {isNaN(alternativePart.availableQuantity)\r\n ? null\r\n : alternativePart.availableQuantity}\r\n \r\n ) \r\n ) \r\n )}\r\n \r\n \r\n {alternativePart.stockLocation ? (\r\n \r\n
\r\n {this.translatorService.Tranlate(\r\n 'ORDER_PART_DETAILS_LOCATION_LABEL',\r\n 'Locatie'\r\n ) +\r\n ': ' +\r\n alternativePart.stockLocation}\r\n
\r\n \r\n }\r\n >\r\n
\r\n \r\n {\r\n alternativePart.stockLocation.split(\r\n '\\n'\r\n )[0]\r\n }\r\n \r\n \r\n
\r\n \r\n ) : (\r\n alternativePart.stockLocation\r\n )}\r\n\r\n {!R.isNil(alternativePart.additionalInfo) &&\r\n alternativePart.additionalInfo !== '' &&\r\n AdditionalInfoCode.PRODUS_NU_POATE_FI_RETURNAT ==\r\n alternativePart.additionalInfo ? (\r\n \r\n {alternativePart.additionalInfo}\r\n

\r\n ) : (\r\n ''\r\n )}\r\n \r\n \r\n );\r\n })\r\n ) : (\r\n \r\n
\r\n \r\n )}\r\n \r\n
\r\n \r\n {this.translatorService.Tranlate(\r\n 'NO_RECORDS_TO_DISPLAY',\r\n 'Nu exista inregistrari de afisat'\r\n )}\r\n \r\n
\r\n
\r\n )}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n
\r\n );\r\n })\r\n ) : (\r\n
\r\n
\r\n {this.translatorService.Tranlate(\r\n 'NO_RECORDS_TO_DISPLAY',\r\n 'Nu exista inregistrari de afisat'\r\n )}\r\n
\r\n \r\n
\r\n )}\r\n {this.state.calculationParts.filter(\r\n (item) => item.calculationSectionId === this.state.partSection!.id && item.isOrdered\r\n ).length > 0 ? (\r\n
\r\n \r\n {this.renderOrderedPartsTable()}\r\n \r\n
\r\n ) : (\r\n ''\r\n )}\r\n {this.renderPartsButtons()}\r\n
\r\n );\r\n };\r\n\r\n closeModifiedDialog = async () => {\r\n this.setState({\r\n isDialogModifiedOpen: false,\r\n isConfirm: false\r\n });\r\n };\r\n\r\n onDropDownChange = (currentNode: any, selectedNodes: any) => {\r\n // react-dropdown-tree-select doesn't have an intrinsic mechanism for keeping track of selected items, only provides what is selected\r\n // So we have to manually check/uncheck the leaves from this tree used by this component\r\n let newSelectionOrganizationBranch: OrganizationBranch | null = null;\r\n if (this.state.selectedOrganizationBranch) {\r\n const oldSelectionOrganizationBranch = this.findRecursive(\r\n this.state.organizationBranches,\r\n this.state.selectedOrganizationBranch.organizationId\r\n );\r\n if (oldSelectionOrganizationBranch) {\r\n oldSelectionOrganizationBranch.checked = false;\r\n }\r\n }\r\n\r\n if (selectedNodes.length == 1) {\r\n const newPartialSelectionOrganizationBranch =\r\n this.findRecursive(\r\n this.state.organizationBranches,\r\n (selectedNodes[0] as OrganizationBranch)?.organizationId\r\n ) || null;\r\n\r\n if (newPartialSelectionOrganizationBranch) {\r\n newPartialSelectionOrganizationBranch.checked = true;\r\n newSelectionOrganizationBranch = newPartialSelectionOrganizationBranch;\r\n }\r\n }\r\n\r\n if (this.state.caseCalculationAlternativePart.length > 0) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('REINTEROGATE_ALTERANTIVE_PARTS', 'Adresa de livrare a fost modificată , vă rugăm să reinterogați piesele!'),\r\n { \r\n variant: 'warning',\r\n autoHideDuration: 6000\r\n }\r\n );\r\n }\r\n\r\n const caseCalculationOriginalPartsCopy = this.state.calculationParts.map((item: CaseCalculationPart) => {\r\n if (item.calculationSectionId === this.state.partSection!.id && !item.isOrdered) {\r\n return {\r\n ...item,\r\n alternativePrice: null,\r\n alternativePartDiscount: null,\r\n alternativeGuideNumber: null,\r\n alternativePartCode: null,\r\n alternativePartName: null,\r\n alternativePartQuality: null,\r\n alternativePartQualityId: null,\r\n alternativePartStockLocation: null,\r\n alternativePartStockQuantity: null,\r\n alternativePartRemarks: null,\r\n minQty: 0,\r\n packing: null,\r\n bundleItem: null,\r\n bundleNo: null,\r\n bundleQuantity: null,\r\n supplierId: null,\r\n supplier: null,\r\n producer: '',\r\n deliveryTime: '',\r\n alternativeNetPrice: null,\r\n alternativePriceWithoutDiscount: null\r\n };\r\n } else return item;\r\n });\r\n \r\n this.setState({\r\n ...this.state,\r\n selectedOrganizationBranch: newSelectionOrganizationBranch,\r\n caseCalculationAlternativePart: [],\r\n caseCalculationAlternativePartCopy: [],\r\n calculationParts: caseCalculationOriginalPartsCopy\r\n },\r\n () => this.props.handleUpdateAlternativeCalcAmount(caseCalculationOriginalPartsCopy));\r\n };\r\n\r\n findRecursive = (\r\n arr: OrganizationBranch[],\r\n organizationId: number\r\n ): OrganizationBranch | null => {\r\n let result: OrganizationBranch | null = null;\r\n for (const entry in arr) {\r\n if (arr[entry].organizationId == organizationId) {\r\n result = arr[entry];\r\n break;\r\n }\r\n if (arr[entry].children?.length) {\r\n const partialResult = this.findRecursive(arr[entry].children, organizationId);\r\n if (partialResult != null) {\r\n result = partialResult;\r\n break;\r\n }\r\n }\r\n }\r\n return result;\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n this.appuserService = (this.context as AppContext).appUserService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.orderService = (this.context as AppContext).orderService;\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n
\r\n
\r\n \r\n
\r\n

\r\n {this.translatorService.Tranlate(\r\n 'INTEROGATE_ALTERNATIVE_PARTS_DIALOG_TITLE',\r\n 'Disponibilitatea pieselor va fi afisata conform adresei'\r\n ) +\r\n ' ' +\r\n this.state.selectedOrganizationBranch?.organizationName +\r\n ' ' +\r\n (this.state.selectedOrganizationBranch?.organizationAddress ?? '')}\r\n

\r\n
\r\n {\r\n this.setState({\r\n isDialogOpenConfirmationOrgPartner: false\r\n });\r\n if (this.state.isDialogOpenFunctionToBeCalled) {\r\n this.state.isDialogOpenFunctionToBeCalled();\r\n }\r\n }}\r\n color=\"primary\"\r\n variant=\"contained\"\r\n className=\"mx-1\"\r\n >\r\n \r\n {this.translatorService.Tranlate('WORKFLOW_DOCUMENTS_TYPE_TAB_YES', 'Da')}\r\n \r\n \r\n {\r\n this.setState({\r\n isDialogOpenConfirmationOrgPartner: false\r\n });\r\n }}\r\n variant=\"outlined\"\r\n color=\"secondary\"\r\n className=\"mx-1\"\r\n >\r\n \r\n {this.translatorService.Tranlate('WORKFLOW_DOCUMENTS_TYPE_TAB_NO', 'Nu')}\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n

\r\n {this.translatorService.Tranlate(\r\n 'OPTIM_PARTS_DIALOG_TITLE',\r\n 'Atentie! Exista o componenta suplimentara. Doriti adaugarea acesteia ?'\r\n )}\r\n

\r\n
\r\n {\r\n this.optimizeAllParts(true);\r\n }}\r\n color=\"primary\"\r\n variant=\"contained\"\r\n className=\"mx-1\"\r\n >\r\n \r\n {this.translatorService.Tranlate('WORKFLOW_DOCUMENTS_TYPE_TAB_YES', 'Da')}\r\n \r\n \r\n {\r\n this.optimizeAllParts(false);\r\n }}\r\n variant=\"outlined\"\r\n color=\"secondary\"\r\n className=\"mx-1\"\r\n >\r\n \r\n {this.translatorService.Tranlate('WORKFLOW_DOCUMENTS_TYPE_TAB_NO', 'Nu')}\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n {\r\n this.isDialogOpenConfirmationHandler(this.interogateAll);\r\n }}\r\n >\r\n {this.translatorService.Tranlate('INTEROGATE', 'Interogheaza')}\r\n \r\n {!R.isNil(this.props.workflowCalculation) && this.props.workflowCalculation!.viewOptim ? ( \r\n {\r\n this.isDialogOpenOptimizeConfirmationHandler();\r\n }}\r\n disabled={!this.checkIfOptimIsPossible()}\r\n >\r\n {this.translatorService.Tranlate('OPTIM', 'Optimizeaza')}\r\n \r\n ) : null}\r\n
\r\n
\r\n {this.state.currentWorkflowContainsOrderFormOrInterogatePartner ? (\r\n <>\r\n
\r\n {this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_ALTERNATIVE_CALCULATION_DETAILS_LOCATION_TEXT',\r\n 'Adresa de livrare:'\r\n )}\r\n
\r\n
\r\n \r\n
\r\n \r\n ) : null}\r\n
\r\n
\r\n\r\n
\r\n {this.renderCalculationPieces()}\r\n
\r\n ) : null}\r\n\r\n \r\n \r\n \r\n \r\n \r\n {this.translatorService.Tranlate(\r\n 'ADD_ALTERNATIVE_PARTS_TITLE',\r\n 'Adauga piese alternativa'\r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.renderAddForm()}\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n {this.state.calculationPartFormTypeAdd\r\n ? this.translatorService.Tranlate(\r\n 'ADD_ORIGINALS_PARTS_TITLE',\r\n 'Adauga piesa originala'\r\n )\r\n : this.translatorService.Tranlate(\r\n 'COPY_ORIGINALS_PARTS_TITLE',\r\n 'Copiaza piesa originala'\r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.renderAddOriginalPartForm()}\r\n \r\n \r\n
\r\n

\r\n {this.translatorService.Tranlate(\r\n 'ERROR_MSG_NO_PARTS_SELECTED',\r\n 'Aveti repere neoptimizate. Doriti sa salvati?'\r\n )}\r\n

\r\n
\r\n {\r\n this.setState(\r\n {\r\n isDialogModifiedOpen: false,\r\n isConfirm: true\r\n },\r\n this.save\r\n );\r\n }}\r\n color=\"primary\"\r\n variant=\"contained\"\r\n className=\"mx-1\"\r\n >\r\n \r\n {this.translatorService.Tranlate('WORKFLOW_DOCUMENTS_TYPE_TAB_YES', 'Da')}\r\n \r\n \r\n \r\n \r\n {this.translatorService.Tranlate('WORKFLOW_DOCUMENTS_TYPE_TAB_NO', 'Nu')}\r\n \r\n \r\n
\r\n
\r\n \r\n\r\n {this.state.isNotifySupportDialogOpen ? (\r\n \r\n \r\n \r\n \r\n \r\n {this.translatorService.Tranlate('NOTIFY_SUPPORT_TITLE', 'Notifica support')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.renderNotifySupportOriginalPartForm()}\r\n \r\n ) : null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalCaseDetailsAlternativeCalculationPiecesProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app\r\n }),\r\n null,\r\n mergeProps\r\n)(withSnackbar(CaseDetailsAlternativeCalculationPieces as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, CaseSettingsState, AppState, VehicleState } from '../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport {\r\n CardContent,\r\n Card,\r\n Button,\r\n Grid,\r\n Typography,\r\n FormControlLabel,\r\n Divider,\r\n Input\r\n} from '@material-ui/core';\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { CaseCalculationHistory, CaseCalculationPart, ManipulationTariffPercentResponse, TariffPercentResponse } from '../../interfaces/Case';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport { IReferentialService } from '../../services/Interfaces/IReferentialService';\r\nimport Referentials from '../../helpers/Referentials.json';\r\nimport {\r\n ReferentialCode,\r\n ParametreCode,\r\n CalculationSectionCodeEnum\r\n} from '../../helpers/Constants';\r\nimport { IAppUserService } from '../../services/Interfaces/IAppUserService';\r\nimport {\r\n WorkflowCalculation,\r\n WorkflowOptimization,\r\n WorkflowSectionStepForm,\r\n WorkflowSupplier\r\n} from '../../interfaces/Workflow';\r\nimport CaseDetailsAlternativeCalculationPieces from './CaseDetailsAlternativeCalculationPieces';\r\nimport { CalculationParts } from '../../interfaces/CalculationParts';\r\nimport * as R from 'ramda';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport { VehicleHelper } from '../../helpers/VehicleHelper';\r\nimport { Order } from '../../interfaces/Order';\r\nimport { Utils } from '../../helpers/Utils';\r\n\r\nexport interface ExternalCaseDetailsAlternativeCalculationDetailsProps {\r\n calculationHistoryId: number;\r\n stepFormId: number;\r\n orderList: Order[];\r\n closeDialog: () => void;\r\n manipulationTariff: ManipulationTariffPercentResponse;\r\n insurerList: IReferential[];\r\n serviceId: number | null;\r\n additionTariff: TariffPercentResponse;\r\n discountTariff: TariffPercentResponse;\r\n packageCalculationId: number | null;\r\n nonStockSuppliers: WorkflowSupplier[];\r\n}\r\n\r\ninterface ICaseDetailsAlternativeCalculationDetailsState {\r\n caseCalculationHistoryDetails: CaseCalculationHistory;\r\n isLoading: boolean;\r\n modified: boolean;\r\n workflowCalculation: WorkflowCalculation | undefined;\r\n workflowOptimization: WorkflowOptimization[];\r\n openMenuItem: any | null;\r\n totalAlternativeCalculation: number;\r\n totalAlternativeCalculationSmallParts: number;\r\n totalPartsAlternativeCalculation: number;\r\n TVA: string;\r\n calculationSectionList: IReferential[];\r\n setOptimizationType: number;\r\n}\r\n\r\ntype ICaseDetailsAlternativeCalculationDetailsProps =\r\n ExternalCaseDetailsAlternativeCalculationDetailsProps & {\r\n caseSettingsState: CaseSettingsState;\r\n appState: AppState;\r\n vehicleState: VehicleState;\r\n workflowCalculation: WorkflowCalculation;\r\n } & ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass CaseDetailsAlternativeCalculationDetails extends React.PureComponent<\r\n ICaseDetailsAlternativeCalculationDetailsProps,\r\n ICaseDetailsAlternativeCalculationDetailsState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private caseService!: ICaseService;\r\n private appReferentialService!: IReferentialService;\r\n private appuserService!: IAppUserService;\r\n\r\n static contextType = ApplicationContext;\r\n state = {\r\n caseCalculationHistoryDetails: {} as CaseCalculationHistory,\r\n isLoading: true,\r\n modified: false,\r\n workflowCalculation: undefined,\r\n workflowOptimization: [],\r\n openMenuItem: null,\r\n totalAlternativeCalculation: 0,\r\n totalAlternativeCalculationSmallParts: 0,\r\n totalPartsAlternativeCalculation: 0,\r\n TVA: '',\r\n calculationSectionList: [],\r\n setOptimizationType: 0\r\n } as ICaseDetailsAlternativeCalculationDetailsState;\r\n\r\n public componentDidMount() {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (caseSettings === null || caseSettings === undefined || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadCalculationDetails();\r\n }\r\n );\r\n }\r\n\r\n loadCalculationDetails = async () => {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (caseSettings === null || caseSettings === undefined || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n const TVA = this.props.caseSettingsState.case!.caseParameters.find(\r\n (item) => item.parameter!.code === ParametreCode.TVA\r\n )!.value;\r\n const currencyRef = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.Currency\r\n );\r\n const [currencyLIst, caseCalculation, calculationSections] = await Promise.all([\r\n this.appReferentialService.Get(currencyRef!.baseUrl),\r\n this.props.calculationHistoryId\r\n ? this.caseService.GetCaseCalculationHistoryDetails(this.props.calculationHistoryId)\r\n : ({} as CaseCalculationHistory),\r\n this.caseService.GetCalculationSections()\r\n ]);\r\n\r\n const form = this.getWorkflowForm(this.props.stepFormId);\r\n\r\n const workflowCalculation = form!.workflowCalculations.find(\r\n (item) =>\r\n item.workflowPartner!.partnerId === this.props.appState.appUser!.hoId &&\r\n (item.userRoleId === this.props.appState.appUser!.roleId || R.isNil(item.userRoleId)) &&\r\n item.caseStatusId === this.props.caseSettingsState.case!.caseStatus.caseStatusId\r\n );\r\n\r\n const workflowOptimization = form!.workflowOptimizations.filter(\r\n (item) =>\r\n item.workflowPartner!.partnerId === this.props.appState.appUser!.hoId &&\r\n (item.userRoleId === this.props.appState.appUser!.roleId || R.isNil(item.userRoleId)) &&\r\n item.caseStatusId === this.props.caseSettingsState.case!.caseStatus.caseStatusId\r\n );\r\n\r\n caseCalculation.currency = currencyLIst.find(\r\n (item) => item.code === caseCalculation.currencyCode\r\n )!;\r\n\r\n this.setState({\r\n caseCalculationHistoryDetails: caseCalculation,\r\n workflowCalculation: workflowCalculation,\r\n workflowOptimization: workflowOptimization,\r\n totalAlternativeCalculation: caseCalculation.amountWithoutTVA,\r\n totalPartsAlternativeCalculation: caseCalculation.amountPiecesWithDiscount,\r\n totalAlternativeCalculationSmallParts: caseCalculation.smallPartsValue,\r\n TVA: TVA,\r\n calculationSectionList: calculationSections,\r\n isLoading: false\r\n });\r\n };\r\n\r\n getWorkflowForm = (id: number): WorkflowSectionStepForm | null => {\r\n const sections = this.props.caseSettingsState.caseSettings!.workflow.workflowSections!;\r\n for (const section of sections) {\r\n for (const step of section.workflowSectionSteps) {\r\n const form = step.workflowSectionStepForms.find((form) => form.id === id);\r\n if (!R.isNil(form)) {\r\n return form;\r\n }\r\n }\r\n }\r\n\r\n return null;\r\n };\r\n\r\n closeDialog = async () => {\r\n this.props.closeDialog();\r\n };\r\n\r\n handleTml = (e: React.ChangeEvent) => {\r\n const workflowCalculation = {\r\n ...this.state.workflowCalculation,\r\n defaultMaxDeliveryTime: Number.parseInt(e.target.value)\r\n } as WorkflowCalculation;\r\n this.setState({ workflowCalculation: workflowCalculation });\r\n };\r\n\r\n displayValueWithCurrency = (value: number | null) => {\r\n let result = '0';\r\n if (!R.isNil(value)) {\r\n result = value.toFixed(2);\r\n }\r\n if (isNaN(Number(result))) {\r\n result = '0';\r\n }\r\n let currency = '';\r\n if (this.state.caseCalculationHistoryDetails.currency) {\r\n currency = this.state.caseCalculationHistoryDetails.currency?.displayName;\r\n }\r\n\r\n return Utils.countryNumberFormat(result, this.props.appState.appUser?.organization?.country ?? null) + ' ' + currency;\r\n };\r\n\r\n renderSection1 = () => {\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n ) => {\r\n this.handleTml(e);\r\n }}\r\n />\r\n }\r\n label={\r\n \r\n {this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_ALTERNATIVE_CALCULATION_DETAILS_TML_LABEL',\r\n 'Timp maxim de livrare'\r\n )}\r\n \r\n }\r\n labelPlacement=\"start\"\r\n />\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n {VehicleHelper.GetBrandModel(\r\n this.props.caseSettingsState.case,\r\n this.props.vehicleState.vehicle\r\n )}\r\n
\r\n\r\n \r\n \r\n \r\n \r\n
\r\n {this.translatorService.Tranlate('CALCULATION_DETAILS_UMC', 'UMC')}\r\n
\r\n
\r\n {this.translatorService.Tranlate('CALCULATION_DETAILS_VIN', 'VIN')}\r\n
\r\n
\r\n {this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_VEHICLE_MANUFACTURE_DATE',\r\n 'Data fabricatie'\r\n )}\r\n
\r\n
\r\n \r\n
\r\n {VehicleHelper.GetUMC(\r\n this.props.caseSettingsState.case,\r\n this.props.vehicleState.vehicle\r\n )}\r\n
\r\n
\r\n {VehicleHelper.GetVIN(\r\n this.props.caseSettingsState.case,\r\n this.props.vehicleState.vehicle\r\n )}\r\n
\r\n
\r\n {VehicleHelper.GetMakeDate(\r\n this.props.caseSettingsState.case,\r\n this.props.vehicleState.vehicle,\r\n this.props.appState.language\r\n )}\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n {this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_VEHICAL_PLATE_NUMBER',\r\n 'Numar inmatriculare'\r\n )}\r\n
\r\n
\r\n {this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_VEHICAL_FIRST_REGISTRATION_DATE',\r\n 'Data primei inmatriculari'\r\n )}\r\n
\r\n
\r\n {this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_VEHICAL_NUMBER_OF_KM',\r\n 'Numar kilometri'\r\n )}\r\n
\r\n
\r\n \r\n
\r\n {VehicleHelper.GetPlateNumber(\r\n this.props.caseSettingsState.case,\r\n this.props.vehicleState.vehicle\r\n )}\r\n
\r\n
\r\n {VehicleHelper.GetFirstRegistrationDate(\r\n this.props.caseSettingsState.case,\r\n this.props.vehicleState.vehicle,\r\n this.props.appState.language\r\n )}\r\n
\r\n
\r\n {VehicleHelper.GetKmNr(\r\n this.props.caseSettingsState.case,\r\n this.props.vehicleState.vehicle\r\n )}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n {this.state.workflowOptimization.length !== 0 ? (\r\n
\r\n {this.state.workflowOptimization.map((item) => {\r\n return (\r\n \r\n this.setState({ setOptimizationType: item.optimizationTypeId })\r\n }\r\n key={item.id}\r\n className=\"m-2\"\r\n variant=\"contained\"\r\n color=\"primary\"\r\n >\r\n {item.optimizationType!.displayName}\r\n \r\n );\r\n })}\r\n
\r\n ) : null}\r\n
\r\n
\r\n
\r\n \r\n\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n {this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_ALTERNATIVE_CALCULATION_DETAILS_ORIGINAL_CALC_TOTAL',\r\n 'Total calculatie originala'\r\n )}\r\n :\r\n
\r\n
\r\n {this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_ALTERNATIVE_CALCULATION_DETAILS_ALT_CALC_TOTAL',\r\n 'Total calculatie alternativa'\r\n )}\r\n :\r\n
\r\n
\r\n {this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_ALTERNATIVE_CALCULATION_DETAILS_CALC_ECONOMY',\r\n 'Economisire calculatie'\r\n )}\r\n :\r\n
\r\n
\r\n
\r\n
\r\n {this.displayValueWithCurrency(\r\n Math.round(\r\n this.state.caseCalculationHistoryDetails.amountWithoutTVA * 100\r\n ) / 100\r\n )}\r\n
\r\n
\r\n {this.displayValueWithCurrency(this.state.totalAlternativeCalculation)}\r\n
\r\n = 0\r\n ? 'success'\r\n : 'danger'\r\n }`}\r\n >\r\n {isNaN(\r\n parseInt(\r\n (\r\n (this.state.totalAlternativeCalculation /\r\n this.state.caseCalculationHistoryDetails.amountWithoutTVA -\r\n 1) *\r\n 100 *\r\n -1\r\n ).toFixed(2)\r\n )\r\n )\r\n ? 0.0\r\n : (\r\n (this.state.totalAlternativeCalculation /\r\n this.state.caseCalculationHistoryDetails.amountWithoutTVA -\r\n 1) *\r\n 100 *\r\n -1\r\n ).toFixed(2)}\r\n %\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n {this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_ALTERNATIVE_CALCULATION_SMALL_PIECES_ORIGINAL',\r\n 'Piese mici originala'\r\n )}\r\n :\r\n
\r\n
\r\n {this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_ALTERNATIVE_CALCULATION_SMALL_PIECES',\r\n 'Piese mici alternativa'\r\n )}\r\n :\r\n
\r\n
\r\n {this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_ALTERNATIVE_CALCULATION_DETAILS_ORIGINAL_CALC_PARTS_TOTAL',\r\n 'Total piese calculatie originala'\r\n )}\r\n :\r\n
\r\n
\r\n {this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_ALTERNATIVE_CALCULATION_DETAILS_ALT_CALC_PARTS_TOTAL',\r\n 'Total piese calculatie alternativa'\r\n )}\r\n :\r\n
\r\n
\r\n {this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_ALTERNATIVE_CALCULATION_DETAILS_CALC_PARTS_ECONOMY',\r\n 'Economisire piese'\r\n )}\r\n :\r\n
\r\n
\r\n
\r\n
\r\n {this.displayValueWithCurrency(\r\n this.state.caseCalculationHistoryDetails.smallPartsValue\r\n )}\r\n
\r\n
\r\n {this.displayValueWithCurrency(\r\n this.state.totalAlternativeCalculationSmallParts\r\n )}\r\n
\r\n
\r\n {this.displayValueWithCurrency(\r\n this.state.caseCalculationHistoryDetails.amountPiecesWithDiscount\r\n )}\r\n
\r\n
\r\n {this.displayValueWithCurrency(\r\n this.state.totalPartsAlternativeCalculation\r\n )}\r\n
\r\n = 0\r\n ? 'success'\r\n : 'danger'\r\n }`}\r\n >\r\n {isNaN(\r\n parseInt(\r\n (\r\n (this.state.totalPartsAlternativeCalculation /\r\n this.state.caseCalculationHistoryDetails\r\n .amountPiecesWithDiscount -\r\n 1) *\r\n 100 *\r\n -1\r\n ).toFixed(2)\r\n )\r\n )\r\n ? 0.0\r\n : (\r\n (this.state.totalPartsAlternativeCalculation /\r\n this.state.caseCalculationHistoryDetails\r\n .amountPiecesWithDiscount -\r\n 1) *\r\n 100 *\r\n -1\r\n ).toFixed(2)}\r\n %\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n ) : null}\r\n
\r\n );\r\n };\r\n\r\n getPackageFromCalculationParts = (calculationParts: CaseCalculationPart[]) => {\r\n const newcalculationParts = [];\r\n for (let i = 0; i < calculationParts.length; i++) {\r\n if (calculationParts[i].package && calculationParts[i].package.length) {\r\n for (let j = 0; j < calculationParts[i].package.length; j++) {\r\n newcalculationParts.push({\r\n ...calculationParts[i].package[j],\r\n availableQuantity: calculationParts[i].availableQuantity,\r\n }); \r\n }\r\n }\r\n }\r\n return newcalculationParts;\r\n };\r\n\r\n updateAmount = (calculationParts: CaseCalculationPart[]) => {\r\n const originalCalculationPartsList = new CalculationParts(\r\n this.state.calculationSectionList,\r\n calculationParts,\r\n parseInt(this.state.TVA),\r\n this.state.caseCalculationHistoryDetails.smallPartsPercent,\r\n true\r\n );\r\n\r\n const alternativeCalculationPartsList = new CalculationParts(\r\n this.state.calculationSectionList,\r\n calculationParts.concat(this.getPackageFromCalculationParts(calculationParts)),\r\n parseInt(this.state.TVA),\r\n this.state.caseCalculationHistoryDetails.smallPartsPercent,\r\n false\r\n );\r\n\r\n this.setState({\r\n caseCalculationHistoryDetails: {\r\n ...this.state.caseCalculationHistoryDetails,\r\n amountPieces: originalCalculationPartsList.GetAmountPieceTotal(),\r\n amountLabor: originalCalculationPartsList.GetAmountPart(CalculationSectionCodeEnum.LABOR),\r\n amountPaintingMaterials: originalCalculationPartsList.GetAmountPart(\r\n CalculationSectionCodeEnum.PAINT\r\n ),\r\n amountPaintingLabor: originalCalculationPartsList.GetAmountPart(\r\n CalculationSectionCodeEnum.PAINT_LABOR\r\n ),\r\n amountPiecesWithDiscount: originalCalculationPartsList.GetAmountPartWithDiscount(\r\n CalculationSectionCodeEnum.PART\r\n ),\r\n amountLaborWithDiscount: originalCalculationPartsList.GetAmountPartWithDiscount(\r\n CalculationSectionCodeEnum.LABOR\r\n ),\r\n amountPaintingMaterialsWithDiscount: originalCalculationPartsList.GetAmountPartWithDiscount(\r\n CalculationSectionCodeEnum.PAINT\r\n ),\r\n amountPaintingLaborWithDiscount: originalCalculationPartsList.GetAmountPartWithDiscount(\r\n CalculationSectionCodeEnum.PAINT_LABOR\r\n ),\r\n amountDiscount: originalCalculationPartsList.TotalDiscount(),\r\n amountWithoutTVA: originalCalculationPartsList.TotalWithoutVAT(),\r\n amountTVA: originalCalculationPartsList.TotalVAT(),\r\n amount: originalCalculationPartsList.Total()\r\n },\r\n totalAlternativeCalculation: alternativeCalculationPartsList.TotalWithoutVAT(),\r\n totalPartsAlternativeCalculation: alternativeCalculationPartsList.GetAmountPartWithDiscount(\r\n CalculationSectionCodeEnum.PART\r\n ),\r\n totalAlternativeCalculationSmallParts: alternativeCalculationPartsList.GetSmallPartsValue()\r\n });\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n this.appuserService = (this.context as AppContext).appUserService;\r\n\r\n return (\r\n \r\n {this.renderSection1()}\r\n \r\n \r\n this.updateAmount(calculationParts)\r\n }\r\n defaultMaxDeliveryTime={\r\n R.isNil(this.state.workflowCalculation) ||\r\n R.isNil(this.state.workflowCalculation.defaultMaxDeliveryTime)\r\n ? 0\r\n : this.state.workflowCalculation.defaultMaxDeliveryTime\r\n }\r\n optmizationType={this.state.setOptimizationType}\r\n resetOptimizatonType={() => this.setState({ setOptimizationType: 0 })}\r\n onSave={this.closeDialog}\r\n orderList={this.props.orderList}\r\n manipulationTariff={this.props.manipulationTariff}\r\n insurerList={this.props.insurerList}\r\n serviceId={this.props.serviceId}\r\n additionTariff={this.props.additionTariff}\r\n discountTariff={this.props.discountTariff}\r\n packageCalculationId={this.props.packageCalculationId}\r\n nonStockSuppliers={this.props.nonStockSuppliers}\r\n />\r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState, ownProps: ExternalCaseDetailsAlternativeCalculationDetailsProps) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app\r\n }),\r\n null\r\n)(withSnackbar(CaseDetailsAlternativeCalculationDetails as any));\r\n","export default __webpack_public_path__ + \"static/media/car-image-not-available.5188514e.jpg\";","import React, { useContext } from 'react';\r\nimport {\r\n Card,\r\n CardActionArea,\r\n CardMedia,\r\n CardContent,\r\n Typography,\r\n CardActions,\r\n Button\r\n} from '@material-ui/core';\r\nimport { ApplicationContext } from '../../context/Contexts';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport ImageNotAvailable from '../../assets/images/car-image-not-available.jpg';\r\n\r\ninterface Props {\r\n option: IReferential;\r\n fieldName: string;\r\n onChange: (fieldName: string) => (event: any, option: IReferential) => void;\r\n}\r\n\r\nconst CarCard: React.FC = ({ option, fieldName, onChange }) => {\r\n const context = useContext(ApplicationContext);\r\n const translatorService = context.translatorService;\r\n\r\n const checkIfImageExists = (url: string) => {\r\n if (url.includes('undefined') || url.includes('null')) {\r\n return ImageNotAvailable;\r\n }\r\n\r\n return url;\r\n };\r\n\r\n return (\r\n <>\r\n {option.extraData && (\r\n \r\n \r\n {option.extraData && (\r\n \r\n {option.extraData?.manufacturer} {option.extraData?.model}\r\n \r\n )}\r\n\r\n {option.extraData?.minPrice &&\r\n option.extraData?.maxPrice &&\r\n option.extraData?.currency && (\r\n \r\n {option.extraData?.minPrice} {option.extraData?.currency === 'EUR' ? '€' : ''} -{' '}\r\n {''}\r\n {option.extraData?.maxPrice} {option.extraData?.currency === 'EUR' ? '€' : ''}\r\n {''} {translatorService.Tranlate('GROSS_VALUE', 'brut')}\r\n \r\n )}\r\n \r\n {option.extraData?.generation && option.extraData?.modelYear && (\r\n \r\n {translatorService.Tranlate('GENERATION', 'Generatia')}{' '}\r\n {option.extraData?.generation} -{''}\r\n {option.extraData?.modelYear}\r\n \r\n )}\r\n {option.extraData?.body && option.extraData?.doorsNo && (\r\n \r\n {option.extraData?.body} - {option.extraData?.doorsNo}{' '}\r\n {translatorService.Tranlate('DOORS', 'usi')}\r\n \r\n )}\r\n \r\n \r\n {\r\n onChange(fieldName)(null, option);\r\n }}\r\n >\r\n {translatorService.Tranlate('SELECT_CAR_BUTTON', 'Selecteaza')}\r\n \r\n \r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nexport default CarCard;\r\n","import React, { memo, useEffect, useState } from 'react';\r\nimport { ApplicationContext } from '../../../context/Contexts';\r\nimport { ExternalCaseDetailsValuationWizardComponentProps } from './ExternalCaseDetailsValuationWizardComponentProps';\r\nimport Stepper from '@material-ui/core/Stepper';\r\nimport Step from '@material-ui/core/Step';\r\nimport StepButton from '@material-ui/core/StepButton';\r\nimport { Box } from '@material-ui/core';\r\nimport { makeStyles } from '@material-ui/core/styles';\r\nimport Typography from '@material-ui/core/Typography';\r\nimport { Autocomplete } from '@material-ui/lab';\r\nimport { IReferential } from '../../../interfaces/IReferential';\r\nimport { useContext } from 'react';\r\nimport { StepLabel, TextField } from '@material-ui/core';\r\nimport CarCard from '../../evaluation/CarCard';\r\nimport { first, random } from 'lodash';\r\nimport Loader from '../../Loader';\r\nimport { MuiPickersUtilsProvider, DatePicker } from '@material-ui/pickers';\r\nimport moment from 'moment';\r\nimport MomentUtils from '@date-io/moment';\r\nimport { useAppSelector } from '../../../store/configureStore';\r\nimport { MaterialUiPickersDate } from '@material-ui/pickers/typings/date';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n width: '100%'\r\n },\r\n instructions: {\r\n marginTop: theme.spacing(5),\r\n marginBottom: theme.spacing(7)\r\n }\r\n}));\r\n\r\nclass LocalizedUtils extends MomentUtils {\r\n // dateFormat = \"DD MM YYYY\";\r\n}\r\nconst renderAutocomplete = (\r\n options: any,\r\n value: any,\r\n label: string,\r\n fieldName: string,\r\n step: number,\r\n onChange: (fieldName: string) => (e: any, newValue?: IReferential | null | undefined) => void,\r\n showNoDataMessage?: boolean,\r\n translatorService?: any,\r\n language?: string,\r\n firstRegistrationDate?: Date | null,\r\n onDateChange?: (date: Date | null) => void,\r\n isFromValuationModule?: boolean\r\n) => {\r\n const handleDateChange = (date: MaterialUiPickersDate | null) => {\r\n if (date === null || !date.isValid) {\r\n return;\r\n }\r\n\r\n if (onDateChange) {\r\n const selectedDate = date ? new Date(date.format('YYYY-MM-DD')) : null;\r\n\r\n onDateChange(selectedDate);\r\n }\r\n };\r\n\r\n return (\r\n <>\r\n <>\r\n \r\n {step === 0 && (\r\n \r\n \r\n \r\n )}\r\n\r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n {options.length !== 0 ? (\r\n (step === 1 || step === 2 || step === 3) && (\r\n \r\n {true &&\r\n options.map((option: IReferential) => (\r\n \r\n ))}\r\n \r\n )\r\n ) : showNoDataMessage ? (\r\n \r\n \r\n {translatorService.Tranlate(\r\n 'CAR_MANUAL_IDENTIFICATION_NO_DATA_AVAILABLE',\r\n 'Nu există date disponibile! Vă rugăm să verificați dacă pașii anteriori au fost completați cu succes!'\r\n )}\r\n \r\n \r\n ) : (\r\n step <= 3 && (\r\n
\r\n \r\n
\r\n )\r\n )}\r\n \r\n \r\n );\r\n};\r\n\r\nconst ValuationFiltersWizardComponent = memo(\r\n ({\r\n steps,\r\n activeStep,\r\n handleStep,\r\n onChange,\r\n state,\r\n makeList,\r\n models,\r\n bodyTypesList,\r\n generationTypesList,\r\n fuelTypes,\r\n powerTypes,\r\n transmissionTypes,\r\n tractionTypes,\r\n firstRegistrationDate,\r\n onChangeFirstRegistrationDate,\r\n isFromValuationModule\r\n }) => {\r\n const classes = useStyles();\r\n const context = useContext(ApplicationContext);\r\n const translatorService = context.translatorService;\r\n const [showNoDataMessage, setShowNoDataMessage] = useState(false);\r\n const language = useAppSelector((state) => state.app?.language);\r\n const [firstRegistrationDateLocal, setFirstRegistrationDate] = useState(\r\n firstRegistrationDate\r\n );\r\n\r\n useEffect(() => {\r\n setShowNoDataMessage(false);\r\n const timer = setTimeout(() => {\r\n setShowNoDataMessage(true);\r\n }, 3000);\r\n\r\n return () => clearTimeout(timer);\r\n }, [activeStep]);\r\n\r\n const onDateChange = (date: Date | null) => {\r\n setFirstRegistrationDate(date);\r\n };\r\n\r\n useEffect(() => {\r\n if (firstRegistrationDateLocal && onChangeFirstRegistrationDate) {\r\n onChangeFirstRegistrationDate(firstRegistrationDateLocal);\r\n }\r\n }, [firstRegistrationDateLocal]);\r\n\r\n const getStepContent = (step: number) => {\r\n switch (step) {\r\n case 0:\r\n return renderAutocomplete(\r\n makeList,\r\n state.brand,\r\n translatorService.Tranlate('CAR_DETAILS_BRAND', 'Marca'),\r\n 'brand',\r\n step,\r\n onChange([\r\n 'model',\r\n 'body',\r\n 'generation',\r\n 'fuelType',\r\n 'powerType',\r\n 'transmissionType',\r\n 'tractionType'\r\n ]),\r\n showNoDataMessage,\r\n translatorService,\r\n language,\r\n firstRegistrationDateLocal,\r\n onDateChange,\r\n isFromValuationModule\r\n );\r\n case 1:\r\n return renderAutocomplete(\r\n models,\r\n state.model,\r\n translatorService.Tranlate('CAR_DETAILS_MODEL', 'Model'),\r\n 'model',\r\n step,\r\n onChange([\r\n 'body',\r\n 'generation',\r\n 'fuelType',\r\n 'powerType',\r\n 'transmissionType',\r\n 'tractionType'\r\n ]),\r\n showNoDataMessage,\r\n translatorService\r\n );\r\n case 2:\r\n return renderAutocomplete(\r\n bodyTypesList,\r\n state.body,\r\n translatorService.Tranlate('CAR_DETAILS_BODY_TYPE', 'Caroserie'),\r\n 'body',\r\n step,\r\n onChange(['generation', 'fuelType', 'powerType', 'transmissionType', 'tractionType']),\r\n showNoDataMessage,\r\n translatorService\r\n );\r\n\r\n case 3:\r\n return renderAutocomplete(\r\n generationTypesList,\r\n state.generation,\r\n translatorService.Tranlate('WIZARD_GENERATION', 'Generatie'),\r\n 'generation',\r\n step,\r\n onChange(['fuelType', 'powerType', 'transmissionType', 'tractionType']),\r\n showNoDataMessage,\r\n translatorService\r\n );\r\n\r\n case 4:\r\n return renderAutocomplete(\r\n fuelTypes,\r\n state.fuelType,\r\n translatorService.Tranlate('WIZARD_FUEL', 'Combustibil'),\r\n 'fuelType',\r\n step,\r\n onChange(['powerType', 'transmissionType', 'tractionType'])\r\n );\r\n case 5:\r\n return renderAutocomplete(\r\n powerTypes,\r\n state.powerType,\r\n translatorService.Tranlate('WIZARD_POWER', 'Putere'),\r\n 'powerType',\r\n step,\r\n onChange(['transmissionType', 'tractionType'])\r\n );\r\n case 6:\r\n return renderAutocomplete(\r\n transmissionTypes,\r\n state.transmissionType,\r\n translatorService.Tranlate('WIZARD_FUEL_TRANSMISSION_TYPE', 'Transmisie'),\r\n 'transmissionType',\r\n step,\r\n onChange(['tractionType'])\r\n );\r\n case 7:\r\n return renderAutocomplete(\r\n tractionTypes,\r\n state.tractionType,\r\n translatorService.Tranlate('WIZARD_TRACTION_TYPE', 'Tractiune'),\r\n 'tractionType',\r\n step,\r\n onChange()\r\n );\r\n default:\r\n return 'Unknown step';\r\n }\r\n };\r\n\r\n //useEffect(() => {\r\n\r\n // if (!R.isNil(state.brand)) {\r\n // console.log('state.brand' + state.brand.displayName);\r\n // stepsLabel[0] = state.brand.displayName as string;\r\n // }\r\n //}, [state.brand])\r\n\r\n //useEffect(() => {\r\n // if (!R.isNil(state.model)) {\r\n // stepsLabel[1] = state.model.displayName as string;\r\n // }\r\n //}, [state.model])\r\n\r\n const getTextContent = (step: number) => {\r\n switch (step) {\r\n case 0:\r\n return state.brand?.displayName;\r\n case 1:\r\n return state.model?.displayName;\r\n case 2:\r\n return state.body?.displayName;\r\n case 3:\r\n return `${state.generation?.extraData?.generation} (${state.generation?.extraData?.modelYear})`;\r\n case 4:\r\n return state.fuelType?.displayName;\r\n case 5:\r\n return state.powerType?.displayName;\r\n case 6:\r\n return state.transmissionType?.displayName;\r\n case 7:\r\n return state.tractionType?.displayName;\r\n default:\r\n return null;\r\n }\r\n };\r\n\r\n return (\r\n
\r\n \r\n {steps.map((label, index) => {\r\n const labelProps: { optional?: React.ReactNode } = {};\r\n if (index < activeStep) {\r\n labelProps.optional = (\r\n {getTextContent(index)}\r\n );\r\n }\r\n return (\r\n \r\n handleStep(index)} {...labelProps}>\r\n {label}\r\n \r\n \r\n );\r\n })}\r\n \r\n
\r\n {activeStep === steps.length ? (\r\n
\r\n {/* All steps completed\r\n */}\r\n
\r\n ) : (\r\n
\r\n \r\n {getStepContent(activeStep)}\r\n \r\n
\r\n )}\r\n
\r\n
\r\n );\r\n }\r\n);\r\n\r\nexport default ValuationFiltersWizardComponent;\r\n","import React, { useState, useEffect, useRef, useCallback } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, CaseSettingsActionCreators } from '../../../store';\r\nimport { withSnackbar } from 'notistack';\r\nimport { ApplicationContext } from '../../../context/Contexts';\r\nimport { ExternalCaseDetailsValuationWizardContainerProps } from './ExternalCaseDetailsValuationWizardContainerProps';\r\nimport { IReferential } from '../../../interfaces/IReferential';\r\nimport { useContext } from 'react';\r\nimport * as R from 'ramda';\r\nimport { ICaseService } from '../../../services/Interfaces/ICaseService';\r\nimport { VehicleInfo } from './VehicleInfo';\r\nimport { RefConstants } from '../../../helpers/Constants';\r\nimport ValuationFiltersWizardComponent from './ValuationFiltersWizardComponent';\r\nimport { ValuationVehicle } from '../../../interfaces/Case';\r\nimport { isNullOrUndefined } from 'util';\r\nimport { on } from 'process';\r\n\r\nconst initialVehicleInfo: VehicleInfo = {\r\n brand: null,\r\n model: null,\r\n body: null,\r\n generation: null,\r\n fuelType: null,\r\n powerType: null,\r\n transmissionType: null,\r\n tractionType: null\r\n};\r\n\r\nconst ValuationFiltersWizardContainer: React.FC =\r\n ({\r\n brandTypes,\r\n modelTypes,\r\n bodyTypes,\r\n fuelTypes,\r\n tractionTypes,\r\n transmissionTypes,\r\n firstRegistrationDate,\r\n onWizardCallback,\r\n onFilterChanged,\r\n onShowCarList,\r\n onChangeFirstRegistrationDate,\r\n isFromValuationModule\r\n }) => {\r\n const [activeStep, setActiveStep] = useState(0);\r\n const context = useContext(ApplicationContext);\r\n const translatorService = context.translatorService;\r\n const referentialService = context.referentialService;\r\n const caseService = context.caseService;\r\n const [state, setVehicleInfo] = useState(initialVehicleInfo);\r\n const [filteredBodyTypes, setFilteredBodyTypes] = useState([]);\r\n const [generationTypes, setGenerationTypes] = useState([]);\r\n const [filteredModels, setFilteredModels] = useState([]);\r\n const [filteredFuelTypes, setFilteredFuelTypes] = useState([]);\r\n const [filteredPowerTypes, setFilteredPowerTypes] = useState([]);\r\n const [filteredVehicles, setFilteredVehicles] = useState([]);\r\n const [filteredTractionTypes, setFilteredTractionTypes] = useState([]);\r\n const [filteredTransmissionTypes, setFilteredTransmissionTypes] = useState([]);\r\n const [localMakeList, setLocalMakeList] = useState([]);\r\n const [localBodyTypes, setLocalBodyTypes] = useState([]);\r\n const [localModels, setLocalModels] = useState([]);\r\n const [localfuelTypes, setLocalfuelTypes] = useState([]);\r\n const [localTractionTypes, setLocalTractionTypes] = useState(\r\n []\r\n );\r\n const [localTransmissionTypes, setLocalTransmissionTypes] = useState<\r\n IReferential[] | null | undefined\r\n >([]);\r\n const isFirstRender = useRef(true);\r\n const {\r\n vehicleMakeRef,\r\n bodyTypeRef,\r\n modelRef,\r\n fuelTypeRef,\r\n tractionTypeRef,\r\n transmissionTypeRef\r\n } = RefConstants;\r\n\r\n const loadMakeList = async () => await referentialService.Get(vehicleMakeRef?.baseUrl);\r\n const loadBodytypeList = async () => await referentialService.Get(bodyTypeRef?.baseUrl);\r\n const loadModelList = async () => await referentialService.Get(modelRef?.baseUrl);\r\n const loadFuelTypesList = async () => await referentialService.Get(fuelTypeRef?.baseUrl);\r\n const localTractionTypesList = async () =>\r\n await referentialService.Get(tractionTypeRef?.baseUrl);\r\n const localTransmissionTypesList = async () =>\r\n await referentialService.Get(transmissionTypeRef?.baseUrl);\r\n\r\n useEffect(() => {\r\n if (onShowCarList) {\r\n if (activeStep >= 4) {\r\n onShowCarList(true);\r\n } else {\r\n onShowCarList(false);\r\n }\r\n }\r\n }, [activeStep, onShowCarList]);\r\n\r\n useEffect(() => {\r\n const loadData = async () => {\r\n const [a, b, c, d, e, f] = await Promise.all([\r\n R.isNil(brandTypes) ? await loadMakeList() : brandTypes,\r\n R.isNil(bodyTypes) ? await loadBodytypeList() : bodyTypes,\r\n R.isNil(modelTypes) ? await loadModelList() : modelTypes,\r\n R.isNil(fuelTypes) ? await loadFuelTypesList() : fuelTypes,\r\n R.isNil(tractionTypes) ? await localTractionTypesList() : tractionTypes,\r\n R.isNil(transmissionTypes) ? await localTransmissionTypesList() : transmissionTypes\r\n ]);\r\n\r\n setLocalMakeList(a);\r\n setLocalBodyTypes(b);\r\n setLocalModels(c);\r\n setLocalfuelTypes(d);\r\n setLocalTractionTypes(e);\r\n setLocalTransmissionTypes(f);\r\n };\r\n\r\n loadData();\r\n }, []);\r\n\r\n const getSteps = () => [\r\n translatorService.Tranlate('WIZARD_BRAND', 'Producator'),\r\n translatorService.Tranlate('WIZARD_MODEL', 'Model'),\r\n translatorService.Tranlate('WIZARD_BODY_TYPE', 'Caroserie'),\r\n translatorService.Tranlate('GENERATION_TYPE', 'Generatie'),\r\n translatorService.Tranlate('WIZARD_FUEL', 'Combustibil'),\r\n translatorService.Tranlate('WIZARD_POWER', 'Putere'),\r\n translatorService.Tranlate('WIZARD_FUEL_TRANSMISSION', 'Transmisie'),\r\n translatorService.Tranlate('WIZARD_TRACTION_TYPE', 'Tractiune')\r\n ];\r\n\r\n const filterVehicles = (): ValuationVehicle[] => {\r\n let vehiclesResult: ValuationVehicle[] = filteredVehicles;\r\n\r\n if (!isNullOrUndefined(state.fuelType)) {\r\n const enFuelTranslation = state.fuelType.translations?.find((t) => t.language === 'en');\r\n if (enFuelTranslation) {\r\n vehiclesResult = vehiclesResult.filter((v) => v.fuelType === enFuelTranslation.name);\r\n }\r\n }\r\n\r\n if (!isNullOrUndefined(state.powerType)) {\r\n vehiclesResult = vehiclesResult.filter((v) => v.kw.toString() === state.powerType?.code);\r\n }\r\n\r\n if (!isNullOrUndefined(state.transmissionType)) {\r\n vehiclesResult = vehiclesResult.filter(\r\n (v) => v.transmission === state.transmissionType?.code\r\n );\r\n }\r\n\r\n if (!isNullOrUndefined(state.tractionType)) {\r\n vehiclesResult = vehiclesResult.filter((v) => v.drivenWheels === state.tractionType?.code);\r\n }\r\n\r\n onFilterChanged(vehiclesResult);\r\n\r\n return vehiclesResult;\r\n };\r\n\r\n const steps = getSteps();\r\n\r\n const onChange =\r\n (toNullProperties?: string[]) =>\r\n (fieldName: string) =>\r\n (e: any, newValue?: IReferential | null) => {\r\n let newState = {} as VehicleInfo;\r\n newState = { ...state, [fieldName]: newValue };\r\n\r\n toNullProperties?.forEach((element) => {\r\n newState = { ...newState, [element]: null };\r\n });\r\n\r\n if (isNullOrUndefined(newValue)) {\r\n // stay on current step if the value is cleared\r\n setActiveStep((prevActiveStep) => prevActiveStep - 1);\r\n }\r\n\r\n // if the selected value is the same as the previous one, force the state update to trigger the useEffect\r\n if (state[fieldName]?.code === newValue?.code) {\r\n setVehicleInfo({ ...state, [fieldName]: null });\r\n setActiveStep((prevActiveStep) => prevActiveStep - 1);\r\n setTimeout(() => {\r\n setVehicleInfo(newState);\r\n }, 0);\r\n } else {\r\n setVehicleInfo(newState);\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n if (isFirstRender.current) {\r\n isFirstRender.current = false; // toggle flag after first render/mounting\r\n return;\r\n }\r\n\r\n setActiveStep((prevActiveStep) => prevActiveStep + 1);\r\n }, [state]);\r\n\r\n const checkIfIsValidDate = (date: Date | null) => {\r\n const registrationTimestamp = date!.getTime();\r\n\r\n if (isNaN(registrationTimestamp)) {\r\n return null;\r\n }\r\n\r\n return date;\r\n };\r\n\r\n useEffect(() => {\r\n if (!R.isNil(state.brand)) {\r\n const fetchValuationModels = async (\r\n caseService: ICaseService,\r\n state: VehicleInfo,\r\n firstRegistrationDate: Date | null\r\n ) => {\r\n setFilteredModels([]);\r\n\r\n const valuationModels = await caseService.GetValuationModels(\r\n state.brand?.code,\r\n checkIfIsValidDate(firstRegistrationDate)\r\n );\r\n\r\n const newModels = R.innerJoin(\r\n (stateModel, valuationModel) =>\r\n stateModel.code === valuationModel.model &&\r\n stateModel.dependencyId === state.brand?.id,\r\n localModels!,\r\n valuationModels\r\n );\r\n\r\n newModels.forEach((model) => {\r\n const valuationModel = valuationModels.find(\r\n (valModel) => valModel.model === model.code\r\n );\r\n if (valuationModel) {\r\n model.extraData = valuationModel;\r\n }\r\n });\r\n\r\n newModels.sort((a, b) => (a.displayName > b.displayName ? 1 : -1));\r\n\r\n setFilteredModels(newModels);\r\n if (newModels.length === 1) {\r\n setVehicleInfo({ ...state, model: newModels[0] });\r\n }\r\n };\r\n fetchValuationModels(caseService, state, firstRegistrationDate);\r\n }\r\n }, [state.brand]);\r\n\r\n useEffect(() => {\r\n if (!R.isNil(state.model) && !R.isNil(state.brand)) {\r\n const fetchValuationBodies = async (\r\n caseService: ICaseService,\r\n state: VehicleInfo,\r\n firstRegistrationDate: Date | null\r\n ) => {\r\n setFilteredBodyTypes([]);\r\n const valuationBodies = await caseService.GetValuationBodies(\r\n state.brand?.code,\r\n state.model?.code,\r\n checkIfIsValidDate(firstRegistrationDate)\r\n );\r\n\r\n const newBodyTypes = R.innerJoin(\r\n (stateBody, valuationBody) => {\r\n const enBodyTranslation = stateBody.translations?.find((t) => t.language === 'en');\r\n if (!enBodyTranslation) return false;\r\n\r\n return enBodyTranslation.name === valuationBody.body;\r\n },\r\n localBodyTypes!,\r\n valuationBodies\r\n );\r\n\r\n newBodyTypes.forEach((bodyType) => {\r\n const enBodyTranslation = bodyType.translations?.find((t) => t.language === 'en');\r\n const valuationBody = valuationBodies.find(\r\n (valBody) => valBody.body === enBodyTranslation?.name\r\n );\r\n if (valuationBody) {\r\n bodyType.extraData = valuationBody;\r\n }\r\n });\r\n\r\n setFilteredBodyTypes(newBodyTypes);\r\n\r\n if (newBodyTypes.length === 1) {\r\n setVehicleInfo({ ...state, body: newBodyTypes[0] });\r\n }\r\n };\r\n fetchValuationBodies(caseService, state, firstRegistrationDate);\r\n }\r\n }, [state.model]);\r\n\r\n useEffect(() => {\r\n if (!R.isNil(state.model) && !R.isNil(state.brand)) {\r\n const fetchValuationGeneration = async (\r\n caseService: ICaseService,\r\n state: VehicleInfo,\r\n firstRegistrationDate: Date | null\r\n ) => {\r\n setGenerationTypes([]);\r\n const enBodyTranslation = state.body?.translations?.find((t) => t.language === 'en');\r\n\r\n if (!enBodyTranslation?.name || !state.body?.extraData?.doorsNo) return;\r\n\r\n const generationValuation = await caseService.GetValuationGenerations(\r\n state.brand?.code,\r\n state.model?.code,\r\n enBodyTranslation?.name,\r\n state.body?.extraData?.doorsNo,\r\n checkIfIsValidDate(firstRegistrationDate)\r\n );\r\n\r\n const newGenerationType = R.innerJoin(\r\n (stateBody, generationBody) => {\r\n const enTranslation = stateBody.translations?.find((t) => t.language === 'en');\r\n if (!enTranslation) return false;\r\n return enTranslation.name === generationBody.body;\r\n },\r\n localBodyTypes!,\r\n generationValuation\r\n );\r\n\r\n newGenerationType.forEach((generationType) => {\r\n const enTranslation = generationType.translations?.find((t) => t.language === 'en');\r\n const valuationBody = generationValuation.find(\r\n (valGen) => valGen.body === enTranslation?.name\r\n );\r\n if (valuationBody) {\r\n generationType.extraData = valuationBody;\r\n }\r\n });\r\n\r\n const updatedGenerationType = generationValuation.map((generation, index) => {\r\n const data = { ...newGenerationType[0] };\r\n\r\n data.extraData = { ...generation };\r\n data.displayName = `${generation.generation} (${generation.modelYear})`;\r\n\r\n return data;\r\n });\r\n\r\n setGenerationTypes(updatedGenerationType);\r\n\r\n if (updatedGenerationType.length === 1) {\r\n setVehicleInfo({ ...state, generation: updatedGenerationType[0] });\r\n }\r\n };\r\n fetchValuationGeneration(caseService, state, firstRegistrationDate);\r\n }\r\n }, [state.body]);\r\n\r\n useEffect(() => {\r\n if (\r\n !R.isNil(state.generation) &&\r\n !R.isNil(state.model) &&\r\n !R.isNil(state.brand) &&\r\n !R.isNil(state.body)\r\n ) {\r\n const onWizardCallbackWrapper = async () => {\r\n const enBodyTranslation = state.body?.translations?.find((t) => t.language === 'en');\r\n const resultVehicles = await onWizardCallback(\r\n state?.brand?.code || '',\r\n state?.model?.code || '',\r\n enBodyTranslation?.name || '',\r\n checkIfIsValidDate(firstRegistrationDate),\r\n state?.generation?.extraData?.generation\r\n );\r\n const newFuelTypes = R.innerJoin(\r\n (stateFuelType, vehicle) => {\r\n const enFuelTranslation = stateFuelType.translations?.find(\r\n (t) => t.language === 'en'\r\n );\r\n if (!enFuelTranslation) return false;\r\n\r\n return enFuelTranslation.name === vehicle.fuelType;\r\n },\r\n localfuelTypes!,\r\n resultVehicles\r\n );\r\n\r\n newFuelTypes.sort((a, b) => (a.displayName > b.displayName ? 1 : -1));\r\n\r\n setFilteredFuelTypes(newFuelTypes);\r\n setFilteredVehicles(resultVehicles);\r\n };\r\n onWizardCallbackWrapper();\r\n }\r\n }, [state.generation]);\r\n\r\n useEffect(() => {\r\n if (!R.isNil(state.fuelType)) {\r\n const data = filterVehicles();\r\n\r\n const newPowerTypes = data\r\n .map((x) => x.kw)\r\n .filter((x, i, a) => a.indexOf(x) === i)\r\n .map((x) => {\r\n return {\r\n id: x,\r\n code: x.toString(),\r\n isActive: true,\r\n displayName: x.toString()\r\n } as IReferential;\r\n })\r\n .sort((a, b) => parseInt(a.displayName) - parseInt(b.displayName));\r\n\r\n const newTransmissionTypes = data\r\n .map((x) => x.transmission)\r\n .filter((x, i, a) => a.indexOf(x) === i)\r\n .map((x) => {\r\n return { id: 0, code: x, isActive: true, displayName: x } as IReferential;\r\n })\r\n .sort((a, b) => a.displayName.localeCompare(b.displayName));\r\n\r\n const newTractionTypes = data\r\n .map((x) => x.drivenWheels)\r\n .filter((x, i, a) => a.indexOf(x) === i)\r\n .map((x) => {\r\n return { id: 0, code: x, isActive: true, displayName: x } as IReferential;\r\n })\r\n .sort((a, b) => a.displayName.localeCompare(b.displayName));\r\n\r\n setFilteredPowerTypes(newPowerTypes);\r\n setFilteredTransmissionTypes(newTransmissionTypes);\r\n setFilteredTractionTypes(newTractionTypes);\r\n }\r\n }, [state.fuelType, state.powerType, state.transmissionType, state.tractionType]);\r\n\r\n const handleStep = useCallback(\r\n (step: number) => {\r\n setActiveStep(step);\r\n },\r\n [setActiveStep]\r\n );\r\n\r\n return (\r\n \r\n );\r\n };\r\n\r\nexport default connect(\r\n (state: ApplicationState, ownProps: ExternalCaseDetailsValuationWizardContainerProps) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app,\r\n vehicleState: state.vehicle,\r\n ...ownProps\r\n }),\r\n CaseSettingsActionCreators\r\n)(withSnackbar(ValuationFiltersWizardContainer as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n ApplicationState,\r\n CaseSettingsState,\r\n AppState,\r\n CaseSettingsActionCreators,\r\n VehicleState\r\n} from '../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport {\r\n Button,\r\n Grid,\r\n Card,\r\n CardContent,\r\n FormControlLabel,\r\n Switch,\r\n Dialog,\r\n DialogTitle,\r\n DialogContent\r\n} from '@material-ui/core';\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { WorkflowCalculation } from '../../interfaces/Workflow';\r\nimport {\r\n ValuationExtraOption,\r\n ValuationRequest,\r\n ValuationVehicle,\r\n ValuationVehicleOptions,\r\n ValuationVehicles\r\n} from '../../interfaces/Case';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport MUIDataTable, { MUIDataTableColumnOptions, SelectableRows } from 'mui-datatables';\r\nimport { MUITranslations } from '../../helpers/MUITableTranslations';\r\nimport { Label } from 'reactstrap';\r\nimport { ValidatorForm, TextValidator } from 'react-material-ui-form-validator';\r\nimport NumberFormat from 'react-number-format';\r\nimport { VehicleHelper } from '../../helpers/VehicleHelper';\r\nimport * as R from 'ramda';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport ValuationFiltersWizardContainer from './ValuationFiltersWizard/ValuationFiltersWizardContainer';\r\nimport { isNullOrUndefined } from 'util';\r\nimport { Utils } from '../../helpers/Utils';\r\nimport { ParametreCode } from '../../helpers/Constants';\r\nimport { CaseTypeCode } from '../../helpers/Constants';\r\nimport Loader from '../Loader';\r\nimport { VehicleOption } from '../../interfaces/Vehicle';\r\n\r\ntype ParsedConditions = {\r\n mandatory: number[];\r\n atLeastOne: number[];\r\n};\r\n\r\ninterface ICaseDetailsValuationState {\r\n vehicles: ValuationVehicle[];\r\n isLoading: boolean;\r\n viewOptions: boolean;\r\n selectedVehicle: ValuationVehicle | null;\r\n options: ValuationVehicleOptions | null;\r\n optionCodes: string[];\r\n optionsValue: number;\r\n selectedOptionIndexes: number[];\r\n excludedOptionsIndexes: number[];\r\n includedOptionsIndexes: number[];\r\n requiredOptionsIndexes: number[];\r\n showOtionalRequiredOptions: boolean;\r\n optinalRequiredOptionsIndexes: number[];\r\n isloadingIncludeExcludeOptions: boolean;\r\n tireWear: number;\r\n bodyDamage: number;\r\n hasGpl: boolean;\r\n valuationLoading: boolean;\r\n showWizard: boolean;\r\n hideVehicleSelection: boolean;\r\n showCarTable: boolean;\r\n}\r\n\r\nexport interface ExternalCaseDetailsValuationProps {\r\n workflowFlowCalculation: WorkflowCalculation | null;\r\n vin: string | null;\r\n firstRegistrationDate: Date | null;\r\n onSelectedVehicle?: (selectedVehicle: any, options: string[]) => void;\r\n valuationVehicles?: ValuationVehicle[];\r\n optionCodes?: string[] | null;\r\n brandTypes?: IReferential[];\r\n modelTypes?: IReferential[];\r\n bodyTypes?: IReferential[];\r\n fuelTypes?: IReferential[];\r\n tractionTypes?: IReferential[];\r\n transmissionTypes?: IReferential[];\r\n onChangeFirstRegistrationDate?: (date: Date | null) => void;\r\n}\r\n\r\ntype ICCaseDetailsValuationProps = ExternalCaseDetailsValuationProps & {\r\n caseSettingsState: CaseSettingsState;\r\n appState: AppState;\r\n vehicleState: VehicleState;\r\n} & typeof CaseSettingsActionCreators &\r\n ProviderContext &\r\n RouteComponentProps<{ id: string; calcId: string | undefined; formId: string | undefined }>;\r\n\r\nclass CaseDetailsValuation extends React.PureComponent<\r\n ICCaseDetailsValuationProps,\r\n ICaseDetailsValuationState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private caseService!: ICaseService;\r\n\r\n static contextType = ApplicationContext;\r\n state = {\r\n isLoading: true,\r\n vehicles: [],\r\n viewOptions: false,\r\n selectedVehicle: null,\r\n options: null,\r\n optionCodes: [],\r\n optionsValue: 0,\r\n selectedOptionIndexes: [],\r\n excludedOptionsIndexes: [],\r\n includedOptionsIndexes: [],\r\n requiredOptionsIndexes: [],\r\n showOtionalRequiredOptions: false,\r\n optinalRequiredOptionsIndexes: [],\r\n isloadingIncludeExcludeOptions: false,\r\n tireWear: 0,\r\n bodyDamage: 0,\r\n hasGpl: false,\r\n valuationLoading: false,\r\n showWizard: false,\r\n hideVehicleSelection: true,\r\n showCarTable: false\r\n } as ICaseDetailsValuationState;\r\n\r\n public async componentDidMount() {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (R.isNil(caseSettings) || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n\r\n await this.loadData();\r\n }\r\n\r\n onWizardCallback = async (\r\n make: string,\r\n model: string,\r\n body: string,\r\n firstRegistrationDate: Date,\r\n generation: number\r\n ) => {\r\n this.setState({ isLoading: true });\r\n const result = await this.caseService.GetValuationVehiclesWithoutVin(\r\n make,\r\n model,\r\n body,\r\n R.isNil(firstRegistrationDate) ? new Date() : firstRegistrationDate,\r\n generation\r\n );\r\n\r\n if (result && !R.isEmpty(result.vehicles)) {\r\n this.setState({\r\n isLoading: false,\r\n showWizard: false,\r\n vehicles: result.vehicles,\r\n optionCodes: result.extraOptionCodes\r\n });\r\n } else {\r\n this.setState({\r\n isLoading: false,\r\n showWizard: false,\r\n vehicles: result.vehicles,\r\n optionCodes: result.extraOptionCodes\r\n });\r\n }\r\n return result.vehicles;\r\n };\r\n\r\n onShowCarList = (show: boolean) => {\r\n this.setState({ showCarTable: show });\r\n };\r\n\r\n onChangeFirstRegistrationDate = (date: Date | null) => {\r\n if (this.props.onChangeFirstRegistrationDate) {\r\n this.props.onChangeFirstRegistrationDate(date);\r\n }\r\n };\r\n\r\n onFilterChanged = (vehicles: ValuationVehicle[]) => {\r\n this.setState({ vehicles: vehicles });\r\n };\r\n\r\n loadData = async () => {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (R.isNil(caseSettings) || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n\r\n if (\r\n this.props.vin !== null &&\r\n this.props.vin === '' &&\r\n R.isNil(this.props.workflowFlowCalculation)\r\n ) {\r\n return;\r\n }\r\n const firstRegistrationDate =\r\n this.props.firstRegistrationDate ||\r\n VehicleHelper.GetFirstRegistrationDateObject(\r\n this.props.caseSettingsState.case,\r\n this.props.vehicleState.vehicle\r\n );\r\n const vin =\r\n this.props.vin ||\r\n VehicleHelper.GetVIN(this.props.caseSettingsState.case, this.props.vehicleState.vehicle);\r\n const carOptionalSelectedOptions =\r\n this.props.vehicleState.vehicle?.vehicleOptions.filter(\r\n (o) => !o.isStandard && o.isSelected\r\n ) ?? [];\r\n const carSelectedOptionalCodes = carOptionalSelectedOptions.map((x) => x.code);\r\n const valuationVehicleId = !R.isNil(this.props.vehicleState.vehicle)\r\n ? this.props.vehicleState.vehicle!.valuationVehicleId\r\n : null;\r\n if (!R.isNil(valuationVehicleId)) {\r\n const valuationVehicle = await this.caseService.GetValuationVehicle(valuationVehicleId);\r\n this.setState(\r\n {\r\n vehicles: [valuationVehicle],\r\n selectedVehicle: valuationVehicle,\r\n optionCodes: carSelectedOptionalCodes,\r\n viewOptions: true,\r\n showWizard: false,\r\n hideVehicleSelection: true\r\n },\r\n this.loadOptions\r\n );\r\n } else {\r\n let result = {\r\n vehicles: this.props.valuationVehicles,\r\n extraOptionCodes: this.props.optionCodes ?? []\r\n } as ValuationVehicles;\r\n\r\n if (R.isNil(this.props.valuationVehicles)) {\r\n const body = {\r\n registration_date: R.isNil(firstRegistrationDate) ? new Date() : firstRegistrationDate,\r\n ignore_date: false,\r\n override_existing_match: false\r\n };\r\n\r\n result = await this.caseService.GetValuationVehiclesInfo(\r\n vin,\r\n R.isNil(this.props.workflowFlowCalculation)\r\n ? null\r\n : this.props.workflowFlowCalculation!.id,\r\n body\r\n );\r\n }\r\n\r\n const vehicleState = this.props.vehicleState;\r\n if (!isNullOrUndefined(vehicleState)) {\r\n const valuationVehicles = result.vehicles.filter((v) => {\r\n return v.version === vehicleState.vehicle?.version;\r\n });\r\n if (valuationVehicles.length !== 0) {\r\n result.vehicles = valuationVehicles;\r\n } else {\r\n // vehicle is not found on GTValuation by VIN so we have to get a list of results by make/model/body and version\r\n const resultCustomValuationVehicles =\r\n await this.caseService.GetValuationVehiclesWithoutVin(\r\n vehicleState.vehicle?.make?.name || undefined,\r\n vehicleState.vehicle?.model?.name || undefined,\r\n vehicleState.vehicle?.bodyType?.name || undefined,\r\n !vehicleState.vehicle?.firstRegistrationDate\r\n ? new Date()\r\n : new Date(vehicleState.vehicle.firstRegistrationDate)\r\n );\r\n const perfectMatchFoundByVersionList = resultCustomValuationVehicles.vehicles.filter(\r\n (v) => {\r\n return v.version === vehicleState.vehicle?.version;\r\n }\r\n );\r\n if (perfectMatchFoundByVersionList.length === 1) {\r\n result.vehicles = perfectMatchFoundByVersionList;\r\n }\r\n }\r\n }\r\n\r\n if (result && R.isEmpty(result.vehicles)) {\r\n this.setState({\r\n isLoading: false,\r\n showWizard: true,\r\n hideVehicleSelection: false\r\n });\r\n\r\n return;\r\n }\r\n\r\n if (result) {\r\n if (result.vehicles.length === 1) {\r\n this.setState(\r\n {\r\n vehicles: result.vehicles,\r\n selectedVehicle: result.vehicles[0],\r\n optionCodes: result.extraOptionCodes,\r\n viewOptions: true,\r\n showWizard: false,\r\n hideVehicleSelection: true\r\n },\r\n this.loadOptions\r\n );\r\n } else {\r\n this.setState({\r\n vehicles: result.vehicles,\r\n isLoading: false,\r\n hideVehicleSelection: false,\r\n optionCodes: result.extraOptionCodes\r\n });\r\n this.onShowCarList(true);\r\n }\r\n }\r\n }\r\n };\r\n\r\n getVehicleColumns = () => {\r\n const columns = [\r\n {\r\n name: 'vehicleId',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'manufacturer',\r\n label: this.translatorService.Tranlate('CASE_VALUATION_BRAND_LABEL', 'Marca'),\r\n options: { filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'model',\r\n label: this.translatorService.Tranlate('CASE_VALUATION_MODEL_LABEL', 'Model'),\r\n options: { filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'version',\r\n label: this.translatorService.Tranlate('CASE_VALUATION_VERSION_LABEL', 'Versiune'),\r\n options: { filter: true } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'trimLevel',\r\n label: this.translatorService.Tranlate('CASE_VALUATION_TRIMLEVEL_LABEL', 'Nivel echipare'),\r\n options: { filter: true } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'modelYear',\r\n label: this.translatorService.Tranlate('MODEL_YEAR', 'An model'),\r\n options: {\r\n filter: true\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'fuelType',\r\n label: this.translatorService.Tranlate('CASE_VALUATION_FUEL_TYPE_LABEL', 'Combustibil'),\r\n options: { filter: true } as MUIDataTableColumnOptions\r\n },\r\n //{\r\n // name: 'transmission',\r\n // label: this.translatorService.Tranlate(\r\n // 'CASE_VALUATION_GEARBOX_TYPE_LABEL',\r\n // 'Cutie de viteze'\r\n // ),\r\n // options: { filter: false } as MUIDataTableColumnOptions\r\n //},\r\n {\r\n name: 'powerHP',\r\n label: this.translatorService.Tranlate('CASE_VALUATION_KW_HP_TYPE_LABEL', 'Putere KW/HP'),\r\n options: {\r\n display: 'false',\r\n filter: false\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'kw',\r\n label: this.translatorService.Tranlate('CASE_VALUATION_KW_HP_TYPE_LABEL', 'Putere KW/HP'),\r\n options: {\r\n filter: true,\r\n customBodyRender: (value, tableMeta) => {\r\n return
{value + '/' + tableMeta.rowData[7]}
;\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'transmission',\r\n label: this.translatorService.Tranlate(\r\n 'CASE_VALUATION_FUEL_TRANSMISSION_LABEL',\r\n 'Transmisie'\r\n ),\r\n options: { filter: true } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'drivenWheels',\r\n label: this.translatorService.Tranlate('CASE_VALUATION_DRIVEN_WHEELS_LABEL', 'Tractiune'),\r\n options: { filter: true } as MUIDataTableColumnOptions\r\n },\r\n\r\n {\r\n name: 'cc',\r\n label: this.translatorService.Tranlate(\r\n 'CASE_VALUATION_CC_TYPE_LABEL',\r\n 'Capacitate cilindrica'\r\n ),\r\n options: { filter: true } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'wholesalePrice',\r\n label: this.translatorService.Tranlate(\r\n 'VALUATION_BASE_PRICE_LABEL',\r\n 'Pret de Baza (incl. TVA)'\r\n ),\r\n options: { filter: false } as MUIDataTableColumnOptions\r\n }\r\n ];\r\n\r\n return columns;\r\n };\r\n\r\n geOptionsColumns = () => {\r\n const columns = [\r\n {\r\n name: 'optionCode',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'description',\r\n label: ' ',\r\n options: {\r\n filter: false,\r\n sort: false,\r\n customBodyRender: (value, tableMeta, updateValue) => {\r\n const rowData = tableMeta.rowData;\r\n const rowIndex = tableMeta.rowIndex;\r\n const optionCode = rowData[0];\r\n const description = rowData[1];\r\n const price = rowData[2];\r\n const isExcluded = this.state.excludedOptionsIndexes.includes(rowIndex);\r\n const isIncluded = this.state.includedOptionsIndexes.includes(rowIndex);\r\n const isRequired = this.state.requiredOptionsIndexes.includes(rowIndex);\r\n const style = {\r\n color: '#fff',\r\n borderRadius: '0.15rem',\r\n padding: '2px 5px',\r\n marginLeft: '7px',\r\n fontSize: '12px',\r\n fontWeight: 'bold'\r\n };\r\n const excludedStyle = {\r\n backgroundColor: '#6c757d'\r\n };\r\n const includedStyle = {\r\n backgroundColor: '#28a745'\r\n };\r\n const mandatoryStyle = {\r\n backgroundColor: '#007bff'\r\n };\r\n\r\n return (\r\n \r\n {`[${optionCode}] ${description} - ${price} €`}\r\n {isExcluded && Indisponibila}\r\n {isIncluded && (\r\n Inclusa in alt pachet\r\n )}\r\n {isRequired && (\r\n Obligatorie din alt pachet\r\n )}\r\n \r\n );\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'price',\r\n options: { display: 'excluded', filter: false, sort: false } as MUIDataTableColumnOptions\r\n }\r\n ];\r\n\r\n return columns;\r\n };\r\n\r\n getIncludedExcludedRequiredOptions = (options: VehicleOption[]) => {\r\n const includedOptionsIndexes: string[] = [];\r\n const excludedOptionsIndexes: string[] = [];\r\n const requiredOptionsIndexes: string[] = [];\r\n\r\n options.forEach((option, index) => {\r\n if (option.isIncluded) {\r\n includedOptionsIndexes.push(option.code);\r\n }\r\n if (option.isExcluded) {\r\n excludedOptionsIndexes.push(option.code);\r\n }\r\n if (option.isRequired) {\r\n requiredOptionsIndexes.push(option.code);\r\n }\r\n });\r\n\r\n return {\r\n included: includedOptionsIndexes,\r\n excluded: excludedOptionsIndexes,\r\n required: requiredOptionsIndexes\r\n };\r\n };\r\n\r\n findIndexesByCode = (extraOptions: ValuationExtraOption[] | null, codes: string[]): number[] => {\r\n if (extraOptions === null) return [];\r\n const indexes: number[] = [];\r\n\r\n extraOptions.forEach((object, index) => {\r\n if (codes.includes(object.optionCode)) {\r\n indexes.push(index);\r\n }\r\n });\r\n\r\n return indexes;\r\n };\r\n\r\n loadOptions = async () => {\r\n if (this.state.selectedVehicle === null) {\r\n return;\r\n }\r\n const options = await this.caseService.GetValuationVehicleOptions(\r\n this.state.selectedVehicle!.vehicleId\r\n );\r\n // get the included, excluded and required options from the vehicle\r\n const { included, excluded, required } = this.props.vehicleState.vehicle\r\n ? this.getIncludedExcludedRequiredOptions(this.props.vehicleState.vehicle?.vehicleOptions)\r\n : { included: [], excluded: [], required: [] };\r\n const includedIndexex = options.extraOptions\r\n ? this.findIndexesByCode(options.extraOptions, included)\r\n : [];\r\n const excludedIndexex = options.extraOptions\r\n ? this.findIndexesByCode(options.extraOptions, excluded)\r\n : [];\r\n const requiredIndexex = options.extraOptions\r\n ? this.findIndexesByCode(options.extraOptions, required)\r\n : [];\r\n const updatedIncludedIndexes = Array.from(\r\n new Set([...this.state.includedOptionsIndexes, ...includedIndexex])\r\n );\r\n const updatedExcludedIndexes = Array.from(\r\n new Set([...this.state.excludedOptionsIndexes, ...excludedIndexex])\r\n );\r\n const updatedRequiredIndexes = Array.from(\r\n new Set([...this.state.requiredOptionsIndexes, ...requiredIndexex])\r\n );\r\n\r\n // update the state of included, excluded and required options\r\n this.setState({\r\n ...this.state,\r\n includedOptionsIndexes: updatedIncludedIndexes,\r\n excludedOptionsIndexes: updatedExcludedIndexes,\r\n requiredOptionsIndexes: updatedRequiredIndexes\r\n });\r\n\r\n const selectedOptionIndexes = this.getSelectedRows(options.extraOptions);\r\n\r\n this.setState({\r\n isLoading: false,\r\n options: options,\r\n selectedOptionIndexes: selectedOptionIndexes,\r\n optionsValue: this.getExtraOptionsPrice(options, selectedOptionIndexes)\r\n });\r\n };\r\n\r\n getSelectedRows = (extraoptions: ValuationExtraOption[]) => {\r\n const indexArray: number[] = [];\r\n this.state.optionCodes.forEach((item) => {\r\n const index = extraoptions.findIndex((o) => o.optionCode === item);\r\n if (index !== undefined && index !== -1) {\r\n indexArray.push(index);\r\n }\r\n });\r\n\r\n return indexArray;\r\n };\r\n\r\n getVehicleOptions = () => {\r\n return {\r\n viewColumns: false,\r\n filter: true,\r\n search: false,\r\n pagination: false,\r\n selectableRows: 'single' as SelectableRows,\r\n selectableRowsHeader: false,\r\n disableToolbarSelect: true,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n elevation: 1,\r\n onRowsSelect: (rowSelected: any) => {\r\n if (this.props.vin !== null && !R.isNil(this.props.onSelectedVehicle)) {\r\n this.props.onSelectedVehicle(\r\n this.state.vehicles[rowSelected[0].dataIndex],\r\n this.state.optionCodes\r\n );\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n viewOptions: true,\r\n isLoading: true,\r\n selectedVehicle: this.state.vehicles[rowSelected[0].dataIndex]\r\n },\r\n this.loadOptions\r\n );\r\n }\r\n };\r\n };\r\n\r\n getExtraOptionsPrice = (options: ValuationVehicleOptions | null, selectedIndexes: number[]) => {\r\n if (options === null) {\r\n return 0;\r\n }\r\n if (options.extraOptions === null) {\r\n return 0;\r\n }\r\n const caseParameters = this.props.caseSettingsState.case!.caseParameters;\r\n const vatParameter = caseParameters.filter(\r\n (parameter) => parameter.parameter!.code === ParametreCode.TVA\r\n );\r\n\r\n const vatValue = +vatParameter[0]?.value || 0;\r\n let sum = 0;\r\n selectedIndexes.forEach((item) => {\r\n sum += options.extraOptions[item].price;\r\n });\r\n\r\n return Utils.getPriceWithVat(sum, vatValue);\r\n };\r\n\r\n getOptionsOptions = () => {\r\n return {\r\n viewColumns: false,\r\n filter: false,\r\n search: false,\r\n pagination: false,\r\n selectableRows: 'multiple' as SelectableRows,\r\n rowsSelected: this.state.selectedOptionIndexes,\r\n selectableRowsHeader: false,\r\n disableToolbarSelect: true,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n elevation: 1,\r\n\r\n onRowsSelect: async (rowSelected: any, rowsSelected: any[]) => {\r\n const selected = rowsSelected.map((item) => item.index).filter((item) => item !== -1);\r\n const lastSelectedIndex = rowSelected[0].dataIndex;\r\n const lastSelectedOptionIndex =\r\n this.state.options!.extraOptions[lastSelectedIndex].optionId;\r\n const { includedOptionIds, excludedOptionIds, requiredOptionIds } =\r\n await this.fetchIncludeAndExcludeOptions(\r\n lastSelectedOptionIndex,\r\n this.state.selectedVehicle!.vehicleId\r\n );\r\n let finalSelectedIndexes = [...selected];\r\n let finalIncludedIndexes = Array.from(new Set([...this.state.includedOptionsIndexes]));\r\n let finalExcludedIndexes = Array.from(new Set([...this.state.excludedOptionsIndexes]));\r\n let finalRequiredIndexes = Array.from(new Set([...this.state.requiredOptionsIndexes]));\r\n\r\n // if the selected option is selected\r\n if (selected.includes(lastSelectedIndex)) {\r\n if (includedOptionIds) {\r\n const includedIndexes = this.findIndexes(\r\n this.state.options!.extraOptions,\r\n includedOptionIds\r\n );\r\n\r\n finalIncludedIndexes = Array.from(\r\n new Set([...finalIncludedIndexes, ...includedIndexes])\r\n );\r\n\r\n finalSelectedIndexes = this.removeIndexes(finalSelectedIndexes, includedIndexes);\r\n }\r\n\r\n if (requiredOptionIds) {\r\n // if there are mandatory options\r\n if (requiredOptionIds.mandatory.length > 0) {\r\n const mandatoryIndexes = this.findIndexes(\r\n this.state.options!.extraOptions,\r\n requiredOptionIds.mandatory\r\n );\r\n\r\n finalRequiredIndexes = Array.from(\r\n new Set([...finalRequiredIndexes, ...mandatoryIndexes])\r\n );\r\n finalSelectedIndexes = Array.from(\r\n new Set([...finalSelectedIndexes, ...mandatoryIndexes])\r\n );\r\n }\r\n\r\n // if user has to select at least one option from the mandatory ones\r\n if (requiredOptionIds.atLeastOne.length > 0) {\r\n this.setState({\r\n showOtionalRequiredOptions: true,\r\n optinalRequiredOptionsIndexes: requiredOptionIds.atLeastOne\r\n });\r\n }\r\n }\r\n\r\n if (excludedOptionIds) {\r\n const excludedIndexes = this.findIndexes(\r\n this.state.options!.extraOptions,\r\n excludedOptionIds\r\n );\r\n\r\n finalExcludedIndexes = Array.from(\r\n new Set([...finalExcludedIndexes, ...excludedIndexes])\r\n );\r\n\r\n finalSelectedIndexes = this.removeIndexes(finalSelectedIndexes, excludedIndexes);\r\n }\r\n }\r\n // if the selected option is deselected\r\n else {\r\n if (includedOptionIds) {\r\n const includedIndexes = this.findIndexes(\r\n this.state.options!.extraOptions,\r\n includedOptionIds\r\n );\r\n\r\n finalIncludedIndexes = this.removeIndexes(finalIncludedIndexes, includedIndexes);\r\n finalSelectedIndexes = this.removeIndexes(finalSelectedIndexes, includedIndexes);\r\n }\r\n\r\n if (requiredOptionIds) {\r\n if (requiredOptionIds.mandatory.length > 0) {\r\n const mandatoryIndexes = this.findIndexes(\r\n this.state.options!.extraOptions,\r\n requiredOptionIds.mandatory\r\n );\r\n\r\n finalRequiredIndexes = this.removeIndexes(finalRequiredIndexes, mandatoryIndexes);\r\n finalSelectedIndexes = this.removeIndexes(finalSelectedIndexes, mandatoryIndexes);\r\n finalExcludedIndexes = this.removeIndexes(finalExcludedIndexes, mandatoryIndexes);\r\n }\r\n\r\n if (requiredOptionIds.atLeastOne.length > 0) {\r\n const atLeastOneIndexes = this.findIndexes(\r\n this.state.options!.extraOptions,\r\n requiredOptionIds.atLeastOne\r\n );\r\n\r\n finalRequiredIndexes = this.removeIndexes(finalRequiredIndexes, atLeastOneIndexes);\r\n finalSelectedIndexes = this.removeIndexes(finalSelectedIndexes, atLeastOneIndexes);\r\n finalExcludedIndexes = this.removeIndexes(finalExcludedIndexes, atLeastOneIndexes);\r\n }\r\n }\r\n\r\n if (excludedOptionIds) {\r\n const excludedIndexes = this.findIndexes(\r\n this.state.options!.extraOptions,\r\n excludedOptionIds\r\n );\r\n\r\n finalExcludedIndexes = this.removeIndexes(finalExcludedIndexes, excludedIndexes);\r\n finalSelectedIndexes = this.removeIndexes(finalSelectedIndexes, excludedIndexes);\r\n }\r\n }\r\n\r\n finalSelectedIndexes = this.removeIndexes(finalSelectedIndexes, finalExcludedIndexes);\r\n finalSelectedIndexes = Array.from(\r\n new Set([...finalSelectedIndexes, ...finalRequiredIndexes])\r\n );\r\n finalExcludedIndexes = this.removeIndexes(finalExcludedIndexes, finalRequiredIndexes);\r\n finalIncludedIndexes = this.removeIndexes(finalIncludedIndexes, finalRequiredIndexes);\r\n\r\n this.setState({\r\n selectedOptionIndexes: finalSelectedIndexes,\r\n optionsValue: this.getExtraOptionsPrice(this.state.options, finalSelectedIndexes),\r\n excludedOptionsIndexes: finalExcludedIndexes,\r\n includedOptionsIndexes: finalIncludedIndexes,\r\n requiredOptionsIndexes: finalRequiredIndexes\r\n });\r\n },\r\n isRowSelectable: (dataIndex: any) =>\r\n !this.state.excludedOptionsIndexes.includes(dataIndex) &&\r\n !this.state.includedOptionsIndexes.includes(dataIndex) &&\r\n !this.state.requiredOptionsIndexes.includes(dataIndex)\r\n };\r\n };\r\n\r\n fetchIncludeOptions = async (optionId: number, vehicleId: number): Promise => {\r\n let includeOptionsRequest = null;\r\n\r\n try {\r\n includeOptionsRequest = await this.caseService.GetIncludeOptions(optionId, vehicleId);\r\n } catch (error) {}\r\n\r\n if (includeOptionsRequest) {\r\n const extractedIndexes = this.extractIndexes(includeOptionsRequest.rule);\r\n return extractedIndexes;\r\n }\r\n\r\n return includeOptionsRequest;\r\n };\r\n\r\n fetchExcludeOptions = async (optionId: number, vehicleId: number): Promise => {\r\n let excludeOptionsRequest = null;\r\n\r\n try {\r\n excludeOptionsRequest = await this.caseService.GetExcludeOptions(optionId, vehicleId);\r\n } catch (error) {}\r\n\r\n if (excludeOptionsRequest) {\r\n const extractedIndexes = this.extractIndexes(excludeOptionsRequest.rule);\r\n return extractedIndexes;\r\n }\r\n\r\n return excludeOptionsRequest;\r\n };\r\n\r\n fetchRequiredOptions = async (\r\n optionId: number,\r\n vehicleId: number\r\n ): Promise => {\r\n let requiredOptionsRequest = null;\r\n\r\n try {\r\n requiredOptionsRequest = await this.caseService.GetRequiredOptions(optionId, vehicleId);\r\n } catch (error) {}\r\n\r\n if (requiredOptionsRequest) {\r\n const parsedConditions = this.parseRequiredConditions(requiredOptionsRequest.rule);\r\n return parsedConditions;\r\n }\r\n\r\n return requiredOptionsRequest;\r\n };\r\n\r\n fetchIncludeAndExcludeOptions = async (optionId: number, vehicleId: number) => {\r\n let includedOptionIds = null;\r\n let excludedOptionIds = null;\r\n let requiredOptionIds = null;\r\n\r\n try {\r\n this.setState({ isloadingIncludeExcludeOptions: true });\r\n\r\n includedOptionIds = await this.fetchIncludeOptions(optionId, vehicleId);\r\n excludedOptionIds = await this.fetchExcludeOptions(optionId, vehicleId);\r\n requiredOptionIds = await this.fetchRequiredOptions(optionId, vehicleId);\r\n } catch (error) {\r\n this.setState({ isloadingIncludeExcludeOptions: false });\r\n }\r\n\r\n this.setState({ isloadingIncludeExcludeOptions: false });\r\n return {\r\n includedOptionIds,\r\n excludedOptionIds,\r\n requiredOptionIds\r\n };\r\n };\r\n\r\n findIndexes = (extraOptions: ValuationExtraOption[] | null, codes: number[]): number[] => {\r\n if (extraOptions === null) return [];\r\n const indexes: number[] = [];\r\n\r\n extraOptions.forEach((object, index) => {\r\n if (codes.includes(object.optionId)) {\r\n indexes.push(index);\r\n }\r\n });\r\n\r\n return indexes;\r\n };\r\n\r\n removeIndexes(excludedOptionsIndexes: number[], excludedIndexes: number[]): number[] {\r\n return excludedOptionsIndexes.filter((item) => !excludedIndexes.includes(item));\r\n }\r\n\r\n extractIndexes = (input: string): number[] => {\r\n // Use regular expression to match all numbers within braces\r\n const matches = input.match(/\\{(\\d+)\\}/g);\r\n\r\n // If no matches found, return an empty array\r\n if (!matches) {\r\n return [];\r\n }\r\n\r\n // Extract the numbers and convert them to integers\r\n const indexes = matches.map((match) => parseInt(match.replace(/[{}]/g, ''), 10));\r\n\r\n return indexes;\r\n };\r\n\r\n parseRequiredConditions(input: string): ParsedConditions {\r\n const mandatory: number[] = [];\r\n const atLeastOne: number[] = [];\r\n\r\n // Regex for extracting all conditions (e.g., {1234})\r\n const allConditionsRegex = /{(\\d+)}/g;\r\n let match;\r\n\r\n // Collect all numbers within curly braces\r\n const allConditions: number[] = [];\r\n while ((match = allConditionsRegex.exec(input)) !== null) {\r\n allConditions.push(parseInt(match[1], 10));\r\n }\r\n\r\n // Check if the input contains 'AND' or 'OR'\r\n if (input.includes('AND')) {\r\n // Regex for extracting mandatory conditions before 'AND'\r\n const mandatoryPart = input.split(' AND ')[0];\r\n const mandatoryRegex = /{(\\d+)}/g;\r\n let mandatoryMatch;\r\n while ((mandatoryMatch = mandatoryRegex.exec(mandatoryPart)) !== null) {\r\n mandatory.push(parseInt(mandatoryMatch[1], 10));\r\n }\r\n\r\n // Regex for extracting optional conditions within parentheses\r\n const optionalPartMatch = input.match(/\\(([^)]+)\\)/);\r\n if (optionalPartMatch) {\r\n const optionalRegex = /{(\\d+)}/g;\r\n let optionalMatch;\r\n while ((optionalMatch = optionalRegex.exec(optionalPartMatch[1])) !== null) {\r\n atLeastOne.push(parseInt(optionalMatch[1], 10));\r\n }\r\n }\r\n } else if (input.includes('OR')) {\r\n // If there are no 'AND' conditions, treat all as optional\r\n for (const num of allConditions) {\r\n atLeastOne.push(num);\r\n }\r\n } else {\r\n // If no logical operator is present, all conditions are mandatory\r\n mandatory.push(...allConditions);\r\n }\r\n\r\n return {\r\n mandatory,\r\n atLeastOne\r\n };\r\n }\r\n\r\n NumberFormatCustom = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n thousandSeparator={false}\r\n decimalScale={2}\r\n isNumericString\r\n />\r\n );\r\n };\r\n handleBodyDamageTextChange = (event: React.ChangeEvent) => {\r\n this.setState({\r\n bodyDamage: event.target.value === null ? 0 : parseFloat(event.target.value)\r\n });\r\n };\r\n\r\n handleTireWearTextChange = (event: React.ChangeEvent) => {\r\n this.setState({\r\n tireWear: event.target.value === null ? 0 : parseFloat(event.target.value)\r\n });\r\n };\r\n\r\n handleGplChange = (checked: boolean) => {\r\n this.setState({\r\n hasGpl: checked\r\n });\r\n };\r\n\r\n performValuation = async () => {\r\n try {\r\n const options: ValuationExtraOption[] = [];\r\n\r\n this.state.selectedOptionIndexes.forEach((index) =>\r\n options.push(this.state.options!.extraOptions[index])\r\n );\r\n const valuationRequest = {\r\n attritionValue: this.state.tireWear,\r\n bodyDamageValue: this.state.bodyDamage,\r\n extraOptionsPrice: this.state.optionsValue,\r\n gpl: this.state.hasGpl,\r\n numberOfKilometers: VehicleHelper.GetKmNr(\r\n this.props.caseSettingsState.case,\r\n this.props.vehicleState.vehicle\r\n ),\r\n priceAsNew: this.state.selectedVehicle!.wholesalePrice,\r\n vehicleId: this.state.selectedVehicle!.vehicleId,\r\n options: options,\r\n registrationDate: VehicleHelper.GetFirstRegistrationDateFormat(\r\n this.props.caseSettingsState.case,\r\n this.props.vehicleState.vehicle,\r\n 'YYYY-MM-DD'\r\n ),\r\n fabricationDate: VehicleHelper.GetMakeDateFormat(\r\n this.props.caseSettingsState.case,\r\n this.props.vehicleState.vehicle,\r\n 'YYYY-MM-DD'\r\n ),\r\n imageUrl: this.state.selectedVehicle?.imageUrl ? this.state.selectedVehicle?.imageUrl : '',\r\n vin:\r\n this.props.vin ||\r\n VehicleHelper.GetVIN(this.props.caseSettingsState.case, this.props.vehicleState.vehicle),\r\n version: this.state.selectedVehicle!.version,\r\n equipmentVersion: this.state.selectedVehicle!.trimLevel,\r\n make: this.state.selectedVehicle!.manufacturer,\r\n model: this.state.selectedVehicle!.model,\r\n fuelType: this.state.selectedVehicle!.fuelType,\r\n bodyType: this.state.selectedVehicle!.body,\r\n horsePower: this.state.selectedVehicle!.powerHP,\r\n nrOfDoors: this.state.selectedVehicle!.noOfDoors,\r\n transmissionType: this.state.selectedVehicle!.transmission\r\n } as ValuationRequest;\r\n\r\n this.setState({ valuationLoading: true });\r\n\r\n const result = await this.caseService.PerformValuation(\r\n valuationRequest,\r\n this.props.caseSettingsState.case!.id\r\n );\r\n\r\n this.props.SetCaseValuation(result);\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n\r\n this.setState({ valuationLoading: false });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n renderOptions = () => {\r\n const offerTypeCode = this.props.caseSettingsState?.case?.caseType?.code;\r\n\r\n const caseParameters = this.props.caseSettingsState?.case?.caseParameters || [];\r\n let caseVatRate =\r\n caseParameters.find((x) => x.parameter?.code === ParametreCode.TVA)?.value || 0;\r\n caseVatRate = +caseVatRate;\r\n const caseValuation = this.props.caseSettingsState?.case?.caseValuation;\r\n\r\n const basePrice = this.state.selectedVehicle?.wholesalePrice || 0;\r\n const optionsPrice = this.state.optionsValue;\r\n const totalPrice = basePrice + optionsPrice;\r\n\r\n const caseHasNoVAT = offerTypeCode === CaseTypeCode.AQUISITION && caseVatRate === 0;\r\n const vehicleHasNoVat =\r\n offerTypeCode === CaseTypeCode.SALE && this.props.vehicleState.vehicle?.purchaseVatRate === 0;\r\n\r\n const purchasePrice = (this.props.vehicleState.vehicle?.purchasePrice as number) || 0;\r\n\r\n let tradeInPrice = 0;\r\n let offerPrice = 0;\r\n let retailPrice = 0;\r\n\r\n const basePriceLabel = this.translatorService.Tranlate(\r\n 'VALUATION_BASE_PRICE_LABEL',\r\n 'Pret de Baza (incl. TVA)'\r\n );\r\n const optionsPriceLabel = this.translatorService.Tranlate(\r\n 'VALUATION_OPTIONS_PRICE_LABEL',\r\n 'Pret Optionale (incl. TVA)'\r\n );\r\n const totalPriceLabel = this.translatorService.Tranlate(\r\n 'VALUATION_TOTAL_LABEL',\r\n 'Total (incl. TVA)'\r\n );\r\n\r\n const tradeInPriceLabel = 'Trade-in price (incl. VAT)';\r\n const offerPriceLabel = 'Offer price (incl. VAT)';\r\n const retailPriceLabel = 'Retail price (incl. VAT)';\r\n\r\n if (caseValuation) {\r\n tradeInPrice = caseValuation.tradeInPrice;\r\n offerPrice = caseValuation.offerPrice;\r\n retailPrice = caseValuation.retailPrice;\r\n\r\n // if (caseHasNoVAT) {\r\n // tradeInPrice = Utils.getPriceWithoutVat(tradeInPrice, caseValuation.vatRate);\r\n // offerPrice = Utils.getPriceWithoutVat(offerPrice, caseValuation.vatRate);\r\n // retailPrice = Utils.getPriceWithoutVat(retailPrice, caseValuation.vatRate);\r\n // }\r\n\r\n // if (vehicleHasNoVat) {\r\n // tradeInPrice = Utils.getPriceWithoutVat(tradeInPrice, caseValuation.vatRate);\r\n // offerPrice = Utils.getPriceWithoutVat(offerPrice, caseValuation.vatRate);\r\n // retailPrice = Utils.getPriceWithoutVat(retailPrice, caseValuation.vatRate);\r\n\r\n // tradeInPrice = Utils.getPriceWithMarginVat(tradeInPrice, +purchasePrice, caseVatRate);\r\n // offerPrice = Utils.getPriceWithMarginVat(offerPrice, +purchasePrice, caseVatRate);\r\n // retailPrice = Utils.getPriceWithMarginVat(retailPrice, +purchasePrice, caseVatRate);\r\n // }\r\n }\r\n\r\n // if (caseHasNoVAT) {\r\n // tradeInPriceLabel = Utils.removeVatFromPriceLabel(tradeInPriceLabel);\r\n // offerPriceLabel = Utils.removeVatFromPriceLabel(offerPriceLabel);\r\n // retailPriceLabel = Utils.removeVatFromPriceLabel(retailPriceLabel);\r\n // }\r\n\r\n return (\r\n
\r\n

\r\n {`${this.state.selectedVehicle!.manufacturer} ${this.state.selectedVehicle!.model} ${\r\n this.state.selectedVehicle!.version\r\n }`}\r\n

\r\n

\r\n\r\n \r\n \r\n \r\n \r\n {VehicleHelper.GetMakeDateFormat(\r\n this.props.caseSettingsState.case,\r\n this.props.vehicleState.vehicle,\r\n 'YYYY-MM-DD'\r\n ) ? (\r\n \r\n ) : null}\r\n {VehicleHelper.GetFirstRegistrationDateFormat(\r\n this.props.caseSettingsState.case,\r\n this.props.vehicleState.vehicle,\r\n 'YYYY-MM-DD'\r\n ) ? (\r\n \r\n ) : null}\r\n \r\n \r\n \r\n\r\n this.handleGplChange(checked)}\r\n color=\"primary\"\r\n id=\"hasGpl\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={this.translatorService.Tranlate('VALUATION_GPL_LABEL', 'GPL')}\r\n />\r\n\r\n
\r\n \r\n {this.translatorService.Tranlate('VALUATION_ACTION_START_LABEL', 'Evalueaza')}\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
{basePrice.toFixed(2)} €
\r\n
{optionsPrice.toFixed(2)} €
\r\n
{totalPrice.toFixed(2)} €
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n {!this.state.valuationLoading ? (\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
{tradeInPrice ? tradeInPrice.toFixed(2) : 0} €
\r\n
{offerPrice ? offerPrice.toFixed(2) : 0} €
\r\n
{retailPrice ? retailPrice.toFixed(2) : 0} €
\r\n
\r\n
\r\n ) : null}\r\n
\r\n
\r\n
\r\n
\r\n\r\n

\r\n\r\n \r\n \r\n\r\n {this.state.showOtionalRequiredOptions && this.renderMandatoryOptionsDialog()}\r\n
\r\n\r\n \r\n {this.state.isloadingIncludeExcludeOptions ? : null}\r\n \r\n \r\n );\r\n };\r\n\r\n renderMandatoryOptionsDialog = () => {\r\n const data = this.state.options?.extraOptions.filter((option) => {\r\n return this.state.optinalRequiredOptionsIndexes.includes(option.optionId);\r\n });\r\n return (\r\n \r\n \r\n {'Pentru selectia anterioara este necesara adaugarea unei optiuni din lista'}\r\n \r\n \r\n {\r\n const rowData = tableMeta.rowData;\r\n return `[${rowData[0]}] ${value} - ${rowData[2]} €`;\r\n }\r\n }\r\n },\r\n {\r\n name: 'price',\r\n label: 'Pret',\r\n options: {\r\n display: 'excluded',\r\n filter: false,\r\n sort: false\r\n }\r\n }\r\n ]}\r\n options={{\r\n viewColumns: false,\r\n filter: false,\r\n search: false,\r\n pagination: false,\r\n selectableRows: 'single' as SelectableRows,\r\n selectableRowsHeader: false,\r\n disableToolbarSelect: true,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n elevation: 1,\r\n onRowsSelect: (rowSelected: any, allRows: any) => {\r\n const { dataIndex } = rowSelected[0];\r\n const rowData = this.state.options?.extraOptions.filter((option) => {\r\n return this.state.optinalRequiredOptionsIndexes.includes(option.optionId);\r\n })[dataIndex];\r\n const selectedOptionIndexInExtraOptions = this.findIndexes(\r\n this.state.options!.extraOptions,\r\n [rowData!.optionId]\r\n );\r\n const unselectedOptionsToBeRemoved =\r\n this.state.optinalRequiredOptionsIndexes.filter(\r\n (item) => item !== rowData!.optionId\r\n );\r\n const findOptionsToBeExcluded = this.findIndexes(\r\n this.state.options!.extraOptions,\r\n unselectedOptionsToBeRemoved\r\n );\r\n let finalSelectedIndexes = Array.from(\r\n new Set([\r\n ...this.state.selectedOptionIndexes,\r\n ...selectedOptionIndexInExtraOptions\r\n ])\r\n );\r\n const finalRequiredIndexes = Array.from(\r\n new Set([\r\n ...this.state.requiredOptionsIndexes,\r\n ...selectedOptionIndexInExtraOptions\r\n ])\r\n );\r\n let finalExcludedIndexes = Array.from(\r\n new Set([...this.state.excludedOptionsIndexes, ...findOptionsToBeExcluded])\r\n );\r\n let finalIncludedIndexes = Array.from(\r\n new Set([...this.state.includedOptionsIndexes])\r\n );\r\n finalSelectedIndexes = this.removeIndexes(\r\n finalSelectedIndexes,\r\n finalExcludedIndexes\r\n );\r\n finalSelectedIndexes = Array.from(\r\n new Set([...finalSelectedIndexes, ...finalRequiredIndexes])\r\n );\r\n finalExcludedIndexes = this.removeIndexes(\r\n finalExcludedIndexes,\r\n finalRequiredIndexes\r\n );\r\n finalIncludedIndexes = this.removeIndexes(\r\n finalIncludedIndexes,\r\n finalRequiredIndexes\r\n );\r\n this.setState({\r\n ...this.state,\r\n showOtionalRequiredOptions: false,\r\n selectedOptionIndexes: finalSelectedIndexes,\r\n requiredOptionsIndexes: finalRequiredIndexes,\r\n optionsValue: this.getExtraOptionsPrice(this.state.options, finalSelectedIndexes),\r\n excludedOptionsIndexes: finalExcludedIndexes,\r\n includedOptionsIndexes: finalIncludedIndexes,\r\n optinalRequiredOptionsIndexes: []\r\n });\r\n }\r\n }}\r\n />\r\n \r\n \r\n );\r\n };\r\n\r\n renderVehicleSelection = () => {\r\n return (\r\n
\r\n \r\n\r\n {this.state.showCarTable ? (\r\n
\r\n \r\n
\r\n ) : null}\r\n
\r\n );\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n\r\n {this.state.hideVehicleSelection ? null : this.renderVehicleSelection()}\r\n\r\n {!this.state.isLoading &&\r\n this.state.viewOptions &&\r\n this.state.options &&\r\n !this.state.showWizard\r\n ? this.renderOptions()\r\n : null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalCaseDetailsValuationProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app,\r\n vehicleState: state.vehicle\r\n }),\r\n CaseSettingsActionCreators,\r\n mergeProps\r\n)(withSnackbar(CaseDetailsValuation as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, CaseSettingsState, AppState } from '../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { Grid, Divider } from '@material-ui/core';\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { isNullOrUndefined } from 'util';\r\nimport { CaseCalculationHistory, CaseCalculationPart } from '../../interfaces/Case';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\n\r\nexport interface ExternalCaseDetailsCaseTabCompareCalculationsProps {\r\n calculationHistoryIds: number[];\r\n}\r\n\r\ninterface ICaseDetailsCaseTabCompareCalculationsState {\r\n firstCalculation: CaseCalculationHistory;\r\n secondCalculation: CaseCalculationHistory;\r\n calculationSectionList: IReferential[];\r\n calculationParts: CaseCalculationPart[];\r\n isLoading: boolean;\r\n}\r\n\r\ntype ICaseDetailsCaseTabCompareCalculationsProps =\r\n ExternalCaseDetailsCaseTabCompareCalculationsProps & {\r\n caseSettingsState: CaseSettingsState;\r\n appState: AppState;\r\n } & ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass CaseDetailsCaseTabCompareCalculations extends React.PureComponent<\r\n ICaseDetailsCaseTabCompareCalculationsProps,\r\n ICaseDetailsCaseTabCompareCalculationsState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private caseService!: ICaseService;\r\n\r\n static contextType = ApplicationContext;\r\n state = {\r\n firstCalculation: {} as CaseCalculationHistory,\r\n secondCalculation: {} as CaseCalculationHistory,\r\n calculationSectionList: [],\r\n calculationParts: [],\r\n isLoading: true\r\n } as ICaseDetailsCaseTabCompareCalculationsState;\r\n\r\n public componentDidMount() {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (caseSettings === null || caseSettings === undefined || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadData();\r\n }\r\n );\r\n }\r\n\r\n loadData = async () => {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (caseSettings === null || caseSettings === undefined || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n const casee = this.props.caseSettingsState.case;\r\n\r\n if (casee === null) {\r\n return;\r\n }\r\n\r\n const [\r\n first,\r\n second,\r\n calculationSections,\r\n caseFirstCalculationParts,\r\n caseSecondCalculationParts\r\n ] = await Promise.all([\r\n this.caseService.GetCaseCalculationHistoryDetails(this.props.calculationHistoryIds[0]),\r\n this.caseService.GetCaseCalculationHistoryDetails(this.props.calculationHistoryIds[1]),\r\n this.caseService.GetCalculationSections(),\r\n this.caseService.GetCaseCalculationParts(this.props.calculationHistoryIds[0]),\r\n this.caseService.GetCaseCalculationParts(this.props.calculationHistoryIds[1])\r\n ]);\r\n\r\n this.setState({\r\n firstCalculation: first,\r\n secondCalculation: second,\r\n calculationSectionList: calculationSections,\r\n calculationParts: caseFirstCalculationParts\r\n .concat(caseSecondCalculationParts)\r\n .sort(function (a, b) {\r\n return a.calculationSectionId - b.calculationSectionId;\r\n }),\r\n isLoading: false\r\n });\r\n };\r\n\r\n textColor = (x: number | undefined, y: number | undefined, backgroud: boolean) => {\r\n return backgroud === false\r\n ? x === undefined\r\n ? 'text-danger'\r\n : y === undefined\r\n ? ''\r\n : y < x\r\n ? 'text-success'\r\n : x < y\r\n ? 'text-danger'\r\n : ''\r\n : x === undefined\r\n ? 'bg-danger'\r\n : y === undefined\r\n ? ''\r\n : y < x\r\n ? 'bg-success'\r\n : x < y\r\n ? 'bg-danger'\r\n : '';\r\n };\r\n\r\n renderCalculationParts = (sectionId: number) => {\r\n const calculationPartsForSectionId = [...this.state.calculationParts].filter(\r\n (item) => item.calculationSectionId === sectionId\r\n );\r\n const distinctCalculationPartCode = Array.from(\r\n new Set(calculationPartsForSectionId.map((item) => item.guideNumber))\r\n );\r\n return distinctCalculationPartCode.map((item) => {\r\n const firstCalculationPart = calculationPartsForSectionId.find(\r\n (calcPart) =>\r\n calcPart.caseCalculationHistoryId === this.state.firstCalculation.id &&\r\n calcPart.guideNumber === item\r\n );\r\n const secondCalculationPart = calculationPartsForSectionId.find(\r\n (calcPart) =>\r\n calcPart.caseCalculationHistoryId === this.state.secondCalculation.id &&\r\n calcPart.guideNumber === item\r\n );\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n {\r\n calculationPartsForSectionId.find((calcPart) => calcPart.guideNumber === item)!\r\n .name\r\n }\r\n
\r\n
{item}
\r\n
\r\n \r\n {isNullOrUndefined(firstCalculationPart) ? null : (\r\n
\r\n
\r\n {this.dynamicPrice(firstCalculationPart).toFixed(2) +\r\n ' ' +\r\n this.state.firstCalculation.currencyCode}\r\n
\r\n
{firstCalculationPart.pieceNr}
\r\n
\r\n {(isNullOrUndefined(this.dynamicDiscount(firstCalculationPart))\r\n ? '0'\r\n : this.dynamicDiscount(firstCalculationPart).toFixed(2)) + ' %'}\r\n
\r\n
\r\n {isNullOrUndefined(firstCalculationPart)\r\n ? ''\r\n : (\r\n this.dynamicPrice(firstCalculationPart) *\r\n firstCalculationPart.pieceNr *\r\n (1 - this.dynamicDiscount(firstCalculationPart) / 100)\r\n ).toFixed(2) +\r\n ' ' +\r\n this.state.firstCalculation.currencyCode}\r\n
\r\n
\r\n )}\r\n
\r\n \r\n {isNullOrUndefined(secondCalculationPart) ? null : (\r\n
\r\n \r\n {isNullOrUndefined(secondCalculationPart)\r\n ? ''\r\n : this.dynamicPrice(secondCalculationPart).toFixed(2) +\r\n ' ' +\r\n this.state.secondCalculation.currencyCode}\r\n
\r\n \r\n {secondCalculationPart.pieceNr}\r\n
\r\n \r\n {(isNullOrUndefined(this.dynamicDiscount(secondCalculationPart))\r\n ? '0.00'\r\n : this.dynamicDiscount(secondCalculationPart).toFixed(2)) + ' %'}\r\n \r\n \r\n {isNullOrUndefined(secondCalculationPart)\r\n ? ''\r\n : (\r\n this.dynamicPrice(secondCalculationPart) *\r\n secondCalculationPart.pieceNr *\r\n (1 - this.dynamicDiscount(secondCalculationPart) / 100)\r\n ).toFixed(2) +\r\n ' ' +\r\n this.state.secondCalculation.currencyCode}\r\n \r\n \r\n )}\r\n \r\n \r\n \r\n \r\n );\r\n });\r\n };\r\n\r\n dynamicPrice = (calculation: any) => {\r\n let price = calculation.originalPrice;\r\n if (calculation.alternativePartQualityId !== null) {\r\n price = calculation.alternativePrice;\r\n }\r\n return price;\r\n };\r\n\r\n dynamicDiscount = (calculation: any) => {\r\n let generalDiscount = calculation.discount;\r\n if (calculation.alternativePartQualityId !== null) {\r\n generalDiscount = calculation.alternativePartDiscount;\r\n }\r\n return generalDiscount;\r\n };\r\n\r\n renderCalculation = () => {\r\n const calculationSections = Array.from(\r\n new Set(this.state.calculationParts.map((item) => item.calculationSectionId))\r\n ).sort(function (a, b) {\r\n return a - b;\r\n });\r\n\r\n return calculationSections.map((item: number, index: number) => {\r\n const textColor =\r\n item === 1\r\n ? this.textColor(\r\n this.state.firstCalculation.amountPiecesWithDiscount,\r\n this.state.secondCalculation.amountPiecesWithDiscount,\r\n true\r\n )\r\n : item === 2\r\n ? this.textColor(\r\n this.state.firstCalculation.amountLaborWithDiscount,\r\n this.state.secondCalculation.amountLaborWithDiscount,\r\n true\r\n )\r\n : item === 3\r\n ? this.textColor(\r\n this.state.firstCalculation.amountPaintingMaterialsWithDiscount,\r\n this.state.secondCalculation.amountPaintingMaterialsWithDiscount,\r\n true\r\n )\r\n : this.textColor(\r\n this.state.firstCalculation.amountPaintingLaborWithDiscount,\r\n this.state.secondCalculation.amountPaintingLaborWithDiscount,\r\n true\r\n );\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n {\r\n this.state.calculationSectionList.find((section) => section.id === item)!\r\n .displayName\r\n }\r\n
\r\n
\r\n \r\n
\r\n {(item === 1\r\n ? this.state.firstCalculation.amountPiecesWithDiscount.toFixed(2)\r\n : item === 2\r\n ? this.state.firstCalculation.amountLaborWithDiscount.toFixed(2)\r\n : item === 3\r\n ? this.state.firstCalculation.amountPaintingMaterialsWithDiscount.toFixed(2)\r\n : this.state.firstCalculation.amountPaintingLaborWithDiscount.toFixed(2)) +\r\n ' ' +\r\n this.state.firstCalculation.currencyCode}\r\n
\r\n
\r\n \r\n
\r\n {(item === 1\r\n ? this.state.secondCalculation.amountPiecesWithDiscount.toFixed(2)\r\n : item === 2\r\n ? this.state.secondCalculation.amountLaborWithDiscount.toFixed(2)\r\n : item === 3\r\n ? this.state.secondCalculation.amountPaintingMaterialsWithDiscount.toFixed(2)\r\n : this.state.secondCalculation.amountPaintingLaborWithDiscount.toFixed(2)) +\r\n ' ' +\r\n this.state.secondCalculation.currencyCode}\r\n
\r\n
\r\n \r\n\r\n {this.renderCalculationParts(item)}\r\n
\r\n );\r\n });\r\n };\r\n\r\n renderTotalCalculation = () => {\r\n return (\r\n
\r\n \r\n \r\n
\r\n {this.translatorService.Tranlate('CALCULATION_COMPARE_TOTAL', 'Total')}\r\n
\r\n
\r\n \r\n
\r\n {(\r\n this.state.firstCalculation.amountLaborWithDiscount +\r\n this.state.firstCalculation.amountPiecesWithDiscount +\r\n this.state.firstCalculation.amountPaintingLaborWithDiscount +\r\n this.state.firstCalculation.amountPaintingMaterialsWithDiscount\r\n ).toFixed(2) +\r\n ' ' +\r\n this.state.firstCalculation.currencyCode}\r\n
\r\n
\r\n \r\n \r\n {(\r\n this.state.secondCalculation.amountLaborWithDiscount +\r\n this.state.secondCalculation.amountPiecesWithDiscount +\r\n this.state.secondCalculation.amountPaintingLaborWithDiscount +\r\n this.state.secondCalculation.amountPaintingMaterialsWithDiscount\r\n ).toFixed(2) +\r\n ' ' +\r\n this.state.secondCalculation.currencyCode}\r\n
\r\n \r\n \r\n \r\n );\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n
\r\n {this.renderCalculation()}\r\n {this.renderTotalCalculation()}\r\n
\r\n ) : null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalCaseDetailsCaseTabCompareCalculationsProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app\r\n }),\r\n null,\r\n mergeProps\r\n)(withSnackbar(CaseDetailsCaseTabCompareCalculations as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n ApplicationState,\r\n CaseSettingsState,\r\n AppState,\r\n CaseSettingsActionCreators,\r\n VehicleState\r\n} from '../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport {\r\n Button,\r\n Grid,\r\n List,\r\n ListItem,\r\n ListItemText,\r\n ListItemSecondaryAction,\r\n Checkbox\r\n} from '@material-ui/core';\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { isNullOrUndefined } from 'util';\r\nimport { IReferentialService } from '../../services/Interfaces/IReferentialService';\r\nimport { ReferentialCode } from '../../helpers/Constants';\r\nimport { ValidatorForm } from 'react-material-ui-form-validator';\r\nimport Referentials from '../../helpers/Referentials.json';\r\nimport NumberFormat from 'react-number-format';\r\nimport moment from 'moment';\r\nimport MomentUtils from '@date-io/moment';\r\nimport { IVehicleService } from '../../services/Interfaces/IVehicleService';\r\nimport { VehicleQualityControlCert, QCItem } from '../../interfaces/Vehicle';\r\ninterface ICertificateOfControlFormState {\r\n isLoading: boolean;\r\n hasRights: boolean;\r\n executing: boolean;\r\n isUserHidden: boolean;\r\n qualityControlItems: VehicleQualityControlCert[];\r\n}\r\n\r\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\r\nexport interface ExternalCertificateOfControlFormProps {\r\n // workflowForm: WorkflowSectionStepForm\r\n}\r\n\r\nclass LocalizedUtils extends MomentUtils {\r\n // dateFormat = \"DD MM YYYY\";\r\n}\r\n\r\ntype ICertificateOfControlFormProps = ExternalCertificateOfControlFormProps & {\r\n caseSettingsState: CaseSettingsState;\r\n appState: AppState;\r\n vehicleState: VehicleState;\r\n} & AppState &\r\n typeof CaseSettingsActionCreators &\r\n ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass CertificateOfControlForm extends React.PureComponent<\r\n ICertificateOfControlFormProps,\r\n ICertificateOfControlFormState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private vehicleService!: IVehicleService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n isLoading: true,\r\n hasRights: false,\r\n executing: false,\r\n isUserHidden: false,\r\n qualityControlItems: [] as VehicleQualityControlCert[]\r\n } as ICertificateOfControlFormState;\r\n\r\n public async componentDidMount() {\r\n if (isNullOrUndefined(this.props.caseSettingsState.case!.vehicleId)) {\r\n return;\r\n }\r\n\r\n const refQcItem = Referentials.referential.find((item) => item.code === ReferentialCode.QCItem);\r\n const refQcItemCateg = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.QCItemCategory\r\n );\r\n const [vehicleQCList, qcItems, qcItemCateg] = await Promise.all([\r\n this.vehicleService.VehicleQualityControlCert.GetUser(\r\n this.props.caseSettingsState.case!.vehicleId\r\n ),\r\n this.appReferentialService.Get(refQcItem!.baseUrl),\r\n this.appReferentialService.Get(refQcItemCateg!.baseUrl)\r\n ]);\r\n\r\n if (vehicleQCList.length === 0) {\r\n qcItems\r\n .filter((item) => item.isActive)\r\n .forEach((qcItem) => {\r\n // const categ = qcItemCateg.find(item=> item.id === (qcItem as QCItem).qcItemCategoryId);\r\n\r\n const newItem = {\r\n id: 0,\r\n vehicleId: this.props.caseSettingsState.case!.vehicleId,\r\n isChecked: false,\r\n isReplaced: false,\r\n qcItemId: qcItem.id,\r\n qcItem: qcItem\r\n } as VehicleQualityControlCert;\r\n\r\n //newItem.qCItem!.qcItemCategory = categ!;\r\n\r\n vehicleQCList.push(newItem);\r\n });\r\n }\r\n\r\n vehicleQCList.forEach((itemQC) => {\r\n const categ = qcItemCateg.find(\r\n (item) => item.id === (itemQC.qcItem as QCItem).qcItemCategoryId\r\n );\r\n itemQC.qcItem!.qcItemCategory = categ!;\r\n });\r\n\r\n this.setState(\r\n {\r\n isLoading: true,\r\n qualityControlItems: vehicleQCList\r\n },\r\n async () => {\r\n this.setState({\r\n isLoading: false\r\n });\r\n }\r\n );\r\n }\r\n\r\n NumberFormatCustom = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n },\r\n currentTarget: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n allowNegative={false}\r\n thousandSeparator={false}\r\n decimalScale={2}\r\n />\r\n );\r\n };\r\n\r\n submitData = async (e: any) => {\r\n try {\r\n this.setState({ executing: true });\r\n\r\n await this.vehicleService.VehicleQualityControlCert.SaveList(this.state.qualityControlItems);\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (ex) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n } finally {\r\n this.setState({\r\n executing: false\r\n });\r\n }\r\n };\r\n\r\n rendeCertificateOfControlForm = () => {\r\n return (\r\n {\r\n this.submitData(e);\r\n }}\r\n >\r\n
\r\n\r\n \r\n {this.translatorService.Tranlate('CASE_COMMENT_SEND', 'Trimite')}\r\n \r\n \r\n );\r\n };\r\n\r\n renderVehicleInfo = () => {\r\n const vehicle = this.props.vehicleState.vehicle!;\r\n if (isNullOrUndefined(vehicle)) {\r\n return;\r\n }\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n {this.translatorService.Tranlate('CERTIFICATE_OF_CONTROL_TITLE', 'Detalii vehicul')}\r\n
\r\n
\r\n
\r\n
{this.translatorService.Tranlate('CERTIFICATE_OF_CONTROL_MAKE', 'Make')}
\r\n
\r\n {this.translatorService.Tranlate('CERTIFICATE_OF_CONTROL_MODEL', 'Model')}\r\n
\r\n
{this.translatorService.Tranlate('CERTIFICATE_OF_CONTROL_VIN', 'VIN')}
\r\n
{this.translatorService.Tranlate('CERTIFICATE_OF_CONTROL_KM', 'Km')}
\r\n
\r\n {this.translatorService.Tranlate(\r\n 'CERTIFICATE_OF_CONTROL_FIRST_REGISTRATION_DATE',\r\n 'Data primei inmatriculari'\r\n )}\r\n
\r\n
\r\n {this.translatorService.Tranlate(\r\n 'CERTIFICATE_OF_CONTROL_PLATE_NUMBER',\r\n 'Nr. inmatriculare'\r\n )}\r\n
\r\n
\r\n {this.translatorService.Tranlate(\r\n 'CERTIFICATE_OF_CONTROL_RADIO_CODE',\r\n 'Nr. cod radio'\r\n )}\r\n
\r\n
\r\n
\r\n
{vehicle!.make!.displayName}
\r\n
{vehicle!.model!.displayName}
\r\n
{vehicle!.vin}
\r\n
{vehicle!.kilometersNr}
\r\n
\r\n {moment\r\n .utc(vehicle!.firstRegistrationDate)\r\n .local()\r\n .format(this.props.dateFormat)}\r\n
\r\n
{vehicle!.plateNumber}
\r\n
{vehicle!.radioCode}
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n };\r\n\r\n handleToggleIsCheckedOption = (e: any, id: number, qcItemId: number) => {\r\n const indexValue = this.state.qualityControlItems.findIndex(\r\n (item) => item.id === id && item.qcItemId === qcItemId\r\n );\r\n const newQualityControlItems = [...this.state.qualityControlItems];\r\n\r\n newQualityControlItems[indexValue].isChecked = e.currentTarget.checked;\r\n newQualityControlItems[indexValue].isReplaced = !e.currentTarget.checked;\r\n\r\n this.setState({\r\n ...this.state,\r\n qualityControlItems: newQualityControlItems\r\n });\r\n };\r\n\r\n handleToggleIsReplacedOption = (e: any, id: number, qcItemId: number) => {\r\n const indexValue = this.state.qualityControlItems.findIndex(\r\n (item) => item.id === id && item.qcItemId === qcItemId\r\n );\r\n const newQualityControlItems = [...this.state.qualityControlItems];\r\n\r\n newQualityControlItems[indexValue].isReplaced = e.currentTarget.checked;\r\n newQualityControlItems[indexValue].isChecked = !e.currentTarget.checked;\r\n\r\n this.setState({\r\n ...this.state,\r\n qualityControlItems: newQualityControlItems\r\n });\r\n };\r\n\r\n renderCertificateOfControlList = () => {\r\n let valuesCategories = [];\r\n valuesCategories = this.state.qualityControlItems\r\n .map((val) => val.qcItem!.qcItemCategory!.displayName)\r\n .filter((v, i, a) => a.indexOf(v) === i);\r\n\r\n return (\r\n
\r\n
{this.renderVehicleInfo()}
\r\n \r\n {valuesCategories.map((val, index) => {\r\n return (\r\n \r\n
\r\n {val}\r\n
\r\n
\r\n
{this.translatorService.Tranlate('CONTROLLED_LABEL', 'Controlat')}
\r\n
{this.translatorService.Tranlate('REPLACED_LABEL', 'Inlocuit')}
\r\n
\r\n \r\n {this.state.qualityControlItems\r\n .filter((item) => item.qcItem!.qcItemCategory!.displayName === val)\r\n .map((val, index) => {\r\n return (\r\n \r\n \r\n \r\n \r\n this.handleToggleIsCheckedOption(e, val.id, val.qcItemId)\r\n }\r\n checked={val.isChecked as any}\r\n // inputProps={{ 'aria-labelledby': labelId }}\r\n />\r\n \r\n this.handleToggleIsReplacedOption(e, val.id, val.qcItemId)\r\n }\r\n checked={val.isReplaced as any}\r\n // inputProps={{ 'aria-labelledby': labelId }}\r\n />\r\n \r\n \r\n );\r\n })}\r\n \r\n
\r\n );\r\n })}\r\n
\r\n \r\n {this.translatorService.Tranlate('SAVE', 'Salveaza')}\r\n \r\n
\r\n );\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.vehicleService = (this.context as AppContext).vehicleService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n
{this.renderCertificateOfControlList()}
\r\n ) : null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalCertificateOfControlFormProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app,\r\n vehicleState: state.vehicle\r\n }),\r\n CaseSettingsActionCreators,\r\n mergeProps\r\n)(withSnackbar(CertificateOfControlForm as any));\r\n","import { Grid, Paper, Slider, TextField, Typography } from '@material-ui/core';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport { DatePicker, MuiPickersUtilsProvider } from '@material-ui/pickers';\r\nimport React, { useMemo, useContext } from 'react';\r\nimport { SelectItem } from '../../interfaces/Radar/SelectItem';\r\nimport moment from 'moment';\r\nimport MomentUtils from '@date-io/moment';\r\nimport { RadarFilters as Filters } from '../../interfaces/Radar/RadarFilters';\r\nimport { useSelector } from 'react-redux';\r\nimport Loader from '../Loader';\r\nimport { ApplicationContext } from '../../context/Contexts';\r\n\r\nconst SLIDER_MIN = 1;\r\nconst SLIDER_MAX = 12;\r\nconst SLIDER_STEP = 1;\r\n\r\ninterface Props {\r\n filters: Filters;\r\n setFilters(filters: Filters): void;\r\n}\r\n\r\nconst RadarFilters: React.FC = ({ filters, setFilters }) => {\r\n const {\r\n app: { language, dateFormat }\r\n } = useSelector((state: any) => state);\r\n\r\n const context = useContext(ApplicationContext);\r\n\r\n const sliderMarks = useMemo(() => {\r\n const result = [];\r\n for (let i = SLIDER_MIN; i <= SLIDER_MAX; i += SLIDER_STEP) {\r\n result.push({\r\n value: i,\r\n label: i.toString()\r\n });\r\n }\r\n\r\n return result;\r\n }, []);\r\n\r\n const makes = useMemo(() => {\r\n if (filters.selectedMakes.length >= 3) {\r\n return [];\r\n }\r\n\r\n const selectedMakesIds = filters.selectedMakes.map(({ id }) => id);\r\n return filters.makes.filter((c) => !selectedMakesIds.includes(c.id));\r\n }, [filters.makes, filters.selectedMakes]);\r\n\r\n const models = useMemo(() => {\r\n if (filters.selectedModels.length >= 3) {\r\n return [];\r\n }\r\n\r\n let filterModels = filters.models;\r\n if (filters.selectedMakes.length) {\r\n const selectedMakeIds = filters.selectedMakes.map(({ id }) => id);\r\n filterModels = filterModels.filter((c) => selectedMakeIds.includes(c.makeId!));\r\n }\r\n\r\n const selectedModelsIds = filters.selectedModels.map(({ id }) => id);\r\n return filterModels.filter((c) => !selectedModelsIds.includes(c.id));\r\n }, [filters.models, filters.selectedModels, filters.selectedMakes]);\r\n\r\n const handleFormChange = (value: any, name: string) => {\r\n if (name === 'selectedMakes') {\r\n if (!value.length) {\r\n return;\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const valueIds = value.map((item: any) => item.id);\r\n\r\n if (!valueIds.includes(filters.selectedMakes[0].id)) {\r\n return;\r\n }\r\n }\r\n\r\n if (name === 'selectedModels') {\r\n if (!value.length) {\r\n return;\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const valueIds = value.map((item: any) => item.id);\r\n\r\n if (!valueIds.includes(filters.selectedModels[0].id)) {\r\n return;\r\n }\r\n }\r\n\r\n setFilters({\r\n ...filters,\r\n [name]: value\r\n });\r\n };\r\n\r\n if (!filters.period) {\r\n return ;\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n handleFormChange(newValue, 'selectedMakes')}\r\n getOptionLabel={(option: SelectItem) => option.name}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n handleFormChange(newValue, 'selectedModels')}\r\n getOptionLabel={(option: SelectItem) => option.name}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n \r\n {\r\n handleFormChange(value, 'firstRegistrationDate');\r\n }}\r\n />\r\n \r\n \r\n \r\n \r\n {context.translatorService.Tranlate('RADAR_PERIOD_FILTER', 'Perioada')}\r\n \r\n handleFormChange(value, 'period')}\r\n valueLabelDisplay=\"on\"\r\n max={SLIDER_MAX}\r\n step={SLIDER_STEP}\r\n min={SLIDER_MIN}\r\n marks={sliderMarks}\r\n track={false}\r\n />\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default RadarFilters;\r\n","import React, { useCallback, useContext, useEffect, useMemo, useState } from 'react';\r\nimport { MapContainer, TileLayer, Marker } from 'react-leaflet';\r\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\r\n// @ts-ignore\r\nimport EnhancedMarker from 'react-leaflet-enhanced-marker';\r\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\r\n// @ts-ignore\r\nimport GeocoderArcGIS from 'geocoder-arcgis';\r\nimport Loader from '../Loader';\r\nimport L from 'leaflet';\r\n\r\nimport 'leaflet/dist/leaflet.css';\r\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\r\n// @ts-ignore\r\nimport icon from 'leaflet/dist/images/marker-icon.png';\r\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\r\n// @ts-ignore\r\nimport iconShadow from 'leaflet/dist/images/marker-shadow.png';\r\nimport { Tooltip } from '@material-ui/core';\r\nimport { ApplicationContext } from '../../context/Contexts';\r\nimport { MarketData } from '../../interfaces/Radar/MarketData';\r\nimport { RadarMapMarker } from '../../interfaces/Radar/RadarMapMarker';\r\n\r\nconst DefaultIcon = L.icon({\r\n iconUrl: icon,\r\n shadowUrl: iconShadow,\r\n iconSize: [25, 41],\r\n iconAnchor: [15, 25]\r\n});\r\n\r\nL.Marker.prototype.options.icon = DefaultIcon;\r\n\r\ninterface CustomMarkerProps {\r\n price: number;\r\n name: string;\r\n selected: boolean;\r\n}\r\nconst CustomMarker: React.FC = ({ price, name, selected }) => {\r\n const markerStyle = {\r\n backgroundColor: selected ? '#00008B' : '#207AC9',\r\n color: 'white',\r\n display: 'flex',\r\n justifyContent: 'center',\r\n width: '80px',\r\n height: '30px',\r\n alignItems: 'center',\r\n borderRadius: '10px'\r\n };\r\n\r\n return (\r\n \r\n
{`${price} EUR`}
\r\n
\r\n );\r\n};\r\n\r\ninterface Props {\r\n filteredMarketData: MarketData[];\r\n selectedMarketData?: MarketData;\r\n setSelectedMarketData(marketData?: MarketData): void;\r\n}\r\n\r\nconst RadarMap: React.FC = ({\r\n filteredMarketData = [],\r\n selectedMarketData,\r\n setSelectedMarketData\r\n}) => {\r\n const [mapMarkers, setMapMarkers] = useState([]);\r\n const [mapLoading, setMapLoading] = useState(false);\r\n\r\n const context = useContext(ApplicationContext);\r\n\r\n const handleMapMarkerClick = useCallback(\r\n (id: string) => {\r\n if (selectedMarketData?.id === id) {\r\n setSelectedMarketData(undefined);\r\n } else {\r\n const item = filteredMarketData.find((item) => item.id === id);\r\n if (item) {\r\n setSelectedMarketData(item);\r\n }\r\n }\r\n },\r\n [filteredMarketData, selectedMarketData, setSelectedMarketData]\r\n );\r\n\r\n useEffect(() => {\r\n const getGeoData = async () => {\r\n setMapLoading(true);\r\n const geocoder = new GeocoderArcGIS();\r\n const markers: RadarMapMarker[] = [];\r\n for (const item of filteredMarketData) {\r\n // TODO read country from organization\r\n const params = {\r\n country: 'ro',\r\n address: `${item.county ? item.county + ',' : ''} ${\r\n item.postalCode ? item.postalCode : ''\r\n }`\r\n };\r\n\r\n try {\r\n const response = await geocoder.findAddressCandidates(params);\r\n\r\n if (response && response.candidates.length) {\r\n markers.push({\r\n price: item.price,\r\n lat: response.candidates[0].location.y,\r\n long: response.candidates[0].location.x,\r\n name: item.name,\r\n id: item.id\r\n });\r\n }\r\n } catch {\r\n continue;\r\n }\r\n }\r\n\r\n setMapMarkers(markers);\r\n setMapLoading(false);\r\n };\r\n\r\n if (filteredMarketData.length) {\r\n getGeoData();\r\n }\r\n }, [context.organizationService, filteredMarketData]);\r\n\r\n if (mapLoading) {\r\n return ;\r\n }\r\n\r\n return (\r\n \r\n \r\n {mapMarkers.map(({ lat, long, price, id, name }, index) => {\r\n return (\r\n <>\r\n \r\n \r\n }\r\n position={[lat, long]}\r\n key={index}\r\n eventHandlers={{\r\n click: () => {\r\n handleMapMarkerClick(id);\r\n }\r\n }}\r\n />\r\n \r\n );\r\n })}\r\n \r\n );\r\n};\r\n\r\nexport default RadarMap;\r\n","export const fuelTypes: { [unit: string]: string } = {\r\n U: 'Benzina',\r\n D: 'Diesel'\r\n};\r\n","import { Card, CardContent, CardMedia, Grid, Paper, Tooltip } from '@material-ui/core';\r\nimport React, { useContext } from 'react';\r\nimport { MarketData } from '../../interfaces/Radar/MarketData';\r\nimport InfoIcon from '@material-ui/icons/Info';\r\nimport { fuelTypes } from './fuelTypes';\r\nimport { ApplicationContext } from '../../context/Contexts';\r\n\r\ninterface Props {\r\n filteredMarketData: MarketData[];\r\n}\r\n\r\nconst RecentAdds: React.FC = ({ filteredMarketData }) => {\r\n const context = useContext(ApplicationContext);\r\n return (\r\n \r\n
\r\n
\r\n {context.translatorService.Tranlate('RADAR_MOST_RECENT_ADS', 'Cele mai recente anunturi')}\r\n
\r\n
\r\n
\r\n \r\n {filteredMarketData.slice(0, 18).map((item) => {\r\n return (\r\n \r\n \r\n \r\n
\r\n
\r\n {item.source}\r\n
\r\n
\r\n {\r\n if (item.addId) {\r\n window.open(item.addId, '_blank');\r\n }\r\n }}\r\n >{`${item.name}, ${item.offeredBy}, ${item.source}`}\r\n {item.description && (\r\n \r\n \r\n \r\n )}\r\n

\r\n {`${item.manufacturerYear}, ${fuelTypes[item.fuelType]},\r\n ${item.kmNo} km${\r\n item.transmissionType ? ', ' + item.transmissionType : ''\r\n }`}\r\n
\r\n {`${item.county}${item.postalCode ? ', ' + item.postalCode : ''}`}\r\n

\r\n
\r\n
{`${item.price} EUR`}
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n })}\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default RecentAdds;\r\n","import { isNil } from 'lodash';\r\nimport React, { useMemo } from 'react';\r\nimport ReactApexChart from 'react-apexcharts';\r\nimport { DonutChartItem } from '../../interfaces/Radar/DonutChartItem';\r\nimport { MarketData } from '../../interfaces/Radar/MarketData';\r\nimport uniqBy from 'lodash/uniqBy';\r\n\r\ninterface Props {\r\n title: string;\r\n property: string;\r\n filteredMarketData: MarketData[];\r\n handleDonutClick(dataIndex?: number): void;\r\n}\r\n\r\nconst RadarDonutChart: React.FC = ({\r\n title,\r\n property,\r\n filteredMarketData,\r\n handleDonutClick\r\n}) => {\r\n const items = useMemo(() => {\r\n const sources = uniqBy(filteredMarketData, property);\r\n\r\n const items: DonutChartItem[] = [];\r\n for (const item of sources) {\r\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\r\n // @ts-ignore\r\n const value = item[property];\r\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\r\n // @ts-ignore\r\n const count = filteredMarketData.filter((x: MarketData) => x[property] === value).length;\r\n\r\n items.push({ id: item.id, name: value, value: count });\r\n }\r\n\r\n return items;\r\n }, [filteredMarketData, property]);\r\n\r\n const series = useMemo(() => {\r\n return items.map((i) => i.value);\r\n }, [items]);\r\n\r\n const options = useMemo(() => {\r\n const labels = items.map((i) => i.name);\r\n return {\r\n chart: {\r\n type: 'donut',\r\n events: {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n dataPointSelection: (event: any, chartContext: any, config: any) => {\r\n if (!isNil(config.dataPointIndex)) {\r\n handleDonutClick(config.dataPointIndex);\r\n }\r\n }\r\n }\r\n },\r\n labels,\r\n legend: {\r\n position: 'bottom'\r\n },\r\n responsive: [\r\n {\r\n breakpoint: 480,\r\n options: {\r\n chart: {\r\n width: 200\r\n },\r\n legend: {\r\n position: 'bottom'\r\n }\r\n }\r\n }\r\n ]\r\n };\r\n }, [handleDonutClick, items]);\r\n\r\n return (\r\n
\r\n
{title}
\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default RadarDonutChart;\r\n","import React, { useMemo, useContext } from 'react';\r\nimport { MarketData } from '../../interfaces/Radar/MarketData';\r\nimport ReactApexChart from 'react-apexcharts';\r\nimport isNil from 'lodash/isNil';\r\nimport { fuelTypes } from './fuelTypes';\r\nimport { ApplicationContext } from '../../context/Contexts';\r\n\r\ninterface Props {\r\n title: string;\r\n filteredMarketData: MarketData[];\r\n currentVehicleMileage?: number;\r\n handleScatterClick(dataIndex?: number): void;\r\n}\r\n\r\nconst ScatterChart: React.FC = ({\r\n title,\r\n filteredMarketData,\r\n currentVehicleMileage,\r\n handleScatterClick\r\n}) => {\r\n const context = useContext(ApplicationContext);\r\n const series = useMemo(() => {\r\n return [\r\n {\r\n name: 'Pret',\r\n data: filteredMarketData.map((item) => [item.kmNo, item.price])\r\n }\r\n ];\r\n }, [filteredMarketData]);\r\n\r\n const options = useMemo(() => {\r\n return {\r\n chart: {\r\n id: 'radarScatterChart',\r\n type: 'scatter',\r\n events: {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n dataPointSelection: (event: any, chartContext: any, config: any) => {\r\n if (!isNil(config.dataPointIndex)) {\r\n handleScatterClick(config.dataPointIndex);\r\n }\r\n }\r\n },\r\n zoom: {\r\n enabled: true\r\n }\r\n },\r\n tooltip: {\r\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\r\n // @ts-ignore\r\n custom: function ({ series, seriesIndex, dataPointIndex }) {\r\n const item = filteredMarketData[dataPointIndex];\r\n return `
\r\n
\r\n \r\n
\r\n
\r\n
${item.name}, ${item.offeredBy}, ${item.source}
\r\n

${item.manufacturerYear}, ${fuelTypes[item.fuelType]}, ${item.kmNo} km${\r\n item.transmissionType ? ', ' + item.transmissionType : ''\r\n }\r\n
\r\n ${item.county}${item.postalCode ? ', ' + item.postalCode : ''}\r\n

\r\n
${item.price} EUR
\r\n
\r\n
`;\r\n }\r\n },\r\n annotations: {\r\n xaxis: [\r\n {\r\n x: currentVehicleMileage,\r\n borderColor: '#775DD0',\r\n label: {\r\n style: {\r\n color: '#000'\r\n },\r\n text: context.translatorService.Tranlate('RADAR_MY_VEHICLE', 'Vehiculul meu')\r\n }\r\n }\r\n ]\r\n }\r\n };\r\n }, [currentVehicleMileage, filteredMarketData, handleScatterClick]);\r\n\r\n return (\r\n
\r\n
{title}
\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default ScatterChart;\r\n","import React, { useMemo, useRef, useContext } from 'react';\r\nimport { MarketData } from '../../interfaces/Radar/MarketData';\r\nimport isNil from 'lodash/isNil';\r\nimport ReactApexChart from 'react-apexcharts';\r\nimport meanBy from 'lodash/meanBy';\r\nimport minBy from 'lodash/minBy';\r\nimport moment from 'moment';\r\nimport { ApplicationContext } from '../../context/Contexts';\r\n\r\ninterface Props {\r\n title: string;\r\n period: number;\r\n filteredMarketData: MarketData[];\r\n handleLineClick(dataIndex?: number): void;\r\n}\r\nconst RadarLineChart: React.FC = ({\r\n title,\r\n period,\r\n filteredMarketData,\r\n handleLineClick\r\n}) => {\r\n const meanKmArray = useRef([]);\r\n const context = useContext(ApplicationContext);\r\n\r\n const monthMap = useMemo(\r\n () =>\r\n new Map([\r\n ['01', context.translatorService.Tranlate('RADAR_JANUARY', 'Ianuarie')],\r\n ['02', context.translatorService.Tranlate('RADAR_FEBRUARY', 'Februarie')],\r\n ['03', context.translatorService.Tranlate('RADAR_MARCH', 'Martie')],\r\n ['04', context.translatorService.Tranlate('RADAR_APRIL', 'Aprilie')],\r\n ['05', context.translatorService.Tranlate('RADAR_MAY', 'Mai')],\r\n ['06', context.translatorService.Tranlate('RADAR_JUNE', 'Iunie')],\r\n ['07', context.translatorService.Tranlate('RADAR_JULY', 'Iulie')],\r\n ['08', context.translatorService.Tranlate('RADAR_AUGUST', 'August')],\r\n ['09', context.translatorService.Tranlate('RADAR_SEPTEMBER', 'Septembrie')],\r\n ['10', context.translatorService.Tranlate('RADAR_OCTOBER', 'Octombrie')],\r\n ['11', context.translatorService.Tranlate('RADAR_NOVEMBER', 'Noiembrie')],\r\n ['12', context.translatorService.Tranlate('RADAR_DECEMBER', 'Decembrie')]\r\n ]),\r\n [context]\r\n );\r\n\r\n const labels = useMemo(() => {\r\n const dateEnd = moment();\r\n const dateStart = moment().add(-period, 'month');\r\n\r\n const labels: string[] = [];\r\n\r\n while (dateEnd > dateStart || dateStart.format('M') === dateEnd.format('M')) {\r\n const month = dateStart.format('MM');\r\n if (monthMap.has(month)) {\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n labels.push(monthMap.get(month)!);\r\n }\r\n dateStart.add(1, 'month');\r\n }\r\n\r\n return labels;\r\n }, [period, monthMap]);\r\n\r\n const series = useMemo(() => {\r\n const dateEnd = moment();\r\n const dateStart = moment().add(-period, 'month');\r\n\r\n const months: string[] = [];\r\n\r\n while (dateEnd > dateStart || dateStart.format('M') === dateEnd.format('M')) {\r\n const month = dateStart.format('MM');\r\n months.push(month);\r\n dateStart.add(1, 'month');\r\n }\r\n\r\n const dataMin = [];\r\n for (const month of months) {\r\n const results = filteredMarketData.filter((item) => {\r\n return moment(item.addDate, 'YYYY-MM-DD').format('MM') === month;\r\n });\r\n\r\n if (results.length) {\r\n const min = minBy(results, 'price');\r\n if (!isNil(min)) {\r\n dataMin.push(+min.price.toFixed(2));\r\n }\r\n } else {\r\n dataMin.push(null);\r\n }\r\n }\r\n\r\n const dataMed = [];\r\n for (const month of months) {\r\n const results = filteredMarketData.filter((item) => {\r\n return moment(item.addDate, 'YYYY-MM-DD').format('MM') === month;\r\n });\r\n\r\n if (results.length) {\r\n const mean = meanBy(results, 'price');\r\n const meanKm = meanBy(results, 'kmNo');\r\n if (!isNil(mean)) {\r\n dataMed.push(+mean.toFixed(2));\r\n }\r\n if (!isNil(meanKm)) {\r\n meanKmArray.current.push(+meanKm.toFixed(2));\r\n }\r\n } else {\r\n dataMed.push(null);\r\n }\r\n }\r\n\r\n return [\r\n {\r\n name: context.translatorService.Tranlate('RADAR_MINIMUM_PRICE', 'Pret minim'),\r\n data: dataMin\r\n },\r\n {\r\n name: context.translatorService.Tranlate('RADAR_AVERAGE_PRICE', 'Pret mediu'),\r\n data: dataMed\r\n }\r\n ];\r\n }, [filteredMarketData, period, context]);\r\n\r\n const options = useMemo(() => {\r\n return {\r\n chart: {\r\n type: 'line',\r\n events: {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n dataPointSelection: (event: any, chartContext: any, config: any) => {\r\n if (!isNil(config.dataPointIndex)) {\r\n handleLineClick(config.dataPointIndex);\r\n }\r\n }\r\n },\r\n toolbar: {\r\n show: false\r\n }\r\n },\r\n tooltip: {\r\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\r\n // @ts-ignore\r\n custom: function ({ series, seriesIndex, dataPointIndex }) {\r\n const minPriceSeries = series[0].filter((item: any) => item !== null);\r\n const mediumPriceSeries = series[1].filter((item: any) => item !== null);\r\n return `
\r\n

${context.translatorService.Tranlate('RADAR_AVERAGE_PRICE', 'Pret mediu')}: ${\r\n mediumPriceSeries[seriesIndex]\r\n } EUR

\r\n

${context.translatorService.Tranlate('RADAR_MINIMUM_PRICE', 'Pret minim')}: ${\r\n minPriceSeries[seriesIndex]\r\n } EUR

\r\n

${context.translatorService.Tranlate(\r\n 'RADAR_AVERAGE_TURNOVER',\r\n 'Rulaj mediu'\r\n )}: ${meanKmArray.current[seriesIndex]} km

\r\n
`;\r\n }\r\n },\r\n xaxis: {\r\n categories: labels\r\n }\r\n };\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [handleLineClick, labels, filteredMarketData]);\r\n\r\n return (\r\n
\r\n
{title}
\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default RadarLineChart;\r\n","import { RadarState } from '../../interfaces/Radar/RadarState';\r\n\r\nexport const SET_FILTERS = '[RADAR] SET_FILTERS';\r\nexport const SET_SELECTED_MARKET_DATA = '[RADAR] SET_SELECTED_MARKET_DATA';\r\nexport const SET_MARKET_DATA = '[RADAR] SET_MARKET_DATA';\r\nexport const SET_SELECTED_SELLER_TYPE = '[RADAR SET_SELECTED_SELLER_TYPE';\r\nexport const SET_SELECTED_SELLER = '[RADAR] SET_SELECTED_SELLER';\r\nexport const SET_MARKET_DATA_LOADING = '[RADAR] SET_MARKET_DATA_LOADING';\r\nexport const SET_SELECTED_VEHICLE = '[RADAR] SET_SELECTED_VEHICLE';\r\n\r\nexport const radarReducer = (state: RadarState, action: any) => {\r\n switch (action.type) {\r\n case SET_FILTERS:\r\n return { ...state, filters: action.filters };\r\n case SET_SELECTED_MARKET_DATA:\r\n return {\r\n ...state,\r\n selectedMarketData: action.selectedMarketData\r\n ? action.selectedMarketData.id !== state.selectedMarketData?.id\r\n ? action.selectedMarketData\r\n : undefined\r\n : undefined\r\n };\r\n case SET_MARKET_DATA:\r\n return { ...state, marketData: action.marketData };\r\n case SET_SELECTED_SELLER_TYPE:\r\n return {\r\n ...state,\r\n selectedSellerType:\r\n action.selectedSellerType !== state.selectedSellerType\r\n ? action.selectedSellerType\r\n : undefined\r\n };\r\n case SET_SELECTED_SELLER:\r\n return {\r\n ...state,\r\n selectedSeller:\r\n action.selectedSeller !== state.selectedSeller ? action.selectedSeller : undefined\r\n };\r\n case SET_MARKET_DATA_LOADING:\r\n return { ...state, marketDataLoading: action.marketDataLoading };\r\n case SET_SELECTED_VEHICLE:\r\n return { ...state, selectedVehicle: action.selectedVehicle };\r\n default:\r\n return state;\r\n }\r\n};\r\n","import React, { useCallback, useContext, useEffect, useMemo, useReducer, useRef } from 'react';\r\nimport { Grid, Paper } from '@material-ui/core';\r\nimport moment from 'moment';\r\nimport { MarketData } from '../../interfaces/Radar/MarketData';\r\nimport { v4 as uuidv4 } from 'uuid';\r\nimport RadarFilters from './RadarFilters';\r\nimport { ApplicationContext } from '../../context/Contexts';\r\nimport RadarMap from './RadarMap';\r\nimport RecentAdds from './RecentAdds';\r\nimport RadarDonutChart from './RadarDonutChart';\r\nimport RadarScatterChart from './RadarScatterChart';\r\nimport RadarLineChart from './RadarLineChart';\r\nimport noop from 'lodash/noop';\r\nimport Loader from '../Loader';\r\nimport {\r\n radarReducer,\r\n SET_FILTERS,\r\n SET_MARKET_DATA_LOADING,\r\n SET_MARKET_DATA,\r\n SET_SELECTED_MARKET_DATA,\r\n SET_SELECTED_SELLER,\r\n SET_SELECTED_SELLER_TYPE,\r\n SET_SELECTED_VEHICLE\r\n} from './radarReducer';\r\nimport { RadarFilters as Filters } from '../../interfaces/Radar/RadarFilters';\r\nimport ApexCharts from 'apexcharts';\r\nimport isNil from 'lodash/isNil';\r\nimport uniqBy from 'lodash/uniqBy';\r\nimport { Vehicle } from '../../interfaces/Vehicle';\r\ninterface Props {\r\n vehicleId?: number;\r\n}\r\n\r\nconst Radar: React.FC = ({ vehicleId }) => {\r\n const [state, dispatch] = useReducer(radarReducer, {\r\n filters: {\r\n makes: [],\r\n selectedMakes: [],\r\n models: [],\r\n selectedModels: [],\r\n firstRegistrationDate: moment().add(-5, 'year')\r\n },\r\n marketData: [],\r\n marketDataLoading: false\r\n });\r\n\r\n const { filters } = state;\r\n\r\n const selectedDataIndex = useRef();\r\n\r\n const context = useContext(ApplicationContext);\r\n\r\n const filteredMarketData = useMemo(() => {\r\n let result: MarketData[] = state.marketData;\r\n\r\n if (state.selectedSeller) {\r\n result = result.filter((item) => item.source === state.selectedSeller);\r\n }\r\n\r\n if (state.selectedSellerType) {\r\n result = result.filter((item) => item.offeredBy === state.selectedSellerType);\r\n }\r\n\r\n return result;\r\n }, [state.marketData, state.selectedSeller, state.selectedSellerType]);\r\n\r\n const setFilters = useCallback((newFilters: Filters) => {\r\n dispatch({ type: SET_FILTERS, filters: newFilters });\r\n }, []);\r\n\r\n const setMarketDataLoading = useCallback((marketDataLoading: boolean) => {\r\n dispatch({ type: SET_MARKET_DATA_LOADING, marketDataLoading });\r\n }, []);\r\n\r\n const setMarketData = useCallback((marketData: MarketData[]) => {\r\n dispatch({ type: SET_MARKET_DATA, marketData });\r\n }, []);\r\n\r\n const setSelectedSeller = useCallback((selectedSeller?: string) => {\r\n dispatch({ type: SET_SELECTED_SELLER, selectedSeller });\r\n }, []);\r\n\r\n const setSelectedVehicle = useCallback((selectedVehicle?: Vehicle) => {\r\n dispatch({ type: SET_SELECTED_VEHICLE, selectedVehicle });\r\n }, []);\r\n\r\n const setSelectedSellerType = useCallback((selectedSellerType?: string) => {\r\n dispatch({ type: SET_SELECTED_SELLER_TYPE, selectedSellerType });\r\n }, []);\r\n\r\n const handleSelectedSellerDonutClick = useCallback(\r\n (dataIndex?: number) => {\r\n if (!isNil(dataIndex)) {\r\n const data = uniqBy(filteredMarketData, 'source');\r\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\r\n // @ts-ignore\r\n const source = data[dataIndex].source;\r\n if (!isNil(source)) {\r\n setSelectedSeller(source);\r\n }\r\n }\r\n },\r\n [filteredMarketData, setSelectedSeller]\r\n );\r\n\r\n const handleSelectedSellerTypeDonutClick = useCallback(\r\n (dataIndex?: number) => {\r\n if (!isNil(dataIndex)) {\r\n const data = uniqBy(filteredMarketData, 'offeredBy');\r\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\r\n // @ts-ignore\r\n const offeredBy = data[dataIndex].offeredBy;\r\n if (!isNil(offeredBy)) {\r\n setSelectedSellerType(offeredBy);\r\n }\r\n }\r\n },\r\n [filteredMarketData, setSelectedSellerType]\r\n );\r\n\r\n const setSelectedMarketData = useCallback((selectedMarketData: MarketData) => {\r\n dispatch({ type: SET_SELECTED_MARKET_DATA, selectedMarketData });\r\n // if (selectedMarketData) {\r\n // const index = filteredMarketData.findIndex(\r\n // (item: MarketData) => item.id === selectedMarketData?.id\r\n // );\r\n // ApexCharts.exec('radarScatterChart', 'toggleDataPointSelection', 0, index);\r\n // selectedDataIndex.current = index;\r\n // } else {\r\n // ApexCharts.exec(\r\n // 'radarScatterChart',\r\n // 'toggleDataPointSelection',\r\n // 0,\r\n // selectedDataIndex.current\r\n // );\r\n // selectedDataIndex.current = undefined;\r\n // }\r\n }, []);\r\n\r\n const handleScatterClick = useCallback(\r\n (dataIndex?: number) => {\r\n if (!isNil(dataIndex)) {\r\n const selectedMarketData = filteredMarketData[dataIndex];\r\n dispatch({ type: SET_SELECTED_MARKET_DATA, selectedMarketData });\r\n }\r\n },\r\n [filteredMarketData]\r\n );\r\n\r\n useEffect(() => {\r\n const getVehicleFilters = async () => {\r\n const vehicleHistory = true;\r\n const vehicleFilters = await context.vehicleService.GetVehiclesFilters(vehicleHistory);\r\n\r\n let vehicle;\r\n\r\n if (vehicleId) {\r\n vehicle = await context.vehicleService.GetVehicle(vehicleId);\r\n }\r\n\r\n if (\r\n vehicleFilters &&\r\n vehicle &&\r\n vehicle.modelId &&\r\n vehicle.makeId &&\r\n vehicle.make &&\r\n vehicle.model\r\n ) {\r\n setSelectedVehicle(vehicle);\r\n setFilters({\r\n period: 3,\r\n firstRegistrationDate: moment.utc(vehicle.firstRegistrationDate),\r\n makes: vehicleFilters.makeList.map(({ id, displayName }) => {\r\n return {\r\n id,\r\n name: displayName\r\n };\r\n }),\r\n models: vehicleFilters.modelList.map(({ id, displayName, dependencyId }) => {\r\n return {\r\n id,\r\n name: displayName,\r\n makeId: dependencyId || -1\r\n };\r\n }),\r\n selectedMakes: [{ id: vehicle.makeId || -1, name: vehicle.make?.displayName || '' }],\r\n selectedModels: [{ id: +vehicle.modelId || -1, name: vehicle.model?.displayName || '' }]\r\n });\r\n }\r\n };\r\n\r\n getVehicleFilters();\r\n }, [context.vehicleService, setFilters, setSelectedVehicle, vehicleId]);\r\n\r\n useEffect(() => {\r\n const getMarketData = async () => {\r\n setMarketDataLoading(true);\r\n const marketData = await context.vehicleService.GetVehicleMarketData({\r\n make: filters.selectedMakes[0].name,\r\n model: filters.selectedModels[0].name,\r\n registrationDate: filters.firstRegistrationDate.toDate(),\r\n months: filters.period\r\n });\r\n\r\n for (const item of marketData) {\r\n item.id = uuidv4();\r\n }\r\n\r\n if (marketData) {\r\n setMarketData(marketData);\r\n setMarketDataLoading(false);\r\n }\r\n };\r\n if (\r\n filters.makes.length &&\r\n filters.makes.length &&\r\n filters.selectedMakes.length &&\r\n filters.selectedModels.length\r\n ) {\r\n getMarketData();\r\n }\r\n }, [\r\n context.vehicleService,\r\n filters.selectedMakes,\r\n filters.selectedModels,\r\n filters.firstRegistrationDate,\r\n filters.period,\r\n filters.makes.length,\r\n setMarketDataLoading,\r\n setMarketData\r\n ]);\r\n\r\n if (!filters.makes.length && !filters.models.length) {\r\n return ;\r\n }\r\n\r\n return (\r\n
\r\n \r\n {state.marketDataLoading ? (\r\n \r\n ) : !state.marketData.length ? (\r\n \r\n
\r\n {context?.translatorService.Tranlate(\r\n 'NO_RECORDS_TO_DISPLAY',\r\n 'Nu exista date de afisat'\r\n )}\r\n
\r\n
\r\n ) : null}\r\n {!state.marketDataLoading && state.marketData.length ? (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n ) : null}\r\n
\r\n );\r\n};\r\n\r\nexport default Radar;\r\n","import React, { Fragment, useContext, useEffect, useState } from 'react';\r\nimport { Box, Card, CardContent, Dialog, DialogContent, DialogTitle, IconButton, Typography } from '@material-ui/core';\r\nimport { Label } from 'reactstrap';\r\nimport { ApplicationContext } from '../../context/Contexts';\r\nimport { ValuationHistory } from '../../interfaces/Case';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport moment from 'moment';\r\nimport { useAppSelector } from '../../store/configureStore';\r\n\r\nconst CaseValuationHistory = ({ isOpen, close, id }: { isOpen: boolean, close:()=>void, id:string}) => {\r\n const [isLoading, setIsLoading] = React.useState(false);\r\n const context = useContext(ApplicationContext);\r\n const [historyList, setHistoryList] = useState([]);\r\n const caseService = context.caseService;\r\n const translatorService = context.translatorService;\r\n const appUserService = context.appUserService;\r\n const language = useAppSelector((state) => state.app?.language);\r\n const longDateFormat = useAppSelector((state) => state.app?.longDateFormat);\r\n\r\n const fetchHistory = async () => {\r\n setIsLoading(true);\r\n const response = await caseService.GetValuationHistory(Number.parseInt(id))\r\n\r\n if (!response?.length) {\r\n setIsLoading(false)\r\n return\r\n }\r\n const userIds = response.map((item) => item.modifiedBy);\r\n const users = await appUserService.GetUsersInfo(Array.from(new Set(userIds)));\r\n const futureHistoryList = [...response]\r\n \r\n for (let i=0; i< futureHistoryList?.length; i++) {\r\n futureHistoryList[i].updatedByUserFullName = users[i]?.updatedByUserFullName;\r\n futureHistoryList[i].email = users[i]?.email;\r\n }\r\n setHistoryList(futureHistoryList);\r\n setIsLoading(false);\r\n };\r\n\r\n useEffect(()=>{\r\n fetchHistory();\r\n },[])\r\n\r\n const showHistory = () => {\r\n if (historyList.length === 0) {\r\n return (\r\n \r\n {translatorService.Tranlate('TARIFF_EDIT_LABOR_TAB_NO_DATA', 'Nu exista date de afisat!')}\r\n \r\n );\r\n }\r\n\r\n const labelStyle = {\r\n fontSize: '0.8rem !important',\r\n fontWeight: '500',\r\n padding: '0px',\r\n margin: '0px 6px 0px 0px'\r\n };\r\n const priceStyle = {\r\n fontSize: '0.8rem',\r\n fontWeight: '600',\r\n display: 'flex',\r\n alignItems: 'center'\r\n };\r\n const boxStyle = {\r\n fontSize: '0.8rem',\r\n display: 'flex',\r\n alignItems: 'center'\r\n };\r\n\r\n return historyList.map((item, index) => (\r\n
\r\n
\r\n
\r\n \r\n \r\n {item.updatedByUserFullName + ' (' + item.email + ')'}\r\n \r\n \r\n {moment\r\n .utc(item.date)\r\n .local()\r\n .format(longDateFormat || 'DD/MM/YYYY HH:mm')}\r\n \r\n \r\n\r\n \r\n {index === 0 ? (\r\n \r\n \r\n \r\n {item.priceAsNew ? item.priceAsNew.toFixed(2) : 0} €\r\n \r\n \r\n ) : null}\r\n\r\n \r\n \r\n \r\n {item.tradeInPrice ? item.tradeInPrice.toFixed(2) : 0} €\r\n \r\n \r\n\r\n \r\n \r\n \r\n {item.offerPrice ? item.offerPrice.toFixed(2) : 0} €\r\n \r\n \r\n\r\n \r\n \r\n \r\n {item.retailPrice ? item.retailPrice.toFixed(2) : 0} €\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n ));\r\n };\r\n return (\r\n \r\n \r\n \r\n {translatorService.Tranlate('CASE_CALCULATION_EVALUATION_HISTORY', 'Istoric Evaluari')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n {!isLoading ? (\r\n \r\n \r\n \r\n
\r\n
\r\n {' '}\r\n {showHistory()}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n ) : null}\r\n
\r\n
\r\n \r\n );\r\n};\r\n\r\nexport default CaseValuationHistory;\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, CaseSettingsState, AppState } from '../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { Grid, Button } from '@material-ui/core';\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { isNullOrUndefined } from 'util';\r\nimport { CaseClient, CaseRequest } from '../../interfaces/Case';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport { IReferentialService } from '../../services/Interfaces/IReferentialService';\r\nimport moment from 'moment';\r\nimport { IAppUserService } from '../../services/Interfaces/IAppUserService';\r\nimport FileSaver from 'file-saver';\r\nimport { IVehicleService } from '../../services/Interfaces/IVehicleService';\r\nimport * as R from 'ramda';\r\n\r\ninterface ICaseDetailsCaseRequestsState {\r\n caseRequests: CaseRequest[];\r\n isLoading: boolean;\r\n clientData: CaseClient;\r\n}\r\n\r\nexport interface ExternalCaseDetailsCaseRequestsProps {\r\n formId: number;\r\n caseRequests: CaseRequest[] | null;\r\n carfixOfferComments: boolean;\r\n}\r\n\r\ntype ICaseDetailsCaseRequestsProps = {\r\n caseSettingsState: CaseSettingsState;\r\n appState: AppState;\r\n} & AppState &\r\n ExternalCaseDetailsCaseRequestsProps &\r\n ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass CaseDetailsCaseRequests extends React.PureComponent<\r\n ICaseDetailsCaseRequestsProps,\r\n ICaseDetailsCaseRequestsState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private appUserService!: IAppUserService;\r\n private caseService!: ICaseService;\r\n private vehicleService!: IVehicleService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n state = {\r\n caseRequests: [],\r\n isLoading: false,\r\n clientData: {\r\n id: 0,\r\n caseId: this.props.caseSettingsState.case!.id,\r\n caseSectionStepFormId: 0,\r\n clientId: 0,\r\n pin: '',\r\n companyNumber: '',\r\n companyName: '',\r\n gdprAgreement: true,\r\n address: '',\r\n city: null,\r\n region: null,\r\n district: null,\r\n bankAccount: '',\r\n email: '',\r\n phone: ''\r\n } as CaseClient\r\n } as ICaseDetailsCaseRequestsState;\r\n\r\n public componentDidMount() {\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (Number.isNaN(caseId)) {\r\n return;\r\n }\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadCaseRequests();\r\n }\r\n );\r\n }\r\n\r\n loadCaseRequests = async () => {\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (Number.isNaN(caseId)) {\r\n return;\r\n }\r\n\r\n const casee = this.props.caseSettingsState.case;\r\n let caseClient = this.state.clientData;\r\n if (!R.isNil(casee!.caseClient)) {\r\n caseClient = casee!.caseClient;\r\n }\r\n\r\n let caseRequests = this.props.caseRequests;\r\n\r\n if (caseRequests == null) {\r\n caseRequests = await this.caseService.GetCaseRequests(caseId, this.props.formId);\r\n\r\n const userIds = caseRequests.map((item) => item.userId);\r\n userIds.push(...caseRequests.map((item) => item.userId));\r\n\r\n const users = await this.appUserService.GetUsersInfo(Array.from(new Set(userIds)));\r\n\r\n for (const i of caseRequests) {\r\n const user = users.find((u) => u.id === i.userId);\r\n i.user = isNullOrUndefined(user) ? null : user;\r\n }\r\n }\r\n\r\n this.setState({\r\n isLoading: false,\r\n caseRequests: caseRequests.sort(function (a: any, b: any) {\r\n return b.date - a.date;\r\n }),\r\n clientData: caseClient\r\n });\r\n };\r\n\r\n downloadFile = async (fileName: string, origFileName: string) => {\r\n const fileBlob = await this.caseService.GetCaseAttachment(fileName);\r\n FileSaver.saveAs(fileBlob, origFileName);\r\n };\r\n\r\n downloadVehicleCostFile = async (fileName: string, origFileName: string) => {\r\n const fileBlob = await this.vehicleService.GetVehicleCostAttachment(fileName);\r\n FileSaver.saveAs(fileBlob, origFileName);\r\n };\r\n\r\n showTimeline = () => {\r\n const requests = this.state.caseRequests;\r\n\r\n if (requests.length === 0) {\r\n return null;\r\n }\r\n return requests.map((request, index) => (\r\n
\r\n
\r\n
\r\n

\r\n {moment.utc(request.date).local().toDate().toLocaleString(this.props.language) +\r\n ' (' +\r\n (!this.props.carfixOfferComments ? request.user!.userName : this.state.clientData.email ?? request.user!.userName) +\r\n ')'}{' '}\r\n

\r\n

\r\n {request.to !== null ? (\r\n \r\n {' '}\r\n {request.to} - {request.subject}\r\n \r\n ) : (\r\n ''\r\n )}\r\n

\r\n {\r\n this.props.carfixOfferComments ? (\r\n index === 0 ? (\r\n

\r\n

\r\n

\r\n ) : (\r\n

\r\n

\r\n

\r\n )\r\n ) : (\r\n

\r\n

\r\n

\r\n )\r\n }\r\n\r\n {request.isVehicleCost == true ? (\r\n

\r\n {request.costType?.name}\r\n

\r\n ) : (\r\n ''\r\n )}\r\n {request.isVehicleCost == true ? (\r\n

\r\n \r\n {request.secondValue +\r\n ' ' +\r\n request.secondCurrency +\r\n ' (' +\r\n request.value +\r\n ' ' +\r\n request.currency +\r\n ')'}\r\n \r\n

\r\n ) : (\r\n ''\r\n )}\r\n {this.renderAttachmentBox(request)}\r\n
\r\n
\r\n ));\r\n };\r\n\r\n renderAttachmentBox = (caseRequest: CaseRequest) => {\r\n if (this.props.caseSettingsState.caseSettings!.workflow.isPrcIntegration && this.props.appState.appUser!.organization!.organizationType!.hideOtherAttachments) {\r\n return null;\r\n }\r\n \r\n return (\r\n \r\n \r\n {caseRequest.attachments.length !== 0\r\n ? caseRequest.attachments.map((attach, index) => {\r\n return (\r\n
\r\n
\r\n \r\n caseRequest.isVehicleCost\r\n ? this.downloadVehicleCostFile(attach.fileName, attach.originalFileName)\r\n : this.downloadFile(attach.fileName, attach.originalFileName)\r\n }\r\n >\r\n {attach.originalFileName}\r\n \r\n
\r\n
\r\n );\r\n })\r\n : null}\r\n
\r\n
\r\n );\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n this.appUserService = (this.context as AppContext).appUserService;\r\n this.vehicleService = (this.context as AppContext).vehicleService;\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading && this.state.caseRequests.length !== 0 ? (\r\n
\r\n
{this.showTimeline()}
\r\n
\r\n ) : null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalCaseDetailsCaseRequestsProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app\r\n }),\r\n null,\r\n mergeProps\r\n)(withSnackbar(CaseDetailsCaseRequests as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n ApplicationState,\r\n CaseSettingsState,\r\n AppState,\r\n CaseSettingsActionCreators,\r\n VehicleState\r\n} from '../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport {\r\n Button,\r\n IconButton,\r\n Dialog,\r\n DialogTitle,\r\n Typography,\r\n DialogContent,\r\n Divider,\r\n Menu,\r\n MenuItem,\r\n Grid,\r\n DialogActions,\r\n Tooltip,\r\n Box,\r\n Modal,\r\n DialogContentText\r\n} from '@material-ui/core';\r\nimport { Label } from 'reactstrap';\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport {\r\n Workflow,\r\n WorkflowCalculation,\r\n WorkflowFormAction,\r\n WorkflowFormReport,\r\n WorkflowOptimization,\r\n WorkflowPartner,\r\n WorkflowSectionStep,\r\n WorkflowSectionStepForm,\r\n WorkflowSupplier\r\n} from '../../interfaces/Workflow';\r\nimport { isNullOrUndefined } from 'util';\r\nimport { CarfixAlternativeCalculationRequest, CarfixAlternativeCalculationResponse, CaseAttachment, CaseCalculationHistory, CaseCalculationPart, CaseRequest, CaseStatusHistory, ChangeCaseStatusRequest, ClaimServiceAlternativeCalculationRequest, ClaimServiceCalculationRequest, ClaimServiceCalculationResponse, ManipulationTariffPercentResponse, PartsHistoryInterogationRequest, SendAlternativeCalculationRequest, SendAlternativeCalculationResponse, TariffPercentRequest, TariffPercentResponse } from '../../interfaces/Case';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport { IReferentialService } from '../../services/Interfaces/IReferentialService';\r\nimport Referentials from '../../helpers/Referentials.json';\r\nimport {\r\n ReferentialCode,\r\n CalculationTypeCode,\r\n ParametreCode,\r\n ReportTypeCode,\r\n WorflowEditableReport,\r\n OrderStatusCode,\r\n CaseStatusCodeEnum,\r\n CalculationSectionCodeEnum,\r\n WorkflowFormActionTypeCode,\r\n AttachmentTypeCode,\r\n OrganizationTypeCode,\r\n TariffTypeGroupCodeEnum,\r\n LanguageCode,\r\n nonStockCheckedOERoles\r\n} from '../../helpers/Constants';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport MUIDataTable, {\r\n MUIDataTableColumnOptions,\r\n SelectableRows,\r\n MUIDataTableMeta\r\n} from 'mui-datatables';\r\nimport moment from 'moment';\r\nimport { AppUser } from '../../interfaces/AppUser';\r\nimport { MUITranslations } from '../../helpers/MUITableTranslations';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport CaseDetailsCaseTabCalculationDetails2 from './CaseDetailsCaseTabCalculationDetails2';\r\nimport CaseDetailsAlternativeCalculationDetails from './CaseDetailsAlternativeCalculationDetails';\r\nimport CaseDetailsValuation from './CaseDetailsValuation';\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport CaseDetailsCaseTabCompareCalculations from './CaseDetailsCaseTabCompareCalculations';\r\nimport { CalculationRequest, CalculationResponse } from '../../interfaces/GtService';\r\nimport FileSaver from 'file-saver';\r\nimport { IAppUserService } from '../../services/Interfaces/IAppUserService';\r\nimport { FormHelpers } from '../../helpers/forms/FormHelpers';\r\nimport { IReportsService } from '../../services/Interfaces/IReportsService';\r\nimport { ReportParameter } from '../../interfaces/Reports';\r\nimport CertificateOfControl from '../vehicles/CertificateOfControl';\r\nimport Radar from '../radar/Radar';\r\nimport { Utils } from '../../helpers/Utils';\r\nimport { CaseTypeCode } from '../../helpers/Constants';\r\nimport _, { forEach } from 'lodash';\r\nimport { IOrderService } from '../../services/Interfaces/IOrderService';\r\nimport { Order, PartToBeOrdered } from '../../interfaces/Order';\r\nimport { IWorkflowService } from '../../services/Interfaces/IWorkflowService';\r\nimport * as R from 'ramda';\r\nimport { MuiThemeProvider, createMuiTheme } from '@material-ui/core';\r\nimport { IVehicleService } from '../../services/Interfaces/IVehicleService';\r\nimport CaseValuationHistory from './CaseValuationHistory';\r\nimport CaseDetailsCaseRequests from './CaseDetailsCaseRequests';\r\nimport { ValidatorForm } from 'react-material-ui-form-validator';\r\nimport DropdownTreeSelect from 'react-dropdown-tree-select';\r\nimport { ITariffService } from '../../services/Interfaces/ITariffService';\r\nimport ArrowBackTwoToneIcon from '@material-ui/icons/ArrowBackTwoTone';\r\nimport GetAppIcon from '@material-ui/icons/GetApp';\r\nimport { VehicleHelper } from '../../helpers/VehicleHelper';\r\n\r\ninterface ICaseDetailsCaseTabCalculationsFormState {\r\n caseCalculationHistory: CaseCalculationHistory[];\r\n caseCalculationHistoryCopy: CaseCalculationHistory[];\r\n caseCalculationActionTypeList: IReferential[];\r\n workflowReports: WorkflowFormReport[];\r\n WorkflowOptimization: WorkflowOptimization[];\r\n calculationSectionList: IReferential[];\r\n isLoading: boolean;\r\n isDialogOpen: boolean;\r\n calculationHistoryIds: number[];\r\n openMenuItem: any | null;\r\n disableButtonForMoreThenOneRowChecked: boolean;\r\n disableButtonForMoreThenTwoRowsChecked: boolean;\r\n selectedCalculationButton: string | null;\r\n rowsSelected: any[];\r\n modified: boolean;\r\n isDialogModifiedOpen: boolean;\r\n isDialogAlternativeCalculationOpen: boolean;\r\n isDialogQualityControlOpen: boolean;\r\n isDialogRadarOpen: boolean;\r\n isValuationOpen: boolean;\r\n maxDeliveryTime: number;\r\n tmlEditable: boolean;\r\n workflowCalculation: WorkflowCalculation | null;\r\n hasRights: boolean;\r\n executing: boolean;\r\n orderList: Order[];\r\n unorderedParts: PartToBeOrdered[];\r\n caseStatuses: IReferential[];\r\n partsForFirstCalculation: CaseCalculationPart[];\r\n wfTransitionStepAction: WorkflowFormAction | null;\r\n insurerList: IReferential[];\r\n manipulationTariff: ManipulationTariffPercentResponse;\r\n serviceId: number | null;\r\n discretionaryPriceDealer?: number;\r\n discretionaryPriceEmployee?: number;\r\n accoutingValue?: number;\r\n showHistoryModal: boolean;\r\n additionTariff: TariffPercentResponse;\r\n discountTariff: TariffPercentResponse;\r\n caseRequests: CaseRequest[];\r\n packageCalculationId: number | null;\r\n ownerTariffPartner: WorkflowPartner | null;\r\n isMultipleTariffDialogOpen: boolean;\r\n selectedCalculationTypeId: number | null;\r\n tariffBranches: TariffBranch[];\r\n selectedTariffBranch: TariffBranch | null;\r\n isOwnTariffLoading: boolean;\r\n lastServiceCalculation: CaseCalculationHistory | null;\r\n isClientCommentOpen: boolean;\r\n orginalCalculationTypeId: number | null;\r\n caseStatusHistory: CaseStatusHistory[];\r\n backButtonDisabled: boolean;\r\n attachType: IReferential;\r\n nonStockSuppliers: WorkflowSupplier[];\r\n}\r\nexport interface ExternalCaseDetailsCaseTabCalculationsFormProps {\r\n stepFormId: number;\r\n workflowForm: WorkflowSectionStepForm;\r\n}\r\n\r\ninterface TariffBranch {\r\n id: number;\r\n ownerId: number;\r\n tariffName: string;\r\n partnerId: number;\r\n children: TariffBranch[];\r\n path: string | null;\r\n label: string;\r\n checked: boolean | null;\r\n}\r\n\r\ntype ICaseDetailsCaseTabCalculationsFormProps = ExternalCaseDetailsCaseTabCalculationsFormProps & {\r\n caseSettingsState: CaseSettingsState;\r\n vehicleState: VehicleState;\r\n appState: AppState;\r\n} & typeof CaseSettingsActionCreators &\r\n ProviderContext &\r\n RouteComponentProps<{ id: string; calcId: string | undefined; formId: string | undefined }>;\r\n\r\nclass CaseDetailsCaseTabCalculationsForm extends React.PureComponent<\r\n ICaseDetailsCaseTabCalculationsFormProps,\r\n ICaseDetailsCaseTabCalculationsFormState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private caseService!: ICaseService;\r\n private reportsService!: IReportsService;\r\n private appReferentialService!: IReferentialService;\r\n private appUserService!: IAppUserService;\r\n private orderService!: IOrderService;\r\n private vehicleService!: IVehicleService;\r\n private workflowService!: IWorkflowService;\r\n private tariffService!: ITariffService;\r\n private ACTION_COMPARE = 'COMPARE';\r\n private ACTION_GT_VAL = 'GT_VAL';\r\n private RADAR = 'RADAR';\r\n private ACTION_INSURER_CALCULATION = 'INSURER_CALCULATION';\r\n private ACTION_BACK_BUTTON = 'BACK_BUTTON';\r\n\r\n static contextType = ApplicationContext;\r\n state = {\r\n caseCalculationHistory: [],\r\n caseCalculationHistoryCopy: [],\r\n caseCalculationActionTypeList: [],\r\n workflowReports: [],\r\n WorkflowOptimization: [],\r\n calculationSectionList: [],\r\n isLoading: true,\r\n isDialogOpen: false,\r\n calculationHistoryIds: [],\r\n openMenuItem: null,\r\n disableButtonForMoreThenOneRowChecked: true,\r\n disableButtonForMoreThenTwoRowsChecked: true,\r\n rowsSelected: [],\r\n selectedCalculationButton: null,\r\n modified: false,\r\n isDialogModifiedOpen: false,\r\n isValuationOpen: false,\r\n isDialogAlternativeCalculationOpen: false,\r\n isDialogQualityControlOpen: false,\r\n isDialogRadarOpen: false,\r\n maxDeliveryTime: 0,\r\n tmlEditable: false,\r\n workflowCalculation: null,\r\n hasRights: false,\r\n executing: false,\r\n orderList: [],\r\n unorderedParts: [],\r\n caseStatuses: [],\r\n partsForFirstCalculation: [],\r\n wfTransitionStepAction: null,\r\n insurerList: [],\r\n discretionaryPriceDealer: 0,\r\n discretionaryPriceEmployee: 0,\r\n accoutingValue: 0,\r\n showHistoryModal: false,\r\n manipulationTariff: {\r\n id: 0,\r\n value: 0\r\n } as ManipulationTariffPercentResponse,\r\n serviceId: null,\r\n additionTariff: {\r\n id: 0,\r\n value: 0\r\n } as TariffPercentResponse,\r\n discountTariff: {\r\n id: 0,\r\n value: 0\r\n } as TariffPercentResponse,\r\n caseRequests: [],\r\n packageCalculationId: null,\r\n ownerTariffPartner: null,\r\n isMultipleTariffDialogOpen: false,\r\n selectedCalculationTypeId: null,\r\n tariffBranches: [],\r\n selectedTariffBranch: null,\r\n isOwnTariffLoading: false,\r\n lastServiceCalculation: null,\r\n isClientCommentOpen: false,\r\n orginalCalculationTypeId: null,\r\n caseStatusHistory: [],\r\n backButtonDisabled: false,\r\n attachType: {} as IReferential,\r\n nonStockSuppliers: []\r\n } as ICaseDetailsCaseTabCalculationsFormState;\r\n\r\n public async componentDidMount() {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (isNullOrUndefined(caseSettings) || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n\r\n if (\r\n this.props.match.url.toLowerCase().endsWith('callback') &&\r\n !isNullOrUndefined(this.props.match.params.calcId)\r\n ) {\r\n await this.caseService.UpdateCalculationCallback(\r\n Number.parseInt(this.props.match.params.calcId),\r\n this.props.caseSettingsState.caseSettings!.workflow.id,\r\n this.props.caseSettingsState.caseSettings!.workflow.organizationOwnerId\r\n );\r\n\r\n this.caseService.UpdateCalculationPdfCallback(\r\n Number.parseInt(this.props.match.params.calcId),\r\n this.props.caseSettingsState.caseSettings!.workflow.id,\r\n this.props.caseSettingsState.caseSettings!.workflow.organizationOwnerId\r\n );\r\n\r\n this.props.history.push({\r\n pathname: `/cases/${caseId}/${this.props.match.params.formId}` //this.props.location.pathname.replace('/callback','')\r\n });\r\n return;\r\n }\r\n\r\n await this.loadData();\r\n }\r\n\r\n loadData = async () => {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (isNullOrUndefined(caseSettings) || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n let priceEmployee = 0;\r\n let priceDealer = 0;\r\n let accountingVal = 0;\r\n\r\n if (this.props.appState?.appUser?.userRole?.code === 'MAVO_ADMIN') {\r\n const vehicleAdvert = await this.vehicleService?.GetVehicleAdvert(\r\n this.props.caseSettingsState.case!.vehicleId,\r\n caseId\r\n );\r\n\r\n if (vehicleAdvert) {\r\n priceDealer = vehicleAdvert?.priceWithVat - 0.1 * vehicleAdvert?.priceWithVat;\r\n priceEmployee = vehicleAdvert?.priceWithVat - 0.05 * vehicleAdvert?.priceWithVat;\r\n }\r\n\r\n const vehicle = await this.vehicleService.GetVehicle(\r\n this.props.caseSettingsState.case!.vehicleId as any\r\n );\r\n if (vehicle?.accountingValue) {\r\n accountingVal = vehicle.accountingValue;\r\n }\r\n }\r\n\r\n const hasRights = FormHelpers.HasRights(\r\n this.props.workflowForm.workflowFormPermissions,\r\n this.props.appState.appUser!,\r\n this.props.caseSettingsState.case!.caseStatus.caseStatusId\r\n );\r\n\r\n const refCalculations = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.CalculationType\r\n );\r\n const refCaseStatus = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.CaseStatus\r\n );\r\n const refReport = Referentials.referential.find((item) => item.code === ReferentialCode.Report);\r\n const refOptimization = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.OptimizationType\r\n );\r\n const refInsurer = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.Insurer\r\n );\r\n const refAttachmentType = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.AttachmentType\r\n );\r\n\r\n const ref = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.AttachmentType\r\n );\r\n\r\n const caseCalculationActionTypeList = [] as IReferential[];\r\n // eslint-disable-next-line prefer-const\r\n let [caseCalculations, caseStatuses, calculationTypeList, insurerList, attachmentType, calculationSections, ownerTariffPartner, caseStatusHistory, attachmentTypes, nonStockSuppliers] =\r\n await Promise.all([\r\n this.caseService.GetCaseCalculationHistories(caseId),\r\n this.appReferentialService.Get(refCaseStatus!.baseUrl),\r\n // this.appReferentialService.Get(refReport!.baseUrl),\r\n // this.appReferentialService.Get(refOptimization!.baseUrl),\r\n this.appReferentialService.Get(refCalculations!.baseUrl),\r\n this.appReferentialService.Get(refInsurer!.baseUrl),\r\n this.caseService.GetAttachmentTypeByCode(AttachmentTypeCode.OTHER),\r\n this.caseService.GetCalculationSections(),\r\n this.props.caseSettingsState.caseSettings!.workflow.isPrcIntegration ? this.workflowService.GetOwnerTariffPartner(this.props.caseSettingsState.caseSettings!.workflow.id) : null,\r\n this.props.caseSettingsState?.caseSettings!.workflow?.isCarfixIntegration \r\n ? this.caseService.GetCaseStatusHistory(this.props.caseSettingsState.case!.id) \r\n : [],\r\n this.appReferentialService.Get(ref!.baseUrl),\r\n this.workflowService.GetNonStockSuppliers(this.props.caseSettingsState.caseSettings!.workflow.id)\r\n ]);\r\n\r\n const caseCalculationCopy = _.sortBy(_.cloneDeep(caseCalculations), 'date').reverse();\r\n const packageCalculation = caseCalculationCopy.find((item) => item.maintenancePackageId !== null);\r\n\r\n const [unorderedParts, orderList] = await Promise.all([\r\n this.orderService.GetPartsToBeOrdered(this.props.caseSettingsState.case!.id),\r\n this.orderService.GetOrdersWithParts(this.props.caseSettingsState.case!.id)\r\n ]);\r\n\r\n let manipulationTariff = {\r\n id: 0,\r\n value: 0\r\n } as ManipulationTariffPercentResponse;\r\n\r\n const form = this.getWorkflowForm(this.props.stepFormId);\r\n const wfStepActions = this.props.workflowForm.workflowFormActions;\r\n const wfTransitionStepAction =\r\n wfStepActions.find(\r\n (item) =>\r\n item.actionType?.code === WorkflowFormActionTypeCode.STATUS_TRANSITION &&\r\n this.props.caseSettingsState.case!.caseStatus.caseStatusId === item.fromStatusId\r\n ) || (null);\r\n\r\n const workflowCalculation = FormHelpers.GetCalculation(\r\n form!.workflowCalculations,\r\n this.props.appState.appUser!,\r\n this.props.caseSettingsState.case!.caseStatus.caseStatusId\r\n );\r\n\r\n const currentOrganizationId = this.props.appState.appUser!.organizationId;\r\n\r\n if (this.props.appState.appUser!.organization!.organizationType!.hideAlternative) {\r\n caseCalculations = _.cloneDeep(_.filter(caseCalculations, function (caseCalculation) {\r\n return caseCalculation.calculationType.code == CalculationTypeCode.ORG || (\r\n caseCalculation.calculationType.code == CalculationTypeCode.ALT &&\r\n caseCalculation.partsOrganizationId == currentOrganizationId\r\n );\r\n }));\r\n }\r\n\r\n if (this.props.appState.appUser!.organization!.organizationType!.hideInsurerCalculation) {\r\n console.log('before', caseCalculations);\r\n caseCalculations = _.cloneDeep(_.filter(caseCalculations, function (caseCalculation) {\r\n return (\r\n (caseCalculation.calculationType.code == CalculationTypeCode.ORG && !caseCalculation.insurerCalculation)\r\n || (\r\n caseCalculation.calculationType.code == CalculationTypeCode.ALT &&\r\n caseCalculation.partsOrganizationId == currentOrganizationId\r\n )\r\n );\r\n }));\r\n console.log('after', caseCalculations);\r\n }\r\n\r\n caseCalculations = _.sortBy(caseCalculations, 'date').reverse();\r\n\r\n let serviceId: number | null = null;\r\n let lastServiceCalculation: CaseCalculationHistory | null = null;\r\n // const workflowOptimization = form!.workflowFormOptimizations;\r\n if (caseCalculations.length !== 0) {\r\n const users = await this.appUserService.GetUsersInfo(\r\n Array.from(new Set(caseCalculations.map((item) => item.userId)))\r\n );\r\n caseCalculations.forEach((calc) => {\r\n calc.user = users.find((item) => item.id === calc.userId)!;\r\n });\r\n\r\n const serviceCalculation = _.find(caseCalculations, function (calculation) {\r\n return calculation.user!.organization!.organizationTypeCode === OrganizationTypeCode.REP && !calculation.insurerCalculation;\r\n });\r\n\r\n console.log('serviceCalculation', serviceCalculation);\r\n serviceId = serviceCalculation ? serviceCalculation!.organizationId : null;\r\n lastServiceCalculation = serviceCalculation ? serviceCalculation : null;\r\n\r\n if (this.props.caseSettingsState.caseSettings!.workflow.isPrcIntegration) {\r\n manipulationTariff = await this.caseService.GetManipulationPercent({\r\n caseId: this.props.caseSettingsState.case!.id,\r\n formId: this.props.stepFormId,\r\n vehicleId: this.props.caseSettingsState.case!.vehicleId,\r\n workflowId: this.props.caseSettingsState.caseSettings!.workflow.id,\r\n workflowOrganizationOwnerId: this.props.caseSettingsState.caseSettings!.workflow.organizationOwnerId,\r\n organizationId: this.props.appState.appUser!.organizationId,\r\n organizationName: this.props.appState.appUser!.organization!.name,\r\n takeOrganizationTariff: this.props.appState.appUser!.organization!.organizationType!.takeOrganizationTariff,\r\n insurerId: null,\r\n serviceId: serviceId,\r\n ownTariffId: null\r\n } as CalculationRequest);\r\n }\r\n }\r\n\r\n const [additionTariff, discountTariff, caseRequests] = await Promise.all([\r\n this.caseService.GetTariffPercent({\r\n workflowId: this.props.caseSettingsState.caseSettings!.workflow.id,\r\n insurerId: this.getInsurerIdInfo(insurerList),\r\n tariffCode: TariffTypeGroupCodeEnum.ADD_PARTS\r\n } as TariffPercentRequest),\r\n this.caseService.GetTariffPercent({\r\n workflowId: this.props.caseSettingsState.caseSettings!.workflow.id,\r\n insurerId: this.getInsurerIdInfo(insurerList),\r\n tariffCode: TariffTypeGroupCodeEnum.PSE_ALT\r\n } as TariffPercentRequest),\r\n !isNullOrUndefined(workflowCalculation) && workflowCalculation.viewClientCommentsHistory ? this.caseService.GetCaseRequests(caseId, this.props.workflowForm.id) : []\r\n ]);\r\n\r\n if (!isNullOrUndefined(workflowCalculation)) {\r\n if (workflowCalculation.originalCalculation) {\r\n caseCalculationActionTypeList.push(calculationTypeList[0]);\r\n }\r\n if (workflowCalculation.alternativeCalculation) {\r\n caseCalculationActionTypeList.push(calculationTypeList[1]);\r\n }\r\n if (workflowCalculation.gtValuation) {\r\n caseCalculationActionTypeList.push({\r\n id: 3,\r\n displayName: this.translatorService.Tranlate('CASE_CALCULATION_MARKET_VALUE', 'Market Value'),\r\n code: this.ACTION_GT_VAL\r\n } as IReferential);\r\n }\r\n if (workflowCalculation.compare) {\r\n caseCalculationActionTypeList.push({\r\n id: 4,\r\n displayName: this.translatorService.Tranlate('CASE_CALCULATION_FORM_COMPARE', 'Compara'),\r\n code: this.ACTION_COMPARE\r\n } as IReferential);\r\n }\r\n if (workflowCalculation.radar) {\r\n caseCalculationActionTypeList.push({\r\n id: 5,\r\n displayName: this.translatorService.Tranlate(\r\n 'WORKFLOW_CALCULATION_TAB_RADAR_LABEL',\r\n 'Radar'\r\n ),\r\n code: this.RADAR\r\n } as IReferential);\r\n }\r\n\r\n if (workflowCalculation.insurerCalculation) {\r\n caseCalculationActionTypeList.push({\r\n id: calculationTypeList[0].id,\r\n displayName: this.translatorService.Tranlate(\r\n 'CALCULATION_TAB_INSURER_CALCULATION_LABEL',\r\n 'Actualizare OE'\r\n ),\r\n code: this.ACTION_INSURER_CALCULATION\r\n } as IReferential);\r\n }\r\n\r\n if (workflowCalculation.hasBackButton) {\r\n caseCalculationActionTypeList.push({\r\n id: 6,\r\n displayName: this.translatorService.Tranlate('CASE_CALCULATION_BACK_BUTTON', 'Inapoi'),\r\n code: this.ACTION_BACK_BUTTON\r\n } as IReferential);\r\n }\r\n }\r\n\r\n const wr = FormHelpers.GetReports(\r\n form!.workflowFormReports,\r\n this.props.appState.appUser!,\r\n this.props.caseSettingsState.case!.caseStatus.caseStatusId\r\n );\r\n\r\n // const wo = workflowOptimization.filter(item =>\r\n // item.workflowPartner!.partnerId === this.props.appState.appUser!.hoId\r\n // && ((item.userRoleId === this.props.appState.appUser!.roleId) || isNullOrUndefined(item.userRoleId)));\r\n let calculationParts = ([] as CaseCalculationPart[]);\r\n if (caseCalculations.length > 0) {\r\n const firstCalculation = caseCalculations[0];\r\n calculationParts = firstCalculation.id\r\n ? await this.caseService.GetCaseCalculationParts(firstCalculation.id)\r\n : ([] as CaseCalculationPart[]);\r\n }\r\n\r\n const partSection = calculationSections.find((item) => item.code === CalculationSectionCodeEnum.PART)!;\r\n const atmUserRole = nonStockCheckedOERoles.includes(this.props.appState.appUser?.userRole?.code ?? '');\r\n const firstOriginalCalculationIndex = _.findIndex(caseCalculations, function (item) {\r\n return item.calculationType.code === CalculationTypeCode.ORG;\r\n });\r\n this.setState({\r\n caseCalculationHistory: caseCalculations,\r\n caseCalculationHistoryCopy: caseCalculationCopy,\r\n caseCalculationActionTypeList: caseCalculationActionTypeList.sort((a, b) => (a.code === this.ACTION_BACK_BUTTON ? -1 : b.code === this.ACTION_BACK_BUTTON ? 1 : 0)),\r\n workflowReports: wr,\r\n calculationSectionList: calculationSections.sort(function (a, b) {\r\n return a.id - b.id;\r\n }),\r\n maxDeliveryTime: !isNullOrUndefined(workflowCalculation)\r\n ? !isNullOrUndefined(workflowCalculation.defaultMaxDeliveryTime)\r\n ? workflowCalculation.defaultMaxDeliveryTime\r\n : 0\r\n : 0,\r\n tmlEditable: !isNullOrUndefined(workflowCalculation)\r\n ? !isNullOrUndefined(workflowCalculation.tmlEditable)\r\n ? workflowCalculation.tmlEditable\r\n : false\r\n : false,\r\n isLoading: false,\r\n workflowCalculation: workflowCalculation == undefined ? null : workflowCalculation,\r\n hasRights: hasRights,\r\n orderList: orderList,\r\n unorderedParts: unorderedParts,\r\n caseStatuses: caseStatuses,\r\n partsForFirstCalculation: calculationParts.filter(\r\n (item) => item.calculationSectionId === partSection!.id\r\n ),\r\n wfTransitionStepAction: wfTransitionStepAction,\r\n insurerList: insurerList,\r\n manipulationTariff: manipulationTariff,\r\n serviceId: serviceId,\r\n discretionaryPriceDealer: priceDealer,\r\n discretionaryPriceEmployee: priceEmployee,\r\n accoutingValue: accountingVal,\r\n additionTariff: additionTariff,\r\n discountTariff: discountTariff,\r\n caseRequests: caseRequests.filter(x => x.isExternal == true),\r\n packageCalculationId: packageCalculation ? packageCalculation!.id : null,\r\n ownerTariffPartner: ownerTariffPartner,\r\n lastServiceCalculation: lastServiceCalculation,\r\n caseStatusHistory: caseStatusHistory,\r\n attachType: attachmentType,\r\n nonStockSuppliers: nonStockSuppliers,\r\n rowsSelected: this.props.caseSettingsState.caseSettings!.workflow.hasNonStockValidation && atmUserRole ? [firstOriginalCalculationIndex] : []\r\n });\r\n };\r\n\r\n public hasRole = (roleCode: string): boolean => {\r\n return this.props.appState.appUser?.userRole?.code === roleCode;\r\n };\r\n\r\n getWorkflowForm = (id: number): WorkflowSectionStepForm | null => {\r\n const sections = this.props.caseSettingsState.caseSettings!.workflow.workflowSections!;\r\n for (const section of sections) {\r\n for (const step of section.workflowSectionSteps) {\r\n const form = step.workflowSectionStepForms.find((form) => form.id === id);\r\n if (!isNullOrUndefined(form)) {\r\n return form;\r\n }\r\n }\r\n }\r\n\r\n return null;\r\n };\r\n\r\n onRowClick = (e: any, id: number) => {\r\n this.setState({ isDialogOpen: true, calculationHistoryIds: Array.from([id]) });\r\n };\r\n\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'calculationType',\r\n label: this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_FORM_CALCULATION_TYPE_HEADER',\r\n 'Tip Calculatie'\r\n ),\r\n options: {\r\n filter: false,\r\n sort: false,\r\n customBodyRender: (value: any, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.onRowClick(e, tableMeta.rowData[0])}\r\n >\r\n {value.displayName}\r\n \r\n );\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'date',\r\n label: this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_FORM_CALCULATION_DATE_HEADER',\r\n 'Data Calculatie'\r\n ),\r\n options: {\r\n filter: false,\r\n sort: false,\r\n customBodyRender: (value: Date) =>\r\n moment.utc(value).local().format(this.props.appState.longDateFormat)\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'amountPiecesWithDiscount',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'amountLaborWithDiscount',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'amountPaintingMaterialsWithDiscount',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'amountPaintingLaborWithDiscount',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'amount',\r\n label: this.translatorService.Tranlate('CASE_CALCULATION_FORM_AMOUNT_HEADER', 'Valoare'),\r\n options: {\r\n filter: false,\r\n sort: false,\r\n customBodyRender: (value: number, tableMeta: MUIDataTableMeta) => {\r\n const TVA = this.props.caseSettingsState.case!.caseParameters.find(\r\n (item) => item.parameter!.code === ParametreCode.TVA\r\n )!.value;\r\n return (\r\n \r\n \r\n {this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_FORM_TOOLTIP_TITLE',\r\n 'Total defalcat'\r\n )}\r\n \r\n {this.state.calculationSectionList.map((item) => {\r\n return (\r\n
\r\n {item.displayName}\r\n \r\n {Utils.countryNumberFormat((item.id === 1\r\n ? tableMeta.rowData[3]\r\n : item.id === 2\r\n ? tableMeta.rowData[4]\r\n : item.id === 3\r\n ? tableMeta.rowData[5]\r\n : item.id === 4\r\n ? tableMeta.rowData[6]\r\n : 0\r\n ).toFixed(2), this.props.appState.appUser?.organization?.country ?? null) +\r\n ' ' +\r\n tableMeta.rowData[8]}\r\n \r\n
\r\n );\r\n })}\r\n
\r\n \r\n {this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_ADDITION_AMOUNT',\r\n 'Adaos GTM'\r\n )}\r\n \r\n {Utils.countryNumberFormat(tableMeta.rowData[11].toFixed(2), this.props.appState.appUser?.organization?.country ?? null) + ' ' + tableMeta.rowData[8]}\r\n
\r\n
\r\n \r\n {this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_FORM_AMOUNT_WITHOUT_VAT_TOOLTIP',\r\n 'Baza de impozitare'\r\n )}\r\n \r\n {Utils.countryNumberFormat(tableMeta.rowData[9].toFixed(2), this.props.appState.appUser?.organization?.country ?? null) + ' ' + tableMeta.rowData[8]}\r\n
\r\n
\r\n \r\n {this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_FORM_VAT_TOOLTIP',\r\n 'TVA'\r\n ) +\r\n ' (' +\r\n TVA +\r\n '%)'}\r\n \r\n {Utils.countryNumberFormat(tableMeta.rowData[10].toFixed(2), this.props.appState.appUser?.organization?.country ?? null) + ' ' + tableMeta.rowData[8]}\r\n
\r\n \r\n
\r\n \r\n {this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_FORM_TOTAL_TOOLTIP',\r\n 'TOTAL'\r\n )}\r\n \r\n {Utils.countryNumberFormat(value.toFixed(2), this.props.appState.appUser?.organization?.country ?? null) + ' ' + tableMeta.rowData[8]}\r\n
\r\n
\r\n }\r\n >\r\n
\r\n {Utils.countryNumberFormat(value.toFixed(2), this.props.appState.appUser?.organization?.country ?? null) + ' ' + tableMeta.rowData[8]}\r\n
\r\n \r\n );\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'currencyCode',\r\n label: this.translatorService.Tranlate('CASE_CALCULATION_FORM_CURRENCY_HEADER', 'Moneda'),\r\n options: {\r\n display: 'excluded',\r\n customBodyRender: (value: IReferential) => {\r\n return value;\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'amountWithoutTVA',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'amountTVA',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'amountAddition',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'user',\r\n label: this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_FORM_CREATED_BY_HEADER',\r\n 'Efectuat de'\r\n ),\r\n options: {\r\n filter: false,\r\n sort: false,\r\n customBodyRender: (value: AppUser) => {\r\n return value.userName;\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: '',\r\n label: this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_HISTORY_INTEROGATION',\r\n 'Istoric interogare'\r\n ),\r\n options: {\r\n viewColumns: false,\r\n sort: false,\r\n display: !R.isNil(this.state.workflowCalculation) && this.state.workflowCalculation!.hasHistoryInterogation ? 'true' : 'false',\r\n setCellHeaderProps: () => ({ align: 'center' }),\r\n setCellProps: () => ({ align: 'center' }),\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n const id = tableMeta.rowData[0];\r\n const calculation = this.state.caseCalculationHistory.find((item) => item.id === id);\r\n if (calculation && calculation.calculationType.code === CalculationTypeCode.ORG) {\r\n return null;\r\n }\r\n return (\r\n \r\n \r\n \r\n );\r\n }\r\n } as MUIDataTableColumnOptions\r\n }\r\n ];\r\n\r\n return columns;\r\n };\r\n\r\n getPartsHistoryInterogationReport = (id: number) => async () => {\r\n try {\r\n const language = this.props.appState.language == LanguageCode.RO ? LanguageCode.RO : LanguageCode.EN;\r\n\r\n const request = {\r\n calculationId: id,\r\n language: language\r\n } as PartsHistoryInterogationRequest;\r\n\r\n const fileBlob = await this.caseService.GetPartsHistoryInterogationReport(request);\r\n FileSaver.saveAs(\r\n fileBlob,\r\n this.translatorService.Tranlate('HISTORY_INTEROGATION_REPORT', 'Istoric interogare') + '.xlsx'\r\n );\r\n \r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n return;\r\n }\r\n }\r\n\r\n closeDialog = async () => {\r\n if (this.state.modified) {\r\n this.setState({ isDialogModifiedOpen: true });\r\n } else {\r\n this.setState({ isDialogOpen: false, selectedCalculationButton: null });\r\n }\r\n await this.loadData();\r\n };\r\n\r\n closeAlternativeCalcDialog = async () => {\r\n // if (this.state.modified) {\r\n this.setState({ isDialogAlternativeCalculationOpen: false, rowsSelected: [] });\r\n // }\r\n await this.loadData();\r\n };\r\n\r\n closeQualityControlDialog = async () => {\r\n // if (this.state.modified) {\r\n this.setState({ isDialogQualityControlOpen: false, rowsSelected: [] });\r\n // }\r\n await this.loadData();\r\n };\r\n\r\n closeRadarDialog = async () => {\r\n // if (this.state.modified) {\r\n this.setState({ isDialogRadarOpen: false, rowsSelected: [] });\r\n // }\r\n await this.loadData();\r\n };\r\n\r\n closeMultipleTariffDialog = () => {\r\n this.setState({ isMultipleTariffDialogOpen: false, selectedCalculationTypeId: null });\r\n };\r\n\r\n loadOrganizationTariff = async () => {\r\n const tariffListBranches = [] as TariffBranch[];\r\n this.setState({ isOwnTariffLoading: true });\r\n try {\r\n const ownOrganizationTariffs = await this.tariffService.GetOwnTariffs(this.props.appState.appUser?.organizationId ?? 0);\r\n for (const x of ownOrganizationTariffs) {\r\n tariffListBranches.push({\r\n id: x!.id,\r\n ownerId: x!.ownerId,\r\n partnerId: x!.partnerId,\r\n tariffName: x!.name,\r\n children: [],\r\n path: null,\r\n label: x!.name,\r\n checked: false\r\n });\r\n }\r\n\r\n this.setState({ tariffBranches: tariffListBranches, isOwnTariffLoading: false });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n this.setState({ isOwnTariffLoading: false });\r\n }\r\n\r\n }\r\n\r\n handleCalculationsTypesButton = async (\r\n calculationTypeId: number,\r\n calculationTypeCode: string | null\r\n ) => {\r\n if (this.state.workflowCalculation!.hasMultipleTariff &&\r\n calculationTypeCode === CalculationTypeCode.ORG\r\n ) {\r\n this.setState({\r\n isMultipleTariffDialogOpen: true,\r\n selectedCalculationTypeId: calculationTypeId\r\n }, async () => {\r\n await this.loadOrganizationTariff();\r\n });\r\n return;\r\n }\r\n\r\n if (calculationTypeCode === CalculationTypeCode.ORG) {\r\n const lastClientComment = this.state.caseRequests.length > 0 ? this.state.caseRequests[0] : null;\r\n const currentStatusCode = this.props.caseSettingsState.case!.caseStatus.caseStatus?.code;\r\n if (currentStatusCode != CaseStatusCodeEnum.ACTUALIZEAZA_CALCULATIE.toString() &&\r\n this.state.workflowCalculation?.viewClientCommentsHistory && \r\n lastClientComment && !R.isEmpty(lastClientComment.text)) {\r\n this.setState({\r\n isClientCommentOpen: true,\r\n orginalCalculationTypeId: calculationTypeId\r\n });\r\n return;\r\n } else {\r\n await this.originalCalculationClick(calculationTypeId, null);\r\n }\r\n return;\r\n }\r\n\r\n if (calculationTypeCode === this.ACTION_INSURER_CALCULATION) {\r\n console.log(this.ACTION_INSURER_CALCULATION);\r\n console.log(calculationTypeId);\r\n await this.insurerCalculationClick(calculationTypeId);\r\n return;\r\n }\r\n\r\n if (calculationTypeCode === CalculationTypeCode.ALT) {\r\n if (\r\n this.state.rowsSelected.length === 0 &&\r\n !this.state.workflowCalculation?.alternativeCalculationWithoutOriginal\r\n ) {\r\n const orgCalculations = this.state.caseCalculationHistory.filter(x => x.calculationType.code === CalculationTypeCode.ORG);\r\n if (orgCalculations.length == 1) {\r\n const orgIndex = this.state.caseCalculationHistory.findIndex(x => x.calculationType.code === CalculationTypeCode.ORG);\r\n const hasError = this.displayCalculationZeroAmountWarning(orgIndex);\r\n if (hasError) {\r\n return;\r\n }\r\n await this.alternativeCalculationClick(calculationTypeId, orgIndex);\r\n return;\r\n }\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'CALCULATIONS_PLEASE_SELECT_THE_ORGINAL_CALCULATION',\r\n 'Vă rugăm să selectați o calculație originală !'\r\n ),\r\n {\r\n variant: 'warning'\r\n }\r\n );\r\n return;\r\n }\r\n\r\n await this.alternativeCalculationClick(calculationTypeId);\r\n return;\r\n }\r\n\r\n if (calculationTypeCode === this.ACTION_GT_VAL) {\r\n this.setState({ isValuationOpen: true });\r\n\r\n return;\r\n }\r\n\r\n if (calculationTypeCode === this.RADAR) {\r\n this.setState({ isDialogRadarOpen: true });\r\n\r\n return;\r\n }\r\n\r\n if (calculationTypeCode === this.ACTION_BACK_BUTTON) {\r\n if (this.state.caseStatusHistory.length <= 1) return; \r\n\r\n this.setState({ backButtonDisabled: true });\r\n\r\n const status = this.state.caseStatusHistory[1];\r\n const caseStatusRequest = {\r\n caseId: this.props.caseSettingsState.case!.id,\r\n statusId: status?.caseStatusId\r\n } as ChangeCaseStatusRequest;\r\n const currentStatus = await this.caseService.ChangeCaseStatus(caseStatusRequest);\r\n\r\n this.props.SetCaseStatus(currentStatus);\r\n \r\n this.setState({ backButtonDisabled: false });\r\n\r\n return;\r\n }\r\n\r\n this.setState({\r\n selectedCalculationButton: calculationTypeCode,\r\n isDialogOpen: true,\r\n calculationHistoryIds: this.state.rowsSelected.map(\r\n (item) => this.state.caseCalculationHistory[item].id\r\n )\r\n });\r\n };\r\n\r\n alternativeCalculationClick = async (calculationTypeId: number, indexNumber: number | null = null) => {\r\n const unorderedParts = this.state.unorderedParts;\r\n if (unorderedParts.length > 0) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'UNORDERED_PARTS_WARNING',\r\n 'Exista piese necomandate! Va rugam comandati piesele!'\r\n ),\r\n {\r\n variant: 'warning'\r\n }\r\n );\r\n return;\r\n }\r\n const orderList = this.state.orderList;\r\n const findOrder = _.find(orderList, function (order) {\r\n return order?.orderStatus?.code === OrderStatusCode.REP_DRAFT;\r\n });\r\n if (findOrder) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'ORDERS_IN_DRAFT_STATUS',\r\n 'Exista comenzi cu statusul de Draft! Va rugam plasati comenzile!'\r\n ),\r\n {\r\n variant: 'warning'\r\n }\r\n );\r\n return;\r\n }\r\n\r\n let selectedCaseCalculationHistory = {} as CaseCalculationHistory;\r\n if (this.state.rowsSelected.length === 1) {\r\n selectedCaseCalculationHistory =\r\n this.state.caseCalculationHistory[this.state.rowsSelected[0]];\r\n const hasError = this.displayCalculationZeroAmountWarning(this.state.rowsSelected[0]);\r\n if (hasError) {\r\n return;\r\n }\r\n }\r\n if (!R.isNil(indexNumber)) {\r\n selectedCaseCalculationHistory = this.state.caseCalculationHistory[indexNumber];\r\n }\r\n \r\n //Check if is Carfix integration and if we have packageCalculationId not null */\r\n if (this.props.caseSettingsState.caseSettings!.workflow.isCarfixIntegration && this.state.packageCalculationId !== null) {\r\n //Check if the calculation is OE\r\n if (selectedCaseCalculationHistory.calculationType.code !== CalculationTypeCode.ORG) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('PLEASE_SELECT_THE_ORGINAL_CALCULATION', 'Vă rugăm să selectati o calculatie originală!'),\r\n {\r\n variant: 'warning',\r\n autoHideDuration: 6000\r\n }\r\n );\r\n return;\r\n }\r\n\r\n }\r\n this.setState({\r\n selectedCalculationButton: null,\r\n isDialogAlternativeCalculationOpen: true,\r\n calculationHistoryIds:\r\n selectedCaseCalculationHistory.id !== null ? [selectedCaseCalculationHistory.id] : []\r\n });\r\n };\r\n\r\n displayCalculationZeroAmountWarning = (selectedRowIndex: number) : boolean => {\r\n const selectedCaseCalculationHistory = this.state.caseCalculationHistory[selectedRowIndex];\r\n if (selectedCaseCalculationHistory.calculationType.code === CalculationTypeCode.ORG && selectedCaseCalculationHistory.amount === 0) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_ZERO_AMOUNT_WARNING',\r\n 'Vă rugăm să efectuați o calculatie validă a cărei valoare să fie diferită de zero!'\r\n ),\r\n {\r\n variant: 'warning'\r\n }\r\n );\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n originalCalculationClick = async (calculationTypeId: number, ownTariffId: number | null) => {\r\n this.setState({ isLoading: true });\r\n const result = await this.caseService.CreateCalculation({\r\n caseId: this.props.caseSettingsState.case!.id,\r\n formId: this.props.stepFormId,\r\n calculationId: null,\r\n calculationTypeId: calculationTypeId,\r\n workflowCalculationId: this.state.workflowCalculation!.id,\r\n vehicleId: this.props.caseSettingsState.case!.vehicleId,\r\n workflowId: this.props.caseSettingsState.caseSettings!.workflow.id,\r\n workflowOrganizationOwnerId:\r\n this.props.caseSettingsState.caseSettings!.workflow.organizationOwnerId,\r\n organizationId: this.props.appState.appUser!.organizationId,\r\n organizationName: this.props.appState.appUser!.organization!.name,\r\n takeOrganizationTariff: this.props.appState.appUser!.organization!.organizationType!.takeOrganizationTariff,\r\n insurerId: this.getInsurerId(),\r\n ownTariffId: ownTariffId\r\n } as CalculationRequest);\r\n if (!isNullOrUndefined(result.gtEstimateResponseDto.error)) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('ERROR_MSG', 'Eroare') +\r\n ': ' +\r\n result.gtEstimateResponseDto.error.errorInfo.description,\r\n { variant: 'error' }\r\n );\r\n this.setState({ isLoading: false });\r\n return;\r\n }\r\n\r\n if (this.props.appState.appUser!.organization!.changeCaseStatusBasedCalculation) {\r\n const status = _.find(this.state.caseStatuses, function (caseStatus) {\r\n return caseStatus.code === CaseStatusCodeEnum.OE;\r\n });\r\n const caseStatusRequest = {\r\n caseId: this.props.caseSettingsState.case!.id,\r\n statusId: status!.id\r\n } as ChangeCaseStatusRequest;\r\n\r\n const currentStatus = await this.caseService.ChangeCaseStatus(caseStatusRequest);\r\n this.props.SetCaseStatus(currentStatus);\r\n\r\n }\r\n window.location = result.gtEstimateResponseDto.codeUrl.url;\r\n };\r\n\r\n getInsurerId = (): number | null => {\r\n if (isNullOrUndefined(this.state.workflowCalculation)) {\r\n return null;\r\n }\r\n\r\n if (!this.state.workflowCalculation.insurerCalculation) {\r\n return null;\r\n }\r\n\r\n if (R.isNil(this.props.caseSettingsState.case!.caseEvent)) {\r\n return null;\r\n }\r\n\r\n if (R.isNil(this.props.caseSettingsState.case!.caseEvent.insurerName)) {\r\n return null;\r\n }\r\n\r\n const insurerName = this.props.caseSettingsState.case!.caseEvent.insurerName;\r\n const insurer = _.find(this.state.insurerList, function (insurer) {\r\n return insurer.displayName.toLowerCase() === insurerName.toLowerCase();\r\n });\r\n console.log('insurer', insurer);\r\n if (R.isNil(insurer)) {\r\n return null;\r\n }\r\n return insurer.id;\r\n }\r\n\r\n getInsurerIdInfo = (insurerList: IReferential[]): number | null => {\r\n if (R.isNil(this.props.caseSettingsState.case!.caseEvent)) {\r\n return null;\r\n }\r\n\r\n if (R.isNil(this.props.caseSettingsState.case!.caseEvent.insurerName)) {\r\n return null;\r\n }\r\n\r\n const insurerName = this.props.caseSettingsState.case!.caseEvent.insurerName;\r\n const insurer = _.find(insurerList, function (insurer) {\r\n return insurer.displayName.toLowerCase() === insurerName.toLowerCase();\r\n });\r\n console.log('insurer', insurer);\r\n if (R.isNil(insurer)) {\r\n return null;\r\n }\r\n return insurer.id;\r\n }\r\n insurerCalculationClick = async (calculationTypeId: number) => {\r\n if (this.state.rowsSelected.length == 0) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('CALCULATION_PLEASE_SELECT_LINE', 'Va rugam sa selectati o linie!'),\r\n {\r\n variant: 'warning',\r\n autoHideDuration: 6000\r\n }\r\n );\r\n return;\r\n }\r\n\r\n const calculationId = this.state.caseCalculationHistory[this.state.rowsSelected[0]]?.id || null;\r\n this.setState({ isLoading: true });\r\n\r\n try {\r\n const result = await this.caseService.UpdateCalculationTariff({\r\n caseId: this.props.caseSettingsState.case!.id,\r\n formId: this.props.stepFormId,\r\n calculationId: null,\r\n parentId: calculationId,\r\n calculationTypeId: calculationTypeId,\r\n workflowCalculationId: this.state.workflowCalculation!.id,\r\n vehicleId: this.props.caseSettingsState.case!.vehicleId,\r\n workflowId: this.props.caseSettingsState.caseSettings!.workflow.id,\r\n workflowOrganizationOwnerId:\r\n this.props.caseSettingsState.caseSettings!.workflow.organizationOwnerId,\r\n organizationId: this.props.appState.appUser!.organizationId,\r\n organizationName: this.props.appState.appUser!.organization!.name,\r\n takeOrganizationTariff: this.props.appState.appUser!.organization!.organizationType!.takeOrganizationTariff,\r\n insurerId: this.getInsurerIdInfo(this.state.insurerList),\r\n serviceId: this.state.ownerTariffPartner ? this.state.ownerTariffPartner!.partnerId : null,\r\n ownTariffId: null\r\n } as CalculationRequest) as CalculationResponse;\r\n\r\n this.setState({\r\n rowsSelected: []\r\n });\r\n\r\n if (!isNullOrUndefined(result.gtEstimateResponseDto.error)) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('ERROR_MSG', 'Eroare') +\r\n ': ' +\r\n result.gtEstimateResponseDto.error.errorInfo.description,\r\n { variant: 'error' }\r\n );\r\n this.setState({ isLoading: false });\r\n return;\r\n }\r\n\r\n if (!isNullOrUndefined(result.caseCalculationHistory)) {\r\n const newCalculationId = result.caseCalculationHistory.id;\r\n console.log('newCalculationId', newCalculationId);\r\n this.caseService.UpdateCalculationPdfCallback(\r\n newCalculationId,\r\n this.props.caseSettingsState.caseSettings!.workflow.id,\r\n this.props.caseSettingsState.caseSettings!.workflow.organizationOwnerId\r\n );\r\n }\r\n\r\n await this.loadData();\r\n\r\n } catch (error) {\r\n this.setState({ isLoading: false });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n\r\n reportClick = async (reportCode: string | null, name: string) => {\r\n this.setState({ openMenuItem: false });\r\n\r\n let fileBlob: Blob;\r\n let calculationId = null;\r\n if (reportCode === ReportTypeCode.DEVIZ_REP_AP) {\r\n const reportParameters = [\r\n {\r\n name: 'caseId',\r\n value: this.props.caseSettingsState.case!.id.toString()\r\n } as ReportParameter\r\n ];\r\n const calculation = this.state.caseCalculationHistoryCopy.find(x => x.calculationType.code === CalculationTypeCode.ALT);\r\n if (calculation) {\r\n calculationId = calculation.id;\r\n reportParameters.push({\r\n name: 'calculationId',\r\n value: calculation.id.toString()\r\n } as ReportParameter);\r\n }\r\n\r\n if (this.state.lastServiceCalculation) {\r\n reportParameters.push({\r\n name: 'serviceCalculationId',\r\n value: this.state.lastServiceCalculation.id.toString()\r\n } as ReportParameter);\r\n }\r\n\r\n fileBlob = await this.reportsService.GetReport(reportCode!, reportParameters);\r\n } else if (reportCode === ReportTypeCode.ESTIMATE_OE) {\r\n fileBlob = await this.caseService.GetCaseCalculationReport(\r\n Number.parseInt(this.props.match.params.id),\r\n this.state.caseCalculationHistory[this.state.rowsSelected[0]].id\r\n );\r\n\r\n FileSaver.saveAs(fileBlob, name + '.pdf');\r\n return;\r\n } else if (\r\n reportCode == ReportTypeCode.DEVIZ_AUTOWORLD ||\r\n reportCode == ReportTypeCode.DEVIZ_CLIENT\r\n ) {\r\n const reportParameters = [\r\n {\r\n name: 'caseId',\r\n value: this.props.caseSettingsState.case!.id.toString()\r\n } as ReportParameter\r\n ];\r\n\r\n if (this.state.rowsSelected.length) {\r\n calculationId =\r\n this.state.caseCalculationHistory[this.state.rowsSelected[0]]?.id || null;\r\n\r\n if (calculationId) {\r\n reportParameters.push({\r\n name: 'calculationId',\r\n value: this.state.caseCalculationHistory[this.state.rowsSelected[0]].id.toString()\r\n } as ReportParameter);\r\n }\r\n }\r\n fileBlob = await this.reportsService.GetReport(reportCode!, reportParameters);\r\n } else if (\r\n reportCode == ReportTypeCode.DEVIZ_REPARATIE\r\n ) {\r\n const reportParameters = [\r\n {\r\n name: 'caseId',\r\n value: this.props.caseSettingsState.case!.id.toString()\r\n } as ReportParameter,\r\n {\r\n name: 'organizationId',\r\n value: this.props.appState.appUser!.organization?.id.toString()\r\n } as ReportParameter\r\n ];\r\n\r\n if (this.state.rowsSelected.length) {\r\n calculationId =\r\n this.state.caseCalculationHistory[this.state.rowsSelected[0]]?.id || null;\r\n\r\n if (calculationId) {\r\n reportParameters.push({\r\n name: 'calculationId',\r\n value: this.state.caseCalculationHistory[this.state.rowsSelected[0]].id.toString()\r\n } as ReportParameter);\r\n }\r\n }\r\n fileBlob = await this.reportsService.GetRepairReport(reportCode!, this.props.caseSettingsState.case!.id, reportParameters);\r\n } else if (\r\n reportCode == ReportTypeCode.DEVIZ_REP_OFERTA\r\n ) {\r\n const reportParameters = [\r\n {\r\n name: 'caseId',\r\n value: this.props.caseSettingsState.case!.id.toString()\r\n } as ReportParameter,\r\n {\r\n name: 'lang',\r\n value: this.props.appState.appUser!.organization?.country?.code?.toLowerCase() ?? \"ro\"\r\n } as ReportParameter\r\n ];\r\n\r\n if (this.state.rowsSelected.length) {\r\n calculationId =\r\n this.state.caseCalculationHistory[this.state.rowsSelected[0]]?.id || null;\r\n\r\n if (calculationId) {\r\n reportParameters.push({\r\n name: 'calculationId',\r\n value: this.state.caseCalculationHistory[this.state.rowsSelected[0]].id.toString()\r\n } as ReportParameter);\r\n }\r\n }\r\n fileBlob = await this.reportsService.GetReport(reportCode!, reportParameters);\r\n } else {\r\n const reportParameters = [\r\n {\r\n name: 'caseId',\r\n value: this.props.caseSettingsState.case!.id.toString()\r\n } as ReportParameter\r\n ];\r\n\r\n if (this.props.caseSettingsState.case!.vehicleId !== null) {\r\n reportParameters.push({\r\n name: 'vehicleId',\r\n value: this.props.caseSettingsState.case!.vehicleId.toString()\r\n } as ReportParameter);\r\n }\r\n\r\n if (this.state.rowsSelected.length) {\r\n calculationId =\r\n this.state.caseCalculationHistory[this.state.rowsSelected[0]]?.id || null;\r\n\r\n if (calculationId) {\r\n reportParameters.push({\r\n name: 'calculationId',\r\n value: this.state.caseCalculationHistory[this.state.rowsSelected[0]].id.toString()\r\n } as ReportParameter);\r\n }\r\n }\r\n\r\n fileBlob = await this.reportsService.GetReport(reportCode!, reportParameters);\r\n }\r\n\r\n let fileName = name + (calculationId ? '_' + calculationId : '') + '.pdf';\r\n if (\r\n reportCode == WorflowEditableReport.PROCES_VERBAL_PREDARE_PRIMIRE ||\r\n reportCode == WorflowEditableReport.FISA_EVALUARE_MASINA\r\n ) {\r\n if (reportCode == WorflowEditableReport.PROCES_VERBAL_PREDARE_PRIMIRE) {\r\n fileName = name + (calculationId ? '_' + calculationId : '') + '.doc';\r\n FileSaver.saveAs(fileBlob, name + '.doc');\r\n } else {\r\n FileSaver.saveAs(fileBlob, name + '.pdf');\r\n }\r\n } else {\r\n FileSaver.saveAs(fileBlob, name + '.pdf');\r\n }\r\n\r\n if (this.props.caseSettingsState.caseSettings!.workflow.saveDocuments) {\r\n console.log('Save file', fileName, 'Id Calculatie', calculationId);\r\n await this.saveGeneratedFile(fileBlob, fileName);\r\n }\r\n };\r\n\r\n saveGeneratedFile = async (fileBlob: Blob, fileName: string) => {\r\n try {\r\n //Save the report into attachments\r\n const attachments: CaseAttachment[] = [];\r\n attachments.push({\r\n id: 0,\r\n caseId: this.props.caseSettingsState.case!.id,\r\n attachmentTypeId: this.state.attachType.id,\r\n attachmentType: this.state.attachType,\r\n file: new File([fileBlob], fileName),\r\n isSelection: false,\r\n includeInOtherTab: true,\r\n checkFileName: true\r\n } as CaseAttachment);\r\n\r\n const newFiles = await this.caseService.AddCaseAttachment(attachments);\r\n\r\n console.log('newFiles', newFiles);\r\n } catch (error) {\r\n console.log('error', error);\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n \r\n\r\n handleModifiedPropChanges = (modified: boolean) => {\r\n this.setState({ modified: modified });\r\n };\r\n\r\n closeModifiedDialog = async () => {\r\n this.setState({\r\n modified: false,\r\n isDialogModifiedOpen: false,\r\n isDialogOpen: false,\r\n selectedCalculationButton: null\r\n });\r\n };\r\n\r\n handleQualityControlButton = () => {\r\n this.setState({ isDialogQualityControlOpen: true });\r\n };\r\n\r\n handleConfirmChanges = async () => {\r\n this.setState({ executing: true });\r\n await this.submitForm(this.props.caseSettingsState.case!.id, this.props.workflowForm.id, null);\r\n this.setState({ executing: false });\r\n };\r\n\r\n getForms = (workflow: Workflow, code: string): WorkflowSectionStepForm | null => {\r\n let form = null;\r\n const sections = workflow\r\n .workflowSections!.filter((item) => item.isActive)\r\n .sort(this.sortFunction);\r\n // console.log('sections', sections);\r\n for (const section of sections) {\r\n const steps = section.workflowSectionSteps\r\n .filter((item) => item.isActive)\r\n .sort(this.sortFunction);\r\n // console.log('steps', steps);\r\n for (const step of steps) {\r\n const forms = step.workflowSectionStepForms\r\n .filter((item) => item.isActive)\r\n .sort(this.sortFunction);\r\n // console.log('forms', forms);\r\n const formIndex = forms.findIndex((item) => item.form.code === code);\r\n if (formIndex !== -1) {\r\n form = forms[formIndex];\r\n }\r\n }\r\n }\r\n return form;\r\n };\r\n\r\n sortFunction = (a: any, b: any) => {\r\n return a.order - b.order;\r\n };\r\n\r\n\r\n getWorkflowSectionStep = (workflowSectionStepId: number): WorkflowSectionStep | null => {\r\n const sections = this.props.caseSettingsState.caseSettings!.workflow.workflowSections!;\r\n for (const section of sections) {\r\n for (const step of section.workflowSectionSteps) {\r\n if (step.id == workflowSectionStepId) {\r\n return step;\r\n }\r\n }\r\n }\r\n return null;\r\n };\r\n\r\n public getErrorDetails(errorDetails: Map): any {\r\n const text: string[] = [];\r\n for (const [property, error] of Object.entries(errorDetails)) {\r\n console.log(property);\r\n console.log(error);\r\n if (!R.isNil(error)) {\r\n text.push(`${property}:`);\r\n forEach(error, (value) => {\r\n text.push(`${value}`);\r\n });\r\n }\r\n }\r\n\r\n return (\r\n
\r\n {' '}\r\n {text.map((t, index) => (\r\n
{t}
\r\n ))}{' '}\r\n
\r\n );\r\n }\r\n\r\n lastOriginalCalculation = (): CaseCalculationHistory => {\r\n const calculation = _.sortBy(this.state.caseCalculationHistory.filter(calculation => calculation.calculationType.code == CalculationTypeCode.ORG), 'date').reverse()[0];\r\n return calculation;\r\n }\r\n\r\n checkAlternativePartDescriptionForNonStocks = () : boolean => {\r\n let result = false;\r\n if (!R.isNil(this.state.workflowCalculation) && this.state.workflowCalculation.hasAlternativePartDescription) {\r\n result = _.some(this.state.partsForFirstCalculation, (item) => {\r\n // Check if the part is from a non-stock supplier and has null quantity\r\n const nonStockSupplier = this.state.nonStockSuppliers.find(x => x.supplierId === item.supplierId);\r\n if (!R.isNil(nonStockSupplier) && R.isNil(item.availableQuantity)) {\r\n if (R.isNil(item.alternativePartDescription) || R.isEmpty(item.alternativePartDescription)) {\r\n console.log('Found a non-stock item with null quantity and null/empty description', item);\r\n return true;\r\n }\r\n }\r\n });\r\n }\r\n return result;\r\n }\r\n\r\n checkIfExistStockParts = (): boolean => {\r\n return _.some(this.state.partsForFirstCalculation, (item) => !R.isNil(item.availableQuantity));\r\n }; \r\n\r\n submitForm = async (caseId: number, caseSectionStepFormId: number, appUser: AppUser | null) => {\r\n const hasCalculationsOrEstimations =\r\n this.state.caseCalculationHistory.length > 0 ||\r\n this.props.caseSettingsState.case!.caseValuation != null;\r\n\r\n if (hasCalculationsOrEstimations) {\r\n /*\r\n Display pop-up info if we don't have an AM calculation done\r\n */\r\n const toStatusId = this.state.wfTransitionStepAction?.toStatusId;\r\n const toWorkflowId = this.state.wfTransitionStepAction?.toWorkflowId;\r\n const status = _.find(this.state.caseStatuses, function (caseStatus) {\r\n return caseStatus.code === CaseStatusCodeEnum.COM_PI;\r\n });\r\n const orderNonStockStatus = _.find(this.state.caseStatuses, function (caseStatus) {\r\n return caseStatus.code === CaseStatusCodeEnum.COMANDA_PIESE_NON_STOC;\r\n }); \r\n\r\n if (this.props.caseSettingsState.caseSettings!.workflow.isCarfixIntegration) {\r\n if (this.state.caseCalculationHistory.length > 0) {\r\n const firstCalculation = _.sortBy(this.state.caseCalculationHistory, 'date').reverse()[0];\r\n if (firstCalculation.calculationType.code == CalculationTypeCode.ORG) {\r\n return this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'REPAIR_CASE_CALCULATION_FORM_NO_AM_CALCULATION_DONE',\r\n 'Vă rugăm să efectuaţi o calculaţie alternativă !'\r\n ),\r\n { variant: 'warning' }\r\n );\r\n }\r\n }\r\n }\r\n\r\n if (toStatusId == status!.id || toStatusId == orderNonStockStatus!.id) {\r\n if (this.state.caseCalculationHistory.length > 0) {\r\n const firstCalculation = _.sortBy(this.state.caseCalculationHistory, 'date').reverse()[0];\r\n if (firstCalculation.calculationType.code == CalculationTypeCode.ORG) {\r\n return this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_FORM_NO_AM_CALCULATION_DONE',\r\n 'Pentru a trece in pasul de Comanda vă rugăm să efectuaţi o calculaţie alternativă !'\r\n ),\r\n { variant: 'warning' }\r\n );\r\n }\r\n\r\n if (firstCalculation.calculationType.code == CalculationTypeCode.ALT) {\r\n if (!firstCalculation.amount) {\r\n return this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_FORM_AM__WARNING_CALCULATION_DONE',\r\n 'Vă rugăm să interogati piesele la furnizori!'\r\n ),\r\n { variant: 'warning' }\r\n );\r\n }\r\n const hasNoSupplierCalculationParts = _.find(this.state.partsForFirstCalculation, function (object) {\r\n return !object.supplierId && !object.isOwnStock;\r\n });\r\n if (hasNoSupplierCalculationParts) {\r\n return this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_FORM_AM__WARNING_CALCULATION_DONE',\r\n 'Vă rugăm să interogati piesele la furnizori!'\r\n ),\r\n { variant: 'warning' }\r\n );\r\n }\r\n\r\n const hasNoAlternativeGuideNumberCalculationParts = _.find(this.state.partsForFirstCalculation, function (object) {\r\n return !object.alternativeGuideNumber && !object.isOwnStock;\r\n });\r\n if (hasNoAlternativeGuideNumberCalculationParts) {\r\n return this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_FORM_AM__WARNING_CALCULATION_DONE',\r\n 'Vă rugăm să interogati piesele la furnizori!'\r\n ),\r\n { variant: 'warning' }\r\n );\r\n }\r\n\r\n //Urmeaza sa treaca in 'Comanda piese non-stock'\r\n if (toStatusId == orderNonStockStatus!.id) {\r\n const result = this.checkAlternativePartDescriptionForNonStocks();\r\n if (result) {\r\n return this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_FORM_AM_NON_STOCK_WARNING',\r\n 'Pentru a putea comanda piesele non-stoc vă rugăm să le interogați!'\r\n ),\r\n { variant: 'warning' }\r\n );\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n //Nu se muta in statusul comenzi piese\r\n /* Check if is PRC integration and if we have a case event */\r\n if (this.props.caseSettingsState.caseSettings!.workflow.isPrcIntegration && !R.isNil(this.props.caseSettingsState.case!.caseEvent)) {\r\n const firstCalculation = _.sortBy(this.state.caseCalculationHistory, 'date').reverse()[0];\r\n /* Check if we have an ORG calculation done */\r\n if (firstCalculation.calculationType.code == CalculationTypeCode.ORG) {\r\n const updateOE = _.find(this.state.caseStatuses, function (caseStatus) {\r\n return caseStatus.code === CaseStatusCodeEnum.OE;\r\n });\r\n\r\n if (this.props.caseSettingsState.case!.caseStatus.caseStatusId == updateOE!.id) {\r\n this.setState({ isLoading: true });\r\n try {\r\n const result = await this.caseService.UpdateCalculationTariff({\r\n caseId: this.props.caseSettingsState.case!.id,\r\n formId: this.props.stepFormId,\r\n calculationId: null,\r\n parentId: firstCalculation.id,\r\n calculationTypeId: firstCalculation.calculationType.id,\r\n workflowCalculationId: this.state.workflowCalculation!.id,\r\n vehicleId: this.props.caseSettingsState.case!.vehicleId,\r\n workflowId: this.props.caseSettingsState.caseSettings!.workflow.id,\r\n workflowOrganizationOwnerId:\r\n this.props.caseSettingsState.caseSettings!.workflow.organizationOwnerId,\r\n organizationId: this.state.ownerTariffPartner ? this.state.ownerTariffPartner!.partnerId : this.props.appState.appUser!.organizationId,\r\n organizationName: this.props.appState.appUser!.organization!.name,\r\n takeOrganizationTariff: this.props.appState.appUser!.organization!.organizationType!.takeOrganizationTariff,\r\n insurerId: this.getInsurerIdInfo(this.state.insurerList),\r\n serviceId: this.state.ownerTariffPartner ? this.state.ownerTariffPartner!.partnerId : null,\r\n ownTariffId: null\r\n } as CalculationRequest) as CalculationResponse;\r\n\r\n if (!isNullOrUndefined(result.gtEstimateResponseDto.error)) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('ERROR_MSG', 'Eroare') +\r\n ': ' +\r\n result.gtEstimateResponseDto.error.errorInfo.description,\r\n { variant: 'error' }\r\n );\r\n this.setState({ isLoading: false });\r\n return;\r\n }\r\n\r\n if (!isNullOrUndefined(result.caseCalculationHistory)) {\r\n const newCalculationId = result.caseCalculationHistory.id;\r\n console.log('newCalculationId', newCalculationId);\r\n this.caseService.UpdateCalculationPdfCallback(\r\n newCalculationId,\r\n this.props.caseSettingsState.caseSettings!.workflow.id,\r\n this.props.caseSettingsState.caseSettings!.workflow.organizationOwnerId\r\n );\r\n }\r\n } catch (error) {\r\n this.setState({ isLoading: false });\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n return;\r\n }\r\n }\r\n }\r\n }\r\n\r\n //Carfix App Integration\r\n if (this.props.caseSettingsState.caseSettings!.workflow.isCarfixIntegration) {\r\n try {\r\n const firstCalculation = _.sortBy(this.state.caseCalculationHistory, 'date').reverse()[0];\r\n console.log('Carfix App Integration');\r\n console.log('firstCalculation', firstCalculation);\r\n const request = {\r\n caseId: this.props.caseSettingsState.case!.id,\r\n calculationId: firstCalculation.id,\r\n workflowId: this.props.caseSettingsState.caseSettings!.workflow.id\r\n } as CarfixAlternativeCalculationRequest;\r\n const result = await this.caseService.CarfixAlternativeCalculation(request) as CarfixAlternativeCalculationResponse;\r\n if (!result.success) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate(result.code, result.message), {\r\n variant: 'error'\r\n });\r\n return;\r\n }\r\n\r\n const alternativeCalculations = this.state.caseCalculationHistory.filter(calculation => calculation.calculationType.code == CalculationTypeCode.ALT);\r\n this.generateLKQReports(firstCalculation.id, alternativeCalculations.length);\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n return;\r\n }\r\n }\r\n\r\n if (toWorkflowId && toStatusId) {\r\n const userId = this.props.appState?.appUser?.id || appUser?.id;\r\n await this.caseService.ChangeCaseWorkflow(\r\n toWorkflowId,\r\n caseId,\r\n userId!,\r\n toStatusId\r\n );\r\n }\r\n\r\n if (this.props.caseSettingsState.caseSettings!.workflow.hasNonStockValidation) {\r\n const result = this.checkIfExistStockParts();\r\n console.log('Has stock parts', result);\r\n if (result) {\r\n const status = _.find(this.state.caseStatuses, function (caseStatus) {\r\n return caseStatus.code === CaseStatusCodeEnum.COM_PI;\r\n });\r\n const caseStatusRequest = {\r\n caseId: caseId,\r\n statusId: status!.id\r\n } as ChangeCaseStatusRequest;\r\n \r\n const newStatus = await this.caseService.ChangeCaseStatus(caseStatusRequest);\r\n this.props.SetCaseStatus(newStatus);\r\n\r\n const hasRights = FormHelpers.HasRights(\r\n this.props.workflowForm.workflowFormPermissions,\r\n this.props.appState.appUser!,\r\n newStatus.caseStatusId\r\n );\r\n \r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n \r\n this.setState({ hasRights: hasRights });\r\n return;\r\n }\r\n }\r\n\r\n let newStatus = await this.caseService.SubmitForm(caseId, caseSectionStepFormId, appUser);\r\n\r\n if (newStatus === null) {\r\n newStatus = this.props.caseSettingsState.case!.caseStatus;\r\n }\r\n this.props.SetCaseStatus(newStatus);\r\n if (this.state.caseCalculationHistory.length > 0) {\r\n this.props.SetCaseCalculationHistory(this.state.caseCalculationHistory[0]);\r\n }\r\n if (appUser !== null) {\r\n this.props.AddPartner(appUser!.hoId === null ? appUser!.organizationId : appUser!.hoId);\r\n }\r\n\r\n const hasRights = FormHelpers.HasRights(\r\n this.props.workflowForm.workflowFormPermissions,\r\n this.props.appState.appUser!,\r\n newStatus.caseStatusId\r\n );\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n\r\n this.setState({ hasRights: hasRights });\r\n } else {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_FORM_NO_CALCULATION_DONE',\r\n 'Nu a fost efectuata nici o calculatie'\r\n ),\r\n { variant: 'error' }\r\n );\r\n }\r\n };\r\n\r\n getMuiTheme = () => createMuiTheme({\r\n overrides: {\r\n MuiTableCell: {\r\n root: {\r\n '@media (max-width:599.98px)': {\r\n borderBottom: \"none\",\r\n padding: \"1px\",\r\n },\r\n },\r\n },\r\n MUIDataTableBodyCell: {\r\n stackedCommon: {\r\n '@media (max-width:599.98px)': {\r\n display: \"block\",\r\n width: \"100% !important\",\r\n whiteSpace: \"normal\",\r\n height: \"100%\",\r\n // fontSize: \"12px\",\r\n paddingLeft: \"5px\",\r\n paddingTop: \"5px\",\r\n backgroundColor: \"white !important\"\r\n\r\n },\r\n },\r\n cellHide: {\r\n fontWeight: \"bold\",\r\n paddingTop: \"15px\",\r\n }\r\n },\r\n MuiTableRow: {\r\n root: {\r\n borderBottom: \"1px solid rgba(224, 224, 224, 1)\"\r\n }\r\n }\r\n } as any\r\n });\r\n\r\n showManipulation = (caseCalculationHistory: CaseCalculationHistory | null) => {\r\n if (R.isNil(caseCalculationHistory)) {\r\n return false;\r\n }\r\n\r\n if (caseCalculationHistory.calculationType.code !== CalculationTypeCode.ALT) {\r\n return false;\r\n }\r\n\r\n if (caseCalculationHistory.manipulationPercent === 0) {\r\n return false;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n displayValueWithCurrency = (value: number | null, calculationHistory: CaseCalculationHistory) => {\r\n let result = '0';\r\n if (!R.isNil(value)) {\r\n result = value.toFixed(2);\r\n }\r\n\r\n return result + ' ' + calculationHistory.currencyCode;\r\n };\r\n\r\n checkIntegrationRequirements = () => {\r\n //buton trimite oferta sa nu fie activ daca statusul e diferit de Calculatie A.M\r\n return this.props.caseSettingsState?.caseSettings!.workflow?.isCarfixIntegration && (this.props.caseSettingsState.case!.caseStatus.caseStatus?.code !== CaseStatusCodeEnum.AM.toString());\r\n }\r\n\r\n findRecursive = (\r\n arr: TariffBranch[],\r\n id: number\r\n ): TariffBranch | null => {\r\n let result: TariffBranch | null = null;\r\n for (const entry in arr) {\r\n if (arr[entry].id == id) {\r\n result = arr[entry];\r\n break;\r\n }\r\n if (arr[entry].children?.length) {\r\n const partialResult = this.findRecursive(arr[entry].children, id);\r\n if (partialResult != null) {\r\n result = partialResult;\r\n break;\r\n }\r\n }\r\n }\r\n return result;\r\n };\r\n\r\n onDropDownChange = (currentNode: any, selectedNodes: any) => {\r\n // react-dropdown-tree-select doesn't have an intrinsic mechanism for keeping track of selected items, only provides what is selected\r\n // So we have to manually check/uncheck the leaves from this tree used by this component\r\n let newSelectionTariffBranch: TariffBranch | null = null;\r\n if (this.state.selectedTariffBranch) {\r\n const oldSelectionTariffBranch = this.findRecursive(\r\n this.state.tariffBranches,\r\n this.state.selectedTariffBranch.id\r\n );\r\n if (oldSelectionTariffBranch) {\r\n oldSelectionTariffBranch.checked = false;\r\n }\r\n }\r\n\r\n if (selectedNodes.length == 1) {\r\n const newPartialSelectionTariffBranch =\r\n this.findRecursive(\r\n this.state.tariffBranches,\r\n (selectedNodes[0] as TariffBranch)?.id\r\n ) || null;\r\n\r\n if (newPartialSelectionTariffBranch) {\r\n newPartialSelectionTariffBranch.checked = true;\r\n newSelectionTariffBranch = newPartialSelectionTariffBranch;\r\n }\r\n }\r\n\r\n this.setState({\r\n ...this.state,\r\n selectedTariffBranch: newSelectionTariffBranch\r\n });\r\n };\r\n\r\n onSubmitTariffForm = async () => {\r\n try {\r\n if (isNullOrUndefined(this.state.selectedTariffBranch)) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('TARIFF_MANDATORY', 'Tariful este obligatoriu!'),\r\n {\r\n variant: 'error'\r\n });\r\n return;\r\n }\r\n this.setState({ isOwnTariffLoading: true });\r\n\r\n if (this.state.selectedCalculationTypeId) {\r\n await this.originalCalculationClick(this.state.selectedCalculationTypeId, this.state.selectedTariffBranch.id);\r\n }\r\n this.setState({ isOwnTariffLoading: false });\r\n } catch (err) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n } finally {\r\n }\r\n };\r\n\r\n renderSelectTariffForm = () => {\r\n return (\r\n {\r\n this.onSubmitTariffForm();\r\n }}\r\n >\r\n \r\n \r\n
\r\n {this.translatorService.Tranlate(\r\n 'OWN_TARIFF_LABEL',\r\n 'Tariff'\r\n )} *\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n {this.translatorService.Tranlate('EDIT_SELECT_TARIFF_CANCEL_BTN', 'Anuleaza')}\r\n \r\n \r\n
\r\n \r\n );\r\n };\r\n\r\n handleCloseClientCommentModal = () => {\r\n this.setState({\r\n isClientCommentOpen: false,\r\n orginalCalculationTypeId: null\r\n });\r\n }\r\n\r\n isButtonDisabled = (item: IReferential) => {\r\n const {\r\n disableButtonForMoreThenTwoRowsChecked,\r\n disableButtonForMoreThenOneRowChecked,\r\n backButtonDisabled\r\n } = this.state;\r\n \r\n // Logic for disabling button based on item code\r\n if (item.code === this.ACTION_COMPARE) {\r\n return disableButtonForMoreThenTwoRowsChecked;\r\n }\r\n \r\n if (\r\n item.code === CalculationTypeCode.ORG ||\r\n item.code === CalculationTypeCode.ALT ||\r\n item.code === this.ACTION_GT_VAL ||\r\n item.code === this.RADAR ||\r\n item.code === this.ACTION_INSURER_CALCULATION\r\n ) {\r\n return false;\r\n }\r\n \r\n if (item.code === this.ACTION_BACK_BUTTON) {\r\n return backButtonDisabled;\r\n }\r\n \r\n return disableButtonForMoreThenOneRowChecked;\r\n }; \r\n\r\n generateLKQReports = async (calculationId: number, rowNumber: number) => {\r\n try {\r\n //Get the Offer Data\r\n const reportParameters = [\r\n {\r\n name: 'calculationId',\r\n value: calculationId.toString()\r\n } as ReportParameter,\r\n {\r\n name: 'caseId',\r\n value: this.props.caseSettingsState.case!.id.toString()\r\n } as ReportParameter,\r\n {\r\n name: 'organizationId',\r\n value: this.props.appState.appUser!.organization?.id.toString()\r\n } as ReportParameter\r\n ];\r\n\r\n const reportServiceParameters = [\r\n {\r\n name: 'calculationId',\r\n value: calculationId.toString()\r\n } as ReportParameter,\r\n {\r\n name: 'caseId',\r\n value: this.props.caseSettingsState.case!.id.toString()\r\n } as ReportParameter,\r\n {\r\n name: 'lang',\r\n value: this.props.appState.appUser!.organization?.country?.code?.toLowerCase() ?? \"ro\"\r\n } as ReportParameter\r\n ];\r\n\r\n const [fileBlob, serviceFileBlob] = await Promise.all([\r\n await this.reportsService.GetRepairReport(ReportTypeCode.DEVIZ_REPARATIE.toString(), this.props.caseSettingsState.case!.id, reportParameters),\r\n await this.reportsService.GetRepairReport(ReportTypeCode.DEVIZ_REP_OFERTA.toString(), this.props.caseSettingsState.case!.id, reportServiceParameters),\r\n ]);\r\n\r\n //Save the OfferReport into attachments\r\n const attachments: CaseAttachment[] = [];\r\n attachments.push({\r\n id: 0,\r\n caseId: this.props.caseSettingsState.case!.id,\r\n attachmentTypeId: this.state.attachType.id,\r\n attachmentType: this.state.attachType,\r\n file: new File([fileBlob], \r\n this.translatorService.Tranlate('CASE_TAB_CALCULATION_OFFER_LABEL', 'Oferta') + ' '+ rowNumber + '.pdf', { type: 'application/pdf' }),\r\n isSelection: false,\r\n includeInOtherTab: true\r\n } as CaseAttachment);\r\n\r\n attachments.push({\r\n id: 0,\r\n caseId: this.props.caseSettingsState.case!.id,\r\n attachmentTypeId: this.state.attachType.id,\r\n attachmentType: this.state.attachType,\r\n file: new File([serviceFileBlob], \r\n this.translatorService.Tranlate('CASE_TAB_CALCULATION_SERVICE_REPAIR_LABEL', 'Deviz Service') + ' '+ rowNumber + '.pdf', { type: 'application/pdf' }),\r\n isSelection: false,\r\n includeInOtherTab: true\r\n } as CaseAttachment);\r\n\r\n const newFiles = await this.caseService.AddCaseAttachment(attachments);\r\n\r\n console.log('newFiles', newFiles);\r\n\r\n } catch (error) {\r\n console.log('error', error);\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n \r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n this.reportsService = (this.context as AppContext).reportsService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n this.appUserService = (this.context as AppContext).appUserService;\r\n this.orderService = (this.context as AppContext).orderService;\r\n this.vehicleService = (this.context as AppContext).vehicleService;\r\n this.workflowService = (this.context as AppContext).workflowService;\r\n this.tariffService = (this.context as AppContext).tariffService;\r\n const step = this.getWorkflowSectionStep(this.props.workflowForm.workflowSectionStepId);\r\n const options = {\r\n viewColumns: false,\r\n filter: false,\r\n search: false,\r\n pagination: false,\r\n selectableRows: 'multiple' as SelectableRows,\r\n selectableRowsHeader: false,\r\n disableToolbarSelect: true,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n elevation: 0,\r\n rowsSelected: this.state.rowsSelected,\r\n isRowSelectable: (dataIndex: number) => {\r\n if (this.state.caseCalculationHistory.length > 0) {\r\n if (this.state.caseCalculationHistory[dataIndex].calculationType.code === CalculationTypeCode.ORG) {\r\n return this.state.caseCalculationHistory[dataIndex].amount > 0;\r\n }\r\n return true;\r\n }\r\n return true;\r\n },\r\n onRowsSelect: (rowsSelected: any, allRows: any[]) => {\r\n const selected = allRows\r\n .map((item) => item.index)\r\n .sort(function (a, b) {\r\n return b - a;\r\n });\r\n if (allRows.length > 2) {\r\n this.setState({\r\n disableButtonForMoreThenOneRowChecked: true,\r\n disableButtonForMoreThenTwoRowsChecked: true,\r\n rowsSelected: selected\r\n });\r\n } else {\r\n if (allRows.length === 2) {\r\n this.setState({\r\n disableButtonForMoreThenOneRowChecked: true,\r\n disableButtonForMoreThenTwoRowsChecked: false,\r\n rowsSelected: selected\r\n });\r\n }\r\n\r\n if (allRows.length === 1) {\r\n this.setState({\r\n disableButtonForMoreThenOneRowChecked: false,\r\n disableButtonForMoreThenTwoRowsChecked: true,\r\n rowsSelected: selected\r\n });\r\n }\r\n if (allRows.length === 0) {\r\n this.setState({\r\n disableButtonForMoreThenOneRowChecked: true,\r\n disableButtonForMoreThenTwoRowsChecked: true,\r\n rowsSelected: selected\r\n });\r\n }\r\n }\r\n }\r\n };\r\n\r\n const offerTypeCode = this.props.caseSettingsState?.case?.caseType?.code;\r\n\r\n const caseParameters = this.props.caseSettingsState?.case?.caseParameters || [];\r\n let caseVatRate =\r\n caseParameters.find((x) => x.parameter?.code === ParametreCode.TVA)?.value || 0;\r\n caseVatRate = +caseVatRate;\r\n\r\n const caseValuation = this.props.caseSettingsState?.case?.caseValuation;\r\n\r\n const caseHasNoVAT = offerTypeCode === CaseTypeCode.AQUISITION && caseVatRate === 0;\r\n const vehicleHasNoVat =\r\n offerTypeCode === CaseTypeCode.SALE && this.props.vehicleState.vehicle?.purchaseVatRate === 0;\r\n\r\n const purchasePrice = (this.props.vehicleState.vehicle?.purchasePrice as number) || 0;\r\n\r\n let basePrice = 0;\r\n let tradeInPrice = 0;\r\n let offerPrice = 0;\r\n let retailPrice = 0;\r\n\r\n const basePriceLabel = this.translatorService.Tranlate(\r\n 'VALUATION_BASE_PRICE_LABEL',\r\n 'Pret de Baza (incl. TVA)'\r\n );\r\n const tradeInPriceLabel = 'Trade-in price (incl. VAT)';\r\n const offerPriceLabel = 'Offer price (incl. VAT)';\r\n const retailPriceLabel = 'Retail price (incl. VAT)';\r\n const accountingValueLabel = this.translatorService.Tranlate(\r\n 'CASE_EVALUATION_ACCOUNTING_VALUE',\r\n 'Valoare Contabila'\r\n );\r\n const dealerPriceLabel = this.translatorService.Tranlate(\r\n 'CASE_EVALUATION_DEALER_PRICE',\r\n 'Pret dealer'\r\n );\r\n const employPriceLabel = this.translatorService.Tranlate(\r\n 'CASE_EVALUATION_EMPLOYEE_PRICE',\r\n 'Pret angajat'\r\n );\r\n\r\n if (caseValuation) {\r\n basePrice = caseValuation.priceAsNew;\r\n tradeInPrice = caseValuation.tradeInPrice;\r\n offerPrice = caseValuation.offerPrice;\r\n retailPrice = caseValuation.retailPrice;\r\n\r\n // if (caseHasNoVAT) {\r\n // basePrice = Utils.getPriceWithoutVat(basePrice, caseValuation.vatRate);\r\n // tradeInPrice = Utils.getPriceWithoutVat(tradeInPrice, caseValuation.vatRate);\r\n // offerPrice = Utils.getPriceWithoutVat(offerPrice, caseValuation.vatRate);\r\n // retailPrice = Utils.getPriceWithoutVat(retailPrice, caseValuation.vatRate);\r\n // }\r\n\r\n // if (vehicleHasNoVat) {\r\n // tradeInPrice = Utils.getPriceWithoutVat(tradeInPrice, caseValuation.vatRate);\r\n // offerPrice = Utils.getPriceWithoutVat(offerPrice, caseValuation.vatRate);\r\n // retailPrice = Utils.getPriceWithoutVat(retailPrice, caseValuation.vatRate);\r\n\r\n // tradeInPrice = Utils.getPriceWithMarginVat(tradeInPrice, +purchasePrice, caseVatRate);\r\n // offerPrice = Utils.getPriceWithMarginVat(offerPrice, +purchasePrice, caseVatRate);\r\n // retailPrice = Utils.getPriceWithMarginVat(retailPrice, +purchasePrice, caseVatRate);\r\n // }\r\n // }\r\n\r\n // if (caseHasNoVAT) {\r\n // tradeInPriceLabel = Utils.removeVatFromPriceLabel(tradeInPriceLabel);\r\n // offerPriceLabel = Utils.removeVatFromPriceLabel(offerPriceLabel);\r\n // retailPriceLabel = Utils.removeVatFromPriceLabel(retailPriceLabel);\r\n // }\r\n }\r\n\r\n \r\n\r\n const firstCalculation = this.state.caseCalculationHistoryCopy.length > 0 ? this.state.caseCalculationHistoryCopy[0] : null;\r\n console.log('firstCalculation', firstCalculation);\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n
\r\n
\r\n {this.state.caseCalculationActionTypeList\r\n .filter((x) => this.state.hasRights && !this.state.executing)\r\n .map((item) => (\r\n
\r\n {item.code === this.ACTION_BACK_BUTTON ? (\r\n } // Icon on the left\r\n onClick={(e) => this.handleCalculationsTypesButton(item.id, item.code)}\r\n >\r\n {item.displayName} {/* Text on the right */}\r\n \r\n \r\n ) : (\r\n this.handleCalculationsTypesButton(item.id, item.code)}\r\n >\r\n {item.displayName}\r\n \r\n )}\r\n
\r\n ))}\r\n {this.state.workflowCalculation !== null &&\r\n this.state.workflowCalculation!.qualityControlCertificate ? (\r\n
\r\n this.handleQualityControlButton()}\r\n >\r\n {this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_FORM_QUALITY_CONTROL_BUTTON',\r\n 'Control calitate'\r\n )}\r\n \r\n
\r\n ) : null}\r\n\r\n {this.state.workflowReports.length !== 0 ? (\r\n
\r\n {\r\n this.setState({ openMenuItem: e.currentTarget });\r\n }}\r\n disabled={!this.state.rowsSelected.length && !this.state.workflowReports.find((item) => item.report!.code === ReportTypeCode.DEVIZ_REP_AP)}\r\n >\r\n \r\n {this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_FORM_DOCUMENTS_BUTTON',\r\n 'Documente'\r\n )}\r\n \r\n \r\n \r\n \r\n \r\n\r\n {\r\n this.setState({ openMenuItem: false });\r\n }}\r\n getContentAnchorEl={null}\r\n anchorOrigin={{\r\n vertical: 'bottom',\r\n horizontal: 'center'\r\n }}\r\n transformOrigin={{\r\n vertical: 'top',\r\n horizontal: 'center'\r\n }}\r\n >\r\n {this.state.workflowReports.map((item) => {\r\n if (\r\n (item.report!.code === ReportTypeCode.ESTIMATE_OE && this.state.disableButtonForMoreThenOneRowChecked) ||\r\n (item.report!.code === ReportTypeCode.ESTIMATE_OE && this.props.caseSettingsState?.caseSettings!.workflow?.isCarfixIntegration &&\r\n this.state.rowsSelected.length && this.state.caseCalculationHistory[this.state.rowsSelected[0]].calculationType.code == CalculationTypeCode.ALT.toString())\r\n ) {\r\n return null;\r\n }\r\n if (\r\n (item.report!.code === ReportTypeCode.DEVIZ_AUTOWORLD &&\r\n this.state.caseCalculationHistory.length == 0) ||\r\n (item.report!.code === ReportTypeCode.DEVIZ_AUTOWORLD &&\r\n this.state.disableButtonForMoreThenOneRowChecked)\r\n ) {\r\n return null;\r\n }\r\n if (\r\n (item.report!.code === ReportTypeCode.DEVIZ_CLIENT &&\r\n this.state.caseCalculationHistory.length == 0) ||\r\n (item.report!.code === ReportTypeCode.DEVIZ_CLIENT &&\r\n this.state.disableButtonForMoreThenOneRowChecked)\r\n ) {\r\n return null;\r\n }\r\n if (\r\n (item.report!.code === ReportTypeCode.DEVIZ_REPARATIE && this.state.disableButtonForMoreThenOneRowChecked) ||\r\n (item.report!.code === ReportTypeCode.DEVIZ_REPARATIE && this.props.caseSettingsState?.caseSettings!.workflow?.isCarfixIntegration &&\r\n this.state.rowsSelected.length && this.state.caseCalculationHistory[this.state.rowsSelected[0]].calculationType.code == CalculationTypeCode.ORG.toString())\r\n ) {\r\n return null;\r\n }\r\n return (\r\n \r\n this.reportClick(item.report!.code, item.report!.displayName)\r\n }\r\n >\r\n {item.report!.displayName}\r\n \r\n );\r\n })}\r\n \r\n
\r\n ) : null}\r\n
\r\n {this.props.caseSettingsState.case!.caseValuation === null ? (\r\n ''\r\n ) : (\r\n \r\n \r\n
\r\n
{this.translatorService.Tranlate('CASE_CALCULATION_EVALUATION_ROW', 'Evaluare')}
\r\n {\r\n this.setState({ showHistoryModal: true });\r\n }}\r\n >\r\n {this.translatorService.Tranlate('CASE_CALCULATION_EVALUATION_HISTORY', 'Istoric Evaluari')}\r\n \r\n
\r\n\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
{tradeInPrice ? tradeInPrice.toFixed(2) : 0} €
\r\n
{offerPrice ? offerPrice.toFixed(2) : 0} €
\r\n
{retailPrice ? retailPrice.toFixed(2) : 0} €
\r\n
\r\n \r\n \r\n \r\n \r\n
{basePrice.toFixed(2)} €
\r\n
\r\n
\r\n
\r\n\r\n
\r\n )}\r\n\r\n {this.props.appState?.appUser?.userRole?.code === 'MAVO_ADMIN' && this.props.caseSettingsState.case!.caseValuation !== null ? \r\n \r\n \r\n
{accountingValueLabel}
\r\n \r\n
{this.state.accoutingValue ? this.state.accoutingValue.toFixed(2) : 0} €
\r\n
\r\n
\r\n \r\n \r\n
{dealerPriceLabel}
\r\n \r\n
{this.state.discretionaryPriceDealer ? this.state.discretionaryPriceDealer.toFixed(2) : 0} €
\r\n
\r\n
\r\n \r\n \r\n
{employPriceLabel}
\r\n \r\n
{this.state.discretionaryPriceEmployee ? this.state.discretionaryPriceEmployee.toFixed(2) : 0} €
\r\n
\r\n
\r\n
: ''}\r\n\r\n \r\n {!this.showManipulation(firstCalculation) ? (\r\n ''\r\n ) : (\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
{firstCalculation ? this.displayValueWithCurrency(firstCalculation.amountPieces, firstCalculation)\r\n + ' (' + this.translatorService.Tranlate('WITHOUT_VAT', 'Fara TVA') + ')' : ''}
\r\n
{firstCalculation ? this.displayValueWithCurrency(firstCalculation.smallPartsAquisitionValue, firstCalculation)\r\n + ' (' + this.translatorService.Tranlate('WITHOUT_VAT', 'Fara TVA') + ')' : ''}
\r\n
{firstCalculation ? firstCalculation.manipulationPercent : ''} %
\r\n
{firstCalculation ? this.displayValueWithCurrency(firstCalculation.manipulationValue, firstCalculation)\r\n + ' (' + this.translatorService.Tranlate('WITHOUT_VAT', 'Fara TVA') + ')' : ''}
\r\n
{this.state.lastServiceCalculation ? this.displayValueWithCurrency(this.state.lastServiceCalculation.amountLaborWithDiscount + this.state.lastServiceCalculation.amountPaintingMaterialsWithDiscount + this.state.lastServiceCalculation.amountPaintingLaborWithDiscount, this.state.lastServiceCalculation)\r\n + ' (' + this.translatorService.Tranlate('WITHOUT_VAT', 'Fara TVA') + ')' : ''}
\r\n
{this.state.lastServiceCalculation && firstCalculation ? this.displayValueWithCurrency(firstCalculation.smallPartsAquisitionValue + firstCalculation.manipulationValue + this.state.lastServiceCalculation.amountLaborWithDiscount + this.state.lastServiceCalculation.amountPaintingMaterialsWithDiscount + this.state.lastServiceCalculation.amountPaintingLaborWithDiscount, firstCalculation)\r\n + ' (' + this.translatorService.Tranlate('WITHOUT_VAT', 'Fara TVA') + ')' : ''}
\r\n
\r\n
\r\n
\r\n \r\n
\r\n )}\r\n
\r\n {this.state.caseCalculationHistory.length == 0 ? (\r\n \r\n ) : (\r\n \r\n )}\r\n\r\n
\r\n\r\n \r\n {this.state.selectedCalculationButton === null ? (\r\n \r\n
\r\n \r\n {this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_FORM_CALCULATION_DETAILS_MODAL_TITLE',\r\n 'Detalii Calculatie'\r\n )}\r\n \r\n
\r\n \r\n \r\n \r\n \r\n ) : this.state.selectedCalculationButton === this.ACTION_COMPARE ? (\r\n \r\n \r\n \r\n \r\n {this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_FORM_ITEMS_MODAL_TITLE',\r\n 'Repere'\r\n )}\r\n \r\n \r\n \r\n \r\n {moment\r\n .utc(this.state.caseCalculationHistory[this.state.rowsSelected[0]].date)\r\n .local()\r\n .format(this.props.appState.dateFormat)}\r\n \r\n \r\n {this.state.caseCalculationHistory[this.state.rowsSelected[0]]!\r\n .amountWithoutTVA +\r\n ' ' +\r\n this.state.caseCalculationHistory[this.state.rowsSelected[0]]!\r\n .currencyCode}\r\n \r\n \r\n {\r\n this.state.caseCalculationHistory[this.state.rowsSelected[0]]!.user!\r\n .userName\r\n }\r\n \r\n \r\n \r\n \r\n {moment\r\n .utc(this.state.caseCalculationHistory[this.state.rowsSelected[1]]!.date)\r\n .local()\r\n .format(this.props.appState.dateFormat)}\r\n \r\n \r\n {this.state.caseCalculationHistory[this.state.rowsSelected[1]]!\r\n .amountWithoutTVA +\r\n ' ' +\r\n this.state.caseCalculationHistory[this.state.rowsSelected[1]]!\r\n .currencyCode}\r\n \r\n \r\n {\r\n this.state.caseCalculationHistory[this.state.rowsSelected[1]]!.user!\r\n .userName\r\n }\r\n \r\n \r\n \r\n \r\n ) : null}\r\n\r\n \r\n {this.state.selectedCalculationButton === null ? (\r\n \r\n ) : this.state.selectedCalculationButton === this.ACTION_COMPARE ? (\r\n \r\n ) : null}\r\n \r\n {this.state.selectedCalculationButton === null ? null : this.state\r\n .selectedCalculationButton === this.ACTION_COMPARE ? (\r\n \r\n \r\n {this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_FORM_CLOSE_MODAL',\r\n 'Inchide'\r\n )}\r\n \r\n \r\n ) : null}\r\n \r\n
\r\n \r\n {this.props.caseSettingsState?.caseSettings!.workflow?.isCarfixIntegration ? this.translatorService.Tranlate(\r\n 'CASE_CAR_CALCULATIONS_SEND_REPAIR_OFFER_BUTTON',\r\n 'Send repair Offer'\r\n ) : step?.workflowStep?.code == 'TR_ACC' ? this.translatorService.Tranlate(\r\n 'CASE_CALCULATIONS_SEND_TR_ACC_BUTTON',\r\n 'Trimite'\r\n ) : this.translatorService.Tranlate(\r\n 'CASE_CALCULATIONS_SEND_BUTTON',\r\n 'Salveaza'\r\n )}\r\n \r\n
\r\n
\r\n ) : null}\r\n\r\n \r\n
\r\n

\r\n {this.translatorService.Tranlate(\r\n 'WARNING_UNSAVED_CHANGES',\r\n 'Aveti modificari nesalvate. Sigur doriti sa iesiti?'\r\n )}\r\n

\r\n
\r\n \r\n \r\n {this.translatorService.Tranlate('WORKFLOW_DOCUMENTS_TYPE_TAB_YES', 'Da')}\r\n \r\n \r\n {\r\n this.setState({ isDialogModifiedOpen: false });\r\n }}\r\n color=\"primary\"\r\n variant=\"contained\"\r\n className=\"mx-1\"\r\n >\r\n \r\n {this.translatorService.Tranlate('WORKFLOW_DOCUMENTS_TYPE_TAB_NO', 'Nu')}\r\n \r\n \r\n
\r\n
\r\n \r\n\r\n \r\n \r\n \r\n {this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_FORM_ALTERNATIVE_CALCULATION_DETAILS_MODAL_TITLE',\r\n 'Detalii calculatie alternativa'\r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n {this.translatorService.Tranlate('VALUATION_DIALOG_HEADER', 'Evaluare Masina')}\r\n \r\n {\r\n this.setState({ isValuationOpen: false });\r\n }}\r\n size={'small'}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n {this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_FORM_QUALITY_CONTROL_MODAL_TITLE',\r\n 'Control calitate'\r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n Radar\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n this.setState({ showHistoryModal: false })}\r\n id={this.props.match.params.id}\r\n />\r\n {!this.state.workflowCalculation?.viewClientCommentsHistory ? null :\r\n (this.state.isLoading ? null : (\r\n \r\n ))}\r\n {this.state.isMultipleTariffDialogOpen ? (\r\n \r\n \r\n \r\n {this.translatorService.Tranlate('SELECT_TARIFF_HEADER', 'Selecteaza tarif')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n {!this.state.isOwnTariffLoading ? (\r\n this.renderSelectTariffForm()\r\n ) : ''}\r\n \r\n \r\n ) : (\r\n ''\r\n )}\r\n \r\n \r\n \r\n \r\n {`${this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_FORM_CLIENT_COMMENT_MODAL',\r\n 'Vă rugăm să țineți cont de solicitarea clientului - '\r\n )} `}\r\n {this.state.caseRequests.length > 0 ? (\r\n \r\n {this.state.caseRequests[0].text}\r\n \r\n ) : ''} !\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalCaseDetailsCaseTabCalculationsFormProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app\r\n }),\r\n null,\r\n mergeProps\r\n)(withSnackbar(CaseDetailsCaseTabCalculationsForm as any));\r\n","import React from 'react';\r\nimport moment from 'moment';\r\n\r\nimport { MuiPickersUtilsProvider, DatePicker as MaterialDatePicker } from '@material-ui/pickers';\r\nimport { DateType } from '@date-io/type';\r\n\r\nimport MomentUtils from '@date-io/moment';\r\n\r\ntype Props = {\r\n value: string | number | Date | null | undefined;\r\n onChange: (date: DateType | null) => void;\r\n locale: string;\r\n disabled?: boolean;\r\n required?: boolean;\r\n label?: React.ReactNode;\r\n format?: string;\r\n helperText?: React.ReactNode;\r\n};\r\n\r\nconst DatePicker: React.FC = ({\r\n value,\r\n onChange,\r\n locale,\r\n disabled,\r\n required,\r\n label,\r\n format,\r\n helperText\r\n}: Props) => (\r\n \r\n \r\n \r\n);\r\n\r\nexport default DatePicker;\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n ApplicationState,\r\n CaseSettingsState,\r\n AppState,\r\n CaseSettingsActionCreators\r\n} from '../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { isNullOrUndefined } from 'util';\r\nimport { CaseVehicleHistory, Model, ModelData, UndocumentedModel } from '../../interfaces/Case';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport { IReferentialService } from '../../services/Interfaces/IReferentialService';\r\nimport { WorkflowSectionStep, WorkflowSectionStepForm } from '../../interfaces/Workflow';\r\nimport Form from '@rjsf/material-ui';\r\nimport { ISubmitEvent, FormValidation, IChangeEvent } from '@rjsf/core';\r\nimport { FormButton } from '../../helpers/forms/FormButton';\r\nimport moment from 'moment';\r\nimport { GTErrorCode, ReferentialCode, RoleClaimsEnum } from '../../helpers/Constants';\r\nimport Referentials from '../../helpers/Referentials.json';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport { FormHelpers } from '../../helpers/forms/FormHelpers';\r\nimport { AppUser } from '../../interfaces/AppUser';\r\nimport { MaterialUiPickersDate } from '@material-ui/pickers/typings/date';\r\nimport DatePicker from '../_shared/DatePicker';\r\nimport _ from 'lodash';\r\nimport { Button, Dialog, DialogContent, DialogTitle, FormControl, Grid, IconButton, InputLabel, MenuItem, Select, Typography } from '@material-ui/core';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport * as R from 'ramda';\r\n\r\ninterface ICaseDetailsCaseTabCarDetailsFormState {\r\n formData: CaseVehicleHistory;\r\n isLoading: boolean;\r\n carCategoryList: IReferential[];\r\n modelList: Model[];\r\n brandList: IReferential[];\r\n filteredModelList: IReferential[];\r\n hasRights: boolean;\r\n executing: boolean;\r\n undocumentedModelList: UndocumentedModel[];\r\n isDialogOpen: boolean;\r\n modelData: ModelData[];\r\n selectedModelData: ModelData | null;\r\n carClassList: IReferential[];\r\n initialNumberOfKilometers: number | undefined;\r\n step: WorkflowSectionStep | null;\r\n hasAdminRole: boolean;\r\n}\r\nexport interface ExternalCaseDetailsCaseTabCarDetailsFormProps {\r\n workflowForm: WorkflowSectionStepForm;\r\n}\r\n\r\ntype ICaseDetailsCaseTabCarDetailsFormProps = {\r\n caseSettingsState: CaseSettingsState;\r\n appState: AppState;\r\n} & typeof CaseSettingsActionCreators &\r\n ExternalCaseDetailsCaseTabCarDetailsFormProps &\r\n ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass CaseDetailsCaseTabCarDetailsForm extends React.PureComponent<\r\n ICaseDetailsCaseTabCarDetailsFormProps,\r\n ICaseDetailsCaseTabCarDetailsFormState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private caseService!: ICaseService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n state = {\r\n formData: {} as CaseVehicleHistory,\r\n isLoading: true,\r\n carCategoryList: [],\r\n modelList: [],\r\n brandList: [],\r\n filteredModelList: [],\r\n hasRights: false,\r\n executing: false,\r\n undocumentedModelList: [],\r\n isDialogOpen: false,\r\n modelData: [],\r\n selectedModelData: null,\r\n carClassList: [],\r\n step: null,\r\n hasAdminRole: false\r\n } as unknown as ICaseDetailsCaseTabCarDetailsFormState;\r\n\r\n public componentDidMount() {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (isNullOrUndefined(caseSettings) || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadData();\r\n }\r\n );\r\n }\r\n\r\n loadData = async () => {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n\r\n if (isNullOrUndefined(caseSettings) || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n const refCarCateg = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.CarCategory\r\n );\r\n const refCarBrand = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.CarBrands\r\n );\r\n const refCarClass = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.CarClass\r\n );\r\n\r\n const caseVehicle = this.props.caseSettingsState.case!.caseVehicle;\r\n let brandId = 0;\r\n if (!isNullOrUndefined(caseVehicle) && !isNullOrUndefined(caseVehicle.brandId)) {\r\n brandId = caseVehicle.brandId;\r\n }\r\n\r\n const [carCategoryList, brandList, modelList, undocumentedModelList, carClassList] = await Promise.all([\r\n this.appReferentialService.Get(refCarCateg!.baseUrl),\r\n this.appReferentialService.Get(refCarBrand!.baseUrl),\r\n this.caseService.GetCarModelsByBrand(brandId),\r\n this.caseService.GetCarUndocumentedModelsByBrand(brandId),\r\n this.appReferentialService.Get(refCarClass!.baseUrl)\r\n ]);\r\n\r\n let modelList1: Model[] = [];\r\n if (modelList.length === 0 && brandList.length !== 0) {\r\n modelList1 = await this.caseService.GetCarModelsByBrand(brandList[0].id);\r\n }\r\n\r\n const hasRights = FormHelpers.HasRights(\r\n this.props.workflowForm.workflowFormPermissions,\r\n this.props.appState.appUser!,\r\n this.props.caseSettingsState.case!.caseStatus.caseStatusId\r\n );\r\n\r\n const step = this.getWorkflowSectionStep(this.props.workflowForm.workflowSectionStepId);\r\n const hasAdminRole = this.hasRight(RoleClaimsEnum.Admin);\r\n console.log('hasAdminRole', hasAdminRole);\r\n\r\n if (isNullOrUndefined(this.props.caseSettingsState.case!.caseVehicle)) {\r\n this.setState({\r\n formData: {\r\n caseId: caseId,\r\n id: 0\r\n } as CaseVehicleHistory,\r\n isLoading: false,\r\n carCategoryList: carCategoryList,\r\n brandList: brandList,\r\n modelList: modelList1,\r\n undocumentedModelList: undocumentedModelList,\r\n hasRights: hasAdminRole ? true : hasRights,\r\n carClassList: carClassList,\r\n step: step,\r\n hasAdminRole: hasAdminRole\r\n });\r\n\r\n return;\r\n }\r\n\r\n if (!isNullOrUndefined(caseVehicle.firstPlateDate)) {\r\n caseVehicle.firstPlateDate = moment(caseVehicle.firstPlateDate).format(moment.HTML5_FMT.DATE);\r\n }\r\n if (!isNullOrUndefined(caseVehicle.registrationDate)) {\r\n caseVehicle.registrationDate = moment(caseVehicle.registrationDate).format(\r\n moment.HTML5_FMT.DATE\r\n );\r\n }\r\n if (!isNullOrUndefined(caseVehicle.motDate)) {\r\n caseVehicle.motDate = moment(caseVehicle.motDate).format(\r\n moment.HTML5_FMT.DATE\r\n );\r\n }\r\n\r\n for (const [key, value] of Object.entries(caseVehicle)) {\r\n if (isNullOrUndefined(value)) {\r\n caseVehicle[key] = undefined;\r\n }\r\n }\r\n\r\n\r\n this.setState({\r\n formData: caseVehicle,\r\n isLoading: false,\r\n carCategoryList: carCategoryList,\r\n brandList: brandList,\r\n modelList: modelList,\r\n undocumentedModelList: undocumentedModelList,\r\n hasRights: hasAdminRole ? true : hasRights,\r\n carClassList: carClassList,\r\n initialNumberOfKilometers: caseVehicle.numberOfKilometers,\r\n step: step,\r\n hasAdminRole: hasAdminRole\r\n });\r\n };\r\n\r\n \r\n public hasRight = (right: string): boolean => {\r\n return this.props.appState!.user!.profile.role.includes(right);\r\n };\r\n\r\n handleArraySchema = (schema: any) => {\r\n if (isNullOrUndefined(schema.properties)) {\r\n return schema;\r\n }\r\n\r\n for (const key of Object.keys(schema.properties)) {\r\n if (schema.properties[key].anyOf === undefined) {\r\n continue;\r\n }\r\n if (schema.properties[key].anyOf.length === 0) {\r\n continue;\r\n }\r\n\r\n if (\r\n schema.properties[key].anyOf !== undefined &&\r\n schema.properties[key].anyOf.length != 0 &&\r\n schema.properties[key].anyOf[0].title === 'CAR_BRAND_ENUM'\r\n ) {\r\n schema.properties[key].anyOf = this.state.brandList.map((item, index) => {\r\n return {\r\n type: 'number',\r\n title: item.displayName,\r\n enum: [item.id]\r\n };\r\n });\r\n }\r\n if (\r\n schema.properties[key].anyOf !== undefined &&\r\n schema.properties[key].anyOf.length != 0 &&\r\n schema.properties[key].anyOf[0].title === 'CAR_MODEL_ENUM'\r\n ) {\r\n const models = this.state.modelList.map((item, index) => {\r\n return {\r\n type: 'number',\r\n title: item.displayName,\r\n enum: [item.id]\r\n };\r\n });\r\n schema.properties[key].anyOf = models;\r\n }\r\n\r\n if (\r\n schema.properties[key].anyOf !== undefined &&\r\n schema.properties[key].anyOf.length != 0 &&\r\n schema.properties[key].anyOf[0].title === 'CAR_CATEGORY_ENUM'\r\n ) {\r\n schema.properties[key].anyOf = this.state.carCategoryList.map((item) => {\r\n return {\r\n type: 'number',\r\n title: item.displayName,\r\n enum: [item.id]\r\n };\r\n });\r\n }\r\n\r\n if (\r\n schema.properties[key].anyOf !== undefined &&\r\n schema.properties[key].anyOf.length != 0 &&\r\n schema.properties[key].anyOf[0].title === 'CAR_CLASS_ENUM'\r\n ) {\r\n schema.properties[key].anyOf = this.state.carClassList.map((item, index) => {\r\n return {\r\n type: 'number',\r\n title: item.displayName,\r\n enum: [item.id]\r\n };\r\n });\r\n }\r\n }\r\n\r\n return schema;\r\n };\r\n \r\n getWorkflowSectionStep = (workflowSectionStepId: number): WorkflowSectionStep | null => {\r\n const sections = this.props.caseSettingsState.caseSettings!.workflow.workflowSections!;\r\n for (const section of sections) {\r\n for (const step of section.workflowSectionSteps) {\r\n if (step.id == workflowSectionStepId) {\r\n return step;\r\n }\r\n }\r\n }\r\n return null;\r\n };\r\n\r\n validate = (formData: any, errors: FormValidation, formCode: string) => {\r\n if (new Date(formData.firstPlateDate) >= new Date()) {\r\n errors.firstPlateDate.addError(\r\n this.translatorService.Tranlate(\r\n 'FRM_CAR_DATA_FIRST_DATE_PLATE_LESS_CURRENT_DATE_ERROR',\r\n 'Data primei inmatriculari trebuie sa fie mai mica decat data curenta!'\r\n )\r\n );\r\n }\r\n if (new Date(formData.registrationDate) >= new Date(formData.firstPlateDate)) {\r\n errors.registrationDate.addError(\r\n this.translatorService.Tranlate(\r\n 'FRM_CAR_DATA_REGISTRATION_DATE_LESS_FIRST_DATE_PLATE_ERROR',\r\n 'Data fabricatiei trebuie sa fie mai mica decat data primei inmatriculari!'\r\n )\r\n );\r\n }\r\n if (!R.isNil(formData.vin)) {\r\n if (formData.vin.length < 17) {\r\n errors.vin.addError(\r\n this.translatorService.Tranlate('FRM_MINIMUM_LENGTH_ERROR', \"nu poate fi mai mică de {0} caractere\").replace(\r\n '{0}',\r\n '17'\r\n )\r\n );\r\n }\r\n }\r\n\r\n if (!R.isNil(this.state.step) && !this.state.hasAdminRole) {\r\n const step = this.state.step;\r\n if (step.isCurrent(this.props.caseSettingsState.case!.caseStatus.caseStatusId)) {\r\n if (!isNullOrUndefined(formData.numberOfKilometers) && !isNullOrUndefined(this.state.initialNumberOfKilometers)) {\r\n if (formData.numberOfKilometers <= this.state.initialNumberOfKilometers) {\r\n errors.numberOfKilometers.addError(\r\n this.translatorService.Tranlate('INITIAL_NUMBER_OF_KILOMETERS', ' Numarul de kilometri la interventia anterioara :') + ' ' + this.state.initialNumberOfKilometers + ' km'\r\n );\r\n }\r\n }\r\n }\r\n }\r\n\r\n\r\n return errors;\r\n };\r\n\r\n onSubmit = async (e: ISubmitEvent, code: string) => {\r\n try {\r\n this.setState({ executing: true });\r\n\r\n let data = e.formData as CaseVehicleHistory;\r\n const brand = _.find(this.state.brandList, function(object) {\r\n return object.id == data.brandId;\r\n });\r\n const model = _.find(this.state.modelList, function(object) {\r\n return object.id == data.modelId;\r\n });\r\n\r\n const undocumentedModel = _.find(this.state.undocumentedModelList, function(object) {\r\n return object.code == model?.code;\r\n });\r\n if (undocumentedModel) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('UNDOCUMENTED_MAKE_AND_MODELS', 'Autovehiculul este documentat parțial și este posibil să lipsească informațiile pentru unele piese. Dacă ai nevoie de ajutor te rugăm să ne trimiți un mesaj la suport@gtmotive.ro.'), {\r\n variant: 'warning',\r\n autoHideDuration: 5000\r\n });\r\n }\r\n\r\n const makeWithNoVinQuery = _.find(this.state.undocumentedModelList, function(object) {\r\n return object.brand == brand?.displayName && !object.hasVinQuery;\r\n });\r\n if (makeWithNoVinQuery) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('MAKE_WITH_NO_VIN_QUERY', 'Pentru auto selectat nu se poate face identificarea conform VIN - Vă rugăm să verificaţi datele auto la deschiderea calculaţiei!'), {\r\n variant: 'warning',\r\n autoHideDuration: 5000\r\n });\r\n\r\n }\r\n \r\n data.caseId = this.props.caseSettingsState.case!.id;\r\n if (isNullOrUndefined(data.id)) {\r\n data.id = 0;\r\n }\r\n\r\n if (data.id === 0) {\r\n data = await this.caseService.AddCaseVehicle(data);\r\n } else {\r\n await this.caseService.UpdateCaseVehicle(data);\r\n }\r\n\r\n await this.submitForm(data.caseId, this.props.workflowForm.id, null);\r\n\r\n this.props.SetCaseVehicle(data);\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (err) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n } finally {\r\n this.setState({ executing: false });\r\n }\r\n };\r\n\r\n submitForm = async (caseId: number, caseSectionStepFormId: number, appUser: AppUser | null) => {\r\n let newStatus = await this.caseService.SubmitForm(caseId, caseSectionStepFormId, appUser);\r\n if (newStatus === null) {\r\n newStatus = this.props.caseSettingsState.case!.caseStatus;\r\n }\r\n this.props.SetCaseStatus(newStatus);\r\n\r\n if (appUser !== null) {\r\n this.props.AddPartner(appUser!.hoId === null ? appUser!.organizationId : appUser!.hoId);\r\n }\r\n\r\n const hasRights = FormHelpers.HasRights(\r\n this.props.workflowForm.workflowFormPermissions,\r\n this.props.appState.appUser!,\r\n newStatus.caseStatusId\r\n );\r\n this.setState({ hasRights: this.state.hasAdminRole ? true : hasRights });\r\n };\r\n\r\n CustomDatePicker = (props: any) => {\r\n const { value, label, onChange, required } = props;\r\n const { language, dateFormat } = this.props.appState;\r\n return (\r\n onChange(date?.format('YYYY-MM-DD'))}\r\n required={required}\r\n format={dateFormat.toUpperCase()}\r\n disabled={!this.state.hasRights}\r\n />\r\n );\r\n };\r\n\r\n\r\n closeDialog = async () => {\r\n this.setState({\r\n isDialogOpen: false\r\n });\r\n };\r\n\r\n handleAutocompleteModelDataChange = async (newValue: ModelData | null) => {\r\n this.setState({\r\n selectedModelData: newValue\r\n });\r\n };\r\n \r\n submitSelectedModelData = async () => {\r\n try {\r\n console.log(this.state.selectedModelData);\r\n\r\n const model = this.state.modelList.find(\r\n (item) => item.code === this.state.selectedModelData!.umc\r\n );\r\n if (isNullOrUndefined(model)) {\r\n return;\r\n }\r\n\r\n this.setState({\r\n formData: {\r\n ...this.state.formData,\r\n modelId: model.id\r\n },\r\n isDialogOpen: false\r\n });\r\n\r\n } catch (ex) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n renderAddModelForm = () => {\r\n return (\r\n {\r\n this.submitSelectedModelData();\r\n }}\r\n >\r\n
\r\n \r\n this.handleAutocompleteModelDataChange(newValue)\r\n }\r\n getOptionLabel={(option: ModelData) => option.modelDescription || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n \r\n {this.translatorService.Tranlate('EDIT_ORGANIZATION_CANCEL_BTN', 'Anuleaza')}\r\n \r\n \r\n
\r\n \r\n );\r\n };\r\n\r\n validateCaseCarDetails = (schema: any) => {\r\n if (!R.isNil(this.state.step) && !this.state.hasAdminRole) {\r\n const step = this.state.step;\r\n if (step.isCurrent(this.props.caseSettingsState.case!.caseStatus.caseStatusId)) {\r\n if (!isNullOrUndefined(this.state.formData.numberOfKilometers) && !isNullOrUndefined(this.state.initialNumberOfKilometers)) {\r\n if (this.state.formData.numberOfKilometers <= this.state.initialNumberOfKilometers) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'NUMBER_OF_KILOMETERS_VALIDATION',\r\n 'Vă rugăm să verificați numărul de kilometri intoduși!'\r\n ),\r\n {\r\n variant: 'warning'\r\n }\r\n );\r\n }\r\n }\r\n }\r\n }\r\n };\r\n\r\n renderFormData = (form: WorkflowSectionStepForm) => {\r\n let jsonSchema = {};\r\n let jsonGUI = {};\r\n const widgets = {\r\n DateWidget: this.CustomDatePicker\r\n };\r\n\r\n try {\r\n jsonSchema = JSON.parse(form.json1);\r\n jsonGUI = JSON.parse(form.json2);\r\n } catch {\r\n console.log('json schema/gui error');\r\n }\r\n\r\n let schema = this.translatorService.TranslateSchema(jsonSchema);\r\n schema = this.handleArraySchema(jsonSchema);\r\n return (\r\n
\r\n \r\n this.validate(formData, errors, form.form.code)\r\n }\r\n liveValidate\r\n showErrorList={false}\r\n formData={this.state.formData}\r\n onBlur={this.onBlur}\r\n onChange={async (e) => await this.onFormChange(e)}\r\n onSubmit={async (e: ISubmitEvent) => await this.onSubmit(e, form.form.code)}\r\n transformErrors={this.translatorService.TranslateErrors}\r\n widgets={widgets}\r\n >\r\n
{\r\n this.validateCaseCarDetails(schema);\r\n }}>\r\n {FormButton.GetButtons(\r\n form.form.code,\r\n this.translatorService,\r\n this.state.hasRights,\r\n this.state.executing\r\n )}\r\n
\r\n \r\n {this.state.isDialogOpen ? (\r\n \r\n \r\n {this.translatorService.Tranlate('FRM_CAR_DATA_MODEL', 'Model Autovehicul')}\r\n \r\n \r\n \r\n \r\n \r\n {this.renderAddModelForm()}\r\n \r\n \r\n ) : (\r\n ''\r\n )}\r\n
\r\n );\r\n };\r\n\r\n onChangeVin = async (value:string) =>{\r\n if (R.test(/^(?=.*[0-9])(?=.*[abcdefghjklmnprstuvwxyzABCDEFGHJKLMNPRSTUVWXYZ])[0-9abcdefghjklmnprstuvwxyzABCDEFGHJKLMNPRSTUVWXYZ-]{17}$/, value)) {\r\n const [result, latestCaseVehicleHistory, vehicle] = await Promise.all([\r\n this.caseService.DecodeVin(value),\r\n this.caseService.GetLatestCaseVehicleHistory(value),\r\n this.caseService.GetVehicleFromVQRepo(value)\r\n ]);\r\n if (latestCaseVehicleHistory !== null) {\r\n this.setState({\r\n formData: {\r\n ...this.state.formData,\r\n numberOfKilometers: latestCaseVehicleHistory.numberOfKilometers\r\n },\r\n initialNumberOfKilometers: latestCaseVehicleHistory.numberOfKilometers\r\n });\r\n }\r\n if (result.error !== null) {\r\n if (result.error.errorInfo.code == GTErrorCode.THE_VIN_NUMBER_SENT_DOES_NOT_DECODE_ANY_MODEL) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('THE_VIN_NUMBER_SENT_DOES_NOT_DECODE_ANY_MODEL', 'Din păcate autovehiculul selectat nu poate fi identificat în aplicație !'), {\r\n variant: 'warning',\r\n autoHideDuration: 5000\r\n });\r\n }\r\n return;\r\n }\r\n\r\n if (result.responseInfo.vehicleInfoDec.modelList.modelData.length === 0) {\r\n return;\r\n }\r\n const makeCode = result.responseInfo.vehicleInfoDec.modelList.modelData[0].makeCode;\r\n const brand = this.state.brandList.find((item) => makeCode.startsWith(item.code!, 0));\r\n if (isNullOrUndefined(brand)) {\r\n return;\r\n }\r\n\r\n const [modelList, undocumentedModelList] = await Promise.all([\r\n this.caseService.GetCarModelsByBrand(brand.id),\r\n this.caseService.GetCarUndocumentedModelsByBrand(brand.id)\r\n ]);\r\n if (result.responseInfo.vehicleInfoDec.modelList.modelData.length > 1) {\r\n console.log('vehicle', vehicle);\r\n if (vehicle === null) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SELECT_MODEL_DIALOG', 'Va rugam selectati modelul auto!'), {\r\n variant: 'warning',\r\n autoHideDuration: 5000\r\n });\r\n this.setState({\r\n isDialogOpen: true,\r\n modelList: [...modelList],\r\n undocumentedModelList: undocumentedModelList,\r\n formData: {\r\n ...this.state.formData,\r\n brandId: brand.id\r\n },\r\n modelData: result.responseInfo.vehicleInfoDec.modelList.modelData\r\n });\r\n } else {\r\n const model = modelList.find(\r\n (item) => item.code === vehicle.umc\r\n );\r\n if (isNullOrUndefined(model)) {\r\n this.setState({\r\n modelList: [...modelList],\r\n undocumentedModelList: undocumentedModelList,\r\n formData: {\r\n ...this.state.formData,\r\n brandId: brand.id\r\n }\r\n });\r\n \r\n return;\r\n }\r\n \r\n this.setState({\r\n modelList: [...modelList],\r\n undocumentedModelList: undocumentedModelList,\r\n formData: {\r\n ...this.state.formData,\r\n brandId: brand.id,\r\n modelId: model.id\r\n }\r\n });\r\n }\r\n } else {\r\n const model = modelList.find(\r\n (item) => item.code === result.responseInfo.vehicleInfoDec.modelList.modelData[0].umc\r\n );\r\n if (isNullOrUndefined(model)) {\r\n this.setState({\r\n modelList: [...modelList],\r\n undocumentedModelList: undocumentedModelList,\r\n formData: {\r\n ...this.state.formData,\r\n brandId: brand.id\r\n }\r\n });\r\n\r\n return;\r\n }\r\n\r\n this.setState({\r\n modelList: [...modelList],\r\n undocumentedModelList: undocumentedModelList,\r\n formData: {\r\n ...this.state.formData,\r\n brandId: brand.id,\r\n modelId: model.id\r\n }\r\n });\r\n }\r\n } else {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('INVALID_CAR_VIN_IDENTIFICATOR', \"Te rugăm să te asiguri că seria de șasiu introdusă are 17 caractere alfanumerice și nu conține spații sau literele 'O' sau 'I'!\"), {\r\n variant: 'warning',\r\n autoHideDuration: 6000\r\n });\r\n }\r\n }\r\n\r\n onBlur = async (id: string, value: any) => {\r\n if (id === 'root_plateNumber' && this.props.caseSettingsState.caseSettings!.workflow.isDgpciIntegration && value.length > 0){\r\n try {\r\n const vinRequest = await this.caseService.GetVinByPlateNumberRequest({PlateNumber:value, externalClient: false});\r\n\r\n if (vinRequest.success) {\r\n this.setState({\r\n formData: {\r\n ...this.state.formData,\r\n vin: vinRequest.vin\r\n },\r\n });\r\n this.onChangeVin(vinRequest.vin)\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } else {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('ERROR_MSG_VIN', 'Eroare la obtinerea VIN'),\r\n {\r\n variant: 'error'\r\n }\r\n );\r\n }\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n if (id === 'root_vin') {\r\n this.onChangeVin(value);\r\n } \r\n };\r\n \r\n onFormChange = async (e: IChangeEvent) => {\r\n if (\r\n e.formData.brandId !== this.state.formData.brandId &&\r\n !isNullOrUndefined(e.formData.brandId)\r\n ) {\r\n const modelList = await this.caseService.GetCarModelsByBrand(e.formData.brandId);\r\n const undocumentedModelList = await this.caseService.GetCarUndocumentedModelsByBrand(e.formData.brandId);\r\n\r\n const formData = e.formData;\r\n if (modelList.length != 0) {\r\n formData.modelId = modelList[0].id;\r\n }\r\n\r\n this.setState({\r\n formData: e.formData,\r\n modelList: modelList,\r\n undocumentedModelList: undocumentedModelList\r\n });\r\n return;\r\n }\r\n\r\n if (e.formData.numberOfKilometers !== this.state.formData.numberOfKilometers) {\r\n const element = document.querySelector('input#root_numberOfKilometers');\r\n if (element !== null) {\r\n element.classList.add('number-of-kilometers-changed');\r\n }\r\n }\r\n\r\n this.setState({\r\n formData: e.formData\r\n });\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ?
{this.renderFormData(this.props.workflowForm)}
: null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalCaseDetailsCaseTabCarDetailsFormProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app\r\n }),\r\n CaseSettingsActionCreators,\r\n mergeProps\r\n)(withSnackbar(CaseDetailsCaseTabCarDetailsForm as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n ApplicationState,\r\n CaseSettingsState,\r\n AppState,\r\n CaseSettingsActionCreators\r\n} from '../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { isNullOrUndefined } from 'util';\r\nimport { CaseEventHistory } from '../../interfaces/Case';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport { IReferentialService } from '../../services/Interfaces/IReferentialService';\r\nimport { WorkflowSectionStepForm } from '../../interfaces/Workflow';\r\nimport Form from '@rjsf/material-ui';\r\nimport { ISubmitEvent, FormValidation } from '@rjsf/core';\r\nimport { MuiPickersUtilsProvider, DatePicker } from '@material-ui/pickers';\r\nimport { FormButton } from '../../helpers/forms/FormButton';\r\nimport moment from 'moment';\r\nimport MomentUtils from '@date-io/moment';\r\nimport { EventDetailsFieldsCode, ReferentialCode } from '../../helpers/Constants';\r\nimport Referentials from '../../helpers/Referentials.json';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport { FormHelpers } from '../../helpers/forms/FormHelpers';\r\nimport { AppUser } from '../../interfaces/AppUser';\r\nimport { CNP } from 'romanian-personal-identity-code-validator';\r\nimport { IOrganizationService } from '../../services/Interfaces/IOrganizationService';\r\nimport { Organization } from '../../interfaces/Organization';\r\nimport { MaterialUiPickersDate } from '@material-ui/pickers/typings/date';\r\nimport { isEmpty } from 'lodash';\r\n\r\ninterface ICaseDetailsCaseTabEventDetailsFormState {\r\n formData: CaseEventHistory;\r\n isLoading: boolean;\r\n personTypes: IReferential[];\r\n policyTypes: IReferential[];\r\n organizations: Organization[];\r\n hasRights: boolean;\r\n executing: boolean;\r\n}\r\nexport interface ExternalCaseDetailsCaseTabEventDetailsFormProps {\r\n workflowForm: WorkflowSectionStepForm;\r\n}\r\n\r\ntype ICaseDetailsCaseTabEventDetailsFormProps = {\r\n caseSettingsState: CaseSettingsState;\r\n appState: AppState;\r\n} & typeof CaseSettingsActionCreators &\r\n ExternalCaseDetailsCaseTabEventDetailsFormProps &\r\n ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass CaseDetailsCaseTabEventDetailsForm extends React.PureComponent<\r\n ICaseDetailsCaseTabEventDetailsFormProps,\r\n ICaseDetailsCaseTabEventDetailsFormState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private caseService!: ICaseService;\r\n private appReferentialService!: IReferentialService;\r\n private organizationService!: IOrganizationService;\r\n\r\n static contextType = ApplicationContext;\r\n state = {\r\n formData: {} as CaseEventHistory,\r\n isLoading: true,\r\n personTypes: [],\r\n policyTypes: [],\r\n organizations: [],\r\n hasRights: false,\r\n executing: false\r\n } as ICaseDetailsCaseTabEventDetailsFormState;\r\n\r\n public componentDidMount() {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (isNullOrUndefined(caseSettings) || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n console.log('je2re');\r\n\r\n await this.loadData();\r\n }\r\n );\r\n }\r\n\r\n loadData = async () => {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n\r\n if (isNullOrUndefined(caseSettings) || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n const refpersonType = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.PersonType\r\n );\r\n const refpolicyType = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.PolicyType\r\n );\r\n\r\n const [personTypeList, policyTypeLIst, organizationsList] = await Promise.all([\r\n this.appReferentialService.Get(refpersonType!.baseUrl),\r\n this.appReferentialService.Get(refpolicyType!.baseUrl),\r\n this.organizationService.GetOrganizationHierarchy(\r\n this.props.caseSettingsState.caseSettings?.workflow.organizationOwnerId || -1\r\n )\r\n ]);\r\n const hasRights = FormHelpers.HasRights(\r\n this.props.workflowForm.workflowFormPermissions,\r\n this.props.appState.appUser!,\r\n this.props.caseSettingsState.case!.caseStatus.caseStatusId\r\n );\r\n\r\n if (isNullOrUndefined(this.props.caseSettingsState.case!.caseEvent)) {\r\n this.setState({\r\n formData: {\r\n id: 0,\r\n caseId: caseId\r\n } as CaseEventHistory,\r\n isLoading: false,\r\n personTypes: personTypeList,\r\n policyTypes: policyTypeLIst,\r\n organizations: organizationsList,\r\n hasRights: hasRights\r\n });\r\n\r\n return;\r\n }\r\n\r\n const caseEvent = this.props.caseSettingsState.case!.caseEvent;\r\n\r\n if (!isNullOrUndefined(caseEvent.eventDate)) {\r\n caseEvent.eventDate = moment(caseEvent.eventDate).format(moment.HTML5_FMT.DATE);\r\n }\r\n if (!isNullOrUndefined(caseEvent.noticeDate)) {\r\n caseEvent.noticeDate = moment(caseEvent.noticeDate).format(moment.HTML5_FMT.DATE);\r\n }\r\n if (!isNullOrUndefined(caseEvent.claimReviewDate)) {\r\n caseEvent.claimReviewDate = moment(caseEvent.claimReviewDate).format(moment.HTML5_FMT.DATE);\r\n }\r\n\r\n for (const [key, value] of Object.entries(caseEvent)) {\r\n if (isNullOrUndefined(value)) {\r\n caseEvent[key] = undefined;\r\n }\r\n }\r\n\r\n this.setState({\r\n formData: caseEvent,\r\n isLoading: false,\r\n personTypes: personTypeList,\r\n policyTypes: policyTypeLIst,\r\n organizations: organizationsList,\r\n hasRights: hasRights\r\n });\r\n };\r\n\r\n handleArraySchema = (schema: any) => {\r\n if (isNullOrUndefined(schema.properties)) {\r\n return schema;\r\n }\r\n\r\n for (const key of Object.keys(schema.properties)) {\r\n if (\r\n schema.properties[key].anyOf !== undefined &&\r\n schema.properties[key].anyOf[0].title === 'CAR_POLICY_TYPE_ENUM'\r\n ) {\r\n schema.properties[key].anyOf = this.state.policyTypes.map((item) => {\r\n return {\r\n type: 'number',\r\n title: item.displayName,\r\n enum: [item.id]\r\n };\r\n });\r\n }\r\n if (\r\n schema.properties[key].anyOf !== undefined &&\r\n schema.properties[key].anyOf[0].title === 'CAR_INSURED_PERSON_TYPE_ENUM'\r\n ) {\r\n schema.properties[key].anyOf = this.state.personTypes.map((item) => {\r\n return {\r\n type: 'number',\r\n title: item.displayName,\r\n enum: [item.id]\r\n };\r\n });\r\n }\r\n if (\r\n schema.properties[key].anyOf !== undefined &&\r\n schema.properties[key].anyOf[0].title === 'ORGANIZATIONS_ENUM'\r\n ) {\r\n schema.properties[key].anyOf = this.state.organizations.map((item) => {\r\n return {\r\n type: 'number',\r\n title: item.displayName,\r\n enum: [item.id]\r\n };\r\n });\r\n }\r\n }\r\n\r\n return schema;\r\n };\r\n\r\n validate = (formData: CaseEventHistory, errors: FormValidation, formCode: string) => {\r\n if (new Date(formData.noticeDate) > new Date()) {\r\n errors.noticeDate.addError(\r\n this.translatorService.Tranlate(\r\n 'FRM_EVENT_DATA_NOTICE_DATE_LESS_CURRENT_DATE_ERROR',\r\n 'Data avizarii trebuie sa fie mica sau egala cu data curenta!'\r\n )\r\n );\r\n }\r\n if (new Date(formData.noticeDate) > new Date(formData.claimReviewDate)) {\r\n errors.noticeDate.addError(\r\n this.translatorService.Tranlate(\r\n 'FRM_EVENT_DATA_NOTICE_DATE_LESS_CLAIM_REVIEW_DATE_ERROR',\r\n 'Data avizarii trebuie sa fie mica sau egala cu data constatarii!'\r\n )\r\n );\r\n }\r\n if (new Date(formData.eventDate) > new Date(formData.noticeDate)) {\r\n errors.eventDate.addError(\r\n this.translatorService.Tranlate(\r\n 'FRM_EVENT_DATA_EVENT_DATE_LESS_NOTICE_DATE_ERROR',\r\n 'Data evenimentului trebuie sa fie mai mica sau egala cu data avizarii!'\r\n )\r\n );\r\n }\r\n\r\n if (!isNullOrUndefined(formData.pin)) {\r\n const cnp = new CNP(formData.pin);\r\n\r\n if (!cnp.isValid()) {\r\n errors.pin.addError(\r\n this.translatorService.Tranlate('FRM_EVENT_DATA_PIN_ERROR', 'CNP invalid!')\r\n );\r\n }\r\n }\r\n\r\n return errors;\r\n };\r\n\r\n validateCaseEventDetails = (schema: any) => {\r\n if (schema.required.includes(EventDetailsFieldsCode.CASENUMBER)) {\r\n if (\r\n isNullOrUndefined(this.state.formData.caseNumber) ||\r\n isEmpty(this.state.formData.caseNumber)\r\n ) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'WARNING_COPY_CASE',\r\n 'Va rog sa introduceti noul numar de dosar'\r\n ),\r\n {\r\n variant: 'warning'\r\n }\r\n );\r\n }\r\n }\r\n };\r\n\r\n onSubmit = async (e: ISubmitEvent, code: string) => {\r\n try {\r\n this.setState({ executing: true });\r\n\r\n let data = e.formData as CaseEventHistory;\r\n data.caseId = this.props.caseSettingsState.case!.id;\r\n data.insuredPersonType = null;\r\n if (isNullOrUndefined(data.id)) {\r\n data.id = 0;\r\n }\r\n\r\n if (data.id === 0) {\r\n data = await this.caseService.AddCaseEvent(data);\r\n } else {\r\n await this.caseService.UpdateCaseEvent(data);\r\n }\r\n if (this.props.workflowForm.form.hasActions) {\r\n await this.submitForm(data.caseId, this.props.workflowForm.id, null);\r\n }\r\n\r\n this.props.SetCaseEvent(data);\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (err) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n } finally {\r\n this.setState({ executing: false });\r\n }\r\n };\r\n\r\n submitForm = async (caseId: number, caseSectionStepFormId: number, appUser: AppUser | null) => {\r\n let newStatus = await this.caseService.SubmitForm(caseId, caseSectionStepFormId, appUser);\r\n\r\n if (newStatus === null) {\r\n newStatus = this.props.caseSettingsState.case!.caseStatus;\r\n }\r\n this.props.SetCaseStatus(newStatus);\r\n if (appUser !== null) {\r\n this.props.AddPartner(appUser!.hoId === null ? appUser!.organizationId : appUser!.hoId);\r\n }\r\n\r\n const hasRights = FormHelpers.HasRights(\r\n this.props.workflowForm.workflowFormPermissions,\r\n this.props.appState.appUser!,\r\n newStatus.caseStatusId\r\n );\r\n this.setState({ hasRights: hasRights });\r\n };\r\n\r\n CustomDatePicker = (props: any) => {\r\n const { value, label, onChange, required } = props;\r\n const { language, dateFormat } = this.props.appState;\r\n return (\r\n \r\n onChange(date?.format('YYYY-MM-DD'))}\r\n required={required}\r\n />\r\n \r\n );\r\n };\r\n\r\n renderFormData = (form: WorkflowSectionStepForm) => {\r\n let jsonSchema = {};\r\n let jsonGUI = {};\r\n const widgets = {\r\n DateWidget: this.CustomDatePicker\r\n };\r\n try {\r\n jsonSchema = JSON.parse(form.json1);\r\n jsonGUI = JSON.parse(form.json2);\r\n } catch {\r\n console.log('json schema/gui error');\r\n }\r\n\r\n let schema = this.translatorService.TranslateSchema(jsonSchema);\r\n schema = this.handleArraySchema(jsonSchema);\r\n\r\n return (\r\n
\r\n \r\n this.validate(formData, errors, form.form.code)\r\n }\r\n liveValidate={true}\r\n showErrorList={false}\r\n formData={this.state.formData}\r\n onChange={(e) => this.setState({ formData: e.formData })}\r\n onSubmit={async (e: ISubmitEvent) => await this.onSubmit(e, form.form.code)}\r\n transformErrors={this.translatorService.TranslateErrors}\r\n widgets={widgets}\r\n >\r\n {\r\n this.validateCaseEventDetails(schema);\r\n }}\r\n >\r\n {FormButton.GetButtons(\r\n form.form.code,\r\n this.translatorService,\r\n this.state.hasRights,\r\n this.state.executing\r\n )}\r\n
\r\n \r\n
\r\n );\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ?
{this.renderFormData(this.props.workflowForm)}
: null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalCaseDetailsCaseTabEventDetailsFormProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app\r\n }),\r\n CaseSettingsActionCreators,\r\n mergeProps\r\n)(withSnackbar(CaseDetailsCaseTabEventDetailsForm as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n ApplicationState,\r\n CaseSettingsState,\r\n AppState,\r\n CaseSettingsActionCreators,\r\n VehicleState\r\n} from '../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { Button, IconButton, Grid, Divider, FormHelperText } from '@material-ui/core';\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport {\r\n WorkflowFormAction,\r\n WorkflowPartner,\r\n WorkflowSectionStep,\r\n WorkflowSectionStepForm\r\n} from '../../interfaces/Workflow';\r\nimport { isNullOrUndefined } from 'util';\r\nimport { AcquisitionCaseRequest, CaseAttachment, CaseRequest, GenerateInvoiceRequest } from '../../interfaces/Case';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport { IWorkflowService } from '../../services/Interfaces/IWorkflowService';\r\nimport DeleteOutlineTwoToneIcon from '@material-ui/icons/DeleteOutlineTwoTone';\r\nimport FileSaver from 'file-saver';\r\nimport { AppUser } from '../../interfaces/AppUser';\r\nimport { IOrganizationService } from '../../services/Interfaces/IOrganizationService';\r\nimport { IAppUserService } from '../../services/Interfaces/IAppUserService';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport {\r\n ReferentialCode,\r\n AttachmentTypeCode,\r\n VehicleStatusCodeEnum,\r\n WorkflowFormActionTypeCode,\r\n CaseTypeCode,\r\n aquisitionSteps,\r\n aquisitionWorkflowSectionSteps,\r\n smartBillInvoiceWorkflowSectionSteps\r\n} from '../../helpers/Constants';\r\nimport Referentials from '../../helpers/Referentials.json';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport { IReferentialService } from '../../services/Interfaces/IReferentialService';\r\nimport { FormHelpers } from '../../helpers/forms/FormHelpers';\r\nimport CaseDetailsCaseRequests from '../cases/CaseDetailsCaseRequests';\r\nimport { IVehicleService } from '../../services/Interfaces/IVehicleService';\r\nimport { Organization } from '../../interfaces/Organization';\r\nimport DropdownTreeSelect from 'react-dropdown-tree-select';\r\nimport 'react-dropdown-tree-select/dist/styles.css';\r\nimport clsx from 'clsx';\r\nimport { FormCode } from '../../helpers/forms/FormCode';\r\nimport { VehicleHelper } from '../../helpers/VehicleHelper';\r\n\r\ninterface OrganizationBranch {\r\n id: number;\r\n organizationId: number;\r\n organizationName: string;\r\n organizationAddress: string;\r\n children: OrganizationBranch[];\r\n parentId: number | null;\r\n path: string | null;\r\n label: string;\r\n checked: boolean | null;\r\n organization?: Organization;\r\n}\r\n\r\ninterface ExtendedWorkflowPartner extends WorkflowPartner {\r\n organizationBranch?: OrganizationBranch;\r\n}\r\n\r\ninterface ICaseDetailsCaseTabBackToServiceFormState {\r\n backToServiceFormData: CaseRequest;\r\n organizationBranches: OrganizationBranch[];\r\n organizations: ExtendedWorkflowPartner[];\r\n selectedOrganization: ExtendedWorkflowPartner | null;\r\n users: AppUser[];\r\n selectedUser: AppUser | null;\r\n attachments: CaseAttachment[];\r\n isLoading: boolean;\r\n isLoading2: boolean;\r\n attachType: IReferential;\r\n isOrganizationsDisabled: boolean;\r\n isUsersDisabled: boolean;\r\n hasRights: boolean;\r\n isUserHidden: boolean;\r\n executing: boolean;\r\n formSubmitted: boolean;\r\n userRoleId: number | null;\r\n wfTransitionStepAction: WorkflowFormAction;\r\n}\r\n\r\nexport interface ExternalCaseDetailsCaseTabBackToServiceFormProps {\r\n workflowForm: WorkflowSectionStepForm;\r\n}\r\n\r\ntype ICaseDetailsCaseTabBackToServiceFormProps =\r\n ExternalCaseDetailsCaseTabBackToServiceFormProps & {\r\n caseSettingsState: CaseSettingsState;\r\n appState: AppState;\r\n vehicleState: VehicleState;\r\n } & typeof CaseSettingsActionCreators &\r\n ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass CaseDetailsCaseTabBackToServiceForm extends React.PureComponent<\r\n ICaseDetailsCaseTabBackToServiceFormProps,\r\n ICaseDetailsCaseTabBackToServiceFormState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private caseService!: ICaseService;\r\n private workflowService!: IWorkflowService;\r\n private appUserService!: IAppUserService;\r\n private organizationService!: IOrganizationService;\r\n private appReferentialServie!: IReferentialService;\r\n private vehicleService!: IVehicleService;\r\n\r\n static contextType = ApplicationContext;\r\n state = {\r\n backToServiceFormData: {} as CaseRequest,\r\n organizationBranches: [],\r\n organizations: [],\r\n selectedOrganization: null,\r\n users: [],\r\n selectedUser: null,\r\n attachments: [],\r\n isLoading: false,\r\n isLoading2: false,\r\n attachType: {} as IReferential,\r\n isOrganizationsDisabled: false,\r\n isUsersDisabled: false,\r\n hasRights: false,\r\n isUserHidden: false,\r\n executing: false,\r\n userRoleId: null,\r\n formSubmitted: false,\r\n wfTransitionStepAction: {} as WorkflowFormAction\r\n } as ICaseDetailsCaseTabBackToServiceFormState;\r\n\r\n public componentDidMount() {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (isNullOrUndefined(caseSettings) || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadCaseBackToServiceForm();\r\n }\r\n );\r\n }\r\n\r\n assignObjectPaths = (obj: any, stack: any) => {\r\n Object.keys(obj).forEach((k) => {\r\n const node = obj[k];\r\n if (node && typeof node === 'object' && !Array.isArray(node)) {\r\n node.path = stack ? `${stack}.${k}` : k;\r\n this.assignObjectPaths(node, node.path);\r\n }\r\n });\r\n };\r\n\r\n findTopParent = (id: number, organizationBranches: OrganizationBranch[]): any => {\r\n let ob = organizationBranches.find((acc) => acc.id === id);\r\n if (!ob) {\r\n return;\r\n }\r\n if (ob.parentId !== null) {\r\n ob = this.findTopParent(ob.parentId, organizationBranches);\r\n }\r\n return ob;\r\n };\r\n\r\n loadCaseBackToServiceForm = async () => {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseStatusId = this.props.caseSettingsState.case?.caseStatus?.caseStatusId;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (isNullOrUndefined(caseSettings) || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n const caseRequest = {\r\n id: 0,\r\n caseId: this.props.caseSettingsState.case!.id,\r\n text: '',\r\n subject: '',\r\n to: '',\r\n userIdTo: '',\r\n organizationId: null,\r\n attachments: [] as CaseAttachment[],\r\n caseSectionStepFormId: this.props.workflowForm.id\r\n } as CaseRequest;\r\n\r\n const ref = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.AttachmentType\r\n );\r\n\r\n const wfStepActions = await this.workflowService.GetWorkflowSectionStepFormActions(\r\n this.props.workflowForm.id\r\n );\r\n const caseOrganizationTypeId = wfStepActions.find(\r\n (item) => item.actionType?.code === WorkflowFormActionTypeCode.CASE_ALLOCATION\r\n )?.workflowPartnerType?.organizationTypeId;\r\n\r\n const wfTransitionStepAction =\r\n wfStepActions.find(\r\n (item) =>\r\n item.actionType?.code === WorkflowFormActionTypeCode.STATUS_TRANSITION &&\r\n caseStatusId === item.fromStatusId\r\n ) || ({} as WorkflowFormAction);\r\n\r\n const workflowPartners = await this.workflowService.GetUserWorkflowPartners(\r\n this.props.caseSettingsState.case!.caseWorkflow.workflowId\r\n );\r\n\r\n const workflowPartnerIds = workflowPartners.map((x) => x.partnerId);\r\n\r\n const partnerOrganizations = await this.organizationService.GetUserOrganizationsByIds(\r\n workflowPartnerIds\r\n );\r\n\r\n const [attachmentTypes] = await Promise.all([this.appReferentialServie.Get(ref!.baseUrl)]);\r\n workflowPartners.forEach((wp) => {\r\n const partner = partnerOrganizations.find((item) => item?.id === wp.partnerId);\r\n wp.partner = isNullOrUndefined(partner) ? null : partner;\r\n });\r\n\r\n const hasRights = FormHelpers.HasRights(\r\n this.props.workflowForm.workflowFormPermissions,\r\n this.props.appState.appUser!,\r\n this.props.caseSettingsState.case!.caseStatus.caseStatusId\r\n );\r\n\r\n let organizationBranches = [] as OrganizationBranch[];\r\n let partners = workflowPartners.map((x) => x.partner);\r\n if (caseOrganizationTypeId) {\r\n partners = partners.filter(\r\n (partner) => partner?.organizationTypeId === caseOrganizationTypeId\r\n );\r\n }\r\n for (const x of partners) {\r\n organizationBranches.push({\r\n id: x!.id,\r\n organizationId: x!.id,\r\n organizationName: x!.name,\r\n organizationAddress: x!.address,\r\n children: [],\r\n parentId: x!.parentId,\r\n path: null,\r\n label: x?.name + (x?.address ? ' ' + x?.address : ''),\r\n checked: false\r\n });\r\n }\r\n\r\n const parentIds = workflowPartners.map((x) => x.partnerId);\r\n\r\n const organizationHierarchy = await this.organizationService.GetOrganizationDescendents(\r\n parentIds\r\n );\r\n\r\n const descendants =\r\n organizationHierarchy.map((x) => {\r\n return {\r\n id: x.id,\r\n organizationId: x.id,\r\n organizationName: x.name,\r\n organizationAddress: x.address,\r\n children: [],\r\n parentId: x.parentId,\r\n path: null,\r\n label: x.name + (x.address ? ' ' + x.address : ''),\r\n checked: false\r\n } as OrganizationBranch;\r\n }) || [];\r\n\r\n descendants.forEach((x) => {\r\n organizationBranches.push(x);\r\n });\r\n\r\n const extendedWorkflowPartners: ExtendedWorkflowPartner[] = [];\r\n\r\n for (const ob of organizationBranches) {\r\n const parent = this.findTopParent(ob.id, organizationBranches);\r\n const parentPartner = workflowPartners.find((x) => x.partnerId === parent.id);\r\n\r\n extendedWorkflowPartners.push({\r\n workflowId: parentPartner!.workflowId,\r\n partnerId: ob.organizationId,\r\n partner: ob.organization || null,\r\n isActive: parentPartner!.isActive,\r\n id: parentPartner!.id,\r\n organizationBranch: ob\r\n });\r\n }\r\n\r\n const arrMap = organizationBranches.reduce((acc: any, el: any, i) => {\r\n acc[el.id] = i;\r\n return acc;\r\n }, {});\r\n\r\n const roots = [] as OrganizationBranch[];\r\n\r\n // Push each element to parent's children array\r\n organizationBranches.forEach((el) => {\r\n if (el.parentId === null || arrMap[el.parentId] == null) {\r\n roots.push(el);\r\n } else {\r\n organizationBranches[arrMap[el.parentId]].children.push(el);\r\n }\r\n });\r\n\r\n organizationBranches = roots;\r\n this.assignObjectPaths(organizationBranches, '');\r\n\r\n this.setState(\r\n {\r\n backToServiceFormData: caseRequest,\r\n organizationBranches,\r\n organizations: extendedWorkflowPartners,\r\n isLoading: false,\r\n attachType: attachmentTypes.find((item) => item.code === AttachmentTypeCode.OTHER)!,\r\n hasRights: hasRights,\r\n wfTransitionStepAction\r\n },\r\n await this.setCaseAllocation\r\n );\r\n };\r\n\r\n onDropDownChange = (currentNode: any, selectedNodes: any) => {\r\n // react-dropdown-tree-select doesn't have an intrinsic mechanism for keeping track of selected items, only provides what is selected\r\n // So we have to manually check/uncheck the leaves from this tree used by this component\r\n let newSelectionOrganizationBranch: OrganizationBranch | null = null;\r\n if (this.state.selectedOrganization) {\r\n const oldSelectionOrganizationBranch = this.findRecursive(\r\n this.state.organizationBranches,\r\n this.state.selectedOrganization.organizationBranch!.organizationId\r\n );\r\n if (oldSelectionOrganizationBranch) {\r\n oldSelectionOrganizationBranch.checked = false;\r\n }\r\n }\r\n\r\n if (selectedNodes.length == 1) {\r\n const newPartialSelectionOrganizationBranch =\r\n this.findRecursive(\r\n this.state.organizationBranches,\r\n (selectedNodes[0] as OrganizationBranch)?.organizationId\r\n ) || null;\r\n\r\n if (newPartialSelectionOrganizationBranch) {\r\n newPartialSelectionOrganizationBranch.checked = true;\r\n newSelectionOrganizationBranch = newPartialSelectionOrganizationBranch;\r\n }\r\n }\r\n\r\n let selectedWorkflowPartner: ExtendedWorkflowPartner | undefined = undefined;\r\n\r\n if (newSelectionOrganizationBranch) {\r\n const parent = this.findTopParent(\r\n newSelectionOrganizationBranch.id,\r\n this.state.organizations.map((o) => o.organizationBranch!)\r\n );\r\n\r\n const parentPartner = this.state.organizations.find((x) => x.partnerId === parent.id);\r\n\r\n selectedWorkflowPartner = {\r\n workflowId: parentPartner!.workflowId,\r\n partnerId: newSelectionOrganizationBranch.id,\r\n partner: newSelectionOrganizationBranch.organization || null,\r\n isActive: parentPartner!.isActive,\r\n id: parentPartner!.id,\r\n organizationBranch: newSelectionOrganizationBranch\r\n };\r\n }\r\n\r\n this.setState(\r\n {\r\n ...this.state,\r\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\r\n //@ts-ignore\r\n selectedOrganization: selectedWorkflowPartner || null,\r\n selectedUser: null,\r\n users: [],\r\n isLoading2: true\r\n },\r\n async () => {\r\n await this.loadUsers(\r\n !selectedWorkflowPartner ? null : selectedWorkflowPartner.partnerId,\r\n this.state.userRoleId\r\n );\r\n }\r\n );\r\n };\r\n\r\n findRecursive = (\r\n arr: OrganizationBranch[],\r\n organizationId: number\r\n ): OrganizationBranch | null => {\r\n let result: OrganizationBranch | null = null;\r\n for (const entry in arr) {\r\n if (arr[entry].organizationId == organizationId) {\r\n result = arr[entry];\r\n break;\r\n }\r\n if (arr[entry].children?.length) {\r\n const partialResult = this.findRecursive(arr[entry].children, organizationId);\r\n if (partialResult != null) {\r\n result = partialResult;\r\n break;\r\n }\r\n }\r\n }\r\n return result;\r\n };\r\n\r\n setCaseAllocation = async () => {\r\n const allocationResult = await FormHelpers.ParseAllocations(\r\n this.props.workflowForm.workflowFormActions,\r\n this.state.organizations,\r\n this.appUserService,\r\n this.props.appState.appUser!\r\n );\r\n if (isNullOrUndefined(allocationResult)) {\r\n const partner = this.state.organizations.find(\r\n (item) => item.partnerId === this.props.caseSettingsState.case!.caseStatus.assignedTo!.hoId\r\n );\r\n\r\n if (partner) {\r\n const oldSelectionOrganizationBranch = this.findRecursive(\r\n this.state.organizationBranches,\r\n partner.organizationBranch!.id\r\n );\r\n\r\n if (oldSelectionOrganizationBranch) {\r\n oldSelectionOrganizationBranch.checked = true;\r\n }\r\n }\r\n\r\n this.setState(\r\n {\r\n selectedOrganization: isNullOrUndefined(partner) ? null : partner,\r\n selectedUser: this.props.caseSettingsState.case!.caseStatus.assignedTo,\r\n organizations: this.state.organizations,\r\n isUsersDisabled: false,\r\n isOrganizationsDisabled: false\r\n },\r\n async () =>\r\n await this.loadUsers(isNullOrUndefined(partner) ? null : partner.partnerId, null)\r\n );\r\n return;\r\n }\r\n if (allocationResult.isLastUser || allocationResult.caseStatusId != null) {\r\n this.setState({ isUserHidden: true });\r\n return;\r\n }\r\n\r\n if (allocationResult.partner) {\r\n const oldSelectionOrganizationBranch = this.findRecursive(\r\n this.state.organizationBranches,\r\n allocationResult.partner.organizationBranch!.id\r\n );\r\n\r\n if (oldSelectionOrganizationBranch) {\r\n oldSelectionOrganizationBranch.checked = true;\r\n }\r\n }\r\n\r\n this.setState(\r\n {\r\n selectedOrganization: allocationResult.partner,\r\n selectedUser: allocationResult.user,\r\n // organizations: allocationResult.partners,\r\n organizationBranches: allocationResult.partner?.organizationBranch\r\n ? [allocationResult.partner.organizationBranch]\r\n : this.state.organizationBranches,\r\n isUsersDisabled: !isNullOrUndefined(allocationResult.user),\r\n // isOrganizationsDisabled: !isNullOrUndefined(allocationResult.partner),\r\n isOrganizationsDisabled: !isNullOrUndefined(allocationResult.user),\r\n userRoleId: allocationResult.roleId\r\n },\r\n async () => {\r\n if (allocationResult.partner === null) {\r\n return;\r\n }\r\n await this.loadUsers(allocationResult.partner.partnerId, allocationResult.roleId);\r\n }\r\n );\r\n };\r\n\r\n loadUsers = async (organizationId: number | null, roleId: number | null) => {\r\n if (organizationId === null) {\r\n this.setState({\r\n isLoading2: false\r\n });\r\n } else {\r\n let orgIds = '';\r\n orgIds = `${organizationId}`;\r\n\r\n const users = await this.appUserService.GetUserAppUsers('', orgIds);\r\n\r\n this.setState({\r\n users: users.users.filter(\r\n (user) =>\r\n (user.organization!.hoId === organizationId ||\r\n user.organizationId === organizationId) &&\r\n ((roleId !== null && user.roleId === roleId) || roleId === null)\r\n ),\r\n isLoading2: false\r\n });\r\n }\r\n };\r\n\r\n handleUploadAttachment = async (e: React.ChangeEvent) => {\r\n try {\r\n const attachments = [...this.state.attachments];\r\n if (isNullOrUndefined(e.target.files)) {\r\n return;\r\n }\r\n for (let i = 0; i < e.target.files!.length; i++) {\r\n attachments.push({\r\n id: 0,\r\n caseId: this.props.caseSettingsState.case!.id,\r\n attachmentTypeId: this.state.attachType.id,\r\n attachmentType: this.state.attachType,\r\n file: e.target.files![i],\r\n fileName: e.target.files![i].name,\r\n uploadDate: new Date(),\r\n carPhotos: false,\r\n originalFileName: e.target.files![i].name,\r\n caseRequestId: null,\r\n paymentId: null,\r\n serviceAppointmentId: null,\r\n caseClientId: null,\r\n isSelection: false\r\n });\r\n }\r\n\r\n this.setState({\r\n attachments: attachments\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n handleDeleteAttachment = async (id: number, fileName: string) => {\r\n try {\r\n const attachments = [...this.state.attachments];\r\n const index = attachments.findIndex((item) => item.id === id);\r\n attachments.splice(index, 1);\r\n\r\n this.setState({\r\n attachments: attachments\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n downloadFile = async (fileName: string, origFileName: string) => {\r\n const fileBlob = await this.caseService.GetCaseAttachment(fileName);\r\n FileSaver.saveAs(fileBlob, origFileName);\r\n };\r\n\r\n renderAttachmentBox = () => {\r\n return (\r\n \r\n \r\n {this.state.attachments.length !== 0\r\n ? this.state.attachments.map((attach, index) => {\r\n return (\r\n
\r\n
\r\n this.downloadFile(attach.fileName, attach.originalFileName)}\r\n >\r\n {attach.originalFileName}\r\n \r\n
\r\n
\r\n this.handleDeleteAttachment(attach.id, attach.fileName)}\r\n disabled={!this.state.hasRights}\r\n >\r\n \r\n \r\n
\r\n
\r\n );\r\n })\r\n : null}\r\n
\r\n \r\n {\r\n return this.handleUploadAttachment(e);\r\n }}\r\n type=\"file\"\r\n />\r\n \r\n \r\n
\r\n );\r\n };\r\n\r\n sendEmail = async () => {\r\n try {\r\n this.setState({ executing: true });\r\n //Dosar Evaluare\r\n const step = this.getWorkflowSectionStep(this.props.workflowForm.workflowSectionStepId);\r\n if (this.props.caseSettingsState.caseSettings!.workflow.isEvaluationWorkflow &&\r\n this.props.caseSettingsState?.case?.caseType?.code === CaseTypeCode.AQUISITION &&\r\n aquisitionWorkflowSectionSteps.includes(step?.workflowStep?.code ?? \"\") &&\r\n aquisitionSteps.includes(this.props.workflowForm.displayName.toUpperCase())\r\n ) {\r\n console.log('Dosar Evaluare');\r\n const vin = VehicleHelper.GetVIN(\r\n this.props.caseSettingsState.case,\r\n this.props.vehicleState.vehicle\r\n );\r\n const request = {\r\n vin: vin\r\n } as AcquisitionCaseRequest;\r\n const vinAquisitionCases = (await this.caseService.GetAcquisitionCases(request)).filter(x => x.id !== this.props.caseSettingsState.case!.id);\r\n if (vinAquisitionCases.length > 0) {\r\n this.props.enqueueSnackbar(\r\n (this.translatorService.Tranlate(\r\n 'ALREADY_AQUISITION_CASE',\r\n 'Exista deja un dosar de achizitie deschis, va rugam sa verificati!'\r\n ) + '\\n' +\r\n (vinAquisitionCases.length == 1 ? this.translatorService.Tranlate('CASES_ID_LABEL', 'Id-ul dosarului este: ') : this.translatorService.Tranlate('CASES_IDS', 'Id-urile dosarelor sunt: ')) +\r\n vinAquisitionCases.map((item) => item.id).join(', ')),\r\n {\r\n variant: 'warning',\r\n style: { whiteSpace: 'pre-line' },\r\n autoHideDuration: 6000\r\n }\r\n );\r\n \r\n this.setState({ executing: false });\r\n return;\r\n }\r\n }\r\n\r\n let request = this.state.backToServiceFormData;\r\n const { toWorkflowId, toStatusId } = this.state.wfTransitionStepAction;\r\n const userId = this.props.appState?.appUser?.id || this.state.selectedUser?.id;\r\n\r\n if (isNullOrUndefined(request)) {\r\n return;\r\n }\r\n\r\n this.setState({ executing: true, formSubmitted: true });\r\n\r\n request!.id = 0;\r\n request!.attachments = this.state.attachments;\r\n if (!this.state.isUserHidden) {\r\n request.userIdTo = this.state.selectedUser!.id!;\r\n request.organizationId = this.state.selectedOrganization!.partnerId;\r\n }\r\n\r\n if (toWorkflowId && toStatusId) {\r\n await this.caseService.ChangeCaseWorkflow(\r\n toWorkflowId,\r\n request.caseId,\r\n userId!,\r\n toStatusId\r\n );\r\n } else {\r\n request = await this.caseService.AddCaseRequest(request);\r\n }\r\n\r\n await this.submitForm(request.caseId, request.caseSectionStepFormId, this.state.selectedUser);\r\n\r\n this.setState(\r\n {\r\n backToServiceFormData: {\r\n id: 0,\r\n caseId: this.props.caseSettingsState.case!.id,\r\n text: '',\r\n subject: '',\r\n to: '',\r\n userId: '',\r\n organizationId: null,\r\n attachments: [] as CaseAttachment[],\r\n caseSectionStepFormId: this.props.workflowForm.id\r\n } as CaseRequest,\r\n formSubmitted: false,\r\n attachments: [],\r\n selectedUser: null,\r\n selectedOrganization: null\r\n },\r\n this.setCaseAllocation\r\n );\r\n if (toWorkflowId && toStatusId) {\r\n this.props.SetCaseSettings(request.caseId);\r\n }\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (ex) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n } finally {\r\n this.setState({ executing: false });\r\n }\r\n };\r\n\r\n getWorkflowStep = (code: string): IReferential | null => {\r\n const sections = this.props.caseSettingsState.caseSettings!.workflow.workflowSections!;\r\n for (const section of sections) {\r\n for (const step of section.workflowSectionSteps) {\r\n if (!isNullOrUndefined(step.workflowStep) && step.workflowStep!.code == code) {\r\n return step.workflowStep;\r\n }\r\n }\r\n }\r\n return null;\r\n };\r\n\r\n getWorkflowSectionStep = (workflowSectionStepId: number): WorkflowSectionStep | null => {\r\n const sections = this.props.caseSettingsState.caseSettings!.workflow.workflowSections!;\r\n for (const section of sections) {\r\n for (const step of section.workflowSectionSteps) {\r\n if (step.id == workflowSectionStepId) {\r\n return step;\r\n }\r\n }\r\n }\r\n return null;\r\n };\r\n\r\n submitForm = async (caseId: number, caseSectionStepFormId: number, appuser: AppUser | null) => {\r\n const prevCaseStatus = this.props.caseSettingsState.case!.caseStatus;\r\n let newStatus = await this.caseService.SubmitForm(caseId, caseSectionStepFormId, appuser);\r\n\r\n if (newStatus === null) {\r\n newStatus = this.props.caseSettingsState.case!.caseStatus;\r\n }\r\n console.log('prevCaseStatus', prevCaseStatus);\r\n console.log('newStatus', newStatus);\r\n\r\n const vehicleId = this.props.caseSettingsState.case?.vehicleId;\r\n\r\n if (newStatus.caseStatus?.code === 'OF_REFUZ') {\r\n if (vehicleId) {\r\n await this.vehicleService.ChangeVehicleStatus({\r\n vehicleId,\r\n statusId: VehicleStatusCodeEnum.AcquisitionRefused,\r\n comment: ''\r\n });\r\n }\r\n }\r\n\r\n if (newStatus.caseStatus?.code === 'CLOSED') {\r\n if (vehicleId) {\r\n await this.vehicleService.ChangeVehicleStatus({\r\n vehicleId,\r\n statusId: VehicleStatusCodeEnum.Sold,\r\n comment: ''\r\n });\r\n }\r\n const workflowStep = this.getWorkflowStep(FormCode.CASE_VEHICLE_PB_ANUNT);\r\n if (workflowStep && vehicleId) {\r\n await this.vehicleService.DeleteAllAdvertWhenCaseStatusBecameClosed(caseId, vehicleId);\r\n }\r\n }\r\n\r\n if (prevCaseStatus.caseStatus?.code != newStatus.caseStatus?.code) {\r\n if (prevCaseStatus.caseStatus?.code === 'OF_REFUZ') {\r\n if (vehicleId) {\r\n await this.vehicleService.ChangeVehicleStatus({\r\n vehicleId,\r\n statusId: VehicleStatusCodeEnum.Aquisition,\r\n comment: ''\r\n });\r\n }\r\n }\r\n }\r\n\r\n this.props.SetCaseStatus(newStatus);\r\n if (appuser !== null) {\r\n this.props.AddPartner(appuser!.hoId === null ? appuser!.organizationId : appuser!.hoId);\r\n }\r\n\r\n const hasRights = FormHelpers.HasRights(\r\n this.props.workflowForm.workflowFormPermissions,\r\n this.props.appState.appUser!,\r\n newStatus.caseStatusId\r\n );\r\n this.setState({ hasRights: hasRights });\r\n };\r\n\r\n handleOrganizationChange = (newValue: WorkflowPartner | null) => {\r\n this.setState(\r\n {\r\n selectedOrganization: newValue,\r\n selectedUser: null,\r\n users: [],\r\n isLoading2: true\r\n },\r\n async () => {\r\n await this.loadUsers(newValue === null ? null : newValue.partnerId, this.state.userRoleId);\r\n }\r\n );\r\n };\r\n\r\n handleUserChange = (newValue: AppUser | null) => {\r\n this.setState({ selectedUser: newValue });\r\n };\r\n\r\n rendeBackToServiceForm = () => {\r\n return isNullOrUndefined(this.state.backToServiceFormData) ? null : (\r\n {\r\n this.sendEmail();\r\n }}\r\n >\r\n
\r\n ) => {\r\n this.setState({\r\n backToServiceFormData: {\r\n ...this.state.backToServiceFormData,\r\n text: e.target.value\r\n }\r\n });\r\n }}\r\n variant=\"outlined\"\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n />\r\n {this.renderAttachmentBox()}\r\n {this.renderAssignementForm()}\r\n
\r\n\r\n this.setState({ formSubmitted: true })}\r\n disabled={!this.state.hasRights || this.state.executing}\r\n >\r\n {this.translatorService.Tranlate('CASE_COMMENT_SEND', 'Trimite')}\r\n \r\n \r\n );\r\n };\r\n\r\n renderAssignementForm = () => {\r\n if (this.state.isUserHidden) {\r\n return null;\r\n }\r\n\r\n const label = this.translatorService.Tranlate(\r\n 'CASE_BACK_TO_SERVICE_FORM_ORGANIZATION_LABEL',\r\n 'Organizatie'\r\n );\r\n\r\n return (\r\n \r\n \r\n \r\n
\r\n {this.state.formSubmitted && !this.state.selectedOrganization && (\r\n \r\n {this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')}\r\n \r\n )}\r\n
\r\n \r\n
\r\n {!this.state.isLoading2 ? (\r\n this.handleUserChange(newValue)}\r\n getOptionLabel={(option: AppUser) => option.userName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n ) : null}\r\n \r\n );\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n this.workflowService = (this.context as AppContext).workflowService;\r\n this.appUserService = (this.context as AppContext).appUserService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.appReferentialServie = (this.context as AppContext).referentialService;\r\n this.vehicleService = (this.context as AppContext).vehicleService;\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n
{this.rendeBackToServiceForm()}
\r\n ) : null}\r\n \r\n {this.state.executing ? null : (\r\n \r\n )}\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalCaseDetailsCaseTabBackToServiceFormProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app\r\n }),\r\n CaseSettingsActionCreators,\r\n mergeProps\r\n)(withSnackbar(CaseDetailsCaseTabBackToServiceForm as any));\r\n","export enum OfferType {\r\n PURCHASE = 1,\r\n SALE = 2\r\n}\r\n","export enum PersonType {\r\n PF = 1,\r\n PJ = 2\r\n}\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n ApplicationState,\r\n CaseSettingsState,\r\n AppState,\r\n CaseSettingsActionCreators\r\n} from '../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport {\r\n Button,\r\n IconButton,\r\n Grid,\r\n Divider,\r\n Checkbox,\r\n FormControlLabel,\r\n Switch\r\n} from '@material-ui/core';\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { isNullOrUndefined } from 'util';\r\nimport { CaseRequest, CaseAttachment, ClientOffer } from '../../interfaces/Case';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport DeleteOutlineTwoToneIcon from '@material-ui/icons/DeleteOutlineTwoTone';\r\nimport FileSaver from 'file-saver';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport {\r\n ReferentialCode,\r\n AttachmentTypeCode,\r\n OfferTypeCode,\r\n Constants,\r\n WorkflowFormActionTypeCode\r\n} from '../../helpers/Constants';\r\nimport Referentials from '../../helpers/Referentials.json';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport { IReferentialService } from '../../services/Interfaces/IReferentialService';\r\nimport { FormHelpers } from '../../helpers/forms/FormHelpers';\r\nimport { WorkflowSectionStepForm } from '../../interfaces/Workflow';\r\nimport { AppUser } from '../../interfaces/AppUser';\r\nimport CaseDetailsCaseRequests from '../cases/CaseDetailsCaseRequests';\r\nimport { Autocomplete } from '@material-ui/lab';\r\nimport CheckBoxOutlineBlankIcon from '@material-ui/icons/CheckBoxOutlineBlank';\r\nimport CheckBoxIcon from '@material-ui/icons/CheckBox';\r\nimport { IVehicleService } from '../../services/Interfaces/IVehicleService';\r\nimport { Utils } from '../../helpers/Utils';\r\nimport { convertToRaw, EditorState, ContentState } from 'draft-js';\r\nimport { Editor } from 'react-draft-wysiwyg';\r\nimport 'react-draft-wysiwyg/dist/react-draft-wysiwyg.css';\r\nimport draftToHtml from 'draftjs-to-html';\r\nimport htmlToDraft from 'html-to-draftjs';\r\nimport { OfferType } from '../../enums/OfferType';\r\nimport isNil from 'lodash/isNil';\r\nimport orderBy from 'lodash/orderBy';\r\nimport { PersonType } from '../../enums/PersonType';\r\nimport moment from 'moment';\r\n\r\nconst icon = ;\r\nconst checkedIcon = ;\r\n\r\ninterface ICaseDetailsCaseTabOtherServiceFormState {\r\n otherServiceFormData: CaseRequest;\r\n attachments: CaseAttachment[];\r\n caseAttachments: CaseAttachment[];\r\n isLoading: boolean;\r\n attachType: IReferential;\r\n hasRights: boolean;\r\n executing: boolean;\r\n to: string[];\r\n selectedCaseAttachments: CaseAttachment[];\r\n clientOffers: ClientOffer[];\r\n selectedClientOffers: ClientOffer | null;\r\n hasInvoice: boolean | undefined;\r\n hasOffer: boolean | undefined;\r\n editorState: EditorState;\r\n hasEmailTemplate: boolean;\r\n}\r\n\r\nexport interface ExternalCaseDetailsCaseTabOtherServiceFormProps {\r\n workflowForm: WorkflowSectionStepForm;\r\n}\r\n\r\ntype ICaseDetailsCaseTabOtherServiceFormProps = {\r\n caseSettingsState: CaseSettingsState;\r\n appState: AppState;\r\n} & typeof CaseSettingsActionCreators &\r\n ExternalCaseDetailsCaseTabOtherServiceFormProps &\r\n ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass CaseDetailsCaseTabOtherServiceForm extends React.PureComponent<\r\n ICaseDetailsCaseTabOtherServiceFormProps,\r\n ICaseDetailsCaseTabOtherServiceFormState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private caseService!: ICaseService;\r\n private appReferentialServie!: IReferentialService;\r\n private vehicleService!: IVehicleService;\r\n static contextType = ApplicationContext;\r\n state = {\r\n otherServiceFormData: {},\r\n caseAttachments: [] as CaseAttachment[],\r\n isLoading: true,\r\n hasRights: false,\r\n executing: false,\r\n to: [] as string[],\r\n selectedCaseAttachments: [] as CaseAttachment[],\r\n clientOffers: [] as ClientOffer[],\r\n selectedClientOffers: null,\r\n hasInvoice: undefined,\r\n hasOffer: undefined,\r\n editorState: EditorState.createEmpty()\r\n } as ICaseDetailsCaseTabOtherServiceFormState;\r\n\r\n public componentDidMount() {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (isNullOrUndefined(caseSettings) || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadCaseOtherServiceForm();\r\n }\r\n );\r\n }\r\n\r\n stringToArray = (input: string): string[] => {\r\n if (input === null || input === undefined || input === '') {\r\n return [];\r\n }\r\n\r\n return input.split(';');\r\n };\r\n\r\n arrayToString = (input: string[]): string => {\r\n if (input === null || input === undefined) {\r\n return '';\r\n }\r\n\r\n return input.join(';');\r\n };\r\n\r\n isSellOrBuyOffer = (): string | null => {\r\n const workflowSteps = this.props.caseSettingsState.caseSettings?.workflow.workflowSections;\r\n if (!isNullOrUndefined(workflowSteps)) {\r\n const code17Steps = workflowSteps?.find((wfs) => {\r\n const codeF17 = wfs.workflowSectionSteps.find((x) =>\r\n x.workflowSectionStepForms.find((wfssf) => wfssf.form.code === 'F17')\r\n );\r\n return !isNullOrUndefined(codeF17);\r\n });\r\n if (!isNullOrUndefined(code17Steps)) {\r\n return OfferTypeCode.SELL;\r\n }\r\n return OfferTypeCode.BUY;\r\n }\r\n return null;\r\n };\r\n\r\n handleSwitchValue = (fieldName: string) => (e: any) => {\r\n this.setState({\r\n ...this.state,\r\n [fieldName]: e.currentTarget.checked\r\n });\r\n };\r\n\r\n renderEmailEditor = () => {\r\n return (\r\n \r\n this.setState({\r\n editorState,\r\n otherServiceFormData: {\r\n ...this.state.otherServiceFormData,\r\n text: draftToHtml(convertToRaw(editorState.getCurrentContent()))\r\n }\r\n })\r\n }\r\n toolbarHidden={true}\r\n placeholder={this.translatorService.Tranlate(\r\n 'CASE_OTHER_SERVICE_FORM_WRITE_MESSAGE_PLACEHOLDER',\r\n 'Write your message...'\r\n )}\r\n />\r\n );\r\n };\r\n\r\n loadCaseOtherServiceForm = async () => {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (isNullOrUndefined(caseSettings) || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n const ref = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.AttachmentType\r\n );\r\n const [attachmentTypes] = await Promise.all([this.appReferentialServie.Get(ref!.baseUrl)]);\r\n\r\n const [caseAttachments] = await Promise.all([\r\n this.caseService.GetCaseAttachments(\r\n caseId,\r\n attachmentTypes.filter((at) => at.isActive).map((item) => item.code!)\r\n )\r\n ]);\r\n\r\n let clientOffers = [] as ClientOffer[];\r\n if (this.props.caseSettingsState.case!.vehicleId) {\r\n clientOffers = await this.caseService.GetClientOffers(\r\n caseId,\r\n this.props.caseSettingsState.case!.vehicleId!\r\n );\r\n\r\n await Promise.all(\r\n clientOffers.map(async (co) => {\r\n const result = await this.vehicleService.GetVehicle(co.vehicleId);\r\n co.vehicle = result;\r\n })\r\n );\r\n clientOffers = clientOffers.filter((x) => !isNullOrUndefined(x.vehicle));\r\n // grab only the latest offer\r\n clientOffers = [\r\n orderBy(clientOffers, (offer: any) => moment(offer.dateModification), ['desc'])?.[0]\r\n ];\r\n }\r\n //await clientOffers.forEach(async (x) => { x.vehicle = await this.vehicleService.GetVehicle(x.vehicleId) });\r\n const hasRights = FormHelpers.HasRights(\r\n this.props.workflowForm.workflowFormPermissions,\r\n this.props.appState.appUser!,\r\n this.props.caseSettingsState.case!.caseStatus.caseStatusId\r\n );\r\n\r\n const template = this.props.workflowForm.workflowFormActions.find((a) => {\r\n return (\r\n a.actionType?.code === WorkflowFormActionTypeCode.SEND_MAIL && a.reuseEmailTemplate === true\r\n );\r\n });\r\n\r\n let templateSubject = undefined;\r\n let templateBody = undefined;\r\n let templateBodyText = undefined;\r\n\r\n if (template) {\r\n const response = await this.caseService.BuildFilledInEmailTemplate(\r\n caseId,\r\n this.props.workflowForm.id,\r\n this.props.appState.appUser\r\n );\r\n\r\n if (response && response.length) {\r\n templateSubject = response[0];\r\n templateBodyText = response[1];\r\n const blocksFromHTML = htmlToDraft(templateBodyText);\r\n templateBody = ContentState.createFromBlockArray(\r\n blocksFromHTML.contentBlocks,\r\n blocksFromHTML.entityMap\r\n );\r\n }\r\n }\r\n\r\n const caseRequest = {\r\n id: 0,\r\n caseId: this.props.caseSettingsState.case!.id,\r\n text: template ? templateBodyText : '',\r\n subject: template ? templateSubject : '',\r\n to: '',\r\n attachments: [] as CaseAttachment[],\r\n caseSectionStepFormId: this.props.workflowForm.id,\r\n cc: this.props.appState.appUser!.email\r\n } as CaseRequest;\r\n\r\n this.setState({\r\n hasEmailTemplate: templateBody ? true : false,\r\n editorState: templateBody\r\n ? EditorState.createWithContent(templateBody)\r\n : EditorState.createEmpty(),\r\n otherServiceFormData: caseRequest,\r\n attachments: caseRequest.attachments,\r\n isLoading: false,\r\n attachType: attachmentTypes.find((item) => item.code === AttachmentTypeCode.OTHER)!,\r\n hasRights: hasRights,\r\n caseAttachments: caseAttachments.filter((ca) => isNullOrUndefined(ca.caseRequestId)),\r\n clientOffers: clientOffers\r\n });\r\n };\r\n\r\n handleSelectedClientOffer = (\r\n e: React.ChangeEvent,\r\n newValue: ClientOffer | null\r\n ) => {\r\n let hasInvoice = undefined;\r\n if (this.isSellOrBuyOffer() == OfferTypeCode.SELL) {\r\n hasInvoice = false;\r\n }\r\n\r\n const offerType =\r\n newValue?.offerTypeId === OfferType.SALE\r\n ? this.translatorService.Tranlate('CASE_OTHER_SERVICE_FORM_SELLING_OFFER', 'Oferta Vanzare')\r\n : this.translatorService.Tranlate(\r\n 'CASE_OTHER_SERVICE_FORM_PURCHASE_OFFER',\r\n 'Oferta Vanzare'\r\n );\r\n\r\n this.setState({\r\n hasOffer: false,\r\n hasInvoice: hasInvoice,\r\n selectedClientOffers: newValue,\r\n otherServiceFormData: {\r\n ...this.state.otherServiceFormData,\r\n subject: newValue\r\n ? `${offerType} ${newValue.id} ${newValue.vehicle?.make?.displayName} ${newValue.vehicle?.model?.displayName} ${newValue.vehicle?.version}`\r\n : ''\r\n } as CaseRequest\r\n });\r\n };\r\n\r\n handleUploadAttachment = async (e: React.ChangeEvent) => {\r\n try {\r\n const attachments = [...this.state.attachments];\r\n\r\n if (isNullOrUndefined(e.target.files)) {\r\n return;\r\n }\r\n for (let i = 0; i < e.target.files!.length; i++) {\r\n attachments.push({\r\n id: 0,\r\n caseId: this.props.caseSettingsState.case!.id,\r\n attachmentTypeId: this.state.attachType.id,\r\n attachmentType: this.state.attachType,\r\n file: e.target.files![i],\r\n fileName: e.target.files![i].name,\r\n uploadDate: new Date(),\r\n carPhotos: false,\r\n originalFileName: e.target.files![i].name,\r\n caseRequestId: null,\r\n paymentId: null,\r\n serviceAppointmentId: null,\r\n caseClientId: null,\r\n isSelection: false\r\n });\r\n }\r\n\r\n this.setState({\r\n attachments: attachments\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n handleDeleteAttachment = async (id: number, fileName: string) => {\r\n try {\r\n const attachments = [...this.state.attachments];\r\n const index = attachments.findIndex((item) => item.id === id);\r\n attachments.splice(index, 1);\r\n\r\n this.setState({\r\n attachments: attachments\r\n });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n downloadFile = async (fileName: string, origFileName: string) => {\r\n const fileBlob = await this.caseService.GetCaseAttachment(fileName);\r\n FileSaver.saveAs(fileBlob, origFileName);\r\n };\r\n renderGenerateDocsButtons = () => {\r\n if (this.state.selectedClientOffers) {\r\n if (this.isSellOrBuyOffer() == OfferTypeCode.SELL)\r\n return (\r\n \r\n \r\n \r\n }\r\n label={this.translatorService.Tranlate(\r\n 'CASE_DETAILS_OTHER_SERVICE_ATTACH_INVOICE',\r\n 'Ataseaza Factura la email'\r\n )}\r\n labelPlacement=\"end\"\r\n className=\"mt-3 ml-0 mr-0\"\r\n />\r\n \r\n \r\n \r\n }\r\n label={this.translatorService.Tranlate(\r\n 'CASE_DETAILS_OTHER_SERVICE_ATTACH_OFFER',\r\n 'Ataseaza Oferta la email'\r\n )}\r\n labelPlacement=\"end\"\r\n className=\"mt-3 ml-0 mr-0\"\r\n />\r\n \r\n \r\n );\r\n else\r\n return (\r\n \r\n \r\n \r\n }\r\n label={this.translatorService.Tranlate(\r\n 'CASE_DETAILS_OTHER_SERVICE_ATTACH_OFFER',\r\n 'Ataseaza Oferta la email'\r\n )}\r\n labelPlacement=\"end\"\r\n className=\"mt-3 ml-0 mr-0\"\r\n />\r\n \r\n \r\n );\r\n }\r\n };\r\n renderAttachementBoxInAppDocs = () => {\r\n return (\r\n \r\n \r\n \r\n this.handleSelectedClientOffer(e, newValue)\r\n }\r\n getOptionLabel={(option: ClientOffer) => {\r\n return !isNil(option.id)\r\n ? `${option.id} ${Utils.FormatDateString(option.date)}\r\n ${\r\n option.caseClientHistory?.personTypeId === PersonType.PF\r\n ? `${option.caseClientHistory?.firstName} ${option.caseClientHistory?.lastName}`\r\n : `${option.caseClientHistory?.companyName}`\r\n } ${option.vehicle?.make?.displayName} ${option.vehicle?.model?.displayName} ${\r\n option.offerValue\r\n } ${option.currency}`\r\n : '';\r\n }}\r\n renderOption={(option, { selected }) => (\r\n \r\n \r\n {!isNil(option.id)\r\n ? `${option.id} ${Utils.FormatDateString(option.date)}\r\n ${\r\n option.caseClientHistory?.personTypeId === PersonType.PF\r\n ? `${option.caseClientHistory?.firstName} ${option.caseClientHistory?.lastName}`\r\n : `${option.caseClientHistory?.companyName}`\r\n } ${option.vehicle?.make?.displayName} ${option.vehicle?.model?.displayName} ${\r\n option.offerValue\r\n } ${option.currency}`\r\n : ''}\r\n \r\n )}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n {this.renderGenerateDocsButtons()}\r\n \r\n );\r\n };\r\n renderAttachmentBox = () => {\r\n return (\r\n \r\n \r\n \r\n this.setState({ selectedCaseAttachments: newValue })\r\n }\r\n getOptionLabel={(option: CaseAttachment) => option.originalFileName || ''}\r\n renderOption={(option, { selected }) => (\r\n \r\n \r\n {option.originalFileName}\r\n \r\n )}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n {this.state.attachments.length !== 0\r\n ? this.state.attachments.map((attach, index) => {\r\n return (\r\n
\r\n
\r\n this.downloadFile(attach.fileName, attach.originalFileName)}\r\n >\r\n {attach.fileName}\r\n \r\n
\r\n
\r\n this.handleDeleteAttachment(attach.id, attach.fileName)}\r\n >\r\n \r\n \r\n
\r\n
\r\n );\r\n })\r\n : null}\r\n
\r\n\r\n \r\n {\r\n return this.handleUploadAttachment(e);\r\n }}\r\n type=\"file\"\r\n />\r\n \r\n \r\n
\r\n );\r\n };\r\n\r\n sendEmail = async () => {\r\n try {\r\n this.setState({ executing: true, isLoading: true });\r\n\r\n const otherServiceFormData = this.state.otherServiceFormData;\r\n\r\n otherServiceFormData!.id = 0;\r\n otherServiceFormData.attachments = this.state.attachments;\r\n\r\n for (const ca of this.state.selectedCaseAttachments) {\r\n const file = await this.caseService.GetCaseAttachment(ca.fileName);\r\n otherServiceFormData.attachments.push({\r\n id: ca.id,\r\n caseId: this.props.caseSettingsState.case!.id,\r\n attachmentTypeId: this.state.attachType.id,\r\n attachmentType: this.state.attachType,\r\n file: new File([file], ca.originalFileName),\r\n fileName: ca.originalFileName,\r\n uploadDate: new Date(),\r\n carPhotos: false,\r\n originalFileName: ca.originalFileName,\r\n caseRequestId: null,\r\n paymentId: null,\r\n serviceAppointmentId: null,\r\n caseClientId: null,\r\n isSelection: false\r\n });\r\n }\r\n\r\n if (this.state.selectedClientOffers && (this.state.hasInvoice || this.state.hasOffer)) {\r\n otherServiceFormData.caseClientHistoryId =\r\n this.state.selectedClientOffers.caseClientHistoryId;\r\n otherServiceFormData.gatewayServiceUrl = Constants.apiRoot;\r\n otherServiceFormData.hasInvoice = isNullOrUndefined(this.state.hasInvoice)\r\n ? null\r\n : this.state.hasInvoice;\r\n otherServiceFormData.hasOffer = isNullOrUndefined(this.state.hasOffer)\r\n ? null\r\n : this.state.hasOffer;\r\n otherServiceFormData.calculationId =\r\n this.props.caseSettingsState.case?.caseCalculation?.id || null;\r\n otherServiceFormData.userOrganizationId = this.props.appState.appUser!.organization?.id;\r\n otherServiceFormData.offerId = this.state.selectedClientOffers.id;\r\n otherServiceFormData.vehicleId = this.state.selectedClientOffers.vehicleId;\r\n otherServiceFormData.organizationOwnerId = this.props.caseSettingsState.case?.organizationOwnerId || null;\r\n otherServiceFormData.hideOrganizationLogo = this.props.caseSettingsState.caseSettings?.workflow?.hideRenewAdvert ? true : false;\r\n }\r\n const request = await this.caseService.AddCaseRequest(otherServiceFormData);\r\n\r\n await this.submitForm(request.caseId, request.caseSectionStepFormId, null);\r\n\r\n this.setState({\r\n editorState: EditorState.createEmpty(),\r\n otherServiceFormData: {\r\n id: 0,\r\n caseId: this.props.caseSettingsState.case!.id,\r\n text: '',\r\n subject: '',\r\n to: '',\r\n attachments: [] as CaseAttachment[],\r\n caseSectionStepFormId: this.props.workflowForm.id,\r\n hasInvoice: false,\r\n hasOffer: false\r\n } as CaseRequest,\r\n attachments: [],\r\n selectedCaseAttachments: [],\r\n selectedClientOffers: null\r\n });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (ex) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n } finally {\r\n this.setState({ executing: false, isLoading: false });\r\n }\r\n };\r\n\r\n submitForm = async (caseId: number, caseSectionStepFormId: number, appUser: AppUser | null) => {\r\n let newStatus = await this.caseService.SubmitForm(caseId, caseSectionStepFormId, appUser);\r\n\r\n if (newStatus === null) {\r\n newStatus = this.props.caseSettingsState.case!.caseStatus;\r\n }\r\n\r\n this.props.SetCaseStatus(newStatus);\r\n if (appUser !== null) {\r\n this.props.AddPartner(appUser!.hoId === null ? appUser!.organizationId : appUser!.hoId);\r\n }\r\n\r\n const hasRights = FormHelpers.HasRights(\r\n this.props.workflowForm.workflowFormPermissions,\r\n this.props.appState.appUser!,\r\n newStatus.caseStatusId\r\n );\r\n this.setState({ hasRights: hasRights });\r\n };\r\n\r\n rendeOtherServiceForm = () => {\r\n const options: string[] = [];\r\n\r\n return isNullOrUndefined(this.state.otherServiceFormData) ? null : (\r\n {\r\n this.sendEmail();\r\n }}\r\n >\r\n
\r\n {/* ) => {\r\n this.setState({\r\n otherServiceFormData: {\r\n ...this.state.otherServiceFormData,\r\n to: e.target.value\r\n }\r\n });\r\n }\r\n }\r\n //variant=\"outlined\"\r\n validators={['required', 'isEmail']}\r\n errorMessages={[this.translatorService.Tranlate(\"VALIDATORS_REQUIRED\", \"Campul este obligatoriu\"),\r\n this.translatorService.Tranlate(\"VALIDATORS_EMAIL\", \"E-mail invalid\")]}\r\n /> */}\r\n\r\n {\r\n this.setState({\r\n otherServiceFormData: {\r\n ...this.state.otherServiceFormData,\r\n to: this.arrayToString(newValue)\r\n }\r\n });\r\n }}\r\n getOptionLabel={(option) => option || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n {\r\n this.setState({\r\n otherServiceFormData: {\r\n ...this.state.otherServiceFormData,\r\n cc: this.arrayToString(newValue)\r\n }\r\n });\r\n }}\r\n getOptionLabel={(option) => option || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n ) => {\r\n this.setState({\r\n otherServiceFormData: {\r\n ...this.state.otherServiceFormData,\r\n subject: e.target.value\r\n }\r\n });\r\n }}\r\n //variant=\"outlined\"\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n />\r\n {this.state.hasEmailTemplate ? (\r\n this.renderEmailEditor()\r\n ) : (\r\n ) => {\r\n this.setState({\r\n otherServiceFormData: {\r\n ...this.state.otherServiceFormData,\r\n text: e.target.value\r\n }\r\n });\r\n }}\r\n variant=\"outlined\"\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n />\r\n )}\r\n {this.renderAttachmentBox()}\r\n {this.renderAttachementBoxInAppDocs()}\r\n
\r\n\r\n \r\n {this.translatorService.Tranlate('CASE_COMMENT_SEND', 'Trimite')}\r\n \r\n \r\n );\r\n };\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n this.appReferentialServie = (this.context as AppContext).referentialService;\r\n this.vehicleService = (this.context as AppContext).vehicleService;\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n
{this.rendeOtherServiceForm()}
\r\n ) : null}\r\n \r\n {this.state.executing ? null : (\r\n \r\n )}\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalCaseDetailsCaseTabOtherServiceFormProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app\r\n }),\r\n CaseSettingsActionCreators,\r\n mergeProps\r\n)(withSnackbar(CaseDetailsCaseTabOtherServiceForm as any));\r\n","export enum CurrencyEnum {\r\n EUR = 'EUR',\r\n CHF = 'CHF',\r\n USD = 'USD',\r\n RON = 'RON'\r\n}\r\n","import React, { Fragment, useState, useEffect } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n ApplicationState,\r\n CaseSettingsState,\r\n AppState,\r\n CaseSettingsActionCreators\r\n} from '../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport AddCircleOutlineIcon from '@material-ui/icons/AddCircleOutline';\r\nimport {\r\n Button,\r\n IconButton,\r\n Grid,\r\n FormControlLabel,\r\n Switch,\r\n Divider,\r\n TextField,\r\n Input,\r\n Typography\r\n} from '@material-ui/core';\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { WorkflowPartner, WorkflowSectionStepForm } from '../../interfaces/Workflow';\r\nimport { isNull, isNullOrUndefined } from 'util';\r\nimport { CasePaymentHistory, CaseAttachment } from '../../interfaces/Case';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport { IReferentialService } from '../../services/Interfaces/IReferentialService';\r\nimport {\r\n ParametreCode,\r\n ReferentialCode,\r\n AttachmentTypeCode,\r\n OrganizationTypeCode,\r\n OfferTypeCode,\r\n VehicleStatusCodeEnum,\r\n CurrencyCode\r\n} from '../../helpers/Constants';\r\nimport { IWorkflowService } from '../../services/Interfaces/IWorkflowService';\r\nimport DeleteOutlineTwoToneIcon from '@material-ui/icons/DeleteOutlineTwoTone';\r\nimport FileSaver from 'file-saver';\r\nimport { OrganizationBankAccount } from '../../interfaces/Organization';\r\nimport { AppUser } from '../../interfaces/AppUser';\r\nimport { IOrganizationService } from '../../services/Interfaces/IOrganizationService';\r\nimport { IAppUserService } from '../../services/Interfaces/IAppUserService';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport Autocomplete, { createFilterOptions } from '@material-ui/lab/Autocomplete';\r\nimport Referentials from '../../helpers/Referentials.json';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport { FormHelpers } from '../../helpers/forms/FormHelpers';\r\nimport NumberFormat, { NumberFormatProps } from 'react-number-format';\r\nimport moment from 'moment';\r\nimport { Utils } from '../../helpers/Utils';\r\nimport { IVehicleService } from '../../services/Interfaces/IVehicleService';\r\nimport * as R from 'ramda';\r\nimport * as IbanTools from 'ibantools';\r\nimport { CurrencyEnum } from '../../enums/CurrencyEnum';\r\nimport isNil from 'lodash/isNil';\r\nimport { Cost, CostAttachment, VehicleCostRequest } from '../../interfaces/Vehicle';\r\n\r\ninterface ICaseDetailsCaseTabPaymentDetailsFormState {\r\n comment: string;\r\n organizations: WorkflowPartner[];\r\n selectedOrganization: WorkflowPartner | null;\r\n users: AppUser[];\r\n selectedUser: AppUser | null;\r\n attachments: CaseAttachment[];\r\n paymentTypeId: number | null;\r\n paymentType: IReferential | null;\r\n paymentRequestNoId: number | null;\r\n paymentRequestNo: IReferential | null;\r\n paymentAmount: number | null;\r\n paymentAmountWithoutVAT: number | null;\r\n paymentAmountVAT: number | null;\r\n currencyRate: number;\r\n secondPaymentAmount: number | null;\r\n secondPaymentAmountWithoutVAT: number | null;\r\n secondCurrency: string | null;\r\n hasFransiza: boolean;\r\n installments: number | null;\r\n bankAccount: string;\r\n bankName: string;\r\n IBANList: OrganizationBankAccount[];\r\n selectedIBAN: OrganizationBankAccount | null;\r\n isLoading: boolean;\r\n isLoading2: boolean;\r\n attachType: IReferential;\r\n paymentTypeList: IReferential[];\r\n paymentRequestNoList: IReferential[];\r\n isOrganizationsDisabled: boolean;\r\n isUsersDisabled: boolean;\r\n hasRights: boolean;\r\n isUserHidden: boolean;\r\n executing: boolean;\r\n userRoleId: number | null;\r\n currencyList: IReferential[];\r\n currencyType: IReferential | null;\r\n paymentHistory: CasePaymentHistory[];\r\n bankList: IReferential[];\r\n cursorBankAccount: {\r\n value: string;\r\n outerValue: string;\r\n selectionStart: number;\r\n selectionEnd: number;\r\n };\r\n checkIfCurrencyIsEurOrRon: boolean;\r\n showCostDetails: boolean;\r\n costTypes: IReferential[];\r\n costValues: Cost[];\r\n caseVehicleCosts: Cost[];\r\n}\r\n\r\nexport interface ExternalCaseDetailsCaseTabPaymentDetailsFormProps {\r\n workflowForm: WorkflowSectionStepForm;\r\n withCurrency: boolean;\r\n}\r\n\r\ntype ICaseDetailsCaseTabPaymentDetailsFormProps =\r\n ExternalCaseDetailsCaseTabPaymentDetailsFormProps & {\r\n caseSettingsState: CaseSettingsState;\r\n appState: AppState;\r\n } & typeof CaseSettingsActionCreators &\r\n ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass CaseDetailsCaseTabPaymentDetailsForm extends React.PureComponent<\r\n ICaseDetailsCaseTabPaymentDetailsFormProps,\r\n ICaseDetailsCaseTabPaymentDetailsFormState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private caseService!: ICaseService;\r\n private appReferentialService!: IReferentialService;\r\n private workflowService!: IWorkflowService;\r\n private appUserService!: IAppUserService;\r\n private organizationService!: IOrganizationService;\r\n private vehicleService!: IVehicleService;\r\n static contextType = ApplicationContext;\r\n state = {\r\n comment: '',\r\n organizations: [],\r\n selectedOrganization: null,\r\n users: [],\r\n selectedUser: null,\r\n attachments: [],\r\n paymentTypeId: null,\r\n paymentType: null,\r\n paymentRequestNoId: null,\r\n paymentRequestNo: null,\r\n paymentAmount: 0,\r\n paymentAmountWithoutVAT: 0,\r\n paymentAmountVAT: null,\r\n secondPaymentAmount: 0,\r\n secondPaymentAmountWithoutVAT: 0,\r\n secondCurrency: null,\r\n hasFransiza: false,\r\n installments: 0,\r\n IBANList: [],\r\n selectedIBAN: null,\r\n isLoading: false,\r\n isLoading2: false,\r\n attachType: {} as IReferential,\r\n paymentTypeList: [],\r\n paymentRequestNoList: [],\r\n isOrganizationsDisabled: false,\r\n isUsersDisabled: false,\r\n hasRights: false,\r\n isUserHidden: false,\r\n executing: false,\r\n userRoleId: null,\r\n currencyList: [] as IReferential[],\r\n currencyType: null,\r\n paymentHistory: [] as CasePaymentHistory[],\r\n bankAccount: '',\r\n bankName: '',\r\n bankList: [] as IReferential[],\r\n cursorBankAccount: {\r\n value: '',\r\n outerValue: '',\r\n selectionStart: 0,\r\n selectionEnd: 0\r\n },\r\n checkIfCurrencyIsEurOrRon: false,\r\n showCostDetails: false,\r\n costTypes: [] as IReferential[],\r\n costValues: [] as Cost[],\r\n caseVehicleCosts: [] as Cost[],\r\n currencyRate: 1\r\n } as ICaseDetailsCaseTabPaymentDetailsFormState;\r\n\r\n input = React.createRef();\r\n inputTextValidator = React.createRef();\r\n\r\n public componentDidMount() {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (isNullOrUndefined(caseSettings) || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n\r\n ValidatorForm.addValidationRule('isIbanValid', (value) => {\r\n if (!value) {\r\n return true;\r\n }\r\n const ibanValidationResult = IbanTools.validateIBAN(value.replace(/\\s/g, ''));\r\n return ibanValidationResult.valid;\r\n });\r\n\r\n if (this.input.current) {\r\n this.input!.current!.value = this.state.cursorBankAccount.outerValue;\r\n }\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadCasePaymentDetailsForm();\r\n }\r\n );\r\n }\r\n\r\n public componentDidUpdate(\r\n prevProps: ICaseDetailsCaseTabPaymentDetailsFormProps,\r\n prevState: ICaseDetailsCaseTabPaymentDetailsFormState\r\n ) {\r\n if (prevState?.currencyType?.code !== this.state.currencyType?.code) {\r\n const futureCostValues = [...this.state.costValues];\r\n futureCostValues.forEach((item) => {\r\n item.currency = this.state.currencyType?.displayName || '';\r\n item.secondCurrency = this.getSecondCurrency();\r\n item.secondValue = !item?.value\r\n ? null\r\n : this.setSecondValueBasedOnCaseCurrency(item?.value);\r\n });\r\n this.setState({ costValues: futureCostValues });\r\n }\r\n const { value, selectionStart, selectionEnd } = this.state.cursorBankAccount;\r\n if (prevState.cursorBankAccount.value !== value) {\r\n if (this.input && this.input.current) {\r\n this.input.current.value = value;\r\n\r\n this.input.current.selectionStart = selectionStart;\r\n this.input.current.selectionEnd = selectionEnd;\r\n this.input.current.focus();\r\n }\r\n }\r\n }\r\n updateOnblur() {\r\n const newBankName =\r\n this.state.bankList.find(\r\n (b) => b.code === this.state.cursorBankAccount.value.replace(/\\s/g, '').substr(4, 4)\r\n )?.name || '';\r\n this.setState({\r\n bankName: newBankName,\r\n cursorBankAccount: {\r\n ...this.state.cursorBankAccount,\r\n outerValue: this.formatBankAccount(this.state.cursorBankAccount.value.replace(/\\s/g, ''))\r\n }\r\n });\r\n }\r\n\r\n loadVehicleOffer = async () => {\r\n const isSaleOfferType = false;\r\n const offerTypeRef = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.OfferTye\r\n );\r\n\r\n const offerTypeList = await this.appReferentialService.Get(offerTypeRef!.baseUrl);\r\n\r\n const offerType = offerTypeList.find(\r\n (item) =>\r\n (item.code === OfferTypeCode.SELL && isSaleOfferType) ||\r\n (item.code === OfferTypeCode.BUY && !isSaleOfferType)\r\n )!;\r\n\r\n const [offers] = await Promise.all([\r\n R.isNil(this.props.caseSettingsState.case!.vehicleId)\r\n ? []\r\n : this.vehicleService.GetVehicleOffers(\r\n this.props.caseSettingsState.case!.vehicleId,\r\n this.props.caseSettingsState.case!.id,\r\n offerType.id\r\n )\r\n ]);\r\n return offers[0];\r\n //this.vehicleService.GetVehicleOffers(this.props.caseSettingsState.case?.vehicleId!, this.props.caseSettingsState.case!.id, OfferTypeCode.BUY);\r\n };\r\n\r\n getSecondCurrency = () => {\r\n const indexRon = this.state.currencyList.findIndex((item) => item?.code === CurrencyCode.RON);\r\n const indexEur = this.state.currencyList.findIndex((item) => item?.code === CurrencyCode.EUR);\r\n if (this.state.currencyType?.code === CurrencyCode.EUR) {\r\n return this.state.currencyList[indexRon].displayName;\r\n }\r\n\r\n return this.state.currencyType?.code === CurrencyCode.RON\r\n ? this.state.currencyList[indexEur]?.displayName\r\n : '';\r\n };\r\n\r\n loadCasePaymentDetailsForm = async () => {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (isNullOrUndefined(caseSettings) || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n\r\n const caseParameters = this.props.caseSettingsState.case!.caseParameters;\r\n const vatParameter = caseParameters.filter(\r\n (parameter) => parameter.parameter!.code === ParametreCode.TVA\r\n );\r\n const ref = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.AttachmentType\r\n );\r\n const refPaymentType = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.PaymentType\r\n );\r\n const refPaymentRequestNo = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.PaymentRequestNo\r\n );\r\n const refCurrencyType = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.Currency\r\n );\r\n const refBanks = Referentials.referential.find((item) => item.code === ReferentialCode.Bank);\r\n\r\n const serviceOrg = this.props.caseSettingsState.case!.casePartners.filter(\r\n (item) => item.organization!.organizationType!.code == OrganizationTypeCode.REP\r\n );\r\n\r\n const casee = this.props.caseSettingsState.case;\r\n const [\r\n workflowPartners,\r\n bankAccountList,\r\n attachmentTypes,\r\n currentCasePayment,\r\n paymentTypeList,\r\n paymentRequestNoList,\r\n currencyList,\r\n paymentHistoryList,\r\n banks\r\n ] = await Promise.all([\r\n this.workflowService.GetUserWorkflowPartners(\r\n this.props.caseSettingsState.case!.caseWorkflow.workflowId\r\n ),\r\n serviceOrg.length > 0\r\n ? this.organizationService.GetUserOrganizationBankAccounts(serviceOrg[0].organizationId)\r\n : [],\r\n this.appReferentialService.Get(ref!.baseUrl),\r\n this.caseService.GetCurrentCasePayment(casee!.id, this.props.workflowForm.id),\r\n this.appReferentialService.Get(refPaymentType!.baseUrl),\r\n this.appReferentialService.Get(refPaymentRequestNo!.baseUrl),\r\n this.appReferentialService.Get(refCurrencyType!.baseUrl),\r\n this.caseService.GetCasePayments(casee!.id, this.props.workflowForm.id),\r\n this.appReferentialService.Get(refBanks!.baseUrl)\r\n ]);\r\n const organizations = await this.organizationService.GetUserOrganizationsByIds(\r\n workflowPartners.map((item) => item.partnerId)\r\n );\r\n const vehicleOffer = await this.loadVehicleOffer();\r\n\r\n const [caseVehicleCosts] = await Promise.all([\r\n this.vehicleService.GetCostRequests(caseId, null) as any as Cost[]\r\n ]);\r\n\r\n const currrency = this.props.caseSettingsState.case!.caseParameters.find(\r\n (item) => item.parameter!.code === ParametreCode.CURRENCY\r\n )!.value;\r\n const selectedCurrency =\r\n currentCasePayment === null || currentCasePayment.currency === null\r\n ? currrency\r\n : currentCasePayment.currency;\r\n const checkIfCurrencyIsEurOrRon =\r\n selectedCurrency == CurrencyCode.EUR || selectedCurrency == CurrencyCode.RON;\r\n workflowPartners.forEach((wp) => {\r\n const partner = organizations.find((item) => item.id === wp.partnerId);\r\n wp.partner = isNullOrUndefined(partner) ? null : partner;\r\n });\r\n\r\n const hasRights = FormHelpers.HasRights(\r\n this.props.workflowForm.workflowFormPermissions,\r\n this.props.appState.appUser!,\r\n this.props.caseSettingsState.case!.caseStatus.caseStatusId\r\n );\r\n\r\n let selectedIban = null;\r\n if (currentCasePayment !== null) {\r\n const iban = bankAccountList.find(\r\n (item) => item.bankAccount === currentCasePayment.bankAccount\r\n );\r\n selectedIban = isNullOrUndefined(iban) ? null : iban;\r\n }\r\n\r\n const users = await this.appUserService.GetUsersInfo(\r\n paymentHistoryList.map((item) => item.createdBy)\r\n );\r\n paymentHistoryList.forEach((item) => {\r\n const user = users.find((u) => u.id === item.createdBy);\r\n item.createdByUser = isNullOrUndefined(user) ? null : user;\r\n });\r\n\r\n const bankAccount =\r\n currentCasePayment !== null\r\n ? currentCasePayment.bankAccount\r\n : casee?.caseClient?.bankAccount || '';\r\n const bankName =\r\n banks.find((b) => b.code === (bankAccount ?? '').replace(/\\s/g, '').substr(4, 4))?.name || '';\r\n\r\n const futureCostTypes = await this.vehicleService.GetVehicleCostTypes();\r\n const futureCostValues = futureCostTypes.map((cost) => {\r\n return {\r\n caseId: this.props.match.params.id,\r\n vehicleId: this.props.caseSettingsState.case?.vehicleId || null,\r\n costTypeId: cost.id,\r\n costTypeCode: cost.code || '',\r\n files: [],\r\n value: null,\r\n currencyRate: this.state.currencyType\r\n ? Utils.GetCurrencyRate(\r\n this.props.appState.currencyRates,\r\n this.props.withCurrency ? this.state.currencyType!.code! : currrency\r\n )\r\n : null,\r\n currency: this.state.currencyType?.displayName || '',\r\n secondValue: null,\r\n secondCurrency: this.getSecondCurrency(),\r\n caseSectionStepFormId: this.props.workflowForm.id\r\n };\r\n });\r\n\r\n this.setState(\r\n {\r\n organizations: workflowPartners,\r\n IBANList: bankAccountList.filter((item) => item.currency!.displayName === currrency),\r\n attachType: attachmentTypes.find((item) => item.code === AttachmentTypeCode.OTHER)!,\r\n isLoading: false,\r\n hasRights: hasRights,\r\n isUserHidden: !hasRights,\r\n comment: currentCasePayment === null ? '' : currentCasePayment.comment,\r\n attachments: [],\r\n paymentTypeId:\r\n currentCasePayment === null || currentCasePayment.paymentTypeId === null\r\n ? null\r\n : currentCasePayment.paymentTypeId,\r\n paymentType:\r\n currentCasePayment === null || currentCasePayment.paymentType === null\r\n ? null\r\n : currentCasePayment.paymentType,\r\n paymentAmount:\r\n currentCasePayment === null || currentCasePayment.paymentAmount === null\r\n ? 0\r\n : currentCasePayment.paymentAmount,\r\n paymentRequestNoId:\r\n currentCasePayment === null || currentCasePayment.paymentRequestNoId === null\r\n ? null\r\n : currentCasePayment.paymentRequestNoId,\r\n paymentRequestNo:\r\n currentCasePayment === null || currentCasePayment.paymentRequestNo === null\r\n ? null\r\n : currentCasePayment.paymentRequestNo,\r\n hasFransiza: currentCasePayment === null ? false : currentCasePayment.hasFransiza,\r\n installments:\r\n currentCasePayment === null || currentCasePayment.installments === null\r\n ? 0\r\n : currentCasePayment.installments,\r\n cursorBankAccount: {\r\n ...this.state.cursorBankAccount,\r\n outerValue: bankAccount\r\n },\r\n paymentRequestNoList: paymentRequestNoList,\r\n paymentTypeList: paymentTypeList,\r\n paymentAmountVAT: parseFloat(vatParameter[0]!.value),\r\n currencyType: currencyList.find((item) => item.code === selectedCurrency)!,\r\n currencyList: currencyList,\r\n paymentAmountWithoutVAT:\r\n !R.isNil(currentCasePayment) && currentCasePayment.paymentAmountWithoutVAT\r\n ? currentCasePayment.paymentAmountWithoutVAT\r\n : vehicleOffer?.offerValue,\r\n currencyRate: vehicleOffer?.currencyRate,\r\n secondPaymentAmountWithoutVAT:\r\n !R.isNil(currentCasePayment) && currentCasePayment.secondPaymentAmountWithoutVAT\r\n ? currentCasePayment.secondPaymentAmountWithoutVAT\r\n : vehicleOffer?.secondOfferValue,\r\n secondCurrency:\r\n !R.isNil(currentCasePayment) && currentCasePayment.secondCurrency\r\n ? currentCasePayment.secondCurrency\r\n : checkIfCurrencyIsEurOrRon\r\n ? selectedCurrency == CurrencyCode.EUR\r\n ? CurrencyCode.RON\r\n : CurrencyCode.EUR\r\n : null,\r\n paymentHistory: paymentHistoryList,\r\n bankList: banks,\r\n bankName: bankName,\r\n checkIfCurrencyIsEurOrRon: checkIfCurrencyIsEurOrRon,\r\n costTypes: futureCostTypes,\r\n costValues: futureCostValues,\r\n caseVehicleCosts: caseVehicleCosts\r\n },\r\n this.setCaseAllocation\r\n );\r\n };\r\n\r\n setCaseAllocation = async () => {\r\n if (!this.state.hasRights) {\r\n return;\r\n }\r\n\r\n const allocationResult = await FormHelpers.ParseAllocations(\r\n this.props.workflowForm.workflowFormActions,\r\n this.state.organizations,\r\n this.appUserService\r\n );\r\n\r\n if (isNullOrUndefined(allocationResult)) {\r\n const partner = this.state.organizations.find(\r\n (item) => item.partnerId === this.props.caseSettingsState.case!.caseStatus.assignedTo!.hoId\r\n );\r\n\r\n this.setState(\r\n {\r\n selectedOrganization: isNullOrUndefined(partner) ? null : partner,\r\n selectedUser: this.props.caseSettingsState.case!.caseStatus.assignedTo,\r\n organizations: this.state.organizations,\r\n isUsersDisabled: false,\r\n isOrganizationsDisabled: false\r\n },\r\n async () =>\r\n await this.loadUsers(isNullOrUndefined(partner) ? null : partner.partnerId, null)\r\n );\r\n return;\r\n }\r\n if (allocationResult.isLastUser || allocationResult.caseStatusId != null) {\r\n this.setState({ isUserHidden: true });\r\n return;\r\n }\r\n this.setState(\r\n {\r\n selectedOrganization: allocationResult.partner,\r\n selectedUser: allocationResult.user,\r\n organizations: allocationResult.partners,\r\n isUsersDisabled: !isNullOrUndefined(allocationResult.user),\r\n isOrganizationsDisabled: !isNullOrUndefined(allocationResult.partner),\r\n userRoleId: allocationResult.roleId\r\n },\r\n async () => {\r\n if (allocationResult.partner === null) {\r\n return;\r\n }\r\n await this.loadUsers(allocationResult.partner.partnerId, allocationResult.roleId);\r\n }\r\n );\r\n };\r\n\r\n loadUsers = async (organizationId: number | null, roleId: number | null) => {\r\n if (organizationId === null) {\r\n this.setState({\r\n isLoading2: false\r\n });\r\n } else {\r\n const users = await this.appUserService.GetUserAppUsers();\r\n this.setState({\r\n users: users.users.filter(\r\n (user) =>\r\n (user.organization!.hoId === organizationId ||\r\n user.organizationId === organizationId) &&\r\n ((roleId !== null && user.roleId === roleId) || roleId === null)\r\n ),\r\n isLoading2: false\r\n });\r\n }\r\n };\r\n\r\n handleUploadAttachment = async (e: React.ChangeEvent) => {\r\n try {\r\n const attachments = [...this.state.attachments];\r\n attachments.push({\r\n id: this.state.attachments.length,\r\n caseId: this.props.caseSettingsState.case!.id,\r\n attachmentTypeId: this.state.attachType.id,\r\n attachmentType: this.state.attachType,\r\n file: e.target.files![0],\r\n fileName: e.target.files![0].name,\r\n uploadDate: new Date(),\r\n carPhotos: false,\r\n originalFileName: e.target.files![0].name,\r\n caseRequestId: null,\r\n paymentId: null,\r\n serviceAppointmentId: null,\r\n caseClientId: null,\r\n isSelection: false\r\n });\r\n\r\n this.setState({\r\n attachments: attachments\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n handleUploadCostAttachment = async (e: React.ChangeEvent, index: number) => {\r\n try {\r\n const futureCostValues = [...this.state.costValues];\r\n futureCostValues[index].files.push({\r\n file: e.target.files![0],\r\n fileName: e.target.files![0].name,\r\n originalFileName: e.target.files![0].name\r\n } as any as CostAttachment);\r\n\r\n this.setState({ costValues: futureCostValues });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n handleDeleteCostAttachment = async (index: number, indexAttachment: number) => {\r\n try {\r\n const futureCostValues = [...this.state.costValues];\r\n futureCostValues[index].files.splice(indexAttachment, 1);\r\n\r\n this.setState({\r\n costValues: futureCostValues\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n handleDeleteAttachment = async (id: number, fileName: string) => {\r\n try {\r\n const attachments = [...this.state.attachments];\r\n const index = attachments.findIndex((item) => item.id === id);\r\n attachments.splice(index, 1);\r\n\r\n this.setState({\r\n attachments: attachments\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n downloadFile = async (fileName: string, origFileName: string) => {\r\n const fileBlob = await this.caseService.GetCaseAttachment(fileName);\r\n FileSaver.saveAs(fileBlob, origFileName);\r\n };\r\n\r\n renderAttachmentBox = () => {\r\n return (\r\n \r\n \r\n {this.state.attachments.length !== 0\r\n ? this.state.attachments.map((attach, index) => {\r\n return (\r\n
\r\n
\r\n this.downloadFile(attach.fileName, attach.originalFileName)}\r\n >\r\n {attach.originalFileName}\r\n \r\n
\r\n
\r\n this.handleDeleteAttachment(attach.id, attach.fileName)}\r\n >\r\n \r\n \r\n
\r\n
\r\n );\r\n })\r\n : null}\r\n
\r\n \r\n {\r\n return this.handleUploadAttachment(e);\r\n }}\r\n type=\"file\"\r\n disabled={!this.state.hasRights}\r\n />\r\n \r\n \r\n
\r\n );\r\n };\r\n\r\n renderAttachmentBoxForCosts = (costIndex: number, attachments: CostAttachment[]) => {\r\n return (\r\n \r\n \r\n {attachments.length !== 0\r\n ? attachments.map((attach, index) => {\r\n return (\r\n
\r\n
\r\n \r\n this.downloadVehicleCostFile(attach.fileName, attach.originalFileName)\r\n }\r\n >\r\n {attach.originalFileName}\r\n \r\n
\r\n
\r\n this.handleDeleteCostAttachment(costIndex, index)}\r\n >\r\n \r\n \r\n
\r\n
\r\n );\r\n })\r\n : null}\r\n
\r\n
\r\n );\r\n };\r\n\r\n sendEmail = async (sendCost: boolean) => {\r\n if (sendCost) {\r\n this.state.costValues.forEach(async (cost) => {\r\n if (cost.value) {\r\n await this.vehicleService.AddCost(cost);\r\n }\r\n });\r\n }\r\n try {\r\n this.setState({ executing: true });\r\n const currrency = this.props.caseSettingsState.case!.caseParameters.find(\r\n (item) => item.parameter!.code === ParametreCode.CURRENCY\r\n )!.value;\r\n\r\n const paymentDetailsFormData: CasePaymentHistory = {\r\n id: 0,\r\n caseId: Number.parseInt(this.props.match.params.id),\r\n comment: this.state.comment,\r\n attachments: this.state.attachments,\r\n organizationId: this.state.isUserHidden\r\n ? this.props.caseSettingsState.case!.caseStatus.assignedTo!.organizationId\r\n : this.state.selectedOrganization!.partnerId,\r\n userToId: this.state.isUserHidden\r\n ? this.props.caseSettingsState.case!.caseStatus.assignedToId\r\n : this.state.selectedUser!.id!,\r\n paymentTypeId: this.state.paymentTypeId,\r\n paymentRequestNoId: this.state.paymentRequestNoId,\r\n paymentAmount: this.props.withCurrency == false ? this.state.paymentAmount : this.getSumWithVAT(), //this.state.paymentAmount,\r\n hasFransiza: this.state.hasFransiza,\r\n installments: this.state.installments,\r\n bankAccount: this.state.cursorBankAccount.outerValue, //isNullOrUndefined(this.state.selectedIBAN) ? \"\" : this.state.selectedIBAN!.bankAccount,\r\n caseSectionStepFormId: this.props.workflowForm.id,\r\n currency: this.props.withCurrency ? this.state.currencyType!.code! : currrency,\r\n currencyRate: this.state.checkIfCurrencyIsEurOrRon\r\n ? this.state.currencyRate\r\n : Utils.GetCurrencyRate(\r\n this.props.appState.currencyRates,\r\n this.props.withCurrency ? this.state.currencyType!.code! : currrency\r\n ),\r\n secondCurrency: this.state.checkIfCurrencyIsEurOrRon ? this.state.secondCurrency : null,\r\n secondPaymentAmount: this.state.checkIfCurrencyIsEurOrRon\r\n ? this.getSecondSumWithVAT()\r\n : null,\r\n secondPaymentAmountWithoutVAT: this.state.checkIfCurrencyIsEurOrRon\r\n ? this.state.secondPaymentAmountWithoutVAT\r\n : null,\r\n paymentAmountWithoutVAT: this.state.checkIfCurrencyIsEurOrRon\r\n ? this.state.paymentAmountWithoutVAT\r\n : null\r\n } as CasePaymentHistory;\r\n\r\n await this.caseService.AddCasePayment(paymentDetailsFormData);\r\n\r\n const vehicleId = this.props.caseSettingsState.case?.vehicleId;\r\n\r\n if (vehicleId) {\r\n await this.vehicleService.ChangeVehicleStatus({\r\n vehicleId,\r\n statusId: VehicleStatusCodeEnum.Available,\r\n comment: ''\r\n });\r\n }\r\n\r\n await this.loadCaseVehicleCosts();\r\n\r\n const selectedOrganization = this.state.selectedOrganization;\r\n const hoId =\r\n selectedOrganization === null\r\n ? null\r\n : selectedOrganization.partner!.hoId === null\r\n ? selectedOrganization.partnerId\r\n : selectedOrganization.partner!.hoId;\r\n\r\n await this.submitForm(\r\n paymentDetailsFormData.caseId,\r\n paymentDetailsFormData.caseSectionStepFormId,\r\n this.state.selectedUser\r\n );\r\n\r\n await this.setCaseAllocation();\r\n\r\n await this.loadPayments();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (ex) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n } finally {\r\n this.setState({ executing: false });\r\n }\r\n };\r\n\r\n loadPayments = async () => {\r\n const payments = await this.caseService.GetCasePayments(\r\n this.props.caseSettingsState.case!.id,\r\n this.props.workflowForm.id\r\n );\r\n\r\n const users = await this.appUserService.GetUsersInfo(payments.map((item) => item.createdBy));\r\n payments.forEach((item) => {\r\n const user = users.find((u) => u.id === item.createdBy);\r\n item.createdByUser = isNullOrUndefined(user) ? null : user;\r\n });\r\n\r\n this.setState({\r\n paymentHistory: payments\r\n });\r\n };\r\n\r\n loadCaseVehicleCosts = async () => {\r\n const [caseVehicleCosts] = await Promise.all([\r\n this.vehicleService.GetCostRequests(\r\n this.props.caseSettingsState.case!.id,\r\n null\r\n ) as any as Cost[]\r\n ]);\r\n\r\n this.setState({\r\n caseVehicleCosts: caseVehicleCosts\r\n });\r\n };\r\n submitForm = async (caseId: number, caseSectionStepFormId: number, appUser: AppUser | null) => {\r\n let newStatus = await this.caseService.SubmitForm(caseId, caseSectionStepFormId, appUser);\r\n\r\n if (newStatus === null) {\r\n newStatus = this.props.caseSettingsState.case!.caseStatus;\r\n }\r\n\r\n this.props.SetCaseStatus(newStatus);\r\n if (appUser !== null) {\r\n this.props.AddPartner(appUser!.hoId === null ? appUser!.organizationId : appUser!.hoId);\r\n }\r\n\r\n const hasRights = FormHelpers.HasRights(\r\n this.props.workflowForm.workflowFormPermissions,\r\n this.props.appState.appUser!,\r\n newStatus.caseStatusId\r\n );\r\n this.setState({ hasRights: hasRights });\r\n };\r\n\r\n handleOrganizationChange = (newValue: WorkflowPartner | null) => {\r\n this.setState(\r\n {\r\n selectedOrganization: newValue,\r\n selectedUser: null,\r\n users: [],\r\n isLoading2: true\r\n },\r\n async () => {\r\n await this.loadUsers(newValue === null ? null : newValue.partnerId, this.state.userRoleId);\r\n }\r\n );\r\n };\r\n\r\n handleUserChange = (newValue: AppUser | null) => {\r\n this.setState({ selectedUser: newValue });\r\n };\r\n handleBanckAccountChange = (newValue: OrganizationBankAccount | null) => {\r\n this.setState({ selectedIBAN: newValue });\r\n };\r\n\r\n formatBankAccount = (bankAccountValue: string) => {\r\n return bankAccountValue.length > 5\r\n ? bankAccountValue\r\n //.replace(/[^\\dA-Z]/g, '')\r\n .replace(/(.{4})/g, '$1 ')\r\n .trim()\r\n : bankAccountValue;\r\n };\r\n\r\n handleBankAccountChange = (e: React.ChangeEvent) => {\r\n //const newBankName = this.state.bankList.find(b => b.code === e.target.value.replace(/\\s/g, '').substr(4, 4))?.name || '';\r\n //const newBankAccount = this.formatBankAccount(newValue);\r\n\r\n // save cursor position\r\n this.setState({\r\n ...this.state,\r\n cursorBankAccount: {\r\n ...this.state.cursorBankAccount,\r\n value: e.target.value,\r\n selectionStart: e.target.selectionStart!,\r\n selectionEnd: e.target.selectionEnd!\r\n }\r\n });\r\n\r\n //e.persist();\r\n //this.setState({ bankName: newBankName });\r\n // e.target.selectionStart = newCursor;\r\n // e.target.selectionEnd = newCursor;\r\n //console.log(\"after: newCursor \" + newCursor + \" sStart : \" + e.target.selectionStart + \" sEnd: \" + e.target.selectionEnd);\r\n //});\r\n\r\n //e.target.selectionStart = newCursor;\r\n //e.target.selectionEnd = newCursor;\r\n //() => {\r\n // e.target.selectionStart = oldSelection;\r\n // e.target.selectionEnd = oldSelection;\r\n // console.log(\"after: oldSelection \" + oldSelection + \" cursorOffset: \" + cursorOffset + \"sstart : \" + e.target.selectionStart + \" sEnd: \" + e.target.selectionEnd);\r\n //});\r\n };\r\n\r\n handlePaymentTypeChange = (newValue: IReferential | null) => {\r\n this.setState({\r\n paymentType: newValue,\r\n paymentTypeId: newValue === null ? null : newValue.id\r\n });\r\n };\r\n\r\n handleRequestNoChange = (newValue: IReferential | null) => {\r\n this.setState({\r\n paymentRequestNo: newValue,\r\n paymentRequestNoId: newValue === null ? null : newValue.id\r\n });\r\n };\r\n\r\n handlePaymentAmountChange = (e: React.ChangeEvent) => {\r\n this.setState({\r\n paymentAmount: Number.isNaN(Number.parseFloat(e.target.value))\r\n ? null\r\n : Number.parseFloat(e.target.value)\r\n });\r\n };\r\n\r\n setSecondValueBasedOnCaseCurrency(value: number): number | null {\r\n // console.log(this.props.appState.currencyRates)\r\n let resultValue = null;\r\n if (\r\n this.state.currencyType?.code == CurrencyCode.EUR ||\r\n this.state.currencyType?.code == CurrencyCode.RON\r\n ) {\r\n resultValue = 0;\r\n const previousCurrencyCode = this.state.currencyType?.code;\r\n const futureCurrencyCode =\r\n this.state.currencyType?.code == CurrencyCode.EUR ? CurrencyCode.RON : CurrencyCode.EUR;\r\n if (!R.isNil(value) && previousCurrencyCode) {\r\n let previousCurrencyRate = Utils.GetCurrencyRate(\r\n this.props.appState.currencyRates,\r\n previousCurrencyCode\r\n );\r\n let futureCurrencyRate = Utils.GetCurrencyRate(\r\n this.props.appState.currencyRates,\r\n futureCurrencyCode\r\n );\r\n\r\n if (previousCurrencyCode == CurrencyEnum.EUR) {\r\n previousCurrencyRate = this.state.currencyRate;\r\n } else if (previousCurrencyCode == CurrencyCode.RON) {\r\n futureCurrencyRate = this.state.currencyRate;\r\n }\r\n\r\n resultValue = value * (previousCurrencyRate / futureCurrencyRate);\r\n\r\n return Number.parseFloat(resultValue.toFixed(2));\r\n }\r\n }\r\n\r\n return resultValue;\r\n }\r\n\r\n handlePaymentAmountWithoutVATChange = (e: React.ChangeEvent) => {\r\n this.setState({\r\n paymentAmountWithoutVAT: Number.isNaN(Number.parseFloat(e.target.value))\r\n ? null\r\n : Number.parseFloat(e.target.value),\r\n secondPaymentAmountWithoutVAT: this.setSecondValueBasedOnCaseCurrency(\r\n Number.parseFloat(e.target.value)\r\n )\r\n });\r\n };\r\n\r\n handlePaymentAmountVATChange = (e: React.ChangeEvent) => {\r\n this.setState({\r\n paymentAmountVAT: Number.isNaN(Number.parseFloat(e.target.value))\r\n ? null\r\n : Number.parseFloat(e.target.value)\r\n });\r\n };\r\n\r\n handleInstallmentChange = (e: React.ChangeEvent) => {\r\n this.setState({\r\n installments: Number.isNaN(Number.parseFloat(e.target.value))\r\n ? null\r\n : Number.parseFloat(e.target.value)\r\n });\r\n };\r\n\r\n NumberFormatCustom = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n allowNegative={false}\r\n thousandSeparator={false}\r\n decimalScale={2}\r\n />\r\n );\r\n };\r\n\r\n getSumWithVAT = () => {\r\n const sumWithoutVat = this.state.paymentAmountWithoutVAT\r\n ? this.state.paymentAmountWithoutVAT\r\n : 0;\r\n const vat = this.state.paymentAmountVAT ? this.state.paymentAmountVAT : 0;\r\n const vatValue = Number.parseFloat((sumWithoutVat * (vat / 100)).toFixed(2));\r\n return sumWithoutVat + vatValue;\r\n };\r\n\r\n getSecondSumWithVAT = () => {\r\n const sumWithoutVat = this.state.secondPaymentAmountWithoutVAT\r\n ? this.state.secondPaymentAmountWithoutVAT\r\n : 0;\r\n const vat = this.state.paymentAmountVAT ? this.state.paymentAmountVAT : 0;\r\n const vatValue = sumWithoutVat * (vat / 100);\r\n return Number.parseFloat((sumWithoutVat + vatValue).toFixed(2));\r\n };\r\n\r\n handleCurrencyTypeChange = (newValue: IReferential | null) => {\r\n if (newValue?.code) {\r\n let paymentAmountWithoutVAT = this.state.paymentAmountWithoutVAT;\r\n const previousCurrencyCode = this.state.currencyType?.code;\r\n\r\n const checkIfCurrencyIsEurOrRon =\r\n newValue?.code == CurrencyCode.EUR || newValue?.code == CurrencyCode.RON;\r\n\r\n if (!isNil(paymentAmountWithoutVAT) && previousCurrencyCode) {\r\n let previousCurrencyRate = Utils.GetCurrencyRate(\r\n this.props.appState.currencyRates,\r\n previousCurrencyCode\r\n );\r\n\r\n let futureCurrencyRate = Utils.GetCurrencyRate(\r\n this.props.appState.currencyRates,\r\n newValue.code\r\n );\r\n\r\n if (newValue?.code == CurrencyCode.EUR || newValue?.code == CurrencyCode.RON) {\r\n if (newValue?.code == CurrencyEnum.EUR) {\r\n futureCurrencyRate = this.state.currencyRate;\r\n } else if (newValue?.code == CurrencyCode.RON) {\r\n previousCurrencyRate = this.state.currencyRate;\r\n }\r\n }\r\n\r\n paymentAmountWithoutVAT =\r\n paymentAmountWithoutVAT * (previousCurrencyRate / futureCurrencyRate);\r\n }\r\n\r\n this.setState({\r\n ...this.state,\r\n currencyType: newValue,\r\n paymentAmountWithoutVAT: paymentAmountWithoutVAT,\r\n checkIfCurrencyIsEurOrRon: checkIfCurrencyIsEurOrRon,\r\n secondCurrency:\r\n newValue?.code == CurrencyCode.EUR || newValue?.code == CurrencyCode.RON\r\n ? newValue?.code == CurrencyCode.EUR\r\n ? CurrencyCode.RON\r\n : CurrencyCode.EUR\r\n : null\r\n });\r\n }\r\n };\r\n\r\n showPaymentHistoryTimeline = () => {\r\n return this.state.paymentHistory.map((payment, index) => (\r\n
\r\n
\r\n
\r\n

\r\n {moment.utc(payment.dateCreation).local().format(this.props.appState.longDateFormat) +\r\n ' (' +\r\n payment.createdByUser!.email +\r\n ')'}\r\n

\r\n

\r\n {this.translatorService.Tranlate(\r\n 'CASE_PAYMENT_DETAILS_TIMELINE_TOTAL_SUM',\r\n 'Suma totala'\r\n )}\r\n :{payment.paymentAmount} {payment.currency}\r\n {payment.secondPaymentAmount\r\n ? '(' + payment.secondPaymentAmount + payment.secondCurrency + ')'\r\n : ''}\r\n

\r\n\r\n

\r\n {this.translatorService.Tranlate('CASE_PAYMENT_DETAILS_TIMELINE_CURRENCY', 'Moneda')}:\r\n {payment.currency}\r\n

\r\n\r\n {payment.bankAccount ? (\r\n

\r\n {this.translatorService.Tranlate(\r\n 'CASE_PAYMENT_DETAILS_TIMELINE_BANK_ACCOUNT',\r\n 'Cont bancar'\r\n )}\r\n :{payment.bankAccount}\r\n

\r\n ) : (\r\n ''\r\n )}\r\n\r\n
{this.renderPaymentAttachmentBox(payment)}
\r\n
\r\n
\r\n ));\r\n };\r\n\r\n renderPaymentAttachmentBox = (paymentRequest: CasePaymentHistory) => {\r\n return (\r\n \r\n \r\n {paymentRequest.attachments.length !== 0\r\n ? paymentRequest.attachments.map((attach, index) => {\r\n return (\r\n
\r\n
\r\n this.downloadFile(attach.fileName, attach.originalFileName)}\r\n >\r\n {attach.originalFileName}\r\n \r\n
\r\n
\r\n );\r\n })\r\n : null}\r\n
\r\n
\r\n );\r\n };\r\n\r\n handleChange = (e: React.ChangeEvent, index: number) => {\r\n const val = e.target.value;\r\n const futureCostValues = [...this.state.costValues];\r\n futureCostValues[index].value = Number.isNaN(Number.parseFloat(val))\r\n ? null\r\n : Number.parseFloat(val);\r\n futureCostValues[index].secondValue = Number.isNaN(Number.parseFloat(val))\r\n ? null\r\n : this.setSecondValueBasedOnCaseCurrency(Number.parseFloat(val));\r\n this.setState({ costValues: futureCostValues });\r\n };\r\n\r\n getLabel = (item: Cost) => {\r\n if (!item.value) {\r\n return '';\r\n }\r\n const valueWithoutVat = this.translatorService.Tranlate(\r\n 'CASE_PAYMENT_DETAILS_FORM_PAYMENT_AMOUNT_WITHOUT_VAT_LABEL',\r\n 'Suma fara TVA'\r\n );\r\n return `${valueWithoutVat} | ${item?.value?.toFixed(2)} ${item?.currency}${\r\n item?.secondCurrency && `( ${item?.secondValue} ${item?.secondCurrency})`\r\n }`;\r\n };\r\n\r\n uploadAttachment = (e: React.ChangeEvent, index: number) => {\r\n try {\r\n const futureCostValues = [...this.state.costValues];\r\n // futureCostValues[index].files = e.target.files![0];\r\n this.setState({ costValues: futureCostValues });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n deleteAttachment = (index: number) => {\r\n const futureCostValues = [...this.state.costValues];\r\n // futureCostValues[index].files = null;\r\n this.setState({ costValues: futureCostValues });\r\n };\r\n\r\n renderCostType = (cost: IReferential, index: number) => {\r\n const indexLang = cost.translations.findIndex(\r\n (lang) => lang.language === this.translatorService.GetLanguage()\r\n );\r\n return (\r\n \r\n \r\n {cost.translations[indexLang].name}\r\n \r\n \r\n \r\n ) => this.handleChange(e, index)}\r\n InputProps={{\r\n inputComponent: this.NumberFormatCustom,\r\n style: { fontWeight: 500 }\r\n }}\r\n />\r\n \r\n {this.state.costValues[index].files.length ? (\r\n \r\n {this.state.costValues[index].files.length !== 0\r\n ? this.state.costValues[index].files.map((attach, indexAttachment) => {\r\n return (\r\n
\r\n
\r\n \r\n this.downloadVehicleCostFile(attach.fileName, attach.originalFileName)\r\n }\r\n >\r\n \r\n {attach.originalFileName}\r\n \r\n \r\n
\r\n
\r\n this.handleDeleteCostAttachment(index, indexAttachment)}\r\n >\r\n \r\n \r\n
\r\n
\r\n );\r\n })\r\n : null}\r\n
\r\n ) : (\r\n \r\n \r\n {\r\n return this.handleUploadCostAttachment(e, index);\r\n }}\r\n type=\"file\"\r\n disabled={!this.state.hasRights}\r\n />\r\n \r\n \r\n \r\n )}\r\n
\r\n {/* {this.renderAttachmentBoxForCosts(index, this.state.costValues[index].files)} */}\r\n
\r\n );\r\n };\r\n\r\n downloadVehicleCostFile = async (fileName: string, origFileName: string) => {\r\n const fileBlob = await this.vehicleService.GetVehicleCostAttachment(fileName);\r\n FileSaver.saveAs(fileBlob, origFileName);\r\n };\r\n\r\n renderCostDetails = () => {\r\n return (\r\n <>\r\n \r\n \r\n {this.translatorService.Tranlate('COSTS', 'Costuri')}\r\n \r\n \r\n \r\n \r\n {this.translatorService.Tranlate('ADD_COSTS', 'Adauga cost aditional')}{' '}\r\n \r\n {\r\n this.state.hasRights\r\n ? this.setState({ showCostDetails: !this.state.showCostDetails })\r\n : '';\r\n }}\r\n style={{ marginLeft: 10 }}\r\n color=\"primary\"\r\n />\r\n \r\n\r\n {this.state.showCostDetails &&\r\n this.state.hasRights &&\r\n this.state.costTypes.map((type, index) => this.renderCostType(type, index))}\r\n\r\n {this.state.caseVehicleCosts && this.state.caseVehicleCosts.length && !this.state.hasRights\r\n ? this.renderCostDetailsFromCase()\r\n : ''}\r\n \r\n );\r\n };\r\n\r\n renderCostTypeFromCase = (cost: Cost, index: number) => {\r\n const indexLang = cost?.costType?.translations.findIndex(\r\n (lang) => lang.language === this.translatorService.GetLanguage()\r\n );\r\n if (indexLang === undefined || indexLang < 0) {\r\n return <>;\r\n }\r\n\r\n return (\r\n \r\n \r\n {cost?.costType?.translations[indexLang].name}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {cost.attachments && cost.attachments.length !== 0\r\n ? cost.attachments.map((attach, index) => {\r\n return (\r\n
\r\n
\r\n \r\n this.downloadVehicleCostFile(attach.fileName, attach.originalFileName)\r\n }\r\n >\r\n {attach.originalFileName}\r\n \r\n
\r\n
\r\n );\r\n })\r\n : ''}\r\n
\r\n
\r\n
\r\n );\r\n };\r\n\r\n renderCostDetailsFromCase() {\r\n return (\r\n
\r\n {this.state?.caseVehicleCosts &&\r\n this.state?.caseVehicleCosts?.map((cost, index) =>\r\n this.renderCostTypeFromCase(cost, index)\r\n )}\r\n
\r\n );\r\n }\r\n renderPaymentDetailsWithCurrencyForm = () => {\r\n const caseHasVAT = this.state.paymentAmountVAT !== 0;\r\n\r\n const priceLabel = caseHasVAT\r\n ? this.translatorService.Tranlate(\r\n 'CASE_PAYMENT_DETAILS_FORM_PAYMENT_AMOUNT_WITH_VAT_LABEL',\r\n 'Suma cu TVA'\r\n )\r\n : this.translatorService.Tranlate('CASE_PAYMENT_DETAILS_TIMELINE_TOTAL_SUM', 'Suma cu TVA');\r\n\r\n return isNullOrUndefined(this.state.comment) ? null : (\r\n {\r\n this.sendEmail(true);\r\n }}\r\n >\r\n
\r\n ) => {\r\n this.setState({ comment: e.target.value });\r\n }}\r\n variant=\"outlined\"\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n />\r\n\r\n {caseHasVAT && (\r\n <>\r\n \r\n\r\n \r\n \r\n )}\r\n \r\n\r\n \r\n this.handleCurrencyTypeChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n this.updateOnblur()}\r\n validators={['isIbanValid']}\r\n errorMessages={[\r\n this.translatorService.Tranlate(\r\n 'CASE_PAYMENT_DETAILS_FORM_IBAN_INVALID_WARNING',\r\n 'IBAN-ul este invalid'\r\n )\r\n ]}\r\n InputLabelProps={{\r\n className:\r\n this.state.cursorBankAccount.outerValue !== '' ? 'MuiInputLabel-shrink' : ''\r\n }}\r\n InputProps={{\r\n inputComponent: ({ inputRef: {}, ...rest }) => {\r\n return (\r\n this.handleBankAccountChange(e)}\r\n />\r\n );\r\n }\r\n }}\r\n />\r\n {this.renderAttachmentBox()}\r\n {this.renderCostDetails()}\r\n {this.renderAssignementForm()}\r\n
\r\n\r\n \r\n {this.translatorService.Tranlate('SAVE', 'Salveaza')}\r\n \r\n \r\n );\r\n };\r\n\r\n rendePaymentDetailsForm = () => {\r\n return isNullOrUndefined(this.state.comment) ? null : (\r\n {\r\n this.sendEmail(false);\r\n }}\r\n >\r\n
\r\n ) => {\r\n this.setState({ comment: e.target.value });\r\n }}\r\n variant=\"outlined\"\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n />\r\n\r\n \r\n this.handlePaymentTypeChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n {/* \r\n this.handleRequestNoChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n /> */}\r\n
\r\n this.setState({ hasFransiza: e.currentTarget.checked })}\r\n color=\"primary\"\r\n id=\"isActive\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n labelPlacement=\"start\"\r\n label={this.translatorService.Tranlate(\r\n 'CASE_PAYMENT_DETAILS_FORM_HAS_FRANSIZA_LABEL',\r\n 'Are fransiza'\r\n )}\r\n />\r\n
\r\n \r\n\r\n \r\n this.updateOnblur()}\r\n validators={['isIbanValid']}\r\n errorMessages={[\r\n this.translatorService.Tranlate(\r\n 'CASE_PAYMENT_DETAILS_FORM_IBAN_INVALID_WARNING',\r\n 'IBAN-ul este invalid'\r\n )\r\n ]}\r\n InputLabelProps={{\r\n className:\r\n this.state.cursorBankAccount.outerValue !== '' ? 'MuiInputLabel-shrink' : ''\r\n }}\r\n InputProps={{\r\n inputComponent: ({ inputRef: {}, ...rest }) => {\r\n return (\r\n this.handleBankAccountChange(e)}\r\n />\r\n );\r\n }\r\n }}\r\n />\r\n\r\n {this.renderAttachmentBox()}\r\n {this.renderAssignementForm()}\r\n
\r\n\r\n \r\n {this.translatorService.Tranlate('PAYMENT_DETAILS_SAVE', 'Salveaza')}\r\n \r\n \r\n );\r\n };\r\n\r\n renderAssignementForm = () => {\r\n if (this.state.isUserHidden) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n \r\n this.handleOrganizationChange(newValue)\r\n }\r\n getOptionLabel={(option: WorkflowPartner) => option.partner!.displayName || ''}\r\n filterOptions={createFilterOptions({\r\n matchFrom: 'any',\r\n stringify: (option: WorkflowPartner) => option.partner!.displayName\r\n })}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n
\r\n \r\n
\r\n {!this.state.isLoading2 ? (\r\n this.handleUserChange(newValue)}\r\n getOptionLabel={(option: AppUser) => option.userName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n ) : null}\r\n
\r\n );\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n this.workflowService = (this.context as AppContext).workflowService;\r\n this.appUserService = (this.context as AppContext).appUserService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.vehicleService = (this.context as AppContext).vehicleService;\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n
\r\n {this.props.withCurrency === false\r\n ? this.rendePaymentDetailsForm()\r\n : this.renderPaymentDetailsWithCurrencyForm()}\r\n\r\n \r\n\r\n {this.state.paymentHistory.length > 0 ? (\r\n
\r\n {this.showPaymentHistoryTimeline()}\r\n
\r\n ) : (\r\n ''\r\n )}\r\n
\r\n ) : null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalCaseDetailsCaseTabPaymentDetailsFormProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app\r\n }),\r\n CaseSettingsActionCreators,\r\n mergeProps\r\n)(withSnackbar(CaseDetailsCaseTabPaymentDetailsForm as any));\r\n","import * as React from 'react';\r\nimport { ApplicationState, AppState, CaseSettingsState } from '../../store';\r\nimport { ApplicationContext, AppContext } from '../../context/Contexts';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { IReferentialService } from '../../services/Interfaces/IReferentialService';\r\nimport { IAppUserService } from '../../services/Interfaces/IAppUserService';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { IOrderService } from '../../services/Interfaces/IOrderService';\r\nimport {\r\n Box,\r\n Button,\r\n Card,\r\n FormControl,\r\n InputLabel,\r\n MenuItem,\r\n Radio,\r\n Select,\r\n TextField,\r\n Tooltip\r\n} from '@material-ui/core';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { CaseCalculationAlternativePart, CaseCalculationHistory, CaseCalculationPart, TariffPercentResponse } from '../../interfaces/Case';\r\nimport { PartToBeOrdered } from '../../interfaces/Order';\r\nimport Referentials from '../../helpers/Referentials.json';\r\nimport { AlternativeCode, CalculationSectionCodeEnum, ReferentialCode } from '../../helpers/Constants';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport MaterialTable, { Column, Icons, EditComponentProps } from 'material-table';\r\nimport { forwardRef } from 'react';\r\nimport Check from '@material-ui/icons/Check';\r\nimport Clear from '@material-ui/icons/Clear';\r\nimport Edit from '@material-ui/icons/Edit';\r\nimport { IOrganizationService } from '../../services/Interfaces/IOrganizationService';\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { Organization } from '../../interfaces/Organization';\r\nimport { IWorkflowService } from '../../services/Interfaces/IWorkflowService';\r\nimport * as R from 'ramda';\r\nimport _ from 'lodash';\r\nimport NumberFormat from 'react-number-format';\r\nimport { Utils } from '../../helpers/Utils';\r\n\r\nconst tableIcons = {\r\n Check: forwardRef((props, ref) => ),\r\n Clear: forwardRef((props, ref) => ),\r\n Edit: forwardRef((props, ref) => )\r\n} as Icons;\r\n\r\nexport interface ExternalUpdateOrderPartProps {\r\n partDetails: PartToBeOrdered;\r\n currency: string;\r\n workflowId: any;\r\n workflowSuppliersList: any[];\r\n additionTariff: TariffPercentResponse;\r\n discountTariff: TariffPercentResponse;\r\n onSave: () => void;\r\n}\r\n\r\ntype UpdateOrderPartProps = ExternalUpdateOrderPartProps & {\r\n appState: AppState;\r\n caseSettings: CaseSettingsState;\r\n} & ProviderContext &\r\n RouteComponentProps;\r\n\r\ninterface IUpdateOrderPartState {\r\n isLoading: boolean;\r\n orderpartsList: PartToBeOrdered[];\r\n qualityParts: IReferential[];\r\n selectedQualityPart: IReferential[];\r\n workflowSuppliers: Organization[];\r\n alternativeParts: CaseCalculationAlternativePart[];\r\n clearStateAlternativeParts: boolean;\r\n partLoader: boolean;\r\n calculationParts: CaseCalculationPart[];\r\n sections: IReferential[];\r\n}\r\n\r\nclass UpdateOrderPart extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private orderService!: IOrderService;\r\n private appReferentialService!: IReferentialService;\r\n private appUserService!: IAppUserService;\r\n private caseService!: ICaseService;\r\n private organizationService!: IOrganizationService;\r\n private workflowService!: IWorkflowService;\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n isLoading: true,\r\n orderpartsList: [],\r\n qualityParts: [],\r\n selectedQualityPart: [],\r\n workflowSuppliers: [],\r\n alternativeParts: [],\r\n clearStateAlternativeParts: false,\r\n partLoader: false,\r\n calculationParts: [],\r\n sections: []\r\n } as IUpdateOrderPartState;\r\n\r\n public componentDidMount() {\r\n this.setState(\r\n {\r\n isLoading: false\r\n },\r\n async () => {\r\n await this.loadData();\r\n }\r\n );\r\n }\r\n\r\n loadData = async () => {\r\n const refQualityPart = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.CarPartCategory\r\n );\r\n\r\n const [qualityParts, calculationParts, sections] = await Promise.all([\r\n this.appReferentialService.Get(refQualityPart!.baseUrl),\r\n this.props.partDetails!.caseCalculationHistoryId ? this.caseService.GetCaseCalculationParts(this.props.partDetails!.caseCalculationHistoryId) : ([] as CaseCalculationPart[]),\r\n this.caseService.GetCalculationSections()\r\n ]);\r\n\r\n const workflowSuppliersList = this.props.workflowSuppliersList;\r\n const suppliersInit =\r\n workflowSuppliersList.length > 0\r\n ? await this.organizationService.GetUserOrganizationsByIds(\r\n Array.from(new Set(workflowSuppliersList.map((item) => item.supplierId)))\r\n )\r\n : [];\r\n const suppliers = suppliersInit.filter((item) => item.isActive === true);\r\n console.log('calculationParts', calculationParts);\r\n console.log('groupedUniqueId', this.props.partDetails!.groupedUniqueId);\r\n const calculationPartsCopy = calculationParts.filter((item) => (item.groupedUniqueId !== null && item.groupedUniqueId !== this.props.partDetails!.groupedUniqueId) || (item.groupedUniqueId === null && item.id !== this.props.partDetails!.caseCalculationPartId));\r\n const selectedCalculationPart = calculationParts.find((item) => item.groupedUniqueId === this.props.partDetails!.groupedUniqueId && item.id === this.props.partDetails!.caseCalculationPartId);\r\n console.log('calculationPartsCopy', calculationPartsCopy);\r\n console.log('selectedCalculationPart', selectedCalculationPart);\r\n console.log('calculationPartsResult', calculationPartsCopy.concat([selectedCalculationPart!]));\r\n this.setState({\r\n orderpartsList: [this.props.partDetails!],\r\n qualityParts: qualityParts,\r\n workflowSuppliers: suppliers,\r\n isLoading: false,\r\n calculationParts: calculationPartsCopy.concat([selectedCalculationPart!]),\r\n sections: sections\r\n });\r\n };\r\n\r\n public renderTable = () => {\r\n return (\r\n this.onRowUpdate(newData, oldData)\r\n }}\r\n />\r\n );\r\n };\r\n\r\n public getLocalization = () => {\r\n return {\r\n header: { actions: '' },\r\n body: {\r\n editTooltip: this.translatorService.Tranlate('EDIT', 'Editeaza'),\r\n emptyDataSourceMessage: this.translatorService.Tranlate(\r\n 'NO_RECORDS_TO_DISPLAY',\r\n 'Nu exista date de afisat'\r\n ),\r\n editRow: {\r\n cancelTooltip: this.translatorService.Tranlate('CANCEL', 'Anuleaza'),\r\n saveTooltip: this.translatorService.Tranlate('SAVE', 'Salveaza')\r\n }\r\n }\r\n };\r\n };\r\n\r\n onRowUpdate = (newData: PartToBeOrdered, oldData?: PartToBeOrdered): Promise =>\r\n new Promise(async (resolve, reject) => {\r\n const quality = this.state.qualityParts.find((item) => item.id === newData.carPartCategoryId);\r\n const supplier = this.state.workflowSuppliers.find((item) => item.id === newData.supplierId);\r\n newData.carPartCategory = !R.isNil(quality) ? quality : null;\r\n newData.supplier = !R.isNil(supplier) ? supplier : null;\r\n\r\n if (!this.validateRef(newData)) {\r\n reject();\r\n return;\r\n }\r\n\r\n if (oldData) {\r\n try {\r\n const item = { ...newData };\r\n item.alternativePartQuality = null;\r\n item.carPartCategory = null;\r\n item.supplier = null;\r\n this.setState((prevState: IUpdateOrderPartState) => {\r\n const orderpartsList = [...this.state.orderpartsList];\r\n orderpartsList[orderpartsList.indexOf(oldData)] = newData;\r\n\r\n return { ...prevState, orderpartsList: orderpartsList };\r\n });\r\n resolve();\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n }\r\n });\r\n\r\n validateRef = (orderPart: PartToBeOrdered): boolean => {\r\n if (\r\n orderPart.guideNumber === '' ||\r\n orderPart.guideNumber === undefined ||\r\n orderPart.guideNumber === null\r\n ) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('LIST_OF_VALUES_ERROR_CODE_EMPTY', 'Eroare'),\r\n { variant: 'error' }\r\n );\r\n return false;\r\n }\r\n\r\n if (orderPart.name === '' || orderPart.name === undefined || orderPart.name === null) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('ORDER_PART_ERROR_NAME_EMPTY', 'Eroare'),\r\n { variant: 'error' }\r\n );\r\n return false;\r\n }\r\n\r\n const price =\r\n orderPart.alternativePartQualityId === null\r\n ? orderPart.originalPrice\r\n : orderPart.alternativePrice;\r\n if ((price !== null && price.toString() === '') || price === undefined || price === null) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('ORDER_PART_ERROR_ORIG_PRICE_EMPTY', 'Eroare'),\r\n { variant: 'error' }\r\n );\r\n return false;\r\n }\r\n if (price < 0) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('ORDER_PART_ERROR_ORIG_PRICE_INVALID', 'Eroare'),\r\n { variant: 'error' }\r\n );\r\n return false;\r\n }\r\n\r\n if (\r\n orderPart.pieceNr.toString() === '' ||\r\n orderPart.pieceNr === undefined ||\r\n orderPart.pieceNr === null\r\n ) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('ORDER_PART_ERROR_UNITS_EMPTY', 'Eroare'),\r\n { variant: 'error' }\r\n );\r\n return false;\r\n }\r\n const discount =\r\n orderPart.alternativePartQualityId === null\r\n ? orderPart.discount\r\n : orderPart.alternativePartDiscount;\r\n if ((discount !== null && discount < 0) || (discount !== null && discount > 100)) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('ORDER_PART_ERROR_DISCOUNT_INVALID', 'Eroare'),\r\n { variant: 'error' }\r\n );\r\n return false;\r\n }\r\n\r\n return true;\r\n };\r\n\r\n handlePriceChange = (event: any, gridProps: any) => {\r\n const row = gridProps.rowData;\r\n if (row.alternativePartQualityId === null) {\r\n row.originalPrice = event.target.value;\r\n } else {\r\n row.alternativePrice = event.target.value;\r\n }\r\n\r\n gridProps.onRowDataChange({\r\n ...gridProps.rowData\r\n });\r\n };\r\n\r\n handlePieceNrChange = (event: any, gridProps: any) => {\r\n const row = gridProps.rowData;\r\n row.pieceNr = event.target.value === null ? 0 : parseFloat(event.target.value);\r\n\r\n gridProps.onRowDataChange({\r\n ...gridProps.rowData\r\n });\r\n };\r\n\r\n handleDiscountChange = (event: any, gridProps: any) => {\r\n const row = gridProps.rowData;\r\n if (row.alternativePartQualityId === null) {\r\n row.discount = event.target.value;\r\n } else {\r\n row.alternativePartDiscount = event.target.value;\r\n }\r\n\r\n gridProps.onRowDataChange({\r\n ...gridProps.rowData\r\n });\r\n };\r\n\r\n handleProducerChange = (event: any, gridProps: any) => {\r\n const row = gridProps.rowData;\r\n row.producer = event.target.value;\r\n\r\n gridProps.onRowDataChange({\r\n ...gridProps.rowData\r\n });\r\n };\r\n\r\n handleDeliveryTimeChange = (event: any, gridProps: any) => {\r\n const row = gridProps.rowData;\r\n row.deliveryTime = event.target.value;\r\n\r\n gridProps.onRowDataChange({\r\n ...gridProps.rowData\r\n });\r\n };\r\n\r\n handleStockChange = (event: any, gridProps: any) => {\r\n const row = gridProps.rowData;\r\n if (row.alternativePartQualityId === null) {\r\n row.availableQuantity = event.target.value;\r\n } else {\r\n row.alternativePartStockQuantity = event.target.value;\r\n }\r\n\r\n gridProps.onRowDataChange({\r\n ...gridProps.rowData\r\n });\r\n };\r\n\r\n handleLocationChange = (event: any, gridProps: any) => {\r\n const row = gridProps.rowData;\r\n if (row.alternativePartQualityId === null) {\r\n row.location = event.target.value;\r\n } else {\r\n row.alternativePartStockLocation = event.target.value;\r\n }\r\n\r\n gridProps.onRowDataChange({\r\n ...gridProps.rowData\r\n });\r\n };\r\n\r\n handleRemarksChange = (event: any, gridProps: any) => {\r\n const row = gridProps.rowData;\r\n if (row.alternativePartQualityId === null) {\r\n row.remarks = event.target.value;\r\n } else {\r\n row.alternativePartRemarks = event.target.value;\r\n }\r\n\r\n gridProps.onRowDataChange({\r\n ...gridProps.rowData\r\n });\r\n };\r\n\r\n handleQualityChange = (event: any, gridProps: any) => {\r\n const row = gridProps.rowData;\r\n const quality = this.state.qualityParts.find((item) => item.id === event.target.value);\r\n if (row.alternativePartQualityId === null) {\r\n row.carPartCategoryId = !R.isNil(quality) ? quality.id : null;\r\n row.carPartCategory = !R.isNil(quality) ? quality : null;\r\n } else {\r\n row.alternativePartQualityId = !R.isNil(quality) ? quality.id : null;\r\n row.alternativePartQuality = !R.isNil(quality) ? quality : null;\r\n }\r\n\r\n gridProps.onChange(event.target.value);\r\n\r\n gridProps.onRowDataChange({\r\n ...gridProps.rowData\r\n });\r\n };\r\n\r\n displayOrderPartOtherDetails = (supplier: any, id: any) => {\r\n const orderPart = this.state.orderpartsList.find((item) => item.id === id);\r\n return (\r\n \r\n
\r\n {this.translatorService.Tranlate('ORDER_PART_DETAILS_PRODUCER_LABEL', 'Producator') +\r\n ': ' +\r\n (R.isNil(orderPart!.producer) ? '' : orderPart!.producer)}\r\n
\r\n
\r\n {this.translatorService.Tranlate(\r\n 'ORDER_PART_DETAILS_DELIVERY_TIME_LABEL',\r\n 'Livrare'\r\n ) +\r\n ': ' +\r\n (R.isNil(orderPart!.deliveryTime) ? '' : orderPart!.deliveryTime)}\r\n
\r\n
\r\n {this.translatorService.Tranlate('ORDER_PART_DETAILS_STOCK_LABEL', 'Disponibil') +\r\n ': ' +\r\n (orderPart!.alternativePartQualityId === null\r\n ? orderPart!.availableStock\r\n : orderPart!.alternativePartStockQuantity === null\r\n ? ''\r\n : orderPart!.alternativePartStockQuantity)}\r\n
\r\n
\r\n {this.translatorService.Tranlate('ORDER_PART_DETAILS_LOCATION_LABEL', 'Locatie') +\r\n ': ' +\r\n (orderPart!.alternativePartQualityId === null\r\n ? orderPart!.location\r\n : orderPart!.alternativePartStockLocation)}\r\n
\r\n
\r\n }\r\n >\r\n
\r\n {(R.isNil(supplier) ? 'N/A' : supplier.name) + ' '}\r\n \r\n
\r\n \r\n );\r\n };\r\n\r\n renderOrderPartDetailsEditable = (props: EditComponentProps) => {\r\n return (\r\n
\r\n \r\n \r\n {this.translatorService.Tranlate('ORDER_PART_DETAILS_SUPPLIER_LABEL', 'Furnizor')}\r\n \r\n props.onChange(e.target.value)}\r\n >\r\n {this.state.workflowSuppliers.map((item) => (\r\n \r\n {item.name}\r\n \r\n ))}\r\n \r\n \r\n this.handleProducerChange(e, props)}\r\n />\r\n this.handleDeliveryTimeChange(e, props)}\r\n />\r\n this.handleStockChange(e, props)}\r\n />\r\n this.handleLocationChange(e, props)}\r\n />\r\n
\r\n );\r\n };\r\n\r\n\r\n NumberFormatCustom = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n thousandSeparator={false}\r\n decimalScale={2}\r\n isNumericString\r\n />\r\n );\r\n };\r\n \r\n getColumns = () => {\r\n return [\r\n {\r\n field: 'id',\r\n hidden: true,\r\n title: ''\r\n } as Column,\r\n {\r\n field: 'guideNumber',\r\n title: this.translatorService.Tranlate('ORDER_PART_DETAILS_CODE_LABEL', 'Cod'),\r\n render: (rowData: any) => {\r\n return (\r\n \r\n );\r\n },\r\n editComponent: (props: EditComponentProps) => {\r\n return (\r\n \r\n );\r\n }\r\n } as Column,\r\n {\r\n field: 'name',\r\n title: this.translatorService.Tranlate('ORDER_PART_DETAILS_NAME_LABEL', 'Denumire')\r\n } as Column,\r\n {\r\n field: 'carPartCategoryId',\r\n title: this.translatorService.Tranlate('ORDER_PART_DETAILS_QUALITY_LABEL', 'Calitate'),\r\n render: (rowData: any) => {\r\n if (rowData.alternativePartQualityId === null) {\r\n return rowData.carPartCategory.displayName;\r\n } else {\r\n return rowData.alternativePartQuality.displayName;\r\n }\r\n },\r\n editComponent: (props: EditComponentProps) => {\r\n return (\r\n this.handleQualityChange(e, props)}\r\n >\r\n {this.state.qualityParts.map((item) => (\r\n \r\n {item.displayName}\r\n \r\n ))}\r\n \r\n );\r\n }\r\n } as Column,\r\n {\r\n field: 'originalPrice',\r\n title: this.translatorService.Tranlate(\r\n 'ORDER_PART_DETAILS_ORIGINAL_PRICE_LABEL',\r\n 'Pret unitar'\r\n ),\r\n render: (rowData: any) => {\r\n if (rowData.alternativePartQualityId === null) {\r\n return (\r\n Utils.countryNumberFormat((Math.round(rowData.originalPrice * 100) / 100).toFixed(2), this.props.appState.appUser?.organization?.country ?? null) + ' ' + this.props.currency\r\n );\r\n } else {\r\n return (\r\n Utils.countryNumberFormat((Math.round(rowData.alternativePrice * 100) / 100).toFixed(2), this.props.appState.appUser?.organization?.country ?? null) +\r\n ' ' +\r\n this.props.currency\r\n );\r\n }\r\n },\r\n editComponent: (props: EditComponentProps) => {\r\n return (\r\n this.handlePriceChange(e, props)}\r\n />\r\n );\r\n }\r\n } as Column,\r\n {\r\n field: 'pieceNr',\r\n title: this.translatorService.Tranlate('ORDER_PART_DETAILS_PIECE_NR_LABEL', 'Unitati'),\r\n render: (rowData: any) => {\r\n return rowData.pieceNr;\r\n },\r\n editComponent: (props: EditComponentProps) => {\r\n return (\r\n this.handlePieceNrChange(e, props)}\r\n />\r\n );\r\n }\r\n } as Column,\r\n {\r\n field: 'discount',\r\n title: this.translatorService.Tranlate('ORDER_PART_DETAILS_DISCOUNT_LABEL', 'Discount (%)'),\r\n render: (rowData: any) => {\r\n if (rowData.alternativePartQualityId === null) {\r\n return rowData.discount;\r\n } else {\r\n return rowData.alternativePartDiscount;\r\n }\r\n },\r\n editComponent: (props: EditComponentProps) => {\r\n return (\r\n this.handleDiscountChange(e, props)}\r\n />\r\n );\r\n }\r\n } as Column,\r\n {\r\n field: '',\r\n title: this.translatorService.Tranlate(\r\n 'ORDER_PART_DETAILS_TOTAL_PRICE_LABEL',\r\n 'Pret total'\r\n ),\r\n render: (rowData: any) => {\r\n if (rowData.alternativePartQualityId === null) {\r\n if (R.isNil(rowData.discount)) {\r\n return (\r\n Utils.countryNumberFormat((Math.round(rowData.pieceNr * rowData.originalPrice * 100) / 100).toFixed(2), this.props.appState.appUser?.organization?.country ?? null) +\r\n ' ' +\r\n this.props.currency\r\n );\r\n }\r\n return (\r\n Utils.countryNumberFormat((\r\n Math.round(\r\n (rowData.pieceNr * rowData.originalPrice -\r\n (rowData.pieceNr * rowData.originalPrice * rowData.discount) / 100) *\r\n 100\r\n ) / 100\r\n ).toFixed(2), this.props.appState.appUser?.organization?.country ?? null) +\r\n ' ' +\r\n this.props.currency\r\n );\r\n } else {\r\n if (R.isNil(rowData.alternativePartDiscount)) {\r\n return (\r\n Utils.countryNumberFormat((Math.round(rowData.pieceNr * rowData.alternativePrice * 100) / 100).toFixed(2), this.props.appState.appUser?.organization?.country ?? null) +\r\n ' ' +\r\n this.props.currency\r\n );\r\n }\r\n return (\r\n Utils.countryNumberFormat((\r\n Math.round(\r\n (rowData.pieceNr * rowData.alternativePrice -\r\n (rowData.pieceNr * rowData.alternativePrice * rowData.alternativePartDiscount) /\r\n 100) *\r\n 100\r\n ) / 100\r\n ).toFixed(2), this.props.appState.appUser?.organization?.country ?? null) +\r\n ' ' +\r\n this.props.currency\r\n );\r\n }\r\n }\r\n } as Column,\r\n {\r\n field: 'supplierId',\r\n title: this.translatorService.Tranlate('ORDER_PART_OTHER_DETAILS_LABEL', 'Detalii'),\r\n render: (rowData: any) => {\r\n return (\r\n
\r\n \r\n {this.translatorService.Tranlate('ORDER_PART_DETAILS_SUPPLIER_LABEL', 'Furnizor')}\r\n \r\n {this.displayOrderPartOtherDetails(rowData.supplier, rowData.id)}\r\n
\r\n );\r\n },\r\n editComponent: (props: EditComponentProps) => {\r\n return this.renderOrderPartDetailsEditable(props);\r\n }\r\n } as Column,\r\n {\r\n field: 'remarks',\r\n title: this.translatorService.Tranlate('ORDER_PART_DETAILS_REMARKS_LABEL', 'Observatii'),\r\n render: (rowData: any) => {\r\n if (rowData.alternativePartQualityId === null) {\r\n return rowData.remarks;\r\n } else {\r\n return rowData.alternativePartRemarks;\r\n }\r\n },\r\n editComponent: (props: EditComponentProps) => {\r\n return (\r\n this.handleRemarksChange(e, props)}\r\n />\r\n );\r\n }\r\n } as Column\r\n ];\r\n };\r\n\r\n getCalculationParts = (alternativePart: CaseCalculationAlternativePart, calculationPartIndex: number, part: PartToBeOrdered): CaseCalculationPart[] => {\r\n const calculationParts = this.state.calculationParts;\r\n if (calculationPartIndex !== -1) {\r\n calculationParts[calculationPartIndex] = {\r\n ...calculationParts[calculationPartIndex],\r\n alternativePrice: alternativePart.alternativePrice,\r\n alternativePartDiscount: alternativePart.alternativePartDiscount,\r\n alternativeGuideNumber: alternativePart.alternativeGuideNumber,\r\n alternativePartCode: alternativePart.alternativePartCode,\r\n alternativePartQuality: alternativePart.alternativePartQuality,\r\n alternativePartQualityId: alternativePart.alternativePartQualityId,\r\n alternativePartName: alternativePart.name,\r\n alternativePartStockLocation: alternativePart.stockLocation,\r\n alternativePartStockQuantity: alternativePart.availableQuantity,\r\n supplier: alternativePart.supplier,\r\n supplierId: alternativePart.supplierId,\r\n producer: alternativePart.producer,\r\n deliveryTime: alternativePart.deliveryTime.toString(),\r\n validityTime: alternativePart.validityTime?.toString() || null,\r\n codeType: alternativePart.codeType?.toString() || null,\r\n type: alternativePart.type?.toString() || null,\r\n orderCode: alternativePart.orderCode?.toString() || null,\r\n locationId: alternativePart.locationId || null,\r\n alternativePartRemarks: alternativePart.remarks,\r\n minQty: alternativePart.minQty,\r\n packing: alternativePart.packing,\r\n bundleItem: alternativePart.bundleItem,\r\n bundleNo: alternativePart.bundleNo,\r\n bundleQuantity: alternativePart.bundleQuantity,\r\n excludeFromOrder: alternativePart.excludeFromOrder,\r\n isChild: alternativePart.isChild,\r\n productId: alternativePart.productId || null,\r\n codEan: alternativePart.codEan?.toString() || null,\r\n id: part.caseCalculationPartId,\r\n alternativePriceWithoutDiscount: alternativePart.alternativePriceWithoutDiscount,\r\n availableQuantity: alternativePart.availableQuantity\r\n }\r\n if (part.package && part.package.length) {\r\n for (let j = 0; j < part.package.length; j++) {\r\n calculationParts.push({\r\n guideNumber: part.package[j].guideNumber,\r\n name: part.package[j].name,\r\n pieceNr: part.package[j].pieceNr,\r\n alternativePrice: part.package[j].alternativePrice,\r\n alternativePartDiscount: part.package[j].alternativePartDiscount,\r\n alternativeGuideNumber: part.package[j].alternativeGuideNumber,\r\n alternativePartCode: part.package[j].alternativePartCode,\r\n alternativePartQuality: part.package[j].alternativePartQuality,\r\n alternativePartQualityId: part.package[j].alternativePartQualityId,\r\n alternativePartName: part.package[j].name,\r\n alternativePartStockLocation: part.package[j].stockLocation,\r\n alternativePartStockQuantity: part.package[j].availableQuantity,\r\n supplier: part.package[j].supplier,\r\n supplierId: part.package[j].supplierId,\r\n producer: part.package[j].producer,\r\n deliveryTime: part.package[j].deliveryTime.toString(),\r\n validityTime: part.package[j].validityTime?.toString() || null,\r\n codeType: part.package[j].codeType?.toString() || null,\r\n type: part.package[j].type?.toString() || null,\r\n orderCode: part.package[j].orderCode?.toString() || null,\r\n locationId: part.package[j].locationId || null,\r\n alternativePartRemarks: part.package[j].remarks,\r\n minQty: part.package[j].minQty,\r\n packing: part.package[j].packing,\r\n bundleItem: part.package[j].bundleItem,\r\n bundleNo: part.package[j].bundleNo,\r\n bundleQuantity: part.package[j].bundleQuantity,\r\n excludeFromOrder: part.package[j].excludeFromOrder,\r\n isChild: part.package[j].isChild,\r\n productId: part.package[j].productId || null,\r\n codEan: part.package[j].codEan?.toString() || null,\r\n id: 0,\r\n caseCalculationHistoryId: part.caseCalculationHistory.id,\r\n calculationSectionId: this.state.sections.find((item) => item.code === CalculationSectionCodeEnum.PART)!.id,\r\n groupedUniqueId: part.groupedUniqueId,\r\n alternativeNetPrice: part.package[j].alternativeNetPrice,\r\n alternativePriceWithoutDiscount: part.package[j].alternativePriceWithoutDiscount,\r\n availableQuantity: part.availableQuantity\r\n } as CaseCalculationPart);\r\n }\r\n }\r\n\r\n calculationParts.forEach((item) => {\r\n item.calculationSection = null;\r\n item.carPartCategory = null;\r\n item.alternativePartQuality = null;\r\n item.supplier = null;\r\n });\r\n }\r\n return calculationParts;\r\n }\r\n\r\n save = async () => {\r\n try {\r\n const part = this.state.orderpartsList[0];\r\n const alternativePart = this.state.alternativeParts.find(\r\n (item) => item.selectedAlternativePart !== 9999999999999\r\n );\r\n console.log('Part', part);\r\n console.log('AlternativePart', alternativePart);\r\n if (this.state.alternativeParts.length > 0 && !R.isNil(alternativePart)) {\r\n if (!R.isNil(alternativePart)) {\r\n if (\r\n alternativePart!.availableQuantity !== null &&\r\n alternativePart!.availableQuantity < part.pieceNr\r\n ) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'ORDER_MAX_QUANTITY_ALERT_MSG',\r\n 'Cantitatea disponibila este insuficienta!'\r\n ),\r\n { variant: 'error' }\r\n );\r\n return false;\r\n }\r\n }\r\n\r\n const currentPacking = alternativePart.packing?.split('|')[0];\r\n const secondItemOfPacking = alternativePart.packing?.split('|')[1];\r\n if (currentPacking && secondItemOfPacking) {\r\n const currentPackingNumber = parseFloat(currentPacking);\r\n if (\r\n part.pieceNr % currentPackingNumber != 0 ||\r\n part.pieceNr < alternativePart.minQty\r\n ) {\r\n this.props.enqueueSnackbar( this.translatorService.Tranlate(\r\n 'MIN_PACKING_ERROR_MSG',\r\n 'Cantitatea comandata trebuie sa fie '\r\n ) +\r\n alternativePart.minQty +\r\n this.translatorService.Tranlate('MIN_PACKING_MULTIPLE_ERROR_MSG', ' sau multiplul acesteia!') + ' \\n', {\r\n variant: 'error',\r\n style: { whiteSpace: 'pre-line' }\r\n });\r\n return;\r\n }\r\n } else {\r\n if (part.pieceNr < alternativePart.minQty) {\r\n this.props.enqueueSnackbar( this.translatorService.Tranlate(\r\n 'MIN_PACKING_ERROR_MSG',\r\n 'Cantitatea comandata trebuie sa fie '\r\n ) +\r\n alternativePart.minQty +\r\n this.translatorService.Tranlate('MIN_PACKING_MULTIPLE_ERROR_MSG', ' sau multiplul acesteia!') + ' \\n', {\r\n variant: 'error',\r\n style: { whiteSpace: 'pre-line' }\r\n });\r\n return;\r\n }\r\n }\r\n\r\n if (!Number.isInteger(part.pieceNr)) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'DECIMAL_ERROR_MSG',\r\n 'Cantitatea comandata trebuie sa fie un numar intreg fara zecimale'\r\n ),\r\n {\r\n variant: 'error'\r\n }\r\n );\r\n return;\r\n }\r\n\r\n if (!R.isNil(alternativePart.availableQuantity) && alternativePart.availableQuantity < part.pieceNr) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'ORDER_MAX_QUANTITY_ALERT_MSG',\r\n 'Cantitatea disponibila este insuficienta!'\r\n ),\r\n { variant: 'error' }\r\n );\r\n return;\r\n }\r\n \r\n part.alternativePartQuality = null;\r\n part.carPartCategory = null;\r\n part.supplier = null;\r\n\r\n let calculationParts = this.state.calculationParts;\r\n const calculationPartIndex = calculationParts.findIndex((x) => x.id === part.caseCalculationPartId);\r\n if (calculationPartIndex !== -1) {\r\n calculationParts = this.getCalculationParts(alternativePart, calculationPartIndex, part);\r\n calculationParts[calculationPartIndex].interogationList = JSON.stringify(this.state.alternativeParts);\r\n await this.caseService.UpdateCalculationPartsAndCasePartToBeOrdered(\r\n calculationParts,\r\n \"\",\r\n \"\",\r\n part.caseCalculationHistory.id,\r\n part.caseCalculationHistory.partsLocationOrganizationId,\r\n this.props.appState.appUser!.organizationId,\r\n this.props.appState.appUser!.organizationId,\r\n this.props.appState.appUser!.organization!.name\r\n );\r\n part.caseCalculationHistory = null as unknown as CaseCalculationHistory;\r\n \r\n await this.orderService.UpdatePartToBeOrdered(part);\r\n\r\n this.props.onSave();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } else {\r\n console.log(\"Nu s-a gasit piesa alternativa!\");\r\n }\r\n \r\n }\r\n } catch (err) {\r\n console.log(err);\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n renderOrderPartsSection = () => {\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? this.renderTable() : null}\r\n
\r\n );\r\n };\r\n\r\n interogateAlternativeParts = async (partDetails: PartToBeOrdered) => {\r\n try {\r\n this.setState({\r\n partLoader: true\r\n });\r\n const alternativeParts = await this.caseService.InterogateCaseCalculationsAlternativeParts(\r\n partDetails.id,\r\n partDetails.guideNumber,\r\n this.props.additionTariff.value,\r\n this.props.discountTariff.value,\r\n this.props.caseSettings.caseSettings!.workflow.id, \r\n partDetails.caseCalculationHistory.partsLocationOrganizationId \r\n );\r\n\r\n this.setState({\r\n alternativeParts: alternativeParts,\r\n partLoader: false\r\n });\r\n\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n\r\n handleAlternativePartSelect = (\r\n id: number,\r\n originalPartid: number,\r\n alternativePart: CaseCalculationAlternativePart\r\n ) => {\r\n const caseCalculationOriginalPartsCopy = [...this.state.orderpartsList];\r\n const originalPartIndex = caseCalculationOriginalPartsCopy.findIndex(\r\n (item) => item.id === originalPartid\r\n );\r\n caseCalculationOriginalPartsCopy[originalPartIndex] = {\r\n ...caseCalculationOriginalPartsCopy[originalPartIndex],\r\n alternativePrice: alternativePart.alternativePrice,\r\n alternativePartDiscount: alternativePart.alternativePartDiscount,\r\n alternativeGuideNumber: alternativePart.alternativeGuideNumber,\r\n alternativePartCode: alternativePart.alternativePartCode,\r\n alternativePartQuality: alternativePart.alternativePartQuality,\r\n alternativePartQualityId: alternativePart.alternativePartQualityId,\r\n alternativePartName: alternativePart.name,\r\n alternativePartStockLocation: alternativePart.stockLocation,\r\n alternativePartStockQuantity: alternativePart.availableQuantity,\r\n supplier: alternativePart.supplier,\r\n supplierId: alternativePart.supplierId,\r\n producer: alternativePart.producer,\r\n deliveryTime: alternativePart.deliveryTime.toString(),\r\n validityTime: alternativePart.validityTime?.toString() || null,\r\n codeType: alternativePart.codeType?.toString() || null,\r\n type: alternativePart.type?.toString() || null,\r\n orderCode: alternativePart.orderCode?.toString() || null,\r\n locationId: alternativePart.locationId || null,\r\n alternativePartRemarks: alternativePart.remarks,\r\n minQty: alternativePart.minQty,\r\n packing: alternativePart.packing,\r\n bundleItem: alternativePart.bundleItem,\r\n bundleNo: alternativePart.bundleNo,\r\n bundleQuantity: alternativePart.bundleQuantity,\r\n excludeFromOrder: alternativePart.excludeFromOrder,\r\n isChild: alternativePart.isChild,\r\n productId: alternativePart.productId || null,\r\n codEan: alternativePart.codEan?.toString() || null,\r\n alternativePriceWithoutDiscount: alternativePart.alternativePriceWithoutDiscount,\r\n availableQuantity: alternativePart.availableQuantity\r\n };\r\n console.log('Selected Part', caseCalculationOriginalPartsCopy[originalPartIndex]);\r\n\r\n const currentPacking = caseCalculationOriginalPartsCopy[originalPartIndex].packing?.split('|')[0];\r\n const secondItemOfPacking = caseCalculationOriginalPartsCopy[originalPartIndex].packing?.split('|')[1];\r\n \r\n const caseCalculationAlternativePartCopy = [...this.state.alternativeParts];\r\n const specificAlternativeParts = this.state.alternativeParts\r\n .filter(\r\n (alternativePart) =>\r\n alternativePart.originalPartId === caseCalculationOriginalPartsCopy[originalPartIndex].id\r\n )\r\n .sort(function (a: any, b: any) {\r\n return a.id - b.id;\r\n });\r\n const findAlternativePartGroup = _.filter(specificAlternativeParts, function (object) {\r\n return (\r\n object.bundleNo != null &&\r\n object.bundleNo == caseCalculationOriginalPartsCopy[originalPartIndex].bundleNo &&\r\n object.alternativePartCode !=\r\n caseCalculationOriginalPartsCopy[originalPartIndex].alternativePartCode\r\n );\r\n });\r\n \r\n const idList: any = [];\r\n for (let i = 0; i < findAlternativePartGroup.length; i++) {\r\n idList.push(findAlternativePartGroup[i].id);\r\n }\r\n\r\n \r\n caseCalculationAlternativePartCopy.forEach((item) => {\r\n item.selectedAlternativePart =\r\n item.originalPartId === originalPartid\r\n ? item.id === id\r\n ? id\r\n : 9999999999999\r\n : item.selectedAlternativePart;\r\n item.partFromGroup =\r\n item.originalPartId === originalPartid\r\n ? idList.includes(item.id)\r\n ? item.id\r\n : 9999999999999\r\n : item.partFromGroup;\r\n if (\r\n item.originalPartId === originalPartid &&\r\n item.selectedAlternativePart !== 9999999999999\r\n ) {\r\n const initialCaseCalculationOriginalParts = {\r\n ...caseCalculationOriginalPartsCopy[originalPartIndex]\r\n };\r\n caseCalculationOriginalPartsCopy[originalPartIndex].package = [];\r\n if (currentPacking && secondItemOfPacking) {\r\n const currentPackingNumber = parseFloat(currentPacking);\r\n if (\r\n caseCalculationOriginalPartsCopy[originalPartIndex].pieceNr % currentPackingNumber !=\r\n 0 ||\r\n caseCalculationOriginalPartsCopy[originalPartIndex].pieceNr <\r\n caseCalculationOriginalPartsCopy[originalPartIndex].minQty\r\n ) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'MIN_PACKING_ERROR_MSG',\r\n 'Cantitatea comandata trebuie sa fie '\r\n ) +\r\n currentPackingNumber +\r\n this.translatorService.Tranlate('MIN_PACKING_MULTIPLE_ERROR_MSG', ' sau multiplul acesteia!'),\r\n { variant: 'error',\r\n autoHideDuration: 5000 }\r\n );\r\n }\r\n } else if (\r\n caseCalculationOriginalPartsCopy[originalPartIndex].pieceNr <\r\n caseCalculationOriginalPartsCopy[originalPartIndex].minQty\r\n ) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'MIN_PACKING_ERROR_MSG',\r\n 'Cantitatea comandata trebuie sa fie '\r\n ) +\r\n caseCalculationOriginalPartsCopy[originalPartIndex].minQty +\r\n this.translatorService.Tranlate('MIN_PACKING_MULTIPLE_ERROR_MSG', ' sau multiplul acesteia!'),\r\n { variant: 'error',\r\n autoHideDuration: 5000 }\r\n );\r\n }\r\n if (findAlternativePartGroup.length) {\r\n let displayPopup = true;\r\n let alternativePartString = '';\r\n for (let i = 0; i < findAlternativePartGroup.length; i++) {\r\n if (\r\n findAlternativePartGroup[i].alternativePartCode == AlternativeCode.TAXAMEDIU &&\r\n findAlternativePartGroup.length == 1\r\n ) {\r\n displayPopup = false;\r\n }\r\n alternativePartString +=\r\n findAlternativePartGroup[i].name +\r\n '(' +\r\n findAlternativePartGroup[i].alternativePrice +\r\n ' RON)' +\r\n '\\n';\r\n caseCalculationOriginalPartsCopy[originalPartIndex].package.push({\r\n ...initialCaseCalculationOriginalParts,\r\n id: 0,\r\n originalPrice: 0,\r\n alternativePrice: findAlternativePartGroup[i].alternativePrice,\r\n alternativePartDiscount: findAlternativePartGroup[i].alternativePartDiscount,\r\n alternativeGuideNumber: findAlternativePartGroup[i].alternativeGuideNumber,\r\n alternativePartCode: findAlternativePartGroup[i].alternativePartCode,\r\n alternativePartQuality: findAlternativePartGroup[i].alternativePartQuality,\r\n alternativePartQualityId: findAlternativePartGroup[i].alternativePartQualityId,\r\n alternativePartName: findAlternativePartGroup[i].name,\r\n alternativePartStockLocation: findAlternativePartGroup[i].stockLocation,\r\n alternativePartStockQuantity: findAlternativePartGroup[i].availableQuantity,\r\n supplier: findAlternativePartGroup[i].supplier,\r\n supplierId: findAlternativePartGroup[i].supplierId,\r\n producer: findAlternativePartGroup[i].producer,\r\n deliveryTime: findAlternativePartGroup[i].deliveryTime.toString(),\r\n validityTime: findAlternativePartGroup[i].validityTime?.toString() || null,\r\n codeType: findAlternativePartGroup[i].codeType?.toString() || null,\r\n type: findAlternativePartGroup[i].type?.toString() || null,\r\n orderCode: findAlternativePartGroup[i].orderCode?.toString() || null,\r\n locationId: findAlternativePartGroup[i].locationId || null,\r\n alternativePartRemarks: findAlternativePartGroup[i].remarks,\r\n minQty: findAlternativePartGroup[i].minQty,\r\n packing: findAlternativePartGroup[i].packing,\r\n bundleItem: findAlternativePartGroup[i].bundleItem,\r\n bundleNo: findAlternativePartGroup[i].bundleNo,\r\n bundleQuantity: findAlternativePartGroup[i].bundleQuantity,\r\n excludeFromOrder: true,\r\n productId: findAlternativePartGroup[i].productId || null,\r\n codEan: findAlternativePartGroup[i].codEan || null,\r\n alternativePriceWithoutDiscount: findAlternativePartGroup[i].alternativePriceWithoutDiscount,\r\n availableQuantity: findAlternativePartGroup[i].availableQuantity\r\n });\r\n }\r\n if (displayPopup) {\r\n this.props.enqueueSnackbar(\r\n ' Componente adaugate la comanda: \\n' + alternativePartString,\r\n {\r\n variant: 'error',\r\n style: { whiteSpace: 'pre-line' },\r\n autoHideDuration: 5000 \r\n }\r\n );\r\n }\r\n }\r\n\r\n if (!Number.isInteger(caseCalculationOriginalPartsCopy[originalPartIndex].pieceNr)) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'DECIMAL_ERROR_MSG',\r\n 'Cantitatea comandata trebuie sa fie un numar intreg fara zecimale'\r\n ),\r\n {\r\n variant: 'error',\r\n autoHideDuration: 5000 \r\n }\r\n );\r\n }\r\n\r\n if (\r\n item.availableQuantity !== null &&\r\n item.availableQuantity < caseCalculationOriginalPartsCopy[originalPartIndex].pieceNr\r\n ) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'ORDER_MAX_QUANTITY_ALERT_MSG',\r\n 'Cantitatea disponibila este insuficienta!'\r\n ),\r\n { variant: 'error' }\r\n );\r\n }\r\n }\r\n });\r\n\r\n console.log('caseCalculationAlternativePartCopy', caseCalculationAlternativePartCopy);\r\n console.log('caseCalculationOriginalPartsCopy', caseCalculationOriginalPartsCopy);\r\n this.setState({\r\n alternativeParts: caseCalculationAlternativePartCopy,\r\n orderpartsList: caseCalculationOriginalPartsCopy\r\n });\r\n };\r\n\r\n handleAlternativePartChecked = (selected: number, id: number, partFromGroup: number) => {\r\n return selected === id || partFromGroup == id;\r\n };\r\n\r\n clearSelectedAlternativeParts = async (originalPartId: number) => {\r\n let alternativePartsCopy = [...this.state.alternativeParts];\r\n alternativePartsCopy = alternativePartsCopy.map((item) => {\r\n item.selectedAlternativePart =\r\n item.originalPartId === originalPartId ? 9999999999999 : item.selectedAlternativePart;\r\n item.partFromGroup =\r\n item.originalPartId === originalPartId ? 9999999999999 : item.partFromGroup;\r\n return item;\r\n });\r\n\r\n this.setState({\r\n alternativeParts: alternativePartsCopy,\r\n clearStateAlternativeParts: true\r\n });\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.orderService = (this.context as AppContext).orderService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n this.appUserService = (this.context as AppContext).appUserService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.workflowService = (this.context as AppContext).workflowService;\r\n\r\n return (\r\n \r\n {this.renderOrderPartsSection()}\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n this.interogateAlternativeParts(this.props.partDetails!)}\r\n className=\"mb-3 float-right bg-success text-white\"\r\n size=\"small\"\r\n variant=\"contained\"\r\n color=\"default\"\r\n >\r\n {this.translatorService.Tranlate('INTEROGATE', 'Interogheaza')}\r\n \r\n
\r\n
\r\n \r\n
\r\n {this.state.partLoader ? null : (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.state.alternativeParts.length > 0 ? (\r\n this.state.alternativeParts.map((alternativePart, alternativePartindex) => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n })\r\n ) : (\r\n \r\n \r\n \r\n )}\r\n \r\n
\r\n 0 &&\r\n this.state.alternativeParts.some(\r\n (el) => el.selectedAlternativePart !== 9999999999999\r\n )\r\n ? this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_ALTERNATIVE_CALCULATION_DETAILS_CLEAR_LABEL',\r\n 'Goleste'\r\n )\r\n : ''\r\n }\r\n >\r\n
\r\n 0 &&\r\n this.state.alternativeParts.some(\r\n (el) => el.selectedAlternativePart !== 9999999999999\r\n )\r\n ? false\r\n : true\r\n }\r\n onClick={(e) =>\r\n this.clearSelectedAlternativeParts(this.props.partDetails!.id)\r\n }\r\n className=\"ml-1 min min-w-auto\"\r\n size=\"small\"\r\n variant=\"contained\"\r\n color=\"secondary\"\r\n >\r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n {this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_ALTERNATIVE_CALCULATION_DETAILS_NAME_LABEL',\r\n 'Nume'\r\n )}\r\n \r\n {this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_ALTERNATIVE_CALCULATION_DETAILS_CODE_LABEL',\r\n 'Cod'\r\n )}\r\n \r\n {this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_ALTERNATIVE_CALCULATION_DETAILS_PRICE_LABEL',\r\n 'Pret'\r\n )}\r\n \r\n {this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_ALTERNATIVE_CALCULATION_DETAILS_QUALITY_LABEL',\r\n 'Calitate'\r\n )}\r\n \r\n {this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_ALTERNATIVE_CALCULATION_DETAILS_DELIVERY_LABEL',\r\n 'Livrare'\r\n )}\r\n \r\n {this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_ALTERNATIVE_CALCULATION_DETAILS_OWNER_LABEL_ACRONYM',\r\n 'Producator'\r\n )}\r\n \r\n {this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_ALTERNATIVE_CALCULATION_DETAILS_SUPLIER_LABEL',\r\n 'Furnizor'\r\n )}\r\n \r\n {this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_ALTERNATIVE_CALCULATION_DETAILS_QUANTITY_LABEL',\r\n 'Cantitate'\r\n )}\r\n \r\n {this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_ALTERNATIVE_CALCULATION_DETAILS_STOCK_LOCATION_LABEL',\r\n 'Locatie'\r\n )}\r\n
\r\n \r\n this.handleAlternativePartSelect(\r\n alternativePart.id,\r\n alternativePart.originalPartId,\r\n alternativePart\r\n )\r\n }\r\n disabled={\r\n alternativePart.isChild\r\n }\r\n value={alternativePart.id}\r\n id={alternativePart.id.toString()}\r\n name={this.props.partDetails.id.toString()}\r\n />\r\n \r\n {!R.isNil(alternativePart.remarks) &&\r\n alternativePart.remarks !== '' ? (\r\n \r\n \r\n {this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_ALTERNATIVE_CALCULATION_DETAILS_REMARKS_LABEL',\r\n 'Observatii'\r\n )}\r\n \r\n
{alternativePart.remarks}
\r\n \r\n }\r\n >\r\n
{alternativePart.name}
\r\n \r\n ) : (\r\n alternativePart.name\r\n )}\r\n
{alternativePart.alternativeGuideNumber}\r\n {R.isNil(alternativePart!.alternativePartDiscount)\r\n ? Utils.countryNumberFormat(\r\n (Math.round(alternativePart.alternativePrice * 100) / 100).toFixed(2),\r\n this.props.appState.appUser?.organization?.country ?? null\r\n )\r\n : Utils.countryNumberFormat(\r\n (\r\n Math.round(\r\n alternativePart.alternativePrice * (1 - alternativePart!.alternativePartDiscount / 100) * 100\r\n ) / 100\r\n ).toFixed(2),\r\n this.props.appState.appUser?.organization?.country ?? null\r\n )\r\n }\r\n \r\n {R.isNil(alternativePart.alternativePartQuality)\r\n ? ''\r\n : alternativePart.alternativePartQuality.displayName}\r\n {alternativePart.deliveryTime}{alternativePart.producer}{alternativePart.supplier!.name}\r\n {isNaN(alternativePart.availableQuantity) === null\r\n ? null\r\n : alternativePart.availableQuantity}\r\n {alternativePart.stockLocation}
\r\n \r\n {this.translatorService.Tranlate(\r\n 'NO_RECORDS_TO_DISPLAY',\r\n 'Nu exista inregistrari de afisat'\r\n )}\r\n \r\n
) }\r\n
\r\n \r\n {this.translatorService.Tranlate('SAVE', 'Salveaza')}\r\n \r\n
\r\n ) : null}\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalUpdateOrderPartProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app,\r\n caseSettings: state.caseSettings\r\n }),\r\n null,\r\n mergeProps\r\n)(withSnackbar(UpdateOrderPart as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n ApplicationState,\r\n CaseSettingsState,\r\n AppState,\r\n CaseSettingsActionCreators\r\n} from '../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport {\r\n Button,\r\n IconButton,\r\n Dialog,\r\n DialogTitle,\r\n DialogContent,\r\n Tooltip,\r\n Modal,\r\n Box\r\n} from '@material-ui/core';\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { isNullOrUndefined } from 'util';\r\nimport MUIDataTable, {\r\n MUIDataTableColumnOptions,\r\n SelectableRows,\r\n MUIDataTableMeta\r\n} from 'mui-datatables';\r\nimport { MUITranslations } from '../../helpers/MUITableTranslations';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport { IAppUserService } from '../../services/Interfaces/IAppUserService';\r\nimport AddCircleTwoToneIcon from '@material-ui/icons/AddCircleTwoTone';\r\nimport EditOutlinedIcon from '@material-ui/icons/EditOutlined';\r\nimport AutorenewOutlinedIcon from '@material-ui/icons/AutorenewOutlined';\r\nimport { IOrderService } from '../../services/Interfaces/IOrderService';\r\nimport { Order, PartToBeOrdered } from '../../interfaces/Order';\r\nimport OrderDetails from '../orders/OrderDetails';\r\n\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport { CaseStatusCodeEnum, excludedCodes, nontStockRoles, OrderStatusCode, OwnStockCodeEnum, ParametreCode, ReferentialCode, SupplierCode, TariffTypeGroupCodeEnum } from '../../helpers/Constants';\r\nimport { IOrganizationService } from '../../services/Interfaces/IOrganizationService';\r\nimport { Organization } from '../../interfaces/Organization';\r\nimport UpdateOrderPart from '../orders/UpdateOrderPart';\r\nimport DeleteOutlineTwoToneIcon from '@material-ui/icons/DeleteOutlineTwoTone';\r\nimport { WorkflowSectionStepForm } from '../../interfaces/Workflow';\r\nimport { FormHelpers } from '../../helpers/forms/FormHelpers';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport { AppUser } from '../../interfaces/AppUser';\r\nimport * as R from 'ramda';\r\nimport { DialogActions, DialogContentText } from '@material-ui/core';\r\nimport _, { min } from 'lodash';\r\nimport { IReferentialService } from '../../services/Interfaces/IReferentialService';\r\nimport Referentials from '../../helpers/Referentials.json';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport { AutomateAppointmentRequest, CaseStatusHistory, ChangeCaseStatusBasedCodeRequest, ChangeCaseStatusRequest, CreatePartsToBeOrderedRequest, TariffPercentRequest, TariffPercentResponse } from '../../interfaces/Case';\r\nimport { Utils } from '../../helpers/Utils';\r\n\r\ninterface ICaseDetailsCaseTabOrderFormState {\r\n isLoading: boolean;\r\n orderList: Order[];\r\n unorderedParts: PartToBeOrdered[];\r\n orderIds: number[];\r\n isDialogOpen: boolean;\r\n isAddSupplierOrderStatusDialogOpen: boolean;\r\n workflowSuppliers: Organization[];\r\n selectedWorkflowSupplier: Organization | null;\r\n isUpdateOrderPartDialogOpen: boolean;\r\n unorderedPartIds: number[];\r\n currency: string;\r\n hasRights: boolean;\r\n organizationId: number | null;\r\n dialogVisible: boolean;\r\n isOpen: boolean;\r\n organizations: Organization[];\r\n insurerList: IReferential[];\r\n additionTariff: TariffPercentResponse;\r\n executing: boolean;\r\n discountTariff: TariffPercentResponse;\r\n automatePlaceOrder: boolean;\r\n caseStatusHistory: CaseStatusHistory[];\r\n hasRemainingNonStockParts: boolean;\r\n}\r\nexport interface ExternalCaseDetailsCaseTabOrderFormProps {\r\n workflowForm: WorkflowSectionStepForm;\r\n}\r\n\r\ntype ICaseDetailsCaseTabOrderFormProps = ExternalCaseDetailsCaseTabOrderFormProps & {\r\n caseSettingsState: CaseSettingsState;\r\n appState: AppState;\r\n} & typeof CaseSettingsActionCreators &\r\n ProviderContext &\r\n RouteComponentProps<{ id: string; calcId: string | undefined; formId: string | undefined }>;\r\n\r\nclass CaseDetailsCaseTabOrderForm extends React.PureComponent<\r\n ICaseDetailsCaseTabOrderFormProps,\r\n ICaseDetailsCaseTabOrderFormState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private orderService!: IOrderService;\r\n private appUserService!: IAppUserService;\r\n private organizationService!: IOrganizationService;\r\n private caseService!: ICaseService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n state = {\r\n isLoading: true,\r\n orderList: [],\r\n unorderedParts: [],\r\n orderIds: [],\r\n isDialogOpen: false,\r\n isAddSupplierOrderStatusDialogOpen: false,\r\n workflowSuppliers: [] as Organization[],\r\n selectedWorkflowSupplier: null,\r\n isUpdateOrderPartDialogOpen: false,\r\n unorderedPartIds: [],\r\n currency: '',\r\n hasRights: false,\r\n organizationId: this.props.appState.appUser!.organizationId,\r\n dialogVisible: false,\r\n isOpen: false,\r\n organizations: [],\r\n insurerList: [],\r\n additionTariff: {\r\n id: 0,\r\n value: 0\r\n } as TariffPercentResponse,\r\n executing: false,\r\n discountTariff: {\r\n id: 0,\r\n value: 0\r\n } as TariffPercentResponse,\r\n automatePlaceOrder: false,\r\n caseStatusHistory: [],\r\n hasRemainingNonStockParts: false\r\n } as ICaseDetailsCaseTabOrderFormState;\r\n\r\n public async componentDidMount() {\r\n await this.loadData();\r\n }\r\n\r\n loadData = async () => {\r\n const workflowSuppliersList =\r\n this.props.caseSettingsState.caseSettings!.workflow.workflowSuppliers;\r\n const currrency = this.props.caseSettingsState.case!.caseParameters.find(\r\n (item) => item.parameter!.code === ParametreCode.CURRENCY\r\n )!.value;\r\n\r\n const refInsurer = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.Insurer\r\n );\r\n\r\n const hasValidatorRole = nontStockRoles.includes(this.props.appState.appUser?.userRole?.code ?? '');\r\n const request = {\r\n workflowId: this.props.caseSettingsState.caseSettings!.workflow.id,\r\n automateGenerateOrder: this.props.caseSettingsState.caseSettings!.workflow.automateGenerateOrder,\r\n partStock: this.props.caseSettingsState.caseSettings!.workflow.hasNonStockValidation ? hasValidatorRole : false,\r\n nonStockOrder: !hasValidatorRole ? this.props.caseSettingsState.caseSettings!.workflow.hasNonStockValidation : false\r\n } as CreatePartsToBeOrderedRequest;\r\n\r\n const [unorderedParts, suppliersInit, insurerList, caseStatusHistory] = await Promise.all([\r\n (this.props.caseSettingsState.case!.caseStatus.caseStatus!.code == CaseStatusCodeEnum.COM_PI || this.props.caseSettingsState.case!.caseStatus.caseStatus!.code === CaseStatusCodeEnum.COMANDA_PIESE_NON_STOC) ? this.orderService.CreatePartsToBeOrdered(this.props.caseSettingsState.case!.id, request) :\r\n this.props.caseSettingsState.case!.caseStatus.caseStatus!.code == CaseStatusCodeEnum.COMANDA_ATM ? this.orderService.GetPartsToBeOrdered(this.props.caseSettingsState.case!.id) : [],\r\n workflowSuppliersList.length > 0\r\n ? await this.organizationService.GetUserOrganizationsByIds(\r\n Array.from(new Set(workflowSuppliersList.map((item) => item.supplierId)))\r\n )\r\n : [],\r\n this.appReferentialService.Get(refInsurer!.baseUrl),\r\n this.props.caseSettingsState?.caseSettings!.workflow?.isCarfixIntegration \r\n ? this.caseService.GetCaseStatusHistory(this.props.caseSettingsState.case!.id) \r\n : []\r\n ]);\r\n const orderList = await this.orderService.GetOrdersWithParts(this.props.caseSettingsState.case!.id);\r\n const caseInfo = request.partStock ? await this.caseService.GetCaseInfoById(this.props.caseSettingsState.case!.id) : null;\r\n console.log('insurerList', insurerList);\r\n console.log('caseInfo', caseInfo);\r\n\r\n const [users, clients, orgList, additionTariff, discountTariff] = await Promise.all([\r\n this.appUserService.GetUsersInfo(\r\n Array.from(new Set(orderList.map((item) => item.createdBy)))\r\n ),\r\n this.organizationService.GetUserOrganizationsByIds(\r\n Array.from(new Set(orderList.map((item) => item.clientId)))\r\n ),\r\n this.organizationService.GetOrganizationsByHO(\r\n this.props.caseSettingsState.case!.organizationOwnerId,\r\n null\r\n ),\r\n this.caseService.GetTariffPercent({\r\n workflowId: this.props.caseSettingsState.caseSettings!.workflow.id,\r\n insurerId: this.getInsurerId(insurerList),\r\n tariffCode: TariffTypeGroupCodeEnum.ADD_PARTS\r\n } as TariffPercentRequest),\r\n this.caseService.GetTariffPercent({\r\n workflowId: this.props.caseSettingsState.caseSettings!.workflow.id,\r\n insurerId: this.getInsurerId(insurerList),\r\n tariffCode: TariffTypeGroupCodeEnum.PSE_ALT\r\n } as TariffPercentRequest) \r\n ]);\r\n\r\n const unorderedPartsSupplierIds = unorderedParts.map(({ supplierId }) => supplierId);\r\n const suppliers = suppliersInit.filter(\r\n (item) => unorderedPartsSupplierIds.includes(item.id) && item.isActive === true\r\n );\r\n\r\n unorderedParts.forEach((p) => {\r\n const supplier = suppliersInit.find((item) => item.id === p.supplierId);\r\n p.supplier = supplier === undefined ? null : supplier;\r\n });\r\n\r\n orderList.forEach((p) => {\r\n const supplier = suppliersInit.find((item) => item.id === p.supplierId);\r\n const user = users.find((item) => item.id === p.createdBy);\r\n const client = clients.find((item) => item.id === p.clientId);\r\n\r\n p.createdByUser = user === undefined ? null : user;\r\n p.supplier = supplier === undefined ? null : supplier;\r\n p.client = client === undefined ? null : client;\r\n });\r\n\r\n const hasRights = FormHelpers.HasRights(\r\n this.props.workflowForm.workflowFormPermissions,\r\n this.props.appState.appUser!,\r\n this.props.caseSettingsState.case!.caseStatus.caseStatusId\r\n );\r\n\r\n this.setState({\r\n orderList: orderList,\r\n unorderedParts: unorderedParts,\r\n workflowSuppliers: suppliers,\r\n currency: currrency,\r\n isLoading: false,\r\n hasRights: hasRights,\r\n organizations: orgList,\r\n additionTariff: additionTariff,\r\n discountTariff: discountTariff,\r\n caseStatusHistory: caseStatusHistory,\r\n hasRemainingNonStockParts: caseInfo != null ? caseInfo.hasRemainingNonStockParts : false\r\n });\r\n };\r\n\r\n onRowClick = async (e: any, id: number) => {\r\n this.setState({\r\n isDialogOpen: true,\r\n orderIds: Array.from([id]),\r\n automatePlaceOrder: this.props.caseSettingsState.caseSettings!.workflow.automatePlaceOrder\r\n });\r\n };\r\n\r\n onSupplierOrderNumberRowClick = async (e: any, supplierName: string) => {\r\n if (supplierName == SupplierCode.AUGSBURG) {\r\n window.open('https://www.aicat.ro/csp/berta/portal/index.csp', '_blank');\r\n }\r\n };\r\n\r\n updateRow = async (e: any, id: number) => {\r\n this.setState({\r\n isUpdateOrderPartDialogOpen: true,\r\n unorderedPartIds: Array.from([id])\r\n });\r\n };\r\n\r\n closeDialog = async () => {\r\n const unorderedPartsSupplierIds = this.state.unorderedParts.map(({ supplierId }) => supplierId);\r\n const suppliers = this.state.workflowSuppliers.filter(\r\n (item) => unorderedPartsSupplierIds.includes(item.id) && item.isActive === true\r\n );\r\n this.setState({\r\n isDialogOpen: false,\r\n workflowSuppliers: suppliers,\r\n isLoading: true\r\n });\r\n\r\n await this.loadData();\r\n };\r\n\r\n closeAddOrderSupplierDialog = async () => {\r\n this.setState({ isAddSupplierOrderStatusDialogOpen: false, selectedWorkflowSupplier: null });\r\n\r\n // await this.loadData();\r\n };\r\n\r\n closeUpdateOrderPartDialog = async () => {\r\n this.setState({ isUpdateOrderPartDialogOpen: false });\r\n\r\n await this.loadData();\r\n };\r\n\r\n getInsurerId = (insurerList: IReferential[]) : number | null => {\r\n if (R.isNil(this.props.caseSettingsState.case!.caseEvent)) {\r\n return null;\r\n }\r\n\r\n if (R.isNil(this.props.caseSettingsState.case!.caseEvent.insurerName)) {\r\n return null;\r\n }\r\n\r\n const insurerName = this.props.caseSettingsState.case!.caseEvent.insurerName;\r\n const insurer = _.find(insurerList, function (insurer) {\r\n return insurer.displayName.toLowerCase() === insurerName.toLowerCase();\r\n });\r\n console.log('insurer', insurer);\r\n if (R.isNil(insurer)) {\r\n return null;\r\n }\r\n return insurer.id;\r\n }\r\n\r\n deleteOrder = async (event: any, tableMeta: MUIDataTableMeta) => {\r\n try {\r\n const id = tableMeta.rowData[0];\r\n\r\n await this.orderService.DeleteOrder(id);\r\n\r\n const partIndex = this.state.orderList.findIndex((item) => item.id === id);\r\n const newArray = [...this.state.orderList];\r\n newArray.splice(partIndex, 1);\r\n\r\n this.setState(\r\n {\r\n orderList: newArray,\r\n isLoading: true\r\n },\r\n this.loadData\r\n );\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n DeletePartToBeOrdered = async (event: any, tableMeta: MUIDataTableMeta) => {\r\n try {\r\n const partId = tableMeta.rowData[0];\r\n console.log(partId);\r\n // await this.orderService.DeletePartToBeOrdered(partId);\r\n\r\n // const partIndex = this.state.unorderedParts.findIndex((item) => item.id === partId);\r\n // const newArray = [...this.state.unorderedParts];\r\n // newArray.splice(partIndex, 1);\r\n\r\n // this.setState(\r\n // {\r\n // unorderedParts: newArray,\r\n // isLoading: true\r\n // },\r\n // this.loadData\r\n // );\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n label: 'ID',\r\n options: {\r\n filter: false,\r\n customBodyRender: (value: string, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.onRowClick(e, tableMeta.rowData[0])}\r\n >\r\n {value}\r\n \r\n );\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'supplier.name',\r\n label: this.translatorService.Tranlate('ORDER_PART_DETAILS_SUPPLIER_LABEL', 'Furnizor'),\r\n options: {\r\n filter: false,\r\n customBodyRender: (value: IReferential, tableMeta: MUIDataTableMeta) => {\r\n const order = this.state.orderList.find((item) => item.id === tableMeta.rowData[0]);\r\n if (R.isNil(order)) {\r\n return '';\r\n }\r\n\r\n return !R.isNil(order.supplier) ? (order.supplier!.name.toUpperCase() == OwnStockCodeEnum.OWN_STOCK.toString() ? this.translatorService.Tranlate('CALCULATION_DETAILS_OWN_STOCK_HEADER', 'Stoc Propriu') : order.supplier!.name) : '';\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'amount',\r\n label: this.translatorService.Tranlate('ORDERS_VALUE_LABEL', 'Valoare'),\r\n options: {\r\n filter: false,\r\n setCellProps: () => ({ style: { whiteSpace: 'nowrap' } }),\r\n customBodyRender: (value: number, tableMeta: MUIDataTableMeta) => {\r\n if (this.props.appState.appUser!.organization!.organizationType!.hideOrderPrices) {\r\n return '';\r\n }\r\n return Utils.countryNumberFormat(value.toFixed(2), this.props.appState.appUser?.organization?.country ?? null);\r\n }\r\n }\r\n },\r\n {\r\n name: 'currencyCode',\r\n label: this.translatorService.Tranlate('ORDERS_CURRENCY_LABEL', 'Moneda'),\r\n options: {\r\n filter: false\r\n }\r\n },\r\n {\r\n name: 'createdByUser.userName',\r\n label: this.translatorService.Tranlate('ORDERS_MADE_BY_LABEL', 'Efectuat De'),\r\n options: {\r\n filter: false,\r\n sort: true\r\n }\r\n },\r\n {\r\n name: 'orderStatus.displayName',\r\n label: this.translatorService.Tranlate('ORDERS_STATUS_LABEL', 'Stare'),\r\n options: {\r\n filter: false,\r\n sort: false,\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n const id = tableMeta.rowData[0];\r\n const order = this.state.orderList.find((item) => item.id === id);\r\n if (order == null || order.orderStatus == null) {\r\n return '';\r\n }\r\n if (order.orderStatus.code === OrderStatusCode.FZR_VERIFICARE_LA_FURNIZOR) {\r\n return {value};\r\n } else if (order.orderStatus.code === OrderStatusCode.REP_VERIFICATA_DE_FURNIZOR) {\r\n return {value};\r\n } else {\r\n return value;\r\n }\r\n }\r\n \r\n }\r\n },\r\n {\r\n name: '',\r\n options: {\r\n viewColumns: false,\r\n filter: false,\r\n setCellHeaderProps: () => ({ align: 'center' }),\r\n setCellProps: () => ({ align: 'center' }),\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n const id = tableMeta.rowData[0];\r\n const order = this.state.orderList.find((item) => item.id === id);\r\n if (order!.orderStatus!.code !== OrderStatusCode.REP_DRAFT) {\r\n return;\r\n }\r\n if (order!.clientId !== this.props.appState.appUser!.organizationId) {\r\n return '';\r\n }\r\n return (\r\n this.deleteOrder(e, tableMeta)}\r\n aria-label=\"delete\"\r\n hidden={!this.state.hasRights}\r\n color=\"inherit\"\r\n className=\"text-danger\"\r\n size=\"small\"\r\n >\r\n \r\n \r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'supplierOrderNumber',\r\n label: this.translatorService.Tranlate('ORDERS_ID_FURNIZOR_LABEL', 'ID Furnizor'),\r\n options: {\r\n filter: false,\r\n customBodyRender: (value: string, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n {\r\n this.onSupplierOrderNumberRowClick(e, tableMeta.rowData[1]);\r\n }}\r\n >\r\n {value}\r\n \r\n );\r\n }\r\n } as MUIDataTableColumnOptions\r\n }\r\n ];\r\n\r\n return columns;\r\n };\r\n\r\n displayUnorderedPartPrice = (value: number, partId: any) => {\r\n const unorderedPart = this.state.unorderedParts.find((item) => item.id === partId);\r\n const price =\r\n unorderedPart!.alternativePartQualityId === null ? value : unorderedPart!.alternativePrice;\r\n return (Math.round(price! * 100) / 100).toFixed(2) + ' ' + this.state.currency;\r\n };\r\n\r\n getUnorderedPartsColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'guideNumber',\r\n label: this.translatorService.Tranlate('ORDER_PART_DETAILS_CODE_LABEL', 'Cod'),\r\n options: {\r\n filter: false,\r\n sort: false,\r\n customBodyRender: (value: number, tableMeta: MUIDataTableMeta) => {\r\n const part = this.state.unorderedParts.find((item) => item.id === tableMeta.rowData[0]);\r\n\r\n if (!isNullOrUndefined(part!.alternativePartQualityId)) {\r\n return part!.alternativeGuideNumber;\r\n }\r\n\r\n return part!.guideNumber;\r\n }\r\n }\r\n },\r\n {\r\n name: 'name',\r\n label: this.translatorService.Tranlate('ORDER_PART_DETAILS_NAME_LABEL', 'Denumire'),\r\n options: {\r\n filter: false,\r\n sort: false,\r\n customBodyRender: (value: number, tableMeta: MUIDataTableMeta) => {\r\n const part = this.state.unorderedParts.find((item) => item.id === tableMeta.rowData[0]);\r\n\r\n if (!isNullOrUndefined(part!.alternativePartQualityId)) {\r\n return part!.alternativePartName;\r\n }\r\n\r\n return part!.name;\r\n }\r\n }\r\n },\r\n {\r\n name: 'producer',\r\n label: this.translatorService.Tranlate('ORDER_PART_DETAILS_PRODUCER_LABEL', 'Producator'),\r\n options: {\r\n filter: false,\r\n sort: false\r\n }\r\n },\r\n {\r\n name: 'originalPrice',\r\n label: this.translatorService.Tranlate(\r\n 'ORDER_PART_DETAILS_ORIGINAL_PRICE_LABEL',\r\n 'Pret unitar'\r\n ),\r\n options: {\r\n filter: false,\r\n sort: false,\r\n customBodyRender: (value: number, tableMeta: MUIDataTableMeta) => {\r\n return Utils.countryNumberFormat(this.displayUnorderedPartPrice(value, tableMeta.rowData[0]), this.props.appState.appUser?.organization?.country ?? null);\r\n }\r\n }\r\n },\r\n {\r\n name: 'pieceNr',\r\n label: this.translatorService.Tranlate('ORDER_PART_DETAILS_PIECE_NR_LABEL', 'Unitati'),\r\n options: {\r\n filter: false,\r\n sort: false\r\n }\r\n },\r\n {\r\n name: 'supplier.name',\r\n label: this.translatorService.Tranlate('ORDER_PART_DETAILS_SUPPLIER_LABEL', 'Furnizor'),\r\n options: {\r\n filter: false,\r\n customBodyRender: (value: IReferential, tableMeta: MUIDataTableMeta) => {\r\n const unorderedPart = this.state.unorderedParts.find((item) => item.id === tableMeta.rowData[0]);\r\n if (R.isNil(unorderedPart)) {\r\n return '';\r\n }\r\n\r\n return !R.isNil(unorderedPart.supplier) ? (unorderedPart.supplier!.name.toUpperCase() == OwnStockCodeEnum.OWN_STOCK.toString() ? this.translatorService.Tranlate('CALCULATION_DETAILS_OWN_STOCK_HEADER', 'Stoc Propriu') : unorderedPart.supplier!.name) : '';\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'deliveryTime',\r\n label: this.translatorService.Tranlate('ORDER_PART_DETAILS_DELIVERY_TIME_LABEL', 'Livrare'),\r\n options: {\r\n filter: false,\r\n sort: false\r\n }\r\n },\r\n {\r\n name: '',\r\n options: {\r\n viewColumns: false,\r\n filter: false,\r\n setCellHeaderProps: () => ({ align: 'center' }),\r\n setCellProps: () => ({ align: 'center' }),\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n const part = this.state.unorderedParts.find((item) => item.id === tableMeta.rowData[0]);\r\n if (part!.excludeFromOrder) {\r\n return;\r\n }\r\n return (\r\n
\r\n this.updateRow(e, tableMeta.rowData[0])}\r\n hidden={!this.state.hasRights}\r\n aria-label=\"edit\"\r\n color=\"primary\"\r\n className=\"text-primary\"\r\n size=\"small\"\r\n >\r\n \r\n \r\n
\r\n );\r\n }\r\n }\r\n }\r\n // {\r\n // name: '',\r\n // options: {\r\n // viewColumns: false,\r\n // filter: false,\r\n // setCellHeaderProps: () => ({ align: 'center' }),\r\n // setCellProps: () => ({ align: 'center' }),\r\n // customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n // return (\r\n // this.DeletePartToBeOrdered(e, tableMeta)}\r\n // aria-label=\"delete\"\r\n // hidden={!this.state.hasRights}\r\n // color=\"inherit\"\r\n // className=\"text-danger\"\r\n // size=\"small\"\r\n // >\r\n // \r\n // \r\n // );\r\n // }\r\n // }\r\n // }\r\n ];\r\n\r\n return columns;\r\n };\r\n\r\n addOrder = async () => {\r\n this.setState({\r\n isAddSupplierOrderStatusDialogOpen: true\r\n });\r\n };\r\n\r\n addOrderSubmit = async () => {\r\n try {\r\n this.setState({ executing: true });\r\n const newOrder = await this.orderService.CreateOrder(\r\n this.props.caseSettingsState.case!.id,\r\n this.state.selectedWorkflowSupplier!.id\r\n );\r\n newOrder.supplier = this.state.selectedWorkflowSupplier;\r\n newOrder.createdByUser = this.props.appState.appUser;\r\n newOrder.client = this.props.appState.appUser!.organization;\r\n const supplierId = !isNullOrUndefined(this.state.selectedWorkflowSupplier)\r\n ? this.state.selectedWorkflowSupplier.id\r\n : null;\r\n const unorderedPartsBySupplier = this.state.unorderedParts.find(\r\n (item) => item.supplierId !== supplierId\r\n );\r\n\r\n this.setState({\r\n orderList: [...this.state.orderList, newOrder],\r\n unorderedParts: !isNullOrUndefined(unorderedPartsBySupplier)\r\n ? [unorderedPartsBySupplier]\r\n : [],\r\n orderIds: Array.from([newOrder.id]),\r\n isDialogOpen: true,\r\n isAddSupplierOrderStatusDialogOpen: false,\r\n selectedWorkflowSupplier: null\r\n });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n this.setState({ executing: false });\r\n } catch (ex) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n this.setState({ executing: false });\r\n }\r\n };\r\n\r\n handleAutocompleteSupplierChange = async (newValue: any | null) => {\r\n this.setState({\r\n selectedWorkflowSupplier: newValue\r\n });\r\n };\r\n\r\n renderAddOrderForm = () => {\r\n return (\r\n {\r\n this.addOrderSubmit();\r\n }}\r\n >\r\n
\r\n \r\n this.handleAutocompleteSupplierChange(newValue)\r\n }\r\n getOptionLabel={(option: Organization) => option.name.toUpperCase() == OwnStockCodeEnum.OWN_STOCK.toString() ? this.translatorService.Tranlate('CALCULATION_DETAILS_OWN_STOCK_HEADER', 'Stoc Propriu') : option.name || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n \r\n {this.translatorService.Tranlate('EDIT_ORGANIZATION_CANCEL_BTN', 'Anuleaza')}\r\n \r\n \r\n
\r\n \r\n );\r\n };\r\n\r\n orderChange = async (order: Order) => {\r\n this.setState({\r\n orderList: this.state.orderList.map((el: Order) =>\r\n el.id !== order.id\r\n ? el\r\n : {\r\n ...el,\r\n amount: order.amount,\r\n amountTVA: order.amountTVA,\r\n amountWithoutTVA: order.amountWithoutTVA,\r\n orderParts: [...order.orderParts!],\r\n orderStatus: order.orderStatus,\r\n orderStatusId: order.orderStatusId\r\n }\r\n )\r\n });\r\n };\r\n\r\n handleStockParts = () => {\r\n const ownerStockOrders = this.state.orderList.filter(x => x.supplier!.name.toUpperCase() == OwnStockCodeEnum.OWN_STOCK.toString());\r\n if (ownerStockOrders.length > 0) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'HAS_OWN_STOCK_ORDERS',\r\n 'Aveti comenzi pe stoc propriu. Va rugam sa le comandati!'\r\n ),\r\n { \r\n variant: 'warning',\r\n autoHideDuration: 5000,\r\n style: { whiteSpace: 'pre-line' }\r\n }\r\n );\r\n }\r\n }\r\n automatePlaceOrderChange = async () => {\r\n const automatePlaceOrder = this.props.caseSettingsState.caseSettings!.workflow.automatePlaceOrder && this.state.automatePlaceOrder;\r\n if (automatePlaceOrder) {\r\n console.log('automatePlaceOrder buton');\r\n console.log(this.state.caseStatusHistory);\r\n \r\n const orderPartStatuses = this.state.caseStatusHistory.filter(x => x.caseStatus!.code === CaseStatusCodeEnum.COM_PI);\r\n if (orderPartStatuses.length > 1) {\r\n // Find the last status that does not have one of the excluded codes\r\n const lastNonExcludedStatus = this.state.caseStatusHistory.find(status =>\r\n !excludedCodes.includes(status.caseStatus!.code ?? '')\r\n );\r\n console.log('Last non-excluded status:', lastNonExcludedStatus);\r\n \r\n const caseStatusRequest = {\r\n caseId: this.props.caseSettingsState.case!.id,\r\n statusId: lastNonExcludedStatus!.caseStatusId\r\n } as ChangeCaseStatusRequest;\r\n const currentStatus = await this.caseService.ChangeCaseStatus(caseStatusRequest);\r\n this.props.SetCaseStatus(currentStatus);\r\n this.handleStockParts();\r\n return;\r\n }\r\n \r\n if (this.props.caseSettingsState.case!.carInService) {\r\n const request = {\r\n caseId: this.props.caseSettingsState.case!.id,\r\n workflowId: this.props.caseSettingsState.caseSettings!.workflow.id,\r\n carInService: true\r\n } as AutomateAppointmentRequest;\r\n\r\n let newStatus = await this.caseService.CreateAutomateAppointment(request);\r\n if (newStatus === null) {\r\n newStatus = this.props.caseSettingsState.case!.caseStatus;\r\n }\r\n\r\n this.props.SetCaseStatus(newStatus);\r\n this.handleStockParts();\r\n return;\r\n }\r\n let newStatus = await this.caseService.SubmitForm(this.props.caseSettingsState.case!.id, this.props.workflowForm.id, null);\r\n if (newStatus === null) {\r\n newStatus = this.props.caseSettingsState.case!.caseStatus;\r\n }\r\n\r\n this.props.SetCaseStatus(newStatus);\r\n this.handleStockParts();\r\n }\r\n }\r\n\r\n checkConfirmChanges = async () => {\r\n if (this.props.caseSettingsState.caseSettings!.workflow.automatePlaceOrder) {\r\n const firstOrder = _.find(this.state.orderList, function (order) {\r\n return order.orderStatus!.code == OrderStatusCode.REP_DRAFT;\r\n });\r\n if (firstOrder != null) {\r\n this.setState({\r\n isDialogOpen: true,\r\n automatePlaceOrder: true,\r\n orderIds: Array.from([firstOrder.id])\r\n });\r\n return;\r\n }\r\n }\r\n\r\n const checkIfExistToBeVerifiedBySupplier = _.filter(this.state.orderList, function (order) {\r\n return order.orderStatus!.code == OrderStatusCode.FZR_VERIFICARE_LA_FURNIZOR;\r\n });\r\n\r\n if (checkIfExistToBeVerifiedBySupplier.length) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'ORDERS_IN_VERIFICATION_TO_SUPPLIER_REQUIRED',\r\n 'Aveti comenzi ce trebuie verificate de furnizor'\r\n ),\r\n { variant: 'error' }\r\n );\r\n return;\r\n }\r\n\r\n const checkIfExistOrderInDraftStatus = _.filter(this.state.orderList, function (order) {\r\n return (order.orderStatus!.code == OrderStatusCode.REP_DRAFT || order.orderStatus!.code == OrderStatusCode.REP_REINTEROGATED_PARTS || order.orderStatus!.code == OrderStatusCode.REP_VERIFICATA_DE_FURNIZOR);\r\n });\r\n if (checkIfExistOrderInDraftStatus.length) {\r\n this.setState({ isOpen: true, dialogVisible: true });\r\n } else {\r\n this.handleConfirmChanges();\r\n }\r\n };\r\n\r\n handleConfirmChanges = async () => {\r\n this.handleCloseModal();\r\n this.setState({ isLoading: true });\r\n await this.submitForm(this.props.caseSettingsState.case!.id, this.props.workflowForm.id, null);\r\n this.setState({ isLoading: false });\r\n };\r\n\r\n submitForm = async (caseId: number, caseSectionStepFormId: number, appUser: AppUser | null) => {\r\n const hasNotUnorderedParts = this.state.unorderedParts.filter(x => !x.isOwnStock).length === 0;\r\n if (hasNotUnorderedParts) {\r\n if (this.props.caseSettingsState.caseSettings!.workflow.automatePlaceOrder) {\r\n console.log(this.state.caseStatusHistory);\r\n const orderPartStatuses = this.state.caseStatusHistory.filter(x => x.caseStatus!.code === CaseStatusCodeEnum.COM_PI);\r\n if (orderPartStatuses.length > 1) {\r\n // Find the last status that does not have one of the excluded codes\r\n const lastNonExcludedStatus = this.state.caseStatusHistory.find(status =>\r\n !excludedCodes.includes(status.caseStatus!.code ?? '')\r\n );\r\n console.log('Last non-excluded status:', lastNonExcludedStatus);\r\n \r\n const caseStatusRequest = {\r\n caseId: this.props.caseSettingsState.case!.id,\r\n statusId: lastNonExcludedStatus!.caseStatusId\r\n } as ChangeCaseStatusRequest;\r\n const currentStatus = await this.caseService.ChangeCaseStatus(caseStatusRequest);\r\n\r\n this.props.SetCaseStatus(currentStatus);\r\n this.handleStockParts();\r\n return;\r\n }\r\n\r\n if (this.props.caseSettingsState.case!.carInService) {\r\n const request = {\r\n caseId: this.props.caseSettingsState.case!.id,\r\n workflowId: this.props.caseSettingsState.caseSettings!.workflow.id,\r\n carInService: true\r\n } as AutomateAppointmentRequest;\r\n\r\n let newStatus = await this.caseService.CreateAutomateAppointment(request);\r\n if (newStatus === null) {\r\n newStatus = this.props.caseSettingsState.case!.caseStatus;\r\n }\r\n \r\n this.props.SetCaseStatus(newStatus);\r\n this.handleStockParts();\r\n\r\n return;\r\n }\r\n }\r\n\r\n if (this.props.caseSettingsState.caseSettings!.workflow.hasNonStockValidation) {\r\n //daca statusul este comenzi piese si nu are piese pe NonStock\r\n if (this.props.caseSettingsState.case!.caseStatus.caseStatus!.code == CaseStatusCodeEnum.COM_PI && !this.state.hasRemainingNonStockParts) {\r\n const caseStatusRequest = {\r\n caseId: this.props.caseSettingsState.case!.id,\r\n statusCode: CaseStatusCodeEnum.pse_com.toString()\r\n } as ChangeCaseStatusBasedCodeRequest;\r\n const currentStatus = await this.caseService.ChangeCaseStatusBasedCode(caseStatusRequest);\r\n this.props.SetCaseStatus(currentStatus);\r\n return;\r\n }\r\n }\r\n\r\n let newStatus = await this.caseService.SubmitForm(caseId, caseSectionStepFormId, appUser);\r\n if (newStatus === null) {\r\n newStatus = this.props.caseSettingsState.case!.caseStatus;\r\n }\r\n\r\n this.props.SetCaseStatus(newStatus);\r\n\r\n const hasRights = FormHelpers.HasRights(\r\n this.props.workflowForm.workflowFormPermissions,\r\n this.props.appState.appUser!,\r\n newStatus.caseStatusId\r\n );\r\n\r\n this.handleStockParts();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n this.setState({ hasRights: hasRights });\r\n } else {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'ORDERS_UNORDERED_PARTS_INVALID',\r\n 'Aveti piese necomandate'\r\n ),\r\n { variant: 'error' }\r\n );\r\n }\r\n };\r\n handleCloseConfirmationDialog = () => {\r\n this.setState({\r\n isOpen: false,\r\n dialogVisible: false\r\n });\r\n };\r\n\r\n handleOpenConfirmationDialog = () => {\r\n this.setState({\r\n isOpen: true,\r\n dialogVisible: true\r\n });\r\n };\r\n\r\n handleCloseModal = () => {\r\n this.setState({\r\n isOpen: false,\r\n dialogVisible: false\r\n });\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.orderService = (this.context as AppContext).orderService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.appUserService = (this.context as AppContext).appUserService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n const options = {\r\n filter: false,\r\n sort: false,\r\n search: false,\r\n pagination: false,\r\n viewColumns: false,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n elevation: 0,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService)\r\n };\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n {`${this.translatorService.Tranlate(\r\n 'ORDER_CONFIRMATION_MESSAGE',\r\n 'Aveti piese necomandate, doriti sa treceti in pasul urmator?'\r\n )} `}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {!this.state.isLoading ? (\r\n
\r\n
\r\n
\r\n {this.translatorService.Tranlate('ORDERS_LIST_TITLE', 'Lista comenzi')}\r\n
\r\n {\r\n this.state.unorderedParts.length > 0 ? (\r\n \r\n ) : null\r\n }\r\n
\r\n
\r\n \r\n
\r\n
\r\n ) : null}\r\n {\r\n this.state.unorderedParts.length > 0 ? (\r\n
\r\n
\r\n
\r\n \r\n {this.translatorService.Tranlate(\r\n 'ORDERS_UNORDERED_PARTS_TITLE',\r\n 'Lista piese de comandat'\r\n )}\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n ) : null}\r\n
\r\n
\r\n ) : null\r\n }\r\n
\r\n \r\n {this.props.caseSettingsState?.caseSettings!.workflow?.isCarfixIntegration && this.props.caseSettingsState.caseSettings!.workflow.automatePlaceOrder ? \r\n this.translatorService.Tranlate('ORDER_PART_PLACE_ORDER_LABEL', 'Lanseaza Comanda') : this.translatorService.Tranlate('CASE_CAR_CALCULATIONS_CONFIRM_BUTTON', 'Confirma')}\r\n \r\n
\r\n \r\n \r\n \r\n {this.translatorService.Tranlate('ORDERS_DIALOG_TITLE', 'Detalii comanda')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n item.id === this.state.orderIds[0])!\r\n }\r\n onOrderChange={this.orderChange}\r\n automatePlaceOrderChange={this.automatePlaceOrderChange}\r\n hasRights={this.state.hasRights}\r\n additionTariff={this.state.additionTariff}\r\n discountTariff={this.state.discountTariff}\r\n automatePlaceOrder={this.state.automatePlaceOrder}\r\n workflowAutomatePlaceOrder={this.props.caseSettingsState.caseSettings!.workflow.automatePlaceOrder}\r\n />\r\n \r\n \r\n\r\n \r\n \r\n {this.translatorService.Tranlate('ORDER_ADD_LABEL', 'Adauga comanda')}\r\n \r\n \r\n \r\n \r\n \r\n {this.renderAddOrderForm()}\r\n \r\n \r\n\r\n \r\n \r\n \r\n {this.translatorService.Tranlate(\r\n 'ORDER_CHANGE_PART_DETAILS_TITLE',\r\n 'Modifica date piesa'\r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n item.id === this.state.unorderedPartIds[0]\r\n )!\r\n }\r\n currency={this.state.currency}\r\n workflowId={this.props.caseSettingsState.caseSettings!.workflow.id}\r\n workflowSuppliersList={\r\n this.props.caseSettingsState.caseSettings!.workflow.workflowSuppliers\r\n }\r\n onSave={this.closeUpdateOrderPartDialog}\r\n additionTariff={this.state.additionTariff}\r\n discountTariff={this.state.discountTariff}\r\n />\r\n \r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalCaseDetailsCaseTabOrderFormProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app\r\n }),\r\n null,\r\n mergeProps\r\n)(withSnackbar(CaseDetailsCaseTabOrderForm as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n ApplicationState,\r\n CaseSettingsState,\r\n AppState,\r\n CaseSettingsActionCreators\r\n} from '../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { Button, IconButton, Grid } from '@material-ui/core';\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { WorkflowPartner, WorkflowSectionStepForm } from '../../interfaces/Workflow';\r\nimport { CaseAttachment, CaseServiceAppointmentHistory } from '../../interfaces/Case';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport { IReferentialService } from '../../services/Interfaces/IReferentialService';\r\nimport { ReferentialCode, AttachmentTypeCode } from '../../helpers/Constants';\r\nimport { IWorkflowService } from '../../services/Interfaces/IWorkflowService';\r\nimport DeleteOutlineTwoToneIcon from '@material-ui/icons/DeleteOutlineTwoTone';\r\nimport FileSaver from 'file-saver';\r\nimport { AppUser } from '../../interfaces/AppUser';\r\nimport { IOrganizationService } from '../../services/Interfaces/IOrganizationService';\r\nimport { IAppUserService } from '../../services/Interfaces/IAppUserService';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport Autocomplete, { createFilterOptions } from '@material-ui/lab/Autocomplete';\r\nimport Referentials from '../../helpers/Referentials.json';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport { FormHelpers } from '../../helpers/forms/FormHelpers';\r\nimport { DatePicker, MuiPickersUtilsProvider } from '@material-ui/pickers';\r\nimport moment from 'moment';\r\nimport MomentUtils from '@date-io/moment';\r\nimport { MaterialUiPickersDate } from '@material-ui/pickers/typings/date';\r\nimport * as R from 'ramda';\r\n\r\nclass LocalizedUtils extends MomentUtils {\r\n // dateFormat = \"DD MM YYYY\";\r\n}\r\n\r\ninterface ICaseDetailsCaseServiceAppointpentsFormState {\r\n comment: string;\r\n serviceInDate: Date;\r\n serviceOutDate: Date;\r\n organizations: WorkflowPartner[];\r\n selectedOrganization: WorkflowPartner | null;\r\n users: AppUser[];\r\n selectedUser: AppUser | null;\r\n attachments: CaseAttachment[];\r\n isLoading: boolean;\r\n isLoading2: boolean;\r\n attachType: IReferential;\r\n isOrganizationsDisabled: boolean;\r\n isUsersDisabled: boolean;\r\n hasRights: boolean;\r\n isUserHidden: boolean;\r\n executing: boolean;\r\n userRoleId: number | null;\r\n}\r\n\r\nexport interface ExternalCaseDetailsCaseServiceAppointpentsFormProps {\r\n workflowForm: WorkflowSectionStepForm;\r\n}\r\n\r\ntype ICaseDetailsCaseServiceAppointpentsFormProps =\r\n ExternalCaseDetailsCaseServiceAppointpentsFormProps & {\r\n caseSettingsState: CaseSettingsState;\r\n appState: AppState;\r\n } & typeof CaseSettingsActionCreators &\r\n ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass CaseDetailsCaseServiceAppointpentsForm extends React.PureComponent<\r\n ICaseDetailsCaseServiceAppointpentsFormProps,\r\n ICaseDetailsCaseServiceAppointpentsFormState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private caseService!: ICaseService;\r\n private appReferentialService!: IReferentialService;\r\n private workflowService!: IWorkflowService;\r\n private appUserService!: IAppUserService;\r\n private organizationService!: IOrganizationService;\r\n\r\n static contextType = ApplicationContext;\r\n state = {\r\n serviceInDate: new Date(),\r\n serviceOutDate: new Date(),\r\n comment: '',\r\n organizations: [],\r\n selectedOrganization: null,\r\n users: [],\r\n selectedUser: null,\r\n attachments: [],\r\n isLoading: false,\r\n isLoading2: false,\r\n attachType: {} as IReferential,\r\n isOrganizationsDisabled: false,\r\n isUsersDisabled: false,\r\n hasRights: false,\r\n isUserHidden: false,\r\n executing: false,\r\n userRoleId: null\r\n } as ICaseDetailsCaseServiceAppointpentsFormState;\r\n\r\n public componentDidMount() {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (R.isNil(caseSettings) || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadCaseServiceAppointmentForm();\r\n }\r\n );\r\n }\r\n\r\n loadCaseServiceAppointmentForm = async () => {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (R.isNil(caseSettings) || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n\r\n const ref = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.AttachmentType\r\n );\r\n\r\n const casee = this.props.caseSettingsState.case;\r\n const [workflowPartners, attachmentTypes, currentCaseServiceAppointment] = await Promise.all([\r\n this.workflowService.GetUserWorkflowPartners(\r\n this.props.caseSettingsState.case!.caseWorkflow.workflowId\r\n ),\r\n this.appReferentialService.Get(ref!.baseUrl),\r\n this.caseService.GetCurrentCaseServiceAppointment(casee!.id, this.props.workflowForm.id)\r\n ]);\r\n const organizations = await this.organizationService.GetUserOrganizationsByIds(\r\n workflowPartners.map((item) => item.partnerId)\r\n );\r\n\r\n workflowPartners.forEach((wp) => {\r\n const partner = organizations.find((item) => item.id === wp.partnerId);\r\n wp.partner = R.isNil(partner) ? null : partner;\r\n });\r\n\r\n const hasRights = FormHelpers.HasRights(\r\n this.props.workflowForm.workflowFormPermissions,\r\n this.props.appState.appUser!,\r\n this.props.caseSettingsState.case!.caseStatus.caseStatusId\r\n );\r\n\r\n let currentCaseServiceAppointment1 = { ...currentCaseServiceAppointment };\r\n if (currentCaseServiceAppointment1 === null) {\r\n currentCaseServiceAppointment1 = await this.caseService.GetCurrentCaseServiceAppointment(\r\n casee!.id,\r\n null\r\n );\r\n }\r\n if (currentCaseServiceAppointment1 !== null && currentCaseServiceAppointment1.attachments) {\r\n currentCaseServiceAppointment1.attachments.forEach(\r\n (item) =>\r\n (item.attachmentType = attachmentTypes.find(\r\n (item) => item.code === AttachmentTypeCode.OTHER\r\n )!)\r\n );\r\n }\r\n this.setState(\r\n {\r\n organizations: workflowPartners,\r\n attachType: attachmentTypes.find((item) => item.code === AttachmentTypeCode.OTHER)!,\r\n isLoading: false,\r\n hasRights: hasRights,\r\n isUserHidden: !hasRights,\r\n comment:\r\n currentCaseServiceAppointment === null ? '' : currentCaseServiceAppointment.comment,\r\n serviceInDate:\r\n currentCaseServiceAppointment === null\r\n ? new Date()\r\n : currentCaseServiceAppointment.serviceInDate,\r\n serviceOutDate:\r\n currentCaseServiceAppointment === null\r\n ? new Date()\r\n : currentCaseServiceAppointment.serviceOutDate,\r\n attachments:\r\n currentCaseServiceAppointment === null ? [] : currentCaseServiceAppointment.attachments\r\n },\r\n this.setCaseAllocation\r\n );\r\n };\r\n\r\n setCaseAllocation = async () => {\r\n if (!this.state.hasRights) {\r\n return;\r\n }\r\n\r\n const allocationResult = await FormHelpers.ParseAllocations(\r\n this.props.workflowForm.workflowFormActions,\r\n this.state.organizations,\r\n this.appUserService\r\n );\r\n\r\n if (R.isNil(allocationResult)) {\r\n const partner = this.state.organizations.find(\r\n (item) => item.partnerId === this.props.caseSettingsState.case!.caseStatus.assignedTo!.hoId\r\n );\r\n\r\n this.setState(\r\n {\r\n selectedOrganization: R.isNil(partner) ? null : partner,\r\n selectedUser: this.props.caseSettingsState.case!.caseStatus.assignedTo,\r\n organizations: this.state.organizations,\r\n isUsersDisabled: false,\r\n isOrganizationsDisabled: false\r\n },\r\n async () => await this.loadUsers(R.isNil(partner) ? null : partner.partnerId, null)\r\n );\r\n return;\r\n }\r\n if (allocationResult.isLastUser || allocationResult.caseStatusId != null) {\r\n this.setState({ isUserHidden: true });\r\n return;\r\n }\r\n this.setState(\r\n {\r\n selectedOrganization: allocationResult.partner,\r\n selectedUser: allocationResult.user,\r\n organizations: allocationResult.partners,\r\n isUsersDisabled: !R.isNil(allocationResult.user),\r\n isOrganizationsDisabled: !R.isNil(allocationResult.partner),\r\n userRoleId: allocationResult.roleId\r\n },\r\n async () => {\r\n if (allocationResult.partner === null) {\r\n return;\r\n }\r\n await this.loadUsers(allocationResult.partner.partnerId, allocationResult.roleId);\r\n }\r\n );\r\n };\r\n\r\n loadUsers = async (organizationId: number | null, roleId: number | null) => {\r\n if (organizationId === null) {\r\n this.setState({\r\n isLoading2: false\r\n });\r\n } else {\r\n const users = await this.appUserService.GetUserAppUsers();\r\n\r\n this.setState({\r\n users: users.users.filter(\r\n (user) =>\r\n (user.organization!.hoId === organizationId ||\r\n user.organizationId === organizationId) &&\r\n ((roleId !== null && user.roleId === roleId) || roleId === null)\r\n ),\r\n isLoading2: false\r\n });\r\n }\r\n };\r\n\r\n handleUploadAttachment = async (e: React.ChangeEvent) => {\r\n try {\r\n const attachments = [...this.state.attachments];\r\n attachments.push({\r\n id: this.state.attachments.length,\r\n caseId: this.props.caseSettingsState.case!.id,\r\n attachmentTypeId: this.state.attachType.id,\r\n attachmentType: this.state.attachType,\r\n file: e.target.files![0],\r\n fileName: e.target.files![0].name,\r\n uploadDate: new Date(),\r\n carPhotos: false,\r\n originalFileName: e.target.files![0].name,\r\n caseRequestId: null,\r\n paymentId: null,\r\n serviceAppointmentId: null,\r\n caseClientId: null,\r\n isSelection: false\r\n });\r\n\r\n this.setState({\r\n attachments: attachments\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n handleDeleteAttachment = async (id: number, fileName: string) => {\r\n try {\r\n const attachments = [...this.state.attachments];\r\n const index = attachments.findIndex((item) => item.id === id);\r\n attachments.splice(index, 1);\r\n\r\n this.setState({\r\n attachments: attachments\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n downloadFile = async (fileName: string, origFileName: string) => {\r\n const fileBlob = await this.caseService.GetCaseAttachment(fileName);\r\n FileSaver.saveAs(fileBlob, origFileName);\r\n };\r\n\r\n renderAttachmentBox = () => {\r\n return (\r\n \r\n \r\n {this.state.attachments.length !== 0\r\n ? this.state.attachments.map((attach, index) => {\r\n return (\r\n
\r\n
\r\n this.downloadFile(attach.fileName, attach.originalFileName)}\r\n >\r\n {attach.originalFileName}\r\n \r\n
\r\n
\r\n this.handleDeleteAttachment(attach.id, attach.fileName)}\r\n >\r\n \r\n \r\n
\r\n
\r\n );\r\n })\r\n : null}\r\n
\r\n \r\n {\r\n return this.handleUploadAttachment(e);\r\n }}\r\n type=\"file\"\r\n disabled={!this.state.hasRights}\r\n />\r\n \r\n \r\n
\r\n );\r\n };\r\n\r\n createAppointment = async () => {\r\n try {\r\n this.setState({ executing: true });\r\n\r\n let serviceInDate;\r\n let serviceOutDate;\r\n if (moment.isDate(this.state.serviceInDate)) {\r\n serviceInDate = moment.utc(this.state.serviceInDate.toDateString()).local().toDate();\r\n } else {\r\n serviceInDate = moment.utc(this.state.serviceInDate).local().toDate();\r\n }\r\n if (moment.isDate(this.state.serviceOutDate)) {\r\n serviceOutDate = moment.utc(this.state.serviceOutDate.toDateString()).local().toDate();\r\n } else {\r\n serviceOutDate = moment.utc(this.state.serviceOutDate).local().toDate();\r\n }\r\n\r\n const appointmentFormData: CaseServiceAppointmentHistory = {\r\n id: 0,\r\n caseId: Number.parseInt(this.props.match.params.id),\r\n comment: this.state.comment,\r\n attachments: this.state.attachments,\r\n serviceInDate: serviceInDate,\r\n serviceOutDate: serviceOutDate,\r\n caseSectionStepFormId: this.props.workflowForm.id\r\n } as CaseServiceAppointmentHistory;\r\n\r\n await this.caseService.AddCaseServiceAppointment(appointmentFormData);\r\n\r\n // const selectedOrganization = this.state.selectedOrganization\r\n // const hoId =\r\n // selectedOrganization === null\r\n // ? null\r\n // : selectedOrganization.partner!.hoId === null\r\n // ? selectedOrganization.partnerId\r\n // : selectedOrganization.partner!.hoId\r\n\r\n await this.submitForm(\r\n appointmentFormData.caseId,\r\n appointmentFormData.caseSectionStepFormId,\r\n this.state.selectedUser\r\n );\r\n\r\n this.setState(\r\n {\r\n selectedOrganization: null,\r\n selectedUser: null,\r\n comment: '',\r\n attachments: [],\r\n serviceInDate: new Date(),\r\n serviceOutDate: new Date()\r\n },\r\n this.setCaseAllocation\r\n );\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (ex) {\r\n console.log(ex);\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n } finally {\r\n this.setState({ executing: false });\r\n }\r\n };\r\n\r\n submitForm = async (caseId: number, caseSectionStepFormId: number, appUser: AppUser | null) => {\r\n let newStatus = await this.caseService.SubmitForm(caseId, caseSectionStepFormId, appUser);\r\n\r\n if (newStatus === null) {\r\n newStatus = this.props.caseSettingsState.case!.caseStatus;\r\n }\r\n\r\n this.props.SetCaseStatus(newStatus);\r\n if (appUser !== null) {\r\n this.props.AddPartner(appUser!.hoId === null ? appUser!.organizationId : appUser!.hoId);\r\n }\r\n\r\n const hasRights = FormHelpers.HasRights(\r\n this.props.workflowForm.workflowFormPermissions,\r\n this.props.appState.appUser!,\r\n newStatus.caseStatusId\r\n );\r\n this.setState({ hasRights: hasRights });\r\n };\r\n\r\n handleOrganizationChange = (newValue: WorkflowPartner | null) => {\r\n this.setState(\r\n {\r\n selectedOrganization: newValue,\r\n selectedUser: null,\r\n users: [],\r\n isLoading2: true\r\n },\r\n async () => {\r\n await this.loadUsers(newValue === null ? null : newValue.partnerId, this.state.userRoleId);\r\n }\r\n );\r\n };\r\n\r\n handleUserChange = (newValue: AppUser | null) => {\r\n this.setState({ selectedUser: newValue });\r\n };\r\n handleDateInChange = async (date: MaterialUiPickersDate | null, value?: string | null) => {\r\n if (date === null || !date.isValid) {\r\n return;\r\n }\r\n this.setState({\r\n serviceInDate: date!.toDate(),\r\n // dashboardFilters: dashboardFilters,\r\n isLoading: false\r\n });\r\n };\r\n\r\n handleDateOutChange = async (date: MaterialUiPickersDate | null, value?: string | null) => {\r\n if (date === null || !date.isValid) {\r\n return;\r\n }\r\n this.setState({\r\n serviceOutDate: date!.toDate(),\r\n // dashboardFilters: dashboardFilters,\r\n isLoading: false\r\n });\r\n };\r\n\r\n rendePaymentDetailsForm = () => {\r\n return R.isNil(this.state.comment) ? null : (\r\n {\r\n this.createAppointment();\r\n }}\r\n >\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n ) => {\r\n this.setState({ comment: e.target.value });\r\n }}\r\n variant=\"outlined\"\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n />\r\n\r\n {this.renderAttachmentBox()}\r\n {this.renderAssignementForm()}\r\n
\r\n\r\n \r\n {this.translatorService.Tranlate('CASE_COMMENT_SEND', 'Trimite')}\r\n \r\n \r\n );\r\n };\r\n\r\n renderAssignementForm = () => {\r\n if (this.state.isUserHidden) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n \r\n this.handleOrganizationChange(newValue)\r\n }\r\n getOptionLabel={(option: WorkflowPartner) => option.partner!.displayName || ''}\r\n filterOptions={createFilterOptions({\r\n matchFrom: 'any',\r\n stringify: (option: WorkflowPartner) => option.partner!.displayName\r\n })}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n
\r\n \r\n
\r\n {!this.state.isLoading2 ? (\r\n this.handleUserChange(newValue)}\r\n getOptionLabel={(option: AppUser) => option.userName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n ) : null}\r\n
\r\n );\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n this.workflowService = (this.context as AppContext).workflowService;\r\n this.appUserService = (this.context as AppContext).appUserService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n
{this.rendePaymentDetailsForm()}
\r\n ) : null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalCaseDetailsCaseServiceAppointpentsFormProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app\r\n }),\r\n CaseSettingsActionCreators,\r\n mergeProps\r\n)(withSnackbar(CaseDetailsCaseServiceAppointpentsForm as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n ApplicationState,\r\n CaseSettingsState,\r\n AppState,\r\n CaseSettingsActionCreators\r\n} from '../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { Button, IconButton, Grid, FormControlLabel, Switch } from '@material-ui/core';\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { WorkflowSectionStepForm } from '../../interfaces/Workflow';\r\nimport { CaseAttachment } from '../../interfaces/Case';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport { IReferentialService } from '../../services/Interfaces/IReferentialService';\r\nimport {\r\n ReferentialCode,\r\n AttachmentTypeCode,\r\n InsuredTypeCode,\r\n RefConstants\r\n} from '../../helpers/Constants';\r\nimport DeleteOutlineTwoToneIcon from '@material-ui/icons/DeleteOutlineTwoTone';\r\nimport { AppUser } from '../../interfaces/AppUser';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport Referentials from '../../helpers/Referentials.json';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport { FormHelpers } from '../../helpers/forms/FormHelpers';\r\nimport NumberFormat from 'react-number-format';\r\nimport { CaseClient } from '../../interfaces/Case';\r\nimport { CNP } from 'romanian-personal-identity-code-validator';\r\nimport * as R from 'ramda';\r\nimport { isNullOrUndefined } from 'util';\r\nimport { SectionCode } from '../../helpers/forms/FormCode';\r\nimport * as IbanTools from 'ibantools';\r\n\r\ninterface ICaseDetailsCaseTabClientDataFormState {\r\n isLoading: boolean;\r\n hasRights: boolean;\r\n executing: boolean;\r\n isUserHidden: boolean;\r\n clientData: CaseClient;\r\n personTypes: Array;\r\n attachType: IReferential;\r\n bankName: string;\r\n bankList: IReferential[];\r\n\r\n region: IReferential | null;\r\n city: IReferential | null;\r\n district: IReferential | null;\r\n regionsTypes: IReferential[];\r\n citiesTypes: IReferential[];\r\n districtsTypes: IReferential[];\r\n}\r\n\r\nexport interface ExternalCaseDetailsCaseTabClientDataFormProps {\r\n workflowForm: WorkflowSectionStepForm;\r\n}\r\n\r\ntype ICaseDetailsCaseTabClientDataFormProps = ExternalCaseDetailsCaseTabClientDataFormProps & {\r\n caseSettingsState: CaseSettingsState;\r\n appState: AppState;\r\n} & typeof CaseSettingsActionCreators &\r\n ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass CaseDetailsCaseTabClientDataForm extends React.PureComponent<\r\n ICaseDetailsCaseTabClientDataFormProps,\r\n ICaseDetailsCaseTabClientDataFormState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private caseService!: ICaseService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n state = {\r\n isLoading: false,\r\n hasRights: false,\r\n executing: false,\r\n isUserHidden: false,\r\n attachType: {} as IReferential,\r\n personTypes: [] as IReferential[],\r\n regionsTypes: [] as IReferential[],\r\n citiesTypes: [] as IReferential[],\r\n districtsTypes: [] as IReferential[],\r\n region: {} as IReferential,\r\n district: {} as IReferential,\r\n city: {} as IReferential,\r\n bankName: '',\r\n bankList: [] as IReferential[],\r\n\r\n clientData: {\r\n id: 0,\r\n caseId: this.props.caseSettingsState.case!.id,\r\n caseSectionStepFormId: this.props.workflowForm.id,\r\n clientId: 0,\r\n pin: '',\r\n companyNumber: '',\r\n companyName: '',\r\n attachments: [] as CaseAttachment[],\r\n gdprAgreement: true,\r\n address: '',\r\n city: '',\r\n region: '',\r\n district: '',\r\n bankAccount: '',\r\n email: '',\r\n phone: ''\r\n } as CaseClient\r\n } as ICaseDetailsCaseTabClientDataFormState;\r\n\r\n inputTextValidator = React.createRef();\r\n\r\n public componentDidMount() {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (R.isNil(caseSettings) || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadCaseClientDataForm();\r\n }\r\n );\r\n\r\n ValidatorForm.addValidationRule('isValidCNP', (value) => {\r\n if (!value) {\r\n return true;\r\n }\r\n\r\n const cnp = new CNP(value);\r\n\r\n if (!cnp.isValid()) {\r\n return false;\r\n }\r\n return true;\r\n });\r\n\r\n ValidatorForm.addValidationRule('isIbanValid', (value) => {\r\n if (!value) {\r\n return true;\r\n }\r\n\r\n const ibanValidationResult = IbanTools.validateIBAN(value.replace(/\\s/g, ''));\r\n return ibanValidationResult.valid;\r\n });\r\n }\r\n\r\n loadCaseClientDataForm = async () => {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (R.isNil(caseSettings) || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n const casee = this.props.caseSettingsState.case;\r\n\r\n let caseClient = this.state.clientData;\r\n if (!R.isNil(casee!.caseClient)) {\r\n caseClient = casee!.caseClient;\r\n }\r\n\r\n const personTypeRef = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.PersonType\r\n );\r\n const refAttachemntType = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.AttachmentType\r\n );\r\n const refBanks = Referentials.referential.find((item) => item.code === ReferentialCode.Bank);\r\n\r\n const [personTypeList, attachmentTypes] = await Promise.all([\r\n this.appReferentialService.Get(personTypeRef!.baseUrl),\r\n this.appReferentialService.Get(refAttachemntType!.baseUrl)\r\n ]);\r\n\r\n caseClient.attachments.forEach(\r\n (item) =>\r\n (item.attachmentType = attachmentTypes.find(\r\n (item) => item.code === AttachmentTypeCode.OTHER\r\n )!)\r\n );\r\n\r\n const hasRights = FormHelpers.HasRights(\r\n this.props.workflowForm.workflowFormPermissions,\r\n this.props.appState.appUser!,\r\n this.props.caseSettingsState.case!.caseStatus.caseStatusId\r\n );\r\n\r\n const { regionRef, cityRef, districtRef } = RefConstants;\r\n const [regions, cities, districts, banks] = await Promise.all([\r\n this.appReferentialService.Get(regionRef!.baseUrl),\r\n this.appReferentialService.Get(cityRef!.baseUrl),\r\n this.appReferentialService.Get(districtRef!.baseUrl),\r\n this.appReferentialService.Get(refBanks!.baseUrl)\r\n ]);\r\n\r\n console.log('personTypeList', personTypeList);\r\n this.setState({\r\n ...this.state,\r\n isLoading: false,\r\n hasRights: hasRights,\r\n isUserHidden: !hasRights,\r\n personTypes: personTypeList,\r\n clientData: caseClient,\r\n attachType: attachmentTypes.find((item) => item.code === AttachmentTypeCode.OTHER)!,\r\n regionsTypes: regions,\r\n citiesTypes: cities,\r\n districtsTypes: districts,\r\n region:\r\n regions.find((item) => item.displayName === caseClient.region)! || ({} as IReferential),\r\n district:\r\n districts.find((item) => item.displayName === caseClient.district)! || ({} as IReferential),\r\n city: cities.find((item) => item.displayName === caseClient.city)! || ({} as IReferential),\r\n bankList: banks\r\n });\r\n };\r\n\r\n formatBankAccount = (bankAccountValue: string) => {\r\n return bankAccountValue.length > 5\r\n ? bankAccountValue\r\n //.replace(/[^\\dA-Z]/g, '')\r\n .replace(/(.{4})/g, '$1 ')\r\n .trim()\r\n : bankAccountValue;\r\n };\r\n\r\n updateBankOnblur() {\r\n const newBankName =\r\n this.state.bankList.find(\r\n (b) => b.code === this.state.clientData.bankAccount.replace(/\\s/g, '').substr(4, 4)\r\n )?.name || '';\r\n this.setState({\r\n bankName: newBankName\r\n });\r\n }\r\n\r\n submitForm = async (caseId: number, caseSectionStepFormId: number, appUser: AppUser | null) => {\r\n let newStatus = await this.caseService.SubmitForm(caseId, caseSectionStepFormId, appUser);\r\n\r\n if (newStatus === null) {\r\n newStatus = this.props.caseSettingsState.case!.caseStatus;\r\n }\r\n\r\n this.props.SetCaseStatus(newStatus);\r\n if (appUser !== null) {\r\n this.props.AddPartner(appUser!.hoId === null ? appUser!.organizationId : appUser!.hoId);\r\n }\r\n\r\n const hasRights = FormHelpers.HasRights(\r\n this.props.workflowForm.workflowFormPermissions,\r\n this.props.appState.appUser!,\r\n newStatus.caseStatusId\r\n );\r\n this.setState({ hasRights: hasRights });\r\n };\r\n\r\n NumberFormatCustom = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n allowNegative={false}\r\n thousandSeparator={false}\r\n decimalScale={2}\r\n />\r\n );\r\n };\r\n\r\n submitClientData = async (e: any) => {\r\n try {\r\n this.setState({ executing: true });\r\n\r\n let newCaseClient = {\r\n ...this.state.clientData,\r\n caseSectionStepFormId: this.props.workflowForm.id\r\n };\r\n\r\n if (this.state.clientData.id === 0) {\r\n newCaseClient = await this.caseService.AddCaseClient(this.state.clientData);\r\n } else {\r\n await this.caseService.UpdateCaseClient(newCaseClient);\r\n }\r\n\r\n await this.submitForm(\r\n this.props.caseSettingsState.case!.id,\r\n this.props.workflowForm.id,\r\n null\r\n );\r\n\r\n this.props.SetCaseClientData(newCaseClient);\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (ex) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n } finally {\r\n this.setState({ executing: false });\r\n }\r\n };\r\n\r\n handleCNPChange = (e: any) => {\r\n this.setState({\r\n clientData: {\r\n ...this.state.clientData,\r\n pin: e.target.value\r\n }\r\n });\r\n };\r\n\r\n handlePersonTypeChange = (newValue: IReferential | null) => {\r\n this.setState({\r\n clientData: {\r\n ...this.state.clientData,\r\n personType: newValue,\r\n personTypeId: newValue === null ? null : newValue.id\r\n }\r\n });\r\n };\r\n\r\n handleTextChange = (e: any) => {\r\n this.setState({\r\n clientData: {\r\n ...this.state.clientData,\r\n email: e.target.value\r\n }\r\n });\r\n };\r\n\r\n handleAddressChange = (e: any) => {\r\n this.setState({\r\n clientData: {\r\n ...this.state.clientData,\r\n address: e.target.value\r\n }\r\n });\r\n };\r\n\r\n handleBankAccountChange = (e: any) => {\r\n this.setState({\r\n clientData: {\r\n ...this.state.clientData,\r\n bankAccount: e.target.value\r\n }\r\n });\r\n };\r\n\r\n handleIsActiveAgreement = (e: any) => {\r\n this.setState({\r\n clientData: {\r\n ...this.state.clientData,\r\n gdprAgreement: e.currentTarget.checked\r\n }\r\n });\r\n };\r\n\r\n handleUploadAttachment = async (e: React.ChangeEvent) => {\r\n try {\r\n let attachments = [...this.state.clientData.attachments];\r\n if (R.isNil(e.target.files)) {\r\n return;\r\n }\r\n\r\n attachments = [];\r\n\r\n attachments.push({\r\n id: 0,\r\n caseId: this.props.caseSettingsState.case!.id,\r\n attachmentTypeId: this.state.attachType.id,\r\n attachmentType: this.state.attachType,\r\n file: e.target.files![0],\r\n fileName: e.target.files![0].name,\r\n uploadDate: new Date(),\r\n carPhotos: false,\r\n originalFileName: e.target.files![0].name,\r\n caseRequestId: null,\r\n paymentId: null,\r\n serviceAppointmentId: null,\r\n caseClientId: null,\r\n isSelection: false\r\n });\r\n\r\n this.setState({\r\n clientData: {\r\n ...this.state.clientData,\r\n attachments: attachments\r\n }\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n isCnpCuiEnabled = () => {\r\n const workflowSectionStepId = this.props.workflowForm.workflowSectionStepId;\r\n const resultPart1 = this.props.caseSettingsState.caseSettings!.workflow.workflowSections?.find(\r\n (x) => x.workflowSectionSteps.some((y) => y.id == workflowSectionStepId)\r\n );\r\n let shouldEnableCnpCUi = false;\r\n if (!isNullOrUndefined(resultPart1)) {\r\n shouldEnableCnpCUi = resultPart1?.section?.code === SectionCode.Oferte;\r\n }\r\n\r\n const result =\r\n shouldEnableCnpCUi || isNullOrUndefined(this.props.caseSettingsState.case?.caseClient);\r\n return result;\r\n };\r\n\r\n checkIsItsSaleWorkflow = () => {\r\n const workflowSectionStepId = this.props.workflowForm.workflowSectionStepId;\r\n const resultPart1 = this.props.caseSettingsState.caseSettings!.workflow.workflowSections?.find(\r\n (x) => x.workflowSectionSteps.some((y) => y.id == workflowSectionStepId)\r\n );\r\n\r\n let showResetClientData = false;\r\n if (!isNullOrUndefined(resultPart1)) {\r\n showResetClientData = resultPart1?.section?.code === SectionCode.Oferte;\r\n }\r\n return showResetClientData;\r\n };\r\n\r\n handleDeleteAttachment = async (id: number, fileName: string) => {\r\n try {\r\n const attachments = [...this.state.clientData.attachments];\r\n const index = attachments.findIndex((item) => item.id === id);\r\n attachments.splice(index, 1);\r\n\r\n this.setState({\r\n clientData: {\r\n ...this.state.clientData,\r\n attachments: attachments\r\n }\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n handleAdvertRegionTypeChange = (newValue: IReferential | null) => {\r\n this.setState({\r\n ...this.state,\r\n region: newValue,\r\n city: null,\r\n district: null,\r\n clientData: {\r\n ...this.state.clientData,\r\n region: newValue?.displayName,\r\n city: null,\r\n district: null\r\n }\r\n });\r\n };\r\n\r\n handleAdvertDistrictTypeChange = (newValue: IReferential | null) => {\r\n this.setState({\r\n ...this.state,\r\n district: newValue,\r\n clientData: {\r\n ...this.state.clientData,\r\n district: newValue?.displayName\r\n }\r\n });\r\n };\r\n\r\n handleCnpCuiOnBlur = async (newValue: any) => {\r\n if (\r\n isNullOrUndefined(this.state.clientData.personType) ||\r\n (this.state.clientData.pin.length == 0 && this.state.clientData.companyNumber.length == 0)\r\n ) {\r\n return;\r\n }\r\n this.setState({ isLoading: true });\r\n\r\n const pin_cui =\r\n this.state.clientData.personType!.code === InsuredTypeCode.PJ\r\n ? this.state.clientData.companyNumber\r\n : this.state.clientData.pin;\r\n\r\n const clients = await this.caseService.SearchClient(\r\n this.state.clientData.personType!.id,\r\n pin_cui,\r\n ''\r\n );\r\n\r\n if (clients.length > 0) {\r\n const client = clients[0];\r\n const region =\r\n this.state.regionsTypes.find((item) => item.displayName === client.region)! ||\r\n ({} as IReferential);\r\n const city =\r\n this.state.citiesTypes.find(\r\n (item) => item.displayName === client.city && item.dependencyId == region.id\r\n )! || ({} as IReferential);\r\n const district =\r\n this.state.districtsTypes.find(\r\n (item) => item.displayName === client.district && item.dependencyId === city.id\r\n )! || ({} as IReferential);\r\n const bankName = client.bankAccount\r\n ? this.state.bankList.find(\r\n (b) => b.code === client.bankAccount.replace(/\\s/g, '')?.substr(4, 4)\r\n )?.name || ''\r\n : '';\r\n this.setState({\r\n ...this.state,\r\n clientData: {\r\n ...this.state.clientData,\r\n clientId: client.id,\r\n companyName: client.companyName,\r\n companyNumber: client.companyNumber,\r\n contactPerson: client.contactPerson,\r\n phone: client.phone,\r\n firstName: client.firstName,\r\n lastName: client.lastName,\r\n email: client.email,\r\n address: client.address,\r\n city: client.city,\r\n region: client.region,\r\n district: client.district,\r\n bankAccount: client.bankAccount\r\n },\r\n bankName: bankName,\r\n region: region,\r\n city: city,\r\n district: district\r\n });\r\n this.handleAdvertRegionTypeChange(region);\r\n this.handleAdvertCityTypeChange(city);\r\n this.handleAdvertDistrictTypeChange(district);\r\n }\r\n\r\n this.setState({ isLoading: false });\r\n };\r\n\r\n handleAdvertCityTypeChange = (newValue: IReferential | null) => {\r\n this.setState({\r\n ...this.state,\r\n city: newValue,\r\n district: null,\r\n clientData: {\r\n ...this.state.clientData,\r\n city: newValue?.displayName,\r\n district: null\r\n }\r\n });\r\n };\r\n\r\n renderAttachmentBox = () => {\r\n return (\r\n \r\n \r\n {this.state.clientData.attachments.length !== 0\r\n ? this.state.clientData.attachments.map((attach, index) => {\r\n return (\r\n
\r\n
\r\n this.downloadFile(attach.fileName, attach.originalFileName)}\r\n >\r\n {attach.originalFileName}\r\n \r\n
\r\n
\r\n this.handleDeleteAttachment(attach.id, attach.fileName)}\r\n disabled={!this.state.hasRights}\r\n >\r\n \r\n \r\n
\r\n
\r\n );\r\n })\r\n : null}\r\n
\r\n \r\n {\r\n return this.handleUploadAttachment(e);\r\n }}\r\n type=\"file\"\r\n />\r\n \r\n \r\n
\r\n );\r\n };\r\n\r\n resetClientData = () => {\r\n this.setState({\r\n region: {} as IReferential,\r\n district: {} as IReferential,\r\n city: {} as IReferential,\r\n bankName: '',\r\n clientData: {\r\n id: this.state.clientData.id,\r\n caseId: this.props.caseSettingsState.case!.id,\r\n caseSectionStepFormId: this.props.workflowForm.id,\r\n clientId: 0,\r\n pin: '',\r\n companyNumber: '',\r\n companyName: '',\r\n attachments: [] as CaseAttachment[],\r\n gdprAgreement: true,\r\n address: '',\r\n city: '',\r\n region: '',\r\n district: '',\r\n bankAccount: ''\r\n } as CaseClient\r\n });\r\n };\r\n\r\n rendeClientDataForm = () => {\r\n return (\r\n {\r\n this.submitClientData(e);\r\n }}\r\n >\r\n {this.checkIsItsSaleWorkflow() ? (\r\n
\r\n {\r\n this.resetClientData();\r\n }}\r\n >\r\n {this.translatorService.Tranlate('RESET_CLIENT_DATA', 'Reseteaza date client')}\r\n \r\n
\r\n ) : (\r\n ''\r\n )}\r\n\r\n
\r\n \r\n this.handlePersonTypeChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n {!R.isNil(this.state.clientData.personType!) &&\r\n this.state.clientData.personType!.code === InsuredTypeCode.PJ ? (\r\n
\r\n {\r\n this.setState({\r\n clientData: {\r\n ...this.state.clientData,\r\n companyNumber: e.target.value\r\n }\r\n });\r\n }}\r\n onBlur={async (e: any) => {\r\n await this.handleCnpCuiOnBlur(e);\r\n }}\r\n label={this.translatorService.Tranlate('CLIENT_DATA_FORM_CUI', 'CUI')}\r\n />\r\n\r\n {\r\n this.setState({\r\n clientData: {\r\n ...this.state.clientData,\r\n companyName: e.target.value\r\n }\r\n });\r\n }}\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n label={this.translatorService.Tranlate(\r\n 'CLIENT_DATA_FORM_COMPANY_NAME',\r\n 'Nume companie'\r\n )}\r\n />\r\n\r\n {\r\n this.setState({\r\n clientData: {\r\n ...this.state.clientData,\r\n contactPerson: e.target.value\r\n }\r\n });\r\n }}\r\n placeholder={this.translatorService.Tranlate(\r\n 'CLIENT_DATA_FORM_CONTACT_PERSON',\r\n 'Persoana de contact'\r\n )}\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n label={this.translatorService.Tranlate(\r\n 'CLIENT_DATA_FORM_CONTACT_PERSON',\r\n 'Persoana de contact'\r\n )}\r\n />\r\n
\r\n ) : (\r\n
\r\n {\r\n this.handleCNPChange(e);\r\n }}\r\n onBlur={async (e: any) => {\r\n await this.handleCnpCuiOnBlur(e);\r\n }}\r\n validators={['isValidCNP']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('CLIENT_DATA_FORM_VALIDATOR_CNP', 'CNP invalid')\r\n ]}\r\n label={this.translatorService.Tranlate('CLIENT_DATA_FORM_CNP', 'CNP')}\r\n />\r\n\r\n {\r\n this.setState({\r\n clientData: {\r\n ...this.state.clientData,\r\n lastName: e.target.value\r\n }\r\n });\r\n }}\r\n fullWidth\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n label={this.translatorService.Tranlate('CLIENT_DATA_FORM_NAME', 'Nume')}\r\n />\r\n\r\n {\r\n this.setState({\r\n clientData: {\r\n ...this.state.clientData,\r\n firstName: e.target.value\r\n }\r\n });\r\n }}\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n label={this.translatorService.Tranlate('CLIENT_DATA_FORM_SURNAME', 'Prenume')}\r\n />\r\n
\r\n )}\r\n\r\n this.handleTextChange(e)}\r\n validators={['isEmail']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_EMAIL', 'E-mail invalid')\r\n ]}\r\n label={this.translatorService.Tranlate('CLIENT_DATA_FORM_EMAIL', 'E-mail')}\r\n />\r\n\r\n {\r\n this.setState({\r\n clientData: {\r\n ...this.state.clientData,\r\n phone: e.target.value\r\n }\r\n });\r\n }}\r\n name=\"phone\"\r\n className=\"m-2\"\r\n label={this.translatorService.Tranlate('CLIENT_DATA_FORM_PHONE', 'Telefon')}\r\n value={this.state.clientData.phone || ''}\r\n />\r\n\r\n this.updateBankOnblur()}\r\n onChange={(e) => this.handleBankAccountChange(e)}\r\n validators={['isIbanValid']}\r\n errorMessages={[\r\n this.translatorService.Tranlate(\r\n 'CASE_PAYMENT_DETAILS_FORM_IBAN_INVALID_WARNING',\r\n 'IBAN-ul este invalid'\r\n )\r\n ]}\r\n />\r\n\r\n \r\n \r\n
\r\n \r\n this.handleAdvertRegionTypeChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n \r\n
\r\n city.dependencyId === this.state.region?.id\r\n )}\r\n value={this.state.city || null}\r\n onChange={(e: any, newValue: IReferential | null) =>\r\n this.handleAdvertCityTypeChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n
\r\n district.dependencyId === this.state.city?.id\r\n )}\r\n value={this.state.district || null}\r\n onChange={(e: any, newValue: IReferential | null) =>\r\n this.handleAdvertDistrictTypeChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n district.dependencyId === this.state.city?.id\r\n ).length > 0\r\n ? ['required']\r\n : []\r\n }\r\n errorMessages={[\r\n this.translatorService.Tranlate(\r\n 'VALIDATORS_REQUIRED',\r\n 'Campul este obligatoriu'\r\n )\r\n ]}\r\n />\r\n )}\r\n />\r\n
\r\n
\r\n \r\n
\r\n {\r\n this.setState({\r\n ...this.state,\r\n clientData: {\r\n ...this.state.clientData,\r\n address: e.target.value\r\n }\r\n });\r\n }}\r\n label={this.translatorService.Tranlate('CLIENT_DATA_FORM_ADDRESS', 'Adresa')}\r\n />\r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n \r\n {this.translatorService.Tranlate('CLIENT_DATA_FORM_GDPR', 'Acord GDPR')}\r\n \r\n \r\n\r\n \r\n this.handleIsActiveAgreement(e)}\r\n color=\"primary\"\r\n />\r\n }\r\n label={this.translatorService.Tranlate('CLIENT_DATA_FORM_SIGNED', 'Semnat')}\r\n labelPlacement=\"end\"\r\n className=\"mt-3 ml-0 mr-0\"\r\n />\r\n \r\n\r\n \r\n {this.renderAttachmentBox()}\r\n \r\n \r\n
\r\n\r\n \r\n {this.translatorService.Tranlate('SAVE', 'Salveaza')}\r\n \r\n \r\n );\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n
{this.rendeClientDataForm()}
\r\n ) : null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalCaseDetailsCaseTabClientDataFormProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app\r\n }),\r\n CaseSettingsActionCreators,\r\n mergeProps\r\n)(withSnackbar(CaseDetailsCaseTabClientDataForm as any));\r\n","import { Icons } from 'material-table';\r\nimport React, { forwardRef } from 'react';\r\n\r\nimport ArrowDownward from '@material-ui/icons/ArrowDownward';\r\nimport Check from '@material-ui/icons/Check';\r\nimport ChevronLeft from '@material-ui/icons/ChevronLeft';\r\nimport ChevronRight from '@material-ui/icons/ChevronRight';\r\nimport Clear from '@material-ui/icons/Clear';\r\nimport DeleteOutline from '@material-ui/icons/DeleteOutline';\r\nimport Edit from '@material-ui/icons/Edit';\r\nimport FilterList from '@material-ui/icons/FilterList';\r\nimport FirstPage from '@material-ui/icons/FirstPage';\r\nimport LastPage from '@material-ui/icons/LastPage';\r\nimport Remove from '@material-ui/icons/Remove';\r\nimport SaveAlt from '@material-ui/icons/SaveAlt';\r\nimport Search from '@material-ui/icons/Search';\r\nimport ViewColumn from '@material-ui/icons/ViewColumn';\r\nimport AddCircleTwoToneIcon from '@material-ui/icons/AddCircleTwoTone';\r\n\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\n\r\nexport const MaterialTableIcons = {\r\n Add: forwardRef((props, ref) => ),\r\n Check: forwardRef((props, ref) => ),\r\n Clear: forwardRef((props, ref) => ),\r\n Delete: forwardRef((props, ref) => ),\r\n DetailPanel: forwardRef((props, ref) => ),\r\n Edit: forwardRef((props, ref) => ),\r\n Export: forwardRef((props, ref) => ),\r\n Filter: forwardRef((props, ref) => ),\r\n FirstPage: forwardRef((props, ref) => ),\r\n LastPage: forwardRef((props, ref) => ),\r\n NextPage: forwardRef((props, ref) => ),\r\n PreviousPage: forwardRef((props, ref) => ),\r\n ResetSearch: forwardRef((props, ref) => ),\r\n Search: forwardRef((props, ref) => ),\r\n SortArrow: forwardRef((props, ref) => ),\r\n ThirdStateCheck: forwardRef((props, ref) => ),\r\n ViewColumn: forwardRef((props, ref) => )\r\n} as Icons;\r\n\r\nexport const getLocalization = (translatorService: ITranslatorService) => {\r\n return {\r\n header: { actions: '' },\r\n toolbar: {\r\n searchPlaceholder: translatorService.Tranlate('SEARCH', 'Cauta'),\r\n searchTooltip: translatorService.Tranlate('SEARCH', 'Cauta'),\r\n nRowsSelected: `{0} ${translatorService.Tranlate('ROWS_SELECTED', 'randuri selectate')}`\r\n },\r\n body: {\r\n editTooltip: translatorService.Tranlate('EDIT', 'Editeaza'),\r\n deleteTooltip: translatorService.Tranlate('DELETE', 'Sterge'),\r\n addTooltip: translatorService.Tranlate('Add', 'Adauga'),\r\n emptyDataSourceMessage: translatorService.Tranlate(\r\n 'NO_RECORDS_TO_DISPLAY',\r\n 'Nu exista date de afisat'\r\n ),\r\n editRow: {\r\n cancelTooltip: translatorService.Tranlate('CANCEL', 'Anuleaza'),\r\n saveTooltip: translatorService.Tranlate('SAVE', 'Salveaza'),\r\n deleteText: translatorService.Tranlate(\r\n 'DELETE_TEXT',\r\n 'Sigur doriti sa stergeti aceasta inregistrare?'\r\n )\r\n }\r\n },\r\n pagination: {\r\n labelRowsSelect: translatorService.Tranlate('ROWS', 'inregistrari'),\r\n firstTooltip: translatorService.Tranlate('FIRST_PAGE', 'Prima pagina'),\r\n previousTooltip: translatorService.Tranlate('PREVIOUS_PAGE', 'Pagina precedenta'),\r\n nextTooltip: translatorService.Tranlate('NEXT_PAGE', 'Pagina urmatoare'),\r\n lastTooltip: translatorService.Tranlate('LAST_PAGE', 'Ultima pagina'),\r\n labelDisplayedRows: '{from}-{to} ' + translatorService.Tranlate('OF', 'din') + ' {count}'\r\n }\r\n };\r\n};\r\n\r\nexport const getAdvertLocalization = (translatorService: ITranslatorService) => {\r\n return {\r\n header: { actions: '' },\r\n toolbar: {\r\n searchPlaceholder: translatorService.Tranlate('SEARCH', 'Cauta'),\r\n searchTooltip: translatorService.Tranlate('SEARCH', 'Cauta'),\r\n nRowsSelected: `{0} ${translatorService.Tranlate('ADVERT_ROWS_SELECTED', 'dotari selectate')}`\r\n },\r\n body: {\r\n editTooltip: translatorService.Tranlate('EDIT', 'Editeaza'),\r\n deleteTooltip: translatorService.Tranlate('DELETE', 'Sterge'),\r\n addTooltip: translatorService.Tranlate('Add', 'Adauga'),\r\n emptyDataSourceMessage: translatorService.Tranlate(\r\n 'NO_RECORDS_TO_DISPLAY',\r\n 'Nu exista date de afisat'\r\n ),\r\n editRow: {\r\n cancelTooltip: translatorService.Tranlate('CANCEL', 'Anuleaza'),\r\n saveTooltip: translatorService.Tranlate('SAVE', 'Salveaza'),\r\n deleteText: translatorService.Tranlate(\r\n 'DELETE_TEXT',\r\n 'Sigur doriti sa stergeti aceasta inregistrare?'\r\n )\r\n }\r\n },\r\n pagination: {\r\n labelRowsSelect: translatorService.Tranlate('ROWS', 'inregistrari'),\r\n firstTooltip: translatorService.Tranlate('FIRST_PAGE', 'Prima pagina'),\r\n previousTooltip: translatorService.Tranlate('PREVIOUS_PAGE', 'Pagina precedenta'),\r\n nextTooltip: translatorService.Tranlate('NEXT_PAGE', 'Pagina urmatoare'),\r\n lastTooltip: translatorService.Tranlate('LAST_PAGE', 'Ultima pagina'),\r\n labelDisplayedRows: '{from}-{to} ' + translatorService.Tranlate('OF', 'din') + ' {count}'\r\n }\r\n };\r\n};\r\n","import React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport FileSaver from 'file-saver';\r\nimport {\r\n ApplicationState,\r\n CaseSettingsState,\r\n AppState,\r\n CaseSettingsActionCreators\r\n} from '../../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport AddCircleOutlineIcon from '@material-ui/icons/AddCircleOutline';\r\nimport { Button, IconButton, Grid, TextField, Typography } from '@material-ui/core';\r\nimport { AppContext, ApplicationContext } from '../../../context/Contexts';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { CurrencyCode, ReferentialCode } from '../../../helpers/Constants';\r\nimport DeleteOutlineTwoToneIcon from '@material-ui/icons/DeleteOutlineTwoTone';\r\nimport { TextValidator } from 'react-material-ui-form-validator';\r\nimport { IReferential } from '../../../interfaces/IReferential';\r\nimport { Utils } from '../../../helpers/Utils';\r\nimport * as R from 'ramda';\r\nimport { Cost, CostAttachment } from '../../../interfaces/Vehicle';\r\nimport Referentials from '../../../helpers/Referentials.json';\r\nimport { IVehicleService } from '../../../services/Interfaces/IVehicleService';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport { ICaseService } from '../../../services/Interfaces/ICaseService';\r\nimport NumberFormat from 'react-number-format';\r\n\r\ninterface ICaseDetailsCostDetailsFormState {\r\n showCostDetails: boolean;\r\n costTypes: IReferential[];\r\n currencyList: IReferential[];\r\n isLoading: boolean;\r\n}\r\n\r\nexport interface ExternalCaseDetailsCostDetailsFormProps {\r\n costValues: Cost[];\r\n updateCostValues: (values: Cost[]) => any;\r\n currencyTypeCode: string;\r\n caseSectionStepFormId?: number;\r\n readonly?: boolean;\r\n showTitle: boolean;\r\n vehicleId: number;\r\n}\r\n\r\ntype ICaseDetailsCostDetailsFormProps = ExternalCaseDetailsCostDetailsFormProps & {\r\n caseSettingsState: CaseSettingsState;\r\n appState: AppState;\r\n} & typeof CaseSettingsActionCreators &\r\n ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass CaseDetailsCostDetailsForm extends React.PureComponent<\r\n ICaseDetailsCostDetailsFormProps,\r\n ICaseDetailsCostDetailsFormState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private vehicleService!: IVehicleService;\r\n private appReferentialService!: IReferentialService;\r\n private caseService!: ICaseService;\r\n static contextType = ApplicationContext;\r\n state = {\r\n showCostDetails: false,\r\n costTypes: [] as IReferential[],\r\n currencyList: [] as IReferential[],\r\n isLoading: false\r\n } as ICaseDetailsCostDetailsFormState;\r\n\r\n input = React.createRef();\r\n inputTextValidator = React.createRef();\r\n\r\n public componentDidMount() {\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadCasePaymentDetailsForm();\r\n }\r\n );\r\n }\r\n\r\n loadCasePaymentDetailsForm = async () => {\r\n const refCurrencyType = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.Currency\r\n );\r\n const futureCurrencyList = await this.appReferentialService.Get(refCurrencyType!.baseUrl);\r\n const futureCostTypes = await this.vehicleService.GetVehicleCostTypes();\r\n\r\n this.setState({\r\n costTypes: futureCostTypes,\r\n showCostDetails: this.props.readonly || false,\r\n currencyList: futureCurrencyList\r\n });\r\n\r\n if (!this.props?.readonly) {\r\n const indexCurrency = futureCurrencyList.findIndex((item) => item?.code === CurrencyCode.EUR);\r\n const currencyType = futureCurrencyList[indexCurrency];\r\n const futureCostValues = futureCostTypes.map((cost) => {\r\n return {\r\n caseId: this.props.match?.params?.id || '',\r\n vehicleId: this.props.vehicleId,\r\n costTypeId: cost.id,\r\n costTypeCode: cost.code || '',\r\n files: [],\r\n value: null,\r\n currencyRate: this.props.currencyTypeCode\r\n ? Utils.GetCurrencyRate(this.props.appState.currencyRates, this.props.currencyTypeCode)\r\n : null,\r\n currency: currencyType?.displayName || '',\r\n secondValue: null,\r\n secondCurrency: this.getSecondCurrency(),\r\n caseSectionStepFormId: this.props.caseSectionStepFormId || null\r\n };\r\n });\r\n this.props.updateCostValues(futureCostValues);\r\n }\r\n };\r\n\r\n getSecondCurrency = () => {\r\n const indexRon = this.state?.currencyList?.findIndex((item) => item?.code === CurrencyCode.RON);\r\n const indexEur = this.state?.currencyList?.findIndex((item) => item?.code === CurrencyCode.EUR);\r\n if (this.props.currencyTypeCode === CurrencyCode.EUR) {\r\n return this.state.currencyList[indexRon]?.displayName;\r\n }\r\n\r\n return this.props.currencyTypeCode === CurrencyCode.RON\r\n ? this.state?.currencyList[indexEur]?.displayName\r\n : '';\r\n };\r\n\r\n setSecondValueBasedOnCaseCurrency(value: number): number | null {\r\n let resultValue = null;\r\n if (\r\n this.props.currencyTypeCode == CurrencyCode.EUR ||\r\n this.props.currencyTypeCode == CurrencyCode.RON\r\n ) {\r\n resultValue = 0;\r\n const previousCurrencyCode = this.props.currencyTypeCode;\r\n const futureCurrencyCode =\r\n this.props.currencyTypeCode == CurrencyCode.EUR ? CurrencyCode.RON : CurrencyCode.EUR;\r\n if (!R.isNil(value) && previousCurrencyCode) {\r\n const previousCurrencyRate = Utils.GetCurrencyRate(\r\n this.props.appState.currencyRates,\r\n previousCurrencyCode\r\n );\r\n\r\n const futureCurrencyRate = Utils.GetCurrencyRate(\r\n this.props.appState.currencyRates,\r\n futureCurrencyCode\r\n );\r\n resultValue = value * (previousCurrencyRate / futureCurrencyRate);\r\n return Number.parseFloat(resultValue.toFixed(2));\r\n }\r\n }\r\n\r\n return resultValue;\r\n }\r\n\r\n handleChange = (e: React.ChangeEvent, index: number) => {\r\n if (!this.props.updateCostValues) {\r\n return;\r\n }\r\n const val = e.target.value;\r\n const futureCostValues = [...this.props.costValues];\r\n futureCostValues[index].value = Number.isNaN(Number.parseFloat(val))\r\n ? null\r\n : Number.parseFloat(val);\r\n futureCostValues[index].secondValue = Number.isNaN(Number.parseFloat(val))\r\n ? null\r\n : this.setSecondValueBasedOnCaseCurrency(Number.parseFloat(val));\r\n this.props.updateCostValues(futureCostValues);\r\n };\r\n\r\n getLabel = (item: Cost) => {\r\n if (!item.value) {\r\n return '';\r\n }\r\n const valueWithoutVat = this.translatorService.Tranlate(\r\n 'CASE_PAYMENT_DETAILS_FORM_PAYMENT_AMOUNT_WITHOUT_VAT_LABEL',\r\n 'Suma fara TVA'\r\n );\r\n return `${valueWithoutVat} | ${item?.value?.toFixed(2)} ${item?.currency}${\r\n item?.secondCurrency && `( ${item?.secondValue} ${item?.secondCurrency})`\r\n }`;\r\n };\r\n\r\n handleUploadCostAttachment = async (e: React.ChangeEvent, index: number) => {\r\n try {\r\n const futureCostValues = [...this.props.costValues];\r\n futureCostValues[index].files.push({\r\n file: e.target.files![0],\r\n fileName: e.target.files![0].name,\r\n originalFileName: e.target.files![0].name\r\n } as any as CostAttachment);\r\n\r\n this.props.updateCostValues(futureCostValues);\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n downloadVehicleCostFile = async (fileName: string, origFileName: string) => {\r\n const fileBlob = await this.vehicleService.GetVehicleCostAttachment(fileName);\r\n FileSaver.saveAs(fileBlob, origFileName);\r\n };\r\n\r\n getValue = (item: Cost) => {\r\n if (!item.value) {\r\n return '';\r\n }\r\n return item.value;\r\n };\r\n\r\n handleDeleteCostAttachment = async (index: number, indexAttachment: number) => {\r\n try {\r\n const futureCostValues = [...this.props.costValues];\r\n futureCostValues[index].files.splice(indexAttachment, 1);\r\n\r\n this.props.updateCostValues(futureCostValues);\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n NumberFormatCustom = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n },\r\n currentTarget: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n allowNegative={false}\r\n thousandSeparator={false}\r\n decimalScale={2}\r\n />\r\n );\r\n };\r\n\r\n renderCostType = (cost: IReferential, index: number) => {\r\n const indexLang = cost.translations.findIndex(\r\n (lang) => lang.language === this.translatorService.GetLanguage()\r\n );\r\n return (\r\n \r\n \r\n {cost.translations[indexLang].name}\r\n \r\n \r\n \r\n ) => this.handleChange(e, index)}\r\n InputProps={{\r\n inputComponent: this.NumberFormatCustom,\r\n style: { fontWeight: 500 }\r\n }}\r\n />\r\n \r\n {this.props.costValues[index].files.length ? (\r\n \r\n {this.props.costValues[index].files.length !== 0\r\n ? this.props.costValues[index].files.map((attach, indexAttachment) => {\r\n return (\r\n
\r\n
\r\n \r\n this.downloadVehicleCostFile(attach.fileName, attach.originalFileName)\r\n }\r\n >\r\n \r\n {attach.originalFileName}\r\n \r\n \r\n
\r\n
\r\n this.handleDeleteCostAttachment(index, indexAttachment)}\r\n >\r\n \r\n \r\n
\r\n
\r\n );\r\n })\r\n : null}\r\n
\r\n ) : (\r\n \r\n \r\n {\r\n return this.handleUploadCostAttachment(e, index);\r\n }}\r\n type=\"file\"\r\n // disabled={!this.state.hasRights}\r\n />\r\n \r\n \r\n \r\n )}\r\n
\r\n
\r\n );\r\n };\r\n\r\n downloadFile = async (fileName: string, origFileName: string) => {\r\n const fileBlob = await this.caseService.GetCaseAttachment(fileName);\r\n FileSaver.saveAs(fileBlob, origFileName);\r\n };\r\n\r\n renderCostTypeFromCase = (cost: Cost, index: number) => {\r\n const indexLang = cost?.costType?.translations.findIndex(\r\n (lang) => lang.language === this.translatorService.GetLanguage()\r\n );\r\n if (indexLang === undefined || indexLang < 0) {\r\n return <>;\r\n }\r\n\r\n return (\r\n \r\n \r\n {cost?.costType?.translations[indexLang].name}\r\n \r\n \r\n \r\n ) => this.handleChange(e, index)}\r\n />\r\n \r\n \r\n {cost.attachments && cost.attachments.length !== 0\r\n ? cost.attachments.map((attach, index) => {\r\n return (\r\n
\r\n
\r\n \r\n this.downloadVehicleCostFile(attach.fileName, attach.originalFileName)\r\n }\r\n >\r\n \r\n {attach.originalFileName}\r\n \r\n \r\n
\r\n
\r\n );\r\n })\r\n : ''}\r\n
\r\n
\r\n
\r\n );\r\n };\r\n\r\n renderCostDetailsFromCase() {\r\n return (\r\n
\r\n {this.props?.costValues &&\r\n this.props?.costValues?.map((cost, index) => this.renderCostTypeFromCase(cost, index))}\r\n
\r\n );\r\n }\r\n\r\n renderCostDetails = () => {\r\n return (\r\n <>\r\n \r\n {this.props.showTitle ? (\r\n {this.translatorService.Tranlate('COSTS', 'Costuri')}\r\n ) : null}\r\n \r\n\r\n \r\n \r\n {this.translatorService.Tranlate('ADD_COSTS', 'Adauga cost aditional')}{' '}\r\n \r\n {\r\n this.setState({ showCostDetails: !this.state.showCostDetails });\r\n }}\r\n style={{ marginLeft: 10 }}\r\n color=\"primary\"\r\n />\r\n \r\n {this.state.showCostDetails &&\r\n this.props?.costValues?.length > 0 &&\r\n this.state.costTypes?.map((type, index) => this.renderCostType(type, index))}\r\n \r\n );\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.vehicleService = (this.context as AppContext).vehicleService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n\r\n return <>{this.props.readonly ? this.renderCostDetailsFromCase() : this.renderCostDetails()};\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalCaseDetailsCostDetailsFormProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app\r\n }),\r\n CaseSettingsActionCreators,\r\n mergeProps\r\n)(withSnackbar(CaseDetailsCostDetailsForm as any));\r\n","export default __webpack_public_path__ + \"static/media/hand-pen-01.b5aa1de4.svg\";","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n ApplicationState,\r\n CaseSettingsActionCreators,\r\n VehicleActionCreators\r\n} from '../../../store';\r\nimport { withSnackbar } from 'notistack';\r\nimport {\r\n Button,\r\n IconButton,\r\n Grid,\r\n Dialog,\r\n DialogTitle,\r\n Typography,\r\n DialogContent,\r\n Paper,\r\n Tooltip,\r\n InputAdornment,\r\n TextField,\r\n Modal,\r\n DialogActions,\r\n DialogContentText,\r\n FormControlLabel,\r\n Switch\r\n} from '@material-ui/core';\r\nimport { AppContext, ApplicationContext } from '../../../context/Contexts';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport {\r\n ValuationVehicle,\r\n ValuationExtraOption,\r\n ValuationModel,\r\n ValuationBody,\r\n PlateNumber,\r\n AcquisitionCaseRequest\r\n} from '../../../interfaces/Case';\r\nimport { ICaseService } from '../../../services/Interfaces/ICaseService';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport {\r\n AttachmentTypeCode,\r\n CarDetailsSettings,\r\n CaseTypeCode,\r\n CurrencyCode,\r\n FuelTypeEnum,\r\n RefConstants,\r\n VehicleStatusCodeEnum\r\n} from '../../../helpers/Constants';\r\nimport { AppUser } from '../../../interfaces/AppUser';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport { IReferential, IReferentialModel } from '../../../interfaces/IReferential';\r\nimport { FormHelpers } from '../../../helpers/forms/FormHelpers';\r\nimport NumberFormat from 'react-number-format';\r\nimport { DatePicker, MuiPickersUtilsProvider } from '@material-ui/pickers';\r\nimport moment from 'moment';\r\nimport MomentUtils from '@date-io/moment';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport CaseDetailsValuation from '../CaseDetailsValuation';\r\nimport { MaterialUiPickersDate } from '@material-ui/pickers/typings/date';\r\nimport MaterialTable, { Column } from 'material-table';\r\nimport { Cost, Vehicle, VehicleOption } from '../../../interfaces/Vehicle';\r\nimport { IVehicleService } from '../../../services/Interfaces/IVehicleService';\r\nimport { Utils } from '../../../helpers/Utils';\r\nimport * as R from 'ramda';\r\nimport { ICaseDetailsCaseTabCarDetailsExtendedContainerState } from './ICaseDetailsCaseTabCarDetailsExtendedContainerState';\r\nimport { ExternalCaseDetailsCaseTabCarDetailsExtendedContainerProps } from './ExternalCaseDetailsCaseTabCarDetailsExtendedContainerProps';\r\nimport { ICaseDetailsCaseTabCarDetailsExtendedContainerProps } from './ICaseDetailsCaseTabCarDetailsExtendedContainerProps';\r\nimport { getLocalization, MaterialTableIcons } from '../../_shared/TableSettings';\r\nimport CaseDetailsCostDetailsForm from './CaseDetailsCostDetailsForm';\r\nimport _ from 'lodash';\r\nimport Loader from '../../Loader';\r\n\r\nimport manualVinIdentification from '../../../assets/images/vin/hand-pen-01.svg';\r\nimport MUIDataTable, { MUIDataTableColumnOptions, SelectableRows } from 'mui-datatables';\r\nimport { MUITranslations } from '../../../helpers/MUITableTranslations';\r\n\r\ntype ParsedConditions = {\r\n mandatory: number[];\r\n atLeastOne: number[];\r\n};\r\n\r\ntype OptionIds = 'includedExtraOptionIds' | 'excludedExtraOptionIds' | 'requiredExtraOptionIds';\r\n\r\ntype StatusProperties = 'isIncluded' | 'isRequired' | 'isExcluded';\r\n\r\nclass LocalizedUtils extends MomentUtils {\r\n // dateFormat = \"DD MM YYYY\";\r\n}\r\n\r\nexport const standardOptionsSchemaIds = [\r\n 301, 2501, 3501, 3601, 23501, 23601, 23701, 23801, 23901, 24001, 31001, 32601, 34801, 38001,\r\n 38701, 38801, 42101, 42901, 44501, 48401, 49001, 50001, 55601, 57901, 58201, 58301, 58401, 58501,\r\n 58601, 59201, 59301, 59801, 63601, 63901\r\n];\r\n\r\nclass CaseDetailsCaseTabCarDetailsExtendedContainer extends React.PureComponent<\r\n ICaseDetailsCaseTabCarDetailsExtendedContainerProps,\r\n ICaseDetailsCaseTabCarDetailsExtendedContainerState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private caseService!: ICaseService;\r\n private vehicleService!: IVehicleService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n static displayName = 'CaseDetailsCaseTabCarDetailsExtendedForm';\r\n\r\n state = {\r\n isLoading: false,\r\n hasRights: false,\r\n executing: false,\r\n isUserHidden: false,\r\n isValuationOpen: false,\r\n selectedVehicle: null,\r\n valuationVehicles: [] as ValuationVehicle[],\r\n valuationBodies: [] as ValuationBody[],\r\n valuationModels: [] as ValuationModel[],\r\n showWizard: false,\r\n attachType: {} as IReferential,\r\n personTypes: [] as IReferential[],\r\n brandTypes: [] as IReferential[],\r\n modelTypes: [] as IReferentialModel[],\r\n bodyTypes: [] as IReferential[],\r\n versionTypes: [] as IReferential[],\r\n fuelTypes: [] as IReferential[],\r\n vehicleTypes: [] as IReferential[],\r\n refurbishedList: [] as IReferential[],\r\n mvoDvBattypList: [] as IReferential[],\r\n polutionNormTypes: [] as IReferential[],\r\n transmissionTypes: [] as IReferential[],\r\n tractionTypes: [] as IReferential[],\r\n paintTypes: [] as IReferential[],\r\n tiresTypes: [] as IReferential[],\r\n rimsTypes: [] as IReferential[],\r\n colorTypes: [] as IReferential[],\r\n carInteriorStateTypes: [] as IReferential[],\r\n carExteriorStateTypes: [] as IReferential[],\r\n carMechanicalStateTypes: [] as IReferential[],\r\n carStandardOptions: [] as VehicleOption[],\r\n carOptionalOptions: [] as VehicleOption[],\r\n workflowCalculation: null,\r\n datePickerFirstRegistrationError: '',\r\n optionCodes: [] as string[],\r\n costValues: [] as Cost[],\r\n ignoreExistingMappingSwitch: false,\r\n ignoreTimeStampSwitch: false,\r\n carDetailsExtendedData: {\r\n id: 0,\r\n caseId: this.props.caseSettingsState.case ? this.props.caseSettingsState.case!.id : 0,\r\n workflowId: this.props.caseSettingsState.caseSettings\r\n ? this.props.caseSettingsState.caseSettings!.workflow.id\r\n : 0,\r\n plateNumber: '',\r\n vin: '',\r\n makeId: null,\r\n model: null,\r\n modelId: null,\r\n version: '',\r\n makeDate: '',\r\n firstRegistrationDate: '',\r\n kilometersNr: null,\r\n power: null,\r\n horsePower: null,\r\n engineSize: null,\r\n co2: null,\r\n inConditionComments: null,\r\n outConditionComments: null,\r\n technicalConditionComments: null,\r\n fuelTypeId: null,\r\n vehicleTypeId: null,\r\n pollutionNormId: null,\r\n transmissionTypeId: null,\r\n tractionTypeId: null,\r\n color: null,\r\n colorId: null,\r\n equipmentVersion: '',\r\n wheelsTypeId: null,\r\n tiresTypeId: null,\r\n paintTypeId: null,\r\n bodyTypeId: null,\r\n inConditionId: null,\r\n outConditionId: null,\r\n technicalConditionId: null,\r\n make: null,\r\n fuelType: null,\r\n vehicleType: null,\r\n pollutionNorm: null,\r\n transmissionType: null,\r\n tractionType: null,\r\n wheelsType: null,\r\n tiresType: null,\r\n paintType: null,\r\n bodyType: null,\r\n inCondition: null,\r\n outCondition: null,\r\n technicalCondition: null,\r\n vehicleOptions: [] as VehicleOption[],\r\n location: '',\r\n nrOfDoors: null,\r\n radioCode: '',\r\n engineManufactureCode: '',\r\n purchasePrice: '',\r\n refurbished: null,\r\n refurbishedId: null,\r\n fabricationYear: null\r\n } as Vehicle,\r\n carDetailsFetchedData: {} as Partial,\r\n isOpen: false,\r\n dialogVisible: false,\r\n isloadingIncludeExcludeOptions: false,\r\n includedExtraOptionIds: [],\r\n excludedExtraOptionIds: [],\r\n requiredExtraOptionIds: [],\r\n showOptionalRequiredOptions: false,\r\n optionalRequiredOptionsIds: []\r\n } as ICaseDetailsCaseTabCarDetailsExtendedContainerState;\r\n\r\n public componentDidMount() {\r\n if (!R.isNil(this.props.workflowForm)) {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (R.isNil(caseSettings) || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n }\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadCaseCarDetailsExtendedForm();\r\n await this.loadData();\r\n }\r\n );\r\n\r\n ValidatorForm.addValidationRule('isValidNumberOfKm', (value) => {\r\n if (value >= CarDetailsSettings.numberOfKm) {\r\n return false;\r\n }\r\n return true;\r\n });\r\n }\r\n\r\n loadCaseCarDetailsExtendedForm = async () => {\r\n const id = Number.parseInt(this.props.match.params.id);\r\n if (Number.isNaN(id)) {\r\n return;\r\n }\r\n\r\n const { personTypeRef, attachementTypeRef } = RefConstants;\r\n\r\n const [personTypeList, attachmentTypes] = await Promise.all([\r\n this.appReferentialService.Get(personTypeRef!.baseUrl),\r\n this.appReferentialService.Get(attachementTypeRef!.baseUrl)\r\n ]);\r\n\r\n const vehicleInfo = this.props.vehicleState.vehicle\r\n ? await this.vehicleService.GetVehicle(this.props.vehicleState.vehicle!.id as any)\r\n : null;\r\n this.props.vehicleState.vehicle = vehicleInfo;\r\n\r\n let hasRights = true;\r\n let caseCarDetailsExtended = this.state.carDetailsExtendedData;\r\n\r\n if (!R.isNil(this.props.workflowForm)) {\r\n hasRights = FormHelpers.HasRights(\r\n this.props.workflowForm!.workflowFormPermissions,\r\n this.props.appState.appUser!,\r\n this.props.caseSettingsState.case!.caseStatus.caseStatusId\r\n );\r\n\r\n const vehicle = this.props.vehicleState.vehicle;\r\n\r\n if (!R.isNil(vehicle)) {\r\n caseCarDetailsExtended = {\r\n ...vehicle,\r\n kilometersNr: vehicle.kilometersNr || null,\r\n power: vehicle.power || null,\r\n horsePower: vehicle.horsePower || null,\r\n engineSize: vehicle.engineSize || null,\r\n co2: vehicle.co2 || null,\r\n nrOfDoors: vehicle.nrOfDoors || null\r\n } as Vehicle;\r\n }\r\n } else {\r\n const vehicle = await this.vehicleService.GetVehicle(id as any);\r\n caseCarDetailsExtended = {\r\n ...vehicle,\r\n kilometersNr: vehicle.kilometersNr || null,\r\n power: vehicle.power || null,\r\n horsePower: vehicle.horsePower || null,\r\n engineSize: vehicle.engineSize || null,\r\n co2: vehicle.co2 || null,\r\n nrOfDoors: vehicle.nrOfDoors || null\r\n } as Vehicle;\r\n\r\n // if there is no workflowForm hasRights is computed from current status\r\n hasRights = FormHelpers.VehicleDetailsHasRights(\r\n caseCarDetailsExtended.currentStatus?.status?.code\r\n );\r\n }\r\n\r\n let extraOptions = caseCarDetailsExtended.vehicleOptions.filter((o) => !o.isStandard) as any;\r\n extraOptions = _.filter(extraOptions, function (object) {\r\n return object.isSelected;\r\n }).concat(\r\n _.filter(extraOptions, function (object) {\r\n return !object.isSelected;\r\n })\r\n );\r\n extraOptions.forEach((item: any) => {\r\n if (item.isSelected) {\r\n item.tableData = { checked: true };\r\n item.checked = true;\r\n }\r\n });\r\n\r\n let standardOptions = caseCarDetailsExtended.vehicleOptions.filter((o) => o.isStandard) as any;\r\n standardOptions = _.filter(standardOptions, function (object) {\r\n return object.isSelected;\r\n }).concat(\r\n _.filter(standardOptions, function (object) {\r\n return !object.isSelected;\r\n })\r\n );\r\n standardOptions.forEach((item: any) => {\r\n if (item.isSelected) {\r\n item.tableData = { checked: true };\r\n item.checked = true;\r\n }\r\n });\r\n\r\n this.setState({\r\n isLoading: false,\r\n hasRights: hasRights,\r\n isUserHidden: !hasRights,\r\n personTypes: personTypeList,\r\n carDetailsExtendedData: {\r\n ...caseCarDetailsExtended,\r\n workflowId: this.props.caseSettingsState.caseSettings\r\n ? this.props.caseSettingsState.caseSettings!.workflow.id\r\n : 0\r\n },\r\n carDetailsFetchedData: {\r\n ...caseCarDetailsExtended,\r\n workflowId: this.props.caseSettingsState.caseSettings\r\n ? this.props.caseSettingsState.caseSettings!.workflow.id\r\n : 0\r\n },\r\n attachType: attachmentTypes.find((item) => item.code === AttachmentTypeCode.OTHER)!,\r\n carStandardOptions: standardOptions,\r\n carOptionalOptions: extraOptions\r\n });\r\n };\r\n\r\n submitForm = async (caseId: number, caseSectionStepFormId: number, appUser: AppUser | null) => {\r\n let newStatus = await this.caseService.SubmitForm(caseId, caseSectionStepFormId, appUser);\r\n\r\n if (R.isNil(newStatus)) {\r\n newStatus = this.props.caseSettingsState.case!.caseStatus;\r\n }\r\n\r\n this.props.SetCaseStatus(newStatus);\r\n if (!R.isNil(appUser)) {\r\n this.props.AddPartner(appUser!.hoId === null ? appUser!.organizationId : appUser!.hoId);\r\n }\r\n const hasRights = FormHelpers.HasRights(\r\n this.props.workflowForm!.workflowFormPermissions,\r\n this.props.appState.appUser!,\r\n newStatus.caseStatusId\r\n );\r\n this.setState({ hasRights: hasRights });\r\n };\r\n\r\n NumberFormatCustom = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n allowNegative={false}\r\n thousandSeparator={false}\r\n decimalScale={0}\r\n />\r\n );\r\n };\r\n\r\n updateOptionStatus(\r\n option: VehicleOption,\r\n stateProperty: OptionIds,\r\n statusProperty: StatusProperties\r\n ) {\r\n if (\r\n this.state[stateProperty] &&\r\n this.state[stateProperty]!.length !== 0 &&\r\n option.optionId &&\r\n this.state[stateProperty]!.includes(option.optionId)\r\n ) {\r\n option[statusProperty] = true;\r\n }\r\n }\r\n\r\n checkIfVinExistOnAcquisitionCase = async () => {\r\n //Dosar Achizitie\r\n if (!this.props.caseSettingsState.caseSettings?.workflow.isEvaluationWorkflow &&\r\n this.props.caseSettingsState?.case?.caseType?.code === CaseTypeCode.AQUISITION) {\r\n console.log('Dosar Achizitie'); \r\n const request = {\r\n vin: this.state.carDetailsExtendedData.vin\r\n } as AcquisitionCaseRequest;\r\n const vinAquisitionCases = (await this.caseService.GetAcquisitionCases(request)).filter(x => x.id !== this.props.caseSettingsState.case!.id);\r\n if (vinAquisitionCases.length > 0) {\r\n this.props.enqueueSnackbar(\r\n (this.translatorService.Tranlate(\r\n 'ALREADY_AQUISITION_CASE',\r\n 'Exista deja un dosar de achizitie deschis, va rugam sa verificati!'\r\n ) + '\\n' +\r\n (vinAquisitionCases.length == 1 ? this.translatorService.Tranlate('CASES_ID_LABEL', 'Id-ul dosarului este: ') : this.translatorService.Tranlate('CASES_IDS', 'Id-urile dosarelor sunt: ')) +\r\n vinAquisitionCases.map((item) => item.id).join(', ')),\r\n {\r\n variant: 'warning',\r\n style: { whiteSpace: 'pre-line' },\r\n autoHideDuration: 6000\r\n }\r\n );\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n submitVehicleData = async (e: any) => {\r\n this.setState({ executing: true });\r\n\r\n const vinExists = await this.checkIfVinExistOnAcquisitionCase();\r\n if (vinExists) {\r\n this.setState({ executing: false });\r\n return;\r\n }\r\n\r\n this.state.costValues.forEach(async (cost) => {\r\n if (cost.value) {\r\n await this.vehicleService.AddCost(cost);\r\n }\r\n });\r\n\r\n let newVehicle = { ...this.state.carDetailsExtendedData } as Vehicle;\r\n newVehicle.vehicleOptions = [];\r\n\r\n this.state.carStandardOptions.forEach((standardOption) => {\r\n standardOption.isSelected = standardOption.checked;\r\n });\r\n this.state.carOptionalOptions.forEach((optionalOption) => {\r\n optionalOption.isSelected = optionalOption.checked;\r\n // add included, excluded and required options\r\n this.updateOptionStatus(optionalOption, 'requiredExtraOptionIds', 'isRequired');\r\n this.updateOptionStatus(optionalOption, 'includedExtraOptionIds', 'isIncluded');\r\n this.updateOptionStatus(optionalOption, 'excludedExtraOptionIds', 'isExcluded');\r\n });\r\n\r\n newVehicle.vehicleOptions.push(...this.state.carStandardOptions);\r\n newVehicle.vehicleOptions.push(...this.state.carOptionalOptions);\r\n\r\n try {\r\n\r\n let status = VehicleStatusCodeEnum.Available;\r\n\r\n if (this.props.caseSettingsState?.case?.caseType?.code === CaseTypeCode.AQUISITION) {\r\n status = VehicleStatusCodeEnum.Aquisition;\r\n }\r\n\r\n if (\r\n this.props.caseSettingsState?.case?.caseType?.code === CaseTypeCode.SALE ||\r\n this.props.caseSettingsState?.case?.caseType?.code === CaseTypeCode.OMV\r\n ) {\r\n status = VehicleStatusCodeEnum.ForSale;\r\n }\r\n\r\n if (this.state.carDetailsExtendedData.id === 0) {\r\n newVehicle = await this.caseService.AddVehicle(\r\n {\r\n vehicle: newVehicle,\r\n initialStatus: status\r\n },\r\n this.props.caseSettingsState.case!.id\r\n );\r\n } else {\r\n await this.vehicleService.UpdateVehicle(newVehicle);\r\n if (status === VehicleStatusCodeEnum.ForSale) {\r\n await this.vehicleService.ChangeVehicleStatus({\r\n vehicleId: newVehicle.id,\r\n statusId: status,\r\n comment: ''\r\n });\r\n }\r\n }\r\n\r\n if (!R.isNil(this.props.workflowForm)) {\r\n await this.submitForm(\r\n this.props.caseSettingsState.case!.id,\r\n this.props.workflowForm!.id,\r\n null\r\n );\r\n }\r\n\r\n if (newVehicle.valuationVehicleId && newVehicle.vin) {\r\n await this.caseService.ValuationSaveMapping(newVehicle.vin, newVehicle.valuationVehicleId);\r\n }\r\n await this.loadVehicleCosts();\r\n this.props.SetCaseVehicleData(newVehicle.id);\r\n this.props.setVehicleObject(newVehicle);\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (ex) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n } finally {\r\n this.setState({\r\n executing: false,\r\n carDetailsExtendedData: {\r\n ...this.state.carDetailsExtendedData,\r\n id: newVehicle.id\r\n }\r\n });\r\n }\r\n };\r\n\r\n handleBrandTypeChange = async (e: any, newValue: IReferential | null) => {\r\n // if (R.isNil(this.state.selectedVehicle) && !R.isNil(newValue)) {\r\n // const valuationModels = await this.caseService.GetValuationModels(\r\n // newValue!.name!,\r\n // new Date(this.state.carDetailsExtendedData.firstRegistrationDate)\r\n // );\r\n // const modelTypes = R.innerJoin(\r\n // (stateModel, valuationModel) => stateModel.code === valuationModel.model,\r\n // this.state.modelTypes,\r\n // valuationModels\r\n // ) as IReferential[] as any as ValuationModel[];\r\n\r\n // this.setState({\r\n // ...this.state,\r\n // valuationModels: modelTypes\r\n // });\r\n // }\r\n\r\n this.setState({\r\n ...this.state,\r\n carDetailsExtendedData: {\r\n ...this.state.carDetailsExtendedData,\r\n make: newValue,\r\n makeId: Utils.GetIdOrNull(newValue),\r\n model: null,\r\n modelId: null,\r\n bodyType: null,\r\n bodyTypeId: null\r\n }\r\n });\r\n };\r\n\r\n loadVehicleCosts = async () => {\r\n const [vehicleCosts] = await Promise.all([\r\n this.vehicleService.GetVehicleCosts(this.state.carDetailsExtendedData.id) as any as Cost[]\r\n ]);\r\n const newCostValues = this.state.costValues.map((cost: Cost) => {\r\n return { ...cost, files: [], value: null, secondValue: null };\r\n });\r\n this.setState({\r\n carDetailsExtendedData: {\r\n ...this.state.carDetailsExtendedData,\r\n vehicleCosts: vehicleCosts\r\n },\r\n costValues: newCostValues\r\n });\r\n };\r\n\r\n handleModelTypeChange = async (e: any, newValue: IReferential | null) => {\r\n // if (\r\n // R.isNil(this.state.selectedVehicle) &&\r\n // !R.isNil(newValue) &&\r\n // !R.isNil(this.state.carDetailsExtendedData.make)\r\n // ) {\r\n // const valuationBodies = await this.caseService.GetValuationBodies(\r\n // this.state.carDetailsExtendedData.make!.name!,\r\n // newValue!.name!,\r\n // new Date(this.state.carDetailsExtendedData.firstRegistrationDate)\r\n // );\r\n // const bodyTypes = R.innerJoin(\r\n // (stateBody, valuationBody) => stateBody.name === valuationBody.body,\r\n // this.state.bodyTypes,\r\n // valuationBodies\r\n // ) as IReferential[] as any as ValuationBody[];\r\n\r\n // this.setState({\r\n // ...this.state,\r\n // valuationBodies: bodyTypes\r\n // });\r\n // }\r\n\r\n this.setState({\r\n ...this.state,\r\n carDetailsExtendedData: {\r\n ...this.state.carDetailsExtendedData,\r\n model: newValue,\r\n modelId: Utils.GetIdOrNull(newValue),\r\n bodyType: null,\r\n bodyTypeId: null\r\n }\r\n });\r\n };\r\n\r\n updateCostValue = (values: Cost[]) => {\r\n this.setState({ costValues: values });\r\n };\r\n\r\n onChange =\r\n (fieldName: string, fieldNameId?: string) => (e: any, newValue?: IReferential | null) => {\r\n if (fieldName === 'plateNumber') {\r\n const newValue = e.target.value.toUpperCase().replace(/[^a-zA-Z0-9]/g, ''); // Remove special characters from plate number input\r\n const updatedState = {\r\n ...this.state.carDetailsExtendedData,\r\n [fieldName]: newValue\r\n };\r\n\r\n if (fieldNameId) {\r\n updatedState[fieldNameId] = Utils.GetIdOrNull(newValue);\r\n }\r\n\r\n this.setState({\r\n carDetailsExtendedData: updatedState\r\n });\r\n } else {\r\n !R.isNil(fieldNameId)\r\n ? this.setState({\r\n carDetailsExtendedData: {\r\n ...this.state.carDetailsExtendedData,\r\n [fieldName]: newValue || e.target.value,\r\n [fieldNameId]: Utils.GetIdOrNull(newValue)\r\n }\r\n })\r\n : this.setState({\r\n carDetailsExtendedData: {\r\n ...this.state.carDetailsExtendedData,\r\n [fieldName]: newValue || e.target.value\r\n }\r\n });\r\n }\r\n };\r\n\r\n validateFirstRegistrationDate = (selectedDate?: string): string => {\r\n let error = '';\r\n\r\n if (!selectedDate) {\r\n error = this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu');\r\n } else {\r\n const currentDate = moment().format('YYYY-MM-DD');\r\n if (currentDate && selectedDate > currentDate) {\r\n error = this.translatorService.Tranlate(\r\n 'CAR_DETAILS_YEAR_OF_FIRST_REGISTRATION_ERROR',\r\n 'Data primei inmatriculari trebuie sa fie mai mica decat data curenta'\r\n );\r\n }\r\n }\r\n\r\n this.setState({\r\n datePickerFirstRegistrationError: error,\r\n carDetailsExtendedData: {\r\n ...this.state.carDetailsExtendedData,\r\n firstRegistrationDate: selectedDate || ''\r\n }\r\n });\r\n\r\n return error;\r\n };\r\n\r\n handleFirstRegistrationDateChange = (\r\n date: MaterialUiPickersDate | null,\r\n value?: string | null\r\n ) => {\r\n if (date === null || !date.isValid) {\r\n return;\r\n }\r\n\r\n const selectedDate = date ? date.format('YYYY-MM-DD') : undefined;\r\n this.validateFirstRegistrationDate(selectedDate);\r\n };\r\n\r\n handleYearOfFabricationDateChange = (\r\n date: MaterialUiPickersDate | null,\r\n value?: string | null\r\n ) => {\r\n if (date === null || !date.isValid) {\r\n return;\r\n }\r\n\r\n this.setState({\r\n carDetailsExtendedData: {\r\n ...this.state.carDetailsExtendedData,\r\n makeDate: date.format('YYYY-MM-DD')\r\n }\r\n });\r\n };\r\n\r\n setSelectedOptions = (extraoptions: ValuationExtraOption[], optionCodes: string[]) => {\r\n const indexArray: number[] = [];\r\n optionCodes.forEach((item) => {\r\n const index = extraoptions.findIndex((o) => o.optionCode === item);\r\n if (index !== undefined && index !== -1) {\r\n indexArray.push(index);\r\n\r\n (extraoptions[index] as any).tableData = { checked: true };\r\n extraoptions[index].checked = true;\r\n }\r\n });\r\n\r\n return indexArray;\r\n };\r\n\r\n private getModelsOptions(): IReferential[] | undefined {\r\n if (!R.isEmpty(this.state.valuationModels))\r\n return this.state.valuationModels as any as IReferential[];\r\n\r\n const filteredModelTypes = this.state.modelTypes.filter(\r\n (model) => model.makeId === this.state.carDetailsExtendedData.makeId\r\n );\r\n if (!R.isEmpty(filteredModelTypes)) return filteredModelTypes;\r\n\r\n return this.state.modelTypes;\r\n }\r\n\r\n private getBodiesOptions(): IReferential[] | undefined {\r\n if (!R.isEmpty(this.state.valuationBodies))\r\n return this.state.valuationBodies as any as IReferential[];\r\n\r\n return this.state.bodyTypes;\r\n }\r\n\r\n getValuationInfoConfirmation = async () => {\r\n const error = this.validateFirstRegistrationDate(\r\n this.state.carDetailsExtendedData.firstRegistrationDate\r\n );\r\n\r\n if (error) {\r\n return;\r\n }\r\n\r\n if (R.isEmpty(this.state.carDetailsExtendedData.vin)) return;\r\n\r\n if (\r\n !R.test(\r\n /^(?=.*[0-9])(?=.*[abcdefghjklmnprstuvwxyzABCDEFGHJKLMNPRSTUVWXYZ])[0-9abcdefghjklmnprstuvwxyzABCDEFGHJKLMNPRSTUVWXYZ-]{17}$/,\r\n this.state.carDetailsExtendedData.vin\r\n )\r\n ) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'INVALID_CAR_VIN_IDENTIFICATOR',\r\n \"Te rugăm să te asiguri că seria de șasiu introdusă are 17 caractere alfanumerice și nu conține spații sau literele 'O' sau 'I'!\"\r\n ),\r\n {\r\n variant: 'warning'\r\n }\r\n );\r\n return;\r\n }\r\n\r\n this.setState({ selectedVehicle: null, isOpen: true, dialogVisible: true }); //reset the vehicle brought from valuation\r\n };\r\n\r\n getValuationInfo = async () => {\r\n this.setState({ selectedVehicle: null, isOpen: false, dialogVisible: false });\r\n try {\r\n const body = {\r\n registration_date: new Date(this.state.carDetailsExtendedData.firstRegistrationDate!),\r\n ignore_date: false,\r\n override_existing_match: false\r\n };\r\n\r\n const result = await this.caseService.GetValuationVehiclesInfo(\r\n this.state.carDetailsExtendedData.vin,\r\n null,\r\n body\r\n );\r\n\r\n if (result.vehicles.length === 1) {\r\n result.vehicles[0].vinQuery = true;\r\n this.selectedVehicleHandler(result.vehicles[0], result.extraOptionCodes);\r\n } else {\r\n if (result.vehicles.length == 0) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'VIN_IDENTIFICATION_NOT_FOUND',\r\n 'Identificarea VIN nu este posibilă , vă rugăm să continuaţi cu selectia manuală a autovehiculului!'\r\n ),\r\n {\r\n variant: 'warning',\r\n autoHideDuration: 5000\r\n }\r\n );\r\n }\r\n\r\n for (let i = 0; i < result.vehicles.length; i++) {\r\n result.vehicles[i].vinQuery = true;\r\n }\r\n\r\n this.setState({\r\n ...this.state,\r\n valuationVehicles: result.vehicles,\r\n optionCodes: result.extraOptionCodes,\r\n isValuationOpen: true\r\n });\r\n }\r\n } catch (err) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'VEHICLE_NOT_IDENTIFIED',\r\n 'Masina nu se poate identifica dupa VIN si data primei inmatriculari. Va rugam incercati identificarea manuala'\r\n ),\r\n { variant: 'error' }\r\n );\r\n }\r\n };\r\n\r\n handleCloseConfirmationDialog = () => {\r\n this.setState({\r\n isOpen: false,\r\n dialogVisible: false\r\n });\r\n };\r\n\r\n handleOpenConfirmationDialog = () => {\r\n this.setState({\r\n isOpen: true,\r\n dialogVisible: true\r\n });\r\n };\r\n\r\n handleCloseModal = () => {\r\n this.setState({\r\n isOpen: false,\r\n dialogVisible: false\r\n });\r\n };\r\n\r\n getManualValuationInfo = async () => {\r\n const error = this.validateFirstRegistrationDate(\r\n this.state.carDetailsExtendedData.firstRegistrationDate\r\n );\r\n\r\n if (error) {\r\n return;\r\n }\r\n\r\n if (R.isEmpty(this.state.carDetailsExtendedData.vin)) return;\r\n\r\n if (\r\n !R.test(\r\n /^(?=.*[0-9])(?=.*[abcdefghjklmnprstuvwxyzABCDEFGHJKLMNPRSTUVWXYZ])[0-9abcdefghjklmnprstuvwxyzABCDEFGHJKLMNPRSTUVWXYZ-]{17}$/,\r\n this.state.carDetailsExtendedData.vin\r\n )\r\n ) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'INVALID_CAR_VIN_IDENTIFICATOR',\r\n \"Te rugăm să te asiguri că seria de șasiu introdusă are 17 caractere alfanumerice și nu conține spații sau literele 'O' sau 'I'!\"\r\n ),\r\n {\r\n variant: 'warning'\r\n }\r\n );\r\n return;\r\n }\r\n this.setState({ selectedVehicle: null }); //reset the vehicle brought from valuation\r\n\r\n try {\r\n this.setState({\r\n ...this.state,\r\n valuationVehicles: [],\r\n optionCodes: [],\r\n isValuationOpen: true\r\n });\r\n } catch (err) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'VEHICLE_NOT_IDENTIFIED',\r\n 'Masina nu se poate identifica dupa VIN si data primei inmatriculari. Va rugam incercati identificarea manuala'\r\n ),\r\n { variant: 'error' }\r\n );\r\n }\r\n };\r\n\r\n private resetVehicleState() {\r\n this.setState({\r\n ...this.state,\r\n isValuationOpen: false,\r\n selectedVehicle: null,\r\n carStandardOptions: [],\r\n carOptionalOptions: [],\r\n carDetailsExtendedData: {\r\n ...this.state.carDetailsExtendedData,\r\n fuelType: null,\r\n fuelTypeId: null,\r\n vehicleType: null,\r\n vehicleTypeId: null,\r\n mvoDvBattypId: null,\r\n mvoDvBattyp: null,\r\n model: null,\r\n modelId: null,\r\n transmissionType: null,\r\n transmissionTypeId: null,\r\n bodyType: null,\r\n bodyTypeId: null,\r\n make: null,\r\n makeId: null,\r\n version: '',\r\n equipmentVersion: '',\r\n kilometersNr: null,\r\n power: null,\r\n horsePower: null,\r\n engineSize: null,\r\n co2: null,\r\n inConditionComments: null,\r\n outConditionComments: null,\r\n technicalConditionComments: null,\r\n makeDate: '',\r\n engineManufactureCode: '',\r\n nrOfDoors: null,\r\n tractionType: null,\r\n tractionTypeId: null,\r\n color: null,\r\n colorId: null,\r\n paintType: null,\r\n paintTypeId: null,\r\n pollutionNorm: null,\r\n pollutionNormId: null,\r\n fabricationYear: null\r\n }\r\n });\r\n }\r\n\r\n selectedVehicleHandler = async (selectedVehicle: any, optionsCodes: string[]) => {\r\n if (R.isNil(selectedVehicle)) return;\r\n\r\n const model = this.state.modelTypes.find((m) => m.code === selectedVehicle.model);\r\n const bodyType = this.state.bodyTypes.find((b) => b.code === selectedVehicle.body);\r\n const options = await this.caseService.GetValuationVehicleOptions(selectedVehicle.vehicleId);\r\n\r\n const fuelType = this.state.fuelTypes.find(\r\n (fuelType) => fuelType.name === selectedVehicle.fuelType\r\n );\r\n\r\n const vehicleType = this.state.vehicleTypes.find(\r\n (vehicleType) => vehicleType.name === selectedVehicle.vehicleType\r\n );\r\n\r\n const mvoDvBattyp = this.state.mvoDvBattypList.find(\r\n (mvoDvBattyp) => mvoDvBattyp.name === selectedVehicle.mvoDvBattyp\r\n );\r\n\r\n const refurbished = this.state.refurbishedList.find(\r\n (refurbishedItem) => refurbishedItem.name === selectedVehicle.refurbished\r\n );\r\n\r\n const transmissionType = this.state.transmissionTypes.find(\r\n (transmissionType) => transmissionType.code === selectedVehicle.transmission[0]\r\n );\r\n\r\n const make = this.state.brandTypes.find((make) => make.name! === selectedVehicle.manufacturer);\r\n\r\n const traction = this.state.tractionTypes.find(\r\n (tractionType) => tractionType.code === selectedVehicle.drivenWheels[0]\r\n );\r\n\r\n const pollutionNorm = this.state.polutionNormTypes.find(\r\n (x) => x.code === selectedVehicle.pollution\r\n );\r\n\r\n this.setSelectedOptions(options.extraOptions, optionsCodes);\r\n\r\n const valLanguageId = Utils.GetValuationLanguageId(this.props.appState.language);\r\n\r\n const carDetailsExtendedData = {\r\n ...this.state.carDetailsExtendedData,\r\n tractionType: traction || null,\r\n tractionTypeId: Utils.GetIdOrNull(traction),\r\n fuelType: fuelType || null,\r\n fuelTypeId: Utils.GetIdOrNull(fuelType),\r\n vehicleType: vehicleType || null,\r\n vehicleTypeId: Utils.GetIdOrNull(vehicleType),\r\n refurbishedId: Utils.GetIdOrNull(refurbished),\r\n refurbished: refurbished || null,\r\n mvoDvBattypId: Utils.GetIdOrNull(mvoDvBattyp),\r\n mvoDvBattyp: mvoDvBattyp || null,\r\n model: model || null,\r\n modelId: Utils.GetIdOrNull(model),\r\n transmissionType: transmissionType || null,\r\n transmissionTypeId: Utils.GetIdOrNull(transmissionType),\r\n make: make || null,\r\n makeId: Utils.GetIdOrNull(make),\r\n version: selectedVehicle.version || null,\r\n equipmentVersion: selectedVehicle.trimLevel !== undefined ? selectedVehicle.trimLevel : null,\r\n horsePower: selectedVehicle.powerHP || null,\r\n power: selectedVehicle.kw || null,\r\n engineSize: selectedVehicle.cc ?? 0,\r\n co2: selectedVehicle.co2 || 0,\r\n makeDate: selectedVehicle.fabricationDate,\r\n engineManufactureCode: selectedVehicle.engineManufactureCode ?? '',\r\n nrOfDoors: selectedVehicle.noOfDoors,\r\n bodyType: bodyType || null,\r\n bodyTypeId: Utils.GetIdOrNull(bodyType),\r\n pollutionNorm: pollutionNorm || null,\r\n pollutionNormId: Utils.GetIdOrNull(pollutionNorm),\r\n valuationVehicleId: selectedVehicle.vehicleId || null,\r\n vinQuery: selectedVehicle.vinQuery || false,\r\n propulsionSystem: selectedVehicle.propulsionSystem || null,\r\n fabricationYear: selectedVehicle.modelYear || null\r\n };\r\n // Since we need to make the fields that come from Vehicle Info API readonly after they are set\r\n // use a second state in order to allow the user edit the missing fields\r\n this.setState({\r\n carDetailsExtendedData,\r\n carDetailsFetchedData: {\r\n ...carDetailsExtendedData\r\n },\r\n isValuationOpen: false,\r\n selectedVehicle: selectedVehicle,\r\n carStandardOptions: options.standardOptions\r\n .filter(\r\n (item) =>\r\n item.languageId === valLanguageId && !standardOptionsSchemaIds.includes(item.schemaId)\r\n )\r\n .map((op) => {\r\n return {\r\n id: 0,\r\n code: '',\r\n name: op.content,\r\n isStandard: true,\r\n vehicleId: this.state.carDetailsExtendedData.id,\r\n checked: true\r\n } as VehicleOption;\r\n }),\r\n carOptionalOptions: options.extraOptions.map((op) => {\r\n return {\r\n id: 0,\r\n code: op.optionCode,\r\n name: op.description,\r\n isStandard: false,\r\n vehicleId: this.state.carDetailsExtendedData.id,\r\n checked: op.checked,\r\n price: op.price,\r\n optionId: op.optionId\r\n } as VehicleOption;\r\n })\r\n });\r\n };\r\n\r\n getCarStandardOptionsColumns = () => {\r\n return [\r\n {\r\n field: 'name',\r\n title: this.translatorService.Tranlate('CAR_DETAILS_CAR_STANDARD_OPTION', 'Nume'),\r\n searchable: true\r\n } as Column\r\n ];\r\n };\r\n\r\n getCarOptionalOptionsColumns = () => {\r\n return [\r\n {\r\n field: 'name',\r\n title: this.translatorService.Tranlate('CAR_DETAILS_CAR_OPTIONAL_OPTION', 'Nume'),\r\n searchable: true,\r\n render: (rowData) => {\r\n const isIncluded = this.isIncluded(rowData.optionId);\r\n const isExcluded = this.isExcluded(rowData.optionId);\r\n const isRequired = this.isRequired(rowData.optionId);\r\n const style = {\r\n color: '#fff',\r\n borderRadius: '0.15rem',\r\n padding: '2px 5px',\r\n fontSize: '12px',\r\n fontWeight: 'bold',\r\n width: 'fit-content'\r\n };\r\n const excludedStyle = {\r\n backgroundColor: '#6c757d'\r\n };\r\n const includedStyle = {\r\n backgroundColor: '#28a745'\r\n };\r\n const mandatoryStyle = {\r\n backgroundColor: '#007bff'\r\n };\r\n\r\n return (\r\n \r\n {`${rowData.name}${rowData.price !== undefined ? ` - ${rowData.price} €` : ''}`}\r\n {isExcluded && Indisponibila}\r\n {isIncluded && (\r\n Inclusa in alt pachet\r\n )}\r\n {isRequired && (\r\n Obligatorie din alt pachet\r\n )}\r\n
\r\n );\r\n }\r\n } as Column,\r\n {\r\n field: 'code',\r\n title: this.translatorService.Tranlate('CAR_DETAILS_CAR_OPTIONAL_CODE', 'Cod'),\r\n searchable: true\r\n } as Column,\r\n {\r\n field: 'price',\r\n title: this.translatorService.Tranlate('CAR_DETAILS_CAR_OPTIONAL_PRICE', 'Pret'),\r\n searchable: false,\r\n hidden: true\r\n } as Column\r\n ];\r\n };\r\n\r\n loadData = async () => {\r\n const {\r\n vehicleMakeRef,\r\n bodyTypeRef,\r\n wheelsTypeRef,\r\n tractionTypeRef,\r\n transmissionTypeRef,\r\n fuelTypeRef,\r\n tiresTypeRef,\r\n paintTypeRef,\r\n vehicleConditionRef,\r\n pollutionNormRef,\r\n modelRef,\r\n colorRef,\r\n vehicleTypeRef,\r\n mvoDvBattypRef,\r\n refurbishedRef\r\n } = RefConstants;\r\n\r\n const [\r\n vehicleMakeList,\r\n bodyTypeList,\r\n wheelsTypeList,\r\n tractionTypeList,\r\n transmissionTypeList,\r\n fuelTypeList,\r\n tiresTypeList,\r\n paintTypeList,\r\n vehicleConditionList,\r\n pollutionNormList,\r\n modelTypesList,\r\n colorTypeList,\r\n vehicleTypeList,\r\n mvoDvBattypList,\r\n refurbishedList\r\n ] = await Promise.all([\r\n this.appReferentialService.Get(vehicleMakeRef?.baseUrl),\r\n this.appReferentialService.Get(bodyTypeRef!.baseUrl),\r\n this.appReferentialService.Get(wheelsTypeRef!.baseUrl),\r\n this.appReferentialService.Get(tractionTypeRef!.baseUrl),\r\n this.appReferentialService.Get(transmissionTypeRef!.baseUrl),\r\n this.appReferentialService.Get(fuelTypeRef!.baseUrl),\r\n this.appReferentialService.Get(tiresTypeRef!.baseUrl),\r\n this.appReferentialService.Get(paintTypeRef!.baseUrl),\r\n this.appReferentialService.Get(vehicleConditionRef!.baseUrl),\r\n this.appReferentialService.Get(pollutionNormRef!.baseUrl),\r\n this.appReferentialService.Get(modelRef!.baseUrl),\r\n this.appReferentialService.Get(colorRef!.baseUrl),\r\n this.appReferentialService.Get(vehicleTypeRef!.baseUrl),\r\n this.appReferentialService.Get(mvoDvBattypRef!.baseUrl),\r\n this.appReferentialService.Get(refurbishedRef!.baseUrl)\r\n ]);\r\n\r\n this.setState({\r\n isLoading: false,\r\n brandTypes: vehicleMakeList,\r\n bodyTypes: bodyTypeList,\r\n rimsTypes: wheelsTypeList,\r\n tractionTypes: tractionTypeList,\r\n transmissionTypes: transmissionTypeList,\r\n fuelTypes: fuelTypeList,\r\n tiresTypes: tiresTypeList,\r\n paintTypes: paintTypeList,\r\n carInteriorStateTypes: vehicleConditionList,\r\n carExteriorStateTypes: vehicleConditionList,\r\n carMechanicalStateTypes: vehicleConditionList,\r\n polutionNormTypes: pollutionNormList as IReferentialModel[],\r\n modelTypes: modelTypesList as IReferentialModel[],\r\n colorTypes: colorTypeList,\r\n vehicleTypes: vehicleTypeList,\r\n refurbishedList: refurbishedList,\r\n mvoDvBattypList: mvoDvBattypList\r\n });\r\n };\r\n\r\n onChangeFirstRegistrationDate = (date: Date | null) => {\r\n if (date === null) {\r\n return;\r\n }\r\n const selectedDate = date ? moment(date).format('YYYY-MM-DD') : '';\r\n\r\n this.setState({\r\n carDetailsExtendedData: {\r\n ...this.state.carDetailsExtendedData,\r\n firstRegistrationDate: selectedDate\r\n }\r\n });\r\n };\r\n\r\n standardOnRowAdd = (newData: VehicleOption): Promise => {\r\n return new Promise(async (resolve, reject) => {\r\n try {\r\n // newData.organizationId = this.props.organizationId;\r\n\r\n // await this.organizationService.AddOrganizationBankAccount(newData);\r\n // await this.loadData();\r\n this.setState({\r\n carStandardOptions: [\r\n ...this.state.carStandardOptions,\r\n {\r\n id: 0,\r\n vehicleId: this.state.carDetailsExtendedData.id,\r\n code: newData.code || '',\r\n name: newData.name,\r\n isStandard: true,\r\n checked: true,\r\n isSelected: true\r\n }\r\n ]\r\n });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n resolve();\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n });\r\n };\r\n\r\n standardOnRowUpdate = (newData: any, oldData?: any): Promise =>\r\n new Promise(async (resolve, reject) => {\r\n if (oldData) {\r\n try {\r\n // newData.currency= null;\r\n // await this.organizationService.UpdateOrganizationBankAccount(newData);\r\n // await this.loadData();\r\n\r\n //this.setState({\r\n // carStandardOptions: [\r\n // ...this.state.carStandardOptions,\r\n // {\r\n // id: 0,\r\n // vehicleId: this.state.carDetailsExtendedData.id,\r\n // code: newData.code,\r\n // name: newData.name,\r\n // isStandard: false,\r\n // checked: true\r\n // }\r\n // ]\r\n //});\r\n\r\n setTimeout(() => {\r\n const dataUpdate = [...this.state.carStandardOptions];\r\n const index = oldData.tableData.id;\r\n dataUpdate[index] = newData;\r\n this.setState({ carStandardOptions: [...dataUpdate] });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n resolve();\r\n }, 200);\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n }\r\n });\r\n\r\n standardOnRowDelete = (oldData: any): Promise =>\r\n new Promise(async (resolve, reject) => {\r\n if (oldData) {\r\n try {\r\n // await this.organizationService.RemoveOrganizationBankAccount(oldData.id);\r\n // await this.loadData();\r\n setTimeout(() => {\r\n const dataDelete = [...this.state.carStandardOptions];\r\n const index = oldData.tableData.id;\r\n dataDelete.splice(index, 1);\r\n this.setState({ carStandardOptions: [...dataDelete] });\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n resolve();\r\n }, 200);\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n }\r\n });\r\n\r\n optionalOnRowAdd = (newData: VehicleOption): Promise => {\r\n return new Promise(async (resolve, reject) => {\r\n try {\r\n // newData.organizationId = this.props.organizationId;\r\n\r\n // await this.organizationService.AddOrganizationBankAccount(newData);\r\n // await this.loadData();\r\n\r\n this.setState({\r\n carOptionalOptions: [\r\n ...this.state.carOptionalOptions,\r\n {\r\n id: 0,\r\n vehicleId: this.state.carDetailsExtendedData.id,\r\n code: newData.code,\r\n name: newData.name,\r\n isStandard: false,\r\n checked: true,\r\n isSelected: true\r\n }\r\n ]\r\n });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n resolve();\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n });\r\n };\r\n\r\n optionalOnRowUpdate = (newData: any, oldData?: any): Promise =>\r\n new Promise(async (resolve, reject) => {\r\n if (oldData) {\r\n try {\r\n // newData.currency= null;\r\n // await this.organizationService.UpdateOrganizationBankAccount(newData);\r\n // await this.loadData();\r\n\r\n this.setState({\r\n carOptionalOptions: [\r\n ...this.state.carOptionalOptions,\r\n {\r\n id: 0,\r\n vehicleId: this.state.carDetailsExtendedData.id,\r\n code: newData.code,\r\n name: newData.name,\r\n isStandard: false,\r\n checked: true,\r\n isSelected: true\r\n }\r\n ]\r\n });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n resolve();\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n }\r\n });\r\n\r\n optionalOnRowDelete = (oldData: any): Promise =>\r\n new Promise(async (resolve, reject) => {\r\n if (oldData) {\r\n try {\r\n // await this.organizationService.RemoveOrganizationBankAccount(oldData.id);\r\n // await this.loadData();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n resolve();\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n }\r\n });\r\n\r\n public renderCarStandardOptionsTable = () => {\r\n const data = this.state.carStandardOptions.map((o: VehicleOption) => {\r\n return { ...o, tableData: { checked: o.checked } };\r\n });\r\n return (\r\n ({\r\n disabled: !this.state.hasRights\r\n }),\r\n toolbar: this.state.hasRights\r\n // paging: false\r\n }}\r\n localization={getLocalization(this.translatorService)}\r\n editable={{\r\n onRowAdd: this.state.hasRights\r\n ? (newData: any) => this.standardOnRowAdd(newData)\r\n : undefined,\r\n onRowUpdate: (newData: any, oldData?: any) => this.standardOnRowUpdate(newData, oldData),\r\n /*onRowDelete: (oldData: any) => this.standardOnRowDelete(oldData),*/\r\n isEditHidden: (rowData: any) => !this.state.hasRights\r\n }}\r\n components={{\r\n Container: (props) => \r\n }}\r\n onSelectionChange={(rows) => {\r\n const standardOptions = [...this.state.carStandardOptions];\r\n standardOptions.forEach((item) => {\r\n item.checked = false;\r\n });\r\n rows.forEach((item) => {\r\n standardOptions[item.tableData.id].checked = true;\r\n });\r\n\r\n this.setState({\r\n carStandardOptions: standardOptions\r\n });\r\n }}\r\n />\r\n );\r\n };\r\n\r\n public renderCarOptionalOptionsTable = () => {\r\n const data = this.state.carOptionalOptions.map((o: VehicleOption) => {\r\n return { ...o, tableData: { checked: o.checked } };\r\n });\r\n return (\r\n ({\r\n //checked: rowData.checked === true,\r\n disabled:\r\n !this.state.hasRights ||\r\n this.isIncluded(rowData.optionId) ||\r\n this.isExcluded(rowData.optionId) ||\r\n this.isRequired(rowData.optionId)\r\n }),\r\n toolbar: this.state.hasRights,\r\n rowStyle: (rowData) => ({\r\n color:\r\n this.isIncluded(rowData.optionId) ||\r\n this.isExcluded(rowData.optionId) ||\r\n this.isRequired(rowData.optionId)\r\n ? 'rgba(0, 0, 0, 0.54)'\r\n : ''\r\n })\r\n //paging: false,\r\n }}\r\n localization={getLocalization(this.translatorService)}\r\n editable={\r\n {\r\n // onRowAdd: (newData: any) => this.optionalOnRowAdd(newData),\r\n // onRowUpdate: (newData: any, oldData?: any) => this.optionalOnRowUpdate(newData, oldData),\r\n // onRowDelete: (oldData: any) => this.optionalOnRowDelete(oldData)\r\n }\r\n }\r\n components={{\r\n Container: (props) => \r\n }}\r\n onSelectionChange={async (rows) => {\r\n let extraOptions = [...this.state.carOptionalOptions];\r\n // Save the current state of selections for comparison\r\n const previousSelections = extraOptions.filter((opt) => opt.checked);\r\n\r\n extraOptions.forEach((item) => {\r\n item.checked = false;\r\n });\r\n rows.forEach((item) => {\r\n extraOptions[item.tableData.id].checked = true;\r\n });\r\n\r\n // Determine which items were newly selected or deselected\r\n const newSelections = extraOptions.filter((opt) => opt.checked);\r\n const newlySelected = newSelections.filter((opt) => !previousSelections.includes(opt));\r\n const newlyDeselected = previousSelections.filter((opt) => !newSelections.includes(opt));\r\n const lastSelectedItem =\r\n newlySelected.length > 0\r\n ? newlySelected[newlySelected.length - 1]\r\n : newlyDeselected[newlyDeselected.length - 1];\r\n\r\n const lastSelectedOptionId = lastSelectedItem.optionId ? lastSelectedItem.optionId : 0;\r\n const vehicleId = this.state.carDetailsExtendedData.valuationVehicleId\r\n ? this.state.carDetailsExtendedData.valuationVehicleId\r\n : 0;\r\n let finalIncludedOptionIds = this.state.includedExtraOptionIds\r\n ? Array.from(new Set([...this.state.includedExtraOptionIds]))\r\n : [];\r\n let finalExcludedOptionIds = this.state.excludedExtraOptionIds\r\n ? Array.from(new Set([...this.state.excludedExtraOptionIds]))\r\n : [];\r\n let finalRequiredOptionIds = this.state.requiredExtraOptionIds\r\n ? Array.from(new Set([...this.state.requiredExtraOptionIds]))\r\n : [];\r\n\r\n if (lastSelectedOptionId !== 0) {\r\n const { includedOptionIds, excludedOptionIds, requiredOptionIds } =\r\n await this.fetchIncludeAndExcludeOptions(lastSelectedOptionId, vehicleId);\r\n // if an option is selected\r\n if (newlySelected.length > 0) {\r\n if (includedOptionIds) {\r\n finalIncludedOptionIds = Array.from(\r\n new Set([...finalIncludedOptionIds, ...includedOptionIds])\r\n );\r\n\r\n extraOptions = this.updateCheckedExtraOptionsStatus(\r\n extraOptions,\r\n includedOptionIds\r\n );\r\n }\r\n\r\n if (requiredOptionIds) {\r\n if (requiredOptionIds.mandatory.length > 0) {\r\n finalRequiredOptionIds = Array.from(\r\n new Set([...finalRequiredOptionIds, ...requiredOptionIds.mandatory])\r\n );\r\n\r\n extraOptions = this.updateCheckedExtraOptionsStatus(\r\n extraOptions,\r\n requiredOptionIds.mandatory,\r\n true\r\n );\r\n }\r\n\r\n if (requiredOptionIds.atLeastOne.length > 0) {\r\n this.setState({\r\n showOptionalRequiredOptions: true,\r\n optionalRequiredOptionsIds: requiredOptionIds.atLeastOne\r\n });\r\n }\r\n }\r\n\r\n if (excludedOptionIds) {\r\n finalExcludedOptionIds = Array.from(\r\n new Set([...finalExcludedOptionIds, ...excludedOptionIds])\r\n );\r\n\r\n extraOptions = this.updateCheckedExtraOptionsStatus(\r\n extraOptions,\r\n excludedOptionIds\r\n );\r\n }\r\n\r\n extraOptions = [...extraOptions];\r\n }\r\n\r\n // if an option is deselected\r\n if (newlyDeselected.length > 0) {\r\n if (includedOptionIds) {\r\n finalIncludedOptionIds = this.removeIndexes(\r\n finalIncludedOptionIds,\r\n includedOptionIds\r\n );\r\n\r\n extraOptions = this.updateCheckedExtraOptionsStatus(\r\n extraOptions,\r\n includedOptionIds\r\n );\r\n }\r\n\r\n if (requiredOptionIds) {\r\n if (requiredOptionIds.mandatory.length > 0) {\r\n finalRequiredOptionIds = this.removeIndexes(\r\n finalRequiredOptionIds,\r\n requiredOptionIds.mandatory\r\n );\r\n finalExcludedOptionIds = this.removeIndexes(\r\n finalExcludedOptionIds,\r\n requiredOptionIds.mandatory\r\n );\r\n\r\n extraOptions = this.updateCheckedExtraOptionsStatus(\r\n extraOptions,\r\n requiredOptionIds.mandatory\r\n );\r\n }\r\n\r\n if (requiredOptionIds.atLeastOne.length > 0) {\r\n finalRequiredOptionIds = this.removeIndexes(\r\n finalRequiredOptionIds,\r\n requiredOptionIds.atLeastOne\r\n );\r\n finalExcludedOptionIds = this.removeIndexes(\r\n finalExcludedOptionIds,\r\n requiredOptionIds.atLeastOne\r\n );\r\n\r\n extraOptions = this.updateCheckedExtraOptionsStatus(\r\n extraOptions,\r\n requiredOptionIds.atLeastOne\r\n );\r\n }\r\n }\r\n\r\n if (excludedOptionIds) {\r\n finalExcludedOptionIds = this.removeIndexes(\r\n finalExcludedOptionIds,\r\n excludedOptionIds\r\n );\r\n\r\n extraOptions = this.updateCheckedExtraOptionsStatus(\r\n extraOptions,\r\n excludedOptionIds\r\n );\r\n }\r\n }\r\n }\r\n\r\n finalExcludedOptionIds = this.removeIndexes(\r\n finalExcludedOptionIds,\r\n finalRequiredOptionIds\r\n );\r\n finalIncludedOptionIds = this.removeIndexes(\r\n finalIncludedOptionIds,\r\n finalRequiredOptionIds\r\n );\r\n\r\n this.setState({\r\n carOptionalOptions: extraOptions,\r\n includedExtraOptionIds: finalIncludedOptionIds,\r\n excludedExtraOptionIds: finalExcludedOptionIds,\r\n requiredExtraOptionIds: finalRequiredOptionIds\r\n });\r\n }}\r\n />\r\n );\r\n };\r\n\r\n fetchIncludeOptions = async (optionId: number, vehicleId: number): Promise => {\r\n let includeOptionsRequest = null;\r\n\r\n try {\r\n includeOptionsRequest = await this.caseService.GetIncludeOptions(optionId, vehicleId);\r\n } catch (error) {}\r\n\r\n if (includeOptionsRequest) {\r\n const extractedIndexes = this.extractIndexes(includeOptionsRequest.rule);\r\n return extractedIndexes;\r\n }\r\n\r\n return includeOptionsRequest;\r\n };\r\n\r\n fetchExcludeOptions = async (optionId: number, vehicleId: number): Promise => {\r\n let excludeOptionsRequest = null;\r\n\r\n try {\r\n excludeOptionsRequest = await this.caseService.GetExcludeOptions(optionId, vehicleId);\r\n } catch (error) {}\r\n\r\n if (excludeOptionsRequest) {\r\n const extractedIndexes = this.extractIndexes(excludeOptionsRequest.rule);\r\n return extractedIndexes;\r\n }\r\n\r\n return excludeOptionsRequest;\r\n };\r\n\r\n fetchRequiredOptions = async (\r\n optionId: number,\r\n vehicleId: number\r\n ): Promise => {\r\n let requiredOptionsRequest = null;\r\n\r\n try {\r\n requiredOptionsRequest = await this.caseService.GetRequiredOptions(optionId, vehicleId);\r\n } catch (error) {}\r\n\r\n if (requiredOptionsRequest) {\r\n const parsedConditions = this.parseRequiredConditions(requiredOptionsRequest.rule);\r\n return parsedConditions;\r\n }\r\n\r\n return requiredOptionsRequest;\r\n };\r\n\r\n fetchIncludeAndExcludeOptions = async (optionId: number, vehicleId: number) => {\r\n let includedOptionIds = null;\r\n let excludedOptionIds = null;\r\n let requiredOptionIds = null;\r\n\r\n try {\r\n this.setState({ isloadingIncludeExcludeOptions: true });\r\n\r\n includedOptionIds = await this.fetchIncludeOptions(optionId, vehicleId);\r\n excludedOptionIds = await this.fetchExcludeOptions(optionId, vehicleId);\r\n requiredOptionIds = await this.fetchRequiredOptions(optionId, vehicleId);\r\n } catch (error) {\r\n this.setState({ isloadingIncludeExcludeOptions: false });\r\n }\r\n\r\n this.setState({ isloadingIncludeExcludeOptions: false });\r\n return {\r\n includedOptionIds,\r\n excludedOptionIds,\r\n requiredOptionIds\r\n };\r\n };\r\n\r\n removeIndexes(excludedOptionsIndexes: number[], excludedIndexes: number[]): number[] {\r\n return excludedOptionsIndexes.filter((item) => !excludedIndexes.includes(item));\r\n }\r\n\r\n extractIndexes = (input: string): number[] => {\r\n // Use regular expression to match all numbers within braces\r\n const matches = input.match(/\\{(\\d+)\\}/g);\r\n\r\n // If no matches found, return an empty array\r\n if (!matches) {\r\n return [];\r\n }\r\n\r\n // Extract the numbers and convert them to integers\r\n const indexes = matches.map((match) => parseInt(match.replace(/[{}]/g, ''), 10));\r\n\r\n return indexes;\r\n };\r\n\r\n isIncluded = (optionId: number) => {\r\n if (!this.state.includedExtraOptionIds) return;\r\n\r\n return this.state.includedExtraOptionIds.includes(optionId);\r\n };\r\n\r\n isExcluded = (optionId: number) => {\r\n if (!this.state.excludedExtraOptionIds) return;\r\n\r\n return this.state.excludedExtraOptionIds.includes(optionId);\r\n };\r\n\r\n isRequired = (optionId: number) => {\r\n if (!this.state.requiredExtraOptionIds) return;\r\n\r\n return this.state.requiredExtraOptionIds.includes(optionId);\r\n };\r\n\r\n parseRequiredConditions(input: string): ParsedConditions {\r\n const mandatory: number[] = [];\r\n const atLeastOne: number[] = [];\r\n\r\n // Regex for extracting all conditions (e.g., {1234})\r\n const allConditionsRegex = /{(\\d+)}/g;\r\n let match;\r\n\r\n // Collect all numbers within curly braces\r\n const allConditions: number[] = [];\r\n while ((match = allConditionsRegex.exec(input)) !== null) {\r\n allConditions.push(parseInt(match[1], 10));\r\n }\r\n\r\n // Check if the input contains 'AND' or 'OR'\r\n if (input.includes('AND')) {\r\n // Regex for extracting mandatory conditions before 'AND'\r\n const mandatoryPart = input.split(' AND ')[0];\r\n const mandatoryRegex = /{(\\d+)}/g;\r\n let mandatoryMatch;\r\n while ((mandatoryMatch = mandatoryRegex.exec(mandatoryPart)) !== null) {\r\n mandatory.push(parseInt(mandatoryMatch[1], 10));\r\n }\r\n\r\n // Regex for extracting optional conditions within parentheses\r\n const optionalPartMatch = input.match(/\\(([^)]+)\\)/);\r\n if (optionalPartMatch) {\r\n const optionalRegex = /{(\\d+)}/g;\r\n let optionalMatch;\r\n while ((optionalMatch = optionalRegex.exec(optionalPartMatch[1])) !== null) {\r\n atLeastOne.push(parseInt(optionalMatch[1], 10));\r\n }\r\n }\r\n } else if (input.includes('OR')) {\r\n // If there are no 'AND' conditions, treat all as optional\r\n for (const num of allConditions) {\r\n atLeastOne.push(num);\r\n }\r\n } else {\r\n // If no logical operator is present, all conditions are mandatory\r\n mandatory.push(...allConditions);\r\n }\r\n\r\n return {\r\n mandatory,\r\n atLeastOne\r\n };\r\n }\r\n\r\n updateCheckedExtraOptionsStatus = (\r\n extraOptions: VehicleOption[],\r\n includedOptionIds: number[],\r\n addIndexes?: boolean // if true, add indexes instead of removing them\r\n ) => {\r\n if (!includedOptionIds) return extraOptions;\r\n\r\n addIndexes = addIndexes ? addIndexes : false;\r\n\r\n extraOptions.forEach((item) => {\r\n if (!item.optionId) return;\r\n\r\n if (includedOptionIds.includes(item.optionId) && !addIndexes) {\r\n item.checked = false;\r\n } else if (includedOptionIds.includes(item.optionId) && addIndexes) {\r\n item.checked = true;\r\n }\r\n });\r\n\r\n return extraOptions;\r\n };\r\n\r\n convertKwToHp = (kw: number) => (R.isEmpty(kw) ? '' : Math.round(kw * 1.36));\r\n convertHpToKw = (hp: number) => (R.isEmpty(hp) ? '' : Math.round(hp / 1.36));\r\n\r\n handlePowerChange = (e: any) => {\r\n this.setState({\r\n carDetailsExtendedData: {\r\n ...this.state.carDetailsExtendedData,\r\n power: e.target.value,\r\n horsePower: this.convertKwToHp(e.target.value)\r\n }\r\n });\r\n };\r\n\r\n handleChassisNumberChange = (e: any) => {\r\n this.setState(\r\n {\r\n carDetailsExtendedData: {\r\n ...this.state.carDetailsExtendedData,\r\n vin: e.target.value\r\n }\r\n },\r\n () =>\r\n R.test(\r\n /^(?=.*[0-9])(?=.*[abcdefghjklmnprstuvwxyzABCDEFGHJKLMNPRSTUVWXYZ])[0-9abcdefghjklmnprstuvwxyzABCDEFGHJKLMNPRSTUVWXYZ-]{17}$/,\r\n this.state.carDetailsExtendedData.vin\r\n ) && this.resetVehicleState()\r\n );\r\n };\r\n\r\n handleVinNumberBlur = async () => {\r\n console.log('vin blur', this.state.carDetailsExtendedData.vin);\r\n if (\r\n R.test(\r\n /^(?=.*[0-9])(?=.*[abcdefghjklmnprstuvwxyzABCDEFGHJKLMNPRSTUVWXYZ])[0-9abcdefghjklmnprstuvwxyzABCDEFGHJKLMNPRSTUVWXYZ-]{17}$/,\r\n this.state.carDetailsExtendedData.vin\r\n )\r\n ) {\r\n await this.checkIfVinExistOnAcquisitionCase();\r\n }\r\n\r\n }\r\n\r\n handleHPChange = (e: any) => {\r\n this.setState({\r\n carDetailsExtendedData: {\r\n ...this.state.carDetailsExtendedData,\r\n horsePower: e.target.value,\r\n power: this.convertHpToKw(e.target.value)\r\n }\r\n });\r\n };\r\n\r\n isDisabled = (fieldValue: any): boolean => {\r\n if (this.state.carDetailsExtendedData.currentStatus?.status?.code !== 'Available') {\r\n return !this.state.hasRights;\r\n }\r\n\r\n return !this.state.hasRights || fieldValue ? true : false;\r\n };\r\n\r\n checkIfIsElectric = (): boolean => {\r\n if (\r\n this.state.carDetailsExtendedData.fuelType &&\r\n this.state.carDetailsExtendedData.fuelType.code === FuelTypeEnum.E\r\n ) {\r\n //PHEV - \"propulsionSystem\": \"PHEV(Vehic electr plug-in hybrid)\"\r\n if (this.state.carDetailsExtendedData.propulsionSystem && this.state.carDetailsExtendedData.propulsionSystem.includes('PHEV')) {\r\n return false;\r\n }\r\n //HEV = \"propulsionSystem\": \"hybrid\",\r\n if (this.state.carDetailsExtendedData.propulsionSystem == 'hybrid') {\r\n return false;\r\n }\r\n\r\n return true;\r\n }\r\n return false;\r\n };\r\n\r\n handlePlateNumberBlur = async (plateNumber: PlateNumber) => {\r\n if (\r\n this.props.caseSettingsState.caseSettings!.workflow.isDgpciIntegration &&\r\n plateNumber.PlateNumber.length > 0\r\n ) {\r\n try {\r\n const vinRequest = await this.caseService.GetVinByPlateNumberRequest(plateNumber);\r\n\r\n if (vinRequest.success) {\r\n this.setState({\r\n carDetailsExtendedData: {\r\n ...this.state.carDetailsExtendedData,\r\n vin: vinRequest.vin\r\n }\r\n });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } else {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('ERROR_MSG_VIN', 'Eroare la obtinerea VIN'),\r\n {\r\n variant: 'error'\r\n }\r\n );\r\n }\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n\r\n renderValidators = (rules: string[]) => {\r\n if (this.props.type !== 'history') {\r\n return rules;\r\n }\r\n return [];\r\n };\r\n\r\n rendeClientDataForm = () => {\r\n const showAquisitionPrice =\r\n this.state.carDetailsExtendedData.currentStatus?.statusId == VehicleStatusCodeEnum.Aquisition\r\n ? false\r\n : true;\r\n const saleCase =\r\n this.props.caseSettingsState?.case?.caseType?.code === CaseTypeCode.SALE ? true : false;\r\n\r\n return (\r\n {\r\n this.submitVehicleData(e);\r\n }}\r\n >\r\n
\r\n \r\n \r\n \r\n {this.translatorService.Tranlate('VALUATION_DIALOG_HEADER', 'Selectare vehicul')}\r\n \r\n {\r\n this.setState({ isValuationOpen: false });\r\n }}\r\n size={'small'}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n this.onChange('plateNumber')(e);\r\n }}\r\n error={!Utils.validatePlateNumber(this.state.carDetailsExtendedData.plateNumber)}\r\n helperText={\r\n Utils.validatePlateNumber(this.state.carDetailsExtendedData.plateNumber)\r\n ? ''\r\n : this.translatorService.Tranlate(\r\n 'CAR_DETAILS_PLATE_NUMBER_ERROR',\r\n 'Numarul de inmatriculare nu este valid'\r\n )\r\n }\r\n onBlur={async (e: any) => {\r\n const plateNumberObject: PlateNumber = {\r\n PlateNumber: e.target.value,\r\n externalClient: false\r\n };\r\n await this.handlePlateNumberBlur(plateNumberObject);\r\n }}\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n label={this.translatorService.Tranlate(\r\n 'CAR_DETAILS_PLATE_NUMBER',\r\n 'Numar inmatriculare'\r\n )}\r\n />\r\n \r\n {showAquisitionPrice && (\r\n \r\n \r\n \r\n )}\r\n \r\n \r\n =\r\n this.state.carDetailsExtendedData.firstRegistrationDate\r\n ? true\r\n : false\r\n }\r\n helperText={\r\n this.state.carDetailsExtendedData.makeDate &&\r\n this.state.carDetailsExtendedData.firstRegistrationDate &&\r\n this.state.carDetailsExtendedData.makeDate >=\r\n this.state.carDetailsExtendedData.firstRegistrationDate\r\n ? this.translatorService.Tranlate(\r\n 'CAR_DETAILS_DATE_OF_FABRICATION_ERROR',\r\n 'Data fabricatiei trebuie sa fie mai mica decat cea a primei inmatriculari'\r\n )\r\n : ''\r\n }\r\n // minDate={activeButton === 1 ? new Date() : this.state.minDate}\r\n />\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n this.onChange('kilometersNr')(e)}\r\n validators={['required', 'isValidNumberOfKm']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu'),\r\n this.translatorService.Tranlate(\r\n 'CAR_DETAILS_NUMBER_OF_KILOMETERS_ERROR',\r\n 'Numarul de kilometri nu trebuie sa fie mai mare de 1000000'\r\n )\r\n ]}\r\n label={this.translatorService.Tranlate(\r\n 'CAR_DETAILS_NUMBER_OF_KILOMETERS',\r\n 'Numar kilometri'\r\n )}\r\n />\r\n \r\n \r\n\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n }}\r\n />\r\n
\r\n
\r\n \r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n
\r\n\r\n \r\n \r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n\r\n \r\n \r\n this.onChange('version')(e)}\r\n validators={this.renderValidators(['required'])}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n label={this.translatorService.Tranlate('CAR_DETAILS_VERSION', 'Versiune')}\r\n />\r\n \r\n \r\n this.onChange('equipmentVersion')(e)}\r\n validators={this.renderValidators(['required'])}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n label={this.translatorService.Tranlate('CAR_DETAILS_EQUIPMENT_VERSION', 'Echipare')}\r\n />\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n this.onChange('engineSize')(e)}\r\n validators={this.renderValidators(['required'])}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n label={this.translatorService.Tranlate(\r\n 'CAR_DETAILS_CILINDER_CAP',\r\n 'Capacitate cilindrica (cm3)'\r\n )}\r\n />\r\n \r\n \r\n this.onChange('co2')(e)}\r\n label={this.translatorService.Tranlate('CAR_DETAILS_CO2_VALUE', 'Valoare Co2')}\r\n />\r\n \r\n \r\n\r\n \r\n \r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n\r\n \r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n\r\n \r\n \r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n\r\n \r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n \r\n \r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n\r\n \r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n\r\n \r\n \r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n\r\n \r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n \r\n \r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n {saleCase && (\r\n \r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n )}\r\n\r\n {!saleCase && this.state.carDetailsExtendedData.fuelType && this.checkIfIsElectric() && (\r\n \r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n )}\r\n \r\n {saleCase && this.state.carDetailsExtendedData.fuelType && this.checkIfIsElectric() && (\r\n \r\n \r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n )}\r\n \r\n \r\n this.onChange('location')(e)}\r\n validators={this.renderValidators(['required'])}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n label={this.translatorService.Tranlate('VEHICLES_LOCATION_LABEL', 'Locatie')}\r\n />\r\n \r\n\r\n \r\n this.onChange('nrOfDoors')(e)}\r\n validators={this.renderValidators(['required'])}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n label={this.translatorService.Tranlate('CAR_DETAILS_NROFDOORS', 'Numar usi')}\r\n InputProps={{\r\n inputComponent: this.NumberFormatCustom\r\n }}\r\n />\r\n \r\n\r\n \r\n this.onChange('radioCode')(e)}\r\n validators={this.renderValidators(['required'])}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n label={this.translatorService.Tranlate('CAR_DETAILS_RADIO_CODE', 'Cod radio')}\r\n />\r\n \r\n\r\n \r\n this.onChange('engineManufactureCode')(e)}\r\n validators={this.renderValidators(['required'])}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n label={this.translatorService.Tranlate(\r\n 'CAR_DETAILS_ENGINE_MANUFACTURE_CODE',\r\n 'Cod fabricare motor'\r\n )}\r\n />\r\n \r\n {this.props.appState?.appUser?.userRole?.code === 'MAVO_ADMIN' && (\r\n \r\n this.onChange('accountingValue')(e)}\r\n validators={this.renderValidators(['required'])}\r\n errorMessages={[\r\n this.translatorService.Tranlate(\r\n 'VALIDATORS_REQUIRED',\r\n 'Campul este obligatoriu'\r\n )\r\n ]}\r\n label={this.translatorService.Tranlate(\r\n 'CAR_DETAILS_ACCOUNTING_VALUE',\r\n 'Valoarea contabila'\r\n )}\r\n />\r\n \r\n )}\r\n \r\n {this.props.appState?.appUser?.userRole?.code === 'MAVO_ADMIN' && (\r\n
\r\n
\r\n {this.translatorService.Tranlate('CAR_DETAILS_USER_STATE', 'Date utilizator')}\r\n
\r\n \r\n \r\n this.onChange('rcrEmployeeLastName')(e)}\r\n validators={this.renderValidators(['required'])}\r\n errorMessages={[\r\n this.translatorService.Tranlate(\r\n 'VALIDATORS_REQUIRED',\r\n 'Campul este obligatoriu'\r\n )\r\n ]}\r\n label={this.translatorService.Tranlate(\r\n 'CAR_DETAILS_EMPLOYEE_LAST_NAME',\r\n 'Nume'\r\n )}\r\n />\r\n \r\n \r\n this.onChange('rcrEmployeeFirstName')(e)}\r\n validators={this.renderValidators(['required'])}\r\n errorMessages={[\r\n this.translatorService.Tranlate(\r\n 'VALIDATORS_REQUIRED',\r\n 'Campul este obligatoriu'\r\n )\r\n ]}\r\n label={this.translatorService.Tranlate(\r\n 'CAR_DETAILS_EMPLOYEE_FIRST_NAME',\r\n 'Prenume'\r\n )}\r\n />\r\n \r\n \r\n this.onChange('rcrEmployeeEmail')(e)}\r\n validators={this.renderValidators(['required'])}\r\n errorMessages={[\r\n this.translatorService.Tranlate(\r\n 'VALIDATORS_REQUIRED',\r\n 'Campul este obligatoriu'\r\n )\r\n ]}\r\n label={this.translatorService.Tranlate('CAR_DETAILS_EMPLOYEE_EMAIL', 'Email')}\r\n />\r\n \r\n \r\n this.onChange('rcrEmployeePhone')(e)}\r\n validators={this.renderValidators(['required'])}\r\n errorMessages={[\r\n this.translatorService.Tranlate(\r\n 'VALIDATORS_REQUIRED',\r\n 'Campul este obligatoriu'\r\n )\r\n ]}\r\n label={this.translatorService.Tranlate('CAR_DETAILS_EMPLOYEE_PHONE', 'Phone')}\r\n />\r\n \r\n \r\n
\r\n )}\r\n
\r\n
\r\n {this.translatorService.Tranlate('CAR_DETAILS_CAR_STATE', 'Stare masina')}\r\n
\r\n \r\n \r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n this.onChange('inConditionComments')(e)}\r\n label={this.translatorService.Tranlate('CAR_DETAILS_COMMENTS', 'Observatii')}\r\n multiline\r\n rows={5}\r\n />\r\n \r\n \r\n this.onChange('outConditionComments')(e)}\r\n label={this.translatorService.Tranlate('CAR_DETAILS_COMMENTS', 'Observatii')}\r\n multiline\r\n rows={5}\r\n />\r\n \r\n \r\n this.onChange('technicalConditionComments')(e)}\r\n label={this.translatorService.Tranlate('CAR_DETAILS_COMMENTS', 'Observatii')}\r\n multiline\r\n rows={5}\r\n />\r\n \r\n \r\n
\r\n {this.props.showCostTypes ? (\r\n
\r\n
\r\n {this.translatorService.Tranlate('COSTS', 'Costuri')}\r\n
\r\n
\r\n ) : null}\r\n {this.props.showCostTypes ? (\r\n
\r\n {this.state.carDetailsExtendedData?.vehicleCosts ? (\r\n
\r\n \r\n
\r\n ) : null}\r\n
\r\n \r\n
\r\n
\r\n ) : null}\r\n
\r\n
\r\n {this.translatorService.Tranlate(\r\n 'CAR_DETAILS_CAR_STANDARD_OPTIONS',\r\n 'Dotari standard'\r\n )}\r\n
\r\n\r\n {!this.state.isLoading ? this.renderCarStandardOptionsTable() : null}\r\n
\r\n\r\n
\r\n
\r\n {this.translatorService.Tranlate(\r\n 'CAR_DETAILS_CAR_OPTIONAL_OPTIONS',\r\n 'Dotari optionale'\r\n )}\r\n {this.state.showOptionalRequiredOptions && this.renderMandatoryOptionsDialog()}\r\n
\r\n \r\n {!this.state.isLoading ? this.renderCarOptionalOptionsTable() : null}\r\n
\r\n \r\n {this.state.isloadingIncludeExcludeOptions ? : null}\r\n \r\n
\r\n
\r\n\r\n \r\n \r\n \r\n \r\n {`${this.translatorService.Tranlate(\r\n 'VIN_IDENTIFICATION_CONFIRMATION_MESSAGE',\r\n 'Identificarea conform VIN presupune un cost suplimentar - Doriţi să continuaţi ?'\r\n )} `}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n this.validateFirstRegistrationDate(\r\n this.state.carDetailsExtendedData.firstRegistrationDate\r\n )\r\n }\r\n disabled={!this.state.hasRights || this.state.executing}\r\n >\r\n {this.translatorService.Tranlate('SAVE', 'Salveaza')}\r\n \r\n \r\n );\r\n };\r\n\r\n renderMandatoryOptionsDialog = () => {\r\n const data = this.state.carOptionalOptions.filter((option) => {\r\n return this.state.optionalRequiredOptionsIds!.includes(option.optionId!);\r\n });\r\n\r\n return (\r\n \r\n \r\n {'Pentru selectia anterioara este necesara adaugarea unei optiuni din lista'}\r\n \r\n \r\n {\r\n const rowData = tableMeta.rowData;\r\n\r\n return `[${rowData[0]}] ${value} - ${rowData[2]} €`;\r\n }\r\n }\r\n },\r\n {\r\n name: 'price',\r\n label: 'Pret',\r\n options: {\r\n display: 'excluded',\r\n filter: false,\r\n sort: false\r\n }\r\n }\r\n ]}\r\n options={{\r\n viewColumns: false,\r\n filter: false,\r\n search: false,\r\n pagination: false,\r\n selectableRows: 'single' as SelectableRows,\r\n selectableRowsHeader: false,\r\n disableToolbarSelect: true,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n elevation: 1,\r\n\r\n onRowsSelect: (rowSelected: any, allRows: any) => {\r\n const { dataIndex } = rowSelected[0];\r\n const selectedOption = data?.filter((option) => {\r\n return this.state.optionalRequiredOptionsIds!.includes(option.optionId!);\r\n })[dataIndex];\r\n const finalRequiredIds = Array.from(\r\n new Set([...this.state.requiredExtraOptionIds!, selectedOption.optionId!])\r\n );\r\n const optionsToBeExcludedIds = data\r\n ?.filter((option) => option.optionId !== selectedOption.optionId!)\r\n ?.map((option) => option.optionId!);\r\n let finalExtraOptions = [...this.state.carOptionalOptions];\r\n let finalExcludedOptionIds = Array.from(\r\n new Set([...this.state.excludedExtraOptionIds!, ...optionsToBeExcludedIds])\r\n );\r\n let finalIncludedOptionIds = [...this.state.includedExtraOptionIds!];\r\n\r\n finalExtraOptions = this.updateCheckedExtraOptionsStatus(\r\n finalExtraOptions,\r\n finalRequiredIds,\r\n true\r\n );\r\n\r\n finalExtraOptions = this.updateCheckedExtraOptionsStatus(\r\n finalExtraOptions,\r\n optionsToBeExcludedIds\r\n );\r\n\r\n finalIncludedOptionIds = this.removeIndexes(finalIncludedOptionIds, [\r\n ...finalRequiredIds,\r\n selectedOption.optionId!\r\n ]);\r\n\r\n finalExcludedOptionIds = this.removeIndexes(finalExcludedOptionIds, [\r\n ...finalRequiredIds,\r\n selectedOption.optionId!\r\n ]);\r\n\r\n this.setState({\r\n ...this.state,\r\n showOptionalRequiredOptions: false,\r\n carOptionalOptions: finalExtraOptions,\r\n includedExtraOptionIds: finalIncludedOptionIds,\r\n requiredExtraOptionIds: finalRequiredIds,\r\n excludedExtraOptionIds: finalExcludedOptionIds\r\n });\r\n }\r\n }}\r\n />\r\n \r\n \r\n );\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n this.vehicleService = (this.context as AppContext).vehicleService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n
{this.rendeClientDataForm()}
\r\n ) : null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (\r\n state: ApplicationState,\r\n ownProps: ExternalCaseDetailsCaseTabCarDetailsExtendedContainerProps\r\n ) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app,\r\n vehicleState: state.vehicle,\r\n ...ownProps\r\n }),\r\n { ...CaseSettingsActionCreators, ...VehicleActionCreators }\r\n)(withSnackbar(CaseDetailsCaseTabCarDetailsExtendedContainer as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n ApplicationState,\r\n CaseSettingsState,\r\n AppState,\r\n CaseSettingsActionCreators\r\n} from '../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { Button, Grid, Paper } from '@material-ui/core';\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { WorkflowSectionStepForm } from '../../interfaces/Workflow';\r\nimport { CaseParameterHistory, CaseTariffValueHistory } from '../../interfaces/Case';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport { IReferentialService } from '../../services/Interfaces/IReferentialService';\r\nimport { ParametreCode, ReferentialCode } from '../../helpers/Constants';\r\nimport { AppUser } from '../../interfaces/AppUser';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport Referentials from '../../helpers/Referentials.json';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport { FormHelpers } from '../../helpers/forms/FormHelpers';\r\nimport NumberFormat from 'react-number-format';\r\nimport MaterialTable, { Column, Icons } from 'material-table';\r\nimport ArrowDownward from '@material-ui/icons/ArrowDownward';\r\nimport AddCircleTwoToneIcon from '@material-ui/icons/AddCircleTwoTone';\r\nimport Check from '@material-ui/icons/Check';\r\nimport ChevronLeft from '@material-ui/icons/ChevronLeft';\r\nimport ChevronRight from '@material-ui/icons/ChevronRight';\r\nimport Clear from '@material-ui/icons/Clear';\r\nimport DeleteOutline from '@material-ui/icons/DeleteOutline';\r\nimport Edit from '@material-ui/icons/Edit';\r\nimport FilterList from '@material-ui/icons/FilterList';\r\nimport FirstPage from '@material-ui/icons/FirstPage';\r\nimport LastPage from '@material-ui/icons/LastPage';\r\nimport Remove from '@material-ui/icons/Remove';\r\nimport SaveAlt from '@material-ui/icons/SaveAlt';\r\nimport Search from '@material-ui/icons/Search';\r\nimport ViewColumn from '@material-ui/icons/ViewColumn';\r\nimport { forwardRef } from 'react';\r\nimport { VehicleOption } from '../../interfaces/Vehicle';\r\nimport * as R from 'ramda';\r\n\r\nconst tableIcons = {\r\n Add: forwardRef((props, ref) => ),\r\n Check: forwardRef((props, ref) => ),\r\n Clear: forwardRef((props, ref) => ),\r\n Delete: forwardRef((props, ref) => ),\r\n DetailPanel: forwardRef((props, ref) => ),\r\n Edit: forwardRef((props, ref) => ),\r\n Export: forwardRef((props, ref) => ),\r\n Filter: forwardRef((props, ref) => ),\r\n FirstPage: forwardRef((props, ref) => ),\r\n LastPage: forwardRef((props, ref) => ),\r\n NextPage: forwardRef((props, ref) => ),\r\n PreviousPage: forwardRef((props, ref) => ),\r\n ResetSearch: forwardRef((props, ref) => ),\r\n Search: forwardRef((props, ref) => ),\r\n SortArrow: forwardRef((props, ref) => ),\r\n ThirdStateCheck: forwardRef((props, ref) => ),\r\n ViewColumn: forwardRef((props, ref) => )\r\n} as Icons;\r\n\r\ninterface ICaseDetailsCaseTabCarRepairCostFormState {\r\n isLoading: boolean;\r\n hasRights: boolean;\r\n executing: boolean;\r\n isUserHidden: boolean;\r\n caseParameters: Array;\r\n caseTariffValues: CaseTariffValueHistory[];\r\n tariffTypeGroupList: IReferential[];\r\n}\r\n\r\nexport interface ExternalCaseDetailsCaseTabCarRepairCostFormProps {\r\n workflowForm: WorkflowSectionStepForm;\r\n}\r\n\r\ntype ICaseDetailsCaseTabCarDetailsExtendedFormProps =\r\n ExternalCaseDetailsCaseTabCarRepairCostFormProps & {\r\n caseSettingsState: CaseSettingsState;\r\n appState: AppState;\r\n } & typeof CaseSettingsActionCreators &\r\n ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass CaseDetailsCaseTabCarRepairCostForm extends React.PureComponent<\r\n ICaseDetailsCaseTabCarDetailsExtendedFormProps,\r\n ICaseDetailsCaseTabCarRepairCostFormState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private caseService!: ICaseService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n defaultBrand = {\r\n name: 'All', //this.translatorService.Tranlate(\"SELECT_ALL_OPTION\", \"Toate\"),\r\n displayName: 'All', //this.translatorService.Tranlate(\"SELECT_ALL_OPTION\", \"Toate\"),\r\n id: -1,\r\n isActive: true\r\n } as IReferential;\r\n\r\n state = {\r\n isLoading: false,\r\n hasRights: false,\r\n executing: false,\r\n isUserHidden: false,\r\n caseParameters: [] as CaseParameterHistory[],\r\n caseTariffValues: [],\r\n tariffTypeGroupList: []\r\n } as ICaseDetailsCaseTabCarRepairCostFormState;\r\n\r\n public componentDidMount() {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (R.isNil(caseSettings) || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n const caseParametersList = this.props.caseSettingsState.case!.caseParameters;\r\n this.setState(\r\n {\r\n isLoading: true,\r\n caseParameters: caseParametersList\r\n },\r\n async () => {\r\n await this.loadCaseClientDataForm();\r\n }\r\n );\r\n }\r\n\r\n loadCaseClientDataForm = async () => {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (R.isNil(caseSettings) || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n\r\n const tariffGroupTypeRef = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.TariffTypeGroup\r\n );\r\n const tariffGroupTypeList = await this.appReferentialService.Get(tariffGroupTypeRef!.baseUrl);\r\n\r\n const hasRights = FormHelpers.HasRights(\r\n this.props.workflowForm.workflowFormPermissions,\r\n this.props.appState.appUser!,\r\n this.props.caseSettingsState.case!.caseStatus.caseStatusId\r\n );\r\n\r\n this.setState({\r\n isLoading: false,\r\n hasRights: hasRights,\r\n isUserHidden: !hasRights,\r\n caseTariffValues: this.props.caseSettingsState.case!.caseTariff.caseTariffValuesHistory,\r\n tariffTypeGroupList: tariffGroupTypeList.filter((item) => item.isActive === true)\r\n });\r\n };\r\n\r\n renderTariffGroupTypes = () => {\r\n const tariffGroupTypes = [] as any[];\r\n for (const tariffGroupType of this.state.tariffTypeGroupList) {\r\n tariffGroupTypes.push(\r\n
\r\n \r\n {tariffGroupType.displayName}\r\n \r\n \r\n {this.renderCaseTariffValues(tariffGroupType.id)}\r\n \r\n
\r\n );\r\n }\r\n return tariffGroupTypes;\r\n };\r\n\r\n renderCaseTariffValues = (tariffGroupTypeId: number) => {\r\n const caseTariffValuess = [] as any[];\r\n const caseTariffValues = this.state.caseTariffValues.filter(\r\n (item) => item.tariffType!.tariffTypeGroupId === tariffGroupTypeId\r\n );\r\n this.getDistinctTariffTypes(caseTariffValues).forEach((tt) => {\r\n const tariffValues = caseTariffValues.filter((item) => item.tariffTypeId === tt!.id);\r\n\r\n caseTariffValuess.push(\r\n \r\n
{tt!.displayName}
\r\n {this.renderTariffValues(tariffValues)}\r\n
\r\n );\r\n });\r\n return caseTariffValuess;\r\n };\r\n\r\n getDistinctTariffTypes = (tariffValues: CaseTariffValueHistory[]) => {\r\n return tariffValues\r\n .map((item) => item.tariffType)\r\n .filter((tt, index, arr) => arr.findIndex((i) => i!.id === tt!.id) == index);\r\n };\r\n\r\n onHandleTariffInputChange = (e: React.ChangeEvent, id: number) => {\r\n const index = this.state.caseTariffValues.findIndex((value) => value.id === id);\r\n const newCaseTariffValues = [...this.state.caseTariffValues];\r\n\r\n newCaseTariffValues[index].value = parseInt(e.currentTarget.value);\r\n\r\n this.setState({\r\n caseTariffValues: newCaseTariffValues\r\n });\r\n };\r\n\r\n renderTariffValues = (list: CaseTariffValueHistory[]) => {\r\n list = list.sort((a: CaseTariffValueHistory, b: CaseTariffValueHistory) => {\r\n return this.compareName(a.brand!, b.brand!);\r\n });\r\n return list.map((item, index) => {\r\n return (\r\n
\r\n ) =>\r\n this.onHandleTariffInputChange(e, item.id)\r\n }\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n label={\r\n (item.brand === null ? this.defaultBrand.displayName : item.brand.displayName) +\r\n ' ' +\r\n this.renderVehicleAge(item)\r\n }\r\n InputProps={{\r\n inputComponent: this.NumberFormatCustom\r\n }}\r\n />\r\n
\r\n );\r\n });\r\n };\r\n\r\n compareName = (a: IReferential, b: IReferential) => {\r\n const nameA = a === null ? '' : a.displayName!.toUpperCase();\r\n const nameB = b === null ? '' : b.displayName!.toUpperCase();\r\n if (nameA < nameB) {\r\n return -1;\r\n }\r\n if (nameA > nameB) {\r\n return 1;\r\n }\r\n\r\n return 0;\r\n };\r\n\r\n renderVehicleAge = (tv: CaseTariffValueHistory) => {\r\n if (tv.startVehicleYear === null && tv.endVehicleYear === null) {\r\n return '';\r\n }\r\n const start = tv.startVehicleYear === null ? '0' : tv.startVehicleYear;\r\n const end = tv.endVehicleYear === null ? '' : tv.endVehicleYear;\r\n\r\n return '(' + start + '<' + end + ')';\r\n };\r\n\r\n submitForm = async (caseId: number, caseSectionStepFormId: number, appUser: AppUser | null) => {\r\n let newStatus = await this.caseService.SubmitForm(caseId, caseSectionStepFormId, appUser);\r\n\r\n if (newStatus === null) {\r\n newStatus = this.props.caseSettingsState.case!.caseStatus;\r\n }\r\n\r\n this.props.SetCaseStatus(newStatus);\r\n if (appUser !== null) {\r\n this.props.AddPartner(appUser!.hoId === null ? appUser!.organizationId : appUser!.hoId);\r\n }\r\n\r\n const hasRights = FormHelpers.HasRights(\r\n this.props.workflowForm.workflowFormPermissions,\r\n this.props.appState.appUser!,\r\n newStatus.caseStatusId\r\n );\r\n this.setState({ hasRights: hasRights });\r\n };\r\n\r\n NumberFormatCustom = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n },\r\n currentTarget: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n allowNegative={false}\r\n thousandSeparator={false}\r\n decimalScale={2}\r\n />\r\n );\r\n };\r\n\r\n submitData = async (e: any) => {\r\n // let newVehicle = { ...this.state.carDetailsExtendedData } as Vehicle;\r\n try {\r\n let caseParameterMandatoryField = false;\r\n this.state.caseParameters.forEach((caseParameter) => {\r\n if (caseParameter.parameter?.code === ParametreCode.TVA) {\r\n caseParameter.value = caseParameter.value.trim();\r\n if (R.isEmpty(caseParameter.value)) {\r\n caseParameterMandatoryField = true;\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('MANDATORY_VAT', 'TVA-ul este obligatoriu!'), {\r\n variant: 'warning'\r\n });\r\n } \r\n }\r\n if (caseParameter.parameter?.code === ParametreCode.CURRENCY) {\r\n caseParameter.value = caseParameter.value.trim();\r\n if (R.isEmpty(caseParameter.value)) {\r\n caseParameterMandatoryField = true;\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('MANDATORY_CURRENCY', 'Moneda este obligatorie!'), {\r\n variant: 'warning'\r\n });\r\n } \r\n }\r\n });\r\n\r\n if (caseParameterMandatoryField) {\r\n return;\r\n }\r\n\r\n this.setState({ executing: true });\r\n\r\n await this.caseService.SaveParameterHistory(\r\n this.props.caseSettingsState.case!.id,\r\n this.state.caseParameters\r\n );\r\n\r\n await this.caseService.SaveCaseTariffHistory(\r\n this.props.caseSettingsState.case!.id,\r\n this.state.caseTariffValues\r\n );\r\n\r\n await this.submitForm(\r\n this.props.caseSettingsState.case!.id,\r\n this.props.workflowForm.id,\r\n null\r\n );\r\n\r\n this.state.caseParameters.forEach((element) => {\r\n this.props.UpdateCaseParameters(element);\r\n });\r\n\r\n this.state.caseTariffValues.forEach((element) => {\r\n this.props.UpdateCaseTariffvalue(element);\r\n });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (ex) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n } finally {\r\n this.setState({\r\n executing: false\r\n });\r\n }\r\n };\r\n\r\n public getLocalization = () => {\r\n return {\r\n header: { actions: '' },\r\n toolbar: {\r\n searchPlaceholder: this.translatorService.Tranlate('SEARCH', 'Cauta'),\r\n searchTooltip: this.translatorService.Tranlate('SEARCH', 'Cauta')\r\n },\r\n body: {\r\n editTooltip: this.translatorService.Tranlate('EDIT', 'Editeaza'),\r\n deleteTooltip: this.translatorService.Tranlate('DELETE', 'Sterge'),\r\n addTooltip: this.translatorService.Tranlate('Add', 'Adauga'),\r\n emptyDataSourceMessage: this.translatorService.Tranlate(\r\n 'NO_RECORDS_TO_DISPLAY',\r\n 'Nu exista date de afisat'\r\n ),\r\n editRow: {\r\n cancelTooltip: this.translatorService.Tranlate('CANCEL', 'Anuleaza'),\r\n saveTooltip: this.translatorService.Tranlate('SAVE', 'Salveaza'),\r\n deleteText: this.translatorService.Tranlate(\r\n 'DELETE_TEXT',\r\n 'Sigur doriti sa stergeti aceasta inregistrare?'\r\n )\r\n }\r\n },\r\n pagination: {\r\n labelRowsSelect: this.translatorService.Tranlate('ROWS', 'inregistrari'),\r\n firstTooltip: this.translatorService.Tranlate('FIRST_PAGE', 'Prima pagina'),\r\n previousTooltip: this.translatorService.Tranlate('PREVIOUS_PAGE', 'Pagina precedenta'),\r\n nextTooltip: this.translatorService.Tranlate('NEXT_PAGE', 'Pagina urmatoare'),\r\n lastTooltip: this.translatorService.Tranlate('LAST_PAGE', 'Ultima pagina'),\r\n labelDisplayedRows:\r\n '{from}-{to} ' + this.translatorService.Tranlate('OF', 'din') + ' {count}'\r\n }\r\n };\r\n };\r\n\r\n getCarRepairCostParametersColumns = () => {\r\n return [\r\n {\r\n field: 'parameter.displayName',\r\n title: this.translatorService.Tranlate('CAR_REPAIR_COST_PARAMETER', 'Parametru'),\r\n searchable: true,\r\n editable: 'never'\r\n } as Column,\r\n {\r\n field: 'value',\r\n title: this.translatorService.Tranlate('CAR_REPAIR_COST_VALUE', 'Valoare'),\r\n searchable: true\r\n } as Column\r\n ];\r\n };\r\n\r\n parametersOnRowAdd = (newData: VehicleOption): Promise => {\r\n return new Promise(async (resolve, reject) => {\r\n try {\r\n // newData.organizationId = this.props.organizationId;\r\n\r\n // await this.organizationService.AddOrganizationBankAccount(newData);\r\n // await this.loadData();\r\n // this.setState({carStandardOptions: [\r\n // ...this.state.carStandardOptions,\r\n // {\r\n // id: 0,\r\n // vehicleId: this.state.carDetailsExtendedData.id,\r\n // code: newData.code,\r\n // name: newData.name\r\n // }\r\n // ]\r\n // })\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n resolve();\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n });\r\n };\r\n\r\n parametersOnRowUpdate = (newData: any, oldData?: any): Promise =>\r\n new Promise(async (resolve, reject) => {\r\n if (oldData) {\r\n try {\r\n if (newData.parameter?.code === ParametreCode.TVA) {\r\n newData.value = newData.value.trim();\r\n if (R.isEmpty(newData.value)) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('MANDATORY_VAT', 'TVA-ul este obligatoriu!'), {\r\n variant: 'warning'\r\n });\r\n reject();\r\n } \r\n }\r\n if (newData.parameter?.code === ParametreCode.CURRENCY) {\r\n newData.value = newData.value.trim();\r\n if (R.isEmpty(newData.value)) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('MANDATORY_CURRENCY', 'Moneda este obligatorie!'), {\r\n variant: 'warning'\r\n });\r\n reject();\r\n } \r\n }\r\n \r\n const items = [...this.state.caseParameters];\r\n\r\n const newItemIndex = items.findIndex((i) => i.id === oldData.id);\r\n\r\n items[newItemIndex].value = newData.value;\r\n\r\n this.setState({ caseParameters: items });\r\n\r\n resolve();\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n }\r\n });\r\n\r\n parametersOnRowDelete = (oldData: any): Promise =>\r\n new Promise(async (resolve, reject) => {\r\n if (oldData) {\r\n try {\r\n // await this.organizationService.RemoveOrganizationBankAccount(oldData.id);\r\n // await this.loadData();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n resolve();\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n }\r\n });\r\n\r\n public renderCarRepairCostParametersTable = () => {\r\n return (\r\n rowData.parameterCode !== 'LANG',\r\n onRowUpdate: (newData: any, oldData?: any) => this.parametersOnRowUpdate(newData, oldData)\r\n }}\r\n components={{\r\n Container: (props) => \r\n }}\r\n />\r\n );\r\n };\r\n\r\n renderForm = () => {\r\n return (\r\n {\r\n this.submitData(e);\r\n }}\r\n >\r\n
\r\n
\r\n
\r\n {this.translatorService.Tranlate('CAR_REPAIR_COST_PARAMETERS', 'Parametri')}\r\n
\r\n\r\n {!this.state.isLoading ? this.renderCarRepairCostParametersTable() : null}\r\n
\r\n\r\n
\r\n {!this.state.isLoading ? this.renderTariffGroupTypes() : null}\r\n
\r\n
\r\n\r\n \r\n {this.translatorService.Tranlate('SAVE', 'Salveaza')}\r\n \r\n \r\n );\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ?
{this.renderForm()}
: null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalCaseDetailsCaseTabCarRepairCostFormProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app\r\n }),\r\n CaseSettingsActionCreators,\r\n mergeProps\r\n)(withSnackbar(CaseDetailsCaseTabCarRepairCostForm as any));\r\n","import { ReportParameter } from '../../../interfaces/Reports';\r\n\r\nexport enum ControlType {\r\n STRING = 'string',\r\n NUMBER = 'number',\r\n DATE = 'date',\r\n BOOLEAN = 'boolean',\r\n PERSONAL_DATA = 'personal_data',\r\n ORIGINAL_COPY = 'original_copy'\r\n}\r\n\r\nexport interface ReportParameterExtended extends ReportParameter {\r\n label: string;\r\n type: ControlType;\r\n onlyForDisplay?: boolean;\r\n onlyForDisplayEditable?: boolean;\r\n notMandatory?: boolean;\r\n}\r\n\r\nexport interface ReportParametersGroup {\r\n name: string;\r\n label: string;\r\n parameters: ReportParameterExtended[];\r\n}\r\nexport interface State {\r\n header: ReportParametersGroup;\r\n seller: ReportParametersGroup;\r\n buyer: ReportParametersGroup;\r\n vehicle: ReportParametersGroup;\r\n price: ReportParametersGroup;\r\n others: ReportParametersGroup;\r\n footer: ReportParametersGroup;\r\n}\r\n\r\nexport const initialStateValue: State = {\r\n header: {\r\n name: 'header',\r\n label: 'Antet',\r\n parameters: [\r\n {\r\n label: 'Organ fiscal',\r\n name: 'A_Name',\r\n value: '',\r\n type: ControlType.STRING,\r\n notMandatory: true\r\n },\r\n {\r\n label: 'CIF/Cod SIRUTA',\r\n name: 'A_CIF_SIRUTA',\r\n value: '',\r\n type: ControlType.STRING,\r\n notMandatory: true\r\n },\r\n {\r\n label: 'Adresa',\r\n name: 'A_Address',\r\n value: '',\r\n type: ControlType.STRING,\r\n notMandatory: true\r\n },\r\n {\r\n label: 'Tel/fax/e-mail',\r\n name: 'A_Tel_Fax_Email',\r\n value: '',\r\n type: ControlType.STRING,\r\n notMandatory: true\r\n },\r\n {\r\n label: 'REMTII Nr.',\r\n name: 'A_REMTII_Number',\r\n value: '',\r\n type: ControlType.STRING,\r\n notMandatory: true\r\n },\r\n {\r\n label: 'REMTII Data',\r\n name: 'A_REMTII_Date',\r\n value: '',\r\n type: ControlType.DATE,\r\n notMandatory: true\r\n },\r\n {\r\n label: 'REMTII Rol nr.',\r\n name: 'A_REMTII_Role_Number',\r\n value: '',\r\n type: ControlType.STRING,\r\n notMandatory: true\r\n },\r\n {\r\n label: 'Original/copie',\r\n name: 'A_REMTII_Is_Original',\r\n value: '',\r\n type: ControlType.ORIGINAL_COPY,\r\n notMandatory: true\r\n },\r\n {\r\n label: 'Organ fiscal',\r\n name: 'B_Name',\r\n value: '',\r\n type: ControlType.STRING,\r\n notMandatory: true\r\n },\r\n {\r\n label: 'Functia',\r\n name: 'B_Position',\r\n value: '',\r\n type: ControlType.STRING,\r\n notMandatory: true\r\n },\r\n {\r\n label: 'Nume',\r\n name: 'B_FirstName',\r\n value: '',\r\n type: ControlType.STRING,\r\n notMandatory: true\r\n },\r\n {\r\n label: 'Prenume',\r\n name: 'B_LastName',\r\n value: '',\r\n type: ControlType.STRING,\r\n notMandatory: true\r\n }\r\n ]\r\n },\r\n seller: {\r\n name: 'seller',\r\n label: 'Vanzator',\r\n parameters: [\r\n {\r\n label: 'Tip vanzator',\r\n name: 'Seller_Type',\r\n value: '',\r\n type: ControlType.STRING,\r\n onlyForDisplay: true\r\n },\r\n {\r\n label: 'Nume/Nume companie',\r\n name: 'Seller_Name_Company',\r\n value: '',\r\n type: ControlType.STRING,\r\n onlyForDisplay: true\r\n },\r\n {\r\n label: 'Domiciliu/Sediu',\r\n name: 'Seller_Address',\r\n value: '',\r\n type: ControlType.STRING,\r\n onlyForDisplay: true\r\n },\r\n {\r\n label: 'Date personale',\r\n name: 'Seller_ID',\r\n value: '',\r\n type: ControlType.PERSONAL_DATA\r\n },\r\n {\r\n label: 'CNP/CIF',\r\n name: 'Seller_PIN_CIF',\r\n value: '',\r\n type: ControlType.STRING,\r\n onlyForDisplay: true\r\n },\r\n {\r\n label: 'Tel/Fax',\r\n name: 'Seller_Tel_Fax',\r\n value: '',\r\n type: ControlType.STRING,\r\n onlyForDisplay: true\r\n },\r\n {\r\n label: 'Email',\r\n name: 'Seller_Email',\r\n value: '',\r\n type: ControlType.STRING,\r\n onlyForDisplay: true\r\n },\r\n {\r\n label: 'Domiciliu fiscal',\r\n name: 'Seller_Fiscal_Domicile',\r\n value: '',\r\n type: ControlType.STRING\r\n },\r\n {\r\n label: 'Nume reprezentant',\r\n name: 'Seller_Rep_Name',\r\n value: '',\r\n type: ControlType.STRING,\r\n notMandatory: true\r\n },\r\n {\r\n label: 'Date personale reprezentat',\r\n name: 'Seller_Rep_ID',\r\n value: '',\r\n type: ControlType.PERSONAL_DATA,\r\n notMandatory: true\r\n },\r\n {\r\n label: 'CIF reprezentant',\r\n name: 'Seller_Rep_CIF',\r\n value: '',\r\n type: ControlType.STRING,\r\n notMandatory: true\r\n },\r\n {\r\n label: 'Tel/Fax reprezentant',\r\n name: 'Seller_Rep_Tel_Fax',\r\n value: '',\r\n type: ControlType.STRING,\r\n notMandatory: true\r\n },\r\n {\r\n label: 'Email reprezentant',\r\n name: 'Seller_Rep_Email',\r\n value: '',\r\n type: ControlType.STRING,\r\n notMandatory: true\r\n }\r\n ]\r\n },\r\n buyer: {\r\n name: 'buyer',\r\n label: 'Cumparator',\r\n parameters: [\r\n {\r\n label: 'Tip cumparator',\r\n name: 'Buyer_Type',\r\n value: '',\r\n type: ControlType.STRING,\r\n onlyForDisplay: true\r\n },\r\n {\r\n label: 'Nume/Nume companie',\r\n name: 'Buyer_Name_Company',\r\n value: '',\r\n type: ControlType.STRING,\r\n onlyForDisplay: true\r\n },\r\n {\r\n label: 'Domiciliu/Sediu',\r\n name: 'Buyer_Address',\r\n value: '',\r\n type: ControlType.STRING,\r\n onlyForDisplay: true\r\n },\r\n {\r\n label: 'Date personale',\r\n name: 'Buyer_ID',\r\n value: '',\r\n type: ControlType.PERSONAL_DATA\r\n },\r\n {\r\n label: 'CNP/CIF',\r\n name: 'Buyer_PIN_CIF',\r\n value: '',\r\n type: ControlType.STRING,\r\n onlyForDisplay: true\r\n },\r\n {\r\n label: 'Tel/Fax',\r\n name: 'Buyer_Tel_Fax',\r\n value: '',\r\n type: ControlType.STRING,\r\n onlyForDisplay: true\r\n },\r\n {\r\n label: 'Email',\r\n name: 'Buyer_Email',\r\n value: '',\r\n type: ControlType.STRING,\r\n onlyForDisplay: true\r\n },\r\n {\r\n label: 'Domiciliu fiscal',\r\n name: 'Buyer_Fiscal_Domicile',\r\n value: '',\r\n type: ControlType.STRING\r\n },\r\n {\r\n label: 'Nume reprezentant',\r\n name: 'Buyer_Rep_Name',\r\n value: '',\r\n type: ControlType.STRING,\r\n notMandatory: true\r\n },\r\n {\r\n label: 'Date personale reprezentat',\r\n name: 'Buyer_Rep_ID',\r\n value: '',\r\n type: ControlType.PERSONAL_DATA,\r\n notMandatory: true\r\n },\r\n {\r\n label: 'CIF reprezentant',\r\n name: 'Buyer_Rep_CIF',\r\n value: '',\r\n type: ControlType.STRING,\r\n notMandatory: true\r\n },\r\n {\r\n label: 'Tel/Fax reprezentant',\r\n name: 'Buyer_Rep_Tel_Fax',\r\n value: '',\r\n type: ControlType.STRING,\r\n notMandatory: true\r\n },\r\n {\r\n label: 'Email reprezentant',\r\n name: 'Buyer_Rep_Email',\r\n value: '',\r\n type: ControlType.STRING,\r\n notMandatory: true\r\n }\r\n ]\r\n },\r\n vehicle: {\r\n name: 'vehicle',\r\n label: 'Vehicul',\r\n parameters: [\r\n {\r\n label: 'Marca',\r\n name: 'Vehicle_Brand',\r\n value: '',\r\n type: ControlType.STRING,\r\n onlyForDisplay: true\r\n },\r\n {\r\n label: 'Model',\r\n name: 'Vehicle_Model',\r\n value: '',\r\n type: ControlType.STRING,\r\n onlyForDisplay: true\r\n },\r\n {\r\n label: 'VIN',\r\n name: 'Vehicle_VIN',\r\n value: '',\r\n type: ControlType.STRING,\r\n onlyForDisplay: true\r\n },\r\n {\r\n label: 'Serie Motor',\r\n name: 'Engine_Serial_Number',\r\n value: '',\r\n type: ControlType.STRING\r\n },\r\n {\r\n label: 'Capacitate cilindrica',\r\n name: 'Engine_Size',\r\n value: '',\r\n type: ControlType.STRING,\r\n onlyForDisplay: true\r\n },\r\n {\r\n label: 'Greutate maxima',\r\n name: 'Maximum_Weight',\r\n value: '',\r\n type: ControlType.NUMBER\r\n },\r\n {\r\n label: 'Numar inmatriculare',\r\n name: 'Plate_Number',\r\n value: '',\r\n type: ControlType.STRING,\r\n onlyForDisplay: true\r\n },\r\n {\r\n label: 'Data expirare revizie',\r\n name: 'Next_PTI_Date',\r\n value: '',\r\n type: ControlType.DATE\r\n },\r\n {\r\n label: 'Numar CIV',\r\n name: 'ID_CIV_Number',\r\n value: '',\r\n type: ControlType.STRING\r\n },\r\n {\r\n label: 'An fabricatie',\r\n name: 'Make_Year',\r\n value: '',\r\n type: ControlType.STRING,\r\n onlyForDisplay: true\r\n },\r\n {\r\n label: 'Norma poluare',\r\n name: 'Pollution_Norm',\r\n value: '',\r\n type: ControlType.STRING,\r\n onlyForDisplay: true\r\n },\r\n {\r\n label: 'Data dobandirii',\r\n name: 'Purchase_Date',\r\n value: '',\r\n type: ControlType.DATE\r\n },\r\n {\r\n label: 'Numar act dobandire',\r\n name: 'Purchase_Doc_Number',\r\n value: '',\r\n type: ControlType.STRING\r\n },\r\n {\r\n label: 'Data act dobandire',\r\n name: 'Purchase_Doc_Date',\r\n value: '',\r\n type: ControlType.DATE\r\n }\r\n ]\r\n },\r\n price: {\r\n name: 'price',\r\n label: 'Pret',\r\n parameters: [\r\n {\r\n label: 'Pret in RON',\r\n name: 'Price_Ron',\r\n value: '',\r\n type: ControlType.STRING,\r\n onlyForDisplay: true\r\n },\r\n {\r\n label: 'Pret in litere',\r\n name: 'Price_Ron_Words',\r\n value: '',\r\n type: ControlType.STRING\r\n }\r\n ]\r\n },\r\n others: {\r\n name: 'others',\r\n label: 'Altele',\r\n parameters: [\r\n {\r\n label: 'Anexe',\r\n name: 'Has_Appendix',\r\n value: '',\r\n type: ControlType.BOOLEAN\r\n },\r\n {\r\n label: 'Data contract',\r\n name: 'Signing_Date',\r\n value: '',\r\n type: ControlType.DATE\r\n },\r\n {\r\n label: 'Loc contract',\r\n name: 'Signing_Location',\r\n value: '',\r\n type: ControlType.STRING\r\n }\r\n ]\r\n },\r\n footer: {\r\n name: 'footer',\r\n label: 'Subsol',\r\n parameters: [\r\n {\r\n label: 'Organ fiscal',\r\n name: 'C_Name',\r\n value: '',\r\n type: ControlType.STRING,\r\n notMandatory: true\r\n },\r\n {\r\n label: 'CIF/Cod SIRUTA',\r\n name: 'C_CIF_SIRUTA',\r\n value: '',\r\n type: ControlType.STRING,\r\n notMandatory: true\r\n },\r\n {\r\n label: 'Adresa',\r\n name: 'C_Address',\r\n value: '',\r\n type: ControlType.STRING,\r\n notMandatory: true\r\n },\r\n {\r\n label: 'Tel/fax/e-mail',\r\n name: 'C_Tel_Fax_Email',\r\n value: '',\r\n type: ControlType.STRING,\r\n notMandatory: true\r\n },\r\n {\r\n label: 'REMTII Nr.',\r\n name: 'C_REMTII_Number',\r\n value: '',\r\n type: ControlType.STRING,\r\n notMandatory: true\r\n },\r\n {\r\n label: 'REMTII Data',\r\n name: 'C_REMTII_Date',\r\n value: '',\r\n type: ControlType.DATE,\r\n notMandatory: true\r\n },\r\n {\r\n label: 'Functia',\r\n name: 'D_Position',\r\n value: '',\r\n type: ControlType.STRING,\r\n notMandatory: true\r\n },\r\n {\r\n label: 'Nume',\r\n name: 'D_FirstName',\r\n value: '',\r\n type: ControlType.STRING,\r\n notMandatory: true\r\n },\r\n {\r\n label: 'Prenume',\r\n name: 'D_LastName',\r\n value: '',\r\n type: ControlType.STRING,\r\n notMandatory: true\r\n }\r\n ]\r\n }\r\n};\r\n","export enum AttachmentTypeIdEnum {\r\n CONTRACT = 31\r\n}\r\n","import React, { useContext, useEffect, useMemo, useState } from 'react';\r\nimport {\r\n Button,\r\n Dialog,\r\n DialogTitle,\r\n FormControl,\r\n FormHelperText,\r\n Grid,\r\n IconButton,\r\n InputLabel,\r\n MenuItem,\r\n Paper,\r\n Select,\r\n Typography\r\n} from '@material-ui/core';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport { ApplicationContext } from '../../../context/Contexts';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport { AttachmentTypeCode, ReportTypeCode } from '../../../helpers/Constants';\r\nimport FileSaver from 'file-saver';\r\nimport isNil from 'lodash/isNil';\r\nimport { DatePicker, MuiPickersUtilsProvider } from '@material-ui/pickers';\r\nimport moment from 'moment';\r\nimport MomentUtils from '@date-io/moment';\r\nimport { MaterialUiPickersDate } from '@material-ui/pickers/typings/date';\r\nimport { useSelector } from 'react-redux';\r\nimport {\r\n ControlType,\r\n initialStateValue,\r\n ReportParameterExtended,\r\n State\r\n} from './initialStateValue';\r\nimport { ReportParameter } from '../../../interfaces/Reports';\r\nimport { CaseAttachment, CaseClient } from '../../../interfaces/Case';\r\nimport { AttachmentTypeIdEnum } from '../../../enums/AttachmentTypeIdEnum';\r\nimport { VehicleOffer } from '../../../interfaces/Vehicle';\r\nimport Loader from '../../Loader';\r\nimport cloneDeep from 'lodash/cloneDeep';\r\n\r\nclass LocalizedUtils extends MomentUtils {\r\n // dateFormat = \"DD MM YYYY\";\r\n}\r\n\r\ninterface Props {\r\n isOpen: boolean;\r\n offer?: VehicleOffer;\r\n price?: number;\r\n isSaleOfferType: boolean;\r\n handleClose(): void;\r\n}\r\n\r\nconst personalDataType = ['B.I.', 'C.I', 'C.I.P', 'Pasaport'];\r\n\r\nconst booleanType = ['Da', 'Nu'];\r\n\r\nconst originalCopyType = ['Original', 'Copie'];\r\n\r\nconst ContractModal: React.FC = ({ isOpen, handleClose, offer, isSaleOfferType, price }) => {\r\n const context = useContext(ApplicationContext);\r\n\r\n const reduxState = useSelector((state: any) => state);\r\n\r\n const [state, setState] = useState();\r\n const [requiredFields, setRequiredFields] = useState([]);\r\n\r\n const {\r\n app: { dateFormat, language }\r\n } = reduxState;\r\n\r\n useEffect(() => {\r\n const getVehicle = async () => {\r\n const vehicleId = reduxState.caseSettings.case.vehicleId;\r\n if (!isNil(vehicleId)) {\r\n const vehicle = await context.vehicleService.GetVehicle(vehicleId);\r\n // TODO read from backend based on caseClientHistoryId\r\n const caseClient = reduxState.caseSettings.case.caseClient as CaseClient;\r\n const organizationId = reduxState.app.appUser.organizationId;\r\n const organization = await context.organizationService.GetOrganization(organizationId);\r\n\r\n const personIsCompany = caseClient.personType?.name === 'PJ';\r\n\r\n const data = cloneDeep(initialStateValue) as State;\r\n\r\n const otherParameters = [...data.others.parameters];\r\n const priceParamaters = [...data.price.parameters];\r\n const vehicleParameters = [...data.vehicle.parameters];\r\n let buyerParameters = personIsCompany\r\n ? [...data.buyer.parameters.filter((p) => p.name !== 'Buyer_ID')]\r\n : [...data.buyer.parameters];\r\n let sellerParameters = personIsCompany\r\n ? [...data.seller.parameters.filter((p) => p.name !== 'Seller_ID')]\r\n : [...data.seller.parameters];\r\n\r\n if (vehicle) {\r\n setParameterValue(vehicleParameters, 'Vehicle_Brand', vehicle.make?.name || '');\r\n setParameterValue(vehicleParameters, 'Vehicle_Model', vehicle.model?.name || '');\r\n setParameterValue(vehicleParameters, 'Vehicle_VIN', vehicle.vin || '');\r\n setParameterValue(vehicleParameters, 'Engine_Size', vehicle.engineSize?.toString() || '');\r\n setParameterValue(vehicleParameters, 'Plate_Number', vehicle.plateNumber || '');\r\n setParameterValue(\r\n vehicleParameters,\r\n 'Make_Year',\r\n vehicle.makeDate ? moment(vehicle.makeDate).format(dateFormat.toUpperCase()) : ''\r\n );\r\n setParameterValue(\r\n vehicleParameters,\r\n 'Pollution_Norm',\r\n vehicle.pollutionNorm?.displayName || ''\r\n );\r\n }\r\n\r\n if (isSaleOfferType) {\r\n if (caseClient) {\r\n setParameterValue(buyerParameters, 'Buyer_Type', caseClient.personType?.name || '');\r\n setParameterValue(\r\n buyerParameters,\r\n 'Buyer_Name_Company',\r\n caseClient.companyName || `${caseClient.firstName} ${caseClient.lastName}`\r\n );\r\n setParameterValue(\r\n buyerParameters,\r\n 'Buyer_Address',\r\n `${caseClient.address || ''}${caseClient.city ? ', ' + caseClient.city : ''}` || ''\r\n );\r\n setParameterValue(\r\n buyerParameters,\r\n 'Buyer_PIN_CIF',\r\n personIsCompany ? caseClient.companyNumber || '' : caseClient.pin || ''\r\n );\r\n setParameterValue(buyerParameters, 'Buyer_Tel_Fax', caseClient.phone || '');\r\n setParameterValue(buyerParameters, 'Buyer_Email', caseClient.email || '');\r\n if (personIsCompany) {\r\n buyerParameters = buyerParameters.filter((p) => p.name !== 'Buyer_ID');\r\n }\r\n }\r\n\r\n if (organization) {\r\n setParameterValue(sellerParameters, 'Seller_Type', 'PJ' || '');\r\n setParameterValue(sellerParameters, 'Seller_Name_Company', organization.fullName || '');\r\n setParameterValue(\r\n sellerParameters,\r\n 'Seller_Address',\r\n `${organization.address || ''}${organization.city ? ', ' + organization.city : ''}` ||\r\n ''\r\n );\r\n setParameterValue(sellerParameters, 'Seller_PIN_CIF', organization.companyNumber || '');\r\n setParameterValue(sellerParameters, 'Seller_Tel_Fax', organization.phone || '');\r\n setParameterValue(sellerParameters, 'Seller_Email', organization.email || '');\r\n sellerParameters = sellerParameters.filter((p) => p.name !== 'Seller_ID');\r\n }\r\n } else {\r\n if (caseClient) {\r\n setParameterValue(sellerParameters, 'Seller_Type', caseClient.personType?.name || '');\r\n setParameterValue(\r\n sellerParameters,\r\n 'Seller_Name_Company',\r\n caseClient.companyName || `${caseClient.firstName} ${caseClient.lastName}`\r\n );\r\n setParameterValue(\r\n sellerParameters,\r\n 'Seller_Address',\r\n `${caseClient.address || ''}${caseClient.city ? ', ' + caseClient.city : ''}` || ''\r\n );\r\n setParameterValue(\r\n sellerParameters,\r\n 'Seller_PIN_CIF',\r\n personIsCompany ? caseClient.companyNumber || '' : caseClient.pin || ''\r\n );\r\n setParameterValue(sellerParameters, 'Seller_Tel_Fax', caseClient.phone || '');\r\n setParameterValue(sellerParameters, 'Seller_Email', caseClient.email || '');\r\n if (personIsCompany) {\r\n sellerParameters = sellerParameters.filter((p) => p.name !== 'Seller_ID');\r\n }\r\n }\r\n\r\n if (organization) {\r\n setParameterValue(buyerParameters, 'Buyer_Type', 'PJ' || '');\r\n setParameterValue(buyerParameters, 'Buyer_Name_Company', organization.fullName || '');\r\n setParameterValue(\r\n buyerParameters,\r\n 'Buyer_Address',\r\n `${organization.address || ''}${organization.city ? ', ' + organization.city : ''}` ||\r\n ''\r\n );\r\n setParameterValue(buyerParameters, 'Buyer_PIN_CIF', organization.companyNumber || '');\r\n setParameterValue(buyerParameters, 'Buyer_Tel_Fax', organization.phone || '');\r\n setParameterValue(buyerParameters, 'Buyer_Email', organization.email || '');\r\n buyerParameters = buyerParameters.filter((p) => p.name !== 'Buyer_ID');\r\n }\r\n }\r\n\r\n setParameterValue(\r\n otherParameters,\r\n 'Signing_Date',\r\n moment().format(dateFormat.toUpperCase())\r\n );\r\n\r\n setParameterValue(priceParamaters, 'Price_Ron', price?.toFixed(2) || '');\r\n // setParameterValue(priceParamaters, 'Price_Ron_Words', price?.toFixed(2) || '');\r\n\r\n setState({\r\n ...data,\r\n buyer: {\r\n ...data.buyer,\r\n parameters: buyerParameters\r\n },\r\n seller: {\r\n ...data.seller,\r\n parameters: sellerParameters\r\n }\r\n });\r\n }\r\n };\r\n\r\n getVehicle();\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, []);\r\n\r\n const handleChange = (groupName: string, name: string, value: string) => {\r\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\r\n //@ts-ignore\r\n const parameters = [...state[groupName].parameters];\r\n const param = parameters.find((p) => {\r\n return p.name === name;\r\n });\r\n param.value = value.toString();\r\n if (state) {\r\n setState({\r\n ...state,\r\n [groupName]: {\r\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\r\n //@ts-ignore\r\n ...state[groupName],\r\n parameters\r\n }\r\n });\r\n }\r\n };\r\n\r\n const setParameterValue = (parameters: ReportParameter[], name: string, value: string) => {\r\n const param = parameters.find((p) => p.name === name);\r\n if (param) {\r\n param.value = value;\r\n }\r\n };\r\n\r\n const handleSubmit = async () => {\r\n if (!state) {\r\n return;\r\n }\r\n\r\n const reportParametersExtended: ReportParameterExtended[] = [\r\n ...state.header.parameters,\r\n ...state.seller.parameters,\r\n ...state.buyer.parameters,\r\n ...state.price.parameters,\r\n ...state.vehicle.parameters,\r\n ...state.others.parameters,\r\n ...state.footer.parameters\r\n ];\r\n\r\n const requiredParameters = reportParametersExtended\r\n .filter((p) => !p.notMandatory && !p.onlyForDisplay && !p.value)\r\n .map((p) => p.name);\r\n\r\n if (requiredParameters.length) {\r\n setRequiredFields(requiredParameters);\r\n return;\r\n }\r\n\r\n const reportParameters: ReportParameter[] = reportParametersExtended\r\n .filter((p) => p.value && !p.onlyForDisplay && p.type !== ControlType.PERSONAL_DATA)\r\n .map(({ name, value }) => {\r\n return { name, value: value.trim() };\r\n });\r\n\r\n const personalDataParams = reportParametersExtended.filter(\r\n (p) => p.type === ControlType.PERSONAL_DATA\r\n );\r\n\r\n for (const p of personalDataParams) {\r\n const values = p.value.split(',');\r\n\r\n reportParameters.push({\r\n name: `${p.name}_Type`,\r\n value: values[0]\r\n });\r\n reportParameters.push({\r\n name: `${p.name}_Series`,\r\n value: values[1]\r\n });\r\n reportParameters.push({\r\n name: `${p.name}_Number`,\r\n value: values[2]\r\n });\r\n }\r\n\r\n reportParameters.push({\r\n name: 'IsSaleContract',\r\n value: isSaleOfferType ? 'true' : 'false'\r\n });\r\n\r\n reportParameters.push({\r\n name: 'OrganizationID',\r\n value: reduxState.app.appUser.organizationId.toString()\r\n });\r\n\r\n if (!isNil(offer?.caseClientHistoryId)) {\r\n reportParameters.push({\r\n name: 'CaseClientHistoryID',\r\n value: offer?.caseClientHistoryId.toString() || ''\r\n });\r\n }\r\n\r\n if (!isNil(offer?.id)) {\r\n reportParameters.push({\r\n name: 'VehicleOfferID',\r\n value: offer?.id.toString() || ''\r\n });\r\n }\r\n\r\n // TODO save offer contract date here\r\n\r\n const fileBlob = await context.reportsService.GetReport(\r\n ReportTypeCode.RENAULT_CONTRACT,\r\n reportParameters\r\n );\r\n\r\n const fileName = `Contract-${offer?.id}.pdf`;\r\n\r\n const file = new File([fileBlob], fileName);\r\n\r\n const caseAttachment = {\r\n id: 0,\r\n caseId: reduxState.caseSettings.case.id,\r\n attachmentTypeId: AttachmentTypeIdEnum.CONTRACT,\r\n attachmentType: {\r\n code: AttachmentTypeCode.CONTRACT\r\n },\r\n file,\r\n fileName,\r\n isSelection: true\r\n } as CaseAttachment;\r\n\r\n context.caseService.AddCaseAttachment([caseAttachment]);\r\n\r\n FileSaver.saveAs(fileBlob, fileName);\r\n };\r\n\r\n const getControl = (groupName: string, param: ReportParameterExtended) => {\r\n switch (param.type) {\r\n case ControlType.ORIGINAL_COPY:\r\n return (\r\n
\r\n \r\n {param.label}\r\n handleChange(groupName, param.name, e.target.value)}\r\n name={param.name}\r\n >\r\n {originalCopyType.map((type, index) => (\r\n \r\n {type}\r\n \r\n ))}\r\n \r\n \r\n {requiredFields.includes(param.name)\r\n ? context.translatorService.Tranlate(\r\n 'VALIDATORS_REQUIRED',\r\n 'Campul este obligatoriu'\r\n )\r\n : undefined}\r\n \r\n \r\n
\r\n );\r\n case ControlType.BOOLEAN:\r\n return (\r\n
\r\n \r\n {param.label}\r\n handleChange(groupName, param.name, e.target.value)}\r\n name={param.name}\r\n >\r\n {booleanType.map((type, index) => (\r\n \r\n {type}\r\n \r\n ))}\r\n \r\n \r\n {requiredFields.includes(param.name)\r\n ? context.translatorService.Tranlate(\r\n 'VALIDATORS_REQUIRED',\r\n 'Campul este obligatoriu'\r\n )\r\n : undefined}\r\n \r\n \r\n
\r\n );\r\n case ControlType.PERSONAL_DATA:\r\n const valuesArray = param.value.split(',') || [];\r\n\r\n const id = valuesArray.length ? valuesArray[0] : '';\r\n const series = valuesArray.length > 0 ? valuesArray[1] : '';\r\n const number = valuesArray.length > 1 ? valuesArray[2] : '';\r\n\r\n return (\r\n
\r\n
\r\n \r\n Tip document\r\n {\r\n valuesArray[0] = e.target.value;\r\n handleChange(groupName, param.name, valuesArray.join(','));\r\n }}\r\n name={param.name}\r\n >\r\n {personalDataType.map((type, index) => (\r\n \r\n {type}\r\n \r\n ))}\r\n \r\n \r\n {requiredFields.includes(param.name)\r\n ? context.translatorService.Tranlate(\r\n 'VALIDATORS_REQUIRED',\r\n 'Campul este obligatoriu'\r\n )\r\n : undefined}\r\n \r\n \r\n
\r\n
\r\n {\r\n valuesArray[1] = e.target.value;\r\n handleChange(groupName, param.name, valuesArray.join(','));\r\n }}\r\n error={requiredFields.includes(param.name)}\r\n helperText={\r\n requiredFields.includes(param.name)\r\n ? context.translatorService.Tranlate(\r\n 'VALIDATORS_REQUIRED',\r\n 'Campul este obligatoriu'\r\n )\r\n : undefined\r\n }\r\n name={param.name}\r\n value={series}\r\n label=\"Serie\"\r\n />\r\n
\r\n
\r\n {\r\n valuesArray[2] = e.target.value;\r\n handleChange(groupName, param.name, valuesArray.join(','));\r\n }}\r\n error={requiredFields.includes(param.name)}\r\n helperText={\r\n requiredFields.includes(param.name)\r\n ? context.translatorService.Tranlate(\r\n 'VALIDATORS_REQUIRED',\r\n 'Campul este obligatoriu'\r\n )\r\n : undefined\r\n }\r\n type=\"number\"\r\n name={param.name}\r\n value={number}\r\n label=\"Numar\"\r\n />\r\n
\r\n
\r\n );\r\n case ControlType.DATE:\r\n return (\r\n \r\n \r\n handleChange(\r\n groupName,\r\n param.name,\r\n date ? date.format(dateFormat.toUpperCase()) : ''\r\n )\r\n }\r\n autoOk={true}\r\n />\r\n \r\n );\r\n default:\r\n return (\r\n handleChange(groupName, param.name, e.target.value)}\r\n name={param.name}\r\n value={param.value}\r\n label={param.label}\r\n error={requiredFields.includes(param.name)}\r\n helperText={\r\n requiredFields.includes(param.name)\r\n ? context.translatorService.Tranlate(\r\n 'VALIDATORS_REQUIRED',\r\n 'Campul este obligatoriu'\r\n )\r\n : undefined\r\n }\r\n />\r\n );\r\n }\r\n };\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n \r\n Generare Contract Vanzare-Cumparare\r\n \r\n
\r\n \r\n \r\n \r\n \r\n {!state ? (\r\n \r\n ) : (\r\n
\r\n \r\n {Object.entries(state).map(([key, group]) => {\r\n return (\r\n \r\n
{group.label}
\r\n \r\n {group.parameters.map((param: ReportParameterExtended) => {\r\n return (\r\n \r\n {getControl(group.name, param)}\r\n \r\n );\r\n })}\r\n \r\n
\r\n );\r\n })}\r\n
\r\n \r\n
\r\n
\r\n
\r\n )}\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default ContractModal;\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n ApplicationState,\r\n CaseSettingsState,\r\n AppState,\r\n CaseSettingsActionCreators,\r\n VehicleState\r\n} from '../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { Button, Grid, FormControlLabel, Switch, Divider } from '@material-ui/core';\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { WorkflowSectionStepForm } from '../../interfaces/Workflow';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport { IReferentialService } from '../../services/Interfaces/IReferentialService';\r\nimport {\r\n ParametreCode,\r\n ReferentialCode,\r\n OfferTypeCode,\r\n CurrencyCode,\r\n ReportTypeCode,\r\n Constants,\r\n AttachmentTypeCode,\r\n RenaultGoldList,\r\n PurchaseOriginCode,\r\n renaultMakeCodes,\r\n VehicleStatusCodeEnum\r\n} from '../../helpers/Constants';\r\nimport { AppUser } from '../../interfaces/AppUser';\r\nimport { IAppUserService } from '../../services/Interfaces/IAppUserService';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport Referentials from '../../helpers/Referentials.json';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport { FormHelpers } from '../../helpers/forms/FormHelpers';\r\nimport NumberFormat from 'react-number-format';\r\nimport moment from 'moment';\r\nimport { IVehicleService } from '../../services/Interfaces/IVehicleService';\r\nimport { VehicleOffer } from '../../interfaces/Vehicle';\r\nimport { Utils } from '../../helpers/Utils';\r\nimport { ReportParameter } from '../../interfaces/Reports';\r\nimport { IReportsService } from '../../services/Interfaces/IReportsService';\r\nimport FileSaver from 'file-saver';\r\nimport * as R from 'ramda';\r\nimport { isNullOrUndefined } from 'util';\r\nimport ContractModal from './ContractModal/ContractModal';\r\nimport { CaseTypeCode } from '../../helpers/Constants';\r\nimport { CurrencyEnum } from '../../enums/CurrencyEnum';\r\nimport _ from 'lodash';\r\nimport { CaseAttachment } from '../../interfaces/Case';\r\n\r\ninterface ICaseDetailsCaseTabSaleOfferFormState {\r\n isLoading: boolean;\r\n hasRights: boolean;\r\n executing: boolean;\r\n isUserHidden: boolean;\r\n vehicleOfferData: VehicleOffer;\r\n guaranteeTypes: IReferential[];\r\n offerTypes: IReferential[];\r\n offers: VehicleOffer[];\r\n offerType: IReferential | null;\r\n contractOffer?: VehicleOffer;\r\n contractPrice?: number;\r\n contractModalOpened: boolean;\r\n displaySecondCurrency: boolean;\r\n purchaseOrigins: IReferential[];\r\n saleChannels: IReferential[];\r\n makes: IReferential[];\r\n attachType: IReferential;\r\n}\r\n\r\nexport interface ExternalCaseDetailsCaseTabSaleOfferFormProps {\r\n workflowForm: WorkflowSectionStepForm;\r\n isSaleOfferType: boolean;\r\n}\r\n\r\ntype ICaseDetailsCaseTabSaleOfferFormProps = ExternalCaseDetailsCaseTabSaleOfferFormProps & {\r\n caseSettingsState: CaseSettingsState;\r\n appState: AppState;\r\n vehicleState: VehicleState;\r\n} & typeof CaseSettingsActionCreators &\r\n ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass CaseDetailsCaseTabSaleOfferForm extends React.PureComponent<\r\n ICaseDetailsCaseTabSaleOfferFormProps,\r\n ICaseDetailsCaseTabSaleOfferFormState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private caseService!: ICaseService;\r\n private vehicleService!: IVehicleService;\r\n private appReferentialService!: IReferentialService;\r\n private appUserService!: IAppUserService;\r\n private reportService!: IReportsService;\r\n private checkIfCurrencyIsEurOrRon: boolean =\r\n this.props.caseSettingsState.case!.caseParameters.find(\r\n (p) => p.parameter!.code === ParametreCode.CURRENCY\r\n )!.value == CurrencyCode.EUR ||\r\n this.props.caseSettingsState.case!.caseParameters.find(\r\n (p) => p.parameter!.code === ParametreCode.CURRENCY\r\n )!.value == CurrencyCode.RON;\r\n static contextType = ApplicationContext;\r\n state = {\r\n isLoading: true,\r\n hasRights: false,\r\n executing: false,\r\n isUserHidden: false,\r\n guaranteeTypes: [] as IReferential[],\r\n offerTypes: [],\r\n offers: [],\r\n offerType: null,\r\n contractModalOpened: false,\r\n currencyRates: [],\r\n displaySecondCurrency: this.checkIfCurrencyIsEurOrRon,\r\n vehicleOfferData: {\r\n id: 0,\r\n caseId: this.props.caseSettingsState.case!.id,\r\n vehicleId: this.props.caseSettingsState.case!.vehicleId,\r\n comments: '',\r\n damageValue: 0,\r\n newVin: '',\r\n offerValue: 0,\r\n offerValueWithVAT: 0,\r\n priceValue: 0,\r\n tradeInValue: 0,\r\n vatValue: 0,\r\n withNewVehicle: this.props.isSaleOfferType,\r\n currency: this.props.caseSettingsState.case!.caseParameters.find(\r\n (p) => p.parameter!.code === ParametreCode.CURRENCY\r\n )!.value,\r\n currencyRate: Utils.GetCurrencyRate(\r\n this.props.appState.currencyRates,\r\n this.props.caseSettingsState.case!.caseParameters.find(\r\n (p) => p.parameter!.code === ParametreCode.CURRENCY\r\n )!.value == CurrencyCode.RON\r\n ? CurrencyCode.EUR\r\n : this.props.caseSettingsState.case!.caseParameters.find(\r\n (p) => p.parameter!.code === ParametreCode.CURRENCY\r\n )!.value\r\n ),\r\n secondCurrency: this.checkIfCurrencyIsEurOrRon\r\n ? this.props.caseSettingsState.case!.caseParameters.find(\r\n (p) => p.parameter!.code === ParametreCode.CURRENCY\r\n )!.value == CurrencyCode.EUR\r\n ? CurrencyCode.RON\r\n : CurrencyCode.EUR\r\n : null,\r\n secondOfferValue: this.checkIfCurrencyIsEurOrRon ? 0 : null,\r\n secondOfferVatAmount: this.checkIfCurrencyIsEurOrRon ? 0 : null,\r\n secondOfferValueWithVAT: this.checkIfCurrencyIsEurOrRon ? 0 : null\r\n } as VehicleOffer,\r\n purchaseOrigins: [] as IReferential[],\r\n saleChannels: [] as IReferential[],\r\n makes: [] as IReferential[],\r\n attachType: {} as IReferential\r\n } as ICaseDetailsCaseTabSaleOfferFormState;\r\n\r\n public componentDidMount() {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (R.isNil(caseSettings) || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n // let caseParametersList = this.props.caseSettingsState.case!.caseParameters;\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadCaseSaleOfferForm();\r\n if (!this.props.appState.currencyRates.length) {\r\n await this.getCurrencyRates();\r\n }\r\n }\r\n );\r\n }\r\n\r\n closeContractModal = () => {\r\n this.setState({\r\n contractModalOpened: false\r\n });\r\n };\r\n\r\n getCurrencyRates = async () => {\r\n const rates = await this.vehicleService.GetCurrencyRates();\r\n this.props.appState.currencyRates = rates;\r\n console.log('currencyRates', this.props.appState.currencyRates);\r\n this.setState({\r\n vehicleOfferData: {\r\n ...this.state.vehicleOfferData,\r\n currencyRate: Utils.GetCurrencyRate(\r\n this.props.appState.currencyRates,\r\n this.props.caseSettingsState.case!.caseParameters.find(\r\n (p) => p.parameter!.code === ParametreCode.CURRENCY\r\n )!.value == CurrencyCode.RON\r\n ? CurrencyCode.EUR\r\n : this.props.caseSettingsState.case!.caseParameters.find(\r\n (p) => p.parameter!.code === ParametreCode.CURRENCY\r\n )!.value\r\n )\r\n }\r\n });\r\n };\r\n\r\n openContractModal = async (contractOffer: VehicleOffer, contractPrice: number) => {\r\n const caseContractAttachments = await this.caseService.GetCaseAttachments(\r\n this.props.caseSettingsState.case!.id,\r\n [AttachmentTypeCode.CONTRACT]\r\n );\r\n\r\n const fileName = `Contract-${contractOffer.id}.pdf`;\r\n const attachment = caseContractAttachments.find((a) => a.originalFileName === fileName);\r\n\r\n if (!caseContractAttachments || !caseContractAttachments.length || !attachment) {\r\n this.setState({\r\n contractModalOpened: true,\r\n contractPrice,\r\n contractOffer\r\n });\r\n } else {\r\n if (attachment) {\r\n const attachmentBlob = await this.caseService.GetCaseAttachment(attachment.fileName);\r\n\r\n FileSaver.saveAs(attachmentBlob, attachment.originalFileName);\r\n if (this.props.caseSettingsState.caseSettings!.workflow.saveDocuments) {\r\n const documentName = `Contract_${contractOffer.id}.pdf`;\r\n console.log('Save file', fileName, 'Id Contract', contractOffer.id);\r\n await this.saveGeneratedFile(attachmentBlob, documentName);\r\n }\r\n } else {\r\n throw Error(`Attachment ${fileName}`);\r\n }\r\n }\r\n };\r\n\r\n getCurrentCurrency = (): string => {\r\n return this.props.caseSettingsState.case!.caseParameters.find(\r\n (p) => p.parameter!.code === ParametreCode.CURRENCY\r\n )!.value;\r\n };\r\n\r\n getVATValue = (price: number, vat: number): number => {\r\n return Number.parseFloat((price * (vat / 100)).toFixed(2));\r\n };\r\n\r\n getPriceWithVAT = (price: number, vat: number) => {\r\n const vatValue = this.getVATValue(price, vat);\r\n return Number.parseFloat((price + vatValue).toFixed(2));\r\n };\r\n\r\n getReverseVatValue = (price: number, vat: number): number => {\r\n return Number.parseFloat(((price / (1 + vat / 100) - price) * -1).toFixed(2));\r\n };\r\n\r\n getPriceWithoutVAT = (price: number, vat: number) => {\r\n const offerTypeCode = this.props.caseSettingsState?.case?.caseType?.code;\r\n\r\n const vehicleHasNoVAT =\r\n offerTypeCode === CaseTypeCode.SALE && this.props.vehicleState.vehicle?.purchaseVatRate === 0;\r\n\r\n const purchasePrice = (this.props.vehicleState?.vehicle?.purchasePrice as number) || 0;\r\n\r\n const vatValue = !vehicleHasNoVAT\r\n ? this.getReverseVatValue(price, vat)\r\n : Utils.getMarginVat(price, +purchasePrice, vat);\r\n\r\n return Number.parseFloat((price - vatValue).toFixed(2));\r\n };\r\n\r\n getOfferPriceWithoutVAT = (offerPrice: number): number => {\r\n const offerTypeCode = this.props.caseSettingsState?.case?.caseType?.code;\r\n\r\n const vehicleHasNoVAT =\r\n offerTypeCode === CaseTypeCode.SALE && this.props.vehicleState.vehicle?.purchaseVatRate === 0;\r\n\r\n const purchasePrice = (this.props.vehicleState?.vehicle?.purchasePrice as number) || 0;\r\n\r\n const caseParameters = this.props.caseSettingsState.case!.caseParameters;\r\n const vatParameter = caseParameters.filter(\r\n (parameter) => parameter.parameter!.code === ParametreCode.TVA\r\n );\r\n const vat = parseFloat(vatParameter[0]!.value);\r\n\r\n const vatValue = !vehicleHasNoVAT\r\n ? this.getReverseVatValue(offerPrice, vat)\r\n : Utils.getMarginVat(offerPrice, +purchasePrice, vat);\r\n\r\n return Number.parseFloat((offerPrice - vatValue).toFixed(2));\r\n };\r\n\r\n getVATFromOfferPrice = () => {\r\n const offerTypeCode = this.props.caseSettingsState?.case?.caseType?.code;\r\n\r\n const vehicleHasNoVAT =\r\n offerTypeCode === CaseTypeCode.SALE && this.props.vehicleState.vehicle?.purchaseVatRate === 0;\r\n\r\n const purchasePrice = (this.props.vehicleState?.vehicle?.purchasePrice as number) || 0;\r\n\r\n const offerPrice = this.state.vehicleOfferData.offerValueWithVAT;\r\n const caseParameters = this.props.caseSettingsState.case!.caseParameters;\r\n const vatParameter = caseParameters.filter(\r\n (parameter) => parameter.parameter!.code === ParametreCode.TVA\r\n );\r\n\r\n const vat = parseFloat(vatParameter[0]!.value);\r\n\r\n if (!vehicleHasNoVAT) {\r\n const offerPriceWithoutVAT = offerPrice / (1 + vat / 100);\r\n\r\n return Number.parseFloat((offerPriceWithoutVAT * (vat / 100)).toFixed(2));\r\n }\r\n\r\n return Utils.getMarginVat(offerPrice, purchasePrice, vat);\r\n };\r\n\r\n getValuationPrice = (caseHasVAT: boolean) => {\r\n const caseValuation = this.props.caseSettingsState.case?.caseValuation;\r\n let valuationValue = caseValuation\r\n ? this.props.isSaleOfferType\r\n ? this.props.caseSettingsState.case!.caseValuation?.offerPrice || 0\r\n : this.props.caseSettingsState.case!.caseValuation?.tradeInPrice || 0\r\n : 0;\r\n\r\n const caseValuationVatValue = caseValuation?.vatRate || 0;\r\n\r\n if (!caseHasVAT) {\r\n valuationValue = Utils.getPriceWithoutVat(valuationValue, caseValuationVatValue);\r\n }\r\n\r\n return Utils.ConvertCurrency(\r\n this.props.appState.currencyRates,\r\n CurrencyCode.EUR,\r\n this.state.vehicleOfferData.currency,\r\n valuationValue\r\n );\r\n };\r\n\r\n setStatePriceAndVAT = () => {\r\n const caseParameters = this.props.caseSettingsState.case!.caseParameters;\r\n const vatParameter = caseParameters.filter(\r\n (parameter) => parameter.parameter!.code === ParametreCode.TVA\r\n );\r\n\r\n const vatValue = +vatParameter[0]?.value || 0;\r\n const caseHasNoVAT = vatValue === 0;\r\n\r\n const tradeInValue = this.getValuationPrice(!caseHasNoVAT);\r\n this.setState({\r\n vehicleOfferData: {\r\n ...this.state.vehicleOfferData,\r\n offerType: this.state.offerType,\r\n offerTypeId: this.state.offerType!.id,\r\n tradeInValue,\r\n damageValue: this.getDamageValue(),\r\n offerValue: 0,\r\n offerValueWithVAT: this.getPriceWithVAT(0, vatValue),\r\n priceValue: Number.parseFloat(\r\n (this.getPriceWithoutVAT(tradeInValue, vatValue) - this.getDamageValue()).toFixed(2)\r\n ),\r\n vatValue: parseFloat(vatParameter[0]!.value)\r\n }\r\n });\r\n };\r\n\r\n getDamageValue = () => {\r\n if (R.isNil(this.props.caseSettingsState.case!.caseCalculation)) {\r\n return 0;\r\n }\r\n\r\n const damage = this.props.caseSettingsState.case!.caseCalculation.amountWithoutTVA;\r\n\r\n return Utils.ConvertCurrency(\r\n this.props.appState.currencyRates,\r\n this.props.caseSettingsState.case!.caseCalculation.currencyCode,\r\n this.getCurrentCurrency(),\r\n damage\r\n );\r\n };\r\n\r\n setSecondValueBasedOnCaseCurrency(value: number, currencyRate: number): number | null {\r\n let resultValue = null;\r\n if (\r\n this.state.vehicleOfferData.currency == CurrencyCode.EUR ||\r\n this.state.vehicleOfferData.currency == CurrencyCode.RON\r\n ) {\r\n resultValue = 0;\r\n const previousCurrencyCode = this.state.vehicleOfferData.currency;\r\n const futureCurrencyCode =\r\n this.state.vehicleOfferData.currency == CurrencyCode.EUR\r\n ? CurrencyCode.RON\r\n : CurrencyCode.EUR;\r\n if (!R.isNil(value) && previousCurrencyCode) {\r\n let previousCurrencyRate = Utils.GetCurrencyRate(\r\n this.props.appState.currencyRates,\r\n previousCurrencyCode\r\n );\r\n\r\n let futureCurrencyRate = Utils.GetCurrencyRate(\r\n this.props.appState.currencyRates,\r\n futureCurrencyCode\r\n );\r\n\r\n if (this.state.vehicleOfferData.currency == CurrencyEnum.EUR) {\r\n previousCurrencyRate = currencyRate;\r\n } else if (this.state.vehicleOfferData.currency == CurrencyCode.RON) {\r\n futureCurrencyRate = currencyRate;\r\n }\r\n\r\n resultValue = value * (previousCurrencyRate / futureCurrencyRate);\r\n return Number.parseFloat(resultValue.toFixed(2));\r\n }\r\n }\r\n\r\n return resultValue;\r\n }\r\n\r\n setSecondVatFromOfferPrice(offerValueWithVAT: number): number {\r\n const offerTypeCode = this.props.caseSettingsState?.case?.caseType?.code;\r\n const vehicleHasNoVAT =\r\n offerTypeCode === CaseTypeCode.SALE && this.props.vehicleState.vehicle?.purchaseVatRate === 0;\r\n const purchasePrice = (this.props.vehicleState?.vehicle?.purchasePrice as number) || 0;\r\n const caseParameters = this.props.caseSettingsState.case!.caseParameters;\r\n const vatParameter = caseParameters.filter(\r\n (parameter) => parameter.parameter!.code === ParametreCode.TVA\r\n );\r\n const vat = parseFloat(vatParameter[0]!.value);\r\n if (!vehicleHasNoVAT) {\r\n const offerPriceWithoutVAT = offerValueWithVAT / (1 + vat / 100);\r\n return Number.parseFloat((offerPriceWithoutVAT * (vat / 100)).toFixed(2));\r\n }\r\n return Utils.getMarginVat(offerValueWithVAT, purchasePrice, vat);\r\n }\r\n\r\n loadCaseSaleOfferForm = async () => {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (R.isNil(caseSettings) || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n\r\n const hasRights = FormHelpers.HasRights(\r\n this.props.workflowForm.workflowFormPermissions,\r\n this.props.appState.appUser!,\r\n this.props.caseSettingsState.case!.caseStatus.caseStatusId\r\n );\r\n\r\n const guaranteeTypeRef = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.GuaranteeType\r\n );\r\n const offerTypeRef = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.OfferTye\r\n );\r\n\r\n const purchaseOriginRef = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.PurchaseOrigin\r\n );\r\n\r\n const saleChannelRef = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.SaleChannel\r\n );\r\n\r\n const vehicleMakeRef = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.VehicleMake\r\n );\r\n\r\n const offerTypeList = await this.appReferentialService.Get(offerTypeRef!.baseUrl);\r\n\r\n const offerType = offerTypeList.find(\r\n (item) =>\r\n (item.code === OfferTypeCode.SELL && this.props.isSaleOfferType) ||\r\n (item.code === OfferTypeCode.BUY && !this.props.isSaleOfferType)\r\n )!;\r\n \r\n const [guaranteeTypeList, offers, puchaseOriginList, saleChannelList, makeList, vehicleAdvert, attachmentType] = await Promise.all([\r\n this.appReferentialService.Get(guaranteeTypeRef!.baseUrl),\r\n R.isNil(this.props.caseSettingsState.case!.vehicleId)\r\n ? []\r\n : this.vehicleService.GetVehicleOffers(\r\n this.props.caseSettingsState.case!.vehicleId,\r\n this.props.caseSettingsState.case!.id,\r\n offerType.id\r\n ),\r\n this.appReferentialService.Get(purchaseOriginRef!.baseUrl),\r\n this.appReferentialService.Get(saleChannelRef!.baseUrl),\r\n this.appReferentialService.Get(vehicleMakeRef!.baseUrl),\r\n this.vehicleService.GetVehicleAdvert(\r\n this.props.caseSettingsState.case!.vehicleId,\r\n caseId\r\n ),\r\n this.caseService.GetAttachmentTypeByCode(AttachmentTypeCode.OTHER)\r\n ]);\r\n\r\n const users = await this.appUserService.GetUsersInfo(offers.map((item) => item.createdBy));\r\n offers.forEach((item) => {\r\n const user = users.find((u) => u.id === item.createdBy);\r\n item.createdByUser = R.isNil(user) ? null : user;\r\n });\r\n\r\n let makeListFiltered = _.cloneDeep(makeList.filter((item) => item.isActive));\r\n if (this.props.appState.appUser!.organization!.dealerId && !this.props.caseSettingsState.caseSettings?.workflow?.hideRenewAdvert) {\r\n makeListFiltered = makeListFiltered.filter(\r\n (item) => item.code && renaultMakeCodes.includes(item!.code)\r\n );\r\n }\r\n\r\n this.setState(\r\n {\r\n isLoading: false,\r\n hasRights: hasRights,\r\n isUserHidden: !hasRights,\r\n guaranteeTypes: guaranteeTypeList.filter((item) => item.isActive),\r\n offerTypes: offerTypeList,\r\n offers: offers,\r\n offerType: offerType,\r\n purchaseOrigins: puchaseOriginList.filter((item) => item.isActive),\r\n saleChannels: saleChannelList.filter((item) => item.isActive),\r\n makes: makeListFiltered,\r\n vehicleOfferData: {\r\n ...this.state.vehicleOfferData,\r\n guaranteeType: vehicleAdvert ? vehicleAdvert!.guaranteeType : null,\r\n guaranteeTypeId: vehicleAdvert ? vehicleAdvert!.guaranteeTypeId : null\r\n },\r\n attachType: attachmentType\r\n },\r\n this.setStatePriceAndVAT\r\n );\r\n };\r\n\r\n loadOffers = async () => {\r\n const offers = await this.vehicleService.GetVehicleOffers(\r\n this.props.caseSettingsState.case!.vehicleId!,\r\n this.props.caseSettingsState.case!.id,\r\n this.state.offerType!.id\r\n );\r\n\r\n const users = await this.appUserService.GetUsersInfo(offers.map((item) => item.createdBy));\r\n offers.forEach((item) => {\r\n const user = users.find((u) => u.id === item.createdBy);\r\n item.createdByUser = R.isNil(user) ? null : user;\r\n });\r\n\r\n this.setState({\r\n offers: offers\r\n });\r\n };\r\n\r\n submitForm = async (caseId: number, caseSectionStepFormId: number, appUser: AppUser | null) => {\r\n let newStatus = await this.caseService.SubmitForm(caseId, caseSectionStepFormId, appUser);\r\n\r\n if (newStatus === null) {\r\n newStatus = this.props.caseSettingsState.case!.caseStatus;\r\n }\r\n \r\n const vehicleId = this.props.caseSettingsState.case?.vehicleId;\r\n if (newStatus.caseStatus?.code === 'CLOSED') {\r\n if (vehicleId) {\r\n await this.vehicleService.ChangeVehicleStatus({\r\n vehicleId,\r\n statusId: VehicleStatusCodeEnum.Sold,\r\n comment: ''\r\n });\r\n }\r\n if (vehicleId) {\r\n await this.vehicleService.DeleteAllAdvertWhenCaseStatusBecameClosed(caseId, vehicleId);\r\n }\r\n }\r\n\r\n this.props.SetCaseStatus(newStatus);\r\n if (appUser !== null) {\r\n this.props.AddPartner(appUser!.hoId === null ? appUser!.organizationId : appUser!.hoId);\r\n }\r\n\r\n const hasRights = FormHelpers.HasRights(\r\n this.props.workflowForm.workflowFormPermissions,\r\n this.props.appState.appUser!,\r\n newStatus.caseStatusId\r\n );\r\n this.setState({ hasRights: hasRights });\r\n };\r\n\r\n NumberFormatCustom = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n },\r\n currentTarget: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n allowNegative={false}\r\n thousandSeparator={false}\r\n decimalScale={2}\r\n />\r\n );\r\n };\r\n\r\n NumberFormatCustomCurrencyRate = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n },\r\n currentTarget: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n allowNegative={false}\r\n thousandSeparator={false}\r\n decimalScale={4}\r\n />\r\n );\r\n };\r\n\r\n submitData = async (e: any) => {\r\n try {\r\n this.setState({ executing: true });\r\n const data: VehicleOffer = {\r\n ...this.state.vehicleOfferData,\r\n offerVatAmount:\r\n this.state.vehicleOfferData.offerValueWithVAT - this.state.vehicleOfferData.offerValue,\r\n secondCurrency: this.state.displaySecondCurrency\r\n ? this.state.vehicleOfferData.secondCurrency\r\n : null,\r\n secondOfferValue: this.state.displaySecondCurrency\r\n ? this.state.vehicleOfferData.secondOfferValue\r\n : null,\r\n secondOfferValueWithVAT: this.state.displaySecondCurrency\r\n ? this.state.vehicleOfferData.secondOfferValueWithVAT\r\n : null\r\n };\r\n\r\n await this.vehicleService.SaveVehicleOffer(data);\r\n\r\n await this.submitForm(\r\n this.props.caseSettingsState.case!.id,\r\n this.props.workflowForm.id,\r\n null\r\n );\r\n\r\n await this.loadOffers();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (ex) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n } finally {\r\n this.setState({\r\n executing: false\r\n });\r\n }\r\n };\r\n\r\n handleGuaranteeTypeChange = (newValue: IReferential | null) => {\r\n if (!R.isNil(newValue!.displayName)) {\r\n if (RenaultGoldList.includes(newValue!.code!.toString())) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'RENEW_GOLD_INFO_MESSAGE',\r\n 'Aceasta garantie include si Garantia de producator !'\r\n ),\r\n {\r\n variant: 'info',\r\n autoHideDuration: 5000\r\n }\r\n );\r\n }\r\n this.setState({\r\n vehicleOfferData: {\r\n ...this.state.vehicleOfferData,\r\n guaranteeType: newValue,\r\n guaranteeTypeId: newValue === null ? null : newValue.id\r\n }\r\n });\r\n }\r\n };\r\n\r\n\r\n handlePurchaseOriginChange = (newValue: IReferential | null) => {\r\n if (!R.isNil(newValue!.displayName)) {\r\n this.setState({\r\n vehicleOfferData: {\r\n ...this.state.vehicleOfferData,\r\n purchaseOrigin: newValue,\r\n purchaseOriginId: newValue === null ? null : newValue.id,\r\n withNewVehicle: newValue && newValue.code === PurchaseOriginCode.NC ? true : false\r\n }\r\n });\r\n }\r\n };\r\n\r\n \r\n handleMakeChange = (newValue: IReferential | null) => {\r\n if (!R.isNil(newValue!.displayName)) {\r\n this.setState({\r\n vehicleOfferData: {\r\n ...this.state.vehicleOfferData,\r\n make: newValue,\r\n makeId: newValue === null ? null : newValue.id\r\n }\r\n });\r\n }\r\n };\r\n\r\n handleSaleChannelChange = (newValue: IReferential | null) => {\r\n if (!R.isNil(newValue!.displayName)) {\r\n this.setState({\r\n vehicleOfferData: {\r\n ...this.state.vehicleOfferData,\r\n saleChannel: newValue,\r\n saleChannelId: newValue === null ? null : newValue.id\r\n }\r\n });\r\n }\r\n };\r\n\r\n handleIsActiveNewVehicle = (e: any) => {\r\n //in acest caz vom prelua automat ca si origine achizitie / by default - Trade In VN - Achizitie de vehicul rulat ( VO) cu vanzare de vehicul nou ( VN)\r\n let purchaseOrigin: IReferential | null = null;\r\n if (e.currentTarget.checked && !this.props.caseSettingsState.caseSettings?.workflow?.hideRenewAdvert) {\r\n purchaseOrigin = this.state.purchaseOrigins.find((item) => item.code === PurchaseOriginCode.NC) || null;\r\n }\r\n\r\n this.setState({\r\n vehicleOfferData: {\r\n ...this.state.vehicleOfferData,\r\n withNewVehicle: e.currentTarget.checked,\r\n newVin: e.currentTarget.checked ? this.state.vehicleOfferData.newVin : '',\r\n purchaseOrigin: e.currentTarget.checked ? purchaseOrigin : null,\r\n purchaseOriginId: e.currentTarget.checked ? (purchaseOrigin?.id ?? null) : null,\r\n }\r\n });\r\n };\r\n\r\n getInvoicePdf = async (\r\n id: number,\r\n vehicleId: number,\r\n caseId: number,\r\n caseClientHistoryId: number | null\r\n ) => {\r\n const reportParameters = [\r\n {\r\n name: 'vehicleId',\r\n value: vehicleId.toString()\r\n } as ReportParameter,\r\n {\r\n name: 'caseId',\r\n value: caseId.toString()\r\n } as ReportParameter,\r\n {\r\n name: 'offerId',\r\n value: id.toString()\r\n } as ReportParameter,\r\n {\r\n name: 'organizationId',\r\n value: this.props.appState.appUser!.organization?.id.toString()\r\n } as ReportParameter,\r\n {\r\n name: 'caseClientHistoryId',\r\n value: caseClientHistoryId?.toString()\r\n } as ReportParameter,\r\n {\r\n name: 'apiUrl',\r\n value: Constants.apiRoot\r\n } as ReportParameter\r\n ];\r\n\r\n const fileBlob = await this.reportService.GetReport(\r\n ReportTypeCode.RENAULT_INVOICE,\r\n reportParameters\r\n );\r\n FileSaver.saveAs(fileBlob, 'Proforma invoice.pdf');\r\n if (this.props.caseSettingsState.caseSettings!.workflow.saveDocuments) {\r\n const fileName = `Proforma invoice_${id}.pdf`;\r\n console.log('Save file', fileName, 'Id oferta', id);\r\n await this.saveGeneratedFile(fileBlob, fileName);\r\n }\r\n };\r\n\r\n getOfferPdf = async (id: number, vehicleId: number, caseId: number) => {\r\n const reportParameters = [\r\n {\r\n name: 'vehicleId',\r\n value: vehicleId.toString()\r\n } as ReportParameter,\r\n {\r\n name: 'caseId',\r\n value: caseId.toString()\r\n } as ReportParameter,\r\n {\r\n name: 'calculationId',\r\n value: this.props.caseSettingsState.case?.caseCalculation?.id.toString() || null\r\n } as ReportParameter,\r\n {\r\n name: 'offerId',\r\n value: id.toString()\r\n } as ReportParameter,\r\n {\r\n name: 'organizationId',\r\n value: this.props.appState.appUser!.organization?.id.toString()\r\n } as ReportParameter,\r\n\r\n {\r\n name: 'apiUrl',\r\n value: Constants.apiRoot\r\n } as ReportParameter,\r\n {\r\n name: 'organizationOwnerId',\r\n value: this.props.caseSettingsState.case?.organizationOwnerId.toString()\r\n } as ReportParameter,\r\n {\r\n name: 'hideOrganizationLogo',\r\n value: this.props.caseSettingsState.caseSettings?.workflow?.hideRenewAdvert ? 'true' : 'false'\r\n } as ReportParameter\r\n ];\r\n\r\n const fileBlob = await this.reportService.GetReport(\r\n ReportTypeCode.RENAULT_OFFER,\r\n reportParameters\r\n );\r\n FileSaver.saveAs(fileBlob, 'Offer.pdf');\r\n if (this.props.caseSettingsState.caseSettings!.workflow.saveDocuments) {\r\n const fileName = `Offer_${id}.pdf`;\r\n console.log('Save file', fileName, 'Id oferta', id);\r\n await this.saveGeneratedFile(fileBlob, fileName);\r\n }\r\n };\r\n\r\n saveGeneratedFile = async (fileBlob: Blob, fileName: string) => {\r\n try {\r\n //Save the report into attachments\r\n const attachments: CaseAttachment[] = [];\r\n attachments.push({\r\n id: 0,\r\n caseId: this.props.caseSettingsState.case!.id,\r\n attachmentTypeId: this.state.attachType.id,\r\n attachmentType: this.state.attachType,\r\n file: new File([fileBlob], fileName),\r\n isSelection: false,\r\n includeInOtherTab: true,\r\n checkFileName: true\r\n } as CaseAttachment);\r\n\r\n const newFiles = await this.caseService.AddCaseAttachment(attachments);\r\n\r\n console.log('newFiles', newFiles);\r\n } catch (error) {\r\n console.log('error', error);\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n \r\n showGetInvoiceButton = (offer: VehicleOffer) => {\r\n const workflowSteps = this.props.caseSettingsState.caseSettings?.workflow.workflowSections;\r\n if (!isNullOrUndefined(workflowSteps)) {\r\n const code17Steps = workflowSteps?.find((wfs) => {\r\n const codeF17 = wfs.workflowSectionSteps.find((x) =>\r\n x.workflowSectionStepForms.find((wfssf) => wfssf.form.code === 'F17')\r\n );\r\n return !isNullOrUndefined(codeF17);\r\n });\r\n if (!isNullOrUndefined(code17Steps)) {\r\n return (\r\n \r\n this.getInvoicePdf(offer.id, offer.vehicleId, offer.caseId, offer.caseClientHistoryId)\r\n }\r\n >\r\n {this.translatorService.Tranlate('SALE_OFFER_INVOICE_PROFORMA', 'Factura Proforma')}\r\n \r\n );\r\n }\r\n }\r\n return null;\r\n };\r\n\r\n showOfferTimeline = (caseHasVAT: boolean) => {\r\n const priceLabel = caseHasVAT\r\n ? this.translatorService.Tranlate('SALE_OFFER_PRICE_OFFERED_WITH_VAT', 'Pret calculat cu TVA')\r\n : this.translatorService.Tranlate('SALE_OFFER_PRICE_OFFERED', 'Pret calculat cu TVA');\r\n\r\n const offerTypeCode = this.props.caseSettingsState?.case?.caseType?.code;\r\n\r\n const vehicleHasNoVAT =\r\n offerTypeCode === CaseTypeCode.SALE && this.props.vehicleState.vehicle?.purchaseVatRate === 0;\r\n\r\n return this.state.offers.map((offer, index) => {\r\n const price = !vehicleHasNoVAT\r\n ? this.getPriceWithVAT(offer.offerValue, this.state.vehicleOfferData.vatValue)\r\n : offer.offerValue + offer.offerVatAmount;\r\n const secondPrice = !vehicleHasNoVAT\r\n ? offer.secondOfferValue\r\n ? this.getPriceWithVAT(offer.secondOfferValue, this.state.vehicleOfferData.vatValue)\r\n : null\r\n : !R.isNil(offer.secondOfferValue) && !R.isNil(offer.secondOfferVatAmount)\r\n ? offer.secondOfferValue + offer.secondOfferVatAmount\r\n : null;\r\n return (\r\n
\r\n
\r\n
\r\n

\r\n {moment.utc(offer.dateCreation).local().format(this.props.appState.longDateFormat) +\r\n ' (' +\r\n offer.createdByUser!.email +\r\n ')'}\r\n

\r\n

\r\n {`${priceLabel}: ${price} ${offer.currency}`}\r\n {secondPrice ? '(' + secondPrice + offer.secondCurrency + ')' : ''}\r\n

\r\n\r\n {offer.purchaseOrigin != null && (\r\n

\r\n {' '}\r\n {this.translatorService.Tranlate('SALE_OFFER_PURCHASE_ORIGIN', 'Origine achizitie')}:\r\n {offer.purchaseOrigin!.displayName ? ' ' + offer.purchaseOrigin!.displayName : null}\r\n

\r\n )}\r\n\r\n {offer.saleChannel != null && (\r\n

\r\n {' '}\r\n {this.translatorService.Tranlate('SALE_OFFER_SALE_CHANNEL', 'Canal vanzare')}:\r\n {offer.saleChannel!.displayName ? ' ' + offer.saleChannel!.displayName : null}\r\n

\r\n )}\r\n\r\n {offer.guaranteeType != null && (\r\n

\r\n {' '}\r\n {this.translatorService.Tranlate('SALE_OFFER_GUARANTEE_TYPE', 'Tip garantie')}:\r\n {offer.guaranteeType!.displayName ? ' ' + offer.guaranteeType!.displayName : null}\r\n

\r\n )}\r\n\r\n \r\n \r\n {this.showGetInvoiceButton(offer)}\r\n \r\n \r\n this.getOfferPdf(offer.id, offer.vehicleId, offer.caseId)}\r\n >\r\n {this.translatorService.Tranlate('SALE_OFFER_INVOICE_PDF', 'Oferta PDF')}\r\n \r\n \r\n \r\n this.openContractModal(offer, price)}\r\n >\r\n {this.translatorService.Tranlate('SALE_OFFER_CONTRACT', 'Contract')}\r\n \r\n \r\n \r\n
\r\n
\r\n );\r\n });\r\n };\r\n\r\n renderClientDataForm = (caseHasVAT: boolean) => {\r\n const saleOfferPriceWithoutVatLabel = caseHasVAT\r\n ? this.translatorService.Tranlate('SALE_OFFER_PRICE_WITHOUT_VAT', 'Pret recomandat fara TVA')\r\n : this.translatorService.Tranlate('SALE_OFFER_PRICE', 'Pret recomandat');\r\n\r\n const saleOfferPriceOfferedWithoutVatLabel = caseHasVAT\r\n ? this.translatorService.Tranlate(\r\n 'SALE_OFFER_PRICE_OFFERED_WITHOUT_VAT',\r\n 'Pret ofertat fara TVA'\r\n )\r\n : this.translatorService.Tranlate('SALE_OFFER_PRICE_OFFERED', 'Pret ofertat');\r\n\r\n const saleOfferPriceOfferedWithVatLabel = caseHasVAT\r\n ? this.translatorService.Tranlate('SALE_OFFER_PRICE_OFFERED_WITH_VAT', 'Pret ofertat cu TVA')\r\n : this.translatorService.Tranlate('SALE_OFFER_PRICE_OFFERED', 'Pret ofertat');\r\n\r\n const saleOfferCalculatedPriceWithoutVat = caseHasVAT\r\n ? this.translatorService.Tranlate('SALE_OFFER_CALCULATED_PRICE_WITHOUT_VAT', 'Pret calculat')\r\n : this.translatorService.Tranlate('SALE_OFFER_CALCULATED_PRICE', 'Pret calculat');\r\n\r\n const purchasePrice = (this.props.vehicleState?.vehicle?.purchasePrice as number) || 0;\r\n\r\n const offerTypeCode = this.props.caseSettingsState?.case?.caseType?.code;\r\n\r\n const vehicleHasNoVAT =\r\n offerTypeCode === CaseTypeCode.SALE && this.props.vehicleState.vehicle?.purchaseVatRate === 0;\r\n\r\n return (\r\n {\r\n this.submitData(e);\r\n }}\r\n >\r\n
\r\n \r\n \r\n \r\n \r\n {caseHasVAT && (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n\r\n {this.props.isSaleOfferType === false ? (\r\n
\r\n \r\n\r\n \r\n
\r\n ) : (\r\n ''\r\n )}\r\n\r\n \r\n \r\n \r\n \r\n {caseHasVAT && (\r\n \r\n \r\n \r\n )}\r\n \r\n\r\n \r\n \r\n {\r\n const offerValue = this.getOfferPriceWithoutVAT(e.target.value);\r\n const secondOfferValueWithVAT = this.setSecondValueBasedOnCaseCurrency(\r\n e.target.value,\r\n this.state.vehicleOfferData.currencyRate\r\n );\r\n const secondOfferValue = secondOfferValueWithVAT\r\n ? this.getOfferPriceWithoutVAT(secondOfferValueWithVAT)\r\n : 0;\r\n const secondOfferVatAmount = secondOfferValueWithVAT\r\n ? this.setSecondVatFromOfferPrice(secondOfferValueWithVAT)\r\n : 0;\r\n this.setState({\r\n vehicleOfferData: {\r\n ...this.state.vehicleOfferData,\r\n offerValueWithVAT: e.target.value,\r\n offerValue: offerValue,\r\n secondOfferValueWithVAT: secondOfferValueWithVAT\r\n ? secondOfferValueWithVAT\r\n : 0,\r\n secondOfferValue: secondOfferValue,\r\n secondOfferVatAmount: secondOfferVatAmount\r\n }\r\n });\r\n }}\r\n validators={['required', 'minNumber:1']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu'),\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n label={\r\n this.state.displaySecondCurrency\r\n ? saleOfferPriceOfferedWithVatLabel +\r\n ' | ' +\r\n this.state.vehicleOfferData.offerValueWithVAT +\r\n ' ' +\r\n this.state.vehicleOfferData.currency +\r\n ' (' +\r\n this.state.vehicleOfferData.secondOfferValueWithVAT +\r\n ' ' +\r\n this.state.vehicleOfferData.secondCurrency +\r\n ')'\r\n : saleOfferPriceOfferedWithVatLabel\r\n }\r\n InputProps={{\r\n inputComponent: this.NumberFormatCustom,\r\n style: { fontWeight: 500 }\r\n }}\r\n />\r\n \r\n \r\n {\r\n const value = e.target.value;\r\n const secondOfferValueWithVAT = this.setSecondValueBasedOnCaseCurrency(\r\n this.state.vehicleOfferData.offerValueWithVAT,\r\n parseFloat(value)\r\n );\r\n const secondOfferValue = secondOfferValueWithVAT\r\n ? this.getOfferPriceWithoutVAT(secondOfferValueWithVAT)\r\n : 0;\r\n console.log(secondOfferValue);\r\n this.setState({\r\n vehicleOfferData: {\r\n ...this.state.vehicleOfferData,\r\n currencyRate: parseFloat(value),\r\n secondOfferValueWithVAT: secondOfferValueWithVAT\r\n ? secondOfferValueWithVAT\r\n : 0,\r\n secondOfferValue: secondOfferValue ? secondOfferValue : 0,\r\n secondOfferVatAmount: secondOfferValueWithVAT\r\n ? this.setSecondVatFromOfferPrice(secondOfferValueWithVAT)\r\n : 0\r\n }\r\n });\r\n }}\r\n validators={['required', 'minNumber:1']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu'),\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n label={this.translatorService.Tranlate('SALE_OFFER_PRICE_FXRATE', 'Curs valutar')}\r\n InputProps={{\r\n inputComponent: this.NumberFormatCustomCurrencyRate,\r\n style: { fontWeight: 500 }\r\n }}\r\n />\r\n \r\n \r\n\r\n {\r\n this.setState({\r\n vehicleOfferData: {\r\n ...this.state.vehicleOfferData,\r\n comments: e.target.value\r\n }\r\n });\r\n }}\r\n validators={[]}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n label={this.translatorService.Tranlate('SALE_OFFER_OBSERVATIONS', 'Observatii')}\r\n multiline\r\n variant=\"outlined\"\r\n rows={6}\r\n />\r\n\r\n {this.props.isSaleOfferType === false ? (\r\n <>\r\n
\r\n
\r\n this.handleIsActiveNewVehicle(e)}\r\n color=\"primary\" />}\r\n label={this.translatorService.Tranlate(\r\n 'SALE_OFFER_WITH_SALE_NEW_VEHICLE',\r\n 'Cu vanzare vehicul nou'\r\n )}\r\n labelPlacement=\"end\"\r\n className=\"mt-3 ml-0 mr-0\" />\r\n
\r\n\r\n this.handleMakeChange(newValue)}\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )} />\r\n
\r\n {this.props.caseSettingsState.caseSettings?.workflow?.hideRenewAdvert ? null : (\r\n
\r\n this.handlePurchaseOriginChange(newValue)}\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )} />\r\n
\r\n )}\r\n \r\n ) : (this.props.caseSettingsState.caseSettings?.workflow?.hideRenewAdvert ? null : \r\n <>\r\n
\r\n this.handleGuaranteeTypeChange(newValue)}\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )} />\r\n
\r\n
\r\n this.handleSaleChannelChange(newValue)}\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )} />\r\n
\r\n \r\n )}\r\n
\r\n\r\n \r\n {this.translatorService.Tranlate('SAVE', 'Salveaza')}\r\n \r\n \r\n );\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n this.vehicleService = (this.context as AppContext).vehicleService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n this.appUserService = (this.context as AppContext).appUserService;\r\n this.reportService = (this.context as AppContext).reportsService;\r\n\r\n const offerTypeCode = this.props.caseSettingsState?.case?.caseType?.code;\r\n\r\n const caseHasNoVAT =\r\n offerTypeCode === CaseTypeCode.AQUISITION && this.state.vehicleOfferData.vatValue === 0;\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n
\r\n {this.renderClientDataForm(!caseHasNoVAT)}\r\n\r\n \r\n {this.state.offers.length > 0 ? (\r\n
\r\n {this.showOfferTimeline(!caseHasNoVAT)}\r\n
\r\n ) : (\r\n ''\r\n )}\r\n
\r\n ) : null}\r\n {this.state.contractModalOpened && (\r\n \r\n )}\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalCaseDetailsCaseTabSaleOfferFormProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app\r\n }),\r\n CaseSettingsActionCreators,\r\n mergeProps\r\n)(withSnackbar(CaseDetailsCaseTabSaleOfferForm as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, CaseSettingsActionCreators } from '../../../store';\r\nimport { withSnackbar } from 'notistack';\r\nimport {\r\n Button,\r\n Grid,\r\n FormControlLabel,\r\n Switch,\r\n InputAdornment,\r\n IconButton,\r\n Paper,\r\n Dialog,\r\n DialogContent,\r\n Modal,\r\n DialogActions,\r\n DialogContentText,\r\n Divider,\r\n Box,\r\n CircularProgress\r\n} from '@material-ui/core';\r\nimport { AppContext, ApplicationContext } from '../../../context/Contexts';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { WorkflowSectionStepForm } from '../../../interfaces/Workflow';\r\nimport { ICaseService } from '../../../services/Interfaces/ICaseService';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport {\r\n ParametreCode,\r\n VehicleAdvertOperationTypes,\r\n RefConstants,\r\n CurrencyCode,\r\n ReportTypeCode,\r\n Constants,\r\n AdvertOptionCodeEnum,\r\n excludedAdvertisers,\r\n VehicleAttachmentTypeCodeOrder,\r\n AttachmentTypeCode\r\n} from '../../../helpers/Constants';\r\nimport { AppUser } from '../../../interfaces/AppUser';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport { IReferential } from '../../../interfaces/IReferential';\r\nimport { FormHelpers } from '../../../helpers/forms/FormHelpers';\r\nimport NumberFormat from 'react-number-format';\r\nimport moment from 'moment';\r\nimport MomentUtils from '@date-io/moment';\r\nimport { IVehicleService } from '../../../services/Interfaces/IVehicleService';\r\nimport {\r\n AddDetailsPublishRcr,\r\n PublishAdvertRcr,\r\n VehicleAdvert,\r\n VehicleOption\r\n} from '../../../interfaces/Vehicle';\r\nimport { DatePicker, MuiPickersUtilsProvider } from '@material-ui/pickers';\r\nimport { MaterialUiPickersDate } from '@material-ui/pickers/typings/date';\r\nimport * as R from 'ramda';\r\nimport { FormCode } from '../../../helpers/forms/FormCode';\r\nimport {\r\n ICaseDetailsCaseTabVehicleAdvertState,\r\n ICaseVehicleAge\r\n} from './ICaseDetailsCaseTabVehicleAdvertState';\r\nimport { ExternalCaseDetailsCaseTabVwehicleAdvertProps } from './ExternalCaseDetailsCaseTabVwehicleAdvertProps';\r\nimport { ICaseDetailsCaseTabVehicleAdvertProps } from './ICaseDetailsCaseTabVehicleAdvertProps';\r\nimport { IAppUserService } from '../../../services/Interfaces/IAppUserService';\r\nimport { Utils } from '../../../helpers/Utils';\r\nimport { Clear as ClearIcon } from '@material-ui/icons';\r\nimport { ReportParameter } from '../../../interfaces/Reports';\r\nimport FileSaver from 'file-saver';\r\nimport { IReportsService } from '../../../services/Interfaces/IReportsService';\r\nimport MaterialTable, { Column } from 'material-table';\r\nimport {\r\n getAdvertLocalization,\r\n getLocalization,\r\n MaterialTableIcons\r\n} from '../../_shared/TableSettings';\r\nimport _ from 'lodash';\r\nimport { CaseAttachment, CaseAttachmentDto } from '../../../interfaces/Case';\r\n\r\nconst minNumberOfCharactersAdvertDetails = 35;\r\nconst maxNumberOfCharactersAdvertDetails = 6000;\r\n\r\nclass CaseDetailsCaseTabVehicleAdvertComponent extends React.PureComponent<\r\n ICaseDetailsCaseTabVehicleAdvertProps,\r\n ICaseDetailsCaseTabVehicleAdvertState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private caseService!: ICaseService;\r\n private vehicleService!: IVehicleService;\r\n private appReferentialService!: IReferentialService;\r\n private appUserService!: IAppUserService;\r\n private reportService!: IReportsService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n isLoading: true,\r\n hasRights: false,\r\n executing: false,\r\n isUserHidden: false,\r\n advertiserOperations: [] as any[],\r\n valuationPrice: 0,\r\n vatValue: 0,\r\n vehicleAdvertHistory: [],\r\n vehicleAdvertData: {\r\n id: 0,\r\n caseId: this.props.caseSettingsState.case!.id,\r\n vehicleId: this.props.caseSettingsState.case?.vehicleId,\r\n price: 0,\r\n priceWithVat: 0,\r\n hasInvoice: false,\r\n leasingConcession: false,\r\n individual: true,\r\n privateBusiness: false,\r\n authorizedDealer: false,\r\n hasFinanceEligibility: false,\r\n manufacturerWarrantyDate: null,\r\n isRegistered: false,\r\n isFirstOwner: false,\r\n hasAccident: false,\r\n hasServiceBook: false,\r\n hasParticlesFilter: false,\r\n hasStandardImages: true,\r\n hasOptionalImages: false,\r\n vehicleAdvertOptions: [] as any,\r\n currency: this.props.caseSettingsState.case!.caseParameters.find(\r\n (p) => p.parameter!.code === ParametreCode.CURRENCY\r\n )!.value\r\n } as VehicleAdvert,\r\n makeTypes: [] as IReferential[],\r\n modelTypes: [] as IReferential[],\r\n fuelTypes: [] as IReferential[],\r\n transmissionTypes: [] as IReferential[],\r\n gearBoxTypes: [] as IReferential[],\r\n pollutionNormTypes: [] as IReferential[],\r\n carBodyTypes: [] as IReferential[],\r\n regionsTypes: [] as IReferential[],\r\n originCountriesTypes: [] as IReferential[],\r\n citiesTypes: [] as IReferential[],\r\n districtsTypes: [] as IReferential[],\r\n paintTypes: [] as IReferential[],\r\n advertisers: [] as IReferential[],\r\n vehicleOptions: [] as VehicleOption[],\r\n colorTypes: [] as IReferential[],\r\n isOpen: false,\r\n dialogVisible: false,\r\n guaranteeTypes: [] as IReferential[],\r\n isPublishLoading: false,\r\n attachType: {} as IReferential\r\n } as ICaseDetailsCaseTabVehicleAdvertState;\r\n\r\n inputTextValidator = React.createRef();\r\n\r\n public componentDidMount() {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (R.isNil(caseSettings) || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n\r\n // let caseParametersList = this.props.caseSettingsState.case!.caseParameters;\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadCaseVehicleAdvert();\r\n }\r\n );\r\n\r\n ValidatorForm.addValidationRule('minLength', (value) => {\r\n if (!value) {\r\n return true;\r\n }\r\n\r\n if (value.length >= minNumberOfCharactersAdvertDetails) {\r\n return true;\r\n }\r\n\r\n return false;\r\n });\r\n\r\n ValidatorForm.addValidationRule('maxLength', (value) => {\r\n if (!value) {\r\n return true;\r\n }\r\n\r\n if (value.length <= maxNumberOfCharactersAdvertDetails) {\r\n return true;\r\n }\r\n\r\n return false;\r\n });\r\n }\r\n\r\n loadCaseVehicleAdvert = async () => {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (R.isNil(caseSettings) || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n if (R.isNil(this.props.vehicleState.vehicle)) {\r\n this.setState({ isLoading: false });\r\n return;\r\n }\r\n\r\n const hasRights = FormHelpers.HasRights(\r\n this.props.workflowForm.workflowFormPermissions,\r\n this.props.appState.appUser!,\r\n this.props.caseSettingsState.case!.caseStatus.caseStatusId\r\n );\r\n\r\n // const guaranteeTypeRef = Referentials.find(item => item.code === ReferentialCode.GuaranteeType);\r\n // const offerTypeRef = Referentials.find(item => item.code === ReferentialCode.OfferTye);\r\n\r\n // const offerTypeList = await this.appReferentialService.Get(offerTypeRef!.baseUrl);\r\n\r\n // const [guaranteeTypeList] = await Promise.all([\r\n // this.appReferentialService.Get(guaranteeTypeRef!.baseUrl)\r\n // ]);\r\n\r\n const {\r\n vehicleMakeRef,\r\n bodyTypeRef,\r\n tractionTypeRef,\r\n transmissionTypeRef,\r\n fuelTypeRef,\r\n paintTypeRef,\r\n pollutionNormRef,\r\n modelRef,\r\n colorRef,\r\n regionRef,\r\n cityRef,\r\n advertiserRef,\r\n districtRef,\r\n countryOriginRef,\r\n guaranteeTypeRef\r\n } = RefConstants;\r\n\r\n const [\r\n vehicleMakeList,\r\n bodyTypeList,\r\n tractionTypeList,\r\n transmissionTypeList,\r\n fuelTypeList,\r\n paintTypeList,\r\n pollutionNormList,\r\n regions,\r\n cities,\r\n advertisers,\r\n models,\r\n colors,\r\n advertDistricts,\r\n originCountries,\r\n guaranteeTypeList,\r\n attachmentType\r\n ] = await Promise.all([\r\n this.appReferentialService.Get(vehicleMakeRef!.baseUrl),\r\n this.appReferentialService.Get(bodyTypeRef!.baseUrl),\r\n this.appReferentialService.Get(tractionTypeRef!.baseUrl),\r\n this.appReferentialService.Get(transmissionTypeRef!.baseUrl),\r\n this.appReferentialService.Get(fuelTypeRef!.baseUrl),\r\n this.appReferentialService.Get(paintTypeRef!.baseUrl),\r\n this.appReferentialService.Get(pollutionNormRef!.baseUrl),\r\n this.appReferentialService.Get(regionRef!.baseUrl),\r\n this.appReferentialService.Get(cityRef!.baseUrl),\r\n this.appReferentialService.Get(advertiserRef!.baseUrl),\r\n this.appReferentialService.Get(modelRef!.baseUrl),\r\n this.appReferentialService.Get(colorRef!.baseUrl),\r\n this.appReferentialService.Get(districtRef!.baseUrl),\r\n this.appReferentialService.Get(countryOriginRef!.baseUrl),\r\n this.appReferentialService.Get(guaranteeTypeRef!.baseUrl),\r\n this.caseService.GetAttachmentTypeByCode(AttachmentTypeCode.OTHER)\r\n ]);\r\n\r\n const caseParameters = this.props.caseSettingsState.case!.caseParameters;\r\n const vatParameter = caseParameters.filter(\r\n (parameter) => parameter.parameter!.code === ParametreCode.TVA\r\n );\r\n\r\n const vehicleAdvert = await this.vehicleService.GetVehicleAdvert(\r\n this.props.caseSettingsState.case!.vehicleId,\r\n caseId\r\n );\r\n\r\n const vehicleAdvertHistory = await this.getVehicleAdvertHistoryAmongWithUsers();\r\n let initialOptions: any;\r\n let vehicleInfo: any;\r\n\r\n console.log('props', this.props);\r\n const vehicle = await this.vehicleService.GetVehicle(\r\n this.props.caseSettingsState.case!.vehicleId as any\r\n );\r\n this.props.vehicleState.vehicle = _.cloneDeep(vehicle);\r\n if (R.isNil(vehicleAdvert)) {\r\n vehicleInfo = this.props.vehicleState.vehicle;\r\n initialOptions = this.props.vehicleState.vehicle!.vehicleOptions;\r\n } else {\r\n vehicleAdvert.individual = !vehicleAdvert.privateBusiness;\r\n\r\n const result = this.props.vehicleState.vehicle!.vehicleOptions.filter((o1) =>\r\n vehicleAdvert!.vehicleAdvertOptions.some((o2) => o1.id === o2.vehicleOptionId)\r\n );\r\n\r\n const intermediaryArr =\r\n result &&\r\n (result as any).map((item: any) => ({\r\n ...item,\r\n checked: true,\r\n tableData: {\r\n checked: true\r\n }\r\n }));\r\n initialOptions =\r\n intermediaryArr &&\r\n this.props.vehicleState.vehicle!.vehicleOptions.map((item) => ({\r\n ...item,\r\n ...intermediaryArr.find(({ id }: any) => id === item.id)\r\n }));\r\n }\r\n\r\n const vatValue = parseFloat(vatParameter[0]!.value);\r\n\r\n const valuationPrice = this.getValuationPrice();\r\n\r\n this.setState({\r\n isLoading: false,\r\n hasRights: hasRights,\r\n isUserHidden: !hasRights,\r\n makeTypes: vehicleMakeList,\r\n carBodyTypes: bodyTypeList,\r\n transmissionTypes: tractionTypeList,\r\n gearBoxTypes: transmissionTypeList,\r\n pollutionNormTypes: pollutionNormList,\r\n fuelTypes: fuelTypeList,\r\n paintTypes: paintTypeList,\r\n regionsTypes: regions,\r\n originCountriesTypes: originCountries,\r\n citiesTypes: cities as any[] as IReferential[],\r\n advertisers: this.props.caseSettingsState.caseSettings?.workflow?.hideRenewAdvert ? advertisers.filter((x) => !excludedAdvertisers.includes(x.code ?? \"\")) : advertisers,\r\n vehicleOptions: initialOptions,\r\n modelTypes: models,\r\n colorTypes: colors,\r\n valuationPrice,\r\n vatValue: this.getVatParameterValue(),\r\n districtsTypes: advertDistricts,\r\n guaranteeTypes: guaranteeTypeList,\r\n vehicleAdvertHistory: vehicleAdvertHistory,\r\n attachType: attachmentType,\r\n vehicleAdvertData: vehicleAdvert\r\n ? {\r\n ...vehicleAdvert,\r\n countryOrigin:\r\n originCountries.find(({ id }) => id === vehicleAdvert?.countryOriginId) || null\r\n }\r\n : {\r\n ...this.state.vehicleAdvertData,\r\n vat: vatValue,\r\n price: 0,\r\n vin: vehicleInfo?.vin,\r\n firstRegistrationDate: new Date(vehicleInfo!.firstRegistrationDate),\r\n makeDate: new Date(vehicleInfo!.makeDate || vehicleInfo!.firstRegistrationDate),\r\n engineSize: vehicleInfo!.engineSize,\r\n color: vehicleInfo!.color,\r\n make: vehicleInfo!.make,\r\n version: vehicleInfo!.version,\r\n fuelType: vehicleInfo!.fuelType,\r\n transmissionType: vehicleInfo!.transmissionType,\r\n pollutionNorm: vehicleInfo!.pollutionNorm,\r\n bodyType: vehicleInfo!.bodyType,\r\n kilometersNr: vehicleInfo!.kilometersNr,\r\n horsePower: vehicleInfo!.horsePower,\r\n power: vehicleInfo!.power,\r\n tractionType: vehicleInfo!.tractionType,\r\n model: vehicleInfo!.model!,\r\n nrOfDoors: vehicleInfo!.nrOfDoors,\r\n paintType: vehicleInfo!.paintType,\r\n co2Emission: vehicleInfo!.co2,\r\n region: regions.find((x) => x.displayName === 'Bucuresti - Ilfov') || null,\r\n city: cities.find((x) => x.displayName === 'Bucuresti') || null,\r\n district: advertDistricts.find((x) => x.displayName === 'Sectorul 1') || null\r\n }\r\n });\r\n };\r\n\r\n NumberFormatCustom = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n },\r\n currentTarget: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n allowNegative={false}\r\n thousandSeparator={false}\r\n decimalScale={2}\r\n />\r\n );\r\n };\r\n\r\n getValuationPrice = () => {\r\n const caseValuation = this.props.caseSettingsState.case?.caseValuation;\r\n const valuationValue = !R.isNil(caseValuation) ? caseValuation.offerPrice : 0;\r\n\r\n return Utils.ConvertCurrency(\r\n this.props.appState.currencyRates,\r\n CurrencyCode.EUR,\r\n this.state.vehicleAdvertData.currency,\r\n valuationValue\r\n );\r\n };\r\n\r\n getVatParameterValue = () => {\r\n const caseParameters = this.props.caseSettingsState.case!.caseParameters;\r\n const vatParameter = caseParameters.find(\r\n (parameter) => parameter.parameter!.code === ParametreCode.TVA\r\n );\r\n\r\n return vatParameter ? parseFloat(vatParameter.value) : 0;\r\n };\r\n\r\n getPriceWithoutVAT = (price: number, vat: number) => {\r\n const caseHasNoVAT = this.props.vehicleState?.vehicle?.purchaseVatRate === 0 || false;\r\n const purchasePrice = (this.props.vehicleState?.vehicle?.purchasePrice as number) || 0;\r\n\r\n const vatValue = !caseHasNoVAT\r\n ? this.getReverseVatValue(price, vat)\r\n : Utils.getMarginVat(price, +purchasePrice, vat);\r\n\r\n return Number.parseFloat((price - vatValue).toFixed(2));\r\n };\r\n\r\n getReverseVatValue = (price: number, vat: number): number => {\r\n return Number.parseFloat(((price / (1 + vat / 100) - price) * -1).toFixed(2));\r\n };\r\n\r\n private async getVehicleAdvertHistoryAmongWithUsers() {\r\n const vehicleAdvertHistory = await this.vehicleService.GetVehicleAdvertHistory(\r\n this.props.caseSettingsState.case!.vehicleId,\r\n this.props.caseSettingsState.case!.id\r\n );\r\n const users = await this.appUserService.GetUsersInfo(\r\n Array.from(new Set(vehicleAdvertHistory.map((item) => item.createdBy)))\r\n );\r\n vehicleAdvertHistory.forEach((item) => {\r\n const user = users.find((u) => u.id === item.createdBy);\r\n item.createdByUser = R.isNil(user) ? null : user;\r\n });\r\n return vehicleAdvertHistory;\r\n }\r\n\r\n public getErrorDetails(errorDetails: Map>): any {\r\n const text: string[] = [];\r\n for (const [advertiser, details] of Object.entries(errorDetails)) {\r\n if (!R.isNil(details)) {\r\n text.push(`${advertiser}:`);\r\n for (const [key, value] of Object.entries(details)) {\r\n {\r\n text.push(`${key}:${value}`);\r\n }\r\n }\r\n }\r\n }\r\n\r\n return (\r\n
\r\n {' '}\r\n {text.map((t, index) => (\r\n
{t}
\r\n ))}{' '}\r\n
\r\n );\r\n }\r\n\r\n getDocForm = (): WorkflowSectionStepForm | undefined => {\r\n let form: WorkflowSectionStepForm | undefined = undefined;\r\n\r\n for (const section of this.props.caseSettingsState.caseSettings!.workflow!.workflowSections!) {\r\n if (form !== undefined) break;\r\n for (const step of section.workflowSectionSteps) {\r\n form = step.workflowSectionStepForms.find((f) => f.form.code === FormCode.CASE_ATTACHMENTS);\r\n if (form !== undefined) {\r\n break;\r\n }\r\n }\r\n }\r\n return form;\r\n };\r\n\r\n getCaseAttachements = async () => {\r\n const form = this.getDocForm();\r\n if (form === undefined) {\r\n return [];\r\n }\r\n const workflowDocumentsTypes = form.workflowDocumentTypes;\r\n const [attachmentTypes] = await Promise.all([\r\n this.appReferentialService.Get(RefConstants.attachementTypeRef!.baseUrl)\r\n ]);\r\n\r\n workflowDocumentsTypes.forEach((wfDoc) => {\r\n const documentType = attachmentTypes.find((item) => item.id === wfDoc.documentTypeId);\r\n wfDoc.documentType = R.isNil(documentType) ? null : documentType;\r\n });\r\n\r\n return await this.caseService.GetCaseAttachments(\r\n this.props.caseSettingsState.case!.id,\r\n workflowDocumentsTypes.map((item) => item.documentType!.code!)\r\n );\r\n };\r\n\r\n /* Get year and days diff between two dates */\r\n dateDiffYears = (date1: Date, date2: Date): ICaseVehicleAge => {\r\n const diff = new Date(date2).getTime() - new Date(date1).getTime();\r\n const years = Math.floor(diff / (1000 * 60 * 60 * 24 * 365));\r\n const days = Math.floor(diff / (1000 * 60 * 60 * 24)) - years * 365;\r\n const age = {\r\n years: years,\r\n days: days\r\n };\r\n console.log(\r\n 'endDate: ',\r\n date2,\r\n 'startDate: ',\r\n date1,\r\n 'numberOfDays: ',\r\n Math.floor(diff / (1000 * 60 * 60 * 24))\r\n );\r\n console.log('age', age);\r\n return age;\r\n };\r\n\r\n checkMakeYearAndKilometersNr = (operationType: string) => {\r\n let makeYearAndKilometersNrValid = true;\r\n const selectedAdvertiserCodes = [...this.state.advertiserOperations]\r\n .filter((item) => item.operationType === operationType && item.checked === true)\r\n .map((item) => item.advertiserCode);\r\n if (selectedAdvertiserCodes.includes('REN')) {\r\n const kilometersNr = this.state.vehicleAdvertData.kilometersNr;\r\n const today = new Date(moment().format('YYYY-MM-DD'));\r\n const vehicleAge = this.dateDiffYears(\r\n this.state.vehicleAdvertData.firstRegistrationDate,\r\n today\r\n );\r\n if (kilometersNr > 200000 || vehicleAge.years >= 12) {\r\n makeYearAndKilometersNrValid = false;\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'PUBLISH_RENAULT_SELECTION_ADVERT',\r\n 'Autovehiculul pe care doriti sa-l publicati pe site-ul Renault Selection nu indeplineste criteriile necesare pentru publicare , o vechime mai mica de 12 ani si/sau mai putin de 200.000 km'\r\n ),\r\n {\r\n variant: 'error',\r\n autoHideDuration: 5000\r\n }\r\n );\r\n }\r\n }\r\n return makeYearAndKilometersNrValid;\r\n };\r\n\r\n publishAdvert = (operationType: string) => async (e: any) => {\r\n try {\r\n const makeYearAndKilometersNrValid = this.checkMakeYearAndKilometersNr(operationType);\r\n if (!makeYearAndKilometersNrValid) {\r\n return;\r\n }\r\n\r\n this.setState({ executing: true, isPublishLoading: true });\r\n const selectedAdvertiserCodes = [...this.state.advertiserOperations]\r\n .filter((item) => item.operationType === operationType && item.checked === true)\r\n .map((item) => item.advertiserCode);\r\n\r\n const caseAttachments = await this.getCaseAttachements();\r\n const attachments = caseAttachments.map((a) => {\r\n return {\r\n id: a.id,\r\n caseId: a.caseId,\r\n attachmentTypeId: a.attachmentTypeId,\r\n attachmentTypeCode: a.attachmentType?.code,\r\n fileName: a.fileName,\r\n originalFileName: a.originalFileName,\r\n files: [a.file],\r\n caseRequestId: a.caseRequestId,\r\n paymentId: a.paymentId,\r\n caseClientId: a.caseClientId,\r\n isSelection: a.isSelection,\r\n fileUrl: a.url\r\n };\r\n }).sort((a: CaseAttachmentDto, b: CaseAttachmentDto) => {\r\n const indexA = VehicleAttachmentTypeCodeOrder.indexOf(a!.attachmentTypeCode ?? '');\r\n const indexB = VehicleAttachmentTypeCodeOrder.indexOf(b!.attachmentTypeCode ?? '');\r\n return indexA - indexB;\r\n });\r\n console.log('attachments', attachments);\r\n const result = await this.vehicleService.PublishAdvert(\r\n this.state.vehicleAdvertData.id,\r\n selectedAdvertiserCodes,\r\n attachments\r\n );\r\n\r\n const { success, details } = result;\r\n if (success) {\r\n const vehicleAdvertHistory = await this.getVehicleAdvertHistoryAmongWithUsers();\r\n this.setState({\r\n vehicleAdvertHistory: vehicleAdvertHistory\r\n });\r\n }\r\n success\r\n ? this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n })\r\n : this.props.enqueueSnackbar(this.getErrorDetails(details), {\r\n variant: 'error',\r\n autoHideDuration: 5000\r\n });\r\n\r\n // Send published adverts to RCR only if the vehicle is imported\r\n if (this.props.vehicleState.vehicle?.isImported) {\r\n const originalPrice = Number(this.state.vehicleAdvertData.priceWithVat);\r\n const priceForEmployee = originalPrice - originalPrice * 0.05;\r\n const hasDecimal = priceForEmployee % 1 !== 0;\r\n const formattedPrice = hasDecimal\r\n ? Number(priceForEmployee.toFixed(1))\r\n : Number(priceForEmployee);\r\n const adDetails = [] as AddDetailsPublishRcr[];\r\n\r\n result.advertPublishedResults.map((item) => {\r\n adDetails.push({\r\n AdvertiserCode: item.advertiser,\r\n AdUrl: item.url,\r\n Price: formattedPrice\r\n });\r\n });\r\n\r\n const requestData = {\r\n ConnectId: this.state.vehicleAdvertData.vehicleId,\r\n AdDetails: adDetails\r\n } as PublishAdvertRcr;\r\n\r\n const sendAdvertsToRcrResult = await this.vehicleService.SendPublishedAdvertsToRcr(\r\n requestData\r\n );\r\n\r\n sendAdvertsToRcrResult.success\r\n ? this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'SUCCES_MSG_SEND_ADVERTS_TO_RCR',\r\n 'Operatiunea publicarii anuntului catre angajati a fost realizata cu succes'\r\n ),\r\n {\r\n variant: 'success'\r\n }\r\n )\r\n : this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'ERROR_MSG_SEND_ADVERTS_TO_RCR',\r\n 'Operatiunea publicarii anuntului catre angajati nu a putut fi realizata'\r\n ),\r\n {\r\n variant: 'error',\r\n autoHideDuration: 5000\r\n }\r\n );\r\n }\r\n\r\n this.setState({\r\n isPublishLoading: false\r\n });\r\n } catch (ex) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n } finally {\r\n this.setState({\r\n executing: false,\r\n isPublishLoading: false\r\n });\r\n }\r\n };\r\n\r\n deleteAdvert = (operationType: string) => async (e: any) => {\r\n try {\r\n this.setState({ executing: true });\r\n const selectedAdvertiserCodes = [...this.state.advertiserOperations]\r\n .filter((item) => item.operationType === operationType && item.checked === true)\r\n .map((item) => item.advertiserCode);\r\n\r\n const result = await this.vehicleService.DeleteAdvert(\r\n this.state.vehicleAdvertData.id,\r\n selectedAdvertiserCodes\r\n );\r\n const { success, details } = result;\r\n\r\n if (success) {\r\n const vehicleAdvertHistory = await this.getVehicleAdvertHistoryAmongWithUsers();\r\n this.setState({ vehicleAdvertHistory: vehicleAdvertHistory });\r\n }\r\n\r\n success\r\n ? this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n })\r\n : this.props.enqueueSnackbar(this.getErrorDetails(details), {\r\n variant: 'error',\r\n autoHideDuration: 5000\r\n });\r\n } catch (ex) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n } finally {\r\n this.setState({\r\n executing: false\r\n });\r\n }\r\n };\r\n\r\n checkConfirmChanges = async () => {\r\n if (!this.state.vehicleAdvertData.vehicleAdvertOptions.length) {\r\n this.setState({ isOpen: true, dialogVisible: true });\r\n } else {\r\n this.submitData();\r\n }\r\n };\r\n\r\n submitData = async () => {\r\n try {\r\n this.setState({ executing: true, isOpen: false, dialogVisible: false });\r\n\r\n const data: VehicleAdvert = {\r\n ...this.state.vehicleAdvertData,\r\n vatAmount: this.state.vehicleAdvertData.priceWithVat - this.state.vehicleAdvertData.price\r\n };\r\n\r\n const result = await this.vehicleService.SaveVehicleAdvert(data);\r\n\r\n const vehicleAdvertHistory = await this.getVehicleAdvertHistoryAmongWithUsers();\r\n this.setState({\r\n vehicleAdvertData: {\r\n ...data,\r\n id: result.id\r\n },\r\n vehicleAdvertHistory: vehicleAdvertHistory\r\n });\r\n\r\n await this.submitForm(\r\n this.props.caseSettingsState.case!.id,\r\n this.props.workflowForm.id,\r\n null\r\n );\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (ex) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n } finally {\r\n this.setState({\r\n executing: false\r\n });\r\n }\r\n };\r\n\r\n submitForm = async (caseId: number, caseSectionStepFormId: number, appUser: AppUser | null) => {\r\n let newStatus = await this.caseService.SubmitForm(caseId, caseSectionStepFormId, appUser);\r\n\r\n if (newStatus === null) {\r\n newStatus = this.props.caseSettingsState.case!.caseStatus;\r\n }\r\n\r\n this.props.SetCaseStatus(newStatus);\r\n if (appUser !== null) {\r\n this.props.AddPartner(appUser!.hoId === null ? appUser!.organizationId : appUser!.hoId);\r\n }\r\n\r\n const hasRights = FormHelpers.HasRights(\r\n this.props.workflowForm.workflowFormPermissions,\r\n this.props.appState.appUser!,\r\n newStatus.caseStatusId\r\n );\r\n this.setState({ hasRights: hasRights });\r\n };\r\n\r\n getVATValue = (price: number, vat: number): number => {\r\n return Number.parseFloat((price * (vat / 100)).toFixed(2));\r\n };\r\n\r\n getPriceWithVAT = (price: number, vat: number) => {\r\n const vatValue = Number.parseFloat((price * (vat / 100)).toFixed(2));\r\n return price + vatValue;\r\n };\r\n\r\n handleSwitchValue = (fieldName: string) => (e: any) => {\r\n this.setState({\r\n vehicleAdvertData: {\r\n ...this.state.vehicleAdvertData,\r\n [fieldName]: e.currentTarget.checked\r\n }\r\n });\r\n };\r\n\r\n handleIsActiveIndividual = (e: any) => {\r\n this.setState({\r\n vehicleAdvertData: {\r\n ...this.state.vehicleAdvertData,\r\n individual: e.currentTarget.checked,\r\n privateBusiness: !e.currentTarget.checked\r\n }\r\n });\r\n };\r\n\r\n handleIsActiveBusiness = (e: any) => {\r\n this.setState({\r\n vehicleAdvertData: {\r\n ...this.state.vehicleAdvertData,\r\n privateBusiness: e.currentTarget.checked,\r\n individual: !e.currentTarget.checked\r\n }\r\n });\r\n };\r\n\r\n getVATFromAdvertPrice = () => {\r\n const caseHasNoVAT = this.props.vehicleState?.vehicle?.purchaseVatRate === 0 || false;\r\n const purchasePrice = (this.props.vehicleState?.vehicle?.purchasePrice as number) || 0;\r\n\r\n const advertPrice = this.state.vehicleAdvertData.priceWithVat;\r\n const caseParameters = this.props.caseSettingsState.case!.caseParameters;\r\n const vatParameter = caseParameters.filter(\r\n (parameter) => parameter.parameter!.code === ParametreCode.TVA\r\n );\r\n const vat = parseFloat(vatParameter[0]!.value);\r\n\r\n if (!caseHasNoVAT) {\r\n const offerPriceWithoutVAT = advertPrice / (1 + vat / 100);\r\n\r\n return Number.parseFloat((offerPriceWithoutVAT * (vat / 100)).toFixed(2));\r\n }\r\n\r\n return Utils.getMarginVat(advertPrice, purchasePrice, vat);\r\n };\r\n\r\n handleMakeTypeChange = async (newValue: IReferential | null) => {\r\n this.setState({\r\n vehicleAdvertData: {\r\n ...this.state.vehicleAdvertData,\r\n make: newValue,\r\n makeId: newValue === null ? null : newValue.id\r\n }\r\n });\r\n };\r\n\r\n handleModelTypeChange = (newValue: IReferential | null) => {\r\n this.setState({\r\n vehicleAdvertData: {\r\n ...this.state.vehicleAdvertData,\r\n model: newValue,\r\n modelId: newValue === null ? null : newValue.id\r\n }\r\n });\r\n };\r\n\r\n handleFuelTypeChange = (newValue: IReferential | null) => {\r\n this.setState({\r\n vehicleAdvertData: {\r\n ...this.state.vehicleAdvertData,\r\n fuelType: newValue,\r\n fuelTypeId: newValue === null ? null : newValue.id\r\n }\r\n });\r\n };\r\n\r\n handleTransmissionTypeChange = (newValue: IReferential | null) => {\r\n this.setState({\r\n vehicleAdvertData: {\r\n ...this.state.vehicleAdvertData,\r\n tractionType: newValue,\r\n tractionTypeId: newValue === null ? null : newValue.id\r\n }\r\n });\r\n };\r\n\r\n handleGearBoxTypeChange = (newValue: IReferential | null) => {\r\n this.setState({\r\n vehicleAdvertData: {\r\n ...this.state.vehicleAdvertData,\r\n transmissionType: newValue,\r\n transmissionTypeId: newValue === null ? null : newValue.id\r\n }\r\n });\r\n };\r\n\r\n handlePollutionNormTypeChange = (newValue: IReferential | null) => {\r\n this.setState({\r\n vehicleAdvertData: {\r\n ...this.state.vehicleAdvertData,\r\n pollutionNorm: newValue,\r\n pollutionNormId: newValue === null ? null : newValue.id\r\n }\r\n });\r\n };\r\n\r\n handleCarBodyTypeChange = (newValue: IReferential | null) => {\r\n this.setState({\r\n vehicleAdvertData: {\r\n ...this.state.vehicleAdvertData,\r\n bodyType: newValue,\r\n bodyTypeId: newValue === null ? null : newValue.id\r\n }\r\n });\r\n };\r\n\r\n handleGuaranteeTypeChange = (newValue: IReferential | null) => {\r\n this.setState({\r\n vehicleAdvertData: {\r\n ...this.state.vehicleAdvertData,\r\n guaranteeType: newValue,\r\n guaranteeTypeId: newValue === null ? null : newValue.id\r\n }\r\n });\r\n };\r\n\r\n handleAdvertRegionTypeChange = (newValue: IReferential | null) => {\r\n this.setState({\r\n vehicleAdvertData: {\r\n ...this.state.vehicleAdvertData,\r\n region: newValue,\r\n regionId: newValue === null ? null : newValue.id,\r\n city: null,\r\n cityId: null,\r\n district: null,\r\n districtId: null\r\n }\r\n });\r\n };\r\n\r\n handleAdvertOriginCountryTypeChange = (newValue: IReferential | null) => {\r\n this.setState({\r\n vehicleAdvertData: {\r\n ...this.state.vehicleAdvertData,\r\n countryOrigin: newValue,\r\n countryOriginId: newValue === null ? null : newValue.id\r\n }\r\n });\r\n };\r\n\r\n handleAdvertDistrictTypeChange = (newValue: IReferential | null) => {\r\n this.setState({\r\n vehicleAdvertData: {\r\n ...this.state.vehicleAdvertData,\r\n district: newValue,\r\n districtId: newValue === null ? null : newValue.id\r\n }\r\n });\r\n };\r\n\r\n handleAdvertCityTypeChange = (newValue: IReferential | null) => {\r\n this.setState({\r\n vehicleAdvertData: {\r\n ...this.state.vehicleAdvertData,\r\n city: newValue,\r\n cityId: newValue === null ? null : newValue.id,\r\n district: null,\r\n districtId: null\r\n }\r\n });\r\n };\r\n\r\n handlePaintTypeChange = (newValue: IReferential | null) => {\r\n this.setState({\r\n vehicleAdvertData: {\r\n ...this.state.vehicleAdvertData,\r\n paintType: newValue,\r\n paintTypeId: newValue === null ? null : newValue.id\r\n }\r\n });\r\n };\r\n\r\n handleColorTypeChange = (newValue: IReferential | null) => {\r\n this.setState({\r\n vehicleAdvertData: {\r\n ...this.state.vehicleAdvertData,\r\n color: newValue,\r\n colorId: newValue === null ? null : newValue.id\r\n }\r\n });\r\n };\r\n\r\n handleManufacturerWarrantyDateChange = (date: MaterialUiPickersDate | null) => {\r\n if (date === null || !date.isValid) {\r\n return;\r\n }\r\n\r\n this.setState({\r\n vehicleAdvertData: {\r\n ...this.state.vehicleAdvertData,\r\n manufacturerWarrantyDate: new Date(date.format('YYYY-MM-DD'))\r\n }\r\n });\r\n };\r\n\r\n handleManufacturerWarrantyDateClear = () => {\r\n this.setState({\r\n vehicleAdvertData: {\r\n ...this.state.vehicleAdvertData,\r\n manufacturerWarrantyDate: null\r\n }\r\n });\r\n };\r\n\r\n handleManufacturedYearDateChange = (date: MaterialUiPickersDate | null) => {\r\n if (date === null || !date.isValid) {\r\n return;\r\n }\r\n\r\n this.setState({\r\n vehicleAdvertData: {\r\n ...this.state.vehicleAdvertData,\r\n makeDate: new Date(date.format('YYYY-MM-DD'))\r\n }\r\n });\r\n };\r\n\r\n handleFirstRegistrationDateChange = (date: MaterialUiPickersDate | null) => {\r\n if (date === null || !date.isValid) {\r\n return;\r\n }\r\n\r\n this.setState({\r\n vehicleAdvertData: {\r\n ...this.state.vehicleAdvertData,\r\n firstRegistrationDate: new Date(date.format('YYYY-MM-DD'))\r\n }\r\n });\r\n };\r\n\r\n handleToggleOptions = (id: number) => (event: any) => {\r\n const idx = this.state.vehicleOptions.findIndex((item) => item.id == id);\r\n const newOptions = [...this.state.vehicleOptions];\r\n newOptions[idx] = {\r\n ...newOptions[idx],\r\n checked: event.target.checked,\r\n tableData: {\r\n checked: event.target.checked\r\n }\r\n } as any;\r\n const vehicleAdvertOptions = newOptions\r\n .filter((item: any) => item.checked === true)\r\n .map((item) => ({\r\n vehicleAdvertId: this.state.vehicleAdvertData.id,\r\n vehicleOptionId: item.id,\r\n gtid: this.props.appState.appUser!.gtId\r\n })) as any;\r\n\r\n this.setState({\r\n vehicleOptions: newOptions,\r\n vehicleAdvertData: {\r\n ...this.state.vehicleAdvertData,\r\n vehicleAdvertOptions: vehicleAdvertOptions\r\n }\r\n });\r\n };\r\n\r\n onToogleAdvertiser = (e: any, operationType: string, advertiserCode: string) => {\r\n const advertiserOperations = [...this.state.advertiserOperations];\r\n const idx = advertiserOperations.findIndex(\r\n (item) => item.operationType === operationType && item.advertiserCode === advertiserCode\r\n );\r\n idx < 0\r\n ? advertiserOperations.push({\r\n operationType: operationType,\r\n advertiserCode: advertiserCode,\r\n checked: e.currentTarget.checked\r\n })\r\n : (advertiserOperations[idx].checked = e.currentTarget.checked);\r\n\r\n this.setState({ advertiserOperations: advertiserOperations });\r\n };\r\n\r\n getAdvertReportWord = async (vehicleAdvertId: number, vehicleId: number, caseId: number) => {\r\n const reportParameters = [\r\n {\r\n name: 'vehicleId',\r\n value: vehicleId.toString()\r\n } as ReportParameter,\r\n {\r\n name: 'caseId',\r\n value: caseId.toString()\r\n } as ReportParameter,\r\n {\r\n name: 'vehicleAdvertId',\r\n value: vehicleAdvertId.toString()\r\n } as ReportParameter,\r\n {\r\n name: 'organizationId',\r\n value: this.props.appState.appUser!.organization?.id.toString()\r\n } as ReportParameter,\r\n\r\n {\r\n name: 'apiUrl',\r\n value: Constants.apiRoot\r\n } as ReportParameter,\r\n {\r\n name: 'organizationOwnerId',\r\n value: this.props.caseSettingsState.case?.organizationOwnerId.toString()\r\n } as ReportParameter\r\n ];\r\n const fileBlob = await this.reportService.GetReport(\r\n ReportTypeCode.ADVERT_REPORT,\r\n reportParameters\r\n );\r\n FileSaver.saveAs(fileBlob, 'Afis Pret.docx');\r\n if (this.props.caseSettingsState.caseSettings!.workflow.saveDocuments) {\r\n const fileName = `Afis Pret_${vehicleAdvertId}.docx`;\r\n console.log('Save file', fileName, 'Id Publicare', vehicleAdvertId);\r\n await this.saveGeneratedFile(fileBlob, fileName);\r\n }\r\n };\r\n\r\n\r\n saveGeneratedFile = async (fileBlob: Blob, fileName: string) => {\r\n try {\r\n //Save the report into attachments\r\n const attachments: CaseAttachment[] = [];\r\n attachments.push({\r\n id: 0,\r\n caseId: this.props.caseSettingsState.case!.id,\r\n attachmentTypeId: this.state.attachType.id,\r\n attachmentType: this.state.attachType,\r\n file: new File([fileBlob], fileName),\r\n isSelection: false,\r\n includeInOtherTab: true,\r\n checkFileName: true\r\n } as CaseAttachment);\r\n\r\n const newFiles = await this.caseService.AddCaseAttachment(attachments);\r\n\r\n console.log('newFiles', newFiles);\r\n } catch (error) {\r\n console.log('error', error);\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n \r\n showOfferTimeline = () => {\r\n const caseHasNoVAT = this.props.vehicleState?.vehicle?.purchaseVatRate == 0;\r\n\r\n return this.state.vehicleAdvertHistory.map((vehicleAdv, index) => (\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n this.getAdvertReportWord(vehicleAdv.id, vehicleAdv.vehicleId, vehicleAdv.caseId)\r\n }\r\n >\r\n {this.translatorService.Tranlate('ADVERT_REPORT_PDF', 'Afis Pret')}\r\n \r\n \r\n \r\n\r\n

\r\n {moment.utc(vehicleAdv.dateCreation).local().format(this.props.appState.longDateFormat)}\r\n

\r\n

\r\n {vehicleAdv.createdByUser?.userName}\r\n

\r\n

\r\n {caseHasNoVAT\r\n ? this.translatorService.Tranlate('VEHICLE_ADVERT_PRICE_OFFERED', 'Pret calculat')\r\n : this.translatorService.Tranlate(\r\n 'VEHICLE_ADVERT_PRICE_OFFERED_WITH_VAT',\r\n 'Pret calculat cu TVA'\r\n )}\r\n :{vehicleAdv.priceWithVat + ' ' + this.state.vehicleAdvertData.currency},\r\n

\r\n {vehicleAdv.vehicleAdvertAdvertisers.map((item, idx) => (\r\n \r\n ))}\r\n
\r\n
\r\n ));\r\n };\r\n\r\n isAdvertisersDisabled(operationType: string): boolean | undefined {\r\n const operation =\r\n operationType == VehicleAdvertOperationTypes.publish\r\n ? VehicleAdvertOperationTypes.delete\r\n : VehicleAdvertOperationTypes.publish;\r\n const result = this.state.advertiserOperations.filter(\r\n (item) => item.operationType === operation && item.checked === true\r\n );\r\n if (result && result.length) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n renderAdvertisers = (operationType: string) => {\r\n const isMavoAdvertPresent = this.state.advertisers.some(\r\n (i) => i.code === AdvertOptionCodeEnum.MAVO\r\n );\r\n return this.state.advertisers.map((adv, index) => {\r\n return (\r\n \r\n
\r\n this.onToogleAdvertiser(e, operationType, adv.code!)}\r\n color=\"primary\"\r\n />\r\n }\r\n label={adv.name ? adv.displayName : ''}\r\n labelPlacement=\"end\"\r\n className=\"mt-2 ml-0 mr-0\"\r\n />\r\n
\r\n
\r\n );\r\n });\r\n };\r\n\r\n handleCloseConfirmationDialog = () => {\r\n this.setState({\r\n isOpen: false,\r\n dialogVisible: false\r\n });\r\n };\r\n\r\n handleOpenConfirmationDialog = () => {\r\n this.setState({\r\n isOpen: true,\r\n dialogVisible: true\r\n });\r\n };\r\n\r\n handleCloseModal = () => {\r\n this.setState({\r\n isOpen: false,\r\n dialogVisible: false\r\n });\r\n };\r\n\r\n getCarOptionsColumns = () => {\r\n return [\r\n {\r\n field: 'name',\r\n title: this.translatorService.Tranlate(\r\n 'CAR_DETAILS_CAR_ADEVERT_OPTIONAL_OPTION',\r\n 'Descriere dotari autovehicul'\r\n ),\r\n searchable: true\r\n } as Column,\r\n {\r\n field: 'checked',\r\n render: (option: VehicleOption) => {\r\n return (\r\n
\r\n \r\n
\r\n );\r\n }\r\n } as Column\r\n ];\r\n };\r\n\r\n public renderCarOptionsTable = () => {\r\n return (\r\n \r\n }}\r\n />\r\n );\r\n };\r\n scrollToRef = (ref: any) => window.scrollTo(0, ref.current.offsetTop);\r\n\r\n rendeVehicleAdvertForm = () => {\r\n const calculatedPriceWithVat = this.translatorService.Tranlate(\r\n 'VEHICLE_ADVERT_FORM_PRICE_WITH_VAT',\r\n 'Pret calculat cu TVA'\r\n );\r\n\r\n const advertPriceWithVat = this.translatorService.Tranlate(\r\n 'VEHICLE_ADVERT_FORM_ADVERT_PRICE_WITH_VAT',\r\n 'Pret anunt cu TVA'\r\n );\r\n\r\n const caseHasNoVAT = this.props.vehicleState?.vehicle?.purchaseVatRate === 0 || false;\r\n const purchasePrice = (this.props.vehicleState?.vehicle?.purchasePrice as number) || 0;\r\n\r\n return (\r\n {\r\n this.checkConfirmChanges();\r\n }}\r\n onError={(errors) => {\r\n if (errors[0].props.name === 'advertPriceWithVAT') {\r\n this.scrollToRef(this.inputTextValidator);\r\n }\r\n }}\r\n >\r\n
\r\n \r\n \r\n {\r\n this.setState({\r\n valuationPrice: e.target.value\r\n });\r\n }}\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n label={this.translatorService.Tranlate(\r\n 'VEHICLE_ADVERT_FORM_PRICE_WITHOUT_VAT',\r\n 'Pret calculat fara TVA'\r\n )}\r\n InputProps={{\r\n inputComponent: this.NumberFormatCustom\r\n }}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n this.setState({\r\n vehicleAdvertData: {\r\n ...this.state.vehicleAdvertData,\r\n priceWithVat: e.target.value,\r\n price: this.getPriceWithoutVAT(e.target.value, this.state.vatValue)\r\n }\r\n });\r\n }}\r\n validators={['required', 'matchRegexp:^[1-9][0-9]*$']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu'),\r\n this.translatorService.Tranlate(\r\n 'VALIDATORS_ZERO_VALUE',\r\n 'Va rugam sa completati pretul de vanzare'\r\n )\r\n ]}\r\n label={advertPriceWithVat}\r\n InputProps={{\r\n inputComponent: this.NumberFormatCustom\r\n }}\r\n />\r\n \r\n \r\n
\r\n {this.translatorService.Tranlate(\r\n 'VEHICLE_ADVERT_FORM_FINANCIAL_OPTIONS_TITLE',\r\n 'Optiuni financiare'\r\n )}\r\n
\r\n \r\n \r\n
\r\n \r\n }\r\n label={this.translatorService.Tranlate(\r\n 'VEHICLE_ADVERT_FORM_HAS_INVOICE',\r\n 'Se emite factura'\r\n )}\r\n labelPlacement=\"end\"\r\n className=\"mt-3 ml-0 mr-0\"\r\n />\r\n
\r\n
\r\n \r\n
\r\n \r\n }\r\n label={this.translatorService.Tranlate(\r\n 'VEHICLE_ADVERT_FORM_HAS_LEASING',\r\n 'Predare leasing'\r\n )}\r\n labelPlacement=\"end\"\r\n className=\"mt-3 ml-0 mr-0\"\r\n />\r\n
\r\n
\r\n \r\n
\r\n \r\n }\r\n label={this.translatorService.Tranlate(\r\n 'VEHICLE_ADVERT_FORM_HAS_AUTHORIZED_DEALER',\r\n 'Dealer autorizat'\r\n )}\r\n labelPlacement=\"end\"\r\n className=\"mt-3 ml-0 mr-0\"\r\n />\r\n
\r\n
\r\n
\r\n {\r\n this.setState({\r\n vehicleAdvertData: {\r\n ...this.state.vehicleAdvertData,\r\n description: e.target.value\r\n }\r\n });\r\n }}\r\n validators={['required', 'minLength', 'maxLength']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu'),\r\n this.translatorService.Tranlate(\r\n 'VALIDATORS_MIN_LENGTH',\r\n 'Numar minim de caractere: '\r\n ) + minNumberOfCharactersAdvertDetails,\r\n this.translatorService.Tranlate(\r\n 'VALIDATORS_MAX_LENGTH',\r\n 'Numar maxim de caractere: '\r\n ) + maxNumberOfCharactersAdvertDetails\r\n ]}\r\n label={this.translatorService.Tranlate(\r\n 'VEHICLE_ADVERT_FORM_OBSERVATIONS',\r\n 'Detalii anunt'\r\n )}\r\n multiline\r\n variant=\"outlined\"\r\n rows={6}\r\n />\r\n {/*\r\n
\r\n {this.translatorService.Tranlate('VEHICLE_ADVERT_FORM_REGIONS_TITLE', 'Locatie anunt')}\r\n
\r\n\r\n \r\n \r\n
\r\n \r\n this.handleAdvertRegionTypeChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n \r\n
\r\n city.dependencyId === this.state.vehicleAdvertData.regionId\r\n ) || this.state.citiesTypes\r\n }\r\n value={this.state.vehicleAdvertData.city || null}\r\n onChange={(e: any, newValue: IReferential | null) =>\r\n this.handleAdvertCityTypeChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n
\r\n district.dependencyId === this.state.vehicleAdvertData.cityId\r\n ) || []\r\n }\r\n value={this.state.vehicleAdvertData.district || null}\r\n onChange={(e: any, newValue: IReferential | null) =>\r\n this.handleAdvertDistrictTypeChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n district.dependencyId === this.state.vehicleAdvertData.cityId\r\n ).length > 0\r\n ? ['required']\r\n : []\r\n }\r\n errorMessages={[\r\n this.translatorService.Tranlate(\r\n 'VALIDATORS_REQUIRED',\r\n 'Campul este obligatoriu'\r\n )\r\n ]}\r\n />\r\n )}\r\n />\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n */}\r\n
\r\n {this.translatorService.Tranlate('VEHICLE_ADVERT_FORM_DETAILS_TITLE', 'Detalii')}\r\n
\r\n \r\n \r\n \r\n this.handleColorTypeChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n\r\n \r\n \r\n this.handlePaintTypeChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n this.handleMakeTypeChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n\r\n \r\n \r\n this.handleModelTypeChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n {/* */}\r\n \r\n \r\n \r\n {/* \r\n
\r\n this.handleIsActiveFinanceEligibility(e)}\r\n color=\"primary\" />}\r\n label={this.translatorService.Tranlate(\"VEHICLE_ADVERT_FORM_HAS_FINANCE_ELIGIBILITY\", \"Eligibil pentru finantare\")}\r\n labelPlacement=\"end\"\r\n className=\"mt-3 ml-0 mr-0\"\r\n />\r\n
\r\n
*/}\r\n
\r\n \r\n \r\n {\r\n this.setState({\r\n vehicleAdvertData: {\r\n ...this.state.vehicleAdvertData,\r\n version: e.target.value\r\n }\r\n });\r\n }}\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n label={this.translatorService.Tranlate('VEHICLE_ADVERT_FORM_VERSION', 'Versiune')}\r\n />\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n ) : (\r\n ''\r\n )\r\n }}\r\n // minDate={new Date(\"01.01.1900\")}\r\n // error={this.state.datePickerYearOfFabricationError}\r\n // helperText={this.state.datePickerYearOfFabricationError === true ? this.translatorService.Tranlate(\"CAR_DETAILS_YEAR_OF_FABRICATION_ERROR\", \"Data fabricatiei trebuie sa fie mai mica decat cea a primei inmatriculari\") : \"\"}\r\n // minDate={activeButton === 1 ? new Date() : this.state.minDate}\r\n />\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {\r\n this.setState({\r\n vehicleAdvertData: {\r\n ...this.state.vehicleAdvertData,\r\n warrantyKmLimit: e.target.value\r\n }\r\n });\r\n }}\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate(\r\n 'VALIDATORS_REQUIRED',\r\n 'Campul este obligatoriu'\r\n )\r\n ]}\r\n label={this.translatorService.Tranlate(\r\n 'VEHICLE_ADVERT_FORM_KM_LIMIT',\r\n 'sau in limita a'\r\n )}\r\n InputProps={{\r\n inputComponent: this.NumberFormatCustom\r\n }}\r\n />\r\n
\r\n
\r\n
\r\n \r\n \r\n {\r\n this.setState({\r\n vehicleAdvertData: {\r\n ...this.state.vehicleAdvertData,\r\n kilometersNr: e.target.value\r\n }\r\n });\r\n }}\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n label={this.translatorService.Tranlate('VEHICLE_ADVERT_FORM_KM', 'Kilometraj')}\r\n InputProps={{\r\n inputComponent: this.NumberFormatCustom\r\n }}\r\n />\r\n \r\n \r\n
\r\n \r\n this.handleAdvertOriginCountryTypeChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n
\r\n \r\n \r\n {\r\n this.setState({\r\n vehicleAdvertData: {\r\n ...this.state.vehicleAdvertData,\r\n vin: e.target.value\r\n }\r\n });\r\n }}\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n label={this.translatorService.Tranlate('VEHICLE_ADVERT_FORM_VIN', 'VIN')}\r\n />\r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n this.handleFuelTypeChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n
\r\n \r\n }\r\n label={this.translatorService.Tranlate(\r\n 'VEHICLE_ADVERT_FORM_HAS_REGISTERED',\r\n 'Inmatriculat'\r\n )}\r\n labelPlacement=\"end\"\r\n className=\"mt-3 ml-0 mr-0\"\r\n />\r\n
\r\n
\r\n
\r\n \r\n \r\n {\r\n this.setState({\r\n vehicleAdvertData: {\r\n ...this.state.vehicleAdvertData,\r\n horsePower: e.target.value\r\n }\r\n });\r\n }}\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n label={this.translatorService.Tranlate('VEHICLE_ADVERT_FORM_HP', 'Putere')}\r\n InputProps={{\r\n inputComponent: this.NumberFormatCustom\r\n }}\r\n />\r\n \r\n \r\n
\r\n \r\n }\r\n label={this.translatorService.Tranlate(\r\n 'VEHICLE_ADVERT_FORM_HAS_FIRST_OWNER',\r\n 'Primul proprietar'\r\n )}\r\n labelPlacement=\"end\"\r\n className=\"mt-3 ml-0 mr-0\"\r\n />\r\n
\r\n
\r\n
\r\n \r\n \r\n {\r\n this.setState({\r\n vehicleAdvertData: {\r\n ...this.state.vehicleAdvertData,\r\n engineSize: e.target.value\r\n }\r\n });\r\n }}\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n label={this.translatorService.Tranlate(\r\n 'VEHICLE_ADVERT_FORM_CM3',\r\n 'Capacitate cilindrica'\r\n )}\r\n InputProps={{\r\n inputComponent: this.NumberFormatCustom\r\n }}\r\n />\r\n \r\n \r\n
\r\n \r\n }\r\n label={this.translatorService.Tranlate(\r\n 'VEHICLE_ADVERT_FORM_HAS_FIRST_ACCIDENT',\r\n 'Fara accident in istoric'\r\n )}\r\n labelPlacement=\"end\"\r\n className=\"mt-3 ml-0 mr-0\"\r\n />\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n this.handleTransmissionTypeChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n
\r\n \r\n }\r\n label={this.translatorService.Tranlate(\r\n 'VEHICLE_ADVERT_FORM_HAS_SERVICE_BOOK',\r\n 'Carte de service'\r\n )}\r\n labelPlacement=\"end\"\r\n className=\"mt-3 ml-0 mr-0\"\r\n />\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n this.handleGearBoxTypeChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n
\r\n \r\n }\r\n label={this.translatorService.Tranlate('VEHICLE_ADVERT_FORM_IS_NEW', 'Nou')}\r\n labelPlacement=\"end\"\r\n className=\"mt-3 ml-0 mr-0\"\r\n />\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n this.handlePollutionNormTypeChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n\r\n \r\n
\r\n \r\n }\r\n label={this.translatorService.Tranlate(\r\n 'VEHICLE_ADVERT_FORM_HAS_PARTICLES_FILTER',\r\n 'Filtru de particule'\r\n )}\r\n labelPlacement=\"end\"\r\n className=\"mt-3 ml-0 mr-0\"\r\n />\r\n
\r\n
\r\n\r\n \r\n
\r\n {\r\n this.setState({\r\n vehicleAdvertData: {\r\n ...this.state.vehicleAdvertData,\r\n co2Emission: e.target.value\r\n }\r\n });\r\n }}\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate(\r\n 'VALIDATORS_REQUIRED',\r\n 'Campul este obligatoriu'\r\n )\r\n ]}\r\n label={this.translatorService.Tranlate(\r\n 'VEHICLE_ADVERT_FORM_CO2_EMISSION',\r\n 'Emisii CO2'\r\n )}\r\n InputProps={{\r\n inputComponent: this.NumberFormatCustom\r\n }}\r\n />\r\n
\r\n
\r\n\r\n \r\n
\r\n \r\n }\r\n label={this.translatorService.Tranlate(\r\n 'VEHICLE_ADVERT_FORM_HAS_FINANCE_ELIGIBILITY',\r\n 'Eligibil pentru finantare'\r\n )}\r\n labelPlacement=\"end\"\r\n className=\"mt-3 ml-0 mr-0\"\r\n />\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n {\r\n this.setState({\r\n vehicleAdvertData: {\r\n ...this.state.vehicleAdvertData,\r\n nrOfDoors: e.target.value\r\n }\r\n });\r\n }}\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate(\r\n 'VALIDATORS_REQUIRED',\r\n 'Campul este obligatoriu'\r\n )\r\n ]}\r\n label={this.translatorService.Tranlate(\r\n 'VEHICLE_ADVERT_FORM_NR_OF_DOORS',\r\n 'Numar de portiere'\r\n )}\r\n InputProps={{\r\n inputComponent: this.NumberFormatCustom\r\n }}\r\n />\r\n
\r\n
\r\n \r\n
\r\n \r\n this.handleCarBodyTypeChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n this.handleGuaranteeTypeChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n }\r\n label={this.translatorService.Tranlate(\r\n 'VEHICLE_ADVERT_FORM_HAS_STANDARD_IMAGES',\r\n 'Fotografii Standard'\r\n )}\r\n labelPlacement=\"end\"\r\n className=\"mt-3 ml-0 mr-0\"\r\n />\r\n
\r\n
\r\n \r\n
\r\n \r\n }\r\n label={this.translatorService.Tranlate(\r\n 'VEHICLE_ADVERT_FORM_HAS_OPTIONAL_IMAGES',\r\n 'Fotografii Optionale'\r\n )}\r\n labelPlacement=\"end\"\r\n className=\"mt-3 ml-0 mr-0\"\r\n />\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n {this.translatorService.Tranlate(\r\n 'VEHICLE_ADVERT_FORM_OPTIONS_TITLE',\r\n 'Dotari standard + optionale '\r\n )}\r\n
\r\n {this.state.vehicleOptions ? this.renderCarOptionsTable() : ''}\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n {`${this.translatorService.Tranlate(\r\n 'VEHICLE_OPTION_CONFIRMATION_MESSAGE',\r\n 'Nu a fost selectata nicio optiune de echipare , doriti sa continuati ?'\r\n )} `}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.translatorService.Tranlate('SAVE', 'Salveaza')}\r\n \r\n\r\n \r\n \r\n \r\n {this.state.isPublishLoading && (\r\n \r\n )}\r\n {this.translatorService.Tranlate(\r\n 'VEHICLE_ADVERT_FORM_PUBLISH_ADVERT',\r\n 'Publica anunt'\r\n )}\r\n \r\n \r\n {this.renderAdvertisers(VehicleAdvertOperationTypes.publish)}\r\n \r\n\r\n \r\n \r\n \r\n {this.translatorService.Tranlate('VEHICLE_ADVERT_FORM_DELETE_ADVERT', 'Sterge anunt')}\r\n \r\n \r\n {this.renderAdvertisers(VehicleAdvertOperationTypes.delete)}\r\n \r\n \r\n );\r\n };\r\n\r\n private optionIsChecked(option: VehicleOption): boolean | undefined {\r\n const res = (this.state.vehicleOptions.find((op) => op.id === option.id) as any).checked;\r\n return res || false;\r\n }\r\n\r\n private isChecked(operationType: string, advertiserCode: string): boolean | undefined {\r\n const result = this.state.advertiserOperations.find(\r\n (item) => item.operationType === operationType && item.advertiserCode === advertiserCode\r\n );\r\n return result === undefined ? false : result.checked;\r\n }\r\n\r\n private publishingAndDeletingAreAllowed(operationType: string): boolean {\r\n const selectedAdvertiserCodes = this.state.advertiserOperations.find(\r\n (item) => item.operationType === operationType && item.checked === true\r\n );\r\n\r\n return (\r\n !this.state.hasRights ||\r\n this.state.executing ||\r\n this.state.vehicleAdvertData.id === 0 ||\r\n !selectedAdvertiserCodes ||\r\n selectedAdvertiserCodes.length === 0\r\n );\r\n }\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n this.vehicleService = (this.context as AppContext).vehicleService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n this.appUserService = (this.context as AppContext).appUserService;\r\n this.reportService = (this.context as AppContext).reportsService;\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n
{this.rendeVehicleAdvertForm()}
\r\n ) : null}\r\n\r\n \r\n {this.state.vehicleAdvertHistory.length > 0 ? (\r\n
\r\n {this.showOfferTimeline()}\r\n
\r\n ) : (\r\n ''\r\n )}\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalCaseDetailsCaseTabVwehicleAdvertProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app,\r\n vehicleState: state.vehicle\r\n }),\r\n CaseSettingsActionCreators,\r\n mergeProps\r\n)(withSnackbar(CaseDetailsCaseTabVehicleAdvertComponent as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n ApplicationState,\r\n CaseSettingsState,\r\n AppState,\r\n CaseSettingsActionCreators\r\n} from '../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { isNullOrUndefined } from 'util';\r\nimport { CaseEventHistory } from '../../interfaces/Case';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport { IReferentialService } from '../../services/Interfaces/IReferentialService';\r\nimport { WorkflowCostCenter, WorkflowSectionStepForm } from '../../interfaces/Workflow';\r\nimport { FormHelpers } from '../../helpers/forms/FormHelpers';\r\nimport { AppUser } from '../../interfaces/AppUser';\r\nimport { IOrganizationService } from '../../services/Interfaces/IOrganizationService';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport DropdownTreeSelect from 'react-dropdown-tree-select';\r\nimport { Button, Grid } from '@material-ui/core';\r\nimport _ from 'lodash';\r\nimport { IWorkflowService } from '../../services/Interfaces/IWorkflowService';\r\nimport { ReferentialCode } from '../../helpers/Constants';\r\nimport Referentials from '../../helpers/Referentials.json';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport { Autocomplete } from '@material-ui/lab';\r\n\r\ninterface ICaseDetailsCaseTabEventBillingDetailsFormState {\r\n formData: CaseEventHistory;\r\n isLoading: boolean;\r\n workflowCostCenters: WorkflowCostCenter[];\r\n hasRights: boolean;\r\n executing: boolean;\r\n organizationBranches: OrganizationBranch[];\r\n selectedOrganizationBranch: OrganizationBranch | null;\r\n organizationDeliveryBranches: OrganizationBranch[];\r\n selectedDeliveryOrganizationBranch: OrganizationBranch | null;\r\n interventionTypesBranches: OrganizationBranch[];\r\n selectedInterventionTypeBranch: OrganizationBranch | null;\r\n}\r\n\r\ninterface OrganizationBranch {\r\n id: number;\r\n organizationId: number;\r\n organizationName: string;\r\n organizationAddress: string;\r\n children: OrganizationBranch[];\r\n parentId: number | null;\r\n path: string | null;\r\n label: string;\r\n checked: boolean | null;\r\n}\r\nexport interface ExternalCaseDetailsCaseTabEventBillingDetailsFormProps {\r\n workflowForm: WorkflowSectionStepForm;\r\n}\r\n\r\ntype ICaseDetailsCaseTabEventBillingDetailsFormProps = {\r\n caseSettingsState: CaseSettingsState;\r\n appState: AppState;\r\n} & typeof CaseSettingsActionCreators &\r\n ExternalCaseDetailsCaseTabEventBillingDetailsFormProps &\r\n ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass CaseDetailsCaseTabEventBillingDetailsForm extends React.PureComponent<\r\n ICaseDetailsCaseTabEventBillingDetailsFormProps,\r\n ICaseDetailsCaseTabEventBillingDetailsFormState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private caseService!: ICaseService;\r\n private appReferentialService!: IReferentialService;\r\n private organizationService!: IOrganizationService;\r\n private workflowService!: IWorkflowService;\r\n\r\n static contextType = ApplicationContext;\r\n state = {\r\n formData: {} as CaseEventHistory,\r\n isLoading: true,\r\n workflowCostCenters: [],\r\n hasRights: false,\r\n executing: false,\r\n organizationDeliveryBranches: [],\r\n selectedDeliveryOrganizationBranch: null,\r\n organizationBranches: [],\r\n selectedOrganizationBranch: null,\r\n interventionTypesBranches: [],\r\n selectedInterventionTypeBranch: null\r\n } as ICaseDetailsCaseTabEventBillingDetailsFormState;\r\n\r\n public componentDidMount() {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (isNullOrUndefined(caseSettings) || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadData();\r\n }\r\n );\r\n }\r\n\r\n loadData = async () => {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n\r\n if (isNullOrUndefined(caseSettings) || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n \r\n const refInterventionType = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.InterventionType\r\n );\r\n let caseEvent = this.props.caseSettingsState.case!.caseEvent;\r\n const [newCaseEvent, workflowCostCenters, interventionTypes] = await Promise.all([\r\n this.caseService.GetCurrentEvent(caseId),\r\n this.workflowService.GetUserWorkflowCostCenters(\r\n this.props.caseSettingsState.caseSettings?.workflow.id || 0\r\n ),\r\n this.appReferentialService.Get(refInterventionType!.baseUrl)\r\n ]);\r\n\r\n if (!isNullOrUndefined(newCaseEvent)) {\r\n caseEvent.organizationId = newCaseEvent.organizationId;\r\n caseEvent.deliveryOrganizationId = newCaseEvent.deliveryOrganizationId;\r\n caseEvent.interventionTypeId = newCaseEvent.interventionTypeId;\r\n this.props.SetCaseEvent(caseEvent);\r\n }\r\n\r\n //Cost Centers\r\n const organzationListBranches = [] as OrganizationBranch[];\r\n for (const x of workflowCostCenters) {\r\n organzationListBranches.push({\r\n id: x!.costCenter!.id,\r\n organizationId: x!.costCenter!.id,\r\n organizationName: x!.costCenter!.displayName,\r\n organizationAddress: '',\r\n children: [],\r\n parentId: null,\r\n path: null,\r\n label: x!.costCenter!.displayName,\r\n checked: false\r\n });\r\n }\r\n\r\n let selectedOrganization = null;\r\n if (!isNullOrUndefined(caseEvent)) {\r\n selectedOrganization =\r\n organzationListBranches.find(\r\n (x) => x.organizationId === caseEvent.organizationId\r\n ) || null;\r\n if (selectedOrganization != null) {\r\n selectedOrganization.checked = true;\r\n }\r\n }\r\n\r\n //Intervention Types\r\n const interventionTypeListBranches = [] as OrganizationBranch[];\r\n for (const x of interventionTypes) {\r\n interventionTypeListBranches.push({\r\n id: x!.id,\r\n organizationId: x!.id,\r\n organizationName: x!.displayName,\r\n organizationAddress: '',\r\n children: [],\r\n parentId: null,\r\n path: null,\r\n label: x!.displayName,\r\n checked: false\r\n });\r\n }\r\n\r\n let selectedInterventionType = null;\r\n if (!isNullOrUndefined(caseEvent)) {\r\n selectedInterventionType =\r\n interventionTypeListBranches.find(\r\n (x) => x.id === caseEvent.interventionTypeId\r\n ) || null;\r\n if (selectedInterventionType != null) {\r\n selectedInterventionType.checked = true;\r\n }\r\n }\r\n\r\n let workflowPartners = [] as OrganizationBranch[];\r\n let selectedDeliveryOrganization = null;\r\n if (\r\n this.props.caseSettingsState.caseSettings?.workflow.workflowPartners &&\r\n this.props.caseSettingsState.caseSettings?.workflow.workflowPartners.length > 0\r\n ) {\r\n const partnerOrganizations =\r\n this.props.caseSettingsState.caseSettings?.workflow.workflowPartners.map((x) => x.partner);\r\n for (const x of partnerOrganizations) {\r\n workflowPartners.push({\r\n id: x!.id,\r\n organizationId: x!.id,\r\n organizationName: x!.name,\r\n organizationAddress: x!.address,\r\n children: [],\r\n parentId: x!.parentId,\r\n path: null,\r\n label: x?.name + (x?.address ? ' ' + x?.address : ''),\r\n checked: false\r\n });\r\n }\r\n }\r\n\r\n const parentIds = workflowPartners.filter((x) => !x.parentId).map((x) => x.id);\r\n\r\n const organizationHierarchy = await this.organizationService.GetOrganizationDescendents(\r\n parentIds\r\n );\r\n\r\n const organizationDeliveryBranches =\r\n organizationHierarchy.map((x) => {\r\n return {\r\n id: x.id,\r\n organizationId: x.id,\r\n organizationName: x.name,\r\n organizationAddress: x.address,\r\n children: [],\r\n parentId: x.parentId,\r\n path: null,\r\n label: x.name + (x.address ? ' ' + x.address : ''),\r\n checked: false\r\n } as OrganizationBranch;\r\n }) || [];\r\n\r\n organizationDeliveryBranches.forEach((x) => {\r\n workflowPartners.push(x);\r\n });\r\n\r\n const arrMap = workflowPartners.reduce((acc: any, el: any, i) => {\r\n acc[el.id] = i;\r\n return acc;\r\n }, {});\r\n\r\n const roots = [] as OrganizationBranch[];\r\n\r\n // Push each element to parent's children array\r\n workflowPartners.forEach((el) => {\r\n if (el.parentId === null || arrMap[el.parentId] == null) {\r\n roots.push(el);\r\n } else {\r\n workflowPartners[arrMap[el.parentId]].children.push(el);\r\n }\r\n });\r\n workflowPartners = roots;\r\n this.assignObjectPaths(workflowPartners, '');\r\n \r\n if (!isNullOrUndefined(caseEvent)) {\r\n selectedDeliveryOrganization =\r\n roots.find(\r\n (x) => x.organizationId === caseEvent.deliveryOrganizationId\r\n ) || null;\r\n if (selectedDeliveryOrganization != null) {\r\n selectedDeliveryOrganization.checked = true;\r\n }\r\n\r\n if (selectedDeliveryOrganization == null) {\r\n selectedDeliveryOrganization =\r\n organizationDeliveryBranches.find(\r\n (x) => x.organizationId === caseEvent.deliveryOrganizationId\r\n ) || null;\r\n if (selectedDeliveryOrganization != null) {\r\n selectedDeliveryOrganization.checked = true;\r\n }\r\n }\r\n }\r\n\r\n const hasRights = FormHelpers.HasRights(\r\n this.props.workflowForm.workflowFormPermissions,\r\n this.props.appState.appUser!,\r\n this.props.caseSettingsState.case!.caseStatus.caseStatusId\r\n );\r\n\r\n if (isNullOrUndefined(this.props.caseSettingsState.case!.caseEvent)) {\r\n caseEvent = {\r\n id: 0,\r\n caseId: caseId\r\n } as CaseEventHistory\r\n }\r\n\r\n this.setState({\r\n formData: caseEvent,\r\n isLoading: false,\r\n workflowCostCenters: workflowCostCenters,\r\n hasRights: hasRights,\r\n organizationBranches: organzationListBranches,\r\n selectedOrganizationBranch: selectedOrganization || null,\r\n organizationDeliveryBranches: workflowPartners || [],\r\n selectedDeliveryOrganizationBranch: selectedDeliveryOrganization || null,\r\n interventionTypesBranches: interventionTypeListBranches,\r\n selectedInterventionTypeBranch: selectedInterventionType || null\r\n });\r\n };\r\n\r\n assignObjectPaths = (obj: any, stack: any) => {\r\n Object.keys(obj).forEach((k) => {\r\n const node = obj[k];\r\n if (node && typeof node === 'object' && !Array.isArray(node)) {\r\n node.path = stack ? `${stack}.${k}` : k;\r\n this.assignObjectPaths(node, node.path);\r\n }\r\n });\r\n };\r\n\r\n findRecursive = (\r\n arr: OrganizationBranch[],\r\n organizationId: number\r\n ): OrganizationBranch | null => {\r\n let result: OrganizationBranch | null = null;\r\n for (const entry in arr) {\r\n if (arr[entry].organizationId == organizationId) {\r\n result = arr[entry];\r\n break;\r\n }\r\n if (arr[entry].children?.length) {\r\n const partialResult = this.findRecursive(arr[entry].children, organizationId);\r\n if (partialResult != null) {\r\n result = partialResult;\r\n break;\r\n }\r\n }\r\n }\r\n return result;\r\n };\r\n\r\n \r\n onDropDownChange = (currentNode: any, selectedNodes: any) => {\r\n // react-dropdown-tree-select doesn't have an intrinsic mechanism for keeping track of selected items, only provides what is selected\r\n // So we have to manually check/uncheck the leaves from this tree used by this component\r\n let newSelectionOrganizationBranch: OrganizationBranch | null = null;\r\n if (this.state.selectedOrganizationBranch) {\r\n const oldSelectionOrganizationBranch = this.findRecursive(\r\n this.state.organizationBranches,\r\n this.state.selectedOrganizationBranch.organizationId\r\n );\r\n if (oldSelectionOrganizationBranch) {\r\n oldSelectionOrganizationBranch.checked = false;\r\n }\r\n }\r\n\r\n if (selectedNodes.length == 1) {\r\n const newPartialSelectionOrganizationBranch =\r\n this.findRecursive(\r\n this.state.organizationBranches,\r\n (selectedNodes[0] as OrganizationBranch)?.organizationId\r\n ) || null;\r\n\r\n if (newPartialSelectionOrganizationBranch) {\r\n newPartialSelectionOrganizationBranch.checked = true;\r\n newSelectionOrganizationBranch = newPartialSelectionOrganizationBranch;\r\n }\r\n }\r\n\r\n this.setState({\r\n ...this.state,\r\n selectedOrganizationBranch: newSelectionOrganizationBranch\r\n });\r\n };\r\n\r\n\r\n onDeliveryDropDownChange = (currentNode: any, selectedNodes: any) => {\r\n // react-dropdown-tree-select doesn't have an intrinsic mechanism for keeping track of selected items, only provides what is selected\r\n // So we have to manually check/uncheck the leaves from this tree used by this component\r\n let newSelectionOrganizationBranch: OrganizationBranch | null = null;\r\n if (this.state.selectedDeliveryOrganizationBranch) {\r\n const oldSelectionOrganizationBranch = this.findRecursive(\r\n this.state.organizationDeliveryBranches,\r\n this.state.selectedDeliveryOrganizationBranch.organizationId\r\n );\r\n if (oldSelectionOrganizationBranch) {\r\n oldSelectionOrganizationBranch.checked = false;\r\n }\r\n }\r\n\r\n if (selectedNodes.length == 1) {\r\n const newPartialSelectionOrganizationBranch =\r\n this.findRecursive(\r\n this.state.organizationDeliveryBranches,\r\n (selectedNodes[0] as OrganizationBranch)?.organizationId\r\n ) || null;\r\n\r\n if (newPartialSelectionOrganizationBranch) {\r\n newPartialSelectionOrganizationBranch.checked = true;\r\n newSelectionOrganizationBranch = newPartialSelectionOrganizationBranch;\r\n }\r\n }\r\n\r\n this.setState({\r\n ...this.state,\r\n selectedDeliveryOrganizationBranch: newSelectionOrganizationBranch\r\n });\r\n };\r\n\r\n onInteventionTypeDropDownChange = (currentNode: any, selectedNodes: any) => {\r\n // react-dropdown-tree-select doesn't have an intrinsic mechanism for keeping track of selected items, only provides what is selected\r\n // So we have to manually check/uncheck the leaves from this tree used by this component\r\n let newInterventionTypeBranch: OrganizationBranch | null = null;\r\n if (this.state.selectedDeliveryOrganizationBranch) {\r\n const oldInterventionTypeBranch = this.findRecursive(\r\n this.state.interventionTypesBranches,\r\n this.state.selectedDeliveryOrganizationBranch.organizationId\r\n );\r\n if (oldInterventionTypeBranch) {\r\n oldInterventionTypeBranch.checked = false;\r\n }\r\n }\r\n\r\n if (selectedNodes.length == 1) {\r\n const newPartialSelectionInterventionTypeBranch =\r\n this.findRecursive(\r\n this.state.interventionTypesBranches,\r\n (selectedNodes[0] as OrganizationBranch)?.organizationId\r\n ) || null;\r\n\r\n if (newPartialSelectionInterventionTypeBranch) {\r\n newPartialSelectionInterventionTypeBranch.checked = true;\r\n newInterventionTypeBranch = newPartialSelectionInterventionTypeBranch;\r\n }\r\n }\r\n\r\n this.setState({\r\n ...this.state,\r\n selectedInterventionTypeBranch: newInterventionTypeBranch\r\n });\r\n };\r\n\r\n onSubmit = async () => {\r\n try {\r\n this.setState({ executing: true });\r\n if (isNullOrUndefined(this.state.selectedOrganizationBranch)) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('CASE_EVENT_COST_CENTER_MANDATORY', 'Centru de cost este obligatoriu!'), \r\n {\r\n variant: 'error'\r\n });\r\n this.setState({ executing: false });\r\n return;\r\n }\r\n\r\n if (isNullOrUndefined(this.state.selectedDeliveryOrganizationBranch)) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('CASE_EVENT_LOCATION_MANDATORY', 'Adresa de livrare este obligatorie!'), \r\n {\r\n variant: 'error'\r\n });\r\n this.setState({ executing: false });\r\n return;\r\n }\r\n\r\n if (isNullOrUndefined(this.state.selectedInterventionTypeBranch)) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('CASE_EVENT_INTERVENTION_TYPE_MANDATORY', 'Tip interventie este obligatoriu!'), \r\n {\r\n variant: 'error'\r\n });\r\n this.setState({ executing: false });\r\n return;\r\n }\r\n\r\n let data = this.state.formData as CaseEventHistory;\r\n data.caseId = this.props.caseSettingsState.case!.id;\r\n data.organizationId = this.state.selectedOrganizationBranch!.id;\r\n data.deliveryOrganizationId = this.state.selectedDeliveryOrganizationBranch!.id;\r\n data.insuredPersonType = null;\r\n data.interventionTypeId = this.state.selectedInterventionTypeBranch!.id;\r\n if (isNullOrUndefined(data.id)) {\r\n data.id = 0;\r\n }\r\n\r\n if (data.id === 0) {\r\n data = await this.caseService.AddCaseEvent(data);\r\n } else {\r\n await this.caseService.UpdateCaseEvent(data);\r\n }\r\n if (this.props.workflowForm.form.hasActions) {\r\n await this.submitForm(data.caseId, this.props.workflowForm.id, null);\r\n }\r\n\r\n this.props.SetCaseEvent(data);\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (err) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n } finally {\r\n this.setState({ executing: false });\r\n }\r\n };\r\n\r\n submitForm = async (caseId: number, caseSectionStepFormId: number, appUser: AppUser | null) => {\r\n let newStatus = await this.caseService.SubmitForm(caseId, caseSectionStepFormId, appUser);\r\n\r\n if (newStatus === null) {\r\n newStatus = this.props.caseSettingsState.case!.caseStatus;\r\n }\r\n this.props.SetCaseStatus(newStatus);\r\n if (appUser !== null) {\r\n this.props.AddPartner(appUser!.hoId === null ? appUser!.organizationId : appUser!.hoId);\r\n }\r\n\r\n const hasRights = FormHelpers.HasRights(\r\n this.props.workflowForm.workflowFormPermissions,\r\n this.props.appState.appUser!,\r\n newStatus.caseStatusId\r\n );\r\n this.setState({ hasRights: hasRights });\r\n };\r\n\r\n renderFormData = (form: WorkflowSectionStepForm) => {\r\n return (\r\n
\r\n {\r\n this.onSubmit();\r\n }}\r\n > \r\n \r\n \r\n
\r\n {this.translatorService.Tranlate(\r\n 'CASE_EVENT_COST_CENTER',\r\n 'Centru de cost'\r\n )} *\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n {this.translatorService.Tranlate(\r\n 'CASE_EVENT_LOCATION_LABEL',\r\n 'Adresa de livrare'\r\n )} *\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n {this.translatorService.Tranlate('CASE_EVENT_INTERVENTION_TYPE_LABEL','Tip Interventie')} *\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n {this.translatorService.Tranlate('SAVE', 'Salveaza')}\r\n \r\n
\r\n \r\n \r\n
\r\n \r\n );\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.workflowService = (this.context as AppContext).workflowService;\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ?
{this.renderFormData(this.props.workflowForm)}
: null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalCaseDetailsCaseTabEventBillingDetailsFormProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app\r\n }),\r\n CaseSettingsActionCreators,\r\n mergeProps\r\n)(withSnackbar(CaseDetailsCaseTabEventBillingDetailsForm as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n ApplicationState,\r\n CaseSettingsState,\r\n AppState,\r\n CaseSettingsActionCreators,\r\n VehicleState\r\n} from '../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { Button, Grid, FormControlLabel, Switch, Divider } from '@material-ui/core';\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { WorkflowSectionStepForm } from '../../interfaces/Workflow';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport { IReferentialService } from '../../services/Interfaces/IReferentialService';\r\nimport {\r\n ParametreCode,\r\n ReferentialCode,\r\n OfferTypeCode,\r\n CurrencyCode,\r\n ReportTypeCode,\r\n Constants,\r\n VehicleStatusCodeEnum,\r\n RenaultGoldList,\r\n AttachmentTypeCode\r\n} from '../../helpers/Constants';\r\nimport { AppUser } from '../../interfaces/AppUser';\r\nimport { IAppUserService } from '../../services/Interfaces/IAppUserService';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport Referentials from '../../helpers/Referentials.json';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport { FormHelpers } from '../../helpers/forms/FormHelpers';\r\nimport NumberFormat from 'react-number-format';\r\nimport moment from 'moment';\r\nimport { IVehicleService } from '../../services/Interfaces/IVehicleService';\r\nimport { VehicleOffer } from '../../interfaces/Vehicle';\r\nimport { Utils } from '../../helpers/Utils';\r\nimport { ReportParameter } from '../../interfaces/Reports';\r\nimport { IReportsService } from '../../services/Interfaces/IReportsService';\r\nimport FileSaver from 'file-saver';\r\nimport * as R from 'ramda';\r\nimport { CaseTypeCode } from '../../helpers/Constants';\r\nimport { CurrencyEnum } from '../../enums/CurrencyEnum';\r\nimport { CaseAttachment, CaseRequest } from '../../interfaces/Case';\r\nimport _ from 'lodash';\r\n\r\ninterface ICaseDetailsCaseTabSoldCarFormState {\r\n isLoading: boolean;\r\n hasRights: boolean;\r\n executing: boolean;\r\n isUserHidden: boolean;\r\n vehicleOfferData: VehicleOffer;\r\n guaranteeTypes: IReferential[];\r\n offerTypes: IReferential[];\r\n offers: VehicleOffer[];\r\n offerType: IReferential | null;\r\n displaySecondCurrency: boolean;\r\n saleChannels: IReferential[];\r\n attachType: IReferential;\r\n}\r\n\r\nexport interface ExternalCaseDetailsCaseTabSoldCarFormProps {\r\n workflowForm: WorkflowSectionStepForm;\r\n isSaleOfferType: boolean;\r\n}\r\n\r\ntype ICaseDetailsCaseTabSoldCarFormProps = ExternalCaseDetailsCaseTabSoldCarFormProps & {\r\n caseSettingsState: CaseSettingsState;\r\n appState: AppState;\r\n vehicleState: VehicleState;\r\n} & typeof CaseSettingsActionCreators &\r\n ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass CaseDetailsCaseTabSoldCarForm extends React.PureComponent<\r\n ICaseDetailsCaseTabSoldCarFormProps,\r\n ICaseDetailsCaseTabSoldCarFormState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private caseService!: ICaseService;\r\n private vehicleService!: IVehicleService;\r\n private appReferentialService!: IReferentialService;\r\n private appUserService!: IAppUserService;\r\n private reportService!: IReportsService;\r\n private checkIfCurrencyIsEurOrRon: boolean =\r\n this.props.caseSettingsState.case!.caseParameters.find(\r\n (p) => p.parameter!.code === ParametreCode.CURRENCY\r\n )!.value == CurrencyCode.EUR ||\r\n this.props.caseSettingsState.case!.caseParameters.find(\r\n (p) => p.parameter!.code === ParametreCode.CURRENCY\r\n )!.value == CurrencyCode.RON;\r\n static contextType = ApplicationContext;\r\n state = {\r\n isLoading: true,\r\n hasRights: false,\r\n executing: false,\r\n isUserHidden: false,\r\n guaranteeTypes: [] as IReferential[],\r\n offerTypes: [],\r\n offers: [],\r\n offerType: null,\r\n currencyRates: [],\r\n displaySecondCurrency: this.checkIfCurrencyIsEurOrRon,\r\n vehicleOfferData: {\r\n id: 0,\r\n caseId: this.props.caseSettingsState.case!.id,\r\n vehicleId: this.props.caseSettingsState.case!.vehicleId,\r\n comments: '',\r\n damageValue: 0,\r\n newVin: '',\r\n offerValue: 0,\r\n offerValueWithVAT: 0,\r\n priceValue: 0,\r\n tradeInValue: 0,\r\n vatValue: 0,\r\n withNewVehicle: this.props.isSaleOfferType,\r\n currency: this.props.caseSettingsState.case!.caseParameters.find(\r\n (p) => p.parameter!.code === ParametreCode.CURRENCY\r\n )!.value,\r\n currencyRate: Utils.GetCurrencyRate(\r\n this.props.appState.currencyRates,\r\n this.props.caseSettingsState.case!.caseParameters.find(\r\n (p) => p.parameter!.code === ParametreCode.CURRENCY\r\n )!.value == CurrencyCode.RON\r\n ? CurrencyCode.EUR\r\n : this.props.caseSettingsState.case!.caseParameters.find(\r\n (p) => p.parameter!.code === ParametreCode.CURRENCY\r\n )!.value\r\n ),\r\n secondCurrency: this.checkIfCurrencyIsEurOrRon\r\n ? this.props.caseSettingsState.case!.caseParameters.find(\r\n (p) => p.parameter!.code === ParametreCode.CURRENCY\r\n )!.value == CurrencyCode.EUR\r\n ? CurrencyCode.RON\r\n : CurrencyCode.EUR\r\n : null,\r\n secondOfferValue: this.checkIfCurrencyIsEurOrRon ? 0 : null,\r\n secondOfferVatAmount: this.checkIfCurrencyIsEurOrRon ? 0 : null,\r\n secondOfferValueWithVAT: this.checkIfCurrencyIsEurOrRon ? 0 : null\r\n } as VehicleOffer,\r\n saleChannels: [] as IReferential[],\r\n attachType: {} as IReferential\r\n } as ICaseDetailsCaseTabSoldCarFormState;\r\n\r\n public componentDidMount() {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (R.isNil(caseSettings) || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n // let caseParametersList = this.props.caseSettingsState.case!.caseParameters;\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadCaseSaleOfferForm();\r\n if (!this.props.appState.currencyRates.length) {\r\n await this.getCurrencyRates();\r\n }\r\n }\r\n );\r\n }\r\n\r\n\r\n getCurrencyRates = async () => {\r\n const rates = await this.vehicleService.GetCurrencyRates();\r\n this.props.appState.currencyRates = rates;\r\n console.log('currencyRates', this.props.appState.currencyRates);\r\n this.setState({\r\n vehicleOfferData: {\r\n ...this.state.vehicleOfferData,\r\n currencyRate: Utils.GetCurrencyRate(\r\n this.props.appState.currencyRates,\r\n this.props.caseSettingsState.case!.caseParameters.find(\r\n (p) => p.parameter!.code === ParametreCode.CURRENCY\r\n )!.value == CurrencyCode.RON\r\n ? CurrencyCode.EUR\r\n : this.props.caseSettingsState.case!.caseParameters.find(\r\n (p) => p.parameter!.code === ParametreCode.CURRENCY\r\n )!.value\r\n )\r\n }\r\n });\r\n };\r\n\r\n getCurrentCurrency = (): string => {\r\n return this.props.caseSettingsState.case!.caseParameters.find(\r\n (p) => p.parameter!.code === ParametreCode.CURRENCY\r\n )!.value;\r\n };\r\n\r\n getVATValue = (price: number, vat: number): number => {\r\n return Number.parseFloat((price * (vat / 100)).toFixed(2));\r\n };\r\n\r\n getPriceWithVAT = (price: number, vat: number) => {\r\n const vatValue = this.getVATValue(price, vat);\r\n return Number.parseFloat((price + vatValue).toFixed(2));\r\n };\r\n\r\n getReverseVatValue = (price: number, vat: number): number => {\r\n return Number.parseFloat(((price / (1 + vat / 100) - price) * -1).toFixed(2));\r\n };\r\n\r\n getPriceWithoutVAT = (price: number, vat: number) => {\r\n const offerTypeCode = this.props.caseSettingsState?.case?.caseType?.code;\r\n\r\n const vehicleHasNoVAT =\r\n offerTypeCode === CaseTypeCode.SALE && this.props.vehicleState.vehicle?.purchaseVatRate === 0;\r\n\r\n const purchasePrice = (this.props.vehicleState?.vehicle?.purchasePrice as number) || 0;\r\n\r\n const vatValue = !vehicleHasNoVAT\r\n ? this.getReverseVatValue(price, vat)\r\n : Utils.getMarginVat(price, +purchasePrice, vat);\r\n\r\n return Number.parseFloat((price - vatValue).toFixed(2));\r\n };\r\n\r\n getOfferPriceWithoutVAT = (offerPrice: number): number => {\r\n const offerTypeCode = this.props.caseSettingsState?.case?.caseType?.code;\r\n\r\n const vehicleHasNoVAT =\r\n offerTypeCode === CaseTypeCode.SALE && this.props.vehicleState.vehicle?.purchaseVatRate === 0;\r\n\r\n const purchasePrice = (this.props.vehicleState?.vehicle?.purchasePrice as number) || 0;\r\n\r\n const caseParameters = this.props.caseSettingsState.case!.caseParameters;\r\n const vatParameter = caseParameters.filter(\r\n (parameter) => parameter.parameter!.code === ParametreCode.TVA\r\n );\r\n const vat = parseFloat(vatParameter[0]!.value);\r\n\r\n const vatValue = !vehicleHasNoVAT\r\n ? this.getReverseVatValue(offerPrice, vat)\r\n : Utils.getMarginVat(offerPrice, +purchasePrice, vat);\r\n\r\n return Number.parseFloat((offerPrice - vatValue).toFixed(2));\r\n };\r\n\r\n getVATFromOfferPrice = () => {\r\n const offerTypeCode = this.props.caseSettingsState?.case?.caseType?.code;\r\n\r\n const vehicleHasNoVAT =\r\n offerTypeCode === CaseTypeCode.SALE && this.props.vehicleState.vehicle?.purchaseVatRate === 0;\r\n\r\n const purchasePrice = (this.props.vehicleState?.vehicle?.purchasePrice as number) || 0;\r\n\r\n const offerPrice = this.state.vehicleOfferData.offerValueWithVAT;\r\n const caseParameters = this.props.caseSettingsState.case!.caseParameters;\r\n const vatParameter = caseParameters.filter(\r\n (parameter) => parameter.parameter!.code === ParametreCode.TVA\r\n );\r\n\r\n const vat = parseFloat(vatParameter[0]!.value);\r\n\r\n if (!vehicleHasNoVAT) {\r\n const offerPriceWithoutVAT = offerPrice / (1 + vat / 100);\r\n\r\n return Number.parseFloat((offerPriceWithoutVAT * (vat / 100)).toFixed(2));\r\n }\r\n\r\n return Utils.getMarginVat(offerPrice, purchasePrice, vat);\r\n };\r\n\r\n getValuationPrice = (caseHasVAT: boolean) => {\r\n const caseValuation = this.props.caseSettingsState.case?.caseValuation;\r\n let valuationValue = caseValuation\r\n ? this.props.isSaleOfferType\r\n ? this.props.caseSettingsState.case!.caseValuation?.offerPrice || 0\r\n : this.props.caseSettingsState.case!.caseValuation?.tradeInPrice || 0\r\n : 0;\r\n\r\n const caseValuationVatValue = caseValuation?.vatRate || 0;\r\n\r\n if (!caseHasVAT) {\r\n valuationValue = Utils.getPriceWithoutVat(valuationValue, caseValuationVatValue);\r\n }\r\n\r\n return Utils.ConvertCurrency(\r\n this.props.appState.currencyRates,\r\n CurrencyCode.EUR,\r\n this.state.vehicleOfferData.currency,\r\n valuationValue\r\n );\r\n };\r\n\r\n setStatePriceAndVAT = () => {\r\n const caseParameters = this.props.caseSettingsState.case!.caseParameters;\r\n const vatParameter = caseParameters.filter(\r\n (parameter) => parameter.parameter!.code === ParametreCode.TVA\r\n );\r\n\r\n const vatValue = +vatParameter[0]?.value || 0;\r\n const caseHasNoVAT = vatValue === 0;\r\n\r\n const tradeInValue = this.getValuationPrice(!caseHasNoVAT);\r\n\r\n this.setState({\r\n vehicleOfferData: {\r\n ...this.state.vehicleOfferData,\r\n offerType: this.state.offerType,\r\n offerTypeId: this.state.offerType!.id,\r\n tradeInValue,\r\n damageValue: this.getDamageValue(),\r\n offerValue: 0,\r\n offerValueWithVAT: this.getPriceWithVAT(0, vatValue),\r\n priceValue: Number.parseFloat(\r\n (this.getPriceWithoutVAT(tradeInValue, vatValue) - this.getDamageValue()).toFixed(2)\r\n ),\r\n vatValue: parseFloat(vatParameter[0]!.value)\r\n }\r\n });\r\n };\r\n\r\n getDamageValue = () => {\r\n if (R.isNil(this.props.caseSettingsState.case!.caseCalculation)) {\r\n return 0;\r\n }\r\n\r\n const damage = this.props.caseSettingsState.case!.caseCalculation.amountWithoutTVA;\r\n\r\n return Utils.ConvertCurrency(\r\n this.props.appState.currencyRates,\r\n this.props.caseSettingsState.case!.caseCalculation.currencyCode,\r\n this.getCurrentCurrency(),\r\n damage\r\n );\r\n };\r\n\r\n setSecondValueBasedOnCaseCurrency(value: number, currencyRate: number): number | null {\r\n let resultValue = null;\r\n if (\r\n this.state.vehicleOfferData.currency == CurrencyCode.EUR ||\r\n this.state.vehicleOfferData.currency == CurrencyCode.RON\r\n ) {\r\n resultValue = 0;\r\n const previousCurrencyCode = this.state.vehicleOfferData.currency;\r\n const futureCurrencyCode =\r\n this.state.vehicleOfferData.currency == CurrencyCode.EUR\r\n ? CurrencyCode.RON\r\n : CurrencyCode.EUR;\r\n if (!R.isNil(value) && previousCurrencyCode) {\r\n let previousCurrencyRate = Utils.GetCurrencyRate(\r\n this.props.appState.currencyRates,\r\n previousCurrencyCode\r\n );\r\n\r\n let futureCurrencyRate = Utils.GetCurrencyRate(\r\n this.props.appState.currencyRates,\r\n futureCurrencyCode\r\n );\r\n\r\n if (this.state.vehicleOfferData.currency == CurrencyEnum.EUR) {\r\n previousCurrencyRate = currencyRate;\r\n } else if (this.state.vehicleOfferData.currency == CurrencyCode.RON) {\r\n futureCurrencyRate = currencyRate;\r\n }\r\n\r\n resultValue = value * (previousCurrencyRate / futureCurrencyRate);\r\n return Number.parseFloat(resultValue.toFixed(2));\r\n }\r\n }\r\n\r\n return resultValue;\r\n }\r\n\r\n setSecondVatFromOfferPrice(offerValueWithVAT: number): number {\r\n const offerTypeCode = this.props.caseSettingsState?.case?.caseType?.code;\r\n const vehicleHasNoVAT =\r\n offerTypeCode === CaseTypeCode.SALE && this.props.vehicleState.vehicle?.purchaseVatRate === 0;\r\n const purchasePrice = (this.props.vehicleState?.vehicle?.purchasePrice as number) || 0;\r\n const caseParameters = this.props.caseSettingsState.case!.caseParameters;\r\n const vatParameter = caseParameters.filter(\r\n (parameter) => parameter.parameter!.code === ParametreCode.TVA\r\n );\r\n const vat = parseFloat(vatParameter[0]!.value);\r\n if (!vehicleHasNoVAT) {\r\n const offerPriceWithoutVAT = offerValueWithVAT / (1 + vat / 100);\r\n return Number.parseFloat((offerPriceWithoutVAT * (vat / 100)).toFixed(2));\r\n }\r\n return Utils.getMarginVat(offerValueWithVAT, purchasePrice, vat);\r\n }\r\n\r\n loadCaseSaleOfferForm = async () => {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (R.isNil(caseSettings) || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n\r\n const hasRights = FormHelpers.HasRights(\r\n this.props.workflowForm.workflowFormPermissions,\r\n this.props.appState.appUser!,\r\n this.props.caseSettingsState.case!.caseStatus.caseStatusId\r\n );\r\n\r\n const guaranteeTypeRef = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.GuaranteeType\r\n );\r\n const offerTypeRef = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.OfferTye\r\n );\r\n\r\n const saleChannelRef = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.SaleChannel\r\n );\r\n\r\n const offerTypeList = await this.appReferentialService.Get(offerTypeRef!.baseUrl);\r\n\r\n const offerType = offerTypeList.find(\r\n (item) =>\r\n (item.code === OfferTypeCode.SELL && this.props.isSaleOfferType) ||\r\n (item.code === OfferTypeCode.BUY && !this.props.isSaleOfferType)\r\n )!;\r\n\r\n const [guaranteeTypeList, offers, saleChannelList, vehicleAdvert, attachmentType] = await Promise.all([\r\n this.appReferentialService.Get(guaranteeTypeRef!.baseUrl),\r\n R.isNil(this.props.caseSettingsState.case!.vehicleId)\r\n ? []\r\n : this.vehicleService.GetVehicleOffers(\r\n this.props.caseSettingsState.case!.vehicleId,\r\n this.props.caseSettingsState.case!.id,\r\n offerType.id\r\n ),\r\n this.appReferentialService.Get(saleChannelRef!.baseUrl),\r\n this.vehicleService.GetVehicleAdvert(\r\n this.props.caseSettingsState.case!.vehicleId,\r\n caseId\r\n ),\r\n this.caseService.GetAttachmentTypeByCode(AttachmentTypeCode.OTHER)\r\n ]);\r\n\r\n const users = await this.appUserService.GetUsersInfo(offers.map((item) => item.createdBy));\r\n offers.forEach((item) => {\r\n const user = users.find((u) => u.id === item.createdBy);\r\n item.createdByUser = R.isNil(user) ? null : user;\r\n });\r\n\r\n this.setState(\r\n {\r\n isLoading: false,\r\n hasRights: hasRights,\r\n isUserHidden: !hasRights,\r\n guaranteeTypes: guaranteeTypeList.filter((item) => item.isActive),\r\n offerTypes: offerTypeList,\r\n offers: offers,\r\n offerType: offerType,\r\n saleChannels: saleChannelList.filter((item) => item.isActive),\r\n vehicleOfferData: {\r\n ...this.state.vehicleOfferData,\r\n guaranteeType: vehicleAdvert ? vehicleAdvert!.guaranteeType : null,\r\n guaranteeTypeId: vehicleAdvert ? vehicleAdvert!.guaranteeTypeId : null\r\n },\r\n attachType: attachmentType\r\n },\r\n this.setStatePriceAndVAT\r\n );\r\n };\r\n \r\n handleSaleChannelChange = (newValue: IReferential | null) => {\r\n if (!R.isNil(newValue!.displayName)) {\r\n this.setState({\r\n vehicleOfferData: {\r\n ...this.state.vehicleOfferData,\r\n saleChannel: newValue,\r\n saleChannelId: newValue === null ? null : newValue.id\r\n }\r\n });\r\n }\r\n };\r\n\r\n loadOffers = async () => {\r\n const offers = await this.vehicleService.GetVehicleOffers(\r\n this.props.caseSettingsState.case!.vehicleId!,\r\n this.props.caseSettingsState.case!.id,\r\n this.state.offerType!.id\r\n );\r\n\r\n const users = await this.appUserService.GetUsersInfo(offers.map((item) => item.createdBy));\r\n offers.forEach((item) => {\r\n const user = users.find((u) => u.id === item.createdBy);\r\n item.createdByUser = R.isNil(user) ? null : user;\r\n });\r\n\r\n this.setState({\r\n offers: offers\r\n });\r\n };\r\n\r\n submitForm = async (caseId: number, caseSectionStepFormId: number, appUser: AppUser | null) => {\r\n let newStatus = await this.caseService.SubmitForm(caseId, caseSectionStepFormId, appUser);\r\n\r\n if (newStatus === null) {\r\n newStatus = this.props.caseSettingsState.case!.caseStatus;\r\n }\r\n\r\n const vehicleId = this.props.caseSettingsState.case?.vehicleId;\r\n if (newStatus.caseStatus?.code === 'CLOSED') {\r\n if (vehicleId) {\r\n await this.vehicleService.ChangeVehicleStatus({\r\n vehicleId,\r\n statusId: VehicleStatusCodeEnum.Sold,\r\n comment: ''\r\n });\r\n }\r\n if (vehicleId) {\r\n await this.vehicleService.DeleteAllAdvertWhenCaseStatusBecameClosed(caseId, vehicleId);\r\n }\r\n }\r\n\r\n this.props.SetCaseStatus(newStatus);\r\n if (appUser !== null) {\r\n this.props.AddPartner(appUser!.hoId === null ? appUser!.organizationId : appUser!.hoId);\r\n }\r\n\r\n const hasRights = FormHelpers.HasRights(\r\n this.props.workflowForm.workflowFormPermissions,\r\n this.props.appState.appUser!,\r\n newStatus.caseStatusId\r\n );\r\n this.setState({ hasRights: hasRights });\r\n };\r\n\r\n NumberFormatCustom = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n },\r\n currentTarget: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n allowNegative={false}\r\n thousandSeparator={false}\r\n decimalScale={2}\r\n />\r\n );\r\n };\r\n\r\n NumberFormatCustomCurrencyRate = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n },\r\n currentTarget: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n allowNegative={false}\r\n thousandSeparator={false}\r\n decimalScale={4}\r\n />\r\n );\r\n };\r\n\r\n submitData = async (e: any) => {\r\n try {\r\n this.setState({ executing: true });\r\n const data: VehicleOffer = {\r\n ...this.state.vehicleOfferData,\r\n offerVatAmount:\r\n this.state.vehicleOfferData.offerValueWithVAT - this.state.vehicleOfferData.offerValue,\r\n secondCurrency: this.state.displaySecondCurrency\r\n ? this.state.vehicleOfferData.secondCurrency\r\n : null,\r\n secondOfferValue: this.state.displaySecondCurrency\r\n ? this.state.vehicleOfferData.secondOfferValue\r\n : null,\r\n secondOfferValueWithVAT: this.state.displaySecondCurrency\r\n ? this.state.vehicleOfferData.secondOfferValueWithVAT\r\n : null\r\n };\r\n\r\n await this.vehicleService.SaveVehicleOfferWithoutCaseId(data);\r\n\r\n const caseRequest = {\r\n id: 0,\r\n caseId: this.props.caseSettingsState.case!.id,\r\n text: this.state.vehicleOfferData.offerValueWithVAT + ' EUR',\r\n subject: '',\r\n to: '',\r\n userIdTo: '',\r\n organizationId: null,\r\n attachments: [] as CaseAttachment[],\r\n caseSectionStepFormId: this.props.workflowForm.id\r\n } as CaseRequest;\r\n\r\n await this.caseService.AddCaseRequest(caseRequest);\r\n\r\n await this.submitForm(\r\n this.props.caseSettingsState.case!.id,\r\n this.props.workflowForm.id,\r\n null\r\n );\r\n\r\n await this.loadOffers();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (ex) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n } finally {\r\n this.setState({\r\n executing: false\r\n });\r\n }\r\n };\r\n\r\n handleGuaranteeTypeChange = (newValue: IReferential | null) => {\r\n if (!R.isNil(newValue!.displayName)) {\r\n if (RenaultGoldList.includes(newValue!.code!.toString())) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'RENEW_GOLD_INFO_MESSAGE',\r\n 'Aceasta garantie include si Garantia de producator !'\r\n ),\r\n {\r\n variant: 'info',\r\n autoHideDuration: 5000\r\n }\r\n );\r\n }\r\n this.setState({\r\n vehicleOfferData: {\r\n ...this.state.vehicleOfferData,\r\n guaranteeType: newValue,\r\n guaranteeTypeId: newValue === null ? null : newValue.id\r\n }\r\n });\r\n }\r\n };\r\n\r\n handleIsActiveNewVehicle = (e: any) => {\r\n this.setState({\r\n vehicleOfferData: {\r\n ...this.state.vehicleOfferData,\r\n withNewVehicle: e.currentTarget.checked,\r\n newVin: e.currentTarget.checked ? this.state.vehicleOfferData.newVin : ''\r\n }\r\n });\r\n };\r\n\r\n getInvoicePdf = async (\r\n id: number,\r\n vehicleId: number,\r\n caseId: number,\r\n caseClientHistoryId: number | null\r\n ) => {\r\n const reportParameters = [\r\n {\r\n name: 'vehicleId',\r\n value: vehicleId.toString()\r\n } as ReportParameter,\r\n {\r\n name: 'caseId',\r\n value: caseId.toString()\r\n } as ReportParameter,\r\n {\r\n name: 'offerId',\r\n value: id.toString()\r\n } as ReportParameter,\r\n {\r\n name: 'organizationId',\r\n value: this.props.appState.appUser!.organization?.id.toString()\r\n } as ReportParameter,\r\n {\r\n name: 'caseClientHistoryId',\r\n value: caseClientHistoryId?.toString()\r\n } as ReportParameter,\r\n {\r\n name: 'apiUrl',\r\n value: Constants.apiRoot\r\n } as ReportParameter\r\n ];\r\n\r\n const fileBlob = await this.reportService.GetReport(\r\n ReportTypeCode.RENAULT_INVOICE,\r\n reportParameters\r\n );\r\n FileSaver.saveAs(fileBlob, 'Proforma invoice.pdf');\r\n if (this.props.caseSettingsState.caseSettings!.workflow.saveDocuments) {\r\n const fileName = `Proforma invoice_${id}.pdf`;\r\n console.log('Save file', fileName, 'Id oferta', id);\r\n await this.saveGeneratedFile(fileBlob, fileName);\r\n }\r\n };\r\n\r\n saveGeneratedFile = async (fileBlob: Blob, fileName: string) => {\r\n try {\r\n //Save the report into attachments\r\n const attachments: CaseAttachment[] = [];\r\n attachments.push({\r\n id: 0,\r\n caseId: this.props.caseSettingsState.case!.id,\r\n attachmentTypeId: this.state.attachType.id,\r\n attachmentType: this.state.attachType,\r\n file: new File([fileBlob], fileName),\r\n isSelection: false,\r\n includeInOtherTab: true,\r\n checkFileName: true\r\n } as CaseAttachment);\r\n\r\n const newFiles = await this.caseService.AddCaseAttachment(attachments);\r\n\r\n console.log('newFiles', newFiles);\r\n } catch (error) {\r\n console.log('error', error);\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n\r\n showOfferTimeline = (caseHasVAT: boolean) => {\r\n const priceLabel = caseHasVAT\r\n ? this.translatorService.Tranlate('SALE_OFFER_PRICE_OFFERED_WITH_VAT', 'Pret calculat cu TVA')\r\n : this.translatorService.Tranlate('SALE_OFFER_PRICE_OFFERED', 'Pret calculat cu TVA');\r\n\r\n const offerTypeCode = this.props.caseSettingsState?.case?.caseType?.code;\r\n\r\n const vehicleHasNoVAT =\r\n offerTypeCode === CaseTypeCode.SALE && this.props.vehicleState.vehicle?.purchaseVatRate === 0;\r\n\r\n return this.state.offers.map((offer, index) => {\r\n const price = !vehicleHasNoVAT\r\n ? this.getPriceWithVAT(offer.offerValue, this.state.vehicleOfferData.vatValue)\r\n : offer.offerValue + offer.offerVatAmount;\r\n const secondPrice = !vehicleHasNoVAT\r\n ? offer.secondOfferValue\r\n ? this.getPriceWithVAT(offer.secondOfferValue, this.state.vehicleOfferData.vatValue)\r\n : null\r\n : !R.isNil(offer.secondOfferValue) && !R.isNil(offer.secondOfferVatAmount)\r\n ? offer.secondOfferValue + offer.secondOfferVatAmount\r\n : null;\r\n return (\r\n
\r\n
\r\n
\r\n

\r\n {moment.utc(offer.dateCreation).local().format(this.props.appState.longDateFormat) +\r\n ' (' +\r\n offer.createdByUser!.email +\r\n ')'}\r\n

\r\n

\r\n {`${priceLabel}: ${price} ${offer.currency}`}\r\n {secondPrice ? '(' + secondPrice + offer.secondCurrency + ')' : ''}\r\n

\r\n\r\n {offer.purchaseOrigin != null && (\r\n

\r\n {' '}\r\n {this.translatorService.Tranlate('SALE_OFFER_PURCHASE_ORIGIN', 'Origine achizitie')}:\r\n {offer.purchaseOrigin!.displayName ? ' ' + offer.purchaseOrigin!.displayName : null}\r\n

\r\n )}\r\n\r\n {offer.saleChannel != null && (\r\n

\r\n {' '}\r\n {this.translatorService.Tranlate('SALE_OFFER_SALE_CHANNEL', 'Canal vanzare')}:\r\n {offer.saleChannel!.displayName ? ' ' + offer.saleChannel!.displayName : null}\r\n

\r\n )}\r\n\r\n {offer.guaranteeType != null && (\r\n

\r\n {' '}\r\n {this.translatorService.Tranlate('SALE_OFFER_GUARANTEE_TYPE', 'Tip garantie')}:\r\n {offer.guaranteeType!.displayName ? ' ' + offer.guaranteeType!.displayName : null}\r\n

\r\n )}\r\n
\r\n
\r\n );\r\n });\r\n };\r\n\r\n renderClientDataForm = (caseHasVAT: boolean) => {\r\n const saleOfferPriceOfferedWithoutVatLabel = caseHasVAT\r\n ? this.translatorService.Tranlate(\r\n 'SALE_OFFER_PRICE_OFFERED_DIALOG_WITHOUT_VAT',\r\n 'Pret vanzare fara TVA'\r\n )\r\n : this.translatorService.Tranlate('SALE_OFFER_PRICE_OFFERED_DIALOG', 'Pret vanzare');\r\n\r\n const saleOfferPriceOfferedWithVatLabel = caseHasVAT\r\n ? this.translatorService.Tranlate(\r\n 'SALE_OFFER_PRICE_OFFERED_DIALOG_WITH_VAT',\r\n 'Pret vanzare cu TVA'\r\n )\r\n : this.translatorService.Tranlate('SALE_OFFER_PRICE_OFFERED_DIALOG', 'Pret vanzare');\r\n\r\n return (\r\n {\r\n this.submitData(e);\r\n }}\r\n >\r\n
\r\n \r\n \r\n \r\n \r\n {caseHasVAT && (\r\n \r\n \r\n \r\n )}\r\n \r\n\r\n \r\n \r\n {\r\n const offerValue = this.getOfferPriceWithoutVAT(e.target.value);\r\n const secondOfferValueWithVAT = this.setSecondValueBasedOnCaseCurrency(\r\n e.target.value,\r\n this.state.vehicleOfferData.currencyRate\r\n );\r\n const secondOfferValue = secondOfferValueWithVAT\r\n ? this.getOfferPriceWithoutVAT(secondOfferValueWithVAT)\r\n : 0;\r\n const secondOfferVatAmount = secondOfferValueWithVAT\r\n ? this.setSecondVatFromOfferPrice(secondOfferValueWithVAT)\r\n : 0;\r\n this.setState({\r\n vehicleOfferData: {\r\n ...this.state.vehicleOfferData,\r\n offerValueWithVAT: e.target.value,\r\n offerValue: offerValue,\r\n secondOfferValueWithVAT: secondOfferValueWithVAT\r\n ? secondOfferValueWithVAT\r\n : 0,\r\n secondOfferValue: secondOfferValue,\r\n secondOfferVatAmount: secondOfferVatAmount\r\n }\r\n });\r\n }}\r\n validators={['required', 'minNumber:1']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu'),\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n label={\r\n this.state.displaySecondCurrency\r\n ? saleOfferPriceOfferedWithVatLabel +\r\n ' | ' +\r\n this.state.vehicleOfferData.offerValueWithVAT +\r\n ' ' +\r\n this.state.vehicleOfferData.currency +\r\n ' (' +\r\n this.state.vehicleOfferData.secondOfferValueWithVAT +\r\n ' ' +\r\n this.state.vehicleOfferData.secondCurrency +\r\n ')'\r\n : saleOfferPriceOfferedWithVatLabel\r\n }\r\n InputProps={{\r\n inputComponent: this.NumberFormatCustom,\r\n style: { fontWeight: 500 }\r\n }}\r\n />\r\n \r\n \r\n {\r\n const value = e.target.value;\r\n const secondOfferValueWithVAT = this.setSecondValueBasedOnCaseCurrency(\r\n this.state.vehicleOfferData.offerValueWithVAT,\r\n parseFloat(value)\r\n );\r\n const secondOfferValue = secondOfferValueWithVAT\r\n ? this.getOfferPriceWithoutVAT(secondOfferValueWithVAT)\r\n : 0;\r\n this.setState({\r\n vehicleOfferData: {\r\n ...this.state.vehicleOfferData,\r\n currencyRate: parseFloat(value),\r\n secondOfferValueWithVAT: secondOfferValueWithVAT\r\n ? secondOfferValueWithVAT\r\n : 0,\r\n secondOfferValue: secondOfferValue ? secondOfferValue : 0,\r\n secondOfferVatAmount: secondOfferValueWithVAT\r\n ? this.setSecondVatFromOfferPrice(secondOfferValueWithVAT)\r\n : 0\r\n }\r\n });\r\n }}\r\n validators={['required', 'minNumber:1']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu'),\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n label={this.translatorService.Tranlate('SALE_OFFER_PRICE_FXRATE', 'Curs valutar')}\r\n InputProps={{\r\n inputComponent: this.NumberFormatCustomCurrencyRate,\r\n style: { fontWeight: 500 }\r\n }}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n this.handleGuaranteeTypeChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n this.handleSaleChannelChange(newValue)}\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )} \r\n />\r\n \r\n \r\n
\r\n\r\n \r\n {this.translatorService.Tranlate('SAVE', 'Salveaza')}\r\n \r\n \r\n );\r\n };\r\n\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n this.vehicleService = (this.context as AppContext).vehicleService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n this.appUserService = (this.context as AppContext).appUserService;\r\n this.reportService = (this.context as AppContext).reportsService;\r\n\r\n const offerTypeCode = this.props.caseSettingsState?.case?.caseType?.code;\r\n\r\n const caseHasNoVAT =\r\n offerTypeCode === CaseTypeCode.AQUISITION && this.state.vehicleOfferData.vatValue === 0;\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n
\r\n {this.renderClientDataForm(!caseHasNoVAT)}\r\n\r\n \r\n {this.state.offers.length > 0 ? (\r\n
\r\n {this.showOfferTimeline(!caseHasNoVAT)}\r\n
\r\n ) : (\r\n ''\r\n )}\r\n
\r\n ) : null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalCaseDetailsCaseTabSoldCarFormProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app\r\n }),\r\n CaseSettingsActionCreators,\r\n mergeProps\r\n)(withSnackbar(CaseDetailsCaseTabSoldCarForm as any));\r\n","import { API } from '../../helpers/API';\r\nimport { AppointmentRequestPayload, AppointmentsFiltersType, ChangeAppointmentStatusPayload } from '../../types/Agenda';\r\n\r\nexport const getClientListRequest = async () => {\r\n try {\r\n const response = await API.GetAsync('/case/appointmentClients');\r\n return {\r\n message: 'Success',\r\n error: false,\r\n data: response.data\r\n };\r\n } catch (e) {\r\n return {\r\n message: 'Error getting clients list',\r\n error: true\r\n };\r\n }\r\n};\r\n\r\nexport const getCarListRequest = async () => {\r\n try {\r\n const response = await API.GetAsync('/case/appointmentVehicles');\r\n return {\r\n message: 'Success',\r\n error: false,\r\n data: response.data\r\n };\r\n } catch (e) {\r\n return {\r\n message: 'Error getting cars list',\r\n error: true\r\n };\r\n }\r\n};\r\n\r\n\r\nexport const getAppointmentStatus = async () => {\r\n try {\r\n const response = await API.GetAsync('/case/Referential/AppointmentStatus');\r\n return {\r\n message: 'Success',\r\n error: false,\r\n data: response.data\r\n };\r\n } catch (e) {\r\n return {\r\n message: 'Error getting status list',\r\n error: true\r\n };\r\n }\r\n};\r\n\r\nexport const getJobListRequest = async () => {\r\n try {\r\n const response = await API.GetAsync('/case/Referential/JobType');\r\n return {\r\n message: 'Success',\r\n error: false,\r\n data: response.data\r\n };\r\n } catch (e) {\r\n return {\r\n message: 'Error getting jobs list',\r\n error: true\r\n };\r\n }\r\n};\r\n\r\nexport const getAppointmentsRequest = async (payload: AppointmentsFiltersType) => {\r\n try {\r\n const response = await API.Post2Async('/case/appointment', payload);\r\n return {\r\n message: 'Success',\r\n error: false,\r\n data: response.data\r\n };\r\n } catch (e) {\r\n return {\r\n message: 'Error getting appointments list',\r\n error: true\r\n };\r\n }\r\n};\r\n\r\nexport const getAppointment = async (id: number) => {\r\n try {\r\n const response = await API.GetAsync(`case/appointment/${id}`);\r\n return {\r\n message: 'Success',\r\n error: false,\r\n data: response.data\r\n };\r\n } catch (e) {\r\n return {\r\n message: 'Error getting appointment',\r\n error: true\r\n };\r\n }\r\n};\r\n\r\nexport const addAppointment = async (payload: AppointmentRequestPayload) => {\r\n try {\r\n const response = await API.Post2Async('/case/new-appointment', payload);\r\n return {\r\n message: 'Success',\r\n error: false,\r\n data: response.data\r\n };\r\n } catch (e) {\r\n console.log(e.response)\r\n return {\r\n message: 'Error save appointment',\r\n error: true\r\n };\r\n }\r\n};\r\n\r\nexport const getAppointmentCategoryType = async () => {\r\n try {\r\n const response = await API.GetAsync('/case/Referential/AppointmentCategoryType');\r\n return {\r\n message: 'Success',\r\n error: false,\r\n data: response.data\r\n };\r\n } catch (e) {\r\n return {\r\n message: 'Error get appointment category type',\r\n error: true\r\n };\r\n }\r\n};\r\n\r\n\r\nexport const changeAppointmentStatus = async (payload: ChangeAppointmentStatusPayload) => {\r\n try {\r\n const response = await API.Post2Async('/case/appointment/status', payload);\r\n return {\r\n message: 'Success',\r\n error: false,\r\n data: response.data\r\n };\r\n } catch (e) {\r\n console.log(e.response)\r\n return {\r\n message: 'Error change appointment status',\r\n error: true\r\n };\r\n }\r\n};\r\n\r\nexport const newAppointmentCase = async (payload: { appointmentId: number, workflowId: number }) => {\r\n try {\r\n const response = await API.Post2Async('/case/new-appointment-case', payload);\r\n return {\r\n message: 'Success',\r\n error: false,\r\n data: response.data\r\n };\r\n } catch (e) {\r\n console.log(e.response)\r\n return {\r\n message: 'Error new appointment case',\r\n error: true\r\n };\r\n }\r\n};\r\n\r\nexport const getAppointmentByCaseId = async (id: number) => {\r\n try {\r\n const response = await API.GetAsync(`case/appointmentByCaseId?caseId=${id}`);\r\n return {\r\n message: 'Success',\r\n error: false,\r\n data: response.data\r\n };\r\n } catch (e) {\r\n return {\r\n message: 'Error getting appointment',\r\n error: true\r\n };\r\n }\r\n};\r\n\r\nexport const getAppointmentFiltersRequest = async (organizationId: number | null) => {\r\n try {\r\n const response = await API.Post2Async(`/case/appointment/filters`, {\r\n dateFilterStartDate: null,\r\n datefilterEndDate: null,\r\n organizationOwnerId: organizationId\r\n });\r\n return {\r\n message: 'Success',\r\n error: false,\r\n data: response.data\r\n };\r\n } catch (e) {\r\n return {\r\n message: 'Error getting appointment filters',\r\n error: true\r\n };\r\n }\r\n};\r\n\r\nexport const setLastOfferRejected = async (caseId: string, lastOfferRejected: boolean) => {\r\n try {\r\n const response = await API.PutAsync(`/case/lastOfferRejected/${caseId}?lastOfferRejected=${lastOfferRejected}`, {});\r\n return {\r\n message: 'Success',\r\n error: false,\r\n data: response.data\r\n };\r\n } catch (e) {\r\n return {\r\n message: 'Error last offer rejected',\r\n error: true\r\n };\r\n }\r\n};\r\n\r\n","import moment from 'moment';\r\nimport { AppointmentStatusType, AppointmentType } from '../types/Agenda';\r\nimport { getAppointmentCategoryType, getAppointmentStatus } from '../components/agenda/agenda.requests';\r\n\r\nexport const sanitizeAppointment = (appointment: AppointmentType) => {\r\n const { datetime } = appointment;\r\n\r\n if (typeof datetime === 'string') {\r\n appointment.datetime = JSON.parse(datetime);\r\n }\r\n\r\n return appointment;\r\n};\r\n\r\n// get day as dd/mm/yyyy using moment\r\nexport const getDay = (date: Date, dateFormat: string) => {\r\n return moment(date).format(dateFormat);\r\n};\r\n\r\nexport const getHourForAppointment = () =>{\r\n const currentDate = new Date();\r\n const hours = currentDate.getHours();\r\n const minutes = currentDate.getMinutes();\r\n if (minutes >= 0 && minutes <= 29) {\r\n currentDate.setMinutes(30)\r\n } else if (minutes >= 31 && minutes <= 59) {\r\n currentDate.setHours(hours+1)\r\n currentDate.setMinutes(0)\r\n }\r\n return moment(currentDate).format('HH:mm');\r\n}\r\n\r\n// get hour as hh:mm using moment\r\nexport const getHour = (date: Date | string ) => {\r\n // if already a string and it's like hh:mm then return it\r\n if (typeof date === 'string' && date.indexOf(':') > -1) {\r\n const indexHour = date.indexOf(':');\r\n return indexHour > 3 ? date.slice(indexHour - 2, indexHour + 3) : date\r\n }\r\n\r\n return moment(date).format('HH:mm');\r\n};\r\n\r\nexport type CalendarEvent = {\r\n title: string;\r\n start: Date;\r\n end: Date;\r\n allDay?: boolean;\r\n resource?: any;\r\n};\r\n\r\nexport const formatAppointmentForCalendar = (appointment: AppointmentType, dateFormat: string): CalendarEvent => {\r\n const appointmentDate = new Date(appointment.date);\r\n const day = getDay(appointmentDate, dateFormat);\r\n const hour = getHour(appointmentDate);\r\n\r\n const start = moment(`${day} ${hour}`, 'DD-MM-YYYY HH:mm').toDate();\r\n const end = moment(start).add(30, 'minutes').toDate();\r\n return {\r\n title: `#${appointment.id} la ${hour}`,\r\n start,\r\n end,\r\n resource: appointment\r\n };\r\n};\r\n\r\nconst randomNumberBetween = (min: number, max: number) => {\r\n return Math.floor(Math.random() * (max - min + 1) + min);\r\n};\r\n\r\nexport const appointmentsInDay = (day: Date, appointments: AppointmentType[] | undefined, dateFormat: string) => {\r\n if(!appointments){\r\n return [];\r\n }\r\n const dayAsString = getDay(day, dateFormat);\r\n return appointments.filter((appointment) => getDay(new Date(appointment.date), dateFormat).replace(' ', '') === dayAsString.replace(' ', ''));\r\n};\r\n\r\nexport const getStatusData = (status: string, statusList: any, language: string): { color: string; text: string} => {\r\n let text = '';\r\n Object.values(statusList).forEach((statusItem: any) => {\r\n if(statusItem.code === status){\r\n const indexLang = statusItem.translations.findIndex((trans: any) => trans.language === language);\r\n text = indexLang !== -1 ? statusItem.translations[indexLang].name : statusItem.name;\r\n }\r\n }\r\n );\r\n if (status === statusList?.CANCELED?.code) {\r\n return { color: '#E57373', text: text };\r\n }\r\n\r\n if (status === statusList?.INITIATA?.code) {\r\n return { color: '#FFC107', text: text };\r\n }\r\n\r\n if (status === statusList?.RESCHEDULED?.code) {\r\n return { color: '#5383ff', text: text };\r\n }\r\n\r\n if (status === statusList?.CONFIRMED?.code) {\r\n return { color: '#81C784', text: text };\r\n }\r\n\r\n if (status === statusList?.PAYMENT_CONFIRMATION?.code) {\r\n return { color: '#64B5F6', text: text };\r\n }\r\n\r\n if (status === statusList?.ESTIMATE_ACCEPTED?.code) {\r\n return { color: '#408f43', text: text };\r\n }\r\n\r\n if (status) {\r\n return { color: '#B0BEC5', text: text };\r\n }\r\n\r\n return { color: '#B0BEC5', text: 'Necunoscut' };\r\n};\r\n\r\n\r\nexport const generateArrayOfHours = () => {\r\n const hours = [];\r\n\r\n for (let hour = 0; hour < 24; hour++) {\r\n for (let minute = 0; minute < 60; minute += 30) {\r\n const formattedHour = `${String(hour).padStart(2, '0')}:${String(minute).padStart(2, '0')}`;\r\n hours.push(formattedHour);\r\n }\r\n }\r\n\r\n return hours;\r\n};\r\n\r\nexport const getStatusList = async (setIsLoading: (val: boolean) => void, setValue: any, enqueueSnackbar:any) => {\r\n setIsLoading(true);\r\n\r\n const response = await getAppointmentStatus();\r\n const responseData = response.data as Array;\r\n\r\n if (!responseData) {\r\n enqueueSnackbar(\r\n 'Eroare get status list!',\r\n {\r\n variant: 'error',\r\n autoHideDuration: 5000\r\n }\r\n );\r\n return\r\n }\r\n const futureStatusList: any = {};\r\n responseData.forEach((status: AppointmentStatusType) => {\r\n if(status && status?.code){\r\n futureStatusList[status?.code] = status\r\n }\r\n \r\n })\r\n setValue(futureStatusList)\r\n setIsLoading(false);\r\n}\r\n\r\nexport const getCategoryTypeList = async (setIsLoading: (val: boolean) => void, setValue: any, enqueueSnackbar: any) => {\r\n setIsLoading(true);\r\n\r\n const response = await getAppointmentCategoryType();\r\n if (!response.data) {\r\n enqueueSnackbar(\r\n 'Eroare get status list!',\r\n {\r\n variant: 'error',\r\n autoHideDuration: 5000\r\n }\r\n );\r\n return\r\n }\r\n setValue(response.data)\r\n setIsLoading(false);\r\n}\r\n\r\nconst toStartOfWeek = (date:any) => {\r\n const dayOfWeek = date.getDay();\r\n return new Date(date.getFullYear(), date.getMonth(), date.getDate() - dayOfWeek);\r\n}\r\n\r\nexport const formatDate = (date:string)=>{\r\n const parts = date.split('-');\r\n const formattedDateString = `${parts[2]}-${parts[1]}-${parts[0]}`;\r\n const formatedDate = new Date(formattedDateString);\r\n return formatedDate\r\n}\r\n\r\n\r\nexport const areDatesInSameWeek = (dates:any) => {\r\n if (dates.length === 0) return false;\r\n const firstDate = formatDate(dates[0])\r\n const startOfWeek = toStartOfWeek(firstDate);\r\n for (let i = 0; i < dates.length; i++) {\r\n const currentDate = formatDate(dates[i]);\r\n const currentStartOfWeek = toStartOfWeek(currentDate);\r\n\r\n if (currentStartOfWeek.getTime() !== startOfWeek.getTime()) {\r\n return false; \r\n }\r\n }\r\n\r\n return true;\r\n}","import React, { useEffect, useState } from 'react';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport TextField from '@material-ui/core/TextField';\r\nimport { Typography, Box } from '@material-ui/core';\r\nimport { getClientListRequest } from '../agenda/agenda.requests';\r\nimport { Client } from '../agenda/agenda.types'\r\nimport { TranslatorService } from '../../services/TranslatorService';\r\n\r\ninterface ClientAutocompleteProps {\r\n value: Client | null,\r\n disabled?:boolean,\r\n error?:boolean;\r\n onChange?: (event: React.ChangeEvent, selectedOption: Client | null) => void;\r\n}\r\n\r\nconst ClientAutocomplete: React.FC = ({value, onChange, disabled, error }) => {\r\n const translatorService = new TranslatorService();\r\n const [clients, setClients] = useState([]);\r\n const getClientList = async () => {\r\n const response = await getClientListRequest();\r\n const responseData = response.data as Client[];\r\n if(value && !value?.id){\r\n setClients([...responseData, value])\r\n }else{\r\n setClients(responseData);\r\n }\r\n \r\n };\r\n\r\n const getLabel = (option:Client) =>{\r\n if (option.personTypeId === 1) {\r\n return !option.firstName && !option.lastName ? `${option.email}` : `${option.firstName} ${option.lastName || ''}`\r\n } else if (option.personTypeId === 2) {\r\n return option.companyName\r\n }\r\n return '';\r\n }\r\n\r\n useEffect(() => {\r\n getClientList();\r\n }, []);\r\n\r\n return (\r\n \r\n \r\n {translatorService.Tranlate('APPOINTMENT_CLIENT_TITLE','Client')}\r\n \r\n \r\n \r\n getLabel(client) ||\"\"}\r\n onChange={(e: any, newValue: Client | null)=>{ onChange && onChange(e, newValue)}}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n );\r\n};\r\n\r\nexport default ClientAutocomplete;\r\n","import React from 'react';\r\nimport { Box, Typography } from '@material-ui/core';\r\nimport { Car } from '../agenda/agenda.types';\r\nimport { TranslatorService } from '../../services/TranslatorService';\r\nimport { useAppSelector } from '../../store/configureStore';\r\nimport { getDay } from '../../utils/appointments';\r\n\r\ninterface CarDetailsProps {\r\n selectedCar: Car | null;\r\n disabled?:boolean,\r\n type?:string\r\n}\r\n\r\nconst CarDetails: React.FC = ({ selectedCar, disabled, type }) => {\r\n const translatorService = new TranslatorService();\r\n const dateFormat = useAppSelector((state) => state.app?.dateFormat);\r\n\r\n if (!selectedCar) {\r\n return null;\r\n }\r\n\r\n const CategoryAppointmentDetails = () =>{\r\n return \r\n {selectedCar.plateNumber ? {`${translatorService.Tranlate('APPOINTMENT_CAR_DETAILS_PLATE_NUMBER', 'Plate number')}: ${selectedCar.plateNumber}`} :null}\r\n {selectedCar.vin ?{`${translatorService.Tranlate('APPOINTMENT_CAR_DETAILS_VIN', 'VIN')}: ${selectedCar.vin}`}:null}\r\n {selectedCar.numberOfKilometers ? {`${translatorService.Tranlate('APPOINTMENT_CAR_DETAILS_MILEAGE', 'Mileage')}: ${selectedCar.numberOfKilometers}`} : null}\r\n {selectedCar.identifiedMake || selectedCar.model.brand ? {`${translatorService.Tranlate('APPOINTMENT_CAR_DETAILS_MAKE', 'Make')}: ${selectedCar.identifiedMake ? selectedCar.identifiedMake : selectedCar.model.brand}`}:null}\r\n {selectedCar.identifiedModel || selectedCar.model.name ? {`${translatorService.Tranlate('APPOINTMENT_CAR_DETAILS_MODEL', 'Model')}: ${selectedCar.identifiedModel ? selectedCar.identifiedModel : selectedCar.model.name}`}:null}\r\n {selectedCar.firstPlateDate ?{`${translatorService.Tranlate('APPOINTMENT_CAR_DETAILS_REGISTRATION_DATE', 'Registration date')}: `}{selectedCar.firstPlateDate ? getDay(new Date(selectedCar.firstPlateDate), dateFormat || 'DD/MM/YYYY') : ''}:null}\r\n {selectedCar.identifiedFuelType ?{`${translatorService.Tranlate('APPOINTMENT_CAR_DETAILS_FUEL_TYPE', 'Fuel type')}: ${selectedCar.identifiedFuelType ?? ''}`}:null}\r\n {selectedCar.engineSize ?{`${translatorService.Tranlate('APPOINTMENT_CAR_DETAILS_ENGINE_CAPACITY', 'Engine capacity')}: ${selectedCar.engineSize ?? ''}`}:null}\r\n {selectedCar.power ?{`${translatorService.Tranlate('APPOINTMENT_CAR_DETAILS_POWER', 'Power (in KW)')}: ${selectedCar.power ?? ''}`}:null}\r\n {selectedCar.identifiedCarBody ?{`${translatorService.Tranlate('APPOINTMENT_CAR_DETAILS_CAR_BODY', 'Car body')}: ${selectedCar.identifiedCarBody ?? ''}`}:null}\r\n {selectedCar.motDate ?{`${translatorService.Tranlate('APPOINTMENT_CAR_DETAILS_REGULAR_MOT', 'Regular technical inspection until(MOT)')}: `}{selectedCar.motDate ? getDay(new Date(selectedCar.motDate), dateFormat || 'DD/MM/YYYY') : ''}:null}\r\n {selectedCar.carColor ?{`${translatorService.Tranlate('APPOINTMENT_CAR_DETAILS_COLOR', 'Color')}: ${selectedCar.carColor ?? ''}`}:null}\r\n {selectedCar.engineType ? {`${translatorService.Tranlate('APPOINTMENT_CAR_DETAILS_ENGINE_TYPE', 'Engine type')}: ${selectedCar.engineType ?? ''}`}:null}\r\n {selectedCar.carCategory?.displayName ? {`${translatorService.Tranlate('APPOINTMENT_CAR_DETAILS_VEHICLE_CATEGORY', 'Vehicle category')}: ${selectedCar.carCategory?.displayName ?? ''}`}:null}\r\n \r\n }\r\n\r\n const CategoryAddAppointment = () =>{\r\n return \r\n {selectedCar?.plateNumber ?{`${translatorService.Tranlate('APPOINTMENT_CAR_DETAILS_PLATE_NUMBER', 'Plate number')}: ${selectedCar.plateNumber}`}:null}\r\n {selectedCar?.vin ?{`${translatorService.Tranlate('APPOINTMENT_CAR_DETAILS_VIN', 'VIN')}: ${selectedCar.vin}`}:null}\r\n {selectedCar?.identifiedMake || selectedCar?.model?.brand ?{`${translatorService.Tranlate('APPOINTMENT_CAR_DETAILS_MAKE', 'Make')}: ${selectedCar.identifiedMake ? selectedCar.identifiedMake : selectedCar.model.brand}`}:null}\r\n {selectedCar?.identifiedModel || selectedCar?.model?.name ?{`${translatorService.Tranlate('APPOINTMENT_CAR_DETAILS_MODEL', 'Model')}: ${selectedCar.identifiedModel ? selectedCar.identifiedModel : selectedCar.model.name}`}:null}\r\n {selectedCar?.identifiedCarBody ?{`${translatorService.Tranlate('APPOINTMENT_CAR_DETAILS_CAR_BODY', 'Car body')}: ${selectedCar.identifiedCarBody ?? ''}`}:null}\r\n {selectedCar?.identifiedFuelType ?{`${translatorService.Tranlate('APPOINTMENT_CAR_DETAILS_FUEL_TYPE', 'Fuel type')}: ${selectedCar.identifiedFuelType ?? ''}`}:null}\r\n {selectedCar?.firstPlateDate ?{`${translatorService.Tranlate('APPOINTMENT_CAR_DETAILS_REGISTRATION_DATE', 'Registration date')}: `}{selectedCar.firstPlateDate ? getDay(new Date(selectedCar.firstPlateDate), dateFormat || 'DD/MM/YYYY') : ''}:null}\r\n {selectedCar?.motDate ?{`${translatorService.Tranlate('APPOINTMENT_CAR_DETAILS_REGULAR_MOT', 'Regular technical inspection until(MOT)')}: `}{selectedCar.motDate ? getDay(new Date(selectedCar.motDate), dateFormat || 'DD/MM/YYYY') : ''}:null}\r\n {selectedCar?.engineSize ?{`${translatorService.Tranlate('APPOINTMENT_CAR_DETAILS_ENGINE_CAPACITY', 'Engine capacity')}: ${selectedCar.engineSize ?? ''}`}:null}\r\n {selectedCar?.power ?{`${translatorService.Tranlate('APPOINTMENT_CAR_DETAILS_POWER', 'Power (in KW)')}: ${selectedCar.power ?? ''}`}:null}\r\n {selectedCar?.engineType ?{`${translatorService.Tranlate('APPOINTMENT_CAR_DETAILS_ENGINE_TYPE', 'Engine type')}: ${selectedCar.engineType ?? ''}`}:null}\r\n {selectedCar?.carCategory?.displayName ?{`${translatorService.Tranlate('APPOINTMENT_CAR_DETAILS_VEHICLE_CATEGORY', 'Vehicle category')}: ${selectedCar.carCategory?.displayName ?? ''}`}:null}\r\n {selectedCar?.carColor ?{`${translatorService.Tranlate('APPOINTMENT_CAR_DETAILS_VEHICLE_COLOR', 'Color')}: ${selectedCar.carColor ?? ''}`}:null}\r\n {selectedCar?.numberOfKilometers ? {`${translatorService.Tranlate('APPOINTMENT_CAR_DETAILS_MILEAGE', 'Mileage')}: ${selectedCar.numberOfKilometers}`} : null}\r\n \r\n }\r\n\r\n return (<>\r\n {type === 'details' ? CategoryAppointmentDetails() : CategoryAddAppointment()}\r\n \r\n );\r\n};\r\n\r\nexport default CarDetails;\r\n\r\n\r\n","import React, { useState, useEffect } from 'react';\r\nimport FormGroup from '@material-ui/core/FormGroup';\r\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\r\nimport Checkbox from '@material-ui/core/Checkbox';\r\nimport { Box, Typography } from '@material-ui/core';\r\nimport { getJobListRequest } from '../agenda/agenda.requests';\r\nimport { Job } from '../agenda/agenda.types';\r\nimport { useAppSelector } from '../../store/configureStore';\r\nimport { ITranslation } from '../../interfaces/IReferential';\r\nimport { Option } from '../../types/Agenda';\r\nimport { TranslatorService } from '../../services/TranslatorService';\r\n\r\n\r\ninterface JobsMultipleSelectionProps {\r\n selectedValues: Option[];\r\n onChange?: (selectedValues: Option[]) => void;\r\n disabled?: boolean,\r\n error?:boolean\r\n}\r\n\r\nconst JobsMultipleSelection: React.FC = ({\r\n selectedValues,\r\n onChange,\r\n disabled,\r\n error\r\n}) => {\r\n const [options, setOptions] = useState([]);\r\n const language = useAppSelector((state)=>state.app?.language)\r\n const [selected, setSelected] = useState(selectedValues || []);\r\n const translatorService = new TranslatorService();\r\n\r\n const fetchJobOptions = async () => {\r\n const response = await getJobListRequest();\r\n const responseData = response.data as Job[];\r\n\r\n const jobOptions: Option[] = responseData.map((job) => ({\r\n translations: job.translations,\r\n name: job.name,\r\n id: job.id,\r\n \r\n }));\r\n setOptions(jobOptions);\r\n };\r\n\r\n const getTranslations = (status: any) => {\r\n const indexLang = status.translations.findIndex((trans: any) => trans.language === language);\r\n return indexLang !== -1 ? status.translations[indexLang].name : status.name;\r\n }\r\n\r\n useEffect(() => {\r\n fetchJobOptions();\r\n }, []);\r\n\r\n const handleChange = (value: Option) => {\r\n if(!onChange){\r\n return;\r\n }\r\n const isSelected = selected.some((selectedOption) => selectedOption.id === value.id || selectedOption.jobTypeId === value.id);\r\n\r\n if (isSelected) {\r\n const newSelected = selected.filter((selectedOption) => selectedOption.id !== value.id || selectedOption.jobTypeId === value.id);\r\n setSelected(newSelected);\r\n onChange(newSelected);\r\n } else {\r\n const newSelected = [...selected, value];\r\n setSelected(newSelected);\r\n onChange(newSelected);\r\n }\r\n };\r\n\r\n return (\r\n \r\n \r\n {translatorService.Tranlate('APPOINTMENT_JOB_TYPE_TITLE', 'Job type')}\r\n \r\n \r\n \r\n {options.map((option) => (\r\n selectedOption.id === option.id || selectedOption.jobTypeId === option.id)}\r\n onChange={() => handleChange(option)}\r\n value={option.id}\r\n />\r\n }\r\n label={getTranslations(option)}\r\n />\r\n ))}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default JobsMultipleSelection;\r\n","import React, { ChangeEvent } from 'react';\r\nimport { Box, Typography, TextField } from '@material-ui/core';\r\nimport { TranslatorService } from '../../services/TranslatorService';\r\n\r\ninterface JobDetailsProps {\r\n onChange?: (event: ChangeEvent) => void;\r\n details?:string;\r\n disabled?:boolean;\r\n type?:string;\r\n inputProps?:any\r\n}\r\n\r\nconst JobDetails: React.FC = ({ onChange, details, disabled, type, inputProps }) => {\r\n const translatorService = new TranslatorService();\r\n const handleDescriptionChange = (event: ChangeEvent) => {\r\n onChange && onChange(event);\r\n };\r\n\r\n\r\n return (\r\n \r\n \r\n {translatorService.Tranlate('APPOINTMENT_JOB_DETAILS_TITLE', 'Job details')}\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default JobDetails;\r\n","import React, { useContext, useEffect, useMemo, useState } from 'react';\r\nimport { Box, } from '@material-ui/core';\r\nimport { useAppDispatch, useAppSelector } from '../../store/configureStore';\r\nimport { Calendar, momentLocalizer } from 'react-big-calendar';\r\nimport moment from 'moment';\r\nimport { Card } from 'reactstrap';\r\nimport {\r\n AGENDA_SET_SELECTED_RANGE\r\n} from '../../store/actions/ActionTypes';\r\nimport { formatAppointmentForCalendar, getDay, getStatusData } from '../../utils/appointments';\r\nimport { useHistory } from 'react-router';\r\nimport { AppointmentType } from '../../types/Agenda';\r\nimport { ApplicationContext } from '../../context/Contexts';\r\nimport ArrowLeftIcon from '@material-ui/icons/ArrowLeft';\r\nimport ArrowRightIcon from '@material-ui/icons/ArrowRight'\r\nimport { AppointmentStatusCodeEnum } from '../../helpers/Constants';\r\n\r\nexport const BigCalendar = ({ getAppointments, defaultView, setDefaultView, defaultDay, handleSlotSelect }: any) => {\r\n const history = useHistory()\r\n const localizer = momentLocalizer(moment);\r\n const [zoomLevel, setZoomLevel] = useState(window.devicePixelRatio);\r\n const selectedRange = useAppSelector((state) => state.agenda?.selectedRange);\r\n const context = useContext(ApplicationContext);\r\n const translatorService = context.translatorService;\r\n// const [view, setView] = React.useState<'month' | 'week' | 'day' | 'agenda'>(defaultView || 'month')\r\n const appointments = useAppSelector((state) => state.agenda?.appointments.filter((appointment) => appointment?.appointmentStatus?.code !== AppointmentStatusCodeEnum.CANCELED.toString()));\r\n const dispatch = useAppDispatch();\r\n const dateFormat = useAppSelector((state) => state.app?.dateFormat);\r\n\r\n useEffect(() => {\r\n if (defaultView === 'agenda') {\r\n return;\r\n }\r\n\r\n // if selectedRange is null, set it to current month\r\n if (!selectedRange) {\r\n setDefaultView('month');\r\n return;\r\n }\r\n\r\n // if selectedRange start_date and end_date are the same, set view to day (can bedifferent hours)\r\n if (getDay(selectedRange.start_date, dateFormat || 'DD/MM/YYYY') === getDay(selectedRange.end_date, dateFormat || 'DD/MM/YYYY')) {\r\n setDefaultView('day');\r\n return;\r\n }\r\n\r\n // if selectedRange start_date and end_date are not the same but the difference is less than 7 days, set view to week\r\n if (selectedRange.start_date !== selectedRange.end_date) {\r\n const diff = moment(selectedRange.end_date).diff(moment(selectedRange.start_date), 'days');\r\n\r\n if (diff < 7) {\r\n setDefaultView('week');\r\n return;\r\n }\r\n }\r\n\r\n setDefaultView('month');\r\n }, [selectedRange]);\r\n\r\n const formatedAppointments = useMemo(() => {\r\n if (!appointments) {\r\n return [];\r\n }\r\n return appointments.map((e) => formatAppointmentForCalendar(e, dateFormat || 'DD/MM/YYYY'));\r\n }, [appointments]);\r\n\r\n useEffect(() => {\r\n const handleZoomChange = () => {\r\n setZoomLevel(window.devicePixelRatio);\r\n };\r\n\r\n const matchMedia = window.matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`);\r\n matchMedia.addEventListener('change', handleZoomChange);\r\n\r\n window.addEventListener('resize', handleZoomChange);\r\n return () => {\r\n matchMedia.removeEventListener('change', handleZoomChange);\r\n window.removeEventListener('resize', handleZoomChange);\r\n };\r\n }, []);\r\n\r\n const getEventStyle = () => {\r\n let fontSize = '14px'; \r\n const padding = '4px';\r\n if (zoomLevel > 1) {\r\n fontSize = `${14 - zoomLevel*1}px`; // text mai mic la zoom in\r\n } else if (zoomLevel < 1) {\r\n fontSize = '16px'; // text mai mare la zoom out\r\n }\r\n return {\r\n style: {\r\n fontSize,\r\n padding\r\n }\r\n };\r\n };\r\n\r\n interface DateRange {\r\n start: Date;\r\n end: Date;\r\n }\r\n \r\n interface MonthRange {\r\n monthName: string;\r\n startDate: string; // Data de început a lunii\r\n endDate: string; // Data de sfârșit a lunii\r\n }\r\n \r\n const getFullMonthRangesInRange = (range: DateRange): MonthRange | null => {\r\n const startDate = range.start; \r\n const endDate = range.end;\r\n \r\n // Initialize current to the first day of the month of the start date\r\n const current = new Date(startDate.getFullYear(), startDate.getMonth(), 1);\r\n\r\n // Iterate through each month in the date range\r\n while (current <= endDate) {\r\n // Calculate the start and end of the current month\r\n const monthStart = new Date(current.getFullYear(), current.getMonth(), 1);\r\n const monthEnd = new Date(current.getFullYear(), current.getMonth() + 1, 0);\r\n monthEnd.setHours(23, 59, 59, 999);\r\n\r\n // Check if the whole month is within the date range\r\n if (monthStart >= startDate && monthEnd <= endDate) {\r\n return {\r\n monthName: current.toLocaleString('default', { month: 'long' }), // Month name (e.g., \"June\")\r\n startDate: moment(monthStart).format('YYYY-MM-DDTHH:mm:ss'), // Start date of the month\r\n endDate: moment(monthEnd).format('YYYY-MM-DDTHH:mm:ss') // End date of the month, inclusive\r\n };\r\n }\r\n // Move to the next month\r\n current.setMonth(current.getMonth() + 1);\r\n }\r\n\r\n return null; // Return null if no full month is found\r\n };\r\n \r\n return (\r\n \r\n {\r\n setDefaultView(view);\r\n }}\r\n components={{\r\n event: (props) => \r\n }}\r\n eventPropGetter={getEventStyle}\r\n messages={{\r\n date: translatorService.Tranlate('TABLE_DATE', 'Dată'),\r\n time: translatorService.Tranlate('TABLE_TIME','Timp'),\r\n event: translatorService.Tranlate('TABLE_REZERVATION', 'Rezervare'),\r\n allDay: translatorService.Tranlate('TABLE_ALL_DAY', 'Toată ziua'),\r\n week: translatorService.Tranlate('TABLE_WEEK', 'Săptămână'),\r\n work_week: translatorService.Tranlate('TABLE_WORK_WEEK', 'Săptămână de lucru'),\r\n day: translatorService.Tranlate('TABLE_DAY', 'Ziuă'),\r\n month: translatorService.Tranlate('TABLE_MONTH', 'Lună'),\r\n previous: ,\r\n next: ,\r\n yesterday: translatorService.Tranlate('TABLE_YESTERDAY', 'Ieri'),\r\n tomorrow: translatorService.Tranlate('TABLE_TOMORROW', 'Mâine'),\r\n today: translatorService.Tranlate('TABLE_TODAY', 'Azi'),\r\n agenda: translatorService.Tranlate('TABLE_AGENDA', 'Agendă'),\r\n\r\n noEventsInRange: translatorService.Tranlate('TABLE_NO_EVENTS_IN_RANGE', 'Nu există rezervări în această perioadă'),\r\n\r\n showMore: (total: any) => `${translatorService.Tranlate('TABLE_TOTAL','Încă')} ${total}`\r\n }}\r\n key={JSON.stringify(selectedRange + defaultDay + zoomLevel)}\r\n defaultDate={defaultDay || selectedRange?.start_date || new Date()}\r\n value={selectedRange}\r\n onRangeChange={(range:any) => {\r\n if (range.start && range.end) {\r\n console.log('range', range);\r\n dispatch({\r\n type: AGENDA_SET_SELECTED_RANGE,\r\n payload: {\r\n start_date: range.start,\r\n end_date: range.end\r\n }\r\n });\r\n\r\n const rang: DateRange = {\r\n start: range.start,\r\n end: range.end\r\n };\r\n const fullMonthRanges = getFullMonthRangesInRange(rang);\r\n console.log('fullMonthRanges', fullMonthRanges);\r\n // Call getAppointments with the correctly formatted date range\r\n getAppointments({\r\n dateFilterStartDate: fullMonthRanges?.startDate || range.start,\r\n datefilterEndDate: fullMonthRanges?.endDate || range.end\r\n });\r\n return;\r\n }\r\n\r\n // if array with more than 1 element, it's weekly view\r\n if (range.length > 1) {\r\n dispatch({\r\n type: AGENDA_SET_SELECTED_RANGE,\r\n payload: {\r\n start_date: range[0],\r\n end_date: range[range.length - 1]\r\n }\r\n });\r\n getAppointments({\r\n dateFilterStartDate: range[0],\r\n datefilterEndDate: range[range.length - 1]\r\n })\r\n return;\r\n }\r\n\r\n // if array with 1 element, it's daily view\r\n if (range.length === 1) {\r\n dispatch({\r\n type: AGENDA_SET_SELECTED_RANGE,\r\n payload: {\r\n start_date: range[0],\r\n end_date: range[0]\r\n }\r\n });\r\n const date = new Date(range[0]);\r\n const endDate = date.setDate(date.getDate() + 1)\r\n getAppointments({\r\n dateFilterStartDate: range[0],\r\n datefilterEndDate: moment(endDate).format()\r\n })\r\n return;\r\n }\r\n }}\r\n startAccessor=\"start\"\r\n endAccessor=\"end\"\r\n onSelectEvent={(event: any) => {\r\n history.push(`/appointment/${event.resource.id}`)\r\n }}\r\n onSelectSlot={handleSlotSelect}\r\n popup\r\n style={{ width: '100%', heigth: '80vh' }}\r\n />\r\n \r\n );\r\n};\r\n\r\nexport const CustomEvent = ({ event, customStyle }: any) => {\r\n const resource = event.resource as AppointmentType;\r\n const statusList = useAppSelector((state) => state.agenda?.statusList)\r\n const language = useAppSelector((state)=>state.app?.language)\r\n\r\n if (!resource) {\r\n return null;\r\n }\r\n\r\n const { text, color } = getStatusData(resource?.appointmentStatus?.code || '', statusList, language);\r\n\r\n return (\r\n \r\n {text}\r\n {`${resource.id} ${resource?.vehicle?.plateNumber ? `(${resource?.vehicle?.plateNumber})`:''}`} \r\n \r\n );\r\n};\r\n","import React, { useState } from 'react';\r\nimport { Box, Button, CircularProgress, IconButton, Modal, TextField, Typography } from '@material-ui/core';\r\nimport Calendar from 'react-calendar';\r\nimport 'react-calendar/dist/Calendar.css';\r\nimport { generateArrayOfHours, getDay, getHour, getStatusList } from '../../utils/appointments';\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { TranslatorService } from '../../services/TranslatorService';\r\nimport moment from 'moment';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport { BigCalendar } from '../agenda/BigCalendar';\r\nimport { getAppointmentsRequest } from '../agenda/agenda.requests';\r\nimport { ResponseAppointmentsData } from '../../types/Agenda';\r\nimport { useAppDispatch, useAppSelector } from '../../store/configureStore';\r\nimport { AGENDA_SET_APPOINTMENTS, AGENDA_SET_SELECTED_RANGE, AGENDA_SET_STATUS_LIST } from '../../store/actions/ActionTypes';\r\nimport { useSnackbar } from 'notistack';\r\n\r\ninterface CustomStyleProps{\r\n calendarStyle?:any,\r\n hourDropdownStyle?:any\r\n}\r\n\r\ninterface AppointmentCalendarProps{\r\n day:Date | null,\r\n setDay: (val:Date | null) => void, \r\n hour:string | null, \r\n setHour: (val:string | null) => void,\r\n disabled?:boolean,\r\n customStyle?:CustomStyleProps\r\n minDate?:any\r\n showDefaultCalendar:boolean\r\n}\r\n\r\nexport const AppointmentCalendar = ({ day, setDay, hour, setHour, disabled, customStyle, minDate, showDefaultCalendar }: AppointmentCalendarProps) => {\r\n const [isLoading, setIsLoading] = React.useState(false);\r\n const [showCalendar, setShowCalendar] = useState(false);\r\n const [showBigCalendar, setShowBigCalendar] = useState(false);\r\n const hours = generateArrayOfHours()\r\n const translatorService = new TranslatorService();\r\n const [localAppointments, setLocalAppoitments] = useState>([]);\r\n const [localLoading, setLocalLoading] = useState(false);\r\n const [defaultView, setDefaultView] = useState<'month' | 'week' | 'day' | 'agenda'>('week');\r\n const [defaultDay, setDefaultDay] = useState()\r\n const dispatch = useAppDispatch();\r\n const [showDropdown, setShowDropdown] = useState(false);\r\n const { enqueueSnackbar } = useSnackbar();\r\n const dateFormat = useAppSelector((state) => state.app?.dateFormat);\r\n const statusList = useAppSelector((state) => state.agenda?.statusList);\r\n const [isLoadingDate, setIsLoadingDate] = useState(false);\r\n const [isLoadingHour, setIsLoadingHour] = useState(false);\r\n\r\n React.useEffect(() => {\r\n if (Object.keys(statusList).length === 0) {\r\n getStatusList(setIsLoading, (value:any)=>{\r\n dispatch({\r\n type: AGENDA_SET_STATUS_LIST,\r\n payload: value\r\n });\r\n }, enqueueSnackbar);\r\n }\r\n }, []);\r\n \r\n const handleSelectOption = (ora:string) => {\r\n setHour(ora)\r\n setShowDropdown(false);\r\n };\r\n\r\n const getSyles = (generalStyle:any, customStyle:any)=>{\r\n if(customStyle){\r\n return {...generalStyle, ...customStyle}\r\n }\r\n return {...generalStyle}\r\n }\r\n\r\n const fetchAppointments = async (filters: any, onlyOneDay?: boolean) => {\r\n !onlyOneDay && setLocalLoading(true)\r\n const response = await getAppointmentsRequest(filters);\r\n\r\n const responseData = response.data as ResponseAppointmentsData;\r\n\r\n if (!responseData?.appointments) {\r\n !onlyOneDay && setLocalLoading(false)\r\n return\r\n }\r\n\r\n if (onlyOneDay) {\r\n setLocalAppoitments(responseData?.appointments)\r\n } else {\r\n dispatch({\r\n type: AGENDA_SET_APPOINTMENTS,\r\n payload: responseData.appointments,\r\n });\r\n }\r\n\r\n !onlyOneDay && setLocalLoading(false)\r\n };\r\n\r\n const onSelectSlot = (slotInfo: any) => {\r\n const selectedDate = new Date(slotInfo.start);\r\n if (defaultView === 'month') {\r\n setDefaultDay(selectedDate);\r\n setDefaultView('day')\r\n } else {\r\n const currentDate = new Date();\r\n if (selectedDate < currentDate) {\r\n enqueueSnackbar(translatorService.Tranlate('PAST_DATE', 'You cannot select a date from the past for scheduling'), {\r\n variant: 'error'\r\n });\r\n return;\r\n }\r\n const selectedHour = selectedDate.getHours();\r\n const selectedMinute = selectedDate.getMinutes();\r\n setDay(selectedDate);\r\n setHour(`${selectedHour < 10 ? `0${selectedHour}` : selectedHour}:${selectedMinute < 10 ? `0${selectedMinute}` : selectedMinute}`);\r\n setShowBigCalendar(false)\r\n }\r\n }\r\n\r\n const renderCalendar = () => {\r\n return
\r\n { setShowBigCalendar(false) }}>\r\n
\r\n
\r\n { setShowBigCalendar(false) }}>\r\n \r\n \r\n
\r\n \r\n {translatorService.Tranlate('APPOINTMENT_RESCHUDELE_CALENDAR_TITLE', 'Select the date and time for rescheduling')}\r\n \r\n \r\n
\r\n
\r\n
\r\n }\r\n\r\n const mapAppointments = async () => {\r\n const currentDate = defaultDay == null ? new Date() : defaultDay; \r\n const firstDayOfMonth = new Date(currentDate.getFullYear(), currentDate.getMonth(), 1);\r\n const lastDayOfMonth = new Date(currentDate.getFullYear(), currentDate.getMonth() + 1, 0);\r\n lastDayOfMonth.setHours(23, 59, 59, 999);\r\n \r\n dispatch({\r\n type: AGENDA_SET_SELECTED_RANGE,\r\n payload: {\r\n start_date: firstDayOfMonth,\r\n end_date: lastDayOfMonth\r\n }\r\n });\r\n\r\n await fetchAppointments({\r\n dateFilterStartDate: moment(firstDayOfMonth).format('YYYY-MM-DDTHH:mm:ss'),\r\n datefilterEndDate: moment(lastDayOfMonth).format('YYYY-MM-DDTHH:mm:ss')\r\n });\r\n\r\n setDefaultView('month');\r\n }\r\n\r\n return (\r\n \r\n \r\n {translatorService.Tranlate('APPOINTMENT_CALENDAR_TITLE', 'Schedule')}\r\n \r\n \r\n \r\n {\r\n if(!showDefaultCalendar){\r\n const currentDate = new Date();\r\n setDefaultDay(currentDate);\r\n setIsLoadingDate(true);\r\n await mapAppointments();\r\n setIsLoadingDate(false);\r\n setShowBigCalendar(true);\r\n setDefaultView('week');\r\n return;\r\n }\r\n if (showDropdown) { setShowDropdown(false) } setShowCalendar(!showCalendar)\r\n }}\r\n InputProps={{\r\n endAdornment: (\r\n \r\n {isLoadingDate && (\r\n \r\n )}\r\n \r\n \r\n ),\r\n style: { cursor: 'pointer' } \r\n }}\r\n />\r\n\r\n {showCalendar && showDefaultCalendar ? {setDay(date); setShowCalendar(false)}}\r\n /> : null}\r\n {showBigCalendar && !showDefaultCalendar ? renderCalendar():null}\r\n \r\n \r\n {\r\n if (!showDefaultCalendar) {\r\n const currentDate = new Date();\r\n setDefaultDay(currentDate);\r\n setIsLoadingHour(true);\r\n await mapAppointments();\r\n setIsLoadingHour(false);\r\n setShowBigCalendar(true);\r\n setDefaultView('week');\r\n return;\r\n }\r\n if(showCalendar){setShowCalendar(false)} setShowDropdown(!showDropdown)\r\n }}\r\n placeholder={translatorService.Tranlate('APPOINTMENT_SELECT_PLACEHOLDER', 'Selecteaza')}\r\n InputProps={{\r\n endAdornment: (\r\n \r\n {isLoadingHour && (\r\n \r\n )}\r\n \r\n \r\n ),\r\n style: { cursor: 'pointer' }\r\n }}\r\n />\r\n\r\n {showDropdown && showDefaultCalendar && (\r\n
\r\n {hours.map((ora:string) => (\r\n handleSelectOption(ora)} style={{ marginBottom:8, textAlign:'center'}}>\r\n {ora}\r\n \r\n ))}\r\n
\r\n )}\r\n \r\n
\r\n\r\n
\r\n
\r\n );\r\n};\r\n","import React from 'react';\r\nimport { Box, Tooltip, Typography } from '@material-ui/core';\r\n// Components\r\nimport * as R from 'ramda';\r\nimport { getHour, getHourForAppointment } from '../../utils/appointments';\r\nimport { AppointmentType } from '../../types/Agenda';;\r\nimport Loader from '../Loader';\r\nimport { rest } from 'lodash';\r\nimport ClientAutocomplete from '../appointment/ClientAutocomplete';\r\nimport CarDetails from '../appointment/CarDetails';\r\nimport JobsMultipleSelection from '../appointment/JobsMultipleSelection';\r\nimport { FormControlLabel, Switch } from '@material-ui/core';\r\nimport JobDetails from '../appointment/JobDetails';\r\nimport { AppointmentCalendar } from '../appointment/AppointmentCalendar';\r\nimport { Job } from '../agenda/agenda.types';\r\nimport { addAppointment, getAppointmentByCaseId, getJobListRequest } from '../agenda/agenda.requests';\r\nimport { Button } from 'reactstrap';\r\nimport { WorkflowPartner, WorkflowSectionStepForm } from '../../interfaces/Workflow';\r\nimport { AppState, ApplicationState, CaseSettingsActionCreators, CaseSettingsState } from '../../store';\r\nimport { ProviderContext, withSnackbar } from 'notistack';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { connect } from 'react-redux';\r\nimport { AppUser } from '../../interfaces/AppUser';\r\nimport { FormHelpers } from '../../helpers/forms/FormHelpers';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport moment from 'moment';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { IAppUserService } from '../../services/Interfaces/IAppUserService';\r\nimport { Autocomplete } from '@material-ui/lab';\r\nimport { TextValidator } from 'react-material-ui-form-validator';\r\nimport _ from 'lodash';\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\n\r\ninterface ICaseDetailsCaseServiceAddAppointmentFormState {\r\n isLoading: boolean,\r\n appointment: AppointmentType,\r\n date: Date | null,\r\n hour: string | null,\r\n hasRights: boolean,\r\n selectedUser: AppUser | null;\r\n organizations: WorkflowPartner[]; \r\n isUserHidden:boolean;\r\n isUsersDisabled:boolean;\r\n isLoading2:boolean;\r\n users: AppUser[];\r\n executing: boolean;\r\n isCarInService: boolean;\r\n requiresServiceScheduling:boolean;\r\n}\r\n\r\nexport interface ExternalCaseDetailsCaseServiceAddAppointmentFormProps {\r\n workflowForm: WorkflowSectionStepForm;\r\n}\r\n\r\ntype ICaseDetailsCaseServiceAddAppointmentFormProps =\r\n ExternalCaseDetailsCaseServiceAddAppointmentFormProps & {\r\n caseSettingsState: CaseSettingsState;\r\n appState: AppState;\r\n } & typeof CaseSettingsActionCreators &\r\n ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass CaseDetailsCaseServiceAddAppointmentForm extends React.PureComponent<\r\n ICaseDetailsCaseServiceAddAppointmentFormProps,\r\n ICaseDetailsCaseServiceAddAppointmentFormState\r\n> {\r\n\r\n private caseService!: ICaseService;\r\n private translatorService!: ITranslatorService;\r\n private appUserService!: IAppUserService;\r\n\r\n static contextType = ApplicationContext;\r\n state = {\r\n isLoading: false,\r\n appointment:{} as AppointmentType,\r\n date:new Date(),\r\n hour: getHourForAppointment(),\r\n hasRights: false,\r\n selectedUser: null,\r\n organizations: [],\r\n isUserHidden:false,\r\n isUsersDisabled:false, \r\n isLoading2: false,\r\n users:[],\r\n executing: false,\r\n isCarInService: true,\r\n requiresServiceScheduling: false\r\n } as ICaseDetailsCaseServiceAddAppointmentFormState;\r\n\r\n public componentDidMount() {\r\n this.getAppointment()\r\n }\r\n\r\n\r\n getAppointment = async () => {\r\n this.setState({ isLoading: true });\r\n \r\n const res = await getAppointmentByCaseId(Number.parseInt(this.props.match.params.id));\r\n\r\n const appointment = res.data as AppointmentType\r\n if (res.error || !appointment) {\r\n this.setState({ isLoading: false });\r\n return;\r\n }\r\n \r\n const hasRights = FormHelpers.HasRights(\r\n this.props.workflowForm.workflowFormPermissions,\r\n this.props.appState.appUser!,\r\n this.props.caseSettingsState.case!.caseStatus.caseStatusId\r\n );\r\n this.setState({ \r\n isLoading: false, \r\n appointment: appointment, \r\n date: appointment.parentId ? new Date(appointment.date): null,\r\n hour: appointment.parentId ? getHour(new Date(appointment.date)) : null,\r\n hasRights: hasRights,\r\n isCarInService: this.props.caseSettingsState.case!.carInService,\r\n requiresServiceScheduling: !this.props.caseSettingsState.case!.carInService\r\n }, this.setCaseAllocation);\r\n }\r\n\r\n setCaseAllocation = async () => {\r\n if (!this.state.hasRights) {\r\n return;\r\n }\r\n\r\n const allocationResult = await FormHelpers.ParseAllocations(\r\n this.props.workflowForm.workflowFormActions,\r\n this.state.organizations,\r\n this.appUserService\r\n );\r\n if (R.isNil(allocationResult)) {\r\n const partner = this.state.organizations.find(\r\n (item) => item.partnerId === this.props.caseSettingsState.case!.caseStatus.assignedTo!.hoId\r\n );\r\n this.setState(\r\n {\r\n selectedUser: this.props.caseSettingsState.case!.caseStatus.assignedTo,\r\n organizations: this.state.organizations,\r\n },\r\n async () => await this.loadUsers(R.isNil(partner) ? null : partner.partnerId, null)\r\n );\r\n return;\r\n }\r\n if (allocationResult.isLastUser || allocationResult.caseStatusId != null) {\r\n this.setState({ isUserHidden: true });\r\n return;\r\n }\r\n this.setState(\r\n {\r\n selectedUser: allocationResult.user,\r\n organizations: allocationResult.partners,\r\n isUsersDisabled: !R.isNil(allocationResult.user),\r\n },\r\n async () => {\r\n if (allocationResult.partner === null) {\r\n return;\r\n }\r\n await this.loadUsers(allocationResult.partner.partnerId, allocationResult.roleId);\r\n }\r\n );\r\n };\r\n\r\n loadUsers = async (organizationId: number | null, roleId: number | null) => {\r\n if (organizationId === null) {\r\n this.setState({\r\n isLoading2: false\r\n });\r\n } else {\r\n const users = await this.appUserService.GetUserAppUsers();\r\n\r\n this.setState({\r\n users: users.users.filter(\r\n (user) =>\r\n (user.organization!.hoId === organizationId ||\r\n user.organizationId === organizationId) &&\r\n ((roleId !== null && user.roleId === roleId) || roleId === null)\r\n ),\r\n isLoading2: false\r\n });\r\n }\r\n };\r\n\r\n submitForm = async (caseId: number, caseSectionStepFormId: number, appUser: AppUser | null) => {\r\n let newStatus = await this.caseService.SubmitForm(caseId, caseSectionStepFormId, appUser);\r\n\r\n if (newStatus === null) {\r\n newStatus = this.props.caseSettingsState.case!.caseStatus;\r\n }\r\n\r\n this.props.SetCaseStatus(newStatus);\r\n if (appUser !== null) {\r\n this.props.AddPartner(appUser!.hoId === null ? appUser!.organizationId : appUser!.hoId);\r\n }\r\n\r\n const hasRights = FormHelpers.HasRights(\r\n this.props.workflowForm.workflowFormPermissions,\r\n this.props.appState.appUser!,\r\n newStatus.caseStatusId\r\n );\r\n this.setState({ hasRights: hasRights });\r\n };\r\n\r\n getPayloadFormat = async (carInService: boolean) =>{\r\n const response = await getJobListRequest();\r\n const responseData = response.data as Job[];\r\n const selectedJobs = this.state.appointment.appointmentJobTypes.map((job)=>{\r\n const indexJob = responseData.findIndex((item)=> item.id === job.jobTypeId);\r\n return {id:job.jobTypeId, name:responseData[indexJob].displayName}}\r\n )\r\n const finalDate = this.state.date ?? null;\r\n const splitHour = this.state.hour != null ? this.state.hour.split(':') : null;\r\n if (finalDate && splitHour) {\r\n finalDate.setHours(parseInt(splitHour[0]));\r\n finalDate.setMinutes(parseInt(splitHour[1]));\r\n }\r\n const payload = {\r\n serviceId: this.state.appointment.serviceId,\r\n appointmentClient:this.state.appointment.appointmentClient,\r\n appointmentJobTypes: selectedJobs,\r\n jobDetails: this.state.appointment.jobDetails,\r\n vehicle: {\r\n vin: this.state.appointment.vehicle.vin || null,\r\n plateNumber: this.state.appointment.vehicle?.plateNumber || null,\r\n make: this.state.appointment.vehicle?.identifiedMake || null,\r\n model: this.state.appointment.vehicle?.identifiedModel || null,\r\n carBody: this.state.appointment.vehicle?.identifiedCarBody || null,\r\n fuelType: this.state.appointment.vehicle?.identifiedFuelType || null,\r\n registrationDate: this.state.appointment.vehicle.registrationDate,\r\n engineSize: this.state.appointment.vehicle.engineSize,\r\n power: this.state.appointment.vehicle.power,\r\n numberOfKilometers: this.state.appointment.vehicle.numberOfKilometers,\r\n },\r\n date: finalDate != null ? moment(finalDate).format() : null,\r\n appointmentCategoryTypeId: 2,\r\n workflowId: this.props.caseSettingsState.caseSettings!.workflow.id,\r\n parentId:this.state.appointment.id,\r\n caseId:this.state.appointment.caseId,\r\n carInService: carInService\r\n }\r\n return payload;\r\n }\r\n\r\n handleSwitchChange = (checked: boolean, isCarInService:boolean) => {\r\n this.setState({\r\n isCarInService: isCarInService ? checked : !checked,\r\n requiresServiceScheduling: isCarInService ? !checked : checked\r\n });\r\n };\r\n \r\n addNewAppointment = async() => {\r\n const finalDate = this.state.date ?? null;\r\n const splitHour = this.state.hour != null ? this.state.hour.split(':') : null;\r\n let hasErrors = false;\r\n if (!finalDate) {\r\n hasErrors = true;\r\n this.validateFieldRequiredAdd('calendar');\r\n }\r\n if (!splitHour) {\r\n hasErrors = true;\r\n this.validateFieldRequiredAdd('hour');\r\n }\r\n if (hasErrors) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('COMPLETE_MANDATORY_FIELDS', 'Completati campurile obligatorii!'), {\r\n variant: 'warning'\r\n });\r\n return;\r\n }\r\n\r\n this.setState({ executing: true });\r\n const payload = await this.getPayloadFormat(false);\r\n const res = await addAppointment(payload)\r\n if (res.error) {\r\n this.setState({ executing: false });\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n return;\r\n }\r\n\r\n await this.submitForm(\r\n Number.parseInt(this.props.match.params.id),\r\n this.props.workflowForm.id,\r\n this.state.selectedUser\r\n );\r\n\r\n this.setState(\r\n {\r\n appointment:{} as AppointmentType,\r\n selectedUser: null,\r\n executing:false\r\n }\r\n );\r\n }\r\n\r\n carInService = async () => {\r\n //Set date and hour to null \r\n this.setState({ date: null, hour: null, executing: true });\r\n\r\n //Create new appointment with car in service = true\r\n const payload = await this.getPayloadFormat(true);\r\n const res = await addAppointment(payload);\r\n if (res.error) {\r\n this.setState({ executing: false });\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n\r\n return;\r\n }\r\n }\r\n\r\n handleUserChange = (newValue: AppUser | null) => {\r\n this.setState({ selectedUser: newValue });\r\n };\r\n\r\n displayInfo = (info: string) => {\r\n return (\r\n { e.preventDefault() }}\r\n {...rest}\r\n disableHoverListener={!this.state.hasRights || this.state.executing}\r\n title={info}\r\n placement='right'\r\n >\r\n
\r\n \r\n
\r\n \r\n );\r\n };\r\n\r\n validateFieldRequiredAdd = (field: string) => {\r\n const identifyInput = document\r\n .getElementsByClassName('id-' + field)[0]\r\n .closest('div') as HTMLElement;\r\n \r\n const inputValidate = identifyInput.classList.add('Mui-error'); \r\n return inputValidate;\r\n };\r\n\r\n validateFieldRequiredRemove = (field: string) => {\r\n const identifyInput = document\r\n .getElementsByClassName('id-' + field)[0]\r\n .closest('div') as HTMLElement;\r\n\r\n const inputValidate = identifyInput.classList.remove('Mui-error'); \r\n return inputValidate;\r\n };\r\n\r\n\r\n public render() {\r\n this.caseService = (this.context as AppContext).caseService;\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n\r\n return <>{this.state.isLoading ? :\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n \r\n {this.translatorService.Tranlate('APPOINTMENT_CAR_TITLE', 'Car')}\r\n \r\n {this.state.appointment?.vehicle && }\r\n \r\n \r\n
\r\n \r\n \r\n \r\n\r\n \r\n \r\n {this.translatorService.Tranlate('APPOINTMENT_CAR_REPAIR_TITLE', 'Reparație mașină')}\r\n \r\n \r\n {this.state.isCarInService && (\r\n {\r\n console.log(checked);\r\n }}\r\n color=\"primary\"\r\n id=\"isCarInService\"\r\n \r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n
\r\n \r\n {this.translatorService.Tranlate('APPOINTMENT_CAR_IS_IN_SERVICE', 'Mașina este în service')}\r\n \r\n {this.displayInfo(this.translatorService.Tranlate('APPOINTMENT_CAR_IS_IN_SERVICE_INFO', 'Selectează dacă mașina rămâne în service pe perioada reparației și nu este nevoie de o programare'))}\r\n
\r\n }\r\n />\r\n )}\r\n {!this.state.isCarInService && (\r\n {\r\n console.log(checked);\r\n }}\r\n color=\"primary\"\r\n id=\"requiresServiceScheduling\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={\r\n
\r\n \r\n {this.translatorService.Tranlate('APPOINTMENT_REQUIRES_SERVICE_SCHEDULING', 'Necesită programare service')}\r\n \r\n {this.displayInfo(this.translatorService.Tranlate('APPOINTMENT_REQUIRES_SERVICE_SCHEDULING_INFO', 'Selectează dacă este necesară o programare pentru reparația mașinii'))}\r\n
\r\n }\r\n />\r\n )}\r\n
\r\n
\r\n\r\n {this.state.requiresServiceScheduling && this.state.appointment.date !== null ? \r\n
\r\n {\r\n this.validateFieldRequiredRemove('calendar');\r\n this.setState({ date: day });\r\n }} \r\n hour={this.state.hour} \r\n setHour={(hour) => {\r\n this.validateFieldRequiredRemove('hour');\r\n this.setState({ hour:hour });\r\n }} \r\n minDate={new Date()}\r\n customStyle={{\r\n calendarStyle:{marginTop:-335},\r\n hourDropdownStyle:{marginTop:-260}\r\n }}\r\n showDefaultCalendar={false}\r\n />\r\n
\r\n
:<>}\r\n {!this.state.isLoading2 && this.state.users.length > 0 ? (\r\n this.handleUserChange(newValue)}\r\n getOptionLabel={(option: AppUser) => option.userName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n ) : null}\r\n
\r\n this.addNewAppointment()}\r\n disabled={!this.state.hasRights || this.state.executing}\r\n >\r\n {this.translatorService.Tranlate('CASE_DETAILS_BUTTON_SAVE', 'Save')}\r\n \r\n
\r\n
\r\n }\r\n}\r\n};\r\n\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalCaseDetailsCaseServiceAddAppointmentFormProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app\r\n }),\r\n CaseSettingsActionCreators,\r\n mergeProps\r\n)(withSnackbar(CaseDetailsCaseServiceAddAppointmentForm as any));","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n ApplicationState,\r\n CaseSettingsState,\r\n AppState,\r\n CaseSettingsActionCreators\r\n} from '../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { Button, Checkbox, FormControlLabel, Grid, Switch, Typography } from '@material-ui/core';\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { WorkflowSectionStepForm } from '../../interfaces/Workflow';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport { AppUser } from '../../interfaces/AppUser';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport { FormHelpers } from '../../helpers/forms/FormHelpers';\r\nimport NumberFormat from 'react-number-format';\r\nimport * as R from 'ramda';\r\nimport { Appointment, CaseVehicleDetails } from '../../interfaces/Case';\r\nimport { Utils } from '../../helpers/Utils';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport { DatePicker, MuiPickersUtilsProvider } from '@material-ui/pickers';\r\nimport MomentUtils from '@date-io/moment';\r\nimport moment from 'moment';\r\nimport { MaterialUiPickersDate } from '@material-ui/pickers/typings/date';\r\nimport _ from 'lodash';\r\nimport { CalculationTypeCode, CountryCodeEnum } from '../../helpers/Constants';\r\n\r\ninterface ICaseDetailsCaseTabInOutDataFormState {\r\n isLoading: boolean;\r\n hasRights: boolean;\r\n executing: boolean;\r\n caseVehicleDetails: CaseVehicleDetails;\r\n repairDateError: string;\r\n appointment: Appointment | null;\r\n minDate: string | null;\r\n}\r\n\r\nclass LocalizedUtils extends MomentUtils {\r\n // dateFormat = \"DD MM YYYY\";\r\n}\r\n\r\n\r\nexport interface ExternalCaseDetailsCaseTabInOutDataFormProps {\r\n workflowForm: WorkflowSectionStepForm;\r\n}\r\n\r\ntype ICaseDetailsCaseTabInOutDataFormProps = ExternalCaseDetailsCaseTabInOutDataFormProps & {\r\n caseSettingsState: CaseSettingsState;\r\n appState: AppState;\r\n} & typeof CaseSettingsActionCreators &\r\n ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass CaseDetailsCaseTabInOutDataForm extends React.PureComponent<\r\n ICaseDetailsCaseTabInOutDataFormProps,\r\n ICaseDetailsCaseTabInOutDataFormState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private caseService!: ICaseService;\r\n\r\n static contextType = ApplicationContext;\r\n state = {\r\n isLoading: false,\r\n hasRights: false,\r\n executing: false,\r\n caseVehicleDetails: {\r\n id: 0,\r\n caseId: this.props.caseSettingsState.case!.id,\r\n repairDate: null,\r\n hasOkWindows: false,\r\n hasGlitchWindows: false,\r\n hasOkLights: false,\r\n hasGlitchLights: false,\r\n hasOkBodyAndPaint: false,\r\n hasGlitchBodyAndPaint: false,\r\n hasOkWipers: false,\r\n hasGlitchWipers: false,\r\n fuelInTheTank1: false,\r\n fuelInTheTank2: false,\r\n fuelInTheTank3: false,\r\n fuelInTheTank4: false,\r\n fuelInTheTank5: false,\r\n mandatoryEquipment1: true,\r\n mandatoryEquipment2: true,\r\n mandatoryEquipment3: true,\r\n mandatoryEquipment4: true,\r\n mandatoryEquipment5: true,\r\n otherEquipment1: false,\r\n otherEquipment2: false,\r\n otherEquipment3: false,\r\n otherEquipment4: false,\r\n otherEquipment5: false,\r\n hasPickUp: false,\r\n replacementVehicle: false,\r\n documentsReceived1: false,\r\n documentsReceived2: false,\r\n documentsReceived3: false,\r\n documentsReceived4: false\r\n } as CaseVehicleDetails,\r\n appointment: null,\r\n minDate: null\r\n } as ICaseDetailsCaseTabInOutDataFormState;\r\n\r\n inputTextValidator = React.createRef();\r\n\r\n public componentDidMount() {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (R.isNil(caseSettings) || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadCaseInOutDataForm();\r\n }\r\n );\r\n }\r\n\r\n loadCaseInOutDataForm = async () => {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (R.isNil(caseSettings) || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n \r\n this.setState({\r\n ...this.state,\r\n isLoading: true\r\n });\r\n\r\n const [appointment, lastApprovedCaseCalculationHistory] = await Promise.all([\r\n this.props.workflowForm.appointmentCategoryTypeId != null ? this.caseService.GetAppointmentByType(caseId, this.props.workflowForm.appointmentCategoryTypeId) : null,\r\n this.caseService.GetLastApprovedCaseCalculationHistory(caseId, CalculationTypeCode.ALT.toString())\r\n ]);\r\n\r\n console.log('Programare asociata: ', appointment);\r\n if (appointment == null) {\r\n // this.props.enqueueSnackbar(this.translatorService.Tranlate('NO_APPOINTMENT_FOUND', 'Nu s-a gasit programarea asociata!'), {\r\n // variant: 'warning'\r\n // });\r\n\r\n this.setState({\r\n ...this.state,\r\n isLoading: false\r\n }); \r\n\r\n return;\r\n }\r\n\r\n let caseVehicleDetails = await this.caseService.GetCurrentVehicleDetails(appointment.id);\r\n if (R.isNil(caseVehicleDetails)) {\r\n caseVehicleDetails = _.cloneDeep(this.state.caseVehicleDetails);\r\n caseVehicleDetails.repairDate = appointment.date ? moment(appointment.date).format('YYYY-MM-DD') : null;\r\n caseVehicleDetails.repairPrice = lastApprovedCaseCalculationHistory != null ? lastApprovedCaseCalculationHistory.amount * 1.1 : caseVehicleDetails.repairPrice;\r\n caseVehicleDetails.appointmentId = appointment.id;\r\n }\r\n \r\n console.log('caseVehicleDetails', caseVehicleDetails);\r\n \r\n const hasRights = FormHelpers.HasRights(\r\n this.props.workflowForm.workflowFormPermissions,\r\n this.props.appState.appUser!,\r\n this.props.caseSettingsState.case!.caseStatus.caseStatusId\r\n );\r\n\r\n this.setState({\r\n ...this.state,\r\n isLoading: false,\r\n hasRights: hasRights,\r\n caseVehicleDetails: caseVehicleDetails,\r\n appointment: appointment,\r\n minDate: appointment && appointment.date ? moment(appointment.date).format('YYYY-MM-DD') : null\r\n });\r\n };\r\n\r\n\r\n submitForm = async (caseId: number, caseSectionStepFormId: number, appUser: AppUser | null) => {\r\n let newStatus = await this.caseService.SubmitForm(caseId, caseSectionStepFormId, appUser);\r\n\r\n if (newStatus === null) {\r\n newStatus = this.props.caseSettingsState.case!.caseStatus;\r\n }\r\n\r\n this.props.SetCaseStatus(newStatus);\r\n if (appUser !== null) {\r\n this.props.AddPartner(appUser!.hoId === null ? appUser!.organizationId : appUser!.hoId);\r\n }\r\n\r\n const hasRights = FormHelpers.HasRights(\r\n this.props.workflowForm.workflowFormPermissions,\r\n this.props.appState.appUser!,\r\n newStatus.caseStatusId\r\n );\r\n this.setState({ hasRights: hasRights });\r\n };\r\n\r\n isAllowed = (values: any) => {\r\n const { floatValue } = values;\r\n console.log('isAllowed', floatValue);\r\n return floatValue === undefined || floatValue <= 999999.99;\r\n };\r\n\r\n NumberFormatCustom = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n const countryCode = (this.props.appState.appUser?.organization?.country ?? null)?.code ?? CountryCodeEnum.RO.toString();\r\n if (countryCode == CountryCodeEnum.CZ.toString()) {\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n allowNegative={false}\r\n thousandSeparator=\" \"\r\n decimalSeparator=\",\"\r\n decimalScale={2}\r\n fixedDecimalScale={true}\r\n isAllowed={this.isAllowed}\r\n />\r\n );\r\n }\r\n\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n },\r\n currentTarget: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n allowNegative={false}\r\n thousandSeparator={false}\r\n decimalScale={2}\r\n />\r\n );\r\n\r\n };\r\n\r\n submitCaseVehicleDetailsData = async (e: any) => {\r\n try {\r\n if (this.state.caseVehicleDetails && !this.state.caseVehicleDetails.repairDate) { \r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('VALIDATORS_REQUIRED_REPAIR_DATE', 'Campul estimare data reparatie este obligatoriu!'), {\r\n variant: 'error'\r\n }); \r\n return;\r\n }\r\n\r\n this.setState({ executing: true });\r\n\r\n let newCaseVehicleDetails = {\r\n ...this.state.caseVehicleDetails\r\n };\r\n\r\n if (this.state.caseVehicleDetails.id === 0) {\r\n newCaseVehicleDetails = await this.caseService.AddCaseVehicleDetails(this.state.caseVehicleDetails);\r\n } else {\r\n await this.caseService.UpdateCaseVehicleDetails(newCaseVehicleDetails);\r\n }\r\n\r\n await this.submitForm(\r\n this.props.caseSettingsState.case!.id,\r\n this.props.workflowForm.id,\r\n null\r\n );\r\n\r\n await this.loadCaseInOutDataForm();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (ex) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n } finally {\r\n this.setState({ executing: false });\r\n }\r\n };\r\n\r\n onChange =\r\n (fieldName: string, fieldNameId?: string) => (e: any, newValue?: IReferential | null) => {\r\n !R.isNil(fieldNameId)\r\n ? this.setState({\r\n caseVehicleDetails: {\r\n ...this.state.caseVehicleDetails,\r\n [fieldName]: newValue || e.target.value,\r\n [fieldNameId]: Utils.GetIdOrNull(newValue)\r\n }\r\n })\r\n : this.setState({\r\n caseVehicleDetails: {\r\n ...this.state.caseVehicleDetails,\r\n [fieldName]: newValue || e.target.value\r\n }\r\n });\r\n };\r\n\r\n onChangeCheckedField = (fieldName: string, fieldNameId?: string) => (e: any) => {\r\n !R.isNil(fieldNameId)\r\n ? this.setState({\r\n caseVehicleDetails: {\r\n ...this.state.caseVehicleDetails,\r\n [fieldName]: e.target.value.checked\r\n }\r\n })\r\n : this.setState({\r\n caseVehicleDetails: {\r\n ...this.state.caseVehicleDetails,\r\n [fieldName]: e.target.value.checked\r\n }\r\n });\r\n };\r\n\r\n handleHasOkWindows = (e: any) => {\r\n this.setState({\r\n caseVehicleDetails: {\r\n ...this.state.caseVehicleDetails,\r\n hasOkWindows: e.currentTarget.checked,\r\n hasGlitchWindows: !e.currentTarget.checked\r\n }\r\n });\r\n };\r\n\r\n handleHasOkLights = (e: any) => {\r\n this.setState({\r\n caseVehicleDetails: {\r\n ...this.state.caseVehicleDetails,\r\n hasOkLights: e.currentTarget.checked,\r\n hasGlitchLights: !e.currentTarget.checked\r\n }\r\n });\r\n };\r\n\r\n handleHasOkBodyAndPaint = (e: any) => {\r\n this.setState({\r\n caseVehicleDetails: {\r\n ...this.state.caseVehicleDetails,\r\n hasOkBodyAndPaint: e.currentTarget.checked,\r\n hasGlitchBodyAndPaint: !e.currentTarget.checked\r\n }\r\n });\r\n };\r\n\r\n handleHasOkWipers = (e: any) => {\r\n this.setState({\r\n caseVehicleDetails: {\r\n ...this.state.caseVehicleDetails,\r\n hasOkWipers: e.currentTarget.checked,\r\n hasGlitchWipers: !e.currentTarget.checked\r\n }\r\n });\r\n };\r\n\r\n handleCheckBoxFuelInTheTank1Change = async (checked: boolean) => {\r\n this.setState({\r\n caseVehicleDetails: {\r\n ...this.state.caseVehicleDetails,\r\n fuelInTheTank1: checked,\r\n fuelInTheTank2: checked ? false : this.state.caseVehicleDetails.fuelInTheTank2,\r\n fuelInTheTank3: checked ? false : this.state.caseVehicleDetails.fuelInTheTank3,\r\n fuelInTheTank4: checked ? false : this.state.caseVehicleDetails.fuelInTheTank4,\r\n }\r\n });\r\n }\r\n\r\n handleCheckBoxFuelInTheTank2Change = async (checked: boolean) => {\r\n this.setState({\r\n caseVehicleDetails: {\r\n ...this.state.caseVehicleDetails,\r\n fuelInTheTank2: checked,\r\n fuelInTheTank1: checked ? false : this.state.caseVehicleDetails.fuelInTheTank1,\r\n fuelInTheTank3: checked ? false : this.state.caseVehicleDetails.fuelInTheTank3,\r\n fuelInTheTank4: checked ? false : this.state.caseVehicleDetails.fuelInTheTank4,\r\n fuelInTheTank5: checked ? false : this.state.caseVehicleDetails.fuelInTheTank5\r\n }\r\n });\r\n }\r\n\r\n handleCheckBoxFuelInTheTank3Change = async (checked: boolean) => {\r\n this.setState({\r\n caseVehicleDetails: {\r\n ...this.state.caseVehicleDetails,\r\n fuelInTheTank3: checked,\r\n fuelInTheTank1: checked ? false : this.state.caseVehicleDetails.fuelInTheTank1,\r\n fuelInTheTank2: checked ? false : this.state.caseVehicleDetails.fuelInTheTank2,\r\n fuelInTheTank4: checked ? false : this.state.caseVehicleDetails.fuelInTheTank4,\r\n fuelInTheTank5: checked ? false : this.state.caseVehicleDetails.fuelInTheTank5\r\n }\r\n });\r\n }\r\n\r\n handleCheckBoxFuelInTheTank4Change = async (checked: boolean) => {\r\n this.setState({\r\n caseVehicleDetails: {\r\n ...this.state.caseVehicleDetails,\r\n fuelInTheTank4: checked,\r\n fuelInTheTank1: checked ? false : this.state.caseVehicleDetails.fuelInTheTank1,\r\n fuelInTheTank2: checked ? false : this.state.caseVehicleDetails.fuelInTheTank2,\r\n fuelInTheTank3: checked ? false : this.state.caseVehicleDetails.fuelInTheTank3,\r\n fuelInTheTank5: checked ? false : this.state.caseVehicleDetails.fuelInTheTank5\r\n }\r\n });\r\n }\r\n\r\n handleCheckBoxFuelInTheTank5Change = async (checked: boolean) => {\r\n this.setState({\r\n caseVehicleDetails: {\r\n ...this.state.caseVehicleDetails,\r\n fuelInTheTank5: checked,\r\n fuelInTheTank1: checked ? false : this.state.caseVehicleDetails.fuelInTheTank1,\r\n fuelInTheTank2: checked ? false : this.state.caseVehicleDetails.fuelInTheTank2,\r\n fuelInTheTank3: checked ? false : this.state.caseVehicleDetails.fuelInTheTank3,\r\n fuelInTheTank4: checked ? false : this.state.caseVehicleDetails.fuelInTheTank4\r\n }\r\n });\r\n }\r\n\r\n handleCheckBoxMandatoryEquipment1Change = async (checked: boolean) => {\r\n this.setState({\r\n caseVehicleDetails: {\r\n ...this.state.caseVehicleDetails,\r\n mandatoryEquipment1: checked\r\n }\r\n });\r\n }\r\n\r\n handleCheckBoxMandatoryEquipment2Change = async (checked: boolean) => {\r\n this.setState({\r\n caseVehicleDetails: {\r\n ...this.state.caseVehicleDetails,\r\n mandatoryEquipment2: checked\r\n }\r\n });\r\n }\r\n\r\n handleCheckBoxMandatoryEquipment3Change = async (checked: boolean) => {\r\n this.setState({\r\n caseVehicleDetails: {\r\n ...this.state.caseVehicleDetails,\r\n mandatoryEquipment3: checked\r\n }\r\n });\r\n }\r\n\r\n handleCheckBoxMandatoryEquipment4Change = async (checked: boolean) => {\r\n this.setState({\r\n caseVehicleDetails: {\r\n ...this.state.caseVehicleDetails,\r\n mandatoryEquipment4: checked\r\n }\r\n });\r\n }\r\n\r\n handleCheckBoxMandatoryEquipment5Change = async (checked: boolean) => {\r\n this.setState({\r\n caseVehicleDetails: {\r\n ...this.state.caseVehicleDetails,\r\n mandatoryEquipment5: checked\r\n }\r\n });\r\n }\r\n\r\n handleCheckBoxOtherEquipment1Change = async (checked: boolean) => {\r\n this.setState({\r\n caseVehicleDetails: {\r\n ...this.state.caseVehicleDetails,\r\n otherEquipment1: checked\r\n }\r\n });\r\n }\r\n\r\n handleCheckBoxOtherEquipment2Change = async (checked: boolean) => {\r\n this.setState({\r\n caseVehicleDetails: {\r\n ...this.state.caseVehicleDetails,\r\n otherEquipment2: checked\r\n }\r\n });\r\n }\r\n\r\n handleCheckBoxOtherEquipment3Change = async (checked: boolean) => {\r\n this.setState({\r\n caseVehicleDetails: {\r\n ...this.state.caseVehicleDetails,\r\n otherEquipment3: checked\r\n }\r\n });\r\n }\r\n \r\n handleCheckBoxOtherEquipment4Change = async (checked: boolean) => {\r\n this.setState({\r\n caseVehicleDetails: {\r\n ...this.state.caseVehicleDetails,\r\n otherEquipment4: checked\r\n }\r\n });\r\n }\r\n\r\n handleCheckBoxOtherEquipment5Change = async (checked: boolean) => {\r\n this.setState({\r\n caseVehicleDetails: {\r\n ...this.state.caseVehicleDetails,\r\n otherEquipment5: checked\r\n }\r\n });\r\n }\r\n\r\n handleHasPickUp = (e: any) => {\r\n this.setState({\r\n caseVehicleDetails: {\r\n ...this.state.caseVehicleDetails,\r\n hasPickUp: e.currentTarget.checked\r\n }\r\n });\r\n };\r\n\r\n handleReplacementVehicle = (e: any) => {\r\n this.setState({\r\n caseVehicleDetails: {\r\n ...this.state.caseVehicleDetails,\r\n replacementVehicle: e.currentTarget.checked\r\n }\r\n });\r\n };\r\n\r\n handleCheckBoxDocumentsReceived1Change = (checked: boolean) => {\r\n this.setState({\r\n caseVehicleDetails: {\r\n ...this.state.caseVehicleDetails,\r\n documentsReceived1: checked\r\n }\r\n });\r\n }\r\n\r\n handleCheckBoxDocumentsReceived2Change = (checked: boolean) => {\r\n this.setState({\r\n caseVehicleDetails: {\r\n ...this.state.caseVehicleDetails,\r\n documentsReceived2: checked\r\n }\r\n });\r\n }\r\n\r\n handleCheckBoxDocumentsReceived3Change = (checked: boolean) => {\r\n this.setState({\r\n caseVehicleDetails: {\r\n ...this.state.caseVehicleDetails,\r\n documentsReceived3: checked\r\n }\r\n });\r\n }\r\n \r\n handleCheckBoxDocumentsReceived4Change = (checked: boolean) => {\r\n this.setState({\r\n caseVehicleDetails: {\r\n ...this.state.caseVehicleDetails,\r\n documentsReceived4: checked\r\n }\r\n });\r\n }\r\n\r\n \r\n handleRepairDateChange = (\r\n date: MaterialUiPickersDate | null,\r\n value?: string | null\r\n ) => {\r\n if (date === null || !date.isValid) {\r\n return;\r\n }\r\n\r\n this.setState({\r\n caseVehicleDetails: {\r\n ...this.state.caseVehicleDetails,\r\n repairDate: date.format('YYYY-MM-DD'),\r\n },\r\n repairDateError: ''\r\n });\r\n };\r\n\r\n validateDates = (repairDate: string | null): void => {\r\n /*\r\n Validate repair date\r\n */\r\n let repairDateError = '';\r\n if (!repairDate) {\r\n repairDateError = this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu');\r\n } \r\n\r\n this.setState({\r\n repairDateError: repairDateError\r\n });\r\n }\r\n\r\n rendeCaseVehicleDetailsDataForm = () => {\r\n return (\r\n {\r\n this.submitCaseVehicleDetailsData(e);\r\n }}\r\n >\r\n
\r\n \r\n \r\n {/* VEHICLE_CONDITION_FROM_OUTSIDE_SECTION */}\r\n \r\n {this.translatorService.Tranlate('VEHICLE_DETAILS_REPAIR_DATE', 'Estimare data reparatie')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n {/* VEHICLE_CONDITION_FROM_OUTSIDE_SECTION */}\r\n \r\n {this.translatorService.Tranlate('VEHICLE_DETAILS_REPAIR_PRICE_SECTION', 'Estimarea cost reparatie')}\r\n \r\n \r\n {\r\n const inputValue = e.target.value;\r\n const parsedValue = inputValue === \"\" || isNaN(inputValue) ? null : parseFloat(inputValue);\r\n this.setState({\r\n caseVehicleDetails: {\r\n ...this.state.caseVehicleDetails,\r\n repairPrice: parsedValue\r\n }\r\n }, () => {\r\n console.log('repairPrice', this.state.caseVehicleDetails);\r\n });\r\n }} \r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n label={this.translatorService.Tranlate('VEHICLE_DETAILS_REPAIR_PRICE', 'Pret estimativ reparatie')}\r\n InputProps={{\r\n inputComponent: this.NumberFormatCustom,\r\n style: { fontWeight: 500 }\r\n }}\r\n />\r\n \r\n \r\n \r\n\r\n {/* VEHICLE_SERVICE_COMMENT_SECTION */}\r\n \r\n {this.translatorService.Tranlate('VEHICLE_SERVICE_COMMENT_SECTION', 'Comentariu service')}\r\n \r\n \r\n \r\n this.onChange('serviceComment')(e)}\r\n label={this.translatorService.Tranlate(\r\n 'VEHICLE_SERVICE_COMMENT_SECTION',\r\n 'Comentariu service'\r\n )}\r\n multiline\r\n variant=\"outlined\"\r\n rows={2}\r\n />\r\n \r\n \r\n {/* VEHICLE_CONDITION_FROM_OUTSIDE_SECTION */}\r\n \r\n {this.translatorService.Tranlate('VEHICLE_CONDITION_FROM_OUTSIDE_SECTION', 'Vehicle condition from the outside')}\r\n \r\n \r\n \r\n
\r\n this.handleHasOkWindows(e)}\r\n color=\"primary\"\r\n />\r\n }\r\n label={this.translatorService.Tranlate(\r\n 'VEHICLE_DETAILS_HAS_OK_WINDOWS_AND_WINDSHIELD',\r\n 'Geamuri si parbriz OK'\r\n )}\r\n labelPlacement=\"start\"\r\n className=\"mt-3 ml-2 mr-0\"\r\n />\r\n
\r\n
\r\n \r\n this.onChange('hasWindowsComment')(e)}\r\n label={this.translatorService.Tranlate(\r\n 'VEHICLE_DETAILS_HAS_OK_WINDOWS_AND_WINDSHIELD_COMMENT',\r\n 'Observatii geamuri si parbriz'\r\n )}\r\n multiline\r\n variant=\"outlined\"\r\n rows={2}\r\n />\r\n \r\n
\r\n\r\n \r\n \r\n
\r\n this.handleHasOkLights(e)}\r\n color=\"primary\"\r\n />\r\n }\r\n label={this.translatorService.Tranlate(\r\n 'VEHICLE_DETAILS_HAS_OK_LIGHTS',\r\n 'Lumini OK'\r\n )}\r\n labelPlacement=\"start\"\r\n className=\"mt-3 ml-2 mr-0\"\r\n />\r\n
\r\n
\r\n \r\n this.onChange('hasLightsComment')(e)}\r\n label={this.translatorService.Tranlate(\r\n 'VEHICLE_DETAILS_HAS_OK_LIGHTS_COMMENT',\r\n 'Observatii lumini'\r\n )}\r\n multiline\r\n variant=\"outlined\"\r\n rows={2}\r\n />\r\n \r\n
\r\n\r\n \r\n \r\n
\r\n this.handleHasOkBodyAndPaint(e)}\r\n color=\"primary\"\r\n />\r\n }\r\n label={this.translatorService.Tranlate(\r\n 'VEHICLE_DETAILS_HAS_OK_BODY_AND_PAINT',\r\n 'Caroserie si vopsea OK'\r\n )}\r\n labelPlacement=\"start\"\r\n className=\"mt-3 ml-2 mr-0\"\r\n />\r\n
\r\n
\r\n \r\n this.onChange('hasBodyAndPaintComment')(e)}\r\n label={this.translatorService.Tranlate(\r\n 'VEHICLE_DETAILS_HAS_OK_BODY_AND_PAINT_COMMENT',\r\n 'Observatii caroserie si vopsea'\r\n )}\r\n multiline\r\n variant=\"outlined\"\r\n rows={2}\r\n />\r\n \r\n
\r\n\r\n \r\n \r\n
\r\n this.handleHasOkWipers(e)}\r\n color=\"primary\"\r\n />\r\n }\r\n label={this.translatorService.Tranlate(\r\n 'VEHICLE_DETAILS_HAS_OK_WIPERS',\r\n 'Stergatoare OK'\r\n )}\r\n labelPlacement=\"start\"\r\n className=\"mt-3 ml-2 mr-0\"\r\n />\r\n
\r\n
\r\n \r\n this.onChange('hasWipersComment')(e)}\r\n label={this.translatorService.Tranlate(\r\n 'VEHICLE_DETAILS_HAS_OK_WIPERS_COMMENT',\r\n 'Observatii stergatoare'\r\n )}\r\n multiline\r\n variant=\"outlined\"\r\n rows={2}\r\n />\r\n \r\n
\r\n \r\n {/* FUEL_IN_THE_TANK_SECTION */}\r\n \r\n {this.translatorService.Tranlate('FUEL_IN_THE_TANK_LABEL', 'Fuel in the tank')}\r\n \r\n \r\n this.handleCheckBoxFuelInTheTank1Change(e.target.checked)}\r\n disabled={!this.state.hasRights}\r\n \r\n >\r\n }\r\n label={'0'}\r\n className=\"mt-3 ml-0 mr-5\"\r\n />\r\n\r\n this.handleCheckBoxFuelInTheTank2Change(e.target.checked)}\r\n disabled={!this.state.hasRights}\r\n \r\n >\r\n }\r\n label={'1/4'}\r\n className=\"mt-3 ml-0 mr-5\"\r\n />\r\n\r\n this.handleCheckBoxFuelInTheTank3Change(e.target.checked)}\r\n disabled={!this.state.hasRights}\r\n \r\n >\r\n }\r\n label={'1/2'}\r\n className=\"mt-3 ml-0 mr-5\"\r\n />\r\n\r\n this.handleCheckBoxFuelInTheTank4Change(e.target.checked)}\r\n disabled={!this.state.hasRights}\r\n \r\n >\r\n }\r\n label={'3/4'}\r\n className=\"mt-3 ml-0 mr-5\"\r\n />\r\n\r\n this.handleCheckBoxFuelInTheTank5Change(e.target.checked)}\r\n disabled={!this.state.hasRights}\r\n \r\n >\r\n }\r\n label={'1'}\r\n className=\"mt-3 ml-0 mr-5\"\r\n />\r\n \r\n\r\n {/* MANDATORY_EQUIPMENT_SECTION */}\r\n \r\n {this.translatorService.Tranlate('MANDATORY_EQUIPMENT_SECTION', 'Mandatory equipment')}\r\n \r\n \r\n this.handleCheckBoxMandatoryEquipment1Change(e.target.checked)}\r\n disabled={!this.state.hasRights}\r\n \r\n >\r\n }\r\n label={this.translatorService.Tranlate('MANDATORY_EQUIPMENT_SECTION_1', 'First aid kit')}\r\n className=\"mt-3 ml-0 mr-3\"\r\n />\r\n\r\n this.handleCheckBoxMandatoryEquipment2Change(e.target.checked)}\r\n disabled={!this.state.hasRights}\r\n \r\n >\r\n }\r\n label={this.translatorService.Tranlate('MANDATORY_EQUIPMENT_SECTION_2', 'Itrogens')}\r\n className=\"mt-3 ml-0 mr-3\"\r\n />\r\n\r\n this.handleCheckBoxMandatoryEquipment3Change(e.target.checked)}\r\n disabled={!this.state.hasRights}\r\n \r\n >\r\n }\r\n label={this.translatorService.Tranlate('MANDATORY_EQUIPMENT_SECTION_3', 'Reserve')}\r\n className=\"mt-3 ml-0 mr-3\"\r\n /> \r\n\r\n this.handleCheckBoxMandatoryEquipment4Change(e.target.checked)}\r\n disabled={!this.state.hasRights}\r\n \r\n >\r\n }\r\n label={this.translatorService.Tranlate('MANDATORY_EQUIPMENT_SECTION_4', 'Rope')}\r\n className=\"mt-3 ml-0 mr-3\"\r\n /> \r\n\r\n this.handleCheckBoxMandatoryEquipment5Change(e.target.checked)}\r\n disabled={!this.state.hasRights}\r\n \r\n >\r\n }\r\n label={this.translatorService.Tranlate('MANDATORY_EQUIPMENT_SECTION_5', 'Light bulbs')} \r\n className=\"mt-3 ml-0 mr-3\"\r\n /> \r\n \r\n\r\n {/* OTHER_EQUIPMENT_SECTION */}\r\n \r\n {this.translatorService.Tranlate('OTHER_EQUIPMENT_SECTION', 'Other equipment')}\r\n \r\n \r\n this.handleCheckBoxOtherEquipment1Change(e.target.checked)}\r\n disabled={!this.state.hasRights}\r\n \r\n >\r\n }\r\n label={this.translatorService.Tranlate('OTHER_EQUIPMENT_SECTION_1', 'Car radio')}\r\n className=\"mt-3 ml-0 mr-3\"\r\n />\r\n\r\n this.handleCheckBoxOtherEquipment2Change(e.target.checked)}\r\n disabled={!this.state.hasRights}\r\n \r\n >\r\n }\r\n label={this.translatorService.Tranlate('OTHER_EQUIPMENT_SECTION_2', 'Navigation')}\r\n className=\"mt-3 ml-0 mr-3\"\r\n />\r\n\r\n this.handleCheckBoxOtherEquipment3Change(e.target.checked)}\r\n disabled={!this.state.hasRights}\r\n \r\n >\r\n }\r\n label={this.translatorService.Tranlate('OTHER_EQUIPMENT_SECTION_3', 'Hands free')}\r\n className=\"mt-3 ml-0 mr-3\"\r\n />\r\n\r\n this.handleCheckBoxOtherEquipment4Change(e.target.checked)}\r\n disabled={!this.state.hasRights}\r\n \r\n >\r\n }\r\n label={this.translatorService.Tranlate('OTHER_EQUIPMENT_SECTION_4', 'Fire extinguisher')}\r\n className=\"mt-3 ml-0 mr-3\"\r\n />\r\n\r\n this.handleCheckBoxOtherEquipment5Change(e.target.checked)}\r\n disabled={!this.state.hasRights}\r\n \r\n >\r\n }\r\n label={this.translatorService.Tranlate('OTHER_EQUIPMENT_SECTION_5', 'Profession')}\r\n className=\"mt-3 ml-0 mr-3\"\r\n />\r\n\r\n \r\n\r\n {/* REQUIREMENT_SECTION */}\r\n \r\n {this.translatorService.Tranlate('REQUIREMENT_SECTION', 'Requirement')}\r\n \r\n \r\n \r\n
\r\n this.handleHasPickUp(e)}\r\n color=\"primary\"\r\n />\r\n }\r\n label={this.translatorService.Tranlate(\r\n 'VEHICLE_DETAILS_HAS_PICK_UP',\r\n 'Pick-up'\r\n )}\r\n labelPlacement=\"start\"\r\n className=\"mt-3 ml-2 mr-0\"\r\n />\r\n
\r\n
\r\n\r\n \r\n this.onChange('pickUpCode')(e)}\r\n label={this.translatorService.Tranlate(\r\n 'VEHICLE_DETAILS_PICK_UP_CODE',\r\n 'Pick-up code'\r\n )}\r\n multiline\r\n variant=\"outlined\"\r\n rows={2}\r\n />\r\n \r\n\r\n \r\n
\r\n this.handleReplacementVehicle(e)}\r\n color=\"primary\"\r\n />\r\n }\r\n label={this.translatorService.Tranlate(\r\n 'VEHICLE_DETAILS_HAS_REPLACEMENT_VEHICLE',\r\n 'Replacement vehicle'\r\n )}\r\n labelPlacement=\"start\"\r\n className=\"mt-3 ml-0 mr-0\"\r\n />\r\n
\r\n
\r\n
\r\n\r\n {/* DOCUMENTS_RECEIVED_SECTION */}\r\n \r\n {this.translatorService.Tranlate('DOCUMENTS_RECEIVED_SECTION', 'Documents received')}\r\n \r\n \r\n this.handleCheckBoxDocumentsReceived1Change(e.target.checked)}\r\n disabled={!this.state.hasRights}\r\n \r\n >\r\n }\r\n label={this.translatorService.Tranlate('DOCUMENTS_RECEIVED_SECTION_1', 'Large TP')}\r\n className=\"mt-3 ml-0 mr-5\"\r\n />\r\n\r\n this.handleCheckBoxDocumentsReceived2Change(e.target.checked)}\r\n disabled={!this.state.hasRights}\r\n \r\n >\r\n }\r\n label={this.translatorService.Tranlate('DOCUMENTS_RECEIVED_SECTION_2', 'Small TP')}\r\n className=\"mt-3 ml-0 mr-5\"\r\n />\r\n\r\n this.handleCheckBoxDocumentsReceived3Change(e.target.checked)}\r\n disabled={!this.state.hasRights}\r\n \r\n >\r\n }\r\n label={this.translatorService.Tranlate('DOCUMENTS_RECEIVED_SECTION_3', 'Green card')}\r\n className=\"mt-3 ml-0 mr-5\"\r\n />\r\n\r\n this.handleCheckBoxDocumentsReceived4Change(e.target.checked)}\r\n disabled={!this.state.hasRights}\r\n \r\n >\r\n }\r\n label={this.translatorService.Tranlate('DOCUMENTS_RECEIVED_SECTION_4', 'Service book')}\r\n className=\"mt-3 ml-0 mr-5\"\r\n />\r\n \r\n
\r\n\r\n this.validateDates(this.state.caseVehicleDetails.repairDate)}\r\n >\r\n {this.translatorService.Tranlate('SAVE', 'Salveaza')}\r\n \r\n \r\n );\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n
{this.rendeCaseVehicleDetailsDataForm()}
\r\n ) : null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalCaseDetailsCaseTabInOutDataFormProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app\r\n }),\r\n CaseSettingsActionCreators,\r\n mergeProps\r\n)(withSnackbar(CaseDetailsCaseTabInOutDataForm as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n ApplicationState,\r\n CaseSettingsState,\r\n AppState,\r\n CaseSettingsActionCreators\r\n} from '../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { Button, Grid} from '@material-ui/core';\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { WorkflowSectionStepForm } from '../../interfaces/Workflow';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport { IReferentialService } from '../../services/Interfaces/IReferentialService';\r\nimport {\r\n ReferentialCode,\r\n InsuredTypeCode\r\n} from '../../helpers/Constants';\r\nimport { AppUser } from '../../interfaces/AppUser';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport Referentials from '../../helpers/Referentials.json';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport { FormHelpers } from '../../helpers/forms/FormHelpers';\r\nimport NumberFormat from 'react-number-format';\r\nimport { CaseClient } from '../../interfaces/Case';\r\nimport { CNP } from 'romanian-personal-identity-code-validator';\r\nimport * as R from 'ramda';\r\nimport { isNullOrUndefined } from 'util';\r\n\r\ninterface ICaseDetailsCaseTabIntegrationClientDataFormState {\r\n isLoading: boolean;\r\n hasRights: boolean;\r\n executing: boolean;\r\n isUserHidden: boolean;\r\n clientData: CaseClient;\r\n personTypes: Array;\r\n}\r\n\r\nexport interface ExternalCaseDetailsCaseTabIntegrationClientDataFormProps {\r\n workflowForm: WorkflowSectionStepForm;\r\n}\r\n\r\ntype ICaseDetailsCaseTabIntegrationClientDataFormProps = ExternalCaseDetailsCaseTabIntegrationClientDataFormProps & {\r\n caseSettingsState: CaseSettingsState;\r\n appState: AppState;\r\n} & typeof CaseSettingsActionCreators &\r\n ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass CaseDetailsCaseTabIntegrationClientDataForm extends React.PureComponent<\r\nICaseDetailsCaseTabIntegrationClientDataFormProps,\r\nICaseDetailsCaseTabIntegrationClientDataFormState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private caseService!: ICaseService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n state = {\r\n isLoading: false,\r\n hasRights: false,\r\n executing: false,\r\n isUserHidden: false,\r\n clientData: {\r\n id: 0,\r\n caseId: this.props.caseSettingsState.case!.id,\r\n caseSectionStepFormId: this.props.workflowForm.id,\r\n clientId: 0,\r\n pin: '',\r\n companyNumber: '',\r\n companyName: '',\r\n gdprAgreement: true,\r\n address: '',\r\n city: null,\r\n region: null,\r\n district: null,\r\n bankAccount: '',\r\n email: '',\r\n phone: ''\r\n } as CaseClient\r\n } as ICaseDetailsCaseTabIntegrationClientDataFormState;\r\n\r\n inputTextValidator = React.createRef();\r\n\r\n public componentDidMount() {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (R.isNil(caseSettings) || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadCaseClientDataForm();\r\n }\r\n );\r\n }\r\n\r\n loadCaseClientDataForm = async () => {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (R.isNil(caseSettings) || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n const casee = this.props.caseSettingsState.case;\r\n\r\n let caseClient = this.state.clientData;\r\n if (!R.isNil(casee!.caseClient)) {\r\n caseClient = casee!.caseClient;\r\n }\r\n\r\n const personTypeRef = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.PersonType\r\n );\r\n\r\n const personTypeList = await this.appReferentialService.Get(personTypeRef!.baseUrl);\r\n\r\n const hasRights = FormHelpers.HasRights(\r\n this.props.workflowForm.workflowFormPermissions,\r\n this.props.appState.appUser!,\r\n this.props.caseSettingsState.case!.caseStatus.caseStatusId\r\n );\r\n\r\n console.log('personTypeList', personTypeList);\r\n this.setState({\r\n ...this.state,\r\n isLoading: false,\r\n hasRights: hasRights,\r\n isUserHidden: !hasRights,\r\n personTypes: personTypeList,\r\n clientData: caseClient\r\n });\r\n };\r\n\r\n submitForm = async (caseId: number, caseSectionStepFormId: number, appUser: AppUser | null) => {\r\n let newStatus = await this.caseService.SubmitForm(caseId, caseSectionStepFormId, appUser);\r\n\r\n if (newStatus === null) {\r\n newStatus = this.props.caseSettingsState.case!.caseStatus;\r\n }\r\n\r\n this.props.SetCaseStatus(newStatus);\r\n if (appUser !== null) {\r\n this.props.AddPartner(appUser!.hoId === null ? appUser!.organizationId : appUser!.hoId);\r\n }\r\n\r\n const hasRights = FormHelpers.HasRights(\r\n this.props.workflowForm.workflowFormPermissions,\r\n this.props.appState.appUser!,\r\n newStatus.caseStatusId\r\n );\r\n this.setState({ hasRights: hasRights });\r\n };\r\n\r\n NumberFormatCustom = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n allowNegative={false}\r\n thousandSeparator={false}\r\n decimalScale={2}\r\n />\r\n );\r\n };\r\n\r\n submitClientData = async (e: any) => {\r\n try {\r\n this.setState({ executing: true });\r\n\r\n let newCaseClient = {\r\n ...this.state.clientData,\r\n caseSectionStepFormId: this.props.workflowForm.id\r\n };\r\n\r\n if (this.state.clientData.id === 0) {\r\n newCaseClient = await this.caseService.AddCaseClient(this.state.clientData);\r\n } else {\r\n await this.caseService.UpdateCaseClient(newCaseClient);\r\n }\r\n\r\n await this.submitForm(\r\n this.props.caseSettingsState.case!.id,\r\n this.props.workflowForm.id,\r\n null\r\n );\r\n\r\n this.props.SetCaseClientData(newCaseClient);\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (ex) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n } finally {\r\n this.setState({ executing: false });\r\n }\r\n };\r\n\r\n handleCNPChange = (e: any) => {\r\n this.setState({\r\n clientData: {\r\n ...this.state.clientData,\r\n pin: e.target.value\r\n }\r\n });\r\n };\r\n\r\n handlePersonTypeChange = (newValue: IReferential | null) => {\r\n this.setState({\r\n clientData: {\r\n ...this.state.clientData,\r\n personType: newValue,\r\n personTypeId: newValue === null ? null : newValue.id\r\n }\r\n });\r\n };\r\n\r\n handleTextChange = (e: any) => {\r\n this.setState({\r\n clientData: {\r\n ...this.state.clientData,\r\n email: e.target.value\r\n }\r\n });\r\n };\r\n\r\n handleAddressChange = (e: any) => {\r\n this.setState({\r\n clientData: {\r\n ...this.state.clientData,\r\n address: e.target.value\r\n }\r\n });\r\n };\r\n\r\n handleBankAccountChange = (e: any) => {\r\n this.setState({\r\n clientData: {\r\n ...this.state.clientData,\r\n bankAccount: e.target.value\r\n }\r\n });\r\n };\r\n\r\n handleIsActiveAgreement = (e: any) => {\r\n this.setState({\r\n clientData: {\r\n ...this.state.clientData,\r\n gdprAgreement: e.currentTarget.checked\r\n }\r\n });\r\n };\r\n\r\n\r\n handleCnpCuiOnBlur = async (newValue: any) => {\r\n if (\r\n isNullOrUndefined(this.state.clientData.personType) ||\r\n (this.state.clientData.pin.length == 0 && this.state.clientData.companyNumber.length == 0)\r\n ) {\r\n return;\r\n }\r\n this.setState({ isLoading: true });\r\n\r\n const pin_cui =\r\n this.state.clientData.personType!.code === InsuredTypeCode.PJ\r\n ? this.state.clientData.companyNumber\r\n : this.state.clientData.pin;\r\n\r\n const clients = await this.caseService.SearchClient(\r\n this.state.clientData.personType!.id,\r\n pin_cui,\r\n ''\r\n );\r\n\r\n if (clients.length > 0) {\r\n const client = clients[0];\r\n this.setState({\r\n ...this.state,\r\n clientData: {\r\n ...this.state.clientData,\r\n clientId: client.id,\r\n companyName: client.companyName,\r\n companyNumber: client.companyNumber,\r\n contactPerson: client.contactPerson,\r\n phone: client.phone,\r\n firstName: client.firstName,\r\n lastName: client.lastName,\r\n email: client.email,\r\n address: client.address\r\n }\r\n });\r\n }\r\n\r\n this.setState({ isLoading: false });\r\n };\r\n\r\n\r\n rendeClientDataForm = () => {\r\n return (\r\n {\r\n this.submitClientData(e);\r\n }}\r\n >\r\n
\r\n \r\n this.handlePersonTypeChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n {!R.isNil(this.state.clientData.personType!) &&\r\n this.state.clientData.personType!.code === InsuredTypeCode.PJ ? (\r\n
\r\n {\r\n this.setState({\r\n clientData: {\r\n ...this.state.clientData,\r\n companyNumber: e.target.value\r\n }\r\n });\r\n }}\r\n onBlur={async (e: any) => {\r\n await this.handleCnpCuiOnBlur(e);\r\n }}\r\n label={this.translatorService.Tranlate('CLIENT_DATA_FORM_CUI', 'CUI')}\r\n />\r\n\r\n {\r\n this.setState({\r\n clientData: {\r\n ...this.state.clientData,\r\n companyName: e.target.value\r\n }\r\n });\r\n }}\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n label={this.translatorService.Tranlate(\r\n 'CLIENT_DATA_FORM_COMPANY_NAME',\r\n 'Nume companie'\r\n )}\r\n />\r\n\r\n {\r\n this.setState({\r\n clientData: {\r\n ...this.state.clientData,\r\n contactPerson: e.target.value\r\n }\r\n });\r\n }}\r\n placeholder={this.translatorService.Tranlate(\r\n 'CLIENT_DATA_FORM_CONTACT_PERSON',\r\n 'Persoana de contact'\r\n )}\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n label={this.translatorService.Tranlate(\r\n 'CLIENT_DATA_FORM_CONTACT_PERSON',\r\n 'Persoana de contact'\r\n )}\r\n />\r\n
\r\n ) : (\r\n
\r\n {\r\n this.setState({\r\n clientData: {\r\n ...this.state.clientData,\r\n firstName: e.target.value\r\n }\r\n });\r\n }}\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n label={this.translatorService.Tranlate('CLIENT_DATA_FORM_FULL_NAME', 'Nume complet')}\r\n />\r\n
\r\n )}\r\n\r\n this.handleTextChange(e)}\r\n validators={['isEmail']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_EMAIL', 'E-mail invalid')\r\n ]}\r\n label={this.translatorService.Tranlate('CLIENT_DATA_FORM_EMAIL', 'E-mail')}\r\n />\r\n\r\n {\r\n this.setState({\r\n clientData: {\r\n ...this.state.clientData,\r\n phone: e.target.value\r\n }\r\n });\r\n }}\r\n name=\"phone\"\r\n className=\"m-2\"\r\n label={this.translatorService.Tranlate('CLIENT_DATA_FORM_PHONE', 'Telefon')}\r\n value={this.state.clientData.phone || ''}\r\n />\r\n\r\n \r\n \r\n
\r\n {\r\n this.setState({\r\n ...this.state,\r\n clientData: {\r\n ...this.state.clientData,\r\n address: e.target.value\r\n }\r\n });\r\n }}\r\n label={this.translatorService.Tranlate('CLIENT_DATA_FORM_ADDRESS', 'Adresa')}\r\n />\r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n {this.translatorService.Tranlate('SAVE', 'Salveaza')}\r\n \r\n \r\n );\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n
{this.rendeClientDataForm()}
\r\n ) : null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalCaseDetailsCaseTabIntegrationClientDataFormProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app\r\n }),\r\n CaseSettingsActionCreators,\r\n mergeProps\r\n)(withSnackbar(CaseDetailsCaseTabIntegrationClientDataForm as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n ApplicationState,\r\n CaseSettingsState,\r\n AppState,\r\n CaseSettingsActionCreators\r\n} from '../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { Button } from '@material-ui/core';\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport {\r\n WorkflowFormAction,\r\n WorkflowSectionStepForm\r\n} from '../../interfaces/Workflow';\r\nimport { isNullOrUndefined } from 'util';\r\nimport { CaseAttachment, CaseRequest } from '../../interfaces/Case';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport { IWorkflowService } from '../../services/Interfaces/IWorkflowService';\r\nimport { AppUser } from '../../interfaces/AppUser';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport {\r\n WorkflowFormActionTypeCode\r\n} from '../../helpers/Constants';\r\nimport { FormHelpers } from '../../helpers/forms/FormHelpers';\r\nimport 'react-dropdown-tree-select/dist/styles.css';\r\nimport * as R from 'ramda';\r\n\r\n\r\ninterface ICaseDetailsCaseCarfixAnalysisFormState {\r\n backToServiceFormData: CaseRequest;\r\n selectedUser: AppUser | null;\r\n isLoading: boolean;\r\n isLoading2: boolean;\r\n hasRights: boolean;\r\n isUserHidden: boolean;\r\n executing: boolean;\r\n formSubmitted: boolean;\r\n wfTransitionStepAction: WorkflowFormAction;\r\n}\r\n\r\nexport interface ExternalCaseDetailsCaseCarfixAnalysisFormProps {\r\n workflowForm: WorkflowSectionStepForm;\r\n}\r\n\r\ntype ICaseDetailsCaseCarfixAnalysisFormProps =\r\n ExternalCaseDetailsCaseCarfixAnalysisFormProps & {\r\n caseSettingsState: CaseSettingsState;\r\n appState: AppState;\r\n } & typeof CaseSettingsActionCreators &\r\n ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass CaseDetailsCaseCarfixAnalysisForm extends React.PureComponent<\r\n ICaseDetailsCaseCarfixAnalysisFormProps,\r\n ICaseDetailsCaseCarfixAnalysisFormState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private caseService!: ICaseService;\r\n private workflowService!: IWorkflowService;\r\n\r\n static contextType = ApplicationContext;\r\n state = {\r\n backToServiceFormData: {} as CaseRequest,\r\n selectedUser: null,\r\n isLoading: false,\r\n isLoading2: false,\r\n hasRights: false,\r\n isUserHidden: false,\r\n executing: false,\r\n formSubmitted: false,\r\n wfTransitionStepAction: {} as WorkflowFormAction\r\n } as ICaseDetailsCaseCarfixAnalysisFormState;\r\n\r\n public componentDidMount() {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (isNullOrUndefined(caseSettings) || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadCaseBackToServiceForm();\r\n }\r\n );\r\n }\r\n\r\n\r\n loadCaseBackToServiceForm = async () => {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseStatusId = this.props.caseSettingsState.case?.caseStatus?.caseStatusId;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (isNullOrUndefined(caseSettings) || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n\r\n const caseRequest = {\r\n id: 0,\r\n caseId: this.props.caseSettingsState.case!.id,\r\n text: this.translatorService.Tranlate(this.props.workflowForm.comments, ''),\r\n subject: '',\r\n to: '',\r\n clientEmail: !R.isNil(this.props.caseSettingsState.case!.caseClient) ? this.props.caseSettingsState.case!.caseClient.email : '',\r\n userIdTo: '',\r\n organizationId: null,\r\n attachments: [] as CaseAttachment[],\r\n caseSectionStepFormId: this.props.workflowForm.id\r\n } as CaseRequest;\r\n\r\n const wfStepActions = await this.workflowService.GetWorkflowSectionStepFormActions(\r\n this.props.workflowForm.id\r\n );\r\n\r\n const wfTransitionStepAction =\r\n wfStepActions.find(\r\n (item) =>\r\n item.actionType?.code === WorkflowFormActionTypeCode.STATUS_TRANSITION &&\r\n caseStatusId === item.fromStatusId\r\n ) || ({} as WorkflowFormAction);\r\n\r\n\r\n const hasRights = FormHelpers.HasRights(\r\n this.props.workflowForm.workflowFormPermissions,\r\n this.props.appState.appUser!,\r\n this.props.caseSettingsState.case!.caseStatus.caseStatusId\r\n );\r\n \r\n this.setState(\r\n {\r\n backToServiceFormData: caseRequest,\r\n isLoading: false,\r\n hasRights: hasRights,\r\n wfTransitionStepAction\r\n }\r\n );\r\n };\r\n\r\n sendEmail = async () => {\r\n try {\r\n let request = this.state.backToServiceFormData;\r\n const { toWorkflowId, toStatusId } = this.state.wfTransitionStepAction;\r\n const userId = this.props.appState?.appUser?.id || this.state.selectedUser?.id;\r\n\r\n if (isNullOrUndefined(request)) {\r\n return;\r\n }\r\n\r\n this.setState({ executing: true, formSubmitted: true });\r\n\r\n request!.id = 0;\r\n\r\n if (toWorkflowId && toStatusId) {\r\n await this.caseService.ChangeCaseWorkflow(\r\n toWorkflowId,\r\n request.caseId,\r\n userId!,\r\n toStatusId\r\n );\r\n } else {\r\n request = await this.caseService.AddCaseRequest(request);\r\n }\r\n\r\n await this.submitForm(request.caseId, request.caseSectionStepFormId, this.state.selectedUser);\r\n\r\n this.setState(\r\n {\r\n backToServiceFormData: {\r\n id: 0,\r\n caseId: this.props.caseSettingsState.case!.id,\r\n text: this.translatorService.Tranlate(this.props.workflowForm.comments, ''),\r\n subject: '',\r\n to: '',\r\n clientEmail: !R.isNil(this.props.caseSettingsState.case!.caseClient) ? this.props.caseSettingsState.case!.caseClient.email : '',\r\n userId: '',\r\n organizationId: null,\r\n attachments: [] as CaseAttachment[],\r\n caseSectionStepFormId: this.props.workflowForm.id\r\n } as CaseRequest,\r\n formSubmitted: false,\r\n selectedUser: null\r\n },\r\n );\r\n\r\n if (toWorkflowId && toStatusId) {\r\n this.props.SetCaseSettings(request.caseId);\r\n }\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (ex) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n } finally {\r\n this.setState({ executing: false });\r\n }\r\n };\r\n\r\n submitForm = async (caseId: number, caseSectionStepFormId: number, appuser: AppUser | null) => {\r\n let newStatus = await this.caseService.SubmitForm(caseId, caseSectionStepFormId, appuser);\r\n if (newStatus === null) {\r\n newStatus = this.props.caseSettingsState.case!.caseStatus;\r\n }\r\n console.log('newStatus', newStatus);\r\n\r\n this.props.SetCaseStatus(newStatus);\r\n if (appuser !== null) {\r\n this.props.AddPartner(appuser!.hoId === null ? appuser!.organizationId : appuser!.hoId);\r\n }\r\n\r\n const hasRights = FormHelpers.HasRights(\r\n this.props.workflowForm.workflowFormPermissions,\r\n this.props.appState.appUser!,\r\n newStatus.caseStatusId\r\n );\r\n this.setState({ hasRights: hasRights });\r\n };\r\n\r\n handleUserChange = (newValue: AppUser | null) => {\r\n this.setState({ selectedUser: newValue });\r\n };\r\n\r\n rendeBackToServiceForm = () => {\r\n return isNullOrUndefined(this.state.backToServiceFormData) ? null : (\r\n {\r\n this.sendEmail();\r\n }}\r\n >\r\n
\r\n ) => {\r\n this.setState({\r\n backToServiceFormData: {\r\n ...this.state.backToServiceFormData,\r\n text: e.target.value\r\n }\r\n });\r\n }}\r\n variant=\"outlined\"\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n />\r\n
\r\n
\r\n ) => {\r\n this.setState({\r\n backToServiceFormData: {\r\n ...this.state.backToServiceFormData,\r\n clientEmail: e.target.value\r\n }\r\n });\r\n }}\r\n label={this.translatorService.Tranlate(\r\n 'CASE_BACK_TO_SERVICE_FORM_USER_LABEL',\r\n 'Utilizator'\r\n )}\r\n />\r\n
\r\n\r\n this.setState({ formSubmitted: true })}\r\n disabled={!this.state.hasRights || this.state.executing}\r\n >\r\n {this.translatorService.Tranlate('CASE_COMMENT_SEND', 'Trimite')}\r\n \r\n \r\n );\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n this.workflowService = (this.context as AppContext).workflowService;\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n
{this.rendeBackToServiceForm()}
\r\n ) : null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalCaseDetailsCaseCarfixAnalysisFormProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app\r\n }),\r\n CaseSettingsActionCreators,\r\n mergeProps\r\n)(withSnackbar(CaseDetailsCaseCarfixAnalysisForm as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n ApplicationState,\r\n CaseSettingsState,\r\n AppState,\r\n CaseSettingsActionCreators\r\n} from '../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { Button } from '@material-ui/core';\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport {\r\n WorkflowFormAction,\r\n WorkflowSectionStepForm\r\n} from '../../interfaces/Workflow';\r\nimport { isNullOrUndefined } from 'util';\r\nimport { CaseAttachment, CaseRequest } from '../../interfaces/Case';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport { IWorkflowService } from '../../services/Interfaces/IWorkflowService';\r\nimport { AppUser } from '../../interfaces/AppUser';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport {\r\n WorkflowFormActionTypeCode\r\n} from '../../helpers/Constants';\r\nimport { FormHelpers } from '../../helpers/forms/FormHelpers';\r\nimport 'react-dropdown-tree-select/dist/styles.css';\r\nimport * as R from 'ramda';\r\nimport _ from 'lodash';\r\n\r\n\r\ninterface ICaseDetailsCaseCarfixBackToServiceFormState {\r\n backToServiceFormData: CaseRequest;\r\n selectedUser: AppUser | null;\r\n isLoading: boolean;\r\n isLoading2: boolean;\r\n hasRights: boolean;\r\n isUserHidden: boolean;\r\n executing: boolean;\r\n formSubmitted: boolean;\r\n wfTransitionStepAction: WorkflowFormAction;\r\n}\r\n\r\nexport interface ExternalCaseDetailsCaseCarfixBackToServiceFormProps {\r\n workflowForm: WorkflowSectionStepForm;\r\n}\r\n\r\ntype ICaseDetailsCaseCarfixBackToServiceFormProps =\r\n ExternalCaseDetailsCaseCarfixBackToServiceFormProps & {\r\n caseSettingsState: CaseSettingsState;\r\n appState: AppState;\r\n } & typeof CaseSettingsActionCreators &\r\n ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass CaseDetailsCaseCarfixBackToServiceForm extends React.PureComponent<\r\n ICaseDetailsCaseCarfixBackToServiceFormProps,\r\n ICaseDetailsCaseCarfixBackToServiceFormState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private caseService!: ICaseService;\r\n private workflowService!: IWorkflowService;\r\n\r\n static contextType = ApplicationContext;\r\n state = {\r\n backToServiceFormData: {} as CaseRequest,\r\n selectedUser: null,\r\n isLoading: false,\r\n isLoading2: false,\r\n hasRights: false,\r\n isUserHidden: false,\r\n executing: false,\r\n formSubmitted: false,\r\n wfTransitionStepAction: {} as WorkflowFormAction\r\n } as ICaseDetailsCaseCarfixBackToServiceFormState;\r\n\r\n public componentDidMount() {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (isNullOrUndefined(caseSettings) || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadCaseBackToServiceForm();\r\n }\r\n );\r\n }\r\n\r\n\r\n loadCaseBackToServiceForm = async () => {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseStatusId = this.props.caseSettingsState.case?.caseStatus?.caseStatusId;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (isNullOrUndefined(caseSettings) || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n\r\n const caseRequest = {\r\n id: 0,\r\n caseId: this.props.caseSettingsState.case!.id,\r\n text: '',\r\n subject: '',\r\n to: '',\r\n clientEmail: !R.isNil(this.props.caseSettingsState.case!.caseClient) ? this.props.caseSettingsState.case!.caseClient.email : '',\r\n userIdTo: '',\r\n organizationId: null,\r\n attachments: [] as CaseAttachment[],\r\n caseSectionStepFormId: this.props.workflowForm.id\r\n } as CaseRequest;\r\n\r\n const [wfStepActions, caseRequests] = await Promise.all([\r\n this.workflowService.GetWorkflowSectionStepFormActions(this.props.workflowForm.id), \r\n this.caseService.GetCaseRequests(caseId, null)]\r\n );\r\n\r\n const wfTransitionStepAction =\r\n wfStepActions.find(\r\n (item) =>\r\n item.actionType?.code === WorkflowFormActionTypeCode.STATUS_TRANSITION &&\r\n caseStatusId === item.fromStatusId\r\n ) || ({} as WorkflowFormAction);\r\n\r\n const externalCaseRequests = _.cloneDeep(caseRequests.filter(x => x.isExternal == true));\r\n if (externalCaseRequests.length > 0) {\r\n caseRequest.text = externalCaseRequests[0].text;\r\n }\r\n\r\n const hasRights = FormHelpers.HasRights(\r\n this.props.workflowForm.workflowFormPermissions,\r\n this.props.appState.appUser!,\r\n this.props.caseSettingsState.case!.caseStatus.caseStatusId\r\n );\r\n \r\n this.setState(\r\n {\r\n backToServiceFormData: caseRequest,\r\n isLoading: false,\r\n hasRights: hasRights,\r\n wfTransitionStepAction\r\n }\r\n );\r\n };\r\n\r\n sendEmail = async () => {\r\n try {\r\n let request = this.state.backToServiceFormData;\r\n const { toWorkflowId, toStatusId } = this.state.wfTransitionStepAction;\r\n const userId = this.props.appState?.appUser?.id || this.state.selectedUser?.id;\r\n\r\n if (isNullOrUndefined(request)) {\r\n return;\r\n }\r\n\r\n this.setState({ executing: true, formSubmitted: true });\r\n\r\n request!.id = 0;\r\n\r\n if (toWorkflowId && toStatusId) {\r\n await this.caseService.ChangeCaseWorkflow(\r\n toWorkflowId,\r\n request.caseId,\r\n userId!,\r\n toStatusId\r\n );\r\n } else {\r\n request = await this.caseService.AddCaseRequest(request);\r\n }\r\n\r\n await this.submitForm(request.caseId, request.caseSectionStepFormId, this.state.selectedUser);\r\n\r\n this.setState(\r\n {\r\n backToServiceFormData: {\r\n id: 0,\r\n caseId: this.props.caseSettingsState.case!.id,\r\n text: '',\r\n subject: '',\r\n to: '',\r\n clientEmail: !R.isNil(this.props.caseSettingsState.case!.caseClient) ? this.props.caseSettingsState.case!.caseClient.email : '',\r\n userId: '',\r\n organizationId: null,\r\n attachments: [] as CaseAttachment[],\r\n caseSectionStepFormId: this.props.workflowForm.id\r\n } as CaseRequest,\r\n formSubmitted: false,\r\n selectedUser: null\r\n },\r\n );\r\n\r\n if (toWorkflowId && toStatusId) {\r\n this.props.SetCaseSettings(request.caseId);\r\n }\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (ex) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n } finally {\r\n this.setState({ executing: false });\r\n }\r\n };\r\n\r\n submitForm = async (caseId: number, caseSectionStepFormId: number, appuser: AppUser | null) => {\r\n let newStatus = await this.caseService.SubmitForm(caseId, caseSectionStepFormId, appuser);\r\n if (newStatus === null) {\r\n newStatus = this.props.caseSettingsState.case!.caseStatus;\r\n }\r\n console.log('newStatus', newStatus);\r\n\r\n this.props.SetCaseStatus(newStatus);\r\n if (appuser !== null) {\r\n this.props.AddPartner(appuser!.hoId === null ? appuser!.organizationId : appuser!.hoId);\r\n }\r\n\r\n const hasRights = FormHelpers.HasRights(\r\n this.props.workflowForm.workflowFormPermissions,\r\n this.props.appState.appUser!,\r\n newStatus.caseStatusId\r\n );\r\n this.setState({ hasRights: hasRights });\r\n };\r\n\r\n handleUserChange = (newValue: AppUser | null) => {\r\n this.setState({ selectedUser: newValue });\r\n };\r\n\r\n rendeBackToServiceForm = () => {\r\n return isNullOrUndefined(this.state.backToServiceFormData) ? null : (\r\n {\r\n this.sendEmail();\r\n }}\r\n >\r\n
\r\n ) => {\r\n this.setState({\r\n backToServiceFormData: {\r\n ...this.state.backToServiceFormData,\r\n text: e.target.value\r\n }\r\n });\r\n }}\r\n variant=\"outlined\"\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n />\r\n
\r\n
\r\n ) => {\r\n this.setState({\r\n backToServiceFormData: {\r\n ...this.state.backToServiceFormData,\r\n clientEmail: e.target.value\r\n }\r\n });\r\n }}\r\n label={this.translatorService.Tranlate(\r\n 'CASE_BACK_TO_SERVICE_FORM_USER_LABEL',\r\n 'Utilizator'\r\n )}\r\n />\r\n
\r\n\r\n this.setState({ formSubmitted: true })}\r\n disabled={!this.state.hasRights || this.state.executing}\r\n >\r\n {this.translatorService.Tranlate('CASE_COMMENT_SEND', 'Trimite')}\r\n \r\n \r\n );\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n this.workflowService = (this.context as AppContext).workflowService;\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n
{this.rendeBackToServiceForm()}
\r\n ) : null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalCaseDetailsCaseCarfixBackToServiceFormProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app\r\n }),\r\n CaseSettingsActionCreators,\r\n mergeProps\r\n)(withSnackbar(CaseDetailsCaseCarfixBackToServiceForm as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n ApplicationState,\r\n CaseSettingsState,\r\n AppState,\r\n CaseSettingsActionCreators\r\n} from '../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { Button, Grid} from '@material-ui/core';\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport {\r\n WorkflowFormAction,\r\n WorkflowSectionStepForm\r\n} from '../../interfaces/Workflow';\r\nimport { isNullOrUndefined } from 'util';\r\nimport { Appointment, CaseAttachment, CaseRequest } from '../../interfaces/Case';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport { IWorkflowService } from '../../services/Interfaces/IWorkflowService';\r\nimport { AppUser } from '../../interfaces/AppUser';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport {\r\n WorkflowFormActionTypeCode\r\n} from '../../helpers/Constants';\r\nimport { FormHelpers } from '../../helpers/forms/FormHelpers';\r\nimport 'react-dropdown-tree-select/dist/styles.css';\r\nimport * as R from 'ramda';\r\n\r\ninterface ICaseDetailsCaseCarfixValidateAppointmentFormState {\r\n backToServiceFormData: CaseRequest;\r\n selectedUser: AppUser | null;\r\n isLoading: boolean;\r\n isLoading2: boolean;\r\n hasRights: boolean;\r\n isUserHidden: boolean;\r\n executing: boolean;\r\n formSubmitted: boolean;\r\n wfTransitionStepAction: WorkflowFormAction;\r\n appointment: Appointment | null;\r\n}\r\n\r\nexport interface ExternalCaseDetailsCaseCarfixValidateAppointmentFormProps {\r\n workflowForm: WorkflowSectionStepForm;\r\n}\r\n\r\ntype ICaseDetailsCaseCarfixValidateAppointmentFormProps =\r\n ExternalCaseDetailsCaseCarfixValidateAppointmentFormProps & {\r\n caseSettingsState: CaseSettingsState;\r\n appState: AppState;\r\n } & typeof CaseSettingsActionCreators &\r\n ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass CaseDetailsCaseCarfixValidateAppointmentForm extends React.PureComponent<\r\n ICaseDetailsCaseCarfixValidateAppointmentFormProps,\r\n ICaseDetailsCaseCarfixValidateAppointmentFormState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private caseService!: ICaseService;\r\n private workflowService!: IWorkflowService;\r\n\r\n static contextType = ApplicationContext;\r\n state = {\r\n backToServiceFormData: {} as CaseRequest,\r\n selectedUser: null,\r\n isLoading: false,\r\n isLoading2: false,\r\n hasRights: false,\r\n isUserHidden: false,\r\n executing: false,\r\n formSubmitted: false,\r\n wfTransitionStepAction: {} as WorkflowFormAction,\r\n appointment: null\r\n } as ICaseDetailsCaseCarfixValidateAppointmentFormState;\r\n\r\n public componentDidMount() {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (isNullOrUndefined(caseSettings) || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadData();\r\n }\r\n );\r\n }\r\n\r\n\r\n loadData = async () => {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseStatusId = this.props.caseSettingsState.case?.caseStatus?.caseStatusId;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (isNullOrUndefined(caseSettings) || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n const [appointment, wfStepActions] = await Promise.all([\r\n this.caseService.GetAppointmentByCaseId(caseId),\r\n this.workflowService.GetWorkflowSectionStepFormActions(\r\n this.props.workflowForm.id\r\n )\r\n ]);\r\n\r\n const caseRequest = {\r\n id: 0,\r\n caseId: this.props.caseSettingsState.case!.id,\r\n text: this.translatorService.Tranlate(this.props.workflowForm.comments, ''),\r\n subject: '',\r\n to: '',\r\n clientEmail: '',\r\n userIdTo: '',\r\n organizationId: null,\r\n attachments: [] as CaseAttachment[],\r\n caseSectionStepFormId: this.props.workflowForm.id\r\n } as CaseRequest;\r\n\r\n const wfTransitionStepAction =\r\n wfStepActions.find(\r\n (item) =>\r\n item.actionType?.code === WorkflowFormActionTypeCode.STATUS_TRANSITION &&\r\n caseStatusId === item.fromStatusId\r\n ) || ({} as WorkflowFormAction);\r\n\r\n\r\n const hasRights = FormHelpers.HasRights(\r\n this.props.workflowForm.workflowFormPermissions,\r\n this.props.appState.appUser!,\r\n this.props.caseSettingsState.case!.caseStatus.caseStatusId\r\n );\r\n\r\n console.log('appointment', appointment);\r\n \r\n this.setState(\r\n {\r\n backToServiceFormData: caseRequest,\r\n isLoading: false,\r\n hasRights: hasRights,\r\n appointment: appointment,\r\n wfTransitionStepAction\r\n }\r\n );\r\n };\r\n\r\n sendEmail = async () => {\r\n try {\r\n let request = this.state.backToServiceFormData;\r\n const { toWorkflowId, toStatusId } = this.state.wfTransitionStepAction;\r\n const userId = this.props.appState?.appUser?.id || this.state.selectedUser?.id;\r\n\r\n if (isNullOrUndefined(request)) {\r\n return;\r\n }\r\n\r\n this.setState({ executing: true, formSubmitted: true });\r\n\r\n request!.id = 0;\r\n\r\n if (toWorkflowId && toStatusId) {\r\n await this.caseService.ChangeCaseWorkflow(\r\n toWorkflowId,\r\n request.caseId,\r\n userId!,\r\n toStatusId\r\n );\r\n } else {\r\n request = await this.caseService.AddCaseRequest(request);\r\n }\r\n\r\n await this.submitForm(request.caseId, request.caseSectionStepFormId, this.state.selectedUser);\r\n\r\n this.setState(\r\n {\r\n backToServiceFormData: {\r\n id: 0,\r\n caseId: this.props.caseSettingsState.case!.id,\r\n text: this.translatorService.Tranlate(this.props.workflowForm.comments, ''),\r\n subject: '',\r\n to: '',\r\n clientEmail: '',\r\n userId: '',\r\n organizationId: null,\r\n attachments: [] as CaseAttachment[],\r\n caseSectionStepFormId: this.props.workflowForm.id\r\n } as CaseRequest,\r\n formSubmitted: false,\r\n selectedUser: null\r\n },\r\n );\r\n\r\n if (toWorkflowId && toStatusId) {\r\n this.props.SetCaseSettings(request.caseId);\r\n }\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (ex) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n } finally {\r\n this.setState({ executing: false });\r\n }\r\n };\r\n\r\n submitForm = async (caseId: number, caseSectionStepFormId: number, appuser: AppUser | null) => {\r\n let newStatus = await this.caseService.SubmitForm(caseId, caseSectionStepFormId, appuser);\r\n if (newStatus === null) {\r\n newStatus = this.props.caseSettingsState.case!.caseStatus;\r\n }\r\n this.props.SetCaseStatus(newStatus);\r\n if (appuser !== null) {\r\n this.props.AddPartner(appuser!.hoId === null ? appuser!.organizationId : appuser!.hoId);\r\n }\r\n\r\n const hasRights = FormHelpers.HasRights(\r\n this.props.workflowForm.workflowFormPermissions,\r\n this.props.appState.appUser!,\r\n newStatus.caseStatusId\r\n );\r\n this.setState({ hasRights: hasRights });\r\n };\r\n\r\n handleUserChange = (newValue: AppUser | null) => {\r\n this.setState({ selectedUser: newValue });\r\n };\r\n\r\n onClick = async (id: number) => {\r\n try {\r\n this.props.history.push('/appointment/' + id);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n };\r\n\r\n rendeBackToServiceForm = () => {\r\n return isNullOrUndefined(this.state.backToServiceFormData) ? null : (\r\n {\r\n this.sendEmail();\r\n }}\r\n >\r\n
\r\n ) => {\r\n this.setState({\r\n backToServiceFormData: {\r\n ...this.state.backToServiceFormData,\r\n text: e.target.value\r\n }\r\n });\r\n }}\r\n variant=\"outlined\"\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n />\r\n
\r\n {R.isNil(this.state.appointment) ? null : (\r\n \r\n \r\n
\r\n {this.translatorService.Tranlate('VALIDATE_APPOINTMENT_ID', 'Id Programare') + ':'}\r\n
\r\n this.onClick(this.state.appointment!.id)}\r\n style={{ cursor: 'pointer' }}\r\n >\r\n {this.state.appointment!.id}\r\n
\r\n \r\n \r\n )}\r\n\r\n \r\n );\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n this.workflowService = (this.context as AppContext).workflowService;\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n
{this.rendeBackToServiceForm()}
\r\n ) : null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalCaseDetailsCaseCarfixValidateAppointmentFormProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app\r\n }),\r\n CaseSettingsActionCreators,\r\n mergeProps\r\n)(withSnackbar(CaseDetailsCaseCarfixValidateAppointmentForm as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n ApplicationState,\r\n CaseSettingsState,\r\n AppState,\r\n CaseSettingsActionCreators\r\n} from '../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport {\r\n WorkflowSectionStepForm\r\n} from '../../interfaces/Workflow';\r\nimport { isNullOrUndefined } from 'util';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport { FormHelpers } from '../../helpers/forms/FormHelpers';\r\nimport 'react-dropdown-tree-select/dist/styles.css';\r\nimport { Button } from '@material-ui/core';\r\nimport { AppUser } from '../../interfaces/AppUser';\r\nimport { ChangeCaseStatusRequest } from '../../interfaces/Case';\r\nimport { IReferentialService } from '../../services/Interfaces/IReferentialService';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport { CaseStatusCodeEnum, ReferentialCode } from '../../helpers/Constants';\r\nimport Referentials from '../../helpers/Referentials.json';\r\n\r\ninterface ICaseDetailsCaseRepairInProgressFormState {\r\n isLoading: boolean;\r\n hasRights: boolean;\r\n executing: boolean;\r\n caseStatuses: IReferential[];\r\n}\r\n\r\nexport interface ExternalCaseDetailsCaseRepairInProgressFormProps {\r\n workflowForm: WorkflowSectionStepForm;\r\n}\r\n\r\ntype ICaseDetailsCaseRepairInProgressFormProps =\r\n ExternalCaseDetailsCaseRepairInProgressFormProps & {\r\n caseSettingsState: CaseSettingsState;\r\n appState: AppState;\r\n } & typeof CaseSettingsActionCreators &\r\n ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass CaseDetailsCaseRepairInProgressForm extends React.PureComponent<\r\n ICaseDetailsCaseRepairInProgressFormProps,\r\n ICaseDetailsCaseRepairInProgressFormState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private caseService!: ICaseService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n state = {\r\n isLoading: false,\r\n hasRights: false,\r\n isUserHidden: false,\r\n executing: false,\r\n caseStatuses: []\r\n } as ICaseDetailsCaseRepairInProgressFormState;\r\n\r\n public componentDidMount() {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (isNullOrUndefined(caseSettings) || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadData();\r\n }\r\n );\r\n }\r\n\r\n loadData = async () => {\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (Number.isNaN(caseId)) {\r\n return;\r\n }\r\n\r\n const refCaseStatus = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.CaseStatus\r\n );\r\n \r\n const caseStatuses = await this.appReferentialService.Get(refCaseStatus!.baseUrl);\r\n\r\n const hasRights = FormHelpers.HasRights(\r\n this.props.workflowForm.workflowFormPermissions,\r\n this.props.appState.appUser!,\r\n this.props.caseSettingsState.case!.caseStatus.caseStatusId\r\n );\r\n\r\n this.setState(\r\n {\r\n isLoading: false,\r\n caseStatuses: caseStatuses,\r\n hasRights: hasRights\r\n }\r\n );\r\n };\r\n\r\n repairHasBeenFinished = async (e: any) => {\r\n try {\r\n this.setState({ executing: true });\r\n\r\n await this.submitForm(\r\n this.props.caseSettingsState.case!.id,\r\n this.props.workflowForm.id,\r\n null\r\n );\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n\r\n this.setState({ executing: false });\r\n } catch (ex) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n } finally {\r\n this.setState({ executing: false });\r\n }\r\n };\r\n\r\n submitForm = async (caseId: number, caseSectionStepFormId: number, appUser: AppUser | null) => {\r\n let newStatus = await this.caseService.SubmitForm(caseId, caseSectionStepFormId, appUser);\r\n\r\n if (newStatus === null) {\r\n newStatus = this.props.caseSettingsState.case!.caseStatus;\r\n }\r\n\r\n this.props.SetCaseStatus(newStatus);\r\n if (appUser !== null) {\r\n this.props.AddPartner(appUser!.hoId === null ? appUser!.organizationId : appUser!.hoId);\r\n }\r\n\r\n const hasRights = FormHelpers.HasRights(\r\n this.props.workflowForm.workflowFormPermissions,\r\n this.props.appState.appUser!,\r\n newStatus.caseStatusId\r\n );\r\n this.setState({ hasRights: hasRights });\r\n };\r\n\r\n updateOffer = async (e: any) => {\r\n try {\r\n this.setState({ executing: true });\r\n\r\n const newStatus = this.state.caseStatuses.find(x => x.code === CaseStatusCodeEnum.ACTUALIZEAZA_CALCULATIE.toString());\r\n const caseStatusRequest = {\r\n caseId: this.props.caseSettingsState.case!.id,\r\n statusId: newStatus!.id\r\n } as ChangeCaseStatusRequest;\r\n const currentStatus = await this.caseService.ChangeCaseStatus(caseStatusRequest);\r\n\r\n this.props.SetCaseStatus(currentStatus);\r\n\r\n this.setState({ executing: false });\r\n } catch (ex) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n } finally {\r\n this.setState({ executing: false });\r\n }\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n
\r\n {!this.props.workflowForm.hideFirstButton && (\r\n \r\n {this.translatorService.Tranlate(this.props.workflowForm.firstButtonLabel, '')}\r\n \r\n )}\r\n {!this.props.workflowForm.hideSecondButton && (\r\n \r\n {this.translatorService.Tranlate(this.props.workflowForm.secondButtonLabel, '')}\r\n \r\n )}\r\n
\r\n ) : null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalCaseDetailsCaseRepairInProgressFormProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app\r\n }),\r\n CaseSettingsActionCreators,\r\n mergeProps\r\n)(withSnackbar(CaseDetailsCaseRepairInProgressForm as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n ApplicationState,\r\n CaseSettingsState,\r\n AppState,\r\n CaseSettingsActionCreators\r\n} from '../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport {\r\n WorkflowSectionStepForm\r\n} from '../../interfaces/Workflow';\r\nimport { isNullOrUndefined } from 'util';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport { FormHelpers } from '../../helpers/forms/FormHelpers';\r\nimport 'react-dropdown-tree-select/dist/styles.css';\r\nimport { Button, Grid, Tooltip, Typography } from '@material-ui/core';\r\nimport { AppUser } from '../../interfaces/AppUser';\r\nimport { FormControlLabel, Switch } from '@material-ui/core';\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { rest } from 'lodash';\r\nimport { ValidatorForm } from 'react-material-ui-form-validator';\r\nimport { ChangeCaseStatusBasedCodeRequest } from '../../interfaces/Case';\r\nimport { CaseStatusCodeEnum } from '../../helpers/Constants';\r\n\r\ninterface ICaseDetailsCarInServiceFormState {\r\n isLoading: boolean;\r\n hasRights: boolean;\r\n executing: boolean;\r\n carInService: boolean;\r\n}\r\n\r\nexport interface ExternalCaseDetailsCarInServiceFormProps {\r\n workflowForm: WorkflowSectionStepForm;\r\n}\r\n\r\ntype ICaseDetailsCarInServiceFormProps =\r\n ExternalCaseDetailsCarInServiceFormProps & {\r\n caseSettingsState: CaseSettingsState;\r\n appState: AppState;\r\n } & typeof CaseSettingsActionCreators &\r\n ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass CaseDetailsCarInServiceForm extends React.PureComponent<\r\n ICaseDetailsCarInServiceFormProps,\r\n ICaseDetailsCarInServiceFormState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private caseService!: ICaseService;\r\n\r\n static contextType = ApplicationContext;\r\n state = {\r\n isLoading: false,\r\n hasRights: false,\r\n isUserHidden: false,\r\n executing: false,\r\n carInService: true\r\n } as ICaseDetailsCarInServiceFormState;\r\n\r\n public componentDidMount() {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (isNullOrUndefined(caseSettings) || Number.isNaN(caseId)) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadData();\r\n }\r\n );\r\n }\r\n\r\n loadData = async () => {\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (Number.isNaN(caseId)) {\r\n return;\r\n }\r\n\r\n const hasRights = FormHelpers.HasRights(\r\n this.props.workflowForm.workflowFormPermissions,\r\n this.props.appState.appUser!,\r\n this.props.caseSettingsState.case!.caseStatus.caseStatusId\r\n );\r\n\r\n console.log('case', this.props.caseSettingsState.case!);\r\n\r\n this.setState(\r\n {\r\n isLoading: false,\r\n hasRights: hasRights,\r\n carInService: !this.props.caseSettingsState.case!.carInServiceDate ? true : this.props.caseSettingsState.case!.carInService \r\n }\r\n );\r\n };\r\n\r\n continue = async (e: any) => {\r\n try {\r\n this.setState({ executing: true });\r\n\r\n await this.submitForm(\r\n this.props.caseSettingsState.case!.id,\r\n this.props.workflowForm.id,\r\n null\r\n );\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n\r\n this.setState({ executing: false });\r\n } catch (ex) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n } finally {\r\n this.setState({ executing: false });\r\n }\r\n };\r\n\r\n submitForm = async (caseId: number, caseSectionStepFormId: number, appUser: AppUser | null) => {\r\n let newStatus = await this.caseService.SubmitForm(caseId, caseSectionStepFormId, appUser);\r\n\r\n if (newStatus === null) {\r\n newStatus = this.props.caseSettingsState.case!.caseStatus;\r\n }\r\n\r\n this.props.SetCaseStatus(newStatus);\r\n if (appUser !== null) {\r\n this.props.AddPartner(appUser!.hoId === null ? appUser!.organizationId : appUser!.hoId);\r\n }\r\n\r\n const hasRights = FormHelpers.HasRights(\r\n this.props.workflowForm.workflowFormPermissions,\r\n this.props.appState.appUser!,\r\n newStatus.caseStatusId\r\n );\r\n this.setState({ hasRights: hasRights });\r\n };\r\n\r\n\r\n submitCaseCarInServiceData = async (e: any) => {\r\n try {\r\n this.setState({ executing: true });\r\n\r\n const response = await this.caseService.SetCarInService(this.props.caseSettingsState.case!.id, this.state.carInService);\r\n\r\n this.props.SetCarInService(response.carInService, response.carInServiceDate);\r\n\r\n if (!response.carInService) {\r\n const caseStatusRequest = {\r\n caseId: this.props.caseSettingsState.case!.id,\r\n statusCode: CaseStatusCodeEnum.CAR_LEAVE_WORKSHOP.toString()\r\n } as ChangeCaseStatusBasedCodeRequest;\r\n const currentStatus = await this.caseService.ChangeCaseStatusBasedCode(caseStatusRequest);\r\n\r\n this.props.SetCaseStatus(currentStatus);\r\n } else {\r\n await this.submitForm(\r\n this.props.caseSettingsState.case!.id,\r\n this.props.workflowForm.id,\r\n null\r\n );\r\n }\r\n await this.loadData();\r\n\r\n this.setState({ executing: false });\r\n } catch (ex) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n } finally {\r\n this.setState({ executing: false });\r\n }\r\n };\r\n\r\n displayInfo = (info: string) => {\r\n return (\r\n { e.preventDefault() }}\r\n {...rest}\r\n disableHoverListener={!this.state.hasRights || this.state.executing}\r\n title={info}\r\n placement='right'\r\n >\r\n
\r\n \r\n
\r\n \r\n );\r\n };\r\n \r\n handleSwitchChange = (e: any) => {\r\n this.setState({\r\n carInService: e.currentTarget.checked\r\n });\r\n };\r\n\r\n rendeCarInServiceForm = () => {\r\n return (\r\n {\r\n this.submitCaseCarInServiceData(e);\r\n }}\r\n >\r\n
\r\n \r\n \r\n \r\n {this.translatorService.Tranlate('APPOINTMENT_CAR_REPAIR_TITLE', 'Reparație mașină')}\r\n \r\n \r\n
\r\n this.handleSwitchChange(e)}\r\n color=\"primary\"\r\n />\r\n }\r\n label={\r\n
\r\n \r\n {this.state.carInService ? this.translatorService.Tranlate('CASE_CAR_IS_IN_SERVICE', 'Mașina este în service') \r\n : this.translatorService.Tranlate('CASE_CAR_IS_NOT_IN_SERVICE', 'Masina nu ramane in service') }\r\n \r\n {this.displayInfo(this.translatorService.Tranlate('CASE_CAR_IS_IN_SERVICE_INFO', 'Selectează dacă mașina rămâne în service'))}\r\n
\r\n }\r\n labelPlacement=\"end\"\r\n className=\"mt-3 mr-0\"\r\n />\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n {this.translatorService.Tranlate('SAVE', 'Salveaza')}\r\n \r\n \r\n );\r\n }\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n
{this.rendeCarInServiceForm()}
\r\n ) : null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalCaseDetailsCarInServiceFormProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app\r\n }),\r\n CaseSettingsActionCreators,\r\n mergeProps\r\n)(withSnackbar(CaseDetailsCarInServiceForm as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, CaseSettingsState } from '../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport {\r\n Box,\r\n Tabs,\r\n Tab,\r\n Grid,\r\n Button,\r\n Stepper,\r\n Step,\r\n StepButton,\r\n StepLabel,\r\n StepConnector,\r\n AppBar,\r\n IconButton,\r\n Typography,\r\n withStyles,\r\n Dialog,\r\n DialogTitle,\r\n DialogContent\r\n} from '@material-ui/core';\r\nimport { ApplicationContext } from '../../context/Contexts';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { Card } from 'reactstrap';\r\nimport TabPanel from '../_shared/Tabs';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport {\r\n WorkflowCurrentSectionStepResult,\r\n WorkflowSection,\r\n WorkflowSectionStep,\r\n WorkflowSectionStepForm,\r\n WorkflowSectionStepResult\r\n} from '../../interfaces/Workflow';\r\nimport { isNullOrUndefined } from 'util';\r\nimport CaseDetailsCaseTabSummaryForm from './CaseDetailsCaseTabSummaryForm';\r\nimport CaseDetailsCaseTabHistoryForm from './CaseDetailsCaseTabHistoryForm';\r\nimport CaseDetailsCaseTabModifyWorkflowForm from './CaseDetailsCaseTabModifyWorkflowForm';\r\nimport CaseDetailsCaseTabDocumentsForm from './CaseDetailsCaseTabDocumentsForm';\r\nimport CaseDetailsCaseTabCarPhotosForm from './CaseDetailsCaseTabCarPhotosForm';\r\nimport CaseDetailsCaseTabCalculationsForm from './CaseDetailsCaseTabCalculationsForm';\r\nimport CaseDetailsCaseTabCarDetailsForm from './CaseDetailsCaseTabCarDetailsForm';\r\nimport CaseDetailsCaseTabEventDetailsForm from './CaseDetailsCaseTabEventDetailsForm';\r\nimport CaseDetailsCaseTabBackToServiceForm from './CaseDetailsCaseTabBackToServiceForm';\r\nimport CaseDetailsCaseTabOtherServiceForm from './CaseDetailsCaseTabOtherServiceForm';\r\nimport CaseDetailsCaseTabPaymentDetailsForm from './CaseDetailsCaseTabPaymentDetailsForm';\r\nimport CaseDetailsCaseTabOrderForm from './CaseDetailsCaseTabOrderForm';\r\nimport CaseDetailsCaseServiceAppointmentsForm from './CaseDetailsCaseServiceAppointmentsForm';\r\nimport CaseDetailsCaseTabClientDataForm from './CaseDetailsCaseTabClientDataForm';\r\nimport CaseDetailsCaseTabCarDetailsExtendedContainer from './vehicleDetails/CaseDetailsCaseTabCarDetailsExtendedContainer';\r\nimport CaseDetailsCaseTabCarRepairCostForm from './CaseDetailsCaseTabCarRepairCostForm';\r\nimport CaseDetailsCaseTabSaleOfferForm from './CaseDetailsCaseTabSaleOfferForm';\r\nimport CaseDetailsCaseTabVehicleAdvertComponent from './advert/CaseDetailsCaseTabVehicleAdvertComponent';\r\nimport { FormCode } from '../../helpers/forms/FormCode';\r\nimport AddCircleIcon from '@material-ui/icons/AddCircle';\r\nimport Xarrow from 'react-xarrows';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport PlayCircleOutlineIcon from '@material-ui/icons/PlayCircleOutline';\r\nimport { Badge } from '@material-ui/core';\r\nimport CaseDetailsCaseTabEventBillingDetailsForm from './CaseDetailsCaseTabEventBillingDetailsForm';\r\nimport CaseDetailsCaseTabSoldCarForm from './CaseDetailsCaseTabSoldCarForm';\r\nimport CaseDetailsCaseServiceAddAppointmentForm from './CaseDetailsCaseServiceAddAppointmentForm';\r\nimport CaseDetailsCaseTabInOutDataForm from './CaseDetailsCaseTabInOutDataForm';\r\nimport CaseDetailsCaseTabIntegrationClientDataForm from './CaseDetailsCaseTabIntegrationClientDataForm';\r\nimport CaseDetailsCaseCarfixAnalysisForm from './CaseDetailsCaseCarfixAnalysisForm';\r\nimport _ from 'lodash';\r\nimport CaseDetailsCaseCarfixBackToServiceForm from './CaseDetailsCaseCarfixBackToServiceForm';\r\nimport CaseDetailsCaseCarfixValidateAppointmentForm from './CaseDetailsCaseCarfixValidateAppointmentForm';\r\nimport CaseDetailsCaseRepairInProgressForm from './CaseDetailsCaseRepairInProgressForm';\r\nimport CaseDetailsCarInServiceForm from './CaseDetailsCarInServiceForm';\r\n\r\n\r\ninterface ICaseDetailsCaseTabState {\r\n workflowForms: WorkflowSectionStepForm[];\r\n\r\n workflowCaseSections: WorkflowSection[];\r\n workflowCaseSectionSteps: WorkflowSectionStep[];\r\n workflowCaseSectionStepForms: WorkflowSectionStepForm[];\r\n\r\n selectedWorkflowSection: WorkflowSection | null;\r\n selectedStep: WorkflowSectionStep | null;\r\n\r\n activeStep: number;\r\n selectedTabForm: number;\r\n isLoading: boolean;\r\n\r\n formData: any;\r\n refreshDesign: boolean;\r\n isDialogOpen: boolean;\r\n isDialogFormOpen: boolean;\r\n\r\n renderForms: boolean;\r\n}\r\n\r\nexport const excludedSteps = [FormCode.CASE_VEHICLE_PB_ANUNT];\r\n\r\n\r\ntype ICaseDetailsCaseTabProps = { caseSettingsState: CaseSettingsState } & ProviderContext &\r\n RouteComponentProps<{ id: string; formId: string }>;\r\n\r\nconst StyledBadge = withStyles({\r\n badge: {\r\n backgroundColor: 'var(--success)',\r\n color: 'var(--success)',\r\n boxShadow: '0 0 0 2px #fff',\r\n '&::after': {\r\n position: 'absolute',\r\n top: 0,\r\n left: 0,\r\n width: '100%',\r\n height: '100%',\r\n borderRadius: '50%',\r\n animation: '$ripple 1.2s infinite ease-in-out',\r\n border: '1px solid currentColor',\r\n content: '\"\"'\r\n }\r\n },\r\n '@keyframes ripple': {\r\n '0%': {\r\n transform: 'scale(.8)',\r\n opacity: 1\r\n },\r\n '100%': {\r\n transform: 'scale(2.4)',\r\n opacity: 0\r\n }\r\n }\r\n})(Badge);\r\n\r\nclass CaseDetailsCaseTab extends React.PureComponent<\r\n ICaseDetailsCaseTabProps,\r\n ICaseDetailsCaseTabState\r\n> {\r\n static contextType = ApplicationContext;\r\n state = {\r\n workflowCaseSections: [],\r\n selectedWorkflowSection: null,\r\n selectedStep: null,\r\n workflowCaseSectionSteps: [],\r\n workflowForms: [],\r\n workflowCaseSectionStepForms: [],\r\n selectedTabForm: 0,\r\n activeStep: 0,\r\n isLoading: false,\r\n formData: null,\r\n refreshDesign: false,\r\n isDialogOpen: false,\r\n isDialogFormOpen: false,\r\n renderForms: true\r\n } as ICaseDetailsCaseTabState;\r\n\r\n public componentDidMount() {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n if (isNullOrUndefined(caseSettings)) {\r\n return;\r\n }\r\n\r\n if (!isNullOrUndefined(this.props.match.params.formId)) {\r\n const sections = caseSettings.workflow\r\n .workflowSections!.filter((item) => item.isActive)\r\n .sort(this.sortFunction);\r\n const currentStatus = this.props.caseSettingsState.case!.caseStatus;\r\n const selectedWorkflowSection = sections.find((item: WorkflowSection) => item.isCurrent(currentStatus.caseStatusId));\r\n for (const section of sections) {\r\n const steps = section.workflowSectionSteps\r\n .filter((item) => item.isActive)\r\n .sort(this.sortFunction);\r\n for (const step of steps) {\r\n const forms = step.workflowSectionStepForms\r\n .filter((item) => item.isActive)\r\n .sort(this.sortFunction);\r\n const formIndex = forms.findIndex(\r\n (form) => form.id.toString() === this.props.match.params.formId\r\n );\r\n if (formIndex !== -1 && section.id === selectedWorkflowSection?.id) {\r\n this.setState(\r\n {\r\n isLoading: true,\r\n selectedWorkflowSection: section,\r\n selectedStep: step,\r\n selectedTabForm: formIndex,\r\n activeStep: steps.findIndex((item) => item.id === step.id)\r\n },\r\n () => {\r\n this.loadCaseSettings(section.id);\r\n }\r\n );\r\n\r\n return;\r\n }\r\n }\r\n }\r\n }\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n () => {\r\n this.loadCaseSettings(null);\r\n }\r\n );\r\n }\r\n\r\n loadCaseSettings = (workflowCaseSectionId: number | null) => {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n const initialWorkflowCaseSectionId = _.cloneDeep(workflowCaseSectionId);\r\n if (isNullOrUndefined(caseSettings)) {\r\n return;\r\n }\r\n\r\n const workflowCaseSections = caseSettings\r\n .workflow!.workflowSections!.filter((item) => item.isActive)\r\n .sort(this.sortFunction);\r\n\r\n workflowCaseSectionId =\r\n workflowCaseSectionId === null ? workflowCaseSections[0].id : workflowCaseSectionId;\r\n\r\n const workflowCaseSection = workflowCaseSections.find(\r\n (item) => item.id === workflowCaseSectionId\r\n );\r\n\r\n this.setState(\r\n {\r\n isLoading: false,\r\n workflowCaseSections: workflowCaseSections,\r\n selectedWorkflowSection: isNullOrUndefined(workflowCaseSection) ? null : workflowCaseSection\r\n },\r\n () => {\r\n if (initialWorkflowCaseSectionId === null) {\r\n this.loadInitialWorkflowSteps();\r\n } else {\r\n this.loadWorkflowSteps();\r\n }\r\n }\r\n );\r\n };\r\n\r\n loadWorkflowSteps = () => {\r\n if (isNullOrUndefined(this.state.selectedWorkflowSection)) {\r\n return;\r\n }\r\n\r\n const workflowCaseSectionSteps = this.state.selectedWorkflowSection.workflowSectionSteps\r\n .filter((item) => item.isActive)\r\n .sort(this.sortFunction);\r\n\r\n const selectedStep =\r\n this.state.selectedStep == null ? workflowCaseSectionSteps[0] : this.state.selectedStep;\r\n const workflowCaseSectionStepForms =\r\n workflowCaseSectionSteps.length === 0\r\n ? []\r\n : selectedStep.workflowSectionStepForms.sort(this.sortFunction);\r\n\r\n this.setState({\r\n isLoading: false,\r\n workflowCaseSectionSteps: workflowCaseSectionSteps,\r\n workflowCaseSectionStepForms: workflowCaseSectionStepForms,\r\n selectedTabForm: 0\r\n });\r\n };\r\n\r\n loadInitialWorkflowSteps = () => {\r\n if (isNullOrUndefined(this.state.selectedWorkflowSection)) {\r\n return;\r\n }\r\n\r\n const workflowCaseSectionSteps = this.state.selectedWorkflowSection.workflowSectionSteps\r\n .filter((item) => item.isActive)\r\n .sort(this.sortFunction);\r\n\r\n const selectedStep =\r\n this.state.selectedStep == null ? workflowCaseSectionSteps[0] : this.state.selectedStep;\r\n const workflowCaseSectionStepForms =\r\n workflowCaseSectionSteps.length === 0\r\n ? []\r\n : selectedStep.workflowSectionStepForms.sort(this.sortFunction);\r\n\r\n this.setState({\r\n isLoading: false,\r\n workflowCaseSectionSteps: workflowCaseSectionSteps,\r\n workflowCaseSectionStepForms: workflowCaseSectionStepForms,\r\n selectedTabForm: 0\r\n }, () => {\r\n this.loadCurrentWorkflowSelectedStep();\r\n });\r\n };\r\n\r\n loadCurrentWorkflowSelectedStep = () => {\r\n const currentStatus = this.props.caseSettingsState.case!.caseStatus;\r\n const selectedWorkflowSection = this.getSelectedWorkflowSection(currentStatus.caseStatusId);\r\n if (!isNullOrUndefined(selectedWorkflowSection)) {\r\n this.handleTabChange(selectedWorkflowSection);\r\n }\r\n }\r\n \r\n sortFunction = (a: any, b: any) => {\r\n return a.order - b.order;\r\n };\r\n\r\n onButtonClick = (newValue: WorkflowSection) => {\r\n this.setState(\r\n {\r\n selectedWorkflowSection: newValue,\r\n selectedTabForm: 0,\r\n activeStep: 0,\r\n selectedStep: null,\r\n isDialogOpen: true\r\n },\r\n () => {\r\n this.loadWorkflowSteps();\r\n }\r\n );\r\n };\r\n\r\n renderSectionTabs = () => {\r\n const sectionTabs = [] as any[];\r\n\r\n let selectedItemId = -1;\r\n if (!isNullOrUndefined(this.state.selectedWorkflowSection)) {\r\n selectedItemId = this.state.selectedWorkflowSection.id;\r\n }\r\n\r\n if (this.props.caseSettingsState.caseSettings !== null) {\r\n const sections = this.state.workflowCaseSections.length;\r\n this.state.workflowCaseSections.forEach((item: WorkflowSection, index: number) => {\r\n sectionTabs.push(\r\n \r\n this.onButtonClick(item)}\r\n >\r\n {item.section!.displayName}\r\n \r\n \r\n );\r\n });\r\n }\r\n return sectionTabs;\r\n };\r\n\r\n renderSectionTabs2 = () => {\r\n const sectionTabs = [] as any[];\r\n\r\n let selectedItemId = -1;\r\n if (!isNullOrUndefined(this.state.selectedWorkflowSection)) {\r\n selectedItemId = this.state.selectedWorkflowSection.id;\r\n }\r\n\r\n if (this.props.caseSettingsState.caseSettings !== null) {\r\n this.state.workflowCaseSections.forEach((item: WorkflowSection, index: number) => {\r\n sectionTabs.push(\r\n \r\n \r\n
\r\n
\r\n {index + 1 + '. ' + item.section!.displayName}\r\n
\r\n this.onButtonClick(item)}\r\n >\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n );\r\n });\r\n }\r\n return (\r\n
\r\n
\r\n \r\n {sectionTabs}\r\n \r\n \r\n
\r\n
\r\n );\r\n };\r\n\r\n renderStepper = () => {\r\n return (\r\n
\r\n }\r\n activeStep={this.state.activeStep}\r\n style={{ backgroundColor: 'transparent' }}\r\n >\r\n {this.renderSteps()}\r\n \r\n
\r\n );\r\n };\r\n\r\n \r\n componentDidUpdate(prevProps: ICaseDetailsCaseTabProps) {\r\n if (prevProps.caseSettingsState.case!.caseStatus.caseStatusId != this.props.caseSettingsState.case!.caseStatus.caseStatusId) {\r\n const prevStatus = prevProps.caseSettingsState.case!.caseStatus;\r\n const currentStatus = this.props.caseSettingsState.case!.caseStatus;\r\n\r\n const prevStep = this.getStepBasedCaseStatus(this.state.workflowCaseSectionSteps, prevStatus.caseStatusId);\r\n const step = prevStep.step;\r\n console.log('prevStep', prevStep);\r\n if (!isNullOrUndefined(step.workflowStep) && excludedSteps.includes(step.workflowStep!.code ?? '')) {\r\n console.log('Nu trece la pasul urmator!');\r\n return;\r\n }\r\n\r\n const selectedWorkflowSection = this.getSelectedWorkflowSection(currentStatus.caseStatusId);\r\n console.log('selectedWorkflowSection', selectedWorkflowSection);\r\n if (!isNullOrUndefined(selectedWorkflowSection)) {\r\n this.handleTabChange(selectedWorkflowSection);\r\n }\r\n\r\n }\r\n }\r\n\r\n handleTabChange = (newValue: WorkflowSection) => {\r\n this.setState(\r\n {\r\n selectedWorkflowSection: newValue,\r\n selectedTabForm: 0,\r\n activeStep: 0,\r\n selectedStep: null,\r\n isDialogOpen: true\r\n },\r\n () => {\r\n this.loadWorkflowCurrentSteps();\r\n }\r\n );\r\n };\r\n\r\n loadWorkflowCurrentSteps = () => {\r\n if (isNullOrUndefined(this.state.selectedWorkflowSection)) {\r\n return;\r\n }\r\n\r\n /*\r\n Get current section steps\r\n */\r\n const workflowCaseSectionSteps = this.state.selectedWorkflowSection.workflowSectionSteps\r\n .filter((item) => item.isActive)\r\n .sort(this.sortFunction);\r\n\r\n /*\r\n Get current step\r\n */\r\n const workflowCaseSectionStep = this.getStepBasedCaseStatus(workflowCaseSectionSteps, this.props.caseSettingsState.case!.caseStatus.caseStatusId);\r\n const step = workflowCaseSectionStep.index;\r\n const selectedStep = workflowCaseSectionStep.step;\r\n\r\n this.setState(\r\n {\r\n isLoading: false,\r\n workflowCaseSectionSteps: workflowCaseSectionSteps,\r\n workflowCaseSectionStepForms: selectedStep.workflowSectionStepForms\r\n .filter((item) => item.isActive)\r\n .sort(this.sortFunction),\r\n selectedTabForm: 0,\r\n activeStep: step,\r\n selectedStep: selectedStep,\r\n isDialogFormOpen: true,\r\n renderForms: false\r\n },\r\n () => {\r\n this.setState({ renderForms: true });\r\n }\r\n );\r\n };\r\n\r\n getSelectedWorkflowSection = (caseStatusId: number): WorkflowSection | null => {\r\n const selectedWorkflowSection = this.state.workflowCaseSections.find((item: WorkflowSection) => item.isCurrent(caseStatusId));\r\n if (!isNullOrUndefined(selectedWorkflowSection)) {\r\n return selectedWorkflowSection;\r\n }\r\n console.log('Nu exista sectiunea curenta!', this.state.workflowCaseSections);\r\n return this.state.workflowCaseSections[this.state.workflowCaseSections.length - 1];\r\n }\r\n\r\n getStepBasedCaseStatus = (workflowCaseSectionSteps: WorkflowSectionStep[], caseStatusId: number) : WorkflowSectionStepResult => {\r\n const index = workflowCaseSectionSteps.findIndex((step: WorkflowSectionStep) => step.isCurrent(caseStatusId));\r\n\r\n if (index !== -1) {\r\n return {\r\n index: index,\r\n step: workflowCaseSectionSteps[index]\r\n };\r\n }\r\n\r\n console.log('Nu exista pasul curent!', workflowCaseSectionSteps);\r\n return {\r\n index: workflowCaseSectionSteps.length - 1,\r\n step: workflowCaseSectionSteps[workflowCaseSectionSteps.length - 1]\r\n };\r\n }\r\n\r\n handleStep = (step: number, selectedStep: WorkflowSectionStep) => () => {\r\n this.setState(\r\n {\r\n activeStep: step,\r\n selectedStep: selectedStep,\r\n workflowCaseSectionStepForms: selectedStep.workflowSectionStepForms\r\n .filter((item) => item.isActive)\r\n .sort(this.sortFunction),\r\n selectedTabForm: 0,\r\n isDialogFormOpen: true,\r\n renderForms: false\r\n },\r\n () => this.setState({ renderForms: true })\r\n );\r\n };\r\n\r\n renderSteps = () => {\r\n const renderSteps = [] as any[];\r\n this.state.workflowCaseSectionSteps.forEach((step: WorkflowSectionStep, index: number) => {\r\n renderSteps.push(\r\n \r\n \r\n \r\n {step.workflowStep!.displayName}\r\n {step.isCurrent(this.props.caseSettingsState.case!.caseStatus.caseStatusId) ? (\r\n \r\n <>\r\n \r\n ) : null}\r\n \r\n \r\n \r\n );\r\n });\r\n return renderSteps;\r\n };\r\n\r\n isStepCurrent = (step: WorkflowSectionStep): boolean => {\r\n const caseStatusId = this.props.caseSettingsState.case!.caseStatus.caseStatusId;\r\n\r\n const result = step.workflowSectionStepCaseStatuses.find(\r\n (cs) => cs.caseStatusId === caseStatusId\r\n );\r\n\r\n return result !== undefined;\r\n };\r\n\r\n renderSteps2 = () => {\r\n const renderSteps = [] as any[];\r\n let selectedItemId = 0;\r\n if (!isNullOrUndefined(this.state.selectedStep)) {\r\n selectedItemId = this.state.selectedStep.id;\r\n }\r\n\r\n renderSteps.push();\r\n this.state.workflowCaseSectionSteps.forEach((step: WorkflowSectionStep, index: number) => {\r\n renderSteps.push(\r\n \r\n \r\n
\r\n
\r\n {index + 1 + '. ' + step.workflowStep!.displayName}\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n \r\n
\r\n );\r\n });\r\n renderSteps.push(\r\n \r\n );\r\n\r\n return (\r\n
\r\n \r\n {renderSteps}\r\n \r\n \r\n \r\n \r\n \r\n {this.state.selectedWorkflowSection!.section!.displayName}\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n {this.renderTabForms()}\r\n \r\n \r\n
\r\n );\r\n };\r\n handleChangeTabForm = (event: React.ChangeEvent, newValue: number) => {\r\n this.setState({\r\n selectedTabForm: newValue\r\n });\r\n };\r\n\r\n renderForms = () => {\r\n const renderForms = [] as any[];\r\n this.state.workflowCaseSectionStepForms.forEach(\r\n (form: WorkflowSectionStepForm, index: number) => {\r\n renderForms.push();\r\n }\r\n );\r\n\r\n return renderForms;\r\n };\r\n renderTabForms = () => {\r\n return (\r\n
\r\n \r\n \r\n {this.renderForms()}\r\n \r\n \r\n {this.renderSelectedForm()}\r\n
\r\n );\r\n };\r\n\r\n renderSelectedForm = () => {\r\n const tabPanels = [] as any[];\r\n if (!this.state.renderForms) {\r\n return null;\r\n }\r\n\r\n this.state.workflowCaseSectionStepForms.forEach(\r\n (item: WorkflowSectionStepForm, index: number) => {\r\n tabPanels.push(\r\n \r\n {item.form.code === FormCode.CASE_SUMMARY ? (\r\n \r\n ) : null}\r\n {item.form.code === FormCode.CASE_HISTORY ? (\r\n \r\n ) : null}\r\n {item.form.code === FormCode.CASE_CHANGE_WORKFLOW ? (\r\n \r\n ) : null}\r\n {item.form.code === FormCode.CASE_ATTACHMENTS ? (\r\n \r\n ) : null}\r\n {item.form.code === FormCode.CASE_CAR_PHOTOS ? (\r\n \r\n ) : null}\r\n {item.form.code === FormCode.CASE_CAR_DATA ? (\r\n \r\n ) : null}\r\n {item.form.code === FormCode.CASE_EVENT_DATA ? (\r\n \r\n ) : null}\r\n {item.form.code === FormCode.CASE_EVENT_DATE_FACT ? (\r\n \r\n ) : null}\r\n {item.form.code === FormCode.CASE_CALCULATIONS ? (\r\n \r\n ) : null}\r\n {item.form.code === FormCode.CASE_ORDER ? (\r\n \r\n ) : null}\r\n {item.form.code === FormCode.CASE_BACK_TO_SERVICE ? (\r\n \r\n ) : null}\r\n {item.form.code === FormCode.CASE_OTHER_SERVICE ? (\r\n \r\n ) : null}\r\n {item.form.code === FormCode.CASE_PAYMENT_DETAILS_SERVICE ? (\r\n \r\n ) : null}\r\n {item.form.code === FormCode.CASE_SERVICE_APPOINTMENT ? (\r\n \r\n ) : null}\r\n {item.form.code === FormCode.CASE_LKQ_APPOINTMENT ? (\r\n \r\n ) : null}\r\n {item.form.code === FormCode.CASE_CLIENT_DATA ? (\r\n \r\n ) : null}\r\n {item.form.code === FormCode.CASE_CAR_DETAILS ? (\r\n \r\n ) : null}\r\n {item.form.code === FormCode.CASE_CAR_REPAIR_COST ? (\r\n \r\n ) : null}\r\n {item.form.code === FormCode.CASE_SALE_OFFER ? (\r\n \r\n ) : null}\r\n {item.form.code === FormCode.CASE_BUY_OFFER ? (\r\n \r\n ) : null}\r\n {item.form.code === FormCode.CASE_SOLD_CAR ? (\r\n \r\n ) : null}\r\n {item.form.code === FormCode.CASE_PAYMENT_DETAILS_WITH_CURRENCY ? (\r\n \r\n ) : null}\r\n {item.form.code === FormCode.CASE_VEHICLE_ADVERT ? (\r\n \r\n ) : null}\r\n {item.form.code === FormCode.CASE_IN_OUT_REPORT ? (\r\n \r\n ) : null}\r\n {item.form.code === FormCode.CARFIX_CASE_CLIENT_DATA ? (\r\n \r\n ) : null}\r\n {item.form.code === FormCode.CARFIX_ANALYSIS_STEP ? (\r\n \r\n ) : null}\r\n {item.form.code === FormCode.CARFIX_BACK_TO_SERVICE_STEP ? (\r\n \r\n ) : null}\r\n {item.form.code === FormCode.CARFIX_APPOINTMENT_VALIDATION_STEP ? (\r\n \r\n ) : null}\r\n {item.form.code === FormCode.CARFIX_REPAIR_IN_PROGRESS_STEP ? (\r\n \r\n ) : null}\r\n {item.form.code === FormCode.CAR_IN_SERVICE ? (\r\n \r\n ) : null}\r\n \r\n );\r\n }\r\n );\r\n return tabPanels;\r\n };\r\n\r\n closeDialog = async () => {\r\n this.setState({ isDialogOpen: false });\r\n };\r\n\r\n closeDialogForm = async () => {\r\n this.setState({ isDialogFormOpen: false });\r\n };\r\n\r\n public render() {\r\n return (\r\n \r\n
\r\n \r\n
\r\n {/* this.setState({ refreshDesign: !this.state.refreshDesign })}>\r\n \r\n */}\r\n {!this.state.isLoading ? (\r\n this.state.refreshDesign ? (\r\n
\r\n {this.renderSectionTabs2()}\r\n \r\n \r\n \r\n {this.state.selectedWorkflowSection!.section!.displayName}\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n
{this.renderSteps2()}
\r\n
\r\n \r\n
\r\n ) : (\r\n \r\n \r\n {this.renderSectionTabs()}\r\n \r\n \r\n \r\n \r\n \r\n {this.renderStepper()}\r\n \r\n \r\n {this.renderTabForms()}\r\n \r\n \r\n \r\n \r\n \r\n )\r\n ) : null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n caseSettingsState: state.caseSettings\r\n }),\r\n null\r\n)(withSnackbar(CaseDetailsCaseTab as any));\r\n","import React, { Fragment } from 'react';\r\nimport { AppActionCreators, ApplicationState, AppState, CaseSettingsState } from '../../store';\r\nimport { ApplicationContext, AppContext } from '../../context/Contexts';\r\nimport { ProviderContext, withSnackbar } from 'notistack';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { IAppUserService } from '../../services/Interfaces/IAppUserService';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport { CaseComment } from '../../interfaces/Case';\r\nimport { Button, List, ListItem, Divider, Menu, MenuItem } from '@material-ui/core';\r\nimport moment from 'moment';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport avatar4 from '../../assets/images/avatars/avatar4.jpg';\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { CommentTypeCode } from '../../helpers/Constants';\r\nimport { isNullOrUndefined } from 'util';\r\n\r\ninterface ICaseCommentsState {\r\n caseComments: CaseComment[];\r\n commentText: string | null;\r\n isLoading: boolean;\r\n selectedCommentType: string;\r\n openMenuItem: any | null;\r\n selectedCaseCommentId: number | null;\r\n editComment: boolean;\r\n editTextComment: string | null;\r\n}\r\n\r\ntype ICaseCommentsProps = {\r\n caseSettingsState: CaseSettingsState;\r\n appState: AppState;\r\n} & typeof AppActionCreators &\r\n ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass CaseDetailsCommentsTab extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private appUserService!: IAppUserService;\r\n private caseService!: ICaseService;\r\n\r\n static contextType = ApplicationContext;\r\n state = {\r\n caseComments: [],\r\n commentText: '',\r\n isLoading: false,\r\n selectedCommentType: CommentTypeCode.PUBLIC,\r\n openMenuItem: null,\r\n selectedCaseCommentId: null,\r\n editComment: false,\r\n editTextComment: null\r\n } as ICaseCommentsState;\r\n\r\n public componentDidMount() {\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (Number.isNaN(caseId)) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadCaseComments();\r\n }\r\n );\r\n }\r\n\r\n loadCaseComments = async () => {\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (Number.isNaN(caseId)) {\r\n return;\r\n }\r\n const caseComments = await this.caseService.GetCaseComments(caseId);\r\n\r\n if (caseComments.length === 0) {\r\n this.setState({\r\n isLoading: false\r\n });\r\n\r\n return;\r\n }\r\n\r\n const users = await this.appUserService.GetUsersInfo(\r\n Array.from(new Set(caseComments.map((item) => item.userId.toString())))\r\n );\r\n\r\n for (const cc of caseComments) {\r\n const usr = users.find((item) => item.id === cc.userId.toString());\r\n cc.user = isNullOrUndefined(usr) ? null : usr;\r\n }\r\n\r\n this.setState({\r\n isLoading: false,\r\n caseComments: caseComments.sort(function (a: any, b: any) {\r\n return b.date - a.date;\r\n })\r\n });\r\n };\r\n\r\n mailHandleClick = (e: any, id: number) => {\r\n const index = this.state.caseComments.findIndex((item) => item.id === id);\r\n this.setState({\r\n selectedCaseCommentId: id,\r\n openMenuItem: e.currentTarget,\r\n editTextComment: this.state.caseComments[index].text,\r\n editComment: false\r\n });\r\n };\r\n\r\n handleDeleteComment = async () => {\r\n try {\r\n const comments = [...this.state.caseComments];\r\n\r\n await this.caseService.RemoveCaseComment(this.state.selectedCaseCommentId!);\r\n\r\n const index = comments.findIndex((item) => item.id === this.state.selectedCaseCommentId);\r\n comments.splice(index, 1);\r\n\r\n this.setState({ caseComments: comments, openMenuItem: false });\r\n } catch (err) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n handleEditComment = () => {\r\n this.setState({ openMenuItem: false, editComment: true });\r\n };\r\n\r\n editCaseComment = async () => {\r\n try {\r\n const comments = [...this.state.caseComments];\r\n const index = comments.findIndex((item) => item.id === this.state.selectedCaseCommentId);\r\n comments[index].text = this.state.editTextComment === null ? '' : this.state.editTextComment;\r\n\r\n await this.caseService.UpdateCaseComment(comments[index]);\r\n\r\n this.setState({ editComment: false, openMenuItem: false, caseComments: comments });\r\n } catch (err) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n displayText = (text: string) => {\r\n const lines = text.split('\\n');\r\n\r\n return lines.map((item: string, index: number) => (\r\n

\r\n {item}\r\n

\r\n ));\r\n };\r\n\r\n renderCaseComments = () => {\r\n const caseComments = [] as any[];\r\n if (this.state.caseComments.length !== 0) {\r\n this.state.caseComments.forEach((comment: CaseComment, index: number) => {\r\n caseComments.push(\r\n
\r\n {index === 0 ? null : }\r\n
\r\n \r\n {moment.utc(comment.date).local().format('L')}\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n {moment.utc(comment.date).local().format('LT')}\r\n \r\n
\r\n {comment.user!.firstName +\r\n ' ' +\r\n comment.user!.lastName +\r\n ' (' +\r\n comment.user!.organization!.hoName +\r\n ')'}\r\n
\r\n
\r\n
\r\n
\r\n {this.state.selectedCaseCommentId !== comment.id ||\r\n this.state.editComment === false ? (\r\n this.displayText(comment.text)\r\n ) : (\r\n \r\n
\r\n ) => {\r\n this.setState({ editTextComment: e.currentTarget.value });\r\n }}\r\n validators={['required']}\r\n errorMessages={[]}\r\n />\r\n
\r\n
\r\n {\r\n this.setState({ editComment: false, openMenuItem: false });\r\n }}\r\n >\r\n {this.translatorService.Tranlate('CANCEL', 'Anuleaza')}\r\n \r\n \r\n
\r\n
\r\n )}\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n });\r\n }\r\n return caseComments;\r\n };\r\n\r\n addCaseComment = async () => {\r\n if (this.state.commentText !== null) {\r\n try {\r\n const caseComment = await this.caseService.AddCaseComment({\r\n id: 0,\r\n caseId: this.props.caseSettingsState.case!.id,\r\n text: this.state.commentText,\r\n commentTypeCode: this.state.selectedCommentType\r\n } as CaseComment);\r\n\r\n caseComment.user = this.props.appState.appUser;\r\n const caseComments = [caseComment, ...this.state.caseComments];\r\n\r\n this.setState({\r\n commentText: '',\r\n caseComments: caseComments\r\n });\r\n\r\n this.props.LoadComments();\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n this.appUserService = (this.context as AppContext).appUserService;\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n
\r\n
\r\n {/*
\r\n \r\n \r\n \r\n )\r\n }}\r\n />\r\n
*/}\r\n
\r\n \r\n
\r\n ) => {\r\n this.setState({ commentText: e.currentTarget.value });\r\n }}\r\n validators={['required']}\r\n errorMessages={[]}\r\n />\r\n
\r\n
\r\n
\r\n {\r\n this.setState({ selectedCommentType: CommentTypeCode.PUBLIC });\r\n }}\r\n >\r\n {this.translatorService.Tranlate('CASE_COMMENT_TYPE_PUBLIC', 'Public')}\r\n \r\n {\r\n this.setState({ selectedCommentType: CommentTypeCode.INTERNAL });\r\n }}\r\n >\r\n {this.translatorService.Tranlate('CASE_COMMENT_TYPE_INTERNAL', 'Intern')}\r\n \r\n {\r\n this.setState({ selectedCommentType: CommentTypeCode.PRIVATE });\r\n }}\r\n >\r\n {this.translatorService.Tranlate('CASE_COMMENT_TYPE_PRIVATE', 'Privat')}\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n {/* */}\r\n {this.renderCaseComments()}\r\n {/* */}\r\n \r\n
\r\n {/* \r\n
\r\n ) => { this.setState({ commentText: e.currentTarget.value }) }}\r\n validators={['required']}\r\n errorMessages={[]}\r\n\r\n />\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
*/}\r\n
\r\n
\r\n
\r\n ) : null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n // (state: ApplicationState) => state.app\r\n (state: ApplicationState) => {\r\n return { caseSettingsState: state.caseSettings, appState: state.app };\r\n },\r\n AppActionCreators\r\n)(withSnackbar(CaseDetailsCommentsTab as any));\r\n","import React, { Fragment } from 'react';\r\nimport { ApplicationState, AppState } from '../../store';\r\nimport { ApplicationContext, AppContext } from '../../context/Contexts';\r\nimport { ProviderContext, withSnackbar } from 'notistack';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { IAppUserService } from '../../services/Interfaces/IAppUserService';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport { CaseRequest, CaseStatusHistory } from '../../interfaces/Case';\r\nimport moment from 'moment';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { IReferentialService } from '../../services/Interfaces/IReferentialService';\r\nimport Referentials from '../../helpers/Referentials.json';\r\nimport { ReferentialCode } from '../../helpers/Constants';\r\nimport { isNullOrUndefined } from 'util';\r\nimport CaseDetailsCaseRequests from '../cases/CaseDetailsCaseRequests';\r\nimport { Box, Card, CardContent } from '@material-ui/core';\r\nimport { IVehicleService } from '../../services/Interfaces/IVehicleService';\r\n\r\ninterface ICaseStatusHistoryState {\r\n caseStatusHistory: CaseStatusHistory[];\r\n caseRequests: CaseRequest[];\r\n isLoading: boolean;\r\n}\r\n\r\ntype ICaseStatusHistoryProps = AppState & ProviderContext & RouteComponentProps<{ id: string }>;\r\n\r\nclass CaseDetailsHistoryTab extends React.PureComponent<\r\n ICaseStatusHistoryProps,\r\n ICaseStatusHistoryState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private appUserService!: IAppUserService;\r\n private caseService!: ICaseService;\r\n private vehicleService!: IVehicleService;\r\n\r\n static contextType = ApplicationContext;\r\n state = {\r\n caseStatusHistory: [],\r\n caseRequests: [],\r\n isLoading: false\r\n } as ICaseStatusHistoryState;\r\n\r\n public componentDidMount() {\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (Number.isNaN(caseId)) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadCaseStatusHistory();\r\n }\r\n );\r\n }\r\n\r\n loadCaseStatusHistory = async () => {\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (Number.isNaN(caseId)) {\r\n return;\r\n }\r\n const ref = Referentials.referential.find((item) => item.code === ReferentialCode.CaseStatus);\r\n\r\n const [caseStatusHistory, caseRequests, vehicleCosts] = await Promise.all([\r\n this.caseService.GetCaseStatusHistory(caseId),\r\n this.caseService.GetCaseRequests(caseId, null),\r\n this.vehicleService.GetCostRequests(caseId, null)\r\n ]);\r\n\r\n for (const vehicleCost of vehicleCosts) {\r\n const caseRequest = {\r\n attachments: vehicleCost.attachments,\r\n id: vehicleCost.id,\r\n userId: vehicleCost.userId,\r\n caseSectionStepFormId: vehicleCost.caseSectionStepFormId,\r\n vehicleId: vehicleCost.vehicleId,\r\n caseId: vehicleCost.caseId,\r\n value: vehicleCost.value,\r\n date: vehicleCost.date,\r\n isVehicleCost: true,\r\n costType: vehicleCost.costType,\r\n currencyRate: vehicleCost.currencyRate,\r\n currency: vehicleCost.currency,\r\n secondValue: vehicleCost.secondValue,\r\n secondCurrency: vehicleCost.secondCurrency,\r\n to: null\r\n } as any as CaseRequest;\r\n caseRequests.push(caseRequest);\r\n }\r\n\r\n const userIds = caseStatusHistory.map((item) => item.assignedToId);\r\n userIds.push(...caseStatusHistory.map((item) => item.userId));\r\n userIds.push(...caseRequests.map((item) => item.userId));\r\n\r\n const users = await this.appUserService.GetUsersInfo(Array.from(new Set(userIds)));\r\n\r\n for (const i of caseStatusHistory) {\r\n const user = users.find((u) => u.id === i.userId);\r\n const assignedTo = users.find((u) => u.id === i.assignedToId);\r\n\r\n i.user = isNullOrUndefined(user) ? null : user;\r\n i.assignedTo = isNullOrUndefined(assignedTo) ? null : assignedTo;\r\n }\r\n for (const i of caseRequests) {\r\n const user = users.find((u) => u.id === i.userId);\r\n i.user = isNullOrUndefined(user) ? null : user;\r\n }\r\n\r\n this.setState({\r\n isLoading: false,\r\n caseStatusHistory: caseStatusHistory.sort(function (a: any, b: any) {\r\n return b.date - a.date;\r\n }),\r\n caseRequests: caseRequests.sort(function (a: any, b: any) {\r\n return b.date - a.date;\r\n })\r\n });\r\n };\r\n\r\n showTimelineTariff = () => {\r\n const caseStatusHistory = this.state.caseStatusHistory;\r\n\r\n if (caseStatusHistory.length === 0) {\r\n return (\r\n \r\n {this.translatorService.Tranlate(\r\n 'TARIFF_EDIT_LABOR_TAB_NO_DATA',\r\n 'Nu exista date de afisat!'\r\n )}\r\n \r\n );\r\n }\r\n\r\n return caseStatusHistory.map((caseStatus, index) => (\r\n
\r\n
\r\n
\r\n

\r\n {caseStatus.caseStatus!.displayName + ' (' + caseStatus.assignedTo!.userName + ')'}\r\n

\r\n

\r\n {moment.utc(caseStatus.date).local().format(this.props.longDateFormat) +\r\n ' (' +\r\n caseStatus.user!.userName +\r\n ')'}\r\n

\r\n
\r\n {index != 0\r\n ? this.renderCaseRequests(caseStatus.date, caseStatusHistory[index - 1].date)\r\n : this.renderCaseRequestsForFirstStatus(caseStatus.date)}\r\n
\r\n
\r\n
\r\n ));\r\n };\r\n\r\n renderCaseRequests = (startDate: Date, endDate: Date) => {\r\n const req = this.state.caseRequests.filter(\r\n (item) => startDate <= item.date && item.date <= endDate\r\n );\r\n const formIds = Array.from(new Set(req.map((r) => r.caseSectionStepFormId)));\r\n return formIds.map((item, index) => (\r\n r.caseSectionStepFormId === item)}\r\n carfixOfferComments={false}\r\n />\r\n ));\r\n };\r\n\r\n renderCaseRequestsForFirstStatus = (startDate: Date) => {\r\n const req = this.state.caseRequests.filter(\r\n (item) => startDate <= item.date && new Date(item.date) < new Date()\r\n );\r\n\r\n const formIds = Array.from(new Set(req.map((r) => r.caseSectionStepFormId)));\r\n return formIds.map((item, index) => (\r\n r.caseSectionStepFormId === item)}\r\n carfixOfferComments={false}\r\n />\r\n ));\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n this.appUserService = (this.context as AppContext).appUserService;\r\n this.vehicleService = (this.context as AppContext).vehicleService;\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n \r\n \r\n
\r\n
\r\n {' '}\r\n {this.showTimelineTariff()}{' '}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n ) : null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect((state: ApplicationState) => state.app)(\r\n withSnackbar(CaseDetailsHistoryTab as any)\r\n);\r\n","import React, { Fragment } from 'react';\r\nimport { AppActionCreators, ApplicationState, AppState, CaseSettingsState } from '../../store';\r\nimport { ApplicationContext, AppContext } from '../../context/Contexts';\r\nimport { ProviderContext, withSnackbar } from 'notistack';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { IAppUserService } from '../../services/Interfaces/IAppUserService';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport { CaseComment, NotifySupportRequest } from '../../interfaces/Case';\r\nimport { Button, List, ListItem, Divider, Menu, MenuItem } from '@material-ui/core';\r\nimport moment from 'moment';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { CommentTypeCode, NotifySupportTemplateEnum, RoleClaimsEnum } from '../../helpers/Constants';\r\nimport { isNullOrUndefined } from 'util';\r\nimport _ from 'lodash';\r\n\r\ninterface ICaseSupportCommentsState {\r\n caseSupportComments: CaseComment[];\r\n commentText: string | null;\r\n isLoading: boolean;\r\n selectedCommentType: string;\r\n openMenuItem: any | null;\r\n selectedCaseCommentId: number | null;\r\n editComment: boolean;\r\n editTextComment: string | null;\r\n}\r\n\r\ntype ICaseSupportCommentsProps = {\r\n caseSettingsState: CaseSettingsState;\r\n appState: AppState;\r\n} & typeof AppActionCreators &\r\n ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass CaseDetailsCaseSupportCommentsTab extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private appUserService!: IAppUserService;\r\n private caseService!: ICaseService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n public hasRight = (right: string): boolean => {\r\n return this.props.appState!.user!.profile.role.includes(right);\r\n };\r\n\r\n state = {\r\n caseSupportComments: [],\r\n commentText: '',\r\n isLoading: false,\r\n selectedCommentType: !this.hasRight(RoleClaimsEnum.AdminSupport) ? CommentTypeCode.SUPPORT_REQUEST : CommentTypeCode.SUPPORT_RESPONSE,\r\n openMenuItem: null,\r\n selectedCaseCommentId: null,\r\n editComment: false,\r\n editTextComment: null\r\n } as ICaseSupportCommentsState;\r\n\r\n public componentDidMount() {\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (Number.isNaN(caseId)) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadCaseSupportComments();\r\n }\r\n );\r\n }\r\n\r\n loadCaseSupportComments = async () => {\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n if (Number.isNaN(caseId)) {\r\n return;\r\n }\r\n const caseComments = await this.caseService.GetCaseCommentsByTab(caseId, true);\r\n\r\n if (caseComments.length === 0) {\r\n this.setState({\r\n isLoading: false\r\n });\r\n\r\n return;\r\n }\r\n\r\n const users = await this.appUserService.GetUsersInfo(\r\n Array.from(new Set(caseComments.map((item) => item.userId.toString())))\r\n );\r\n\r\n for (const cc of caseComments) {\r\n const usr = users.find((item) => item.id === cc.userId.toString());\r\n cc.user = isNullOrUndefined(usr) ? null : usr;\r\n }\r\n\r\n this.setState({\r\n isLoading: false,\r\n caseSupportComments: caseComments.sort(function (a: any, b: any) {\r\n return b.date - a.date;\r\n })\r\n });\r\n };\r\n\r\n mailHandleClick = (e: any, id: number) => {\r\n const index = this.state.caseSupportComments.findIndex((item) => item.id === id);\r\n this.setState({\r\n selectedCaseCommentId: id,\r\n openMenuItem: e.currentTarget,\r\n editTextComment: this.state.caseSupportComments[index].text,\r\n editComment: false\r\n });\r\n };\r\n\r\n handleDeleteComment = async () => {\r\n try {\r\n const comments = [...this.state.caseSupportComments];\r\n\r\n await this.caseService.RemoveCaseComment(this.state.selectedCaseCommentId!);\r\n\r\n const index = comments.findIndex((item) => item.id === this.state.selectedCaseCommentId);\r\n comments.splice(index, 1);\r\n\r\n this.setState({ caseSupportComments: comments, openMenuItem: false });\r\n } catch (err) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n handleEditComment = () => {\r\n this.setState({ openMenuItem: false, editComment: true });\r\n };\r\n\r\n editCaseComment = async () => {\r\n try {\r\n const comments = [...this.state.caseSupportComments];\r\n const index = comments.findIndex((item) => item.id === this.state.selectedCaseCommentId);\r\n comments[index].text = this.state.editTextComment === null ? '' : this.state.editTextComment;\r\n\r\n const adminSupport = this.hasRight(RoleClaimsEnum.AdminSupport);\r\n const userSupportComment = this.state.caseSupportComments.find((item) => item.commentTypeCode === CommentTypeCode.SUPPORT_REQUEST && item.userId !== this.props.appState.appUser!.id);\r\n \r\n if (adminSupport && !userSupportComment) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('NO_USER_FOUNDED', 'Nu s-a gasit utilizatorul!'), {\r\n variant: 'error'\r\n });\r\n return;\r\n }\r\n\r\n const request = {\r\n caseId: this.props.caseSettingsState.case!.id,\r\n toUserId: adminSupport ? userSupportComment?.userId : null,\r\n template: this.hasRight(RoleClaimsEnum.AdminSupport) ? NotifySupportTemplateEnum.CASE_SUPPORT_RESPONSE : NotifySupportTemplateEnum.CASE_NOTIFY_SUPPORT,\r\n caseComment: comments[index]\r\n } as NotifySupportRequest;\r\n \r\n await this.caseService.SendNotifySupport(request);\r\n\r\n this.setState({ editComment: false, openMenuItem: false, caseSupportComments: comments });\r\n } catch (err) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n displayText = (text: string) => {\r\n const lines = text.split('\\n');\r\n\r\n return lines.map((item: string, index: number) => (\r\n

\r\n {item}\r\n

\r\n ));\r\n };\r\n\r\n renderCaseComments = () => {\r\n const caseSupportComments = [] as any[];\r\n if (this.state.caseSupportComments.length !== 0) {\r\n this.state.caseSupportComments.forEach((comment: CaseComment, index: number) => {\r\n caseSupportComments.push(\r\n
\r\n {index === 0 ? null : }\r\n
\r\n \r\n {moment.utc(comment.date).local().format('L')}\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n {moment.utc(comment.date).local().format('LT')}\r\n \r\n
\r\n {comment.user!.firstName +\r\n ' ' +\r\n comment.user!.lastName +\r\n ' (' +\r\n comment.user!.organization!.hoName +\r\n ')'}\r\n
\r\n
\r\n
\r\n
\r\n {this.state.selectedCaseCommentId !== comment.id ||\r\n this.state.editComment === false ? (\r\n this.displayText(comment.text)\r\n ) : (\r\n \r\n
\r\n ) => {\r\n this.setState({ editTextComment: e.currentTarget.value });\r\n }}\r\n validators={['required']}\r\n errorMessages={[]}\r\n />\r\n
\r\n
\r\n {\r\n this.setState({ editComment: false, openMenuItem: false });\r\n }}\r\n >\r\n {this.translatorService.Tranlate('CANCEL', 'Anuleaza')}\r\n \r\n \r\n
\r\n
\r\n )}\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n });\r\n }\r\n return caseSupportComments;\r\n };\r\n\r\n addCaseComment = async () => {\r\n if (this.state.commentText !== null) {\r\n try {\r\n const adminSupport = this.hasRight(RoleClaimsEnum.AdminSupport);\r\n const userSupportComment = this.state.caseSupportComments.find((item) => item.commentTypeCode === CommentTypeCode.SUPPORT_REQUEST && item.userId !== this.props.appState.appUser!.id);\r\n \r\n if (adminSupport && !userSupportComment) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('NO_USER_FOUNDED', 'Nu s-a gasit utilizatorul!'), {\r\n variant: 'error'\r\n });\r\n return;\r\n }\r\n\r\n const request = {\r\n caseId: this.props.caseSettingsState.case!.id,\r\n toUserId: adminSupport ? userSupportComment?.userId : null,\r\n template: adminSupport ? NotifySupportTemplateEnum.CASE_SUPPORT_RESPONSE : NotifySupportTemplateEnum.CASE_NOTIFY_SUPPORT,\r\n caseComment: {\r\n id: 0,\r\n caseId: this.props.caseSettingsState.case!.id,\r\n text: this.state.commentText,\r\n commentTypeCode: this.state.selectedCommentType,\r\n isFromSupportTab: true\r\n } as CaseComment\r\n } as NotifySupportRequest;\r\n const caseComment = await this.caseService.SendNotifySupport(request);\r\n\r\n caseComment.user = this.props.appState.appUser;\r\n const caseComments = [caseComment, ...this.state.caseSupportComments];\r\n\r\n this.setState({\r\n commentText: '',\r\n caseSupportComments: caseComments\r\n });\r\n\r\n this.props.LoadComments();\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n this.appUserService = (this.context as AppContext).appUserService;\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n
\r\n
\r\n
\r\n \r\n
\r\n ) => {\r\n this.setState({ commentText: e.currentTarget.value });\r\n }}\r\n validators={['required']}\r\n errorMessages={[]}\r\n />\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n {this.renderCaseComments()}\r\n \r\n
\r\n
\r\n
\r\n
\r\n ) : null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => {\r\n return { caseSettingsState: state.caseSettings, appState: state.app };\r\n },\r\n AppActionCreators\r\n)(withSnackbar(CaseDetailsCaseSupportCommentsTab as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n ApplicationState,\r\n AppState,\r\n CaseSettingsActionCreators,\r\n CaseSettingsState,\r\n VehicleActionCreators,\r\n VehicleState\r\n} from '../../store';\r\nimport * as R from 'ramda';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport {\r\n Box, Tabs, Tab, Button, Typography, Modal, Dialog, DialogContent, DialogActions, DialogContentText,\r\n} from '@material-ui/core';\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { IOrganizationService } from '../../services/Interfaces/IOrganizationService';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { PageTitle } from '../../layout-components';\r\nimport { Card } from 'reactstrap';\r\nimport TabPanel from '../_shared/Tabs';\r\nimport CaseDetailsCaseTab from './CaseDetailsCaseTab';\r\nimport CaseDetailsCommentsTab from './CaseDetailsCommentsTab';\r\nimport CaseDetailsHistoryTab from './CaseDetailsHistoryTab';\r\nimport { isNullOrUndefined } from 'util';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport { setLastOfferRejected } from '../agenda/agenda.requests';\r\nimport { CaseCalculationHistory } from '../../interfaces/Case';\r\nimport _ from 'lodash';\r\nimport { CalculationTypeCode } from '../../helpers/Constants';\r\nimport { getDay } from '../../utils/appointments';\r\nimport moment from 'moment';\r\nimport { Utils } from '../../helpers/Utils';\r\nimport CaseDetailsSupportCommentsTab from './CaseDetailsSupportCommentsTab';\r\n\r\ninterface ICaseDetailsState {\r\n selectedTab: number;\r\n rejectedOfferModal: boolean;\r\n caseCalculations: CaseCalculationHistory[]\r\n}\r\n\r\ntype ICaseDetailsProps = {\r\n caseSettingsState: CaseSettingsState;\r\n vehicleState: VehicleState;\r\n appState: AppState;\r\n} & typeof CaseSettingsActionCreators &\r\n typeof VehicleActionCreators &\r\n ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass CaseDetails extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private organizationService!: IOrganizationService;\r\n private caseService!: ICaseService;\r\n\r\n static contextType = ApplicationContext;\r\n state = {\r\n selectedTab: 0,\r\n rejectedOfferModal: false,\r\n caseCalculations: []\r\n } as ICaseDetailsState;\r\n\r\n public async componentDidMount() {\r\n const caseId = Number.parseInt(this.props.match.params.id);\r\n\r\n if (Number.isNaN(caseId)) {\r\n return;\r\n }\r\n\r\n await this.props.SetCaseSettings(caseId);\r\n await this.props.setVehicleObject(null);\r\n let resultCaseCalculations: CaseCalculationHistory[] = [];\r\n if (this.props.caseSettingsState.caseSettings?.workflow?.isCarfixIntegration) {\r\n const res = await this.caseService.GetCaseCalculationHistories(caseId)\r\n const caseCalculationCopy = _.sortBy(_.cloneDeep(res), 'date').reverse();\r\n resultCaseCalculations = _.cloneDeep(_.filter(caseCalculationCopy, function (caseCalculation) {\r\n return caseCalculation.calculationType.code == CalculationTypeCode.ALT;\r\n }));\r\n }\r\n if (!isNullOrUndefined(this.props.caseSettingsState.case!.vehicleId)) {\r\n await this.props.setVehicle(this.props.caseSettingsState.case!.vehicleId);\r\n }\r\n\r\n let selectedTab = 0;\r\n if (this.props.match.url.toLowerCase() === '/cases/' + caseId + '/comments') {\r\n selectedTab = 1;\r\n }\r\n\r\n this.setState({ selectedTab: selectedTab, rejectedOfferModal: this?.props?.caseSettingsState?.case?.lastOfferRejected || false, caseCalculations: resultCaseCalculations });\r\n }\r\n\r\n onTabChange = (event: any, newValue: number) => {\r\n this.setState({ selectedTab: newValue });\r\n };\r\n\r\n private getTitleDescription(): string | null {\r\n const { make, model, version, plateNumber } = this.props.vehicleState?.vehicle || {};\r\n const { brand, displayName } = this.props.caseSettingsState.case?.caseVehicle?.model || {};\r\n const { plateNumber: casePlateNumber } = this.props.caseSettingsState.case?.caseVehicle || {};\r\n\r\n const carMake = make?.name || brand || '';\r\n const carModel = model?.name || '';\r\n const carVersion = version || displayName || '';\r\n const carPlateNumber = plateNumber || casePlateNumber || '';\r\n\r\n return carMake && carVersion ? `${carMake} ${carModel} ${carVersion} ${carPlateNumber}` : null;\r\n }\r\n\r\n private getStatusDescription(): string | null {\r\n const { caseStatus } = this.props.caseSettingsState.case?.caseStatus || {};\r\n return caseStatus ? `${caseStatus.displayName}` : null;\r\n }\r\n\r\n renderOfferPriceAndDate = (calculation: CaseCalculationHistory) => {\r\n if (!calculation) {\r\n return ''\r\n }\r\n let result = '0';\r\n if (!R.isNil(calculation.amount)) {\r\n result = calculation.amount?.toFixed(2);\r\n }\r\n const price = Utils.countryNumberFormat(result, this.props.appState.appUser?.organization?.country ?? null) + ' ';\r\n const date = moment.utc(calculation.date).local().format(this.props.appState.longDateFormat);\r\n return `${price} ${calculation.currencyCode} (${this.translatorService.Tranlate('GENERATE_IN', 'generata in')} ${date})`\r\n }\r\n\r\n renderLastOfferApproved = () => {\r\n const indexOfLastOfferApproved = this.state.caseCalculations?.findIndex((calculation: CaseCalculationHistory) => calculation.hasBeenApproved);\r\n if (indexOfLastOfferApproved !== -1) {\r\n return \r\n {`${this.translatorService.Tranlate(\r\n 'LAST_OFFER_APPROVED',\r\n 'Reparatia va continua cu ultima calculatie acceptata, in valoare de'\r\n )} ${this.state.caseCalculations[indexOfLastOfferApproved] ? this.renderOfferPriceAndDate(this.state.caseCalculations[indexOfLastOfferApproved]) : ''}`}\r\n\r\n \r\n }\r\n return <>\r\n }\r\n\r\n renderlastOfferRejectedModal = () => {\r\n return this.setState({ rejectedOfferModal: false })}>\r\n this.setState({ rejectedOfferModal: false })}>\r\n \r\n \r\n {`${this.translatorService.Tranlate(\r\n 'LAST_OFFER_REJECTED',\r\n 'Clientul a REFUZAT oferta cu pretul'\r\n )} ${this.state?.caseCalculations?.length > 0 && !this.state.caseCalculations[0]?.hasBeenApproved ? this.renderOfferPriceAndDate(this.state.caseCalculations[0]) : ''}`}\r\n \r\n {this.renderLastOfferApproved()}\r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n\r\n renderLastStatus = () => {\r\n const text = this.getStatusDescription();\r\n return \r\n
\r\n \r\n \r\n {text}\r\n \r\n \r\n
\r\n
\r\n }\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n const description = this.getTitleDescription();\r\n\r\n if (isNullOrUndefined(this.props.caseSettingsState.caseSettings)) {\r\n return (\r\n
\r\n \r\n
\r\n );\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n {this.translatorService.Tranlate('CASE_STATUS_LABEL', 'Status: ')}\r\n \r\n {this.renderLastStatus()}\r\n \r\n }\r\n />\r\n {this?.state.rejectedOfferModal ? this.renderlastOfferRejectedModal() : null}\r\n {!this.props.caseSettingsState.isLoading ? (\r\n \r\n \r\n \r\n \r\n {!this.props.caseSettingsState.caseSettings.workflow.hideComments && (\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n ) : null}\r\n
\r\n \r\n
\r\n {!this.props.caseSettingsState.isLoading && !this.props?.vehicleState?.vehicle?.loading ? (\r\n
\r\n \r\n \r\n \r\n {!this.props.caseSettingsState.caseSettings.workflow.hideComments && (\r\n \r\n \r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n ) : null}\r\n\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => {\r\n return { caseSettingsState: state.caseSettings, vehicleState: state.vehicle, appState: state.app };\r\n },\r\n { ...CaseSettingsActionCreators, ...VehicleActionCreators }\r\n)(withSnackbar(CaseDetails as any));\r\n","import { Moment } from 'moment';\r\nimport { VehicleInventoryAgeFilterEnum } from '../../enums/VehicleInventoryAgeFilterEnum';\r\nimport { FiltersSelectItem } from './FiltersSelectItem';\r\n\r\nexport interface VehicleFiltersState {\r\n startDate: Moment;\r\n endDate: Moment;\r\n selectedOrganisations: FiltersSelectItem[];\r\n makeId?: number;\r\n modelId?: number;\r\n fuelId?: number;\r\n locationId?: number;\r\n transmissionTypeId?: number;\r\n tractionTypeId?: number;\r\n inventoryAgeFilter?: VehicleInventoryAgeFilterEnum;\r\n statusId?: number;\r\n technicalConditionId?: number;\r\n}\r\n\r\nexport enum VehicleMainFilterStateKeys {\r\n START_DATE = 'startDate',\r\n END_DATE = 'endDate',\r\n SELECTED_ORGANIZATIONS = 'selectedOrganisations'\r\n}\r\n\r\nexport enum VehicleFilterStateKeys {\r\n MAKE_ID = 'makeId',\r\n LOCATION_ID = 'locationId',\r\n MODEL_ID = 'modelId',\r\n TECHNICAL_CONDITION_ID = 'technicalConditionId',\r\n STATUS_ID = 'statusId',\r\n INVENTORY_AGE_FILTER = 'inventoryAgeFilter',\r\n FUEL_ID = 'fuelId',\r\n TRANSMISSION_TYPE_ID = 'transmissionTypeId',\r\n TRACTION_TYPE_ID = 'tractionTypeId'\r\n}\r\n","import React, { useCallback, useContext, useEffect, useMemo, useState } from 'react';\r\nimport { Button, Card, Chip, Grid } from '@material-ui/core';\r\nimport {\r\n VehicleFiltersState,\r\n VehicleFilterStateKeys\r\n} from '../../../interfaces/Dashboard/VehicleFiltersState';\r\nimport isNil from 'lodash/isNil';\r\nimport { VehicleResult } from '../../../interfaces/Dashboard/VehicleResult';\r\nimport { DashboardFilter } from '../../../interfaces/Dashboard/DashboardFilter';\r\nimport { ApplicationContext } from '../../../context/Contexts';\r\n\r\ninterface Props {\r\n filters: VehicleFiltersState;\r\n data?: VehicleResult;\r\n setFiltersValueByName(name: string, value: any): void;\r\n resetInventoryFilters(): void;\r\n}\r\n\r\nconst VehicleDashboardAppliedFilters: React.FC = ({\r\n filters,\r\n data,\r\n setFiltersValueByName,\r\n resetInventoryFilters\r\n}) => {\r\n const [orgName, setOrgName] = useState();\r\n const context = useContext(ApplicationContext);\r\n\r\n const lessThan = context.translatorService.Tranlate('DASHBOARD_LESS_THAN', 'mai putin de');\r\n const days = context.translatorService.Tranlate('DASHBOARD_DAYS', 'zile');\r\n\r\n const appliedFilters = useMemo(() => {\r\n if (!data || !filters) {\r\n return;\r\n }\r\n const result: DashboardFilter[] = [];\r\n Object.values(VehicleFilterStateKeys).forEach((value) => {\r\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\r\n // @ts-ignore\r\n const id = filters[value];\r\n if (!isNil(id)) {\r\n result.push({ id: id, propertyName: value });\r\n }\r\n });\r\n\r\n for (const item of result) {\r\n switch (item.propertyName) {\r\n case VehicleFilterStateKeys.MAKE_ID:\r\n item.displayName = data.byMaker.find(({ id }) => id === item.id)?.displayName;\r\n break;\r\n case VehicleFilterStateKeys.LOCATION_ID:\r\n item.displayName = orgName;\r\n break;\r\n case VehicleFilterStateKeys.MODEL_ID:\r\n item.displayName = data.byModel.find(({ id }) => id === item.id)?.displayName;\r\n break;\r\n case VehicleFilterStateKeys.TECHNICAL_CONDITION_ID:\r\n item.displayName = data.byTechnicalCondition.find(\r\n ({ id }) => id === item.id\r\n )?.displayName;\r\n break;\r\n case VehicleFilterStateKeys.STATUS_ID:\r\n item.displayName = data.byStatusType.find(({ id }) => id === item.id)?.displayName;\r\n break;\r\n case VehicleFilterStateKeys.INVENTORY_AGE_FILTER:\r\n item.displayName = `${lessThan} ${\r\n data.byInventoryAge.find(({ id }) => id === item.id)?.displayName\r\n } ${days}`;\r\n break;\r\n case VehicleFilterStateKeys.FUEL_ID:\r\n item.displayName = data.byFuelType.find(({ id }) => id === item.id)?.displayName;\r\n break;\r\n case VehicleFilterStateKeys.TRANSMISSION_TYPE_ID:\r\n item.displayName = data.byTransmissionType.find(({ id }) => id === item.id)?.displayName;\r\n break;\r\n case VehicleFilterStateKeys.TRACTION_TYPE_ID:\r\n item.displayName = data.byTractionType.find(({ id }) => id === item.id)?.displayName;\r\n break;\r\n }\r\n }\r\n\r\n return result;\r\n }, [data, days, filters, lessThan, orgName]);\r\n\r\n useEffect(() => {\r\n const getOrgName = async () => {\r\n if (!isNil(filters.locationId)) {\r\n const organization = await context.organizationService.GetOrganization(filters.locationId);\r\n\r\n if (organization) {\r\n setOrgName(organization.displayName);\r\n }\r\n } else {\r\n setOrgName(undefined);\r\n }\r\n };\r\n\r\n getOrgName();\r\n }, [context.organizationService, filters.locationId]);\r\n\r\n const handleDelete = useCallback(\r\n (propertyName: string) => {\r\n setFiltersValueByName(propertyName, undefined);\r\n },\r\n [setFiltersValueByName]\r\n );\r\n\r\n if (!appliedFilters?.length) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n {context.translatorService.Tranlate(\r\n 'DASHBOARD_APPLIED_FILTERS',\r\n 'Filtre aplicate1'\r\n )}\r\n
\r\n
\r\n
\r\n \r\n {context.translatorService.Tranlate('DASHBOARD_RESET_FILTERS', 'Reseteaza filtre1')}\r\n \r\n
\r\n
\r\n {appliedFilters.map((item: DashboardFilter, index) => {\r\n return (\r\n handleDelete(item.propertyName)}\r\n />\r\n );\r\n })}\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default VehicleDashboardAppliedFilters;\r\n","import { isNil } from 'ramda';\r\nimport React, { useContext, useMemo, useState } from 'react';\r\nimport ReactApexChart from 'react-apexcharts';\r\nimport { ApplicationContext } from '../../../context/Contexts';\r\n\r\nimport { DashboardItem } from '../../../interfaces/Dashboard/DashboardItem';\r\n\r\ninterface Props {\r\n title: string;\r\n selectedId: number;\r\n items: DashboardItem[];\r\n handleBarClick(dataIndex?: number): void;\r\n}\r\n\r\nconst VehicleBarChart: React.FC = ({ title, selectedId, items = [], handleBarClick }) => {\r\n const context = useContext(ApplicationContext);\r\n\r\n const numberOfVehicles = context.translatorService.Tranlate(\r\n 'DASHBOARD_VEHICLE_COUNT',\r\n 'Numar vehicule'\r\n );\r\n\r\n const maxValue = Math.max(...items.map((item) => item.value));\r\n\r\n const series = useMemo(() => {\r\n return [\r\n {\r\n name: numberOfVehicles,\r\n data: items.map((i) => i.value)\r\n }\r\n ];\r\n }, [items, numberOfVehicles]);\r\n\r\n const options = useMemo(() => {\r\n const categories = items.map((i) => i.displayName);\r\n return {\r\n chart: {\r\n type: 'bar',\r\n events: {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n dataPointSelection: (event: any, chartContext: any, config: any) => {\r\n if (!isNil(config.dataPointIndex)) {\r\n handleBarClick(config.dataPointIndex);\r\n }\r\n }\r\n },\r\n toolbar: {\r\n show: false\r\n },\r\n selection: {\r\n enabled: true,\r\n type: 'x',\r\n fill: {\r\n color: '#24292e',\r\n opacity: 0.1\r\n }\r\n }\r\n },\r\n legend: {\r\n show: false\r\n },\r\n plotOptions: {\r\n bar: {\r\n borderRadius: 4,\r\n horizontal: true,\r\n distributed: true\r\n }\r\n },\r\n dataLabels: {\r\n enabled: true\r\n },\r\n xaxis: {\r\n categories,\r\n tickAmount: maxValue === 1 || (maxValue === 2 && maxValue),\r\n labels: {\r\n formatter: function (val: number) {\r\n return val.toFixed(0);\r\n }\r\n }\r\n },\r\n yaxis: {\r\n labels: {\r\n formatter: function (val: any) {\r\n return val;\r\n }\r\n }\r\n }\r\n };\r\n }, [items, handleBarClick]);\r\n\r\n const chartHeight = useMemo(() => {\r\n return items.length * 30 + 100;\r\n }, [items.length]);\r\n\r\n const selectedItemName = useMemo(() => {\r\n const item = items.find(({ id }) => id === selectedId);\r\n\r\n return item?.displayName;\r\n }, [items, selectedId]);\r\n\r\n return (\r\n
\r\n
\r\n {!selectedItemName ? title : `${title}: ${selectedItemName}`}\r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default VehicleBarChart;\r\n","import React, { useContext } from 'react';\r\nimport { Card, Grid } from '@material-ui/core';\r\nimport { ApplicationContext } from '../../../context/Contexts';\r\n\r\ninterface Props {\r\n count: number;\r\n averageMileage: number;\r\n averageVehicleAge: number;\r\n}\r\n\r\nconst VehicleAverages: React.FC = ({ count, averageMileage, averageVehicleAge }) => {\r\n const context = useContext(ApplicationContext);\r\n\r\n return (\r\n <>\r\n \r\n \r\n
\r\n
{context.translatorService.Tranlate('DASHBOARD_TOTAL_INVENTORY', 'Total stoc')}
\r\n

{count}

\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n {context.translatorService.Tranlate('DASHBOARD_AVERAGE_MILEAGE', 'Rulaj mediu')}\r\n
\r\n

{`${averageMileage} km`}

\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n {context.translatorService.Tranlate('DASHBOARD_AVERAGE_VEHICLE_AGE', 'Varsta medie')}\r\n
\r\n

{`${averageVehicleAge} ani`}

\r\n
\r\n
\r\n
\r\n \r\n );\r\n};\r\n\r\nexport default VehicleAverages;\r\n","import { isNil } from 'lodash';\r\nimport React, { useContext, useMemo } from 'react';\r\nimport ReactApexChart from 'react-apexcharts';\r\nimport { ApplicationContext } from '../../../context/Contexts';\r\n\r\nimport { DashboardItem } from '../../../interfaces/Dashboard/DashboardItem';\r\n\r\ninterface Props {\r\n title: string;\r\n items: DashboardItem[];\r\n handleBarClick(dataIndex?: number): void;\r\n}\r\nconst VehicleAverageAgeBarChart: React.FC = ({ title, items, handleBarClick }) => {\r\n const context = useContext(ApplicationContext);\r\n\r\n const vehicleCount = context.translatorService.Tranlate(\r\n 'DASHBOARD_VEHICLE_COUNT',\r\n 'Numar vehicule'\r\n );\r\n const lessThan = context.translatorService.Tranlate('DASHBOARD_LESS_THAN', 'mai putin de');\r\n const days = context.translatorService.Tranlate('DASHBOARD_DAYS', 'zile');\r\n const series = useMemo(() => {\r\n return [\r\n {\r\n name: vehicleCount,\r\n data: items.slice(0, -1).map((i) => i.value)\r\n }\r\n ];\r\n }, [items, vehicleCount]);\r\n\r\n const options = useMemo(() => {\r\n const categories = items.slice(0, -1).map((i) => `${lessThan} ${i.displayName} ${days}`);\r\n return {\r\n chart: {\r\n type: 'bar',\r\n events: {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n dataPointSelection: (event: any, chartContext: any, config: any) => {\r\n if (!isNil(config.dataPointIndex)) {\r\n handleBarClick(config.dataPointIndex);\r\n }\r\n }\r\n },\r\n height: 500,\r\n toolbar: {\r\n show: false\r\n }\r\n },\r\n legend: {\r\n show: false\r\n },\r\n plotOptions: {\r\n bar: {\r\n borderRadius: 4,\r\n distributed: true\r\n }\r\n },\r\n dataLabels: {\r\n enabled: true\r\n },\r\n xaxis: {\r\n categories\r\n },\r\n yaxis: {\r\n labels: {\r\n formatter: function (val: any) {\r\n return val;\r\n }\r\n }\r\n }\r\n };\r\n }, [days, handleBarClick, items, lessThan]);\r\n\r\n return (\r\n
\r\n
{title}
\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default VehicleAverageAgeBarChart;\r\n","import React, { useCallback, useContext, useEffect, useState } from 'react';\r\nimport { MapContainer, TileLayer, Marker } from 'react-leaflet';\r\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\r\n// @ts-ignore\r\nimport EnhancedMarker from 'react-leaflet-enhanced-marker';\r\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\r\n// @ts-ignore\r\nimport GeocoderArcGIS from 'geocoder-arcgis';\r\nimport { KeyValuePair } from '../../../interfaces/Dashboard/KeyValuePair';\r\nimport Loader from '../../Loader';\r\nimport L from 'leaflet';\r\n\r\nimport 'leaflet/dist/leaflet.css';\r\nimport icon from 'leaflet/dist/images/marker-icon.png';\r\nimport iconShadow from 'leaflet/dist/images/marker-shadow.png';\r\nimport { Tooltip } from '@material-ui/core';\r\nimport { ApplicationContext } from '../../../context/Contexts';\r\n\r\nconst DefaultIcon = L.icon({\r\n iconUrl: icon,\r\n shadowUrl: iconShadow,\r\n iconSize: [25, 41],\r\n iconAnchor: [15, 25]\r\n});\r\n\r\nL.Marker.prototype.options.icon = DefaultIcon;\r\n\r\ninterface CustomMarkerProps {\r\n count: number;\r\n selected: boolean;\r\n name: string;\r\n}\r\n\r\nconst CustomMarker: React.FC = ({ count, selected, name }) => {\r\n const markerStyle = {\r\n backgroundColor: selected ? '#00008B' : '#207AC9',\r\n color: 'white',\r\n display: 'flex',\r\n justifyContent: 'center',\r\n width: '80px',\r\n height: '30px',\r\n alignItems: 'center',\r\n borderRadius: '10px'\r\n };\r\n\r\n return (\r\n \r\n
{`${count}`}
\r\n
\r\n );\r\n};\r\n\r\ninterface MapMarker {\r\n lat: number;\r\n long: number;\r\n count: number;\r\n id: number;\r\n name: string;\r\n address: string;\r\n}\r\n\r\ninterface Props {\r\n vehicleLocationCount: KeyValuePair[];\r\n locationId?: number;\r\n setLocationId(locationId?: number): void;\r\n parentCallback: (values: any[]) => any;\r\n}\r\n\r\nconst VehicleMap: React.FC = ({\r\n vehicleLocationCount = [],\r\n locationId,\r\n setLocationId,\r\n parentCallback\r\n}) => {\r\n const [mapMarkers, setMapMarkers] = useState([]);\r\n const [mapLoading, setMapLoading] = useState(false);\r\n\r\n const context = useContext(ApplicationContext);\r\n\r\n const handleMapMarkerClick = useCallback(\r\n (id: number) => {\r\n if (locationId === id) {\r\n setLocationId(undefined);\r\n } else {\r\n setLocationId(id);\r\n }\r\n },\r\n [locationId, setLocationId]\r\n );\r\n\r\n useEffect(() => {\r\n const getGeoData = async () => {\r\n setMapLoading(true);\r\n const geocoder = new GeocoderArcGIS();\r\n const markers: MapMarker[] = [];\r\n for (const item of vehicleLocationCount) {\r\n if (item.key) {\r\n const organization = await context.organizationService.GetOrganization(item.key);\r\n\r\n if (!organization) {\r\n continue;\r\n }\r\n\r\n const params = {\r\n countryCode: 'ro',\r\n city: organization.city,\r\n address: organization.address\r\n };\r\n\r\n try {\r\n const response = await geocoder.findAddressCandidates(params);\r\n\r\n if (response && response.candidates.length) {\r\n markers.push({\r\n count: item.value,\r\n address: response.candidates[0].address,\r\n lat: response.candidates[0].location.y,\r\n long: response.candidates[0].location.x,\r\n name: organization.displayName,\r\n id: item.key\r\n });\r\n }\r\n } catch {\r\n continue;\r\n }\r\n }\r\n }\r\n setMapMarkers(markers);\r\n parentCallback(markers);\r\n setMapLoading(false);\r\n };\r\n\r\n if (vehicleLocationCount.length) {\r\n getGeoData();\r\n }\r\n }, [context.organizationService, vehicleLocationCount]);\r\n\r\n if (mapLoading) {\r\n return ;\r\n }\r\n\r\n return (\r\n \r\n \r\n {mapMarkers.map(({ lat, long, count, id, name }, index) => {\r\n return (\r\n <>\r\n \r\n }\r\n position={[lat, long]}\r\n key={index}\r\n eventHandlers={{\r\n click: () => {\r\n handleMapMarkerClick(id);\r\n }\r\n }}\r\n />\r\n \r\n );\r\n })}\r\n \r\n );\r\n};\r\n\r\nexport default VehicleMap;\r\n","import { isNil } from 'lodash';\r\nimport React, { useMemo } from 'react';\r\nimport ReactApexChart from 'react-apexcharts';\r\nimport { DashboardItem } from '../../../interfaces/Dashboard/DashboardItem';\r\n\r\ninterface Props {\r\n title: string;\r\n items: DashboardItem[];\r\n handleDonutClick(dataIndex?: number): void;\r\n}\r\n\r\nconst VehicleDonutChart: React.FC = ({ title, items, handleDonutClick }) => {\r\n const series = useMemo(() => {\r\n return items.map((i) => i.value);\r\n }, [items]);\r\n\r\n const options = useMemo(() => {\r\n const labels = items.map((i) => i.displayName);\r\n return {\r\n chart: {\r\n type: 'donut',\r\n events: {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n dataPointSelection: (event: any, chartContext: any, config: any) => {\r\n if (!isNil(config.dataPointIndex)) {\r\n handleDonutClick(config.dataPointIndex);\r\n }\r\n }\r\n }\r\n },\r\n labels,\r\n legend: {\r\n position: 'bottom'\r\n },\r\n responsive: [\r\n {\r\n breakpoint: 480,\r\n options: {\r\n chart: {\r\n width: 200\r\n },\r\n legend: {\r\n position: 'bottom'\r\n }\r\n }\r\n }\r\n ]\r\n };\r\n }, [handleDonutClick, items]);\r\n\r\n return (\r\n
\r\n
{title}
\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default VehicleDonutChart;\r\n","import React, { useContext, useMemo } from 'react';\r\n\r\nimport MaterialTable from '@material-table/core';\r\nimport { getLocalization, MaterialTableIcons } from '../../_shared/TableSettings';\r\nimport { ApplicationContext } from '../../../context/Contexts';\r\nimport { Paper } from '@material-ui/core';\r\nimport { DashboardGroupedItemDto } from '../../../interfaces/Dashboard/VehicleResult';\r\n\r\ninterface Props {\r\n items: DashboardGroupedItemDto[];\r\n technicalConditionId?: number;\r\n setTechnicalCondtionId(technicalConditionId?: number): void;\r\n}\r\n\r\nconst VehicleConditionTable: React.FC = ({\r\n items,\r\n technicalConditionId,\r\n setTechnicalCondtionId\r\n}) => {\r\n const context = useContext(ApplicationContext);\r\n\r\n const exterior = context.translatorService.Tranlate('DASHBOARD_EXTERIOR', 'Exterior');\r\n const interior = context.translatorService.Tranlate('DASHBOARD_INTERIOR', 'Interior');\r\n const mechanical = context.translatorService.Tranlate('DASHBOARD_MECHANICAL', 'Mecanica');\r\n\r\n const columns = useMemo(() => {\r\n return [\r\n { title: '', field: 'displayName' },\r\n {\r\n title: interior,\r\n field: 'byInConditionValue'\r\n },\r\n {\r\n title: exterior,\r\n field: 'byOutCondition'\r\n },\r\n {\r\n title: mechanical,\r\n field: 'byTehnicalConditionValue'\r\n }\r\n ];\r\n }, [exterior, interior, mechanical]);\r\n\r\n return (\r\n
\r\n ({\r\n backgroundColor: technicalConditionId === rowData.id ? '#267DC3' : '#FFF',\r\n color: technicalConditionId === rowData.id ? '#FFF' : '#000'\r\n })\r\n }}\r\n components={{\r\n Container: (props) => ,\r\n Pagination: () => null\r\n }}\r\n onRowClick={(evt, selectedRow) => setTechnicalCondtionId(selectedRow?.id)}\r\n />\r\n
\r\n );\r\n};\r\n\r\nexport default VehicleConditionTable;\r\n","import React, { useCallback, useContext, useMemo } from 'react';\r\n\r\nimport MaterialTable from '@material-table/core';\r\nimport { DashboardItem } from '../../../interfaces/Dashboard/DashboardItem';\r\nimport { getLocalization, MaterialTableIcons } from '../../_shared/TableSettings';\r\nimport { ApplicationContext } from '../../../context/Contexts';\r\nimport { Paper } from '@material-ui/core';\r\nimport sumBy from 'lodash/sumBy';\r\n\r\ninterface Props {\r\n byInventoryAge: DashboardItem[];\r\n withMissingInfo: number;\r\n items: DashboardItem[];\r\n statusId?: number;\r\n setStatusId(statusId?: number): void;\r\n}\r\n\r\nconst VehicleStockTable: React.FC = ({\r\n items,\r\n statusId,\r\n setStatusId,\r\n byInventoryAge,\r\n withMissingInfo\r\n}) => {\r\n const context = useContext(ApplicationContext);\r\n\r\n const vehicleCount = context.translatorService.Tranlate(\r\n 'DASHBOARD_VEHICLE_COUNT',\r\n 'Numar vehicule'\r\n );\r\n const dashboardState = context.translatorService.Tranlate('DASHBOARD_STATE', 'Status');\r\n const lackingInformation = context.translatorService.Tranlate(\r\n 'DASHBOARD_LACKING_INFORMATION',\r\n 'Cu informatii lipsa'\r\n );\r\n const moreThan90Days = context.translatorService.Tranlate(\r\n 'DASHBOARD_INVENTORY_MORE_THAN_90_DAYS',\r\n 'In stoc de peste 90 zile'\r\n );\r\n\r\n const columns = useMemo(() => {\r\n return [\r\n {\r\n title: vehicleCount,\r\n field: 'value'\r\n },\r\n {\r\n title: dashboardState,\r\n field: 'displayName'\r\n }\r\n ];\r\n }, [dashboardState, vehicleCount]);\r\n\r\n const data = useMemo(() => {\r\n const nrOfVehiclesOlderThan90Days = sumBy(\r\n byInventoryAge.filter(({ id }) => id >= 4),\r\n 'value'\r\n );\r\n return [\r\n {\r\n id: 99,\r\n displayName: lackingInformation,\r\n value: withMissingInfo\r\n },\r\n {\r\n id: 98,\r\n displayName: moreThan90Days,\r\n value: nrOfVehiclesOlderThan90Days\r\n },\r\n ...items\r\n ];\r\n }, [byInventoryAge, items, lackingInformation, moreThan90Days, withMissingInfo]);\r\n\r\n const handleBarClick = useCallback(\r\n (rowId?: number) => {\r\n if (rowId === 99 || rowId === 98) {\r\n return;\r\n }\r\n\r\n setStatusId(rowId);\r\n },\r\n [setStatusId]\r\n );\r\n\r\n const getRowBackgroundColor = useCallback(\r\n (rowId: number) => {\r\n if (rowId == 98 || rowId === 99) {\r\n return '#EBECF0';\r\n }\r\n\r\n return statusId === rowId ? '#267DC3' : '#FFF';\r\n },\r\n [statusId]\r\n );\r\n\r\n const getRowColor = useCallback(\r\n (rowId: number) => {\r\n if (rowId == 98 || rowId === 99) {\r\n return '#000';\r\n }\r\n\r\n return statusId === rowId ? '#FFF' : '#000';\r\n },\r\n [statusId]\r\n );\r\n\r\n return (\r\n
\r\n ({\r\n backgroundColor: getRowBackgroundColor(rowData.id),\r\n color: getRowColor(rowData.id)\r\n })\r\n }}\r\n components={{\r\n Container: (props) => ,\r\n Pagination: () => null\r\n }}\r\n onRowClick={(evt, selectedRow) => handleBarClick(selectedRow?.id)}\r\n />\r\n
\r\n );\r\n};\r\n\r\nexport default VehicleStockTable;\r\n","import { Moment } from 'moment';\r\nimport { VehicleInventoryAgeFilterEnum } from '../../enums/VehicleInventoryAgeFilterEnum';\r\nimport { FiltersSelectItem } from './FiltersSelectItem';\r\n\r\nexport interface DashboardFiltersState {\r\n startDate: Moment;\r\n endDate: Moment;\r\n selectedOrganisations: FiltersSelectItem[];\r\n makeId?: number;\r\n modelId?: number;\r\n fuelId?: number;\r\n locationId?: number;\r\n transmissionTypeId?: number;\r\n tractionTypeId?: number;\r\n inventoryAgeFilter?: VehicleInventoryAgeFilterEnum;\r\n statusId?: number;\r\n technicalConditionId?: number;\r\n includeVat?: boolean;\r\n offerTypeId?: number;\r\n clientTypeId?: number;\r\n}\r\n\r\nexport enum DashboardMainFilterStateKeys {\r\n START_DATE = 'startDate',\r\n END_DATE = 'endDate',\r\n SELECTED_ORGANIZATIONS = 'selectedOrganisations',\r\n INCLUDE_VAT = 'includeVat'\r\n}\r\n\r\nexport enum DashboardFilterStateKeys {\r\n MAKE_ID = 'makeId',\r\n LOCATION_ID = 'locationId',\r\n MODEL_ID = 'modelId',\r\n TECHNICAL_CONDITION_ID = 'technicalConditionId',\r\n STATUS_ID = 'statusId',\r\n INVENTORY_AGE_FILTER = 'inventoryAgeFilter',\r\n FUEL_ID = 'fuelId',\r\n TRANSMISSION_TYPE_ID = 'transmissionTypeId',\r\n TRACTION_TYPE_ID = 'tractionTypeId',\r\n CLIENT_TYPE_ID = 'clientTypeId',\r\n OFFER_TYPE_ID = 'offerTypeId'\r\n}\r\n","import React, { useCallback, useContext, useEffect, useMemo, useState } from 'react';\r\nimport moment from 'moment';\r\nimport { Grid, TextField, FormControlLabel, Switch, FormLabel } from '@material-ui/core';\r\nimport { DatePicker, MuiPickersUtilsProvider } from '@material-ui/pickers';\r\nimport MomentUtils from '@date-io/moment';\r\nimport { Autocomplete } from '@material-ui/lab';\r\nimport { useSelector } from 'react-redux';\r\n\r\nimport {\r\n DashboardFiltersState,\r\n DashboardMainFilterStateKeys\r\n} from '../../interfaces/Dashboard/DashboardFiltersState';\r\nimport { FiltersSelectItem } from '../../interfaces/Dashboard/FiltersSelectItem';\r\nimport { ApplicationContext } from '../../context/Contexts';\r\nimport Loader from '../Loader';\r\n\r\ninterface Props {\r\n filters: DashboardFiltersState;\r\n setFiltersValueByName(name: string, value: any): void;\r\n vatFilterVisible?: boolean;\r\n}\r\n\r\nconst DashboardFilters: React.FC = ({\r\n filters,\r\n setFiltersValueByName,\r\n vatFilterVisible = false\r\n}) => {\r\n const {\r\n app: { dateFormat, language, appUser }\r\n } = useSelector((state: any) => state);\r\n\r\n const context = useContext(ApplicationContext);\r\n\r\n const [organizations, setOrganizations] = useState([]);\r\n\r\n const handleFiltersChange = useCallback(\r\n (value: any, name: string) => {\r\n setFiltersValueByName(name, value);\r\n },\r\n [setFiltersValueByName]\r\n );\r\n\r\n useEffect(() => {\r\n const loadOrganizations = async () => {\r\n const organizations = await context.organizationService.GetOrganizationsByHO(\r\n appUser.hoId,\r\n null\r\n );\r\n\r\n if (organizations.length) {\r\n const selectItems = organizations.map(({ id, name, parent }) => {\r\n return { id, name, parentId: parent ? parent.id : undefined };\r\n });\r\n\r\n if (selectItems.length) {\r\n setOrganizations(selectItems);\r\n }\r\n }\r\n };\r\n\r\n loadOrganizations();\r\n }, [appUser.hoId, context.organizationService]);\r\n\r\n const getAllChildren = useCallback(\r\n (data: FiltersSelectItem[], parentId: number) => {\r\n const children = organizations.filter((i) => i.parentId === parentId);\r\n\r\n for (const child of children) {\r\n data.push(child);\r\n getAllChildren(data, child.id);\r\n }\r\n\r\n return data;\r\n },\r\n [organizations]\r\n );\r\n\r\n const availableOrganizations = useMemo(() => {\r\n const userOrganization = organizations.find((item) => item.id === appUser.organizationId);\r\n\r\n if (userOrganization) {\r\n const children = getAllChildren([], userOrganization.id);\r\n return [userOrganization, ...children];\r\n }\r\n\r\n return [];\r\n }, [appUser.organizationId, getAllChildren, organizations]);\r\n\r\n useEffect(() => {\r\n const selectedItem = organizations.find((item) => item.id === appUser.organizationId);\r\n if (selectedItem) {\r\n const childItems = getAllChildren([], selectedItem.id);\r\n setFiltersValueByName(DashboardMainFilterStateKeys.SELECTED_ORGANIZATIONS, [\r\n selectedItem,\r\n ...childItems\r\n ]);\r\n }\r\n }, [appUser.organizationId, getAllChildren, organizations, setFiltersValueByName]);\r\n\r\n if (!organizations.length) {\r\n return ;\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n {\r\n handleFiltersChange(value, DashboardMainFilterStateKeys.START_DATE);\r\n }}\r\n />\r\n \r\n \r\n \r\n \r\n {\r\n handleFiltersChange(value, DashboardMainFilterStateKeys.END_DATE);\r\n }}\r\n />\r\n \r\n \r\n \r\n \r\n handleFiltersChange(newValue, DashboardMainFilterStateKeys.SELECTED_ORGANIZATIONS)\r\n }\r\n getOptionLabel={(option: FiltersSelectItem) => option.name}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n {vatFilterVisible && (\r\n \r\n {\r\n handleFiltersChange(e.target.checked, DashboardMainFilterStateKeys.INCLUDE_VAT);\r\n }}\r\n />\r\n }\r\n label={\r\n \r\n \r\n {context.translatorService.Tranlate(\r\n 'DASHBOARD_PRICES_WITH_TAX',\r\n 'Preturi cu TVA'\r\n )}\r\n \r\n \r\n }\r\n />\r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nexport default DashboardFilters;\r\n","import { VehicleFiltersState } from '../../../interfaces/Dashboard/VehicleFiltersState';\r\n\r\nexport const SET_MAKEID = '[FILTERS] SET_MAKEID';\r\nexport const SET_MODELID = '[FILTERS] SET_MODELID';\r\nexport const SET_VALUE_BY_NAME = '[FILTERS] SET_VALUE_BY_NAME';\r\nexport const SET_TECHNICAL_CONDITION_ID = '[FILTERS] SET_TECHNICAL_CONDITION_ID';\r\nexport const SET_STATUS_ID = '[FILTERS] SET_STATUS_ID';\r\nexport const SET_INVENTORY_AGE_FILTER = '[FILTERS] SET_INVENTORY_AGE_FILTER';\r\nexport const SET_FUEL_ID = '[FILTERS] SET_FUEL_ID';\r\nexport const SET_TRANSMISSION_TYPE_ID = '[FILTERS] SET_TRANSMISSION_TYPE_ID';\r\nexport const SET_TRACTION_TYPE_ID = '[FILTERS] SET_TRACTION_TYPE_ID';\r\nexport const SET_LOCATION_ID = '[FILTERS] SET_LOCATION_ID';\r\nexport const RESET_INVENTORY_FILTERS = '[FILTERS] RESET_INVENTORY_FILTERS';\r\n\r\nexport const vehicleDashboardReducer = (state: VehicleFiltersState, action: any) => {\r\n switch (action.type) {\r\n case SET_MAKEID:\r\n return { ...state, makeId: action.makeId !== state.makeId ? action.makeId : undefined };\r\n case SET_MODELID:\r\n return { ...state, modelId: action.modelId !== state.modelId ? action.modelId : undefined };\r\n case SET_TECHNICAL_CONDITION_ID:\r\n return {\r\n ...state,\r\n technicalConditionId:\r\n action.technicalConditionId !== state.technicalConditionId\r\n ? action.technicalConditionId\r\n : undefined\r\n };\r\n case SET_STATUS_ID:\r\n return {\r\n ...state,\r\n statusId: action.statusId !== state.statusId ? action.statusId : undefined\r\n };\r\n case SET_LOCATION_ID:\r\n return {\r\n ...state,\r\n locationId: action.locationId !== state.locationId ? action.locationId : undefined\r\n };\r\n case SET_FUEL_ID:\r\n return {\r\n ...state,\r\n fuelId: action.fuelId !== state.fuelId ? action.fuelId : undefined\r\n };\r\n case SET_TRANSMISSION_TYPE_ID:\r\n return {\r\n ...state,\r\n transmissionTypeId:\r\n action.transmissionTypeId !== state.transmissionTypeId\r\n ? action.transmissionTypeId\r\n : undefined\r\n };\r\n case SET_INVENTORY_AGE_FILTER:\r\n return {\r\n ...state,\r\n inventoryAgeFilter:\r\n action.inventoryAgeFilter !== state.inventoryAgeFilter\r\n ? action.inventoryAgeFilter\r\n : undefined\r\n };\r\n case SET_TRACTION_TYPE_ID:\r\n return {\r\n ...state,\r\n tractionTypeId:\r\n action.tractionTypeId !== state.tractionTypeId ? action.tractionTypeId : undefined\r\n };\r\n case SET_VALUE_BY_NAME:\r\n return { ...state, [action.name]: action.value };\r\n case RESET_INVENTORY_FILTERS:\r\n return {\r\n ...state,\r\n makeId: undefined,\r\n modelId: undefined,\r\n fuelId: undefined,\r\n locationId: undefined,\r\n transmissionTypeId: undefined,\r\n tractionTypeId: undefined,\r\n inventoryAgeFilter: undefined,\r\n statusId: undefined,\r\n technicalConditionId: undefined\r\n };\r\n default:\r\n return state;\r\n }\r\n};\r\n","import React, { useCallback, useContext, useEffect, useMemo, useReducer, useState } from 'react';\r\nimport moment from 'moment';\r\nimport { Card, Grid, Paper, Button } from '@material-ui/core';\r\nimport axios from 'axios';\r\n\r\nimport { ApplicationContext } from '../../../context/Contexts';\r\nimport { VehicleFilter } from '../../../interfaces/Dashboard/VehicleFilter';\r\nimport { VehicleResult } from '../../../interfaces/Dashboard/VehicleResult';\r\nimport VehicleDashboardAppliedFilters from './VehicleDashboardAppliedFilters';\r\nimport VehicleBarChart from './VehicleBarChart';\r\nimport VehicleAverages from './VehicleAverages';\r\nimport VehicleAverageAgeBarChart from './VehicleAverageAgeBarChart';\r\nimport VehicleMap from './VehicleMap';\r\nimport VehicleDonutChart from './VehicleDonutChart';\r\nimport VehicleConditionTable from './VehicleConditionTable';\r\nimport VehicleStockTable from './VehicleStockTable';\r\nimport Loader from '../../Loader';\r\nimport isNil from 'lodash/isNil';\r\nimport DashboardFilters from '../DashboardFilters';\r\nimport {\r\n vehicleDashboardReducer,\r\n RESET_INVENTORY_FILTERS,\r\n SET_FUEL_ID,\r\n SET_INVENTORY_AGE_FILTER,\r\n SET_LOCATION_ID,\r\n SET_MAKEID,\r\n SET_MODELID,\r\n SET_STATUS_ID,\r\n SET_TECHNICAL_CONDITION_ID,\r\n SET_TRACTION_TYPE_ID,\r\n SET_TRANSMISSION_TYPE_ID,\r\n SET_VALUE_BY_NAME\r\n} from './vehicleDashboardReducer';\r\nimport { useSelector } from 'react-redux';\r\nimport { PptService } from '../../../services/PptService';\r\nimport { MUITranslations } from '../../../helpers/MUITableTranslations';\r\nimport { numberFormat } from '../../../utils/numberFormat';\r\nimport _ from 'lodash';\r\n// import { creatPpt, getFilterInfo } from '../../../utils/pptFunctions';\r\n\r\nconst VehicleDashboard: React.FC = () => {\r\n const [filters, dispatch] = useReducer(vehicleDashboardReducer, {\r\n startDate: moment().add(-3, 'month'),\r\n endDate: moment(),\r\n selectedOrganisations: [],\r\n makeId: undefined,\r\n modelId: undefined,\r\n fuelId: undefined,\r\n locationId: undefined,\r\n transmissionTypeId: undefined,\r\n tractionTypeId: undefined,\r\n inventoryAgeFilter: undefined,\r\n technicalConditionId: undefined,\r\n statusId: undefined\r\n });\r\n\r\n const [data, setData] = useState();\r\n\r\n const [updatedItems, setUpdatedItems] = useState([]);\r\n\r\n const context = useContext(ApplicationContext);\r\n\r\n const constantsData = MUITranslations.GetDashboardTranslations(context.translatorService);\r\n\r\n const {\r\n app: { language, dateFormat }\r\n } = useSelector((state: any) => state);\r\n\r\n const setFiltersValueByName = useCallback((name: string, value: any) => {\r\n dispatch({ type: SET_VALUE_BY_NAME, name, value });\r\n }, []);\r\n\r\n const setMakeId = useCallback((makeId?: number) => {\r\n dispatch({ type: SET_MAKEID, makeId });\r\n }, []);\r\n\r\n const setModelId = useCallback((modelId?: number) => {\r\n dispatch({ type: SET_MODELID, modelId });\r\n }, []);\r\n\r\n const setTechnicalConditionId = useCallback((technicalConditionId?: number) => {\r\n dispatch({ type: SET_TECHNICAL_CONDITION_ID, technicalConditionId });\r\n }, []);\r\n\r\n const setStatusId = useCallback((statusId?: number) => {\r\n dispatch({ type: SET_STATUS_ID, statusId });\r\n }, []);\r\n\r\n const setInventoryAgeFilter = useCallback((inventoryAgeFilter?: number) => {\r\n dispatch({ type: SET_INVENTORY_AGE_FILTER, inventoryAgeFilter });\r\n }, []);\r\n\r\n const setFuelId = useCallback((fuelId?: number) => {\r\n dispatch({ type: SET_FUEL_ID, fuelId });\r\n }, []);\r\n\r\n const setTransmissionTypeId = useCallback((transmissionTypeId?: number) => {\r\n dispatch({ type: SET_TRANSMISSION_TYPE_ID, transmissionTypeId });\r\n }, []);\r\n\r\n const setTractionTypeId = useCallback((tractionTypeId?: number) => {\r\n dispatch({ type: SET_TRACTION_TYPE_ID, tractionTypeId });\r\n }, []);\r\n\r\n const setLocationId = useCallback((locationId?: number) => {\r\n dispatch({ type: SET_LOCATION_ID, locationId });\r\n }, []);\r\n\r\n const resetInventoryFilters = useCallback(() => {\r\n dispatch({ type: RESET_INVENTORY_FILTERS });\r\n }, []);\r\n\r\n const handleFuelTypeDonutClick = useCallback(\r\n (dataIndex?: number) => {\r\n if (!isNil(dataIndex)) {\r\n const fuelId = data?.byFuelType[dataIndex].id;\r\n if (!isNil(fuelId)) {\r\n setFuelId(fuelId);\r\n }\r\n }\r\n },\r\n [data?.byFuelType, setFuelId]\r\n );\r\n\r\n const handleTractionTypeDonutClick = useCallback(\r\n (dataIndex?: number) => {\r\n if (!isNil(dataIndex)) {\r\n const tractionTypeId = data?.byTractionType[dataIndex].id;\r\n if (!isNil(tractionTypeId)) {\r\n setTractionTypeId(tractionTypeId);\r\n }\r\n }\r\n },\r\n [data?.byTractionType, setTractionTypeId]\r\n );\r\n\r\n const handleTransmissionTypeDonutClick = useCallback(\r\n (dataIndex?: number) => {\r\n if (!isNil(dataIndex)) {\r\n const transmissionTypeId = data?.byTransmissionType[dataIndex].id;\r\n if (!isNil(transmissionTypeId)) {\r\n setTransmissionTypeId(transmissionTypeId);\r\n }\r\n }\r\n },\r\n [data?.byTransmissionType, setTransmissionTypeId]\r\n );\r\n\r\n const handleInventoryAgeBarClick = useCallback(\r\n (dataIndex?: number) => {\r\n if (!isNil(dataIndex)) {\r\n const inventoryAgeFilter = data?.byInventoryAge[dataIndex].id;\r\n if (!isNil(inventoryAgeFilter)) {\r\n setInventoryAgeFilter(inventoryAgeFilter);\r\n }\r\n }\r\n },\r\n [data?.byInventoryAge, setInventoryAgeFilter]\r\n );\r\n\r\n const handleMakeBarClick = useCallback(\r\n (dataIndex?: number) => {\r\n if (!isNil(dataIndex)) {\r\n const makeId = data?.byMaker[dataIndex].id;\r\n if (!isNil(makeId)) {\r\n setMakeId(makeId);\r\n }\r\n }\r\n },\r\n [data?.byMaker, setMakeId]\r\n );\r\n\r\n const handleModelBarClick = useCallback(\r\n (dataIndex?: number) => {\r\n if (!isNil(dataIndex)) {\r\n const modelId = data?.byModel[dataIndex].id;\r\n if (!isNil(modelId)) {\r\n setModelId(modelId);\r\n }\r\n }\r\n },\r\n [data?.byModel, setModelId]\r\n );\r\n\r\n const vehicleChartHeight = useMemo(() => {\r\n if (data?.byMaker && data.byMaker.length >= 450) {\r\n return `${data.byMaker.length * 30}`;\r\n }\r\n\r\n return '450px';\r\n }, [data?.byMaker]);\r\n\r\n useEffect(() => {\r\n const source = axios.CancelToken.source();\r\n\r\n const getData = async () => {\r\n try {\r\n const filter: VehicleFilter = {\r\n startDate: filters.startDate.utc().toDate(),\r\n endDate: filters.endDate.utc().toDate(),\r\n organizationIds: !isNil(filters.locationId)\r\n ? [filters.locationId]\r\n : filters.selectedOrganisations.map(({ id }) => id),\r\n makeIds: !isNil(filters.makeId) ? [filters.makeId] : [],\r\n modelIds: !isNil(filters.modelId) ? [filters.modelId] : [],\r\n technicalConditionId: !isNil(filters.technicalConditionId)\r\n ? filters.technicalConditionId\r\n : null,\r\n statusIds: !isNil(filters.statusId) ? [filters.statusId] : [],\r\n inventoryAgeFilters: !isNil(filters.inventoryAgeFilter)\r\n ? [filters.inventoryAgeFilter]\r\n : [],\r\n fuelTypeIds: !isNil(filters.fuelId) ? [filters.fuelId] : [],\r\n tractionTypeIds: !isNil(filters.tractionTypeId) ? [filters.tractionTypeId] : [],\r\n transmissionTypeIds: !isNil(filters.transmissionTypeId)\r\n ? [filters.transmissionTypeId]\r\n : []\r\n };\r\n\r\n if (filter.startDate && filter.endDate && filter.organizationIds.length) {\r\n const result = await context.vehicleService.GetDashboardData(filter, source.token);\r\n\r\n if (result) {\r\n const finalResult: VehicleResult = {\r\n ...result,\r\n byMaker: !isNil(filters.makeId) ? data?.byMaker || [] : result.byMaker,\r\n byModel: !isNil(filters.modelId) ? data?.byModel || [] : result.byModel,\r\n byStatusType: !isNil(filters.statusId)\r\n ? data?.byStatusType || []\r\n : result.byStatusType,\r\n byTechnicalCondition: !isNil(filters.technicalConditionId)\r\n ? data?.byTechnicalCondition || []\r\n : result.byTechnicalCondition,\r\n byInOutAndTechnicalCondition: !isNil(filters.technicalConditionId)\r\n ? data?.byInOutAndTechnicalCondition || []\r\n : result.byInOutAndTechnicalCondition,\r\n byInventoryAge: !isNil(filters.inventoryAgeFilter)\r\n ? data?.byInventoryAge || []\r\n : result.byInventoryAge,\r\n byFuelType: !isNil(filters.fuelId) ? data?.byFuelType || [] : result.byFuelType,\r\n byTransmissionType: !isNil(filters.transmissionTypeId)\r\n ? data?.byTransmissionType || []\r\n : result.byTransmissionType,\r\n byTractionType: !isNil(filters.tractionTypeId)\r\n ? data?.byTractionType || []\r\n : result.byTractionType,\r\n byOrganization: filters.locationId\r\n ? data?.byOrganization || []\r\n : result.byOrganization\r\n };\r\n setData(finalResult);\r\n }\r\n }\r\n } catch (error) {\r\n if (!axios.isCancel(error)) {\r\n throw error;\r\n }\r\n }\r\n };\r\n\r\n getData();\r\n\r\n return () => source.cancel();\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [\r\n filters.endDate,\r\n filters.startDate,\r\n filters.selectedOrganisations,\r\n context.vehicleService,\r\n filters.makeId,\r\n filters.modelId,\r\n filters.technicalConditionId,\r\n filters.statusId,\r\n filters.inventoryAgeFilter,\r\n filters.fuelId,\r\n filters.transmissionTypeId,\r\n filters.tractionTypeId,\r\n filters.locationId,\r\n language\r\n ]);\r\n\r\n const handleCallback = (childData: any) => {\r\n setUpdatedItems(childData);\r\n };\r\n const checkIfUpdatedItemsIsLoaded = () => {\r\n if (!data?.byOrganization.length) {\r\n return false;\r\n }\r\n if (!updatedItems.length) {\r\n return true;\r\n }\r\n\r\n return false;\r\n };\r\n\r\n const geTechnicalConditionFormatTable = () => {\r\n const formatTable = [];\r\n formatTable.push({\r\n title: '',\r\n render: (rowData: any) => rowData.displayName\r\n });\r\n formatTable.push({\r\n title: context.translatorService.Tranlate('DASHBOARD_INTERIOR', 'Interior'),\r\n render: (rowData: any) => numberFormat(rowData.byInConditionValue, 0, undefined, '')\r\n });\r\n formatTable.push({\r\n title: context.translatorService.Tranlate('DASHBOARD_EXTERIOR', 'Exterior'),\r\n render: (rowData: any) => numberFormat(rowData.byOutCondition, 0, undefined, '')\r\n });\r\n formatTable.push({\r\n title: context.translatorService.Tranlate('DASHBOARD_MECHANICAL', 'Mecanica'),\r\n render: (rowData: any) => numberFormat(rowData.byTehnicalConditionValue, 0, undefined, '')\r\n });\r\n\r\n return formatTable;\r\n };\r\n\r\n return (\r\n
\r\n \r\n \r\n {\r\n context.pptService = new PptService(context.translatorService, data);\r\n context.pptService.addFirstPage(filters, 'vehicle');\r\n context.pptService.addHorizontalChart(\r\n data?.byMaker,\r\n context.translatorService.Tranlate('DASHBOARD_MAKE', 'Producator')\r\n );\r\n context.pptService.addTable(constantsData.stockMap, updatedItems, '');\r\n context.pptService.addHorizontalChart(\r\n data?.byModel,\r\n context.translatorService.Tranlate('DASHBOARD_MODEL', 'Model')\r\n );\r\n context.pptService.addTable(\r\n geTechnicalConditionFormatTable(),\r\n data?.byInOutAndTechnicalCondition,\r\n context.translatorService.Tranlate(\r\n 'DASHBOARD_TECHNICAL_INVENTORY_STATE',\r\n 'Stare tehnica stoc'\r\n )\r\n );\r\n context.pptService.addTable(\r\n constantsData.stockTable,\r\n [\r\n {\r\n id: 99,\r\n displayName: context.translatorService.Tranlate(\r\n 'DASHBOARD_LACKING_INFORMATION',\r\n 'Cu informatii lipsa'\r\n ),\r\n value: data?.withMissingInfo\r\n },\r\n {\r\n id: 98,\r\n displayName: context.translatorService.Tranlate(\r\n 'DASHBOARD_INVENTORY_MORE_THAN_90_DAYS',\r\n 'In stoc de peste 90 zile'\r\n ),\r\n value: data?.byInventoryAge.length\r\n ? _.sumBy(\r\n data?.byInventoryAge.filter(({ id }) => id >= 4),\r\n 'value'\r\n )\r\n : 0\r\n },\r\n ...data!.byStatusType\r\n ],\r\n context.translatorService.Tranlate('DASHBOARD_INVENTORY_DETAILS', 'Detalii stoc')\r\n );\r\n const lessThan = context.translatorService.Tranlate(\r\n 'DASHBOARD_LESS_THAN',\r\n 'mai putin de'\r\n );\r\n const days = context.translatorService.Tranlate('DASHBOARD_DAYS', 'zile');\r\n const labels = data?.byInventoryAge\r\n .slice(0, -1)\r\n .map((inventoryAge) => `${lessThan} ${inventoryAge.displayName} ${days}`);\r\n context.pptService.addVerticalChart(\r\n data?.byInventoryAge.slice(0, -1),\r\n `${context.translatorService.Tranlate(\r\n 'DASHBOARD_AVERAGE_INVENTORY_AGE',\r\n 'Vehcime medie stoc'\r\n )}: ${data?.averageInventoryAge} ${context.translatorService.Tranlate(\r\n 'DASHBOARD_DAYS',\r\n 'zile'\r\n )}`,\r\n labels\r\n );\r\n context.pptService.addCircleChart(\r\n data?.byFuelType,\r\n context.translatorService.Tranlate('DASHBOARD_FUEL', 'Combustibil')\r\n );\r\n context.pptService.addCircleChart(\r\n data?.byTransmissionType,\r\n context.translatorService.Tranlate('DASHBOARD_TRANSMISSION', 'Transmisie')\r\n );\r\n context.pptService.addCircleChart(\r\n data?.byTractionType,\r\n context.translatorService.Tranlate('DASHBOARD_TRACTION', 'Tractiune')\r\n );\r\n context.pptService.exportPpt();\r\n }}\r\n >\r\n Export\r\n \r\n \r\n {data ? (\r\n <>\r\n
\r\n

{`${context.translatorService.Tranlate(\r\n 'DASHBOARD_INVENTORY_STRUCTURE',\r\n 'Structura stoc la data de'\r\n )} ${moment().format(dateFormat)}`}

\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n ) : (\r\n \r\n )}\r\n
\r\n );\r\n};\r\n\r\nexport default VehicleDashboard;\r\n","import { isNil } from 'lodash';\r\nimport React, { useContext, useMemo } from 'react';\r\nimport ReactApexChart from 'react-apexcharts';\r\nimport { ApplicationContext } from '../../../context/Contexts';\r\nimport { DashboardItem } from '../../../interfaces/Dashboard/DashboardItem';\r\n\r\ninterface Props {\r\n title: string;\r\n items: DashboardItem[];\r\n handleDonutClick(dataIndex?: number): void;\r\n}\r\n\r\nconst AcquistionDonutChart: React.FC = ({ title, items, handleDonutClick }) => {\r\n const context = useContext(ApplicationContext);\r\n const series = useMemo(() => {\r\n return items.map((i) => i.value);\r\n }, [items]);\r\n\r\n const translateDisplayName = (displayName: string) : string => {\r\n if (displayName == 'PJ') {\r\n return context.translatorService.Tranlate(\r\n 'PJ_LABEL',\r\n 'PJ'\r\n );\r\n }\r\n if (displayName == 'PF') {\r\n return context.translatorService.Tranlate(\r\n 'PF_LABEL',\r\n 'PF'\r\n );\r\n }\r\n\r\n if (displayName == 'Achizitie Renault Selection') {\r\n return context.translatorService.Tranlate(\r\n 'ACQUISITION_OF_RENAULT_SELECTION',\r\n 'Achizitie Renault Selection'\r\n );\r\n }\r\n\r\n if (displayName == 'Achizitie Libera') {\r\n return context.translatorService.Tranlate(\r\n 'ACQUISITION_NON_RENAULT_SELECTION',\r\n 'Achizitie Libera'\r\n );\r\n }\r\n\r\n return displayName;\r\n }\r\n const options = useMemo(() => {\r\n const labels = items.map((i) => translateDisplayName(i.displayName));\r\n return {\r\n chart: {\r\n type: 'donut',\r\n events: {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n dataPointSelection: (event: any, chartContext: any, config: any) => {\r\n if (!isNil(config.dataPointIndex)) {\r\n handleDonutClick(config.dataPointIndex);\r\n }\r\n }\r\n }\r\n },\r\n labels,\r\n legend: {\r\n position: 'bottom'\r\n },\r\n responsive: [\r\n {\r\n breakpoint: 480,\r\n options: {\r\n chart: {\r\n width: 200\r\n },\r\n legend: {\r\n position: 'bottom'\r\n }\r\n }\r\n }\r\n ]\r\n };\r\n }, [handleDonutClick, items, \r\n context.translatorService.Tranlate(\r\n 'PJ_LABEL',\r\n 'PJ'\r\n ),\r\n context.translatorService.Tranlate(\r\n 'PF_LABEL',\r\n 'PF'\r\n ),\r\n context.translatorService.Tranlate(\r\n 'ACQUISITION_OF_RENAULT_SELECTION',\r\n 'Achizitie Renault Selection'\r\n ),\r\n context.translatorService.Tranlate(\r\n 'ACQUISITION_NON_RENAULT_SELECTION',\r\n 'Achizitie Libera'\r\n )\r\n ]);\r\n\r\n return (\r\n
\r\n
{title}
\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default AcquistionDonutChart;\r\n","import React, { useContext } from 'react';\r\nimport { Card, Grid } from '@material-ui/core';\r\n\r\nimport { ApplicationContext } from '../../../context/Contexts';\r\nimport { AcquisitionResult } from '../../../interfaces/Dashboard/AcquisitionResult';\r\nimport { numberFormat } from '../../../utils/numberFormat';\r\n\r\ninterface Props {\r\n data: AcquisitionResult;\r\n includeVat: boolean;\r\n}\r\n\r\nconst AcquisitionMainCards: React.FC = ({ data, includeVat }) => {\r\n const context = useContext(ApplicationContext);\r\n\r\n const { purchasesCompleted, purchasesInProgress, purchasesFailed, newVehiclesSoldCount } = data;\r\n\r\n const purchasesCompletedPrice = includeVat\r\n ? purchasesCompleted.amountInclVat\r\n : purchasesCompleted.amount;\r\n\r\n const purchasesInProgressPrice = includeVat\r\n ? purchasesInProgress.amountInclVat\r\n : purchasesInProgress.amount;\r\n\r\n const purchasesFailedPrice = includeVat ? purchasesFailed.amountInclVat : purchasesFailed.amount;\r\n\r\n const averagePurchasePrice =\r\n purchasesCompleted.count == 0 ? 0 : purchasesCompletedPrice / purchasesCompleted.count;\r\n\r\n return (\r\n <>\r\n \r\n \r\n
\r\n
\r\n {context.translatorService.Tranlate(\r\n 'DASHBOARD_ACQUISITION_FINALISED',\r\n 'Finalizate cu succes'\r\n )}\r\n
\r\n

{purchasesCompleted.count}

\r\n

{`${numberFormat(purchasesCompletedPrice)} EUR`}

\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n {context.translatorService.Tranlate(\r\n 'DASHBOARD_ACQUISITION_IN_PROGRESS',\r\n 'In curs de achizitie'\r\n )}\r\n
\r\n

{purchasesInProgress.count}

\r\n

{`${numberFormat(purchasesInProgressPrice)} EUR`}

\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n {context.translatorService.Tranlate(\r\n 'DASHBOARD_ACQUISITION_FAILED',\r\n 'Achizitii esuate'\r\n )}\r\n
\r\n

{purchasesFailed.count}

\r\n

{`${numberFormat(purchasesFailedPrice)} EUR`}

\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n {context.translatorService.Tranlate(\r\n 'DASHBOARD_ACQUISITION_AVERAGE_PRICE',\r\n 'Pret mediu achizitie'\r\n )}\r\n
\r\n

{`${numberFormat(averagePurchasePrice)} EUR`}

\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n {context.translatorService.Tranlate(\r\n 'DASHBOARD_ACQUISITION_NEW_VEHICLES_SOLD',\r\n 'Vehicule noi vandute'\r\n )}\r\n
\r\n

{newVehiclesSoldCount}

\r\n
\r\n
\r\n
\r\n \r\n );\r\n};\r\n\r\nexport default AcquisitionMainCards;\r\n","import { Moment } from 'moment';\r\nimport { FiltersSelectItem } from './FiltersSelectItem';\r\n\r\nexport interface AcquisitionFiltersState {\r\n startDate: Moment;\r\n endDate: Moment;\r\n selectedOrganisations: FiltersSelectItem[];\r\n includeVat: boolean;\r\n locationId?: number;\r\n offerTypeId?: number;\r\n clientTypeId?: number;\r\n makeId?: number;\r\n}\r\n\r\nexport enum AcquisitionMainFilterStateKeys {\r\n START_DATE = 'startDate',\r\n END_DATE = 'endDate',\r\n SELECTED_ORGANIZATIONS = 'selectedOrganisations',\r\n INCLUDE_VAT = 'includeVat'\r\n}\r\n\r\nexport enum AcquisitionFilterStateKeys {\r\n LOCATION_ID = 'locationId',\r\n CLIENT_TYPE_ID = 'clientTypeId',\r\n OFFER_TYPE_ID = 'offerTypeId',\r\n MAKE_ID = 'makeId'\r\n}\r\n","import React, { useCallback, useContext, useEffect, useMemo, useState } from 'react';\r\nimport { Button, Card, Chip, Grid } from '@material-ui/core';\r\nimport {\r\n AcquisitionFiltersState,\r\n AcquisitionFilterStateKeys\r\n} from '../../../interfaces/Dashboard/AcquisitionFiltersState';\r\nimport isNil from 'lodash/isNil';\r\nimport { ApplicationContext } from '../../../context/Contexts';\r\nimport { AcquisitionResult } from '../../../interfaces/Dashboard/AcquisitionResult';\r\nimport { DashboardFilter } from '../../../interfaces/Dashboard/DashboardFilter';\r\ninterface Props {\r\n filters: AcquisitionFiltersState;\r\n data?: AcquisitionResult;\r\n setFiltersValueByName(name: string, value: any): void;\r\n resetFilters(): void;\r\n}\r\n\r\nconst AcquisitionDashboardAppliedFilters: React.FC = ({\r\n filters,\r\n data,\r\n setFiltersValueByName,\r\n resetFilters\r\n}) => {\r\n const [orgName, setOrgName] = useState();\r\n const context = useContext(ApplicationContext);\r\n\r\n const appliedFilters = useMemo(() => {\r\n if (!data || !filters) {\r\n return;\r\n }\r\n const result: DashboardFilter[] = [];\r\n Object.values(AcquisitionFilterStateKeys).forEach((value) => {\r\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\r\n // @ts-ignore\r\n const id = filters[value];\r\n if (!isNil(id)) {\r\n result.push({ id: id, propertyName: value });\r\n }\r\n });\r\n\r\n for (const item of result) {\r\n switch (item.propertyName) {\r\n case AcquisitionFilterStateKeys.MAKE_ID:\r\n item.displayName = data.purchasedVehiclesByMaker.find(\r\n ({ id }) => id === item.id\r\n )?.displayName;\r\n break;\r\n case AcquisitionFilterStateKeys.LOCATION_ID:\r\n item.displayName = orgName;\r\n break;\r\n case AcquisitionFilterStateKeys.CLIENT_TYPE_ID:\r\n item.displayName = data.purchasedVehiclesByClientType.find(\r\n ({ id }) => id === item.id\r\n )?.displayName;\r\n break;\r\n case AcquisitionFilterStateKeys.OFFER_TYPE_ID:\r\n item.displayName = data.purchasedVehiclesByOfferType.find(\r\n ({ id }) => id === item.id\r\n )?.displayName;\r\n break;\r\n }\r\n }\r\n\r\n return result;\r\n }, [data, filters, orgName]);\r\n\r\n useEffect(() => {\r\n const getOrgName = async () => {\r\n if (!isNil(filters.locationId)) {\r\n const organization = await context.organizationService.GetOrganization(filters.locationId);\r\n\r\n if (organization) {\r\n setOrgName(organization.displayName);\r\n }\r\n } else {\r\n setOrgName(undefined);\r\n }\r\n };\r\n\r\n getOrgName();\r\n }, [context.organizationService, filters.locationId]);\r\n\r\n const handleDelete = useCallback(\r\n (propertyName: string) => {\r\n setFiltersValueByName(propertyName, undefined);\r\n },\r\n [setFiltersValueByName]\r\n );\r\n\r\n if (!appliedFilters?.length) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n {context.translatorService.Tranlate(\r\n 'DASHBOARD_APPLIED_FILTERS',\r\n 'Filtre aplicate1'\r\n )}\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n {appliedFilters.map((item: DashboardFilter, index) => {\r\n return (\r\n handleDelete(item.propertyName)}\r\n />\r\n );\r\n })}\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default AcquisitionDashboardAppliedFilters;\r\n","import React, { useContext, useEffect, useState } from 'react';\r\nimport { Card, Grid } from '@material-ui/core';\r\nimport { ApplicationContext } from '../../../context/Contexts';\r\nimport { DashboardAcquisitionDetails } from '../../../interfaces/Dashboard/DashboardAcquisitionDetails';\r\nimport { AttachmentTypeCode } from '../../../helpers/Constants';\r\n\r\ninterface DashboardAcquisitionExtendedDetails extends DashboardAcquisitionDetails {\r\n imageURL?: string;\r\n base64Value?: any;\r\n}\r\ninterface Props {\r\n items: DashboardAcquisitionExtendedDetails[];\r\n includeVat: boolean;\r\n parentCallback: (values: any[]) => any;\r\n}\r\n\r\nconst RecentAcquisitions: React.FC = ({ items, includeVat, parentCallback }) => {\r\n const context = useContext(ApplicationContext);\r\n const caseService = context.caseService;\r\n const [updatedItems, setUpdatedItems] = useState(items);\r\n\r\n const convertBlobToBase64 = async (blob: any) => {\r\n // blob data\r\n return await blobToBase64(blob);\r\n };\r\n\r\n const blobToBase64 = (blob: any) =>\r\n new Promise((resolve, reject) => {\r\n const reader = new FileReader();\r\n reader.readAsDataURL(blob);\r\n reader.onload = () => resolve(reader.result);\r\n reader.onerror = (error) => reject(error);\r\n });\r\n\r\n useEffect(() => {\r\n const getAttachments = async () => {\r\n const itemsWithImages: DashboardAcquisitionExtendedDetails[] = [];\r\n for (let i = 0; i < items.length; i++) {\r\n const attachments = await caseService.GetCaseAttachments(items[i].caseId, [\r\n AttachmentTypeCode.MAIN_VEHICLE_PHOTO\r\n ]);\r\n const blob = await caseService.GetCaseAttachment(attachments[0].fileName);\r\n items[i].imageURL = URL.createObjectURL(blob);\r\n items[i].base64Value = await convertBlobToBase64(blob);\r\n itemsWithImages.push({ ...items[i] });\r\n }\r\n\r\n return itemsWithImages;\r\n };\r\n\r\n getAttachments().then((updatedItems) => {\r\n setUpdatedItems(updatedItems);\r\n parentCallback(updatedItems);\r\n });\r\n }, [items, caseService]);\r\n\r\n return (\r\n <>\r\n

\r\n {context.translatorService.Tranlate('DASHBOARD_ACQUISITION_RECENT', 'Achizitii recente')}\r\n

\r\n
\r\n \r\n {updatedItems.map((item) => (\r\n \r\n \r\n \r\n
\r\n \r\n {item.makeName} {item.modelName}\r\n {' '}\r\n {item.equipmentVersion} /{item.makeYear}/\r\n {item.fuelType}/{item.transmissionType}\r\n
\r\n {context.translatorService.Tranlate(\r\n 'DASHBOARD_ACQUISITION_PRICE',\r\n 'Pret achizitie'\r\n )}\r\n : {Math.round(includeVat ? item.purchasePriceInclVat : item.purchasePrice)} Euro\r\n
\r\n
\r\n {context.translatorService.Tranlate('DASHBOARD_BUYER_NAME', 'Cumparator')}:{' '}\r\n {item.buyerName}\r\n
\r\n
\r\n {context.translatorService.Tranlate('DASHBOARD_ORGANIZATION', 'Organizatie')}:{' '}\r\n {item.organizationName}\r\n
\r\n
\r\n
\r\n
\r\n ))}\r\n
\r\n
\r\n \r\n );\r\n};\r\nexport default RecentAcquisitions;\r\n","import React, { useContext, useMemo } from 'react';\r\nimport MaterialTable from '@material-table/core';\r\nimport { getLocalization, MaterialTableIcons } from '../../_shared/TableSettings';\r\nimport { Paper } from '@material-ui/core';\r\nimport { AcquisitionBuyerStats } from '../../../interfaces/Dashboard/AcquisitionBuyerStats';\r\nimport { numberFormat } from '../../../utils/numberFormat';\r\n\r\nimport { ApplicationContext } from '../../../context/Contexts';\r\n\r\ninterface Props {\r\n title: string;\r\n topBuyers: AcquisitionBuyerStats[];\r\n includeVat: boolean;\r\n isTentative?: boolean;\r\n}\r\n\r\nconst TopBuyers: React.FC = ({ topBuyers, includeVat, title, isTentative }) => {\r\n const context = useContext(ApplicationContext);\r\n\r\n const columns = useMemo(() => {\r\n const mainColumns: any = [\r\n {\r\n title: context.translatorService.Tranlate('DASHBOARD_ORGANIZATION', 'Organizatie'),\r\n field: 'organizationName'\r\n },\r\n {\r\n title: context.translatorService.Tranlate('DASHBOARD_BUYER_NAME', 'Cumparator'),\r\n field: 'buyerName'\r\n }\r\n ];\r\n\r\n if (isTentative) {\r\n mainColumns.push({\r\n title: context.translatorService.Tranlate(\r\n 'DASHBOARD_ACQUISITION_IN_PROGRESS_TABLE_HEADER',\r\n 'Achizitii in desfasurare'\r\n ),\r\n field: 'inProgressPurchasesCount'\r\n });\r\n mainColumns.push({\r\n title: context.translatorService.Tranlate(\r\n 'DASHBOARD_ACQUISITION_ESTIMATED_VALUE',\r\n 'Pret mediu estimat'\r\n ),\r\n render: (rowData: AcquisitionBuyerStats) => {\r\n if (!includeVat) {\r\n return rowData.inProgressPurchasesEstimatedAveragePrice\r\n ? numberFormat(rowData.inProgressPurchasesEstimatedAveragePrice, 0, undefined, ' EUR')\r\n : 0;\r\n } else {\r\n return rowData.inProgressPurchasesEstimatedAveragePriceInclVat\r\n ? numberFormat(\r\n rowData.inProgressPurchasesEstimatedAveragePriceInclVat,\r\n 0,\r\n undefined,\r\n ' EUR'\r\n )\r\n : 0;\r\n }\r\n }\r\n });\r\n } else {\r\n mainColumns.push({\r\n title: context.translatorService.Tranlate(\r\n 'DASHBOARD_ACQUISITION_FINALIZED_TABLE_HEADER',\r\n 'Achizitii Finalizate'\r\n ),\r\n field: 'completedPurchases.count'\r\n });\r\n mainColumns.push({\r\n title: context.translatorService.Tranlate(\r\n 'DASHBOARD_ACQUISITION_TOTAL_PAID',\r\n 'Total Achitat'\r\n ),\r\n render: (rowData: AcquisitionBuyerStats) =>\r\n includeVat\r\n ? numberFormat(rowData.completedPurchases.amountInclVat, 0, undefined, ' EUR')\r\n : numberFormat(rowData.completedPurchases.amount, 0, undefined, ' EUR')\r\n });\r\n mainColumns.push({\r\n title: context.translatorService.Tranlate(\r\n 'DASHBOARD_ACQUISITION_DAMAGE_AND_OTHER',\r\n 'Daune + Alte costuri'\r\n ),\r\n render: (rowData: AcquisitionBuyerStats) =>\r\n includeVat\r\n ? numberFormat(rowData.damageAndOtherCostsInclVat, 0, undefined, ' EUR')\r\n : numberFormat(rowData.damageAndOtherCosts, 0, undefined, ' EUR')\r\n });\r\n mainColumns.push({\r\n title: context.translatorService.Tranlate(\r\n 'DASHBOARD_ACQUISITION_AVERAGE_PRICE',\r\n 'Pret Mediu Achizitie'\r\n ),\r\n render: (rowData: AcquisitionBuyerStats) => {\r\n const price = includeVat\r\n ? rowData.completedPurchases.amountInclVat\r\n : rowData.completedPurchases.amount;\r\n\r\n const averagePrice = price / rowData.completedPurchases.count;\r\n\r\n return numberFormat(averagePrice, 0, undefined, ' EUR');\r\n }\r\n });\r\n }\r\n\r\n return mainColumns;\r\n }, [includeVat, isTentative]);\r\n\r\n return (\r\n <>\r\n

{title}

\r\n
\r\n ,\r\n Pagination: () => null\r\n }}\r\n />\r\n
\r\n \r\n );\r\n};\r\n\r\nexport default TopBuyers;\r\n","import { AcquisitionFiltersState } from '../../../interfaces/Dashboard/AcquisitionFiltersState';\r\n\r\nexport const SET_VALUE_BY_NAME = '[FILTERS] SET_VALUE_BY_NAME';\r\nexport const SET_CLIENT_TYPE_ID = '[FILTERS] SET_CLIENT_TYPE_ID';\r\nexport const SET_OFFER_TYPE_ID = '[FILTERS] SET_OFFER_TYPE_ID';\r\nexport const SET_MAKE_ID = '[FILTERS] SET_MAKE_ID';\r\nexport const RESET_FILTERS = '[FILTERS] RESET_FILTERS';\r\n\r\nexport const acquisitionDashboardReducer = (state: AcquisitionFiltersState, action: any) => {\r\n switch (action.type) {\r\n case SET_CLIENT_TYPE_ID:\r\n return {\r\n ...state,\r\n clientTypeId: action.clientTypeId !== state.clientTypeId ? action.clientTypeId : undefined\r\n };\r\n case SET_OFFER_TYPE_ID:\r\n return {\r\n ...state,\r\n offerTypeId: action.offerTypeId !== state.offerTypeId ? action.offerTypeId : undefined\r\n };\r\n case SET_MAKE_ID:\r\n return { ...state, makeId: action.makeId !== state.makeId ? action.makeId : undefined };\r\n case SET_VALUE_BY_NAME:\r\n return { ...state, [action.name]: action.value };\r\n case RESET_FILTERS:\r\n return {\r\n ...state,\r\n clientTypeId: undefined,\r\n offerTypeId: undefined,\r\n makeId: undefined\r\n };\r\n default:\r\n return state;\r\n }\r\n};\r\n","import { Card, Grid, Paper, Button } from '@material-ui/core';\r\nimport moment from 'moment';\r\nimport React, { useCallback, useContext, useEffect, useReducer, useState } from 'react';\r\nimport axios from 'axios';\r\nimport isNil from 'lodash/isNil';\r\n\r\nimport AcquisitionDonutChart from './AcquisitionDonutChart';\r\nimport AcquisitionMainCards from './AcquisitionMainCards';\r\nimport AcquisitionDashboardAppliedFilters from './AcquisitionDashboardAppliedFilters';\r\nimport RecentAcquisitions from './RecentAcquisitions';\r\nimport TopBuyers from './TopBuyers';\r\nimport DashboardFilters from '../DashboardFilters';\r\nimport {\r\n acquisitionDashboardReducer,\r\n RESET_FILTERS,\r\n SET_CLIENT_TYPE_ID,\r\n SET_MAKE_ID,\r\n SET_OFFER_TYPE_ID,\r\n SET_VALUE_BY_NAME\r\n} from './acquisitionDashboardReducer';\r\nimport { AcquisitionFilter } from '../../../interfaces/Dashboard/AcquisitionFilter';\r\nimport { ApplicationContext } from '../../../context/Contexts';\r\nimport { AcquisitionResult } from '../../../interfaces/Dashboard/AcquisitionResult';\r\nimport Loader from '../../Loader';\r\nimport { PptService } from '../../../services/PptService';\r\nimport { MUITranslations } from '../../../helpers/MUITableTranslations';\r\nimport { numberFormat } from '../../../utils/numberFormat';\r\nimport { AttachmentTypeCode } from '../../../helpers/Constants';\r\n\r\nconst AcquistionDashboard: React.FC = () => {\r\n const [filters, dispatch] = useReducer(acquisitionDashboardReducer, {\r\n startDate: moment().add(-3, 'month'),\r\n endDate: moment(),\r\n selectedOrganisations: [],\r\n includeVat: true,\r\n locationId: undefined,\r\n clientTypeId: undefined,\r\n offerTypeId: undefined,\r\n makeId: undefined\r\n });\r\n\r\n const [data, setData] = useState();\r\n\r\n const [updatedItems, setUpdatedItems] = useState([]);\r\n\r\n const context = useContext(ApplicationContext);\r\n\r\n const constantsData = MUITranslations.GetDashboardTranslations(context.translatorService);\r\n\r\n const setFiltersValueByName = useCallback((name: string, value: any) => {\r\n dispatch({ type: SET_VALUE_BY_NAME, name, value });\r\n }, []);\r\n\r\n const setClientTypeId = useCallback((clientTypeId?: number) => {\r\n dispatch({ type: SET_CLIENT_TYPE_ID, clientTypeId });\r\n }, []);\r\n\r\n const setOfferTypeId = useCallback((offerTypeId?: number) => {\r\n dispatch({ type: SET_OFFER_TYPE_ID, offerTypeId });\r\n }, []);\r\n\r\n const setMakeId = useCallback((makeId?: number) => {\r\n dispatch({ type: SET_MAKE_ID, makeId });\r\n }, []);\r\n\r\n const resetFilters = useCallback(() => {\r\n dispatch({ type: RESET_FILTERS });\r\n }, []);\r\n\r\n const handleMakeDonutClick = useCallback(\r\n (dataIndex?: number) => {\r\n if (!isNil(dataIndex)) {\r\n const makeId = data?.purchasedVehiclesByMaker[dataIndex].id;\r\n if (!isNil(makeId)) {\r\n setMakeId(makeId);\r\n }\r\n }\r\n },\r\n [data?.purchasedVehiclesByMaker, setMakeId]\r\n );\r\n\r\n const handleClientTypeDonutClick = useCallback(\r\n (dataIndex?: number) => {\r\n if (!isNil(dataIndex)) {\r\n const clientTypeId = data?.purchasedVehiclesByClientType[dataIndex].id;\r\n if (!isNil(clientTypeId)) {\r\n setClientTypeId(clientTypeId);\r\n }\r\n }\r\n },\r\n [data?.purchasedVehiclesByClientType, setClientTypeId]\r\n );\r\n\r\n const handleOfferTypeDonutClick = useCallback(\r\n (dataIndex?: number) => {\r\n if (!isNil(dataIndex)) {\r\n const offerTypeId = data?.purchasedVehiclesByOfferType[dataIndex].id;\r\n if (!isNil(offerTypeId)) {\r\n setOfferTypeId(offerTypeId);\r\n }\r\n }\r\n },\r\n [data?.purchasedVehiclesByOfferType, setOfferTypeId]\r\n );\r\n\r\n const getTopBuyersFormatTable = (\r\n isTentative: boolean,\r\n firstPart: [{ title: string; field?: string; render?(rowData: any): string | 0 }]\r\n ) => {\r\n const formatTable = [...firstPart];\r\n if (isTentative) {\r\n formatTable.push({\r\n title: context.translatorService.Tranlate(\r\n 'DASHBOARD_ACQUISITION_ESTIMATED_VALUE',\r\n 'Pret mediu estimat'\r\n ),\r\n render: (rowData: any) => {\r\n if (!filters.includeVat) {\r\n return rowData.inProgressPurchasesEstimatedAveragePrice\r\n ? numberFormat(rowData.inProgressPurchasesEstimatedAveragePrice, 0, undefined, ' EUR')\r\n : 0;\r\n } else {\r\n return rowData.inProgressPurchasesEstimatedAveragePriceInclVat\r\n ? numberFormat(\r\n rowData.inProgressPurchasesEstimatedAveragePriceInclVat,\r\n 0,\r\n undefined,\r\n ' EUR'\r\n )\r\n : 0;\r\n }\r\n }\r\n });\r\n } else {\r\n formatTable.push({\r\n title: context.translatorService.Tranlate(\r\n 'DASHBOARD_ACQUISITION_FINALIZED_TABLE_HEADER',\r\n 'Achizitii Finalizate'\r\n ),\r\n render: (rowData: any) => rowData.completedPurchases.count\r\n });\r\n formatTable.push({\r\n title: context.translatorService.Tranlate(\r\n 'DASHBOARD_ACQUISITION_TOTAL_PAID',\r\n 'Total Achitat'\r\n ),\r\n render: (rowData: any) =>\r\n filters.includeVat\r\n ? numberFormat(rowData.completedPurchases.amountInclVat, 0, undefined, ' EUR')\r\n : numberFormat(rowData.completedPurchases.amount, 0, undefined, ' EUR')\r\n });\r\n formatTable.push({\r\n title: context.translatorService.Tranlate(\r\n 'DASHBOARD_ACQUISITION_DAMAGE_AND_OTHER',\r\n 'Daune + Alte costuri'\r\n ),\r\n render: (rowData: any) =>\r\n filters.includeVat\r\n ? numberFormat(rowData.damageAndOtherCostsInclVat, 0, undefined, ' EUR')\r\n : numberFormat(rowData.damageAndOtherCosts, 0, undefined, ' EUR')\r\n });\r\n formatTable.push({\r\n title: context.translatorService.Tranlate(\r\n 'DASHBOARD_ACQUISITION_AVERAGE_PRICE',\r\n 'Pret Mediu Achizitie'\r\n ),\r\n render: (rowData: any) => {\r\n const price = filters.includeVat\r\n ? rowData.completedPurchases.amountInclVat\r\n : rowData.completedPurchases.amount;\r\n\r\n const averagePrice = price / rowData.completedPurchases.count;\r\n\r\n return numberFormat(averagePrice, 0, undefined, ' EUR');\r\n }\r\n });\r\n }\r\n return formatTable;\r\n };\r\n\r\n const handleCallback = (childData: any) => {\r\n setUpdatedItems(childData);\r\n };\r\n\r\n useEffect(() => {\r\n const source = axios.CancelToken.source();\r\n\r\n const getData = async () => {\r\n try {\r\n const filter: AcquisitionFilter = {\r\n startDate: moment(new Date(filters.startDate.utc().format()).setHours(0, 0, 0))\r\n .utc()\r\n .toDate(),\r\n endDate: moment(new Date(filters.endDate.utc().format()).setHours(23, 59, 59))\r\n .utc()\r\n .toDate(),\r\n organizationIds: !isNil(filters.locationId)\r\n ? [filters.locationId]\r\n : filters.selectedOrganisations.map(({ id }) => id),\r\n makeIds: !isNil(filters.makeId) ? [filters.makeId] : [],\r\n personTypeIds: !isNil(filters.clientTypeId) ? [filters.clientTypeId] : [],\r\n offerTypeIds: !isNil(filters.offerTypeId) ? [filters.offerTypeId] : []\r\n };\r\n\r\n if (filter.startDate && filter.endDate && filter.organizationIds.length) {\r\n const result = await context.vehicleService.GetDashboardAquisitionData(\r\n filter,\r\n source.token\r\n );\r\n\r\n if (result) {\r\n const finalResult: AcquisitionResult = {\r\n ...result,\r\n purchasedVehiclesByClientType: !isNil(filters.clientTypeId)\r\n ? data?.purchasedVehiclesByClientType || []\r\n : result.purchasedVehiclesByClientType,\r\n purchasedVehiclesByOfferType: !isNil(filters.offerTypeId)\r\n ? data?.purchasedVehiclesByOfferType || []\r\n : result.purchasedVehiclesByOfferType,\r\n purchasedVehiclesByMaker: !isNil(filters.makeId)\r\n ? data?.purchasedVehiclesByMaker || []\r\n : result.purchasedVehiclesByMaker\r\n };\r\n setData(finalResult);\r\n }\r\n }\r\n } catch (error) {\r\n if (!axios.isCancel(error)) {\r\n throw error;\r\n }\r\n }\r\n };\r\n\r\n getData();\r\n\r\n return () => source.cancel();\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [\r\n filters.endDate,\r\n filters.startDate,\r\n filters.selectedOrganisations,\r\n context.vehicleService,\r\n filters.makeId,\r\n filters.locationId,\r\n filters.clientTypeId,\r\n filters.offerTypeId\r\n ]);\r\n\r\n const checkIfUpdatedItemsIsLoaded = () => {\r\n if (!data?.recentAcquisitions.length) {\r\n return false;\r\n }\r\n if (!updatedItems.length) {\r\n return true;\r\n }\r\n\r\n return false;\r\n };\r\n\r\n return (\r\n
\r\n \r\n \r\n {\r\n context.pptService = new PptService(context.translatorService, data);\r\n context.pptService.addFirstPage(filters, 'acquisitions');\r\n context.pptService.addCircleChart(\r\n data?.purchasedVehiclesByClientType,\r\n context.translatorService.Tranlate('DASHBOARD_CLIENT_TYPE', 'TIP CLIENT')\r\n );\r\n context.pptService.addCircleChart(\r\n data?.purchasedVehiclesByOfferType,\r\n context.translatorService.Tranlate('DASHBOARD_OFFER_TYPE', 'TIP Oferta')\r\n );\r\n context.pptService.addCircleChart(\r\n data?.purchasedVehiclesByMaker,\r\n context.translatorService.Tranlate('CAR_DETAILS_BRAND', 'Marca')\r\n );\r\n context.pptService.recentAcquisitions(updatedItems);\r\n context.pptService.addTable(\r\n getTopBuyersFormatTable(false, constantsData.topBuyers),\r\n data?.topBuyers,\r\n context.translatorService.Tranlate(\r\n 'DASHBOARD_ACQUISITION_TOP_BUYERS',\r\n 'Cumparatori (Top 10)'\r\n )\r\n );\r\n context.pptService.addTable(\r\n getTopBuyersFormatTable(true, constantsData.topTentaiveBuyers),\r\n data?.topTentativeBuyers,\r\n context.translatorService.Tranlate(\r\n 'DASHBOARD_ACQUISITION_TENTATIVE_BUYERS',\r\n 'Tentative Buyers (Top 10)'\r\n )\r\n );\r\n context.pptService.exportPpt();\r\n }}\r\n >\r\n Export\r\n \r\n \r\n {data ? (\r\n <>\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n ) : (\r\n \r\n )}\r\n
\r\n );\r\n};\r\n\r\nexport default AcquistionDashboard;\r\n","import React, { useMemo, useContext } from 'react';\r\nimport ReactApexChart from 'react-apexcharts';\r\nimport { ApplicationContext } from '../../../context/Contexts';\r\nimport { SalesOfferAndEmail } from '../../../interfaces/Dashboard/SalesOfferAndEmail';\r\n\r\ninterface Props {\r\n title: string;\r\n items: SalesOfferAndEmail[];\r\n}\r\n\r\nconst SalesOfferEmailBarChart: React.FC = ({ title, items }) => {\r\n const context = useContext(ApplicationContext);\r\n const series = useMemo(() => {\r\n const offerGeneratedCountArray: number[] = [];\r\n const emailSentCountArray: number[] = [];\r\n items.forEach((item) => {\r\n offerGeneratedCountArray.push(item.offerGeneratedCount);\r\n emailSentCountArray.push(item.emailSentCount);\r\n });\r\n return [\r\n {\r\n name: context.translatorService.Tranlate('DASHBOARD_GENERATED_OFFERS', 'Oferte generate'),\r\n data: offerGeneratedCountArray\r\n },\r\n {\r\n name: context.translatorService.Tranlate(\r\n 'DASHBOARD_GENERATED_OFFERS_EMAILS',\r\n 'Oferte/Email transmise'\r\n ),\r\n data: emailSentCountArray\r\n }\r\n ];\r\n }, [context.translatorService, items]);\r\n\r\n const options = useMemo(() => {\r\n const categories = items.map((i) => i.date);\r\n return {\r\n chart: {\r\n type: 'bar',\r\n height: 500,\r\n toolbar: {\r\n show: false\r\n }\r\n },\r\n legend: {\r\n show: false\r\n },\r\n plotOptions: {\r\n bar: {\r\n borderRadius: 4\r\n }\r\n },\r\n dataLabels: {\r\n enabled: true\r\n },\r\n xaxis: {\r\n categories\r\n },\r\n yaxis: {\r\n labels: {\r\n formatter: (value: any) => {\r\n return value.toFixed(0);\r\n }\r\n }\r\n }\r\n };\r\n }, [items]);\r\n\r\n return (\r\n
\r\n
{title}
\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default SalesOfferEmailBarChart;\r\n","import React, { useContext } from 'react';\r\nimport { Box, Card, Grid, IconButton } from '@material-ui/core';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport { SalesChannels } from '../../../interfaces/Dashboard/SalesChannels';\r\nimport { SalesTopSeller } from '../../../interfaces/Dashboard/SalesTopSeller';\r\nimport olxLogo from '../../../assets/images/OLX.png';\r\nimport autovitLogo from '../../../assets/images/Autovit.jpg';\r\nimport renaultLogo from '../../../assets/images/Renault.png';\r\n\r\ninterface SalesChannelProps {\r\n channelId: number;\r\n totalCount: number;\r\n activeCount: number;\r\n context: AppContext;\r\n}\r\n\r\nconst SalesChannel: React.FC = ({\r\n channelId,\r\n totalCount,\r\n activeCount,\r\n context\r\n}) => (\r\n \r\n \r\n
\r\n \r\n \r\n {channelId == 1 && (\r\n \r\n \r\n \r\n )}\r\n {channelId == 2 && (\r\n \r\n \r\n \r\n )}\r\n {channelId == 3 && (\r\n \r\n \r\n \r\n )}\r\n \r\n \r\n
\r\n
\r\n
\r\n
{context.translatorService.Tranlate('DASHBOARD_TOTAL_ADS', 'Total anunturi')}
\r\n

{totalCount}

\r\n
\r\n
\r\n
{context.translatorService.Tranlate('DASHBOARD_ACTIVE_ADS', 'Active')}
\r\n

{activeCount}

\r\n
\r\n
\r\n
\r\n
\r\n);\r\ninterface SalesHeaderProps {\r\n channels: SalesChannels[];\r\n topSellers: SalesTopSeller[];\r\n onClickSeller(id: string): void;\r\n}\r\nconst SalesHeader: React.FC = ({ channels, topSellers, onClickSeller }) => {\r\n const context = useContext(ApplicationContext);\r\n return (\r\n \r\n {topSellers.length > 0 && (\r\n \r\n \r\n

\r\n {context.translatorService.Tranlate('DASHBOARD_TOP_SALE_PERSONS', 'Top vanzatori')}\r\n

\r\n {topSellers?.map((seller, index) => {\r\n return (\r\n {\r\n onClickSeller(seller.id);\r\n }}\r\n key={seller.id}\r\n container\r\n spacing={2}\r\n className=\"border-top border-bottom\"\r\n >\r\n \r\n

{index + 1}

\r\n
\r\n \r\n
{seller.buyerName}
\r\n
{seller.organizationName}
\r\n
\r\n
\r\n );\r\n })}\r\n \r\n
\r\n )}\r\n {channels?.map((channel) => {\r\n return (\r\n \r\n );\r\n })}\r\n \r\n );\r\n};\r\n\r\nexport default SalesHeader;\r\n","import { isNil } from 'lodash';\r\nimport React, { useContext, useMemo } from 'react';\r\nimport ReactApexChart from 'react-apexcharts';\r\nimport { ApplicationContext } from '../../../context/Contexts';\r\nimport { DashboardItem } from '../../../interfaces/Dashboard/DashboardItem';\r\n\r\ninterface Props {\r\n title: string;\r\n items: DashboardItem[];\r\n handleDonutClick(dataIndex?: number): void;\r\n}\r\n\r\nconst AcquistionDonutChart: React.FC = ({ title, items, handleDonutClick }) => {\r\n const context = useContext(ApplicationContext);\r\n\r\n const series = useMemo(() => {\r\n return items.map((i) => i.value);\r\n }, [items]);\r\n\r\n const translateDisplayName = (displayName: string) : string => {\r\n if (displayName == 'PJ') {\r\n return context.translatorService.Tranlate(\r\n 'PJ_LABEL',\r\n 'PJ'\r\n );\r\n }\r\n if (displayName == 'PF') {\r\n return context.translatorService.Tranlate(\r\n 'PF_LABEL',\r\n 'PF'\r\n );\r\n }\r\n\r\n if (displayName == 'Achizitie Renault Selection') {\r\n return context.translatorService.Tranlate(\r\n 'ACQUISITION_OF_RENAULT_SELECTION',\r\n 'Achizitie Renault Selection'\r\n );\r\n }\r\n\r\n if (displayName == 'Achizitie Libera') {\r\n return context.translatorService.Tranlate(\r\n 'ACQUISITION_NON_RENAULT_SELECTION',\r\n 'Achizitie Libera'\r\n );\r\n }\r\n\r\n return displayName;\r\n }\r\n const options = useMemo(() => {\r\n const labels = items.map((i) => translateDisplayName(i.displayName));\r\n return {\r\n chart: {\r\n type: 'donut',\r\n events: {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n dataPointSelection: (event: any, chartContext: any, config: any) => {\r\n if (!isNil(config.dataPointIndex)) {\r\n handleDonutClick(config.dataPointIndex);\r\n }\r\n }\r\n }\r\n },\r\n labels,\r\n legend: {\r\n position: 'bottom'\r\n },\r\n responsive: [\r\n {\r\n breakpoint: 480,\r\n options: {\r\n chart: {\r\n width: 200\r\n },\r\n legend: {\r\n position: 'bottom'\r\n }\r\n }\r\n }\r\n ]\r\n };\r\n }, [handleDonutClick, items, , \r\n context.translatorService.Tranlate(\r\n 'PJ_LABEL',\r\n 'PJ'\r\n ),\r\n context.translatorService.Tranlate(\r\n 'PF_LABEL',\r\n 'PF'\r\n ),\r\n context.translatorService.Tranlate(\r\n 'ACQUISITION_OF_RENAULT_SELECTION',\r\n 'Achizitie Renault Selection'\r\n ),\r\n context.translatorService.Tranlate(\r\n 'ACQUISITION_NON_RENAULT_SELECTION',\r\n 'Achizitie Libera'\r\n )]);\r\n\r\n return (\r\n
\r\n
{title}
\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default AcquistionDonutChart;\r\n","import React, { useContext, useMemo } from 'react';\r\nimport ReactApexChart from 'react-apexcharts';\r\nimport { ApplicationContext } from '../../../context/Contexts';\r\nimport { SalesAdvertAndVehicleList } from '../../../interfaces/Dashboard/SalesAdvertAndVehicleList';\r\n\r\ninterface Props {\r\n title: string;\r\n items: SalesAdvertAndVehicleList[];\r\n}\r\n\r\nconst VehicleAddSalesChart: React.FC = ({ title, items }) => {\r\n const context = useContext(ApplicationContext);\r\n const series = useMemo(() => {\r\n const advertsCountArray: number[] = [];\r\n const soldVehiclesCountArray: number[] = [];\r\n items.forEach((item) => {\r\n advertsCountArray.push(item.advertCount);\r\n soldVehiclesCountArray.push(item.soldVehicleCount);\r\n });\r\n return [\r\n {\r\n name: context.translatorService.Tranlate(\r\n 'PUBLISHED_ANNOUNCEMENTS',\r\n 'Anunturi publicate'\r\n ),\r\n data: advertsCountArray\r\n },\r\n {\r\n name: context.translatorService.Tranlate(\r\n 'CARS_SOLD',\r\n 'Masini vandute',\r\n ),\r\n data: soldVehiclesCountArray\r\n }\r\n ];\r\n }, [items]);\r\n\r\n const options = useMemo(() => {\r\n const categories = items.map((i) => i.date);\r\n return {\r\n chart: {\r\n type: 'line',\r\n toolbar: {\r\n show: false\r\n }\r\n },\r\n xaxis: {\r\n categories\r\n },\r\n yaxis: {\r\n labels: {\r\n formatter: (value: any) => {\r\n return value.toFixed(0);\r\n }\r\n }\r\n }\r\n };\r\n }, [items, \r\n context.translatorService.Tranlate(\r\n 'PUBLISHED_ANNOUNCEMENTS',\r\n 'Anunturi publicate'\r\n ),\r\n context.translatorService.Tranlate(\r\n 'CARS_SOLD',\r\n 'Masini vandute',\r\n )]);\r\n\r\n return (\r\n
\r\n
{title}
\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default VehicleAddSalesChart;\r\n","import React from 'react';\r\n\r\ninterface Props {\r\n title: string;\r\n value: string;\r\n adsValue: string;\r\n}\r\n\r\nconst SalesSummaryCard: React.FC = ({ title, value, adsValue }) => (\r\n
\r\n
{title}
\r\n

{value}

\r\n

{adsValue}

\r\n
\r\n);\r\n\r\nexport default SalesSummaryCard;\r\n","import React, { useContext, useEffect, useMemo, useState } from 'react';\r\nimport { Card, Grid, Paper } from '@material-ui/core';\r\n\r\nimport { ApplicationContext } from '../../../context/Contexts';\r\nimport MaterialTable from '@material-table/core';\r\nimport { getLocalization, MaterialTableIcons } from '../../_shared/TableSettings';\r\nimport { SalesVehicle } from '../../../interfaces/Dashboard/SalesVehicle';\r\nimport { numberFormat } from '../../../utils/numberFormat';\r\n\r\ninterface SalesAggregateTableProps {\r\n vehicles: SalesVehicle[];\r\n}\r\n\r\nconst SalesAggregateTable: React.FC = ({ vehicles }) => {\r\n const context = useContext(ApplicationContext);\r\n const [selected, setSelected] = useState(null);\r\n\r\n const carType = context.translatorService.Tranlate('DASHBOARD_CAR_TYPE', 'Marca');\r\n const carModel = context.translatorService.Tranlate('DASHBOARD_MODEL', 'Model');\r\n const quantity = context.translatorService.Tranlate('DASHBOARD_QUANTITY', 'Nr. Unitati vandute');\r\n const averageAge = context.translatorService.Tranlate(\r\n 'DASHBOARD_AVERAGE_VEHICLE_AGE',\r\n 'Varsta medie'\r\n );\r\n const total = context.translatorService.Tranlate('DASHBOARD_TOTAL', 'Total achizitie');\r\n const fixesAndOtherCosts = context.translatorService.Tranlate(\r\n 'DASHBOARD_FIXES_AND_OTHER',\r\n 'Reparatii + alte costuri'\r\n );\r\n const salePrice = context.translatorService.Tranlate(\r\n 'DASHBOARD_SALE_PRICE',\r\n 'Pret Total vanzare'\r\n );\r\n const profit = context.translatorService.Tranlate('DASHBOARD_PROFIT', 'Profit %');\r\n const totalProfit = context.translatorService.Tranlate(\r\n 'DASHBOARD_TOTAL_PROFIT',\r\n 'Profit (valoare absoluta)'\r\n );\r\n\r\n const columns = useMemo(() => {\r\n return [\r\n { title: carType, field: 'makeName' },\r\n { title: carModel, field: 'modelName' },\r\n { title: quantity, field: 'numberOfUnitSold' },\r\n {\r\n title: averageAge,\r\n field: 'avgOfYear',\r\n render: (rowData: SalesVehicle) => numberFormat(rowData.avgOfYear, 1)\r\n },\r\n {\r\n title: total,\r\n field: 'purchaseValue',\r\n render: (rowData: SalesVehicle) => numberFormat(rowData.purchaseValue, 0, undefined, ' EUR')\r\n },\r\n {\r\n title: fixesAndOtherCosts,\r\n field: 'damageValue',\r\n render: (rowData: SalesVehicle) => numberFormat(rowData.damageValue, 0, undefined, ' EUR')\r\n },\r\n {\r\n title: salePrice,\r\n field: 'soldValue',\r\n render: (rowData: SalesVehicle) => numberFormat(rowData.soldValue, 0, undefined, ' EUR')\r\n },\r\n {\r\n title: profit,\r\n field: 'profitPercent',\r\n render: (rowData: SalesVehicle) => numberFormat(rowData.profitPercent)\r\n },\r\n {\r\n title: totalProfit,\r\n field: 'profitValue',\r\n render: (rowData: SalesVehicle) => numberFormat(rowData.profitValue, 0, undefined, ' EUR')\r\n }\r\n ];\r\n }, [\r\n carType,\r\n carModel,\r\n quantity,\r\n averageAge,\r\n total,\r\n fixesAndOtherCosts,\r\n salePrice,\r\n profit,\r\n totalProfit\r\n ]);\r\n\r\n const carInfo = (data: SalesVehicle) => {\r\n return (\r\n \r\n \r\n
\r\n
\r\n {data?.makeName} {data?.modelName}\r\n
\r\n {`${context.translatorService.Tranlate(\r\n 'DASHBOARD_SALES_TABLE_QUANTITY',\r\n 'Numar de unitati'\r\n )}: ${data?.numberOfUnitSold}`}\r\n
\r\n {`${averageAge}: ${numberFormat(data?.avgOfYear, 1)}`}\r\n
\r\n
\r\n {data?.groupedByFuelType.map((row, index) => {\r\n return (\r\n
\r\n {row.name}: {Math.round(row.percentValue)}% ({row.count})\r\n
\r\n );\r\n })}\r\n
\r\n
\r\n {data?.groupedByTransmissionType.map((row, index) => {\r\n return (\r\n
\r\n {row.name}: {Math.round(row.percentValue)}% ({row.count})\r\n
\r\n );\r\n })}\r\n
\r\n {`${context.translatorService.Tranlate(\r\n 'DASHBOARD_AVG_SALE_VALUE',\r\n 'Pret mediu de vanzare'\r\n )}: ${numberFormat(data?.avgSoldValue)} Euro`}\r\n
\r\n {`${context.translatorService.Tranlate(\r\n 'DASHBOARD_AVG_DAMAGE_VALUE',\r\n 'Costuri medii'\r\n )}: ${numberFormat(data?.avgDamageValue)} Euro`}\r\n
\r\n
\r\n

\r\n {context.translatorService.Tranlate('DASHBOARD_PROFIT_VALUE', 'Profit')}{' '}\r\n {Math.round(data?.profitPercent)}%\r\n

\r\n
\r\n
\r\n
\r\n
\r\n );\r\n };\r\n\r\n useEffect(() => {\r\n setSelected(null);\r\n }, [vehicles]);\r\n\r\n return (\r\n <>\r\n \r\n
\r\n {\r\n setSelected(selectedRow as SalesVehicle);\r\n }}\r\n options={{\r\n search: false,\r\n maxBodyHeight: '49vh',\r\n headerStyle: { position: 'sticky', top: 0 },\r\n pageSize: vehicles.length,\r\n rowStyle: (rowData) => ({\r\n backgroundColor:\r\n selected?.vehicleId === rowData.vehicleId ||\r\n (!selected && rowData.vehicleId === vehicles[0].vehicleId)\r\n ? '#267DC3'\r\n : '#FFF',\r\n color:\r\n selected?.vehicleId === rowData.vehicleId ||\r\n (!selected && rowData.vehicleId === vehicles[0].vehicleId)\r\n ? '#FFF'\r\n : '#000'\r\n }),\r\n actionsCellStyle: { backgroundColor: 'red' },\r\n tableLayout: 'fixed'\r\n }}\r\n components={{\r\n Container: (props) => ,\r\n Pagination: () => null\r\n }}\r\n />\r\n
\r\n
\r\n {!!selected ? carInfo(selected) : carInfo(vehicles[0])}\r\n \r\n );\r\n};\r\n\r\nexport default SalesAggregateTable;\r\n","import { SalesFiltersState } from '../../../interfaces/Dashboard/SalesFiltersState';\r\n\r\nexport const SET_VAL_BY_NAME = '[FILTERS] SET_VAL_BY_NAME';\r\nexport const SET_PERSON_TYPE_ID = '[FILTERS] SET_PERSON_TYPE_ID';\r\nexport const SET_SALE_PERSON_ID = '[FILTERS] SET_SALE_PERSON_ID';\r\nexport const RESET_SALES_FILTERS = '[FILTERS] RESET_SALES_FILTERS';\r\n\r\nexport const salesDashboardReducer = (state: SalesFiltersState, action: any) => {\r\n switch (action.type) {\r\n case SET_PERSON_TYPE_ID:\r\n return {\r\n ...state,\r\n clientTypeId: action.clientTypeId !== state.clientTypeId ? action.clientTypeId : undefined\r\n };\r\n case SET_SALE_PERSON_ID:\r\n return {\r\n ...state,\r\n salePersonId: action.salePersonId !== state.salePersonId ? action.salePersonId : undefined\r\n };\r\n case SET_VAL_BY_NAME:\r\n return { ...state, [action.name]: action.value };\r\n case RESET_SALES_FILTERS:\r\n return {\r\n ...state,\r\n clientTypeId: undefined,\r\n locationId: undefined,\r\n salePersonId: undefined,\r\n advertiserId: undefined\r\n };\r\n default:\r\n return state;\r\n }\r\n};\r\n","import { Moment } from 'moment';\r\nimport { FiltersSelectItem } from './FiltersSelectItem';\r\n\r\nexport interface SalesFiltersState {\r\n startDate: Moment;\r\n endDate: Moment;\r\n selectedOrganisations: FiltersSelectItem[];\r\n clientTypeId?: number;\r\n locationId?: number;\r\n salePersonId?: string;\r\n}\r\n\r\nexport enum SalesMainFilterStateKeys {\r\n START_DATE = 'startDate',\r\n END_DATE = 'endDate',\r\n SELECTED_ORGANIZATIONS = 'selectedOrganisations'\r\n}\r\n\r\nexport enum SalesFilterStateKeys {\r\n LOCATION_ID = 'locationId',\r\n CLIENT_TYPE_ID = 'clientTypeId',\r\n SALE_PERSON_ID = 'salePersonId'\r\n}\r\n","import React, { useCallback, useContext, useEffect, useMemo, useState } from 'react';\r\nimport { Button, Card, Chip, Grid } from '@material-ui/core';\r\nimport isNil from 'lodash/isNil';\r\nimport { ApplicationContext } from '../../../context/Contexts';\r\nimport { DashboardFilter } from '../../../interfaces/Dashboard/DashboardFilter';\r\nimport {\r\n SalesFiltersState,\r\n SalesFilterStateKeys\r\n} from '../../../interfaces/Dashboard/SalesFiltersState';\r\nimport { SalesResult } from '../../../interfaces/Dashboard/SalesResult';\r\ninterface Props {\r\n filters: SalesFiltersState;\r\n data?: SalesResult;\r\n setFiltersValueByName(name: string, value: any): void;\r\n resetFilters(): void;\r\n}\r\n\r\nconst SalesDashboardAppliedFilters: React.FC = ({\r\n filters,\r\n data,\r\n setFiltersValueByName,\r\n resetFilters\r\n}) => {\r\n const [orgName, setOrgName] = useState();\r\n const context = useContext(ApplicationContext);\r\n\r\n const appliedFilters = useMemo(() => {\r\n if (!data || !filters) {\r\n return;\r\n }\r\n const result: any[] = [];\r\n Object.values(SalesFilterStateKeys).forEach((value) => {\r\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\r\n // @ts-ignore\r\n const id = filters[value];\r\n if (!isNil(id)) {\r\n result.push({ id: id, propertyName: value });\r\n }\r\n });\r\n for (const item of result) {\r\n switch (item.propertyName) {\r\n case SalesFilterStateKeys.SALE_PERSON_ID:\r\n item.displayName = data.topSellersBasedOnClosedFolders.find(\r\n ({ id }) => id === item.id\r\n )?.buyerName;\r\n break;\r\n case SalesFilterStateKeys.LOCATION_ID:\r\n item.displayName = orgName;\r\n break;\r\n case SalesFilterStateKeys.CLIENT_TYPE_ID:\r\n item.displayName = data.vehiclesGroupedByClientType.find(\r\n ({ id }) => id === item.id\r\n )?.displayName;\r\n break;\r\n }\r\n }\r\n\r\n return result;\r\n }, [data, filters, orgName]);\r\n\r\n useEffect(() => {\r\n const getOrgName = async () => {\r\n if (!isNil(filters.locationId)) {\r\n const organization = await context.organizationService.GetOrganization(filters.locationId);\r\n\r\n if (organization) {\r\n setOrgName(organization.displayName);\r\n }\r\n } else {\r\n setOrgName(undefined);\r\n }\r\n };\r\n\r\n getOrgName();\r\n }, [context.organizationService, filters.locationId]);\r\n\r\n const handleDelete = useCallback(\r\n (propertyName: string) => {\r\n setFiltersValueByName(propertyName, undefined);\r\n },\r\n [setFiltersValueByName]\r\n );\r\n\r\n if (!appliedFilters?.length) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n {context.translatorService.Tranlate(\r\n 'DASHBOARD_APPLIED_FILTERS',\r\n 'Filtre aplicate1'\r\n )}\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n {appliedFilters.map((item: DashboardFilter, index) => {\r\n return (\r\n handleDelete(item.propertyName)}\r\n />\r\n );\r\n })}\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default SalesDashboardAppliedFilters;\r\n","import React, { useReducer, useCallback, useContext, useState, useEffect } from 'react';\r\nimport moment from 'moment';\r\nimport axios from 'axios';\r\nimport isNil from 'lodash/isNil';\r\nimport { Card, Grid, Paper, Button } from '@material-ui/core';\r\n\r\nimport SalesOfferEmailBarChart from './SalesOfferEmailBarChart';\r\nimport SalesHeader from './SalesHeader';\r\nimport AcquistionDonutChart from './SalesDonutChart';\r\nimport VehicleAdSalesChart from './VehicleAddSalesChart';\r\nimport SalesSummaryCard from './SalesSummaryCard';\r\nimport SalesAggregateTable from './SalesAggregateTable';\r\nimport DashboardFilters from '../DashboardFilters';\r\nimport { ApplicationContext } from '../../../context/Contexts';\r\nimport { SalesResult } from '../../../interfaces/Dashboard/SalesResult';\r\nimport { SalesFilter } from '../../../interfaces/Dashboard/SalesFilter';\r\nimport {\r\n salesDashboardReducer,\r\n SET_VAL_BY_NAME,\r\n SET_PERSON_TYPE_ID,\r\n SET_SALE_PERSON_ID,\r\n RESET_SALES_FILTERS\r\n} from './salesDashboardReducer';\r\nimport Loader from '../../Loader';\r\nimport SalesDashboardAppliedFilters from './SalesDashboardAppliedFilters';\r\nimport { numberFormat } from '../../../utils/numberFormat';\r\nimport { PptService } from '../../../services/PptService';\r\nimport { MUITranslations } from '../../../helpers/MUITableTranslations';\r\n\r\nconst SalesDashboard: React.FC = () => {\r\n const context = useContext(ApplicationContext);\r\n const [filters, dispatch] = useReducer(salesDashboardReducer, {\r\n startDate: moment().add(-3, 'month'),\r\n endDate: moment(),\r\n selectedOrganisations: [],\r\n clientTypeId: undefined,\r\n locationId: undefined,\r\n salePersonId: undefined\r\n });\r\n\r\n const constantsData = MUITranslations.GetDashboardTranslations(context.translatorService);\r\n\r\n const [data, setData] = useState();\r\n const setFiltersValueByName = useCallback((name: string, value: any) => {\r\n dispatch({ type: SET_VAL_BY_NAME, name, value });\r\n }, []);\r\n\r\n const setPersonTypeId = useCallback((clientTypeId?: number) => {\r\n dispatch({ type: SET_PERSON_TYPE_ID, clientTypeId });\r\n }, []);\r\n\r\n const setSalePersonId = useCallback((salePersonId?: string) => {\r\n dispatch({ type: SET_SALE_PERSON_ID, salePersonId });\r\n }, []);\r\n\r\n const resetFilters = useCallback(() => {\r\n dispatch({ type: RESET_SALES_FILTERS });\r\n }, []);\r\n\r\n const getSalesFormatTable = () => {\r\n const averageAge = context.translatorService.Tranlate(\r\n 'DASHBOARD_AVERAGE_VEHICLE_AGE',\r\n 'Varsta medie'\r\n );\r\n const total = context.translatorService.Tranlate('DASHBOARD_TOTAL', 'Total achizitie');\r\n const fixesAndOtherCosts = context.translatorService.Tranlate(\r\n 'DASHBOARD_FIXES_AND_OTHER',\r\n 'Reparatii + alte costuri'\r\n );\r\n const salePrice = context.translatorService.Tranlate(\r\n 'DASHBOARD_SALE_PRICE',\r\n 'Pret Total vanzare'\r\n );\r\n const profit = context.translatorService.Tranlate('DASHBOARD_PROFIT', 'Profit %');\r\n const totalProfit = context.translatorService.Tranlate(\r\n 'DASHBOARD_TOTAL_PROFIT',\r\n 'Profit (valoare absoluta)'\r\n );\r\n return [\r\n {\r\n title: averageAge,\r\n render: (rowData: any) => numberFormat(rowData.avgOfYear, 1)\r\n },\r\n {\r\n title: total,\r\n render: (rowData: any) => numberFormat(rowData.purchaseValue, 0, undefined, ' EUR')\r\n },\r\n {\r\n title: fixesAndOtherCosts,\r\n render: (rowData: any) => numberFormat(rowData.damageValue, 0, undefined, ' EUR')\r\n },\r\n {\r\n title: salePrice,\r\n render: (rowData: any) => numberFormat(rowData.soldValue, 0, undefined, ' EUR')\r\n },\r\n {\r\n title: profit,\r\n render: (rowData: any) => numberFormat(rowData.profitPercent)\r\n },\r\n {\r\n title: totalProfit,\r\n render: (rowData: any) => numberFormat(rowData.profitValue, 0, undefined, ' EUR')\r\n }\r\n ];\r\n };\r\n\r\n useEffect(() => {\r\n const source = axios.CancelToken.source();\r\n\r\n const getData = async () => {\r\n try {\r\n const filter: SalesFilter = {\r\n startDate: moment(new Date(filters.startDate.utc().format()).setHours(0, 0, 0))\r\n .utc()\r\n .toDate(),\r\n endDate: moment(new Date(filters.endDate.utc().format()).setHours(23, 59, 59))\r\n .utc()\r\n .toDate(),\r\n organizationIds: !isNil(filters.locationId)\r\n ? [filters.locationId]\r\n : filters.selectedOrganisations.map(({ id }) => id),\r\n personTypeIds: !isNil(filters.clientTypeId) ? [filters.clientTypeId] : [],\r\n salePersonIds: filters.salePersonId ? [filters.salePersonId] : []\r\n };\r\n\r\n if (filter.startDate && filter.endDate && filter.organizationIds.length) {\r\n const result = await context.vehicleService.GetDashboardSalesData(filter, source.token);\r\n if (result) {\r\n setData(result);\r\n }\r\n }\r\n } catch (error) {\r\n if (!axios.isCancel(error)) {\r\n throw error;\r\n }\r\n }\r\n };\r\n\r\n getData();\r\n\r\n return () => source.cancel();\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [\r\n filters.endDate,\r\n filters.startDate,\r\n filters.selectedOrganisations,\r\n context.vehicleService,\r\n filters.locationId,\r\n filters.clientTypeId,\r\n filters.salePersonId\r\n ]);\r\n\r\n const handlePersonTypeDonutClick = useCallback(\r\n (dataIndex?: number) => {\r\n if (!isNil(dataIndex)) {\r\n const clientTypeId = data?.vehiclesGroupedByClientType[dataIndex].id;\r\n if (!isNil(clientTypeId)) {\r\n setPersonTypeId(clientTypeId);\r\n }\r\n }\r\n },\r\n [data?.vehiclesGroupedByClientType, setPersonTypeId]\r\n );\r\n\r\n return (\r\n
\r\n \r\n \r\n {\r\n context.pptService = new PptService(context.translatorService, data);\r\n context.pptService.addFirstPage(filters, 'sales');\r\n context.pptService.addVerticalChart2(\r\n data?.groupedOfferAndSentEmail,\r\n context.translatorService.Tranlate(\r\n 'DASHBOARD_GENERATED_OFFERS_TITLE',\r\n 'Oferte Generate/Email'\r\n ),\r\n constantsData.groupedOfferAndSentEmail\r\n );\r\n context.pptService.addCircleChart(\r\n data?.vehiclesGroupedByClientType,\r\n context.translatorService.Tranlate('DASHBOARD_CLIENT_TYPE', 'Tip client')\r\n );\r\n context.pptService.addScatterChar(\r\n data?.advertListAndSoldVehicleListGrouped,\r\n context.translatorService.Tranlate('DASHBOARD_SALES_CHART_TITLE', 'Anunturi/Vanzari'),\r\n constantsData.advertListAndSoldVehicleListGrouped,\r\n 'Anunturi publicate',\r\n 'Masini vandute'\r\n );\r\n context.pptService.salesProfit();\r\n context.pptService.addTable(\r\n [...constantsData.salesTable, ...getSalesFormatTable()],\r\n data?.vehiclesGroupedByMakerAndModel,\r\n context.translatorService.Tranlate('DASHBOARD_SALES_TABLE_TITLE', 'Vanzari')\r\n );\r\n context.pptService.lastSalePage(data!.vehiclesGroupedByMakerAndModel[0]);\r\n context.pptService.exportPpt();\r\n }}\r\n >\r\n Export\r\n \r\n \r\n {data ? (\r\n \r\n \r\n {(data.salesChannels.length > 0 || data.topSellersBasedOnClosedFolders.length > 0) && (\r\n \r\n \r\n \r\n )}\r\n {data.groupedOfferAndSentEmail.length > 0 && (\r\n \r\n \r\n \r\n \r\n \r\n )}\r\n {data.vehiclesGroupedByClientType.length > 0 && (\r\n \r\n \r\n \r\n \r\n \r\n )}\r\n {data.advertListAndSoldVehicleListGrouped.length > 0 && (\r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n \r\n

\r\n {context.translatorService.Tranlate(\r\n 'DASHBOARD_SALES_WARRANTIES',\r\n 'Garantii vandute'\r\n )}\r\n

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

{data.guaranteeCount}

\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {data.vehiclesGroupedByMakerAndModel?.length > 0 && (\r\n \r\n )}\r\n
\r\n ) : (\r\n \r\n )}\r\n
\r\n );\r\n};\r\n\r\nexport default SalesDashboard;\r\n","import React, { useState, useContext } from 'react';\r\n\r\nimport { Tab, Tabs } from '@material-ui/core';\r\nimport TabPanel from '../_shared/Tabs';\r\nimport VehicleDashboard from './vehicles/VehicleDashboard';\r\nimport AquisitionDashboard from './acquisitions/AcquisitionDashboard';\r\nimport SalesDashboard from './sales/SalesDashboard';\r\nimport { ApplicationContext } from '../../context/Contexts';\r\n\r\nenum DashboardTab {\r\n VEHICLES = 0,\r\n AQUISITIONS = 1,\r\n SALES = 2\r\n}\r\n\r\nconst Dashboards: React.FC = () => {\r\n const context = useContext(ApplicationContext);\r\n const [selectedTab, setSelectedTab] = useState(DashboardTab.VEHICLES);\r\n\r\n return (\r\n
\r\n setSelectedTab(newTab)}\r\n >\r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default Dashboards;\r\n","import * as React from 'react';\r\nimport { ApplicationState, AppState, CaseSettingsState } from '../../store';\r\nimport { ApplicationContext, AppContext } from '../../context/Contexts';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { IReferentialService } from '../../services/Interfaces/IReferentialService';\r\nimport { IAppUserService } from '../../services/Interfaces/IAppUserService';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { Order, OrderFilters, OrderStatusHistory } from '../../interfaces/Order';\r\nimport { IOrderService } from '../../services/Interfaces/IOrderService';\r\nimport {\r\n Box,\r\n Button,\r\n Card,\r\n Dialog,\r\n DialogContent,\r\n DialogTitle,\r\n Grid,\r\n IconButton,\r\n TextField\r\n} from '@material-ui/core';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport MUIDataTable, {\r\n MUIDataTableColumnOptions,\r\n MUIDataTableMeta,\r\n SelectableRows\r\n} from 'mui-datatables';\r\nimport { MUITranslations } from '../../helpers/MUITableTranslations';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport { Organization } from '../../interfaces/Organization';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport OrderDetails from './OrderDetails';\r\nimport { AppUser } from '../../interfaces/AppUser';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport { IOrganizationService } from '../../services/Interfaces/IOrganizationService';\r\nimport { DatePicker, MuiPickersUtilsProvider } from '@material-ui/pickers';\r\nimport moment from 'moment';\r\nimport 'moment/locale/en-gb';\r\nimport 'moment/locale/ro';\r\nimport MomentUtils from '@date-io/moment';\r\nimport { MaterialUiPickersDate } from '@material-ui/pickers/typings/date';\r\nimport Referentials from '../../helpers/Referentials.json';\r\nimport { OrderStatusCode, OwnStockCodeEnum, ReferentialCode } from '../../helpers/Constants';\r\nimport * as R from 'ramda';\r\nimport _ from 'lodash';\r\nimport { Utils } from '../../helpers/Utils';\r\nimport { TariffPercentResponse } from '../../interfaces/Case';\r\n\r\nclass LocalizedUtils extends MomentUtils {\r\n // dateFormat = \"DD MM YYYY\";\r\n}\r\n\r\ntype OrdersProps = { \r\n appState: AppState; \r\n caseSettingsState: CaseSettingsState;\r\n} & ProviderContext & RouteComponentProps;\r\n\r\ninterface IOrdersState {\r\n orderList: Order[];\r\n suppliers: Organization[];\r\n selectedSuppliers: Organization[];\r\n clients: Organization[];\r\n selectedClients: Organization[];\r\n madeByUsersList: AppUser[];\r\n selectedMadeByUsersList: AppUser[];\r\n locations: Organization[];\r\n selectedLocations: Organization[];\r\n orderStatusList: IReferential[];\r\n selectedOrderStatus: IReferential[];\r\n isLoading: boolean;\r\n isSupplier: boolean;\r\n isDialogOpen: boolean;\r\n selectedDateFrom: Date;\r\n selectedDateTo: Date;\r\n orderIds: number[];\r\n selectedOrder: Order | null;\r\n count: number;\r\n page: number;\r\n pageSize: number;\r\n plateNumberSearchText: string;\r\n descriptionSearchText: string;\r\n supplierOrderNumberSearchText: string;\r\n hideOrderCurrencyColumn: boolean;\r\n}\r\n\r\nclass Orders extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private orderService!: IOrderService;\r\n private appReferentialService!: IReferentialService;\r\n private appUserService!: IAppUserService;\r\n static contextType = ApplicationContext;\r\n private organizationService!: IOrganizationService;\r\n\r\n state = {\r\n orderList: [],\r\n clients: [],\r\n suppliers: [],\r\n selectedClients: [],\r\n selectedSuppliers: [],\r\n madeByUsersList: [],\r\n selectedMadeByUsersList: [],\r\n locations: [],\r\n selectedLocations: [],\r\n orderStatusList: [],\r\n selectedOrderStatus: [],\r\n isLoading: true,\r\n isDialogOpen: false,\r\n selectedDateFrom: new Date(new Date().setMonth(new Date().getMonth() - 1)),\r\n selectedDateTo: new Date(),\r\n orderIds: [],\r\n selectedOrder: null,\r\n count: 1,\r\n page: 0,\r\n pageSize: 10,\r\n isSupplier: false,\r\n plateNumberSearchText: '',\r\n descriptionSearchText: '',\r\n supplierOrderNumberSearchText: '',\r\n hideOrderCurrencyColumn: false\r\n } as IOrdersState;\r\n\r\n public componentDidMount() {\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadOrders();\r\n }\r\n );\r\n }\r\n\r\n loadOrders = async () => {\r\n const organizationId = this.props.appState.appUser?.organizationId;\r\n const filters = {\r\n clientIds: this.state.selectedClients.map((item) => item.id),\r\n supplierIds: this.state.selectedSuppliers.map((item) => item.id),\r\n locationIds: this.state.selectedLocations.map((item) => item.id),\r\n statusIds: this.state.selectedOrderStatus.map((item) => item.id),\r\n madeByList: this.state.selectedMadeByUsersList.map((item) => item.id),\r\n dateFrom: new Date(this.state.selectedDateFrom.setHours(0, 0, 0, 0)).toISOString(),\r\n dateTo: new Date(this.state.selectedDateTo.setHours(23, 59, 59, 999)).toISOString(),\r\n page: this.state.page + 1,\r\n pageSize: this.state.pageSize,\r\n plateNumberSearchText: this.state.plateNumberSearchText.replace(/\\s+/g, ''),\r\n descriptionSearchText: this.state.descriptionSearchText,\r\n supplierOrderNumberSearchText: this.state.supplierOrderNumberSearchText\r\n } as OrderFilters;\r\n\r\n const orderList = await this.orderService.GetOrders(filters);\r\n\r\n const orderDetailsList = orderList.orders;\r\n\r\n const refOrderStatus = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.OrderStatus\r\n );\r\n\r\n const [users, clients, suppliers, orderStatus] = await Promise.all([\r\n this.appUserService.GetUsersInfo(\r\n Array.from(new Set(orderDetailsList.map((item) => item.createdBy)))\r\n ),\r\n this.organizationService.GetUserOrganizationsByIds(\r\n Array.from(new Set(orderDetailsList.map((item) => item.clientId)))\r\n ),\r\n this.organizationService.GetUserOrganizationsByIds(\r\n Array.from(new Set(orderDetailsList.map((item) => item.supplierId)))\r\n ),\r\n this.appReferentialService.Get(refOrderStatus!.baseUrl)\r\n ]);\r\n\r\n let organization: Organization | null = null;\r\n if (!R.isNil(this.props.appState!.appUser!.organizationId)) {\r\n organization = await this.organizationService.GetOrganizationInfo(\r\n this.props.appState!.appUser!.organizationId\r\n );\r\n }\r\n\r\n orderDetailsList.forEach((od) => {\r\n const user = users.find((item) => item.id === od.createdBy);\r\n const client = clients.find((item) => item.id === od.clientId);\r\n const supplier = suppliers.find((item) => item.id == od.supplierId);\r\n\r\n od.createdByUser = R.isNil(user) ? null : user;\r\n od.client = R.isNil(client) ? null : client;\r\n od.supplier = R.isNil(supplier) ? null : supplier;\r\n });\r\n const checkIfIsSupplierAccount = _.find(suppliers, function (object) {\r\n return object.id == organizationId;\r\n });\r\n this.setState(\r\n {\r\n orderList: orderDetailsList,\r\n orderStatusList: orderStatus,\r\n isLoading: false,\r\n page: orderList.page - 1,\r\n count: orderList.total,\r\n pageSize: this.state.pageSize,\r\n isSupplier: checkIfIsSupplierAccount ? true : false,\r\n hideOrderCurrencyColumn: organization ? organization.hideOrderCurrencyColumn : false\r\n },\r\n async () => {\r\n await this.reloadFilters();\r\n }\r\n );\r\n };\r\n\r\n reloadFilters = async () => {\r\n const filters = await this.orderService.GetOrderFilters({\r\n clientIds: [],\r\n supplierIds: [],\r\n locationIds: [],\r\n statusIds: [],\r\n madeByList: [],\r\n dateFrom: new Date(this.state.selectedDateFrom.setHours(0, 0, 0, 0)).toISOString(),\r\n dateTo: new Date(this.state.selectedDateTo.setHours(23, 59, 59, 999)).toISOString(),\r\n page: this.state.page + 1,\r\n pageSize: this.state.pageSize,\r\n plateNumberSearchText: this.state.plateNumberSearchText,\r\n descriptionSearchText: this.state.descriptionSearchText,\r\n supplierOrderNumberSearchText: this.state.supplierOrderNumberSearchText\r\n } as any as OrderFilters);\r\n\r\n const refOrderStatus = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.OrderStatus\r\n );\r\n\r\n const [users, orgEntities, suppliers, orderStatuses] = await Promise.all([\r\n this.appUserService.GetUsersInfo(filters.createdByList),\r\n filters.clientIds.length == 0\r\n ? []\r\n : this.organizationService.GetUserOrganizationsByIds(filters.clientIds),\r\n filters.supplierIds.length == 0\r\n ? []\r\n : this.organizationService.GetUserOrganizationsByIds(filters.supplierIds),\r\n this.appReferentialService.Get(refOrderStatus!.baseUrl)\r\n ]);\r\n\r\n const orderListStatusIds = filters.orderStatuses.map(({ id }) => id);\r\n const orderStatus = orderStatuses.filter((item) => orderListStatusIds.includes(item.id));\r\n\r\n this.setState({\r\n clients: orgEntities,\r\n madeByUsersList: users,\r\n orderStatusList: orderStatus,\r\n suppliers: suppliers\r\n });\r\n };\r\n\r\n reloadOrders = async (page: number, rowsPerPage: number) => {\r\n this.setState({ isLoading: true, selectedOrder: null });\r\n\r\n const filters = {\r\n clientIds: this.state.selectedClients.map((item) => item.id),\r\n supplierIds: this.state.selectedSuppliers.map((item) => item.id),\r\n locationIds: this.state.selectedLocations.map((item) => item.id),\r\n statusIds: this.state.selectedOrderStatus.map((item) => item.id),\r\n madeByList: this.state.selectedMadeByUsersList.map((item) => item.id),\r\n dateFrom: new Date(this.state.selectedDateFrom.setHours(0, 0, 0, 0)).toISOString(),\r\n dateTo: new Date(this.state.selectedDateTo.setHours(23, 59, 59, 999)).toISOString(),\r\n page: page + 1,\r\n pageSize: rowsPerPage,\r\n plateNumberSearchText: this.state.plateNumberSearchText.replace(/\\s+/g, ''),\r\n descriptionSearchText: this.state.descriptionSearchText,\r\n supplierOrderNumberSearchText: this.state.supplierOrderNumberSearchText\r\n } as OrderFilters;\r\n\r\n const orderList = await this.orderService.GetOrders(filters);\r\n\r\n const orderDetailsList = orderList.orders;\r\n\r\n orderDetailsList.forEach((od) => {\r\n const client = this.state.clients.find((item) => item.id === od.clientId);\r\n const user = this.state.madeByUsersList.find((item) => item.id === od.createdBy);\r\n const supplier = this.state.suppliers.find((item) => item.id == od.supplierId);\r\n\r\n od.createdByUser = R.isNil(user) ? null : user;\r\n od.client = R.isNil(client) ? null : client;\r\n od.supplier = R.isNil(supplier) ? null : supplier;\r\n });\r\n\r\n this.setState({\r\n orderList: orderDetailsList,\r\n isLoading: false,\r\n page: orderList.page - 1,\r\n pageSize: rowsPerPage,\r\n count: orderList.total\r\n });\r\n };\r\n\r\n onRowClick = async (e: any, id: number) => {\r\n const orderParts = await this.orderService.GetOrderParts(id);\r\n const order = this.state.orderList.find((item) => item.id === id);\r\n order!.orderParts = orderParts;\r\n this.props.caseSettingsState.case = null;\r\n\r\n this.setState({\r\n isDialogOpen: true,\r\n selectedOrder: order!\r\n });\r\n };\r\n\r\n getColumns = () => {\r\n let columns = [];\r\n if (this.state.isSupplier) {\r\n columns = [\r\n {\r\n name: 'id',\r\n label: 'ID',\r\n options: {\r\n filter: false,\r\n sort: false,\r\n customBodyRender: (value: string, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.onRowClick(e, tableMeta.rowData[0])}\r\n >\r\n {value}\r\n \r\n );\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'orderStatusHistories[0].date',\r\n label: this.translatorService.Tranlate('ORDER_DATE', 'Data Plasare Comanda'),\r\n options: {\r\n filter: false,\r\n sort: false,\r\n customBodyRender: (value: string, tableMeta: MUIDataTableMeta) => {\r\n const order = this.state.orderList.find((item) => item.id === tableMeta.rowData[0]);\r\n const orderStatusHistory = order!.orderStatusHistories[0];\r\n return (\r\n
\r\n {moment\r\n .utc(orderStatusHistory!.date)\r\n .local()\r\n .format(this.props.appState.longDateFormat)}\r\n
\r\n );\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'caseVehicle.plateNumber',\r\n label: this.translatorService.Tranlate(\r\n 'ORDER_VEHICLES_VEHICLE_PLATE_NUMBER',\r\n 'Nr. de inmatriculare'\r\n ),\r\n options: {\r\n sort: false,\r\n filter: false\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'caseVehicle.vin',\r\n label: 'Vin',\r\n options: {\r\n sort: false,\r\n filter: false\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'client.displayName',\r\n label: this.translatorService.Tranlate('ORDERS_CLIENT_LABEL', 'Client'),\r\n options: {\r\n sort: false,\r\n filter: false\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'amount',\r\n label: this.translatorService.Tranlate('ORDERS_VALUE_LABEL', 'Valoare'),\r\n options: {\r\n filter: false,\r\n sort: false,\r\n setCellProps: () => ({ style: { whiteSpace: 'nowrap' } }),\r\n customBodyRender: (value: number, tableMeta: MUIDataTableMeta) => {\r\n return Utils.countryNumberFormat(value.toString(), this.props.appState.appUser?.organization?.country ?? null);\r\n }\r\n }\r\n },\r\n {\r\n name: 'currencyCode',\r\n label: this.translatorService.Tranlate('ORDERS_CURRENCY_LABEL', 'Moneda'),\r\n options: {\r\n sort: false,\r\n filter: false\r\n }\r\n },\r\n {\r\n name: 'createdByUser.userName',\r\n label: this.translatorService.Tranlate('ORDERS_MADE_BY_LABEL', 'Efectuat De'),\r\n options: {\r\n sort: false,\r\n filter: false,\r\n customBodyRender: (value: any, tableMeta: MUIDataTableMeta) => {\r\n const order = this.state.orderList.find((item) => item.id === tableMeta.rowData[0]);\r\n return (\r\n \r\n \r\n
{value}
\r\n
\r\n \r\n
\r\n {moment\r\n .utc(order!.date)\r\n .local()\r\n .format(this.props.appState.longDateFormat)}\r\n
\r\n
\r\n
\r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'orderStatus.displayName',\r\n label: this.translatorService.Tranlate('ORDERS_STATUS_LABEL', 'Stare'),\r\n options: {\r\n sort: false,\r\n filter: false,\r\n customBodyRender: (value: any, tableMeta: MUIDataTableMeta) => {\r\n const order = this.state.orderList.find((item) => item.id === tableMeta.rowData[0]);\r\n const orderStatusHistory = order!.orderStatusHistories;\r\n return orderStatusHistory.map((orderStatusHistory: OrderStatusHistory, index) => {\r\n return
{orderStatusHistory.orderStatus?.displayName}
;\r\n });\r\n }\r\n }\r\n },\r\n {\r\n name: 'supplierOrderNumber',\r\n label: this.translatorService.Tranlate('ORDERS_ID_FURNIZOR_LABEL', 'Nr. Comanda'),\r\n options: {\r\n sort: false,\r\n filter: false,\r\n customBodyRender: (value: any, tableMeta: MUIDataTableMeta) => {\r\n const order = this.state.orderList.find((item) => item.id === tableMeta.rowData[0]);\r\n const orderStatusHistory = order!.orderStatusHistories;\r\n return orderStatusHistory.map((orderStatusHistory: OrderStatusHistory, index) => {\r\n return (\r\n
\r\n {orderStatusHistory.orderStatus?.code == OrderStatusCode.FZR_COMANDA_CONFIRMATA\r\n ? order?.supplierOrderNumber\r\n : '-'}\r\n
\r\n );\r\n });\r\n }\r\n }\r\n }\r\n ];\r\n } else {\r\n columns = [\r\n {\r\n name: 'id',\r\n label: 'ID',\r\n options: {\r\n filter: false,\r\n sort: false,\r\n customBodyRender: (value: string, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.onRowClick(e, tableMeta.rowData[0])}\r\n >\r\n {value}\r\n \r\n );\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'orderStatusHistories[0].date',\r\n label: this.translatorService.Tranlate('ORDER_DATE', 'Data Plasare Comanda'),\r\n options: {\r\n filter: false,\r\n sort: false,\r\n customBodyRender: (value: string, tableMeta: MUIDataTableMeta) => {\r\n const order = this.state.orderList.find((item) => item.id === tableMeta.rowData[0]);\r\n const orderStatusHistory = order!.orderStatusHistories[0];\r\n return (\r\n
\r\n {moment\r\n .utc(orderStatusHistory!.date)\r\n .local()\r\n .format(this.props.appState.longDateFormat)}\r\n
\r\n );\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'caseVehicle.plateNumber',\r\n label: this.translatorService.Tranlate(\r\n 'ORDER_VEHICLES_VEHICLE_PLATE_NUMBER',\r\n 'Nr. de inmatriculare'\r\n ),\r\n options: {\r\n sort: false,\r\n filter: false\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'caseVehicle.vin',\r\n label: 'Vin',\r\n options: {\r\n sort: false,\r\n filter: false\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'supplier.name',\r\n label: this.translatorService.Tranlate('ORDER_PART_DETAILS_SUPPLIER_LABEL', 'Furnizor'),\r\n options: {\r\n filter: false,\r\n customBodyRender: (value: IReferential, tableMeta: MUIDataTableMeta) => {\r\n const order = this.state.orderList.find((item) => item.id === tableMeta.rowData[0]);\r\n if (R.isNil(order)) {\r\n return '';\r\n }\r\n \r\n return !R.isNil(order.supplier) ? (order.supplier!.name.toUpperCase() == OwnStockCodeEnum.OWN_STOCK.toString() ? this.translatorService.Tranlate('CALCULATION_DETAILS_OWN_STOCK_HEADER', 'Stoc Propriu') : order.supplier!.name) : '';\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'amount',\r\n label: this.translatorService.Tranlate('ORDERS_VALUE_LABEL', 'Valoare'),\r\n options: {\r\n filter: false,\r\n sort: false,\r\n setCellProps: () => ({ style: { whiteSpace: 'nowrap' } }),\r\n customBodyRender: (value: number, tableMeta: MUIDataTableMeta) => {\r\n const order = this.state.orderList.find((item) => item.id === tableMeta.rowData[0]);\r\n if (order == null) {\r\n return '';\r\n }\r\n if (this.state.hideOrderCurrencyColumn) {\r\n return Utils.countryNumberFormat(value.toString(), this.props.appState.appUser?.organization?.country ?? null) + ' (' + order.currencyCode + ')';\r\n }\r\n return Utils.countryNumberFormat(value.toString(), this.props.appState.appUser?.organization?.country ?? null);\r\n }\r\n }\r\n },\r\n {\r\n name: 'currencyCode',\r\n label: this.translatorService.Tranlate('ORDERS_CURRENCY_LABEL', 'Moneda'),\r\n options: {\r\n sort: false,\r\n display: !this.state.hideOrderCurrencyColumn,\r\n filter: false\r\n }\r\n },\r\n {\r\n name: 'caseEvent.interventionType',\r\n label: this.translatorService.Tranlate('CASE_EVENT_INTERVENTION_TYPE_LABEL', 'Tip Interventie'),\r\n options: {\r\n display: this.state.hideOrderCurrencyColumn,\r\n filter: false,\r\n sort: false,\r\n customBodyRender: (interventionType: any, tableMeta: MUIDataTableMeta) => {\r\n return interventionType ? interventionType.displayName : \"\";\r\n }\r\n }\r\n },\r\n {\r\n name: 'createdByUser.userName',\r\n label: this.translatorService.Tranlate('ORDERS_MADE_BY_LABEL', 'Efectuat De'),\r\n options: {\r\n sort: false,\r\n filter: false,\r\n customBodyRender: (value: any, tableMeta: MUIDataTableMeta) => {\r\n const order = this.state.orderList.find((item) => item.id === tableMeta.rowData[0]);\r\n return (\r\n \r\n \r\n
{value}
\r\n
\r\n \r\n
\r\n {moment\r\n .utc(order!.date)\r\n .local()\r\n .format(this.props.appState.longDateFormat)}\r\n
\r\n
\r\n
\r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'orderStatus.displayName',\r\n label: this.translatorService.Tranlate('ORDERS_STATUS_LABEL', 'Stare'),\r\n options: {\r\n sort: false,\r\n filter: false,\r\n customBodyRender: (value: any, tableMeta: MUIDataTableMeta) => {\r\n const order = this.state.orderList.find((item) => item.id === tableMeta.rowData[0]);\r\n const orderStatusHistory = order!.orderStatusHistories;\r\n return orderStatusHistory.map((orderStatusHistory: OrderStatusHistory, index) => {\r\n return
{orderStatusHistory.orderStatus?.displayName}
;\r\n });\r\n }\r\n }\r\n },\r\n {\r\n name: 'supplierOrderNumber',\r\n label: this.translatorService.Tranlate('ORDERS_ID_FURNIZOR_LABEL', 'Nr. Comanda'),\r\n options: {\r\n sort: false,\r\n filter: false,\r\n customBodyRender: (value: any, tableMeta: MUIDataTableMeta) => {\r\n const order = this.state.orderList.find((item) => item.id === tableMeta.rowData[0]);\r\n const orderStatusHistory = order!.orderStatusHistories;\r\n return orderStatusHistory.map((orderStatusHistory: OrderStatusHistory, index) => {\r\n return (\r\n
\r\n {orderStatusHistory.orderStatus?.code == OrderStatusCode.FZR_COMANDA_CONFIRMATA\r\n ? order?.supplierOrderNumber\r\n : '-'}\r\n
\r\n );\r\n });\r\n }\r\n }\r\n }\r\n ];\r\n }\r\n\r\n return columns;\r\n };\r\n\r\n handleDateChangeFrom = async (date: MaterialUiPickersDate | null, value?: string | null) => {\r\n if (date === null || !date.isValid) {\r\n return;\r\n }\r\n this.setState(\r\n {\r\n selectedDateFrom: date!.toDate(),\r\n isLoading: false\r\n },\r\n async () => {\r\n await this.loadOrders();\r\n }\r\n );\r\n };\r\n\r\n handleDateChangeTo = async (date: MaterialUiPickersDate | null, value?: string | null) => {\r\n if (date === null || !date.isValid) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n selectedDateTo: date!.toDate(),\r\n isLoading: false\r\n },\r\n async () => {\r\n await this.loadOrders();\r\n }\r\n );\r\n };\r\n\r\n handleClientsChange = (newValue: any[]) => {\r\n this.setState(\r\n {\r\n selectedClients: newValue,\r\n isLoading: true\r\n },\r\n async () => await this.reloadOrders(this.state.page, this.state.pageSize)\r\n );\r\n };\r\n\r\n handleSuppliersChange = (newValue: any[]) => {\r\n this.setState(\r\n {\r\n selectedSuppliers: newValue,\r\n isLoading: true\r\n },\r\n async () => await this.reloadOrders(this.state.page, this.state.pageSize)\r\n );\r\n };\r\n\r\n handleMadeByUsersChange = (newValue: any[]) => {\r\n this.setState(\r\n {\r\n selectedMadeByUsersList: newValue,\r\n isLoading: true\r\n },\r\n async () => await this.reloadOrders(this.state.page, this.state.pageSize)\r\n );\r\n };\r\n\r\n handleLocationsChange = (newValue: any[]) => {\r\n this.setState(\r\n {\r\n selectedLocations: newValue,\r\n isLoading: true\r\n },\r\n async () => await this.reloadOrders(this.state.page, this.state.pageSize)\r\n );\r\n };\r\n\r\n handleStatusesChange = (newValue: any[]) => {\r\n this.setState(\r\n {\r\n selectedOrderStatus: newValue,\r\n isLoading: true\r\n },\r\n async () => await this.reloadOrders(this.state.page, this.state.pageSize)\r\n );\r\n };\r\n\r\n handlePlateNumberChange = (newValue: string) => {\r\n this.setState({\r\n plateNumberSearchText: newValue\r\n });\r\n };\r\n\r\n handleDescriptionChange = (newValue: string) => {\r\n this.setState({\r\n descriptionSearchText: newValue\r\n });\r\n };\r\n\r\n handleSupplierOrderNumberChange = (newValue: string) => {\r\n this.setState({\r\n supplierOrderNumberSearchText: newValue\r\n });\r\n };\r\n\r\n renderFilters = () => {\r\n return (\r\n
\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n this.handleMadeByUsersChange(newValue)}\r\n getOptionLabel={(option: AppUser) => option.userName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n this.handlePlateNumberChange(e.target.value)}\r\n onBlur={(e: any) => this.reloadOrders(this.state.page, this.state.pageSize)}\r\n />\r\n
\r\n
\r\n this.handleSupplierOrderNumberChange(e.target.value)}\r\n onBlur={(e: any) => this.reloadOrders(this.state.page, this.state.pageSize)}\r\n />\r\n
\r\n {/* this.handleLocationsChange(newValue)}\r\n getOptionLabel={(option: Organization) => option.displayName || \"\"}\r\n renderInput={params => (\r\n \r\n )}\r\n /> */}\r\n
\r\n \r\n {this.state.isSupplier ? (\r\n this.handleClientsChange(newValue)}\r\n getOptionLabel={(option: Organization) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n ) : (\r\n this.handleSuppliersChange(newValue)}\r\n getOptionLabel={(option: Organization) => option.name.toUpperCase() == OwnStockCodeEnum.OWN_STOCK.toString() ? this.translatorService.Tranlate('CALCULATION_DETAILS_OWN_STOCK_HEADER', 'Stoc Propriu') : option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n )}\r\n this.handleStatusesChange(newValue)}\r\n getOptionLabel={(option: any) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n this.handleDescriptionChange(e.target.value)}\r\n onBlur={(e: any) => this.reloadOrders(this.state.page, this.state.pageSize)}\r\n />\r\n
\r\n
\r\n
\r\n
\r\n );\r\n };\r\n\r\n closeDialog = async () => {\r\n this.setState(\r\n {\r\n isDialogOpen: false,\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadOrders();\r\n }\r\n );\r\n };\r\n\r\n onOrderChange = (order: Order) => {\r\n this.setState({\r\n selectedOrder: \r\n {\r\n ...this.state.selectedOrder!,\r\n amount: order.amount,\r\n amountTVA: order.amountTVA,\r\n amountWithoutTVA: order.amountWithoutTVA,\r\n orderParts: [...order.orderParts!],\r\n orderStatus: order.orderStatus,\r\n orderStatusId: order.orderStatusId\r\n }\r\n });\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.orderService = (this.context as AppContext).orderService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n this.appUserService = (this.context as AppContext).appUserService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n\r\n const options = {\r\n filter: false,\r\n search: false,\r\n viewColumns: false,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n elevation: 0,\r\n serverSide: true,\r\n count: this.state.count,\r\n rowsPerPage: this.state.pageSize,\r\n page: this.state.page,\r\n onTableChange: async (action: any, tableState: any) => {\r\n switch (action) {\r\n case 'changePage':\r\n await this.reloadOrders(tableState.page, tableState.rowsPerPage);\r\n break;\r\n case 'changeRowsPerPage':\r\n await this.reloadOrders(tableState.page, tableState.rowsPerPage);\r\n break;\r\n case 'sort':\r\n // this.sort(tableState.page, tableState.sortOrder);\r\n break;\r\n default:\r\n //console.log('action not handled.');\r\n }\r\n }\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n {this.translatorService.Tranlate('ORDERS_TAB_TITLE', 'Comenzi')}\r\n \r\n
\r\n
\r\n \r\n
\r\n {!this.state.isLoading ?
{this.renderFilters()}
: null}\r\n\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n ) : null}\r\n
\r\n \r\n \r\n \r\n \r\n {this.translatorService.Tranlate('ORDERS_DIALOG_TITLE', 'Detalii comanda')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.state.selectedOrder === null ? null : (\r\n {console.log('automatePlaceOrderChange')}}\r\n />\r\n )}\r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app,\r\n caseSettingsState: state.caseSettings\r\n }),\r\n null\r\n)(withSnackbar(Orders as any));\r\n","import React, { useMemo, useRef, useState } from 'react';\r\nimport {\r\n Button,\r\n IconButton,\r\n Modal,\r\n Paper,\r\n TextField,\r\n Dialog,\r\n DialogContent,\r\n DialogActions,\r\n DialogContentText\r\n} from '@material-ui/core';\r\nimport MaterialTable from 'material-table';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport moment, { Moment } from 'moment';\r\nimport { v4 as uuidv4 } from 'uuid';\r\nimport * as R from 'ramda';\r\n\r\nimport { getLocalization, MaterialTableIcons } from '../_shared/TableSettings';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { DatePicker, MuiPickersUtilsProvider } from '@material-ui/pickers';\r\nimport MomentUtils from '@date-io/moment';\r\nimport { SimpleVehicle } from '../../interfaces/Vehicle';\r\nimport { IVehicleService } from '../../services/Interfaces/IVehicleService';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport CSVReader from 'react-csv-reader';\r\n\r\nconst dateFormat = 'DD.MM.YYYY';\r\nconst dateFomratToSend = 'YYYY-MM-DD';\r\nconst vatOptions = [19, 0];\r\n\r\ninterface Props {\r\n isOpen: boolean;\r\n handleClose: () => void;\r\n translatorService: ITranslatorService;\r\n vehicleService: IVehicleService;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n enqueueSnackbar(param1: any, param2: any): void;\r\n}\r\n\r\ninterface ImportVehicle {\r\n id: string;\r\n plateNumber: string;\r\n firstRegistrationDate: Moment;\r\n kilometersNr: number;\r\n vin: string;\r\n purchasePrice: number;\r\n}\r\n\r\nclass LocalizedUtils extends MomentUtils {}\r\n\r\nconst VehicleImportModal: React.FC = ({\r\n isOpen,\r\n handleClose,\r\n translatorService,\r\n vehicleService,\r\n enqueueSnackbar\r\n}) => {\r\n const [vehicles, setVehicles] = useState([]);\r\n const [purchaseVatRate, setPurchaseVatRate] = useState(vatOptions[0]);\r\n const [dialogVisible, setDialogVisible] = useState(false);\r\n\r\n const columns = useMemo(() => {\r\n return [\r\n {\r\n field: 'plateNumber',\r\n title: translatorService.Tranlate('VEHICLES_VEHICLE_PLATE_NUMBER', 'Numar inmatriculare'),\r\n editComponent: (props: any) => (\r\n props.onChange(e.target.value)}\r\n />\r\n )\r\n },\r\n {\r\n field: 'firstRegistrationDate',\r\n title: translatorService.Tranlate(\r\n 'VEHICLES_VEHICLE_FIRST_REGISTRATION_DATE',\r\n 'Data primei inmatriculari'\r\n ),\r\n render: (props: ImportVehicle) => {\r\n return
{props.firstRegistrationDate?.format(dateFormat)}
;\r\n },\r\n editComponent: (props: any) => (\r\n \r\n {\r\n props.onChange(value);\r\n }}\r\n />\r\n \r\n )\r\n },\r\n {\r\n field: 'kilometersNr',\r\n title: translatorService.Tranlate('VEHICLES_VEHICLE_NR_OF_KM', 'KM'),\r\n editComponent: (props: any) => (\r\n props.onChange(e.target.value)}\r\n />\r\n )\r\n },\r\n {\r\n field: 'vin',\r\n title: translatorService.Tranlate('VEHICLES_VEHICLE_VIN', 'VIN'),\r\n editComponent: (props: any) => (\r\n props.onChange(e.target.value)}\r\n />\r\n )\r\n },\r\n {\r\n field: 'purchasePrice',\r\n title: translatorService.Tranlate(\r\n 'VEHICLES_VEHICLE_PURCHASE_EUR_PRICE',\r\n 'Pret Achizitie EUR cu TVA'\r\n ),\r\n editComponent: (props: any) => (\r\n props.onChange(e.target.value)}\r\n />\r\n )\r\n }\r\n ];\r\n }, [translatorService]);\r\n\r\n const handleImport = async () => {\r\n setDialogVisible(false);\r\n const simpleVehicles: SimpleVehicle[] = vehicles.map((vehicle) => {\r\n return {\r\n vin: vehicle.vin,\r\n kilometersNr: vehicle.kilometersNr,\r\n plateNumber: vehicle.plateNumber,\r\n firstRegistrationDate: vehicle.firstRegistrationDate.format(dateFomratToSend),\r\n purchasePrice: vehicle.purchasePrice,\r\n purchaseVatRate: purchaseVatRate ?? vatOptions[0]\r\n };\r\n });\r\n\r\n try {\r\n const result = await vehicleService.SaveImportedVehicles(simpleVehicles);\r\n\r\n enqueueSnackbar(\r\n
\r\n

\r\n {translatorService.Tranlate('VEHICLES_VEHICLE_IMPORTED', 'Vehicule importate: ')}{' '}\r\n {result.importedVehicleVins.length\r\n ? result.importedVehicleVins.join(', ')\r\n : translatorService.Tranlate('VEHICLE_SEARCH_FORM_VEHICLE_NO', 'Nu')}\r\n

\r\n

\r\n {translatorService.Tranlate('VEHICLES_VEHICLE_COPIED', 'Vehicule copiate: ')}{' '}\r\n {result.copiedVehicleVins.length\r\n ? result.copiedVehicleVins.join(', ')\r\n : translatorService.Tranlate('VEHICLE_SEARCH_FORM_VEHICLE_NO', 'Nu')}\r\n

\r\n

\r\n {translatorService.Tranlate('VEHICLES_VEHICLE_DUPLICATED', 'Vehicule duplicate: ')}{' '}\r\n {result.duplicatedVehicleVins.length\r\n ? result.duplicatedVehicleVins.join(', ')\r\n : translatorService.Tranlate('VEHICLE_SEARCH_FORM_VEHICLE_NO', 'Nu')}\r\n

\r\n
,\r\n {\r\n variant: 'info',\r\n autoHideDuration: 6000\r\n }\r\n );\r\n\r\n setVehicles([]);\r\n } catch {\r\n enqueueSnackbar('There was an unexpected error while importing the vehicles', {\r\n variant: 'error',\r\n autoHideDuration: 6000\r\n });\r\n }\r\n };\r\n\r\n const handleAutoImport = (value: any) => {\r\n const trimmedValue = value.trim();\r\n\r\n if (!trimmedValue) {\r\n return;\r\n }\r\n\r\n let results = trimmedValue.split(' ');\r\n\r\n const invalidValues: string[] = [];\r\n\r\n try {\r\n const temp = [];\r\n for (let i = 1; i < results.length + 1; i++) {\r\n if (i < 5) continue;\r\n if (i % 5 == 0) {\r\n temp.push(\r\n `${results[i - 5]},${results[i - 4]},${results[i - 3]},${results[i - 2]},${\r\n results[i - 1]\r\n }`\r\n );\r\n }\r\n }\r\n results = temp;\r\n\r\n const importedVehicles: ImportVehicle[] = [];\r\n\r\n results.forEach((element: string) => {\r\n if (element) {\r\n const newVehicleArr = element.split(',');\r\n\r\n const date = moment(newVehicleArr[1], dateFormat, true);\r\n\r\n if (!date.isValid()) {\r\n invalidValues.push(newVehicleArr[1]);\r\n }\r\n\r\n if (!R.test(/^(?=.*[0-9])(?=.*[A-z])[0-9A-z-]{17}$/, newVehicleArr[3])) {\r\n invalidValues.push(newVehicleArr[3]);\r\n }\r\n\r\n const km = parseInt(newVehicleArr[2], 10);\r\n\r\n if (isNaN(km)) {\r\n invalidValues.push(newVehicleArr[2]);\r\n }\r\n\r\n const purchasePrice = parseInt(newVehicleArr[4], 10);\r\n\r\n if (!invalidValues.length) {\r\n importedVehicles.push({\r\n id: uuidv4(),\r\n plateNumber: newVehicleArr[0],\r\n firstRegistrationDate: date,\r\n kilometersNr: km,\r\n vin: newVehicleArr[3],\r\n purchasePrice\r\n });\r\n }\r\n }\r\n });\r\n\r\n if (!invalidValues.length) {\r\n setVehicles([...vehicles, ...importedVehicles]);\r\n } else {\r\n throw 'error';\r\n }\r\n } catch {\r\n enqueueSnackbar(`There are some invalid values: ${invalidValues.join(', ')}`, {\r\n variant: 'error',\r\n autoHideDuration: 10000\r\n });\r\n }\r\n };\r\n\r\n const checkIfDataIsValid = (data: ImportVehicle): boolean => {\r\n if (\r\n data &&\r\n data.id &&\r\n data.firstRegistrationDate &&\r\n data.kilometersNr &&\r\n data.plateNumber &&\r\n data.vin &&\r\n R.test(/^(?=.*[0-9])(?=.*[A-z])[0-9A-z-]{17}$/, data.vin) &&\r\n data.purchasePrice\r\n ) {\r\n return true;\r\n }\r\n\r\n return false;\r\n };\r\n\r\n const handleRowAdd = (newData: ImportVehicle) => {\r\n return new Promise((resolve, reject) => {\r\n if (!newData.firstRegistrationDate) {\r\n newData.firstRegistrationDate = moment();\r\n }\r\n\r\n if (!newData.id) {\r\n newData.id = uuidv4();\r\n }\r\n\r\n if (checkIfDataIsValid(newData)) {\r\n setVehicles([newData, ...vehicles]);\r\n resolve(newData);\r\n }\r\n\r\n reject();\r\n });\r\n };\r\n\r\n const handleRowUpdate = (newData: ImportVehicle) => {\r\n return new Promise((resolve, reject) => {\r\n if (checkIfDataIsValid(newData)) {\r\n const newVehicles = [...vehicles];\r\n const vehicleIndex = newVehicles.findIndex(({ id }) => id === newData.id);\r\n if (vehicleIndex >= 0) {\r\n newData.firstRegistrationDate = moment(newData.firstRegistrationDate);\r\n newVehicles[vehicleIndex] = newData;\r\n setVehicles(newVehicles);\r\n resolve(newData);\r\n }\r\n }\r\n\r\n reject();\r\n });\r\n };\r\n\r\n const handleRowDelete = (oldData: ImportVehicle) => {\r\n return new Promise((resolve, reject) => {\r\n if (oldData.id) {\r\n setVehicles(vehicles.filter(({ id }) => id !== oldData.id));\r\n resolve(1);\r\n }\r\n\r\n reject();\r\n });\r\n };\r\n\r\n const handleCloseConfirmationDialog = () => {\r\n setDialogVisible(false);\r\n };\r\n\r\n const handleOpenConfirmationDialog = () => {\r\n setDialogVisible(true);\r\n };\r\n\r\n const handleCloseModal = () => {\r\n setVehicles([]);\r\n setPurchaseVatRate(vatOptions[0]);\r\n handleClose();\r\n };\r\n\r\n const handleAutoImportFromCsv = (value: any) => {\r\n const trimmedValue = value.trim();\r\n\r\n if (!trimmedValue) {\r\n return;\r\n }\r\n\r\n let results = trimmedValue.split(' ');\r\n\r\n const invalidValues: string[] = [];\r\n\r\n try {\r\n const temp = [];\r\n for (let i = 1; i < results.length + 1; i++) {\r\n if (i < 5) continue;\r\n if (i % 5 == 0) {\r\n temp.push(\r\n `${results[i - 5]},${results[i - 4]},${results[i - 3]},${results[i - 2]},${\r\n results[i - 1]\r\n }`\r\n );\r\n }\r\n }\r\n results = temp;\r\n\r\n const importedVehicles: ImportVehicle[] = [];\r\n\r\n results.forEach((element: string) => {\r\n if (element) {\r\n const newVehicleArr = element.split(',');\r\n\r\n const date = moment(newVehicleArr[1], dateFormat, true);\r\n\r\n if (!date.isValid()) {\r\n invalidValues.push(newVehicleArr[1]);\r\n }\r\n\r\n if (!R.test(/^(?=.*[0-9])(?=.*[A-z])[0-9A-z-]{17}$/, newVehicleArr[3])) {\r\n invalidValues.push(newVehicleArr[3]);\r\n }\r\n\r\n const km = parseInt(newVehicleArr[2], 10);\r\n\r\n if (isNaN(km)) {\r\n invalidValues.push(newVehicleArr[2]);\r\n }\r\n\r\n const purchasePrice = parseInt(newVehicleArr[4], 10);\r\n\r\n if (!invalidValues.length) {\r\n importedVehicles.push({\r\n id: uuidv4(),\r\n plateNumber: newVehicleArr[0],\r\n firstRegistrationDate: date,\r\n kilometersNr: km,\r\n vin: newVehicleArr[3],\r\n purchasePrice\r\n });\r\n }\r\n }\r\n });\r\n\r\n if (!invalidValues.length) {\r\n setVehicles([...vehicles, ...importedVehicles]);\r\n } else {\r\n setVehicles([...vehicles, ...importedVehicles]);\r\n throw 'error';\r\n }\r\n } catch {\r\n enqueueSnackbar(`There are some invalid values: ${invalidValues.join(', ')}`, {\r\n variant: 'error',\r\n autoHideDuration: 10000\r\n });\r\n }\r\n };\r\n\r\n const importCars = (data: any) => {\r\n let importedValues = '';\r\n for (let i = 0; i < data.length; i++) {\r\n importedValues += data[i].join(' ') + ' ';\r\n }\r\n console.log('Value', importedValues);\r\n handleAutoImportFromCsv(importedValues);\r\n const e = (document.getElementById('CSVReader') as HTMLInputElement);\r\n console.log(e);\r\n if (e) {\r\n e.value = '';\r\n }\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n {`${translatorService.Tranlate(\r\n 'VEHICLE_AUTO_IMPORT_CONFIRMATION_MESSAGE',\r\n 'Sunteti sigur ca doriti salvarea cu TVA'\r\n )} ${purchaseVatRate}%?`}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n

\r\n {translatorService.Tranlate(\r\n 'VEHICLE_VEHICLE_AUTO_IMPORT_FORMAT',\r\n 'Format acceptat: '\r\n )}\r\n
\r\n BN71ARD 27.02.2021 20000 5NPDH4AE8FH607111 25000\r\n
\r\n CJ22FRM 21.01.2020 60325 1GCCS13E388107108 13200\r\n

\r\n \r\n
\r\n {translatorService.Tranlate('VEHICLES_VEHICLE_IMPORT_VEHICLES_CSV', 'Importa')}\r\n
\r\n {\r\n console.log('CSV Data', data);\r\n importCars(data);\r\n }}\r\n />\r\n \r\n ) =>\r\n handleAutoImport(e.target.value)\r\n }\r\n />\r\n `${option}`}\r\n onChange={(e: any, newValue: any | null) => setPurchaseVatRate(newValue)}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n ,\r\n Pagination: () => null\r\n // Toolbar: () => null\r\n }}\r\n editable={{\r\n onRowAdd: (newData) => handleRowAdd(newData),\r\n onRowUpdate: (newData) => handleRowUpdate(newData),\r\n onRowDelete: (oldData) => handleRowDelete(oldData)\r\n }}\r\n />\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default VehicleImportModal;\r\n","import React, { useState } from 'react';\r\nimport { Button } from '@material-ui/core';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { IVehicleService } from '../../services/Interfaces/IVehicleService';\r\n\r\ninterface Props {\r\n translatorService: ITranslatorService;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n enqueueSnackbar(param1: any, param2: any): void;\r\n vehicleService: IVehicleService;\r\n}\r\n\r\nconst ImportVehiclesRenaultButton: React.FC = ({\r\n translatorService,\r\n enqueueSnackbar,\r\n vehicleService\r\n}) => {\r\n const [fileInputKey, setFileInputKey] = useState(0);\r\n\r\n const handleImportOriginalParts = async (event: React.ChangeEvent) => {\r\n event.preventDefault();\r\n\r\n const files = event.target.files;\r\n\r\n if (!files || files.length === 0) {\r\n return;\r\n }\r\n\r\n const file = event.target.files![0];\r\n\r\n try {\r\n const result = await vehicleService.SaveImportedXlsxVehicles(file);\r\n\r\n enqueueSnackbar(\r\n
\r\n

\r\n {translatorService.Tranlate('VEHICLES_VEHICLE_IMPORTED', 'Vehicule importate: ')}{' '}\r\n {result.importedVehicleVins.length\r\n ? result.importedVehicleVins.join(', ')\r\n : translatorService.Tranlate('VEHICLE_SEARCH_FORM_VEHICLE_NO', 'Nu')}\r\n

\r\n

\r\n {translatorService.Tranlate('VEHICLES_VEHICLE_DUPLICATED', 'Vehicule duplicate: ')}{' '}\r\n {result.duplicatedVehicleVins.length\r\n ? result.duplicatedVehicleVins.join(', ')\r\n : translatorService.Tranlate('VEHICLE_SEARCH_FORM_VEHICLE_NO', 'Nu')}\r\n

\r\n
,\r\n {\r\n variant: 'info',\r\n autoHideDuration: 6000\r\n }\r\n );\r\n setFileInputKey((prevKey) => prevKey + 1);\r\n } catch {\r\n enqueueSnackbar('There was an unexpected error while importing the vehicles', {\r\n variant: 'error',\r\n autoHideDuration: 6000\r\n });\r\n setFileInputKey((prevKey) => prevKey + 1);\r\n }\r\n };\r\n\r\n return (\r\n <>\r\n \r\n document.getElementById('importXlsxFile')?.click()}\r\n >\r\n {translatorService.Tranlate(\r\n 'VEHICLES_VEHICLE_IMPORT_VEHICLES_XLSX_FILE',\r\n 'Importa Vehicule Renault'\r\n )}\r\n \r\n \r\n );\r\n};\r\n\r\nexport default ImportVehiclesRenaultButton;\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n ApplicationState,\r\n CaseSettingsState,\r\n AppState,\r\n CaseSettingsActionCreators,\r\n VehicleState\r\n} from '../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { Button, Grid } from '@material-ui/core';\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { WorkflowSectionStepForm } from '../../interfaces/Workflow';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport { IReferentialService } from '../../services/Interfaces/IReferentialService';\r\nimport {\r\n ParametreCode,\r\n ReferentialCode,\r\n OfferTypeCode,\r\n CurrencyCode,\r\n Constants,\r\n CaseStatusCodeEnum,\r\n GuaranteeTypeEnum,\r\n VehicleStatusCodeEnum,\r\n RenaultGoldList\r\n} from '../../helpers/Constants';\r\nimport { IAppUserService } from '../../services/Interfaces/IAppUserService';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport Referentials from '../../helpers/Referentials.json';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport NumberFormat from 'react-number-format';\r\nimport { IVehicleService } from '../../services/Interfaces/IVehicleService';\r\nimport { VehicleOffer } from '../../interfaces/Vehicle';\r\nimport { Utils } from '../../helpers/Utils';\r\nimport { IReportsService } from '../../services/Interfaces/IReportsService';\r\nimport * as R from 'ramda';\r\nimport { CaseTypeCode } from '../../helpers/Constants';\r\nimport _ from 'lodash';\r\nimport { CurrencyEnum } from '../../enums/CurrencyEnum';\r\nimport { CaseAttachment, CaseRequest, ChangeCaseStatusRequest } from '../../interfaces/Case';\r\nimport { Autocomplete } from '@material-ui/lab';\r\n\r\ninterface ICaseDetailsCaseTabSaleOfferFormDialogState {\r\n isLoading: boolean;\r\n hasRights: boolean;\r\n executing: boolean;\r\n isUserHidden: boolean;\r\n vehicleOfferData: VehicleOffer;\r\n guaranteeTypes: IReferential[];\r\n offerTypes: IReferential[];\r\n offers: VehicleOffer[];\r\n offerType: IReferential | null;\r\n contractOffer?: VehicleOffer;\r\n contractPrice?: number;\r\n contractModalOpened: boolean;\r\n displaySecondCurrency: boolean;\r\n saleChannels: IReferential[];\r\n}\r\n\r\nexport interface ExternalCaseDetailsCaseTabSaleOfferFormDialogProps {\r\n workflowForm: WorkflowSectionStepForm;\r\n isSaleOfferType: boolean;\r\n closeDialog: () => any;\r\n}\r\n\r\ntype ICaseDetailsCaseTabSaleOfferFormDialogProps =\r\n ExternalCaseDetailsCaseTabSaleOfferFormDialogProps & {\r\n caseSettingsState: CaseSettingsState;\r\n appState: AppState;\r\n vehicleState: VehicleState;\r\n } & typeof CaseSettingsActionCreators &\r\n ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass CaseDetailsCaseTabSaleOfferFormDialog extends React.PureComponent<\r\n ICaseDetailsCaseTabSaleOfferFormDialogProps,\r\n ICaseDetailsCaseTabSaleOfferFormDialogState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private caseService!: ICaseService;\r\n private vehicleService!: IVehicleService;\r\n private appReferentialService!: IReferentialService;\r\n private appUserService!: IAppUserService;\r\n private reportService!: IReportsService;\r\n private checkIfCurrencyIsEurOrRon: boolean =\r\n this.props.caseSettingsState.case!.caseParameters.find(\r\n (p) => p.parameter!.code === ParametreCode.CURRENCY\r\n )!.value == CurrencyCode.EUR ||\r\n this.props.caseSettingsState.case!.caseParameters.find(\r\n (p) => p.parameter!.code === ParametreCode.CURRENCY\r\n )!.value == CurrencyCode.RON;\r\n static contextType = ApplicationContext;\r\n state = {\r\n isLoading: true,\r\n hasRights: false,\r\n executing: false,\r\n isUserHidden: false,\r\n guaranteeTypes: [] as IReferential[],\r\n offerTypes: [],\r\n offers: [],\r\n offerType: null,\r\n contractModalOpened: false,\r\n currencyRates: [],\r\n displaySecondCurrency: this.checkIfCurrencyIsEurOrRon,\r\n vehicleOfferData: {\r\n id: 0,\r\n caseId: this.props.caseSettingsState.case!.id,\r\n vehicleId: this.props.caseSettingsState.case!.vehicleId,\r\n comments: '',\r\n damageValue: 0,\r\n newVin: '',\r\n offerValue: 0,\r\n offerValueWithVAT: 0,\r\n priceValue: 0,\r\n tradeInValue: 0,\r\n vatValue: 0,\r\n withNewVehicle: this.props.isSaleOfferType,\r\n currency: this.props.caseSettingsState.case!.caseParameters.find(\r\n (p) => p.parameter!.code === ParametreCode.CURRENCY\r\n )!.value,\r\n currencyRate: Utils.GetCurrencyRate(\r\n this.props.appState.currencyRates,\r\n this.props.caseSettingsState.case!.caseParameters.find(\r\n (p) => p.parameter!.code === ParametreCode.CURRENCY\r\n )!.value == CurrencyCode.RON\r\n ? CurrencyCode.EUR\r\n : this.props.caseSettingsState.case!.caseParameters.find(\r\n (p) => p.parameter!.code === ParametreCode.CURRENCY\r\n )!.value\r\n ),\r\n secondCurrency: this.checkIfCurrencyIsEurOrRon\r\n ? this.props.caseSettingsState.case!.caseParameters.find(\r\n (p) => p.parameter!.code === ParametreCode.CURRENCY\r\n )!.value == CurrencyCode.EUR\r\n ? CurrencyCode.RON\r\n : CurrencyCode.EUR\r\n : null,\r\n secondOfferValue: this.checkIfCurrencyIsEurOrRon ? 0 : null,\r\n secondOfferVatAmount: this.checkIfCurrencyIsEurOrRon ? 0 : null,\r\n secondOfferValueWithVAT: this.checkIfCurrencyIsEurOrRon ? 0 : null\r\n } as VehicleOffer,\r\n saleChannels: [] as IReferential[]\r\n } as ICaseDetailsCaseTabSaleOfferFormDialogState;\r\n\r\n public componentDidMount() {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n if (R.isNil(caseSettings) || R.isNil(this.props.caseSettingsState.case)) {\r\n return;\r\n }\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadCaseSaleOfferForm();\r\n if (!this.props.appState.currencyRates.length) {\r\n await this.getCurrencyRates();\r\n }\r\n }\r\n );\r\n }\r\n\r\n getCurrencyRates = async () => {\r\n const rates = await this.vehicleService.GetCurrencyRates();\r\n this.props.appState.currencyRates = rates;\r\n console.log('currencyRates', this.props.appState.currencyRates);\r\n this.setState({\r\n vehicleOfferData: {\r\n ...this.state.vehicleOfferData,\r\n currencyRate: Utils.GetCurrencyRate(\r\n this.props.appState.currencyRates,\r\n this.props.caseSettingsState.case!.caseParameters.find(\r\n (p) => p.parameter!.code === ParametreCode.CURRENCY\r\n )!.value == CurrencyCode.RON\r\n ? CurrencyCode.EUR\r\n : this.props.caseSettingsState.case!.caseParameters.find(\r\n (p) => p.parameter!.code === ParametreCode.CURRENCY\r\n )!.value\r\n )\r\n }\r\n });\r\n };\r\n\r\n getCurrentCurrency = (): string => {\r\n return this.props.caseSettingsState.case!.caseParameters.find(\r\n (p) => p.parameter!.code === ParametreCode.CURRENCY\r\n )!.value;\r\n };\r\n\r\n getVATValue = (price: number, vat: number): number => {\r\n return Number.parseFloat((price * (vat / 100)).toFixed(2));\r\n };\r\n\r\n getPriceWithVAT = (price: number, vat: number) => {\r\n const vatValue = this.getVATValue(price, vat);\r\n return Number.parseFloat((price + vatValue).toFixed(2));\r\n };\r\n\r\n getReverseVatValue = (price: number, vat: number): number => {\r\n return Number.parseFloat(((price / (1 + vat / 100) - price) * -1).toFixed(2));\r\n };\r\n\r\n getPriceWithoutVAT = (price: number, vat: number) => {\r\n const offerTypeCode = this.props.caseSettingsState?.case?.caseType?.code;\r\n\r\n const vehicleHasNoVAT =\r\n offerTypeCode === CaseTypeCode.SALE && this.props.vehicleState.vehicle?.purchaseVatRate === 0;\r\n\r\n const purchasePrice = (this.props.vehicleState?.vehicle?.purchasePrice as number) || 0;\r\n\r\n const vatValue = !vehicleHasNoVAT\r\n ? this.getReverseVatValue(price, vat)\r\n : Utils.getMarginVat(price, +purchasePrice, vat);\r\n\r\n return Number.parseFloat((price - vatValue).toFixed(2));\r\n };\r\n\r\n getOfferPriceWithoutVAT = (offerPrice: number): number => {\r\n const offerTypeCode = this.props.caseSettingsState?.case?.caseType?.code;\r\n const vehicleHasNoVAT =\r\n offerTypeCode === CaseTypeCode.SALE && this.props.vehicleState.vehicle?.purchaseVatRate === 0;\r\n\r\n const purchasePrice = (this.props.vehicleState?.vehicle?.purchasePrice as number) || 0;\r\n\r\n const caseParameters = this.props.caseSettingsState.case!.caseParameters;\r\n const vatParameter = caseParameters.filter(\r\n (parameter) => parameter.parameter!.code === ParametreCode.TVA\r\n );\r\n const vat = parseFloat(vatParameter[0]!.value);\r\n\r\n const vatValue = !vehicleHasNoVAT\r\n ? this.getReverseVatValue(offerPrice, vat)\r\n : Utils.getMarginVat(offerPrice, +purchasePrice, vat);\r\n\r\n return Number.parseFloat((offerPrice - vatValue).toFixed(2));\r\n };\r\n\r\n getVATFromOfferPrice = () => {\r\n const offerTypeCode = this.props.caseSettingsState?.case?.caseType?.code;\r\n\r\n const vehicleHasNoVAT =\r\n offerTypeCode === CaseTypeCode.SALE && this.props.vehicleState.vehicle?.purchaseVatRate === 0;\r\n\r\n const purchasePrice = (this.props.vehicleState?.vehicle?.purchasePrice as number) || 0;\r\n\r\n const offerPrice = this.state.vehicleOfferData.offerValueWithVAT;\r\n const caseParameters = this.props.caseSettingsState.case!.caseParameters;\r\n const vatParameter = caseParameters.filter(\r\n (parameter) => parameter.parameter!.code === ParametreCode.TVA\r\n );\r\n\r\n const vat = parseFloat(vatParameter[0]!.value);\r\n\r\n if (!vehicleHasNoVAT) {\r\n const offerPriceWithoutVAT = offerPrice / (1 + vat / 100);\r\n\r\n return Number.parseFloat((offerPriceWithoutVAT * (vat / 100)).toFixed(2));\r\n }\r\n\r\n return Utils.getMarginVat(offerPrice, purchasePrice, vat);\r\n };\r\n\r\n setStatePriceAndVAT = () => {\r\n const caseParameters = this.props.caseSettingsState.case!.caseParameters;\r\n const vatParameter = caseParameters.filter(\r\n (parameter) => parameter.parameter!.code === ParametreCode.TVA\r\n );\r\n\r\n const vatValue = +vatParameter[0]?.value || 0;\r\n\r\n const tradeInValue = 0;\r\n\r\n this.setState({\r\n vehicleOfferData: {\r\n ...this.state.vehicleOfferData,\r\n offerType: this.state.offerType,\r\n offerTypeId: this.state.offerType!.id,\r\n tradeInValue,\r\n damageValue: 0,\r\n offerValue: 0,\r\n offerValueWithVAT: this.getPriceWithVAT(0, vatValue),\r\n priceValue: 0,\r\n vatValue: parseFloat(vatParameter[0]!.value)\r\n }\r\n });\r\n };\r\n\r\n setSecondValueBasedOnCaseCurrency(value: number, currencyRate: number): number | null {\r\n let resultValue = null;\r\n if (\r\n this.state.vehicleOfferData.currency == CurrencyCode.EUR ||\r\n this.state.vehicleOfferData.currency == CurrencyCode.RON\r\n ) {\r\n resultValue = 0;\r\n const previousCurrencyCode = this.state.vehicleOfferData.currency;\r\n const futureCurrencyCode =\r\n this.state.vehicleOfferData.currency == CurrencyCode.EUR\r\n ? CurrencyCode.RON\r\n : CurrencyCode.EUR;\r\n if (!R.isNil(value) && previousCurrencyCode) {\r\n let previousCurrencyRate = Utils.GetCurrencyRate(\r\n this.props.appState.currencyRates,\r\n previousCurrencyCode\r\n );\r\n\r\n let futureCurrencyRate = Utils.GetCurrencyRate(\r\n this.props.appState.currencyRates,\r\n futureCurrencyCode\r\n );\r\n\r\n if (this.state.vehicleOfferData.currency == CurrencyEnum.EUR) {\r\n previousCurrencyRate = currencyRate;\r\n } else if (this.state.vehicleOfferData.currency == CurrencyCode.RON) {\r\n futureCurrencyRate = currencyRate;\r\n }\r\n\r\n resultValue = value * (previousCurrencyRate / futureCurrencyRate);\r\n return Number.parseFloat(resultValue.toFixed(2));\r\n }\r\n }\r\n\r\n return resultValue;\r\n }\r\n\r\n setSecondVatFromOfferPrice(offerValueWithVAT: number): number {\r\n const offerTypeCode = this.props.caseSettingsState?.case?.caseType?.code;\r\n const vehicleHasNoVAT =\r\n offerTypeCode === CaseTypeCode.SALE && this.props.vehicleState.vehicle?.purchaseVatRate === 0;\r\n const purchasePrice = (this.props.vehicleState?.vehicle?.purchasePrice as number) || 0;\r\n const caseParameters = this.props.caseSettingsState.case!.caseParameters;\r\n const vatParameter = caseParameters.filter(\r\n (parameter) => parameter.parameter!.code === ParametreCode.TVA\r\n );\r\n const vat = parseFloat(vatParameter[0]!.value);\r\n if (!vehicleHasNoVAT) {\r\n const offerPriceWithoutVAT = offerValueWithVAT / (1 + vat / 100);\r\n return Number.parseFloat((offerPriceWithoutVAT * (vat / 100)).toFixed(2));\r\n }\r\n return Utils.getMarginVat(offerValueWithVAT, purchasePrice, vat);\r\n }\r\n\r\n loadCaseSaleOfferForm = async () => {\r\n const caseSettings = this.props.caseSettingsState.caseSettings;\r\n if (R.isNil(caseSettings) || R.isNil(this.props.caseSettingsState.case)) {\r\n return;\r\n }\r\n\r\n const guaranteeTypeRef = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.GuaranteeType\r\n );\r\n const offerTypeRef = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.OfferTye\r\n );\r\n const saleChannelRef = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.SaleChannel\r\n );\r\n\r\n const offerTypeList = await this.appReferentialService.Get(offerTypeRef!.baseUrl);\r\n\r\n const offerType = offerTypeList.find(\r\n (item) =>\r\n (item.code === OfferTypeCode.SELL && this.props.isSaleOfferType) ||\r\n (item.code === OfferTypeCode.BUY && !this.props.isSaleOfferType)\r\n )!;\r\n\r\n const [guaranteeTypeList, saleChannelList] = await Promise.all([\r\n this.appReferentialService.Get(guaranteeTypeRef!.baseUrl),\r\n this.appReferentialService.Get(saleChannelRef!.baseUrl)\r\n ]);\r\n\r\n this.setState(\r\n {\r\n isLoading: false,\r\n hasRights: true,\r\n isUserHidden: false,\r\n guaranteeTypes: guaranteeTypeList.filter((item) => item.isActive),\r\n offerTypes: offerTypeList,\r\n offers: [],\r\n offerType: offerType,\r\n saleChannels: saleChannelList.filter((item) => item.isActive)\r\n },\r\n this.setStatePriceAndVAT\r\n );\r\n };\r\n\r\n NumberFormatCustom = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n },\r\n currentTarget: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n allowNegative={false}\r\n thousandSeparator={false}\r\n decimalScale={2}\r\n />\r\n );\r\n };\r\n\r\n NumberFormatCustomCurrencyRate = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n },\r\n currentTarget: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n allowNegative={false}\r\n thousandSeparator={false}\r\n decimalScale={4}\r\n />\r\n );\r\n };\r\n\r\n submitData = async (e: any) => {\r\n try {\r\n this.setState({ executing: true });\r\n const data: VehicleOffer = {\r\n ...this.state.vehicleOfferData,\r\n offerVatAmount:\r\n this.state.vehicleOfferData.offerValueWithVAT - this.state.vehicleOfferData.offerValue,\r\n secondCurrency: this.state.displaySecondCurrency\r\n ? this.state.vehicleOfferData.secondCurrency\r\n : null,\r\n secondOfferValue: this.state.displaySecondCurrency\r\n ? this.state.vehicleOfferData.secondOfferValue\r\n : null,\r\n secondOfferValueWithVAT: this.state.displaySecondCurrency\r\n ? this.state.vehicleOfferData.secondOfferValueWithVAT\r\n : null\r\n };\r\n\r\n await this.vehicleService.SaveVehicleOfferWithoutCaseId(data);\r\n\r\n const caseStatusRequest = {\r\n caseId: this.props.caseSettingsState.case!.id,\r\n statusId: CaseStatusCodeEnum.OF_VANZ\r\n } as ChangeCaseStatusRequest;\r\n await this.caseService.ChangeCaseStatus(caseStatusRequest);\r\n\r\n const caseRequest = {\r\n id: 0,\r\n caseId: this.props.caseSettingsState.case!.id,\r\n text: this.state.vehicleOfferData.offerValueWithVAT + ' EUR',\r\n subject: '',\r\n to: '',\r\n userIdTo: '',\r\n organizationId: null,\r\n attachments: [] as CaseAttachment[],\r\n caseSectionStepFormId: this.props.workflowForm.id\r\n } as CaseRequest;\r\n\r\n await this.caseService.AddCaseRequest(caseRequest);\r\n\r\n await this.submitFormForClosedCase(this.props.caseSettingsState.case!.id);\r\n\r\n this.props.closeDialog();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (ex) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n } finally {\r\n this.setState({\r\n executing: false\r\n });\r\n }\r\n };\r\n\r\n submitFormForClosedCase = async (caseId: number) => {\r\n const caseStatusRequest = {\r\n caseId: caseId,\r\n statusId: CaseStatusCodeEnum.Closed\r\n } as ChangeCaseStatusRequest;\r\n let newStatus = await this.caseService.ChangeCaseStatus(caseStatusRequest);\r\n\r\n if (newStatus === null) {\r\n newStatus = this.props.caseSettingsState.case!.caseStatus;\r\n }\r\n const vehicleId = this.props.caseSettingsState.case?.vehicleId;\r\n\r\n if (newStatus.caseStatus?.code === 'CLOSED') {\r\n if (vehicleId) {\r\n await this.vehicleService.ChangeVehicleStatus({\r\n vehicleId,\r\n statusId: VehicleStatusCodeEnum.Sold,\r\n comment: ''\r\n });\r\n }\r\n if (vehicleId) {\r\n await this.vehicleService.DeleteAllAdvertWhenCaseStatusBecameClosed(caseId, vehicleId);\r\n }\r\n }\r\n };\r\n\r\n handleIsActiveNewVehicle = (e: any) => {\r\n this.setState({\r\n vehicleOfferData: {\r\n ...this.state.vehicleOfferData,\r\n withNewVehicle: e.currentTarget.checked,\r\n newVin: e.currentTarget.checked ? this.state.vehicleOfferData.newVin : ''\r\n }\r\n });\r\n };\r\n\r\n handleGuaranteeTypeChange = (newValue: IReferential | null) => {\r\n if (!R.isNil(newValue!.displayName)) {\r\n if (RenaultGoldList.includes(newValue!.code!.toString())) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'RENEW_GOLD_INFO_MESSAGE',\r\n 'Aceasta garantie include si Garantia de producator !'\r\n ),\r\n {\r\n variant: 'info',\r\n autoHideDuration: 5000\r\n }\r\n );\r\n }\r\n this.setState({\r\n vehicleOfferData: {\r\n ...this.state.vehicleOfferData,\r\n guaranteeType: newValue,\r\n guaranteeTypeId: newValue === null ? null : newValue.id\r\n }\r\n });\r\n }\r\n };\r\n\r\n handleSaleChannelChange = (newValue: IReferential | null) => {\r\n if (!R.isNil(newValue!.displayName)) {\r\n this.setState({\r\n vehicleOfferData: {\r\n ...this.state.vehicleOfferData,\r\n saleChannel: newValue,\r\n saleChannelId: newValue === null ? null : newValue.id\r\n }\r\n });\r\n }\r\n };\r\n\r\n renderClientDataForm = (caseHasVAT: boolean) => {\r\n const saleOfferPriceOfferedWithoutVatLabel = caseHasVAT\r\n ? this.translatorService.Tranlate(\r\n 'SALE_OFFER_PRICE_OFFERED_DIALOG_WITHOUT_VAT',\r\n 'Pret vanzare fara TVA'\r\n )\r\n : this.translatorService.Tranlate('SALE_OFFER_PRICE_OFFERED_DIALOG', 'Pret vanzare');\r\n\r\n const saleOfferPriceOfferedWithVatLabel = caseHasVAT\r\n ? this.translatorService.Tranlate(\r\n 'SALE_OFFER_PRICE_OFFERED_DIALOG_WITH_VAT',\r\n 'Pret vanzare cu TVA'\r\n )\r\n : this.translatorService.Tranlate('SALE_OFFER_PRICE_OFFERED_DIALOG', 'Pret vanzare');\r\n\r\n return (\r\n {\r\n this.submitData(e);\r\n }}\r\n >\r\n
\r\n \r\n \r\n \r\n \r\n {caseHasVAT && (\r\n \r\n \r\n \r\n )}\r\n \r\n\r\n \r\n \r\n {\r\n const offerValue = this.getOfferPriceWithoutVAT(e.target.value);\r\n const secondOfferValueWithVAT = this.setSecondValueBasedOnCaseCurrency(\r\n e.target.value,\r\n this.state.vehicleOfferData.currencyRate\r\n );\r\n const secondOfferValue = secondOfferValueWithVAT\r\n ? this.getOfferPriceWithoutVAT(secondOfferValueWithVAT)\r\n : 0;\r\n const secondOfferVatAmount = secondOfferValueWithVAT\r\n ? this.setSecondVatFromOfferPrice(secondOfferValueWithVAT)\r\n : 0;\r\n this.setState({\r\n vehicleOfferData: {\r\n ...this.state.vehicleOfferData,\r\n offerValueWithVAT: e.target.value,\r\n offerValue: offerValue,\r\n secondOfferValueWithVAT: secondOfferValueWithVAT\r\n ? secondOfferValueWithVAT\r\n : 0,\r\n secondOfferValue: secondOfferValue,\r\n secondOfferVatAmount: secondOfferVatAmount\r\n }\r\n });\r\n }}\r\n validators={['required', 'minNumber:1']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu'),\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n label={\r\n this.state.displaySecondCurrency\r\n ? saleOfferPriceOfferedWithVatLabel +\r\n ' | ' +\r\n this.state.vehicleOfferData.offerValueWithVAT +\r\n ' ' +\r\n this.state.vehicleOfferData.currency +\r\n ' (' +\r\n this.state.vehicleOfferData.secondOfferValueWithVAT +\r\n ' ' +\r\n this.state.vehicleOfferData.secondCurrency +\r\n ')'\r\n : saleOfferPriceOfferedWithVatLabel\r\n }\r\n InputProps={{\r\n inputComponent: this.NumberFormatCustom,\r\n style: { fontWeight: 500 }\r\n }}\r\n />\r\n \r\n \r\n {\r\n const value = e.target.value;\r\n const secondOfferValueWithVAT = this.setSecondValueBasedOnCaseCurrency(\r\n this.state.vehicleOfferData.offerValueWithVAT,\r\n parseFloat(value)\r\n );\r\n const secondOfferValue = secondOfferValueWithVAT\r\n ? this.getOfferPriceWithoutVAT(secondOfferValueWithVAT)\r\n : 0;\r\n this.setState({\r\n vehicleOfferData: {\r\n ...this.state.vehicleOfferData,\r\n currencyRate: parseFloat(value),\r\n secondOfferValueWithVAT: secondOfferValueWithVAT\r\n ? secondOfferValueWithVAT\r\n : 0,\r\n secondOfferValue: secondOfferValue ? secondOfferValue : 0,\r\n secondOfferVatAmount: secondOfferValueWithVAT\r\n ? this.setSecondVatFromOfferPrice(secondOfferValueWithVAT)\r\n : 0\r\n }\r\n });\r\n }}\r\n validators={['required', 'minNumber:1']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu'),\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n label={this.translatorService.Tranlate('SALE_OFFER_PRICE_FXRATE', 'Curs valutar')}\r\n InputProps={{\r\n inputComponent: this.NumberFormatCustomCurrencyRate,\r\n style: { fontWeight: 500 }\r\n }}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n this.handleGuaranteeTypeChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n this.handleSaleChannelChange(newValue)}\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )} \r\n />\r\n \r\n \r\n
\r\n\r\n \r\n {this.translatorService.Tranlate('SAVE', 'Salveaza')}\r\n \r\n \r\n );\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n this.vehicleService = (this.context as AppContext).vehicleService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n this.appUserService = (this.context as AppContext).appUserService;\r\n this.reportService = (this.context as AppContext).reportsService;\r\n\r\n const offerTypeCode = this.props.caseSettingsState?.case?.caseType?.code;\r\n\r\n const caseHasNoVAT =\r\n offerTypeCode === CaseTypeCode.AQUISITION && this.state.vehicleOfferData.vatValue === 0;\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n
{this.renderClientDataForm(!caseHasNoVAT)}
\r\n ) : null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalCaseDetailsCaseTabSaleOfferFormDialogProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app\r\n }),\r\n CaseSettingsActionCreators,\r\n mergeProps\r\n)(withSnackbar(CaseDetailsCaseTabSaleOfferFormDialog as any));\r\n","import React, { useEffect, useState } from 'react';\r\nimport {\r\n Button,\r\n IconButton,\r\n Modal,\r\n Grid,\r\n} from '@material-ui/core';\r\nimport * as R from 'ramda';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { DatePicker, MuiPickersUtilsProvider } from '@material-ui/pickers';\r\nimport MomentUtils from '@date-io/moment';\r\nimport { IVehicleService } from '../../services/Interfaces/IVehicleService';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport moment, { Moment } from 'moment';\r\nimport { CarDetailsSettings } from '../../helpers/Constants';\r\nimport { MaterialUiPickersDate } from '@material-ui/pickers/typings/date';\r\nimport { Utils } from '../../helpers/Utils';\r\n\r\nconst initialVehicle = {\r\n plateNumber: '',\r\n firstRegistrationDate: null,\r\n kilometersNr: 0,\r\n vin: '',\r\n accountingValue: 0,\r\n rcrEmployeeEmail: '',\r\n rcrEmployeePhone: '',\r\n rcrEmployeeFirstName: '',\r\n rcrEmployeeLastName: ''\r\n}\r\ninterface Props {\r\n isOpen: boolean;\r\n handleClose: () => void;\r\n translatorService: ITranslatorService;\r\n vehicleService: IVehicleService;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n enqueueSnackbar(param1: any, param2: any): void;\r\n language:string;\r\n dateFormat:string;\r\n}\r\n\r\n\r\nexport interface ImportVehicle {\r\n plateNumber: string;\r\n firstRegistrationDate: Moment | null;\r\n kilometersNr: number;\r\n vin: string;\r\n accountingValue: number;\r\n rcrEmployeeEmail: string;\r\n rcrEmployeePhone: string;\r\n rcrEmployeeFirstName: string;\r\n rcrEmployeeLastName: string\r\n}\r\n\r\nclass LocalizedUtils extends MomentUtils { }\r\n\r\nconst VehicleImportOneCarModal: React.FC = ({\r\n isOpen,\r\n handleClose,\r\n translatorService,\r\n vehicleService,\r\n enqueueSnackbar,\r\n language,\r\n dateFormat\r\n}) => {\r\n\r\n const [vehicleData, setVehicleData] = useState(initialVehicle)\r\n const [datePickerFirstRegistrationError, setDatePickerFirstRegistrationError] = useState('')\r\n const [plateNumberError, setPlateNumberError] = useState(false);\r\n\r\n const addVehicle = async () => {\r\n try {\r\n const result = await vehicleService.SaveManualdVehicles({vehicles:[vehicleData]});\r\n if (result.importedVehicleVins.length > 0){\r\n enqueueSnackbar(translatorService.Tranlate('VEHICLE_ADD_VEHICLE_SUCCES', 'Vehicului a fost adaugat cu succes'), {\r\n variant: 'success',\r\n autoHideDuration: 6000\r\n });\r\n }else{\r\n enqueueSnackbar(translatorService.Tranlate('VEHICLE_ADD_VEHICLE_ALREADY_EXISTS', 'Vehicului exista deja'), {\r\n variant: 'info',\r\n autoHideDuration: 6000\r\n });\r\n }\r\n\r\n setVehicleData({ ...initialVehicle })\r\n handleClose()\r\n } catch {\r\n enqueueSnackbar(translatorService.Tranlate('VEHICLE_ADD_VEHICLE_ERROR', 'There was an unexpected error while importing the vehicles'), {\r\n variant: 'error',\r\n autoHideDuration: 6000\r\n });\r\n handleClose()\r\n }\r\n };\r\n\r\n useEffect(()=>{\r\n ValidatorForm.addValidationRule('isValidNumberOfKm', (value) => {\r\n if (value >= CarDetailsSettings.numberOfKm) {\r\n return false;\r\n }\r\n return true;\r\n });\r\n },[])\r\n\r\n const checkIfDataIsValid = (): boolean => {\r\n if (\r\n vehicleData &&\r\n vehicleData.firstRegistrationDate &&\r\n vehicleData.accountingValue &&\r\n vehicleData.rcrEmployeeEmail &&\r\n vehicleData.rcrEmployeeLastName && \r\n vehicleData.rcrEmployeeFirstName &&\r\n vehicleData.rcrEmployeePhone &&\r\n vehicleData.kilometersNr &&\r\n vehicleData.plateNumber &&\r\n vehicleData.vin &&\r\n R.test(/^(?=.*[0-9])(?=.*[A-z])[0-9A-z-]{17}$/, vehicleData.vin)\r\n ) {\r\n return true;\r\n }\r\n\r\n return false;\r\n };\r\n\r\n const handleCloseModal = () => {\r\n setVehicleData({ ...initialVehicle })\r\n handleClose();\r\n };\r\n\r\n const onChange = (attributeName: keyof ImportVehicle, newValue: any) => {\r\n setVehicleData((prevState) => ({\r\n ...prevState,\r\n [attributeName]: newValue\r\n }));\r\n\r\n const isPlateNumberValid = Utils.validatePlateNumber(newValue);\r\n if (!isPlateNumberValid) {\r\n setPlateNumberError(true); \r\n } else {\r\n setPlateNumberError(false);\r\n }\r\n };\r\n\r\n const handleFirstRegistrationDateChange = (date: MaterialUiPickersDate | null) => {\r\n if (date === null || !date.isValid) {\r\n return;\r\n }\r\n\r\n let error = '';\r\n const selectedDate = date ? date.format('YYYY-MM-DD') : undefined;\r\n\r\n if (!selectedDate) {\r\n error = translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu');\r\n } else {\r\n const currentDate = moment().format('YYYY-MM-DD');\r\n if (currentDate && selectedDate > currentDate) {\r\n error = translatorService.Tranlate(\r\n 'CAR_DETAILS_YEAR_OF_FIRST_REGISTRATION_ERROR',\r\n 'Data primei inmatriculari trebuie sa fie mai mica decat data curenta'\r\n );\r\n }\r\n }\r\n\r\n onChange('firstRegistrationDate', date || '')\r\n setDatePickerFirstRegistrationError(error);\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n
\r\n
\r\n {translatorService.Tranlate('VEHICLES_VEHICLE_IMPORT_MANUAL', 'Importa Vehicul Manual')}\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n ) => {\r\n onChange('plateNumber', e.target.value.toUpperCase().replace(/[^a-zA-Z0-9]/g, ''));\r\n }}\r\n error={plateNumberError} \r\n helperText={plateNumberError ? translatorService.Tranlate(\r\n 'VEHICLES_VEHICLE_SEND_TO_CARFIX_INVALID_PLATE_NUMBER',\r\n 'Numar de inmatriculare incorect'\r\n ): \"\"}\r\n validators={['required']}\r\n errorMessages={[\r\n translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n label={translatorService.Tranlate(\r\n 'CAR_DETAILS_PLATE_NUMBER',\r\n 'Numar inmatriculare'\r\n )}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ) => onChange('kilometersNr', parseInt(e.target.value))}\r\n validators={['required', 'isValidNumberOfKm']}\r\n errorMessages={[\r\n translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu'),\r\n translatorService.Tranlate(\r\n 'CAR_DETAILS_NUMBER_OF_KILOMETERS_ERROR',\r\n 'Numarul de kilometri nu trebuie sa fie mai mare de 1000000'\r\n )\r\n ]}\r\n label={translatorService.Tranlate(\r\n 'CAR_DETAILS_NUMBER_OF_KILOMETERS',\r\n 'Numar kilometri'\r\n )}\r\n />\r\n \r\n \r\n ) => onChange('vin', e.target.value)}\r\n validators={[\r\n 'required',\r\n 'matchRegexp:^(?=.*[0-9])(?=.*[abcdefghjklmnprstuvwxyzABCDEFGHJKLMNPRSTUVWXYZ])[0-9abcdefghjklmnprstuvwxyzABCDEFGHJKLMNPRSTUVWXYZ-]{17}$'\r\n ]}\r\n errorMessages={[\r\n translatorService.Tranlate(\r\n 'VALIDATORS_REQUIRED',\r\n 'Campul este obligatoriu'\r\n ),\r\n translatorService.Tranlate('VIN_INVALID', 'Numarul VIN nu este valid')\r\n ]}\r\n label={translatorService.Tranlate('CAR_DETAILS_CHASIS_CODE', 'Serie sasiu')}\r\n />\r\n \r\n \r\n ) => onChange('accountingValue', parseInt(e.target.value))}\r\n validators={['required']}\r\n errorMessages={[\r\n translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu'),\r\n ]}\r\n label={translatorService.Tranlate(\r\n 'CAR_DETAILS_ACCOUNTING_VALUE',\r\n 'Valoarea contabila'\r\n )}\r\n />\r\n \r\n \r\n ) => onChange('rcrEmployeeLastName', e.target.value)}\r\n validators={['required']}\r\n errorMessages={[\r\n translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n label={translatorService.Tranlate(\r\n 'CAR_DETAILS_EMPLOYEE_LAST_NAME',\r\n 'Nume'\r\n )}\r\n />\r\n \r\n \r\n ) => onChange('rcrEmployeeFirstName', e.target.value)}\r\n validators={['required']}\r\n errorMessages={[\r\n translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n label={translatorService.Tranlate(\r\n 'CAR_DETAILS_EMPLOYEE_FIRST_NAME',\r\n 'Prenume'\r\n )}\r\n />\r\n \r\n \r\n ) => onChange('rcrEmployeeEmail', e.target.value)}\r\n validators={[\r\n 'required',\r\n 'isEmail'\r\n ]}\r\n errorMessages={[\r\n translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu'),\r\n translatorService.Tranlate('EMAIL_INVALID', 'Email-ul nu este valid')\r\n ]}\r\n label={translatorService.Tranlate(\r\n 'CAR_DETAILS_EMPLOYEE_EMAIL',\r\n 'Email'\r\n )}\r\n />\r\n \r\n \r\n ) => onChange('rcrEmployeePhone', e.target.value)}\r\n validators={['required']}\r\n errorMessages={[\r\n translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n label={translatorService.Tranlate(\r\n 'CAR_DETAILS_EMPLOYEE_PHONE',\r\n 'Phone'\r\n )}\r\n />\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default VehicleImportOneCarModal;\r\n","import * as React from 'react';\r\nimport { ApplicationState, AppState, CaseSettingsState, VehicleState } from '../../store';\r\nimport { ApplicationContext, AppContext } from '../../context/Contexts';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport { Card, Grid, Tab, Tabs, AppBar, TextField, Button } from '@material-ui/core';\r\nimport TabPanel from '../_shared/Tabs';\r\nimport MUIDataTable, {\r\n MUIDataTableColumnOptions,\r\n MUIDataTableMeta,\r\n SelectableRows\r\n} from 'mui-datatables';\r\nimport { MUITranslations } from '../../helpers/MUITableTranslations';\r\nimport { isNullOrUndefined } from 'util';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport { Organization } from '../../interfaces/Organization';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport {\r\n VehicleExtensionList,\r\n VehicleFilters,\r\n SimpleVehicleCarfix\r\n} from '../../interfaces/Vehicle';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport moment from 'moment';\r\nimport VehicleImportModal from './VehicleImportModal';\r\nimport ImportVehiclesRenaultButton from './ImportVehiclesRenaultButton';\r\nimport Loader from '../Loader';\r\nimport noop from 'lodash/noop';\r\nimport FileCopyOutlined from '@material-ui/icons/FileCopyOutlined';\r\nimport { IconButton } from '@material-ui/core';\r\nimport {\r\n Tooltip,\r\n CardContent,\r\n Dialog,\r\n DialogTitle,\r\n Typography,\r\n DialogContent,\r\n Radio,\r\n Divider\r\n} from '@material-ui/core';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport CaseDetailsCaseTabSaleOfferFormDialog from '../cases/CaseDetailsCaseTabSaleOfferFormDialog';\r\nimport { Workflow, WorkflowSectionStepForm } from '../../interfaces/Workflow';\r\nimport { Case, CaseByVehicleIdSearchResult } from '../../interfaces/Case';\r\nimport { FormCode } from '../../helpers/forms/FormCode';\r\nimport { CaseSettings } from '../../interfaces/CaseSettings';\r\nimport * as R from 'ramda';\r\nimport Referentials from '../../helpers/Referentials.json';\r\nimport { CaseStatusCode, ReferentialCode, VehicleStatusCodeEnum } from '../../helpers/Constants';\r\nimport _ from 'lodash';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { FormControlLabel, InputAdornment, Switch } from '@material-ui/core';\r\nimport VehicleImportOneCarModal from './VehicleImportOneCarModal';\r\nimport { Utils } from '../../helpers/Utils';\r\n\r\n\r\ntype VehiclesProps = {\r\n appState: AppState;\r\n caseSettingsState: CaseSettingsState;\r\n vehicleState: VehicleState;\r\n} & ProviderContext &\r\n RouteComponentProps;\r\n\r\ninterface IVehiclesState {\r\n vehiclesList: VehicleExtensionList;\r\n organizationEntities: Organization[];\r\n selectedOrgEntities: Organization[];\r\n location: string;\r\n makeEntities: IReferential[];\r\n selectedMakeEntities: IReferential[];\r\n modelEntities: IReferential[];\r\n selectedModelEntities: IReferential[];\r\n fuelEntities: IReferential[];\r\n selectedFuelEntities: IReferential[];\r\n transmissionEntities: IReferential[];\r\n selectedTransmissionEntities: IReferential[];\r\n tractionEntities: IReferential[];\r\n selectedTractionEntities: IReferential[];\r\n statusEntities: IReferential[];\r\n selectedStatusEntities: IReferential[];\r\n selectedTab: number;\r\n isLoading: boolean;\r\n isLoadingVehicles: boolean;\r\n count: number;\r\n page: number;\r\n pageSize: number;\r\n vehicleImportDialogOpenend: boolean;\r\n vehicleImportOneCarDialogOpenend: boolean;\r\n isCarSoldDialogOpen: boolean;\r\n salesWokflowForm: WorkflowSectionStepForm | null;\r\n paramList: IReferential[];\r\n isLoadingDialog: boolean;\r\n vin: string;\r\n}\r\n\r\nclass Vehicles extends React.PureComponent {\r\n private cbContext!: AppContext;\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n vehiclesList: {} as VehicleExtensionList,\r\n organizationEntities: [],\r\n selectedOrgEntities: [],\r\n location: '',\r\n makeEntities: [],\r\n selectedMakeEntities: [],\r\n modelEntities: [],\r\n selectedModelEntities: [],\r\n fuelEntities: [],\r\n selectedFuelEntities: [],\r\n transmissionEntities: [],\r\n selectedTransmissionEntities: [],\r\n tractionEntities: [],\r\n selectedTractionEntities: [],\r\n statusEntities: [],\r\n selectedStatusEntities: [],\r\n selectedTab: 0,\r\n isLoading: false,\r\n isLoadingVehicles: false,\r\n count: 1,\r\n page: 0,\r\n pageSize: 10,\r\n vehicleImportDialogOpenend: false,\r\n vehicleImportOneCarDialogOpenend: false,\r\n isCarSoldDialogOpen: false,\r\n vehiclesCaseList: [],\r\n salesWokflowForm: null,\r\n paramList: [],\r\n isLoadingDialog: false,\r\n vin: ''\r\n } as IVehiclesState;\r\n\r\n public async componentDidMount() {\r\n const vehiclesFilters = {\r\n makeIds: [],\r\n modelIds: [],\r\n fuelTypeIds: [],\r\n transmissionIds: [],\r\n tractionIds: [],\r\n statusIds: [],\r\n organizationIds: [],\r\n page: this.state.page + 1,\r\n pageSize: this.state.pageSize,\r\n location: '',\r\n text: '',\r\n vehicleHistory: false,\r\n vin: ''\r\n } as VehicleFilters;\r\n\r\n this.setState({\r\n isLoading: true\r\n });\r\n\r\n const [vehicles] = await Promise.all([\r\n this.cbContext.vehicleService.GetVehicles(vehiclesFilters)\r\n ]);\r\n\r\n const [organizations] = await Promise.all([\r\n this.cbContext.organizationService.GetUserOrganizationsByIds(\r\n Array.from(new Set(vehicles.vehicles.map(({ vehicle }) => vehicle.organizationId)))\r\n )\r\n ]);\r\n const interfacePromises = [] as any[];\r\n vehicles.vehicles.forEach(({ vehicle }) => {\r\n if (vehicle.currentStatus.statusId == VehicleStatusCodeEnum.ForSale) {\r\n interfacePromises.push(this.cbContext.caseService.GetLastCaseByVehicleId(vehicle.id));\r\n }\r\n });\r\n\r\n const result = await Promise.all(interfacePromises);\r\n const cases: CaseByVehicleIdSearchResult[] = [];\r\n result.forEach((item) => {\r\n cases.push(item);\r\n });\r\n const refParam = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.CompanyParameter\r\n );\r\n const [paramList] = await Promise.all([\r\n this.cbContext.referentialService.Get(refParam!.baseUrl)\r\n ]);\r\n\r\n vehicles.vehicles.forEach(({ vehicle }) => {\r\n const org = organizations.find((item) => item.id === vehicle.organizationId);\r\n vehicle.organization = isNullOrUndefined(org) ? null : org;\r\n const vehicleCase = _.find(cases, function (item) {\r\n return item && item.vehicleId == vehicle.id;\r\n });\r\n vehicle.case = isNullOrUndefined(vehicleCase) ? null : vehicleCase;\r\n if (vehicle.case) {\r\n vehicle.case.caseParameters.forEach((item) => {\r\n const param = paramList.find((p) => item.parameterId === p.id);\r\n item.parameter = R.isNil(param) ? null : param;\r\n });\r\n }\r\n });\r\n\r\n console.log('vehicles', vehicles);\r\n this.setState(\r\n {\r\n paramList: paramList,\r\n vehiclesList: vehicles,\r\n organizationEntities: organizations,\r\n count: vehicles.total,\r\n page: vehicles.page - 1\r\n },\r\n async () => {\r\n await this.reloadFilters();\r\n }\r\n );\r\n }\r\n\r\n isInternal = (): boolean | null => {\r\n if (this.state.selectedTab === 0) {\r\n return null;\r\n }\r\n if (this.state.selectedTab === 1) {\r\n return false;\r\n }\r\n\r\n return true;\r\n };\r\n\r\n loadVehicles = async (page: number, rowsPerPage: number) => {\r\n this.setState({\r\n isLoadingVehicles: true\r\n });\r\n\r\n const vehiclesFilters = {\r\n makeIds: this.state.selectedMakeEntities.map((item) => item.id),\r\n modelIds: this.state.selectedModelEntities.map((item) => item.id),\r\n fuelTypeIds: this.state.selectedFuelEntities.map((item) => item.id),\r\n transmissionIds: this.state.selectedTransmissionEntities.map((item) => item.id),\r\n tractionIds: this.state.selectedTractionEntities.map((item) => item.id),\r\n statusIds: this.state.selectedStatusEntities.map((item) => item.id),\r\n organizationIds: this.state.selectedOrgEntities.map((item) => item.id),\r\n page: page + 1,\r\n pageSize: rowsPerPage,\r\n location: this.state.location,\r\n text: '',\r\n vehicleHistory: false,\r\n vin: this.state.vin\r\n } as VehicleFilters;\r\n\r\n const vehicleList = await this.cbContext.vehicleService.GetVehicles(vehiclesFilters);\r\n const [organizations] = await Promise.all([\r\n this.cbContext.organizationService.GetUserOrganizationsByIds(\r\n Array.from(new Set(vehicleList.vehicles.map(({ vehicle }) => vehicle.organizationId)))\r\n )\r\n ]);\r\n const interfacePromises = [] as any[];\r\n vehicleList.vehicles.forEach(({ vehicle }) => {\r\n if (vehicle.currentStatus.statusId == VehicleStatusCodeEnum.ForSale) {\r\n interfacePromises.push(this.cbContext.caseService.GetLastCaseByVehicleId(vehicle.id));\r\n }\r\n });\r\n\r\n const result = await Promise.all(interfacePromises);\r\n const cases: CaseByVehicleIdSearchResult[] = [];\r\n result.forEach((item) => {\r\n cases.push(item);\r\n });\r\n\r\n vehicleList.vehicles.forEach(({ vehicle }) => {\r\n const org = organizations.find((item) => item.id === vehicle.organizationId);\r\n vehicle.organization = isNullOrUndefined(org) ? null : org;\r\n const vehicleCase = _.find(cases, function (item) {\r\n return item && item.vehicleId == vehicle.id;\r\n });\r\n vehicle.case = isNullOrUndefined(vehicleCase) ? null : vehicleCase;\r\n if (vehicle.case) {\r\n vehicle.case.caseParameters.forEach((item) => {\r\n const param = this.state.paramList.find((p) => item.parameterId === p.id);\r\n item.parameter = R.isNil(param) ? null : param;\r\n });\r\n }\r\n });\r\n\r\n console.log('vehicleList', vehicleList);\r\n\r\n this.setState({\r\n vehiclesList: vehicleList,\r\n organizationEntities: organizations,\r\n page: vehicleList.page - 1,\r\n pageSize: rowsPerPage,\r\n count: vehicleList.total,\r\n isLoadingVehicles: false\r\n });\r\n };\r\n\r\n reloadFilters = async () => {\r\n const vehicleHistory = false;\r\n const filters = await this.cbContext.vehicleService.GetVehiclesFilters(vehicleHistory);\r\n\r\n const [organizations] = await Promise.all([\r\n this.cbContext.organizationService.GetUserOrganizationsByIds(\r\n Array.from(new Set(filters.organizationIds))\r\n )\r\n ]);\r\n\r\n this.setState({\r\n organizationEntities: organizations,\r\n makeEntities: filters.makeList,\r\n modelEntities: filters.modelList,\r\n fuelEntities: filters.fuelTypes,\r\n transmissionEntities: filters.transmissionTypes,\r\n tractionEntities: filters.tractionTypes,\r\n statusEntities: filters.vehicleStatuses,\r\n isLoading: false\r\n });\r\n };\r\n\r\n onClick = (id: number) => {\r\n this.props.history.push('/vehicle/' + id + '/history');\r\n };\r\n\r\n closeCarSoldDialogOnSaveButton = async () => {\r\n this.props.caseSettingsState.case = null;\r\n this.props.caseSettingsState.caseSettings = null;\r\n this.props.vehicleState.vehicle = null;\r\n this.setState(\r\n {\r\n isCarSoldDialogOpen: false,\r\n salesWokflowForm: null\r\n },\r\n async () => await this.loadVehicles(this.state.page, this.state.pageSize)\r\n );\r\n };\r\n\r\n closeDialog = async () => {\r\n this.setState({\r\n isCarSoldDialogOpen: false,\r\n salesWokflowForm: null\r\n });\r\n this.props.caseSettingsState.case = null;\r\n this.props.caseSettingsState.caseSettings = null;\r\n this.props.vehicleState.vehicle = null;\r\n };\r\n\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'vehicle.id',\r\n label: this.cbContext.translatorService.Tranlate('VEHICLES_VEHICLE_ID', 'ID'),\r\n options: {\r\n sort: false\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'vehicle.organization.displayName',\r\n label: this.cbContext.translatorService.Tranlate(\r\n 'VEHICLES_VEHICLE_ORGANIZATION',\r\n 'Organizatie'\r\n )\r\n },\r\n {\r\n name: 'vehicle.vin',\r\n label: this.cbContext.translatorService.Tranlate('VEHICLES_VEHICLE_VIN', 'VIN')\r\n },\r\n {\r\n name: 'vehicle.make.displayName',\r\n label: this.cbContext.translatorService.Tranlate('VEHICLES_VEHICLE_MAKE', 'Marca'),\r\n options: {\r\n display: 'excluded',\r\n filter: false\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'vehicle.model.displayName',\r\n label: this.cbContext.translatorService.Tranlate('VEHICLES_VEHICLE_MODEL', 'Model'),\r\n options: {\r\n display: 'excluded',\r\n filter: false\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'vehicle.version',\r\n label: this.cbContext.translatorService.Tranlate(\r\n 'VEHICLES_VEHICLE_VERSION',\r\n 'Marca Model Versiune'\r\n ),\r\n options: {\r\n customBodyRender: (value: any, tableMeta: MUIDataTableMeta) => {\r\n const vehicleExtension = this.state.vehiclesList.vehicles.find(\r\n ({ vehicle }) => vehicle.id === tableMeta.rowData[0]\r\n );\r\n\r\n return (\r\n
\r\n \r\n {vehicleExtension?.vehicle?.make?.displayName}{' '}\r\n \r\n \r\n {vehicleExtension?.vehicle?.model?.displayName}{' '}\r\n \r\n {value} \r\n
\r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'vehicle.firstRegistrationDate',\r\n label: this.cbContext.translatorService.Tranlate(\r\n 'VEHICLES_VEHICLE_FIRST_REGISTRATION_DATE',\r\n 'Data primei inmatriculari'\r\n ),\r\n options: {\r\n customBodyRender: (value: any) => {\r\n return (\r\n \r\n \r\n
\r\n {moment\r\n .utc(value)\r\n .local()\r\n .format(this.props.appState.dateFormat)}\r\n
\r\n
\r\n
\r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'addedInStockDate',\r\n label: this.cbContext.translatorService.Tranlate(\r\n 'VEHICLES_VEHICLE_ADDED_IN_STOCK_DATE',\r\n 'Data intrare stoc'\r\n ),\r\n options: {\r\n customBodyRender: (value: any) => {\r\n return (\r\n \r\n \r\n
\r\n {value\r\n ? moment\r\n .utc(value)\r\n .local()\r\n .format(this.props.appState.dateFormat)\r\n : null}\r\n
\r\n
\r\n
\r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'vehicle.makeDate',\r\n label: this.cbContext.translatorService.Tranlate(\r\n 'VEHICLES_VEHICLE_YEAR_OF_FABRICATION',\r\n 'An'\r\n ),\r\n options: {\r\n customBodyRender: (value: any) => {\r\n return (\r\n \r\n \r\n
{value ? new Date(value).getFullYear() : null}
\r\n
\r\n
\r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'vehicle.kilometersNr',\r\n label: this.cbContext.translatorService.Tranlate('VEHICLES_VEHICLE_NR_OF_KM', 'KM')\r\n },\r\n {\r\n name: 'vehicle.currentStatus.status.displayName',\r\n label: this.cbContext.translatorService.Tranlate('VEHICLES_VEHICLE_STATUS', 'Status')\r\n },\r\n {\r\n name: 'vehicle',\r\n label: this.cbContext.translatorService.Tranlate(\r\n 'VEHICLES_VEHICLE_PURCHASE_EUR_PRICE',\r\n 'Pret Achizitie EUR cu TVA'\r\n ),\r\n options: {\r\n customBodyRender: (value: any) => {\r\n return value.purchaseVatRate === 0 ? (\r\n <>\r\n {value.purchasePrice}\r\n
\r\n {this.cbContext.translatorService.Tranlate(\r\n 'VEHICLES_WITHOUT_VAT',\r\n 'Achizitionat cu TVA=0'\r\n )}\r\n
\r\n \r\n ) : (\r\n value.purchasePrice\r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: '',\r\n label: this.cbContext.translatorService.Tranlate(\r\n 'ORGANIZATION_FORM_EDIT_ACTIONS_TAB',\r\n 'Actiuni'\r\n ),\r\n options: {\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n const vehicleExtension = this.state.vehiclesList.vehicles.find(\r\n ({ vehicle }) => vehicle.id === tableMeta.rowData[0]\r\n );\r\n\r\n const buttonsToBeRendered = [];\r\n\r\n if (vehicleExtension?.vehicle.currentStatus.statusId == VehicleStatusCodeEnum.ForSale) {\r\n buttonsToBeRendered.push(\r\n
\r\n {\r\n console.log(vehicleExtension?.vehicle.case);\r\n if (vehicleExtension) {\r\n this.setState({\r\n isLoadingDialog: true,\r\n isCarSoldDialogOpen: true\r\n });\r\n const [workflow] = await Promise.all([\r\n this.cbContext.workflowService.GetWorkflowSettingsForVehiclesTab(\r\n vehicleExtension.vehicle.case!.workflowId\r\n )\r\n ]);\r\n const salesForm = this.getForms(workflow, FormCode.CASE_SALE_OFFER);\r\n this.props.caseSettingsState.caseSettings = {\r\n workflow: { ...workflow }\r\n } as CaseSettings;\r\n this.props.caseSettingsState.case = vehicleExtension.vehicle\r\n .case as any as Case;\r\n this.props.vehicleState.vehicle = vehicleExtension.vehicle;\r\n this.setState({\r\n salesWokflowForm: salesForm,\r\n isLoadingDialog: false\r\n });\r\n }\r\n }}\r\n >\r\n {this.cbContext.translatorService.Tranlate(\r\n 'VEHICLES_LIST_SALES_CAR',\r\n 'Masina Vanduta'\r\n )}\r\n \r\n
\r\n );\r\n }\r\n if (vehicleExtension?.vehicle.isImported && this.props.appState?.appUser?.userRole?.code === 'MAVO_ADMIN') {\r\n buttonsToBeRendered.push(\r\n
\r\n {\r\n const body = {\r\n ConnectId: vehicleExtension?.vehicle.id,\r\n PlateNumber: vehicleExtension?.vehicle.plateNumber,\r\n Vin: vehicleExtension?.vehicle.vin,\r\n RcrEmployeeMail: vehicleExtension?.vehicle.rcrEmployeeEmail,\r\n RcrEmployeePhone: vehicleExtension?.vehicle.rcrEmployeePhone\r\n } as SimpleVehicleCarfix;\r\n\r\n const isPlateNumberValid = Utils.validatePlateNumber(body.PlateNumber);\r\n\r\n if(!isPlateNumberValid){\r\n this.props.enqueueSnackbar(\r\n this.cbContext.translatorService.Tranlate(\r\n 'VEHICLES_VEHICLE_SEND_TO_CARFIX_INVALID_PLATE_NUMBER',\r\n 'Numar de inmatriculare incorect'\r\n ),\r\n {\r\n variant: 'error',\r\n autoHideDuration: 3000\r\n }\r\n );\r\n\r\n return;\r\n }\r\n\r\n try {\r\n const response = await this.cbContext.vehicleService.SendVehicleToCarfix(\r\n body\r\n );\r\n\r\n if (response.success) {\r\n this.props.enqueueSnackbar(\r\n this.cbContext.translatorService.Tranlate(\r\n 'VEHICLES_VEHICLE_SEND_TO_CARFIX_SUCCESS',\r\n 'Vehicle successfully sent to Carfix'\r\n ),\r\n {\r\n variant: 'success',\r\n autoHideDuration: 6000\r\n }\r\n );\r\n } else {\r\n this.props.enqueueSnackbar(\r\n this.cbContext.translatorService.Tranlate(\r\n 'VEHICLES_VEHICLE_SEND_TO_CARFIX_ERROR',\r\n 'There was an unexpected error while sending the vehicle to Carfix'\r\n ),\r\n {\r\n variant: 'error',\r\n autoHideDuration: 6000\r\n }\r\n );\r\n }\r\n } catch (error) {\r\n this.props.enqueueSnackbar(\r\n this.cbContext.translatorService.Tranlate(\r\n 'VEHICLES_VEHICLE_SEND_TO_CARFIX_UNEXPECTED_ERROR',\r\n 'There was an unexpected error while sending the vehicle'\r\n ),\r\n {\r\n variant: 'error',\r\n autoHideDuration: 6000\r\n }\r\n );\r\n }\r\n }}\r\n >\r\n {this.cbContext.translatorService.Tranlate(\r\n 'VEHICLES_LIST_SEND_TO_CARFIX_BUTTON',\r\n 'Send to Carfix'\r\n )}\r\n \r\n
\r\n );\r\n }\r\n\r\n return buttonsToBeRendered.length > 0 ? buttonsToBeRendered : '';\r\n }\r\n }\r\n }\r\n ];\r\n\r\n return columns;\r\n };\r\n\r\n getForms = (workflow: Workflow, code: string): WorkflowSectionStepForm | null => {\r\n let form = null;\r\n const sections = workflow\r\n .workflowSections!.filter((item) => item.isActive)\r\n .sort(this.sortFunction);\r\n // console.log('sections', sections);\r\n for (const section of sections) {\r\n const steps = section.workflowSectionSteps\r\n .filter((item) => item.isActive)\r\n .sort(this.sortFunction);\r\n // console.log('steps', steps);\r\n for (const step of steps) {\r\n const forms = step.workflowSectionStepForms\r\n .filter((item) => item.isActive)\r\n .sort(this.sortFunction);\r\n // console.log('forms', forms);\r\n const formIndex = forms.findIndex((item) => item.form.code === code);\r\n if (formIndex !== -1) {\r\n form = forms[formIndex];\r\n }\r\n }\r\n }\r\n return form;\r\n };\r\n\r\n sortFunction = (a: any, b: any) => {\r\n return a.order - b.order;\r\n };\r\n\r\n onTabChange = (event: any, newValue: number) => {\r\n this.setState(\r\n {\r\n selectedTab: newValue,\r\n page: 0\r\n },\r\n async () => await this.loadVehicles(0, this.state.pageSize)\r\n );\r\n };\r\n handleOrgEntitiesChange = (newValue: any[]) => {\r\n this.setState(\r\n {\r\n selectedOrgEntities: newValue\r\n },\r\n async () => await this.loadVehicles(this.state.page, this.state.pageSize)\r\n );\r\n };\r\n\r\n handleMakeEntitiesChange = (newValue: any[]) => {\r\n const selectedModels = [...this.state.selectedModelEntities];\r\n const selectedMakeIds = newValue.map(({ id }) => id);\r\n\r\n const models = selectedModels.filter(({ dependencyId }) =>\r\n selectedMakeIds.includes(dependencyId)\r\n );\r\n\r\n this.setState(\r\n {\r\n selectedMakeEntities: newValue,\r\n selectedModelEntities: models\r\n },\r\n async () => await this.loadVehicles(this.state.page, this.state.pageSize)\r\n );\r\n };\r\n\r\n handleModelEntitiesChange = (newValue: any[]) => {\r\n this.setState(\r\n {\r\n selectedModelEntities: newValue\r\n },\r\n async () => await this.loadVehicles(this.state.page, this.state.pageSize)\r\n );\r\n };\r\n\r\n handleFuelEntitiesChange = (newValue: any[]) => {\r\n this.setState(\r\n {\r\n selectedFuelEntities: newValue\r\n },\r\n async () => await this.loadVehicles(this.state.page, this.state.pageSize)\r\n );\r\n };\r\n\r\n handleTransmissionEntitiesChange = (newValue: any[]) => {\r\n this.setState(\r\n {\r\n selectedTransmissionEntities: newValue\r\n },\r\n async () => await this.loadVehicles(this.state.page, this.state.pageSize)\r\n );\r\n };\r\n\r\n handleTractionEntitiesChange = (newValue: any[]) => {\r\n this.setState(\r\n {\r\n selectedTractionEntities: newValue\r\n },\r\n async () => await this.loadVehicles(this.state.page, this.state.pageSize)\r\n );\r\n };\r\n\r\n handleStatusEntitiesChange = (newValue: any[]) => {\r\n this.setState(\r\n {\r\n selectedStatusEntities: newValue\r\n },\r\n async () => await this.loadVehicles(this.state.page, this.state.pageSize)\r\n );\r\n };\r\n\r\n handleImportDialogOpen = (attributeName: 'vehicleImportOneCarDialogOpenend' | 'vehicleImportDialogOpenend') => {\r\n this.setState(prevState => ({\r\n ...prevState,\r\n [attributeName]: true\r\n }))\r\n };\r\n\r\n handleImportDialogClose = (attributeName: 'vehicleImportOneCarDialogOpenend' | 'vehicleImportDialogOpenend') => {\r\n this.setState(prevState => ({\r\n ...prevState,\r\n [attributeName]: false\r\n }))\r\n };\r\n\r\n renderVehicleImport() {\r\n return (\r\n
\r\n {/*
\r\n this.handleImportDialogOpen('vehicleImportDialogOpenend')}\r\n >\r\n {this.cbContext.translatorService.Tranlate(\r\n 'VEHICLES_VEHICLE_IMPORT_VEHICLES',\r\n 'Importa Vehicule'\r\n )}\r\n \r\n
*/}\r\n {this.props.appState.appUser?.userRole?.code === 'MAVO_ADMIN' ?
\r\n this.handleImportDialogOpen('vehicleImportOneCarDialogOpenend')}\r\n >\r\n {this.cbContext.translatorService.Tranlate(\r\n 'VEHICLES_VEHICLE_IMPORT_MANUAL',\r\n 'Importa Vehicul Manual'\r\n )}\r\n \r\n
: ''}\r\n
\r\n this.handleImportDialogClose('vehicleImportDialogOpenend')}\r\n translatorService={this.cbContext.translatorService}\r\n vehicleService={this.cbContext.vehicleService}\r\n enqueueSnackbar={this.props.enqueueSnackbar}\r\n />\r\n
\r\n
\r\n this.handleImportDialogClose('vehicleImportOneCarDialogOpenend')}\r\n translatorService={this.cbContext.translatorService}\r\n vehicleService={this.cbContext.vehicleService}\r\n enqueueSnackbar={this.props.enqueueSnackbar}\r\n language={this.props.appState.language}\r\n dateFormat={this.props.appState.dateFormat}\r\n />\r\n
\r\n
\r\n );\r\n }\r\n\r\n renderFilters = () => {\r\n const selectedMakes = this.state.selectedMakeEntities;\r\n let models = this.state.modelEntities;\r\n\r\n if (selectedMakes.length) {\r\n const makeIds = selectedMakes.map(({ id }) => id);\r\n models = this.state.modelEntities.filter(({ dependencyId }) => {\r\n return makeIds.includes(dependencyId!);\r\n });\r\n }\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n this.handleOrgEntitiesChange(newValue)}\r\n getOptionLabel={(option: Organization) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n {\r\n this.setState({\r\n location: e.target.value\r\n });\r\n }}\r\n onBlur={() => this.loadVehicles(this.state.page, this.state.pageSize)}\r\n validators={['required']}\r\n label={this.cbContext.translatorService.Tranlate(\r\n 'ORDERS_LOCATION_LABEL',\r\n 'Locatie'\r\n )}\r\n />\r\n\r\n this.handleMakeEntitiesChange(newValue)}\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n \r\n this.handleModelEntitiesChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n {\r\n this.setState({\r\n vin: e.target.value\r\n });\r\n }}\r\n onBlur={() => this.loadVehicles(this.state.page, this.state.pageSize)}\r\n validators={['required']}\r\n label={this.cbContext.translatorService.Tranlate('CALCULATION_DETAILS_VIN', 'Vin')}\r\n />\r\n \r\n\r\n \r\n this.handleFuelEntitiesChange(newValue)}\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n \r\n this.handleTransmissionEntitiesChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n \r\n this.handleTractionEntitiesChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n \r\n this.handleStatusEntitiesChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n \r\n {this.state.isCarSoldDialogOpen ? (\r\n \r\n \r\n \r\n \r\n \r\n {this.cbContext.translatorService.Tranlate(\r\n 'CASE_OTHER_SERVICE_FORM_SELLING_OFFER_DIALOG',\r\n 'Pret Vanzare'\r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n {this.state.salesWokflowForm && !this.state.isLoadingDialog ? (\r\n \r\n ) : (\r\n ''\r\n )}\r\n
\r\n \r\n ) : (\r\n ''\r\n )}\r\n
\r\n );\r\n };\r\n\r\n onCellClick = (\r\n colData: any,\r\n cellMeta: { colIndex: number; rowIndex: number; dataIndex: number }\r\n ) => {\r\n if (cellMeta.colIndex === 12) {\r\n return;\r\n }\r\n this.onClick(this.state.vehiclesList.vehicles[cellMeta.dataIndex].vehicle.id);\r\n };\r\n\r\n tableOptions = () => {\r\n return {\r\n filter: false,\r\n search: false,\r\n viewColumns: false,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.cbContext.translatorService),\r\n elevation: 0,\r\n serverSide: true,\r\n count: this.state.count,\r\n rowsPerPage: this.state.pageSize,\r\n page: this.state.page,\r\n onCellClick: this.onCellClick,\r\n onTableChange: async (action: any, tableState: any) => {\r\n switch (action) {\r\n case 'changePage':\r\n await this.loadVehicles(tableState.page, tableState.rowsPerPage);\r\n break;\r\n case 'changeRowsPerPage':\r\n await this.loadVehicles(tableState.page, tableState.rowsPerPage);\r\n break;\r\n case 'sort':\r\n break;\r\n default:\r\n }\r\n }\r\n };\r\n };\r\n\r\n public render() {\r\n this.cbContext = this.context as AppContext;\r\n\r\n if (this.state.isLoading) {\r\n return ;\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n \r\n
\r\n
\r\n {this.renderVehicleImport()}\r\n {this.props.appState?.appUser?.userRole?.code === 'MAVO_ADMIN' ?\r\n \r\n : null}\r\n
\r\n {this.renderFilters()}\r\n {this.state.isLoadingVehicles ? (\r\n \r\n ) : (\r\n \r\n )}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app,\r\n caseSettingsState: state.caseSettings,\r\n vehicleState: state.vehicle\r\n }),\r\n null\r\n)(withSnackbar(Vehicles as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n ApplicationState,\r\n CaseSettingsState,\r\n AppState,\r\n CaseSettingsActionCreators,\r\n VehicleState\r\n} from '../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { WorkflowSectionStepForm } from '../../interfaces/Workflow';\r\nimport { Case } from '../../interfaces/Case';\r\nimport moment from 'moment';\r\nimport { Vehicle } from '../../interfaces/Vehicle';\r\nimport { Link } from 'react-router-dom';\r\nimport * as R from 'ramda';\r\n\r\ninterface IVehicleCaseFormState {\r\n isLoading: boolean;\r\n hasRights: boolean;\r\n executing: boolean;\r\n isUserHidden: boolean;\r\n vehicle: Vehicle | null;\r\n vehicleCaseList: Case[];\r\n}\r\n\r\nexport interface ExternalVehicleCaseFormProps {\r\n workflowForm: WorkflowSectionStepForm;\r\n vehicleDetails: Vehicle;\r\n}\r\n\r\ntype IVehicleCaseFormProps = ExternalVehicleCaseFormProps & {\r\n caseSettingsState: CaseSettingsState;\r\n appState: AppState;\r\n vehicleState: VehicleState;\r\n} & AppState &\r\n typeof CaseSettingsActionCreators &\r\n ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass VehicleCaseForm extends React.PureComponent {\r\n private cbContext!: AppContext;\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n isLoading: true,\r\n hasRights: false,\r\n executing: false,\r\n isUserHidden: false,\r\n vehicle: null,\r\n vehicleCaseList: []\r\n } as IVehicleCaseFormState;\r\n\r\n public componentDidMount() {\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadVehicleCaseForm();\r\n }\r\n );\r\n }\r\n\r\n loadVehicleCaseForm = async () => {\r\n const vehicleId = this.props.vehicleState.vehicle!.id;\r\n const [vehicleCase, workflows, vehicle] = await Promise.all([\r\n this.cbContext.caseService.SearchByVehicle(vehicleId),\r\n this.cbContext.workflowService.GetUserWorkflows(),\r\n this.cbContext.vehicleService.GetVehicle(vehicleId)\r\n ]);\r\n\r\n const vehicleCaseDetailsList = vehicleCase;\r\n\r\n const [usersAssignedList, users] = await Promise.all([\r\n this.cbContext.appUserService.GetUsersInfo(\r\n Array.from(new Set(vehicleCase.map((item) => item.caseStatus.assignedToId)))\r\n ),\r\n this.cbContext.appUserService.GetUsersInfo(\r\n Array.from(new Set(vehicleCase.map((item) => item.createdBy)))\r\n )\r\n ]);\r\n\r\n vehicleCaseDetailsList.forEach((cd) => {\r\n const workflow = workflows.find((item) => item.id === cd.caseWorkflow.workflowId);\r\n const userAssignedTo = usersAssignedList.find(\r\n (item) => item.id === cd.caseStatus.assignedToId\r\n );\r\n const createdBy = users.find((item) => item.id === cd.createdBy);\r\n\r\n cd.caseWorkflow.workflowDisplayName = R.isNil(workflow) ? '' : workflow.displayName;\r\n cd.caseStatus.assignedTo = R.isNil(userAssignedTo) ? null : userAssignedTo;\r\n cd.createdByUser = R.isNil(createdBy) ? null : createdBy;\r\n });\r\n\r\n this.setState({\r\n isLoading: false,\r\n vehicle: vehicle,\r\n vehicleCaseList: vehicleCaseDetailsList\r\n });\r\n };\r\n\r\n public render() {\r\n this.cbContext = this.context as AppContext;\r\n\r\n return (\r\n
\r\n {this.state.vehicleCaseList.map((item, index) => {\r\n const casesUrl = `/cases/${item.id}`;\r\n\r\n return (\r\n \r\n
\r\n
\r\n
\r\n {item.id}:\r\n
\r\n
\r\n {item.caseWorkflow.workflowDisplayName}\r\n
\r\n
\r\n
\r\n
\r\n {this.cbContext.translatorService.Tranlate(\r\n 'VEHICLE_CASE_CREATED_BY_LABEL',\r\n 'Creat de'\r\n )}\r\n :\r\n
\r\n
\r\n {item.createdByUser!.userName + ' '}{' '}\r\n {moment\r\n .utc(item.dateCreation)\r\n .local()\r\n .format(this.props.appState.longDateFormat)}\r\n
\r\n
\r\n
\r\n
\r\n {this.cbContext.translatorService.Tranlate(\r\n 'VEHICLE_CASE_ASSIGNED_TO_LABEL',\r\n 'Asignat la'\r\n )}\r\n :\r\n
\r\n
\r\n {item.caseStatus.assignedTo!.userName + ' '}{' '}\r\n {moment\r\n .utc(item.caseStatus.date)\r\n .local()\r\n .format(this.props.appState.longDateFormat)}\r\n
\r\n
\r\n
\r\n
\r\n {this.cbContext.translatorService.Tranlate('VEHICLE_CASE_STATE_LABEL', 'Stare')}\r\n :\r\n
\r\n
\r\n {this.state.vehicle!.currentStatus\r\n ? this.state.vehicle!.currentStatus.status!.displayName\r\n : ''}\r\n
\r\n
\r\n
\r\n \r\n );\r\n })}\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState, ownProps: ExternalVehicleCaseFormProps) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app,\r\n vehicelState: state.vehicle\r\n }),\r\n CaseSettingsActionCreators\r\n)(withSnackbar(VehicleCaseForm as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n ApplicationState,\r\n CaseSettingsState,\r\n AppState,\r\n CaseSettingsActionCreators,\r\n VehicleState\r\n} from '../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { WorkflowSectionStepForm } from '../../interfaces/Workflow';\r\nimport { IAppUserService } from '../../services/Interfaces/IAppUserService';\r\nimport moment from 'moment';\r\nimport MomentUtils from '@date-io/moment';\r\nimport { IVehicleService } from '../../services/Interfaces/IVehicleService';\r\nimport {\r\n Vehicle,\r\n VehicleStatusHistory,\r\n VehicleStatusHistoryExtended\r\n} from '../../interfaces/Vehicle';\r\nimport * as R from 'ramda';\r\nimport { VehicleUpdateHistory } from '../../interfaces/VehicleUpdateHistory';\r\n\r\ninterface IVehicleHistoryTimelineState {\r\n isLoading: boolean;\r\n hasRights: boolean;\r\n executing: boolean;\r\n isUserHidden: boolean;\r\n vehicleStatusHistory: VehicleStatusHistoryExtended[];\r\n}\r\n\r\nexport interface ExternalVehicleHistoryTimelineProps {\r\n workflowForm: WorkflowSectionStepForm;\r\n vehicleDetails: Vehicle;\r\n}\r\n\r\nclass LocalizedUtils extends MomentUtils {\r\n // dateFormat = \"DD MM YYYY\";\r\n}\r\n\r\ntype IVehicleHistoryTimelineProps = ExternalVehicleHistoryTimelineProps & {\r\n caseSettingsState: CaseSettingsState;\r\n appState: AppState;\r\n vehicleState: VehicleState;\r\n} & AppState &\r\n typeof CaseSettingsActionCreators &\r\n ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass VehicleHistoryTimeline extends React.PureComponent<\r\n IVehicleHistoryTimelineProps,\r\n IVehicleHistoryTimelineState\r\n> {\r\n private vehicleService!: IVehicleService;\r\n private appUserService!: IAppUserService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n isLoading: true,\r\n hasRights: false,\r\n executing: false,\r\n isUserHidden: false,\r\n vehicleStatusHistory: []\r\n } as IVehicleHistoryTimelineState;\r\n\r\n public componentDidMount() {\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadVehicleHistoryTimeline();\r\n }\r\n );\r\n }\r\n\r\n loadVehicleHistoryTimeline = async () => {\r\n const vehicleId = this.props.vehicleState.vehicle!.id;\r\n const [vehicleStatusHistory, vehicleFieldsUpdateHistory] = await Promise.all([\r\n this.vehicleService.GetVehicleStatuses(vehicleId),\r\n this.vehicleService.GetVehicleFieldsHistory(vehicleId)\r\n ]);\r\n\r\n const vehicleStatusHistoryDetailedList: VehicleStatusHistoryExtended[] = vehicleStatusHistory;\r\n\r\n const [users] = await Promise.all([\r\n this.appUserService.GetUsersInfo(\r\n Array.from(\r\n new Set([\r\n ...vehicleStatusHistory.map((item) => item.userId),\r\n ...vehicleFieldsUpdateHistory.map((item) => item.userId)\r\n ])\r\n )\r\n )\r\n ]);\r\n\r\n vehicleStatusHistoryDetailedList.forEach((cd) => {\r\n const vehicleUpdateHistory = vehicleFieldsUpdateHistory.filter(\r\n (item) => item.vehicleStatusHistoryId === cd.id\r\n );\r\n if (vehicleUpdateHistory.length) {\r\n vehicleUpdateHistory.forEach((item) => {\r\n item.user = users.find((u) => u.id === item.userId);\r\n });\r\n }\r\n const createdBy = users.find((item) => item.id === cd.userId);\r\n cd.user = R.isNil(createdBy) ? null : createdBy;\r\n cd.vehicleUpdateHistory = vehicleUpdateHistory || undefined;\r\n });\r\n\r\n this.setState({\r\n isLoading: false,\r\n vehicleStatusHistory: vehicleStatusHistoryDetailedList\r\n });\r\n };\r\n\r\n showVehicleStatusHistoryTimeline = () => {\r\n return this.state.vehicleStatusHistory.map((status, index) => (\r\n
\r\n
\r\n
\r\n

{status.status!.displayName}

\r\n

{status.comment}

\r\n

\r\n {moment.utc(status.date).local().format(this.props.appState.longDateFormat)}{' '}\r\n {' (' + status.user!.email + ')'}\r\n

\r\n {status.vehicleUpdateHistory ? (\r\n
\r\n
\r\n {this.renderFieldsUpdateHistory(status.vehicleUpdateHistory)}\r\n
\r\n
\r\n ) : undefined}\r\n
\r\n
\r\n ));\r\n };\r\n\r\n renderFieldsUpdateHistory(vehicleUpdateHistory: VehicleUpdateHistory[]) {\r\n return vehicleUpdateHistory.map((vehicleUpdate) => {\r\n return vehicleUpdate.vehicleUpdateHistoryFields.map((item, index) => (\r\n
\r\n
\r\n
\r\n

\r\n {moment.utc(vehicleUpdate.date).local().format(this.props.appState.longDateFormat) +\r\n ' (' +\r\n vehicleUpdate.user?.userName +\r\n ')'}{' '}\r\n

\r\n

\r\n {item.vehicleFieldNameLocalized}: \r\n

\r\n {item.oldValueLocalized && item.oldValueLocalized.length < 60 ? (\r\n
\r\n {item.oldValueLocalized}\r\n  {'->'} \r\n {item.newValueLocalized}\r\n
\r\n ) : (\r\n
\r\n
\r\n {item.oldValueLocalized}\r\n
\r\n
 {'->'} 
\r\n
\r\n {item.newValueLocalized}\r\n
\r\n
\r\n )}\r\n
\r\n
\r\n ));\r\n });\r\n }\r\n\r\n public render() {\r\n this.vehicleService = (this.context as AppContext).vehicleService;\r\n this.appUserService = (this.context as AppContext).appUserService;\r\n\r\n return (\r\n
\r\n
\r\n {this.showVehicleStatusHistoryTimeline()}\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalVehicleHistoryTimelineProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app,\r\n vehicelState: state.vehicle\r\n }),\r\n CaseSettingsActionCreators,\r\n mergeProps\r\n)(withSnackbar(VehicleHistoryTimeline as any));\r\n","import {\r\n Box,\r\n Button,\r\n Dialog,\r\n DialogContent,\r\n DialogTitle,\r\n Grid,\r\n IconButton,\r\n Typography\r\n} from '@material-ui/core';\r\nimport ExpandMoreIcon from '@material-ui/icons/ExpandMore';\r\nimport ExpandLessIcon from '@material-ui/icons/ExpandLess';\r\nimport React, { useEffect, useState } from 'react';\r\nimport { CaseAttachment, CaseAttachments } from '../../interfaces/Case';\r\nimport VisibilityIcon from '@material-ui/icons/Visibility';\r\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\r\n// @ts-ignore\r\nimport FileViewer from 'react-file-viewer';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\n\r\nimport { IVehicleService } from '../../services/Interfaces/IVehicleService';\r\nimport FileSaver from 'file-saver';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { IOrganizationService } from '../../services/Interfaces/IOrganizationService';\r\n\r\ninterface Props {\r\n vehicleId: number;\r\n vehicleService: IVehicleService;\r\n caseService: ICaseService;\r\n organizationService: IOrganizationService;\r\n translatorService: ITranslatorService;\r\n}\r\n\r\ninterface PreviewFile {\r\n url: string;\r\n extension: string;\r\n}\r\n\r\nexport const imageExtensions = ['png', 'jpeg', 'jpg', 'bmp'];\r\n\r\nconst VehicleAttachments: React.FC = ({\r\n vehicleService,\r\n caseService,\r\n vehicleId,\r\n translatorService,\r\n organizationService\r\n}) => {\r\n const [caseAttachments, setCaseAttachments] = useState([]);\r\n const [previewFile, setPreviewFile] = useState();\r\n const [isDialogOpen, setIsDialogOpen] = useState(false);\r\n\r\n const setVehicleAttachmens = async () => {\r\n const caseAttachments = await vehicleService.GetCaseAttachmentsForVehicle(vehicleId);\r\n\r\n for (const caseAttachment of caseAttachments) {\r\n if (!caseAttachment.organizationOwnerName) {\r\n caseAttachment.picturesExpanded = false;\r\n caseAttachment.documentsExpanded = false;\r\n const org = await organizationService.GetOrganization(caseAttachment.organizationOwnerId);\r\n if (org) {\r\n caseAttachment.organizationOwnerName = org.name;\r\n }\r\n }\r\n for (const attachment of caseAttachment.attachments)\r\n if (!attachment.url) {\r\n const blob = await getImage(attachment.fileName);\r\n attachment.url = URL.createObjectURL(blob);\r\n }\r\n }\r\n\r\n setCaseAttachments(caseAttachments);\r\n };\r\n\r\n const handlePreviewAttachment = async (originalFileName: string, fileName: string) => {\r\n const fileBlob = await getImage(fileName);\r\n const url = URL.createObjectURL(fileBlob);\r\n const extension = originalFileName.split('.').pop();\r\n\r\n if (!extension) {\r\n return;\r\n }\r\n\r\n setPreviewFile({\r\n url,\r\n extension\r\n });\r\n\r\n setIsDialogOpen(true);\r\n };\r\n\r\n const downloadFile = async (fileName: string, origFileName: string) => {\r\n const fileBlob = await getImage(fileName);\r\n FileSaver.saveAs(fileBlob, origFileName);\r\n };\r\n\r\n const renderPreviewAttachment = () => {\r\n return previewFile ? (\r\n \r\n ) : null;\r\n };\r\n\r\n const getImage = async (fileName: string) => {\r\n const fileBlob = await caseService.GetCaseAttachment(fileName);\r\n return fileBlob;\r\n };\r\n\r\n const expandPictures = (caseId: number) => {\r\n const newAttachments = [...caseAttachments];\r\n\r\n const index = newAttachments.findIndex((c) => c.caseId === caseId);\r\n if (index >= 0) {\r\n newAttachments[index].picturesExpanded = !newAttachments[index].picturesExpanded;\r\n }\r\n\r\n setCaseAttachments(newAttachments);\r\n };\r\n\r\n const expandDocuments = (caseId: number) => {\r\n const newAttachments = [...caseAttachments];\r\n\r\n const index = newAttachments.findIndex((c) => c.caseId === caseId);\r\n if (index >= 0) {\r\n newAttachments[index].documentsExpanded = !newAttachments[index].documentsExpanded;\r\n }\r\n\r\n setCaseAttachments(newAttachments);\r\n };\r\n\r\n useEffect(() => {\r\n setVehicleAttachmens();\r\n }, [vehicleId]);\r\n\r\n if (!caseAttachments.length) {\r\n return null;\r\n }\r\n\r\n return (\r\n
\r\n
\r\n {caseAttachments.map(\r\n (\r\n {\r\n attachments,\r\n caseId,\r\n organizationOwnerName,\r\n caseTypeDisplayName,\r\n picturesExpanded,\r\n documentsExpanded\r\n },\r\n index\r\n ) => {\r\n const pictureAttachments: CaseAttachment[] = [];\r\n const documentAttachments: CaseAttachment[] = [];\r\n\r\n for (const attachment of attachments) {\r\n const ext = attachment.fileName.split('.').pop();\r\n if (ext && imageExtensions.includes(ext)) {\r\n pictureAttachments.push(attachment);\r\n } else {\r\n documentAttachments.push(attachment);\r\n }\r\n }\r\n\r\n return (\r\n
\r\n
\r\n \r\n {`${translatorService.Tranlate(\r\n 'VEHICLES_VEHICLE_ATTACHMENTS_CASE',\r\n 'Atasamente dosar'\r\n )} ${caseId} ${caseTypeDisplayName} ${organizationOwnerName}`}\r\n \r\n
\r\n\r\n {pictureAttachments.length ? (\r\n expandPictures(caseId)}\r\n >\r\n \r\n {picturesExpanded ? : }\r\n \r\n \r\n {translatorService.Tranlate('VEHICLES_VEHICLE_PICTURES', 'Fotografii')}\r\n \r\n
\r\n ) : null}\r\n {picturesExpanded && (\r\n \r\n {pictureAttachments.map((attachment) => {\r\n return (\r\n \r\n
\r\n \r\n \r\n \r\n {attachment.attachmentType?.displayName}\r\n
\r\n
\r\n \r\n
\r\n \r\n downloadFile(attachment.fileName, attachment.originalFileName)\r\n }\r\n >\r\n {attachment.originalFileName}\r\n {' '}\r\n
\r\n
\r\n \r\n
\r\n \r\n handlePreviewAttachment(\r\n attachment.originalFileName,\r\n attachment.fileName\r\n )\r\n }\r\n >\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n {\r\n
\r\n
\r\n \r\n
\r\n
\r\n }\r\n
\r\n
\r\n
\r\n \r\n );\r\n })}\r\n \r\n )}\r\n {documentAttachments.length ? (\r\n expandDocuments(caseId)}\r\n >\r\n \r\n {documentsExpanded ? : }\r\n \r\n \r\n {translatorService.Tranlate('VEHICLES_VEHICLE_DOCUMENTS', 'Documente')}\r\n \r\n
\r\n ) : null}\r\n {documentsExpanded && (\r\n \r\n {documentAttachments.map((attachment) => {\r\n return (\r\n \r\n
\r\n \r\n \r\n {attachment.attachmentType?.displayName}\r\n
\r\n \r\n
\r\n \r\n downloadFile(attachment.fileName, attachment.originalFileName)\r\n }\r\n >\r\n {attachment.originalFileName}\r\n {' '}\r\n
\r\n
\r\n
\r\n
\r\n \r\n );\r\n })}\r\n \r\n )}\r\n
\r\n );\r\n }\r\n )}\r\n \r\n setIsDialogOpen(false)}\r\n aria-labelledby=\"customized-dialog-title\"\r\n open={isDialogOpen}\r\n maxWidth=\"md\"\r\n fullWidth={true}\r\n fullScreen={false}\r\n classes={{ paper: 'dialogPaper' }}\r\n scroll=\"body\"\r\n >\r\n \r\n \r\n \r\n \r\n {translatorService.Tranlate('CASE_PREVIEW_DOC', 'Previzualizare document')}\r\n \r\n \r\n \r\n setIsDialogOpen(false)} size={'small'}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {renderPreviewAttachment()}\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default VehicleAttachments;\r\n","import React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n ApplicationState,\r\n CaseSettingsState,\r\n AppState,\r\n CaseSettingsActionCreators,\r\n VehicleActionCreators,\r\n VehicleState\r\n} from '../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport {\r\n Button,\r\n IconButton,\r\n Dialog,\r\n DialogTitle,\r\n DialogContent,\r\n Card,\r\n AppBar,\r\n Tabs,\r\n Tab\r\n} from '@material-ui/core';\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { WorkflowSectionStepForm } from '../../interfaces/Workflow';\r\nimport { IReferentialService } from '../../services/Interfaces/IReferentialService';\r\nimport { ReferentialCode, VehicleStatusCodeEnum } from '../../helpers/Constants';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport Referentials from '../../helpers/Referentials.json';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport { IVehicleService } from '../../services/Interfaces/IVehicleService';\r\nimport { Vehicle, ChangeVehicleStatusRequest } from '../../interfaces/Vehicle';\r\nimport TabPanel from '../_shared/Tabs';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport CaseDetailsCaseTabCarDetailsExtendedContainer from '../cases/vehicleDetails/CaseDetailsCaseTabCarDetailsExtendedContainer';\r\nimport VehicleCase from './VehicleCase';\r\nimport VehicleHistoryTimeline from './VehicleHistoryTimeline';\r\nimport * as R from 'ramda';\r\nimport { allowedVehicleStatuses } from '../../helpers/Constants';\r\nimport VehicleAttachments from './VehicleAttachments';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport { IOrganizationService } from '../../services/Interfaces/IOrganizationService';\r\nimport { CaseService } from '../../services/CaseService';\r\nimport { OrganizationService } from '../../services/OrganizationService';\r\n\r\ninterface IDetailsOfCarFormState {\r\n isLoading: boolean;\r\n hasRights: boolean;\r\n executing: boolean;\r\n isUserHidden: boolean;\r\n vehicle: Vehicle | null;\r\n selectedTab: number;\r\n statuses: IReferential[];\r\n statusOptions: IReferential[];\r\n selectedStatus: IReferential | null;\r\n selectedDisplayedStatus: string;\r\n isChangeVehicleStatusDialogOpen: boolean;\r\n}\r\n\r\nexport interface ExternalDetailsOfCarFormProps {\r\n workflowForm: WorkflowSectionStepForm;\r\n vehicleDetails: Vehicle;\r\n}\r\n\r\ntype IDetailsOfCarFormProps = ExternalDetailsOfCarFormProps & {\r\n caseSettingsState: CaseSettingsState;\r\n appState: AppState;\r\n vehicleState: VehicleState;\r\n} & typeof CaseSettingsActionCreators &\r\n typeof VehicleActionCreators &\r\n ProviderContext &\r\n RouteComponentProps<{ id: string, type?:string }>;\r\n\r\nclass DetailsOfCarForm extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private vehicleService!: IVehicleService;\r\n private appReferentialService!: IReferentialService;\r\n private caseService!: ICaseService;\r\n private organizationService!: IOrganizationService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n isLoading: true,\r\n hasRights: false,\r\n executing: false,\r\n isUserHidden: false,\r\n selectedTab: 0,\r\n statuses: [] as IReferential[],\r\n statusOptions: [],\r\n selectedStatus: null,\r\n isChangeVehicleStatusDialogOpen: false,\r\n vehicle: null,\r\n selectedDisplayedStatus: ''\r\n } as IDetailsOfCarFormState;\r\n\r\n public componentDidMount() {\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadDetailsOfCarForm();\r\n }\r\n );\r\n }\r\n\r\n loadDetailsOfCarForm = async () => {\r\n const vehicleId = Number.parseInt(this.props.match.params.id);\r\n if (Number.isNaN(vehicleId)) {\r\n return;\r\n }\r\n\r\n await this.props.setVehicle(this.props.match.params.id as any);\r\n const vehicle = this.props.vehicleState.vehicle;\r\n const statusesTypeRef = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.VehicleStatus\r\n );\r\n\r\n const statuses = await this.appReferentialService.Get(statusesTypeRef!.baseUrl);\r\n\r\n const currentStatus = !R.isNil(vehicle?.currentStatus)\r\n ? vehicle?.currentStatus.status || null\r\n : null;\r\n\r\n this.setState({\r\n isLoading: false,\r\n vehicle: vehicle,\r\n statuses: statuses,\r\n statusOptions: this.getStatusOptions(currentStatus, statuses),\r\n selectedStatus: currentStatus,\r\n selectedDisplayedStatus: !R.isNil(vehicle?.currentStatus?.status)\r\n ? vehicle?.currentStatus?.status?.displayName || ''\r\n : ''\r\n });\r\n };\r\n\r\n getStatusOptions = (status: IReferential | null, statuses: IReferential[]) => {\r\n let statusOptions = statuses;\r\n const currentStatusEnum = (status?.id as unknown as VehicleStatusCodeEnum) || null;\r\n\r\n if (currentStatusEnum && allowedVehicleStatuses.has(currentStatusEnum)) {\r\n const allowedStatuses = allowedVehicleStatuses.get(currentStatusEnum) || [];\r\n statusOptions = statuses.filter((status) => {\r\n const s = status.id as unknown as VehicleStatusCodeEnum;\r\n return allowedStatuses.includes(s);\r\n });\r\n }\r\n\r\n return statusOptions;\r\n };\r\n\r\n changeVehicleStatusSubmit = async () => {\r\n try {\r\n const newStatus = await this.vehicleService.ChangeVehicleStatus({\r\n vehicleId: this.props.vehicleState.vehicle?.id,\r\n statusId: this.state.selectedStatus?.id,\r\n comment: ''\r\n } as ChangeVehicleStatusRequest);\r\n\r\n newStatus.status = this.state.selectedStatus;\r\n this.props.changeVehicleStatus(newStatus);\r\n\r\n this.setState({\r\n selectedDisplayedStatus: this.state.selectedStatus?.displayName || '',\r\n statusOptions: this.getStatusOptions(this.state.selectedStatus, this.state.statuses)\r\n });\r\n\r\n this.closeDialog();\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (ex) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n handleAutocompleteVehicleStatusChange = (value: any | null) => {\r\n this.setState({\r\n selectedStatus: value\r\n });\r\n };\r\n\r\n renderChangeVehicleStatusForm = () => {\r\n return (\r\n {\r\n this.changeVehicleStatusSubmit();\r\n }}\r\n >\r\n
\r\n \r\n this.handleAutocompleteVehicleStatusChange(newValue)\r\n }\r\n getOptionLabel={(option: any) => option.displayName}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n \r\n {this.translatorService.Tranlate('SAVE', 'Salveaza')}\r\n \r\n \r\n );\r\n };\r\n\r\n changeVehicleStatusClick = () => {\r\n this.setState({ isChangeVehicleStatusDialogOpen: true });\r\n };\r\n\r\n closeDialog = async () => {\r\n this.setState({ isChangeVehicleStatusDialogOpen: false });\r\n };\r\n\r\n onTabChange = (event: any, newValue: number) => {\r\n this.setState({\r\n selectedTab: newValue\r\n });\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.vehicleService = (this.context as AppContext).vehicleService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n
\r\n {this.state.selectedDisplayedStatus ? (\r\n this.changeVehicleStatusClick()}\r\n color=\"inherit\"\r\n className=\"text-white bg-success mr-2\"\r\n >\r\n {this.state.selectedDisplayedStatus}\r\n \r\n ) : undefined}\r\n
\r\n
\r\n {this.state.vehicle ? this.state.vehicle?.make?.displayName || '' : ''}\r\n  \r\n {this.state.vehicle ? this.state.vehicle?.model?.displayName || '' : ''}\r\n  \r\n {this.state.vehicle ? this.state.vehicle?.version || '' : ''}\r\n  \r\n {this.state.vehicle?.purchaseVatRate === 0 &&\r\n `(${this.translatorService.Tranlate(\r\n 'DETAILS_OF_CAR_NO_VAT',\r\n 'Vehicul achizitionat cu TVA 0'\r\n )})`}\r\n
\r\n
\r\n {\r\n this.props.history.push('/vehicles');\r\n }}\r\n >\r\n {this.translatorService.Tranlate(\r\n 'DETAILS_OF_CAR_CARS_STOCK_BUTTON',\r\n 'Stoc masini'\r\n )}\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n // \"\"\r\n \r\n \r\n {this.state.vehicle?.id ? (\r\n \r\n ) : null}\r\n \r\n ) : null}\r\n
\r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n ) : null}\r\n
\r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n ) : null}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n {this.translatorService.Tranlate(\r\n 'ORDER_DETAILS_DIALOG_TITLE',\r\n 'Modificare stare comanda'\r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.renderChangeVehicleStatusForm()}\r\n \r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState, ownProps: ExternalDetailsOfCarFormProps) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app,\r\n vehicleState: state.vehicle\r\n }),\r\n { ...CaseSettingsActionCreators, ...VehicleActionCreators }\r\n)(withSnackbar(DetailsOfCarForm as any));\r\n","import React, { Fragment } from 'react';\r\nimport {\r\n AppUserAdminActionCreators,\r\n ApplicationState,\r\n AppActionCreators,\r\n AppState\r\n} from '../../store';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport { TextField, Tabs, Tab, AppBar, Button, Chip } from '@material-ui/core';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../context/Contexts';\r\nimport { OrganizationInterface } from '../../interfaces/Organization';\r\nimport { IOrganizationService } from '../../services/Interfaces/IOrganizationService';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport MaterialTable, { Column, Icons } from 'material-table';\r\nimport ArrowDownward from '@material-ui/icons/ArrowDownward';\r\nimport Check from '@material-ui/icons/Check';\r\nimport ChevronLeft from '@material-ui/icons/ChevronLeft';\r\nimport ChevronRight from '@material-ui/icons/ChevronRight';\r\nimport Clear from '@material-ui/icons/Clear';\r\nimport DeleteOutline from '@material-ui/icons/DeleteOutline';\r\nimport Edit from '@material-ui/icons/Edit';\r\nimport FilterList from '@material-ui/icons/FilterList';\r\nimport FirstPage from '@material-ui/icons/FirstPage';\r\nimport LastPage from '@material-ui/icons/LastPage';\r\nimport Remove from '@material-ui/icons/Remove';\r\nimport SaveAlt from '@material-ui/icons/SaveAlt';\r\nimport Search from '@material-ui/icons/Search';\r\nimport ViewColumn from '@material-ui/icons/ViewColumn';\r\nimport AddCircleTwoToneIcon from '@material-ui/icons/AddCircleTwoTone';\r\nimport { forwardRef } from 'react';\r\nimport { isTemplateElement } from '@babel/types';\r\nimport moment from 'moment';\r\n\r\nconst tableIcons = {\r\n Add: forwardRef((props, ref) => ),\r\n Check: forwardRef((props, ref) => ),\r\n Clear: forwardRef((props, ref) => ),\r\n Delete: forwardRef((props, ref) => ),\r\n DetailPanel: forwardRef((props, ref) => ),\r\n Edit: forwardRef((props, ref) => ),\r\n Export: forwardRef((props, ref) => ),\r\n Filter: forwardRef((props, ref) => ),\r\n FirstPage: forwardRef((props, ref) => ),\r\n LastPage: forwardRef((props, ref) => ),\r\n NextPage: forwardRef((props, ref) => ),\r\n PreviousPage: forwardRef((props, ref) => ),\r\n ResetSearch: forwardRef((props, ref) => ),\r\n Search: forwardRef((props, ref) => ),\r\n SortArrow: forwardRef((props, ref) => ),\r\n ThirdStateCheck: forwardRef((props, ref) => ),\r\n ViewColumn: forwardRef((props, ref) => )\r\n} as Icons;\r\n\r\ninterface IOrganizationInterfacesState {\r\n interfaces: OrganizationInterface[];\r\n isLoading: boolean;\r\n organizationId: number;\r\n}\r\n\r\ntype OrganizationInterfacesProps = { appState: AppState } & ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass OrganizationInterfaces extends React.PureComponent<\r\n OrganizationInterfacesProps,\r\n IOrganizationInterfacesState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private organizationService!: IOrganizationService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n interfaces: [],\r\n isLoading: true,\r\n organizationId: 0\r\n } as IOrganizationInterfacesState;\r\n\r\n componentDidMount = () => {\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n () => {\r\n this.loadData();\r\n }\r\n );\r\n };\r\n\r\n loadData = async () => {\r\n const hoId = this.props.appState.appUser?.organizationId;\r\n\r\n if (!hoId) {\r\n return;\r\n }\r\n\r\n try {\r\n const data = await this.organizationService.GetInterfacesWithClientAccess(hoId);\r\n\r\n this.setState({\r\n interfaces: data,\r\n isLoading: false,\r\n organizationId: hoId\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n handleConnect = async (interfaceId: number, orgId: number) => {\r\n const url = await this.organizationService.GetInterfaceAuthorizeUrl(orgId, interfaceId);\r\n\r\n if (url) {\r\n window.open(url, '_blank');\r\n }\r\n };\r\n\r\n getColumns = () => {\r\n return [\r\n {\r\n field: 'code',\r\n title: this.translatorService.Tranlate('ORGANIZATION_INTERFACE_CODE_HEADER', 'Code'),\r\n searchable: true,\r\n editable: 'never'\r\n } as Column,\r\n {\r\n field: 'userName',\r\n title: this.translatorService.Tranlate('ORGANIZATION_INTERFACE_UER_HEADER', 'Utilizator'),\r\n searchable: true,\r\n render: (props: OrganizationInterface) => {\r\n if (props.supportsOAuth2) {\r\n return '-';\r\n }\r\n\r\n return props.userName;\r\n },\r\n editComponent: (props: any) => {\r\n if (props.rowData.supportsOAuth2) {\r\n return <>;\r\n }\r\n return (\r\n props.onChange(e.target.value)}\r\n />\r\n );\r\n }\r\n },\r\n {\r\n field: 'password',\r\n title: this.translatorService.Tranlate('ORGANIZATION_INTERFACE_PASSWORD_HEADER', 'Parola'),\r\n render: (props: OrganizationInterface) => {\r\n if (props.supportsOAuth2) {\r\n return '-';\r\n }\r\n return '***';\r\n },\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n editComponent: (props: any) => {\r\n if (props.rowData.supportsOAuth2) {\r\n return <>;\r\n }\r\n return (\r\n props.onChange(e.target.value)}\r\n />\r\n );\r\n }\r\n },\r\n {\r\n field: 'customerId',\r\n title: this.translatorService.Tranlate(\r\n 'ORGANIZATION_INTERFACE_CLIENTID_HEADER',\r\n 'Id Client'\r\n ),\r\n render: (props: OrganizationInterface) => {\r\n if (!props.supportsOAuth2) {\r\n return '-';\r\n }\r\n return '***';\r\n },\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n editComponent: (props: any) => {\r\n if (!props.rowData.supportsOAuth2) {\r\n return <>;\r\n }\r\n return (\r\n props.onChange(e.target.value)}\r\n />\r\n );\r\n }\r\n },\r\n {\r\n field: 'clientSecret',\r\n title: this.translatorService.Tranlate(\r\n 'ORGANIZATION_INTERFACE_CLIENTSECRET_HEADER',\r\n 'Secret Client'\r\n ),\r\n render: (props: OrganizationInterface) => {\r\n if (!props.supportsOAuth2) {\r\n return '-';\r\n }\r\n return '***';\r\n },\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n editComponent: (props: any) => {\r\n if (!props.rowData.supportsOAuth2) {\r\n return <>;\r\n }\r\n return (\r\n props.onChange(e.target.value)}\r\n />\r\n );\r\n }\r\n },\r\n {\r\n field: 'refreshTokenValidUntil',\r\n title: this.translatorService.Tranlate('ORGANIZATION_INTERFACE_STATUS_HEADER', 'Status'),\r\n editable: 'never',\r\n render: (rowData: OrganizationInterface) => {\r\n if (!rowData.supportsOAuth2) {\r\n return (\r\n \r\n );\r\n }\r\n\r\n if (!rowData.refreshTokenValidUntil) {\r\n return (\r\n \r\n );\r\n }\r\n\r\n if (\r\n rowData.refreshTokenValidUntil &&\r\n moment.utc(rowData.refreshTokenValidUntil).isAfter(moment.utc())\r\n ) {\r\n return (\r\n \r\n );\r\n }\r\n\r\n return (\r\n \r\n );\r\n },\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n editComponent: (props: any) => {\r\n if (!props.rowData.supportsOAuth2) {\r\n return <>;\r\n }\r\n return (\r\n props.onChange(e.target.value)}\r\n />\r\n );\r\n }\r\n } as Column,\r\n {\r\n field: ' ',\r\n title: ' ',\r\n render: (rowData: OrganizationInterface) => {\r\n if (rowData.supportsOAuth2) {\r\n return (\r\n this.handleConnect(rowData.id, rowData.organizationId)}\r\n >\r\n {this.translatorService.Tranlate(\r\n 'ORGANIZATION_INTERFACE_CONNECT_HEADER',\r\n 'Conecteaza'\r\n )}\r\n \r\n );\r\n }\r\n },\r\n editComponent: () => {\r\n return <>;\r\n }\r\n }\r\n ];\r\n };\r\n\r\n public getLocalization = () => {\r\n return {\r\n header: { actions: '' },\r\n toolbar: {\r\n searchPlaceholder: this.translatorService.Tranlate('SEARCH', 'Cauta'),\r\n searchTooltip: this.translatorService.Tranlate('SEARCH', 'Cauta')\r\n },\r\n body: {\r\n editTooltip: this.translatorService.Tranlate('EDIT', 'Editeaza'),\r\n deleteTooltip: this.translatorService.Tranlate('DELETE', 'Sterge'),\r\n addTooltip: this.translatorService.Tranlate('Add', 'Adauga'),\r\n emptyDataSourceMessage: this.translatorService.Tranlate(\r\n 'NO_RECORDS_TO_DISPLAY',\r\n 'Nu exista date de afisat'\r\n ),\r\n editRow: {\r\n cancelTooltip: this.translatorService.Tranlate('CANCEL', 'Anuleaza'),\r\n saveTooltip: this.translatorService.Tranlate('SAVE', 'Salveaza'),\r\n deleteText: this.translatorService.Tranlate(\r\n 'DELETE_TEXT',\r\n 'Sigur doriti sa stergeti aceasta inregistrare?'\r\n )\r\n }\r\n },\r\n pagination: {\r\n labelRowsSelect: this.translatorService.Tranlate('ROWS', 'inregistrari'),\r\n firstTooltip: this.translatorService.Tranlate('FIRST_PAGE', 'Prima pagina'),\r\n previousTooltip: this.translatorService.Tranlate('PREVIOUS_PAGE', 'Pagina precedenta'),\r\n nextTooltip: this.translatorService.Tranlate('NEXT_PAGE', 'Pagina urmatoare'),\r\n lastTooltip: this.translatorService.Tranlate('LAST_PAGE', 'Ultima pagina'),\r\n labelDisplayedRows:\r\n '{from}-{to} ' + this.translatorService.Tranlate('OF', 'din') + ' {count}'\r\n }\r\n };\r\n };\r\n\r\n onRowUpdate = (newData: OrganizationInterface, oldData?: OrganizationInterface): Promise =>\r\n new Promise(async (resolve, reject) => {\r\n if (oldData) {\r\n try {\r\n await this.organizationService.SetInterfaceCredentials({\r\n orgId: this.state.organizationId,\r\n interfaceId: newData.id,\r\n userName: !newData.supportsOAuth2 ? newData.userName : undefined,\r\n password: !newData.supportsOAuth2 ? newData.password : undefined,\r\n clientId: newData.supportsOAuth2 ? newData.customerId : undefined,\r\n clientSecret: newData.supportsOAuth2 ? newData.clientSecret : undefined\r\n });\r\n await this.loadData();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n resolve();\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n }\r\n });\r\n\r\n public renderTable = () => {\r\n return (\r\n this.onRowUpdate(newData, oldData)\r\n }}\r\n />\r\n );\r\n };\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n {!this.state.isLoading ? this.renderTable() : null}\r\n \r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: OrganizationInterfacesProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\nexport default connect(\r\n (state: ApplicationState) => ({ appState: state.app }),\r\n { ...AppUserAdminActionCreators, ...AppActionCreators },\r\n mergeProps\r\n)(withSnackbar(OrganizationInterfaces as any));\r\n","import * as React from 'react';\r\nimport { ApplicationState, AppState } from '../../store';\r\nimport { ApplicationContext, AppContext } from '../../context/Contexts';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport { Card, Grid, Tab, Tabs, AppBar, TextField } from '@material-ui/core';\r\nimport TabPanel from '../_shared/Tabs';\r\nimport MUIDataTable, {\r\n MUIDataTableColumnOptions,\r\n MUIDataTableMeta,\r\n SelectableRows\r\n} from 'mui-datatables';\r\nimport { MUITranslations } from '../../helpers/MUITableTranslations';\r\nimport { isNullOrUndefined } from 'util';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport { Organization } from '../../interfaces/Organization';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { VehicleExtensionList, VehicleFilters } from '../../interfaces/Vehicle';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport moment from 'moment';\r\nimport Loader from '../Loader';\r\nimport noop from 'lodash/noop';\r\n\r\ntype VehiclesHistoryProps = { appState: AppState } & ProviderContext & RouteComponentProps;\r\n\r\ninterface IVehiclesHistoryState {\r\n vehiclesList: VehicleExtensionList;\r\n organizationEntities: Organization[];\r\n selectedOrgEntities: Organization[];\r\n location: string;\r\n makeEntities: IReferential[];\r\n selectedMakeEntities: IReferential[];\r\n modelEntities: IReferential[];\r\n selectedModelEntities: IReferential[];\r\n fuelEntities: IReferential[];\r\n selectedFuelEntities: IReferential[];\r\n transmissionEntities: IReferential[];\r\n selectedTransmissionEntities: IReferential[];\r\n tractionEntities: IReferential[];\r\n selectedTractionEntities: IReferential[];\r\n statusEntities: IReferential[];\r\n selectedStatusEntities: IReferential[];\r\n selectedTab: number;\r\n isLoading: boolean;\r\n isLoadingVehicles: boolean;\r\n count: number;\r\n page: number;\r\n pageSize: number;\r\n vehicleImportDialogOpenend: boolean;\r\n vin: string;\r\n}\r\n\r\nclass VehiclesHistory extends React.PureComponent {\r\n private cbContext!: AppContext;\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n vehiclesList: {} as VehicleExtensionList,\r\n organizationEntities: [],\r\n selectedOrgEntities: [],\r\n location: '',\r\n makeEntities: [],\r\n selectedMakeEntities: [],\r\n modelEntities: [],\r\n selectedModelEntities: [],\r\n fuelEntities: [],\r\n selectedFuelEntities: [],\r\n transmissionEntities: [],\r\n selectedTransmissionEntities: [],\r\n tractionEntities: [],\r\n selectedTractionEntities: [],\r\n statusEntities: [],\r\n selectedStatusEntities: [],\r\n selectedTab: 0,\r\n isLoading: false,\r\n isLoadingVehicles: false,\r\n count: 1,\r\n page: 0,\r\n pageSize: 10,\r\n vehicleImportDialogOpenend: false,\r\n vin: ''\r\n } as IVehiclesHistoryState;\r\n\r\n public async componentDidMount() {\r\n const vehiclesFilters = {\r\n makeIds: [],\r\n modelIds: [],\r\n fuelTypeIds: [],\r\n transmissionIds: [],\r\n tractionIds: [],\r\n statusIds: [],\r\n organizationIds: [],\r\n page: this.state.page + 1,\r\n pageSize: this.state.pageSize,\r\n location: '',\r\n text: '',\r\n vehicleHistory: true,\r\n vin: ''\r\n } as VehicleFilters;\r\n\r\n this.setState({\r\n isLoading: true\r\n });\r\n\r\n const [vehicles] = await Promise.all([\r\n this.cbContext.vehicleService.GetVehicles(vehiclesFilters)\r\n ]);\r\n\r\n const [organizations] = await Promise.all([\r\n this.cbContext.organizationService.GetUserOrganizationsByIds(\r\n Array.from(new Set(vehicles.vehicles.map(({ vehicle }) => vehicle.organizationId)))\r\n )\r\n ]);\r\n\r\n vehicles.vehicles.forEach(({ vehicle }) => {\r\n const org = organizations.find((item) => item.id === vehicle.organizationId);\r\n vehicle.organization = isNullOrUndefined(org) ? null : org;\r\n });\r\n\r\n this.setState(\r\n {\r\n vehiclesList: vehicles,\r\n organizationEntities: organizations,\r\n count: vehicles.total,\r\n page: vehicles.page - 1\r\n },\r\n async () => {\r\n await this.reloadFilters();\r\n }\r\n );\r\n }\r\n\r\n isInternal = (): boolean | null => {\r\n if (this.state.selectedTab === 0) {\r\n return null;\r\n }\r\n if (this.state.selectedTab === 1) {\r\n return false;\r\n }\r\n\r\n return true;\r\n };\r\n\r\n loadVehicles = async (page: number, rowsPerPage: number) => {\r\n this.setState({\r\n isLoadingVehicles: true\r\n });\r\n\r\n const vehiclesFilters = {\r\n makeIds: this.state.selectedMakeEntities.map((item) => item.id),\r\n modelIds: this.state.selectedModelEntities.map((item) => item.id),\r\n fuelTypeIds: this.state.selectedFuelEntities.map((item) => item.id),\r\n transmissionIds: this.state.selectedTransmissionEntities.map((item) => item.id),\r\n tractionIds: this.state.selectedTractionEntities.map((item) => item.id),\r\n statusIds: this.state.selectedStatusEntities.map((item) => item.id),\r\n organizationIds: this.state.selectedOrgEntities.map((item) => item.id),\r\n page: page + 1,\r\n pageSize: rowsPerPage,\r\n location: this.state.location,\r\n text: '',\r\n vehicleHistory: true,\r\n vin: this.state.vin\r\n } as VehicleFilters;\r\n\r\n const vehicleList = await this.cbContext.vehicleService.GetVehicles(vehiclesFilters);\r\n const [organizations] = await Promise.all([\r\n this.cbContext.organizationService.GetUserOrganizationsByIds(\r\n Array.from(new Set(vehicleList.vehicles.map(({ vehicle }) => vehicle.organizationId)))\r\n )\r\n ]);\r\n\r\n vehicleList.vehicles.forEach(({ vehicle }) => {\r\n const org = organizations.find((item) => item.id === vehicle.organizationId);\r\n vehicle.organization = isNullOrUndefined(org) ? null : org;\r\n });\r\n\r\n this.setState({\r\n vehiclesList: vehicleList,\r\n organizationEntities: organizations,\r\n page: vehicleList.page - 1,\r\n pageSize: rowsPerPage,\r\n count: vehicleList.total,\r\n isLoadingVehicles: false\r\n });\r\n };\r\n\r\n reloadFilters = async () => {\r\n const vehicleHistory = true;\r\n const filters = await this.cbContext.vehicleService.GetVehiclesFilters(vehicleHistory);\r\n\r\n const [organizations] = await Promise.all([\r\n this.cbContext.organizationService.GetUserOrganizationsByIds(\r\n Array.from(new Set(filters.organizationIds))\r\n )\r\n ]);\r\n\r\n this.setState({\r\n organizationEntities: organizations,\r\n makeEntities: filters.makeList,\r\n modelEntities: filters.modelList,\r\n fuelEntities: filters.fuelTypes,\r\n transmissionEntities: filters.transmissionTypes,\r\n tractionEntities: filters.tractionTypes,\r\n statusEntities: filters.vehicleStatuses,\r\n isLoading: false\r\n });\r\n };\r\n\r\n onClick = (id: number) => {\r\n this.props.history.push('/vehicle/' + id);\r\n };\r\n\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'vehicle.id',\r\n label: this.cbContext.translatorService.Tranlate('VEHICLES_VEHICLE_ID', 'ID'),\r\n options: {\r\n sort: false\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'vehicle.organization.displayName',\r\n label: this.cbContext.translatorService.Tranlate(\r\n 'VEHICLES_VEHICLE_ORGANIZATION',\r\n 'Organizatie'\r\n )\r\n },\r\n {\r\n name: 'vehicle.vin',\r\n label: this.cbContext.translatorService.Tranlate('VEHICLES_VEHICLE_VIN', 'VIN')\r\n },\r\n {\r\n name: 'vehicle.make.displayName',\r\n label: this.cbContext.translatorService.Tranlate('VEHICLES_VEHICLE_MAKE', 'Marca'),\r\n options: {\r\n display: 'excluded',\r\n filter: false\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'vehicle.model.displayName',\r\n label: this.cbContext.translatorService.Tranlate('VEHICLES_VEHICLE_MODEL', 'Model'),\r\n options: {\r\n display: 'excluded',\r\n filter: false\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'vehicle.version',\r\n label: this.cbContext.translatorService.Tranlate(\r\n 'VEHICLES_VEHICLE_VERSION',\r\n 'Marca Model Versiune'\r\n ),\r\n options: {\r\n customBodyRender: (value: any, tableMeta: MUIDataTableMeta) => {\r\n const vehicleExtension = this.state.vehiclesList.vehicles.find(\r\n ({ vehicle }) => vehicle.id === tableMeta.rowData[0]\r\n );\r\n\r\n return (\r\n
\r\n \r\n {vehicleExtension?.vehicle?.make?.displayName}{' '}\r\n \r\n \r\n {vehicleExtension?.vehicle?.model?.displayName}{' '}\r\n \r\n {value} \r\n
\r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'vehicle.firstRegistrationDate',\r\n label: this.cbContext.translatorService.Tranlate(\r\n 'VEHICLES_VEHICLE_FIRST_REGISTRATION_DATE',\r\n 'Data primei inmatriculari'\r\n ),\r\n options: {\r\n customBodyRender: (value: any) => {\r\n return (\r\n \r\n \r\n
\r\n {moment\r\n .utc(value)\r\n .local()\r\n .format(this.props.appState.dateFormat)}\r\n
\r\n
\r\n
\r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'addedInStockDate',\r\n label: this.cbContext.translatorService.Tranlate(\r\n 'VEHICLES_VEHICLE_ADDED_IN_STOCK_DATE',\r\n 'Data intrare stoc'\r\n ),\r\n options: {\r\n customBodyRender: (value: any) => {\r\n return (\r\n \r\n \r\n
\r\n {value\r\n ? moment\r\n .utc(value)\r\n .local()\r\n .format(this.props.appState.dateFormat)\r\n : null}\r\n
\r\n
\r\n
\r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'vehicle.makeDate',\r\n label: this.cbContext.translatorService.Tranlate(\r\n 'VEHICLES_VEHICLE_YEAR_OF_FABRICATION',\r\n 'An'\r\n ),\r\n options: {\r\n customBodyRender: (value: any) => {\r\n return (\r\n \r\n \r\n
{value ? new Date(value).getFullYear() : null}
\r\n
\r\n
\r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'vehicle.kilometersNr',\r\n label: this.cbContext.translatorService.Tranlate('VEHICLES_VEHICLE_NR_OF_KM', 'KM')\r\n },\r\n {\r\n name: 'vehicle.horsePower',\r\n label: this.cbContext.translatorService.Tranlate('VEHICLES_VEHICLE_HP', 'CP')\r\n },\r\n {\r\n name: 'vehicle.engineSize',\r\n label: this.cbContext.translatorService.Tranlate('VEHICLES_VEHICLE_ENGINE_SIZE', 'CM3')\r\n },\r\n {\r\n name: 'vehicle.currentStatus.status.displayName',\r\n label: this.cbContext.translatorService.Tranlate('VEHICLES_VEHICLE_STATUS', 'Status')\r\n },\r\n {\r\n name: 'vehicle',\r\n label: this.cbContext.translatorService.Tranlate(\r\n 'VEHICLES_VEHICLE_PURCHASE_EUR_PRICE',\r\n 'Pret Achizitie EUR cu TVA'\r\n ),\r\n options: {\r\n customBodyRender: (value: any) => {\r\n return value.purchaseVatRate === 0 ? (\r\n <>\r\n {value.purchasePrice}\r\n
\r\n {this.cbContext.translatorService.Tranlate(\r\n 'VEHICLES_WITHOUT_VAT',\r\n 'Achizitionat cu TVA=0'\r\n )}\r\n
\r\n \r\n ) : (\r\n value.purchasePrice\r\n );\r\n }\r\n }\r\n }\r\n ];\r\n\r\n return columns;\r\n };\r\n\r\n onTabChange = (event: any, newValue: number) => {\r\n this.setState(\r\n {\r\n selectedTab: newValue,\r\n page: 0\r\n },\r\n async () => await this.loadVehicles(0, this.state.pageSize)\r\n );\r\n };\r\n handleOrgEntitiesChange = (newValue: any[]) => {\r\n this.setState(\r\n {\r\n selectedOrgEntities: newValue\r\n },\r\n async () => await this.loadVehicles(this.state.page, this.state.pageSize)\r\n );\r\n };\r\n\r\n handleMakeEntitiesChange = (newValue: any[]) => {\r\n const selectedModels = [...this.state.selectedModelEntities];\r\n const selectedMakeIds = newValue.map(({ id }) => id);\r\n\r\n const models = selectedModels.filter(({ dependencyId }) =>\r\n selectedMakeIds.includes(dependencyId)\r\n );\r\n\r\n this.setState(\r\n {\r\n selectedMakeEntities: newValue,\r\n selectedModelEntities: models\r\n },\r\n async () => await this.loadVehicles(this.state.page, this.state.pageSize)\r\n );\r\n };\r\n\r\n handleModelEntitiesChange = (newValue: any[]) => {\r\n this.setState(\r\n {\r\n selectedModelEntities: newValue\r\n },\r\n async () => await this.loadVehicles(this.state.page, this.state.pageSize)\r\n );\r\n };\r\n\r\n handleFuelEntitiesChange = (newValue: any[]) => {\r\n this.setState(\r\n {\r\n selectedFuelEntities: newValue\r\n },\r\n async () => await this.loadVehicles(this.state.page, this.state.pageSize)\r\n );\r\n };\r\n\r\n handleTransmissionEntitiesChange = (newValue: any[]) => {\r\n this.setState(\r\n {\r\n selectedTransmissionEntities: newValue\r\n },\r\n async () => await this.loadVehicles(this.state.page, this.state.pageSize)\r\n );\r\n };\r\n\r\n handleTractionEntitiesChange = (newValue: any[]) => {\r\n this.setState(\r\n {\r\n selectedTractionEntities: newValue\r\n },\r\n async () => await this.loadVehicles(this.state.page, this.state.pageSize)\r\n );\r\n };\r\n\r\n handleStatusEntitiesChange = (newValue: any[]) => {\r\n this.setState(\r\n {\r\n selectedStatusEntities: newValue\r\n },\r\n async () => await this.loadVehicles(this.state.page, this.state.pageSize)\r\n );\r\n };\r\n\r\n handleImportDialogOpen = () => {\r\n this.setState({\r\n vehicleImportDialogOpenend: true\r\n });\r\n };\r\n\r\n handleImportDialogClose = () => {\r\n this.setState({\r\n vehicleImportDialogOpenend: false\r\n });\r\n };\r\n\r\n renderFilters = () => {\r\n const selectedMakes = this.state.selectedMakeEntities;\r\n let models = this.state.modelEntities;\r\n\r\n if (selectedMakes.length) {\r\n const makeIds = selectedMakes.map(({ id }) => id);\r\n models = this.state.modelEntities.filter(({ dependencyId }) => {\r\n return makeIds.includes(dependencyId!);\r\n });\r\n }\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n this.handleOrgEntitiesChange(newValue)}\r\n getOptionLabel={(option: Organization) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n {\r\n this.setState({\r\n location: e.target.value\r\n });\r\n }}\r\n onBlur={() => this.loadVehicles(this.state.page, this.state.pageSize)}\r\n validators={['required']}\r\n label={this.cbContext.translatorService.Tranlate(\r\n 'ORDERS_LOCATION_LABEL',\r\n 'Locatie'\r\n )}\r\n />\r\n\r\n this.handleMakeEntitiesChange(newValue)}\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n \r\n this.handleModelEntitiesChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n {\r\n this.setState({\r\n vin: e.target.value\r\n });\r\n }}\r\n onBlur={() => this.loadVehicles(this.state.page, this.state.pageSize)}\r\n validators={['required']}\r\n label={this.cbContext.translatorService.Tranlate('CALCULATION_DETAILS_VIN', 'Vin')}\r\n />\r\n \r\n\r\n \r\n this.handleFuelEntitiesChange(newValue)}\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n \r\n this.handleTransmissionEntitiesChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n \r\n this.handleTractionEntitiesChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n \r\n this.handleStatusEntitiesChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n \r\n
\r\n );\r\n };\r\n\r\n onCellClick = (\r\n colData: any,\r\n cellMeta: { colIndex: number; rowIndex: number; dataIndex: number }\r\n ) => {\r\n this.onClick(this.state.vehiclesList.vehicles[cellMeta.dataIndex].vehicle.id);\r\n };\r\n\r\n tableOptions = () => {\r\n return {\r\n filter: false,\r\n search: false,\r\n viewColumns: false,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.cbContext.translatorService),\r\n elevation: 0,\r\n serverSide: true,\r\n count: this.state.count,\r\n rowsPerPage: this.state.pageSize,\r\n page: this.state.page,\r\n onCellClick: this.onCellClick,\r\n onTableChange: async (action: any, tableState: any) => {\r\n switch (action) {\r\n case 'changePage':\r\n await this.loadVehicles(tableState.page, tableState.rowsPerPage);\r\n break;\r\n case 'changeRowsPerPage':\r\n await this.loadVehicles(tableState.page, tableState.rowsPerPage);\r\n break;\r\n case 'sort':\r\n break;\r\n default:\r\n }\r\n }\r\n };\r\n };\r\n\r\n public render() {\r\n this.cbContext = this.context as AppContext;\r\n\r\n if (this.state.isLoading) {\r\n return ;\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n \r\n
\r\n {this.renderFilters()}\r\n {this.state.isLoadingVehicles ? (\r\n \r\n ) : (\r\n \r\n )}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app\r\n }),\r\n null\r\n)(withSnackbar(VehiclesHistory as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport {\r\n Tooltip,\r\n Box,\r\n Button,\r\n IconButton,\r\n Dialog,\r\n DialogTitle,\r\n Grid,\r\n Typography,\r\n DialogContent\r\n} from '@material-ui/core';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport AddCircleTwoToneIcon from '@material-ui/icons/AddCircleTwoTone';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ValidatorForm, TextValidator } from 'react-material-ui-form-validator';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport MUIDataTable, {\r\n SelectableRows,\r\n MUIDataTableMeta,\r\n MUIDataTableColumnOptions\r\n} from 'mui-datatables';\r\nimport { MUITranslations } from '../../../helpers/MUITableTranslations';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport DeleteOutlineTwoToneIcon from '@material-ui/icons/DeleteOutlineTwoTone';\r\nimport { ReferentialCode } from '../../../helpers/Constants';\r\nimport Referentials from '../../../helpers/Referentials.json';\r\nimport { ICaseService } from '../../../services/Interfaces/ICaseService';\r\nimport { IReferential } from '../../../interfaces/IReferential';\r\nimport moment from 'moment';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport EditOutlinedIcon from '@material-ui/icons/EditOutlined';\r\nimport { CarClassRentPrice } from '../../../interfaces/Case';\r\nimport NumberFormat from 'react-number-format';\r\n\r\ninterface ICarClassRentalPriceState {\r\n newCarClassRentPrice: CarClassRentPrice;\r\n carClasses: IReferential[];\r\n carClassRentPrices: CarClassRentPrice[];\r\n isLoading: boolean;\r\n isDialogOpen: boolean;\r\n newCarClassRentPriceId: number | null;\r\n}\r\n\r\ntype ICarClassRentalPriceProps = { appState: AppState } & ProviderContext &\r\n RouteComponentProps<{ id: string; workflowId: string }>;\r\n\r\nclass CarClassRentalPrice extends React.PureComponent<\r\n ICarClassRentalPriceProps,\r\n ICarClassRentalPriceState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private caseService!: ICaseService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n\r\n static contextType = ApplicationContext;\r\n private newCarClassRentPrice = {\r\n id: 0,\r\n carClassId: 0,\r\n price: null\r\n } as unknown as CarClassRentPrice;\r\n\r\n state = {\r\n carClassRentPrices: [],\r\n isLoading: false,\r\n selectedFilter: 0,\r\n isDialogOpen: false,\r\n newCarClassRentPrice: this.newCarClassRentPrice,\r\n carClasses: [],\r\n newCarClassRentPriceId: null\r\n } as ICarClassRentalPriceState;\r\n\r\n public componentDidMount() {\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadCarClassRentPrices();\r\n }\r\n );\r\n }\r\n\r\n loadCarClassRentPrices = async () => {\r\n const carClassPrices = await this.caseService.GetCarClassRentPrices();\r\n const ref = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.CarClass\r\n );\r\n const carClasses = (await this.appReferentialService.Get(ref!.baseUrl)).filter((item) => item.isActive === true);\r\n\r\n this.setState({\r\n carClassRentPrices: carClassPrices,\r\n isLoading: false,\r\n carClasses: carClasses,\r\n newCarClassRentPrice: { ...this.newCarClassRentPrice }\r\n });\r\n };\r\n\r\n\r\n \r\n\r\n private handlePriceChange = (value: string) => {\r\n this.setState({\r\n newCarClassRentPrice: {\r\n ...this.state.newCarClassRentPrice,\r\n price: parseFloat(value)\r\n }\r\n });\r\n };\r\n\r\n private handleCarClassChange = (newValue: IReferential | null) => {\r\n this.setState({\r\n newCarClassRentPrice: {\r\n ...this.state.newCarClassRentPrice,\r\n carClass: newValue,\r\n carClassId: newValue !== null ? newValue!.id : 0\r\n }\r\n });\r\n };\r\n\r\n public saveCarClassRentalPrice = async () => {\r\n if (this.state.newCarClassRentPriceId === null) {\r\n try {\r\n\r\n await this.caseService.AddCarClassRentPrice(this.state.newCarClassRentPrice);\r\n\r\n await this.loadCarClassRentPrices();\r\n\r\n this.closeDialog();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n } else {\r\n try {\r\n\r\n await this.caseService.UpdateCarClassRentPrice(this.state.newCarClassRentPrice);\r\n\r\n await this.loadCarClassRentPrices();\r\n\r\n this.closeDialog();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n \r\n \r\n NumberFormatCustom = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n },\r\n currentTarget: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n allowNegative={false}\r\n thousandSeparator={false}\r\n decimalScale={2}\r\n />\r\n );\r\n };\r\n \r\n\r\n public renderAddForm() {\r\n return (\r\n \r\n this.handlePriceChange(e.target.value)}\r\n label={this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_ALTERNATIVE_CALCULATION_DETAILS_PRICE_LABEL',\r\n 'Pret'\r\n )}\r\n validators={['required', 'minNumber:1']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n InputProps={{\r\n inputComponent: this.NumberFormatCustom,\r\n style: { fontWeight: 500 }\r\n }}\r\n />\r\n\r\n \r\n this.handleCarClassChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n \r\n {this.translatorService.Tranlate('EDIT_ORGANIZATION_CANCEL_BTN', 'Anuleaza')}\r\n \r\n \r\n
\r\n
\r\n );\r\n }\r\n\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'carClass',\r\n label: this.translatorService.Tranlate(\r\n 'CAR_CLASS',\r\n 'Clasa masina'\r\n ),\r\n options: {\r\n sort: true,\r\n customSort: (a: IReferential, b: IReferential) => {\r\n return a.name!.localeCompare(b.name!);\r\n },\r\n customBodyRender: (value: IReferential) => {\r\n return value.name;\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'price',\r\n label: this.translatorService.Tranlate(\r\n 'CASE_CALCULATION_ALTERNATIVE_CALCULATION_DETAILS_PRICE_LABEL',\r\n 'Pret'\r\n ),\r\n options: {\r\n filter: false,\r\n customBodyRender: (value: number, tableMeta: MUIDataTableMeta) => {\r\n if (value) {\r\n return value.toFixed(2);\r\n } \r\n return '';\r\n }\r\n }\r\n },\r\n {\r\n name: 'dateModification',\r\n label: this.translatorService.Tranlate('USERS_DATE_MODIFICATION_HEADER', 'Data Modificare'),\r\n options: {\r\n filter: false,\r\n sortDirection: 'desc',\r\n customBodyRender: (value: Date) =>\r\n moment.utc(value).local().format(this.props.appState.longDateFormat)\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: '',\r\n options: {\r\n viewColumns: false,\r\n filter: false,\r\n setCellHeaderProps: () => ({ align: 'center' }),\r\n setCellProps: () => ({ align: 'center' }),\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n <>\r\n this.newCarClassPopup(tableMeta.rowData[0])}\r\n >\r\n \r\n \r\n this.deleteCarClassRentPrice(e, tableMeta)}\r\n >\r\n \r\n \r\n \r\n );\r\n }\r\n }\r\n }];\r\n\r\n return columns;\r\n };\r\n\r\n deleteCarClassRentPrice = async (event: any, tableMeta: MUIDataTableMeta) => {\r\n try {\r\n const id = tableMeta.rowData[0];\r\n\r\n await this.caseService.RemoveCarClassRentPrice(id);\r\n await this.loadCarClassRentPrices();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n\r\n newCarClassPopup = async (carClassRentalPriceId: number | null) => {\r\n\r\n let newCarClassRentPrice: CarClassRentPrice;\r\n if (carClassRentalPriceId == null) {\r\n newCarClassRentPrice = { ...this.state.newCarClassRentPrice } as CarClassRentPrice;\r\n } else {\r\n newCarClassRentPrice = this.state.carClassRentPrices.find((item) => item.id === carClassRentalPriceId)!;\r\n }\r\n this.setState({\r\n isDialogOpen: true,\r\n newCarClassRentPrice: newCarClassRentPrice,\r\n newCarClassRentPriceId: carClassRentalPriceId\r\n\r\n });\r\n };\r\n\r\n closeDialog = async () => {\r\n this.setState(\r\n { \r\n isDialogOpen: false, \r\n newCarClassRentPrice: this.newCarClassRentPrice \r\n }\r\n );\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n const options = {\r\n filter: true,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n sort: false,\r\n // responsive: \"stacked\",\r\n customToolbar: () => {\r\n return (\r\n \r\n this.newCarClassPopup(null)}\r\n >\r\n \r\n \r\n \r\n );\r\n }\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n ) : null}\r\n
\r\n \r\n \r\n \r\n \r\n \r\n {!this.state.newCarClassRentPriceId ? \r\n this.translatorService.Tranlate(\r\n 'CAR_CLASS_RENT_PRICE_NEW_MODAL_TITLE',\r\n 'Adauga preturi inchiriere/zi'\r\n ) : this.translatorService.Tranlate(\r\n 'CAR_CLASS_RENT_PRICE_UPDATE_MODAL_TITLE',\r\n 'Actualizeaza preturi inchiriere/zi'\r\n )} \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.renderAddForm()}\r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app\r\n }),\r\n null\r\n)(withSnackbar(CarClassRentalPrice as any));\r\n","import * as React from 'react';\r\nimport { ApplicationState, AppState, CaseSettingsActionCreators, CaseSettingsState } from '../../store';\r\nimport { ApplicationContext, AppContext } from '../../context/Contexts';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport { Button, Card, Grid} from '@material-ui/core';\r\nimport moment from 'moment';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { MuiPickersUtilsProvider, DatePicker } from '@material-ui/pickers';\r\nimport MomentUtils from '@date-io/moment';\r\nimport { MaterialUiPickersDate } from '@material-ui/pickers/typings/date';\r\nimport * as R from 'ramda';\r\nimport Loader from '../Loader';\r\nimport _ from 'lodash';\r\nimport { ValidatorForm } from 'react-material-ui-form-validator';\r\nimport { BillingFilters } from '../../interfaces/Case';\r\nimport FileSaver from 'file-saver';\r\nimport { LanguageCode, RoleClaimsEnum } from '../../helpers/Constants';\r\nimport { ScaleLoader } from 'react-spinners';\r\n\r\n\r\ntype BillingProps = {\r\n appState: AppState;\r\n caseSettingsState: CaseSettingsState;\r\n } & ProviderContext &\r\n RouteComponentProps;\r\n\r\ninterface IBillingState {\r\n isLoading: boolean;\r\n filterStartDate: Date | null;\r\n filterEndDate: Date | null;\r\n isGtm: boolean;\r\n startDateError: string;\r\n endDateError: string;\r\n}\r\n\r\nclass LocalizedUtils extends MomentUtils {\r\n // dateFormat = \"DD MM YYYY\";\r\n}\r\n\r\nclass Billing extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private caseService!: ICaseService;\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n isLoading: false,\r\n filterStartDate: null,\r\n filterEndDate: null,\r\n startDateError: '',\r\n endDateError: ''\r\n } as IBillingState;\r\n\r\n public async componentDidMount() {\r\n this.setState(\r\n {\r\n isLoading: false\r\n }\r\n );\r\n }\r\n\r\n public hasRight = (right: string): boolean => {\r\n return this.props.appState!.user!.profile.role.includes(right);\r\n };\r\n\r\n exportInfo = async () => {\r\n if (this.state.startDateError || this.state.endDateError) {\r\n return;\r\n }\r\n const language = this.props.appState.language == LanguageCode.RO ? LanguageCode.RO : this.props.appState.language == LanguageCode.CZ ? LanguageCode.CZ : LanguageCode.EN;\r\n \r\n try {\r\n this.setState({ isLoading: true });\r\n const formatedStartDate = this.state.filterStartDate ? moment(this.state.filterStartDate).format(\"DD.MM.YYYY\") : null;\r\n const formatedEndDate = this.state.filterEndDate ? moment(this.state.filterEndDate).format(\"DD.MM.YYYY\") : null;\r\n const requestPayload = {\r\n startDate: this.state.filterStartDate ? new Date(this.state.filterStartDate.setHours(0, 0, 0, 0)) : null,\r\n endDate: this.state.filterEndDate ? new Date(this.state.filterEndDate.setHours(23, 59, 59, 999)) : null,\r\n isGtm: this.hasRight(RoleClaimsEnum.Admin),\r\n language: language,\r\n countryCode: this.props.appState.appUser?.organization?.country?.code\r\n } as BillingFilters;\r\n \r\n const fileBlob = await this.caseService.GetCaseBillingReport(\r\n requestPayload\r\n );\r\n FileSaver.saveAs(fileBlob, language == LanguageCode.RO ? 'Raport Carfix ' + formatedStartDate + '-' + formatedEndDate + '.xlsx' : 'Carfix Report ' + formatedStartDate + '-' + formatedEndDate + '.xlsx');\r\n \r\n this.setState({ isLoading: false });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (err: any) {\r\n this.setState({ isLoading: false });\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n\r\n validateDates = (startDate: Date | null, endDate: Date | null): void => {\r\n /*\r\n Validate start date\r\n */\r\n let startDateError = '';\r\n if (!startDate) {\r\n startDateError = this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu');\r\n } else {\r\n const currentDate = moment().format('YYYY-MM-DD');\r\n if (endDate && startDate > endDate) {\r\n startDateError = this.translatorService.Tranlate(\r\n 'EXPORT_START_DATE_ERROR',\r\n 'De la trebuie sa fie mai mica decat pana la'\r\n );\r\n }\r\n }\r\n\r\n /*\r\n Validate end date\r\n */\r\n\r\n let endDateError = '';\r\n if (!endDate) {\r\n endDateError = this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu');\r\n }\r\n\r\n this.setState({\r\n startDateError: startDateError,\r\n endDateError: endDateError\r\n });\r\n\r\n };\r\n\r\n\r\n handlefilterStartDateChange = async (date: MaterialUiPickersDate | null) => {\r\n if (date === null || !date.isValid) {\r\n return;\r\n }\r\n this.setState(\r\n {\r\n filterStartDate: date === null || !date.isValid ? null : date!.toDate(),\r\n startDateError: ''\r\n }\r\n \r\n );\r\n };\r\n\r\n handlefilterEndDateChange = async (date: MaterialUiPickersDate | null) => {\r\n if (date === null || !date.isValid) {\r\n return;\r\n }\r\n this.setState(\r\n {\r\n filterEndDate: date === null || !date.isValid ? null : date!.toDate(),\r\n endDateError: ''\r\n }\r\n );\r\n };\r\n\r\n renderFilters = () => {\r\n return (\r\n {\r\n this.exportInfo();\r\n }}\r\n >\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {\r\n this.validateDates(this.state.filterStartDate, this.state.filterEndDate);\r\n }}\r\n >\r\n {this.translatorService.Tranlate('EXPORT_DATA', 'Export')}\r\n \r\n
\r\n
\r\n \r\n );\r\n };\r\n\r\n \r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n\r\n return (\r\n \r\n \r\n
\r\n {this.renderFilters()}\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app,\r\n caseSettingsState: state.caseSettings\r\n }),\r\n null\r\n)(withSnackbar(Billing as any));\r\n","import * as React from 'react';\r\nimport {\r\n ApplicationState,\r\n AppState,\r\n CaseSettingsActionCreators,\r\n CaseSettingsState\r\n} from '../../store';\r\nimport { ApplicationContext, AppContext } from '../../context/Contexts';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport { Button, Card, Grid } from '@material-ui/core';\r\nimport moment from 'moment';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { MuiPickersUtilsProvider, DatePicker } from '@material-ui/pickers';\r\nimport MomentUtils from '@date-io/moment';\r\nimport { MaterialUiPickersDate } from '@material-ui/pickers/typings/date';\r\nimport * as R from 'ramda';\r\nimport Loader from '../Loader';\r\nimport _, { get } from 'lodash';\r\nimport { ValidatorForm } from 'react-material-ui-form-validator';\r\nimport { DgpciBillingFilters } from '../../interfaces/Case';\r\nimport FileSaver from 'file-saver';\r\nimport { LanguageCode, RoleClaimsEnum } from '../../helpers/Constants';\r\nimport { ScaleLoader } from 'react-spinners';\r\n\r\ntype BillingProps = {\r\n appState: AppState;\r\n caseSettingsState: CaseSettingsState;\r\n} & ProviderContext &\r\n RouteComponentProps;\r\n\r\ninterface IBillingState {\r\n isLoading: boolean;\r\n filterStartDate: Date | null;\r\n filterEndDate: Date | null;\r\n isGtm: boolean;\r\n startDateError: string;\r\n endDateError: string;\r\n}\r\n\r\nclass LocalizedUtils extends MomentUtils {\r\n // dateFormat = \"DD MM YYYY\";\r\n}\r\n\r\nclass DgpciBilling extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private caseService!: ICaseService;\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n isLoading: false,\r\n filterStartDate: null,\r\n filterEndDate: null,\r\n startDateError: '',\r\n endDateError: ''\r\n } as IBillingState;\r\n\r\n public async componentDidMount() {\r\n this.setState({\r\n isLoading: false\r\n });\r\n }\r\n\r\n public hasRight = (right: string): boolean => {\r\n return this.props.appState!.user!.profile.role.includes(right);\r\n };\r\n\r\n exportInfo = async () => {\r\n if (this.state.startDateError || this.state.endDateError) {\r\n return;\r\n }\r\n const language =\r\n this.props.appState.language == LanguageCode.RO ? LanguageCode.RO : LanguageCode.EN;\r\n\r\n try {\r\n this.setState({ isLoading: true });\r\n const formatedStartDate = this.state.filterStartDate\r\n ? moment(this.state.filterStartDate).format('DD.MM.YYYY')\r\n : null;\r\n const formatedEndDate = this.state.filterEndDate\r\n ? moment(this.state.filterEndDate).format('DD.MM.YYYY')\r\n : null;\r\n const requestPayload = {\r\n startDate: this.state.filterStartDate\r\n ? new Date(this.state.filterStartDate.setHours(0, 0, 0, 0))\r\n : null,\r\n endDate: this.state.filterEndDate\r\n ? new Date(this.state.filterEndDate.setHours(23, 59, 59, 999))\r\n : null,\r\n isGtm: this.hasRight(RoleClaimsEnum.Admin)\r\n } as DgpciBillingFilters;\r\n\r\n const fileBlob = await this.caseService.GetCaseBillingReportDgpciRequest(requestPayload);\r\n FileSaver.saveAs(\r\n fileBlob,\r\n language == LanguageCode.RO\r\n ? 'Raport DGPCI ' + formatedStartDate + '-' + formatedEndDate + '.xlsx'\r\n : 'DGPCI Report ' + formatedStartDate + '-' + formatedEndDate + '.xlsx'\r\n );\r\n\r\n this.setState({ isLoading: false });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (err: any) {\r\n this.setState({ isLoading: false });\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n validateDates = (startDate: Date | null, endDate: Date | null): void => {\r\n /*\r\n Validate start date\r\n */\r\n let startDateError = '';\r\n if (!startDate) {\r\n startDateError = this.translatorService.Tranlate(\r\n 'VALIDATORS_REQUIRED',\r\n 'Campul este obligatoriu'\r\n );\r\n } else {\r\n const currentDate = moment().format('YYYY-MM-DD');\r\n if (endDate && startDate > endDate) {\r\n startDateError = this.translatorService.Tranlate(\r\n 'EXPORT_START_DATE_ERROR',\r\n 'De la trebuie sa fie mai mica decat pana la'\r\n );\r\n }\r\n }\r\n\r\n /*\r\n Validate end date\r\n */\r\n\r\n let endDateError = '';\r\n if (!endDate) {\r\n endDateError = this.translatorService.Tranlate(\r\n 'VALIDATORS_REQUIRED',\r\n 'Campul este obligatoriu'\r\n );\r\n }\r\n\r\n this.setState({\r\n startDateError: startDateError,\r\n endDateError: endDateError\r\n });\r\n };\r\n\r\n handlefilterStartDateChange = async (date: MaterialUiPickersDate | null) => {\r\n if (date === null || !date.isValid) {\r\n return;\r\n }\r\n this.setState({\r\n filterStartDate: date === null || !date.isValid ? null : date!.toDate(),\r\n startDateError: ''\r\n });\r\n };\r\n\r\n handlefilterEndDateChange = async (date: MaterialUiPickersDate | null) => {\r\n if (date === null || !date.isValid) {\r\n return;\r\n }\r\n this.setState({\r\n filterEndDate: date === null || !date.isValid ? null : date!.toDate(),\r\n endDateError: ''\r\n });\r\n };\r\n\r\n renderFilters = () => {\r\n return (\r\n {\r\n this.exportInfo();\r\n }}\r\n >\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {\r\n this.validateDates(this.state.filterStartDate, this.state.filterEndDate);\r\n }}\r\n >\r\n {this.translatorService.Tranlate('EXPORT_DATA', 'Export')}\r\n \r\n
\r\n
\r\n \r\n );\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n\r\n return (\r\n \r\n \r\n
{this.renderFilters()}
\r\n
\r\n \r\n
\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app,\r\n caseSettingsState: state.caseSettings\r\n }),\r\n null\r\n)(withSnackbar(DgpciBilling as any));\r\n","import * as React from 'react';\r\nimport { ApplicationState, AppState, CaseSettingsState } from '../../store';\r\nimport { ApplicationContext, AppContext } from '../../context/Contexts';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { Button, Card, Grid} from '@material-ui/core';\r\nimport moment from 'moment';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { MuiPickersUtilsProvider, DatePicker } from '@material-ui/pickers';\r\nimport MomentUtils from '@date-io/moment';\r\nimport { MaterialUiPickersDate } from '@material-ui/pickers/typings/date';\r\nimport _ from 'lodash';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport FileSaver from 'file-saver';\r\nimport { LanguageCode } from '../../helpers/Constants';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { IOrderService } from '../../services/Interfaces/IOrderService';\r\nimport { OrderPartsHistoryFilters } from '../../interfaces/Order';\r\n\r\n\r\ntype OrderPartsHistoryProps = {\r\n appState: AppState;\r\n caseSettingsState: CaseSettingsState;\r\n } & ProviderContext &\r\n RouteComponentProps;\r\n\r\ninterface IOrderPartsHistoryState {\r\n isLoading: boolean;\r\n filterStartDate: Date | null;\r\n filterEndDate: Date | null;\r\n startDateError: string;\r\n endDateError: string;\r\n vin: string;\r\n}\r\n\r\nclass LocalizedUtils extends MomentUtils {\r\n}\r\n\r\nclass OrderPartsHistory extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private orderService!: IOrderService;\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n isLoading: false,\r\n filterStartDate: null,\r\n filterEndDate: null,\r\n startDateError: '',\r\n endDateError: '',\r\n vin: ''\r\n } as IOrderPartsHistoryState;\r\n\r\n public async componentDidMount() {\r\n this.setState(\r\n {\r\n isLoading: false\r\n }\r\n );\r\n }\r\n\r\n exportInfo = async () => {\r\n if (this.state.startDateError || this.state.endDateError) {\r\n return;\r\n }\r\n\r\n const language = this.props.appState.language == LanguageCode.RO ? LanguageCode.RO : LanguageCode.EN;\r\n try {\r\n this.setState({ isLoading: true });\r\n\r\n const formatedStartDate = this.state.filterStartDate ? moment(this.state.filterStartDate).format(\"DD.MM.YYYY\") : null;\r\n const formatedEndDate = this.state.filterEndDate ? moment(this.state.filterEndDate).format(\"DD.MM.YYYY\") : null;\r\n const requestPayload = {\r\n startDate: this.state.filterStartDate ? new Date(this.state.filterStartDate.setHours(0, 0, 0, 0)) : null,\r\n endDate: this.state.filterEndDate ? new Date(this.state.filterEndDate.setHours(23, 59, 59, 999)) : null,\r\n vin: this.state.vin,\r\n language: language\r\n } as OrderPartsHistoryFilters;\r\n \r\n const fileBlob = await this.orderService.GetOrderPartsHistory(\r\n requestPayload\r\n );\r\n FileSaver.saveAs(fileBlob, language == LanguageCode.RO ? 'Istoric Piese Auto_' + this.state.vin + '_' + formatedStartDate + '-' + formatedEndDate + '.xlsx' : 'Auto Parts History_' + this.state.vin + '_' + formatedStartDate + '-' + formatedEndDate + '.xlsx');\r\n \r\n this.setState({ isLoading: false });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (err: any) {\r\n this.setState({ isLoading: false });\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n\r\n validateDates = (startDate: Date | null, endDate: Date | null): void => {\r\n /*\r\n Validate start date\r\n */\r\n let startDateError = '';\r\n if (!startDate) {\r\n startDateError = this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu');\r\n } else {\r\n if (endDate && startDate > endDate) {\r\n startDateError = this.translatorService.Tranlate(\r\n 'EXPORT_START_DATE_ERROR',\r\n 'De la trebuie sa fie mai mica decat pana la'\r\n );\r\n }\r\n }\r\n\r\n /*\r\n Validate end date\r\n */\r\n let endDateError = '';\r\n if (!endDate) {\r\n endDateError = this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu');\r\n }\r\n\r\n this.setState({\r\n startDateError: startDateError,\r\n endDateError: endDateError\r\n });\r\n\r\n };\r\n\r\n\r\n handlefilterStartDateChange = async (date: MaterialUiPickersDate | null) => {\r\n if (date === null || !date.isValid) {\r\n return;\r\n }\r\n this.setState(\r\n {\r\n filterStartDate: date === null || !date.isValid ? null : date!.toDate(),\r\n startDateError: ''\r\n }\r\n \r\n );\r\n };\r\n\r\n handlefilterEndDateChange = async (date: MaterialUiPickersDate | null) => {\r\n if (date === null || !date.isValid) {\r\n return;\r\n }\r\n this.setState(\r\n {\r\n filterEndDate: date === null || !date.isValid ? null : date!.toDate(),\r\n endDateError: ''\r\n }\r\n );\r\n };\r\n\r\n renderFilters = () => {\r\n return (\r\n {\r\n this.exportInfo();\r\n }}\r\n >\r\n
\r\n \r\n \r\n {\r\n this.setState({\r\n vin: e.target.value\r\n });\r\n }}\r\n validators={['required', 'matchRegexp:^(?=.*[0-9])(?=.*[abcdefghjklmnprstuvwxyzABCDEFGHJKLMNPRSTUVWXYZ])[0-9abcdefghjklmnprstuvwxyzABCDEFGHJKLMNPRSTUVWXYZ-]{17}$']}\r\n errorMessages={[\r\n this.translatorService.Tranlate(\r\n 'VALIDATORS_REQUIRED',\r\n 'Campul este obligatoriu'\r\n ),\r\n this.translatorService.Tranlate('INVALID_CAR_VIN_IDENTIFICATOR', \"Te rugăm să te asiguri că seria de șasiu introdusă are 17 caractere alfanumerice și nu conține spații sau literele 'O' sau 'I'!\")\r\n ]} \r\n label={this.translatorService.Tranlate('CALCULATION_DETAILS_VIN', 'Vin')}\r\n required={true}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {\r\n this.validateDates(this.state.filterStartDate, this.state.filterEndDate);\r\n }}\r\n >\r\n {this.translatorService.Tranlate('EXPORT_DATA', 'Export')}\r\n \r\n
\r\n
\r\n \r\n );\r\n };\r\n\r\n \r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.orderService = (this.context as AppContext).orderService;\r\n\r\n return (\r\n \r\n \r\n
\r\n {this.renderFilters()}\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app,\r\n caseSettingsState: state.caseSettings\r\n }),\r\n null\r\n)(withSnackbar(OrderPartsHistory as any));\r\n","import React, { Fragment, ChangeEvent } from 'react';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { Box, Switch, Card, TextField } from '@material-ui/core';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport { ITranslation, IReferential, IReferentialConfig } from '../../../interfaces/IReferential';\r\nimport Autocomplete, { RenderInputParams } from '@material-ui/lab/Autocomplete';\r\nimport MaterialTable, { Icons, EditComponentProps, Column } from 'material-table';\r\nimport Referentials from '../../../helpers/Referentials.json';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../store';\r\nimport { forwardRef } from 'react';\r\nimport ArrowDownward from '@material-ui/icons/ArrowDownward';\r\nimport Check from '@material-ui/icons/Check';\r\nimport ChevronLeft from '@material-ui/icons/ChevronLeft';\r\nimport ChevronRight from '@material-ui/icons/ChevronRight';\r\nimport Clear from '@material-ui/icons/Clear';\r\nimport DeleteOutline from '@material-ui/icons/DeleteOutline';\r\nimport Edit from '@material-ui/icons/Edit';\r\nimport FilterList from '@material-ui/icons/FilterList';\r\nimport FirstPage from '@material-ui/icons/FirstPage';\r\nimport LastPage from '@material-ui/icons/LastPage';\r\nimport Remove from '@material-ui/icons/Remove';\r\nimport SaveAlt from '@material-ui/icons/SaveAlt';\r\nimport Search from '@material-ui/icons/Search';\r\nimport ViewColumn from '@material-ui/icons/ViewColumn';\r\nimport { Label } from 'reactstrap';\r\nimport moment from 'moment';\r\nimport AddCircleTwoToneIcon from '@material-ui/icons/AddCircleTwoTone';\r\nimport { Language } from '../../../interfaces/Organization';\r\nimport * as R from 'ramda';\r\nimport { MavoLanguageTranslationEnum, ReferentialCode } from '../../../helpers/Constants';\r\nimport _ from 'lodash';\r\n\r\nconst tableIcons = {\r\n Add: forwardRef((props, ref) => ),\r\n Check: forwardRef((props, ref) => ),\r\n Clear: forwardRef((props, ref) => ),\r\n Delete: forwardRef((props, ref) => ),\r\n DetailPanel: forwardRef((props, ref) => ),\r\n Edit: forwardRef((props, ref) => ),\r\n Export: forwardRef((props, ref) => ),\r\n Filter: forwardRef((props, ref) => ),\r\n FirstPage: forwardRef((props, ref) => ),\r\n LastPage: forwardRef((props, ref) => ),\r\n NextPage: forwardRef((props, ref) => ),\r\n PreviousPage: forwardRef((props, ref) => ),\r\n ResetSearch: forwardRef((props, ref) => ),\r\n Search: forwardRef((props, ref) => ),\r\n SortArrow: forwardRef((props, ref) => ),\r\n ThirdStateCheck: forwardRef((props, ref) => ),\r\n ViewColumn: forwardRef((props, ref) => )\r\n} as Icons;\r\n\r\ntype VersionListProps = { appState: AppState } & ProviderContext;\r\n\r\ninterface IVersionListState {\r\n makeList: IReferential[];\r\n modelList: IReferential[];\r\n initialModelList: IReferential[];\r\n referentials: IReferential[];\r\n filteredReferentials: IReferential[];\r\n isLoading: boolean;\r\n selectedReferential: IReferentialConfig | null;\r\n selectedMake: IReferential | null;\r\n selectedModel: IReferential | null;\r\n languages: Language[];\r\n}\r\n\r\nclass VersionList extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n referentials: [],\r\n isLoading: false,\r\n selectedReferential: null,\r\n languages: [] as Language[],\r\n makeList: [],\r\n modelList: [],\r\n dependentReferentialConfig: null,\r\n selectedMake: null,\r\n selectedModel: null,\r\n filteredReferentials: [],\r\n initialMakeList: [],\r\n initialModelList: [],\r\n } as IVersionListState;\r\n\r\n componentDidMount = () => {\r\n const referential = Referentials.referential.find(x => x.code === ReferentialCode.Version) as IReferentialConfig;\r\n this.setState({\r\n isLoading: true,\r\n languages: this.activeLanguages().filter((lang) => lang.code === MavoLanguageTranslationEnum.RO),\r\n },\r\n async () => {\r\n this.loadReferentialsList(referential);\r\n });\r\n };\r\n\r\n loadReferentialsList = async (value: IReferentialConfig | null) => {\r\n let referentialList: IReferential[] = [];\r\n let makeList: IReferential[] = [];\r\n let modelList: IReferential[] = [];\r\n if (value !== null && value.getUrl !== '') {\r\n try {\r\n referentialList = await this.appReferentialService.GetFromDB(value.getUrl);\r\n makeList = (await this.loadDependentReferentials(ReferentialCode.VehicleMake)).dependentReferentialList;\r\n modelList = (await this.loadDependentReferentials(ReferentialCode.Model)).dependentReferentialList;\r\n referentialList.forEach((refItem) => {\r\n this.state.languages.forEach((lang) => {\r\n const translation = refItem.translations.find((item) => item.language === lang.code);\r\n if (R.isNil(translation)) {\r\n refItem.translations.push({\r\n id: 0,\r\n name: '',\r\n language: lang.code,\r\n referentialTypeId: refItem.id\r\n } as ITranslation);\r\n }\r\n });\r\n });\r\n\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n\r\n makeList = makeList.sort((a, b) => a.displayName.toLowerCase().localeCompare(b.displayName.toLowerCase()));\r\n modelList = modelList.sort((a, b) => a.displayName.toLowerCase().localeCompare(b.displayName.toLowerCase()));\r\n\r\n const selectedMake = this.state.selectedMake ?? makeList[0];\r\n let selectedModelList = modelList.filter((ref) => ref.dependencyId === selectedMake.id);\r\n const selectedModel = this.state.selectedModel ?? selectedModelList[0];\r\n \r\n selectedModelList = selectedModelList.sort((a, b) => a.displayName.toLowerCase().localeCompare(b.displayName.toLowerCase()));\r\n \r\n this.setState({\r\n referentials: referentialList,\r\n isLoading: false,\r\n selectedReferential: value!,\r\n makeList: makeList, \r\n initialModelList: modelList,\r\n selectedMake: selectedMake,\r\n selectedModel: selectedModel,\r\n modelList: selectedModelList,\r\n filteredReferentials: referentialList.filter(\r\n (ref) => ref.modelId === selectedModel?.id)\r\n });\r\n };\r\n\r\n handleMakeChange = (newValue: IReferential | null) => {\r\n if (R.isNil(newValue)) {\r\n this.setState({\r\n ...this.state,\r\n selectedMake: newValue,\r\n filteredReferentials: this.state.referentials,\r\n selectedModel: null\r\n });\r\n return;\r\n }\r\n\r\n let modelList = this.state.initialModelList.filter((ref) => ref.dependencyId === newValue.id);\r\n modelList = modelList.sort((a, b) => a.displayName.toLowerCase().localeCompare(b.displayName.toLowerCase()));\r\n \r\n this.setState({\r\n ...this.state,\r\n selectedMake: newValue,\r\n modelList: modelList,\r\n selectedModel: modelList.length ? modelList[0] : null,\r\n filteredReferentials: modelList.length ? this.state.referentials.filter(\r\n (ref) => ref.modelId === modelList[0].id) : []\r\n });\r\n };\r\n\r\n handleModelChange = (newValue: IReferential | null) => {\r\n if (R.isNil(newValue)) {\r\n this.setState({\r\n ...this.state,\r\n selectedModel: newValue,\r\n filteredReferentials: this.state.referentials\r\n });\r\n return;\r\n }\r\n\r\n const filteredReferentials = this.state.referentials.filter((ref) => ref.modelId === newValue.id);\r\n this.setState({\r\n ...this.state,\r\n selectedModel: newValue,\r\n filteredReferentials: filteredReferentials\r\n });\r\n }\r\n\r\n loadDependentReferentials = async (dependency: string) => {\r\n const dependencyConfig = Referentials.referential.find(\r\n (r) => r.code === dependency\r\n ) as IReferentialConfig;\r\n const dependentReferentialList = await this.appReferentialService.GetFromDB(\r\n dependencyConfig.getUrl\r\n );\r\n return { dependentReferentialList, dependencyConfig };\r\n };\r\n\r\n handleIsActiveChange = async (event: ChangeEvent, rowData: any) => {\r\n const id = rowData.id;\r\n const newReferentials = [...this.state.filteredReferentials];\r\n const updatedReferential = newReferentials.find((ref) => ref.id === id);\r\n if (updatedReferential !== undefined) {\r\n updatedReferential.isActive = event.target.checked;\r\n\r\n try {\r\n await this.appReferentialService.Update(\r\n updatedReferential,\r\n this.state.selectedReferential!.updateUrl\r\n );\r\n this.setState({\r\n referentials: newReferentials\r\n });\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n\r\n activeLanguages = () => {\r\n const activeLanguages =\r\n this.props.appState.appUser!.organization!.gtOrganization!.languages!.filter((language) => {\r\n if (language.isActive === true) {\r\n return language;\r\n }\r\n });\r\n activeLanguages.forEach((language) => {\r\n language.displayName =\r\n language.displayName.charAt(0).toUpperCase() + language.displayName.slice(1);\r\n });\r\n return activeLanguages;\r\n };\r\n\r\n handleLocListChange = (event: any, gridProps: any, code: string | null) => {\r\n let newLocList = [] as ITranslation[];\r\n if (gridProps.rowData.translations) {\r\n newLocList = gridProps.rowData.translations.map((loc: any) => {\r\n if (loc.language === code) {\r\n loc.name = event.target.value;\r\n }\r\n return loc;\r\n });\r\n }\r\n\r\n gridProps.onRowDataChange({\r\n ...gridProps.rowData,\r\n translations: newLocList\r\n });\r\n };\r\n\r\n getColumns = () => {\r\n return [\r\n {\r\n field: 'code',\r\n title: this.translatorService.Tranlate('LIST_OF_VALUES_COD_HEADER', 'Cod'),\r\n searchable: true\r\n // initialEditValue: Guid.create().toString()\r\n } as Column,\r\n {\r\n field: 'translations',\r\n title: this.translatorService.Tranlate('LIST_OF_VALUES_NAME_HEADER', 'Nume'),\r\n searchable: true,\r\n render: (rowData: any) => {\r\n return rowData.translations.map((val: ITranslation, index: number) => {\r\n const language = this.state.languages.find((language: any) => {\r\n return language.code === val.language;\r\n });\r\n return language ? (\r\n <>\r\n {' '}\r\n \r\n ) : null;\r\n });\r\n },\r\n customFilterAndSearch: (value, rowData) => {\r\n let matchFilter = false;\r\n rowData.translations.map((val: any) => {\r\n const findMatch = val.name.toLowerCase().indexOf(value.toLowerCase()) != -1;\r\n if (findMatch) {\r\n matchFilter = true;\r\n }\r\n });\r\n return matchFilter;\r\n },\r\n editComponent: (props: any) => {\r\n if (!R.isNil(props.value)) {\r\n return props.value.map((val: ITranslation, index: number) => {\r\n const language = this.state.languages.find(\r\n (language: any) => language.code === val.language\r\n );\r\n\r\n return language ? (\r\n <>\r\n this.handleLocListChange(e, props, val.language)}\r\n >\r\n \r\n ) : null;\r\n });\r\n } else {\r\n //add\r\n const newLocList = [] as ITranslation[];\r\n for (let i = 0; i < this.state.languages!.length; i++) {\r\n const locListItem = {} as ITranslation;\r\n locListItem.language = this.state.languages[i].code;\r\n locListItem.name = '';\r\n newLocList.push(locListItem);\r\n }\r\n\r\n props.onChange(newLocList);\r\n\r\n return null;\r\n }\r\n }\r\n } as Column,\r\n {\r\n field: 'dateModification',\r\n title: this.translatorService.Tranlate('LIST_OF_VALUES_DATE_HEADER', 'Data'),\r\n defaultSort: 'desc',\r\n searchable: true,\r\n render: (rowData: any) => {\r\n return moment\r\n .utc(rowData.dateModification)\r\n .local()\r\n .format(this.props.appState.longDateFormat);\r\n },\r\n editComponent: (props: EditComponentProps) => {\r\n return ;\r\n }\r\n } as Column,\r\n {\r\n field: 'isActive',\r\n title: this.translatorService.Tranlate('LIST_OF_VALUES_ISACTIVE_HEADER', 'Stare'),\r\n render: (rowData: any) => {\r\n return (\r\n this.handleIsActiveChange(e, rowData)}\r\n value={rowData.isActive}\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n );\r\n },\r\n\r\n editComponent: (props: EditComponentProps) => {\r\n return (\r\n props.onChange(e.target.checked)}\r\n />\r\n );\r\n }\r\n }\r\n ];\r\n\r\n };\r\n public getLocalization = () => {\r\n return {\r\n header: { actions: '' },\r\n toolbar: {\r\n searchPlaceholder: this.translatorService.Tranlate('SEARCH', 'Cauta'),\r\n searchTooltip: this.translatorService.Tranlate('SEARCH', 'Cauta')\r\n },\r\n body: {\r\n editTooltip: this.translatorService.Tranlate('EDIT', 'Editeaza'),\r\n addTooltip: this.translatorService.Tranlate('Add', 'Adauga'),\r\n emptyDataSourceMessage: this.translatorService.Tranlate(\r\n 'NO_RECORDS_TO_DISPLAY',\r\n 'Nu exista date de afisat'\r\n ),\r\n editRow: {\r\n cancelTooltip: this.translatorService.Tranlate('CANCEL', 'Anuleaza'),\r\n saveTooltip: this.translatorService.Tranlate('SAVE', 'Salveaza')\r\n }\r\n },\r\n pagination: {\r\n labelRowsSelect: this.translatorService.Tranlate('ROWS', 'inregistrari'),\r\n firstTooltip: this.translatorService.Tranlate('FIRST_PAGE', 'Prima pagina'),\r\n previousTooltip: this.translatorService.Tranlate('PREVIOUS_PAGE', 'Pagina precedenta'),\r\n nextTooltip: this.translatorService.Tranlate('NEXT_PAGE', 'Pagina urmatoare'),\r\n lastTooltip: this.translatorService.Tranlate('LAST_PAGE', 'Ultima pagina'),\r\n labelDisplayedRows:\r\n '{from}-{to} ' + this.translatorService.Tranlate('OF', 'din') + ' {count}'\r\n }\r\n };\r\n };\r\n public renderTypeList = () => {\r\n return (\r\n \r\n \r\n \r\n this.handleMakeChange(newValue)\r\n }\r\n getOptionLabel={(option) => option.displayName || ''}\r\n renderInput={(params: RenderInputParams) => (\r\n \r\n )}\r\n />\r\n \r\n this.handleModelChange(newValue)\r\n }\r\n getOptionLabel={(option) => option.displayName || ''}\r\n renderInput={(params: RenderInputParams) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n );\r\n };\r\n\r\n onRowUpdate = (newData: IReferential, oldData?: IReferential): Promise =>\r\n new Promise(async (resolve, reject) => {\r\n if (!this.validateRef(newData)) {\r\n reject();\r\n return;\r\n }\r\n\r\n if (oldData) {\r\n this.setState((prevState: IVersionListState) => {\r\n const newReferentials = !R.isEmpty(this.state.filteredReferentials)\r\n ? [...this.state.filteredReferentials]\r\n : [...this.state.referentials];\r\n newReferentials[newReferentials.indexOf(oldData)] = newData;\r\n\r\n return { ...prevState, referentials: newReferentials };\r\n });\r\n\r\n try {\r\n await this.appReferentialService.Update(\r\n newData,\r\n this.state.selectedReferential!.updateUrl\r\n );\r\n await this.loadReferentialsList(this.state.selectedReferential);\r\n resolve();\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n }\r\n });\r\n\r\n validateRef = (referential: IReferential): boolean => {\r\n if (referential.code === '' || referential.code === undefined || referential.code === null) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('LIST_OF_VALUES_ERROR_CODE_EMPTY', 'Eroare'),\r\n { variant: 'error' }\r\n );\r\n return false;\r\n }\r\n const referentials = !R.isEmpty(this.state.filteredReferentials)\r\n ? this.state.filteredReferentials\r\n : this.state.referentials;\r\n let resultRef = referentials.find((item) => item.code === referential.code);\r\n if (referential.id !== undefined) {\r\n resultRef = referentials.find(\r\n (item) => item.code === referential.code && item.id !== referential.id\r\n );\r\n }\r\n if (resultRef !== undefined) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('LIST_OF_VALUES_ERROR_CODE_UNIQUE', 'Eroare'),\r\n { variant: 'error' }\r\n );\r\n return false;\r\n }\r\n if (referential.translations === undefined) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('LIST_OF_VALUES_ERROR_NAME', 'Eroare'),\r\n { variant: 'error' }\r\n );\r\n return false;\r\n }\r\n for (const item of referential.translations) {\r\n if (item.name === '' || item.name === undefined || item.name === null) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('LIST_OF_VALUES_ERROR_NAME', 'Eroare'),\r\n { variant: 'error' }\r\n );\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n };\r\n\r\n onRowAdd = (newData: IReferential): Promise =>\r\n new Promise(async (resolve, reject) => {\r\n if (!this.validateRef(newData)) {\r\n reject();\r\n return;\r\n }\r\n try {\r\n newData.name = newData.translations[0].name;\r\n newData.gtId = this.props.appState.appUser!.gtId!;\r\n if (!R.isNil(this.state.selectedModel)) {\r\n newData.modelId = this.state.selectedModel.id;\r\n }\r\n await this.appReferentialService.Add(newData, this.state.selectedReferential!.addUrl);\r\n await this.loadReferentialsList(this.state.selectedReferential);\r\n resolve();\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n });\r\n\r\n public renderTable = () => {\r\n if (this.state.selectedReferential === null) {\r\n return;\r\n }\r\n\r\n return (\r\n this.onRowAdd(newData),\r\n onRowUpdate: (newData: any, oldData?: any) => this.onRowUpdate(newData, oldData)\r\n }}\r\n />\r\n );\r\n };\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? this.renderTypeList() : null}\r\n {!this.state.isLoading ? this.renderTable() : null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect((state: ApplicationState) => ({ appState: state.app }))(\r\n withSnackbar(VersionList as any)\r\n);\r\n","import React, { Fragment, ChangeEvent } from 'react';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { Box, Switch, Card, TextField } from '@material-ui/core';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport { ITranslation, IReferential, IReferentialConfig } from '../../../interfaces/IReferential';\r\nimport Autocomplete, { RenderInputParams } from '@material-ui/lab/Autocomplete';\r\nimport MaterialTable, { Icons, EditComponentProps, Column } from 'material-table';\r\nimport Referentials from '../../../helpers/Referentials.json';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../store';\r\nimport { forwardRef } from 'react';\r\nimport ArrowDownward from '@material-ui/icons/ArrowDownward';\r\nimport Check from '@material-ui/icons/Check';\r\nimport ChevronLeft from '@material-ui/icons/ChevronLeft';\r\nimport ChevronRight from '@material-ui/icons/ChevronRight';\r\nimport Clear from '@material-ui/icons/Clear';\r\nimport DeleteOutline from '@material-ui/icons/DeleteOutline';\r\nimport Edit from '@material-ui/icons/Edit';\r\nimport FilterList from '@material-ui/icons/FilterList';\r\nimport FirstPage from '@material-ui/icons/FirstPage';\r\nimport LastPage from '@material-ui/icons/LastPage';\r\nimport Remove from '@material-ui/icons/Remove';\r\nimport SaveAlt from '@material-ui/icons/SaveAlt';\r\nimport Search from '@material-ui/icons/Search';\r\nimport ViewColumn from '@material-ui/icons/ViewColumn';\r\nimport { Label } from 'reactstrap';\r\nimport moment from 'moment';\r\nimport AddCircleTwoToneIcon from '@material-ui/icons/AddCircleTwoTone';\r\nimport { Language } from '../../../interfaces/Organization';\r\nimport * as R from 'ramda';\r\nimport { MavoLanguageTranslationEnum, ReferentialCode } from '../../../helpers/Constants';\r\n\r\nconst tableIcons = {\r\n Add: forwardRef((props, ref) => ),\r\n Check: forwardRef((props, ref) => ),\r\n Clear: forwardRef((props, ref) => ),\r\n Delete: forwardRef((props, ref) => ),\r\n DetailPanel: forwardRef((props, ref) => ),\r\n Edit: forwardRef((props, ref) => ),\r\n Export: forwardRef((props, ref) => ),\r\n Filter: forwardRef((props, ref) => ),\r\n FirstPage: forwardRef((props, ref) => ),\r\n LastPage: forwardRef((props, ref) => ),\r\n NextPage: forwardRef((props, ref) => ),\r\n PreviousPage: forwardRef((props, ref) => ),\r\n ResetSearch: forwardRef((props, ref) => ),\r\n Search: forwardRef((props, ref) => ),\r\n SortArrow: forwardRef((props, ref) => ),\r\n ThirdStateCheck: forwardRef((props, ref) => ),\r\n ViewColumn: forwardRef((props, ref) => )\r\n} as Icons;\r\n\r\ntype BodyTypeListProps = { appState: AppState } & ProviderContext;\r\n\r\ninterface IBodyTypeListState{\r\n dependentReferencials: IReferential[];\r\n referentials: IReferential[];\r\n filteredReferentials: IReferential[];\r\n isLoading: boolean;\r\n selectedReferential: IReferentialConfig | null;\r\n languages: Language[];\r\n}\r\n\r\nclass BodyTypeList extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n referentials: [],\r\n isLoading: false,\r\n selectedReferential: null,\r\n languages: [] as Language[],\r\n dependentReferencials: [],\r\n filteredReferentials: []\r\n } as IBodyTypeListState;\r\n\r\n componentDidMount = () => {\r\n const referential = Referentials.referential.find(x => x.code === ReferentialCode.BodyTypeRCR) as IReferentialConfig;\r\n this.setState({\r\n isLoading: true,\r\n languages: this.activeLanguages().filter((lang) => lang.code === MavoLanguageTranslationEnum.RO),\r\n },\r\n async () => {\r\n this.loadReferentials(referential);\r\n });\r\n };\r\n\r\n loadReferentials = async (value: IReferentialConfig | null) => {\r\n let referentialList: IReferential[] = [];\r\n if (value !== null && value.getUrl !== '') {\r\n try {\r\n referentialList = await this.appReferentialService.GetFromDB(value.getUrl);\r\n\r\n referentialList.forEach((refItem) => {\r\n this.state.languages.forEach((lang) => {\r\n const translation = refItem.translations.find((item) => item.language === lang.code);\r\n if (R.isNil(translation)) {\r\n refItem.translations.push({\r\n id: 0,\r\n name: '',\r\n language: lang.code,\r\n referentialTypeId: refItem.id\r\n } as ITranslation);\r\n }\r\n });\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n\r\n this.setState({\r\n referentials: referentialList,\r\n isLoading: false,\r\n selectedReferential: value!\r\n });\r\n };\r\n\r\n handleIsActiveChange = async (event: ChangeEvent, rowData: any) => {\r\n const id = rowData.id;\r\n const newReferentials = [...this.state.filteredReferentials];\r\n const updatedReferential = newReferentials.find((ref) => ref.id === id);\r\n if (updatedReferential !== undefined) {\r\n updatedReferential.isActive = event.target.checked;\r\n\r\n try {\r\n await this.appReferentialService.Update(\r\n updatedReferential,\r\n this.state.selectedReferential!.updateUrl\r\n );\r\n this.setState({\r\n referentials: newReferentials\r\n });\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n\r\n activeLanguages = () => {\r\n const activeLanguages =\r\n this.props.appState.appUser!.organization!.gtOrganization!.languages!.filter((language) => {\r\n if (language.isActive === true) {\r\n return language;\r\n }\r\n });\r\n activeLanguages.forEach((language) => {\r\n language.displayName =\r\n language.displayName.charAt(0).toUpperCase() + language.displayName.slice(1);\r\n });\r\n return activeLanguages;\r\n };\r\n\r\n handleLocListChange = (event: any, gridProps: any, code: string | null) => {\r\n let newLocList = [] as ITranslation[];\r\n if (gridProps.rowData.translations) {\r\n newLocList = gridProps.rowData.translations.map((loc: any) => {\r\n if (loc.language === code) {\r\n loc.name = event.target.value;\r\n }\r\n return loc;\r\n });\r\n }\r\n\r\n gridProps.onRowDataChange({\r\n ...gridProps.rowData,\r\n translations: newLocList\r\n });\r\n };\r\n\r\n getColumns = () => {\r\n return [\r\n {\r\n field: 'code',\r\n title: this.translatorService.Tranlate('LIST_OF_VALUES_COD_HEADER', 'Cod'),\r\n searchable: true\r\n // initialEditValue: Guid.create().toString()\r\n } as Column,\r\n {\r\n field: 'translations',\r\n title: this.translatorService.Tranlate('LIST_OF_VALUES_HEADER', 'Nume'),\r\n searchable: true,\r\n render: (rowData: any) => {\r\n return rowData.translations.map((val: ITranslation, index: number) => {\r\n const language = this.state.languages.find((language: any) => {\r\n return language.code === val.language;\r\n });\r\n return language ? (\r\n <>\r\n \r\n \r\n ) : null;\r\n });\r\n },\r\n customFilterAndSearch: (value, rowData) => {\r\n let matchFilter = false;\r\n rowData.translations.map((val: any) => {\r\n const findMatch = val.name.toLowerCase().indexOf(value.toLowerCase()) !== -1;\r\n if (findMatch) {\r\n matchFilter = true;\r\n }\r\n });\r\n return matchFilter;\r\n },\r\n editComponent: (props: any) => {\r\n if (!R.isNil(props.value)) {\r\n return props.value.map((val: ITranslation, index: number) => {\r\n const language = this.state.languages.find(\r\n (language: any) => language.code === val.language\r\n );\r\n \r\n return language ? (\r\n <>\r\n this.handleLocListChange(e, props, val.language)}\r\n />\r\n \r\n ) : null;\r\n });\r\n } else {\r\n // Add new translations\r\n const newLocList = [] as ITranslation[];\r\n for (let i = 0; i < this.state.languages!.length; i++) {\r\n const locListItem = {} as ITranslation;\r\n locListItem.language = this.state.languages[i].code;\r\n locListItem.name = '';\r\n newLocList.push(locListItem);\r\n }\r\n \r\n props.onChange(newLocList);\r\n \r\n return null;\r\n }\r\n }\r\n } as Column,\r\n {\r\n field: 'dateModification',\r\n title: this.translatorService.Tranlate('LIST_OF_VALUES_DATE_HEADER', 'Data'),\r\n defaultSort: 'desc',\r\n searchable: true,\r\n render: (rowData: any) => {\r\n return moment\r\n .utc(rowData.dateModification)\r\n .local()\r\n .format(this.props.appState.longDateFormat);\r\n },\r\n editComponent: (props: EditComponentProps) => {\r\n return ;\r\n }\r\n } as Column,\r\n {\r\n field: 'isActive',\r\n title: this.translatorService.Tranlate('LIST_OF_VALUES_ISACTIVE_HEADER', 'Stare'),\r\n render: (rowData: any) => {\r\n return (\r\n this.handleIsActiveChange(e, rowData)}\r\n value={rowData.isActive}\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n );\r\n },\r\n\r\n editComponent: (props: EditComponentProps) => {\r\n return (\r\n props.onChange(e.target.checked)}\r\n />\r\n );\r\n }\r\n }\r\n ];\r\n \r\n };\r\n public getLocalization = () => {\r\n return {\r\n header: { actions: '' },\r\n toolbar: {\r\n searchPlaceholder: this.translatorService.Tranlate('SEARCH', 'Cauta'),\r\n searchTooltip: this.translatorService.Tranlate('SEARCH', 'Cauta')\r\n },\r\n body: {\r\n editTooltip: this.translatorService.Tranlate('EDIT', 'Editeaza'),\r\n addTooltip: this.translatorService.Tranlate('Add', 'Adauga'),\r\n emptyDataSourceMessage: this.translatorService.Tranlate(\r\n 'NO_RECORDS_TO_DISPLAY',\r\n 'Nu exista date de afisat'\r\n ),\r\n editRow: {\r\n cancelTooltip: this.translatorService.Tranlate('CANCEL', 'Anuleaza'),\r\n saveTooltip: this.translatorService.Tranlate('SAVE', 'Salveaza')\r\n }\r\n },\r\n pagination: {\r\n labelRowsSelect: this.translatorService.Tranlate('ROWS', 'inregistrari'),\r\n firstTooltip: this.translatorService.Tranlate('FIRST_PAGE', 'Prima pagina'),\r\n previousTooltip: this.translatorService.Tranlate('PREVIOUS_PAGE', 'Pagina precedenta'),\r\n nextTooltip: this.translatorService.Tranlate('NEXT_PAGE', 'Pagina urmatoare'),\r\n lastTooltip: this.translatorService.Tranlate('LAST_PAGE', 'Ultima pagina'),\r\n labelDisplayedRows:\r\n '{from}-{to} ' + this.translatorService.Tranlate('OF', 'din') + ' {count}'\r\n }\r\n };\r\n };\r\n\r\n onRowUpdate = (newData: IReferential, oldData?: IReferential): Promise =>\r\n new Promise(async (resolve, reject) => {\r\n if (!this.validateRef(newData)) {\r\n reject();\r\n return;\r\n }\r\n\r\n if (oldData) {\r\n this.setState((prevState: IBodyTypeListState) => {\r\n const newReferentials = !R.isEmpty(this.state.filteredReferentials)\r\n ? [...this.state.filteredReferentials]\r\n : [...this.state.referentials];\r\n newReferentials[newReferentials.indexOf(oldData)] = newData;\r\n\r\n return { ...prevState, referentials: newReferentials };\r\n });\r\n\r\n try {\r\n await this.appReferentialService.Update(\r\n newData,\r\n this.state.selectedReferential!.updateUrl\r\n );\r\n await this.loadReferentials(this.state.selectedReferential);\r\n resolve();\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n }\r\n });\r\n\r\n validateRef = (referential: IReferential): boolean => {\r\n if (referential.code === '' || referential.code === undefined || referential.code === null) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('LIST_OF_VALUES_ERROR_CODE_EMPTY', 'Eroare'),\r\n { variant: 'error' }\r\n );\r\n return false;\r\n }\r\n const referentials = !R.isEmpty(this.state.filteredReferentials)\r\n ? this.state.filteredReferentials\r\n : this.state.referentials;\r\n let resultRef = referentials.find((item) => item.code === referential.code);\r\n if (referential.id !== undefined) {\r\n resultRef = referentials.find(\r\n (item) => item.code === referential.code && item.id !== referential.id\r\n );\r\n }\r\n if (resultRef !== undefined) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('LIST_OF_VALUES_ERROR_CODE_UNIQUE', 'Eroare'),\r\n { variant: 'error' }\r\n );\r\n return false;\r\n }\r\n if (referential.translations === undefined) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('LIST_OF_VALUES_ERROR_NAME', 'Eroare'),\r\n { variant: 'error' }\r\n );\r\n return false;\r\n }\r\n for (const item of referential.translations) {\r\n if (item.name === '' || item.name === undefined || item.name === null) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('LIST_OF_VALUES_ERROR_NAME', 'Eroare'),\r\n { variant: 'error' }\r\n );\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n };\r\n\r\n onRowAdd = (newData: IReferential): Promise =>\r\n new Promise(async (resolve, reject) => {\r\n if (!this.validateRef(newData)) {\r\n reject();\r\n return;\r\n }\r\n try {\r\n newData.name = newData.translations[0].name;\r\n newData.gtId = this.props.appState.appUser!.gtId!;\r\n await this.appReferentialService.Add(newData, this.state.selectedReferential!.addUrl);\r\n await this.loadReferentials(this.state.selectedReferential);\r\n resolve();\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n });\r\n\r\n public renderTable = () => {\r\n if (this.state.selectedReferential === null) {\r\n return;\r\n }\r\n\r\n return (\r\n this.onRowAdd(newData),\r\n onRowUpdate: (newData: any, oldData?: any) => this.onRowUpdate(newData, oldData)\r\n }}\r\n />\r\n );\r\n };\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? this.renderTable() : null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect((state: ApplicationState) => ({ appState: state.app }))(\r\n withSnackbar(BodyTypeList as any)\r\n);\r\n","import React, { Fragment, ChangeEvent } from 'react';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { Box, Switch, Card, TextField } from '@material-ui/core';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport { ITranslation, IReferential, IReferentialConfig } from '../../../interfaces/IReferential';\r\nimport Autocomplete, { RenderInputParams } from '@material-ui/lab/Autocomplete';\r\nimport MaterialTable, { Icons, EditComponentProps, Column } from 'material-table';\r\nimport Referentials from '../../../helpers/Referentials.json';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../store';\r\nimport { forwardRef } from 'react';\r\nimport ArrowDownward from '@material-ui/icons/ArrowDownward';\r\nimport Check from '@material-ui/icons/Check';\r\nimport ChevronLeft from '@material-ui/icons/ChevronLeft';\r\nimport ChevronRight from '@material-ui/icons/ChevronRight';\r\nimport Clear from '@material-ui/icons/Clear';\r\nimport DeleteOutline from '@material-ui/icons/DeleteOutline';\r\nimport Edit from '@material-ui/icons/Edit';\r\nimport FilterList from '@material-ui/icons/FilterList';\r\nimport FirstPage from '@material-ui/icons/FirstPage';\r\nimport LastPage from '@material-ui/icons/LastPage';\r\nimport Remove from '@material-ui/icons/Remove';\r\nimport SaveAlt from '@material-ui/icons/SaveAlt';\r\nimport Search from '@material-ui/icons/Search';\r\nimport ViewColumn from '@material-ui/icons/ViewColumn';\r\nimport { Label } from 'reactstrap';\r\nimport moment from 'moment';\r\nimport AddCircleTwoToneIcon from '@material-ui/icons/AddCircleTwoTone';\r\nimport { Language } from '../../../interfaces/Organization';\r\nimport * as R from 'ramda';\r\nimport { MavoLanguageTranslationEnum, ReferentialCode } from '../../../helpers/Constants';\r\n\r\nconst tableIcons = {\r\n Add: forwardRef((props, ref) => ),\r\n Check: forwardRef((props, ref) => ),\r\n Clear: forwardRef((props, ref) => ),\r\n Delete: forwardRef((props, ref) => ),\r\n DetailPanel: forwardRef((props, ref) => ),\r\n Edit: forwardRef((props, ref) => ),\r\n Export: forwardRef((props, ref) => ),\r\n Filter: forwardRef((props, ref) => ),\r\n FirstPage: forwardRef((props, ref) => ),\r\n LastPage: forwardRef((props, ref) => ),\r\n NextPage: forwardRef((props, ref) => ),\r\n PreviousPage: forwardRef((props, ref) => ),\r\n ResetSearch: forwardRef((props, ref) => ),\r\n Search: forwardRef((props, ref) => ),\r\n SortArrow: forwardRef((props, ref) => ),\r\n ThirdStateCheck: forwardRef((props, ref) => ),\r\n ViewColumn: forwardRef((props, ref) => )\r\n} as Icons;\r\n\r\ntype BodyConditionTypeListProps = { appState: AppState } & ProviderContext;\r\n\r\ninterface IBodyConditionTypeListState{\r\n dependentReferencials: IReferential[];\r\n referentials: IReferential[];\r\n filteredReferentials: IReferential[];\r\n isLoading: boolean;\r\n selectedReferential: IReferentialConfig | null;\r\n languages: Language[];\r\n}\r\n\r\nclass BodyConditionTypeList extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n referentials: [],\r\n isLoading: false,\r\n selectedReferential: null,\r\n languages: [] as Language[],\r\n dependentReferencials: [],\r\n filteredReferentials: []\r\n } as IBodyConditionTypeListState;\r\n\r\n componentDidMount = () => {\r\n const referential = Referentials.referential.find(x => x.code === ReferentialCode.BodyConditionType) as IReferentialConfig;\r\n this.setState({\r\n isLoading: true,\r\n languages: this.activeLanguages().filter((lang) => lang.code === MavoLanguageTranslationEnum.RO),\r\n },\r\n async () => {\r\n this.loadReferentials(referential);\r\n });\r\n };\r\n\r\n loadReferentials = async (value: IReferentialConfig | null) => {\r\n let referentialList: IReferential[] = [];\r\n if (value !== null && value.getUrl !== '') {\r\n try {\r\n referentialList = await this.appReferentialService.GetFromDB(value.getUrl);\r\n\r\n referentialList.forEach((refItem) => {\r\n this.state.languages.forEach((lang) => {\r\n const translation = refItem.translations.find((item) => item.language === lang.code);\r\n if (R.isNil(translation)) {\r\n refItem.translations.push({\r\n id: 0,\r\n name: '',\r\n language: lang.code,\r\n referentialTypeId: refItem.id\r\n } as ITranslation);\r\n }\r\n });\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n\r\n this.setState({\r\n referentials: referentialList,\r\n isLoading: false,\r\n selectedReferential: value!\r\n });\r\n };\r\n\r\n handleIsActiveChange = async (event: ChangeEvent, rowData: any) => {\r\n const id = rowData.id;\r\n const newReferentials = [...this.state.filteredReferentials];\r\n const updatedReferential = newReferentials.find((ref) => ref.id === id);\r\n if (updatedReferential !== undefined) {\r\n updatedReferential.isActive = event.target.checked;\r\n\r\n try {\r\n await this.appReferentialService.Update(\r\n updatedReferential,\r\n this.state.selectedReferential!.updateUrl\r\n );\r\n this.setState({\r\n referentials: newReferentials\r\n });\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n\r\n activeLanguages = () => {\r\n const activeLanguages =\r\n this.props.appState.appUser!.organization!.gtOrganization!.languages!.filter((language) => {\r\n if (language.isActive === true) {\r\n return language;\r\n }\r\n });\r\n activeLanguages.forEach((language) => {\r\n language.displayName =\r\n language.displayName.charAt(0).toUpperCase() + language.displayName.slice(1);\r\n });\r\n return activeLanguages;\r\n };\r\n\r\n handleLocListChange = (event: any, gridProps: any, code: string | null) => {\r\n let newLocList = [] as ITranslation[];\r\n if (gridProps.rowData.translations) {\r\n newLocList = gridProps.rowData.translations.map((loc: any) => {\r\n if (loc.language === code) {\r\n loc.name = event.target.value;\r\n }\r\n return loc;\r\n });\r\n }\r\n\r\n gridProps.onRowDataChange({\r\n ...gridProps.rowData,\r\n translations: newLocList\r\n });\r\n };\r\n\r\n getColumns = () => {\r\n return [\r\n {\r\n field: 'code',\r\n title: this.translatorService.Tranlate('LIST_OF_VALUES_COD_HEADER', 'Cod'),\r\n searchable: true\r\n // initialEditValue: Guid.create().toString()\r\n } as Column,\r\n {\r\n field: 'translations',\r\n title: this.translatorService.Tranlate('LIST_OF_VALUES_HEADER', 'Nume'),\r\n searchable: true,\r\n render: (rowData: any) => {\r\n return rowData.translations.map((val: ITranslation, index: number) => {\r\n const language = this.state.languages.find((language: any) => {\r\n return language.code === val.language;\r\n });\r\n return language ? (\r\n <>\r\n \r\n \r\n ) : null;\r\n });\r\n },\r\n customFilterAndSearch: (value, rowData) => {\r\n let matchFilter = false;\r\n rowData.translations.map((val: any) => {\r\n const findMatch = val.name.toLowerCase().indexOf(value.toLowerCase()) !== -1;\r\n if (findMatch) {\r\n matchFilter = true;\r\n }\r\n });\r\n return matchFilter;\r\n },\r\n editComponent: (props: any) => {\r\n if (!R.isNil(props.value)) {\r\n return props.value.map((val: ITranslation, index: number) => {\r\n const language = this.state.languages.find(\r\n (language: any) => language.code === val.language\r\n );\r\n \r\n return language ? (\r\n <>\r\n this.handleLocListChange(e, props, val.language)}\r\n />\r\n \r\n ) : null;\r\n });\r\n } else {\r\n // Add new translations\r\n const newLocList = [] as ITranslation[];\r\n for (let i = 0; i < this.state.languages!.length; i++) {\r\n const locListItem = {} as ITranslation;\r\n locListItem.language = this.state.languages[i].code;\r\n locListItem.name = '';\r\n newLocList.push(locListItem);\r\n }\r\n \r\n props.onChange(newLocList);\r\n \r\n return null;\r\n }\r\n }\r\n } as Column,\r\n {\r\n field: 'dateModification',\r\n title: this.translatorService.Tranlate('LIST_OF_VALUES_DATE_HEADER', 'Data'),\r\n defaultSort: 'desc',\r\n searchable: true,\r\n render: (rowData: any) => {\r\n return moment\r\n .utc(rowData.dateModification)\r\n .local()\r\n .format(this.props.appState.longDateFormat);\r\n },\r\n editComponent: (props: EditComponentProps) => {\r\n return ;\r\n }\r\n } as Column,\r\n {\r\n field: 'isActive',\r\n title: this.translatorService.Tranlate('LIST_OF_VALUES_ISACTIVE_HEADER', 'Stare'),\r\n render: (rowData: any) => {\r\n return (\r\n this.handleIsActiveChange(e, rowData)}\r\n value={rowData.isActive}\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n );\r\n },\r\n\r\n editComponent: (props: EditComponentProps) => {\r\n return (\r\n props.onChange(e.target.checked)}\r\n />\r\n );\r\n }\r\n }\r\n ];\r\n \r\n };\r\n public getLocalization = () => {\r\n return {\r\n header: { actions: '' },\r\n toolbar: {\r\n searchPlaceholder: this.translatorService.Tranlate('SEARCH', 'Cauta'),\r\n searchTooltip: this.translatorService.Tranlate('SEARCH', 'Cauta')\r\n },\r\n body: {\r\n editTooltip: this.translatorService.Tranlate('EDIT', 'Editeaza'),\r\n addTooltip: this.translatorService.Tranlate('Add', 'Adauga'),\r\n emptyDataSourceMessage: this.translatorService.Tranlate(\r\n 'NO_RECORDS_TO_DISPLAY',\r\n 'Nu exista date de afisat'\r\n ),\r\n editRow: {\r\n cancelTooltip: this.translatorService.Tranlate('CANCEL', 'Anuleaza'),\r\n saveTooltip: this.translatorService.Tranlate('SAVE', 'Salveaza')\r\n }\r\n },\r\n pagination: {\r\n labelRowsSelect: this.translatorService.Tranlate('ROWS', 'inregistrari'),\r\n firstTooltip: this.translatorService.Tranlate('FIRST_PAGE', 'Prima pagina'),\r\n previousTooltip: this.translatorService.Tranlate('PREVIOUS_PAGE', 'Pagina precedenta'),\r\n nextTooltip: this.translatorService.Tranlate('NEXT_PAGE', 'Pagina urmatoare'),\r\n lastTooltip: this.translatorService.Tranlate('LAST_PAGE', 'Ultima pagina'),\r\n labelDisplayedRows:\r\n '{from}-{to} ' + this.translatorService.Tranlate('OF', 'din') + ' {count}'\r\n }\r\n };\r\n };\r\n\r\n onRowUpdate = (newData: IReferential, oldData?: IReferential): Promise =>\r\n new Promise(async (resolve, reject) => {\r\n if (!this.validateRef(newData)) {\r\n reject();\r\n return;\r\n }\r\n\r\n if (oldData) {\r\n this.setState((prevState: IBodyConditionTypeListState) => {\r\n const newReferentials = !R.isEmpty(this.state.filteredReferentials)\r\n ? [...this.state.filteredReferentials]\r\n : [...this.state.referentials];\r\n newReferentials[newReferentials.indexOf(oldData)] = newData;\r\n\r\n return { ...prevState, referentials: newReferentials };\r\n });\r\n\r\n try {\r\n await this.appReferentialService.Update(\r\n newData,\r\n this.state.selectedReferential!.updateUrl\r\n );\r\n await this.loadReferentials(this.state.selectedReferential);\r\n resolve();\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n }\r\n });\r\n\r\n validateRef = (referential: IReferential): boolean => {\r\n if (referential.code === '' || referential.code === undefined || referential.code === null) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('LIST_OF_VALUES_ERROR_CODE_EMPTY', 'Eroare'),\r\n { variant: 'error' }\r\n );\r\n return false;\r\n }\r\n const referentials = !R.isEmpty(this.state.filteredReferentials)\r\n ? this.state.filteredReferentials\r\n : this.state.referentials;\r\n let resultRef = referentials.find((item) => item.code === referential.code);\r\n if (referential.id !== undefined) {\r\n resultRef = referentials.find(\r\n (item) => item.code === referential.code && item.id !== referential.id\r\n );\r\n }\r\n if (resultRef !== undefined) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('LIST_OF_VALUES_ERROR_CODE_UNIQUE', 'Eroare'),\r\n { variant: 'error' }\r\n );\r\n return false;\r\n }\r\n if (referential.translations === undefined) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('LIST_OF_VALUES_ERROR_NAME', 'Eroare'),\r\n { variant: 'error' }\r\n );\r\n return false;\r\n }\r\n for (const item of referential.translations) {\r\n if (item.name === '' || item.name === undefined || item.name === null) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('LIST_OF_VALUES_ERROR_NAME', 'Eroare'),\r\n { variant: 'error' }\r\n );\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n };\r\n\r\n onRowAdd = (newData: IReferential): Promise =>\r\n new Promise(async (resolve, reject) => {\r\n if (!this.validateRef(newData)) {\r\n reject();\r\n return;\r\n }\r\n try {\r\n newData.name = newData.translations[0].name;\r\n newData.gtId = this.props.appState.appUser!.gtId!;\r\n await this.appReferentialService.Add(newData, this.state.selectedReferential!.addUrl);\r\n await this.loadReferentials(this.state.selectedReferential);\r\n resolve();\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n });\r\n\r\n public renderTable = () => {\r\n if (this.state.selectedReferential === null) {\r\n return;\r\n }\r\n\r\n return (\r\n this.onRowAdd(newData),\r\n onRowUpdate: (newData: any, oldData?: any) => this.onRowUpdate(newData, oldData)\r\n }}\r\n />\r\n );\r\n };\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? this.renderTable() : null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect((state: ApplicationState) => ({ appState: state.app }))(\r\n withSnackbar(BodyConditionTypeList as any)\r\n);\r\n","import React, { Fragment, ChangeEvent } from 'react';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { Box, Switch, Card, TextField } from '@material-ui/core';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport { ITranslation, IReferential, IReferentialConfig } from '../../../interfaces/IReferential';\r\nimport Autocomplete, { RenderInputParams } from '@material-ui/lab/Autocomplete';\r\nimport MaterialTable, { Icons, EditComponentProps, Column } from 'material-table';\r\nimport Referentials from '../../../helpers/Referentials.json';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../store';\r\nimport { forwardRef } from 'react';\r\nimport ArrowDownward from '@material-ui/icons/ArrowDownward';\r\nimport Check from '@material-ui/icons/Check';\r\nimport ChevronLeft from '@material-ui/icons/ChevronLeft';\r\nimport ChevronRight from '@material-ui/icons/ChevronRight';\r\nimport Clear from '@material-ui/icons/Clear';\r\nimport DeleteOutline from '@material-ui/icons/DeleteOutline';\r\nimport Edit from '@material-ui/icons/Edit';\r\nimport FilterList from '@material-ui/icons/FilterList';\r\nimport FirstPage from '@material-ui/icons/FirstPage';\r\nimport LastPage from '@material-ui/icons/LastPage';\r\nimport Remove from '@material-ui/icons/Remove';\r\nimport SaveAlt from '@material-ui/icons/SaveAlt';\r\nimport Search from '@material-ui/icons/Search';\r\nimport ViewColumn from '@material-ui/icons/ViewColumn';\r\nimport { Label } from 'reactstrap';\r\nimport moment from 'moment';\r\nimport AddCircleTwoToneIcon from '@material-ui/icons/AddCircleTwoTone';\r\nimport { Language } from '../../../interfaces/Organization';\r\nimport * as R from 'ramda';\r\nimport { MavoLanguageTranslationEnum, ReferentialCode } from '../../../helpers/Constants';\r\n\r\nconst tableIcons = {\r\n Add: forwardRef((props, ref) => ),\r\n Check: forwardRef((props, ref) => ),\r\n Clear: forwardRef((props, ref) => ),\r\n Delete: forwardRef((props, ref) => ),\r\n DetailPanel: forwardRef((props, ref) => ),\r\n Edit: forwardRef((props, ref) => ),\r\n Export: forwardRef((props, ref) => ),\r\n Filter: forwardRef((props, ref) => ),\r\n FirstPage: forwardRef((props, ref) => ),\r\n LastPage: forwardRef((props, ref) => ),\r\n NextPage: forwardRef((props, ref) => ),\r\n PreviousPage: forwardRef((props, ref) => ),\r\n ResetSearch: forwardRef((props, ref) => ),\r\n Search: forwardRef((props, ref) => ),\r\n SortArrow: forwardRef((props, ref) => ),\r\n ThirdStateCheck: forwardRef((props, ref) => ),\r\n ViewColumn: forwardRef((props, ref) => )\r\n} as Icons;\r\n\r\ntype WheelConditionTypeListProps = { appState: AppState } & ProviderContext;\r\n\r\ninterface IWheelConditionTypeListState{\r\n dependentReferencials: IReferential[];\r\n referentials: IReferential[];\r\n filteredReferentials: IReferential[];\r\n isLoading: boolean;\r\n selectedReferential: IReferentialConfig | null;\r\n languages: Language[];\r\n}\r\n\r\nclass WheelConditionTypeList extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n referentials: [],\r\n isLoading: false,\r\n selectedReferential: null,\r\n languages: [] as Language[],\r\n dependentReferencials: [],\r\n filteredReferentials: []\r\n } as IWheelConditionTypeListState;\r\n\r\n componentDidMount = () => {\r\n const referential = Referentials.referential.find(x => x.code === ReferentialCode.BodyConditionType) as IReferentialConfig;\r\n this.setState({\r\n isLoading: true,\r\n languages: this.activeLanguages().filter((lang) => lang.code === MavoLanguageTranslationEnum.RO),\r\n },\r\n async () => {\r\n this.loadReferentials(referential);\r\n });\r\n };\r\n\r\n loadReferentials = async (value: IReferentialConfig | null) => {\r\n let referentialList: IReferential[] = [];\r\n if (value !== null && value.getUrl !== '') {\r\n try {\r\n referentialList = await this.appReferentialService.GetFromDB(value.getUrl);\r\n\r\n referentialList.forEach((refItem) => {\r\n this.state.languages.forEach((lang) => {\r\n const translation = refItem.translations.find((item) => item.language === lang.code);\r\n if (R.isNil(translation)) {\r\n refItem.translations.push({\r\n id: 0,\r\n name: '',\r\n language: lang.code,\r\n referentialTypeId: refItem.id\r\n } as ITranslation);\r\n }\r\n });\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n\r\n this.setState({\r\n referentials: referentialList,\r\n isLoading: false,\r\n selectedReferential: value!\r\n });\r\n };\r\n\r\n handleIsActiveChange = async (event: ChangeEvent, rowData: any) => {\r\n const id = rowData.id;\r\n const newReferentials = [...this.state.filteredReferentials];\r\n const updatedReferential = newReferentials.find((ref) => ref.id === id);\r\n if (updatedReferential !== undefined) {\r\n updatedReferential.isActive = event.target.checked;\r\n\r\n try {\r\n await this.appReferentialService.Update(\r\n updatedReferential,\r\n this.state.selectedReferential!.updateUrl\r\n );\r\n this.setState({\r\n referentials: newReferentials\r\n });\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n\r\n activeLanguages = () => {\r\n const activeLanguages =\r\n this.props.appState.appUser!.organization!.gtOrganization!.languages!.filter((language) => {\r\n if (language.isActive === true) {\r\n return language;\r\n }\r\n });\r\n activeLanguages.forEach((language) => {\r\n language.displayName =\r\n language.displayName.charAt(0).toUpperCase() + language.displayName.slice(1);\r\n });\r\n return activeLanguages;\r\n };\r\n\r\n handleLocListChange = (event: any, gridProps: any, code: string | null) => {\r\n let newLocList = [] as ITranslation[];\r\n if (gridProps.rowData.translations) {\r\n newLocList = gridProps.rowData.translations.map((loc: any) => {\r\n if (loc.language === code) {\r\n loc.name = event.target.value;\r\n }\r\n return loc;\r\n });\r\n }\r\n\r\n gridProps.onRowDataChange({\r\n ...gridProps.rowData,\r\n translations: newLocList\r\n });\r\n };\r\n\r\n getColumns = () => {\r\n return [\r\n {\r\n field: 'code',\r\n title: this.translatorService.Tranlate('LIST_OF_VALUES_COD_HEADER', 'Cod'),\r\n searchable: true\r\n // initialEditValue: Guid.create().toString()\r\n } as Column,\r\n {\r\n field: 'translations',\r\n title: this.translatorService.Tranlate('LIST_OF_VALUES_HEADER', 'Nume'),\r\n searchable: true,\r\n render: (rowData: any) => {\r\n return rowData.translations.map((val: ITranslation, index: number) => {\r\n const language = this.state.languages.find((language: any) => {\r\n return language.code === val.language;\r\n });\r\n return language ? (\r\n <>\r\n \r\n \r\n ) : null;\r\n });\r\n },\r\n customFilterAndSearch: (value, rowData) => {\r\n let matchFilter = false;\r\n rowData.translations.map((val: any) => {\r\n const findMatch = val.name.toLowerCase().indexOf(value.toLowerCase()) !== -1;\r\n if (findMatch) {\r\n matchFilter = true;\r\n }\r\n });\r\n return matchFilter;\r\n },\r\n editComponent: (props: any) => {\r\n if (!R.isNil(props.value)) {\r\n return props.value.map((val: ITranslation, index: number) => {\r\n const language = this.state.languages.find(\r\n (language: any) => language.code === val.language\r\n );\r\n \r\n return language ? (\r\n <>\r\n this.handleLocListChange(e, props, val.language)}\r\n />\r\n \r\n ) : null;\r\n });\r\n } else {\r\n // Add new translations\r\n const newLocList = [] as ITranslation[];\r\n for (let i = 0; i < this.state.languages!.length; i++) {\r\n const locListItem = {} as ITranslation;\r\n locListItem.language = this.state.languages[i].code;\r\n locListItem.name = '';\r\n newLocList.push(locListItem);\r\n }\r\n \r\n props.onChange(newLocList);\r\n \r\n return null;\r\n }\r\n }\r\n } as Column,\r\n {\r\n field: 'dateModification',\r\n title: this.translatorService.Tranlate('LIST_OF_VALUES_DATE_HEADER', 'Data'),\r\n defaultSort: 'desc',\r\n searchable: true,\r\n render: (rowData: any) => {\r\n return moment\r\n .utc(rowData.dateModification)\r\n .local()\r\n .format(this.props.appState.longDateFormat);\r\n },\r\n editComponent: (props: EditComponentProps) => {\r\n return ;\r\n }\r\n } as Column,\r\n {\r\n field: 'isActive',\r\n title: this.translatorService.Tranlate('LIST_OF_VALUES_ISACTIVE_HEADER', 'Stare'),\r\n render: (rowData: any) => {\r\n return (\r\n this.handleIsActiveChange(e, rowData)}\r\n value={rowData.isActive}\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n );\r\n },\r\n\r\n editComponent: (props: EditComponentProps) => {\r\n return (\r\n props.onChange(e.target.checked)}\r\n />\r\n );\r\n }\r\n }\r\n ];\r\n \r\n };\r\n public getLocalization = () => {\r\n return {\r\n header: { actions: '' },\r\n toolbar: {\r\n searchPlaceholder: this.translatorService.Tranlate('SEARCH', 'Cauta'),\r\n searchTooltip: this.translatorService.Tranlate('SEARCH', 'Cauta')\r\n },\r\n body: {\r\n editTooltip: this.translatorService.Tranlate('EDIT', 'Editeaza'),\r\n addTooltip: this.translatorService.Tranlate('Add', 'Adauga'),\r\n emptyDataSourceMessage: this.translatorService.Tranlate(\r\n 'NO_RECORDS_TO_DISPLAY',\r\n 'Nu exista date de afisat'\r\n ),\r\n editRow: {\r\n cancelTooltip: this.translatorService.Tranlate('CANCEL', 'Anuleaza'),\r\n saveTooltip: this.translatorService.Tranlate('SAVE', 'Salveaza')\r\n }\r\n },\r\n pagination: {\r\n labelRowsSelect: this.translatorService.Tranlate('ROWS', 'inregistrari'),\r\n firstTooltip: this.translatorService.Tranlate('FIRST_PAGE', 'Prima pagina'),\r\n previousTooltip: this.translatorService.Tranlate('PREVIOUS_PAGE', 'Pagina precedenta'),\r\n nextTooltip: this.translatorService.Tranlate('NEXT_PAGE', 'Pagina urmatoare'),\r\n lastTooltip: this.translatorService.Tranlate('LAST_PAGE', 'Ultima pagina'),\r\n labelDisplayedRows:\r\n '{from}-{to} ' + this.translatorService.Tranlate('OF', 'din') + ' {count}'\r\n }\r\n };\r\n };\r\n\r\n onRowUpdate = (newData: IReferential, oldData?: IReferential): Promise =>\r\n new Promise(async (resolve, reject) => {\r\n if (!this.validateRef(newData)) {\r\n reject();\r\n return;\r\n }\r\n\r\n if (oldData) {\r\n this.setState((prevState: IWheelConditionTypeListState) => {\r\n const newReferentials = !R.isEmpty(this.state.filteredReferentials)\r\n ? [...this.state.filteredReferentials]\r\n : [...this.state.referentials];\r\n newReferentials[newReferentials.indexOf(oldData)] = newData;\r\n\r\n return { ...prevState, referentials: newReferentials };\r\n });\r\n\r\n try {\r\n await this.appReferentialService.Update(\r\n newData,\r\n this.state.selectedReferential!.updateUrl\r\n );\r\n await this.loadReferentials(this.state.selectedReferential);\r\n resolve();\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n }\r\n });\r\n\r\n validateRef = (referential: IReferential): boolean => {\r\n if (referential.code === '' || referential.code === undefined || referential.code === null) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('LIST_OF_VALUES_ERROR_CODE_EMPTY', 'Eroare'),\r\n { variant: 'error' }\r\n );\r\n return false;\r\n }\r\n const referentials = !R.isEmpty(this.state.filteredReferentials)\r\n ? this.state.filteredReferentials\r\n : this.state.referentials;\r\n let resultRef = referentials.find((item) => item.code === referential.code);\r\n if (referential.id !== undefined) {\r\n resultRef = referentials.find(\r\n (item) => item.code === referential.code && item.id !== referential.id\r\n );\r\n }\r\n if (resultRef !== undefined) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('LIST_OF_VALUES_ERROR_CODE_UNIQUE', 'Eroare'),\r\n { variant: 'error' }\r\n );\r\n return false;\r\n }\r\n if (referential.translations === undefined) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('LIST_OF_VALUES_ERROR_NAME', 'Eroare'),\r\n { variant: 'error' }\r\n );\r\n return false;\r\n }\r\n for (const item of referential.translations) {\r\n if (item.name === '' || item.name === undefined || item.name === null) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('LIST_OF_VALUES_ERROR_NAME', 'Eroare'),\r\n { variant: 'error' }\r\n );\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n };\r\n\r\n onRowAdd = (newData: IReferential): Promise =>\r\n new Promise(async (resolve, reject) => {\r\n if (!this.validateRef(newData)) {\r\n reject();\r\n return;\r\n }\r\n try {\r\n newData.name = newData.translations[0].name;\r\n newData.gtId = this.props.appState.appUser!.gtId!;\r\n await this.appReferentialService.Add(newData, this.state.selectedReferential!.addUrl);\r\n await this.loadReferentials(this.state.selectedReferential);\r\n resolve();\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n });\r\n\r\n public renderTable = () => {\r\n if (this.state.selectedReferential === null) {\r\n return;\r\n }\r\n\r\n return (\r\n this.onRowAdd(newData),\r\n onRowUpdate: (newData: any, oldData?: any) => this.onRowUpdate(newData, oldData)\r\n }}\r\n />\r\n );\r\n };\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? this.renderTable() : null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect((state: ApplicationState) => ({ appState: state.app }))(\r\n withSnackbar(WheelConditionTypeList as any)\r\n);\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport {\r\n Tooltip,\r\n Box,\r\n Button,\r\n IconButton,\r\n Dialog,\r\n DialogTitle,\r\n Grid,\r\n Typography,\r\n DialogContent\r\n} from '@material-ui/core';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport AddCircleTwoToneIcon from '@material-ui/icons/AddCircleTwoTone';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport MUIDataTable, {\r\n SelectableRows,\r\n MUIDataTableMeta,\r\n MUIDataTableColumnOptions\r\n} from 'mui-datatables';\r\nimport { MUITranslations } from '../../../helpers/MUITableTranslations';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport DeleteOutlineTwoToneIcon from '@material-ui/icons/DeleteOutlineTwoTone';\r\nimport { InvoiceRangeCodeEnum, RefConstants, RoleClaimsEnum } from '../../../helpers/Constants';\r\nimport { IReferential } from '../../../interfaces/IReferential';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport EditOutlinedIcon from '@material-ui/icons/EditOutlined';\r\nimport NumberFormat from 'react-number-format';\r\nimport { IVehicleService } from '../../../services/Interfaces/IVehicleService';\r\nimport { InvoiceRange } from '../../../interfaces/Vehicle';\r\nimport * as R from 'ramda';\r\n\r\ninterface IInvoiceRangeListState {\r\n newInvoiceRange: InvoiceRange;\r\n invoiceRangeTypes: IReferential[];\r\n invoiceRangeStatuses: IReferential[];\r\n invoiceRanges: InvoiceRange[];\r\n isLoading: boolean;\r\n isDialogOpen: boolean;\r\n newInvoiceRangeId: number | null;\r\n}\r\n\r\ntype IInvoiceRangeListProps = { appState: AppState } & ProviderContext &\r\n RouteComponentProps<{ id: string; workflowId: string }>;\r\n\r\nclass InvoiceRangeList extends React.PureComponent<\r\n IInvoiceRangeListProps,\r\n IInvoiceRangeListState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private vehicleService!: IVehicleService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n\r\n static contextType = ApplicationContext;\r\n private newInvoiceRange = {\r\n id: 0,\r\n invoiceRangeTypeId: null,\r\n invoiceRangeType: null,\r\n firstSeries: null,\r\n startingNumber: null,\r\n currentNumber: null,\r\n endingNumber: null,\r\n lastSeries: null,\r\n invoiceRangeStatusId: null,\r\n invoiceRangeStatus: null\r\n } as unknown as InvoiceRange;\r\n\r\n state = {\r\n invoiceRanges: [],\r\n isLoading: false,\r\n selectedFilter: 0,\r\n isDialogOpen: false,\r\n newInvoiceRange: this.newInvoiceRange,\r\n invoiceRangeTypes: [],\r\n invoiceRangeStatuses: [],\r\n newInvoiceRangeId: null\r\n } as IInvoiceRangeListState;\r\n\r\n public componentDidMount() {\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadInvoiceRanges();\r\n }\r\n );\r\n }\r\n\r\n loadInvoiceRanges = async () => {\r\n let invoiceRanges = await this.vehicleService.GetInvoiceRanges();\r\n const { invoiceRangeTypeRef, invoiceRangeStatusRef } = RefConstants;\r\n\r\n const [invoiceRangeTypes, invoiceRangeStatuses] = await Promise.all([\r\n this.appReferentialService.Get(invoiceRangeTypeRef!.baseUrl),\r\n this.appReferentialService.Get(invoiceRangeStatusRef!.baseUrl)\r\n ]);\r\n\r\n if (this.hasRight(RoleClaimsEnum.MavoAdministrator)){\r\n invoiceRanges = invoiceRanges.filter((item) => item.invoiceRangeType!.code === InvoiceRangeCodeEnum.AVIZ.toString() || item.invoiceRangeType!.code === InvoiceRangeCodeEnum.FACTURA.toString());\r\n }\r\n\r\n this.setState({\r\n invoiceRanges: invoiceRanges,\r\n isLoading: false,\r\n invoiceRangeTypes: invoiceRangeTypes.filter((item) => item.code === InvoiceRangeCodeEnum.AVIZ.toString() || item.code === InvoiceRangeCodeEnum.FACTURA.toString()),\r\n invoiceRangeStatuses: invoiceRangeStatuses,\r\n newInvoiceRange: { ...this.newInvoiceRange }\r\n });\r\n };\r\n\r\n public hasRight = (right: string): boolean => {\r\n return this.props.appState!.user!.profile.role.includes(right);\r\n };\r\n\r\n private handleInvoiceRangeTypeChange = (newValue: IReferential | null) => {\r\n this.setState({\r\n newInvoiceRange: {\r\n ...this.state.newInvoiceRange,\r\n invoiceRangeType: newValue,\r\n invoiceRangeTypeId: newValue !== null ? newValue!.id : 0\r\n }\r\n });\r\n };\r\n\r\n \r\n private handleInvoiceRangeStatusChange = (newValue: IReferential | null) => {\r\n this.setState({\r\n newInvoiceRange: {\r\n ...this.state.newInvoiceRange,\r\n invoiceRangeStatus: newValue,\r\n invoiceRangeStatusId: newValue !== null ? newValue!.id : 0\r\n }\r\n });\r\n };\r\n\r\n public saveInvoiceRange = async () => {\r\n if (!R.isNil(this.state.newInvoiceRange.startingNumber) && !R.isNil(this.state.newInvoiceRange.endingNumber)) {\r\n if (this.state.newInvoiceRange.endingNumber < this.state.newInvoiceRange.startingNumber) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('INVOICE_RANGE_ENDING_NUMBER_ERROR', 'Numarul de sfarsit trebuie sa fie mai mare decat numarul de inceput!'), {\r\n variant: 'error'\r\n });\r\n return;\r\n }\r\n }\r\n\r\n if (this.state.newInvoiceRangeId === null) {\r\n try {\r\n await this.vehicleService.AddInvoiceRange(this.state.newInvoiceRange);\r\n\r\n await this.loadInvoiceRanges();\r\n\r\n this.closeDialog();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n } else {\r\n try {\r\n\r\n await this.vehicleService.UpdateInvoiceRange(this.state.newInvoiceRange);\r\n\r\n await this.loadInvoiceRanges();\r\n\r\n this.closeDialog();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n \r\n \r\n NumberFormatCustom = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n },\r\n currentTarget: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n allowNegative={false}\r\n thousandSeparator={false}\r\n decimalScale={0}\r\n />\r\n );\r\n };\r\n \r\n onChange =\r\n (fieldName: string, isNumber: boolean) => (e: any, newValue?: IReferential | null) => {\r\n isNumber\r\n ? this.setState({\r\n newInvoiceRange: {\r\n ...this.state.newInvoiceRange,\r\n [fieldName]: parseFloat(newValue || e.target.value)\r\n }\r\n })\r\n : this.setState({\r\n newInvoiceRange: {\r\n ...this.state.newInvoiceRange,\r\n [fieldName]: newValue || e.target.value\r\n }\r\n });\r\n };\r\n\r\n public renderAddForm() {\r\n return (\r\n \r\n \r\n this.handleInvoiceRangeTypeChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n /> \r\n\r\n \r\n this.onChange('firstSeries', false)(e)\r\n }\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n label={this.translatorService.Tranlate('INVOICE_RANGE_FIRST_SERIES', 'Serie 1')}\r\n />\r\n\r\n this.onChange('startingNumber', true)(e)}\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n label={this.translatorService.Tranlate('INVOICE_RANGE_STARTING_NUMBER', 'Numar inceput')}\r\n InputProps={{\r\n inputComponent: this.NumberFormatCustom\r\n }}\r\n />\r\n this.onChange('endingNumber', true)(e)}\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n label={this.translatorService.Tranlate('INVOICE_RANGE_ENDING_NUMBER', 'Numar sfarsit')}\r\n InputProps={{\r\n inputComponent: this.NumberFormatCustom\r\n }}\r\n error={!R.isNil(this.state.newInvoiceRange.startingNumber) && !R.isNil(this.state.newInvoiceRange.endingNumber) ? \r\n (this.state.newInvoiceRange.endingNumber < this.state.newInvoiceRange.startingNumber ? true : false) : false}\r\n helperText={\r\n !R.isNil(this.state.newInvoiceRange.startingNumber) && !R.isNil(this.state.newInvoiceRange.endingNumber) ? \r\n (this.state.newInvoiceRange.endingNumber < this.state.newInvoiceRange.startingNumber ? \r\n this.translatorService.Tranlate(\r\n 'INVOICE_RANGE_ENDING_NUMBER_ERROR',\r\n 'Numarul de sfarsit trebuie sa fie mai mare decat numarul de inceput!'\r\n ) : '') : ''\r\n }\r\n />\r\n\r\n this.onChange('lastSeries', false)(e)}\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n label={this.translatorService.Tranlate('INVOICE_RANGE_LAST_SERIES', 'Serie 2')}\r\n />\r\n\r\n \r\n this.handleInvoiceRangeStatusChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n /> \r\n\r\n
\r\n \r\n {this.translatorService.Tranlate('EDIT_ORGANIZATION_CANCEL_BTN', 'Anuleaza')}\r\n \r\n \r\n
\r\n
\r\n );\r\n }\r\n\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n label: this.translatorService.Tranlate('INVOICE_RANGE_NR', 'NR'),\r\n },\r\n {\r\n name: 'invoiceRangeType',\r\n label: this.translatorService.Tranlate(\r\n 'INVOICE_RANGE_TYPE',\r\n 'Tip'\r\n ),\r\n options: {\r\n sort: true,\r\n customSort: (a: IReferential, b: IReferential) => {\r\n return a.name!.localeCompare(b.name!);\r\n },\r\n customBodyRender: (value: IReferential) => {\r\n return value.name;\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'firstSeries',\r\n label: this.translatorService.Tranlate('INVOICE_RANGE_FIRST_SERIES', 'Serie 1'),\r\n options: {\r\n filter: false,\r\n customBodyRender: (value: string, tableMeta: MUIDataTableMeta) => {\r\n return value;\r\n }\r\n }\r\n },\r\n {\r\n name: 'startingNumber',\r\n label: this.translatorService.Tranlate('INVOICE_RANGE_STARTING_NUMBER', 'Numar inceput'),\r\n options: {\r\n filter: false,\r\n customBodyRender: (value: number, tableMeta: MUIDataTableMeta) => {\r\n return value;\r\n }\r\n }\r\n },\r\n {\r\n name: 'currentNumber',\r\n label: this.translatorService.Tranlate('INVOICE_RANGE_CURRENT_NUMBER', 'Numar curent'),\r\n options: {\r\n filter: false,\r\n customBodyRender: (value: number | null, tableMeta: MUIDataTableMeta) => {\r\n return R.isNil(value) ? '' : value;\r\n }\r\n }\r\n },\r\n {\r\n name: 'endingNumber',\r\n label: this.translatorService.Tranlate('INVOICE_RANGE_ENDING_NUMBER', 'Numar sfarsit'),\r\n options: {\r\n filter: false,\r\n customBodyRender: (value: number, tableMeta: MUIDataTableMeta) => {\r\n return value;\r\n }\r\n }\r\n },\r\n {\r\n name: 'lastSeries',\r\n label: this.translatorService.Tranlate('INVOICE_RANGE_LAST_SERIES', 'Serie 2'),\r\n options: {\r\n filter: false,\r\n customBodyRender: (value: string, tableMeta: MUIDataTableMeta) => {\r\n return value;\r\n }\r\n }\r\n },\r\n {\r\n name: 'invoiceRangeStatus',\r\n label: this.translatorService.Tranlate(\r\n 'INVOICE_RANGE_STATUS',\r\n 'Status'\r\n ),\r\n options: {\r\n sort: true,\r\n customSort: (a: IReferential, b: IReferential) => {\r\n return a.name!.localeCompare(b.name!);\r\n },\r\n customBodyRender: (value: IReferential) => {\r\n return value.name;\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: '',\r\n options: {\r\n viewColumns: false,\r\n filter: false,\r\n setCellHeaderProps: () => ({ align: 'center' }),\r\n setCellProps: () => ({ align: 'center' }),\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n const invoiceRange = this.state.invoiceRanges.find((item) => item.id === tableMeta.rowData[0]);\r\n\r\n return (\r\n <>\r\n this.newInvoiceRatePopup(tableMeta.rowData[0])}\r\n >\r\n \r\n \r\n this.deleteInvoiceRate(e, tableMeta)}\r\n >\r\n \r\n \r\n \r\n );\r\n }\r\n }\r\n }];\r\n\r\n return columns;\r\n };\r\n\r\n deleteInvoiceRate = async (event: any, tableMeta: MUIDataTableMeta) => {\r\n try {\r\n const id = tableMeta.rowData[0];\r\n\r\n await this.vehicleService.RemoveInvoiceRange(id);\r\n\r\n await this.loadInvoiceRanges();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n\r\n newInvoiceRatePopup = async (invoiceRateId: number | null) => {\r\n let newInvoiceRange: InvoiceRange;\r\n if (invoiceRateId == null) {\r\n newInvoiceRange = { ...this.state.newInvoiceRange } as InvoiceRange;\r\n } else {\r\n newInvoiceRange = this.state.invoiceRanges.find((item) => item.id === invoiceRateId)!;\r\n }\r\n this.setState({\r\n isDialogOpen: true,\r\n newInvoiceRange: newInvoiceRange,\r\n newInvoiceRangeId: invoiceRateId\r\n });\r\n };\r\n\r\n closeDialog = async () => {\r\n this.setState(\r\n { \r\n isDialogOpen: false, \r\n newInvoiceRange: this.newInvoiceRange ,\r\n newInvoiceRangeId: null\r\n }\r\n );\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.vehicleService = (this.context as AppContext).vehicleService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n const options = {\r\n filter: true,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n sort: false,\r\n customToolbar: () => {\r\n return (\r\n \r\n this.newInvoiceRatePopup(null)}\r\n >\r\n \r\n \r\n \r\n );\r\n }\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n ) : null}\r\n
\r\n {this.state.isDialogOpen ? (\r\n \r\n \r\n \r\n \r\n \r\n {!this.state.newInvoiceRangeId ? \r\n this.translatorService.Tranlate(\r\n 'INVOICE_RANGE_NEW_MODAL_TITLE',\r\n 'Adauga plaja avize/facturi'\r\n ) : this.translatorService.Tranlate(\r\n 'INVOICE_RANGE_UPDATE_MODAL_TITLE',\r\n 'Actualizeaza plaja avize/facturi'\r\n )} \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.renderAddForm()}\r\n \r\n \r\n ) : (\r\n ''\r\n )}\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app\r\n }),\r\n null\r\n)(withSnackbar(InvoiceRangeList as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport {\r\n Tooltip,\r\n Box,\r\n Button,\r\n IconButton,\r\n Dialog,\r\n DialogTitle,\r\n Grid,\r\n Typography,\r\n DialogContent\r\n} from '@material-ui/core';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport AddCircleTwoToneIcon from '@material-ui/icons/AddCircleTwoTone';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport MUIDataTable, {\r\n SelectableRows,\r\n MUIDataTableMeta,\r\n MUIDataTableColumnOptions\r\n} from 'mui-datatables';\r\nimport { MUITranslations } from '../../../helpers/MUITableTranslations';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport DeleteOutlineTwoToneIcon from '@material-ui/icons/DeleteOutlineTwoTone';\r\nimport { IReferential } from '../../../interfaces/IReferential';\r\nimport moment from 'moment';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport EditOutlinedIcon from '@material-ui/icons/EditOutlined';\r\nimport NumberFormat from 'react-number-format';\r\nimport { IVehicleService } from '../../../services/Interfaces/IVehicleService';\r\nimport { Provenance } from '../../../interfaces/Vehicle';\r\n\r\ninterface IProvenanceListState {\r\n newProvenance: Provenance;\r\n provenances: Provenance[];\r\n isLoading: boolean;\r\n isDialogOpen: boolean;\r\n newProvenanceId: number | null;\r\n}\r\n\r\n\r\ntype IProvenanceListProps = { appState: AppState } & ProviderContext &\r\n RouteComponentProps<{ id: string; workflowId: string }>;\r\n\r\nclass ProvenanceList extends React.PureComponent<\r\n IProvenanceListProps,\r\n IProvenanceListState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private vehicleService!: IVehicleService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n\r\n static contextType = ApplicationContext;\r\n private newProvenance = {\r\n id: 0,\r\n type: null,\r\n account: null\r\n } as unknown as Provenance;\r\n\r\n state = {\r\n provenances: [],\r\n isLoading: false,\r\n selectedFilter: 0,\r\n isDialogOpen: false,\r\n newProvenance: this.newProvenance,\r\n newProvenanceId: null\r\n } as IProvenanceListState;\r\n\r\n public componentDidMount() {\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadProvenance();\r\n }\r\n );\r\n }\r\n\r\n loadProvenance = async () => {\r\n const provenances = await this.vehicleService.GetProvenances();\r\n\r\n this.setState({\r\n provenances: provenances,\r\n isLoading: false,\r\n newProvenance: { ...this.newProvenance }\r\n });\r\n };\r\n\r\n\r\n public saveProvenance = async () => {\r\n if (this.state.newProvenanceId === null) {\r\n try {\r\n await this.vehicleService.AddProvenance(this.state.newProvenance);\r\n\r\n await this.loadProvenance();\r\n\r\n this.closeDialog();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n } else {\r\n try {\r\n\r\n await this.vehicleService.UpdateProvenance(this.state.newProvenance);\r\n\r\n await this.loadProvenance();\r\n\r\n this.closeDialog();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n\r\n onChange =\r\n (fieldName: string, isNumber: boolean) => (e: any, newValue?: IReferential | null) => {\r\n isNumber\r\n ? this.setState({\r\n newProvenance: {\r\n ...this.state.newProvenance,\r\n [fieldName]: parseFloat(newValue || e.target.value)\r\n }\r\n })\r\n : this.setState({\r\n newProvenance: {\r\n ...this.state.newProvenance,\r\n [fieldName]: newValue || e.target.value\r\n }\r\n });\r\n };\r\n \r\n NumberFormatCustom = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n },\r\n currentTarget: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n allowNegative={false}\r\n thousandSeparator={false}\r\n decimalScale={0}\r\n />\r\n );\r\n };\r\n\r\n\r\n public renderAddForm() {\r\n return (\r\n \r\n \r\n this.onChange('type', false)(e)\r\n }\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n label={this.translatorService.Tranlate('PROVENANCE_TYPE', 'Tip')}\r\n />\r\n\r\n this.onChange('account', false)(e)}\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n label={this.translatorService.Tranlate('PROVENANCE_ACCOUNT', 'Cont Contabil')}\r\n />\r\n
\r\n \r\n {this.translatorService.Tranlate('EDIT_ORGANIZATION_CANCEL_BTN', 'Anuleaza')}\r\n \r\n \r\n
\r\n
\r\n );\r\n }\r\n\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'type',\r\n label: this.translatorService.Tranlate('PROVENANCE_TYPE', 'Tip'),\r\n options: {\r\n filter: false,\r\n customBodyRender: (value: string, tableMeta: MUIDataTableMeta) => {\r\n return value;\r\n }\r\n }\r\n },\r\n {\r\n name: 'account',\r\n label: this.translatorService.Tranlate('PROVENANCE_ACCOUNT', 'Cont contabil'),\r\n options: {\r\n filter: false,\r\n customBodyRender: (value: string, tableMeta: MUIDataTableMeta) => {\r\n return value;\r\n }\r\n }\r\n },\r\n {\r\n name: 'dateModification',\r\n label: this.translatorService.Tranlate('USERS_DATE_MODIFICATION_HEADER', 'Data Modificare'),\r\n options: {\r\n filter: false,\r\n sortDirection: 'desc',\r\n customBodyRender: (value: Date) =>\r\n moment.utc(value).local().format(this.props.appState.longDateFormat)\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: '',\r\n options: {\r\n viewColumns: false,\r\n filter: false,\r\n setCellHeaderProps: () => ({ align: 'center' }),\r\n setCellProps: () => ({ align: 'center' }),\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n <>\r\n this.newProvenancePopup(tableMeta.rowData[0])}\r\n >\r\n \r\n \r\n this.deleteProvenance(e, tableMeta)}\r\n >\r\n \r\n \r\n \r\n );\r\n }\r\n }\r\n }];\r\n\r\n return columns;\r\n };\r\n\r\n deleteProvenance = async (event: any, tableMeta: MUIDataTableMeta) => {\r\n try {\r\n const id = tableMeta.rowData[0];\r\n await this.vehicleService.RemoveProvenance(id);\r\n\r\n await this.loadProvenance();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n\r\n newProvenancePopup = async (provenanceId: number | null) => {\r\n let newProvenance: Provenance;\r\n if (provenanceId == null) {\r\n newProvenance = { ...this.state.newProvenance } as Provenance;\r\n } else {\r\n newProvenance = this.state.provenances.find((item) => item.id === provenanceId)!;\r\n }\r\n this.setState({\r\n isDialogOpen: true,\r\n newProvenance: newProvenance,\r\n newProvenanceId: provenanceId\r\n });\r\n };\r\n\r\n closeDialog = async () => {\r\n this.setState(\r\n { \r\n isDialogOpen: false, \r\n newProvenance: this.newProvenance,\r\n newProvenanceId: null\r\n }\r\n );\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.vehicleService = (this.context as AppContext).vehicleService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n const options = {\r\n filter: true,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n sort: false,\r\n customToolbar: () => {\r\n return (\r\n \r\n this.newProvenancePopup(null)}\r\n >\r\n \r\n \r\n \r\n );\r\n }\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n ) : null}\r\n
\r\n\r\n {this.state.isDialogOpen ? (\r\n \r\n \r\n \r\n \r\n \r\n {!this.state.newProvenanceId ? \r\n this.translatorService.Tranlate(\r\n 'PROVENANCE_NEW_MODAL_TITLE',\r\n 'Adauga tip provenienta si cont contabil'\r\n ) : this.translatorService.Tranlate(\r\n 'PROVENANCE_UPDATE_MODAL_TITLE',\r\n 'Actualizeaza tip provenienta si cont contabil'\r\n )} \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.renderAddForm()}\r\n \r\n \r\n ) : (\r\n ''\r\n )}\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app\r\n }),\r\n null\r\n)(withSnackbar(ProvenanceList as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport {\r\n Tooltip,\r\n Box,\r\n Button,\r\n IconButton,\r\n Dialog,\r\n DialogTitle,\r\n Grid,\r\n Typography,\r\n DialogContent\r\n} from '@material-ui/core';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport AddCircleTwoToneIcon from '@material-ui/icons/AddCircleTwoTone';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport MUIDataTable, {\r\n SelectableRows,\r\n MUIDataTableMeta,\r\n MUIDataTableColumnOptions\r\n} from 'mui-datatables';\r\nimport { MUITranslations } from '../../../helpers/MUITableTranslations';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport DeleteOutlineTwoToneIcon from '@material-ui/icons/DeleteOutlineTwoTone';\r\nimport { CurrencyCode } from '../../../helpers/Constants';\r\nimport { IReferential } from '../../../interfaces/IReferential';\r\nimport moment from 'moment';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport EditOutlinedIcon from '@material-ui/icons/EditOutlined';\r\nimport NumberFormat from 'react-number-format';\r\nimport { IVehicleService } from '../../../services/Interfaces/IVehicleService';\r\nimport { ExchangeRate } from '../../../interfaces/Vehicle';\r\nimport * as R from 'ramda';\r\nimport VisibilityOutlinedIcon from '@material-ui/icons/VisibilityOutlined';\r\nimport _ from 'lodash';\r\nimport { IAppUserService } from '../../../services/Interfaces/IAppUserService';\r\nimport { MuiPickersUtilsProvider, DatePicker } from '@material-ui/pickers';\r\nimport MomentUtils from '@date-io/moment';\r\nimport { MaterialUiPickersDate } from '@material-ui/pickers/typings/date';\r\n\r\ninterface IExchangeRateListState {\r\n newExchangeRate: ExchangeRate;\r\n currencyList: IReferential[];\r\n exchangeRates: ExchangeRate[];\r\n isLoading: boolean;\r\n isHistoryDialogOpen: boolean;\r\n isDialogOpen: boolean;\r\n newExchangeRateId: number | null;\r\n selectedExchangeRate: ExchangeRate | null;\r\n lastExchangeRate: ExchangeRate | null;\r\n}\r\n\r\ntype IExchangeRateListProps = { appState: AppState } & ProviderContext &\r\n RouteComponentProps<{ id: string; workflowId: string }>;\r\n\r\nclass LocalizedUtils extends MomentUtils {\r\n // dateFormat = \"DD MM YYYY\";\r\n}\r\nclass ExchangeRateList extends React.PureComponent<\r\n IExchangeRateListProps,\r\n IExchangeRateListState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private vehicleService!: IVehicleService;\r\n private appUserService!: IAppUserService;\r\n\r\n static contextType = ApplicationContext;\r\n private newExchangeRate = {\r\n id: 0,\r\n exchangeRatesHistory: [],\r\n exchangeRateHistory: {\r\n id: 0,\r\n currency: CurrencyCode.EUR,\r\n rate: null,\r\n date: null,\r\n startDate: moment(new Date()).startOf('day').format(\"YYYY-MM-DDTHH:mm:ss\") ,\r\n endDate: moment(new Date()).add(7, 'days').endOf('day').format('YYYY-MM-DDTHH:mm:ss'),\r\n exchangeRateId: 0\r\n }\r\n } as unknown as ExchangeRate;\r\n\r\n state = {\r\n currencyList: [],\r\n exchangeRates: [],\r\n isLoading: false,\r\n selectedFilter: 0,\r\n isDialogOpen: false,\r\n newExchangeRate: this.newExchangeRate,\r\n newExchangeRateId: null,\r\n selectedExchangeRate: null,\r\n isHistoryDialogOpen: false,\r\n lastExchangeRate: null\r\n } as IExchangeRateListState;\r\n\r\n public componentDidMount() {\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadExchangeRatesList();\r\n }\r\n );\r\n }\r\n\r\n loadExchangeRatesList = async () => {\r\n const exchangeRates = await this.vehicleService.GetExchangeRates();\r\n\r\n const createdByList : string[] = [];\r\n for (let i = 0; i < exchangeRates.length; i++) {\r\n createdByList.push(...(_.uniq(exchangeRates[i].exchangeRatesHistory.map((item) => item!.createdBy))));\r\n }\r\n const users = await this.appUserService.GetUsersInfo(_.uniq(createdByList));\r\n for (let i = 0; i < exchangeRates.length; i++) {\r\n const user = users.find((u) => u.id === exchangeRates[i].modifiedBy);\r\n exchangeRates[i].modifiedByUser = R.isNil(user) ? null : user;\r\n\r\n exchangeRates[i].exchangeRatesHistory.forEach((item) => {\r\n const user = users.find((u) => u.id === item.createdBy);\r\n item.createdByUser = R.isNil(user) ? null : user;\r\n });\r\n }\r\n\r\n const lastExchangeRate = _.sortBy(exchangeRates, 'dateCreation').reverse()[0];\r\n\r\n this.setState({\r\n isLoading: false,\r\n exchangeRates: exchangeRates,\r\n newExchangeRate: { ...this.newExchangeRate},\r\n lastExchangeRate: !R.isNil(lastExchangeRate) ? \r\n {\r\n ...lastExchangeRate,\r\n exchangeRateHistory: {\r\n ...lastExchangeRate.exchangeRateHistory,\r\n startDate: lastExchangeRate.exchangeRateHistory.startDate\r\n }\r\n } : null\r\n });\r\n };\r\n\r\n public saveExchangeRate = async () => {\r\n console.log(this.state.newExchangeRate.exchangeRateHistory);\r\n if (this.state.newExchangeRate.exchangeRateHistory.startDate &&\r\n this.state.newExchangeRate.exchangeRateHistory.endDate &&\r\n this.state.newExchangeRate.exchangeRateHistory.startDate >\r\n this.state.newExchangeRate.exchangeRateHistory.endDate) {\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('EXCHANGE_RATE_START_DATE_ERROR', 'Data de start trebuie sa fie mai mica decat data de stop'), {\r\n variant: 'error'\r\n });\r\n return;\r\n }\r\n\r\n console.log('Start Date', this.state.newExchangeRate.exchangeRateHistory.startDate);\r\n console.log('Previous Start Date', this.state.lastExchangeRate?.exchangeRateHistory.startDate);\r\n if (this.state.lastExchangeRate && this.state.lastExchangeRate.exchangeRateHistory.startDate && \r\n this.state.newExchangeRate.exchangeRateHistory.startDate < this.state.lastExchangeRate.exchangeRateHistory.startDate) {\r\n const previousStartDate = moment(new Date(this.state.lastExchangeRate.exchangeRateHistory.startDate)).format('DD.MM.YYYY');\r\n console.log('previousStartDate', previousStartDate);\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('EXCHANGE_RATE_START_DATE_ERROR_INFO', 'Data de start pentru urmatorul curs, nu poate fi mai mica decat data start a cursului precedent!')\r\n + ' ' + this.translatorService.Tranlate('EXCHANGE_RATE_START_DATE_PREVIOUS_LABEL', 'Data start curs precedent: ') + \r\n previousStartDate, {\r\n variant: 'error'\r\n });\r\n return;\r\n }\r\n \r\n if (this.state.newExchangeRateId === null) {\r\n try {\r\n const request = {\r\n exchangeRatesHistory: [\r\n this.state.newExchangeRate.exchangeRateHistory\r\n ]\r\n } as ExchangeRate;\r\n await this.vehicleService.AddExchangeRate(request);\r\n\r\n await this.loadExchangeRatesList();\r\n\r\n this.closeDialog();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n } else {\r\n try {\r\n const request = {\r\n id: this.state.newExchangeRateId,\r\n exchangeRatesHistory: [\r\n this.state.newExchangeRate.exchangeRateHistory\r\n ]\r\n } as ExchangeRate;\r\n await this.vehicleService.UpdateExchangeRate(request);\r\n\r\n await this.loadExchangeRatesList();\r\n\r\n this.closeDialog();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n \r\n NumberFormatCustom = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n },\r\n currentTarget: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n allowNegative={false}\r\n thousandSeparator={false}\r\n decimalScale={0}\r\n />\r\n );\r\n };\r\n \r\n onChange =\r\n (fieldName: string, isNumber: boolean) => (e: any, newValue?: IReferential | null) => {\r\n isNumber\r\n ? this.setState({\r\n newExchangeRate: {\r\n ...this.state.newExchangeRate,\r\n [fieldName]: parseFloat(newValue || e.target.value)\r\n }\r\n })\r\n : this.setState({\r\n newExchangeRate: {\r\n ...this.state.newExchangeRate,\r\n [fieldName]: newValue || e.target.value\r\n }\r\n });\r\n };\r\n\r\n handleStartDateDateChange = (\r\n date: MaterialUiPickersDate | null,\r\n value?: string | null\r\n ) => {\r\n if (date === null || !date.isValid) {\r\n return;\r\n }\r\n\r\n this.setState({\r\n newExchangeRate: {\r\n ...this.state.newExchangeRate,\r\n exchangeRateHistory: {\r\n ...this.state.newExchangeRate.exchangeRateHistory,\r\n startDate: date.startOf('day').format('YYYY-MM-DDTHH:mm:ss')\r\n }\r\n }\r\n });\r\n };\r\n\r\n handleEndDateDateChange = (date: MaterialUiPickersDate | null, value?: string | null) => {\r\n if (date === null || !date.isValid) {\r\n return;\r\n }\r\n\r\n this.setState({\r\n newExchangeRate: {\r\n ...this.state.newExchangeRate,\r\n exchangeRateHistory: {\r\n ...this.state.newExchangeRate.exchangeRateHistory,\r\n endDate: date.endOf('day').format('YYYY-MM-DDTHH:mm:ss') \r\n }\r\n }\r\n });\r\n };\r\n\r\n public renderAddForm() {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n this.state.newExchangeRate.exchangeRateHistory.endDate\r\n ? true\r\n : false\r\n }\r\n helperText={\r\n this.state.newExchangeRate.exchangeRateHistory.startDate &&\r\n this.state.newExchangeRate.exchangeRateHistory.endDate &&\r\n this.state.newExchangeRate.exchangeRateHistory.startDate >\r\n this.state.newExchangeRate.exchangeRateHistory.endDate\r\n ? this.translatorService.Tranlate(\r\n 'EXCHANGE_RATE_START_DATE_ERROR',\r\n 'Data de start trebuie sa fie mai mica decat data de stop'\r\n )\r\n : ''\r\n }\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n {\r\n this.setState({\r\n newExchangeRate: {\r\n ...this.state.newExchangeRate,\r\n exchangeRateHistory: {\r\n ...this.state.newExchangeRate.exchangeRateHistory,\r\n rate: parseFloat(e.target.value)\r\n }\r\n } \r\n });\r\n }}\r\n validators={['required', 'minNumber:1']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu'),\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n label={this.translatorService.Tranlate('EXCHANGE_RATE_VALUE', 'Curs valutar')}\r\n InputProps={{\r\n inputComponent: this.NumberFormatCustomCurrencyRate,\r\n style: { fontWeight: 500 }\r\n }}\r\n />\r\n \r\n \r\n \r\n
\r\n \r\n {this.translatorService.Tranlate('EDIT_ORGANIZATION_CANCEL_BTN', 'Anuleaza')}\r\n \r\n \r\n
\r\n
\r\n );\r\n }\r\n\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'exchangeRateHistory.rate',\r\n label: this.translatorService.Tranlate('EXCHANGE_RATE_VALUE', 'Curs valutar'),\r\n options: {\r\n filter: false,\r\n customBodyRender: (value: number) => {\r\n return value;\r\n }\r\n }\r\n },\r\n {\r\n name: 'exchangeRateHistory.currency',\r\n label: this.translatorService.Tranlate('EXCHANGE_RATE_CURRENCY', 'Moneda'),\r\n options: {\r\n filter: false,\r\n customBodyRender: (value: string) => {\r\n return value;\r\n }\r\n }\r\n },\r\n {\r\n name: 'exchangeRateHistory.startDate',\r\n label: this.translatorService.Tranlate('EXCHANGE_RATE_START_DATE', 'Data start'),\r\n options: {\r\n sort: false,\r\n filter: false,\r\n customBodyRender: (value: any) => {\r\n return (\r\n \r\n \r\n
\r\n {value ? moment.utc(value)\r\n .local()\r\n .format(\"DD.MM.YYYY\") : null}\r\n
\r\n
\r\n
\r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'exchangeRateHistory.endDate',\r\n label: this.translatorService.Tranlate('EXCHANGE_RATE_END_DATE', 'Data stop'),\r\n options: {\r\n sort: false,\r\n filter: false,\r\n customBodyRender: (value: any) => {\r\n return (\r\n \r\n \r\n
\r\n {value ? moment(value).format(\"DD.MM.YYYY HH:mm:ss\") : null}\r\n
\r\n
\r\n
\r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'exchangeRateHistory.currencyRate',\r\n label: this.translatorService.Tranlate('EXCHANGE_BNR_CURRENCY_RATE', 'Curs BNR'),\r\n options: {\r\n filter: false,\r\n customBodyRender: (value: string) => {\r\n return value;\r\n }\r\n }\r\n },\r\n {\r\n name: 'exchangeRateHistory.currencyDate',\r\n label: this.translatorService.Tranlate('EXCHANGE_BNR_CURRENCY_DATE', 'Data curs BNR'),\r\n options: {\r\n sort: false,\r\n filter: false,\r\n customBodyRender: (value: any) => {\r\n return (\r\n \r\n \r\n
\r\n {value ? moment(value).format(\"DD.MM.YYYY\") : null}\r\n
\r\n
\r\n
\r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'dateCreation',\r\n label: this.translatorService.Tranlate('USER_ROLE_DATE_CREATION_HEADER', 'Data Creare'),\r\n options: {\r\n sortDirection: 'desc',\r\n customBodyRender: (value: Date) =>\r\n moment.utc(value).local().format(this.props.appState.longDateFormat)\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'modifiedByUser.userName',\r\n label: this.translatorService.Tranlate('EXCHANGE_RATE_MODIFIED_BY_HEADER', 'Modificat de'),\r\n options: {\r\n filter: false\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: '',\r\n options: {\r\n viewColumns: false,\r\n filter: false,\r\n setCellHeaderProps: () => ({ align: 'center' }),\r\n setCellProps: () => ({ align: 'center' }),\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n <>\r\n this.newExchangeRatePopup(tableMeta.rowData[0])}\r\n >\r\n \r\n \r\n this.viewHistory(e, tableMeta)}\r\n >\r\n \r\n \r\n this.deleteExchangeRate(e, tableMeta)}\r\n >\r\n \r\n \r\n \r\n );\r\n }\r\n }\r\n }];\r\n\r\n return columns;\r\n };\r\n\r\n deleteExchangeRate = async (event: any, tableMeta: MUIDataTableMeta) => {\r\n try {\r\n const id = tableMeta.rowData[0];\r\n\r\n await this.vehicleService.RemoveExchangeRate(id);\r\n\r\n await this.loadExchangeRatesList();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n\r\n NumberFormatCustomCurrencyRate = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n },\r\n currentTarget: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n allowNegative={false}\r\n thousandSeparator={false}\r\n decimalScale={4}\r\n />\r\n );\r\n };\r\n \r\n showExchangeTimeline = (id: number) => {\r\n const exchangeRate = this.state.exchangeRates.find((item) => item.id === id)!;\r\n\r\n return exchangeRate.exchangeRatesHistory.map((exchangeRateHistory, index) => {\r\n return (\r\n
\r\n
\r\n
\r\n

\r\n {moment.utc(exchangeRateHistory.date).local().format(this.props.appState.longDateFormat)}{' '}\r\n {' (' + exchangeRateHistory.createdByUser!.email + ')'}\r\n

\r\n

\r\n {this.translatorService.Tranlate('EXCHANGE_RATE_VALUE', 'Valoare')}: {' '} \r\n {exchangeRateHistory.rate}\r\n

\r\n

\r\n {this.translatorService.Tranlate('EXCHANGE_RATE_START_DATE', 'Data start')}: {' '} \r\n {moment.utc(exchangeRateHistory.startDate).local().format(\"DD.MM.YYYY\")}\r\n

\r\n

\r\n {this.translatorService.Tranlate('EXCHANGE_RATE_END_DATE', 'Data sfarsit')}: {' '} \r\n {moment(exchangeRateHistory.endDate).format(\"DD.MM.YYYY HH:mm:ss\")}\r\n

\r\n
\r\n
\r\n );\r\n });\r\n };\r\n\r\n public renderViewHistory() {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n {this.translatorService.Tranlate('EXCHANGE_RATE_HISTORY_MODAL_TITLE','Istoric curs valutar')} \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {this.showExchangeTimeline(this.state.selectedExchangeRate!.id)}\r\n
\r\n
\r\n \r\n );\r\n }\r\n\r\n viewHistory = async (event: any, tableMeta: MUIDataTableMeta) => {\r\n const id = tableMeta.rowData[0];\r\n this.setState({\r\n selectedExchangeRate: this.state.exchangeRates.find((item) => item.id === id)!,\r\n isHistoryDialogOpen: true\r\n })\r\n };\r\n\r\n\r\n newExchangeRatePopup = async (exchangeRateId: number | null) => {\r\n let newExchangeRate: ExchangeRate;\r\n if (exchangeRateId == null) {\r\n newExchangeRate = { ...this.state.newExchangeRate } as ExchangeRate;\r\n } else {\r\n newExchangeRate = this.state.exchangeRates.find((item) => item.id === exchangeRateId)!;\r\n }\r\n this.setState({\r\n isDialogOpen: true,\r\n newExchangeRate: newExchangeRate,\r\n newExchangeRateId: exchangeRateId\r\n });\r\n };\r\n\r\n closeDialog = async () => {\r\n this.setState(\r\n { \r\n isDialogOpen: false, \r\n newExchangeRate: this.newExchangeRate,\r\n newExchangeRateId: null\r\n }\r\n );\r\n };\r\n\r\n closeHistoryDialog = async () => {\r\n this.setState(\r\n { \r\n isHistoryDialogOpen: false, \r\n selectedExchangeRate: null\r\n }\r\n );\r\n }\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.vehicleService = (this.context as AppContext).vehicleService;\r\n this.appUserService = (this.context as AppContext).appUserService;\r\n\r\n const options = {\r\n filter: true,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n sort: false,\r\n customToolbar: () => {\r\n return (\r\n \r\n this.newExchangeRatePopup(null)}\r\n >\r\n \r\n \r\n \r\n );\r\n }\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n ) : null}\r\n
\r\n {this.state.isDialogOpen ? (\r\n \r\n \r\n \r\n \r\n \r\n {!this.state.newExchangeRateId ? \r\n this.translatorService.Tranlate(\r\n 'EXCHANGE_RATE_NEW_MODAL_TITLE',\r\n 'Adauga curs valutar'\r\n ) : this.translatorService.Tranlate(\r\n 'EXCHANGE_RATE_UPDATE_MODAL_TITLE',\r\n 'Actualizeaza curs valutar'\r\n )} \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.renderAddForm()}\r\n \r\n \r\n ) : (\r\n ''\r\n )}\r\n {this.state.isHistoryDialogOpen ? this.renderViewHistory() : null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app\r\n }),\r\n null\r\n)(withSnackbar(ExchangeRateList as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport {\r\n Box\r\n} from '@material-ui/core';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport MUIDataTable, {\r\n SelectableRows,\r\n MUIDataTableMeta,\r\n MUIDataTableColumnOptions\r\n} from 'mui-datatables';\r\nimport { MUITranslations } from '../../../helpers/MUITableTranslations';\r\nimport NumberFormat from 'react-number-format';\r\nimport { IVehicleService } from '../../../services/Interfaces/IVehicleService';\r\nimport { AlcorErrorLog } from '../../../interfaces/Vehicle';\r\nimport { IReferential } from '../../../interfaces/IReferential';\r\nimport moment from 'moment';\r\n\r\ninterface IAlcorErrorLogListState {\r\n alcorErrors: AlcorErrorLog[];\r\n isLoading: boolean;\r\n}\r\n\r\ntype IAlcorErrorLogListProps = { appState: AppState } & ProviderContext &\r\n RouteComponentProps<{ id: string; workflowId: string }>;\r\n\r\nclass AlcorErrorLogList extends React.PureComponent<\r\n IAlcorErrorLogListProps,\r\n IAlcorErrorLogListState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private vehicleService!: IVehicleService;\r\n\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n alcorErrors: [],\r\n isLoading: false,\r\n selectedFilter: 0,\r\n isDialogOpen: false,\r\n } as IAlcorErrorLogListState;\r\n\r\n public componentDidMount() {\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadAlcorErrorLogs();\r\n }\r\n );\r\n }\r\n\r\n loadAlcorErrorLogs = async () => {\r\n const alcorErrors = await this.vehicleService.GetAlcorErrorLogs();\r\n\r\n this.setState({\r\n alcorErrors: alcorErrors,\r\n isLoading: false\r\n });\r\n };\r\n\r\n \r\n NumberFormatCustom = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n },\r\n currentTarget: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n allowNegative={false}\r\n thousandSeparator={false}\r\n decimalScale={0}\r\n />\r\n );\r\n };\r\n\r\n\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'invoiceRangeType',\r\n label: this.translatorService.Tranlate(\r\n 'INVOICE_RANGE_TYPE',\r\n 'Tip'\r\n ),\r\n options: {\r\n sort: true,\r\n customSort: (a: IReferential, b: IReferential) => {\r\n return a.name!.localeCompare(b.name!);\r\n },\r\n customBodyRender: (value: IReferential) => {\r\n return value.name;\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'number',\r\n label: this.translatorService.Tranlate('ALCOR_ERROR_NUMBER', 'Numar'),\r\n options: {\r\n filter: false,\r\n customBodyRender: (value: string, tableMeta: MUIDataTableMeta) => {\r\n return value;\r\n }\r\n }\r\n },\r\n {\r\n name: 'message',\r\n label: this.translatorService.Tranlate('ALCOR_ERROR_CAUSE', 'Cauza'),\r\n options: {\r\n filter: false,\r\n customBodyRender: (value: string, tableMeta: MUIDataTableMeta) => {\r\n return value;\r\n }\r\n }\r\n },\r\n {\r\n name: 'dateModification',\r\n label: this.translatorService.Tranlate('USERS_DATE_MODIFICATION_HEADER', 'Data Modificare'),\r\n options: {\r\n filter: false,\r\n sortDirection: 'desc',\r\n customBodyRender: (value: Date) =>\r\n moment.utc(value).local().format(this.props.appState.longDateFormat)\r\n } as MUIDataTableColumnOptions\r\n }\r\n ];\r\n\r\n return columns;\r\n };\r\n\r\n\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.vehicleService = (this.context as AppContext).vehicleService;\r\n\r\n const options = {\r\n filter: true,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n sort: false\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n ) : null}\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app\r\n }),\r\n null\r\n)(withSnackbar(AlcorErrorLogList as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport {\r\n Tooltip,\r\n Box,\r\n Button,\r\n IconButton,\r\n Dialog,\r\n DialogTitle,\r\n Grid,\r\n Typography,\r\n DialogContent\r\n} from '@material-ui/core';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport AddCircleTwoToneIcon from '@material-ui/icons/AddCircleTwoTone';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport MUIDataTable, {\r\n SelectableRows,\r\n MUIDataTableMeta,\r\n MUIDataTableColumnOptions\r\n} from 'mui-datatables';\r\nimport { MUITranslations } from '../../../helpers/MUITableTranslations';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport DeleteOutlineTwoToneIcon from '@material-ui/icons/DeleteOutlineTwoTone';\r\nimport { RefConstants } from '../../../helpers/Constants';\r\nimport { IReferential } from '../../../interfaces/IReferential';\r\nimport moment from 'moment';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport EditOutlinedIcon from '@material-ui/icons/EditOutlined';\r\nimport NumberFormat from 'react-number-format';\r\nimport { IVehicleService } from '../../../services/Interfaces/IVehicleService';\r\nimport { FinancialParameterInfo } from '../../../interfaces/Vehicle';\r\n\r\ninterface IFinancialParameterInfoListState {\r\n newFinancialParameterInfo: FinancialParameterInfo;\r\n financialParameters: IReferential[];\r\n financialParametersInfoList: FinancialParameterInfo[];\r\n isLoading: boolean;\r\n isDialogOpen: boolean;\r\n newFinancialParameterInfoId: number | null;\r\n}\r\n\r\ntype IFinancialParameterInfoListProps = { appState: AppState } & ProviderContext &\r\n RouteComponentProps<{ id: string; workflowId: string }>;\r\n\r\nclass FinancialParameterInfoList extends React.PureComponent<\r\n IFinancialParameterInfoListProps,\r\n IFinancialParameterInfoListState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private vehicleService!: IVehicleService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n\r\n static contextType = ApplicationContext;\r\n private newFinancialParameterInfo = {\r\n id: 0,\r\n value: '',\r\n financialParameterId: null,\r\n financialParameter: null\r\n } as unknown as FinancialParameterInfo;\r\n\r\n state = {\r\n financialParameters: [],\r\n isLoading: false,\r\n selectedFilter: 0,\r\n isDialogOpen: false,\r\n newFinancialParameterInfo: this.newFinancialParameterInfo,\r\n financialParametersInfoList: [],\r\n newFinancialParameterInfoId: null\r\n } as IFinancialParameterInfoListState;\r\n\r\n public componentDidMount() {\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadFinancialParameterInfoList();\r\n }\r\n );\r\n }\r\n\r\n loadFinancialParameterInfoList = async () => {\r\n const financialParametersInfoList = await this.vehicleService.GetFinancialParameterInfoList();\r\n const { financialParameterRef } = RefConstants;\r\n\r\n const financialParameters = await this.appReferentialService.Get(financialParameterRef!.baseUrl);\r\n\r\n\r\n this.setState({\r\n financialParameters: financialParameters,\r\n isLoading: false,\r\n financialParametersInfoList: financialParametersInfoList,\r\n newFinancialParameterInfo: { ...this.newFinancialParameterInfo }\r\n });\r\n };\r\n\r\n private handleFinancialParameterChange = (newValue: IReferential | null) => {\r\n this.setState({\r\n newFinancialParameterInfo: {\r\n ...this.state.newFinancialParameterInfo,\r\n financialParameter: newValue,\r\n financialParameterId: newValue !== null ? newValue!.id : 0\r\n }\r\n });\r\n };\r\n\r\n public saveFinancialParameterInfo = async () => {\r\n if (this.state.newFinancialParameterInfoId === null) {\r\n try {\r\n await this.vehicleService.AddFinancialParameterInfo(this.state.newFinancialParameterInfo);\r\n\r\n await this.loadFinancialParameterInfoList();\r\n\r\n this.closeDialog();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n } else {\r\n try {\r\n\r\n await this.vehicleService.UpdateFinancialParameterInfo(this.state.newFinancialParameterInfo);\r\n\r\n await this.loadFinancialParameterInfoList();\r\n\r\n this.closeDialog();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n \r\n \r\n NumberFormatCustom = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n },\r\n currentTarget: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n allowNegative={false}\r\n thousandSeparator={false}\r\n decimalScale={0}\r\n />\r\n );\r\n };\r\n \r\n onChange =\r\n (fieldName: string, isNumber: boolean) => (e: any, newValue?: IReferential | null) => {\r\n isNumber\r\n ? this.setState({\r\n newFinancialParameterInfo: {\r\n ...this.state.newFinancialParameterInfo,\r\n [fieldName]: parseFloat(newValue || e.target.value)\r\n }\r\n })\r\n : this.setState({\r\n newFinancialParameterInfo: {\r\n ...this.state.newFinancialParameterInfo,\r\n [fieldName]: newValue || e.target.value\r\n }\r\n });\r\n };\r\n\r\n public renderAddForm() {\r\n return (\r\n \r\n \r\n this.handleFinancialParameterChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n /> \r\n\r\n \r\n this.onChange('value', false)(e)\r\n }\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n label={this.translatorService.Tranlate('FINANCIAL_PARAMETER_INFO_VALUE', 'Valoare')}\r\n />\r\n\r\n \r\n
\r\n \r\n {this.translatorService.Tranlate('EDIT_ORGANIZATION_CANCEL_BTN', 'Anuleaza')}\r\n \r\n \r\n
\r\n
\r\n );\r\n }\r\n\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'financialParameter',\r\n label: this.translatorService.Tranlate(\r\n 'FINANCIAL_PARAMETER_INFO_FINANCIAL_PARAMETER',\r\n 'Parametru financiar'\r\n ),\r\n options: {\r\n sort: true,\r\n customSort: (a: IReferential, b: IReferential) => {\r\n return a.displayName!.localeCompare(b.displayName!);\r\n },\r\n customBodyRender: (value: IReferential) => {\r\n return value.displayName;\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'value',\r\n label: this.translatorService.Tranlate('FINANCIAL_PARAMETER_INFO_VALUE', 'Valoare'),\r\n options: {\r\n filter: false,\r\n customBodyRender: (value: string, tableMeta: MUIDataTableMeta) => {\r\n return value;\r\n }\r\n }\r\n },\r\n {\r\n name: 'dateModification',\r\n label: this.translatorService.Tranlate('USERS_DATE_MODIFICATION_HEADER', 'Data Modificare'),\r\n options: {\r\n filter: false,\r\n sortDirection: 'desc',\r\n customBodyRender: (value: Date) =>\r\n moment.utc(value).local().format(this.props.appState.longDateFormat)\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: '',\r\n options: {\r\n viewColumns: false,\r\n filter: false,\r\n setCellHeaderProps: () => ({ align: 'center' }),\r\n setCellProps: () => ({ align: 'center' }),\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n const financialParameterInfo = this.state.financialParametersInfoList.find((item) => item.id === tableMeta.rowData[0]);\r\n\r\n return (\r\n <>\r\n this.newFinancialParameterInfoPopup(tableMeta.rowData[0])}\r\n >\r\n \r\n \r\n this.deleteFinancialParameterInfo(e, tableMeta)}\r\n >\r\n \r\n \r\n \r\n );\r\n }\r\n }\r\n }];\r\n\r\n return columns;\r\n };\r\n\r\n deleteFinancialParameterInfo = async (event: any, tableMeta: MUIDataTableMeta) => {\r\n try {\r\n const id = tableMeta.rowData[0];\r\n\r\n await this.vehicleService.RemoveFinancialParameterInfo(id);\r\n\r\n await this.loadFinancialParameterInfoList();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n\r\n newFinancialParameterInfoPopup = async (financialParameterInfoId: number | null) => {\r\n let newFinancialParameterInfo: FinancialParameterInfo;\r\n if (financialParameterInfoId == null) {\r\n newFinancialParameterInfo = { ...this.state.newFinancialParameterInfo } as FinancialParameterInfo;\r\n } else {\r\n newFinancialParameterInfo = this.state.financialParametersInfoList.find((item) => item.id === financialParameterInfoId)!;\r\n }\r\n this.setState({\r\n isDialogOpen: true,\r\n newFinancialParameterInfo: newFinancialParameterInfo,\r\n newFinancialParameterInfoId: financialParameterInfoId\r\n });\r\n };\r\n\r\n closeDialog = () => {\r\n this.setState(\r\n { \r\n isDialogOpen: false, \r\n newFinancialParameterInfo: this.newFinancialParameterInfo,\r\n newFinancialParameterInfoId: null\r\n }\r\n );\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.vehicleService = (this.context as AppContext).vehicleService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n const options = {\r\n filter: true,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n sort: false,\r\n customToolbar: () => {\r\n return (\r\n \r\n this.newFinancialParameterInfoPopup(null)}\r\n >\r\n \r\n \r\n \r\n );\r\n }\r\n };\r\n\r\n return (\r\n \r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n ) : null}\r\n
\r\n {this.state.isDialogOpen ? (\r\n \r\n \r\n \r\n \r\n \r\n {!this.state.newFinancialParameterInfoId ? \r\n this.translatorService.Tranlate(\r\n 'FINANCIAL_PARAMETER_INFO_NEW_MODAL_TITLE',\r\n 'Adauga parametru financiar'\r\n ) : this.translatorService.Tranlate(\r\n 'FINANCIAL_PARAMETER_INFO_UPDATE_MODAL_TITLE',\r\n 'Actualizeaza parametru financiar'\r\n )} \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.renderAddForm()}\r\n \r\n \r\n ) : (\r\n ''\r\n )}\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app\r\n }),\r\n null\r\n)(withSnackbar(FinancialParameterInfoList as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport {\r\n Box,\r\n Button,\r\n Grid,\r\n CardContent,\r\n Card\r\n} from '@material-ui/core';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport NumberFormat from 'react-number-format';\r\nimport { isNullOrUndefined } from 'util';\r\nimport { DropzoneArea } from 'material-ui-dropzone';\r\nimport { SellerData } from '../../../interfaces/Organization';\r\nimport { IOrganizationService } from '../../../services/Interfaces/IOrganizationService';\r\nimport { IReferential } from '../../../interfaces/IReferential';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport Referentials from '../../../helpers/Referentials.json';\r\nimport { ReferentialCode } from '../../../helpers/Constants';\r\nimport { Autocomplete } from '@material-ui/lab';\r\n\r\ninterface ISellerDataListState {\r\n sellerData: SellerData;\r\n sellerDataList: SellerData[];\r\n isLoading: boolean;\r\n isDialogLoading: boolean;\r\n isDialogOpen: boolean;\r\n countryList: IReferential[];\r\n regionList: IReferential[];\r\n cityList: IReferential[];\r\n}\r\n\r\ntype ISellerDataListProps = { appState: AppState } & ProviderContext &\r\n RouteComponentProps<{ id: string; workflowId: string }>;\r\n\r\nclass SellerDataList extends React.PureComponent<\r\n ISellerDataListProps,\r\n ISellerDataListState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private organizationService!: IOrganizationService;\r\n private appReferentialService!: IReferentialService;\r\n static contextType = ApplicationContext;\r\n private sellerData = {\r\n id: 0,\r\n name: '',\r\n country: null,\r\n countryId: null,\r\n region: null,\r\n regionId: null,\r\n city: null,\r\n cityId: null,\r\n address: '',\r\n address2: '',\r\n address3: '',\r\n companyNumber: '',\r\n registryNumber: '',\r\n bank: '',\r\n bankAccount: '',\r\n postalCode: ''\r\n } as SellerData;\r\n\r\n state = {\r\n sellerData: {\r\n id: 0,\r\n name: '',\r\n country: null,\r\n countryId: null,\r\n region: null,\r\n regionId: null,\r\n city: null,\r\n cityId: null,\r\n address: '',\r\n address2: '',\r\n address3: '',\r\n companyNumber: '',\r\n registryNumber: '',\r\n bank: '',\r\n bankAccount: '',\r\n postalCode: ''\r\n } as SellerData,\r\n sellerDataList: [],\r\n isLoading: false,\r\n selectedFilter: 0,\r\n isDialogOpen: false,\r\n isDialogLoading: false,\r\n countryList: [],\r\n regionList: [],\r\n cityList: []\r\n } as ISellerDataListState;\r\n\r\n public componentDidMount() {\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadSellerDataList();\r\n }\r\n );\r\n }\r\n\r\n loadSellerDataList = async () => {\r\n const countryRef = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.Country\r\n );\r\n const regionRef = Referentials.referential.find((item) => item.code === ReferentialCode.Region);\r\n const cityRef = Referentials.referential.find((item) => item.code === ReferentialCode.City);\r\n\r\n const [sellerDataList, countryList, regionList, cityList] = await Promise.all([\r\n this.organizationService.GetSellerDataList(),\r\n this.appReferentialService.Get(countryRef!.baseUrl),\r\n this.appReferentialService.Get(regionRef!.baseUrl),\r\n this.appReferentialService.Get(cityRef!.baseUrl)\r\n ]);\r\n\r\n const sellerData = sellerDataList.length > 0 ? sellerDataList[0] : this.sellerData;\r\n const image = sellerData.id === 0 ? null : await this.organizationService.GetSellerLogo(sellerData.id);\r\n\r\n this.setState({\r\n sellerDataList: sellerDataList,\r\n sellerData: image == null ? sellerData : { ...sellerData, image: new File([image], 'logo')},\r\n isLoading: false,\r\n countryList: countryList,\r\n regionList: regionList,\r\n cityList: cityList\r\n });\r\n };\r\n\r\n\r\n public saveSellerData = async () => {\r\n let sellerId = this.state.sellerData.id;\r\n try {\r\n if (this.state.sellerData.id === 0) {\r\n const sellerData = await this.organizationService.AddSellerData(this.state.sellerData);\r\n sellerId = sellerData.id;\r\n } else {\r\n await this.organizationService.UpdateSellerData(this.state.sellerData);\r\n }\r\n\r\n await this.saveImage(sellerId, this.state.sellerData.image);\r\n\r\n await this.loadSellerDataList();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n \r\n \r\n NumberFormatCustom = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n },\r\n currentTarget: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n allowNegative={false}\r\n thousandSeparator={false}\r\n decimalScale={2}\r\n />\r\n );\r\n };\r\n \r\n\r\n private handleTextChange = (event: React.ChangeEvent) => {\r\n let value: any;\r\n if (event.target.type === 'text') {\r\n value = event.currentTarget.value;\r\n }\r\n this.setState({\r\n sellerData: {\r\n ...this.state.sellerData,\r\n [event.target.id]: value\r\n }\r\n });\r\n };\r\n\r\n handleUploadAttachment = async (files: File[]) => {\r\n if (files.length === 0) {\r\n return;\r\n }\r\n\r\n const img = new Image();\r\n img.src = window.URL.createObjectURL(files[0]);\r\n img.onload = async () => {\r\n this.setState({\r\n sellerData: {\r\n ...this.state.sellerData,\r\n image: files![0]\r\n }\r\n }); \r\n return;\r\n };\r\n };\r\n\r\n\r\n \r\n saveImage = async (sellerId: number, image: File) => {\r\n if (sellerId === 0) {\r\n return;\r\n }\r\n\r\n if (image === null) {\r\n return;\r\n }\r\n\r\n try {\r\n await this.organizationService.AddSellerLogo(sellerId, image);\r\n\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n private handleCountryChange = (newValue: IReferential | null) => {\r\n const countryId = newValue !== null ? newValue!.id : null;\r\n this.setState({\r\n sellerData: {\r\n ...this.state.sellerData,\r\n country: newValue,\r\n countryId: countryId,\r\n region: null,\r\n regionId: null,\r\n city: null,\r\n cityId: null\r\n }\r\n });\r\n };\r\n \r\n private handleRegionChange = (newValue: IReferential | null) => {\r\n this.setState({\r\n sellerData: {\r\n ...this.state.sellerData,\r\n region: newValue,\r\n regionId: newValue !== null ? newValue!.id : null,\r\n city: null,\r\n cityId: null\r\n }\r\n });\r\n };\r\n \r\n private handleCityChange = (newValue: IReferential | null) => {\r\n this.setState({\r\n sellerData: {\r\n ...this.state.sellerData,\r\n city: newValue,\r\n cityId: newValue !== null ? newValue!.id : null\r\n }\r\n });\r\n };\r\n\r\n private getRegionsOptions(): IReferential[] {\r\n const filteredRegions = this.state.regionList.filter(\r\n (region) => (this.state.sellerData.countryId && region.dependencyId) && region.dependencyId === this.state.sellerData.countryId\r\n );\r\n\r\n return filteredRegions || [];\r\n }\r\n\r\n private getCitiesOptions(): IReferential[] {\r\n const filteredCities = this.state.cityList.filter(\r\n (city) => (this.state.sellerData.regionId && city.dependencyId) && city.dependencyId === this.state.sellerData.regionId\r\n );\r\n\r\n return filteredCities || [];\r\n }\r\n\r\n public renderAddForm() {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n this.handleCountryChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n\r\n \r\n \r\n this.handleRegionChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n \r\n this.handleCityChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n this.setState({\r\n sellerData: {\r\n ...this.state.sellerData,\r\n ownCapital: parseFloat(e.target.value)\r\n } \r\n });\r\n }}\r\n validators={['required', 'minNumber:1']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu'),\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n label={this.translatorService.Tranlate(\r\n 'SELLER_DATA_OWN_CAPITAL',\r\n 'Capital social'\r\n ) + ' (lei)'}\r\n InputProps={{\r\n inputComponent: this.NumberFormatCustom\r\n }}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {isNullOrUndefined(this.state.sellerData.image) ? (\r\n ''\r\n ) : (\r\n \"\"\r\n )}\r\n
\r\n this.handleUploadAttachment(files)}\r\n previewText=\"\"\r\n showAlerts={false}\r\n acceptedFiles={['image/*']}\r\n />\r\n
\r\n \r\n
\r\n
\r\n\r\n );\r\n }\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n \r\n\r\n return (\r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? this.renderAddForm() : null}\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app\r\n }),\r\n null\r\n)(withSnackbar(SellerDataList as any));\r\n","import { AppContext } from '../../context/Contexts';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport { MavoVehicle, MavoVehicleStatusHistory, Vehicle, VehicleStatusHistory } from '../../interfaces/Vehicle';\r\nimport { AppThunkAction } from '.././';\r\nimport * as ActionTypes from './ActionTypes';\r\n\r\ninterface SetMavoVehicleAction {\r\n type: typeof ActionTypes.MAVO_VEHICLE_SET_VEHICLE;\r\n mavoVehicle: MavoVehicle | null;\r\n}\r\ninterface SetMavoVehicleStatusAction {\r\n type: typeof ActionTypes.MAVO_VEHICLE_SET_VEHICLE_STATUS;\r\n status: MavoVehicleStatusHistory;\r\n}\r\n\r\nexport type MavoVehicleAction = SetMavoVehicleAction | SetMavoVehicleStatusAction;\r\n\r\nexport const MavoVehicleActionCreators = {\r\n setMavoVehicle:\r\n (vehicleId: number): AppThunkAction =>\r\n async (dispatch, getState, context) => {\r\n const vehicleService = (context as AppContext).vehicleService;\r\n const vehicle = await vehicleService.GetMavoVehicle(vehicleId);\r\n\r\n dispatch({ type: ActionTypes.MAVO_VEHICLE_SET_VEHICLE, mavoVehicle: vehicle as unknown as MavoVehicle });\r\n },\r\n\r\n setMavoVehicleObject:\r\n (vehicle: MavoVehicle | null): AppThunkAction =>\r\n async (dispatch, getState, context) => {\r\n dispatch({ type: ActionTypes.MAVO_VEHICLE_SET_VEHICLE, mavoVehicle: vehicle as unknown as MavoVehicle });\r\n },\r\n\r\n changeMavoVehicleStatus:\r\n (statusHis: MavoVehicleStatusHistory): AppThunkAction =>\r\n async (dispatch, getState, context) => {\r\n dispatch({ type: ActionTypes.MAVO_VEHICLE_SET_VEHICLE_STATUS, status: statusHis });\r\n }\r\n};\r\n","import React, { PureComponent } from 'react';\r\nimport { Button, Dialog, DialogContent, DialogTitle, FormControlLabel, Grid, IconButton, Radio, RadioGroup, Typography } from \"@material-ui/core\";\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport { MavoVehicleOrder } from '../../interfaces/Vehicle';\r\nimport { DatePicker, MuiPickersUtilsProvider } from '@material-ui/pickers';\r\nimport moment from 'moment';\r\nimport MomentUtils from '@date-io/moment';\r\nimport { AppState } from '../../store';\r\nimport { MaterialUiPickersDate } from '@material-ui/pickers/typings/date';\r\nimport { AppUser } from '../../interfaces/AppUser';\r\nimport { IAppUserService } from '../../services/Interfaces/IAppUserService';\r\nimport { IVehicleService } from '../../services/Interfaces/IVehicleService';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { Autocomplete } from '@material-ui/lab';\r\nimport { MavoPersonTypeEnum } from '../../helpers/Constants';\r\nimport NumberFormat from 'react-number-format';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport _ from 'lodash';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport { CNP } from 'romanian-personal-identity-code-validator';\r\nimport { Organization } from '../../interfaces/Organization';\r\nimport { IOrganizationService } from '../../services/Interfaces/IOrganizationService';\r\n\r\nclass LocalizedUtils extends MomentUtils {\r\n // dateFormat = \"DD MM YYYY\";\r\n}\r\n\r\ninterface Props extends ProviderContext {\r\n appState: AppState;\r\n isDialogOpenOrder: boolean;\r\n closeDialogOrder: () => void;\r\n orderForm: MavoVehicleOrder;\r\n handleChangeOrder: (fieldName: string, isNumber: boolean) => (e: any, newValue?: IReferential | null) => void;\r\n handleOrganizationChange: (organization: Organization | null) => void;\r\n handleOrderDateChange: (date: MaterialUiPickersDate | null,value?: string | null) => void;\r\n vehicleId: number | undefined;\r\n countryList: IReferential[];\r\n regionList: IReferential[];\r\n cityList: IReferential[];\r\n handleCountryChange: (newValue: IReferential | null) => void;\r\n handleRegionChange: (newValue: IReferential | null) => void;\r\n handleCityChange: (newValue: IReferential | null) => void;\r\n}\r\n\r\ninterface State {\r\n organizations: Organization[];\r\n executing: boolean;\r\n orderDateError: string;\r\n isLoading: boolean;\r\n isLoadingOrganizations: boolean;\r\n}\r\n\r\nclass MavoVehicleOrderDialog extends PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private vehicleService!: IVehicleService;\r\n private organizationService!: IOrganizationService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n constructor(props: Props) {\r\n super(props);\r\n }\r\n\r\n state = {\r\n organizations: [] as Organization[],\r\n executing: false,\r\n orderDateError: '',\r\n isLoading: false,\r\n isLoadingOrganizations: false\r\n }\r\n \r\n public async componentDidMount() {\r\n ValidatorForm.addValidationRule('isValidCNP', (value) => {\r\n if (!value) {\r\n return true;\r\n }\r\n\r\n const cnp = new CNP(value);\r\n\r\n if (!cnp.isValid()) {\r\n return false;\r\n }\r\n return true;\r\n });\r\n\r\n this.setState({ isLoadingOrganizations: true });\r\n const organizations = await this.organizationService.GetMavoHOOrganizations();\r\n this.setState({ organizations: organizations, isLoadingOrganizations: false });\r\n }\r\n \r\n handleSaveOrder = async () => {\r\n if (this.props.orderForm.orderDate == null) {\r\n return;\r\n }\r\n\r\n const request = this.props.orderForm.personTypeId == MavoPersonTypeEnum.PF ? {\r\n mavoVehicleId: this.props.orderForm.mavoVehicleId,\r\n personTypeId: this.props.orderForm.personTypeId,\r\n name: this.props.orderForm.firstName + ' ' + this.props.orderForm.lastName,\r\n cnp: this.props.orderForm.cnp,\r\n adress: this.props.orderForm.adress,\r\n orderDate: this.props.orderForm.orderDate,\r\n price: this.props.orderForm.price,\r\n countryId: this.props.orderForm.countryId,\r\n regionId: this.props.orderForm.regionId,\r\n cityId: this.props.orderForm.cityId\r\n } as MavoVehicleOrder : \r\n {\r\n mavoVehicleId: this.props.orderForm.mavoVehicleId,\r\n personTypeId: this.props.orderForm.personTypeId,\r\n price: this.props.orderForm.price,\r\n orderDate: this.props.orderForm.orderDate,\r\n organizationId: this.props.orderForm.organizationId\r\n } as MavoVehicleOrder;\r\n\r\n try {\r\n this.setState({ executing: true, isLoading: true });\r\n const response = await this.vehicleService.AddMavoVehicleOrder(request);\r\n if (response.orderDate) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ORDER_SUCCESS', 'Comanda a fost salvata cu succes'), { variant: 'success' });\r\n } else {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ORDER_ERROR', 'Comanda nu a putut fi salvata'), { variant: 'error' });\r\n }\r\n this.setState({ executing: false, isLoading: false });\r\n this.props.closeDialogOrder();\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ORDER_ERROR', 'Comanda nu a putut fi salvata'), { variant: 'error' });\r\n this.setState({ executing: false, isLoading: false });\r\n }\r\n }\r\n\r\n NumberFormatCustom = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n allowNegative={false}\r\n thousandSeparator={false}\r\n decimalScale={0}\r\n />\r\n );\r\n };\r\n\r\n \r\n validateDates = (orderDate: string | null): void => {\r\n /*\r\n Validate end date\r\n */\r\n let orderDateError = '';\r\n if (!orderDate) {\r\n orderDateError = this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu');\r\n }\r\n\r\n this.setState({\r\n orderDateError: orderDateError\r\n });\r\n\r\n };\r\n\r\n NumberDecimalFormatCustom = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n },\r\n currentTarget: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n allowNegative={false}\r\n thousandSeparator={false}\r\n decimalScale={2}\r\n />\r\n );\r\n };\r\n\r\n private getRegionsOptions(): IReferential[] {\r\n const filteredRegions = this.props.regionList.filter(\r\n (region) => (this.props.orderForm.countryId && region.dependencyId) && region.dependencyId === this.props.orderForm.countryId\r\n );\r\n\r\n return filteredRegions || [];\r\n }\r\n\r\n private getCitiesOptions(): IReferential[] {\r\n const filteredCities = this.props.cityList.filter(\r\n (city) => (this.props.orderForm.regionId && city.dependencyId) && city.dependencyId === this.props.orderForm.regionId\r\n );\r\n\r\n return filteredCities || [];\r\n }\r\n\r\n public renderOrderForm = () => {\r\n return (\r\n
\r\n \r\n \r\n \r\n this.props.handleChangeOrder('price', true)(e)\r\n }\r\n placeholder={this.translatorService.Tranlate(\r\n 'CASE_OTHER_SERVICE_FORM_SELLING_OFFER_DIALOG',\r\n 'Pret vanzare'\r\n )}\r\n validators={['required', 'minNumber:1']}\r\n errorMessages={[\r\n this.translatorService.Tranlate(\r\n 'VALIDATORS_REQUIRED',\r\n 'Campul este obligatoriu'\r\n ),\r\n this.translatorService.Tranlate('PRICE_INVALID', 'Pretul nu este valid')\r\n ]}\r\n label={this.translatorService.Tranlate(\r\n 'CASE_OTHER_SERVICE_FORM_SELLING_OFFER_DIALOG',\r\n 'Pret vanzare'\r\n )}\r\n InputProps={{\r\n inputComponent: this.NumberDecimalFormatCustom\r\n }}\r\n />\r\n \r\n \r\n \r\n \r\n this.props.handleChangeOrder('personTypeId', true)(e)\r\n }\r\n className=\"m-2 pr-3\"\r\n >\r\n }\r\n value={MavoPersonTypeEnum.PF}\r\n label={this.translatorService.Tranlate('PERSON_TYPE_NATURAL', 'Persoana fizica')}\r\n />\r\n }\r\n value={MavoPersonTypeEnum.PJ}\r\n label={this.translatorService.Tranlate('PERSON_TYPE_LEGAL', 'Persoana juridica')}\r\n />\r\n \r\n \r\n \r\n \r\n {\r\n this.props.handleOrderDateChange(e);\r\n if (e === null || !e.isValid) {\r\n return;\r\n }\r\n this.setState({\r\n orderDateError: ''\r\n });\r\n }}\r\n autoOk={true}\r\n minDate={new Date()}\r\n required={true}\r\n error={this.state.orderDateError ? true : false}\r\n helperText={\r\n this.state.orderDateError\r\n }\r\n />\r\n \r\n \r\n {this.props.orderForm.personTypeId && this.props.orderForm.personTypeId === MavoPersonTypeEnum.PJ ? (\r\n \r\n this.props.handleOrganizationChange(newValue)}\r\n getOptionLabel={(option: Organization) => option.name || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n ) : (\r\n <>\r\n \r\n \r\n \r\n this.props.handleChangeOrder('lastName', false)(e)\r\n } \r\n placeholder={this.translatorService.Tranlate(\r\n 'EDIT_USER_LAST_NAME_FIELD',\r\n 'Nume'\r\n )}\r\n validators={['required']}\r\n errorMessages={\r\n this.translatorService.Tranlate(\r\n 'VALIDATORS_REQUIRED',\r\n 'Campul este obligatoriu'\r\n )\r\n }\r\n label={this.translatorService.Tranlate(\r\n 'EDIT_USER_LAST_NAME_FIELD',\r\n 'Nume'\r\n )}\r\n />\r\n \r\n \r\n \r\n this.props.handleChangeOrder('firstName', false)(e)\r\n } \r\n placeholder={this.translatorService.Tranlate(\r\n 'USERS_FIRST_NAME_HEADER',\r\n 'Prenume'\r\n )}\r\n validators={['required']}\r\n errorMessages={\r\n this.translatorService.Tranlate(\r\n 'VALIDATORS_REQUIRED',\r\n 'Campul este obligatoriu'\r\n )\r\n }\r\n label={this.translatorService.Tranlate(\r\n 'USERS_FIRST_NAME_HEADER',\r\n 'Prenume'\r\n )}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n this.props.handleCountryChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n disabled={true}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n \r\n this.props.handleRegionChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n this.props.handleCityChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n \r\n this.props.handleChangeOrder('adress', false)(e)\r\n } \r\n placeholder={this.translatorService.Tranlate(\r\n 'EDIT_ORGANIZATION_ADDRESS_LABEL',\r\n 'Adresa'\r\n )}\r\n validators={['required']}\r\n errorMessages={\r\n this.translatorService.Tranlate(\r\n 'VALIDATORS_REQUIRED',\r\n 'Campul este obligatoriu'\r\n )\r\n }\r\n label={this.translatorService.Tranlate(\r\n 'EDIT_ORGANIZATION_ADDRESS_LABEL',\r\n 'Adresa'\r\n )}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n this.props.handleChangeOrder('cnp', false)(e)\r\n } \r\n placeholder={this.translatorService.Tranlate(\r\n 'FRM_EVENT_DATA_CNP',\r\n 'CNP'\r\n )}\r\n validators={['isValidCNP', 'required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('CLIENT_DATA_FORM_VALIDATOR_CNP', 'CNP invalid'),\r\n this.translatorService.Tranlate(\r\n 'VALIDATORS_REQUIRED',\r\n 'Campul este obligatoriu'\r\n )\r\n ]}\r\n label={this.translatorService.Tranlate(\r\n 'FRM_EVENT_DATA_CNP',\r\n 'CNP'\r\n )}\r\n />\r\n \r\n \r\n \r\n )}\r\n
\r\n );\r\n };\r\n\r\n renderOrderContent = () => {\r\n return (\r\n \r\n {this.renderOrderForm()}\r\n
\r\n \r\n
\r\n
\r\n \r\n {this.translatorService.Tranlate('MAVO_VEHICLE_IMPORT_CLOSE_BTN', 'Renunta')}\r\n \r\n \r\n
\r\n
\r\n );\r\n };\r\n\r\n render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.vehicleService = (this.context as AppContext).vehicleService;\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n {this.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_VEHICLE_PLACE_ORDER',\r\n 'Lansare comanda'\r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoadingOrganizations ? this.renderOrderContent() : null}\r\n
\r\n \r\n );\r\n }\r\n}\r\n\r\nexport default withSnackbar(MavoVehicleOrderDialog);","import React from 'react';\r\nimport { Button, Dialog, DialogContent, DialogTitle, Grid, IconButton, Typography } from \"@material-ui/core\";\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport { MavoVehicleAuction } from '../../interfaces/Vehicle';\r\nimport { DatePicker, MuiPickersUtilsProvider } from '@material-ui/pickers';\r\nimport moment from 'moment';\r\nimport MomentUtils from '@date-io/moment';\r\nimport { AppState } from '../../store';\r\nimport { MaterialUiPickersDate } from '@material-ui/pickers/typings/date';\r\nimport { IVehicleService } from '../../services/Interfaces/IVehicleService';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport _ from 'lodash';\r\nimport NumberFormat from 'react-number-format';\r\n\r\nclass LocalizedUtils extends MomentUtils {\r\n // dateFormat = \"DD MM YYYY\";\r\n}\r\n\r\ninterface MavoVehicleAuctionDialogProps extends ProviderContext {\r\n appState: AppState;\r\n isDialogOpenAuction: boolean;\r\n closeDialogAuction: () => void;\r\n auctionForm: MavoVehicleAuction;\r\n handleChangeAuction: (fieldName: string, isNumber: boolean) => (e: any, newValue?: IReferential | null) => void;\r\n handleStartDateChange: (date: MaterialUiPickersDate | null,value?: string | null) => void;\r\n handleEndDateChange: (date: MaterialUiPickersDate | null,value?: string | null) => void;\r\n vehicleId: number | undefined;\r\n}\r\n\r\ninterface IMavoVehicleAuctionDialogtate {\r\n executing: boolean;\r\n isLoading: boolean;\r\n}\r\n\r\nclass MavoVehicleAuctionDialog extends React.Component<\r\n MavoVehicleAuctionDialogProps,\r\n IMavoVehicleAuctionDialogtate\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private vehicleService!: IVehicleService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n constructor(props: MavoVehicleAuctionDialogProps) {\r\n super(props);\r\n this.state = {\r\n executing: false,\r\n isLoading: false\r\n };\r\n }\r\n \r\n\r\n handleSaveAuction = async () => {\r\n if (this.props.auctionForm.endDate == null) {\r\n return;\r\n }\r\n\r\n if (this.checkIfEndDateIsBeforeStartDate()) {\r\n return;\r\n }\r\n\r\n const request = _.cloneDeep({\r\n ...this.props.auctionForm,\r\n endDate: this.props.auctionForm.endDate + ' 4 PM'\r\n });\r\n\r\n request.currentPrice = 0;\r\n try {\r\n this.setState({ executing: true, isLoading: true });\r\n const response = await this.vehicleService.AddMavoVehicleAuction(request);\r\n if (response.success == true) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('AUCTION_SUCCESS', 'Licitatia a fost adaugata cu succes'), { variant: 'success' });\r\n } else {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('AUCTION_ERROR', 'A aparut o eroare la adaugarea licitatiei'), { variant: 'error' });\r\n }\r\n this.setState({ executing: false, isLoading: false });\r\n\r\n this.props.closeDialogAuction();\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('AUCTION_ERROR', 'A aparut o eroare la adaugarea licitatiei'), { variant: 'error' });\r\n this.setState({ executing: false, isLoading: false});\r\n }\r\n\r\n }\r\n\r\n checkIfEndDateIsBeforeStartDate = () => {\r\n if (this.props.auctionForm?.endDate && this.props.auctionForm?.startDate) {\r\n return moment(this.props.auctionForm?.endDate).isBefore(moment(this.props.auctionForm?.startDate));\r\n }\r\n return false;\r\n }\r\n\r\n NumberDecimalFormatCustom = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n },\r\n currentTarget: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n allowNegative={false}\r\n thousandSeparator={false}\r\n decimalScale={2}\r\n />\r\n );\r\n };\r\n\r\n public renderAuctionForm = () => {\r\n const maxNumberOfCharactersObservations = 300;\r\n return (\r\n
\r\n \r\n \r\n {\r\n this.props.handleChangeAuction('startPrice', true)(e);\r\n }}\r\n placeholder={this.translatorService.Tranlate(\r\n 'MAVO_AUCTION_PRICE',\r\n 'Pret licitatie (EUR)'\r\n )}\r\n validators={['required', 'minNumber:1']}\r\n errorMessages={[\r\n this.translatorService.Tranlate(\r\n 'VALIDATORS_REQUIRED',\r\n 'Campul este obligatoriu'\r\n ),\r\n this.translatorService.Tranlate('PRICE_INVALID', 'Pretul nu este valid')\r\n ]}\r\n label={this.translatorService.Tranlate(\r\n 'MAVO_AUCTION_PRICE',\r\n 'Pret licitatie (EUR)'\r\n )}\r\n InputProps={{\r\n inputComponent: this.NumberDecimalFormatCustom\r\n }}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n this.props.handleChangeAuction('minDifference', true)(e)\r\n }\r\n placeholder={this.translatorService.Tranlate(\r\n 'MAVO_AUCTION_PRICE_BID_DIFF',\r\n 'Diferenta minima intre pret si valoare licitata (EUR)'\r\n )}\r\n validators={['required', 'minNumber:1']}\r\n errorMessages={[\r\n this.translatorService.Tranlate(\r\n 'VALIDATORS_REQUIRED',\r\n 'Campul este obligatoriu'\r\n ),\r\n this.translatorService.Tranlate('MAVO_AUCTION_INVALID_PRICE_BID_DIFF', 'Diferenta minima nu este valida')\r\n ]}\r\n label={this.translatorService.Tranlate(\r\n 'MAVO_AUCTION_PRICE_BID_DIFF',\r\n 'Diferenta minima intre pret si valoare licitata (EUR)'\r\n )}\r\n InputProps={{\r\n inputComponent: this.NumberDecimalFormatCustom\r\n }}\r\n />\r\n \r\n \r\n \r\n this.props.handleChangeAuction('details', false)(e)\r\n } \r\n label={this.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_AUCTION_DETAILS',\r\n 'Detalii'\r\n )}\r\n validators={[`maxStringLength: ${maxNumberOfCharactersObservations}`]}\r\n errorMessages={[\r\n this.translatorService.Tranlate(\r\n 'VALIDATORS_MAX_LENGTH',\r\n 'Numar maxim de caractere: '\r\n ) + maxNumberOfCharactersObservations\r\n ]}\r\n multiline\r\n variant=\"outlined\"\r\n rows={6}\r\n />\r\n \r\n \r\n
\r\n );\r\n };\r\n\r\n public renderAuctionContent() {\r\n return (\r\n \r\n {this.renderAuctionForm()}\r\n
\r\n \r\n
\r\n
\r\n \r\n {this.translatorService.Tranlate('MAVO_VEHICLE_IMPORT_CLOSE_BTN', 'Renunta')}\r\n \r\n \r\n
\r\n
\r\n );\r\n }\r\n\r\n render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.vehicleService = (this.context as AppContext).vehicleService;\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n {this.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_VEHICLE_DISPOSITION_IN_THE_AUCTION',\r\n 'Dispunere in licitatie'\r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.renderAuctionContent()}\r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nexport default withSnackbar(MavoVehicleAuctionDialog);\r\n","import * as React from 'react';\r\nimport { ApplicationState, AppState } from '../../store';\r\nimport { ApplicationContext, AppContext } from '../../context/Contexts';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n Card,\r\n Grid,\r\n Tab,\r\n Tabs,\r\n AppBar,\r\n TextField,\r\n Button,\r\n Checkbox,\r\n FormControlLabel,\r\n Dialog,\r\n DialogTitle,\r\n IconButton,\r\n DialogContent,\r\n Paper,\r\n DialogActions,\r\n Modal,\r\n DialogContentText,\r\n Box,\r\n CircularProgress\r\n} from '@material-ui/core';\r\nimport TabPanel from '../_shared/Tabs';\r\nimport MUIDataTable, {\r\n MUIDataTableColumnOptions,\r\n MUIDataTableMeta,\r\n SelectableRows\r\n} from 'mui-datatables';\r\nimport { MUITranslations } from '../../helpers/MUITableTranslations';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport {\r\n ImportMavoVehiclesRequestDto,\r\n ImportVehicleAttachment,\r\n MavoVehicle,\r\n MavoVehicleFilters,\r\n MavoVehicleImportedDto,\r\n MavoVehicleList,\r\n Provenance,\r\n MavoVehicleAuction,\r\n MavoVehicleOrder\r\n} from '../../interfaces/Vehicle';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport Loader from '../Loader';\r\nimport noop from 'lodash/noop';\r\nimport _ from 'lodash';\r\nimport { DatePicker, MuiPickersUtilsProvider } from '@material-ui/pickers';\r\nimport moment from 'moment';\r\nimport MomentUtils from '@date-io/moment';\r\nimport { MaterialUiPickersDate } from '@material-ui/pickers/typings/date';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport DeleteOutlineTwoToneIcon from '@material-ui/icons/DeleteOutlineTwoTone';\r\nimport MaterialTable from 'material-table';\r\nimport { getLocalization, MaterialTableIcons } from '../_shared/TableSettings';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { CountryCodeEnum, disabledNewMavoVehicleStatuses, MavoPersonTypeEnum, MavoVehicleProvenanceType, MavoVehicleStatusCodeEnum, ReferentialCode } from '../../helpers/Constants';\r\nimport { MavoVehicleActionCreators } from '../../store/actions/MavoVehicle';\r\nimport { MavoVehicleState } from '../../store/reducers/MavoVehicle';\r\nimport MavoVehicleOrderDialog from './MavoVehicleOrderDialog';\r\nimport MavoVehicleAuctionDialog from './MavoVehicleAuctionDialog';\r\nimport { AppUser } from '../../interfaces/AppUser';\r\nimport FileSaver from 'file-saver';\r\nimport {MuiThemeProvider, createMuiTheme } from '@material-ui/core';\r\nimport Referentials from '../../helpers/Referentials.json';\r\nimport { Organization } from '../../interfaces/Organization';\r\n\r\nclass LocalizedUtils extends MomentUtils {\r\n // dateFormat = \"DD MM YYYY\";\r\n}\r\n\r\ntype MavoVehiclesProps = {\r\n appState: AppState;\r\n mavoVehicleState: MavoVehicleState;\r\n} &\r\n typeof MavoVehicleActionCreators &\r\n ProviderContext &\r\n RouteComponentProps;\r\n\r\ninterface IMavoVehiclesState {\r\n vehiclesList: MavoVehicleList;\r\n makeEntities: IReferential[];\r\n selectedMakeEntities: IReferential[];\r\n modelEntities: IReferential[];\r\n selectedModelEntities: IReferential[];\r\n statusEntities: IReferential[];\r\n selectedStatusEntities: IReferential[];\r\n provenanceEntities: Provenance[];\r\n selectedProvenanceEntities: Provenance[];\r\n selectedStartDate: Date | null;\r\n selectedEndDate: Date | null;\r\n selectedTab: number;\r\n isLoading: boolean;\r\n isLoadingVehicles: boolean;\r\n count: number;\r\n page: number;\r\n pageSize: number;\r\n vehicleImportDialogOpenend: boolean;\r\n isLoadingDialog: boolean;\r\n vin: string;\r\n isDialogOpen: boolean;\r\n isDialogOpenAuction: boolean,\r\n isDialogOpenOrder: boolean,\r\n isLoadingImportVehicles: boolean;\r\n attachments: ImportVehicleAttachment[];\r\n importedVehicles: MavoVehicleImportedDto[];\r\n isOpen: boolean;\r\n dialogVisible: boolean;\r\n selectedVehicle: MavoVehicle | null;\r\n auctionForm: MavoVehicleAuction;\r\n orderForm: MavoVehicleOrder;\r\n executing: boolean;\r\n isLoadingExport: boolean;\r\n isDeleteLoading: boolean;\r\n countryList: IReferential[];\r\n regionList: IReferential[];\r\n cityList: IReferential[];\r\n}\r\n\r\nclass MavoVehicles extends React.PureComponent {\r\n private cbContext!: AppContext;\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n vehiclesList: {} as MavoVehicleList,\r\n makeEntities: [],\r\n selectedMakeEntities: [],\r\n modelEntities: [],\r\n selectedModelEntities: [],\r\n statusEntities: [],\r\n selectedStatusEntities: [],\r\n provenanceEntities: [],\r\n selectedProvenanceEntities: [],\r\n selectedTab: 0,\r\n isLoading: false,\r\n isLoadingVehicles: false,\r\n count: 1,\r\n page: 0,\r\n pageSize: 10,\r\n vehicleImportDialogOpenend: false,\r\n isCarSoldDialogOpen: false,\r\n vehiclesCaseList: [],\r\n salesWokflowForm: null,\r\n paramList: [],\r\n isLoadingDialog: false,\r\n vin: '',\r\n selectedStartDate: null,\r\n selectedEndDate: null,\r\n isDialogOpen: false,\r\n isDialogOpenAuction: false,\r\n isDialogOpenOrder: false,\r\n isLoadingImportVehicles: false,\r\n attachments: [] as ImportVehicleAttachment[],\r\n importedVehicles: [] as MavoVehicleImportedDto[],\r\n isOpen: false,\r\n dialogVisible: false,\r\n selectedVehicle: null,\r\n auctionForm: {\r\n id: 0,\r\n currentPrice: 0,\r\n } as MavoVehicleAuction,\r\n orderForm: {\r\n personTypeId: MavoPersonTypeEnum.PF,\r\n countryId: null,\r\n country: null,\r\n regionId: null,\r\n region: null,\r\n cityId: null,\r\n city: null\r\n } as MavoVehicleOrder,\r\n executing: false,\r\n isLoadingExport: false,\r\n isDeleteLoading: false,\r\n countryList: [],\r\n regionList: [],\r\n cityList: []\r\n } as IMavoVehiclesState;\r\n\r\n public async componentDidMount() {\r\n const countryRef = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.Country\r\n );\r\n const regionRef = Referentials.referential.find((item) => item.code === ReferentialCode.Region);\r\n const cityRef = Referentials.referential.find((item) => item.code === ReferentialCode.City);\r\n \r\n const mavoVehiclesFilters = {\r\n makeIds: [],\r\n modelIds: [],\r\n statusIds: [],\r\n provenanceIds: [],\r\n dateFilterStartDate: null,\r\n dateFilterEndDate: null,\r\n page: this.state.page + 1,\r\n pageSize: this.state.pageSize,\r\n vin: ''\r\n } as MavoVehicleFilters;\r\n\r\n this.setState({\r\n isLoading: true\r\n });\r\n\r\n const [vehicles, countryList, regionList, cityList] = await Promise.all([\r\n this.cbContext.vehicleService.GetMavoVehicles(mavoVehiclesFilters),\r\n this.cbContext.referentialService.Get(countryRef!.baseUrl),\r\n this.cbContext.referentialService.Get(regionRef!.baseUrl),\r\n this.cbContext.referentialService.Get(cityRef!.baseUrl),\r\n ]);\r\n\r\n this.setState(\r\n {\r\n vehiclesList: vehicles,\r\n count: vehicles.total,\r\n page: vehicles.page - 1,\r\n countryList: countryList,\r\n regionList: regionList,\r\n cityList: cityList\r\n },\r\n async () => {\r\n await this.reloadFilters();\r\n }\r\n );\r\n }\r\n\r\n isInternal = (): boolean | null => {\r\n if (this.state.selectedTab === 0) {\r\n return null;\r\n }\r\n if (this.state.selectedTab === 1) {\r\n return false;\r\n }\r\n\r\n return true;\r\n };\r\n\r\n loadVehicles = async (page: number, rowsPerPage: number) => {\r\n this.setState({\r\n isLoadingVehicles: true,\r\n selectedVehicle: null\r\n });\r\n\r\n const mavoVehiclesFilters = {\r\n makeIds: this.state.selectedMakeEntities.map((item) => item.id),\r\n modelIds: this.state.selectedModelEntities.map((item) => item.id),\r\n statusIds: this.state.selectedStatusEntities.map((item) => item.id),\r\n provenanceIds: this.state.selectedProvenanceEntities.map((item) => item.id),\r\n dateFilterStartDate: this.state.selectedStartDate\r\n ? new Date(this.state.selectedStartDate.setHours(0, 0, 0, 0))\r\n : null,\r\n dateFilterEndDate: this.state.selectedEndDate\r\n ? new Date(this.state.selectedEndDate.setHours(23, 59, 59, 999))\r\n : null,\r\n page: page + 1,\r\n pageSize: rowsPerPage,\r\n vin: this.state.vin\r\n } as MavoVehicleFilters;\r\n\r\n const vehicleList = await this.cbContext.vehicleService.GetMavoVehicles(mavoVehiclesFilters);\r\n this.setState({\r\n vehiclesList: vehicleList,\r\n page: vehicleList.page - 1,\r\n pageSize: rowsPerPage,\r\n count: vehicleList.total,\r\n isLoadingVehicles: false\r\n });\r\n };\r\n\r\n reloadFilters = async () => {\r\n const filters = await this.cbContext.vehicleService.GetMavoVehiclesFilters();\r\n this.setState({\r\n makeEntities: filters.makeList,\r\n modelEntities: filters.modelList,\r\n statusEntities: filters.vehicleStatuses,\r\n provenanceEntities: filters.provenanceList,\r\n isLoading: false\r\n });\r\n };\r\n\r\n\r\n makeSelectedVehicle = (isSelected: boolean, id: number) => {\r\n const vehicles = _.cloneDeep(this.state.vehiclesList.vehicles);\r\n const vehicle = vehicles.find((item) => item.id === id);\r\n if (vehicle) {\r\n vehicle.isSelected = isSelected;\r\n }\r\n\r\n if (isSelected) {\r\n vehicles.forEach((item) => {\r\n if (item.id !== id) {\r\n item.isSelected = false;\r\n } \r\n });\r\n }\r\n this.setState({\r\n vehiclesList: {\r\n ...this.state.vehiclesList,\r\n vehicles: vehicles\r\n },\r\n selectedVehicle: isSelected ? (vehicle ? vehicle : null): null\r\n });\r\n }\r\n\r\n getMuiTheme = () => createMuiTheme({\r\n overrides: {\r\n MuiTableCell: {\r\n head: {\r\n paddingLeft: \"2px\",\r\n paddingRight: \"2px\",\r\n paddingTop: \"2px\",\r\n paddingBottom: \"2px\"\r\n },\r\n },\r\n MUIDataTableBodyCell: {\r\n stackedCommon: {\r\n paddingLeft: \"2px\",\r\n paddingRight: \"2px\",\r\n paddingTop: \"0px\",\r\n paddingBottom: \"0px\",\r\n height: \"40px !important\"\r\n }\r\n },\r\n MuiCheckbox: {\r\n root: {\r\n padding: \"0px\", // Adjust the padding to make the checkbox smaller\r\n },\r\n colorSecondary: {\r\n '&.Mui-checked': {\r\n color: \"#3d4977 !important\",\r\n '&:hover': {\r\n backgroundColor: 'rgba(0, 0, 0, 0.03) !important'\r\n },\r\n },\r\n '&:hover': {\r\n backgroundColor: 'rgba(0, 0, 0, 0.03) !important'\r\n }\r\n }\r\n }\r\n } as any\r\n });\r\n\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'id',\r\n label: ' ',\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: any, tableMeta: MUIDataTableMeta) => {\r\n const vehicle = this.state.vehiclesList.vehicles.find((item) => item.id === tableMeta.rowData[0]);\r\n return (\r\n \r\n \r\n
\r\n {\r\n //vehicle!.isSelected = e.target.checked;\r\n this.makeSelectedVehicle(e.target.checked, vehicle!.id);\r\n }}\r\n >\r\n }\r\n label=''\r\n />\r\n
\r\n
\r\n
\r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'vin',\r\n label: this.cbContext.translatorService.Tranlate('MAVO_VEHICLES_VEHICLE_VIN_CODE', 'VIN'),\r\n options: {\r\n sort: false\r\n }\r\n },\r\n {\r\n name: 'make.displayName',\r\n label: this.cbContext.translatorService.Tranlate('VEHICLES_VEHICLE_MAKE', 'Marca'),\r\n options: {\r\n sort: false\r\n }\r\n },\r\n {\r\n name: 'model.displayName',\r\n label: this.cbContext.translatorService.Tranlate('VEHICLES_VEHICLE_MODEL', 'Model'),\r\n options: {\r\n sort: false\r\n }\r\n },\r\n {\r\n name: 'fabricationYear',\r\n label: this.cbContext.translatorService.Tranlate('MAVO_VEHICLES_VEHICLE_FABRICATION_YEAR', 'AnFab'),\r\n options: {\r\n sort: false\r\n }\r\n },\r\n {\r\n name: 'ttcEvaluationEurPrice',\r\n label: this.cbContext.translatorService.Tranlate('MAVO_VEHICLES_VEHICLE_EVALUATION_PRICE', 'Pret evaluare'),\r\n options: {\r\n sort: false\r\n }\r\n },\r\n {\r\n name: 'fuelType.displayName',\r\n label: this.cbContext.translatorService.Tranlate('CAR_DETAILS_FUEL_TYPE', 'Combustibil'),\r\n options: {\r\n sort: false\r\n }\r\n },\r\n {\r\n name: 'nirNumber',\r\n label: this.cbContext.translatorService.Tranlate('MAVO_VEHICLES_VEHICLE_NIR_NUMBER', 'Nr NIR'),\r\n options: {\r\n sort: false\r\n }\r\n },\r\n {\r\n name: 'nirDate',\r\n label: this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_VEHICLE_NIR_DATE',\r\n 'Data NIR'\r\n ),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: any) => {\r\n return (\r\n \r\n \r\n
\r\n {value\r\n ? moment\r\n .utc(value)\r\n .local()\r\n .format(this.props.appState.dateFormat)\r\n : null}\r\n
\r\n
\r\n
\r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'dateCreation',\r\n label: this.cbContext.translatorService.Tranlate('MAVO_VEHICLES_VEHICLE_IMPORTED_DATE', 'Data import'),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: any) => {\r\n return (\r\n \r\n \r\n
\r\n {value\r\n ? moment\r\n .utc(value)\r\n .local()\r\n .format(this.props.appState.dateFormat)\r\n : null}\r\n
\r\n
\r\n
\r\n );\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'currentStatus.status.displayName',\r\n label: this.cbContext.translatorService.Tranlate('MAVO_VEHICLES_VEHICLE_STATE', 'Stare'),\r\n options: {\r\n sort: false\r\n }\r\n }, \r\n {\r\n name: 'provenance.type',\r\n label: this.cbContext.translatorService.Tranlate(\r\n 'MENU_NOMENCLATURES_TAB_PROVENANCE',\r\n 'Provenienta'\r\n ),\r\n options: {\r\n sort: false\r\n }\r\n }\r\n ];\r\n\r\n return columns;\r\n };\r\n\r\n sortFunction = (a: any, b: any) => {\r\n return a.order - b.order;\r\n };\r\n\r\n onTabChange = (event: any, newValue: number) => {\r\n this.setState(\r\n {\r\n selectedTab: newValue,\r\n page: 0\r\n },\r\n async () => await this.loadVehicles(0, this.state.pageSize)\r\n );\r\n };\r\n\r\n handleMakeEntitiesChange = (newValue: any[]) => {\r\n const selectedModels = [...this.state.selectedModelEntities];\r\n const selectedMakeIds = newValue.map(({ id }) => id);\r\n\r\n const models = selectedModels.filter(({ dependencyId }) =>\r\n selectedMakeIds.includes(dependencyId)\r\n );\r\n\r\n this.setState(\r\n {\r\n selectedMakeEntities: newValue,\r\n selectedModelEntities: models\r\n }\r\n );\r\n };\r\n\r\n handleModelEntitiesChange = (newValue: any[]) => {\r\n this.setState(\r\n {\r\n selectedModelEntities: newValue\r\n }\r\n );\r\n };\r\n\r\n handleStatusEntitiesChange = (newValue: any[]) => {\r\n this.setState(\r\n {\r\n selectedStatusEntities: newValue\r\n }\r\n );\r\n };\r\n\r\n handleProvenanceEntitiesChange = (newValue: any[]) => {\r\n this.setState(\r\n {\r\n selectedProvenanceEntities: newValue\r\n }\r\n );\r\n };\r\n\r\n handleStartDateChange = async (date: MaterialUiPickersDate | null, value?: string | null) => {\r\n if (date === null || !date.isValid) {\r\n return;\r\n }\r\n this.setState(\r\n {\r\n selectedStartDate: date!.toDate(),\r\n isLoading: false\r\n }\r\n );\r\n };\r\n\r\n handleEndDateChange = async (date: MaterialUiPickersDate | null, value?: string | null) => {\r\n if (date === null || !date.isValid) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n selectedEndDate: date!.toDate(),\r\n isLoading: false\r\n }\r\n );\r\n };\r\n\r\n handleImportDialogOpen = () => {\r\n this.setState({\r\n isDialogOpen: true\r\n });\r\n };\r\n\r\n handleImportDialogClose = () => {\r\n this.setState({\r\n isDialogOpen: false\r\n }, async () => {\r\n await this.loadVehicles(this.state.page, this.state.pageSize);\r\n });\r\n };\r\n\r\n // Check if vehicle is valid for specific actions: Order, Auction\r\n isVehicleValid = (vehicle: MavoVehicle, action: string): boolean => {\r\n if (!vehicle.provenance) {\r\n return false;\r\n }\r\n if (vehicle.provenance!.type !== MavoVehicleProvenanceType.RCI && (!vehicle.nirDate || !vehicle.nirNumber)) {\r\n return false;\r\n }\r\n \r\n if (vehicle.provenance!.type === MavoVehicleProvenanceType.RCI && vehicle.nirNumber) {\r\n return false;\r\n }\r\n \r\n if (disabledNewMavoVehicleStatuses.includes(String(vehicle.currentStatus.status!.code))) {\r\n return false;\r\n }\r\n \r\n if (action === 'auction' && vehicle.isReserved) {\r\n return false;\r\n }\r\n \r\n return true;\r\n }\r\n\r\n handleDialogOpen = (action: string) => {\r\n if (!this.state.selectedVehicle) {\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('PLEASE_SELECT_VEHICLE', 'Va rugam sa selectati un vehicul!'), {\r\n variant: 'warning'\r\n });\r\n\r\n return false;\r\n }\r\n\r\n if (!this.isVehicleValid(this.state.selectedVehicle, action)) {\r\n switch (action) {\r\n case 'auction':\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('VEHICLE_NOT_VALID_FOR_AUCTION', 'Vehiculul nu este valid pentru licitatie!'), {\r\n variant: 'warning',\r\n autoHideDuration: 5000,\r\n style: { whiteSpace: 'pre-line' }\r\n });\r\n break;\r\n case 'order':\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('VEHICLE_NOT_VALID_FOR_ORDER', 'Vehiculul nu este valid pentru comanda!'), {\r\n variant: 'warning',\r\n autoHideDuration: 5000,\r\n style: { whiteSpace: 'pre-line' }\r\n });\r\n break;\r\n default:\r\n break;\r\n }\r\n\r\n return false;\r\n }\r\n \r\n return true;\r\n }\r\n\r\n handleStockDialog = () => {\r\n if (this.state.selectedVehicle) {\r\n this.props.setMavoVehicleObject(null);\r\n this.props.history.push('/mavoVehicleStock/' + this.state.selectedVehicle.id);\r\n\r\n } else {\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('PLEASE_SELECT_VEHICLE', 'Va rugam sa selectati un vehicul!'), {\r\n variant: 'warning'\r\n });\r\n }\r\n };\r\n\r\n handleDeleteDialog = () => {\r\n if (!this.state.selectedVehicle) {\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('PLEASE_SELECT_VEHICLE', 'Va rugam sa selectati un vehicul!'), {\r\n variant: 'warning'\r\n });\r\n\r\n return;\r\n }\r\n\r\n this.setState({\r\n isOpen: true,\r\n dialogVisible: true\r\n });\r\n }\r\n\r\n handleDeleteVehicle = async () => {\r\n if (!this.state.selectedVehicle) {\r\n return;\r\n }\r\n\r\n try {\r\n const mavoVehicleId = this.state.selectedVehicle!.id;\r\n //Indisponibil\r\n if (this.state.selectedVehicle.currentStatus?.status?.code != MavoVehicleStatusCodeEnum.INDISPONIBIL) {\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('ERROR_MSG_DELETE_MAVO_VEHICLE', 'Se pot sterge doar masini in stare indisponibila!'), {\r\n variant: 'warning'\r\n });\r\n\r\n this.handleCloseConfirmationDialog();\r\n\r\n return;\r\n }\r\n\r\n this.setState({ isDeleteLoading: true });\r\n\r\n await this.cbContext.vehicleService.DeleteMavoVehicle(mavoVehicleId);\r\n\r\n const vehicles = [...this.state.vehiclesList.vehicles];\r\n const index = vehicles.findIndex((item) => item.id === mavoVehicleId);\r\n vehicles.splice(index, 1);\r\n\r\n this.setState({\r\n vehiclesList: {\r\n ...this.state.vehiclesList,\r\n vehicles: vehicles\r\n }\r\n }, () => {\r\n this.handleCloseConfirmationDialog();\r\n });\r\n\r\n this.setState({ isDeleteLoading: false });\r\n\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.setState({ isDeleteLoading: false });\r\n \r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n \r\n handleExportMavoVehicles = async () => {\r\n try {\r\n this.setState({\r\n isLoadingExport: true\r\n });\r\n\r\n const mavoVehiclesFilters = {\r\n makeIds: this.state.selectedMakeEntities.map((item) => item.id),\r\n modelIds: this.state.selectedModelEntities.map((item) => item.id),\r\n statusIds: this.state.selectedStatusEntities.map((item) => item.id),\r\n provenanceIds: this.state.selectedProvenanceEntities.map((item) => item.id),\r\n dateFilterStartDate: this.state.selectedStartDate\r\n ? new Date(this.state.selectedStartDate.setHours(0, 0, 0, 0))\r\n : null,\r\n dateFilterEndDate: this.state.selectedEndDate\r\n ? new Date(this.state.selectedEndDate.setHours(23, 59, 59, 999))\r\n : null,\r\n vin: this.state.vin\r\n } as MavoVehicleFilters;\r\n\r\n const fileBlob = await this.cbContext.vehicleService.ExportMavoVehicles(mavoVehiclesFilters);\r\n FileSaver.saveAs(fileBlob, 'Evidenta vehicule' + '.xlsx');\r\n\r\n this.setState({\r\n isLoadingExport: false\r\n });\r\n \r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (err: any) {\r\n this.setState({\r\n isLoadingExport: false\r\n });\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n \r\n\r\n renderMavoVehicleButtons() {\r\n return (\r\n
\r\n
\r\n \r\n {this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_VEHICLE_IMPORT_VEHICLES',\r\n 'Import vehicule'\r\n )}\r\n \r\n
\r\n
\r\n {\r\n this.props.setMavoVehicleObject(null);\r\n this.props.history.push('/mavoVehicle/new');\r\n }}\r\n >\r\n {this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_VEHICLE_ADD_NEW',\r\n 'Noua inregistrare'\r\n )}\r\n \r\n
\r\n
\r\n {this.handleStockDialog()}}\r\n >\r\n {this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_VEHICLE_MODIFIED_STOCK_DATA',\r\n 'Editare/Vizualizare date stoc'\r\n )}\r\n \r\n
\r\n
\r\n {this.handleDeleteDialog()}}\r\n >\r\n {this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_VEHICLE_DELETE_VEHICLE',\r\n 'Stergere inregistrare'\r\n )}\r\n \r\n
\r\n
\r\n {\r\n this.handleDialogOpen('auction') && this.setState({\r\n isDialogOpenAuction: true,\r\n auctionForm: {\r\n ...this.state.auctionForm,\r\n startDate: moment(new Date()).format(\"YYYY-MM-DD\"),\r\n mavoVehicleId: this.state.selectedVehicle!.id\r\n }\r\n });\r\n }}\r\n >\r\n {this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_VEHICLE_DISPOSITION_IN_THE_AUCTION',\r\n 'Dispunere in licitatie'\r\n )}\r\n \r\n
\r\n
\r\n {\r\n const countryRo = this.state.countryList.find((item) => item.code === CountryCodeEnum.RO.toString());\r\n this.handleDialogOpen('order') && this.setState({ isDialogOpenOrder: true, orderForm: {\r\n ...this.state.orderForm,\r\n personTypeId: MavoPersonTypeEnum.PF,\r\n mavoVehicleId: this.state.selectedVehicle!.id,\r\n countryId: countryRo ? countryRo.id : null,\r\n country: countryRo ? countryRo : null\r\n }});\r\n }}\r\n >\r\n {this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_VEHICLE_PLACE_ORDER',\r\n 'Lansare comanda'\r\n )}\r\n \r\n
\r\n
\r\n \r\n {this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_VEHICLE_EXPORT_DATA',\r\n 'Export Date'\r\n )}\r\n \r\n
\r\n
\r\n\r\n );\r\n }\r\n\r\n renderSearchButtons() {\r\n return (\r\n
\r\n
\r\n this.loadVehicles(this.state.page, this.state.pageSize)}\r\n >\r\n {this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_VEHICLE_SEARCH',\r\n 'Cauta'\r\n )}\r\n \r\n
\r\n
\r\n this.resetFilters()}\r\n >\r\n {this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_VEHICLE_RESET',\r\n 'Reset'\r\n )}\r\n \r\n
\r\n
\r\n\r\n );\r\n }\r\n\r\n resetFilters = async () => {\r\n this.setState({\r\n selectedMakeEntities: [],\r\n selectedModelEntities: [],\r\n selectedStatusEntities: [],\r\n selectedProvenanceEntities: [],\r\n selectedStartDate: null,\r\n selectedEndDate: null,\r\n vin: ''\r\n }, async () => {\r\n await this.loadVehicles(this.state.page, this.state.pageSize);\r\n });\r\n };\r\n\r\n renderFilters = () => {\r\n const selectedMakes = this.state.selectedMakeEntities;\r\n let models = this.state.modelEntities;\r\n\r\n if (selectedMakes.length) {\r\n const makeIds = selectedMakes.map(({ id }) => id);\r\n models = this.state.modelEntities.filter(({ dependencyId }) => {\r\n return makeIds.includes(dependencyId!);\r\n });\r\n }\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n this.handleMakeEntitiesChange(newValue)}\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n \r\n this.handleStatusEntitiesChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n \r\n \r\n
\r\n {\r\n this.setState({\r\n vin: e.target.value\r\n });\r\n }}\r\n validators={['required']}\r\n label={this.cbContext.translatorService.Tranlate('CALCULATION_DETAILS_VIN', 'Vin')}\r\n />\r\n
\r\n
\r\n\r\n \r\n \r\n this.handleModelEntitiesChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n \r\n this.handleProvenanceEntitiesChange(newValue)\r\n }\r\n getOptionLabel={(option: Provenance) => option.type || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n );\r\n };\r\n\r\n closeDialog = async () => {\r\n this.setState(\r\n { \r\n isDialogOpen: false,\r\n attachments: [],\r\n importedVehicles: []\r\n },\r\n () => {\r\n this.loadVehicles(this.state.page, this.state.pageSize);\r\n }\r\n );\r\n };\r\n\r\n closeDialogAuction = () => {\r\n this.setState(\r\n { \r\n isDialogOpenAuction: false,\r\n auctionForm: { \r\n id: 0\r\n } as MavoVehicleAuction\r\n },\r\n async () => {\r\n await this.loadVehicles(this.state.page, this.state.pageSize)\r\n }\r\n );\r\n };\r\n\r\n closeDialogOrder = async () => {\r\n this.setState(\r\n {\r\n isDialogOpenOrder: false,\r\n orderForm: {\r\n id: 0\r\n } as MavoVehicleOrder \r\n },\r\n async () => {\r\n await this.loadVehicles(this.state.page, this.state.pageSize)\r\n }\r\n );\r\n };\r\n\r\n onRowDoubleClick = (\r\n dataIndex: number,\r\n rowIndex: number,\r\n columnIndex: number\r\n ) => {\r\n if (columnIndex == 1) {\r\n return;\r\n }\r\n const vehicle = this.state.vehiclesList.vehicles[dataIndex];\r\n this.props.history.push('/mavoVehicle/' + vehicle.id);\r\n };\r\n\r\n tableOptions = () => {\r\n return {\r\n filter: false,\r\n search: false,\r\n viewColumns: false,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.cbContext.translatorService),\r\n elevation: 0,\r\n serverSide: true,\r\n count: this.state.count,\r\n rowsPerPage: this.state.pageSize,\r\n page: this.state.page,\r\n onCellClick: (colData: any, cellMeta: any) => {\r\n if (cellMeta && cellMeta.colIndex !== null && cellMeta.rowIndex !== null) {\r\n // Set up a double-click event listener on the cell\r\n if (cellMeta.event.detail === 2) {\r\n this.onRowDoubleClick(cellMeta.dataIndex, cellMeta.rowIndex, cellMeta.colIndex);\r\n }\r\n }\r\n },\r\n onTableChange: async (action: any, tableState: any) => {\r\n switch (action) {\r\n case 'changePage':\r\n await this.loadVehicles(tableState.page, tableState.rowsPerPage);\r\n break;\r\n case 'changeRowsPerPage':\r\n await this.loadVehicles(tableState.page, tableState.rowsPerPage);\r\n break;\r\n case 'sort':\r\n break;\r\n default:\r\n }\r\n }\r\n };\r\n };\r\n\r\n importedTableOptions = () => {\r\n return {\r\n sort: true,\r\n filter: false,\r\n search: false,\r\n viewColumns: false,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.cbContext.translatorService),\r\n elevation: 0,\r\n count: this.state.count,\r\n rowsPerPage: this.state.pageSize,\r\n page: this.state.page\r\n };\r\n };\r\n\r\n handleUploadAttachment = async (e: React.ChangeEvent) => {\r\n try {\r\n const attachments = [...this.state.attachments];\r\n\r\n attachments.push({\r\n id: 0,\r\n file: e.target.files![0],\r\n fileName: e.target.files![0].name,\r\n uploadDate: new Date(),\r\n originalFileName: e.target.files![0].name\r\n });\r\n\r\n e.target.value = '';\r\n\r\n this.setState({\r\n attachments: attachments\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n handleDeleteAttachment = async (id: number, fileName: string) => {\r\n try {\r\n const attachments = [...this.state.attachments];\r\n const index = attachments.findIndex((item) => item.id === id);\r\n attachments.splice(index, 1);\r\n\r\n this.setState({\r\n attachments: attachments\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n canUpload = (): boolean => {\r\n const files = this.state.attachments;\r\n\r\n if (files.length >= 1) {\r\n return false;\r\n }\r\n\r\n return true;\r\n };\r\n\r\n handleImport = async () => {\r\n if (this.state.attachments.length === 0) {\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('ERROR_MSG_FILE_NOT_SELECTED', 'Va rugam sa selectati un fisier!'), {\r\n variant: 'error'\r\n });\r\n return;\r\n }\r\n this.setState({\r\n isLoadingImportVehicles: true,\r\n executing: true\r\n });\r\n\r\n\r\n const request = {\r\n attachments: this.state.attachments\r\n } as ImportMavoVehiclesRequestDto;\r\n\r\n try {\r\n const result = await this.cbContext.vehicleService.SaveImportedMavoVehicles(request);\r\n this.props.enqueueSnackbar(\r\n
\r\n

\r\n {this.cbContext.translatorService.Tranlate('MAVO_VEHICLES_VEHICLE_DATA_PROCESSED', 'Date tratate: ')}{' '}\r\n {result.totalVehiclesNum}\r\n

\r\n

\r\n {this.cbContext.translatorService.Tranlate('MAVO_VEHICLES_VEHICLE_TREATED_SUCCESSFULLY', 'Tratate cu succes: ')}{' '}\r\n {result.importedVehiclesNum}\r\n

\r\n
,\r\n {\r\n variant: 'info',\r\n autoHideDuration: 6000\r\n }\r\n );\r\n this.setState({\r\n importedVehicles: result.mavoVehicles,\r\n isLoadingImportVehicles: false,\r\n executing: false\r\n });\r\n\r\n } catch {\r\n this.props.enqueueSnackbar('There was an unexpected error while importing the vehicles', {\r\n variant: 'error',\r\n autoHideDuration: 6000\r\n });\r\n this.setState({\r\n isLoadingImportVehicles: false,\r\n executing: false\r\n });\r\n }\r\n };\r\n\r\n\r\n getImportedColumns = () => {\r\n return [\r\n {\r\n field: 'vin',\r\n title: this.cbContext.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_VIN',\r\n 'Vin'\r\n ),\r\n },\r\n {\r\n field: 'voEnterDate',\r\n title: this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_VEHICLE_VO_ENTER_DATE',\r\n 'Data intrare la VO'\r\n )\r\n },\r\n {\r\n field: 'makeName',\r\n title: this.cbContext.translatorService.Tranlate(\r\n 'VEHICLES_VEHICLE_MAKE',\r\n 'Marca'\r\n )\r\n },\r\n {\r\n field: 'modelName',\r\n title: this.cbContext.translatorService.Tranlate(\r\n 'VEHICLES_VEHICLE_MODEL',\r\n 'Model'\r\n )\r\n },\r\n {\r\n field: 'versionName',\r\n title: this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_VEHICLE_VERSION',\r\n 'Versiune'\r\n )\r\n },\r\n {\r\n field: 'colorName',\r\n title: this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_VEHICLE_COLOR',\r\n 'Culoare'\r\n )\r\n },\r\n {\r\n field: 'fabricationYear',\r\n title: this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_VEHICLE_FABRICATION_YEAR_FULL',\r\n 'An de fabricatie'\r\n )\r\n },\r\n {\r\n field: 'kilometersNr',\r\n title: this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_VEHICLE_KM',\r\n 'Km'\r\n )\r\n },\r\n {\r\n field: 'cylinderCapacity',\r\n title: this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_VEHICLE_CYLINDER_CAPACITY',\r\n 'Capacitate cilindrica'\r\n )\r\n },\r\n {\r\n field: 'horsePower',\r\n title: this.cbContext.translatorService.Tranlate(\r\n 'CAR_DETAILS_HORSE_POWER',\r\n 'Putere (CP)'\r\n )\r\n },\r\n {\r\n field: 'supplier',\r\n title: this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_VEHICLE_SUPPLIER',\r\n 'Furnizor'\r\n )\r\n },\r\n {\r\n field: 'provenanceType',\r\n title: this.cbContext.translatorService.Tranlate(\r\n 'MENU_NOMENCLATURES_TAB_PROVENANCE',\r\n 'Provenienta'\r\n )\r\n },\r\n {\r\n field: 'location',\r\n title: this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_VEHICLE_LOCATION',\r\n 'Locatie'\r\n )\r\n },\r\n {\r\n field: 'htPurchaseRonPrice',\r\n title: this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_VEHICLE_HT_PURCHASE_RON_PRICE',\r\n 'Pret cumparare HT'\r\n )\r\n },\r\n {\r\n field: 'ttcEvaluationEurPrice',\r\n title: this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_VEHICLE_EVALUATION_TTC_PRICE',\r\n 'Pret evaluare TTC'\r\n )\r\n },\r\n {\r\n field: 'reservations',\r\n title: this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_VEHICLE_RESERVATIONS',\r\n 'Rezervari'\r\n )\r\n },\r\n {\r\n field: 'nirNumber',\r\n title: this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_VEHICLE_NIR_NUMBER',\r\n 'Nr NIR'\r\n )\r\n },\r\n {\r\n field: 'observations',\r\n title: this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_VEHICLE_OBSERVATIONS',\r\n 'Observatii'\r\n )\r\n },\r\n {\r\n field: 'importMessage',\r\n title: this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_VEHICLE_IMPORT_MESSAGE',\r\n 'Rezultat import'\r\n )\r\n }\r\n ];\r\n }\r\n renderImportedResultBox = () => {\r\n return this.state.importedVehicles.length > 0 ? (\r\n \r\n }}\r\n />\r\n ) : '';\r\n }\r\n\r\n renderAttachmentBox = () => {\r\n return (\r\n \r\n \r\n {this.state.attachments.length !== 0\r\n ? this.state.attachments.map((attach, index) => {\r\n return (\r\n
\r\n
\r\n {\r\n console.log('download');\r\n }}\r\n >\r\n {attach.originalFileName}\r\n \r\n
\r\n
\r\n {\r\n this.handleDeleteAttachment(attach.id, attach.fileName);\r\n }}\r\n disabled={false}\r\n >\r\n \r\n \r\n
\r\n
\r\n );\r\n })\r\n : null}\r\n
\r\n \r\n \r\n {\r\n return this.handleUploadAttachment(e);\r\n }}\r\n type=\"file\"\r\n disabled={!this.canUpload()}\r\n />\r\n \r\n {this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_UPLOAD_FILE_BTN_LABEL',\r\n 'Uploadeaza fisier'\r\n )}\r\n \r\n \r\n \r\n
\r\n );\r\n };\r\n\r\n public renderImportContent() {\r\n return (\r\n \r\n {this.renderAttachmentBox()}\r\n
\r\n \r\n
\r\n {this.renderImportedResultBox()}\r\n
\r\n \r\n {this.cbContext.translatorService.Tranlate('MAVO_VEHICLE_IMPORT_CLOSE_BTN', 'Renunta')}\r\n \r\n \r\n
\r\n
\r\n );\r\n }\r\n\r\n handleCloseConfirmationDialog = () => {\r\n this.setState({\r\n isOpen: false,\r\n dialogVisible: false\r\n });\r\n };\r\n\r\n handleOpenConfirmationDialog = () => {\r\n this.setState({\r\n isOpen: true,\r\n dialogVisible: true\r\n });\r\n };\r\n\r\n handleCloseModal = () => {\r\n this.setState({\r\n isOpen: false,\r\n dialogVisible: false\r\n });\r\n };\r\n\r\n handleChangeAuction = (fieldName: string, isNumber: boolean) => (e: any, newValue?: IReferential | null) => {\r\n isNumber\r\n ? this.setState({\r\n auctionForm: {\r\n ...this.state.auctionForm,\r\n [fieldName]: parseFloat(newValue || e.target.value)\r\n }\r\n })\r\n : this.setState({\r\n auctionForm: {\r\n ...this.state.auctionForm,\r\n [fieldName]: newValue || e.target.value\r\n }\r\n });\r\n }\r\n\r\n handleChangeOrder = (fieldName: string, isNumber: boolean) => (e: any, newValue?: IReferential | null) => {\r\n isNumber\r\n ? this.setState({\r\n orderForm: {\r\n ...this.state.orderForm,\r\n [fieldName]: parseFloat(newValue || e.target.value)\r\n }\r\n })\r\n : this.setState({\r\n orderForm: {\r\n ...this.state.orderForm,\r\n [fieldName]: newValue || e.target.value\r\n }\r\n });\r\n }\r\n\r\n handleCountryChange = (newValue: IReferential | null) => {\r\n this.setState({\r\n orderForm: {\r\n ...this.state.orderForm,\r\n country: newValue,\r\n countryId: newValue !== null ? newValue!.id : null,\r\n region: null,\r\n regionId: null,\r\n city: null,\r\n cityId: null,\r\n }\r\n });\r\n };\r\n\r\n handleRegionChange = (newValue: IReferential | null) => {\r\n this.setState({\r\n orderForm: {\r\n ...this.state.orderForm,\r\n region: newValue,\r\n regionId: newValue !== null ? newValue!.id : null,\r\n city: null,\r\n cityId: null\r\n }\r\n });\r\n };\r\n\r\n handleCityChange = (newValue: IReferential | null) => {\r\n this.setState({\r\n orderForm: {\r\n ...this.state.orderForm,\r\n city: newValue,\r\n cityId: newValue !== null ? newValue!.id : null,\r\n }\r\n });\r\n };\r\n \r\n handleOrganizationChange = (newValue: Organization | null) => {\r\n this.setState({\r\n orderForm: {\r\n ...this.state.orderForm,\r\n organization: newValue,\r\n organizationId: newValue ? newValue!.id : null\r\n }\r\n });\r\n };\r\n \r\n handleOrderDateChange = (\r\n date: MaterialUiPickersDate | null,\r\n value?: string | null\r\n ) => {\r\n if (date === null || !date.isValid) {\r\n return;\r\n }\r\n\r\n const selectedDate = date ? date.format('YYYY-MM-DD') : undefined;\r\n\r\n this.setState({\r\n orderForm: {\r\n ...this.state.orderForm,\r\n orderDate: selectedDate || ''\r\n }\r\n });\r\n };\r\n\r\n handleAuctionStartDateChange = (\r\n date: MaterialUiPickersDate | null,\r\n value?: string | null\r\n ) => {\r\n if (date === null || !date.isValid) {\r\n return;\r\n }\r\n\r\n const selectedDate = date ? date.format('YYYY-MM-DD') : undefined;\r\n\r\n this.setState({\r\n auctionForm: {\r\n ...this.state.auctionForm,\r\n startDate: selectedDate || ''\r\n }\r\n });\r\n };\r\n\r\n handleAuctionEndDateChange = (\r\n date: MaterialUiPickersDate | null,\r\n value?: string | null\r\n ) => {\r\n if (date === null || !date.isValid) {\r\n return;\r\n }\r\n\r\n const selectedDate = date ? date.format('YYYY-MM-DD') : undefined;\r\n\r\n this.setState({\r\n auctionForm: {\r\n ...this.state.auctionForm,\r\n endDate: selectedDate || ''\r\n }\r\n });\r\n };\r\n \r\n public render() {\r\n this.cbContext = this.context as AppContext;\r\n\r\n if (this.state.isLoading) {\r\n return ;\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n \r\n
\r\n {this.renderMavoVehicleButtons()}\r\n
\r\n \r\n
\r\n {this.renderFilters()}\r\n {this.renderSearchButtons()}\r\n {this.state.isLoadingVehicles ? (\r\n \r\n ) : (\r\n \r\n \r\n \r\n )}\r\n {this.state.isDialogOpen ? (\r\n \r\n \r\n \r\n {this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_VEHICLE_IMPORT_VEHICLES',\r\n 'Import vehicule'\r\n )} \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.renderImportContent()}\r\n \r\n \r\n \r\n ) : (\r\n ''\r\n )}\r\n {this.state.isDialogOpenAuction ? (\r\n \r\n ) : (\r\n ''\r\n )}\r\n {this.state.isDialogOpenOrder ? (\r\n \r\n ) : (\r\n ''\r\n )} \r\n\r\n {this.state.selectedVehicle ? (\r\n \r\n \r\n \r\n \r\n {`${this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLE_DELETE_CONFIRMATION_MESSAGE',\r\n 'Ati selectat vehiculul '\r\n )} `}\r\n {this.state.selectedVehicle.vin!}\r\n {`${this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLE_DELETE_CONFIRMATION_MESSAGE_1',\r\n ' pentru stergere. Autorizati stergerea sa din baza de date?'\r\n )} `} \r\n \r\n \r\n \r\n {\r\n this.handleDeleteVehicle();\r\n }}\r\n disabled={this.state.isDeleteLoading}\r\n >\r\n {this.state.isDeleteLoading && (\r\n \r\n )}\r\n {this.cbContext.translatorService.Tranlate('VEHICLE_SEARCH_FORM_VEHICLE_YES', 'Da')}\r\n \r\n \r\n \r\n \r\n \r\n ): ''}\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n}\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app,\r\n mavoVehicleState: state.mavoVehicle\r\n }),\r\n{ ...MavoVehicleActionCreators }\r\n)(withSnackbar(MavoVehicles as any));","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { withSnackbar } from 'notistack';\r\nimport {\r\n Button,\r\n Grid\r\n} from '@material-ui/core';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport _ from 'lodash';\r\nimport { IMavoGeneralInformationContainerProps } from '../cases/vehicleDetails/IMavoGeneralInformationContainerProps';\r\nimport { IMavoGeneralInformationContainerState } from '../cases/vehicleDetails/IMavoGeneralInformationContainerState';\r\nimport { ApplicationState, CaseSettingsActionCreators, VehicleActionCreators } from '../../store';\r\nimport { MavoVehicleActionCreators } from '../../store/actions/MavoVehicle';\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport { Autocomplete } from '@material-ui/lab';\r\nimport { MavoVehicle, MavoVehicleAttachment, Provenance} from '../../interfaces/Vehicle';\r\nimport { DatePicker, MuiPickersUtilsProvider } from '@material-ui/pickers';\r\nimport moment from 'moment';\r\nimport * as R from 'ramda';\r\nimport MomentUtils from '@date-io/moment';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { IVehicleService } from '../../services/Interfaces/IVehicleService';\r\nimport { IReferentialService } from '../../services/Interfaces/IReferentialService';\r\nimport { CarDetailsSettings, MavoVehicleProvenanceType, MavoVehicleStatusCodeEnum, RefConstants, RoleClaimsEnum, disabledMavoVehicleStatuses, disabledNewMavoVehicleStatuses, mavoVehicleStatuses, mavoVehiclesForNirEnabled } from '../../helpers/Constants';\r\nimport { Utils } from '../../helpers/Utils';\r\nimport NumberFormat from 'react-number-format';\r\nimport { MaterialUiPickersDate } from '@material-ui/pickers/typings/date';\r\nimport { MavoVehicleDetailsProps } from '../cases/vehicleDetails/MavoVehicleDetailsProps';\r\n\r\n\r\nclass LocalizedUtils extends MomentUtils {\r\n // dateFormat = \"DD MM YYYY\";\r\n}\r\nclass MavoGeneralInformationContainer extends React.PureComponent<\r\n IMavoGeneralInformationContainerProps,\r\n IMavoGeneralInformationContainerState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private vehicleService!: IVehicleService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n isLoading: false,\r\n executing: false,\r\n isValuationOpen: false,\r\n selectedVehicle: null,\r\n brandTypes: [] as IReferential[],\r\n modelTypes: [] as IReferential[],\r\n bodyTypes: [] as IReferential[],\r\n versionTypes: [] as IReferential[],\r\n fuelTypes: [] as IReferential[],\r\n transmissionTypes: [] as IReferential[],\r\n colorTypes: [] as IReferential[],\r\n provenanceTypes: [] as Provenance[],\r\n vehicleAttachmentTypes: [] as IReferential[],\r\n datePickerFirstRegistrationError: '',\r\n isOpen: false,\r\n dialogVisible: false\r\n } as IMavoGeneralInformationContainerState;\r\n\r\n public componentDidMount() {\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadData();\r\n }\r\n );\r\n\r\n ValidatorForm.addValidationRule('isValidNumberOfKm', (value) => {\r\n if (value >= CarDetailsSettings.numberOfKm) {\r\n return false;\r\n }\r\n return true;\r\n });\r\n\r\n }\r\n\r\n NumberFormatCustom = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n allowNegative={false}\r\n thousandSeparator={false}\r\n decimalScale={0}\r\n />\r\n );\r\n };\r\n\r\n addMavoVehicleAttachments = async (mavoVehicleAttachments: MavoVehicleAttachment[], mavoVehicleId: number) => {\r\n if (mavoVehicleAttachments.length === 0) {\r\n return;\r\n }\r\n\r\n try {\r\n if (this.state.vehicleAttachmentTypes.length !== 0) {\r\n for (const attachemntType of this.state.vehicleAttachmentTypes) {\r\n const mavoVehicleAttachmentsGrouped = mavoVehicleAttachments.filter((x) => x.attachmentTypeId === attachemntType.id)\r\n .map((x) => { return { ...x, mavoVehicleId: mavoVehicleId } });\r\n if (mavoVehicleAttachmentsGrouped.length === 0) {\r\n continue;\r\n }\r\n const newFiles = await this.vehicleService.AddMavoVehicleAttachments(mavoVehicleAttachmentsGrouped);\r\n }\r\n }\r\n } catch (ex) {\r\n console.log(ex);\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n } \r\n\r\n }\r\n\r\n submitMavoVehicleData = async () => {\r\n try {\r\n this.setState({ executing: true, isLoading: true });\r\n if (this.props.mavoVehicleState.mavoVehicle.id === 0) {\r\n const vehicle = await this.vehicleService.GetMavoVehicleByVin(this.props.mavoVehicleState.mavoVehicle.vin);\r\n if (!R.isNil(vehicle)) {\r\n this.setState({ executing: false, isLoading: false });\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('MAVO_VEHICLE_EXISTS', \"Vehiculul cu acest vin este deja inregistrat!\"), \r\n { \r\n variant: 'warning' \r\n });\r\n return;\r\n } \r\n }\r\n\r\n let newVehicle = { ...this.props.mavoVehicleState.mavoVehicle } as MavoVehicle;\r\n const mavoVehicleAttachments = _.cloneDeep(this.props.mavoVehicleState.mavoVehicle.mavoVehicleAttachments);\r\n if (this.props.mavoVehicleState.mavoVehicle.id === 0) {\r\n newVehicle = await this.vehicleService.AddMavoVehicle(\r\n newVehicle\r\n );\r\n await this.addMavoVehicleAttachments(mavoVehicleAttachments, newVehicle.id);\r\n\r\n this.props.setMavoVehicleObject(newVehicle);\r\n this.props.history.push('/mavoVehicle/' + newVehicle.id);\r\n } else {\r\n newVehicle = await this.vehicleService.AddMavoVehicle({\r\n ...newVehicle,\r\n vehicleOptions: []\r\n });\r\n this.props.setMavoVehicleObject(newVehicle);\r\n }\r\n\r\n this.setState({ executing: false, isLoading: false });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (ex) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n } \r\n };\r\n\r\n handleBrandTypeChange = async (e: any, newValue: IReferential | null) => {\r\n this.props.setMavoVehicleObject({ \r\n ...this.props.mavoVehicleState.mavoVehicle, \r\n make: newValue,\r\n makeId: Utils.GetIdOrNull(newValue),\r\n model: null,\r\n modelId: null,\r\n bodyTypeRCR: null,\r\n bodyTypeRCRId: null\r\n });\r\n };\r\n\r\n handleModelTypeChange = async (e: any, newValue: IReferential | null) => {\r\n this.props.setMavoVehicleObject({ \r\n ...this.props.mavoVehicleState.mavoVehicle, \r\n model: newValue,\r\n modelId: Utils.GetIdOrNull(newValue),\r\n bodyTypeRCR: null,\r\n bodyTypeRCRId: null\r\n });\r\n };\r\n\r\n onChange =\r\n (fieldName: string, fieldNameId?: string) => (e: any, newValue?: IReferential | null) => {\r\n !R.isNil(fieldNameId)\r\n ? \r\n this.props.setMavoVehicleObject({ \r\n ...this.props.mavoVehicleState.mavoVehicle, \r\n [fieldName]: newValue || e.target.value,\r\n [fieldNameId]: Utils.GetIdOrNull(newValue)\r\n })\r\n : \r\n this.props.setMavoVehicleObject({ \r\n ...this.props.mavoVehicleState.mavoVehicle, \r\n [fieldName]: newValue || e.target.value\r\n })\r\n };\r\n\r\n onChangeProvenance =\r\n (fieldName: string, fieldNameId?: string) => (e: any, newValue?: Provenance | null) => {\r\n !R.isNil(fieldNameId)\r\n ? this.props.setMavoVehicleObject({ \r\n ...this.props.mavoVehicleState.mavoVehicle, \r\n [fieldName]: newValue || e.target.value,\r\n [fieldNameId]: Utils.GetProvenanceIdOrNull(newValue)\r\n })\r\n :\r\n this.props.setMavoVehicleObject({ \r\n ...this.props.mavoVehicleState.mavoVehicle, \r\n [fieldName]: newValue || e.target.value\r\n })\r\n };\r\n\r\n validateFirstRegistrationDate = (selectedDate?: string): string => {\r\n let error = '';\r\n\r\n if (!selectedDate) {\r\n error = this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu');\r\n } else {\r\n const currentDate = moment().format('YYYY-MM-DD');\r\n if (currentDate && selectedDate > currentDate) {\r\n error = this.translatorService.Tranlate(\r\n 'CAR_DETAILS_YEAR_OF_FIRST_REGISTRATION_ERROR',\r\n 'Data primei inmatriculari trebuie sa fie mai mica decat data curenta'\r\n );\r\n }\r\n }\r\n\r\n this.setState({\r\n datePickerFirstRegistrationError: error\r\n });\r\n\r\n this.props.setMavoVehicleObject({\r\n ...this.props.mavoVehicleState.mavoVehicle,\r\n firstRegistrationDate: selectedDate || null\r\n });\r\n\r\n return error;\r\n };\r\n\r\n handleFirstRegistrationDateChange = (\r\n date: MaterialUiPickersDate | null,\r\n value?: string | null\r\n ) => {\r\n if (date === null || !date.isValid) {\r\n return;\r\n }\r\n\r\n const selectedDate = date ? date.format('YYYY-MM-DD') : undefined;\r\n this.validateFirstRegistrationDate(selectedDate);\r\n };\r\n\r\n \r\n handleCloseConfirmationDialog = () => {\r\n this.setState({\r\n isOpen: false,\r\n dialogVisible: false\r\n });\r\n };\r\n\r\n handleOpenConfirmationDialog = () => {\r\n this.setState({\r\n isOpen: true,\r\n dialogVisible: true\r\n });\r\n };\r\n\r\n handleCloseModal = () => {\r\n this.setState({\r\n isOpen: false,\r\n dialogVisible: false\r\n });\r\n };\r\n \r\n loadData = async () => {\r\n const {\r\n vehicleMakeRef,\r\n bodyTypeRCRRef,\r\n transmissionTypeRef,\r\n modelRef,\r\n colorRCRRef,\r\n versionRef,\r\n vehicleAttachmentTypeRef\r\n } = RefConstants;\r\n\r\n const [\r\n vehicleMakeList,\r\n bodyTypeList,\r\n transmissionTypeList,\r\n fuelTypeList,\r\n modelTypesList,\r\n colorTypeList,\r\n versionTypeList,\r\n provenanceTypeList,\r\n vehicleAttachmentTypeList\r\n ] = await Promise.all([\r\n this.appReferentialService.Get(vehicleMakeRef?.baseUrl),\r\n this.appReferentialService.Get(bodyTypeRCRRef!.baseUrl),\r\n this.appReferentialService.Get(transmissionTypeRef!.baseUrl),\r\n this.vehicleService.GetRCRFuelTypes(),\r\n this.appReferentialService.Get(modelRef!.baseUrl),\r\n this.appReferentialService.Get(colorRCRRef!.baseUrl),\r\n this.appReferentialService.Get(versionRef!.baseUrl),\r\n this.vehicleService.GetProvenances(),\r\n this.appReferentialService.Get(vehicleAttachmentTypeRef!.baseUrl)\r\n ]);\r\n\r\n if (this.props.mavoVehicleState.mavoVehicle.id === 0) {\r\n if (this.props.mavoVehicleState.mavoVehicle.provenanceId === null) {\r\n const dvsProvenance = provenanceTypeList.find(x => x.type === MavoVehicleProvenanceType.DVS);\r\n if (dvsProvenance) {\r\n this.props.setMavoVehicleObject({\r\n ...this.props.mavoVehicleState.mavoVehicle,\r\n provenance: dvsProvenance,\r\n provenanceId: dvsProvenance.id\r\n });\r\n }\r\n }\r\n }\r\n \r\n const sortedMakeList = vehicleMakeList.sort((a, b) => a.displayName.toLowerCase().localeCompare(b.displayName.toLowerCase()));\r\n\r\n this.setState({\r\n isLoading: false,\r\n brandTypes: sortedMakeList,\r\n bodyTypes: bodyTypeList,\r\n transmissionTypes: transmissionTypeList,\r\n fuelTypes: fuelTypeList,\r\n modelTypes: modelTypesList as IReferential[],\r\n colorTypes: colorTypeList,\r\n versionTypes: versionTypeList,\r\n provenanceTypes: provenanceTypeList as Provenance[],\r\n vehicleAttachmentTypes: vehicleAttachmentTypeList\r\n });\r\n };\r\n\r\n convertKwToHp = (kw: number) => (R.isEmpty(kw) ? '' : Math.round(kw * 1.36));\r\n convertHpToKw = (hp: number) => (R.isEmpty(hp) ? '' : Math.round(hp / 1.36));\r\n\r\n handlePowerChange = (e: any) => {\r\n this.props.setMavoVehicleObject({\r\n ...this.props.mavoVehicleState.mavoVehicle,\r\n power: e.target.value,\r\n horsePower: this.convertKwToHp(e.target.value)\r\n });\r\n };\r\n\r\n handleHPChange = (e: any) => {\r\n this.props.setMavoVehicleObject({\r\n ...this.props.mavoVehicleState.mavoVehicle,\r\n horsePower: e.target.value,\r\n power: this.convertHpToKw(e.target.value)\r\n });\r\n };\r\n\r\n\r\n handleFabricationYearChange = (e: any) => {\r\n this.props.setMavoVehicleObject({\r\n ...this.props.mavoVehicleState.mavoVehicle,\r\n fabricationYear: e.target.value\r\n });\r\n };\r\n\r\n handleChassisNumberChange = (e: any) => {\r\n const vin = e.target.value;\r\n this.props.setMavoVehicleObject({ ...this.props.mavoVehicleState.mavoVehicle, vin: e.target.value});\r\n if(R.test(/^(?=.*[0-9])(?=.*[abcdefghjklmnprstuvwxyzABCDEFGHJKLMNPRSTUVWXYZ])[0-9abcdefghjklmnprstuvwxyzABCDEFGHJKLMNPRSTUVWXYZ-]{17}$/, vin)) {\r\n this.props.setMavoVehicleObject({ \r\n ...this.props.mavoVehicleState.mavoVehicle, \r\n vin: e.target.value,\r\n make: null,\r\n makeId: null,\r\n model: null,\r\n modelId: null,\r\n versionItem: null,\r\n versionId: null,\r\n colorRCR: null,\r\n colorRCRId: null,\r\n fuelType: null,\r\n fuelTypeId: null,\r\n bodyTypeRCRId: null,\r\n bodyTypeRCR: null,\r\n transmissionTypeId: null,\r\n transmissionType: null,\r\n firstRegistrationDate: null,\r\n fabricationYear: null,\r\n kilometersNr: null,\r\n power: null,\r\n engineManufactureCode: null,\r\n accessories: null\r\n });\r\n }\r\n };\r\n\r\n chassisNumberValidation = async () => {\r\n if (!R.test(/^(?=.*[0-9])(?=.*[abcdefghjklmnprstuvwxyzABCDEFGHJKLMNPRSTUVWXYZ])[0-9abcdefghjklmnprstuvwxyzABCDEFGHJKLMNPRSTUVWXYZ-]{17}$/, this.props.mavoVehicleState.mavoVehicle.vin)) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('INVALID_CAR_VIN_IDENTIFICATOR', \"Te rugăm să te asiguri că seria de șasiu introdusă are 17 caractere alfanumerice și nu conține spații sau literele 'O' sau 'I'!\"), \r\n { \r\n variant: 'warning' \r\n });\r\n return;\r\n }\r\n const vehicle = await this.vehicleService.GetMavoVehicleByVin(this.props.mavoVehicleState.mavoVehicle.vin);\r\n if (!R.isNil(vehicle)) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('MAVO_VEHICLE_EXISTS', \"Vehiculul cu acest vin este deja inregistrat!\"), \r\n { \r\n variant: 'warning' \r\n });\r\n return;\r\n } \r\n }\r\n\r\n private getModelsOptions(): IReferential[] {\r\n const filteredModelTypes = this.state.modelTypes\r\n .filter(\r\n (model) => model.dependencyId === this.props.mavoVehicleState.mavoVehicle.makeId\r\n )\r\n .sort((a, b) => a.displayName.toLowerCase().localeCompare(b.displayName.toLowerCase()));\r\n if (!R.isEmpty(filteredModelTypes)) return filteredModelTypes;\r\n\r\n return [];\r\n }\r\n\r\n\r\n private getVersionsOptions(): IReferential[] {\r\n const filteredVersionTypes = this.state.versionTypes.filter(\r\n (version) => version.modelId === this.props.mavoVehicleState.mavoVehicle.modelId\r\n );\r\n if (!R.isEmpty(filteredVersionTypes)) return filteredVersionTypes;\r\n\r\n return [];\r\n }\r\n\r\n isDisabled = (): boolean => {\r\n //1.2\tActualizare/adaugare\r\n if (this.props.mavoVehicleState.mavoVehicle.id === 0) {\r\n //Nu pot fi modificate informatii vehicul din tab-urile «Informatii generale», «Stare vehicul», \r\n //«Despre vehicul (Dotari)» si «Date STOC» daca vehiculul este in una din starile : «Licitatie», «Comanda», «Aviz», «Factura»\r\n return disabledNewMavoVehicleStatuses.includes(this.props.mavoVehicleState.mavoVehicle.currentStatus!.status!.code ?? '') ? true : false;\r\n } else {\r\n //daca vehiculul este in stare “Licitatie”, se pot actualiza doar informatiile «Stare vehicul», «Despre vehicul (Dotari)» si «Poze» \r\n if (this.props.mavoVehicleState.mavoVehicle.currentStatus!.status!.code === MavoVehicleStatusCodeEnum.LICITATIE.toString()) {\r\n return true;\r\n }\r\n //daca vehiculul este in orice alta stare («Comanda», «Aviz», «Factura»), nu se pot actualiza nici un fel de informatii referitoare la acest vehicul\r\n return disabledMavoVehicleStatuses.includes(this.props.mavoVehicleState.mavoVehicle.currentStatus!.status!.code ?? '') ? true : false;\r\n }\r\n };\r\n\r\n\r\n isDisabledVin = (): boolean => {\r\n //1.3\tActualizare/modificare\r\n //daca vehiculul nu este in stare «Licitatie», «Comanda», «Aviz», «Factura», se poate actualiza orice informatie, \r\n //exceptie Cod VIN + Marca + Model\r\n return disabledNewMavoVehicleStatuses.includes(this.props.mavoVehicleState.mavoVehicle.currentStatus!.status!.code ?? '') ? true : false;\r\n }\r\n \r\n private getBodiesOptions(): IReferential[] {\r\n return this.state.bodyTypes ?? [];\r\n }\r\n\r\n public hasRight = (right: string): boolean => {\r\n return this.props.appState!.user!.profile.role.includes(right);\r\n };\r\n\r\n renderGeneralInformationForm = () => {\r\n return (\r\n {\r\n this.submitMavoVehicleData();\r\n }}\r\n >\r\n
\r\n \r\n \r\n \r\n \r\n \r\n option.displayName || ''}\r\n getOptionSelected={(option, value) => option?.id === value?.id}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n\r\n \r\n \r\n option.displayName || ''}\r\n getOptionSelected={(option, value) => option?.id === value?.id}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n option.displayName || ''}\r\n getOptionSelected={(option, value) => option?.id === value?.id}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n\r\n \r\n \r\n option.displayName || ''}\r\n getOptionSelected={(option, value) => option?.id === value?.id}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n this.onChange('engineManufactureCode')(e)}\r\n label={this.translatorService.Tranlate(\r\n 'MAVO_VEHICLE_MANUFACTURE_CODE',\r\n 'Motor'\r\n )}\r\n />\r\n \r\n \r\n\r\n \r\n \r\n option.displayName || ''}\r\n getOptionSelected={(option, value) => option?.id === value?.id}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n option.displayName || ''}\r\n getOptionSelected={(option, value) => option?.id === value?.id}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n {\r\n this.handleHPChange(e);\r\n }}\r\n label={this.translatorService.Tranlate('CAR_DETAILS_HORSE_POWER', 'Putere (CP)')}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n new Date(this.props.mavoVehicleState.mavoVehicle.firstRegistrationDate).getFullYear()\r\n ? true\r\n : false\r\n }\r\n helperText={\r\n this.props.mavoVehicleState.mavoVehicle.fabricationYear &&\r\n this.props.mavoVehicleState.mavoVehicle.firstRegistrationDate &&\r\n this.props.mavoVehicleState.mavoVehicle.fabricationYear >\r\n new Date(this.props.mavoVehicleState.mavoVehicle.firstRegistrationDate).getFullYear()\r\n ? this.translatorService.Tranlate(\r\n 'MAVO_FABRICATION_DATE_ERROR',\r\n 'Anul fabricatiei trebuie sa fie mai mic decat anul primei inmatriculari'\r\n )\r\n : ''\r\n }\r\n /> \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n this.onChange('kilometersNr')(e)}\r\n validators={['isValidNumberOfKm']}\r\n errorMessages={[\r\n this.translatorService.Tranlate(\r\n 'CAR_DETAILS_NUMBER_OF_KILOMETERS_ERROR',\r\n 'Numarul de kilometri nu trebuie sa fie mai mare de 1000000'\r\n )\r\n ]}\r\n label={this.translatorService.Tranlate(\r\n 'CAR_DETAILS_NUMBER_OF_KILOMETERS',\r\n 'Numar kilometri'\r\n )}\r\n InputProps={{\r\n inputComponent: this.NumberFormatCustom\r\n }}\r\n />\r\n \r\n \r\n option.displayName || ''}\r\n getOptionSelected={(option, value) => option?.id === value?.id}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n\r\n \r\n \r\n this.onChange('accessories')(e)}\r\n label={this.translatorService.Tranlate('MAVO_VEHICLE_ACCESORIES', 'Accesorii')}\r\n />\r\n \r\n \r\n option.type || ''}\r\n getOptionSelected={(option, value) => option?.id === value?.id}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n {\r\n this.props.mavoVehicleAuction && this.props.mavoVehicleAuction.id !== 0 ?\r\n (\r\n \r\n \r\n this.onChange('observations')(e)}\r\n label={this.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_OBSERVATIONS',\r\n 'Observatii'\r\n )}\r\n multiline\r\n variant=\"outlined\"\r\n rows={6}\r\n />\r\n \r\n \r\n ) : null\r\n }\r\n \r\n
\r\n {this.hasRight(RoleClaimsEnum.MavoAgent) ? null : (\r\n
\r\n \r\n {this.translatorService.Tranlate('SAVE', 'Salveaza')}\r\n \r\n
\r\n )}\r\n \r\n );\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.vehicleService = (this.context as AppContext).vehicleService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n
{this.renderGeneralInformationForm()}
\r\n ) : null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (\r\n state: ApplicationState,\r\n ownProps: MavoVehicleDetailsProps\r\n ) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app,\r\n vehicleState: state.vehicle,\r\n mavoVehicle: state.mavoVehicle,\r\n ...ownProps\r\n }),\r\n { ...CaseSettingsActionCreators, ...VehicleActionCreators, ...MavoVehicleActionCreators }\r\n)(withSnackbar(MavoGeneralInformationContainer as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { withSnackbar } from 'notistack';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport _ from 'lodash';\r\nimport { ApplicationState, CaseSettingsActionCreators, VehicleActionCreators } from '../../store';\r\nimport { MavoVehicleActionCreators } from '../../store/actions/MavoVehicle';\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { MavoVehicleOptionDetailsProps } from '../cases/vehicleDetails/MavoVehicleDetailsProps';\r\nimport { IMavoVehicleOptionsContainerProps } from '../cases/vehicleDetails/IMavoVehicleOptionsContainerProps';\r\nimport { Checkbox, Grid } from '@material-ui/core';\r\nimport { MavoVehicleStatusCodeEnum, RefConstants, disabledMavoVehicleStatuses, disabledNewMavoVehicleStatuses } from '../../helpers/Constants';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport { Autocomplete } from '@material-ui/lab';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport * as R from 'ramda';\r\nimport { Utils } from '../../helpers/Utils';\r\nimport { IReferentialService } from '../../services/Interfaces/IReferentialService';\r\nimport NumberFormat from 'react-number-format';\r\n\r\ninterface IMavoVehicleOptionsContainerState {\r\n isLoading: boolean;\r\n executing: boolean;\r\n isOpen: boolean;\r\n dialogVisible: boolean;\r\n isDisabled: boolean;\r\n vehicleTypes: IReferential[];\r\n}\r\n\r\nclass MavoVehicleOptionsContainer extends React.PureComponent<\r\n IMavoVehicleOptionsContainerProps,\r\n IMavoVehicleOptionsContainerState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n isLoading: false,\r\n executing: false,\r\n isValuationOpen: false,\r\n isOpen: false,\r\n dialogVisible: false,\r\n isDisabled: false,\r\n vehicleTypes: [] as IReferential[]\r\n } as IMavoVehicleOptionsContainerState;\r\n\r\n public componentDidMount() {\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadData();\r\n }\r\n );\r\n\r\n }\r\n\r\n loadData = async () => {\r\n const {\r\n vehicleTypeRef\r\n } = RefConstants;\r\n\r\n const vehicleTypes = await this.appReferentialService.Get(vehicleTypeRef!.baseUrl);\r\n \r\n this.setState(\r\n {\r\n isLoading: false,\r\n isDisabled: this.isDisabled(),\r\n vehicleTypes: vehicleTypes\r\n }\r\n );\r\n\r\n };\r\n\r\n isDisabled = (): boolean => {\r\n if (this.props.disabled) {\r\n return true;\r\n }\r\n \r\n //1.2\tActualizare/adaugare\r\n if (this.props.mavoVehicleState.mavoVehicle.id === 0) {\r\n //Nu pot fi modificate informatii vehicul din tab-urile «Informatii generale», «Stare vehicul», \r\n //«Despre vehicul (Dotari)» si «Date STOC» daca vehiculul este in una din starile : «Licitatie», «Comanda», «Aviz», «Factura»\r\n return disabledNewMavoVehicleStatuses.includes(this.props.mavoVehicleState.mavoVehicle.currentStatus!.status!.code ?? '') ? true : false;\r\n } else {\r\n //daca vehiculul este in stare “Licitatie”, se pot actualiza doar informatiile «Stare vehicul», «Despre vehicul (Dotari)» si «Poze» \r\n if (this.props.mavoVehicleState.mavoVehicle.currentStatus!.status!.code === MavoVehicleStatusCodeEnum.LICITATIE.toString()) {\r\n return false;\r\n }\r\n //daca vehiculul este in orice alta stare («Comanda», «Aviz», «Factura»), nu se pot actualiza nici un fel de informatii referitoare la acest vehicul\r\n return disabledMavoVehicleStatuses.includes(this.props.mavoVehicleState.mavoVehicle.currentStatus!.status!.code ?? '') ? true : false;\r\n }\r\n };\r\n\r\n onChange =\r\n (fieldName: string, fieldNameId?: string) => (e: any, newValue?: IReferential | null) => {\r\n !R.isNil(fieldNameId)\r\n ? \r\n this.props.setMavoVehicleObject({ \r\n ...this.props.mavoVehicleState.mavoVehicle, \r\n vehicleOptionInfo: {\r\n ...this.props.mavoVehicleState.mavoVehicle.vehicleOptionInfo, \r\n [fieldName]: newValue || e.target.value,\r\n [fieldNameId]: Utils.GetIdOrNull(newValue)\r\n }\r\n })\r\n : \r\n this.props.setMavoVehicleObject({ \r\n ...this.props.mavoVehicleState.mavoVehicle, \r\n vehicleOptionInfo: {\r\n ...this.props.mavoVehicleState.mavoVehicle.vehicleOptionInfo, \r\n [fieldName]: newValue || e.target.value\r\n }\r\n })\r\n };\r\n\r\n onCheckBoxChange =\r\n (fieldName: string) => (checked: boolean) => {\r\n this.props.setMavoVehicleObject({ \r\n ...this.props.mavoVehicleState.mavoVehicle, \r\n vehicleOptionInfo: {\r\n ...this.props.mavoVehicleState.mavoVehicle.vehicleOptionInfo, \r\n [fieldName]: checked\r\n }\r\n })\r\n };\r\n\r\n\r\n NumberFormatCustom = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n allowNegative={false}\r\n thousandSeparator={false}\r\n decimalScale={0}\r\n />\r\n );\r\n };\r\n\r\n onVehicleChange =\r\n (fieldName: string, fieldNameId?: string) => (e: any, newValue?: IReferential | null) => {\r\n !R.isNil(fieldNameId)\r\n ? \r\n this.props.setMavoVehicleObject({ \r\n ...this.props.mavoVehicleState.mavoVehicle, \r\n [fieldName]: newValue || e.target.value,\r\n [fieldNameId]: Utils.GetIdOrNull(newValue)\r\n })\r\n : \r\n this.props.setMavoVehicleObject({ \r\n ...this.props.mavoVehicleState.mavoVehicle, \r\n [fieldName]: newValue || e.target.value\r\n })\r\n };\r\n\r\n rendeVehicleOptionForm = () => {\r\n return (\r\n {\r\n // this.submitCaseVehicleDetailsData(e);\r\n }}\r\n >\r\n
\r\n \r\n \r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n\r\n \r\n
!this.state.isDisabled && this.onCheckBoxChange('alarm')(!this.props.vehicleOptionInfo.alarm)} \r\n style={{\r\n cursor: this.state.isDisabled ? 'not-allowed' : 'pointer',\r\n userSelect: 'none'\r\n }}\r\n >\r\n {this.translatorService.Tranlate('VEHICLE_OPTION_ALARM', 'Alarma')}\r\n
\r\n this.onCheckBoxChange('alarm')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n edge=\"end\"\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n\r\n \r\n
!this.state.isDisabled && this.onCheckBoxChange('towHook')(!this.props.vehicleOptionInfo.towHook)} \r\n style={{\r\n cursor: this.state.isDisabled ? 'not-allowed' : 'pointer',\r\n userSelect: 'none'\r\n }}\r\n >\r\n {this.translatorService.Tranlate('VEHICLE_OPTION_TOW_HOOK', 'Carlig de remorcare')}\r\n
\r\n this.onCheckBoxChange('towHook')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n edge=\"end\"\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n\r\n \r\n
!this.state.isDisabled && this.onCheckBoxChange('heatedSeats')(!this.props.vehicleOptionInfo.heatedSeats)} \r\n style={{\r\n cursor: this.state.isDisabled ? 'not-allowed' : 'pointer',\r\n userSelect: 'none'\r\n }}\r\n >\r\n {this.translatorService.Tranlate('VEHICLE_OPTION_HEATED_SEATS', 'Scaune incalzite')}\r\n
\r\n this.onCheckBoxChange('heatedSeats')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n edge=\"end\"\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n
\r\n\r\n \r\n \r\n {\r\n this.onVehicleChange('cylinderCapacity')(e);\r\n }}\r\n label={this.translatorService.Tranlate('VEHICLE_OPTIONS_ENGINE_CAPACITY', 'Cilindree')}\r\n InputProps={{\r\n inputComponent: this.NumberFormatCustom\r\n }}\r\n />\r\n \r\n\r\n \r\n
!this.state.isDisabled && this.onCheckBoxChange('antiTheft')(!this.props.vehicleOptionInfo.antiTheft)} \r\n style={{\r\n cursor: this.state.isDisabled ? 'not-allowed' : 'pointer',\r\n userSelect: 'none'\r\n }}\r\n >\r\n {this.translatorService.Tranlate('VEHICLE_OPTION_ANTI_THEFT', 'Antifurt')} \r\n
\r\n this.onCheckBoxChange('antiTheft')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n edge=\"end\"\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n\r\n \r\n
!this.state.isDisabled && this.onCheckBoxChange('protectionFrame')(!this.props.vehicleOptionInfo.protectionFrame)} \r\n style={{\r\n cursor: this.state.isDisabled ? 'not-allowed' : 'pointer',\r\n userSelect: 'none'\r\n }}\r\n >\r\n {this.translatorService.Tranlate('VEHICLE_OPTION_PROTECTION_FRAME', 'Cablu de protectie')}\r\n
\r\n this.onCheckBoxChange('protectionFrame')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n edge=\"end\"\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n\r\n \r\n
!this.state.isDisabled && this.onCheckBoxChange('rainSensors')(!this.props.vehicleOptionInfo.rainSensors)} \r\n style={{\r\n cursor: this.state.isDisabled ? 'not-allowed' : 'pointer',\r\n userSelect: 'none'\r\n }}\r\n >\r\n {this.translatorService.Tranlate('VEHICLE_OPTION_RAIN_SENSORS', 'Senzori de ploaie')}\r\n
\r\n this.onCheckBoxChange('rainSensors')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n edge=\"end\"\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n
\r\n\r\n \r\n \r\n {\r\n this.onChange('emissionsClass')(e);\r\n }}\r\n label={this.translatorService.Tranlate('VEHICLE_OPTIONS_EMISSIONS_CLASS', 'Clasa de poluare')}\r\n />\r\n \r\n\r\n \r\n
!this.state.isDisabled && this.onCheckBoxChange('abs')(!this.props.vehicleOptionInfo.abs)} \r\n style={{\r\n cursor: this.state.isDisabled ? 'not-allowed' : 'pointer',\r\n userSelect: 'none'\r\n }}\r\n >\r\n {this.translatorService.Tranlate('VEHICLE_OPTION_ABS', 'ABS')} \r\n
\r\n this.onCheckBoxChange('abs')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n edge=\"end\"\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n\r\n \r\n
!this.state.isDisabled && this.onCheckBoxChange('steeringWheelControls')(!this.props.vehicleOptionInfo.steeringWheelControls)} \r\n style={{\r\n cursor: this.state.isDisabled ? 'not-allowed' : 'pointer',\r\n userSelect: 'none'\r\n }}\r\n >\r\n {this.translatorService.Tranlate('VEHICLE_OPTION_STEERING_WHEEL_CONTROLS', 'Comenzi pe volan')}\r\n
\r\n this.onCheckBoxChange('steeringWheelControls')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n edge=\"end\"\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n\r\n \r\n
!this.state.isDisabled && this.onCheckBoxChange('parkingSensors')(!this.props.vehicleOptionInfo.parkingSensors)} \r\n style={{\r\n cursor: this.state.isDisabled ? 'not-allowed' : 'pointer',\r\n userSelect: 'none'\r\n }}\r\n >\r\n {this.translatorService.Tranlate('VEHICLE_OPTION_PARKING_SENSORS', 'Senzori de parcare')}\r\n
\r\n this.onCheckBoxChange('parkingSensors')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n edge=\"end\"\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n
\r\n\r\n \r\n \r\n {\r\n this.onChange('doorCount')(e);\r\n }}\r\n label={this.translatorService.Tranlate('VEHICLE_OPTIONS_DOOR_COUNT', 'Numar portiere')}\r\n InputProps={{\r\n inputComponent: this.NumberFormatCustom\r\n }}\r\n />\r\n \r\n\r\n \r\n
!this.state.isDisabled && this.onCheckBoxChange('esp')(!this.props.vehicleOptionInfo.esp)} \r\n style={{\r\n cursor: this.state.isDisabled ? 'not-allowed' : 'pointer',\r\n userSelect: 'none'\r\n }}\r\n >\r\n {this.translatorService.Tranlate('VEHICLE_OPTION_ESP', 'ESP')} \r\n
\r\n this.onCheckBoxChange('esp')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n edge=\"end\"\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n\r\n \r\n
!this.state.isDisabled && this.onCheckBoxChange('onBoardComputer')(!this.props.vehicleOptionInfo.onBoardComputer)} \r\n style={{\r\n cursor: this.state.isDisabled ? 'not-allowed' : 'pointer',\r\n userSelect: 'none'\r\n }}\r\n >\r\n {this.translatorService.Tranlate('VEHICLE_OPTION_ON_BOARD_COMPUTER', 'Computer pe bord')}\r\n
\r\n this.onCheckBoxChange('onBoardComputer')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n edge=\"end\"\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n\r\n \r\n
!this.state.isDisabled && this.onCheckBoxChange('powerSteering')(!this.props.vehicleOptionInfo.powerSteering)} \r\n style={{\r\n cursor: this.state.isDisabled ? 'not-allowed' : 'pointer',\r\n userSelect: 'none'\r\n }}\r\n >\r\n {this.translatorService.Tranlate('VEHICLE_OPTION_POWER_STEERING', 'Servodirectie')}\r\n
\r\n this.onCheckBoxChange('powerSteering')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n edge=\"end\"\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n
\r\n\r\n \r\n \r\n {\r\n this.onChange('seatCount')(e);\r\n }}\r\n label={this.translatorService.Tranlate('VEHICLE_OPTIONS_SEAT_COUNT', 'Numar locuri')}\r\n InputProps={{\r\n inputComponent: this.NumberFormatCustom\r\n }}\r\n />\r\n \r\n\r\n \r\n
!this.state.isDisabled && this.onCheckBoxChange('driverFrontAirbag')(!this.props.vehicleOptionInfo.driverFrontAirbag)} \r\n style={{\r\n cursor: this.state.isDisabled ? 'not-allowed' : 'pointer',\r\n userSelect: 'none'\r\n }}\r\n >\r\n {this.translatorService.Tranlate('VEHICLE_OPTION_DRIVER_FRONT_AIRBAG', 'Airbag frontal sofer')} \r\n
\r\n this.onCheckBoxChange('driverFrontAirbag')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n edge=\"end\"\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n\r\n \r\n
!this.state.isDisabled && this.onCheckBoxChange('cruiseControl')(!this.props.vehicleOptionInfo.cruiseControl)} \r\n style={{\r\n cursor: this.state.isDisabled ? 'not-allowed' : 'pointer',\r\n userSelect: 'none'\r\n }}\r\n >\r\n {this.translatorService.Tranlate('VEHICLE_OPTION_CRUISE_CONTROL', 'Cruise control')}\r\n
\r\n this.onCheckBoxChange('cruiseControl')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n edge=\"end\"\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n\r\n \r\n
!this.state.isDisabled && this.onCheckBoxChange('sunroof')(!this.props.vehicleOptionInfo.sunroof)} \r\n style={{\r\n cursor: this.state.isDisabled ? 'not-allowed' : 'pointer',\r\n userSelect: 'none'\r\n }}\r\n >\r\n {this.translatorService.Tranlate('VEHICLE_OPTION_SUN_ROOF', 'Trapa')}\r\n
\r\n this.onCheckBoxChange('sunroof')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n edge=\"end\"\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n
\r\n\r\n \r\n \r\n {\r\n this.onChange('driveType')(e);\r\n }}\r\n label={this.translatorService.Tranlate('VEHICLE_OPTIONS_DRIVE_TYPE', 'Tractiune')}\r\n />\r\n \r\n\r\n \r\n
!this.state.isDisabled && this.onCheckBoxChange('passengerFrontAirbag')(!this.props.vehicleOptionInfo.passengerFrontAirbag)} \r\n style={{\r\n cursor: this.state.isDisabled ? 'not-allowed' : 'pointer',\r\n userSelect: 'none'\r\n }}\r\n >\r\n {this.translatorService.Tranlate('VEHICLE_OPTION_PASSENGER_FRONT_AIRBAG', 'Airbag frontal pasager')} \r\n
\r\n this.onCheckBoxChange('passengerFrontAirbag')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n edge=\"end\"\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n\r\n \r\n
!this.state.isDisabled && this.onCheckBoxChange('lockableDifferential')(!this.props.vehicleOptionInfo.lockableDifferential)} \r\n style={{\r\n cursor: this.state.isDisabled ? 'not-allowed' : 'pointer',\r\n userSelect: 'none'\r\n }}\r\n >\r\n {this.translatorService.Tranlate('VEHICLE_OPTION_LOCKABLE_DIFFERENTIAL', 'Diferential blocabil')}\r\n
\r\n this.onCheckBoxChange('lockableDifferential')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n edge=\"end\"\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n\r\n \r\n
!this.state.isDisabled && this.onCheckBoxChange('rightHandDrive')(!this.props.vehicleOptionInfo.rightHandDrive)} \r\n style={{\r\n cursor: this.state.isDisabled ? 'not-allowed' : 'pointer',\r\n userSelect: 'none'\r\n }}\r\n >\r\n {this.translatorService.Tranlate('VEHICLE_OPTION_RIGHT_HAND_DRIVE', 'Volan dreapta')}\r\n
\r\n this.onCheckBoxChange('rightHandDrive')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n edge=\"end\"\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n
\r\n\r\n \r\n \r\n {\r\n this.onChange('registration')(e);\r\n }}\r\n label={this.translatorService.Tranlate('VEHICLE_OPTIONS_REGISTRATION', 'Inmatriculare')}\r\n />\r\n \r\n\r\n \r\n
!this.state.isDisabled && this.onCheckBoxChange('frontSideAirbags')(!this.props.vehicleOptionInfo.frontSideAirbags)} \r\n style={{\r\n cursor: this.state.isDisabled ? 'not-allowed' : 'pointer',\r\n userSelect: 'none'\r\n }}\r\n >\r\n {this.translatorService.Tranlate('VEHICLE_OPTION_FRONT_SIDE_AIRBAGS', 'Airbag-uri lateral fata')} \r\n
\r\n this.onCheckBoxChange('frontSideAirbags')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n edge=\"end\"\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n\r\n \r\n
!this.state.isDisabled && this.onCheckBoxChange('particleFilter')(!this.props.vehicleOptionInfo.particleFilter)} \r\n style={{\r\n cursor: this.state.isDisabled ? 'not-allowed' : 'pointer',\r\n userSelect: 'none'\r\n }}\r\n >\r\n {this.translatorService.Tranlate('VEHICLE_OPTION_PARTICLE_FILTER', 'Filtru particule')}\r\n
\r\n this.onCheckBoxChange('particleFilter')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n edge=\"end\"\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n\r\n \r\n
!this.state.isDisabled && this.onCheckBoxChange('fogLights')(!this.props.vehicleOptionInfo.fogLights)} \r\n style={{\r\n cursor: this.state.isDisabled ? 'not-allowed' : 'pointer',\r\n userSelect: 'none'\r\n }}\r\n >\r\n {this.translatorService.Tranlate('VEHICLE_OPTION_FOG_LIGHTS', 'Proiectoare de ceata')}\r\n
\r\n this.onCheckBoxChange('fogLights')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n edge=\"end\"\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n
\r\n\r\n \r\n \r\n {\r\n this.onChange('vehicleCondition')(e);\r\n }}\r\n label={this.translatorService.Tranlate('VEHICLE_OPTIONS_VECHICLE_CONDITION', 'Stare vehicul')}\r\n />\r\n \r\n\r\n \r\n
!this.state.isDisabled && this.onCheckBoxChange('frontCurtainAirbag')(!this.props.vehicleOptionInfo.frontCurtainAirbag)} \r\n style={{\r\n cursor: this.state.isDisabled ? 'not-allowed' : 'pointer',\r\n userSelect: 'none'\r\n }}\r\n >\r\n {this.translatorService.Tranlate('VEHICLE_OPTION_FRONT_CURTAIN_AIRBAG', 'Airbag cortina fata')} \r\n
\r\n this.onCheckBoxChange('frontCurtainAirbag')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n edge=\"end\"\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n\r\n \r\n
!this.state.isDisabled && this.onCheckBoxChange('electricMirrors')(!this.props.vehicleOptionInfo.electricMirrors)} \r\n style={{\r\n cursor: this.state.isDisabled ? 'not-allowed' : 'pointer',\r\n userSelect: 'none'\r\n }}\r\n >\r\n {this.translatorService.Tranlate('VEHICLE_OPTION_ELECTRIC_MIRRORS', 'Oglinzi electrice')}\r\n
\r\n this.onCheckBoxChange('electricMirrors')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n edge=\"end\"\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n\r\n \r\n
!this.state.isDisabled && this.onCheckBoxChange('airConditioning')(!this.props.vehicleOptionInfo.airConditioning)} \r\n style={{\r\n cursor: this.state.isDisabled ? 'not-allowed' : 'pointer',\r\n userSelect: 'none'\r\n }}\r\n >\r\n {this.translatorService.Tranlate('VEHICLE_OPTION_AIR_CONFITIONING', 'Aer conditionat')}\r\n
\r\n this.onCheckBoxChange('airConditioning')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n edge=\"end\"\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n
\r\n\r\n \r\n \r\n {\r\n this.onChange('metallicColor')(e);\r\n }}\r\n label={this.translatorService.Tranlate('VEHICLE_OPTIONS_METALLIC_COLOR', 'Culoare metalizata')}\r\n />\r\n \r\n\r\n \r\n
!this.state.isDisabled && this.onCheckBoxChange('xenonHeadlights')(!this.props.vehicleOptionInfo.xenonHeadlights)} \r\n style={{\r\n cursor: this.state.isDisabled ? 'not-allowed' : 'pointer',\r\n userSelect: 'none'\r\n }}\r\n >\r\n {this.translatorService.Tranlate('VEHICLE_OPTION_XENON_HEADLIGHTS', 'Faruri xenon')} \r\n
\r\n this.onCheckBoxChange('xenonHeadlights')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n edge=\"end\"\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n\r\n \r\n
!this.state.isDisabled && this.onCheckBoxChange('frontElectricWindows')(!this.props.vehicleOptionInfo.frontElectricWindows)} \r\n style={{\r\n cursor: this.state.isDisabled ? 'not-allowed' : 'pointer',\r\n userSelect: 'none'\r\n }}\r\n >\r\n {this.translatorService.Tranlate('VEHICLE_OPTION_FRONT_ELECTRIC_WINDOWS', 'Geamuri electrice fata')}\r\n
\r\n this.onCheckBoxChange('frontElectricWindows')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n edge=\"end\"\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n\r\n \r\n
!this.state.isDisabled && this.onCheckBoxChange('radio')(!this.props.vehicleOptionInfo.radio)} \r\n style={{\r\n cursor: this.state.isDisabled ? 'not-allowed' : 'pointer',\r\n userSelect: 'none'\r\n }}\r\n >\r\n {this.translatorService.Tranlate('VEHICLE_OPTION_RADIO', 'Radio')}\r\n
\r\n this.onCheckBoxChange('radio')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n edge=\"end\"\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n
\r\n\r\n \r\n \r\n {\r\n this.onChange('upholstery')(e);\r\n }}\r\n label={this.translatorService.Tranlate('VEHICLE_OPTIONS_UPHOLSTERY', 'Tapiterie')}\r\n />\r\n \r\n\r\n \r\n
!this.state.isDisabled && this.onCheckBoxChange('alloyWheels')(!this.props.vehicleOptionInfo.alloyWheels)} \r\n style={{\r\n cursor: this.state.isDisabled ? 'not-allowed' : 'pointer',\r\n userSelect: 'none'\r\n }}\r\n >\r\n {this.translatorService.Tranlate('VEHICLE_OPTION_ALLOY_WHEELS', 'Jante aliaj')} \r\n
\r\n this.onCheckBoxChange('alloyWheels')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n edge=\"end\"\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n\r\n \r\n
!this.state.isDisabled && this.onCheckBoxChange('rearElectricWindows')(!this.props.vehicleOptionInfo.rearElectricWindows)} \r\n style={{\r\n cursor: this.state.isDisabled ? 'not-allowed' : 'pointer',\r\n userSelect: 'none'\r\n }}\r\n >\r\n {this.translatorService.Tranlate('VEHICLE_OPTION_REAR_ELECTRIC_WINDOWS', 'Geamuri electrice spate')}\r\n
\r\n this.onCheckBoxChange('rearElectricWindows')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n edge=\"end\"\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n\r\n \r\n
!this.state.isDisabled && this.onCheckBoxChange('cdPlayer')(!this.props.vehicleOptionInfo.cdPlayer)} \r\n style={{\r\n cursor: this.state.isDisabled ? 'not-allowed' : 'pointer',\r\n userSelect: 'none'\r\n }}\r\n >\r\n {this.translatorService.Tranlate('VEHICLE_OPTION_CD_PLAYER', 'CD')}\r\n
\r\n this.onCheckBoxChange('cdPlayer')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n edge=\"end\"\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n
\r\n\r\n \r\n \r\n {\r\n this.onChange('upholsteryColor')(e);\r\n }}\r\n label={this.translatorService.Tranlate('VEHICLE_OPTIONS_UPHOLSTERY_COLOR', 'Culoare tapiterie')}\r\n />\r\n \r\n\r\n \r\n
!this.state.isDisabled && this.onCheckBoxChange('glassRoof')(!this.props.vehicleOptionInfo.glassRoof)} \r\n style={{\r\n cursor: this.state.isDisabled ? 'not-allowed' : 'pointer',\r\n userSelect: 'none'\r\n }}\r\n >\r\n {this.translatorService.Tranlate('VEHICLE_OPTION_GLASS_ROOF', 'Acoperis sticla')} \r\n
\r\n this.onCheckBoxChange('glassRoof')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n edge=\"end\"\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n\r\n \r\n
!this.state.isDisabled && this.onCheckBoxChange('tintedWindows')(!this.props.vehicleOptionInfo.tintedWindows)} \r\n style={{\r\n cursor: this.state.isDisabled ? 'not-allowed' : 'pointer',\r\n userSelect: 'none'\r\n }}\r\n >\r\n {this.translatorService.Tranlate('VEHICLE_OPTION_TINTED_WINDOWS', 'Geamuri cu tente/colorate')}\r\n
\r\n this.onCheckBoxChange('tintedWindows')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n edge=\"end\"\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n\r\n \r\n
!this.state.isDisabled && this.onCheckBoxChange('videoScreen')(!this.props.vehicleOptionInfo.videoScreen)} \r\n style={{\r\n cursor: this.state.isDisabled ? 'not-allowed' : 'pointer',\r\n userSelect: 'none'\r\n }}\r\n >\r\n {this.translatorService.Tranlate('VEHICLE_OPTION_VIDEO_SCREEN', 'Ecran video tetiere')}\r\n
\r\n this.onCheckBoxChange('videoScreen')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n edge=\"end\"\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n
\r\n\r\n \r\n \r\n {\r\n this.onChange('previousOwnersCount')(e);\r\n }}\r\n label={this.translatorService.Tranlate(\r\n 'VEHICLE_OPTIONS_PREVIOUS_OWNERS_COUNT',\r\n 'Nr proprietari anteriori'\r\n )}\r\n InputProps={{\r\n inputComponent: this.NumberFormatCustom\r\n }}\r\n />\r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n
!this.state.isDisabled && this.onCheckBoxChange('gps')(!this.props.vehicleOptionInfo.gps)} \r\n style={{\r\n cursor: this.state.isDisabled ? 'not-allowed' : 'pointer',\r\n userSelect: 'none'\r\n }}\r\n >\r\n {this.translatorService.Tranlate('VEHICLE_OPTION_GPS', 'GPS')}\r\n
\r\n this.onCheckBoxChange('gps')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n edge=\"end\"\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n
\r\n\r\n \r\n \r\n {\r\n this.onChange('countryOfOrigin')(e);\r\n }}\r\n label={this.translatorService.Tranlate('VEHICLE_OPTIONS_COUNTRY_OF_ORIGIN', 'Tara de origine')}\r\n />\r\n \r\n \r\n
\r\n \r\n );\r\n }\r\n\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n
\r\n {!this.state.isLoading ? this.rendeVehicleOptionForm() : null}\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (\r\n state: ApplicationState,\r\n ownProps: MavoVehicleOptionDetailsProps\r\n ) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app,\r\n vehicleState: state.vehicle,\r\n mavoVehicle: state.mavoVehicle,\r\n ...ownProps\r\n }),\r\n { ...CaseSettingsActionCreators, ...VehicleActionCreators, ...MavoVehicleActionCreators }\r\n)(withSnackbar(MavoVehicleOptionsContainer as any));\r\n","import React from 'react';\r\nimport { TransformWrapper, TransformComponent } from \"react-zoom-pan-pinch\";\r\nimport { MavoVehicleAttachment } from '../../interfaces/Vehicle';\r\nimport { MavoVehicelAttachementTypeCodeEnum } from '../../helpers/Constants';\r\n\r\ninterface IPreviewAttachmentState {\r\n currentIndex: number,\r\n scale: number,\r\n}\r\n\r\ninterface IPreviewAttachmentProps {\r\n loadMavoAttachmentData: MavoVehicleAttachment[],\r\n currentIndex: number\r\n attachmentTypeId: number\r\n}\r\n\r\nclass PreviewAttachment extends React.PureComponent<\r\n IPreviewAttachmentProps,\r\n IPreviewAttachmentState\r\n> {\r\n\r\n state = {\r\n currentIndex: this.props.currentIndex,\r\n scale: 1,\r\n } as IPreviewAttachmentState;\r\n\r\n\r\n nextImage = () => {\r\n let nextIndex = (this.state.currentIndex + 1) % this.props.loadMavoAttachmentData?.length;\r\n while (this.props.loadMavoAttachmentData[nextIndex]?.attachmentTypeId !== this.props.attachmentTypeId) {\r\n nextIndex = (nextIndex + 1) % this.props.loadMavoAttachmentData?.length;\r\n }\r\n this.setState({\r\n currentIndex: nextIndex\r\n });\r\n };\r\n\r\n prevImage = () => {\r\n let prevIndex = this.state.currentIndex === 0 ? this.props.loadMavoAttachmentData?.length - 1 : this.state.currentIndex - 1;\r\n while (this.props.loadMavoAttachmentData[prevIndex]?.attachmentTypeId !== this.props.attachmentTypeId) {\r\n prevIndex = prevIndex === 0 ? this.props.loadMavoAttachmentData?.length - 1 : prevIndex - 1;\r\n }\r\n this.setState({\r\n currentIndex: prevIndex\r\n });\r\n };\r\n\r\n public render() {\r\n return (\r\n
\r\n \r\n ‹\r\n \r\n \r\n ›\r\n \r\n \r\n {({ zoomIn, zoomOut }) => (\r\n <>\r\n \r\n zoomIn()}\r\n className='zoomGalleryButton'\r\n >\r\n +\r\n \r\n zoomOut()}\r\n className='zoomGalleryButton'\r\n >\r\n −\r\n \r\n
\r\n {console.log(this.props.loadMavoAttachmentData)}\r\n \r\n \r\n \r\n \r\n )\r\n }\r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default PreviewAttachment\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n ApplicationState,\r\n CaseSettingsActionCreators,\r\n VehicleActionCreators\r\n} from '../../store';\r\nimport { withSnackbar } from 'notistack';\r\nimport {\r\n CardContent,\r\n Button,\r\n Grid,\r\n IconButton,\r\n Dialog,\r\n DialogTitle,\r\n Typography,\r\n DialogContent,\r\n Box\r\n} from '@material-ui/core';\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { ButtonGroup, Card, CardFooter } from 'reactstrap';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { IReferentialService } from '../../services/Interfaces/IReferentialService';\r\nimport { MavoImageUploadSizeLimit, MavoVehicelAttachementTypeCodeEnum, MavoVehicleStatusCodeEnum, RefConstants, disabledMavoVehicleStatuses } from '../../helpers/Constants';\r\nimport DescriptionIcon from '@material-ui/icons/Description';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport _ from 'lodash';\r\nimport { IVehicleService } from '../../services/Interfaces/IVehicleService';\r\nimport { MavoVehicleAttachment } from '../../interfaces/Vehicle';\r\nimport { MavoVehicleDetailsProps } from '../cases/vehicleDetails/MavoVehicleDetailsProps';\r\nimport { MavoVehicleActionCreators } from '../../store/actions/MavoVehicle';\r\nimport { IMavoAttachmentDataContainerProps } from '../cases/vehicleDetails/IMavoAttachmentDataContainerProps';\r\nimport DeleteOutlineTwoToneIcon from '@material-ui/icons/DeleteOutlineTwoTone';\r\nimport GetAppIcon from '@material-ui/icons/GetApp';\r\nimport { isNullOrUndefined } from 'util';\r\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\r\n// @ts-ignore\r\nimport FileViewer from 'react-file-viewer';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport VisibilityIcon from '@material-ui/icons/Visibility';\r\nimport FileSaver from 'file-saver';\r\nimport PreviewAttachment from './PreviewAttachment';\r\n\r\n\r\ninterface IMavoAttachmentDataContainerState {\r\n isLoading: boolean;\r\n executing: boolean;\r\n attachmentTypeList: IReferential[];\r\n previewAttachFile: any;\r\n previewAttachFileExtension: string;\r\n isDialogOpen: boolean;\r\n currentIndex: number,\r\n attachmentTypeId: number;\r\n}\r\n\r\nclass MavoAttachmentDataContainer extends React.PureComponent<\r\n IMavoAttachmentDataContainerProps,\r\n IMavoAttachmentDataContainerState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private vehicleService!: IVehicleService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n static displayName = 'MavoAttachmentDataContainer';\r\n\r\n state = {\r\n isLoading: false,\r\n executing: false,\r\n isValuationOpen: false,\r\n isOpen: false,\r\n dialogVisible: false,\r\n attachmentTypeList: [],\r\n previewAttachFile: '',\r\n previewAttachFileExtension: '',\r\n isDialogOpen: false,\r\n currentIndex: 0,\r\n attachmentTypeId: 0,\r\n } as IMavoAttachmentDataContainerState;\r\n\r\n public componentDidMount() {\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadData();\r\n }\r\n );\r\n }\r\n\r\n loadData = async () => {\r\n const {\r\n vehicleAttachmentTypeRef\r\n } = RefConstants;\r\n const [\r\n vehicleAttachmentTypeList,\r\n vehicleAttachmentList\r\n ] = await Promise.all([\r\n this.appReferentialService.Get(vehicleAttachmentTypeRef?.baseUrl),\r\n this.vehicleService.GetMavoVehicleAttachments(this.props.mavoVehicleState.mavoVehicle.id)\r\n ]);\r\n\r\n let processedFiles: MavoVehicleAttachment[] = [];\r\n try {\r\n processedFiles = await Promise.all(\r\n vehicleAttachmentList.map(async (file) => {\r\n const { originalFileName, fileName } = file;\r\n try {\r\n const fileBlob = await this.vehicleService.GetMavoVehicleAttachment(fileName);\r\n const url = URL.createObjectURL(fileBlob);\r\n const extension = originalFileName.split('.').pop();\r\n return { ...file, url, extension };\r\n } catch (error) {\r\n return { ...file };\r\n }\r\n })\r\n );\r\n } catch (error) {\r\n console.error(\"Error processing files:\", error);\r\n processedFiles = vehicleAttachmentList\r\n }\r\n\r\n this.props.setMavoVehicleObject({\r\n ...this.props.mavoVehicleState.mavoVehicle,\r\n mavoVehicleAttachments: processedFiles?.length > 0 ? processedFiles : vehicleAttachmentList\r\n })\r\n\r\n vehicleAttachmentTypeList.forEach((attachmentType) => {\r\n attachmentType.isLoading = false;\r\n });\r\n\r\n this.setState({\r\n isLoading: false,\r\n attachmentTypeList: vehicleAttachmentTypeList,\r\n });\r\n };\r\n\r\n\r\n isDisabled = (): boolean => {\r\n //1.3\tActualizare/modificare\r\n if (this.props.mavoVehicleState.mavoVehicle.id !== 0) {\r\n //daca vehiculul este in stare “Licitatie”, se pot actualiza doar informatiile «Stare vehicul», «Despre vehicul (Dotari)» si «Poze» \r\n if (this.props.mavoVehicleState.mavoVehicle.currentStatus!.status!.code === MavoVehicleStatusCodeEnum.LICITATIE.toString()) {\r\n return false;\r\n }\r\n //daca vehiculul este in orice alta stare («Comanda», «Aviz», «Factura»), nu se pot actualiza nici un fel de informatii referitoare la acest vehicul\r\n return disabledMavoVehicleStatuses.includes(this.props.mavoVehicleState.mavoVehicle.currentStatus!.status!.code ?? '') ? true : false;\r\n }\r\n return false;\r\n };\r\n\r\n\r\n handlePreviewAttachment = async (originalFileName: string, filename: string) => {\r\n try {\r\n const fileBlob = await this.vehicleService.GetMavoVehicleAttachment(filename);\r\n const url = URL.createObjectURL(fileBlob);\r\n const extension = originalFileName.split('.').pop();\r\n\r\n if (isNullOrUndefined(extension)) {\r\n return;\r\n }\r\n\r\n this.setState({\r\n previewAttachFile: url,\r\n previewAttachFileExtension: extension!.toLowerCase(),\r\n isDialogOpen: true\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n renderPreviewAttachment = () => {\r\n return (\r\n \r\n );\r\n };\r\n\r\n setAttachmentTypeList = (attachmentType: IReferential, value: boolean) => {\r\n const attachmentTypeList = _.cloneDeep(this.state.attachmentTypeList);\r\n for (let i = 0; i < attachmentTypeList.length; i++) {\r\n if (attachmentTypeList[i].id === attachmentType.id) {\r\n attachmentTypeList[i].isLoading = value;\r\n }\r\n }\r\n\r\n return attachmentTypeList;\r\n };\r\n\r\n /**\r\n * Get dimensions of any image by url\r\n * @param {string} url\r\n * @param {number} [rejectTimeout] timeout for reject\r\n * @return {Promise<{ width: number, height: number }>}\r\n */\r\n reactImageSize = (\r\n url: string,\r\n rejectTimeout: number\r\n ): Promise<{ width: number; height: number }> =>\r\n new Promise((resolve, reject) => {\r\n let timer: NodeJS.Timeout | null = null;\r\n\r\n const img = new Image();\r\n\r\n img.addEventListener('load', () => {\r\n if (timer) {\r\n clearTimeout(timer);\r\n }\r\n\r\n resolve({ width: img.width, height: img.height });\r\n });\r\n\r\n img.addEventListener('error', (event) => {\r\n if (timer) {\r\n clearTimeout(timer);\r\n }\r\n\r\n reject(`${event.type}: ${event.message}`);\r\n });\r\n\r\n img.src = url;\r\n\r\n if (rejectTimeout) {\r\n timer = setTimeout(() => reject('Timeout exception'), rejectTimeout);\r\n }\r\n });\r\n\r\n addWatermarkToImage = async (file: File): Promise => {\r\n return new Promise((resolve, reject) => {\r\n const reader = new FileReader();\r\n reader.onload = () => {\r\n const img = new Image();\r\n img.src = reader.result as string;\r\n\r\n img.onload = () => {\r\n const canvas = document.createElement(\"canvas\");\r\n const ctx = canvas.getContext(\"2d\");\r\n if (!ctx) return;\r\n\r\n canvas.width = img.width;\r\n canvas.height = img.height;\r\n\r\n ctx.drawImage(img, 0, 0);\r\n\r\n const watermarkText = \"Licensed for Mavo Application Only\";\r\n ctx.font = `${img.width / 20}px Arial`;\r\n ctx.fillStyle = \"rgba(255, 255, 255, 0.5)\";\r\n ctx.textAlign = \"center\";\r\n ctx.textBaseline = \"middle\";\r\n\r\n ctx.save();\r\n ctx.translate(canvas.width / 2, canvas.height / 2);\r\n ctx.rotate(-Math.PI / 4);\r\n\r\n ctx.fillText(watermarkText, 0, 0);\r\n\r\n ctx.restore();\r\n\r\n canvas.toBlob(\r\n (blob) => {\r\n if (blob) {\r\n const watermarkedFile = new File([blob], file.name, {\r\n type: \"image/png\"\r\n });\r\n resolve(watermarkedFile);\r\n } else {\r\n reject(new Error(\"Eroare la generarea imaginii cu watermark\"));\r\n }\r\n },\r\n \"image/png\",\r\n 1.0\r\n );\r\n };\r\n\r\n img.onerror = (err) => {\r\n console.error(\"Eroare la încărcarea imaginii\", err);\r\n reject(err);\r\n };\r\n };\r\n\r\n reader.onerror = (err) => {\r\n console.error(\"Eroare la citirea fișierului\", err);\r\n reject(err);\r\n };\r\n\r\n reader.readAsDataURL(file);\r\n });\r\n };\r\n\r\n handleUploadAttachment = async (\r\n e: React.ChangeEvent,\r\n attachmentType: IReferential\r\n ) => {\r\n try {\r\n if (e.target.files === null) {\r\n return;\r\n }\r\n e.persist();\r\n\r\n this.setState({\r\n attachmentTypeList: this.setAttachmentTypeList(attachmentType, true)\r\n });\r\n\r\n const attachments: MavoVehicleAttachment[] = [];\r\n for (let i = 0; i < e.target.files.length; i++) {\r\n const file = e.target.files![i];\r\n if (attachmentType.code == MavoVehicelAttachementTypeCodeEnum.IMG) {\r\n const fileSizeKB = file.size / 1024;\r\n if (fileSizeKB > MavoImageUploadSizeLimit.MaxSizeKB) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('MAVO_VEHICLE_IMG', 'Imaginea ') +\r\n file.name +\r\n this.translatorService.Tranlate('MAVO_VEHICLE_MAX_SIZE', 'depaseste dimensiunea maxima de 1MB.'),\r\n {\r\n variant: 'warning',\r\n autoHideDuration: 5000\r\n }\r\n );\r\n continue;\r\n }\r\n }\r\n let watermarkedFile = file;\r\n if (attachmentType.code == MavoVehicelAttachementTypeCodeEnum.IMG) {\r\n watermarkedFile = await this.addWatermarkToImage(file);\r\n }\r\n attachments.push({\r\n id: 0,\r\n mavoVehicleId: this.props.mavoVehicleState.mavoVehicle.id,\r\n attachmentTypeId: attachmentType.id,\r\n attachmentType: attachmentType,\r\n file: watermarkedFile,\r\n originalFileName: file.name,\r\n } as MavoVehicleAttachment);\r\n }\r\n if (this.props.mavoVehicleState.mavoVehicle.id === 0) {\r\n this.props.setMavoVehicleObject({\r\n ...this.props.mavoVehicleState.mavoVehicle,\r\n mavoVehicleAttachments: [\r\n ...this.props.mavoVehicleState.mavoVehicle.mavoVehicleAttachments,\r\n ...attachments\r\n ]\r\n });\r\n } else {\r\n if (attachments.length > 0) {\r\n const newFiles = await this.vehicleService.AddMavoVehicleAttachments(attachments);\r\n this.props.setMavoVehicleObject({\r\n ...this.props.mavoVehicleState.mavoVehicle,\r\n mavoVehicleAttachments: [\r\n ...this.props.mavoVehicleState.mavoVehicle.mavoVehicleAttachments,\r\n ...newFiles\r\n ]\r\n });\r\n }\r\n }\r\n\r\n this.setState({\r\n attachmentTypeList: this.setAttachmentTypeList(attachmentType, false)\r\n });\r\n\r\n e.target.value = '';\r\n } catch (error) {\r\n console.log(error);\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n e.target.value = '';\r\n }\r\n };\r\n\r\n handleDeleteAttachment = async (id: number, fileName: string) => {\r\n try {\r\n await this.vehicleService.RemoveMavoVehicleAttachment(fileName);\r\n\r\n const mavoVehicleAttachments = [...this.props.mavoVehicleState.mavoVehicle.mavoVehicleAttachments];\r\n const index = mavoVehicleAttachments.findIndex((item) => item.id === id);\r\n mavoVehicleAttachments.splice(index, 1);\r\n\r\n this.props.setMavoVehicleObject({\r\n ...this.props.mavoVehicleState.mavoVehicle,\r\n mavoVehicleAttachments: [...mavoVehicleAttachments]\r\n });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n downloadFile = async (fileName: string, origFileName: string) => {\r\n const fileBlob = await this.vehicleService.GetMavoVehicleAttachment(fileName);\r\n FileSaver.saveAs(fileBlob, origFileName);\r\n };\r\n\r\n renderAttachments = (attachemntType: IReferential) => {\r\n const attachments = this.props.mavoVehicleState.mavoVehicle.mavoVehicleAttachments.filter(\r\n (item) => item.attachmentTypeId === attachemntType.id\r\n );\r\n const attachmentsToRender = [] as any[];\r\n attachments.forEach((attach, index) => {\r\n attachmentsToRender.push(\r\n
\r\n
\r\n {\r\n if (attachemntType!.code == MavoVehicelAttachementTypeCodeEnum.IMG) {\r\n this.setState({ isDialogOpen: true, currentIndex: index, previewAttachFileExtension: '', attachmentTypeId: attach.attachmentTypeId })\r\n } else {\r\n this.handlePreviewAttachment(attach.originalFileName, attach.fileName);\r\n }\r\n }\r\n\r\n }\r\n >\r\n \r\n \r\n\r\n {attach.id !== 0 ? (\r\n this.downloadFile(attach.fileName, attach.originalFileName)}\r\n >\r\n \r\n \r\n ) : null}\r\n {attach.id !== 0 && !this.isDisabled() && !this.props.disabled ? (\r\n {\r\n this.handleDeleteAttachment(\r\n attach.id,\r\n attach.fileName\r\n );\r\n }}\r\n >\r\n \r\n \r\n ) : null}\r\n\r\n\r\n
\r\n
\r\n {attachemntType!.code == MavoVehicelAttachementTypeCodeEnum.IMG ? { this.setState({ isDialogOpen: true, currentIndex: index, previewAttachFileExtension: '', attachmentTypeId: attach.attachmentTypeId }) }}\r\n className=\"img-fluid\"\r\n style={{\r\n maxWidth: '95%',\r\n maxHeight: '100%',\r\n objectFit: 'contain'\r\n }}\r\n src={attach?.url || `data:img/png;base64,${attach?.content}`}> :\r\n
\r\n {attach.originalFileName}\r\n
\r\n }\r\n
\r\n
\r\n );\r\n });\r\n\r\n return attachmentsToRender;\r\n };\r\n\r\n renderAttachTypeCard = (attachType: IReferential) => {\r\n return (\r\n
\r\n
\r\n \r\n {attachType!.displayName}\r\n \r\n
\r\n
\r\n\r\n \r\n
\r\n \r\n
\r\n {!attachType?.isLoading ? (\r\n
\r\n {this.props.mavoVehicleState.mavoVehicle.mavoVehicleAttachments.filter(\r\n (item) => item.attachmentTypeId === attachType?.id\r\n ).length !== 0 ? (\r\n\r\n
{this.renderAttachments(attachType)}
\r\n\r\n ) : (\r\n
\r\n \r\n
\r\n )}\r\n
\r\n ) : (\r\n ''\r\n )}\r\n
\r\n {!this.isDisabled() && !this.props.disabled ? \r\n \r\n \r\n {\r\n return this.handleUploadAttachment(e, attachType);\r\n }}\r\n type=\"file\"\r\n accept={'image/*'}\r\n multiple={true}\r\n />\r\n \r\n Upload\r\n \r\n \r\n \r\n : <>}\r\n
)\r\n }\r\n\r\n renderWorkflowAttashmentTypes = () => {\r\n const attachImgType = this.state.attachmentTypeList.find(\r\n (item) => item.code === MavoVehicelAttachementTypeCodeEnum.IMG\r\n );\r\n const attachDocType = this.state.attachmentTypeList.find(\r\n (item) => item.code === MavoVehicelAttachementTypeCodeEnum.OTHER\r\n );\r\n\r\n return
\r\n {attachImgType ? this.renderAttachTypeCard(attachImgType) : <>}\r\n\r\n {attachDocType ?
{this.renderAttachTypeCard(attachDocType)}
: <>}\r\n
\r\n }\r\n\r\n renderGalleryAttashment = () => {\r\n return
\r\n {this.props.mavoVehicleState.mavoVehicle.mavoVehicleAttachments?.map((attach, index) => {\r\n return
\r\n
\r\n {attach!.attachmentType?.code == MavoVehicelAttachementTypeCodeEnum.IMG ? { this.setState({ isDialogOpen: true, currentIndex: index, attachmentTypeId: attach.attachmentTypeId }) }}\r\n className=\"img-fluid\"\r\n style={{ maxWidth: '100%', maxHeight: '100%', objectFit: 'contain' }}\r\n src={attach?.url}> :
\r\n {attach.originalFileName}\r\n
}\r\n
\r\n
\r\n })}\r\n
\r\n }\r\n\r\n closeDialog = async () => {\r\n this.setState({\r\n isDialogOpen: false\r\n });\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.vehicleService = (this.context as AppContext).vehicleService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n
{this.renderWorkflowAttashmentTypes()}
\r\n ) : null}\r\n \r\n \r\n \r\n \r\n \r\n {this.translatorService.Tranlate('CASE_PREVIEW_DOC', 'Previzualizare document')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n {this.state.previewAttachFileExtension !== '' ? this.renderPreviewAttachment() : }\r\n \r\n\r\n \r\n \r\n \r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (\r\n state: ApplicationState,\r\n ownProps: MavoVehicleDetailsProps\r\n ) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app,\r\n vehicleState: state.vehicle,\r\n mavoVehicle: state.mavoVehicle,\r\n ...ownProps\r\n }),\r\n { ...CaseSettingsActionCreators, ...VehicleActionCreators, ...MavoVehicleActionCreators }\r\n)(withSnackbar(MavoAttachmentDataContainer as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { withSnackbar } from 'notistack';\r\nimport {\r\n Checkbox,\r\n FormControlLabel,\r\n Grid,\r\n Typography\r\n} from '@material-ui/core';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport _ from 'lodash';\r\nimport { ApplicationState, CaseSettingsActionCreators, VehicleActionCreators } from '../../store';\r\nimport { MavoVehicleActionCreators } from '../../store/actions/MavoVehicle';\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { MavoVehicleStatusCodeEnum, RefConstants, VehicleStatusCodeEnum, allowedMavoVehicleStatuses, disabledMavoVehicleStatuses, disabledNewMavoVehicleStatuses } from '../../helpers/Constants';\r\nimport { IVehicleService } from '../../services/Interfaces/IVehicleService';\r\nimport { MavoVehicleStatusDetailsProps } from '../cases/vehicleDetails/MavoVehicleStatusDetailsProps';\r\nimport { IMavoStatusDataContainerProps } from '../cases/vehicleDetails/IMavoStatusDataContainerProps';\r\nimport { Autocomplete } from '@material-ui/lab';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport { Utils } from '../../helpers/Utils';\r\nimport * as R from 'ramda';\r\nimport { IReferentialService } from '../../services/Interfaces/IReferentialService';\r\nimport { DatePicker, MuiPickersUtilsProvider } from '@material-ui/pickers';\r\nimport moment from 'moment';\r\nimport { MaterialUiPickersDate } from '@material-ui/pickers/typings/date';\r\nimport MomentUtils from '@date-io/moment';\r\nimport NumberFormat from 'react-number-format';\r\n\r\nclass LocalizedUtils extends MomentUtils {\r\n // dateFormat = \"DD MM YYYY\";\r\n}\r\n\r\ninterface IMavoStatusDataContainerState {\r\n isLoading: boolean;\r\n executing: boolean;\r\n isDisabled: boolean;\r\n bodyConditions: IReferential[];\r\n}\r\n\r\nconst maxNumberOfCharacters = 100;\r\nconst maxNumberOfObservationsCharacters = 300;\r\n\r\nclass MavoStatusDataContainer extends React.PureComponent<\r\n IMavoStatusDataContainerProps,\r\n IMavoStatusDataContainerState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private vehicleService!: IVehicleService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n \r\n static contextType = ApplicationContext;\r\n static displayName = 'MavoStatusDataContainer';\r\n\r\n state = {\r\n isLoading: false,\r\n executing: false,\r\n isValuationOpen: false,\r\n isOpen: false,\r\n dialogVisible: false,\r\n isDisabled: false,\r\n bodyConditions: []\r\n } as IMavoStatusDataContainerState;\r\n\r\n public componentDidMount() {\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadData();\r\n }\r\n );\r\n\r\n ValidatorForm.addValidationRule('maxLength', (value) => {\r\n if (!value) {\r\n return true;\r\n }\r\n\r\n if (value.length <= maxNumberOfCharacters) {\r\n return true;\r\n }\r\n\r\n return false;\r\n });\r\n\r\n ValidatorForm.addValidationRule('isGreaterThanMaxValue', (value) => {\r\n if (value >= 999999.99) {\r\n return false;\r\n }\r\n return true;\r\n });\r\n }\r\n\r\n loadData = async () => {\r\n const {\r\n bodyConditionRef\r\n } = RefConstants;\r\n const bodyConditions = await this.appReferentialService.Get(bodyConditionRef!.baseUrl);\r\n \r\n this.setState(\r\n {\r\n isLoading: false,\r\n isDisabled: this.isDisabled(),\r\n bodyConditions: bodyConditions\r\n }\r\n );\r\n };\r\n\r\n isDisabled = (): boolean => {\r\n if (this.props.disabled) {\r\n return true;\r\n }\r\n\r\n //1.2\tActualizare/adaugare\r\n if (this.props.mavoVehicleState.mavoVehicle.id === 0) {\r\n //Nu pot fi modificate informatii vehicul din tab-urile «Informatii generale», «Stare vehicul», \r\n //«Despre vehicul (Dotari)» si «Date STOC» daca vehiculul este in una din starile : «Licitatie», «Comanda», «Aviz», «Factura»\r\n return disabledNewMavoVehicleStatuses.includes(this.props.mavoVehicleState.mavoVehicle.currentStatus!.status!.code ?? '') ? true : false;\r\n } else {\r\n //daca vehiculul este in stare “Licitatie”, se pot actualiza doar informatiile «Stare vehicul», «Despre vehicul (Dotari)» si «Poze» \r\n if (this.props.mavoVehicleState.mavoVehicle.currentStatus!.status!.code === MavoVehicleStatusCodeEnum.LICITATIE.toString()) {\r\n return false;\r\n }\r\n //daca vehiculul este in orice alta stare («Comanda», «Aviz», «Factura»), nu se pot actualiza nici un fel de informatii referitoare la acest vehicul\r\n return disabledMavoVehicleStatuses.includes(this.props.mavoVehicleState.mavoVehicle.currentStatus!.status!.code ?? '') ? true : false;\r\n }\r\n };\r\n\r\n onChange =\r\n (fieldName: string, fieldNameId?: string) => (e: any, newValue?: IReferential | null) => {\r\n !R.isNil(fieldNameId)\r\n ? \r\n this.props.setMavoVehicleObject({ \r\n ...this.props.mavoVehicleState.mavoVehicle, \r\n vehicleConditionInfo: {\r\n ...this.props.mavoVehicleState.mavoVehicle.vehicleConditionInfo, \r\n [fieldName]: newValue || e.target.value,\r\n [fieldNameId]: Utils.GetIdOrNull(newValue)\r\n }\r\n })\r\n : \r\n this.props.setMavoVehicleObject({ \r\n ...this.props.mavoVehicleState.mavoVehicle, \r\n vehicleConditionInfo: {\r\n ...this.props.mavoVehicleState.mavoVehicle.vehicleConditionInfo, \r\n [fieldName]: newValue || e.target.value\r\n }\r\n })\r\n };\r\n\r\n onCheckBoxChange =\r\n (fieldName: string) => (checked: boolean) => {\r\n this.props.setMavoVehicleObject({ \r\n ...this.props.mavoVehicleState.mavoVehicle, \r\n vehicleConditionInfo: {\r\n ...this.props.mavoVehicleState.mavoVehicle.vehicleConditionInfo, \r\n [fieldName]: checked\r\n }\r\n })\r\n };\r\n\r\n onRepairPriceChange = (e: any) => {\r\n const inputValue = e.target.value;\r\n const parsedValue = inputValue === \"\" || isNaN(inputValue) ? null : parseFloat(inputValue);\r\n\r\n this.props.setMavoVehicleObject({ \r\n ...this.props.mavoVehicleState.mavoVehicle, \r\n vehicleConditionInfo: {\r\n ...this.props.mavoVehicleState.mavoVehicle.vehicleConditionInfo, \r\n repairCostPrice: parsedValue\r\n }\r\n })\r\n };\r\n\r\n\r\n handleToggleIsChecked =\r\n (fieldName: string, fieldName2: string) => (checked: boolean) => {\r\n this.props.setMavoVehicleObject({ \r\n ...this.props.mavoVehicleState.mavoVehicle, \r\n vehicleConditionInfo: {\r\n ...this.props.mavoVehicleState.mavoVehicle.vehicleConditionInfo, \r\n [fieldName]: checked,\r\n [fieldName2]: !checked\r\n }\r\n })\r\n };\r\n\r\n renderBodySection = () => {\r\n return (\r\n \r\n \r\n \r\n {this.translatorService.Tranlate('VEHICLE_CONDITION_BODY_TITLE', 'Caroserie')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.translatorService.Tranlate('VEHICLE_CONDITION_PAINTING_TITLE', 'Vopsire')}\r\n \r\n \r\n {this.translatorService.Tranlate('VEHICLE_CONDITION_TINWARE_AND_PAINTING_TITLE', 'Tinichigherie & Vopsitorie')}\r\n \r\n \r\n {this.translatorService.Tranlate('VEHICLE_CONDITION_REPLACE_AND_PAINTING_TITLE', 'Inlocuire & Vopsire')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {this.translatorService.Tranlate('VEHICLE_CONDITION_LEFT', 'S')}\r\n
\r\n \r\n
\r\n {this.translatorService.Tranlate('VEHICLE_CONDITION_RIGHT', 'D')}\r\n
\r\n
\r\n \r\n
\r\n {this.translatorService.Tranlate('VEHICLE_CONDITION_LEFT', 'S')}\r\n
\r\n
\r\n {this.translatorService.Tranlate('VEHICLE_CONDITION_RIGHT', 'D')}\r\n
\r\n
\r\n \r\n
\r\n {this.translatorService.Tranlate('VEHICLE_CONDITION_LEFT', 'S')}\r\n
\r\n
\r\n {this.translatorService.Tranlate('VEHICLE_CONDITION_RIGHT', 'D')}\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n {this.translatorService.Tranlate('VEHICLE_FRONT_WING', 'Aripa fata')}\r\n \r\n {/* Vopsitorie */}\r\n \r\n
\r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n {/* Tinichigerie & Vopsitorie */}\r\n \r\n
\r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n {/* Inlocuire & Vopsire */}\r\n \r\n
\r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n {this.translatorService.Tranlate('VEHICLE_REAR_WING', 'Aripa spate')}\r\n \r\n {/* Vopsitorie */}\r\n \r\n
\r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n {/* Tinichigerie & Vopsitorie */}\r\n \r\n
\r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n {/* Inlocuire & Vopsire */}\r\n \r\n
\r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n {this.translatorService.Tranlate('VEHICLE_FRONT_DOOR', 'Usa fata')}\r\n \r\n {/* Vopsitorie */}\r\n \r\n
\r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n {/* Tinichigerie & Vopsitorie */}\r\n \r\n
\r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n {/* Inlocuire & Vopsire */}\r\n \r\n
\r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n {this.translatorService.Tranlate('VEHICLE_REAR_DOOR', 'Usa spate')}\r\n \r\n {/* Vopsitorie */}\r\n \r\n
\r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n {/* Tinichigerie & Vopsitorie */}\r\n \r\n
\r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n {/* Inlocuire & Vopsire */}\r\n \r\n
\r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n {this.translatorService.Tranlate('VEHICLE_HOOD', 'Capota')}\r\n \r\n {/* Vopsitorie */}\r\n \r\n
\r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n {/* Tinichigerie & Vopsitorie */}\r\n \r\n
\r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n {/* Inlocuire & Vopsire */}\r\n \r\n
\r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n {this.translatorService.Tranlate('VEHICLE_FACE_MASK', 'Masca fata')}\r\n \r\n {/* Vopsitorie */}\r\n \r\n
\r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n {/* Tinichigerie & Vopsitorie */}\r\n \r\n
\r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n {/* Inlocuire & Vopsire */}\r\n \r\n
\r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n {this.translatorService.Tranlate('VEHICLE_FRONT_BUMPER', 'Bara fata')}\r\n \r\n {/* Vopsitorie */}\r\n \r\n
\r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n {/* Tinichigerie & Vopsitorie */}\r\n \r\n
\r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n {/* Inlocuire & Vopsire */}\r\n \r\n
\r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n {this.translatorService.Tranlate('VEHICLE_RARE_BUMPER', 'Bara spate')}\r\n \r\n {/* Vopsitorie */}\r\n \r\n
\r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n {/* Tinichigerie & Vopsitorie */}\r\n \r\n
\r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n {/* Inlocuire & Vopsire */}\r\n \r\n
\r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n {this.translatorService.Tranlate('VEHICLE_TRUNK', 'Haion')}\r\n \r\n {/* Vopsitorie */}\r\n \r\n
\r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n {/* Tinichigerie & Vopsitorie */}\r\n \r\n
\r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n {/* Inlocuire & Vopsire */}\r\n \r\n
\r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n {this.translatorService.Tranlate('VEHICLE_SPOILER', 'Eleron')}\r\n \r\n {/* Vopsitorie */}\r\n \r\n
\r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n {/* Tinichigerie & Vopsitorie */}\r\n \r\n
\r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n {/* Inlocuire & Vopsire */}\r\n \r\n
\r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n {this.translatorService.Tranlate('VEHICLE_ROOF', 'Pavilion')}\r\n \r\n {/* Vopsitorie */}\r\n \r\n
\r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n {/* Tinichigerie & Vopsitorie */}\r\n \r\n
\r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n {/* Inlocuire & Vopsire */}\r\n \r\n
\r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n {this.translatorService.Tranlate('VEHICLE_SUPERSTRUCTURE', 'Suprastructura')}\r\n \r\n {/* Vopsitorie */}\r\n \r\n
\r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n {/* Tinichigerie & Vopsitorie */}\r\n \r\n
\r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n {/* Inlocuire & Vopsire */}\r\n \r\n
\r\n option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n
\r\n\r\n \r\n {this.translatorService.Tranlate('VEHICLE_REPLACE_REPAIR_TITLE', 'Inlocuire / Reparatie')}\r\n \r\n \r\n \r\n \r\n \r\n {this.translatorService.Tranlate('VEHICLE_CONDITION_LEFT', 'S')}\r\n \r\n \r\n {this.translatorService.Tranlate('VEHICLE_CONDITION_RIGHT', 'D')}\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n
\r\n {this.translatorService.Tranlate('VEHICLE_FOR_REPLACING_TITLE', 'De inlocuit')}\r\n
\r\n
\r\n {this.translatorService.Tranlate('VEHICLE_FOR_REPAIR_TITLE', 'De reparat')}\r\n
\r\n
\r\n \r\n
\r\n {this.translatorService.Tranlate('VEHICLE_FOR_REPLACING_TITLE', 'De inlocuit')}\r\n
\r\n
\r\n {this.translatorService.Tranlate('VEHICLE_FOR_REPAIR_TITLE', 'De reparat')}\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n {this.translatorService.Tranlate('VEHICLE_FOR_REPLACING_TITLE', 'De inlocuit')}\r\n
\r\n
\r\n {this.translatorService.Tranlate('VEHICLE_FOR_REPAIR_TITLE', 'De reparat')}\r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n {this.translatorService.Tranlate('VEHICE_FRONT_SIDE_WINDOW', 'Geam lateral fata')}\r\n \r\n \r\n
\r\n this.handleToggleIsChecked('frontLeftSideWindowToReplace', 'frontLeftSideWindowToRepair')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n
\r\n this.handleToggleIsChecked('frontLeftSideWindowToRepair', 'frontLeftSideWindowToReplace')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n
\r\n\r\n \r\n
\r\n this.handleToggleIsChecked('frontRightSideWindowToReplace', 'frontRightSideWindowToRepair')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n
\r\n this.handleToggleIsChecked('frontRightSideWindowToRepair', 'frontRightSideWindowToReplace')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n
\r\n \r\n \r\n \r\n {this.translatorService.Tranlate('VEHICLE_REAR_WINDOW', 'Luneta')}\r\n \r\n \r\n
\r\n this.handleToggleIsChecked('rearWindshieldToReplace', 'rearWindshieldToRepair')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n
\r\n this.handleToggleIsChecked('rearWindshieldToRepair', 'rearWindshieldToReplace')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n {this.translatorService.Tranlate('VEHICE_REAR_SIDE_WINDOW', 'Geam lateral spate')}\r\n \r\n \r\n
\r\n this.handleToggleIsChecked('rearLeftSideWindowToReplace', 'rearLeftSideWindowToRepair')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n
\r\n this.handleToggleIsChecked('rearLeftSideWindowToRepair', 'rearLeftSideWindowToReplace')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n
\r\n\r\n \r\n
\r\n this.handleToggleIsChecked('rearRightSideWindowToReplace', 'rearRightSideWindowToRepair')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n
\r\n this.handleToggleIsChecked('rearRightSideWindowToRepair', 'rearRightSideWindowToReplace')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n
\r\n \r\n \r\n \r\n {this.translatorService.Tranlate('VEHICLE_WINDSCREEN', 'Parbriz')}\r\n \r\n \r\n
\r\n this.handleToggleIsChecked('windshieldToReplace', 'windshieldToRepair')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n
\r\n this.handleToggleIsChecked('windshieldToRepair', 'windshieldToReplace')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n {this.translatorService.Tranlate('VEHICE_SIDE_MIRROR', 'Oglinda laterala')}\r\n \r\n \r\n
\r\n this.handleToggleIsChecked('leftSideMirrorToReplace', 'leftSideMirrorToRepair')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n
\r\n this.handleToggleIsChecked('leftSideMirrorToRepair','leftSideMirrorToReplace')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n
\r\n\r\n \r\n
\r\n this.handleToggleIsChecked('rightSideMirrorToReplace', 'rightSideMirrorToRepair')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n
\r\n this.handleToggleIsChecked('rightSideMirrorToRepair', 'rightSideMirrorToReplace')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n
\r\n \r\n \r\n \r\n {this.translatorService.Tranlate('VEHICLE_HOOD_GRILL', 'Grila capota')}\r\n \r\n \r\n
\r\n this.handleToggleIsChecked('hoodGrilleToReplace', 'hoodGrilleToRepair')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n
\r\n this.handleToggleIsChecked('hoodGrilleToRepair', 'hoodGrilleToReplace')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n {this.translatorService.Tranlate('VEHICE_WIPERS', 'Stergatoare')}\r\n \r\n \r\n
\r\n this.handleToggleIsChecked('leftWiperToReplace', 'leftWiperToRepair')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n
\r\n this.handleToggleIsChecked('leftWiperToRepair', 'leftWiperToReplace')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n
\r\n\r\n \r\n
\r\n this.handleToggleIsChecked('rightWiperToReplace', 'rightWiperToRepair')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n
\r\n this.handleToggleIsChecked('rightWiperToRepair', 'rightWiperToReplace')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n \r\n \r\n {this.translatorService.Tranlate('VEHICE_PROJECTOR', 'Proiector')}\r\n \r\n \r\n
\r\n this.handleToggleIsChecked('leftProjectorToReplace', 'leftProjectorToRepair')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n
\r\n this.handleToggleIsChecked('leftProjectorToRepair', 'leftProjectorToReplace')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n
\r\n\r\n \r\n
\r\n this.handleToggleIsChecked('rightProjectorToReplace', 'rightProjectorToRepair')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n
\r\n this.handleToggleIsChecked('rightProjectorToRepair', 'rightProjectorToReplace')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n \r\n \r\n {this.translatorService.Tranlate('VEHICE_SIGNALIZATION', 'Semnalizare')}\r\n \r\n \r\n
\r\n this.handleToggleIsChecked('leftTurnSignalToReplace', 'leftTurnSignalToRepair')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n
\r\n this.handleToggleIsChecked('leftTurnSignalToRepair', 'leftTurnSignalToReplace')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n
\r\n\r\n \r\n
\r\n this.handleToggleIsChecked('rightTurnSignalToReplace', 'rightTurnSignalToRepair')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n
\r\n this.handleToggleIsChecked('rightTurnSignalToRepair', 'rightTurnSignalToReplace')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n \r\n \r\n {this.translatorService.Tranlate('VEHICE_LIGHT_HOUSE', 'Far')}\r\n \r\n \r\n
\r\n this.handleToggleIsChecked('leftHeadlightToReplace', 'leftHeadlightToRepair')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n
\r\n this.handleToggleIsChecked('leftHeadlightToRepair', 'leftHeadlightToReplace')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n
\r\n\r\n \r\n
\r\n this.handleToggleIsChecked('rightHeadlightToReplace', 'rightHeadlightToRepair')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n
\r\n this.handleToggleIsChecked('rightHeadlightToRepair', 'rightHeadlightToReplace')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n {this.translatorService.Tranlate('VEHICLE_CONDITION_LEFT_INFRASTRACTURE', 'S=stanga')}\r\n \r\n
\r\n\r\n \r\n \r\n {this.translatorService.Tranlate('VEHICE_TRAFFIC_STOPS', 'Stopuri')}\r\n \r\n \r\n
\r\n this.handleToggleIsChecked('leftBrakeLightsToReplace', 'leftBrakeLightsToRepair')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n
\r\n this.handleToggleIsChecked('leftBrakeLightsToRepair', 'leftBrakeLightsToReplace')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n
\r\n\r\n \r\n
\r\n this.handleToggleIsChecked('rightBrakeLightsToReplace', 'rightBrakeLightsToRepair')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n
\r\n this.handleToggleIsChecked('rightBrakeLightsToRepair', 'rightBrakeLightsToReplace')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n className=\"checkbox-no-padding\"\r\n />\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n {this.translatorService.Tranlate('VEHICLE_CONDITION_RIGHT_INFRASTRACTURE', 'R=dreapta')}\r\n \r\n
\r\n
\r\n );\r\n }\r\n\r\n renderMecanicsSection = () => {\r\n return (\r\n <>\r\n \r\n \r\n \r\n {this.translatorService.Tranlate('VEHICLE_MECANICS_TITLE', 'Mecanica')}\r\n \r\n \r\n \r\n \r\n this.onChange('motor')(e)}\r\n label= {this.translatorService.Tranlate('VEHICLE_MOTOR', 'Motor')}\r\n validators={['maxLength']}\r\n errorMessages={[\r\n this.translatorService.Tranlate(\r\n 'VALIDATORS_MAX_LENGTH',\r\n 'Numar maxim de caractere: '\r\n ) + maxNumberOfCharacters\r\n ]}\r\n />\r\n \r\n \r\n this.onChange('leftCvJoints')(e)}\r\n label= {this.translatorService.Tranlate('VEHICLE_CV_JOINTS_LEFT', 'Planetare S')}\r\n validators={['maxLength']}\r\n errorMessages={[\r\n this.translatorService.Tranlate(\r\n 'VALIDATORS_MAX_LENGTH',\r\n 'Numar maxim de caractere: '\r\n ) + maxNumberOfCharacters\r\n ]}\r\n />\r\n \r\n \r\n this.onChange('rightCvJoints')(e)}\r\n label= {this.translatorService.Tranlate('VEHICLE_CV_JOINTS_RIGHT', 'Planetare D')}\r\n validators={['maxLength']}\r\n errorMessages={[\r\n this.translatorService.Tranlate(\r\n 'VALIDATORS_MAX_LENGTH',\r\n 'Numar maxim de caractere: '\r\n ) + maxNumberOfCharacters\r\n ]}\r\n />\r\n \r\n \r\n\r\n \r\n \r\n this.onChange('clutch')(e)}\r\n label= {this.translatorService.Tranlate('VEHICLE_CLUTCH', 'Ambreaj')}\r\n validators={['maxLength']}\r\n errorMessages={[\r\n this.translatorService.Tranlate(\r\n 'VALIDATORS_MAX_LENGTH',\r\n 'Numar maxim de caractere: '\r\n ) + maxNumberOfCharacters\r\n ]}\r\n />\r\n \r\n \r\n this.onChange('leftShockAbsorbers')(e)}\r\n label= {this.translatorService.Tranlate('VEHICLE_SHOCK_ABSORBERS_LEFT', 'Amortizoare S')}\r\n validators={['maxLength']}\r\n errorMessages={[\r\n this.translatorService.Tranlate(\r\n 'VALIDATORS_MAX_LENGTH',\r\n 'Numar maxim de caractere: '\r\n ) + maxNumberOfCharacters\r\n ]}\r\n />\r\n \r\n \r\n this.onChange('rightShockAbsorbers')(e)}\r\n label= {this.translatorService.Tranlate('VEHICLE_SHOCK_ABSORBERS_RIGHT', 'Amortizoare D')}\r\n validators={['maxLength']}\r\n errorMessages={[\r\n this.translatorService.Tranlate(\r\n 'VALIDATORS_MAX_LENGTH',\r\n 'Numar maxim de caractere: '\r\n ) + maxNumberOfCharacters\r\n ]}\r\n />\r\n \r\n \r\n\r\n \r\n \r\n \r\n this.onChange('gearbox')(e)}\r\n label= {this.translatorService.Tranlate('VEHICLE_GEARBOX', 'Cutie viteze')}\r\n validators={['maxLength']}\r\n errorMessages={[\r\n this.translatorService.Tranlate(\r\n 'VALIDATORS_MAX_LENGTH',\r\n 'Numar maxim de caractere: '\r\n ) + maxNumberOfCharacters\r\n ]}\r\n />\r\n \r\n \r\n this.onChange('frontBrakes')(e)}\r\n label= {this.translatorService.Tranlate('VEHICLE_FRONT_BRAKES', 'Frane F')}\r\n validators={['maxLength']}\r\n errorMessages={[\r\n this.translatorService.Tranlate(\r\n 'VALIDATORS_MAX_LENGTH',\r\n 'Numar maxim de caractere: '\r\n ) + maxNumberOfCharacters\r\n ]}\r\n />\r\n \r\n \r\n this.onChange('backBrakes')(e)}\r\n label= {this.translatorService.Tranlate('VEHICLE_BACK_BRAKES', 'Frane SP')}\r\n validators={['maxLength']}\r\n errorMessages={[\r\n this.translatorService.Tranlate(\r\n 'VALIDATORS_MAX_LENGTH',\r\n 'Numar maxim de caractere: '\r\n ) + maxNumberOfCharacters\r\n ]}\r\n />\r\n \r\n \r\n \r\n \r\n this.onChange('steering')(e)}\r\n label= {this.translatorService.Tranlate('VEHICLE_STEERING', 'Directie')}\r\n validators={['maxLength']}\r\n errorMessages={[\r\n this.translatorService.Tranlate(\r\n 'VALIDATORS_MAX_LENGTH',\r\n 'Numar maxim de caractere: '\r\n ) + maxNumberOfCharacters\r\n ]}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n this.onChange('battery')(e)}\r\n label= {this.translatorService.Tranlate('VEHICLE_BATTERY', 'Baterie')}\r\n validators={['maxLength']}\r\n errorMessages={[\r\n this.translatorService.Tranlate(\r\n 'VALIDATORS_MAX_LENGTH',\r\n 'Numar maxim de caractere: '\r\n ) + maxNumberOfCharacters\r\n ]}\r\n />\r\n \r\n \r\n \r\n \r\n {this.translatorService.Tranlate('MECANICS_EXPLICATION_LABEL', 'S=stanga , D=Dreapta , F=fata , SP=spate')}\r\n \r\n \r\n\r\n \r\n \r\n this.onChange('exhaust')(e)}\r\n label= {this.translatorService.Tranlate('VEHICLE_EXHAUST', 'Esapament')}\r\n validators={['maxLength']}\r\n errorMessages={[\r\n this.translatorService.Tranlate(\r\n 'VALIDATORS_MAX_LENGTH',\r\n 'Numar maxim de caractere: '\r\n ) + maxNumberOfCharacters\r\n ]}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n this.onChange('tires')(e)}\r\n label= {this.translatorService.Tranlate('VEHICLE_TIRES', 'Anvelope')}\r\n validators={['maxLength']}\r\n errorMessages={[\r\n this.translatorService.Tranlate(\r\n 'VALIDATORS_MAX_LENGTH',\r\n 'Numar maxim de caractere: '\r\n ) + maxNumberOfCharacters\r\n ]}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n this.onChange('driveShaft')(e)}\r\n label= {this.translatorService.Tranlate('VEHICLE_DRIVE_SAFT', 'Ax cardanic')}\r\n validators={['maxLength']}\r\n errorMessages={[\r\n this.translatorService.Tranlate(\r\n 'VALIDATORS_MAX_LENGTH',\r\n 'Numar maxim de caractere: '\r\n ) + maxNumberOfCharacters\r\n ]}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n }\r\n\r\n handleITPValidateDateChange = (\r\n date: MaterialUiPickersDate | null,\r\n value?: string | null\r\n ) => {\r\n if (date === null || !date.isValid) {\r\n return;\r\n }\r\n const selectedDate = date ? date.format('YYYY-MM-DD') : undefined;\r\n\r\n this.props.setMavoVehicleObject({ \r\n ...this.props.mavoVehicleState.mavoVehicle, \r\n vehicleConditionInfo: {\r\n ...this.props.mavoVehicleState.mavoVehicle.vehicleConditionInfo, \r\n itpValidateDate: selectedDate || null\r\n }\r\n })\r\n };\r\n\r\n renderInteriorAndAccesoriesSection = () => {\r\n return (\r\n <>\r\n \r\n \r\n \r\n {this.translatorService.Tranlate('VEHICLE_INTERIOR_AND_ACCESORIES_TITLE', 'Interior si accesorii')}\r\n \r\n \r\n \r\n \r\n this.onChange('leftSeatUpholstery')(e)}\r\n label= {this.translatorService.Tranlate('VEHICLE_LEFT_SEAT_UPHOLSTERY', 'Tapiserie scaune stanga')}\r\n validators={['maxLength']}\r\n errorMessages={[\r\n this.translatorService.Tranlate(\r\n 'VALIDATORS_MAX_LENGTH',\r\n 'Numar maxim de caractere: '\r\n ) + maxNumberOfCharacters\r\n ]}\r\n />\r\n \r\n\r\n \r\n this.onChange('interiorMirror')(e)}\r\n label= {this.translatorService.Tranlate('VEHICLE_INTERIOR_MIRROR', 'Oglinda interioara')}\r\n validators={['maxLength']}\r\n errorMessages={[\r\n this.translatorService.Tranlate(\r\n 'VALIDATORS_MAX_LENGTH',\r\n 'Numar maxim de caractere: '\r\n ) + maxNumberOfCharacters\r\n ]}\r\n />\r\n \r\n \r\n\r\n \r\n \r\n this.onChange('rightSeatUpholstery')(e)}\r\n label= {this.translatorService.Tranlate('VEHICLE_RIGHT_SEAT_UPHOLSTERY', 'Tapiserie scaune dreapta')}\r\n validators={['maxLength']}\r\n errorMessages={[\r\n this.translatorService.Tranlate(\r\n 'VALIDATORS_MAX_LENGTH',\r\n 'Numar maxim de caractere: '\r\n ) + maxNumberOfCharacters\r\n ]}\r\n />\r\n \r\n\r\n \r\n this.onChange('firstAidKit')(e)}\r\n label= {this.translatorService.Tranlate('VEHICLE_FIRST_AID_KIT', 'Trusa sanitara')}\r\n validators={['maxLength']}\r\n errorMessages={[\r\n this.translatorService.Tranlate(\r\n 'VALIDATORS_MAX_LENGTH',\r\n 'Numar maxim de caractere: '\r\n ) + maxNumberOfCharacters\r\n ]}\r\n />\r\n \r\n \r\n\r\n \r\n \r\n this.onChange('rearSeatUpholstery')(e)}\r\n label= {this.translatorService.Tranlate('VEHICLE_REAR_SEAT_UPHOLSTERY', 'Tapiserie scaune spate')}\r\n validators={['maxLength']}\r\n errorMessages={[\r\n this.translatorService.Tranlate(\r\n 'VALIDATORS_MAX_LENGTH',\r\n 'Numar maxim de caractere: '\r\n ) + maxNumberOfCharacters\r\n ]}\r\n />\r\n \r\n\r\n \r\n this.onChange('bulbKit')(e)}\r\n label= {this.translatorService.Tranlate('VEHICLE_BULB_KIT', 'Trusa de becuri')}\r\n validators={['maxLength']}\r\n errorMessages={[\r\n this.translatorService.Tranlate(\r\n 'VALIDATORS_MAX_LENGTH',\r\n 'Numar maxim de caractere: '\r\n ) + maxNumberOfCharacters\r\n ]}\r\n />\r\n \r\n \r\n\r\n \r\n \r\n this.onChange('leftFrontHeadrest')(e)}\r\n label= {this.translatorService.Tranlate('VEHICLE_LEFT_FRONT_HEADREST', 'Tetiera fata stanga')}\r\n validators={['maxLength']}\r\n errorMessages={[\r\n this.translatorService.Tranlate(\r\n 'VALIDATORS_MAX_LENGTH',\r\n 'Numar maxim de caractere: '\r\n ) + maxNumberOfCharacters\r\n ]}\r\n />\r\n \r\n\r\n \r\n \r\n {this.translatorService.Tranlate('VEHICLE_SPARE_TIRE', 'Roata de rezerva')}\r\n \r\n \r\n this.handleToggleIsChecked('spareTireGood', 'spareTireReplace')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n className=\"checkbox-no-top-padding\"\r\n />\r\n }\r\n label={this.translatorService.Tranlate('VEHICLE_SPARE_TIRE_GOOD', 'Buna')}\r\n className=\"ml-0 mr-3 mb-0 spare-tire-checkbox\"\r\n />\r\n this.handleToggleIsChecked('spareTireReplace', 'spareTireGood')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n className=\"checkbox-no-top-padding\"\r\n />\r\n }\r\n label={this.translatorService.Tranlate('VEHICLE_SPARE_TIRE_REPLACE', 'De inlocuit')}\r\n className=\"ml-0 mr-3 mb-0 spare-tire-checkbox\"\r\n />\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n this.onChange('rightFrontHeadrest')(e)}\r\n label= {this.translatorService.Tranlate('VEHICLE_RIGHT_FRONT_HEADREST', 'Tetiera fata dreapta')}\r\n validators={['maxLength']}\r\n errorMessages={[\r\n this.translatorService.Tranlate(\r\n 'VALIDATORS_MAX_LENGTH',\r\n 'Numar maxim de caractere: '\r\n ) + maxNumberOfCharacters\r\n ]}\r\n />\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n this.onChange('rearHeadrest')(e)}\r\n label= {this.translatorService.Tranlate('VEHICLE_REAR_HEADREST', 'Tetiera spate')}\r\n validators={['maxLength']}\r\n errorMessages={[\r\n this.translatorService.Tranlate(\r\n 'VALIDATORS_MAX_LENGTH',\r\n 'Numar maxim de caractere: '\r\n ) + maxNumberOfCharacters\r\n ]}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n this.onCheckBoxChange('frontFloorMats')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n className='checkbox-no-top-padding'\r\n >\r\n \r\n
!this.state.isDisabled && this.onCheckBoxChange('frontFloorMats')(!this.props.conditionInfo.frontFloorMats)} \r\n style={{\r\n cursor: this.state.isDisabled ? 'not-allowed' : 'pointer',\r\n userSelect: 'none'\r\n }}\r\n >\r\n {this.translatorService.Tranlate('VEHICLE_FLOOR_MATS', 'Covorase fata')}\r\n
\r\n
\r\n\r\n \r\n this.onCheckBoxChange('fireExtinguisher')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n className='checkbox-no-top-padding'\r\n >\r\n \r\n
!this.state.isDisabled && this.onCheckBoxChange('fireExtinguisher')(!this.props.conditionInfo.fireExtinguisher)} \r\n style={{\r\n cursor: this.state.isDisabled ? 'not-allowed' : 'pointer',\r\n userSelect: 'none'\r\n }}\r\n >\r\n {this.translatorService.Tranlate('VEHICLE_FIRE_EXTINGUISHER', 'Extinctor')}\r\n
\r\n
\r\n\r\n \r\n this.onCheckBoxChange('wheelWrench')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n className='checkbox-no-top-padding'\r\n >\r\n \r\n
!this.state.isDisabled && this.onCheckBoxChange('wheelWrench')(!this.props.conditionInfo.wheelWrench)} \r\n style={{\r\n cursor: this.state.isDisabled ? 'not-allowed' : 'pointer',\r\n userSelect: 'none'\r\n }}\r\n >\r\n {this.translatorService.Tranlate('VEHICLE_WHEEL_WRENCH', 'Cheie roti')}\r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n this.onCheckBoxChange('rearFloorMats')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n className='checkbox-no-top-padding'\r\n >\r\n
!this.state.isDisabled && this.onCheckBoxChange('rearFloorMats')(!this.props.conditionInfo.rearFloorMats)} \r\n style={{\r\n cursor: this.state.isDisabled ? 'not-allowed' : 'pointer',\r\n userSelect: 'none'\r\n }}\r\n >\r\n {this.translatorService.Tranlate('VEHICLE_REAR_FLOOR_MATS', 'Covorase spate')}\r\n
\r\n
\r\n\r\n \r\n this.onCheckBoxChange('reflectiveTriangle')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n className='checkbox-no-top-padding'\r\n >\r\n \r\n
!this.state.isDisabled && this.onCheckBoxChange('reflectiveTriangle')(!this.props.conditionInfo.reflectiveTriangle)} \r\n style={{\r\n cursor: this.state.isDisabled ? 'not-allowed' : 'pointer',\r\n userSelect: 'none'\r\n }}\r\n >\r\n {this.translatorService.Tranlate('VEHICLE_REFLECTIVE_TRIANGLE', 'Triunghi reflectorizant')}\r\n
\r\n
\r\n\r\n \r\n this.onCheckBoxChange('carJack')(e.target.checked)}\r\n disabled={this.state.isDisabled}\r\n className='checkbox-no-top-padding'\r\n >\r\n \r\n
!this.state.isDisabled && this.onCheckBoxChange('carJack')(!this.props.conditionInfo.carJack)} \r\n style={{\r\n cursor: this.state.isDisabled ? 'not-allowed' : 'pointer',\r\n userSelect: 'none'\r\n }}\r\n >\r\n {this.translatorService.Tranlate('VEHICLE_CAR_JACK', 'Cric')}\r\n
\r\n
\r\n
\r\n \r\n )\r\n };\r\n\r\n renderObservationsSection = () => {\r\n return (\r\n \r\n \r\n \r\n {this.translatorService.Tranlate('VEHICLE_OBSERVATIONS_TITLE', 'Observatii')}\r\n \r\n this.onChange('observations')(e)}\r\n label={this.translatorService.Tranlate(\r\n 'VEHICLE_OBSERVATIONS',\r\n 'Observatii'\r\n )}\r\n validators={['maxNumberOfObservationsCharacters']}\r\n errorMessages={[\r\n this.translatorService.Tranlate(\r\n 'VALIDATORS_MAX_LENGTH',\r\n 'Numar maxim de caractere: '\r\n ) + maxNumberOfObservationsCharacters\r\n ]}\r\n multiline\r\n variant=\"outlined\"\r\n rows={8}\r\n />\r\n \r\n\r\n \r\n \r\n {this.translatorService.Tranlate('VEHICLE_ESTIMATE_COST_REPAIR_TITLE', 'Deviz estimativ cost remedieri (€)')}\r\n \r\n\r\n \r\n this.onRepairPriceChange(e)\r\n }\r\n label={this.translatorService.Tranlate('VEHICLE_ESTIMATE_COST_REPAIR', 'Deviz estimativ cost remedieri (€)')}\r\n validators={['isGreaterThanMaxValue']}\r\n errorMessages={[\r\n this.translatorService.Tranlate(\r\n 'GRATTER_THAN_MAX_VALUE_ERROR_MESSAGE',\r\n 'Pretul introdus este prea mare. Trebuie sa fie mica decat 999999.99'\r\n ) \r\n ]}\r\n InputProps={{\r\n inputComponent: this.NumberDecimalFormatCustom\r\n }}\r\n />\r\n \r\n \r\n );\r\n }\r\n\r\n NumberDecimalFormatCustom = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n },\r\n currentTarget: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n allowNegative={false}\r\n thousandSeparator={false}\r\n decimalScale={2}\r\n />\r\n );\r\n };\r\n \r\n renderVehicleStatusForm = () => {\r\n return (\r\n {\r\n // this.submitCaseVehicleDetailsData(e);\r\n }}\r\n >\r\n
\r\n {this.renderBodySection()}\r\n {this.renderMecanicsSection()}\r\n {this.renderInteriorAndAccesoriesSection()}\r\n {this.renderObservationsSection()}\r\n
\r\n \r\n );\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.vehicleService = (this.context as AppContext).vehicleService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n
{this.renderVehicleStatusForm()}
\r\n ) : null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (\r\n state: ApplicationState,\r\n ownProps: MavoVehicleStatusDetailsProps\r\n ) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app,\r\n vehicleState: state.vehicle,\r\n mavoVehicle: state.mavoVehicle,\r\n ...ownProps\r\n }),\r\n { ...CaseSettingsActionCreators, ...VehicleActionCreators, ...MavoVehicleActionCreators }\r\n)(withSnackbar(MavoStatusDataContainer as any));\r\n","import React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n ApplicationState,\r\n CaseSettingsState,\r\n AppState,\r\n CaseSettingsActionCreators,\r\n VehicleActionCreators,\r\n VehicleState\r\n} from '../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport {\r\n Button,\r\n Card,\r\n AppBar,\r\n Tabs,\r\n Tab\r\n} from '@material-ui/core';\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { WorkflowSectionStepForm } from '../../interfaces/Workflow';\r\nimport { IReferentialService } from '../../services/Interfaces/IReferentialService';\r\nimport { MavoVehicleStatusCodeEnum, ReferentialCode, disabledMavoVehicleStatuses, mavoVehicleStatuses } from '../../helpers/Constants';\r\nimport Referentials from '../../helpers/Referentials.json';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport { IVehicleService } from '../../services/Interfaces/IVehicleService';\r\nimport { Vehicle, MavoVehicle, MavoVehicleAttachment, VehicleOptionInfo, VehicleConditionInfo } from '../../interfaces/Vehicle';\r\nimport TabPanel from '../_shared/Tabs';\r\nimport * as R from 'ramda';\r\nimport { MavoVehicleActionCreators } from '../../store/actions/MavoVehicle';\r\nimport { MavoVehicleState } from '../../store/reducers/MavoVehicle';\r\nimport MavoGeneralInformationContainer from './MavoGeneralInformationContainer';\r\nimport MavoVehicleOptionsContainer from './MavoVehicleOptionsContainer';\r\nimport MavoAttachmentDataContainer from './MavoAttachmentDataContainer';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport MavoStatusDataContainer from './MavoStatusDataContainer';\r\nimport NavigationIcon from '@material-ui/icons/Navigation';\r\n\r\ninterface IMavoVehicleDetailsFormState {\r\n isLoading: boolean;\r\n executing: boolean;\r\n isUserHidden: boolean;\r\n vehicle: MavoVehicle;\r\n selectedTab: number;\r\n statuses: IReferential[];\r\n statusOptions: IReferential[];\r\n selectedDisplayedStatus: string;\r\n isChangeVehicleStatusDialogOpen: boolean;\r\n}\r\n\r\nexport interface ExternalMavoVehicleDetailsFormProps {\r\n workflowForm: WorkflowSectionStepForm;\r\n vehicleDetails: Vehicle;\r\n}\r\n\r\ntype IMavoVehicleDetailsFormProps = ExternalMavoVehicleDetailsFormProps & {\r\n caseSettingsState: CaseSettingsState;\r\n appState: AppState;\r\n vehicleState: VehicleState;\r\n mavoVehicleState: MavoVehicleState;\r\n} & typeof CaseSettingsActionCreators &\r\n typeof VehicleActionCreators &\r\n typeof MavoVehicleActionCreators &\r\n ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass MavoVehicleDetailsForm extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private vehicleService!: IVehicleService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n isLoading: true,\r\n executing: false,\r\n isUserHidden: false,\r\n selectedTab: 0,\r\n statuses: [] as IReferential[],\r\n statusOptions: [],\r\n isChangeVehicleStatusDialogOpen: false,\r\n vehicle: {\r\n id: 0,\r\n vin: '',\r\n make: null,\r\n makeId: null,\r\n model: null,\r\n modelId: null,\r\n versionItem: null,\r\n versionId: null,\r\n colorRCR: null,\r\n colorRCRId: null,\r\n fuelType: null,\r\n fuelTypeId: null,\r\n bodyTypeRCRId: null,\r\n bodyTypeRCR: null,\r\n transmissionTypeId: null,\r\n transmissionType: null,\r\n provenance: null,\r\n provenanceId: null,\r\n firstRegistrationDate: '',\r\n fabricationYear: null,\r\n kilometersNr: null,\r\n power: null,\r\n engineManufactureCode: '',\r\n accessories: null,\r\n isReserved: false,\r\n reservations: '',\r\n cylinderCapacity: null,\r\n supplier: null,\r\n location: null,\r\n htPurchaseRonPrice: null,\r\n ttcEvaluationEurPrice: null,\r\n nirNumber: null,\r\n nirDate: null,\r\n currentStatus: null,\r\n vehicleOptions: [],\r\n vehicleType: null,\r\n vehicleTypeId: null,\r\n mavoVehicleAttachments: [] as MavoVehicleAttachment[],\r\n vehicleOptionInfo: {\r\n vehicleId: 0,\r\n engineCapacity: null,\r\n emissionsClass: null,\r\n doorCount: null,\r\n seatCount: null,\r\n driveType: null,\r\n registration: null,\r\n vehicleCondition: null,\r\n metallicColor: null,\r\n upholstery: null,\r\n upholsteryColor: null,\r\n previousOwnersCount: null,\r\n countryOfOrigin: null,\r\n alarm: false,\r\n antiTheft: false,\r\n abs: false,\r\n esp: false,\r\n driverFrontAirbag: false,\r\n passengerFrontAirbag: false,\r\n frontSideAirbags: false,\r\n frontCurtainAirbag: false,\r\n xenonHeadlights: false,\r\n alloyWheels: false,\r\n glassRoof: false,\r\n towHook: false,\r\n protectionFrame: false,\r\n steeringWheelControls: false,\r\n onBoardComputer: false,\r\n cruiseControl: false,\r\n lockableDifferential: false,\r\n particleFilter: false,\r\n electricMirrors: false,\r\n frontElectricWindows: false,\r\n rearElectricWindows: false,\r\n tintedWindows: false,\r\n heatedSeats: false,\r\n rainSensors: false,\r\n parkingSensors: false,\r\n powerSteering: false,\r\n sunroof: false,\r\n rightHandDrive: false,\r\n fogLights: false,\r\n airConditioning: false,\r\n radio: false,\r\n cdPlayer: false,\r\n videoScreen: false,\r\n gps: false\r\n } as VehicleOptionInfo,\r\n vehicleConditionInfo: {\r\n vehicleId: 0,\r\n frontWingLeftPaintId: null,\r\n frontWingLeftPaint: null,\r\n frontWingRightPaintId: null,\r\n frontWingRightPaint: null,\r\n rearWingLeftPaintId: null,\r\n rearWingLeftPaint: null,\r\n rearWingRightPaintId: null,\r\n rearWingRightPaint: null,\r\n frontDoorLeftPaintId: null,\r\n frontDoorLeftPaint: null,\r\n frontDoorRightPaintId: null,\r\n frontDoorRightPaint: null,\r\n rearDoorLeftPaintId: null,\r\n rearDoorLeftPaint: null,\r\n rearDoorRightPaintId: null,\r\n rearDoorRightPaint: null,\r\n hoodPaintId: null,\r\n hoodPaint: null,\r\n faceMaskPaintId: null,\r\n faceMaskPaint: null,\r\n frontBumperPaintId: null,\r\n frontBumperPaint: null,\r\n rearBumperPaintId: null,\r\n rearBumperPaint: null,\r\n trunkPaintId: null,\r\n trunkPaint: null,\r\n spoilerPaintId: null,\r\n spoilerPaint: null,\r\n roofPaintId: null,\r\n roofPaint: null,\r\n superstructurePaintId: null,\r\n superstructurePaint: null,\r\n\r\n // Tinichigerie + Vopsitorie (Bodywork + Painting)\r\n frontWingLeftBodyPaintId: null,\r\n frontWingLeftBodyPaint: null,\r\n frontWingRightBodyPaintId: null,\r\n frontWingRightBodyPaint: null,\r\n rearWingLeftBodyPaintId: null,\r\n rearWingLeftBodyPaint: null,\r\n rearWingRightBodyPaintId: null,\r\n rearWingRightBodyPaint: null,\r\n frontDoorLeftBodyPaintId: null,\r\n frontDoorLeftBodyPaint: null,\r\n frontDoorRightBodyPaintId: null,\r\n frontDoorRightBodyPaint: null,\r\n rearDoorLeftBodyPaintId: null,\r\n rearDoorLeftBodyPaint: null,\r\n rearDoorRightBodyPaintId: null,\r\n rearDoorRightBodyPaint: null,\r\n hoodBodyPaintId: null,\r\n hoodBodyPaint: null,\r\n faceMaskBodyPaintId: null,\r\n faceMaskBodyPaint: null,\r\n frontBumperBodyPaintId: null,\r\n frontBumperBodyPaint: null,\r\n rearBumperBodyPaintId: null,\r\n rearBumperBodyPaint: null,\r\n trunkBodyPaintId: null,\r\n trunkBodyPaint: null,\r\n spoilerBodyPaintId: null,\r\n spoilerBodyPaint: null,\r\n roofBodyPaintId: null,\r\n roofBodyPaint: null,\r\n superstructureBodyPaintId: null,\r\n superstructureBodyPaint: null,\r\n\r\n // Replacement & Painting (Inlcuire + vopsire)\r\n frontWingLeftReplacePaintId: null,\r\n frontWingLeftReplacePaint: null,\r\n frontWingRightReplacePaintId: null,\r\n frontWingRightReplacePaint: null,\r\n rearWingLeftReplacePaintId: null,\r\n rearWingLeftReplacePaint: null,\r\n rearWingRightReplacePaintId: null,\r\n rearWingRightReplacePaint: null,\r\n frontDoorLeftReplacePaintId: null,\r\n frontDoorLeftReplacePaint: null,\r\n frontDoorRightReplacePaintId: null,\r\n frontDoorRightReplacePaint: null,\r\n rearDoorLeftReplacePaintId: null,\r\n rearDoorLeftReplacePaint: null,\r\n rearDoorRightReplacePaintId: null,\r\n rearDoorRightReplacePaint: null,\r\n hoodReplacePaintId: null,\r\n hoodReplacePaint: null,\r\n faceMaskReplacePaintId: null,\r\n faceMaskReplacePaint: null,\r\n frontBumperReplacePaintId: null,\r\n frontBumperReplacePaint: null,\r\n rearBumperReplacePaintId: null,\r\n rearBumperReplacePaint: null,\r\n trunkReplacePaintId: null,\r\n trunkReplacePaint: null,\r\n spoilerReplacePaintId: null,\r\n spoilerReplacePaint: null,\r\n roofReplacePaintId: null,\r\n roofReplacePaint: null,\r\n superstructureReplacePaintId: null,\r\n superstructureReplacePaint: null,\r\n\r\n //Inlocuire/Reparatie\r\n frontLeftSideWindowToReplace: false,\r\n frontLeftSideWindowToRepair: false,\r\n frontRightSideWindowToReplace: false,\r\n frontRightSideWindowToRepair: false,\r\n\r\n rearLeftSideWindowToReplace: false,\r\n rearLeftSideWindowToRepair: false,\r\n rearRightSideWindowToReplace: false,\r\n rearRightSideWindowToRepair: false,\r\n\r\n leftSideMirrorToReplace: false,\r\n leftSideMirrorToRepair: false,\r\n rightSideMirrorToReplace: false,\r\n rightSideMirrorToRepair: false,\r\n\r\n leftWiperToReplace: false,\r\n leftWiperToRepair: false,\r\n rightWiperToReplace: false,\r\n rightWiperToRepair: false,\r\n\r\n leftProjectorToReplace: false,\r\n leftProjectorToRepair: false,\r\n rightProjectorToReplace: false,\r\n rightProjectorToRepair: false,\r\n\r\n leftTurnSignalToReplace: false,\r\n leftTurnSignalToRepair: false,\r\n rightTurnSignalToReplace: false,\r\n rightTurnSignalToRepair: false,\r\n\r\n leftHeadlightToReplace: false,\r\n leftHeadlightToRepair: false,\r\n rightHeadlightToReplace: false,\r\n rightHeadlightToRepair: false,\r\n\r\n leftBrakeLightsToReplace: false,\r\n leftBrakeLightsToRepair: false,\r\n rightBrakeLightsToReplace: false,\r\n rightBrakeLightsToRepair: false,\r\n\r\n rearWindshieldToReplace: false,\r\n rearWindshieldToRepair: false,\r\n\r\n windshieldToReplace: false,\r\n windshieldToRepair: false,\r\n\r\n hoodGrilleToReplace: false,\r\n hoodGrilleToRepair: false,\r\n\r\n //Mecanica\r\n motor: null,\r\n clutch: null,\r\n gearbox: null,\r\n steering: null,\r\n battery: null,\r\n exhaust: null,\r\n tires: null,\r\n driveShaft: null,\r\n leftCvJoints: null,\r\n rightCvJoints: null,\r\n leftShockAbsorbers: null,\r\n rightShockAbsorbers: null,\r\n frontBrakes: null,\r\n backBrakes: null,\r\n itpValidateDate: null,\r\n\r\n //Interior si accesorii\r\n leftSeatUpholstery: null,\r\n rightSeatUpholstery: null,\r\n rearSeatUpholstery: null,\r\n interiorMirror: null,\r\n firstAidKit: null,\r\n bulbKit: null,\r\n leftFrontHeadrest: null,\r\n rightFrontHeadrest: null,\r\n rearHeadrest: null,\r\n spareTireGood: false,\r\n spareTireReplace: false,\r\n frontFloorMats: false,\r\n fireExtinguisher: false,\r\n wheelWrench: false,\r\n rearFloorMats: false,\r\n reflectiveTriangle: false,\r\n carJack: false,\r\n } as VehicleConditionInfo\r\n } as unknown as MavoVehicle,\r\n selectedDisplayedStatus: ''\r\n } as IMavoVehicleDetailsFormState;\r\n\r\n public componentDidMount() {\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadMavoVehicle();\r\n }\r\n );\r\n }\r\n\r\n loadMavoVehicle = async () => {\r\n const statusesTypeRef = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.VehicleStatus\r\n );\r\n const statuses = (await this.appReferentialService.Get(statusesTypeRef!.baseUrl)).filter(x => mavoVehicleStatuses.includes(x.id));\r\n\r\n if (this.props.match.params.id.toUpperCase() !== 'NEW') {\r\n try {\r\n await this.props.setMavoVehicle(this.props.match.params.id as any);\r\n } catch (error) { }\r\n } else {\r\n const initialStatus = statuses.find((status) => status.code === MavoVehicleStatusCodeEnum.INDISPONIBIL.toString());\r\n this.props.setMavoVehicleObject({\r\n ...this.props.mavoVehicleState.mavoVehicle,\r\n currentStatus: {\r\n ...this.props.mavoVehicleState.mavoVehicle.currentStatus,\r\n id: 0,\r\n status: initialStatus!,\r\n statusId: initialStatus!.id\r\n }\r\n });\r\n }\r\n\r\n const vehicle = this.props.mavoVehicleState.mavoVehicle;\r\n\r\n if (disabledMavoVehicleStatuses.includes(this.props.mavoVehicleState.mavoVehicle.currentStatus!.status!.code ?? '')) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('IN_PROCESING_OF_SALE', 'Inregistrare in curs de vanzare'), {\r\n variant: 'info'\r\n });\r\n }\r\n\r\n this.setState({\r\n isLoading: false,\r\n vehicle: vehicle,\r\n statuses: statuses,\r\n selectedDisplayedStatus: !R.isNil(vehicle?.currentStatus?.status)\r\n ? vehicle?.currentStatus?.status?.displayName || ''\r\n : ''\r\n });\r\n };\r\n\r\n closeDialog = async () => {\r\n this.setState({ isChangeVehicleStatusDialogOpen: false });\r\n };\r\n\r\n onTabChange = (event: any, newValue: number) => {\r\n this.setState({\r\n selectedTab: newValue\r\n });\r\n };\r\n\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.vehicleService = (this.context as AppContext).vehicleService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n {\r\n this.props.setMavoVehicleObject(null);\r\n this.props.history.push('/mavo-vehicles');\r\n }}\r\n >\r\n \r\n {this.translatorService.Tranlate(\r\n 'MENU_MAVO_VEHICLES_RECORD',\r\n 'Evidenta vehicule'\r\n )}\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n ) : null}\r\n
\r\n
\r\n \r\n
\r\n {!this.state.isLoading ?\r\n \r\n : null}\r\n
\r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n ) : null}\r\n
\r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n ) : null}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState, ownProps: ExternalMavoVehicleDetailsFormProps) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app,\r\n vehicleState: state.vehicle,\r\n mavoVehicleState: state.mavoVehicle\r\n }),\r\n { ...CaseSettingsActionCreators, ...VehicleActionCreators, ...MavoVehicleActionCreators }\r\n)(withSnackbar(MavoVehicleDetailsForm as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { withSnackbar } from 'notistack';\r\nimport {\r\n Button,\r\n FormControlLabel,\r\n Grid,\r\n Switch\r\n} from '@material-ui/core';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport _ from 'lodash';\r\nimport { ApplicationState, CaseSettingsActionCreators, VehicleActionCreators } from '../../store';\r\nimport { MavoVehicleActionCreators } from '../../store/actions/MavoVehicle';\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport { DatePicker, MuiPickersUtilsProvider } from '@material-ui/pickers';\r\nimport moment from 'moment';\r\nimport * as R from 'ramda';\r\nimport MomentUtils from '@date-io/moment';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { Utils } from '../../helpers/Utils';\r\nimport NumberFormat from 'react-number-format';\r\nimport { MaterialUiPickersDate } from '@material-ui/pickers/typings/date';\r\nimport { IVehicleService } from '../../services/Interfaces/IVehicleService';\r\nimport { IMavoStockDataEditContainerProps } from '../cases/vehicleDetails/IMavoStockDataEditContainerProps';\r\nimport { MavoVehicle } from '../../interfaces/Vehicle';\r\nimport { MavoVehicleStockDetailsEditProps } from '../cases/vehicleDetails/MavoVehicleStockDetailsEditProps';\r\n\r\ninterface IMavoStockDataEditContainerState {\r\n isLoading: boolean;\r\n executing: boolean;\r\n}\r\n\r\n\r\nclass LocalizedUtils extends MomentUtils {\r\n // dateFormat = \"DD MM YYYY\";\r\n}\r\n\r\nconst maxNumberOfCharactersObservations = 300;\r\n\r\nclass MavoStockDataEditContainer extends React.PureComponent<\r\n IMavoStockDataEditContainerProps,\r\n IMavoStockDataEditContainerState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private vehicleService!: IVehicleService;\r\n \r\n static contextType = ApplicationContext;\r\n static displayName = 'MavoStockDataEditContainer';\r\n\r\n state = {\r\n isLoading: false,\r\n executing: false,\r\n isValuationOpen: false,\r\n isOpen: false,\r\n dialogVisible: false\r\n } as IMavoStockDataEditContainerState;\r\n\r\n public componentDidMount() {\r\n this.setState(\r\n {\r\n isLoading: false\r\n }\r\n );\r\n\r\n ValidatorForm.addValidationRule('maxLength', (value) => {\r\n if (!value) {\r\n return true;\r\n }\r\n\r\n if (value.length <= maxNumberOfCharactersObservations) {\r\n return true;\r\n }\r\n\r\n return false;\r\n });\r\n }\r\n\r\n NumberFormatCustom = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n allowNegative={false}\r\n thousandSeparator={false}\r\n decimalScale={0}\r\n />\r\n );\r\n };\r\n\r\n \r\n NumberDecimalFormatCustom = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n },\r\n currentTarget: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n allowNegative={false}\r\n thousandSeparator={false}\r\n decimalScale={2}\r\n />\r\n );\r\n };\r\n\r\n NumberDecimalCurrencyFormatCustom = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n },\r\n currentTarget: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n allowNegative={false}\r\n thousandSeparator={false}\r\n decimalScale={4}\r\n />\r\n );\r\n };\r\n\r\n onChange =\r\n (fieldName: string, fieldNameId?: string) => (e: any, newValue?: IReferential | null) => {\r\n !R.isNil(fieldNameId)\r\n ? \r\n this.props.setMavoVehicleObject({ \r\n ...this.props.mavoVehicleState.mavoVehicle, \r\n [fieldName]: newValue || e.target.value,\r\n [fieldNameId]: Utils.GetIdOrNull(newValue)\r\n })\r\n : \r\n this.props.setMavoVehicleObject({ \r\n ...this.props.mavoVehicleState.mavoVehicle, \r\n [fieldName]: newValue || e.target.value\r\n })\r\n };\r\n\r\n handleNirDateChange = (\r\n date: MaterialUiPickersDate | null,\r\n value?: string | null\r\n ) => {\r\n if (date === null || !date.isValid) {\r\n return;\r\n }\r\n\r\n const selectedDate = date ? date.format('YYYY-MM-DD') : undefined;\r\n\r\n this.props.setMavoVehicleObject({\r\n ...this.props.mavoVehicleState.mavoVehicle,\r\n nirDate: selectedDate || ''\r\n });\r\n };\r\n\r\n \r\n handleSwitchValue = async (checked: boolean) => {\r\n this.props.setMavoVehicleObject({\r\n ...this.props.mavoVehicleState.mavoVehicle,\r\n isReserved: checked\r\n });\r\n };\r\n\r\n isDisabled = (): boolean => {\r\n return this.props.hasRights ? false : true;\r\n };\r\n\r\n submitMavoVehicleData = async () => {\r\n try {\r\n this.setState({ executing: true, isLoading: true });\r\n let newVehicle = { ...this.props.mavoVehicleState.mavoVehicle } as MavoVehicle;\r\n newVehicle = await this.vehicleService.AddMavoVehicle({\r\n ...newVehicle,\r\n vehicleOptions: []\r\n });\r\n\r\n this.props.setMavoVehicleObject(newVehicle);\r\n this.setState({ executing: false, isLoading: false });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (ex) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n } \r\n };\r\n\r\n renderVehicleDetails = () => {\r\n return (\r\n \r\n \r\n \r\n
\r\n {this.translatorService.Tranlate('MAVO_VEHICLES_VEHICLE_VIN_CODE', 'VIN')}: \r\n
\r\n
\r\n  {this.props.mavoVehicleState.mavoVehicle.vin}\r\n
\r\n
\r\n \r\n
\r\n {this.translatorService.Tranlate('VEHICLES_VEHICLE_MAKE', 'Marca')}:\r\n
\r\n
\r\n  {this.props.mavoVehicleState.mavoVehicle.make ? this.props.mavoVehicleState.mavoVehicle.make.displayName : ''}\r\n
\r\n
\r\n \r\n
\r\n {this.translatorService.Tranlate('VEHICLES_VEHICLE_MODEL', 'Model')}:\r\n
\r\n
\r\n  {this.props.mavoVehicleState.mavoVehicle.model ? this.props.mavoVehicleState.mavoVehicle.model.displayName : ''}\r\n
\r\n
\r\n \r\n
\r\n {this.translatorService.Tranlate('MAVO_VEHICLES_VEHICLE_STATE', 'Stare')}:\r\n
\r\n
\r\n  {!R.isNil(this.props.mavoVehicleState.mavoVehicle?.currentStatus?.status) ? this.props.mavoVehicleState.mavoVehicle?.currentStatus?.status?.displayName || '' : ''}\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n\r\n renderStockDataForm = () => {\r\n return (\r\n {\r\n this.submitMavoVehicleData();\r\n }}\r\n >\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n this.onChange('nirNumber')(e)}\r\n label={this.translatorService.Tranlate('MAVO_VEHICLES_VEHICLE_NIR_NUMBER', 'Nr NIR')}\r\n />\r\n \r\n \r\n {/* \r\n \r\n this.onChange('supplier')(e)}\r\n label={this.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_VEHICLE_SUPPLIER',\r\n 'Furnizor'\r\n )}\r\n />\r\n \r\n \r\n this.onChange('ttcEvaluationEurPrice')(e)}\r\n label={this.translatorService.Tranlate('MAVO_VEHICLES_VEHICLE_INITIAL_PRICE', 'Pret intrare')}\r\n validators={['minNumber:1']}\r\n InputProps={{\r\n inputComponent: this.NumberDecimalFormatCustom\r\n }}\r\n />\r\n \r\n */}\r\n \r\n \r\n this.onChange('supplier')(e)}\r\n label={this.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_VEHICLE_SUPPLIER',\r\n 'Furnizor'\r\n )}\r\n />\r\n \r\n \r\n this.onChange('location')(e)}\r\n label={this.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_VEHICLE_LOCATION',\r\n 'Locatie'\r\n )}\r\n />\r\n \r\n \r\n
\r\n {\r\n this.handleSwitchValue(e.target.checked)\r\n }}\r\n color=\"primary\"\r\n />\r\n }\r\n label={this.translatorService.Tranlate(\r\n 'MAVO_VEHICLE_RESERVED',\r\n 'Rezervat'\r\n )}\r\n labelPlacement=\"end\"\r\n className=\"mt-3 ml-0 mr-0\"\r\n />\r\n
\r\n
\r\n
\r\n \r\n \r\n this.onChange('observations')(e)}\r\n label={this.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_OBSERVATIONS',\r\n 'Observatii'\r\n )}\r\n validators={['maxLength']}\r\n errorMessages={[\r\n this.translatorService.Tranlate(\r\n 'VALIDATORS_MAX_LENGTH',\r\n 'Numar maxim de caractere: '\r\n ) + maxNumberOfCharactersObservations\r\n ]}\r\n multiline\r\n variant=\"outlined\"\r\n rows={6}\r\n />\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n this.onChange('noticeNr')(e)}\r\n label={this.translatorService.Tranlate('MAVO_VEHICLES_VEHICLE_NOTICE_NUMBER', 'Nr aviz')}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n this.onChange('invoiceNr')(e)}\r\n label={this.translatorService.Tranlate('MAVO_VEHICLES_VEHICLE_INVOICE_NUMBER', 'Nr factura')}\r\n />\r\n \r\n \r\n this.onChange('salePrice')(e)}\r\n label={this.translatorService.Tranlate('MAVO_VEHICLES_VEHICLE_INVOICE_PRICE', 'Pret vanzare')}\r\n />\r\n \r\n \r\n this.onChange('currencyRate')(e)}\r\n label={this.translatorService.Tranlate('MAVO_VEHICLES_VEHICLE_INVOICE_CURRENCY', 'Curs vanzare')}\r\n InputProps={{\r\n inputComponent: this.NumberDecimalCurrencyFormatCustom\r\n }}\r\n />\r\n \r\n \r\n
\r\n
\r\n \r\n {this.translatorService.Tranlate('SAVE', 'Salveaza')}\r\n \r\n
\r\n \r\n );\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.vehicleService = (this.context as AppContext).vehicleService;\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n <>\r\n
\r\n {this.renderVehicleDetails()}\r\n
\r\n
\r\n {this.renderStockDataForm()}\r\n
\r\n \r\n ) : null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (\r\n state: ApplicationState,\r\n ownProps: MavoVehicleStockDetailsEditProps\r\n ) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app,\r\n vehicleState: state.vehicle,\r\n mavoVehicle: state.mavoVehicle,\r\n ...ownProps\r\n }),\r\n { ...CaseSettingsActionCreators, ...VehicleActionCreators, ...MavoVehicleActionCreators }\r\n)(withSnackbar(MavoStockDataEditContainer as any));\r\n","import React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n ApplicationState,\r\n CaseSettingsState,\r\n AppState,\r\n CaseSettingsActionCreators,\r\n VehicleActionCreators,\r\n VehicleState\r\n} from '../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport {\r\n Button,\r\n Card,\r\n AppBar,\r\n Tabs,\r\n Tab\r\n} from '@material-ui/core';\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { IReferentialService } from '../../services/Interfaces/IReferentialService';\r\nimport { MavoVehicleStatusCodeEnum, ReferentialCode, mavoVehicleStatuses } from '../../helpers/Constants';\r\nimport Referentials from '../../helpers/Referentials.json';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport { MavoVehicle } from '../../interfaces/Vehicle';\r\nimport TabPanel from '../_shared/Tabs';\r\nimport * as R from 'ramda';\r\nimport { MavoVehicleActionCreators } from '../../store/actions/MavoVehicle';\r\nimport { MavoVehicleState } from '../../store/reducers/MavoVehicle';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport MavoStockDataEditContainer from './MavoStockDataEditContainer';\r\nimport NavigationIcon from '@material-ui/icons/Navigation';\r\n\r\ninterface IMavoVehicleStockDetailsFormState {\r\n isLoading: boolean;\r\n executing: boolean;\r\n isUserHidden: boolean;\r\n vehicle: MavoVehicle | null;\r\n selectedTab: number;\r\n statuses: IReferential[];\r\n selectedDisplayedStatus: string;\r\n hasRights: boolean;\r\n}\r\n\r\ntype IMavoVehicleStockDetailsFormProps = {\r\n caseSettingsState: CaseSettingsState;\r\n appState: AppState;\r\n vehicleState: VehicleState;\r\n mavoVehicleState: MavoVehicleState;\r\n} & typeof CaseSettingsActionCreators &\r\n typeof VehicleActionCreators &\r\n typeof MavoVehicleActionCreators &\r\n ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass MavoVehicleStockDetailsForm extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n isLoading: true,\r\n executing: false,\r\n isUserHidden: false,\r\n selectedTab: 0,\r\n statuses: [] as IReferential[],\r\n selectedDisplayedStatus: '',\r\n hasRights: false\r\n } as IMavoVehicleStockDetailsFormState;\r\n\r\n public componentDidMount() { \r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadMavoVehicle();\r\n }\r\n );\r\n }\r\n\r\n loadMavoVehicle = async () => {\r\n const statusesTypeRef = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.VehicleStatus\r\n );\r\n const statuses = (await this.appReferentialService.Get(statusesTypeRef!.baseUrl)).filter(x => mavoVehicleStatuses.includes(x.id));\r\n\r\n await this.props.setMavoVehicle(this.props.match.params.id as any);\r\n\r\n const vehicle = this.props.mavoVehicleState.mavoVehicle;\r\n\r\n this.setState({\r\n isLoading: false,\r\n vehicle: vehicle,\r\n statuses: statuses,\r\n selectedDisplayedStatus: !R.isNil(vehicle?.currentStatus?.status)\r\n ? vehicle?.currentStatus?.status?.displayName || '' : '',\r\n hasRights: this.props.mavoVehicleState.mavoVehicle!.currentStatus!.status!.code === MavoVehicleStatusCodeEnum.INDISPONIBIL ? true : false\r\n });\r\n };\r\n\r\n onTabChange = (event: any, newValue: number) => {\r\n this.setState({\r\n selectedTab: newValue\r\n });\r\n };\r\n \r\n updateHasRightsValue = (value: boolean) => {\r\n this.setState({\r\n hasRights: value\r\n });\r\n }\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n {\r\n this.props.setMavoVehicleObject(null);\r\n this.props.history.push('/mavo-vehicles');\r\n }}\r\n >\r\n \r\n {this.translatorService.Tranlate(\r\n 'MENU_MAVO_VEHICLES_RECORD',\r\n 'Evidenta vehicule'\r\n )}\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n ) : null}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app,\r\n vehicleState: state.vehicle,\r\n mavoVehicleState: state.mavoVehicle\r\n }),\r\n{ ...CaseSettingsActionCreators, ...VehicleActionCreators, ...MavoVehicleActionCreators }\r\n)(withSnackbar(MavoVehicleStockDetailsForm as any));\r\n","import { MavoVehicleAuction } from '../../interfaces/Vehicle';\r\nimport { AppThunkAction } from '.././';\r\nimport * as ActionTypes from './ActionTypes';\r\n\r\ninterface SetVehicleAuction {\r\n type: typeof ActionTypes.VEHICLE_SET_VEHICLE_AUCTION;\r\n mavoVehicleAuction: MavoVehicleAuction | null;\r\n}\r\n\r\nexport type VehicleAuctionAction = SetVehicleAuction;\r\n\r\nexport const VehicleAuctionActionCreators = {\r\n setMavoVehicleAuctionObject:\r\n (mavoVehicleAuction: MavoVehicleAuction | null): AppThunkAction =>\r\n async (dispatch, getState, context) => {\r\n dispatch({ type: ActionTypes.VEHICLE_SET_VEHICLE_AUCTION, mavoVehicleAuction: mavoVehicleAuction });\r\n },\r\n};\r\n","import React, { useState, useEffect, useContext } from \"react\";\r\nimport moment from \"moment\";\r\nimport { ApplicationContext } from \"../../context/Contexts\";\r\nimport { MavoAuctionStatusEnum } from \"../../helpers/Constants\";\r\nimport { IReferential } from \"../../interfaces/IReferential\";\r\n\r\ntype RealTimeDateProps = {\r\n endDate: string;\r\n showLastOffer: boolean;\r\n auctionStatus: IReferential;\r\n};\r\n\r\nconst RealTimeDate = ({ endDate, showLastOffer, auctionStatus }: RealTimeDateProps) => {\r\n const [remainingTime, setRemainingTime] = useState(\"\");\r\n const [isLastOffer, setIsLastOffer] = useState(false);\r\n const context = useContext(ApplicationContext);\r\n const translatorService = context.translatorService;\r\n\r\n const calculateRemainingTime = (endDate: string) => {\r\n const now = moment();\r\n const end = moment(endDate);\r\n const duration = moment.duration(end.diff(now));\r\n\r\n if (auctionStatus?.code === MavoAuctionStatusEnum.TERMINATA) {\r\n return translatorService.Tranlate(\"CLOSED_AUCTION\", \"Licitatie inchisa!\");\r\n }\r\n\r\n if (auctionStatus?.code === MavoAuctionStatusEnum.STOPATA) {\r\n return translatorService.Tranlate(\"STOPPED_AUCTION\", \"Licitatie stopata!\");\r\n }\r\n\r\n if (duration.asMilliseconds() <= 0) {\r\n return translatorService.Tranlate(\"AUCTION_IN_ANALYSIS\", \"In Analiza!\");\r\n }\r\n\r\n // Dacă mai sunt mai puțin de 5 minute până la ora 17:00\r\n if (duration.asMinutes() <= 5 && end.hour() === 17) {\r\n setIsLastOffer(true);\r\n } else {\r\n setIsLastOffer(false);\r\n }\r\n\r\n const days = Math.floor(duration.asDays());\r\n const hours = duration.hours();\r\n const minutes = duration.minutes();\r\n const seconds = duration.seconds();\r\n\r\n let timeString = '';\r\n if (days > 0) timeString += `${days} zile, `;\r\n if (hours > 0) timeString += `${hours} ore, `;\r\n if (minutes > 0) timeString += `${minutes} minute, `;\r\n timeString += `${seconds} secunde`;\r\n\r\n return timeString;\r\n };\r\n\r\n useEffect(() => {\r\n const updateRemainingTime = () => {\r\n setRemainingTime(calculateRemainingTime(endDate));\r\n };\r\n\r\n const interval = setInterval(updateRemainingTime, 1000);\r\n updateRemainingTime(); \r\n\r\n return () => clearInterval(interval);\r\n }, [endDate]);\r\n\r\n return (\r\n \r\n {remainingTime}\r\n {showLastOffer && isLastOffer && (\r\n \r\n {translatorService.Tranlate(\"AUCTION_LAST_OFFER\", \"Ultima oferta\")}\r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nexport default RealTimeDate;\r\n","import React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n ApplicationState,\r\n CaseSettingsState,\r\n AppState,\r\n CaseSettingsActionCreators,\r\n VehicleActionCreators,\r\n VehicleState\r\n} from '../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport {\r\n Button,\r\n Card,\r\n CardContent,\r\n Dialog,\r\n DialogActions,\r\n DialogContent,\r\n DialogContentText,\r\n Grid,\r\n Modal\r\n} from '@material-ui/core';\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { IVehicleService } from '../../services/Interfaces/IVehicleService';\r\nimport { MavoVehicleAuction, MavoVehicleAuctionOffer } from '../../interfaces/Vehicle';;\r\nimport { MavoVehicleActionCreators } from '../../store/actions/MavoVehicle';\r\nimport { MavoVehicleState } from '../../store/reducers/MavoVehicle';\r\nimport { VehicleAuctionActionCreators } from '../../store/actions/VehicleAuction';\r\nimport moment from 'moment';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport _ from 'lodash';\r\nimport NavigationIcon from '@material-ui/icons/Navigation';\r\nimport RealTimeDate from './RealTimeDate';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport NumberFormat from 'react-number-format';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\n\r\ninterface IMavoAuctionDetailsFormState {\r\n isLoading: boolean;\r\n executing: boolean; \r\n isOpen: boolean;\r\n selectedAuction: MavoVehicleAuction;\r\n mavoVehicleAuctionOffer: MavoVehicleAuctionOffer;\r\n isOfferLoading: boolean; \r\n}\r\n\r\nexport interface ExternalMavoAuctionDetailsFormProps {\r\n selectedAuction: MavoVehicleAuction;\r\n closeDialog: () => void;\r\n goToUserAuctions: () => void;\r\n} \r\n\r\ntype IMavoAuctionDetailsFormProps = ExternalMavoAuctionDetailsFormProps & {\r\n caseSettingsState: CaseSettingsState;\r\n appState: AppState;\r\n vehicleState: VehicleState;\r\n mavoVehicleState: MavoVehicleState;\r\n mavoVehicleAuctionState: MavoVehicleAuction;\r\n} & typeof CaseSettingsActionCreators &\r\n typeof VehicleActionCreators &\r\n typeof MavoVehicleActionCreators & typeof VehicleAuctionActionCreators &\r\n ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass AddAuctionOfferDialog extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private vehicleService!: IVehicleService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n isLoading: false,\r\n executing: false,\r\n isOpen: false,\r\n selectedAuction: this.props.selectedAuction,\r\n offers: [] as MavoVehicleAuctionOffer[],\r\n maxOffers: [] as MavoVehicleAuctionOffer[],\r\n mavoVehicleAuctionOffer: {\r\n mavoVehicleAuctionId: 0,\r\n id: 0\r\n } as MavoVehicleAuctionOffer,\r\n isOfferLoading: false\r\n } as IMavoAuctionDetailsFormState;\r\n\r\n public componentDidMount() { \r\n ValidatorForm.addValidationRule('isValidMinimumOffer', (value) => {\r\n const minimumOffer = this.state.selectedAuction!.mavoVehicleAuctionOffers.length > 0 ? \r\n this.state.selectedAuction!.minDifference + this.state.selectedAuction!.currentPrice : \r\n this.state.selectedAuction!.startPrice;\r\n if (value < minimumOffer) {\r\n return false;\r\n }\r\n return true;\r\n });\r\n\r\n ValidatorForm.addValidationRule('isValidMaximumOffer', (value) => {\r\n if (value < this.state.mavoVehicleAuctionOffer!.minimumOffer) {\r\n return false;\r\n }\r\n return true;\r\n });\r\n\r\n ValidatorForm.addValidationRule('isGreaterThanMaxValue', (value) => {\r\n if (value >= 999999.99) {\r\n return false;\r\n }\r\n return true;\r\n });\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadData();\r\n }\r\n );\r\n }\r\n\r\n private loadData = async () => {\r\n const mavoVehicleAuction = await this.vehicleService.GetMavoAuction(this.state.selectedAuction.id);\r\n const minimumOffer = mavoVehicleAuction.mavoVehicleAuctionOffers.length > 0 ? \r\n mavoVehicleAuction.minDifference + mavoVehicleAuction.currentPrice : \r\n mavoVehicleAuction.startPrice;\r\n\r\n this.setState({\r\n isLoading: false,\r\n selectedAuction: mavoVehicleAuction,\r\n mavoVehicleAuctionOffer: {\r\n ...this.state.mavoVehicleAuctionOffer,\r\n mavoVehicleAuctionId: mavoVehicleAuction.id,\r\n minimumOffer: minimumOffer,\r\n details: ''\r\n }\r\n });\r\n\r\n }\r\n\r\n NumberDecimalFormatCustom = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n },\r\n currentTarget: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n allowNegative={false}\r\n thousandSeparator={false}\r\n decimalScale={2}\r\n />\r\n );\r\n };\r\n\r\n addAuctionOffer = async () => {\r\n try {\r\n this.setState({\r\n isOpen: false,\r\n executing: true,\r\n isOfferLoading: true\r\n });\r\n\r\n const mavoVehicleAuctionOffer = {\r\n ...this.state.mavoVehicleAuctionOffer,\r\n hasManualOffer: true\r\n };\r\n\r\n const result = await this.vehicleService.AddMavoAuctionOffer(mavoVehicleAuctionOffer);\r\n if (!result.success) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate(result.message, result.message), {\r\n variant: 'error'\r\n });\r\n \r\n if (result.currentPrice) {\r\n this.setState({\r\n executing: false,\r\n isOfferLoading: false,\r\n mavoVehicleAuctionOffer: {\r\n ...this.state.mavoVehicleAuctionOffer,\r\n minimumOffer: result.currentPrice + this.state.selectedAuction!.minDifference \r\n }\r\n });\r\n }\r\n return;\r\n }\r\n\r\n this.setState({\r\n executing: false,\r\n isOfferLoading: false\r\n });\r\n\r\n this.props.goToUserAuctions();\r\n \r\n } catch (ex) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n } \r\n }\r\n \r\n renderAuctionDetails = () => {\r\n return (\r\n \r\n \r\n
\r\n {this.translatorService.Tranlate('MAVO_AUCTION_REMAINING_TIME', 'Timp ramas')}:\r\n
\r\n
\r\n  \r\n \r\n
\r\n
\r\n \r\n
\r\n {this.translatorService.Tranlate('MAVO_VEHICLES_VEHICLE_VIN_CODE', 'VIN')}: \r\n
\r\n
\r\n  {this.state.selectedAuction ? this.state.selectedAuction.mavoVehicle.vin : ''}\r\n
\r\n
\r\n \r\n
\r\n {this.translatorService.Tranlate('VEHICLES_VEHICLE_MAKE', 'Marca')}:\r\n
\r\n
\r\n  {this.state.selectedAuction && this.state.selectedAuction.mavoVehicle.make ? this.state.selectedAuction.mavoVehicle.make.displayName : ''}\r\n
\r\n
\r\n \r\n
\r\n {this.translatorService.Tranlate('VEHICLES_VEHICLE_MODEL', 'Model')}:\r\n
\r\n
\r\n  {this.state.selectedAuction && this.state.selectedAuction.mavoVehicle.model ? this.state.selectedAuction.mavoVehicle.model.displayName : ''}\r\n
\r\n
\r\n \r\n
\r\n {this.translatorService.Tranlate('MAVO_VEHICLES_AUCTION_START_PRICE', 'Pret start licitatie')}:\r\n
\r\n
\r\n  {this.state.selectedAuction && this.state.selectedAuction.startPrice} EUR\r\n
\r\n
\r\n \r\n
\r\n {this.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_AUCTION_START_DATE_1',\r\n 'Data start licitatie'\r\n )}:\r\n
\r\n
\r\n  {this.state.selectedAuction && this.state.selectedAuction.startDate ?\r\n moment\r\n .utc(this.state.selectedAuction.startDate)\r\n .local()\r\n .format(this.props.appState.dateFormat) : null}\r\n
\r\n
\r\n \r\n
\r\n {this.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_AUCTION_END_DATE',\r\n 'Data stop licitatie'\r\n )}:\r\n
\r\n
\r\n  {this.state.selectedAuction && this.state.selectedAuction.endDate ? moment(this.state.selectedAuction.endDate).format('DD-MM-YYYY HH:mm') : null}\r\n
\r\n
\r\n \r\n
\r\n {this.translatorService.Tranlate('VEHICLE_AUCTION_MIN_DIFFERENCE', 'Suma minima peste ultima oferta')}:\r\n
\r\n
\r\n  {this.state.selectedAuction!.minDifference || ''}\r\n
\r\n
\r\n \r\n
\r\n {this.translatorService.Tranlate('VEHICLE_AUCTION_CURRENT_PRICE', 'Pret curent licitatie')}:\r\n
\r\n
\r\n  {this.state.selectedAuction!.mavoVehicleAuctionOffers.length > 0 ? this.state.selectedAuction!.currentPrice : ''}\r\n
\r\n
\r\n
\r\n );\r\n }\r\n\r\n onChange =\r\n (fieldName: string, isNumber: boolean) => (e: any, newValue?: IReferential | null) => {\r\n isNumber\r\n ? this.setState({\r\n mavoVehicleAuctionOffer: {\r\n ...this.state.mavoVehicleAuctionOffer,\r\n [fieldName]: parseFloat(newValue || e.target.value)\r\n }\r\n })\r\n : this.setState({\r\n mavoVehicleAuctionOffer: {\r\n ...this.state.mavoVehicleAuctionOffer,\r\n [fieldName]: newValue || e.target.value\r\n }\r\n });\r\n };\r\n \r\n public renderOfferContent() {\r\n return (\r\n \r\n \r\n \r\n \r\n this.onChange('minimumOffer', true)(e)\r\n }\r\n label={this.translatorService.Tranlate('VEHICLE_AUCTION_MINIMUM_OFFER', 'Oferta mea minima')}\r\n validators={['isValidMinimumOffer', 'isGreaterThanMaxValue']}\r\n errorMessages={[\r\n this.translatorService.Tranlate(\r\n 'MINIMUM_OFFER_ERROR_MESSAGE',\r\n 'Oferta minima trebuie sa fie mai mare decat pretul curent al licitatiei + suma minima peste ultima oferta: '\r\n ) + (this.state.selectedAuction!.mavoVehicleAuctionOffers.length > 0 ? \r\n this.state.selectedAuction!.minDifference + this.state.selectedAuction!.currentPrice : \r\n this.state.selectedAuction!.startPrice) + ' EUR',\r\n this.translatorService.Tranlate(\r\n 'GRATTER_THAN_MAX_VALUE_ERROR_MESSAGE',\r\n 'Pretul introdus este prea mare. Trebuie sa fie mica decat 999999.99'\r\n )\r\n ]}\r\n InputProps={{\r\n inputComponent: this.NumberDecimalFormatCustom\r\n }}\r\n />\r\n \r\n \r\n \r\n this.onChange('maximumOffer', true)(e)\r\n }\r\n label={this.translatorService.Tranlate('VEHICLE_AUCTION_MAXIMUM_OFFER', 'Oferta mea maxima')}\r\n validators={['isValidMaximumOffer', 'isGreaterThanMaxValue']}\r\n errorMessages={[\r\n this.translatorService.Tranlate(\r\n 'MAXIMUM_OFFER_ERROR_MESSAGE',\r\n 'Oferta maxima trebuie sa fie mai mare sau egala decat oferta mea minima: '\r\n ) + this.state.mavoVehicleAuctionOffer.minimumOffer + ' EUR',\r\n this.translatorService.Tranlate(\r\n 'GRATTER_THAN_MAX_VALUE_ERROR_MESSAGE',\r\n 'Pretul introdus este prea mare. Trebuie sa fie mica decat 999999.99'\r\n ) \r\n ]}\r\n InputProps={{\r\n inputComponent: this.NumberDecimalFormatCustom\r\n }}\r\n />\r\n \r\n \r\n this.onChange('details', false)(e)}\r\n label={this.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_OFFER_DETAILS',\r\n 'Alte detalii'\r\n )}\r\n multiline\r\n variant=\"outlined\"\r\n rows={4}\r\n />\r\n \r\n \r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n {this.translatorService.Tranlate('MAVO_VEHICLE_IMPORT_CLOSE_BTN', 'Renunta')}\r\n \r\n \r\n
\r\n
\r\n );\r\n }\r\n \r\n handleOpenConfirmationDialog = () => {\r\n this.setState({\r\n isOpen: true\r\n });\r\n };\r\n\r\n handleCloseModal = () => {\r\n this.setState({\r\n isOpen: false\r\n });\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.vehicleService = (this.context as AppContext).vehicleService;\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n
\r\n {\r\n this.props.closeDialog();\r\n }}\r\n >\r\n \r\n {this.translatorService.Tranlate('AUCTION_DIALOG_BACK', 'Inapoi')}\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n {this.renderAuctionDetails()} \r\n {this.renderOfferContent()} \r\n \r\n ): null}\r\n
\r\n\r\n \r\n \r\n \r\n \r\n {`${this.translatorService.Tranlate(\r\n 'AUCTION_CONFIRMATION_MESSAGE',\r\n 'Confirmati licitarea conform conditiilor de licitare ?'\r\n )} `}\r\n \r\n \r\n \r\n \r\n {this.translatorService.Tranlate('VEHICLE_SEARCH_FORM_VEHICLE_YES', 'Da')}\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState, ownProps: ExternalMavoAuctionDetailsFormProps) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app,\r\n vehicleState: state.vehicle,\r\n mavoVehicleState: state.mavoVehicle,\r\n mavoVehicleAuctionState: state.mavoVehicleAuction,\r\n }),\r\n{ ...CaseSettingsActionCreators, ...VehicleActionCreators, ...MavoVehicleActionCreators, ...VehicleAuctionActionCreators }\r\n)(withSnackbar(AddAuctionOfferDialog as any));\r\n","import React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n ApplicationState,\r\n CaseSettingsState,\r\n AppState,\r\n CaseSettingsActionCreators,\r\n VehicleActionCreators,\r\n VehicleState\r\n} from '../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport {\r\n Button,\r\n Card,\r\n AppBar,\r\n Tabs,\r\n Tab,\r\n Dialog,\r\n IconButton,\r\n DialogTitle,\r\n DialogContent\r\n} from '@material-ui/core';\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { IReferentialService } from '../../services/Interfaces/IReferentialService';\r\nimport {ReferentialCode, RoleClaimsEnum, mavoVehicleStatuses } from '../../helpers/Constants';\r\nimport Referentials from '../../helpers/Referentials.json';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport { IVehicleService } from '../../services/Interfaces/IVehicleService';\r\nimport { MavoVehicle, MavoVehicleAttachment, MavoVehicleAuction, MavoVehicleAuctionOffer, VehicleConditionInfo, VehicleOptionInfo } from '../../interfaces/Vehicle';\r\nimport TabPanel from '../_shared/Tabs';\r\nimport * as R from 'ramda';\r\nimport { MavoVehicleActionCreators } from '../../store/actions/MavoVehicle';\r\nimport { MavoVehicleState } from '../../store/reducers/MavoVehicle';\r\nimport MavoGeneralInformationContainer from './MavoGeneralInformationContainer';\r\nimport MavoVehicleOptionsContainer from './MavoVehicleOptionsContainer';\r\nimport MavoAttachmentDataContainer from './MavoAttachmentDataContainer';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport MavoStatusDataContainer from './MavoStatusDataContainer';\r\nimport { VehicleAuctionActionCreators } from '../../store/actions/VehicleAuction';\r\nimport NavigationIcon from '@material-ui/icons/Navigation';\r\nimport _ from 'lodash';\r\nimport AddAuctionOfferDialog from './AddAuctionOfferDialog';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\n\r\ninterface IMavoVehicleDetailsViewFormState {\r\n isLoading: boolean;\r\n executing: boolean;\r\n isUserHidden: boolean;\r\n vehicle: MavoVehicle;\r\n selectedTab: number;\r\n statuses: IReferential[];\r\n statusOptions: IReferential[];\r\n selectedDisplayedStatus: string;\r\n isChangeVehicleStatusDialogOpen: boolean;\r\n isOfferDialogOpen: boolean;\r\n mavoVehicleAuctionOffer: MavoVehicleAuctionOffer;\r\n}\r\n\r\nexport interface ExternalMavoVehicleDetailsViewFormProps {\r\n mavoVehicleAuction: MavoVehicleAuction;\r\n closeDialog: () => void;\r\n goToUserAuctions: () => void;\r\n} \r\n\r\ntype IMavoVehicleDetailsViewFormProps = ExternalMavoVehicleDetailsViewFormProps & {\r\n caseSettingsState: CaseSettingsState;\r\n appState: AppState;\r\n vehicleState: VehicleState;\r\n mavoVehicleState: MavoVehicleState;\r\n mavoVehicleAuctionState: MavoVehicleAuction;\r\n} & typeof CaseSettingsActionCreators &\r\n typeof VehicleActionCreators &\r\n typeof MavoVehicleActionCreators & typeof VehicleAuctionActionCreators &\r\n ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass MavoVehicleDetailsViewForm extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private vehicleService!: IVehicleService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n isLoading: true,\r\n executing: false,\r\n isUserHidden: false,\r\n selectedTab: 0,\r\n statuses: [] as IReferential[],\r\n statusOptions: [],\r\n isChangeVehicleStatusDialogOpen: false,\r\n isOfferDialogOpen: false,\r\n mavoVehicleAuctionOffer: {\r\n mavoVehicleAuctionId: 0,\r\n id: 0\r\n } as MavoVehicleAuctionOffer,\r\n vehicle: {\r\n id: 0,\r\n vin: '',\r\n make: null,\r\n makeId: null,\r\n model: null,\r\n modelId: null,\r\n versionItem: null,\r\n versionId: null,\r\n color: null,\r\n colorId: null,\r\n fuelType: null,\r\n fuelTypeId: null,\r\n bodyTypeId: null,\r\n bodyType: null,\r\n transmissionTypeId: null,\r\n transmissionType: null,\r\n provenance: null,\r\n provenanceId: null,\r\n firstRegistrationDate: '',\r\n fabricationYear: null,\r\n kilometersNr: null,\r\n power: null,\r\n engineManufactureCode: '',\r\n accessories: null,\r\n isReserved: false,\r\n reservations: '',\r\n cylinderCapacity: null,\r\n supplier: null,\r\n location: null,\r\n htPurchaseRonPrice: null,\r\n ttcEvaluationEurPrice: null,\r\n nirNumber: null,\r\n nirDate: null,\r\n currentStatus: null,\r\n vehicleOptions: [],\r\n vehicleType: null,\r\n vehicleTypeId: null,\r\n mavoVehicleAttachments: [] as MavoVehicleAttachment[],\r\n vehicleOptionInfo: {\r\n vehicleId: 0,\r\n engineCapacity: null,\r\n emissionsClass: null,\r\n doorCount: null,\r\n seatCount: null,\r\n driveType: null,\r\n registration: null,\r\n vehicleCondition: null,\r\n metallicColor: null,\r\n upholstery: null,\r\n upholsteryColor: null,\r\n previousOwnersCount: null,\r\n countryOfOrigin: null,\r\n alarm: false,\r\n antiTheft: false,\r\n abs: false,\r\n esp: false,\r\n driverFrontAirbag: false,\r\n passengerFrontAirbag: false,\r\n frontSideAirbags: false,\r\n frontCurtainAirbag: false,\r\n xenonHeadlights: false,\r\n alloyWheels: false,\r\n glassRoof: false,\r\n towHook: false,\r\n protectionFrame: false,\r\n steeringWheelControls: false,\r\n onBoardComputer: false,\r\n cruiseControl: false,\r\n lockableDifferential: false,\r\n particleFilter: false,\r\n electricMirrors: false,\r\n frontElectricWindows: false,\r\n rearElectricWindows: false,\r\n tintedWindows: false,\r\n heatedSeats: false,\r\n rainSensors: false,\r\n parkingSensors: false,\r\n powerSteering: false,\r\n sunroof: false,\r\n rightHandDrive: false,\r\n fogLights: false,\r\n airConditioning: false,\r\n radio: false,\r\n cdPlayer: false,\r\n videoScreen: false,\r\n gps: false\r\n } as VehicleOptionInfo,\r\n vehicleConditionInfo: {\r\n vehicleId: 0,\r\n frontWingLeftPaintId: null,\r\n frontWingLeftPaint: null,\r\n frontWingRightPaintId: null,\r\n frontWingRightPaint: null,\r\n rearWingLeftPaintId: null,\r\n rearWingLeftPaint: null,\r\n rearWingRightPaintId: null,\r\n rearWingRightPaint: null,\r\n frontDoorLeftPaintId: null,\r\n frontDoorLeftPaint: null,\r\n frontDoorRightPaintId: null,\r\n frontDoorRightPaint: null,\r\n rearDoorLeftPaintId: null,\r\n rearDoorLeftPaint: null,\r\n rearDoorRightPaintId: null,\r\n rearDoorRightPaint: null,\r\n hoodPaintId: null,\r\n hoodPaint: null,\r\n faceMaskPaintId: null,\r\n faceMaskPaint: null,\r\n frontBumperPaintId: null,\r\n frontBumperPaint: null,\r\n rearBumperPaintId: null,\r\n rearBumperPaint: null,\r\n trunkPaintId: null,\r\n trunkPaint: null,\r\n spoilerPaintId: null,\r\n spoilerPaint: null,\r\n roofPaintId: null,\r\n roofPaint: null,\r\n superstructurePaintId: null,\r\n superstructurePaint: null,\r\n \r\n // Tinichigerie + Vopsitorie (Bodywork + Painting)\r\n frontWingLeftBodyPaintId: null,\r\n frontWingLeftBodyPaint: null,\r\n frontWingRightBodyPaintId: null,\r\n frontWingRightBodyPaint: null,\r\n rearWingLeftBodyPaintId: null,\r\n rearWingLeftBodyPaint: null,\r\n rearWingRightBodyPaintId: null,\r\n rearWingRightBodyPaint: null,\r\n frontDoorLeftBodyPaintId: null,\r\n frontDoorLeftBodyPaint: null,\r\n frontDoorRightBodyPaintId: null,\r\n frontDoorRightBodyPaint: null,\r\n rearDoorLeftBodyPaintId: null,\r\n rearDoorLeftBodyPaint: null,\r\n rearDoorRightBodyPaintId: null,\r\n rearDoorRightBodyPaint: null,\r\n hoodBodyPaintId: null,\r\n hoodBodyPaint: null,\r\n faceMaskBodyPaintId: null,\r\n faceMaskBodyPaint: null,\r\n frontBumperBodyPaintId: null,\r\n frontBumperBodyPaint: null,\r\n rearBumperBodyPaintId: null,\r\n rearBumperBodyPaint: null,\r\n trunkBodyPaintId: null,\r\n trunkBodyPaint: null,\r\n spoilerBodyPaintId: null,\r\n spoilerBodyPaint: null,\r\n roofBodyPaintId: null,\r\n roofBodyPaint: null,\r\n superstructureBodyPaintId: null,\r\n superstructureBodyPaint: null,\r\n \r\n // Replacement & Painting (Inlcuire + vopsire)\r\n frontWingLeftReplacePaintId: null,\r\n frontWingLeftReplacePaint: null,\r\n frontWingRightReplacePaintId: null,\r\n frontWingRightReplacePaint: null,\r\n rearWingLeftReplacePaintId: null,\r\n rearWingLeftReplacePaint: null,\r\n rearWingRightReplacePaintId: null,\r\n rearWingRightReplacePaint: null,\r\n frontDoorLeftReplacePaintId: null,\r\n frontDoorLeftReplacePaint: null,\r\n frontDoorRightReplacePaintId: null,\r\n frontDoorRightReplacePaint: null,\r\n rearDoorLeftReplacePaintId: null,\r\n rearDoorLeftReplacePaint: null,\r\n rearDoorRightReplacePaintId: null,\r\n rearDoorRightReplacePaint: null,\r\n hoodReplacePaintId: null,\r\n hoodReplacePaint: null,\r\n faceMaskReplacePaintId: null,\r\n faceMaskReplacePaint: null,\r\n frontBumperReplacePaintId: null,\r\n frontBumperReplacePaint: null,\r\n rearBumperReplacePaintId: null,\r\n rearBumperReplacePaint: null,\r\n trunkReplacePaintId: null,\r\n trunkReplacePaint: null,\r\n spoilerReplacePaintId: null,\r\n spoilerReplacePaint: null,\r\n roofReplacePaintId: null,\r\n roofReplacePaint: null,\r\n superstructureReplacePaintId: null,\r\n superstructureReplacePaint: null,\r\n\r\n //Inlocuire/Reparatie\r\n frontLeftSideWindowToReplace: false,\r\n frontLeftSideWindowToRepair: false,\r\n frontRightSideWindowToReplace: false,\r\n frontRightSideWindowToRepair: false,\r\n \r\n rearLeftSideWindowToReplace: false,\r\n rearLeftSideWindowToRepair: false,\r\n rearRightSideWindowToReplace: false,\r\n rearRightSideWindowToRepair: false,\r\n \r\n leftSideMirrorToReplace: false,\r\n leftSideMirrorToRepair: false,\r\n rightSideMirrorToReplace: false,\r\n rightSideMirrorToRepair: false,\r\n \r\n leftWiperToReplace: false,\r\n leftWiperToRepair: false,\r\n rightWiperToReplace: false,\r\n rightWiperToRepair: false,\r\n \r\n leftProjectorToReplace: false,\r\n leftProjectorToRepair: false,\r\n rightProjectorToReplace: false,\r\n rightProjectorToRepair: false,\r\n \r\n leftTurnSignalToReplace: false,\r\n leftTurnSignalToRepair: false,\r\n rightTurnSignalToReplace: false,\r\n rightTurnSignalToRepair: false,\r\n \r\n leftHeadlightToReplace: false,\r\n leftHeadlightToRepair: false,\r\n rightHeadlightToReplace: false,\r\n rightHeadlightToRepair: false,\r\n \r\n leftBrakeLightsToReplace: false,\r\n leftBrakeLightsToRepair: false,\r\n rightBrakeLightsToReplace: false,\r\n rightBrakeLightsToRepair: false,\r\n \r\n rearWindshieldToReplace: false,\r\n rearWindshieldToRepair: false,\r\n \r\n windshieldToReplace: false,\r\n windshieldToRepair: false,\r\n \r\n hoodGrilleToReplace: false,\r\n hoodGrilleToRepair: false,\r\n \r\n //Mecanica\r\n motor: null,\r\n clutch: null,\r\n gearbox: null,\r\n steering: null,\r\n battery: null,\r\n exhaust: null,\r\n tires: null,\r\n driveShaft: null,\r\n leftCvJoints: null,\r\n rightCvJoints: null,\r\n leftShockAbsorbers: null,\r\n rightShockAbsorbers: null,\r\n frontBrakes: null,\r\n backBrakes: null,\r\n itpValidateDate: null,\r\n \r\n //Interior si accesorii\r\n leftSeatUpholstery: null,\r\n rightSeatUpholstery: null,\r\n rearSeatUpholstery: null,\r\n interiorMirror: null,\r\n firstAidKit: null, \r\n bulbKit: null, \r\n leftFrontHeadrest: null, \r\n rightFrontHeadrest: null,\r\n rearHeadrest: null,\r\n spareTireGood: false,\r\n spareTireReplace: false,\r\n frontFloorMats: false,\r\n fireExtinguisher: false,\r\n wheelWrench: false,\r\n rearFloorMats: false,\r\n reflectiveTriangle: false, \r\n carJack: false,\r\n } as VehicleConditionInfo\r\n } as unknown as MavoVehicle,\r\n selectedDisplayedStatus: ''\r\n } as IMavoVehicleDetailsViewFormState;\r\n\r\n public componentDidMount() { \r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadMavoVehicle();\r\n }\r\n );\r\n }\r\n\r\n loadMavoVehicle = async () => {\r\n const statusesTypeRef = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.VehicleStatus\r\n );\r\n const statuses = (await this.appReferentialService.Get(statusesTypeRef!.baseUrl)).filter(x => mavoVehicleStatuses.includes(x.id));\r\n \r\n await this.props.setMavoVehicle(this.props.mavoVehicleAuction.mavoVehicleId);\r\n\r\n const vehicle = this.props.mavoVehicleState.mavoVehicle;\r\n\r\n this.setState({\r\n isLoading: false,\r\n vehicle: vehicle,\r\n statuses: statuses,\r\n selectedDisplayedStatus: !R.isNil(vehicle?.currentStatus?.status)\r\n ? vehicle?.currentStatus?.status?.displayName || ''\r\n : ''\r\n });\r\n };\r\n\r\n closeDialog = async () => {\r\n this.setState({ isChangeVehicleStatusDialogOpen: false });\r\n };\r\n\r\n onTabChange = (event: any, newValue: number) => {\r\n this.setState({\r\n selectedTab: newValue\r\n });\r\n };\r\n\r\n openAddOfferDialog = () => {\r\n this.setState({\r\n isOfferDialogOpen: true\r\n });\r\n }\r\n\r\n closeAddOfferDialog = () => {\r\n this.setState({\r\n isOfferDialogOpen: false\r\n });\r\n };\r\n\r\n public hasRight = (right: string): boolean => {\r\n return this.props.appState!.user!.profile.role.includes(right);\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.vehicleService = (this.context as AppContext).vehicleService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n {\r\n this.props.closeDialog();\r\n }}\r\n >\r\n \r\n {this.translatorService.Tranlate(\r\n 'MENU_MAVO_VEHICLES_AUCTIONS_RECORD',\r\n 'Inapoi la lista'\r\n )}\r\n \r\n {this.hasRight(RoleClaimsEnum.MavoAdministrator) ? null : (\r\n {\r\n this.openAddOfferDialog();\r\n }}\r\n >\r\n {this.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_VEHICLE_BID',\r\n 'Liciteaza'\r\n )}\r\n \r\n )}\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n ) : null}\r\n
\r\n
\r\n \r\n
\r\n {!this.state.isLoading ? \r\n \r\n : null}\r\n
\r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n ) : null}\r\n
\r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n ) : null}\r\n
\r\n
\r\n
\r\n\r\n {this.state.isOfferDialogOpen && this.props.mavoVehicleAuction ? (\r\n \r\n \r\n \r\n {this.translatorService.Tranlate('MAVO_VEHICLES_AUCTION_OFFER', 'Oferta')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ) : null }\r\n
\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState, ownProps: ExternalMavoVehicleDetailsViewFormProps) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app,\r\n vehicleState: state.vehicle,\r\n mavoVehicleState: state.mavoVehicle,\r\n mavoVehicleAuctionState: state.mavoVehicleAuction,\r\n }),\r\n{ ...CaseSettingsActionCreators, ...VehicleActionCreators, ...MavoVehicleActionCreators, ...VehicleAuctionActionCreators }\r\n)(withSnackbar(MavoVehicleDetailsViewForm as any));\r\n","import * as React from 'react';\r\nimport { ApplicationState, AppState } from '../../store';\r\nimport { ApplicationContext, AppContext } from '../../context/Contexts';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n Card,\r\n Grid,\r\n Tab,\r\n Tabs,\r\n AppBar,\r\n TextField,\r\n Button,\r\n Checkbox,\r\n FormControlLabel,\r\n Dialog,\r\n DialogTitle,\r\n IconButton,\r\n DialogContent\r\n} from '@material-ui/core';\r\nimport TabPanel from '../_shared/Tabs';\r\nimport MUIDataTable, {\r\n MUIDataTableColumnOptions,\r\n MUIDataTableMeta,\r\n SelectableRows\r\n} from 'mui-datatables';\r\nimport { MUITranslations } from '../../helpers/MUITableTranslations';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport {\r\n MavoVehicleAuctionsFilters,\r\n MavoVehicleAuctionsList,\r\n MavoVehicleAuctionOffer,\r\n MavoVehicleAuction\r\n} from '../../interfaces/Vehicle';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport Loader from '../Loader';\r\nimport noop from 'lodash/noop';\r\nimport _ from 'lodash';\r\nimport { DatePicker, MuiPickersUtilsProvider } from '@material-ui/pickers';\r\nimport moment from 'moment';\r\nimport MomentUtils from '@date-io/moment';\r\nimport { MaterialUiPickersDate } from '@material-ui/pickers/typings/date';\r\nimport { MavoVehicleActionCreators } from '../../store/actions/MavoVehicle';\r\nimport { MavoVehicleState } from '../../store/reducers/MavoVehicle';\r\nimport NumberFormat from 'react-number-format';\r\nimport { VehicleAuctionActionCreators } from '../../store/actions/VehicleAuction';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport MavoVehicleDetailsViewForm from './MavoVehicleDetailsViewForm';\r\nimport {MuiThemeProvider, createMuiTheme } from '@material-ui/core';\r\nimport RealTimeDate from './RealTimeDate';\r\nimport AddAuctionOfferDialog from './AddAuctionOfferDialog';\r\nimport { RoleClaimsEnum } from '../../helpers/Constants';\r\n\r\nclass LocalizedUtils extends MomentUtils {\r\n // dateFormat = \"DD MM YYYY\";\r\n}\r\n\r\ntype MavoVehiclesAuctionsProps = {\r\n appState: AppState;\r\n mavoVehicleState: MavoVehicleState;\r\n mavoVehicleAuctionState: MavoVehicleAuction;\r\n} &\r\n typeof MavoVehicleActionCreators & typeof VehicleAuctionActionCreators &\r\n ProviderContext &\r\n RouteComponentProps;\r\n\r\ninterface IMavoVehiclesAuctionsState {\r\n auctionsList: MavoVehicleAuctionsList;\r\n makeEntities: IReferential[];\r\n selectedMakeEntities: IReferential[];\r\n modelEntities: IReferential[];\r\n selectedModelEntities: IReferential[];\r\n selectedStartDate: Date | null;\r\n selectedEndDate: Date | null;\r\n minPrice: number | null;\r\n maxPrice: number | null;\r\n selectedTab: number;\r\n isLoading: boolean;\r\n isLoadingAuctions: boolean;\r\n count: number;\r\n page: number;\r\n pageSize: number;\r\n vin: string;\r\n selectedAuction: MavoVehicleAuction | null;\r\n executing: boolean;\r\n isDialogOpen: boolean;\r\n isOfferDialogOpen: boolean;\r\n mavoVehicleAuctionOffer: MavoVehicleAuctionOffer;\r\n isOpen: boolean;\r\n}\r\n\r\nclass MavoVehiclesAuctions extends React.PureComponent {\r\n private cbContext!: AppContext;\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n auctionsList: {} as MavoVehicleAuctionsList,\r\n makeEntities: [],\r\n selectedMakeEntities: [],\r\n modelEntities: [],\r\n selectedModelEntities: [],\r\n selectedTab: 0,\r\n isLoading: false,\r\n isLoadingAuctions: false,\r\n count: 1,\r\n page: 0,\r\n pageSize: 10,\r\n vin: '',\r\n selectedStartDate: null,\r\n selectedEndDate: null,\r\n selectedAuction: null,\r\n executing: false,\r\n minPrice: null,\r\n maxPrice: null,\r\n isDialogOpen: false,\r\n isOfferDialogOpen: false,\r\n mavoVehicleAuctionOffer: {\r\n mavoVehicleAuctionId: 0,\r\n id: 0\r\n } as MavoVehicleAuctionOffer,\r\n isOpen: false\r\n } as IMavoVehiclesAuctionsState;\r\n\r\n public async componentDidMount() {\r\n const mavoVehiclesAuctionsFilters = {\r\n makeIds: [],\r\n modelIds: [],\r\n startDate: null,\r\n endDate: null,\r\n page: this.state.page + 1,\r\n pageSize: this.state.pageSize,\r\n vin: '',\r\n minPrice: null,\r\n maxPrice: null\r\n } as MavoVehicleAuctionsFilters;\r\n\r\n this.setState({\r\n isLoading: true\r\n });\r\n\r\n const [auctionsList] = await Promise.all([\r\n this.cbContext.vehicleService.GetAuctions(mavoVehiclesAuctionsFilters)\r\n ]);\r\n\r\n this.setState(\r\n {\r\n auctionsList: auctionsList,\r\n count: auctionsList.total,\r\n page: auctionsList.page - 1\r\n },\r\n async () => {\r\n await this.reloadFilters();\r\n }\r\n );\r\n }\r\n\r\n loadAuctions = async (page: number, rowsPerPage: number) => {\r\n this.setState({\r\n isLoadingAuctions: true,\r\n selectedAuction: null\r\n });\r\n\r\n const mavoVehiclesAuctionsFilters = {\r\n makeIds: this.state.selectedMakeEntities.map((item) => item.id),\r\n modelIds: this.state.selectedModelEntities.map((item) => item.id),\r\n startDate: this.state.selectedStartDate\r\n ? new Date(this.state.selectedStartDate.setHours(0, 0, 0, 0))\r\n : null,\r\n endDate: this.state.selectedEndDate\r\n ? new Date(this.state.selectedEndDate.setHours(23, 59, 59, 999))\r\n : null,\r\n page: page + 1,\r\n pageSize: rowsPerPage,\r\n vin: this.state.vin,\r\n minPrice: this.state.minPrice,\r\n maxPrice: this.state.maxPrice\r\n } as MavoVehicleAuctionsFilters;\r\n\r\n const auctionsList = await this.cbContext.vehicleService.GetAuctions(mavoVehiclesAuctionsFilters);\r\n \r\n this.setState({\r\n auctionsList: auctionsList,\r\n page: auctionsList.page - 1,\r\n pageSize: rowsPerPage,\r\n count: auctionsList.total,\r\n isLoadingAuctions: false\r\n });\r\n };\r\n\r\n reloadFilters = async () => {\r\n const filters = await this.cbContext.vehicleService.GetAuctionsFilters();\r\n this.setState({\r\n makeEntities: filters.makeList,\r\n modelEntities: filters.modelList,\r\n isLoading: false\r\n });\r\n };\r\n\r\n makeSelectedAuction = (isSelected: boolean, id: number) => {\r\n const auctions = _.cloneDeep(this.state.auctionsList.auctions);\r\n const auction = auctions.find((item) => item.id === id);\r\n if (auction) {\r\n auction.isSelected = isSelected;\r\n }\r\n\r\n if (isSelected) {\r\n auctions.forEach((item) => {\r\n if (item.id !== id) {\r\n item.isSelected = false;\r\n } \r\n });\r\n }\r\n this.setState({\r\n auctionsList: {\r\n ...this.state.auctionsList,\r\n auctions: auctions\r\n },\r\n selectedAuction: isSelected ? (auction ? auction : null): null\r\n });\r\n }\r\n\r\n getMuiTheme = () => createMuiTheme({\r\n overrides: {\r\n MuiTableCell: {\r\n head: {\r\n paddingLeft: \"2px\",\r\n paddingRight: \"2px\",\r\n paddingTop: \"2px\",\r\n paddingBottom: \"2px\"\r\n },\r\n },\r\n MUIDataTableBodyCell: {\r\n stackedCommon: {\r\n paddingLeft: \"2px\",\r\n paddingRight: \"2px\",\r\n paddingTop: \"0px\",\r\n paddingBottom: \"0px\",\r\n height: \"40px !important\"\r\n }\r\n },\r\n MuiCheckbox: {\r\n root: {\r\n padding: \"0px\", // Adjust the padding to make the checkbox smaller\r\n },\r\n colorSecondary: {\r\n '&.Mui-checked': {\r\n color: \"#3d4977 !important\",\r\n '&:hover': {\r\n backgroundColor: 'rgba(0, 0, 0, 0.03) !important'\r\n },\r\n },\r\n '&:hover': {\r\n backgroundColor: 'rgba(0, 0, 0, 0.03) !important'\r\n }\r\n }\r\n }\r\n } as any\r\n });\r\n\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'id',\r\n label: ' ',\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: any, tableMeta: MUIDataTableMeta) => {\r\n const auction = this.state.auctionsList.auctions.find((item) => item.id === tableMeta.rowData[0]);\r\n return (\r\n \r\n \r\n
\r\n {\r\n this.makeSelectedAuction(e.target.checked, auction!.id);\r\n }}\r\n >\r\n }\r\n label=''\r\n />\r\n
\r\n
\r\n
\r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'mavoVehicle.vin',\r\n label: this.cbContext.translatorService.Tranlate('MAVO_VEHICLES_VEHICLE_VIN_CODE', 'VIN'),\r\n \r\n },\r\n {\r\n name: 'mavoVehicle.make.displayName',\r\n label: this.cbContext.translatorService.Tranlate('VEHICLES_VEHICLE_MAKE', 'Marca'),\r\n options: {\r\n sort: false\r\n }\r\n },\r\n {\r\n name: 'mavoVehicle.model.displayName',\r\n label: this.cbContext.translatorService.Tranlate('VEHICLES_VEHICLE_MODEL', 'Model'),\r\n options: {\r\n sort: false\r\n }\r\n }, \r\n {\r\n name: '',\r\n label: this.cbContext.translatorService.Tranlate(\r\n 'AUCTION_ADMIN_HAS_OFFERS',\r\n 'Oferte'\r\n ),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: string, tableMeta: MUIDataTableMeta) => {\r\n const auction = this.state.auctionsList.auctions.find((item) => item.id === tableMeta.rowData[0]);\r\n return (\r\n \r\n \r\n
\r\n {auction!.mavoVehicleAuctionOffers.length > 0 ? \r\n this.cbContext.translatorService.Tranlate(\"AUCTION_ADMIN_HAS_OFFERS_YES\", \"Da\")\r\n : this.cbContext.translatorService.Tranlate(\"AUCTION_ADMIN_HAS_OFFERS_NO\", \"Nu\")\r\n }\r\n
\r\n
\r\n
\r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'startPrice',\r\n label: this.cbContext.translatorService.Tranlate('MAVO_VEHICLES_AUCTION_START_PRICE', 'Pret start'),\r\n options: {\r\n sort: false\r\n }\r\n },\r\n {\r\n name: 'currentPrice',\r\n label: this.cbContext.translatorService.Tranlate(\r\n 'AUCTION_ADMIN_CURRENT_PRICE',\r\n 'Pret curent'\r\n ),\r\n options: {\r\n sort: false\r\n }\r\n },\r\n {\r\n name: 'startDate',\r\n label: this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_AUCTION_START_DATE',\r\n 'Data start'\r\n ),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: any) => {\r\n return (\r\n \r\n \r\n
\r\n {value\r\n ? moment\r\n .utc(value)\r\n .local()\r\n .format(this.props.appState.dateFormat)\r\n : null}\r\n
\r\n
\r\n
\r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'endDate',\r\n label: this.cbContext.translatorService.Tranlate(\r\n 'ADMIN_AUCTION_END_DATE',\r\n 'Data stop'\r\n ),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: any) => {\r\n return (\r\n \r\n \r\n
\r\n {value\r\n ? moment(value)\r\n .format(this.props.appState.longDateFormat)\r\n : null}\r\n
\r\n
\r\n
\r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'mavoVehicle.provenance.type',\r\n label: this.cbContext.translatorService.Tranlate(\r\n 'MENU_NOMENCLATURES_TAB_PROVENANCE',\r\n 'Provenienta'\r\n ),\r\n options: {\r\n sort: false\r\n }\r\n },\r\n {\r\n name: 'mavoVehicle.location',\r\n label: this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHILES_VEHICLE_LOCATION',\r\n 'Locatie'\r\n ),\r\n options: {\r\n sort: false\r\n }\r\n },\r\n {\r\n name: '',\r\n label: this.cbContext.translatorService.Tranlate('MAVO_AUCTION_REMAINING_TIME', 'Timp ramas'),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: string, tableMeta: MUIDataTableMeta) => {\r\n const auction = this.state.auctionsList.auctions.find((item) => item.id === tableMeta.rowData[0]);\r\n return (\r\n \r\n \r\n \r\n );\r\n }\r\n }\r\n }\r\n ];\r\n\r\n return columns;\r\n };\r\n\r\n sortFunction = (a: any, b: any) => {\r\n return a.order - b.order;\r\n };\r\n\r\n handleMakeEntitiesChange = (newValue: any[]) => {\r\n const selectedModels = [...this.state.selectedModelEntities];\r\n const selectedMakeIds = newValue.map(({ id }) => id);\r\n\r\n const models = selectedModels.filter(({ dependencyId }) =>\r\n selectedMakeIds.includes(dependencyId)\r\n );\r\n\r\n this.setState(\r\n {\r\n selectedMakeEntities: newValue,\r\n selectedModelEntities: models\r\n }\r\n );\r\n };\r\n\r\n handleModelEntitiesChange = (newValue: any[]) => {\r\n this.setState(\r\n {\r\n selectedModelEntities: newValue\r\n }\r\n );\r\n };\r\n\r\n handleMinPriceChange = (value: string) => {\r\n this.setState({\r\n minPrice: value ? parseFloat(value) : null\r\n });\r\n };\r\n\r\n handleMaxPriceChange = (value: string) => {\r\n this.setState({\r\n maxPrice: value ? parseFloat(value) : null\r\n });\r\n };\r\n\r\n\r\n handleStartDateChange = async (date: MaterialUiPickersDate | null, value?: string | null) => {\r\n if (date === null || !date.isValid) {\r\n return;\r\n }\r\n this.setState(\r\n {\r\n selectedStartDate: date!.toDate(),\r\n isLoading: false\r\n }\r\n );\r\n };\r\n\r\n handleEndDateChange = async (date: MaterialUiPickersDate | null, value?: string | null) => {\r\n if (date === null || !date.isValid) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n selectedEndDate: date!.toDate(),\r\n isLoading: false\r\n }\r\n );\r\n };\r\n\r\n\r\n renderSearchButtons() {\r\n return (\r\n
\r\n
\r\n this.loadAuctions(this.state.page, this.state.pageSize)}\r\n >\r\n {this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_VEHICLE_SEARCH',\r\n 'Cautare'\r\n )}\r\n \r\n
\r\n
\r\n this.resetFilters()}\r\n >\r\n {this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_VEHICLE_RESET',\r\n 'Reset'\r\n )}\r\n \r\n
\r\n
\r\n\r\n );\r\n }\r\n\r\n openAddOfferDialog = () => {\r\n if (!this.state.selectedAuction) {\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('PLEASE_SELECT_LINE', 'Va rugam sa selectati o linie!'), {\r\n variant: 'warning'\r\n });\r\n return;\r\n }\r\n\r\n this.setState({\r\n isOfferDialogOpen: true\r\n });\r\n }\r\n\r\n public hasRight = (right: string): boolean => {\r\n return this.props.appState!.user!.profile.role.includes(right);\r\n };\r\n\r\n renderAuctionsButtons() {\r\n return (\r\n
\r\n
\r\n {\r\n if (!this.state.selectedAuction) {\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('PLEASE_SELECT_LINE', 'Va rugam sa selectati o linie!'), {\r\n variant: 'warning'\r\n });\r\n return;\r\n }\r\n\r\n this.setState({\r\n isDialogOpen: true,\r\n selectedAuction: this.state.selectedAuction!\r\n });\r\n }}\r\n >\r\n {this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_VEHICLE_VIEW',\r\n 'Vizualizeaza'\r\n )}\r\n \r\n
\r\n {this.hasRight(RoleClaimsEnum.MavoAdministrator) ? null : (\r\n
\r\n \r\n {this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_VEHICLE_BID',\r\n 'Liciteaza'\r\n )}\r\n \r\n
\r\n )}\r\n
\r\n\r\n );\r\n }\r\n\r\n resetFilters = async () => {\r\n this.setState({\r\n selectedMakeEntities: [],\r\n selectedModelEntities: [],\r\n selectedStartDate: null,\r\n selectedEndDate: null,\r\n vin: '',\r\n minPrice: null,\r\n maxPrice: null\r\n }, async () => {\r\n await this.loadAuctions(this.state.page, this.state.pageSize);\r\n });\r\n };\r\n\r\n NumberFormatCustom = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n },\r\n currentTarget: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n allowNegative={false}\r\n thousandSeparator={false}\r\n decimalScale={2}\r\n />\r\n );\r\n };\r\n \r\n\r\n renderFilters = () => {\r\n const selectedMakes = this.state.selectedMakeEntities;\r\n let models = this.state.modelEntities;\r\n\r\n if (selectedMakes.length) {\r\n const makeIds = selectedMakes.map(({ id }) => id);\r\n models = this.state.modelEntities.filter(({ dependencyId }) => {\r\n return makeIds.includes(dependencyId!);\r\n });\r\n }\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n this.handleMakeEntitiesChange(newValue)}\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n \r\n \r\n \r\n\r\n this.handleMinPriceChange(e.target.value)}\r\n label={this.cbContext.translatorService.Tranlate(\r\n 'AUCTIONS_FILTER_MIN_PRICE',\r\n 'Pret minim'\r\n )}\r\n validators={['required', 'minNumber:1']}\r\n errorMessages={[\r\n this.cbContext.translatorService.Tranlate(\r\n 'AUCTIONS_FILTER_MIN_PRICE',\r\n 'Pret minim'\r\n )\r\n ]}\r\n InputProps={{\r\n inputComponent: this.NumberFormatCustom\r\n }}\r\n /> \r\n\r\n
\r\n {\r\n this.setState({\r\n vin: e.target.value\r\n });\r\n }}\r\n validators={['required']}\r\n label={this.cbContext.translatorService.Tranlate('CALCULATION_DETAILS_VIN', 'Vin')}\r\n />\r\n
\r\n \r\n \r\n
\r\n\r\n \r\n \r\n this.handleModelEntitiesChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n \r\n \r\n \r\n\r\n this.handleMaxPriceChange(e.target.value)}\r\n label={this.cbContext.translatorService.Tranlate(\r\n 'AUCTIONS_FILTER_MAX_PRICE',\r\n 'Pret maxim'\r\n )}\r\n validators={['required', 'minNumber:1']}\r\n errorMessages={[\r\n this.cbContext.translatorService.Tranlate(\r\n 'AUCTIONS_FILTER_MAX_PRICE',\r\n 'Pret maxim'\r\n )\r\n ]}\r\n InputProps={{\r\n inputComponent: this.NumberFormatCustom\r\n }}\r\n /> \r\n \r\n
\r\n
\r\n
\r\n );\r\n };\r\n\r\n onRowDoubleClick = (\r\n dataIndex: number,\r\n rowIndex: number,\r\n columnIndex: number\r\n ) => {\r\n if (columnIndex == 1) {\r\n return;\r\n }\r\n const auction = this.state.auctionsList.auctions[dataIndex];\r\n this.setState({\r\n isDialogOpen: true,\r\n selectedAuction: auction!\r\n });\r\n };\r\n\r\n tableOptions = () => {\r\n return {\r\n sort: true,\r\n filter: false,\r\n search: false,\r\n viewColumns: false,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.cbContext.translatorService),\r\n elevation: 0,\r\n serverSide: true,\r\n count: this.state.count,\r\n rowsPerPage: this.state.pageSize,\r\n page: this.state.page,\r\n onCellClick: (colData: any, cellMeta: any) => {\r\n if (cellMeta && cellMeta.colIndex !== null && cellMeta.rowIndex !== null) {\r\n // Set up a double-click event listener on the cell\r\n if (cellMeta.event.detail === 2) {\r\n this.onRowDoubleClick(cellMeta.dataIndex, cellMeta.rowIndex, cellMeta.colIndex);\r\n }\r\n }\r\n },\r\n onTableChange: async (action: any, tableState: any) => {\r\n switch (action) {\r\n case 'changePage':\r\n await this.loadAuctions(tableState.page, tableState.rowsPerPage);\r\n break;\r\n case 'changeRowsPerPage':\r\n await this.loadAuctions(tableState.page, tableState.rowsPerPage);\r\n break;\r\n case 'sort':\r\n break;\r\n default:\r\n }\r\n }\r\n };\r\n };\r\n\r\n importedTableOptions = () => {\r\n return {\r\n sort: true,\r\n filter: false,\r\n search: false,\r\n viewColumns: false,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.cbContext.translatorService),\r\n elevation: 0,\r\n count: this.state.count,\r\n rowsPerPage: this.state.pageSize,\r\n page: this.state.page\r\n };\r\n };\r\n\r\n closeDialog = async () => {\r\n this.setState(\r\n {\r\n isDialogOpen: false,\r\n selectedAuction: null\r\n },\r\n async () => {\r\n this.loadAuctions(this.state.page, this.state.pageSize);\r\n }\r\n );\r\n };\r\n \r\n closeOfferDialog = async () => {\r\n this.setState(\r\n {\r\n isOfferDialogOpen: false,\r\n selectedAuction: null,\r\n isLoadingAuctions: true\r\n },\r\n async () => {\r\n this.loadAuctions(this.state.page, this.state.pageSize);\r\n }\r\n );\r\n };\r\n\r\n goToUserAuctions = () => {\r\n this.props.history.push('/user/auctions');\r\n }\r\n\r\n handleOpenConfirmationDialog = () => {\r\n this.setState({\r\n isOpen: true\r\n });\r\n };\r\n\r\n handleCloseModal = () => {\r\n this.setState({\r\n isOpen: false\r\n });\r\n };\r\n\r\n public render() {\r\n this.cbContext = this.context as AppContext;\r\n\r\n if (this.state.isLoading) {\r\n return ;\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n \r\n
\r\n {this.renderAuctionsButtons()}\r\n {this.renderFilters()}\r\n {this.renderSearchButtons()}\r\n {this.state.isLoadingAuctions ? (\r\n \r\n ) : (\r\n \r\n \r\n \r\n )} \r\n
\r\n
\r\n
\r\n
\r\n {this.state.selectedAuction ? (\r\n \r\n \r\n \r\n {this.cbContext.translatorService.Tranlate('MAVO_VEHICLE_VIEW', 'Fisa Tehnica (Fisa de Evaluare)')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.state.selectedAuction === null ? null : (\r\n \r\n )}\r\n \r\n \r\n ) : null }\r\n {this.state.isOfferDialogOpen && this.state.selectedAuction ? (\r\n \r\n \r\n \r\n {this.cbContext.translatorService.Tranlate('MAVO_VEHICLES_AUCTION_OFFER', 'Oferta')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ) : null }\r\n
\r\n );\r\n }\r\n}\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app,\r\n mavoVehicleState: state.mavoVehicle,\r\n mavoVehicleAuctionState: state.mavoVehicleAuction\r\n }),\r\n{ ...MavoVehicleActionCreators, ...VehicleAuctionActionCreators }\r\n)(withSnackbar(MavoVehiclesAuctions as any));","import * as React from 'react';\r\nimport { ApplicationState, AppState } from '../../store';\r\nimport { ApplicationContext, AppContext } from '../../context/Contexts';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n Card,\r\n Grid,\r\n Tab,\r\n Tabs,\r\n AppBar,\r\n TextField,\r\n Button,\r\n Dialog,\r\n DialogTitle,\r\n IconButton,\r\n DialogContent,\r\n FormControlLabel,\r\n Checkbox\r\n} from '@material-ui/core';\r\nimport TabPanel from '../_shared/Tabs';\r\nimport MUIDataTable, {\r\n MUIDataTableColumnOptions,\r\n MUIDataTableMeta,\r\n SelectableRows\r\n} from 'mui-datatables';\r\nimport { MUITranslations } from '../../helpers/MUITableTranslations';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport {\r\n MavoVehicleAuction,\r\n MavoVehicleUserAuctionsFilters,\r\n MavoVehicleUserAuctionsList\r\n} from '../../interfaces/Vehicle';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport Loader from '../Loader';\r\nimport noop from 'lodash/noop';\r\nimport _ from 'lodash';\r\nimport { DatePicker, MuiPickersUtilsProvider } from '@material-ui/pickers';\r\nimport moment from 'moment';\r\nimport MomentUtils from '@date-io/moment';\r\nimport { MaterialUiPickersDate } from '@material-ui/pickers/typings/date';\r\nimport { MavoVehicleActionCreators } from '../../store/actions/MavoVehicle';\r\nimport { MavoVehicleState } from '../../store/reducers/MavoVehicle';\r\nimport NumberFormat from 'react-number-format';\r\nimport { VehicleAuctionActionCreators } from '../../store/actions/VehicleAuction';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport MavoVehicleDetailsViewForm from './MavoVehicleDetailsViewForm';\r\nimport {MuiThemeProvider, createMuiTheme } from '@material-ui/core';\r\nimport RealTimeDate from './RealTimeDate';\r\nimport { AuctionOfferStatusEnum } from '../../helpers/Constants';\r\n\r\nclass LocalizedUtils extends MomentUtils {\r\n // dateFormat = \"DD MM YYYY\";\r\n}\r\n\r\ntype MavoVehiclesUserAuctionsProps = {\r\n appState: AppState;\r\n mavoVehicleState: MavoVehicleState;\r\n mavoVehicleAuctionState: MavoVehicleAuction;\r\n} &\r\n typeof MavoVehicleActionCreators & typeof VehicleAuctionActionCreators &\r\n ProviderContext &\r\n RouteComponentProps;\r\n\r\ninterface IMavoVehiclesUserAuctionsState {\r\n auctionsList: MavoVehicleUserAuctionsList;\r\n makeEntities: IReferential[];\r\n selectedMakeEntities: IReferential[];\r\n modelEntities: IReferential[];\r\n selectedModelEntities: IReferential[];\r\n selectedStartDate: Date | null;\r\n selectedEndDate: Date | null;\r\n minPrice: number | null;\r\n maxPrice: number | null;\r\n selectedTab: number;\r\n isLoading: boolean;\r\n isLoadingAuctions: boolean;\r\n count: number;\r\n page: number;\r\n pageSize: number;\r\n vin: string;\r\n selectedAuction: MavoVehicleAuction | null;\r\n executing: boolean;\r\n isDialogOpen: boolean;\r\n offerStatuses: IReferential[];\r\n selectedOfferStatus: IReferential | null;\r\n}\r\n\r\nclass MavoVehiclesUserAuctions extends React.PureComponent {\r\n private cbContext!: AppContext;\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n auctionsList: {} as MavoVehicleUserAuctionsList,\r\n makeEntities: [],\r\n selectedMakeEntities: [],\r\n modelEntities: [],\r\n selectedModelEntities: [],\r\n selectedTab: 0,\r\n isLoading: false,\r\n isLoadingAuctions: false,\r\n count: 1,\r\n page: 0,\r\n pageSize: 10,\r\n vin: '',\r\n selectedStartDate: null,\r\n selectedEndDate: null,\r\n selectedAuction: null,\r\n executing: false,\r\n minPrice: null,\r\n maxPrice: null,\r\n isDialogOpen: false,\r\n offerStatuses: [\r\n {\r\n id: 1,\r\n displayName: '-'\r\n } as IReferential,\r\n {\r\n id: 2,\r\n displayName: 'Castigator',\r\n code: 'CASTIGATOR'\r\n } as IReferential,\r\n {\r\n id: 3,\r\n displayName: 'Necastigator',\r\n code: 'NECASTIGATOR'\r\n } as IReferential,\r\n {\r\n id: 4,\r\n displayName: 'Oferta depasita',\r\n code: 'OFERTA_DEPASITA'\r\n } as IReferential,\r\n {\r\n id: 5,\r\n displayName: 'Ultimul ofertant',\r\n code: 'ULTIMUL_OFERTANT'\r\n } as IReferential\r\n ],\r\n selectedOfferStatus: null\r\n } as IMavoVehiclesUserAuctionsState;\r\n\r\n public async componentDidMount() {\r\n const mavoVehiclesUserAuctionsFilters = {\r\n makeIds: [],\r\n modelIds: [],\r\n startDate: null,\r\n endDate: null,\r\n page: this.state.page + 1,\r\n pageSize: this.state.pageSize,\r\n vin: '',\r\n minPrice: null,\r\n maxPrice: null,\r\n selectedOfferStatus: null\r\n } as MavoVehicleUserAuctionsFilters;\r\n\r\n this.setState({\r\n isLoading: true\r\n });\r\n\r\n const [auctionsList] = await Promise.all([\r\n this.cbContext.vehicleService.GetUserAuctions(mavoVehiclesUserAuctionsFilters)\r\n ]);\r\n\r\n this.setState(\r\n {\r\n auctionsList: auctionsList,\r\n count: auctionsList.total,\r\n page: auctionsList.page - 1\r\n },\r\n async () => {\r\n await this.reloadFilters();\r\n }\r\n );\r\n }\r\n\r\n loadUserAuctions = async (page: number, rowsPerPage: number) => {\r\n this.setState({\r\n isLoadingAuctions: true,\r\n selectedAuction: null\r\n });\r\n\r\n const mavoVehiclesUserAuctionsFilters = {\r\n makeIds: this.state.selectedMakeEntities.map((item) => item.id),\r\n modelIds: this.state.selectedModelEntities.map((item) => item.id),\r\n startDate: this.state.selectedStartDate\r\n ? new Date(this.state.selectedStartDate.setHours(0, 0, 0, 0))\r\n : null,\r\n endDate: this.state.selectedEndDate\r\n ? new Date(this.state.selectedEndDate.setHours(23, 59, 59, 999))\r\n : null,\r\n page: page + 1,\r\n pageSize: rowsPerPage,\r\n vin: this.state.vin,\r\n minPrice: this.state.minPrice,\r\n maxPrice: this.state.maxPrice,\r\n selectedOfferStatus: this.state.selectedOfferStatus ? this.state.selectedOfferStatus.code : null\r\n } as MavoVehicleUserAuctionsFilters;\r\n\r\n const auctionsList = await this.cbContext.vehicleService.GetUserAuctions(mavoVehiclesUserAuctionsFilters);\r\n\r\n this.setState({\r\n auctionsList: auctionsList,\r\n page: auctionsList.page - 1,\r\n pageSize: rowsPerPage,\r\n count: auctionsList.total,\r\n isLoadingAuctions: false\r\n });\r\n };\r\n\r\n reloadFilters = async () => {\r\n const filters = await this.cbContext.vehicleService.GetUserAuctionsFilters();\r\n this.setState({\r\n makeEntities: filters.makeList,\r\n modelEntities: filters.modelList,\r\n isLoading: false\r\n });\r\n };\r\n\r\n getMuiTheme = () => createMuiTheme({\r\n overrides: {\r\n MuiTableCell: {\r\n head: {\r\n paddingLeft: \"2px\",\r\n paddingRight: \"2px\",\r\n paddingTop: \"2px\",\r\n paddingBottom: \"2px\"\r\n },\r\n },\r\n MUIDataTableBodyCell: {\r\n stackedCommon: {\r\n paddingLeft: \"2px\",\r\n paddingRight: \"2px\",\r\n paddingTop: \"0px\",\r\n paddingBottom: \"0px\",\r\n height: \"40px !important\"\r\n }\r\n },\r\n MuiCheckbox: {\r\n root: {\r\n padding: \"0px\", // Adjust the padding to make the checkbox smaller\r\n },\r\n colorSecondary: {\r\n '&.Mui-checked': {\r\n color: \"#3d4977 !important\",\r\n '&:hover': {\r\n backgroundColor: 'rgba(0, 0, 0, 0.03) !important'\r\n },\r\n },\r\n '&:hover': {\r\n backgroundColor: 'rgba(0, 0, 0, 0.03) !important'\r\n }\r\n }\r\n }\r\n } as any\r\n });\r\n\r\n makeSelectedAuction = (isSelected: boolean, id: number) => {\r\n const auctions = _.cloneDeep(this.state.auctionsList.auctions);\r\n const auction = auctions.find((item) => item.id === id);\r\n if (auction) {\r\n auction.isSelected = isSelected;\r\n }\r\n\r\n if (isSelected) {\r\n auctions.forEach((item) => {\r\n if (item.id !== id) {\r\n item.isSelected = false;\r\n } \r\n });\r\n }\r\n this.setState({\r\n auctionsList: {\r\n ...this.state.auctionsList,\r\n auctions: auctions\r\n },\r\n selectedAuction: isSelected ? (auction ? auction : null): null\r\n });\r\n }\r\n\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'id',\r\n label: ' ',\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: any, tableMeta: MUIDataTableMeta) => {\r\n const auction = this.state.auctionsList.auctions.find((item) => item.id === tableMeta.rowData[0]);\r\n return (\r\n \r\n \r\n
\r\n {\r\n this.makeSelectedAuction(e.target.checked, auction!.id);\r\n }}\r\n >\r\n }\r\n label=''\r\n />\r\n
\r\n
\r\n
\r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'mavoVehicle.vin',\r\n label: this.cbContext.translatorService.Tranlate('MAVO_VEHICLES_VEHICLE_VIN_CODE', 'VIN'),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: any, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n \r\n {value}\r\n \r\n );\r\n }\r\n }\r\n }, \r\n {\r\n name: 'mavoVehicle.make.displayName',\r\n label: this.cbContext.translatorService.Tranlate('VEHICLES_VEHICLE_MAKE', 'Marca'),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: any, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n \r\n {value}\r\n \r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'mavoVehicle.model.displayName',\r\n label: this.cbContext.translatorService.Tranlate('VEHICLES_VEHICLE_MODEL', 'Model'),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: any, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n \r\n {value}\r\n \r\n );\r\n }\r\n }\r\n }, \r\n {\r\n name: '',\r\n label: this.cbContext.translatorService.Tranlate(\r\n 'AUCTION_ADMIN_HAS_OFFERS',\r\n 'Oferte'\r\n ),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: string, tableMeta: MUIDataTableMeta) => {\r\n const auction = this.state.auctionsList.auctions.find((item) => item.id === tableMeta.rowData[0]);\r\n return (\r\n \r\n \r\n
\r\n {auction!.mavoVehicleAuctionOffers.length > 0 ? \r\n this.cbContext.translatorService.Tranlate(\"AUCTION_ADMIN_HAS_OFFERS_YES\", \"Da\")\r\n : this.cbContext.translatorService.Tranlate(\"AUCTION_ADMIN_HAS_OFFERS_NO\", \"Nu\")\r\n }\r\n
\r\n
\r\n
\r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'startPrice',\r\n label: this.cbContext.translatorService.Tranlate('MAVO_VEHICLES_AUCTION_START_PRICE', 'Pret start'),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: any, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n \r\n {value}\r\n \r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'currentPrice',\r\n label: this.cbContext.translatorService.Tranlate(\r\n 'AUCTION_ADMIN_CURRENT_PRICE',\r\n 'Pret curent'\r\n ),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: any, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n \r\n {value}\r\n \r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'startDate',\r\n label: this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_AUCTION_START_DATE',\r\n 'Data start'\r\n ),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: any, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n \r\n \r\n
\r\n {value\r\n ? moment\r\n .utc(value)\r\n .local()\r\n .format(this.props.appState.dateFormat)\r\n : null}\r\n
\r\n
\r\n
\r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'endDate',\r\n label: this.cbContext.translatorService.Tranlate(\r\n 'ADMIN_AUCTION_END_DATE',\r\n 'Data stop'\r\n ),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: any, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n \r\n \r\n
\r\n {value\r\n ? moment(value)\r\n .format(this.props.appState.longDateFormat)\r\n : null}\r\n
\r\n
\r\n
\r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'mavoVehicle.provenance.type',\r\n label: this.cbContext.translatorService.Tranlate(\r\n 'MENU_NOMENCLATURES_TAB_PROVENANCE',\r\n 'Provenienta'\r\n ),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: any, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n \r\n {value}\r\n \r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'mavoVehicle.location',\r\n label: this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHILES_VEHICLE_LOCATION',\r\n 'Locatie'\r\n ),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: any, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n \r\n {value}\r\n \r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'auctionStatus.displayName',\r\n label: this.cbContext.translatorService.Tranlate('ADMIN_AUCTION_STATUS', 'Stare licitatie'),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: any, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n \r\n {value}\r\n \r\n );\r\n }\r\n }\r\n }, \r\n {\r\n name: 'userStatus',\r\n label: this.cbContext.translatorService.Tranlate('AUCTION_USER_STATUS', 'Status'),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: string, tableMeta: MUIDataTableMeta) => {\r\n const auction = this.state.auctionsList.auctions.find((item) => item.id === tableMeta.rowData[0]);\r\n if (!auction) {\r\n return \"\";\r\n }\r\n\r\n return (\r\n \r\n \r\n
\r\n {this.cbContext.translatorService.Tranlate(auction.userStatus, auction.userStatus)}\r\n
\r\n
\r\n
\r\n );\r\n }\r\n } \r\n }, \r\n {\r\n name: 'userMaximumOffer',\r\n label: this.cbContext.translatorService.Tranlate('AUCTION_USER_MAXIMUM_OFFER', 'Oferta mea maxima'),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: string, tableMeta: MUIDataTableMeta) => {\r\n const auction = this.state.auctionsList.auctions.find((item) => item.id === tableMeta.rowData[0]);\r\n const userOffer = auction!.mavoVehicleAuctionOffers.find((item) => item.organizationId === this.props.appState.appUser?.organizationId);\r\n \r\n if (!userOffer) {\r\n return \"\";\r\n }\r\n\r\n return (\r\n \r\n \r\n
\r\n {userOffer.maximumOffer}\r\n
\r\n
\r\n
\r\n );\r\n }\r\n }\r\n }, \r\n {\r\n name: '',\r\n label: this.cbContext.translatorService.Tranlate('MAVO_AUCTION_REMAINING_TIME', 'Timp ramas'),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: string, tableMeta: MUIDataTableMeta) => {\r\n const auction = this.state.auctionsList.auctions.find((item) => item.id === tableMeta.rowData[0]);\r\n return (\r\n \r\n \r\n \r\n );\r\n }\r\n }\r\n }\r\n ];\r\n\r\n return columns;\r\n };\r\n\r\n sortFunction = (a: any, b: any) => {\r\n return a.order - b.order;\r\n };\r\n\r\n onTabChange = (event: any, newValue: number) => {\r\n this.setState(\r\n {\r\n selectedTab: newValue,\r\n page: 0\r\n },\r\n async () => await this.loadUserAuctions(0, this.state.pageSize)\r\n );\r\n };\r\n\r\n handleMakeEntitiesChange = (newValue: any[]) => {\r\n const selectedModels = [...this.state.selectedModelEntities];\r\n const selectedMakeIds = newValue.map(({ id }) => id);\r\n\r\n const models = selectedModels.filter(({ dependencyId }) =>\r\n selectedMakeIds.includes(dependencyId)\r\n );\r\n\r\n this.setState(\r\n {\r\n selectedMakeEntities: newValue,\r\n selectedModelEntities: models\r\n }\r\n );\r\n };\r\n\r\n handleModelEntitiesChange = (newValue: any[]) => {\r\n this.setState(\r\n {\r\n selectedModelEntities: newValue\r\n }\r\n );\r\n };\r\n\r\n handleOfferStatusChange = (newValue: any) => {\r\n this.setState(\r\n {\r\n selectedOfferStatus: newValue\r\n }\r\n );\r\n };\r\n\r\n handleMinPriceChange = (value: string) => {\r\n this.setState({\r\n minPrice: value ? parseFloat(value) : null\r\n });\r\n };\r\n\r\n handleMaxPriceChange = (value: string) => {\r\n this.setState({\r\n maxPrice: value ? parseFloat(value) : null\r\n });\r\n };\r\n\r\n\r\n handleStartDateChange = async (date: MaterialUiPickersDate | null, value?: string | null) => {\r\n if (date === null || !date.isValid) {\r\n return;\r\n }\r\n this.setState(\r\n {\r\n selectedStartDate: date!.toDate(),\r\n isLoading: false\r\n }\r\n );\r\n };\r\n\r\n handleEndDateChange = async (date: MaterialUiPickersDate | null, value?: string | null) => {\r\n if (date === null || !date.isValid) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n selectedEndDate: date!.toDate(),\r\n isLoading: false\r\n }\r\n );\r\n };\r\n\r\n renderSearchButtons() {\r\n return (\r\n
\r\n
\r\n this.loadUserAuctions(this.state.page, this.state.pageSize)}\r\n >\r\n {this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_VEHICLE_SEARCH',\r\n 'Cautare'\r\n )}\r\n \r\n
\r\n
\r\n this.resetFilters()}\r\n >\r\n {this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_VEHICLE_RESET',\r\n 'Reset'\r\n )}\r\n \r\n
\r\n
\r\n\r\n );\r\n }\r\n\r\n resetFilters = async () => {\r\n this.setState({\r\n selectedMakeEntities: [],\r\n selectedModelEntities: [],\r\n selectedStartDate: null,\r\n selectedEndDate: null,\r\n vin: '',\r\n minPrice: null,\r\n maxPrice: null,\r\n selectedOfferStatus: null\r\n }, async () => {\r\n await this.loadUserAuctions(this.state.page, this.state.pageSize);\r\n });\r\n };\r\n\r\n NumberFormatCustom = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n },\r\n currentTarget: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n allowNegative={false}\r\n thousandSeparator={false}\r\n decimalScale={2}\r\n />\r\n );\r\n };\r\n \r\n\r\n renderFilters = () => {\r\n const selectedMakes = this.state.selectedMakeEntities;\r\n let models = this.state.modelEntities;\r\n\r\n if (selectedMakes.length) {\r\n const makeIds = selectedMakes.map(({ id }) => id);\r\n models = this.state.modelEntities.filter(({ dependencyId }) => {\r\n return makeIds.includes(dependencyId!);\r\n });\r\n }\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n this.handleMakeEntitiesChange(newValue)}\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n \r\n \r\n \r\n\r\n this.handleMinPriceChange(e.target.value)}\r\n label={this.cbContext.translatorService.Tranlate(\r\n 'AUCTIONS_FILTER_MIN_PRICE',\r\n 'Pret minim'\r\n )}\r\n validators={['required', 'minNumber:1']}\r\n errorMessages={[\r\n this.cbContext.translatorService.Tranlate(\r\n 'AUCTIONS_FILTER_MIN_PRICE',\r\n 'Pret minim'\r\n )\r\n ]}\r\n InputProps={{\r\n inputComponent: this.NumberFormatCustom\r\n }}\r\n /> \r\n\r\n
\r\n {\r\n this.setState({\r\n vin: e.target.value\r\n });\r\n }}\r\n validators={['required']}\r\n label={this.cbContext.translatorService.Tranlate('CALCULATION_DETAILS_VIN', 'Vin')}\r\n />\r\n
\r\n
\r\n\r\n \r\n \r\n this.handleModelEntitiesChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n \r\n \r\n \r\n\r\n this.handleMaxPriceChange(e.target.value)}\r\n label={this.cbContext.translatorService.Tranlate(\r\n 'AUCTIONS_FILTER_MAX_PRICE',\r\n 'Pret maxim'\r\n )}\r\n validators={['required', 'minNumber:1']}\r\n errorMessages={[\r\n this.cbContext.translatorService.Tranlate(\r\n 'AUCTIONS_FILTER_MAX_PRICE',\r\n 'Pret maxim'\r\n )\r\n ]}\r\n InputProps={{\r\n inputComponent: this.NumberFormatCustom\r\n }}\r\n /> \r\n\r\n {/* \r\n this.handleOfferStatusChange(newValue) // actualizați metoda pentru a gestiona selecția unică\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n /> */}\r\n\r\n \r\n
\r\n
\r\n
\r\n );\r\n };\r\n\r\n onRowDoubleClick = (\r\n dataIndex: number,\r\n rowIndex: number,\r\n columnIndex: number\r\n ) => {\r\n const auction = this.state.auctionsList.auctions[dataIndex];\r\n this.setState({\r\n isDialogOpen: true,\r\n selectedAuction: auction!\r\n });\r\n };\r\n\r\n tableOptions = () => {\r\n return {\r\n sort: true,\r\n filter: false,\r\n search: false,\r\n viewColumns: false,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.cbContext.translatorService),\r\n elevation: 0,\r\n serverSide: true,\r\n count: this.state.count,\r\n rowsPerPage: this.state.pageSize,\r\n page: this.state.page,\r\n onCellClick: (colData: any, cellMeta: any) => {\r\n if (cellMeta && cellMeta.colIndex !== null && cellMeta.rowIndex !== null) {\r\n // Set up a double-click event listener on the cell\r\n if (cellMeta.event.detail === 2) {\r\n this.onRowDoubleClick(cellMeta.dataIndex, cellMeta.rowIndex, cellMeta.colIndex);\r\n }\r\n }\r\n },\r\n onTableChange: async (action: any, tableState: any) => {\r\n switch (action) {\r\n case 'changePage':\r\n await this.loadUserAuctions(tableState.page, tableState.rowsPerPage);\r\n break;\r\n case 'changeRowsPerPage':\r\n await this.loadUserAuctions(tableState.page, tableState.rowsPerPage);\r\n break;\r\n case 'sort':\r\n break;\r\n default:\r\n }\r\n }\r\n };\r\n };\r\n\r\n getColor = (dataIndex: number) => {\r\n const auction = this.state.auctionsList.auctions[dataIndex];\r\n if (!auction) return \"default-text\";\r\n \r\n const status = auction.userStatus;\r\n \r\n if (status === AuctionOfferStatusEnum.AUCTION_WINNER || status === AuctionOfferStatusEnum.AUCTION_LAST_BIDDER) {\r\n return \"green-text\";\r\n } else if (status === AuctionOfferStatusEnum.AUCTION_LOSER || status === AuctionOfferStatusEnum.AUCTION_OFFER_EXCEEDED) {\r\n return \"red-text\";\r\n }\r\n \r\n return \"default-text\";\r\n };\r\n\r\n closeDialog = async () => {\r\n this.setState(\r\n {\r\n isDialogOpen: false,\r\n selectedAuction: null\r\n },\r\n async () => {\r\n this.loadUserAuctions(this.state.page, this.state.pageSize);\r\n }\r\n );\r\n };\r\n\r\n goToUserAuctions = () => {\r\n this.props.history.push('/user/auctions');\r\n };\r\n\r\n public render() {\r\n this.cbContext = this.context as AppContext;\r\n\r\n if (this.state.isLoading) {\r\n return ;\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n \r\n
\r\n {this.renderFilters()}\r\n {this.renderSearchButtons()}\r\n {this.state.isLoadingAuctions ? (\r\n \r\n ) : (\r\n \r\n \r\n \r\n )} \r\n
\r\n
\r\n
\r\n
\r\n {this.state.selectedAuction ? (\r\n \r\n \r\n \r\n {this.cbContext.translatorService.Tranlate('MAVO_VEHICLE_VIEW', 'Fisa Tehnica (Fisa de Evaluare)')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.state.selectedAuction === null ? null : (\r\n \r\n )}\r\n \r\n \r\n ) : null }\r\n
\r\n );\r\n }\r\n}\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app,\r\n mavoVehicleState: state.mavoVehicle,\r\n mavoVehicleAuctionState: state.mavoVehicleAuction\r\n }),\r\n{ ...MavoVehicleActionCreators, ...VehicleAuctionActionCreators }\r\n)(withSnackbar(MavoVehiclesUserAuctions as any));","import React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n ApplicationState,\r\n CaseSettingsState,\r\n AppState,\r\n CaseSettingsActionCreators,\r\n VehicleActionCreators,\r\n VehicleState\r\n} from '../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport {\r\n Button,\r\n Card,\r\n CardContent,\r\n Dialog,\r\n DialogActions,\r\n DialogContent,\r\n DialogContentText,\r\n Divider,\r\n Grid,\r\n Modal,\r\n Typography\r\n} from '@material-ui/core';\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { IVehicleService } from '../../services/Interfaces/IVehicleService';\r\nimport { CloseAuctionRequestDto, MavoVehicleAuction, MavoVehicleAuctionOffer } from '../../interfaces/Vehicle';;\r\nimport * as R from 'ramda';\r\nimport { MavoVehicleActionCreators } from '../../store/actions/MavoVehicle';\r\nimport { MavoVehicleState } from '../../store/reducers/MavoVehicle';\r\nimport { VehicleAuctionActionCreators } from '../../store/actions/VehicleAuction';\r\nimport moment from 'moment';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { AppUser } from '../../interfaces/AppUser';\r\nimport { IAppUserService } from '../../services/Interfaces/IAppUserService';\r\nimport _ from 'lodash';\r\nimport NavigationIcon from '@material-ui/icons/Navigation';\r\n\r\n\r\ninterface IMavoAuctionDetailsFormState {\r\n isLoading: boolean;\r\n executing: boolean; \r\n isOpen: boolean;\r\n dialogVisible: boolean;\r\n mavoVehicleAuction: MavoVehicleAuction;\r\n offers: MavoVehicleAuctionOffer[];\r\n maxOffers: MavoVehicleAuctionOffer[];\r\n}\r\n\r\nexport interface ExternalMavoAuctionDetailsFormProps {\r\n mavoVehicleAuction: MavoVehicleAuction;\r\n closeDialog: () => void;\r\n} \r\n\r\ntype IMavoAuctionDetailsFormProps = ExternalMavoAuctionDetailsFormProps & {\r\n caseSettingsState: CaseSettingsState;\r\n appState: AppState;\r\n vehicleState: VehicleState;\r\n mavoVehicleState: MavoVehicleState;\r\n mavoVehicleAuctionState: MavoVehicleAuction;\r\n} & typeof CaseSettingsActionCreators &\r\n typeof VehicleActionCreators &\r\n typeof MavoVehicleActionCreators & typeof VehicleAuctionActionCreators &\r\n ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass MavoAuctionDetailsForm extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private vehicleService!: IVehicleService;\r\n private appUserService!: IAppUserService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n isLoading: false,\r\n executing: false,\r\n isOpen: false,\r\n dialogVisible: false,\r\n mavoVehicleAuction: this.props.mavoVehicleAuction,\r\n offers: [] as MavoVehicleAuctionOffer[],\r\n maxOffers: [] as MavoVehicleAuctionOffer[]\r\n } as IMavoAuctionDetailsFormState;\r\n\r\n public componentDidMount() { \r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadData();\r\n }\r\n );\r\n \r\n }\r\n\r\n private loadData = async () => {\r\n const mavoVehicleAuction = await this.vehicleService.GetMavoAuction(this.state.mavoVehicleAuction.id);\r\n if (mavoVehicleAuction.mavoVehicleAuctionOffers.length > 0) {\r\n const mavoVehicleAuctionOffers = _.cloneDeep(mavoVehicleAuction.mavoVehicleAuctionOffers);\r\n const users = await this.appUserService.GetUsersInfo(\r\n Array.from(new Set(mavoVehicleAuctionOffers.map((item) => item.createdBy)))\r\n );\r\n mavoVehicleAuctionOffers.forEach((offer) => {\r\n const user = users.find((item: AppUser) => item.id === offer.createdBy);\r\n offer.createdByUser = R.isNil(user) ? null : user;\r\n });\r\n mavoVehicleAuction.mavoVehicleAuctionOffers = _.cloneDeep(mavoVehicleAuctionOffers);\r\n }\r\n\r\n const maxOffers = mavoVehicleAuction.mavoVehicleAuctionOffers.filter(x => x.hasManualOffer);\r\n console.log('maxOffers', maxOffers);\r\n this.setState({\r\n isLoading: false,\r\n mavoVehicleAuction: mavoVehicleAuction,\r\n offers: mavoVehicleAuction.mavoVehicleAuctionOffers,\r\n maxOffers: maxOffers\r\n });\r\n\r\n }\r\n \r\n showOfferTimeline = () => {\r\n return this.state.offers.map((mavoVehicleAuctionOffer, index) => {\r\n return (\r\n
\r\n {mavoVehicleAuctionOffer.dateCreation ? moment.utc(mavoVehicleAuctionOffer.dateCreation).local().format(this.props.appState.longDateFormat) : ''}\r\n  \r\n -\r\n  \r\n {mavoVehicleAuctionOffer.createdByUser ? mavoVehicleAuctionOffer.createdByUser.organization!.name : ''}\r\n  \r\n :\r\n  \r\n {mavoVehicleAuctionOffer.minimumOffer} \r\n  \r\n :\r\n {mavoVehicleAuctionOffer.hasManualOffer ? '' : ' * '}\r\n
\r\n );\r\n });\r\n };\r\n\r\n showBidOfferTimeline = () => {\r\n return this.state.maxOffers.map((mavoVehicleAuctionOffer, index) => {\r\n return (\r\n
\r\n {mavoVehicleAuctionOffer.dateCreation ? moment.utc(mavoVehicleAuctionOffer.dateCreation).local().format(this.props.appState.longDateFormat) : ''}\r\n  \r\n /\r\n  \r\n {mavoVehicleAuctionOffer.createdByUser ? mavoVehicleAuctionOffer.createdByUser.organization!.name : ''}\r\n  \r\n =\r\n  \r\n {mavoVehicleAuctionOffer.maximumOffer} \r\n
\r\n );\r\n });\r\n };\r\n \r\n auctionCommentDetails = () => {\r\n return (\r\n \r\n \r\n
\r\n {this.translatorService.Tranlate('AUCTION_OTHER_DETAILS', 'Alte detalii') + ':'}\r\n
\r\n
\r\n {this.state.mavoVehicleAuction ? this.state.mavoVehicleAuction.details : ''}\r\n
\r\n
\r\n
\r\n );\r\n } \r\n\r\n auctionDetails = () => {\r\n return (\r\n \r\n \r\n
\r\n {this.translatorService.Tranlate('MAVO_VEHICLES_AUCTION_VIN', 'VIN') + ': '}{' '}\r\n
\r\n
\r\n   {this.state.mavoVehicleAuction ? this.state.mavoVehicleAuction.mavoVehicle.vin : ''}\r\n
\r\n
\r\n \r\n
\r\n {this.translatorService.Tranlate('VEHICLES_VEHICLE_MAKE', 'Marca') + ': '}{' '}\r\n
\r\n
\r\n   {this.state.mavoVehicleAuction.mavoVehicle.make?.displayName}\r\n
\r\n
\r\n \r\n
\r\n {this.translatorService.Tranlate('VEHICLES_VEHICLE_MODEL', 'Model') + ': '}{' '}\r\n
\r\n
\r\n   {this.state.mavoVehicleAuction.mavoVehicle.model?.displayName}\r\n
\r\n
\r\n \r\n
\r\n {this.translatorService.Tranlate('MAVO_VEHICLES_VEHICLE_STATE', 'Stare')}:\r\n
\r\n
\r\n  {!R.isNil(this.state.mavoVehicleAuction.auctionStatus) ? this.state.mavoVehicleAuction.auctionStatus.displayName || '' : ''}\r\n
\r\n
\r\n \r\n
\r\n {this.translatorService.Tranlate('MAVO_VEHICLES_AUCTION_START_EURO_PRICE', 'Pret start licitatie (euro)')}:\r\n
\r\n
\r\n  {this.state.mavoVehicleAuction && this.state.mavoVehicleAuction.startPrice} EUR\r\n
\r\n
\r\n \r\n
\r\n {this.translatorService.Tranlate('MAVO_VEHICLES_AUCTION_START_DATE', 'Data start') + ': '}{' '}\r\n
\r\n
\r\n  \r\n {moment\r\n .utc(this.state.mavoVehicleAuction.startDate)\r\n .local()\r\n .format(this.props.appState.dateFormat)}\r\n
\r\n
\r\n \r\n
\r\n {this.translatorService.Tranlate('MAVO_VEHICLES_AUCTION_END_DATE', 'Data stop licitatie') + ': '}{' '}\r\n
\r\n
\r\n  \r\n {moment(this.state.mavoVehicleAuction.endDate)\r\n .format(this.props.appState.longDateFormat)}\r\n
\r\n
\r\n \r\n
\r\n {this.translatorService.Tranlate('VEHICLE_AUCTION_MIN_DIFFERENCE', 'Suma minima peste ultima oferta')+ ': '}{' '}\r\n
\r\n
\r\n  {this.state.mavoVehicleAuction.minDifference || ''}\r\n
\r\n
\r\n \r\n
\r\n {this.translatorService.Tranlate('VEHICLE_AUCTION_CURRENT_EURO_PRICE', 'Pret curent licitatie (euro)')+ ': '}{' '}\r\n
\r\n
\r\n  {this.state.mavoVehicleAuction.currentPrice || ''}\r\n
\r\n
\r\n
\r\n );\r\n }\r\n\r\n \r\n handleOpenConfirmationDialog = () => {\r\n this.setState({\r\n isOpen: true,\r\n dialogVisible: true\r\n });\r\n };\r\n\r\n handleCloseModal = () => {\r\n this.setState({\r\n isOpen: false,\r\n dialogVisible: false\r\n });\r\n };\r\n\r\n closeAuction = async () => {\r\n try {\r\n const request = {\r\n auctionId: this.state.mavoVehicleAuction.id,\r\n } as CloseAuctionRequestDto;\r\n const result = await this.vehicleService.CloseAuction(request);\r\n this.handleCloseModal();\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.vehicleService = (this.context as AppContext).vehicleService;\r\n this.appUserService = (this.context as AppContext).appUserService;\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n
\r\n {\r\n this.props.closeDialog();\r\n }}\r\n >\r\n \r\n {this.translatorService.Tranlate('AUCTION_DIALOG_BACK', 'Inapoi')}\r\n \r\n
\r\n
\r\n \r\n {this.translatorService.Tranlate('AUCTION_DIALOG_CLOSED_BUTTON', 'Inchide licitatie')}\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n {this.auctionDetails()} \r\n \r\n {this.translatorService.Tranlate(\r\n 'AUCTION_HISTORY',\r\n 'Istoric licitatie'\r\n )}:\r\n \r\n {this.state.offers && this.state.offers.length > 0 ? (\r\n
\r\n {this.showOfferTimeline()}\r\n
\r\n ) : (\r\n
\r\n
\r\n Nu exista oferte\r\n
\r\n
\r\n )}\r\n \r\n {this.auctionCommentDetails()}\r\n \r\n \r\n {this.translatorService.Tranlate(\r\n 'AUCTION_MAX_BIDS',\r\n 'Lista oferte maxime (Biduri maxime)'\r\n )}:\r\n \r\n {this.state.maxOffers && this.state.maxOffers.length > 0 ? (\r\n
\r\n {this.showBidOfferTimeline()}\r\n
\r\n ) : (\r\n
\r\n
\r\n Nu exista oferte\r\n
\r\n
\r\n )}\r\n
\r\n ): null}\r\n
\r\n\r\n \r\n \r\n \r\n \r\n {`${this.translatorService.Tranlate(\r\n 'AUCTION_CLOSED_CONFIRMATION_MESSAGE',\r\n 'Sunteti sigur ca doriti sa inchideti licitatia?'\r\n )} `}\r\n \r\n \r\n \r\n \r\n {this.translatorService.Tranlate('VEHICLE_SEARCH_FORM_VEHICLE_YES', 'Da')}\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState, ownProps: ExternalMavoAuctionDetailsFormProps) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app,\r\n vehicleState: state.vehicle,\r\n mavoVehicleState: state.mavoVehicle,\r\n mavoVehicleAuctionState: state.mavoVehicleAuction,\r\n }),\r\n{ ...CaseSettingsActionCreators, ...VehicleActionCreators, ...MavoVehicleActionCreators, ...VehicleAuctionActionCreators }\r\n)(withSnackbar(MavoAuctionDetailsForm as any));\r\n","import * as React from 'react';\r\nimport { ApplicationState, AppState } from '../../store';\r\nimport { ApplicationContext, AppContext } from '../../context/Contexts';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n Card,\r\n Grid,\r\n Tab,\r\n Tabs,\r\n AppBar,\r\n TextField,\r\n Button,\r\n Checkbox,\r\n FormControlLabel,\r\n DialogTitle,\r\n DialogContent,\r\n Dialog,\r\n IconButton,\r\n Modal,\r\n DialogContentText,\r\n DialogActions\r\n} from '@material-ui/core';\r\nimport TabPanel from '../_shared/Tabs';\r\nimport MUIDataTable, {\r\n MUIDataTableColumnOptions,\r\n MUIDataTableMeta,\r\n SelectableRows\r\n} from 'mui-datatables';\r\nimport { MUITranslations } from '../../helpers/MUITableTranslations';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport {\r\n MavoVehicleAuction,\r\n Provenance,\r\n MavoAdminAuctionsList,\r\n MavoAdminAuctionsFilters,\r\n CloseAuctionRequestDto\r\n} from '../../interfaces/Vehicle';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport Loader from '../Loader';\r\nimport noop from 'lodash/noop';\r\nimport _ from 'lodash';\r\nimport moment from 'moment';\r\nimport MomentUtils from '@date-io/moment';\r\nimport { MavoVehicleActionCreators } from '../../store/actions/MavoVehicle';\r\nimport { MavoVehicleState } from '../../store/reducers/MavoVehicle';\r\nimport NumberFormat from 'react-number-format';\r\nimport { VehicleAuctionActionCreators } from '../../store/actions/VehicleAuction';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport MavoAuctionDetailsForm from './MavoAuctionDetailsForm';\r\nimport {MuiThemeProvider, createMuiTheme } from '@material-ui/core';\r\nimport RealTimeDate from './RealTimeDate';\r\nimport { DatePicker, MuiPickersUtilsProvider } from '@material-ui/pickers';\r\nimport { MaterialUiPickersDate } from '@material-ui/pickers/typings/date';\r\nimport FileSaver from 'file-saver';\r\nimport { ScaleLoader } from 'react-spinners';\r\n\r\nclass LocalizedUtils extends MomentUtils {\r\n // dateFormat = \"DD MM YYYY\";\r\n}\r\n\r\ntype MavoVehiclesAdminAuctionsProps = {\r\n appState: AppState;\r\n mavoVehicleState: MavoVehicleState;\r\n mavoVehicleAuctionState: MavoVehicleAuction;\r\n} &\r\n typeof MavoVehicleActionCreators & typeof VehicleAuctionActionCreators &\r\n ProviderContext &\r\n RouteComponentProps;\r\n\r\ninterface IMavoVehiclesAdminAuctionsState {\r\n auctionsList: MavoAdminAuctionsList;\r\n selectedStartDate: Date | null;\r\n selectedEndDate: Date | null;\r\n provenanceEntities: Provenance[];\r\n selectedProvenanceEntities: Provenance[];\r\n statusEntities: IReferential[];\r\n selectedStatusEntities: IReferential[];\r\n selectedTab: number;\r\n isLoading: boolean;\r\n isLoadingAuctions: boolean;\r\n count: number;\r\n page: number;\r\n pageSize: number;\r\n vin: string;\r\n selectedAuction: MavoVehicleAuction | null;\r\n executing: boolean;\r\n isDialogOpen: boolean;\r\n isOfferDialogOpen: boolean;\r\n isOpen: boolean;\r\n isLoadingExport: boolean;\r\n}\r\n\r\nclass MavoVehiclesAdminAuctions extends React.PureComponent {\r\n private cbContext!: AppContext;\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n auctionsList: {} as MavoAdminAuctionsList,\r\n selectedStartDate: null,\r\n selectedEndDate: null,\r\n provenanceEntities: [],\r\n selectedProvenanceEntities: [],\r\n statusEntities: [],\r\n selectedStatusEntities: [],\r\n selectedTab: 0,\r\n isLoading: false,\r\n isLoadingAuctions: false,\r\n count: 1,\r\n page: 0,\r\n pageSize: 10,\r\n vin: '',\r\n selectedAuction: null,\r\n executing: false,\r\n isDialogOpen: false,\r\n isOfferDialogOpen: false,\r\n isOpen: false,\r\n isLoadingExport: false\r\n } as IMavoVehiclesAdminAuctionsState;\r\n\r\n public async componentDidMount() {\r\n const mavoAdminAuctionsFilters = {\r\n startDate: null,\r\n endDate: null,\r\n statusIds: [],\r\n provenanceIds: [],\r\n page: this.state.page + 1,\r\n pageSize: this.state.pageSize,\r\n vin: '',\r\n } as MavoAdminAuctionsFilters;\r\n\r\n this.setState({\r\n isLoading: true\r\n });\r\n\r\n const [auctionsList] = await Promise.all([\r\n this.cbContext.vehicleService.GetAdminAuctions(mavoAdminAuctionsFilters)\r\n ]);\r\n this.setState(\r\n {\r\n auctionsList: auctionsList,\r\n count: auctionsList.total,\r\n page: auctionsList.page - 1\r\n },\r\n async () => {\r\n await this.reloadFilters();\r\n }\r\n );\r\n }\r\n\r\n loadAuctions = async (page: number, rowsPerPage: number) => {\r\n this.setState({\r\n isLoadingAuctions: true,\r\n selectedAuction: null\r\n });\r\n\r\n const mavoAdminAuctionsFilters = {\r\n startDate: this.state.selectedStartDate\r\n ? new Date(this.state.selectedStartDate.setHours(0, 0, 0, 0))\r\n : null,\r\n endDate: this.state.selectedEndDate\r\n ? new Date(this.state.selectedEndDate.setHours(23, 59, 59, 999))\r\n : null,\r\n provenanceIds: this.state.selectedProvenanceEntities.map((item) => item.id),\r\n statusIds: this.state.selectedStatusEntities.map((item) => item.id),\r\n page: page + 1,\r\n pageSize: rowsPerPage,\r\n vin: this.state.vin\r\n } as MavoAdminAuctionsFilters;\r\n\r\n const auctionsList = await this.cbContext.vehicleService.GetAdminAuctions(mavoAdminAuctionsFilters);\r\n this.setState({\r\n auctionsList: auctionsList,\r\n page: auctionsList.page - 1,\r\n pageSize: rowsPerPage,\r\n count: auctionsList.total,\r\n isLoadingAuctions: false\r\n });\r\n };\r\n\r\n reloadFilters = async () => {\r\n const filters = await this.cbContext.vehicleService.GetAdminAuctionsFilters();\r\n this.setState({\r\n provenanceEntities: filters.provenanceList,\r\n statusEntities: filters.statusList,\r\n isLoading: false\r\n });\r\n };\r\n\r\n makeSelectedAuction = (isSelected: boolean, id: number) => {\r\n const auctions = _.cloneDeep(this.state.auctionsList.auctions);\r\n const auction = auctions.find((item) => item.id === id);\r\n if (auction) {\r\n auction.isSelected = isSelected;\r\n }\r\n\r\n if (isSelected) {\r\n auctions.forEach((item) => {\r\n if (item.id !== id) {\r\n item.isSelected = false;\r\n } \r\n });\r\n }\r\n this.setState({\r\n auctionsList: {\r\n ...this.state.auctionsList,\r\n auctions: auctions\r\n },\r\n selectedAuction: isSelected ? (auction ? auction : null): null\r\n });\r\n }\r\n\r\n getMuiTheme = () => createMuiTheme({\r\n overrides: {\r\n MuiTableCell: {\r\n head: {\r\n paddingLeft: \"2px\",\r\n paddingRight: \"2px\",\r\n paddingTop: \"2px\",\r\n paddingBottom: \"2px\"\r\n },\r\n },\r\n MUIDataTableBodyCell: {\r\n stackedCommon: {\r\n paddingLeft: \"2px\",\r\n paddingRight: \"2px\",\r\n paddingTop: \"0px\",\r\n paddingBottom: \"0px\",\r\n height: \"40px !important\"\r\n }\r\n },\r\n MuiCheckbox: {\r\n root: {\r\n padding: \"0px\", // Adjust the padding to make the checkbox smaller\r\n },\r\n colorSecondary: {\r\n '&.Mui-checked': {\r\n color: \"#3d4977 !important\",\r\n '&:hover': {\r\n backgroundColor: 'rgba(0, 0, 0, 0.03) !important'\r\n },\r\n },\r\n '&:hover': {\r\n backgroundColor: 'rgba(0, 0, 0, 0.03) !important'\r\n }\r\n }\r\n }\r\n } as any\r\n });\r\n \r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'id',\r\n label: ' ',\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: any, tableMeta: MUIDataTableMeta) => {\r\n const auction = this.state.auctionsList.auctions.find((item) => item.id === tableMeta.rowData[0]);\r\n return (\r\n \r\n \r\n
\r\n {\r\n this.makeSelectedAuction(e.target.checked, auction!.id);\r\n }}\r\n >\r\n }\r\n label=''\r\n />\r\n
\r\n
\r\n
\r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'mavoVehicle.vin',\r\n label: this.cbContext.translatorService.Tranlate('MAVO_VEHICLES_VEHICLE_VIN_CODE', 'VIN'),\r\n \r\n },\r\n {\r\n name: 'mavoVehicle.make.displayName',\r\n label: this.cbContext.translatorService.Tranlate('VEHICLES_VEHICLE_MAKE', 'Marca'),\r\n options: {\r\n sort: false\r\n }\r\n },\r\n {\r\n name: 'mavoVehicle.model.displayName',\r\n label: this.cbContext.translatorService.Tranlate('VEHICLES_VEHICLE_MODEL', 'Model'),\r\n options: {\r\n sort: false\r\n }\r\n }, \r\n {\r\n name: '',\r\n label: this.cbContext.translatorService.Tranlate(\r\n 'AUCTION_ADMIN_HAS_OFFERS',\r\n 'Oferte'\r\n ),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: string, tableMeta: MUIDataTableMeta) => {\r\n const auction = this.state.auctionsList.auctions.find((item) => item.id === tableMeta.rowData[0]);\r\n return (\r\n \r\n \r\n
\r\n {auction!.mavoVehicleAuctionOffers.length > 0 ? \r\n this.cbContext.translatorService.Tranlate(\"AUCTION_ADMIN_HAS_OFFERS_YES\", \"Da\")\r\n : this.cbContext.translatorService.Tranlate(\"AUCTION_ADMIN_HAS_OFFERS_NO\", \"Nu\")\r\n }\r\n
\r\n
\r\n
\r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'startPrice',\r\n label: this.cbContext.translatorService.Tranlate('MAVO_VEHICLES_AUCTION_START_PRICE', 'Pret start licitatie'),\r\n options: {\r\n sort: false\r\n }\r\n },\r\n {\r\n name: 'currentPrice',\r\n label: this.cbContext.translatorService.Tranlate(\r\n 'AUCTION_ADMIN_CURRENT_PRICE',\r\n 'Pret curent'\r\n ),\r\n options: {\r\n sort: false\r\n }\r\n },\r\n {\r\n name: 'startDate',\r\n label: this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_AUCTION_START_DATE',\r\n 'Data start'\r\n ),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: any) => {\r\n return (\r\n \r\n \r\n
\r\n {value\r\n ? moment\r\n .utc(value)\r\n .local()\r\n .format(this.props.appState.dateFormat)\r\n : null}\r\n
\r\n
\r\n
\r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'endDate',\r\n label: this.cbContext.translatorService.Tranlate(\r\n 'ADMIN_AUCTION_END_DATE',\r\n 'Data stop'\r\n ),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: any) => {\r\n return (\r\n \r\n \r\n
\r\n {value\r\n ? moment(value)\r\n .format(this.props.appState.longDateFormat)\r\n : null}\r\n
\r\n
\r\n
\r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'auctionStatus.displayName',\r\n label: this.cbContext.translatorService.Tranlate('ADMIN_AUCTION_STATUS', 'Stare licitatie'),\r\n options: {\r\n sort: false\r\n }\r\n }, \r\n {\r\n name: 'mavoVehicle.provenance.type',\r\n label: this.cbContext.translatorService.Tranlate(\r\n 'MENU_NOMENCLATURES_TAB_PROVENANCE',\r\n 'Provenienta'\r\n ),\r\n options: {\r\n sort: false\r\n }\r\n },\r\n {\r\n name: '',\r\n label: this.cbContext.translatorService.Tranlate('MAVO_AUCTION_REMAINING_TIME', 'Timp ramas'),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: string, tableMeta: MUIDataTableMeta) => {\r\n const auction = this.state.auctionsList.auctions.find((item) => item.id === tableMeta.rowData[0]);\r\n return (\r\n \r\n \r\n \r\n );\r\n }\r\n }\r\n }\r\n ];\r\n\r\n return columns;\r\n };\r\n\r\n sortFunction = (a: any, b: any) => {\r\n return a.order - b.order;\r\n };\r\n\r\n handleProvenanceEntitiesChange = (newValue: any[]) => {\r\n this.setState(\r\n {\r\n selectedProvenanceEntities: newValue\r\n }\r\n );\r\n };\r\n\r\n renderAdminAuctionsButtons() {\r\n return (\r\n
\r\n
\r\n {\r\n if (!this.state.selectedAuction) {\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('PLEASE_SELECT_LINE', 'Va rugam sa selectati o linie!'), {\r\n variant: 'warning'\r\n });\r\n return;\r\n }\r\n\r\n this.setState({\r\n isDialogOpen: true\r\n });\r\n }}\r\n >\r\n {this.cbContext.translatorService.Tranlate(\r\n 'ADMIN_AUCTION_DETAILS',\r\n 'Consultare'\r\n )}\r\n \r\n
\r\n
\r\n { \r\n if (!this.state.selectedAuction) {\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('PLEASE_SELECT_LINE', 'Va rugam sa selectati o linie!'), {\r\n variant: 'warning'\r\n });\r\n return;\r\n }\r\n this.handleOpenConfirmationDialog();\r\n }}\r\n >\r\n {this.cbContext.translatorService.Tranlate(\r\n 'ADMIN_STOP_AUCTION',\r\n 'Stopare'\r\n )}\r\n \r\n
\r\n
\r\n \r\n {this.cbContext.translatorService.Tranlate(\r\n 'ADMIN_AUCTION_EXPORT',\r\n 'Export'\r\n )}\r\n \r\n
\r\n
\r\n\r\n );\r\n }\r\n\r\n renderSearchButtons() {\r\n return (\r\n
\r\n
\r\n this.loadAuctions(this.state.page, this.state.pageSize)}\r\n >\r\n {this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_VEHICLE_SEARCH',\r\n 'Cautare'\r\n )}\r\n \r\n
\r\n
\r\n this.resetFilters()}\r\n >\r\n {this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_VEHICLE_RESET',\r\n 'Reset'\r\n )}\r\n \r\n
\r\n
\r\n\r\n );\r\n }\r\n\r\n handleStatusEntitiesChange = (newValue: any[]) => {\r\n this.setState(\r\n {\r\n selectedStatusEntities: newValue\r\n }\r\n );\r\n };\r\n\r\n resetFilters = async () => {\r\n this.setState({\r\n selectedStartDate: null,\r\n selectedEndDate: null,\r\n selectedProvenanceEntities: [],\r\n selectedStatusEntities: [],\r\n vin: ''\r\n }, async () => {\r\n await this.loadAuctions(this.state.page, this.state.pageSize);\r\n });\r\n };\r\n\r\n NumberFormatCustom = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n },\r\n currentTarget: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n allowNegative={false}\r\n thousandSeparator={false}\r\n decimalScale={2}\r\n />\r\n );\r\n };\r\n \r\n handleStartDateChange = async (date: MaterialUiPickersDate | null, value?: string | null) => {\r\n if (date === null || !date.isValid) {\r\n return;\r\n }\r\n this.setState(\r\n {\r\n selectedStartDate: date!.toDate(),\r\n isLoading: false\r\n }\r\n );\r\n };\r\n\r\n handleEndDateChange = async (date: MaterialUiPickersDate | null, value?: string | null) => {\r\n if (date === null || !date.isValid) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n selectedEndDate: date!.toDate(),\r\n isLoading: false\r\n }\r\n );\r\n };\r\n\r\n\r\n renderFilters = () => {\r\n return (\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n this.handleStatusEntitiesChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n
\r\n {\r\n this.setState({\r\n vin: e.target.value\r\n });\r\n }}\r\n validators={['required']}\r\n label={this.cbContext.translatorService.Tranlate('CALCULATION_DETAILS_VIN', 'Vin')}\r\n />\r\n
\r\n \r\n
\r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n this.handleProvenanceEntitiesChange(newValue)\r\n }\r\n getOptionLabel={(option: Provenance) => option.type || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n \r\n
\r\n
\r\n
\r\n );\r\n };\r\n\r\n onRowDoubleClick = (\r\n dataIndex: number,\r\n rowIndex: number,\r\n columnIndex: number\r\n ) => {\r\n if (columnIndex != 2) {\r\n return;\r\n }\r\n const auction = this.state.auctionsList.auctions[dataIndex];\r\n this.setState({\r\n isDialogOpen: true,\r\n selectedAuction: auction!\r\n });\r\n };\r\n\r\n tableOptions = () => {\r\n return {\r\n sort: true,\r\n filter: false,\r\n search: false,\r\n viewColumns: false,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.cbContext.translatorService),\r\n elevation: 0,\r\n serverSide: true,\r\n count: this.state.count,\r\n rowsPerPage: this.state.pageSize,\r\n page: this.state.page,\r\n onCellClick: (colData: any, cellMeta: any) => {\r\n if (cellMeta && cellMeta.colIndex !== null && cellMeta.rowIndex !== null) {\r\n // Set up a double-click event listener on the cell\r\n if (cellMeta.event.detail === 2) {\r\n this.onRowDoubleClick(cellMeta.dataIndex, cellMeta.rowIndex, cellMeta.colIndex);\r\n }\r\n }\r\n },\r\n onTableChange: async (action: any, tableState: any) => {\r\n switch (action) {\r\n case 'changePage':\r\n await this.loadAuctions(tableState.page, tableState.rowsPerPage);\r\n break;\r\n case 'changeRowsPerPage':\r\n await this.loadAuctions(tableState.page, tableState.rowsPerPage);\r\n break;\r\n case 'sort':\r\n break;\r\n default:\r\n }\r\n }\r\n };\r\n };\r\n \r\n closeDialog = async () => {\r\n this.setState(\r\n {\r\n isDialogOpen: false,\r\n selectedAuction: null\r\n }, async () => {\r\n this.loadAuctions(this.state.page, this.state.pageSize);\r\n }\r\n );\r\n };\r\n\r\n handleOpenConfirmationDialog = () => {\r\n this.setState({\r\n isOpen: true\r\n });\r\n };\r\n\r\n handleCloseModal = () => {\r\n this.setState({\r\n isOpen: false\r\n }, () => {\r\n this.makeSelectedAuction(false, this.state.selectedAuction!.id)\r\n });\r\n };\r\n\r\n closeAuction = async () => {\r\n try {\r\n const request = {\r\n auctionId: this.state.selectedAuction!.id,\r\n } as CloseAuctionRequestDto;\r\n\r\n await this.cbContext.vehicleService.CloseAuction(request);\r\n\r\n this.setState({\r\n isOpen: false,\r\n selectedAuction: null\r\n }, async () => {\r\n this.loadAuctions(this.state.page, this.state.pageSize);\r\n });\r\n\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n\r\n handleExportAuctionOffers = async () => {\r\n try {\r\n this.setState({\r\n isLoadingExport: true\r\n });\r\n\r\n const mavoAdminAuctionsFilters = {\r\n startDate: this.state.selectedStartDate\r\n ? new Date(this.state.selectedStartDate.setHours(0, 0, 0, 0))\r\n : null,\r\n endDate: this.state.selectedEndDate\r\n ? new Date(this.state.selectedEndDate.setHours(23, 59, 59, 999))\r\n : null,\r\n provenanceIds: this.state.selectedProvenanceEntities.map((item) => item.id),\r\n statusIds: this.state.selectedStatusEntities.map((item) => item.id),\r\n vin: this.state.vin\r\n } as MavoAdminAuctionsFilters;\r\n \r\n const fileBlob = await this.cbContext.vehicleService.ExportAuctionOffers(mavoAdminAuctionsFilters);\r\n\r\n FileSaver.saveAs(fileBlob, 'Export_Licitatii_Detaliu' + '.xlsx');\r\n\r\n this.setState({\r\n isLoadingExport: false\r\n });\r\n\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (err: any) {\r\n this.setState({\r\n isLoadingExport: false\r\n });\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n\r\n\r\n\r\n public render() {\r\n this.cbContext = this.context as AppContext;\r\n\r\n if (this.state.isLoading) {\r\n return ;\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n \r\n
\r\n {this.renderAdminAuctionsButtons()}\r\n
\r\n \r\n
\r\n {this.renderFilters()}\r\n {this.renderSearchButtons()}\r\n {this.state.isLoadingAuctions ? (\r\n \r\n ) : (\r\n \r\n \r\n \r\n )} \r\n
\r\n
\r\n
\r\n
\r\n {this.state.selectedAuction ? (\r\n \r\n \r\n \r\n {this.cbContext.translatorService.Tranlate('MAVO_VEHICLE_AUCTION_DETAILS', 'Detalii licitatie')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.state.selectedAuction === null ? null : (\r\n \r\n )}\r\n \r\n \r\n ) : null }\r\n\r\n \r\n \r\n \r\n \r\n {`${this.cbContext.translatorService.Tranlate(\r\n 'AUCTION_CLOSED_CONFIRMATION_MESSAGE',\r\n 'Sunteti sigur ca doriti sa inchideti licitatia?'\r\n )} `}\r\n \r\n \r\n \r\n \r\n {this.cbContext.translatorService.Tranlate('VEHICLE_SEARCH_FORM_VEHICLE_YES', 'Da')}\r\n \r\n \r\n \r\n \r\n \r\n
\r\n );\r\n }\r\n}\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app,\r\n mavoVehicleState: state.mavoVehicle,\r\n mavoVehicleAuctionState: state.mavoVehicleAuction\r\n }),\r\n{ ...MavoVehicleActionCreators, ...VehicleAuctionActionCreators }\r\n)(withSnackbar(MavoVehiclesAdminAuctions as any));","import * as React from 'react';\r\nimport { Button, CircularProgress } from \"@material-ui/core\";\r\nimport { AppContext, ApplicationContext } from \"../../context/Contexts\";\r\nimport { CreateEInvoiceRequest, DeclineMavoVehicleOrderRequest, MavoVehicleCreateInvoiceRequestDto, MavoVehicleCreateNoticeRequestDto, MavoVehicleOrderRCICloseRequest } from '../../interfaces/Vehicle';\r\nimport { InvoiceTypeCodeEnum, MavoOrderStatusCodeEnum, MavoVehicleProvenanceType, ReportTypeCode } from '../../helpers/Constants';\r\nimport { withSnackbar } from 'notistack';\r\nimport { ApplicationState } from '../../store';\r\nimport { connect } from 'react-redux';\r\nimport { IMavoOrdersButtonsProps, MavoOrderButtonsProps } from '../cases/vehicleDetails/IMavoOrdersButtonsProps';\r\nimport FileSaver from 'file-saver';\r\n\r\ninterface IOrdersButtonsState {\r\n isLoading: boolean;\r\n executing: boolean;\r\n orderConfirmationLoading: boolean;\r\n cancelOrderLoading: boolean;\r\n orderRefuseLoading: boolean;\r\n printPaymentNoticeLoading: boolean;\r\n generateInvoiceLoading: boolean;\r\n rciCloseOrderLoading: boolean;\r\n}\r\n\r\nclass OrdersButtons extends React.PureComponent<\r\n IMavoOrdersButtonsProps,\r\n IOrdersButtonsState\r\n> {\r\n\r\n state = {\r\n isLoading: false,\r\n executing: false,\r\n orderConfirmationLoading: false,\r\n cancelOrderLoading: false,\r\n orderRefuseLoading: false,\r\n printPaymentNoticeLoading: false,\r\n generateInvoiceLoading: false,\r\n rciCloseOrderLoading: false\r\n } as IOrdersButtonsState;\r\n\r\n private cbContext!: AppContext;\r\n static contextType = ApplicationContext;\r\n\r\n handleOrderConfirm = async () => {\r\n if (!this.props.selectedOrder?.orderStatus) return;\r\n if (this.props.selectedOrder?.orderStatus.code === MavoOrderStatusCodeEnum.CONFIRMAT.toString()) {\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('ORDER_CONFIRM_ERR_MSG', 'Nu puteti confirma o comanda deja confirmata!'), {\r\n variant: 'warning' \r\n });\r\n return;\r\n }\r\n if (this.props.selectedOrder?.orderStatus.code === MavoOrderStatusCodeEnum.TRANSMIS.toString()) {\r\n try {\r\n this.setState({ orderConfirmationLoading: true });\r\n\r\n const request = {\r\n mavoVehicleOrderId: this.props.selectedOrder.id,\r\n organizationId: this.props.selectedOrder.organizationId ?? null\r\n } as MavoVehicleCreateNoticeRequestDto;\r\n\r\n await this.cbContext.vehicleService.ConfirmMavoVehicleOrder(ReportTypeCode.RENAULT_AVIZ_PLATA, request);\r\n\r\n this.props.loadOrders(this.props.page, this.props.pageSize);\r\n\r\n this.setState({ orderConfirmationLoading: false });\r\n\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch {\r\n this.setState({ executing: false, orderConfirmationLoading: false });\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n }\r\n \r\n handleCancelConfirmation = async () => {\r\n if (!this.props.selectedOrder?.orderStatus) return;\r\n\r\n if (this.props.selectedOrder?.orderStatus.code === MavoOrderStatusCodeEnum.TRANSMIS.toString()) {\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('ORDER_CANCEL_CONFIRM_ERR_MSG', 'Nu a fost generat Aviz de Plata!'), {\r\n variant: 'warning'\r\n });\r\n return;\r\n }\r\n\r\n try {\r\n this.setState({ cancelOrderLoading: true });\r\n const request = {\r\n mavoVehicleOrderId: this.props.selectedOrder.id,\r\n organizationId: this.props.selectedOrder.organizationId ?? null\r\n } as MavoVehicleCreateNoticeRequestDto;\r\n \r\n await this.cbContext.vehicleService.CancelNoticeMavoVehicle(ReportTypeCode.RENAULT_AVIZ_PLATA, request);\r\n\r\n this.props.loadOrders(this.props.page, this.props.pageSize);\r\n\r\n this.setState({ cancelOrderLoading: false });\r\n\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch {\r\n this.setState({ executing: false, cancelOrderLoading: false });\r\n\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n \r\n }\r\n\r\n handleOrderRefuse = async () => {\r\n if (!this.props.selectedOrder?.orderStatus) return;\r\n if (this.props.selectedOrder?.orderStatus.code === MavoOrderStatusCodeEnum.CONFIRMAT.toString()) {\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('ORDER_REFUSE_ERR_MSG', 'Vehicul in curs de facturare!'), {\r\n variant: 'warning'\r\n });\r\n return;\r\n }\r\n try {\r\n this.setState({ orderRefuseLoading: true });\r\n\r\n const request = {\r\n mavoVehicleOrderId: this.props.selectedOrder.id\r\n } as DeclineMavoVehicleOrderRequest;\r\n\r\n await this.cbContext.vehicleService.DeclineMavoVehicleOrder(request);\r\n\r\n this.props.loadOrders(this.props.page, this.props.pageSize);\r\n\r\n this.setState({ orderRefuseLoading: false });\r\n\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch {\r\n this.setState({ executing: false, orderRefuseLoading: false });\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n\r\n handlePrintPaymentNotice = async () => {\r\n if (!this.props.selectedOrder?.orderStatus) return;\r\n if (this.props.selectedOrder?.orderStatus.code === MavoOrderStatusCodeEnum.TRANSMIS.toString()) {\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('ORDER_PRINT_PAYMENT_NOTICE_ERR_MSG', 'Vehicul fara Aviz de Plata !'), {\r\n variant: 'warning'\r\n });\r\n return;\r\n }\r\n\r\n try {\r\n this.setState({ printPaymentNoticeLoading: true });\r\n\r\n const fileBlob = await this.cbContext.vehicleService.PrintMavoVehicleNotice(this.props.selectedOrder.id);\r\n\r\n this.setState({ printPaymentNoticeLoading: false });\r\n\r\n const file = new File([fileBlob], this.cbContext.translatorService.Tranlate('PRINT_NOTICE_NAME', 'Avizare plata bancara') + '.pdf', { type: 'application/pdf' });\r\n \r\n FileSaver.saveAs(fileBlob, \"AvizarePlataBancara\" + '.pdf');\r\n\r\n const url = URL.createObjectURL(file);\r\n window.open(url, '_blank');\r\n } catch {\r\n this.setState({ executing: false, printPaymentNoticeLoading: false });\r\n\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n\r\n handleInvoiceGenerate = async () => {\r\n if (!this.props.selectedOrder?.orderStatus) return;\r\n if (this.props.selectedOrder?.orderStatus.code === MavoOrderStatusCodeEnum.TRANSMIS.toString()) {\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('ORDER_PRINT_PAYMENT_NOTICE_ERR_MSG', 'Vehicul fara Aviz de Plata !'), {\r\n variant: 'warning'\r\n });\r\n return;\r\n }\r\n\r\n try {\r\n this.setState({ generateInvoiceLoading: true });\r\n\r\n const request = {\r\n mavoVehicleOrderId: this.props.selectedOrder.id,\r\n organizationId: this.props.selectedOrder.organizationId ?? null\r\n } as MavoVehicleCreateInvoiceRequestDto;\r\n const response = await this.cbContext.vehicleService.GenerateInvoiceReport(ReportTypeCode.RENAULT_FACTURA_LIVRARE, request);\r\n\r\n if (response.existingValidInvoice) {\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('ORDER_VALID_GENERATE_INVOICE_ERR_MSG', 'Factura valida existenta!'), {\r\n variant: 'warning'\r\n });\r\n this.setState({ generateInvoiceLoading: false });\r\n return;\r\n }\r\n\r\n const eInvoiceResponse = await this.cbContext.vehicleService.CreateEInvoice({\r\n orderId: this.props.selectedOrder.id,\r\n invoiceId: response.id,\r\n invoiceTypeCode: InvoiceTypeCodeEnum.FACTURA.toString()\r\n } as CreateEInvoiceRequest);\r\n if (eInvoiceResponse && eInvoiceResponse.statusMessage) {\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate(eInvoiceResponse.statusMessage, eInvoiceResponse.statusMessage), {\r\n variant: 'warning'\r\n });\r\n }\r\n\r\n this.props.loadOrders(this.props.page, this.props.pageSize);\r\n\r\n this.setState({ generateInvoiceLoading: false });\r\n\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch {\r\n this.setState({ executing: false, generateInvoiceLoading: false });\r\n\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n\r\n handleRCICloseOrder = async () => {\r\n if (!this.props.selectedOrder) return;\r\n\r\n try {\r\n this.setState({ rciCloseOrderLoading: true });\r\n\r\n const request = {\r\n mavoVehicleOrderId: this.props.selectedOrder.id\r\n } as MavoVehicleOrderRCICloseRequest;\r\n\r\n await this.cbContext.vehicleService.CloseMavoVehicleOrderRCI(request);\r\n\r\n this.props.loadOrders(this.props.page, this.props.pageSize);\r\n\r\n this.setState({ rciCloseOrderLoading: false });\r\n\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch {\r\n this.setState({ executing: false, rciCloseOrderLoading: false });\r\n\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n\r\n orderButtonDisabled = () => {\r\n if (this.state.orderConfirmationLoading || this.state.cancelOrderLoading || this.state.orderRefuseLoading || this.state.printPaymentNoticeLoading || this.state.generateInvoiceLoading || this.state.rciCloseOrderLoading) {\r\n return true;\r\n }\r\n\r\n if (this.props.selectedOrder && this.props.selectedOrder.mavoVehicle!.provenance!.type === MavoVehicleProvenanceType.DVS) {\r\n return false;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n rciButtonDisabled = () => {\r\n if (this.state.orderConfirmationLoading || this.state.cancelOrderLoading || this.state.orderRefuseLoading || this.state.printPaymentNoticeLoading || this.state.generateInvoiceLoading || this.state.rciCloseOrderLoading) {\r\n return true;\r\n }\r\n\r\n if (this.props.selectedOrder && this.props.selectedOrder.mavoVehicle!.provenance!.type === MavoVehicleProvenanceType.RCI) {\r\n return false;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n render() {\r\n this.cbContext = this.context as AppContext;\r\n\r\n return (\r\n
\r\n
\r\n \r\n {this.state.orderConfirmationLoading && (\r\n \r\n )}\r\n {this.cbContext.translatorService.Tranlate(\r\n 'MAVO_ORDER_CONFIRM_ORDER',\r\n 'Confirma comanda'\r\n )}\r\n \r\n
\r\n
\r\n \r\n {this.state.cancelOrderLoading && (\r\n \r\n )}\r\n {this.cbContext.translatorService.Tranlate(\r\n 'MAVO_ORDER_CANCEL_ORDER_CONFIRMATION',\r\n 'Anuleaza confirmare comanda'\r\n )}\r\n \r\n
\r\n
\r\n \r\n {this.state.orderRefuseLoading && (\r\n \r\n )}\r\n {this.cbContext.translatorService.Tranlate(\r\n 'MAVO_ORDER_REFUSE_ORDER',\r\n 'Refuza comanda'\r\n )}\r\n \r\n
\r\n
\r\n \r\n {this.state.printPaymentNoticeLoading && (\r\n \r\n )}\r\n {this.cbContext.translatorService.Tranlate(\r\n 'MAVO_ORDER_PRINT_PAYMENT_ORDER',\r\n 'Tiparire Aviz de Plata'\r\n )}\r\n \r\n
\r\n
\r\n \r\n {this.state.generateInvoiceLoading && (\r\n \r\n )}\r\n {this.cbContext.translatorService.Tranlate(\r\n 'MAVO_ORDER_GENERATE_INVOICE',\r\n 'Generare factura'\r\n )}\r\n \r\n
\r\n
\r\n \r\n {this.state.rciCloseOrderLoading && (\r\n \r\n )}\r\n {this.cbContext.translatorService.Tranlate(\r\n 'MAVO_ORDER_CLOSE_RCI_ORDER',\r\n 'Inchidere comanda RCI'\r\n )}\r\n \r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (\r\n state: ApplicationState,\r\n ownProps: MavoOrderButtonsProps\r\n ) => ({\r\n appState: state.app,\r\n ...ownProps\r\n })\r\n)(withSnackbar(OrdersButtons as any));\r\n","import * as React from 'react';\r\nimport { ApplicationState, AppState } from '../../store';\r\nimport { ApplicationContext, AppContext } from '../../context/Contexts';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n Card,\r\n Grid,\r\n Tab,\r\n Tabs,\r\n AppBar,\r\n TextField,\r\n Button,\r\n Checkbox,\r\n FormControlLabel\r\n} from '@material-ui/core';\r\nimport TabPanel from '../_shared/Tabs';\r\nimport MUIDataTable, {\r\n MUIDataTableColumnOptions,\r\n MUIDataTableMeta,\r\n SelectableRows\r\n} from 'mui-datatables';\r\nimport { MUITranslations } from '../../helpers/MUITableTranslations';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport {\r\n Provenance,\r\n MavoOrdersFilters,\r\n MavoOrdersList,\r\n MavoVehicleOrder\r\n} from '../../interfaces/Vehicle';\r\nimport { ValidatorForm } from 'react-material-ui-form-validator';\r\nimport Loader from '../Loader';\r\nimport noop from 'lodash/noop';\r\nimport _ from 'lodash';\r\nimport { MavoVehicleActionCreators } from '../../store/actions/MavoVehicle';\r\nimport { MavoVehicleState } from '../../store/reducers/MavoVehicle';\r\nimport NumberFormat from 'react-number-format';\r\nimport { VehicleAuctionActionCreators } from '../../store/actions/VehicleAuction';\r\nimport { AppUser } from '../../interfaces/AppUser';\r\nimport OrdersButtons from './OrdersButtons';\r\nimport { MavoVehicleProvenanceType } from '../../helpers/Constants';\r\nimport { IAppUserService } from '../../services/Interfaces/IAppUserService';\r\nimport * as R from 'ramda';\r\nimport {MuiThemeProvider, createMuiTheme } from '@material-ui/core';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport { IOrganizationService } from '../../services/Interfaces/IOrganizationService';\r\nimport { Organization } from '../../interfaces/Organization';\r\n\r\ntype MavoVehiclesOrdersProps = {\r\n appState: AppState;\r\n mavoVehicleState: MavoVehicleState\r\n} &\r\n typeof MavoVehicleActionCreators & typeof VehicleAuctionActionCreators &\r\n ProviderContext &\r\n RouteComponentProps;\r\n\r\ninterface IMavoVehiclesOrdersState {\r\n ordersList: MavoOrdersList;\r\n selectedOrganizationEntities: Organization[];\r\n organizationsList: Organization[];\r\n provenanceEntities: Provenance[];\r\n selectedProvenanceEntities: Provenance[];\r\n statusEntities: IReferential[];\r\n selectedStatusEntities: IReferential[];\r\n selectedTab: number;\r\n isLoading: boolean;\r\n isLoadingOrders: boolean;\r\n count: number;\r\n page: number;\r\n pageSize: number;\r\n executing: boolean;\r\n selectedOrder: MavoVehicleOrder | null;\r\n}\r\n\r\nclass MavoVehiclesOrders extends React.PureComponent {\r\n private cbContext!: AppContext;\r\n static contextType = ApplicationContext;\r\n private organizationService!: IOrganizationService;\r\n\r\n state = {\r\n ordersList: {} as MavoOrdersList,\r\n selectedOrganizationEntities: [],\r\n organizationsList: [],\r\n provenanceEntities: [],\r\n selectedProvenanceEntities: [],\r\n selectedTab: 0,\r\n isLoading: false,\r\n isLoadingOrders: false,\r\n count: 1,\r\n page: 0,\r\n pageSize: 10,\r\n executing: false,\r\n isDialogOpen: false,\r\n isOfferDialogOpen: false,\r\n selectedOrder: null,\r\n statusEntities: [],\r\n selectedStatusEntities: []\r\n } as IMavoVehiclesOrdersState;\r\n\r\n public async componentDidMount() {\r\n this.setState({\r\n isLoading: true \r\n });\r\n\r\n const provenanceTypeList = await this.cbContext.vehicleService.GetProvenances();\r\n const dvsProvenance = provenanceTypeList.find(x => x.type === MavoVehicleProvenanceType.DVS);\r\n\r\n const mavoVehiclesOrdersFilters = {\r\n organizationIds: [],\r\n provenanceIds: dvsProvenance != null ? [dvsProvenance.id] : [],\r\n statusIds: [],\r\n page: this.state.page + 1,\r\n pageSize: this.state.pageSize,\r\n } as MavoOrdersFilters;\r\n \r\n const [ordersList, orderFilters] = await Promise.all([\r\n this.cbContext.vehicleService.GetMavoOrders(mavoVehiclesOrdersFilters),\r\n await this.cbContext.vehicleService.GetMavoOrdersFilters({\r\n organizationIds: this.state.selectedOrganizationEntities.map((item) => item.id),\r\n provenanceIds: [],\r\n statusIds: []\r\n } as MavoOrdersFilters)\r\n ]);\r\n\r\n const organizationIds = Array.from(\r\n new Set(\r\n ordersList.orders\r\n .map((item) => item.organizationId)\r\n .filter((organizationId): organizationId is number => organizationId !== null)\r\n )\r\n );\r\n const [organizations, organizationsList] = await Promise.all([\r\n this.organizationService.GetUserOrganizationsByIds(organizationIds),\r\n this.organizationService.GetUserOrganizationsByIds(orderFilters.organizationList)\r\n ]);\r\n\r\n ordersList.orders.forEach((order) => {\r\n const organization = organizations.find((item) => item.id === order.organizationId);\r\n order.organization = R.isNil(organization) ? null : organization;\r\n });\r\n\r\n this.setState(\r\n {\r\n ordersList: ordersList,\r\n count: ordersList.total,\r\n page: ordersList.page - 1,\r\n selectedProvenanceEntities: dvsProvenance != null ? [dvsProvenance] : [],\r\n provenanceEntities: orderFilters.provenanceList,\r\n organizationsList: organizationsList,\r\n statusEntities: orderFilters.statusList,\r\n isLoading: false\r\n });\r\n }\r\n\r\n isInternal = (): boolean | null => {\r\n if (this.state.selectedTab === 0) {\r\n return null;\r\n }\r\n if (this.state.selectedTab === 1) {\r\n return false;\r\n }\r\n\r\n return true;\r\n };\r\n\r\n loadOrders = async (page: number, rowsPerPage: number) => {\r\n this.setState({\r\n isLoadingOrders: true,\r\n selectedOrder: null\r\n });\r\n\r\n const mavoVehiclesOrdersFilters = {\r\n provenanceIds: this.state.selectedProvenanceEntities.map((item) => item.id),\r\n organizationIds: this.state.selectedOrganizationEntities.map((item) => item.id),\r\n statusIds: this.state.selectedStatusEntities.map((item) => item.id),\r\n page: page + 1,\r\n pageSize: rowsPerPage\r\n } as MavoOrdersFilters;\r\n\r\n const ordersList = await this.cbContext.vehicleService.GetMavoOrders(mavoVehiclesOrdersFilters);\r\n\r\n const organizationIds = Array.from(\r\n new Set(\r\n ordersList.orders\r\n .map((item) => item.organizationId)\r\n .filter((organizationId): organizationId is number => organizationId !== null)\r\n )\r\n );\r\n const organizations = await this.organizationService.GetUserOrganizationsByIds(organizationIds);\r\n\r\n ordersList.orders.forEach((order) => {\r\n const organization = organizations.find((item) => item.id === order.organizationId);\r\n order.organization = R.isNil(organization) ? null : organization;\r\n });\r\n\r\n this.setState({\r\n ordersList: ordersList,\r\n page: ordersList.page - 1,\r\n pageSize: rowsPerPage,\r\n count: ordersList.total,\r\n isLoadingOrders: false\r\n });\r\n };\r\n\r\n makeSelectedOrder = (isSelected: boolean, id: number) => {\r\n const orders = _.cloneDeep(this.state.ordersList.orders);\r\n const order = orders.find((item) => item.id === id);\r\n if (order) {\r\n order.isSelected = isSelected;\r\n }\r\n\r\n if (isSelected) {\r\n orders.forEach((item) => {\r\n if (item.id !== id) {\r\n item.isSelected = false;\r\n } \r\n });\r\n }\r\n this.setState({\r\n ordersList: {\r\n ...this.state.ordersList,\r\n orders: orders\r\n },\r\n selectedOrder: isSelected ? (order ? order : null): null\r\n });\r\n }\r\n\r\n getMuiTheme = () => createMuiTheme({\r\n overrides: {\r\n MuiTableCell: {\r\n head: {\r\n paddingLeft: \"2px\",\r\n paddingRight: \"2px\",\r\n paddingTop: \"2px\",\r\n paddingBottom: \"2px\"\r\n },\r\n },\r\n MUIDataTableBodyCell: {\r\n stackedCommon: {\r\n paddingLeft: \"2px\",\r\n paddingRight: \"2px\",\r\n paddingTop: \"0px\",\r\n paddingBottom: \"0px\",\r\n height: \"40px !important\"\r\n }\r\n },\r\n MuiCheckbox: {\r\n root: {\r\n padding: \"0px\", // Adjust the padding to make the checkbox smaller\r\n },\r\n colorSecondary: {\r\n '&.Mui-checked': {\r\n color: \"#3d4977 !important\",\r\n '&:hover': {\r\n backgroundColor: 'rgba(0, 0, 0, 0.03) !important'\r\n },\r\n },\r\n '&:hover': {\r\n backgroundColor: 'rgba(0, 0, 0, 0.03) !important'\r\n }\r\n }\r\n }\r\n } as any\r\n });\r\n\r\n\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'id',\r\n label: ' ',\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: any, tableMeta: MUIDataTableMeta) => {\r\n const row = this.state.ordersList.orders.find((item) => item.id === tableMeta.rowData[0]);\r\n return (\r\n \r\n \r\n
\r\n {\r\n this.makeSelectedOrder(e.target.checked, row!.id);\r\n }}\r\n >\r\n }\r\n label=''\r\n />\r\n
\r\n
\r\n
\r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'mavoVehicle.vin',\r\n label: this.cbContext.translatorService.Tranlate('MAVO_VEHICLES_VEHICLE_VIN_CODE', 'VIN'),\r\n options: {\r\n sort: false\r\n }\r\n },\r\n {\r\n name: 'mavoVehicle.make.displayName',\r\n label: this.cbContext.translatorService.Tranlate('VEHICLES_VEHICLE_MAKE', 'Marca'),\r\n options: {\r\n sort: false\r\n }\r\n },\r\n {\r\n name: 'mavoVehicle.model.displayName',\r\n label: this.cbContext.translatorService.Tranlate('VEHICLES_VEHICLE_MODEL', 'Model'),\r\n options: {\r\n sort: false\r\n }\r\n }, \r\n {\r\n name: 'mavoVehicle.versionItem.displayName',\r\n label: this.cbContext.translatorService.Tranlate('MAVO_VEHICLES_VEHICLE_VERSION', 'Versiune'),\r\n options: {\r\n sort: false\r\n }\r\n }, \r\n {\r\n name: 'mavoVehicle.fuelType.displayName',\r\n label: this.cbContext.translatorService.Tranlate('CAR_DETAILS_FUEL_TYPE', 'Combustibil'),\r\n options: {\r\n sort: false\r\n }\r\n },\r\n {\r\n name: 'mavoVehicle.colorRCR.displayName',\r\n label: this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_VEHICLE_COLOR',\r\n 'Culoare'\r\n ),\r\n options: {\r\n sort: false\r\n }\r\n },\r\n {\r\n name: 'mavoVehicle.fabricationYear',\r\n label: this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLE_FABRICATION_YEAR',\r\n 'An de fabricatie'\r\n ),\r\n options: {\r\n sort: false\r\n }\r\n },\r\n {\r\n name: 'mavoVehicle.kilometersNr',\r\n label: this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_VEHICLE_KM',\r\n 'Km'\r\n ),\r\n options: {\r\n sort: false\r\n }\r\n },\r\n {\r\n name: 'userId',\r\n label: this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLE_ORDER_CLIENT',\r\n 'Client'\r\n ), \r\n options: {\r\n sort: false,\r\n customBodyRender: (value: any, tableMeta: MUIDataTableMeta) => {\r\n const order = this.state.ordersList.orders.find((item) => item.id === tableMeta.rowData[0]);\r\n if (R.isNil(order)) {\r\n return '';\r\n }\r\n\r\n return (\r\n \r\n \r\n {R.isNil(order.organization) ? order.name : order.organization!.name}\r\n \r\n \r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'price',\r\n label: this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLE_ORDER_PRICE',\r\n 'Pret'\r\n ),\r\n },\r\n {\r\n name: 'mavoVehicle.currentStatus.status.displayName',\r\n label: this.cbContext.translatorService.Tranlate('MAVO_ORDER_VEHICLE_STATE', 'Stare vehicul'),\r\n options: {\r\n sort: false\r\n }\r\n }, \r\n {\r\n name: 'mavoVehicle.provenance.type',\r\n label: this.cbContext.translatorService.Tranlate(\r\n 'MENU_NOMENCLATURES_TAB_PROVENANCE',\r\n 'Provenienta'\r\n ),\r\n options: {\r\n sort: false\r\n }\r\n }\r\n ];\r\n\r\n return columns;\r\n };\r\n\r\n sortFunction = (a: any, b: any) => {\r\n return a.order - b.order;\r\n };\r\n\r\n onTabChange = (event: any, newValue: number) => {\r\n this.setState(\r\n {\r\n selectedTab: newValue,\r\n page: 0\r\n },\r\n async () => await this.loadOrders(0, this.state.pageSize)\r\n );\r\n };\r\n\r\n\r\n handleProvenanceEntitiesChange = (newValue: any[]) => {\r\n this.setState(\r\n {\r\n selectedProvenanceEntities: newValue\r\n }\r\n );\r\n };\r\n\r\n \r\n handleStatusEntitiesChange = (newValue: any[]) => {\r\n this.setState(\r\n {\r\n selectedStatusEntities: newValue\r\n }\r\n );\r\n };\r\n\r\n renderSearchButtons() {\r\n return (\r\n
\r\n
\r\n this.loadOrders(this.state.page, this.state.pageSize)}\r\n >\r\n {this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_VEHICLE_SEARCH',\r\n 'Cautare'\r\n )}\r\n \r\n
\r\n
\r\n this.resetFilters()}\r\n >\r\n {this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_VEHICLE_RESET',\r\n 'Reset'\r\n )}\r\n \r\n
\r\n
\r\n\r\n );\r\n }\r\n\r\n resetFilters = async () => {\r\n this.setState({\r\n selectedProvenanceEntities: [],\r\n selectedOrganizationEntities: []\r\n }, async () => {\r\n await this.loadOrders(this.state.page, this.state.pageSize);\r\n });\r\n };\r\n\r\n NumberFormatCustom = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n },\r\n currentTarget: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n allowNegative={false}\r\n thousandSeparator={false}\r\n decimalScale={2}\r\n />\r\n );\r\n };\r\n \r\n handleOrganizationChange = (newValue: any[]) => {\r\n this.setState(\r\n {\r\n selectedOrganizationEntities: newValue\r\n }\r\n );\r\n };\r\n\r\n renderFilters = () => {\r\n return (\r\n
\r\n \r\n \r\n \r\n this.handleOrganizationChange(newValue)}\r\n getOptionLabel={(option: Organization) => option.name || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n \r\n this.handleProvenanceEntitiesChange(newValue)\r\n }\r\n getOptionLabel={(option: Provenance) => option.type || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n {/* \r\n \r\n this.handleStatusEntitiesChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n */}\r\n \r\n \r\n
\r\n );\r\n };\r\n\r\n\r\n tableOptions = () => {\r\n return {\r\n sort: true,\r\n filter: false,\r\n search: false,\r\n viewColumns: false,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.cbContext.translatorService),\r\n elevation: 0,\r\n serverSide: true,\r\n count: this.state.count,\r\n rowsPerPage: this.state.pageSize,\r\n page: this.state.page,\r\n onTableChange: async (action: any, tableState: any) => {\r\n switch (action) {\r\n case 'changePage':\r\n await this.loadOrders(tableState.page, tableState.rowsPerPage);\r\n break;\r\n case 'changeRowsPerPage':\r\n await this.loadOrders(tableState.page, tableState.rowsPerPage);\r\n break;\r\n case 'sort':\r\n break;\r\n default:\r\n }\r\n }\r\n };\r\n };\r\n \r\n\r\n public render() {\r\n this.cbContext = this.context as AppContext;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n\r\n if (this.state.isLoading) {\r\n return ;\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n \r\n
\r\n \r\n {this.renderFilters()}\r\n {this.renderSearchButtons()}\r\n {this.state.isLoadingOrders ? (\r\n \r\n ) : (\r\n \r\n \r\n \r\n )} \r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n}\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app,\r\n mavoVehicleState: state.mavoVehicle\r\n }),\r\n{ ...MavoVehicleActionCreators }\r\n)(withSnackbar(MavoVehiclesOrders as any));","import * as React from 'react';\r\nimport {\r\n List,\r\n ListItem,\r\n ListItemText,\r\n Card,\r\n} from '@material-ui/core';\r\nimport { LanguageApi } from '../../../interfaces/Case';\r\nimport { AppContext, ApplicationContext } from '../../../context/Contexts';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\n\r\ninterface Props {\r\n language: LanguageApi;\r\n}\r\n\r\nclass LanguageApiCard extends React.Component {\r\n private translatorService!: ITranslatorService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n processCountryFlag = (languageCode: string) => {\r\n let countryCode = '';\r\n if (languageCode === 'en') {\r\n countryCode = 'GB';\r\n } else {\r\n countryCode = languageCode.toUpperCase();\r\n }\r\n return `https://flagsapi.com/${countryCode}/shiny/32.png`\r\n }\r\n\r\n render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n {`Flag\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nexport default LanguageApiCard;\r\n","import * as React from 'react';\r\nimport {\r\n List,\r\n ListItem,\r\n ListItemText,\r\n Card,\r\n} from '@material-ui/core';\r\nimport { LanguageApi, LanguageLocal } from '../../../interfaces/Case';\r\nimport { AppContext, ApplicationContext } from '../../../context/Contexts';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\n\r\ninterface Props extends ProviderContext {\r\n languageApi: LanguageApi;\r\n languagesLocal: LanguageLocal[];\r\n fetchLanguages: () => void;\r\n}\r\n\r\nclass LanguageLocalCard extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n \r\n static contextType = ApplicationContext;\r\n\r\n constructor(props: Props) {\r\n super(props);\r\n }\r\n\r\n checkIfLocalLanguageExists(language: LanguageApi) {\r\n return this.props.languagesLocal.some((lang) => lang.code === language.code);\r\n }\r\n\r\n showSnackbar = (result: 'success' | 'error') => {\r\n if (result === 'success') {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCESS_MSG', 'Succes'), {\r\n variant: 'success'\r\n });\r\n } else if (result === 'error') {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n\r\n handleImport = async (code: string) => {\r\n try {\r\n const result = await this.translatorService.ImportLanguage({code});\r\n this.props.fetchLanguages();\r\n this.showSnackbar('success');\r\n } catch (error) {\r\n this.showSnackbar('error');\r\n }\r\n }\r\n\r\n handleUpdate = async (code: string) => {\r\n try {\r\n const result = await this.translatorService.UpdateLanguage({code});\r\n this.props.fetchLanguages();\r\n this.showSnackbar('success');\r\n } catch (error) {\r\n this.showSnackbar('error');\r\n }\r\n }\r\n\r\n handleDelete = async (code: string) => {\r\n try {\r\n const result = await this.translatorService.DeleteLanguage({code});\r\n this.props.fetchLanguages();\r\n this.showSnackbar('success');\r\n } catch (error) {\r\n this.showSnackbar('error');\r\n }\r\n }\r\n \r\n renderActionsButtons(language: LanguageApi) {\r\n const buttonStyle = {\r\n display: 'flex',\r\n alignItems: 'center',\r\n textAlign: 'center',\r\n borderRadius: '0.5rem',\r\n margin: '0 5px',\r\n color: 'white',\r\n fontWeight: 'bold',\r\n } as React.CSSProperties;\r\n\r\n if (this.checkIfLocalLanguageExists(language)) {\r\n return (\r\n <>\r\n this.handleDelete(language.code)}>\r\n \r\n \r\n this.handleUpdate(language.code)}>\r\n \r\n \r\n \r\n );\r\n } else {\r\n return (\r\n this.handleImport(language.code)}>\r\n \r\n \r\n );\r\n }\r\n }\r\n\r\n render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n {this.renderActionsButtons(this.props.languageApi)}\r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nexport default withSnackbar(LanguageLocalCard);\r\n","import * as React from 'react';\r\nimport {\r\n Divider,\r\n List,\r\n ListItem,\r\n ListItemText,\r\n ListSubheader,\r\n Typography,\r\n Box,\r\n Grid,\r\n Container\r\n} from '@material-ui/core';\r\nimport LanguageApiCard from './LanguageApiCard';\r\nimport LanguageLocalCard from './LanguageLocalCard';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { AppContext, ApplicationContext } from '../../../context/Contexts';\r\nimport { AppState, ApplicationState } from '../../../store';\r\nimport { LanguageApi, LanguageLocal } from '../../../interfaces/Case';\r\nimport { ReferentialCode, RoleClaimsEnum } from '../../../helpers/Constants';\r\nimport { connect } from 'react-redux';\r\nimport { ProviderContext, withSnackbar } from 'notistack';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport Referentials from '../../../helpers/Referentials.json';\r\n\r\ninterface PoeditorState {\r\n isLoading: boolean;\r\n languagesApi: LanguageApi[];\r\n languagesLocal: LanguageLocal[];\r\n}\r\n\r\ntype PoeditorProps = { appState: AppState } & ProviderContext;\r\n\r\nclass PoEditor extends React.Component {\r\n private translatorService!: ITranslatorService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n constructor(props: PoeditorProps) {\r\n super(props);\r\n this.state = {\r\n isLoading: false, \r\n languagesApi: [],\r\n languagesLocal: []\r\n };\r\n }\r\n\r\n public componentDidMount() {\r\n console.log(this.props.appState);\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.fetchLanguagesList();\r\n }\r\n );\r\n }\r\n \r\n public hasRole = (roleCode: string): boolean => {\r\n return this.props.appState.appUser?.userRole?.code === roleCode;\r\n };\r\n\r\n fetchLanguagesList = async () => {\r\n try {\r\n const countryRef = Referentials.referential.find((item) => item.code === ReferentialCode.Country);\r\n const [languagesList, languages, countryList] = await Promise.all([\r\n await this.translatorService.GetLanguagesList(),\r\n await this.translatorService.GetLanguages(),\r\n this.appReferentialService.Get(countryRef!.baseUrl)\r\n ]);\r\n\r\n if (this.hasRight(RoleClaimsEnum.AdminCountryOrganization) && this.props.appState.appUser?.countryId) {\r\n const country = countryList.find((item: any) => item.id === this.props.appState.appUser?.countryId);\r\n this.setState({\r\n languagesApi: (languagesList.data as LanguageApi[]).filter((item: LanguageApi) => country?.code?.toLowerCase() == item.code.toLowerCase()) || [],\r\n languagesLocal: languages.data as LanguageLocal[],\r\n isLoading: false\r\n });\r\n } else {\r\n this.setState({ \r\n languagesApi: languagesList.data as LanguageApi[],\r\n languagesLocal: languages.data as LanguageLocal[],\r\n isLoading: false\r\n });\r\n }\r\n } catch (error) {\r\n console.log(error);\r\n }\r\n };\r\n\r\n public hasRight = (right: string): boolean => {\r\n return this.props.appState!.user!.profile.role.includes(right);\r\n };\r\n\r\n fetchLanguages = async () => {\r\n try {\r\n const result = await this.translatorService.GetLanguages();\r\n this.setState({ languagesLocal: result.data as LanguageLocal[] });\r\n } catch (error) {\r\n console.log(error);\r\n }\r\n }\r\n\r\n render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n \r\n Poditor\r\n \r\n \r\n {this.translatorService.Tranlate('AVAILABLE_LANGUAGES', 'Limbi disponibile')}\r\n \r\n\r\n \r\n \r\n \r\n \r\n {this.translatorService.Tranlate('LANGUAGES_ON_API', 'Limbi disponibile pe API')}\r\n \r\n \r\n \r\n \r\n {this.translatorService.Tranlate('LANGUAGES_ON_CARFIX', 'Limbi disponibile pe Carfix')}\r\n \r\n \r\n \r\n \r\n {this.state.languagesApi?.map((language: LanguageApi) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n \r\n \r\n \r\n ) : null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app\r\n }),\r\n null\r\n)(withSnackbar(PoEditor as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport {\r\n Tooltip,\r\n Box,\r\n Button,\r\n IconButton,\r\n Dialog,\r\n DialogTitle,\r\n Grid,\r\n Typography,\r\n DialogContent\r\n} from '@material-ui/core';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport AddCircleTwoToneIcon from '@material-ui/icons/AddCircleTwoTone';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ValidatorForm, TextValidator } from 'react-material-ui-form-validator';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport MUIDataTable, {\r\n SelectableRows,\r\n MUIDataTableMeta,\r\n MUIDataTableColumnOptions\r\n} from 'mui-datatables';\r\nimport { MUITranslations } from '../../../helpers/MUITableTranslations';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport DeleteOutlineTwoToneIcon from '@material-ui/icons/DeleteOutlineTwoTone';\r\nimport { ReferentialCode } from '../../../helpers/Constants';\r\nimport Referentials from '../../../helpers/Referentials.json';\r\nimport { ICaseService } from '../../../services/Interfaces/ICaseService';\r\nimport { IReferential } from '../../../interfaces/IReferential';\r\nimport moment from 'moment';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport EditOutlinedIcon from '@material-ui/icons/EditOutlined';\r\nimport { MaintenanceCupiOptionalPart } from '../../../interfaces/Case';\r\n\r\ninterface IMaintenanceCupiOptionalPartState {\r\n newMaintenanceCupiOptionalPart: MaintenanceCupiOptionalPart;\r\n maintenanceOptionList: IReferential[];\r\n maintenanceCupiOptionalPartList: MaintenanceCupiOptionalPart[];\r\n isLoading: boolean;\r\n isDialogOpen: boolean;\r\n newMaintenanceCupiOptionalPartId: number | null;\r\n}\r\n\r\ntype IMaintenanceCupiOptionalPartProps = { appState: AppState } & ProviderContext &\r\n RouteComponentProps<{ id: string; workflowId: string }>;\r\n\r\nclass MaintenanceCupiOptionalPartComponent extends React.PureComponent<\r\n IMaintenanceCupiOptionalPartProps,\r\n IMaintenanceCupiOptionalPartState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private caseService!: ICaseService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n\r\n static contextType = ApplicationContext;\r\n private newMaintenanceCupiOptionalPart = {\r\n id: 0,\r\n maintenanceOptionalId: 0,\r\n cupiCode: null\r\n } as unknown as MaintenanceCupiOptionalPart;\r\n\r\n state = {\r\n maintenanceCupiOptionalPartList: [],\r\n isLoading: false,\r\n selectedFilter: 0,\r\n isDialogOpen: false,\r\n newMaintenanceCupiOptionalPart: this.newMaintenanceCupiOptionalPart,\r\n maintenanceOptionList: [],\r\n newMaintenanceCupiOptionalPartId: null\r\n } as IMaintenanceCupiOptionalPartState;\r\n\r\n public componentDidMount() {\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadMaintenanceCupiOptionalPartList();\r\n }\r\n );\r\n }\r\n\r\n loadMaintenanceCupiOptionalPartList = async () => {\r\n const maintenanceCupiOptionalPartList = await this.caseService.MaintenanceCupiOptionalPartList();\r\n const ref = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.MaintenanceOption\r\n );\r\n const maintenanceOptionList = (await this.appReferentialService.Get(ref!.baseUrl)).filter((item) => item.isActive === true);\r\n\r\n this.setState({\r\n maintenanceCupiOptionalPartList: maintenanceCupiOptionalPartList,\r\n isLoading: false,\r\n maintenanceOptionList: maintenanceOptionList,\r\n newMaintenanceCupiOptionalPart: { ...this.newMaintenanceCupiOptionalPart }\r\n });\r\n };\r\n\r\n\r\n \r\n\r\n private handleMaintenanceOptionChange = (newValue: IReferential | null) => {\r\n this.setState({\r\n newMaintenanceCupiOptionalPart: {\r\n ...this.state.newMaintenanceCupiOptionalPart,\r\n maintenanceOption: newValue,\r\n maintenanceOptionId: newValue !== null ? newValue!.id : 0\r\n }\r\n });\r\n };\r\n\r\n private handleCupiCodeChange = (value: string) => {\r\n this.setState({\r\n newMaintenanceCupiOptionalPart: {\r\n ...this.state.newMaintenanceCupiOptionalPart,\r\n cupiCode: value\r\n }\r\n });\r\n };\r\n\r\n public saveMaintenanceCupiOptionalPart = async () => {\r\n if (this.state.newMaintenanceCupiOptionalPartId === null) {\r\n try {\r\n\r\n await this.caseService.AddMaintenanceCupiOptionalPart(this.state.newMaintenanceCupiOptionalPart);\r\n\r\n await this.loadMaintenanceCupiOptionalPartList();\r\n\r\n this.closeDialog();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n } else {\r\n try {\r\n\r\n await this.caseService.UpdateMaintenanceCupiOptionalPart(this.state.newMaintenanceCupiOptionalPart);\r\n\r\n await this.loadMaintenanceCupiOptionalPartList();\r\n\r\n this.closeDialog();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n\r\n public renderAddForm() {\r\n return (\r\n \r\n this.handleCupiCodeChange(e.target.value)}\r\n label={this.translatorService.Tranlate(\r\n 'MAINTENANCE_CUPI_PART_OPTIONAL_CUPI_CODE',\r\n 'Cod Cupi'\r\n )}\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n />\r\n\r\n \r\n this.handleMaintenanceOptionChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n \r\n {this.translatorService.Tranlate('EDIT_ORGANIZATION_CANCEL_BTN', 'Anuleaza')}\r\n \r\n \r\n
\r\n
\r\n );\r\n }\r\n\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'maintenanceOption',\r\n label: this.translatorService.Tranlate(\r\n 'MAINTENANCE_CUPI_PART_OPTIONAL_NAME',\r\n 'Denumire Piesa'\r\n ),\r\n options: {\r\n sort: true,\r\n customSort: (a: IReferential, b: IReferential) => {\r\n return a.name!.localeCompare(b.displayName!);\r\n },\r\n customBodyRender: (value: IReferential) => {\r\n return value ? value.displayName : '';\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'cupiCode',\r\n label: this.translatorService.Tranlate('MAINTENANCE_CUPI_PART_OPTIONAL_CUPI_CODE', 'Cod Cupi')\r\n },\r\n {\r\n name: 'dateModification',\r\n label: this.translatorService.Tranlate('USERS_DATE_MODIFICATION_HEADER', 'Data Modificare'),\r\n options: {\r\n filter: false,\r\n sortDirection: 'desc',\r\n customBodyRender: (value: Date) =>\r\n moment.utc(value).local().format(this.props.appState.longDateFormat)\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: '',\r\n options: {\r\n viewColumns: false,\r\n filter: false,\r\n setCellHeaderProps: () => ({ align: 'center' }),\r\n setCellProps: () => ({ align: 'center' }),\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n <>\r\n this.newMaintenanceCupiOptionalPartPopup(tableMeta.rowData[0])}\r\n >\r\n \r\n \r\n this.deleteMaintenanceCupiOptionalPart(e, tableMeta)}\r\n >\r\n \r\n \r\n \r\n );\r\n }\r\n }\r\n }];\r\n\r\n return columns;\r\n };\r\n\r\n deleteMaintenanceCupiOptionalPart = async (event: any, tableMeta: MUIDataTableMeta) => {\r\n try {\r\n const id = tableMeta.rowData[0];\r\n\r\n await this.caseService.RemoveMaintenanceCupiOptionalPart(id);\r\n await this.loadMaintenanceCupiOptionalPartList();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n\r\n newMaintenanceCupiOptionalPartPopup = async (maintenanceCupiOptionalPartId: number | null) => {\r\n let newMaintenanceCupiOptionalPart: MaintenanceCupiOptionalPart;\r\n if (maintenanceCupiOptionalPartId == null) {\r\n newMaintenanceCupiOptionalPart = { ...this.state.newMaintenanceCupiOptionalPart } as MaintenanceCupiOptionalPart;\r\n } else {\r\n newMaintenanceCupiOptionalPart = this.state.maintenanceCupiOptionalPartList.find((item) => item.id === maintenanceCupiOptionalPartId)!;\r\n }\r\n this.setState({\r\n isDialogOpen: true,\r\n newMaintenanceCupiOptionalPart: newMaintenanceCupiOptionalPart,\r\n newMaintenanceCupiOptionalPartId: maintenanceCupiOptionalPartId\r\n });\r\n };\r\n\r\n closeDialog = async () => {\r\n this.setState(\r\n { \r\n isDialogOpen: false, \r\n newMaintenanceCupiOptionalPart: this.newMaintenanceCupiOptionalPart \r\n }\r\n );\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n const options = {\r\n filter: true,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n sort: false,\r\n // responsive: \"stacked\",\r\n customToolbar: () => {\r\n return (\r\n \r\n this.newMaintenanceCupiOptionalPartPopup(null)}\r\n >\r\n \r\n \r\n \r\n );\r\n }\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n ) : null}\r\n
\r\n {this.state.isDialogOpen ? (\r\n \r\n \r\n \r\n \r\n \r\n {!this.state.newMaintenanceCupiOptionalPartId ? \r\n this.translatorService.Tranlate(\r\n 'MAINTENANCE_CUPI_PART_OPTIONAL_ADD_MODAL_TITLE',\r\n 'Adauga Cod Cupi'\r\n ) : this.translatorService.Tranlate(\r\n 'MAINTENANCE_CUPI_PART_OPTIONAL_UPDATE_MODAL_TITLE',\r\n 'Actualizeaza Cod Cupi'\r\n )} \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.renderAddForm()}\r\n ) : null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app\r\n }),\r\n null\r\n)(withSnackbar(MaintenanceCupiOptionalPartComponent as any));\r\n","import * as React from 'react';\r\nimport { ApplicationState, AppState } from '../../store';\r\nimport { ApplicationContext, AppContext } from '../../context/Contexts';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n Card,\r\n Grid,\r\n Tab,\r\n Tabs,\r\n AppBar,\r\n TextField,\r\n Button,\r\n Checkbox,\r\n FormControlLabel,\r\n CircularProgress,\r\n Dialog,\r\n DialogContent,\r\n Modal,\r\n DialogContentText,\r\n DialogActions\r\n} from '@material-ui/core';\r\nimport TabPanel from '../_shared/Tabs';\r\nimport MUIDataTable, {\r\n MUIDataTableColumnOptions,\r\n MUIDataTableMeta,\r\n SelectableRows\r\n} from 'mui-datatables';\r\nimport { MUITranslations } from '../../helpers/MUITableTranslations';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport {\r\n MavoVoInvoiceFilters,\r\n MavoVoInvoicesList,\r\n MavoVehicleInvoice,\r\n MavoVoInvoiceExportFilters,\r\n MavoVehicleCreateInvoiceRequestDto,\r\n DownloadResultsRequest,\r\n CreateEInvoiceRequest\r\n} from '../../interfaces/Vehicle';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport Loader from '../Loader';\r\nimport noop from 'lodash/noop';\r\nimport _ from 'lodash';\r\nimport moment from 'moment';\r\nimport MomentUtils from '@date-io/moment';\r\nimport { MavoVehicleActionCreators } from '../../store/actions/MavoVehicle';\r\nimport { MavoVehicleState } from '../../store/reducers/MavoVehicle';\r\nimport NumberFormat from 'react-number-format';\r\nimport { VehicleAuctionActionCreators } from '../../store/actions/VehicleAuction';\r\nimport { AppUser } from '../../interfaces/AppUser';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport { DatePicker, MuiPickersUtilsProvider } from '@material-ui/pickers';\r\nimport { MaterialUiPickersDate } from '@material-ui/pickers/typings/date';\r\nimport FileSaver from 'file-saver';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { EInvoiceStatusEnum, InvoiceTypeCodeEnum, MavoVehicleInvoiceStatusEnum, ReportTypeCode, RoleClaimsEnum } from '../../helpers/Constants';\r\nimport {MuiThemeProvider, createMuiTheme } from '@material-ui/core';\r\nimport { Organization } from '../../interfaces/Organization';\r\n\r\nclass LocalizedUtils extends MomentUtils {\r\n // dateFormat = \"DD MM YYYY\";\r\n}\r\n\r\ntype VoInvoiceHistoryProps = {\r\n appState: AppState;\r\n mavoVehicleState: MavoVehicleState\r\n} &\r\n typeof MavoVehicleActionCreators & typeof VehicleAuctionActionCreators &\r\n ProviderContext &\r\n RouteComponentProps;\r\n\r\ninterface IVoInvoiceHistoryState {\r\n invoicesList: MavoVoInvoicesList;\r\n selectedOrganizationEntities: Organization[];\r\n organizationList: Organization[];\r\n statusEntities: IReferential[];\r\n selectedStatusEntities: IReferential[];\r\n selectedStartDate: Date | null;\r\n selectedEndDate: Date | null;\r\n invoiceNumber: string;\r\n selectedTab: number;\r\n isLoading: boolean;\r\n isLoadingInvoices: boolean;\r\n count: number;\r\n page: number;\r\n pageSize: number;\r\n executing: boolean;\r\n selectedInvoice: MavoVehicleInvoice | null;\r\n isLoadingExport: boolean;\r\n isLoadingNotice: boolean;\r\n isLoadingInvoice: boolean;\r\n isLoadingBackToStock: boolean;\r\n isLoadingEInvoice: boolean;\r\n isLoadingResendInvoice: boolean;\r\n isModalOpen: boolean;\r\n}\r\n\r\nclass VoInvoiceHistory extends React.PureComponent {\r\n private cbContext!: AppContext;\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n invoicesList: {} as MavoVoInvoicesList,\r\n selectedOrganizationEntities: this.props.appState!.user!.profile.role.includes(RoleClaimsEnum.MavoAgent) ? [this.props.appState.appUser?.organization as Organization] : [],\r\n organizationList: [],\r\n provenanceEntities: [],\r\n selectedProvenanceEntities: [],\r\n statusEntities: [],\r\n selectedStatusEntities: [],\r\n selectedStartDate: null,\r\n selectedEndDate: null,\r\n invoiceNumber: '',\r\n selectedTab: 0,\r\n isLoading: false,\r\n isLoadingInvoices: false,\r\n count: 1,\r\n page: 0,\r\n pageSize: 10,\r\n executing: false,\r\n isDialogOpen: false,\r\n isOfferDialogOpen: false,\r\n selectedInvoice: null,\r\n isLoadingExport: false,\r\n isLoadingInvoice: false,\r\n isLoadingNotice: false,\r\n isLoadingBackToStock: false,\r\n isLoadingEInvoice: false,\r\n isLoadingResendInvoice: false,\r\n isModalOpen: false\r\n } as IVoInvoiceHistoryState;\r\n\r\n public async componentDidMount() {\r\n this.setState({\r\n isLoading: true\r\n });\r\n\r\n const mavoInvoicesFilters = {\r\n organizationIds: this.state.selectedOrganizationEntities.map((item) => item.id),\r\n statusIds: [],\r\n startDate: null,\r\n endDate: null,\r\n invoiceNumber: '',\r\n page: this.state.page + 1,\r\n pageSize: this.state.pageSize\r\n } as MavoVoInvoiceFilters;\r\n\r\n const [invoicesList, invoicesFilters] = await Promise.all([\r\n this.cbContext.vehicleService.GetMavoInvoices(mavoInvoicesFilters),\r\n this.cbContext.vehicleService.GetMavoInvoicesFilters({\r\n organizationIds: this.state.selectedOrganizationEntities.map((item) => item.id),\r\n statusIds: [],\r\n startDate: null,\r\n endDate: null,\r\n invoiceNumber: '',\r\n } as MavoVoInvoiceFilters)\r\n ]);\r\n const organizationList = await this.cbContext.organizationService.GetUserOrganizationsByIds(invoicesFilters.organizationList);\r\n \r\n this.setState(\r\n {\r\n invoicesList: invoicesList,\r\n count: invoicesList.total,\r\n page: invoicesList.page - 1,\r\n statusEntities: invoicesFilters.statusList,\r\n organizationList: organizationList,\r\n isLoading: false\r\n }\r\n );\r\n }\r\n\r\n isInternal = (): boolean | null => {\r\n if (this.state.selectedTab === 0) {\r\n return null;\r\n }\r\n if (this.state.selectedTab === 1) {\r\n return false;\r\n }\r\n\r\n return true;\r\n };\r\n\r\n loadInvoices = async (page: number, rowsPerPage: number) => {\r\n this.setState({\r\n isLoadingInvoices: true,\r\n selectedInvoice: null \r\n });\r\n\r\n const mavoInvoicesFilters = {\r\n statusIds: this.state.selectedStatusEntities.map((item) => item.id),\r\n organizationIds: this.state.selectedOrganizationEntities.map((item) => item.id),\r\n startDate: this.state.selectedStartDate\r\n ? new Date(this.state.selectedStartDate.setHours(0, 0, 0, 0))\r\n : null,\r\n endDate: this.state.selectedEndDate\r\n ? new Date(this.state.selectedEndDate.setHours(23, 59, 59, 999))\r\n : null,\r\n invoiceNumber: this.state.invoiceNumber,\r\n page: page + 1,\r\n pageSize: rowsPerPage\r\n } as MavoVoInvoiceFilters;\r\n\r\n const invoicesList = await this.cbContext.vehicleService.GetMavoInvoices(mavoInvoicesFilters);\r\n \r\n this.setState({\r\n invoicesList: invoicesList,\r\n page: invoicesList.page - 1,\r\n pageSize: rowsPerPage,\r\n count: invoicesList.total,\r\n isLoadingInvoices: false\r\n });\r\n };\r\n\r\n makeSelectedInvoice = (isSelected: boolean, id: number) => {\r\n const invoices = _.cloneDeep(this.state.invoicesList.invoices);\r\n const invoice = invoices.find((item) => item.id === id);\r\n if (invoice) {\r\n invoice.isSelected = isSelected;\r\n }\r\n\r\n if (isSelected) {\r\n invoices.forEach((item) => {\r\n if (item.id !== id) {\r\n item.isSelected = false;\r\n } \r\n });\r\n }\r\n this.setState({\r\n invoicesList: {\r\n ...this.state.invoicesList,\r\n invoices: invoices\r\n },\r\n selectedInvoice: isSelected ? (invoice ? invoice : null): null\r\n });\r\n }\r\n\r\n getMuiTheme = () => createMuiTheme({\r\n overrides: {\r\n MuiTableCell: {\r\n head: {\r\n paddingLeft: \"2px\",\r\n paddingRight: \"2px\",\r\n paddingTop: \"2px\",\r\n paddingBottom: \"2px\"\r\n },\r\n },\r\n MUIDataTableBodyCell: {\r\n stackedCommon: {\r\n paddingLeft: \"2px\",\r\n paddingRight: \"2px\",\r\n paddingTop: \"0px\",\r\n paddingBottom: \"0px\",\r\n height: \"40px !important\"\r\n }\r\n },\r\n MuiCheckbox: {\r\n root: {\r\n padding: \"0px\", // Adjust the padding to make the checkbox smaller\r\n },\r\n colorSecondary: {\r\n '&.Mui-checked': {\r\n color: \"#3d4977 !important\",\r\n '&:hover': {\r\n backgroundColor: 'rgba(0, 0, 0, 0.03) !important'\r\n },\r\n },\r\n '&:hover': {\r\n backgroundColor: 'rgba(0, 0, 0, 0.03) !important'\r\n }\r\n }\r\n }\r\n } as any\r\n });\r\n\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'id',\r\n label: ' ',\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: any, tableMeta: MUIDataTableMeta) => {\r\n const invoice = this.state.invoicesList.invoices.find((item) => item.id === tableMeta.rowData[0]);\r\n return (\r\n \r\n \r\n
\r\n {\r\n this.makeSelectedInvoice(e.target.checked, invoice!.id);\r\n }}\r\n >\r\n }\r\n label=''\r\n />\r\n
\r\n
\r\n
\r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'mavoVehicle.vin',\r\n label: this.cbContext.translatorService.Tranlate('MAVO_VEHICLES_VEHICLE_VIN_CODE', 'VIN'),\r\n options: {\r\n sort: false\r\n }\r\n },\r\n {\r\n name: 'mavoVehicle.make.displayName',\r\n label: this.cbContext.translatorService.Tranlate('VEHICLES_VEHICLE_MAKE', 'Marca'),\r\n options: {\r\n sort: false\r\n }\r\n },\r\n {\r\n name: 'mavoVehicle.model.displayName',\r\n label: this.cbContext.translatorService.Tranlate('VEHICLES_VEHICLE_MODEL', 'Model'),\r\n options: {\r\n sort: false\r\n }\r\n }, \r\n {\r\n name: 'mavoVehicle.fabricationYear',\r\n label: this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLE_INVOICE_FABRICATION_YEAR',\r\n 'An fabr'\r\n ),\r\n options: {\r\n sort: false\r\n }\r\n }, \r\n {\r\n name: 'price',\r\n label: this.cbContext.translatorService.Tranlate('MAVO_VEHICLES_VEHICLE_INVOICE_RON_PRICE', 'Pret vanzare (lei)'),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: any, tableMeta: MUIDataTableMeta) => {\r\n const invoice = this.state.invoicesList.invoices.find((item) => item.id === tableMeta.rowData[0]);\r\n return (\r\n \r\n \r\n {invoice != null ? (invoice.price).toFixed(2) : null}\r\n \r\n \r\n )\r\n }\r\n }\r\n },\r\n {\r\n name: 'invoiceNumber',\r\n label: this.cbContext.translatorService.Tranlate('MAVO_VEHICLES_VEHICLE_INVOICE_NUMBER', 'Nr factura'),\r\n options: {\r\n sort: false\r\n }\r\n },\r\n {\r\n name: 'invoiceDate',\r\n label: this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_VEHICLE_INVOICE_DATE',\r\n 'Data factura'\r\n ),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: any) => {\r\n return (\r\n \r\n \r\n
\r\n {value\r\n ? moment\r\n .utc(value)\r\n .local()\r\n .format(this.props.appState.dateFormat)\r\n : null}\r\n
\r\n
\r\n
\r\n );\r\n }\r\n }\r\n }, \r\n {\r\n name: 'invoiceStatus.displayName',\r\n label: this.cbContext.translatorService.Tranlate('MAVO_VEHICLES_VEHICLE_INVOICE_STATE', 'Stare factura'),\r\n options: {\r\n sort: false\r\n }\r\n },\r\n {\r\n name: 'anafIndexUpload',\r\n label: this.cbContext.translatorService.Tranlate('MAVO_INVOICE_ANAF_INDEX', 'Index Anaf'),\r\n options: {\r\n sort: false\r\n }\r\n },\r\n {\r\n name: 'anafDownloadId',\r\n label: this.cbContext.translatorService.Tranlate('MAVO_INVOICE_ANAF_DOWNLOAD', 'Id descarcare Anaf'),\r\n options: {\r\n sort: false\r\n }\r\n },\r\n {\r\n name: 'anafStatus',\r\n label: this.cbContext.translatorService.Tranlate('MAVO_VEHICLES_VEHICLE_E_INVOICE_STATE', 'Stare E-factura'),\r\n options: {\r\n sort: false,\r\n customBodyRender: (anafStatus: IReferential | null) => {\r\n return anafStatus ? anafStatus.displayName : null;\r\n }\r\n }\r\n \r\n }\r\n ];\r\n\r\n return columns;\r\n };\r\n\r\n sortFunction = (a: any, b: any) => {\r\n return a.order - b.order;\r\n };\r\n\r\n onTabChange = (event: any, newValue: number) => {\r\n this.setState(\r\n {\r\n selectedTab: newValue,\r\n page: 0\r\n },\r\n async () => await this.loadInvoices(0, this.state.pageSize)\r\n );\r\n };\r\n\r\n\r\n\r\n renderSearchButtons() {\r\n return (\r\n
\r\n
\r\n this.loadInvoices(this.state.page, this.state.pageSize)}\r\n >\r\n {this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_VEHICLE_SEARCH',\r\n 'Cautare'\r\n )}\r\n \r\n
\r\n
\r\n this.resetFilters()}\r\n >\r\n {this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_VEHICLE_RESET',\r\n 'Reset'\r\n )}\r\n \r\n
\r\n
\r\n\r\n );\r\n }\r\n\r\n resetFilters = async () => {\r\n this.setState({\r\n selectedStatusEntities: [],\r\n selectedOrganizationEntities: this.hasRight(RoleClaimsEnum.MavoAgent) ? this.state.selectedOrganizationEntities : [],\r\n selectedStartDate: null,\r\n selectedEndDate: null,\r\n invoiceNumber: ''\r\n }, async () => {\r\n await this.loadInvoices(this.state.page, this.state.pageSize);\r\n });\r\n };\r\n\r\n NumberFormatCustom = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n },\r\n currentTarget: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n allowNegative={false}\r\n thousandSeparator={false}\r\n decimalScale={2}\r\n />\r\n );\r\n };\r\n \r\n handleOrganizationChange = (newValue: any[]) => {\r\n this.setState(\r\n {\r\n selectedOrganizationEntities: newValue\r\n }\r\n );\r\n };\r\n\r\n handleStatusEntitiesChange = (newValue: any[]) => {\r\n this.setState(\r\n {\r\n selectedStatusEntities: newValue\r\n }\r\n );\r\n };\r\n\r\n handleStartDateChange = async (date: MaterialUiPickersDate | null, value?: string | null) => {\r\n if (date === null || !date.isValid) {\r\n return;\r\n }\r\n this.setState(\r\n {\r\n selectedStartDate: date!.toDate(),\r\n isLoading: false\r\n }\r\n );\r\n };\r\n\r\n handleEndDateChange = async (date: MaterialUiPickersDate | null, value?: string | null) => {\r\n if (date === null || !date.isValid) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n selectedEndDate: date!.toDate(),\r\n isLoading: false\r\n }\r\n );\r\n };\r\n\r\n renderFilters = () => {\r\n return (\r\n
\r\n \r\n \r\n \r\n this.handleOrganizationChange(newValue)}\r\n getOptionLabel={(option: Organization) => option.name || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n \r\n\r\n
\r\n {\r\n this.setState({\r\n invoiceNumber: e.target.value\r\n });\r\n }}\r\n validators={['required']}\r\n label={this.cbContext.translatorService.Tranlate('MAVO_VEHICLES_VEHICLE_INVOICE_NUMBER', 'Nr factura')}\r\n />\r\n
\r\n
\r\n \r\n \r\n this.handleStatusEntitiesChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n );\r\n };\r\n\r\n renderAgentMavoFilters = () => {\r\n return (\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n {\r\n this.setState({\r\n invoiceNumber: e.target.value\r\n });\r\n }}\r\n validators={['required']}\r\n label={this.cbContext.translatorService.Tranlate('MAVO_VEHICLES_VEHICLE_INVOICE_NUMBER', 'Nr factura')}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n this.handleStatusEntitiesChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n \r\n
\r\n );\r\n };\r\n\r\n tableOptions = () => {\r\n return {\r\n sort: true,\r\n filter: false,\r\n search: false,\r\n viewColumns: false,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.cbContext.translatorService),\r\n elevation: 0,\r\n serverSide: true,\r\n count: this.state.count,\r\n rowsPerPage: this.state.pageSize,\r\n page: this.state.page,\r\n onTableChange: async (action: any, tableState: any) => {\r\n switch (action) {\r\n case 'changePage':\r\n await this.loadInvoices(tableState.page, tableState.rowsPerPage);\r\n break;\r\n case 'changeRowsPerPage':\r\n await this.loadInvoices(tableState.page, tableState.rowsPerPage);\r\n break;\r\n case 'sort':\r\n break;\r\n default:\r\n }\r\n }\r\n };\r\n };\r\n\r\n handleBackToStock = async () => {\r\n if (!this.state.selectedInvoice) {\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('PLEASE_SELECT_LINE', 'Va rugam sa selectati o linie!'), {\r\n variant: 'warning'\r\n });\r\n return;\r\n }\r\n\r\n if (!this.state.selectedInvoice.invoiceStatus) {\r\n return;\r\n }\r\n\r\n if (this.state.selectedInvoice.invoiceStatus!.code === MavoVehicleInvoiceStatusEnum.STORNO.toString() \r\n || this.state.selectedInvoice.invoiceStatus!.code === MavoVehicleInvoiceStatusEnum.STORNATA.toString()) {\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('INVOICE_BACK_TO_STOCK_WARNING', 'Operatia este disponibila doar pentru facturile in stare Valida!'), {\r\n variant: 'warning'\r\n });\r\n return;\r\n }\r\n\r\n this.setState({isLoadingBackToStock: true});\r\n\r\n try {\r\n const request = {\r\n mavoVehicleOrderId: this.state.selectedInvoice.mavoVehicleOrderId,\r\n organizationId: this.state.selectedInvoice.mavoVehicleOrder.organizationId ?? null,\r\n invoiceId: this.state.selectedInvoice.id\r\n } as MavoVehicleCreateInvoiceRequestDto;\r\n \r\n const response = await this.cbContext.vehicleService.CancelInvoiceMavoVehicle(ReportTypeCode.RENAULT_FACTURA_LIVRARE, request);\r\n\r\n const eInvoiceResponse = await this.cbContext.vehicleService.CreateEInvoice({\r\n orderId: this.state.selectedInvoice.mavoVehicleOrderId,\r\n invoiceId: response.id,\r\n invoiceTypeCode: InvoiceTypeCodeEnum.FACTURA.toString()\r\n } as CreateEInvoiceRequest);\r\n if (eInvoiceResponse && eInvoiceResponse.statusMessage) {\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate(eInvoiceResponse.statusMessage, eInvoiceResponse.statusMessage), {\r\n variant: 'warning'\r\n });\r\n }\r\n\r\n this.setState({\r\n isLoadingBackToStock: false,\r\n isModalOpen: false\r\n });\r\n\r\n this.loadInvoices(this.state.page, this.state.pageSize);\r\n\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch {\r\n this.setState({\r\n isLoadingBackToStock: false,\r\n isModalOpen: false\r\n });\r\n\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n\r\n handlePrintNotice = async () => {\r\n if (!this.state.selectedInvoice) {\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('PLEASE_SELECT_LINE', 'Va rugam sa selectati o linie!'), {\r\n variant: 'warning'\r\n });\r\n return;\r\n }\r\n\r\n if (!this.state.selectedInvoice.invoiceStatus) {\r\n return;\r\n }\r\n\r\n if (this.state.selectedInvoice.invoiceStatus!.code === MavoVehicleInvoiceStatusEnum.STORNO.toString()) {\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('INVOICE_PRINT_NOTICE_FOR_STORNO_INVOICE', 'Se pot tipari doar avizele care au factura Valida sau Stornata!'), {\r\n variant: 'warning'\r\n });\r\n return;\r\n }\r\n\r\n this.setState({ isLoadingNotice: true });\r\n try {\r\n const fileBlob = await this.cbContext.vehicleService.PrintMavoVehicleNoticeBasedInvoiceId(this.state.selectedInvoice.id);\r\n const file = new File([fileBlob], this.cbContext.translatorService.Tranlate('PRINT_NOTICE_NAME', 'Avizare plata bancara') + '.pdf', { type: 'application/pdf' });\r\n this.setState({ isLoadingNotice: false });\r\n\r\n FileSaver.saveAs(fileBlob, \"AvizarePlataBancara\" + '.pdf');\r\n const url = URL.createObjectURL(file);\r\n window.open(url, '_blank');\r\n } catch {\r\n this.setState({ isLoadingNotice: false });\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n\r\n handlePrintInvoice = async () => {\r\n if (!this.state.selectedInvoice) {\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('PLEASE_SELECT_LINE', 'Va rugam sa selectati o linie!'), {\r\n variant: 'warning'\r\n });\r\n return;\r\n }\r\n if (!this.state.selectedInvoice.invoiceStatus) {\r\n return;\r\n }\r\n\r\n if (this.state.selectedInvoice.invoiceStatus!.code === MavoVehicleInvoiceStatusEnum.STORNATA.toString()) {\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('INVOICE_PRINT_FOR_STORNATA_INVOICE', 'Nu pot fi tiparite decat facturi cu stare Valida sau Storno!'), {\r\n variant: 'warning'\r\n });\r\n return;\r\n }\r\n\r\n const isStorno = this.state.selectedInvoice.invoiceStatus!.code === MavoVehicleInvoiceStatusEnum.STORNO.toString();\r\n this.setState({ isLoadingInvoice: true });\r\n try {\r\n const fileBlob = await this.cbContext.vehicleService.PrintInvoice(this.state.selectedInvoice.id);\r\n const file = new File([fileBlob], this.cbContext.translatorService.Tranlate('PRINT_INVOICE_NAME', 'Factura livrare') + '.pdf', { type: 'application/pdf' });\r\n this.setState({ isLoadingInvoice: false });\r\n\r\n FileSaver.saveAs(fileBlob, isStorno ? \"FacturaLivrareStorno\" : \"FacturaLivrare\" + '.pdf');\r\n const url = URL.createObjectURL(file);\r\n window.open(url, '_blank');\r\n } catch {\r\n this.setState({ isLoadingInvoice: false });\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n\r\n handlePrintEInvoice = async () => {\r\n if (!this.state.selectedInvoice) {\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('PLEASE_SELECT_LINE', 'Va rugam sa selectati o linie!'), {\r\n variant: 'warning'\r\n });\r\n return;\r\n }\r\n if (!this.state.selectedInvoice.invoiceStatus) {\r\n return;\r\n }\r\n\r\n if (this.state.selectedInvoice.invoiceStatus!.code === MavoVehicleInvoiceStatusEnum.STORNATA.toString()) {\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('INVOICE_PRINT_FOR_STORNATA_INVOICE', 'Nu pot fi tiparite decat facturi cu stare Valida sau Storno!'), {\r\n variant: 'warning'\r\n });\r\n return;\r\n }\r\n \r\n if (!this.state.selectedInvoice.resultPath) {\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('INVOICE_NO_DOWNLOAD_ID', 'Nu exista id de descarcare anaf!'), {\r\n variant: 'warning'\r\n });\r\n return;\r\n }\r\n\r\n this.setState({ isLoadingEInvoice: true });\r\n try {\r\n const request = {\r\n filePath: this.state.selectedInvoice.resultPath\r\n } as DownloadResultsRequest;\r\n const response = await this.cbContext.vehicleService.DownloadResults(request);\r\n const byteArray = Uint8Array.from(atob(response.byteContent), char => char.charCodeAt(0));\r\n const file = new Blob([byteArray], { type: 'application/zip' });\r\n FileSaver.saveAs(file, response.name);\r\n this.setState({ isLoadingEInvoice: false }); \r\n } catch {\r\n this.setState({ isLoadingEInvoice: false });\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n } \r\n }\r\n\r\n handleSendToEInvoice = async () => {\r\n if (!this.state.selectedInvoice) {\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('PLEASE_SELECT_LINE', 'Va rugam sa selectati o linie!'), {\r\n variant: 'warning'\r\n });\r\n return;\r\n }\r\n\r\n if (!this.state.selectedInvoice.invoiceStatus) {\r\n return;\r\n }\r\n\r\n if (this.state.selectedInvoice.invoiceStatus!.code === MavoVehicleInvoiceStatusEnum.STORNATA.toString()) {\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('INVOICE_PRINT_FOR_STORNATA_INVOICE', 'Nu pot fi tiparite decat facturi cu stare Valida sau Storno!'), {\r\n variant: 'warning'\r\n });\r\n return;\r\n }\r\n\r\n this.setState({ isLoadingInvoices: true });\r\n try {\r\n const eInvoiceResponse = await this.cbContext.vehicleService.CreateEInvoice({\r\n invoiceId: this.state.selectedInvoice.id,\r\n orderId: this.state.selectedInvoice.mavoVehicleOrderId,\r\n invoiceTypeCode: InvoiceTypeCodeEnum.FACTURA_CORECTATA.toString()\r\n } as CreateEInvoiceRequest);\r\n if (eInvoiceResponse.statusMessage) {\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate(eInvoiceResponse.statusMessage, eInvoiceResponse.statusMessage), {\r\n variant: 'warning'\r\n });\r\n }\r\n \r\n this.loadInvoices(this.state.page, this.state.pageSize);\r\n this.setState({ isLoadingInvoices: false });\r\n } catch {\r\n this.setState({ isLoadingInvoices: false });\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n } \r\n }\r\n\r\n handleExportInvoices = async () => {\r\n try {\r\n this.setState({\r\n isLoadingExport: true\r\n });\r\n const mavoInvoicesFilters = {\r\n organizationIds: this.state.selectedOrganizationEntities.map((item) => item.id),\r\n statusIds: this.state.selectedStatusEntities.map((item) => item.id),\r\n startDate: this.state.selectedStartDate\r\n ? new Date(this.state.selectedStartDate.setHours(0, 0, 0, 0))\r\n : null,\r\n endDate: this.state.selectedEndDate\r\n ? new Date(this.state.selectedEndDate.setHours(23, 59, 59, 999))\r\n : null,\r\n invoiceNumber: this.state.invoiceNumber\r\n } as MavoVoInvoiceExportFilters;\r\n const fileBlob = await this.cbContext.vehicleService.ExportInvoices(mavoInvoicesFilters);\r\n FileSaver.saveAs(fileBlob, 'Export VO Facturat' + '.xlsx');\r\n this.setState({\r\n isLoadingExport: false\r\n });\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (err: any) {\r\n this.setState({\r\n isLoadingExport: false\r\n });\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n\r\n public hasRight = (right: string): boolean => {\r\n return this.props.appState!.user!.profile.role.includes(right);\r\n };\r\n\r\n public disabledResendInvoice = () : boolean => {\r\n if (!this.state.selectedInvoice) {\r\n return true;\r\n }\r\n\r\n if (this.state.selectedInvoice.anafStatus && (this.state.selectedInvoice.anafStatus.code === EInvoiceStatusEnum.PENDING.toString() || this.state.selectedInvoice.anafStatus.code === EInvoiceStatusEnum.VERIFICATION_SUCCESS.toString())) {\r\n return true;\r\n }\r\n\r\n return false;\r\n };\r\n\r\n public disabledPrintEInvoice = () : boolean => {\r\n if (!this.state.selectedInvoice) {\r\n return true;\r\n }\r\n\r\n if (!this.state.selectedInvoice.anafStatus) {\r\n return true;\r\n }\r\n\r\n return false; \r\n }\r\n\r\n renderMavoInvoicesButtons() {\r\n return (\r\n
\r\n
\r\n {!this.hasRight(RoleClaimsEnum.MavoAgent) ? (\r\n \r\n {this.state.isLoadingBackToStock && (\r\n \r\n )}\r\n {this.cbContext.translatorService.Tranlate(\r\n 'RETURN_STOCK',\r\n 'Retur Stoc'\r\n )}\r\n \r\n ) : ''}\r\n
\r\n
\r\n \r\n {this.state.isLoadingNotice && (\r\n \r\n )}\r\n {this.cbContext.translatorService.Tranlate(\r\n 'PRINT_NOTICE',\r\n 'Tiparire aviz'\r\n )}\r\n \r\n
\r\n
\r\n \r\n {this.state.isLoadingInvoice && (\r\n \r\n )}\r\n {this.cbContext.translatorService.Tranlate(\r\n 'PRINT_INVOICE',\r\n 'Tiparire factura'\r\n )}\r\n \r\n
\r\n
\r\n \r\n {this.state.isLoadingEInvoice && (\r\n \r\n )}\r\n {this.cbContext.translatorService.Tranlate(\r\n 'PRINT_EINVOICE',\r\n 'Tiparire e-factura'\r\n )}\r\n \r\n
\r\n
\r\n \r\n {this.state.isLoadingResendInvoice && (\r\n \r\n )}\r\n {this.cbContext.translatorService.Tranlate(\r\n 'RESEND_EINVOICE',\r\n 'Reincarca in e-factura'\r\n )}\r\n \r\n
\r\n
\r\n {!this.hasRight(RoleClaimsEnum.MavoAgent) ? (\r\n \r\n {this.cbContext.translatorService.Tranlate(\r\n 'EXPORT_DATA',\r\n 'Export'\r\n )}\r\n \r\n ) : ''}\r\n
\r\n
\r\n );\r\n }\r\n\r\n handleOpenConfirmationDialog = () => {\r\n if (!this.state.selectedInvoice) {\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('PLEASE_SELECT_LINE', 'Va rugam sa selectati o linie!'), {\r\n variant: 'warning'\r\n });\r\n return;\r\n }\r\n\r\n if (!this.state.selectedInvoice.invoiceStatus) {\r\n return;\r\n }\r\n\r\n if (this.state.selectedInvoice.invoiceStatus!.code === MavoVehicleInvoiceStatusEnum.STORNO.toString() \r\n || this.state.selectedInvoice.invoiceStatus!.code === MavoVehicleInvoiceStatusEnum.STORNATA.toString()) {\r\n this.props.enqueueSnackbar(this.cbContext.translatorService.Tranlate('INVOICE_BACK_TO_STOCK_WARNING', 'Operatia este disponibila doar pentru facturile in stare Valida!'), {\r\n variant: 'warning'\r\n });\r\n return;\r\n }\r\n\r\n this.setState({\r\n isModalOpen: true\r\n });\r\n };\r\n\r\n handleCloseModal = () => {\r\n this.setState({\r\n isModalOpen: false\r\n });\r\n };\r\n\r\n public render() {\r\n this.cbContext = this.context as AppContext;\r\n\r\n if (this.state.isLoading) {\r\n return ;\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n \r\n
\r\n {this.renderMavoInvoicesButtons()}\r\n
\r\n \r\n
\r\n {this.hasRight(RoleClaimsEnum.MavoAgent) ? this.renderAgentMavoFilters() : this.renderFilters()}\r\n {this.renderSearchButtons()}\r\n {this.state.isLoadingInvoices ? (\r\n \r\n ) : (\r\n \r\n \r\n \r\n )} \r\n \r\n \r\n \r\n \r\n {`${this.cbContext.translatorService.Tranlate(\r\n 'STOCK_RETURN_CONFIRMATION',\r\n 'Sunteți sigur că doriți să stornați? '\r\n )} `}\r\n \r\n \r\n \r\n \r\n {this.state.isLoadingBackToStock && (\r\n \r\n )}\r\n {this.cbContext.translatorService.Tranlate('VEHICLE_SEARCH_FORM_VEHICLE_YES', 'Da')}\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n}\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app,\r\n mavoVehicleState: state.mavoVehicle\r\n }),\r\n{ ...MavoVehicleActionCreators }\r\n)(withSnackbar(VoInvoiceHistory as any));","import React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n ApplicationState,\r\n AppUserAdminActionCreators,\r\n AppUserAdminState,\r\n AppState\r\n} from '../../../store';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport MUIDataTable, {\r\n SelectableRows,\r\n MUIDataTableColumnOptions,\r\n MUIDataTableMeta\r\n} from 'mui-datatables';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { IconButton, Box, Switch, Button, Tooltip } from '@material-ui/core';\r\nimport AddCircleTwoToneIcon from '@material-ui/icons/AddCircleTwoTone';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { IAppUserService } from '../../../services/Interfaces/IAppUserService';\r\nimport { AppUser } from '../../../interfaces/AppUser';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { Organization } from '../../../interfaces/Organization';\r\nimport moment from 'moment';\r\nimport { MUITranslations } from '../../../helpers/MUITableTranslations';\r\n\r\ntype UsersTabProps = {\r\n appUserAdminState: AppUserAdminState;\r\n appState: AppState;\r\n} & ProviderContext &\r\n typeof AppUserAdminActionCreators &\r\n RouteComponentProps;\r\n\r\ninterface IUsersTabState {\r\n users: AppUser[];\r\n isLoading: boolean;\r\n}\r\nclass MavoUsersTab extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private appUserService!: IAppUserService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n users: [],\r\n isLoading: false\r\n } as IUsersTabState;\r\n\r\n public componentDidMount() {\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadUsers();\r\n }\r\n );\r\n }\r\n\r\n loadUsers = async () => {\r\n const userList = await this.appUserService.GetMavoUserAppUsers();\r\n\r\n this.setState({\r\n users: userList.users,\r\n isLoading: false\r\n });\r\n };\r\n\r\n handleUserActiveChange = async (\r\n event: React.ChangeEvent,\r\n tableMeta: MUIDataTableMeta\r\n ) => {\r\n const id = tableMeta.rowData[0];\r\n const usersClone = [...this.state.users];\r\n const updUser = usersClone.find((item) => item.id === id);\r\n\r\n if (updUser !== undefined) {\r\n updUser.isActive = event.target.checked;\r\n\r\n try {\r\n await this.appUserService.UpdateUser(updUser);\r\n this.setState({\r\n users: usersClone\r\n });\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n\r\n onRowClick = (e: any, id: string) => {\r\n this.props.history.push('/admin/mavo/users/' + id);\r\n };\r\n\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'email',\r\n label: this.translatorService.Tranlate('USERS_EMAIL_HEADER', 'Email'),\r\n options: {\r\n filter: false,\r\n customBodyRender: (value: string, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.onRowClick(e, tableMeta.rowData[0])}\r\n >\r\n {value}\r\n \r\n );\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'lastName',\r\n label: this.translatorService.Tranlate('USERS_LAST_NAME_HEADER', 'Nume'),\r\n options: {\r\n filter: false\r\n }\r\n },\r\n {\r\n name: 'firstName',\r\n label: this.translatorService.Tranlate('USERS_FIRST_NAME_HEADER', 'Prenume'),\r\n options: {\r\n filter: false\r\n }\r\n },\r\n {\r\n name: 'organization',\r\n label: this.translatorService.Tranlate('USERS_ORGANIZATION_HEADER', 'Organizatie'),\r\n options: {\r\n customBodyRender: (value: Organization) => {\r\n return value.hoName;\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'updatedByUserFullName',\r\n label: this.translatorService.Tranlate('USERS_UPDATEDBY_HEADER', 'Modificat de')\r\n },\r\n {\r\n name: 'dateModification',\r\n label: this.translatorService.Tranlate('USERS_DATE_MODIFICATION_HEADER', 'Data MOdificare'),\r\n\r\n options: {\r\n sortDirection: 'desc',\r\n customBodyRender: (value: Date) =>\r\n moment.utc(value).local().format(this.props.appState.longDateFormat)\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'isActive',\r\n label: this.translatorService.Tranlate('USERS_IS_ACTIVE_HEADER', 'Activ'),\r\n options: {\r\n filterOptions: {\r\n names: [\r\n this.translatorService.Tranlate('TABLE_IS_ACTIVE_COLUMN_ACTIVE', 'Activ'),\r\n this.translatorService.Tranlate('TABLE_IS_ACTIVE_COLUMN_INACTIVE', 'Inactiv')\r\n ],\r\n logic(isActive: any, filterVal: string[]) {\r\n const show =\r\n (filterVal.indexOf(this.names[0]) !== -1 && isActive === true) ||\r\n (filterVal.indexOf(this.names[1]) !== -1 && isActive === false);\r\n return !show;\r\n }\r\n },\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.handleUserActiveChange(e, tableMeta)}\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n );\r\n }\r\n }\r\n }\r\n ];\r\n\r\n return columns;\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.appUserService = (this.context as AppContext).appUserService;\r\n\r\n const options = {\r\n filter: true,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n // responsive: \"stacked\",\r\n customToolbar: () => {\r\n return (\r\n \r\n {\r\n this.props.history.push('/admin/mavo/users/new');\r\n }}\r\n >\r\n \r\n \r\n \r\n );\r\n }\r\n };\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n ) : null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appUserAdminState: state.appUserAdmin,\r\n appState: state.app\r\n }),\r\n AppUserAdminActionCreators // Selects which action creators are merged into the component's props\r\n)(withSnackbar(MavoUsersTab as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppUserAdminActionCreators, AppUserAdminState } from '../../../store';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport UsersTab from './UsersTab';\r\nimport RolesTab from './RolesTab';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport TabPanel from '../../_shared/Tabs';\r\nimport { Card, Tab, Tabs, Box, CardContent } from '@material-ui/core';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { IAppUserService } from '../../../services/Interfaces/IAppUserService';\r\nimport MavoUsersTab from './MavoUsersTab';\r\n\r\nexport interface ExternalAppUsersAdminProps {\r\n selectedTab: number;\r\n}\r\ntype AppUserAdminProps = AppUserAdminState &\r\n typeof AppUserAdminActionCreators &\r\n ExternalAppUsersAdminProps &\r\n RouteComponentProps<{ startDateIndex: string }>;\r\n\r\nclass MavoAppUsersAdmin extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private appUserService!: IAppUserService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n selectedTab: 0\r\n };\r\n\r\n public componentDidMount() {\r\n if (this.props.match.path.toLowerCase() === '/admin/mavo/users') {\r\n this.setState({ selectedTab: 0 });\r\n }\r\n if (this.props.match.path.toLowerCase() === '/admin/roles') {\r\n this.setState({ selectedTab: 1 });\r\n }\r\n }\r\n\r\n handleChangeTab = async (event: React.ChangeEvent, newValue: number) => {\r\n this.setState({ selectedTab: newValue });\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.appUserService = (this.context as AppContext).appUserService;\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => state.app, // Selects which state properties are merged into the component's props\r\n AppUserAdminActionCreators // Selects which action creators are merged into the component's props\r\n)(MavoAppUsersAdmin as any);\r\n","import React, { Fragment } from 'react';\r\nimport {\r\n AppUserAdminActionCreators,\r\n AppUserAdminState,\r\n ApplicationState,\r\n AppActionCreators\r\n} from '../../../store';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n Grid,\r\n TextField,\r\n Switch,\r\n FormControlLabel,\r\n Button,\r\n Box,\r\n Card,\r\n CardContent\r\n} from '@material-ui/core';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { IAppUserService } from '../../../services/Interfaces/IAppUserService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport { Organization } from '../../../interfaces/Organization';\r\nimport { IOrganizationService } from '../../../services/Interfaces/IOrganizationService';\r\nimport { AppUser } from '../../../interfaces/AppUser';\r\nimport { ValidatorForm, TextValidator } from 'react-material-ui-form-validator';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { IReferential } from '../../../interfaces/IReferential';\r\nimport { ReferentialCode } from '../../../helpers/Constants';\r\nimport Referentials from '../../../helpers/Referentials.json';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport { isNullOrUndefined } from 'util';\r\n\r\nexport interface ExternalEditUserProps {\r\n userChanged: () => Promise;\r\n}\r\n\r\ntype EditUserProps = AppUserAdminState &\r\n ProviderContext &\r\n typeof AppUserAdminActionCreators &\r\n typeof AppActionCreators &\r\n RouteComponentProps<{ id: string }> &\r\n ExternalEditUserProps;\r\n\r\ninterface IEditUserState {\r\n organizations: Organization[];\r\n managers: AppUser[];\r\n userRoles: IReferential[];\r\n users: AppUser[];\r\n user: AppUser;\r\n}\r\n\r\nclass MavoEditUser extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private appUserService!: IAppUserService;\r\n private organizationService!: IOrganizationService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n organizations: [],\r\n managers: [] as AppUser[],\r\n users: [] as AppUser[],\r\n userRoles: [],\r\n user: {\r\n email: '',\r\n firstName: '',\r\n lastName: '',\r\n phoneNumber: '',\r\n isActive: true,\r\n organization: null,\r\n organizationId: 0,\r\n jobFunction: '',\r\n manager: null,\r\n managerId: '',\r\n role: null,\r\n roleId: null,\r\n id: null,\r\n isMavo: true\r\n } as AppUser\r\n };\r\n\r\n public async componentDidMount() {\r\n const refRole = Referentials.referential.find((item) => item.code === ReferentialCode.UserRole);\r\n const [org, users, userRoles] = await Promise.all([\r\n this.organizationService.GetOrganizations(),\r\n this.appUserService.GetAppUsers(),\r\n this.appReferentialService.Get(refRole!.baseUrl)\r\n ]);\r\n\r\n let user = this.state.user;\r\n\r\n if (this.props.match.params.id.toUpperCase() !== 'NEW') {\r\n try {\r\n user = await this.appUserService.GetAppUser(this.props.match.params.id);\r\n\r\n const organization = org.find((o) => o.id === user.organizationId);\r\n user.organization = organization === undefined ? null : organization;\r\n\r\n const manager = users.users.find((m) => m.id === user.managerId);\r\n user.manager = manager === undefined ? null : manager;\r\n\r\n user.role = null;\r\n if (!isNullOrUndefined(user.roleId)) {\r\n const role = userRoles.find((item) => item.id === user.roleId);\r\n user.role = isNullOrUndefined(role) ? null : role;\r\n }\r\n } catch (error) {}\r\n }\r\n\r\n this.setState({\r\n organizations: org,\r\n users: users.users,\r\n user: user,\r\n userRoles: userRoles.filter((item) => item.isActive),\r\n managers: this.filterMangers(users.users, user.organization)\r\n });\r\n }\r\n\r\n private handleTextChange = (event: React.ChangeEvent) => {\r\n let value: any;\r\n if (event.target.type === 'text') {\r\n value = event.currentTarget.value;\r\n }\r\n if (event.target.type === 'checkbox') {\r\n value = event.currentTarget.checked;\r\n }\r\n\r\n this.setState({\r\n ...this.state,\r\n user: {\r\n ...this.state.user,\r\n [event.target.id]: value\r\n }\r\n });\r\n };\r\n\r\n private handleAutocompleteChange = (\r\n property: string,\r\n propertyId: string,\r\n newValue: Organization | null | undefined | AppUser | IReferential\r\n ) => {\r\n this.setState({\r\n user: {\r\n ...this.state.user,\r\n [property]: newValue,\r\n [propertyId]: newValue === null || newValue === undefined ? null : newValue.id\r\n // gtId: newValue === null || newValue === undefined || property === \"manager\" ?\r\n // this.state.user.gtId : newValue.gtId\r\n }\r\n });\r\n };\r\n\r\n private handleOrganizationChange = (newValue: Organization | null) => {\r\n this.setState({\r\n user: {\r\n ...this.state.user,\r\n organization: newValue,\r\n organizationId: newValue === null ? null : newValue.id,\r\n gtId: newValue === null || newValue === undefined ? this.state.user.gtId : newValue.gtId,\r\n hoId:\r\n newValue === null || newValue === undefined\r\n ? this.state.user.hoId\r\n : isNullOrUndefined(newValue.hoId)\r\n ? newValue.id\r\n : newValue.hoId,\r\n manager: null,\r\n managerId: null\r\n },\r\n managers: this.filterMangers(this.state.users, newValue)\r\n });\r\n };\r\n\r\n private saveUser = async () => {\r\n try {\r\n const users = await this.appUserService.GetAppUsers(this.state.user.email);\r\n\r\n if (users.totalCount > 1) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('ERROR_MSG_USER_EXISTS', 'Utilizatorul exista deja!'),\r\n { variant: 'error' }\r\n );\r\n return;\r\n }\r\n if (users.totalCount === 1 && users.users[0].id !== this.state.user.id) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('ERROR_MSG_USER_EXISTS', 'Utilizatorul exista deja!'),\r\n { variant: 'error' }\r\n );\r\n return;\r\n }\r\n\r\n if (this.state.user.id !== null) {\r\n await this.appUserService.UpdateUser(this.state.user);\r\n } else {\r\n const newUser = await this.appUserService.AddUser(this.state.user);\r\n this.props.history.push('/admin/mavo/users/' + newUser.id);\r\n }\r\n\r\n this.props.userChanged();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n public filterMangers = (users: AppUser[], newOrganization: Organization | null | undefined) => {\r\n return newOrganization === null || newOrganization === undefined\r\n ? []\r\n : users.filter((value) => value.organization!.hoId === newOrganization!.hoId);\r\n };\r\n\r\n public renderForm() {\r\n return (\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n this.handleOrganizationChange(newValue)\r\n }\r\n getOptionLabel={(option: Organization) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n \r\n this.handleAutocompleteChange('manager', 'managerId', newValue)\r\n }\r\n getOptionLabel={(option: AppUser) => option.userName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n this.handleAutocompleteChange('role', 'roleId', newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n this.handleTextChange(e)}\r\n color=\"primary\"\r\n id=\"isActive\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={this.translatorService.Tranlate('EDIT_USER_ISACTIVE_FIELD', 'Stare')}\r\n />\r\n\r\n this.handleTextChange(e)}\r\n color=\"primary\"\r\n id=\"isMavo\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={this.translatorService.Tranlate('EDIT_USER_ISMAVO_FIELD', 'User MAVO')}\r\n />\r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.appUserService = (this.context as AppContext).appUserService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n return (\r\n \r\n \r\n \r\n {this.renderForm()}\r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (stateProps: any, dispatchProps: any, ownProps: ExternalEditUserProps) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\n//export default EditUser as any\r\nexport default connect(\r\n (state: ApplicationState) => state.appUserAdmin,\r\n { ...AppUserAdminActionCreators, ...AppActionCreators },\r\n mergeProps\r\n)(withSnackbar(MavoEditUser as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppUserAdminActionCreators, AppUserAdminState } from '../../../store';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport NavigationIcon from '@material-ui/icons/Navigation';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport TabPanel from '../../_shared/Tabs';\r\nimport { Card, Tab, Tabs, Button, CardContent, Box } from '@material-ui/core';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { IAppUserService } from '../../../services/Interfaces/IAppUserService';\r\nimport EditUser from './EditUser';\r\nimport EditUserRoles from './EditUserRoles';\r\nimport ResetPassword from './ResetPassword';\r\nimport { AppUser } from '../../../interfaces/AppUser';\r\nimport MavoEditUser from './MavoEditUser';\r\n\r\ntype UserDetailsProps = AppUserAdminState &\r\n typeof AppUserAdminActionCreators &\r\n RouteComponentProps<{ id: string }>;\r\n\r\ninterface IUserDetailsState {\r\n user: AppUser;\r\n selectedTab: number;\r\n}\r\n\r\nclass MavoUserDetails extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private appUserService!: IAppUserService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n selectedTab: 0,\r\n user: {\r\n email: '',\r\n firstName: '',\r\n lastName: '',\r\n phoneNumber: '',\r\n isActive: false,\r\n organization: {},\r\n organizationId: 0,\r\n jobFunction: '',\r\n id: null\r\n } as AppUser\r\n };\r\n\r\n public async componentDidMount() {\r\n await this.loadUser();\r\n }\r\n\r\n loadUser = async () => {\r\n let user = this.state.user;\r\n\r\n if (this.props.match.params.id.toUpperCase() !== 'NEW') {\r\n try {\r\n user = await this.appUserService.GetAppUser(this.props.match.params.id);\r\n } catch (error) {}\r\n }\r\n this.setState({\r\n user: user\r\n });\r\n };\r\n\r\n handleChangeTab = async (event: React.ChangeEvent, newValue: number) => {\r\n this.setState({ selectedTab: newValue });\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.appUserService = (this.context as AppContext).appUserService;\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n
\r\n {\r\n this.props.history.push('/admin/mavo/users');\r\n }}\r\n >\r\n \r\n {this.translatorService.Tranlate('EDIT_USER_BACK_TO_USERS_BTN', 'Utilizatori')}\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n this.loadUser()} />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => state.appUserAdmin, // Selects which state properties are merged into the component's props\r\n AppUserAdminActionCreators // Selects which action creators are merged into the component's props\r\n)(MavoUserDetails as any);\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport {\r\n Tooltip,\r\n Box,\r\n Button,\r\n IconButton,\r\n Dialog,\r\n DialogTitle,\r\n Grid,\r\n Typography,\r\n DialogContent\r\n} from '@material-ui/core';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport AddCircleTwoToneIcon from '@material-ui/icons/AddCircleTwoTone';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport MUIDataTable, {\r\n SelectableRows,\r\n MUIDataTableMeta,\r\n MUIDataTableColumnOptions\r\n} from 'mui-datatables';\r\nimport { MUITranslations } from '../../../helpers/MUITableTranslations';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport DeleteOutlineTwoToneIcon from '@material-ui/icons/DeleteOutlineTwoTone';\r\nimport { RefConstants } from '../../../helpers/Constants';\r\nimport { IReferential } from '../../../interfaces/IReferential';\r\nimport moment from 'moment';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport EditOutlinedIcon from '@material-ui/icons/EditOutlined';\r\nimport NumberFormat from 'react-number-format';\r\nimport { IVehicleService } from '../../../services/Interfaces/IVehicleService';\r\nimport { AlcorParameterInfo } from '../../../interfaces/Vehicle';\r\n\r\ninterface IAlcorParameterInfoListState {\r\n newAlcorParameterInfo: AlcorParameterInfo;\r\n alcorParameters: IReferential[];\r\n alcorParametersInfoList: AlcorParameterInfo[];\r\n isLoading: boolean;\r\n isDialogOpen: boolean;\r\n newAlcorParameterInfoId: number | null;\r\n}\r\n\r\ntype IAlcorParameterInfoListProps = { appState: AppState } & ProviderContext &\r\n RouteComponentProps<{ id: string; workflowId: string }>;\r\n\r\nclass AlcorParameterInfoList extends React.PureComponent<\r\n IAlcorParameterInfoListProps,\r\n IAlcorParameterInfoListState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private vehicleService!: IVehicleService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n\r\n static contextType = ApplicationContext;\r\n private newAlcorParameterInfo = {\r\n id: 0,\r\n value: '',\r\n alcorParameterId: null,\r\n alcorParameter: null\r\n } as unknown as AlcorParameterInfo;\r\n\r\n state = {\r\n alcorParameters: [],\r\n isLoading: false,\r\n selectedFilter: 0,\r\n isDialogOpen: false,\r\n newAlcorParameterInfo: this.newAlcorParameterInfo,\r\n alcorParametersInfoList: [],\r\n newAlcorParameterInfoId: null\r\n } as IAlcorParameterInfoListState;\r\n\r\n public componentDidMount() {\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadAlcorParameterInfoList();\r\n }\r\n );\r\n }\r\n\r\n loadAlcorParameterInfoList = async () => {\r\n const alcorParametersInfoList = await this.vehicleService.GetAlcorParameterInfoList();\r\n const { alcorParameterRef } = RefConstants;\r\n\r\n const alcorParameters = await this.appReferentialService.Get(alcorParameterRef!.baseUrl);\r\n\r\n\r\n this.setState({\r\n alcorParameters: alcorParameters,\r\n isLoading: false,\r\n alcorParametersInfoList: alcorParametersInfoList,\r\n newAlcorParameterInfo: { ...this.newAlcorParameterInfo }\r\n });\r\n };\r\n\r\n private handleAlcorParameterChange = (newValue: IReferential | null) => {\r\n this.setState({\r\n newAlcorParameterInfo: {\r\n ...this.state.newAlcorParameterInfo,\r\n alcorParameter: newValue,\r\n alcorParameterId: newValue !== null ? newValue!.id : 0\r\n }\r\n });\r\n };\r\n\r\n public saveAlcorParameterInfo = async () => {\r\n if (this.state.newAlcorParameterInfoId === null) {\r\n try {\r\n await this.vehicleService.AddAlcorParameterInfo(this.state.newAlcorParameterInfo);\r\n\r\n await this.loadAlcorParameterInfoList();\r\n\r\n this.closeDialog();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n } else {\r\n try {\r\n\r\n await this.vehicleService.UpdateAlcorParameterInfo(this.state.newAlcorParameterInfo);\r\n\r\n await this.loadAlcorParameterInfoList();\r\n\r\n this.closeDialog();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n \r\n \r\n NumberFormatCustom = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n },\r\n currentTarget: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n allowNegative={false}\r\n thousandSeparator={false}\r\n decimalScale={0}\r\n />\r\n );\r\n };\r\n \r\n onChange =\r\n (fieldName: string, isNumber: boolean) => (e: any, newValue?: IReferential | null) => {\r\n isNumber\r\n ? this.setState({\r\n newAlcorParameterInfo: {\r\n ...this.state.newAlcorParameterInfo,\r\n [fieldName]: parseFloat(newValue || e.target.value)\r\n }\r\n })\r\n : this.setState({\r\n newAlcorParameterInfo: {\r\n ...this.state.newAlcorParameterInfo,\r\n [fieldName]: newValue || e.target.value\r\n }\r\n });\r\n };\r\n\r\n public renderAddForm() {\r\n return (\r\n \r\n \r\n this.handleAlcorParameterChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n /> \r\n\r\n \r\n this.onChange('value', false)(e)\r\n }\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n label={this.translatorService.Tranlate('FINANCIAL_PARAMETER_INFO_VALUE', 'Valoare')}\r\n />\r\n\r\n \r\n
\r\n \r\n {this.translatorService.Tranlate('EDIT_ORGANIZATION_CANCEL_BTN', 'Anuleaza')}\r\n \r\n \r\n
\r\n
\r\n );\r\n }\r\n\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'alcorParameter',\r\n label: this.translatorService.Tranlate(\r\n 'ALCOR_PARAMETER',\r\n 'Parametru Alcor'\r\n ),\r\n options: {\r\n sort: true,\r\n customSort: (a: IReferential, b: IReferential) => {\r\n return a.displayName!.localeCompare(b.displayName!);\r\n },\r\n customBodyRender: (value: IReferential) => {\r\n return value.displayName;\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'value',\r\n label: this.translatorService.Tranlate('FINANCIAL_PARAMETER_INFO_VALUE', 'Valoare'),\r\n options: {\r\n filter: false,\r\n customBodyRender: (value: string, tableMeta: MUIDataTableMeta) => {\r\n return value;\r\n }\r\n }\r\n },\r\n {\r\n name: 'dateModification',\r\n label: this.translatorService.Tranlate('USERS_DATE_MODIFICATION_HEADER', 'Data Modificare'),\r\n options: {\r\n filter: false,\r\n sortDirection: 'desc',\r\n customBodyRender: (value: Date) =>\r\n moment.utc(value).local().format(this.props.appState.longDateFormat)\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: '',\r\n options: {\r\n viewColumns: false,\r\n filter: false,\r\n setCellHeaderProps: () => ({ align: 'center' }),\r\n setCellProps: () => ({ align: 'center' }),\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n const alcorParameterInfo = this.state.alcorParametersInfoList.find((item) => item.id === tableMeta.rowData[0]);\r\n\r\n return (\r\n <>\r\n this.newAlcorParameterInfoPopup(tableMeta.rowData[0])}\r\n >\r\n \r\n \r\n this.deleteAlcorParameterInfo(e, tableMeta)}\r\n >\r\n \r\n \r\n \r\n );\r\n }\r\n }\r\n }];\r\n\r\n return columns;\r\n };\r\n\r\n deleteAlcorParameterInfo = async (event: any, tableMeta: MUIDataTableMeta) => {\r\n try {\r\n const id = tableMeta.rowData[0];\r\n\r\n await this.vehicleService.RemoveAlcorParameterInfo(id);\r\n\r\n await this.loadAlcorParameterInfoList();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n\r\n newAlcorParameterInfoPopup = async (alcorParameterInfoId: number | null) => {\r\n let newAlcorParameterInfo: AlcorParameterInfo;\r\n if (alcorParameterInfoId == null) {\r\n newAlcorParameterInfo = { ...this.state.newAlcorParameterInfo } as AlcorParameterInfo;\r\n } else {\r\n newAlcorParameterInfo = this.state.alcorParametersInfoList.find((item) => item.id === alcorParameterInfoId)!;\r\n }\r\n this.setState({\r\n isDialogOpen: true,\r\n newAlcorParameterInfo: newAlcorParameterInfo,\r\n newAlcorParameterInfoId: alcorParameterInfoId\r\n });\r\n };\r\n\r\n closeDialog = () => {\r\n this.setState(\r\n { \r\n isDialogOpen: false, \r\n newAlcorParameterInfo: this.newAlcorParameterInfo,\r\n newAlcorParameterInfoId: null\r\n }\r\n );\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.vehicleService = (this.context as AppContext).vehicleService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n const options = {\r\n filter: true,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n sort: false,\r\n customToolbar: () => {\r\n return (\r\n \r\n this.newAlcorParameterInfoPopup(null)}\r\n >\r\n \r\n \r\n \r\n );\r\n }\r\n };\r\n\r\n return (\r\n \r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n ) : null}\r\n
\r\n {this.state.isDialogOpen ? (\r\n \r\n \r\n \r\n \r\n \r\n {!this.state.newAlcorParameterInfoId ? \r\n this.translatorService.Tranlate(\r\n 'ALCOR_PARAMETER_INFO_NEW_MODAL_TITLE',\r\n 'Adauga parametru alcor'\r\n ) : this.translatorService.Tranlate(\r\n 'ALCOR_PARAMETER_INFO_UPDATE_MODAL_TITLE',\r\n 'Actualizeaza parametru alcor'\r\n )} \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.renderAddForm()}\r\n \r\n \r\n ) : (\r\n ''\r\n )}\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app\r\n }),\r\n null\r\n)(withSnackbar(AlcorParameterInfoList as any));\r\n","import * as React from 'react';\r\nimport { ApplicationState, AppState, CaseSettingsState } from '../../store';\r\nimport { ApplicationContext, AppContext } from '../../context/Contexts';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { Button, Grid, CardContent, IconButton, Dialog, DialogTitle, Typography, DialogContent, Box, Divider} from '@material-ui/core';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport MomentUtils from '@date-io/moment';\r\nimport _ from 'lodash';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { IOrganizationService } from '../../services/Interfaces/IOrganizationService';\r\nimport { Organization, OrganizationAttachment } from '../../interfaces/Organization';\r\nimport { Autocomplete } from '@material-ui/lab';\r\nimport { AttachmentTypeCode, RefConstants, RoleClaimsEnum } from '../../helpers/Constants';\r\nimport { IReferentialService } from '../../services/Interfaces/IReferentialService';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\n\r\nimport { ButtonGroup, Card, CardFooter } from 'reactstrap';\r\nimport DescriptionIcon from '@material-ui/icons/Description';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport VisibilityIcon from '@material-ui/icons/Visibility';\r\nimport FileSaver from 'file-saver';\r\nimport DeleteOutlineTwoToneIcon from '@material-ui/icons/DeleteOutlineTwoTone';\r\nimport { isNullOrUndefined } from 'util';\r\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\r\n// @ts-ignore\r\nimport FileViewer from 'react-file-viewer';\r\nimport GetAppIcon from '@material-ui/icons/GetApp';\r\n\r\ntype UserManualProps = {\r\n appState: AppState;\r\n caseSettingsState: CaseSettingsState;\r\n } & ProviderContext &\r\n RouteComponentProps;\r\n\r\ninterface IUserManualState {\r\n isLoading: boolean;\r\n organizationList: Organization[];\r\n selectedOrganization: Organization | null;\r\n attachmentTypeList: IReferential[];\r\n organizationAttachments: OrganizationAttachment[];\r\n previewAttachFile: any;\r\n previewAttachFileExtension: string;\r\n isDialogOpen: boolean;\r\n isLoadingAttachments: boolean;\r\n}\r\n\r\nclass LocalizedUtils extends MomentUtils {\r\n}\r\n\r\nclass UserManual extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private organizationService!: IOrganizationService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n isLoading: false,\r\n organizationList: [],\r\n selectedOrganization: null,\r\n attachmentTypeList: [],\r\n organizationAttachments: [],\r\n previewAttachFile: '',\r\n previewAttachFileExtension: '',\r\n isDialogOpen: false, \r\n isLoadingAttachments: false\r\n } as IUserManualState;\r\n\r\n public async componentDidMount() {\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadOrganizations();\r\n }\r\n );\r\n }\r\n\r\n loadOrganizations = async () => {\r\n const {\r\n attachementTypeRef\r\n } = RefConstants;\r\n\r\n const organizationId = this.props.appState.appUser!.hoId === null ? this.props.appState.appUser!.organizationId : this.props.appState.appUser!.hoId;\r\n console.log(organizationId);\r\n const [\r\n organizations,\r\n attachmentTypeList,\r\n organizationAttachments\r\n ] = await Promise.all([\r\n this.organizationService.GetHOOrganizations(null),\r\n this.appReferentialService.Get(attachementTypeRef?.baseUrl),\r\n this.hasRight(RoleClaimsEnum.Admin) ? this.organizationService.GetOrganizationAdminAttachments() \r\n : this.organizationService.GetOrganizationAttachments(organizationId!)\r\n ]);\r\n\r\n attachmentTypeList.forEach((attachmentType) => {\r\n attachmentType.isLoading = false;\r\n });\r\n\r\n console.log('organizationAttachments', organizationAttachments);\r\n\r\n this.setState({\r\n organizationList: organizations,\r\n isLoading: false,\r\n attachmentTypeList: attachmentTypeList.filter((item) => item.code == AttachmentTypeCode.MANUAL_UTILIZARE),\r\n organizationAttachments: organizationAttachments\r\n });\r\n }\r\n\r\n loadOrganizationAttachments = async () => {\r\n this.setState({\r\n isLoadingAttachments: true\r\n });\r\n\r\n const organizationId = this.props.appState.appUser!.hoId === null ? this.props.appState.appUser!.organizationId : this.props.appState.appUser!.hoId;\r\n console.log(organizationId);\r\n const organizationAttachments = this.hasRight(RoleClaimsEnum.Admin) ? await this.organizationService.GetOrganizationAdminAttachments() \r\n : await this.organizationService.GetOrganizationAttachments(organizationId!);\r\n \r\n this.setState({\r\n organizationAttachments: organizationAttachments,\r\n isLoadingAttachments: false\r\n });\r\n }\r\n\r\n saveOrganizationAttachments = async () => {\r\n try {\r\n this.setState({ isLoading: true });\r\n\r\n this.setState({ isLoading: false });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (err: any) {\r\n this.setState({ isLoading: false });\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n handleOrganizationChange = (newValue: Organization | null) => {\r\n this.setState({\r\n selectedOrganization: newValue\r\n });\r\n };\r\n\r\n setAttachmentTypeList = (attachmentType: IReferential, value: boolean) => {\r\n const attachmentTypeList = _.cloneDeep(this.state.attachmentTypeList);\r\n for (let i = 0; i < attachmentTypeList.length; i++) {\r\n if (attachmentTypeList[i].id === attachmentType.id) {\r\n attachmentTypeList[i].isLoading = value;\r\n }\r\n }\r\n\r\n return attachmentTypeList;\r\n };\r\n\r\n handleUploadAttachment = async (\r\n e: React.ChangeEvent,\r\n attachmentType: IReferential\r\n ) => {\r\n try {\r\n\r\n console.log(e.target.files);\r\n if (e.target.files === null) {\r\n return;\r\n }\r\n e.persist();\r\n\r\n this.setState({\r\n attachmentTypeList: this.setAttachmentTypeList(attachmentType, true)\r\n });\r\n\r\n\r\n const attachments: OrganizationAttachment[] = [];\r\n for (let i = 0; i < e.target.files.length; i++) {\r\n const file = e.target.files![i];\r\n attachments.push({\r\n id: 0,\r\n organizationId: this.state.selectedOrganization!.id,\r\n file: file,\r\n originalFileName: file.name\r\n } as OrganizationAttachment);\r\n }\r\n\r\n const newFiles = await this.organizationService.AddOrganizationAttachments(attachments);\r\n \r\n await this.loadOrganizationAttachments();\r\n\r\n this.setState({\r\n attachmentTypeList: this.setAttachmentTypeList(attachmentType, false)\r\n });\r\n\r\n\r\n e.target.value = '';\r\n\r\n } catch (error) {\r\n console.log(error);\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n e.target.value = '';\r\n }\r\n };\r\n\r\n renderWorkflowAttashmentTypes = () => {\r\n const attachmentTypes = [] as any[];\r\n const attachmentTypeList = this.state.attachmentTypeList;\r\n if (attachmentTypeList.length !== 0) {\r\n attachmentTypeList.forEach((attach, index) => {\r\n attach.fileInputKey = Date.now();\r\n attachmentTypes.push(\r\n
\r\n \r\n
\r\n
\r\n \r\n {attach!.displayName}\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n {\r\n return this.handleUploadAttachment(e, attach);\r\n }}\r\n type=\"file\"\r\n multiple={true}\r\n disabled={!this.state.selectedOrganization}\r\n\r\n />\r\n \r\n Upload\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n );\r\n });\r\n }\r\n return attachmentTypes;\r\n };\r\n\r\n renderFilters = () => {\r\n return (\r\n {\r\n this.saveOrganizationAttachments();\r\n }}\r\n >\r\n
\r\n \r\n \r\n \r\n this.handleOrganizationChange(newValue)\r\n } \r\n getOptionLabel={(option: Organization) => option!.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n
{this.renderWorkflowAttashmentTypes()}
\r\n
\r\n
\r\n
\r\n \r\n );\r\n };\r\n\r\n getDistinctOrganization = (organizationAttachments: OrganizationAttachment[]) => {\r\n return _.map(_.groupBy(organizationAttachments, 'organizationId'), \r\n (items, organizationId) => ({\r\n organization: items[0].organization,\r\n attachments: items,\r\n }));\r\n };\r\n\r\n closeDialog = async () => {\r\n this.setState({\r\n isDialogOpen: false\r\n });\r\n };\r\n\r\n handlePreviewAttachment = async (originalFileName: string, filename: string) => {\r\n try {\r\n const fileBlob = await this.organizationService.GetOrganizationAttachment(filename);\r\n const url = URL.createObjectURL(fileBlob);\r\n const extension = originalFileName.split('.').pop();\r\n\r\n if (isNullOrUndefined(extension)) {\r\n return;\r\n }\r\n\r\n this.setState({\r\n previewAttachFile: url,\r\n previewAttachFileExtension: extension!.toLowerCase(),\r\n isDialogOpen: true\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n renderPreviewAttachment = () => {\r\n return (\r\n \r\n );\r\n };\r\n\r\n downloadFile = async (fileName: string, origFileName: string) => {\r\n const fileBlob = await this.organizationService.GetOrganizationAttachment(fileName);\r\n FileSaver.saveAs(fileBlob, origFileName);\r\n };\r\n\r\n handleDeleteAttachment = async (id: number, fileName: string) => {\r\n try {\r\n await this.organizationService.RemoveOrganizationAttachment(fileName);\r\n\r\n await this.loadOrganizationAttachments();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n renderAttachments = (attachments: OrganizationAttachment[]) => {\r\n const attachmentsToRender = [] as any[];\r\n\r\n attachments.forEach((attach, index) => {\r\n attachmentsToRender.push(\r\n \r\n \r\n \r\n
\r\n {attach.id ? (\r\n {\r\n this.handlePreviewAttachment(attach.originalFileName, attach.fileName);\r\n }}\r\n >\r\n \r\n ) \r\n : null} \r\n
\r\n
\r\n \r\n
\r\n \r\n {\r\n if (attach.id !== 0) {\r\n this.downloadFile(attach.fileName, attach.originalFileName)\r\n }\r\n }}\r\n >\r\n {attach.originalFileName}\r\n {' '}\r\n \r\n
\r\n
\r\n {attach.id !== 0 ? (\r\n \r\n this.downloadFile(attach.fileName, attach.originalFileName)}\r\n >\r\n \r\n \r\n \r\n ) : null}\r\n {attach.id !== 0 && this.hasRight(RoleClaimsEnum.Admin) ? (\r\n \r\n
\r\n {\r\n this.handleDeleteAttachment(\r\n attach.id,\r\n attach.fileName\r\n );\r\n }}\r\n >\r\n \r\n \r\n
\r\n
\r\n ) : null}\r\n
\r\n
\r\n );\r\n });\r\n return attachmentsToRender;\r\n };\r\n\r\n renderOrganizationAttachments = () => {\r\n const organizationAttachment = [] as any[];\r\n const organizationAttachmentList = this.getDistinctOrganization(this.state.organizationAttachments);\r\n\r\n if (organizationAttachmentList.length !== 0) {\r\n organizationAttachmentList.forEach((attach, index) => {\r\n organizationAttachment.push(\r\n
\r\n \r\n
\r\n
\r\n \r\n {attach.organization!.displayName}\r\n \r\n
\r\n
\r\n \r\n
\r\n {attach.attachments.length !== 0 ? (\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
{this.renderAttachments(attach.attachments)}
\r\n
\r\n ) : (\r\n
\r\n \r\n
\r\n )}\r\n
\r\n
\r\n
\r\n
\r\n );\r\n });\r\n }\r\n\r\n return organizationAttachment;\r\n };\r\n\r\n renderOrganizations = () => {\r\n return (\r\n <>\r\n
\r\n \r\n
\r\n {!this.state.isLoadingAttachments ? (\r\n
\r\n \r\n \r\n
\r\n {this.renderOrganizationAttachments()}\r\n
\r\n
\r\n
\r\n
\r\n ) : null}\r\n \r\n );\r\n };\r\n\r\n\r\n public hasRight = (right: string): boolean => {\r\n return this.props.appState!.user!.profile.role.includes(right);\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n \r\n return (\r\n \r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n this.hasRight(RoleClaimsEnum.Admin) ? (\r\n
\r\n {this.renderFilters()}\r\n \r\n {this.renderOrganizations()}\r\n
\r\n ) : ( \r\n
\r\n {this.renderOrganizations()}\r\n
\r\n )\r\n ) : null}\r\n\r\n \r\n \r\n \r\n \r\n \r\n {this.translatorService.Tranlate('CASE_PREVIEW_DOC', 'Previzualizare document')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.renderPreviewAttachment()}\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app,\r\n caseSettingsState: state.caseSettings\r\n }),\r\n null\r\n)(withSnackbar(UserManual as any));\r\n","import React, { Fragment, ChangeEvent } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport {\r\n Organization,\r\n OrganizationType,\r\n OrganizationLevelType\r\n} from '../../../interfaces/Organization';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport { IOrganizationService } from '../../../services/Interfaces/IOrganizationService';\r\nimport {\r\n Box,\r\n Switch,\r\n Button,\r\n Tooltip,\r\n IconButton,\r\n Card,\r\n CardContent,\r\n Tabs,\r\n Tab,\r\n Dialog,\r\n DialogTitle,\r\n Grid,\r\n Typography,\r\n DialogContent\r\n} from '@material-ui/core';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport MUIDataTable, {\r\n MUIDataTableColumnOptions,\r\n MUIDataTableMeta,\r\n SelectableRows\r\n} from 'mui-datatables';\r\nimport moment from 'moment';\r\nimport { MUITranslations } from '../../../helpers/MUITableTranslations';\r\nimport AddCircleTwoToneIcon from '@material-ui/icons/AddCircleTwoTone';\r\nimport {\r\n OrganizationTypeCode,\r\n ReferentialCode,\r\n OrganizationLevelTypeCode\r\n} from '../../../helpers/Constants';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport Referentials from '../../../helpers/Referentials.json';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { IReferential } from '../../../interfaces/IReferential';\r\n\r\ninterface IHOOrganizationsState {\r\n organizations: Organization[];\r\n isLoading: boolean;\r\n selectedFilter: number;\r\n isDialogOpen: boolean;\r\n newHOOrg: Organization;\r\n organizationTypes: OrganizationType[];\r\n}\r\n\r\ntype HOOrganizationsProps = { appState: AppState } & ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\nclass MavoHOOrganizations extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private organizationService!: IOrganizationService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n private neworg = {\r\n name: '',\r\n id: 0,\r\n gtId: this.props.appState.appUser!.gtId,\r\n organizationTypeId: 0,\r\n organizationType: null,\r\n organizationLevelTypeId: 1,\r\n parent: null,\r\n isActive: true,\r\n isMavoPartener: true\r\n } as Organization;\r\n\r\n state = {\r\n organizations: [],\r\n isLoading: false,\r\n selectedFilter: 0,\r\n isDialogOpen: false,\r\n newHOOrg: this.neworg,\r\n organizationTypes: [] as OrganizationType[]\r\n } as IHOOrganizationsState;\r\n\r\n public componentDidMount() {\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadOrganizations();\r\n }\r\n );\r\n }\r\n\r\n loadOrganizations = async () => {\r\n const orgList = await this.organizationService.GetMavoHOOrganizations();\r\n\r\n this.setState({\r\n organizations: orgList,\r\n isLoading: false,\r\n newHOOrg: { ...this.neworg }\r\n });\r\n };\r\n\r\n filterOrganizations = (orgList: Organization[]): Organization[] => {\r\n if (this.state.selectedFilter === 1) {\r\n orgList = orgList.filter((item) => item.organizationType!.code === OrganizationTypeCode.GT);\r\n }\r\n if (this.state.selectedFilter === 2) {\r\n orgList = orgList.filter((item) => item.organizationType!.code !== OrganizationTypeCode.GT);\r\n }\r\n\r\n return orgList;\r\n };\r\n\r\n newHOOrg = async () => {\r\n const ref = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.OrganizationType\r\n );\r\n const orgTypes = await this.appReferentialService.Get(ref!.baseUrl);\r\n\r\n this.setState({\r\n isDialogOpen: true,\r\n organizationTypes: orgTypes.filter(\r\n (item) => item.isActive === true\r\n ) as any as OrganizationType[]\r\n });\r\n };\r\n\r\n onRowClick = async (e: any, id: string, value: string) => {\r\n this.props.history.push('/admin/mavo/hoorganizations/' + id, value);\r\n };\r\n\r\n filterChange = (event: React.ChangeEvent, newValue: number) => {\r\n this.setState(\r\n { selectedFilter: newValue }\r\n // , async () => await this.loadOrganizations()\r\n );\r\n };\r\n\r\n handleIsActiveChange = async (\r\n event: React.ChangeEvent,\r\n tableMeta: MUIDataTableMeta\r\n ) => {\r\n const id = tableMeta.rowData[0];\r\n const newOrganizations = [...this.state.organizations];\r\n const updatedOrgIndex = newOrganizations.findIndex((o) => o.id === id);\r\n\r\n if (updatedOrgIndex >= 0) {\r\n newOrganizations[updatedOrgIndex] = {\r\n ...newOrganizations[updatedOrgIndex],\r\n isActive: event.target.checked\r\n };\r\n\r\n try {\r\n await this.organizationService.UpdateOrganization(newOrganizations[updatedOrgIndex]);\r\n\r\n this.setState({ organizations: newOrganizations });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'name',\r\n label: this.translatorService.Tranlate(\r\n 'ORGANIZATIONS_ORGANIZATION_NAME_HEADER',\r\n 'Organizatie'\r\n ),\r\n options: {\r\n filter: false,\r\n customBodyRender: (value: string, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.onRowClick(e, tableMeta.rowData[0], value)}\r\n >\r\n {value}\r\n \r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'organizationType',\r\n label: this.translatorService.Tranlate('ORGANIZATIONS_ORGANIZATION_TYPE_HEADER', 'Tip'),\r\n // customSort: (a:IReferential, b:IReferential) => { debugger; return a.name!.localeCompare(b.name!)},\r\n options: {\r\n sort: true,\r\n customSort: (a: IReferential, b: IReferential) => {\r\n debugger;\r\n return a.name!.localeCompare(b.name!);\r\n },\r\n customBodyRender: (value: OrganizationType) => {\r\n return value.displayName;\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'companyNumber',\r\n label: this.translatorService.Tranlate('ORGANIZATIONS_COMPANY_NUMBER_HEADER', 'CUI'),\r\n options: {\r\n filter: false\r\n }\r\n },\r\n {\r\n name: 'dateModification',\r\n label: this.translatorService.Tranlate('USERS_DATE_MODIFICATION_HEADER', 'Data Modificare'),\r\n options: {\r\n filter: false,\r\n customBodyRender: (value: Date) =>\r\n moment.utc(value).local().format(this.props.appState.longDateFormat)\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'isActive',\r\n label: this.translatorService.Tranlate('USERS_IS_ACTIVE_HEADER', 'Activ'),\r\n options: {\r\n sortDirection: 'desc',\r\n filterOptions: {\r\n names: [\r\n this.translatorService.Tranlate('TABLE_IS_ACTIVE_COLUMN_ACTIVE', 'Activ'),\r\n this.translatorService.Tranlate('TABLE_IS_ACTIVE_COLUMN_INACTIVE', 'Inactiv')\r\n ],\r\n logic(isActive: any, filterVal: string[]) {\r\n const show =\r\n (filterVal.indexOf(this.names![0]) !== -1 && isActive === true) ||\r\n (filterVal.indexOf(this.names![1]) !== -1 && isActive === false);\r\n return !show;\r\n }\r\n },\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.handleIsActiveChange(e, tableMeta)}\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n );\r\n }\r\n } as MUIDataTableColumnOptions\r\n }\r\n ];\r\n\r\n return columns;\r\n };\r\n\r\n private handleTextChange = (event: React.ChangeEvent) => {\r\n let value: any;\r\n if (event.target.type === 'text') {\r\n value = event.currentTarget.value;\r\n }\r\n this.setState({\r\n newHOOrg: {\r\n ...this.state.newHOOrg,\r\n [event.target.id]: value\r\n }\r\n });\r\n };\r\n\r\n private handleOrganizationTypeChange = (newValue: OrganizationType | null) => {\r\n this.setState({\r\n newHOOrg: {\r\n ...this.state.newHOOrg,\r\n organizationType: newValue,\r\n organizationTypeId: newValue !== null ? newValue!.id : 0\r\n }\r\n });\r\n };\r\n\r\n public saveOrganization = async () => {\r\n try {\r\n const ref = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.OrganizationLevel\r\n );\r\n const orgLevelTypes = await this.appReferentialService.Get(ref!.baseUrl);\r\n\r\n const hoType = orgLevelTypes.find((item) => item.code === OrganizationLevelTypeCode.HO);\r\n\r\n const newOrg = this.state.newHOOrg;\r\n\r\n if (hoType !== undefined) {\r\n newOrg.organizationLevelTypeId = hoType.id;\r\n newOrg.organizationLevelType = hoType as any as OrganizationLevelType;\r\n }\r\n\r\n await this.organizationService.AddOrganization(this.state.newHOOrg);\r\n\r\n await this.loadOrganizations();\r\n\r\n this.closeDialog();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n public renderFilters = () => {\r\n return (\r\n \r\n \r\n \r\n , newValue: number) =>\r\n this.filterChange(event, newValue)\r\n }\r\n >\r\n \r\n \r\n \r\n \r\n \r\n );\r\n };\r\n\r\n closeDialog = () => {\r\n this.setState({ isDialogOpen: false });\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n const options = {\r\n filter: true,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n // responsive: \"stacked\",\r\n customToolbar: () => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n };\r\n\r\n return (\r\n \r\n {this.renderFilters()}\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n ) : null}\r\n
\r\n\r\n \r\n \r\n \r\n \r\n \r\n {this.translatorService.Tranlate(\r\n 'ORGANIZATIONS_NEW_HO_MODAL_TITLE',\r\n 'Adauga organizatie'\r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n this.handleOrganizationTypeChange(newValue)\r\n }\r\n getOptionLabel={(option: OrganizationType) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n \r\n {this.translatorService.Tranlate('EDIT_ORGANIZATION_CANCEL_BTN', 'Anuleaza')}\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app\r\n }),\r\n null\r\n)(withSnackbar(MavoHOOrganizations as any));\r\n","import React, { Fragment } from 'react';\r\nimport {\r\n AppUserAdminActionCreators,\r\n ApplicationState,\r\n AppActionCreators,\r\n AppState\r\n} from '../../../store';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport { Grid, Button, Card, Tabs, Tab, CardContent } from '@material-ui/core';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport {\r\n Organization,\r\n OrganizationLevelType,\r\n OrganizationType\r\n} from '../../../interfaces/Organization';\r\nimport { IOrganizationService } from '../../../services/Interfaces/IOrganizationService';\r\nimport { ValidatorForm, TextValidator } from 'react-material-ui-form-validator';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { WrapperSimple } from '../../../layout-components';\r\nimport Referentials from '../../../helpers/Referentials.json';\r\nimport { ReferentialCode, OrganizationLevelTypeCode } from '../../../helpers/Constants';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport TabPanel from '../../_shared/Tabs';\r\nimport OrganizationBankAccounts from './OrganizationBankAccounts';\r\nimport OrganizationLogo from './OrganizationLogo';\r\nimport OrganizationTokens from './OrganizationTokens';\r\nimport { IReferential } from '../../../interfaces/IReferential';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { Switch, FormControlLabel, Typography } from '@material-ui/core';\r\nimport * as R from 'ramda';\r\n\r\ninterface IEditOrganizationState {\r\n organization: Organization;\r\n organizationLevelTypes: OrganizationLevelType[];\r\n parentOrganizations: Organization[];\r\n organizationTypes: OrganizationType[];\r\n selectedTab: number;\r\n countryList: IReferential[];\r\n regionList: IReferential[];\r\n cityList: IReferential[];\r\n isLoading: boolean;\r\n}\r\n\r\nexport interface ExternalEditOrganizationsProps {\r\n organizationChanged?: () => void;\r\n organizationId: number;\r\n}\r\n\r\ntype EditOrganizationProps = { appState: AppState } & ProviderContext &\r\n ExternalEditOrganizationsProps &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass MavoEditOrganization extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private appReferentialService!: IReferentialService;\r\n private organizationService!: IOrganizationService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n organization: {\r\n id: 0,\r\n name: '',\r\n organizationType: null,\r\n organizationLevelType: null,\r\n country: null,\r\n region: null,\r\n parent: null,\r\n gtId: this.props.appState.appUser!.gtId,\r\n isActive: true,\r\n newFeature: false,\r\n uploadFeature: false,\r\n cityInfo: null\r\n } as Organization,\r\n organizationLevelTypes: [] as OrganizationLevelType[],\r\n parentOrganizations: [] as Organization[],\r\n organizationTypes: [] as OrganizationType[],\r\n selectedTab: 0,\r\n countryList: [] as IReferential[],\r\n regionList: [] as IReferential[],\r\n cityList: [] as IReferential[],\r\n isLoading: true\r\n };\r\n\r\n public async componentDidMount() {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n\r\n //let organization = this.state.organization;\r\n\r\n // if (this.props.organizationId !== 0) {\r\n // organization = ;\r\n // }\r\n\r\n const ref = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.OrganizationType\r\n );\r\n const countryRef = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.Country\r\n );\r\n const regionRef = Referentials.referential.find((item) => item.code === ReferentialCode.Region);\r\n const cityRef = Referentials.referential.find((item) => item.code === ReferentialCode.City);\r\n\r\n const [organization, orgLevelList, orgTypes, countryList, regionList, cityList] = await Promise.all([\r\n this.props.organizationId !== 0\r\n ? this.organizationService.GetOrganization(this.props.organizationId)\r\n : this.state.organization,\r\n this.organizationService.GetOrganizationLevels(hoId),\r\n this.appReferentialService.Get(ref!.baseUrl),\r\n this.appReferentialService.Get(countryRef!.baseUrl),\r\n this.appReferentialService.Get(regionRef!.baseUrl),\r\n this.appReferentialService.Get(cityRef!.baseUrl)\r\n ]);\r\n organization.hoId = hoId;\r\n const organizationLevelTypes = orgLevelList.map((item) => item.organizationLevelType);\r\n\r\n this.setState(\r\n {\r\n organization: organization,\r\n organizationLevelTypes: organizationLevelTypes.filter(\r\n (item) => item.code !== OrganizationLevelTypeCode.HO\r\n ),\r\n organizationTypes: orgTypes as any as OrganizationType[],\r\n //parentOrganizations: [],\r\n regionList: regionList.filter((item) => item.isActive === true),\r\n countryList: countryList.filter((item) => item.isActive === true),\r\n cityList: cityList.filter((item) => item.isActive === true),\r\n isLoading: false\r\n },\r\n async () => {\r\n const organizations =\r\n this.props.organizationId === 0\r\n ? ([] as Organization[])\r\n : await this.organizationService.GetOrganizationsByHO(\r\n hoId,\r\n this.state.organization.organizationLevelTypeId\r\n );\r\n\r\n this.setState({\r\n parentOrganizations: organizations\r\n });\r\n }\r\n );\r\n }\r\n\r\n private handleTextChange = (event: React.ChangeEvent) => {\r\n let value: any;\r\n if (event.target.type === 'text') {\r\n value = event.currentTarget.value;\r\n }\r\n this.setState({\r\n organization: {\r\n ...this.state.organization,\r\n [event.target.id]: value\r\n }\r\n });\r\n };\r\n\r\n private handleOrganizationLevelTypeChange = async (newValue: OrganizationLevelType | null) => {\r\n let orgs = [] as Organization[];\r\n if (newValue !== null) {\r\n orgs = await this.organizationService.GetOrganizationsByHO(\r\n this.state.organization.hoId,\r\n newValue.id\r\n );\r\n }\r\n this.setState({\r\n organization: {\r\n ...this.state.organization,\r\n organizationLevelType: newValue,\r\n organizationLevelTypeId: newValue !== null ? newValue!.id : 0,\r\n parent:\r\n newValue !== null && newValue.code === OrganizationLevelTypeCode.HO\r\n ? null\r\n : this.state.organization.parent,\r\n parentId:\r\n newValue !== null && newValue.code === OrganizationLevelTypeCode.HO\r\n ? null\r\n : this.state.organization.parentId\r\n },\r\n parentOrganizations: orgs\r\n });\r\n };\r\n\r\n private handleOrganizationTypeChange = (newValue: OrganizationType | null) => {\r\n this.setState({\r\n organization: {\r\n ...this.state.organization,\r\n organizationType: newValue,\r\n organizationTypeId: newValue !== null ? newValue!.id : 0\r\n }\r\n });\r\n };\r\n\r\n private handleCountryChange = (newValue: IReferential | null) => {\r\n this.setState({\r\n organization: {\r\n ...this.state.organization,\r\n country: newValue,\r\n countryId: newValue !== null ? newValue!.id : null,\r\n region: null,\r\n regionId: null,\r\n cityInfo: null,\r\n cityId: null\r\n }\r\n });\r\n };\r\n\r\n private handleRegionChange = (newValue: IReferential | null) => {\r\n this.setState({\r\n organization: {\r\n ...this.state.organization,\r\n region: newValue,\r\n regionId: newValue !== null ? newValue!.id : null,\r\n cityInfo: null,\r\n cityId: null\r\n }\r\n });\r\n };\r\n\r\n private handleCityInfoChange = (newValue: IReferential | null) => {\r\n this.setState({\r\n organization: {\r\n ...this.state.organization,\r\n cityInfo: newValue,\r\n cityId: newValue !== null ? newValue!.id : null\r\n }\r\n });\r\n };\r\n\r\n private handleOrganizationChange = (newValue: Organization | null) => {\r\n this.setState({\r\n organization: {\r\n ...this.state.organization,\r\n parent: newValue,\r\n parentId: newValue !== null ? newValue!.id : 0,\r\n organizationType: newValue !== null ? newValue.organizationType : null\r\n }\r\n });\r\n };\r\n\r\n public saveOrganization = async () => {\r\n try {\r\n if (this.state.organization.id === 0) {\r\n await this.organizationService.AddOrganization(this.state.organization);\r\n } else {\r\n await this.organizationService.UpdateOrganization(this.state.organization);\r\n }\r\n\r\n if (this.props.organizationChanged) {\r\n this.props.organizationChanged();\r\n }\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n private getRegionsOptions(): IReferential[] | undefined {\r\n const filteredRegions = this.state.regionList.filter(\r\n (region) => (this.state.organization.countryId && region.dependencyId) && region.dependencyId === this.state.organization.countryId\r\n );\r\n\r\n return filteredRegions;\r\n }\r\n \r\n private getCitiesOptions(): IReferential[] | undefined {\r\n const filteredCities = this.state.cityList.filter(\r\n (city) => (this.state.organization.regionId && city.dependencyId) && city.dependencyId === this.state.organization.regionId\r\n );\r\n\r\n return filteredCities;\r\n }\r\n\r\n public renderForm() {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n this.handleOrganizationLevelTypeChange(newValue)\r\n }\r\n getOptionLabel={(option: OrganizationLevelType) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n \r\n this.handleOrganizationChange(newValue)\r\n }\r\n getOptionLabel={(option: Organization) => option.name || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n\r\n \r\n this.handleOrganizationTypeChange(newValue)\r\n }\r\n getOptionLabel={(option: OrganizationType) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n this.handleCountryChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n\r\n \r\n \r\n this.handleRegionChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n \r\n this.handleCityInfoChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n \r\n {this.translatorService.Tranlate('EDIT_ORGANIZATION_CANCEL_BTN', 'Anuleaza')}\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n\r\n onTabChange = (event: any, newValue: number) => {\r\n this.setState({ selectedTab: newValue });\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? this.renderForm() : null}\r\n
\r\n \r\n \r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalEditOrganizationsProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\nexport default connect(\r\n (state: ApplicationState) => ({ appState: state.app }),\r\n { ...AppUserAdminActionCreators, ...AppActionCreators },\r\n mergeProps\r\n)(withSnackbar(MavoEditOrganization as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { Organization } from '../../../interfaces/Organization';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport { IOrganizationService } from '../../../services/Interfaces/IOrganizationService';\r\nimport {\r\n Box,\r\n Switch,\r\n Button,\r\n Tooltip,\r\n IconButton,\r\n Dialog,\r\n DialogTitle,\r\n DialogContent,\r\n Typography,\r\n Grid\r\n} from '@material-ui/core';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport MUIDataTable, {\r\n MUIDataTableColumnOptions,\r\n MUIDataTableMeta,\r\n SelectableRows\r\n} from 'mui-datatables';\r\nimport moment from 'moment';\r\nimport { MUITranslations } from '../../../helpers/MUITableTranslations';\r\nimport AddCircleTwoToneIcon from '@material-ui/icons/AddCircleTwoTone';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { IReferential } from '../../../interfaces/IReferential';\r\nimport { isNullOrUndefined } from 'util';\r\nimport EditOrganization from './EditOrganization';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport MavoEditOrganization from './MavoEditOrganization';\r\n\r\ninterface IOrganizationEntitiesState {\r\n organizations: Organization[];\r\n isLoading: boolean;\r\n isOpenDialog: boolean;\r\n selectedOrganizationId: number;\r\n}\r\n\r\ntype IOrganizationEntitiesPros = { appState: AppState } & ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass MavoOrganizationEntities extends React.PureComponent<\r\n IOrganizationEntitiesPros,\r\n IOrganizationEntitiesState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private organizationService!: IOrganizationService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n organizations: [],\r\n isLoading: false,\r\n isOpenDialog: false,\r\n selectedOrganizationId: 0\r\n } as IOrganizationEntitiesState;\r\n\r\n public componentDidMount() {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n\r\n if (Number.isNaN(hoId)) {\r\n return;\r\n }\r\n\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadOrganizations();\r\n }\r\n );\r\n }\r\n\r\n loadOrganizations = async () => {\r\n const hoId = Number.parseInt(this.props.match.params.id);\r\n\r\n if (Number.isNaN(hoId)) {\r\n return;\r\n }\r\n\r\n const orgList = await this.organizationService.GetOrganizationsByHO(hoId, null);\r\n\r\n this.setState({\r\n organizations: orgList,\r\n isLoading: false\r\n });\r\n };\r\n\r\n onRowClick = (e: any, id: number) => {\r\n this.editOrganization(id);\r\n };\r\n\r\n handleIsActiveChange = async (\r\n event: React.ChangeEvent,\r\n tableMeta: MUIDataTableMeta\r\n ) => {\r\n const id = tableMeta.rowData[0];\r\n const newOrganizations = [...this.state.organizations];\r\n const updatedOrgIndex = newOrganizations.findIndex((o) => o.id === id);\r\n\r\n if (updatedOrgIndex >= 0) {\r\n newOrganizations[updatedOrgIndex] = {\r\n ...newOrganizations[updatedOrgIndex],\r\n isActive: event.target.checked\r\n };\r\n\r\n try {\r\n await this.organizationService.UpdateOrganization(newOrganizations[updatedOrgIndex]);\r\n\r\n this.setState({ organizations: newOrganizations });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'name',\r\n label: this.translatorService.Tranlate(\r\n 'ORGANIZATIONS_ORGANIZATION_NAME_HEADER',\r\n 'Organizatie'\r\n ),\r\n options: {\r\n filter: false,\r\n sort: false,\r\n customBodyRender: (value: string, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.onRowClick(e, tableMeta.rowData[0])}\r\n >\r\n {value}\r\n \r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'organizationLevelType',\r\n label: this.translatorService.Tranlate(\r\n 'ORGANIZATION_ENTITIES_HIERARCHY_LEVEL',\r\n 'Nivel ierarhic'\r\n ),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: IReferential) => {\r\n return value.displayName;\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'parent',\r\n label: this.translatorService.Tranlate(\r\n 'ORGANIZATIONS_ORGANIZATION_PARENT_HEADER',\r\n 'Entitate Superioara'\r\n ),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: Organization) => {\r\n return isNullOrUndefined(value) ? '' : value.name;\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'dateModification',\r\n label: this.translatorService.Tranlate(\r\n 'ORGANIZATIONS_DATE_MODIFICATION_HEADER',\r\n 'Data Modificare'\r\n ),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: Date) =>\r\n moment.utc(value).local().format(this.props.appState.longDateFormat)\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'isActive',\r\n label: this.translatorService.Tranlate('USERS_IS_ACTIVE_HEADER', 'Activ'),\r\n options: {\r\n sort: false,\r\n filterOptions: {\r\n names: [\r\n this.translatorService.Tranlate('TABLE_IS_ACTIVE_COLUMN_ACTIVE', 'Activ'),\r\n this.translatorService.Tranlate('TABLE_IS_ACTIVE_COLUMN_INACTIVE', 'Inactiv')\r\n ],\r\n logic(isActive: any, filterVal: string[]) {\r\n const show =\r\n (filterVal.indexOf(this.names[0]) !== -1 && isActive === true) ||\r\n (filterVal.indexOf(this.names[1]) !== -1 && isActive === false);\r\n return !show;\r\n }\r\n },\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n this.handleIsActiveChange(e, tableMeta)}\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n );\r\n }\r\n }\r\n }\r\n ];\r\n\r\n return columns;\r\n };\r\n\r\n editOrganization = (id: number) => {\r\n this.setState({ isOpenDialog: true, selectedOrganizationId: id });\r\n };\r\n\r\n handleClose = (reload: boolean) => {\r\n if (reload) {\r\n this.setState({ isOpenDialog: false }, async () => {\r\n await this.loadOrganizations();\r\n });\r\n } else {\r\n this.setState({ isOpenDialog: false });\r\n }\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n\r\n const options = {\r\n filter: true,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n sort: false,\r\n // responsive: \"stacked\",\r\n customToolbar: () => {\r\n return (\r\n \r\n {\r\n this.setState({ selectedOrganizationId: 0, isOpenDialog: true });\r\n }}\r\n >\r\n \r\n \r\n \r\n );\r\n }\r\n };\r\n\r\n return (\r\n \r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n ) : null}\r\n
\r\n\r\n \r\n \r\n \r\n \r\n \r\n {this.translatorService.Tranlate(\r\n 'ORGANIZATION_EDIT_MODAL_TITLE',\r\n 'Editare Organizatie'\r\n )}\r\n \r\n \r\n \r\n this.handleClose(false)}\r\n size={'small'}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n this.handleClose(true)}\r\n />\r\n \r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app\r\n }),\r\n null\r\n)(withSnackbar(MavoOrganizationEntities as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState } from '../../../store';\r\nimport { withSnackbar } from 'notistack';\r\nimport { Card, Tabs, Tab, CardContent, Box } from '@material-ui/core';\r\nimport TabPanel from '../../_shared/Tabs';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { IOrganizationService } from '../../../services/Interfaces/IOrganizationService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport OrganizationEntities from '../organizations/OrganizationEntities';\r\nimport OrganizationHierarchy from '../organizations/OrganizationHierarchy';\r\nimport MavoOrganizationEntities from './MavoOrganizationEntities';\r\n\r\ninterface IOrganizationDetailsTabState {\r\n selectedTab: number;\r\n}\r\nclass MavoOrganizationDetailsTab extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private organizationService!: IOrganizationService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = { selectedTab: 0 };\r\n\r\n onTabChange = (event: any, newValue: number) => {\r\n this.setState({ selectedTab: newValue });\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app\r\n }),\r\n null\r\n)(withSnackbar(MavoOrganizationDetailsTab as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { Grid, Button, Box } from '@material-ui/core';\r\nimport OrganizationDetailsTab from '../organizations/OrganizationDetailsTab';\r\nimport { AppContext, ApplicationContext } from '../../../context/Contexts';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { IOrganizationService } from '../../../services/Interfaces/IOrganizationService';\r\nimport OrganizationUsers from '../organizations/OrganizationUsers';\r\nimport OrganizationInterfaces from '../organizations/OrganizationInterfaces';\r\nimport OrganizationParameters from '../organizations/OrganizationParameters';\r\nimport OrganizationNewCaseType from './organizationCase/OrganizationNewCaseType';\r\nimport OrganizationTariffs from '../tariffs/Tariffs';\r\nimport Workflows from '../workflows/Workflows';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { PageTitle } from '../../../layout-components';\r\nimport OrganizationFilters from '../../admin/organizations/OrganizationFilters';\r\nimport { Organization } from '../../../interfaces/Organization';\r\nimport MavoOrganizationDetailsTab from './MavoOrganizationDetailsTab';\r\n\r\ninterface IOrganizationAdminStateState {\r\n selectedTab: number;\r\n organization: Organization | null;\r\n}\r\n\r\ntype IOrganizationAdminProps = { appState: AppState } & ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\nclass MavoOrganizationAdmin extends React.PureComponent<\r\n IOrganizationAdminProps,\r\n IOrganizationAdminStateState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private organizationService!: IOrganizationService;\r\n\r\n static contextType = ApplicationContext;\r\n state = {\r\n selectedTab: 0,\r\n organization: null\r\n } as IOrganizationAdminStateState;\r\n\r\n componentDidMount = async () => {\r\n const orgId = Number.parseInt(this.props.match.params.id);\r\n\r\n if (Number.isNaN(orgId)) {\r\n return;\r\n }\r\n const organizations = await this.organizationService.GetUserOrganizationsByIds([orgId]);\r\n\r\n this.setState({\r\n organization: organizations.length === 1 ? organizations[0] : null\r\n });\r\n };\r\n\r\n onButtonClick = (newValue: number) => {\r\n this.setState({ selectedTab: newValue });\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n this.onButtonClick(0)}\r\n >\r\n \r\n {this.translatorService.Tranlate(\r\n 'ORGANIZATIONS_TAB_GENERAL_DATA',\r\n 'Date Generale'\r\n )}\r\n \r\n \r\n \r\n \r\n this.onButtonClick(1)}\r\n >\r\n {this.translatorService.Tranlate('ORGANIZATIONS_TAB_USERS', 'Utilizatori')}\r\n \r\n \r\n \r\n \r\n \r\n {this.state.selectedTab === 0 ? (\r\n \r\n ) : null}\r\n {this.state.selectedTab === 1 ? (\r\n \r\n ) : null}\r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app\r\n }),\r\n null\r\n)(withSnackbar(MavoOrganizationAdmin as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport {\r\n Box,\r\n Button,\r\n IconButton,\r\n Dialog,\r\n DialogTitle,\r\n Grid,\r\n Typography,\r\n DialogContent\r\n} from '@material-ui/core';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ValidatorForm, TextValidator } from 'react-material-ui-form-validator';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport MUIDataTable, {\r\n SelectableRows,\r\n MUIDataTableMeta,\r\n MUIDataTableColumnOptions\r\n} from 'mui-datatables';\r\nimport { MUITranslations } from '../../../helpers/MUITableTranslations';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport { ReferentialCode } from '../../../helpers/Constants';\r\nimport Referentials from '../../../helpers/Referentials.json';\r\nimport { ICaseService } from '../../../services/Interfaces/ICaseService';\r\nimport { IReferential } from '../../../interfaces/IReferential';\r\nimport moment from 'moment';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport EditOutlinedIcon from '@material-ui/icons/EditOutlined';\r\nimport { Model } from '../../../interfaces/Case';\r\n\r\ninterface IModelCarClassState {\r\n newModel: Model;\r\n carClasses: IReferential[];\r\n modelList: Model[];\r\n isLoading: boolean;\r\n isDialogOpen: boolean;\r\n newModelId: number | null;\r\n}\r\n\r\ntype IModelCarClassProps = { appState: AppState } & ProviderContext &\r\n RouteComponentProps<{ id: string; workflowId: string }>;\r\n\r\nclass ModelCarClass extends React.PureComponent<\r\n IModelCarClassProps,\r\n IModelCarClassState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private caseService!: ICaseService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n\r\n static contextType = ApplicationContext;\r\n private newModel = {\r\n id: 0,\r\n carClassId: 0\r\n } as unknown as Model;\r\n\r\n state = {\r\n modelList: [],\r\n isLoading: false,\r\n selectedFilter: 0,\r\n isDialogOpen: false,\r\n newModel: this.newModel,\r\n carClasses: [],\r\n newModelId: null\r\n } as IModelCarClassState;\r\n\r\n public componentDidMount() {\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadModels();\r\n }\r\n );\r\n }\r\n\r\n loadModels = async () => {\r\n const models = await this.caseService.GetModelList();\r\n const ref = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.CarClass\r\n );\r\n const carClasses = (await this.appReferentialService.Get(ref!.baseUrl)).filter((item) => item.isActive === true);\r\n\r\n this.setState({\r\n modelList: models,\r\n isLoading: false,\r\n carClasses: carClasses,\r\n newModel: { ...this.newModel }\r\n });\r\n };\r\n\r\n private handleCarClassChange = (newValue: IReferential | null) => {\r\n this.setState({\r\n newModel: {\r\n ...this.state.newModel,\r\n carClass: newValue,\r\n carClassId: newValue !== null ? newValue!.id : 0\r\n }\r\n });\r\n };\r\n\r\n public updateCarClassModel = async () => {\r\n try {\r\n await this.caseService.UpdateCarClassModel(this.state.newModel);\r\n\r\n await this.loadModels();\r\n\r\n this.closeDialog();\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n public renderAddForm() {\r\n return (\r\n \r\n \r\n this.handleCarClassChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n \r\n {this.translatorService.Tranlate('EDIT_ORGANIZATION_CANCEL_BTN', 'Anuleaza')}\r\n \r\n \r\n
\r\n
\r\n );\r\n }\r\n\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'brand',\r\n label: this.translatorService.Tranlate(\r\n 'CASE_VALUATION_BRAND_LABEL',\r\n 'Marca'\r\n )\r\n },\r\n {\r\n name: 'name',\r\n label: this.translatorService.Tranlate(\r\n 'CASE_VALUATION_MODEL_LABEL',\r\n 'Model'\r\n )\r\n },\r\n {\r\n name: 'description',\r\n label: this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_DESCRIPTION_HEADER',\r\n 'Descriere'\r\n )\r\n },\r\n {\r\n name: 'carClass',\r\n label: this.translatorService.Tranlate(\r\n 'CAR_CLASS',\r\n 'Clasa masina'\r\n ),\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: IReferential) => {\r\n return value ? value.name : null;\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'dateModification',\r\n label: this.translatorService.Tranlate('USERS_DATE_MODIFICATION_HEADER', 'Data Modificare'),\r\n options: {\r\n filter: false,\r\n sortDirection: 'desc',\r\n customBodyRender: (value: Date) =>\r\n moment.utc(value).local().format(this.props.appState.longDateFormat)\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: '',\r\n options: {\r\n viewColumns: false,\r\n filter: false,\r\n setCellHeaderProps: () => ({ align: 'center' }),\r\n setCellProps: () => ({ align: 'center' }),\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n <>\r\n this.newCarClassPopup(tableMeta.rowData[0])}\r\n >\r\n \r\n \r\n \r\n );\r\n }\r\n }\r\n }];\r\n\r\n return columns;\r\n };\r\n\r\n newCarClassPopup = async (modelId: number | null) => {\r\n let newModel: Model;\r\n if (modelId == null) {\r\n newModel = { ...this.state.newModel } as Model;\r\n } else {\r\n newModel = this.state.modelList.find((item) => item.id === modelId)!;\r\n }\r\n this.setState({\r\n isDialogOpen: true,\r\n newModel: newModel,\r\n newModelId: modelId\r\n });\r\n };\r\n\r\n closeDialog = async () => {\r\n this.setState(\r\n { \r\n isDialogOpen: false, \r\n newModel: this.newModel \r\n }\r\n );\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n const options = {\r\n filter: true,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n sort: true\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n ) : null}\r\n
\r\n \r\n \r\n \r\n \r\n \r\n {this.translatorService.Tranlate('MODEL_CAR_CLASS_UPDATE_MODAL_TITLE', 'Actualizeaza clasa masina')} \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.renderAddForm()}\r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app\r\n }),\r\n null\r\n)(withSnackbar(ModelCarClass as any));\r\n","import React, { useMemo } from 'react';\r\nimport { Box } from '@material-ui/core';\r\nimport { useAppDispatch, useAppSelector } from '../../store/configureStore';\r\nimport { AGENDA_SET_SELECTED_RANGE } from '../../store/actions/ActionTypes';\r\nimport Calendar from 'react-calendar';\r\nimport 'react-calendar/dist/Calendar.css';\r\nimport { appointmentsInDay } from '../../utils/appointments';\r\nimport { AppointmentStatusCodeEnum } from '../../helpers/Constants';\r\nimport moment from 'moment';\r\n\r\nexport const SmallCalendar = ({ getAppointments, setModalOpen }:any) => {\r\n const selectedRange = useAppSelector((state) => state.agenda?.selectedRange);\r\n const appointments = useAppSelector((state) => state.agenda?.appointments.filter((appointment) => appointment?.appointmentStatus?.code !== AppointmentStatusCodeEnum.CANCELED.toString()));\r\n const dispatch = useAppDispatch();\r\n const dateFormat = useAppSelector((state) => state.app?.dateFormat);\r\n \r\n const currentRange = useMemo(() => {\r\n if (!selectedRange) {\r\n return [new Date(), new Date()];\r\n }\r\n\r\n return [selectedRange?.start_date, selectedRange?.end_date];\r\n }, [selectedRange]);\r\n\r\n const onChangeDate = (date:any) =>{\r\n // If date is array, with 2 elements, it's range\r\n if (date?.length === 2) {\r\n dispatch({\r\n type: AGENDA_SET_SELECTED_RANGE,\r\n payload: {\r\n start_date: date[0],\r\n end_date: date[1]\r\n }\r\n });\r\n getAppointments({\r\n dateFilterStartDate: date[0],\r\n datefilterEndDate: date[1]\r\n })\r\n setModalOpen(false);\r\n return;\r\n }\r\n const newDate = new Date(date);\r\n newDate.setHours(23);\r\n newDate.setMinutes(59);\r\n newDate.setSeconds(59);\r\n dispatch({\r\n type: AGENDA_SET_SELECTED_RANGE,\r\n payload: {\r\n start_date: date,\r\n end_date: newDate\r\n }\r\n });\r\n getAppointments({\r\n dateFilterStartDate: date,\r\n datefilterEndDate: newDate\r\n })\r\n setModalOpen(false);\r\n }\r\n\r\n return (\r\n \r\n {\r\n const appoimentsForDate = appointmentsInDay(date, appointments, dateFormat || 'DD/MM/YYYY');\r\n if (appoimentsForDate.length > 0) {\r\n return (\r\n \r\n {appoimentsForDate.length}\r\n \r\n );\r\n }\r\n }}\r\n key={selectedRange?.start_date?.toString()}\r\n value={currentRange}\r\n showNeighboringMonth={false}\r\n onChange={(date:any) =>onChangeDate(date)}\r\n locale={moment.locale()}\r\n />\r\n \r\n );\r\n};\r\n\r\nconst getColorHueIntensity = (intensity: number) => {\r\n // blue from light to dark\r\n if (intensity < 20) {\r\n return 'hsl(359, 100%, 90%)';\r\n }\r\n if (intensity < 40) {\r\n return 'hsl(359, 100%, 80%)';\r\n }\r\n\r\n if (intensity < 60) {\r\n return 'hsl(359, 100%, 70%)';\r\n }\r\n\r\n if (intensity < 80) {\r\n return 'hsl(359, 100%, 60%)';\r\n }\r\n\r\n if (intensity < 100) {\r\n return 'hsl(359, 100%, 50%)';\r\n }\r\n\r\n return 'hsl(359, 100%, 40%)';\r\n};\r\n","import React, { useEffect, useState } from 'react';\r\nimport {\r\n Box,\r\n Button,\r\n Dialog,\r\n Grid,\r\n IconButton,\r\n Typography\r\n} from '@material-ui/core';\r\nimport { useSnackbar } from 'notistack';\r\nimport { WorkflowService } from '../../services/WorkflowService';\r\nimport { Organization } from '../../interfaces/Organization';\r\nimport { TranslatorService } from '../../services/TranslatorService';\r\nimport { isNullOrUndefined } from 'util';\r\nimport { OrganizationService } from '../../services/OrganizationService';\r\nimport { Workflow } from '../../interfaces/Workflow';\r\nimport { Close } from '@material-ui/icons';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { newAppointmentCase } from './agenda.requests';\r\nimport { useHistory } from 'react-router';\r\nimport { Case } from '../../interfaces/Case';\r\nimport { ReferentialService } from '../../services/ReferentialService';\r\nimport { CaseTypeCodeEnum, ReferentialCode } from '../../helpers/Constants';\r\nimport Referentials from '../../helpers/Referentials.json';\r\n\r\nexport const NewCaseAppointment = ({appAppointmentId, close}: any) => {\r\n const translatorService = new TranslatorService();\r\n\r\n const history = useHistory();\r\n const { enqueueSnackbar } = useSnackbar();\r\n const [isLoading, setIsLoading] = useState(false)\r\n const [selectedItem, setSelectedItem] = useState(null);\r\n const [workflows, setWorkflows] = useState>([]);\r\n const [organizations, setOrganizations] = useState>([]);\r\n\r\n const loadData = async () =>{\r\n const workflowServiceInstance = new WorkflowService();\r\n const organizationServiceInstance = new OrganizationService();\r\n const appReferentialServiceInstance = new ReferentialService([]);\r\n const refCaseType = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.CaseType\r\n );\r\n \r\n const [workflows, orgCaseTypes] = await Promise.all([\r\n workflowServiceInstance.GetUserWorkflows(),\r\n appReferentialServiceInstance.Get(refCaseType!.baseUrl)\r\n ]);\r\n const owners = await organizationServiceInstance.GetUserOrganizationsByIds(\r\n Array.from(new Set(workflows.map((item) => item.organizationOwnerId)))\r\n );\r\n workflows.forEach((w) => {\r\n const owner = owners.find((item) => item.id === w.organizationOwnerId);\r\n w.organizationOwner = isNullOrUndefined(owner) ? null : owner;\r\n\r\n const orgCaseType = orgCaseTypes.find((item) => item.id == w.caseTypeId);\r\n w.caseType = isNullOrUndefined(orgCaseType) ? null : orgCaseType;\r\n });\r\n\r\n const futureOrganizations: Organization[] = [];\r\n workflows.forEach((w) => {\r\n if (futureOrganizations.find((item) => item.id === w.organizationOwnerId) === undefined) {\r\n futureOrganizations.push(w.organizationOwner!);\r\n }\r\n });\r\n\r\n let counter = 0;\r\n let item = null;\r\n futureOrganizations?.forEach((org) => {\r\n workflows?.forEach((w) => {\r\n if ( w?.organizationOwnerId === org?.id && w.caseType?.code === CaseTypeCodeEnum.REPARATIE.toString()){\r\n counter ++;\r\n item = w;\r\n }\r\n })\r\n })\r\n\r\n if (counter > 1 || !item){\r\n setOrganizations(futureOrganizations)\r\n setWorkflows(workflows);\r\n }else if(counter === 1 && item){\r\n createCase(item)\r\n }\r\n }\r\n\r\n const createCase = async (item?:Workflow) => {\r\n if (isNullOrUndefined(selectedItem) && isNullOrUndefined(item)) {\r\n return;\r\n }\r\n setIsLoading(true);\r\n try {\r\n const res = await newAppointmentCase({ appointmentId: appAppointmentId, workflowId: selectedItem ? selectedItem.id : item?.id })\r\n const newCase = res.data as Case\r\n history.push('/cases/' + newCase!.id, 'Case xx');\r\n setIsLoading(false);\r\n } catch (ex:any) {\r\n setIsLoading(false);\r\n enqueueSnackbar(\r\n translatorService.Tranlate(ex.response.data, 'Eroare creare dosar!'),\r\n {\r\n variant: 'error',\r\n autoHideDuration: 5000\r\n }\r\n );\r\n console.log(ex.response.data);\r\n }\r\n };\r\n\r\n useEffect(()=>{\r\n loadData(); \r\n },[])\r\n\r\n return (<>\r\n {isLoading || !organizations?.length || !workflows?.length ? <>:\r\n {\r\n return;\r\n }}\r\n aria-labelledby=\"customized-dialog-title\"\r\n open={Boolean(appAppointmentId)}\r\n fullWidth\r\n maxWidth={'md'}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n {organizations?.length > 0 && workflows?.length > 0 ? organizations?.map((org, index) => (\r\n \r\n \r\n {org?.displayName}\r\n \r\n \r\n {workflows\r\n .filter((w) => w.organizationOwnerId === org?.id)\r\n .map((item, index) => (\r\n \r\n \r\n {\r\n setSelectedItem(item);\r\n }}\r\n >\r\n {item.displayName}\r\n \r\n \r\n \r\n ))}\r\n \r\n )) :\r\n
\r\n \r\n
}\r\n \r\n \r\n \r\n\r\n \r\n}\r\n \r\n\r\n );\r\n};\r\n","import { Car, Client } from \"../components/agenda/agenda.types\";\r\nimport { ITranslation } from \"../interfaces/IReferential\";\r\nimport { Organization } from \"../interfaces/Organization\";\r\n\r\nexport type AppointmentStatusType = {\r\n code: string;\r\n name: string,\r\n id: number;\r\n translations: ITranslation[];\r\n}\r\n\r\nexport type AppointmentHistoryType = {\r\n date: string;\r\n appointmentStatusId: number;\r\n userId: string;\r\n user?: any;\r\n appointmentStatus?: AppointmentStatusType;\r\n comment: string;\r\n}\r\n\r\nexport type AppointmentFiltersPayloadType = {\r\n appointmentIds: string[];\r\n services: Organization[];\r\n formatedDateList: string[];\r\n formatedHourList: string[];\r\n makeList: string[];\r\n modelList: string[];\r\n plateNumberList: string[];\r\n formattedDateCreationList: string[];\r\n formattedHourCreationList: string[];\r\n appointmentStatuses: AppointmentStatusType[];\r\n appAppointmentIds: number[];\r\n appointmentCategoryTypes: AppointmentCategoryType[];\r\n}\r\n\r\nexport type AppointmentCategoryType = {\r\n code: string;\r\n name: string,\r\n id: number;\r\n translations: ITranslation[];\r\n}\r\n\r\nexport type AppointmentType = {\r\n id: number;\r\n appAppointmentId?: number;\r\n id_service: number;\r\n id_user: number;\r\n id_car: number;\r\n nr_km: number;\r\n type: string;\r\n datetime: string;\r\n confirmation: boolean;\r\n status: number;\r\n created_at: string;\r\n updated_at: string;\r\n reschedule: string;\r\n final: string;\r\n schedule_rem: number;\r\n schedule_notif: number;\r\n cancel: string;\r\n callresch: number;\r\n final_date_time: string;\r\n obs: string;\r\n contactp: string;\r\n date: string;\r\n appointmentStatus?: AppointmentStatusType\r\n appointmentClient?: Client\r\n vehicle: Car\r\n appointmentJobTypes: Option[];\r\n jobDetails?: string,\r\n appEmail?: string,\r\n appFirstName?: string,\r\n appLastName?: string,\r\n appPhone?: string,\r\n appUsername?: string\r\n appointmentStatusHistories?: AppointmentHistoryType[]\r\n caseId?: number;\r\n appointmentStatusId?: number;\r\n appointmentClientSelections: AppointmentClientSelection[],\r\n serviceId: number;\r\n service: Organization | null;\r\n parentId?: number;\r\n appointmentCategoryType: AppointmentCategoryType;\r\n hideCancelButton: boolean;\r\n};\r\n\r\nexport interface Option {\r\n name: string;\r\n id: number;\r\n jobTypeId?: number;\r\n translations: ITranslation[];\r\n}\r\nexport type AppointmentsFiltersType = {\r\n dateFilterStartDate?: string,\r\n datefilterEndDate?: string,\r\n text?: string,\r\n page?: number,\r\n pageSize?: number;\r\n formatedDateList?: string;\r\n includedAdditionalData?: boolean;\r\n viewPartnerAppointments?: boolean;\r\n organizationOwnerId?: number | null;\r\n serviceIds?: number[];\r\n}\r\n\r\nexport type ResponseAppointmentsData = {\r\n appointments: AppointmentType[];\r\n page: number;\r\n total: number;\r\n}\r\n\r\nexport type CarRequestType = {\r\n vin: string | null;\r\n firstPlateDate: string | null;\r\n plateNumber: string | null;\r\n numberOfKilometers: string | null;\r\n model: string | null;\r\n make: string | null\r\n}\r\n\r\nexport type AppointmentRequestPayload = {\r\n serviceId?: number,\r\n appointmentClient?: Client | null,\r\n vehicle: CarRequestType,\r\n date: string,\r\n appointmentJobTypes?: Array<{ id: number, name: string }>,\r\n jobDetails?: string,\r\n appFirstName: string,\r\n appLastName: string,\r\n appEmail: string,\r\n appPhone: string,\r\n appUsername: string,\r\n inAppointment?: boolean,\r\n appointmentCategoryTypeId: number\r\n parentId?: number;\r\n workflowId?: number;\r\n caseId?: number\r\n\r\n}\r\n\r\nexport type ChangeAppointmentStatusPayload = {\r\n appointmentId: number,\r\n statusId: number,\r\n date?: string\r\n appointmentClientSelectionId?: number;\r\n comment?: string\r\n}\r\n\r\nexport interface AppointmentClientSelection {\r\n id: number;\r\n appointmentId: number;\r\n date: string;\r\n isSelected: boolean;\r\n isClientSelection: boolean;\r\n}\r\n\r\nexport enum AppointmentFilterStateKeys {\r\n appointmentIds = 0,\r\n services = 1,\r\n formattedDateCreationList = 2,\r\n formattedHourCreationList = 3,\r\n makeList = 4,\r\n modelList = 5,\r\n plateNumberList = 6,\r\n formatedDateList = 7,\r\n formatedHourList = 8,\r\n appointmentStatuses = 9,\r\n appAppointmentIds = 10,\r\n appointmentCategoryTypes = 11\r\n}\r\n\r\nexport enum AppointmentTableColumns {\r\n 'id' = 'appointmentIds',\r\n 'service.name' = 'services',\r\n 'vehicle.model.brand' = 'makeList',\r\n 'vehicle.model.name' = 'modelList',\r\n 'vehicle.plateNumber' = 'plateNumberList',\r\n 'appointmentStatus' = 'appointmentStatuses',\r\n 'appAppointmentId' = 'appAppointmentIds',\r\n 'appointmentCategoryType' = 'appointmentCategoryTypes'\r\n}\r\n","import { FormControl, InputLabel, MenuItem, Select } from \"@material-ui/core\";\r\nimport React, { useContext } from 'react';\r\nimport { ApplicationContext } from \"../../context/Contexts\";\r\n\r\nconst MenuProps = {\r\n anchorOrigin: {\r\n vertical: \"bottom\",\r\n horizontal: \"left\"\r\n },\r\n transformOrigin: {\r\n vertical: \"top\",\r\n horizontal: \"left\"\r\n },\r\n getContentAnchorEl: null,\r\n PaperProps: {\r\n style: {\r\n maxHeight: 300,\r\n },\r\n },\r\n};\r\n\r\ninterface DropDownSelectProps { \r\n filterList: any, \r\n onChange: any, \r\n index: number, \r\n column: any, \r\n optionValues: any,\r\n name:string\r\n}\r\n\r\n\r\n\r\nexport const DropDownSelect = ({ filterList, onChange, index, column, optionValues, name }: DropDownSelectProps) => {\r\n const context = useContext(ApplicationContext);\r\n const translatorService = context.translatorService;\r\n const allValue = translatorService.Tranlate('APPOINTMENT_TABLE_ALL_VALUE', 'Toate');\r\n\r\n return \r\n {name}\r\n 0 ? filterList[index] : []}\r\n onChange={(e) => {\r\n let futureFilterList: any = e.target.value;\r\n if (futureFilterList?.length > 1 && futureFilterList[0] === allValue) {\r\n futureFilterList?.shift()\r\n filterList[index] = futureFilterList;\r\n }\r\n\r\n if (futureFilterList?.length > 1 && futureFilterList[futureFilterList?.length - 1] === allValue) {\r\n futureFilterList = [allValue];\r\n }\r\n onChange(futureFilterList, index, column);\r\n }}\r\n MenuProps={MenuProps}\r\n >\r\n {optionValues?.map((name: string) => (\r\n \r\n {name}\r\n \r\n ))}\r\n \r\n \r\n}\r\n","import React, { useContext, useEffect, useMemo, useState } from 'react';\r\nimport MUIDataTable, { MUIDataTableColumn, MUIDataTableColumnOptions, MUIDataTableMeta, SelectableRows } from 'mui-datatables';\r\nimport { MUITranslations } from '../../helpers/MUITableTranslations';\r\nimport { Box, Button, FormControl, IconButton, InputLabel, ListItemText, MenuItem, Select, Tooltip } from '@material-ui/core';\r\nimport AddCircleTwoToneIcon from '@material-ui/icons/AddCircleTwoTone';\r\nimport moment from 'moment';\r\nimport { ApplicationContext } from '../../context/Contexts';\r\nimport { useAppSelector } from '../../store/configureStore';\r\nimport { getDay, getHour } from '../../utils/appointments';\r\nimport { useHistory } from 'react-router';\r\nimport { CreateNewFolder, Visibility } from '@material-ui/icons';\r\nimport { NewCaseAppointment } from './NewCaseAppointment';\r\nimport Folder from '@material-ui/icons/Folder';\r\nimport { AppointmentFilterStateKeys, AppointmentFiltersPayloadType, AppointmentTableColumns, AppointmentType, AppointmentsFiltersType } from '../../types/Agenda';\r\nimport * as R from 'ramda';\r\nimport { getAppointmentFiltersRequest } from './agenda.requests';\r\nimport { DropDownSelect } from './DropDownSelect';\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { MuiThemeProvider, createMuiTheme } from '@material-ui/core';\r\nimport { Organization } from '../../interfaces/Organization';\r\n\r\nconst initialFilters: AppointmentFiltersPayloadType = {\r\n appointmentIds: [],\r\n services: [],\r\n formatedDateList: [],\r\n formatedHourList: [],\r\n makeList: [],\r\n modelList: [],\r\n plateNumberList: [],\r\n appointmentStatuses: [],\r\n formattedDateCreationList: [],\r\n formattedHourCreationList: [],\r\n appAppointmentIds: [],\r\n appointmentCategoryTypes: [],\r\n}\r\n\r\ntype AppointmentTableProps = {\r\n appointments: AppointmentType[],\r\n getAppointment: (filter: AppointmentsFiltersType) => void,\r\n tableProps: any,\r\n setOpenModal: any\r\n}\r\n\r\nexport const AppointmentsTable = ({ appointments, getAppointment, tableProps, setOpenModal }: AppointmentTableProps) => {\r\n const context = useContext(ApplicationContext);\r\n const history = useHistory();\r\n const translatorService = context.translatorService;\r\n const language = useAppSelector((state) => state.app?.language)\r\n const statusList = useAppSelector((state) => state.agenda?.statusList)\r\n const [filters, setFilters] = useState();\r\n const [appointmentId, setAppointmentId] = useState(null);\r\n const [isLoading, setIsLoading] = useState(false);\r\n const [selectedfilters, setSelectedFilters] = useState(initialFilters)\r\n const allValue = translatorService.Tranlate('APPOINTMENT_TABLE_ALL_VALUE', 'Toate');\r\n const [formatedHours, setFormatedHours] = useState();\r\n const longDateFormat = useAppSelector((state) => state.app?.longDateFormat);\r\n const dateFormat = useAppSelector((state) => state.app?.dateFormat);\r\n const viewPartnerAppointments = useAppSelector((state) => state.app?.appUser?.organization?.viewOwnerEntries ?? false);\r\n const organizationId = useAppSelector((state) => state.app?.appUser?.organization?.id ?? null);\r\n\r\n const getAppointmentFilters = async () => {\r\n setIsLoading(false)\r\n const res = await getAppointmentFiltersRequest(viewPartnerAppointments ? organizationId : null);\r\n const filters = res.data as AppointmentFiltersPayloadType\r\n if (res.error || !filters) {\r\n setIsLoading(false)\r\n return;\r\n }\r\n const formattedHourCreationListToLocal = filters?.formattedHourCreationList.map((item) => {\r\n return getHour(moment\r\n ?.utc(item)\r\n ?.local()\r\n ?.format(longDateFormat || 'DD/MM/YYYY HH:mm'))\r\n })\r\n setFormatedHours(formattedHourCreationListToLocal);\r\n setFilters(filters)\r\n setIsLoading(false)\r\n }\r\n\r\n const getStatusIds = (filterList: any) => {\r\n const statusList: any = [];\r\n const statusNameMap: { [key: string]: string } = {};\r\n filterList.appointmentStatuses?.forEach((selectedStatus: string) => {\r\n statusNameMap[selectedStatus] = selectedStatus;\r\n });\r\n filters?.appointmentStatuses?.forEach((status: any) => {\r\n const index = status.translations.findIndex((translation: any) => statusNameMap[translation.name]);\r\n if (index !== -1) {\r\n statusList.push(status.id);\r\n }\r\n });\r\n return statusList;\r\n };\r\n\r\n const getServiceIds = (filterList: any) => {\r\n const serviceList: any[] = [];\r\n const serviceNameMap: { [key: string]: string } = {};\r\n\r\n // Construim maparea cu serviciile selectate\r\n filterList.services?.forEach((selectedService: string) => {\r\n serviceNameMap[selectedService] = selectedService;\r\n });\r\n\r\n // Iterăm prin toate serviciile disponibile și verificăm dacă există în mapare\r\n filters?.services?.forEach((service: Organization) => {\r\n if (serviceNameMap[service.name]) {\r\n serviceList.push(service.id);\r\n }\r\n });\r\n\r\n return serviceList;\r\n };\r\n\r\n\r\n const getAppointmentCategoryTypeIds = (filterList: any) => {\r\n const appointmentCategoryTypeList: any = [];\r\n const appointmentCategoryTypeNameMap: { [key: string]: string } = {};\r\n filterList.appointmentCategoryTypes?.forEach((selectedAppointmentCategoryType: string) => {\r\n appointmentCategoryTypeNameMap[selectedAppointmentCategoryType] = selectedAppointmentCategoryType;\r\n });\r\n\r\n filters?.appointmentCategoryTypes?.forEach((status: any) => {\r\n const index = status.translations.findIndex((translation: any) => appointmentCategoryTypeNameMap[translation.name]);\r\n if (index !== -1) {\r\n appointmentCategoryTypeList.push(status.id);\r\n }\r\n });\r\n\r\n return appointmentCategoryTypeList;\r\n };\r\n\r\n const getFormatedHour = (selectedValue: string[]) => {\r\n const futureArray = selectedValue.map((hour) => {\r\n const index = formatedHours?.findIndex((val) => val === hour);\r\n return getHour(filters?.formattedHourCreationList[index])\r\n })\r\n return futureArray;\r\n }\r\n\r\n const generatePayload = (filterList: AppointmentFiltersPayloadType) => {\r\n const payload = JSON.parse(JSON.stringify(filterList));\r\n const statusIds = payload.appointmentStatuses?.length > 0 ? getStatusIds(payload) : [];\r\n delete payload.appointmentStatuses\r\n\r\n const appointmentCategoryTypeIds = payload.appointmentCategoryTypes?.length > 0 ? getAppointmentCategoryTypeIds(futureFilterList) : [];\r\n delete payload.appointmentCategoryTypes;\r\n\r\n const serviceIds = payload.services?.length > 0 ? getServiceIds(payload) : [];\r\n delete payload.services;\r\n return {\r\n ...payload,\r\n statusIds: statusIds,\r\n appointmentCategoryTypeIds: appointmentCategoryTypeIds,\r\n serviceIds: serviceIds,\r\n }\r\n }\r\n\r\n const applyFilters = (currentFilterList: any) => {\r\n const futureFilterList: any = { ...selectedfilters };\r\n Object.keys(selectedfilters).map((key: string) => {\r\n const selectedValue = currentFilterList[AppointmentFilterStateKeys[key]];\r\n if (key === 'formattedHourCreationList') {\r\n futureFilterList[key] = selectedValue[0] === allValue ? [...new Set(formatedHours)] : selectedValue?.length === 0 ? getFormatedHour(selectedValue) : getFormatedHour(selectedfilters[key])\r\n } else {\r\n futureFilterList[key] = selectedValue[0] === allValue ? filters[key] : selectedValue?.length === 0 ? selectedfilters[key] : selectedValue\r\n }\r\n });\r\n setSelectedFilters(futureFilterList);\r\n const filterPayload = generatePayload(futureFilterList);\r\n\r\n getAppointment({\r\n ...filterPayload,\r\n includedAdditionalData: true,\r\n organizationOwnerId: viewPartnerAppointments ? organizationId : null,\r\n page: 1,\r\n pageSize: tableProps?.rowsPerPage,\r\n })\r\n }\r\n\r\n useEffect(() => {\r\n if (language) {\r\n getAppointmentFilters();\r\n }\r\n }, [])\r\n\r\n const options = {\r\n filter: true,\r\n serverSide: true,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n responsive: 'scroll',\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(translatorService),\r\n enableNestedDataAccess: '.',\r\n sort: false,\r\n count: tableProps?.total || 0,\r\n page: tableProps?.page || 0,\r\n rowsPerPage: tableProps?.rowsPerPage || 10,\r\n data: appointments,\r\n displayData: appointments,\r\n searchText: tableProps?.search || '',\r\n // responsive: \"stacked\",\r\n onTableChange: (action: string, tableState: any) => {\r\n if (action === 'changeRowsPerPage' || action === \"changePage\") {\r\n const filterPayload = generatePayload(selectedfilters);\r\n\r\n getAppointment({\r\n ...filterPayload,\r\n page: tableState?.page + 1,\r\n pageSize: tableState?.rowsPerPage,\r\n text: tableState?.searchText,\r\n includedAdditionalData: true,\r\n organizationOwnerId: viewPartnerAppointments ? organizationId : null,\r\n })\r\n } else if (action === 'search') {\r\n const filterPayload = generatePayload(selectedfilters);\r\n\r\n getAppointment({\r\n ...filterPayload,\r\n page: 1,\r\n pageSize: tableState?.rowsPerPage,\r\n text: tableState?.searchText,\r\n includedAdditionalData: true,\r\n organizationOwnerId: viewPartnerAppointments ? organizationId : null,\r\n })\r\n }\r\n\r\n },\r\n customToolbar: () => {\r\n return (<>\r\n \r\n {\r\n history.push('/appointment')\r\n }}\r\n >\r\n \r\n \r\n \r\n \r\n setOpenModal(true)}\r\n >\r\n \r\n \r\n \r\n\r\n \r\n\r\n );\r\n },\r\n onFilterChange: (column, filterList, type) => {\r\n if (type === 'reset') {\r\n setSelectedFilters(initialFilters)\r\n } else if (type === 'custom' && selectedfilters[AppointmentTableColumns[column as keyof typeof AppointmentTableColumns]]?.length !== 0 && column !== 'date' && column !== 'dateCreation') {\r\n const futureFilterList: AppointmentFiltersPayloadType = JSON.parse(JSON.stringify(selectedfilters));\r\n futureFilterList[AppointmentTableColumns[column as keyof typeof AppointmentTableColumns]] = [];\r\n setSelectedFilters(futureFilterList)\r\n }\r\n },\r\n\r\n customFilterDialogFooter: (currentFilterList: any, applyNewFilters: any) => {\r\n return (\r\n
\r\n { applyFilters(currentFilterList) }}\r\n >\r\n\r\n {translatorService.Tranlate('APPOINTMENT_TABLE_APPLY_FILTERS', 'Apply Filters')}\r\n \r\n
\r\n );\r\n },\r\n };\r\n\r\n const COLUMNS: MUIDataTableColumn[] = useMemo(\r\n () => [\r\n {\r\n name: 'id',\r\n label: translatorService.Tranlate('APPOINTMENT_TABLE_NO', 'No.'),\r\n options: {\r\n filter: true,\r\n display: 'true',\r\n filterType: 'custom',\r\n filterOptions: {\r\n display: (filterList, onChange, index, column) => {\r\n const futureFilterList = JSON.parse(JSON.stringify(filterList));\r\n if (filterList[AppointmentFilterStateKeys.appointmentIds]?.length === 0 && selectedfilters?.appointmentIds?.length > 0) {\r\n futureFilterList[AppointmentFilterStateKeys.appointmentIds] = selectedfilters.appointmentIds\r\n }\r\n const optionValues = filters?.appointmentIds ? [allValue, ...filters?.appointmentIds] : [allValue];\r\n return \r\n },\r\n }\r\n }\r\n },\r\n {\r\n name: 'service.name',\r\n label: translatorService.Tranlate('APPOINTMENT_TABLE_SERVICE_NAME', 'Nume Service'),\r\n options: {\r\n display: viewPartnerAppointments,\r\n filter: viewPartnerAppointments,\r\n filterType: 'custom',\r\n filterOptions: {\r\n display: (filterList, onChange, index, column) => {\r\n const futureFilterList = JSON.parse(JSON.stringify(filterList));\r\n if (filterList[AppointmentFilterStateKeys.services]?.length === 0 && selectedfilters?.services?.length > 0) {\r\n futureFilterList[AppointmentFilterStateKeys.services] = selectedfilters.services\r\n }\r\n let optionValues: any = [allValue];\r\n if (filters?.services) {\r\n optionValues = filters?.services.map(obj => {\r\n return obj ? obj.name : ''\r\n });\r\n }\r\n return \r\n },\r\n }\r\n }\r\n },\r\n {\r\n name: 'dateCreation',\r\n label: translatorService.Tranlate('APPOINTMENT_TABLE_DATE_CREATION', 'Creation Date'),\r\n options: {\r\n customBodyRender: (value: string) => getDay(new Date(value), dateFormat || 'DD/MM/YYYY'),\r\n filter: true,\r\n display: 'true',\r\n filterType: 'custom',\r\n filterOptions: {\r\n display: (filterList, onChange, index, column) => {\r\n const futureFilterList = JSON.parse(JSON.stringify(filterList));\r\n if (filterList[AppointmentFilterStateKeys.formattedDateCreationList]?.length === 0 && selectedfilters?.formattedDateCreationList?.length > 0) {\r\n futureFilterList[AppointmentFilterStateKeys.formattedDateCreationList] = selectedfilters.formattedDateCreationList\r\n }\r\n\r\n const optionValues = filters?.formattedDateCreationList ? [allValue, ...filters?.formattedDateCreationList] : [allValue];\r\n return \r\n },\r\n }\r\n }\r\n },\r\n {\r\n name: 'dateCreation',\r\n label: translatorService.Tranlate('APPOINTMENT_TABLE_HOUR_CREATION', 'Creation Hour'),\r\n options: {\r\n customBodyRender: (value: string) => getHour(moment\r\n .utc(value)\r\n .local()\r\n .format(longDateFormat || 'DD/MM/YYYY HH:mm')),\r\n filter: true,\r\n display: 'true',\r\n filterType: 'custom',\r\n filterOptions: {\r\n display: (filterList, onChange, index, column) => {\r\n const futureFilterList = JSON.parse(JSON.stringify(filterList));\r\n if (filterList[AppointmentFilterStateKeys.formattedHourCreationList]?.length === 0 && selectedfilters?.formattedHourCreationList?.length > 0) {\r\n futureFilterList[AppointmentFilterStateKeys.formattedHourCreationList] = selectedfilters.formattedHourCreationList\r\n }\r\n const uniqueArray = [...new Set(formatedHours)];\r\n const optionValues = uniqueArray ? [allValue, ...uniqueArray] : [allValue];\r\n return \r\n },\r\n }\r\n }\r\n },\r\n {\r\n name: \"vehicle.model.brand\",\r\n label: translatorService.Tranlate('VEHICLES_VEHICLE_MAKE', 'MARCA'),\r\n options: {\r\n sort: false,\r\n filter: true,\r\n display: 'true',\r\n filterType: 'custom',\r\n filterOptions: {\r\n display: (filterList, onChange, index, column) => {\r\n const futureFilterList = JSON.parse(JSON.stringify(filterList));\r\n if (filterList[AppointmentFilterStateKeys.makeList]?.length === 0 && selectedfilters?.makeList?.length > 0) {\r\n futureFilterList[AppointmentFilterStateKeys.makeList] = selectedfilters.makeList\r\n }\r\n const optionValues = filters?.makeList ? [allValue, ...filters?.makeList] : [allValue];\r\n return \r\n },\r\n },\r\n customBodyRender: (value: any, tableMeta: MUIDataTableMeta) => {\r\n const appointment = appointments.find((item) => item.id === tableMeta.rowData[0]);\r\n if (R.isNil(appointment)) {\r\n return;\r\n }\r\n\r\n return (\r\n
\r\n {appointment.vehicle?.identifiedMake || appointment.vehicle?.model?.brand || ''}\r\n
\r\n );\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'vehicle.model.name',\r\n label: translatorService.Tranlate('FRM_CAR_DATA_MODEL', 'Model'),\r\n options: {\r\n sort: false,\r\n filter: true,\r\n display: 'true',\r\n filterType: 'custom',\r\n filterOptions: {\r\n display: (filterList, onChange, index, column) => {\r\n const futureFilterList = JSON.parse(JSON.stringify(filterList));\r\n if (filterList[AppointmentFilterStateKeys.modelList]?.length === 0 && selectedfilters?.modelList?.length > 0) {\r\n futureFilterList[AppointmentFilterStateKeys.modelList] = selectedfilters.modelList\r\n }\r\n const optionValues = filters?.modelList ? [allValue, ...filters?.modelList] : [allValue];\r\n return \r\n },\r\n },\r\n customBodyRender: (value: any, tableMeta: MUIDataTableMeta) => {\r\n const appointment = appointments.find((item) => item.id === tableMeta.rowData[0]);\r\n if (R.isNil(appointment)) {\r\n return;\r\n }\r\n\r\n return (\r\n
\r\n {appointment.vehicle?.identifiedModel || appointment.vehicle?.model?.name || ''}\r\n
\r\n );\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'vehicle.plateNumber',\r\n label: translatorService.Tranlate('FRM_NOTICE_PLATE_NUMBER', 'Numar Inmatriculare'),\r\n options: {\r\n filter: true,\r\n display: 'true',\r\n filterType: 'custom',\r\n filterOptions: {\r\n display: (filterList, onChange, index, column) => {\r\n const futureFilterList = JSON.parse(JSON.stringify(filterList));\r\n if (filterList[AppointmentFilterStateKeys.plateNumberList]?.length === 0 && selectedfilters?.plateNumberList?.length > 0) {\r\n futureFilterList[AppointmentFilterStateKeys.plateNumberList] = selectedfilters.plateNumberList\r\n }\r\n const optionValues = filters?.plateNumberList ? [allValue, ...filters?.plateNumberList] : [allValue];\r\n return \r\n },\r\n }\r\n }\r\n },\r\n {\r\n name: 'date',\r\n label: translatorService.Tranlate('APPOINTMENT_TABLE_DATE', 'Data'),\r\n options: {\r\n customBodyRender: (value: string) => value ? getDay(new Date(value), dateFormat || 'DD/MM/YYYY') : '',\r\n filter: true,\r\n display: 'true',\r\n filterType: 'custom',\r\n filterOptions: {\r\n display: (filterList, onChange, index, column) => {\r\n const futureFilterList = JSON.parse(JSON.stringify(filterList));\r\n if (filterList[AppointmentFilterStateKeys.formatedDateList]?.length === 0 && selectedfilters?.formatedDateList?.length > 0) {\r\n futureFilterList[AppointmentFilterStateKeys.formatedDateList] = selectedfilters.formatedDateList\r\n }\r\n const optionValues = filters?.formatedDateList ? [allValue, ...filters?.formatedDateList] : [allValue];\r\n return \r\n },\r\n }\r\n }\r\n },\r\n {\r\n name: 'date',\r\n label: translatorService.Tranlate('APPOINTMENT_TABLE_TIME', 'Ora'),\r\n options: {\r\n customBodyRender: (value: string) => value ? getHour(new Date(value)) : '',\r\n filter: true,\r\n display: 'true',\r\n filterType: 'custom',\r\n filterOptions: {\r\n display: (filterList, onChange, index, column) => {\r\n const futureFilterList = JSON.parse(JSON.stringify(filterList));\r\n if (filterList[AppointmentFilterStateKeys.formatedHourList]?.length === 0 && selectedfilters?.formatedHourList?.length > 0) {\r\n futureFilterList[AppointmentFilterStateKeys.formatedHourList] = selectedfilters.formatedHourList\r\n }\r\n const optionValues = filters?.formatedHourList ? [allValue, ...filters?.formatedHourList] : [allValue];\r\n return \r\n },\r\n }\r\n }\r\n },\r\n {\r\n name: 'appointmentStatus',\r\n label: translatorService.Tranlate('APPOINTMENT_TABLE_STATUS', 'Status'),\r\n options: {\r\n customBodyRender: (value: any) => {\r\n const indexLang = value.translations.findIndex((trans: any) => trans.language === language);\r\n return indexLang !== -1 ? value.translations[indexLang].name : value.name;\r\n },\r\n filter: true,\r\n display: 'true',\r\n filterType: 'custom',\r\n filterOptions: {\r\n display: (filterList, onChange, index, column) => {\r\n const futureFilterList = JSON.parse(JSON.stringify(filterList));\r\n if (filterList[AppointmentFilterStateKeys.appointmentStatuses]?.length === 0 && selectedfilters?.appointmentStatuses?.length > 0) {\r\n futureFilterList[AppointmentFilterStateKeys.appointmentStatuses] = selectedfilters.appointmentStatuses\r\n }\r\n let optionValues: any = [allValue];\r\n if (filters?.appointmentStatuses) {\r\n optionValues = filters?.appointmentStatuses.map(obj => {\r\n const status = obj.translations.find(translation => translation.language === language)\r\n return status ? status.name : ''\r\n });\r\n }\r\n\r\n return \r\n },\r\n }\r\n }\r\n },\r\n {\r\n name: 'appAppointmentId',\r\n label: translatorService.Tranlate('APPOINTMENT_TABLE_ID', 'ID'),\r\n options: {\r\n filter: true,\r\n display: 'true',\r\n filterType: 'custom',\r\n filterOptions: {\r\n display: (filterList, onChange, index, column) => {\r\n const futureFilterList = JSON.parse(JSON.stringify(filterList));\r\n if (filterList[AppointmentFilterStateKeys.appAppointmentIds]?.length === 0 && selectedfilters?.appAppointmentIds?.length > 0) {\r\n futureFilterList[AppointmentFilterStateKeys.appAppointmentIds] = selectedfilters.appAppointmentIds\r\n }\r\n const optionValues = filters?.appAppointmentIds ? [allValue, ...filters?.appAppointmentIds] : [allValue];\r\n return \r\n },\r\n }\r\n }\r\n },\r\n {\r\n name: 'appointmentCategoryType',\r\n label: translatorService.Tranlate('APPOINTMENT_TABLE_CATEGORY_TYPE', 'Tip'),\r\n options: {\r\n customBodyRender: (value: any) => {\r\n const indexLang = value.translations.findIndex((trans: any) => trans.language === language);\r\n return indexLang !== -1 ? value.translations[indexLang].name : value.name;\r\n },\r\n filter: true,\r\n display: 'true',\r\n filterType: 'custom',\r\n filterOptions: {\r\n display: (filterList, onChange, index, column) => {\r\n const futureFilterList = JSON.parse(JSON.stringify(filterList));\r\n if (filterList[AppointmentFilterStateKeys.appointmentCategoryTypes]?.length === 0 && selectedfilters?.appointmentCategoryTypes?.length > 0) {\r\n futureFilterList[AppointmentFilterStateKeys.appointmentCategoryTypes] = selectedfilters.appointmentCategoryTypes\r\n }\r\n let optionValues: any = [allValue];\r\n if (filters?.appointmentCategoryTypes) {\r\n optionValues = filters?.appointmentCategoryTypes.map(obj => {\r\n const appointmentCategoryType = obj.translations.find(translation => translation.language === language)\r\n return appointmentCategoryType ? appointmentCategoryType.name : ''\r\n });\r\n }\r\n\r\n return \r\n },\r\n }\r\n }\r\n },\r\n {\r\n name: 'actions',\r\n label: translatorService.Tranlate(\r\n 'APPOINTMENT_TABLE_ACTIONS',\r\n 'Acțiuni'\r\n ),\r\n options: {\r\n filter: false,\r\n customBodyRender: (value, tableMeta, updateValue) => {\r\n // If there is no value, return empty div\r\n\r\n return (\r\n \r\n \r\n {\r\n history.push(`/appointment/${appointments![tableMeta.rowIndex].id}`)\r\n }}\r\n >\r\n \r\n \r\n \r\n {appointments![tableMeta.rowIndex].appointmentStatus?.code === statusList.PAYMENT_CONFIRMATION?.code || appointments![tableMeta.rowIndex].caseId ?\r\n {\r\n if (appointments![tableMeta.rowIndex].caseId) {\r\n history.push('/cases/' + appointments![tableMeta.rowIndex].caseId, 'Case xx');\r\n }\r\n else {\r\n setAppointmentId(appointments![tableMeta.rowIndex].id);\r\n }\r\n }}\r\n >\r\n {appointments![tableMeta.rowIndex].caseId ? : (viewPartnerAppointments && appointments![tableMeta.rowIndex].serviceId != organizationId ? null : )}\r\n : null}\r\n \r\n );\r\n }\r\n }\r\n }\r\n ],\r\n [appointments, filters, selectedfilters]\r\n );\r\n\r\n const getMuiTheme = () => createMuiTheme({\r\n overrides: {\r\n MuiTableCell: {\r\n root: {\r\n paddingLeft: \"5px\",\r\n paddingRight: \"5px\",\r\n paddingTop: \"5px\",\r\n paddingBottom: \"5px\"\r\n },\r\n },\r\n MUIDataTableBodyCell: {\r\n root: {\r\n paddingLeft: \"5px\",\r\n paddingRight: \"5px\",\r\n paddingTop: \"0px\",\r\n paddingBottom: \"0px\",\r\n height: \"50px !important\"\r\n }\r\n }\r\n } as any\r\n });\r\n\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n {appointmentId ? setAppointmentId(null)} /> : null}\r\n \r\n );\r\n};\r\n","import React, { useState } from 'react';\r\nimport 'react-calendar/dist/Calendar.css';\r\nimport { TranslatorService } from '../../services/TranslatorService';\r\nimport { BigCalendar } from '../agenda/BigCalendar';\r\nimport { getAppointmentsRequest } from '../agenda/agenda.requests';\r\nimport { ResponseAppointmentsData } from '../../types/Agenda';\r\nimport { useAppDispatch, useAppSelector } from '../../store/configureStore';\r\nimport { AGENDA_SET_APPOINTMENTS } from '../../store/actions/ActionTypes';\r\n\r\nexport const AppointmentBigCalendar = () => {\r\n const translatorService = new TranslatorService();\r\n const [localAppointments, setLocalAppoitments] = useState>([]);\r\n const [localLoading, setLocalLoading] = useState(false);\r\n const [defaultView, setDefaultView] = useState<'month' | 'week' | 'day' | 'agenda'>('week');\r\n const [defaultDay, setDefaultDay] = useState()\r\n const dispatch = useAppDispatch();\r\n\r\n const fetchAppointments = async (filters: any, onlyOneDay?: boolean) => {\r\n !onlyOneDay && setLocalLoading(true)\r\n const response = await getAppointmentsRequest(filters);\r\n\r\n const responseData = response.data as ResponseAppointmentsData;\r\n\r\n if (!responseData?.appointments) {\r\n !onlyOneDay && setLocalLoading(false)\r\n return\r\n }\r\n\r\n if (onlyOneDay) {\r\n setLocalAppoitments(responseData?.appointments)\r\n } else {\r\n dispatch({\r\n type: AGENDA_SET_APPOINTMENTS,\r\n payload: responseData.appointments,\r\n });\r\n }\r\n\r\n !onlyOneDay && setLocalLoading(false)\r\n };\r\n\r\n return (\r\n \r\n );\r\n};\r\n","import React, { Fragment, useEffect, useState } from 'react';\r\nimport { Box, Modal } from '@material-ui/core';\r\nimport { SmallCalendar } from './SmallCalendar';\r\nimport { BigCalendar } from './BigCalendar';\r\nimport { useAppDispatch, useAppSelector } from '../../store/configureStore';\r\nimport { AppointmentsTable } from './AppointmentsTable';\r\nimport { AGENDA_SET_APPOINTMENTS, AGENDA_SET_CATEGORY_TYPE, AGENDA_SET_SELECTED_RANGE, AGENDA_SET_STATUS_LIST } from '../../store/actions/ActionTypes';\r\nimport { getAppointmentsRequest } from './agenda.requests';\r\nimport { AppointmentType, AppointmentsFiltersType, ResponseAppointmentsData } from '../../types/Agenda';\r\nimport { areDatesInSameWeek, getCategoryTypeList, getStatusList, formatDate } from '../../utils/appointments';\r\nimport moment from 'moment';\r\nimport { useSnackbar } from 'notistack';\r\nimport Loader from '../Loader';\r\nimport { AppointmentBigCalendar } from '../appointment/AppointmentBigCalendar';\r\nimport Organization from '../organizations/Organization';\r\nimport { OrganizationService } from '../../services/OrganizationService';\r\nimport * as R from 'ramda';\r\n\r\nconst AgendaPage = () => {\r\n const [isLoading, setIsLoading] = React.useState(false);\r\n const { enqueueSnackbar } = useSnackbar();\r\n const selectedRange = useAppSelector((state)=>state.agenda?.selectedRange)\r\n const [localAppointments, setLocalAppoitments] = React.useState>([]);\r\n const [defaultView, setDefaultView] = React.useState<'month' | 'week' | 'day' | 'agenda'>('month'); \r\n const [defaultDay, setDefaultDay] = useState()\r\n const [modalOpen, setModalOpen] = React.useState(false);\r\n const [tableProps, setTabelProps] = useState({\r\n total: 0,\r\n page: 0,\r\n rowsPerPage: 10,\r\n search:''\r\n });\r\n const language = useAppSelector((state)=>state.app?.language);\r\n const viewPartnerAppointments = useAppSelector((state) => state.app?.appUser?.organization?.viewOwnerEntries ?? false);\r\n const organizationId = useAppSelector((state) => state.app?.appUser?.organization?.id ?? null);\r\n const dispatch = useAppDispatch();\r\n const organizationService = new OrganizationService();\r\n\r\n const changeBigCalendar = (appointments:any, dates:any) =>{\r\n dispatch({\r\n type: AGENDA_SET_APPOINTMENTS,\r\n payload: appointments,\r\n });\r\n const date = formatDate(dates[0])\r\n setDefaultDay(date)\r\n if (dates.length === 1){\r\n setDefaultView('day');\r\n return\r\n }\r\n if(dates.length > 7){\r\n setDefaultView('month')\r\n }else{\r\n areDatesInSameWeek(dates) ? setDefaultView('week'): setDefaultView('month')\r\n } \r\n }\r\n\r\n const fetchAppointments = async (filters: AppointmentsFiltersType, local=false) => {\r\n !local && setIsLoading(true);\r\n const response = await getAppointmentsRequest(filters);\r\n const responseData = response.data as ResponseAppointmentsData;\r\n if(!responseData?.appointments){\r\n !local && setIsLoading(false)\r\n return \r\n }\r\n if(local){\r\n console.log('tabel');\r\n const appointments = responseData.appointments;\r\n const orgServices = await organizationService.GetUserOrganizationsByIds(\r\n Array.from(new Set(responseData.appointments.map((item) => item.serviceId)))\r\n );\r\n appointments.forEach((appointment) => {\r\n const organizationService = orgServices.find((item) => item.id === appointment.serviceId);\r\n appointment.service = R.isNil(organizationService) ? null : organizationService;\r\n });\r\n console.log('appointments', appointments);\r\n setTabelProps({\r\n total:responseData?.total,\r\n page: (filters?.page || 1) -1,\r\n rowsPerPage: filters?.pageSize || 10,\r\n search:filters?.text || ''\r\n })\r\n setLocalAppoitments(appointments);\r\n filters['formatedDateList']?.length > 0 && changeBigCalendar(appointments, filters['formatedDateList'])\r\n }else{\r\n dispatch({\r\n type: AGENDA_SET_APPOINTMENTS,\r\n payload: responseData.appointments,\r\n });\r\n } \r\n !local && setIsLoading(false);\r\n };\r\n\r\n useEffect(()=>{\r\n setDefaultDay(null)\r\n },[selectedRange])\r\n \r\n\r\n const formatRangeValue = () =>{\r\n if (!selectedRange) {\r\n return\r\n }\r\n if(selectedRange.start_date !== selectedRange?.end_date){\r\n fetchAppointments({\r\n dateFilterStartDate: moment(selectedRange.start_date).format('YYYY-MM-DDTHH:mm:ss'),\r\n datefilterEndDate: moment(selectedRange.end_date).format('YYYY-MM-DDTHH:mm:ss')\r\n });\r\n }else{\r\n const endDate = new Date(selectedRange?.end_date)\r\n endDate.setHours(23, 59, 59, 999)\r\n fetchAppointments({\r\n dateFilterStartDate: moment(selectedRange.start_date).format('YYYY-MM-DDTHH:mm:ss'),\r\n datefilterEndDate: moment(endDate).format('YYYY-MM-DDTHH:mm:ss')\r\n });\r\n }\r\n }\r\n\r\n React.useEffect(() => {\r\n if(!localAppointments.length){\r\n fetchAppointments({\r\n page:1,\r\n pageSize:10,\r\n includedAdditionalData: true,\r\n organizationOwnerId: viewPartnerAppointments ? organizationId : null\r\n }, true);\r\n }\r\n if(!selectedRange){\r\n const currentDate = new Date();\r\n const firstDayOfMonth = new Date(currentDate.getFullYear(), currentDate.getMonth(), 1);\r\n const lastDayOfMonth = new Date(currentDate.getFullYear(), currentDate.getMonth() + 1, 0);\r\n lastDayOfMonth.setHours(23, 59, 59, 999);\r\n\r\n dispatch({\r\n type: AGENDA_SET_SELECTED_RANGE,\r\n payload: {\r\n start_date: firstDayOfMonth,\r\n end_date: lastDayOfMonth\r\n }\r\n });\r\n\r\n fetchAppointments({\r\n dateFilterStartDate: moment(firstDayOfMonth).format(),\r\n datefilterEndDate: moment(lastDayOfMonth).format()\r\n });\r\n }else{\r\n formatRangeValue()\r\n }\r\n getStatusList(setIsLoading, (value:any)=>{\r\n dispatch({\r\n type: AGENDA_SET_STATUS_LIST,\r\n payload: value\r\n });\r\n }, enqueueSnackbar)\r\n getCategoryTypeList(setIsLoading, (value:any)=>{\r\n dispatch({\r\n type:AGENDA_SET_CATEGORY_TYPE,\r\n payload:value\r\n })\r\n }, enqueueSnackbar)\r\n }, []);\r\n\r\n const renderModal = () => {\r\n return (\r\n
\r\n setModalOpen(false)}>\r\n
\r\n \r\n
\r\n
\r\n
\r\n );\r\n };\r\n return (\r\n \r\n {isLoading ? :<>\r\n {renderModal()}\r\n \r\n \r\n \r\n\r\n \r\n {\r\n fetchAppointments(filters, true)\r\n }}/>\r\n \r\n }\r\n \r\n );\r\n};\r\n\r\nexport default AgendaPage;\r\n","import React, { ChangeEvent } from 'react';\r\nimport { Box, TextField, Button, Typography } from '@material-ui/core';\r\nimport { ContactFormData } from '../agenda/agenda.types';\r\nimport { TranslatorService } from '../../services/TranslatorService';\r\nimport { InsuredTypeCode } from '../../helpers/Constants';\r\nimport * as R from 'ramda';\r\n\r\ninterface ContactFormProps {\r\n formData: ContactFormData;\r\n onChange?: (formData: ContactFormData) => void;\r\n disabled?: boolean;\r\n type?:string;\r\n}\r\n\r\nconst ContactForm: React.FC = ({ formData, onChange, disabled, type}) => {\r\n const translatorService = new TranslatorService();\r\n const handleInputChange = (\r\n event: ChangeEvent,\r\n field: keyof ContactFormData\r\n ) => {\r\n if(!onChange){\r\n return;\r\n }\r\n const { value } = event.target;\r\n const newFormData = { ...formData, [field]: value };\r\n onChange(newFormData);\r\n };\r\n\r\n const handleSendClick = () => {\r\n // TODO: send data to carfix\r\n };\r\n\r\n\r\n const ContactFormDetails = () => {\r\n return \r\n {!R.isNil(formData.personType!) && formData.personType!.code === InsuredTypeCode.PJ ? {`${translatorService.Tranlate('APPOINTMENT_CONTACT_FORM_COMPANY_NAME', 'Nume Companie') }: ${formData.companyName}`} \r\n : {`${translatorService.Tranlate('APPOINTMENT_CONTACT_FORM_FIRST_NAME', \"First Name\") }: ${formData.firstName}`}\r\n }\r\n {!R.isNil(formData.personType!) && formData.personType!.code === InsuredTypeCode.PJ ? {`${translatorService.Tranlate('APPOINTMENT_CONTACT_FORM_COMPANY_NUMBER', 'CUI') }: ${formData.companyNumber}`} \r\n : {`${translatorService.Tranlate('APPOINTMENT_CONTACT_FORM_LAST_NAME', \"Last Name\") }: ${formData.lastName}`}\r\n }\r\n {`${translatorService.Tranlate('APPOINTMENT_CONTACT_FORM_PHONE', \"Phone No.\") }: ${formData.phoneNo}`}\r\n {`${translatorService.Tranlate('APPOINTMENT_CONTACT_FORM_EMAIL', \"Email\") }: ${formData.email}`}\r\n {/* \r\n {translatorService.Tranlate('APPOINTMENT_CONTACT_FORM_SEND_CARFIX', \"Send to carfix\")}\r\n */}\r\n \r\n }\r\n\r\n const AddContactForm = () =>{\r\n return \r\n handleInputChange(e, 'firstName')}\r\n />\r\n handleInputChange(e, 'lastName')}\r\n />\r\n handleInputChange(e, 'phoneNo')}\r\n />\r\n handleInputChange(e, 'email')}\r\n />\r\n {/* \r\n {translatorService.Tranlate('APPOINTMENT_CONTACT_FORM_SEND_CARFIX1', \"Send to carfix\")}\r\n */}\r\n \r\n }\r\n\r\n return (\r\n \r\n {type === 'details' ? translatorService.Tranlate('APPOINTMENT_CLIENT_TITLE', 'Client') : translatorService.Tranlate('APPOINTMENT_CONTACT_TITLE', 'Contact')}\r\n \r\n {type === 'details' ? ContactFormDetails(): AddContactForm()}\r\n \r\n );\r\n};\r\n\r\nexport default ContactForm;\r\n","export enum AppointmentActionStatus {\r\n CONFIRMEDSERVICE = 'CONFIRMAT_SERVICE'\r\n}\r\n","import React from 'react';\r\nimport { Button, IconButton, Modal, TextField, Typography } from '@material-ui/core';\r\nimport 'react-calendar/dist/Calendar.css';\r\nimport { TranslatorService } from '../../services/TranslatorService';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport { AppointmentCalendar } from './AppointmentCalendar';\r\n\r\n\r\ninterface ConfirmAppointmentProps {\r\n visible: boolean;\r\n setIsVisible: (val:boolean) => void,\r\n title:string;\r\n comment?: string;\r\n setComment?: (val:any) => void\r\n date: Date | null;\r\n setDate: any;\r\n hour: string | null\r\n setHour: any,\r\n onClickButton:any,\r\n calendarText?:string,\r\n buttonText:string;\r\n}\r\n\r\nexport const ConfirmAppointment = ({ visible, setIsVisible, title, comment, setComment, date, setDate, hour, setHour, onClickButton, calendarText, buttonText }: ConfirmAppointmentProps) => {\r\n\r\n const translatorService = new TranslatorService();\r\n\r\n return (\r\n
\r\n { setIsVisible(false) }}>\r\n\r\n
\r\n
\r\n { setIsVisible(false) }}>\r\n \r\n \r\n
\r\n \r\n {title}\r\n \r\n\r\n
\r\n \r\n {translatorService.Tranlate('APPOINTMENT_RESCHEDULE_MESSAGE', 'Select a new date for scheduling')}\r\n \r\n \r\n {calendarText ?\r\n {calendarText}\r\n :null}\r\n { setComment ? setComment(e.target.value)}\r\n />:null}\r\n
\r\n \r\n {buttonText}\r\n \r\n
\r\n
\r\n
\r\n );\r\n};\r\n","import React, { useMemo, useState } from 'react';\r\nimport MUIDataTable, { MUIDataTableColumnOptions, MUIDataTableMeta, SelectableRows } from 'mui-datatables';\r\n\r\nimport { AppointmentCategoryType, AppointmentClientSelection, AppointmentStatusType, ChangeAppointmentStatusPayload, ResponseAppointmentsData } from '../../types/Agenda';\r\nimport { MUITranslations } from '../../helpers/MUITableTranslations';\r\nimport { TranslatorService } from '../../services/TranslatorService';\r\nimport { useAppDispatch, useAppSelector } from '../../store/configureStore';\r\nimport { formatAppointmentForCalendar, getDay, getHour } from '../../utils/appointments';\r\nimport { Box, Button, CircularProgress, IconButton, Modal, Typography } from '@material-ui/core'; \r\nimport { AppointmentCategoryTypeCodeEnum, AppointmentStatusCodeEnum } from '../../helpers/Constants';\r\nimport _ from 'lodash';\r\nimport { Calendar, momentLocalizer } from 'react-big-calendar';\r\nimport { changeAppointmentStatus, getAppointmentsRequest } from '../agenda/agenda.requests';\r\nimport { BigCalendar, CustomEvent } from '../agenda/BigCalendar';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport moment from 'moment';\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { AppointmentActionStatus } from '../../enums/Status';\r\nimport { useHistory } from 'react-router';\r\nimport { AGENDA_SET_APPOINTMENTS, AGENDA_SET_SELECTED_RANGE } from '../../store/actions/ActionTypes';\r\nimport { useSnackbar } from 'notistack';\r\nimport { ConfirmAppointment } from './ConfirmAppointment';\r\nimport { display } from 'html2canvas/dist/types/css/property-descriptors/display';\r\n\r\ninterface AppointmentClientSelectionProps {\r\n clientDateSelections: AppointmentClientSelection[];\r\n status: AppointmentStatusType | null;\r\n appointmentId: number | null;\r\n getSelectedAppointment: () => void;\r\n setIsLoading: (loading: boolean) => void;\r\n changeStatus: (status:number, commnet?:string)=>void;\r\n date: Date | null;\r\n setDate:any;\r\n hour: string | null\r\n setHour:any\r\n caseId: number | null;\r\n appointmentCategoryType: AppointmentCategoryType;\r\n plateNumber: string | null;\r\n viewActionColumn: boolean;\r\n}\r\n\r\nconst AppointmentClientSelectionDetails: React.FC = ({ clientDateSelections, status, appointmentId, getSelectedAppointment, setIsLoading, changeStatus, date, setDate, hour, setHour, caseId , appointmentCategoryType, plateNumber, viewActionColumn}) => {\r\n const translatorService = new TranslatorService();\r\n const localizer = momentLocalizer(moment);\r\n const statusList = useAppSelector((state)=>state.agenda?.statusList)\r\n const [localLoading, setLocalLoading] = useState(false);\r\n const [openViewCalendar, setOpenViewCalendar] = useState(false);\r\n const [defaultView, setDefaultView] = useState<'month' | 'week' | 'day' | 'agenda'>('week');\r\n const [defaultDay, setDefaultDay] = useState()\r\n const [openRescheduleModal, setOpenRescheduleModal] = useState(false)\r\n const [openRescheduleCalendarModal, setOpenRescheduleCalendarModal] = useState(false)\r\n const language = useAppSelector((state) => state.app?.language)\r\n const [comment, setComment] = useState('');\r\n const [localAppointments, setLocalAppoitments] = useState>([]);\r\n const [selectedHour, setSelectedHour] = useState();\r\n const { enqueueSnackbar } = useSnackbar();\r\n const history = useHistory();\r\n const dispatch = useAppDispatch();\r\n const dateFormat = useAppSelector((state) => state.app?.dateFormat);\r\n\r\n const fetchAppointments = async (filters: any, onlyOneDay?: boolean) => {\r\n !onlyOneDay && setLocalLoading(true)\r\n const response = await getAppointmentsRequest(filters);\r\n\r\n const responseData = response.data as ResponseAppointmentsData;\r\n\r\n if (!responseData?.appointments) {\r\n !onlyOneDay && setLocalLoading(false)\r\n return\r\n }\r\n\r\n if(onlyOneDay){\r\n setLocalAppoitments(responseData?.appointments)\r\n }else{\r\n dispatch({\r\n type: AGENDA_SET_APPOINTMENTS,\r\n payload: responseData.appointments,\r\n }); \r\n }\r\n\r\n !onlyOneDay && setLocalLoading(false)\r\n };\r\n\r\n\r\n const CustomToolbar = (toolbar:any) => {\r\n return (\r\n
\r\n {toolbar.label}\r\n
\r\n );\r\n };\r\n\r\n const formatedAppointments = useMemo(() => {\r\n if (!localAppointments) {\r\n return [];\r\n }\r\n\r\n return localAppointments.filter((appointment) => appointment?.appointmentStatus?.code !== AppointmentStatusCodeEnum.CANCELED.toString()).map((e) => formatAppointmentForCalendar(e, dateFormat || 'DD/MM/YYYY'));\r\n }, [localAppointments]);\r\n\r\n const renderModal = () => {\r\n return (\r\n
\r\n {setOpenViewCalendar(false); setSelectedHour('')}}>\r\n\r\n
\r\n
\r\n { setOpenViewCalendar(false); setSelectedHour('') }}>\r\n \r\n \r\n
\r\n ,\r\n toolbar: CustomToolbar\r\n }}\r\n messages={{\r\n noEventsInRange: translatorService.Tranlate('TABLE_NO_EVENTS_IN_RANGE', 'Nu există rezervări în această perioadă'),\r\n showMore: (total: any) => `${translatorService.Tranlate('TABLE_TOTAL', 'Încă')} ${total}`\r\n }}\r\n value={selectedHour ? new Date(selectedHour) : new Date()}\r\n defaultDate={selectedHour ? new Date(selectedHour) : new Date()}\r\n popup\r\n startAccessor=\"start\"\r\n endAccessor=\"end\"\r\n style={{ width: '100%', heigth: '80vh' }}\r\n />\r\n
\r\n
\r\n
\r\n );\r\n };\r\n\r\n const handleApprove = async (event: any, tableMeta: MUIDataTableMeta) => {\r\n try {\r\n const id = tableMeta.rowData[0];\r\n const payload: ChangeAppointmentStatusPayload = {\r\n appointmentId: appointmentId!,\r\n statusId: statusList.CONFIRMED.id,\r\n appointmentClientSelectionId: id\r\n }\r\n\r\n setIsLoading(true);\r\n const res = await changeAppointmentStatus(payload);\r\n\r\n if (res.error) {\r\n setIsLoading(false);\r\n return;\r\n }\r\n\r\n if (caseId && (appointmentCategoryType?.code == AppointmentCategoryTypeCodeEnum.MAINTENANCE || appointmentCategoryType?.code == AppointmentCategoryTypeCodeEnum.REPAIR)) {\r\n history.push('/cases/' + caseId, 'Case xx');\r\n return;\r\n }\r\n\r\n getSelectedAppointment();\r\n \r\n } catch (error) {\r\n \r\n }\r\n };\r\n\r\n const handleSlotSelect = (slotInfo: any) => {\r\n const selectedDate = new Date(slotInfo.start);\r\n if (defaultView === 'month') {\r\n setDefaultDay(selectedDate);\r\n setDefaultView('day')\r\n } else {\r\n const currentDate = new Date();\r\n if (selectedDate < currentDate) {\r\n enqueueSnackbar(translatorService.Tranlate('PAST_DATE', 'You cannot select a date from the past for scheduling'), {\r\n variant: 'error'\r\n });\r\n return;\r\n }\r\n const selectedHour = selectedDate.getHours();\r\n const selectedMinute = selectedDate.getMinutes();\r\n setDate(selectedDate);\r\n setHour(`${selectedHour < 10 ? `0${selectedHour}` : selectedHour}:${selectedMinute < 10 ? `0${selectedMinute}` : selectedMinute}`);\r\n setOpenRescheduleModal(true)\r\n }\r\n }\r\n\r\n const renderRescheduleCalendarModal = () =>{\r\n return
\r\n { setOpenRescheduleCalendarModal(false) }}>\r\n
\r\n
\r\n { setOpenRescheduleCalendarModal(false) }}>\r\n \r\n \r\n
\r\n \r\n {translatorService.Tranlate('APPOINTMENT_RESCHUDELE_CALENDAR_TITLE', 'Select the date and time for rescheduling')}\r\n \r\n \r\n {`${appointmentId}${plateNumber ? ` - ${plateNumber}` : ''}`}\r\n \r\n \r\n
\r\n
\r\n
\r\n }\r\n \r\n const getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'date',\r\n label: translatorService.Tranlate(\r\n 'APPOINTMENT_TABLE_DATE',\r\n 'Data'\r\n ),\r\n options: {\r\n customBodyRender: (value: string | null) => value != null ?
\r\n \r\n
{getDay(new Date(value), dateFormat || 'DD/MM/YYYY')}
\r\n
: null\r\n }\r\n },\r\n {\r\n name: 'date',\r\n label: translatorService.Tranlate(\r\n 'APPOINTMENT_TABLE_TIME',\r\n 'Ora'\r\n ),\r\n options: {\r\n customBodyRender: (value: string | null) => value != null ?
\r\n \r\n
{getHour(new Date(value))}
\r\n
: null\r\n }\r\n },\r\n {\r\n name: 'appointmentDetailsType',\r\n label: translatorService.Tranlate(\r\n 'APPOINTMENT_TABLE_CLIENT_DETAILS',\r\n 'Detalii'\r\n ),\r\n options: {\r\n customBodyRender: (value: any) => {\r\n const indexLang = value?.translations?.findIndex((trans: any) => trans?.language === language);\r\n return indexLang !== -1 ? value?.translations[indexLang]?.name : value?.displayName;\r\n }\r\n }\r\n },\r\n {\r\n name: 'appointmentActionType',\r\n label: translatorService.Tranlate(\r\n 'APPOINTMENT_TABLE_ACTIONS',\r\n 'Actions'\r\n ),\r\n options: {\r\n display: !viewActionColumn,\r\n setCellHeaderProps: () => ({ align: 'center' }),\r\n setCellProps: () => ({ align: 'center' }),\r\n customBodyRender: (value: any, tableMeta: MUIDataTableMeta) => {\r\n if (!value && (status?.code === AppointmentStatusCodeEnum.INITIATA || status?.code === AppointmentStatusCodeEnum.RESCHEDULED)){\r\n return (\r\n handleApprove(e, tableMeta)}\r\n >\r\n {translatorService.Tranlate('APPOINTMENT_CLIENT_SELECTION_CONFIRM', 'Confirm')}\r\n \r\n {\r\n const currentDate = new Date(tableMeta.rowData[1]);\r\n setDefaultDay(currentDate);\r\n \r\n const firstDayOfMonth = new Date(currentDate.getFullYear(), currentDate.getMonth(), 1);\r\n const lastDayOfMonth = new Date(currentDate.getFullYear(), currentDate.getMonth() + 1, 0);\r\n lastDayOfMonth.setHours(23, 59, 59, 999);\r\n \r\n dispatch({\r\n type: AGENDA_SET_SELECTED_RANGE,\r\n payload: {\r\n start_date: firstDayOfMonth,\r\n end_date: lastDayOfMonth\r\n }\r\n });\r\n\r\n await fetchAppointments({\r\n dateFilterStartDate: moment(firstDayOfMonth).format('YYYY-MM-DDTHH:mm:ss'),\r\n datefilterEndDate: moment(lastDayOfMonth).format('YYYY-MM-DDTHH:mm:ss')\r\n });\r\n setOpenRescheduleCalendarModal(true)\r\n setDefaultView('week')\r\n }}\r\n >\r\n
\r\n {localLoading && }\r\n {translatorService.Tranlate('APPOINTMENT_DETAILS_RESCHEDULE_BUTTON', 'Reschedule')}\r\n
\r\n \r\n {\r\n setSelectedHour(tableMeta.rowData[1])\r\n const startDate = new Date(tableMeta.rowData[1])\r\n startDate.setUTCHours(0, 0, 0, 0);\r\n const endDate = new Date(tableMeta.rowData[1])\r\n endDate.setUTCHours(23, 59, 59, 999);\r\n await fetchAppointments({\r\n dateFilterStartDate: moment(startDate).format(),\r\n datefilterEndDate: moment(endDate).format()\r\n }, true)\r\n setOpenViewCalendar(true)\r\n }}\r\n >\r\n {translatorService.Tranlate('APPOINTMENT_CLIENT_SELECTION_OPEN_CALENDAR', 'Open calendar')}\r\n \r\n\r\n
\r\n\r\n );\r\n }\r\n const indexLang = value?.translations?.findIndex((trans: any) => trans?.language === language);\r\n const text = indexLang !== -1 ? value?.translations[indexLang]?.name : value?.displayName;\r\n return
\r\n \r\n
\r\n }\r\n }\r\n }\r\n ];\r\n return columns;\r\n };\r\n\r\n const options = {\r\n filter: false,\r\n search: false,\r\n sort: false,\r\n viewColumns: false,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(translatorService),\r\n elevation: 0,\r\n pagination: false,\r\n };\r\n\r\n return (\r\n \r\n \r\n {renderModal()}\r\n {openRescheduleModal ? {\r\n changeStatus(statusList.RESCHEDULED.id, comment)\r\n setOpenRescheduleCalendarModal(false);\r\n setOpenRescheduleCalendarModal(false);\r\n }}\r\n calendarText= {translatorService.Tranlate('APPOINTMENT_RESCHEDULE_MESSAGE', 'Select a new date for scheduling')}\r\n buttonText={translatorService.Tranlate('APPOINTMENT_DETAILS_RESCHEDULE_BUTTON', 'Reschedule')}\r\n />:null}\r\n {renderRescheduleCalendarModal()}\r\n \r\n );\r\n};\r\n\r\n\r\n\r\n\r\nexport default AppointmentClientSelectionDetails;\r\n","import React from 'react';\r\nimport { useAppSelector } from '../../store/configureStore';\r\nimport { Box, Button, Grid, IconButton, Modal, TextField, Typography } from '@material-ui/core';\r\n// Components\r\nimport CarDetails from './CarDetails';\r\nimport JobDetails from './JobDetails';\r\nimport JobsMultipleSelection from './JobsMultipleSelection';\r\nimport ContactForm from './ContactForm';\r\nimport moment from 'moment';\r\nimport { getHour, getStatusData } from '../../utils/appointments';\r\nimport { AppointmentType, ChangeAppointmentStatusPayload } from '../../types/Agenda';\r\nimport { changeAppointmentStatus } from '../agenda/agenda.requests';\r\nimport { ContactFormData } from '../agenda/agenda.types';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport { TranslatorService } from '../../services/TranslatorService';\r\nimport AppointmentClientSelectionDetails from './AppointmentClientSelectionDetails';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport { view } from 'ramda';\r\n\r\nconst AppointmentDetails = ({appointment, setIsLoading, getSelectedAppointment}:{appointment?:AppointmentType , setIsLoading:any, getSelectedAppointment: any}) => {\r\n const [date, setDate] = React.useState(null);\r\n const [hour, setHour] = React.useState(null);\r\n const [contactFormData, setContactFormData] = React.useState(null);\r\n const [comment, setComment] = React.useState('');\r\n const statusList = useAppSelector((state)=>state.agenda?.statusList)\r\n const language = useAppSelector((state) => state.app?.language)\r\n const [openCommentModal, setOpenCommentModal] = React.useState(false);\r\n const translatorService = new TranslatorService();\r\n const viewPartnerAppointments = useAppSelector((state) => state.app?.appUser?.organization?.viewOwnerEntries ?? false);\r\n const organizationId = useAppSelector((state) => state.app?.appUser?.organization?.id);\r\n\r\n const renderLastStatus = () => {\r\n const { text, color } = getStatusData(appointment?.appointmentStatus?.code || '', statusList, language || 'ro');\r\n\r\n if (viewPartnerAppointments && organizationId !== appointment?.serviceId) {\r\n return (\r\n \r\n
\r\n \r\n \r\n {text}\r\n \r\n \r\n
\r\n
\r\n );\r\n }\r\n return \r\n
\r\n \r\n \r\n {text}\r\n \r\n \r\n
\r\n {appointment?.appointmentStatus?.code !== statusList?.CANCELED?.code && !appointment?.hideCancelButton ? setOpenCommentModal(true)}\r\n >\r\n {translatorService.Tranlate('APPOINTMENT_CLIENT_SELECTION_CANCEL', 'Cancel')}\r\n :<>}\r\n
\r\n }\r\n\r\n const changeStatus = async (status: number, comment?:string) => {\r\n setIsLoading(true)\r\n if (!appointment) {\r\n setIsLoading(false)\r\n return;\r\n }\r\n\r\n const payload: ChangeAppointmentStatusPayload = {\r\n appointmentId: appointment?.id,\r\n statusId: status,\r\n comment:comment\r\n }\r\n\r\n if (status === statusList.RESCHEDULED.id) {\r\n const finalDate = date;\r\n const splitHour = hour != null ? hour.split(':') : null;\r\n if (finalDate && splitHour) {\r\n finalDate.setHours(parseInt(splitHour[0]));\r\n finalDate.setMinutes(parseInt(splitHour[1]));\r\n payload.date = moment(finalDate).format();\r\n }\r\n }\r\n\r\n const res = await changeAppointmentStatus(payload)\r\n\r\n if (res.error) {\r\n setIsLoading(false)\r\n return;\r\n }\r\n\r\n\r\n getSelectedAppointment(true);\r\n setIsLoading(false);\r\n }\r\n\r\n React.useEffect(() => {\r\n if(appointment?.date){\r\n setDate(new Date(appointment.date))\r\n setHour(getHour(new Date(appointment.date)))\r\n setContactFormData({\r\n firstName: appointment?.appointmentClient?.firstName || '',\r\n lastName: appointment?.appointmentClient?.lastName || '',\r\n phoneNo: appointment?.appointmentClient?.phone || '',\r\n email: appointment?.appointmentClient?.email || '',\r\n username: appointment?.appUsername || '',\r\n personTypeId: appointment?.appointmentClient?.personTypeId || 1,\r\n personType: appointment?.appointmentClient?.personType || null,\r\n companyName: appointment?.appointmentClient?.companyName || '',\r\n companyNumber: appointment?.appointmentClient?.companyNumber || ''\r\n })\r\n }\r\n }, []);\r\n\r\n React.useEffect(() => {\r\n if(appointment?.date){\r\n setDate(new Date(appointment.date));\r\n setHour(getHour(new Date(appointment.date)));\r\n }\r\n }, [appointment?.date]);\r\n\r\n const renderCancelForm = () => {\r\n return (\r\n {\r\n changeStatus(statusList.CANCELED.id, comment);\r\n setOpenCommentModal(false)\r\n }}\r\n > \r\n
\r\n \r\n {translatorService.Tranlate('APPOINTMENT_ADD_SERVICE_COMMENT_INFO', 'This message will be displayed to the user')}\r\n \r\n setComment(e.target.value)}\r\n validators={['required']}\r\n errorMessages={[\r\n translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n label={translatorService.Tranlate('APPOINTMENT_COMMENT', \"Comment\")}\r\n />\r\n
\r\n
\r\n \r\n {translatorService.Tranlate('APPOINTMENT_CLIENT_SEND', 'Send')}\r\n \r\n
\r\n \r\n );\r\n }\r\n\r\n const addComment = () => {\r\n return (\r\n
\r\n { setOpenCommentModal(false); }}>\r\n
\r\n
\r\n { setOpenCommentModal(false); }}>\r\n \r\n \r\n
\r\n \r\n {translatorService.Tranlate('APPOINTMENT_ADD_SERVICE_COMMENT_TITLE', 'Add service comment')}\r\n \r\n {renderCancelForm()}\r\n
\r\n
\r\n
\r\n );\r\n };\r\n\r\n return (
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n {translatorService.Tranlate('APPOINTMENT_CAR_TITLE', 'Car')}\r\n \r\n {appointment?.vehicle && }\r\n \r\n
\r\n {contactFormData ?
\r\n \r\n
: null}\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n {translatorService.Tranlate('APPOINTMENT_LAST_STATUS', 'Last status:')}\r\n \r\n {renderLastStatus()}\r\n \r\n
\r\n
\r\n \r\n
\r\n\r\n \r\n \r\n \r\n\r\n\r\n\r\n \r\n \r\n {translatorService.Tranlate('APPOINTMENT_CLIENT_DATE_SELECTIONS', 'Client Selections + Reschedule')}\r\n \r\n {\r\n setIsLoading(true);\r\n getSelectedAppointment(true);\r\n }\r\n }\r\n caseId={appointment?.caseId || null}\r\n appointmentCategoryType={appointment?.appointmentCategoryType || null}\r\n setIsLoading={setIsLoading}\r\n viewActionColumn={viewPartnerAppointments && appointment?.serviceId !== organizationId ? true : false}\r\n />\r\n \r\n {addComment()}\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default AppointmentDetails;\r\n","import React, { Fragment, useEffect, useState } from 'react';\r\nimport { Box, CardContent} from '@material-ui/core';\r\nimport { Card } from 'reactstrap';\r\nimport moment from 'moment';\r\nimport { AppointmentHistoryType } from '../../types/Agenda';\r\nimport { TranslatorService } from '../../services/TranslatorService';\r\nimport { useAppSelector } from '../../store/configureStore';\r\n\r\nconst AppointmentHistory = ({ appointmentHistory, isLoading }: { appointmentHistory?: AppointmentHistoryType[], isLoading: boolean}) => {\r\n const translatorService = new TranslatorService();\r\n const language = useAppSelector((state)=>state.app?.language);\r\n const longDateFormat = useAppSelector((state)=>state.app?.longDateFormat);\r\n\r\n const checkDate = (a, b) => {\r\n const dataA = new Date(a.date).getTime();\r\n const dataB = new Date(b.date).getTime();\r\n if (dataA > dataB) {\r\n return -1;\r\n } else if (dataA < dataB) {\r\n return 1;\r\n } else {\r\n return 0;\r\n }\r\n }\r\n\r\n const showTimeline = () => {\r\n if (appointmentHistory?.length === 0 || !appointmentHistory) {\r\n return (\r\n \r\n {translatorService.Tranlate(\r\n 'TARIFF_EDIT_LABOR_TAB_NO_DATA',\r\n 'Nu exista date de afisat!'\r\n )}\r\n \r\n );\r\n }\r\n\r\n const getTranslations = (status:any) =>{\r\n console.log(status.translations, language)\r\n const indexLang = status.translations.findIndex((trans: any) => trans.language === language);\r\n return indexLang !== -1 ? status.translations[indexLang].name : status.name;\r\n }\r\n\r\n return <>{appointmentHistory.sort(checkDate).map((appointmenObj: AppointmentHistoryType) => (\r\n
\r\n
\r\n
\r\n

\r\n {getTranslations(appointmenObj.appointmentStatus) + ' (' + appointmenObj?.user?.userName + ')'}\r\n

\r\n

{appointmenObj.comment}

\r\n

\r\n {moment\r\n .utc(appointmenObj?.date)\r\n .local()\r\n .format(longDateFormat)}\r\n

\r\n
\r\n
\r\n ))}\r\n };\r\n\r\n return (\r\n {!isLoading ? (\r\n \r\n \r\n \r\n
\r\n
\r\n {' '}\r\n {showTimeline()}{' '}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n ) : null}\r\n
\r\n );\r\n};\r\n\r\nexport default AppointmentHistory;\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n ApplicationState,\r\n AppState\r\n} from '../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport {\r\n CardContent,\r\n Button,\r\n IconButton,\r\n DialogTitle,\r\n Grid,\r\n Typography,\r\n Box,\r\n Dialog,\r\n DialogContent\r\n} from '@material-ui/core';\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { Card, CardFooter } from 'reactstrap';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { isNullOrUndefined } from 'util';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport { IReferentialService } from '../../services/Interfaces/IReferentialService';\r\nimport Referentials from '../../helpers/Referentials.json';\r\nimport { AttachmentTypeCode, ReferentialCode } from '../../helpers/Constants';\r\nimport VisibilityIcon from '@material-ui/icons/Visibility';\r\nimport DescriptionIcon from '@material-ui/icons/Description';\r\nimport FileSaver from 'file-saver';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\r\n// @ts-ignore\r\nimport FileViewer from 'react-file-viewer';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport GetAppIcon from '@material-ui/icons/GetApp';\r\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\r\n// @ts-ignore\r\nimport 'react-html5-camera-photo/build/css/index.css';\r\nimport _, { at } from 'lodash';\r\nimport { IOrganizationService } from '../../services/Interfaces/IOrganizationService';\r\nimport { CaseAttachment, CaseSelectedAttachment } from '../../interfaces/Case';\r\n\r\ninterface IAppointmentTabDocumentsFormState {\r\n appointmentAttachments: CaseAttachment[];\r\n attachmentTypeList: IReferential[];\r\n isLoading: boolean;\r\n hasRights: boolean;\r\n executing: boolean;\r\n isDialogOpen: boolean;\r\n previewAttachFile: any;\r\n previewAttachFileExtension: string;\r\n isOpen: boolean;\r\n dialogVisible: boolean;\r\n selectedAttachment: CaseSelectedAttachment;\r\n}\r\n\r\nexport interface ExternalAppointmentTabDocumentsFormProps {\r\n appointmentId: number;\r\n}\r\n\r\ntype IAppointmentTabDocumentsFormProps = ExternalAppointmentTabDocumentsFormProps & {\r\n appState: AppState;\r\n} & ProviderContext;\r\nexport const imageExtensions = ['png', 'jpeg', 'jpg', 'bmp'];\r\n\r\nclass AppointmentTabDocumentsForm extends React.PureComponent<\r\n IAppointmentTabDocumentsFormProps,\r\n IAppointmentTabDocumentsFormState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private caseService!: ICaseService;\r\n private appReferentialService!: IReferentialService;\r\n private organizationService!: IOrganizationService;\r\n static contextType = ApplicationContext;\r\n state = {\r\n appointmentAttachments: [],\r\n attachmentTypeList: [],\r\n isLoading: false,\r\n hasRights: false,\r\n executing: false,\r\n isDialogOpen: false,\r\n previewAttachFile: '',\r\n previewAttachFileExtension: '',\r\n showUploadMessage: false,\r\n isOpen: false,\r\n dialogVisible: false,\r\n selectedAttachment: {\r\n id: -1,\r\n fileName: ''\r\n }\r\n } as IAppointmentTabDocumentsFormState;\r\n\r\n public componentDidMount() {\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadAppointmentDocumentsForm();\r\n }\r\n );\r\n }\r\n\r\n loadAppointmentDocumentsForm = async () => {\r\n const ref = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.AttachmentType\r\n );\r\n const [attachmentTypes] = await Promise.all([\r\n (await (this.appReferentialService.Get(ref!.baseUrl))).filter(x => x.code == AttachmentTypeCode.OTHER)\r\n ]);\r\n\r\n const appointmentAttachments = await this.caseService.GetAppointmentAttachments(\r\n this.props.appointmentId,\r\n attachmentTypes.map((item) => item!.code!)\r\n )\r\n \r\n this.setState({\r\n appointmentAttachments: appointmentAttachments.sort(function (a: any, b: any) {\r\n return b.uploadDate - a.uploadDate;\r\n }),\r\n attachmentTypeList: attachmentTypes.map((item) => ({...item, isLoading: false})),\r\n isLoading: false,\r\n hasRights: false\r\n });\r\n };\r\n\r\n setAttachmentTypeList = (attachmentType: IReferential, value: boolean) => {\r\n const attachmentTypeList = _.cloneDeep(this.state.attachmentTypeList);\r\n for (let i = 0; i < attachmentTypeList.length; i++) {\r\n if (attachmentTypeList[i].id === attachmentType.id) {\r\n attachmentTypeList[i].isLoading = value;\r\n }\r\n }\r\n\r\n return attachmentTypeList;\r\n };\r\n\r\n handleCloseConfirmationDialog = () => {\r\n this.setState({\r\n isOpen: false,\r\n dialogVisible: false\r\n });\r\n };\r\n\r\n handleOpenConfirmationDialog = () => {\r\n this.setState({\r\n isOpen: true,\r\n dialogVisible: true\r\n });\r\n };\r\n\r\n handleCloseModal = () => {\r\n this.setState({\r\n isOpen: false,\r\n dialogVisible: false\r\n });\r\n };\r\n\r\n handlePreviewAttachment = async (originalFileName: string, filename: string) => {\r\n try {\r\n const fileBlob = await this.caseService.GetCaseAttachment(filename);\r\n const url = URL.createObjectURL(fileBlob);\r\n const extension = originalFileName.split('.').pop();\r\n\r\n if (isNullOrUndefined(extension)) {\r\n return;\r\n }\r\n\r\n this.setState({\r\n previewAttachFile: url,\r\n previewAttachFileExtension: extension!.toLowerCase(),\r\n isDialogOpen: true\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n renderPreviewAttachment = () => {\r\n return (\r\n \r\n );\r\n };\r\n\r\n renderPreviewImage = (file: any, fileName: string) => {\r\n const url = URL.createObjectURL(file);\r\n\r\n return {fileName};\r\n };\r\n\r\n renderAttachments = (attachmentType: IReferential) => {\r\n const attachments = this.state.appointmentAttachments.filter(\r\n (item) => item.attachmentTypeId === attachmentType.id\r\n );\r\n const attachmentsToRender = [] as any[];\r\n\r\n attachments.forEach((attach, index) => {\r\n attachmentsToRender.push(\r\n \r\n \r\n \r\n
\r\n \r\n this.handlePreviewAttachment(attach.originalFileName, attach.fileName)\r\n }\r\n >\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n this.downloadFile(attach.fileName, attach.originalFileName)}\r\n >\r\n {attach.originalFileName}\r\n {' '}\r\n \r\n
\r\n
\r\n\r\n \r\n
\r\n this.downloadFile(attach.fileName, attach.originalFileName)}\r\n >\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n );\r\n });\r\n return attachmentsToRender;\r\n };\r\n\r\n downloadFile = async (fileName: string, origFileName: string) => {\r\n const fileBlob = await this.caseService.GetCaseAttachment(fileName);\r\n FileSaver.saveAs(fileBlob, origFileName);\r\n };\r\n\r\n renderAttachmentTypes = () => {\r\n const attachmentTypes = [] as any[];\r\n const attachmentTypeList = this.state.attachmentTypeList;\r\n if (attachmentTypeList.length !== 0) {\r\n attachmentTypeList.forEach((attach, index) => {\r\n attach.fileInputKey = Date.now();\r\n attachmentTypes.push(\r\n
\r\n \r\n
\r\n
\r\n \r\n {attach!.displayName}\r\n item.attachmentTypeId === attach.id\r\n ).length === 0\r\n }\r\n onClick={(e) => {\r\n this.downloadBasedOnAttachmentType(attach);\r\n }}\r\n >\r\n \r\n \r\n \r\n
\r\n
\r\n\r\n \r\n
\r\n \r\n
\r\n {!attach.isLoading ? (\r\n
\r\n {this.state.appointmentAttachments.filter(\r\n (item) => item.attachmentTypeId === attach.id\r\n ).length !== 0 ? (\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
{this.renderAttachments(attach)}
\r\n
\r\n ) : (\r\n
\r\n \r\n
\r\n )}\r\n
\r\n ) : (\r\n ''\r\n )}\r\n
\r\n \r\n \r\n
\r\n
\r\n );\r\n });\r\n }\r\n return attachmentTypes;\r\n };\r\n\r\n downloadBasedOnAttachmentType = async (item: IReferential) => {\r\n this.setState({\r\n attachmentTypeList: this.setAttachmentTypeList(item, true)\r\n });\r\n\r\n const fileBlob = await this.caseService.GetAppointmentAttachmentsArchive(\r\n this.props.appointmentId,\r\n [item.code!]\r\n );\r\n\r\n this.setState({\r\n attachmentTypeList: this.setAttachmentTypeList(item, false)\r\n });\r\n \r\n FileSaver.saveAs(\r\n fileBlob,\r\n this.props.appointmentId + '_' + item!.displayName + '.zip'\r\n );\r\n };\r\n\r\n closeDialog = async () => {\r\n this.setState({\r\n isDialogOpen: false\r\n });\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n
\r\n
{this.renderAttachmentTypes()}
\r\n
\r\n ) : null}\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n {this.translatorService.Tranlate('CASE_PREVIEW_DOC', 'Previzualizare document')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.renderPreviewAttachment()}\r\n \r\n \r\n \r\n \r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalAppointmentTabDocumentsFormProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app\r\n }),\r\n null,\r\n mergeProps\r\n)(withSnackbar(AppointmentTabDocumentsForm as any));\r\n","import React, { Fragment, useState } from 'react';\r\nimport { useAppDispatch, useAppSelector } from '../../store/configureStore';\r\nimport { AGENDA_SET_STATUS_LIST } from '../../store/actions/ActionTypes';\r\nimport { Box, Button, IconButton, Tab, Tabs } from '@material-ui/core';\r\nimport { Card } from 'reactstrap';\r\n// Components\r\nimport { getStatusList } from '../../utils/appointments';\r\nimport { AppointmentHistoryType, AppointmentStatusType, AppointmentType } from '../../types/Agenda';\r\nimport { getAppointment } from '../agenda/agenda.requests';\r\nimport { useHistory, useParams } from 'react-router';\r\nimport Loader from '../Loader';\r\nimport { TranslatorService } from '../../services/TranslatorService';\r\nimport { PageTitle } from '../../layout-components';\r\nimport TabPanel from '../_shared/Tabs';\r\nimport { AppUserService } from '../../services/AppUserService';\r\nimport { useSnackbar } from 'notistack';\r\nimport AppointmentDetails from './AppointmentDetails';\r\nimport AppointmentHistory from './AppointmentHistory';\r\nimport { CreateNewFolder, Folder } from '@material-ui/icons';\r\nimport { NewCaseAppointment } from '../agenda/NewCaseAppointment';\r\nimport AppointmentTabDocumentsForm from './AppointmentTabDocumentsForm';\r\n\r\nconst AppointmentPage = () => {\r\n const [isLoading, setIsLoading] = React.useState(false);\r\n const { id } = useParams();\r\n const history = useHistory();\r\n const dispatch = useAppDispatch();\r\n const { enqueueSnackbar } = useSnackbar();\r\n const translatorService = new TranslatorService();\r\n const statusList = useAppSelector((state) => state.agenda?.statusList)\r\n const [appointment, setAppointment] = React.useState();\r\n const [selectedTab, setSelectedTab] = useState(0)\r\n const [appointmentHistory, setAppointmentHistory] = useState>()\r\n const [appointmentId, setAppointmentId] = useState(null);\r\n const viewPartnerAppointments = useAppSelector((state) => state.app?.appUser?.organization?.viewOwnerEntries ?? false);\r\n const organizationId = useAppSelector((state) => state.app?.appUser?.organization?.id);\r\n \r\n const loadAppointmentStatusHistory = async (appointmentHistoryList?:Array) => {\r\n if (!appointmentHistoryList) {\r\n return;\r\n }\r\n const appUserServiceInstance = new AppUserService();\r\n const futureAppointmentHistory: Array = [];\r\n appointmentHistoryList?.forEach(async (appointmentObj:AppointmentHistoryType)=>{\r\n const user = await appUserServiceInstance.GetUserInfo(appointmentObj.userId);\r\n const arrayOfStatus: Array = Object.values(statusList);\r\n const desiredStatus: AppointmentStatusType | undefined = arrayOfStatus.find((status: any) => status.id === appointmentObj.appointmentStatusId);\r\n futureAppointmentHistory.push({\r\n ...appointmentObj,\r\n user:user,\r\n appointmentStatus:desiredStatus\r\n })\r\n })\r\n setAppointmentHistory(futureAppointmentHistory);\r\n };\r\n\r\n const getSelectedAppointment = async () =>{\r\n const res = await getAppointment(id);\r\n const appointment = res.data as AppointmentType\r\n if(res.error || !appointment){\r\n setIsLoading(false);\r\n return;\r\n }\r\n loadAppointmentStatusHistory(appointment?.appointmentStatusHistories);\r\n setAppointment(appointment);\r\n setIsLoading(false);\r\n }\r\n\r\n React.useEffect(() => {\r\n if(!statusList.INITIATA){\r\n getStatusList(setIsLoading, (value:any)=>{\r\n dispatch({\r\n type: AGENDA_SET_STATUS_LIST,\r\n payload: value,\r\n });\r\n }, enqueueSnackbar)\r\n }else if (id) {\r\n setIsLoading(true);\r\n getSelectedAppointment();\r\n }\r\n }, [statusList]);\r\n\r\n const onTabChange = (event: any, newValue: number) => {\r\n setSelectedTab(newValue);\r\n };\r\n\r\n const getActionButton = (appointment: AppointmentType | null) => {\r\n if (!(appointment && appointment?.appointmentStatus?.code === statusList.PAYMENT_CONFIRMATION?.code || appointment?.caseId)) {\r\n return null;\r\n }\r\n \r\n if (viewPartnerAppointments && appointment?.serviceId !== organizationId) {\r\n return appointment?.caseId ? (\r\n history.push('/cases/' + appointment.caseId, 'Case xx')}\r\n >\r\n \r\n {translatorService.Tranlate('APPOINTMENT_VIEW_CASE', 'Vezi dosar')}\r\n \r\n ) : null;\r\n }\r\n \r\n return (\r\n {\r\n if (appointment?.caseId) {\r\n history.push('/cases/' + appointment?.caseId, 'Case xx');\r\n }\r\n else {\r\n setAppointmentId(appointment?.id);\r\n }\r\n }}\r\n >\r\n {appointment?.caseId ? : }\r\n {appointment?.caseId ? translatorService.Tranlate('APPOINTMENT_VIEW_CASE', 'Vezi dosar') : translatorService.Tranlate('APPOINTMENT_CREATE_CASE', 'Creeaza dosar') }\r\n \r\n );\r\n };\r\n \r\n return (\r\n <>{isLoading ? :\r\n {history.push('/agenda')}}\r\n actionButton={getActionButton(appointment ?? null)}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n {appointmentId ? setAppointmentId(null)} /> : null}\r\n
\r\n }\r\n );\r\n};\r\n\r\nexport default AppointmentPage;\r\n","import React, { useEffect, useState } from 'react';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport TextField from '@material-ui/core/TextField';\r\nimport { Typography, Box } from '@material-ui/core';\r\nimport { getCarListRequest } from '../agenda/agenda.requests';\r\nimport { Car } from '../agenda/agenda.types';\r\nimport { TranslatorService } from '../../services/TranslatorService';\r\n\r\ninterface CarAutocompleteProps {\r\n value: Car |null\r\n onChange: (event: React.ChangeEvent, newValue: Car | null) => void;\r\n error?: boolean\r\n}\r\n\r\nconst CarAutocomplete: React.FC = ({value, onChange, error }) => {\r\n const [cars, setCars] = useState([]);\r\n const translatorService = new TranslatorService();\r\n\r\n const getCarList = async () => {\r\n const response = await getCarListRequest();\r\n const responseData = response.data as Car[];\r\n const mappedCars: Car[] = responseData?.map((carData) => {\r\n return {\r\n vin: carData?.vin,\r\n plateNumber: carData?.plateNumber,\r\n numberOfKilometers: carData?.numberOfKilometers,\r\n firstPlateDate: carData?.firstPlateDate,\r\n model: {\r\n name: carData?.model?.name,\r\n brand: carData?.model?.brand,\r\n carBody: carData?.model?.carBody,\r\n description: carData?.model?.description\r\n // TODO: add other properties\r\n }\r\n };\r\n });\r\n\r\n if (value && value.addManual) {\r\n setCars([...mappedCars, value])\r\n } else {\r\n setCars(mappedCars);\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n if(cars?.length ===0 || value?.addManual){\r\n getCarList();\r\n } \r\n }, [value]);\r\n \r\n return (\r\n \r\n \r\n {translatorService.Tranlate('APPOINTMENT_CAR_TITLE', 'Car')}\r\n \r\n \r\n car.plateNumber ?? ''}\r\n onChange={onChange}\r\n value={value}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n );\r\n};\r\n\r\nexport default CarAutocomplete;\r\n","import React, { ChangeEvent } from 'react';\r\nimport { Box, Typography, TextField } from '@material-ui/core';\r\nimport { TranslatorService } from '../../services/TranslatorService';\r\n\r\ninterface MileageInputProps {\r\n onChange: (mileage: string) => void;\r\n error?:boolean\r\n}\r\n\r\nconst MileageInput: React.FC = ({ onChange, error }) => {\r\n const translatorService = new TranslatorService();\r\n const handleMileageChange = (event: ChangeEvent) => {\r\n onChange(event.target.value);\r\n };\r\n\r\n return (\r\n \r\n \r\n Mileage (km)\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default MileageInput;\r\n","import React, { useState } from 'react';\r\nimport {\r\n Dialog,\r\n DialogContent,\r\n DialogTitle,\r\n DialogActions,\r\n Button,\r\n TextField\r\n} from '@material-ui/core';\r\nimport { Client } from '../agenda/agenda.types';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport { TranslatorService } from '../../services/TranslatorService';\r\n\r\ninterface AddNewClientModalProps {\r\n open: boolean;\r\n onClose: () => void;\r\n onSave: (client:Client) => void;\r\n}\r\n\r\nconst initialState = {\r\n firstName: '',\r\n lastName: '',\r\n phone: '',\r\n email: '',\r\n}\r\n\r\ninterface FormType extends Client{\r\n [key: string]: any;\r\n}\r\n\r\nconst AddNewClientModal: React.FC = ({ open, onClose, onSave }) => {\r\n const [formData, setFormData] = useState({...initialState});\r\n const [formError,setFormError] = useState({...initialState});\r\n const translatorService = new TranslatorService()\r\n\r\n const handleChange = (e: React.ChangeEvent) => {\r\n const { name, value } = e.target;\r\n setFormData((prevData) => ({\r\n ...prevData,\r\n [name]: value,\r\n }));\r\n };\r\n\r\n const closeModal = ( )=>{\r\n onClose();\r\n setFormError({...initialState})\r\n setFormData({ ...initialState })\r\n }\r\n\r\n const handleSave = () => {\r\n const payload = { ...formData, personTypeId:1}\r\n onSave(payload)\r\n closeModal()\r\n };\r\n\r\n const validateForm = () =>{\r\n const errors = {...formError};\r\n let canContinue = true\r\n for (const key in formData) {\r\n if (formData.hasOwnProperty(key) && !formData[key]) {\r\n canContinue = false;\r\n errors[key] = translatorService.Tranlate(\r\n 'VALIDATORS_REQUIRED',\r\n 'Campul este obligatoriu'\r\n )\r\n }else{\r\n errors[key] = ''\r\n }\r\n }\r\n if(canContinue){\r\n handleSave();\r\n }else{\r\n setFormError(errors)\r\n }\r\n\r\n }\r\n\r\n return (\r\n \r\n Add new client\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default AddNewClientModal;","import React from 'react';\r\nimport { Link } from 'react-router-dom';\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\n\r\nexport const LinkButton = ({ onClickMethod, text }: {onClickMethod:()=>void, text:string}) => {\r\n return (\r\n \r\n );\r\n};\r\n","import { useContext, useState } from 'react';\r\nimport {\r\n Dialog,\r\n DialogContent,\r\n DialogTitle,\r\n Button,\r\n IconButton,\r\n} from '@material-ui/core';\r\nimport { Car } from '../agenda/agenda.types';\r\nimport { isNullOrUndefined } from 'util';\r\nimport React from 'react';\r\nimport { ApplicationContext } from '../../context/Contexts';\r\nimport { Model, ModelData } from '../../interfaces/Case';\r\nimport Form from '@rjsf/material-ui';\r\nimport { IChangeEvent, ISubmitEvent } from '@rjsf/core';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport { GTErrorCode, ReferentialCode } from '../../helpers/Constants';\r\nimport Referentials from '../../helpers/Referentials.json';\r\nimport * as R from 'ramda';\r\nimport Loader from '../Loader';\r\nimport { useSnackbar } from 'notistack';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport { Autocomplete } from '@material-ui/lab';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\n\r\nconst FORM_JSON = {\r\n type: \"object\",\r\n required:['plateNumber', 'vin', 'brandId', 'modelId'],\r\n properties: {\r\n plateNumber: {\r\n type: \"string\",\r\n title: \"Plate Number\",\r\n tag: \"FRM_CAR_DATA_PLATE_NUMBER\"\r\n },\r\n vin: {\r\n type: \"string\",\r\n title: \"Vin\",\r\n tag: \"FRM_CAR_DATA_VIN\",\r\n minLength: 17,\r\n maxLength: 17\r\n\r\n },\r\n brandId: {\r\n type: \"number\",\r\n title: \"Brand\",\r\n tag: \"FRM_CAR_DATA_BRAND\",\r\n anyOf: [\r\n {\r\n type: \"number\",\r\n title: \"CAR_BRAND_ENUM\",\r\n enum: [\r\n 1\r\n ]\r\n }\r\n ]\r\n },\r\n modelId: {\r\n type: \"number\",\r\n title: \"Model\",\r\n tag: \"FRM_CAR_DATA_MODEL\",\r\n anyOf: [\r\n {\r\n type: \"number\",\r\n title: \"CAR_MODEL_ENUM\",\r\n enum: [\r\n 1\r\n ]\r\n }\r\n ]\r\n }\r\n }\r\n}\r\n\r\ninterface AddNewCarModalProps {\r\n open: boolean;\r\n onClose: () => void;\r\n onSave: (vehicle:Car) => void;\r\n}\r\n\r\ninterface FormType {\r\n plateNumber:string;\r\n vin:string;\r\n brandId:number;\r\n modelId?:number;\r\n modelList:Model[],\r\n brandList:IReferential[]\r\n}\r\n\r\nconst AddNewCarModal: React.FC = ({ open, onClose, onSave }) => {\r\n const [formData, setFormData] = useState({} as FormType);\r\n const { enqueueSnackbar } = useSnackbar();\r\n const [isLoading, setIsLoading] = useState(false);\r\n const [isDialogOpen, setIsDialogOpen] = useState(false);\r\n const [modelData, setModelData] = useState([]);\r\n const [selectedModelData, setSelectedModelData] = useState();\r\n const context = useContext(ApplicationContext);\r\n\r\n const loadData = async () => {\r\n setIsLoading(true);\r\n const refCarBrand = Referentials.referential.find(\r\n (item) => item?.code === ReferentialCode.CarBrands\r\n );\r\n\r\n const futureBrandList = await context.referentialService.Get(refCarBrand!.baseUrl)\r\n let futureModelList: Model[] = [];\r\n futureModelList = await context.caseService.GetCarModelsByBrand(futureBrandList[0].id);\r\n setFormData((prevState) => ({\r\n ...prevState,\r\n modelList: futureModelList,\r\n brandList:futureBrandList\r\n }));\r\n setIsLoading(false)\r\n };\r\n React.useEffect(()=>{\r\n loadData()\r\n },[])\r\n\r\n const closeModal = () => {\r\n onClose();\r\n setFormData({} as FormType)\r\n }\r\n\r\n\r\n const handleArraySchema = (schema: any) => {\r\n if (isNullOrUndefined(schema.properties)) {\r\n return schema;\r\n }\r\n\r\n for (const key of Object.keys(schema.properties)) {\r\n if (schema.properties[key].anyOf === undefined) {\r\n continue;\r\n }\r\n if (schema.properties[key].anyOf.length === 0) {\r\n continue;\r\n }\r\n if (\r\n !!formData?.brandList?.length &&\r\n schema.properties[key].anyOf !== undefined &&\r\n schema.properties[key].anyOf.length != 0 &&\r\n schema.properties[key].anyOf[0].title === 'CAR_BRAND_ENUM'\r\n ) {\r\n schema.properties[key].anyOf = formData?.brandList?.map((item) => {\r\n return {\r\n type: 'number',\r\n title: item.displayName,\r\n enum: [item.id]\r\n };\r\n });\r\n }\r\n if (\r\n !!formData?.modelList?.length &&\r\n schema.properties[key].anyOf !== undefined &&\r\n schema.properties[key].anyOf.length != 0 &&\r\n schema.properties[key].tag === 'FRM_CAR_DATA_MODEL'\r\n ) {\r\n const models = formData?.modelList?.map((item) => {\r\n return {\r\n type: 'number',\r\n title: item.displayName,\r\n enum: [item.id]\r\n };\r\n });\r\n schema.properties[key].anyOf = models;\r\n }\r\n }\r\n return schema;\r\n };\r\n\r\n const handleAutocompleteModelDataChange = async (newValue: ModelData | null) => {\r\n setSelectedModelData(newValue);\r\n };\r\n\r\n const renderAddModelForm = () => {\r\n return (\r\n \r\n
\r\n handleAutocompleteModelDataChange(newValue)}\r\n getOptionLabel={(option: ModelData) => option.modelDescription || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n
\r\n
\r\n {setIsDialogOpen(false)}}\r\n >\r\n {context.translatorService.Tranlate('EDIT_ORGANIZATION_CANCEL_BTN', 'Anuleaza')}\r\n \r\n \r\n
\r\n
\r\n );\r\n };\r\n\r\n const submitSelectedModelData = async () => {\r\n try {\r\n const model = formData.modelList.find(\r\n (item:Model) => item.code === selectedModelData!.umc\r\n );\r\n if (isNullOrUndefined(model)) {\r\n return;\r\n }\r\n setFormData({\r\n ...formData,\r\n modelId: model.id\r\n })\r\n setIsDialogOpen(false);\r\n\r\n } catch (ex) {\r\n enqueueSnackbar(context.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n const onBlur = async (id: string, value: any) => {\r\n if (id === 'root_vin') {\r\n if (R.test(/^(?=.*[0-9])(?=.*[abcdefghjklmnprstuvwxyzABCDEFGHJKLMNPRSTUVWXYZ])[0-9abcdefghjklmnprstuvwxyzABCDEFGHJKLMNPRSTUVWXYZ-]{17}$/, value)) {\r\n const result = await context.caseService.DecodeVin(value);\r\n if (result.error !== null) {\r\n if (result.error.errorInfo.code == GTErrorCode.THE_VIN_NUMBER_SENT_DOES_NOT_DECODE_ANY_MODEL) {\r\n enqueueSnackbar(context.translatorService.Tranlate('THE_VIN_NUMBER_SENT_DOES_NOT_DECODE_ANY_MODEL', 'Din păcate autovehiculul selectat nu poate fi identificat în aplicație !'), {\r\n variant: 'warning',\r\n autoHideDuration: 5000\r\n });\r\n }\r\n return;\r\n }\r\n if (result.responseInfo.vehicleInfoDec.modelList.modelData.length === 0) {\r\n return;\r\n }\r\n const makeCode = result.responseInfo.vehicleInfoDec.modelList.modelData[0].makeCode;\r\n const brand = formData?.brandList?.find((item:any) => makeCode.startsWith(item.code!, 0));\r\n if (isNullOrUndefined(brand)) {\r\n return;\r\n }\r\n const futureModelList = await context.caseService.GetCarModelsByBrand(brand.id);\r\n if (result.responseInfo.vehicleInfoDec.modelList.modelData.length > 1) {\r\n enqueueSnackbar(context.translatorService.Tranlate('SELECT_MODEL_DIALOG', 'Va rugam selectati modelul auto!'), {\r\n variant: 'warning',\r\n autoHideDuration: 5000\r\n });\r\n setIsDialogOpen(true);\r\n setFormData((prevState) => {\r\n const newState = {...prevState};\r\n delete newState.modelId;\r\n newState.modelList=[...futureModelList];\r\n newState.brandId= brand.id;\r\n newState.vin= value;\r\n return newState;\r\n });\r\n setModelData(result.responseInfo.vehicleInfoDec.modelList.modelData)\r\n } else {\r\n const model = futureModelList.find(\r\n (item) => item.code === result.responseInfo.vehicleInfoDec.modelList.modelData[0].umc\r\n );\r\n if (isNullOrUndefined(model)) {\r\n setFormData((prevState) => ({\r\n ...prevState,\r\n modelList: [...futureModelList],\r\n brandId: brand.id,\r\n vin: value,\r\n }));\r\n return;\r\n }\r\n setFormData((prevState) => ({\r\n ...prevState,\r\n modelList: [...futureModelList],\r\n brandId: brand.id,\r\n modelId: model.id, \r\n vin: value,\r\n }));\r\n }\r\n } else {\r\n enqueueSnackbar(context.translatorService.Tranlate('INVALID_CAR_VIN_IDENTIFICATOR', \"Te rugăm să te asiguri că seria de șasiu introdusă are 17 caractere alfanumerice și nu conține spații sau literele 'O' sau 'I'!\"), {\r\n variant: 'warning',\r\n autoHideDuration: 6000\r\n });\r\n }\r\n }\r\n };\r\n\r\n const onFormChange = async (e: IChangeEvent) => {\r\n if (\r\n e.formData.brandId !== formData.brandId &&\r\n !isNullOrUndefined(e.formData.brandId)\r\n ) {\r\n const futureModelList = await context.caseService.GetCarModelsByBrand(e.formData.brandId);\r\n const futureFormData = e.formData;\r\n if (futureModelList.length != 0) {\r\n futureFormData.modelId = futureModelList[0].id;\r\n }\r\n setFormData({\r\n ...futureFormData,\r\n modelList: [...futureModelList],\r\n });\r\n return;\r\n }\r\n\r\n setFormData(e.formData)\r\n };\r\n\r\n const onSubmit = (e:any) =>{\r\n const indexModel = formData.modelList.findIndex((model)=>model.id === e.formData.modelId);\r\n const indexBrand = formData.brandList.findIndex((brand)=>brand.id === e.formData.brandId);\r\n onSave({\r\n vin: e?.formData.vin || null,\r\n plateNumber: e?.formData.plateNumber || null,\r\n model:{\r\n brand: indexBrand !== -1 ? formData.brandList[indexBrand].displayName : null,\r\n description: indexModel !== -1 ? formData.modelList[indexModel].description : null,\r\n name: indexModel !== -1 ? formData.modelList[indexModel]?.description?.split('(')[0] :'',\r\n carBody:null\r\n },\r\n firstPlateDate:null,\r\n numberOfKilometers:null,\r\n addManual:true\r\n })\r\n onClose()\r\n }\r\n\r\n const renderFormData = (form: any) => {\r\n const jsonSchema = form;\r\n let schema = context.translatorService.TranslateSchema(jsonSchema);\r\n schema = handleArraySchema(schema);\r\n return (\r\n
\r\n await onFormChange(e)}\r\n onSubmit={async (e: ISubmitEvent) => await onSubmit(e)}\r\n transformErrors={context.translatorService.TranslateErrors}\r\n >\r\n
\r\n \r\n \r\n
\r\n \r\n {isDialogOpen ? (\r\n {setIsDialogOpen(false)}}\r\n aria-labelledby=\"customized-dialog-title\"\r\n open={isDialogOpen}\r\n fullScreen={false}\r\n disableBackdropClick\r\n fullWidth={true}\r\n >\r\n \r\n {context.translatorService.Tranlate('FRM_CAR_DATA_MODEL', 'Model Autovehicul')}\r\n {setIsDialogOpen(false)}}\r\n size={'small'}\r\n >\r\n \r\n \r\n \r\n \r\n {renderAddModelForm()}\r\n \r\n \r\n ) : (\r\n ''\r\n )}\r\n
\r\n );\r\n };\r\n\r\n return (\r\n \r\n Add new car\r\n \r\n {isLoading && !formData.modelList?.length && !formData.brandList?.length ? : renderFormData(FORM_JSON)}\r\n \r\n \r\n );\r\n};\r\n\r\nexport default AddNewCarModal;","import React, { Fragment, useState } from 'react';\r\nimport { useAppDispatch, useAppSelector } from '../../store/configureStore';\r\nimport { AGENDA_SET_APPOINTMENTS, AGENDA_SET_CATEGORY_TYPE } from '../../store/actions/ActionTypes';\r\nimport { Box, } from '@material-ui/core';\r\nimport { Button } from 'reactstrap';\r\n// Components\r\nimport ClientAutocomplete from './ClientAutocomplete';\r\nimport CarAutocomplete from './CarAutocomplete';\r\nimport CarDetails from './CarDetails';\r\nimport JobDetails from './JobDetails';\r\nimport JobsMultipleSelection from './JobsMultipleSelection';\r\nimport ContactForm from './ContactForm';\r\nimport MileageInput from './MileageInput';\r\nimport moment from 'moment';\r\nimport AddNewClientModal from './AddNewClientModal';\r\nimport { AppointmentCalendar } from './AppointmentCalendar';\r\nimport { getCategoryTypeList, getHour, getHourForAppointment } from '../../utils/appointments';\r\nimport { ResponseAppointmentsData } from '../../types/Agenda';\r\nimport { addAppointment, getAppointmentsRequest } from '../agenda/agenda.requests';\r\nimport { Car, Client, ContactFormData } from '../agenda/agenda.types';\r\nimport { useHistory } from 'react-router';\r\nimport Loader from '../Loader';\r\nimport { TranslatorService } from '../../services/TranslatorService';\r\nimport { PageTitle } from '../../layout-components';\r\nimport { useSnackbar } from 'notistack';\r\nimport { LinkButton } from './LinkButton';\r\nimport AddNewCarModal from './AddNewCarModal';\r\n\r\nconst AddNewAppointmentPage = () => {\r\n const [isLoading, setIsLoading] = React.useState(false);\r\n const history = useHistory();\r\n const dispatch = useAppDispatch();\r\n const { enqueueSnackbar } = useSnackbar();\r\n const translatorService = new TranslatorService();\r\n const selectedRange = useAppSelector((state) => state.agenda?.selectedRange)\r\n const categoryType = useAppSelector((state)=>state.agenda?.categoryType)\r\n const user = useAppSelector((state) => state.app?.user)\r\n const [selectedClient, setSelectedClient] = React.useState(null);\r\n const [selectedCar, setSelectedCar] = React.useState(null);\r\n const [carMileage, setCarMileage] = React.useState('');\r\n const [selectedJobs, setSelectedJobs] = React.useState([]);\r\n const [jobDetails, setJobDetails] = React.useState('');\r\n const [openModal, setOpenModal] = React.useState(false)\r\n const [addCarModal, setAddCarModal] = React.useState(false)\r\n const [date, setDate] = React.useState(new Date());\r\n const [hour, setHour] = React.useState(getHourForAppointment())\r\n const [canContinue, setCanContinue] = useState(true);\r\n const [contactFormData, setContactFormData] = React.useState({\r\n firstName: '',\r\n lastName: '',\r\n phoneNo: '',\r\n email: '',\r\n username: ''\r\n });\r\n\r\n React.useEffect(() => { \r\n if(categoryType?.length === 0){\r\n getCategoryTypeList(setIsLoading, (value: any) => {\r\n dispatch({\r\n type: AGENDA_SET_CATEGORY_TYPE,\r\n payload: value\r\n })\r\n }, enqueueSnackbar)\r\n }\r\n }, []);\r\n\r\n const fetchAppointments = async (filters: any) => {\r\n setIsLoading(true);\r\n\r\n const response = await getAppointmentsRequest(filters);\r\n\r\n const responseData = response.data as ResponseAppointmentsData;\r\n\r\n if (!responseData.appointments) {\r\n return\r\n }\r\n\r\n dispatch({\r\n type: AGENDA_SET_APPOINTMENTS,\r\n payload: responseData.appointments\r\n });\r\n setIsLoading(false);\r\n };\r\n\r\n const handleClientChange = (e: any, newValue: Client | null) => {\r\n setSelectedClient(newValue);\r\n };\r\n\r\n const handleCarChange = (e: any, newValue: Car | null) => {\r\n setSelectedCar(newValue);\r\n };\r\n\r\n const handleMileageChange = (mileage: string) => {\r\n setCarMileage(mileage);\r\n };\r\n\r\n const handelDescriptionChange = (event: React.ChangeEvent) => {\r\n const newValue = event.target.value;\r\n setJobDetails(newValue);\r\n };\r\n\r\n const handleContactFormChange = (formData: ContactFormData) => {\r\n setContactFormData(formData);\r\n };\r\n const getRequestPayload = async () => {\r\n const finalDate = date;\r\n const splitHour = hour.split(':');\r\n const indexCategory = categoryType.findIndex((categoryItem: any) => categoryItem.code ==='EVALUATION')\r\n finalDate.setHours(parseInt(splitHour[0]));\r\n finalDate.setMinutes(parseInt(splitHour[1]))\r\n const payload = {\r\n serviceId: parseInt(user?.profile.organization_id),\r\n appointmentClient: selectedClient,\r\n vehicle: {\r\n vin: selectedCar?.vin || null,\r\n plateNumber: selectedCar?.plateNumber || null,\r\n make: selectedCar?.model.brand || null,\r\n model: selectedCar?.model.description || null,\r\n numberOfKilometers: carMileage,\r\n firstPlateDate: selectedCar?.firstPlateDate || null\r\n },\r\n date: moment(finalDate).format(),\r\n appointmentJobTypes: selectedJobs,\r\n jobDetails: jobDetails,\r\n appFirstName: contactFormData.firstName,\r\n appLastName: contactFormData.lastName,\r\n appEmail: contactFormData.email,\r\n appPhone: contactFormData.phoneNo,\r\n appUsername: contactFormData.username,\r\n appointmentCategoryTypeId: indexCategory !==-1 ? categoryType[indexCategory].id : 0\r\n }\r\n return payload;\r\n }\r\n\r\n const validateForm = () => {\r\n let futureCanContinue = true;\r\n if (!selectedCar || !selectedClient) {\r\n futureCanContinue = false;\r\n }\r\n setCanContinue(futureCanContinue)\r\n if (futureCanContinue) {\r\n saveData();\r\n }\r\n\r\n }\r\n\r\n const saveData = async () => {\r\n const payload = await getRequestPayload();\r\n const res = await addAppointment(payload)\r\n if (res.error) {\r\n return;\r\n }\r\n fetchAppointments({\r\n dateFilterStartDate: selectedRange?.start_date,\r\n datefilterEndDate: selectedRange?.end_date\r\n })\r\n history.goBack();\r\n }\r\n return (<>{isLoading ? :\r\n \r\n { history.push('/agenda') }} />\r\n \r\n \r\n \r\n setOpenModal(true)} text='add new client' />\r\n \r\n \r\n \r\n \r\n \r\n {!selectedCar ? setAddCarModal(true)} text='add new car' /> :null}\r\n \r\n \r\n \r\n {selectedCar && }\r\n \r\n \r\n {\r\n setSelectedJobs(selectedValues);\r\n }}\r\n />\r\n \r\n \r\n \r\n \r\n\r\n \r\n {translatorService.Tranlate('CASE_COMMENT_SEND', 'Save')}\r\n \r\n \r\n setSelectedClient(client)} open={openModal} onClose={() => { setOpenModal(false) }} />\r\n {addCarModal ? setSelectedCar(car)} open={addCarModal} onClose={() => { setAddCarModal(false) }} /> :null}\r\n \r\n }\r\n );\r\n};\r\n\r\nexport default AddNewAppointmentPage;\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport {\r\n Tooltip,\r\n Box,\r\n Button,\r\n IconButton,\r\n Dialog,\r\n DialogTitle,\r\n Grid,\r\n Typography,\r\n DialogContent\r\n} from '@material-ui/core';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport AddCircleTwoToneIcon from '@material-ui/icons/AddCircleTwoTone';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ValidatorForm, TextValidator } from 'react-material-ui-form-validator';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport MUIDataTable, {\r\n SelectableRows,\r\n MUIDataTableMeta,\r\n MUIDataTableColumnOptions\r\n} from 'mui-datatables';\r\nimport { MUITranslations } from '../../../helpers/MUITableTranslations';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport DeleteOutlineTwoToneIcon from '@material-ui/icons/DeleteOutlineTwoTone';\r\nimport { ReferentialCode } from '../../../helpers/Constants';\r\nimport Referentials from '../../../helpers/Referentials.json';\r\nimport { ICaseService } from '../../../services/Interfaces/ICaseService';\r\nimport { IReferential } from '../../../interfaces/IReferential';\r\nimport moment from 'moment';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport EditOutlinedIcon from '@material-ui/icons/EditOutlined';\r\nimport * as R from 'ramda';\r\nimport { MaintenanceProducer } from '../../../interfaces/Case';\r\n\r\ninterface IMaintenanceProducerComponentState {\r\n newMaintenanceProducer: MaintenanceProducer;\r\n maintenancePackageList: IReferential[];\r\n maintenanceProducerList: MaintenanceProducer[];\r\n isLoading: boolean;\r\n isDialogOpen: boolean;\r\n newMaintenanceProducerId: number | null;\r\n countryList: IReferential[];\r\n}\r\ntype IMaintenanceProducerComponentProps = { appState: AppState } & ProviderContext &\r\n RouteComponentProps<{ id: string; workflowId: string }>;\r\nclass MaintenanceProducerComponent extends React.PureComponent<\r\n IMaintenanceProducerComponentProps,\r\n IMaintenanceProducerComponentState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private caseService!: ICaseService;\r\n private appReferentialService!: IReferentialService;\r\n static contextType = ApplicationContext;\r\n private newMaintenanceProducer = {\r\n id: 0,\r\n countryId: 0,\r\n country: null,\r\n countryCode: '',\r\n maintenancePackageId: 0,\r\n maintenancePackage: null,\r\n producer: ''\r\n } as MaintenanceProducer;\r\n\r\n state = {\r\n maintenanceProducerList: [],\r\n isLoading: false,\r\n selectedFilter: 0,\r\n isDialogOpen: false,\r\n newMaintenanceProducer: this.newMaintenanceProducer,\r\n maintenancePackageList: [],\r\n newMaintenanceProducerId: null,\r\n countryList: [] as IReferential[]\r\n } as IMaintenanceProducerComponentState;\r\n\r\n public componentDidMount() {\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadMaintenanceProducerList();\r\n }\r\n );\r\n }\r\n\r\n loadMaintenanceProducerList = async () => {\r\n const maintenanceProducerList = await this.caseService.MaintenanceProducerList();\r\n const ref = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.MaintenancePackage\r\n );\r\n const countryRef = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.Country\r\n );\r\n const [maintenancePackageList, countryList] = await Promise.all([\r\n await this.appReferentialService.Get(ref!.baseUrl),\r\n this.appReferentialService.Get(countryRef!.baseUrl)\r\n ]);\r\n\r\n maintenanceProducerList.forEach(item => {\r\n const maintenancePackage = maintenancePackageList.find(packageItem => !R.isNil(item.maintenancePackageId) && packageItem.id === item.maintenancePackageId);\r\n const country = countryList.find(countryItem => !R.isNil(item.countryId) && countryItem.id === item.countryId);\r\n item.country = R.isNil(country) ? null : country;\r\n item.maintenancePackage = R.isNil(maintenancePackage) ? null : maintenancePackage;\r\n }); \r\n\r\n this.setState({\r\n maintenanceProducerList: maintenanceProducerList,\r\n isLoading: false,\r\n maintenancePackageList: maintenancePackageList,\r\n newMaintenanceProducer: { ...this.newMaintenanceProducer },\r\n countryList: countryList\r\n });\r\n };\r\n private handleCountryChange = (newValue: IReferential | null) => {\r\n this.setState({\r\n newMaintenanceProducer: {\r\n ...this.state.newMaintenanceProducer,\r\n country: newValue,\r\n countryId: newValue !== null ? newValue!.id : 0,\r\n countryCode: newValue !== null ? newValue!.code ?? '' : ''\r\n }\r\n });\r\n };\r\n private handleMaintenancePackageChange = (newValue: IReferential | null) => {\r\n this.setState({\r\n newMaintenanceProducer: {\r\n ...this.state.newMaintenanceProducer,\r\n maintenancePackage: newValue,\r\n maintenancePackageId: newValue !== null ? newValue!.id : 0\r\n }\r\n });\r\n };\r\n\r\n private handleProducerChange = (value: string) => {\r\n this.setState({\r\n newMaintenanceProducer: {\r\n ...this.state.newMaintenanceProducer,\r\n producer: value\r\n }\r\n });\r\n };\r\n \r\n\r\n public saveMaintenanceProducer = async () => {\r\n if (this.state.newMaintenanceProducerId === null) {\r\n try {\r\n await this.caseService.AddMaintenanceProducer(this.state.newMaintenanceProducer);\r\n await this.loadMaintenanceProducerList();\r\n this.closeDialog();\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n } else {\r\n try {\r\n await this.caseService.UpdateMaintenanceProducer(this.state.newMaintenanceProducer);\r\n await this.loadMaintenanceProducerList();\r\n this.closeDialog();\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n public renderAddForm() {\r\n return (\r\n \r\n \r\n this.handleCountryChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n this.handleMaintenancePackageChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n this.handleProducerChange(e.target.value)}\r\n label={this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_PRODUCER_HEADER',\r\n 'Producator'\r\n )}\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n />\r\n\r\n
\r\n \r\n {this.translatorService.Tranlate('EDIT_ORGANIZATION_CANCEL_BTN', 'Anuleaza')}\r\n \r\n \r\n
\r\n
\r\n );\r\n }\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'country',\r\n label: this.translatorService.Tranlate('ORGANIZATIONS_COUNTRY_HEADER', 'Tara'),\r\n options: {\r\n sort: true,\r\n customSort: (a: IReferential, b: IReferential) => {\r\n debugger;\r\n return a.name!.localeCompare(b.name!);\r\n },\r\n customBodyRender: (value: IReferential) => {\r\n return value ? value.displayName : '';\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'maintenancePackage',\r\n label: this.translatorService.Tranlate(\r\n 'ORGANIZATIONS_TAB_MAINTENANCE_PACKAGE',\r\n 'Pachet Mentenanta'\r\n ),\r\n options: {\r\n sort: true,\r\n customSort: (a: IReferential, b: IReferential) => {\r\n return a.name!.localeCompare(b.displayName!);\r\n },\r\n customBodyRender: (value: IReferential) => {\r\n return value ? value.displayName : '';\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'producer',\r\n label: this.translatorService.Tranlate(\r\n 'CALCULATION_DETAILS_PRODUCER_HEADER',\r\n 'Producator'\r\n ) \r\n },\r\n {\r\n name: 'dateModification',\r\n label: this.translatorService.Tranlate('USERS_DATE_MODIFICATION_HEADER', 'Data Modificare'),\r\n options: {\r\n filter: false,\r\n sortDirection: 'desc',\r\n customBodyRender: (value: Date) =>\r\n moment.utc(value).local().format(this.props.appState.longDateFormat)\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: '',\r\n options: {\r\n viewColumns: false,\r\n filter: false,\r\n setCellHeaderProps: () => ({ align: 'center' }),\r\n setCellProps: () => ({ align: 'center' }),\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n <>\r\n this.newMaintenanceProducerPopup(tableMeta.rowData[0])}\r\n >\r\n \r\n \r\n this.deleteMaintenanceProducer(e, tableMeta)}\r\n >\r\n \r\n \r\n \r\n );\r\n }\r\n }\r\n }];\r\n return columns;\r\n };\r\n\r\n deleteMaintenanceProducer = async (event: any, tableMeta: MUIDataTableMeta) => {\r\n try {\r\n const id = tableMeta.rowData[0];\r\n await this.caseService.RemoveMaintenanceProducer(id);\r\n await this.loadMaintenanceProducerList();\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n newMaintenanceProducerPopup = async (maintenanceProducerId: number | null) => {\r\n let newMaintenanceProducer: MaintenanceProducer;\r\n if (maintenanceProducerId == null) {\r\n newMaintenanceProducer = { ...this.state.newMaintenanceProducer } as MaintenanceProducer;\r\n } else {\r\n newMaintenanceProducer = this.state.maintenanceProducerList.find((item) => item.id === maintenanceProducerId)!;\r\n }\r\n this.setState({\r\n isDialogOpen: true,\r\n newMaintenanceProducer: newMaintenanceProducer,\r\n newMaintenanceProducerId: maintenanceProducerId\r\n });\r\n };\r\n\r\n closeDialog = async () => {\r\n this.setState(\r\n { \r\n isDialogOpen: false, \r\n newMaintenanceProducer: this.newMaintenanceProducer \r\n }\r\n );\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n const options = {\r\n filter: true,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n sort: false,\r\n // responsive: \"stacked\",\r\n customToolbar: () => {\r\n return (\r\n \r\n this.newMaintenanceProducerPopup(null)}\r\n >\r\n \r\n \r\n \r\n );\r\n }\r\n };\r\n return (\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n ) : null}\r\n
\r\n {this.state.isDialogOpen ? (\r\n \r\n \r\n \r\n \r\n \r\n {!this.state.newMaintenanceProducerId ? \r\n this.translatorService.Tranlate(\r\n 'MAINTENANCE_PRODUCER_ADD_MODAL_TITLE',\r\n 'Adauga Producator Mentenanta'\r\n ) : this.translatorService.Tranlate(\r\n 'MAINTENANCE_PRODUCER_UPDATE_MODAL_TITLE',\r\n 'Actualizeaza Producator Mentenanta'\r\n )} \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.renderAddForm()}\r\n ) : null}\r\n
\r\n );\r\n }\r\n}\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app\r\n }),\r\n null\r\n)(withSnackbar(MaintenanceProducerComponent as any));","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n ApplicationState,\r\n CaseSettingsState,\r\n AppState,\r\n CaseSettingsActionCreators,\r\n VehicleState\r\n} from '../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport {\r\n Button,\r\n Grid,\r\n Card,\r\n CardContent,\r\n FormControlLabel,\r\n Switch,\r\n CardMedia,\r\n Dialog,\r\n DialogTitle,\r\n DialogContent\r\n} from '@material-ui/core';\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { Autocomplete } from '@material-ui/lab';\r\nimport {\r\n ValuationExtraOption,\r\n ValuationRequest,\r\n ValuationVehicle,\r\n ValuationVehicleOptions,\r\n ValuationVehicles\r\n} from '../../interfaces/Case';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport MUIDataTable, { MUIDataTableColumnOptions, SelectableRows } from 'mui-datatables';\r\nimport { MUITranslations } from '../../helpers/MUITableTranslations';\r\nimport { Label } from 'reactstrap';\r\nimport { ValidatorForm, TextValidator } from 'react-material-ui-form-validator';\r\nimport NumberFormat from 'react-number-format';\r\nimport * as R from 'ramda';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport ValuationFiltersWizardContainer from '../cases/ValuationFiltersWizard/ValuationFiltersWizardContainer';\r\nimport { isNullOrUndefined } from 'util';\r\nimport { Utils } from '../../helpers/Utils';\r\nimport ImageNotAvailable from '../../assets/images/car-image-not-available.jpg';\r\nimport moment from 'moment';\r\nimport Loader from '../Loader';\r\n\r\ntype ParsedConditions = {\r\n mandatory: number[];\r\n atLeastOne: number[];\r\n};\r\n\r\ninterface ICaseDetailsValuationState {\r\n vehicles: ValuationVehicle[];\r\n isLoading: boolean;\r\n viewOptions: boolean;\r\n selectedVehicle: ValuationVehicle | null;\r\n options: ValuationVehicleOptions | null;\r\n optionCodes: string[];\r\n optionsValue: number;\r\n selectedOptionIndexes: number[];\r\n excludedOptionsIndexes: number[];\r\n includedOptionsIndexes: number[];\r\n requiredOptionsIndexes: number[];\r\n showOtionalRequiredOptions: boolean;\r\n optinalRequiredOptionsIndexes: number[];\r\n isloadingIncludeExcludeOptions: boolean;\r\n tireWear: number;\r\n bodyDamage: number;\r\n hasGpl: boolean;\r\n valuationLoading: boolean;\r\n showWizard: boolean;\r\n hideVehicleSelection: boolean;\r\n kmNo: number;\r\n color: string | null;\r\n showCarTable: boolean;\r\n hideValuationWizzard: boolean;\r\n}\r\n\r\nexport interface ExternalCaseDetailsValuationProps {\r\n vin: string | null;\r\n firstRegistrationDate: Date | null;\r\n onSelectedVehicle?: (selectedVehicle: any, options: string[]) => void;\r\n valuationVehicles?: ValuationVehicle[];\r\n optionCodes?: string[] | null;\r\n brandTypes?: IReferential[];\r\n modelTypes?: IReferential[];\r\n bodyTypes?: IReferential[];\r\n fuelTypes?: IReferential[];\r\n tractionTypes?: IReferential[];\r\n transmissionTypes?: IReferential[];\r\n colorTypes?: IReferential[];\r\n onChangeFirstRegistrationDate?: (date: Date | null) => void;\r\n}\r\n\r\nexport const standardOptionsSchemaIds = [\r\n 301, 2501, 3501, 3601, 23501, 23601, 23701, 23801, 23901, 24001, 31001, 32601, 34801, 38001,\r\n 38701, 38801, 42101, 42901, 44501, 48401, 49001, 50001, 55601, 57901, 58201, 58301, 58401, 58501,\r\n 58601, 59201, 59301, 59801, 63601, 63901\r\n];\r\n\r\ntype ICCaseDetailsValuationProps = ExternalCaseDetailsValuationProps & {\r\n caseSettingsState: CaseSettingsState;\r\n appState: AppState;\r\n vehicleState: VehicleState;\r\n} & typeof CaseSettingsActionCreators &\r\n ProviderContext &\r\n RouteComponentProps<{ id: string; calcId: string | undefined; formId: string | undefined }>;\r\n\r\nclass DetailsValuation extends React.PureComponent<\r\n ICCaseDetailsValuationProps,\r\n ICaseDetailsValuationState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private caseService!: ICaseService;\r\n\r\n static contextType = ApplicationContext;\r\n state = {\r\n isLoading: true,\r\n vehicles: [],\r\n viewOptions: false,\r\n selectedVehicle: null,\r\n options: null,\r\n optionCodes: [],\r\n optionsValue: 0,\r\n selectedOptionIndexes: [],\r\n excludedOptionsIndexes: [],\r\n includedOptionsIndexes: [],\r\n requiredOptionsIndexes: [],\r\n showOtionalRequiredOptions: false,\r\n optinalRequiredOptionsIndexes: [],\r\n isloadingIncludeExcludeOptions: false,\r\n tireWear: 0,\r\n bodyDamage: 0,\r\n hasGpl: false,\r\n valuationLoading: false,\r\n showWizard: false,\r\n hideVehicleSelection: true,\r\n kmNo: 0,\r\n color: null,\r\n showCarTable: false,\r\n hideValuationWizzard: false\r\n } as ICaseDetailsValuationState;\r\n\r\n public async componentDidMount() {\r\n await this.loadData();\r\n }\r\n\r\n onWizardCallback = async (\r\n make: string,\r\n model: string,\r\n body: string,\r\n firstRegistrationDate: Date,\r\n generation: number\r\n ) => {\r\n try {\r\n this.setState({ isLoading: true });\r\n const result = await this.caseService.GetValuationVehiclesWithoutVin(\r\n make,\r\n model,\r\n body,\r\n R.isNil(firstRegistrationDate) ? new Date() : firstRegistrationDate,\r\n generation\r\n );\r\n\r\n if (result && !R.isEmpty(result.vehicles)) {\r\n this.setState({\r\n isLoading: false,\r\n showWizard: false,\r\n vehicles: result.vehicles,\r\n optionCodes: result.extraOptionCodes\r\n });\r\n } else {\r\n this.setState({\r\n isLoading: false,\r\n showWizard: false,\r\n vehicles: result.vehicles,\r\n optionCodes: result.extraOptionCodes\r\n });\r\n }\r\n return result.vehicles;\r\n } catch (error) {\r\n this.setState({ isLoading: false, vehicles: [] });\r\n return [];\r\n }\r\n };\r\n\r\n onShowCarList = (show: boolean) => {\r\n this.setState({ showCarTable: show });\r\n };\r\n\r\n onChangeFirstRegistrationDate = (date: Date | null) => {\r\n if (this.props.onChangeFirstRegistrationDate) {\r\n this.props.onChangeFirstRegistrationDate(date);\r\n }\r\n };\r\n\r\n onFilterChanged = (vehicles: ValuationVehicle[]) => {\r\n this.setState({ vehicles: vehicles });\r\n };\r\n\r\n loadData = async () => {\r\n const firstRegistrationDate = this.props.firstRegistrationDate;\r\n const vin = this.props.vin;\r\n const carOptionalSelectedOptions =\r\n this.props.vehicleState.vehicle?.vehicleOptions.filter(\r\n (o) => !o.isStandard && o.isSelected\r\n ) ?? [];\r\n const carSelectedOptionalCodes = carOptionalSelectedOptions.map((x) => x.code);\r\n const valuationVehicleId = !R.isNil(this.props.vehicleState.vehicle)\r\n ? this.props.vehicleState.vehicle!.valuationVehicleId\r\n : null;\r\n if (!R.isNil(valuationVehicleId)) {\r\n const valuationVehicle = await this.caseService.GetValuationVehicle(valuationVehicleId);\r\n this.setState(\r\n {\r\n vehicles: [valuationVehicle],\r\n selectedVehicle: valuationVehicle,\r\n optionCodes: carSelectedOptionalCodes,\r\n viewOptions: true,\r\n showWizard: false,\r\n hideVehicleSelection: true\r\n },\r\n this.loadOptions\r\n );\r\n } else {\r\n let result = {\r\n vehicles: this.props.valuationVehicles,\r\n extraOptionCodes: this.props.optionCodes ?? []\r\n } as ValuationVehicles;\r\n\r\n if (R.isNil(this.props.valuationVehicles) && !R.isNil(vin)) {\r\n const body = {\r\n registration_date: R.isNil(firstRegistrationDate) ? new Date() : firstRegistrationDate,\r\n ignore_date: false,\r\n override_existing_match: false\r\n };\r\n\r\n result = await this.caseService.GetValuationVehiclesInfo(vin, null, body);\r\n }\r\n\r\n const vehicleState = this.props.vehicleState;\r\n if (!isNullOrUndefined(vehicleState)) {\r\n const valuationVehicles = result.vehicles.filter((v) => {\r\n return v.version === vehicleState.vehicle?.version;\r\n });\r\n if (valuationVehicles.length !== 0) {\r\n result.vehicles = valuationVehicles;\r\n } else {\r\n // vehicle is not found on GTValuation by VIN so we have to get a list of results by make/model/body and version\r\n const resultCustomValuationVehicles =\r\n await this.caseService.GetValuationVehiclesWithoutVin(\r\n vehicleState.vehicle?.make?.name || undefined,\r\n vehicleState.vehicle?.model?.name || undefined,\r\n vehicleState.vehicle?.bodyType?.name || undefined,\r\n !vehicleState.vehicle?.firstRegistrationDate\r\n ? new Date()\r\n : new Date(vehicleState.vehicle.firstRegistrationDate),\r\n vehicleState.vehicle?.generation || undefined\r\n );\r\n const perfectMatchFoundByVersionList = resultCustomValuationVehicles.vehicles.filter(\r\n (v) => {\r\n return v.version === vehicleState.vehicle?.version;\r\n }\r\n );\r\n if (perfectMatchFoundByVersionList.length === 1) {\r\n result.vehicles = perfectMatchFoundByVersionList;\r\n }\r\n }\r\n }\r\n\r\n if (result && R.isEmpty(result.vehicles)) {\r\n this.setState({\r\n isLoading: false,\r\n showWizard: true,\r\n hideVehicleSelection: false,\r\n hideValuationWizzard: false\r\n });\r\n\r\n return;\r\n }\r\n\r\n if (result) {\r\n if (result.vehicles.length === 1) {\r\n this.setState(\r\n {\r\n vehicles: result.vehicles,\r\n selectedVehicle: result.vehicles[0],\r\n optionCodes: result.extraOptionCodes,\r\n viewOptions: true,\r\n showWizard: false,\r\n hideVehicleSelection: true,\r\n hideValuationWizzard: true\r\n },\r\n this.loadOptions\r\n );\r\n } else {\r\n this.setState({\r\n vehicles: result.vehicles,\r\n isLoading: false,\r\n hideVehicleSelection: false,\r\n optionCodes: result.extraOptionCodes,\r\n hideValuationWizzard: true\r\n });\r\n this.onShowCarList(true);\r\n }\r\n }\r\n }\r\n };\r\n\r\n checkIfImageExists = (url: string | undefined) => {\r\n if (url === undefined || url.includes('undefined') || url.includes('null')) {\r\n return ImageNotAvailable;\r\n }\r\n\r\n return url;\r\n };\r\n\r\n getVehicleColumns = () => {\r\n const columns = [\r\n {\r\n name: 'vehicleId',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'manufacturer',\r\n label: this.translatorService.Tranlate('CASE_VALUATION_BRAND_LABEL', 'Marca'),\r\n options: { filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'model',\r\n label: this.translatorService.Tranlate('CASE_VALUATION_MODEL_LABEL', 'Model'),\r\n options: { filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'version',\r\n label: this.translatorService.Tranlate('CASE_VALUATION_VERSION_LABEL', 'Versiune'),\r\n options: { filter: true } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'trimLevel',\r\n label: this.translatorService.Tranlate('CASE_VALUATION_TRIMLEVEL_LABEL', 'Nivel echipare'),\r\n options: { filter: true } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'modelYear',\r\n label: this.translatorService.Tranlate('MODEL_YEAR', 'An model'),\r\n options: {\r\n filter: true\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'fuelType',\r\n label: this.translatorService.Tranlate('CASE_VALUATION_FUEL_TYPE_LABEL', 'Combustibil'),\r\n options: { filter: true } as MUIDataTableColumnOptions\r\n },\r\n //{\r\n // name: 'transmission',\r\n // label: this.translatorService.Tranlate(\r\n // 'CASE_VALUATION_GEARBOX_TYPE_LABEL',\r\n // 'Cutie de viteze'\r\n // ),\r\n // options: { filter: false } as MUIDataTableColumnOptions\r\n //},\r\n {\r\n name: 'powerHP',\r\n label: this.translatorService.Tranlate('CASE_VALUATION_KW_HP_TYPE_LABEL', 'Putere KW/HP'),\r\n options: {\r\n display: 'false',\r\n filter: false\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'kw',\r\n label: this.translatorService.Tranlate('CASE_VALUATION_KW_HP_TYPE_LABEL', 'Putere KW/HP'),\r\n options: {\r\n filter: true,\r\n customBodyRender: (value, tableMeta) => {\r\n return
{value + '/' + tableMeta.rowData[7]}
;\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'transmission',\r\n label: this.translatorService.Tranlate(\r\n 'CASE_VALUATION_FUEL_TRANSMISSION_LABEL',\r\n 'Transmisie'\r\n ),\r\n options: { filter: true } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'drivenWheels',\r\n label: this.translatorService.Tranlate('CASE_VALUATION_DRIVEN_WHEELS_LABEL', 'Tractiune'),\r\n options: { filter: true } as MUIDataTableColumnOptions\r\n },\r\n\r\n {\r\n name: 'cc',\r\n label: this.translatorService.Tranlate(\r\n 'CASE_VALUATION_CC_TYPE_LABEL',\r\n 'Capacitate cilindrica'\r\n ),\r\n options: { filter: true } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'convertedStartSellingDate',\r\n label: this.translatorService.Tranlate(\r\n 'CASE_VALUATION_DATE_OF_FABRICATION_LABELssss',\r\n 'data start comerc'\r\n ),\r\n options: { filter: false, display: 'excluded' } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'convertedEndSellingDate',\r\n label: this.translatorService.Tranlate(\r\n 'CASE_VALUATION_CAR_SALES_INTERVAL_LABEL',\r\n 'Interval comercializare'\r\n ),\r\n options: {\r\n filter: false,\r\n customBodyRender: (value, tableMeta) => {\r\n const startSellingDate = tableMeta.rowData[12];\r\n const endSellingDate =\r\n value == '9999-12-31'\r\n ? this.translatorService.Tranlate('VALUATION_ON_GOING_LABEL', 'prezent')\r\n : value;\r\n return (\r\n
\r\n {startSellingDate} -\r\n
\r\n {endSellingDate}\r\n
\r\n );\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'basePrice',\r\n label: this.translatorService.Tranlate(\r\n 'VALUATION_BASE_PRICE_LABEL',\r\n 'Pret de Baza (incl. TVA)'\r\n ),\r\n options: { filter: false } as MUIDataTableColumnOptions\r\n }\r\n ];\r\n\r\n return columns;\r\n };\r\n\r\n geOptionsColumns = () => {\r\n const columns = [\r\n {\r\n name: 'optionCode',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'description',\r\n label: ' ',\r\n options: {\r\n filter: false,\r\n sort: false,\r\n customBodyRender: (value, tableMeta, updateValue) => {\r\n const rowData = tableMeta.rowData;\r\n const rowIndex = tableMeta.rowIndex;\r\n const optionCode = rowData[0];\r\n const description = rowData[1];\r\n const price = rowData[2];\r\n const isExcluded = this.state.excludedOptionsIndexes.includes(rowIndex);\r\n const isIncluded = this.state.includedOptionsIndexes.includes(rowIndex);\r\n const isRequired = this.state.requiredOptionsIndexes.includes(rowIndex);\r\n const style = {\r\n color: '#fff',\r\n borderRadius: '0.15rem',\r\n padding: '2px 5px',\r\n marginLeft: '7px',\r\n fontSize: '12px',\r\n fontWeight: 'bold'\r\n };\r\n const excludedStyle = {\r\n backgroundColor: '#6c757d'\r\n };\r\n const includedStyle = {\r\n backgroundColor: '#28a745'\r\n };\r\n const mandatoryStyle = {\r\n backgroundColor: '#007bff'\r\n };\r\n\r\n return (\r\n \r\n {`[${optionCode}] ${description} - ${price} €`}\r\n {isExcluded && Indisponibila}\r\n {isIncluded && (\r\n Inclusa in alt pachet\r\n )}\r\n {isRequired && (\r\n Obligatorie din alt pachet\r\n )}\r\n
\r\n );\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'price',\r\n options: { display: 'excluded', filter: false, sort: false } as MUIDataTableColumnOptions\r\n }\r\n ];\r\n\r\n return columns;\r\n };\r\n\r\n getStandardOptionsColumns = () => {\r\n const columns = [\r\n {\r\n name: 'content',\r\n label: ' ',\r\n options: {\r\n filter: false,\r\n sort: false\r\n } as MUIDataTableColumnOptions\r\n }\r\n ];\r\n\r\n return columns;\r\n };\r\n\r\n loadOptions = async () => {\r\n if (this.state.selectedVehicle === null) {\r\n return;\r\n }\r\n const options = await this.caseService.GetValuationVehicleOptions(\r\n this.state.selectedVehicle!.vehicleId\r\n );\r\n\r\n const selectedOptionIndexes = this.getSelectedRows(options.extraOptions);\r\n\r\n const valLanguageId = Utils.GetValuationLanguageId(this.props.appState.language);\r\n\r\n options.standardOptions = options.standardOptions.filter(\r\n (option) =>\r\n option.languageId === valLanguageId && !standardOptionsSchemaIds.includes(option.schemaId)\r\n );\r\n\r\n this.setState({\r\n isLoading: false,\r\n options: options,\r\n selectedOptionIndexes: selectedOptionIndexes,\r\n optionsValue: this.getExtraOptionsPrice(options, selectedOptionIndexes)\r\n });\r\n };\r\n\r\n getSelectedRows = (extraoptions: ValuationExtraOption[]) => {\r\n const indexArray: number[] = [];\r\n this.state.optionCodes.forEach((item) => {\r\n const index = extraoptions.findIndex((o) => o.optionCode === item);\r\n if (index !== undefined && index !== -1) {\r\n indexArray.push(index);\r\n }\r\n });\r\n\r\n return indexArray;\r\n };\r\n\r\n getVehicleOptions = () => {\r\n return {\r\n viewColumns: false,\r\n filter: true,\r\n search: false,\r\n pagination: false,\r\n selectableRows: 'single' as SelectableRows,\r\n selectableRowsHeader: false,\r\n disableToolbarSelect: true,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n elevation: 1,\r\n onRowClick: (rowData: any, rowMeta: any) => {\r\n if (this.props.vin !== null && !R.isNil(this.props.onSelectedVehicle)) {\r\n this.props.onSelectedVehicle(\r\n this.state.vehicles[rowMeta.dataIndex],\r\n this.state.optionCodes\r\n );\r\n // return;\r\n }\r\n\r\n this.setState(\r\n {\r\n hideVehicleSelection: true,\r\n viewOptions: true,\r\n isLoading: true,\r\n selectedVehicle: this.state.vehicles[rowMeta.dataIndex]\r\n },\r\n this.loadOptions\r\n );\r\n },\r\n onRowsSelect: (rowSelected: any) => {\r\n if (this.props.vin !== null && !R.isNil(this.props.onSelectedVehicle)) {\r\n this.props.onSelectedVehicle(\r\n this.state.vehicles[rowSelected[0].dataIndex],\r\n this.state.optionCodes\r\n );\r\n // return;\r\n }\r\n\r\n this.setState(\r\n {\r\n hideVehicleSelection: true,\r\n viewOptions: true,\r\n isLoading: true,\r\n selectedVehicle: this.state.vehicles[rowSelected[0].dataIndex]\r\n },\r\n this.loadOptions\r\n );\r\n },\r\n customToolbar: () => {\r\n return (\r\n \r\n {this.translatorService.Tranlate('FILTER_TABLE', 'Filtreaza')}\r\n \r\n );\r\n }\r\n };\r\n };\r\n\r\n getExtraOptionsPrice = (options: ValuationVehicleOptions | null, selectedIndexes: number[]) => {\r\n if (options === null) {\r\n return 0;\r\n }\r\n if (options.extraOptions === null) {\r\n return 0;\r\n }\r\n\r\n const vatValue = 0;\r\n let sum = 0;\r\n selectedIndexes.forEach((item) => {\r\n sum += options.extraOptions[item].price;\r\n });\r\n\r\n return Utils.getPriceWithVat(sum, vatValue);\r\n };\r\n\r\n getOptionsOptions = () => {\r\n return {\r\n viewColumns: false,\r\n filter: false,\r\n search: false,\r\n pagination: false,\r\n selectableRows: 'multiple' as SelectableRows,\r\n rowsSelected: this.state.selectedOptionIndexes,\r\n selectableRowsHeader: false,\r\n disableToolbarSelect: true,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n elevation: 1,\r\n\r\n onRowsSelect: async (rowSelected: any, rowsSelected: any[]) => {\r\n const selected = rowsSelected.map((item) => item.index).filter((item) => item !== -1);\r\n const lastSelectedIndex = rowSelected[0].dataIndex;\r\n const lastSelectedOptionIndex =\r\n this.state.options!.extraOptions[lastSelectedIndex].optionId;\r\n const { includedOptionIds, excludedOptionIds, requiredOptionIds } =\r\n await this.fetchIncludeAndExcludeOptions(\r\n lastSelectedOptionIndex,\r\n this.state.selectedVehicle!.vehicleId\r\n );\r\n let finalSelectedIndexes = [...selected];\r\n let finalIncludedIndexes = Array.from(new Set([...this.state.includedOptionsIndexes]));\r\n let finalExcludedIndexes = Array.from(new Set([...this.state.excludedOptionsIndexes]));\r\n let finalRequiredIndexes = Array.from(new Set([...this.state.requiredOptionsIndexes]));\r\n\r\n // if the selected option is selected\r\n if (selected.includes(lastSelectedIndex)) {\r\n if (includedOptionIds) {\r\n const includedIndexes = this.findIndexes(\r\n this.state.options!.extraOptions,\r\n includedOptionIds\r\n );\r\n\r\n finalIncludedIndexes = Array.from(\r\n new Set([...finalIncludedIndexes, ...includedIndexes])\r\n );\r\n\r\n finalSelectedIndexes = this.removeIndexes(finalSelectedIndexes, includedIndexes);\r\n }\r\n\r\n if (requiredOptionIds) {\r\n // if there are mandatory options\r\n if (requiredOptionIds.mandatory.length > 0) {\r\n const mandatoryIndexes = this.findIndexes(\r\n this.state.options!.extraOptions,\r\n requiredOptionIds.mandatory\r\n );\r\n\r\n finalRequiredIndexes = Array.from(\r\n new Set([...finalRequiredIndexes, ...mandatoryIndexes])\r\n );\r\n finalSelectedIndexes = Array.from(\r\n new Set([...finalSelectedIndexes, ...mandatoryIndexes])\r\n );\r\n }\r\n\r\n // if user has to select at least one option from the mandatory ones\r\n if (requiredOptionIds.atLeastOne.length > 0) {\r\n this.setState({\r\n showOtionalRequiredOptions: true,\r\n optinalRequiredOptionsIndexes: requiredOptionIds.atLeastOne\r\n });\r\n }\r\n }\r\n\r\n if (excludedOptionIds) {\r\n const excludedIndexes = this.findIndexes(\r\n this.state.options!.extraOptions,\r\n excludedOptionIds\r\n );\r\n\r\n finalExcludedIndexes = Array.from(\r\n new Set([...finalExcludedIndexes, ...excludedIndexes])\r\n );\r\n\r\n finalSelectedIndexes = this.removeIndexes(finalSelectedIndexes, excludedIndexes);\r\n }\r\n }\r\n // if the selected option is deselected\r\n else {\r\n if (includedOptionIds) {\r\n const includedIndexes = this.findIndexes(\r\n this.state.options!.extraOptions,\r\n includedOptionIds\r\n );\r\n\r\n finalIncludedIndexes = this.removeIndexes(finalIncludedIndexes, includedIndexes);\r\n finalSelectedIndexes = this.removeIndexes(finalSelectedIndexes, includedIndexes);\r\n }\r\n\r\n if (requiredOptionIds) {\r\n if (requiredOptionIds.mandatory.length > 0) {\r\n const mandatoryIndexes = this.findIndexes(\r\n this.state.options!.extraOptions,\r\n requiredOptionIds.mandatory\r\n );\r\n\r\n finalRequiredIndexes = this.removeIndexes(finalRequiredIndexes, mandatoryIndexes);\r\n finalSelectedIndexes = this.removeIndexes(finalSelectedIndexes, mandatoryIndexes);\r\n finalExcludedIndexes = this.removeIndexes(finalExcludedIndexes, mandatoryIndexes);\r\n }\r\n\r\n if (requiredOptionIds.atLeastOne.length > 0) {\r\n const atLeastOneIndexes = this.findIndexes(\r\n this.state.options!.extraOptions,\r\n requiredOptionIds.atLeastOne\r\n );\r\n\r\n finalRequiredIndexes = this.removeIndexes(finalRequiredIndexes, atLeastOneIndexes);\r\n finalSelectedIndexes = this.removeIndexes(finalSelectedIndexes, atLeastOneIndexes);\r\n finalExcludedIndexes = this.removeIndexes(finalExcludedIndexes, atLeastOneIndexes);\r\n }\r\n }\r\n\r\n if (excludedOptionIds) {\r\n const excludedIndexes = this.findIndexes(\r\n this.state.options!.extraOptions,\r\n excludedOptionIds\r\n );\r\n\r\n finalExcludedIndexes = this.removeIndexes(finalExcludedIndexes, excludedIndexes);\r\n finalSelectedIndexes = this.removeIndexes(finalSelectedIndexes, excludedIndexes);\r\n }\r\n }\r\n\r\n finalSelectedIndexes = this.removeIndexes(finalSelectedIndexes, finalExcludedIndexes);\r\n finalSelectedIndexes = Array.from(\r\n new Set([...finalSelectedIndexes, ...finalRequiredIndexes])\r\n );\r\n finalExcludedIndexes = this.removeIndexes(finalExcludedIndexes, finalRequiredIndexes);\r\n finalIncludedIndexes = this.removeIndexes(finalIncludedIndexes, finalRequiredIndexes);\r\n\r\n this.setState({\r\n selectedOptionIndexes: finalSelectedIndexes,\r\n optionsValue: this.getExtraOptionsPrice(this.state.options, finalSelectedIndexes),\r\n excludedOptionsIndexes: finalExcludedIndexes,\r\n includedOptionsIndexes: finalIncludedIndexes,\r\n requiredOptionsIndexes: finalRequiredIndexes\r\n });\r\n },\r\n isRowSelectable: (dataIndex: any) =>\r\n !this.state.excludedOptionsIndexes.includes(dataIndex) &&\r\n !this.state.includedOptionsIndexes.includes(dataIndex) &&\r\n !this.state.requiredOptionsIndexes.includes(dataIndex)\r\n };\r\n };\r\n\r\n fetchIncludeOptions = async (optionId: number, vehicleId: number): Promise => {\r\n let includeOptionsRequest = null;\r\n\r\n try {\r\n includeOptionsRequest = await this.caseService.GetIncludeOptions(optionId, vehicleId);\r\n } catch (error) {}\r\n\r\n if (includeOptionsRequest) {\r\n const extractedIndexes = this.extractIndexes(includeOptionsRequest.rule);\r\n return extractedIndexes;\r\n }\r\n\r\n return includeOptionsRequest;\r\n };\r\n\r\n fetchExcludeOptions = async (optionId: number, vehicleId: number): Promise => {\r\n let excludeOptionsRequest = null;\r\n\r\n try {\r\n excludeOptionsRequest = await this.caseService.GetExcludeOptions(optionId, vehicleId);\r\n } catch (error) {}\r\n\r\n if (excludeOptionsRequest) {\r\n const extractedIndexes = this.extractIndexes(excludeOptionsRequest.rule);\r\n return extractedIndexes;\r\n }\r\n\r\n return excludeOptionsRequest;\r\n };\r\n\r\n fetchRequiredOptions = async (\r\n optionId: number,\r\n vehicleId: number\r\n ): Promise => {\r\n let requiredOptionsRequest = null;\r\n\r\n try {\r\n requiredOptionsRequest = await this.caseService.GetRequiredOptions(optionId, vehicleId);\r\n } catch (error) {}\r\n\r\n if (requiredOptionsRequest) {\r\n const parsedConditions = this.parseRequiredConditions(requiredOptionsRequest.rule);\r\n return parsedConditions;\r\n }\r\n\r\n return requiredOptionsRequest;\r\n };\r\n\r\n fetchIncludeAndExcludeOptions = async (optionId: number, vehicleId: number) => {\r\n let includedOptionIds = null;\r\n let excludedOptionIds = null;\r\n let requiredOptionIds = null;\r\n\r\n try {\r\n this.setState({ isloadingIncludeExcludeOptions: true });\r\n\r\n includedOptionIds = await this.fetchIncludeOptions(optionId, vehicleId);\r\n excludedOptionIds = await this.fetchExcludeOptions(optionId, vehicleId);\r\n requiredOptionIds = await this.fetchRequiredOptions(optionId, vehicleId);\r\n } catch (error) {\r\n this.setState({ isloadingIncludeExcludeOptions: false });\r\n }\r\n\r\n this.setState({ isloadingIncludeExcludeOptions: false });\r\n return {\r\n includedOptionIds,\r\n excludedOptionIds,\r\n requiredOptionIds\r\n };\r\n };\r\n\r\n findIndexes = (extraOptions: ValuationExtraOption[] | null, codes: number[]): number[] => {\r\n if (extraOptions === null) return [];\r\n const indexes: number[] = [];\r\n\r\n extraOptions.forEach((object, index) => {\r\n if (codes.includes(object.optionId)) {\r\n indexes.push(index);\r\n }\r\n });\r\n\r\n return indexes;\r\n };\r\n\r\n removeIndexes(excludedOptionsIndexes: number[], excludedIndexes: number[]): number[] {\r\n return excludedOptionsIndexes.filter((item) => !excludedIndexes.includes(item));\r\n }\r\n\r\n extractIndexes = (input: string): number[] => {\r\n // Use regular expression to match all numbers within braces\r\n const matches = input.match(/\\{(\\d+)\\}/g);\r\n\r\n // If no matches found, return an empty array\r\n if (!matches) {\r\n return [];\r\n }\r\n\r\n // Extract the numbers and convert them to integers\r\n const indexes = matches.map((match) => parseInt(match.replace(/[{}]/g, ''), 10));\r\n\r\n return indexes;\r\n };\r\n\r\n parseRequiredConditions(input: string): ParsedConditions {\r\n const mandatory: number[] = [];\r\n const atLeastOne: number[] = [];\r\n\r\n // Regex for extracting all conditions (e.g., {1234})\r\n const allConditionsRegex = /{(\\d+)}/g;\r\n let match;\r\n\r\n // Collect all numbers within curly braces\r\n const allConditions: number[] = [];\r\n while ((match = allConditionsRegex.exec(input)) !== null) {\r\n allConditions.push(parseInt(match[1], 10));\r\n }\r\n\r\n // Check if the input contains 'AND' or 'OR'\r\n if (input.includes('AND')) {\r\n // Regex for extracting mandatory conditions before 'AND'\r\n const mandatoryPart = input.split(' AND ')[0];\r\n const mandatoryRegex = /{(\\d+)}/g;\r\n let mandatoryMatch;\r\n while ((mandatoryMatch = mandatoryRegex.exec(mandatoryPart)) !== null) {\r\n mandatory.push(parseInt(mandatoryMatch[1], 10));\r\n }\r\n\r\n // Regex for extracting optional conditions within parentheses\r\n const optionalPartMatch = input.match(/\\(([^)]+)\\)/);\r\n if (optionalPartMatch) {\r\n const optionalRegex = /{(\\d+)}/g;\r\n let optionalMatch;\r\n while ((optionalMatch = optionalRegex.exec(optionalPartMatch[1])) !== null) {\r\n atLeastOne.push(parseInt(optionalMatch[1], 10));\r\n }\r\n }\r\n } else if (input.includes('OR')) {\r\n // If there are no 'AND' conditions, treat all as optional\r\n for (const num of allConditions) {\r\n atLeastOne.push(num);\r\n }\r\n } else {\r\n // If no logical operator is present, all conditions are mandatory\r\n mandatory.push(...allConditions);\r\n }\r\n\r\n return {\r\n mandatory,\r\n atLeastOne\r\n };\r\n }\r\n\r\n NumberFormatCustom = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n thousandSeparator={false}\r\n decimalScale={2}\r\n isNumericString\r\n />\r\n );\r\n };\r\n handleBodyDamageTextChange = (event: React.ChangeEvent) => {\r\n this.setState({\r\n bodyDamage: event.target.value === null ? 0 : parseFloat(event.target.value)\r\n });\r\n };\r\n\r\n handleTireWearTextChange = (event: React.ChangeEvent) => {\r\n this.setState({\r\n tireWear: event.target.value === null ? 0 : parseFloat(event.target.value)\r\n });\r\n };\r\n\r\n handleKmNoTextChange = (event: React.ChangeEvent) => {\r\n this.setState({\r\n kmNo:\r\n event.target.value === null || isNaN(Number(event.target.value))\r\n ? 0\r\n : parseFloat(event.target.value)\r\n });\r\n };\r\n\r\n handleGplChange = (checked: boolean) => {\r\n this.setState({\r\n hasGpl: checked\r\n });\r\n };\r\n\r\n handleColorChange = (\r\n event: React.ChangeEvent>,\r\n value: IReferential | null\r\n ) => {\r\n if (value) {\r\n this.setState({\r\n color: value?.code\r\n });\r\n } else {\r\n this.setState({\r\n color: ''\r\n });\r\n }\r\n };\r\n\r\n checkIfIsValidDate = (date: Date | null) => {\r\n const registrationTimestamp = date!.getTime();\r\n\r\n if (isNaN(registrationTimestamp)) {\r\n const newDate = new Date();\r\n return moment(newDate).format('YYYY-MM-DD');\r\n }\r\n\r\n return date;\r\n };\r\n\r\n performValuation = async () => {\r\n try {\r\n const options: ValuationExtraOption[] = [];\r\n\r\n this.state.selectedOptionIndexes.forEach((index) =>\r\n options.push(this.state.options!.extraOptions[index])\r\n );\r\n const valuationRequest = {\r\n attritionValue: this.state.tireWear,\r\n bodyDamageValue: this.state.bodyDamage,\r\n extraOptionsPrice: this.state.optionsValue,\r\n gpl: this.state.hasGpl,\r\n numberOfKilometers: this.state.kmNo,\r\n priceAsNew: this.state.selectedVehicle!.basePrice,\r\n vehicleId: this.state.selectedVehicle!.vehicleId,\r\n options: options,\r\n registrationDate: moment(this.props.firstRegistrationDate).isValid()\r\n ? moment(this.props.firstRegistrationDate).startOf('month').format('YYYY-MM-DD')\r\n : null,\r\n fabricationDate: this.state.selectedVehicle?.fabricationDate\r\n ? this.state.selectedVehicle?.fabricationDate\r\n : null,\r\n imageUrl: this.state.selectedVehicle?.imageUrl ? this.state.selectedVehicle?.imageUrl : '',\r\n vin: this.props.vin,\r\n version: this.state.selectedVehicle!.version,\r\n color: this.state.color,\r\n equipmentVersion: this.state.selectedVehicle!.trimLevel,\r\n make: this.state.selectedVehicle!.manufacturer,\r\n model: this.state.selectedVehicle!.model,\r\n fuelType: this.state.selectedVehicle!.fuelType,\r\n bodyType: this.state.selectedVehicle!.body,\r\n horsePower: this.state.selectedVehicle!.powerHP,\r\n nrOfDoors: this.state.selectedVehicle!.noOfDoors,\r\n transmissionType: this.state.selectedVehicle!.transmission\r\n } as ValuationRequest;\r\n\r\n this.setState({ valuationLoading: true });\r\n\r\n const result = await this.caseService.PerformValuation(valuationRequest, null);\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n\r\n this.setState({ valuationLoading: false });\r\n document.getElementById('valuation-dialog-close-button')?.click();\r\n\r\n if (result) this.props.history.push(`/valuation/file/${result.id}`);\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n this.setState({ valuationLoading: false });\r\n }\r\n };\r\n\r\n renderOptions = () => {\r\n const basePrice = this.state.selectedVehicle?.basePrice || 0;\r\n const optionsPrice = this.state.optionsValue;\r\n const totalPrice = basePrice + optionsPrice;\r\n\r\n const basePriceLabel = this.translatorService.Tranlate(\r\n 'VALUATION_BASE_PRICE_LABEL',\r\n 'Pret de Baza (incl. TVA)'\r\n );\r\n const optionsPriceLabel = this.translatorService.Tranlate(\r\n 'VALUATION_OPTIONS_PRICE_LABEL',\r\n 'Pret Optionale (incl. TVA)'\r\n );\r\n const totalPriceLabel = this.translatorService.Tranlate(\r\n 'VALUATION_TOTAL_LABEL',\r\n 'Total (incl. TVA)'\r\n );\r\n\r\n return (\r\n
\r\n

\r\n {`${this.state.selectedVehicle!.manufacturer} ${this.state.selectedVehicle!.model} ${\r\n this.state.selectedVehicle!.version\r\n }`}\r\n

\r\n

\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
{basePrice.toFixed(2)} €
\r\n
{optionsPrice.toFixed(2)} €
\r\n
{totalPrice.toFixed(2)} €
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n {this.state.selectedVehicle?.fabricationDate ? (\r\n \r\n ) : null}\r\n {moment(this.props.firstRegistrationDate).isValid() ? (\r\n \r\n ) : null}\r\n \r\n \r\n \r\n option.displayName || ''}\r\n onChange={this.handleColorChange}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n {\r\n this.handleGplChange(checked);\r\n }}\r\n color=\"primary\"\r\n id=\"hasGpl\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n }\r\n label={this.translatorService.Tranlate('VALUATION_GPL_LABEL', 'GPL')}\r\n />\r\n
\r\n {this.state.vehicles.length > 1 ? (\r\n {\r\n this.setState({\r\n isLoading: false,\r\n hideVehicleSelection: false,\r\n hideValuationWizzard: true,\r\n viewOptions: false,\r\n selectedVehicle: null,\r\n kmNo: 0,\r\n tireWear: 0,\r\n bodyDamage: 0,\r\n hasGpl: false,\r\n color: null,\r\n options: null,\r\n selectedOptionIndexes: [],\r\n includedOptionsIndexes: [],\r\n excludedOptionsIndexes: []\r\n });\r\n this.onShowCarList(true);\r\n }}\r\n >\r\n {this.translatorService.Tranlate(\r\n 'VALUATION_FILE_CHANGE_VEHICLE_LABEL',\r\n 'Schimba vehicul'\r\n )}\r\n \r\n ) : null}\r\n \r\n {this.translatorService.Tranlate('VALUATION_ACTION_START_LABEL', 'Evalueaza')}\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n

\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.state.showOtionalRequiredOptions && this.renderMandatoryOptionsDialog()}\r\n
\r\n \r\n \r\n {this.state.isloadingIncludeExcludeOptions ? : null}\r\n \r\n \r\n \r\n );\r\n };\r\n\r\n renderMandatoryOptionsDialog = () => {\r\n const data = this.state.options?.extraOptions.filter((option) => {\r\n return this.state.optinalRequiredOptionsIndexes.includes(option.optionId);\r\n });\r\n\r\n return (\r\n \r\n \r\n {'Pentru selectia anterioara este necesara adaugarea unei optiuni din lista'}\r\n \r\n \r\n {\r\n const rowData = tableMeta.rowData;\r\n\r\n return `[${rowData[0]}] ${value} - ${rowData[2]} €`;\r\n }\r\n }\r\n },\r\n {\r\n name: 'price',\r\n label: 'Pret',\r\n options: {\r\n display: 'excluded',\r\n filter: false,\r\n sort: false\r\n }\r\n }\r\n ]}\r\n options={{\r\n viewColumns: false,\r\n filter: false,\r\n search: false,\r\n pagination: false,\r\n selectableRows: 'single' as SelectableRows,\r\n selectableRowsHeader: false,\r\n disableToolbarSelect: true,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n elevation: 1,\r\n\r\n onRowsSelect: (rowSelected: any, allRows: any) => {\r\n const { dataIndex } = rowSelected[0];\r\n const rowData = this.state.options?.extraOptions.filter((option) => {\r\n return this.state.optinalRequiredOptionsIndexes.includes(option.optionId);\r\n })[dataIndex];\r\n const selectedOptionIndexInExtraOptions = this.findIndexes(\r\n this.state.options!.extraOptions,\r\n [rowData!.optionId]\r\n );\r\n const unselectedOptionsToBeRemoved =\r\n this.state.optinalRequiredOptionsIndexes.filter(\r\n (item) => item !== rowData!.optionId\r\n );\r\n const findOptionsToBeExcluded = this.findIndexes(\r\n this.state.options!.extraOptions,\r\n unselectedOptionsToBeRemoved\r\n );\r\n let finalSelectedIndexes = Array.from(\r\n new Set([\r\n ...this.state.selectedOptionIndexes,\r\n ...selectedOptionIndexInExtraOptions\r\n ])\r\n );\r\n const finalRequiredIndexes = Array.from(\r\n new Set([\r\n ...this.state.requiredOptionsIndexes,\r\n ...selectedOptionIndexInExtraOptions\r\n ])\r\n );\r\n let finalExcludedIndexes = Array.from(\r\n new Set([...this.state.excludedOptionsIndexes, ...findOptionsToBeExcluded])\r\n );\r\n let finalIncludedIndexes = Array.from(\r\n new Set([...this.state.includedOptionsIndexes])\r\n );\r\n\r\n finalSelectedIndexes = this.removeIndexes(\r\n finalSelectedIndexes,\r\n finalExcludedIndexes\r\n );\r\n finalSelectedIndexes = Array.from(\r\n new Set([...finalSelectedIndexes, ...finalRequiredIndexes])\r\n );\r\n finalExcludedIndexes = this.removeIndexes(\r\n finalExcludedIndexes,\r\n finalRequiredIndexes\r\n );\r\n finalIncludedIndexes = this.removeIndexes(\r\n finalIncludedIndexes,\r\n finalRequiredIndexes\r\n );\r\n\r\n this.setState({\r\n ...this.state,\r\n showOtionalRequiredOptions: false,\r\n selectedOptionIndexes: finalSelectedIndexes,\r\n requiredOptionsIndexes: finalRequiredIndexes,\r\n optionsValue: this.getExtraOptionsPrice(this.state.options, finalSelectedIndexes),\r\n excludedOptionsIndexes: finalExcludedIndexes,\r\n includedOptionsIndexes: finalIncludedIndexes,\r\n optinalRequiredOptionsIndexes: []\r\n });\r\n }\r\n }}\r\n />\r\n \r\n \r\n );\r\n };\r\n\r\n renderVehicleSelection = () => {\r\n return (\r\n
\r\n {!this.state.hideValuationWizzard && (\r\n \r\n )}\r\n\r\n {this.state.showCarTable && !this.state.isLoading ? (\r\n
\r\n \r\n
\r\n ) : null}\r\n
\r\n );\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n\r\n return (\r\n \r\n {this.state.hideVehicleSelection ? null : this.renderVehicleSelection()}\r\n
\r\n \r\n
\r\n {!this.state.isLoading &&\r\n this.state.viewOptions &&\r\n this.state.options &&\r\n !this.state.showWizard\r\n ? this.renderOptions()\r\n : null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst mergeProps = (\r\n stateProps: any,\r\n dispatchProps: any,\r\n ownProps: ExternalCaseDetailsValuationProps\r\n) => ({\r\n ...ownProps,\r\n ...stateProps,\r\n ...dispatchProps\r\n});\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app,\r\n vehicleState: state.vehicle\r\n }),\r\n CaseSettingsActionCreators,\r\n mergeProps\r\n)(withSnackbar(DetailsValuation as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { withRouter } from 'react-router';\r\nimport { ApplicationState, CaseSettingsActionCreators, VehicleActionCreators } from '../../store';\r\nimport { withSnackbar } from 'notistack';\r\nimport {\r\n Button,\r\n IconButton,\r\n Grid,\r\n Dialog,\r\n DialogTitle,\r\n Typography,\r\n DialogContent,\r\n Tooltip,\r\n InputAdornment,\r\n Modal,\r\n DialogActions,\r\n DialogContentText,\r\n FormControlLabel,\r\n Switch\r\n} from '@material-ui/core';\r\nimport { AppContext, ApplicationContext } from '../../context/Contexts';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport {\r\n ValuationVehicle,\r\n ValuationExtraOption,\r\n ValuationModel,\r\n ValuationBody,\r\n PlateNumber\r\n} from '../../interfaces/Case';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport { IReferentialService } from '../../services/Interfaces/IReferentialService';\r\nimport { RefConstants } from '../../helpers/Constants';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport { IReferential, IReferentialModel } from '../../interfaces/IReferential';\r\nimport { DatePicker, MuiPickersUtilsProvider } from '@material-ui/pickers';\r\nimport moment from 'moment';\r\nimport MomentUtils from '@date-io/moment';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport DetailsValuation from './DetailsValuation';\r\nimport { MaterialUiPickersDate } from '@material-ui/pickers/typings/date';\r\nimport { Column } from 'material-table';\r\nimport { Cost, Vehicle, VehicleOption } from '../../interfaces/Vehicle';\r\nimport { IVehicleService } from '../../services/Interfaces/IVehicleService';\r\nimport { Utils } from '../../helpers/Utils';\r\nimport * as R from 'ramda';\r\nimport { ICaseDetailsCaseTabCarDetailsExtendedContainerState } from '../cases/vehicleDetails/ICaseDetailsCaseTabCarDetailsExtendedContainerState';\r\nimport { ExternalCaseDetailsCaseTabCarDetailsExtendedContainerProps } from '../cases/vehicleDetails/ExternalCaseDetailsCaseTabCarDetailsExtendedContainerProps';\r\nimport { ICaseDetailsCaseTabCarDetailsExtendedContainerProps } from '../cases/vehicleDetails/ICaseDetailsCaseTabCarDetailsExtendedContainerProps';\r\nimport _ from 'lodash';\r\nimport manualVinIdentification from '../../assets/images/vin/hand-pen-01.svg';\r\n\r\nclass LocalizedUtils extends MomentUtils {\r\n // dateFormat = \"DD MM YYYY\";\r\n}\r\n\r\nexport const standardOptionsSchemaIds = [\r\n 301, 2501, 3501, 3601, 23501, 23601, 23701, 23801, 23901, 24001, 31001, 32601, 34801, 38001,\r\n 38701, 38801, 42101, 42901, 44501, 48401, 49001, 50001, 55601, 57901, 58201, 58301, 58401, 58501,\r\n 58601, 59201, 59301, 59801, 63601, 63901\r\n];\r\n\r\nclass DetailsValuationContainer extends React.PureComponent<\r\n ICaseDetailsCaseTabCarDetailsExtendedContainerProps,\r\n ICaseDetailsCaseTabCarDetailsExtendedContainerState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private caseService!: ICaseService;\r\n private vehicleService!: IVehicleService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n static displayName = 'CaseDetailsCaseTabCarDetailsExtendedForm';\r\n\r\n state = {\r\n isLoading: false,\r\n hasRights: false,\r\n executing: false,\r\n isUserHidden: false,\r\n isValuationOpen: false,\r\n selectedVehicle: null,\r\n valuationVehicles: [] as ValuationVehicle[],\r\n valuationBodies: [] as ValuationBody[],\r\n valuationModels: [] as ValuationModel[],\r\n showWizard: false,\r\n attachType: {} as IReferential,\r\n personTypes: [] as IReferential[],\r\n brandTypes: [] as IReferential[],\r\n modelTypes: [] as IReferentialModel[],\r\n bodyTypes: [] as IReferential[],\r\n versionTypes: [] as IReferential[],\r\n fuelTypes: [] as IReferential[],\r\n vehicleTypes: [] as IReferential[],\r\n refurbishedList: [] as IReferential[],\r\n mvoDvBattypList: [] as IReferential[],\r\n polutionNormTypes: [] as IReferential[],\r\n transmissionTypes: [] as IReferential[],\r\n tractionTypes: [] as IReferential[],\r\n paintTypes: [] as IReferential[],\r\n tiresTypes: [] as IReferential[],\r\n rimsTypes: [] as IReferential[],\r\n colorTypes: [] as IReferential[],\r\n carInteriorStateTypes: [] as IReferential[],\r\n carExteriorStateTypes: [] as IReferential[],\r\n carMechanicalStateTypes: [] as IReferential[],\r\n carStandardOptions: [] as VehicleOption[],\r\n carOptionalOptions: [] as VehicleOption[],\r\n workflowCalculation: null,\r\n datePickerFirstRegistrationError: '',\r\n showRequiredVinError: false,\r\n optionCodes: [] as string[],\r\n costValues: [] as Cost[],\r\n carDetailsExtendedData: {\r\n id: 0,\r\n caseId: this.props.caseSettingsState.case ? this.props.caseSettingsState.case!.id : 0,\r\n plateNumber: '',\r\n vin: '',\r\n makeId: null,\r\n model: null,\r\n modelId: null,\r\n version: '',\r\n makeDate: '',\r\n firstRegistrationDate: '',\r\n kilometersNr: null,\r\n power: null,\r\n horsePower: null,\r\n engineSize: null,\r\n co2: null,\r\n inConditionComments: null,\r\n outConditionComments: null,\r\n technicalConditionComments: null,\r\n fuelTypeId: null,\r\n vehicleTypeId: null,\r\n pollutionNormId: null,\r\n transmissionTypeId: null,\r\n tractionTypeId: null,\r\n color: null,\r\n colorId: null,\r\n equipmentVersion: '',\r\n wheelsTypeId: null,\r\n tiresTypeId: null,\r\n paintTypeId: null,\r\n bodyTypeId: null,\r\n inConditionId: null,\r\n outConditionId: null,\r\n technicalConditionId: null,\r\n make: null,\r\n fuelType: null,\r\n vehicleType: null,\r\n pollutionNorm: null,\r\n transmissionType: null,\r\n tractionType: null,\r\n wheelsType: null,\r\n tiresType: null,\r\n paintType: null,\r\n bodyType: null,\r\n inCondition: null,\r\n outCondition: null,\r\n technicalCondition: null,\r\n vehicleOptions: [] as VehicleOption[],\r\n location: '',\r\n nrOfDoors: null,\r\n radioCode: '',\r\n engineManufactureCode: '',\r\n purchasePrice: '',\r\n refurbished: null,\r\n refurbishedId: null\r\n } as Vehicle,\r\n carDetailsFetchedData: {} as Partial,\r\n isOpen: false,\r\n dialogVisible: false,\r\n ignoreTimeStampSwitch: false,\r\n ignoreExistingMappingSwitch: false,\r\n showSearchingLoader: false\r\n } as ICaseDetailsCaseTabCarDetailsExtendedContainerState;\r\n\r\n public componentDidMount() {\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n this.props.resetVehicleState();\r\n await this.loadData();\r\n }\r\n );\r\n }\r\n\r\n submitForm = async () => {\r\n console.log('');\r\n };\r\n\r\n submitVehicleData = async (e: any) => {\r\n let newVehicle = { ...this.state.carDetailsExtendedData } as Vehicle;\r\n newVehicle.vehicleOptions = [];\r\n\r\n this.state.carStandardOptions.forEach((standardOption) => {\r\n standardOption.isSelected = standardOption.checked;\r\n });\r\n this.state.carOptionalOptions.forEach((optionalOption) => {\r\n optionalOption.isSelected = optionalOption.checked;\r\n });\r\n\r\n newVehicle.vehicleOptions.push(...this.state.carStandardOptions);\r\n newVehicle.vehicleOptions.push(...this.state.carOptionalOptions);\r\n\r\n newVehicle = {\r\n ...newVehicle\r\n };\r\n\r\n try {\r\n if (newVehicle.valuationVehicleId && newVehicle.vin) {\r\n await this.caseService.ValuationSaveMapping(newVehicle.vin, newVehicle.valuationVehicleId);\r\n }\r\n } catch (ex) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n onChange =\r\n (fieldName: string, fieldNameId?: string) => (e: any, newValue?: IReferential | null) => {\r\n if (fieldName === 'plateNumber') {\r\n const newValue = e.target.value.toUpperCase().replace(/[^a-zA-Z0-9]/g, ''); // Remove special characters from plate number input\r\n const updatedState = {\r\n ...this.state.carDetailsExtendedData,\r\n [fieldName]: newValue\r\n };\r\n\r\n if (fieldNameId) {\r\n updatedState[fieldNameId] = Utils.GetIdOrNull(newValue);\r\n }\r\n\r\n this.setState({\r\n carDetailsExtendedData: updatedState\r\n });\r\n } else {\r\n !R.isNil(fieldNameId)\r\n ? this.setState({\r\n carDetailsExtendedData: {\r\n ...this.state.carDetailsExtendedData,\r\n [fieldName]: newValue || e.target.value,\r\n [fieldNameId]: Utils.GetIdOrNull(newValue)\r\n }\r\n })\r\n : this.setState({\r\n carDetailsExtendedData: {\r\n ...this.state.carDetailsExtendedData,\r\n [fieldName]: newValue || e.target.value\r\n }\r\n });\r\n }\r\n };\r\n\r\n validateFirstRegistrationDate = (selectedDate?: string): string => {\r\n let error = '';\r\n\r\n if (!selectedDate) {\r\n error = this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu');\r\n }\r\n\r\n this.setState({\r\n datePickerFirstRegistrationError: error,\r\n carDetailsExtendedData: {\r\n ...this.state.carDetailsExtendedData,\r\n firstRegistrationDate: selectedDate || ''\r\n }\r\n });\r\n\r\n return error;\r\n };\r\n\r\n handleFirstRegistrationDateChange = (\r\n date: MaterialUiPickersDate | null,\r\n value?: string | null\r\n ) => {\r\n if (date === null || !date.isValid) {\r\n return;\r\n }\r\n\r\n const selectedDate = date ? date.format('YYYY-MM') : undefined;\r\n this.validateFirstRegistrationDate(selectedDate);\r\n };\r\n\r\n setSelectedOptions = (extraoptions: ValuationExtraOption[], optionCodes: string[]) => {\r\n const indexArray: number[] = [];\r\n optionCodes.forEach((item) => {\r\n const index = extraoptions.findIndex((o) => o.optionCode === item);\r\n if (index !== undefined && index !== -1) {\r\n indexArray.push(index);\r\n\r\n (extraoptions[index] as any).tableData = { checked: true };\r\n extraoptions[index].checked = true;\r\n }\r\n });\r\n\r\n return indexArray;\r\n };\r\n\r\n getValuationInfoConfirmation = async () => {\r\n if (R.isEmpty(this.state.carDetailsExtendedData.vin)) {\r\n this.setState({\r\n showRequiredVinError: true\r\n });\r\n return;\r\n }\r\n\r\n if (\r\n !R.test(\r\n /^(?=.*[0-9])(?=.*[abcdefghjklmnprstuvwxyzABCDEFGHJKLMNPRSTUVWXYZ])[0-9abcdefghjklmnprstuvwxyzABCDEFGHJKLMNPRSTUVWXYZ-]{17}$/,\r\n this.state.carDetailsExtendedData.vin\r\n )\r\n ) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'INVALID_CAR_VIN_IDENTIFICATOR',\r\n \"Te rugăm să te asiguri că seria de șasiu introdusă are 17 caractere alfanumerice și nu conține spații sau literele 'O' sau 'I'!\"\r\n ),\r\n {\r\n variant: 'warning'\r\n }\r\n );\r\n return;\r\n }\r\n\r\n this.setState({ selectedVehicle: null, isOpen: true, dialogVisible: true }); //reset the vehicle brought from valuation\r\n };\r\n\r\n getValuationInfo = async () => {\r\n this.setState({ selectedVehicle: null, isOpen: false, dialogVisible: false });\r\n try {\r\n this.setState({ showSearchingLoader: true });\r\n\r\n const body = {\r\n registration_date:\r\n this.state.carDetailsExtendedData.firstRegistrationDate !== ''\r\n ? this.state.carDetailsExtendedData.firstRegistrationDate\r\n : null,\r\n ignore_date: this.state.ignoreTimeStampSwitch,\r\n override_existing_match: this.state.ignoreExistingMappingSwitch\r\n };\r\n\r\n const result = await this.caseService.GetValuationVehiclesInfo(\r\n this.state.carDetailsExtendedData.vin,\r\n null,\r\n body\r\n );\r\n\r\n if (result.vehicles.length === 1) {\r\n result.vehicles[0].vinQuery = true;\r\n this.selectedVehicleHandler(result.vehicles[0], result.extraOptionCodes);\r\n\r\n this.setState({\r\n ...this.state,\r\n valuationVehicles: result.vehicles,\r\n optionCodes: result.extraOptionCodes,\r\n isValuationOpen: true,\r\n showSearchingLoader: false\r\n });\r\n } else {\r\n if (result.vehicles.length == 0) {\r\n this.setState({\r\n // reset vin if no vehicle found\r\n carDetailsExtendedData: {\r\n ...this.state.carDetailsExtendedData,\r\n vin: ''\r\n }\r\n });\r\n\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'VIN_IDENTIFICATION_NOT_FOUND',\r\n 'Identificarea VIN nu este posibilă , vă rugăm să continuaţi cu selectia manuală a autovehiculului!'\r\n ),\r\n {\r\n variant: 'warning',\r\n autoHideDuration: 5000\r\n }\r\n );\r\n }\r\n\r\n for (let i = 0; i < result.vehicles.length; i++) {\r\n result.vehicles[i].vinQuery = true;\r\n }\r\n\r\n this.setState({\r\n ...this.state,\r\n valuationVehicles: result.vehicles,\r\n optionCodes: result.extraOptionCodes,\r\n isValuationOpen: true,\r\n showSearchingLoader: false\r\n });\r\n }\r\n } catch (err) {\r\n this.setState({ showSearchingLoader: false });\r\n\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'VEHICLE_NOT_IDENTIFIED',\r\n 'Masina nu se poate identifica dupa VIN si data primei inmatriculari. Va rugam incercati identificarea manuala'\r\n ),\r\n { variant: 'error' }\r\n );\r\n }\r\n };\r\n\r\n handleCloseConfirmationDialog = () => {\r\n this.setState({\r\n isOpen: false,\r\n dialogVisible: false\r\n });\r\n };\r\n\r\n handleCloseModal = () => {\r\n this.setState({\r\n isOpen: false,\r\n dialogVisible: false\r\n });\r\n };\r\n\r\n getManualValuationInfo = async () => {\r\n if (\r\n this.state.carDetailsExtendedData.vin &&\r\n !R.test(\r\n /^(?=.*[0-9])(?=.*[abcdefghjklmnprstuvwxyzABCDEFGHJKLMNPRSTUVWXYZ])[0-9abcdefghjklmnprstuvwxyzABCDEFGHJKLMNPRSTUVWXYZ-]{17}$/,\r\n this.state.carDetailsExtendedData.vin\r\n )\r\n ) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'INVALID_CAR_VIN_IDENTIFICATOR',\r\n \"Te rugăm să te asiguri că seria de șasiu introdusă are 17 caractere alfanumerice și nu conține spații sau literele 'O' sau 'I'!\"\r\n ),\r\n {\r\n variant: 'warning'\r\n }\r\n );\r\n return;\r\n }\r\n this.setState({ selectedVehicle: null }); //reset the vehicle brought from valuation\r\n\r\n try {\r\n this.setState({\r\n ...this.state,\r\n valuationVehicles: [],\r\n optionCodes: [],\r\n isValuationOpen: true,\r\n showRequiredVinError: false,\r\n // if manual identification clicke then reset VIN\r\n carDetailsExtendedData: {\r\n ...this.state.carDetailsExtendedData,\r\n vin: ''\r\n }\r\n });\r\n } catch (err) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'VEHICLE_NOT_IDENTIFIED',\r\n 'Masina nu se poate identifica dupa VIN si data primei inmatriculari. Va rugam incercati identificarea manuala'\r\n ),\r\n { variant: 'error' }\r\n );\r\n }\r\n };\r\n\r\n goToValuationHistory = () => {\r\n this.props.history.push('valuation/history');\r\n };\r\n\r\n private resetVehicleState() {\r\n this.setState({\r\n ...this.state,\r\n isValuationOpen: false,\r\n selectedVehicle: null,\r\n carStandardOptions: [],\r\n carOptionalOptions: [],\r\n carDetailsExtendedData: {\r\n ...this.state.carDetailsExtendedData,\r\n fuelType: null,\r\n fuelTypeId: null,\r\n vehicleType: null,\r\n vehicleTypeId: null,\r\n mvoDvBattypId: null,\r\n mvoDvBattyp: null,\r\n model: null,\r\n modelId: null,\r\n transmissionType: null,\r\n transmissionTypeId: null,\r\n bodyType: null,\r\n bodyTypeId: null,\r\n make: null,\r\n makeId: null,\r\n version: '',\r\n equipmentVersion: '',\r\n kilometersNr: null,\r\n power: null,\r\n horsePower: null,\r\n engineSize: null,\r\n co2: null,\r\n inConditionComments: null,\r\n outConditionComments: null,\r\n technicalConditionComments: null,\r\n makeDate: '',\r\n engineManufactureCode: '',\r\n nrOfDoors: null,\r\n tractionType: null,\r\n tractionTypeId: null,\r\n color: null,\r\n colorId: null,\r\n paintType: null,\r\n paintTypeId: null,\r\n pollutionNorm: null,\r\n pollutionNormId: null,\r\n firstRegistrationDate: '',\r\n valuationVehicleId: null,\r\n propulsionSystem: ''\r\n }\r\n });\r\n }\r\n\r\n selectedVehicleHandler = async (selectedVehicle: any, optionsCodes: string[]) => {\r\n if (R.isNil(selectedVehicle)) return;\r\n\r\n const model = this.state.modelTypes.find((m) => m.code === selectedVehicle.model);\r\n const bodyType = this.state.bodyTypes.find((b) => b.code === selectedVehicle.body);\r\n const options = await this.caseService.GetValuationVehicleOptions(selectedVehicle.vehicleId);\r\n\r\n const fuelType = this.state.fuelTypes.find(\r\n (fuelType) => fuelType.name === selectedVehicle.fuelType\r\n );\r\n\r\n const vehicleType = this.state.vehicleTypes.find(\r\n (vehicleType) => vehicleType.name === selectedVehicle.vehicleType\r\n );\r\n\r\n const mvoDvBattyp = this.state.mvoDvBattypList.find(\r\n (mvoDvBattyp) => mvoDvBattyp.name === selectedVehicle.mvoDvBattyp\r\n );\r\n\r\n const refurbished = this.state.refurbishedList.find(\r\n (refurbishedItem) => refurbishedItem.name === selectedVehicle.refurbished\r\n );\r\n\r\n const transmissionType = this.state.transmissionTypes.find(\r\n (transmissionType) => transmissionType.code === selectedVehicle.transmission[0]\r\n );\r\n\r\n const make = this.state.brandTypes.find((make) => make.name! === selectedVehicle.manufacturer);\r\n\r\n const traction = this.state.tractionTypes.find(\r\n (tractionType) => tractionType.code === selectedVehicle.drivenWheels[0]\r\n );\r\n\r\n const pollutionNorm = this.state.polutionNormTypes.find(\r\n (x) => x.code === selectedVehicle.pollution\r\n );\r\n\r\n this.setSelectedOptions(options.extraOptions, optionsCodes);\r\n\r\n const valLanguageId = Utils.GetValuationLanguageId(this.props.appState.language);\r\n\r\n const carDetailsExtendedData = {\r\n ...this.state.carDetailsExtendedData,\r\n tractionType: traction || null,\r\n tractionTypeId: Utils.GetIdOrNull(traction),\r\n fuelType: fuelType || null,\r\n fuelTypeId: Utils.GetIdOrNull(fuelType),\r\n vehicleType: vehicleType || null,\r\n vehicleTypeId: Utils.GetIdOrNull(vehicleType),\r\n refurbishedId: Utils.GetIdOrNull(refurbished),\r\n refurbished: refurbished || null,\r\n mvoDvBattypId: Utils.GetIdOrNull(mvoDvBattyp),\r\n mvoDvBattyp: mvoDvBattyp || null,\r\n model: model || null,\r\n modelId: Utils.GetIdOrNull(model),\r\n transmissionType: transmissionType || null,\r\n transmissionTypeId: Utils.GetIdOrNull(transmissionType),\r\n make: make || null,\r\n makeId: Utils.GetIdOrNull(make),\r\n version: selectedVehicle.version || null,\r\n equipmentVersion: selectedVehicle.trimLevel !== undefined ? selectedVehicle.trimLevel : null,\r\n horsePower: selectedVehicle.powerHP || null,\r\n power: selectedVehicle.kw || null,\r\n engineSize: selectedVehicle.cc ?? 0,\r\n co2: selectedVehicle.co2 || 0,\r\n makeDate: selectedVehicle.fabricationDate,\r\n engineManufactureCode: selectedVehicle.engineManufactureCode ?? '',\r\n nrOfDoors: selectedVehicle.noOfDoors,\r\n bodyType: bodyType || null,\r\n bodyTypeId: Utils.GetIdOrNull(bodyType),\r\n pollutionNorm: pollutionNorm || null,\r\n pollutionNormId: Utils.GetIdOrNull(pollutionNorm),\r\n valuationVehicleId: selectedVehicle.vehicleId || null,\r\n vinQuery: selectedVehicle.vinQuery || false,\r\n propulsionSystem: selectedVehicle.propulsionSystem || null,\r\n imgUrl: selectedVehicle.imgUrl || null\r\n };\r\n // Since we need to make the fields that come from Vehicle Info API readonly after they are set\r\n // use a second state in order to allow the user edit the missing fields\r\n this.setState({\r\n carDetailsExtendedData,\r\n carDetailsFetchedData: {\r\n ...carDetailsExtendedData\r\n },\r\n isValuationOpen: true,\r\n selectedVehicle: selectedVehicle,\r\n carStandardOptions: options.standardOptions\r\n .filter(\r\n (item) =>\r\n item.languageId === valLanguageId && !standardOptionsSchemaIds.includes(item.schemaId)\r\n )\r\n .map((op) => {\r\n return {\r\n id: 0,\r\n code: '',\r\n name: op.content,\r\n isStandard: true,\r\n vehicleId: this.state.carDetailsExtendedData.id,\r\n checked: true\r\n } as VehicleOption;\r\n }),\r\n carOptionalOptions: options.extraOptions.map((op) => {\r\n return {\r\n id: 0,\r\n code: op.optionCode,\r\n name: op.description,\r\n isStandard: false,\r\n vehicleId: this.state.carDetailsExtendedData.id,\r\n checked: op.checked\r\n } as VehicleOption;\r\n })\r\n });\r\n\r\n // added this to have the selected vehicle in the vehicle state\r\n this.props.vehicleState.vehicle = this.state.carDetailsExtendedData;\r\n };\r\n\r\n getCarStandardOptionsColumns = () => {\r\n return [\r\n {\r\n field: 'name',\r\n title: this.translatorService.Tranlate('CAR_DETAILS_CAR_STANDARD_OPTION', 'Nume'),\r\n searchable: true\r\n } as Column\r\n ];\r\n };\r\n\r\n getCarOptionalOptionsColumns = () => {\r\n return [\r\n {\r\n field: 'name',\r\n title: this.translatorService.Tranlate('CAR_DETAILS_CAR_OPTIONAL_OPTION', 'Nume'),\r\n searchable: true\r\n } as Column,\r\n {\r\n field: 'code',\r\n title: this.translatorService.Tranlate('CAR_DETAILS_CAR_OPTIONAL_CODE', 'Cod'),\r\n searchable: true\r\n } as Column\r\n ];\r\n };\r\n\r\n loadData = async () => {\r\n const {\r\n vehicleMakeRef,\r\n bodyTypeRef,\r\n tractionTypeRef,\r\n transmissionTypeRef,\r\n fuelTypeRef,\r\n paintTypeRef,\r\n modelRef,\r\n colorRef,\r\n vehicleTypeRef\r\n } = RefConstants;\r\n\r\n const [\r\n vehicleMakeList,\r\n bodyTypeList,\r\n tractionTypeList,\r\n transmissionTypeList,\r\n fuelTypeList,\r\n paintTypeList,\r\n modelTypesList,\r\n colorTypeList,\r\n vehicleTypeList\r\n ] = await Promise.all([\r\n this.appReferentialService.Get(vehicleMakeRef?.baseUrl),\r\n this.appReferentialService.Get(bodyTypeRef!.baseUrl),\r\n this.appReferentialService.Get(tractionTypeRef!.baseUrl),\r\n this.appReferentialService.Get(transmissionTypeRef!.baseUrl),\r\n this.appReferentialService.Get(fuelTypeRef!.baseUrl),\r\n this.appReferentialService.Get(paintTypeRef!.baseUrl),\r\n this.appReferentialService.Get(modelRef!.baseUrl),\r\n this.appReferentialService.Get(colorRef!.baseUrl),\r\n this.appReferentialService.Get(vehicleTypeRef!.baseUrl)\r\n ]);\r\n\r\n this.setState({\r\n isLoading: false,\r\n brandTypes: vehicleMakeList,\r\n bodyTypes: bodyTypeList,\r\n tractionTypes: tractionTypeList,\r\n transmissionTypes: transmissionTypeList,\r\n fuelTypes: fuelTypeList,\r\n paintTypes: paintTypeList,\r\n modelTypes: modelTypesList as IReferentialModel[],\r\n colorTypes: colorTypeList,\r\n vehicleTypes: vehicleTypeList\r\n });\r\n };\r\n\r\n onChangeFirstRegistrationDate = (date: Date | null) => {\r\n if (date === null) {\r\n return;\r\n }\r\n const selectedDate = date ? moment(date).format('YYYY-MM-DD') : '';\r\n\r\n this.setState({\r\n carDetailsExtendedData: {\r\n ...this.state.carDetailsExtendedData,\r\n firstRegistrationDate: selectedDate\r\n }\r\n });\r\n };\r\n\r\n handleChassisNumberChange = (e: any) => {\r\n const vin = e.target.value;\r\n\r\n this.setState(\r\n (prevState) => ({\r\n carDetailsExtendedData: {\r\n ...prevState.carDetailsExtendedData,\r\n vin: vin\r\n }\r\n }),\r\n () => {\r\n if (this.state.carDetailsExtendedData.vin !== '') {\r\n this.setState({ showRequiredVinError: false });\r\n }\r\n\r\n const isValidVin =\r\n /^(?=.*[0-9])(?=.*[abcdefghjklmnprstuvwxyzABCDEFGHJKLMNPRSTUVWXYZ])[0-9abcdefghjklmnprstuvwxyzABCDEFGHJKLMNPRSTUVWXYZ-]{17}$/.test(\r\n this.state.carDetailsExtendedData.vin\r\n );\r\n }\r\n );\r\n };\r\n\r\n handlePlateNumberBlur = async (plateNumber: PlateNumber) => {\r\n if (!Utils.validatePlateNumber(plateNumber.PlateNumber)) return;\r\n\r\n try {\r\n const vinRequest = await this.caseService.GetVinByPlateNumberRequest(plateNumber);\r\n\r\n if (vinRequest.success) {\r\n this.setState({\r\n carDetailsExtendedData: {\r\n ...this.state.carDetailsExtendedData,\r\n vin: vinRequest.vin\r\n }\r\n });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } else {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('ERROR_MSG_VIN', 'Eroare la obtinerea VIN'),\r\n {\r\n variant: 'error'\r\n }\r\n );\r\n }\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n renderClientDataForm = () => {\r\n return (\r\n {\r\n this.submitVehicleData(e);\r\n }}\r\n >\r\n
\r\n \r\n \r\n \r\n \r\n \r\n {!this.state.showSearchingLoader ? (\r\n \r\n ) : (\r\n \r\n )}\r\n \r\n \r\n \r\n )\r\n }}\r\n />\r\n \r\n \r\n\r\n \r\n \r\n {\r\n this.onChange('plateNumber')(e);\r\n }}\r\n onBlur={async (e: any) => {\r\n const plateNumberObject: PlateNumber = {\r\n PlateNumber: e.target.value,\r\n externalClient: false\r\n };\r\n await this.handlePlateNumberBlur(plateNumberObject);\r\n }}\r\n error={\r\n this.state.carDetailsExtendedData.plateNumber !== '' &&\r\n !Utils.validatePlateNumber(this.state.carDetailsExtendedData.plateNumber)\r\n }\r\n helperText={\r\n this.state.carDetailsExtendedData.plateNumber !== ''\r\n ? Utils.validatePlateNumber(this.state.carDetailsExtendedData.plateNumber)\r\n ? ''\r\n : this.translatorService.Tranlate(\r\n 'CAR_DETAILS_PLATE_NUMBER_ERROR',\r\n 'Numarul de inmatriculare nu este valid'\r\n )\r\n : ''\r\n }\r\n validators={['matchRegexp:^[A-Z]{1,2}[0-9]{2,3}[A-Z]{3}$']}\r\n errorMessages={[\r\n this.translatorService.Tranlate(\r\n 'CAR_DETAILS_PLATE_NUMBER_ERROR',\r\n 'Numarul de inmatriculare nu este valid'\r\n )\r\n ]}\r\n label={this.translatorService.Tranlate(\r\n 'CAR_DETAILS_PLATE_NUMBER',\r\n 'Numar inmatriculare'\r\n )}\r\n />\r\n \r\n {this.translatorService.Tranlate(\r\n 'CAR_DETAILS_TRY_WITH_PLATE_NUMBER',\r\n '*Nu ai VIN-ul la indemana? Incearca cu nr de inmatriculare'\r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n {\r\n this.setState({\r\n ignoreTimeStampSwitch: !this.state.ignoreTimeStampSwitch\r\n });\r\n if (!this.state.ignoreTimeStampSwitch) {\r\n this.setState({\r\n datePickerFirstRegistrationError: ''\r\n });\r\n }\r\n }}\r\n color=\"primary\"\r\n />\r\n }\r\n label={this.translatorService.Tranlate(\r\n 'IGNORE_TIME_STAMP_SWITCH',\r\n 'Ignora orice reper temporal'\r\n )}\r\n />\r\n \r\n \r\n \r\n \r\n {\r\n this.setState({\r\n ignoreExistingMappingSwitch: !this.state.ignoreExistingMappingSwitch\r\n });\r\n }}\r\n color=\"primary\"\r\n />\r\n }\r\n label={this.translatorService.Tranlate(\r\n 'IGNORE_EXISTING_MAPPING',\r\n 'Ignora maparea existenta'\r\n )}\r\n />\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n {this.translatorService.Tranlate('VALUATION_DIALOG_HEADER', 'Selectare vehicul')}\r\n \r\n {\r\n this.setState({ isValuationOpen: false, isOpen: false, dialogVisible: false });\r\n\r\n !R.isNil(this.state.selectedVehicle)\r\n ? (this.props.vehicleState.vehicle = null)\r\n : null;\r\n\r\n this.resetVehicleState();\r\n this.props.resetVehicleState();\r\n }}\r\n size={'small'}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n \r\n \r\n \r\n \r\n {`${this.translatorService.Tranlate(\r\n 'VIN_IDENTIFICATION_CONFIRMATION_MESSAGE',\r\n 'Identificarea conform VIN presupune un cost suplimentar - Doriţi să continuaţi ?'\r\n )} `}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n }\r\n onClick={this.getManualValuationInfo}\r\n >\r\n {this.translatorService.Tranlate(\r\n 'EVALUATION_MANUAL_IDENTIFICATION_BUTTON_LABEL',\r\n 'Identificare manuala'\r\n )}\r\n \r\n \r\n }\r\n onClick={this.getValuationInfoConfirmation}\r\n >\r\n {this.translatorService.Tranlate(\r\n 'VIN_QUERY_IDENTIFICATION',\r\n 'Identificare cu VIN Query'\r\n )}\r\n \r\n \r\n \r\n {this.translatorService.Tranlate(\r\n 'CAR_DETAILS_HISTORY_BUTTON_LABEL',\r\n 'Istoric evaluari'\r\n )}\r\n \r\n \r\n \r\n );\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n this.vehicleService = (this.context as AppContext).vehicleService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ?
{this.renderClientDataForm()}
: null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst ConnectedComponent = connect(\r\n (\r\n state: ApplicationState,\r\n ownProps: ExternalCaseDetailsCaseTabCarDetailsExtendedContainerProps\r\n ) => ({\r\n caseSettingsState: state.caseSettings,\r\n appState: state.app,\r\n vehicleState: state.vehicle,\r\n ...ownProps\r\n }),\r\n { ...CaseSettingsActionCreators, ...VehicleActionCreators }\r\n)(DetailsValuationContainer);\r\n\r\nexport default withRouter(withSnackbar(ConnectedComponent));\r\n","import React, { Fragment, useState } from 'react';\r\nimport { Box } from '@material-ui/core';\r\nimport { useAppSelector } from '../../store/configureStore';\r\n\r\nimport DetailsValuationContainer from './DetailsValuationContainer';\r\nimport moment from 'moment';\r\nimport { useSnackbar } from 'notistack';\r\nimport Loader from '../Loader';\r\n\r\nconst EvaluationPage = () => {\r\n const [isLoading, setIsLoading] = React.useState(false);\r\n\r\n const language = useAppSelector((state) => state.app?.language);\r\n\r\n return (\r\n \r\n {isLoading ? (\r\n \r\n ) : (\r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nexport default EvaluationPage;\r\n","export default __webpack_public_path__ + \"static/media/logo_carfix_partner.418906c6.png\";","import React, { Fragment, useContext } from 'react';\r\nimport {\r\n Typography,\r\n Grid,\r\n List,\r\n ListItem,\r\n ListItemText,\r\n Table,\r\n TableBody,\r\n TableCell,\r\n TableRow,\r\n ListItemIcon\r\n} from '@material-ui/core';\r\nimport projectLogo from '../../assets/images/logo_carfix_partner.png';\r\nimport { FiberManualRecord } from '@material-ui/icons';\r\nimport { ApplicationContext } from '../../context/Contexts';\r\nimport * as R from 'ramda';\r\nimport ImageNotAvailable from '../../assets/images/car-image-not-available.jpg';\r\nimport moment from 'moment';\r\n\r\nconst EvaluationReportFile = (reportData: any) => {\r\n const { carDetails } = reportData;\r\n const context = useContext(ApplicationContext);\r\n const translatorService = context.translatorService;\r\n const basicTableCellStyle = {\r\n fontSize: '13px',\r\n padding: '0 0 0 16px'\r\n };\r\n const leftTableCellStyle = {\r\n width: '40%',\r\n fontWeight: 'bold'\r\n };\r\n\r\n const checkIfImageExists = (url: string | undefined) => {\r\n if (R.isNil(url) || url.includes('undefined') || url.includes('null') || url === '') {\r\n return ImageNotAvailable;\r\n }\r\n return url;\r\n };\r\n\r\n function formatDateTime(dateTimeString: string) {\r\n const date = new Date(dateTimeString);\r\n\r\n const day = String(date.getDate()).padStart(2, '0');\r\n const month = String(date.getMonth() + 1).padStart(2, '0');\r\n const year = date.getFullYear();\r\n\r\n const hours = String(date.getHours()).padStart(2, '0');\r\n const minutes = String(date.getMinutes()).padStart(2, '0');\r\n\r\n const formattedDate = `${day}-${month}-${year}`;\r\n const formattedTime = `${parseInt(hours) + 3}:${minutes}`;\r\n\r\n const formattedDateTime = `${formattedDate} ${formattedTime}`;\r\n\r\n return formattedDateTime;\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n {translatorService.Tranlate('VALUATION_REPORT_TITLE', 'Raport evaluare')}\r\n \r\n \r\n \r\n \r\n {`${!R.isNil(carDetails?.make) ? carDetails.make : ''} \r\n ${!R.isNil(carDetails?.model) ? carDetails.model : ''}\r\n ${!R.isNil(carDetails?.version) ? carDetails.version : ''},\r\n ${carDetails?.numberOfKilometers ? carDetails.numberOfKilometers : 0} km\r\n `}\r\n \r\n \r\n\r\n \r\n \r\n \r\n {translatorService.Tranlate(\r\n 'VALUATION_REPORT_CAR_DETAILS_LABEL',\r\n 'Specificatii autovehicul'\r\n )}\r\n \r\n \r\n \r\n \r\n \r\n {translatorService.Tranlate('CAR_DETAILS_CHASIS_CODE', 'Serie sasiu')}\r\n \r\n \r\n {carDetails.vin ? carDetails.vin : '-'}\r\n \r\n \r\n \r\n \r\n {translatorService.Tranlate('VALUATION_REPORT_MAKE_LABEL', 'Producator')}\r\n \r\n \r\n {carDetails.make ? carDetails.make : '-'}\r\n \r\n \r\n \r\n \r\n {translatorService.Tranlate('VALUATION_REPORT_MODEL_LABEL', 'Model')}\r\n \r\n \r\n {carDetails.model ? carDetails.model : '-'}\r\n \r\n \r\n \r\n \r\n {translatorService.Tranlate('VALUATION_REPORT_VERSION_LABEL', 'Versiune')}\r\n \r\n \r\n {carDetails.version ? carDetails.version : '-'}\r\n \r\n \r\n \r\n \r\n {translatorService.Tranlate('VALUATION_REPORT_EQUIP_LABEL', 'Echipare')}\r\n \r\n \r\n {carDetails.equipmentVersion ? carDetails.equipmentVersion : '-'}\r\n \r\n \r\n\r\n \r\n \r\n {translatorService.Tranlate('VALUATION_REPORT_FUEL_LABEL', 'Combustibil')}\r\n \r\n \r\n {carDetails.fuelType ? carDetails.fuelType : '-'}\r\n \r\n \r\n \r\n \r\n {translatorService.Tranlate(\r\n 'VALUATION_REPORT_GEARBOX_LABEL',\r\n 'Cutie de viteze'\r\n )}\r\n \r\n \r\n {carDetails.transmissionType ? carDetails.transmissionType : '-'}\r\n \r\n \r\n \r\n \r\n {translatorService.Tranlate('VALUATION_REPORT_HORSE_POWER_LABEL', 'Cai putere')}\r\n \r\n \r\n {carDetails.horsePower ? carDetails.horsePower : '-'}\r\n \r\n \r\n \r\n \r\n {translatorService.Tranlate('VALUATION_REPORT_BODY_TYPE_LABEL', 'Caroserie')}\r\n \r\n \r\n {carDetails.bodyType ? carDetails.bodyType : '-'}\r\n \r\n \r\n \r\n \r\n {translatorService.Tranlate('VALUATION_REPORT_DOORS_NUMBER_LABEL', 'Numar usi')}\r\n \r\n \r\n {carDetails.nrOfDoors ? carDetails.nrOfDoors : '-'}\r\n \r\n \r\n \r\n \r\n {translatorService.Tranlate('CAR_DETAILS_COLOR', 'Culoare')}\r\n \r\n \r\n {carDetails.color ? carDetails.color : '-'}\r\n \r\n \r\n \r\n \r\n {translatorService.Tranlate(\r\n 'CAR_DETAILS_DATE_OF_FABRICATION',\r\n 'Data fabricatie'\r\n )}\r\n \r\n \r\n {carDetails.fabricationDate\r\n ? new Date(carDetails.fabricationDate).toLocaleDateString('en-GB')\r\n : '-'}\r\n \r\n \r\n \r\n \r\n {translatorService.Tranlate(\r\n 'VALUATION_REGISTRATION_DATE_LABEL',\r\n 'Data primei inmatriculari'\r\n )}\r\n \r\n \r\n {carDetails.registrationDate\r\n ? moment(carDetails.registrationDate).format('MM/YYYY')\r\n : '-'}\r\n \r\n \r\n \r\n
\r\n
\r\n\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n\r\n \r\n \r\n \r\n {translatorService.Tranlate('VALUATION_REPORT_CAR_PRICES_LABEL', 'Detalii evaluare')}\r\n \r\n \r\n \r\n \r\n \r\n {translatorService.Tranlate('VALUATION_REPORT_VALUATIO_NUMBER', 'Nr. evaluare')}\r\n \r\n \r\n {carDetails.id ? `VALUATION-${carDetails.id}` : ''}\r\n \r\n \r\n \r\n \r\n {translatorService.Tranlate('VALUATION_REPORT_VALUATION_DATE', 'Data evaluare')}\r\n \r\n \r\n {carDetails.dateCreation ? formatDateTime(carDetails.dateCreation) : ''}\r\n \r\n \r\n \r\n \r\n {translatorService.Tranlate(\r\n 'VALUATION_REPORT_BASE_PRICE_LABEL',\r\n 'Pret masina noua'\r\n )}\r\n \r\n \r\n {carDetails.priceAsNew ? carDetails.priceAsNew.toFixed(2) : '0.00'} €{' '}\r\n {translatorService.Tranlate('VALUATION_REPORT_INCLUDING_VAT_LABEL', 'brut')}\r\n \r\n \r\n \r\n \r\n {translatorService.Tranlate(\r\n 'VALUATION_REPORT_OPTIONS_PRICE_LABEL',\r\n 'Pret optionale extra'\r\n )}\r\n \r\n \r\n {carDetails.extraOptionsPrice\r\n ? carDetails.extraOptionsPrice.toFixed(2)\r\n : '0.00'}{' '}\r\n € {translatorService.Tranlate('VALUATION_REPORT_INCLUDING_VAT_LABEL', 'brut')}\r\n \r\n \r\n \r\n \r\n {translatorService.Tranlate(\r\n 'VALUATION_REPORT_TOTAL_LABEL',\r\n 'Pret total masina noua'\r\n )}\r\n \r\n \r\n {carDetails.priceAsNew >= 0 && carDetails.extraOptionsPrice >= 0\r\n ? (carDetails.priceAsNew + carDetails.extraOptionsPrice).toFixed(2)\r\n : '0.00'}{' '}\r\n € {translatorService.Tranlate('VALUATION_REPORT_INCLUDING_VAT_LABEL', 'brut')}\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n {translatorService.Tranlate(\r\n 'VALUATION_REPORT_CAR_DETAILS_ESTIMATIONS_LABEL',\r\n 'Valori estimate'\r\n )}\r\n \r\n \r\n \r\n \r\n \r\n {translatorService.Tranlate(\r\n 'VALUATION_REPORT_TRADE_IN_PRICE_LABEL',\r\n 'Trade-in price'\r\n )}\r\n \r\n \r\n {carDetails.tradeInPrice ? carDetails.tradeInPrice.toFixed(2) : '0.00'} €{' '}\r\n {translatorService.Tranlate('VALUATION_REPORT_INCLUDING_VAT_LABEL', 'brut')}\r\n \r\n \r\n \r\n \r\n {translatorService.Tranlate(\r\n 'VALUATION_REPORT_OFFER_PRICE_LABEL',\r\n 'Offer price'\r\n )}\r\n \r\n \r\n {carDetails.offerPrice ? carDetails.offerPrice.toFixed(2) : '0.00'} €{' '}\r\n {translatorService.Tranlate('VALUATION_REPORT_INCLUDING_VAT_LABEL', 'brut')}\r\n \r\n \r\n \r\n \r\n {translatorService.Tranlate(\r\n 'VALUATION_REPORT_RETAIL_PRICE_LABEL',\r\n 'Retail price'\r\n )}\r\n \r\n \r\n {carDetails.retailPrice ? carDetails.retailPrice.toFixed(2) : '0.00'} €{' '}\r\n {translatorService.Tranlate('VALUATION_REPORT_INCLUDING_VAT_LABEL', 'brut')}\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n \r\n {`${translatorService.Tranlate(\r\n 'VALUATION_CAR_FILE_STANDARD_OPTIONS',\r\n 'Optionale standard selectate'\r\n )}:`}\r\n \r\n {R.isNil(carDetails.options) ||\r\n R.isNil(carDetails.options.standardOptions) ||\r\n carDetails.options.standardOptions.length === 0 ? (\r\n \r\n \r\n \r\n ) : (\r\n \r\n {carDetails.options?.standardOptions.map((item: any, index: any) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n \r\n )}\r\n \r\n \r\n \r\n {`${translatorService.Tranlate(\r\n 'VALUATION_CAR_FILE_EXTRA_OPTIONS',\r\n 'Optionale extra selectate'\r\n )}:`}\r\n \r\n {R.isNil(carDetails.options) ||\r\n R.isNil(carDetails.options.extraOptions) ||\r\n carDetails.options.extraOptions.length === 0 ? (\r\n \r\n \r\n \r\n ) : (\r\n \r\n {carDetails.options?.extraOptions.map((item: any, index: any) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n \r\n )}\r\n \r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nexport default EvaluationReportFile;\r\n","import React, { Fragment, useContext, useEffect, useRef, useState } from 'react';\r\nimport { useParams } from 'react-router';\r\nimport {\r\n Typography,\r\n Button,\r\n Grid,\r\n Card,\r\n CardContent,\r\n FormControlLabel,\r\n CardMedia,\r\n TextField,\r\n Checkbox,\r\n List,\r\n ListItem,\r\n ListItemText,\r\n ListItemIcon\r\n} from '@material-ui/core';\r\nimport { FiberManualRecord } from '@material-ui/icons';\r\nimport { ApplicationContext } from '../../context/Contexts';\r\nimport { useHistory } from 'react-router';\r\nimport { ValuationVehicleOptions } from '../../interfaces/Case';\r\nimport { Label } from 'reactstrap';\r\nimport * as R from 'ramda';\r\nimport { Utils } from '../../helpers/Utils';\r\nimport Loader from '../Loader';\r\nimport { useSnackbar } from 'notistack';\r\nimport { useAppSelector } from '../../store/configureStore';\r\nimport { ValuationCarFile } from './evaluation.types';\r\nimport { getCarValuationDetails, getValuationVehicleOptions } from './evaluation.requests';\r\nimport ImageNotAvailable from '../../assets/images/car-image-not-available.jpg';\r\nimport { standardOptionsSchemaIds } from './DetailsValuation';\r\nimport * as html2pdf from 'html2pdf.js';\r\nimport html2canvas from 'html2canvas';\r\nimport EvaluationReportFile from './EvaluationReportFile';\r\nimport moment from 'moment';\r\n\r\nconst EvaluationCarFile = () => {\r\n const { enqueueSnackbar } = useSnackbar();\r\n const context = useContext(ApplicationContext);\r\n const history = useHistory();\r\n const translatorService = context.translatorService;\r\n const language = useAppSelector((state) => (state.app?.language ? state.app.language : 'ro'));\r\n const valLanguageId = Utils.GetValuationLanguageId(language);\r\n const valuationId = parseInt(useParams<{ id: string }>().id);\r\n const [isLoading, setIsLoading] = useState(false);\r\n const [isOptionsLoading, setIsOptionsLoading] = useState(false);\r\n const [carDetails, setCarDetails] = useState({} as ValuationCarFile);\r\n const reportRef = useRef(null);\r\n\r\n const fetchCarDetails = async (id: number) => {\r\n setIsLoading(true);\r\n try {\r\n const carDetailsResponse = await getCarValuationDetails(id);\r\n\r\n if (carDetailsResponse.error || !carDetailsResponse.data) {\r\n resetCarDetails();\r\n enqueueSnackbar(\r\n translatorService.Tranlate(\r\n 'EVALUATION_CAR_FILE_ERROR',\r\n 'A aparut o eroare la preluarea detaliilor masinii'\r\n ),\r\n { variant: 'error' }\r\n );\r\n\r\n setIsLoading(false);\r\n return;\r\n }\r\n\r\n let decodedOptions = {} as ValuationVehicleOptions;\r\n if (\r\n !R.isNil(carDetailsResponse.data.options) &&\r\n !R.isEmpty(carDetailsResponse.data.options)\r\n ) {\r\n decodedOptions = {\r\n extraOptions: JSON.parse(carDetailsResponse.data.options),\r\n standardOptions: []\r\n };\r\n }\r\n\r\n setCarDetails(\r\n (prevState) =>\r\n ({\r\n ...prevState,\r\n ...carDetailsResponse.data,\r\n options: decodedOptions\r\n } as ValuationCarFile)\r\n );\r\n } catch (error) {\r\n resetCarDetails();\r\n enqueueSnackbar(\r\n translatorService.Tranlate(\r\n 'EVALUATION_CAR_FILE_ERROR',\r\n 'A aparut o eroare la preluarea detaliilor masinii'\r\n ),\r\n { variant: 'error' }\r\n );\r\n }\r\n setIsLoading(false);\r\n };\r\n\r\n const getCarOptions = async (vehicleId: number) => {\r\n setIsOptionsLoading(true);\r\n try {\r\n const carOptionsResponse = await getValuationVehicleOptions(vehicleId);\r\n if (carOptionsResponse.error || !carOptionsResponse.data) {\r\n enqueueSnackbar(\r\n translatorService.Tranlate(\r\n 'EVALUATION_CAR_FILE_FETCHING_STANDARD_OPTIONS_ERROR',\r\n 'A aparut o eroare la preluarea optiunilor standard ale vehiculului'\r\n ),\r\n { variant: 'error' }\r\n );\r\n setIsOptionsLoading(false);\r\n return;\r\n }\r\n\r\n const standardOptions = carOptionsResponse.data[0].standardOptions.filter(\r\n (option) =>\r\n option.languageId === valLanguageId && !standardOptionsSchemaIds.includes(option.schemaId)\r\n );\r\n\r\n setCarDetails(\r\n (prevState) =>\r\n ({\r\n ...prevState,\r\n options: {\r\n ...prevState.options,\r\n standardOptions: standardOptions\r\n }\r\n } as ValuationCarFile)\r\n );\r\n } catch (error) {\r\n enqueueSnackbar(\r\n translatorService.Tranlate(\r\n 'EVALUATION_CAR_FILE_FETCHING_STANDARD_OPTIONS_ERROR',\r\n 'A aparut o eroare la preluarea optiunilor standard ale vehiculului'\r\n ),\r\n { variant: 'error' }\r\n );\r\n }\r\n setIsOptionsLoading(false);\r\n };\r\n\r\n const resetCarDetails = () => {\r\n setCarDetails({\r\n date: '',\r\n valuationDate: '',\r\n numberOfKilometers: 0,\r\n extraOptionsPrice: 0,\r\n extraOptionsDepreciationPrice: 0,\r\n valuationPrice: 0,\r\n priceAsNew: 0,\r\n bodyDamageValue: 0,\r\n attritionValue: 0,\r\n fabricationDate: '',\r\n gpl: false,\r\n vatRate: 0,\r\n options: null,\r\n registrationDate: '',\r\n color: '',\r\n imageUrl: '',\r\n tradeInPrice: 0,\r\n offerPrice: 0,\r\n retailPrice: 0,\r\n make: '',\r\n model: '',\r\n version: '',\r\n equipmentVersion: '',\r\n dateCreation: '',\r\n dateModification: '',\r\n createdBy: '',\r\n modifiedBy: '',\r\n id: 0,\r\n caseId: 0,\r\n userId: '',\r\n valuationSourceId: 0,\r\n vehicleSourceId: 0,\r\n case: null,\r\n vin: ''\r\n });\r\n };\r\n\r\n const goToNewEvaluation = () => {\r\n history.push('/valuation');\r\n resetCarDetails();\r\n };\r\n\r\n const goToHistory = () => {\r\n history.push('/valuation/history');\r\n resetCarDetails();\r\n };\r\n\r\n const formattedThisDateTime = () => {\r\n const now = new Date();\r\n const formattedDate = now.toLocaleDateString('en-GB').replace(/\\//g, '.');\r\n const formattedTime = now.toLocaleTimeString('en-GB', {\r\n hour: '2-digit',\r\n minute: '2-digit'\r\n });\r\n\r\n return `${formattedDate}, ${formattedTime}`;\r\n };\r\n\r\n const downloadCarPdfRaport = async () => {\r\n const element = reportRef.current;\r\n if (element) {\r\n const options = {\r\n margin: [20, 10, 25, 10],\r\n filename: `Raport_evaluare_${carDetails.make}_${carDetails.model}_${new Date(\r\n carDetails.date\r\n ).toLocaleDateString('en-GB')}.pdf`,\r\n image: { type: 'jpeg', quality: 1.0 },\r\n html2canvas: { scale: 4, useCORS: true },\r\n jsPDF: { unit: 'mm', format: 'a4', orientation: 'portrait' }\r\n };\r\n\r\n const worker = html2pdf().from(element).set(options).toPdf();\r\n\r\n worker.get('pdf').then((pdf: any) => {\r\n const totalPages = pdf.internal.getNumberOfPages();\r\n const pageHeight = pdf.internal.pageSize.height;\r\n const pageWidth = pdf.internal.pageSize.width;\r\n const reportName = translatorService.Tranlate('VALUATION_REPORT_TITLE', 'Raport evaluare');\r\n const dateAndTime = formattedThisDateTime();\r\n\r\n for (let i = 1; i <= totalPages; i++) {\r\n pdf.setPage(i);\r\n pdf.setFontSize(8);\r\n\r\n // Add 'Raport evaluare' to the top left corner\r\n pdf.text(reportName, 10, 10);\r\n\r\n // Add date and time to the top right corner\r\n pdf.text(dateAndTime, pageWidth - 30, 10);\r\n\r\n // Add page number to the bottom right corner\r\n pdf.text(`${i}/${totalPages}`, pageWidth - 15, pageHeight - 10);\r\n }\r\n });\r\n\r\n worker.save();\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n fetchCarDetails(valuationId);\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (carDetails.vehicleSourceId) {\r\n getCarOptions(carDetails.vehicleSourceId);\r\n // getCarOptions(833282720240220);\r\n }\r\n }, [carDetails.vehicleSourceId]);\r\n\r\n const checkIfImageExists = (url: string | undefined) => {\r\n if (R.isNil(url) || url.includes('undefined') || url.includes('null') || url === '') {\r\n return ImageNotAvailable;\r\n }\r\n return url;\r\n };\r\n\r\n return (\r\n \r\n {isLoading ? (\r\n \r\n ) : (\r\n
\r\n \r\n \r\n {`${!R.isNil(carDetails?.make) ? carDetails.make : ''} \r\n ${!R.isNil(carDetails?.model) ? carDetails.model : ''}\r\n ${!R.isNil(carDetails?.version) ? carDetails.version : ''}\r\n `}\r\n \r\n {\r\n goToHistory();\r\n }}\r\n >\r\n {translatorService.Tranlate('CAR_DETAILS_HISTORY_BUTTON_LABEL', 'Istoric evaluari')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n label={translatorService.Tranlate(\r\n 'VALUATION_CAR_HAS_GPL_LABEL',\r\n 'Masina prezinta instalatie GPL'\r\n )}\r\n />\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n {\r\n downloadCarPdfRaport();\r\n }}\r\n disabled={isLoading || isOptionsLoading}\r\n >\r\n {translatorService.Tranlate(\r\n 'VALUATION_CAR_FILE_DOWNLOAD_RAPORT_PDF',\r\n 'Descarca raport PDF'\r\n )}\r\n \r\n \r\n \r\n {\r\n goToNewEvaluation();\r\n }}\r\n >\r\n {translatorService.Tranlate(\r\n 'VALUATION_CAR_FILE_NEW_EVALUATION',\r\n 'Evaluare noua'\r\n )}\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n {carDetails.priceAsNew ? carDetails.priceAsNew.toFixed(2) : '0.00'} €\r\n
\r\n
\r\n {carDetails.extraOptionsPrice\r\n ? carDetails.extraOptionsPrice.toFixed(2)\r\n : '0.00'}{' '}\r\n €\r\n
\r\n
\r\n {carDetails.priceAsNew >= 0 && carDetails.extraOptionsPrice >= 0\r\n ? (carDetails.priceAsNew + carDetails.extraOptionsPrice).toFixed(2)\r\n : '0.00'}{' '}\r\n €\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n {carDetails.tradeInPrice ? carDetails.tradeInPrice.toFixed(2) : 0} €\r\n
\r\n
\r\n {carDetails.offerPrice ? carDetails.offerPrice.toFixed(2) : 0} €\r\n
\r\n
\r\n {carDetails.retailPrice ? carDetails.retailPrice.toFixed(2) : 0} €\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n {`${translatorService.Tranlate(\r\n 'VALUATION_CAR_FILE_STANDARD_OPTIONS',\r\n 'Optionale standard selectate'\r\n )}:`}\r\n \r\n {!isOptionsLoading ? (\r\n R.isNil(carDetails.options) ||\r\n R.isNil(carDetails.options.standardOptions) ||\r\n carDetails.options.standardOptions.length === 0 ? (\r\n \r\n \r\n \r\n ) : (\r\n \r\n {carDetails.options?.standardOptions.map((item, index) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n \r\n )\r\n ) : (\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {`${translatorService.Tranlate(\r\n 'VALUATION_CAR_FILE_EXTRA_OPTIONS',\r\n 'Optionale extra selectate'\r\n )}:`}\r\n \r\n {R.isNil(carDetails.options) ||\r\n R.isNil(carDetails.options.extraOptions) ||\r\n carDetails.options.extraOptions.length === 0 ? (\r\n \r\n \r\n \r\n ) : (\r\n \r\n {carDetails.options?.extraOptions.map((item, index) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n
\r\n {!isLoading && !isOptionsLoading && (\r\n
\r\n
\r\n \r\n
\r\n
\r\n )}\r\n
\r\n )}\r\n
\r\n );\r\n};\r\n\r\nexport default EvaluationCarFile;\r\n","import { API } from '../../helpers/API';\r\nimport { ValuationCarFile } from './evaluation.types';\r\nimport { ValuationVehicleOptions } from '../../interfaces/Case';\r\n\r\ninterface CarValuationResponse {\r\n message: string;\r\n error: boolean;\r\n data: ValuationCarFile;\r\n}\r\n\r\ninterface CarValuationListResponse {\r\n message: string;\r\n error: boolean;\r\n data: ValuationVehicleOptions[];\r\n}\r\n\r\ninterface CarValuationHistoryResponse {\r\n message: string;\r\n error: boolean;\r\n data: ValuationCarFile[];\r\n}\r\n\r\nexport const getCarValuationDetails = async (id: number): Promise => {\r\n try {\r\n const response = await API.GetAsync(`/case/getValuation/${id}`);\r\n return {\r\n message: 'Success',\r\n error: false,\r\n data: response.data as ValuationCarFile\r\n };\r\n } catch (e) {\r\n return {\r\n message: 'Error getting car valuation details',\r\n error: true,\r\n data: {} as ValuationCarFile\r\n };\r\n }\r\n};\r\n\r\nexport const getValuationVehicleOptions = async (\r\n vehicleId: number\r\n): Promise => {\r\n try {\r\n const response = await API.GetAsync(`/case/valuationOptions/${vehicleId}`);\r\n return {\r\n message: 'Success',\r\n error: false,\r\n data: [response.data as ValuationVehicleOptions]\r\n };\r\n } catch (e) {\r\n return {\r\n message: 'Error getting car valuation options',\r\n error: true,\r\n data: [] as ValuationVehicleOptions[]\r\n };\r\n }\r\n};\r\n\r\nexport const getValuationVehicleHistory = async (): Promise => {\r\n try {\r\n const response = await API.GetAsync(`/case/valuation-history`);\r\n return {\r\n message: 'Success',\r\n error: false,\r\n data: response.data as ValuationCarFile[]\r\n };\r\n } catch (e) {\r\n return {\r\n message: 'Error getting car valuation history',\r\n error: true,\r\n data: [] as ValuationCarFile[]\r\n };\r\n }\r\n};\r\n","import React, { Fragment, useContext, useEffect, useState } from 'react';\r\nimport MUIDataTable, { MUIDataTableColumnOptions, SelectableRows } from 'mui-datatables';\r\nimport { MUITranslations } from '../../helpers/MUITableTranslations';\r\nimport { useHistory } from 'react-router';\r\nimport { ApplicationContext } from '../../context/Contexts';\r\nimport { Typography, Button, Grid } from '@material-ui/core';\r\nimport Loader from '../Loader';\r\nimport { useSnackbar } from 'notistack';\r\nimport { ValuationCarFile } from './evaluation.types';\r\nimport { getValuationVehicleHistory } from './evaluation.requests';\r\nimport { useAppSelector } from '../../store/configureStore';\r\nimport moment from 'moment';\r\n\r\nconst EvaluationHistory = () => {\r\n const { enqueueSnackbar } = useSnackbar();\r\n const context = useContext(ApplicationContext);\r\n const history = useHistory();\r\n const translatorService = context.translatorService;\r\n const [isLoading, setIsLoading] = useState(true);\r\n const [valuationHistory, setValuationHistory] = useState([]);\r\n const dateFormat = useAppSelector((state) => state.app?.dateFormat);\r\n\r\n const fetchHistory = async () => {\r\n setIsLoading(true);\r\n\r\n try {\r\n const historyValuationResponse = await getValuationVehicleHistory();\r\n\r\n if (historyValuationResponse.error || !historyValuationResponse.data) {\r\n enqueueSnackbar(\r\n translatorService.Tranlate(\r\n 'EVALUATION_CAR_FILE_FETCHING_HISTORY_ERROR',\r\n 'A aparut o eroare la preluarea istoricului de evaluari'\r\n ),\r\n { variant: 'error' }\r\n );\r\n return;\r\n }\r\n\r\n const sortedHistory = historyValuationResponse.data.sort((a, b) => (a.id > b.id ? -1 : 1));\r\n\r\n setValuationHistory(sortedHistory);\r\n } catch (e) {\r\n enqueueSnackbar(\r\n translatorService.Tranlate(\r\n 'EVALUATION_CAR_FILE_FETCHING_HISTORY_ERROR',\r\n 'A aparut o eroare la preluarea istoricului de evaluari'\r\n ),\r\n { variant: 'error' }\r\n );\r\n }\r\n\r\n setIsLoading(false);\r\n };\r\n\r\n useEffect(() => {\r\n fetchHistory();\r\n }, []);\r\n\r\n const goToNewEvaluation = () => {\r\n history.push('/valuation');\r\n };\r\n\r\n const getHistoryColumns = () => {\r\n return [\r\n {\r\n name: 'id',\r\n label: translatorService.Tranlate('VALUATION_CAR_FILE_TABLE_ID_LABEL', 'ID'),\r\n options: {\r\n filter: false\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'make',\r\n label: translatorService.Tranlate('VALUATION_CAR_FILE_MANUFACTURER', 'Producator'),\r\n options: {\r\n filter: true\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'model',\r\n label: translatorService.Tranlate('VALUATION_CAR_FILE_MODEL', 'Model'),\r\n options: {\r\n filter: true\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'version',\r\n label: translatorService.Tranlate('VALUATION_CAR_FILE_VERSION', 'Versiune'),\r\n options: {\r\n filter: true\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'equipmentVersion',\r\n label: translatorService.Tranlate('VALUATION_CAR_FILE_EQUIPMENT', 'Echipare'),\r\n options: {\r\n filter: true\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'fabricationDate',\r\n label: translatorService.Tranlate(\r\n 'VALUATION_CAR_FILE_DATE_OF_FABRICATION',\r\n 'Data fabricatiei'\r\n ),\r\n options: {\r\n filter: true,\r\n customBodyRender: (value: string) => {\r\n return value ? moment(value).format(dateFormat || 'DD/MM/YYYY') : '-';\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'registrationDate',\r\n label: translatorService.Tranlate(\r\n 'VALUATION_CAR_FILE_DATE_OF_REGISTRATION',\r\n 'Data primei inmatriculari'\r\n ),\r\n options: {\r\n filter: true,\r\n customBodyRender: (value: string) => {\r\n return value ? moment(value).format(dateFormat || 'DD/MM/YYYY') : '-';\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'dateCreation',\r\n label: translatorService.Tranlate(\r\n 'VALUATION_CAR_FILE_DATE_OF_EVALUATION',\r\n 'Data evaluarii'\r\n ),\r\n options: {\r\n filter: true,\r\n customBodyRender: (value: string) => {\r\n return value ? moment(value).format(dateFormat || 'DD/MM/YYYY') : '-';\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'numberOfKilometers',\r\n label: translatorService.Tranlate('VALUATION_CAR_FILE_KILOMETERS', 'Kilometri'),\r\n options: {\r\n filter: true\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'vehicleSourceId',\r\n label: translatorService.Tranlate('VALUATION_CAR_FILE_CAR_ID', 'Id autovehicul'),\r\n options: {\r\n filter: false,\r\n sort: false\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'vin',\r\n label: translatorService.Tranlate('VALUATION_CAR_FILE_CAR_VIN', 'VIN'),\r\n options: {\r\n filter: false,\r\n sort: false\r\n } as MUIDataTableColumnOptions\r\n }\r\n ];\r\n };\r\n\r\n const getHistoryOptions = () => {\r\n return {\r\n selectableRows: 'none' as SelectableRows,\r\n download: false,\r\n print: false,\r\n viewColumns: false,\r\n rowsPerPage: 10,\r\n rowsPerPageOptions: [5, 10, 20],\r\n textLabels: MUITranslations.GetTranslations(translatorService),\r\n elevation: 1,\r\n\r\n onRowClick: (rowData: string[]) => {\r\n history.push(`/valuation/file/${rowData[0]}`);\r\n }\r\n };\r\n };\r\n return (\r\n \r\n {isLoading ? (\r\n \r\n ) : (\r\n <>\r\n \r\n \r\n Istoric evaluari\r\n \r\n {\r\n goToNewEvaluation();\r\n }}\r\n >\r\n {translatorService.Tranlate('VALUATION_CAR_FILE_NEW_EVALUATION', 'Evaluare noua')}\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nexport default EvaluationHistory;\r\n","import * as React from 'react';\r\nimport {\r\n ApplicationState,\r\n AppState,\r\n CaseSettingsState\r\n} from '../../store';\r\nimport { ApplicationContext, AppContext } from '../../context/Contexts';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport { Button, Card, Grid } from '@material-ui/core';\r\nimport moment from 'moment';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { MuiPickersUtilsProvider, DatePicker } from '@material-ui/pickers';\r\nimport MomentUtils from '@date-io/moment';\r\nimport { MaterialUiPickersDate } from '@material-ui/pickers/typings/date';\r\nimport { ValidatorForm } from 'react-material-ui-form-validator';\r\nimport { GTWSBillingFilters } from '../../interfaces/Case';\r\nimport FileSaver from 'file-saver';\r\nimport { LanguageCode, RoleClaimsEnum } from '../../helpers/Constants';\r\nimport { ScaleLoader } from 'react-spinners';\r\n\r\ntype GTWSBillingProps = {\r\n appState: AppState;\r\n caseSettingsState: CaseSettingsState;\r\n} & ProviderContext &\r\n RouteComponentProps;\r\n\r\ninterface IGTWSBillingState {\r\n isLoading: boolean;\r\n filterStartDate: Date | null;\r\n filterEndDate: Date | null;\r\n isGtm: boolean;\r\n startDateError: string;\r\n endDateError: string;\r\n}\r\n\r\nclass LocalizedUtils extends MomentUtils {\r\n // dateFormat = \"DD MM YYYY\";\r\n}\r\n\r\nclass GTWSBilling extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private caseService!: ICaseService;\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n isLoading: false,\r\n filterStartDate: null,\r\n filterEndDate: null,\r\n startDateError: '',\r\n endDateError: ''\r\n } as IGTWSBillingState;\r\n\r\n public async componentDidMount() {\r\n this.setState({\r\n isLoading: false\r\n });\r\n }\r\n\r\n public hasRight = (right: string): boolean => {\r\n return this.props.appState!.user!.profile.role.includes(right);\r\n };\r\n\r\n exportInfo = async () => {\r\n if (this.state.startDateError || this.state.endDateError) {\r\n return;\r\n }\r\n const language =\r\n this.props.appState.language == LanguageCode.RO ? LanguageCode.RO : LanguageCode.EN;\r\n\r\n try {\r\n this.setState({ isLoading: true });\r\n const formatedStartDate = this.state.filterStartDate\r\n ? moment(this.state.filterStartDate).format('DD.MM.YYYY')\r\n : null;\r\n const formatedEndDate = this.state.filterEndDate\r\n ? moment(this.state.filterEndDate).format('DD.MM.YYYY')\r\n : null;\r\n const requestPayload = {\r\n startDate: this.state.filterStartDate\r\n ? new Date(this.state.filterStartDate.setHours(0, 0, 0, 0))\r\n : null,\r\n endDate: this.state.filterEndDate\r\n ? new Date(this.state.filterEndDate.setHours(23, 59, 59, 999))\r\n : null,\r\n isGtm: this.hasRight(RoleClaimsEnum.Admin)\r\n } as GTWSBillingFilters;\r\n\r\n const fileBlob = await this.caseService.GetGTWSBillingReport(requestPayload);\r\n FileSaver.saveAs(\r\n fileBlob,\r\n language == LanguageCode.RO\r\n ? 'Raport GT WS ' + formatedStartDate + '-' + formatedEndDate + '.xlsx'\r\n : 'GT WS Report ' + formatedStartDate + '-' + formatedEndDate + '.xlsx'\r\n );\r\n\r\n this.setState({ isLoading: false });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (err: any) {\r\n this.setState({ isLoading: false });\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n validateDates = (startDate: Date | null, endDate: Date | null): void => {\r\n /*\r\n Validate start date\r\n */\r\n let startDateError = '';\r\n if (!startDate) {\r\n startDateError = this.translatorService.Tranlate(\r\n 'VALIDATORS_REQUIRED',\r\n 'Campul este obligatoriu'\r\n );\r\n } else {\r\n const currentDate = moment().format('YYYY-MM-DD');\r\n if (endDate && startDate > endDate) {\r\n startDateError = this.translatorService.Tranlate(\r\n 'EXPORT_START_DATE_ERROR',\r\n 'De la trebuie sa fie mai mica decat pana la'\r\n );\r\n }\r\n }\r\n\r\n /*\r\n Validate end date\r\n */\r\n\r\n let endDateError = '';\r\n if (!endDate) {\r\n endDateError = this.translatorService.Tranlate(\r\n 'VALIDATORS_REQUIRED',\r\n 'Campul este obligatoriu'\r\n );\r\n }\r\n\r\n this.setState({\r\n startDateError: startDateError,\r\n endDateError: endDateError\r\n });\r\n };\r\n\r\n handlefilterStartDateChange = async (date: MaterialUiPickersDate | null) => {\r\n if (date === null || !date.isValid) {\r\n return;\r\n }\r\n this.setState({\r\n filterStartDate: date === null || !date.isValid ? null : date!.toDate(),\r\n startDateError: ''\r\n });\r\n };\r\n\r\n handlefilterEndDateChange = async (date: MaterialUiPickersDate | null) => {\r\n if (date === null || !date.isValid) {\r\n return;\r\n }\r\n this.setState({\r\n filterEndDate: date === null || !date.isValid ? null : date!.toDate(),\r\n endDateError: ''\r\n });\r\n };\r\n\r\n renderFilters = () => {\r\n return (\r\n {\r\n this.exportInfo();\r\n }}\r\n >\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {\r\n this.validateDates(this.state.filterStartDate, this.state.filterEndDate);\r\n }}\r\n >\r\n {this.translatorService.Tranlate('EXPORT_DATA', 'Export')}\r\n \r\n
\r\n
\r\n \r\n );\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n\r\n return (\r\n \r\n \r\n
{this.renderFilters()}
\r\n
\r\n \r\n
\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app,\r\n caseSettingsState: state.caseSettings\r\n }),\r\n null\r\n)(withSnackbar(GTWSBilling as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport {\r\n Tooltip,\r\n Box,\r\n Button,\r\n IconButton,\r\n Dialog,\r\n DialogTitle,\r\n Grid,\r\n Typography,\r\n DialogContent\r\n} from '@material-ui/core';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport AddCircleTwoToneIcon from '@material-ui/icons/AddCircleTwoTone';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ValidatorForm, TextValidator } from 'react-material-ui-form-validator';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport MUIDataTable, {\r\n SelectableRows,\r\n MUIDataTableMeta,\r\n MUIDataTableColumnOptions\r\n} from 'mui-datatables';\r\nimport { MUITranslations } from '../../../helpers/MUITableTranslations';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport DeleteOutlineTwoToneIcon from '@material-ui/icons/DeleteOutlineTwoTone';\r\nimport { ReferentialCode } from '../../../helpers/Constants';\r\nimport Referentials from '../../../helpers/Referentials.json';\r\nimport { IReferential } from '../../../interfaces/IReferential';\r\nimport moment from 'moment';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport EditOutlinedIcon from '@material-ui/icons/EditOutlined';\r\nimport { CountryBuffer } from '../../../interfaces/Organization';\r\nimport { IOrganizationService } from '../../../services/Interfaces/IOrganizationService';\r\nimport NumberFormat from 'react-number-format';\r\n\r\ninterface ICountryBufferComponentState {\r\n newCountryBuffer: CountryBuffer;\r\n countryBuffers: CountryBuffer[];\r\n isLoading: boolean;\r\n isDialogOpen: boolean;\r\n newCountryBufferId: number | null;\r\n countryList: IReferential[];\r\n}\r\ntype ICountryBufferComponentProps = { appState: AppState } & ProviderContext &\r\n RouteComponentProps<{ id: string; workflowId: string }>;\r\nclass CountryBufferComponent extends React.PureComponent<\r\n ICountryBufferComponentProps,\r\n ICountryBufferComponentState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private organizationService!: IOrganizationService;\r\n private appReferentialService!: IReferentialService;\r\n static contextType = ApplicationContext;\r\n private newCountryBuffer = {\r\n id: 0,\r\n countryId: 0,\r\n country: null,\r\n value: 0\r\n } as CountryBuffer;\r\n\r\n state = {\r\n isLoading: false,\r\n isDialogOpen: false,\r\n newCountryBuffer: this.newCountryBuffer,\r\n countryBuffers: [],\r\n newCountryBufferId: null,\r\n countryList: [] as IReferential[]\r\n } as ICountryBufferComponentState;\r\n\r\n public componentDidMount() {\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadCountryBuffers();\r\n }\r\n );\r\n }\r\n\r\n loadCountryBuffers = async () => {\r\n const countryRef = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.Country\r\n );\r\n const [countryBuffers, countryList] = await Promise.all([\r\n this.organizationService.GetCountryBuffers(),\r\n this.appReferentialService.Get(countryRef!.baseUrl)\r\n ]);\r\n\r\n this.setState({\r\n countryBuffers: countryBuffers,\r\n isLoading: false,\r\n newCountryBuffer: { ...this.newCountryBuffer },\r\n countryList: countryList\r\n });\r\n };\r\n\r\n private handleCountryChange = (newValue: IReferential | null) => {\r\n this.setState({\r\n newCountryBuffer: {\r\n ...this.state.newCountryBuffer,\r\n country: newValue,\r\n countryId: newValue !== null ? newValue!.id : 0\r\n }\r\n });\r\n };\r\n\r\n private handleValueChange = (value: string) => {\r\n this.setState({\r\n newCountryBuffer: {\r\n ...this.state.newCountryBuffer,\r\n value: parseFloat(value)\r\n }\r\n });\r\n };\r\n\r\n public saveCountryBuffer = async () => {\r\n if (this.state.newCountryBufferId === null) {\r\n try {\r\n await this.organizationService.AddCountryBuffer(this.state.newCountryBuffer);\r\n await this.loadCountryBuffers();\r\n this.closeDialog();\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n } else {\r\n try {\r\n await this.organizationService.UpdateCountryBuffer(this.state.newCountryBuffer);\r\n await this.loadCountryBuffers();\r\n this.closeDialog();\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n\r\n NumberFormatCustom = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n },\r\n currentTarget: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n allowNegative={false}\r\n thousandSeparator={false}\r\n decimalScale={2}\r\n />\r\n );\r\n };\r\n\r\n public renderAddForm() {\r\n return (\r\n \r\n \r\n this.handleCountryChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n this.handleValueChange(e.target.value)}\r\n label={this.translatorService.Tranlate(\r\n 'COUNTRY_BUFFER_VALUE_LABEL',\r\n 'Nr. zile'\r\n )}\r\n validators={['required', 'minNumber:0']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n InputProps={{\r\n inputComponent: this.NumberFormatCustom\r\n }}\r\n />\r\n\r\n
\r\n \r\n {this.translatorService.Tranlate('EDIT_ORGANIZATION_CANCEL_BTN', 'Anuleaza')}\r\n \r\n \r\n
\r\n
\r\n );\r\n }\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'country',\r\n label: this.translatorService.Tranlate('ORGANIZATIONS_COUNTRY_HEADER', 'Tara'),\r\n options: {\r\n sort: true,\r\n customSort: (a: IReferential, b: IReferential) => {\r\n debugger;\r\n return a.name!.localeCompare(b.name!);\r\n },\r\n customBodyRender: (value: IReferential) => {\r\n return value ? value.displayName : '';\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'value',\r\n label: this.translatorService.Tranlate(\r\n 'COUNTRY_BUFFER_VALUE_LABEL',\r\n 'Nr. zile'\r\n )\r\n },\r\n {\r\n name: 'dateModification',\r\n label: this.translatorService.Tranlate('USERS_DATE_MODIFICATION_HEADER', 'Data Modificare'),\r\n options: {\r\n filter: false,\r\n sortDirection: 'desc',\r\n customBodyRender: (value: Date) =>\r\n moment.utc(value).local().format(this.props.appState.longDateFormat)\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: '',\r\n options: {\r\n viewColumns: false,\r\n filter: false,\r\n setCellHeaderProps: () => ({ align: 'center' }),\r\n setCellProps: () => ({ align: 'center' }),\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n <>\r\n this.newCountryBufferPopup(tableMeta.rowData[0])}\r\n >\r\n \r\n \r\n this.deleteCountryBuffer(e, tableMeta)}\r\n >\r\n \r\n \r\n \r\n );\r\n }\r\n }\r\n }];\r\n return columns;\r\n };\r\n\r\n deleteCountryBuffer = async (event: any, tableMeta: MUIDataTableMeta) => {\r\n try {\r\n const id = tableMeta.rowData[0];\r\n await this.organizationService.RemoveCountryBuffer(id);\r\n await this.loadCountryBuffers();\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n newCountryBufferPopup = async (countryBufferId: number | null) => {\r\n let newCountryBuffer: CountryBuffer;\r\n if (countryBufferId == null) {\r\n newCountryBuffer = { ...this.state.newCountryBuffer } as CountryBuffer;\r\n } else {\r\n newCountryBuffer = this.state.countryBuffers.find((item) => item.id === countryBufferId)!;\r\n }\r\n this.setState({\r\n isDialogOpen: true,\r\n newCountryBuffer: newCountryBuffer,\r\n newCountryBufferId: countryBufferId\r\n });\r\n };\r\n\r\n closeDialog = async () => {\r\n this.setState(\r\n { \r\n isDialogOpen: false, \r\n newCountryBuffer: this.newCountryBuffer \r\n }\r\n );\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n const options = {\r\n filter: true,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n sort: false,\r\n // responsive: \"stacked\",\r\n customToolbar: () => {\r\n return (\r\n \r\n this.newCountryBufferPopup(null)}\r\n >\r\n \r\n \r\n \r\n );\r\n }\r\n };\r\n return (\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n ) : null}\r\n
\r\n {this.state.isDialogOpen ? (\r\n \r\n \r\n \r\n \r\n \r\n {!this.state.newCountryBufferId ? \r\n this.translatorService.Tranlate(\r\n 'COUNTRY_BUFFER_ADD_MODAL_TITLE',\r\n 'Adauga buffer zile pe tara'\r\n ) : this.translatorService.Tranlate(\r\n 'COUNTRY_BUFFER_UPDATE_MODAL_TITLE',\r\n 'Actualizeaza buffer zile pe tara'\r\n )} \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.renderAddForm()}\r\n ) : null}\r\n
\r\n );\r\n }\r\n}\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app\r\n }),\r\n null\r\n)(withSnackbar(CountryBufferComponent as any));","import * as React from 'react';\r\nimport {\r\n ApplicationState,\r\n AppState,\r\n CaseSettingsState\r\n} from '../../store';\r\nimport { ApplicationContext, AppContext } from '../../context/Contexts';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport { Button, Card, Grid } from '@material-ui/core';\r\nimport moment from 'moment';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { MuiPickersUtilsProvider, DatePicker } from '@material-ui/pickers';\r\nimport MomentUtils from '@date-io/moment';\r\nimport { MaterialUiPickersDate } from '@material-ui/pickers/typings/date';\r\nimport { ValidatorForm } from 'react-material-ui-form-validator';\r\nimport FileSaver from 'file-saver';\r\nimport { LanguageCode } from '../../helpers/Constants';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { NonStockBillingFilters } from '../../interfaces/Case';\r\n\r\ntype NonStockPartBillingProps = {\r\n appState: AppState;\r\n caseSettingsState: CaseSettingsState;\r\n} & ProviderContext &\r\n RouteComponentProps;\r\n\r\ninterface INonStockPartBillingState {\r\n isLoading: boolean;\r\n filterStartDate: Date | null;\r\n filterEndDate: Date | null;\r\n startDateError: string;\r\n endDateError: string;\r\n}\r\n\r\nclass LocalizedUtils extends MomentUtils {\r\n // dateFormat = \"DD MM YYYY\";\r\n}\r\n\r\nclass NonStockPartBilling extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private caseService!: ICaseService;\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n isLoading: false,\r\n filterStartDate: null,\r\n filterEndDate: null,\r\n startDateError: '',\r\n endDateError: ''\r\n } as INonStockPartBillingState;\r\n\r\n public async componentDidMount() {\r\n this.setState({\r\n isLoading: false\r\n });\r\n }\r\n\r\n public hasRight = (right: string): boolean => {\r\n return this.props.appState!.user!.profile.role.includes(right);\r\n };\r\n\r\n exportInfo = async () => {\r\n if (this.state.startDateError || this.state.endDateError) {\r\n return;\r\n }\r\n const language =\r\n this.props.appState.language == LanguageCode.RO ? LanguageCode.RO : LanguageCode.EN;\r\n\r\n try {\r\n this.setState({ isLoading: true });\r\n const formatedStartDate = this.state.filterStartDate\r\n ? moment(this.state.filterStartDate).format('DD.MM.YYYY')\r\n : null;\r\n const formatedEndDate = this.state.filterEndDate\r\n ? moment(this.state.filterEndDate).format('DD.MM.YYYY')\r\n : null;\r\n const requestPayload = {\r\n startDate: this.state.filterStartDate\r\n ? new Date(this.state.filterStartDate.setHours(0, 0, 0, 0))\r\n : null,\r\n endDate: this.state.filterEndDate\r\n ? new Date(this.state.filterEndDate.setHours(23, 59, 59, 999))\r\n : null\r\n } as NonStockBillingFilters;\r\n\r\n const fileBlob = await this.caseService.GetNonStockPartBillingReport(requestPayload);\r\n FileSaver.saveAs(\r\n fileBlob,\r\n language == LanguageCode.RO\r\n ? 'Raport Non Stock Part ' + formatedStartDate + '-' + formatedEndDate + '.xlsx'\r\n : 'Non Stock Part Report ' + formatedStartDate + '-' + formatedEndDate + '.xlsx'\r\n );\r\n\r\n this.setState({ isLoading: false });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (err: any) {\r\n this.setState({ isLoading: false });\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n validateDates = (startDate: Date | null, endDate: Date | null): void => {\r\n /*\r\n Validate start date\r\n */\r\n let startDateError = '';\r\n if (!startDate) {\r\n startDateError = this.translatorService.Tranlate(\r\n 'VALIDATORS_REQUIRED',\r\n 'Campul este obligatoriu'\r\n );\r\n } else {\r\n const currentDate = moment().format('YYYY-MM-DD');\r\n if (endDate && startDate > endDate) {\r\n startDateError = this.translatorService.Tranlate(\r\n 'EXPORT_START_DATE_ERROR',\r\n 'De la trebuie sa fie mai mica decat pana la'\r\n );\r\n }\r\n }\r\n\r\n /*\r\n Validate end date\r\n */\r\n\r\n let endDateError = '';\r\n if (!endDate) {\r\n endDateError = this.translatorService.Tranlate(\r\n 'VALIDATORS_REQUIRED',\r\n 'Campul este obligatoriu'\r\n );\r\n }\r\n\r\n this.setState({\r\n startDateError: startDateError,\r\n endDateError: endDateError\r\n });\r\n };\r\n\r\n handlefilterStartDateChange = async (date: MaterialUiPickersDate | null) => {\r\n if (date === null || !date.isValid) {\r\n return;\r\n }\r\n this.setState({\r\n filterStartDate: date === null || !date.isValid ? null : date!.toDate(),\r\n startDateError: ''\r\n });\r\n };\r\n\r\n handlefilterEndDateChange = async (date: MaterialUiPickersDate | null) => {\r\n if (date === null || !date.isValid) {\r\n return;\r\n }\r\n this.setState({\r\n filterEndDate: date === null || !date.isValid ? null : date!.toDate(),\r\n endDateError: ''\r\n });\r\n };\r\n\r\n renderFilters = () => {\r\n return (\r\n {\r\n this.exportInfo();\r\n }}\r\n >\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {\r\n this.validateDates(this.state.filterStartDate, this.state.filterEndDate);\r\n }}\r\n >\r\n {this.translatorService.Tranlate('EXPORT_DATA', 'Export')}\r\n \r\n
\r\n
\r\n \r\n );\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n\r\n return (\r\n \r\n \r\n
{this.renderFilters()}
\r\n
\r\n \r\n
\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app,\r\n caseSettingsState: state.caseSettings\r\n }),\r\n null\r\n)(withSnackbar(NonStockPartBilling as any));\r\n","import * as React from 'react';\r\nimport { ApplicationState, AppState, CaseSettingsActionCreators, CaseSettingsState, VehicleActionCreators, VehicleState } from '../../store';\r\nimport { ApplicationContext, AppContext } from '../../context/Contexts';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { IReferentialService } from '../../services/Interfaces/IReferentialService';\r\nimport { IAppUserService } from '../../services/Interfaces/IAppUserService';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { IOrderService } from '../../services/Interfaces/IOrderService';\r\nimport {\r\n TariffPercentResponse\r\n} from '../../interfaces/Case';\r\nimport {\r\n Order\r\n} from '../../interfaces/Order';\r\nimport 'moment/locale/en-gb';\r\nimport 'moment/locale/ro';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport { IOrganizationService } from '../../services/Interfaces/IOrganizationService';\r\nimport _ from 'lodash';\r\nimport { IWorkflowService } from '../../services/Interfaces/IWorkflowService';\r\nimport OrderDetails from './OrderDetails';\r\n\r\ntype OrderDetailsPageProps = {\r\n caseSettingsState: CaseSettingsState;\r\n vehicleState: VehicleState;\r\n appState: AppState;\r\n} & typeof CaseSettingsActionCreators &\r\n typeof VehicleActionCreators &\r\n ProviderContext &\r\n RouteComponentProps<{ id: string }>;\r\n\r\ninterface IOrderDetailsPageState {\r\n order: Order | null;\r\n}\r\n\r\nclass OrderDetailsPage extends React.PureComponent {\r\n private orderService!: IOrderService;\r\n private appUserService!: IAppUserService;\r\n private organizationService!: IOrganizationService;\r\n static contextType = ApplicationContext;\r\n \r\n state = {\r\n order: null,\r\n } as IOrderDetailsPageState;\r\n\r\n public componentDidMount = async () =>{\r\n const orderId = Number.parseInt(this.props.match.params.id);\r\n\r\n if (Number.isNaN(orderId)) {\r\n return;\r\n }\r\n\r\n const order = await this.orderService.GetOrderWithVehicle(orderId);\r\n const [users, clients, suppliersInit] = await Promise.all([\r\n this.appUserService.GetUsersInfo(\r\n [order.createdBy]\r\n ),\r\n this.organizationService.GetUserOrganizationsByIds(\r\n [order.clientId]\r\n ),\r\n this.organizationService.GetUserOrganizationsByIds(\r\n [order.supplierId]\r\n ),\r\n ]);\r\n\r\n const supplier = suppliersInit.find((item) => item.id === order.supplierId);\r\n const user = users.find((item) => item.id === order.createdBy);\r\n const client = clients.find((item) => item.id === order.clientId);\r\n\r\n order.createdByUser = user === undefined ? null : user;\r\n order.supplier = supplier === undefined ? null : supplier;\r\n order.client = client === undefined ? null : client;\r\n\r\n this.setState({ order });\r\n }\r\n\r\n public orderChange = (order: Order) => {\r\n this.setState({\r\n order: \r\n {\r\n ...this.state.order!,\r\n amount: order.amount,\r\n amountTVA: order.amountTVA,\r\n amountWithoutTVA: order.amountWithoutTVA,\r\n orderParts: [...order.orderParts!],\r\n orderStatus: order.orderStatus,\r\n orderStatusId: order.orderStatusId\r\n }\r\n });\r\n };\r\n\r\n public render() {\r\n this.orderService = (this.context as AppContext).orderService;\r\n this.appUserService = (this.context as AppContext).appUserService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n\r\n return (\r\n \r\n {this.state.order !== null && (\r\n {console.log('automatePlaceOrderChange')}}\r\n />\r\n )}\r\n \r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => {\r\n return { caseSettingsState: state.caseSettings, vehicleState: state.vehicle, appState: state.app };\r\n },\r\n { ...CaseSettingsActionCreators, ...VehicleActionCreators }\r\n)(withSnackbar(OrderDetailsPage as any));\r\n\r\n","import React, { Fragment, ChangeEvent } from 'react';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { Box, Switch, Card, TextField } from '@material-ui/core';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport { ITranslation, IReferential, IReferentialConfig } from '../../../interfaces/IReferential';\r\nimport Autocomplete, { RenderInputParams } from '@material-ui/lab/Autocomplete';\r\nimport MaterialTable, { Icons, EditComponentProps, Column } from 'material-table';\r\nimport Referentials from '../../../helpers/Referentials.json';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../store';\r\nimport { forwardRef } from 'react';\r\nimport ArrowDownward from '@material-ui/icons/ArrowDownward';\r\nimport Check from '@material-ui/icons/Check';\r\nimport ChevronLeft from '@material-ui/icons/ChevronLeft';\r\nimport ChevronRight from '@material-ui/icons/ChevronRight';\r\nimport Clear from '@material-ui/icons/Clear';\r\nimport DeleteOutline from '@material-ui/icons/DeleteOutline';\r\nimport Edit from '@material-ui/icons/Edit';\r\nimport FilterList from '@material-ui/icons/FilterList';\r\nimport FirstPage from '@material-ui/icons/FirstPage';\r\nimport LastPage from '@material-ui/icons/LastPage';\r\nimport Remove from '@material-ui/icons/Remove';\r\nimport SaveAlt from '@material-ui/icons/SaveAlt';\r\nimport Search from '@material-ui/icons/Search';\r\nimport ViewColumn from '@material-ui/icons/ViewColumn';\r\nimport { Label } from 'reactstrap';\r\nimport moment from 'moment';\r\nimport AddCircleTwoToneIcon from '@material-ui/icons/AddCircleTwoTone';\r\nimport { Language } from '../../../interfaces/Organization';\r\nimport * as R from 'ramda';\r\nimport { MavoLanguageTranslationEnum, ReferentialCode } from '../../../helpers/Constants';\r\n\r\nconst tableIcons = {\r\n Add: forwardRef((props, ref) => ),\r\n Check: forwardRef((props, ref) => ),\r\n Clear: forwardRef((props, ref) => ),\r\n Delete: forwardRef((props, ref) => ),\r\n DetailPanel: forwardRef((props, ref) => ),\r\n Edit: forwardRef((props, ref) => ),\r\n Export: forwardRef((props, ref) => ),\r\n Filter: forwardRef((props, ref) => ),\r\n FirstPage: forwardRef((props, ref) => ),\r\n LastPage: forwardRef((props, ref) => ),\r\n NextPage: forwardRef((props, ref) => ),\r\n PreviousPage: forwardRef((props, ref) => ),\r\n ResetSearch: forwardRef((props, ref) => ),\r\n Search: forwardRef((props, ref) => ),\r\n SortArrow: forwardRef((props, ref) => ),\r\n ThirdStateCheck: forwardRef((props, ref) => ),\r\n ViewColumn: forwardRef((props, ref) => )\r\n} as Icons;\r\n\r\ntype ColorListProps = { appState: AppState } & ProviderContext;\r\n\r\ninterface IColorListState{\r\n dependentReferencials: IReferential[];\r\n referentials: IReferential[];\r\n filteredReferentials: IReferential[];\r\n isLoading: boolean;\r\n selectedReferential: IReferentialConfig | null;\r\n languages: Language[];\r\n}\r\n\r\nclass ColorList extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private appReferentialService!: IReferentialService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n referentials: [],\r\n isLoading: false,\r\n selectedReferential: null,\r\n languages: [] as Language[],\r\n dependentReferencials: [],\r\n filteredReferentials: []\r\n } as IColorListState;\r\n\r\n componentDidMount = () => {\r\n const referential = Referentials.referential.find(x => x.code === ReferentialCode.ColorRCR) as IReferentialConfig;\r\n this.setState({\r\n isLoading: true,\r\n languages: this.activeLanguages().filter((lang) => lang.code === MavoLanguageTranslationEnum.RO),\r\n },\r\n async () => {\r\n this.loadReferentials(referential);\r\n });\r\n };\r\n\r\n loadReferentials = async (value: IReferentialConfig | null) => {\r\n let referentialList: IReferential[] = [];\r\n if (value !== null && value.getUrl !== '') {\r\n try {\r\n referentialList = await this.appReferentialService.GetFromDB(value.getUrl);\r\n\r\n referentialList.forEach((refItem) => {\r\n this.state.languages.forEach((lang) => {\r\n const translation = refItem.translations.find((item) => item.language === lang.code);\r\n if (R.isNil(translation)) {\r\n refItem.translations.push({\r\n id: 0,\r\n name: '',\r\n language: lang.code,\r\n referentialTypeId: refItem.id\r\n } as ITranslation);\r\n }\r\n });\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n\r\n this.setState({\r\n referentials: referentialList,\r\n isLoading: false,\r\n selectedReferential: value!\r\n });\r\n };\r\n\r\n handleIsActiveChange = async (event: ChangeEvent, rowData: any) => {\r\n const id = rowData.id;\r\n const newReferentials = [...this.state.filteredReferentials];\r\n const updatedReferential = newReferentials.find((ref) => ref.id === id);\r\n if (updatedReferential !== undefined) {\r\n updatedReferential.isActive = event.target.checked;\r\n\r\n try {\r\n await this.appReferentialService.Update(\r\n updatedReferential,\r\n this.state.selectedReferential!.updateUrl\r\n );\r\n this.setState({\r\n referentials: newReferentials\r\n });\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n\r\n activeLanguages = () => {\r\n const activeLanguages =\r\n this.props.appState.appUser!.organization!.gtOrganization!.languages!.filter((language) => {\r\n if (language.isActive === true) {\r\n return language;\r\n }\r\n });\r\n activeLanguages.forEach((language) => {\r\n language.displayName =\r\n language.displayName.charAt(0).toUpperCase() + language.displayName.slice(1);\r\n });\r\n return activeLanguages;\r\n };\r\n\r\n handleLocListChange = (event: any, gridProps: any, code: string | null) => {\r\n let newLocList = [] as ITranslation[];\r\n if (gridProps.rowData.translations) {\r\n newLocList = gridProps.rowData.translations.map((loc: any) => {\r\n if (loc.language === code) {\r\n loc.name = event.target.value;\r\n }\r\n return loc;\r\n });\r\n }\r\n\r\n gridProps.onRowDataChange({\r\n ...gridProps.rowData,\r\n translations: newLocList\r\n });\r\n };\r\n\r\n getColumns = () => {\r\n return [\r\n {\r\n field: 'code',\r\n title: this.translatorService.Tranlate('LIST_OF_VALUES_COD_HEADER', 'Cod'),\r\n searchable: true\r\n // initialEditValue: Guid.create().toString()\r\n } as Column,\r\n {\r\n field: 'translations',\r\n title: this.translatorService.Tranlate('LIST_OF_VALUES_HEADER', 'Nume'),\r\n searchable: true,\r\n render: (rowData: any) => {\r\n return rowData.translations.map((val: ITranslation, index: number) => {\r\n const language = this.state.languages.find((language: any) => {\r\n return language.code === val.language;\r\n });\r\n return language ? (\r\n <>\r\n \r\n \r\n ) : null;\r\n });\r\n },\r\n customFilterAndSearch: (value, rowData) => {\r\n let matchFilter = false;\r\n rowData.translations.map((val: any) => {\r\n const findMatch = val.name.toLowerCase().indexOf(value.toLowerCase()) !== -1;\r\n if (findMatch) {\r\n matchFilter = true;\r\n }\r\n });\r\n return matchFilter;\r\n },\r\n editComponent: (props: any) => {\r\n if (!R.isNil(props.value)) {\r\n return props.value.map((val: ITranslation, index: number) => {\r\n const language = this.state.languages.find(\r\n (language: any) => language.code === val.language\r\n );\r\n \r\n return language ? (\r\n <>\r\n this.handleLocListChange(e, props, val.language)}\r\n />\r\n \r\n ) : null;\r\n });\r\n } else {\r\n // Add new translations\r\n const newLocList = [] as ITranslation[];\r\n for (let i = 0; i < this.state.languages!.length; i++) {\r\n const locListItem = {} as ITranslation;\r\n locListItem.language = this.state.languages[i].code;\r\n locListItem.name = '';\r\n newLocList.push(locListItem);\r\n }\r\n \r\n props.onChange(newLocList);\r\n \r\n return null;\r\n }\r\n }\r\n } as Column,\r\n {\r\n field: 'dateModification',\r\n title: this.translatorService.Tranlate('LIST_OF_VALUES_DATE_HEADER', 'Data'),\r\n defaultSort: 'desc',\r\n searchable: true,\r\n render: (rowData: any) => {\r\n return moment\r\n .utc(rowData.dateModification)\r\n .local()\r\n .format(this.props.appState.longDateFormat);\r\n },\r\n editComponent: (props: EditComponentProps) => {\r\n return ;\r\n }\r\n } as Column,\r\n {\r\n field: 'isActive',\r\n title: this.translatorService.Tranlate('LIST_OF_VALUES_ISACTIVE_HEADER', 'Stare'),\r\n render: (rowData: any) => {\r\n return (\r\n this.handleIsActiveChange(e, rowData)}\r\n value={rowData.isActive}\r\n color=\"primary\"\r\n inputProps={{ 'aria-label': 'primary checkbox' }}\r\n />\r\n );\r\n },\r\n\r\n editComponent: (props: EditComponentProps) => {\r\n return (\r\n props.onChange(e.target.checked)}\r\n />\r\n );\r\n }\r\n }\r\n ];\r\n \r\n };\r\n public getLocalization = () => {\r\n return {\r\n header: { actions: '' },\r\n toolbar: {\r\n searchPlaceholder: this.translatorService.Tranlate('SEARCH', 'Cauta'),\r\n searchTooltip: this.translatorService.Tranlate('SEARCH', 'Cauta')\r\n },\r\n body: {\r\n editTooltip: this.translatorService.Tranlate('EDIT', 'Editeaza'),\r\n addTooltip: this.translatorService.Tranlate('Add', 'Adauga'),\r\n emptyDataSourceMessage: this.translatorService.Tranlate(\r\n 'NO_RECORDS_TO_DISPLAY',\r\n 'Nu exista date de afisat'\r\n ),\r\n editRow: {\r\n cancelTooltip: this.translatorService.Tranlate('CANCEL', 'Anuleaza'),\r\n saveTooltip: this.translatorService.Tranlate('SAVE', 'Salveaza')\r\n }\r\n },\r\n pagination: {\r\n labelRowsSelect: this.translatorService.Tranlate('ROWS', 'inregistrari'),\r\n firstTooltip: this.translatorService.Tranlate('FIRST_PAGE', 'Prima pagina'),\r\n previousTooltip: this.translatorService.Tranlate('PREVIOUS_PAGE', 'Pagina precedenta'),\r\n nextTooltip: this.translatorService.Tranlate('NEXT_PAGE', 'Pagina urmatoare'),\r\n lastTooltip: this.translatorService.Tranlate('LAST_PAGE', 'Ultima pagina'),\r\n labelDisplayedRows:\r\n '{from}-{to} ' + this.translatorService.Tranlate('OF', 'din') + ' {count}'\r\n }\r\n };\r\n };\r\n\r\n onRowUpdate = (newData: IReferential, oldData?: IReferential): Promise =>\r\n new Promise(async (resolve, reject) => {\r\n if (!this.validateRef(newData)) {\r\n reject();\r\n return;\r\n }\r\n\r\n if (oldData) {\r\n this.setState((prevState: IColorListState) => {\r\n const newReferentials = !R.isEmpty(this.state.filteredReferentials)\r\n ? [...this.state.filteredReferentials]\r\n : [...this.state.referentials];\r\n newReferentials[newReferentials.indexOf(oldData)] = newData;\r\n\r\n return { ...prevState, referentials: newReferentials };\r\n });\r\n\r\n try {\r\n await this.appReferentialService.Update(\r\n newData,\r\n this.state.selectedReferential!.updateUrl\r\n );\r\n await this.loadReferentials(this.state.selectedReferential);\r\n resolve();\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n }\r\n });\r\n\r\n validateRef = (referential: IReferential): boolean => {\r\n if (referential.code === '' || referential.code === undefined || referential.code === null) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('LIST_OF_VALUES_ERROR_CODE_EMPTY', 'Eroare'),\r\n { variant: 'error' }\r\n );\r\n return false;\r\n }\r\n const referentials = !R.isEmpty(this.state.filteredReferentials)\r\n ? this.state.filteredReferentials\r\n : this.state.referentials;\r\n let resultRef = referentials.find((item) => item.code === referential.code);\r\n if (referential.id !== undefined) {\r\n resultRef = referentials.find(\r\n (item) => item.code === referential.code && item.id !== referential.id\r\n );\r\n }\r\n if (resultRef !== undefined) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('LIST_OF_VALUES_ERROR_CODE_UNIQUE', 'Eroare'),\r\n { variant: 'error' }\r\n );\r\n return false;\r\n }\r\n if (referential.translations === undefined) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('LIST_OF_VALUES_ERROR_NAME', 'Eroare'),\r\n { variant: 'error' }\r\n );\r\n return false;\r\n }\r\n for (const item of referential.translations) {\r\n if (item.name === '' || item.name === undefined || item.name === null) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate('LIST_OF_VALUES_ERROR_NAME', 'Eroare'),\r\n { variant: 'error' }\r\n );\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n };\r\n\r\n onRowAdd = (newData: IReferential): Promise =>\r\n new Promise(async (resolve, reject) => {\r\n if (!this.validateRef(newData)) {\r\n reject();\r\n return;\r\n }\r\n try {\r\n newData.name = newData.translations[0].name;\r\n newData.gtId = this.props.appState.appUser!.gtId!;\r\n await this.appReferentialService.Add(newData, this.state.selectedReferential!.addUrl);\r\n await this.loadReferentials(this.state.selectedReferential);\r\n resolve();\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n reject();\r\n }\r\n });\r\n\r\n public renderTable = () => {\r\n if (this.state.selectedReferential === null) {\r\n return;\r\n }\r\n\r\n return (\r\n this.onRowAdd(newData),\r\n onRowUpdate: (newData: any, oldData?: any) => this.onRowUpdate(newData, oldData)\r\n }}\r\n />\r\n );\r\n };\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n\r\n return (\r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? this.renderTable() : null}\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect((state: ApplicationState) => ({ appState: state.app }))(\r\n withSnackbar(ColorList as any)\r\n);\r\n","import * as React from 'react';\r\nimport { ApplicationState, AppState } from '../../store';\r\nimport { ApplicationContext, AppContext } from '../../context/Contexts';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n Card,\r\n Grid,\r\n Tab,\r\n Tabs,\r\n AppBar,\r\n TextField,\r\n Button,\r\n Checkbox,\r\n FormControlLabel\r\n} from '@material-ui/core';\r\nimport TabPanel from '../_shared/Tabs';\r\nimport MUIDataTable, {\r\n MUIDataTableColumnOptions,\r\n MUIDataTableMeta,\r\n SelectableRows\r\n} from 'mui-datatables';\r\nimport { MUITranslations } from '../../helpers/MUITableTranslations';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport {\r\n Provenance,\r\n MavoOrdersFilters,\r\n MavoOrdersList,\r\n MavoVehicleOrder\r\n} from '../../interfaces/Vehicle';\r\nimport { ValidatorForm } from 'react-material-ui-form-validator';\r\nimport Loader from '../Loader';\r\nimport noop from 'lodash/noop';\r\nimport _ from 'lodash';\r\nimport { MavoVehicleActionCreators } from '../../store/actions/MavoVehicle';\r\nimport { MavoVehicleState } from '../../store/reducers/MavoVehicle';\r\nimport NumberFormat from 'react-number-format';\r\nimport { VehicleAuctionActionCreators } from '../../store/actions/VehicleAuction';\r\nimport OrdersButtons from './OrdersButtons';\r\nimport { MavoVehicleProvenanceType } from '../../helpers/Constants';\r\nimport * as R from 'ramda';\r\nimport {MuiThemeProvider, createMuiTheme } from '@material-ui/core';\r\nimport { IReferential } from '../../interfaces/IReferential';\r\nimport { IOrganizationService } from '../../services/Interfaces/IOrganizationService';\r\nimport { Organization } from '../../interfaces/Organization';\r\n\r\ntype MavoVehiclesUserOrdersProps = {\r\n appState: AppState;\r\n mavoVehicleState: MavoVehicleState\r\n} &\r\n typeof MavoVehicleActionCreators & typeof VehicleAuctionActionCreators &\r\n ProviderContext &\r\n RouteComponentProps;\r\n\r\ninterface IMavoVehiclesUserOrdersState {\r\n ordersList: MavoOrdersList;\r\n selectedOrganizationEntities: Organization[];\r\n organizationsList: Organization[];\r\n provenanceEntities: Provenance[];\r\n selectedProvenanceEntities: Provenance[];\r\n statusEntities: IReferential[];\r\n selectedStatusEntities: IReferential[];\r\n selectedTab: number;\r\n isLoading: boolean;\r\n isLoadingOrders: boolean;\r\n count: number;\r\n page: number;\r\n pageSize: number;\r\n executing: boolean;\r\n selectedOrder: MavoVehicleOrder | null;\r\n}\r\n\r\nclass MavoVehiclesUserOrders extends React.PureComponent {\r\n private cbContext!: AppContext;\r\n static contextType = ApplicationContext;\r\n private organizationService!: IOrganizationService;\r\n\r\n state = {\r\n ordersList: {} as MavoOrdersList,\r\n selectedOrganizationEntities: this.props.appState.appUser?.organization ? [this.props.appState.appUser?.organization] : [],\r\n organizationsList: [],\r\n provenanceEntities: [],\r\n selectedProvenanceEntities: [],\r\n selectedTab: 0,\r\n isLoading: false,\r\n isLoadingOrders: false,\r\n count: 1,\r\n page: 0,\r\n pageSize: 10,\r\n executing: false,\r\n isDialogOpen: false,\r\n isOfferDialogOpen: false,\r\n selectedOrder: null,\r\n statusEntities: [],\r\n selectedStatusEntities: []\r\n } as IMavoVehiclesUserOrdersState;\r\n\r\n public async componentDidMount() {\r\n this.setState({\r\n isLoading: true \r\n });\r\n\r\n const provenanceTypeList = await this.cbContext.vehicleService.GetProvenances();\r\n const dvsProvenance = provenanceTypeList.find(x => x.type === MavoVehicleProvenanceType.DVS);\r\n\r\n const mavoVehiclesOrdersFilters = {\r\n organizationIds: this.state.selectedOrganizationEntities.map((item) => item.id),\r\n provenanceIds: dvsProvenance != null ? [dvsProvenance.id] : [],\r\n statusIds: [],\r\n page: this.state.page + 1,\r\n pageSize: this.state.pageSize,\r\n } as MavoOrdersFilters;\r\n \r\n const [ordersList, orderFilters] = await Promise.all([\r\n this.cbContext.vehicleService.GetMavoOrders(mavoVehiclesOrdersFilters),\r\n await this.cbContext.vehicleService.GetMavoOrdersFilters({\r\n organizationIds: this.state.selectedOrganizationEntities.map((item) => item.id),\r\n provenanceIds: [],\r\n statusIds: []\r\n } as MavoOrdersFilters)\r\n ]);\r\n\r\n const organizationIds = Array.from(\r\n new Set(\r\n ordersList.orders\r\n .map((item) => item.organizationId)\r\n .filter((organizationId): organizationId is number => organizationId !== null)\r\n )\r\n );\r\n const [organizations, organizationsList] = await Promise.all([\r\n this.organizationService.GetUserOrganizationsByIds(organizationIds),\r\n this.organizationService.GetUserOrganizationsByIds(orderFilters.organizationList)\r\n ]);\r\n\r\n ordersList.orders.forEach((order) => {\r\n const organization = organizations.find((item) => item.id === order.organizationId);\r\n order.organization = R.isNil(organization) ? null : organization;\r\n });\r\n\r\n this.setState(\r\n {\r\n ordersList: ordersList,\r\n count: ordersList.total,\r\n page: ordersList.page - 1,\r\n selectedProvenanceEntities: dvsProvenance != null ? [dvsProvenance] : [],\r\n provenanceEntities: orderFilters.provenanceList,\r\n organizationsList: organizationsList,\r\n statusEntities: orderFilters.statusList,\r\n isLoading: false\r\n });\r\n }\r\n\r\n isInternal = (): boolean | null => {\r\n if (this.state.selectedTab === 0) {\r\n return null;\r\n }\r\n if (this.state.selectedTab === 1) {\r\n return false;\r\n }\r\n\r\n return true;\r\n };\r\n\r\n loadOrders = async (page: number, rowsPerPage: number) => {\r\n this.setState({\r\n isLoadingOrders: true,\r\n selectedOrder: null\r\n });\r\n\r\n const mavoVehiclesOrdersFilters = {\r\n provenanceIds: this.state.selectedProvenanceEntities.map((item) => item.id),\r\n organizationIds: this.state.selectedOrganizationEntities.map((item) => item.id),\r\n statusIds: this.state.selectedStatusEntities.map((item) => item.id),\r\n page: page + 1,\r\n pageSize: rowsPerPage\r\n } as MavoOrdersFilters;\r\n\r\n const ordersList = await this.cbContext.vehicleService.GetMavoOrders(mavoVehiclesOrdersFilters);\r\n\r\n const organizationIds = Array.from(\r\n new Set(\r\n ordersList.orders\r\n .map((item) => item.organizationId)\r\n .filter((organizationId): organizationId is number => organizationId !== null)\r\n )\r\n );\r\n const organizations = await this.organizationService.GetUserOrganizationsByIds(organizationIds);\r\n\r\n ordersList.orders.forEach((order) => {\r\n const organization = organizations.find((item) => item.id === order.organizationId);\r\n order.organization = R.isNil(organization) ? null : organization;\r\n });\r\n\r\n this.setState({\r\n ordersList: ordersList,\r\n page: ordersList.page - 1,\r\n pageSize: rowsPerPage,\r\n count: ordersList.total,\r\n isLoadingOrders: false\r\n });\r\n };\r\n\r\n\r\n makeSelectedOrder = (isSelected: boolean, id: number) => {\r\n const orders = _.cloneDeep(this.state.ordersList.orders);\r\n const order = orders.find((item) => item.id === id);\r\n if (order) {\r\n order.isSelected = isSelected;\r\n }\r\n\r\n if (isSelected) {\r\n orders.forEach((item) => {\r\n if (item.id !== id) {\r\n item.isSelected = false;\r\n } \r\n });\r\n }\r\n this.setState({\r\n ordersList: {\r\n ...this.state.ordersList,\r\n orders: orders\r\n },\r\n selectedOrder: isSelected ? (order ? order : null): null\r\n });\r\n }\r\n\r\n getMuiTheme = () => createMuiTheme({\r\n overrides: {\r\n MuiTableCell: {\r\n head: {\r\n paddingLeft: \"2px\",\r\n paddingRight: \"2px\",\r\n paddingTop: \"2px\",\r\n paddingBottom: \"2px\"\r\n },\r\n },\r\n MUIDataTableBodyCell: {\r\n stackedCommon: {\r\n paddingLeft: \"2px\",\r\n paddingRight: \"2px\",\r\n paddingTop: \"0px\",\r\n paddingBottom: \"0px\",\r\n height: \"40px !important\"\r\n }\r\n },\r\n MuiCheckbox: {\r\n root: {\r\n padding: \"0px\", // Adjust the padding to make the checkbox smaller\r\n },\r\n colorSecondary: {\r\n '&.Mui-checked': {\r\n color: \"#3d4977 !important\",\r\n '&:hover': {\r\n backgroundColor: 'rgba(0, 0, 0, 0.03) !important'\r\n },\r\n },\r\n '&:hover': {\r\n backgroundColor: 'rgba(0, 0, 0, 0.03) !important'\r\n }\r\n }\r\n }\r\n } as any\r\n });\r\n\r\n\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'id',\r\n label: ' ',\r\n options: {\r\n sort: false,\r\n customBodyRender: (value: any, tableMeta: MUIDataTableMeta) => {\r\n const row = this.state.ordersList.orders.find((item) => item.id === tableMeta.rowData[0]);\r\n return (\r\n \r\n \r\n
\r\n {\r\n this.makeSelectedOrder(e.target.checked, row!.id);\r\n }}\r\n >\r\n }\r\n label=''\r\n />\r\n
\r\n
\r\n
\r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'mavoVehicle.vin',\r\n label: this.cbContext.translatorService.Tranlate('MAVO_VEHICLES_VEHICLE_VIN_CODE', 'VIN'),\r\n options: {\r\n sort: false\r\n }\r\n },\r\n {\r\n name: 'mavoVehicle.make.displayName',\r\n label: this.cbContext.translatorService.Tranlate('VEHICLES_VEHICLE_MAKE', 'Marca'),\r\n options: {\r\n sort: false\r\n }\r\n },\r\n {\r\n name: 'mavoVehicle.model.displayName',\r\n label: this.cbContext.translatorService.Tranlate('VEHICLES_VEHICLE_MODEL', 'Model'),\r\n options: {\r\n sort: false\r\n }\r\n }, \r\n {\r\n name: 'mavoVehicle.versionItem.displayName',\r\n label: this.cbContext.translatorService.Tranlate('MAVO_VEHICLES_VEHICLE_VERSION', 'Versiune'),\r\n options: {\r\n sort: false\r\n }\r\n }, \r\n {\r\n name: 'mavoVehicle.fuelType.displayName',\r\n label: this.cbContext.translatorService.Tranlate('CAR_DETAILS_FUEL_TYPE', 'Combustibil'),\r\n options: {\r\n sort: false\r\n }\r\n },\r\n {\r\n name: 'mavoVehicle.colorRCR.displayName',\r\n label: this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_VEHICLE_COLOR',\r\n 'Culoare'\r\n ),\r\n options: {\r\n sort: false\r\n }\r\n },\r\n {\r\n name: 'mavoVehicle.fabricationYear',\r\n label: this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLE_FABRICATION_YEAR',\r\n 'An de fabricatie'\r\n ),\r\n options: {\r\n sort: false\r\n }\r\n },\r\n {\r\n name: 'mavoVehicle.kilometersNr',\r\n label: this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_VEHICLE_KM',\r\n 'Km'\r\n ),\r\n options: {\r\n sort: false\r\n }\r\n },\r\n {\r\n name: 'userId',\r\n label: this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLE_ORDER_CLIENT',\r\n 'Client'\r\n ), \r\n options: {\r\n sort: false,\r\n customBodyRender: (value: any, tableMeta: MUIDataTableMeta) => {\r\n const order = this.state.ordersList.orders.find((item) => item.id === tableMeta.rowData[0]);\r\n if (R.isNil(order)) {\r\n return '';\r\n }\r\n\r\n return (\r\n \r\n \r\n {R.isNil(order.organization) ? order.name : order.organization!.name}\r\n \r\n \r\n );\r\n }\r\n }\r\n },\r\n {\r\n name: 'price',\r\n label: this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLE_ORDER_PRICE',\r\n 'Pret'\r\n ),\r\n },\r\n {\r\n name: 'mavoVehicle.currentStatus.status.displayName',\r\n label: this.cbContext.translatorService.Tranlate('MAVO_ORDER_VEHICLE_STATE', 'Stare vehicul'),\r\n options: {\r\n sort: false\r\n }\r\n }, \r\n {\r\n name: 'mavoVehicle.provenance.type',\r\n label: this.cbContext.translatorService.Tranlate(\r\n 'MENU_NOMENCLATURES_TAB_PROVENANCE',\r\n 'Provenienta'\r\n ),\r\n options: {\r\n sort: false\r\n }\r\n }\r\n ];\r\n\r\n return columns;\r\n };\r\n\r\n sortFunction = (a: any, b: any) => {\r\n return a.order - b.order;\r\n };\r\n\r\n onTabChange = (event: any, newValue: number) => {\r\n this.setState(\r\n {\r\n selectedTab: newValue,\r\n page: 0\r\n },\r\n async () => await this.loadOrders(0, this.state.pageSize)\r\n );\r\n };\r\n\r\n\r\n handleProvenanceEntitiesChange = (newValue: any[]) => {\r\n this.setState(\r\n {\r\n selectedProvenanceEntities: newValue\r\n }\r\n );\r\n };\r\n\r\n renderSearchButtons() {\r\n return (\r\n
\r\n
\r\n this.loadOrders(this.state.page, this.state.pageSize)}\r\n >\r\n {this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_VEHICLE_SEARCH',\r\n 'Cautare'\r\n )}\r\n \r\n
\r\n
\r\n this.resetFilters()}\r\n >\r\n {this.cbContext.translatorService.Tranlate(\r\n 'MAVO_VEHICLES_VEHICLE_RESET',\r\n 'Reset'\r\n )}\r\n \r\n
\r\n
\r\n\r\n );\r\n }\r\n\r\n resetFilters = async () => {\r\n this.setState({\r\n selectedProvenanceEntities: []\r\n }, async () => {\r\n await this.loadOrders(this.state.page, this.state.pageSize);\r\n });\r\n };\r\n\r\n NumberFormatCustom = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n },\r\n currentTarget: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n allowNegative={false}\r\n thousandSeparator={false}\r\n decimalScale={2}\r\n />\r\n );\r\n };\r\n \r\n handleOrganizationChange = (newValue: any[]) => {\r\n this.setState(\r\n {\r\n selectedOrganizationEntities: newValue\r\n }\r\n );\r\n };\r\n\r\n renderFilters = () => {\r\n return (\r\n
\r\n \r\n \r\n \r\n \r\n this.handleProvenanceEntitiesChange(newValue)\r\n }\r\n getOptionLabel={(option: Provenance) => option.type || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n \r\n
\r\n );\r\n };\r\n\r\n\r\n tableOptions = () => {\r\n return {\r\n sort: true,\r\n filter: false,\r\n search: false,\r\n viewColumns: false,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.cbContext.translatorService),\r\n elevation: 0,\r\n serverSide: true,\r\n count: this.state.count,\r\n rowsPerPage: this.state.pageSize,\r\n page: this.state.page,\r\n onTableChange: async (action: any, tableState: any) => {\r\n switch (action) {\r\n case 'changePage':\r\n await this.loadOrders(tableState.page, tableState.rowsPerPage);\r\n break;\r\n case 'changeRowsPerPage':\r\n await this.loadOrders(tableState.page, tableState.rowsPerPage);\r\n break;\r\n case 'sort':\r\n break;\r\n default:\r\n }\r\n }\r\n };\r\n };\r\n \r\n\r\n public render() {\r\n this.cbContext = this.context as AppContext;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n\r\n if (this.state.isLoading) {\r\n return ;\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n \r\n
\r\n \r\n {this.renderFilters()}\r\n {this.renderSearchButtons()}\r\n {this.state.isLoadingOrders ? (\r\n \r\n ) : (\r\n \r\n \r\n \r\n )} \r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n}\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app,\r\n mavoVehicleState: state.mavoVehicle\r\n }),\r\n{ ...MavoVehicleActionCreators }\r\n)(withSnackbar(MavoVehiclesUserOrders as any));","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport {\r\n Tooltip,\r\n Box,\r\n Button,\r\n IconButton,\r\n Dialog,\r\n DialogTitle,\r\n Grid,\r\n Typography,\r\n DialogContent\r\n} from '@material-ui/core';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport AddCircleTwoToneIcon from '@material-ui/icons/AddCircleTwoTone';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ValidatorForm, TextValidator } from 'react-material-ui-form-validator';\r\nimport Autocomplete from '@material-ui/lab/Autocomplete';\r\nimport MUIDataTable, {\r\n SelectableRows,\r\n MUIDataTableMeta,\r\n MUIDataTableColumnOptions\r\n} from 'mui-datatables';\r\nimport { MUITranslations } from '../../../helpers/MUITableTranslations';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport DeleteOutlineTwoToneIcon from '@material-ui/icons/DeleteOutlineTwoTone';\r\nimport { ReferentialCode } from '../../../helpers/Constants';\r\nimport Referentials from '../../../helpers/Referentials.json';\r\nimport { IReferential } from '../../../interfaces/IReferential';\r\nimport moment from 'moment';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport EditOutlinedIcon from '@material-ui/icons/EditOutlined';\r\nimport { CountrySupport } from '../../../interfaces/Organization';\r\nimport { IOrganizationService } from '../../../services/Interfaces/IOrganizationService';\r\nimport NumberFormat from 'react-number-format';\r\n\r\ninterface ICountrySupportComponentState {\r\n newCountrySupport: CountrySupport;\r\n countrySupports: CountrySupport[];\r\n isLoading: boolean;\r\n isDialogOpen: boolean;\r\n newCountrySupportId: number | null;\r\n countryList: IReferential[];\r\n}\r\ntype ICountrySupportComponentProps = { appState: AppState } & ProviderContext &\r\n RouteComponentProps<{ id: string; workflowId: string }>;\r\nclass CountrySupportComponent extends React.PureComponent<\r\n ICountrySupportComponentProps,\r\n ICountrySupportComponentState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private organizationService!: IOrganizationService;\r\n private appReferentialService!: IReferentialService;\r\n static contextType = ApplicationContext;\r\n private newCountrySupport = {\r\n id: 0,\r\n countryId: 0,\r\n country: null,\r\n email: ''\r\n } as CountrySupport;\r\n\r\n state = {\r\n isLoading: false,\r\n isDialogOpen: false,\r\n newCountrySupport: this.newCountrySupport,\r\n countrySupports: [],\r\n newCountrySupportId: null,\r\n countryList: [] as IReferential[]\r\n } as ICountrySupportComponentState;\r\n\r\n public componentDidMount() {\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadCountrySupports();\r\n }\r\n );\r\n }\r\n\r\n loadCountrySupports = async () => {\r\n const countryRef = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.Country\r\n );\r\n const [countrySupports, countryList] = await Promise.all([\r\n this.organizationService.GetUserCountrySupports(),\r\n this.appReferentialService.Get(countryRef!.baseUrl)\r\n ]);\r\n\r\n this.setState({\r\n countrySupports: countrySupports,\r\n isLoading: false,\r\n newCountrySupport: { ...this.newCountrySupport },\r\n countryList: countryList\r\n });\r\n };\r\n\r\n private handleCountryChange = (newValue: IReferential | null) => {\r\n this.setState({\r\n newCountrySupport: {\r\n ...this.state.newCountrySupport,\r\n country: newValue,\r\n countryId: newValue !== null ? newValue!.id : 0\r\n }\r\n });\r\n };\r\n\r\n private handleValueChange = (value: string) => {\r\n this.setState({\r\n newCountrySupport: {\r\n ...this.state.newCountrySupport,\r\n email: value\r\n }\r\n });\r\n };\r\n\r\n public saveCountrySupport = async () => {\r\n if (this.state.newCountrySupportId === null) {\r\n if (\r\n this.state.countrySupports.findIndex(\r\n (item) => item.countryId === this.state.newCountrySupport.countryId\r\n ) !== -1\r\n ) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'COUNTRY_SUPPORT_ALREADY_EXIST',\r\n 'Exista deja un email de suport pentru aceasta tara!'\r\n ),\r\n { variant: 'error' }\r\n );\r\n return;\r\n }\r\n try {\r\n await this.organizationService.AddCountrySupport(this.state.newCountrySupport);\r\n await this.loadCountrySupports();\r\n this.closeDialog();\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n } else {\r\n try {\r\n await this.organizationService.UpdateCountrySupport(this.state.newCountrySupport);\r\n await this.loadCountrySupports();\r\n this.closeDialog();\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n\r\n NumberFormatCustom = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n },\r\n currentTarget: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n allowNegative={false}\r\n thousandSeparator={false}\r\n decimalScale={2}\r\n />\r\n );\r\n };\r\n\r\n public renderAddForm() {\r\n return (\r\n \r\n \r\n this.handleCountryChange(newValue)\r\n }\r\n getOptionLabel={(option: IReferential) => option.displayName || ''}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n this.handleValueChange(e.target.value)}\r\n label={this.translatorService.Tranlate(\r\n 'COUNTRY_SUPPORT_EMAIL_LABEL',\r\n 'Email'\r\n )}\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n />\r\n\r\n
\r\n \r\n {this.translatorService.Tranlate('EDIT_ORGANIZATION_CANCEL_BTN', 'Anuleaza')}\r\n \r\n \r\n
\r\n
\r\n );\r\n }\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'country',\r\n label: this.translatorService.Tranlate('ORGANIZATIONS_COUNTRY_HEADER', 'Tara'),\r\n options: {\r\n sort: true,\r\n customSort: (a: IReferential, b: IReferential) => {\r\n debugger;\r\n return a.name!.localeCompare(b.name!);\r\n },\r\n customBodyRender: (value: IReferential) => {\r\n return value ? value.displayName : '';\r\n }\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'email',\r\n label: this.translatorService.Tranlate(\r\n 'COUNTRY_SUPPORT_EMAIL_LABEL',\r\n 'Email'\r\n )\r\n },\r\n {\r\n name: 'dateModification',\r\n label: this.translatorService.Tranlate('USERS_DATE_MODIFICATION_HEADER', 'Data Modificare'),\r\n options: {\r\n filter: false,\r\n sortDirection: 'desc',\r\n customBodyRender: (value: Date) =>\r\n moment.utc(value).local().format(this.props.appState.longDateFormat)\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: '',\r\n options: {\r\n viewColumns: false,\r\n filter: false,\r\n setCellHeaderProps: () => ({ align: 'center' }),\r\n setCellProps: () => ({ align: 'center' }),\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n <>\r\n this.newCountrySupportPopup(tableMeta.rowData[0])}\r\n >\r\n \r\n \r\n this.deleteCountrySupport(e, tableMeta)}\r\n >\r\n \r\n \r\n \r\n );\r\n }\r\n }\r\n }];\r\n return columns;\r\n };\r\n\r\n deleteCountrySupport = async (event: any, tableMeta: MUIDataTableMeta) => {\r\n try {\r\n const id = tableMeta.rowData[0];\r\n await this.organizationService.RemoveCountrySupport(id);\r\n await this.loadCountrySupports();\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n newCountrySupportPopup = async (countrySupportId: number | null) => {\r\n let newCountrySupport: CountrySupport;\r\n if (countrySupportId == null) {\r\n newCountrySupport = { ...this.state.newCountrySupport } as CountrySupport;\r\n } else {\r\n newCountrySupport = this.state.countrySupports.find((item) => item.id === countrySupportId)!;\r\n }\r\n this.setState({\r\n isDialogOpen: true,\r\n newCountrySupport: newCountrySupport,\r\n newCountrySupportId: countrySupportId\r\n });\r\n };\r\n\r\n closeDialog = async () => {\r\n this.setState(\r\n { \r\n isDialogOpen: false, \r\n newCountrySupport: this.newCountrySupport \r\n }\r\n );\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n this.appReferentialService = (this.context as AppContext).referentialService;\r\n const options = {\r\n filter: true,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n sort: false,\r\n // responsive: \"stacked\",\r\n customToolbar: () => {\r\n return (\r\n \r\n this.newCountrySupportPopup(null)}\r\n >\r\n \r\n \r\n \r\n );\r\n }\r\n };\r\n return (\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n ) : null}\r\n
\r\n {this.state.isDialogOpen ? (\r\n \r\n \r\n \r\n \r\n \r\n {!this.state.newCountrySupportId ? \r\n this.translatorService.Tranlate(\r\n 'COUNTRY_SUPPORT_ADD_MODAL_TITLE',\r\n 'Adauga support pe tara'\r\n ) : this.translatorService.Tranlate(\r\n 'COUNTRY_SUPPORT_UPDATE_MODAL_TITLE',\r\n 'Actualizeaza support pe tara'\r\n )} \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.renderAddForm()}\r\n ) : null}\r\n
\r\n );\r\n }\r\n}\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app\r\n }),\r\n null\r\n)(withSnackbar(CountrySupportComponent as any));","import * as React from 'react';\r\nimport { ApplicationState, AppState, CaseSettingsState } from '../../store';\r\nimport { ApplicationContext, AppContext } from '../../context/Contexts';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { Button, Grid, CardContent, Typography} from '@material-ui/core';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport _ from 'lodash';\r\nimport { TextValidator, ValidatorForm } from 'react-material-ui-form-validator';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { Card } from 'reactstrap';\r\nimport { GeneralNotifySupportRequest, NotificationClient } from '../../interfaces/Case';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport { NotifySupportTemplateEnum } from '../../helpers/Constants';\r\nimport DOMPurify from 'dompurify';\r\nimport NumberFormat from 'react-number-format';\r\n\r\ntype GeneralNotificationProps = {\r\n appState: AppState;\r\n caseSettingsState: CaseSettingsState;\r\n } & ProviderContext &\r\n RouteComponentProps;\r\n\r\ninterface IGeneralNotificationState {\r\n isLoading: boolean;\r\n clientData: NotificationClient;\r\n}\r\n\r\nclass GeneralNotification extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private caseService!: ICaseService;\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n isLoading: false,\r\n selectedOrganization: null,\r\n clientData: {\r\n firstName: '',\r\n lastName: '',\r\n companyName: this.props.appState!.appUser!.organization!.name,\r\n companyId: this.props.appState!.appUser!.organizationId,\r\n email: this.props.appState!.appUser!.email,\r\n phoneNumber: '',\r\n comment: '',\r\n caseId: null\r\n } as NotificationClient\r\n } as IGeneralNotificationState;\r\n\r\n public async componentDidMount() {\r\n this.setState(\r\n {\r\n isLoading: false\r\n },\r\n async () => {\r\n await this.loadData();\r\n }\r\n );\r\n }\r\n\r\n loadData = async () => {\r\n this.setState({\r\n isLoading: false\r\n });\r\n }\r\n\r\n onChange =\r\n (fieldName: string) => (e: any) => {\r\n this.setState({\r\n clientData: {\r\n ...this.state.clientData,\r\n [fieldName]: DOMPurify.sanitize(e.target.value)\r\n }\r\n })\r\n };\r\n\r\n notifySupport = async () => {\r\n try {\r\n this.setState({ isLoading: true });\r\n const request = {\r\n template: NotifySupportTemplateEnum.GENERAL_NOTIFY_SUPPORT,\r\n client: this.state.clientData\r\n } as GeneralNotifySupportRequest;\r\n\r\n await this.caseService.SendGeneralNotifySupport(request);\r\n\r\n this.setState({ isLoading: false });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_GENERAL_NOTIFICATION_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n this.props.history.push('/');\r\n\r\n } catch (ex) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n } finally {\r\n this.setState({ isLoading: false });\r\n }\r\n };\r\n\r\n NumberFormatCustom = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n },\r\n currentTarget: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n allowNegative={false}\r\n thousandSeparator={false}\r\n decimalScale={0}\r\n />\r\n );\r\n };\r\n\r\n renderForm = () => {\r\n return (\r\n {\r\n this.notifySupport();\r\n }}\r\n >\r\n
\r\n \r\n \r\n {this.onChange('lastName')(e)}}\r\n fullWidth\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n label={this.translatorService.Tranlate('NOTIFICATION_CLIENT_DATA_FORM_NAME', 'Nume')}\r\n required={true}\r\n />\r\n \r\n \r\n {this.onChange('firstName')(e)}}\r\n fullWidth\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n label={this.translatorService.Tranlate('NOTIFICATION_CLIENT_DATA_FORM_FIRST_NAME', 'Prenume')}\r\n required={true}\r\n />\r\n \r\n \r\n {this.onChange('companyName')(e)}}\r\n fullWidth\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n label={this.translatorService.Tranlate('NOTIFICATION_CLIENT_DATA_FORM_ORGANIZATION_NAME', 'Nume Companie')}\r\n disabled={true}\r\n required={true}\r\n />\r\n \r\n \r\n {this.onChange('email')(e)}}\r\n validators={['isEmail']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_EMAIL', 'E-mail invalid')\r\n ]}\r\n label={this.translatorService.Tranlate('NOTIFICATION_CLIENT_DATA_FORM_EMAIL', 'E-mail')}\r\n disabled={true}\r\n required={true}\r\n />\r\n \r\n \r\n {this.onChange('phoneNumber')(e)}}\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n label={this.translatorService.Tranlate('NOTIFICATION_CLIENT_DATA_FORM_PHONE', 'Telefon')}\r\n required={true}\r\n />\r\n \r\n \r\n {this.onChange('caseId')(e)}}\r\n InputProps={{\r\n inputComponent: this.NumberFormatCustom,\r\n style: { fontWeight: 500 }\r\n }}\r\n label={this.translatorService.Tranlate('NOTIFICATION_CLIENT_DATA_FORM_CASE_ID', 'Id Dosar')}\r\n />\r\n \r\n \r\n this.onChange('comment')(e)}\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n multiline\r\n variant=\"outlined\"\r\n rows={8}\r\n required={true}\r\n />\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n {this.translatorService.Tranlate('GENERAL_NOTIFICATION_SEND', 'Trimite')}\r\n \r\n
\r\n \r\n );\r\n };\r\n\r\n public hasRight = (right: string): boolean => {\r\n return this.props.appState!.user!.profile.role.includes(right);\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n\r\n return (\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n {this.translatorService.Tranlate(\r\n 'GENERAL_NOTIFICATION_TITLE',\r\n 'Notifica Suport'\r\n )}\r\n \r\n
\r\n
\r\n \r\n {this.renderForm()}\r\n \r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app,\r\n caseSettingsState: state.caseSettings\r\n }),\r\n null\r\n)(withSnackbar(GeneralNotification as any));\r\n","import * as React from 'react';\r\nimport {\r\n ApplicationState,\r\n AppState,\r\n CaseSettingsState\r\n} from '../../store';\r\nimport { ApplicationContext, AppContext } from '../../context/Contexts';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { connect } from 'react-redux';\r\nimport { ITranslatorService } from '../../services/Interfaces/ITranslatorService';\r\nimport { ICaseService } from '../../services/Interfaces/ICaseService';\r\nimport { Button, Card, Grid } from '@material-ui/core';\r\nimport moment from 'moment';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { MuiPickersUtilsProvider, DatePicker } from '@material-ui/pickers';\r\nimport MomentUtils from '@date-io/moment';\r\nimport { MaterialUiPickersDate } from '@material-ui/pickers/typings/date';\r\nimport { ValidatorForm } from 'react-material-ui-form-validator';\r\nimport FileSaver from 'file-saver';\r\nimport { LanguageCode } from '../../helpers/Constants';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport { NewBillingReportFilters } from '../../interfaces/Case';\r\n\r\ntype NewBillingReportProps = {\r\n appState: AppState;\r\n caseSettingsState: CaseSettingsState;\r\n} & ProviderContext &\r\n RouteComponentProps;\r\n\r\ninterface INewBillingReportState {\r\n isLoading: boolean;\r\n filterStartDate: Date | null;\r\n filterEndDate: Date | null;\r\n startDateError: string;\r\n endDateError: string;\r\n}\r\n\r\nclass LocalizedUtils extends MomentUtils {\r\n // dateFormat = \"DD MM YYYY\";\r\n}\r\n\r\nclass NewBillingReport extends React.PureComponent {\r\n private translatorService!: ITranslatorService;\r\n private caseService!: ICaseService;\r\n static contextType = ApplicationContext;\r\n\r\n state = {\r\n isLoading: false,\r\n filterStartDate: null,\r\n filterEndDate: null,\r\n startDateError: '',\r\n endDateError: ''\r\n } as INewBillingReportState;\r\n\r\n public async componentDidMount() {\r\n this.setState({\r\n isLoading: false\r\n });\r\n }\r\n\r\n public hasRight = (right: string): boolean => {\r\n return this.props.appState!.user!.profile.role.includes(right);\r\n };\r\n\r\n exportInfo = async () => {\r\n if (this.state.startDateError || this.state.endDateError) {\r\n return;\r\n }\r\n const language =\r\n this.props.appState.language == LanguageCode.RO ? LanguageCode.RO : LanguageCode.EN;\r\n\r\n try {\r\n this.setState({ isLoading: true });\r\n const formatedStartDate = this.state.filterStartDate\r\n ? moment(this.state.filterStartDate).format('DD.MM.YYYY')\r\n : null;\r\n const formatedEndDate = this.state.filterEndDate\r\n ? moment(this.state.filterEndDate).format('DD.MM.YYYY')\r\n : null;\r\n const requestPayload = {\r\n startDate: this.state.filterStartDate\r\n ? new Date(this.state.filterStartDate.setHours(0, 0, 0, 0))\r\n : null,\r\n endDate: this.state.filterEndDate\r\n ? new Date(this.state.filterEndDate.setHours(23, 59, 59, 999))\r\n : null\r\n } as NewBillingReportFilters;\r\n\r\n const fileBlob = await this.caseService.GetNewBillingReport(requestPayload);\r\n FileSaver.saveAs(\r\n fileBlob,\r\n language == LanguageCode.RO\r\n ? 'Raportare facturare ' + formatedStartDate + '-' + formatedEndDate + '.xlsx'\r\n : 'Raportare facturare ' + formatedStartDate + '-' + formatedEndDate + '.xlsx'\r\n );\r\n\r\n this.setState({ isLoading: false });\r\n\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (err: any) {\r\n this.setState({ isLoading: false });\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n validateDates = (startDate: Date | null, endDate: Date | null): void => {\r\n /*\r\n Validate start date\r\n */\r\n let startDateError = '';\r\n if (!startDate) {\r\n startDateError = this.translatorService.Tranlate(\r\n 'VALIDATORS_REQUIRED',\r\n 'Campul este obligatoriu'\r\n );\r\n } else {\r\n const currentDate = moment().format('YYYY-MM-DD');\r\n if (endDate && startDate > endDate) {\r\n startDateError = this.translatorService.Tranlate(\r\n 'EXPORT_START_DATE_ERROR',\r\n 'De la trebuie sa fie mai mica decat pana la'\r\n );\r\n }\r\n }\r\n\r\n /*\r\n Validate end date\r\n */\r\n\r\n let endDateError = '';\r\n if (!endDate) {\r\n endDateError = this.translatorService.Tranlate(\r\n 'VALIDATORS_REQUIRED',\r\n 'Campul este obligatoriu'\r\n );\r\n }\r\n\r\n this.setState({\r\n startDateError: startDateError,\r\n endDateError: endDateError\r\n });\r\n };\r\n\r\n handlefilterStartDateChange = async (date: MaterialUiPickersDate | null) => {\r\n if (date === null || !date.isValid) {\r\n return;\r\n }\r\n this.setState({\r\n filterStartDate: date === null || !date.isValid ? null : date!.toDate(),\r\n startDateError: ''\r\n });\r\n };\r\n\r\n handlefilterEndDateChange = async (date: MaterialUiPickersDate | null) => {\r\n if (date === null || !date.isValid) {\r\n return;\r\n }\r\n this.setState({\r\n filterEndDate: date === null || !date.isValid ? null : date!.toDate(),\r\n endDateError: ''\r\n });\r\n };\r\n\r\n renderFilters = () => {\r\n return (\r\n {\r\n this.exportInfo();\r\n }}\r\n >\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {\r\n this.validateDates(this.state.filterStartDate, this.state.filterEndDate);\r\n }}\r\n >\r\n {this.translatorService.Tranlate('EXPORT_DATA', 'Export')}\r\n \r\n
\r\n
\r\n \r\n );\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.caseService = (this.context as AppContext).caseService;\r\n\r\n return (\r\n \r\n \r\n
{this.renderFilters()}
\r\n
\r\n \r\n
\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app,\r\n caseSettingsState: state.caseSettings\r\n }),\r\n null\r\n)(withSnackbar(NewBillingReport as any));\r\n","import React, { Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppState } from '../../../store';\r\nimport { withSnackbar, ProviderContext } from 'notistack';\r\nimport { ITranslatorService } from '../../../services/Interfaces/ITranslatorService';\r\nimport { ApplicationContext, AppContext } from '../../../context/Contexts';\r\nimport {\r\n Tooltip,\r\n Box,\r\n Button,\r\n IconButton,\r\n Dialog,\r\n DialogTitle,\r\n Grid,\r\n Typography,\r\n DialogContent\r\n} from '@material-ui/core';\r\nimport { ScaleLoader } from 'react-spinners';\r\nimport AddCircleTwoToneIcon from '@material-ui/icons/AddCircleTwoTone';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { ValidatorForm, TextValidator } from 'react-material-ui-form-validator';\r\nimport MUIDataTable, {\r\n SelectableRows,\r\n MUIDataTableMeta,\r\n MUIDataTableColumnOptions\r\n} from 'mui-datatables';\r\nimport { MUITranslations } from '../../../helpers/MUITableTranslations';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport DeleteOutlineTwoToneIcon from '@material-ui/icons/DeleteOutlineTwoTone';\r\nimport moment from 'moment';\r\nimport { IReferentialService } from '../../../services/Interfaces/IReferentialService';\r\nimport EditOutlinedIcon from '@material-ui/icons/EditOutlined';\r\nimport { PowerBiReport } from '../../../interfaces/Organization';\r\nimport { IOrganizationService } from '../../../services/Interfaces/IOrganizationService';\r\nimport NumberFormat from 'react-number-format';\r\n\r\ninterface IPowerBiReportComponentState {\r\n newPowerBiReport: PowerBiReport;\r\n powerBiReports: PowerBiReport[];\r\n isLoading: boolean;\r\n isDialogOpen: boolean;\r\n newPowerBiReportId: number | null;\r\n}\r\ntype IPowerBiReportComponentProps = { appState: AppState } & ProviderContext &\r\n RouteComponentProps<{ id: string; workflowId: string }>;\r\nclass PowerBiReportComponent extends React.PureComponent<\r\n IPowerBiReportComponentProps,\r\n IPowerBiReportComponentState\r\n> {\r\n private translatorService!: ITranslatorService;\r\n private organizationService!: IOrganizationService;\r\n static contextType = ApplicationContext;\r\n private newPowerBiReport = {\r\n id: 0\r\n } as PowerBiReport;\r\n\r\n state = {\r\n isLoading: false,\r\n isDialogOpen: false,\r\n newPowerBiReport: this.newPowerBiReport,\r\n powerBiReports: [],\r\n newPowerBiReportId: null\r\n } as IPowerBiReportComponentState;\r\n\r\n public componentDidMount() {\r\n this.setState(\r\n {\r\n isLoading: true\r\n },\r\n async () => {\r\n await this.loadPowerBiReports();\r\n }\r\n );\r\n }\r\n\r\n loadPowerBiReports = async () => {\r\n const powerBiReports = await this.organizationService.GetUserPowerBiReports();\r\n this.setState({\r\n powerBiReports: powerBiReports,\r\n isLoading: false,\r\n newPowerBiReport: { ...this.newPowerBiReport }\r\n });\r\n };\r\n\r\n private handleCodeChange = (value: string) => {\r\n this.setState({\r\n newPowerBiReport: {\r\n ...this.state.newPowerBiReport,\r\n code: value\r\n }\r\n });\r\n };\r\n\r\n private handleWorkspaceIdChange = (value: string) => {\r\n this.setState({\r\n newPowerBiReport: {\r\n ...this.state.newPowerBiReport,\r\n workspaceId: value\r\n }\r\n });\r\n };\r\n\r\n private handleReportIdChange = (value: string) => {\r\n this.setState({\r\n newPowerBiReport: {\r\n ...this.state.newPowerBiReport,\r\n reportId: value\r\n }\r\n });\r\n };\r\n\r\n public savePowerBiReport = async () => {\r\n if (this.state.newPowerBiReportId === null) {\r\n if (\r\n this.state.powerBiReports.findIndex(\r\n (item) => item.code === this.state.newPowerBiReport.code\r\n ) !== -1\r\n ) {\r\n this.props.enqueueSnackbar(\r\n this.translatorService.Tranlate(\r\n 'POWER_BI_REPORT_ALREADY_EXIST',\r\n 'Exista deja o intrare pentru acest cod!'\r\n ),\r\n { variant: 'error' }\r\n );\r\n return;\r\n }\r\n try {\r\n await this.organizationService.AddPowerBiReport(this.state.newPowerBiReport);\r\n await this.loadPowerBiReports();\r\n this.closeDialog();\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n } else {\r\n try {\r\n await this.organizationService.UpdatePowerBiReport(this.state.newPowerBiReport);\r\n await this.loadPowerBiReports();\r\n this.closeDialog();\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n }\r\n };\r\n\r\n NumberFormatCustom = (props: any) => {\r\n const { inputRef, onChange, ...other } = props;\r\n return (\r\n {\r\n onChange({\r\n target: {\r\n value: values.value\r\n },\r\n currentTarget: {\r\n value: values.value\r\n }\r\n });\r\n }}\r\n allowNegative={false}\r\n thousandSeparator={false}\r\n decimalScale={2}\r\n />\r\n );\r\n };\r\n\r\n public renderAddForm() {\r\n return (\r\n \r\n this.handleCodeChange(e.target.value)}\r\n label={this.translatorService.Tranlate(\r\n 'POWER_BI_REPORT_CODE_LABEL',\r\n 'Cod'\r\n )}\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n />\r\n this.handleWorkspaceIdChange(e.target.value)}\r\n label={this.translatorService.Tranlate(\r\n 'POWER_BI_REPORT_WORKSPACE_ID_LABEL',\r\n 'Workspace Id'\r\n )}\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n />\r\n this.handleReportIdChange(e.target.value)}\r\n label={this.translatorService.Tranlate(\r\n 'POWER_BI_REPORT_REPORT_ID_LABEL',\r\n 'Report Id'\r\n )}\r\n validators={['required']}\r\n errorMessages={[\r\n this.translatorService.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu')\r\n ]}\r\n />\r\n
\r\n \r\n {this.translatorService.Tranlate('EDIT_ORGANIZATION_CANCEL_BTN', 'Anuleaza')}\r\n \r\n \r\n
\r\n
\r\n );\r\n }\r\n getColumns = () => {\r\n const columns = [\r\n {\r\n name: 'id',\r\n options: { display: 'excluded', filter: false } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: 'code',\r\n label: this.translatorService.Tranlate(\r\n 'POWER_BI_REPORT_CODE_LABEL',\r\n 'Code'\r\n )\r\n },\r\n {\r\n name: 'workspaceId',\r\n label: this.translatorService.Tranlate(\r\n 'POWER_BI_REPORT_WORKSPACE_ID_LABEL',\r\n 'Workspace Id'\r\n )\r\n },\r\n {\r\n name: 'reportId',\r\n label: this.translatorService.Tranlate(\r\n 'POWER_BI_REPORT_REPORT_ID_LABEL',\r\n 'Report Id'\r\n )\r\n },\r\n {\r\n name: 'dateModification',\r\n label: this.translatorService.Tranlate('USERS_DATE_MODIFICATION_HEADER', 'Data Modificare'),\r\n options: {\r\n filter: false,\r\n sortDirection: 'desc',\r\n customBodyRender: (value: Date) =>\r\n moment.utc(value).local().format(this.props.appState.longDateFormat)\r\n } as MUIDataTableColumnOptions\r\n },\r\n {\r\n name: '',\r\n options: {\r\n viewColumns: false,\r\n filter: false,\r\n setCellHeaderProps: () => ({ align: 'center' }),\r\n setCellProps: () => ({ align: 'center' }),\r\n customBodyRender: (value: boolean, tableMeta: MUIDataTableMeta) => {\r\n return (\r\n <>\r\n this.newPowerBiReportPopup(tableMeta.rowData[0])}\r\n >\r\n \r\n \r\n this.deletePowerBiReport(e, tableMeta)}\r\n >\r\n \r\n \r\n \r\n );\r\n }\r\n }\r\n }];\r\n return columns;\r\n };\r\n\r\n deletePowerBiReport = async (event: any, tableMeta: MUIDataTableMeta) => {\r\n try {\r\n const id = tableMeta.rowData[0];\r\n await this.organizationService.RemovePowerBiReport(id);\r\n await this.loadPowerBiReports();\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('SUCCES_MSG', 'OK'), {\r\n variant: 'success'\r\n });\r\n } catch (error) {\r\n this.props.enqueueSnackbar(this.translatorService.Tranlate('ERROR_MSG', 'Eroare'), {\r\n variant: 'error'\r\n });\r\n }\r\n };\r\n\r\n newPowerBiReportPopup = async (powerBiReportId: number | null) => {\r\n let newPowerBiReport: PowerBiReport;\r\n if (powerBiReportId == null) {\r\n newPowerBiReport = { ...this.state.newPowerBiReport } as PowerBiReport;\r\n } else {\r\n newPowerBiReport = this.state.powerBiReports.find((item) => item.id === powerBiReportId)!;\r\n }\r\n this.setState({\r\n isDialogOpen: true,\r\n newPowerBiReport: newPowerBiReport,\r\n newPowerBiReportId: powerBiReportId\r\n });\r\n };\r\n\r\n closeDialog = async () => {\r\n this.setState(\r\n { \r\n isDialogOpen: false, \r\n newPowerBiReport: this.newPowerBiReport \r\n }\r\n );\r\n };\r\n\r\n public render() {\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n this.organizationService = (this.context as AppContext).organizationService;\r\n\r\n const options = {\r\n filter: true,\r\n selectableRows: 'none' as SelectableRows,\r\n selectableRowsOnClick: false,\r\n print: false,\r\n download: false,\r\n textLabels: MUITranslations.GetTranslations(this.translatorService),\r\n sort: false,\r\n // responsive: \"stacked\",\r\n customToolbar: () => {\r\n return (\r\n \r\n this.newPowerBiReportPopup(null)}\r\n >\r\n \r\n \r\n \r\n );\r\n }\r\n };\r\n return (\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n {!this.state.isLoading ? (\r\n \r\n ) : null}\r\n
\r\n {this.state.isDialogOpen ? (\r\n \r\n \r\n \r\n \r\n \r\n {!this.state.newPowerBiReportId ? \r\n this.translatorService.Tranlate(\r\n 'POWER_BI_REPORT_ADD_MODAL_TITLE',\r\n 'Adauga raport Power BI'\r\n ) : this.translatorService.Tranlate(\r\n 'POWER_BI_REPORT_UPDATE_MODAL_TITLE',\r\n 'Actualizeaza raport Power BI'\r\n )} \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.renderAddForm()}\r\n ) : null}\r\n
\r\n );\r\n }\r\n}\r\nexport default connect(\r\n (state: ApplicationState) => ({\r\n appState: state.app\r\n }),\r\n null\r\n)(withSnackbar(PowerBiReportComponent as any));","import React, { useState, useContext, useEffect, useRef } from 'react';\r\nimport { ApplicationContext, AppContext } from '../../context/Contexts';\r\nimport { Card, CardContent, Typography } from '@material-ui/core';\r\nimport { withSnackbar } from 'notistack';\r\nimport { PowerBIEmbed } from 'powerbi-client-react';\r\nimport { models } from 'powerbi-client';\r\nimport { EmbedTokenResponse } from '../../interfaces/PowerBi';\r\nimport { useParams } from 'react-router';\r\n\r\nconst PowerBiReport = () => {\r\n const { reportCode } = useParams<{ reportCode: string }>();\r\n const [embedToken, setEmbedToken] = useState(null);\r\n const [activity, setActivity] = useState(true);\r\n const [showTransparentScreen, setShowTransparentScreen] = useState(false);\r\n const [waitingForCapacity, setWaitingForCapacity] = useState(false);\r\n const context = useContext(ApplicationContext) as AppContext;\r\n const { translatorService, powerBiService } = context;\r\n // References to report objects\r\n const reportObjRef = useRef(null);\r\n const timeToUpdate = 60000; // 1 minute before expiration\r\n\r\n useEffect(() => {\r\n getReportEmbedToken();\r\n }, []);\r\n\r\n useEffect(() => {\r\n document.addEventListener('click', activityDetected);\r\n document.addEventListener('keyup', activityDetected);\r\n return () => {\r\n document.removeEventListener('click', activityDetected);\r\n document.removeEventListener('keyup', activityDetected);\r\n };\r\n }, []);\r\n\r\n useEffect(() => {\r\n const interval = setInterval(async () => {\r\n await refreshTokenIfNeeded();\r\n }, timeToUpdate);\r\n return () => clearInterval(interval);\r\n }, [embedToken, activity]);\r\n\r\n const getReportEmbedToken = async () => {\r\n if (!reportObjRef.current) {\r\n return;\r\n }\r\n try {\r\n const response = await powerBiService.GetEmbedToken(\r\n reportCode,\r\n activity\r\n );\r\n if (reportObjRef.current) {\r\n console.log('Set new access token for report');\r\n reportObjRef.current.setAccessToken(response.token);\r\n }\r\n console.log('Embed token:', response);\r\n setEmbedToken(response);\r\n setActivity(false);\r\n } catch (error) {\r\n console.error('Error fetching embed token, retrying...', error);\r\n await getReportEmbedToken();\r\n }\r\n };\r\n\r\n const refreshTokenIfNeeded = async () => {\r\n if (!reportObjRef.current || !embedToken) {\r\n return;\r\n }\r\n const now = Date.now();\r\n const expiration = Date.parse(embedToken.expiration);\r\n const timeUntilExpiration = expiration - now;\r\n if (timeUntilExpiration < timeToUpdate) {\r\n await getReportEmbedToken();\r\n }\r\n console.log('Has activity:', activity);\r\n if (!activity) {\r\n setShowTransparentScreen(true);\r\n }\r\n };\r\n\r\n const startCapacity = async () => {\r\n setWaitingForCapacity(true);\r\n try {\r\n await powerBiService.StartCapacity();\r\n setWaitingForCapacity(false);\r\n setShowTransparentScreen(false);\r\n } catch (error) {\r\n await startCapacity();\r\n }\r\n };\r\n\r\n const clickOnTransparentScreen = async () => {\r\n setWaitingForCapacity(true);\r\n const capacityStatus = await powerBiService.GetCapacityStatus();\r\n if (capacityStatus !== \"Active\") {\r\n await startCapacity();\r\n } else {\r\n setWaitingForCapacity(false);\r\n setShowTransparentScreen(false);\r\n }\r\n };\r\n\r\n const activityDetected = () => {\r\n console.log('Activity detected');\r\n setActivity(true);\r\n };\r\n \r\n return (\r\n \r\n
\r\n
\r\n \r\n {translatorService.Tranlate('EMBED_POWER_BI_ORDERS_TITLE', 'Embed Power Bi Report')}\r\n \r\n
\r\n
\r\n \r\n { console.log('Report loaded'); }],\r\n ['rendered', () => { console.log('Report rendered'); }],\r\n ['error', (event: any) => { console.log(event.detail); }],\r\n ['visualClicked', () => { console.log('Visual clicked'); activityDetected(); }],\r\n ['buttonClicked', () => { console.log('Button clicked'); activityDetected(); }],\r\n ['commandTriggered', () => { console.log('Command triggered'); activityDetected(); }],\r\n ['dataSelected', () => { console.log('Data selected'); activityDetected(); }],\r\n ['dataHyperlinkClicked', () => { console.log('Data hyperlink clicked'); activityDetected(); }],\r\n ['pageChanged', () => { console.log('Page changed'); activityDetected(); }],\r\n ['selectionChanged', () => { console.log('Selection changed'); activityDetected(); }],\r\n ])\r\n }\r\n cssClassName={\"reportClass\"}\r\n getEmbeddedComponent={(embeddedReport) => {\r\n console.log('Report Embedded', embeddedReport);\r\n reportObjRef.current = embeddedReport;\r\n }}\r\n />\r\n {showTransparentScreen && (\r\n \r\n \r\n )}\r\n \r\n
\r\n );\r\n};\r\nexport default withSnackbar(PowerBiReport);","import * as React from 'react';\r\nimport { Route, Switch } from 'react-router';\r\nimport Home from './components/Home';\r\nimport Login from './components/auth/LogIn';\r\nimport LoginCallBack from './components/auth/LogInCallBack';\r\nimport RenewCallBack from './components/auth/RenewCallBack';\r\nimport AppUser from './components/admin/users/AppUsers';\r\nimport UserDetails from './components/admin/users/UserDetails';\r\nimport EditRole from './components/admin/users/EditRole';\r\nimport AppReferentials from './components/admin/listOfValues/AppReferentials';\r\nimport OtherListsOfValues from './components/admin/otherLists/OtherListsOfValues';\r\n\r\nimport moment from 'moment';\r\nimport 'moment/locale/cs';\r\nimport 'moment/locale/nl';\r\nimport 'moment/locale/ro';\r\nimport 'moment/locale/pl';\r\nimport 'moment/locale/sk';\r\n\r\nimport { IAuthService } from './services/Interfaces/IAuthService';\r\nimport { ApplicationContext, AppContext } from './context/Contexts';\r\nimport { History } from 'history';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState, AppActionCreators, AppState } from './store';\r\nimport MuiTheme from './theme';\r\nimport { ThemeProvider, Snackbar } from '@material-ui/core';\r\nimport { LeftSidebar } from './layout-blueprints/index';\r\nimport { RoleClaimsEnum } from './helpers/Constants';\r\nimport './custom.css';\r\nimport UserProfile from './components/userProfile/userProfile';\r\nimport { ITranslatorService } from './services/Interfaces/ITranslatorService';\r\nimport OrganizationAdmin from './components/admin/organizations/OrganizationAdmin';\r\nimport HOOrganizations from './components/admin/organizations/HOOrganizations';\r\nimport EditOrganization from './components/admin/organizations/EditOrganization';\r\nimport GtXML from './components/admin/xmlDocument/GtXML';\r\nimport NewCase from './components/newCase/NewCase';\r\nimport WorkflowAdmin from './components/admin/workflows/WorkflowAdmin';\r\nimport Cases from './components/cases/Cases';\r\nimport CaseDetails from './components/cases/CaseDetails';\r\nimport Dashboards from './components/dashboards/Dashboards';\r\nimport Orders from './components/orders/Orders';\r\nimport Vehicles from './components/vehicles/Vehicles';\r\nimport DetailsOfCarForm from './components/vehicles/DetailsOfCarForm';\r\nimport CertificateOfControlForm from './components/vehicles/CertificateOfControl';\r\nimport UserOrganizationInterfaces from './components/settings/UserOrganizationInterfaces';\r\nimport VehiclesHistory from './components/vehicles/VehiclesHistory';\r\nimport CarClassRentalPrice from './components/admin/car-class-rent-price/CarClassRentalPrice';\r\nimport Billing from './components/billing/Billing';\r\nimport DgpciBilling from './components/billing/DgpciBilling';\r\nimport OrderPartsHistory from './components/order-parts-history/OrderPartsHistory';\r\nimport MakeList from './components/nomenclature/make/MakeList';\r\nimport ModelList from './components/nomenclature/model/ModelList';\r\nimport FuelTypeList from './components/nomenclature/fuelType/FuelTypeList';\r\nimport VersionList from './components/nomenclature/version/VersionList';\r\nimport BodyTypeList from './components/nomenclature/bodyType/BodyTypeList';\r\nimport BodyConditionTypeList from './components/nomenclature/bodyConditionType/BodyConditionTypeList';\r\nimport WheelConditionTypeList from './components/nomenclature/wheelConditionType/WheelConditionTypeList';\r\nimport InvoiceRangeList from './components/nomenclature/invoiceRange/InvoiceRangeList';\r\nimport ProvenanceList from './components/nomenclature/provenance/ProvenanceList';\r\nimport ExchangeRateList from './components/nomenclature/exchangeRateList/ExchangeRateList';\r\nimport AlcorErrorLogList from './components/nomenclature/alcorErrorLog/AlcorErrorLogList';\r\nimport FinancialParameterInfoList from './components/nomenclature/financialParameterInfo/FinancialParameterInfoList';\r\nimport SellerDataList from './components/nomenclature/sellerData/SellerDataList';\r\nimport MavoVehicles from './components/mavo-vehicles/MavoVehicles';\r\nimport MavoVehicleDetailsForm from './components/mavo-vehicles/MavoVehicleDetailsForm';\r\nimport MavoVehicleStockDetailsForm from './components/mavo-vehicles/MavoVehicleStockDetailsForm';\r\nimport MavoVehiclesAuctions from './components/mavo-vehicles/MavoVehiclesAuctions';\r\nimport MavoVehicleDetailsViewForm from './components/mavo-vehicles/MavoVehicleDetailsViewForm';\r\nimport MavoVehiclesUserAuctions from './components/mavo-vehicles/MavoVehiclesUserAuctions';\r\nimport MavoVehiclesAdminAuctions from './components/mavo-vehicles/MavoVehiclesAdminAuctions';\r\nimport MavoVehiclesOrders from './components/mavo-vehicles/MavoVehiclesOrders';\r\nimport PoEditor from './components/admin/poeditor/PoEditor';\r\nimport MaintenanceCupiOptionalPartComponent from './components/admin/maintenance-cupi-optional-part/MaintenanceCupiOptionalPartComponent';\r\nimport VoInvoiceHistory from './components/mavo-vehicles/VoInvoiceHistory';\r\nimport MavoAppUsers from './components/admin/users/MavoAppUsers';\r\nimport MavoUserDetails from './components/admin/users/MavoUserDetails';\r\nimport AlcorParameterInfoList from './components/nomenclature/alcorParameterInfo/AlcorParameterInfoList';\r\nimport UserManual from './components/user-manual/UserManual';\r\nimport MavoHOOrganizations from './components/admin/organizations/MavoHOOrganizations';\r\nimport MavoOrganizationAdmin from './components/admin/organizations/MavoOrganizationAdmin';\r\nimport ModelCarClass from './components/admin/model-car-class/ModelCarClass';\r\nimport AgendaPage from './components/agenda/AgendaPage';\r\nimport AppointmentPage from './components/appointment/AppointmentPage';\r\nimport AddNewAppointmentPage from './components/appointment/AddNewAppointmentPage';\r\nimport MaintenanceProducerComponent from './components/admin/maintenance-producer/MaintenanceProducerComponent';\r\nimport EvaluationPage from './components/evaluation/EvaluationPage';\r\nimport EvaluationCarFile from './components/evaluation/EvaluationCarFile';\r\nimport EvaluationHistory from './components/evaluation/EvaluationHistory';\r\nimport GTWSBilling from './components/billing/GTWSBilling';\r\nimport CountryBufferComponent from './components/admin/country-buffer/CountryBufferComponent';\r\nimport { ProviderContext, withSnackbar } from 'notistack';\r\nimport NonStockPartBilling from './components/billing/NonStockPartBilling';\r\nimport OrderDetailsPage from './components/orders/OrderDetailsPage';\r\nimport ColorList from './components/nomenclature/color/ColorList';\r\nimport MavoVehiclesUserOrders from './components/mavo-vehicles/MavoVehiclesUserOrders';\r\nimport CountrySupportComponent from './components/admin/country-support/CountrySupportComponent';\r\nimport GeneralNotification from './components/general-notification/GeneralNotification';\r\nimport NewBillingReport from './components/billing/NewBillingReport';\r\nimport PowerBiReportComponent from './components/admin/power-bi-report/PowerBiReportComponent';\r\nimport PowerBiReport from './components/powerBi/PowerBiReport';\r\n\r\ntype AppProps = AppState & typeof AppActionCreators & History & ProviderContext;\r\n\r\nclass App extends React.PureComponent {\r\n private authService!: IAuthService;\r\n private translatorService!: ITranslatorService;\r\n\r\n static contextType = ApplicationContext;\r\n\r\n public async componentDidMount() {\r\n this.authService = (this.context as AppContext).authenticationService;\r\n this.translatorService = (this.context as AppContext).translatorService;\r\n\r\n if (\r\n this.props.location!.pathname === '/callback' ||\r\n this.props.location!.pathname === '/renewcallback'\r\n ) {\r\n return;\r\n }\r\n\r\n await this.authService.checkState();\r\n this.translatorService.LoadLanguage();\r\n await this.props.SetUser(this.props.enqueueSnackbar);\r\n await this.props.LoadCurrencyRates();\r\n\r\n this.updateMomentLanguage();\r\n }\r\n\r\n public componentDidUpdate(prevProps: any) {\r\n if (prevProps.language !== this.props.language) {\r\n this.updateMomentLanguage();\r\n }\r\n }\r\n\r\n public updateMomentLanguage = () => {\r\n const language = this.props.language;\r\n const languageList: any = { ro: 'ro', cz: 'cs', pl: 'pl', nl: 'nl', en: 'en', sk: 'sk'};\r\n\r\n \r\n moment.locale(language ? languageList[language] : 'ro');\r\n moment.updateLocale(language ? languageList[language] : 'ro', { week: { dow: 1, doy: 4 } });\r\n\r\n };\r\n\r\n private handleCloseMessage = (event?: React.SyntheticEvent, reason?: string) => {\r\n if (reason === 'clickaway') {\r\n return;\r\n }\r\n\r\n this.props.Message(false);\r\n };\r\n\r\n public hasRight = (right: string): boolean => {\r\n return this.props.user!.profile.role.includes(right);\r\n };\r\n\r\n public renderUserRoutes = () => {\r\n if (this.props.user === null) {\r\n return;\r\n }\r\n\r\n return (\r\n \r\n {this.hasRight(RoleClaimsEnum.Home) ? : null}\r\n {this.hasRight(RoleClaimsEnum.NewCase) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.Agenda) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.Case) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.Case) ? (\r\n \r\n ) : null}\r\n {/* { this.hasRight(RoleClaimsEnum.Case) ? : null } */}\r\n {this.hasRight(RoleClaimsEnum.Case) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.Case) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.Case) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.Dashboard) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.Evaluation) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.Evaluation) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.Case) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.Order) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.Order) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.Vehicle) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.Agenda) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.Agenda) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.Agenda) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.Vehicle) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.Vehicle) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.Vehicle) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.Vehicle) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.Settings) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.AdminUsers) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.MavoAdministrator) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.AdminUsers) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.MavoAdministrator) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.AdminUsers) ||\r\n this.hasRight(RoleClaimsEnum.MavoAdministrator) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.AdminUsers) ||\r\n this.hasRight(RoleClaimsEnum.MavoAdministrator) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.AdminValueList) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.AdminValueList) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.AdminOrganization) ||\r\n this.hasRight(RoleClaimsEnum.AdminCountryOrganization) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.AdminOrganization) ||\r\n this.hasRight(RoleClaimsEnum.AdminCountryOrganization) ||\r\n this.hasRight(RoleClaimsEnum.AdminService) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.AdminOrganization) ||\r\n this.hasRight(RoleClaimsEnum.AdminCountryOrganization) ||\r\n this.hasRight(RoleClaimsEnum.AdminService) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.AdminOrganization) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.AdminUsers) ||\r\n this.hasRight(RoleClaimsEnum.MavoAdministrator) ||\r\n this.hasRight(RoleClaimsEnum.AdminCountryOrganization) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.AdminOrganization) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.AdminValueList) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.AdminValueList) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.ManagerExport) || this.hasRight(RoleClaimsEnum.Admin) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.Admin) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.Admin) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.Admin) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.AdminValueList) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.AdminValueList) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.AdminValueList) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.AdminValueList) ? (\r\n \r\n ): null}\r\n \r\n\r\n {this.hasRight(RoleClaimsEnum.MavoAdministrator) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.MavoAdministrator) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.MavoAdministrator) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.MavoAdministrator) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.MavoAdministrator) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.MavoAdministrator) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.MavoAdministrator) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.MavoAdministrator) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.MavoAdministrator) ||\r\n this.hasRight(RoleClaimsEnum.MavoContab) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.MavoAdministrator) ||\r\n this.hasRight(RoleClaimsEnum.MavoContab) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.MavoAdministrator) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.MavoAdministrator) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.MavoAdministrator) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.MavoVehicle) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.MavoVehicle) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.MavoAgent) || this.hasRight(RoleClaimsEnum.MavoAdministrator) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.MavoAgent) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.MavoAdministrator) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.MavoAdministrator) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.MavoAgent) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.MavoAgent) ||\r\n this.hasRight(RoleClaimsEnum.MavoContab) ||\r\n this.hasRight(RoleClaimsEnum.MavoAdministrator) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.MavoAdministrator) ? (\r\n \r\n ) : null}\r\n\r\n {this.hasRight(RoleClaimsEnum.MavoAdministrator) ? (\r\n \r\n ) : null}\r\n \r\n {this.hasRight(RoleClaimsEnum.Order) ? (\r\n \r\n ) : null}\r\n \r\n {this.hasRight(RoleClaimsEnum.Admin) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.AdminValueList) ? (\r\n \r\n ) : null}\r\n {this.hasRight(RoleClaimsEnum.PowerBi) ? (\r\n \r\n ) : null}\r\n \r\n );\r\n };\r\n\r\n public render() {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.renderUserRoutes()}\r\n {/* */}\r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nexport default connect((state: ApplicationState) => state.app, AppActionCreators)(withSnackbar(App as any));\r\n","import { useEffect } from 'react';\r\nimport { withRouter } from 'react-router-dom';\r\n\r\nconst ScrollToTop = ({ children, location: { pathname } }) => {\r\n useEffect(() => {\r\n window.scrollTo({\r\n top: 0,\r\n left: 0,\r\n behavior: 'smooth'\r\n });\r\n }, [pathname]);\r\n\r\n return children || null;\r\n};\r\n\r\nexport default withRouter(ScrollToTop);\r\n","import 'bootstrap/dist/css/bootstrap.css';\r\n\r\nimport * as React from 'react';\r\nimport * as ReactDOM from 'react-dom';\r\nimport { Provider } from 'react-redux';\r\nimport { ConnectedRouter } from 'connected-react-router';\r\nimport { createBrowserHistory } from 'history';\r\nimport configureStore from './store/configureStore';\r\nimport App from './App';\r\nimport registerServiceWorker, { unregister } from './registerServiceWorker';\r\nimport { ApplicationContext, AppContext } from './context/Contexts';\r\nimport { CssBaseline } from '@material-ui/core';\r\nimport ScrollToTop from './utils/ScrollToTop';\r\nimport './assets/base.scss';\r\nimport 'react-big-calendar/lib/css/react-big-calendar.css'\r\n\r\nimport { library } from '@fortawesome/fontawesome-svg-core';\r\nimport {\r\n fab,\r\n faFacebook,\r\n faTwitter,\r\n faVuejs,\r\n faReact,\r\n faHtml5,\r\n faGoogle,\r\n faInstagram,\r\n faPinterest,\r\n faYoutube,\r\n faDiscord\r\n} from '@fortawesome/free-brands-svg-icons';\r\nimport {\r\n far,\r\n faSquare,\r\n faLifeRing,\r\n faCheckCircle,\r\n faTimesCircle,\r\n faDotCircle,\r\n faThumbsUp,\r\n faComments,\r\n faFolderOpen,\r\n faTrashAlt,\r\n faFileImage,\r\n faFileArchive,\r\n faCommentDots,\r\n faFolder,\r\n faKeyboard,\r\n faCalendarAlt,\r\n faEnvelope,\r\n faAddressCard,\r\n faMap,\r\n faObjectGroup,\r\n faImages,\r\n faUser,\r\n faLightbulb,\r\n faGem,\r\n faClock,\r\n faUserCircle,\r\n faQuestionCircle,\r\n faBuilding,\r\n faBell,\r\n faFileExcel,\r\n faFileAudio,\r\n faFileVideo,\r\n faFileWord,\r\n faFilePdf,\r\n faFileCode,\r\n faFileAlt,\r\n faEye,\r\n faChartBar\r\n} from '@fortawesome/free-regular-svg-icons';\r\nimport {\r\n fas,\r\n faAngleDoubleRight,\r\n faAngleDoubleLeft,\r\n faSmile,\r\n faHeart,\r\n faBatteryEmpty,\r\n faBatteryFull,\r\n faChevronRight,\r\n faSitemap,\r\n faPrint,\r\n faMapMarkedAlt,\r\n faTachometerAlt,\r\n faAlignCenter,\r\n faExternalLinkAlt,\r\n faShareSquare,\r\n faInfoCircle,\r\n faSync,\r\n faQuoteRight,\r\n faStarHalfAlt,\r\n faShapes,\r\n faCarBattery,\r\n faTable,\r\n faCubes,\r\n faPager,\r\n faCameraRetro,\r\n faBomb,\r\n faNetworkWired,\r\n faBusAlt,\r\n faBirthdayCake,\r\n faEyeDropper,\r\n faUnlockAlt,\r\n faDownload,\r\n faAward,\r\n faPlayCircle,\r\n faReply,\r\n faUpload,\r\n faBars,\r\n faEllipsisV,\r\n faSave,\r\n faSlidersH,\r\n faCaretRight,\r\n faChevronUp,\r\n faPlus,\r\n faLemon,\r\n faChevronLeft,\r\n faTimes,\r\n faChevronDown,\r\n faFilm,\r\n faSearch,\r\n faEllipsisH,\r\n faCog,\r\n faArrowsAltH,\r\n faPlusCircle,\r\n faAngleRight,\r\n faAngleUp,\r\n faAngleLeft,\r\n faAngleDown,\r\n faArrowUp,\r\n faArrowDown,\r\n faArrowRight,\r\n faArrowLeft,\r\n faStar,\r\n faSignOutAlt,\r\n faLink\r\n} from '@fortawesome/free-solid-svg-icons';\r\nimport { SnackbarProvider } from 'notistack';\r\nlibrary.add(\r\n far,\r\n faSquare,\r\n faLifeRing,\r\n faCheckCircle,\r\n faTimesCircle,\r\n faDotCircle,\r\n faThumbsUp,\r\n faComments,\r\n faFolderOpen,\r\n faTrashAlt,\r\n faFileImage,\r\n faFileArchive,\r\n faCommentDots,\r\n faFolder,\r\n faKeyboard,\r\n faCalendarAlt,\r\n faEnvelope,\r\n faAddressCard,\r\n faMap,\r\n faObjectGroup,\r\n faImages,\r\n faUser,\r\n faLightbulb,\r\n faGem,\r\n faClock,\r\n faUserCircle,\r\n faQuestionCircle,\r\n faBuilding,\r\n faBell,\r\n faFileExcel,\r\n faFileAudio,\r\n faFileVideo,\r\n faFileWord,\r\n faFilePdf,\r\n faFileCode,\r\n faFileAlt,\r\n faEye,\r\n faChartBar\r\n);\r\nlibrary.add(\r\n fab,\r\n faFacebook,\r\n faTwitter,\r\n faVuejs,\r\n faReact,\r\n faHtml5,\r\n faGoogle,\r\n faInstagram,\r\n faPinterest,\r\n faYoutube,\r\n faDiscord\r\n);\r\nlibrary.add(\r\n fas,\r\n faAngleDoubleRight,\r\n faAngleDoubleLeft,\r\n faSmile,\r\n faHeart,\r\n faBatteryEmpty,\r\n faBatteryFull,\r\n faChevronRight,\r\n faSitemap,\r\n faPrint,\r\n faMapMarkedAlt,\r\n faTachometerAlt,\r\n faAlignCenter,\r\n faExternalLinkAlt,\r\n faShareSquare,\r\n faInfoCircle,\r\n faSync,\r\n faQuoteRight,\r\n faStarHalfAlt,\r\n faShapes,\r\n faCarBattery,\r\n faTable,\r\n faCubes,\r\n faPager,\r\n faCameraRetro,\r\n faBomb,\r\n faNetworkWired,\r\n faBusAlt,\r\n faBirthdayCake,\r\n faEyeDropper,\r\n faUnlockAlt,\r\n faDownload,\r\n faAward,\r\n faPlayCircle,\r\n faReply,\r\n faUpload,\r\n faBars,\r\n faEllipsisV,\r\n faSave,\r\n faSlidersH,\r\n faCaretRight,\r\n faChevronUp,\r\n faPlus,\r\n faLemon,\r\n faChevronLeft,\r\n faTimes,\r\n faChevronDown,\r\n faFilm,\r\n faSearch,\r\n faEllipsisH,\r\n faCog,\r\n faArrowsAltH,\r\n faPlusCircle,\r\n faAngleRight,\r\n faAngleUp,\r\n faAngleLeft,\r\n faAngleDown,\r\n faArrowUp,\r\n faArrowDown,\r\n faArrowRight,\r\n faArrowLeft,\r\n faStar,\r\n faSignOutAlt,\r\n faLink\r\n);\r\n\r\n// Create browser history to use in the Redux store\r\nconst baseUrl = document.getElementsByTagName('base')[0].getAttribute('href') as string;\r\nconst history = createBrowserHistory({ basename: baseUrl });\r\n\r\n// Get the application-wide store instance, prepopulating with state from the server where available.\r\nexport const store = configureStore(history, AppContext);\r\n\r\nReactDOM.render(\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ,\r\n document.getElementById('root')\r\n);\r\n\r\n// registerServiceWorker();\r\n// unregister();\r\n","export const APP_SET_USER = 'APP_SET_USER';\r\nexport const APP_REMOVE_USER = 'APP_REMOVE_USER';\r\nexport const APP_DISPLAY_MESSAGE = 'APP_DISPLAY_MESSAGE';\r\nexport const APP_SET_LANGUAGE = 'APP_SET_LANGUAGE';\r\n\r\nexport const APP_LOAD_NOTIFICATION = 'APP_LOAD_NOTIFICATION';\r\nexport const APP_LOAD_TASKS = 'APP_LOAD_TASKS';\r\nexport const APP_LOAD_COMMENTS = 'APP_LOAD_COMMENTS';\r\n\r\nexport const APP_REMOVE_TASK = 'APP_REMOVE_TASK';\r\nexport const APP_REMOVE_COMMENT = 'APP_REMOVE_COMMENT';\r\nexport const APP_REMOVE_NEW_IN_CASE = 'APP_REMOVE_NEW_IN_CASE';\r\nexport const APP_MARK_AS_VIEWED_NEW_IN_CASE = 'APP_MARK_AS_VIEWED_NEW_IN_CASE';\r\nexport const APP_REMOVE_NEW_IN_APPOINTMENT = 'APP_REMOVE_NEW_IN_APPOINTMENT';\r\nexport const APP_MARK_AS_VIEWED_NEW_IN_APPOINTMENT = 'APP_MARK_AS_VIEWED_NEW_IN_APPOINTMENT';\r\nexport const APP_SET_NOTIFICATIONS_LOADERS = 'APP_SET_NOTIFICATIONS_LOADERS';\r\nexport const APP_SET_CURRENCY_RATES = 'APP_SET_CURRENCY_RATES';\r\n\r\nexport const APPUSER_USER_GET_LIST_START = 'APPUSER_USER_GET_LIST_START';\r\nexport const APPUSER_USER_GET_LIST_END = 'APPUSER_USER_GET_LIST_END';\r\nexport const APPUSER_USER_EDIT = 'APPUSER_USER_EDIT';\r\nexport const APPUSER_USER_ADD = 'APPUSER_USER_ADD';\r\n\r\nexport const REQUEST_WEATHER_FORECASTS = 'REQUEST_WEATHER_FORECASTS';\r\nexport const RECEIVE_WEATHER_FORECASTS = 'RECEIVE_WEATHER_FORECASTS';\r\n\r\nexport const THEME_SET_SIDEBAR_HOVER = 'SET_SIDEBAR_HOVER';\r\nexport const THEME_SET_SIDEBAR_TOGGLE = 'SET_SIDEBAR_TOGGLE';\r\nexport const THEME_SET_SIDEBAR_TOGGLE_MOBILE = 'SET_SIDEBAR_TOGGLE_MOBILE';\r\n\r\nexport const CASE_SETTINGS_SET_CASE = 'CASE_SETTINGS_SET_CASE';\r\nexport const CASE_SETTINGS_SET_LOADING = 'CASE_SETTINGS_SET_LOADING';\r\nexport const CASE_SETTINGS_SET_CASE_VEHICLE = 'CASE_SETTINGS_SET_CASE_VEHICLE';\r\nexport const CASE_SETTINGS_SET_CASE_EVENT = 'CASE_SETTINGS_SET_CASE_EVENT';\r\nexport const CASE_SETTINGS_SET_CASE_STATUS = 'CASE_SETTINGS_SET_CASE_STATUS';\r\nexport const CASE_SETTINGS_ADD_CASE_PARTNER = 'CASE_SETTINGS_ADD_CASE_PARTNER';\r\nexport const CASE_SETTINGS_SET_CASE_VALUATION = 'CASE_SETTINGS_SET_CASE_VALUATION';\r\nexport const CASE_SETTINGS_SET_CLIENT_DATA = 'CASE_SETTINGS_SET_CLIENT_DATA';\r\nexport const CASE_SETTINGS_SET_VEHICLE_DATA = 'CASE_SETTINGS_SET_VEHICLE_DATA';\r\nexport const CASE_SETTINGS_UPDATE_PARAMETERS = 'CASE_SETTINGS_UPDATE_PARAMETERS';\r\nexport const CASE_SETTINGS_UPDATE_TARIFF_VALUE = 'CASE_SETTINGS_UPDATE_TARIFF_VALUE';\r\nexport const CASE_SETTINGS_SET_CASE_CALCULATION_HISTORY =\r\n 'CASE_SETTINGS_SET_CASE_CALCULATION_HISTORY';\r\nexport const CASE_SETTINGS_SET_CAR_IN_SERVICE = 'CASE_SETTINGS_SET_CAR_IN_SERVICE';\r\n\r\n\r\nexport const VEHICLE_SET_VEHICLE = 'VEHICLE_SET_VEHICLE';\r\nexport const VEHICLE_SET_VEHICLE_STATUS = 'VEHICLE_SET_VEHICLE_STATUS';\r\nexport const VEHICLE_RESET_STATE = 'VEHICLE_RESET_STATE';\r\nexport const VEHICLE_SET_VEHICLE_LOADING = 'VEHICLE_SET_VEHICLE_LOADING';\r\n\r\nexport const MAVO_VEHICLE_SET_VEHICLE = 'MAVO_VEHICLE_SET_VEHICLE';\r\nexport const MAVO_VEHICLE_SET_VEHICLE_STATUS = 'MAVO_VEHICLE_SET_VEHICLE_STATUS';\r\n\r\nexport const VEHICLE_SET_VEHICLE_AUCTION = 'VEHICLE_SET_VEHICLE_AUCTION';\r\n\r\n/**\r\n * Agenda actions\r\n */\r\nexport const AGENDA_SET_SELECTED_RANGE = 'AGENDA_SET_SELECTED_RANGE';\r\nexport const AGENDA_SET_APPOINTMENTS = 'AGENDA_SET_APPOINTMENTS';\r\nexport const AGENDA_SET_SELECTED_APPOINTMENT = 'AGENDA_SET_SELECTED_APPOINTMENT';\r\nexport const AGENDA_SET_STATUS_LIST = 'AGENDA_SET_STATUS_LIST';\r\nexport const AGENDA_SET_CATEGORY_TYPE = 'AGENDA_SET_CATEGORY_TYPE';\r\n","import olxLogo from '../assets/images/OLX.png';\r\nimport autovitLogo from '../assets/images/Autovit.jpg';\r\nimport renaultLogo from '../assets/images/Renault.png';\r\n\r\n\r\nexport const defaultChartColors = [\"26a0fc\", \"26e7a6\", \"febc3b\", \"ff6178\", \"8b75d7\"];\r\nexport const defaultChartPosition = { x: 0.3, y: 0.3, w: '90%', h: '90%' }\r\nexport const titleOptions = { fontSize: 16, color: \"000000\", bold: true, align: \"center\" };\r\nexport const titlePosition = { x: 0.5, y: 0.4, w: \"90%\" };\r\n\r\nexport const tabNameOptions = { fontSize: 24, color: \"000000\", bold: true, align: \"center\" };\r\nexport const tabNamePosition = { x: 0.5, y: \"45%\", w: \"90%\" };\r\n\r\n\r\nexport const rectangletextOpts = {\r\n y: 1.5,\r\n w: 2,\r\n h: 1,\r\n align: \"center\",\r\n fill: { color: 'e7e6e6' },\r\n wrap: true,\r\n}\r\n\r\nexport const cellOpt = { color: '000000', fontSize: 14, bold: true }\r\n\r\nexport const sallerTableOptions = { x: 2.5, y: 1, w: 5.0, valign: \"middle\", border: { pt: \"1\" }, autoPage: true }\r\n\r\nexport const tableOptions = { x: 0.5, y: 1.0, w: 9.0, valign: \"middle\", border: { pt: \"1\" }, fill: { color: \"F1F1F1\" }, autoPage: true }\r\n\r\n\r\nexport const logos = [\r\n { image: autovitLogo, dimension: { w: 2, h: 0.5, x: 1 } },\r\n { image: olxLogo, dimension: { w: 0.5, h: 0.5, x: 4.7 } },\r\n { image: renaultLogo, dimension: { w: 1, h: 0.5, x: 7.5 }}\r\n]\r\n\r\nexport const recentAcquisitionLogos = [\r\n { dimension: { w: 2, h: 1.5, x: 0.5 } },\r\n { dimension: { w: 2, h: 1.5, x: 4.2 } },\r\n { dimension: { w: 2, h: 1.5, x: 7.9 }}\r\n]\r\n\r\n\r\nexport const recentAcquisitionOptions = {\r\n w: 2.5,\r\n h: 0.5,\r\n align: \"center\",\r\n wrap: true,\r\n fontSize: 10\r\n}\r\n\r\n\r\nexport const salesChannelOptions = {\r\n w: 2,\r\n h: 1,\r\n align: \"center\",\r\n wrap: true,\r\n}\r\n\r\nexport const rectangleOptions ={\r\n align: \"center\",\r\n fill: { color: 'e7e6e6' },\r\n wrap: true\r\n}\r\n\r\nexport const salesOptions ={\r\n align: \"center\",\r\n wrap: true,\r\n fontSize: 10\r\n}\r\n\r\n\r\nexport const horizontalChartOptions = {\r\n ...defaultChartPosition,\r\n w: \"100%\",\r\n x: 0,\r\n valAxisMinVal: 0,\r\n catAxisLabelFontSize: 6,\r\n valAxisHidden: false,\r\n catAxisLineShow: false,\r\n showValue: true,\r\n dataLabelColor: '000000' ,\r\n dataLabelFontSize: 6,\r\n barGapWidthPct: 15,\r\n chartColors: defaultChartColors,\r\n}\r\n\r\nexport const verticalCharOptions = {\r\n ...defaultChartPosition,\r\n barDir: \"col\",\r\n barGapWidthPct: 25,\r\n chartColors: defaultChartColors,\r\n chartColorsOpacity: 50,\r\n barGrouping: \"stacked\",\r\n showValue: true,\r\n title: name,\r\n showTitle: true,\r\n dataLabelColor: \"FFFFFF\",\r\n}\r\n\r\nexport const verticalChar2Options = {\r\n ...defaultChartPosition,\r\n chartArea: { fill: { color: \"F1F1F1\" } },\r\n plotArea: { fill: { color: \"404040\" } },\r\n barDir: \"col\",\r\n barGapWidthPct: 25,\r\n chartColors: [\"26a0fc\", \"26e7a6\"],\r\n catAxisLabelFontFace: \"Calibri\",\r\n catAxisLabelFontSize: 11,\r\n dataLabelColor: \"FFFFFF\",\r\n dataLabelFontFace: \"Arial\",\r\n dataLabelFontSize: 10,\r\n dataLabelPosition: \"inEnd\",\r\n showValue: true,\r\n showLegend: false,\r\n legendPos: \"b\",\r\n showTitle: true,\r\n}\r\n\r\nexport const circleChartOptions = {\r\n ...defaultChartPosition,\r\n chartArea: { fill: { color: \"F1F1F1\" } },\r\n dataBorder: { pt: \"1\", color: \"F1F1F1\" },\r\n showLegend: true,\r\n chartColors: defaultChartColors,\r\n legendPos: \"b\",\r\n showTitle: true,\r\n title: name,\r\n firstSliceAng: 90,\r\n dataLabelSize: 8,\r\n dataLabelColor: \"FFFFFF\",\r\n dataLabelFormatCode: '##.#%'\r\n}\r\n\r\nexport const scatterChartOptions = {\r\n ...defaultChartPosition,\r\n plotArea: { fill: { color: \"F2F9FC\" } },\r\n chartColors: ['26a0fc', \"26e7a6\"],\r\n chartArea: { fill: { color: \"F1F1F1\" } },\r\n lineSize: 3,\r\n lineSmooth: true,\r\n showLegend: true,\r\n catGridLine: 'solid',\r\n legendPos: \"b\",\r\n catAxisLabelPos: \"low\",\r\n}","import pptxgen from \"pptxgenjs\";\r\nimport moment from \"moment\";\r\nimport { IPptService } from './Interfaces/IPptService';\r\nimport { DashboardFiltersState } from '../interfaces/Dashboard/DashboardFiltersState';\r\nimport { numberFormat } from \"../utils/numberFormat\";\r\nimport { ITranslatorService } from \"./Interfaces/ITranslatorService\";\r\nimport{\r\n titleOptions, titlePosition, rectangletextOpts, cellOpt, tableOptions,\r\n logos, salesChannelOptions, rectangleOptions, horizontalChartOptions, sallerTableOptions, verticalCharOptions, verticalChar2Options,\r\n circleChartOptions, scatterChartOptions, defaultChartPosition, defaultChartColors, recentAcquisitionLogos, recentAcquisitionOptions, tabNameOptions, tabNamePosition, salesOptions\r\n} from '../helpers/PptConstants'\r\nimport { SalesVehicle } from \"../interfaces/Dashboard/SalesVehicle\";\r\nimport { faTheRedYeti } from \"@fortawesome/free-brands-svg-icons\";\r\n\r\n\r\nexport class PptService implements IPptService {\r\n\r\n private translatorService: ITranslatorService;\r\n private pptx: any;\r\n private pptData: any;\r\n\r\n constructor(\r\n translatorService: ITranslatorService,\r\n pptData?:any,\r\n ) {\r\n this.translatorService = translatorService;\r\n this.pptx = new pptxgen();\r\n this.pptData = pptData;\r\n }\r\n\r\n addStockStructure = (slide: any) => {\r\n slide.addText([{\r\n text: `${this.translatorService.Tranlate('DASHBOARD_INVENTORY_STRUCTURE', 'Structura stoc la data de')} ${moment().format('DD-MM-YYYY')}`, \r\n options: titleOptions \r\n }], titlePosition);\r\n\r\n slide.addText(`Total stoc\\n${this.pptData.count}`, { ...rectangletextOpts, x: 1.0 });\r\n slide.addText(`Rulaj mediu\\n${this.pptData.averageMileage} km`, { ...rectangletextOpts, x: 4.0 });\r\n slide.addText(`Varsta medie\\n${this.pptData.averageVehicleAge} ani`, { ...rectangletextOpts, x: 7.0 });\r\n }\r\n\r\n acquisitionMainCard = (slide: any, includeVat?:boolean)=>{\r\n const { purchasesCompleted, purchasesInProgress, purchasesFailed, newVehiclesSoldCount } = this.pptData;\r\n const purchasesCompletedPrice = includeVat\r\n ? purchasesCompleted.amountInclVat\r\n : purchasesCompleted.amount;\r\n\r\n const purchasesInProgressPrice = includeVat\r\n ? purchasesInProgress.amountInclVat\r\n : purchasesInProgress.amount;\r\n\r\n const purchasesFailedPrice = includeVat ? purchasesFailed.amountInclVat : purchasesFailed.amount;\r\n\r\n const averagePurchasePrice =\r\n purchasesCompleted.count == 0 ? 0 : purchasesCompletedPrice / purchasesCompleted.count;\r\n\r\n const textOpts = {\r\n y: 1.0,\r\n w: 3,\r\n h: 1.5,\r\n ...rectangleOptions\r\n }\r\n\r\n slide.addText(`${this.translatorService.Tranlate(\r\n 'DASHBOARD_ACQUISITION_FINALISED',\r\n 'Finalizate cu succes')\r\n }\\n${purchasesCompleted.count}\\n${`${numberFormat(purchasesCompletedPrice)} EUR`}`, { ...textOpts, x: 1.5 });\r\n\r\n slide.addText(`${this.translatorService.Tranlate(\r\n 'DASHBOARD_ACQUISITION_IN_PROGRESS',\r\n 'In curs de achizitie')\r\n }\\n${purchasesInProgress.count}\\n${`${numberFormat(purchasesInProgressPrice)} EUR`}`, { ...textOpts, x: 6.0 });\r\n\r\n slide.addText(`${this.translatorService.Tranlate(\r\n 'DASHBOARD_ACQUISITION_FAILED',\r\n 'Achizitii esuate')\r\n }\\n${purchasesFailed.count}\\n${`${numberFormat(purchasesFailedPrice)} EUR`}`, { ...textOpts, y: 3, x: 0.3 });\r\n slide.addText(`${this.translatorService.Tranlate(\r\n 'DASHBOARD_ACQUISITION_AVERAGE_PRICE',\r\n 'Pret mediu achizitie')\r\n }\\n${`${numberFormat(averagePurchasePrice)} EUR`}`, { ...textOpts, y: 3, x: 3.5 });\r\n slide.addText(`${this.translatorService.Tranlate(\r\n 'DASHBOARD_ACQUISITION_NEW_VEHICLES_SOLD',\r\n 'Vehicule noi vandute'\r\n )\r\n }\\n${newVehiclesSoldCount}`, { ...textOpts, y: 3, x: 6.8 });\r\n }\r\n\r\n salesTopSeller = (slide:any) =>{\r\n slide.addText([{ text: this.translatorService.Tranlate('DASHBOARD_TOP_SALE_PERSONS', 'Top vanzatori'), options: titleOptions }], titlePosition);\r\n const rows = [];\r\n if (this.pptData.topSellersBasedOnClosedFolders?.length > 0) {\r\n this.pptData.topSellersBasedOnClosedFolders.forEach((item: any, index: number) => {\r\n rows.push([{ text: index + 1, options: { ...cellOpt} }, { text: `${item.organizationName}\\n${item.buyerName}`, options: cellOpt }])\r\n })\r\n slide.addTable(rows, { ...sallerTableOptions });\r\n }\r\n }\r\n\r\n salesChannel = (slide:any) =>{\r\n let pos = 1;\r\n if (this.pptData.salesChannels?.length > 0){\r\n this.pptData.salesChannels.forEach((channel:any, index:number)=>{\r\n slide.addImage({ path: logos[index].image, ...logos[index].dimension, y: 0.3, align: \"center\" });\r\n slide.addText(this.translatorService.Tranlate('DASHBOARD_TOTAL_ADS', 'Total anunturi'), { ...salesChannelOptions, x: pos, y:1 });\r\n slide.addText(channel.totalCount, { ...salesChannelOptions, x: pos ,y:2});\r\n slide.addText(this.translatorService.Tranlate('DASHBOARD_ACTIVE_ADS', 'Active'), { ...salesChannelOptions, x: pos, y:3 });\r\n slide.addText(channel.activeCount, { ...salesChannelOptions, x: pos, y:4 });\r\n pos = pos + 2 + 1;\r\n })\r\n\r\n }\r\n }\r\n\r\n recentAcquisitions = (data: any) =>{\r\n const slide = this.pptx.addSlide();\r\n slide.addText([{ text: this.translatorService.Tranlate('DASHBOARD_ACQUISITION_RECENT', 'Achizitii recente'), options: titleOptions }], titlePosition);\r\n let pos = 0.5;\r\n if (data?.length > 0){\r\n data.forEach((recentAcquisition:any, index:number)=>{\r\n recentAcquisition.makeName = recentAcquisition.makeName ? recentAcquisition.makeName : '';\r\n recentAcquisition.modelName = recentAcquisition.modelName ? recentAcquisition.modelName : '';\r\n recentAcquisition.equipmentVersion = recentAcquisition.equipmentVersion ? recentAcquisition.equipmentVersion : '';\r\n recentAcquisition.makeYear = recentAcquisition.makeYear ? recentAcquisition.makeYear : '';\r\n recentAcquisition.fuelType = recentAcquisition.fuelType ? recentAcquisition.fuelType : '';\r\n recentAcquisition.transmissionType = recentAcquisition.transmissionType ? recentAcquisition.transmissionType: '';\r\n\r\n slide.addImage({ data: recentAcquisition.base64Value, ...recentAcquisitionLogos[index].dimension, y: 0.6, align: \"center\" });\r\n slide.addText(recentAcquisition.makeName + \" \" + recentAcquisition.modelName, { ...recentAcquisitionOptions, x: pos, y: 2.3 });\r\n slide.addText(recentAcquisition.equipmentVersion + '/' + recentAcquisition.makeYear + '/' + recentAcquisition.fuelType + '/' + recentAcquisition.transmissionType, { ...recentAcquisitionOptions, x: pos ,y: 2.8});\r\n slide.addText(\"Pret achizitie:\" + Math.round(recentAcquisition.purchasePriceInclVat) + 'Euro', { ...recentAcquisitionOptions, x: pos, y: 3.2 });\r\n slide.addText(this.translatorService.Tranlate('DASHBOARD_BUYER_NAME', 'Cumparator') + \":\" + recentAcquisition.buyerName, { ...recentAcquisitionOptions, x: pos, y: 3.7 });\r\n slide.addText(this.translatorService.Tranlate('DASHBOARD_ORGANIZATION', 'Organizatie') + \":\" + recentAcquisition.organizationName, { ...recentAcquisitionOptions, x: pos, y: 4.2 });\r\n pos = pos + 2 + 1 + 0.5;\r\n })\r\n\r\n }\r\n }\r\n\r\n getFilterName = (id:number, items:any, name:string) =>{\r\n const indexMake = items.findIndex((item: any) => item.id === id);\r\n return indexMake >= 0 ? `${name}: ${items[indexMake].displayName}` : '';\r\n } \r\n\r\n salesProfit = () => {\r\n const slide = this.pptx.addSlide();\r\n const textOpts = {\r\n y: 1.0,\r\n w: 2.5,\r\n h: 1.5,\r\n ...rectangleOptions\r\n }\r\n slide.addText(`${this.translatorService.Tranlate('DASHBOARD_SALES_WARRANTIES','Garantii vandute')\r\n }\\n${numberFormat(this.pptData.guaranteeCount)}`, { ...textOpts, x: 0.5 });\r\n\r\n slide.addText(`${this.translatorService.Tranlate('DASHBOARD_SALES_TABLE_TITLE', 'Vanzari')\r\n }\\n${numberFormat(this.pptData.soldVehicleInformation.amountInclVat, 0, undefined, ' EUR')}\\n${numberFormat(this.pptData.addsInformation.amountInclVat, 0, undefined, ' EUR')}`, { ...textOpts, x: 3.5 });\r\n\r\n slide.addText(`${this.translatorService.Tranlate('DASHBOARD_PROFIT_VALUE', 'Profit')\r\n }\\n${numberFormat(this.pptData.soldVehicleInformation.profitValue, 0, undefined, ' EUR')}\\n${numberFormat(this.pptData.addsInformation.profitValue, 0, undefined, ' EUR')}`, { ...textOpts, x: 6.5 });\r\n\r\n slide.addText(`${this.translatorService.Tranlate('DASHBOARD_PROFIT_RATIO', 'PROFIT %')\r\n }\\n${numberFormat(this.pptData.soldVehicleInformation.profitPercent)}\\n${numberFormat(this.pptData.addsInformation.profitPercent)}`, { ...textOpts, y: 3, x: 0.5 });\r\n\r\n slide.addText(`${this.translatorService.Tranlate('DASHBOARD_QUANTITY','Nr. Unitati vandute')\r\n }\\n${numberFormat(this.pptData.soldVehicleInformation.count)}\\n${numberFormat(this.pptData.addsInformation.count) }`, { ...textOpts, y: 3, x: 3.5 });\r\n\r\n slide.addText(`${this.translatorService.Tranlate('DASHBOARD_SALES_COST', 'Cost')\r\n }\\n${numberFormat(this.pptData.soldVehicleInformation.damageValue, 0, undefined, ' EUR')}\\n${numberFormat(this.pptData.addsInformation.damageValue, 0, undefined, ' EUR') }`, { ...textOpts, y: 3, x: 6.5 });\r\n }\r\n\r\n getFiltersInfo = (slide:any,filters:any, type:string) =>{\r\n const textOpts = { color: \"363636\", fontSize: 15 }\r\n let firstPosition = 1;\r\n const textPostion = { x: 0.5, y: firstPosition, w: \"90%\" }\r\n\r\n if (filters.startDate)\r\n slide.addText([{\r\n text: `${this.translatorService.Tranlate('DASHBOARD_DATE_LABEL_FROM', 'De la')} ${moment(filters.startDate).format('DD-MM-YYYY')} ${this.translatorService.Tranlate('DASHBOARD_DATE_LABEL_TO', 'Pana la') } ${moment(filters.endDate).format('DD-MM-YYYY')}`,\r\n options: textOpts\r\n }], {...textPostion}); \r\n\r\n if (filters.makeId){\r\n firstPosition += 0.3;\r\n slide.addText([{\r\n text: this.getFilterName(filters.makeId, type === 'vehicle' ? this.pptData.byMaker : this.pptData.purchasedVehiclesByMaker, this.translatorService.Tranlate('DASHBOARD_MAKE', 'Producator')),\r\n options: textOpts\r\n }], { ...textPostion, y: firstPosition }); \r\n }\r\n\r\n if (filters.offerTypeId) {\r\n firstPosition += 0.3;\r\n slide.addText([{\r\n text: this.getFilterName(filters.makeId, this.pptData.purchasedVehiclesByOfferType, this.translatorService.Tranlate('DASHBOARD_OFFER_TYPE', 'TIP Oferta')),\r\n options: textOpts\r\n }], { ...textPostion, y: firstPosition });\r\n }\r\n\r\n if (filters.modelId) {\r\n firstPosition += 0.3;\r\n slide.addText([{\r\n text: this.getFilterName(filters.modelId, this.pptData.byModel, this.translatorService.Tranlate('DASHBOARD_MODEL', 'Model')),\r\n options: textOpts\r\n }], { ...textPostion, y: firstPosition }); \r\n }\r\n\r\n if (filters.fuelId) {\r\n firstPosition += 0.3;\r\n slide.addText([{\r\n text: this.getFilterName(filters.fuelId, this.pptData.byFuelType, this.translatorService.Tranlate('DASHBOARD_FUEL', 'Combustibil')),\r\n options: textOpts\r\n }], { ...textPostion, y: firstPosition }); \r\n }\r\n\r\n if (filters.includeVat){\r\n firstPosition += 0.3;\r\n slide.addText([{\r\n text: this.translatorService.Tranlate('DASHBOARD_PRICES_WITH_VAT_EUR', 'Preturi in EUR cu TVA'),\r\n options: textOpts\r\n }], { ...textPostion, y: firstPosition }); \r\n } else if (filters.includeVat == false){\r\n firstPosition += 0.3;\r\n slide.addText([{\r\n text: this.translatorService.Tranlate('DASHBOARD_PRICES_WITHOUT_VAT_EUR', 'Preturi in EUR fara TVA'),\r\n options: textOpts\r\n }], { ...textPostion, y: firstPosition }); \r\n }\r\n\r\n if (filters.statusId) {\r\n firstPosition += 0.3;\r\n slide.addText([{\r\n text: this.getFilterName(filters.statusId, this.pptData.byStatusType, this.translatorService.Tranlate(\r\n 'DASHBOARD_TECHNICAL_INVENTORY_STATE',\r\n 'Stare tehnica stoc'\r\n )),\r\n options: textOpts\r\n }], { ...textPostion, y: firstPosition }); \r\n\r\n }\r\n\r\n if (filters.technicalConditionId) {\r\n firstPosition += 0.3;\r\n slide.addText([{\r\n text: this.getFilterName(filters.technicalConditionId, this.pptData.byInOutAndTechnicalCondition, this.translatorService.Tranlate('DASHBOARD_INVENTORY_DETAILS', 'Detalii stoc')),\r\n options: textOpts\r\n }], { ...textPostion, y: firstPosition }); \r\n }\r\n\r\n if (filters.tractionTypeId) {\r\n firstPosition += 0.3;\r\n slide.addText([{\r\n text: this.getFilterName(filters.tractionTypeId, this.pptData.byTractionType, this.translatorService.Tranlate('DASHBOARD_TRACTION', 'Tractiune')),\r\n options: textOpts\r\n }], { ...textPostion, y: firstPosition }); \r\n }\r\n\r\n if (filters.transmissionTypeId) {\r\n firstPosition += 0.3;\r\n slide.addText([{\r\n text: this.getFilterName(filters.transmissionTypeId, this.pptData.byTransmissionType, this.translatorService.Tranlate('DASHBOARD_TRANSMISSION', 'Transmisie')),\r\n options: textOpts\r\n }], { ...textPostion, y: firstPosition }); \r\n }\r\n\r\n if (filters.inventoryAgeFilter) {\r\n firstPosition += 0.3;\r\n slide.addText([{\r\n text: this.getFilterName(filters.inventoryAgeFilter, this.pptData.byInventoryAge, this.translatorService.Tranlate(\r\n 'DASHBOARD_AVERAGE_INVENTORY_AGE',\r\n 'Vehcime medie stoc'\r\n )),\r\n options: textOpts\r\n }], { ...textPostion, y: firstPosition }); \r\n \r\n }\r\n\r\n if (filters.clientTypeId) {\r\n firstPosition += 0.3;\r\n slide.addText([{\r\n text: this.getFilterName(filters.clientTypeId, type === 'sales' ? this.pptData.vehiclesGroupedByClientType : this.pptData.purchasedVehiclesByClientType, this.translatorService.Tranlate('DASHBOARD_CLIENT_TYPE', 'Tip client')),\r\n options: textOpts\r\n }], { ...textPostion, y: firstPosition });\r\n\r\n }\r\n\r\n if (filters.salePersonId) {\r\n firstPosition += 0.3;\r\n const indexMake = this.pptData.topSellersBasedOnClosedFolders.findIndex((item: any) => item.id === filters.salePersonId);\r\n if (indexMake >=0){\r\n const seller = this.pptData.topSellersBasedOnClosedFolders[indexMake];\r\n slide.addText([{\r\n text: `${this.translatorService.Tranlate('DASHBOARD_TOP_SALE_PERSONS', 'Top vanzatori')}: ${seller.organizationName}, ${seller.buyerName}`,\r\n options: textOpts\r\n }], { ...textPostion, y: firstPosition });\r\n }\r\n }\r\n\r\n if (filters.selectedOrganisations?.length > 0)\r\n firstPosition += 0.6;\r\n slide.addText([{\r\n text: `${this.translatorService.Tranlate('DASHBOARD_ORGANIZATION', 'Organizatie')}: ${filters.selectedOrganisations.map((org: any) => ` ${org.name}`)}`,\r\n options: textOpts\r\n }], { ...textPostion, y: firstPosition }); \r\n }\r\n\r\n public addFirstPage = (filters: DashboardFiltersState, type:string) => {\r\n const firstSlide = this.pptx.addSlide();\r\n switch(type){\r\n case 'vehicle': \r\n firstSlide.addText([{\r\n text: this.translatorService.Tranlate('MENU_VEHICLES', 'Stoc vehicule'),\r\n options: tabNameOptions\r\n }], tabNamePosition);\r\n break;\r\n case 'acquisitions':\r\n firstSlide.addText([{\r\n text: this.translatorService.Tranlate('DASHBOARD_ACQUISITION_TAB', 'Achizitii'),\r\n options: tabNameOptions\r\n }], tabNamePosition);\r\n break;\r\n case 'sales':\r\n firstSlide.addText([{\r\n text: this.translatorService.Tranlate('DASHBOARD_SALES_TABLE_TITLE', 'Vanzari'),\r\n options: tabNameOptions\r\n }], tabNamePosition);\r\n break; \r\n default:\r\n break;\r\n }\r\n\r\n const slide = this.pptx.addSlide();\r\n slide.addText([{\r\n text: this.translatorService.Tranlate('DASHBOARD_APPLIED_FILTERS', 'Filtre aplicate1'),\r\n options: titleOptions\r\n }], titlePosition);\r\n\r\n this.getFiltersInfo(slide, filters, type);\r\n\r\n const secondSlide = this.pptx.addSlide();\r\n\r\n switch(type){\r\n case 'vehicle': \r\n this.addStockStructure(secondSlide);\r\n break;\r\n case 'acquisitions':\r\n this.acquisitionMainCard(secondSlide, filters.includeVat)\r\n break;\r\n case 'sales':\r\n this.salesTopSeller(secondSlide);\r\n this.salesChannel(this.pptx.addSlide());\r\n break; \r\n default:\r\n break;\r\n }\r\n }\r\n\r\n getDataForChart = (data:any, formatData?:any) =>{\r\n const dataChart = { labels: [], values: [] };\r\n let maxValue = 0;\r\n data.forEach((item: any) => {\r\n const val = formatData ? item[formatData.value] : item.value;\r\n if (val > maxValue) {\r\n maxValue = item.value;\r\n }\r\n dataChart.labels.push(formatData ? item[formatData.label] : item.displayName);\r\n dataChart.values.push(formatData ? item[formatData.value] : item.value)\r\n })\r\n return { maxValue: maxValue, data: dataChart }\r\n }\r\n\r\n public addHorizontalChart = (charData:any,name:string) =>{\r\n if(!(charData?.length > 0)){\r\n return;\r\n }\r\n const slide = this.pptx.addSlide();\r\n slide.addText([{ text: name, options: titleOptions }], titlePosition);\r\n const infoChart = this.getDataForChart(charData);\r\n \r\n slide.addChart(\r\n this.pptx.charts.BAR,\r\n [\r\n {\r\n name: name,\r\n labels: [...infoChart.data.labels],\r\n values: [...infoChart.data.values],\r\n },\r\n ],\r\n {\r\n ...horizontalChartOptions,\r\n valAxisMaxVal: infoChart.maxValue + 20,\r\n \r\n }\r\n );\r\n}\r\n\r\n public addTable = (tableFormat: [{ title: string, field?: string, render?(rowData: any): string | 0 }],tableData:any, name:string) =>{\r\n if (!(tableData?.length > 0)) {\r\n return;\r\n }\r\n const slide = this.pptx.addSlide();\r\n slide.addText([{ text: name, options: titleOptions }], titlePosition);\r\n const rows = [];\r\n rows.push(tableFormat.map((item) => { return { text: item.title, options: { color: '000000', fontSize: 14, bold: true } }}));\r\n tableData.forEach((val:any)=>{\r\n rows.push(tableFormat.map((item) => { return { text: item.render ? item.render(val) : val[item.field], options: { color: \"000000\", fontSize: 12 } }}))\r\n })\r\n slide.addTable(rows, { ...tableOptions });\r\n\r\n }\r\n\r\n public addVerticalChart = (charData: any, name: string, customLabels?:any) =>{\r\n if (!(charData?.length > 0)) {\r\n return;\r\n }\r\n const slide = this.pptx.addSlide({ sectionTitle: \"Charts\" });\r\n const infoChart = this.getDataForChart(charData);\r\n slide.addChart(\r\n this.pptx.charts.BAR, \r\n [\r\n {\r\n name: name,\r\n labels: customLabels ? [...customLabels] :[...infoChart.data.labels],\r\n values: [...infoChart.data.values],\r\n },\r\n ], \r\n {\r\n ...verticalCharOptions,\r\n title: name,\r\n valAxisMaxVal: infoChart.maxValue,\r\n });\r\n \r\n }\r\n\r\n public addVerticalChart2 = (data:any, name:string, formatData:any) =>{\r\n if (!(data?.length > 0)) {\r\n return;\r\n }\r\n const slide = this.pptx.addSlide();\r\n const firstCategoryChart = this.getDataForChart(data, formatData[0]);\r\n const secondCategoryChart = this.getDataForChart(data, formatData[1]);\r\n slide.addChart(\r\n this.pptx.charts.BAR, \r\n [\r\n {\r\n name: 'Category 1',\r\n labels: [...firstCategoryChart.data.labels],\r\n values: [...firstCategoryChart.data.values],\r\n },\r\n {\r\n name: 'Category 2',\r\n labels: [...secondCategoryChart.data.labels],\r\n values: [...secondCategoryChart.data.values],\r\n }\r\n ], \r\n {\r\n ...verticalChar2Options,\r\n title: name,\r\n valAxisMaxVal: firstCategoryChart.maxValue > secondCategoryChart.maxValue ? firstCategoryChart.maxValue : secondCategoryChart.maxValue,\r\n });\r\n }\r\n\r\n public addCircleChart = (charData:any, name:string) =>{\r\n if (!(charData?.length > 0)) {\r\n return;\r\n }\r\n const slide = this.pptx.addSlide();\r\n const infoChart = this.getDataForChart(charData);\r\n slide.addChart(\r\n this.pptx.charts.PIE,\r\n [{\r\n name: name,\r\n labels: [...infoChart.data.labels],\r\n values: [...infoChart.data.values],\r\n }], \r\n {\r\n ...circleChartOptions,\r\n title: name\r\n });\r\n }\r\n\r\n public addCarBox = () =>{\r\n const slide = this.pptx.addSlide();\r\n }\r\n\r\n public addScatterChar = (data: any, name: string, formatData: any, firstCategoryName: string, secondCategoryName: string) =>{\r\n const slide = this.pptx.addSlide();\r\n const firstCategoryChart = this.getDataForChart(data, formatData[0]);\r\n const secondCategoryChart = this.getDataForChart(data, formatData[1]);\r\n console.log(firstCategoryChart);\r\n slide.addChart(this.pptx.charts.LINE, [\r\n {\r\n name: firstCategoryName,\r\n labels: [...firstCategoryChart.data.labels],\r\n values: [...firstCategoryChart.data.values],\r\n },\r\n {\r\n name: secondCategoryName,\r\n labels: [...secondCategoryChart.data.labels],\r\n values: [...secondCategoryChart.data.values],\r\n }\r\n ], { ...scatterChartOptions});\r\n }\r\n\r\n public lastSalePage(data: SalesVehicle) {\r\n const slide = this.pptx.addSlide();\r\n console.log(data);\r\n let firstPosition = 1;\r\n const textPostion = { x: 0.5, y: firstPosition, w: \"90%\", fontSize: 14, align: 'center' };\r\n\r\n slide.addText(`${data?.makeName} ${data?.modelName}`, { ...textPostion});\r\n\r\n firstPosition += 0.3;\r\n slide.addText(`${this.translatorService.Tranlate(\r\n 'DASHBOARD_SALES_TABLE_QUANTITY',\r\n 'Numar de unitati'\r\n )}: ${data?.numberOfUnitSold}`, { ...textPostion, y: firstPosition });\r\n\r\n firstPosition += 0.3;\r\n slide.addText(`${this.translatorService.Tranlate(\r\n 'DASHBOARD_AVERAGE_VEHICLE_AGE',\r\n 'Varsta medie'\r\n )}: ${numberFormat(data?.avgOfYear, 1)}`, { ...textPostion, y: firstPosition })\r\n\r\n\r\n for (let i = 0; i < data?.groupedByFuelType.length; i++) {\r\n firstPosition += 0.3;\r\n slide.addText(`${data?.groupedByFuelType[i].name} ${Math.round(data?.groupedByFuelType[i].percentValue)} % (${data?.groupedByFuelType[i].count})`, { ...textPostion, y: firstPosition });\r\n }\r\n\r\n for (let i = 0; i < data?.groupedByTransmissionType.length; i++) {\r\n firstPosition += 0.3;\r\n slide.addText(`${data?.groupedByTransmissionType[i].name} ${Math.round(data?.groupedByTransmissionType[i].percentValue)} % (${data?.groupedByTransmissionType[i].count})`, { ...textPostion, y: firstPosition });\r\n }\r\n\r\n firstPosition += 0.3;\r\n slide.addText( `${this.translatorService.Tranlate(\r\n 'DASHBOARD_AVG_SALE_VALUE',\r\n 'Pret mediu de vanzare'\r\n )}: ${numberFormat(data?.avgSoldValue)} Euro`, { ...textPostion, y: firstPosition });\r\n\r\n firstPosition += 0.3;\r\n slide.addText(`${this.translatorService.Tranlate(\r\n 'DASHBOARD_AVG_DAMAGE_VALUE',\r\n 'Costuri medii'\r\n )}: ${numberFormat(data?.avgDamageValue)} Euro`, { ...textPostion, y: firstPosition });\r\n\r\n firstPosition += 0.3;\r\n slide.addText(`${this.translatorService.Tranlate('DASHBOARD_PROFIT_VALUE', 'Profit')}: ${Math.round(data?.profitPercent)}%`, { ...textPostion, y: firstPosition, bold : true, fontSize: 20 });\r\n\r\n \r\n }\r\n\r\n public exportPpt = () =>{\r\n this.pptx.writeFile()\r\n }\r\n\r\n\r\n}\r\n\r\n","import { IOrganizationService } from './Interfaces/IOrganizationService';\r\nimport {\r\n Organization,\r\n OrganizationType,\r\n OrganizationLevel,\r\n OrganizationBankAccount,\r\n OrganizationInterface,\r\n OrganizationParameter,\r\n OrganizationCaseType,\r\n OrganizationCaseTypeStep,\r\n OrganizationCaseTypeStepForm,\r\n OrganizationForm,\r\n OrganizationFormAction,\r\n OrganizationFilterType,\r\n OrganizationToken,\r\n SetCredentials,\r\n OrganizationAttachment,\r\n OrganizationJobType,\r\n OrganizationMaintenancePackage,\r\n OrganizationOilViscosity,\r\n CupiCodeCorespondence,\r\n OrganizationInvoiceRange,\r\n OrganizationOilMappingRequest,\r\n CountryBuffer,\r\n SellerData,\r\n CountrySupport,\r\n PowerBiReport\r\n} from '../interfaces/Organization';\r\nimport { API } from '../helpers/API';\r\nimport { ICRUDService } from './Interfaces/ICRUDService';\r\nimport { CRUDService } from './CRUDService';\r\nimport { OrganizationLight } from '../interfaces/OrganizationLight';\r\n\r\nexport class OrganizationService implements IOrganizationService {\r\n private baseController = '/organization';\r\n\r\n OrganizationToken: ICRUDService;\r\n\r\n constructor() {\r\n this.OrganizationToken = new CRUDService(this.baseController, 'OrganizationToken');\r\n }\r\n public async AddOrganization(organization: Organization): Promise {\r\n return (await API.PostAsync(this.baseController, organization)).data;\r\n }\r\n\r\n public async UpdateOrganization(organization: Organization): Promise {\r\n await API.PutAsync(this.baseController, organization);\r\n }\r\n\r\n public async AddOrganizationType(organization: OrganizationType): Promise {\r\n return (\r\n await API.PostAsync(`${this.baseController}/organizationtype`, organization)\r\n ).data;\r\n }\r\n public async UpdateOrganizationType(organizationTyoe: OrganizationType): Promise {\r\n await API.PutAsync(\r\n `${this.baseController}/organizationtype`,\r\n organizationTyoe\r\n );\r\n }\r\n\r\n public async GetOrganizations(): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/list`,\r\n []\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetByCompanyNumber(companyNumber: string): Promise {\r\n return (\r\n await API.GetAsync(`${this.baseController}/ByCompanyNumber/${companyNumber}`)\r\n ).data;\r\n }\r\n\r\n public async GetOrganizationsByIds(ids: number[]): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/list`,\r\n ids\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetUserOrganizationsByIds(ids: number[]): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/user`,\r\n ids\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetHOOrganizations(countryId: number | null): Promise {\r\n return (await API.GetAsync(`${this.baseController}/HOO/${countryId == null ? '' : countryId}`)).data;\r\n }\r\n\r\n public async GetHOOrganizationsByTypes(types: string[]): Promise {\r\n const typeList = types.join(',');\r\n\r\n return (await API.GetAsync(`${this.baseController}/HO/${typeList}`)).data;\r\n }\r\n public async GetOrganizationsByHO(\r\n hoId: number,\r\n minLevelId: number | null\r\n ): Promise {\r\n if (minLevelId !== null) {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/byHO/${hoId}?minlevelId=${minLevelId}`\r\n )\r\n ).data;\r\n }\r\n\r\n return (await API.GetAsync(`${this.baseController}/byHO/${hoId}`)).data;\r\n }\r\n\r\n public async GetGtOrganization(): Promise {\r\n return (await API.GetAsync(`${this.baseController}/GtOrganization`)).data;\r\n }\r\n\r\n public async GetCurrentOrganization(): Promise {\r\n return (await API.GetAsync(`${this.baseController}/Organization`)).data;\r\n }\r\n\r\n public async GetOrganization(id: number): Promise {\r\n return (await API.GetAsync(`${this.baseController}/Organization/${id}`)).data;\r\n }\r\n \r\n public async GetOrganizationInfo(id: number): Promise {\r\n return (await API.GetAsync(`${this.baseController}/Organization/${id}/info`)).data;\r\n }\r\n\r\n public async GetOrganizationsForTariffPartners(hoId: number, countryId: number | null): Promise {\r\n return (await API.GetAsync(`${this.baseController}/tariffpartners/${hoId}/${countryId == null ? '' : countryId}`))\r\n .data;\r\n }\r\n\r\n public async GetOrganizationHierarchy(hoId: number): Promise {\r\n return (\r\n await API.GetAsync(`${this.baseController}/GetOrganizationHierarchy/${hoId}`)\r\n ).data;\r\n }\r\n\r\n public async GetOrganizationDescendents(parentIds: number[]): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/descendents`,\r\n parentIds\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetOrganizationLevels(orgId: number): Promise {\r\n return (\r\n await API.GetAsync(`${this.baseController}/${orgId}/OrganizationLevels`)\r\n ).data;\r\n }\r\n\r\n public async AddOrganizationLevel(\r\n organizationLevel: OrganizationLevel\r\n ): Promise {\r\n return (\r\n await API.PostAsync(\r\n `${this.baseController}/organizationlevel`,\r\n organizationLevel\r\n )\r\n ).data;\r\n }\r\n\r\n public async UpdateOrganizationLevel(organizationLevel: OrganizationLevel): Promise {\r\n await API.PutAsync(\r\n `${this.baseController}/organizationlevel`,\r\n organizationLevel\r\n );\r\n }\r\n\r\n public async RemoveOrganizationLevel(id: number): Promise {\r\n return (await API.DeleteAsync(`${this.baseController}/organizationlevel/${id}`)).data;\r\n }\r\n\r\n public async GetOrganizationFilters(orgId: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/${orgId}/OrganizationFilters`\r\n )\r\n ).data;\r\n }\r\n public async GetUserOrganizationFilters(orgId: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/OrganizationFilters/listUser/${orgId}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async AddOrganizationFilter(\r\n organizationFilterType: OrganizationFilterType\r\n ): Promise {\r\n return (\r\n await API.PostAsync(\r\n `${this.baseController}/OrganizationFilterType`,\r\n organizationFilterType\r\n )\r\n ).data;\r\n }\r\n\r\n public async RemoveOrganizationFilter(id: number): Promise {\r\n return (await API.DeleteAsync(`${this.baseController}/OrganizationFilterType/${id}`))\r\n .data;\r\n }\r\n\r\n public async GetOrganizationBankAccounts(orgId: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/${orgId}/OrganizationBankAccounts`\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetUserOrganizationBankAccounts(orgId: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/OrganizationBankAccount/listUser/${orgId}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async AddOrganizationBankAccount(\r\n organizationBankAccount: OrganizationBankAccount\r\n ): Promise {\r\n return (\r\n await API.PostAsync(\r\n `${this.baseController}/OrganizationBankAccount`,\r\n organizationBankAccount\r\n )\r\n ).data;\r\n }\r\n\r\n public async UpdateOrganizationBankAccount(\r\n organizationBankAccount: OrganizationBankAccount\r\n ): Promise {\r\n await API.PutAsync(\r\n `${this.baseController}/OrganizationBankAccount`,\r\n organizationBankAccount\r\n );\r\n }\r\n\r\n public async RemoveOrganizationBankAccount(id: number): Promise {\r\n return (await API.DeleteAsync(`${this.baseController}/OrganizationBankAccount/${id}`))\r\n .data;\r\n }\r\n\r\n public async GetOrganizationInterfaces(orgId: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/${orgId}/OrganizationInterfaces`\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetInterfacesWithClientAccess(orgId: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/${orgId}/interfacesWithClientAccess`\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetInterfaceAuthorizeUrl(orgId: number, interfaceId: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/${orgId}/interfacesWithClientAccess/${interfaceId}/authorizeUrl`\r\n )\r\n ).data;\r\n }\r\n\r\n public async AddOrganizationInterface(\r\n organizationInterface: OrganizationInterface\r\n ): Promise {\r\n return (\r\n await API.PostAsync(\r\n `${this.baseController}/OrganizationInterface`,\r\n organizationInterface\r\n )\r\n ).data;\r\n }\r\n\r\n public async UpdateOrganizationInterface(\r\n organizationInterface: OrganizationInterface\r\n ): Promise {\r\n await API.PutAsync(\r\n `${this.baseController}/OrganizationInterface`,\r\n organizationInterface\r\n );\r\n }\r\n\r\n public async SetInterfaceCredentials(param: SetCredentials): Promise {\r\n await API.PutAsync(\r\n `${this.baseController}/${param.orgId}/interfacesWithClientAccess/${param.interfaceId}/setCredentials`,\r\n param\r\n );\r\n }\r\n\r\n public async RemoveOrganizationInterface(id: number): Promise {\r\n return (await API.DeleteAsync(`${this.baseController}/OrganizationInterface/${id}`)).data;\r\n }\r\n\r\n public async GetOrganizationParameters(orgId: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/${orgId}/OrganizationParameters`\r\n )\r\n ).data;\r\n }\r\n\r\n public async AddOrganizationParameter(\r\n organizationParameter: OrganizationParameter\r\n ): Promise {\r\n return (\r\n await API.PostAsync(\r\n `${this.baseController}/OrganizationParameter`,\r\n organizationParameter\r\n )\r\n ).data;\r\n }\r\n\r\n public async UpdateOrganizationParameter(\r\n organizationParameter: OrganizationParameter\r\n ): Promise {\r\n await API.PutAsync(\r\n `${this.baseController}/OrganizationParameter`,\r\n organizationParameter\r\n );\r\n }\r\n\r\n public async RemoveOrganizationParameter(id: number): Promise {\r\n return (await API.DeleteAsync(`${this.baseController}/OrganizationParameter/${id}`)).data;\r\n }\r\n\r\n public async GetOrganizationCaseType(orgId: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/OrganizationCaseType/list/${orgId}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetUserOrganizationCaseType(): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/OrganizationCaseType/listUser/`\r\n )\r\n ).data;\r\n }\r\n\r\n public async AddOrganizationCaseType(\r\n organizationCaseType: OrganizationCaseType\r\n ): Promise {\r\n return (\r\n await API.PostAsync(\r\n `${this.baseController}/organizationcasetype`,\r\n organizationCaseType\r\n )\r\n ).data;\r\n }\r\n\r\n public async UpdateOrganizationCaseType(\r\n organizationCaseType: OrganizationCaseType\r\n ): Promise {\r\n await API.PutAsync(\r\n `${this.baseController}/OrganizationCaseType`,\r\n organizationCaseType\r\n );\r\n }\r\n\r\n public async RemoveOrganizationCaseType(id: number): Promise {\r\n return (await API.DeleteAsync(`${this.baseController}/OrganizationCaseType/${id}`)).data;\r\n }\r\n\r\n public async GetOrganizationCaseTypeStep(\r\n orgCaseTypeId: number\r\n ): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/OrganizationCaseTypeStep/list/${orgCaseTypeId}`\r\n )\r\n ).data;\r\n }\r\n public async GetUserOrganizationCaseTypeStep(\r\n orgCaseTypeId: number\r\n ): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/OrganizationCaseTypeStep/listUser/${orgCaseTypeId}`\r\n )\r\n ).data;\r\n }\r\n public async AddOrganizationCaseTypeStep(\r\n OrganizationCaseTypeStep: OrganizationCaseTypeStep\r\n ): Promise {\r\n return (\r\n await API.PostAsync(\r\n `${this.baseController}/OrganizationCaseTypeStep`,\r\n OrganizationCaseTypeStep\r\n )\r\n ).data;\r\n }\r\n\r\n public async UpdateOrganizationCaseTypeStep(\r\n OrganizationCaseTypeStep: OrganizationCaseTypeStep\r\n ): Promise {\r\n await API.PutAsync(\r\n `${this.baseController}/organizationcasetypestep`,\r\n OrganizationCaseTypeStep\r\n );\r\n }\r\n\r\n public async RemoveOrganizationCaseTypeStep(id: number): Promise {\r\n return (await API.DeleteAsync(`${this.baseController}/organizationcasetypestep/${id}`))\r\n .data;\r\n }\r\n\r\n public async GetOrganizationCaseTypeStepForms(\r\n orgCaseTypeStepId: number\r\n ): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/OrganizationCaseTypeStepForm/list/${orgCaseTypeStepId}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetUserOrganizationCaseTypeStepForms(\r\n orgCaseTypeStepId: number\r\n ): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/OrganizationCaseTypeStepForm/listUser/${orgCaseTypeStepId}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetOrganizationCaseTypeStepForm(id: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/OrganizationCaseTypeStepForm/${id}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async AddOrganizationCaseTypeStepForm(\r\n organizationCaseTypeStepForm: OrganizationCaseTypeStepForm\r\n ): Promise {\r\n return (\r\n await API.PostAsync(\r\n `${this.baseController}/OrganizationCaseTypeStepForm`,\r\n organizationCaseTypeStepForm\r\n )\r\n ).data;\r\n }\r\n\r\n public async UpdateOrganizationCaseTypeStepForm(\r\n organizationCaseTypeStepForm: OrganizationCaseTypeStepForm\r\n ): Promise {\r\n await API.PutAsync(\r\n `${this.baseController}/OrganizationCaseTypeStepForm`,\r\n organizationCaseTypeStepForm\r\n );\r\n }\r\n\r\n public async RemoveOrganizationCaseTypeStepForm(id: number): Promise {\r\n return (\r\n await API.DeleteAsync(`${this.baseController}/OrganizationCaseTypeStepForm/${id}`)\r\n ).data;\r\n }\r\n\r\n public async GetOrganizationForms(): Promise {\r\n return (\r\n await API.GetAsync(`${this.baseController}/referential/organizationform`)\r\n ).data;\r\n }\r\n\r\n public async GetOrganizationForm(orgForm: number): Promise {\r\n return (\r\n await API.GetAsync(`${this.baseController}/referential/organizationform`)\r\n ).data;\r\n }\r\n\r\n public async UpdateOrganizationForm(organizationForm: OrganizationForm): Promise {\r\n await API.PutAsync(\r\n `${this.baseController}/organizationform`,\r\n organizationForm\r\n );\r\n }\r\n\r\n public async GetOrganizationFormActions(orgFormId: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/OrganizationCaseTypeStepForm/list/${orgFormId}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async AddOrganizationFormAction(\r\n organizationFormAction: OrganizationFormAction\r\n ): Promise {\r\n return (\r\n await API.PostAsync(\r\n `${this.baseController}/OrganizationCaseTypeStepForm`,\r\n organizationFormAction\r\n )\r\n ).data;\r\n }\r\n\r\n public async RemoveOrganizationFormAction(id: number): Promise {\r\n return (\r\n await API.DeleteAsync(`${this.baseController}/OrganizationCaseTypeStepForm/${id}`)\r\n ).data;\r\n }\r\n\r\n public async AddLogo(id: number, file: File): Promise {\r\n const formData = new FormData();\r\n\r\n formData.append('logo', file);\r\n\r\n await API.PostAsync(`${this.baseController}/${id}/Logo`, formData);\r\n }\r\n\r\n public async GetLogo(id: number): Promise {\r\n return (await API.GetFileAsync(`${this.baseController}/${id}/Logo`)).data;\r\n }\r\n\r\n public async AddOrganizationAttachments(organizationAttachments: OrganizationAttachment[]): Promise {\r\n const formData = new FormData();\r\n formData.append('organizationId', organizationAttachments[0].organizationId.toString());\r\n organizationAttachments.forEach((item) => {\r\n formData.append('files', item.file);\r\n });\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/attachment`,\r\n formData\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetOrganizationAttachments(organizationId: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/attachments/${organizationId}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetOrganizationAdminAttachments(): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/attachments`\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetOrganizationAttachment(fileName: string): Promise {\r\n return (await API.GetFileAsync(`${this.baseController}/attachment/${fileName}`)).data;\r\n }\r\n\r\n public async RemoveOrganizationAttachment(fileName: string): Promise {\r\n await API.DeleteAsync(`${this.baseController}/attachment/${fileName}`);\r\n }\r\n\r\n \r\n public async GetMavoHOOrganizations(): Promise {\r\n return (await API.GetAsync(`${this.baseController}/mavo/HO`)).data;\r\n }\r\n\r\n public async AddOrganizationJobType(organizationJobTypes: OrganizationJobType[]): Promise {\r\n await API.PostAsync(\r\n `${this.baseController}/OrganizationJobType/list`,\r\n organizationJobTypes\r\n );\r\n }\r\n\r\n public async RemoveOrganizationJobType(id: number): Promise {\r\n return (await API.DeleteAsync(`${this.baseController}/OrganizationJobType/${id}`))\r\n .data;\r\n }\r\n\r\n public async GetOrganizationJobTypes(orgId: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/OrganizationJobType/list/${orgId}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetUserOrganizationJobTypes(orgId: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/OrganizationJobType/listUser/${orgId}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async AddOrganizationMaintenancePackage(organizationMaintenancePackages: OrganizationMaintenancePackage[]): Promise {\r\n await API.PostAsync(\r\n `${this.baseController}/OrganizationMaintenancePackage/list`,\r\n organizationMaintenancePackages\r\n );\r\n }\r\n\r\n public async RemoveOrganizationMaintenancePackage(id: number): Promise {\r\n return (await API.DeleteAsync(`${this.baseController}/OrganizationMaintenancePackage/${id}`))\r\n .data;\r\n }\r\n\r\n public async GetOrganizationMaintenancePackages(orgId: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/OrganizationMaintenancePackage/list/${orgId}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetUserOrganizationMaintenancePackages(orgId: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/OrganizationMaintenancePackage/listUser/${orgId}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async AddOrganizationOilViscosity(organizationOilViscosity: OrganizationOilViscosity): Promise {\r\n await API.PostAsync(\r\n `${this.baseController}/OrganizationOilViscosity`,\r\n organizationOilViscosity\r\n );\r\n }\r\n\r\n public async UpdateOrganizationOilViscosity(\r\n organizationOilViscosity: OrganizationOilViscosity\r\n ): Promise {\r\n await API.PutAsync(\r\n `${this.baseController}/OrganizationOilViscosity`,\r\n organizationOilViscosity\r\n );\r\n }\r\n\r\n public async RemoveOrganizationOilViscosity(id: number): Promise {\r\n return (await API.DeleteAsync(`${this.baseController}/OrganizationOilViscosity/${id}`))\r\n .data;\r\n }\r\n\r\n public async GetOrganizationOilViscosities(orgId: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/OrganizationOilViscosity/list/${orgId}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async CupiCodeCorespondenceList(): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/GtCupiCodeCorespondence/listUser`\r\n )\r\n ).data;\r\n }\r\n\r\n public async AddCupiCodeCorespondence(cupiCodeCorespondence: CupiCodeCorespondence): Promise {\r\n await API.PostAsync(\r\n `${this.baseController}/GtCupiCodeCorespondence`,\r\n cupiCodeCorespondence\r\n );\r\n }\r\n\r\n public async UpdateCupiCodeCorespondence(\r\n cupiCodeCorespondence: CupiCodeCorespondence\r\n ): Promise {\r\n await API.PutAsync(\r\n `${this.baseController}/GtCupiCodeCorespondence`,\r\n cupiCodeCorespondence\r\n );\r\n }\r\n\r\n public async RemoveCupiCodeCorespondence(id: number): Promise {\r\n return (await API.DeleteAsync(`${this.baseController}/GtCupiCodeCorespondence/${id}`))\r\n .data;\r\n }\r\n\r\n public async AddOrganizationInvoiceRange(organizationInvoiceRange: OrganizationInvoiceRange): Promise {\r\n await API.PostAsync(\r\n `${this.baseController}/OrganizationInvoiceRange`,\r\n organizationInvoiceRange\r\n );\r\n }\r\n\r\n public async UpdateOrganizationInvoiceRange(organizationInvoiceRange: OrganizationInvoiceRange): Promise {\r\n await API.PutAsync(\r\n `${this.baseController}/OrganizationInvoiceRange`,\r\n organizationInvoiceRange\r\n );\r\n }\r\n\r\n public async RemoveOrganizationInvoiceRange(id: number): Promise {\r\n return (await API.DeleteAsync(`${this.baseController}/OrganizationInvoiceRange/${id}`))\r\n .data;\r\n }\r\n\r\n public async GetOrganizationInvoiceRanges(orgId: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/OrganizationInvoiceRange/list/${orgId}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetSupplierStockOrganization(types: string): Promise {\r\n return (await API.GetAsync(`${this.baseController}/supplierStock/${types}`)).data;\r\n }\r\n\r\n public async GetOrganizationOilMapping(request: OrganizationOilMappingRequest): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/oil-mapping`,\r\n request\r\n )\r\n ).data;\r\n }\r\n\r\n public async AddCountryBuffer(countryBuffer: CountryBuffer): Promise {\r\n await API.PostAsync(\r\n `${this.baseController}/CountryBuffer`,\r\n countryBuffer\r\n );\r\n }\r\n\r\n public async UpdateCountryBuffer(countryBuffer: CountryBuffer): Promise {\r\n await API.PutAsync(\r\n `${this.baseController}/CountryBuffer`,\r\n countryBuffer\r\n );\r\n }\r\n\r\n public async RemoveCountryBuffer(id: number): Promise {\r\n return (await API.DeleteAsync(`${this.baseController}/CountryBuffer/${id}`))\r\n .data;\r\n }\r\n \r\n public async GetCountryBuffers(): Promise {\r\n return (await API.GetAsync(`${this.baseController}/CountryBuffer/listUser`)).data;\r\n }\r\n\r\n public async GetCountryBuffer(countryId: number): Promise {\r\n return (await API.GetAsync(`${this.baseController}/CountryBuffer/${countryId}`)).data\r\n }\r\n\r\n public async GetSellerDataList(): Promise {\r\n return (await API.GetAsync(`${this.baseController}/SellerData/listUser`)).data;\r\n }\r\n\r\n public async AddSellerData(sellerData: SellerData): Promise {\r\n return (await API.PostAsync(`${this.baseController}/SellerData`, sellerData)).data;\r\n }\r\n\r\n public async RemoveSellerData(id: number): Promise {\r\n return (await API.DeleteAsync(`${this.baseController}/SellerData/${id}`)).data;\r\n }\r\n\r\n public async UpdateSellerData(sellerData: SellerData): Promise {\r\n await API.PutAsync(`${this.baseController}/SellerData`, sellerData);\r\n }\r\n\r\n public async AddSellerLogo(id: number, file: File): Promise {\r\n const formData = new FormData();\r\n\r\n formData.append('logo', file);\r\n\r\n await API.PostAsync(`${this.baseController}/SellerData/${id}/Logo`, formData);\r\n }\r\n\r\n public async GetSellerLogo(id: number): Promise {\r\n return (await API.GetFileAsync(`${this.baseController}/SellerData/${id}/Logo`)).data;\r\n }\r\n\r\n public async GetUserCountrySupports(): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/CountrySupport/listUser`\r\n )\r\n ).data;\r\n }\r\n\r\n public async AddCountrySupport(\r\n countrySupport: CountrySupport\r\n ): Promise {\r\n return (\r\n await API.PostAsync(\r\n `${this.baseController}/CountrySupport`,\r\n countrySupport\r\n )\r\n ).data;\r\n }\r\n\r\n public async UpdateCountrySupport(\r\n countrySupport: CountrySupport\r\n ): Promise {\r\n await API.PutAsync(\r\n `${this.baseController}/CountrySupport`,\r\n countrySupport\r\n );\r\n }\r\n\r\n public async RemoveCountrySupport(id: number): Promise {\r\n return (await API.DeleteAsync(`${this.baseController}/CountrySupport/${id}`))\r\n .data;\r\n }\r\n\r\n public async GetUserPowerBiReports(): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/PowerBiReport/listUser`\r\n )\r\n ).data;\r\n }\r\n\r\n public async AddPowerBiReport(\r\n powerBiReport: PowerBiReport\r\n ): Promise {\r\n return (\r\n await API.PostAsync(\r\n `${this.baseController}/PowerBiReport`,\r\n powerBiReport\r\n )\r\n ).data;\r\n }\r\n\r\n public async UpdatePowerBiReport(\r\n powerBiReport: PowerBiReport\r\n ): Promise {\r\n await API.PutAsync(\r\n `${this.baseController}/PowerBiReport`,\r\n powerBiReport\r\n );\r\n }\r\n\r\n public async RemovePowerBiReport(id: number): Promise {\r\n return (await API.DeleteAsync(`${this.baseController}/PowerBiReport/${id}`))\r\n .data;\r\n }\r\n\r\n public async GetPowerBiReportByCode(code: string): Promise {\r\n return (await API.GetAsync(`${this.baseController}/powerBi/${code}`))\r\n .data;\r\n }\r\n}\r\n","export default __webpack_public_path__ + \"static/media/carfix_newlogo.9cba7b97.svg\";","import React, { Fragment } from 'react';\r\n\r\nimport clsx from 'clsx';\r\nimport { Link } from 'react-router-dom';\r\n\r\nimport { IconButton, Box } from '@material-ui/core';\r\n\r\nimport { connect } from 'react-redux';\r\n\r\nimport projectLogo from '../../assets/images/carfix_newlogo.svg';\r\n\r\nimport { ThemeActionCreators } from '../../store';\r\n\r\nimport MenuOpenRoundedIcon from '@material-ui/icons/MenuOpenRounded';\r\nimport MenuRoundedIcon from '@material-ui/icons/MenuRounded';\r\n\r\nconst SidebarHeader = (props) => {\r\n const toggleSidebar = () => {\r\n setSidebarToggle(!sidebarToggle);\r\n };\r\n const toggleSidebarMobile = () => {\r\n setSidebarToggleMobile(!sidebarToggleMobile);\r\n };\r\n\r\n const {\r\n sidebarToggleMobile,\r\n setSidebarToggleMobile,\r\n setSidebarToggle,\r\n sidebarToggle,\r\n sidebarHover\r\n } = props;\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \"ClaimBox\"\r\n \r\n \r\n \r\n \r\n \r\n {sidebarToggle ? : }\r\n \r\n \r\n \r\n \r\n {sidebarToggleMobile ? : }\r\n \r\n \r\n \r\n \r\n );\r\n};\r\nconst mapStateToProps = (state) => ({\r\n sidebarToggle: state.themeOptions.sidebarToggle,\r\n sidebarHover: state.themeOptions.sidebarHover,\r\n sidebarToggleMobile: state.themeOptions.sidebarToggleMobile\r\n});\r\n\r\nconst mapDispatchToProps = (dispatch) => ({\r\n setSidebarToggleMobile: (enable) => dispatch(ThemeActionCreators.setSidebarToggleMobile(enable))\r\n});\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(SidebarHeader);\r\n","export const numberFormat = (num: number, decimalPlaces = 0, prefix = '', suffix = '') => {\r\n const numToDisplay =\r\n num > 999\r\n ? num?.toFixed(decimalPlaces).replace(/(\\d)(?=(\\d{3})+(?!\\d))/g, '$1,')\r\n : num?.toFixed(decimalPlaces);\r\n\r\n return prefix + numToDisplay + suffix;\r\n};\r\n","import React, { useState, forwardRef } from 'react';\r\nimport { NavLink as RouterLink } from 'react-router-dom';\r\nimport clsx from 'clsx';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { ListItem, Button, Collapse } from '@material-ui/core';\r\n\r\nimport ExpandLessIcon from '@material-ui/icons/ExpandLess';\r\n\r\nconst CustomRouterLink = forwardRef(function CustomLink(props, ref) {\r\n return (\r\n
\r\n \r\n
\r\n );\r\n});\r\n\r\nconst SidebarMenuListItem = (props) => {\r\n const {\r\n title,\r\n href,\r\n depth,\r\n children,\r\n icon: Icon,\r\n className,\r\n redirectTo,\r\n open: openProp,\r\n label: Label,\r\n needToken,\r\n user,\r\n ...rest\r\n } = props;\r\n\r\n const [open, setOpen] = useState(openProp);\r\n\r\n const handleToggle = () => {\r\n setOpen((open) => !open);\r\n };\r\n\r\n let paddingLeft = 14;\r\n\r\n if (depth > 0) {\r\n paddingLeft = 32 + 20 * depth;\r\n }\r\n\r\n const style = {\r\n paddingLeft\r\n };\r\n\r\n if (children) {\r\n return (\r\n \r\n \r\n {Icon && }\r\n {title}\r\n {open ? (\r\n \r\n ) : (\r\n \r\n )}\r\n \r\n {children}\r\n \r\n );\r\n } else {\r\n return (\r\n \r\n {redirectTo ?\r\n window.open(`${redirectTo}${needToken ? `access_token=${user.access_token}`:''}`)}\r\n >\r\n {Icon && }\r\n {title}\r\n {Label && (\r\n \r\n \r\n )}\r\n :\r\n {Icon && }\r\n {title}\r\n {Label && (\r\n \r\n \r\n )}\r\n \r\n }\r\n \r\n );\r\n }\r\n};\r\n\r\nSidebarMenuListItem.propTypes = {\r\n children: PropTypes.node,\r\n className: PropTypes.string,\r\n depth: PropTypes.number.isRequired,\r\n href: PropTypes.string,\r\n icon: PropTypes.any,\r\n label: PropTypes.any,\r\n open: PropTypes.bool,\r\n title: PropTypes.string.isRequired,\r\n redirectTo:PropTypes.string,\r\n needToken:PropTypes.bool,\r\n};\r\n\r\nSidebarMenuListItem.defaultProps = {\r\n depth: 0,\r\n open: false\r\n};\r\n\r\nexport default SidebarMenuListItem;\r\n","import React, { useContext } from 'react';\r\nimport { matchPath } from 'react-router-dom';\r\n\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { List, Typography } from '@material-ui/core';\r\n\r\nimport useRouter from '../../utils/useRouter'; //'utils/useRouter';\r\nimport SidebarMenuListItem from './SidebarMenuListItem';\r\nimport { ApplicationContext } from '../../context/Contexts';\r\nimport { ThemeActionCreators } from '../../store';\r\nimport { RoleClaimsEnum } from './../../helpers/Constants';\r\n\r\nconst SidebarMenuList = (props) => {\r\n const { pages, user, propsContainer, ...rest } = props;\r\n const context = useContext(ApplicationContext);\r\n const translatorService = context.translatorService;\r\n\r\n return (\r\n \r\n {pages.reduce(\r\n (items, page) => reduceChildRoutes({ items, page, user, translatorService, propsContainer, ...rest }),\r\n []\r\n )}\r\n \r\n );\r\n};\r\n\r\nSidebarMenuList.propTypes = {\r\n depth: PropTypes.number,\r\n pages: PropTypes.array\r\n};\r\n\r\nconst createHref = (page, user) =>{\r\n switch(true){\r\n case RoleClaimsEnum.AdminService.toString() && page.to == \"/admin/hoorganizations/\":\r\n return page.to + user.profile.organization_id\r\n case page.to == '/v3/sample-page':\r\n return page.to + `?access_token=${user.access_token}`\r\n default:\r\n return page.to\r\n }\r\n}\r\n\r\nconst reduceChildRoutes = (props) => {\r\n const { router, items, page, depth, user, translatorService, propsContainer } = props;\r\n\r\n if (page.rights) {\r\n if (!page.rights.some(right => user.profile.role.includes(right))) {\r\n return items;\r\n }\r\n } else {\r\n if (!user.profile.role.includes(page.right)) {\r\n return items;\r\n }\r\n }\r\n\r\n if (page.content) {\r\n const open = matchPath(router.location.pathname, {\r\n path: page.to,\r\n exact: false\r\n });\r\n\r\n items.push(\r\n \r\n
\r\n \r\n
\r\n \r\n );\r\n } else {\r\n items.push(\r\n {\r\n propsContainer.props.dispatch(ThemeActionCreators.setSidebarToggleMobile(false));\r\n }} \r\n />\r\n );\r\n }\r\n\r\n return items;\r\n};\r\n\r\nconst SidebarMenu = (props) => {\r\n const { title, pages, className, user, component: Component, ...rest } = props;\r\n\r\n const router = useRouter();\r\n\r\n return (\r\n \r\n {title && {title}}\r\n \r\n \r\n );\r\n};\r\n\r\nSidebarMenu.propTypes = {\r\n className: PropTypes.string,\r\n component: PropTypes.any,\r\n pages: PropTypes.array.isRequired,\r\n title: PropTypes.string\r\n};\r\n\r\nSidebarMenu.defaultProps = {\r\n component: 'nav'\r\n};\r\n\r\nexport default SidebarMenu;\r\n","import { useContext } from 'react';\r\nimport { __RouterContext } from 'react-router';\r\n\r\nexport default () => useContext(__RouterContext);\r\n","import { Log, User, UserManager } from 'oidc-client';\r\nimport { IAuthService } from './Interfaces/IAuthService';\r\n\r\nimport { ClientSettings } from '../helpers/Constants';\r\n\r\nexport class AuthService implements IAuthService {\r\n public userManager: UserManager;\r\n\r\n constructor() {\r\n this.userManager = new UserManager(ClientSettings);\r\n this.userManager.events.addUserSignedOut(() => {\r\n this.userManager\r\n .signoutRedirect()\r\n .then((resp) => {\r\n console.log('Success');\r\n })\r\n .catch((err) => {\r\n console.log(err);\r\n });\r\n });\r\n\r\n Log.logger = console;\r\n Log.level = Log.INFO;\r\n }\r\n\r\n public async getUserAsync(): Promise {\r\n return this.userManager.getUser();\r\n }\r\n\r\n public async loginAsync(): Promise {\r\n return this.userManager.signinRedirect({ state: window.location.pathname });\r\n }\r\n\r\n public async renewTokenAsync(): Promise {\r\n return this.userManager.signinSilent();\r\n }\r\n\r\n public async logoutAsync(): Promise {\r\n return this.userManager.signoutRedirect();\r\n }\r\n\r\n public async checkState(): Promise {\r\n const user = await this.getUserAsync();\r\n\r\n if (user === null) {\r\n return this.loginAsync();\r\n }\r\n if (user!.id_token === null) {\r\n return this.loginAsync();\r\n }\r\n if (user!.expired) {\r\n return this.loginAsync();\r\n }\r\n }\r\n}\r\n","import { API } from '../helpers/API';\r\nimport { ICRUDService } from './Interfaces/ICRUDService';\r\n\r\nexport class CRUDService implements ICRUDService {\r\n private baseController = '';\r\n private itemController = '';\r\n\r\n constructor(controller: string, itemController: string) {\r\n this.baseController = controller;\r\n this.itemController = itemController;\r\n }\r\n\r\n public async Get(id: number): Promise {\r\n return (await API.GetAsync(`${this.baseController}/${this.itemController}/list/${id}`))\r\n .data;\r\n }\r\n\r\n public async GetUser(id: number | null): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/${this.itemController}/listUser/${id === null ? '' : id}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async Add(item: T): Promise {\r\n return (await API.PostAsync(`${this.baseController}/${this.itemController}`, item)).data;\r\n }\r\n\r\n public async SaveList(items: T[]): Promise {\r\n await API.PostAsync(`${this.baseController}/${this.itemController}/list`, items);\r\n }\r\n\r\n public async Update(item: T): Promise {\r\n await API.PutAsync(`${this.baseController}/${this.itemController}`, item);\r\n }\r\n\r\n public async Remove(id: number): Promise {\r\n return (await API.DeleteAsync(`${this.baseController}/${this.itemController}/${id}`))\r\n .data;\r\n }\r\n}\r\n","import { IAppUserService } from './Interfaces/IAppUserService';\r\nimport {\r\n AppUser,\r\n AppuserList,\r\n AppUserRoleList,\r\n AppUserAppUserRole,\r\n AppUserRole,\r\n AppUserRoleClaimList,\r\n AppUserRoleClaim\r\n} from '../interfaces/AppUser';\r\nimport { API } from '../helpers/API';\r\n\r\nexport class AppUserService implements IAppUserService {\r\n private baseAdminController = '/IdentityAdmin';\r\n private baseController = '/Identity';\r\n\r\n public async ResetPassword(userId: string): Promise {\r\n await API.PostAsync(`${this.baseAdminController}/resetpassword/${userId}`, null);\r\n }\r\n\r\n public async AddUser(appuser: AppUser): Promise {\r\n return (await API.PostAsync(`${this.baseAdminController}/add`, appuser)).data;\r\n }\r\n\r\n public async UpdateUser(appUser: AppUser): Promise {\r\n await API.PutAsync(`${this.baseAdminController}/update`, appUser);\r\n }\r\n\r\n public async GetAppUsers(\r\n search: string,\r\n page?: number,\r\n rowsPerPage?: number\r\n ): Promise {\r\n const params = `searchText=${search === undefined ? '' : search}&page=${\r\n page === undefined ? '' : page\r\n }&pageSize=${rowsPerPage === undefined ? '' : rowsPerPage}`;\r\n return (\r\n await API.GetAsync(\r\n `${this.baseAdminController}/SearchWithOrganization?${params}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetUserAppUsers(\r\n search: string,\r\n orgIds?: string,\r\n page?: number,\r\n rowsPerPage?: number\r\n ): Promise {\r\n const params = `searchText=${search === undefined ? '' : search}&orgIds=${\r\n orgIds === undefined ? '' : orgIds\r\n }&page=${page === undefined ? '' : page}&pageSize=${\r\n rowsPerPage === undefined ? '' : rowsPerPage\r\n }`;\r\n return (\r\n await API.GetAsync(\r\n `${this.baseAdminController}/SearchInUserOrgWithOrganization?${params}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetMavoUserAppUsers(\r\n search: string,\r\n orgIds?: string,\r\n page?: number,\r\n rowsPerPage?: number\r\n ): Promise {\r\n const params = `searchText=${search === undefined ? '' : search}&orgIds=${\r\n orgIds === undefined ? '' : orgIds\r\n }&page=${page === undefined ? '' : page}&pageSize=${\r\n rowsPerPage === undefined ? '' : rowsPerPage\r\n }`;\r\n return (\r\n await API.GetAsync(\r\n `${this.baseAdminController}/SearchInMavoUserOrgWithOrganization?${params}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetAppUser(id: string): Promise {\r\n return (await API.GetAsync(`${this.baseAdminController}/get/${id}`)).data;\r\n }\r\n public async GetUserInfo(id: string): Promise {\r\n return (await API.GetAsync(`${this.baseAdminController}/UserInfo/${id}`)).data;\r\n }\r\n\r\n public async GetUsersInfo(ids: string[]): Promise {\r\n if (ids.length === 0) {\r\n return [];\r\n }\r\n\r\n return (await API.Post2Async(`${this.baseAdminController}/UsersInfo`, ids))\r\n .data;\r\n }\r\n\r\n public async GetProfile(): Promise {\r\n return (await API.GetAsync(`${this.baseAdminController}/profile`)).data;\r\n }\r\n\r\n public async GetUserAppUserRoles(\r\n userId: string,\r\n page: number,\r\n rowsPerPage: number\r\n ): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseAdminController}/GetUserRoles?userId=${userId}&searchText=&page=${page}&pageSize=${rowsPerPage}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async AddAppUserRole(userUserRole: AppUserAppUserRole): Promise {\r\n await API.PostAsync(\r\n `${this.baseAdminController}/AddUserRole`,\r\n userUserRole\r\n );\r\n }\r\n\r\n public async DeleteAppUserRole(userUserRole: AppUserAppUserRole): Promise {\r\n await API.DeleteAsync(\r\n `${this.baseAdminController}/RemoveUserRole?userId=${userUserRole.userId}&roleId=${userUserRole.roleId}`\r\n );\r\n }\r\n\r\n public async GetAppUserRoles(\r\n search?: string,\r\n page?: number,\r\n rowsPerPage?: number\r\n ): Promise {\r\n const params = `searchText=${search === undefined ? '' : search}&page=${\r\n page === undefined ? '' : page\r\n }&pageSize=${rowsPerPage === undefined ? '' : rowsPerPage}`;\r\n return (await API.GetAsync(`${this.baseAdminController}/GetRoles?${params}`))\r\n .data;\r\n }\r\n\r\n public async AddRole(role: AppUserRole): Promise {\r\n return (await API.PostAsync(`${this.baseAdminController}/addRole`, role)).data;\r\n }\r\n\r\n public async UpdateRole(role: AppUserRole): Promise {\r\n await API.PutAsync(`${this.baseAdminController}/updateRole`, role);\r\n }\r\n\r\n public async GetAppUserRole(id: string): Promise {\r\n return (await API.GetAsync(`${this.baseAdminController}/getrole/${id}`)).data;\r\n }\r\n\r\n public async GetAppUserRoleClaims(\r\n roleId: string | null,\r\n page: number,\r\n rowsPerPage: number\r\n ): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseAdminController}/GetRoleClaims?roleId=${roleId}&searchText=&page=${page}&pageSize=${rowsPerPage}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async AddRoleClaim(roleClaim: AppUserRoleClaim): Promise {\r\n await API.PostAsync(`${this.baseAdminController}/addRoleClaim`, roleClaim);\r\n }\r\n\r\n public async DeleteRoleClaim(roleClaim: AppUserRoleClaim): Promise {\r\n await API.DeleteAsync(\r\n `${this.baseAdminController}/RemoveRoleClaim?roleid=${roleClaim.roleId}&claimid=${roleClaim.claimId}`\r\n );\r\n }\r\n}\r\n","import { IReferentialService } from './Interfaces/IReferentialService';\r\nimport { IReferential } from '../interfaces/IReferential';\r\nimport { API } from '../helpers/API';\r\nimport { ICache } from '../interfaces/Icache';\r\n\r\nexport class ReferentialService implements IReferentialService {\r\n private cache: ICache[];\r\n\r\n constructor(cache: ICache[]) {\r\n this.cache = cache;\r\n }\r\n\r\n public async Get(url: string): Promise {\r\n const res = this.cache.find((item) => item.url === url);\r\n if (res !== undefined) {\r\n return res.values;\r\n }\r\n\r\n const response = await API.GetAsync(url);\r\n\r\n this.cache.push({ url: url, values: response.data });\r\n\r\n return response.data;\r\n }\r\n public async GetFromDB(url: string): Promise {\r\n const response = await API.GetAsync(url);\r\n return response.data;\r\n }\r\n\r\n public async Add(referential: IReferential, url: string): Promise {\r\n return (await API.PostAsync(url, referential)).data;\r\n }\r\n public async Update(referential: IReferential, url: string): Promise {\r\n await API.PutAsync(url, referential);\r\n }\r\n Delete(referencial: IReferential, url: string): Promise {\r\n throw new Error('Method not implemented.');\r\n }\r\n}\r\n","import { IWorkflowService } from './Interfaces/IWorkflowService';\r\nimport {\r\n Workflow,\r\n WorkflowParameter,\r\n WorkflowPartnerType,\r\n WorkflowPartner,\r\n WorkflowOptimization,\r\n WorkflowTariff,\r\n WorkflowSection,\r\n WorkflowSectionStep,\r\n WorkflowSectionStepForm,\r\n WorkflowSupplier,\r\n WorkflowReminder,\r\n WorkflowDocumentType,\r\n WorkflowCalculation,\r\n WorkflowPermission,\r\n WorkflowForm,\r\n EmailTemplate,\r\n WorkflowFormReport,\r\n WorkflowFormAction,\r\n WorkflowFormInterface,\r\n WorkflowSectionStepCaseStatus,\r\n WorkflowInterface,\r\n WorkflowCostCenter,\r\n WorkflowSupplierDiscount\r\n} from '../interfaces/Workflow';\r\nimport { API } from '../helpers/API';\r\nimport { IReferential } from '../interfaces/IReferential';\r\n\r\nexport class WorkflowService implements IWorkflowService {\r\n\r\n private baseController = '/workflow';\r\n\r\n public async GetWorkflows(orgId: number): Promise {\r\n return (await API.GetAsync(`${this.baseController}/byorganization/${orgId}`)).data;\r\n }\r\n\r\n public async GetUserWorkflows(): Promise {\r\n return (await API.GetAsync(`${this.baseController}/listUser`)).data;\r\n }\r\n\r\n public async GetTariffWorkflowsCount(tariffId: number): Promise {\r\n return (await API.GetAsync(`${this.baseController}/tariff/${tariffId}/count`)).data;\r\n }\r\n\r\n public async GetWorkflow(workflowId: number): Promise {\r\n return (await API.GetAsync(`${this.baseController}/${workflowId}`)).data;\r\n }\r\n public async GetUserWorkflow(workflowId: number): Promise {\r\n return (await API.GetAsync(`${this.baseController}/user/${workflowId}`)).data;\r\n }\r\n\r\n public async GetWorkflowSettings(workflowId: number): Promise {\r\n return (await API.GetAsync(`${this.baseController}/${workflowId}/settings`)).data;\r\n }\r\n\r\n public async GetWorkflowSettingsForVehiclesTab(workflowId: number): Promise {\r\n return (await API.GetAsync(`${this.baseController}/${workflowId}/settingsForVehiclesTab`)).data;\r\n }\r\n\r\n public async AddWorkflow(workflow: Workflow): Promise {\r\n return (await API.PostAsync(`${this.baseController}`, workflow)).data;\r\n }\r\n\r\n public async UpdateWorkflow(workflow: Workflow): Promise {\r\n await API.PutAsync(`${this.baseController}`, workflow);\r\n }\r\n\r\n public async GetWorkflowParameters(workflowId: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/${workflowId}/WorkflowParameters`\r\n )\r\n ).data;\r\n }\r\n public async GetUserWorkflowParameters(workflowId: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/${workflowId}/user/WorkflowParameters`\r\n )\r\n ).data;\r\n }\r\n\r\n public async AddWorkflowParameter(\r\n workflowParameter: WorkflowParameter\r\n ): Promise {\r\n return (\r\n await API.PostAsync(\r\n `${this.baseController}/WorkflowParameter`,\r\n workflowParameter\r\n )\r\n ).data;\r\n }\r\n\r\n public async UpdateWorkflowParameter(workflowParameter: WorkflowParameter): Promise {\r\n await API.PutAsync(\r\n `${this.baseController}/WorkflowParameter`,\r\n workflowParameter\r\n );\r\n }\r\n\r\n public async RemoveWorkflowParameter(id: number): Promise {\r\n return (await API.DeleteAsync(`${this.baseController}/WorkflowParameter/${id}`)).data;\r\n }\r\n\r\n public async GetWorkflowOrganizationTypes(workflowId: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/${workflowId}/WorkflowPartnerTypes`\r\n )\r\n ).data;\r\n }\r\n\r\n public async AddWorkflowOrganizationType(\r\n workflowOrgType: WorkflowPartnerType\r\n ): Promise {\r\n return (\r\n await API.PostAsync(\r\n `${this.baseController}/WorkflowPartnerType`,\r\n workflowOrgType\r\n )\r\n ).data;\r\n }\r\n\r\n public async RemoveWorkflowOrganizationType(id: number): Promise {\r\n return (await API.DeleteAsync(`${this.baseController}/WorkflowPartnerType/${id}`)).data;\r\n }\r\n\r\n public async GetWorkflowPartners(workflowId: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/WorkflowPartner/list/${workflowId}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetUserWorkflowPartners(workflowId: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/WorkflowPartner/listUser/${workflowId}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async AddWorkflowPartner(workflowPartners: WorkflowPartner[]): Promise {\r\n await API.PostAsync(\r\n `${this.baseController}/WorkflowPartner/list`,\r\n workflowPartners\r\n );\r\n }\r\n\r\n public async UpdateWorkflowPartner(workflowPartner: WorkflowPartner): Promise {\r\n await API.PutAsync(`${this.baseController}/WorkflowPartner`, workflowPartner);\r\n }\r\n\r\n public async GetWorkflowOptimizations(workflowId: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/WorkflowOptimization/list/${workflowId}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async AddWorkflowOptimization(\r\n workflowOptimization: WorkflowOptimization\r\n ): Promise {\r\n return (\r\n await API.PostAsync(\r\n `${this.baseController}/WorkflowOptimization`,\r\n workflowOptimization\r\n )\r\n ).data;\r\n }\r\n\r\n public async UpdateWorkflowOptimization(\r\n workflowOptimization: WorkflowOptimization\r\n ): Promise {\r\n await API.PutAsync(\r\n `${this.baseController}/WorkflowOptimization`,\r\n workflowOptimization\r\n );\r\n }\r\n\r\n public async RemoveWorkflowOptimization(id: number): Promise {\r\n return (await API.DeleteAsync(`${this.baseController}/WorkflowOptimization/${id}`)).data;\r\n }\r\n\r\n public async GetWorkflowTariffs(workflowId: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/WorkflowTariff/list/${workflowId}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetUserWorkflowTariffs(workflowId: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/WorkflowTariff/listUser/${workflowId}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async AddWorkflowTariff(workflowTariff: WorkflowTariff): Promise {\r\n return (\r\n await API.PostAsync(`${this.baseController}/WorkflowTariff`, workflowTariff)\r\n ).data;\r\n }\r\n\r\n public async UpdateWorkflowTariff(workflowTariff: WorkflowTariff): Promise {\r\n await API.PutAsync(`${this.baseController}/WorkflowTariff`, workflowTariff);\r\n }\r\n\r\n public async GetWorkflowSections(workflowId: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/WorkflowSection/list/${workflowId}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async AddWorkflowSection(workflowSection: WorkflowSection): Promise {\r\n return (\r\n await API.PostAsync(\r\n `${this.baseController}/WorkflowSection`,\r\n workflowSection\r\n )\r\n ).data;\r\n }\r\n\r\n public async UpdateWorkflowSection(workflowSection: WorkflowSection): Promise {\r\n await API.PutAsync(`${this.baseController}/WorkflowSection`, workflowSection);\r\n }\r\n\r\n public async RemoveWorkflowSection(id: number): Promise {\r\n return (await API.DeleteAsync(`${this.baseController}/WorkflowSection/${id}`)).data;\r\n }\r\n\r\n public async GetWorkflowSectionSteps(workflowSectionId: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/WorkflowSectionStep/list/${workflowSectionId}`\r\n )\r\n ).data;\r\n }\r\n public async GetWorkflowSteps(workflowId: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/WorkflowSectionStep/listSteps/${workflowId}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async AddWorkflowSectionStep(\r\n workflowSectionStep: WorkflowSectionStep\r\n ): Promise {\r\n return (\r\n await API.PostAsync(\r\n `${this.baseController}/WorkflowSectionStep`,\r\n workflowSectionStep\r\n )\r\n ).data;\r\n }\r\n\r\n public async UpdateWorkflowSectionStep(workflowSectionStep: WorkflowSectionStep): Promise {\r\n await API.PutAsync(\r\n `${this.baseController}/WorkflowSectionStep`,\r\n workflowSectionStep\r\n );\r\n }\r\n\r\n public async RemoveWorkflowStep(id: number): Promise {\r\n return (await API.DeleteAsync(`${this.baseController}/WorkflowSectionStep/${id}`)).data;\r\n }\r\n\r\n public async GetWorkflowSectionStepForms(\r\n workflowSectionStepId: number\r\n ): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/WorkflowSectionStepForm/list/${workflowSectionStepId}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetWorkflowSectionStepForm(id: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/WorkflowSectionStepForm/${id}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async AddWorkflowSectionStepForm(\r\n workflowSectionStepForm: WorkflowSectionStepForm\r\n ): Promise {\r\n return (\r\n await API.PostAsync(\r\n `${this.baseController}/WorkflowSectionStepForm`,\r\n workflowSectionStepForm\r\n )\r\n ).data;\r\n }\r\n\r\n public async UpdateWorkflowSectionStepForm(\r\n workflowSectionStepForm: WorkflowSectionStepForm\r\n ): Promise {\r\n await API.PutAsync(\r\n `${this.baseController}/WorkflowSectionStepForm`,\r\n workflowSectionStepForm\r\n );\r\n }\r\n\r\n public async GetWorkflowSectionStepCaseStatuses(\r\n workflowSectionStepId: number\r\n ): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/WorkflowSectionStepCaseStatus/list/${workflowSectionStepId}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async AddWorkflowSectionStepCaseStatus(\r\n workflowSectionStepCaseStatus: WorkflowSectionStepCaseStatus\r\n ): Promise {\r\n return (\r\n await API.PostAsync(\r\n `${this.baseController}/workflowSectionStepCaseStatus`,\r\n workflowSectionStepCaseStatus\r\n )\r\n ).data;\r\n }\r\n\r\n public async RemoveWorkflowSectionStepCaseStatus(id: number): Promise {\r\n return (\r\n await API.DeleteAsync(`${this.baseController}/WorkflowSectionStepCaseStatus/${id}`)\r\n ).data;\r\n }\r\n\r\n public async GetWorkflowForms(): Promise {\r\n return (await API.GetAsync(`${this.baseController}/referential/workflowform`))\r\n .data;\r\n }\r\n\r\n public async RemoveWorkflowForm(id: number): Promise {\r\n return (await API.DeleteAsync(`${this.baseController}/WorkflowSectionStepForm/${id}`))\r\n .data;\r\n }\r\n\r\n public async GetWorkflowSuppliers(workflowId: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/WorkflowSupplier/list/${workflowId}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async AddWorkflowSupplier(workflowSupplier: WorkflowSupplier): Promise {\r\n return (\r\n await API.PostAsync(\r\n `${this.baseController}/WorkflowSupplier`,\r\n workflowSupplier\r\n )\r\n ).data;\r\n }\r\n\r\n public async AddWorkflowSuppliers(workflowSuppliers: WorkflowSupplier[]): Promise {\r\n await API.PostAsync(\r\n `${this.baseController}/WorkflowSupplier/list`,\r\n workflowSuppliers\r\n );\r\n }\r\n public async UpdateWorkflowSupplier(workflowSupplier: WorkflowSupplier): Promise {\r\n await API.PutAsync(\r\n `${this.baseController}/WorkflowSupplier`,\r\n workflowSupplier\r\n );\r\n }\r\n\r\n public async RemoveWorkflowSupplier(id: number): Promise {\r\n return (await API.DeleteAsync(`${this.baseController}/WorkflowSupplier/${id}`)).data;\r\n }\r\n\r\n public async GetWorkflowReminders(workflowId: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/WorkflowNotification/list/${workflowId}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async AddWorkflowReminder(workflowReminder: WorkflowReminder): Promise {\r\n return (\r\n await API.PostAsync(\r\n `${this.baseController}/WorkflowNotification`,\r\n workflowReminder\r\n )\r\n ).data;\r\n }\r\n\r\n public async UpdateWorkflowReminder(workflowReminder: WorkflowReminder): Promise {\r\n await API.PutAsync(\r\n `${this.baseController}/WorkflowNotification`,\r\n workflowReminder\r\n );\r\n }\r\n\r\n public async RemoveWorkflowReminder(id: number): Promise {\r\n return (await API.DeleteAsync(`${this.baseController}/WorkflowNotification/${id}`)).data;\r\n }\r\n\r\n public async GetWorkflowDocumentTypes(workflowId: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/WorkflowDocumentType/list/${workflowId}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async AddWorkflowDocumentType(\r\n workflowDocumentType: WorkflowDocumentType\r\n ): Promise {\r\n return (\r\n await API.PostAsync(\r\n `${this.baseController}/WorkflowDocumentType`,\r\n workflowDocumentType\r\n )\r\n ).data;\r\n }\r\n\r\n public async UpdateWorkflowDocumentType(\r\n workflowDocumentType: WorkflowDocumentType\r\n ): Promise {\r\n await API.PutAsync(\r\n `${this.baseController}/WorkflowDocumentType`,\r\n workflowDocumentType\r\n );\r\n }\r\n\r\n public async RemoveWorkflowDocumentType(id: number): Promise {\r\n return (await API.DeleteAsync(`${this.baseController}/WorkflowDocumentType/${id}`)).data;\r\n }\r\n\r\n public async GetWorkflowFormInterfaces(formId: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/WorkflowFormInterface/list/${formId}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async AddWorkflowFormInterface(\r\n workflowFormInterface: WorkflowFormInterface\r\n ): Promise {\r\n return (\r\n await API.PostAsync(\r\n `${this.baseController}/WorkflowFormInterface`,\r\n workflowFormInterface\r\n )\r\n ).data;\r\n }\r\n\r\n public async UpdateWorkflowFormInterface(\r\n workflowFormInterface: WorkflowFormInterface\r\n ): Promise {\r\n await API.PutAsync(\r\n `${this.baseController}/WorkflowFormInterface`,\r\n workflowFormInterface\r\n );\r\n }\r\n\r\n public async RemoveWorkflowFormInterface(id: number): Promise {\r\n return (await API.DeleteAsync(`${this.baseController}/WorkflowFormInterface/${id}`)).data;\r\n }\r\n\r\n public async GetWorkflowCalculations(workflowId: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/WorkflowCalculation/list/${workflowId}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async AddWorkflowCalculation(\r\n workflowCalculation: WorkflowCalculation\r\n ): Promise {\r\n return (\r\n await API.PostAsync(\r\n `${this.baseController}/WorkflowCalculation`,\r\n workflowCalculation\r\n )\r\n ).data;\r\n }\r\n\r\n public async UpdateWorkflowCalculation(workflowCalculation: WorkflowCalculation): Promise {\r\n await API.PutAsync(\r\n `${this.baseController}/WorkflowCalculation`,\r\n workflowCalculation\r\n );\r\n }\r\n\r\n public async RemoveWorkflowCalculation(id: number): Promise {\r\n return (await API.DeleteAsync(`${this.baseController}/WorkflowCalculation/${id}`)).data;\r\n }\r\n\r\n public async GetWorkflowPermissions(workflowId: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/WorkflowPermission/list/${workflowId}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async AddWorkflowPermission(\r\n workflowPermission: WorkflowPermission\r\n ): Promise {\r\n return (\r\n await API.PostAsync(\r\n `${this.baseController}/WorkflowPermission`,\r\n workflowPermission\r\n )\r\n ).data;\r\n }\r\n\r\n public async UpdateWorkflowPermission(workflowPermission: WorkflowPermission): Promise {\r\n await API.PutAsync(\r\n `${this.baseController}/WorkflowPermission`,\r\n workflowPermission\r\n );\r\n }\r\n\r\n public async RemoveWorkflowPermission(id: number): Promise {\r\n return (await API.DeleteAsync(`${this.baseController}/WorkflowPermission/${id}`)).data;\r\n }\r\n\r\n public async GetWorkflowFormReports(workflowId: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/WorkflowReport/list/${workflowId}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async AddWorkflowFormReport(\r\n workflowReport: WorkflowFormReport\r\n ): Promise {\r\n return (\r\n await API.PostAsync(\r\n `${this.baseController}/workflowReport`,\r\n workflowReport\r\n )\r\n ).data;\r\n }\r\n\r\n public async UpdateWorkflowFormReport(workflowReport: WorkflowFormReport): Promise {\r\n await API.PutAsync(`${this.baseController}/WorkflowReport`, workflowReport);\r\n }\r\n\r\n public async RemoveWorkflowFormReport(id: number): Promise {\r\n return (await API.DeleteAsync(`${this.baseController}/WorkflowReport/${id}`)).data;\r\n }\r\n\r\n public async GetWorkflowSectionStepFormActions(\r\n workflowSectionStepFormId: number\r\n ): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/WorkflowSectionStepFormAction/list/${workflowSectionStepFormId}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async AddWorkflowSectionStepFormAction(\r\n workflowSectionStepFormAction: WorkflowFormAction\r\n ): Promise {\r\n return (\r\n await API.PostAsync(\r\n `${this.baseController}/workflowSectionStepFormAction`,\r\n workflowSectionStepFormAction\r\n )\r\n ).data;\r\n }\r\n\r\n public async AddWorkflowSectionStepFormActions(\r\n workflowSectionStepFormActions: WorkflowFormAction[]\r\n ): Promise {\r\n await API.PostAsync(\r\n `${this.baseController}/workflowSectionStepFormAction/list`,\r\n workflowSectionStepFormActions\r\n );\r\n }\r\n\r\n public async UpdateWorkflowSectionStepAction(\r\n workflowSectionStepFormAction: WorkflowFormAction\r\n ): Promise {\r\n await API.PutAsync(\r\n `${this.baseController}/WorkflowSectionStepFormAction`,\r\n workflowSectionStepFormAction\r\n );\r\n }\r\n\r\n public async RemoveWorkflowSectionStepFormAction(id: number): Promise {\r\n return (\r\n await API.DeleteAsync(`${this.baseController}/WorkflowSectionStepFormAction/${id}`)\r\n ).data;\r\n }\r\n\r\n public async GetEmailTemplates(): Promise {\r\n return (await API.GetAsync(`${this.baseController}/referential/emailtemplate`))\r\n .data;\r\n }\r\n\r\n public async AddEmailTemplate(emailTemplate: EmailTemplate): Promise {\r\n return (\r\n await API.PostAsync(\r\n `${this.baseController}/referential/emailtemplate`,\r\n emailTemplate\r\n )\r\n ).data;\r\n }\r\n\r\n public async UpdateEmailTemplate(emailTemplate: EmailTemplate): Promise {\r\n await API.PutAsync(\r\n `${this.baseController}/referential/emailtemplate`,\r\n emailTemplate\r\n );\r\n }\r\n public async GetWorkflowInterfaces(workflowId: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/WorkflowInterface/list/${workflowId}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async RemoveWorkflowInterface(id: number): Promise {\r\n return (await API.DeleteAsync(`${this.baseController}/WorkflowInterface/${id}`)).data;\r\n }\r\n\r\n public async AddWorkflowInterface(\r\n workflowInterface: WorkflowInterface\r\n ): Promise {\r\n return (\r\n await API.PostAsync(\r\n `${this.baseController}/WorkflowInterface`,\r\n workflowInterface\r\n )\r\n ).data;\r\n }\r\n \r\n public async UpdateWorkflowInterface(\r\n workflowInterface: WorkflowInterface\r\n ): Promise {\r\n await API.PutAsync(\r\n `${this.baseController}/WorkflowInterface`,\r\n workflowInterface\r\n );\r\n }\r\n\r\n public async GetOwnerTariffPartner(workflowId: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/partner-owner-tariff/${workflowId}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetWorkflowCostCenters(workflowId: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/WorkflowCostCenter/list/${workflowId}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetUserWorkflowCostCenters(workflowId: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/WorkflowCostCenter/listUser/${workflowId}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async AddWorkflowCostCenter(workflowCostCenters: WorkflowCostCenter[]): Promise {\r\n await API.PostAsync(\r\n `${this.baseController}/WorkflowCostCenter/list`,\r\n workflowCostCenters\r\n );\r\n }\r\n\r\n public async UpdateWorkflowCostCenter(workflowCostCenter: WorkflowCostCenter): Promise {\r\n await API.PutAsync(`${this.baseController}/WorkflowCostCenter`, workflowCostCenter);\r\n }\r\n\r\n public async RemoveWorkflowCostCenter(id: number): Promise {\r\n return (await API.DeleteAsync(`${this.baseController}/WorkflowCostCenter/${id}`))\r\n .data;\r\n }\r\n\r\n public async GetCostCenter(id: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/${id}/CostCenter`\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetNonStockSuppliers(workflowId: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/non-stock-suppliers/${workflowId}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetWorkflowSupplierDiscounts(workflowId: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/WorkflowSupplierDiscount/list/${workflowId}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async AddWorkflowSupplierDiscount(workflowSupplierDiscount: WorkflowSupplierDiscount): Promise {\r\n return (\r\n await API.PostAsync(\r\n `${this.baseController}/WorkflowSupplierDiscount`,\r\n workflowSupplierDiscount\r\n )\r\n ).data;\r\n }\r\n\r\n public async AddWorkflowSupplierDiscounts(workflowSupplierDiscounts: WorkflowSupplierDiscount[]): Promise {\r\n await API.PostAsync(\r\n `${this.baseController}/WorkflowSupplierDiscount/list`,\r\n workflowSupplierDiscounts\r\n );\r\n }\r\n public async UpdateWorkflowSupplierDiscount(workflowSupplierDiscount: WorkflowSupplierDiscount): Promise {\r\n await API.PutAsync(\r\n `${this.baseController}/WorkflowSupplierDiscount`,\r\n workflowSupplierDiscount\r\n );\r\n }\r\n\r\n public async RemoveWorkflowSupplierDiscount(id: number): Promise {\r\n return (await API.DeleteAsync(`${this.baseController}/WorkflowSupplierDiscount/${id}`)).data;\r\n }\r\n\r\n}\r\n","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAYAAAB5fY51AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAACURSURBVHhe7d1pmBXVmQdweoFm3/et925olrih4i4u0ThGER3XiKIZk6hA1LgvcUtiNK4xBo2YRWPUMWpMMO7BFR1F3NEoChga1Dhj9MM8z3x45/2fqts2+Lb07brLW7f/H36P4+sE6tat+t9zTp1zqkePr20jRESpYBaJiDwyi0REHplFIiKPzCIRkUdmkYjII7NIROSRWSQi8sgsEhF5ZBaJiDwyi0REHplFIiKPzCIRkUdmkYjII7NIROSRWSQi8sgsEhF5ZBaJiDwyi0REHplFIiKPzCIRkUdmkYjII7NIROSRWSQi8sgsEhF5ZBaJiDwyi0REHplFIiKPzCIRkUdmkYjII7NIROSRWSQi8sgsEhF5ZBaJiDwyi0REHplFIiKPzCIRkUdmkYjII7NIROSRWSQi8sgsEhF5ZBaJiDwyi0REHplFIiKPzCIRkUdmkYjII7NIROSRWSQi8sgsEhF5ZBaJiDwyi0REHplFIiKPzCIRkUdmkYjII7NIROSRWSQi8sgsEhF5ZBaJiDwyi0REHplFIiKPzCIRkUdmkYjII7NIROSRWSQi8sgsEhF5ZBaJiDwyi0REHplFIiKPzCIRkUdmkSgftpghPVq+Jj3qJ0uPhhZfMsc0fWv72MkHs0iUDxpWvQ6YLQPPOlMG/uA0X04/XQYsXChl28yUHtO2so+fis8sEuVDbbMM+dHF0vy//5TGT9ZK4z/XuNH0aavUrVkpFbvMilqB1vFT8ZlFonyomySDL/qhNH66Tup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HylX0f8A4KQ/8EpvHf7Kv/BQ/Uf2n/hauqXWk32oHxEE0qEyT6Jqsm43TzooJa2kJd+hVjM6SYUASxnmd0MulXq17rlpWTSu36W8/wArto9DIMjxGbYqjgcM481SdveajFerf/Bb2Sb0P1A+Jn/BOj4GfFn4XyeD9W+FPgIaIYRDBHa6Fa272OMbWgZUBjZcDGPoQQSD+cP/AAQ08U6l8N/29/FPg22u3vdJ1PTr23uiGOyV7WZTFcYHBP31B9JjWN4s/wCC6fxy+LfgtvCuj6P4a03WdWiNp9v0awuH1BiwwfIVpXCyEZ5CkjOV2nBH1J/wRU/4J267+zXp+qfEXxzYy6V4m8Q2YsNP0uZcTafZlkkd5R1WSRlT5DhkCHPLED8Iq5x/beZ4V4HmcaTbk3eyvbT1drH9HUeF6vB3DGZ08+lBTxMYwpwTTk3Fv3vRXT+Wtna/35RRRX6EfzyFFFFABRRRQBTtfD1hZapLew2NnFezgrLcJCqyyA4JDMBk9B19BVyiigAooooAZPAl1A8ciLJHIpV0YZVgeCCO4qLTtKtdHgMdpbQWsZbcUhjCKT0zgd+B+VWKKPMfM7W6BSFAXDYG4AgHHIB6/wAh+VLRQIKKKKACiiigCKysYNMtVhtoYreFM7Y40CKuTk4A46mpaKKACiiigCnaeHtPsL57qCxs4bmTIeaOFVdsnJywGTzVyiihJLYbk5asKKKKBH//2Q==\"","export default __webpack_public_path__ + \"static/media/Renault.effbf6c2.png\";","import axios from 'axios';\r\nimport { Constants } from './Constants';\r\nimport { AuthService } from '../services/AuthService';\r\n\r\nconst instance = axios.create({\r\n baseURL: Constants.apiRoot,\r\n withCredentials: true // Permite trimiterea cookie-urilor in request-uri\r\n});\r\n\r\ninstance.interceptors.request.use(\r\n (config) => {\r\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\r\n // @ts-ignore\r\n config.headers.locale = localStorage.getItem('locale');\r\n\r\n // config.paramsSerializer = (params) => qs.stringify(params, {\r\n // serializeDate: (date: Date) => { debugger;\r\n // return moment(date).format('YYYY-MM-DDTHH:mm:ssZ') }\r\n // });\r\n\r\n return config;\r\n },\r\n (error) => Promise.reject(error)\r\n);\r\n\r\ninstance.interceptors.response.use(\r\n function (response) {\r\n if (response.status === 204 && response.data === '') {\r\n response.data = null;\r\n }\r\n\r\n return response;\r\n },\r\n async function (error) {\r\n if (error?.response?.status === 401) {\r\n const services = new AuthService();\r\n return await services.loginAsync();\r\n }\r\n\r\n return Promise.reject(error);\r\n }\r\n);\r\n\r\nexport default instance;\r\n","import { AxiosRequestConfig, AxiosResponse, CancelToken } from 'axios';\r\nimport axios from './AxiosInstance';\r\n\r\nexport class API {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n public static async GetAsync>(url: string, params?: any): Promise {\r\n const headers = await this.GetHeaders();\r\n return axios.get(url, { ...headers, params });\r\n }\r\n\r\n public static async GetFileAsync>(url: string): Promise {\r\n const headers = await this.GetHeaders();\r\n headers.responseType = 'blob';\r\n\r\n return axios.get(url, headers);\r\n }\r\n\r\n public static async PostFileAsync(url: string, data: T): Promise> {\r\n const headers = await this.GetHeaders();\r\n headers.responseType = 'blob';\r\n\r\n return axios.post(url, data, headers);\r\n }\r\n\r\n // public async GetAsync(url: string): Promise {\r\n\r\n // let user = await this.authService.getUserAsync();\r\n\r\n // if (!user) {\r\n // throw new Error('user is not logged in');\r\n // }\r\n\r\n // if (!user.access_token) {\r\n // user = await this.authService.renewTokenAsync();\r\n // }\r\n\r\n // try {\r\n // return this.axiosInstance.get(url, this.GetHeaders(user.access_token));\r\n // }\r\n // catch (error) {\r\n // if (error.response.status === 401) {\r\n // let renewedUser = await this.authService.renewTokenAsync();\r\n // return this.axiosInstance.get(url, this.GetHeaders(renewedUser.access_token))\r\n // }\r\n // throw error;\r\n // }\r\n // }\r\n\r\n public static async PostAsync>(url: string, data: T): Promise {\r\n return axios.post(url, data, await this.GetHeaders());\r\n }\r\n\r\n public static async Post2Async(url: string, data: T): Promise> {\r\n return axios.post(url, data, await this.GetHeaders());\r\n }\r\n\r\n public static async Post2WithCancelAsync(\r\n url: string,\r\n data: T,\r\n cancelToken: CancelToken\r\n ): Promise> {\r\n const headers = await this.GetHeaders();\r\n return axios.post(url, data, {\r\n ...headers,\r\n cancelToken\r\n });\r\n }\r\n\r\n public static async DeleteAsync>(url: string, data?: T): Promise {\r\n const headers = await this.GetHeaders();\r\n return axios.delete(url, { ...headers, data });\r\n }\r\n\r\n public static async PutAsync>(url: string, data: T): Promise {\r\n return axios.put(url, data, await this.GetHeaders());\r\n }\r\n\r\n private static async GetHeaders(): Promise {\r\n const access_token = localStorage.getItem('access_token');\r\n return {\r\n headers: {\r\n Accept: 'application/json',\r\n Authorization: 'Bearer ' + access_token\r\n }\r\n } as AxiosRequestConfig;\r\n }\r\n}\r\n","import React, { Fragment, useContext } from 'react';\r\n\r\nimport clsx from 'clsx';\r\nimport { ApplicationContext } from '../../context/Contexts';\r\nimport { Avatar, Box, Button } from '@material-ui/core';\r\nimport { connect } from 'react-redux';\r\nimport { withRouter } from 'react-router';\r\nimport { ThemeActionCreators } from '../../store';\r\n\r\nconst SidebarUserbox = (props) => {\r\n const { sidebarToggle, sidebarHover, propsContainer } = props;\r\n\r\n const context = useContext(ApplicationContext);\r\n const translatorService = context.translatorService;\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n {props.appUser ? props.appUser.lastName + ' ' + props.appUser.firstName : null}\r\n
\r\n
\r\n {props.appUser ? props.appUser.email : null}\r\n
\r\n
\r\n {props.appUser ? props.appUser.jobFunction : null}\r\n
\r\n
\r\n
\r\n \r\n {\r\n props.dispatch(ThemeActionCreators.setSidebarToggleMobile(false));\r\n props.history.push('/profile');\r\n }}\r\n >\r\n {translatorService.Tranlate('VIEW_PROFILE', 'Vizualizare profil')}\r\n \r\n \r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nconst mapStateToProps = (state) => ({\r\n sidebarToggle: state.themeOptions.sidebarToggle,\r\n sidebarHover: state.themeOptions.sidebarHover,\r\n appUser: state.app.appUser,\r\n language: state.app.language\r\n});\r\n\r\nexport default connect(mapStateToProps)(withRouter(SidebarUserbox));\r\n","import React from 'react';\r\nimport { ITranslatorService } from '../services/Interfaces/ITranslatorService';\r\nimport { TranslatorService } from '../services/TranslatorService';\r\n\r\nimport { IAuthService } from '../services/Interfaces/IAuthService';\r\nimport { AuthService } from '../services/AuthService';\r\n\r\nimport { IWeatherForecastsService } from '../services/Interfaces/IWeatherForecastsService';\r\nimport { WeatherForecastsService } from '../services/WeatherForecastsService';\r\n\r\nimport { IOrganizationService } from '../services/Interfaces/IOrganizationService';\r\nimport { OrganizationService } from '../services/OrganizationService';\r\n\r\nimport { IAppUserService } from '../services/Interfaces/IAppUserService';\r\nimport { AppUserService } from '../services/AppUserService';\r\n\r\nimport { IReferentialService } from '../services/Interfaces/IReferentialService';\r\nimport { ReferentialService } from '../services/ReferentialService';\r\n\r\nimport { ITariffService } from '../services/Interfaces/ITariffService';\r\nimport { TariffService } from '../services/TariffService';\r\n\r\nimport { ICaseService } from '../services/Interfaces/ICaseService';\r\nimport { CaseService } from '../services/CaseService';\r\n\r\nimport { IGtService } from '../services/Interfaces/IGtService';\r\nimport { GtService } from '../services/GtService';\r\n\r\nimport { IWorkflowService } from '../services/Interfaces/IWorkflowService';\r\nimport { WorkflowService } from '../services/WorkflowService';\r\n\r\nimport { ICaseSettingsService } from '../services/Interfaces/ICaseSettingsService';\r\nimport { CaseSettingsService } from '../services/CaseSettingsService';\r\n\r\nimport { IDashboardService } from '../services/Interfaces/IDashboardService';\r\nimport { DashboardService } from '../services/DashboardService';\r\n\r\nimport { IOrderService } from '../services/Interfaces/IOrderService';\r\nimport { OrderService } from '../services/OrderService';\r\n\r\nimport { IReportsService } from '../services/Interfaces/IReportsService';\r\nimport { ReportsService } from '../services/ReportsService';\r\n\r\nimport { IVehicleService } from '../services/Interfaces/IVehicleService';\r\nimport { VehicleService } from '../services/VehicleService';\r\n\r\nimport { ICache } from '../interfaces/Icache';\r\nimport { IPptService } from '../services/Interfaces/IPptService';\r\nimport { PptService } from '../services/PptService';\r\nimport { PowerBiService } from '../services/PowerBiService';\r\nimport { IPowerBiService } from '../services/Interfaces/IPowerBIService';\r\n\r\nexport type AppContext = {\r\n translatorService: ITranslatorService;\r\n authenticationService: IAuthService;\r\n weatherForecastsService: IWeatherForecastsService;\r\n organizationService: IOrganizationService;\r\n appUserService: IAppUserService;\r\n referentialService: IReferentialService;\r\n tariffService: ITariffService;\r\n workflowService: IWorkflowService;\r\n caseService: ICaseService;\r\n gtService: IGtService;\r\n caseSettingsService: ICaseSettingsService;\r\n dashboardService: IDashboardService;\r\n orderService: IOrderService;\r\n reportsService: IReportsService;\r\n vehicleService: IVehicleService;\r\n cache: ICache[];\r\n pptService:IPptService;\r\n powerBiService: IPowerBiService;\r\n};\r\n\r\nconst cache = [] as ICache[];\r\n\r\nconst translatorSrv = new TranslatorService();\r\nconst authSrv = new AuthService();\r\nconst weatherForecastsService = new WeatherForecastsService();\r\nconst organizationService = new OrganizationService();\r\nconst appUserAdminService = new AppUserService();\r\nconst referentialService = new ReferentialService(cache);\r\nconst tariffService = new TariffService();\r\nconst workflowService = new WorkflowService();\r\nconst vehicleService = new VehicleService();\r\nconst pptService = new PptService(translatorSrv);\r\nconst powerBiService = new PowerBiService();\r\n\r\nconst caseService = new CaseService(\r\n tariffService,\r\n referentialService,\r\n organizationService,\r\n appUserAdminService\r\n);\r\nconst gtService = new GtService();\r\nconst caseSettingsService = new CaseSettingsService(\r\n workflowService,\r\n organizationService,\r\n referentialService\r\n);\r\nconst dashboardService = new DashboardService();\r\nconst orderService = new OrderService();\r\nconst reportsService = new ReportsService();\r\n\r\nexport const AppContext: AppContext = {\r\n translatorService: translatorSrv,\r\n authenticationService: authSrv,\r\n weatherForecastsService: weatherForecastsService,\r\n organizationService: organizationService,\r\n appUserService: appUserAdminService,\r\n referentialService: referentialService,\r\n tariffService: tariffService,\r\n workflowService: workflowService,\r\n caseService: caseService,\r\n caseSettingsService: caseSettingsService,\r\n gtService: gtService,\r\n dashboardService: dashboardService,\r\n orderService: orderService,\r\n reportsService: reportsService,\r\n vehicleService: vehicleService,\r\n cache: cache,\r\n pptService:pptService,\r\n powerBiService: powerBiService\r\n};\r\n\r\nexport const ApplicationContext = React.createContext(AppContext);\r\n","import { IWeatherForecastsService } from './Interfaces/IWeatherForecastsService';\r\nimport { WeatherForecast } from '../interfaces/WeatherForecast';\r\nimport { API } from '../helpers/API';\r\n\r\nexport class WeatherForecastsService implements IWeatherForecastsService {\r\n public async GetWeather(): Promise {\r\n return (await API.GetAsync('/weatherforecast')).data;\r\n }\r\n}\r\n","import { ITariffService } from './Interfaces/ITariffService';\r\nimport { Tariff, TariffPartner, TariffType, TariffValue } from '../interfaces/Tariff';\r\nimport { API } from '../helpers/API';\r\n\r\nexport class TariffService implements ITariffService {\r\n private baseController = '/tariff';\r\n\r\n public async GetTariffs(orgId: number): Promise {\r\n return (await API.GetAsync(`${this.baseController}/list/${orgId}`)).data;\r\n }\r\n\r\n public async GetTariff(tarriffId: number): Promise {\r\n return (await API.GetAsync(`${this.baseController}/${tarriffId}`)).data;\r\n }\r\n\r\n public async GetUserTariff(tarriffId: number): Promise {\r\n return (await API.GetAsync(`${this.baseController}/user/${tarriffId}`)).data;\r\n }\r\n public async GetUserTariffs(tarriffIds: number[]): Promise {\r\n const idLIst = tarriffIds.join(',');\r\n return (await API.GetAsync(`${this.baseController}/userList/${idLIst}`)).data;\r\n }\r\n\r\n public async AddTariff(tariff: Tariff): Promise {\r\n return (await API.PostAsync(`${this.baseController}`, tariff)).data;\r\n }\r\n\r\n public async UpdateTariff(tariff: Tariff): Promise {\r\n await API.PutAsync(`${this.baseController}`, tariff);\r\n }\r\n\r\n public async GetTariffTypes(groupId: number | null): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/tariffTypes/${groupId === null ? '' : groupId}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetTariffValues(\r\n tariffId: number,\r\n tariffTypeGroupId: number | null\r\n ): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/${tariffId}/tariffvalues/${\r\n tariffTypeGroupId === null ? '' : tariffTypeGroupId\r\n }`\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetTariffPartners(tariffId: number): Promise {\r\n return (\r\n await API.GetAsync(`${this.baseController}/${tariffId}/tariffPartners`)\r\n ).data;\r\n }\r\n public async AddTariffValues(tariffValues: TariffValue[]): Promise {\r\n await API.PostAsync(`${this.baseController}/TariffValue`, tariffValues);\r\n }\r\n\r\n public async UpdateTariffValues(tariffValues: TariffValue[]): Promise {\r\n await API.PutAsync(`${this.baseController}/TariffValue`, tariffValues);\r\n }\r\n\r\n public async DeleteTariffValues(tariffId: number, date: Date): Promise {\r\n const dateString = date.toISOString().replace(/-/g, '').split('T')[0];\r\n await API.DeleteAsync(\r\n `${this.baseController}/${tariffId}/TariffValues?date=${dateString}`\r\n );\r\n }\r\n\r\n public async GetOwnTariffs(organizationId: number): Promise {\r\n return (await API.GetAsync(`${this.baseController}/own/${organizationId}`)).data;\r\n }\r\n}\r\n","import { API } from '../helpers/API';\r\nimport { IVehicleService } from './Interfaces/IVehicleService';\r\nimport {\r\n ChangeVehicleStatusRequest,\r\n CurrencyRate,\r\n Vehicle,\r\n VehicleAdvert,\r\n VehicleFilters,\r\n VehicleFiltersResult,\r\n VehicleOffer,\r\n VehicleQualityControlCert,\r\n VehicleStatusHistory,\r\n AdvertiserResult,\r\n VehicleExtensionList,\r\n ImportVehicleResult,\r\n ImportXlsxResult,\r\n SimpleVehicle,\r\n VehicleCostRequest,\r\n Cost,\r\n InvoiceRange,\r\n Provenance,\r\n ExchangeRate,\r\n AlcorErrorLog,\r\n FinancialParameterInfo,\r\n MavoVehicleFilters,\r\n MavoVehicleList,\r\n MavoVehicleFiltersResult,\r\n ImportMavoVehiclesRequestDto,\r\n ImportMavoVehicleResult,\r\n MavoVehicle,\r\n MavoVehicleAttachment,\r\n MavoVehicleStatusHistory,\r\n ChangeMavoVehicleStatusRequest,\r\n MavoVehicleAuctionResult,\r\n MavoVehicleAuctionsFilters,\r\n MavoVehicleAuctionsList,\r\n MavoVehicleAuctionsFiltersResult,\r\n MavoVehicleAuction,\r\n MavoVehicleAuctionOffer,\r\n MavoVehicleOrder,\r\n MavoAdminAuctionsFilters,\r\n MavoAdminAuctionsList,\r\n MavoAdminAuctionsFiltersResult,\r\n CloseAuctionRequestDto,\r\n MavoVehicleUserAuctionsFilters,\r\n MavoVehicleUserAuctionsList,\r\n MavoVehicleUserAuctionsFiltersResult,\r\n MavoOrdersFltersResult,\r\n MavoOrdersFilters,\r\n MavoOrdersList,\r\n MavoVoInvoiceFltersResult,\r\n MavoVoInvoicesList,\r\n MavoVoInvoiceFilters,\r\n DeclineMavoVehicleOrderRequest,\r\n DeclineMavoVehicleOrderResponse,\r\n MavoVehicleNoticeResponse,\r\n MavoVehicleInvoiceResponse,\r\n MavoVehicleOrderRCICloseRequest,\r\n MavoVehicleOrderRCICloseResponse,\r\n MavoVoInvoiceExportFilters,\r\n MavoVehicleCreateNoticeRequestDto,\r\n MavoVehicleCreateInvoiceRequestDto,\r\n AlcorParameterInfo,\r\n SimpleVehicleCarfix,\r\n SendVehicleToCarfixResponse,\r\n PublishAdvertRcr,\r\n PublishAdvertsRcrResponse,\r\n PayloadAddManualVehicle,\r\n AuctionOfferResponseDto,\r\n DownloadResultsRequest,\r\n DownloadResultsResponse,\r\n ObtainResultsRequest,\r\n ObtainResultsResponse,\r\n RefreshStatusRequest,\r\n RefreshStatusResponse,\r\n CreateEInvoiceRequest,\r\n CreateEInvoiceResponse\r\n} from '../interfaces/Vehicle';\r\nimport { CRUDService } from './CRUDService';\r\nimport { ICRUDService } from './Interfaces/ICRUDService';\r\nimport * as R from 'ramda';\r\nimport { CaseAttachmentDto, CaseAttachments } from '../interfaces/Case';\r\nimport { MarketDataFilter } from '../interfaces/Radar/MarketDataFilter';\r\nimport { MarketData } from '../interfaces/Radar/MarketData';\r\nimport { VehicleUpdateHistory } from '../interfaces/VehicleUpdateHistory';\r\nimport { VehicleFilter } from '../interfaces/Dashboard/VehicleFilter';\r\nimport { VehicleResult } from '../interfaces/Dashboard/VehicleResult';\r\nimport { CancelToken } from 'axios';\r\nimport { AcquisitionFilter } from '../interfaces/Dashboard/AcquisitionFilter';\r\nimport { AcquisitionResult } from '../interfaces/Dashboard/AcquisitionResult';\r\nimport { SalesResult } from '../interfaces/Dashboard/SalesResult';\r\nimport { SalesFilter } from '../interfaces/Dashboard/SalesFilter';\r\nimport { IReferential } from '../interfaces/IReferential';\r\nimport { ReportParameter } from '../interfaces/Reports';\r\nimport { ImportVehicle } from '../components/vehicles/VehicleImportOneCarModal';\r\n\r\nexport class VehicleService implements IVehicleService {\r\n private baseController = '/vehicle';\r\n\r\n VehicleQualityControlCert: ICRUDService;\r\n\r\n constructor() {\r\n this.VehicleQualityControlCert = new CRUDService(\r\n this.baseController,\r\n 'VehicleQualityControlCert'\r\n );\r\n }\r\n\r\n public async GetVehicle(id: number): Promise {\r\n if(!id){\r\n return null;\r\n }\r\n return (await API.GetAsync(`${this.baseController}/${id}`)).data;\r\n }\r\n\r\n public async GetVehicleList(ids: number[]): Promise {\r\n if (ids.length === 0) {\r\n return [];\r\n }\r\n const idsList = ids.join(',');\r\n\r\n return (await API.GetAsync(`${this.baseController}/list/${idsList}`)).data;\r\n }\r\n\r\n public async GetVehicles(filters: VehicleFilters): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/filter`,\r\n filters\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetVehiclesFilters(vehicleHistory: boolean): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/filters?vehicleHistory=${vehicleHistory}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async AddVehicle(vehicle: Vehicle, caseId: number): Promise {\r\n return (await API.PostAsync(`${this.baseController}/${caseId}`, vehicle)).data;\r\n }\r\n\r\n public async UpdateVehicle(vehicle: Vehicle): Promise {\r\n await API.PutAsync(`${this.baseController}`, vehicle);\r\n }\r\n\r\n public async SaveImportedVehicles(vehicles: SimpleVehicle[]): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/import`,\r\n vehicles\r\n )\r\n ).data;\r\n }\r\n\r\n public async SaveImportedXlsxVehicles(file: File): Promise {\r\n const formData = new FormData();\r\n\r\n formData.append('importContent', file);\r\n\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/rcr-import`,\r\n formData\r\n )\r\n ).data;\r\n }\r\n\r\n public async SaveManualdVehicles(data:PayloadAddManualVehicle): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/rcr-manual-import`,\r\n data\r\n )\r\n ).data;\r\n }\r\n\r\n public async SendVehicleToCarfix(\r\n vehicle: SimpleVehicleCarfix\r\n ): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/rcr-sync-vehicle`,\r\n vehicle\r\n )\r\n ).data;\r\n }\r\n\r\n public async SendPublishedAdvertsToRcr(\r\n request: PublishAdvertRcr\r\n ): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/rcr-sync-publish-ad`,\r\n request\r\n )\r\n ).data;\r\n }\r\n\r\n public async SaveVehicleOffer(offer: VehicleOffer): Promise {\r\n return (\r\n await API.PostAsync(\r\n `${this.baseController}/vehicleoffer/${offer.caseId}`,\r\n offer\r\n )\r\n ).data;\r\n }\r\n\r\n public async SaveVehicleOfferWithoutCaseId(offer: VehicleOffer): Promise {\r\n return (await API.PostAsync(`${this.baseController}/vehicleoffer`, offer)).data;\r\n }\r\n\r\n public async ChangeVehicleStatus(\r\n request: ChangeVehicleStatusRequest\r\n ): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/status`,\r\n request\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetVehicleStatuses(vehicleId: number): Promise {\r\n return (\r\n await API.GetAsync(`${this.baseController}/${vehicleId}/statuses`)\r\n ).data;\r\n }\r\n\r\n public async GetVehicleFieldsHistory(vehicleId: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/${vehicleId}/updateHistory`\r\n )\r\n ).data;\r\n }\r\n\r\n public async SaveVehicleAdvert(vehicleAdvert: VehicleAdvert): Promise {\r\n return (\r\n await API.PostAsync(`${this.baseController}/VehicleAdvert`, vehicleAdvert)\r\n ).data;\r\n }\r\n\r\n public async GetVehicleAdvert(\r\n vehicleId: number | null,\r\n caseId: number\r\n ): Promise {\r\n if (R.isNil(vehicleId)) return null;\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/${vehicleId}/${caseId}/vehicleadvert/current`\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetVehicleOffers(\r\n vehicleId: number,\r\n caseId: number,\r\n typeId: number\r\n ): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/${vehicleId}/${caseId}/vehicleOffer/${typeId}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetCurrencyRates(): Promise {\r\n return (await API.GetAsync(`${this.baseController}/currencyRates`)).data;\r\n }\r\n\r\n public async PublishAdvert(\r\n vehicleAdvertId: number,\r\n advertiserCodes: string[],\r\n caseAttachments: CaseAttachmentDto[]\r\n ): Promise {\r\n const data = {\r\n advertiserCodes: advertiserCodes,\r\n attachments: caseAttachments\r\n };\r\n\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/VehicleAdvert/${vehicleAdvertId}/publish`,\r\n data\r\n )\r\n ).data;\r\n }\r\n\r\n public async DeleteAdvert(\r\n vehicleAdvertId: number,\r\n advertiserCodes: string[]\r\n ): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/VehicleAdvert/${vehicleAdvertId}/delete`,\r\n advertiserCodes\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetVehicleAdvertHistory(\r\n vehicleId: number | null,\r\n caseId: number\r\n ): Promise {\r\n if (R.isNil(vehicleId)) return [];\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/${vehicleId}/${caseId}/vehicleadvert/history`\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetCaseAttachmentsForVehicle(vehicleId: number): Promise {\r\n return (\r\n await API.GetAsync(`${this.baseController}/${vehicleId}/caseAttachments`)\r\n ).data;\r\n }\r\n\r\n public async GetVehicleMarketData(filter: MarketDataFilter): Promise {\r\n return (await API.GetAsync(`${this.baseController}/market-data`, filter)).data;\r\n }\r\n\r\n public async GetDashboardData(\r\n filter: VehicleFilter,\r\n cancelToken: CancelToken\r\n ): Promise {\r\n return (\r\n await API.Post2WithCancelAsync(\r\n `${this.baseController}/dashboard-data`,\r\n filter,\r\n cancelToken\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetDashboardAquisitionData(\r\n filter: AcquisitionFilter,\r\n cancelToken: CancelToken\r\n ): Promise {\r\n return (\r\n await API.Post2WithCancelAsync(\r\n `${this.baseController}/dashboard-acquisition-data`,\r\n filter,\r\n cancelToken\r\n )\r\n ).data;\r\n }\r\n public async GetDashboardSalesData(\r\n filter: SalesFilter,\r\n cancelToken: CancelToken\r\n ): Promise {\r\n return (\r\n await API.Post2WithCancelAsync(\r\n `${this.baseController}/dashboard-sales-data`,\r\n filter,\r\n cancelToken\r\n )\r\n ).data;\r\n }\r\n\r\n public async DeleteAllAdvertWhenCaseStatusBecameClosed(\r\n caseId: number,\r\n vehicleId: number\r\n ): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/VehicleAdvert/${caseId}/${vehicleId}/deleteAllVehicleAdvert`,\r\n null\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetCostRequests(\r\n caseId: number,\r\n formId: number | null\r\n ): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/vehicleCostRequests/${caseId}/${formId === null ? '' : formId}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetVehicleCostAttachment(fileName: string): Promise {\r\n return (await API.GetFileAsync(`${this.baseController}/costAttachment/${fileName}`)).data;\r\n }\r\n\r\n public async GetVehicleCostTypes(): Promise {\r\n return (await API.GetAsync(`${this.baseController}/Referential/CostType`)).data;\r\n }\r\n\r\n public async AddCost(cost: Cost): Promise {\r\n const formData = new FormData();\r\n formData.append('caseId', cost.caseId);\r\n if (!R.isNil(cost.vehicleId)) {\r\n formData.append('vehicleId', cost.vehicleId.toString());\r\n }\r\n if (!R.isNil(cost.costTypeId)) {\r\n formData.append('costTypeId', cost.costTypeId.toString());\r\n }\r\n formData.append('costTypeCode', cost.costTypeCode);\r\n if (cost.files) {\r\n cost.files.forEach((attach) => {\r\n formData.append('files', attach.file);\r\n });\r\n }\r\n if (!R.isNil(cost.currencyRate)) {\r\n formData.append('currencyRate', cost.currencyRate.toString());\r\n }\r\n if (!R.isNil(cost.value)) {\r\n formData.append('value', cost.value.toString());\r\n }\r\n formData.append('currency', cost.currency?.toString());\r\n\r\n if (!R.isNil(cost.secondValue)) {\r\n formData.append('secondValue', cost.secondValue.toString());\r\n }\r\n formData.append('secondCurrency', cost.secondCurrency);\r\n\r\n if (!R.isNil(cost.caseSectionStepFormId)) {\r\n formData.append('caseSectionStepFormId', cost.caseSectionStepFormId.toString());\r\n }\r\n return (await API.Post2Async(`${this.baseController}/cost/add`, formData)).data;\r\n }\r\n\r\n public async GetVehicleCosts(vehicleId: number): Promise {\r\n return (await API.GetAsync(`${this.baseController}/vehicleCost/${vehicleId}`)).data;\r\n }\r\n\r\n public async GetInvoiceRanges(): Promise {\r\n return (await API.GetAsync(`${this.baseController}/InvoiceRange/list`)).data;\r\n }\r\n\r\n public async AddInvoiceRange(invoiceRange: InvoiceRange): Promise {\r\n return (await API.PostAsync(`${this.baseController}/InvoiceRange`, invoiceRange))\r\n .data;\r\n }\r\n\r\n public async RemoveInvoiceRange(id: number): Promise {\r\n return (await API.DeleteAsync(`${this.baseController}/InvoiceRange/${id}`)).data;\r\n }\r\n\r\n public async UpdateInvoiceRange(invoiceRange: InvoiceRange): Promise {\r\n await API.PutAsync(`${this.baseController}/InvoiceRange`, invoiceRange);\r\n }\r\n\r\n public async GetProvenances(): Promise {\r\n return (await API.GetAsync(`${this.baseController}/Provenance/list`)).data;\r\n }\r\n\r\n public async AddProvenance(provenance: Provenance): Promise {\r\n return (await API.PostAsync(`${this.baseController}/Provenance`, provenance)).data;\r\n }\r\n\r\n public async RemoveProvenance(id: number): Promise {\r\n return (await API.DeleteAsync(`${this.baseController}/Provenance/${id}`)).data;\r\n }\r\n\r\n public async UpdateProvenance(provenance: Provenance): Promise {\r\n await API.PutAsync(`${this.baseController}/Provenance`, provenance);\r\n }\r\n\r\n public async GetExchangeRates(): Promise {\r\n return (await API.GetAsync(`${this.baseController}/ExchangeRate`)).data;\r\n }\r\n\r\n public async AddExchangeRate(exchangeRate: ExchangeRate): Promise {\r\n return (await API.PostAsync(`${this.baseController}/ExchangeRate`, exchangeRate))\r\n .data;\r\n }\r\n\r\n public async UpdateExchangeRate(exchangeRate: ExchangeRate): Promise {\r\n await API.PutAsync(`${this.baseController}/ExchangeRate`, exchangeRate);\r\n }\r\n\r\n public async RemoveExchangeRate(id: number): Promise {\r\n return (await API.DeleteAsync(`${this.baseController}/ExchangeRate/${id}`)).data;\r\n }\r\n\r\n public async GetAlcorErrorLogs(): Promise {\r\n return (await API.GetAsync(`${this.baseController}/AlcorErrorLog/list`)).data;\r\n }\r\n\r\n public async GetFinancialParameterInfoList(): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/FinancialParameterInfo/list`\r\n )\r\n ).data;\r\n }\r\n\r\n public async AddFinancialParameterInfo(\r\n financialParameterInfo: FinancialParameterInfo\r\n ): Promise {\r\n return (\r\n await API.PostAsync(\r\n `${this.baseController}/FinancialParameterInfo`,\r\n financialParameterInfo\r\n )\r\n ).data;\r\n }\r\n\r\n public async RemoveFinancialParameterInfo(id: number): Promise {\r\n return (await API.DeleteAsync(`${this.baseController}/FinancialParameterInfo/${id}`))\r\n .data;\r\n }\r\n\r\n public async UpdateFinancialParameterInfo(\r\n financialParameterInfo: FinancialParameterInfo\r\n ): Promise {\r\n await API.PutAsync(\r\n `${this.baseController}/FinancialParameterInfo`,\r\n financialParameterInfo\r\n );\r\n }\r\n\r\n public async GetMavoVehicles(filters: MavoVehicleFilters): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/mavo/filter`,\r\n filters\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetMavoVehiclesFilters(): Promise {\r\n return (await API.GetAsync(`${this.baseController}/mavo/filters`))\r\n .data;\r\n }\r\n\r\n public async SaveImportedMavoVehicles(\r\n request: ImportMavoVehiclesRequestDto\r\n ): Promise {\r\n const formData = new FormData();\r\n formData.append('importContent', request.attachments[0].file);\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/mavo-import`,\r\n formData\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetMavoVehicle(id: number): Promise {\r\n return (await API.GetAsync(`${this.baseController}/mavo/${id}`)).data;\r\n }\r\n\r\n public async GetMavoVehicleByVin(vin: string): Promise {\r\n return (await API.GetAsync(`${this.baseController}/mavo/byVin/${vin}`)).data;\r\n }\r\n\r\n public async AddMavoVehicle(vehicle: MavoVehicle): Promise {\r\n return (await API.PostAsync(`${this.baseController}/mavo/add`, vehicle)).data;\r\n }\r\n\r\n public async AddMavoVehicleAttachments(\r\n mavoVehicleAttachments: MavoVehicleAttachment[]\r\n ): Promise {\r\n const formData = new FormData();\r\n formData.append('mavoVehicleId', mavoVehicleAttachments[0].mavoVehicleId.toString());\r\n formData.append('attachmentTypeId', mavoVehicleAttachments[0].attachmentTypeId.toString());\r\n formData.append('attachmentTypeCode', mavoVehicleAttachments[0].attachmentType!.code!);\r\n mavoVehicleAttachments.forEach((item) => {\r\n formData.append('files', item.file);\r\n });\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/mavo/attachment`,\r\n formData\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetMavoVehicleAttachments(mavoVehicleId: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/mavo/attachments/${mavoVehicleId}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetMavoVehicleAttachment(fileName: string): Promise {\r\n return (await API.GetFileAsync(`${this.baseController}/mavo/attachment/${fileName}`))\r\n .data;\r\n }\r\n\r\n public async RemoveMavoVehicleAttachment(fileName: string): Promise {\r\n await API.DeleteAsync(`${this.baseController}/mavo/attachment/${fileName}`);\r\n }\r\n\r\n public async DeleteMavoVehicle(id: number): Promise {\r\n return (await API.DeleteAsync(`${this.baseController}/mavo/${id}`)).data;\r\n }\r\n\r\n public async ChangeMavoVehicleStatus(\r\n request: ChangeMavoVehicleStatusRequest\r\n ): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/mavo/status`,\r\n request\r\n )\r\n ).data;\r\n }\r\n\r\n public async AddMavoVehicleOrder(request: MavoVehicleOrder): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/mavo/order/add`,\r\n request\r\n )\r\n ).data;\r\n }\r\n\r\n public async AddMavoVehicleAuction(\r\n request: MavoVehicleAuction\r\n ): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/mavo/auction/add`,\r\n request\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetAuctions(filters: MavoVehicleAuctionsFilters): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/mavo/auction-vehicle-filter`,\r\n filters\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetAuctionsFilters(): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/mavo/auction-vehicle-filters`\r\n )\r\n ).data;\r\n }\r\n\r\n public async AddMavoAuctionOffer(\r\n mavoVehicleAuctionOffer: MavoVehicleAuctionOffer\r\n ): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/mavo/auction/offer/add`,\r\n mavoVehicleAuctionOffer\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetUserAuctions(\r\n filters: MavoVehicleUserAuctionsFilters\r\n ): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/mavo/user-auction-vehicle-filter`,\r\n filters\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetUserAuctionsFilters(): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/mavo/user-auction-vehicle-filters`\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetAdminAuctions(filters: MavoAdminAuctionsFilters): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/mavo/admin-auction-filter`,\r\n filters\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetAdminAuctionsFilters(): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/mavo/admin-auction-filters`\r\n )\r\n ).data;\r\n }\r\n\r\n public async CloseAuction(request: CloseAuctionRequestDto): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/mavo/auction/close`,\r\n request\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetMavoOrders(filters: MavoOrdersFilters): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/mavo/orders-filter`,\r\n filters\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetMavoOrdersFilters(filters: MavoOrdersFilters): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/mavo/orders-filters`,\r\n filters\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetMavoInvoices(filters: MavoVoInvoiceFilters): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/mavo/invoices-filter`,\r\n filters\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetMavoInvoicesFilters(filters: MavoVoInvoiceFilters): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/mavo/invoices-filters`,\r\n filters\r\n )\r\n ).data;\r\n }\r\n\r\n public async ConfirmMavoVehicleOrder(\r\n code: string,\r\n request: MavoVehicleCreateNoticeRequestDto\r\n ): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/mavo/report/${code}`,\r\n request\r\n )\r\n ).data;\r\n }\r\n\r\n public async CancelNoticeMavoVehicle(\r\n code: string,\r\n request: MavoVehicleCreateNoticeRequestDto\r\n ): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/mavo/report/${code}/cancel`,\r\n request\r\n )\r\n ).data;\r\n }\r\n\r\n public async DeclineMavoVehicleOrder(\r\n request: DeclineMavoVehicleOrderRequest\r\n ): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/mavo/order/decline`,\r\n request\r\n )\r\n ).data;\r\n }\r\n\r\n public async PrintMavoVehicleNotice(id: number): Promise {\r\n return (await API.GetFileAsync(`${this.baseController}/mavo/print-notice/${id}`)).data;\r\n }\r\n\r\n public async GenerateInvoiceReport(\r\n code: string,\r\n request: MavoVehicleCreateInvoiceRequestDto\r\n ): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/mavo/reportInvoice/${code}`,\r\n request\r\n )\r\n ).data;\r\n }\r\n\r\n public async CloseMavoVehicleOrderRCI(\r\n request: MavoVehicleOrderRCICloseRequest\r\n ): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/mavo/order/close-RCI`,\r\n request\r\n )\r\n ).data;\r\n }\r\n\r\n public async PrintMavoVehicleNoticeBasedInvoiceId(id: number): Promise {\r\n return (\r\n await API.GetFileAsync(`${this.baseController}/mavo/print-notice-based-invoiceId/${id}`)\r\n ).data;\r\n }\r\n\r\n public async PrintInvoice(id: number): Promise {\r\n return (await API.GetFileAsync(`${this.baseController}/mavo/print-invoice/${id}`)).data;\r\n }\r\n\r\n public async ExportInvoices(mavoVoInvoiceFilters: MavoVoInvoiceExportFilters): Promise {\r\n return (\r\n await API.PostFileAsync(\r\n `${this.baseController}/mavo/export-invoices`,\r\n mavoVoInvoiceFilters\r\n )\r\n ).data;\r\n }\r\n\r\n public async ExportMavoVehicles(filters: MavoVehicleFilters): Promise {\r\n return (\r\n await API.PostFileAsync(\r\n `${this.baseController}/mavo/export-data`,\r\n filters\r\n )\r\n ).data;\r\n }\r\n\r\n public async CancelInvoiceMavoVehicle(\r\n code: string,\r\n request: MavoVehicleCreateInvoiceRequestDto\r\n ): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/mavo/reportInvoice/${code}/cancel`,\r\n request\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetAlcorParameterInfoList(): Promise {\r\n return (\r\n await API.GetAsync(`${this.baseController}/AlcorParameterInfo/list`)\r\n ).data;\r\n }\r\n\r\n public async AddAlcorParameterInfo(\r\n alcorParameterInfo: AlcorParameterInfo\r\n ): Promise {\r\n return (\r\n await API.PostAsync(\r\n `${this.baseController}/AlcorParameterInfo`,\r\n alcorParameterInfo\r\n )\r\n ).data;\r\n }\r\n\r\n public async RemoveAlcorParameterInfo(id: number): Promise {\r\n return (await API.DeleteAsync(`${this.baseController}/AlcorParameterInfo/${id}`)).data;\r\n }\r\n\r\n public async UpdateAlcorParameterInfo(alcorParameterInfo: AlcorParameterInfo): Promise {\r\n await API.PutAsync(\r\n `${this.baseController}/AlcorParameterInfo`,\r\n alcorParameterInfo\r\n );\r\n }\r\n\r\n public async GetMavoAuction(id: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/mavo/auction/${id}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async ExportAuctionOffers(mavoAuctionAdminFilters: MavoAdminAuctionsFilters): Promise {\r\n return (\r\n await API.PostFileAsync(\r\n `${this.baseController}/mavo/export-auction-offers`,\r\n mavoAuctionAdminFilters\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetRCRFuelTypes(): Promise {\r\n return (await API.GetAsync(`${this.baseController}/RCRFuelType`)).data;\r\n }\r\n \r\n public async DownloadResults(\r\n request: DownloadResultsRequest\r\n ): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/invoices/download-results`,\r\n request\r\n )\r\n ).data;\r\n }\r\n\r\n public async ObtainResults(\r\n request: ObtainResultsRequest\r\n ): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/invoices/obtain-results`,\r\n request\r\n )\r\n ).data; \r\n }\r\n\r\n public async RefreshStatus(\r\n request: RefreshStatusRequest\r\n ): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/invoices/refresh-status`,\r\n request\r\n )\r\n ).data; \r\n }\r\n\r\n public async CreateEInvoice(\r\n request: CreateEInvoiceRequest\r\n ): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/invoices`,\r\n request\r\n )\r\n ).data;\r\n }\r\n\r\n}\r\n","import { API } from '../helpers/API';\r\nimport { EmbedTokenResponse } from '../interfaces/PowerBi';\r\nimport { IPowerBiService } from './Interfaces/IPowerBIService';\r\n\r\nexport class PowerBiService implements IPowerBiService {\r\n private baseController = '/PowerBiSdk';\r\n public async GetEmbedToken(reportCode: string, userInteracted: boolean): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/embedToken/${reportCode}?userInteracted=${userInteracted}`\r\n )\r\n ).data;\r\n }\r\n public async GetCapacityStatus(): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/capacity`\r\n )\r\n ).data;\r\n }\r\n public async StartCapacity(): Promise {\r\n await API.PostAsync(`${this.baseController}/capacity`, {});\r\n }\r\n}","import { ITariffService } from './Interfaces/ITariffService';\r\nimport { IOrganizationService } from '../services/Interfaces/IOrganizationService';\r\nimport { TariffValue } from '../interfaces/Tariff';\r\nimport { API } from '../helpers/API';\r\nimport { ICaseService } from './Interfaces/ICaseService';\r\nimport {\r\n Notice,\r\n CaseComment,\r\n Case,\r\n CaseStatusHistory,\r\n CaseWorkflowHistory,\r\n CasePartnerHistory,\r\n CaseParameterHistory,\r\n CaseTariffHistory,\r\n CaseTariffValueHistory,\r\n CaseAttachment,\r\n CaseVehicleHistory,\r\n CaseEventHistory,\r\n CaseCalculationHistory,\r\n CaseCalculationPart,\r\n Model,\r\n VinDecodeResponse,\r\n CaseRequest,\r\n CasePaymentHistory,\r\n CaseCalculationAlternativePart,\r\n CaseFilters,\r\n CaseList,\r\n CaseFiltersResult,\r\n ValuationVehicles,\r\n ValuationVehicleOptions,\r\n ValuationRequest,\r\n CaseValuationHistory,\r\n CaseServiceAppointmentHistory,\r\n VehicleDto,\r\n CaseClient,\r\n ClientDto,\r\n ValuationModel,\r\n ValuationBody,\r\n ClientOffer,\r\n CaseByVehicleIdSearchResult,\r\n ChangeCaseStatusRequest,\r\n UndocumentedModel,\r\n CarException,\r\n CarClassRentPrice,\r\n Offer,\r\n ValuationVehicle,\r\n BillingFilters,\r\n DgpciBillingFilters,\r\n PlateNumber,\r\n ClaimServiceRequest,\r\n ClaimServiceResponse,\r\n ClaimServiceCalculationRequest,\r\n ClaimServiceCalculationResponse,\r\n CalculationDifferencesRequest,\r\n CalculationDifferencesResponse,\r\n MaintenanceCupiOptionalPart,\r\n ClaimStatusResponse,\r\n ClaimStatusRequest,\r\n ClaimServiceAlternativeCalculationRequest,\r\n ClaimServiceAlternativeCalculationResponse,\r\n ModelData,\r\n ManipulationTariffPercentResponse,\r\n VinRequestResponse,\r\n CarfixAlternativeCalculationRequest,\r\n CarfixAlternativeCalculationResponse,\r\n CarfixAttachmentNotificationRequest,\r\n CarfixAttachmentNotificationResponse,\r\n CaseVehicleDetails,\r\n ValuationHistory,\r\n TariffPercentResponse,\r\n TariffPercentRequest,\r\n MaintenanceProducer,\r\n ValuationGeneration,\r\n valuationVehiclesInfoRequest,\r\n VQVehicle,\r\n Appointment,\r\n AppointmentFilters,\r\n AppointmentList,\r\n ValuationExcludeOptions,\r\n ValuationIncludeOptions,\r\n ValuationRequiredOptions,\r\n GTWSBillingFilters,\r\n AutomateAppointmentRequest,\r\n AcquisitionCaseRequest,\r\n CaseResultDto,\r\n ChangeCaseStatusBasedCodeRequest,\r\n NonStockBillingFilters,\r\n GenerateInvoiceRequest,\r\n GenerateInvoiceResponse,\r\n PartsHistoryInterogationRequest,\r\n UpdateOrderInfoRequest,\r\n AppointmentPaymentStatusRequest,\r\n AppointmentPaymentStatusResponse,\r\n SendOrderNotificationRequest,\r\n SendAlternativeCalculationResponse,\r\n SendAlternativeCalculationRequest,\r\n NonStockPart,\r\n PartNotifySuppportRequest,\r\n PartNotifySuppportResponse,\r\n CaseInfo,\r\n NotifySupportResponse,\r\n NotifySupportRequest,\r\n GeneralNotifySupportResponse,\r\n GeneralNotifySupportRequest,\r\n NewBillingReportFilters\r\n} from '../interfaces/Case';\r\nimport { AddVehicleParams, Vehicle as VehicleExt } from '../interfaces/Vehicle';\r\nimport { ReferentialCode } from '../helpers/Constants';\r\nimport Referentials from '../helpers/Referentials.json';\r\nimport { IReferentialService } from './Interfaces/IReferentialService';\r\nimport { OrganizationType } from '../interfaces/Organization';\r\nimport { IAppUserService } from './Interfaces/IAppUserService';\r\nimport { CalculationRequest, CalculationResponse } from '../interfaces/GtService';\r\nimport { AppUser } from '../interfaces/AppUser';\r\nimport * as R from 'ramda';\r\nimport moment from 'moment';\r\nimport { IReferential } from '../interfaces/IReferential';\r\nimport { Utils } from '../helpers/Utils';\r\nimport { isUndefined } from 'util';\r\n\r\nexport class CaseService implements ICaseService {\r\n private organizationService: IOrganizationService;\r\n private tariffService: ITariffService;\r\n private appReferentialService: IReferentialService;\r\n private appUserService: IAppUserService;\r\n\r\n private baseController = '/case';\r\n\r\n constructor(\r\n tariffService: ITariffService,\r\n appReferentialService: IReferentialService,\r\n organizationService: IOrganizationService,\r\n appUserService: IAppUserService\r\n ) {\r\n this.tariffService = tariffService;\r\n this.appReferentialService = appReferentialService;\r\n this.organizationService = organizationService;\r\n this.appUserService = appUserService;\r\n }\r\n\r\n public async SearchNotice(\r\n vin: string,\r\n plateNumber: string,\r\n noticeNumber: string,\r\n caseNumber: string\r\n ): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/searchnotice?vin=${vin}&platenumber=${plateNumber}¬iceNumber=${noticeNumber}&caseNumber=${caseNumber}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async SearchVehicle(\r\n vin: string,\r\n plateNumber: string,\r\n searchInVehicleStock: boolean\r\n ): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/searchvehicle?vin=${R.isNil(vin) ? '' : vin}&platenumber=${\r\n R.isNil(plateNumber) ? '' : plateNumber\r\n }&searchInVehicleStock=${searchInVehicleStock}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async SearchClient(\r\n personTypeId: number,\r\n pin_cui: string,\r\n name: string\r\n ): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/searchclient?personTypeId=${personTypeId}&pin_cui=${\r\n R.isNil(pin_cui) ? '' : pin_cui\r\n }&name=${R.isNil(name) ? '' : name}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async DecodeVin(vin: string): Promise {\r\n return (await API.GetAsync(`${this.baseController}/decodevin/${vin}`)).data;\r\n }\r\n\r\n public async SyncModels(): Promise {\r\n await API.PostAsync(`${this.baseController}/syncmodels`, {});\r\n }\r\n\r\n public async GetValuationVehicles(\r\n caseId: number,\r\n calculationFormId: number\r\n ): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/${caseId}/valuationVehicles/${calculationFormId}`,\r\n {}\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetValuationHistory(caseId: number): Promise {\r\n return (\r\n await API.GetAsync(`${this.baseController}/valuation-history/${caseId}`)\r\n ).data;\r\n }\r\n\r\n public async GetValuationVehiclesInfo(\r\n vin: string,\r\n calculationFormId: number | null,\r\n valuationVehiclesInfoRequest: valuationVehiclesInfoRequest\r\n ): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/valuationVehicles/${vin}/${\r\n R.isNil(calculationFormId) ? '' : calculationFormId\r\n }`,\r\n {\r\n ...valuationVehiclesInfoRequest,\r\n registration_date: valuationVehiclesInfoRequest.registration_date\r\n ? moment(valuationVehiclesInfoRequest.registration_date).format('YYYY-MM-DD')\r\n : null\r\n }\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetValuationVehiclesWithoutVin(\r\n make: string,\r\n model: string,\r\n body: string,\r\n firstRegistrationDate: Date,\r\n generation: number\r\n ): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/valuationVehicles/${make}/${model}/${body}/${moment(\r\n firstRegistrationDate\r\n ).format('YYYY-MM-DD')}${R.isNil(generation) ? '' : '/' + generation}`,\r\n {}\r\n )\r\n ).data;\r\n }\r\n\r\n public async ValuationSaveMapping(vin: string, vehicleId: number): Promise {\r\n return (\r\n await API.Post2Async(`${this.baseController}/valuation/saveMapping`, {\r\n Vin: vin,\r\n VehicleId: vehicleId\r\n })\r\n ).data;\r\n }\r\n\r\n public async GetValuationVehicleOptions(vehicleId: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/valuationOptions/${vehicleId}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetValuationModels(\r\n make: string | null | undefined,\r\n firstRegistrationDate: Date | null\r\n ): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/valuationmodels/${make}/${moment(firstRegistrationDate).format(\r\n 'YYYY-MM-DD'\r\n )}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetValuationBodies(\r\n make: string | null | undefined,\r\n model: string | null | undefined,\r\n firstRegistrationDate: Date | null\r\n ): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/valuationbodies/${make}/${model}/${moment(\r\n firstRegistrationDate\r\n ).format('YYYY-MM-DD')}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetValuationGenerations(\r\n make: string | null | undefined,\r\n model: string | null | undefined,\r\n body: string | null | undefined,\r\n doorsNo: number | null | undefined,\r\n firstRegistrationDate: Date | null\r\n ): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/valuationGenerations/${make}/${model}/${body}/${doorsNo}/${moment(\r\n firstRegistrationDate\r\n ).format('YYYY-MM-DD')}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetExcludeOptions(\r\n optionsId: number,\r\n vehicleId: number\r\n ): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/valuationOptions/excludes/${optionsId}/${vehicleId}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetIncludeOptions(\r\n optionsId: number,\r\n vehicleId: number\r\n ): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/valuationOptions/includes/${optionsId}/${vehicleId}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetRequiredOptions(\r\n optionsId: number,\r\n vehicleId: number\r\n ): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/valuationOptions/requires/${optionsId}/${vehicleId}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async PerformValuation(\r\n valuationRequest: ValuationRequest,\r\n caseId: number | null\r\n ): Promise {\r\n let url = `${this.baseController}/performvaluation`;\r\n if (caseId !== null) {\r\n url += `/${caseId}`;\r\n }\r\n return (await API.Post2Async(url, valuationRequest))\r\n .data;\r\n }\r\n\r\n public async CreateCalculationHistory(\r\n calculationRequest: CalculationRequest\r\n ): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/calculationHistory/`,\r\n calculationRequest\r\n )\r\n ).data;\r\n }\r\n\r\n public async CreateCalculation(calculationRequest: CalculationRequest): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/calculation/`,\r\n calculationRequest\r\n )\r\n ).data;\r\n }\r\n\r\n public async UpdateCalculationTariff(\r\n calculationRequest: CalculationRequest\r\n ): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/calculation/update-tariff`,\r\n calculationRequest\r\n )\r\n ).data;\r\n }\r\n // public async CopyCalculation(calculationRequest: CalculationRequest): Promise {\r\n // const user = await this.authService.getUserAsync();\r\n // if (user === null) {\r\n // throw Error('user is not logged in')\r\n // }\r\n\r\n // return (await API.Post2Async(`${this.baseController}/copycalculation/`, calculationRequest)).data;\r\n // }\r\n\r\n public async UpdateCalculationCallback(\r\n id: number,\r\n workflowId: number,\r\n workflowOrganizationOwnerId: number\r\n ): Promise {\r\n return (\r\n await API.PostAsync(\r\n `${this.baseController}/calculationUpdateCallback/${id}/${workflowId}/${workflowOrganizationOwnerId}`,\r\n null\r\n )\r\n ).data;\r\n }\r\n\r\n public async UpdateCalculationPdfCallback(\r\n id: number,\r\n workflowId: number,\r\n workflowOrganizationOwnerId: number\r\n ): Promise {\r\n return (\r\n await API.PostAsync(\r\n `${this.baseController}/calculationUpdatePdfCallback/${id}/${workflowId}/${workflowOrganizationOwnerId}`,\r\n null\r\n )\r\n ).data;\r\n }\r\n\r\n // public async UpdateGtCalculation(calculationRequest: CalculationRequest): Promise {\r\n // const user = await this.authService.getUserAsync();\r\n // if (user === null) {\r\n // throw Error('user is not logged in')\r\n // }\r\n\r\n // return (await API.Post2Async(`${this.baseController}/updateGtCalculation/`, calculationRequest)).data;\r\n // }\r\n\r\n public async AddVehicle(param: AddVehicleParams, caseId: number): Promise {\r\n return (\r\n await API.PostAsync(\r\n `${this.baseController}/${caseId}/addvehicle`,\r\n param\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetCases(caseFilters: CaseFilters | null): Promise {\r\n if (caseFilters === null) {\r\n caseFilters = {\r\n assignedToList: [],\r\n createdByList: [],\r\n caseTypeIds: [],\r\n partnerIds: [],\r\n statusIds: [],\r\n workflowIds: [],\r\n organizationIds: [],\r\n page: 1,\r\n pageSize: null,\r\n isInternal: null,\r\n text: '',\r\n isNew: false,\r\n dateFilterCode: '',\r\n dateFilterStartDate: null,\r\n datefilterEndDate: null,\r\n vehicleIds: [],\r\n policyTypeIds: [],\r\n plateNumberSearchText: '',\r\n vinSearchText: '',\r\n caseNumberSearchText: '',\r\n countryCode: null,\r\n isAssignedToId: true,\r\n makeSearchText: '',\r\n modelSearchText: '',\r\n organizationOwnerId: null,\r\n } as CaseFilters;\r\n }\r\n\r\n return (await API.Post2Async(`${this.baseController}`, caseFilters))\r\n .data;\r\n }\r\n\r\n public async SearchByCaseNumber(id: number, caseNumber: string): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/SearchByCaseNumber?id=${id}&caseNumber=${caseNumber}`,\r\n {}\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetCaseFilters(caseFilters: CaseFilters): Promise {\r\n return (await API.Post2Async(`${this.baseController}/filters`, caseFilters))\r\n .data;\r\n }\r\n\r\n public async SearchByVehicle(vehicleId: number): Promise {\r\n return (await API.GetAsync(`${this.baseController}/SearchByVehicle/${vehicleId}`)).data;\r\n }\r\n\r\n public async GetLastCaseByVehicleId(vehicleId: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/SearchByVehicleId/${vehicleId}/lastCase`\r\n )\r\n ).data;\r\n }\r\n\r\n public async ChangeCaseStatus(request: ChangeCaseStatusRequest): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/status`,\r\n request\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetCaseDetails(caseId: number): Promise {\r\n const refCaseType = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.CaseType\r\n );\r\n const refParam = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.CompanyParameter\r\n );\r\n const orgTypeRef = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.OrganizationType\r\n );\r\n const brandsRef = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.CarBrands\r\n );\r\n\r\n const [casee, caseTypeList, paramList, orgTypes, brands] = await Promise.all([\r\n this.GetCaseEntity(caseId),\r\n this.appReferentialService.Get(refCaseType!.baseUrl),\r\n this.appReferentialService.Get(refParam!.baseUrl),\r\n this.appReferentialService.Get(orgTypeRef!.baseUrl),\r\n this.appReferentialService.Get(brandsRef!.baseUrl)\r\n ]);\r\n\r\n const orgIds = casee.casePartners.map((item) => item.organizationId);\r\n orgIds.push(casee.organizationOwnerId);\r\n\r\n const [partners, tariff, tariffTypeList, createdByUser, assignedUser] = await Promise.all([\r\n this.organizationService.GetUserOrganizationsByIds(Array.from(new Set(orgIds))),\r\n R.isNil(casee.caseTariff)\r\n ? null\r\n : this.tariffService.GetUserTariff(casee.caseTariff.tariffId),\r\n this.tariffService.GetTariffTypes(null),\r\n this.appUserService.GetUserInfo(casee.createdBy),\r\n this.appUserService.GetUserInfo(casee.caseStatus.assignedToId)\r\n ]);\r\n\r\n casee.casePartners.forEach((wpItem) => {\r\n const partner = partners.find((item) => item.id === wpItem.organizationId);\r\n wpItem.organization = R.isNil(partner) ? null : partner;\r\n\r\n const orgType = orgTypes.find((item) => item.id === wpItem.organization!.organizationTypeId);\r\n wpItem.organization!.organizationType = (R.isNil(orgType)\r\n ? null\r\n : orgType) as any as OrganizationType;\r\n });\r\n\r\n casee.caseStatus.assignedTo = assignedUser;\r\n casee.createdByUser = createdByUser;\r\n const orgOwner = partners.find((item) => item.id === casee.organizationOwnerId);\r\n casee.organizationOwner = R.isNil(orgOwner) ? null : orgOwner;\r\n\r\n if (!R.isNil(tariff)) {\r\n casee.caseTariff.tariff = tariff;\r\n casee.caseTariff.caseTariffValuesHistory.forEach((tv) => {\r\n const tt = tariffTypeList.find((p) => tv.tariffTypeId === p.id);\r\n tv.tariffType = R.isNil(tt) ? null : tt;\r\n\r\n const brand = brands.find((p) => p.id === tv.brandId);\r\n tv.brand = R.isNil(brand) ? null : brand;\r\n });\r\n }\r\n const caseType = caseTypeList.find((item) => item.id === casee.caseTypeId);\r\n casee.caseType = R.isNil(caseType) ? null : caseType;\r\n casee.caseParameters.forEach((item) => {\r\n const param = paramList.find((p) => item.parameterId === p.id);\r\n item.parameter = R.isNil(param) ? null : param;\r\n });\r\n\r\n return casee;\r\n }\r\n\r\n public async GetCaseEntity(caseId: number): Promise {\r\n return (await API.GetAsync(`${this.baseController}/${caseId}`)).data;\r\n }\r\n\r\n public async CreateCase(\r\n workflowId: number,\r\n noticeId: number | null,\r\n vehicle: VehicleDto | null,\r\n clientId: number | null\r\n ): Promise {\r\n return (\r\n await API.Post2Async<\r\n {\r\n workflowId: number;\r\n noticeId: number | null;\r\n vehicle: VehicleDto | null;\r\n clientId: number | null;\r\n },\r\n Case\r\n >(`${this.baseController}/newcase`, {\r\n workflowId: workflowId,\r\n vehicle: vehicle,\r\n noticeId: noticeId,\r\n clientId: clientId\r\n })\r\n ).data;\r\n }\r\n\r\n public async CopyCase(\r\n caseId: number,\r\n workflowId: number,\r\n noticeId: number | null,\r\n vehicle: VehicleDto | null,\r\n clientId: number | null\r\n ): Promise {\r\n return (\r\n await API.Post2Async<\r\n {\r\n caseId: number;\r\n workflowId: number;\r\n noticeId: number | null;\r\n vehicle: VehicleDto | null;\r\n clientId: number | null;\r\n },\r\n Case\r\n >(`${this.baseController}/copyCase`, {\r\n caseId: caseId,\r\n workflowId: workflowId,\r\n vehicle: vehicle,\r\n noticeId: noticeId,\r\n clientId: clientId\r\n })\r\n ).data;\r\n }\r\n\r\n public async ChangeCaseWorkflow(\r\n workflowId: number,\r\n caseId: number,\r\n userId: string,\r\n caseStatusId: number\r\n ): Promise {\r\n await API.PostAsync<{\r\n workflowId: number;\r\n caseId: number;\r\n userId: string;\r\n caseStatusId: number;\r\n }>(`${this.baseController}/changeworkflow`, {\r\n workflowId: workflowId,\r\n caseId: caseId,\r\n userId: userId,\r\n caseStatusId: caseStatusId\r\n });\r\n }\r\n\r\n public async UpdateCase(casee: Case): Promise {\r\n await API.PutAsync(`${this.baseController}/Case`, casee);\r\n }\r\n\r\n public async RemoveCase(id: number): Promise {\r\n return (await API.DeleteAsync(`${this.baseController}/${id}`)).data;\r\n }\r\n\r\n public async GetCarModels(): Promise {\r\n return (await API.GetAsync(`${this.baseController}/model`)).data;\r\n }\r\n\r\n public async GetCarModelsByBrand(brandId: number): Promise {\r\n return (await API.GetAsync(`${this.baseController}/model/list/${brandId}`)).data;\r\n }\r\n\r\n public async GetCaseComments(caseId: number): Promise {\r\n return (await API.GetAsync(`${this.baseController}/CaseComment/list/${caseId}`))\r\n .data;\r\n }\r\n\r\n public async AddCaseComment(caseComment: CaseComment): Promise {\r\n return (await API.PostAsync(`${this.baseController}/Comment`, caseComment)).data;\r\n }\r\n\r\n public async UpdateCaseComment(caseComment: CaseComment): Promise {\r\n await API.PutAsync(`${this.baseController}/Comment`, caseComment);\r\n }\r\n\r\n public async RemoveCaseComment(id: number): Promise {\r\n return (await API.DeleteAsync(`${this.baseController}/CaseComment/${id}`)).data;\r\n }\r\n\r\n public async AddCaseRequest(caseRequest: CaseRequest): Promise {\r\n const formData = new FormData();\r\n formData.append('id', caseRequest.id.toString());\r\n formData.append('caseId', caseRequest.caseId.toString());\r\n formData.append('caseSectionStepFormId', caseRequest.caseSectionStepFormId.toString());\r\n if (!R.isNil(caseRequest.organizationId)) {\r\n formData.append('organizationId', caseRequest.organizationId.toString());\r\n }\r\n formData.append('subject', caseRequest.subject);\r\n formData.append('text', caseRequest.text);\r\n formData.append('to', caseRequest.to);\r\n\r\n if (!R.isNil(caseRequest.userIdTo)) {\r\n formData.append('userIdTo', caseRequest.userIdTo);\r\n }\r\n if (caseRequest.attachments.length !== 0) {\r\n formData.append('attachmentTypeId', caseRequest.attachments[0].attachmentTypeId.toString());\r\n formData.append('attachmentTypeCode', caseRequest.attachments[0].attachmentType!.code!);\r\n }\r\n caseRequest.attachments.forEach((attach) => {\r\n formData.append('files', attach.file);\r\n });\r\n\r\n if (!R.isNil(caseRequest.cc)) {\r\n formData.append('cc', caseRequest.cc);\r\n }\r\n if (!R.isNil(caseRequest.hasOffer)) {\r\n formData.append('hasOffer', caseRequest?.hasOffer!.toString());\r\n }\r\n if (!R.isNil(caseRequest.hasInvoice)) {\r\n formData.append('hasInvoice', caseRequest?.hasInvoice!.toString());\r\n }\r\n if (!R.isNil(caseRequest.calculationId)) {\r\n formData.append('calculationId', caseRequest?.calculationId!.toString());\r\n }\r\n if (!R.isNil(caseRequest.caseClientHistoryId)) {\r\n formData.append('caseClientHistoryId', caseRequest?.caseClientHistoryId!.toString());\r\n }\r\n if (!R.isNil(caseRequest.vehicleId)) {\r\n formData.append('vehicleId', caseRequest?.vehicleId!.toString());\r\n }\r\n if (!R.isNil(caseRequest.gatewayServiceUrl)) {\r\n formData.append('gatewayServiceUrl', caseRequest?.gatewayServiceUrl!.toString());\r\n }\r\n if (!R.isNil(caseRequest.offerId)) {\r\n formData.append('offerId', caseRequest?.offerId!.toString());\r\n }\r\n if (!R.isNil(caseRequest.userOrganizationId)) {\r\n formData.append('userOrganizationId', caseRequest?.userOrganizationId!.toString());\r\n }\r\n if (!R.isNil(caseRequest.organizationOwnerId)) {\r\n formData.append('organizationOwnerId', caseRequest?.organizationOwnerId!.toString());\r\n }\r\n if (!R.isNil(caseRequest.hideOrganizationLogo)) {\r\n formData.append('hideOrganizationLogo', caseRequest?.hideOrganizationLogo!.toString());\r\n }\r\n //if (caseRequest.additionalFilesParameters) {\r\n // Utils.AddObjectToFormData(formData, caseRequest.additionalFilesParameters, \"additionalFilesParameters\");\r\n //}\r\n return (\r\n await API.Post2Async(`${this.baseController}/CaseRequest`, formData)\r\n ).data;\r\n }\r\n\r\n public async GetCaseRequests(caseId: number, formId: number | null): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/${caseId}/requests/${formId === null ? '' : formId}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetCurrentCaseServiceAppointment(\r\n caseId: number,\r\n formId: number | null\r\n ): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/${caseId}/serviceappointment/${formId === null ? '' : formId}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async AddCaseServiceAppointment(\r\n appointment: CaseServiceAppointmentHistory\r\n ): Promise {\r\n const formData = new FormData();\r\n formData.append('id', appointment.id.toString());\r\n formData.append('caseId', appointment.caseId.toString());\r\n formData.append('caseSectionStepFormId', appointment.caseSectionStepFormId.toString());\r\n\r\n formData.append('comment', appointment.comment);\r\n formData.append('serviceInDate', appointment.serviceInDate.toISOString());\r\n formData.append('serviceOutDate', appointment.serviceOutDate.toISOString());\r\n\r\n if (!R.isNil(appointment.userId)) {\r\n formData.append('userId', appointment.userId);\r\n }\r\n if (appointment.attachments.length !== 0) {\r\n formData.append('attachmentTypeId', appointment.attachments[0].attachmentTypeId.toString());\r\n formData.append('attachmentTypeCode', appointment.attachments[0].attachmentType!.code!);\r\n }\r\n appointment.attachments.forEach((attach) => {\r\n formData.append('files', attach.file);\r\n });\r\n\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/serviceappointment`,\r\n formData\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetCurrentCasePayment(caseId: number, formId: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/${caseId}/payment/${formId === null ? '' : formId}`\r\n )\r\n ).data;\r\n }\r\n public async GetCasePayments(caseId: number, formId: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/${caseId}/payments/${formId === null ? '' : formId}`\r\n )\r\n ).data;\r\n }\r\n public async AddCasePayment(casePayment: CasePaymentHistory): Promise {\r\n const formData = new FormData();\r\n formData.append('id', casePayment.id.toString());\r\n formData.append('caseId', casePayment.caseId.toString());\r\n\r\n if (!R.isNil(casePayment.currency)) {\r\n formData.append('currency', casePayment.currency.toString());\r\n }\r\n if (!R.isNil(casePayment.currencyRate)) {\r\n formData.append('currencyRate', casePayment.currencyRate.toString());\r\n }\r\n\r\n formData.append('caseSectionStepFormId', casePayment.caseSectionStepFormId.toString());\r\n if (!R.isNil(casePayment.organizationId)) {\r\n formData.append('organizationId', casePayment.organizationId.toString());\r\n }\r\n formData.append('comment', casePayment.comment);\r\n if (!R.isNil(casePayment.paymentTypeId)) {\r\n formData.append('paymentTypeId', casePayment.paymentTypeId.toString());\r\n }\r\n if (!R.isNil(casePayment.paymentRequestNoId)) {\r\n formData.append('paymentRequestNoId', casePayment.paymentRequestNoId.toString());\r\n }\r\n if (!R.isNil(casePayment.hasFransiza)) {\r\n formData.append('hasFransiza', casePayment.hasFransiza.toString());\r\n }\r\n if (!R.isNil(casePayment.paymentAmount)) {\r\n formData.append('paymentAmount', casePayment.paymentAmount.toString());\r\n }\r\n if (!R.isNil(casePayment.paymentAmountWithoutVAT)) {\r\n formData.append('paymentAmountWithoutVAT', casePayment.paymentAmountWithoutVAT.toString());\r\n }\r\n if (!R.isNil(casePayment.bankAccount)) {\r\n formData.append('bankAccount', casePayment.bankAccount.toString());\r\n }\r\n if (!R.isNil(casePayment.installments)) {\r\n formData.append('installments', casePayment.installments.toString());\r\n }\r\n\r\n if (!R.isNil(casePayment.userToId)) {\r\n formData.append('userIdTo', casePayment.userToId);\r\n }\r\n if (casePayment.attachments.length !== 0) {\r\n formData.append('attachmentTypeId', casePayment.attachments[0].attachmentTypeId.toString());\r\n formData.append('attachmentTypeCode', casePayment.attachments[0].attachmentType!.code!);\r\n }\r\n casePayment.attachments.forEach((attach) => {\r\n formData.append('files', attach.file);\r\n });\r\n\r\n if (!R.isNil(casePayment.secondCurrency)) {\r\n formData.append('secondCurrency', casePayment.secondCurrency.toString());\r\n }\r\n if (!R.isNil(casePayment.secondPaymentAmount)) {\r\n formData.append('secondPaymentAmount', casePayment.secondPaymentAmount.toString());\r\n }\r\n\r\n if (!R.isNil(casePayment.secondPaymentAmountWithoutVAT)) {\r\n formData.append(\r\n 'secondPaymentAmountWithoutVAT',\r\n casePayment.secondPaymentAmountWithoutVAT.toString()\r\n );\r\n }\r\n\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/casepayment`,\r\n formData\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetAllCaseStatusHistory(): Promise {\r\n return (await API.GetAsync(`${this.baseController}/StatusHistory`)).data;\r\n }\r\n\r\n public async GetCaseStatusHistory(caseId: number): Promise {\r\n return (\r\n await API.GetAsync(`${this.baseController}/${caseId}/StatusHistory`)\r\n ).data;\r\n }\r\n\r\n public async AddCaseStatusHistory(\r\n caseStatusHistory: CaseStatusHistory\r\n ): Promise {\r\n return (\r\n await API.PostAsync(\r\n `${this.baseController}/CaseStatusHistory`,\r\n caseStatusHistory\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetCaseWorkflowHistory(caseId: number): Promise {\r\n return (\r\n await API.GetAsync(`${this.baseController}/${caseId}/workflowHistory`)\r\n ).data;\r\n }\r\n\r\n public async GetCasePartnerHistory(caseId: number): Promise {\r\n return (\r\n await API.GetAsync(`${this.baseController}/${caseId}/partnerHistory`)\r\n ).data;\r\n }\r\n\r\n public async AddCasePartnerHistory(\r\n casePartnerHistory: CasePartnerHistory\r\n ): Promise {\r\n return (\r\n await API.PostAsync(\r\n `${this.baseController}/CasePartnerHistory`,\r\n casePartnerHistory\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetCaseParameterHistory(caseId: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/${caseId}/parameterHistory`\r\n )\r\n ).data;\r\n }\r\n\r\n public async SaveParameterHistory(caseId: number, values: CaseParameterHistory[]): Promise {\r\n await API.PutAsync(\r\n `${this.baseController}/${caseId}/parameterHistory`,\r\n values\r\n );\r\n }\r\n\r\n public async GetCaseTariffHistory(caseId: number): Promise {\r\n return (\r\n await API.GetAsync(`${this.baseController}/${caseId}/tariffHistory`)\r\n ).data;\r\n }\r\n\r\n public async SaveCaseTariffHistory(\r\n caseId: number,\r\n tariffValues: CaseTariffValueHistory[]\r\n ): Promise {\r\n await API.PutAsync(\r\n `${this.baseController}/${caseId}/tariffHistory`,\r\n tariffValues\r\n );\r\n }\r\n\r\n public async GetCaseTariffValueHistory(\r\n caseTariffHistoryId: number\r\n ): Promise {\r\n // return (await API.GetAsync(`${this.baseController}/${caseTariffHistoryId}/CaseTariffValueHistory`)).data;\r\n const caseTariffValueHistory = [] as CaseTariffValueHistory[];\r\n\r\n const tariffGroupTypeRef = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.TariffTypeGroup\r\n );\r\n const [tariffValues, tariffGroupTypeList] = await Promise.all([\r\n this.tariffService.GetTariffValues(20, null),\r\n this.appReferentialService.Get(tariffGroupTypeRef!.baseUrl)\r\n ]);\r\n\r\n const mostRecentCaseTariffValues = [] as TariffValue[];\r\n for (const tariffGroupType of tariffGroupTypeList) {\r\n const tariffValuesForTariffGroupType = tariffValues.filter(\r\n (item) => item.tariffType.tariffTypeGroupId === tariffGroupType.id\r\n );\r\n const mostRecentTariffValuesDate = tariffValuesForTariffGroupType.sort(function (\r\n a: any,\r\n b: any\r\n ) {\r\n return b.date - a.date;\r\n })[0].date;\r\n mostRecentCaseTariffValues.push(\r\n ...tariffValuesForTariffGroupType.filter(\r\n (item: TariffValue) => item.date === mostRecentTariffValuesDate\r\n )\r\n );\r\n }\r\n\r\n mostRecentCaseTariffValues.forEach((item, index) => {\r\n caseTariffValueHistory.push({\r\n id: index,\r\n caseTariffHistoryId: 1,\r\n tariffTypeId: item.tariffTypeId,\r\n tariffType: item.tariffType,\r\n value: item.value,\r\n brandId: item.brandId,\r\n brand: item.brand\r\n } as CaseTariffValueHistory);\r\n });\r\n return caseTariffValueHistory;\r\n }\r\n\r\n public async AddCaseTariffValueHistory(\r\n caseTariffValueHistory: CaseTariffValueHistory\r\n ): Promise {\r\n return (\r\n await API.PostAsync(\r\n `${this.baseController}/CaseTariffValueHistory`,\r\n caseTariffValueHistory\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetCaseAttachments(caseId: number, types: string[]): Promise {\r\n const idLIst = types.join(',');\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/${caseId}/caseAttachment/${idLIst}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetCaseAttachment(fileName: string): Promise {\r\n return (await API.GetFileAsync(`${this.baseController}/caseAttachment/${fileName}`)).data;\r\n }\r\n\r\n public async GetCaseAttachmentsArchive(\r\n caseId: number,\r\n formId: number | null,\r\n types: string[]\r\n ): Promise {\r\n const idLIst = types.join(',');\r\n return (\r\n await API.GetFileAsync(\r\n `${this.baseController}/${caseId}/caseAttachments/${idLIst}/${\r\n formId === null ? '' : formId\r\n }`\r\n )\r\n ).data;\r\n }\r\n\r\n public async AddCaseAttachment(caseAttachments: CaseAttachment[]): Promise {\r\n const formData = new FormData();\r\n\r\n formData.append('id', caseAttachments[0].id.toString());\r\n formData.append('caseId', caseAttachments[0].caseId.toString());\r\n formData.append('attachmentTypeId', caseAttachments[0].attachmentTypeId.toString());\r\n formData.append('attachmentTypeCode', caseAttachments[0].attachmentType!.code!);\r\n formData.append('isSelection', caseAttachments[0].isSelection.toString());\r\n if (caseAttachments[0].appointmentId) {\r\n formData.append('appointmentId', caseAttachments[0].appointmentId.toString());\r\n }\r\n if (caseAttachments[0].includeInOtherTab) {\r\n formData.append('includeInOtherTab', caseAttachments[0].includeInOtherTab.toString());\r\n }\r\n if (caseAttachments[0].checkFileName) {\r\n formData.append('checkFileName', caseAttachments[0].checkFileName.toString());\r\n }\r\n caseAttachments.forEach((item) => {\r\n formData.append('files', item.file);\r\n });\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/CaseAttachment`,\r\n formData\r\n )\r\n ).data;\r\n }\r\n\r\n public async RemoveCaseAttachment(fileName: string): Promise {\r\n await API.DeleteAsync(`${this.baseController}/CaseAttachment/${fileName}`);\r\n }\r\n\r\n public async AddCaseVehicle(vehicle: CaseVehicleHistory): Promise {\r\n return (await API.PostAsync(`${this.baseController}/CaseVehicle`, vehicle))\r\n .data;\r\n }\r\n public async UpdateCaseVehicle(vehicle: CaseVehicleHistory): Promise {\r\n await API.PutAsync(`${this.baseController}/CaseVehicle`, vehicle);\r\n }\r\n public async AddCaseEvent(event: CaseEventHistory): Promise {\r\n return (await API.PostAsync(`${this.baseController}/CaseEvent`, event)).data;\r\n }\r\n public async UpdateCaseEvent(event: CaseEventHistory): Promise {\r\n await API.PutAsync(`${this.baseController}/CaseEvent`, event);\r\n }\r\n\r\n public async GetCurrentEvent(caseId: number): Promise {\r\n return (await API.GetAsync(`${this.baseController}/CaseEvent/${caseId}`))\r\n .data;\r\n }\r\n\r\n public async AddCaseClient(client: CaseClient): Promise {\r\n const formData = new FormData();\r\n formData.append('id', client.id.toString());\r\n formData.append('clientId', client.clientId.toString());\r\n formData.append('caseId', client.caseId.toString());\r\n formData.append('caseSectionStepFormId', client.caseSectionStepFormId.toString());\r\n\r\n formData.append('personTypeId', client.personTypeId!.toString());\r\n formData.append('companyNumber', client.companyNumber);\r\n formData.append('pin', R.isNil(client.pin) ? '' : client.pin);\r\n formData.append('lastName', R.isNil(client.lastName) ? '' : client.lastName);\r\n formData.append('firstName', R.isNil(client.firstName) ? '' : client.firstName);\r\n formData.append('contactPerson', client.contactPerson);\r\n formData.append('companyName', R.isNil(client.companyName) ? '' : client.companyName);\r\n formData.append('phone', client.phone);\r\n formData.append('email', client.email);\r\n formData.append('address', R.isNil(client.address) ? '' : client.address);\r\n formData.append('city', R.isNil(client.city) ? '' : client.city);\r\n formData.append('region', R.isNil(client.region) ? '' : client.region);\r\n formData.append('district', R.isNil(client.district) ? '' : client.district);\r\n formData.append('gdprAgreement', client.gdprAgreement ? 'true' : 'false');\r\n formData.append('bankAccount', client.bankAccount ? client.bankAccount : '');\r\n\r\n if (client.attachments.length !== 0) {\r\n formData.append('attachmentTypeId', client.attachments[0].attachmentTypeId.toString());\r\n formData.append('attachmentTypeCode', client.attachments[0].attachmentType!.code!);\r\n }\r\n client.attachments.forEach((attach) => {\r\n formData.append('files', attach.file);\r\n });\r\n\r\n return (\r\n await API.Post2Async(`${this.baseController}/CaseClient`, formData)\r\n ).data;\r\n }\r\n public async UpdateCaseClient(client: CaseClient): Promise {\r\n const formData = new FormData();\r\n formData.append('id', client.id.toString());\r\n formData.append('clientId', client.clientId.toString());\r\n formData.append('caseId', client.caseId.toString());\r\n formData.append('caseSectionStepFormId', client.caseSectionStepFormId.toString());\r\n\r\n formData.append('personTypeId', client.personTypeId!.toString());\r\n formData.append('companyNumber', client.companyNumber);\r\n formData.append('pin', R.isNil(client.pin) ? '' : client.pin);\r\n formData.append('lastName', R.isNil(client.lastName) ? '' : client.lastName);\r\n formData.append('firstName', R.isNil(client.firstName) ? '' : client.firstName);\r\n formData.append('contactPerson', client.contactPerson);\r\n formData.append('companyName', R.isNil(client.companyName) ? '' : client.companyName);\r\n formData.append('phone', client.phone);\r\n formData.append('email', client.email);\r\n formData.append('address', R.isNil(client.address) ? '' : client.address);\r\n formData.append('city', R.isNil(client.city) ? '' : client.city);\r\n formData.append('region', R.isNil(client.region) ? '' : client.region);\r\n formData.append('district', R.isNil(client.district) ? '' : client.district);\r\n formData.append('gdprAgreement', client.gdprAgreement ? 'true' : 'false');\r\n formData.append('bankAccount', client.bankAccount ? client.bankAccount : '');\r\n\r\n if (client.attachments.length !== 0) {\r\n formData.append('attachmentTypeId', client.attachments[0].attachmentTypeId.toString());\r\n formData.append('attachmentTypeCode', client.attachments[0].attachmentType!.code!);\r\n }\r\n client.attachments.forEach((attach) => {\r\n formData.append('files', attach.file);\r\n });\r\n\r\n await API.PutAsync(`${this.baseController}/CaseClient`, formData);\r\n }\r\n\r\n public async GetCaseCalculationHistories(caseId: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/${caseId}/casecalculations`\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetAdminCaseCalculationHistories(caseId: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/${caseId}/adminCasecalculations`\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetCaseCalculationHistoryDetails(\r\n calculationHistoryId: number\r\n ): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/casecalculation/${calculationHistoryId}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetCaseCalculationReport(caseId: number, calculationId: number): Promise {\r\n return (\r\n await API.GetFileAsync(\r\n `${this.baseController}/${caseId}/calculationreport/${calculationId}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetCaseCalculationXML(caseId: number, calculationId: number): Promise {\r\n return (\r\n await API.GetFileAsync(\r\n `${this.baseController}/${caseId}/calculationXML/${calculationId}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetCalculationSections(): Promise {\r\n return (\r\n await API.GetAsync(`${this.baseController}/referential/calculationSection`)\r\n ).data;\r\n }\r\n\r\n public async GetCaseCalculationParts(\r\n calculationHistoryId: number\r\n ): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/CaseCalculationPart/list/${calculationHistoryId}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async AddCaseCalculationPart(\r\n caseCalculationPart: CaseCalculationPart\r\n ): Promise {\r\n return (\r\n await API.PostAsync(\r\n `${this.baseController}/CaseCalculationPart`,\r\n caseCalculationPart\r\n )\r\n ).data;\r\n }\r\n\r\n public async UpdateCaseCalculationPart(caseCalculationPart: CaseCalculationPart): Promise {\r\n await API.PutAsync(\r\n `${this.baseController}/CaseCalculationPart`,\r\n caseCalculationPart\r\n );\r\n }\r\n\r\n public async UpdateCaseCalculationParts(\r\n caseCalculationParts: CaseCalculationPart[],\r\n comment: string,\r\n offerNumber: string,\r\n calculationId: number,\r\n partsLocationOrganizationId: number | null,\r\n partsOrganizationId: number | null,\r\n organizationId: number | null,\r\n organizationName: string | null,\r\n isUpdate: boolean,\r\n manipulationPercent: number,\r\n additionInsurer: number | null,\r\n formId: number,\r\n interogatePartner: boolean\r\n ): Promise {\r\n await API.PutAsync<{\r\n parts: CaseCalculationPart[];\r\n comment: string;\r\n offerNumber: string;\r\n partsLocationOrganizationId: number | null;\r\n partsOrganizationId: number | null;\r\n organizationId: number | null;\r\n organizationName: string | null;\r\n isUpdate: boolean;\r\n manipulationPercent: number;\r\n additionInsurer: number | null;\r\n formId: number;\r\n interogatePartner: boolean;\r\n }>(`${this.baseController}/calculation/${calculationId}/calculationParts`, {\r\n parts: caseCalculationParts,\r\n comment: comment,\r\n offerNumber: offerNumber,\r\n partsLocationOrganizationId: partsLocationOrganizationId,\r\n partsOrganizationId: partsOrganizationId,\r\n organizationId: organizationId,\r\n organizationName: organizationName,\r\n isUpdate: isUpdate,\r\n manipulationPercent: manipulationPercent,\r\n additionInsurer: additionInsurer,\r\n formId: formId,\r\n interogatePartner: interogatePartner\r\n });\r\n }\r\n\r\n public async RemoveCaseCalculationPart(id: number): Promise {\r\n return (await API.DeleteAsync(`${this.baseController}/CaseCalculationPart/${id}`)).data;\r\n }\r\n\r\n public async SubmitForm(\r\n caseId: number,\r\n formId: number,\r\n assignedTo: AppUser | null\r\n ): Promise {\r\n let assigned = {};\r\n\r\n if (assignedTo !== null) {\r\n assigned = {\r\n userId: assignedTo.id,\r\n organizationId: assignedTo.organizationId,\r\n hoId: assignedTo.hoId === null ? assignedTo.id : assignedTo.hoId\r\n };\r\n } else {\r\n assigned = {\r\n userId: '',\r\n organizationId: null,\r\n hoId: null\r\n };\r\n }\r\n\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/${caseId}/submitForm/${formId}`,\r\n assigned\r\n )\r\n ).data;\r\n }\r\n\r\n public async InterogateCaseCalculationsAlternativeParts(\r\n originalPartId: number,\r\n partNUmber: string,\r\n addition: number,\r\n discount: number,\r\n workflowId: number,\r\n organizationId?: number | null\r\n ): Promise {\r\n const organizationIdParam = organizationId ? `/${organizationId}` : '';\r\n const url =\r\n `${this.baseController}/alternativeParts/${encodeURIComponent(\r\n partNUmber\r\n )}/${originalPartId}/${addition}/${discount}/${workflowId}` + organizationIdParam;\r\n return (await API.GetAsync(url)).data;\r\n }\r\n\r\n public async InterogateCaseCalculationsAlternativePartsBySupplier(\r\n originalPartId: number,\r\n partNumber: string,\r\n addition: number,\r\n discount: number,\r\n workflowId: number,\r\n supplierId: number,\r\n organizationId?: number | null\r\n ): Promise {\r\n const organizationIdParam = organizationId ? `/${organizationId}` : '';\r\n const url =\r\n `${this.baseController}/supplierAlternativeParts/${encodeURIComponent(\r\n partNumber\r\n )}/${originalPartId}/${addition}/${discount}/${workflowId}/${supplierId}` + organizationIdParam;\r\n return (await API.GetAsync(url)).data;\r\n }\r\n\r\n public async SetCaseNotNew(\r\n caseId: number,\r\n caseCalculationHistId: number,\r\n moveToTasks: boolean,\r\n moveToViewed: boolean,\r\n notNew: boolean\r\n ): Promise {\r\n await API.PutAsync(\r\n `${this.baseController}/${caseId}/IsNotNew/${caseCalculationHistId}?moveToTasks=${moveToTasks}&moveToViewed=${moveToViewed}¬New=${notNew}`,\r\n null\r\n );\r\n }\r\n\r\n public async GetTaskList(): Promise {\r\n return (await API.GetAsync(`${this.baseController}/usertasks`)).data;\r\n }\r\n\r\n public async RemoveUserTask(id: number): Promise {\r\n return (await API.DeleteAsync(`${this.baseController}/usertask/${id}`)).data;\r\n }\r\n\r\n public async GetUserComments(): Promise {\r\n return (await API.GetAsync(`${this.baseController}/usercomments`)).data;\r\n }\r\n\r\n public async RemoveUserComment(id: number, addtask: boolean): Promise {\r\n return (await API.DeleteAsync(`${this.baseController}/usercomment/${id}/${addtask}`))\r\n .data;\r\n }\r\n public async GetClientOffers(caseId: number, vehicleId: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/ClientOffers/${caseId}/${vehicleId}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async BuildFilledInEmailTemplate(\r\n id: number,\r\n formId: number,\r\n assignedTo: AppUser | null\r\n ): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/${id}/fillInEmailTemplate/${formId}`,\r\n {\r\n assignedTo\r\n }\r\n )\r\n ).data;\r\n }\r\n\r\n public async SendConfirmedOrderNotification(caseId: number, orderId: number): Promise {\r\n return (\r\n await API.PostAsync(\r\n `${this.baseController}/${caseId}/${orderId}/sendOrderNotification`,\r\n null\r\n )\r\n ).data;\r\n }\r\n\r\n public async SyncUndocumentedModels(): Promise {\r\n await API.PostAsync(`${this.baseController}/syncUndocumentedModels`, {});\r\n }\r\n\r\n public async GetCarUndocumentedModelsByBrand(brandId: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/undocumentedModel/list/${brandId}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetCarExceptions(): Promise {\r\n return (await API.GetAsync(`${this.baseController}/Referential/CarException`))\r\n .data;\r\n }\r\n\r\n public async AddCarException(carException: CarException): Promise {\r\n return (\r\n await API.PostAsync(\r\n `${this.baseController}/Referential/CarException`,\r\n carException\r\n )\r\n ).data;\r\n }\r\n\r\n public async UpdateCarException(carException: CarException): Promise {\r\n await API.PutAsync(\r\n `${this.baseController}/Referential/CarException`,\r\n carException\r\n );\r\n }\r\n\r\n public async RemoveCarException(id: number): Promise {\r\n return (await API.DeleteAsync(`${this.baseController}/Referential/CarException/${id}`))\r\n .data;\r\n }\r\n\r\n public async CarExceptionSearch(vin: string, plateNumber: string): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/CarExceptions/search?vin=${R.isNil(vin) ? '' : vin}&platenumber=${\r\n R.isNil(plateNumber) ? '' : plateNumber\r\n }`\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetCarClassRentPrices(): Promise {\r\n return (\r\n await API.GetAsync(`${this.baseController}/CarClassRentPrice/list`)\r\n ).data;\r\n }\r\n\r\n public async AddCarClassRentPrice(\r\n carClassRentPrice: CarClassRentPrice\r\n ): Promise {\r\n return (\r\n await API.PostAsync(\r\n `${this.baseController}/CarClassRentPrice`,\r\n carClassRentPrice\r\n )\r\n ).data;\r\n }\r\n\r\n public async RemoveCarClassRentPrice(id: number): Promise {\r\n return (await API.DeleteAsync(`${this.baseController}/CarClassRentPrice/${id}`)).data;\r\n }\r\n\r\n public async UpdateCarClassRentPrice(carClassRentPrice: CarClassRentPrice): Promise {\r\n await API.PutAsync(\r\n `${this.baseController}/CarClassRentPrice`,\r\n carClassRentPrice\r\n );\r\n }\r\n\r\n public async GetCarClassRentPriceByClassId(classId: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/CarClassRentPrice/list/${classId}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetBestOffer(offer: Offer): Promise {\r\n return (await API.PostAsync(`${this.baseController}/getBestOffer`, offer)).data;\r\n }\r\n\r\n public async GetCaseBillingReport(billingFilters: BillingFilters): Promise {\r\n return (\r\n await API.PostFileAsync(\r\n `${this.baseController}/getCaseReportExcel`,\r\n billingFilters\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetCaseBillingReportDgpciRequest(\r\n dgpciBillingFilters: DgpciBillingFilters\r\n ): Promise {\r\n return (\r\n await API.PostFileAsync(\r\n `${this.baseController}/DGPCI/getVinRequestReportExcel`,\r\n dgpciBillingFilters\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetVinByPlateNumberRequest(payload: PlateNumber): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/DGPCI/getVin`,\r\n payload\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetValuationVehicle(vehicleId: number): Promise {\r\n return (\r\n await API.GetAsync(`${this.baseController}/valuationVehicle/${vehicleId}`)\r\n ).data;\r\n }\r\n\r\n public async UpdateCalculationPartsAndCasePartToBeOrdered(\r\n caseCalculationParts: CaseCalculationPart[],\r\n comment: string,\r\n offerNumber: string,\r\n calculationId: number,\r\n partsLocationOrganizationId: number | null,\r\n partsOrganizationId: number | null,\r\n organizationId: number | null,\r\n organizationName: string | null\r\n ): Promise {\r\n await API.PutAsync<{\r\n parts: CaseCalculationPart[];\r\n comment: string;\r\n offerNumber: string;\r\n partsLocationOrganizationId: number | null;\r\n partsOrganizationId: number | null;\r\n organizationId: number | null;\r\n organizationName: string | null;\r\n }>(`${this.baseController}/calculation/${calculationId}/calculationParts-partToBeOrdered`, {\r\n parts: caseCalculationParts,\r\n comment: comment,\r\n offerNumber: offerNumber,\r\n partsLocationOrganizationId: partsLocationOrganizationId,\r\n partsOrganizationId: partsOrganizationId,\r\n organizationId: organizationId,\r\n organizationName: organizationName\r\n });\r\n }\r\n\r\n public async GetLatestCaseVehicleHistory(vin: string): Promise {\r\n return (await API.GetAsync(`${this.baseController}/latest-vehicle/${vin}`))\r\n .data;\r\n }\r\n\r\n public async PrcClaimService(request: ClaimServiceRequest): Promise {\r\n return (await API.PostAsync(`${this.baseController}/prc/claimService`, request)).data;\r\n }\r\n\r\n public async CalculationDifferences(\r\n request: CalculationDifferencesRequest\r\n ): Promise {\r\n return (await API.PostAsync(`${this.baseController}/prc/calculationDifferences`, request))\r\n .data;\r\n }\r\n\r\n public async PrcClaimServiceCalculation(\r\n request: ClaimServiceCalculationRequest\r\n ): Promise {\r\n return (await API.PostAsync(`${this.baseController}/prc/claimServiceCalculation`, request))\r\n .data;\r\n }\r\n\r\n public async PrcClaimStatus(request: ClaimStatusRequest): Promise {\r\n return (await API.PostAsync(`${this.baseController}/prc/claimStatus`, request)).data;\r\n }\r\n\r\n public async PrcClaimServiceAlternativeCalculation(\r\n request: ClaimServiceAlternativeCalculationRequest\r\n ): Promise {\r\n return (\r\n await API.PostAsync(\r\n `${this.baseController}/prc/claimServiceAlternativeCalculation`,\r\n request\r\n )\r\n ).data;\r\n }\r\n\r\n public async MaintenanceCupiOptionalPartList(): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/MaintenanceCupiOptionalPart`\r\n )\r\n ).data;\r\n }\r\n\r\n public async AddMaintenanceCupiOptionalPart(\r\n maintenanceCupiOptionalPart: MaintenanceCupiOptionalPart\r\n ): Promise {\r\n return (\r\n await API.PostAsync(\r\n `${this.baseController}/MaintenanceCupiOptionalPart`,\r\n maintenanceCupiOptionalPart\r\n )\r\n ).data;\r\n }\r\n\r\n public async RemoveMaintenanceCupiOptionalPart(id: number): Promise {\r\n return (await API.DeleteAsync(`${this.baseController}/MaintenanceCupiOptionalPart/${id}`))\r\n .data;\r\n }\r\n\r\n public async UpdateMaintenanceCupiOptionalPart(\r\n maintenanceCupiOptionalPart: MaintenanceCupiOptionalPart\r\n ): Promise {\r\n await API.PutAsync(\r\n `${this.baseController}/MaintenanceCupiOptionalPart`,\r\n maintenanceCupiOptionalPart\r\n );\r\n }\r\n\r\n public async GetModelList(): Promise {\r\n return (await API.GetAsync(`${this.baseController}/Model/list`)).data;\r\n }\r\n\r\n public async UpdateCarClassModel(model: Model): Promise {\r\n await API.PutAsync(`${this.baseController}/Model`, model);\r\n }\r\n\r\n public async FleetSearchVehicle(vin: string, modelId: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/fleet/search-vehicle?vin=${\r\n R.isNil(vin) ? '' : vin\r\n }&modelId=${modelId}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetManipulationPercent(\r\n calculationRequest: CalculationRequest\r\n ): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/calculation/manipulation-percent`,\r\n calculationRequest\r\n )\r\n ).data;\r\n }\r\n\r\n public async CarfixAlternativeCalculation(\r\n request: CarfixAlternativeCalculationRequest\r\n ): Promise {\r\n return (\r\n await API.PostAsync(`${this.baseController}/carfix/alternativeCalculation`, request)\r\n ).data;\r\n }\r\n\r\n public async CarfixAttachmentNotification(\r\n request: CarfixAttachmentNotificationRequest\r\n ): Promise {\r\n return (\r\n await API.PostAsync(`${this.baseController}/carfix/attachmentNotification`, request)\r\n ).data;\r\n }\r\n\r\n public async AddCaseVehicleDetails(\r\n vehicleDetails: CaseVehicleDetails\r\n ): Promise {\r\n return (\r\n await API.PostAsync(\r\n `${this.baseController}/vehicle-details`,\r\n vehicleDetails\r\n )\r\n ).data;\r\n }\r\n\r\n public async UpdateCaseVehicleDetails(vehicleDetails: CaseVehicleDetails): Promise {\r\n await API.PutAsync(\r\n `${this.baseController}/vehicle-details`,\r\n vehicleDetails\r\n );\r\n }\r\n\r\n public async GetCurrentVehicleDetails(appointmentId: number): Promise {\r\n return (\r\n await API.GetAsync(`${this.baseController}/vehicle-details/${appointmentId}`)\r\n ).data;\r\n }\r\n\r\n public async GetTariffPercent(\r\n request: TariffPercentRequest\r\n ): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/calculation/tariff-value-percent`,\r\n request\r\n )\r\n ).data;\r\n }\r\n\r\n public async MaintenanceProducerList(): Promise {\r\n return (await API.GetAsync(`${this.baseController}/MaintenanceProducer`))\r\n .data;\r\n }\r\n public async AddMaintenanceProducer(\r\n maintenanceProducer: MaintenanceProducer\r\n ): Promise {\r\n return (\r\n await API.PostAsync(\r\n `${this.baseController}/MaintenanceProducer`,\r\n maintenanceProducer\r\n )\r\n ).data;\r\n }\r\n public async RemoveMaintenanceProducer(id: number): Promise {\r\n return (await API.DeleteAsync(`${this.baseController}/MaintenanceProducer/${id}`)).data;\r\n }\r\n\r\n public async UpdateMaintenanceProducer(maintenanceProducer: MaintenanceProducer): Promise {\r\n await API.PutAsync(\r\n `${this.baseController}/MaintenanceProducer`,\r\n maintenanceProducer\r\n );\r\n }\r\n\r\n public async GetVehicleFromVQRepo(vin: string): Promise {\r\n return (await API.GetAsync(`${this.baseController}/vehicle/${vin}`)).data;\r\n }\r\n\r\n public async GetAppointmentByCaseId(caseId: number): Promise {\r\n return (\r\n await API.GetAsync(`${this.baseController}/appointmentByCaseId?caseId=${caseId}`)\r\n ).data;\r\n }\r\n\r\n public async GetAppointments(appoitmentFilters: AppointmentFilters): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/appointment`,\r\n appoitmentFilters\r\n )\r\n ).data;\r\n }\r\n\r\n public async SetAppointmentNotNew(\r\n appointmentId: number,\r\n appointmentStatusHistId: number,\r\n moveToViewed: boolean,\r\n notNew: boolean\r\n ): Promise {\r\n await API.PutAsync(\r\n `${this.baseController}/appointment/${appointmentId}/IsNotNew/${appointmentStatusHistId}?moveToViewed=${moveToViewed}¬New=${notNew}`,\r\n null\r\n );\r\n }\r\n\r\n public async GetGTWSBillingReport(gtWsBillingFilters: GTWSBillingFilters): Promise {\r\n return (\r\n await API.PostFileAsync(\r\n `${this.baseController}/getApiGTWSLogReportExcel`,\r\n gtWsBillingFilters\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetNonStockPartBillingReport(nonStockBillingFilters: NonStockBillingFilters): Promise {\r\n return (\r\n await API.PostFileAsync(\r\n `${this.baseController}/non-stock-part-report`,\r\n nonStockBillingFilters\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetLastApprovedCaseCalculationHistory(\r\n caseId: number,\r\n type: string\r\n ): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/lastcasecalculation/${caseId}/${type}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetAppointmentByType(\r\n caseId: number, \r\n appointmentCategoryTypeId: number\r\n ): Promise {\r\n return (\r\n await API.GetAsync(`${this.baseController}/appointment-by-type/${caseId}/${appointmentCategoryTypeId}`)\r\n ).data;\r\n }\r\n\r\n public async SetCarInService(\r\n caseId: number,\r\n carInService: boolean\r\n ): Promise {\r\n return (await API.PostAsync(\r\n `${this.baseController}/carInService/${caseId}?carInService=${carInService}`,\r\n {}\r\n )).data;\r\n }\r\n\r\n public async GetCaseAppointmentAttachments(\r\n caseId: number,\r\n appointmentId: number,\r\n types: string[]\r\n ): Promise {\r\n const idLIst = types.join(',');\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/${caseId}/${appointmentId}/caseAttachment/${idLIst}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async CreateAutomateAppointment(\r\n request: AutomateAppointmentRequest\r\n ): Promise {\r\n return (\r\n await API.PostAsync(\r\n `${this.baseController}/automate-appointment`,\r\n request\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetAcquisitionCases(\r\n request: AcquisitionCaseRequest\r\n ): Promise {\r\n return (\r\n await API.PostAsync(\r\n `${this.baseController}/acquisition-case`,\r\n request\r\n )\r\n ).data;\r\n }\r\n\r\n public async ChangeCaseStatusBasedCode(request: ChangeCaseStatusBasedCodeRequest): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/change-status`,\r\n request\r\n )\r\n ).data;\r\n }\r\n\r\n public async GenerateSmartBillInvoice(request: GenerateInvoiceRequest): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/smartBill/generate-invoice`,\r\n request\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetPartsHistoryInterogationReport(request: PartsHistoryInterogationRequest): Promise {\r\n return (\r\n await API.PostFileAsync(\r\n `${this.baseController}/calculation/parts-history-interogation`,\r\n request\r\n )\r\n ).data;\r\n }\r\n\r\n public async UpdateOrderInfo(request: UpdateOrderInfoRequest): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/update-order`,\r\n request\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetAppointmentPaymentStatus(request: AppointmentPaymentStatusRequest): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/appointment/payment-status`,\r\n request\r\n )\r\n ).data;\r\n }\r\n\r\n public async SendVerifiedBySupplierOrderNotification(request: SendOrderNotificationRequest): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/send-order-notification`,\r\n request\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetAppointmentAttachments(appointmentId: number, types: string[]): Promise {\r\n const idLIst = types.join(',');\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/attachment/appointment/${appointmentId}/${idLIst}`\r\n )\r\n ).data;\r\n }\r\n\r\n \r\n\r\n public async GetAppointmentAttachmentsArchive(\r\n appointmentId: number,\r\n types: string[]\r\n ): Promise {\r\n const idLIst = types.join(',');\r\n return (\r\n await API.GetFileAsync(\r\n `${this.baseController}/attachment/appointment/archive/${appointmentId}/${idLIst}`\r\n )\r\n ).data;\r\n }\r\n\r\n public async SendAlternativeCalculation(\r\n request: SendAlternativeCalculationRequest\r\n ): Promise{\r\n return (\r\n await API.PostAsync(\r\n `${this.baseController}/calculation/alternativeCalculation`,\r\n request\r\n )\r\n ).data;\r\n }\r\n\r\n public async AddNonStockPart(\r\n request: NonStockPart\r\n ): Promise {\r\n return (\r\n await API.PostAsync(\r\n `${this.baseController}/NonStockPart`,\r\n request\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetModelById(modelId: number): Promise {\r\n return (await API.GetAsync(`${this.baseController}/modelById/${modelId}`)).data;\r\n }\r\n\r\n public async SendPartNotifySupport(request: PartNotifySuppportRequest): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/part/notify-support`,\r\n request\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetCaseInfoById(caseId: number): Promise {\r\n return (await API.GetAsync(`${this.baseController}/byId/${caseId}`)).data;\r\n }\r\n\r\n public async SendGeneralNotifySupport(request: GeneralNotifySupportRequest): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/general/notify-support`,\r\n request\r\n )\r\n ).data;\r\n }\r\n\r\n public async SendNotifySupport(request: NotifySupportRequest): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/notify-support`,\r\n request\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetCaseCommentsByTab(caseId: number, isSupportTab: boolean): Promise {\r\n return (await API.GetAsync(`${this.baseController}/caseComment/${caseId}/${isSupportTab}`))\r\n .data;\r\n }\r\n\r\n public async GetNewBillingReport(request: NewBillingReportFilters): Promise {\r\n return (\r\n await API.PostFileAsync(\r\n `${this.baseController}/case-billing-report`,\r\n request\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetAttachmentTypeByCode(code: string): Promise {\r\n return (await API.GetAsync(`${this.baseController}/attachmentType/${code}`)).data;\r\n }\r\n}\r\n","import { API } from '../helpers/API';\r\nimport { IGtService } from './Interfaces/IGtService';\r\nimport { VinDecodeResponse } from '../interfaces/Case';\r\n\r\nexport class GtService implements IGtService {\r\n private baseController = '/case';\r\n\r\n public async DecodeVin(vin: string): Promise {\r\n return (await API.GetAsync(`${this.baseController}/decodevin/${vin}`)).data;\r\n }\r\n}\r\n","import { IOrganizationService } from '../services/Interfaces/IOrganizationService';\r\nimport { OrganizationType } from '../interfaces/Organization';\r\nimport { ICaseSettingsService } from './Interfaces/ICaseSettingsService';\r\nimport { CaseSettings } from '../interfaces/CaseSettings';\r\nimport { IWorkflowService } from './Interfaces/IWorkflowService';\r\nimport { Workflow } from '../interfaces/Workflow';\r\nimport { OrganizationService } from './OrganizationService';\r\nimport { isNullOrUndefined } from 'util';\r\nimport Referentials from '../helpers/Referentials.json';\r\nimport { ReferentialCode } from '../helpers/Constants';\r\nimport { IReferentialService } from '../services/Interfaces/IReferentialService';\r\nimport { ReferentialService } from './ReferentialService';\r\n\r\nexport class CaseSettingsService implements ICaseSettingsService {\r\n private workflowService: IWorkflowService;\r\n private organizationService: IOrganizationService;\r\n private appReferentialService: IReferentialService;\r\n private baseController = '/case';\r\n\r\n constructor(\r\n workflowService: IWorkflowService,\r\n organizationService: OrganizationService,\r\n appReferentialService: ReferentialService\r\n ) {\r\n this.workflowService = workflowService;\r\n this.organizationService = organizationService;\r\n this.appReferentialService = appReferentialService;\r\n }\r\n\r\n public async GetCaseSettings(workflowId: number): Promise {\r\n const ref = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.CompanyParameter\r\n );\r\n const orgTypeRef = Referentials.referential.find(\r\n (item) => item.code === ReferentialCode.OrganizationType\r\n );\r\n const [workflow, parameterList, orgTypes] = await Promise.all([\r\n this.workflowService.GetWorkflowSettings(workflowId),\r\n this.appReferentialService.Get(ref!.baseUrl),\r\n this.appReferentialService.Get(orgTypeRef!.baseUrl)\r\n ]);\r\n\r\n if (isNullOrUndefined(workflow as Workflow)) {\r\n return null;\r\n }\r\n const orgIds = workflow.workflowPartners.map((item) => item.partnerId);\r\n orgIds.push(workflow.organizationOwnerId);\r\n\r\n const [partners] = await Promise.all([\r\n this.organizationService.GetUserOrganizationsByIds(Array.from(new Set(orgIds)))\r\n ]);\r\n\r\n workflow.workflowPartners.forEach((wpItem) => {\r\n const partner = partners.find((item) => item.id === wpItem.partnerId);\r\n wpItem.partner = isNullOrUndefined(partner) ? null : partner;\r\n const orgType = orgTypes.find((item) => item.id === wpItem.partner!.organizationTypeId);\r\n wpItem.partner!.organizationType = (isNullOrUndefined(orgType)\r\n ? null\r\n : orgType) as any as OrganizationType;\r\n });\r\n\r\n workflow.workflowParameters.forEach((item) => {\r\n const param = parameterList.find((par) => par.id === item.parameterId);\r\n item.parameter = isNullOrUndefined(param) ? null : param;\r\n });\r\n\r\n const orgOwner = partners.find((item) => item.id === workflow.organizationOwnerId);\r\n workflow.organizationOwner = isNullOrUndefined(orgOwner) ? null : orgOwner;\r\n\r\n const caseSettings = {\r\n workflow: { ...workflow }\r\n } as CaseSettings;\r\n\r\n return caseSettings;\r\n }\r\n}\r\n","import { IDashboardService } from './Interfaces/IDashboardService';\r\nimport {\r\n IDashboardFilters,\r\n IDashboardChart,\r\n IDashboardCostsStructure\r\n} from '../interfaces/Dashboard';\r\nimport { Case } from '../interfaces/Case';\r\n\r\nexport class DashboardService implements IDashboardService {\r\n private baseController = '/dashboard';\r\n\r\n async GetDashboardOriginalCalc(Filters: IDashboardFilters): Promise {\r\n return 3000;\r\n }\r\n\r\n async GetDashboardAlternativeCalc(Filters: IDashboardFilters): Promise {\r\n return 4000;\r\n }\r\n\r\n async GetDashboardVinIdentifiersNumber(Filters: IDashboardFilters): Promise {\r\n return 5000;\r\n }\r\n\r\n async GetDashboardGTEstimateNumber(Filters: IDashboardFilters): Promise {\r\n return 6000;\r\n }\r\n\r\n async GetDashboardPiecesOrdersNumber(Filters: IDashboardFilters): Promise {\r\n return 7000;\r\n }\r\n\r\n async GetDashboardTotalCases(Filters: IDashboardFilters): Promise {\r\n return 8000;\r\n }\r\n\r\n async GetDashboardCostsStructure(\r\n Filters: IDashboardFilters\r\n ): Promise {\r\n const dashboardsCostsStructure = [\r\n { total: 200, closedCases: 30, openedCases: 40 }\r\n ] as IDashboardCostsStructure[];\r\n return dashboardsCostsStructure;\r\n }\r\n\r\n async GetDashboardCostOptimization(\r\n Filters: IDashboardFilters\r\n ): Promise {\r\n const dashboardsCostOptimization = [\r\n { total: 400, closedCases: 50, openedCases: 60 }\r\n ] as IDashboardCostsStructure[];\r\n return dashboardsCostOptimization;\r\n }\r\n\r\n async GetDashboardCasesAnalsysChartCaseOwner(\r\n Filters: IDashboardFilters\r\n ): Promise {\r\n const dashboardsCharts = [\r\n { displayName: 'Test1', value: 20 },\r\n { displayName: 'Test2', value: 30 }\r\n ] as IDashboardChart[];\r\n return dashboardsCharts;\r\n }\r\n\r\n async GetDashboardCasesAnalsysChartCaseType(\r\n Filters: IDashboardFilters\r\n ): Promise {\r\n const dashboardsCharts = [\r\n { displayName: 'Test3', value: 40 },\r\n { displayName: 'Test4', value: 50 }\r\n ] as IDashboardChart[];\r\n return dashboardsCharts;\r\n }\r\n\r\n async GetDashboardCasesAnalsysChartCaseStatus(\r\n Filters: IDashboardFilters\r\n ): Promise {\r\n const dashboardsCharts = [\r\n { displayName: 'Test5', value: 60 },\r\n { displayName: 'Test6', value: 70 }\r\n ] as IDashboardChart[];\r\n return dashboardsCharts;\r\n }\r\n\r\n async GetDashboardCostStructureChartCaseOwner(\r\n Filters: IDashboardFilters\r\n ): Promise {\r\n const dashboardsCharts = [\r\n { displayName: 'Test7', value: 44 },\r\n { displayName: 'Test8', value: 88 }\r\n ] as IDashboardChart[];\r\n return dashboardsCharts;\r\n }\r\n\r\n async GetDashboardCostStructureChartCostType(\r\n Filters: IDashboardFilters\r\n ): Promise {\r\n const dashboardsCharts = [\r\n { displayName: 'Test9', value: 75 },\r\n { displayName: 'Test10', value: 77 }\r\n ] as IDashboardChart[];\r\n return dashboardsCharts;\r\n }\r\n\r\n async GetDashboardCostStructureChartVehicleBrand(\r\n Filters: IDashboardFilters\r\n ): Promise {\r\n const dashboardsCharts = [\r\n { displayName: 'Test11', value: 33 },\r\n { displayName: 'Test12', value: 22 }\r\n ] as IDashboardChart[];\r\n return dashboardsCharts;\r\n }\r\n\r\n async GetDashboardCostOptimizationChartCaseOwner(\r\n Filters: IDashboardFilters\r\n ): Promise {\r\n const dashboardsCharts = [\r\n { displayName: 'Test13', value: 454 },\r\n { displayName: 'Test14', value: 848 }\r\n ] as IDashboardChart[];\r\n return dashboardsCharts;\r\n }\r\n\r\n async GetDashboardCostOptimizationChartCostType(\r\n Filters: IDashboardFilters\r\n ): Promise {\r\n const dashboardsCharts = [\r\n { displayName: 'Test15', value: 64 },\r\n { displayName: 'Test16', value: 34 }\r\n ] as IDashboardChart[];\r\n return dashboardsCharts;\r\n }\r\n\r\n async GetDashboardCostOptimizationChartVehicleBrand(\r\n Filters: IDashboardFilters\r\n ): Promise {\r\n const dashboardsCharts = [\r\n { displayName: 'Test17', value: 77 },\r\n { displayName: 'Test18', value: 90 }\r\n ] as IDashboardChart[];\r\n return dashboardsCharts;\r\n }\r\n\r\n async GetDashboardNewCases(Filters: IDashboardFilters): Promise {\r\n return [];\r\n }\r\n\r\n async GetDashboardUpdatedCases(Filters: IDashboardFilters): Promise {\r\n return [];\r\n }\r\n\r\n async GetDashboardWaitingCases(Filters: IDashboardFilters): Promise {\r\n return [];\r\n }\r\n\r\n async GetDashboardFilters(startDate: Date, endDate: Date): Promise {\r\n const dashboardFilters = {\r\n id: 1,\r\n dateFrom: startDate,\r\n dateTo: endDate,\r\n organizationIds: [34, 35, 36, 37, 38],\r\n casePartnerIds: [1, 34],\r\n caseStatusIds: [3],\r\n caseTypeIds: [1, 2]\r\n } as IDashboardFilters;\r\n return dashboardFilters;\r\n }\r\n}\r\n","import { IOrderService } from './Interfaces/IOrderService';\r\nimport {\r\n OrderFilters,\r\n OrderList,\r\n Order,\r\n OrderPart,\r\n PartToBeOrdered,\r\n OrderStatusHistory,\r\n OrderStatusChangeRequestDto,\r\n OrderFiltersResult,\r\n OrderPartsHistoryFilters,\r\n UpdateOrderAmountsRequestDto\r\n} from '../interfaces/Order';\r\nimport { API } from '../helpers/API';\r\nimport { isNullOrUndefined } from 'util';\r\nimport AutoOrderHistory from '../components/order-parts-history/OrderPartsHistory';\r\nimport { CreatePartsToBeOrderedRequest, DeletePartToBeOrderedRequestDto } from '../interfaces/Case';\r\n\r\nexport class OrderService implements IOrderService {\r\n private baseController = '/case';\r\n\r\n public async GetOrders(orderFilters: OrderFilters ): Promise {\r\n return (\r\n await API.Post2Async(`${this.baseController}/order`, orderFilters)\r\n ).data;\r\n }\r\n\r\n public async GetOrderFilters(orderFilter: OrderFilters): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/order/filters`,\r\n orderFilter\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetOrderParts(orderId: number | null): Promise {\r\n return (await API.GetAsync(`${this.baseController}/order/${orderId}/parts`)).data;\r\n }\r\n\r\n public async CreatePartsToBeOrdered(caseId: number | null, request: CreatePartsToBeOrderedRequest): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/${caseId}/CreatePartsToBeOrdered`,\r\n request\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetOrdersWithParts(caseId: number): Promise {\r\n return (await API.GetAsync(`${this.baseController}/${caseId}/ordersWithParts`)).data;\r\n }\r\n\r\n public async GetOrder(orderId: number, withParts: boolean): Promise {\r\n return (await API.GetAsync(`${this.baseController}/order/${orderId}/${withParts}`)).data;\r\n }\r\n\r\n public async GetOrderStatusHistories(orderId: number): Promise {\r\n return (\r\n await API.GetAsync(\r\n `${this.baseController}/order/${orderId}/statusHistories`\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetPartsToBeOrdered(caseId: number): Promise {\r\n return (\r\n await API.GetAsync(`${this.baseController}/${caseId}/partsToBeOrdered`)\r\n ).data;\r\n }\r\n\r\n public async UpdatePartToBeOrdered(item: PartToBeOrdered): Promise {\r\n await API.PutAsync(`${this.baseController}/PartToBeOrdered`, item);\r\n }\r\n\r\n public async CreateOrder(caseId: number, supplierId: number): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/${caseId}/order/${supplierId}`,\r\n null\r\n )\r\n ).data;\r\n }\r\n\r\n public async DeleteOrderPart(partId: number): Promise {\r\n await API.DeleteAsync(`${this.baseController}/order/part/${partId}`);\r\n }\r\n\r\n public async DeleteOrder(ordId: number): Promise {\r\n await API.DeleteAsync(`${this.baseController}/order/${ordId}`);\r\n }\r\n\r\n public async DeletePartToBeOrdered(partId: number): Promise {\r\n await API.DeleteAsync(`${this.baseController}/order/partToBeOrdered/${partId}`);\r\n }\r\n \r\n public async ChangeOrderPartStatus(partId: number, statusId: number): Promise {\r\n await API.PutAsync(`${this.baseController}/order/part/${partId}/status/${statusId}`, {});\r\n }\r\n\r\n public async ChangeOrderStatus(\r\n orderStatusChangeRequestDto: OrderStatusChangeRequestDto\r\n ): Promise {\r\n const formData = new FormData();\r\n\r\n formData.append('statusId', orderStatusChangeRequestDto.statusId.toString());\r\n formData.append('orderId', orderStatusChangeRequestDto.orderId.toString());\r\n formData.append('comment', orderStatusChangeRequestDto.comment);\r\n formData.append('workflowId', orderStatusChangeRequestDto.workflowId.toString());\r\n if (!isNullOrUndefined(orderStatusChangeRequestDto.partsLocationOrganizationId)) {\r\n formData.append(\r\n 'partsLocationOrganizationId',\r\n orderStatusChangeRequestDto.partsLocationOrganizationId?.toString()\r\n );\r\n }\r\n\r\n if (!isNullOrUndefined(orderStatusChangeRequestDto.partsOrganizationId)) {\r\n formData.append(\r\n 'partsOrganizationId',\r\n orderStatusChangeRequestDto.partsOrganizationId?.toString()\r\n );\r\n }\r\n\r\n if (orderStatusChangeRequestDto.attachments.length !== 0) {\r\n formData.append(\r\n 'attachmentTypeId',\r\n orderStatusChangeRequestDto.attachments[0].attachmentTypeId.toString()\r\n );\r\n formData.append(\r\n 'attachmentTypeCode',\r\n orderStatusChangeRequestDto.attachments[0].attachmentType!.code!\r\n );\r\n }\r\n orderStatusChangeRequestDto.attachments.forEach((attach) => {\r\n formData.append('files', attach.file);\r\n });\r\n\r\n await API.PutAsync(`${this.baseController}/order/status`, formData);\r\n }\r\n\r\n public async UpdateOrderPart(orderPart: OrderPart): Promise {\r\n await API.PutAsync(`${this.baseController}/orderPart`, orderPart);\r\n }\r\n\r\n public async GetOrderPartsHistory(orderPartsFilters: OrderPartsHistoryFilters): Promise{\r\n return (\r\n await API.PostFileAsync(\r\n `${this.baseController}/order/parts-history`,\r\n orderPartsFilters\r\n )\r\n ).data;\r\n }\r\n\r\n public async UpdateOrderAmounts(request: UpdateOrderAmountsRequestDto): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/order/update-amounts`,\r\n request\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetOrderWithVehicle(orderId: number): Promise {\r\n return (await API.GetAsync(`${this.baseController}/order/include-vehicle/${orderId}`)).data;\r\n }\r\n\r\n public async GetPartToBeOrdered(id: number): Promise {\r\n return (\r\n await API.GetAsync(`${this.baseController}/partToBeOrdered/${id}`)\r\n ).data;\r\n }\r\n\r\n public async DeleteCasePartTobeOrdered(request: DeletePartToBeOrderedRequestDto): Promise {\r\n return (\r\n await API.Post2Async(\r\n `${this.baseController}/partToBeOrdered/delete`,\r\n request\r\n )\r\n ).data;\r\n }\r\n}\r\n","import { ReportParameter } from '../interfaces/Reports';\r\nimport { IReportsService } from './Interfaces/IReportsService';\r\n\r\nimport { API } from '../helpers/API';\r\n\r\nexport class ReportsService implements IReportsService {\r\n private baseController = '/case';\r\n\r\n public async GetReport(code: string, parameters: ReportParameter[]): Promise {\r\n return (\r\n await API.PostFileAsync(\r\n `${this.baseController}/report/${code}`,\r\n parameters\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetInOutReport(\r\n code: string,\r\n caseId: number, \r\n appointmentId: number,\r\n parameters: ReportParameter[]): Promise {\r\n return (\r\n await API.PostFileAsync(\r\n `${this.baseController}/${caseId}/${appointmentId}/report/${code}`,\r\n parameters\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetInvoiceReport(code: string, caseId: number, parameters: ReportParameter[]): Promise {\r\n return (\r\n await API.PostFileAsync(\r\n `${this.baseController}/${caseId}/invoice/${code}`,\r\n parameters\r\n )\r\n ).data;\r\n }\r\n\r\n public async GetRepairReport(code: string, caseId: number, parameters: ReportParameter[]): Promise {\r\n return (\r\n await API.PostFileAsync(\r\n `${this.baseController}/${caseId}/repair/${code}`,\r\n parameters\r\n )\r\n ).data;\r\n }\r\n}\r\n","import { ITranslatorService } from './Interfaces/ITranslatorService';\r\nimport * as transRO from '../helpers/TransRO.json';\r\nimport * as transEN from '../helpers/TransEN.json';\r\nimport * as transNL from '../helpers/TransNL.json';\r\nimport * as transPL from '../helpers/TransPL.json';\r\nimport { isNullOrUndefined } from 'util';\r\nimport { API } from '../helpers/API';\r\nimport { AxiosResponse } from 'axios';\r\n\r\nexport class TranslatorService implements ITranslatorService {\r\n private cookienName = '.AspNetCore.Culture';\r\n public language = '';\r\n private baseController = 'case/languages';\r\n\r\n private transRO: { [key: string]: string } = transRO.translation;\r\n private transEN: { [key: string]: string } = transEN.translation;\r\n private safetyLanguages: any = {\r\n ro: transRO.translation,\r\n en: transEN.translation,\r\n nl: transNL.translation,\r\n pl: transPL.translation\r\n };\r\n\r\n private localStorageLanguages = localStorage.getItem('languages');\r\n private languages: any =\r\n this.localStorageLanguages && JSON.parse(this.localStorageLanguages).length\r\n ? JSON.parse(this.localStorageLanguages).reduce((acc: any, language: any) => {\r\n acc[language.code] = JSON.parse(language.translations).translation;\r\n return acc;\r\n }, {})\r\n : this.safetyLanguages;\r\n private defaultLanguage = this.languages['ro'] ? 'ro' : 'en';\r\n\r\n public Tranlate(tag: string, defaulValue: string): string {\r\n if (this.language === '') {\r\n this.LoadLanguage();\r\n }\r\n\r\n let languagesCopy = this.languages;\r\n\r\n if (isNullOrUndefined(this.languages[this.language])) {\r\n languagesCopy = this.safetyLanguages;\r\n } else {\r\n languagesCopy = this.languages;\r\n }\r\n\r\n const transArray: { [key: string]: string } = languagesCopy[this.language];\r\n const value = transArray ? transArray[tag] : null;\r\n\r\n return value === null || value === undefined ? defaulValue : value;\r\n }\r\n\r\n TranslateSchema = (schema: any): any => {\r\n if (isNullOrUndefined(schema.properties)) {\r\n return schema;\r\n }\r\n\r\n for (const key of Object.keys(schema.properties)) {\r\n schema.properties[key].title = this.Tranlate(\r\n schema.properties[key].tag,\r\n schema.properties[key].title\r\n );\r\n }\r\n\r\n if (!isNullOrUndefined(schema.dependencies)) {\r\n for (const pKey of Object.keys(schema.dependencies)) {\r\n for (const pKey2 of Object.keys(schema.dependencies[pKey])) {\r\n for (const x in schema.dependencies[pKey][pKey2]) {\r\n for (const key of Object.keys(schema.dependencies[pKey][pKey2][x])) {\r\n for (const keyF of Object.keys(schema.dependencies[pKey][pKey2][x][key])) {\r\n schema.dependencies[pKey][pKey2][x][key][keyF].title = this.Tranlate(\r\n schema.dependencies[pKey][pKey2][x][key][keyF].tag,\r\n schema.dependencies[pKey][pKey2][x][key][keyF].title\r\n );\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return schema;\r\n };\r\n\r\n TranslateErrors = (errors: any): any => {\r\n return errors.map((error: any) => {\r\n if (error.name === 'minLength') {\r\n error.message = this.Tranlate('FRM_MIN_LENGTH_ERROR', error.message).replace(\r\n '{0}',\r\n error.params.limit\r\n );\r\n }\r\n if (error.name === 'maxLength') {\r\n error.message = this.Tranlate('FRM_MAX_LENGTH_ERROR', error.message).replace(\r\n '{0}',\r\n error.params.limit\r\n );\r\n }\r\n if (error.name === 'minimum') {\r\n error.message = this.Tranlate('FRM_MINIMUM_ERROR', error.message).replace(\r\n '{0}',\r\n error.params.limit\r\n );\r\n }\r\n if (error.name === 'maximum') {\r\n error.message = this.Tranlate('FRM_MAXIMUM_ERROR', error.message).replace(\r\n '{0}',\r\n error.params.limit\r\n );\r\n }\r\n if (error.name === 'required') {\r\n error.message = this.Tranlate('VALIDATORS_REQUIRED', 'Campul este obligatoriu');\r\n }\r\n return error;\r\n });\r\n };\r\n\r\n public GetLanguage(): string {\r\n return this.language;\r\n }\r\n\r\n public LoadLanguage(): void {\r\n this.language = this.defaultLanguage;\r\n const cookie = this.getCookie(this.cookienName);\r\n\r\n if (cookie !== '') {\r\n this.language = cookie.split('|')[0].split('=')[1];\r\n }\r\n\r\n localStorage.setItem('locale', this.language);\r\n }\r\n\r\n private getCookie(cname: string) {\r\n const name = cname + '=';\r\n const decodedCookie = decodeURIComponent(document.cookie);\r\n const ca = decodedCookie.split(';');\r\n let result = '';\r\n for (let i = 0; i < ca.length; i++) {\r\n let c = ca[i];\r\n while (c.charAt(0) === ' ') {\r\n c = c.substring(1);\r\n }\r\n if (c.indexOf(name) === 0) {\r\n result = c.substring(name.length, c.length);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n public SetLanguage(language: string) {\r\n this.language = language;\r\n localStorage.setItem('locale', this.language);\r\n this.setCookie(this.cookienName, language);\r\n }\r\n\r\n public setCookie(cname: string, cvalue: string) {\r\n console.log(document);\r\n const value = `c=${cvalue}|uic=${cvalue}`;\r\n document.cookie = `${cname}= ${value};path=/; domain=.${document.domain.replace(\r\n /([a-zA-Z0-9]+.)/,\r\n ''\r\n )}`;\r\n }\r\n\r\n public async GetLanguagesList(): Promise {\r\n return await API.GetAsync(`${this.baseController}/list`);\r\n }\r\n\r\n public async GetLanguages(): Promise {\r\n try {\r\n const response = await API.GetAsync(`${this.baseController}/export`);\r\n localStorage.setItem('languages', JSON.stringify(response.data));\r\n return response;\r\n } catch (error) {\r\n throw error;\r\n }\r\n }\r\n\r\n public async ImportLanguage({ code }: { code: string }): Promise {\r\n return await API.PostAsync(`${this.baseController}/import`, { code });\r\n }\r\n\r\n public async UpdateLanguage({ code }: { code: string }): Promise {\r\n return await API.PutAsync(`${this.baseController}/update`, { code });\r\n }\r\n\r\n public async DeleteLanguage({ code }: { code: string }): Promise {\r\n return await API.DeleteAsync(`${this.baseController}/delete`, { code });\r\n }\r\n}\r\n","import React, { Fragment, useContext } from 'react';\r\n\r\nimport clsx from 'clsx';\r\n\r\nimport PerfectScrollbar from 'react-perfect-scrollbar';\r\nimport { Hidden, Drawer, Paper, SwipeableDrawer } from '@material-ui/core';\r\n\r\nimport { connect } from 'react-redux';\r\n\r\nimport SidebarHeader from '../../layout-components/SidebarHeader';\r\nimport SidebarUserbox from '../../layout-components/SidebarUserbox';\r\nimport SidebarMenu from '../../layout-components/SidebarMenu';\r\n// import SidebarFooter from '../../layout-components/SidebarFooter';\r\n\r\nimport navItems from './navItems';\r\nimport { ApplicationContext } from '../../context/Contexts';\r\nimport { ThemeActionCreators } from '../../store';\r\n// import {\r\n// setSidebarToggleMobile,\r\n// setSidebarHover,\r\n// setSidebarToggle,\r\n// setSidebarFooter,\r\n// setSidebarUserbox\r\n// } from '../../reducers/ThemeOptions';\r\n\r\nconst Sidebar = (props) => {\r\n const {\r\n setSidebarToggleMobile,\r\n sidebarToggleMobile,\r\n sidebarFixed,\r\n\r\n sidebarHover,\r\n // setSidebarHover,\r\n sidebarToggle,\r\n // sidebarUserbox,\r\n sidebarShadow,\r\n // sidebarFooter,\r\n appState\r\n } = props;\r\n\r\n const context = useContext(ApplicationContext);\r\n const translatorService = context.translatorService;\r\n\r\n // const toggleHoverOn = () => setSidebarHover(true);\r\n // const toggleHoverOff = () => setSidebarHover(false);\r\n\r\n if (appState.user === null) {\r\n return '';\r\n }\r\n\r\n const closeDrawer = () => setSidebarToggleMobile(!sidebarToggleMobile);\r\n\r\n const sidebarMenuContent = (\r\n \r\n {navItems.map((list) => {\r\n return (\r\n \r\n );\r\n })}\r\n \r\n );\r\n const iOS = process.browser && /iPad|iPhone|iPod/.test(navigator.userAgent);\r\n return (\r\n \r\n \r\n {\r\n props.dispatch(ThemeActionCreators.setSidebarToggleMobile(false));\r\n }}\r\n onOpen={() => {\r\n props.dispatch(ThemeActionCreators.setSidebarToggleMobile(true));\r\n }}\r\n disableBackdropTransition={!iOS}\r\n disableDiscovery={iOS}\r\n BackdropProps={{ invisible: true }}\r\n disableSwipeToOpen={false}\r\n >\r\n \r\n \r\n {}\r\n {sidebarMenuContent}\r\n {/* {sidebarFooter && } */}\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n {appState.user !== null ? : null}\r\n {sidebarMenuContent}\r\n {/* {sidebarFooter && } */}\r\n \r\n \r\n
\r\n \r\n \r\n );\r\n};\r\n\r\nconst mapStateToProps = (state) => ({\r\n sidebarFixed: state.themeOptions.sidebarFixed,\r\n headerFixed: state.themeOptions.headerFixed,\r\n sidebarToggle: state.themeOptions.sidebarToggle,\r\n sidebarHover: state.themeOptions.sidebarHover,\r\n sidebarShadow: state.themeOptions.sidebarShadow,\r\n // sidebarFooter: state.themeOptions.sidebarFooter,\r\n // sidebarUserbox: state.themeOptions.sidebarUserbox,\r\n sidebarToggleMobile: state.themeOptions.sidebarToggleMobile,\r\n appState: state.app\r\n});\r\n\r\n// const mapDispatchToProps = dispatch => ({\r\n// setSidebarToggleMobile: enable => dispatch(setSidebarToggleMobile(enable)),\r\n// setSidebarToggle: enable => dispatch(setSidebarToggle(enable)),\r\n// setSidebarHover: enable => dispatch(setSidebarHover(enable)),\r\n// setSidebarFooter: enable => dispatch(setSidebarFooter(enable)),\r\n// setSidebarUserbox: enable => dispatch(setSidebarUserbox(enable))\r\n// });\r\n\r\nexport default connect(mapStateToProps, null)(Sidebar);\r\n"],"sourceRoot":""}