{"version":3,"sources":["components/login/Login.css.js","components/login/Login.jsx","components/main/Main.css.js","components/main/MainWidget.jsx","components/rates/Rates.css.js","components/rates/Rates.jsx","components/suppliers/Suppliers.css.js","components/suppliers/SuppliersTable.jsx","components/suppliers/CataloguesTable.jsx","components/privateRoute/PrivateRoute.jsx","components/suppliers/Suppliers.jsx","components/hotelItemMatching/Suppliers.css.js","components/hotelItemMatching/UploadFileArea.jsx","components/hotelItemMatching/ProcessRunningIndicator.jsx","components/hotelItemMatching/HotelItemMatching.jsx","components/orders/Orders.css.js","helpers/formatDate.js","components/orders/UpdatedOrders.jsx","components/receivers/ReceiversModal.jsx","components/orders/OrderPage.jsx","components/invoice/Invoice.css.js","components/invoice/InvoiceTable.jsx","components/invoice/Invoice.jsx","components/invoice/Lines.jsx","components/invoice/SingleInvoice.jsx","components/suppliers/CatalugueProduct.jsx","components/orders/OrderLines.jsx","components/not-found/NotFound.jsx","components/orders/SingleOrder.jsx","components/main/SideBar.jsx","components/main/ToolBar.jsx","components/main/Main.jsx","App.js","stores/auth.js","stores/uistate.js","stores/rates.js","stores/suppliers.js","helpers/currencyMapper.js","stores/orders.js","stores/invoices.js","stores/receivers.js","stores/root.js","index.js"],"names":["form","css","mainDiv","mainGrid","textBlock","loginHeader","img","socialMedia","textCell","divInput","copyright","submitDiv","imgGrid","Login","inject","withRouter","observer","handleEmailChange","e","props","rootStore","authStore","setEmail","target","value","handlePasswordChange","setPassword","handleSubmitForm","preventDefault","login","then","response","currentUser","data","user","setToken","token","getCurrentUserOrg","history","replace","catch","error","msg","uiStateStore","showPopup","popupMessage","message","this","reset","popup","styles","Grid","container","Hidden","only","item","lg","md","sm","xs","href","rel","className","lgUp","direction","id","onChange","placeholder","type","onClick","React","PureComponent","exportAllButton","toolBar","toolbarButton","toolbarMenu","pageContent","tabContent","widget","widgetHeader","widgetCaption","widgetBody","clearfix","footer","sideBar","sidebarList","subMenu","listItem","listLabel","listIcon","subItem","subTitle","hiddenMenu","MainWidget","buttons","tableWrapper","divMain","paper","markup","flexCell","tableRows","select","Rates","state","selectedDate","formatDate","Date","toUTCString","dates","max","min","setDate","getDate","setSelectedDate","bind","onSave","onCancel","ratesStore","fetchRates","date","d","month","getMonth","day","year","getFullYear","length","join","event","setState","index","elem","rates","sale","rate","parseFloat","newRate","previewPositive","Math","abs","previewMarkup","previewRate","toFixed","pos","saveRates","Paper","Table","stickyHeader","TableHead","TableRow","TableCell","align","TableBody","map","key","name","TextField","inputProps","updateMarkup","margin","Select","color","MenuItem","proccesedRate","positive","Button","variant","tableHeader","supCell","nameIcon","searchButton","tablePanel","tableDiv","boolCell","el","BoolCellProvider","formatterComponent","editCell","EditCellProvider","CustomizedHeader","restProps","Row","CustomizedTable","CustomizedPanel","Container","SuppliersTable","supplierCell","to","suppliersStore","setCurrentSupplier","rows","proccessedSuppliers","columns","title","defaultCurrentPage","pageSize","for","func","tableComponent","defaultColumnWidths","columnName","width","resizingMode","rowComponent","containerComponent","CataloguesTable","nameCell","link","row","p_id","setCurrentSupplierCatalogue","currentSupplierCatalogues","PrivateRoute","Component","component","isAuthenticated","org","mustBePurchaser","rest","render","failed","redirectTo","is_a_purchaser","location","pathname","Fragment","Suppliers","searchString","search","lastLocation","currentSupplier","supplier_name","fetchSuppliers","currentUserOrg","fetchSupplierCatalogues","textfield","val","disabled","suppliers","onKeyDown","exact","path","withLastLocation","mytr","itemMatchingBackendUrl","process","UploadFileArea","selectedFile","undefined","isFilePicked","isLoading","availableFiles","url","fetch","method","result","json","available_files","console","handleCloseSucess","reason","matchingStartedSuccessfully","handleCloseError","matchingStartFailed","files","formData","FormData","log","append","body","matchingError","JSON","stringify","style","height","CircularProgress","size","Snackbar","open","onClose","autoHideDuration","Alert","severity","sx","ProcessRunningIndicator","componentDidMount","toUpdate","alert","requestProblem","lastJobStatus","localStorage","getItem","status","requestRunning","is_request_running","requestSuccessful","did_request_fail","finally","setItem","handleClose","alertSeverity","isRunning","wasSuccessful","isRunningText","wasSuccessfulText","renderNormalResult","HotelItemMatching","flexBody","flexColumn","columnItem","toolbar","clearButton","fields","dateCell","DateCellProvider","UpdatedOrdersTable","changeSelection","getReport","setCurrentPage","prevVal","param","is_a_supplier","ordersStore","ordersTablePage","fetchUpdatedOrders","reaction","preferredRate","recalculateOrders","forEach","ind","includes","updatedIdsForReport","push","updatedOrders","order","filter","all","getUpdatedReport","orderCell","generatePrint","spinner","exportButton","orderLinkCell","setCurrentOrder","currentPage","onCurrentPageChange","totalCount","ordersCount","onSelectionChange","showSelectAll","ReceiversModal","handleOpen","receiversStore","isModalOpen","errorText","receiverEmail","addReceiver","match","fetchReceiver","receivers","modal","modalReceiverItem","modalReceiverBlock","modalTitle","modalInput","modalPanel","Modal","aria-labelledby","label","receiver","email","splice","removeReceiver","OrderPage","sentFrom","sentTo","deliveryFrom","deliveryTo","searchInput","createRef","clear","current","children","MuiPickersUtilsProvider","utils","DateFnsUtils","ref","DatePicker","disableToolbar","format","UpdatedOrders","totalBar","saveLine","cCell","checkboxes","statusBlock","sortBlock","InvoiceTable","invoicesStore","invoicesTablePage","fetchInvoices","idsForReport","invoices","invoiceCell","encodeURIComponent","setCurrentInvoice","invoicesCount","InvoicePage","statuses","handleChange","checkedStatuses","indexOf","invoicesAcsSort","ListItemText","primary","FormControlLabel","control","Checkbox","checked","Lines","activeInput","activeName","checker","turn","commitChanges","editChanges","saveLines","fetchCurrentInvoiceLines","currentInvoice","number","changed","lines","property","weight","test","recalculateLines","recalculateLines_handling","tax_percentage_cda","tax_percentage","totalCell","onCommitChanges","onRowChangesChange","columnExtensions","editingEnabled","editorComponent","cellComponent","column","onValueChange","onBlur","Cell","SingleInvoice","taxError","shippingError","params","shipping","tax","errors","saveCurrentInvoice","invoice_date","delivery_type","supplier","currency","purchaser","delivery_terms","shipping_amount","shipping_tax_amount","shipping_tax_percentage","total_freight","total_handling","net_amount","cda","vat","Tooltip","fontSize","showSubmit","CatalogueProduct","currentCatalogueProducts","OrderLines","fetchCurrentOrderLines","currentOrder","NotFound","SingleOrder","sent_date","purchaser_name","total_value","invoiced_value","SideBar","activeHidden","openSubMenu","displayHidden","isMenuTextVisible","activeMenu","menuLabels","onMouseEnter","onMouseLeave","submenu","ToolBar","onChangeMenuItemTextVisibility","logout","clearToken","full_name","aria-hidden","Main","changeRole","fetchAvailableRates","Invoice","App","AuthStore","values","password","Axios","post","config","res","Promise","reject","delete","observable","action","UiStateStore","window","innerWidth","RatesStore","bound","get","fetchRatesSuccess","fetchRatesError","sort","a","b","textA","toUpperCase","textB","promise","newRates","saveRatesSuccess","saveRatesError","SuppliersStore","fetchCatalogueProducts","fetchCatalogueProductsSuccess","fetchCatalogueProductsError","products","fetchSupplierCataloguesSuccess","fetchSupplierCataloguesError","fetchSuppliersSuccess","fetchSuppliersError","sup","edit","supplierNumber","supplier_number","supplierBNumber","preferredSupplier","enable","is_enabled","isBillable","purchaserPricePreferred","discountRate","emailAddress","punchoutEnabled","defaultDepartment","defaultAccount","defaultCategory","locationCode","invoicingContacts","formatMapped","contact","terms","promote","mapper","MVR","JPY","SGD","CNY","THB","VND","AUD","AED","LKR","INR","EUR","IDR","GBP","OrdersStore","query","currentOrderSuccess","currentOrderError","fetchCurrentOrderSuccess","fetchCurrentOrderError","sf","st","df","dt","skip","count","fetchOrdersSuccess","fetchOrdersError","orders","invoiced_value_favorite","total_value_favorite","ids","responseType","getReportSuccess","getReportError","URL","createObjectURL","Blob","document","createElement","utc","toJSON","slice","fileName","setAttribute","appendChild","click","remove","fetchUpdatedOrdersSuccess","fetchUpdatedOrdersError","invoiced_value_usd","total_value_usd","fetchAvailableRatesSuccess","fetchAvailableRatesError","cyrrencies","availableRates","cyrrency","full","fetchPreferredRate","generatePrintSuccess","generatePrintError","write","fetchPreferredRateSuccess","fetchPreferredRateError","setPreferredCurrencySuccess","setPreferredCurrencyError","InvoicesStore","invoice","currentInvoiceSuccess","currentInvoiceError","gross_amount_usd","gross_amount","total_tax_usd","total_tax","shipping_amount_usd","fetchCurrentInvoiceSuccess","fetchCurrentInvoiceError","line","quantity","propo","freight_cost","isNaN","isFinite","line_total_sum","line_total","handling_cost","fetchInvoicesSuccess","fetchInvoicesError","total_tax_sum","total_tax_sum_usd","saveCurrentInvoiceSuccess","saveCurrentInvoiceError","saveLinesSuccess","saveLinesError","ReceiversStore","fetchReceiverSuccess","fetchReceiverError","addReceiverSuccess","addReceiverError","removeReceiverSuccess","removeReceiverError","RootStore","Cookie","appLoaded","headers","Accept","Authorization","getCurrentUser","set","getUserSuccess","getUserError","getCurrentUserOrgSuccess","getCurrentUserOrgError","decorate","setAppLoaded","store","ReactDOM","getElementById"],"mappings":"qgCAEMA,GAAOC,aAAH,qHAKJC,GAAUD,aAAH,8HAOPE,GAAWF,aAAH,6CAGRG,GAAYH,aAAH,iDAGTI,GAAcJ,aAAH,iDAGXK,GAAML,aAAH,6dAkBHM,GAAcN,aAAH,0dAwBXO,GAAWP,aAAH,wfAqBRQ,GAAWR,aAAH,umBAwBRS,GAAYT,aAAH,iMAUTU,GAAYV,aAAH,6TAeTW,GAAUX,aAAH,2JC5HPY,I,EAFLC,aAAO,aADPC,a,MAEAC,a,iNAMCC,kBAAoB,SAACC,GAAD,OAClB,EAAKC,MAAMC,UAAUC,UAAUC,SAASJ,EAAEK,OAAOC,Q,EAEnDC,qBAAuB,SAACP,GAAD,OACrB,EAAKC,MAAMC,UAAUC,UAAUK,YAAYR,EAAEK,OAAOC,Q,EAEtDG,iBAAmB,SAACT,GAClBA,EAAEU,iBACF,EAAKT,MAAMC,UAAUC,UAClBQ,QACAC,MAAK,SAACC,GACL,EAAKZ,MAAMC,UAAUY,YAAcD,EAASE,KAAKC,KACjD,EAAKf,MAAMC,UAAUe,SAASJ,EAASE,KAAKG,OAC5C,EAAKjB,MAAMC,UAAUiB,oBACrB,EAAKlB,MAAMmB,QAAQC,QAAQ,oBAE5BC,OAAM,SAACC,EAAOC,GACb,EAAKvB,MAAMC,UAAUuB,aAAaC,WAAY,EAC9C,EAAKzB,MAAMC,UAAUuB,aAAaE,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gBACP8S,QAAS,CACP,CAAEpV,KAAM,gBAAiBoD,KAAM,iCAIrC,CACE,CACEd,MAAO,kBACP8S,QAAS,CAAC,CAAEpV,KAAM,QAASoD,KAAM,iBAEnC,CACEd,MAAO,iBACP8S,QAAS,CAAC,CAAEpV,KAAM,UAAWoD,KAAM,kBAErC,CACEd,MAAO,iBACP8S,QAAS,CAAC,CAAEpV,KAAM,gBAAiBoD,KAAM,oBAE3C,CACEd,MAAO,iBACP8S,QAAS,CAAC,CAAEpV,KAAM,YAAaoD,KAAM,qBAEvC,CACEd,MAAO,oBACP8S,QAAS,CAAC,CAAEpV,KAAM,kBAAmBoD,KAAM,qBAG/ChK,KAAK0L,eAAewF,eACtBlR,KAAK6I,eAAe8C,4B,oCAIxB,SAAuB3M,GACrBmO,QAAQS,IAAI5O,O,KAehB0oB,oBAASZ,GAAW,CAClBE,UAAW1J,cACX9S,gBAAiB8S,cACjBre,YAAaqe,cACb5R,eAAgB4R,cAChB8J,eAAgB7J,UAChB+J,eAAgB/J,UAAOK,MACvB2J,aAAchK,UAAOK,MACrBte,kBAAmBie,UACnBiK,yBAA0BjK,UAAOK,MACjC6J,uBAAwBlK,UAAOK,MAC/Bxe,SAAUme,UACVnB,WAAYmB,UACZoK,aAAcpK,Y,WChJVqK,GAAQ,CACZvpB,UAAW,IAAIyoB,IAGjBe,KAASjd,OACP,mBAAC,KAAagd,GACZ,mBAAC,GAAD,OAEF7E,SAAS+E,eAAe,W","file":"static/js/main.f3e14f80.chunk.js","sourcesContent":["import { css } from '@emotion/core';\n\nconst form = css`\n margin-top: 56px;\n margin-left: 20px !important;\n margin-right: 20px !important;\n`;\nconst mainDiv = css`\n padding: 20px 0;\n @media (min-width: 1280px) {\n margin-top: 128px;\n }\n width: 100%;\n`;\nconst mainGrid = css`\n width: 100%;\n`;\nconst textBlock = css`\n font-size: 14px;\n`;\nconst loginHeader = css`\n font-size: 24px;\n`;\nconst img = css`\n padding-left: 15px;\n width: 300px;\n margin: auto;\n height: 80px;\n background: url(https://d3szvx4ci3puhy.cloudfront.net/assets/katana/PurchasePlus-RGB-H-342639c33611fca5d7829b0433052cf628508758dbf70b179c8c88de8966844a.png)\n no-repeat center;\n margin-bottom: 2rem;\n @media (min-width: 992px) {\n margin-top: 128px;\n }\n @media (min-width: 768px) {\n margin-top: 0px;\n margin-left: 40px;\n margin-right: 20px;\n }\n`;\n\nconst socialMedia = css`\n display: flex;\n justify-content: center;\n border-bottom: 2px solid grey;\n margin-left: 40px;\n margin-right: 20px;\n @media (min-width: 768px) {\n margin-top: 20px;\n justify-content: flex-end;\n border-bottom: none;\n margin-left: 0px;\n margin-right: 0px;\n }\n div {\n display: inline-block;\n padding: 5px;\n width: 40px;\n border: none;\n height: 40px;\n a {\n color: #337ab7;\n }\n }\n`;\nconst textCell = css`\n padding-right: 20px;\n h2 {\n font-weight: 300 !important;\n font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;\n }\n p {\n margin-bottom: 5px;\n line-height: 22px;\n margin: 0 0 10px;\n }\n @media (min-width: 576px) {\n border-bottom: 2px solid grey;\n margin-left: 40px !important;\n margin-right: 20px !important;\n }\n @media (min-width: 1280px) {\n border-bottom: none;\n border-right: 2px solid grey;\n }\n`;\nconst divInput = css`\n margin-bottom: 15px;\n input {\n @media (min-width: 576px) {\n margin-left: 10px;\n }\n height: auto !important;\n border-radius: 0px;\n display: block;\n width: 95%;\n height: 34px;\n padding: 6px 12px;\n font-size: 14px;\n line-height: 1.428571429;\n color: #555555;\n background-color: #fff;\n background-image: none;\n border: 1px solid #ccc;\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;\n padding-right: 0px;\n margin-right: 0px;\n }\n`;\nconst copyright = css`\n color: #9c9c9c;\n text-align: right;\n padding-right: 10px;\n padding-bottom: 10px;\n position: absolute;\n bottom: 0;\n right: 0;\n margin-bottom: 10px;\n`;\nconst submitDiv = css`\n margin-left: 20px;\n float: right;\n button {\n height: 40px;\n width: 69px;\n background-color: #53a93f;\n color: #fff;\n box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);\n transition: all 0.15s ease;\n border-radius: 2px;\n border: none;\n cursor: pointer;\n }\n`;\nconst imgGrid = css`\n @media (min-width: 577px) and (max-width: 767px) {\n flex-basis: 100% !important;\n max-width: 100% !important;\n }\n`;\n\nexport {\n form,\n imgGrid,\n submitDiv,\n copyright,\n divInput,\n textCell,\n mainDiv,\n mainGrid,\n img,\n socialMedia,\n textBlock,\n loginHeader,\n};\n","import React from 'react';\nimport { withRouter } from 'react-router-dom';\nimport { inject, observer } from 'mobx-react';\nimport Hidden from '@material-ui/core/Hidden';\nimport Grid from '@material-ui/core/Grid';\n/** @jsx jsx */\nimport { css, jsx } from '@emotion/core';\nimport * as styles from './Login.css';\n@withRouter\n@inject('rootStore')\n@observer\nclass Login extends React.PureComponent {\n componentWillUnmount() {\n this.props.rootStore.authStore.reset();\n }\n\n handleEmailChange = (e) =>\n this.props.rootStore.authStore.setEmail(e.target.value);\n\n handlePasswordChange = (e) =>\n this.props.rootStore.authStore.setPassword(e.target.value);\n\n handleSubmitForm = (e) => {\n e.preventDefault();\n this.props.rootStore.authStore\n .login()\n .then((response) => {\n this.props.rootStore.currentUser = response.data.user;\n this.props.rootStore.setToken(response.data.token);\n this.props.rootStore.getCurrentUserOrg();\n this.props.history.replace('/home/welcome');\n })\n .catch((error, msg) => {\n this.props.rootStore.uiStateStore.showPopup = true;\n this.props.rootStore.uiStateStore.popupMessage = error.message;\n });\n };\n\n render() {\n const popup = css`\n display: ${this.props.rootStore.uiStateStore.showPopup\n ? 'block'\n : 'none'};\n text-align: center;\n background-color: #f4b400;\n border-color: #f4b400;\n color: #fff;\n bottom: 0px;\n position: absolute;\n width: 100%;\n `;\n\n return (\n
\n \n \n \n \n \n \n \n \n
\n
\n \n \n \n \n
\n
\n \n \n \n \n \n \n
\n
\n \n \n \n \n \n \n
\n
\n \n \n \n \n \n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n \n \n \n \n \n \n

Powerful purchasing made simple.

\n

\n Buy the right products from the right supplier at the right\n price.\n

\n

\n Connect to all your suppliers online and find new ones. Find the\n product you are looking for. See available prices and pick the\n one that suits your budget. Make sure your whole team gets it\n right every time. See what you buy, who you buy it from and what\n it costs you at any time.\n

\n

\n To be one of the first to use this powerful new tool for your\n business email us at invite@marketboomer.com.\n

\n
\n
\n \n \n \n \n \n \n \n \n \n
\n
\n
\n \n
\n
\n \n
\n
\n
\n \n
\n
\n
\n
\n\n
\n
\n Version 124 Copyright © 1997-2019 Marketboomer Pty Ltd\n
\n
\n {this.props.rootStore.uiStateStore.popupMessage ===\n 'Please enter a valid email address'\n ? 'Please enter a valid email address'\n : this.props.rootStore.uiStateStore.popupMessage\n ? 'Invalid email or password.'\n : null}\n
\n
\n
\n );\n }\n}\n\nexport default Login;\n","import { css } from '@emotion/core';\n\nconst mainDiv = css`\n display: flex;\n height: 90%;\n & h1 {\n margin-top: 20px;\n margin-bottom: 10px;\n font-weight: 300 !important;\n font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;\n font-size: 32px;\n line-height: 1.1;\n color: inherit;\n }\n`;\nconst exportAllButton = css`\n position: fixed !important;\n bottom: 8px !important;\n z-index: 100 !important;\n left: 10px !important;\n`;\nconst toolBar = css`\n position: absolute;\n background-color: rgb(19, 35, 65);\n color: white;\n border-bottom: 3px solid #5cb85c;\n top: 0px;\n width: 100%;\n height: 50px;\n`;\nconst img = css`\n background-size: 239px 75px;\n background-position: center;\n display: inline-block;\n width: 211px;\n background-image: url(/logo.png);\n @media (max-width: 390px) {\n display: none;\n }\n`;\nconst toolbarButton = css`\n display: inline-block;\n float: right;\n label,\n button {\n outline: none;\n border: none;\n font-size: 14px !important;\n background-color: transparent !important;\n color: rgb(41, 101, 168);\n &:hover {\n color: #23527c;\n }\n @media (max-width: 560px) {\n display: none;\n }\n }\n i {\n color: #337ab7;\n margin-right: 5px;\n }\n height: 50px;\n margin: 1em;\n &.non-right {\n float: none;\n color: white !important;\n }\n &.custom {\n margin-top: 8px;\n }\n`;\nconst toolbarMenu = css`\n display: inline-block;\n height: 100%;\n float: left;\n display: flex;\n i {\n cursor: pointer;\n font-size: 18px;\n color: #fff;\n padding: 13px 5px;\n line-height: 22px;\n position: relative;\n\n @media (max-width: 390px) {\n margin-left: 30px;\n }\n }\n`;\n\nconst pageContent = css`\n display: inline-block;\n margin-left: 5px;\n height: 100%;\n margin-top: 60px;\n width: calc(100vw - 215px);\n &.hidden {\n width: 95% !important;\n }\n padding: 0;\n`;\n\nconst tabContent = css`\n padding: 0.5em;\n background-color: #f3f3f3;\n height: 97%;\n position: relative;\n`;\n\nconst widget = css`\n margin-botton: 3px 0 0.5em 0;\n padding: 0;\n height: 100%;\n box-shadow: none;\n`;\n\nconst widgetHeader = css`\n position: relative;\n background-image: linear-gradient(to right, #b8d8e8, #cde2ed);\n color: #555555;\n padding-left: 12px;\n text-align: right;\n &.bg-themeprimary {\n border: 0;\n }\n &.bg-themeprimary > .widget-caption {\n color: #ffffff;\n }\n\n & > .widget-caption {\n line-height: 34px;\n padding: 0;\n margin: 0;\n float: left;\n text-align: left;\n font-weight: 400 !important;\n font-size: 13px;\n }\n`;\n\nconst widgetCaption = css`\n widgetHeader & {\n line-height: 34px;\n padding: 0;\n margin: 0;\n float: left;\n text-align: left;\n font-weight: 400 !important;\n font-size: 13px;\n }\n`;\n\nconst widgetBody = css`\n background-image: linear-gradient(to bottom, #cde2ed, #f3f3f3);\n padding: 8px 8px 0 8px;\n height: 90%;\n`;\n\nconst clearfix = css`\n clear: both;\n &:before {\n content: ' ';\n display: table;\n }\n`;\nconst footer = css`\n text-align: center;\n height: 50px;\n background-color: rgb(29, 44, 74);\n bottom: 0px;\n position: absolute;\n width: 100%;\n`;\n\nconst sideBar = css`\n z-index: 1000;\n margin-top: 45px;\n margin-right: 5px;\n position: relative;\n width: 190px;\n &.hidden {\n width: 30px;\n }\n display: inline-block;\n`;\nconst sidebarList = css`\n padding: 0;\n list-style: none;\n margin-left: 5px;\n width: 100%;\n height: 90%;\n`;\nconst subMenu = css`\n z-index: 1000;\n background-color: #fbfbfb;\n box-shadow: inset 0 -4px 4px -2px rgba(0, 0, 0, 0.15);\n &:before {\n content: '';\n display: block;\n position: absolute;\n z-index: 1;\n left: 15px;\n top: 32px;\n bottom: 0;\n border-left: 1px solid #e2e2e2;\n }\n padding: 0;\n &.none {\n display: none;\n }\n`;\nconst listItem = css`\n display: block;\n padding: 0;\n margin: 0;\n border: 0;\n position: relative;\n width: 100%;\n a {\n display: inline-block;\n height: 100%;\n width: 100%;\n border-top: 1px solid white;\n border-bottom: 1px solid #e8e8e8;\n background-color: rgb(242, 242, 242);\n line-height: 30px;\n margin: 0;\n padding: 0;\n text-shadow: none !important;\n font-size: 12px;\n &:hover {\n background-color: white;\n line-height: 28px;\n border-left: 2px solid rgb(70, 156, 49);\n }\n &.active {\n border-left: 2px solid rgb(70, 156, 49);\n background-color: white;\n }\n }\n`;\nconst listLabel = css`\n &.hidden {\n display: none;\n }\n &.active {\n background: #fbfbfb;\n border-left: 1px solid #f3f3f3;\n z-index: 100;\n line-height: 30px;\n padding-left: 24px;\n display: block;\n width: 190px;\n margin-top: -29px;\n margin-left: 27px;\n border-bottom: 1px solid #f3f3f3;\n box-shadow: none;\n }\n`;\nconst listIcon = css`\n margin-right: 5px;\n display: inline-block;\n vertical-align: middle;\n min-width: 20px;\n text-align: center;\n font-size: 14px;\n font-weight: normal;\n font-style: normal;\n margin-top: -2px;\n &.hidden {\n display: none;\n }\n &.left {\n margin-top: 9px;\n float: right;\n transform: rotate(-90deg);\n }\n &.rotate {\n margin-top: 9px;\n float: right;\n transform: none;\n }\n`;\nconst subItem = css`\n display: block;\n padding: 0;\n margin: 0;\n border: 0;\n position: relative;\n width: 100%;\n a {\n text-decoration: none;\n color: black;\n }\n`;\nconst subTitle = css`\n padding-left: 35px !important;\n`;\nconst hiddenMenu = css`\n display: none;\n width: 190px;\n background: #fbfbfb;\n margin-top: -2px;\n margin-left: 29px;\n border-left: 1px solid #f3f3f3;\n line-height: 30px;\n a {\n line-height: 30px;\n padding-left: 24px;\n background: #fbfbfb;\n text-decoration: none;\n color: black;\n &:hover {\n background-color: white;\n padding-left: 22px;\n border-left: 2px solid rgb(70, 156, 49);\n }\n }\n\n &.active {\n display: block;\n position: absolute;\n }\n`;\n\nexport {\n widgetHeader,\n widgetCaption,\n widgetBody,\n clearfix,\n footer,\n sideBar,\n sidebarList,\n subMenu,\n listItem,\n listLabel,\n listIcon,\n subItem,\n subTitle,\n hiddenMenu,\n widget,\n tabContent,\n pageContent,\n toolbarMenu,\n toolbarButton,\n exportAllButton,\n img,\n toolBar,\n mainDiv,\n};\n","import React from 'react';\nimport { withRouter } from 'react-router-dom';\n\n/** @jsx jsx */\nimport * as styles from './Main.css';\nimport { css, jsx } from '@emotion/core';\n\n@withRouter\nclass MainWidget extends React.PureComponent {\n render() {\n return (\n
\n
\n \n Homepage\n \n
\n \n

Welcome to Purchase Plus

\n

\n You can find your navigation on the left hand side. If you\n navigation menu is empty please you can always email us at{' '}\n help@marketboomer.com.\n

\n
\n \n );\n }\n}\n\nexport default MainWidget;\n","import { css } from '@emotion/core';\nconst buttons = css`\n display: flex;\n justify-content: flex-end;\n padding: 10px;\n button {\n width: 150px;\n margin-right: 20px;\n }\n`;\nconst tableWrapper = css`\n height: 90%;\n overflow: auto;\n`;\nconst divMain = css`\n background-image: linear-gradient(to bottom, #cde2ed, #f3f3f3);\n padding: 8px 8px 0 8px;\n height: 95%;\n`;\nconst paper = css`\n height: 90%;\n`;\nconst markup = css`\n margin: 0 !important;\n margin-right: 5px !important;\n input {\n width: 50px;\n }\n`;\nconst flexCell = css`\n display: flex;\n justify-content: flex-end;\n`;\nconst tableRows = css`\n & tr:nth-of-type(odd) {\n background: white !important;\n }\n & tr:nth-of-type(even) {\n background: #f6f6f6 !important;\n }\n`;\nconst select = css`\n div {\n width: 70px !important;\n }\n`;\n\nexport {\n select,\n tableRows,\n flexCell,\n markup,\n paper,\n divMain,\n tableWrapper,\n buttons,\n};\n","import React from 'react';\nimport { withRouter } from 'react-router-dom';\nimport { inject, observer } from 'mobx-react';\nimport Table from '@material-ui/core/Table';\nimport TableBody from '@material-ui/core/TableBody';\nimport TableCell from '@material-ui/core/TableCell';\nimport TableHead from '@material-ui/core/TableHead';\nimport TableRow from '@material-ui/core/TableRow';\nimport Paper from '@material-ui/core/Paper';\n/** @jsx jsx */\nimport { css, jsx } from '@emotion/core';\nimport * as styles from './Rates.css';\nimport { TextField, Button, Select, MenuItem } from '@material-ui/core';\n\n@withRouter\n@inject('rootStore')\n@observer\nclass Rates extends React.PureComponent {\n constructor(props) {\n super(props);\n this.state = {\n selectedDate: this.formatDate(new Date().toUTCString()),\n };\n this.dates = {\n max: new Date(),\n min: new Date(new Date().setDate(new Date().getDate() - 90)),\n };\n this.setSelectedDate = this.setSelectedDate.bind(this);\n this.onSave = this.onSave.bind(this);\n this.onCancel = this.onCancel.bind(this);\n this.props.rootStore.ratesStore.fetchRates(\n this.formatDate(new Date().toUTCString())\n );\n }\n formatDate(date) {\n var d = new Date(date),\n month = '' + (d.getMonth() + 1),\n day = '' + d.getDate(),\n year = d.getFullYear();\n\n if (month.length < 2) month = '0' + month;\n if (day.length < 2) day = '0' + day;\n\n return [year, month, day].join('-');\n }\n setSelectedDate(event) {\n if (event.target.value) {\n this.setState({\n selectedDate: event.target.value,\n });\n this.props.rootStore.ratesStore.fetchRates(event.target.value);\n }\n }\n\n updateMarkup(event, index) {\n let elem = this.props.rootStore.ratesStore.rates[index];\n if (event.target.id === 'markup') {\n if (event.target.value < 100 && event.target.value > -1) {\n const sale = (+elem.rate * +event.target.value) / parseFloat(100);\n const newRate =\n (elem.previewPositive ? +Math.abs(sale) : -Math.abs(sale)) +\n +elem.rate;\n elem.previewMarkup = event.target.value;\n elem.previewRate = newRate.toFixed(6);\n }\n } else {\n const sale = (+elem.rate * elem.previewMarkup) / parseFloat(100);\n const pos = !elem.previewPositive;\n const newRate = (pos ? +Math.abs(sale) : -Math.abs(sale)) + +elem.rate;\n elem.previewPositive = pos;\n elem.previewRate = newRate.toFixed(6);\n }\n }\n onSave() {\n this.props.rootStore.ratesStore.saveRates(true).then(() => {\n this.props.rootStore.ratesStore.fetchRates(this.state.selectedDate);\n });\n }\n onCancel() {\n this.props.rootStore.ratesStore.fetchRates(this.state.selectedDate);\n }\n\n render() {\n return (\n
\n

Rates against USD

\n \n
\n \n \n \n Currency\n Today Rate\n Markup %\n Preview Rate\n Active Rate(and markup)\n \n \n \n {this.props.rootStore.ratesStore.rates.map((elem, index) => (\n \n {elem.name}\n {elem.rate}\n \n
\n {\n if (e.target.value < 100 && e.target.value > -1) {\n this.updateMarkup(e, index);\n } else if (e.target.value > 99) {\n e.target.value = 99;\n this.updateMarkup(e, index);\n } else if (e.target.value < 0) {\n e.target.value = 0;\n this.updateMarkup(e, index);\n }\n }}\n type=\"number\"\n margin=\"normal\"\n />\n this.updateMarkup(e, index)}\n >\n Positive\n Negative\n \n
\n
\n {elem.previewRate}\n \n \n {elem.proccesedRate}(\n {elem.positive ? elem.markup : '-' + elem.markup}%)\n \n \n
\n ))}\n
\n
\n
\n
\n this.onSave()}\n >\n Update rates\n \n \n
\n
\n
\n );\n }\n}\n\nexport default Rates;\n","import { css } from '@emotion/core';\nconst tableHeader = css`\n border-right: 1px solid #d0d0d0;\n color: #404040 !important;\n font: 400 13px/19px 'Open Sans', 'Helvetica Neue', helvetica, arial, verdana,\n sans-serif;\n outline: 0;\n background-color: #fff;\n white-space: normal !important;\n div {\n white-space: normal;\n }\n`;\nconst supCell = css`\n color: #337ab7;\n text-decoration: none;\n`;\nconst nameIcon = css`\n margin-right: 10px;\n`;\nconst buttons = css`\n display: flex;\n justify-content: flex-end;\n padding: 10px;\n background: #cde2ed;\n`;\nconst select = css`\n width: 190px;\n margin-top: 20px !important;\n margin-bottom: 20px !important;\n margin-right: 50px;\n min-width: 30% !important;\n background: white;\n`;\nconst searchButton = css`\n background: rgb(87, 181, 227);\n border: none;\n margin-top: 20px !important;\n margin-bottom: 20px !important;\n min-width: 10% !important;\n i {\n color: white;\n }\n`;\nconst mainDiv = css`\n height: 90%;\n`;\n\nconst tablePanel = css`\n justify-content: flex-start !important;\n`;\n\nconst tableDiv = css`\n background-image: linear-gradient(to bottom, #cde2ed, #f3f3f3);\n padding: 8px 8px 0 8px;\n height: 95%;\n div:first-of-type {\n height: 100% !important;\n }\n`;\n\nconst tableRows = css`\n & tbody tr:nth-of-type(odd) {\n background: white !important;\n }\n & tbody tr:nth-of-type(even) {\n background: #f6f6f6 !important;\n }\n`;\n\nexport {\n tableHeader,\n supCell,\n nameIcon,\n buttons,\n select,\n searchButton,\n mainDiv,\n tablePanel,\n tableDiv,\n tableRows,\n};\n","import React from 'react';\nimport { withRouter, Link } from 'react-router-dom';\nimport { inject, observer } from 'mobx-react';\nimport {\n Grid,\n Table,\n TableHeaderRow,\n TableColumnResizing,\n PagingPanel,\n VirtualTable,\n} from '@devexpress/dx-react-grid-material-ui';\nimport { PagingState, IntegratedPaging } from '@devexpress/dx-react-grid';\nimport { DataTypeProvider } from '@devexpress/dx-react-grid';\n/** @jsx jsx */\nimport { css, jsx } from '@emotion/core';\nimport * as styles from './Suppliers.css';\n\nconst boolCell = (el) => {\n return el.value ? (\n \n ) : (\n \n );\n};\n\nconst BoolCellProvider = (props) => (\n \n);\nconst editCell = () => ;\nconst EditCellProvider = (props) => (\n \n);\nconst CustomizedHeader = ({ ...restProps }) => (\n \n);\nconst CustomizedTable = ({ ...restProps }) => (\n \n);\n\nconst CustomizedPanel = ({ ...restProps }) => (\n \n);\n\n@withRouter\n@inject('rootStore')\n@observer\nclass SuppliersTable extends React.PureComponent {\n render() {\n const columns = [\n { name: 'supplierNumber', title: 'Supplier Number' },\n { name: 'supplierBNumber', title: 'Supplier Business Number' },\n { name: 'supplier', title: 'Supplier' },\n { name: 'preferredSupplier', title: 'Preferred Supplier' },\n { name: 'enable', title: 'Enable' },\n { name: 'isBillable', title: 'Is Billable' },\n { name: 'purchaserPricePreferred', title: 'Purchaser Price Preferred' },\n { name: 'discountRate', title: 'Discount Rate' },\n { name: 'emailAddress', title: 'Paperless Invoicing Email Address' },\n { name: 'punchoutEnabled', title: 'Punchout Enabled' },\n { name: 'defaultDepartment', title: 'Default Department' },\n { name: 'defaultAccount', title: 'Default Account' },\n { name: 'defaultCategory', title: 'Default Category' },\n { name: 'locationCode', title: 'Supplier Location Code' },\n {\n name: 'invoicingContacts',\n title: 'Supplier Paperless Invoicing Contacts',\n },\n { name: 'formatMapped', title: 'Invoice Format Mapped' },\n { name: 'contact', title: 'Supplier Contact' },\n { name: 'terms', title: 'Payment Terms' },\n { name: 'promote', title: 'Promote' },\n ];\n const columnWidths = [\n { columnName: 'supplierNumber', width: 120 },\n { columnName: 'supplierBNumber', width: 120 },\n { columnName: 'supplier', width: 240 },\n { columnName: 'preferredSupplier', width: 80 },\n { columnName: 'enable', width: 80 },\n { columnName: 'isBillable', width: 80 },\n { columnName: 'purchaserPricePreferred', width: 80 },\n { columnName: 'discountRate', width: 80 },\n { columnName: 'emailAddress', width: 120 },\n { columnName: 'punchoutEnabled', width: 80 },\n { columnName: 'defaultDepartment', width: 80 },\n { columnName: 'defaultAccount', width: 80 },\n { columnName: 'defaultCategory', width: 80 },\n { columnName: 'locationCode', width: 80 },\n {\n columnName: 'invoicingContacts',\n width: 80,\n },\n { columnName: 'formatMapped', width: 80 },\n { columnName: 'contact', width: 80 },\n { columnName: 'terms', width: 80 },\n { columnName: 'promote', width: 80 },\n ];\n\n const supplierCell = (el) => {\n return (\n \n this.props.rootStore.suppliersStore.setCurrentSupplier(el.value)\n }\n css={styles.supCell}\n >\n \n {el.value}\n \n );\n };\n\n const SupplierCellProvider = (props) => {\n return ;\n };\n return (\n
\n \n \n \n \n \n \n \n \n \n \n \n
\n );\n }\n}\n\nexport default SuppliersTable;\n","import React from 'react';\nimport { withRouter, Link } from 'react-router-dom';\nimport { inject, observer } from 'mobx-react';\nimport {\n Grid,\n Table,\n TableHeaderRow,\n TableColumnResizing,\n PagingPanel,\n VirtualTable,\n} from '@devexpress/dx-react-grid-material-ui';\nimport {\n PagingState,\n IntegratedPaging,\n DataTypeProvider,\n} from '@devexpress/dx-react-grid';\n/** @jsx jsx */\nimport { css, jsx } from '@emotion/core';\nimport * as styles from './Suppliers.css';\n\nconst CustomizedHeader = ({ ...restProps }) => (\n \n);\nconst CustomizedTable = ({ ...restProps }) => (\n \n);\n\nconst CustomizedPanel = ({ ...restProps }) => (\n \n);\n\n@withRouter\n@inject('rootStore')\n@observer\nclass CataloguesTable extends React.PureComponent {\n render() {\n const columns = [\n { name: 'title', title: 'Name' },\n { name: 'enabled', title: 'Enabled purchasers' },\n { name: 'updated_at', title: 'Updated at' },\n { name: 'buttons', title: ' ' },\n ];\n const columnWidths = [\n { columnName: 'title', width: 400 },\n { columnName: 'enabled', width: 420 },\n { columnName: 'updated_at', width: 120 },\n { columnName: 'buttons', width: 120 },\n ];\n\n const nameCell = (el) => {\n const link = `/home/${el.row.p_id}/catalogue`;\n return (\n \n this.props.rootStore.suppliersStore.setCurrentSupplierCatalogue(\n el.row.p_id\n )\n }\n >\n {el.value}\n \n );\n };\n\n const NameCellProvider = (props) => {\n return ;\n };\n return (\n
\n \n \n \n \n \n \n \n \n \n
\n );\n }\n}\n\nexport default CataloguesTable;\n","import { Route, Redirect } from 'react-router-dom';\nimport React from 'react';\n\nconst PrivateRoute = ({\n component: Component,\n currentUser,\n isAuthenticated,\n org,\n mustBePurchaser,\n ...rest\n}) => (\n {\n let failed = false;\n let redirectTo = '/login';\n if (isAuthenticated && mustBePurchaser && !org.is_a_purchaser) {\n redirectTo = '/home/welcome';\n failed = true;\n }\n if (props.location.pathname === '/home' && isAuthenticated) {\n return (\n \n );\n }\n if (props.location.pathname === '/' && isAuthenticated) {\n return (\n \n );\n }\n if (failed) {\n return (\n \n );\n }\n return isAuthenticated ? (\n \n \n \n ) : (\n \n );\n }}\n />\n);\n\nexport default PrivateRoute;\n","import React from 'react';\nimport { withRouter, Route, Switch } from 'react-router-dom';\nimport { inject, observer } from 'mobx-react';\nimport { Select, MenuItem, TextField } from '@material-ui/core';\n/** @jsx jsx */\nimport { css, jsx } from '@emotion/core';\nimport * as styles from './Suppliers.css';\nimport SuppliersTable from './SuppliersTable';\nimport CataloguesTable from './CataloguesTable';\nimport PrivateRoute from '../privateRoute/PrivateRoute';\nimport { withLastLocation } from 'react-router-last-location';\n@withRouter\n@inject('rootStore')\n@observer\nclass Suppliers extends React.PureComponent {\n constructor(props) {\n super(props);\n this.state = {\n searchString: '',\n };\n this.search = this.search.bind(this);\n }\n componentDidUpdate() {\n if (\n this.props.lastLocation &&\n this.props.lastLocation.pathname !== '/home/suppliers' &&\n this.props.location.pathname === '/home/suppliers'\n ) {\n this.props.lastLocation.pathname = '/home/suppliers';\n this.props.rootStore.suppliersStore.currentSupplier = {\n supplier_name: 'none',\n };\n this.setState({\n searchString: '',\n });\n this.props.rootStore.suppliersStore.fetchSuppliers(\n this.props.rootStore.currentUserOrg.p_id\n );\n }\n if (\n this.props.lastLocation &&\n this.props.lastLocation.pathname === '/home/suppliers' &&\n this.props.location.pathname === '/home/suppliers/catalogues'\n ) {\n this.props.lastLocation.pathname = '/home/suppliers/catalogues';\n this.setState({\n searchString: '',\n });\n }\n }\n componentDidMount() {\n this.props.rootStore.suppliersStore.setCurrentSupplier({\n supplier_name: 'none',\n });\n this.props.rootStore.suppliersStore.fetchSuppliers(\n this.props.rootStore.currentUserOrg.p_id\n );\n }\n\n search() {\n if (this.props.location.pathname !== '/home/suppliers/catalogues') {\n this.props.rootStore.suppliersStore.fetchSuppliers(\n this.props.rootStore.currentUserOrg.p_id,\n this.state.searchString\n );\n } else {\n this.props.rootStore.suppliersStore.fetchSupplierCatalogues(\n this.state.searchString\n );\n }\n }\n render() {\n const textfield = css`\n width: 190px;\n margin-top: 20px !important;\n margin-bottom: 20px !important;\n margin-left: 50px;\n background: white;\n min-width: ${this.props.rootStore.currentUserOrg.is_a_purchaser\n ? '50% !important'\n : '90% !important'};\n `;\n return (\n
\n
\n {this.props.rootStore.currentUserOrg.is_a_purchaser ? (\n {\n this.props.rootStore.suppliersStore.setCurrentSupplier(\n val.target.value\n );\n this.props.history.replace('/home/suppliers/catalogues');\n }}\n >\n \n Select supplier\n \n {this.props.rootStore.suppliersStore.suppliers.length > 0\n ? this.props.rootStore.suppliersStore.suppliers.map((elem) => (\n \n {elem.supplier_name}\n \n ))\n : null}\n \n ) : null}\n {\n if (e.key === 'Enter') {\n this.search();\n }\n }}\n id=\"name\"\n placeholder=\"Name\"\n onChange={(el) => {\n this.setState({\n searchString: el.target.value,\n });\n }}\n />\n this.search()}\n css={styles.searchButton}\n name=\"button\"\n >\n \n \n
\n\n \n \n \n \n \n \n
\n );\n }\n}\n\nexport default withLastLocation(Suppliers);\n","import { css } from '@emotion/core';\nconst tableHeader = css`\n border-right: 1px solid #d0d0d0;\n color: #404040 !important;\n font: 400 13px/19px 'Open Sans', 'Helvetica Neue', helvetica, arial, verdana,\n sans-serif;\n outline: 0;\n background-color: #fff;\n white-space: normal !important;\n div {\n white-space: normal;\n }\n`;\nconst supCell = css`\n color: #337ab7;\n text-decoration: none;\n`;\nconst nameIcon = css`\n margin-right: 10px;\n`;\nconst buttons = css`\n display: flex;\n justify-content: flex-end;\n padding: 10px;\n background: #cde2ed;\n`;\nconst select = css`\n width: 190px;\n margin-top: 20px !important;\n margin-bottom: 20px !important;\n margin-right: 50px;\n min-width: 30% !important;\n background: white;\n`;\nconst searchButton = css`\n background: rgb(87, 181, 227);\n border: none;\n margin-top: 20px !important;\n margin-bottom: 20px !important;\n min-width: 10% !important;\n i {\n color: white;\n }\n`;\nconst mainDiv = css`\n height: 90%;\n`;\n\nconst tablePanel = css`\n justify-content: flex-start !important;\n`;\n\nconst tableDiv = css`\n background-image: linear-gradient(to bottom, #cde2ed, #f3f3f3);\n padding: 8px 8px 0 8px;\n height: 95%;\n div:first-of-type {\n height: 100% !important;\n }\n`;\n\nconst mytr = css`\n margin-right: 1%;\n`;\n\nconst tableRows = css`\n & tbody tr:nth-of-type(odd) {\n background: white !important;\n }\n & tbody tr:nth-of-type(even) {\n background: #f6f6f6 !important;\n }\n`;\n\nexport {\n tableHeader,\n supCell,\n nameIcon,\n buttons,\n select,\n searchButton,\n mainDiv,\n tablePanel,\n tableDiv,\n tableRows,\n mytr,\n};\n","import React from 'react';\nimport { withRouter, Link } from 'react-router-dom';\nimport { inject, observer } from 'mobx-react';\nimport {\n Grid,\n Table,\n TableHeaderRow,\n TableColumnResizing,\n PagingPanel,\n VirtualTable,\n} from '@devexpress/dx-react-grid-material-ui';\nimport { PagingState, IntegratedPaging } from '@devexpress/dx-react-grid';\nimport { DataTypeProvider } from '@devexpress/dx-react-grid';\nimport { Snackbar } from '@material-ui/core';\nimport { Alert } from '@material-ui/lab';\n\nconst itemMatchingBackendUrl =\n process.env.REACT_APP_HOTEL_ITEM_MATCHING_BACKEND;\n\n/** @jsx jsx */\nimport { css, jsx } from '@emotion/core';\nimport * as styles from './Suppliers.css';\nimport Button from '@material-ui/core/Button';\nconst boolCell = (el) => {\n return el.value ? (\n \n ) : (\n \n );\n};\n\nconst BoolCellProvider = (props) => (\n \n);\nconst editCell = () => ;\nconst EditCellProvider = (props) => (\n \n);\nconst CustomizedHeader = ({ ...restProps }) => (\n \n);\nconst CustomizedTable = ({ ...restProps }) => (\n \n);\n\nconst CustomizedPanel = ({ ...restProps }) => (\n \n);\n\n@withRouter\n@inject('rootStore')\n@observer\nclass UploadFileArea extends React.PureComponent {\n constructor(props) {\n super(props);\n this.state = {\n selectedFile: undefined,\n isFilePicked: false,\n isLoading: false,\n availableFiles: [],\n };\n }\n\n componentDidMount() {\n const url = `${itemMatchingBackendUrl}listOutputFiles`;\n fetch(url, {\n method: 'GET',\n })\n .then((result) => {\n result.json().then((data) => {\n this.setState({ availableFiles: data.available_files });\n });\n })\n .catch((error) => {\n console.error('Error:', error);\n });\n }\n\n render() {\n const columns = [\n { name: 'supplierNumber', title: 'Supplier Number' },\n { name: 'supplierBNumber', title: 'Supplier Business Number' },\n { name: 'supplier', title: 'Supplier' },\n { name: 'preferredSupplier', title: 'Preferred Supplier' },\n { name: 'enable', title: 'Enable' },\n { name: 'isBillable', title: 'Is Billable' },\n { name: 'purchaserPricePreferred', title: 'Purchaser Price Preferred' },\n { name: 'discountRate', title: 'Discount Rate' },\n { name: 'emailAddress', title: 'Paperless Invoicing Email Address' },\n { name: 'punchoutEnabled', title: 'Punchout Enabled' },\n { name: 'defaultDepartment', title: 'Default Department' },\n { name: 'defaultAccount', title: 'Default Account' },\n { name: 'defaultCategory', title: 'Default Category' },\n { name: 'locationCode', title: 'Supplier Location Code' },\n {\n name: 'invoicingContacts',\n title: 'Supplier Paperless Invoicing Contacts',\n },\n { name: 'formatMapped', title: 'Invoice Format Mapped' },\n { name: 'contact', title: 'Supplier Contact' },\n { name: 'terms', title: 'Payment Terms' },\n { name: 'promote', title: 'Promote' },\n ];\n const columnWidths = [\n { columnName: 'supplierNumber', width: 120 },\n { columnName: 'supplierBNumber', width: 120 },\n { columnName: 'supplier', width: 240 },\n { columnName: 'preferredSupplier', width: 80 },\n { columnName: 'enable', width: 80 },\n { columnName: 'isBillable', width: 80 },\n { columnName: 'purchaserPricePreferred', width: 80 },\n { columnName: 'discountRate', width: 80 },\n { columnName: 'emailAddress', width: 120 },\n { columnName: 'punchoutEnabled', width: 80 },\n { columnName: 'defaultDepartment', width: 80 },\n { columnName: 'defaultAccount', width: 80 },\n { columnName: 'defaultCategory', width: 80 },\n { columnName: 'locationCode', width: 80 },\n {\n columnName: 'invoicingContacts',\n width: 80,\n },\n { columnName: 'formatMapped', width: 80 },\n { columnName: 'contact', width: 80 },\n { columnName: 'terms', width: 80 },\n { columnName: 'promote', width: 80 },\n ];\n\n const supplierCell = (el) => {\n const link = `${itemMatchingBackendUrl}getOutputFile?name=`;\n return (\n \n \n {el.value}\n \n );\n };\n\n const changeHandler = (event) => {\n this.state.selectedFile = event.target.files[0];\n this.state.isFilePicked = true;\n };\n\n const renderRow = (value) => {\n const url = `${itemMatchingBackendUrl}getOutputFile?name=${value}`;\n return (\n \n \n \n {value}\n \n \n \n );\n };\n\n const handleSubmission = () => {\n const url = `${itemMatchingBackendUrl}downloadCatalogue`;\n\n const formData = new FormData();\n\n console.log(' this.state.selectedFile:', this.state.selectedFile);\n formData.append('File', this.state.selectedFile);\n\n fetch(url, {\n method: 'POST',\n body: formData,\n })\n .then((response) => response.json())\n .then((result) => {\n console.log('Success:', result);\n this.setState({\n matchingStartedSuccessfully: true,\n matchingStartFailed: false,\n matchingError: '',\n })\n })\n .catch((error) => {\n console.error('Error:', error);\n this.setState({\n matchingStartedSuccessfully: false,\n matchingStartFailed: true,\n matchingError: JSON.stringify(error),\n })\n });\n };\n\n\n const handleCloseSucess = (event, reason) => {\n if (reason === 'clickaway') {\n return;\n }\n this.setState({ matchingStartedSuccessfully: false });\n };\n\n const handleCloseError= (event, reason) => {\n if (reason === 'clickaway') {\n return;\n }\n this.setState({ matchingStartFailed: false });\n };\n\n return (\n
\n
\n \n \n \n \n \n \n {this.state.availableFiles &&\n this.state.availableFiles.map(renderRow)}\n
File Name
\n \n \n {this.state.isLoading ? (\n \n ) : (\n 'Start Matching'\n )}\n \n
\n \n \n Matching Process started\n \n \n \n \n Error when starting the process: {this.state.matchingError}\n \n \n
\n );\n }\n}\n\nexport default UploadFileArea;\n","import CircularProgress from '@material-ui/core/CircularProgress';\nimport React from 'react';\nimport { Snackbar } from '@material-ui/core';\nimport { Alert } from '@material-ui/lab';\nimport { inject, observer } from 'mobx-react';\nimport { withRouter } from 'react-router-dom';\n\nimport * as styles from './Suppliers.css';\n\nconst itemMatchingBackendUrl =\n process.env.REACT_APP_HOTEL_ITEM_MATCHING_BACKEND;\n\n// const boolCell = (el) => {\n// return el.value ? (\n// \n// ) : (\n// \n// );\n// };\n\n// const BoolCellProvider = (props) => (\n// \n// );\n\n// const EditCellProvider = (props) => (\n// \n// );\n\n// const CustomizedHeader = ({ ...restProps }) => (\n// \n// );\n\n// const CustomizedTable = ({ ...restProps }) => (\n// \n// );\n\n// const CustomizedPanel = ({ ...restProps }) => (\n// \n// );\n\n// const editCell = () => ;\n\n@withRouter\n@inject('rootStore')\n@observer\nclass ProcessRunningIndicator extends React.PureComponent {\n constructor(props) {\n super(props);\n\n this.state = {\n alert: '',\n availableFiles: [],\n isFilePicked: false,\n isLoading: false,\n requestProblem: '',\n requestRunning: '',\n requestSuccessful: '',\n selectedFile: undefined,\n };\n }\n\n componentDidMount = () => {\n let toUpdate = {\n alert: 'request problem',\n requestProblem: true,\n };\n const lastJobStatus = localStorage.getItem('lastJobStatus');\n\n fetch(`${itemMatchingBackendUrl}requestRunning`, {\n method: 'GET',\n })\n .then((response) => response.json())\n .then((data) => {\n if (data.status === 'success') {\n toUpdate = {\n requestRunning: data.is_request_running,\n requestSuccessful: !data.did_request_fail,\n requestProblem: false,\n };\n\n switch (true) {\n case data.is_request_running:\n toUpdate.alert = 'running';\n break;\n case data.did_request_fail:\n toUpdate.alert = 'failed';\n break;\n default:\n if (lastJobStatus === 'running' || lastJobStatus === 'undefined' || lastJobStatus === undefined || lastJobStatus === null) {\n toUpdate.alert = 'finished';\n }\n }\n }\n })\n .catch(() => {\n // `handled fetch exception: ${error.message}`\n })\n .finally(() => {\n this.setState(toUpdate);\n if (toUpdate.alert !== undefined && toUpdate.alert !== null) {\n localStorage.setItem('lastJobStatus', toUpdate.alert);\n }\n });\n };\n\n handleClose = (event, reason) => {\n if (reason === 'clickaway') {\n return;\n }\n\n this.setState({ alert: '' });\n };\n\n render() {\n const alert = this.state.alert;\n let alertSeverity;\n\n if (alert) {\n switch (true) {\n case alert === 'finished':\n alertSeverity = 'success';\n break;\n case alert === 'running':\n alertSeverity = 'info';\n break;\n default:\n alertSeverity = 'warning';\n }\n }\n\n const changeHandler = (event) => {\n this.setState({\n selectedFile: event.target.files[0],\n isFilePicked: true,\n });\n };\n\n const renderErrorRetrievingResult = () => {\n return (\n \n \n Unknown\n Unknown\n An error occurred retrieving the Job Status\n \n \n );\n };\n\n const renderNormalResult = (isRunning, wasSuccessful) => {\n const isRunningText = isRunning ? 'Yes' : 'No';\n let wasSuccessfulText = 'Unknown';\n\n if (!isRunning) {\n wasSuccessfulText = wasSuccessful ? 'Yes' : 'No';\n }\n\n return (\n \n \n {isRunningText}\n {wasSuccessfulText}\n No error\n \n \n );\n };\n\n const renderRow = (isRunning, wasSuccessful, errorRetrieving) => {\n if (errorRetrieving) {\n return renderErrorRetrievingResult();\n } else {\n return renderNormalResult(isRunning, wasSuccessful);\n }\n };\n\n return (\n
\n {this.state.isLoading ? (\n \n ) : (\n \n \n \n \n \n \n \n \n\n {renderRow(\n this.state.requestRunning,\n this.state.requestSuccessful,\n this.state.requestProblem\n )}\n
Is a process running?Was the process successful?Process error?
\n )}\n\n \n \n Matching {alert}\n \n \n
\n );\n }\n}\n\nexport default ProcessRunningIndicator;\n","import React, { useState } from 'react';\nimport { withRouter, Route, Switch } from 'react-router-dom';\nimport { inject, observer } from 'mobx-react';\nimport * as styles from './Suppliers.css';\nimport UploadFileArea from './UploadFileArea';\nimport { withLastLocation } from 'react-router-last-location';\nimport ProcessRunningIndicator from './ProcessRunningIndicator';\n@withRouter\n@inject('rootStore')\n@observer\nclass HotelItemMatching extends React.PureComponent {\n constructor(props) {\n super(props);\n }\n\n render() {\n return (\n
\n
\n \n \n
\n );\n }\n}\n\nexport default withLastLocation(HotelItemMatching);\n","import { css } from '@emotion/core';\nconst flexBody = css`\n padding-left: 10px;\n height: 65%;\n background-color: #cde2ec;\n display: flex;\n justify-content: space-between;\n padding-bottom: 5px;\n`;\nconst flexColumn = css`\n width: 40%;\n display: flex;\n flex-direction: column;\n color: black;\n`;\nconst mainDiv = css`\n h1 {\n padding-left: 5px;\n }\n height: 90%;\n &.small {\n height: 60%;\n }\n`;\nconst buttons = css`\n position: fixed !important;\n bottom: 8px !important;\n z-index: 100 !important;\n right: 150px !important;\n button {\n width: 150px;\n margin-right: 20px;\n }\n`;\nconst columnItem = css`\n max-height: 20%;\n div {\n display: inline-block;\n width: 40%;\n color: #404040;\n font: 300 13px/17px 'Open Sans', 'Helvetica Neue', helvetica, arial, verdana,\n sans-serif;\n }\n input {\n background-color: #fff;\n font: 300 13px/21px 'Open Sans', 'Helvetica Neue', helvetica, arial, verdana,\n sans-serif;\n }\n p {\n max-width: 50%;\n margin-left: 10px;\n display: inline-block;\n }\n textarea {\n padding: 5px 10px 4px;\n background-color: #fff;\n font: 300 13px/21px 'Open Sans', 'Helvetica Neue', helvetica, arial, verdana,\n sans-serif;\n max-width: 50%;\n display: inline-block;\n resize: none;\n }\n`;\nconst toolbar = css`\n display: flex;\n justify-content: space-evenly;\n padding: 10px;\n background: #cde2ed;\n`;\nconst textfield = css`\n margin-top: 15px !important;\n margin-right: 5px !important;\n input {\n padding-left: 5px;\n background: white;\n font-size: 10px;\n }\n &.lines {\n margin-left: 5px !important;\n width: 80%;\n }\n`;\nconst clearButton = css`\n background: rgb(152, 159, 162);\n border: none;\n margin-top: 15px !important;\n margin-bottom: 8px !important;\n width: 5%;\n i {\n color: white;\n }\n`;\nconst tableDiv = css`\n background-image: linear-gradient(to bottom, #cde2ed, #f3f3f3);\n height: 65%;\n div:nth-of-type(2n) {\n max-height: 100% !important;\n }\n`;\nconst searchButton = css`\n background: rgb(87, 181, 227);\n border: none;\n height: 25px;\n margin-top: 15px !important;\n margin-bottom: 8px !important;\n width: 10%;\n i {\n color: white;\n }\n &.lines {\n width 19%;\n }\n`;\nconst tableRows = css`\n & tbody tr:nth-of-type(odd) {\n background: white !important;\n }\n & tbody tr:nth-of-type(even) {\n background: #f6f6f6 !important;\n }\n`;\n\nconst fields = css`\n margin: 5px;\n margin-right: 5px !important;\n background: white;\n input {\n padding-left: 5px;\n font-size: 10px;\n }\n`;\nconst orderPageMainDiv = css`\n height: 90%;\n`;\n\nconst receiverButton = css`\n margin: 5px !important;\n`;\n\nconst tableHeader = css`\n border-right: 1px solid #d0d0d0;\n color: #404040;\n font: 400 13px/19px 'Open Sans', 'Helvetica Neue', helvetica, arial, verdana,\n sans-serif;\n outline: 0;\n background-color: #fff;\n`;\n\nconst tablePanel = css`\n justify-content: flex-start !important;\n`;\n\nexport {\n tableHeader,\n tablePanel,\n receiverButton,\n orderPageMainDiv,\n fields,\n mainDiv,\n tableRows,\n searchButton,\n tableDiv,\n flexBody,\n columnItem,\n buttons,\n toolbar,\n textfield,\n clearButton,\n flexColumn,\n};\n","export const formatDate = (date) => {\n const d = new Date(date);\n let month = `${d.getMonth() + 1}`;\n let day = `${d.getDate()}`;\n const year = d.getFullYear();\n\n if (month.length < 2) month = `0${month}`;\n if (day.length < 2) day = `0${day}`;\n\n return [year, month, day].join('-');\n};\n","import React from 'react';\nimport { withRouter, Link } from 'react-router-dom';\nimport { inject, observer } from 'mobx-react';\nimport { reaction } from 'mobx';\nimport {\n Grid,\n Table,\n TableHeaderRow,\n TableSelection,\n TableColumnResizing,\n PagingPanel,\n VirtualTable,\n} from '@devexpress/dx-react-grid-material-ui';\nimport CircularProgress from '@material-ui/core/CircularProgress';\nimport {\n PagingState,\n CustomPaging,\n SelectionState,\n IntegratedSelection,\n DataTypeProvider,\n} from '@devexpress/dx-react-grid';\n/** @jsx jsx */\nimport { css, jsx } from '@emotion/core';\nimport * as styles from './Orders.css';\nimport { Button } from '@material-ui/core';\nimport { formatDate } from '../../helpers/formatDate';\n\nconst dateCell = (el) =>

