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AAC,GAAD,OAGF,SAAC,KAAD,QAGwB,SAAC,KAAD,MAG/B,C,wLErBKuY,EAAY,UADH3W,yBACG,aAcL4W,EAAwB,SAACvW,GAAD,OACnCC,IAAAA,KAAA,UAAcqW,EAAd,0BAAoDtW,EADjB,EAGxB0V,EAAmB,yCAAG,WAAOc,GAAP,uFAC3B5O,GAAS6O,EAAAA,EAAAA,GAAwB,CACrC7O,OAAQ4O,EACRE,mBAAmB,IAHY,SAMVzW,IAAAA,IAAA,UAClBqW,EADkB,mCACqB1O,IAPX,uBAMzB1H,EANyB,EAMzBA,KANyB,mBAS1BG,EAAAA,EAAAA,GAAIH,EAAMyW,EAAAA,KATgB,2CAAH,sDAYnBC,EAAwB,SAACjY,GAAD,OACnCsB,IAAAA,OAAA,UAAgBqW,EAAhB,6BAAyD,CAAE1O,OAAQ,CAAEjJ,GAAAA,IADlC,C,mGClC/BkY,EAAW,SAAChZ,GAChB,IAAQqE,EAA+BrE,EAA/BqE,MAAO5D,EAAwBT,EAAxBS,KAAS6D,GAAxB,OAAuCtE,EAAvC,GACA,OAAOuE,EAAAA,cAAoB,OAApB,QACLC,MAAO,6BACPC,MAAOhE,EACPiE,OAAQjE,EACRkE,QAAS,YACTC,KAAMP,GACHC,GACFC,EAAAA,cAAoB,OAAQ,CAC7BM,EAAG,2YAEN,EAEDmU,EAASlU,UAAY,CACnBT,MAAOU,IAAAA,OACPtE,KAAMsE,IAAAA,UAAoB,CAACA,IAAAA,OAAkBA,IAAAA,UAG/CiU,EAAShU,aAAe,CACtBX,MAAO,eACP5D,KAAM,MAGR,K","sources":["webpack://forwarder.front/./src/features/home/components/Calculator/Calculator.module.scss?de96","webpack://forwarder.front/./src/features/home/components/Calculator/HeaderMultiOrderToggle/HeaderMultiOrderToggle.module.scss?516b","features/home/components/Calculator/HeaderMultiOrderToggle/HeaderMultiOrderToggle.tsx","features/home/components/Calculator/HeaderMultiOrderToggle/index.ts","webpack://forwarder.front/./src/features/home/components/Calculator/Header/Header.module.scss?eb02","features/home/components/Calculator/Header/Header.tsx","features/home/components/Calculator/Calculator.typings.ts","features/home/components/Calculator/Header/index.ts","shared/models/calculator.models.ts","shared/services/calculator/calculator.service.ts","features/home/components/Calculator/Calculator.utils.ts","../node_modules/@iconscout/react-unicons/icons/uil-map-marker.js","webpack://forwarder.front/./src/features/home/components/Calculator/Form/Form.module.scss?bc27","features/home/components/Calculator/BackloadFromStep.tsx","../node_modules/@iconscout/react-unicons/icons/uil-calender.js","features/home/components/Calculator/BackloadStartDateStepToggle.tsx","features/home/components/Calculator/BackloadStartDateStep.tsx","features/home/components/Calculator/BackloadStepToggle.tsx","../node_modules/@iconscout/react-unicons/icons/uil-map-pin.js","features/home/components/Calculator/BackloadToStepToggle.tsx","../node_modules/@iconscout/react-unicons/icons/uil-anchor.js","features/home/components/Calculator/step-dropdown-items/BackloadTo.tsx","features/home/components/Calculator/BackloadToStep.tsx","features/home/components/Calculator/BackloadWeightStepToggle.tsx","features/home/components/Calculator/BackloadWeightStep.tsx","features/home/components/Calculator/BackloadStep/BackloadStep.typings.ts","features/home/components/Calculator/BackloadStep/BackloadStep.utils.ts","features/home/components/Calculator/BackloadStep/BackloadStep.tsx","features/home/components/Calculator/BackloadStep/index.ts","features/home/components/Calculator/EachStepToggle.tsx","features/home/components/Calculator/EachStep.tsx","features/home/components/Calculator/StartDateStepToggle.tsx","features/home/components/Calculator/StartDateStep.tsx","../node_modules/@iconscout/react-unicons/icons/uil-building.js","features/home/components/Calculator/step-dropdown-items/To.tsx","features/home/components/Calculator/ToStepContent.tsx","features/home/components/Calculator/ToStep.tsx","features/home/components/Calculator/WeightStepToggle.tsx","features/home/components/Calculator/WeightStep.tsx","features/home/components/Calculator/step-dropdown-items/ContainerType.tsx","features/home/components/Calculator/step-dropdown-items/From.tsx","features/home/components/Calculator/step-dropdown-items/MaritimeLine.tsx","features/home/components/Calculator/Form/Form.typings.ts","features/home/components/Calculator/Form/Form.utils.ts","features/home/components/Calculator/Form/Form.tsx","features/home/components/Calculator/Form/index.ts","webpack://forwarder.front/./src/features/home/components/Calculator/MultiOrderAddButton/MultiOrderAddButton.module.scss?709c","features/home/components/Calculator/MultiOrderAddButton/MultiOrderAddButton.tsx","features/home/components/Calculator/MultiOrderAddButton/index.ts","webpack://forwarder.front/./src/features/home/components/Calculator/Preview/Disclaimer/Disclaimer.module.scss?5a14","features/home/components/Calculator/Preview/Disclaimer/Disclaimer.tsx","features/home/components/Calculator/Preview/Disclaimer/index.ts","webpack://forwarder.front/./src/features/home/components/Calculator/Preview/Preview.module.scss?0d79","webpack://forwarder.front/./src/features/home/components/Calculator/Preview/UnAuthorized/UnAuthorized.module.scss?fd73","features/home/components/Calculator/Preview/UnAuthorized/UnAuthorized.tsx","features/home/components/Calculator/Preview/UnAuthorized/index.ts","webpack://forwarder.front/./src/features/home/components/Calculator/Preview/EachDetail/EachDetail.module.scss?4c8e","features/home/components/Calculator/Preview/EachDetail/EachDetail.tsx","features/home/components/Calculator/Preview/EachDetail/index.ts","webpack://forwarder.front/./src/features/home/components/Calculator/Preview/MultiPreview/Details/Details.module.scss?a227","features/home/components/Calculator/Preview/MultiPreview/Details/Toggle.tsx","features/home/components/Calculator/Preview/MultiPreview/Details/Details.tsx","features/home/components/Calculator/Preview/MultiPreview/Details/index.ts","webpack://forwarder.front/./src/features/home/components/Calculator/Preview/MultiPreview/MultiPreview.module.scss?be6a","features/home/components/Calculator/Preview/MultiPreview/MultiPreview.tsx","features/home/components/Calculator/MultiWrapper/MultiWrapper.typings.ts","features/home/components/Calculator/Preview/MultiPreview/index.ts","webpack://forwarder.front/./src/features/home/components/Calculator/MultiWrapper/MultiWrapper.module.scss?b257","features/home/components/Calculator/MultiWrapper/MultiWrapper.reducer.ts","features/home/components/Calculator/MultiWrapper/MultiWrapper.tsx","features/home/components/Calculator/MultiWrapper/index.ts","webpack://forwarder.front/./src/features/home/components/Calculator/Preview/SinglePreview/BackloadEachDetail/BackloadEachDetail.module.scss?8a77","features/home/components/Calculator/Preview/SinglePreview/BackloadEachDetail/BackloadEachDetail.tsx","features/home/components/Calculator/Preview/SinglePreview/BackloadEachDetail/index.ts","features/home/components/Calculator/Preview/SinglePreview/Details.tsx","webpack://forwarder.front/./src/features/home/components/Calculator/Preview/SinglePreview/PriceHandler/PriceHandler.module.scss?f63e","features/home/components/Calculator/Preview/SinglePreview/PriceHandler/PriceHandler.tsx","features/home/components/Calculator/Preview/SinglePreview/SinglePreview.utils.ts","features/home/components/Calculator/Preview/SinglePreview/PriceHandler/index.ts","features/home/components/Calculator/Preview/SinglePreview/SinglePreview.tsx","features/home/components/Calculator/Preview/SinglePreview/index.ts","webpack://forwarder.front/./src/features/home/components/Calculator/SingnleWrapper/SingnleWrapper.module.scss?60e4","features/home/components/Calculator/SingnleWrapper/SingnleWrapper.tsx","features/home/components/Calculator/SingnleWrapper/index.ts","features/home/components/Calculator/Calculator.tsx","features/home/components/Calculator/index.ts","webpack://forwarder.front/./src/features/home/components/CarouselDots/CarouselDots.module.scss?3ac7","features/home/components/CarouselDots/Each.tsx","features/home/components/CarouselDots/CarouselDots.tsx","features/home/components/CarouselDots/index.ts","webpack://forwarder.front/./src/features/home/components/CarouselHeadings/CarouselHeadings.module.scss?fefe","features/home/components/CarouselHeadings/CarouselHeadings.tsx","features/home/components/CarouselHeadings/index.ts","webpack://forwarder.front/./src/features/home/components/DiscountedRoutes/DiscountedRoutes.module.scss?14bb","webpack://forwarder.front/./src/features/home/components/DiscountedRoutes/List/List.module.scss?7900","features/home/components/DiscountedRoutes/List/List.tsx","features/home/components/DiscountedRoutes/List/index.ts","features/home/components/DiscountedRoutes/Modal.tsx","features/home/components/DiscountedRoutes/DiscountedRoutes.tsx","features/home/components/DiscountedRoutes/index.ts","webpack://forwarder.front/./src/features/home/pages/Home.module.scss?8b4d","features/home/pages/Home.tsx","features/home/home.routing.tsx","webpack://forwarder.front/./src/core/layouts/HomeLayout/HomeLayout.module.scss?8a98","core/layouts/HomeLayout/HomeLayout.tsx","core/layouts/HomeLayout/index.ts","shared/services/backloads/backloads.service.ts","../node_modules/@iconscout/react-unicons/icons/uil-truck.js"],"sourcesContent":["// extracted by mini-css-extract-plugin\nexport default {\"calculator\":\"Calculator_calculator__M7-Om\"};","// extracted by mini-css-extract-plugin\nexport default {\"tooltip\":\"HeaderMultiOrderToggle_tooltip__qRE+j\",\"info\":\"HeaderMultiOrderToggle_info__cuK9j\"};","import { UilInfoCircle } from '@iconscout/react-unicons';\r\nimport { OverlayTrigger, Tooltip } from 'react-bootstrap';\r\nimport { useTranslation } from 'react-i18next';\r\nimport { Switch } from 'shared/components';\r\nimport styles from './HeaderMultiOrderToggle.module.scss';\r\n\r\nfunction HeaderMultiOrderToggle({\r\n onChange,\r\n}: {\r\n onChange: (status: boolean) => void;\r\n}) {\r\n const { t } = useTranslation();\r\n\r\n return (\r\n <>\r\n {t('MultiOrder')}\r\n\r\n (\r\n \r\n {t('MultiOrderWarning')}\r\n \r\n )}\r\n popperConfig={{\r\n modifiers: [{ name: 'offset', options: { offset: [0, 5] } }],\r\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 HeaderMultiOrderToggle;\r\n","import HeaderMultiOrderToggle from './HeaderMultiOrderToggle';\r\n\r\nexport default HeaderMultiOrderToggle;\r\n","// extracted by mini-css-extract-plugin\nexport default {\"wrapper\":\"Header_wrapper__wXZey\",\"tab\":\"Header_tab__vxY0g\",\"active\":\"Header_active__1902k\",\"switch-wrapper\":\"Header_switch-wrapper__wfy61\",\"top\":\"Header_top__P4aYD\",\"bottom\":\"Header_bottom__xZB0u\"};","import { UilTruck } from '@iconscout/react-unicons';\r\nimport { useTranslation } from 'react-i18next';\r\nimport Toggle from '../HeaderMultiOrderToggle';\r\nimport styles from './Header.module.scss';\r\n\r\ninterface IProps {\r\n setIsMulti: (status: boolean) => void;\r\n}\r\n\r\nfunction Header({ setIsMulti }: IProps) {\r\n const { t } = useTranslation();\r\n\r\n return (\r\n
\r\n
\r\n
\r\n \r\n {t('Inland')}\r\n
\r\n\r\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 Header;\r\n","import { IDropdownItem } from 'shared/shared.typings';\r\n\r\nimport {\r\n IPort,\r\n IPortAndCity,\r\n IWeightRange,\r\n} from 'shared/services/dropdowns/dropdowns.typings';\r\n\r\nexport enum CalculatorStep {\r\n From = 'from',\r\n To = 'to',\r\n ContainerType = 'containerType',\r\n StartDate = 'startDate',\r\n Weight = 'weight',\r\n MaritimeLine = 'maritimeLine',\r\n Backload = 'backload',\r\n}\r\n\r\nexport type FormState = Partial<{\r\n from: IPortAndCity;\r\n to: IPortAndCity;\r\n containerType: IDropdownItem;\r\n startDate: Date;\r\n weight: IWeightRange;\r\n maritimeLine: IDropdownItem;\r\n backloadTo: IPort;\r\n backloadStartDate: Date;\r\n backloadWeight: IWeightRange;\r\n}>;\r\n","import Header from './Header';\r\n\r\nexport default Header;\r\n","import { Builder, InferSchemaType } from 'shared/utils/object-mapper';\r\n\r\nexport const calculationResponseShema = Builder.object({\r\n id: Builder.number(),\r\n isRoundTrip: Builder.boolean(),\r\n isParent: Builder.boolean(),\r\n code: Builder.string(),\r\n containerSizeType: Builder.string(),\r\n discountPercent: Builder.number(),\r\n from: Builder.string(),\r\n to: Builder.string(),\r\n maritimeLineTypeName: Builder.string(),\r\n maritimeLineTypeId: Builder.number(),\r\n orderEndDate: Builder.string(),\r\n orderStartDate: Builder.string(),\r\n price: Builder.number(),\r\n weightFrom: Builder.number(),\r\n weightTo: Builder.number(),\r\n});\r\n\r\nexport type CalculationResponse = InferSchemaType<\r\n typeof calculationResponseShema\r\n>;\r\n","import axios from 'axios';\nimport { calculationResponseShema } from 'shared/models/calculator.models';\nimport { Map } from 'shared/utils/object-mapper';\nimport {\n IBackloadInlandOrderModel,\n ICalculatorInlandOrderModel,\n ICalculatorMultiInlandOrderModel,\n IInlandAuctionModel,\n IInlandOrderCalculationResponse,\n} from './calculator.typings';\n\nconst apiURL = process.env.REACT_APP_API_URL;\nconst calculatorURL = `${apiURL}/Calculator`;\nconst inlandOrderUrl = `${apiURL}/InlandOrders`;\nconst auctionsURL = `${apiURL}/Auctions`;\n\nexport const calculateInlandOrder = async (\n model: Partial\n) => {\n const { data } = await axios.post(\n `${calculatorURL}/CalculateForwardInland`,\n model\n );\n\n return data.map((item) =>\n Map(item, calculationResponseShema, (m) => ({\n ...m,\n backloadType: item.backloadTypeEnum,\n containerSizeType: item.containerSizeTypesName,\n from: item.fromName,\n to: item.toName,\n maritimeLineType: item.maritimeLineTypeName,\n }))\n );\n};\n\nexport const calculateMultiInlandOrders = async (\n model: ICalculatorMultiInlandOrderModel[]\n) => {\n const { data } = await axios.post(\n `${calculatorURL}/CalculateMultiForwardInland`,\n model\n );\n\n return data.map((item) =>\n Map(item, calculationResponseShema, (m) => ({\n ...m,\n backloadType: item.backloadTypeEnum,\n containerSizeType: item.containerSizeTypesName,\n from: item.fromName,\n to: item.toName,\n }))\n );\n};\n\nexport const addAuction = (model: IInlandAuctionModel) =>\n axios.post(auctionsURL, model);\n\nexport const createBackloadOrder = (model: IBackloadInlandOrderModel) =>\n axios.post(`${inlandOrderUrl}/CreateBackloadOrder`, model);\n","import {\r\n ICalculatorInlandOrderModel,\r\n ICalculatorMultiInlandOrderModel,\r\n} from 'shared/services/calculator/calculator.typings';\r\nimport { formatDateToISO } from 'shared/utils/date.utils';\r\nimport { CalculatorStep, FormState } from './Calculator.typings';\r\n\r\nexport const mandatoryFields = [\r\n CalculatorStep.From,\r\n CalculatorStep.To,\r\n CalculatorStep.ContainerType,\r\n CalculatorStep.StartDate,\r\n CalculatorStep.Weight,\r\n];\r\n\r\nconst formatBaseModel = (data: FormState) => {\r\n const { weightFrom, weightTo } = data.weight;\r\n\r\n const model: Partial<\r\n ICalculatorInlandOrderModel | ICalculatorMultiInlandOrderModel\r\n > = {\r\n weightFrom,\r\n weightTo,\r\n containerSizeTypeid: data.containerType.id,\r\n orderStartDate: formatDateToISO(data.startDate),\r\n isParent: null,\r\n };\r\n\r\n if (data.from.isPort) {\r\n model.fromPortId = data.from.id;\r\n model.toCityId = data.to.id;\r\n } else {\r\n model.fromCityId = data.from.id;\r\n model.toPortId = data.to.id;\r\n }\r\n\r\n if (data.maritimeLine) {\r\n model.maritimeLineTypeId = data.maritimeLine.id;\r\n }\r\n\r\n return model;\r\n};\r\n\r\nexport const formatSingleModel = (data: FormState) => {\r\n const model: Partial = formatBaseModel(data);\r\n\r\n const hasBackloadSelected = !!(\r\n data.backloadTo &&\r\n data.backloadStartDate &&\r\n data.backloadWeight\r\n );\r\n\r\n if (hasBackloadSelected) {\r\n model.isBackload = true;\r\n model.backLoadStartDate = formatDateToISO(data.backloadStartDate);\r\n model.backLoadWeightFrom = data.backloadWeight.weightFrom;\r\n model.backLoadWeightTo = data.backloadWeight.weightTo;\r\n model.backLoadToPortId = data.backloadTo.id;\r\n\r\n if (data.from.isPort) {\r\n model.backloadFromCityId = data.to.id;\r\n } else {\r\n model.backLoadFromPortId = data.to.id;\r\n }\r\n }\r\n\r\n return model;\r\n};\r\n\r\nexport const formatMultiModel = (data: FormState) => {\r\n const model: Partial =\r\n formatBaseModel(data);\r\n\r\n return model;\r\n};\r\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst UilMapMarker = (props) => {\n const { color, size, ...otherProps } = props\n return React.createElement('svg', {\n xmlns: 'http://www.w3.org/2000/svg',\n width: size,\n height: size,\n viewBox: '0 0 24 24',\n fill: color,\n ...otherProps\n }, React.createElement('path', {\n d: 'M12,2a8,8,0,0,0-8,8c0,5.4,7.05,11.5,7.35,11.76a1,1,0,0,0,1.3,0C13,21.5,20,15.4,20,10A8,8,0,0,0,12,2Zm0,17.65c-2.13-2-6-6.31-6-9.65a6,6,0,0,1,12,0C18,13.34,14.13,17.66,12,19.65ZM12,6a4,4,0,1,0,4,4A4,4,0,0,0,12,6Zm0,6a2,2,0,1,1,2-2A2,2,0,0,1,12,12Z'\n }));\n};\n\nUilMapMarker.propTypes = {\n color: PropTypes.string,\n size: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n};\n\nUilMapMarker.defaultProps = {\n color: 'currentColor',\n size: '24',\n};\n\nexport default UilMapMarker;","// extracted by mini-css-extract-plugin\nexport default {\"each\":\"Form_each__guB3f\",\"icon\":\"Form_icon__A402G\",\"active\":\"Form_active__BexAl\",\"filled\":\"Form_filled__R1fSW\",\"step-clear\":\"Form_step-clear__7qfFy\",\"disabled\":\"Form_disabled__wj9oc\",\"from-toggle\":\"Form_from-toggle__TbTbD\",\"dropdown-menu\":\"Form_dropdown-menu__a5gaL\",\"loader\":\"Form_loader__MFONa\",\"dropdown-item\":\"Form_dropdown-item__ESuDR\",\"datepicker-menu\":\"Form_datepicker-menu__9VRZH\",\"datepicker-divider\":\"Form_datepicker-divider__uHjf0\",\"backload-dropdown-menu\":\"Form_backload-dropdown-menu__+zXX1\",\"each-wrapper\":\"Form_each-wrapper__W1g2Y\",\"backload-grid\":\"Form_backload-grid__+wei2\",\"backload-each\":\"Form_backload-each__7yceB\",\"backload-from\":\"Form_backload-from__1q7Zm\",\"event-blocker\":\"Form_event-blocker__o9I9p\",\"rounded-left\":\"Form_rounded-left__y+tB5\",\"rounded-right\":\"Form_rounded-right__Cm+LF\",\"to-toggle\":\"Form_to-toggle__jcdmE\",\"container-toggle\":\"Form_container-toggle__m-eyt\",\"date-toggle\":\"Form_date-toggle__w9UD4\",\"maritime-line-toggle\":\"Form_maritime-line-toggle__KrdPv\",\"weight\":\"Form_weight__z0v-j\",\"backload-toggle\":\"Form_backload-toggle__Adt1U\"};","import { UilMapMarker } from '@iconscout/react-unicons';\r\nimport { IPortAndCity } from 'shared/services/dropdowns/dropdowns.typings';\r\nimport styles from './Form/Form.module.scss';\r\n\r\ninterface IProps {\r\n item: IPortAndCity;\r\n}\r\n\r\nfunction BackloadFromStep({ item }: IProps) {\r\n return (\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n );\r\n}\r\n\r\nexport default BackloadFromStep;\r\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst UilCalender = (props) => {\n const { color, size, ...otherProps } = props\n return React.createElement('svg', {\n xmlns: 'http://www.w3.org/2000/svg',\n width: size,\n height: size,\n viewBox: '0 0 24 24',\n fill: color,\n ...otherProps\n }, React.createElement('path', {\n d: 'M19,4H17V3a1,1,0,0,0-2,0V4H9V3A1,1,0,0,0,7,3V4H5A3,3,0,0,0,2,7V19a3,3,0,0,0,3,3H19a3,3,0,0,0,3-3V7A3,3,0,0,0,19,4Zm1,15a1,1,0,0,1-1,1H5a1,1,0,0,1-1-1V12H20Zm0-9H4V7A1,1,0,0,1,5,6H7V7A1,1,0,0,0,9,7V6h6V7a1,1,0,0,0,2,0V6h2a1,1,0,0,1,1,1Z'\n }));\n};\n\nUilCalender.propTypes = {\n color: PropTypes.string,\n size: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n};\n\nUilCalender.defaultProps = {\n color: 'currentColor',\n size: '24',\n};\n\nexport default UilCalender;","import { UilCalender, UilTimes } from '@iconscout/react-unicons';\r\nimport { TFunction } from 'i18next';\r\nimport React from 'react';\r\nimport { formatDateToOutput } from 'shared/utils/date.utils';\r\nimport styles from './Form/Form.module.scss';\r\n\r\ninterface IProps {\r\n t: TFunction;\r\n active: boolean;\r\n selectedValue: Date;\r\n activate: () => void;\r\n clear: () => void;\r\n}\r\n\r\nconst Toggle = React.forwardRef(\r\n (\r\n { t, active, selectedValue, activate, clear }: IProps,\r\n ref: React.ForwardedRef\r\n ) => (\r\n activate()}\r\n >\r\n
\r\n \r\n
\r\n \r\n clear()}\r\n >\r\n \r\n \r\n \r\n )\r\n);\r\n\r\nexport default Toggle;\r\n","import config from 'config';\r\nimport { useCallback, useEffect, useRef, useState } from 'react';\r\nimport { Dropdown } from 'react-bootstrap';\r\nimport DatePicker from 'react-datepicker';\r\nimport { useTranslation } from 'react-i18next';\r\nimport useOnClickOutside from 'shared/hooks/on-click-outside.hook';\r\nimport Toggle from './BackloadStartDateStepToggle';\r\nimport styles from './Form/Form.module.scss';\r\n\r\ninterface IProps {\r\n value: Date;\r\n active: boolean;\r\n orderStartDate: Date;\r\n onChange: (date: Date) => void;\r\n activate: () => void;\r\n onClose: () => void;\r\n}\r\n\r\nfunction BackloadStartDateStep({\r\n value,\r\n active,\r\n orderStartDate,\r\n onChange,\r\n activate,\r\n onClose,\r\n}: IProps) {\r\n const { t } = useTranslation();\r\n\r\n const node = useRef();\r\n const [visible, setVisible] = useState(false);\r\n\r\n const [startDate, setStartDate] = useState();\r\n const [minDate, setMinDate] = useState();\r\n\r\n useEffect(() => {\r\n if (active) {\r\n setVisible(true);\r\n }\r\n }, [active]);\r\n\r\n useEffect(() => {\r\n const d = new Date(orderStartDate);\r\n d.setDate(orderStartDate.getDate() + config.roundTripMinDifferenceInDay);\r\n setMinDate(d);\r\n setStartDate(d);\r\n }, [orderStartDate]);\r\n\r\n const handleClose = useCallback(() => {\r\n if (visible) {\r\n setVisible(false);\r\n onClose();\r\n }\r\n }, [visible, onClose]);\r\n\r\n useOnClickOutside(node, handleClose);\r\n\r\n return (\r\n \r\n onChange(null)}\r\n />\r\n\r\n \r\n {\r\n if (!(item instanceof Array)) {\r\n setStartDate(item);\r\n }\r\n }}\r\n minDate={minDate}\r\n calendarStartDay={1}\r\n fixedHeight\r\n inline\r\n />\r\n\r\n
\r\n\r\n
\r\n {\r\n setVisible(false);\r\n onClose();\r\n }}\r\n >\r\n {t('Close')}\r\n \r\n {\r\n onChange(startDate);\r\n setVisible(false);\r\n }}\r\n >\r\n {t('Choose')}\r\n \r\n
\r\n \r\n \r\n );\r\n}\r\n\r\nexport default BackloadStartDateStep;\r\n","import { UilTimes } from '@iconscout/react-unicons';\r\nimport config from 'config';\r\nimport React, { useRef } from 'react';\r\nimport { useTranslation } from 'react-i18next';\r\nimport useMediaQuery from 'shared/hooks/media-query.hook';\r\nimport styles from './Form/Form.module.scss';\r\n\r\ninterface IProps {\r\n active: boolean;\r\n selected: string;\r\n activate: () => void;\r\n clear: () => void;\r\n}\r\n\r\nconst BackloadStepToggle = React.forwardRef(\r\n (\r\n { active, selected, activate, clear }: IProps,\r\n ref: React.ForwardedRef\r\n ) => {\r\n const { t } = useTranslation();\r\n const matchesLG = useMediaQuery({\r\n breakPoint: config.breakpoints.lg,\r\n });\r\n const close = useRef();\r\n\r\n return (\r\n {\r\n if (!close?.current?.contains(e.target as Element)) {\r\n activate();\r\n }\r\n }}\r\n >\r\n
\r\n \r\n {selected && (\r\n clear()}\r\n >\r\n \r\n
\r\n )}\r\n
\r\n );\r\n }\r\n);\r\n\r\nexport default BackloadStepToggle;\r\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst UilMapPin = (props) => {\n const { color, size, ...otherProps } = props\n return React.createElement('svg', {\n xmlns: 'http://www.w3.org/2000/svg',\n width: size,\n height: size,\n viewBox: '0 0 24 24',\n fill: color,\n ...otherProps\n }, React.createElement('path', {\n d: 'M16.37,12.79a1,1,0,0,0-.74,1.86C17.09,15.23,18,16.13,18,17c0,1.42-2.46,3-6,3s-6-1.58-6-3c0-.87.91-1.77,2.37-2.35a1,1,0,0,0-.74-1.86C5.36,13.69,4,15.26,4,17c0,2.8,3.51,5,8,5s8-2.2,8-5C20,15.26,18.64,13.69,16.37,12.79ZM11,9.86V17a1,1,0,0,0,2,0V9.86a4,4,0,1,0-2,0ZM12,4a2,2,0,1,1-2,2A2,2,0,0,1,12,4Z'\n }));\n};\n\nUilMapPin.propTypes = {\n color: PropTypes.string,\n size: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n};\n\nUilMapPin.defaultProps = {\n color: 'currentColor',\n size: '24',\n};\n\nexport default UilMapPin;","import { UilMapPin, UilTimes } from '@iconscout/react-unicons';\r\nimport { TFunction } from 'i18next';\r\nimport React from 'react';\r\nimport { IPort } from 'shared/services/dropdowns/dropdowns.typings';\r\nimport styles from './Form/Form.module.scss';\r\n\r\ninterface IProps {\r\n t: TFunction;\r\n active: boolean;\r\n inputRef: React.MutableRefObject;\r\n searchTerm: string;\r\n selectedValue: IPort;\r\n setSearchTerm: (term: string) => void;\r\n activate: () => void;\r\n clear: () => void;\r\n}\r\n\r\nconst BackloadToStepToggle = React.forwardRef(\r\n (\r\n {\r\n t,\r\n active,\r\n inputRef,\r\n searchTerm,\r\n selectedValue,\r\n activate,\r\n setSearchTerm,\r\n clear,\r\n }: IProps,\r\n ref: React.ForwardedRef\r\n ) => (\r\n activate()}\r\n >\r\n
\r\n \r\n
\r\n setSearchTerm(e.target.value)}\r\n />\r\n clear()}\r\n >\r\n \r\n \r\n \r\n )\r\n);\r\n\r\nexport default BackloadToStepToggle;\r\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst UilAnchor = (props) => {\n const { color, size, ...otherProps } = props\n return React.createElement('svg', {\n xmlns: 'http://www.w3.org/2000/svg',\n width: size,\n height: size,\n viewBox: '0 0 24 24',\n fill: color,\n ...otherProps\n }, React.createElement('path', {\n d: 'M19,13H17a1,1,0,0,0,0,2h.91A6,6,0,0,1,13,19.91V11h1a1,1,0,0,0,0-2H13V7.82a3,3,0,1,0-2,0V9H10a1,1,0,0,0,0,2h1v8.91A6,6,0,0,1,6.09,15H7a1,1,0,0,0,0-2H5a1,1,0,0,0-1,1,8,8,0,0,0,16,0A1,1,0,0,0,19,13ZM12,6a1,1,0,1,1,1-1A1,1,0,0,1,12,6Z'\n }));\n};\n\nUilAnchor.propTypes = {\n color: PropTypes.string,\n size: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n};\n\nUilAnchor.defaultProps = {\n color: 'currentColor',\n size: '24',\n};\n\nexport default UilAnchor;","import { UilAnchor } from '@iconscout/react-unicons';\r\nimport { HTMLAttributes } from 'react';\r\nimport { IDropdownItem } from 'shared/shared.typings';\r\nimport styles from '../Form/Form.module.scss';\r\n\r\nexport interface IProps extends HTMLAttributes {\r\n item: IDropdownItem;\r\n}\r\n\r\nfunction BackloadToItem({ item, ...reset }: IProps) {\r\n return (\r\n \r\n
\r\n \r\n
\r\n\r\n {item.name}\r\n \r\n );\r\n}\r\n\r\nexport default BackloadToItem;\r\n","import { useCallback, useEffect, useRef, useState } from 'react';\r\nimport { Dropdown } from 'react-bootstrap';\r\nimport { useTranslation } from 'react-i18next';\r\nimport { useSelector } from 'react-redux';\r\nimport useCancelablePromise from 'shared/hooks/cancelable-promise.hook';\r\nimport useDebounced from 'shared/hooks/debounce.hook';\r\nimport useOnClickOutside from 'shared/hooks/on-click-outside.hook';\r\nimport { getPorts } from 'shared/services/dropdowns/dropdowns.service';\r\nimport { IPort } from 'shared/services/dropdowns/dropdowns.typings';\r\nimport { appSelector } from 'shared/store/app';\r\nimport BackloadToStepToggle from './BackloadToStepToggle';\r\nimport styles from './Form/Form.module.scss';\r\nimport BackloadToItem from './step-dropdown-items/BackloadTo';\r\n\r\ninterface IProps {\r\n value: IPort;\r\n active: boolean;\r\n onChange: (item: IPort) => void;\r\n activate: () => void;\r\n onClose: () => void;\r\n}\r\n\r\nfunction BackloadToStep({\r\n value,\r\n active,\r\n onChange,\r\n activate,\r\n onClose,\r\n}: IProps) {\r\n const { t } = useTranslation();\r\n const { cancellablePromise } = useCancelablePromise();\r\n const { language } = useSelector(appSelector);\r\n\r\n const node = useRef();\r\n const inputRef = useRef();\r\n const [data, setData] = useState([]);\r\n\r\n const [searchTerm, setSearchTerm] = useState('');\r\n const debouncedSearchTerm = useDebounced(searchTerm, 500);\r\n\r\n const [visible, setVisible] = useState(false);\r\n const [loading, setLoading] = useState(false);\r\n\r\n useEffect(() => {\r\n if (active) {\r\n setVisible(true);\r\n inputRef.current.focus();\r\n }\r\n }, [active]);\r\n\r\n useEffect(() => {\r\n setLoading(true);\r\n cancellablePromise(getPorts({ search: debouncedSearchTerm }))\r\n .then((res) => setData(res))\r\n .finally(() => setLoading(false));\r\n }, [debouncedSearchTerm, language, cancellablePromise]);\r\n\r\n const handleClose = useCallback(() => {\r\n if (visible) {\r\n setVisible(false);\r\n onClose();\r\n setSearchTerm('');\r\n }\r\n }, [visible, onClose]);\r\n\r\n useOnClickOutside(node, handleClose);\r\n\r\n const onSelect = (item: IPort) => {\r\n onChange(item);\r\n setVisible(false);\r\n setSearchTerm('');\r\n };\r\n\r\n const clear = () => onChange(null);\r\n\r\n return (\r\n \r\n \r\n \r\n
\r\n {!data.length && (\r\n
{t('DataNotFound')}
\r\n )}\r\n\r\n {data.map((item, i) => (\r\n onSelect(item)}\r\n />\r\n ))}\r\n {loading &&
}\r\n
\r\n \r\n \r\n );\r\n}\r\n\r\nexport default BackloadToStep;\r\n","import { UilTimes } from '@iconscout/react-unicons';\r\nimport { TFunction } from 'i18next';\r\nimport React from 'react';\r\nimport { IWeightRange } from 'shared/services/dropdowns/dropdowns.typings';\r\nimport styles from './Form/Form.module.scss';\r\n\r\ninterface IProps {\r\n t: TFunction;\r\n active: boolean;\r\n selected: IWeightRange;\r\n inputRef: React.MutableRefObject;\r\n activate: () => void;\r\n clear: () => void;\r\n}\r\n\r\nconst BackloadWeightStepToggle = React.forwardRef(\r\n (\r\n { t, active, selected, inputRef, activate, clear }: IProps,\r\n ref: React.ForwardedRef\r\n ) => (\r\n activate()}\r\n >\r\n \r\n clear()}\r\n >\r\n \r\n
\r\n \r\n )\r\n);\r\n\r\nexport default BackloadWeightStepToggle;\r\n","import { useCallback, useEffect, useRef, useState } from 'react';\r\nimport { Dropdown } from 'react-bootstrap';\r\nimport { useTranslation } from 'react-i18next';\r\nimport { useSelector } from 'react-redux';\r\nimport useCancelablePromise from 'shared/hooks/cancelable-promise.hook';\r\nimport useOnClickOutside from 'shared/hooks/on-click-outside.hook';\r\nimport { getWeightRanges } from 'shared/services/dropdowns/dropdowns.service';\r\nimport {\r\n IPort,\r\n IPortAndCity,\r\n IWeightRange,\r\n} from 'shared/services/dropdowns/dropdowns.typings';\r\nimport { IDropdownItem } from 'shared/shared.typings';\r\nimport { appSelector } from 'shared/store/app';\r\nimport Toggle from './BackloadWeightStepToggle';\r\nimport styles from './Form/Form.module.scss';\r\n\r\ninterface IProps {\r\n from: IPortAndCity;\r\n to: IPort;\r\n containerType: IDropdownItem;\r\n selected: IWeightRange;\r\n active: boolean;\r\n onChange: (weights: IWeightRange) => void;\r\n activate: () => void;\r\n deactivate: () => void;\r\n}\r\n\r\nfunction BackloadWeightStep({\r\n from,\r\n to,\r\n containerType,\r\n selected,\r\n active,\r\n onChange,\r\n activate,\r\n deactivate,\r\n}: IProps) {\r\n const { t } = useTranslation();\r\n const { cancellablePromise } = useCancelablePromise();\r\n\r\n const node = useRef();\r\n const inputRef = useRef();\r\n const { language } = useSelector(appSelector);\r\n const [data, setData] = useState([]);\r\n\r\n const [visible, setVisible] = useState(false);\r\n const [loading, setLoading] = useState(false);\r\n\r\n useEffect(() => {\r\n if (active) {\r\n setVisible(true);\r\n inputRef.current.focus();\r\n }\r\n }, [active]);\r\n\r\n useEffect(() => {\r\n if (!from || !to || !containerType) {\r\n setData([]);\r\n }\r\n }, [from, to, containerType]);\r\n\r\n useEffect(() => {\r\n if (from && to && containerType) {\r\n const params = {\r\n fromCityId: from.id,\r\n toPortId: to.id,\r\n containerTypeId: containerType.id,\r\n };\r\n\r\n setLoading(true);\r\n cancellablePromise(getWeightRanges(params))\r\n .then((res) => {\r\n setData(res.data);\r\n })\r\n .finally(() => setLoading(false));\r\n }\r\n }, [from, to, containerType, language, cancellablePromise]);\r\n\r\n const handleClose = useCallback(() => {\r\n if (visible) {\r\n setVisible(false);\r\n deactivate();\r\n }\r\n }, [visible, deactivate]);\r\n\r\n useOnClickOutside(node, handleClose);\r\n\r\n const onSelect = (item: IWeightRange) => {\r\n onChange(item);\r\n setVisible(false);\r\n };\r\n\r\n const clear = () => {\r\n inputRef.current.focus();\r\n onChange(null);\r\n };\r\n\r\n const getDataMistakeMessage = (\r\n fromData: IPortAndCity,\r\n toData: IPort,\r\n containerTypeData: IDropdownItem\r\n ) => {\r\n if (!fromData || !toData) {\r\n return 'SelectCorrectRoutes';\r\n }\r\n\r\n if (!containerTypeData) {\r\n return 'SelectCorrectContainerType';\r\n }\r\n\r\n return 'DataNotFound';\r\n };\r\n\r\n return (\r\n \r\n \r\n\r\n \r\n
\r\n {data?.map((item, i) => (\r\n onSelect(item)}\r\n >\r\n {`${item.weightFrom} - ${item.weightTo} T`}\r\n
\r\n ))}\r\n {(!from || !to || !containerType || !data.length) && (\r\n
\r\n {t(getDataMistakeMessage(from, to, containerType))}\r\n
\r\n )}\r\n {loading &&
}\r\n
\r\n \r\n
\r\n );\r\n}\r\n\r\nexport default BackloadWeightStep;\r\n","import {\r\n IPort,\r\n IWeightRange,\r\n} from 'shared/services/dropdowns/dropdowns.typings';\r\n\r\nexport interface IState {\r\n to: IPort;\r\n startDate: Date;\r\n weight: IWeightRange;\r\n}\r\n\r\nexport enum ActionType {\r\n To = 'to',\r\n StartDate = 'startDate',\r\n Weight = 'weight',\r\n Clear = 'Clear',\r\n}\r\n\r\nexport enum FormStep {\r\n To = 'to',\r\n StartDate = 'startDate',\r\n Weight = 'weight',\r\n}\r\n\r\nexport interface Action {\r\n type: ActionType;\r\n payload: Partial;\r\n}\r\n","import { Action, ActionType, IState } from './BackloadStep.typings';\r\n\r\nexport const backloadInitialState: IState = {\r\n to: null,\r\n startDate: null,\r\n weight: null,\r\n};\r\n\r\nexport const backloadStepReducer = (state: IState, action: Action) => {\r\n const { to, startDate, weight } = action.payload;\r\n\r\n switch (action.type) {\r\n case ActionType.To:\r\n return { ...state, to, weight: null } as IState;\r\n case ActionType.StartDate:\r\n return { ...state, startDate };\r\n case ActionType.Weight:\r\n return { ...state, weight };\r\n case ActionType.Clear:\r\n return {\r\n to: null,\r\n startDate: null,\r\n weight: null,\r\n };\r\n default:\r\n return state;\r\n }\r\n};\r\n","import config from 'config';\r\nimport { useEffect, useReducer, useRef, useState } from 'react';\r\nimport { Dropdown } from 'react-bootstrap';\r\nimport useMediaQuery from 'shared/hooks/media-query.hook';\r\nimport {\r\n IPort,\r\n IPortAndCity,\r\n IWeightRange,\r\n} from 'shared/services/dropdowns/dropdowns.typings';\r\nimport { IDropdownItem } from 'shared/shared.typings';\r\nimport { formatDateToOutput } from 'shared/utils/date.utils';\r\nimport BackloadFromStep from '../BackloadFromStep';\r\nimport BackloadStartDateStep from '../BackloadStartDateStep';\r\nimport BackloadStepToggle from '../BackloadStepToggle';\r\nimport BackloadToStep from '../BackloadToStep';\r\nimport BackloadWeightStep from '../BackloadWeightStep';\r\nimport styles from '../Form/Form.module.scss';\r\nimport { ActionType, FormStep, IState } from './BackloadStep.typings';\r\nimport {\r\n backloadInitialState,\r\n backloadStepReducer,\r\n} from './BackloadStep.utils';\r\n\r\ninterface IProps {\r\n from: IPortAndCity;\r\n containerType: IDropdownItem;\r\n active: boolean;\r\n orderStartDate: Date;\r\n fullfill: (data: {\r\n to: IPort;\r\n startDate: Date;\r\n weight: IWeightRange;\r\n }) => void;\r\n activate: () => void;\r\n deactivate: () => void;\r\n}\r\n\r\nfunction BackloadStep({\r\n from,\r\n containerType,\r\n active,\r\n orderStartDate,\r\n fullfill,\r\n activate,\r\n deactivate,\r\n}: IProps) {\r\n const node = useRef();\r\n const ref = useRef();\r\n const matchesLG = useMediaQuery({\r\n breakPoint: config.breakpoints.lg,\r\n });\r\n\r\n const [visible, setVisible] = useState(false);\r\n const [activeField, setActiveField] = useState();\r\n const [backload, setBackload] = useReducer(\r\n backloadStepReducer,\r\n backloadInitialState\r\n );\r\n const [selected, setSelected] = useState('');\r\n\r\n // emit backload data after every step change\r\n useEffect(() => {\r\n if (from && backload.to && backload.startDate && backload.weight) {\r\n const label = `${from.name} | ${backload.to.name} | ${formatDateToOutput(\r\n backload.startDate\r\n )} | ${backload.weight.weightFrom} - ${backload.weight.weightTo} T`;\r\n\r\n setSelected(label);\r\n\r\n fullfill({\r\n to: backload.to,\r\n startDate: backload.startDate,\r\n weight: backload.weight,\r\n });\r\n } else {\r\n setSelected('');\r\n fullfill(null);\r\n }\r\n }, [backload, from, fullfill]);\r\n\r\n // open dropdown on step activation\r\n useEffect(() => {\r\n if (active) {\r\n setVisible(true);\r\n }\r\n }, [active]);\r\n\r\n // handla backload close\r\n useEffect(() => {\r\n const windowListener = (e: MouseEvent) => {\r\n if (\r\n !node.current.contains(e.target as HTMLElement) &&\r\n visible &&\r\n matchesLG\r\n ) {\r\n setVisible(false);\r\n setActiveField(null);\r\n deactivate();\r\n }\r\n\r\n if (!ref.current.contains(e.target as HTMLElement) && !matchesLG) {\r\n deactivate();\r\n }\r\n };\r\n\r\n window.addEventListener('mousedown', windowListener);\r\n\r\n return () => window.removeEventListener('mousedown', windowListener);\r\n }, [visible, matchesLG, deactivate]);\r\n\r\n const activateNextStep = (hop: boolean) => {\r\n if (hop) {\r\n const keys = Object.keys(FormStep).map(\r\n (key) => key.charAt(0).toLowerCase() + key.slice(1)\r\n );\r\n const activeIndex = keys.indexOf(activeField);\r\n let isAllStepFilled = true; // 🤔\r\n\r\n for (let i = activeIndex + 1; i < keys.length; i++) {\r\n const nextStepKey = keys[i] as keyof IState;\r\n\r\n if (!backload[nextStepKey]) {\r\n setActiveField(nextStepKey as FormStep);\r\n isAllStepFilled = false;\r\n break;\r\n }\r\n }\r\n\r\n if (isAllStepFilled) {\r\n setActiveField(null);\r\n }\r\n } else {\r\n setActiveField(null);\r\n }\r\n };\r\n\r\n // set backload and activate next step\r\n const onChange = ({\r\n payload,\r\n type,\r\n hop = true,\r\n }: {\r\n payload: Partial;\r\n type: ActionType;\r\n hop?: boolean;\r\n }) => {\r\n setBackload({ type, payload });\r\n activateNextStep(hop);\r\n };\r\n\r\n const clear = () => {\r\n setVisible(false);\r\n setActiveField(null);\r\n deactivate();\r\n\r\n setBackload({\r\n type: ActionType.Clear,\r\n payload: {},\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 onChange({\r\n payload: { to },\r\n type: ActionType.To,\r\n })\r\n }\r\n activate={() => setActiveField(FormStep.To)}\r\n onClose={() => setActiveField(null)}\r\n />\r\n
\r\n
\r\n \r\n onChange({\r\n payload: { startDate },\r\n type: ActionType.StartDate,\r\n })\r\n }\r\n activate={() => setActiveField(FormStep.StartDate)}\r\n onClose={() => setActiveField(null)}\r\n />\r\n
\r\n
\r\n \r\n onChange({\r\n payload: { weight },\r\n type: ActionType.Weight,\r\n hop: false,\r\n })\r\n }\r\n activate={() => setActiveField(FormStep.Weight)}\r\n deactivate={() => setActiveField(null)}\r\n />\r\n
\r\n
\r\n \r\n
\r\n );\r\n}\r\n\r\nexport default BackloadStep;\r\n","import BackloadStep from './BackloadStep';\r\n\r\nexport default BackloadStep;\r\n","import { UilTimes } from '@iconscout/react-unicons';\r\nimport React from 'react';\r\nimport { IDropdownItem } from 'shared/shared.typings';\r\nimport styles from './Form/Form.module.scss';\r\n\r\ninterface IProps {\r\n active: boolean;\r\n selected: T;\r\n placeholder: string;\r\n toggleClass: string;\r\n searchTerm: string;\r\n icon: JSX.Element;\r\n inputRef: React.MutableRefObject;\r\n activate: () => void;\r\n onTermChange: (val: string) => void;\r\n clear: () => void;\r\n}\r\n\r\nfunction Base(\r\n {\r\n active,\r\n selected,\r\n placeholder,\r\n toggleClass,\r\n searchTerm,\r\n icon,\r\n inputRef,\r\n activate,\r\n onTermChange,\r\n clear,\r\n }: IProps,\r\n ref: React.ForwardedRef\r\n) {\r\n return (\r\n activate()}\r\n >\r\n {!!icon &&
{icon}
}\r\n onTermChange(e.target.value)}\r\n />\r\n clear()}\r\n >\r\n \r\n \r\n \r\n );\r\n}\r\n\r\nconst EachStepToggle = React.forwardRef(Base) as (\r\n p: IProps & { ref?: React.ForwardedRef }\r\n) => JSX.Element;\r\n\r\nexport default EachStepToggle;\r\n","import { useCallback, useEffect, useRef, useState } from 'react';\r\nimport { Dropdown } from 'react-bootstrap';\r\nimport { useTranslation } from 'react-i18next';\r\nimport { useSelector } from 'react-redux';\r\nimport useCancelablePromise from 'shared/hooks/cancelable-promise.hook';\r\nimport useDebounced from 'shared/hooks/debounce.hook';\r\nimport useOnClickOutside from 'shared/hooks/on-click-outside.hook';\r\nimport { APIRequestBaseParams } from 'shared/shared.typings';\r\nimport { appSelector } from 'shared/store/app';\r\nimport EachStepToggle from './EachStepToggle';\r\nimport styles from './Form/Form.module.scss';\r\n\r\ninterface IProps {\r\n selected: T;\r\n toggleClass: string;\r\n placeholder: string;\r\n active: boolean;\r\n disabled?: boolean;\r\n icon?: JSX.Element;\r\n endpoint: (params: APIRequestBaseParams) => Promise;\r\n DropdownItems: (props: { item: T }) => JSX.Element;\r\n onChange: (item: T) => void;\r\n activate: () => void;\r\n deactivate: () => void;\r\n}\r\n\r\nfunction EachStep({\r\n selected,\r\n toggleClass,\r\n placeholder,\r\n active,\r\n disabled,\r\n icon,\r\n endpoint,\r\n DropdownItems,\r\n onChange,\r\n activate,\r\n deactivate,\r\n}: IProps) {\r\n const { t } = useTranslation();\r\n const { cancellablePromise } = useCancelablePromise();\r\n const { language } = useSelector(appSelector);\r\n\r\n const node = useRef();\r\n const inputRef = useRef();\r\n const [data, setData] = useState([]);\r\n\r\n const [searchTerm, setSearchTerm] = useState('');\r\n const debouncedSearchTerm = useDebounced(searchTerm, 500);\r\n\r\n const [visible, setVisible] = useState(false);\r\n const [loading, setLoading] = useState(false);\r\n\r\n useEffect(() => {\r\n if (active) {\r\n setVisible(true);\r\n inputRef.current.focus();\r\n }\r\n }, [active]);\r\n\r\n useEffect(() => {\r\n setLoading(true);\r\n cancellablePromise(endpoint({ search: debouncedSearchTerm }))\r\n .then((res) => setData(res))\r\n .finally(() => setLoading(false));\r\n }, [debouncedSearchTerm, language, endpoint, cancellablePromise]);\r\n\r\n const handleClose = useCallback(() => {\r\n if (visible) {\r\n setVisible(false);\r\n deactivate();\r\n setSearchTerm('');\r\n }\r\n }, [deactivate, visible]);\r\n\r\n useOnClickOutside(node, handleClose);\r\n\r\n const onSelect = (item: T) => {\r\n onChange(item);\r\n setVisible(false);\r\n setSearchTerm('');\r\n };\r\n\r\n const clear = () => {\r\n inputRef.current.focus();\r\n onChange(null);\r\n };\r\n\r\n return (\r\n \r\n setSearchTerm(term)}\r\n clear={clear}\r\n />\r\n\r\n \r\n
\r\n {data?.map((item, i) => (\r\n
onSelect(item)}>\r\n \r\n
\r\n ))}\r\n {!data?.length && (\r\n
{t('DataNotFound')}
\r\n )}\r\n {loading &&
}\r\n
\r\n \r\n\r\n {disabled &&
}\r\n \r\n );\r\n}\r\n\r\nexport default EachStep;\r\n","import { UilCalender, UilTimes } from '@iconscout/react-unicons';\r\nimport { TFunction } from 'i18next';\r\nimport React from 'react';\r\nimport { formatDateToOutput } from 'shared/utils/date.utils';\r\nimport styles from './Form/Form.module.scss';\r\n\r\ninterface IProps {\r\n t: TFunction;\r\n active: boolean;\r\n selected: Date;\r\n activate: () => void;\r\n clear: () => void;\r\n}\r\n\r\nconst StartDateStepToggle = React.forwardRef(\r\n (\r\n { t, active, selected, activate, clear }: IProps,\r\n ref: React.ForwardedRef\r\n ) => (\r\n activate()}\r\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 StartDateStepToggle;\r\n","import { useCallback, useEffect, useRef, useState } from 'react';\r\nimport { Dropdown } from 'react-bootstrap';\r\nimport DatePicker from 'react-datepicker';\r\nimport { useTranslation } from 'react-i18next';\r\nimport useOnClickOutside from 'shared/hooks/on-click-outside.hook';\r\nimport styles from './Form/Form.module.scss';\r\nimport Toggle from './StartDateStepToggle';\r\n\r\ninterface IProps {\r\n selected: Date;\r\n active: boolean;\r\n disabled: boolean;\r\n onChange: (item: Date) => void;\r\n activate: () => void;\r\n deactivate: () => void;\r\n}\r\n\r\nfunction StartDateStep({\r\n selected,\r\n active,\r\n disabled,\r\n onChange,\r\n activate,\r\n deactivate,\r\n}: IProps) {\r\n const { t } = useTranslation();\r\n\r\n const [visible, setVisible] = useState(false);\r\n const [startDate, setStartDate] = useState(null);\r\n const node = useRef();\r\n\r\n useEffect(() => {\r\n if (active) {\r\n setVisible(true);\r\n }\r\n }, [active]);\r\n\r\n const handleClose = useCallback(() => {\r\n if (active) {\r\n setVisible(false);\r\n deactivate();\r\n }\r\n }, [deactivate, active]);\r\n\r\n useOnClickOutside(node, handleClose);\r\n\r\n useEffect(() => {\r\n setStartDate(selected);\r\n }, [selected]);\r\n\r\n return (\r\n \r\n onChange(null)}\r\n />\r\n\r\n \r\n {\r\n if (!(item instanceof Array)) {\r\n setStartDate(item);\r\n }\r\n }}\r\n minDate={new Date()}\r\n calendarStartDay={1}\r\n fixedHeight\r\n inline\r\n />\r\n\r\n
\r\n\r\n
\r\n {\r\n setVisible(false);\r\n deactivate();\r\n }}\r\n >\r\n {t('Close')}\r\n \r\n {\r\n setVisible(false);\r\n onChange(startDate);\r\n }}\r\n >\r\n {t('Choose')}\r\n \r\n
\r\n \r\n\r\n {disabled &&
}\r\n \r\n );\r\n}\r\n\r\nexport default StartDateStep;\r\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst UilBuilding = (props) => {\n const { color, size, ...otherProps } = props\n return React.createElement('svg', {\n xmlns: 'http://www.w3.org/2000/svg',\n width: size,\n height: size,\n viewBox: '0 0 24 24',\n fill: color,\n ...otherProps\n }, React.createElement('path', {\n d: 'M14,8h1a1,1,0,0,0,0-2H14a1,1,0,0,0,0,2Zm0,4h1a1,1,0,0,0,0-2H14a1,1,0,0,0,0,2ZM9,8h1a1,1,0,0,0,0-2H9A1,1,0,0,0,9,8Zm0,4h1a1,1,0,0,0,0-2H9a1,1,0,0,0,0,2Zm12,8H20V3a1,1,0,0,0-1-1H5A1,1,0,0,0,4,3V20H3a1,1,0,0,0,0,2H21a1,1,0,0,0,0-2Zm-8,0H11V16h2Zm5,0H15V15a1,1,0,0,0-1-1H10a1,1,0,0,0-1,1v5H6V4H18Z'\n }));\n};\n\nUilBuilding.propTypes = {\n color: PropTypes.string,\n size: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n};\n\nUilBuilding.defaultProps = {\n color: 'currentColor',\n size: '24',\n};\n\nexport default UilBuilding;","import { UilAnchor, UilBuilding } from '@iconscout/react-unicons';\r\nimport { HTMLAttributes } from 'react';\r\nimport { IPortAndCity } from 'shared/services/dropdowns/dropdowns.typings';\r\nimport styles from '../Form/Form.module.scss';\r\n\r\nexport interface IProps extends HTMLAttributes {\r\n item: IPortAndCity;\r\n}\r\n\r\nfunction ToItem({ item, ...reset }: IProps) {\r\n return (\r\n \r\n
\r\n {item.isPort ? : }\r\n
\r\n\r\n {item.name}\r\n
\r\n );\r\n}\r\n\r\nexport default ToItem;\r\n","import { TFunction } from 'react-i18next';\r\nimport { IPortAndCity } from 'shared/services/dropdowns/dropdowns.typings';\r\nimport ToItem from './step-dropdown-items/To';\r\n\r\ninterface IProps {\r\n t: TFunction;\r\n data: IPortAndCity[];\r\n onSelect: (item: IPortAndCity) => void;\r\n}\r\n\r\nfunction ToStepContent({ t, data, onSelect }: IProps) {\r\n if (!data.length)\r\n return
{t('DataNotFound')}
;\r\n\r\n return (\r\n <>\r\n {data.map((item, i) => (\r\n
onSelect(item)}>\r\n \r\n
\r\n ))}\r\n \r\n );\r\n}\r\n\r\nexport default ToStepContent;\r\n","import { UilMapPin } from '@iconscout/react-unicons';\r\nimport { useCallback, useEffect, useRef, useState } from 'react';\r\nimport { Dropdown } from 'react-bootstrap';\r\nimport { useTranslation } from 'react-i18next';\r\nimport { useSelector } from 'react-redux';\r\nimport useCancelablePromise from 'shared/hooks/cancelable-promise.hook';\r\nimport useDebounced from 'shared/hooks/debounce.hook';\r\nimport useOnClickOutside from 'shared/hooks/on-click-outside.hook';\r\nimport {\r\n getCities,\r\n getPorts,\r\n} from 'shared/services/dropdowns/dropdowns.service';\r\nimport { IPortAndCity } from 'shared/services/dropdowns/dropdowns.typings';\r\nimport { appSelector } from 'shared/store/app';\r\nimport EachStepToggle from './EachStepToggle';\r\nimport styles from './Form/Form.module.scss';\r\nimport ToStepContent from './ToStepContent';\r\n\r\ninterface IProps {\r\n selected: IPortAndCity;\r\n from: IPortAndCity;\r\n active: boolean;\r\n disabled: boolean;\r\n onChange: (item: IPortAndCity) => void;\r\n activate: () => void;\r\n deactivate: () => void;\r\n}\r\n\r\nfunction ToStep({\r\n selected,\r\n from,\r\n active,\r\n disabled,\r\n onChange,\r\n activate,\r\n deactivate,\r\n}: IProps) {\r\n const { t } = useTranslation();\r\n const { language } = useSelector(appSelector);\r\n const { cancellablePromise } = useCancelablePromise();\r\n\r\n const node = useRef();\r\n const inputRef = useRef();\r\n const [data, setData] = useState([]);\r\n\r\n const [searchTerm, setSearchTerm] = useState('');\r\n const debouncedSearchTerm = useDebounced(searchTerm, 500);\r\n\r\n const [visible, setVisible] = useState(false);\r\n const [loading, setLoading] = useState(false);\r\n\r\n // set visibility true\r\n useEffect(() => {\r\n if (!active) return;\r\n\r\n if ((data && data.length) || !from) {\r\n setVisible(true);\r\n\r\n inputRef.current.focus();\r\n }\r\n }, [active, data, from]);\r\n\r\n useEffect(() => {\r\n (async function fetchCitiesOrPort() {\r\n if (!from) return;\r\n\r\n try {\r\n setLoading(true);\r\n const res = from.isPort\r\n ? await cancellablePromise(getCities({ search: debouncedSearchTerm }))\r\n : await cancellablePromise(getPorts({ search: debouncedSearchTerm }));\r\n\r\n setData(\r\n res.map(({ id, name }) => ({ id, name, isPort: !from.isPort }))\r\n );\r\n } finally {\r\n setLoading(false);\r\n }\r\n })();\r\n }, [from, debouncedSearchTerm, language, cancellablePromise]);\r\n\r\n const handleClose = useCallback(() => {\r\n if (visible) {\r\n setVisible(false);\r\n deactivate();\r\n setSearchTerm('');\r\n }\r\n }, [deactivate, visible]);\r\n\r\n useOnClickOutside(node, handleClose);\r\n\r\n const onSelect = (item: IPortAndCity) => {\r\n onChange(item);\r\n setVisible(false);\r\n setSearchTerm('');\r\n };\r\n\r\n const clear = () => {\r\n inputRef.current.focus();\r\n\r\n onChange(null);\r\n };\r\n\r\n return (\r\n \r\n }\r\n placeholder={t('To')}\r\n toggleClass={`my-0 ${styles['to-toggle']}`}\r\n inputRef={inputRef}\r\n searchTerm={searchTerm}\r\n activate={activate}\r\n onTermChange={(term: string) => setSearchTerm(term)}\r\n clear={clear}\r\n />\r\n\r\n \r\n
\r\n {from ? (\r\n \r\n ) : (\r\n
{t('SelectStartAddress')}
\r\n )}\r\n {loading &&
}\r\n
\r\n \r\n\r\n {disabled &&
}\r\n \r\n );\r\n}\r\n\r\nexport default ToStep;\r\n","import { UilTimes } from '@iconscout/react-unicons';\r\nimport { TFunction } from 'i18next';\r\nimport React from 'react';\r\nimport { IWeightRange } from 'shared/services/dropdowns/dropdowns.typings';\r\nimport styles from './Form/Form.module.scss';\r\n\r\ninterface IProps {\r\n t: TFunction;\r\n active: boolean;\r\n selected: IWeightRange;\r\n inputRef: React.MutableRefObject;\r\n activate: () => void;\r\n clear: () => void;\r\n}\r\n\r\nconst WeightStepToggle = React.forwardRef(\r\n (\r\n { t, active, selected, inputRef, activate, clear }: IProps,\r\n ref: React.ForwardedRef\r\n ) => (\r\n activate()}\r\n >\r\n \r\n clear()}\r\n >\r\n \r\n
\r\n
\r\n )\r\n);\r\n\r\nexport default WeightStepToggle;\r\n","import { useCallback, useEffect, useRef, useState } from 'react';\r\nimport { Dropdown } from 'react-bootstrap';\r\nimport { useTranslation } from 'react-i18next';\r\nimport { useSelector } from 'react-redux';\r\nimport useCancelablePromise from 'shared/hooks/cancelable-promise.hook';\r\nimport useOnClickOutside from 'shared/hooks/on-click-outside.hook';\r\nimport { getWeightRanges } from 'shared/services/dropdowns/dropdowns.service';\r\nimport {\r\n IPortAndCity,\r\n IWeightRange,\r\n IWeightRangesFilter,\r\n} from 'shared/services/dropdowns/dropdowns.typings';\r\nimport { IDropdownItem } from 'shared/shared.typings';\r\nimport { appSelector } from 'shared/store/app';\r\nimport styles from './Form/Form.module.scss';\r\nimport Toggle from './WeightStepToggle';\r\n\r\ninterface IProps {\r\n from: IPortAndCity;\r\n to: IPortAndCity;\r\n containerType: IDropdownItem;\r\n selected: IWeightRange;\r\n active: boolean;\r\n onChange: (range: IWeightRange) => void;\r\n activate: () => void;\r\n deactivate: () => void;\r\n}\r\n\r\nfunction WeightStep({\r\n from,\r\n to,\r\n containerType,\r\n selected,\r\n active,\r\n onChange,\r\n activate,\r\n deactivate,\r\n}: IProps) {\r\n const { t } = useTranslation();\r\n const { cancellablePromise } = useCancelablePromise();\r\n\r\n const node = useRef();\r\n const inputRef = useRef();\r\n const { language } = useSelector(appSelector);\r\n\r\n const [data, setData] = useState([]);\r\n\r\n const [visible, setVisible] = useState(false);\r\n const [loading, setLoading] = useState(false);\r\n\r\n useEffect(() => {\r\n if (active) {\r\n setVisible(true);\r\n inputRef.current.focus();\r\n }\r\n }, [active]);\r\n\r\n // reset data if from or to is empty\r\n useEffect(() => {\r\n if (!from || !to || !containerType) {\r\n setData([]);\r\n }\r\n }, [from, to, containerType]);\r\n\r\n // get weight ranges if from and to is filled\r\n useEffect(() => {\r\n if (from && to && containerType) {\r\n const params: IWeightRangesFilter = {\r\n containerTypeId: containerType.id,\r\n };\r\n\r\n if (from.isPort) {\r\n params.fromPortId = from.id;\r\n params.toCityId = to.id;\r\n } else {\r\n params.fromCityId = from.id;\r\n params.toPortId = to.id;\r\n }\r\n\r\n setLoading(true);\r\n cancellablePromise(getWeightRanges(params))\r\n .then(({ data: weightRanges }) => setData(weightRanges))\r\n .finally(() => setLoading(false));\r\n }\r\n }, [from, to, containerType, language, cancellablePromise]);\r\n\r\n const handleClose = useCallback(() => {\r\n if (visible) {\r\n setVisible(false);\r\n deactivate();\r\n }\r\n }, [visible, deactivate]);\r\n\r\n useOnClickOutside(node, handleClose);\r\n\r\n const onSelect = (item: IWeightRange) => {\r\n onChange(item);\r\n setVisible(false);\r\n };\r\n\r\n const clear = () => {\r\n inputRef.current.focus();\r\n onChange(null);\r\n };\r\n\r\n const getDataMistakeMessage = (\r\n fromData: IPortAndCity,\r\n toData: IPortAndCity,\r\n containerTypeData: IDropdownItem\r\n ) => {\r\n if (!fromData || !toData) {\r\n return 'SelectCorrectRoutes';\r\n }\r\n\r\n if (!containerTypeData) {\r\n return 'SelectCorrectContainerType';\r\n }\r\n\r\n return 'DataNotFound';\r\n };\r\n\r\n return (\r\n \r\n \r\n\r\n \r\n
\r\n {data?.map((item, i) => (\r\n onSelect(item)}\r\n >\r\n {`${item.weightFrom} - ${item.weightTo} T`}\r\n
\r\n ))}\r\n {(!from || !to || !containerType || !data.length) && (\r\n
\r\n {t(getDataMistakeMessage(from, to, containerType))}\r\n
\r\n )}\r\n {loading &&
}\r\n
\r\n \r\n
\r\n );\r\n}\r\n\r\nexport default WeightStep;\r\n","import { HTMLAttributes } from 'react';\r\nimport { IDropdownItem } from 'shared/shared.typings';\r\nimport styles from '../Form/Form.module.scss';\r\n\r\nexport interface IProps extends HTMLAttributes {\r\n item: IDropdownItem;\r\n}\r\n\r\nfunction ContainerTypeItem({ item, ...reset }: IProps) {\r\n return (\r\n \r\n {item.name}\r\n
\r\n );\r\n}\r\n\r\nexport default ContainerTypeItem;\r\n","import { UilAnchor, UilBuilding } from '@iconscout/react-unicons';\r\nimport { HTMLAttributes } from 'react';\r\nimport { IPortAndCity } from 'shared/services/dropdowns/dropdowns.typings';\r\nimport styles from '../Form/Form.module.scss';\r\n\r\nexport interface IProps extends HTMLAttributes {\r\n item: IPortAndCity;\r\n}\r\n\r\nfunction FromItem({ item, ...reset }: IProps) {\r\n return (\r\n \r\n
\r\n {item.isPort ? : }\r\n
\r\n\r\n {item.name}\r\n
\r\n );\r\n}\r\n\r\nexport default FromItem;\r\n","import { HTMLAttributes } from 'react';\r\nimport { IDropdownItem } from 'shared/shared.typings';\r\nimport styles from '../Form/Form.module.scss';\r\n\r\nexport interface IProps extends HTMLAttributes {\r\n item: IDropdownItem;\r\n}\r\n\r\nfunction MaritimeLineItem({ item, ...reset }: IProps) {\r\n return (\r\n \r\n {item.name}\r\n \r\n );\r\n}\r\n\r\nexport default MaritimeLineItem;\r\n","import { DiscountedRoute } from 'shared/models/backload.models';\r\nimport { FormState } from '../Calculator.typings';\r\n\r\nexport enum ActionType {\r\n From = 'from',\r\n To = 'to',\r\n ContainerType = 'containerType',\r\n StartDate = 'startDate',\r\n Weight = 'weight',\r\n MaritimeLine = 'maritimeLine',\r\n Backload = 'backload',\r\n // eslint-disable-next-line @typescript-eslint/no-shadow\r\n DiscountedRoute = 'discountedRoute',\r\n Preset = 'preset',\r\n Parent = 'parent',\r\n}\r\n\r\nexport type Payload = Partial<\r\n FormState & { selectedDiscountedRoute: DiscountedRoute }\r\n>;\r\n\r\nexport interface Action {\r\n type: ActionType;\r\n payload: Payload;\r\n}\r\n","import { IMaritimeLineType } from 'shared/services/dropdowns/dropdowns.typings';\r\nimport { IDropdownItem } from 'shared/shared.typings';\r\nimport { FormState } from '../Calculator.typings';\r\nimport { Action, ActionType } from './Form.typings';\r\n\r\nexport const formInitState: FormState = {\r\n from: null,\r\n to: null,\r\n containerType: null,\r\n startDate: null,\r\n weight: null,\r\n maritimeLine: null,\r\n backloadTo: null,\r\n backloadStartDate: null,\r\n backloadWeight: null,\r\n};\r\n\r\nexport function formReducer(state: FormState, action: Action) {\r\n const {\r\n type,\r\n payload: {\r\n from,\r\n to,\r\n containerType,\r\n startDate,\r\n weight,\r\n maritimeLine,\r\n backloadTo,\r\n backloadStartDate,\r\n backloadWeight,\r\n selectedDiscountedRoute,\r\n },\r\n } = action;\r\n\r\n switch (type) {\r\n case ActionType.From:\r\n return { ...state, from, to: null, weight: null };\r\n case ActionType.To:\r\n return { ...state, to, weight: null };\r\n case ActionType.ContainerType:\r\n return { ...state, containerType, weight: null };\r\n case ActionType.StartDate:\r\n return { ...state, startDate };\r\n case ActionType.Weight:\r\n return { ...state, weight };\r\n case ActionType.MaritimeLine:\r\n return { ...state, maritimeLine };\r\n case ActionType.Backload: {\r\n if (backloadTo && backloadStartDate && backloadWeight) {\r\n return {\r\n ...state,\r\n backloadTo,\r\n backloadStartDate,\r\n backloadWeight,\r\n };\r\n }\r\n\r\n return {\r\n ...state,\r\n backloadTo: null,\r\n backloadStartDate: null,\r\n backloadWeight: null,\r\n };\r\n }\r\n case ActionType.DiscountedRoute: {\r\n const {\r\n fromCityId,\r\n fromCityName,\r\n maritimeLineTypeId,\r\n maritimeLineType,\r\n containerSizeTypeId,\r\n containerSizeType,\r\n } = selectedDiscountedRoute;\r\n\r\n let tempMaritimeLine: IMaritimeLineType;\r\n let tempContainerType: IDropdownItem;\r\n\r\n if (maritimeLineTypeId && maritimeLineType) {\r\n tempMaritimeLine = {\r\n orderId: null,\r\n id: maritimeLineTypeId,\r\n name: maritimeLineType,\r\n };\r\n }\r\n\r\n if (containerSizeTypeId && containerSizeType) {\r\n tempContainerType = {\r\n id: containerSizeTypeId,\r\n name: containerSizeType,\r\n };\r\n }\r\n\r\n return {\r\n ...state,\r\n from: {\r\n id: fromCityId,\r\n name: fromCityName,\r\n isPort: false,\r\n },\r\n maritimeLine: tempMaritimeLine,\r\n containerType: tempContainerType,\r\n };\r\n }\r\n case ActionType.Preset: {\r\n return {\r\n ...state,\r\n ...action.payload,\r\n };\r\n }\r\n case ActionType.Parent: {\r\n return {\r\n ...state,\r\n from,\r\n to,\r\n containerType,\r\n startDate,\r\n weight,\r\n maritimeLine,\r\n };\r\n }\r\n default:\r\n return state;\r\n }\r\n}\r\n","import { UilMapMarker } from '@iconscout/react-unicons';\r\nimport { useCallback, useEffect, useReducer, useRef, useState } from 'react';\r\nimport { useTranslation } from 'react-i18next';\r\nimport { DiscountedRoute } from 'shared/models/backload.models';\r\nimport {\r\n getContainerSizes,\r\n getMaritimeLineTypes,\r\n getPortsAndCities,\r\n} from 'shared/services/dropdowns/dropdowns.service';\r\nimport {\r\n IPort,\r\n IWeightRange,\r\n} from 'shared/services/dropdowns/dropdowns.typings';\r\nimport BackloadStep from '../BackloadStep';\r\nimport { CalculatorStep, FormState } from '../Calculator.typings';\r\nimport EachStep from '../EachStep';\r\nimport StartDateStep from '../StartDateStep';\r\nimport ToStep from '../ToStep';\r\nimport WeightStep from '../WeightStep';\r\nimport ContainerTypeItem from '../step-dropdown-items/ContainerType';\r\nimport FormItem from '../step-dropdown-items/From';\r\nimport MaritimeLineItem from '../step-dropdown-items/MaritimeLine';\r\nimport styles from './Form.module.scss';\r\nimport { ActionType } from './Form.typings';\r\nimport { formInitState, formReducer } from './Form.utils';\r\n\r\nconst selectedDiscountedRouteKeyMap = {\r\n [CalculatorStep.From]: ['fromCityId', 'fromPortId'],\r\n [CalculatorStep.ContainerType]: 'containerSizeTypeId',\r\n [CalculatorStep.MaritimeLine]: 'maritimeLineTypeId',\r\n};\r\n\r\ntype Props = Partial<{\r\n isMulti: boolean;\r\n isDefault: boolean;\r\n preset: FormState;\r\n parent: FormState;\r\n selectedDiscountedRoute: DiscountedRoute;\r\n emit: (values: FormState) => void;\r\n clearSelectedDiscountedRoute: (status?: boolean) => void;\r\n toggleDiscountedRoutes: (status: boolean) => void;\r\n}>;\r\n\r\nfunction Form({\r\n isMulti = false,\r\n isDefault = false,\r\n preset,\r\n parent,\r\n selectedDiscountedRoute,\r\n emit,\r\n clearSelectedDiscountedRoute,\r\n toggleDiscountedRoutes,\r\n}: Props) {\r\n const { t } = useTranslation();\r\n\r\n const isPresetSet = useRef(false);\r\n const canSetParent = useRef(false);\r\n\r\n const [values, setValues] = useReducer(formReducer, formInitState);\r\n const [active, setActive] = useState(null);\r\n const canHop = useRef(false);\r\n const isStepDisabled = isMulti && !isDefault && !!parent;\r\n\r\n const isBackloadVisible =\r\n !isMulti && values.maritimeLine && values.from?.isPort && values.startDate;\r\n\r\n // set preset values\r\n if (!isPresetSet.current && preset) {\r\n setValues({\r\n type: ActionType.Preset,\r\n payload: preset,\r\n });\r\n\r\n isPresetSet.current = true;\r\n }\r\n\r\n // listen to parent change and set new values\r\n useEffect(() => {\r\n if (canSetParent.current && parent) {\r\n setValues({\r\n type: ActionType.Parent,\r\n payload: parent,\r\n });\r\n }\r\n\r\n canSetParent.current = true;\r\n }, [parent]);\r\n\r\n // emit data on values change\r\n useEffect(() => emit(values), [values, emit]);\r\n\r\n // activate step on value change\r\n useEffect(() => {\r\n if (canHop.current === null) return;\r\n\r\n if (!canHop.current) {\r\n setActive(null);\r\n canHop.current = null;\r\n\r\n return;\r\n }\r\n\r\n canHop.current = null;\r\n\r\n // get CalculatorStep keys and active step index in keys\r\n const keys = Object.keys(CalculatorStep).map(\r\n (key) => key.charAt(0).toLowerCase() + key.slice(1)\r\n );\r\n const activeIndex = keys.indexOf(active);\r\n\r\n // activate next calculator step if its empty\r\n for (let i = activeIndex + 1; i < keys.length; i++) {\r\n const nextStepKey = keys[i] as keyof FormState;\r\n\r\n if (!values[nextStepKey]) {\r\n setActive(nextStepKey as CalculatorStep);\r\n return;\r\n }\r\n }\r\n }, [active, values]);\r\n\r\n // on discounted route change\r\n useEffect(() => {\r\n if (selectedDiscountedRoute) {\r\n setValues({\r\n type: ActionType.DiscountedRoute,\r\n payload: { selectedDiscountedRoute },\r\n });\r\n\r\n setActive(CalculatorStep.To);\r\n }\r\n }, [selectedDiscountedRoute]);\r\n\r\n const detectSelectedRoutePropChange = (\r\n step: CalculatorStep,\r\n payload: FormState[keyof FormState]\r\n ) => {\r\n if (!selectedDiscountedRoute) return;\r\n\r\n let routeProp: DiscountedRoute[keyof DiscountedRoute];\r\n const castedStep = step as keyof typeof selectedDiscountedRouteKeyMap;\r\n const mapKey = selectedDiscountedRouteKeyMap[castedStep];\r\n\r\n if (mapKey instanceof Array) {\r\n // eslint-disable-next-line consistent-return\r\n mapKey.forEach((key) => {\r\n const castedKey = key as keyof typeof selectedDiscountedRoute;\r\n\r\n if (selectedDiscountedRoute[castedKey]) {\r\n routeProp = selectedDiscountedRoute[castedKey];\r\n return null;\r\n }\r\n });\r\n } else {\r\n const castedKey = mapKey as keyof typeof selectedDiscountedRoute;\r\n routeProp = selectedDiscountedRoute[castedKey];\r\n }\r\n\r\n if (payload && routeProp && 'id' in payload && routeProp !== payload.id) {\r\n clearSelectedDiscountedRoute();\r\n }\r\n };\r\n\r\n // step value change\r\n const onChange = ({\r\n payload,\r\n type,\r\n step,\r\n hop = true,\r\n }: {\r\n payload: FormState;\r\n type: ActionType;\r\n step?: CalculatorStep;\r\n hop?: boolean;\r\n }) => {\r\n setValues({ type, payload });\r\n\r\n canHop.current = payload ? Object.values(payload)[0] && hop : false;\r\n\r\n if (!isMulti) {\r\n // detect selected route prop change & deselect route\r\n const payloadKeys = Object.keys(payload) as Array;\r\n const prop = payload[payloadKeys[0]];\r\n\r\n detectSelectedRoutePropChange(step, prop);\r\n }\r\n };\r\n\r\n const deactivate = useCallback(() => setActive(null), []);\r\n\r\n const setBackload = useCallback(\r\n (data: { to: IPort; startDate: Date; weight: IWeightRange }) => {\r\n if (!data) {\r\n setValues({\r\n type: ActionType.Backload,\r\n payload: {},\r\n });\r\n } else {\r\n const { to, startDate, weight } = data;\r\n\r\n setValues({\r\n type: ActionType.Backload,\r\n payload: {\r\n backloadTo: to,\r\n backloadStartDate: startDate,\r\n backloadWeight: weight,\r\n },\r\n });\r\n }\r\n\r\n if (toggleDiscountedRoutes) {\r\n toggleDiscountedRoutes(!data);\r\n }\r\n },\r\n [toggleDiscountedRoutes]\r\n );\r\n\r\n return (\r\n
\r\n
\r\n }\r\n DropdownItems={FormItem}\r\n onChange={(from) =>\r\n onChange({\r\n payload: { from },\r\n type: ActionType.From,\r\n step: CalculatorStep.From,\r\n })\r\n }\r\n activate={() => setActive(CalculatorStep.From)}\r\n deactivate={deactivate}\r\n />\r\n\r\n \r\n onChange({\r\n payload: { to },\r\n type: ActionType.To,\r\n step: CalculatorStep.To,\r\n })\r\n }\r\n activate={() => setActive(CalculatorStep.To)}\r\n deactivate={deactivate}\r\n />\r\n
\r\n\r\n \r\n onChange({\r\n payload: { containerType },\r\n type: ActionType.ContainerType,\r\n step: CalculatorStep.ContainerType,\r\n })\r\n }\r\n activate={() => setActive(CalculatorStep.ContainerType)}\r\n deactivate={deactivate}\r\n />\r\n\r\n \r\n onChange({\r\n payload: { startDate },\r\n type: ActionType.StartDate,\r\n step: CalculatorStep.StartDate,\r\n })\r\n }\r\n activate={() => setActive(CalculatorStep.StartDate)}\r\n disabled={isStepDisabled}\r\n deactivate={deactivate}\r\n />\r\n\r\n \r\n onChange({\r\n payload: { weight },\r\n type: ActionType.Weight,\r\n step: CalculatorStep.Weight,\r\n hop: !isStepDisabled,\r\n })\r\n }\r\n activate={() => setActive(CalculatorStep.Weight)}\r\n deactivate={deactivate}\r\n />\r\n\r\n \r\n onChange({\r\n payload: { maritimeLine },\r\n type: ActionType.MaritimeLine,\r\n step: CalculatorStep.MaritimeLine,\r\n hop: false,\r\n })\r\n }\r\n activate={() => setActive(CalculatorStep.MaritimeLine)}\r\n deactivate={deactivate}\r\n />\r\n\r\n {isBackloadVisible && (\r\n setActive(CalculatorStep.Backload)}\r\n deactivate={deactivate}\r\n />\r\n )}\r\n
\r\n );\r\n}\r\n\r\nexport default Form;\r\n","import Form from './Form';\r\n\r\nexport default Form;\r\n","// extracted by mini-css-extract-plugin\nexport default {\"wrapper\":\"MultiOrderAddButton_wrapper__LlUlG\"};","import { UilPlus } from '@iconscout/react-unicons';\r\nimport config from 'config';\r\nimport { ChangeEvent, useState } from 'react';\r\nimport styles from './MultiOrderAddButton.module.scss';\r\nimport { IProps } from './MultiOrderAddButton.typings';\r\n\r\nconst { multiOrdersQuantity } = config;\r\n\r\nfunction MultiOrderAddButton({ ordersLenght, disabled, onAdd }: IProps) {\r\n const [amount, setAmount] = useState(1);\r\n const maxAmount = multiOrdersQuantity.max - ordersLenght;\r\n\r\n const onInputChange = (e: ChangeEvent) => {\r\n const val = +e.target.value;\r\n\r\n if (!val) {\r\n setAmount('');\r\n return;\r\n }\r\n\r\n if (val > maxAmount) {\r\n setAmount(maxAmount);\r\n return;\r\n }\r\n\r\n setAmount(+val);\r\n };\r\n\r\n const onClick = () => {\r\n setAmount(1);\r\n onAdd(+amount);\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\nexport default MultiOrderAddButton;\r\n","import MultiOrderAddButton from './MultiOrderAddButton';\r\n\r\nexport default MultiOrderAddButton;\r\n","// extracted by mini-css-extract-plugin\nexport default {\"disclaimer\":\"Disclaimer_disclaimer__hLUnV\"};","import { useTranslation } from 'react-i18next';\r\nimport styles from './Disclaimer.module.scss';\r\n\r\nfunction Disclaimer() {\r\n const { t } = useTranslation();\r\n\r\n return (\r\n
\r\n {t('Disclaimer')}:\r\n {t('OrderDisclaimer')}\r\n
\r\n );\r\n}\r\n\r\nexport default Disclaimer;\r\n","import Disclaimer from './Disclaimer';\r\n\r\nexport default Disclaimer;\r\n","// extracted by mini-css-extract-plugin\nexport default {\"dialog-body\":\"Preview_dialog-body__WL5nl\",\"divider\":\"Preview_divider__hir4x\",\"middle\":\"Preview_middle__SEwNe\",\"details\":\"Preview_details__dSl1Z\",\"backload\":\"Preview_backload__s7zUa\",\"end\":\"Preview_end__hCvr9\",\"wrapper\":\"Preview_wrapper__LFVv+\",\"heading\":\"Preview_heading__bsY7g\",\"mobile-heading\":\"Preview_mobile-heading__hSwiT\",\"active\":\"Preview_active__PS1q-\",\"backloadless\":\"Preview_backloadless__rH+hH\"};","// extracted by mini-css-extract-plugin\nexport default {\"wrapper\":\"UnAuthorized_wrapper__hVrlZ\"};","import { useTranslation } from 'react-i18next';\r\nimport { Link } from 'react-router-dom';\r\nimport styles from './UnAuthorized.module.scss';\r\n\r\nfunction UnAuthorized() {\r\n const { t } = useTranslation();\r\n\r\n return (\r\n

