-
Notifications
You must be signed in to change notification settings - Fork 0
/
component---src-pages-console-payment-transactions-index-js-c6550d81ccfd6fb32744.js.map
1 lines (1 loc) · 50.7 KB
/
component---src-pages-console-payment-transactions-index-js-c6550d81ccfd6fb32744.js.map
1
{"version":3,"file":"component---src-pages-console-payment-transactions-index-js-c6550d81ccfd6fb32744.js","mappings":"0iBACWA,G,OAAQ,qCACRC,EAAO,mCCqBH,SAASC,EAAYC,GAA6F,IAA5F,MAAEC,EAAK,SAAEC,EAAQ,UAAEC,EAAS,iBAAEC,EAAgB,gBAAEC,EAAe,aAAEC,KAAiBC,GAAOP,EAC7H,MAAM,EAACQ,EAAU,EAACC,IAAgBC,EAAAA,EAAAA,UAAS,MACrCC,GAAYC,EAAAA,EAAAA,QAAO,MAuDzB,OA3BAC,EAAAA,EAAAA,YAAU,KACwB,IAADC,EAAAC,EAAAC,EAAhC,GAA0B,OAAtBL,EAAUM,UAGRT,GAAWC,EAA8B,QAAlBK,EAACH,EAAUM,eAAO,IAAAH,GAAiB,QAAjBC,EAAjBD,EAAmBI,uBAAe,IAAAH,OAAjB,EAAjBA,EAAoCI,MAE7DlB,GAA0B,QAArBe,EAAIL,EAAUM,eAAO,IAAAD,GAAjBA,EAAmBE,kBAC/BP,EAAUM,QAAQC,gBAAgBjB,MAAQA,GAGvCE,GAAW,CAAC,IAADiB,EAAAC,EACd,MAAMC,EAA8B,QAApBF,EAAGT,EAAUM,eAAO,IAAAG,GAAiB,QAAjBC,EAAjBD,EAAmBF,uBAAe,IAAAG,OAAjB,EAAjBA,EAAoCE,KACvD,GAAID,EAAY,CACf,MAAME,EAAIC,SAASC,cAAc,SACjCF,EAAEG,aAAa,OAAQ,YACvBH,EAAEI,YAAczB,EAChBmB,EAAWO,YAAYL,EACxB,CACD,CAID,MAAO,KACNf,EAAa,KAAK,CAClB,GACC,CAACE,IAGHmB,EAAAA,cAAAA,EAAAA,SAAA,KACCA,EAAAA,cAAA,SAAAC,OAAAC,OAAA,CAAQC,IAAK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fA,EAAAA,cAAC2J,EAAAA,EAAW,MACV,KACA,MAAM5F,EAAsB6F,EAAAA,MAAAA,EAC5B,OAAO5J,EAAAA,cAAC+D,EAAmB,KAAG,IAKnC,CAEO,SAAS8F,IACf,OAAO7J,EAAAA,cAAC8J,EAAAA,EAAW,CAAC3L,MAAM,uBAAuB4L,YAAY,2DAC9D,C","sources":["webpack://kaagzi/./src/containers/CustomIframe/customIframe.module.css","webpack://kaagzi/./src/containers/CustomIframe/index.js","webpack://kaagzi/./src/components/Printables/Invoice/index.js","webpack://kaagzi/./src/components/PaymentTransactions/_components/Bill/index.js","webpack://kaagzi/./src/components/PaymentTransactions/paymentTransactions.module.css","webpack://kaagzi/./src/components/PaymentTransactions/index.js","webpack://kaagzi/./src/layouts/FullWidthRestrictedPage/fullWidthRestrictedPage.module.css","webpack://kaagzi/./src/layouts/FullWidthRestrictedPage/index.js","webpack://kaagzi/./src/pages/console/payment-transactions/index.js"],"sourcesContent":["// extracted by mini-css-extract-plugin\nexport var hiden = \"customIframe-module--hiden--31da3\";\nexport var ifrm = \"customIframe-module--ifrm--2fc35\";","import React, { useRef, useState, useEffect } from 'react';\nimport { createPortal } from 'react-dom';\nimport { createRoot } from 'react-dom/client';\nimport clsx from 'clsx';\n\nimport Button, { ButtonListContainer } from '@components/ui/Button';\n\nimport { ifrm, hiden } from './customIframe.module.css';\n\n// We do not rely on 'ref' property to get handle to iframe since in firefox it doesn't work\n// instead we use onLoad() handler to get the handle to iframe body\n// we may choose to combine both techniues\n// https://stackoverflow.com/questions/70158165/react-iframe-createportal-doesnt-work-in-firefox\n// https://github.com/facebook/react/issues/22847\n// Example implementation -- https://github.com/Automattic/woocommerce-payments/pull/4093/commits/ea2cfe6eda5bf5b72054ec6213961b93d4cd35ab\n/*--------------------------------------+\n\tUSING REFS to get iFrame handle\t\t|\n---------------------------------------*/\n/*--------------------------+\n\tUSING createPortal()\t|\n---------------------------*/\n//https://blog.logrocket.com/best-practices-react-iframes/\n//https://github.com/ryanseddon/react-frame-component\nexport default function CustomIframe({ title, children, cssString, isHiddenOnScreen, showPrintButton, printBtnText, ...props }) {\n\tconst [mountNode, setMountNode] = useState(null);\n\tconst iframeRef = useRef(null);\n\n\tconst printIframe = () => {\n\t\tiframeRef.current && iframeRef.current?.contentWindow.print();\n\t};\n\n\tconst doOnIframeLoad = (e) => {\n\t\t//we use onLoad to get handle to iframe body, since in firefox relying on ref to get the handle fails\n\t\tconst iframeElm = e.target;\n\t\tif (!iframeElm?.contentDocument) return;\n\t\tsetMountNode(iframeElm?.contentDocument.body);\n\n\t\t//iFrame title\n\t\tif (title && iframeElm.contentDocument) {\n\t\t\tiframeElm.contentDocument.title = title;\n\t\t}\n\t\t//inject custom css\n\t\tif (cssString) {\n\t\t\tconst iframeHead = iframeElm.contentDocument?.head;\n\t\t\tif (iframeHead) {\n\t\t\t\tconst s = document.createElement('STYLE');\n\t\t\t\ts.setAttribute('type', 'text/css');\n\t\t\t\ts.textContent = cssString; //'body{background:#f00}';\n\t\t\t\tiframeHead.appendChild(s);\n\t\t\t}\n\t\t}\n\t};\n\n\tuseEffect(() => {\n\t\tif (iframeRef.current !== null) {\n\t\t\t// var mountNode = iframeRef?.current?.contentWindow?.document?.body;\n\t\t\t// setMountNode(iframeRef?.current?.contentWindow?.document?.body);\n\t\t\tif (!mountNode) setMountNode(iframeRef.current?.contentDocument?.body); //same as above\n\t\t\t//iFrame title\n\t\t\tif (title && iframeRef.current?.contentDocument) {\n\t\t\t\tiframeRef.current.contentDocument.title = title;\n\t\t\t}\n\t\t\t//inject custom css\n\t\t\tif (cssString) {\n\t\t\t\tconst iframeHead = iframeRef.current?.contentDocument?.head;\n\t\t\t\tif (iframeHead) {\n\t\t\t\t\tconst s = document.createElement('STYLE');\n\t\t\t\t\ts.setAttribute('type', 'text/css');\n\t\t\t\t\ts.textContent = cssString; //'body{background:#f00}';\n\t\t\t\t\tiframeHead.appendChild(s);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//cleanup\n\t\treturn () => {\n\t\t\tsetMountNode(null);\n\t\t};\n\t}, [iframeRef]);\n\n\treturn (\n\t\t<>\n\t\t\t<iframe ref={iframeRef} onLoad={doOnIframeLoad} className={clsx(ifrm, isHiddenOnScreen && hiden)} {...props}>\n\t\t\t\t{mountNode && createPortal(children, mountNode)}\n\t\t\t</iframe>\n\t\t\t{(showPrintButton || isHiddenOnScreen) && (\n\t\t\t\t<ButtonListContainer>\n\t\t\t\t\t<Button variant=\"primary\" onClick={printIframe} icon=\"printer\" isIconOnRight={false}>\n\t\t\t\t\t\t{printBtnText || 'Print'}\n\t\t\t\t\t</Button>\n\t\t\t\t</ButtonListContainer>\n\t\t\t)}\n\t\t</>\n\t);\n} //*/\n\n/*----------------------+\n\tUSING createRoot()\t|\n-----------------------*/\n/*export default function CustomIframe({ title, children, cssString, isHiddenOnScreen, showPrintButton, printBtnText, ...props }) {\n\t// const iframeRef = (iframeNode) => {\n\t// \tconst cntnr = document.createElement('DIV');\n\t// \t// cntnr.textContent = 'Hello world';\n\t// \tiframeNode.contentDocument.body.appendChild(cntnr);\n\t// \t// createRoot(cntnr).render(children);\n\t// };\n\tconst iframeRef = useRef(null);\n\n\tconst printIframe = () => {\n\t\tiframeRef.current && iframeRef.current?.contentWindow.print();\n\t};\n\n\tuseEffect(() => {\n\t\tif (iframeRef.current !== null) {\n\t\t\t// var mountNode = iframeRef?.current?.contentWindow?.document?.body;\n\t\t\t// setMountNode(iframeRef?.current?.contentWindow?.document?.body);\n\t\t\t// if (!mountNode) setMountNode(iframeRef?.current?.contentDocument?.body); //same as above\n\t\t\tconst cntnr = iframeRef.current?.contentDocument?.createElement('DIV'); //we create a container since createRoot() warns if we use 'body' as the root citing it may be shared by outside code\n\t\t\t// cntnr.textContent = 'Hello world';\n\t\t\t// console.log('appending to iframe body');\n\n\t\t\tiframeRef.current?.contentDocument?.body.appendChild(cntnr); //this is failing in firefox and requires a re-render pass for it to work\n\t\t\tcreateRoot(cntnr).render(children);\n\n\t\t\t//iFrame title\n\t\t\tif (title && iframeRef.current?.contentDocument) {\n\t\t\t\tiframeRef.current.contentDocument.title = title;\n\t\t\t}\n\t\t\t//inject custom css\n\t\t\tif (cssString) {\n\t\t\t\tconst iframeHead = iframeRef.current?.contentDocument?.head;\n\t\t\t\tif (iframeHead) {\n\t\t\t\t\tvar s = document.createElement('STYLE');\n\t\t\t\t\ts.setAttribute('type', 'text/css');\n\t\t\t\t\ts.textContent = cssString; //'body{background:#f00}';\n\t\t\t\t\tiframeHead.appendChild(s);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//cleanup\n\t\t// return () => {\n\t\t// \tiframeRef?.current = null;\n\t\t// };\n\t}, [iframeRef]);\n\n\treturn (\n\t\t<>\n\t\t\t<iframe ref={iframeRef} className={clsx(ifrm, isHiddenOnScreen && hiden)} {...props} />\n\t\t\t{(showPrintButton || isHiddenOnScreen) && (\n\t\t\t\t<ButtonListContainer>\n\t\t\t\t\t<Button variant=\"primary\" size=\"small\" onClick={printIframe} icon=\"printer\" isIconOnRight={false}>\n\t\t\t\t\t\t{printBtnText || 'Print'}\n\t\t\t\t\t</Button>\n\t\t\t\t</ButtonListContainer>\n\t\t\t)}\n\t\t</>\n\t);\n}//*/\n","import React from 'react';\n\nimport { calcCostSplitComponents } from '@utils';\nimport CustomIframe from '@containers/CustomIframe';\nimport { getLetterFormatedDate } from '@utils';\n\nconst formCssStyleString =\n\t'body,ul{margin:0;padding:0}body,h2,ul{padding:0}body{font-family:system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif;font-weight:400;font-size:11pt;line-height:14pt}.wtrmrk{content:\"\";position:fixed;left:50%;top:50%;width:10cm;height:10cm;transform:translate(-5cm,-5cm);opacity:.2;z-index:-1}ul{list-style-type:none}@media screen{.page{padding:2rem;color:#000}.ftr{margin-top:24px}}@media print{.page{color:#000;box-sizing:border-box;margin:0 1cm}.ftr{position:fixed;bottom:0;left:0;right:0}}.hdr{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}.hdrDtls{text-align:right}.ftr,table{text-align:center}h1{margin-top:0;font-size:20pt}h2{margin:24pt 0 6pt;font-size:14pt}.ftr,th{font-size:10pt}.data[data-title]:before{content:attr(data-title) \": \";display:inline-block;margin-right:.25cm;font-weight:700;font-size:9pt;white-space:nowrap}.data[data-title]:empty:after{content:\"NA\";font-size:9pt;visibility:hidden}.ftr>div{font-weight:700}table{margin-top:24pt;border-collapse:collapse;width:100%}td:not(:last-child),th:not(:last-child){border-right:.5pt solid}thead{background:#000;color:#fff}tbody>tr:first-of-type{border-bottom:.5pt solid;height:50pt}td:last-of-type,th:last-of-type{text-align:right;padding-right:8pt}td:first-of-type{border-left:.5pt solid}td:last-of-type{border-right:.5pt solid #000;border-top:.5pt solid}tfoot td{border-bottom:.5pt solid #000}td.grandTotal{background:#094;color:#fff;height:20pt}';\n\n/**\n * React component\n * @param {Object} prop - Prop object passed to this component\n * @param {Number|String} prop.invoiceId - Invoice ID\n * @param {Number} prop.invoiceAmt - Invoice Amount\n * @param {Date|Number} prop.paymentTimestamp - Payment Date object or UNIX epoch timestamp\n * @param {String} prop.userId - User ID\n * @param {String} prop.name - User name\n * @param {String} prop.email - User email\n * @param {?Number} [prop.phone] - User phone\n */\nexport default function PrintableInvoice({ invoiceId, invoiceAmt, paymentTimestamp, userId, name, email, phone }) {\n\tconst { basePrice, gst, paymentGatewayFee } = calcCostSplitComponents(invoiceAmt || 0);\n\treturn (\n\t\t<CustomIframe\n\t\t\ttitle={name.replace(' ', '') + '_kaagzi_' + invoiceId}\n\t\t\tshowPrintButton={true}\n\t\t\tisHiddenOnScreen={true}\n\t\t\tprintBtnText=\"Print Invoice\"\n\t\t\tcssString={formCssStyleString}\n\t\t>\n\t\t\t<main className=\"page\">\n\t\t\t\t{/* <img className=\"wtrmrk\" src=\"https://lunaticcapital.io/img/icons/icons-vector.svg\" /> */}\n\t\t\t\t<div className=\"hdr\">\n\t\t\t\t\t<div>\n\t\t\t\t\t\t{/* <img className=\"logo\" src=\"https://lunaticcapital.io/img/logo-light.svg\" /> */}\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t<b>Kaagzi</b>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"data\" data-title=\"Phone\">\n\t\t\t\t\t\t\t+91 9920066694\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"data\" data-title=\"Email\">\n\t\t\t\t\t\t\[email protected]\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"data\" data-title=\"GST\">\n\t\t\t\t\t\t\t354134719hdjgadg3135\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"hdrDtls\">\n\t\t\t\t\t\t<h1>TAX INVOICE</h1>\n\t\t\t\t\t\t<div className=\"data\" data-title=\"ID\">\n\t\t\t\t\t\t\t{invoiceId}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"data\" data-title=\"Purchased on\">\n\t\t\t\t\t\t\t{getLetterFormatedDate(paymentTimestamp, false, true, true)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"data\" data-title=\"Printed On\">\n\t\t\t\t\t\t\t{getLetterFormatedDate(Math.floor(Date.now() / 1000), false, true, true)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<h2>Billed To</h2>\n\t\t\t\t<div className=\"to\">\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<b>{name}</b>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"data\" data-title=\"Kaagzi ID\">\n\t\t\t\t\t\t{userId}\n\t\t\t\t\t</div>\n\t\t\t\t\t{phone && (\n\t\t\t\t\t\t<div className=\"data\" data-title=\"Phone\">\n\t\t\t\t\t\t\t{'+91 ' + phone}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t\t<div className=\"data\" data-title=\"Email\">\n\t\t\t\t\t\t{email}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<table>\n\t\t\t\t\t<thead>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th>Product</th>\n\t\t\t\t\t\t\t<th>Plan</th>\n\t\t\t\t\t\t\t<th>Active From</th>\n\t\t\t\t\t\t\t<th>Active Till</th>\n\t\t\t\t\t\t\t<th>Line Total</th>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</thead>\n\t\t\t\t\t<tbody>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Kaagzi</td>\n\t\t\t\t\t\t\t<td>1 month</td>\n\t\t\t\t\t\t\t<td>25 Sep 2023</td>\n\t\t\t\t\t\t\t<td>24 Oct 2023</td>\n\t\t\t\t\t\t\t<td>{basePrice.toLocaleString('en-IN', { style: 'currency', currency: 'INR' })}</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody>\n\t\t\t\t\t<tfoot>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th colSpan=\"4\">Sub Total</th>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<b>{basePrice.toLocaleString('en-IN', { style: 'currency', currency: 'INR' })}</b>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th colSpan=\"4\"> </th>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th colSpan=\"4\">GST @ 18%</th>\n\t\t\t\t\t\t\t<td>{gst.toLocaleString('en-IN', { style: 'currency', currency: 'INR' })}</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th colSpan=\"4\">Total</th>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<b>{(basePrice + gst).toLocaleString('en-IN', { style: 'currency', currency: 'INR' })}</b>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th colSpan=\"4\"> </th>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th colSpan=\"4\">Payment facilitator fee @ 2% of grand-total</th>\n\t\t\t\t\t\t\t<td>{paymentGatewayFee.toLocaleString('en-IN', { style: 'currency', currency: 'INR' })}</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th colSpan=\"4\">Grand Total</th>\n\t\t\t\t\t\t\t<td className=\"grandTotal\">\n\t\t\t\t\t\t\t\t<b>{invoiceAmt.toLocaleString('en-IN', { style: 'currency', currency: 'INR' })}</b>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tfoot>\n\t\t\t\t</table>\n\n\t\t\t\t<div className=\"ftr\">\n\t\t\t\t\t<div>kaagzi.in</div>\n\t\t\t\t\tA/001, Milap, Navagaon, Dahisar West, Mumbai - 68, Maharashtra, India\n\t\t\t\t</div>\n\t\t\t</main>\n\t\t</CustomIframe>\n\t);\n}\n","import React, { useContext } from 'react';\n\nimport { UserContext } from '@providers/User';\nimport CostSplitDetails from '@components/CostSplitDetails';\nimport PrintableInvoice from '@components/Printables/Invoice';\n\n/**\n * React component to display Bill details for payment transaction order.\n * This shall be shown in a bottom-sheet when user clicks on any payment transaction order to view bill\n * @param {Object} prop - prop object passed to this component\n * @param {Number|String} prop.billId - Bill number\n * @param {Number} prop.amount - Bill amount\n * @param {Number|Date} prop.billPayTimestamp - Bill pay timestamp. Unix epoch or Date\n */\nexport default function Bill({ billId, amount, billPayTimestamp }) {\n\tconst { id, name, email, phone } = useContext(UserContext);\n\treturn (\n\t\t<>\n\t\t\t<CostSplitDetails amt={amount} amtIncludesTaxNFees={true} />\n\t\t\t<PrintableInvoice invoiceId={billId} invoiceAmt={amount} paymentTimestamp={billPayTimestamp} userId={id} name={name} email={email} phone={phone} />\n\t\t</>\n\t);\n}\n","// extracted by mini-css-extract-plugin\nexport var active = \"paymentTransactions-module--active--b2687\";\nexport var amt = \"paymentTransactions-module--amt--96a99\";\nexport var ctaC = \"paymentTransactions-module--ctaC--be7d5\";\nexport var dt = \"paymentTransactions-module--dt--db973\";\nexport var expired = \"paymentTransactions-module--expired--82a6f\";\nexport var id = \"paymentTransactions-module--id--32565\";\nexport var paid = \"paymentTransactions-module--paid--89f97\";\nexport var pt = \"paymentTransactions-module--pt--09569\";\nexport var ptCacheInfo = \"paymentTransactions-module--ptCacheInfo--b9f92\";\nexport var sts = \"paymentTransactions-module--sts--3501b\";","import React, { useContext, useEffect, useState } from 'react';\nimport clsx from 'clsx';\nimport { PersistentOfflineCacheContext } from '@providers/OfflineCache';\nimport { NetworkCheckContext } from '@providers/NetworkAvailabilityCheck';\n// import { ToastNotifierContext } from '@components/ToastNotifier';\nimport { ToastNotificationContext } from '@providers/ToastNotification';\nimport { DynamoDbContext } from '@providers/aws/DynamoDB';\nimport { UserContext } from '@providers/User';\nimport { getLetterFormatedDate } from '@utils';\nimport Button, { ButtonListContainer } from '@components/ui/Button';\nimport BottomSheet from '@containers/BottomSheet';\nimport Bill from './_components/Bill/index';\nimport Loading from '@components/ui/Loading';\n\nimport * as styles from './paymentTransactions.module.css';\n\nexport default function PaymentTransactions() {\n\tconst { id } = useContext(UserContext);\n\tif (!id) return null; //since user needs to be logged-in to view\n\n\tconst [isWip, setIsWip] = useState(true); //we start with loading spinner running\n\t// const [isLoadMoreWip, setIsLoadMoreWip] = useState(false);\n\n\tconst [isFromOfflineCache, setIsFromOfflineCache] = useState(false); //flag to know if data is from cache\n\tconst [paymentTransactions, setPaymentTransactions] = useState([]);\n\tconst [lastEvalKey, setLastEvalKey] = useState(null); //usefull for pagination seed start | We store the 'LastEvaluatedKey' value from QueryCommand op here\n\t//more info -- https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_Query.html\n\t// lim : 10\n\tconst [cacheTimestamp, setCacheTimestamp] = useState(null); //timestamp when we cache data. Usefull to show user when the data was last fetched from backend\n\tconst [selected, setSelected] = useState(null); //we shall assign selected item obj to this\n\n\tconst isOnline = useContext(NetworkCheckContext);\n\tconst {\n\t\tgetCachedPaymentOrders,\n\t\tgetCachedPaymentOrdersMetaData,\n\t\tsetCachedPaymentOrders,\n\t\tsetCachedPaymentOrdersMetaData,\n\t\tdeleteCachedPaymentOrders,\n\t\tdeleteCachedPaymentOrdersMetaData,\n\t} = useContext(PersistentOfflineCacheContext);\n\tconst { notify } = useContext(ToastNotificationContext);\n\tconst { dbQueryData } = useContext(DynamoDbContext);\n\n\tconst _reset = async () => {\n\t\tsetIsFromOfflineCache(false);\n\t\tsetPaymentTransactions([]);\n\t\tsetLastEvalKey(null);\n\t\tsetCacheTimestamp(null);\n\t\tsetSelected(null);\n\t\ttry {\n\t\t\tawait deleteCachedPaymentOrders(id);\n\t\t\tawait deleteCachedPaymentOrdersMetaData(id, null);\n\t\t\treturn true;\n\t\t} catch (err) {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\t// /**\n\t// * Fetches payment transaction orders from backend DB.\n\t// * If 'lastEvalKey' is set in state from previous run of this fn, the current run shall fetch more items and append to those stored in state and localstorage\n\t// * @returns {Promise<?[]>} Transactions data\n\t// */\n\t/* const fetchTransactionsDataFromDB = async () => {\n\t\ttry {\n\t\t\tif (!isOnline) throw new Error('Network unavailable');\n\t\t\tif (!id) throw new Error('No logged-in user');\n\t\t\tsetIsWip(true);\n\t\t\t//fetch from backend database here\n\t\t\tlet queryParams = {\n\t\t\t\t//https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/dynamodb/command/GetItemCommand/\n\t\t\t\tTableName: 'KaagziPaymentOrders',\n\t\t\t\tKeyConditionExpression: '#userAtrName = :userAtrVal',\n\t\t\t\tExpressionAttributeNames: {\n\t\t\t\t\t'#userAtrName': 'u',\n\t\t\t\t},\n\t\t\t\tExpressionAttributeValues: {\n\t\t\t\t\t':userAtrVal': id,\n\t\t\t\t},\n\t\t\t\tScanIndexForward: false, //lists in descending order / latest first\n\t\t\t\t//ExclusiveStartKey: value of LastEvaluatedKey from previous query run,\n\t\t\t\t//https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Query.Pagination.html\n\t\t\t\tLimit: 5,\n\t\t\t};\n\t\t\tif (lastEvalKey) {\n\t\t\t\tqueryParams.ExclusiveStartKey = lastEvalKey;\n\t\t\t}\n\t\t\tconst transactionsData = await dbQueryData(queryParams);\n\t\t\t// transactionsData = {\n\t\t\t// \t\"$metadata\": {\n\t\t\t// \t\t\"httpStatusCode\": 200,\n\t\t\t// \t\t\"requestId\": \"90O7V5MR7E7Q5GIAR6EODVIIL3VV4KQNSO5AEMVJF66Q9ASUAAJG\",\n\t\t\t// \t\t\"attempts\": 1,\n\t\t\t// \t\t\"totalRetryDelay\": 0\n\t\t\t// \t},\n\t\t\t//\t\"ConsumedCapacity\": undefined,\n\t\t\t// \t\"Count\": 2,\n\t\t\t// \t\"Items\": [\n\t\t\t// \t\t{\n\t\t\t// \t\t\t\"u\": \"ap-south-1:f26574c5-fe44-45cc-9f0f-37681caffe99\",\n\t\t\t// \t\t\t\"o\": 1679392640,\t\t//\"aa2e73eb-c373-48c5-951c-1b0f3ef6d9ab\",\n\t\t\t// \t\t\t\"t\": 1679392661,\n\t\t\t// \t\t\t\"x\": 1689670394,\n\t\t\t// \t\t\t\"s\": 3,\n\t\t\t// \t\t\t\"a\": 58\n\t\t\t// \t\t},\n\t\t\t// \t\t{\n\t\t\t// \t\t\t\"u\": \"ap-south-1:f26574c5-fe44-45cc-9f0f-37681caffe99\",\n\t\t\t// \t\t\t\"o\": 1682672360,\n\t\t\t// \t\t\t\"t\": 1682672385,\n\t\t\t// \t\t\t\"x\": 1692262394,\n\t\t\t// \t\t\t\"s\": 3,\n\t\t\t// \t\t\t\"a\": 530\n\t\t\t// \t\t}\n\t\t\t// \t],\n\t\t\t// \t\"ScannedCount\": 2,\n\t\t\t//\t\"LastEvaluatedKey\": {\t//undefined\n\t\t\t//\t\t\"u\": \"ap-south-1:f26574c5-fe44-45cc-9f0f-37681caffe99\",\n\t\t\t//\t\t\"o\": 1682672360\n\t\t\t//\t}\n\t\t\t// }\n\t\t\tif (\n\t\t\t\t!transactionsData ||\n\t\t\t\ttypeof transactionsData !== 'object' ||\n\t\t\t\ttransactionsData.Items == undefined ||\n\t\t\t\t!Object.prototype.hasOwnProperty.call(transactionsData, 'Items') ||\n\t\t\t\ttransactionsData.Count < 1\n\t\t\t) {\n\t\t\t\tnotify(lastEvalKey ? 'No more older transactions' : 'No transactions present'); //if this is run whiletrying to see if we have any more records (pagination), but found no more records\n\t\t\t\tsetLastEvalKey(null);\n\t\t\t\treturn null; //throw new Error('Payment transactions data unavailable for user');\n\t\t\t}\n\n\t\t\t// if (!Object.keys(transactionsData?.Items).length) throw new Error('Transactions data unavailable for user');\n\t\t\tif (lastEvalKey != null) {\n\t\t\t\t// we extend items list array previously fetched\n\t\t\t\tsetPaymentTransactions([...paymentTransactions, ...transactionsData.Items]); ////https://stackoverflow.com/questions/1374126/how-to-extend-an-existing-javascript-array-with-another-array-without-creating\n\t\t\t} else {\n\t\t\t\tsetPaymentTransactions(transactionsData.Items);\n\t\t\t\tsetIsFromOfflineCache(false); //since this is a new fresh fetch, we set it as if no probable stale data from cache was loaded\n\t\t\t}\n\n\t\t\t//here also write to persistent cache IndexedDB\n\t\t\tconst cacheOrderDataAry = transactionsData.Items.map(({ o, t, s, a }) => ({ o, t, s, a })); //we only store the orderId, orderTime, status and amount\n\t\t\t// await write(id + '_orders', 'o', null, cacheOrderDataAry);\n\t\t\tawait setCachedPaymentOrders(id, cacheOrderDataAry).catch((err) => {\n\t\t\t\tconsole.error(err);\n\t\t\t});\n\n\t\t\tconst cacheTs = Date.now(); //note that it is timestamp in miliseconds\n\t\t\tsetCacheTimestamp(cacheTs);\n\t\t\tawait setCachedPaymentOrdersMetaData(id, 't', cacheTs).catch((err) => {\n\t\t\t\tconsole.error(err);\n\t\t\t});\n\n\t\t\tif (transactionsData.LastEvaluatedKey) {\n\t\t\t\t//this means we may have more records yet to be fetched\n\t\t\t\tsetLastEvalKey(transactionsData.LastEvaluatedKey); // we store in state for accessing during next request\n\t\t\t\t//we also store this in localstorage / persistent indexedDb\n\t\t\t\tawait setCachedPaymentOrdersMetaData(id, 'ddbLastEvalKey', transactionsData.LastEvaluatedKey).catch((err) => {\n\t\t\t\t\tconsole.error(err);\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tsetLastEvalKey(null);\n\t\t\t\t// await deleteItem(id + '_orders_meta', 'ddbLastEvalKey');\n\t\t\t\tawait deleteCachedPaymentOrdersMetaData(id, 'ddbLastEvalKey').catch((err) => {\n\t\t\t\t\tconsole.error(err);\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn transactionsData.Items;\n\t\t} catch (err) {\n\t\t\t// notify(err.message || err.name || err.code || 'Error fetching transaction records', 'err');\n\t\t\tnotify(err.message || 'Error fetching transaction records', 'err');\n\t\t\treturn null;\n\t\t} finally {\n\t\t\tisWip && setIsWip(false);\n\t\t}\n\t}; */\n\n\t/**\n\t * Fetches payment transaction orders from backend DB. We fetch 5 items at a time\n\t * @param {?Object} [lastEvalKeyForPaginationFromPrevRun] - Last evaluated key for pagination seed used in DynamoDb query\n\t * @returns {Promise<?[]>} Transactions data\n\t */\n\tconst fetchTransactionsDataFromDB = async (lastEvalKeyForPaginationFromPrevRun) => {\n\t\ttry {\n\t\t\tif (!isOnline) throw new Error('Network unavailable');\n\t\t\tif (!id) throw new Error('No logged-in user');\n\t\t\tsetIsWip(true);\n\t\t\t//fetch from backend database here\n\t\t\tlet queryParams = {\n\t\t\t\t//https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/dynamodb/command/GetItemCommand/\n\t\t\t\tTableName: 'KaagziPaymentOrders',\n\t\t\t\tKeyConditionExpression: '#userAtrName = :userAtrVal',\n\t\t\t\tExpressionAttributeNames: {\n\t\t\t\t\t'#userAtrName': 'u',\n\t\t\t\t},\n\t\t\t\tExpressionAttributeValues: {\n\t\t\t\t\t':userAtrVal': id,\n\t\t\t\t},\n\t\t\t\tScanIndexForward: false, //lists in descending order / latest first\n\t\t\t\t//ExclusiveStartKey: value of LastEvaluatedKey from previous query run,\n\t\t\t\t//https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Query.Pagination.html\n\t\t\t\tLimit: 5,\n\t\t\t};\n\t\t\tif (lastEvalKeyForPaginationFromPrevRun) {\n\t\t\t\tqueryParams.ExclusiveStartKey = lastEvalKeyForPaginationFromPrevRun;\n\t\t\t}\n\t\t\tconst transactionsData = await dbQueryData(queryParams);\n\t\t\t// transactionsData = {\n\t\t\t// \t\"$metadata\": {\n\t\t\t// \t\t\"httpStatusCode\": 200,\n\t\t\t// \t\t\"requestId\": \"90O7V5MR7E7Q5GIAR6EODVIIL3VV4KQNSO5AEMVJF66Q9ASUAAJG\",\n\t\t\t// \t\t\"attempts\": 1,\n\t\t\t// \t\t\"totalRetryDelay\": 0\n\t\t\t// \t},\n\t\t\t//\t\"ConsumedCapacity\": undefined,\n\t\t\t// \t\"Count\": 2,\n\t\t\t// \t\"Items\": [\n\t\t\t// \t\t{\n\t\t\t// \t\t\t\"u\": \"ap-south-1:f26574c5-fe44-45cc-9f0f-37681caffe99\",\n\t\t\t// \t\t\t\"o\": 1679392640,\t\t//\"aa2e73eb-c373-48c5-951c-1b0f3ef6d9ab\",\t//for this we prefer UUID\n\t\t\t// \t\t\t\"t\": 1679392661,\n\t\t\t// \t\t\t\"x\": 1689670394,\n\t\t\t// \t\t\t\"s\": 3,\n\t\t\t// \t\t\t\"a\": 58\n\t\t\t// \t\t},\n\t\t\t// \t\t{\n\t\t\t// \t\t\t\"u\": \"ap-south-1:f26574c5-fe44-45cc-9f0f-37681caffe99\",\n\t\t\t// \t\t\t\"o\": 1682672360,\n\t\t\t// \t\t\t\"t\": 1682672385,\n\t\t\t// \t\t\t\"x\": 1692262394,\n\t\t\t// \t\t\t\"s\": 3,\n\t\t\t// \t\t\t\"a\": 530\n\t\t\t// \t\t}\n\t\t\t// \t],\n\t\t\t// \t\"ScannedCount\": 2,\n\t\t\t//\t\"LastEvaluatedKey\": {\t//undefined\n\t\t\t//\t\t\"u\": \"ap-south-1:f26574c5-fe44-45cc-9f0f-37681caffe99\",\n\t\t\t//\t\t\"o\": 1682672360\n\t\t\t//\t}\n\t\t\t// }\n\t\t\tif (\n\t\t\t\t!transactionsData ||\n\t\t\t\ttypeof transactionsData !== 'object' ||\n\t\t\t\ttransactionsData.Items == undefined ||\n\t\t\t\t!Object.prototype.hasOwnProperty.call(transactionsData, 'Items') ||\n\t\t\t\ttransactionsData.Count < 1\n\t\t\t)\n\t\t\t\tthrow new Error('No order recods found');\n\t\t\treturn transactionsData;\n\t\t} catch (err) {\n\t\t\tsetIsWip(false);\n\t\t\tnotify(err.message || 'Error fetching transaction records', 'err');\n\t\t\treturn null;\n\t\t} finally {\n\t\t\tsetIsWip(false);\n\t\t}\n\t};\n\n\t/**\n\t * Fetches payment transaction orders from backend DB and updates state and IndexedDb cache.\n\t * @param {?Object} [lastEvalKeyForPaginationFromPrevRun] - Last evaluated key for pagination seed used in DynamoDb query\n\t * @returns {Promise<?[]>} Transactions data\n\t */\n\tconst fetchTransactionsDataFromDbAndUpdateStateNCache = async (lastEvalKeyForPaginationFromPrevRun) => {\n\t\ttry {\n\t\t\tconst transactionsData = await fetchTransactionsDataFromDB(lastEvalKeyForPaginationFromPrevRun);\n\n\t\t\tif (!transactionsData) {\n\t\t\t\tnotify(lastEvalKeyForPaginationFromPrevRun ? 'No more older transactions' : 'No transactions present'); //if this is run while trying to see if we have any more records (pagination), but found no more records\n\t\t\t\tsetLastEvalKey(null);\n\t\t\t\treturn null; //throw new Error('Payment transactions data unavailable for user');\n\t\t\t}\n\n\t\t\t// if (!Object.keys(transactionsData?.Items).length) throw new Error('Transactions data unavailable for user');\n\t\t\tif (lastEvalKeyForPaginationFromPrevRun != null) {\n\t\t\t\t// we extend items list array previously fetched\n\t\t\t\tsetPaymentTransactions([...paymentTransactions, ...transactionsData.Items]); ////https://stackoverflow.com/questions/1374126/how-to-extend-an-existing-javascript-array-with-another-array-without-creating\n\t\t\t} else {\n\t\t\t\tawait _reset(); //since this isn't a paginated run, but rather a fresh run, we reset all state and clear all cache\n\t\t\t\tsetPaymentTransactions(transactionsData.Items);\n\t\t\t\tsetIsFromOfflineCache(false); //since this is a new fresh fetch, we set it as if no probable stale data from cache was loaded\n\t\t\t}\n\n\t\t\t//here also write to persistent cache IndexedDB\n\t\t\tconst cacheOrderDataAry = transactionsData.Items.map(({ o, t, s, a }) => ({ o, t, s, a })); //we only store the orderId, orderTime, status and amount\n\t\t\t// await write(id + '_orders', 'o', null, cacheOrderDataAry);\n\t\t\tawait setCachedPaymentOrders(id, cacheOrderDataAry).catch((err) => {\n\t\t\t\tconsole.error(err);\n\t\t\t});\n\n\t\t\tconst cacheTs = Date.now(); //note that it is timestamp in miliseconds\n\t\t\tsetCacheTimestamp(cacheTs);\n\t\t\tawait setCachedPaymentOrdersMetaData(id, 't', cacheTs).catch((err) => {\n\t\t\t\tconsole.error(err);\n\t\t\t});\n\n\t\t\tif (transactionsData.LastEvaluatedKey) {\n\t\t\t\t//this means we may have more records yet to be fetched\n\t\t\t\tsetLastEvalKey(transactionsData.LastEvaluatedKey); // we store in state for accessing during next request\n\t\t\t\t//we also store this in localstorage / persistent indexedDb\n\t\t\t\tawait setCachedPaymentOrdersMetaData(id, 'ddbLastEvalKey', transactionsData.LastEvaluatedKey).catch((err) => {\n\t\t\t\t\tconsole.error(err);\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tsetLastEvalKey(null);\n\t\t\t\t// await deleteItem(id + '_orders_meta', 'ddbLastEvalKey');\n\t\t\t\tawait deleteCachedPaymentOrdersMetaData(id, 'ddbLastEvalKey').catch((err) => {\n\t\t\t\t\tconsole.error(err);\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn transactionsData.Items;\n\t\t} catch (err) {\n\t\t\t// notify(err.message || err.name || err.code || 'Error fetching transaction records', 'err');\n\t\t\tnotify(err.message || 'Error fetching transaction records', 'err');\n\t\t\treturn null;\n\t\t}\n\t};\n\n\t/**\n\t * Loads more orders (Pagination)\n\t */\n\tconst doLoadMore = () => {\n\t\tlastEvalKey && fetchTransactionsDataFromDbAndUpdateStateNCache(lastEvalKey);\n\t};\n\n\t// /**\n\t// * Resets state and clears any data cached in IndexedDb before newly fetching from backend DB\n\t// * @returns {Promise<Boolean>}\n\t// */\n\t/* const refresh = async () => {\n\t\ttry {\n\t\t\t//here check network\n\t\t\tif (!isOnline) {\n\t\t\t\tnotify('Please check your network connection!', 'warn');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t//since that we r rseting the state before knowing whether we would be able to fetch data from backend, before proceeding, here we may check if creds are still valid, if not maybe invalidate/delete those\n\t\t\tsetIsWip(true);\n\t\t\t//here clear all states\n\t\t\t//here clear cache\n\t\t\tawait _reset();\n\t\t\t//here fetch from backend\n\t\t\tconst transactionsData = await fetchTransactionsDataFromDB();\n\t\t\tif (!transactionsData) return false;\n\t\t\tnotify('Orders refreshed!');\n\t\t\tsetIsWip(false);\n\t\t\treturn true;\n\t\t} catch (err) {\n\t\t\treturn false;\n\t\t} finally {\n\t\t\tsetIsWip(false);\n\t\t}\n\t}; */\n\n\t/**\n\t * Resets state and clears any data cached in IndexedDb before newly fetching from backend DB\n\t * @returns {Promise<Boolean>}\n\t */\n\tconst refresh = async () => {\n\t\ttry {\n\t\t\tsetIsWip(true);\n\t\t\tconst transactionsData = await fetchTransactionsDataFromDbAndUpdateStateNCache();\n\t\t\tif (!transactionsData) throw new Error('Error refreshing orders');\n\t\t\tnotify('Orders refreshed!');\n\t\t\tsetIsWip(false);\n\t\t\treturn true;\n\t\t} catch (err) {\n\t\t\tsetIsWip(false);\n\t\t\t// notify(err.message, 'err');\n\t\t\treturn false;\n\t\t} finally {\n\t\t\tsetIsWip(false);\n\t\t}\n\t};\n\n\t/**\n\t * Reads data stored / cached in IndexedDB and loads it into state\n\t * @returns {Promise<Boolean>} TRUE if data was successfully read from indexedDb, FALSE otherwise\n\t */\n\tconst loadTransactionsDataFromOfflineCache = async () => {\n\t\ttry {\n\t\t\tsetIsWip(true);\n\t\t\tconst cachedOrdersData = await getCachedPaymentOrders(id); //await read(id + '_orders', 'o', null);\n\t\t\tif (!Array.isArray(cachedOrdersData) || cachedOrdersData.length < 1) throw new Error();\n\t\t\t//the orders seem to be sorted serially. Make sure to either fech sorted in reverse or maybe sort in reverse manually\n\t\t\tcachedOrdersData.sort((a, b) => b.o - a.o); //we reverse the order by comparing the 'orderId'\n\t\t\t//https://www.javascripttutorial.net/array/javascript-sort-an-array-of-objects/\n\n\t\t\tconst cachedDynamoDbLastEvalKey = await getCachedPaymentOrdersMetaData(id, 'ddbLastEvalKey'); //await read(id + '_orders_meta', null, 'dynamoDbLastEvalKey');\n\t\t\tconst cachedTimestamp = await getCachedPaymentOrdersMetaData(id, 't');\n\t\t\tsetPaymentTransactions(cachedOrdersData); //setInvestments(cachedData.investments);\n\t\t\tcachedDynamoDbLastEvalKey && setLastEvalKey(cachedDynamoDbLastEvalKey);\n\t\t\tcachedTimestamp && setCacheTimestamp(cachedTimestamp);\n\t\t\tsetIsFromOfflineCache(true);\n\t\t\t// setIsWip(false);\n\t\t\treturn true;\n\t\t} catch (err) {\n\t\t\treturn false;\n\t\t} finally {\n\t\t\tsetIsWip(false);\n\t\t}\n\t};\n\n\tuseEffect(() => {\n\t\tpaymentTransactions.length < 1 && //if payment transactions haven't been loaded in state yet\n\t\t\t(async () => {\n\t\t\t\tconst isDataInCache = await loadTransactionsDataFromOfflineCache(); //we first try to load em from cache\n\t\t\t\tif (!isDataInCache && isOnline) await fetchTransactionsDataFromDbAndUpdateStateNCache(); //if it is not available in cache, we fetch from backend DB\n\t\t\t})();\n\t}, [isOnline]);\n\n\tif (paymentTransactions.length < 1) {\n\t\treturn <div>{isWip ? 'Loading...' : isOnline ? 'No records' : 'You are offline'}</div>;\n\t} else {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<div>\n\t\t\t\t\t{isFromOfflineCache && cacheTimestamp && (\n\t\t\t\t\t\t<div className={styles.ptCacheInfo}>\n\t\t\t\t\t\t\t<p>Last fetched on {getLetterFormatedDate(new Date(cacheTimestamp), false, true, true)}</p>\n\t\t\t\t\t\t\t<Button variant=\"tertiary\" size=\"smaller\" onClick={refresh} isWip={isWip} wipText=\"Refreshing\" icon=\"refresh-cw\" isDark={true}>\n\t\t\t\t\t\t\t\tRefresh\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t\t<ul className={styles.pt}>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<span className={styles.id}>Order ID</span>\n\t\t\t\t\t\t\t<span className={styles.dt}>Date</span>\n\t\t\t\t\t\t\t<span className={styles.sts}>Status</span>\n\t\t\t\t\t\t\t<span className={styles.amt}>Amount</span>\n\t\t\t\t\t\t\t<span className={styles.ctaC}></span>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t{paymentTransactions.map((item, i) => {\n\t\t\t\t\t\t\tlet status = 'Active';\n\t\t\t\t\t\t\tswitch (+item.s) {\n\t\t\t\t\t\t\t\tcase -1:\n\t\t\t\t\t\t\t\t\tstatus = 'Expired';\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\t\t\tstatus = 'Active';\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t// case 2:\n\t\t\t\t\t\t\t\t// \tstatus = 'Attempted';\n\t\t\t\t\t\t\t\t// \tbreak;\n\t\t\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\t\t\tstatus = 'Paid';\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\t\t\tstatus = 'Refunded';\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\tstatus = 'Unknown';\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t//also check if item.x*1000 < Date.now()\t//item expiry\t//anyway dynamoDb wud delete it since that attribute is used as TTL\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t\t\tkey={item.o}\n\t\t\t\t\t\t\t\t\tclassName={clsx(Object.prototype.hasOwnProperty.call(styles, status.toLowerCase()) && styles[status.toLowerCase()])}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<span className={styles.id}>{item.o}</span>\n\t\t\t\t\t\t\t\t\t<span className={styles.dt}>{getLetterFormatedDate(item.t, false, true, false)}</span>\n\t\t\t\t\t\t\t\t\t<span className={styles.sts}>\n\t\t\t\t\t\t\t\t\t\t<span>{status}</span>\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t<span className={styles.amt}>{item.a}</span>\n\t\t\t\t\t\t\t\t\t<span className={styles.ctaC}>\n\t\t\t\t\t\t\t\t\t\t{status === 'Paid' && (\n\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetSelected(item);\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\ticon=\"arrow-right\"\n\t\t\t\t\t\t\t\t\t\t\t\tisIconOnRight={true}\n\t\t\t\t\t\t\t\t\t\t\t\tisDark={true}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\tView Bill\n\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t})}\n\t\t\t\t\t</ul>\n\t\t\t\t\t{lastEvalKey && (\n\t\t\t\t\t\t<ButtonListContainer>\n\t\t\t\t\t\t\t<Button variant=\"secondary\" size=\"small\" onClick={doLoadMore} isWip={isWip} wipText=\"Loading\">\n\t\t\t\t\t\t\t\tLoad older transactions\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</ButtonListContainer>\n\t\t\t\t\t)}\n\t\t\t\t\t{isWip && <Loading note=\"Loading\" />}\n\t\t\t\t</div>\n\t\t\t\t{selected !== null && Object.prototype.hasOwnProperty.call(selected, 'o') && (\n\t\t\t\t\t<BottomSheet\n\t\t\t\t\t\ttitle={'Order # ' + selected.o}\n\t\t\t\t\t\tuseCloseBtn={true}\n\t\t\t\t\t\tdoOnClose={() => {\n\t\t\t\t\t\t\tsetSelected(null);\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<Bill billId={selected.o} amount={selected.a} billPayTimestamp={selected.t} />\n\t\t\t\t\t</BottomSheet>\n\t\t\t\t)}\n\t\t\t</>\n\t\t);\n\t}\n}\n","// extracted by mini-css-extract-plugin\nexport var verticalHorizontalCenterC = \"fullWidthRestrictedPage-module--verticalHorizontalCenterC--ae912\";\nexport var wrap = \"fullWidthRestrictedPage-module--wrap--3081d\";","import React, { useContext, useEffect } from 'react';\r\n// import { navigate } from 'gatsby';\r\n\r\nimport { UserContext } from '@providers/User';\r\n// import Footer from '@components/Footer';\r\nimport Header from '@components/Header';\r\nimport SignInForm from '@components/userControlPanel/UserForm/SignInForm';\r\n//import Seo from \"./seo\";\r\n\r\nimport * as styles from './fullWidthRestrictedPage.module.css';\r\n\r\nexport default function FullWidthRestrictedPageLayout({ children }) {\r\n\tconst { id } = useContext(UserContext);\r\n\r\n\t// useEffect(() => {\r\n\t// \tif (!id) navigate('/'); //navigate to home page or login page\r\n\t// }, [id]);\r\n\r\n\t// if (!isLoggedIn || !id) {\r\n\t// \t// navigate('/'); //navigate to home page or login page\r\n\t// \treturn <div>Not logged in</div>;\r\n\t// }\r\n\t// if (!id) return <div>Login form here</div>;\r\n\treturn (\r\n\t\t<div id={styles.wrap}>\r\n\t\t\t<Header />\r\n\t\t\t{id ? (\r\n\t\t\t\t<main>{children}</main>\r\n\t\t\t) : (\r\n\t\t\t\t<div id={styles.verticalHorizontalCenterC}>\r\n\t\t\t\t\t<SignInForm />\r\n\t\t\t\t</div>\r\n\t\t\t)}\r\n\t\t\t{/* <Footer /> */}\r\n\t\t</div>\r\n\t);\r\n}\r\n","import React from 'react';\r\nimport FullWidthRestrictedPageLayout from '@layouts/FullWidthRestrictedPage';\r\nimport BrowserOnly from '@components/BrowserOnly';\r\nimport { Seo_noIndex } from '@components/Seo';\r\n\r\nexport default function PaymentTransactionsPage() {\r\n\treturn (\r\n\t\t<FullWidthRestrictedPageLayout>\r\n\t\t\t<h1>\r\n\t\t\t\tPayment <span>Transactions</span>\r\n\t\t\t</h1>\r\n\t\t\t<BrowserOnly>\r\n\t\t\t\t{() => {\r\n\t\t\t\t\tconst PaymentTransactions = require('@components/PaymentTransactions').default; //eslint-disable-line no-undef\r\n\t\t\t\t\treturn <PaymentTransactions />;\r\n\t\t\t\t}}\r\n\t\t\t</BrowserOnly>\r\n\t\t</FullWidthRestrictedPageLayout>\r\n\t);\r\n}\r\n\r\nexport function Head() {\r\n\treturn <Seo_noIndex title=\"Payment transactions\" description=\"List of your purchase payment transactions and invoices\" />;\r\n}\r\n"],"names":["hiden","ifrm","CustomIframe","_ref","title","children","cssString","isHiddenOnScreen","showPrintButton","printBtnText","props","mountNode","setMountNode","useState","iframeRef","useRef","useEffect","_iframeRef$current2","_iframeRef$current2$c","_iframeRef$current3","current","contentDocument","body","_iframeRef$current4","_iframeRef$current4$c","iframeHead","head","s","document","createElement","setAttribute","textContent","appendChild","React","Object","assign","ref","onLoad","e","iframeElm","target","_iframeElm$contentDoc","className","clsx","createPortal","ButtonListContainer","Button","variant","onClick","printIframe","_iframeRef$current","contentWindow","print","icon","isIconOnRight","formCssStyleString","PrintableInvoice","invoiceId","invoiceAmt","paymentTimestamp","userId","name","email","phone","basePrice","gst","paymentGatewayFee","calcCostSplitComponents","replace","getLetterFormatedDate","Math","floor","Date","now","toLocaleString","style","currency","colSpan","Bill","billId","amount","billPayTimestamp","id","useContext","UserContext","CostSplitDetails","amt","amtIncludesTaxNFees","active","ctaC","dt","expired","paid","pt","ptCacheInfo","sts","PaymentTransactions","isWip","setIsWip","isFromOfflineCache","setIsFromOfflineCache","paymentTransactions","setPaymentTransactions","lastEvalKey","setLastEvalKey","cacheTimestamp","setCacheTimestamp","selected","setSelected","isOnline","NetworkCheckContext","getCachedPaymentOrders","getCachedPaymentOrdersMetaData","setCachedPaymentOrders","setCachedPaymentOrdersMetaData","deleteCachedPaymentOrders","deleteCachedPaymentOrdersMetaData","PersistentOfflineCacheContext","notify","ToastNotificationContext","dbQueryData","DynamoDbContext","fetchTransactionsDataFromDbAndUpdateStateNCache","async","transactionsData","Error","queryParams","TableName","KeyConditionExpression","ExpressionAttributeNames","ExpressionAttributeValues","ScanIndexForward","Limit","lastEvalKeyForPaginationFromPrevRun","ExclusiveStartKey","undefined","Items","prototype","hasOwnProperty","call","Count","err","message","fetchTransactionsDataFromDB","concat","_toConsumableArray","_reset","cacheOrderDataAry","map","o","t","a","catch","console","error","cacheTs","LastEvaluatedKey","doLoadMore","refresh","length","cachedOrdersData","Array","isArray","sort","b","cachedDynamoDbLastEvalKey","cachedTimestamp","loadTransactionsDataFromOfflineCache","styles","size","wipText","isDark","item","i","status","key","toLowerCase","Loading","note","BottomSheet","useCloseBtn","doOnClose","verticalHorizontalCenterC","wrap","FullWidthRestrictedPageLayout","Header","SignInForm","PaymentTransactionsPage","BrowserOnly","require","Head","Seo_noIndex","description"],"sourceRoot":""}