{formatDate(el.value)}

;\nconst DateCellProvider = (props) => (\n \n);\n\nconst CustomizedHeader = ({ ...restProps }) => (\n \n);\nconst CustomizedTable = ({ ...restProps }) => (\n \n);\n\nconst CustomizedPanel = ({ ...restProps }) => (\n \n);\n\n@withRouter\n@inject('rootStore')\n@observer\nclass UpdatedOrdersTable extends React.PureComponent {\n constructor(props) {\n super(props);\n this.changeSelection = this.changeSelection.bind(this);\n this.getReport = this.getReport.bind(this);\n this.setCurrentPage = this.setCurrentPage.bind(this);\n this.prevVal = [];\n }\n setCurrentPage(value) {\n const param = this.props.rootStore.currentUserOrg.is_a_supplier\n ? this.props.rootStore.currentUserOrg.name\n : this.props.rootStore.currentUserOrg.p_id;\n this.props.rootStore.ordersStore.ordersTablePage = value;\n this.props.rootStore.ordersStore.fetchUpdatedOrders(\n param,\n null,\n null,\n null,\n null,\n null,\n value\n );\n }\n componentDidMount() {\n if (this.props.rootStore.currentUserOrg.name) {\n const param = this.props.rootStore.currentUserOrg.is_a_supplier\n ? this.props.rootStore.currentUserOrg.name\n : this.props.rootStore.currentUserOrg.p_id;\n this.props.rootStore.ordersStore.fetchUpdatedOrders(\n param,\n null,\n null,\n null,\n null,\n null,\n null,\n true\n );\n }\n reaction(\n () => this.props.rootStore.currentUserOrg,\n () => {\n const param = this.props.rootStore.currentUserOrg.is_a_supplier\n ? this.props.rootStore.currentUserOrg.name\n : this.props.rootStore.currentUserOrg.p_id;\n this.props.rootStore.ordersStore.fetchUpdatedOrders(\n param,\n null,\n null,\n null,\n null,\n null,\n null,\n true\n );\n }\n );\n reaction(\n () => this.props.rootStore.ordersStore.preferredRate,\n () => {\n this.props.rootStore.ordersStore.recalculateOrders();\n }\n );\n }\n changeSelection(value) {\n if (value && value.length > 0 && value.length > this.prevVal.length) {\n value.forEach((ind) => {\n if (!this.prevVal.includes(ind)) {\n this.props.rootStore.ordersStore.updatedIdsForReport.push(\n this.props.rootStore.ordersStore.updatedOrders[ind].id\n );\n }\n });\n } else {\n this.prevVal.forEach((ind) => {\n if (!value.includes(ind)) {\n const order = this.props.rootStore.ordersStore.updatedOrders[ind].id;\n this.props.rootStore.ordersStore.updatedIdsForReport =\n this.props.rootStore.ordersStore.updatedIdsForReport.filter(\n (elem) => elem !== order\n );\n }\n });\n }\n this.prevVal = value;\n }\n getReport(all) {\n if (this.props.rootStore.currentUserOrg.name) {\n const param = this.props.rootStore.currentUserOrg.is_a_supplier\n ? this.props.rootStore.currentUserOrg.name\n : this.props.rootStore.currentUserOrg.p_id;\n this.props.rootStore.ordersStore.getUpdatedReport(param, all);\n }\n }\n render() {\n const orderCell = (el) => {\n return (\n {\n this.props.rootStore.ordersStore.generatePrint(el.row.id);\n }}\n >\n Print\n \n );\n };\n\n const OrderCellProvider = (props) => {\n return ;\n };\n const columns = [\n { name: 'number', title: 'Number' },\n { name: 'department', title: 'Department' },\n { name: 'supplier', title: 'Supplier' },\n { name: 'account', title: 'Account' },\n { name: 'sent_date', title: 'Sent Date' },\n { name: 'status', title: 'State' },\n { name: 'currency', title: 'Currency' },\n { name: 'total_value', title: 'Value' },\n { name: 'total_value_usd', title: 'Value(USD)' },\n { name: 'expected_delivery_date', title: 'Delivery Date' },\n { name: 'invoiced_value', title: 'Invoiced Value' },\n { name: 'invoiced_value_usd', title: 'Invoiced Value(USD)' },\n { name: 'requestor', title: 'Requestor' },\n { name: 'reference', title: 'Reference' },\n { name: 'requisition_number', title: 'Requisition Number' },\n { name: 'origin', title: 'Requsition Origin' },\n { name: 'print', title: 'Print' },\n ];\n const columnWidths = [\n { columnName: 'number', width: 120 },\n { columnName: 'department', width: 120 },\n { columnName: 'supplier', width: 120 },\n { columnName: 'account', width: 120 },\n { columnName: 'sent_date', width: 120 },\n { columnName: 'status', width: 60 },\n { columnName: 'currency', width: 60 },\n { columnName: 'total_value', width: 120 },\n { columnName: 'total_value_usd', width: 120 },\n { columnName: 'expected_delivery_date', width: 120 },\n { columnName: 'invoiced_value', width: 120 },\n { columnName: 'invoiced_value_usd', width: 120 },\n { columnName: 'requestor', width: 120 },\n { columnName: 'reference', width: 120 },\n { columnName: 'requisition_number', width: 120 },\n { columnName: 'origin', width: 120 },\n { columnName: 'print', width: 120 },\n ];\n const tableDiv = css`\n background-image: linear-gradient(to bottom, #cde2ed, #f3f3f3);\n padding: 8px 8px 0 8px;\n height: 90%;\n div:nth-of-type(2n) {\n max-height: 86% !important;\n }\n div:first-of-type {\n height: 100% !important;\n }\n `;\n const spinner = css`\n width: 90px;\n opacity: 0.5;\n position: absolute;\n height: 90px;\n left: 50%;\n top: 50%;\n * {\n width: 100%;\n height: 100%;\n }\n `;\n const exportButton = css`\n position: fixed !important;\n bottom: 8px !important;\n z-index: 100 !important;\n right: 150px !important;\n `;\n const exportAllButton = css`\n position: fixed !important;\n bottom: 8px !important;\n z-index: 100 !important;\n right: 10px !important;\n `;\n const orderLinkCell = (el) => {\n return (\n \n this.props.rootStore.ordersStore.setCurrentOrder(el.value)\n }\n >\n {el.value}\n \n );\n };\n\n const OrderLinkCellProvider = (props) => {\n return ;\n };\n return (\n
\n \n \n \n this.changeSelection(el)}\n />\n \n \n \n \n \n \n \n \n \n \n {this.props.rootStore.uiStateStore.spinner && (\n \n )}\n {this.props.rootStore.ordersStore.updatedIdsForReport &&\n this.props.rootStore.ordersStore.updatedIdsForReport.length > 0 ? (\n this.getReport()}\n >\n Export\n \n ) : null}\n this.getReport(true)}\n >\n Export All\n \n
\n );\n }\n}\n\nexport default UpdatedOrdersTable;\n","import React from 'react';\nimport { withRouter } from 'react-router-dom';\nimport { inject, observer } from 'mobx-react';\nimport Modal from '@material-ui/core/Modal';\n/** @jsx jsx */\nimport { css, jsx } from '@emotion/core';\nimport { Button, TextField } from '@material-ui/core';\n\n@withRouter\n@inject('rootStore')\n@observer\nclass ReceiversModal extends React.PureComponent {\n constructor(props) {\n super(props);\n this.state = {\n errorText: '',\n receiverEmail: '',\n };\n this.handleClose = this.handleClose.bind(this);\n this.handleOpen = this.handleOpen.bind(this);\n this.addReceiver = this.addReceiver.bind(this);\n }\n\n addReceiver() {\n if (\n this.state.receiverEmail.match(\n /^\\s{0,}(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))\\s{0,}$/\n )\n ) {\n this.setState({ errorText: '' });\n this.props.rootStore.receiversStore.addReceiver(this.state.receiverEmail);\n } else {\n this.setState({ errorText: 'Invalid email format' });\n }\n }\n\n componentDidMount() {\n this.props.rootStore.receiversStore.fetchReceiver();\n }\n\n handleOpen = () => {\n this.props.rootStore.receiversStore.isModalOpen = true;\n };\n\n handleClose = () => {\n this.props.rootStore.receiversStore.isModalOpen = false;\n };\n\n render() {\n const { receivers } = this.props.rootStore.receiversStore;\n const modal = css`\n background: white;\n width: 50%;\n height: 50%;\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n `;\n const modalReceiverItem = css`\n margin: 20px;\n background: #f6f6f6 !important;\n display: flex;\n justify-content: space-between;\n p {\n padding-left: 20px;\n }\n `;\n const modalReceiverBlock = css`\n height: 70%;\n overflow: auto;\n `;\n const modalTitle = css`\n margin: 20px;\n font-size: 24px;\n `;\n const modalInput = css`\n margin-left: 20px !important;\n margin-right: 20px !important;\n font-size: 24px;\n `;\n const modalPanel = css`\n display: flex;\n align-items: baseline;\n `;\n return (\n \n
\n

\n Organisation notification list\n

\n
\n {\n if (e.key === 'Enter') {\n this.addReceiver();\n }\n }}\n onChange={(el) => {\n this.setState({\n receiverEmail: el.target.value,\n });\n }}\n >\n \n
\n
\n {receivers.map((receiver, index) => (\n
\n

{receiver.email}

\n {\n this.props.rootStore.receiversStore.receivers.splice(\n index,\n 1\n );\n this.props.rootStore.receiversStore.removeReceiver(\n receiver.email\n );\n }}\n >\n Delete\n \n
\n ))}\n
\n
\n \n );\n }\n}\n\nexport default ReceiversModal;\n","import React from 'react';\nimport { withRouter, Route, Switch } from 'react-router-dom';\nimport { inject, observer } from 'mobx-react';\nimport DateFnsUtils from '@date-io/date-fns';\nimport { DatePicker, MuiPickersUtilsProvider } from '@material-ui/pickers';\n/** @jsx jsx */\nimport { css, jsx } from '@emotion/core';\nimport * as styles from './Orders.css';\nimport { withLastLocation } from 'react-router-last-location';\nimport UpdatedOrdersTable from './UpdatedOrders';\nimport { TextField, Button } from '@material-ui/core';\nimport ReceiversModal from '../receivers/ReceiversModal';\n\n@withRouter\n@inject('rootStore')\n@observer\nclass OrderPage extends React.PureComponent {\n constructor(props) {\n super(props);\n this.state = {\n sentFrom: null,\n sentTo: null,\n deliveryFrom: null,\n deliveryTo: null,\n };\n this.searchInput = React.createRef();\n this.clear = this.clear.bind(this);\n this.search = this.search.bind(this);\n }\n search() {\n if (!this.props.rootStore.uiStateStore.spinner) {\n const param = this.props.rootStore.currentUserOrg.is_a_supplier\n ? this.props.rootStore.currentUserOrg.name\n : this.props.rootStore.currentUserOrg.p_id;\n this.props.rootStore.ordersStore.ordersTablePage = 0;\n this.props.rootStore.ordersStore.fetchUpdatedOrders(\n param,\n this.searchInput.current.children[0].children[0].value,\n this.state.sentFrom,\n this.state.sentTo,\n this.state.deliveryFrom,\n this.state.deliveryTo,\n null,\n true\n );\n }\n }\n clear() {\n this.searchInput.current.children[0].children[0].value = '';\n this.setState({\n sentFrom: null,\n sentTo: null,\n deliveryFrom: null,\n deliveryTo: null,\n });\n }\n render() {\n return (\n
\n \n

{`Purchaser Order's`}

\n
\n {\n if (e.key === 'Enter') {\n this.search();\n }\n }}\n ref={this.searchInput}\n >\n {\n this.setState({\n sentFrom: value,\n });\n }}\n variant=\"inline\"\n format=\"MM/dd/yyyy\"\n margin=\"normal\"\n />\n {\n this.setState({\n sentTo: value,\n });\n }}\n variant=\"inline\"\n format=\"MM/dd/yyyy\"\n margin=\"normal\"\n />\n {\n this.setState({\n deliveryFrom: value,\n });\n }}\n variant=\"inline\"\n format=\"MM/dd/yyyy\"\n margin=\"normal\"\n />\n {\n this.setState({\n deliveryTo: value,\n });\n }}\n variant=\"inline\"\n format=\"MM/dd/yyyy\"\n margin=\"normal\"\n />\n this.search()}\n css={styles.searchButton}\n name=\"button\"\n >\n \n \n this.clear()}\n css={styles.clearButton}\n name=\"button\"\n >\n \n \n
\n \n \n \n \n \n \n
\n
\n );\n }\n}\n\nexport default withLastLocation(OrderPage);\n","import { css } from '@emotion/core';\nconst flexBody = css`\n overflow: auto;\n padding-left: 10px;\n height: 70%;\n background-color: #cde2ec;\n display: flex;\n justify-content: space-between;\n padding-bottom: 5px;\n`;\nconst flexColumn = css`\n justify-content: inherit !important;\n width: 40%;\n display: flex;\n flex-direction: column;\n color: black;\n`;\nconst totalBar = css`\n display: flex;\n padding-left: 25px;\n padding-right: 25px;\n justify-content: space-between;\n background-color: #cde2ec;\n color: black;\n border: 1px solid #5fa2dd;\n`;\nconst mainDiv = css`\n * {\n font-size: 11px !important;\n }\n h1 {\n font-size: 32px !important;\n padding-left: 5px;\n }\n height: 90%;\n &.small {\n height: 60%;\n }\n`;\nconst margin = css`\n margin-top: 16px !important;\n margin-bottom: 8px !important;\n`;\nconst columnItem = css`\n display: flex;\n align-items: center;\n max-height: 20%;\n div {\n b {\n color: red;\n }\n display: inline-block;\n width: 40%;\n color: #404040;\n font: 300 13px/17px 'Open Sans', 'Helvetica Neue', helvetica, arial, verdana,\n sans-serif;\n }\n input {\n background-color: #fff;\n font: 300 13px/21px 'Open Sans', 'Helvetica Neue', helvetica, arial, verdana,\n sans-serif;\n }\n p {\n max-width: 50%;\n margin-left: 10px;\n display: inline-block;\n }\n textarea {\n padding: 5px 10px 4px;\n background-color: #fff;\n font: 300 13px/21px 'Open Sans', 'Helvetica Neue', helvetica, arial, verdana,\n sans-serif;\n width: 50%;\n display: inline-block;\n resize: none;\n }\n`;\nconst buttons = css`\n position: fixed !important;\n bottom: 8px !important;\n z-index: 100 !important;\n right: 150px !important;\n button {\n width: 150px;\n margin-right: 20px;\n }\n`;\n\nconst tableRows = css`\n & tbody tr:nth-of-type(odd) {\n background: white !important;\n }\n & tbody tr:nth-of-type(even) {\n background: #f6f6f6 !important;\n }\n`;\nconst tableHeader = css`\n border-right: 1px solid #d0d0d0;\n color: #404040;\n font: 400 13px/19px 'Open Sans', 'Helvetica Neue', helvetica, arial, verdana,\n sans-serif;\n outline: 0;\n background-color: #fff;\n`;\n\nconst saveLine = css`\n position: fixed !important;\n bottom: 8px !important;\n z-index: 100 !important;\n right: 1% !important;\n`;\n\nconst tableDiv = css`\n background-image: linear-gradient(to bottom, #cde2ed, #f3f3f3);\n height: 60%;\n div:nth-of-type(2n) {\n max-height: 100% !important;\n }\n`;\nconst cCell = css`\n width: 70% !important;\n text-overflow: ellipsis;\n`;\n\nconst tablePanel = css`\n justify-content: flex-start !important;\n`;\n\nconst searchButton = css`\n background: rgb(87, 181, 227);\n border: none;\n height: 25px;\n margin-top: 15px !important;\n margin-bottom: 8px !important;\n width: 10%;\n i {\n color: white;\n }\n &.lines {\n width: 19%;\n }\n`;\nconst toolbar = css`\n display: flex;\n justify-content: space-between;\n padding: 10px;\n background: #cde2ed;\n`;\nconst textfield = css`\n margin-top: 15px !important;\n margin-right: 5px !important;\n input {\n padding-left: 5px;\n background: white;\n font-size: 10px;\n }\n &.lines {\n width: 80%;\n margin-left: 5px !important;\n }\n`;\nconst checkboxes = css`\n display: flex;\n background: #cde2ed;\n div {\n display: flex;\n margin: 5px;\n }\n`;\nconst statusBlock = css`\n display: flex;\n div {\n margin-right: 5px;\n }\n background: #cde2ed;\n padding-left: 10px;\n align-items: baseline;\n`;\nconst sortBlock = css`\n display: flex;\n align-items: baseline;\n`;\nconst fields = css`\n margin: 5px;\n margin-right: 5px !important;\n background: white;\n input {\n padding-left: 5px;\n font-size: 10px;\n }\n &.fixed {\n padding: 5px;\n width: 120px !important;\n margin-top: 15px;\n height: 25px;\n }\n`;\nconst invoiceMainDiv = css`\n height: 90%;\n`;\nconst clearButton = css`\n background: rgb(152, 159, 162);\n border: none;\n margin-top: 15px !important;\n margin-bottom: 8px !important;\n width: 5%;\n i {\n color: white;\n }\n`;\nconst exportButton = css`\n position: fixed !important;\n bottom: 8px !important;\n z-index: 100 !important;\n right: 140px !important;\n`;\nconst exportAllButton = css`\n position: fixed !important;\n bottom: 8px !important;\n z-index: 100 !important;\n right: 10px !important;\n`;\n\nexport {\n exportAllButton,\n exportButton,\n saveLine,\n columnItem,\n totalBar,\n checkboxes,\n flexColumn,\n margin,\n sortBlock,\n statusBlock,\n flexBody,\n buttons,\n invoiceMainDiv,\n mainDiv,\n tableRows,\n tableHeader,\n clearButton,\n searchButton,\n fields,\n cCell,\n tablePanel,\n textfield,\n tableDiv,\n toolbar,\n};\n","import React from 'react';\nimport { withRouter, Link } from 'react-router-dom';\nimport { inject, observer } from 'mobx-react';\nimport { reaction } from 'mobx';\nimport {\n Grid,\n Table,\n TableHeaderRow,\n TableColumnResizing,\n TableSelection,\n PagingPanel,\n VirtualTable,\n} from '@devexpress/dx-react-grid-material-ui';\nimport {\n PagingState,\n CustomPaging,\n SortingState,\n SelectionState,\n IntegratedSelection,\n DataTypeProvider,\n IntegratedSorting,\n} from '@devexpress/dx-react-grid';\n/** @jsx jsx */\nimport { css, jsx } from '@emotion/core';\nimport * as styles from './Invoice.css';\nimport { formatDate } from '../../helpers/formatDate';\nimport { Button } from '@material-ui/core';\n\nconst dateCell = (el) =>

