{"version":3,"sources":["local.tsx","i18n.tsx","api/index.tsx","utils/index.tsx","components/overdueform/index.tsx","components/ErrorModal/ErrorModal.tsx","components/overduetable/index.tsx","components/overduebills/index.tsx","App.tsx","reportWebVitals.ts","components/errorboundry/index.tsx","index.tsx"],"names":["win","window","location","href","includes","document","documentElement","lang","localhostSettings","resources","en","translation","translationEN","ar","translationAR","lng","i18n","use","XHR","initReactI18next","init","fallbackLng","debug","keySeparator","interpolation","escapeValue","react","useSuspense","counter","apiBaseURL","token","reGenerateTokenUrl","serverURL","errorPage","config","api","baseURL","headers","Accept","Authorization","axios","create","_objectSpread","simpleApi","defaults","validateStatus","interceptors","request","async","console","log","conf","err","response","data","code","Promise","resolve","reject","fetch","method","then","res","text","result","catch","oldRequest","error","Utils","_Utils","lastDigitChecksumForId","digits","length","bits","total","i","v","parseInt","j","MR","idCheckSum","custId","substring","MySelf","formRef","React","createRef","validateId","_","value","t","props","idTypeField","current","getFieldInstance","idType","toLowerCase","startsWith","Error","OverDueForm","Component","constructor","super","submitForm","form","this","state","loading","buttonDisabled","categories","catDataText","componentDidMount","setState","get","concat","Date","getTime","getIdTypes","Object","values","id_types","formChangeFields","changedFields","allFields","buttonDisable","forEach","field","formField","name","fieldPh","placeholder","errors","render","_jsx","Spin","size","spinning","formModal","title","titleClass","subTitle","subTitleClass","id","captcha","captchaKey","changeFields","rows","rowClass","cols","label","type","maxLength","colClass","itemName","colItemRules","required","message","pattern","validator","tip","tipClass","buttonClass","buttonText","disabled","buttonAction","children","MobilyForm","withTranslation","ErrorModal","_ref","description","firstButtonText","secButtonText","modalFirstButtonClick","modalSecondButtonClick","useEffect","body","style","overflow","_jsxs","className","onClick","OverDueTable","tableData","showError","isNumeric","num","test","fetchOverDueBills","getOverDueBills","idNumber","newData","isDiscount","status","_response$data","_response$data$data","item","discount","newItem","serviceAccountNumber","msisdnMasked","msisdn","activationDate","dueAmount","dueAfterDiscount","discountExpDate","duePaymentStatusDesc","duePaymentStatus","push","newItem1","ids","keys","getFieldsValue","innerCol","getFieldValue","row","find","undefined","updateInputValue","modifiedId","updateData","showBackButton","backButtonAction","previousPage","nullValue","dispalyCols","dispalyColsClass","postfixValues","postfix","ignoredValues","disableOn","noDataMsg","noDataMsgClass","firstCol","idCol","colItemClass","visible","handleGetclick","Myself","overDueUrl","OverDueBills","nextPage","page","submitOverDueForm","contactNumber","isError","errorMsg","bind","getParameter","paramName","search","URLSearchParams","submitOverDueTable","selectedRows","accountInfo","amount","parseFloat","toFixed","acctInfo","accountNumber","accountType","serviceInfo","serviceType","serviceValue","jsonOrder","netAmount","vatAmount","san","totalAmount","paymentCategory","feedbackUrl","autoRedirect","consumerInfo","fullfilment","fullfilmentInfo","language","post","initiatePayment","responseCode","sessionStorage","overDuePayTransId","paymentTransactionId","overDueTotal","paymentUrl","responseMessage","arabicDetail","englishDetail","App","reportWebVitals","onPerfEntry","Function","getCLS","getFID","getFCP","getLCP","getTTFB","ErrorBoundary","hasError","componentDidCatch","info","docDir","thanksUrl","pStatus","ReactDOM","ConfigProvider","direction","getElementById"],"mappings":"y8LAEA,MAAMA,EAAWC,OACbA,OAAOC,SAASC,KAAKC,SAAS,eAChCJ,EAAU,KAAI,KAGdK,SAASC,gBAAgBC,KAAOP,EAAU,KAC1CA,EAAkB,aAAI,mCACjBA,EAAiB,cACpBA,EAAiB,YAAI,wCAEvBA,EAAa,QAAI,iCAEjBA,EAAoB,eAClB,gZACFA,EAAkB,aAChB,0DAGWQ,I,4CCdf,MAAMR,EAAWC,OAMXQ,EAAY,CAChBC,GAAI,CACFC,YAAaC,GAEfC,GAAI,CACFF,YAAaG,IAIjB,IAAIC,EAAyC,MAAff,EAAU,KAAY,KAAOA,EAAU,KAErEgB,IACGC,IAAIC,KACJD,IAAIE,KACJC,KAAK,CACJX,YACAY,YAAa,KACbN,MACAO,OAAO,EACPC,cAAc,EACdC,cAAe,CACbC,aAAa,GAOfC,MAAO,CACLC,aAAa,KAIJX,EAAI,E,OAAJA,I,sDC3CXY,EA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U,OAAZA,IACAA,GAAQ9M,cAAc5F,SAAS,QAC7BiI,cAAC0J,GAAG,IAEJ,OAIN1R,SAAS6S,eAAe,SAM1BlB,I","file":"static/js/main.65b2688d.chunk.js","sourcesContent":["class localhostSettings {}\r\n\r\nconst win: any = window;\r\nif (window.location.href.includes(\"localhost\")) {\r\n win[\"lang\"] = \"en\";\r\n //win[\"lang\"] = \"ar\";\r\n //document.documentElement.dir = \"rtl\";\r\n document.documentElement.lang = win[\"lang\"];\r\n win[\"base_api_url\"] = \"https://apisit.mobily.com.sa/api\";\r\n if (!win[\"clientToken\"]) {\r\n win[\"clientToken\"] = \"df294218-92ae-4bfa-b7a7-342d4cdd0a82\";\r\n }\r\n win[\"CEM_KEY\"] = \"liCENcCCGpHUsEPHNhySYGXCnmhwzZ\";\r\n //win[\"storeServerURL\"] = \"http://sdea004:8080\";\r\n win[\"regenerate_url\"] =\r\n \"/wps/portal/web/personal/store/cartmgmt/!ut/p/z1/jZDNDoIwEISfxSfo9oe211IQkBooBMVeDAdjMIoejM8vIerBCLK3Tb6Z3RnkUI1c1zzaY3Nvr11z7ved43uuPBJRwDlQA2DN0gsTYShEAm0HIMGpjleM5BkUFGzMfKZ1RmhCkJuj5zYIIe0ByUGCrYz25VpgUGKeHkZGwX-9G5BPAlmooEdgY0sT4LAUL2DsRUK-HX50MOmg3icmUpSHDt0uVVVDm5yYWjwBkQFJJA!!/dz/d5/L2dBISEvZ0FBIS9nQSEh/p0/IZ7_6A52G301P02H10QT8H4TPI0052=CZ6_6A52G301P03L00QLF5EI7L30G7=NJreGenerateToken=/\";\r\n win[\"errorPageURL\"] =\r\n \"/wps/portal/web/personal/store/error?errorSource=Store\";\r\n}\r\n\r\nexport default localhostSettings;\r\n","import i18n from \"i18next\";\r\nimport { initReactI18next } from \"react-i18next\";\r\nimport XHR from \"i18next-xhr-backend\";\r\nimport translationEN from \"./translations/en.json\";\r\nimport translationAR from \"./translations/ar.json\";\r\n\r\nconst win: any = window;\r\n//win[\"lang\"]=\"en\";\r\n//document.documentElement.lang = win[\"lang\"];\r\n//document.documentElement.dir = \"rtl\";\r\n\r\n// the translations\r\nconst resources = {\r\n en: {\r\n translation: translationEN,\r\n },\r\n ar: {\r\n translation: translationAR,\r\n },\r\n};\r\n\r\nlet lng: string | undefined = win[\"lang\"] == null ? \"en\" : win[\"lang\"];\r\n\r\ni18n\r\n .use(XHR)\r\n .use(initReactI18next)\r\n .init({\r\n resources,\r\n fallbackLng: \"en\",\r\n lng,\r\n debug: false,\r\n keySeparator: false,\r\n interpolation: {\r\n escapeValue: false,\r\n },\r\n // backend: {\r\n // loadPath: './translations/{{lng}}.json',\r\n // //loadPath: window.location.href.includes(\"localhost\") ? '/translations/{{lng}}.json' : \"/.store.cartmgmt/react-app/build/translations/{{lng}}.json\",\r\n // allowMultiLoading: true,\r\n // },\r\n react: {\r\n useSuspense: true,\r\n },\r\n });\r\n\r\nexport default i18n;\r\n","import axios from \"axios\";\r\n\r\nvar counter = 0;\r\nconst win: any = window;\r\nconst lang = win[\"lang\"];\r\nconst apiBaseURL = win[\"base_api_url\"];\r\nvar token = win[\"clientToken\"];\r\nvar reGenerateTokenUrl = win[\"regenerate_url\"];\r\nvar serverURL = win[\"base_portal_url\"];\r\nvar errorPage = win[\"errorPageURL\"];\r\n\r\nlet config = {\r\n api: {\r\n baseURL: apiBaseURL,\r\n headers: {\r\n Accept: \"application/json\",\r\n \"Content-Type\": \"application/json\",\r\n Authorization: \"\",\r\n \"cem-key\": win[\"CEM_KEY\"],\r\n },\r\n },\r\n};\r\n\r\nexport const api = axios.create({ ...config.api });\r\nexport const simpleApi = axios.create();\r\n\r\napi.defaults.validateStatus = function () {\r\n return true;\r\n};\r\n\r\napi.interceptors.request.use(\r\n async (conf: any) => {\r\n console.log(\"token : \" + token);\r\n conf.headers.Authorization = \"Bearer \" + token;\r\n conf.headers[\"cem-key\"] = win[\"CEM_KEY\"];\r\n //conf.headers.Authorization = \"Basic Y2tfMjRlMjgwMWNhZjdiODM2ZWY2NDg4MzBlODI5NjYyMmMxMWQ0ZDNkMjpjc18yMDg2ZWQ0YjdlNmFkY2QyMDVhMzRiM2Q5MjhmN2Q5MDBiMjMzNTA0\";\r\n return conf;\r\n },\r\n (err) => {\r\n console.log(\"error in getting \", err);\r\n }\r\n);\r\n\r\napi.interceptors.response.use(\r\n async (response: any) => {\r\n if (\r\n (response.data.code && response.data.code === \"APIGEE-001\") ||\r\n (response.data.code && response.data.code === \"APIGEE-002\")\r\n ) {\r\n counter++;\r\n token = await reGenerateToken();\r\n\r\n const { config: oldRequest } = response;\r\n if (counter < 2) return api.request({ ...oldRequest });\r\n }\r\n\r\n return response;\r\n },\r\n async (error: any) => {\r\n if (!!errorPage) {\r\n document.location.href = errorPage;\r\n } else {\r\n document.location.href = \"/wps/portal/web/personal/store/error\";\r\n }\r\n return error;\r\n }\r\n);\r\n\r\nfunction reGenerateToken() {\r\n console.log(\"reGenerateToken :: Enter\");\r\n console.log(\"reGenerateTokenUrl => \" + serverURL + \"\" + reGenerateTokenUrl);\r\n\r\n return new Promise((resolve, reject) => {\r\n fetch(serverURL + \"\" + reGenerateTokenUrl, {\r\n method: \"GET\",\r\n headers: {\r\n \"Content-type\": \"text/html; charset=UTF-8\",\r\n \"cem-key\": win[\"CEM_KEY\"],\r\n },\r\n })\r\n .then((res) => res.text())\r\n\r\n .then((result) => {\r\n //console.log(\"Token res -> \"+result);\r\n resolve(result);\r\n })\r\n .catch((err) => {\r\n //console.log(err);\r\n reject(err);\r\n });\r\n });\r\n}\r\n\r\nconst getIdTypes = async () => {\r\n return simpleApi.get(\r\n `${apiBaseURL}/digital/v1/data/mappings?contextId=CTX_LOOKUPS&catalogKey=OD_IDTYPE&lang=${lang}×tamp=${new Date().getTime()}`,\r\n {\r\n headers:{\r\n \"cem-key\":win[\"CEM_KEY\"]\r\n }\r\n }\r\n );\r\n};\r\n\r\nconst getOverDueBills = (idType: any, idNumber: any) => {\r\n // return api.get('http://localhost:3001/getOverDueAmount');\r\n // return api.get('http://localhost:3001/getOverNoDueAmount');\r\n return api.get(\r\n `${apiBaseURL}/payment/v3/overdue?idNumber=${idNumber}&lang=${lang}×tamp=${new Date().getTime()}`,\r\n {\r\n headers:{\r\n \"cem-key\":win[\"CEM_KEY\"]\r\n }\r\n }\r\n );\r\n};\r\n\r\nconst initiatePayment = (data: any) => {\r\n return api.post(`${apiBaseURL}/payment/v1/3rd/initiatePayment`, data);\r\n};\r\n\r\nexport { getIdTypes, getOverDueBills, initiatePayment };\r\n","export default class Utils {\r\n static lastDigitChecksumForId = (digits: any) => {\r\n var ln = digits.length;\r\n\r\n if (ln !== 9) {\r\n return -1;\r\n }\r\n\r\n var bits = digits;\r\n // take each odd digit, multiply by two, and then apply formula such that\r\n // 0 1 2 3 4 5 6 7 8 9 becomes:\r\n // --> 0 2 4 6 8 1 3 5 7 9\r\n // then add to running total\r\n var total = 0;\r\n for (var i = 0; i < 9; i += 2) {\r\n var v = parseInt(bits[i]);\r\n\r\n if (v < 5) {\r\n total = total + v * 2;\r\n } else {\r\n total = total + (2 * v - 9);\r\n }\r\n }\r\n // now add the even digits to this total\r\n for (var j = 1; j < 9; j += 2) {\r\n var w = parseInt(bits[j]);\r\n total = total + w;\r\n }\r\n // now take the ones digit of this total, called the MR digit...\r\n var MR = total % 10;\r\n\r\n // ...and return the last digit as:\r\n if (MR === 0) {\r\n return 0;\r\n } else {\r\n return 10 - MR;\r\n }\r\n };\r\n\r\n static idCheckSum = (custId: any) => {\r\n var lastDigit = 0;\r\n var lastDigitChks = 0;\r\n lastDigit = parseInt(custId[9]);\r\n\r\n lastDigitChks = Utils.lastDigitChecksumForId(custId.substring(0, 9));\r\n\r\n if (lastDigit !== lastDigitChks) {\r\n return false;\r\n }\r\n return true;\r\n };\r\n}\r\n","import React, { Component } from \"react\";\r\nimport { withTranslation } from \"react-i18next\";\r\nimport { MobilyForm } from \"mobilyform/lib\";\r\nimport { Spin } from \"antd\";\r\nimport { getIdTypes } from \"../../api\";\r\nimport Utils from \"./../../utils\";\r\nconst win: any = window;\r\n\r\nvar MySelf: OverDueForm;\r\nvar formRef: any = React.createRef();\r\n\r\nconst validateId = (_: any, value: any) => {\r\n const { t } = MySelf.props;\r\n var idTypeField = formRef.current.current.getFieldInstance(\"idtype\");\r\n var idType: any = idTypeField ? idTypeField.props.value : null;\r\n\r\n if (\r\n !idTypeField ||\r\n !value ||\r\n !idType ||\r\n (value && value.length !== 10) ||\r\n (idType &&\r\n idType.toLowerCase().includes(\"iqama\") &&\r\n value.startsWith(\"2\") &&\r\n Utils.idCheckSum(value)) ||\r\n (idType &&\r\n idType.toLowerCase().includes(\"national\") &&\r\n value.startsWith(\"1\") &&\r\n Utils.idCheckSum(value))\r\n ) {\r\n return Promise.resolve();\r\n }\r\n\r\n return Promise.reject(new Error(t(\"idnumber_missing\")));\r\n};\r\n\r\nclass OverDueForm extends Component {\r\n constructor(props: any) {\r\n super(props);\r\n MySelf = this;\r\n this.state = {\r\n loading: true,\r\n buttonDisabled: true,\r\n categories: [],\r\n catDataText: \"english_name\",\r\n };\r\n }\r\n\r\n componentDidMount() {\r\n this.setState({\r\n loading: true,\r\n });\r\n\r\n getIdTypes().then((response: any) => {\r\n if (response && response.data) {\r\n this.setState({\r\n categories: Object.values(response.data.data.id_types),\r\n loading: false,\r\n catDataText: win[\"lang\"] === \"en\" ? \"id_type_en\" : \"id_type_ar\",\r\n });\r\n }\r\n });\r\n }\r\n\r\n submitForm = (form: any) => {\r\n this.props.submitForm(form);\r\n };\r\n\r\n formChangeFields(changedFields: any, allFields: any) {\r\n var buttonDisable = false;\r\n\r\n allFields.forEach((field: any) => {\r\n var formField = formRef.current.current.getFieldInstance(field.name);\r\n var fieldPh = \"\";\r\n if (formField && formField.props && formField.props.placeholder) {\r\n fieldPh = formField.props.placeholder;\r\n }\r\n\r\n if (!field.name[0].toLowerCase().includes(\"button\")) {\r\n if (\r\n (fieldPh.includes(\"*\") &&\r\n (!field.value || field.value.length === 0)) ||\r\n (field.errors && field.errors.length > 0)\r\n ) {\r\n buttonDisable = true;\r\n }\r\n }\r\n });\r\n\r\n MySelf.setState({\r\n buttonDisabled: buttonDisable,\r\n });\r\n }\r\n\r\n render() {\r\n const { t } = this.props;\r\n\r\n if (!this.state.categories || this.state.categories.length === 0) {\r\n return ;\r\n }\r\n\r\n var formModal = {\r\n name: \"getInfoForm\",\r\n title: t(\"overdueFirstTitle\"),\r\n titleClass: \"\",\r\n subTitle: t(\"overdueFirstSubTitle\"),\r\n subTitleClass: \"mb-5\",\r\n id: \"getInfoForm\",\r\n captcha: true,\r\n captchaKey: \"6LeDEBAaAAAAALpUmENFbnG_Kc-cN0H_Gch4BpRf\",\r\n //formClass: \"col-12\",\r\n changeFields: this.formChangeFields,\r\n rows: [\r\n {\r\n rowClass: \"row\",\r\n cols: [\r\n {\r\n label: t(\"idnumber\"),\r\n type: \"text\",\r\n maxLength: 255,\r\n colClass: \"col-md-4 col-sm-4\",\r\n itemName: \"idnumber\",\r\n colItemRules: [\r\n { required: true, message: t(\"idnumber_missing\") },\r\n {\r\n message: t(\"idnumber_missing\"),\r\n pattern: /^(1|2)([0-9]{9})$/,\r\n },\r\n { validator: validateId },\r\n ],\r\n },\r\n ],\r\n },\r\n {\r\n rowClass: \"row\",\r\n cols: [\r\n {\r\n label: t(\"contactnumber\"),\r\n type: \"text\",\r\n maxLength: 255,\r\n tip: t(\"contacttip\"),\r\n tipClass: \"\",\r\n colClass: \"col-md-4 col-sm-4\",\r\n itemName: \"contactnumber\",\r\n colItemRules: [\r\n { required: true, message: t(\"contactnumber_missing\") },\r\n {\r\n message: t(\"contactnumber_format_missing\"),\r\n pattern: /^(((9665)(5|0|3|6|4|9|1|8|7)([0-9]{7}))||((05)(5|0|3|6|4|9|1|8|7)([0-9]{7})))$/,\r\n },\r\n ],\r\n },\r\n ],\r\n },\r\n {\r\n rowClass: \"row pt-4\",\r\n cols: [\r\n {\r\n buttonClass: \"w-100 text-uppercase\",\r\n buttonText: t(\"submit\"),\r\n colClass: \"col-md-4 col-sm-4 col-8\",\r\n itemName: \"submitbutton\",\r\n type: \"button\",\r\n disabled: this.state.buttonDisabled,\r\n buttonAction: this.submitForm,\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\nexport default withTranslation()(OverDueForm);\r\n","import { useEffect } from 'react';\r\nimport './ErrorModal.scss';\r\ninterface Props {\r\n id: string;\r\n title: string;\r\n description: string;\r\n firstButtonText: string;\r\n secButtonText?: string;\r\n modalFirstButtonClick: () => void;\r\n modalSecondButtonClick?: () => void;\r\n}\r\n\r\nfunction ErrorModal({ id, title, description, firstButtonText, secButtonText, modalFirstButtonClick, modalSecondButtonClick }: Props) {\r\n\r\n useEffect(() => {\r\n document.body.style.overflow = 'hidden';\r\n }, []);\r\n\r\n return (\r\n
\r\n
\r\n
\r\n

{title}

\r\n \r\n
\r\n
\r\n )\r\n}\r\n\r\nexport default ErrorModal;","import { Component } from \"react\";\r\nimport { withTranslation } from \"react-i18next\";\r\nimport { MobilyForm } from \"mobilyform/lib\";\r\nimport { Spin } from \"antd\";\r\nimport { getOverDueBills } from \"../../api\";\r\n// import { message } from \"antd\";\r\nimport ErrorModal from '../ErrorModal/ErrorModal';\r\nconst win: any = window;\r\nvar errorPage = win[\"errorPageURL\"];\r\nvar MySelf: OverDueTable;\r\n\r\nclass OverDueTable extends Component {\r\n constructor(props: any) {\r\n super(props);\r\n MySelf = this;\r\n this.state = {\r\n loading: true,\r\n buttonDisabled: true,\r\n data: [],\r\n tableData: [],\r\n showError: false,\r\n };\r\n }\r\n\r\n isNumeric(num: any) {\r\n return /^-?\\d+|\\d+\\.\\d+$/.test(num);\r\n }\r\n\r\n componentDidMount() {\r\n this.setState({\r\n loading: true,\r\n });\r\n\r\n this.fetchOverDueBills();\r\n }\r\n\r\n fetchOverDueBills() {\r\n getOverDueBills(this.props.idType, this.props.idNumber)\r\n .then((response: any) => {\r\n const { t } = MySelf.props;\r\n\r\n if (response && response.data) {\r\n var newData: any = [];\r\n var isDiscount: boolean = false;\r\n\r\n if (response.status === 500) {\r\n this.setState({\r\n showError: true,\r\n loading: false\r\n });\r\n return;\r\n }\r\n\r\n if (response.status === 200) {\r\n if (response.data.status.code === 'MAPI-000' && response.data?.data?.length > 0 && response.data.data !== null) {\r\n //check if any item has discount\r\n response.data.data.forEach((item: any) => {\r\n if (MySelf.isNumeric(item.discount)) {\r\n isDiscount = true;\r\n }\r\n });\r\n\r\n response.data.data.forEach((item: any) => {\r\n if (isDiscount) {\r\n var newItem = {\r\n serviceAccountNumber: item.serviceAccountNumber,\r\n msisdnMasked:\r\n item.msisdn && item.msisdn.length > 0\r\n ? item.msisdnMasked\r\n : item.serviceAccountNumber,\r\n activationDate: item.activationDate,\r\n dueAmount: item.dueAmount,\r\n discount: item.discount,\r\n dueAfterDiscount: item.dueAfterDiscount,\r\n discountExpDate: item.discountExpDate,\r\n duePaymentStatusDesc: t(\"paymentStatus\" + item.duePaymentStatus),\r\n duePaymentStatus: item.duePaymentStatus,\r\n };\r\n newData.push(newItem);\r\n } else {\r\n var newItem1 = {\r\n serviceAccountNumber: item.serviceAccountNumber,\r\n msisdnMasked:\r\n item.msisdn && item.msisdn.length > 0\r\n ? item.msisdnMasked\r\n : item.serviceAccountNumber,\r\n activationDate: item.activationDate,\r\n dueAmount: item.dueAmount,\r\n };\r\n\r\n newData.push(newItem1);\r\n }\r\n });\r\n\r\n this.setState({\r\n loading: false,\r\n data: response.data.data,\r\n tableData: newData,\r\n showError: false\r\n });\r\n } else {\r\n this.setState({\r\n loading: false,\r\n showError: true,\r\n });\r\n return;\r\n }\r\n }\r\n \r\n if (!response.data.data) {\r\n document.location.href = errorPage;\r\n return;\r\n }\r\n }\r\n }).catch((error: any) => {\r\n this.setState({\r\n showError: true,\r\n loading: false\r\n });\r\n });\r\n }\r\n\r\n submitForm(form: any) {\r\n var ids: any = [];\r\n Object.keys(form.getFieldsValue()).forEach((innerCol: any, j: any) => {\r\n if (form.getFieldValue(innerCol)) {\r\n var row = MySelf.state.data.find(\r\n (item: any) =>\r\n item.serviceAccountNumber === form.getFieldValue(innerCol)[0]\r\n );\r\n if (row !== undefined) {\r\n ids.push(row);\r\n }\r\n }\r\n });\r\n MySelf.props.submitForm(ids);\r\n }\r\n\r\n updateInputValue(value: any, modifiedId: any) {\r\n var row = MySelf.state.updateData.find(\r\n (item: any) =>\r\n item.serviceAccountNumber === modifiedId\r\n );\r\n row[\"dueAmount\"] = value;\r\n var row1 = MySelf.state.updateData.find(\r\n (item: any) =>\r\n item.serviceAccountNumber === modifiedId\r\n );\r\n }\r\n\r\n formChangeFields(changedFields: any, allFields: any) {\r\n var buttonDisable = true;\r\n allFields.forEach((field: any) => {\r\n if (field.value && field.value.length > 0) {\r\n buttonDisable = false;\r\n }\r\n });\r\n\r\n MySelf.setState({\r\n buttonDisabled: buttonDisable,\r\n });\r\n }\r\n\r\n render() {\r\n const { t } = this.props;\r\n\r\n if (this.state.loading) {\r\n return ;\r\n }\r\n\r\n const formModal = {\r\n name: \"overDueBillsTableForm\",\r\n title: t(\"overdueFirstTitle\"),\r\n titleClass: \"\",\r\n subTitle: t(\"overdueSecondSubTitle\"),\r\n // subTitleClass: \"mb-5\",\r\n id: \"overDueBillsTableForm\",\r\n //formClass: \"container\",\r\n showBackButton: true,\r\n backButtonAction: this.props.previousPage,\r\n changeFields: this.formChangeFields,\r\n rows: [\r\n {\r\n rowClass: \"w-100\",\r\n cols: [\r\n {\r\n label: \"\",\r\n itemName: \"dataTable\",\r\n type: \"table\",\r\n nullValue: \"\",\r\n dispalyCols: [\r\n \"msisdnMasked\",\r\n \"activationDate\",\r\n \"dueAmount\",\r\n \"discount\",\r\n \"dueAfterDiscount\",\r\n \"discountExpDate\",\r\n \"duePaymentStatusDesc\",\r\n ],\r\n dispalyColsClass: [\r\n \"col-md-1 col-sm-6\",\r\n \"col-md-2 col-sm-6\",\r\n \"col-md-2 col-sm-6\",\r\n \"col-md-2 col-sm-6\",\r\n \"col-md-2 col-sm-6\",\r\n \"col-md-2 col-sm-6\",\r\n \"col-md-2 col-sm-6\",\r\n \"col-md-2 col-sm-6\",\r\n ],\r\n postfixValues: [\r\n { name: \"dueAmount\", postfix: \"SAR\", ignoredValues: [\"N/A\"] },\r\n {\r\n name: \"dueAfterDiscount\",\r\n postfix: \"SAR\",\r\n ignoredValues: [\"N/A\"],\r\n },\r\n { name: \"discount\", postfix: \"%\", ignoredValues: [\"N/A\"] },\r\n ],\r\n disableOn: { name: \"duePaymentStatus\", values: [\"6\"] },\r\n noDataMsg: t(\"noDataFound\"),\r\n noDataMsgClass: \"formLabel\",\r\n //colClass: \"col-md-auto\",\r\n firstCol: \"checkbox\",\r\n idCol: \"serviceAccountNumber\",\r\n data: this.state.tableData,\r\n },\r\n ],\r\n },\r\n {\r\n rowClass: \"row\",\r\n cols: [\r\n {\r\n colClass: \"col-md-6 col-sm-6\",\r\n colItemClass: \"formLabel\",\r\n text: t(\"billsTableNote\"),\r\n type: \"label\",\r\n visible: this.state.data.length > 0,\r\n },\r\n ],\r\n },\r\n {\r\n rowClass: \"row\",\r\n cols: [\r\n {\r\n colClass: \"col-md-6 col-sm-6\",\r\n colItemClass: \"formLabel\",\r\n text: t(\"billsTableNote2\"),\r\n type: \"label\",\r\n visible: this.state.data.length > 0,\r\n },\r\n ],\r\n },\r\n {\r\n rowClass: \"row\",\r\n cols: [\r\n {\r\n buttonClass: \"w-100 text-uppercase\",\r\n buttonText: t(\"next\"),\r\n colClass: \"col-md-4 col-sm-4\",\r\n itemName: \"submitbutton\",\r\n type: \"button\",\r\n disabled: this.state.buttonDisabled,\r\n buttonAction: this.submitForm,\r\n },\r\n ],\r\n },\r\n ],\r\n };\r\n\r\n const handleGetclick = () => {\r\n this.setState({\r\n showError: false,\r\n loading: false\r\n });\r\n this.props.previousPage()\r\n }\r\n\r\n return (\r\n
\r\n \r\n {this.state.showError && (\r\n \r\n )}\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default withTranslation()(OverDueTable);","import { Component } from \"react\";\r\nimport { withTranslation } from \"react-i18next\";\r\nimport OverDueForm from \"./../overdueform\";\r\nimport OverDueTable from \"./../overduetable\";\r\nimport { initiatePayment } from \"../../api\";\r\nimport { message } from \"antd\";\r\n\r\nconst win: any = window;\r\nconst lang = win[\"lang\"];\r\nvar serverURL = win[\"base_portal_url\"];\r\nvar overDueUrl = win[\"overDueUrl\"]\r\n ? serverURL + win[\"overDueUrl\"]\r\n : serverURL + \"/wps/portal/web/personal/previous-overdue-bills\";\r\n\r\nvar Myself: OverDueBills;\r\n\r\nclass OverDueBills extends Component {\r\n constructor(props: any) {\r\n super(props);\r\n Myself = this;\r\n this.state = {\r\n loading: true,\r\n page: 1,\r\n isError: false,\r\n errorMsg: \"\",\r\n };\r\n\r\n this.nextPage = this.nextPage.bind(this);\r\n this.previousPage = this.previousPage.bind(this);\r\n }\r\n\r\n nextPage = () => {\r\n this.setState({ page: this.state.page + 1 });\r\n };\r\n\r\n previousPage = () => {\r\n this.setState({ page: this.state.page - 1 });\r\n };\r\n\r\n getParameter(paramName: any) {\r\n const search = window.location.search;\r\n const params = new URLSearchParams(search);\r\n\r\n return params.get(paramName);\r\n }\r\n\r\n componentDidMount() {\r\n this.setState({\r\n loading: false,\r\n });\r\n }\r\n\r\n submitOverDueForm = (form: any) => {\r\n var idType = form.getFieldValue(\"idtype\");\r\n var idNumber = form.getFieldValue(\"idnumber\");\r\n var contactNumber = form.getFieldValue(\"contactnumber\");\r\n this.setState({\r\n isError: false,\r\n errorMsg: \"\",\r\n loading: false,\r\n idType: idType,\r\n idNumber: idNumber,\r\n contactNumber: contactNumber,\r\n });\r\n this.nextPage();\r\n };\r\n\r\n isNumeric(num: any) {\r\n return /^-?\\d+|\\d+\\.\\d+$/.test(num);\r\n }\r\n\r\n submitOverDueTable(selectedRows: any) {\r\n Myself.setState({\r\n isError: false,\r\n errorMsg: \"\",\r\n loading: true,\r\n });\r\n console.log(selectedRows);\r\n var total: any = 0;\r\n var accountInfo: any = [];\r\n\r\n selectedRows.forEach((row: any) => {\r\n var amount;\r\n if (row.dueAfterDiscount && Myself.isNumeric(row.dueAfterDiscount)) {\r\n amount = row.dueAfterDiscount;\r\n } else {\r\n amount = row.dueAmount;\r\n }\r\n\r\n total += parseFloat(amount);\r\n });\r\n\t total = total.toFixed(2);\r\n selectedRows.forEach((row: any) => {\r\n var amount;\r\n if (row.dueAfterDiscount && Myself.isNumeric(row.dueAfterDiscount)) {\r\n amount = row.dueAfterDiscount;\r\n } else {\r\n amount = row.dueAmount;\r\n }\r\n console.log(amount);\r\n var acctInfo = {\r\n accountNumber:\r\n row.msisdn && row.msisdn.length > 0\r\n ? row.msisdn\r\n : row.serviceAccountNumber,\r\n accountType: row.msisdn && row.msisdn.length > 0 ? \"MSISDN\" : \"SAN\",\r\n serviceInfo: {\r\n serviceType: \"DUE_AMNT\",\r\n serviceValue: \"\",\r\n jsonOrder:\r\n '{\"OrderHeader\" : {\"OrderType\" : \"PAY_OVERDUE_AMOUNT_ORDER\",\"OrderTransactionId\": \"overdue4_' +\r\n +new Date() +\r\n '\",\"DestinationFuncId\": \"CUSTOMER_NOTIFICATION\"},\"OrderBody\":{ \"CustomerOrder\": {\"totalPaymentAmount\": \"' +\r\n total +\r\n '\",\"serviceNumber\": \"' +\r\n Myself.state.contactNumber +\r\n '\"}}}',\r\n amount: amount,\r\n netAmount: amount,\r\n vatAmount: \"0\",\r\n },\r\n san: row.serviceAccountNumber,\r\n };\r\n\r\n accountInfo.push(acctInfo);\r\n });\r\n\r\n var data = {\r\n totalAmount: total,\r\n paymentCategory: \"Consumer\",\r\n accountNumber: \"guest\",\r\n accountType: \"MSISDN\",\r\n feedbackUrl: overDueUrl,\r\n autoRedirect: true,\r\n consumerInfo: {\r\n fullfilment: \"DUE_AMNT\",\r\n fullfilmentInfo: {\r\n accountInfo: accountInfo,\r\n },\r\n },\r\n language:lang\r\n };\r\n\r\n console.log(data);\r\n\r\n initiatePayment(data).then((response: any) => {\r\n console.log(response);\r\n if (\r\n response &&\r\n response.data.data &&\r\n response.data.data.responseCode === \"0000\"\r\n ) {\r\n window.sessionStorage.overDuePayTransId =\r\n response.data.data.paymentTransactionId;\r\n window.sessionStorage.overDueTotal = total;\r\n window.location = response.data.data.paymentUrl;\r\n return;\r\n } else {\r\n if (response.data.data) {\r\n Myself.setState({\r\n isError: true,\r\n errorMsg: response.data.data.responseMessage,\r\n loading: false,\r\n });\r\n } else if (response.data.message) {\r\n Myself.setState({\r\n isError: true,\r\n errorMsg: response.data.message,\r\n loading: false,\r\n });\r\n } else if (response.data.status) {\r\n Myself.setState({\r\n isError: true,\r\n errorMsg:\r\n lang === \"ar\"\r\n ? response.data.status.arabicDetail\r\n : response.data.status.englishDetail,\r\n loading: false,\r\n });\r\n } else {\r\n Myself.setState({\r\n isError: true,\r\n errorMsg:\r\n lang === \"ar\"\r\n ? \"همم...صار خطأ في العملية.\"\r\n : \"Hmm...Something went wrong.\",\r\n loading: false,\r\n });\r\n }\r\n\r\n message.error(Myself.state.errorMsg);\r\n }\r\n });\r\n }\r\n\r\n render() {\r\n const { page } = this.state;\r\n return (\r\n
\r\n {page === 1 && (\r\n \r\n )}\r\n {page === 2 && (\r\n \r\n )}\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default withTranslation()(OverDueBills);","import \"./local\";\r\nimport \"./i18n\";\r\nimport React from \"react\";\r\nimport \"./App.css\";\r\nimport OverDueBills from \"./components/overduebills\";\r\n\r\nfunction App() {\r\n return (\r\n
\r\n \r\n
\r\n );\r\n}\r\n\r\nexport default App;\r\n","import { ReportHandler } from \"web-vitals\";\r\n\r\nconst reportWebVitals = (onPerfEntry?: ReportHandler) => {\r\n if (onPerfEntry && onPerfEntry instanceof Function) {\r\n import(\"web-vitals\").then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {\r\n getCLS(onPerfEntry);\r\n getFID(onPerfEntry);\r\n getFCP(onPerfEntry);\r\n getLCP(onPerfEntry);\r\n getTTFB(onPerfEntry);\r\n });\r\n }\r\n};\r\n\r\nexport default reportWebVitals;\r\n","import React, { Component } from \"react\";\r\n\r\nexport default class ErrorBoundary extends Component {\r\n constructor(props: any) {\r\n super(props);\r\n this.state = { hasError: false };\r\n }\r\n\r\n componentDidCatch(error: any, info: any) {\r\n // Display fallback UI\r\n this.setState({ hasError: true });\r\n // You can also log the error to an error reporting service\r\n //logErrorToMyService(error, info);\r\n }\r\n\r\n render() {\r\n if (this.state.hasError) {\r\n // You can render any custom fallback UI\r\n return

