{"version":3,"sources":["assets/img/theme/profile.png","assets/img/theme/team-1-800x800.jpg","assets/img/theme/loader.gif","assets/img/brand/argon-react-white.png","assets/img/brand/argon-react.png","globals.js","components/Navbars/AdminNavbar.js","components/Footers/AdminFooter.js","components/Sidebar/Sidebar.js","components/Modals/FailureModal.js","components/Modals/Loader.js","components/Modals/AddItem.js","components/SuggestionsList.js","components/Autocomplete.js","components/RefreshToken.js","components/InvoiceForm.js","components/InvoicePreview.js","components/Modals/NewInvoice.js","components/InvoiceFormDraft.js","components/InvoicePreviewDraft.js","components/Modals/InvoiceDraft.js","components/InvoiceSuggestionsList.js","components/InvoiceAutocomplete.js","components/IdleTimer.js","views/Index.js","components/DetailedView.js","components/Modals/ViewDetails.js","components/ListPagination.js","views/PendingApproval.js","views/paymentPlan/FormTable.js","views/paymentPlan/PaymentForm.js","views/paymentPlan/PaymentPlanModal.js","views/paymentPlan/Payment.js","components/Headers/EmptyHeader.js","components/Dashboard.js","views/InvoiceReport.js","views/ViewPayments/InvoiceDetailedView.js","components/Modals/InvoiceViewPrint.js","components/Modals/ViewOnlyDetails.js","components/Modals/CancelInvoice.js","views/ApprovedInvoices.js","views/ViewInvoices.js","views/ApprovalCancellation.js","customFunctions/dateConverter.js","components/FrontEndListPagination.js","views/ErrorLogs.js","customFunctions/goToRefreshEndpoint.js","components/BoldReport.js","views/ViewReportInDiffTab.js","routes.js","layouts/Admin.js","components/Navbars/AuthNavbar.js","components/Footers/AuthFooter.js","layouts/Auth.js","components/Modals/FirstTime.js","components/Modals/FirstTimeLogin.js","views/examples/Login.js","reducers/invoiceReducer.js","reducers/playgroundReducer.js","reducers/index.js","provider/IdleProvider.js","components/Modals/ForgetPassword.js","index.js","assets/img/theme/npa.png","assets/img/brand/npa.png"],"names":["window","React","createReactClass","ReactDOM","$","jQuery","jquery","AdminNavbar","props","profile","setProfile","useState","useLayoutEffect","user","sessionStorage","getItem","process","userOBJ","JSON","parse","name","szFirstName","szLastName","location","_jsx","_Fragment","children","Navbar","className","expand","id","_jsxs","Container","fluid","Link","to","brandText","Form","FormGroup","InputGroup","InputGroupAddon","addonType","InputGroupText","Input","placeholder","type","Nav","navbar","UncontrolledDropdown","nav","DropdownToggle","Media","alt","src","require","default","DropdownMenu","right","DropdownItem","header","tag","divider","onClick","handleLogout","clear","Footer","Row","Col","xl","style","position","bottom","Sidebar","collapseOpen","setCollapseOpen","toggleCollapse","data","closeCollapse","menus","bgColor","routes","logo","navbarBrandProps","innerLink","outterLink","href","target","NavbarBrand","imgAlt","Logo","width","height","textAlign","fontSize","fontWeight","businessUnit","e","preventDefault","Collapse","isOpen","xs","imgSrc","results","filter","x","HLevel","unshift","link","MenuName","layout","map","prop","key","NavItem","NavLink","NavLinkRRD","activeClassName","createLinks","defaultProps","FailureModal","_ref","setShow","showModalData","totalPaid","setTotalPaid","useEffect","calculateSelectedAll","arr","push","amount","tottal","reduce","accumulator","currentValue","console","log","Modal","size","contentClassName","minHeight","maxHeight","Table","striped","bordered","hover","responsive","scope","Array","item","moment","paymentDate","format","currency","moneyInTxt","reference","remarks","left","Button","color","Loader","backgroundColor","borderRadius","AddItem","formData","services","addRecordToData","handleServiceType","setShowAddItem","setFormData","disabled","setCurrency","setBank","invoiceId","setServices","quantity","setQuantity","manuallyEnteredPrice","setManuallyEnteredPrice","display","justifyContent","lg","htmlFor","value","invoiceType","onChange","service","index","min","concat","price","toast","warning","SuggestionsList","filteredSuggestions","activeSuggestionIndex","length","Card","zIndex","margin","overflow","suggestion","padding","borderBottom","alignContent","marginTop","marginBottom","cursor","code","Autocomplete","suggestions","setFilteredSuggestions","setActiveSuggestionIndex","showSuggestions","setShowSuggestions","input","setInput","userInput","unLinked","toLowerCase","includes","customerName","onKeyDown","customerEmail","email","customerTel","telephone","customerCode","serviceProviderId","RefreshToken","async","error","func","message","refreshData","token","refreshToken","axios","post","then","res","accessToken","setItem","stringify","info","ToastContainer","InvoiceForm","gridData","setGridData","setShowNewInvoiceModal","init","comments","setComments","setCurrencyPreview","currencyPreview","setInvoiceID","servicelist","setFailedGHGHOVInvoices","useContext","FormContext","invoiceList","supportBranches","customerTypes","dueDate","setDueDate","AppContext","categories","setCategories","category","setCategory","serviceBackup","setServiceBackup","isItemAdded","setIsItemAdded","showLoader","setshowLoader","showAddItem","customers","setCustomers","customerType","setCustomerType","descriptionRef","useRef","catRef","CurrencyRef","setIsDisabled","categoryCode","setcategoryCode","bank","busUnit","setBusUnit","dateToday","setDateToday","cusType","setCustType","customerDeets","setCustDeets","handleCustomerList","allCustomers","fetch","headers","json","userDetails","getServices","allServices","get","pkId","handleCurrency","current","savePendingInvoice","supportedBranch","undefined","invoice","branchCode","periodId","getCurrentDateInput","totalAmount","total","userId","status","invoiceItems","put","success","defaults","catch","err","_res$data","_res$data2","handleBusinessUnit","dateObj","Date","month","getMonth","slice","day","getDate","year","getFullYear","newDate","toLocaleDateString","getServiceList","myService","_invoiceId$invoiceIte","_myService$find","oneItem","itemDescription","bankname","find","ctype","pspTypeId","szCode","docDueDate","split","CardBody","md","substring","szName","branch","branch_code","bsSize","_e$target","ref","hidden","serviceCode","border","handleAddItemClick","rows","description","resize","maxLength","duration","startDate","obj","Number","itemCode","currencys","selectedSeviceType","found","dataitem","standard","dec","arguments","Intl","NumberFormat","minimumFractionDigits","maximumFractionDigits","styles","bottomcomments","leftHeader","flexDirection","alignItems","rightHeader","title","body","footer","marginLeft","borderTop","paddingTop","tablehead","InvoicePreview","lineHeight","FaTrashAlt","i","createContext","NewInvoice","closeForm","setCloseForm","head","setHead","toggle","Provider","InvoiceFormDraft","draftData","setShowDraftDetails","quantityRef","priceRef","setSupportBranches","useDispatch","allService","output","getBranches","serviceType","service_code","fee","tot","ext","Math","floor","random","InvoicePreviewDraft","docDate","toDateString","InvoiceDraft","setdraftData","InvoiceSuggestionsList","_suggestion$invoiceIt","invoiceNo","InvoiceAutocomplete","prevData","setPaginationDetails","getInvoices","setError","invoices","setInvoices","previousData","setPreviousData","handleSetFailedInvoice","prev","_suggestion$invoiceNo","test","_suggestion$invoiceIt2","_suggestion$invoiceIt3","timeout","IdleTimer","state","setState","remaining","setRemaining","open","setOpen","show","getRemainingTime","activate","useIdleTimer","onIdle","onActive","onPrompt","promptBeforeIdle","throttle","interval","setInterval","ceil","clearInterval","timeTillPrompt","max","handleStillHere","Index","masterInvoiceList","useSelector","failedGHGOVInvoices","showNewInvoiceModal","setInvoiceList","showDraftDetails","setCustomerTypes","declineReason","setDeclineReason","showDeclineReason","setShowDeclineReason","setShowLoader","isActive","setIsActive","users","getCustomerTypes","allTypes","prevState","handleGetFailedInvoices","_failed$data","_failed$data2","_failed$data2$data","failed","Authorization","controller","AbortController","signal","aborted","abort","onCancel","SweetAlert","confirmBtnBsStyle","onConfirm","focusCancelBtn","CardHeader","overflowY","Badge","DetailedView","_data$invoiceItems","selectedInvoice","setSelectedInvoice","showDecline","setDisabled","setIsTypingReason","reasonRef","gap","balance","decline","reason","ViewDetails","setShowViewDetails","setMasterInvoiceList","formType","setShowDecline","declineRef","count","setDeclineClickCount","loading","isTypingReason","dropdownOpen","setDropdownOpen","buttonLabe","setButtonLabels","hideButtton","setHideButton","checkStatus","setCheckStatus","approve","invoiceUpdate","userdId","stage","request","invoice_to_update","declineInvoice","invoiceNum","handleDecline","handleDeclineForReview","FontAwesomeIcon","icon","faThumbsUp","ListPagination","_buttonsLabelsArray$s","_pagesNavigation$all","_pagesNavigation$disp","paginationDetails","Styles","button","bottonOnFocus","row","feedback","setFeedback","inputRef","startingPoint","setStartingPoint","endPointMultiplicator","setendPointMultiplicator","NumberOfPages","totalCount","pageSize","buttonsLabelsArray","pagesNavigation","setPagesNavigations","all","displayed","previousDisplayed","moveToNextCollectionOfPages","p","page","moveToPreviousCollecttionOfPages","setTimeout","_buttonsLabelsArray$s2","RxTrackPrevious","GrPrevious","elements","_pagesNavigation$disp2","GrNext","_pagesNavigation$disp3","_pagesNavigation$all2","RxTrackNext","marginRight","visibility","changeQuantityPerPage","_inputRef$current$val","defaultValue","PendingApproval","showViewDetails","setData","_approve$data","_approve$data2","_approve$data2$data","_approve$data3","_approve$data4","_approve$data5","pageNo","selectedItem","previewSelectedInvoice","faEye","FormTable","invoiceListData","setInstallAmount","setTotalAmount","setRowData","checkedGrid","rowdata","isCheckedAll","setIsCheckedAll","isCheck","setIsCheck","setTest","handleOnChange","checked","isChecked","handleRowdata","calculateTotalAmountAdd","handleSubtract","ichecked","outstandingAmount","outstandingBalance","prevstate","paddingLeft","li","PaymentForm","setLoading","submitData","setSubmitData","setCheckedGrid","installAmount","rowData","handlePostData","setHanlePostData","handleDurationChecker","setDurationChecker","durationRef","canSave","setCanSave","evnt","_evnt$target3","_evnt$target4","_evnt$target5","_evnt$target6","_evnt$target7","_evnt$target","_evnt$target2","requiredObj","toString","Object","values","every","field","handlePosting","postBody","paymentPlanDetails","handleOnSubmit","response","formReset","handleGrid","serviceProvider","allGridData","parseInt","minWidth","RotatingLines","strokeColor","strokeWidth","animationDuration","visible","PaymentPlanModal","PaymentPlanTable","paymentPlans","setPaymentPlans","showMoreDetails","setShowMoreDetails","showModal","setShowModal","_Payplan$data","Payplan","paymentPlan","endDate","placeContent","GetTableData","EmptyHeader","Dashboard","EmbededDashboard","allowFullScreen","frameBorder","InvoiceReport","reportType","setReportType","setCategoryType","setStartDate","setEndDate","months","reportTypesArr","reportCartegoryArr","maxWidth","handleViwReport","_window","ele","_ele$name","_ele$name$toString","_category$toString","localStorage","InvoiceDetailedView","_data$invoiceItems2","base64Item","handleDisableButton","InvoiceViewPrint","setShowPrint","showPrint","dialogClassName","ViewOnlyDetails","base64View","setBase64View","_request$data","ibj","lngPeriodId","strQuery","lngServiceProviderId","dStartDate","dEndDate","strType","lngUserId","Base64","handleBase64","class","CancelInvoice","setPrevData","cancelInvoice","handleCancelInvoice","showCancel","confirmBtnText","cancelBtnBsStyle","cancelBtnText","faThumbsDown","InvoiceCancel","handleGetInvoices","_results$data","_results$data2","_results$data2$data","_results$data3","_results$data4","_results$data5","_results$data6","fontStyle","top","handleRow","ViewOnly","GHGOVInvoices","setGHGHOVInvoices","setBase64Item","_results$data7","_results$data7$data","handleViewFailedReason","handleDeclinedData","_paginationDetails$fi","_document","enterKeyPressed","event","_event$key","_event$key$toString","document","addEventListener","_document2","removeEventListener","Invoice","Cancelled","faFileInvoice","ApprovalCancellation","setFormType","_cancel$data","_cancel$data2","_cancel$data2$data","_cancel$data3","cancel","_cancel$data4","_cancel$data5","_cancel$data6","CovertMonthNumbersToAlphabets","date","_pagesNavigation$prev","ArrayOfItems","QuantityPerPage","setQuantityPerPage","currentContent","setCurrentContent","currentNumberOfItems","setCurrentNumberOfItems","GiPreviousButton","GiNextButton","ErrorLogs","_logMessgaes$slice","_currentContent$filte","logMessgaes","setLogMessages","search","setSearch","_userDetails","getBussinessOneLogMessages","logMessages","_logMessages$data","_logMessages$data2","callbackFunction","loadingSetterFuction","goToRefreshEndpoint","_log$transactionType","_log$transactionType$","_search$toLowerCase","_log$referenceNumber","_log$referenceNumber$","_search$toLowerCase2","transactionType","trim","referenceNumber","_log$transactionType2","_log$transactionType3","_search$toLowerCase3","_log$referenceNumber2","_log$referenceNumber3","_search$toLowerCase4","_log$date","_log$date2","textWrap","BoldReport","reportServerUrl","reportServiceUrl","reportPath","reportParameters","minheight","BoldReportViewerComponent","isResponsive","printMode","parameters","toolbarSettings","items","ej","ReportViewer","ToolbarItems","Parameters","ViewReportInDiffTab","params","showReport","setShowReport","reportParams","labels","nullable","storedBlogs","fromDatabase","route","path","mainMenuVisible","component","Payment","ViewInvoices","ApprovedInvoices","Admin","mainContent","useLocation","documentElement","scrollTop","scrollingElement","getBrandText","_routes$find","_props$location","_props$location2","_props$location2$path","pathname","Switch","Route","AdminFooter","UncontrolledCollapse","toggler","Login","Auth","classList","add","remove","AuthNavbar","xmlns","preserveAspectRatio","version","viewBox","y","points","Redirect","from","AuthFooter","newpassword","confirmpassword","FirstTime","newPassword","setNewPassword","confirmPassword","setconfirmPassword","password","setPassword","handleOnchange","container","background","FirstTimeLogin","loginData","setloginData","username","handleKey","setHandleKey","showFirstTime","setShowFirstTime","usersLogin","login","changepasswordDetails","szEmailAddress","role","onSubmit","autoComplete","onKeyPress","showLogin","setshowLogin","tokenData","AppId","claims","iFirstTimeLogin","hasOwnProperty","invoiceReducer","action","payload","playgroundReducer","allReducers","combineReducers","counter","CustomIdleTimerContext","IdleProvider","setCount","onAction","ForgetPassword","userName","setUserName","_userName$username","firstName","lastName","emailAddress","handleBlur","_userName$username2","_response$data$","onBlur","onFocus","store","createStore","compose","applyMiddleware","thunk","render","BrowserRouter","basename","AdminLayout","AuthLayout","getElementById"],"mappings":";8KAAA,OAAe,cAA0B,mC,mCCAzC,OAAe,+3G,mCCAf,OAAe,cAA0B,kC,mCCAzC,OAAe,cAA0B,6C,mCCAzC,OAAe,cAA0B,uC,wJCKzCA,OAAOC,MAAQA,IACfD,OAAOE,iBAAmBA,IAC1BF,OAAOG,SAAWA,IAClBH,OAAOI,EAAIJ,OAAOK,OAASC,I,wICqGZC,MAtFMC,IACnB,MAAOC,EAASC,GAAcT,IAAMU,SAAS,IAC7CV,IAAMW,iBAAgB,KAEpB,MAAMC,EAAOC,eAAeC,QAAQC,QAC9BC,EAAUC,KAAKC,MAAMN,GAG3B,GAAKI,EAGE,CACL,IAAIG,EAAOH,EAAQI,YAAc,IAAMJ,EAAQK,WAC/CZ,GAAYD,GAAYW,GAC1B,MAJEpB,OAAOuB,SAAW,GAIpB,GACC,IAOH,OACEC,cAAAC,WAAA,CAAAC,SACEF,cAACG,IAAM,CAACC,UAAU,yBAAyBC,OAAO,KAAKC,GAAG,cAAaJ,SACrEK,eAACC,IAAS,CAACC,OAAK,EAAAP,SAAA,CACdF,cAACU,IAAI,CACHN,UAAU,6DACVO,GAAG,IAAGT,SAELlB,EAAM4B,YAETZ,cAACa,IAAI,CAACT,UAAU,gFAA+EF,SAC7FF,cAACc,IAAS,CAACV,UAAU,OAAMF,SACzBK,eAACQ,IAAU,CAACX,UAAU,0BAAyBF,SAAA,CAC7CF,cAACgB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B,IAAK,CAACnB,KAAK,cAAcqG,OAAS57B,GAAUgB,cAAC6zB,GAAmB,IAAK70B,MACtEgB,cAAC01B,IAAK,CAACnB,KAAK,cAAcqG,OAAS57B,GAAUgB,cAAC81B,GAAK,IAAK92B,MACxDgB,cAAC01B,IAAK,CAACnB,KAAK,uBAAuBqG,OAAS57B,GAAUgB,cAACy3B,GAAc,IAAKz4B,MAC1EgB,cAAC01B,IAAK,CAACnB,KAAK,uBAAuBqG,OAAS57B,GAAUgB,cAAC25B,GAAc,IAAK36B,MAC1EgB,cAAC01B,IAAK,CAACnB,KAAK,SAASqG,OAAS57B,GAAUgB,cAAC+6B,GAAW,IAAK/7B,MACzDgB,cAAC01B,IAAK,CACJnB,KAAK,kBACLqG,OAAS57B,GAAUgB,cAAC+6B,GAAW,IAAK/7B,MAEtCgB,cAAC01B,IAAK,CAACnB,KAAK,QAAQqG,OAAS57B,GAAUgB,cAACg7B,GAAU,IAAKh8B,MACvDgB,cAAC02B,IAAQ,CAACC,KAAK,IAAIh2B,GAAG,yBAK9BouB,SAASkM,eAAe,Q,kCC5D1B,OAAe,cAA0B,+B,kCCAzC,OAAe,cAA0B,+B","file":"static/js/main.923dac80.chunk.js","sourcesContent":["export default __webpack_public_path__ + \"static/media/profile.c2876ea8.png\";","export default \"data:image/jpeg;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAACiFBMVEUAAAAAAAAAAABVVVU/Pz8zMzMqKiokJCQ/Pz84ODgzMzMuLi4qKiozMzMvLy8tLS0qKio1NTUzMzMwMDAuLi4sLCw1NTUyMjIxMTEvLy8tLS0rKzQxMTEvLy8uLi4tLTQyMjIxMTEwMDAuLi4tLS0zMzMxMTEwMDAvLy8uLi4tLTIxMTEwMDAvLy8uLi4tLTIyMjIxMTEwMDAvLy8uLjIyMjIxMTEwMDAvLy8uLjMxMTEvLy8vLy8xMTEwMDAuLjIxMTEwMDAvLy8uLjIuLjEwMDAvLy8uLjEwMDAvLzIuLj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ICHp8mUwl+SJYN7ZAtYxnVFzkzQrcll1RUlCTrtvRWLqweJ2NT4WvZsRcWysikej8DTqYryOjTDPBt9chIKeySHWtho0JLXNvLD85N0X2euMAPblUnKLQ6qJYdv4BmhfTYCe668VuX7nL9rpu7mscqpFMwV3aM6qdvhEIYd4l7tfwyWbcNf7WVe114TCE83E9fqmxphgUaLOk0Qbz7apcurd1/gyAnEzXYy3BE9vwBGjTYKmxbqcE+gCrZ8yR4hyvYsP9i2/UkBUvphimyJ64VyhRsLg78TMEWwRnZtRw+VbBlOLBUwY7Am7JrjA/yFGQlDqxQkALoHS3btsNWBSnGgTkKsh22yb4Z4J+oIJv6sam/TkFy+iFPDhyAbQo28dd/2frBDgtNW/68eIKCNcEeOfE0MFNR8wyQL0d2wvF4RYnrBDTKmQm34HVFyRvQkyGHVsP3WYoKjxfeklNJLXDUrShIaIYziXKswAe1ioIN0DtdYVgOzFfEXgSWKRzxu6CnUBGadRN2xiksaWfh22xFZMo1aE1VmDzXoD1LEfB8Ax2ZCluRF9qzFbYp30BXgSIwuwc6ixSmWdeg+1lF5Kde6JmvsLx4E7qeVYQKO4E/ueVYwkago0AR85wFjmXJIU8z0JqpKEjbBXjLXXLA9YYX2JmqqIiv9AHNRbJt1gmgd1mcoiW/hQENk2VLThMDzuQpipLevgn01T8lS/nb+4CelYmKrsx/EHB40UMykbLoCAFNGYq+wv0EdDeVpiuk9Jd39BCwp0BDI7/BR0D/ybqXpiboHglTS+tO9RPg2zZdQ+eRyhbu8F082PjO+pqa9ZsbD17yc8eZN0driOWuOtZPSH1HqqbogUgrrtl9mft8vbtmbpoeqOScOaXlFVVVFeWlc3KSFRMTExMTExPzo/V/+P1akPh9ML0AAAAASUVORK5CYII=\"","export default __webpack_public_path__ + \"static/media/loader.51a7492d.gif\";","export default __webpack_public_path__ + \"static/media/argon-react-white.e4dd3b41.png\";","export default __webpack_public_path__ + \"static/media/argon-react.128d71d3.png\";","import jquery from 'jquery';\r\nimport React from 'react';\r\nimport createReactClass from 'create-react-class';\r\nimport ReactDOM from 'react-dom';\r\n\r\nwindow.React = React;\r\nwindow.createReactClass = createReactClass;\r\nwindow.ReactDOM = ReactDOM;\r\nwindow.$ = window.jQuery = jquery;","import React from 'react'\r\nimport { Link } from 'react-router-dom'\r\nimport { useContext } from 'react'\r\nimport { AdminContext } from 'layouts/Admin'\r\n\r\n// reactstrap components\r\nimport {\r\n DropdownMenu,\r\n DropdownItem,\r\n UncontrolledDropdown,\r\n DropdownToggle,\r\n Form,\r\n FormGroup,\r\n InputGroupAddon,\r\n InputGroupText,\r\n Input,\r\n InputGroup,\r\n Navbar,\r\n Nav,\r\n Container,\r\n Media,\r\n} from 'reactstrap'\r\n\r\nconst AdminNavbar = (props) => {\r\n const [profile, setProfile] = React.useState('')\r\n React.useLayoutEffect(() => {\r\n //check if its logged in\r\n const user = sessionStorage.getItem(process.env.REACT_APP_DEFAULT_USER)\r\n const userOBJ = JSON.parse(user)\r\n //setUserData((userData) => userData + 1)\r\n\r\n if (!userOBJ) {\r\n //logout()\r\n window.location = '/'\r\n } else {\r\n let name = userOBJ.szFirstName + ' ' + userOBJ.szLastName\r\n setProfile((profile) => name)\r\n }\r\n }, [])\r\n\r\n const handleLogout = () => {\r\n sessionStorage.clear()\r\n window.location = '/npa-invoice-creator'\r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n {props.brandText}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n {profile}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Welcome! \r\n \r\n\r\n \r\n \r\n \r\n Logout \r\n \r\n \r\n \r\n \r\n \r\n \r\n >\r\n )\r\n}\r\n\r\nexport default AdminNavbar\r\n","import { Container, Row, Col, Nav, NavItem, NavLink } from 'reactstrap'\r\n\r\nconst Footer = () => {\r\n return (\r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n )\r\n}\r\n\r\nexport default Footer\r\n","import { useState } from \"react\";\r\nimport { NavLink as NavLinkRRD, Link } from \"react-router-dom\";\r\n// nodejs library to set properties for components\r\nimport { PropTypes } from \"prop-types\";\r\nimport Logo from \"../../assets/img/brand/npa.png\"\r\n\r\n// reactstrap components\r\nimport {\r\n Button,\r\n Card,\r\n CardHeader,\r\n CardBody,\r\n CardTitle,\r\n Collapse,\r\n DropdownMenu,\r\n DropdownItem,\r\n UncontrolledDropdown,\r\n DropdownToggle,\r\n FormGroup,\r\n Form,\r\n Input,\r\n InputGroupAddon,\r\n InputGroupText,\r\n InputGroup,\r\n Media,\r\n NavbarBrand,\r\n Navbar,\r\n NavItem,\r\n NavLink,\r\n Nav,\r\n Progress,\r\n Table,\r\n Container,\r\n Row,\r\n Col,\r\n} from \"reactstrap\";\r\n\r\nvar ps;\r\n\r\nconst defualtDashboard = {\r\n link: \"/dashboard\",\r\n name: \"Dashboard\",\r\n MenuName: \"Dashboard\",\r\n layout: \"/admin\",\r\n};\r\nconst Sidebar = (props) => {\r\n const [collapseOpen, setCollapseOpen] = useState();\r\n\r\n // toggles collapse between opened and closed (true/false)\r\n const toggleCollapse = () => {\r\n setCollapseOpen((data) => !data);\r\n };\r\n // closes the collapse\r\n const closeCollapse = () => {\r\n setCollapseOpen(false);\r\n };\r\n const icons = [\r\n {\r\n icon: \"ni ni-chart-bar-32 text-primary\",\r\n component: \"Dashboard\",\r\n },\r\n {\r\n icon: \"ni ni-single-copy-04 text-primary\",\r\n component: \"Index\",\r\n },\r\n {\r\n icon: \"ni ni-paper-diploma text-primary\",\r\n component: \"Approval\",\r\n },\r\n {\r\n icon: \"ni ni-money-coins text-primary\",\r\n component: \"Payment\",\r\n },\r\n {\r\n icon: \"ni ni-collection text-primary\",\r\n },\r\n ];\r\n\r\n const menus = JSON.parse(sessionStorage.getItem(\"menus\"));\r\n\r\n // creates the links that appear in the left menu / Sidebar\r\n const createLinks = (routes) => {\r\n const results = routes?.filter((x) => x.HLevel !== 0);\r\n // console.log(results);\r\n // setFiltered((prev)=>[prev,...results])\r\n results?.unshift({\r\n link: \"/dashboard\",\r\n name: \"Dashboard\",\r\n MenuName: \"Dashboard\",\r\n layout: \"/admin\",\r\n });\r\n\r\n\r\n\r\n return results?.map((prop, key) => {\r\n return (\r\n \r\n \r\n \r\n {prop.MenuName}\r\n \r\n \r\n );\r\n });\r\n };\r\n\r\n\r\n const { bgColor, routes, logo } = props;\r\n let navbarBrandProps;\r\n if (logo && logo.innerLink) {\r\n navbarBrandProps = {\r\n to: logo.innerLink,\r\n tag: Link,\r\n };\r\n } else if (logo && logo.outterLink) {\r\n navbarBrandProps = {\r\n href: logo.outterLink,\r\n target: \"_blank\",\r\n };\r\n }\r\n\r\n return (\r\n \r\n \r\n {/* Toggler */}\r\n \r\n \r\n \r\n {/* Brand */}\r\n {logo ? (\r\n \r\n \r\n \r\n ) : null}\r\n {/* User */}\r\n {JSON.parse(sessionStorage.getItem('userLoginDeets')).businessUnit}
\r\n \r\n \r\n \r\n \r\n \r\n \r\n Action \r\n Another action \r\n \r\n Something else here \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Welcome! \r\n \r\n \r\n \r\n My profile \r\n \r\n \r\n e.preventDefault()}>\r\n \r\n Logout \r\n \r\n \r\n \r\n \r\n {/* Collapse */}\r\n \r\n {/* Collapse header */}\r\n \r\n
\r\n {logo ? (\r\n \r\n {logo.innerLink ? (\r\n \r\n \r\n \r\n ) : (\r\n \r\n \r\n \r\n )}\r\n \r\n ) : null}\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n {/* Form */}\r\n \r\n {/* Navigation */}\r\n {createLinks(menus)} \r\n {/* Divider */}\r\n \r\n {/* Heading */}\r\n \r\n version {process.env.REACT_APP_VERSION}\r\n \r\n \r\n );\r\n};\r\n\r\nSidebar.defaultProps = {\r\n routes: [{}],\r\n};\r\n\r\nSidebar.propTypes = {\r\n toggleSidenav: PropTypes.func,\r\n // links that will be displayed inside the component\r\n routes: PropTypes.arrayOf(PropTypes.object),\r\n sidenavOpen: PropTypes.bool,\r\n logo: PropTypes.shape({\r\n // innerLink is for links that will direct the user within the app\r\n // it will be rendered as ... tag\r\n innerLink: PropTypes.string,\r\n // outterLink is for links that will direct the user outside the app\r\n // it will be rendered as simple ... tag\r\n outterLink: PropTypes.string,\r\n // the image src of the logo\r\n imgSrc: PropTypes.string.isRequired,\r\n // the alt for the img\r\n imgAlt: PropTypes.string.isRequired,\r\n }),\r\n};\r\n\r\nexport default Sidebar;\r\n","import moment from 'moment'\r\nimport React, { useEffect, useState } from 'react'\r\n\r\nimport { Modal, Button, Table, Row, Container, Col, Card, CardHeader } from 'reactstrap'\r\nimport { moneyInTxt } from 'views/Index'\r\nfunction FailureModal({setShow,showModalData}) {\r\n const [totalPaid,setTotalPaid]=useState(0)\r\n useEffect(()=>{\r\n if(showModalData){\r\n calculateSelectedAll()\r\n }\r\n },[showModalData])\r\n\r\n\r\nconst calculateSelectedAll=()=>{\r\n let arr=[]\r\n const initialValue = 0;\r\n showModalData.map(x=> arr.push(x.amount))\r\n let tottal = arr.reduce(\r\n (accumulator, currentValue) => accumulator + currentValue,\r\n initialValue\r\n );\r\n setTotalPaid(tottal)\r\n \r\n }\r\n \r\nconst handleReset=()=>{\r\n setTotalPaid(0)\r\n setShow(false)\r\n}\r\nconsole.log(showModalData);\r\n return (\r\n \r\n \r\n
\r\n List of Payments\r\n \r\n \r\n \r\n setShow(false)}\r\n >\r\n × \r\n \r\n
\r\n\r\n \r\n
\r\n \r\n \r\n \r\n {/* Date */}\r\n Date \r\n Amount \r\n{/* \r\n \r\n Paid to date\r\n */}\r\n \r\n Reference\r\n \r\n \r\n Remarks\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n { Array && showModalData?.map((item, key)=>{\r\n \r\n return( \r\n \r\n \r\n {moment(item?.paymentDate,\"DD-MM-YYYY\").format(\"DD/MMM/YYYY\")} \r\n {item?.currency }{\" \"}{moneyInTxt(item?.amount)} \r\n {/* {item?.duration} */}\r\n {/* {moneyInTxt(item?.paidToDateFc)} */}\r\n {item?.reference} \r\n {item?.remarks} \r\n\r\n \r\n )\r\n\r\n })\r\n \r\n } \r\n \r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n Total Paid: GHS {moneyInTxt(totalPaid)} \r\n handleReset()}>\r\n Close\r\n \r\n {/* \r\n Close\r\n */}\r\n
\r\n \r\n )\r\n}\r\n\r\nexport default FailureModal\r\nconst styles = {\r\n body: {\r\n marginTop: 0,\r\n height: '450px',\r\n maxHeight: '450px',\r\n overflow: 'auto',\r\n },\r\n}","import React from 'react'\r\nimport { Modal } from 'reactstrap'\r\n\r\nfunction Loader() {\r\n return (\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n )\r\n}\r\n\r\nexport default Loader\r\n","import React, { useEffect, useState } from 'react'\r\nimport { toast } from 'react-toastify'\r\nimport { Modal, Row, Col, Button, FormGroup, Input } from 'reactstrap'\r\n\r\nconst AddItem = ({\r\n formData,\r\n services,\r\n currency,\r\n addRecordToData,\r\n handleServiceType,\r\n setShowAddItem,\r\n setFormData,\r\n disabled,\r\n setCurrency,\r\n setBank\r\n ,invoiceId,\r\n setServices\r\n}) => {\r\n \r\n const [quantity, setQuantity] = useState(1);\r\n const [manuallyEnteredPrice, setManuallyEnteredPrice] = useState(\"\");\r\n\r\n const handleReset=()=>{\r\n setShowAddItem(false)\r\n setCurrency(\"\")\r\n setQuantity(1);\r\n setManuallyEnteredPrice(\"\");\r\n }\r\n\r\nconst handleAdd=()=>{\r\n if(!(formData.price > 0)){\r\n if(manuallyEnteredPrice > 0){\r\n formData['price'] = manuallyEnteredPrice;\r\n formData['quantity'] = quantity\r\n //setFormData({...formData, quantity: quantity, price: manuallyEnteredPrice});\r\n addRecordToData(formData)\r\n } \r\n else{\r\n if(quantity <= 0){\r\n toast.warning(\"Please enter quantity greather than 0\")\r\n }\r\n\r\n if(manuallyEnteredPrice <=0){\r\n toast.warning(\"Please enter price greather than 0\")\r\n }\r\n }\r\n \r\n }else{ \r\n if(quantity <= 0){\r\n toast.warning(\"Please enter quantity greather than 0\")\r\n }else{\r\n formData['quantity'] = quantity\r\n addRecordToData(formData)\r\n }\r\n }\r\n}\r\n\r\n return (\r\n \r\n )\r\n}\r\n\r\nexport default AddItem\r\n","import { Card } from 'reactstrap'\r\nconst SuggestionsList = ({\r\n filteredSuggestions,\r\n activeSuggestionIndex,\r\n onClick,\r\n}) => {\r\n return filteredSuggestions.length ? (\r\n \r\n {filteredSuggestions.map((suggestion, index) => {\r\n return (\r\n \r\n
onClick(suggestion)}>\r\n {suggestion.name}\r\n \r\n
\r\n )\r\n })}\r\n \r\n ) : (\r\n \r\n Customer not found on the list \r\n
\r\n )\r\n}\r\n\r\nexport default SuggestionsList\r\n","import React, { useState } from 'react'\r\nimport { Input, InputGroup, InputGroupAddon, InputGroupText } from 'reactstrap'\r\nimport SuggestionsList from './SuggestionsList'\r\n\r\nconst Autocomplete = ({ suggestions, formData, setFormData }) => {\r\n const [filteredSuggestions, setFilteredSuggestions] = useState([])\r\n const [activeSuggestionIndex, setActiveSuggestionIndex] = useState(0)\r\n const [showSuggestions, setShowSuggestions] = useState(false)\r\n const [input, setInput] = useState('')\r\n\r\n const onChange = (e) => {\r\n const userInput = e.target.value\r\n\r\n // Filter our suggestions that don't contain the user's input\r\n const unLinked = suggestions.filter((suggestion) =>\r\n suggestion.name.toLowerCase().includes(userInput.toLowerCase())\r\n )\r\n setInput(e.target.value)\r\n setFormData({ ...formData, customerName: userInput })\r\n setFilteredSuggestions(unLinked)\r\n setActiveSuggestionIndex(0)\r\n setShowSuggestions(true)\r\n }\r\n\r\n const onClick = (suggestion) => {\r\n //console.log(suggestion)\r\n setFilteredSuggestions([])\r\n setInput(suggestion.name)\r\n setFormData({\r\n ...formData,\r\n customerName: suggestion.name,\r\n customerEmail: suggestion.email,\r\n customerTel: suggestion.telephone,\r\n customerCode: suggestion.code,\r\n serviceProviderId: suggestion?.id\r\n })\r\n setActiveSuggestionIndex(0)\r\n setShowSuggestions(false)\r\n }\r\n\r\n return (\r\n <>\r\n \r\n {/* \r\n \r\n \r\n \r\n */}\r\n \r\n \r\n {showSuggestions && input && (\r\n \r\n )}\r\n >\r\n )\r\n}\r\n\r\nexport default Autocomplete\r\n","import axios from \"axios\";\r\nimport { ToastContainer, toast } from \"react-toastify\";\r\n\r\nconst RefreshToken=async(error,func)=>{\r\n if(error.message.includes('Request failed with status code 401')){\r\n console.log(\"error\");\r\n let refreshData = {\r\n token: JSON.parse(sessionStorage.getItem(\"Token\")),\r\n refreshToken: JSON.parse(sessionStorage.getItem(\"refreshToken\"))\r\n }\r\n await axios.post(\r\n `${process.env.REACT_APP_API_ROOT_PSL}UserInfo/RefreshToken`,refreshData\r\n ).then((res)=>{\r\n \r\n if(res.data.accessToken != null){\r\n sessionStorage.setItem('Token', JSON.stringify(res.data.accessToken))\r\n sessionStorage.setItem('refreshToken', JSON.stringify(res.data.refreshToken))\r\n func()\r\n }\r\n else{\r\n toast.info(\"System failed,please try again later\")\r\n \r\n }})\r\n }\r\n\r\n\r\n return(<>\r\n \r\n \r\n >)\r\n}\r\nexport default RefreshToken","import React, { useContext, useRef, useEffect, useState } from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { saveInvoice } from \"../actions\";\r\nimport axios from \"axios\";\r\n\r\nimport {\r\n FormGroup,\r\n Form,\r\n Input,\r\n Row,\r\n Col,\r\n Button,\r\n Card,\r\n CardBody,\r\n InputGroupAddon,\r\n InputGroupText,\r\n InputGroup,\r\n} from \"reactstrap\";\r\nimport { AppContext } from \"views/Index\";\r\nimport { FormContext } from \"./Modals/NewInvoice\";\r\nimport { ToastContainer, toast } from \"react-toastify\";\r\nimport \"react-toastify/dist/ReactToastify.css\";\r\nimport Loader from \"../components/Modals/Loader\";\r\nimport AddItem from \"./Modals/AddItem\";\r\nimport Autocomplete from \"./Autocomplete\";\r\nimport RefreshToken from \"./RefreshToken\";\r\n\r\nfunction InvoiceForm() {\r\n const {\r\n formData,\r\n gridData,\r\n setFormData,\r\n setGridData,\r\n setShowNewInvoiceModal,\r\n init,\r\n comments,\r\n setComments,\r\n setCurrencyPreview,\r\n currencyPreview,\r\n invoiceId,\r\n setInvoiceID,\r\n servicelist,\r\n setFailedGHGHOVInvoices,\r\n } = useContext(FormContext);\r\n\r\n const [invoiceList, , supportBranches, customerTypes, dueDate, setDueDate] =\r\n useContext(AppContext);\r\n const [categories, setCategories] = useState([{ id: \"\", name: \"\" }]);\r\n const [category, setCategory] = useState(\"\");\r\n const [services, setServices] = useState([]);\r\n const [serviceBackup, setServiceBackup] = useState([]);\r\n const [isItemAdded, setIsItemAdded] = useState(false);\r\n const [showLoader, setshowLoader] = useState(false);\r\n const [showAddItem, setShowAddItem] = useState(false);\r\n const [customers, setCustomers] = useState([]);\r\n const [customerType, setCustomerType] = useState(\"\");\r\n const descriptionRef = useRef(null);\r\n const catRef = useRef(null);\r\n const CurrencyRef = useRef(null);\r\n const [disabled, setIsDisabled] = React.useState(true);\r\n const [categoryCode, setcategoryCode] = useState(null);\r\n const [currency, setCurrency] = useState(\"\");\r\n const [bank, setBank] = useState(\"\");\r\n const [busUnit, setBusUnit] = useState(\"\");\r\n const [dateToday, setDateToday] = useState(\"\");\r\n const [cusType, setCustType] = useState(\"\");\r\n const [customerDeets, setCustDeets] = useState(\"\");\r\n\r\n const handleCustomerList = async (type) => {\r\n setCustType(type);\r\n try {\r\n let allCustomers = await (\r\n await fetch(\r\n `${process.env.REACT_APP_API_ROOT_PSL}NpaServices/SearchCustomers/*/${type}`, {\r\n headers: {\r\n 'Authorization': `Bearer ${JSON.parse(sessionStorage.getItem(\"Token\"))}`\r\n }\r\n }\r\n )\r\n ).json();\r\n\r\n setCustomers(allCustomers);\r\n //console.log(allCustomers)\r\n //setCustomers(allCustomers.map((customer) => customer.name))\r\n } catch (error) {\r\n if (error.message.includes('Request failed with status code 401')) {\r\n // console.log(\"error\");\r\n let refreshData = {\r\n token: JSON.parse(sessionStorage.getItem(\"Token\")),\r\n refreshToken: JSON.parse(sessionStorage.getItem(\"refreshToken\"))\r\n }\r\n await axios.post(\r\n `${process.env.REACT_APP_API_ROOT_PSL}UserInfo/RefreshToken`, refreshData\r\n ).then((res) => {\r\n if (res?.data.accessToken != null) {\r\n sessionStorage.setItem('Token', JSON.stringify(res.data.accessToken))\r\n sessionStorage.setItem('refreshToken', JSON.stringify(res.data.refreshToken))\r\n handleCustomerList()\r\n }\r\n else {\r\n toast.info(\"System failed,please try again later\")\r\n\r\n }\r\n })\r\n\r\n }\r\n }\r\n };\r\n\r\n //get categories - http://psl-webapps/NpaGhGovCheckoutAPI/api/v1/NpaServices/GetServiceCategories\r\n const getCategories = async () => {\r\n try {\r\n let allCategories = await (\r\n await axios.get(\r\n `${process.env.REACT_APP_API_ROOT_PSL}NpaServices/GetServiceCategories/`, {\r\n headers: {\r\n 'Authorization': `Bearer ${JSON.parse(sessionStorage.getItem(\"Token\"))}`\r\n }\r\n }\r\n )\r\n ).json();\r\n\r\n setCategories(allCategories);\r\n } catch (error) {\r\n RefreshToken(error, getCategories)\r\n }\r\n };\r\n const userDetails = JSON.parse(sessionStorage.getItem(\"user\"));\r\n // console.log(userDetails);\r\n\r\n //get services by Cat - http://psl-webapps/NpaGhGovCheckoutAPI/api/v1/NpaServices/GetServicesByCategory/1\r\n const getServices = async (id) => {\r\n try {\r\n let allServices =\r\n await axios.get(\r\n `${process.env.REACT_APP_API_ROOT_PSL}NpaServices/GetServicesByDepartment/${userDetails?.pkId}`, {\r\n headers: {\r\n 'Authorization': `Bearer ${JSON.parse(sessionStorage.getItem(\"Token\"))}`\r\n }\r\n }\r\n )\r\n setServiceBackup(allServices.data || []);\r\n //setServiceBackup(allServices?.data instanceof Array ? allServices.data : [])\r\n\r\n } catch (error) {\r\n if (error.message.includes('Request failed with status code 401')) {\r\n // console.log(\"error\");\r\n let refreshData = {\r\n token: JSON.parse(sessionStorage.getItem(\"Token\")),\r\n refreshToken: JSON.parse(sessionStorage.getItem(\"refreshToken\"))\r\n }\r\n await axios.post(\r\n `${process.env.REACT_APP_API_ROOT_PSL}UserInfo/RefreshToken`, refreshData\r\n ).then((res) => {\r\n if (res?.data.accessToken != null) {\r\n sessionStorage.setItem('Token', JSON.stringify(res.data.accessToken))\r\n sessionStorage.setItem('refreshToken', JSON.stringify(res.data.refreshToken))\r\n getServices()\r\n }\r\n else {\r\n toast.info(\"System failed,please try again later\")\r\n\r\n }\r\n })\r\n\r\n }\r\n }\r\n };\r\n useEffect(() => {\r\n getServices();\r\n }, []);\r\n\r\n //handle on chage event for service type\r\n const handleServiceType = (e) => {\r\n let selectedSeviceType = services.find(\r\n (service) => service.name === e.target.value\r\n );\r\n\r\n\r\n if (currencyPreview == \"\") {\r\n setCurrencyPreview(selectedSeviceType?.currency);\r\n setCurrency(selectedSeviceType?.currency);\r\n } else {\r\n setCurrencyPreview(selectedSeviceType?.currency);\r\n setCurrency(selectedSeviceType?.currency);\r\n }\r\n\r\n //console.log(selectedSeviceType)\r\n setIsDisabled(false);\r\n\r\n setFormData({\r\n ...formData,\r\n serviceCode: selectedSeviceType.code,\r\n price: selectedSeviceType.amount,\r\n invoiceType: e.target.value,\r\n quantity: 1,\r\n });\r\n };\r\n const businessUnit = JSON.parse(sessionStorage.getItem(\"businessUnit\"));\r\n // console.log(businessUnit);\r\n\r\n const handleBusinessUnitSelect = (e) => {\r\n setFormData({\r\n ...formData,\r\n businessUnit: businessUnit,\r\n });\r\n getCategories();\r\n };\r\n\r\n const handleAddItemClick = () => {\r\n //getServices(servicesID)\r\n // if()\r\n console.log(formData?.currency);\r\n if (!formData?.currency) {\r\n toast.info(\"Selct currency to add items\")\r\n return;\r\n }\r\n setShowAddItem(true);\r\n setIsDisabled(true);\r\n setFormData({ ...formData, invoiceType: \"\" });\r\n };\r\n\r\n const addRecordToData = (item) => {\r\n setCurrency(\"\");\r\n\r\n const obj = {\r\n itemDescription: item.invoiceType,\r\n quantity: item.quantity,\r\n price: Number(item.price),\r\n itemCode: item.serviceCode,\r\n currencys: currencyPreview,\r\n };\r\n\r\n\r\n let selectedSeviceType = services.find(\r\n (service) => service.name === item.invoiceType\r\n );\r\n //console.log(selectedSeviceType)\r\n setBank(selectedSeviceType.bank)\r\n\r\n\r\n let found = gridData.find((dataitem) => dataitem.itemCode === obj.itemCode);\r\n let Currencyfound = gridData.find(\r\n (dataitem) => dataitem.currencys !== obj.currencys\r\n );\r\n if (found) {\r\n // console.log({ found, Currencyfound, currencyPreview });\r\n toast.info('You can not add multiple items of the same code')\r\n return;\r\n }\r\n // if(Currencyfound){\r\n // toast.warning('Invoice cant have mixed currencies')\r\n // return;\r\n // }\r\n // else {\r\n if (!formData.quantity) {\r\n toast.warning(\"Please enter a value for quantity\");\r\n } else {\r\n setGridData((gridData) => [...gridData, obj]);\r\n\r\n setShowAddItem(false);\r\n // catRef.current.disabled = true\r\n\r\n setFormData({\r\n ...formData,\r\n quantity: 1,\r\n price: \"\",\r\n });\r\n if (gridData.length != 0) {\r\n setIsItemAdded(true);\r\n }\r\n }\r\n // }\r\n };\r\n useEffect(() => {\r\n if (formData?.currency) {\r\n handleCurrency();\r\n\r\n }\r\n // console.log({formData});\r\n\r\n }, [formData?.currency])\r\n\r\n useEffect(() => {\r\n if (gridData?.length > 0) {\r\n CurrencyRef.current.disabled = true;\r\n } else {\r\n CurrencyRef.current.disabled = false;\r\n }\r\n }, [gridData]);\r\n\r\n\r\n // console.log(JSON.parse(sessionStorage.getItem(\"Token\")));\r\n // console.log(JSON.parse(sessionStorage.getItem(\"refreshToken\")))\r\n\r\n const savePendingInvoice = async () => {\r\n\r\n\r\n if (customerType == \"\") {\r\n toast.warning(\"Select a customer type\");\r\n return;\r\n }\r\n if (formData.customerName == \"\") {\r\n toast.warning(\"Select a customer\");\r\n return;\r\n }\r\n if (formData.supportedBranch == \"\") {\r\n toast.warning(\"Select a branch\");\r\n return;\r\n }\r\n if (formData.currency === undefined) {\r\n toast.warning(\"Select a currency\");\r\n return;\r\n }\r\n if (comments === undefined || comments === \"\") {\r\n toast.warning(\"Please provide some comments\");\r\n return;\r\n }\r\n // console.log(formData?.dueDate );\r\n setshowLoader(true);\r\n let invoice = {\r\n customerEmail: formData.customerEmail,\r\n customerTel: formData.customerTel,\r\n branchCode: formData.supportedBranch,\r\n remarks: comments,\r\n periodId: 0,\r\n type: categoryCode,\r\n customerName: formData.customerName || customerDeets,\r\n customerCode: formData.customerCode || \"SD0001\",\r\n businessUnit: businessUnit ? businessUnit : busUnit,\r\n dueDate: formData?.dueDate || getCurrentDateInput(),\r\n\r\n totalAmount: gridData.reduce(\r\n (total, item) => total + item.quantity * item.price,\r\n 0\r\n ),\r\n currency: currency || formData.currency,\r\n userId: JSON.parse(sessionStorage.getItem(\"user\")).pkId,\r\n status: 2, // 1 -draft 2- pending 3- approved 4 -declined 5 -sap\r\n invoiceItems: gridData,\r\n };\r\n\r\n // console.log({ form: formData, gird: gridData, inv: invoice });\r\n //console.log('Invoice to save:', invoice)\r\n\r\n if (invoiceId) {\r\n // console.log(invoice.dueDate,formData?.dueDate); formData?.dueDate \r\n try {\r\n const request = await axios.put(\r\n `${process.env.REACT_APP_API_ROOT_PSL}Invoices/${invoiceId.id}`,\r\n invoice, {\r\n headers: {\r\n 'Authorization': `Bearer ${JSON.parse(sessionStorage.getItem(\"Token\"))}`\r\n }\r\n }\r\n );\r\n /// console.log(request);\r\n if (request) {\r\n toast.success(\"Invoice updated succesfully\");\r\n setFailedGHGHOVInvoices((current) =>\r\n current.filter((item) => item.id !== invoiceId.id)\r\n\r\n );\r\n setshowLoader(false);\r\n setShowNewInvoiceModal(false);\r\n setFormData(\"\")\r\n }\r\n setShowNewInvoiceModal(false);\r\n } catch (error) {\r\n\r\n\r\n if (error.message.includes('Request failed with status code 401')) {\r\n console.log(\"error\");\r\n let refreshData = {\r\n token: JSON.parse(sessionStorage.getItem(\"Token\")),\r\n refreshToken: JSON.parse(sessionStorage.getItem(\"refreshToken\"))\r\n }\r\n await axios.post(\r\n `${process.env.REACT_APP_API_ROOT_PSL}UserInfo/RefreshToken`, refreshData\r\n ).then((res) => {\r\n if (res?.data.accessToken != null || res.data.accessToken != \"\") {\r\n console.log(\"Token reset\")\r\n sessionStorage.setItem('Token', JSON.stringify(res.data.accessToken))\r\n sessionStorage.setItem('refreshToken', JSON.stringify(res.data.refreshToken))\r\n savePendingInvoice()\r\n }\r\n else {\r\n toast.info(\"Invoice failed try again later\");\r\n setshowLoader(false);\r\n\r\n }\r\n })\r\n\r\n }\r\n }\r\n setShowNewInvoiceModal(false);\r\n } else {\r\n if (gridData?.length > 0) {\r\n setshowLoader(true);\r\n axios.defaults.headers.post[\"Content-Type\"] =\r\n \"application/x-www-form-urlencoded\";\r\n await axios\r\n .post(`${process.env.REACT_APP_API_ROOT_PSL}Invoices`, invoice, {\r\n headers: {\r\n 'Authorization': `Bearer ${JSON.parse(sessionStorage.getItem(\"Token\"))}`\r\n }\r\n })\r\n .then((res) => {\r\n toast.success(\"Invoice successfully saved\");\r\n setshowLoader(false);\r\n setShowNewInvoiceModal(false);\r\n })\r\n .catch((err) => {\r\n setshowLoader(false);\r\n if (err.message.includes('Request failed with status code 401')) {\r\n\r\n let refreshData = {\r\n token: JSON.parse(sessionStorage.getItem(\"Token\")),\r\n refreshToken: JSON.parse(sessionStorage.getItem(\"refreshToken\"))\r\n }\r\n axios.post(\r\n `${process.env.REACT_APP_API_ROOT_PSL}UserInfo/RefreshToken`, refreshData\r\n ).then((res) => {\r\n if (res?.data?.accessToken != null || res?.data?.accessToken != undefined) {\r\n\r\n sessionStorage.setItem('Token', JSON.stringify(res.data.accessToken))\r\n sessionStorage.setItem('refreshToken', JSON.stringify(res.data.refreshToken))\r\n savePendingInvoice()\r\n }\r\n else {\r\n toast.info(\"Could not save invoice\");\r\n\r\n }\r\n })\r\n }\r\n });\r\n } else {\r\n toast.warning(\"Please add an item to the invoice first\");\r\n }\r\n }\r\n };\r\n const handleCloseForm = () => {\r\n setInvoiceID();\r\n setShowNewInvoiceModal(false);\r\n setFormData({\r\n name: \"\",\r\n serviceProviderId: \"\",\r\n duration: \"\",\r\n startDate: \"\",\r\n currency: \"\",\r\n supportedBranch: \"\"\r\n\r\n })\r\n };\r\n const saveDraftInvoice = async () => {\r\n let invoice = {\r\n customerEmail: formData.customerEmail,\r\n customerTel: formData.customerTel,\r\n remarks: comments,\r\n periodId: 0,\r\n type: categoryCode,\r\n customerName: formData.customerName,\r\n customerCode: formData.customerCode,\r\n businessUnit: formData.businessUnit,\r\n branchCode: formData.supportedBranch,\r\n totalAmount: gridData.reduce(\r\n (total, item) => total + item.quantity * item.price,\r\n 0\r\n ),\r\n currency: \"\",\r\n userId: JSON.parse(sessionStorage.getItem(\"user\")).pkId,\r\n status: 1, // 1 -draft 2- pending 3- approved 4 -declined 5 -sap\r\n invoiceItems: gridData,\r\n };\r\n\r\n //console.log('Invoice to draft:', invoice)\r\n\r\n if (isItemAdded) {\r\n setshowLoader(true);\r\n let obj = await axios\r\n .post(`${process.env.REACT_APP_API_ROOT_PSL}Invoices`, invoice, {\r\n headers: {\r\n 'Authorization': `Bearer ${JSON.parse(sessionStorage.getItem(\"Token\"))}`\r\n }\r\n })\r\n .then((res) => {\r\n toast.success(\"Invoice successfully saved to draft\");\r\n setshowLoader(false);\r\n setShowNewInvoiceModal(false);\r\n })\r\n .catch((err) => {\r\n setshowLoader(false);\r\n toast.error(\"Could not submit invoice\");\r\n });\r\n } else {\r\n toast.warning(\"Please add an item to the invoice first\");\r\n }\r\n\r\n //dispatch(saveInvoice(invoice))\r\n };\r\n\r\n useEffect(() => {\r\n //console.log('Form Data in Form: ', formData)\r\n //console.log('Grid Data in Form: ', gridData)\r\n //console.log('Invoice List: ', invoiceList)\r\n //console.log('Services: ', services)\r\n\r\n return () => {\r\n //cleanup\r\n };\r\n }, [invoiceList]);\r\n\r\n const usrName = JSON.parse(sessionStorage.getItem(\"usrName\"));\r\n\r\n useEffect(() => {\r\n handleBusinessUnit();\r\n }, []);\r\n\r\n const getCurrentDateInput = () => {\r\n const dateObj = new Date();\r\n\r\n // get the month in this format of 04, the same for months\r\n const month = (\"0\" + (dateObj.getMonth() + 1)).slice(-2);\r\n const day = (\"0\" + dateObj.getDate()).slice(-2);\r\n const year = dateObj.getFullYear();\r\n\r\n const shortDate = `${year}-${month}-${day}`;\r\n\r\n return shortDate;\r\n };\r\n\r\n useEffect(() => {\r\n let newDate = new Date().toLocaleDateString();\r\n // console.log(getCurrentDateInput());\r\n setDateToday(newDate);\r\n }, []);\r\n\r\n const handleBusinessUnit = async () => {\r\n // setshowLoader(true);\r\n // await axios\r\n // .get(`${process.env.REACT_APP_API_ROOT_PSL}UserInfo/${usrName}/4017`,{ headers: {\r\n // 'Authorization': `Bearer ${JSON.parse(sessionStorage.getItem(\"Token\"))}`\r\n // }})\r\n // .then((ress) => {\r\n // setBusUnit(ress.data[0].businessUnit);\r\n // sessionStorage.setItem(\r\n // \"businessUnit\",\r\n // JSON.stringify(ress.data[0].businessUnit)\r\n // );\r\n // })\r\n // .catch((error) => {\r\n // setshowLoader(false);\r\n // toast.warning(error);\r\n // });\r\n // setshowLoader(false);\r\n setBusUnit(JSON.parse(sessionStorage.getItem('businessUnit')));\r\n\r\n // sessionStorage.setItem('businessUnit', JSON.stringify(ress.data.claims.businessUnit))\r\n\r\n };\r\n let refresh = JSON.parse(sessionStorage.getItem(\"refreshToken\"))\r\n\r\n\r\n\r\n const getServiceList = async () => {\r\n try {\r\n const servicelist = await axios.get(\r\n `${process.env.REACT_APP_API_ROOT_PSL}NpaServices/GetServicesByDepartment/${userDetails?.pkId}`, {\r\n headers: {\r\n 'Authorization': `Bearer ${JSON.parse(sessionStorage.getItem(\"Token\"))}`\r\n }\r\n }\r\n );\r\n if (servicelist?.data) {\r\n return servicelist?.data;\r\n\r\n }\r\n } catch (error) {\r\n if (error.message.includes('Request failed with status code 401')) {\r\n //console.log(\"error\");\r\n let refreshData = {\r\n token: JSON.parse(sessionStorage.getItem(\"Token\")),\r\n refreshToken: JSON.parse(sessionStorage.getItem(\"refreshToken\"))\r\n }\r\n await axios.post(\r\n `${process.env.REACT_APP_API_ROOT_PSL}UserInfo/RefreshToken`, refreshData\r\n ).then((res) => {\r\n if (res?.data.accessToken != null) {\r\n sessionStorage.setItem('Token', JSON.stringify(res.data.accessToken))\r\n sessionStorage.setItem('refreshToken', JSON.stringify(res.data.refreshToken))\r\n getServiceList()\r\n }\r\n else {\r\n toast.info(\"System failed,please try again later\")\r\n }\r\n })\r\n }\r\n }\r\n\r\n\r\n };\r\n\r\n useEffect(async () => {\r\n const myService = await getServiceList();\r\n\r\n if (invoiceId?.id) {\r\n const oneItem = invoiceId?.invoiceItems[0]?.itemDescription;\r\n\r\n const bankname = myService.find((x) => x?.name === oneItem)?.bank;\r\n const currency = myService.find((x) => x?.name === oneItem);\r\n\r\n if (currencyPreview == \"\") {\r\n setCurrencyPreview(currency?.currency);\r\n setCurrency(currency?.currency);\r\n } else {\r\n if (currencyPreview == currency?.currency) {\r\n setCurrencyPreview(currency?.currency);\r\n setCurrency(currency?.currency);\r\n }\r\n }\r\n\r\n // console.log(invoiceId.currency);\r\n setBank(bankname);\r\n\r\n //console.log({ invoiceId, customerTypes });\r\n\r\n const ctype = customerTypes?.find(\r\n (x) => x?.pkId === invoiceId?.pspTypeId\r\n );\r\n // console.log({ctype});\r\n setCustomerType(ctype?.szCode);\r\n\r\n setFormData({\r\n ...formData,\r\n customerName: invoiceId?.customerName,\r\n dueDate: invoiceId?.docDueDate.split(\"T00:00:00\")[0],\r\n supportedBranch: invoiceId?.branchCode,\r\n currency: invoiceId.currency,\r\n // serviceProviderId: invoiceId?.customerCode,\r\n comments: invoiceId?.remarks,\r\n customerCode: invoiceId?.customerCode,\r\n customerEmail: \"\",\r\n customerTel: \"\",\r\n //invoiceId:invoiceId.invoiceId,\r\n });\r\n //let\r\n setGridData(invoiceId?.invoiceItems);\r\n\r\n // console.log({loadupportBranchesice: supportBranches});\r\n }\r\n\r\n return () => { };\r\n }, []);\r\n const handleCurrency = () => {\r\n setServices(serviceBackup?.filter((item) => item.currency == formData?.currency));\r\n };\r\n\r\n useEffect(() => {\r\n setServices(serviceBackup?.filter((item) => item.currency == formData?.currency));\r\n\r\n }, [formData?.currency])\r\n\r\n return (\r\n \r\n \r\n \r\n {showLoader && }\r\n \r\n\r\n \r\n \r\n handleCloseForm()}\r\n type=\"button\"\r\n style={{ width: \"100%\" }}\r\n size=\"sm\"\r\n >\r\n CLOSE\r\n \r\n \r\n \r\n \r\n SUBMIT\r\n \r\n \r\n
\r\n {showAddItem && (\r\n \r\n )}\r\n \r\n
\r\n \r\n );\r\n}\r\n\r\nexport default InvoiceForm;\r\n","import React, { useState, useContext, useEffect } from \"react\";\r\nimport { Card, Table } from \"reactstrap\";\r\n\r\nimport { FormContext } from \"./Modals/NewInvoice\";\r\nimport { FaTrashAlt } from \"react-icons/fa\";\r\nimport moment from \"moment\";\r\n\r\nconst moneyInTxt = (value, standard, dec = 2) => {\r\n var nf = new Intl.NumberFormat(standard, {\r\n minimumFractionDigits: dec,\r\n maximumFractionDigits: 2,\r\n });\r\n return nf.format(Number(value) ? value : 0.0);\r\n};\r\n\r\nfunction InvoicePreview() {\r\n const {\r\n formData,\r\n gridData,\r\n setGridData,\r\n comments,\r\n currencyPreview,\r\n dueDate,\r\n } = useContext(FormContext);\r\n\r\n dueDate;\r\n useEffect(() => {\r\n //console.log('GridData in Preview: ', gridData)\r\n\r\n return () => {\r\n //cleanup\r\n };\r\n }, [gridData]);\r\n\r\n //console.log(currencyPreview);\r\n return (\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n\r\n
\r\n No. 6 George W. Bush Highway Adj. Petroleum Commission\r\n \r\n Dzorwulu Accra.\r\n \r\n
\r\n\r\n
\r\n
INVOICE \r\n Issued on : {moment().format(\"DD MMMM YYYY\")} \r\n \r\n Due Date:{\" \"}\r\n {formData\r\n ? moment(formData.dueDate).format(\"DD MMMM YYYY\")\r\n : \" \"}\r\n \r\n \r\n
\r\n \r\n
Invoice for: {formData.customerName} \r\n\r\n {/* {formData.businessUnit} */}\r\n \r\n\r\n \r\n
\r\n \r\n \r\n \r\n {\" \"}\r\n Code\r\n \r\n \r\n Description\r\n \r\n \r\n QTY\r\n \r\n \r\n Price\r\n \r\n \r\n Amount\r\n \r\n Action \r\n \r\n \r\n \r\n {gridData.map((item, key) => (\r\n \r\n {item.itemCode} \r\n \r\n {item.itemDescription}\r\n \r\n \r\n {item.quantity}\r\n \r\n \r\n {moneyInTxt(item.price)}\r\n \r\n \r\n {moneyInTxt(item.quantity * item.price)}\r\n \r\n \r\n {\r\n setGridData(\r\n gridData.filter(\r\n (i, index) => i.itemCode !== item.itemCode\r\n )\r\n );\r\n }}\r\n />\r\n \r\n \r\n ))}\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n Total {currencyPreview ? `(${currencyPreview})` : \"\"} {\" \"}\r\n {moneyInTxt(\r\n gridData.reduce(\r\n (total, item) => total + item.quantity * item.price,\r\n 0\r\n )\r\n )}\r\n \r\n \r\n
\r\n \r\n
\r\n
{comments} \r\n \r\n
\r\n \r\n );\r\n}\r\n\r\nconst styles = {\r\n header: {\r\n display: \"flex\",\r\n height: \"20%\",\r\n marginBottom: 20,\r\n },\r\n bottomcomments: {\r\n display: \"flex\",\r\n justifyContent: \"space-between\",\r\n marginTop: -90,\r\n },\r\n leftHeader: {\r\n display: \"flex\",\r\n width: \"50%\",\r\n flexDirection: \"column\",\r\n alignItems: \"flex-start\",\r\n //border: '1px solid blue',\r\n },\r\n rightHeader: {\r\n display: \"flex\",\r\n width: \"50%\",\r\n flexDirection: \"column\",\r\n alignItems: \"flex-end\",\r\n //border: '1px solid green',\r\n },\r\n title: {\r\n height: \"max-content\",\r\n backgroundColor: \"#eff4fd\",\r\n borderRadius: 5,\r\n padding: \"5px 10px 0px 10px\",\r\n marginBottom: 25,\r\n width: \"100%\",\r\n },\r\n body: {\r\n marginTop: 0,\r\n height: \"220px\",\r\n overflow: \"auto\",\r\n },\r\n footer: {\r\n display: \"flex\",\r\n flexDirection: \"row\",\r\n marginTop: 25,\r\n height: \"10%\",\r\n overflow: \"auto\",\r\n },\r\n total: {\r\n display: \"flex\",\r\n justifyContent: \"flex-end\",\r\n width: \"100%\",\r\n marginLeft: \"70%\",\r\n borderTop: \"1px solid #e3e3e3\",\r\n paddingTop: 10,\r\n //paddingRight: 50,\r\n marginTop: 10,\r\n },\r\n comments: {\r\n height: 60,\r\n width: \"47%\",\r\n overflow: \"auto\",\r\n flexDirection: \"row\",\r\n backgroundColor: \"#eff4fd\",\r\n borderRadius: 10,\r\n padding: 10,\r\n color: \"#cecece\",\r\n marginTop: 40,\r\n },\r\n\r\n tablehead: {\r\n display: \"flex\",\r\n justifyContent: \"flex-end\",\r\n alignItems: \"flex-end\",\r\n },\r\n};\r\n\r\nexport default InvoicePreview;\r\n","import InvoiceForm from '../../components/InvoiceForm'\r\nimport InvoicePreview from '../../components/InvoicePreview'\r\nimport React, { useState, createContext, useEffect } from 'react'\r\nimport { Modal } from 'reactstrap'\r\n\r\nconst init = {\r\n customerName: '',\r\n customerCode: '',\r\n invoiceType: '',\r\n businessUnit: '',\r\n serviceCode: '',\r\n description: '',\r\n quantity: 1,\r\n price: '',\r\n comments: '',\r\n supportedBranch: '',\r\n}\r\n\r\nexport const FormContext = createContext(null)\r\n\r\nfunction NewInvoice({ setShowNewInvoiceModal,invoiceId,setInvoiceID,setFailedGHGHOVInvoices,servicelist }) {\r\n const [formData, setFormData] = useState(init)\r\n const [gridData, setGridData] = useState([])\r\n const [comments, setComments] = useState('')\r\n const [currencyPreview,setCurrencyPreview]=useState(\"\")\r\n const [closeForm,setCloseForm]=useState()\r\n const [dueDate,setDueDate]=useState(\"\")\r\n const [head,setHead]=useState(\"Create\")\r\n\r\n let closeFormX =()=>{\r\n setShowNewInvoiceModal(false)\r\n setInvoiceID(\"\")\r\n \r\n }\r\n//console.log(invoiceId);\r\nuseEffect(()=>{\r\nif(invoiceId){\r\n if(invoiceId.status == \"Declined For Review\"){\r\n setHead(\"Update\")\r\n }\r\n}\r\n},[])\r\n return (\r\n <>\r\n console.log('toggled')}\r\n >\r\n \r\n
\r\n {head} your invoice\r\n \r\n closeFormX() }\r\n >\r\n × \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n >\r\n )\r\n}\r\n\r\nexport default NewInvoice\r\n","import React, { useContext, useRef, useEffect, useState } from 'react'\r\nimport { useSelector, useDispatch } from 'react-redux'\r\nimport { saveInvoice } from '../actions'\r\nimport axios from 'axios'\r\n\r\nimport {\r\n FormGroup,\r\n Form,\r\n Input,\r\n Row,\r\n Col,\r\n Button,\r\n Card,\r\n CardBody,\r\n} from 'reactstrap'\r\nimport { AppContext } from 'views/Index'\r\n\r\nfunction InvoiceFormDraft({ draftData, setShowDraftDetails }) {\r\n const descriptionRef = useRef(null)\r\n const quantityRef = useRef(null)\r\n const priceRef = useRef(null)\r\n const [services, setServices] = useState([])\r\n const [supportBranches, setSupportBranches] = useState([])\r\n const [formData, setFormData] = useState({})\r\n const [gridData, setGridData] = useState([])\r\n\r\n //get service\r\n const getServices = async () => {\r\n try {\r\n let allService = await (\r\n await fetch(\r\n `https://iml.npa-enterprise.com/NpaGhGovCheckoutAPI/api/v1/Checkout/SearchAvailableServices?current_page=0&results_per_page=1000&sort_by=name&sort_ascending=true`\r\n )\r\n ).json()\r\n\r\n // const result = await axios.get( `https://iml.npa-enterprise.com/NpaGhGovCheckoutAPI/api/v1/Checkout/SearchAvailableServices?current_page=0&results_per_page=1000&sort_by=name&sort_ascending=true`)\r\n // console.log({result});\r\n\r\n setServices(allService.output)\r\n } catch (error) {\r\n console.error(error.message)\r\n }\r\n }\r\n\r\n const getBranches = async () => {\r\n try {\r\n let allService = await (\r\n await fetch(\r\n `https://iml.npa-enterprise.com/NpaGhGovCheckoutAPI/api/v1/Checkout/SearchMdaBranches?current_page=0&results_per_page=10000&sort_by=name&sort_ascending=true`\r\n )\r\n ).json()\r\n\r\n setSupportBranches(allService.output)\r\n } catch (error) {\r\n console.error(error.message)\r\n }\r\n }\r\n\r\n //handle on chage event for service type\r\n const handleServiceType = (e) => {\r\n let selectedSeviceType = services.find(\r\n (service) => service.name === e.target.value\r\n )\r\n\r\n setFormData({\r\n ...formData,\r\n serviceCode: selectedSeviceType.service_code,\r\n price: selectedSeviceType.fee,\r\n invoiceType: e.target.value,\r\n quantity: 1,\r\n })\r\n\r\n // setSupportBranches(selectedSeviceType.supported_branches)\r\n }\r\n\r\n const dispatch = useDispatch()\r\n\r\n useEffect(() => {\r\n //console.log('Form Data in Form: ', formData)\r\n //console.log('Grid Data in Form: ', gridData)\r\n console.log('Invoice List: ', draftData[0])\r\n getServices()\r\n getBranches()\r\n return () => {\r\n //cleanup\r\n }\r\n }, [])\r\n\r\n const addRecordToData = (item) => {\r\n const tot = item.quantity * item.price\r\n const obj = { ...item, ext: tot }\r\n //console.log('item:', obj)\r\n gridData.push(obj)\r\n setGridData(gridData)\r\n console.log(gridData)\r\n //console.log('GridData:', gridData)\r\n //reset form\r\n setFormData({\r\n customerName: formData.customerName,\r\n invoiceType: formData.invoiceType,\r\n businessUnit: formData.businessUnit,\r\n serviceCode: formData.serviceCode,\r\n description: formData.invoiceType,\r\n quantity: '',\r\n price: '',\r\n // supportedBranch:'',\r\n // businessUnit:'',\r\n // invoiceType: '',\r\n // customerName: '',\r\n })\r\n }\r\n\r\n const savePendingInvoice = async () => {\r\n //console.log('saving ...')\r\n\r\n let invoice = {\r\n status: 'pending',\r\n invoiceNum: Math.floor(Math.random(1) * 1000000),\r\n customer: formData.customerName,\r\n type: formData.invoiceType,\r\n serviceCode: formData.serviceCode,\r\n comments: formData.comments,\r\n total: gridData.reduce((total, item) => total + item.ext, 0),\r\n gridInfo: gridData,\r\n }\r\n\r\n setShowDraftDetails(false)\r\n }\r\n\r\n const saveDraftInvoice = async () => {\r\n //console.log('saving ...')\r\n\r\n let invoice = {\r\n status: 'draft',\r\n invoiceNum: Math.floor(Math.random(1) * 1000000),\r\n customer: formData.customerName,\r\n type: formData.invoiceType,\r\n serviceCode: formData.serviceCode,\r\n comments: formData.comments,\r\n total: gridData.reduce((total, item) => total + item.ext, 0),\r\n gridInfo: gridData,\r\n }\r\n\r\n setShowDraftDetails(false)\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n addRecordToData(formData)}\r\n >\r\n \r\n + Add Item \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n UPDATE DRAFT\r\n \r\n \r\n \r\n \r\n SUBMIT\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n )\r\n}\r\n\r\nexport default InvoiceFormDraft\r\n","import React, { useEffect } from 'react'\r\nimport { Card, Table } from 'reactstrap'\r\n\r\nconst moneyInTxt = (value, standard, dec = 2) => {\r\n var nf = new Intl.NumberFormat(standard, {\r\n minimumFractionDigits: dec,\r\n maximumFractionDigits: 2,\r\n })\r\n return nf.format(Number(value) ? value : 0.0)\r\n}\r\n\r\nfunction InvoicePreviewDraft({ draftData }) {\r\n useEffect(() => {\r\n console.log('Data ', draftData)\r\n\r\n return () => {\r\n //cleanup\r\n }\r\n }, [])\r\n\r\n return (\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n\r\n
\r\n No. 6 George W. Bush Highway Adj. Petroleum Commission\r\n \r\n Dzorwulu Accra.\r\n \r\n
\r\n\r\n
\r\n
INVOICE \r\n {/* #OMC2111005 */}\r\n \r\n Issued on:{' '}\r\n {new Date(draftData[0].docDate).toDateString().substring(3)}\r\n \r\n \r\n Due Date:{' '}\r\n {new Date(draftData[0].dueDate).toDateString().substring(3)}\r\n \r\n \r\n
\r\n \r\n
Invoice for \r\n {draftData[0].customerName} \r\n {draftData[0].businessUnit} \r\n \r\n\r\n \r\n
\r\n \r\n \r\n \r\n {' '}\r\n Code\r\n \r\n \r\n Description\r\n \r\n \r\n Qty\r\n \r\n \r\n Price\r\n \r\n \r\n Amount\r\n \r\n \r\n \r\n \r\n {draftData[0].invoiceItems.map((item, key) => (\r\n \r\n {item.itemCode} \r\n \r\n {item.itemDescription}\r\n \r\n \r\n {item.quantity}\r\n \r\n \r\n {moneyInTxt(item.price)}\r\n \r\n \r\n {moneyInTxt(item.quantity * item.price)}\r\n \r\n \r\n ))}\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n Total (GHS)\r\n {moneyInTxt(draftData[0].totalAmount)}\r\n \r\n \r\n
\r\n \r\n
\r\n
{draftData[0].comments} \r\n \r\n
\r\n \r\n )\r\n}\r\n\r\nconst styles = {\r\n header: {\r\n display: 'flex',\r\n height: '20%',\r\n marginBottom: 20,\r\n },\r\n bottomcomments: {\r\n display: 'flex',\r\n justifyContent: 'space-between',\r\n },\r\n leftHeader: {\r\n display: 'flex',\r\n width: '50%',\r\n flexDirection: 'column',\r\n alignItems: 'flex-start',\r\n //border: '1px solid blue',\r\n },\r\n rightHeader: {\r\n display: 'flex',\r\n width: '50%',\r\n flexDirection: 'column',\r\n alignItems: 'flex-end',\r\n //border: '1px solid green',\r\n },\r\n title: {\r\n height: '14%',\r\n backgroundColor: '#eff4fd',\r\n borderRadius: 10,\r\n padding: 10,\r\n marginBottom: 25,\r\n },\r\n body: {\r\n marginTop: 0,\r\n height: '280px',\r\n maxHeight: '280px',\r\n overflow: 'auto',\r\n },\r\n footer: {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n marginTop: 10,\r\n height: '10%',\r\n overflow: 'auto',\r\n },\r\n total: {\r\n display: 'flex',\r\n justifyContent: 'flex-end',\r\n width: '100%',\r\n marginLeft: '40%',\r\n borderTop: '1px solid #e3e3e3',\r\n paddingTop: 10,\r\n //paddingRight: 50,\r\n marginTop: 10,\r\n },\r\n comments: {\r\n height: 100,\r\n width: '47%',\r\n overflow: 'auto',\r\n flexDirection: 'row',\r\n backgroundColor: '#eff4fd',\r\n borderRadius: 10,\r\n padding: 10,\r\n color: '#cecece',\r\n marginTop: 40,\r\n },\r\n\r\n tablehead: {\r\n display: 'flex',\r\n justifyContent: 'flex-end',\r\n alignItems: 'flex-end',\r\n },\r\n}\r\n\r\nexport default InvoicePreviewDraft\r\n","import InvoiceFormDraft from 'components/InvoiceFormDraft'\r\nimport InvoicePreviewDraft from 'components/InvoicePreviewDraft'\r\nimport React, { useState, createContext } from 'react'\r\nimport { Modal } from 'reactstrap'\r\n\r\nexport const FormContext = createContext(null)\r\n\r\nfunction InvoiceDraft({ setShowDraftDetails, draftData, setdraftData }) {\r\n return (\r\n <>\r\n console.log('toggled')}\r\n >\r\n \r\n
\r\n Draft\r\n \r\n setShowDraftDetails(false)}\r\n >\r\n × \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n >\r\n )\r\n}\r\n\r\nexport default InvoiceDraft\r\n","import { Card } from 'reactstrap'\r\nconst InvoiceSuggestionsList = ({\r\n filteredSuggestions,\r\n activeSuggestionIndex,\r\n onClick,\r\n}) => {\r\n \r\n\r\n return filteredSuggestions.length ? (\r\n \r\n {filteredSuggestions.map((suggestion, index) => {\r\n return (\r\n \r\n
onClick(suggestion)}>\r\n { suggestion?.invoiceNo} - {\"\"}\r\n {suggestion.customerName}\r\n \r\n
\r\n )\r\n })}\r\n \r\n ) : (\r\n \r\n {/* Invoice not found on the list */}\r\n
\r\n )\r\n}\r\n\r\nexport default InvoiceSuggestionsList\r\n","import React, { useEffect, useState } from \"react\";\r\nimport { Col, Input, InputGroup, InputGroupAddon, InputGroupText } from \"reactstrap\";\r\nimport InvoiceSuggestionsList from \"./InvoiceSuggestionsList\";\r\nimport { toast } from \"react-toastify\";\r\n\r\nconst InvoiceAutocomplete = ({\r\n suggestions,\r\n formData,\r\n setFormData,\r\n setFailedGHGHOVInvoices,\r\n prevData,\r\n setPaginationDetails,\r\n getInvoices,\r\n setError,\r\n}) => {\r\n const [filteredSuggestions, setFilteredSuggestions] = useState([]);\r\n const [activeSuggestionIndex, setActiveSuggestionIndex] = useState(0);\r\n const [showSuggestions, setShowSuggestions] = useState(false);\r\n const [input, setInput] = useState(\"\");\r\n const [invoices, setInvoices] = useState([]);\r\n const [previousData, setPreviousData] = useState([]);\r\n\r\n const onChange = (e) => {\r\n const userInput = e.target.value;\r\n setPaginationDetails((prev) => { return {...prev, filter : userInput}})\r\n\r\n // Filter our suggestions that don't contain the user's input\r\n\r\n const unLinked = suggestions?.filter((suggestion) =>\r\n suggestion?.invoiceNo?.includes(userInput)\r\n );\r\n\r\n setInput(e.target.value);\r\n\r\n setFormData({ ...formData, invoiceNo: userInput });\r\n setFilteredSuggestions(unLinked);\r\n setActiveSuggestionIndex(0);\r\n setShowSuggestions(true);\r\n\r\n setPreviousData(prevData);\r\n };\r\n\r\n const onGetInvoices = (event) =>{\r\n if(!input || input.length===0){\r\n return toast.info(\"Please enter text in search box\")\r\n }\r\n \r\n if (!/[a-zA-Z0-9]/.test(input) && input !== \"*\") {\r\n return toast(\"Please enter valid search text\")\r\n } \r\n\r\n return getInvoices()\r\n\r\n }\r\n\r\n const onClick = (suggestion) => {\r\n setPreviousData(prevData);\r\n setInvoices(suggestion);\r\n\r\n setFilteredSuggestions([]);\r\n setInput(suggestion.invoiceNo);\r\n setFormData({\r\n ...formData,\r\n customerName: suggestion?.customerName,\r\n type: suggestion?.invoiceItems?.type,\r\n customerCode: suggestion?.code,\r\n invoiceNo: suggestion?.invoiceItems?.invoiceNo,\r\n serviceCode: suggestion?.invoiceItems?.itemCode,\r\n invoiceItems: suggestion?.invoiceItems.totalAmount,\r\n });\r\n setActiveSuggestionIndex(0);\r\n setShowSuggestions(false);\r\n\r\n // setFailedGHGHOVInvoices(invoices)\r\n handleSetFailedInvoice(suggestion);\r\n };\r\n\r\n const handleSetFailedInvoice = (e) => {\r\n setFailedGHGHOVInvoices([e]);\r\n };\r\n\r\n useEffect(() => {\r\n if (input.length === 0) {\r\n setFailedGHGHOVInvoices(prevData);\r\n }\r\n }, [input]);\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n {onGetInvoices()}}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n {showSuggestions && input && (\r\n \r\n )}\r\n >\r\n );\r\n};\r\n\r\nexport default InvoiceAutocomplete;\r\n","import { useEffect, useState } from 'react'\r\nimport { useIdleTimer } from 'react-idle-timer'\r\nimport { Modal, Button } from 'reactstrap'\r\n\r\nconst timeout = 900_000\r\n\r\nconst promptBeforeIdle = 250_00\r\nconst promptBeforeIdleCust= 25_000\r\n\r\nconst IdleTimer=()=>{\r\n const [state, setState] = useState('Active')\r\n const [remaining, setRemaining] = useState(timeout)\r\n const [open, setOpen] = useState(false)\r\n const [show,setShow]=useState(false)\r\n\r\n const onIdle = () => {\r\n setState('Idle')\r\n setOpen(false)\r\n }\r\n\r\n const onActive = () => {\r\n setState('Active')\r\n setOpen(false)\r\n }\r\n\r\n const onPrompt = () => {\r\n setState('Prompted')\r\n setOpen(true)\r\n }\r\n\r\n const { getRemainingTime, activate } = useIdleTimer({\r\n onIdle,\r\n onActive,\r\n onPrompt,\r\n timeout,\r\n promptBeforeIdle,\r\n throttle: 500\r\n })\r\n\r\n\r\nconst handleLogout = () => {\r\n setShow(false)\r\n sessionStorage.clear()\r\n window.location = '/npa-invoice-creator'\r\n }\r\n\r\n useEffect(()=>{\r\n \r\n remaining == 1? handleLogout():''\r\n},[remaining])\r\n\r\n\r\n\r\n\r\n useEffect(() => {\r\n const interval = setInterval(() => {\r\n setRemaining(Math.ceil(getRemainingTime() / 1000) )\r\n }, 500)\r\n\r\n return () => {\r\n clearInterval(interval)\r\n }\r\n })\r\n\r\n const handleStillHere = () => {\r\n activate()\r\n setShow(false)\r\n }\r\n\r\n const timeTillPrompt = Math.max(remaining - promptBeforeIdle / 1000, 0)\r\n const seconds = timeTillPrompt > 1 ? 'seconds' : 'second'\r\n\r\n \r\n\r\n \r\n return (\r\n <>\r\n \r\n {timeTillPrompt == 0 && (\r\n \r\n < div className='modal-header'>\r\n Session Timeout \r\n \r\n \r\n
\r\n
\r\n
Your session is about to expire! \r\n
Are you still here? \r\n
\r\n Im still here\r\n \r\n
Logging out in {remaining} seconds
\r\n\r\n
\r\n
\r\n \r\n )}\r\n >\r\n )\r\n}\r\nexport default IdleTimer\r\n","import { useState, useEffect, useLayoutEffect, createContext } from 'react'\r\nimport { useSelector, useDispatch } from 'react-redux'\r\nimport { increment, decrement, loadInvoice, saveInvoice } from '../actions'\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\nimport axios from 'axios'\r\nimport { ToastContainer, toast } from 'react-toastify'\r\nimport 'react-toastify/dist/ReactToastify.css'\r\nimport FailureModal from '../components/Modals/FailureModal'\r\n\r\n// reactstrap components\r\nimport {\r\n Button,\r\n Card,\r\n CardHeader,\r\n Table,\r\n Container,\r\n Row,\r\n Col,\r\n Badge,\r\n FormGroup,\r\n} from 'reactstrap'\r\n\r\nimport Header from 'components/Headers/Header.js'\r\nimport NewInvoice from 'components/Modals/NewInvoice'\r\nimport InvoiceDraft from 'components/Modals/InvoiceDraft'\r\nimport Loader from 'components/Modals/Loader'\r\nimport Autocomplete from 'components/Autocomplete'\r\nimport InvoiceAutocomplete from 'components/InvoiceAutocomplete'\r\nimport SweetAlert from 'react-bootstrap-sweetalert'\r\nimport moment from 'moment'\r\nimport IdleTimer from 'components/IdleTimer'\r\n\r\n\r\nconst currency = (amount) => {\r\n return amount.toLocaleString('en-US', {\r\n style: 'currency',\r\n currency: 'GHS',\r\n })\r\n}\r\n\r\nexport const moneyInTxt = (value, standard, dec = 2) => {\r\n var nf = new Intl.NumberFormat(standard, {\r\n minimumFractionDigits: dec,\r\n maximumFractionDigits: 2,\r\n })\r\n return nf.format(Number(value) ? value : 0.0)\r\n}\r\nconst init={\r\n name: \"\",\r\n serviceProviderId: \"\",\r\n duration: \"\",\r\n startDate: \"\",\r\n currency:\"\",\r\n supportedBranch:\"\"\r\n\r\n}\r\n\r\nexport const AppContext = createContext(null)\r\n\r\n// if (process.env.NODE_ENV === 'production') {\r\n// console.log('production')\r\n// } else {\r\n// console.log(process.env.NODE_ENV )\r\n// }\r\n//console.log({url:process.env.REACT_APP_NPASERVICES_API});\r\nconst Index = (props) => {\r\n //select redux store states\r\n const masterInvoiceList = useSelector((state) => state.masterInvoiceList)\r\n //const counter = useSelector((state) => state.counter);\r\n const [failedGHGOVInvoices, setFailedGHGHOVInvoices] = useState([])\r\n\r\n const [showNewInvoiceModal, setShowNewInvoiceModal] = useState(false)\r\n const [invoiceList, setInvoiceList] = useState(masterInvoiceList)\r\n const [draftData, setdraftData] = useState({})\r\n const [showDraftDetails, setShowDraftDetails] = useState(false)\r\n const [supportBranches, setSupportBranches] = useState([\r\n { name: '', branch_code: '' },\r\n ])\r\n const [customerTypes, setCustomerTypes] = useState([])\r\n const [declineReason, setDeclineReason] = useState([])\r\n const [showDeclineReason, setShowDeclineReason] = useState(false)\r\n const [showLoader, setShowLoader] = useState(false)\r\n const [isActive, setIsActive] = useState(false);\r\n const[invoiceId,setInvoiceID]=useState(\"\")\r\n\r\n const users = JSON.parse(sessionStorage.getItem('user')); \r\n\r\n const getBranches = async () => {\r\n try {\r\n let allService = await (\r\n await axios.get(\r\n `${process.env.REACT_APP_API_ROOT_PSL}Checkout/SearchMdaBranches?current_page=0&results_per_page=10000&sort_by=name&sort_ascending=true`,{ headers: {\r\n 'Authorization': `Bearer ${JSON.parse(sessionStorage.getItem(\"Token\"))}`\r\n }}\r\n )\r\n )\r\n setSupportBranches((prev) => allService.data.output)\r\n } \r\n catch (error) {\r\n if(error.message.includes('Request failed with status code 401')){\r\n console.log(\"error\");\r\n let refreshData = {\r\n token: JSON.parse(sessionStorage.getItem(\"Token\")),\r\n refreshToken: JSON.parse(sessionStorage.getItem(\"refreshToken\"))\r\n }\r\n let obj = await axios.post(\r\n `${process.env.REACT_APP_API_ROOT_PSL}UserInfo/RefreshToken`,refreshData\r\n )\r\n if(obj.data.accessToken != null){\r\n sessionStorage.setItem('Token', JSON.stringify(obj.data.accessToken))\r\n sessionStorage.setItem('refreshToken', JSON.stringify(obj.data.refreshToken))\r\n getBranches()\r\n }\r\n else{\r\n toast.info(\"System failed,please try again later\")\r\n \r\n }\r\n } setSupportBranches((prev) => [{ name: '', branch_code: '' }])\r\n }\r\n }\r\n\r\n const getCustomerTypes = async () => {\r\n try {\r\n let allTypes = await (\r\n await axios.get(\r\n //'https://psl-webapps/NpaServices/api/PSPType?iCompanyID=1&szFilter=*&status=4'\r\n `${process.env.REACT_APP_NPASERVICES_API}PSPType?iCompanyID=1&szFilter=*&status=4` ,{ headers: {\r\n 'Authorization': `Bearer ${JSON.parse(sessionStorage.getItem(\"Token\"))}`\r\n }}\r\n )\r\n )\r\n // if(allTypes.statusText == \"OK\"){\r\n if(allTypes?.data){\r\n setCustomerTypes((prevState) => allTypes?.data)\r\n }\r\n \r\n } catch (error) {\r\n if(error.message.includes('Request failed with status code 401')){\r\n let refreshData = {\r\n token: JSON.parse(sessionStorage.getItem(\"Token\")),\r\n refreshToken: JSON.parse(sessionStorage.getItem(\"refreshToken\"))\r\n }\r\n let obj = await axios.post(\r\n `${process.env.REACT_APP_API_ROOT_PSL}UserInfo/RefreshToken`,refreshData\r\n )\r\n if(obj.data.accessToken != null){\r\n sessionStorage.setItem('Token', JSON.stringify(obj.data.accessToken))\r\n sessionStorage.setItem('refreshToken', JSON.stringify(obj.data.refreshToken))\r\n getCustomerTypes()\r\n }\r\n else{\r\n toast.info(\"System failed,please try again later\")\r\n \r\n }\r\n }\r\n\r\n }\r\n }\r\n\r\n const handleGetFailedInvoices = async () => {\r\n // setShowLoader(true)\r\n try {\r\n let failed= await axios.get(\r\n `${process.env.REACT_APP_API_ROOT_PSL}Invoices/GetInvoicesByUserAndStatus/${users?.pkId}?status=${1}&PageNumber=${1}&PageSize=${10}&Filter=*`,\r\n {\r\n headers: {\r\n Authorization: `Bearer ${JSON.parse(\r\n sessionStorage.getItem(\"Token\")\r\n )}`,\r\n },\r\n }\r\n )\r\n // console.log(failed);\r\n // if(failed?.status == 200){\r\n setFailedGHGHOVInvoices(failed.data?.data)\r\n if(failed.data?.data?.length ===0) toast.info('No data found')\r\n \r\n } catch (error) {\r\n if(error.message.includes('Request failed with status code 401')){\r\n let refreshData = {\r\n token: JSON.parse(sessionStorage.getItem(\"Token\")),\r\n refreshToken: JSON.parse(sessionStorage.getItem(\"refreshToken\"))\r\n }\r\n let obj = await axios.post(\r\n `${process.env.REACT_APP_API_ROOT_PSL}UserInfo/RefreshToken`,refreshData\r\n )\r\n if(obj.data.accessToken != null){\r\n sessionStorage.setItem('Token', JSON.stringify(obj.data.accessToken))\r\n sessionStorage.setItem('refreshToken', JSON.stringify(obj.data.refreshToken))\r\n handleGetFailedInvoices()\r\n }\r\n else{\r\n toast.info(\"System failed,please try again later\")\r\n }\r\n }\r\n }\r\n }\r\n\r\n useEffect(() => {\r\n const controller = new AbortController()\r\n const signal = controller.signal\r\n getBranches()\r\n getCustomerTypes()\r\n\r\n return () => {\r\n //cleanup;\r\n if (signal.aborted === false) {\r\n controller.abort()\r\n }\r\n }\r\n }, [])\r\n\r\nconst handleDeclineforreview=(data)=>{\r\n setInvoiceID(data)\r\n setShowNewInvoiceModal(!showNewInvoiceModal)\r\n}\r\n\r\n useLayoutEffect(() => {\r\n handleGetFailedInvoices()\r\n return () => {}\r\n }, [])\r\n // failedGHGOVInvoices.map((x)=>console.log(x.status))\r\nconst handleNoPayments=()=>{\r\n setIsActive(true)\r\n}\r\n\r\n const onCancel = () => {\r\n setIsActive(false);\r\n };\r\n\r\n const getServiceList = async () => {\r\n try {\r\n const servicelist = await axios.get(\r\n `${process.env.REACT_APP_API_ROOT_PSL}NpaServices/GetServicesByDepartment/${users?.pkId}`,{ headers: {\r\n 'Authorization': `Bearer ${JSON.parse(sessionStorage.getItem(\"Token\"))}`\r\n }}\r\n );\r\nif(servicelist?.data) {\r\n return servicelist?.data;\r\n\r\n}\r\n } catch (error) {\r\n if(error.message.includes('Request failed with status code 401')){\r\n //console.log(\"error\");\r\n let refreshData = {\r\n token: JSON.parse(sessionStorage.getItem(\"Token\")),\r\n refreshToken: JSON.parse(sessionStorage.getItem(\"refreshToken\"))\r\n }\r\n await axios.post(\r\n `${process.env.REACT_APP_API_ROOT_PSL}UserInfo/RefreshToken`,refreshData\r\n ).then((res)=>{\r\n if(res?.data.accessToken != null){\r\n sessionStorage.setItem('Token', JSON.stringify(res.data.accessToken))\r\n sessionStorage.setItem('refreshToken', JSON.stringify(res.data.refreshToken))\r\n getServiceList()\r\n }\r\n else{\r\n toast.info(\"System failed,please try again later\")\r\n }\r\n })\r\n }\r\n }\r\n }\r\n\r\n return (\r\n <>\r\n \r\n {/* {showLoader ?
: null} */}\r\n
\r\n
\r\n
\r\n No payments have been made
\r\n \r\n
\r\n {showLoader &&
}\r\n {(masterInvoiceList.length < 0 &&
) ||\r\n (customerTypes.length < 1 &&
)}\r\n {/*
*/}\r\n
\r\n
\r\n \r\n {/* Card stats */}\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
Transactions \r\n\r\n \r\n List of all invoices \r\n \r\n \r\n \r\n \r\n setShowNewInvoiceModal(!showNewInvoiceModal)\r\n }\r\n size='md'\r\n >\r\n + Create Invoice\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n Invoice # \r\n Date \r\n Customer \r\n Currency \r\n Total Amount \r\n Status \r\n Actions \r\n \r\n \r\n \r\n \r\n {failedGHGOVInvoices?.map((invoice, key) => (\r\n \r\n \r\n {invoice.invoiceNo} \r\n {moment(invoice?.docDate,\"YYYY-MM-DD\").format(\"DD/MMM/YYYY\")} \r\n {invoice.customerName} \r\n {invoice.currency} \r\n \r\n {moneyInTxt(invoice.totalAmount)}\r\n \r\n\r\n\r\n {invoice?.status == 'Approved'? \r\n \r\n \r\n {invoice?.status}\r\n \r\n : null}\r\n \r\n {invoice?.status == 'Sent to SAP'? \r\n \r\n \r\n {invoice?.status}\r\n \r\n : null}\r\n {invoice?.status == 'Pending'? \r\n \r\n \r\n {invoice?.status}\r\n \r\n : null}\r\n {invoice?.status == 'Declined'? \r\n \r\n \r\n {invoice?.status}\r\n \r\n : null}\r\n {invoice?.status == 'Declined For Review'? \r\n \r\n \r\n {invoice?.status}\r\n \r\n : null}\r\n \r\n handleDeclineforreview(invoice)} className='fas fa-edit text-info' />\r\n \r\n \r\n ))}\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n\r\n {showNewInvoiceModal ? (\r\n \r\n \r\n \r\n ) : null}\r\n {showDraftDetails ? (\r\n \r\n ) : null}\r\n {showDeclineReason && (\r\n \r\n )}\r\n \r\n
\r\n >\r\n )\r\n}\r\n\r\nexport default Index\r\n\r\nconst styles = {\r\n body: {\r\n marginTop: 0,\r\n height: '450px',\r\n maxHeight: '450px',\r\n overflow: 'auto',\r\n },\r\n}\r\n","import moment from 'moment'\r\nimport React from 'react'\r\nimport { Card, Table, Form, Input, Row } from 'reactstrap'\r\n\r\nconst moneyInTxt = (value, standard, dec = 2) => {\r\n var nf = new Intl.NumberFormat(standard, {\r\n minimumFractionDigits: dec,\r\n maximumFractionDigits: 2,\r\n })\r\n return nf.format(Number(value) ? value : 0.0)\r\n}\r\n\r\nexport default function DetailedView({\r\n data,\r\n selectedInvoice,\r\n setSelectedInvoice,\r\n showDecline,\r\n setDisabled,\r\n setIsTypingReason,\r\n reasonRef\r\n}) {\r\n const handleDisableButton = () => {\r\n setDisabled(false)\r\n\r\n if (selectedInvoice.declineReason) {\r\n setIsTypingReason(true)\r\n } else {\r\n setIsTypingReason(false)\r\n }\r\n }\r\n// console.log( selectedInvoice);\r\n// console.log( data);\r\n return (\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n\r\n
\r\n No. 6 George W. Bush Highway Adj. Petroleum Commission\r\n \r\n Dzorwulu Accra.\r\n \r\n
\r\n\r\n
\r\n
INVOICE \r\n #{data.invoiceNo} \r\n \r\n Issued on: {moment(data.docDate,\"YYYY-MM-DD\").format(\"DD MMM YYYY\")} \r\n {/* Issued on: {new Date(data.docDate).toDateString().substring(3)} */}\r\n \r\n \r\n Due Date: {moment(data.docDueDate,\"YYYY-MM-DD\").format(\"DD MMM YYYY\")}\r\n {/* Due Date: {new Date(data.docDueDate).toDateString().substring(3)} */}\r\n \r\n \r\n
\r\n \r\n
Invoice for: {data.customerName} \r\n {/* \r\n {data.type} */}\r\n \r\n\r\n \r\n
\r\n \r\n \r\n \r\n {' '}\r\n Code\r\n \r\n \r\n Description\r\n \r\n \r\n Qty\r\n \r\n \r\n Price\r\n \r\n \r\n Amount\r\n \r\n \r\n \r\n \r\n {selectedInvoice.invoiceItems.map((item, key) => (\r\n \r\n {item.itemCode} \r\n \r\n {item?.itemDescription}\r\n \r\n \r\n {item?.quantity}\r\n \r\n \r\n {moneyInTxt(item.price)}\r\n \r\n \r\n {moneyInTxt(item.quantity * item.price)}\r\n \r\n \r\n ))}\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n Total{data.currency? `(${data.currency})` : \"\"} {' '}\r\n \r\n \r\n \r\n {moneyInTxt(\r\n data?.invoiceItems?.reduce(\r\n (total, item) => total + item?.quantity * item?.price,\r\n 0\r\n )\r\n )}\r\n \r\n \r\n
\r\n
\r\n Balance{data.currency? `(${data.currency})` : \"\"} {' '}\r\n \r\n {moneyInTxt(\r\n data?.balance)}\r\n \r\n \r\n {/*
\r\n Total{data.currency? `(${data.currency})` : \"\"} {' '}\r\n {moneyInTxt(\r\n data?.invoiceItems?.reduce(\r\n (total, item) => total + item?.quantity * item?.price,\r\n 0\r\n )\r\n )}\r\n \r\n
\r\n Balance{data.currency? `(${data.currency})` : \"\"} {' '}\r\n {moneyInTxt(\r\n data?.balance)} \r\n \r\n \r\n */}\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n {/*
{data.comments} */}\r\n { data?.remarks } \r\n \r\n \r\n
\r\n {/*
Decline Reason
*/}\r\n
\r\n setSelectedInvoice({\r\n ...selectedInvoice,\r\n declineReason: e.target.value,\r\n })\r\n }\r\n // onKeyDown={handleDisableButton}\r\n />\r\n
\r\n \r\n
\r\n \r\n )\r\n}\r\n\r\nconst styles = {\r\n header: {\r\n display: 'flex',\r\n height: '20%',\r\n marginBottom: 20,\r\n },\r\n leftHeader: {\r\n display: 'flex',\r\n width: '50%',\r\n flexDirection: 'column',\r\n alignItems: 'flex-start',\r\n //border: '1px solid blue',\r\n },\r\n\r\n rightHeader: {\r\n display: 'flex',\r\n width: '50%',\r\n flexDirection: 'column',\r\n alignItems: 'flex-end',\r\n //border: '1px solid green',\r\n },\r\n title: {\r\n height: '14%',\r\n backgroundColor: '#eff4fd',\r\n borderRadius: 10,\r\n padding: \"5px 10px\",\r\n marginBottom: 10,\r\n marginTop:-15\r\n },\r\n body: {\r\n marginTop: 0,\r\n height: '250px',\r\n maxHeight: '250px',\r\n overflow: 'auto',\r\n },\r\n footer: {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n marginTop: 5,\r\n // height: '10%',\r\n // overflow: 'auto',\r\n },\r\n total: {\r\n display: 'flex',\r\n justifyContent: 'flex-end',\r\n width: '100%',\r\n marginLeft: '40%',\r\n borderTop: '1px solid #e3e3e3',\r\n paddingTop: 10,\r\n //paddingRight: 50,\r\n marginTop: 10,\r\n },\r\n comments: {\r\n height: 60,\r\n width: '47%',\r\n // overflow: 'auto',\r\n flexDirection: 'row',\r\n backgroundColor: '#eff4fd',\r\n borderRadius: 10,\r\n padding: 10,\r\n color: '#cecece',\r\n marginTop: 40,\r\n fontSize:10\r\n },\r\n tablehead: {\r\n display: 'flex',\r\n justifyContent: 'flex-end',\r\n alignItems: 'flex-end',\r\n },\r\n bottomcomments: {\r\n display: 'flex',\r\n justifyContent: 'space-between',\r\n marginTop:-30\r\n },\r\n decline: {\r\n height: 60,\r\n width: '47%',\r\n // overflow: 'auto',\r\n // flexDirection: 'row',\r\n backgroundColor: '#eff4fd',\r\n borderRadius: 5,\r\n // padding: 10,\r\n color: 'darkred',\r\n marginTop: 40,\r\n fontSize:11\r\n },\r\n reason: {\r\n backgroundColor: 'inherit',\r\n },\r\n}\r\n","import React, { useState, useRef, useEffect } from 'react'\r\nimport { Modal, Button, Row, Col, Dropdown, DropdownMenu, DropdownToggle, DropdownItem, UncontrolledDropdown } from 'reactstrap'\r\nimport DetailedView from 'components/DetailedView'\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\nimport { faThumbsUp, faThumbsDown } from '@fortawesome/free-solid-svg-icons'\r\nimport { useSelector, useDispatch } from 'react-redux'\r\nimport { loadInvoice } from '../../actions'\r\nimport axios from 'axios'\r\nimport Loader from './Loader'\r\n\r\nimport { ToastContainer, toast } from 'react-toastify'\r\nimport 'react-toastify/dist/ReactToastify.css'\r\n\r\nfunction ViewDetails({ setShowViewDetails, data,setMasterInvoiceList,formType }) {\r\n //const masterInvoiceList = useSelector((state) => state.masterInvoiceList)\r\n const [selectedInvoice, setSelectedInvoice] = useState(data)\r\n const [showDecline, setShowDecline] = useState(true)\r\n const [disabled, setDisabled] = useState(false)\r\n const declineRef = useRef(null)\r\n const [count, setDeclineClickCount] = useState(0)\r\n const [loading, setShowLoader] = useState(false)\r\n const [isTypingReason, setIsTypingReason] = useState(true)\r\n const [dropdownOpen, setDropdownOpen] = useState(false);\r\n const reasonRef =useRef(null)\r\n const [buttonLabe,setButtonLabels]=useState(\"\")\r\n const[hideButtton,setHideButton]=useState(false)\r\n const [checkStatus,setCheckStatus]=useState(\"\")\r\n\r\n const userDetails = JSON.parse(sessionStorage.getItem(\"user\"));\r\n const dispatch = useDispatch()\r\n\r\n const approve = async (selectedInvoice) => {\r\n \r\n console.log(formType);\r\n \r\nif(selectedInvoice.status ==\"Pending Cancellation\" || formType == \"Approval Cancellation\"){\r\n\r\nif(selectedInvoice.declineReason== undefined){\r\n toast.info(\"Enter a reason\")\r\n return;\r\n}\r\nsetShowLoader(true)\r\n let invoiceUpdate ={\r\n invoiceId: selectedInvoice?.id,\r\n invoiceNo: selectedInvoice?.invoiceNo,\r\n status: 1 ,\r\n userdId: userDetails?.pkId,\r\n remarks: selectedInvoice.declineReason,\r\n stage: formType? 2 : 1\r\n }\r\n\r\n try {\r\n const request = await axios.post(`${process.env.REACT_APP_API_ROOT_PSL}Invoices/InvoiceCancellation`, invoiceUpdate,{ headers: {\r\n 'Authorization': `Bearer ${JSON.parse(sessionStorage.getItem(\"Token\"))}`\r\n }})\r\n ;console.log(request.data.status);\r\n if(request.data[0].status > 0\r\n ){\r\n toast.success(\r\n 'Invoice approved succesful'\r\n )\r\n setMasterInvoiceList((current) =>\r\n current.filter((item) => item.id !==selectedInvoice.id ) )\r\n setShowLoader(false)\r\n setShowViewDetails(false)\r\n }else{\r\n toast.info(\"Failed to update invoice status, try again later\")\r\n\r\n }\r\n \r\n \r\n } catch (error) {\r\n\r\n\r\n\r\n if(error.message.includes('Request failed with status code 401')){\r\n console.log(\"error\");\r\n let refreshData = {\r\n token: JSON.parse(sessionStorage.getItem(\"Token\")),\r\n refreshToken: JSON.parse(sessionStorage.getItem(\"refreshToken\"))\r\n }\r\n let obj = await axios.post(\r\n `${process.env.REACT_APP_API_ROOT_PSL}UserInfo/RefreshToken`,refreshData\r\n )\r\n if(obj.data.accessToken != null){\r\n sessionStorage.setItem('Token', JSON.stringify(obj.data.accessToken))\r\n sessionStorage.setItem('refreshToken', JSON.stringify(obj.data.refreshToken))\r\n approve(selectedInvoice)\r\n }\r\n else{\r\n \r\n toast.info(\r\n 'Invoice failed try again later'\r\n )\r\n setShowLoader(false)\r\n \r\n }\r\n }\r\n\r\n\r\n\r\n\r\n }\r\n \r\n}\r\nelse{\r\n if(selectedInvoice.declineReason== undefined){\r\n toast.info(\"Enter a reason\")\r\n return;\r\n }\r\n setShowLoader(true)\r\n let invoice_to_update = {\r\n remarks: selectedInvoice.declineReason,\r\n periodId: selectedInvoice.periodId,\r\n type: selectedInvoice.type,\r\n customerName: selectedInvoice.customerName,\r\n customerCode: selectedInvoice.customerCode,\r\n businessUnit: selectedInvoice.businessUnit,\r\n branchCode: selectedInvoice.branchCode,\r\n totalAmount: selectedInvoice.totalAmount,\r\n currency: selectedInvoice.currency,\r\n userId: JSON.parse(sessionStorage.getItem('user')).pkId,\r\n status: 3,\r\n invoiceItems: selectedInvoice.invoiceItems,\r\n }\r\n\r\ntry {\r\n const request = await axios.put(`${process.env.REACT_APP_API_ROOT_PSL}Invoices/${selectedInvoice.id}`, invoice_to_update,{ headers: {\r\n 'Authorization': `Bearer ${JSON.parse(sessionStorage.getItem(\"Token\"))}`\r\n }})\r\n // console.log(request);\r\n if(request){\r\n toast.success(\r\n 'Invoice approved succesful'\r\n )\r\n setMasterInvoiceList((current) =>\r\n current.filter((item) => item.id !==selectedInvoice.id ) )\r\n setShowLoader(false)\r\n setShowViewDetails(false)\r\n }else{\r\n setShowViewDetails(false)\r\n\r\n toast.info(\"Failed to update invoice status, try again later\")\r\n\r\n }\r\n \r\n \r\n} catch (error) {\r\n\r\n if(error.message.includes('Request failed with status code 401')){\r\n console.log(\"error\");\r\n let refreshData = {\r\n token: JSON.parse(sessionStorage.getItem(\"Token\")),\r\n refreshToken: JSON.parse(sessionStorage.getItem(\"refreshToken\"))\r\n }\r\n let obj = await axios.post(\r\n `${process.env.REACT_APP_API_ROOT_PSL}UserInfo/RefreshToken`,refreshData\r\n )\r\n if(obj.data.accessToken != null){\r\n sessionStorage.setItem('Token', JSON.stringify(obj.data.accessToken))\r\n sessionStorage.setItem('refreshToken', JSON.stringify(obj.data.refreshToken))\r\n approve(selectedInvoice)\r\n }\r\n else{\r\n toast.info(\r\n 'Invoice failed try again later'\r\n )\r\n setShowLoader(false)\r\n }\r\n }\r\n\r\n\r\n\r\n\r\n\r\n}\r\n\r\n}\r\n\r\n\r\n \r\n\r\nsetShowLoader(false)\r\n \r\n }\r\n\r\n \r\n \r\n\r\n\r\n const declineInvoice = async(selectedInvoice,code) => {\r\n // console.log('Selected invoice:', selectedInvoice)\r\n // setShowViewDetails(false)\r\n \r\n \r\n if(selectedInvoice.status ==\"Pending Cancellation\" || formType == \"Approval Cancellation\"){\r\n if(selectedInvoice.declineReason== undefined){\r\n toast.info(\"Enter a reason\")\r\n return;\r\n }\r\n let invoiceUpdate ={\r\n invoiceId: selectedInvoice?.id,\r\n invoiceNo: selectedInvoice?.invoiceNo,\r\n status: 2 ,\r\n userdId: userDetails?.pkId,\r\n remarks: selectedInvoice.declineReason,\r\n stage: formType? 2 : 1\r\n }\r\n setShowLoader(true)\r\n try {\r\n const request = await axios.post(`${process.env.REACT_APP_API_ROOT_PSL}Invoices/InvoiceCancellation`, invoiceUpdate,{ headers: {\r\n 'Authorization': `Bearer ${JSON.parse(sessionStorage.getItem(\"Token\"))}`\r\n }})\r\n \r\n if(request.data[0].status > 0){\r\n toast.success(\r\n 'Invoice declined succesful'\r\n )\r\n setMasterInvoiceList((current) =>\r\n current.filter((item) => item.id !==selectedInvoice.id ) )\r\n setShowLoader(false)\r\n setShowViewDetails(false)\r\n }else{\r\n toast.info(\"Failed to update invoice status, try again later\")\r\n\r\n }\r\n \r\n \r\n } catch (error) {\r\n \r\n if(error.message.includes('Request failed with status code 401')){\r\n console.log(\"error\");\r\n let refreshData = {\r\n token: JSON.parse(sessionStorage.getItem(\"Token\")),\r\n refreshToken: JSON.parse(sessionStorage.getItem(\"refreshToken\"))\r\n }\r\n await axios.post(\r\n `${process.env.REACT_APP_API_ROOT_PSL}UserInfo/RefreshToken`,refreshData\r\n ).then((res)=>{\r\n if(res.data.accessToken != null){\r\n sessionStorage.setItem('Token', JSON.stringify(res.data.accessToken))\r\n sessionStorage.setItem('refreshToken', JSON.stringify(res.data.refreshToken))\r\n declineInvoice(selectedInvoice,code)\r\n }\r\n else{\r\n toast.info(\r\n 'Invoice decline failed try again later'\r\n )\r\n setShowLoader(false)\r\n \r\n }})\r\n }\r\n }\r\n \r\n }else{\r\n if(selectedInvoice.declineReason== undefined){\r\n toast.info(\"Enter a reason\")\r\n return;\r\n }\r\n setShowLoader(true)\r\n let invoice_to_update = {\r\n remarks: selectedInvoice.declineReason,\r\n periodId: selectedInvoice.periodId,\r\n type: selectedInvoice.type,\r\n customerName: selectedInvoice.customerName,\r\n customerCode: selectedInvoice.customerCode,\r\n businessUnit: selectedInvoice.businessUnit,\r\n branchCode: selectedInvoice.branchCode,\r\n totalAmount: selectedInvoice.totalAmount,\r\n currency: selectedInvoice.currency,\r\n \r\n userId: JSON.parse(sessionStorage.getItem('user')).pkId,\r\n status: code,\r\n invoiceItems: selectedInvoice.invoiceItems,\r\n }\r\n \r\n try {\r\n const request = await axios.put(`${process.env.REACT_APP_API_ROOT_PSL}Invoices/${selectedInvoice.id}`, invoice_to_update,{ headers: {\r\n 'Authorization': `Bearer ${JSON.parse(sessionStorage.getItem(\"Token\"))}`\r\n }} )\r\n //console.log(request);\r\n if(request){\r\n toast.success('Invoice status has been updated to declined')\r\n setMasterInvoiceList((current) =>\r\n current.filter((item) => item.id !==selectedInvoice.id ) )\r\n setShowLoader(false)\r\n setShowViewDetails(false)\r\n }else{\r\n toast.info(\"Failed to update invoice status, try again later\")\r\n\r\n }\r\n \r\n \r\n } catch (error) {\r\n if(error.message.includes('Request failed with status code 401')){\r\n console.log(\"error\");\r\n let refreshData = {\r\n token: JSON.parse(sessionStorage.getItem(\"Token\")),\r\n refreshToken: JSON.parse(sessionStorage.getItem(\"refreshToken\"))\r\n }\r\n await axios.post(\r\n `${process.env.REACT_APP_API_ROOT_PSL}UserInfo/RefreshToken`,refreshData\r\n ).then((res) =>{\r\n if(res?.data.accessToken != null){\r\n sessionStorage.setItem('Token', JSON.stringify(res.data.accessToken))\r\n sessionStorage.setItem('refreshToken', JSON.stringify(res.data.refreshToken))\r\n declineInvoice(selectedInvoice,code)\r\n\r\n }\r\n else{\r\n toast.info(\"Failed to update invoice status, try again later\")\r\n setShowLoader(false)\r\n \r\n }})\r\n }\r\n\r\n\r\n\r\n \r\n // setShowViewDetails(false)\r\n }\r\n \r\n\r\n }\r\n setShowLoader(false)\r\n\r\n \r\n }\r\n\r\n\r\n\r\n\r\n \r\n \r\n\r\n\r\n\r\n\r\n const handleDecline = () => {\r\n // setDeclineClickCount(count + 1)\r\n // if (count == 0) {\r\n // setShowDecline(!showDecline)\r\n // setDisabled(!disabled)\r\n // } else {\r\n // declineInvoice(selectedInvoice,4)\r\n // }\r\n\r\ndeclineInvoice(selectedInvoice,4)\r\n\r\n \r\n }\r\n\r\n\r\nuseEffect(()=>{\r\n \r\n if(selectedInvoice.status==\"Pending Cancellation\" ){\r\n setHideButton(true)\r\n }\r\n if(formType== \"Approval Cancellation\"){\r\n setHideButton(true)\r\n }\r\n \r\n \r\n},[selectedInvoice])\r\n\r\n const handleDeclineForReview = () => {\r\n // setDeclineClickCount(count + 1)\r\n // if (count == 0) {\r\n // // console.log(count);\r\n // setShowDecline(!showDecline)\r\n // setDisabled(!disabled)\r\n // } else {\r\n // declineInvoice(selectedInvoice,1)\r\n // // setShowViewDetails(false)\r\n // }\r\n \r\n \r\n \r\n declineInvoice(selectedInvoice,1)\r\n \r\n }\r\n\r\n\r\n\r\n const toggle = () => setDropdownOpen((prevState) => !prevState);\r\n //console.log('data in view details: ', data)\r\n//console.log(selectedInvoice.declineReason);\r\n return (\r\n <>\r\n {loading ? : null}\r\n \r\n console.log('toggled')}\r\n >\r\n \r\n
\r\n View Details\r\n \r\n setShowViewDetails(false)}\r\n >\r\n × \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n Declined \r\n \r\n \r\n \r\n\r\n \r\n Declined for Review \r\n \r\n \r\n \r\n \r\n \r\n \r\n approve(selectedInvoice)}\r\n style={{ width: '100%' }}\r\n size='sm'\r\n >\r\n \r\n \r\n Approve\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n >\r\n )\r\n}\r\n\r\nexport default ViewDetails\r\n","import { Button, Row, Input, Col } from \"reactstrap\";\r\nimport { GiNextButton, GiPreviousButton } from \"react-icons/gi\";\r\nimport { GrFormPrevious, GrPrevious, GrNext } from \"react-icons/gr\";\r\nimport { RxTrackPrevious, RxTrackNext } from \"react-icons/rx\";\r\nimport { useEffect, useRef, useState } from \"react\";\r\n\r\nconst ListPagination = ({\r\n children,\r\n setPaginationDetails,\r\n paginationDetails,\r\n}) => {\r\n const Styles = {\r\n button: {\r\n display: \"flex\",\r\n border: \"0px\",\r\n textAlign: \"\",\r\n margin: \"0px\",\r\n padding: \"2px\",\r\n height: \"100%\",\r\n backgroundColor: \"transparent\",\r\n display: \"flex\",\r\n justifyContent: \"center\",\r\n alignItems: \"center\",\r\n height: \"25px\",\r\n width: \"25px\",\r\n border: \"1px solid rgb(0,0,0,0.3)\",\r\n },\r\n bottonOnFocus: {\r\n backgroundColor: \"#9999ff\",\r\n color: \"white\",\r\n height: \"25px\",\r\n width: \"20px\",\r\n display: \"flex\",\r\n justifyContent: \"center\",\r\n alignItems: \"center\",\r\n },\r\n row: {\r\n width: \"100%\",\r\n fontSize: \"small\",\r\n padding: \"10px 0px\",\r\n backgroundColor: \"#E8E8E8\",\r\n position: \"relative\",\r\n },\r\n input: {\r\n width: \"128px\",\r\n },\r\n };\r\n\r\n const [feedback, setFeedback] = useState(\"\");\r\n const inputRef = useRef();\r\n const [startingPoint, setStartingPoint] = useState(1);\r\n const [endPointMultiplicator, setendPointMultiplicator] = useState(1);\r\n \r\n let NumberOfPages ;\r\n if(Math.floor(paginationDetails?.totalCount / paginationDetails?.pageSize) === 0){\r\n NumberOfPages =0;\r\n }\r\n else {\r\n NumberOfPages = paginationDetails?.totalCount / paginationDetails?.pageSize\r\n } \r\n \r\n let buttonsLabelsArray = [];\r\n\r\n for (var i = 0; i <= NumberOfPages; i++) {\r\n buttonsLabelsArray?.push(i);\r\n }\r\n\r\n const [pagesNavigation, setPagesNavigations] = useState({\r\n all: buttonsLabelsArray,\r\n displayed: buttonsLabelsArray\r\n .slice(startingPoint - 1, endPointMultiplicator * paginationDetails?.pageSize)\r\n ?.slice(0, 10),\r\n\r\n hidden: buttonsLabelsArray\r\n .slice(startingPoint - 1, endPointMultiplicator * paginationDetails?.pageSize)\r\n .slice(10),\r\n previousDisplayed: [],\r\n });\r\n\r\n const moveToNextPage =() => {\r\n return setPaginationDetails((p)=>{\r\n return {...p, page: p.page + 1}\r\n })\r\n } \r\n\r\n const moveToPreviousPage = () =>{\r\n return setPaginationDetails((p)=>{\r\n return {...p, page: p.page - 1}\r\n })\r\n }\r\n const moveToNextCollectionOfPages = () => {\r\n if (buttonsLabelsArray.length - Number(startingPoint) > paginationDetails?.pageSize) {\r\n setPaginationDetails ((p)=>{\r\n return {...p, page: p.pageSize + 1}\r\n })\r\n setStartingPoint( paginationDetails?.pageSize * endPointMultiplicator + 1);\r\n setendPointMultiplicator(endPointMultiplicator + 1);\r\n }\r\n };\r\n\r\n const moveToPreviousCollecttionOfPages = () => {\r\n if (Number(startingPoint) !== paginationDetails?.pageSize && startingPoint > 1) {\r\n setPaginationDetails((p)=>{\r\n return {...p, page: p?.page - 1 }\r\n })\r\n\r\n setStartingPoint(startingPoint - paginationDetails?.pageSize);\r\n \r\n setendPointMultiplicator(endPointMultiplicator - 1);\r\n \r\n } else if (Number(startingPoint) === paginationDetails?.pageSize) {\r\n console.log(\"herererer\")\r\n setStartingPoint(1);\r\n setendPointMultiplicator(1);\r\n\r\n setPaginationDetails((p)=>{\r\n return {...p, page: 1 }\r\n })\r\n }\r\n };\r\n\r\n const moveToLast = () => {\r\n setStartingPoint(\r\n Math.floor(NumberOfPages / paginationDetails?.pageSize) * paginationDetails?.pageSize + 1\r\n );\r\n \r\n setPaginationDetails((p) => {\r\n return {...p, page: Math.floor(paginationDetails.totalCount / paginationDetails.pageSize) + 1}\r\n })\r\n\r\n setendPointMultiplicator(Math.ceil(NumberOfPages / paginationDetails?.pageSize));\r\n\r\n };\r\n\r\n const moveToFirst = () => {\r\n setStartingPoint(1);\r\n setendPointMultiplicator(1);\r\n\r\n setPaginationDetails((p) => {\r\n return {...p, page: 1}\r\n })\r\n };\r\n\r\n const changeQuantityPerPage = () => {\r\n if (\r\n inputRef.current.value?.length > 0 &&\r\n Number(inputRef.current.value) > 0\r\n ) {\r\n setPaginationDetails((p)=> {\r\n return {...p, pageSize: inputRef.current.value, page :1}\r\n })\r\n setStartingPoint(1);\r\n setendPointMultiplicator(1);\r\n } else {\r\n setFeedback(\"Enter valid number\");\r\n }\r\n };\r\n\r\n //clear feedback\r\n useEffect(() => {\r\n if (feedback) {\r\n setTimeout(() => {\r\n setFeedback(\"\");\r\n }, 3000);\r\n }\r\n }, [feedback]);\r\n\r\n //set the navigation buttons when quatityPerPage or StartingPoint or EndPointMultiplicator changes\r\n useEffect(() => {\r\n setPagesNavigations((p) => {\r\n return {\r\n all: buttonsLabelsArray,\r\n displayed: buttonsLabelsArray\r\n .slice(startingPoint - 1, endPointMultiplicator * paginationDetails?.pageSize)\r\n ?.slice(0, 10),\r\n\r\n hidden: buttonsLabelsArray\r\n .slice(startingPoint - 1, endPointMultiplicator * paginationDetails?.pageSize)\r\n .slice(10),\r\n };\r\n });\r\n }, [ startingPoint, endPointMultiplicator, paginationDetails]);\r\n\r\n \r\n return (\r\n \r\n {children}\r\n \r\n {\r\n moveToFirst();\r\n }}\r\n >\r\n \r\n \r\n { paginationDetails?.page - 1 !== 0 &&\r\n {\r\n e.preventDefault();\r\n if((Number(paginationDetails?.page ) - 1 === Number( pagesNavigation?.displayed[0])) && pagesNavigation?.displayed[0] !== pagesNavigation?.all[0]) {\r\n return moveToPreviousCollecttionOfPages()\r\n } \r\n else if(Number(paginationDetails?.page) > Number( pagesNavigation?.all[0] + 1)){\r\n return moveToPreviousPage()\r\n }\r\n }}\r\n >\r\n \r\n }{\" \"}\r\n\r\n {Number(pagesNavigation.displayed[0]) > 0 && (\r\n {\r\n moveToPreviousCollecttionOfPages()\r\n }}\r\n >\r\n ...\r\n \r\n )}\r\n \r\n {paginationDetails?.totalCount > 0 ? pagesNavigation.displayed.map((elements, index) => {\r\n return (\r\n {\r\n setPaginationDetails((p)=>{\r\n return {...p, page: elements +1}\r\n })\r\n\r\n }}\r\n >\r\n {Number(elements + 1)}\r\n \r\n );\r\n }) : 0 }\r\n \r\n {Number(pagesNavigation.all[pagesNavigation?.all?.length -1 ]) > Number(pagesNavigation.displayed[pagesNavigation?.displayed?.length - 1]) && (\r\n {\r\n moveToNextCollectionOfPages()\r\n }}\r\n >\r\n ...\r\n \r\n )}\r\n {paginationDetails?.totalCount > ( paginationDetails?.page * paginationDetails?.pageSize) && \r\n {\r\n e.preventDefault();\r\n if(Number(paginationDetails?.page) <= pagesNavigation?.displayed[pagesNavigation?.displayed?.length -1]) {\r\n return moveToNextPage()\r\n } \r\n return moveToNextCollectionOfPages()\r\n }}\r\n >\r\n \r\n }{\" \"}\r\n {\r\n e.preventDefault();\r\n \r\n if(!(pagesNavigation.displayed?.length === 1 && pagesNavigation.all?.length ===1 && pagesNavigation.displayed[0] === 0 && pagesNavigation.all[0] ===0 )){\r\n moveToLast();\r\n }\r\n }}\r\n >\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n . \r\n {feedback}\r\n
\r\n
{\r\n changeQuantityPerPage();\r\n }}\r\n defaultValue={paginationDetails?.pageSize}\r\n >\r\n 5 \r\n 10 \r\n 15 \r\n 20 \r\n \r\n
\r\n \r\n \r\n
\r\n {`${ paginationDetails?.totalCount > 0 ? ((paginationDetails?.pageSize * paginationDetails?.page ) - paginationDetails?.pageSize + 1 ): 0} - ${paginationDetails?.totalCount > ( paginationDetails?.page * paginationDetails?.pageSize) ? paginationDetails?.page * paginationDetails?.pageSize : paginationDetails?.totalCount } of ${paginationDetails?.totalCount} items`}\r\n \r\n
\r\n
\r\n \r\n );\r\n};\r\n\r\nexport default ListPagination;\r\n\r\n","import { useState, useEffect, createContext, useLayoutEffect } from 'react'\r\nimport { useSelector, useDispatch } from 'react-redux'\r\nimport { loadInvoice } from 'actions'\r\n\r\nimport {\r\n Button,\r\n Card,\r\n CardHeader,\r\n Table,\r\n Container,\r\n Row,\r\n Col,\r\n Modal,\r\n Badge,\r\n} from 'reactstrap'\r\n\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\nimport { faEye } from '@fortawesome/free-solid-svg-icons'\r\n\r\nimport Header from 'components/Headers/Header.js'\r\nimport ViewDetails from 'components/Modals/ViewDetails'\r\nimport IdleTimer from 'components/IdleTimer'\r\nimport Loader from 'components/Modals/Loader'\r\nimport { ToastContainer, toast } from 'react-toastify'\r\nimport moment from 'moment'\r\nimport RefreshToken from 'components/RefreshToken'\r\nimport axios from 'axios'\r\nimport ListPagination from '../components/ListPagination'\r\n\r\nconst moneyInTxt = (value, standard, dec = 2) => {\r\n var nf = new Intl.NumberFormat(standard, {\r\n minimumFractionDigits: dec,\r\n maximumFractionDigits: 2,\r\n })\r\n return nf.format(Number(value) ? value : 0.0)\r\n}\r\n\r\nexport const AppContext = createContext(null)\r\n\r\n\r\nconst PendingApproval = (props) => {\r\n //const masterInvoiceList = useSelector((state) => state.masterInvoiceList)\r\nconst[masterInvoiceList,setMasterInvoiceList]=useState([])\r\n const [showViewDetails, setShowViewDetails] = useState(false)\r\n const [invoiceList, setInvoiceList] = useState(masterInvoiceList)\r\n const [data, setData] = useState({})\r\n const [showLoader, setshowLoader] = useState(false)\r\n\r\n // for pagination\r\n const [paginationDetails, setPaginationDetails] = useState({page: 1, filter:\"*\", pageSize: 10, status: 2, totalCount:0})\r\n\r\n const dispatch = useDispatch()\r\n\r\n const previewSelectedInvoice = (id) => {\r\n //console.log(id)\r\n const selectedItem = masterInvoiceList.find((item) => item.id == id)\r\n // console.log('Selected Item', selectedItem)\r\n setData(selectedItem)\r\n setShowViewDetails(true)\r\n }\r\n \r\n // useEffect(() => {\r\n // const controller = new AbortController()\r\n // const signal = controller.signal\r\n // dispatch(loadInvoice())\r\n // // console.log('Pending invoices: ', invoiceList)\r\n // return () => {\r\n // //cleanup;\r\n // if (signal.aborted === false) {\r\n // controller.abort()\r\n // }\r\n // }\r\n // }, [])\r\n \r\n const userDetails = JSON.parse(sessionStorage.getItem('user')); \r\n\r\n const handleGetFailedInvoices = async () => {\r\n try {\r\n // &PageNumber=${paginationDetails.page}&PageSize=${paginationDetails?.pageSize}&Filter=${paginationDetails?.filter}\r\n let approve= await axios.get(\r\n `${process.env.REACT_APP_API_ROOT_PSL}Invoices/GetInvoicesByUserAndStatus/${userDetails?.pkId}?status=${paginationDetails.status}&PageNumber=${paginationDetails.page}&PageSize=${paginationDetails?.pageSize}&Filter=${paginationDetails?.filter}`,\r\n {\r\n headers: {\r\n Authorization: `Bearer ${JSON.parse(\r\n sessionStorage.getItem(\"Token\")\r\n )}`,\r\n },\r\n }\r\n \r\n )\r\n\r\n if(approve.data){\r\n setMasterInvoiceList(approve?.data?.data)\r\n if(approve?.data?.data?.length === 0) toast.info(\"No data found\")\r\n setPaginationDetails(p=> { return {...p, page: approve.data?.pageNo, pageSize: approve.data?.pageSize, totalCount: approve.data?.totalCount}})\r\n }\r\n setshowLoader(false)\r\n } catch (error) {\r\n console.log(error);\r\n RefreshToken(error,handleGetFailedInvoices)\r\n } \r\n setshowLoader(false);\r\n }\r\n\r\n useLayoutEffect(() => {\r\n handleGetFailedInvoices()\r\n return () => {}\r\n }, [ paginationDetails.page, paginationDetails.pageSize])\r\n \r\n // /api/v1/Invoices/GetUnApprovedInvoices/20009\r\n //console.log(masterInvoiceList);\r\n return (\r\n <>\r\n \r\n {showLoader ?
: null}\r\n
\r\n\r\n
\r\n {/*
*/}\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n {/* Page content */}\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
Unapproved Invoices \r\n \r\n List of pending invoices \r\n \r\n
\r\n \r\n \r\n \r\n {/* {
} */}\r\n \r\n \r\n
\r\n \r\n \r\n Invoice # \r\n \r\n \r\n Customer\r\n \r\n \r\n Date\r\n \r\n \r\n Currency\r\n \r\n Balance \r\n \r\n Total Amount\r\n \r\n \r\n\r\n \r\n Status\r\n \r\n Actions \r\n \r\n \r\n \r\n { masterInvoiceList?.map((invoice, key) => (\r\n \r\n \r\n {invoice.invoiceNo}\r\n \r\n \r\n {invoice.customerName}\r\n \r\n \r\n {moment(invoice?.docDate,\"YYYY-MM-DD\").format(\"DD/MMM/YYYY\")} \r\n \r\n \r\n {invoice?.currency}\r\n \r\n \r\n {moneyInTxt(invoice.balance)}\r\n \r\n\r\n \r\n \r\n {moneyInTxt(invoice.totalAmount)}\r\n \r\n \r\n \r\n \r\n {invoice?.status}\r\n \r\n \r\n \r\n \r\n previewSelectedInvoice(invoice.id)\r\n }\r\n size='sm'\r\n >\r\n \r\n \r\n \r\n \r\n View\r\n \r\n \r\n \r\n \r\n ))}\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n {showViewDetails ? (\r\n \r\n \r\n \r\n ) : null}\r\n \r\n
\r\n >\r\n )\r\n}\r\n\r\nexport default PendingApproval\r\n\r\nconst styles = {\r\n body: {\r\n marginTop: 0,\r\n height: '480px',\r\n maxHeight: '480px',\r\n },\r\n}\r\n","import React, { useState } from \"react\";\r\nimport { Table } from \"reactstrap\";\r\nimport { moneyInTxt } from \"views/Index\";\r\nimport { Pagination, PaginationItem, PaginationLink } from \"reactstrap\";\r\n\r\n\r\n\r\n\r\nexport const FormTable = ({invoiceListData , setInstallAmount, setTotalAmount, setRowData,checkedGrid, rowdata}) => {\r\n const [isCheckedAll, setIsCheckedAll] = useState(false);\r\n const [isCheck, setIsCheck] = useState([]);\r\n const [test,setTest]=useState([])\r\n\r\n\r\n // console.log({invoiceListData});\r\n \r\n\r\n const handleOnChange = (e) => {\r\n const { id, checked } = e.target;\r\n if(checked){\r\n\r\n //Set ischecked property of a checked data box to true\r\n invoiceListData.filter((x)=> x.id== id? x.isChecked = checked: null )\r\n\r\n //Adds to rowdata array to be posted\r\n invoiceListData.filter((x)=> x.id== id? handleRowdata(x): null )\r\n\r\n //Calculates total amount based on selected amount in a row data\r\n invoiceListData.filter((x)=> x.id== id? calculateTotalAmountAdd(x.totalAmount): null )\r\n\r\n \r\n\r\n }\r\n else{\r\n setIsCheckedAll(false);\r\n invoiceListData.filter((x)=> x.id== id? x.isChecked = false: null )\r\n\r\n //Removes unchecked rows from row data array\r\n if(rowdata){\r\n setRowData((current) =>\r\n current.filter((arr) => arr.id != id)\r\n )\r\n setRowData((current) =>\r\n current.filter((arr) => arr.invoiceId != id)\r\n )\r\n }\r\n\r\n // rowdata.filter((x)=>{x.i})\r\n\r\n\r\n //Subtracts from total amount and remove from array\r\n invoiceListData.filter((x)=> x.id== id? handleSubtract(x.totalAmount): null )\r\n\r\n \r\n\r\n }\r\n\r\n };\r\n\r\nconst handleRowdata=(data)=>{\r\n let handleRowdata={\r\n ichecked: data.isChecked,\r\n invoiceId: Number(data.id),\r\n outstandingAmount: Number(data.outstandingBalance),\r\n totalAmount: Number(data.totalAmount),\r\n totalPaid: Number(data.totalPaid),\r\n\r\n}\r\n setRowData(prevstate=>[...prevstate, handleRowdata])\r\n\r\n}\r\n\r\n \r\nconst calculateTotalAmountAdd=(value)=>{\r\n setTotalAmount((prevState)=> prevState + value)\r\n}\r\n\r\n//Function subtracts amount from total amount when a box is unchecked\r\nconst handleSubtract=(value)=>{\r\n setTotalAmount((prevState)=> prevState - value)\r\n}\r\n\r\n\r\n\r\n\r\nconst handleSelectAll = e => {\r\n const { id, checked } = e.target;\r\n\r\n setIsCheckedAll(!isCheckedAll);\r\n if(!isCheckedAll && rowdata.length > 0 ){\r\n setRowData(\"\")\r\n setTotalAmount(0)\r\n //Set ischecked property of a checked data box to true\r\n invoiceListData.filter((x)=> x.isChecked != checked? x.isChecked = checked: !checked )\r\n\r\n\r\n invoiceListData.filter(li =>handleRowdata(li) )\r\n\r\n\r\n //Calculates total amount based on selected amount in a row data\r\n invoiceListData.map((x)=> x.isChecked == checked? calculateTotalAmountAdd(x.totalAmount): null )\r\n \r\n\r\nreturn\r\n }\r\n\r\nif(!isCheckedAll && rowdata.length == 0){\r\n \r\n\r\n setIsCheck(invoiceListData.map((li) => li.isChecked = true));\r\n invoiceListData.map(li => li.id != rowdata.invoiceId? handleRowdata(li): null )\r\n calculateSelectedAll()\r\n \r\n }\r\n \r\n \r\n if (isCheckedAll) {\r\n setIsCheckedAll(false);\r\n\r\n\r\n setIsCheck([]);\r\n setIsCheck(invoiceListData.map(li => li.isChecked = false));\r\n\r\n \r\n // setRowData((current) =>\r\n // current.filter((arr) => arr.checked != true)\r\n // )\r\n setRowData((current) =>\r\n current.filter((arr) => arr.ichecked == false)\r\n )\r\n\r\n\r\n setTotalAmount(0)\r\n setInstallAmount(0)\r\n \r\n }\r\n};\r\n\r\nconst setRow=(li)=>{\r\n setRowData(\"\")\r\n handleRowdata(li)\r\n\r\n}\r\n\r\nvar existingInvoiceArr = []; \r\n\r\n// const existingInvoice = () => {if (invoiceListData.length > 0) \r\n// {for (let i = 0; i < invoiceListData.length; i++) { var obj = {};\r\n// obj = invoiceListData[i].id;\r\n// existingInvoiceArr.push(obj); }\r\n// const newdata = rowdata.filter((val) =>\r\n// {return !existingInvoiceArr.find((arr) =>\r\n// {return ((val.invoiceId === arr.id ) )\r\n// ;\r\n// });\r\n// });\r\n// handleRowdata(newdata);} \r\n// // else {\r\n// // setCheckedBeneficiaryTypes(relationTypes); \r\n// // } \r\n// };\r\n\r\n\r\nconst calculateSelectedAll=()=>{\r\nlet arr=[]\r\nconst initialValue = 0;\r\n invoiceListData.map(x=> arr.push(x.totalAmount))\r\n let tottal = arr.reduce(\r\n (accumulator, currentValue) => accumulator + currentValue,\r\n initialValue\r\n);\r\nsetTotalAmount(tottal)\r\n\r\n}\r\n\r\n\r\n\r\n\r\n\r\n \r\n\r\n\r\n return (\r\n <>\r\n \r\n
Payments to Include \r\n
\r\n \r\n
\r\n Select All {\"\"} \r\n 0? false : true}\r\n\r\n />\r\n
\r\n \r\n\r\n\r\n
\r\n
\r\n >\r\n );\r\n};\r\nconst styles = {\r\n body: {\r\n marginTop: 0,\r\n height: '450px',\r\n maxHeight: '450px',\r\n overflow: 'auto',\r\n },\r\n}\r\n","import axios from \"axios\";\r\nimport Autocomplete from \"components/Autocomplete\";\r\nimport React, { forwardRef, useEffect, useImperativeHandle, useRef, useState } from \"react\";\r\nimport { RotatingLines } from \"react-loader-spinner\";\r\nimport { toast } from \"react-toastify\";\r\nimport {\r\n Button,\r\n Col,\r\n Form,\r\n FormGroup,\r\n Input,\r\n InputGroup,\r\n InputGroupAddon,\r\n InputGroupText,\r\n Modal,\r\n Row,\r\n} from \"reactstrap\";\r\nimport { moneyInTxt } from \"views/Index\";\r\nimport { FormTable } from \"./FormTable\";\r\n\r\n\r\n// const init = {\r\n// customerName: '',\r\n// serviceProviderId: '',\r\n// customerCode: '',\r\n// invoiceType: '',\r\n \r\n// description: '',\r\n// quantity: 1,\r\n// price: '',\r\n// comments: '',\r\n// supportedBranch: '',\r\n// }\r\nconst init={\r\n name: \"\",\r\n serviceProviderId: \"\",\r\n duration: \"\",\r\n startDate: \"\",\r\n}\r\n\r\n\r\nconst post ={\r\n \"name\": \"string\",\r\n \"serviceProviderId\": 0,\r\n \"duration\": 0,\r\n \"startDate\": \"2023-02-10T12:19:56.641Z\",\r\n \"userId\": 0,\r\n \"paymentPlanDetails\": [\r\n {\r\n \"invoiceId\": 0,\r\n \"outstandingAmount\": 0,\r\n \"totalAmount\": 0,\r\n \"totalPaid\": 0\r\n }\r\n ]\r\n}\r\nconst getFormattedPrice = (price) => `${price.toFixed(2)}`;\r\nconst PaymentForm = ({ setShow,customerTypes,show }) => {\r\n const [loading, setLoading] = useState(false)\r\n const [submitData, setSubmitData]=useState(\"\")\r\n const [customers, setCustomers] = useState([])\r\n const [formData, setFormData] = useState(init)\r\n const [gridData, setGridData] = useState([])\r\n const [checkedGrid,setCheckedGrid]=useState(false)\r\n const[totalAmount,setTotalAmount] = useState(0)\r\n const [installAmount, setInstallAmount]= useState(0)\r\n const [rowData, setRowData]=useState([])\r\n const[handlePostData, setHanlePostData]=useState([])\r\n const [handleDurationChecker, setDurationChecker]=useState(\"\")\r\n const durationRef =useRef(null)\r\n const [canSave, setCanSave] = useState(false);\r\n\r\n\r\n\r\n\r\n const handleOnChange=(evnt)=>{\r\n setFormData((data) => {\r\n return { ...data, [evnt?.target?.name]: evnt?.target?.value };\r\n });\r\n if(evnt?.target?.name === \"duration\"){\r\n\r\n setDurationChecker(evnt?.target?.value)\r\n evnt?.target?.value <=0 || evnt?.target?.value > 18 ? toast.error(\"Duration Should be between 1 and 18\") \r\n : null\r\n evnt?.target?.value? setCheckedGrid(true): setCheckedGrid(false)\r\n \r\n return\r\n }\r\n \r\n\r\n } \r\n\r\n\r\n\r\n useEffect(() => {\r\n const requiredObj = {\r\n name: formData.name,\r\n serviceProviderId: formData.serviceProviderId.toString(),\r\n duration: formData.duration,\r\n startDate: formData.startDate,\r\n };\r\n setCanSave(Object.values(requiredObj).every((field) => field != \"\"));\r\n }, [formData]);\r\n\r\n\r\n\r\nconst handlePosting=()=>{\r\n let postBody={\r\n name: formData.name,\r\n serviceProviderId: Number(formData.serviceProviderId),\r\n duration: Number(formData.duration),\r\n startDate: formData.startDate,\r\n userId: 0,\r\n paymentPlanDetails: rowData\r\n}\r\nsetHanlePostData(postBody)\r\n return (postBody); \r\n}\r\n\r\nconst handleOnSubmit=()=>{\r\n try {\r\n \r\n } catch (error) {\r\n \r\n }\r\nif(!handlePosting().name || handlePosting().name ==\"\" ){\r\n toast.error('Plan name cannot be empty!')\r\nreturn\r\n}\r\nif(!handlePosting().serviceProviderId || handlePosting().serviceProviderId == \"\" ){\r\n toast.error('Customer Name cannot be empty!')\r\nreturn\r\n}\r\nif(!handlePosting().startDate || handlePosting().startDate == \"\" ){\r\n toast.error('Start date cannot be empty!')\r\nreturn\r\n}\r\nif(handlePosting().duration == 0 || handlePosting().duration == \"\" ){\r\n toast.error('Duration cannot be empty!')\r\nreturn\r\n}\r\nif(handlePosting().paymentPlanDetails.length <= 0 ){\r\n toast.error('Select payment!')\r\nreturn\r\n}\r\n\r\naxios\r\n.post(`${process.env.REACT_APP_API_ROOT_PSL}PaymentPlan`, handlePosting(),{ headers: {\r\n 'Authorization': `Bearer ${JSON.parse(sessionStorage.getItem(\"Token\"))}`\r\n}})\r\n.then(function (response) {\r\n if (response?.status < 400) {\r\n toast.success(\"Record added!\")\r\n formReset()\r\n // window.location.reload()\r\n\r\n } else {\r\n toast.warning('Something went wrong please contact admin')\r\n }\r\n\r\n})\r\n.catch(function (error) {\r\n if(error.message.includes('Request failed with status code 401')){\r\n console.log(\"error\");\r\n let refreshData = {\r\n token: JSON.parse(sessionStorage.getItem(\"Token\")),\r\n refreshToken: JSON.parse(sessionStorage.getItem(\"refreshToken\"))\r\n }\r\n let obj = axios.post(\r\n `${process.env.REACT_APP_API_ROOT_PSL}UserInfo/RefreshToken`,refreshData\r\n )\r\n if(obj.data.accessToken != null){\r\n sessionStorage.setItem('Token', JSON.stringify(obj.data.accessToken))\r\n sessionStorage.setItem('refreshToken', JSON.stringify(obj.data.refreshToken))\r\n handleOnSubmit()\r\n }\r\n else{\r\n toast.info(\"System failed,please try again later\")\r\n \r\n }\r\n } \r\n\r\n toast.error('Failed to save payment plan')\r\n})\r\n}\r\n\r\nconst formReset=()=>{\r\n setFormData(init)\r\n setShow(false)\r\n}\r\n\r\n\r\n\r\nconsole.log(formData);\r\n\r\nconst handleGrid = async (type) => {\r\n try {\r\n let serviceProvider = Number(formData?.serviceProviderId) \r\n let allGridData =\r\n await axios.get(\r\n `${process.env.REACT_APP_API_ROOT_PSL}Invoices/GetOverdueInvoiceByPSPId/${serviceProvider}`,{ headers: {\r\n 'Authorization': `Bearer ${JSON.parse(sessionStorage.getItem(\"Token\"))}`\r\n }}\r\n )\r\n \r\n // console.log( {allGridData}) \r\n setGridData([...allGridData?.data].map(x=>({...x, isChecked:false})))\r\n\r\n \r\n //setCustomers(allCustomers.map((customer) => customer.name))\r\n } catch (error) {\r\n \r\n if(error.message.includes('Request failed with status code 401')){\r\n console.log(\"error\");\r\n let refreshData = {\r\n token: JSON.parse(sessionStorage.getItem(\"Token\")),\r\n refreshToken: JSON.parse(sessionStorage.getItem(\"refreshToken\"))\r\n }\r\n let obj = await axios.post(\r\n `${process.env.REACT_APP_API_ROOT_PSL}UserInfo/RefreshToken`,refreshData\r\n )\r\n if(obj.data.accessToken != null){\r\n sessionStorage.setItem('Token', JSON.stringify(obj.data.accessToken))\r\n sessionStorage.setItem('refreshToken', JSON.stringify(obj.data.refreshToken))\r\n handleGrid()\r\n }\r\n else{\r\n toast.info(\"System failed,please try again later\")\r\n\r\n }\r\n }\r\n\r\n }\r\n}\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nuseEffect(()=>{\r\n let results = Number(totalAmount) / Number(formData?.duration) \r\n\r\n setInstallAmount(parseInt(results)) \r\n \r\n},[totalAmount])\r\n\r\n\r\n\r\n\r\n\r\n const handleCustomerList = async (type) => {\r\n try {\r\n let allCustomers = \r\n await axios.get(\r\n `${process.env.REACT_APP_API_ROOT_PSL}NpaServices/SearchCustomers/*/${type}`,{ headers: {\r\n 'Authorization': `Bearer ${JSON.parse(sessionStorage.getItem(\"Token\"))}`\r\n }}\r\n )\r\n \r\n\r\n setCustomers(allCustomers?.data)\r\n } catch (error) {\r\n if(error.message.includes('Request failed with status code 401')){\r\n console.log(\"error\");\r\n let refreshData = {\r\n token: JSON.parse(sessionStorage.getItem(\"Token\")),\r\n refreshToken: JSON.parse(sessionStorage.getItem(\"refreshToken\"))\r\n }\r\n let obj = await axios.post(\r\n `${process.env.REACT_APP_API_ROOT_PSL}UserInfo/RefreshToken`,refreshData\r\n )\r\n if(obj.data.accessToken != null){\r\n sessionStorage.setItem('Token', JSON.stringify(obj.data.accessToken))\r\n sessionStorage.setItem('refreshToken', JSON.stringify(obj.data.refreshToken))\r\n handleCustomerList()\r\n }\r\n else{\r\n toast.info(\"System failed,please try again later\")\r\n \r\n }\r\n }\r\n }\r\n }\r\n\r\n\r\nuseEffect(()=>{\r\n handleGrid()\r\n \r\n},[formData?.serviceProviderId])\r\n\r\n\r\n// const calculateTotalAmountAdd=(value)=>{\r\n// setTotalAmount((prevState)=> prevState + value)\r\n// }\r\n\r\n\r\n\r\n\r\n // useEffect(() => {\r\n\r\n // const init = async () => {\r\n // setLoading(true)\r\n // let results= await axios.get(\r\n // `${process.env.REACT_APP_API_ROOT_PSL}PaymentPlan/GetByPspId/${119}`,{ headers: {\r\n // 'Authorization': `Bearer ${JSON.parse(sessionStorage.getItem(\"Token\"))}`\r\n // }}\r\n // )\r\n // .then((res) => res.json())\r\n // .then((data) => {\r\n // }\r\n // ).finally(() => {\r\n \r\n // setLoading(false)\r\n // })\r\n\r\n // }\r\n // init()\r\n\r\n // return () => {\r\n\r\n // }\r\n // }, [])\r\n\r\n\r\n return (\r\n \r\n \r\n
\r\n Create Payment Plan\r\n \r\n setShow(false)}\r\n >\r\n × \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\n\r\n\r\nexport default PaymentForm\r\nconst styles = {\r\n body: {\r\n marginTop: 0,\r\n height: \"450px\",\r\n maxHeight: \"450px\",\r\n // overflow: \"auto\",\r\n \r\n },\r\n};","import moment from 'moment'\r\nimport React, { useEffect, useState } from 'react'\r\nimport { Modal, Button, Table, Row, Container, Col, Card, CardHeader } from 'reactstrap'\r\nimport { moneyInTxt } from 'views/Index'\r\n\r\nfunction PaymentPlanModal({setShow,showModalData}) {\r\n\r\n\r\n\r\n return (\r\n \r\n \r\n
\r\n Payments\r\n \r\n setShow(false)}\r\n >\r\n × \r\n \r\n \r\n\r\n \r\n
\r\n \r\n \r\n Name \r\n Duration \r\n Start Date \r\n\r\n \r\n Total Amount\r\n \r\n \r\n Installment Amount\r\n \r\n \r\n Total Paid\r\n \r\n \r\n \r\n \r\n \r\n { Array && showModalData?.map((item, key)=>{\r\n\r\n return( \r\n \r\n {item?.name} \r\n {item?.duration} \r\n {moment(item?.startDate,\"MM-DD-YYYY\").format(\"DD/MMM/YYYY\")} \r\n {moneyInTxt(item?.totalAmount)} \r\n {moneyInTxt(item?.installAmount)} \r\n {moneyInTxt(item?.totalPaid)} \r\n\r\n )\r\n\r\n })\r\n \r\n } \r\n \r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n setShow(false)}>\r\n Close\r\n \r\n {/* \r\n Close\r\n */}\r\n
\r\n \r\n\r\n )\r\n}\r\n\r\nexport default PaymentPlanModal\r\nconst styles = {\r\n body: {\r\n marginTop: 0,\r\n height: '450px',\r\n maxHeight: '450px',\r\n overflow: 'auto',\r\n },\r\n}","import { useState, useEffect, useLayoutEffect, createContext, useRef } from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\n// import { increment, decrement, loadInvoice, saveInvoice } from \"../actions\";\r\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\r\nimport axios from \"axios\";\r\nimport { ToastContainer, toast } from \"react-toastify\";\r\nimport \"react-toastify/dist/ReactToastify.css\";\r\n// import FailureModal from \"../components/Modals/FailureModal\";\r\n\r\n// reactstrap components\r\nimport {\r\n Button,\r\n Card,\r\n CardHeader,\r\n Table,\r\n Container,\r\n Row,\r\n Col,\r\n Badge,\r\n Modal,\r\n} from \"reactstrap\";\r\n\r\nimport Header from \"components/Headers/Header.js\";\r\nimport Loader from \"components/Modals/Loader\";\r\nimport PaymentForm from \"./PaymentForm\";\r\nimport PreviewPaymentPlan from \"./PaymentPlanModal\";\r\nimport SuccessModal from \"components/Modals/SuccessModal\";\r\nimport PaymentPlanModal from \"./PaymentPlanModal\";\r\nimport moment from \"moment\";\r\nimport useIdleTimer from \"customHooks/useIdle\";\r\nimport IdleTimer from \"components/IdleTimer\";\r\nimport RefreshToken from \"components/RefreshToken\";\r\n\r\nconst currency = (amount) => {\r\n return amount.toLocaleString(\"en-US\", {\r\n style: \"currency\",\r\n currency: \"GHS\",\r\n });\r\n};\r\n\r\nconst moneyInTxt = (value, standard, dec = 2) => {\r\n var nf = new Intl.NumberFormat(standard, {\r\n minimumFractionDigits: dec,\r\n maximumFractionDigits: 2,\r\n });\r\n return nf.format(Number(value) ? value : 0.0);\r\n};\r\n\r\nif (process.env.NODE_ENV === \"production\") {\r\n console.log(\"production\");\r\n} else {\r\n // console.log(process.env.REACT_APP_scope)\r\n}\r\nexport const FormContext = createContext(null)\r\nconst Index = (props) => {\r\n const [show, setShow] = useState(false)\r\n const [customerTypes, setCustomerTypes] = useState([])\r\n const [state, setState] = useState('Active')\r\n \r\n \r\n\r\n const getCustomerTypes = async () => {\r\n try {\r\n let allTypes =\r\n await axios.get(\r\n //'https://psl-webapps/NpaServices/api/PSPType?iCompanyID=1&szFilter=*&status=4'\r\n `${process.env.REACT_APP_NPASERVICES_API}PSPType?iCompanyID=1&szFilter=*&status=4`,{ headers: {\r\n 'Authorization': `Bearer ${JSON.parse(sessionStorage.getItem(\"Token\"))}`\r\n }}\r\n \r\n )\r\n setCustomerTypes((prevState) => allTypes.data)\r\n \r\n } catch (error) {\r\n \r\n RefreshToken(error,getCustomerTypes)\r\n }\r\n }\r\n\r\n \r\n\r\n\r\n\r\n return (\r\n <>\r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n {show ?\r\n
\r\n : null}\r\n\r\n
\r\n \r\n \r\n \r\n \r\n \r\n Payment Plans \r\n\r\n \r\n {setShow(true); getCustomerTypes() } }\r\n size=\"md\"\r\n >\r\n + Create Payment Plan\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n >\r\n );\r\n};\r\n\r\nconst PaymentPlanTable = () => {\r\n const [paymentPlans, setPaymentPlans] = useState([])\r\n const [showMoreDetails, setShowMoreDetails]=useState(false)\r\n const [showModal,setShowModal]=useState([])\r\n\r\n useEffect(() => {\r\n\r\n const init = async () => {\r\n try {\r\n let Payplan = await axios.get(\r\n `${process.env.REACT_APP_API_ROOT_PSL}PaymentPlan`,{ headers: {\r\n 'Authorization': `Bearer ${JSON.parse(sessionStorage.getItem(\"Token\"))}`\r\n }}\r\n \r\n )\r\n setPaymentPlans(Payplan.data)\r\n if(Payplan?.data?.length === 0) toast.info(\"No data found\")\r\n } catch (error) {\r\n\r\n RefreshToken(error,init)\r\n \r\n }\r\n }\r\n init()\r\n\r\n return () => {\r\n\r\n }\r\n }, [])\r\n \r\n \r\n\r\n\r\n const GetTableData=async(e)=>{\r\n setShowMoreDetails(true)\r\n await fetch(\r\n `${process.env.REACT_APP_API_ROOT_PSL}PaymentPlan/${e}`\r\n )\r\n .then((res) => res.json())\r\n .then((data) =>\r\n setShowModal([...data])\r\n ).catch(e => {\r\n toast.error(\"error loading payment plans\")\r\n console.log({ e });\r\n })\r\n\r\n }\r\n\r\n\r\n\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n {/* Invoice # */}\r\n \r\n Payment Plan Name\r\n \r\n \r\n Service Provider\r\n \r\n \r\n Start Date\r\n \r\n \r\n End Date\r\n \r\n \r\n Installment Amount\r\n \r\n Status \r\n Actions \r\n \r\n \r\n \r\n {paymentPlans.map((paymentPlan, key) => <>\r\n\r\n \r\n \r\n {paymentPlan.name}\r\n \r\n \r\n {paymentPlan.serviceProviderId}\r\n \r\n \r\n {/* {new Date(paymentPlan.startDate).toLocaleDateString(\"en-gb\")} */}\r\n {moment(paymentPlan.startDate,\"MM-DD-YYYY\").format(\"DD/MMM/YYYY\")}\r\n \r\n\r\n \r\n \r\n {/* {new Date(paymentPlan.endDate).toLocaleDateString(\"en-gb\")} */}\r\n {moment(paymentPlan.endDate,\"MM-DD-YYYY\").format(\"DD/MMM/YYYY\")}\r\n \r\n \r\n \r\n {moneyInTxt(paymentPlan.installAmount)}\r\n \r\n \r\n {/* */}\r\n status\r\n \r\n \r\n < td style={{display:\"grid\", placeContent:\"center\"}}>\r\n {GetTableData(paymentPlan?.id)}} className='fas fa-eye text-info mr-3' />\r\n {/* \r\n \r\n */}\r\n \r\n\r\n \r\n >\r\n )}\r\n \r\n
\r\n {\r\n showMoreDetails && ( )\r\n }\r\n >\r\n )\r\n}\r\n\r\nexport default Index;\r\n\r\nconst styles = {\r\n body: {\r\n marginTop: 0,\r\n height: \"450px\",\r\n overflowY: \"scroll\",\r\n },\r\n};\r\n","import React from 'react'\r\nimport { Container } from 'reactstrap'\r\n\r\nconst EmptyHeader = () => {\r\n return (\r\n \r\n )\r\n}\r\nexport default EmptyHeader","import { BoldBI } from '@boldbi/boldbi-embedded-sdk'\r\nimport React, { useEffect, useState } from 'react'\r\nimport { Card, CardBody, Col, Container, Row } from 'reactstrap'\r\nimport EmptyHeader from './Headers/EmptyHeader'\r\nimport Loader from './Modals/Loader'\r\nimport IdleTimer from './IdleTimer'\r\n \r\n\r\n const Dashboard = () => {\r\n\r\n const environment = \"onpremise\";\r\n const siteIdentifier = \"site/site1\";\r\n const apiHost=\"http://localhost:3000/\"\r\n const rootUrl = \"http://localhost:64503/bi/\";\r\n\r\n function renderDashboard() {\r\n var boldbiEmbedInstance = BoldBI.create({\r\n dashboardSettings: {\r\n showHeader: false,\r\n showExport: true,\r\n showRefresh: true\r\n },\r\n widgetSettings: {\r\n showMaximize: true,\r\n showFilter: true\r\n }\r\n });\r\n boldbiEmbedInstance.loadDashboard();\r\n }\r\n\r\n const EmbededDashboard = () => {\r\n return (\r\n <>\r\n \r\n \r\n \r\n >\r\n );\r\n };\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n )\r\n}\r\nexport default Dashboard\r\n","// import \"../node_modules/@syncfusion/ej2-base/styles/material.css\";\r\n// import \"../node_modules/@syncfusion/ej2-lists/styles/material.css\";\r\n// import \"../node_modules/@syncfusion/ej2-buttons/styles/material.css\";\r\n// import \"../node_modules/@syncfusion/ej2-inputs/styles/material.css\";\r\n// import \"../node_modules/@syncfusion/ej2-popups/styles/material.css\";\r\n// import \"../node_modules/@syncfusion/ej2-react-calendars/styles/material.css\";\r\n\r\n\r\nimport React, { useRef, useState } from 'react'\r\nimport { Card, CardHeader, Col, Container, Row } from 'reactstrap'\r\nimport { Button } from 'reactstrap'\r\nimport { ToastContainer, toast } from 'react-toastify'\r\nimport IdleTimer from '../components/IdleTimer'\r\n\r\nconst InvoiceReport = () => {\r\n const [reportType, setReportType] = useState(\"\")\r\n const [category, setCategoryType] = useState(\"\")\r\n const [startDate, setStartDate] = useState(\"\")\r\n const [endDate, setEndDate] = useState(\"\")\r\n const months =['Jan', 'Feb', 'March', \"April\", 'May', 'June', 'July', 'Aug', 'Sept', 'Oct', 'Nov', 'Dec']\r\n const userDetails = JSON.parse(sessionStorage.getItem('user')); \r\n const handleViwReport = () => {\r\n if (!reportType && !category) {\r\n return toast.warning(\"Select report type and category\")\r\n }\r\n if (!reportType) {\r\n return toast.warning(\"Select report type \")\r\n }\r\n if (!category) {\r\n return toast.warning(\"Select report category \")\r\n }\r\n\r\n if (startDate.length === 0 || ! new Date(startDate)) {\r\n return toast.warning(\"Select valid start date \")\r\n }\r\n\r\n if (endDate.length ===0 || ! new Date(endDate)) {\r\n return toast.warning(\"Select valid end date \")\r\n }\r\n if ( !(new Date(endDate) >= new Date(startDate))) {\r\n return toast.warning(\"End date must be ahead of start date\")\r\n }\r\n\r\n if (reportType && reportTypesArr.find(ele => { return ele.name?.toString()?.toLowerCase() === reportType.toLowerCase()}) \r\n && (category &&reportCartegoryArr?.find(ele => { return ele?.value.toString().toLowerCase() === category?.toString()?.toLowerCase()}))\r\n && (endDate.length !==0 && new Date(endDate))\r\n && (startDate.length !==0 && new Date(startDate))\r\n && (new Date(endDate) >= new Date(startDate))\r\n ) {\r\n \r\n localStorage.setItem(\"reportParams\", JSON.stringify({\r\n type : reportType, \r\n category : category, \r\n startDate : `${startDate.split(\"-\")[1]}-${startDate.split(\"-\")[2]}-${startDate.split(\"-\")[0]}`, \r\n endDate: `${endDate.split(\"-\")[1]}-${endDate.split(\"-\")[2]}-${endDate.split(\"-\")[0]}`,\r\n userId : userDetails?.pkId,\r\n filter: userDetails?.pkId\r\n }\r\n )),\r\n window?.open(`${process.env.REACT_APP_BASE_ROUTE}/viewReport`, '_blank')\r\n }\r\n }\r\n\r\n const reportTypesArr = [\r\n {\r\n id: 1,\r\n name: \"Listing Report\"\r\n }\r\n ]\r\n const reportCartegoryArr = [\r\n {\r\n id: 1,\r\n name: \"Invoice Listing\",\r\n value :\"InvoiceListing\"\r\n },\r\n {\r\n id: 2,\r\n name: \"Invoice Listing By Item\",\r\n value : \"InvoiceListingByItem\"\r\n },\r\n {\r\n id: 3,\r\n name: \"Invoice Payment Listing\",\r\n value : \"InvoicePaymentListing\"\r\n }\r\n ]\r\n\r\n return (\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n Preview Report \r\n
\r\n \r\n \r\n \r\n \r\n handleViwReport()}>\r\n View Report\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n )\r\n}\r\nexport default InvoiceReport;\r\n\r\nconst styles =\r\n{\r\n position: \"absolute\",\r\n top: \"103%\",\r\n right: '0',\r\n width: \" 120px\",\r\n transform: \"translateY(-50%)\"\r\n\r\n}","import moment from 'moment'\r\nimport React from 'react'\r\nimport { Card, Table, Form, Input, Row } from 'reactstrap'\r\n// import npa from '../../assets' \r\n\r\nconst moneyInTxt = (value, standard, dec = 2) => {\r\n var nf = new Intl.NumberFormat(standard, {\r\n minimumFractionDigits: dec,\r\n maximumFractionDigits: 2,\r\n })\r\n return nf.format(Number(value) ? value : 0.0)\r\n}\r\n\r\nexport default function InvoiceDetailedView({\r\n data,\r\n selectedInvoice,\r\n setSelectedInvoice,\r\n showDecline,\r\n setDisabled,\r\n setIsTypingReason,\r\n base64Item\r\n\r\n}) {\r\n const handleDisableButton = () => {\r\n setDisabled(false)\r\n\r\n if (selectedInvoice.declineReason) {\r\n setIsTypingReason(true)\r\n } else {\r\n setIsTypingReason(false)\r\n }\r\n }\r\n//console.log(data);\r\n return (\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n\r\n
\r\n No. 6 George W. Bush Highway Adj. Petroleum Commission\r\n \r\n Dzorwulu Accra.\r\n \r\n
\r\n\r\n
\r\n
INVOICE \r\n #{data.invoiceNo} \r\n \r\n Issued on: {moment(data.docDate,\"YYYY-MM-DD\").format(\"DD MMM YYYY\")} \r\n {/* Issued on: {new Date(data.docDate).toDateString().substring(3)} */}\r\n \r\n \r\n Due Date: {moment(data.docDueDate,\"YYYY-MM-DD\").format(\"DD MMM YYYY\")}\r\n {/* Due Date: {new Date(data.docDueDate).toDateString().substring(3)} */}\r\n \r\n \r\n
\r\n \r\n
Invoice for: {data.customerName} \r\n {/* {data.customerName} \r\n {data.type} */}\r\n \r\n\r\n \r\n
\r\n \r\n \r\n \r\n {' '}\r\n Code\r\n \r\n \r\n Description\r\n \r\n \r\n Qty\r\n \r\n \r\n Price\r\n \r\n \r\n Amount\r\n \r\n \r\n \r\n \r\n {data?.invoiceItems?.map((item, key) => (\r\n \r\n {item?.itemCode} \r\n \r\n {item?.itemDescription}\r\n \r\n \r\n {item?.quantity}\r\n \r\n \r\n {moneyInTxt(item?.price)}\r\n \r\n \r\n {moneyInTxt(item?.quantity * item.price)}\r\n \r\n \r\n ))}\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n Total{data.currency? `(${data.currency})` : \"\"} {' '}\r\n \r\n \r\n \r\n {moneyInTxt(\r\n data?.invoiceItems?.reduce(\r\n (total, item) => total + item?.quantity * item?.price,\r\n 0\r\n )\r\n )}\r\n \r\n \r\n
\r\n
\r\n Balance{data.currency? `(${data.currency})` : \"\"} {' '}\r\n \r\n {moneyInTxt(\r\n data?.balance)}\r\n \r\n \r\n {/*
\r\n Total{data.currency? `(${data.currency})` : \"\"} {' '}\r\n {moneyInTxt(\r\n data?.invoiceItems?.reduce(\r\n (total, item) => total + item?.quantity * item?.price,\r\n 0\r\n )\r\n )}\r\n \r\n
\r\n Balance{data.currency? `(${data.currency})` : \"\"} {' '}\r\n {moneyInTxt(\r\n data?.balance)} \r\n \r\n \r\n */}\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n {/*
{data.comments} */}\r\n {data?.remarks} \r\n \r\n {showDecline ? (\r\n
\r\n {/*
Decline Reason
*/}\r\n
\r\n setSelectedInvoice({\r\n ...selectedInvoice,\r\n declineReason: e.target.value,\r\n })\r\n }\r\n onKeyDown={handleDisableButton}\r\n />\r\n
\r\n ) : null}\r\n
\r\n \r\n \r\n )\r\n}\r\n\r\nconst styles = {\r\n header: {\r\n display: 'flex',\r\n height: '20%',\r\n marginBottom: 20,\r\n },\r\n leftHeader: {\r\n display: 'flex',\r\n width: '50%',\r\n flexDirection: 'column',\r\n alignItems: 'flex-start',\r\n //border: '1px solid blue',\r\n },\r\n\r\n rightHeader: {\r\n display: 'flex',\r\n width: '50%',\r\n flexDirection: 'column',\r\n alignItems: 'flex-end',\r\n //border: '1px solid green',\r\n },\r\n title: {\r\n // height: '14%',\r\n backgroundColor: '#eff4fd',\r\n borderRadius: 10,\r\n padding: \"5px 10px\",\r\n marginBottom: 15,\r\n marginTop:-15\r\n },\r\n body: {\r\n marginTop: 0,\r\n height: '280px',\r\n maxHeight: '280px',\r\n overflow: 'auto',\r\n },\r\n footer: {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n marginTop: 0,\r\n // height: '10%',\r\n // overflow: 'auto',\r\n },\r\n total: {\r\n display: 'flex',\r\n justifyContent: 'flex-end',\r\n width: '100%',\r\n marginLeft: '65%',\r\n borderTop: '1px solid #e3e3e3',\r\n paddingTop: 10,\r\n //paddingRight: 50,\r\n marginTop: 10,\r\n },\r\n comments: {\r\n height: 60,\r\n width: '47%',\r\n overflow: 'auto',\r\n flexDirection: 'row',\r\n backgroundColor: '#eff4fd',\r\n borderRadius: 10,\r\n padding: 10, \r\n color: '#cecece',\r\n marginTop: -50,\r\n },\r\n tablehead: {\r\n display: 'flex',\r\n justifyContent: 'flex-end',\r\n alignItems: 'flex-end',\r\n },\r\n bottomcomments: {\r\n display: 'flex',\r\n justifyContent: 'space-between',\r\n },\r\n decline: {\r\n height: 60,\r\n width: '47%',\r\n // overflow: 'auto',\r\n // flexDirection: 'row',\r\n backgroundColor: '#eff4fd',\r\n borderRadius: 10,\r\n padding: 10,\r\n color: 'darkred',\r\n marginTop: 40,\r\n },\r\n reason: {\r\n backgroundColor: 'inherit',\r\n },\r\n}\r\n","import moment from 'moment'\r\nimport React, { useEffect, useState } from 'react'\r\n\r\nimport { Modal, Button, Table, Row, Container, Col, Card, CardHeader } from 'reactstrap'\r\nimport { moneyInTxt } from 'views/Index'\r\nfunction InvoiceViewPrint({setShowPrint,showPrint, base64Item}) {\r\n const [totalPaid,setTotalPaid]=useState(0)\r\n//console.log(base64Item);\r\n return (\r\n \r\n \r\n
\r\n Invoices\r\n \r\n \r\n \r\n setShowPrint(false)}\r\n >\r\n × \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n
\r\n \r\n {/* \r\n Total Paid: GHS {moneyInTxt(totalPaid)} \r\n handleReset()}>\r\n Close\r\n */}\r\n {/* \r\n Close\r\n */}\r\n {/*
*/}\r\n \r\n )\r\n}\r\n\r\nexport default InvoiceViewPrint\r\nconst styles = {\r\n body: {\r\n marginTop: 0,\r\n height: '450px',\r\n maxHeight: '450px',\r\n overflow: 'auto',\r\n },\r\n}","import React, { useState, useRef } from 'react'\r\nimport { Modal, Button, Row, Col } from 'reactstrap'\r\nimport InvoiceDetailedView from 'views/ViewPayments/InvoiceDetailedView'\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\nimport { faThumbsUp, faThumbsDown } from '@fortawesome/free-solid-svg-icons'\r\nimport { useSelector, useDispatch } from 'react-redux'\r\nimport { loadInvoice } from '../../actions'\r\nimport axios from 'axios'\r\nimport Loader from './Loader'\r\n\r\nimport { ToastContainer, toast } from 'react-toastify'\r\nimport 'react-toastify/dist/ReactToastify.css'\r\nimport InvoiceViewPrint from './InvoiceViewPrint'\r\n\r\nfunction ViewOnlyDetails({ setShowViewDetails, data, base64Item }) {\r\n //const masterInvoiceList = useSelector((state) => state.masterInvoiceList)\r\n const [selectedInvoice, setSelectedInvoice] = useState(data)\r\n const [showDecline, setShowDecline] = useState(false)\r\n const [disabled, setDisabled] = useState(false)\r\n const declineRef = useRef(null)\r\n //const [count, setDeclineClickCount] = useState(0)\r\n const [loading, setShowLoader] = useState(false)\r\n const [isTypingReason, setIsTypingReason] = useState(false)\r\n const [showPrint, setShowPrint] = useState(false)\r\n const [base64View, setBase64View] = useState(\"\")\r\n\r\n const dispatch = useDispatch()\r\n\r\n const approve = async (selectedInvoice) => {\r\n //console.log('Selected invoice:', selectedInvoice)\r\n\r\n try {\r\n setShowLoader(true)\r\n let invoice_to_update = {\r\n remarks: selectedInvoice.remarks,\r\n periodId: selectedInvoice.periodId,\r\n type: selectedInvoice.type,\r\n customerName: selectedInvoice.customerName,\r\n customerCode: selectedInvoice.customerCode,\r\n businessUnit: selectedInvoice.businessUnit,\r\n branchCode: selectedInvoice.branchCode,\r\n totalAmount: selectedInvoice.totalAmount,\r\n currency: selectedInvoice.currency,\r\n userId: JSON.parse(sessionStorage.getItem('user')).pkId,\r\n status: 3,\r\n invoiceItems: selectedInvoice.invoiceItems,\r\n }\r\n await axios\r\n .put(\r\n `${process.env.REACT_APP_API_ROOT_PSL}Invoices/${selectedInvoice.id}`,\r\n invoice_to_update\r\n )\r\n .then((result) => {\r\n setShowLoader(false)\r\n toast.success(\r\n 'Invoice approved succesful'\r\n )\r\n\r\n setShowViewDetails(false)\r\n dispatch(loadInvoice())\r\n })\r\n .catch((error) => {\r\n setShowLoader(false)\r\n //setShowViewDetails(false)\r\n toast.error(\r\n 'Invoice failed try again later'\r\n )\r\n })\r\n } catch (error) {\r\n //console.error(error.message)\r\n toast.error('Your invoice could not be cancelled. Please try again')\r\n\r\n }\r\n }\r\n\r\n const declineInvoice = (selectedInvoice) => {\r\n // console.log('Selected invoice:', selectedInvoice)\r\n\r\n try {\r\n setShowLoader(true)\r\n let invoice_to_update = {\r\n remarks: selectedInvoice.remarks,\r\n periodId: selectedInvoice.periodId,\r\n type: selectedInvoice.type,\r\n customerName: selectedInvoice.customerName,\r\n customerCode: selectedInvoice.customerCode,\r\n businessUnit: selectedInvoice.businessUnit,\r\n branchCode: selectedInvoice.branchCode,\r\n totalAmount: selectedInvoice.totalAmount,\r\n currency: selectedInvoice.currency,\r\n userId: JSON.parse(sessionStorage.getItem('user')).pkId,\r\n status: 4,\r\n invoiceItems: selectedInvoice.invoiceItems,\r\n }\r\n axios\r\n .put(\r\n `${process.env.REACT_APP_API_ROOT_PSL}Invoices/${selectedInvoice.id}`,\r\n invoice_to_update\r\n )\r\n .then((result) => {\r\n setShowLoader(false)\r\n toast.success('Invoice status has been updated to declined')\r\n\r\n setShowViewDetails(false)\r\n dispatch(loadInvoice())\r\n })\r\n .catch((error) => {\r\n setShowLoader(false)\r\n //setShowViewDetails(false)\r\n toast.error('Some error occured updating status. Please try again.')\r\n })\r\n } catch (error) {\r\n console.error(error.message)\r\n\r\n }\r\n }\r\n\r\n const handleDecline = () => {\r\n setDeclineClickCount(count + 1)\r\n if (count == 0) {\r\n setShowDecline(!showDecline)\r\n setDisabled(!disabled)\r\n } else {\r\n declineInvoice(selectedInvoice)\r\n }\r\n }\r\n\r\n // const queryToObject = (query) => {\r\n // let values = query.split('&');\r\n // let objData = {}\r\n // for (let val of values) {\r\n // let data = val.replace(/=/i, '?').split('?')\r\n // if (!objData[data[0]]) {\r\n // objData[data[0]] = data[1];\r\n // }\r\n // }\r\n // return objData;\r\n // } \r\n // function generateBase64Report(invoiceNo) {\r\n\r\n // let szQuery1 = ` and m.szDocNum='${invoiceNo}'`;\r\n // let query = `lngPeriodId=${-1}&strQuery=${szQuery1}&lngServiceProviderId=${OMCID}&dStartDate=2021-11-19&dEndDate=2021-11-19&strType=${invoiceNo} &lngUserId=${UserID}`;\r\n\r\n // let reportName = \"CreateDraftInvoiceReport\"\r\n // const queryObj = queryToObject(query);\r\n\r\n // reportWindow.document.write(html);\r\n // $.ajax({\r\n // type: \"POST\",\r\n // url: `${process.env.REACT_APP_NPASERVICES_API_1}api/Report/PostCreateDraftInvoiceReport`,\r\n // data: JSON.stringify(queryObj),\r\n // dataType: \"json\",\r\n // contentType:\"application/json\",\r\n // success: function (responseData) {\r\n // var hideElement = reportWindow.document.getElementsByTagName('h1');\r\n // let resultElement = reportWindow.document.getElementById('result');\r\n // let span = reportWindow.document.createElement('span');\r\n // resultElement.appendChild(span);;\r\n // hideElement[0].setAttribute('style', 'display: none');\r\n // iframe.src = 'data:application/pdf;base64,' + encodeURI(responseData.Base64);\r\n // reportWindow.document.body.appendChild(iframe);\r\n // },\r\n // error: function (e) {\r\n // let htmlErr = ` \r\n // `\r\n // reportWindow.document.write(htmlErr);\r\n\r\n // }\r\n // })\r\n // } \r\n const userDetails = JSON.parse(sessionStorage.getItem('user'));\r\n\r\n\r\n const handleBase64 = async (data) => {\r\n // console.log('Selected invoice:', data)\r\n setShowLoader(true)\r\n\r\n try {\r\n let ibj = {\r\n lngPeriodId: \"-1\",\r\n strQuery: `and m.szDocNum='${data.invoiceNo}'`,\r\n lngServiceProviderId: data.pspTypeId,\r\n dStartDate: \"2021-11-19\",\r\n dEndDate: \"2021-11-19\",\r\n strType: \"\",\r\n lngUserId: userDetails.pkId\r\n }\r\n\r\n\r\n\r\n const request = await axios.post(`${process.env.REACT_APP_NPASERVICES_API_1}Report/PostCreateDraftInvoiceReport`, ibj)\r\n\r\n setBase64View(request?.data?.Base64)\r\n //setShowViewDetails(false)\r\n setShowLoader(false)\r\n if (request?.data) {\r\n setShowPrint(true)\r\n }\r\n // toast.error('Failed to convert PDF')\r\n\r\n\r\n } catch (error) {\r\n toast.error(error.message)\r\n // console.error(error.message)\r\n setShowLoader(false)\r\n }\r\n\r\n }\r\n\r\n return (\r\n <>\r\n {loading ? : null}\r\n \r\n console.log('toggled')}\r\n >\r\n \r\n
\r\n View Details\r\n \r\n \r\n handleBase64(selectedInvoice)}\r\n >\r\n \r\n Print Invoice\r\n\r\n \r\n\r\n setShowViewDetails(false)}\r\n >\r\n × \r\n \r\n \r\n \r\n {/*
*/}\r\n
\r\n\r\n
\r\n {/* \r\n \r\n \r\n \r\n Decline \r\n \r\n \r\n \r\n {!isTypingReason && (\r\n approve(selectedInvoice)}\r\n style={{ width: '100%' }}\r\n >\r\n \r\n \r\n Approve\r\n \r\n \r\n )}\r\n \r\n
*/}\r\n
\r\n
\r\n \r\n {showPrint ? : null}\r\n >\r\n )\r\n}\r\n\r\nexport default ViewOnlyDetails\r\n","import React, { useState, useRef } from 'react'\r\nimport { Modal, Button, Row, Col } from 'reactstrap'\r\nimport DetailedView from 'components/DetailedView'\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\nimport { faThumbsUp, faThumbsDown } from '@fortawesome/free-solid-svg-icons'\r\nimport { useSelector, useDispatch } from 'react-redux'\r\nimport { loadInvoice } from '../../actions'\r\nimport axios from 'axios'\r\nimport Loader from './Loader'\r\nimport SweetAlert from 'react-bootstrap-sweetalert'\r\n\r\nimport { ToastContainer, toast } from 'react-toastify'\r\nimport 'react-toastify/dist/ReactToastify.css'\r\nimport IdleTimer from 'components/IdleTimer'\r\n\r\nfunction CancelInvoice({ setShowViewDetails, data,setFailedGHGHOVInvoices }) {\r\n const masterInvoiceList = useSelector((state) => state.masterInvoiceList)\r\n const [selectedInvoice, setSelectedInvoice] = useState(data)\r\n const [showDecline, setShowDecline] = useState(false)\r\n const [disabled, setDisabled] = useState(false)\r\n const declineRef = useRef(null)\r\n const [count, setDeclineClickCount] = useState(0)\r\n const [loading, setShowLoader] = useState(false)\r\n const [isTypingReason, setIsTypingReason] = useState(false)\r\n const [prevData, setPrevData]=useState([])\r\n const [isActive, setIsActive] = useState(false);\r\n const dispatch = useDispatch()\r\n\r\n const approve = async (selectedInvoice) => {\r\n console.log('Selected invoice:', selectedInvoice)\r\n\r\n try {\r\n setShowLoader(true)\r\n let invoice_to_update = {\r\n remarks: selectedInvoice.remarks,\r\n periodId: selectedInvoice.periodId,\r\n type: selectedInvoice.type,\r\n customerName: selectedInvoice.customerName,\r\n customerCode: selectedInvoice.customerCode,\r\n businessUnit: selectedInvoice.businessUnit,\r\n branchCode: selectedInvoice.branchCode,\r\n totalAmount: selectedInvoice.totalAmount,\r\n currency: selectedInvoice.currency,\r\n userId: JSON.parse(sessionStorage.getItem('user')).pkId,\r\n status: 3,\r\n invoiceItems: selectedInvoice.invoiceItems,\r\n }\r\n await axios\r\n .put(\r\n `${process.env.REACT_APP_API_ROOT_PSL}Invoices/${selectedInvoice.id}`,\r\n invoice_to_update\r\n )\r\n .then((result) => {\r\n setShowLoader(false)\r\n toast.success(\r\n 'Invoice approved successful'\r\n )\r\n\r\n setShowViewDetails(false)\r\n dispatch(loadInvoice())\r\n })\r\n .catch((error) => {\r\n setShowLoader(false)\r\n //setShowViewDetails(false)\r\n toast.error(\r\n ' Invoice Failed'\r\n \r\n )\r\n })\r\n } catch (error) {\r\n console.error(error.message)\r\n }\r\n }\r\n const userDetails = JSON.parse(sessionStorage.getItem('user')); \r\n\r\n\r\n\r\n // const handleGetFailedInvoices = async () => {\r\n \r\n\r\n // await fetch(\r\n // `${process.env.REACT_APP_API_ROOT_PSL}Invoices/GetInvoicesByUserAndStatus/${users?.pkId}?status=2`\r\n\r\n // )\r\n // .then((res) => res.json())\r\n // .then((data) =>{ setMasterInvoiceList(data)}).catch((error) => {\r\n \r\n // toast.warning(\"System failed, try again later\")\r\n // } \r\n \r\n // )\r\n // setshowLoader(false);\r\n // }\r\n\r\n const declineInvoice =async(selectedInvoice) => {\r\n // console.log('Selected invoice:', selectedInvoice)\r\n setShowLoader(true)\r\n\r\n let cancelInvoice={\r\n invoiceId: Number(selectedInvoice?.id),\r\n userId: userDetails?.pkId,\r\n remarks: selectedInvoice?.declineReason\r\n }\r\n \r\n try {\r\n \r\n axios.defaults.headers.post['Content-Type'] =\r\n 'application/x-www-form-urlencoded'\r\n\r\n const request = await axios.post(`${process.env.REACT_APP_API_ROOT_PSL}Invoices/CancelInvoice`, cancelInvoice,{ headers: {\r\n 'Authorization': `Bearer ${JSON.parse(sessionStorage.getItem(\"Token\"))}`\r\n }})\r\n console.log(request); \r\n if(request.data[0].status > 0 ){\r\n toast.success('Data submitted successfully ')\r\n setFailedGHGHOVInvoices((current) =>\r\n current.filter((item) => item.id !==selectedInvoice.id ) )\r\n setShowLoader(false)\r\n setShowViewDetails(false)\r\n }\r\n \r\n \r\n } catch (error) {\r\n\r\n if(error.message.includes('Request failed with status code 401')){\r\n //console.log(\"error\");\r\n let refreshData = {\r\n token: JSON.parse(sessionStorage.getItem(\"Token\")),\r\n refreshToken: JSON.parse(sessionStorage.getItem(\"refreshToken\"))\r\n }\r\n await axios.post(\r\n `${process.env.REACT_APP_API_ROOT_PSL}UserInfo/RefreshToken`,refreshData\r\n ).then((res)=>{\r\n if(res.data.accessToken != null){\r\n sessionStorage.setItem('Token', JSON.stringify(res.data.accessToken))\r\n sessionStorage.setItem('refreshToken', JSON.stringify(res.data.refreshToken))\r\n declineInvoice(selectedInvoice)\r\n }\r\n else{\r\n \r\n toast.info('Approved invoice yet to be synced to Business One, try again in some few minutes')\r\n setShowLoader(false)\r\n }\r\n })\r\n \r\n }\r\n\r\n\r\n\r\n\r\n\r\n \r\n }\r\n \r\n \r\n}\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n// request.data[0].status > 0\r\n \r\n\r\n const handleDecline = () => {\r\n \r\n declineInvoice(selectedInvoice)\r\n \r\n }\r\n\r\n const handleCancelInvoice=(id)=>{\r\n // console.log(selectedInvoice.declineReason);\r\n if(selectedInvoice.declineReason==undefined || selectedInvoice.declineReason==\"\"){\r\n toast.info(\"Enter reason\")\r\n return\r\n }\r\n handleDecline()\r\n//console.log(id);\r\n //setIsActive(true)\r\n\r\n\r\n }\r\n\r\n const onCancel = () => {\r\n setIsActive(false);\r\n };\r\n //console.log('data in view details: ', data)\r\n return (\r\n <>\r\n {loading ? : null}\r\n \r\n \r\n {/* Are you sure you want to cancel this invoice?
*/}\r\n \r\n\r\n \r\n console.log('toggled')}\r\n >\r\n \r\n
\r\n View Details\r\n \r\n setShowViewDetails(false)}\r\n >\r\n × \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n setShowViewDetails(false)}\r\n ref={declineRef}\r\n size='sm'\r\n >\r\n \r\n Close \r\n \r\n \r\n {/* */}\r\n \r\n \r\n handleCancelInvoice(selectedInvoice)}\r\n style={{ width: '100%' }}\r\n size='sm'\r\n >\r\n \r\n \r\n Cancel Invoice\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n >\r\n )\r\n}\r\n\r\nexport default CancelInvoice\r\n","import { useState, useEffect, createContext, useLayoutEffect } from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { loadInvoice } from \"actions\";\r\n\r\nimport {\r\n Button,\r\n Card,\r\n CardHeader,\r\n Table,\r\n Container,\r\n Row,\r\n Col,\r\n Modal,\r\n Badge,\r\n FormGroup,\r\n} from \"reactstrap\";\r\n\r\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\r\nimport { faEye } from \"@fortawesome/free-solid-svg-icons\";\r\n\r\nimport Header from \"components/Headers/Header.js\";\r\nimport IdleTimer from \"components/IdleTimer\";\r\nimport ViewOnlyDetails from \"components/Modals/ViewOnlyDetails\";\r\nimport CancelInvoice from \"components/Modals/CancelInvoice\";\r\nimport moment from \"moment\";\r\nimport Loader from \"../components/Modals/Loader\";\r\nimport { ToastContainer, toast } from \"react-toastify\";\r\nimport InvoiceAutocomplete from \"../components/InvoiceAutocomplete\";\r\nimport axios from \"axios\";\r\nimport RefreshToken from \"components/RefreshToken\";\r\nimport ListPagination from \"components/ListPagination\";\r\n\r\nconst moneyInTxt = (value, standard, dec = 2) => {\r\n var nf = new Intl.NumberFormat(standard, {\r\n minimumFractionDigits: dec,\r\n maximumFractionDigits: 2,\r\n });\r\n return nf.format(Number(value) ? value : 0.0);\r\n};\r\n\r\nexport const AppContext = createContext(null);\r\n\r\nconst init = {\r\n name: \"\",\r\n serviceProviderId: \"\",\r\n duration: \"\",\r\n startDate: \"\",\r\n currency: \"\",\r\n supportedBranch: \"\",\r\n};\r\n\r\nconst InvoiceCancel = (props) => {\r\n const [showViewDetails, setShowViewDetails] = useState(false);\r\n const [prevData, setPrevData] = useState([]);\r\n const [failedGHGOVInvoices, setFailedGHGHOVInvoices] = useState([]);\r\n const [invoiceList, setInvoiceList] = useState(failedGHGOVInvoices);\r\n const [showLoader, setshowLoader] = useState(false);\r\n const [data, setData] = useState(failedGHGOVInvoices);\r\n const [formData, setFormData] = useState(init);\r\n const [error, setError] = useState(\"\");\r\n // for pagination\r\n const [paginationDetails, setPaginationDetails] = useState({page: 1, filter:\"*\", pageSize: 10, status: 4, totalCount:0})\r\n\r\n const dispatch = useDispatch();\r\n\r\n\r\n const userDetails = JSON.parse(sessionStorage.getItem(\"user\"));\r\n\r\n const handleGetInvoices = async () => {\r\n try {\r\n setshowLoader(true);\r\n let results = await axios.get(\r\n `${process.env.REACT_APP_API_ROOT_PSL}Invoices/GetInvoicesByUserAndStatus/${userDetails?.pkId}?status=${paginationDetails.status}&PageNumber=${paginationDetails.page}&PageSize=${paginationDetails.pageSize}&Filter=${paginationDetails?.filter}`,\r\n {\r\n headers: {\r\n Authorization: `Bearer ${JSON.parse(\r\n sessionStorage.getItem(\"Token\")\r\n )}`,\r\n },\r\n }\r\n );\r\n setFailedGHGHOVInvoices(results.data?.data)\r\n if(results?.data?.data?.length === 0) toast.info(\"No data found\")\r\n setPrevData(results.data?.data);\r\n setPaginationDetails(p=> { return {...p, page: results.data?.pageNo, pageSize: results.data?.pageSize, totalCount: results.data?.totalCount}})\r\n setshowLoader(false);\r\n } catch (error) {\r\n console.log(error)\r\n RefreshToken(error, handleGetInvoices);\r\n }\r\n\r\n setshowLoader(false);\r\n };\r\n useLayoutEffect(() => {\r\n handleGetInvoices();\r\n return () => {};\r\n }, [paginationDetails?.page, paginationDetails?.pageSize]);\r\n\r\n const previewSelectedInvoice = (id) => {\r\n //console.log(id)\r\n const selectedItem = failedGHGOVInvoices.find((item) => item.id === id);\r\n // console.log('Selected Item', selectedItem)\r\n setData(selectedItem);\r\n setShowViewDetails(true);\r\n };\r\n\r\n \r\n // useEffect(() => {\r\n // const controller = new AbortController();\r\n // const signal = controller.signal;\r\n // dispatch(loadInvoice());\r\n // // console.log('Pending invoices: ', invoiceList)\r\n // return () => {\r\n // //cleanup;\r\n // if (signal.aborted === false) {\r\n // controller.abort();\r\n // }\r\n // };\r\n // }, []);\r\n const handleRow = (data) => {\r\n //console.log(data);\r\n setData(data);\r\n setShowViewDetails(true);\r\n };\r\n\r\n useEffect(()=>{\r\n if(error){\r\n setTimeout(()=>{\r\n setError(\"\")\r\n },3000)\r\n }\r\n }, [error])\r\n \r\n \r\n return (\r\n <>\r\n \r\n {showLoader ?
: null}\r\n
\r\n
\r\n {/*
*/}\r\n
\r\n {/* Page content */}\r\n
\r\n \r\n {\" \"}\r\n {/* className='mt-5' */}\r\n \r\n \r\n \r\n \r\n \r\n
Invoices \r\n \r\n {/* List of pending invoices */}\r\n \r\n \r\n
\r\n \r\n {error && error}
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n Invoice # \r\n \r\n Date\r\n \r\n \r\n Customer\r\n \r\n \r\n Currency\r\n \r\n \r\n Balance\r\n \r\n\r\n \r\n Total Amount\r\n \r\n \r\n Status\r\n \r\n \r\n \r\n \r\n {failedGHGOVInvoices?.map((invoice, key) => (\r\n handleRow(invoice)}\r\n >\r\n {invoice.invoiceNo} \r\n \r\n {moment(invoice?.docDate, \"YYYY-MM-DD\").format(\r\n \"DD/MMM/YYYY\"\r\n )}\r\n \r\n {invoice.customerName} \r\n {invoice.currency} \r\n \r\n {moneyInTxt(invoice.balance)}\r\n \r\n\r\n \r\n {moneyInTxt(invoice.totalAmount)}\r\n \r\n\r\n \r\n \r\n {invoice?.status}\r\n \r\n \r\n\r\n \r\n ))}\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n\r\n {showViewDetails ? (\r\n \r\n \r\n \r\n ) : null}\r\n \r\n
\r\n >\r\n );\r\n};\r\nexport default InvoiceCancel;\r\n\r\nconst styles = {\r\n body: {\r\n marginTop: 0,\r\n height: '470px',\r\n maxHeight: '470px',\r\n },\r\n}\r\n","import { useState, useEffect, createContext, useLayoutEffect } from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { loadInvoice } from \"actions\";\r\nimport axios from \"axios\";\r\n\r\nimport {\r\n Button,\r\n Card,\r\n CardHeader,\r\n Table,\r\n Container,\r\n Row,\r\n Col,\r\n Modal,\r\n Badge,\r\n FormGroup,\r\n} from \"reactstrap\";\r\n\r\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\r\nimport { faEye } from \"@fortawesome/free-solid-svg-icons\";\r\nimport IdleTimer from \"components/IdleTimer\";\r\nimport ViewOnlyDetails from \"components/Modals/ViewOnlyDetails\";\r\nimport moment from \"moment\";\r\nimport Loader from \"../components/Modals/Loader\";\r\nimport FailureModal from \"components/Modals/FailureModal\";\r\nimport { ToastContainer, toast } from \"react-toastify\";\r\nimport { faFileInvoice } from \"@fortawesome/free-solid-svg-icons\";\r\nimport InvoiceAutocomplete from \"../components/InvoiceAutocomplete\";\r\nimport RefreshToken from \"components/RefreshToken\";\r\nimport ListPagination from \"components/ListPagination\";\r\n\r\nconst moneyInTxt = (value, standard, dec = 2) => {\r\n var nf = new Intl.NumberFormat(standard, {\r\n minimumFractionDigits: dec,\r\n maximumFractionDigits: 2,\r\n });\r\n return nf.format(Number(value) ? value : 0.0);\r\n};\r\n\r\nexport const AppContext = createContext(null);\r\nconst init = {\r\n name: \"\",\r\n serviceProviderId: \"\",\r\n duration: \"\",\r\n startDate: \"\",\r\n currency: \"\",\r\n supportedBranch: \"\",\r\n};\r\n\r\nconst ViewOnly = (props) => {\r\n // const masterInvoiceList = useSelector((state) => state.masterInvoiceList)\r\n\r\n const [showViewDetails, setShowViewDetails] = useState(false);\r\n const [GHGOVInvoices, setGHGHOVInvoices] = useState([]);\r\n const [prevData, setPrevData] = useState([]);\r\n const [invoiceList, setInvoiceList] = useState(GHGOVInvoices);\r\n const [data, setData] = useState(GHGOVInvoices);\r\n const [showLoader, setshowLoader] = useState(false);\r\n const [declineReason, setDeclineReason] = useState([]);\r\n const [showDeclineReason, setShowDeclineReason] = useState(false);\r\n const [base64Item, setBase64Item] = useState(\"\");\r\n const users = JSON.parse(sessionStorage.getItem(\"user\"));\r\n const [formData, setFormData] = useState(init);\r\n const [error, setError] = useState(\"\");\r\n // for pagination\r\n const [paginationDetails, setPaginationDetails] = useState({page: 1, filter:\"*\", pageSize: 10, status: 3, totalCount:0})\r\n\r\n const handleGetInvoices = async () => {\r\n try {\r\n setshowLoader(true);\r\n let results = await axios.get(\r\n `${process.env.REACT_APP_API_ROOT_PSL}Invoices/GetInvoicesByUserAndStatus/${users?.pkId}?status=${paginationDetails.status}&PageNumber=${paginationDetails.page}&PageSize=${paginationDetails.pageSize}&Filter=${paginationDetails?.filter}`,\r\n {\r\n headers: {\r\n Authorization: `Bearer ${JSON.parse(\r\n sessionStorage.getItem(\"Token\")\r\n )}`,\r\n },\r\n }\r\n );\r\n setGHGHOVInvoices(results?.data?.data)\r\n if(results?.data?.data?.length === 0) toast.info(\"No data found\")\r\n setPaginationDetails((p)=>{\r\n return {...p, page: results?.data?.pageNo, pageSize: results?.data?.pageSize, totalCount: results?.data?.totalCount}\r\n })\r\n setPrevData(results?.data?.data);\r\n\r\n if(results?.data?.data?.length === 0){\r\n toast.info(\"No results found\")\r\n }\r\n } catch (error) {\r\n RefreshToken(error, handleGetInvoices);\r\n }\r\n setshowLoader(false);\r\n };\r\n\r\n useEffect(() => {\r\n handleGetInvoices();\r\n return () => {};\r\n }, [paginationDetails?.pageSize, paginationDetails.page]);\r\n\r\n const userDetails = JSON.parse(sessionStorage.getItem(\"user\"));\r\n\r\n const handleRow = (data) => {\r\n //handleBase64(data)\r\n setData(data);\r\n setShowViewDetails(true);\r\n };\r\n const handleViewFailedReason = async (id) => {\r\n try {\r\n let results = await axios.get(\r\n `${process.env.REACT_APP_API_ROOT_PSL}Payment/GetPaymentByInvoiceNo?invoiceNo=${id}`,\r\n {\r\n headers: {\r\n Authorization: `Bearer ${JSON.parse(\r\n sessionStorage.getItem(\"Token\")\r\n )}`,\r\n },\r\n }\r\n );\r\n handleDeclinedData(results.data);\r\n } catch (error) {\r\n RefreshToken(error, handleViewFailedReason);\r\n }\r\n };\r\n const handleDeclinedData = (data) => {\r\n setDeclineReason((prev) => data);\r\n setShowDeclineReason(true);\r\n };\r\n\r\n //handling keyboard pressed\r\n useLayoutEffect(() => {\r\n if(paginationDetails?.filter?.length === 0){\r\n handleGetInvoices()\r\n }\r\n \r\n const enterKeyPressed =(event) => {\r\n if(event.key?.toString()?.toLowerCase() === \"enter\"){\r\n return handleGetInvoices()\r\n }\r\n }\r\n\r\n document?.addEventListener(\"keydown\", enterKeyPressed)\r\n return () => {\r\n document?.removeEventListener(\"keydown\", enterKeyPressed)\r\n }\r\n }, [paginationDetails.filter, paginationDetails.page, paginationDetails.pageSize])\r\n \r\n\r\n useEffect(()=>{\r\n if(error){\r\n setTimeout(()=>{\r\n setError(\"\")\r\n },3000)\r\n }\r\n }, [error])\r\n\r\n \r\n // console.log(paginationDetails)\r\n return (\r\n <>\r\n \r\n {showLoader ?
: null}\r\n\r\n
\r\n
\r\n {/*
*/}\r\n
\r\n {/* Page content */}\r\n
\r\n \r\n {\" \"}\r\n {/* className='mt-5' */}\r\n \r\n \r\n \r\n \r\n \r\n
Invoices \r\n \r\n {/* List of pending invoices */}\r\n \r\n \r\n
\r\n \r\n {error && error}
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n Invoice # \r\n \r\n Date\r\n \r\n \r\n Customer\r\n \r\n \r\n Currency\r\n \r\n Balance \r\n \r\n Total Amount\r\n \r\n\r\n \r\n Status\r\n \r\n Actions \r\n \r\n \r\n \r\n {GHGOVInvoices?.map((invoice, key) => (\r\n \r\n {invoice?.invoiceNo} \r\n \r\n {moment(invoice?.docDate, \"YYYY-MM-DD\").format(\r\n \"DD/MMM/YYYY\"\r\n )}\r\n \r\n {invoice?.customerName} \r\n {invoice?.currency} \r\n \r\n {moneyInTxt(invoice.balance)}\r\n \r\n\r\n \r\n {moneyInTxt(invoice?.totalAmount)}\r\n \r\n {invoice?.status == \"Approved\" ? (\r\n \r\n \r\n {invoice?.status}\r\n \r\n \r\n ) : null}\r\n\r\n {invoice?.status == \"Sent to SAP\" ? (\r\n \r\n \r\n {invoice?.status}\r\n \r\n \r\n ) : null}\r\n\r\n {invoice?.status == \"Declined\" ? (\r\n \r\n \r\n {invoice?.status}\r\n \r\n \r\n ) : null}\r\n {invoice?.status == \"Sent To SAP\" ? (\r\n \r\n \r\n {invoice?.status}\r\n \r\n \r\n ) : null}\r\n {invoice?.status == \"Invoice Cancelled\" ? (\r\n \r\n \r\n {invoice?.status}\r\n \r\n \r\n ) : null}\r\n {invoice?.status == \"\" || null ? (\r\n \r\n \r\n Not set\r\n \r\n \r\n ) : null}\r\n \r\n \r\n onClick={() => handleRow(invoice)}\r\n // previewSelectedInvoice(invoice.id)\r\n >\r\n \r\n \r\n \r\n \r\n\r\n \r\n handleViewFailedReason(invoice.invoiceNo)\r\n }\r\n >\r\n \r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n\r\n {showViewDetails ? (\r\n \r\n \r\n \r\n ) : null}\r\n {showDeclineReason && (\r\n \r\n )}\r\n \r\n
\r\n >\r\n );\r\n};\r\n\r\nexport default ViewOnly;\r\n\r\nconst styles = {\r\n body: {\r\n marginTop: 0,\r\n height: '480px',\r\n maxHeight: '480px',\r\n }\r\n}\r\n","import { useState, useEffect, createContext, useLayoutEffect } from 'react'\r\nimport { useSelector, useDispatch } from 'react-redux'\r\nimport { loadInvoice } from 'actions'\r\n\r\nimport {\r\n Button,\r\n Card,\r\n CardHeader,\r\n Table,\r\n Container,\r\n Row,\r\n Col,\r\n Modal,\r\n Badge,\r\n FormGroup,\r\n} from 'reactstrap'\r\n\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\nimport { faEye } from '@fortawesome/free-solid-svg-icons'\r\n\r\nimport Header from 'components/Headers/Header.js'\r\nimport ViewDetails from 'components/Modals/ViewDetails'\r\nimport IdleTimer from 'components/IdleTimer'\r\nimport Loader from 'components/Modals/Loader'\r\nimport { ToastContainer, toast } from 'react-toastify'\r\nimport moment from 'moment'\r\nimport InvoiceAutocomplete from 'components/InvoiceAutocomplete'\r\nimport axios from 'axios'\r\nimport RefreshToken from 'components/RefreshToken'\r\nimport ListPagination from '../components/ListPagination'\r\n\r\nconst moneyInTxt = (value, standard, dec = 2) => {\r\n var nf = new Intl.NumberFormat(standard, {\r\n minimumFractionDigits: dec,\r\n maximumFractionDigits: 2,\r\n })\r\n return nf.format(Number(value) ? value : 0.0)\r\n}\r\n\r\nexport const AppContext = createContext(null)\r\n\r\nconst init={\r\n name: \"\",\r\n serviceProviderId: \"\",\r\n duration: \"\",\r\n startDate: \"\",\r\n currency:\"\",\r\n supportedBranch:\"\"\r\n} \r\n\r\nconst ApprovalCancellation = (props) => {\r\n //const masterInvoiceList = useSelector((state) => state.masterInvoiceList)\r\nconst[masterInvoiceList,setMasterInvoiceList]=useState([])\r\n const [showViewDetails, setShowViewDetails] = useState(false)\r\n const [invoiceList, setInvoiceList] = useState(masterInvoiceList)\r\n const [data, setData] = useState({})\r\n const [showLoader, setshowLoader] = useState(false)\r\n const[formType,setFormType]=useState(\"Approval Cancellation\")\r\n const [prevData, setPrevData]=useState([])\r\n const dispatch = useDispatch()\r\n const [formData, setFormData] = useState(init)\r\n const [error, setError] = useState(\"\");\r\n\r\n // for pagination\r\n const [paginationDetails, setPaginationDetails] = useState({page: 1, filter:\"*\", pageSize: 10, status: 5, totalCount:0})\r\n const previewSelectedInvoice = (id) => {\r\n //console.log(id)\r\n const selectedItem = masterInvoiceList.find((item) => item.id == id)\r\n // console.log('Selected Item', selectedItem)\r\n setData(selectedItem)\r\n setShowViewDetails(true)\r\n }\r\n \r\n const users = JSON.parse(sessionStorage.getItem('user')); \r\n\r\n const handleGetInvoices = async () => {\r\n try {\r\n setshowLoader(true);\r\n\r\n let cancel = await axios.get(\r\n `${process.env.REACT_APP_API_ROOT_PSL}Invoices/GetInvoicesByUserAndStatus/${users?.pkId}?status=${paginationDetails.status}&PageNumber=${paginationDetails.page}&PageSize=${paginationDetails.pageSize}&Filter=${paginationDetails?.filter}`,\r\n {\r\n headers: {\r\n Authorization: `Bearer ${JSON.parse(\r\n sessionStorage.getItem(\"Token\")\r\n )}`,\r\n },\r\n }\r\n )\r\n setMasterInvoiceList(cancel.data?.data)\r\n if(cancel?.data?.data?.length === 0) toast.info(\"No data found\")\r\n setPrevData(cancel.data?.data)\r\n setPaginationDetails(p=> { return {...p, page: cancel.data?.pageNo, pageSize: cancel.data?.pageSize, totalCount: cancel.data?.totalCount}})\r\n setshowLoader(false)\r\n } catch (error) {\r\n RefreshToken(error,handleGetInvoices)\r\n }\r\n setshowLoader(false);\r\n }\r\n\r\n\r\n\r\n useLayoutEffect(() => {\r\n handleGetInvoices()\r\n return () => {}\r\n }, [paginationDetails?.page, paginationDetails?.pageSize])\r\n\r\n\r\n const handleRow=(data)=>{\r\n //console.log(data);\r\n setData(data);\r\n setShowViewDetails(true);\r\n }\r\n // /api/v1/Invoices/GetUnApprovedInvoices/20009\r\n //console.log(masterInvoiceList);\r\n\r\n useEffect(()=>{\r\n if(error){\r\n setTimeout(()=>{\r\n setError(\"\")\r\n },3000)\r\n }\r\n}, [error])\r\n\r\n\r\n return (\r\n <>\r\n \r\n {showLoader ?
: null}\r\n
\r\n\r\n
\r\n {/*
*/}\r\n
\r\n {/* Page content */}\r\n
\r\n {/* className='mt-5' */}\r\n \r\n \r\n \r\n \r\n \r\n
Approve Invoices \r\n \r\n List of invoice cancellation \r\n \r\n \r\n
\r\n \r\n {error && error}
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n Invoice # \r\n \r\n \r\n Customer\r\n \r\n \r\n Date\r\n \r\n \r\n Currency \r\n \r\n Balance \r\n\r\n \r\n Total Amount\r\n \r\n\r\n \r\n Status\r\n \r\n {/* Actions */}\r\n \r\n \r\n \r\n { masterInvoiceList?.map((invoice, key) => (\r\n handleRow(invoice)}>\r\n \r\n {invoice.invoiceNo} \r\n \r\n \r\n {invoice.customerName}\r\n \r\n \r\n {moment(invoice?.docDate,\"YYYY-MM-DD\").format(\"DD/MMM/YYYY\")} \r\n \r\n \r\n {invoice?.currency}\r\n \r\n \r\n {moneyInTxt(invoice.balance)}\r\n \r\n \r\n \r\n {moneyInTxt(invoice.totalAmount)}\r\n \r\n \r\n \r\n \r\n {invoice?.status}\r\n \r\n \r\n {/* \r\n \r\n previewSelectedInvoice(invoice.id)\r\n }\r\n size='sm'\r\n >\r\n \r\n \r\n \r\n \r\n View\r\n \r\n \r\n */}\r\n \r\n ))}\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n\r\n {showViewDetails ? (\r\n \r\n \r\n \r\n ) : null}\r\n \r\n
\r\n >\r\n )\r\n}\r\n\r\nexport default ApprovalCancellation\r\n\r\nconst styles = {\r\n body: {\r\n marginTop: 0,\r\n height: '480px',\r\n maxHeight: '480px',\r\n overflow: 'auto',\r\n },\r\n}\r\n","export const CovertMonthNumbersToAlphabets = (date) => {\r\n if (!date || date.split(\"-\").length !== 3) {\r\n return date;\r\n } else {\r\n const months = [\r\n \"January\",\r\n \"February\",\r\n \"March\",\r\n \"April\",\r\n \"May\",\r\n \"June\",\r\n \"July\",\r\n \"August\",\r\n \"September\",\r\n \"October\",\r\n \"November\",\r\n \"December\",\r\n ];\r\n return `${date?.split(\"-\")[0]}-${months[Number(date.split(\"-\")[1]) - 1]}-${\r\n date?.split(\"-\")[2]\r\n }`;\r\n }\r\n};\r\n\r\nexport const convertMonthAlphabetsToNumbers = (date) => {\r\n if (!date || date.split(\"-\").length !== 3) {\r\n return date;\r\n } else {\r\n let dateMonth =\r\n date.split(\"-\")[1].toUpperCase() + date.split(\"-\")[1].slice(1);\r\n\r\n const months = [\r\n \"January\",\r\n \"February\",\r\n \"March\",\r\n \"April\",\r\n \"May\",\r\n \"June\",\r\n \"July\",\r\n \"August\",\r\n \"September\",\r\n \"October\",\r\n \"November\",\r\n \"December\",\r\n ];\r\n\r\n return `${date.split(\"-\")[0]}-${\r\n months.indexOf(dateMonth)?.toString().length < 2 ? \"0\" : \"\"\r\n }${months.indexOf(dateMonth + 1)}-${date.split(\"-\")[2]}`;\r\n }\r\n};\r\n","import { Button, Row, Input } from \"reactstrap\";\r\nimport { GiNextButton, GiPreviousButton } from \"react-icons/gi\";\r\nimport { useEffect, useRef, useState } from \"react\";\r\n\r\nconst ListPagination = ({\r\n ArrayOfItems,\r\n QuantityPerPage,\r\n setQuantityPerPage,\r\n startingPoint,\r\n setStartingPoint,\r\n endPointMultiplicator,\r\n setendPointMultiplicator,\r\n currentContent,\r\n setCurrentContent,\r\n children,\r\n}) => {\r\n const Styles = {\r\n button: {\r\n display: \"flex\",\r\n border: \"0px\",\r\n textAlign: \"\",\r\n margin: \"0px\",\r\n padding: \"2px\",\r\n height: \"100%\",\r\n backgroundColor: \"transparent\",\r\n display: \"flex\",\r\n justifyContent: \"center\",\r\n alignItems: \"center\",\r\n height: \"25px\",\r\n width: \"25px\",\r\n border: \"1px solid rgb(0,0,0,0.3)\",\r\n },\r\n bottonOnFocus: {\r\n backgroundColor: \"#9999ff\",\r\n color: \"white\",\r\n height: \"25px\",\r\n width: \"20px\",\r\n display: \"flex\",\r\n justifyContent: \"center\",\r\n alignItems: \"center\",\r\n },\r\n row: {\r\n width: \"100%\",\r\n fontSize: \"small\",\r\n padding: \"10px 0px\",\r\n backgroundColor: \"#E8E8E8\",\r\n position: \"relative\",\r\n },\r\n input: {\r\n width: \"128px\",\r\n },\r\n };\r\n\r\n const [currentNumberOfItems, setCurrentNumberOfItems] =\r\n useState(QuantityPerPage);\r\n\r\n const [feedback, setFeedback] = useState(\"\");\r\n const inputRef = useRef();\r\n\r\n let NumberOfPages = Math.floor(ArrayOfItems.length / Number(QuantityPerPage));\r\n let buttonsLabelsArray = [];\r\n\r\n for (var i = 0; i <= NumberOfPages; i++) {\r\n buttonsLabelsArray.push(i);\r\n }\r\n\r\n const [pagesNavigation, setPagesNavigations] = useState({\r\n all: buttonsLabelsArray.slice(\r\n startingPoint - 1,\r\n endPointMultiplicator * QuantityPerPage\r\n ),\r\n displayed: buttonsLabelsArray\r\n .slice(startingPoint - 1, endPointMultiplicator * QuantityPerPage)\r\n ?.slice(0, 10),\r\n hidden: buttonsLabelsArray\r\n .slice(startingPoint - 1, endPointMultiplicator * QuantityPerPage)\r\n .slice(10),\r\n previousDisplayed: [],\r\n });\r\n\r\n const moveToNext = () => {\r\n if (buttonsLabelsArray.length - Number(startingPoint) > QuantityPerPage) {\r\n setStartingPoint(QuantityPerPage * endPointMultiplicator + 1);\r\n setendPointMultiplicator(endPointMultiplicator + 1);\r\n\r\n setCurrentContent(\r\n ArrayOfItems.slice(\r\n QuantityPerPage * endPointMultiplicator * QuantityPerPage,\r\n QuantityPerPage * endPointMultiplicator * QuantityPerPage +\r\n QuantityPerPage\r\n )\r\n );\r\n\r\n setCurrentNumberOfItems(\r\n (QuantityPerPage * endPointMultiplicator + 1) * QuantityPerPage\r\n );\r\n }\r\n };\r\n\r\n const moveToPrevious = () => {\r\n if (Number(startingPoint) !== QuantityPerPage && startingPoint > 1) {\r\n setStartingPoint(startingPoint - QuantityPerPage);\r\n setendPointMultiplicator(endPointMultiplicator - 1);\r\n\r\n setCurrentContent(\r\n ArrayOfItems?.slice(\r\n ((startingPoint * QuantityPerPage - QuantityPerPage) /\r\n QuantityPerPage -\r\n QuantityPerPage +\r\n 1 -\r\n 1) *\r\n QuantityPerPage,\r\n ((startingPoint * QuantityPerPage - QuantityPerPage) /\r\n QuantityPerPage -\r\n QuantityPerPage +\r\n 1 -\r\n 1) *\r\n QuantityPerPage +\r\n QuantityPerPage\r\n )\r\n );\r\n\r\n setCurrentNumberOfItems(\r\n (startingPoint - QuantityPerPage) * QuantityPerPage\r\n );\r\n } else if (Number(startingPoint) === QuantityPerPage) {\r\n setStartingPoint(1);\r\n setendPointMultiplicator(1);\r\n }\r\n };\r\n\r\n const moveToLast = () => {\r\n setStartingPoint(\r\n Math.floor(NumberOfPages / QuantityPerPage) * QuantityPerPage + 1\r\n );\r\n\r\n setendPointMultiplicator(Math.ceil(NumberOfPages / QuantityPerPage));\r\n\r\n setCurrentContent(ArrayOfItems.slice(NumberOfPages * QuantityPerPage));\r\n\r\n setCurrentNumberOfItems(NumberOfPages * QuantityPerPage + QuantityPerPage);\r\n };\r\n\r\n const moveToFirst = () => {\r\n setStartingPoint(1);\r\n setendPointMultiplicator(1);\r\n\r\n setCurrentContent(ArrayOfItems.slice(0, QuantityPerPage));\r\n\r\n setCurrentNumberOfItems(QuantityPerPage);\r\n };\r\n\r\n const changeQuantityPerPage = () => {\r\n if (\r\n inputRef.current.value?.length > 0 &&\r\n Number(inputRef.current.value) > 0\r\n ) {\r\n setQuantityPerPage(Number(inputRef.current.value));\r\n setCurrentNumberOfItems(Number(inputRef.current.value));\r\n setStartingPoint(1);\r\n setendPointMultiplicator(1);\r\n setCurrentContent(ArrayOfItems.slice(0, Number(inputRef.current.value)));\r\n } else {\r\n setFeedback(\"Enter valid number\");\r\n }\r\n };\r\n\r\n //clear feedback\r\n useEffect(() => {\r\n if (feedback) {\r\n setTimeout(() => {\r\n setFeedback(\"\");\r\n }, 3000);\r\n }\r\n }, [feedback]);\r\n\r\n //set the navigation buttons when quatityPerPage or StartingPoint or EndPointMultiplicator changes\r\n useEffect(() => {\r\n setPagesNavigations((p) => {\r\n return {\r\n all: buttonsLabelsArray.slice(\r\n startingPoint - 1,\r\n endPointMultiplicator * QuantityPerPage\r\n ),\r\n displayed: buttonsLabelsArray\r\n .slice(startingPoint - 1, endPointMultiplicator * QuantityPerPage)\r\n ?.slice(0, 10),\r\n hidden: buttonsLabelsArray\r\n .slice(startingPoint - 1, endPointMultiplicator * QuantityPerPage)\r\n .slice(10),\r\n };\r\n });\r\n }, [QuantityPerPage, startingPoint, endPointMultiplicator]);\r\n\r\n return (\r\n <>\r\n {children}\r\n \r\n {\r\n moveToFirst();\r\n }}\r\n >\r\n First\r\n \r\n {\r\n e.preventDefault();\r\n moveToPrevious();\r\n }}\r\n >\r\n \r\n {\" \"}\r\n {pagesNavigation.previousDisplayed?.length > 0 && (\r\n {\r\n setPagesNavigations((p) => {\r\n return {\r\n all: p.all,\r\n displayed: p.previousDisplayed,\r\n hidden: p.displayed,\r\n previousDisplayed: [],\r\n };\r\n });\r\n }}\r\n >\r\n ...\r\n \r\n )}\r\n {pagesNavigation.displayed.map((elements, index) => {\r\n return (\r\n {\r\n setCurrentContent(\r\n ArrayOfItems.slice(\r\n Number(elements) * QuantityPerPage,\r\n Number(elements) * QuantityPerPage + QuantityPerPage\r\n )\r\n );\r\n\r\n setCurrentNumberOfItems((elements + 1) * QuantityPerPage);\r\n }}\r\n >\r\n {Number(elements + 1)}\r\n \r\n );\r\n })}\r\n {pagesNavigation.hidden.length > 0 && (\r\n {\r\n setPagesNavigations((p) => {\r\n return {\r\n all: p.all,\r\n displayed: p.hidden,\r\n hidden: [],\r\n previousDisplayed: p.displayed,\r\n };\r\n });\r\n }}\r\n >\r\n ...\r\n \r\n )}\r\n {\r\n e.preventDefault();\r\n moveToNext();\r\n }}\r\n >\r\n \r\n {\" \"}\r\n {\r\n e.preventDefault();\r\n moveToLast();\r\n }}\r\n >\r\n Last\r\n \r\n \r\n
\r\n \r\n
\r\n . \r\n {feedback}\r\n
\r\n
{\r\n changeQuantityPerPage();\r\n }}\r\n defaultValue={QuantityPerPage}\r\n >\r\n 5 \r\n 10 \r\n 15 \r\n 20 \r\n \r\n
\r\n \r\n
\r\n {`${currentNumberOfItems - QuantityPerPage + 1} - ${\r\n Number(currentNumberOfItems) > Number(ArrayOfItems.length)\r\n ? ArrayOfItems.length\r\n : currentNumberOfItems\r\n } of ${ArrayOfItems.length} items`}\r\n \r\n
\r\n
\r\n >\r\n );\r\n};\r\n\r\nexport default ListPagination;","//Error Logs Component\r\n\r\nimport { useState, useEffect, useLayoutEffect, createContext } from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { increment, decrement, loadInvoice, saveInvoice } from \"../actions\";\r\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\r\nimport axios from \"axios\";\r\nimport { ToastContainer, toast } from \"react-toastify\";\r\nimport \"react-toastify/dist/ReactToastify.css\";\r\nimport FailureModal from \"../components/Modals/FailureModal\";\r\nimport { goToRefreshEndpoint } from \"../customFunctions/goToRefreshEndpoint\";\r\nimport { CovertMonthNumbersToAlphabets } from \"../customFunctions/dateConverter\";\r\nimport ListPagination from \"../components/FrontEndListPagination\";\r\n\r\n// reactstrap components\r\nimport {\r\n Button,\r\n Card,\r\n CardHeader,\r\n Table,\r\n Container,\r\n Row,\r\n Col,\r\n InputGroup,\r\n InputGroupAddon,\r\n InputGroupText,\r\n Input,\r\n} from \"reactstrap\";\r\n\r\nimport NewInvoice from \"components/Modals/NewInvoice\";\r\nimport InvoiceDraft from \"components/Modals/InvoiceDraft\";\r\nimport Loader from \"components/Modals/Loader\";\r\nimport SweetAlert from \"react-bootstrap-sweetalert\";\r\nimport IdleTimer from \"components/IdleTimer\";\r\n\r\nconst currency = (amount) => {\r\n return amount.toLocaleString(\"en-US\", {\r\n style: \"currency\",\r\n currency: \"GHS\",\r\n });\r\n};\r\n\r\nexport const moneyInTxt = (value, standard, dec = 2) => {\r\n var nf = new Intl.NumberFormat(standard, {\r\n minimumFractionDigits: dec,\r\n maximumFractionDigits: 2,\r\n });\r\n return nf.format(Number(value) ? value : 0.0);\r\n};\r\nconst init = {\r\n name: \"\",\r\n serviceProviderId: \"\",\r\n duration: \"\",\r\n startDate: \"\",\r\n currency: \"\",\r\n supportedBranch: \"\",\r\n};\r\n\r\nexport const AppContext = createContext(null);\r\n\r\nconst ErrorLogs = (props) => {\r\n //select redux store states\r\n const masterInvoiceList = useSelector((state) => state.masterInvoiceList);\r\n //const counter = useSelector((state) => state.counter);\r\n const [failedGHGOVInvoices, setFailedGHGHOVInvoices] = useState([]);\r\n\r\n const [showNewInvoiceModal, setShowNewInvoiceModal] = useState(false);\r\n const [invoiceList, setInvoiceList] = useState(masterInvoiceList);\r\n const [draftData, setdraftData] = useState({});\r\n const [showDraftDetails, setShowDraftDetails] = useState(false);\r\n const [supportBranches, setSupportBranches] = useState([\r\n { name: \"\", branch_code: \"\" },\r\n ]);\r\n const [customerTypes, setCustomerTypes] = useState([]);\r\n const [declineReason, setDeclineReason] = useState([]);\r\n const [showDeclineReason, setShowDeclineReason] = useState(false);\r\n const [showLoader, setShowLoader] = useState(false);\r\n const [isActive, setIsActive] = useState(false);\r\n const [invoiceId, setInvoiceID] = useState(\"\");\r\n\r\n const [logMessgaes, setLogMessages] = useState([]);\r\n const [search, setSearch] = useState(\"\");\r\n // for pagination\r\n const [startingPoint, setStartingPoint] = useState(1);\r\n const [endPointMultiplicator, setendPointMultiplicator] = useState(1);\r\n const [currentContent, setCurrentContent] = useState([]);\r\n const [QuantityPerPage, setQuantityPerPage] = useState(10);\r\n\r\n const onCancel = () => {\r\n setIsActive(false);\r\n };\r\n\r\n const getServiceList = async () => {\r\n try {\r\n const servicelist = await axios.get(\r\n `${process.env.REACT_APP_API_ROOT_PSL}NpaServices/GetServicesByDepartment/${userDetails?.pkId}`,\r\n {\r\n headers: {\r\n Authorization: `Bearer ${JSON.parse(\r\n sessionStorage.getItem(\"Token\")\r\n )}`,\r\n },\r\n }\r\n );\r\n if (servicelist?.data) {\r\n return servicelist?.data;\r\n }\r\n } catch (error) {\r\n if (error.message.includes(\"401\")) {\r\n let refreshData = {\r\n token: JSON.parse(sessionStorage.getItem(\"Token\")),\r\n refreshToken: JSON.parse(sessionStorage.getItem(\"refreshToken\")),\r\n };\r\n await axios\r\n .post(\r\n `${process.env.REACT_APP_API_ROOT_PSL}UserInfo/RefreshToken`,\r\n refreshData\r\n )\r\n .then((res) => {\r\n if (res?.data.accessToken != null) {\r\n sessionStorage.setItem(\r\n \"Token\",\r\n JSON.stringify(res.data.accessToken)\r\n );\r\n sessionStorage.setItem(\r\n \"refreshToken\",\r\n JSON.stringify(res.data.refreshToken)\r\n );\r\n getServiceList();\r\n } else {\r\n toast.info(\"System failed,please try again later\");\r\n }\r\n });\r\n }\r\n }\r\n };\r\n\r\n const getBussinessOneLogMessages = async () => {\r\n try {\r\n const logMessages = await axios.get(\r\n `${process.env.REACT_APP_API_ROOT_PSL_V2}Message`,\r\n {\r\n headers: {\r\n Authorization: `Bearer ${JSON.parse(\r\n sessionStorage.getItem(\"Token\")\r\n )}`,\r\n },\r\n }\r\n );\r\n\r\n if (logMessages?.data) {\r\n if(logMessages?.data?.length === 0) toast.info(\"No data found\")\r\n setLogMessages(logMessages?.data);\r\n // set content needed for first page of pagination\r\n setCurrentContent(\r\n logMessages?.data?.slice(\r\n startingPoint - 1,\r\n endPointMultiplicator * QuantityPerPage\r\n )\r\n );\r\n }\r\n } catch (error) {\r\n goToRefreshEndpoint(error, getBussinessOneLogMessages, setShowLoader);\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n getBussinessOneLogMessages();\r\n }, []);\r\n\r\n return (\r\n <>\r\n \r\n
\r\n
\r\n \r\n No payments have been made
\r\n \r\n \r\n
\r\n\r\n {showLoader &&
}\r\n\r\n
\r\n {/* Page content */}\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
Business One Logs \r\n\r\n \r\n List of all errors \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n {\r\n setSearch(e.target.value);\r\n }}\r\n />\r\n \r\n {search &&\r\n logMessgaes\r\n ?.slice(\r\n startingPoint - 1,\r\n endPointMultiplicator * QuantityPerPage\r\n )\r\n ?.filter((log, key) => {\r\n if (search) {\r\n return (\r\n log?.transactionType\r\n ?.toLowerCase()\r\n ?.trim()\r\n .includes(search?.toLowerCase()?.trim()) ||\r\n log?.referenceNumber\r\n ?.toLowerCase()\r\n ?.trim()\r\n .includes(search?.toLowerCase()?.trim())\r\n );\r\n }\r\n }).length === 0 && (\r\n
\r\n \r\n No invoice found...\r\n \r\n
\r\n )}\r\n
\r\n
\r\n \r\n {logMessgaes?.length > 0 && currentContent?.length > 0 && (\r\n \r\n \r\n
\r\n \r\n \r\n Type \r\n Reference Number \r\n Date \r\n Time \r\n Message \r\n \r\n \r\n \r\n {currentContent\r\n ?.filter((log, key) => {\r\n if (search) {\r\n return (\r\n log?.transactionType\r\n ?.toLowerCase()\r\n ?.trim()\r\n .includes(search?.toLowerCase()?.trim()) ||\r\n log?.referenceNumber\r\n ?.toLowerCase()\r\n ?.trim()\r\n .includes(search?.toLowerCase()?.trim())\r\n );\r\n } else {\r\n return log;\r\n }\r\n })\r\n ?.map((log, key) => (\r\n \r\n {log?.transactionType} \r\n {log?.referenceNumber} \r\n \r\n {CovertMonthNumbersToAlphabets(\r\n log?.date.split(\" \")[0]\r\n )}\r\n \r\n {`${log?.date?.split(\" \")[1]} ${\r\n log?.date?.split(\" \")[2]\r\n }`} \r\n\r\n \r\n {log?.message}\r\n \r\n \r\n ))}\r\n \r\n
\r\n
\r\n \r\n )}\r\n \r\n \r\n \r\n
\r\n\r\n \r\n\r\n {showNewInvoiceModal ? (\r\n \r\n \r\n \r\n ) : null}\r\n {showDraftDetails ? (\r\n \r\n ) : null}\r\n {showDeclineReason && (\r\n \r\n )}\r\n \r\n
\r\n >\r\n );\r\n};\r\n\r\nexport default ErrorLogs;\r\n\r\nconst styles = {\r\n body: {\r\n marginTop: 0,\r\n height: \"450px\",\r\n maxHeight: \"450px\",\r\n overflowY: \"scroll\",\r\n },\r\n};\r\n","import axios from \"axios\";\r\n\r\nexport const goToRefreshEndpoint = async (\r\n error,\r\n callbackFunction,\r\n loadingSetterFuction\r\n) => {\r\n if (error.message.includes(\"Request failed with status code 401\")) {\r\n let refreshData = {\r\n token: JSON.parse(sessionStorage.getItem(\"Token\")),\r\n refreshToken: JSON.parse(sessionStorage.getItem(\"refreshToken\")),\r\n };\r\n await axios\r\n .post(\r\n `${process.env.REACT_APP_API_ROOT_PSL}UserInfo/RefreshToken`,\r\n refreshData\r\n )\r\n .then((res) => {\r\n if (res?.data.accessToken != null) {\r\n sessionStorage.setItem(\"Token\", JSON.stringify(res.data.accessToken));\r\n sessionStorage.setItem(\r\n \"refreshToken\",\r\n JSON.stringify(res.data.refreshToken)\r\n );\r\n callbackFunction();\r\n } else {\r\n loadingSetterFuction(false);\r\n toast.info(\"System failed,please try again later\");\r\n }\r\n });\r\n }\r\n};\r\n","import \"@boldreports/javascript-reporting-controls/Scripts/bold.report-viewer.min\";\r\nimport \"@boldreports/javascript-reporting-controls/Content/material/bold.reports.all.min.css\";\r\n//Data-Visualization\r\nimport \"@boldreports/javascript-reporting-controls/Scripts/data-visualization/ej.bulletgraph.min\";\r\nimport \"@boldreports/javascript-reporting-controls/Scripts/data-visualization/ej.chart.min\";\r\n//Reports react base\r\nimport \"@boldreports/react-reporting-components/Scripts/bold.reports.react.min\";\r\nimport '../../src/globals';\r\n\r\nconst BoldReport = ({\r\n reportServerUrl,\r\n reportServiceUrl,\r\n reportPath,\r\n reportParameters,\r\n}) => {\r\n\r\n return (\r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nexport default BoldReport;\r\n","import BoldReport from \"../components/BoldReport\"\r\nimport { useEffect, useState } from \"react\"\r\n\r\nconst ViewReportInDiffTab =() =>{\r\n const [params] = useState(JSON.parse(localStorage.getItem(\"reportParams\")))\r\n const [showReport, setShowReport] = useState(false)\r\n const user = JSON.parse(sessionStorage.getItem(\"user\"));\r\n const reportParams = [\r\n {\r\n name: 'Filter',\r\n labels: [\"Filter\"],\r\n values:[`${params?.userId}`],\r\n nullable: false\r\n },\r\n {\r\n name: 'StartDate',\r\n labels: [\"Start Date\"],\r\n values:[params?.startDate],\r\n nullable: false\r\n },\r\n {\r\n name: 'EndDate',\r\n labels: ['End Date'],\r\n values:[params?.endDate],\r\n nullable: false\r\n },\r\n {\r\n name: 'Printedby',\r\n labels: ['Printed by'],\r\n value:[`${user?.szFirstName } ${user?.szLastName}`],\r\n nullable: false\r\n },\r\n {\r\n name: 'UserId',\r\n labels: [\"UserId\"],\r\n value:[`${params?.userId}`],\r\n nullable: false\r\n }\r\n ]\r\n \r\n\r\n useEffect(()=>{\r\n if(params.category.length > 0 ){\r\n setShowReport(true)\r\n }\r\n },[params])\r\n \r\n// console.log(params)\r\n return (\r\n <>\r\n {\r\n // user?.pkId?.toString()?.length > 0 ?\r\n <>\r\n {showReport && }\r\n > \r\n // window.location.replace(\"/\")\r\n }\r\n >\r\n )\r\n}\r\n\r\nexport default ViewReportInDiffTab","import Index from \"./views/Index.js\";\r\nimport PendingApproval from \"./views/PendingApproval\";\r\nimport Payment from \"views/paymentPlan/Payment\";\r\nimport Dashboard from \"./components/Dashboard\";\r\nimport InvoiceReport from \"./views/InvoiceReport\";\r\nimport ApprovedInvoices from \"./views/ApprovedInvoices\";\r\nimport ViewInvoices from \"./views/ViewInvoices\";\r\nimport ApprovalCancellation from \"./views/ApprovalCancellation\";\r\nimport ErrorLogs from \"./views/ErrorLogs\";\r\nimport ViewReportInDiffTab from \"./views/ViewReportInDiffTab\";\r\n// import { lazy } from \"react\";\r\n\r\n// const Index = lazy(()=> { import ('./views/Index.js') })\r\n// const PendingApproval = lazy(()=> { import ('./views/PendingApproval') })\r\n// const Payment = lazy(()=> { import ('./views/paymentPlan/Payment.js') })\r\n// const Dashboard = lazy(()=> { import ('./components/Dashboard.js') })\r\n// const InvoiceReport = lazy(()=> { import ('./views/InvoiceReport') })\r\n// const ApprovedInvoices = lazy(()=> { import ('./views/ApprovedInvoices.js') })\r\n// const ViewInvoices = lazy(()=> { import ('./views/ViewInvoices.js') })\r\n// const ApprovalCancellation = lazy(()=> { import ('./views/ApprovalCancellation.js') })\r\n// const ErrorLogs = lazy(()=> { import ('./views/ErrorLogs.js') })\r\n// const ViewReportInDiffTab = lazy(()=> { import ('./views/ViewReportInDiffTab.js') })\r\n\r\n\r\nconst storedBlogs = JSON.parse(sessionStorage.getItem(\"menus\"));\r\n\r\nconst fromDatabase = storedBlogs?.map((route) => {\r\n return {\r\n path : route.link,\r\n name : route?.MenuName, \r\n layout: '/admin', \r\n mainMenuVisible: true ,\r\n component : \r\n route.link === \"/index\" ? Index :\r\n route.link === \"/approval\" ? PendingApproval :\r\n route.link === \"/payment-plan\" ? Payment :\r\n route.link === \"/reports\" ? InvoiceReport :\r\n route.link === \"/view\" ? ViewInvoices :\r\n route.link === \"/cancelinvoice\" ? ApprovedInvoices :\r\n route.link === \"/approvalcancellation\" ? ApprovalCancellation :\r\n route.link === \"/errorlogs\" ? ErrorLogs : \"\",\r\n\r\n icon : \r\n route.link === \"/index\" ? \"ni ni-single-copy-04 text-primary\" :\r\n route.link ===\"/approval\" ? \"ni ni-paper-diploma text-primary\" :\r\n route.link === \"/payment-plan\" ? \"ni ni-money-coins text-primary\" :\r\n route.link === \"/reports\" ? \"ni ni-collection text-primary\" :\r\n route.link === \"/view\" ? \"ni ni-money-coins text-primary\" :\r\n route.link === \"/cancelinvoice\" ? \"ni ni-money-coins text-primary\" :\r\n route.link === \"/approvalcancellation\" ? \"ni ni-collection text-primary\" :\r\n route.link === \"/errorlogs\" ? \"ni ni-chart-bar-32 text-primary\" : \"\",\r\n \r\n }\r\n})\r\n\r\n\r\nexport default fromDatabase ? [\r\n {\r\n path: \"/dashboard\",\r\n name: \"Dashboard\",\r\n icon: \"ni ni-chart-bar-32 text-primary\",\r\n component: Dashboard,\r\n layout: \"/admin\",\r\n mainMenuVisible: true,\r\n },\r\n ...fromDatabase, \r\n {\r\n path: `/viewreport`,\r\n name: 'View report',\r\n icon: \"ni ni-collection text-primary\",\r\n component: ViewReportInDiffTab,\r\n layout: \"/admin\",\r\n mainMenuVisible: true,\r\n}\r\n] : [];\r\n","import React, { useState } from 'react'\r\nimport { useLocation, Route, Switch, Redirect } from 'react-router-dom'\r\n// reactstrap components\r\nimport { Container } from 'reactstrap'\r\n// core components\r\nimport AdminNavbar from '../components/Navbars/AdminNavbar.js'\r\nimport AdminFooter from '../components/Footers/AdminFooter.js'\r\nimport Sidebar from '../components/Sidebar/Sidebar.js'\r\n\r\nimport routes from '../routes.js'\r\n\r\nconst Admin = (props) => {\r\n const mainContent = React.useRef(null)\r\n const location = useLocation()\r\n\r\n\r\n React.useEffect(() => {\r\n document.documentElement.scrollTop = 0\r\n document.scrollingElement.scrollTop = 0 \r\n mainContent.current.scrollTop = 0\r\n }, [location])\r\n\r\n const getRoutes = (routes) => {\r\n \r\n return routes.map((prop, key) => {\r\n if (prop.mainMenuVisible === true) {\r\n // console.log(prop.layout, prop.path);\r\n return (\r\n \r\n )\r\n } else {\r\n return null\r\n }\r\n })\r\n }\r\n\r\n\r\n const getBrandText = () => {\r\n return routes.find(route => {\r\n return route?.path.split('/')[route?.path.split('/').length-1] === props.location?.pathname.split('/')[props.location?.pathname.split('/')?.length-1]\r\n })?.name\r\n }\r\n\r\n \r\n return (\r\n <>\r\n \r\n\r\n \r\n
\r\n
\r\n {getRoutes(routes)}\r\n {/* }> */}\r\n {/* */}\r\n \r\n
\r\n \r\n \r\n
\r\n >\r\n )\r\n}\r\n\r\nexport default Admin\r\n","/*!\r\n\r\n=========================================================\r\n* Argon Dashboard React - v1.2.1\r\n=========================================================\r\n\r\n* Product Page: https://www.creative-tim.com/product/argon-dashboard-react\r\n* Copyright 2021 Creative Tim (https://www.creative-tim.com)\r\n* Licensed under MIT (https://github.com/creativetimofficial/argon-dashboard-react/blob/master/LICENSE.md)\r\n\r\n* Coded by Creative Tim\r\n\r\n=========================================================\r\n\r\n* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\r\n\r\n*/\r\nimport { Link } from \"react-router-dom\";\r\n// reactstrap components\r\nimport {\r\n UncontrolledCollapse,\r\n NavbarBrand,\r\n Navbar,\r\n NavItem,\r\n NavLink,\r\n Nav,\r\n Container,\r\n Row,\r\n Col,\r\n} from \"reactstrap\";\r\n\r\nconst AdminNavbar = () => {\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n Dashboard \r\n \r\n \r\n \r\n \r\n \r\n Register \r\n \r\n \r\n \r\n \r\n \r\n Login \r\n \r\n \r\n \r\n \r\n \r\n Profile \r\n \r\n \r\n \r\n \r\n \r\n \r\n >\r\n );\r\n};\r\n\r\nexport default AdminNavbar;\r\n","/*!\r\n\r\n=========================================================\r\n* Argon Dashboard React - v1.2.1\r\n=========================================================\r\n\r\n* Product Page: https://www.creative-tim.com/product/argon-dashboard-react\r\n* Copyright 2021 Creative Tim (https://www.creative-tim.com)\r\n* Licensed under MIT (https://github.com/creativetimofficial/argon-dashboard-react/blob/master/LICENSE.md)\r\n\r\n* Coded by Creative Tim\r\n\r\n=========================================================\r\n\r\n* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\r\n\r\n*/\r\n/*eslint-disable*/\r\n\r\n// reactstrap components\r\nimport { NavItem, NavLink, Nav, Container, Row, Col } from \"reactstrap\";\r\n\r\nconst Login = () => {\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Creative Tim\r\n \r\n \r\n \r\n \r\n About Us\r\n \r\n \r\n \r\n \r\n Blog\r\n \r\n \r\n \r\n \r\n MIT License\r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n >\r\n );\r\n};\r\n\r\nexport default Login;\r\n","/*!\r\n\r\n=========================================================\r\n* Argon Dashboard React - v1.2.1\r\n=========================================================\r\n\r\n* Product Page: https://www.creative-tim.com/product/argon-dashboard-react\r\n* Copyright 2021 Creative Tim (https://www.creative-tim.com)\r\n* Licensed under MIT (https://github.com/creativetimofficial/argon-dashboard-react/blob/master/LICENSE.md)\r\n\r\n* Coded by Creative Tim\r\n\r\n=========================================================\r\n\r\n* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\r\n\r\n*/\r\nimport React from \"react\";\r\nimport { useLocation, Route, Switch, Redirect } from \"react-router-dom\";\r\n// reactstrap components\r\nimport { Container, Row, Col } from \"reactstrap\";\r\n\r\n// core components\r\nimport AuthNavbar from \"components/Navbars/AuthNavbar.js\";\r\nimport AuthFooter from \"components/Footers/AuthFooter.js\";\r\n\r\nimport routes from \"routes.js\";\r\nimport ViewReportInDiffTab from \"views/ViewReportInDiffTab\";\r\n\r\nconst Auth = (props) => {\r\n const mainContent = React.useRef(null);\r\n const location = useLocation();\r\n\r\n React.useEffect(() => {\r\n document.body.classList.add(\"bg-default\");\r\n return () => {\r\n document.body.classList.remove(\"bg-default\");\r\n };\r\n }, []);\r\n React.useEffect(() => {\r\n document.documentElement.scrollTop = 0;\r\n document.scrollingElement.scrollTop = 0;\r\n mainContent.current.scrollTop = 0;\r\n }, [location]); \r\n\r\n const getRoutes = (routes) => {\r\n return routes.map((prop, key) => {\r\n if (prop.layout === \"/auth\") {\r\n return (\r\n \r\n );\r\n } else {\r\n return null;\r\n }\r\n });\r\n };\r\n\r\n return (\r\n <>\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n Welcome! \r\n \r\n Use these awesome forms to login or create new account in\r\n your project for free.\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n {/* Page content */}\r\n
\r\n \r\n \r\n {getRoutes(routes)}\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n >\r\n );\r\n};\r\n\r\nexport default Auth;\r\n","import React from 'react'\r\nimport { useState } from 'react'\r\nimport { Modal, Button, Row, Col, FormGroup, Input } from 'reactstrap'\r\nconst init={\r\n newpassword:\"\",\r\n confirmpassword:\"\"\r\n}\r\nfunction FirstTime() {\r\nconst [newPassword,setNewPassword]=useState(\"\")\r\nconst [confirmPassword,setconfirmPassword]=useState(\"\")\r\nconst [password,setPassword]=useState(init)\r\nconst handleOnchange=(e)=>{\r\n console.log(e.target.name)\r\n // setPassword(e.target.name)\r\n\r\n}\r\n\r\n\r\n\r\n return (\r\n \r\n \r\n
\r\n Your attention is required\r\n \r\n \r\n × \r\n \r\n \r\n \r\n \r\n \r\n Ok, Got it\r\n \r\n \r\n Close\r\n \r\n
\r\n \r\n )\r\n}\r\n\r\nexport default FirstTime\r\n","import { useState } from 'react'\r\nimport { Link } from 'react-router-dom'\r\nimport axios from 'axios'\r\nimport {\r\n Button,\r\n Card,\r\n CardHeader,\r\n CardBody,\r\n FormGroup,\r\n Form,\r\n Input,\r\n InputGroupAddon,\r\n InputGroupText,\r\n InputGroup,\r\n Row,\r\n Col,\r\n} from 'reactstrap'\r\nimport { ToastContainer, toast } from 'react-toastify'\r\nimport 'react-toastify/dist/ReactToastify.css'\r\nimport Loader from '../../components/Modals/Loader'\r\nimport { useEffect } from 'react'\r\nimport FirstTime from 'components/Modals/FirstTime'\r\n\r\nconst FirstTimeLogin = () => {\r\n const [loginData, setloginData] = useState({ username: '', password: '' })\r\n const [showLoader, setshowLoader] = useState(false)\r\n const [handleKey, setHandleKey]=useState(false)\r\n const [showFirstTime,setShowFirstTime]=useState(false)\r\n \r\n const usersLogin = JSON.parse(sessionStorage.getItem('userLoginDeets')); \r\n//console.log(usersLogin);\r\n\r\n\r\n\r\n const login = async() => {\r\n if (loginData.username.trim() === '' || loginData.password.trim === '') {\r\n toast.warning('Fields cannot be empty')\r\n return\r\n } \r\n if(loginData.username.trim() !== loginData.password.trim()){\r\n toast.warning('Passwords do not match')\r\n return\r\n } else {\r\n setshowLoader(true)\r\n \r\n const postData = { \r\n szUserName: loginData.username,\r\n szClearText: loginData.password,\r\n AppId: 4017,\r\n user: 20009\r\n }\r\n \r\n\r\n const changepasswordDetails= {\r\n \"id\": usersLogin.pkId,\r\n \"firstName\": usersLogin.szFirstName,\r\n \"lastName\": usersLogin.szLastName,\r\n \"emailAddress\": usersLogin.szEmailAddress,\r\n \"password\": loginData.username\r\n }\r\n\r\n try {\r\n await axios\r\n .put(\r\n // `https://psl-webapps/AdminService/api/Users/SaveGetCredentials`,\r\n `${process.env.REACT_APP_API_ROOT_PSL}UserInfo/UpdateChangeUserPassword`,changepasswordDetails,{ headers: {\r\n 'Authorization': `Bearer ${JSON.parse(sessionStorage.getItem(\"Token\"))}`\r\n }}\r\n )\r\n .then((res) => {\r\n \r\n if(res){\r\n toast.success(\"Your password was reset successfully\")\r\n\r\n window.location = `${process.env.REACT_APP_BASE_ROUTE}/auth/login`\r\n\r\n }\r\n\r\n \r\n // if (res.data.hasOwnProperty('ReturnType')) {\r\n // toast.error('Invalid credentials')\r\n // } else {\r\n // setloginData({ username: '', password: '' })\r\n // }\r\n })\r\n } catch (error) {\r\n if(error.message.includes('Request failed with status code 401')){\r\n console.log(\"error\");\r\n let refreshData = {\r\n token: JSON.parse(sessionStorage.getItem(\"Token\")),\r\n refreshToken: JSON.parse(sessionStorage.getItem(\"refreshToken\"))\r\n }\r\n await axios.post(\r\n `${process.env.REACT_APP_API_ROOT_PSL}UserInfo/RefreshToken`,refreshData\r\n ).then((res)=>{\r\n if(res?.data.accessToken != null){\r\n sessionStorage.setItem('Token', JSON.stringify(res.data.accessToken))\r\n sessionStorage.setItem('refreshToken', JSON.stringify(res.data.refreshToken))\r\n login()\r\n }\r\n else{\r\n toast.info(\"System failed,please try again later\")\r\n \r\n }\r\n })\r\n \r\n } setSupportBranches((prev) => [{ name: '', branch_code: '' }])\r\n }\r\n\r\n // )\r\n // .catch((error) => {\r\n // toast.warning('Error occured')\r\n // setloginData({ username: '', password: '' })\r\n // setshowLoader(false)\r\n // })\r\n }\r\n }\r\n\r\n\r\n\r\n// useEffect(() => {\r\n// let user = sessionStorage.getItem('user')\r\n \r\n// if (user) {\r\n// console.log('logged in')\r\n// // window.location = `/admin/index`\r\n \r\n// window.location = `${process.env.REACT_APP_BASE_ROUTE}/admin/index`\r\n// } else {\r\n// console.log('not logged in')\r\n// }\r\n\r\n// return () => { }\r\n// }, [])\r\n\r\n const handleKeyStroke=(e)=>{\r\n // \r\n if(e.code === \"Enter\"){\r\n login()\r\n }\r\n }\r\n \r\n return (\r\n \r\n {showLoader ?
: null}\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
You are required to change your password on first time login \r\n Update your password \r\n \r\n \r\n \r\n \r\n \r\n \r\n {showFirstTime && (
)} \r\n
\r\n )\r\n}\r\n\r\nconst styles = {\r\n container: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n height: '100vh',\r\n background: 'rgb(37, 39, 60)',\r\n },\r\n}\r\nexport default FirstTimeLogin\r\n","import { useState } from \"react\";\r\nimport { Link } from \"react-router-dom\";\r\nimport axios from \"axios\";\r\nimport {\r\n Button,\r\n Card,\r\n CardHeader,\r\n CardBody,\r\n FormGroup,\r\n Form,\r\n Input,\r\n InputGroupAddon,\r\n InputGroupText,\r\n InputGroup,\r\n Row,\r\n Col,\r\n} from \"reactstrap\";\r\nimport { ToastContainer, toast } from \"react-toastify\";\r\nimport \"react-toastify/dist/ReactToastify.css\";\r\nimport Loader from \"../../components/Modals/Loader\";\r\nimport { useEffect } from \"react\";\r\nimport FirstTimeLogin from \"components/Modals/FirstTimeLogin\";\r\n\r\nconst Login = () => {\r\n const [loginData, setloginData] = useState({ username: \"\", password: \"\" });\r\n const [showLoader, setshowLoader] = useState(false);\r\n const [showFirstTime, setShowFirstTime] = useState(false);\r\n const [showLogin, setshowLogin] = useState(false);\r\n\r\n const login = async () => {\r\n if (loginData.username.trim() === \"\" || loginData.password.trim === \"\") {\r\n toast.warning(\"Username and Password required\");\r\n } else {\r\n setshowLoader(true);\r\n sessionStorage.setItem(\"usrName\", JSON.stringify(loginData.username));\r\n\r\n\r\n const tokenData = {\r\n username: loginData.username,\r\n password: loginData.password,\r\n AppId: 8,\r\n };\r\n\r\n await axios\r\n .post(`${process.env.REACT_APP_API_ROOT_PSL}UserInfo`, tokenData)\r\n .then((res) => {\r\n sessionStorage.setItem(\r\n \"userLoginDeets\",\r\n JSON.stringify(res.data.claims)\r\n );\r\n\r\n if (res.data.claims.iFirstTimeLogin == 0) {\r\n window.location = `${process.env.REACT_APP_BASE_ROUTE}/auth/changepassword`;\r\n return;\r\n }\r\n\r\n if (res.data.hasOwnProperty(\"ReturnType\")) {\r\n toast.error(\"Invalid login credentials\");\r\n } else {\r\n // console.log(res.data[0])\r\n sessionStorage.setItem(\"user\", JSON.stringify(res.data.claims));\r\n sessionStorage.setItem(\r\n \"Token\",\r\n JSON.stringify(res.data.accessToken)\r\n );\r\n sessionStorage.setItem(\r\n \"refreshToken\",\r\n JSON.stringify(res.data.refreshToken)\r\n );\r\n sessionStorage.setItem(\r\n \"businessUnit\",\r\n JSON.stringify(res.data.claims.businessUnit)\r\n );\r\n\r\n if (res.data) {\r\n // console.log(res.data);\r\n axios\r\n .get(\r\n `${process.env.REACT_APP_ADMIN_SERVICE_API}Menus/${tokenData.AppId}/en/${res.data?.claims.pkId}/LoadAllMenusByUserId`,\r\n {\r\n headers: {\r\n Authorization: `Bearer ${JSON.parse(\r\n sessionStorage.getItem(\"Token\")\r\n )}`,\r\n },\r\n }\r\n )\r\n .then((res) => {\r\n // console.log(res);\r\n sessionStorage.setItem(\"menus\", JSON.stringify(res.data));\r\n setshowLoader(false);\r\n // console.log(\"called\");\r\n // window.location =`/admin/index`\r\n\r\n window.location = `${process.env.REACT_APP_BASE_ROUTE}/admin/dashboard`;\r\n })\r\n .catch((error) => {\r\n setshowLoader(false);\r\n toast.warning(error);\r\n });\r\n }\r\n\r\n setloginData({ username: \"\", password: \"\" });\r\n }\r\n })\r\n .catch((error) => {\r\n toast.warning(\"User does not have an account\");\r\n setloginData({ username: \"\", password: \"\" });\r\n setshowLoader(false);\r\n });\r\n }\r\n };\r\n\r\n const passwordReset = () => {\r\n window.location = `${process.env.REACT_APP_BASE_ROUTE}/auth/forgotpassword`;\r\n };\r\n\r\n useEffect(() => {\r\n let user = sessionStorage.getItem(\"user\");\r\n\r\n if (user) {\r\n // window.location = `/admin/index`\r\n window.location = `${process.env.REACT_APP_BASE_ROUTE}/admin/index`;\r\n } else {\r\n }\r\n\r\n return () => { };\r\n }, []);\r\n\r\n const handleKeyStroke = (e) => {\r\n //\r\n if (e.code === \"Enter\") {\r\n login();\r\n }\r\n };\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nconst styles = {\r\n container: {\r\n display: \"flex\",\r\n alignItems: \"center\",\r\n justifyContent: \"center\",\r\n height: \"100vh\",\r\n background: \"rgb(37, 39, 60)\",\r\n },\r\n};\r\nexport default Login;\r\n","const init = [\r\n {\r\n invoiceNo: 899007,\r\n ghGovRefernceNo: '',\r\n docDate: new Date().toLocaleDateString(),\r\n dueDate: new Date().toLocaleDateString(),\r\n remarks: 'no comments',\r\n periodId: 0,\r\n type: 'Licensing',\r\n customerName: 'Goil',\r\n customerCode: 0,\r\n businessUnit: 'UPPF',\r\n branchCode: 0,\r\n totalAmount: 1960000,\r\n currency: 'GHS',\r\n paymentStatus: 0,\r\n status: 2, // 1 -draft 2- pending 3- approved 4 -declined 5 -sap\r\n invoiceItems: [\r\n {\r\n price: 2400,\r\n itemCode: 91231,\r\n itemDescription: 'some description',\r\n quantity: 20,\r\n },\r\n ],\r\n },\r\n {\r\n invoiceNo: 899009,\r\n ghGovRefernceNo: '',\r\n docDate: new Date().toLocaleDateString(),\r\n dueDate: new Date().toLocaleDateString(),\r\n remarks: 'no comments',\r\n periodId: 0,\r\n type: 'Licensing',\r\n customerName: 'Alinco Oil',\r\n customerCode: 0,\r\n businessUnit: 'PPR',\r\n branchCode: 0,\r\n totalAmount: 250000,\r\n currency: 'GHS',\r\n paymentStatus: 0,\r\n status: 3, // 1 -draft 2- pending 3- approved 4 -declined 5 -sap\r\n invoiceItems: [\r\n {\r\n price: 5000,\r\n itemCode: 91231,\r\n itemDescription: 'some description',\r\n quantity: 50,\r\n },\r\n ],\r\n },\r\n {\r\n invoiceNo: 569007,\r\n ghGovRefernceNo: '',\r\n docDate: new Date().toLocaleDateString(),\r\n dueDate: new Date().toLocaleDateString(),\r\n remarks: 'no comments',\r\n periodId: 0,\r\n type: 'Licensing',\r\n customerName: 'Total',\r\n customerCode: 0,\r\n businessUnit: 'UPPF',\r\n branchCode: 0,\r\n totalAmount: 275000,\r\n currency: 'GHS',\r\n paymentStatus: 0,\r\n status: 4, // 1 -draft 2- pending 3- approved 4 -declined 5 -sap\r\n invoiceItems: [\r\n {\r\n price: 2250,\r\n itemCode: 56231,\r\n itemDescription: 'some description',\r\n quantity: 50,\r\n },\r\n ],\r\n },\r\n {\r\n invoiceNo: 639000,\r\n ghGovRefernceNo: '',\r\n docDate: new Date().toLocaleDateString(),\r\n dueDate: new Date().toLocaleDateString(),\r\n remarks: 'no comments',\r\n periodId: 0,\r\n type: 'Licensing',\r\n customerName: 'Star Oil',\r\n customerCode: 0,\r\n businessUnit: 'UPPF',\r\n branchCode: 0,\r\n totalAmount: 45900,\r\n currency: 'GHS',\r\n paymentStatus: 0,\r\n status: 5, // 1 -draft 2- pending 3- approved 4 -declined 5 -sap\r\n invoiceItems: [\r\n {\r\n price: 1500,\r\n itemCode: 91231,\r\n itemDescription: 'some description',\r\n quantity: 20,\r\n },\r\n ],\r\n },\r\n {\r\n invoiceNo: 869005,\r\n ghGovRefernceNo: '',\r\n docDate: new Date().toLocaleDateString(),\r\n dueDate: new Date().toLocaleDateString(),\r\n remarks: 'no comments',\r\n periodId: 0,\r\n type: 'Sanctions',\r\n customerName: 'Nagami Oil',\r\n customerCode: 0,\r\n businessUnit: 'UPPF',\r\n branchCode: 0,\r\n totalAmount: 45900,\r\n currency: 'GHS',\r\n paymentStatus: 0,\r\n status: 1, // 1 -draft 2- pending 3- approved 4 -declined 5 -sap\r\n invoiceItems: [\r\n {\r\n price: 1500,\r\n itemCode: 91231,\r\n itemDescription: 'some description',\r\n quantity: 20,\r\n },\r\n ],\r\n },\r\n]\r\n\r\nconst invoiceReducer = (state = [], action) => {\r\n switch (action.type) {\r\n case 'SAVE_INVOICE':\r\n //console.log('saving new invoice: ', action.payload)\r\n //console.log([...state, action.payload])\r\n return [...state, action.payload]\r\n\r\n case 'UPDATE_LIST':\r\n // console.log('updating list')\r\n //console.log(action.payload)\r\n return action.payload\r\n\r\n case 'LOAD_INVOICE_LIST':\r\n // console.log('loading list')\r\n state = action.payload\r\n return state\r\n\r\n default:\r\n //console.log('defaulting to empty')\r\n return state\r\n }\r\n}\r\n\r\nexport default invoiceReducer\r\n","const playgroundReducer = (state = 0, action) => {\r\n switch (action.type) {\r\n case \"INCREMENT\":\r\n return state + action.payload;\r\n case \"DECREMENT\":\r\n return state - action.payload;\r\n default:\r\n return state;\r\n }\r\n};\r\n\r\nexport default playgroundReducer;\r\n","import invoiceReducer from \"./invoiceReducer\";\r\nimport playgroundReducer from \"./playgroundReducer\";\r\n\r\nimport { combineReducers } from \"redux\";\r\n\r\nconst allReducers = combineReducers({\r\n masterInvoiceList: invoiceReducer,\r\n counter: playgroundReducer,\r\n});\r\n\r\nexport default allReducers;\r\n","import React, { useEffect } from \"react\";\r\n\r\nimport { createContext, useState } from \"react\";\r\nimport { useIdleTimer } from 'react-idle-timer'\r\n\r\nconst CustomIdleTimerContext = createContext({});\r\n\r\nexport const IdleProvider = ({ children }) => {\r\n // const [suggest,setSuggest] = useState([]);\r\n const [state, setState] = useState('Active')\r\n const [count, setCount] = useState(0)\r\n const [remaining, setRemaining] = useState(0)\r\n\r\n const onIdle = () => {\r\n setState('Idle')\r\n }\r\n \r\n const onActive = () => {\r\n setState('Active')\r\n }\r\n \r\n const onAction = () => {\r\n setCount(count + 1)\r\n }\r\n \r\n const { getRemainingTime } = useIdleTimer({\r\n onIdle,\r\n onActive,\r\n onAction,\r\n timeout: 10_000,\r\n throttle: 500\r\n })\r\n\r\n useEffect(() => {\r\n const interval = setInterval(() => {\r\n setRemaining(Math.ceil(getRemainingTime() / 1000))\r\n }, 500)\r\n \r\n return () => {\r\n clearInterval(interval)\r\n }\r\n })\r\n \r\n\r\n return (\r\n \r\n {children}\r\n \r\n )\r\n}\r\n\r\nexport default CustomIdleTimerContext;","import { useState } from 'react'\r\nimport { Link } from 'react-router-dom'\r\nimport axios from 'axios'\r\nimport {\r\n Button,\r\n Card,\r\n CardHeader,\r\n CardBody,\r\n FormGroup,\r\n Form,\r\n Input,\r\n InputGroupAddon,\r\n InputGroupText,\r\n InputGroup,\r\n Row,\r\n Col,\r\n} from 'reactstrap'\r\nimport { ToastContainer, toast } from 'react-toastify'\r\nimport 'react-toastify/dist/ReactToastify.css'\r\nimport Loader from '../../components/Modals/Loader'\r\nimport FirstTime from 'components/Modals/FirstTime'\r\n\r\nconst init = {\r\n szFirstName: '', szLastName: '', szEmailAddress: ''\r\n}\r\n\r\nconst ForgetPassword = () => {\r\n const [loginData, setloginData] = useState({ szFirstName: '', szLastName: '', szEmailAddress: '' })\r\n const [userName, setUserName] = useState(\"\")\r\n const [showLoader, setshowLoader] = useState(false)\r\n const [showFirstTime, setShowFirstTime] = useState(false)\r\n\r\n const login = async () => {\r\n if (userName?.username?.trim() === '') {\r\n toast.warning('Fields cannot be empty')\r\n return\r\n }\r\n\r\n if (loginData?.szFirstName.trim() === '') {\r\n toast.warning('Fields cannot be empty')\r\n return\r\n }\r\n if (loginData?.szLastName.trim() === '') {\r\n toast.warning('Fields cannot be empty')\r\n return\r\n }\r\n if (loginData?.szEmailAddress.trim() === '') {\r\n toast.warning('Fields cannot be empty')\r\n return\r\n }\r\n else {\r\n setshowLoader(true)\r\n\r\n const changepasswordDetails = {\r\n id: loginData?.pkId,\r\n userName: userName?.username,\r\n firstName: loginData?.szFirstName,\r\n lastName: loginData?.szLastName,\r\n emailAddress: loginData?.szEmailAddress,\r\n }\r\n await axios\r\n .post(\r\n `${process.env.REACT_APP_API_ROOT_PSL}UserInfo/SaveRequestForPassword`, changepasswordDetails\r\n )\r\n .then((res) => {\r\n\r\n if (res) {\r\n toast.success(\"A password reset link has been sent to your email address\")\r\n\r\n window.location = `${process.env.REACT_APP_BASE_ROUTE}/auth/login`\r\n\r\n }\r\n })\r\n .catch((error) => {\r\n toast.warning('An error occured')\r\n setloginData(init)\r\n setshowLoader(false)\r\n })\r\n }\r\n }\r\n\r\n\r\n const getData = async () => {\r\n await axios\r\n .get(`${process.env.REACT_APP_API_ROOT_PSL}UserInfo/GetUserDetails/${loginData.username}/8`)\r\n .then((response) => {\r\n console.log(response.data[0]);\r\n setloginData(response.data[0])\r\n });\r\n }\r\n\r\n const handleKeyStroke = (e) => {\r\n if (e.code === \"Enter\") {\r\n if (userName?.username) {\r\n handleBlur()\r\n }\r\n else {\r\n return\r\n }\r\n\r\n }\r\n }\r\n const handleBlur = async () => {\r\n if (!userName?.username?.trim()) {\r\n return\r\n }\r\n else {\r\n\r\n await axios\r\n .get(`${process.env.REACT_APP_API_ROOT_PSL}UserInfo/GetUserDetails/${userName?.username}/8`)\r\n .then((response) => {\r\n if (response?.data[0]?.szFirstName) {\r\n setloginData(response.data[0])\r\n }\r\n else {\r\n toast.info(\"The username provided could not be found\")\r\n }\r\n });\r\n }\r\n }\r\n\r\n const hanleUnfocus = () => {\r\n setUserName('')\r\n setloginData(init)\r\n }\r\n\r\n return (\r\n \r\n )\r\n}\r\n\r\nconst styles = {\r\n container: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n height: '100vh',\r\n background: 'rgb(37, 39, 60)',\r\n },\r\n}\r\nexport default ForgetPassword","import React from 'react'\r\nimport ReactDOM from 'react-dom'\r\nimport { BrowserRouter, Route, Switch, Redirect } from 'react-router-dom'\r\n\r\nimport 'assets/plugins/nucleo/css/nucleo.css'\r\nimport '@fortawesome/fontawesome-free/css/all.min.css'\r\nimport 'assets/scss/argon-dashboard-react.scss'\r\nimport './globals'\r\n\r\nimport AdminLayout from './layouts/Admin.js'\r\nimport AuthLayout from './layouts/Auth.js'\r\nimport Login from '../src/views/examples/Login.js'\r\n\r\nimport { createStore, applyMiddleware, compose } from 'redux'\r\nimport thunk from 'redux-thunk'\r\nimport allReducers from './reducers'\r\nimport { Provider } from 'react-redux'\r\nimport { IdleProvider } from 'provider/IdleProvider.js'\r\nimport FirstTimeLogin from 'components/Modals/FirstTimeLogin.js'\r\nimport ForgetPassword from 'components/Modals/ForgetPassword.js'\r\nimport ViewReportInDiffTab from 'views/ViewReportInDiffTab'\r\n\r\n// registerLicense('Ngo9BigBOggjHTQxAR8/V1NHaF5cXmVCf1FpRmJGdld5fUVHYVZUTXxaS00DNHVRdkdgWH5ecnRQRGVZVUZxV0o=')\r\n/* Things I will need for redux\r\n\r\n1. STORE --> Globalized State\r\n2. ACTION --> Describes whaat you wanna do\r\n3. REDUCER --> Modifies store based on action\r\n4. DISPATCH --> Sends action to reducer\r\n\r\n*/\r\n\r\nconst store = createStore(\r\n allReducers,\r\n compose(\r\n applyMiddleware(thunk)\r\n //window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()\r\n )\r\n)\r\n\r\nReactDOM.render(\r\n \r\n \r\n \r\n \r\n } />\r\n } />\r\n } />\r\n } />\r\n } />\r\n }\r\n />\r\n } />\r\n \r\n \r\n \r\n \r\n ,\r\n document.getElementById('root')\r\n)\r\n","export default __webpack_public_path__ + \"static/media/npa.0701383e.png\";","export default __webpack_public_path__ + \"static/media/npa.0701383e.png\";"],"sourceRoot":""}