{formatDate(el.value)}

;\nconst DateCellProvider = (props) => (\n \n);\n\nconst CustomizedHeader = ({ ...restProps }) => (\n \n);\nconst CustomizedTable = ({ ...restProps }) => (\n \n);\n\nconst CustomizedPanel = ({ ...restProps }) => (\n \n);\n\n@withRouter\n@inject('rootStore')\n@observer\nclass InvoiceTable extends React.PureComponent {\n constructor(props) {\n super(props);\n this.changeSelection = this.changeSelection.bind(this);\n this.getReport = this.getReport.bind(this);\n this.setCurrentPage = this.setCurrentPage.bind(this);\n this.prevVal = [];\n }\n setCurrentPage(value) {\n this.props.rootStore.invoicesStore.invoicesTablePage = value;\n if (this.props.rootStore.currentUserOrg.name) {\n this.props.rootStore.invoicesStore.fetchInvoices(\n this.props.rootStore.currentUserOrg.name,\n null,\n null,\n null,\n value\n );\n }\n }\n componentDidMount() {\n if (this.props.rootStore.currentUserOrg.name) {\n this.props.rootStore.invoicesStore.fetchInvoices(\n this.props.rootStore.currentUserOrg.name,\n null,\n null,\n null,\n null,\n true\n );\n }\n reaction(\n () => this.props.rootStore.currentUserOrg,\n () => {\n if (this.props.rootStore.currentUserOrg.name) {\n this.props.rootStore.invoicesStore.fetchInvoices(\n this.props.rootStore.currentUserOrg.name,\n null,\n null,\n null,\n null,\n true\n );\n }\n }\n );\n }\n changeSelection(value) {\n if (value && value.length > 0 && value.length > this.prevVal.length) {\n value.forEach((ind) => {\n if (!this.prevVal.includes(ind)) {\n this.props.rootStore.invoicesStore.idsForReport.push(\n this.props.rootStore.invoicesStore.invoices[ind].id\n );\n }\n });\n } else {\n this.prevVal.forEach((ind) => {\n if (!value.includes(ind)) {\n const order = this.props.rootStore.invoicesStore.invoices[ind].id;\n this.props.rootStore.invoicesStore.idsForReport =\n this.props.rootStore.invoicesStore.idsForReport.filter(\n (elem) => elem !== order\n );\n }\n });\n }\n this.prevVal = value;\n }\n getReport(all) {\n if (this.props.rootStore.currentUserOrg.name) {\n this.props.rootStore.invoicesStore.getReport(all);\n }\n }\n render() {\n const invoiceCell = (el) => {\n return (\n \n this.props.rootStore.invoicesStore.setCurrentInvoice(el.value)\n }\n >\n {el.value}\n \n );\n };\n\n const InvoiceCellProvider = (props) => {\n return ;\n };\n const orderCell = (el) => {\n return (\n \n {el.value}\n \n );\n };\n\n const OrderCellProvider = (props) => {\n return ;\n };\n const columns = [\n { name: 'number', title: 'Number' },\n { name: 'supplier', title: 'Invoicer' },\n { name: 'invoice_date', title: 'Invoice Date' },\n { name: 'state', title: 'State' },\n { name: 'order', title: 'PO Number' },\n { name: 'purchaser', title: 'Purchaser' },\n { name: 'currency', title: 'Currency' },\n { name: 'gross_amount', title: 'Invoice Total(Including Tax)' },\n { name: 'gross_amount_usd', title: 'Invoice Total(Including Tax, USD)' },\n { name: 'total_tax_sum', title: 'Invoice Tax Total' },\n { name: 'total_tax_sum_usd', title: 'Invoice Tax Total(USD)' },\n { name: 'shipping_amount', title: 'Custom Duties Total' },\n { name: 'shipping_amount_usd', title: 'Custom Duties Total(USD)' },\n ];\n const columnWidths = [\n { columnName: 'number', width: 120 },\n { columnName: 'supplier', width: 120 },\n { columnName: 'invoice_date', width: 120 },\n { columnName: 'state', width: 120 },\n { columnName: 'order', width: 120 },\n { columnName: 'status', width: 120 },\n { columnName: 'purchaser', width: 120 },\n { columnName: 'currency', width: 120 },\n { columnName: 'gross_amount', width: 120 },\n { columnName: 'gross_amount_usd', width: 120 },\n { columnName: 'total_tax_sum', width: 120 },\n { columnName: 'total_tax_sum_usd', width: 120 },\n { columnName: 'shipping_amount', width: 120 },\n { columnName: 'shipping_amount_usd', width: 120 },\n ];\n const tableDiv = css`\n background-image: linear-gradient(to bottom, #cde2ed, #f3f3f3);\n padding: 8px 8px 0 8px;\n height: 80%;\n div:first-of-type {\n height: 100% !important;\n }\n `;\n return (\n
\n 0\n ? this.props.rootStore.invoicesStore.invoices\n : []\n }\n columns={columns}\n >\n \n \n this.changeSelection(el)}\n />\n \n \n \n \n \n \n \n \n \n \n {this.props.rootStore.invoicesStore.idsForReport &&\n this.props.rootStore.invoicesStore.idsForReport.length > 0 ? (\n this.getReport()}\n >\n Export\n \n ) : null}\n this.getReport(true)}\n >\n Export All\n \n
\n );\n }\n}\n\nexport default InvoiceTable;\n","import React from 'react';\nimport { withRouter } from 'react-router-dom';\nimport { inject, observer } from 'mobx-react';\nimport DateFnsUtils from '@date-io/date-fns';\nimport { DatePicker, MuiPickersUtilsProvider } from '@material-ui/pickers';\n/** @jsx jsx */\nimport { css, jsx } from '@emotion/core';\nimport * as styles from './Invoice.css';\nimport { withLastLocation } from 'react-router-last-location';\nimport {\n TextField,\n Select,\n MenuItem,\n Checkbox,\n ListItemText,\n FormControlLabel,\n} from '@material-ui/core';\nimport InvoiceTable from './InvoiceTable';\n\nconst ITEM_HEIGHT = 48;\nconst ITEM_PADDING_TOP = 8;\nconst MenuProps = {\n PaperProps: {\n style: {\n maxHeight: ITEM_HEIGHT * 4.5 + ITEM_PADDING_TOP,\n width: 250,\n },\n },\n};\n\n@withRouter\n@inject('rootStore')\n@observer\nclass InvoicePage extends React.PureComponent {\n constructor(props) {\n super(props);\n this.state = {\n sentFrom: null,\n sentTo: null,\n };\n this.statuses = ['open', 'cancelled', 'flagged', 'reconciled'];\n this.handleChange = this.handleChange.bind(this);\n this.searchInput = React.createRef();\n this.search = this.search.bind(this);\n }\n componentDidUpdate() {\n if (\n this.props.lastLocation &&\n this.props.lastLocation.pathname !== '/home/invoices'\n ) {\n this.props.lastLocation.pathname = this.props.location.pathname;\n this.setState({\n sentFrom: null,\n sentTo: null,\n });\n }\n }\n search() {\n if (!this.props.rootStore.uiStateStore.spinner) {\n this.props.rootStore.invoicesStore.invoicesTablePage = 0;\n this.props.rootStore.invoicesStore.fetchInvoices(\n this.props.rootStore.currentUserOrg.name,\n this.searchInput.current.children[0].children[0].value,\n this.state.sentFrom,\n this.state.sentTo,\n null,\n true\n );\n }\n }\n clear() {\n this.searchInput.current.children[0].children[0].value = '';\n this.setState({\n sentFrom: null,\n sentTo: null,\n });\n }\n handleChange(event) {\n const index = this.props.rootStore.invoicesStore.checkedStatuses.indexOf(\n event.target.value\n );\n if (index > -1) {\n this.props.rootStore.invoicesStore.checkedStatuses =\n this.props.rootStore.invoicesStore.checkedStatuses.filter(\n (elem) => elem !== event.target.value\n );\n } else {\n this.props.rootStore.invoicesStore.checkedStatuses.push(\n event.target.value\n );\n }\n this.props.rootStore.invoicesStore.fetchInvoices(\n this.props.rootStore.currentUserOrg.name,\n this.searchInput.current.children[0].children[0].value,\n this.state.sentFrom,\n this.state.sentTo,\n null,\n true\n );\n }\n render() {\n return (\n
\n \n

Invoices

\n
\n {\n if (e.key === 'Enter') {\n this.search();\n }\n }}\n disabled={this.props.rootStore.uiStateStore.spinner}\n css={styles.textfield}\n placeholder={\n this.props.rootStore.currentUserOrg.is_a_supplier\n ? 'Search for Purchaser or Number'\n : 'Search for Invoicer or Number'\n }\n ref={this.searchInput}\n >\n {\n this.setState({\n sentFrom: value,\n });\n }}\n variant=\"inline\"\n format=\"MM/dd/yyyy\"\n margin=\"normal\"\n />\n {\n this.setState({\n sentTo: value,\n });\n }}\n variant=\"inline\"\n format=\"MM/dd/yyyy\"\n margin=\"normal\"\n />\n this.search()}\n css={styles.searchButton}\n name=\"button\"\n >\n \n \n this.clear()}\n css={styles.clearButton}\n name=\"button\"\n >\n \n \n
\n
Sort:
\n {\n this.props.rootStore.invoicesStore.invoicesAcsSort =\n event.target.value;\n this.props.rootStore.invoicesStore.fetchInvoices(\n this.props.rootStore.currentUserOrg.name,\n this.searchInput.current.children[0].children[0].value,\n this.state.sentFrom,\n this.state.sentTo,\n null,\n true\n );\n }}\n >\n \n \n \n \n \n \n \n
\n
\n
\n
Status:
\n
\n {this.statuses.map((status) => (\n
\n -1\n }\n onClick={this.handleChange}\n />\n }\n label={status}\n />\n
\n ))}\n
\n
\n \n
\n
\n );\n }\n}\n\nexport default withLastLocation(InvoicePage);\n","import React from 'react';\nimport { withRouter } from 'react-router-dom';\nimport { inject, observer } from 'mobx-react';\nimport {\n Grid,\n Table,\n TableHeaderRow,\n TableColumnResizing,\n PagingPanel,\n VirtualTable,\n TableInlineCellEditing,\n} from '@devexpress/dx-react-grid-material-ui';\nimport {\n PagingState,\n IntegratedPaging,\n EditingState,\n DataTypeProvider,\n} from '@devexpress/dx-react-grid';\n/** @jsx jsx */\nimport { css, jsx } from '@emotion/core';\nimport * as styles from './Invoice.css';\nimport { TextField, Button } from '@material-ui/core';\n\nconst CustomizedHeader = ({ ...restProps }) => (\n \n);\nconst CustomizedTable = ({ ...restProps }) => (\n \n);\n\nconst CustomizedPanel = ({ ...restProps }) => (\n \n);\n\n@withRouter\n@inject('rootStore')\n@observer\nclass Lines extends React.PureComponent {\n constructor(props) {\n super(props);\n this.state = {\n activeInput: -1,\n activeName: '',\n searchString: '',\n };\n this.checker = 0;\n this.turn = 1;\n this.onSave = this.onSave.bind(this);\n this.search = this.search.bind(this);\n this.commitChanges = this.commitChanges.bind(this);\n this.editChanges = this.editChanges.bind(this);\n }\n onSave() {\n this.props.rootStore.invoicesStore.saveLines();\n }\n search() {\n this.props.rootStore.invoicesStore.fetchCurrentInvoiceLines(\n this.props.rootStore.invoicesStore.currentInvoice.number,\n this.state.searchString\n );\n this.checker = 0;\n }\n commitChanges({ changed }) {\n if (changed) {\n for (\n let ind = 0;\n ind < this.props.rootStore.invoicesStore.lines.length;\n ind += 1\n ) {\n if (changed[ind]) {\n for (const property in changed[ind]) {\n if (property === 'weight') {\n if (!changed[ind].weight) {\n return false;\n }\n const regexp = /^[0-9]+(\\.[0-9]{1,3})?$/;\n if (!regexp.test(changed[ind].weight)) {\n return false;\n }\n this.props.rootStore.invoicesStore.lines[ind].weight =\n changed[ind].weight;\n this.props.rootStore.invoicesStore.recalculateLines();\n this.props.rootStore.invoicesStore.recalculateLines_handling();\n }\n if (property === 'tax_percentage_cda') {\n if (+changed[ind].tax_percentage_cda > 100) {\n changed[ind].tax_percentage_cda = 99;\n }\n if (+changed[ind].tax_percentage_cda < 0) {\n changed[ind].tax_percentage_cda = 0;\n }\n this.props.rootStore.invoicesStore.lines[ind].tax_percentage_cda =\n +changed[ind].tax_percentage_cda;\n this.props.rootStore.invoicesStore.recalculateLines();\n }\n if (property === 'tax_percentage') {\n if (+changed[ind].tax_percentage > 100) {\n changed[ind].tax_percentage = 99;\n }\n if (+changed[ind].tax_percentage < 0) {\n changed[ind].tax_percentage = 0;\n }\n this.props.rootStore.invoicesStore.lines[ind].tax_percentage =\n +changed[ind].tax_percentage;\n this.props.rootStore.invoicesStore.recalculateLines();\n }\n }\n }\n }\n }\n }\n editChanges(changed) {\n if (changed) {\n for (\n let ind = 0;\n ind < this.props.rootStore.invoicesStore.lines.length;\n ind += 1\n ) {\n if (changed[ind]) {\n for (const property in changed[ind]) {\n if (property === 'weight') {\n if (!changed[ind].weight) {\n return false;\n }\n const regexp = /^[0-9]+(\\.[0-9]{1,3})?$/;\n if (!regexp.test(changed[ind].weight)) {\n return false;\n }\n this.props.rootStore.invoicesStore.lines[ind].weight =\n changed[ind].weight;\n this.props.rootStore.invoicesStore.recalculateLines();\n }\n if (property === 'tax_percentage') {\n if (+changed[ind].tax_percentage > 100) {\n changed[ind].tax_percentage = 99;\n }\n if (+changed[ind].tax_percentage < 0) {\n changed[ind].tax_percentage = 0;\n }\n this.props.rootStore.invoicesStore.lines[ind].tax_percentage =\n +changed[ind].tax_percentage;\n this.props.rootStore.invoicesStore.recalculateLines();\n }\n if (property === 'tax_percentage_cda') {\n if (+changed[ind].tax_percentage_cda > 100) {\n changed[ind].tax_percentage_cda = 99;\n }\n if (+changed[ind].tax_percentage_cda < 0) {\n changed[ind].tax_percentage_cda = 0;\n }\n this.props.rootStore.invoicesStore.lines[ind].tax_percentage_cda =\n +changed[ind].tax_percentage_cda;\n this.props.rootStore.invoicesStore.recalculateLines();\n }\n }\n }\n }\n }\n }\n render() {\n const totalCell = (el) => {\n return el.value.toFixed(2);\n };\n\n const TotalCellProvider = (props) => {\n return (\n \n );\n };\n const columns = [\n { name: 'description', title: 'Description' },\n { name: 'product_item_sell_pack_name', title: 'Pack' },\n { name: 'quantity', title: 'Quantity' },\n { name: 'product_description', title: 'Product Description' },\n { name: 'weight', title: 'Unit Weight, Kg' },\n { name: 'tax_percentage', title: 'GST/VAT %' },\n { name: 'tax_percentage_cda', title: 'Custom Duty %' },\n { name: 'freight_cost', title: 'Freight Cost' },\n { name: 'handling_cost', title: 'Handling Cost' },\n { name: 'discount_total', title: 'Discount Total' },\n { name: 'line_total_sum', title: 'Line Total' },\n ];\n const columnWidths = [\n { columnName: 'description', width: 320 },\n { columnName: 'quantity', width: 120 },\n { columnName: 'product_item_sell_pack_name', width: 120 },\n { columnName: 'product_description', width: 120 },\n { columnName: 'weight', width: 120 },\n { columnName: 'line_total_sum', width: 120 },\n { columnName: 'tax_percentage', width: 120 },\n { columnName: 'tax_percentage_cda', width: 120 },\n { columnName: 'freight_cost', width: 120 },\n { columnName: 'handling_cost', width: 120},\n { columnName: 'discount_total', width: 120 },\n ];\n\n const CustomizedCell = (props) => {\n const { row, column, value, onValueChange, onBlur } = props;\n if (\n (column.name === 'tax_percentage' ||\n column.name === 'tax_percentage_cda') &&\n this.props.rootStore.currentUserOrg.is_a_purchaser\n ) {\n return (\n {\n return onBlur(event.target.value);\n }}\n >\n {\n return onBlur(event.target.value);\n }}\n onChange={(event) => {\n return onValueChange(event.target.value);\n }}\n />\n \n );\n }\n if (\n column.name === 'weight' &&\n this.props.rootStore.currentUserOrg.is_a_purchaser\n ) {\n return (\n {\n return onBlur(event.target.value);\n }}\n >\n {\n return onBlur(event.target.value);\n }}\n onChange={(event) => {\n return onValueChange(event.target.value);\n }}\n />\n \n );\n }\n const { editingEnabled, onValueChange: relete, ...rest } = props;\n return ;\n };\n\n this.checker = 0;\n return (\n
\n
\n {\n if (e.key === 'Enter') {\n this.search();\n }\n }}\n onChange={(el) => {\n this.setState({\n searchString: el.target.value,\n });\n }}\n >\n this.search()}\n name=\"button\"\n >\n \n \n
\n {this.props.rootStore.invoicesStore.lines ? (\n \n \n \n \n \n \n \n \n \n \n \n ) : null}\n {this.props.rootStore.currentUserOrg.is_a_purchaser ? (\n this.onSave()}\n >\n Save Lines\n \n ) : null}\n
\n );\n }\n}\n\nexport default Lines;\n","import React from 'react';\nimport { withRouter } from 'react-router-dom';\nimport { inject, observer } from 'mobx-react';\n/** @jsx jsx */\nimport { css, jsx } from '@emotion/core';\nimport * as styles from './Invoice.css';\nimport { formatDate } from '../../helpers/formatDate';\nimport { Button, TextField, Tooltip } from '@material-ui/core';\nimport Lines from './Lines';\n\n@withRouter\n@inject('rootStore')\n@observer\nclass SingleInvoice extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n taxError: false,\n shippingError: false,\n };\n }\n componentDidMount() {\n const {\n match: { params },\n } = this.props;\n this.props.rootStore.invoicesStore.setCurrentInvoice(params.id);\n this.onSave = this.onSave.bind(this);\n this.onCancel = this.onCancel.bind(this);\n }\n onSave() {\n if (\n +this.props.rootStore.invoicesStore.currentInvoice.shipping === 0 ||\n +this.props.rootStore.invoicesStore.currentInvoice.tax === 0\n ) {\n const errors = {\n taxError: false,\n shippingError: false,\n };\n\n if (+this.props.rootStore.invoicesStore.currentInvoice.shipping === 0) {\n errors.shippingError = true;\n }\n if (+this.props.rootStore.invoicesStore.currentInvoice.tax === 0) {\n errors.taxError = true;\n }\n this.setState(errors);\n return;\n }\n this.props.rootStore.invoicesStore.saveCurrentInvoice();\n this.setState({\n taxError: false,\n shippingError: false,\n });\n }\n onCancel() {\n const {\n match: { params },\n } = this.props;\n this.props.rootStore.invoicesStore.setCurrentInvoice(params.id);\n }\n render() {\n return (\n
\n

{this.props.rootStore.invoicesStore.currentInvoice.number}

\n {this.props.rootStore.invoicesStore.currentInvoice.number ? (\n
\n
\n
\n
Invoice Number:
\n

\n \n {this.props.rootStore.invoicesStore.currentInvoice.number}\n \n

\n
\n
\n
Invoice Date:
\n

\n \n {formatDate(\n this.props.rootStore.invoicesStore.currentInvoice\n .invoice_date\n )}\n \n

\n
\n
\n
Purchase Order:
\n

\n \n {this.props.rootStore.invoicesStore.currentInvoice.order}\n \n

\n
\n
\n
State:
\n

\n \n {this.props.rootStore.invoicesStore.currentInvoice.state}\n \n

\n
\n
\n
Delivery Type:
\n\n {this.props.rootStore.invoicesStore.currentInvoice.state ===\n 'open' ? (\n {\n if (\n this.props.rootStore.invoicesStore.currentInvoice\n .delivery_type &&\n this.props.rootStore.invoicesStore.currentInvoice\n .delivery_type.length < 256\n ) {\n this.props.rootStore.invoicesStore.currentInvoice.delivery_type =\n el.target.value;\n }\n }}\n >\n ) : (\n

\n \n {\n this.props.rootStore.invoicesStore.currentInvoice\n .delivery_type\n }\n \n

\n )}\n
\n
\n
\n
\n
Supplier:
\n

\n \n {this.props.rootStore.invoicesStore.currentInvoice.supplier}\n \n

\n
\n
\n
Currency:
\n

\n \n {this.props.rootStore.invoicesStore.currentInvoice.currency}\n \n

\n
\n
\n
Purchaser:
\n

\n \n {\n this.props.rootStore.invoicesStore.currentInvoice\n .purchaser\n }\n \n

\n
\n
\n
Delivery Terms:
\n {this.props.rootStore.invoicesStore.currentInvoice.state ===\n 'open' ? (\n {\n if (\n this.props.rootStore.invoicesStore.currentInvoice\n .delivery_terms &&\n this.props.rootStore.invoicesStore.currentInvoice\n .delivery_terms.length < 256\n ) {\n this.props.rootStore.invoicesStore.currentInvoice.delivery_terms =\n el.target.value;\n }\n }}\n >\n ) : (\n

\n \n {\n this.props.rootStore.invoicesStore.currentInvoice\n .delivery_terms\n }\n \n

\n )}\n
\n
\n
\n
\n
\n Freight Cost (\n {this.props.rootStore.invoicesStore.currentInvoice.currency})\n *:\n
\n {this.props.rootStore.invoicesStore.currentInvoice.state ===\n 'open' ? (\n {\n if (event.target.value > -1) {\n this.props.rootStore.invoicesStore.currentInvoice.shipping_amount =\n event.target.value;\n this.props.rootStore.invoicesStore.currentInvoice.shipping_tax_amount =\n parseFloat(event.target.value) *\n this.props.rootStore.invoicesStore.currentInvoice\n .shipping_tax_percentage *\n 0.01;\n this.props.rootStore.invoicesStore.currentInvoice.total_freight =\n +this.props.rootStore.invoicesStore.currentInvoice\n .shipping_amount;\n this.props.rootStore.invoicesStore.recalculateLines();\n } else if (event.target.value < 0) {\n event.target.value = 0;\n this.props.rootStore.invoicesStore.currentInvoice.shipping_amount =\n event.target.value;\n this.props.rootStore.invoicesStore.currentInvoice.shipping_tax_amount =\n parseFloat(event.target.value) *\n this.props.rootStore.invoicesStore.currentInvoice\n .shipping_tax_percentage *\n 0.01;\n this.props.rootStore.invoicesStore.currentInvoice.total_freight =\n +this.props.rootStore.invoicesStore.currentInvoice\n .shipping_amount;\n this.props.rootStore.invoicesStore.recalculateLines();\n }\n }}\n type=\"number\"\n margin=\"normal\"\n />\n ) : (\n

\n \n {this.props.rootStore.invoicesStore.currentInvoice\n .shipping_amount\n ? this.props.rootStore.invoicesStore.currentInvoice.shipping_amount.toFixed(\n 2\n )\n : 0}\n \n

\n )}\n
\n
\n
\n Handling Cost (\n {this.props.rootStore.invoicesStore.currentInvoice.currency})\n *:\n
\n {this.props.rootStore.invoicesStore.currentInvoice.state ===\n 'open' ? (\n {\n \n if (event.target.value > -1) {\n this.props.rootStore.invoicesStore.currentInvoice.total_handling =\n event.target.value;\n \n this.props.rootStore.invoicesStore.recalculateLines_handling();\n } else if (event.target.value < 0) {\n event.target.value = 0;\n this.props.rootStore.invoicesStore.currentInvoice.shipping_amount =\n event.target.value;\n this.props.rootStore.invoicesStore.currentInvoice.shipping_tax_amount =\n parseFloat(event.target.value) *\n this.props.rootStore.invoicesStore.currentInvoice\n .shipping_tax_percentage *\n 0.01;\n this.props.rootStore.invoicesStore.currentInvoice.total_handling =\n +this.props.rootStore.invoicesStore.currentInvoice\n .shipping_amount;\n this.props.rootStore.invoicesStore.recalculateLines();\n }\n }}\n type=\"number\"\n margin=\"normal\"\n />\n ) : (\n

\n \n {this.props.rootStore.invoicesStore.currentInvoice\n .total_handling\n ? this.props.rootStore.invoicesStore.currentInvoice.total_handling.toFixed(\n 2\n )\n : 0}\n \n

\n )}\n
\n
\n
Invoice Total Value:
\n