Something went wrong.

;\r\n }\r\n return this.props.children;\r\n }\r\n}\r\n","import React from \"react\";\r\nimport ReactDOM from \"react-dom\";\r\nimport \"./index.css\";\r\nimport App from \"./App\";\r\nimport reportWebVitals from \"./reportWebVitals\";\r\nimport ErrorBoundary from \"./components/errorboundry\";\r\nimport \"./index.scss\";\r\nimport { DirectionType } from \"antd/lib/config-provider\";\r\nimport { ConfigProvider } from \"antd\";\r\nimport './portal.css';\r\n\r\nconst win: any = window;\r\n\r\nlet docDir: DirectionType | undefined =\r\n win[\"lang\"] === null || win[\"lang\"] === \"en\" ? \"ltr\" : \"rtl\";\r\n\r\nvar thanksUrl = win[\"overdue_thanks_url\"];\r\nvar errorPage =\r\n win[\"errorPageURL\"] && win[\"errorPageURL\"] !== \"null\"\r\n ? win[\"errorPageURL\"]\r\n : \"/wps/portal/web/personal/store/error\";\r\n\r\nvar pStatus = win[\"pStatus\"];\r\n\r\nif (pStatus && pStatus != null && pStatus.toLowerCase().includes(\"success\")) {\r\n window.location = thanksUrl;\r\n} else if (\r\n pStatus &&\r\n pStatus != null &&\r\n !pStatus.toLowerCase().includes(\"success\") &&\r\n !pStatus.toLowerCase().includes(\"null\")\r\n) {\r\n window.location = errorPage;\r\n}\r\n\r\nReactDOM.render(\r\n \r\n \r\n {!pStatus ||\r\n pStatus === null ||\r\n pStatus.toLowerCase().includes(\"null\") ? (\r\n \r\n ) : (\r\n \"\"\r\n )}\r\n \r\n ,\r\n document.getElementById(\"root\")\r\n);\r\n\r\n// If you want to start measuring performance in your app, pass a function\r\n// to log results (for example: reportWebVitals(console.log))\r\n// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals\r\nreportWebVitals();\r\n"],"sourceRoot":""}