\r\n {t('ForRequestOffer')}\r\n
\r\n \r\n {t('Authorization')}\r\n \r\n

\r\n );\r\n}\r\n\r\nexport default UnAuthorized;\r\n","import UnAuthorized from './UnAuthorized';\r\n\r\nexport default UnAuthorized;\r\n","// extracted by mini-css-extract-plugin\nexport default {\"each\":\"EachDetail_each__3xUot\",\"title\":\"EachDetail_title__Ov2+h\"};","import { useTranslation } from 'react-i18next';\r\nimport styles from './EachDetail.module.scss';\r\n\r\ninterface IProps {\r\n title: string;\r\n children: string | JSX.Element | JSX.Element[];\r\n className?: string;\r\n}\r\n\r\nfunction EachDetail({ title, children, className }: IProps) {\r\n const { t } = useTranslation();\r\n\r\n return (\r\n
\r\n {t(title)}\r\n {children}\r\n
\r\n );\r\n}\r\n\r\nexport default EachDetail;\r\n","import EachDetail from './EachDetail';\r\n\r\nexport default EachDetail;\r\n","// extracted by mini-css-extract-plugin\nexport default {\"container\":\"Details_container__ucf96\",\"toggle\":\"Details_toggle__UIGrD\",\"active\":\"Details_active__IrTnq\",\"each\":\"Details_each__J+k8o\"};","import { UilAngleDown } from '@iconscout/react-unicons';\r\nimport { useAccordionButton } from 'react-bootstrap';\r\nimport styles from './Details.module.scss';\r\n\r\ninterface IProps {\r\n children: string;\r\n price: number;\r\n eventKey: string;\r\n open: string;\r\n setOpen: (key: string) => void;\r\n}\r\n\r\nfunction Toggle({ children, price, eventKey, open, setOpen }: IProps) {\r\n const decoratedOnClick = useAccordionButton(eventKey, () =>\r\n setOpen(open !== eventKey ? eventKey : '0')\r\n );\r\n\r\n return (\r\n \r\n \r\n \r\n {children}\r\n \r\n\r\n {price}$\r\n \r\n );\r\n}\r\n\r\nexport default Toggle;\r\n","import { Accordion } from 'react-bootstrap';\r\nimport { CalculationResponse } from 'shared/models/calculator.models';\r\nimport { formatDateToOutput } from 'shared/utils/date.utils';\r\nimport Each from '../../EachDetail';\r\nimport styles from './Details.module.scss';\r\nimport Toggle from './Toggle';\r\n\r\ninterface IProps {\r\n name: string;\r\n details: CalculationResponse;\r\n eventKey: string;\r\n open: string;\r\n setOpen: (key: string) => void;\r\n}\r\n\r\nfunction Details({ name, details, eventKey, open, setOpen }: IProps) {\r\n return (\r\n
\r\n \r\n {name}\r\n \r\n\r\n \r\n <>\r\n \r\n {details.from}\r\n \r\n \r\n {details.to}\r\n \r\n \r\n {details.containerSizeType}\r\n \r\n \r\n {details.maritimeLineTypeName}\r\n \r\n \r\n {formatDateToOutput(details.orderStartDate)}\r\n \r\n \r\n <>\r\n {details.weightFrom}-{details.weightTo} T\r\n \r\n \r\n \r\n \r\n
\r\n );\r\n}\r\n\r\nexport default Details;\r\n","import Details from './Details';\r\n\r\nexport default Details;\r\n","// extracted by mini-css-extract-plugin\nexport default {\"details-wrapper\":\"MultiPreview_details-wrapper__bjMEg\",\"total-price\":\"MultiPreview_total-price__S-P5l\"};","import { useMemo, useState } from 'react';\nimport { Accordion, Modal } from 'react-bootstrap';\nimport { useTranslation } from 'react-i18next';\nimport { useSelector } from 'react-redux';\nimport { useNavigate } from 'react-router-dom';\nimport { LoadingButton, TextArea } from 'shared/components';\nimport useCancelablePromise from 'shared/hooks/cancelable-promise.hook';\nimport usePermission from 'shared/hooks/permission.hook';\nimport { CalculationResponse } from 'shared/models/calculator.models';\nimport { UserRole } from 'shared/models/user.models';\nimport { addAuction } from 'shared/services/calculator/calculator.service';\nimport { IInlandAuctionModel } from 'shared/services/calculator/calculator.typings';\nimport { useAppDispatch } from 'shared/store';\nimport { createAlert } from 'shared/store/alert';\nimport { authSelector } from 'shared/store/auth';\nimport { formatDateToISO } from 'shared/utils/date.utils';\nimport Disclaimer from '../Disclaimer';\nimport priviewStyles from '../Preview.module.scss';\nimport UnAuthorized from '../UnAuthorized';\nimport Details from './Details';\nimport styles from './MultiPreview.module.scss';\n\ninterface IProps {\n show: boolean;\n orders: CalculationResponse[];\n close: () => void;\n}\n\nfunction MultiPreview({ orders, show, close }: IProps) {\n const { t } = useTranslation();\n const dispatch = useAppDispatch();\n const navigate = useNavigate();\n const { cancellablePromise } = useCancelablePromise();\n const { user } = useSelector(authSelector);\n const { hasPermission } = usePermission();\n const isVendor = hasPermission(UserRole.Vendor);\n\n const [commentForVendor, setCommentForVendor] = useState('');\n const isCommentValid = useMemo(\n () => commentForVendor.length <= 1000,\n [commentForVendor]\n );\n const [open, setOpen] = useState('1');\n const [loading, setLoading] = useState(false);\n\n const submit = () => {\n const model: IInlandAuctionModel = {\n commentForVendor,\n auctionItems: [],\n };\n\n orders.forEach((details) => {\n model.auctionItems.push({\n calculatorDataId: details.id,\n orderStartDate: formatDateToISO(details.orderStartDate),\n isParent: details.isParent,\n maritimeLineTypeId: details.maritimeLineTypeId,\n });\n });\n\n setLoading(true);\n cancellablePromise(addAuction(model))\n .then(() => {\n dispatch(\n createAlert({\n message: t('Alerts.OrderCreationSuccess'),\n variant: 'success',\n time: 10000,\n })\n );\n\n navigate('/client/auctions');\n })\n .catch(() => setLoading(false));\n };\n\n return (\n \n \n {!user && }\n\n \n {t('RequestOffer')}\n \n\n
\n \n {orders.map((details, i) => (\n
\n \n
\n ))}\n
\n\n setCommentForVendor(e.target.value)}\n isInvalid={!isCommentValid}\n errorMSG={t('Validations.CommentForVendor', { count: 1000 })}\n />\n\n \n {t('TotalPrice')}\n \n {orders.reduce((total, current) => total + current.price, 0)} $\n \n
\n\n
\n \n {t('Close')}\n \n\n \n {t('Request')}\n \n
\n \n\n \n
\n
\n );\n}\n\nexport default MultiPreview;\n","import { FormState } from '../Calculator.typings';\r\n\r\nexport interface IState extends FormState {\r\n id: number;\r\n}\r\n\r\nexport enum ActionType {\r\n Push = 1,\r\n Update,\r\n Remove,\r\n Clear,\r\n}\r\n\r\nexport interface Action {\r\n type: ActionType;\r\n payload: Partial<{ id: number; stateSlice: IState; stateSlices: IState[] }>;\r\n}\r\n","import MultiPreview from './MultiPreview';\r\n\r\nexport default MultiPreview;\r\n","// extracted by mini-css-extract-plugin\nexport default {\"row\":\"MultiWrapper_row__WPvrb\",\"control\":\"MultiWrapper_control__ghfvr\",\"submit\":\"MultiWrapper_submit__Nriio\"};","import { Action, ActionType, IState } from './MultiWrapper.typings';\r\n\r\nexport function reducer(state: IState[], action: Action) {\r\n const {\r\n type,\r\n payload: { id, stateSlice, stateSlices },\r\n } = action;\r\n\r\n switch (type) {\r\n case ActionType.Push: {\r\n return [...state, ...stateSlices.map((item) => ({ ...item }))];\r\n }\r\n case ActionType.Update: {\r\n return state.map((item) => {\r\n if (item.id === stateSlice.id) {\r\n return { ...stateSlice };\r\n }\r\n\r\n return item;\r\n });\r\n }\r\n case ActionType.Remove: {\r\n return state.filter((item) => id !== item.id);\r\n }\r\n case ActionType.Clear: {\r\n return [];\r\n }\r\n default:\r\n return state;\r\n }\r\n}\r\n","/* eslint-disable no-labels */\r\n/* eslint-disable no-restricted-syntax */\r\n\r\nimport { UilTimes } from '@iconscout/react-unicons';\r\nimport config from 'config';\r\nimport { useCallback, useEffect, useReducer, useState } from 'react';\r\nimport { useTranslation } from 'react-i18next';\r\nimport { LoadingButton } from 'shared/components';\r\nimport useCancelablePromise from 'shared/hooks/cancelable-promise.hook';\r\nimport useDialog from 'shared/hooks/dialog.hook';\r\nimport { CalculationResponse } from 'shared/models/calculator.models';\r\nimport { calculateMultiInlandOrders } from 'shared/services/calculator/calculator.service';\r\nimport { ICalculatorMultiInlandOrderModel } from 'shared/services/calculator/calculator.typings';\r\nimport { FormState } from '../Calculator.typings';\r\nimport { formatMultiModel, mandatoryFields } from '../Calculator.utils';\r\nimport Form from '../Form';\r\nimport MultiOrderAddButton from '../MultiOrderAddButton';\r\nimport MultiPreview from '../Preview/MultiPreview';\r\nimport styles from './MultiWrapper.module.scss';\r\nimport { reducer } from './MultiWrapper.reducer';\r\nimport { ActionType, IState } from './MultiWrapper.typings';\r\n\r\nconst { multiOrdersQuantity } = config;\r\n\r\nfunction Multi() {\r\n const { t } = useTranslation();\r\n const { openDialog } = useDialog();\r\n const { cancellablePromise } = useCancelablePromise();\r\n\r\n const [data, setData] = useReducer(reducer, []);\r\n const [orders, setOrders] = useState();\r\n const [collectorData, setCollectorData] = useState(null);\r\n\r\n const [isCollectorDisabled, setIsCollectorDisabled] = useState(false);\r\n const [isDisabled, setIsDisabled] = useState(true);\r\n const [loading, setLoading] = useState(false);\r\n const [dialogShow, setDialogShow] = useState(false);\r\n\r\n // check if collector is disabled\r\n useEffect(() => {\r\n if (!collectorData) return;\r\n\r\n let status = false;\r\n\r\n mandatoryFields.forEach((key) => {\r\n if (!collectorData[key as keyof FormState]) {\r\n status = true;\r\n }\r\n });\r\n\r\n setIsCollectorDisabled(status);\r\n }, [collectorData]);\r\n\r\n // check if calculator is disabled\r\n useEffect(() => {\r\n let status = !data.length || data.length < multiOrdersQuantity.min;\r\n\r\n dataLoop: for (const item of data) {\r\n for (const key of mandatoryFields) {\r\n if (!item[key as keyof IState]) {\r\n status = true;\r\n break dataLoop;\r\n }\r\n }\r\n }\r\n\r\n setIsDisabled(status);\r\n }, [data]);\r\n\r\n const collect = useCallback(\r\n (values: FormState) => setCollectorData(values),\r\n []\r\n );\r\n\r\n const push = (amount: number) => {\r\n const latestId = data.length ? data[data.length - 1].id + 1 : 0;\r\n const stateSlices: IState[] = [];\r\n\r\n for (let i = 0; i < amount; i++) {\r\n const id = latestId + i;\r\n\r\n stateSlices.push({ ...collectorData, id });\r\n }\r\n\r\n setData({\r\n type: ActionType.Push,\r\n payload: { stateSlices },\r\n });\r\n };\r\n\r\n const update = useCallback((stateSlice: FormState) => {\r\n setData({\r\n type: ActionType.Update,\r\n payload: { stateSlice: stateSlice as IState },\r\n });\r\n }, []);\r\n\r\n const remove = async (id: number) => {\r\n if (id === 0) {\r\n const isConfirmed = await openDialog('Dialog.CalculatorMultiOrderClear');\r\n\r\n if (isConfirmed) {\r\n setData({ type: ActionType.Clear, payload: {} });\r\n }\r\n } else {\r\n setData({ type: ActionType.Remove, payload: { id } });\r\n }\r\n };\r\n\r\n const onSubmit = () => {\r\n const models: ICalculatorMultiInlandOrderModel[] = [];\r\n\r\n data.forEach((model, i) => {\r\n const formatedModel = formatMultiModel(\r\n model\r\n ) as ICalculatorMultiInlandOrderModel;\r\n\r\n formatedModel.isParent = i === 0;\r\n\r\n models.push(formatedModel);\r\n });\r\n\r\n setLoading(true);\r\n cancellablePromise(calculateMultiInlandOrders(models))\r\n .then((res) => {\r\n setOrders(res);\r\n setDialogShow(true);\r\n })\r\n .finally(() => setLoading(false));\r\n };\r\n\r\n return (\r\n <>\r\n {data.map((item) => (\r\n \r\n \r\n\r\n remove(item.id)}\r\n >\r\n {t('Cancel')}\r\n \r\n \r\n ))}\r\n\r\n {/* collector */}\r\n {data.length < multiOrdersQuantity.max && (\r\n
\r\n
\r\n\r\n \r\n
\r\n )}\r\n\r\n
\r\n \r\n {t('Calculate')}\r\n \r\n
\r\n\r\n {/* Order dialog */}\r\n {dialogShow && (\r\n setDialogShow(false)}\r\n />\r\n )}\r\n \r\n );\r\n}\r\n\r\nexport default Multi;\r\n","import MultiWrapper from './MultiWrapper';\r\n\r\nexport default MultiWrapper;\r\n","// extracted by mini-css-extract-plugin\nexport default {\"backload-item\":\"BackloadEachDetail_backload-item__Ie-AD\",\"each\":\"BackloadEachDetail_each__fvbVe\",\"start-date\":\"BackloadEachDetail_start-date__mRgRf\",\"maritime-line\":\"BackloadEachDetail_maritime-line__VqsGr\",\"price\":\"BackloadEachDetail_price__EAOqG\",\"amount\":\"BackloadEachDetail_amount__qWXdD\",\"active\":\"BackloadEachDetail_active__oSSAA\"};","import { useTranslation } from 'react-i18next';\r\nimport { CalculationResponse } from 'shared/models/calculator.models';\r\nimport { formatDateToOutput } from 'shared/utils/date.utils';\r\nimport styles from './BackloadEachDetail.module.scss';\r\n\r\ninterface IProps {\r\n data: CalculationResponse;\r\n selected: boolean;\r\n toggle: () => void;\r\n}\r\n\r\nfunction BackloadEachDetail({ data, selected, toggle }: IProps) {\r\n const { t } = useTranslation();\r\n\r\n return (\r\n \r\n
\r\n
\r\n {formatDateToOutput(data.orderStartDate)}\r\n
\r\n
\r\n
\r\n
\r\n {data.maritimeLineTypeName}\r\n
\r\n
\r\n
\r\n
\r\n {t('Price')}: \r\n {data.price}$\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n );\r\n}\r\n\r\nexport default BackloadEachDetail;\r\n","import BackloadEachDetail from './BackloadEachDetail';\r\n\r\nexport default BackloadEachDetail;\r\n","import { useTranslation } from 'react-i18next';\r\nimport { CalculationResponse } from 'shared/models/calculator.models';\r\nimport { formatDateToOutput } from 'shared/utils/date.utils';\r\nimport Each from '../EachDetail';\r\n\r\ninterface IProps {\r\n details: CalculationResponse;\r\n roundTrip: CalculationResponse;\r\n selectedAvailableBackload: CalculationResponse;\r\n}\r\n\r\nfunction Details({ details, roundTrip, selectedAvailableBackload }: IProps) {\r\n const { t } = useTranslation();\r\n\r\n return (\r\n <>\r\n {details.from}\r\n {details.to}\r\n \r\n {selectedAvailableBackload?.containerSizeType ||\r\n details.containerSizeType}\r\n \r\n {(selectedAvailableBackload?.maritimeLineTypeName ||\r\n details.maritimeLineTypeName) && (\r\n \r\n {selectedAvailableBackload?.maritimeLineTypeName ||\r\n details.maritimeLineTypeName}\r\n \r\n )}\r\n \r\n {selectedAvailableBackload?.orderStartDate\r\n ? formatDateToOutput(selectedAvailableBackload.orderStartDate)\r\n : formatDateToOutput(details.orderStartDate)}\r\n \r\n \r\n <>\r\n {details.weightFrom}-{details.weightTo} T\r\n \r\n \r\n\r\n {roundTrip && (\r\n <>\r\n \r\n {roundTrip.from}\r\n \r\n\r\n {roundTrip.to}\r\n\r\n \r\n {formatDateToOutput(roundTrip.orderStartDate)}\r\n \r\n\r\n \r\n <>\r\n {roundTrip.weightFrom}-{roundTrip.weightTo} T\r\n \r\n \r\n \r\n )}\r\n \r\n );\r\n}\r\n\r\nexport default Details;\r\n","// extracted by mini-css-extract-plugin\nexport default {\"each\":\"PriceHandler_each__GVZ9h\",\"title\":\"PriceHandler_title__Jlqvo\",\"total\":\"PriceHandler_total__Xzpbg\"};","import { useTranslation } from 'react-i18next';\r\nimport { CalculationResponse } from 'shared/models/calculator.models';\r\nimport styles from './PriceHandler.module.scss';\r\n\r\ninterface IProps {\r\n details: CalculationResponse;\r\n roundTrip: CalculationResponse;\r\n selectedAvailableBackload: CalculationResponse;\r\n}\r\n\r\nfunction PriceHandler({\r\n details,\r\n roundTrip,\r\n selectedAvailableBackload,\r\n}: IProps) {\r\n const { t } = useTranslation();\r\n\r\n if (selectedAvailableBackload) {\r\n return (\r\n
\r\n {t('Price')}:\r\n {selectedAvailableBackload.price}$\r\n
\r\n );\r\n }\r\n\r\n if (roundTrip) {\r\n return (\r\n <>\r\n
\r\n {t('Price')}:\r\n {details.price}$\r\n
\r\n\r\n
\r\n {t('BackloadPrice')}:\r\n {roundTrip.price}$\r\n
\r\n\r\n
\r\n {t('TotalPrice')}\r\n \r\n {details.price + roundTrip.price}$\r\n \r\n
\r\n \r\n );\r\n }\r\n\r\n return (\r\n <>\r\n
\r\n {t('Price')}:\r\n \r\n {details.price}$\r\n \r\n
\r\n\r\n {!!details.discountPercent && (\r\n <>\r\n
\r\n {t('Discount')}:\r\n {details.discountPercent}%\r\n
\r\n\r\n
\r\n {t('TotalPrice')}\r\n \r\n {Math.round(\r\n (details.price / 100) * (100 - details.discountPercent)\r\n )}\r\n $\r\n \r\n
\r\n \r\n )}\r\n \r\n );\r\n}\r\n\r\nexport default PriceHandler;\r\n","export enum Tab {\r\n Details = 1,\r\n Backload,\r\n}\r\n","import PriceHandler from './PriceHandler';\r\n\r\nexport default PriceHandler;\r\n","import config from 'config';\nimport { useEffect, useMemo, useState } from 'react';\nimport { Modal } from 'react-bootstrap';\nimport { useTranslation } from 'react-i18next';\nimport { useSelector } from 'react-redux';\nimport { useNavigate } from 'react-router-dom';\nimport { LoadingButton, TextArea } from 'shared/components';\nimport useCancelablePromise from 'shared/hooks/cancelable-promise.hook';\nimport useMediaQuery from 'shared/hooks/media-query.hook';\nimport usePermission from 'shared/hooks/permission.hook';\nimport { DiscountedRoute } from 'shared/models/backload.models';\nimport { CalculationResponse } from 'shared/models/calculator.models';\nimport { UserRole } from 'shared/models/user.models';\nimport {\n addAuction,\n createBackloadOrder,\n} from 'shared/services/calculator/calculator.service';\nimport {\n IBackloadInlandOrderModel,\n IInlandAuctionItemModel,\n IInlandAuctionModel,\n} from 'shared/services/calculator/calculator.typings';\nimport { useAppDispatch } from 'shared/store';\nimport { createAlert } from 'shared/store/alert';\nimport { authSelector } from 'shared/store/auth';\nimport Disclaimer from '../Disclaimer';\nimport styles from '../Preview.module.scss';\nimport Unauthorized from '../UnAuthorized';\nimport BackloadEachDetail from './BackloadEachDetail';\nimport Details from './Details';\nimport PriceHandler from './PriceHandler';\nimport { Tab } from './SinglePreview.utils';\n\ninterface IProps {\n show: boolean;\n orders: CalculationResponse[];\n selectedDiscountedRoute: DiscountedRoute;\n close: () => void;\n}\n\nfunction SinglePreview({\n show,\n orders,\n selectedDiscountedRoute,\n close,\n}: IProps) {\n const { t } = useTranslation();\n const dispatch = useAppDispatch();\n const navigate = useNavigate();\n const { cancellablePromise } = useCancelablePromise();\n const { user } = useSelector(authSelector);\n const { hasPermission } = usePermission();\n const isVendor = hasPermission(UserRole.Vendor);\n const matchesLG = useMediaQuery({\n breakPoint: config.breakpoints.lg,\n });\n\n const [details, setDetails] = useState(null);\n const [roundTrip, setRoundTrip] = useState(null);\n const [availableBackloads, setAvailableBackloads] =\n useState();\n const [selectedAvailableBackload, setSelectedAvailableBackload] =\n useState(null);\n const [commentForVendor, setCommentForVendor] = useState('');\n const isCommentValid = useMemo(\n () => commentForVendor.length <= 1000,\n [commentForVendor]\n );\n\n const [activeTab, setActiveTab] = useState(Tab.Details);\n const [loading, setLoading] = useState(false);\n\n // set initial data\n useEffect(() => {\n for (let i = 0; i < orders.length; i++) {\n const item = orders[i];\n\n if (item.isRoundTrip) {\n setRoundTrip(item);\n } else {\n setDetails(item);\n }\n }\n\n setAvailableBackloads(null);\n }, [orders]);\n\n const toggleBackload = (item: CalculationResponse) =>\n setSelectedAvailableBackload(\n selectedAvailableBackload?.id === item.id ? null : item\n );\n\n const submit = () => {\n if (selectedDiscountedRoute) {\n const backloadModel: IBackloadInlandOrderModel = {\n calculatorDataId: details.id,\n orderStartDate: details.orderStartDate,\n availableBackloadId: null,\n maritimeLineTypeId: details.maritimeLineTypeId,\n discountedBackloadId: selectedDiscountedRoute.id,\n };\n\n setLoading(true);\n createBackloadOrder(backloadModel)\n .then(() => navigate('/client/orders'))\n .catch(() => setLoading(false));\n } else {\n const model: IInlandAuctionModel = {\n commentForVendor,\n auctionItems: [],\n };\n const auctionItemModel: IInlandAuctionItemModel = {\n calculatorDataId: details.id,\n orderStartDate: details.orderStartDate,\n isParent: true,\n isRoundTrip: false,\n availableBackloadId: null,\n maritimeLineTypeId: details.maritimeLineTypeId,\n };\n\n if (selectedAvailableBackload) {\n auctionItemModel.maritimeLineTypeId =\n selectedAvailableBackload.maritimeLineTypeId;\n auctionItemModel.orderStartDate =\n selectedAvailableBackload.orderStartDate;\n auctionItemModel.availableBackloadId = selectedAvailableBackload.id;\n }\n\n model.auctionItems = [auctionItemModel];\n\n if (roundTrip) {\n const roundTripModel: IInlandAuctionItemModel = {\n calculatorDataId: roundTrip.id,\n orderStartDate: roundTrip.orderStartDate,\n isParent: false,\n isRoundTrip: true,\n maritimeLineTypeId: roundTrip.maritimeLineTypeId,\n };\n\n model.auctionItems.push(roundTripModel);\n }\n\n setLoading(true);\n cancellablePromise(addAuction(model))\n .then(() => {\n dispatch(\n createAlert({\n message: t('Alerts.OrderCreationSuccess'),\n variant: 'success',\n time: 10000,\n })\n );\n\n navigate('/client/auctions');\n })\n .catch(() => setLoading(false));\n }\n };\n\n return (\n \n \n {!user && }\n\n {/* headings */}\n
\n
\n

\n {t('RequestOffer')}\n

\n
\n
\n
\n

\n {t('OfferedBackloads')}\n

\n
\n
\n\n {/* switch */}\n {availableBackloads && (\n
\n
\n setActiveTab(Tab.Details)}\n >\n {t('Request')}\n
\n setActiveTab(Tab.Backload)}\n >\n {t('Backload')}\n
\n
\n \n )}\n\n {/* content */}\n {details && (\n
\n {(activeTab === Tab.Details || !matchesLG) && (\n
\n \n\n setCommentForVendor(e.target.value)}\n isInvalid={!isCommentValid}\n errorMSG={t('Validations.CommentForVendor', { count: 1000 })}\n />\n\n \n\n
\n \n {t('Close')}\n \n\n \n {t('Request')}\n \n
\n
\n )}\n\n
\n\n {/* handle available backloads */}\n {(activeTab === Tab.Backload || !matchesLG) && (\n
\n
\n
\n {availableBackloads?.map((item) => (\n toggleBackload(item)}\n />\n ))}\n
\n
\n
\n )}\n
\n )}\n\n \n \n \n );\n}\n\nexport default SinglePreview;\n","import SinglePreview from './SinglePreview';\r\n\r\nexport default SinglePreview;\r\n","// extracted by mini-css-extract-plugin\nexport default {\"submit\":\"SingnleWrapper_submit__rJDou\"};","import { useCallback, useEffect, useState } from 'react';\r\nimport { useTranslation } from 'react-i18next';\r\nimport { LoadingButton } from 'shared/components';\r\nimport useCancelablePromise from 'shared/hooks/cancelable-promise.hook';\r\nimport { DiscountedRoute } from 'shared/models/backload.models';\r\nimport { CalculationResponse } from 'shared/models/calculator.models';\r\nimport { calculateInlandOrder } from 'shared/services/calculator/calculator.service';\r\nimport { FormState } from '../Calculator.typings';\r\nimport { formatSingleModel, mandatoryFields } from '../Calculator.utils';\r\nimport Form from '../Form';\r\nimport SinglePreview from '../Preview/SinglePreview';\r\nimport styles from './SingnleWrapper.module.scss';\r\n\r\ninterface IProps {\r\n selectedDiscountedRoute: DiscountedRoute;\r\n clearSelectedDiscountedRoute: (status: boolean) => void;\r\n toggleDiscountedRoutes: (status: boolean) => void;\r\n}\r\n\r\nfunction Single({\r\n selectedDiscountedRoute,\r\n clearSelectedDiscountedRoute,\r\n toggleDiscountedRoutes,\r\n}: IProps) {\r\n const { t } = useTranslation();\r\n const { cancellablePromise } = useCancelablePromise();\r\n\r\n const [data, setData] = useState(null);\r\n const [orders, setOrders] = useState(null);\r\n const [isDisabled, setIsDisabled] = useState(true);\r\n const [loading, setLoading] = useState(false);\r\n const [modalVisibility, setModalVisibility] = useState(false);\r\n\r\n // check if collector is disabled\r\n useEffect(() => {\r\n if (!data) return;\r\n\r\n let status = false;\r\n\r\n mandatoryFields.forEach((item) => {\r\n const castedKey = item as keyof FormState;\r\n\r\n if (!data[castedKey]) {\r\n status = true;\r\n }\r\n });\r\n\r\n setIsDisabled(status);\r\n }, [data]);\r\n\r\n const emit = useCallback((formData: FormState) => setData(formData), []);\r\n\r\n const onSubmit = () => {\r\n const model = formatSingleModel(data);\r\n\r\n if (selectedDiscountedRoute) {\r\n model.discountBackloadId = selectedDiscountedRoute.id;\r\n }\r\n\r\n setLoading(true);\r\n cancellablePromise(calculateInlandOrder(model))\r\n .then((res) => {\r\n // save response orders(order details, available backloads)\r\n setOrders(res);\r\n setModalVisibility(true);\r\n })\r\n .finally(() => setLoading(false));\r\n };\r\n\r\n return (\r\n <>\r\n
\r\n \r\n\r\n
\r\n \r\n {t('Calculate')}\r\n \r\n
\r\n
\r\n\r\n {modalVisibility && (\r\n setModalVisibility(false)}\r\n />\r\n )}\r\n \r\n );\r\n}\r\n\r\nexport default Single;\r\n","import SingnleWrapper from './SingnleWrapper';\r\n\r\nexport default SingnleWrapper;\r\n","import { useState } from 'react';\r\nimport { DiscountedRoute } from 'shared/models/backload.models';\r\nimport styles from './Calculator.module.scss';\r\nimport Header from './Header';\r\nimport MultiWrapper from './MultiWrapper';\r\nimport SingnleWrapper from './SingnleWrapper';\r\n\r\ninterface IProps {\r\n selectedDiscountedRoute: DiscountedRoute;\r\n clearSelectedDiscountedRoute: () => void;\r\n toggleDiscountedRoutes: (status: boolean) => void;\r\n}\r\n\r\nfunction Calculator({\r\n selectedDiscountedRoute,\r\n clearSelectedDiscountedRoute,\r\n toggleDiscountedRoutes,\r\n}: IProps) {\r\n const [isMulti, setIsMulti] = useState(false);\r\n\r\n const toggleIsMulti = (status: boolean) => {\r\n setIsMulti(status);\r\n toggleDiscountedRoutes(!status);\r\n };\r\n\r\n return (\r\n
\r\n
\r\n\r\n {isMulti ? (\r\n \r\n ) : (\r\n \r\n )}\r\n
\r\n );\r\n}\r\n\r\nexport default Calculator;\r\n","import Calculator from './Calculator';\r\n\r\nexport default Calculator;\r\n","// extracted by mini-css-extract-plugin\nexport default {\"dots\":\"CarouselDots_dots__VI54n\",\"active\":\"CarouselDots_active__8JSsH\"};","import styles from './CarouselDots.module.scss';\r\n\r\ninterface IProps {\r\n index: number;\r\n current: number;\r\n activate: () => void;\r\n}\r\n\r\nfunction Each({ index, current, activate }: IProps) {\r\n let active = false;\r\n\r\n if (index === 0 && current === null) {\r\n active = true;\r\n } else if (index === current) {\r\n active = true;\r\n }\r\n\r\n return (\r\n
  • \r\n
  • \r\n );\r\n}\r\n\r\nexport default Each;\r\n","import { useDispatch, useSelector } from 'react-redux';\r\nimport { homeCarouselSelector, setActive } from 'shared/store/home-carousel';\r\nimport styles from './CarouselDots.module.scss';\r\nimport Each from './Each';\r\n\r\nconst dots = [0, 1, 2];\r\n\r\nfunction CarouselDots() {\r\n const dispatch = useDispatch();\r\n const { active } = useSelector(homeCarouselSelector);\r\n\r\n return (\r\n
      \r\n {dots.map((i) => (\r\n dispatch(setActive(i))}\r\n />\r\n ))}\r\n
    \r\n );\r\n}\r\n\r\nexport default CarouselDots;\r\n","import CarouselDots from './CarouselDots';\r\n\r\nexport default CarouselDots;\r\n","// extracted by mini-css-extract-plugin\nexport default {\"wrapper\":\"CarouselHeadings_wrapper__KkDdX\"};","import { useEffect, useRef } from 'react';\r\nimport { useTranslation } from 'react-i18next';\r\nimport { useSelector } from 'react-redux';\r\nimport Slider from 'react-slick';\r\nimport { homeCarouselSelector } from 'shared/store/home-carousel';\r\nimport styles from './CarouselHeadings.module.scss';\r\n\r\nconst slides = [\r\n 'HomeCarousel.Title1',\r\n 'HomeCarousel.Title2',\r\n 'HomeCarousel.Title3',\r\n];\r\n\r\nfunction CarouselHeadings() {\r\n const { t } = useTranslation();\r\n const ref = useRef(null);\r\n const { active } = useSelector(homeCarouselSelector);\r\n\r\n const settings = {\r\n fade: true,\r\n arrows: false,\r\n draggable: false,\r\n };\r\n\r\n useEffect(() => {\r\n if (active !== null) {\r\n ref.current.slickGoTo(active);\r\n }\r\n }, [active]);\r\n\r\n return (\r\n \r\n {slides.map((title, i) => (\r\n

    \r\n {t(title)}\r\n

    \r\n ))}\r\n
    \r\n );\r\n}\r\n\r\nexport default CarouselHeadings;\r\n","import CarouselHeadings from './CarouselHeadings';\r\n\r\nexport default CarouselHeadings;\r\n","// extracted by mini-css-extract-plugin\nexport default {\"card\":\"DiscountedRoutes_card__jfQOx\",\"see-more\":\"DiscountedRoutes_see-more__S8WLy\"};","// extracted by mini-css-extract-plugin\nexport default {\"table\":\"List_table__yi8Io\",\"row\":\"List_row__3q1Ya\",\"thr\":\"List_thr__SSF1U\",\"tr\":\"List_tr__1KGxM\",\"th\":\"List_th__k7QSy\",\"td\":\"List_td__sr+UY\",\"discount\":\"List_discount__fmofB\",\"action\":\"List_action__0VL1M\",\"action-filler\":\"List_action-filler__Va6NY\",\"active\":\"List_active__L3BcG\"};","import { useTranslation } from 'react-i18next';\r\nimport { DiscountedRoute } from 'shared/models/backload.models';\r\nimport styles from './List.module.scss';\r\n\r\ninterface IProps {\r\n routes: DiscountedRoute[];\r\n selectedRoute: DiscountedRoute;\r\n onRouteSelect: (route: DiscountedRoute) => void;\r\n}\r\n\r\nfunction List({ routes, selectedRoute, onRouteSelect }: IProps) {\r\n const { t } = useTranslation();\r\n\r\n return (\r\n
    \r\n
    \r\n
    \r\n
    {t('From')}
    \r\n
    {t('Container')}
    \r\n
    {t('MaritimeLine')}
    \r\n
    {t('Discount')}
    \r\n
    \r\n
    \r\n
    \r\n\r\n {routes.map((item) => (\r\n onRouteSelect(item)}\r\n >\r\n
    \r\n
    {item.fromCityName}
    \r\n
    {item.containerSizeType}
    \r\n
    {item.maritimeLineType}
    \r\n
    \r\n {item.discountPercent ? `-${item.discountPercent}%` : null}\r\n
    \r\n
    \r\n
    \r\n {t('Choose')}\r\n
    \r\n
    \r\n ))}\r\n
    \r\n );\r\n}\r\n\r\nexport default List;\r\n","import List from './List';\r\n\r\nexport default List;\r\n","import { UilTimes } from '@iconscout/react-unicons';\r\nimport { Modal } from 'react-bootstrap';\r\nimport { useTranslation } from 'react-i18next';\r\nimport { DiscountedRoute } from 'shared/models/backload.models';\r\nimport List from './List';\r\n\r\ninterface IProps {\r\n show: boolean;\r\n initialRoutes: DiscountedRoute[];\r\n selectedRoute: DiscountedRoute;\r\n onRouteSelect: (route: DiscountedRoute) => void;\r\n close: () => void;\r\n}\r\n\r\nfunction SuggestionsModal({\r\n show,\r\n initialRoutes,\r\n selectedRoute,\r\n onRouteSelect,\r\n close,\r\n}: IProps) {\r\n const { t } = useTranslation();\r\n\r\n const onSelect = (item: DiscountedRoute) => {\r\n close();\r\n onRouteSelect(item);\r\n };\r\n\r\n return (\r\n \r\n
    \r\n
    \r\n close()}\r\n >\r\n \r\n \r\n
    \r\n\r\n

    {t('DiscountedRoutes')}

    \r\n
    \r\n\r\n
    \r\n \r\n
    \r\n \r\n );\r\n}\r\n\r\nexport default SuggestionsModal;\r\n","import config from 'config';\r\nimport { useEffect, useState } from 'react';\r\nimport { useTranslation } from 'react-i18next';\r\nimport { useSelector } from 'react-redux';\r\nimport { Loader } from 'shared/components';\r\nimport useCancelablePromise from 'shared/hooks/cancelable-promise.hook';\r\nimport {\r\n DiscountedRoute,\r\n DiscountedRoutesList,\r\n} from 'shared/models/backload.models';\r\nimport { getDiscountedRoutes } from 'shared/services/backloads/backloads.service';\r\nimport { appSelector } from 'shared/store/app';\r\nimport styles from './DiscountedRoutes.module.scss';\r\nimport List from './List';\r\nimport Modal from './Modal';\r\n\r\nconst {\r\n discountedRouteSuggestionsPerPage,\r\n allDiscountedRouteSuggestionsCount,\r\n} = config;\r\n\r\ninterface IProps {\r\n selected: DiscountedRoute;\r\n onSelect: (Route: DiscountedRoute) => void;\r\n}\r\n\r\nfunction DiscountedRoutes({ selected, onSelect }: IProps) {\r\n const { t } = useTranslation();\r\n const { cancellablePromise } = useCancelablePromise();\r\n const { language } = useSelector(appSelector);\r\n\r\n const [baseRoutes, setBaseRoutes] = useState();\r\n const [allRoutes, setAllRoutes] = useState();\r\n const [modalVisibility, setModalVisibilility] = useState(false);\r\n const [loading, setLoading] = useState(false);\r\n\r\n // get initial discounted routes\r\n useEffect(() => {\r\n setLoading(true);\r\n cancellablePromise(\r\n getDiscountedRoutes({ perPage: discountedRouteSuggestionsPerPage })\r\n )\r\n .then(({ items, totalCount }) => {\r\n if (items.length) {\r\n setBaseRoutes({ items, totalCount });\r\n }\r\n })\r\n .finally(() => setLoading(false));\r\n }, [language, cancellablePromise]);\r\n\r\n // get all discounted routes\r\n useEffect(() => {\r\n if (modalVisibility && !allRoutes) {\r\n setLoading(true);\r\n cancellablePromise(\r\n getDiscountedRoutes({ perPage: allDiscountedRouteSuggestionsCount })\r\n )\r\n .then(({ items }) => {\r\n if (items.length) {\r\n setAllRoutes(items);\r\n }\r\n })\r\n .finally(() => setLoading(false));\r\n }\r\n }, [modalVisibility, allRoutes, cancellablePromise]);\r\n\r\n if (!baseRoutes) return null;\r\n\r\n return (\r\n <>\r\n \r\n
    \r\n

    {t('DiscountedRoutes')}

    \r\n\r\n {baseRoutes.totalCount > discountedRouteSuggestionsPerPage ? (\r\n setModalVisibilility(true)}\r\n >\r\n {t('SeeAll')}\r\n \r\n ) : (\r\n
    \r\n )}\r\n
    \r\n\r\n \r\n\r\n {loading && }\r\n
    \r\n\r\n setModalVisibilility(false)}\r\n initialRoutes={allRoutes}\r\n selectedRoute={selected}\r\n onRouteSelect={onSelect}\r\n />\r\n \r\n );\r\n}\r\n\r\nexport default DiscountedRoutes;\r\n","import DiscountedRoutes from './DiscountedRoutes';\r\n\r\nexport default DiscountedRoutes;\r\n","// extracted by mini-css-extract-plugin\nexport default {\"main\":\"Home_main__2U0oF\",\"inner\":\"Home_inner__cfr54\"};","import { useCallback, useState } from 'react';\r\nimport { DiscountedRoute } from 'shared/models/backload.models';\r\nimport {\r\n Calculator,\r\n CarouselDots,\r\n CarouselHeadings,\r\n DiscountedRoutes,\r\n} from '../components';\r\nimport styles from './Home.module.scss';\r\n\r\nfunction Home() {\r\n const [selectedDiscountedRoute, setSelectedDiscountedRoute] =\r\n useState();\r\n const [isDiscountedRoutesVisible, setIsDiscountedRoutesVisible] =\r\n useState(true);\r\n\r\n const onDiscountedRouteSelect = (route: DiscountedRoute) => {\r\n setSelectedDiscountedRoute(\r\n route.id === selectedDiscountedRoute?.id ? null : route\r\n );\r\n };\r\n\r\n const toggleDiscountedRoutes = useCallback((status: boolean) => {\r\n setIsDiscountedRoutesVisible(status);\r\n\r\n if (!status) {\r\n setSelectedDiscountedRoute(null);\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 setSelectedDiscountedRoute(null)}\r\n toggleDiscountedRoutes={toggleDiscountedRoutes}\r\n />\r\n\r\n {isDiscountedRoutesVisible && (\r\n \r\n )}\r\n
    \r\n
    \r\n );\r\n}\r\n\r\nexport default Home;\r\n","import { Navigate, Route, Routes } from 'react-router-dom';\r\nimport Home from './pages/Home';\r\n\r\nfunction HomeRouting() {\r\n return (\r\n \r\n } />\r\n } />\r\n \r\n );\r\n}\r\n\r\nexport default HomeRouting;\r\n","// extracted by mini-css-extract-plugin\nexport default {\"wrapper\":\"HomeLayout_wrapper__xhfqU\",\"wallpaper\":\"HomeLayout_wallpaper__gh77z\",\"mask\":\"HomeLayout_mask__gmnE1\",\"content\":\"HomeLayout_content__8eKc0\"};","import { HomeCarousel, HomeFooter, HomeHeader } from 'core/components/layout';\r\nimport HomeRouting from 'features/home/home.routing';\r\nimport { CustomerChat } from 'shared/components';\r\nimport styles from './HomeLayout.module.scss';\r\n\r\nfunction HomeLayout() {\r\n const isCustomerChatVisible =\r\n process.env.NODE_ENV && process.env.NODE_ENV === 'production';\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 {isCustomerChatVisible && }\r\n
    \r\n );\r\n}\r\n\r\nexport default HomeLayout;\r\n","import HomeLayout from './HomeLayout';\r\n\r\nexport default HomeLayout;\r\n","import axios from 'axios';\r\nimport { discountedRouteListSchema } from 'shared/models/backload.models';\r\nimport { APIRequestBaseParams } from 'shared/shared.typings';\r\nimport { Map } from 'shared/utils/object-mapper';\r\nimport { buildRequestParamsModel } from 'shared/utils/service.utils';\r\nimport { IDiscountedRouteModel, IDiscountedRoutes } from './backloads.typings';\r\n\r\nconst apiURL = process.env.REACT_APP_API_URL;\r\nconst backloadsURL = `${apiURL}/Backload`;\r\n\r\nexport const checkAvailableToBackload = (orderId: number) =>\r\n axios.post(\r\n `${backloadsURL}/CheckAvailableBackload`,\r\n {},\r\n { params: { orderId } }\r\n );\r\n\r\nexport const uncheckAvailableToBackload = (orderId: number) =>\r\n axios.delete(`${backloadsURL}/UncheckAvailableBackload`, {\r\n params: { orderId },\r\n });\r\n\r\nexport const createDiscountedRoute = (model: IDiscountedRouteModel) =>\r\n axios.post(`${backloadsURL}/AddDiscountedBackload`, model);\r\n\r\nexport const getDiscountedRoutes = async (baseParams: APIRequestBaseParams) => {\r\n const params = buildRequestParamsModel({\r\n params: baseParams,\r\n transformToString: true,\r\n });\r\n\r\n const { data } = await axios.get(\r\n `${backloadsURL}/GetDiscountedBackloads?${params}`\r\n );\r\n return Map(data, discountedRouteListSchema);\r\n};\r\n\r\nexport const deleteDiscountedRoute = (id: number) =>\r\n axios.delete(`${backloadsURL}/DeleteDiscountedBackload`, { params: { id } });\r\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst UilTruck = (props) => {\n const { color, size, ...otherProps } = props\n return React.createElement('svg', {\n xmlns: 'http://www.w3.org/2000/svg',\n width: size,\n height: size,\n viewBox: '0 0 24 24',\n fill: color,\n ...otherProps\n }, React.createElement('path', {\n d: 'M1,12.5v5a1,1,0,0,0,1,1H3a3,3,0,0,0,6,0h6a3,3,0,0,0,6,0h1a1,1,0,0,0,1-1V5.5a3,3,0,0,0-3-3H11a3,3,0,0,0-3,3v2H6A3,3,0,0,0,3.6,8.7L1.2,11.9a.61.61,0,0,0-.07.14l-.06.11A1,1,0,0,0,1,12.5Zm16,6a1,1,0,1,1,1,1A1,1,0,0,1,17,18.5Zm-7-13a1,1,0,0,1,1-1h9a1,1,0,0,1,1,1v11h-.78a3,3,0,0,0-4.44,0H10Zm-2,6H4L5.2,9.9A1,1,0,0,1,6,9.5H8Zm-3,7a1,1,0,1,1,1,1A1,1,0,0,1,5,18.5Zm-2-5H8v2.78a3,3,0,0,0-4.22.22H3Z'\n }));\n};\n\nUilTruck.propTypes = {\n color: PropTypes.string,\n size: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n};\n\nUilTruck.defaultProps = {\n color: 'currentColor',\n size: '24',\n};\n\nexport default UilTruck;"],"names":["onChange","t","useTranslation","OverlayTrigger","placement","overlay","props","Tooltip","className","styles","popperConfig","modifiers","name","options","offset","size","CalculatorStep","setIsMulti","calculationResponseShema","Builder","id","isRoundTrip","isParent","code","containerSizeType","discountPercent","from","to","maritimeLineTypeName","maritimeLineTypeId","orderEndDate","orderStartDate","price","weightFrom","weightTo","apiURL","process","calculatorURL","inlandOrderUrl","auctionsURL","calculateInlandOrder","model","axios","data","map","item","Map","m","backloadType","backloadTypeEnum","containerSizeTypesName","fromName","toName","maritimeLineType","calculateMultiInlandOrders","addAuction","mandatoryFields","From","To","ContainerType","StartDate","Weight","formatBaseModel","weight","containerSizeTypeid","containerType","formatDateToISO","startDate","isPort","fromPortId","toCityId","fromCityId","toPortId","maritimeLine","UilMapMarker","color","otherProps","React","xmlns","width","height","viewBox","fill","d","propTypes","PropTypes","defaultProps","value","type","readOnly","UilCalender","ref","active","selectedValue","activate","clear","onClick","placeholder","formatDateToOutput","onClose","node","useRef","useState","visible","setVisible","setStartDate","minDate","setMinDate","useEffect","Date","setDate","getDate","config","handleClose","useCallback","useOnClickOutside","Dropdown","show","as","Toggle","calendarClassName","selected","Array","calendarStartDay","fixedHeight","inline","matchesLG","useMediaQuery","breakPoint","close","e","current","contains","target","UilMapPin","inputRef","searchTerm","setSearchTerm","UilAnchor","reset","cancellablePromise","useCancelablePromise","language","useSelector","appSelector","setData","debouncedSearchTerm","useDebounced","loading","setLoading","focus","getPorts","search","then","res","finally","BackloadToStepToggle","length","i","BackloadTo","onSelect","autoComplete","ActionType","FormStep","deactivate","params","containerTypeId","getWeightRanges","fromData","toData","containerTypeData","align","backloadInitialState","backloadStepReducer","state","action","payload","Clear","fullfill","activeField","setActiveField","useReducer","backload","setBackload","setSelected","label","windowListener","window","addEventListener","removeEventListener","hop","keys","Object","key","charAt","toLowerCase","slice","isAllStepFilled","indexOf","nextStepKey","activateNextStep","BackloadStepToggle","Base","toggleClass","icon","onTermChange","disabled","endpoint","DropdownItems","EachStepToggle","term","UilBuilding","getCities","weightRanges","formInitState","backloadTo","backloadStartDate","backloadWeight","formReducer","selectedDiscountedRoute","tempMaritimeLine","tempContainerType","fromCityName","containerSizeTypeId","orderId","selectedDiscountedRouteKeyMap","MaritimeLine","isMulti","isDefault","preset","parent","emit","clearSelectedDiscountedRoute","toggleDiscountedRoutes","isPresetSet","canSetParent","values","setValues","setActive","canHop","isStepDisabled","isBackloadVisible","step","routeProp","mapKey","forEach","castedKey","detectSelectedRoutePropChange","getPortsAndCities","FormItem","getContainerSizes","ContainerTypeItem","getMaritimeLineTypes","MaritimeLineItem","Backload","multiOrdersQuantity","ordersLenght","onAdd","amount","setAmount","maxAmount","max","val","title","children","eventKey","open","setOpen","decoratedOnClick","useAccordionButton","details","Accordion","orders","dispatch","useAppDispatch","navigate","useNavigate","user","authSelector","isVendor","hasPermission","usePermission","UserRole","commentForVendor","setCommentForVendor","isCommentValid","useMemo","Modal","centered","onHide","priviewStyles","defaultActiveKey","toString","handleChange","isInvalid","errorMSG","count","reduce","total","auctionItems","push","calculatorDataId","createAlert","message","variant","time","catch","reducer","stateSlice","stateSlices","filter","openDialog","useDialog","setOrders","collectorData","setCollectorData","isCollectorDisabled","setIsCollectorDisabled","isDisabled","setIsDisabled","dialogShow","setDialogShow","status","min","dataLoop","collect","update","remove","latestId","models","formatedModel","formatMultiModel","toggle","roundTrip","selectedAvailableBackload","Tab","Math","round","setDetails","setRoundTrip","availableBackloads","setAvailableBackloads","setSelectedAvailableBackload","Details","activeTab","setActiveTab","backloadModel","availableBackloadId","discountedBackloadId","createBackloadOrder","auctionItemModel","roundTripModel","toggleBackload","modalVisibility","setModalVisibility","formData","isBackload","backLoadStartDate","backLoadWeightFrom","backLoadWeightTo","backLoadToPortId","backloadFromCityId","backLoadFromPortId","formatSingleModel","discountBackloadId","fluid","index","dots","useDispatch","homeCarouselSelector","slides","slickGoTo","fade","arrows","draggable","routes","selectedRoute","onRouteSelect","initialRoutes","contentClassName","discountedRouteSuggestionsPerPage","allDiscountedRouteSuggestionsCount","baseRoutes","setBaseRoutes","allRoutes","setAllRoutes","setModalVisibilility","getDiscountedRoutes","perPage","items","totalCount","opacity","setSelectedDiscountedRoute","isDiscountedRoutesVisible","setIsDiscountedRoutesVisible","route","path","element","replace","backloadsURL","createDiscountedRoute","baseParams","buildRequestParamsModel","transformToString","discountedRouteListSchema","deleteDiscountedRoute","UilTruck"],"sourceRoot":""}