\n \n {this.props.rootStore.invoicesStore.currentInvoice.net_amount.toFixed(\n 2\n )}\n \n

\n
\n
\n
Custom Duty Amout:
\n

\n \n {parseFloat(\n this.props.rootStore.invoicesStore.currentInvoice.cda\n ).toFixed(2)}\n \n

\n
\n
\n
Invoice GST/VAT:
\n

\n \n {parseFloat(\n this.props.rootStore.invoicesStore.currentInvoice.vat\n ).toFixed(2)}\n \n

\n
\n
\n
\n Total weight, Kg{' '}\n \n \n {' '}\n :{' '}\n
\n

\n \n {this.props.rootStore.invoicesStore.currentInvoice.weight\n ? this.props.rootStore.invoicesStore.currentInvoice.weight.toFixed(\n 3\n )\n : 0}\n \n

\n
\n
\n
\n ) : null}\n
\n

\n Calculated Totals\n

\n

\n Tax Total:{' '}\n \n {(\n +parseFloat(\n this.props.rootStore.invoicesStore.currentInvoice.vat\n ) +\n +parseFloat(\n this.props.rootStore.invoicesStore.currentInvoice.cda\n )\n ).toFixed(2) +\n ' ' +\n this.props.rootStore.invoicesStore.currentInvoice.currency}\n \n

\n

\n Invoice Total(Including Tax):{' '}\n \n {(\n +this.props.rootStore.invoicesStore.currentInvoice.net_amount +\n +parseFloat(\n this.props.rootStore.invoicesStore.currentInvoice.vat\n ) +\n +parseFloat(\n this.props.rootStore.invoicesStore.currentInvoice.cda\n )\n ).toFixed(2)}\n \n

\n
\n\n
\n this.onSave()}\n >\n Save\n \n {this.props.rootStore.uiStateStore.showSubmit ||\n (this.props.rootStore.invoicesStore.currentInvoice.shipping &&\n this.props.rootStore.invoicesStore.currentInvoice.tax &&\n this.props.rootStore.invoicesStore.currentInvoice.state !==\n 'New') ? (\n \n ) : null}\n \n
\n \n
\n );\n }\n}\n\nexport default SingleInvoice;\n","import React from 'react';\nimport { withRouter } from 'react-router-dom';\nimport { inject, observer } from 'mobx-react';\nimport {\n Grid,\n Table,\n TableHeaderRow,\n TableColumnResizing,\n PagingPanel,\n VirtualTable,\n} from '@devexpress/dx-react-grid-material-ui';\nimport { PagingState, IntegratedPaging } from '@devexpress/dx-react-grid';\n/** @jsx jsx */\nimport { css, jsx } from '@emotion/core';\nimport * as styles from './Suppliers.css';\n\nconst CustomizedHeader = ({ ...restProps }) => (\n \n);\nconst CustomizedTable = ({ ...restProps }) => (\n \n);\n\nconst CustomizedPanel = ({ ...restProps }) => (\n \n);\n\n@withRouter\n@inject('rootStore')\n@observer\nclass CatalogueProduct extends React.PureComponent {\n componentDidMount() {\n const {\n match: { params },\n } = this.props;\n this.props.rootStore.suppliersStore.setCurrentSupplierCatalogue(params.id);\n }\n render() {\n const columns = [\n { name: 'product_code', title: 'Product Code' },\n { name: 'brand', title: 'Brand' },\n { name: 'description', title: 'Description' },\n { name: 'sell_unit_price', title: 'Sell unit' },\n { name: 'sell_unit_tax_percentage', title: 'Sell Unit Tax, %' },\n ];\n const columnWidths = [\n { columnName: 'product_code', width: 400 },\n { columnName: 'brand', width: 420 },\n { columnName: 'description', width: 120 },\n { columnName: 'sell_unit_price', width: 120 },\n { columnName: 'sell_unit_tax_percentage', width: 120 },\n ];\n return (\n
\n \n \n \n \n \n \n \n \n
\n );\n }\n}\n\nexport default CatalogueProduct;\n","import React from 'react';\nimport { withRouter } from 'react-router-dom';\nimport { inject, observer } from 'mobx-react';\nimport {\n Grid,\n Table,\n TableHeaderRow,\n TableColumnResizing,\n PagingPanel,\n VirtualTable,\n} from '@devexpress/dx-react-grid-material-ui';\nimport {\n PagingState,\n IntegratedPaging,\n DataTypeProvider,\n} from '@devexpress/dx-react-grid';\n/** @jsx jsx */\nimport { css, jsx } from '@emotion/core';\nimport * as styles from './Orders.css';\nimport { TextField } from '@material-ui/core';\n\nconst CustomizedHeader = ({ ...restProps }) => (\n \n);\nconst CustomizedTable = ({ ...restProps }) => (\n \n);\n\nconst CustomizedPanel = ({ ...restProps }) => (\n \n);\n\n@withRouter\n@inject('rootStore')\n@observer\nclass OrderLines extends React.PureComponent {\n constructor(props) {\n super(props);\n this.state = {\n activeInput: -1,\n activeName: '',\n searchString: '',\n };\n this.checker = 0;\n this.turn = 1;\n }\n search() {\n this.props.rootStore.ordersStore.fetchCurrentOrderLines(\n this.props.rootStore.ordersStore.currentOrder.number,\n this.state.searchString\n );\n this.checker = 0;\n }\n\n render() {\n const totalCell = (el) => {\n return
{parseFloat(el.value).toFixed(2)}
;\n };\n\n const TotalCellProvider = (props) => {\n return ;\n };\n const columns = [\n { name: 'description', title: 'Description' },\n { name: 'unit_price', title: 'Unit Price' },\n { name: 'product_item_sell_pack_name', title: 'Pack' },\n { name: 'quantity', title: 'Quantity' },\n { name: 'product_description', title: 'Product Description' },\n { name: 'weight', title: 'Unit Weight, Kg' },\n { name: 'line_tax', title: 'Tax Amount' },\n { name: 'freight_insurance', title: 'Freight Insurance' },\n { name: 'freight_cost', title: 'Freight Cost' },\n { name: 'discount_total', title: 'Discount Total' },\n { name: 'line_total', title: 'Line Total' },\n ];\n const columnWidths = [\n { columnName: 'unit_price', width: 120 },\n { columnName: 'description', width: 320 },\n { columnName: 'quantity', width: 120 },\n { columnName: 'product_item_sell_pack_name', width: 120 },\n { columnName: 'product_description', width: 120 },\n { columnName: 'weight', width: 120 },\n { columnName: 'line_total', width: 120 },\n { columnName: 'line_tax', width: 120 },\n { columnName: 'freight_insurance', width: 120 },\n { columnName: 'freight_cost', width: 120 },\n { columnName: 'discount_total', width: 120 },\n ];\n this.checker = 0;\n return (\n
\n
\n {\n if (e.key === 'Enter') {\n this.search();\n }\n }}\n onChange={(el) => {\n this.setState({\n searchString: el.target.value,\n });\n }}\n >\n this.search()}\n name=\"button\"\n >\n \n \n
\n {this.props.rootStore.ordersStore.lines ? (\n \n \n \n \n \n \n \n \n \n ) : null}\n
\n );\n }\n}\n\nexport default OrderLines;\n","import React from 'react';\nimport { withRouter } from 'react-router-dom';\n\n@withRouter\nclass NotFound extends React.PureComponent {\n constructor(props) {\n super(props);\n this.state = {\n error: this.props.error,\n };\n }\n render() {\n return this.state.error ? (\n
{this.state.error}
\n ) : (\n
Not Found
\n );\n }\n}\n\nexport default NotFound;\n","import React from 'react';\nimport { withRouter } from 'react-router-dom';\nimport { inject, observer } from 'mobx-react';\n/** @jsx jsx */\nimport { css, jsx } from '@emotion/core';\nimport * as styles from './Orders.css';\nimport { formatDate } from '../../helpers/formatDate';\nimport OrderLines from './OrderLines';\nimport { Button } from '@material-ui/core';\nimport NotFound from '../not-found/NotFound';\n\n@withRouter\n@inject('rootStore')\n@observer\nclass SingleOrder extends React.PureComponent {\n componentDidMount() {\n const {\n match: { params },\n } = this.props;\n this.props.rootStore.ordersStore.setCurrentOrder(params.id);\n }\n\n render() {\n return this.props.rootStore.ordersStore.currentOrder.number ? (\n
\n

{this.props.rootStore.ordersStore.currentOrder.number}

\n
\n
\n
\n
Order Number:
\n

\n {this.props.rootStore.ordersStore.currentOrder.number}\n

\n
\n
\n
Sent Date:
\n

\n \n {formatDate(\n this.props.rootStore.ordersStore.currentOrder.sent_date\n )}\n \n

\n
\n
State:
\n

\n {this.props.rootStore.ordersStore.currentOrder.status}\n

\n
\n
\n
\n
\n
\n
Supplier:
\n

\n {this.props.rootStore.ordersStore.currentOrder.supplier}\n

\n
\n
\n
Supplier Currency:
\n

\n \n {this.props.rootStore.ordersStore.currentOrder.currency\n ? this.props.rootStore.ordersStore.currentOrder.currency\n : 'USD'}\n \n

\n
\n
\n
Purchaser:
\n

\n \n {this.props.rootStore.ordersStore.currentOrder.purchaser_name}\n \n

\n
\n
\n
\n
\n
Total Value:
\n

\n \n {this.props.rootStore.ordersStore.currentOrder.total_value}\n \n

\n
\n
\n
Invoiced Total Value:
\n

\n \n {this.props.rootStore.ordersStore.currentOrder.invoiced_value}\n \n

\n
\n
\n
\n \n
\n {\n this.props.rootStore.ordersStore.generatePrint(\n this.props.rootStore.ordersStore.currentOrder.id\n );\n }}\n >\n Print\n \n
\n
\n ) : (\n \n );\n }\n}\n\nexport default SingleOrder;\n","import React from 'react';\nimport { withRouter } from 'react-router-dom';\nimport { inject, observer } from 'mobx-react';\nimport { Link } from 'react-router-dom';\n\n/** @jsx jsx */\nimport { jsx } from '@emotion/core';\nimport * as styles from './Main.css';\n\n@withRouter\n@inject('rootStore')\n@observer\nclass SideBar extends React.PureComponent {\n constructor(props) {\n super(props);\n this.state = {\n activeHidden: -1,\n };\n this.openSubMenu = this.openSubMenu.bind(this);\n this.displayHidden = this.displayHidden.bind(this);\n }\n\n openSubMenu(index) {\n const { uiStateStore } = this.props.rootStore;\n if (uiStateStore.isMenuTextVisible === true) {\n if (uiStateStore.activeMenu === index) {\n uiStateStore.activeMenu = -1;\n } else {\n uiStateStore.activeMenu = index;\n }\n }\n }\n\n displayHidden(index) {\n this.setState({\n activeHidden: index,\n });\n }\n\n render() {\n let { uiStateStore } = this.props.rootStore;\n return (\n \n
    \n {uiStateStore.menuLabels.map((item, index) =>\n item && item.title ? (\n
  • \n \n !uiStateStore.isMenuTextVisible && this.displayHidden(index)\n }\n onMouseLeave={() =>\n !uiStateStore.isMenuTextVisible && this.displayHidden(-1)\n }\n className={uiStateStore.activeMenu === index ? 'active' : ''}\n onClick={() => this.openSubMenu(index)}\n >\n \n \n {item.title}\n \n \n \n \n
  • \n {item.submenu.map((el) => (\n \n {el.name}\n \n ))}\n
  • \n
\n \n !uiStateStore.isMenuTextVisible && this.displayHidden(index)\n }\n onMouseLeave={() =>\n !uiStateStore.isMenuTextVisible && this.displayHidden(-1)\n }\n css={styles.hiddenMenu}\n className={this.state.activeHidden === index ? 'active' : ''}\n >\n {item.submenu.map((el) => (\n \n {el.name}\n \n ))}\n
\n \n ) : null\n )}\n \n \n );\n }\n}\n\nexport default SideBar;\n","import React from 'react';\nimport { withRouter } from 'react-router-dom';\nimport { inject, observer } from 'mobx-react';\nimport { Link } from 'react-router-dom';\n\n/** @jsx jsx */\nimport * as styles from './Main.css';\nimport { jsx } from '@emotion/core';\n\n@withRouter\n@inject('rootStore')\n@observer\nclass ToolBar extends React.PureComponent {\n constructor(props) {\n super(props);\n this.onChangeMenuItemTextVisibility =\n this.onChangeMenuItemTextVisibility.bind(this);\n this.logout = this.logout.bind(this);\n }\n\n onChangeMenuItemTextVisibility() {\n this.props.rootStore.uiStateStore.isMenuTextVisible =\n !this.props.rootStore.uiStateStore.isMenuTextVisible;\n this.props.rootStore.uiStateStore.activeMenu = -1;\n }\n\n logout() {\n this.props.rootStore.authStore\n .logout()\n .then(() => {\n this.props.rootStore.currentUser = {};\n this.props.rootStore.clearToken();\n this.props.history.replace('/login');\n })\n .catch((error) => console.log(error));\n }\n\n render() {\n return (\n
\n
\n \n
this.onChangeMenuItemTextVisibility()}>\n \n
\n
\n
\n \n \n
\n {this.props.rootStore.currentUser &&\n this.props.rootStore.currentUser.full_name ? (\n
\n \n \n
\n ) : null}\n {this.props.rootStore.currentUserOrg &&\n this.props.rootStore.currentUserOrg.name ? (\n
\n \n \n
\n ) : null}\n
\n );\n }\n}\n\nexport default ToolBar;\n","import React from 'react';\nimport { withRouter } from 'react-router-dom';\nimport { inject, observer } from 'mobx-react';\nimport { Route, Switch } from 'react-router-dom';\n\n/** @jsx jsx */\nimport * as styles from './Main.css';\nimport { jsx } from '@emotion/core';\nimport MainWidget from './MainWidget';\nimport Rates from '../rates/Rates';\nimport Suppliers from '../suppliers/Suppliers';\nimport HotelItemMatching from '../hotelItemMatching/HotelItemMatching';\nimport PrivateRoute from '../privateRoute/PrivateRoute';\nimport OrderPage from '../orders/OrderPage';\nimport Invoice from '../invoice/Invoice';\nimport SingleInvoice from '../invoice/SingleInvoice';\nimport { Button } from '@material-ui/core';\nimport { reaction } from 'mobx';\nimport CatalogueProduct from '../suppliers/CatalugueProduct';\nimport SingleOrder from '../orders/SingleOrder';\nimport SideBar from './SideBar';\nimport ToolBar from './ToolBar';\n@withRouter\n@inject('rootStore')\n@observer\nclass Main extends React.PureComponent {\n constructor(props) {\n super(props);\n this.changeRole = this.changeRole.bind(this);\n }\n\n componentDidMount() {\n if (this.props.rootStore.currentUserOrg.name) {\n this.props.rootStore.ordersStore.fetchAvailableRates();\n }\n reaction(\n () => this.props.rootStore.currentUserOrg,\n () => {\n this.props.rootStore.ordersStore.fetchAvailableRates();\n }\n );\n }\n\n changeRole() {\n this.props.rootStore.authStore.changeRole();\n }\n\n render() {\n return (\n
\n \n \n \n
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n {this.props.rootStore.currentUser.email ===\n 'varinee.chimpad@marketboomer.com' ? (\n this.changeRole()}\n >\n Change Role\n \n ) : null}\n
\n
\n
\n
\n \n );\n }\n}\n\nexport default Main;\n","import React from 'react';\nimport { BrowserRouter, Route, Switch } from 'react-router-dom';\nimport Login from './components/login/Login';\nimport { LastLocationProvider } from 'react-router-last-location';\nimport Main from './components/main/Main';\nimport { inject, observer } from 'mobx-react';\nimport PrivateRoute from './components/privateRoute/PrivateRoute';\nimport NotFound from './components/not-found/NotFound';\n\nconst App = inject('rootStore')(\n observer(({ rootStore }) => {\n return (\n \n \n \n \n \n \n \n \n \n );\n })\n);\nexport default App;\n","import { observable, action } from 'mobx';\nimport Axios from 'axios';\n\nclass AuthStore {\n constructor(rootStore) {\n this.rootStore = rootStore;\n }\n\n @observable inProgress = false;\n @observable errors = undefined;\n\n @observable values = {\n email: '',\n password: '',\n };\n\n @action setEmail(email) {\n this.values.email = email;\n }\n\n @action setPassword(password) {\n this.values.password = password;\n }\n\n @action reset() {\n this.values.email = '';\n this.values.password = '';\n }\n @action changeRole() {\n Axios.post(\n `${process.env.REACT_APP_API}/role`,\n null,\n this.rootStore.config()\n ).then((res) => {\n this.rootStore.getCurrentUserOrg();\n });\n }\n @action login() {\n const emailRegExp = /^\\w+([+.-]?\\w+)*@\\w+([.-]?\\w+)*(\\.\\w{2,3})+$/;\n if (emailRegExp.test(this.values.email)) {\n return Axios.post(`${process.env.REACT_APP_API}/login`, {\n email: this.values.email,\n password: this.values.password,\n });\n } else {\n return Promise.reject({\n message: 'Please enter a valid email address',\n });\n }\n }\n\n @action logout() {\n return Axios.delete(\n `${process.env.REACT_APP_API}/logout`,\n this.rootStore.config()\n );\n }\n}\n\nexport default AuthStore;\n","import { observable } from 'mobx';\n\nclass UiStateStore {\n constructor(rootStore) {\n this.rootStore = rootStore;\n }\n @observable menuLabels = [];\n @observable isMenuTextVisible = window.innerWidth > 1000 ? true : false;\n @observable activeMenu = -1;\n @observable showPopup = false;\n @observable showSubmit = false;\n @observable popupMessage = '';\n @observable spinner = false;\n}\n\nexport default UiStateStore;\n","import { observable, action } from 'mobx';\nimport Axios from 'axios';\n\nclass RatesStore {\n constructor(rootStore) {\n this.rootStore = rootStore;\n }\n @observable rates = [];\n\n @action fetchRates(date) {\n return Axios.get(\n `${process.env.REACT_APP_API}/rates?date=${date}&organisation=${this.rootStore.currentUserOrg.id}`,\n this.rootStore.config()\n ).then(this.fetchRatesSuccess, this.fetchRatesError);\n }\n @action.bound fetchRatesSuccess(response) {\n response.data.rates.sort((a, b) => {\n const textA = a.name.toUpperCase();\n const textB = b.name.toUpperCase();\n return textA < textB ? -1 : textA > textB ? 1 : 0;\n });\n this.rates = response.data.rates;\n\n this.rates.forEach((elem) => {\n elem.previewRate = elem.proccesedRate;\n elem.previewPositive = true;\n elem.previewMarkup = 0;\n });\n }\n @action.bound fetchRatesError(error) {\n console.log(error);\n }\n\n @action saveRates(promise) {\n const newRates = [];\n this.rates.forEach((elem) => {\n if (elem.previewRate !== elem.proccesedRate) {\n elem.proccesedRate = elem.previewRate;\n elem.markup = elem.previewMarkup;\n elem.positive = elem.previewPositive;\n newRates.push(elem);\n }\n });\n return promise\n ? Axios.post(\n `${process.env.REACT_APP_API}/rates`,\n { rates: newRates },\n this.rootStore.config()\n )\n : Axios.post(\n `${process.env.REACT_APP_API}/rates`,\n { rates: this.rates },\n this.rootStore.config()\n ).then(this.saveRatesSuccess, this.saveRatesError);\n }\n @action.bound saveRatesSuccess(response) {\n console.log(response);\n }\n @action.bound saveRatesError(error) {\n console.log(error);\n }\n}\n\nexport default RatesStore;\n","import { observable, action } from 'mobx';\nimport Axios from 'axios';\n\nclass SuppliersStore {\n constructor(rootStore) {\n this.rootStore = rootStore;\n }\n @observable suppliers = [];\n @observable proccessedSuppliers = [];\n @observable currentSupplier = {\n supplier_name: 'none',\n };\n @observable currentSupplierCatalogues = [];\n @observable currentCatalogue = {\n title: 'none',\n };\n @observable currentCatalogueProducts = [];\n @action setCurrentSupplierCatalogue(p_id) {\n this.currentSupplierCatalogues.forEach((el) => {\n if (el.p_id === p_id) {\n this.currentSupplier = el;\n }\n });\n this.fetchCatalogueProducts(p_id);\n }\n @action setCurrentSupplier(name) {\n this.suppliers.forEach((el) => {\n if (el.supplier_name === name) {\n this.currentSupplier = el;\n }\n });\n this.fetchSupplierCatalogues();\n }\n\n @action fetchCatalogueProducts(id) {\n return Axios.get(\n `${process.env.REACT_APP_API}/catalogues/products?id=${id}`,\n this.rootStore.config()\n ).then(\n this.fetchCatalogueProductsSuccess,\n this.fetchCatalogueProductsError\n );\n }\n\n @action.bound fetchCatalogueProductsSuccess(response) {\n this.currentCatalogueProducts = response.data.products;\n }\n @action.bound fetchCatalogueProductsError(error) {\n console.log(error);\n }\n\n @action fetchSupplierCatalogues(name) {\n if (name) {\n return Axios.get(\n `${process.env.REACT_APP_API}/suppliers/catalogues?name=${name}`,\n this.rootStore.config()\n ).then(\n this.fetchSupplierCataloguesSuccess,\n this.fetchSupplierCataloguesError\n );\n }\n return Axios.get(\n `${process.env.REACT_APP_API}/suppliers/catalogues`,\n this.rootStore.config()\n ).then(\n this.fetchSupplierCataloguesSuccess,\n this.fetchSupplierCataloguesError\n );\n }\n\n @action.bound fetchSupplierCataloguesSuccess(response) {\n this.currentSupplierCatalogues = response.data.result;\n }\n @action.bound fetchSupplierCataloguesError(error) {\n console.log(error);\n }\n\n @action fetchSuppliers(id, name) {\n if (name) {\n return Axios.get(\n `${process.env.REACT_APP_API}/suppliers?id=${id}&name=${name}`,\n this.rootStore.config()\n ).then(this.fetchSuppliersSuccess, this.fetchSuppliersError);\n }\n return Axios.get(\n `${process.env.REACT_APP_API}/suppliers?id=${id}`,\n this.rootStore.config()\n ).then(this.fetchSuppliersSuccess, this.fetchSuppliersError);\n }\n @action.bound fetchSuppliersSuccess(response) {\n this.suppliers = response.data.suppliers;\n this.proccessedSuppliers = [];\n this.suppliers.forEach((sup) => {\n this.proccessedSuppliers.push({\n edit: 'edit',\n supplierNumber: sup.supplier_number,\n supplierBNumber: '',\n supplier: sup.supplier_name,\n preferredSupplier: '',\n enable: !!sup.is_enabled,\n isBillable: '',\n purchaserPricePreferred: '',\n discountRate: '',\n emailAddress: '',\n punchoutEnabled: '',\n defaultDepartment: '',\n defaultAccount: '',\n defaultCategory: '',\n locationCode: '',\n invoicingContacts: '',\n formatMapped: '',\n contact: '',\n terms: '',\n promote: '',\n });\n });\n }\n @action.bound fetchSuppliersError(error) {\n console.log(error);\n }\n}\n\nexport default SuppliersStore;\n","const mapper = {\n MVR: 'Maldivian rufiyaa',\n JPY: 'Japanese yen',\n SGD: 'Singapore dollar',\n CNY: 'Renminbi',\n THB: 'Thai baht',\n VND: 'Vietnamese dong',\n AUD: 'Australian dollar',\n AED: 'United Arab Emirates dirham',\n LKR: 'Sri Lankan rupee',\n INR: 'Indian rupee',\n EUR: 'Euro',\n IDR: 'Indonesian rupiah',\n GBP: 'Pound sterling',\n};\nexport const currencyMapper = (cyrrencies) => {\n if (cyrrencies && cyrrencies.length > 0) {\n cyrrencies.forEach((cyrrency) => {\n cyrrency.full = `${cyrrency.name}(${mapper[cyrrency.name]})`;\n });\n }\n return cyrrencies;\n};\n","import { observable, action } from 'mobx';\nimport Axios from 'axios';\nimport { currencyMapper } from '../helpers/currencyMapper';\n\nclass OrdersStore {\n constructor(rootStore) {\n this.rootStore = rootStore;\n }\n @observable orders = [];\n @observable updatedOrders = [];\n @observable availableRates = [];\n @observable idsForReport = [];\n @observable currentOrder = {};\n @observable ordersCount = 0;\n @observable ordersTablePage = 0;\n @observable lines = [];\n @observable updatedIdsForReport = [];\n @observable preferredRate = {};\n\n @action setCurrentOrder(value) {\n let query = `${process.env.REACT_APP_API}/order?number=${value}`;\n return Axios.get(query, this.rootStore.config()).then(\n this.currentOrderSuccess,\n this.currentOrderError\n );\n }\n @action.bound currentOrderSuccess(response) {\n this.currentOrder = response.data.order;\n this.fetchCurrentOrderLines(this.currentOrder.p_id);\n }\n @action.bound currentOrderError(error) {\n console.log(error);\n }\n @action fetchCurrentOrderLines(value, search) {\n let query = `${process.env.REACT_APP_API}/order/lines?id=${value}`;\n if (search) {\n query += `&search=${search}`;\n }\n return Axios.get(query, this.rootStore.config()).then(\n this.fetchCurrentOrderSuccess,\n this.fetchCurrentOrderError\n );\n }\n @action.bound fetchCurrentOrderSuccess(response) {\n this.lines = response.data.lines;\n }\n @action.bound fetchCurrentOrderError(error) {\n console.log(error);\n }\n @action fetchOrders(id, search, sf, st, df, dt, skip, count) {\n let query = `${process.env.REACT_APP_API}/orders`;\n if (this.rootStore.currentUserOrg.is_a_supplier) {\n query += `?name=${id}`;\n } else {\n query += `?id=${id}`;\n }\n if (count) {\n query += `&count=${count}`;\n }\n if (search) {\n query += `&search=${search}`;\n }\n if (sf) {\n query += `&sf=${sf}`;\n }\n if (st) {\n query += `&st=${st}`;\n }\n if (df) {\n query += `&df=${df}`;\n }\n if (dt) {\n query += `&dt=${dt}`;\n }\n if (skip) {\n query += `&skip=${skip}`;\n }\n return Axios.get(query, this.rootStore.config()).then(\n this.fetchOrdersSuccess,\n this.fetchOrdersError\n );\n }\n @action.bound fetchOrdersSuccess(response) {\n this.updatedOrders = response.data.orders;\n if (this.preferredRate && this.preferredRate.rate) {\n this.updatedOrders.forEach((order) => {\n order.invoiced_value_favorite = (\n order.invoiced_value * this.preferredRate.rate\n ).toFixed(2);\n order.total_value_favorite = (\n order.total_value * this.preferredRate.rate\n ).toFixed(2);\n });\n }\n }\n @action.bound fetchOrdersError(error) {\n console.log(error);\n }\n @action getReport(id, all) {\n let query = `${process.env.REACT_APP_API}/orders/generate`;\n if (this.rootStore.currentUserOrg.is_a_supplier) {\n query += `?name=${id}`;\n } else {\n query += `?id=${id}`;\n }\n if (all) {\n const idsForReport = [];\n this.rootStore.ordersStore.orders.forEach((order) => {\n idsForReport.push(order.id);\n });\n idsForReport.sort();\n return Axios.post(\n query,\n { ids: idsForReport },\n { ...this.rootStore.config(), responseType: 'blob' }\n ).then(this.getReportSuccess, this.getReportError);\n }\n return Axios.post(\n query,\n { ids: this.idsForReport },\n { ...this.rootStore.config(), responseType: 'blob' }\n ).then(this.getReportSuccess, this.getReportError);\n }\n @action getUpdatedReport(id, all) {\n let query = `${process.env.REACT_APP_API}/orders/generate/updated`;\n if (this.rootStore.currentUserOrg.is_a_supplier) {\n query += `?name=${id}`;\n } else {\n query += `?id=${id}`;\n }\n if (all) {\n const idsForReport = [];\n this.rootStore.ordersStore.updatedOrders.forEach((order) => {\n idsForReport.push(order.id);\n });\n idsForReport.sort();\n return Axios.post(\n query,\n { ids: idsForReport },\n { ...this.rootStore.config(), responseType: 'blob' }\n ).then(this.getReportSuccess, this.getReportError);\n }\n return Axios.post(\n query,\n { ids: this.updatedIdsForReport },\n { ...this.rootStore.config(), responseType: 'blob' }\n ).then(this.getReportSuccess, this.getReportError);\n }\n @action.bound getReportSuccess(response) {\n const url = window.URL.createObjectURL(new Blob([response.data]));\n const link = document.createElement('a');\n link.href = url;\n const utc = new Date(new Date().toJSON().slice(0, 10).replace(/-/g, '-'));\n const fileName = `PO_${utc}.csv`;\n link.setAttribute('download', fileName);\n document.body.appendChild(link);\n link.click();\n link.remove();\n }\n @action.bound getReportError(error) {\n console.log(error);\n }\n @action fetchUpdatedOrders(id, search, sf, st, df, dt, skip, count) {\n let query = `${process.env.REACT_APP_API}/orders/updated`;\n if (this.rootStore.currentUserOrg.is_a_supplier) {\n query += `?name=${id}`;\n } else {\n query += `?id=${id}`;\n }\n if (count) {\n query += `&count=${count}`;\n }\n if (search) {\n query += `&search=${search}`;\n }\n if (sf) {\n query += `&sf=${sf}`;\n }\n if (st) {\n query += `&st=${st}`;\n }\n if (df) {\n query += `&df=${df}`;\n }\n if (dt) {\n query += `&dt=${dt}`;\n }\n if (skip) {\n query += `&skip=${skip}`;\n }\n return Axios.get(query, this.rootStore.config()).then(\n this.fetchUpdatedOrdersSuccess,\n this.fetchUpdatedOrdersError\n );\n }\n @action recalculateOrders() {\n if (this.preferredRate && this.preferredRate.rate) {\n this.updatedOrders.forEach((order) => {\n if (order.currency === 'USD') {\n order.invoiced_value_usd = order.invoiced_value;\n order.total_value_usd = order.total_value;\n order.invoiced_value_favorite = (\n order.invoiced_value * +this.preferredRate.rate\n ).toFixed(2);\n order.total_value_favorite = (\n order.total_value * +this.preferredRate.rate\n ).toFixed(2);\n } else {\n order.invoiced_value_usd = (\n order.invoiced_value / order.rate\n ).toFixed(2);\n order.total_value_usd = (order.total_value / order.rate).toFixed(2);\n order.invoiced_value_favorite = (\n (order.invoiced_value / order.rate) *\n +this.preferredRate.rate\n ).toFixed(2);\n order.total_value_favorite = (\n (order.total_value / order.rate) *\n +this.preferredRate.rate\n ).toFixed(2);\n }\n });\n }\n }\n @action.bound fetchUpdatedOrdersSuccess(response) {\n if (response.data.count) {\n this.ordersCount = response.data.count;\n }\n if (this.preferredRate && this.preferredRate.rate) {\n response.data.updatedOrders.forEach((order) => {\n if (order.currency === 'USD') {\n order.invoiced_value_usd = order.invoiced_value;\n order.total_value_usd = order.total_value;\n order.invoiced_value_favorite = (\n order.invoiced_value * +this.preferredRate.rate\n ).toFixed(2);\n order.total_value_favorite = (\n order.total_value * +this.preferredRate.rate\n ).toFixed(2);\n } else {\n order.invoiced_value_usd = (\n order.invoiced_value / order.rate\n ).toFixed(2);\n order.total_value_usd = (order.total_value / order.rate).toFixed(2);\n order.invoiced_value_favorite = (\n (order.invoiced_value / order.rate) *\n +this.preferredRate.rate\n ).toFixed(2);\n order.total_value_favorite = (\n (order.total_value / order.rate) *\n +this.preferredRate.rate\n ).toFixed(2);\n }\n });\n }\n this.updatedOrders = response.data.updatedOrders;\n }\n @action.bound fetchUpdatedOrdersError(error) {\n console.log(error);\n }\n @action fetchAvailableRates() {\n return Axios.get(\n `${process.env.REACT_APP_API}/rates/availableRates`,\n this.rootStore.config()\n ).then(this.fetchAvailableRatesSuccess, this.fetchAvailableRatesError);\n }\n @action.bound fetchAvailableRatesSuccess(response) {\n this.availableRates = currencyMapper(response.data.availableRates);\n this.fetchPreferredRate();\n }\n @action.bound fetchAvailableRatesError(error) {\n console.log(error);\n }\n @action generatePrint(id) {\n return Axios.get(\n `${process.env.REACT_APP_API}/orders/print?id=${id}`,\n this.rootStore.config()\n ).then(this.generatePrintSuccess, this.generatePrintError);\n }\n @action.bound generatePrintSuccess(response) {\n const win = window.open('about:blank');\n win.document.write(response.data);\n }\n @action.bound generatePrintError(error) {\n console.log(error);\n }\n @action fetchPreferredRate() {\n return Axios.get(\n `${process.env.REACT_APP_API}/rates/preferredRate?organisation=${this.rootStore.currentUserOrg.id}`,\n this.rootStore.config()\n ).then(this.fetchPreferredRateSuccess, this.fetchPreferredRateError);\n }\n @action.bound fetchPreferredRateSuccess(response) {\n if (\n this.preferredRate.name === 'USD' &&\n response.data.rate.rate !== 'USD'\n ) {\n const param = this.rootStore.currentUserOrg.is_a_supplier\n ? this.rootStore.currentUserOrg.name\n : this.rootStore.currentUserOrg.p_id;\n this.rootStore.ordersStore.fetchUpdatedOrders(param);\n }\n this.preferredRate = response.data.rate;\n }\n @action.bound fetchPreferredRateError(error) {\n console.log(error);\n }\n @action setPreferredCurrency(name) {\n this.rootStore.uiStateStore.spinner = true;\n return Axios.post(\n `${process.env.REACT_APP_API}/orders/updated`,\n { rate: name },\n this.rootStore.config()\n ).then(this.setPreferredCurrencySuccess, this.setPreferredCurrencyError);\n }\n @action.bound setPreferredCurrencySuccess(response) {\n this.rootStore.uiStateStore.spinner = false;\n this.fetchPreferredRate();\n }\n @action.bound setPreferredCurrencyError(error) {\n this.rootStore.uiStateStore.spinner = false;\n console.log(error);\n }\n}\n\nexport default OrdersStore;\n","import { observable, action } from 'mobx';\nimport Axios from 'axios';\nimport { formatDate } from '../helpers/formatDate';\n\nclass InvoicesStore {\n constructor(rootStore) {\n this.rootStore = rootStore;\n }\n\n @observable invoices = [];\n @observable checkedStatuses = [];\n @observable invoicesAcsSort = true;\n @observable currentInvoice = {};\n @observable invoicesTablePage = 0;\n @observable idsForReport = [];\n @observable lines = [];\n @observable invoicesCount = 0;\n\n @action getReport(all) {\n let query = `${process.env.REACT_APP_API}/invoice/generate?name=${this.rootStore.currentUserOrg.name}`;\n if (all) {\n const idsForReport = [];\n this.invoices.forEach((invoice) => {\n idsForReport.push(invoice.id);\n });\n idsForReport.sort();\n return Axios.post(\n query,\n { ids: idsForReport },\n { ...this.rootStore.config(), responseType: 'blob' }\n ).then(this.getReportSuccess, this.getReportError);\n }\n return Axios.post(\n query,\n { ids: this.idsForReport },\n { ...this.rootStore.config(), responseType: 'blob' }\n ).then(this.getReportSuccess, this.getReportError);\n }\n\n @action.bound getReportSuccess(response) {\n const url = window.URL.createObjectURL(new Blob([response.data]));\n const link = document.createElement('a');\n link.href = url;\n const fileName = `Invoices_${formatDate(new Date())}.csv`;\n link.setAttribute('download', fileName);\n document.body.appendChild(link);\n link.click();\n link.remove();\n }\n\n @action setCurrentInvoice(value) {\n let query = `${process.env.REACT_APP_API}/invoice?number=${value}`;\n return Axios.get(query, this.rootStore.config()).then(\n this.currentInvoiceSuccess,\n this.currentInvoiceError\n );\n }\n @action.bound currentInvoiceSuccess(response) {\n response.data.invoice.gross_amount_usd = +(\n response.data.invoice.gross_amount / response.data.invoice.rate\n ).toFixed(2);\n response.data.invoice.total_tax_usd = +(\n response.data.invoice.total_tax / response.data.invoice.rate\n ).toFixed(2);\n response.data.invoice.shipping_amount_usd = +(\n response.data.invoice.shipping_amount / response.data.invoice.rate\n ).toFixed(2);\n this.currentInvoice = response.data.invoice;\n this.fetchCurrentInvoiceLines(this.currentInvoice.p_id);\n }\n @action.bound currentInvoiceError(error) {\n console.log(error);\n }\n @action fetchCurrentInvoiceLines(value, search) {\n let query = `${process.env.REACT_APP_API}/invoice/lines?id=${value}`;\n if (search) {\n query += `&search=${search}`;\n }\n return Axios.get(query, this.rootStore.config()).then(\n this.fetchCurrentInvoiceSuccess,\n this.fetchCurrentInvoiceError\n );\n }\n @action.bound fetchCurrentInvoiceSuccess(response) {\n if (response.data.lines && response.data.lines.length > 0) {\n this.currentInvoice.weight = 0;\n this.currentInvoice.vat = 0;\n this.currentInvoice.cda = 0;\n this.currentInvoice.net_amount = 0;\n response.data.lines.forEach((line) => {\n this.currentInvoice.weight += +line.weight * line.quantity;\n });\n const propo =\n this.currentInvoice.total_freight / this.currentInvoice.weight;\n response.data.lines.forEach((line) => {\n line.freight_cost =\n isNaN(propo) || !isFinite(propo)\n ? 0\n : propo * line.weight * line.quantity;\n line.line_total_sum = +line.line_total + +line.freight_cost;\n this.currentInvoice.vat +=\n +line.line_total_sum * line.tax_percentage * 0.01;\n this.currentInvoice.cda +=\n +line.line_total_sum * line.tax_percentage_cda * 0.01;\n this.currentInvoice.net_amount += +line.line_total_sum;\n });\n }\n this.lines = response.data.lines;\n }\n @action recalculateLines() {\n this.currentInvoice.weight = 0;\n this.currentInvoice.net_amount = 0;\n this.currentInvoice.vat = 0;\n this.currentInvoice.cda = 0;\n this.lines.forEach((line) => {\n this.currentInvoice.weight += +line.weight * line.quantity;\n });\n const propo =\n this.currentInvoice.total_freight / this.currentInvoice.weight;\n this.currentInvoice.gross_amount =\n parseFloat(this.currentInvoice.net_amount) +\n parseFloat(this.currentInvoice.total_tax);\n this.lines.forEach((line) => {\n line.freight_cost =\n isNaN(propo) || !isFinite(propo)\n ? 0\n : propo * line.weight * line.quantity;\n line.line_total_sum = +line.line_total +line.handling_cost +line.freight_cost;\n this.currentInvoice.vat +=\n +line.line_total_sum * line.tax_percentage * 0.01;\n this.currentInvoice.cda +=\n +line.line_total_sum * line.tax_percentage_cda * 0.01;\n this.currentInvoice.net_amount += +line.line_total_sum;\n });\n }\n @action recalculateLines_handling() {\n this.currentInvoice.weight = 0;\n this.currentInvoice.net_amount = 0;\n this.currentInvoice.vat = 0;\n this.currentInvoice.cda = 0;\n this.lines.forEach((line) => {\n this.currentInvoice.weight += +line.weight * line.quantity;\n });\n\n const propo =\n this.currentInvoice.total_handling / this.currentInvoice.weight;\n this.currentInvoice.gross_amount =\n parseFloat(this.currentInvoice.net_amount) +\n parseFloat(this.currentInvoice.total_tax);\n this.lines.forEach((line) => {\n line.handling_cost =\n isNaN(propo) || !isFinite(propo)\n ? 0\n : propo * line.weight * line.quantity;\n line.line_total_sum = +line.line_total +line.handling_cost +line.freight_cost;\n this.currentInvoice.vat +=\n +line.line_total_sum * line.tax_percentage * 0.01;\n this.currentInvoice.cda +=\n +line.line_total_sum * line.tax_percentage_cda * 0.01;\n this.currentInvoice.net_amount += +line.line_total_sum;\n });\n }\n @action.bound fetchCurrentInvoiceError(error) {\n console.log(error);\n }\n @action fetchInvoices(name, search, sf, st, skip, count) {\n let query = `${process.env.REACT_APP_API}/invoices?name=${name}`;\n if (this.invoicesAcsSort) {\n query += `&asc=${this.invoicesAcsSort}`;\n }\n if (search) {\n query += `&search=${search}`;\n }\n if (sf) {\n query += `&sf=${sf}`;\n }\n if (st) {\n query += `&st=${st}`;\n }\n if (skip) {\n query += `&skip=${skip}`;\n }\n if (count) {\n query += `&count=${count}`;\n }\n if (this.checkedStatuses) {\n query += `&status=${this.checkedStatuses}`;\n }\n return Axios.get(query, this.rootStore.config()).then(\n this.fetchInvoicesSuccess,\n this.fetchInvoicesError\n );\n }\n @action.bound fetchInvoicesSuccess(response) {\n if (response.data.count) {\n this.invoicesCount = response.data.count;\n }\n if (response.data.invoices && response.data.invoices.length > 0) {\n response.data.invoices.forEach((invoice) => {\n invoice.gross_amount = +(\n invoice.net_amount +\n +parseFloat(invoice.vat) +\n parseFloat(invoice.cda)\n ).toFixed(2);\n invoice.total_tax_sum = (\n +parseFloat(invoice.vat) + +parseFloat(invoice.cda)\n ).toFixed(2);\n invoice.total_tax_sum_usd = +(\n invoice.total_tax_sum / invoice.rate\n ).toFixed(2);\n invoice.gross_amount_usd = +(\n invoice.gross_amount / invoice.rate\n ).toFixed(2);\n invoice.total_tax_usd = +(invoice.total_tax / invoice.rate).toFixed(2);\n invoice.shipping_amount_usd = +(\n invoice.shipping_amount / invoice.rate\n ).toFixed(2);\n });\n }\n this.invoices = response.data.invoices;\n }\n @action.bound fetchInvoicesError(error) {\n console.log(error);\n }\n @action saveCurrentInvoice() {\n return Axios.post(\n `${process.env.REACT_APP_API}/invoice`,\n { invoice: this.currentInvoice },\n this.rootStore.config()\n ).then(this.saveCurrentInvoiceSuccess, this.saveCurrentInvoiceError);\n }\n @action.bound saveCurrentInvoiceSuccess(response) {\n this.rootStore.invoicesStore.setCurrentInvoice(\n response.data.invoice.number\n );\n }\n @action.bound saveCurrentInvoiceError(error) {\n console.log(error);\n }\n @action saveLines() {\n this.saveCurrentInvoice();\n return Axios.post(\n `${process.env.REACT_APP_API}/invoice/lines`,\n { lines: this.lines },\n this.rootStore.config()\n ).then(this.saveLinesSuccess, this.saveLinesError);\n }\n @action.bound saveLinesSuccess(response) {}\n @action.bound saveLinesError(error) {\n console.log(error);\n }\n}\n\nexport default InvoicesStore;\n","import { observable, action } from 'mobx';\nimport Axios from 'axios';\n\nclass ReceiversStore {\n constructor(rootStore) {\n this.rootStore = rootStore;\n }\n @observable receivers = [];\n @observable isModalOpen = false;\n\n @action fetchReceiver() {\n return Axios.get(\n `${process.env.REACT_APP_API}/receivers/fetch`,\n this.rootStore.config()\n ).then(this.fetchReceiverSuccess, this.fetchReceiverError);\n }\n @action.bound fetchReceiverSuccess(response) {\n if (response.data.receivers) {\n this.receivers = response.data.receivers;\n }\n }\n @action.bound fetchReceiverError(error) {\n console.log(error);\n }\n\n @action addReceiver(email) {\n return Axios.post(\n `${process.env.REACT_APP_API}/receivers/add?email=${email}`,\n null,\n this.rootStore.config()\n ).then(this.addReceiverSuccess, this.addReceiverError);\n }\n @action.bound addReceiverSuccess(response) {\n if (response.data.receiver) {\n this.receivers.push(response.data.receiver);\n }\n }\n @action.bound addReceiverError(error) {\n console.log(error);\n }\n\n @action removeReceiver(email) {\n return Axios.delete(\n `${process.env.REACT_APP_API}/receivers/remove?email=${email}`,\n this.rootStore.config()\n ).then(this.removeReceiverSuccess, this.removeReceiverError);\n }\n\n @action.bound removeReceiverSuccess(response) {\n console.log(response);\n }\n\n @action.bound removeReceiverError(error) {\n console.log(error);\n }\n}\n\nexport default ReceiversStore;\n","import { observable, action, decorate } from 'mobx';\nimport Cookie from 'mobx-cookie';\nimport Axios from 'axios';\n\nimport AuthStore from './auth';\nimport UiStateStore from './uistate';\nimport RatesStore from './rates';\nimport SuppliersStore from './suppliers';\nimport OrdersStore from './orders';\nimport InvoicesStore from './invoices';\nimport ReceiversStore from './receivers';\nexport default class RootStore {\n isAuthenticated = false;\n currentUser = {};\n currentUserOrg = {};\n token = new Cookie('session_token');\n appLoaded = false;\n\n constructor() {\n this.authStore = new AuthStore(this);\n this.uiStateStore = new UiStateStore(this);\n this.ratesStore = new RatesStore(this);\n this.suppliersStore = new SuppliersStore(this);\n this.ordersStore = new OrdersStore(this);\n this.invoicesStore = new InvoicesStore(this);\n this.receiversStore = new ReceiversStore(this);\n this.isAuthenticated = !!this.token.value;\n if (this.token.value) {\n this.getCurrentUser(this.token.value);\n }\n }\n\n setToken(token) {\n if (token) {\n this.token.set(token);\n this.isAuthenticated = !!this.token;\n }\n }\n\n clearToken() {\n this.token.remove();\n }\n\n setAppLoaded() {\n this.appLoaded = true;\n }\n\n getCurrentUser(token) {\n return Axios.get(\n `${process.env.REACT_APP_API}/user?token=${token}`,\n this.config()\n ).then(this.getUserSuccess, this.getUserError);\n }\n\n getUserSuccess(response) {\n this.currentUser = response.data.user;\n this.getCurrentUserOrg();\n this.isAuthenticated = true;\n }\n\n getUserError() {\n this.isAuthenticated = false;\n this.token.remove();\n }\n\n getCurrentUserOrg() {\n return Axios.get(\n `${process.env.REACT_APP_API}/currentOrg`,\n this.config()\n ).then(this.getCurrentUserOrgSuccess, this.getCurrentUserOrgError);\n }\n\n getCurrentUserOrgSuccess(response) {\n this.currentUserOrg = response.data.org;\n this.uiStateStore.menuLabels = this.currentUserOrg.is_a_supplier\n ? [\n {\n title: 'Purchase Order',\n submenu: [{ name: 'View PO', link: '/home/orders' }],\n },\n {\n title: 'Update Invoice',\n submenu: [{ name: 'View Invoices', link: '/home/invoices' }],\n },\n {\n title: 'Upload new catalogue',\n submenu: [],\n },\n {\n title: 'View Supplier',\n submenu: [\n { name: 'My Catalogues', link: '/home/suppliers/catalogues' },\n ],\n },\n ]\n : [\n {\n title: 'Update currency',\n submenu: [{ name: 'Rates', link: '/home/rates' }],\n },\n {\n title: 'Purchase Order',\n submenu: [{ name: 'View PO', link: '/home/orders' }],\n },\n {\n title: 'Update Invoice',\n submenu: [{ name: 'View Invoices', link: '/home/invoices' }],\n },\n {\n title: 'View Suppliers',\n submenu: [{ name: 'Suppliers', link: '/home/suppliers' }],\n },\n {\n title: 'Match Hotel Items',\n submenu: [{ name: 'MatchHotelItems', link: '/home/matching' }],\n },\n ];\n if (this.currentUserOrg.is_a_supplier) {\n this.suppliersStore.fetchSupplierCatalogues();\n }\n }\n\n getCurrentUserOrgError(response) {\n console.log(response);\n }\n\n config = () => {\n const token = this.token.value;\n return {\n headers: {\n Accept: 'application/json',\n 'Content-Type': 'application/json',\n Authorization: `Bearer ${token}`,\n },\n };\n };\n}\n\ndecorate(RootStore, {\n appLoaded: observable,\n isAuthenticated: observable,\n currentUser: observable,\n currentUserOrg: observable,\n getCurrentUser: action,\n getUserSuccess: action.bound,\n getUserError: action.bound,\n getCurrentUserOrg: action,\n getCurrentUserOrgSuccess: action.bound,\n getCurrentUserOrgError: action.bound,\n setToken: action,\n clearToken: action,\n setAppLoaded: action,\n});\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport App from './App';\nimport { Provider } from 'mobx-react';\nimport RootStore from './stores/root';\nimport './index.css';\n\nconst store = {\n rootStore: new RootStore(),\n};\n\nReactDOM.render(\n \n \n ,\n document.getElementById('root')\n);\n"],"sourceRoot":""}