{"version":3,"sources":["pages/Lists/currencyList.js","pages/Lists/nationalityList.js","pages/Notes.js","pages/Create.js","pages/Monitor.js","pages/Audit.js","pages/Admin.js","components/AppbarLogo.png","pages/ProfileModal.js","components/Layout.js","components/Login.js","RequireAuth.js","pages/maintenance-image.jpeg","pages/MaintenanceModal.js","App.js","aws-exports.js","index.js"],"names":["currencyList","nationalityList","config","require","Notes","showButton","useAuthenticator","context","user","signOut","navigate","useNavigate","React","useState","open","setOpen","deletingRow","setDeletingRow","isLoading","setIsLoading","userEmail","setUserEmail","isAdmin","setAdmin","enableGoogle","setEnableGoogle","monitorFreq","setMonitorFreq","handleClose","handleDeleteConfirmation","newRow","handleDelete","English_name","English_filename","Chinese_name","Chinese_filename","axios","delete","api","invokeUrl","data","User","Case","headers","Authorization","signInUserSession","idToken","jwtToken","then","res","console","log","status","setSnackbar","children","Customer","severity","fetchCases","catch","err","response","window","location","reload","handleFreshButton","JSON","stringify","Date","Create_time","patch","Type","Email","Nationality","DOB","Gender","Ongoing_monitor","Acuris_English","toISOString","slice","replace","processRowUpdate","useCallback","IDExpiry","moment","format","Contact_number","Mobile","IDType","IDNumber","Residential_address","Permanent_address","Correspondence_address","Tax_resident_country","Tax_number","Tax_type","Tax_country","Annual_income_source_1","Source_of_wealth_1","Currency_1","Estimated_networth_1","Annual_income_source_2","Source_of_wealth_2","Currency_2","Estimated_networth_2","Annual_income_source_3","Source_of_wealth_3","Currency_3","Estimated_networth_3","Employer_name","Occupation","Position","Proof_of_professional_investment_asset","handleProcessRowUpdateError","error","notes","setNotes","auditNotes","setAuditNotes","showLogTable","setShowLogTable","columns","field","headerName","description","sortable","disableExport","width","renderCell","params","IconButton","onClick","url","handleReview","row","variant","editable","type","renderHeader","role","hideable","Boolean","value","substring","Button","size","downloadSearchResult","valueFormatter","utcDate","localDate","getTime","getTimezoneOffset","year","getFullYear","month","String","getMonth","padStart","day","getDate","hours","getHours","minutes","getMinutes","seconds","getSeconds","valueOptions","map","code","filter","importColumns","Import_filename","Import_log","urlstr","filename","encodedFilename","encodeURIComponent","downloadUrl","method","Url","URL","requestInfo","attributes","email","get","Cases","useEffect","fetchData","interval","setInterval","clearInterval","fetchProfileData","profileData","User_email","Admin","Enable_Google","Monitor_freq","fetchAuditCases","setSelectedFile","setFileUploaded","setLogFile","snackbar","handleCloseSnackbar","Box","sx","margin","height","CircularProgress","position","top","left","transform","DataGrid","initialState","sorting","sortModel","sort","pagination","paginationModel","pageSize","disableRowSelectionOnClick","onProcessRowUpdateError","rows","pageSizeOptions","getRowId","slots","toolbar","fileName","now","formattedDate","toString","generateFilename","GridToolbarContainer","GridToolbarColumnsButton","GridToolbarFilterButton","GridToolbarDensitySelector","GridToolbarExport","csvOptions","utf8WithBom","allColumns","style","flex","GridToolbarQuickFilter","getRowHeight","autoHeight","display","id","onChange","event","target","files","formData","FormData","file_name","name","test","append","post","htmlFor","mt","mx","startIcon","component","link","document","createElement","download","href","click","endIcon","paddingTop","Dialog","onClose","DialogTitle","DialogContent","DialogContentText","DialogActions","autoFocus","Snackbar","anchorOrigin","vertical","horizontal","autoHideDuration","Alert","sleep","ms","Promise","resolve","setTimeout","Create","setDOB","setIDExpiry","setCustomer","setType","setEnglish_name","setChinese_name","setEmail","setContact_number","setMobile","setNationality","setIDType","setIDNumber","setResidential_address","setPermanent_address","setCorrespondence_address","setTax_resident_country","setTax_number","setTax_type","setTax_country","setAnnual_income_source_1","setSource_of_wealth_1","setCurrency_1","setEstimated_networth_1","setAnnual_income_source_2","setSource_of_wealth_2","setCurrency_2","setEstimated_networth_2","setAnnual_income_source_3","setSource_of_wealth_3","setCurrency_3","setEstimated_networth_3","setEmployer_name","setOccupation","setPosition","setProof_of_professional_investment_asset","setGender","setOngoing_monitor","English_name_error","setEnglish_name_error","English_name_errortext","setEnglish_name_errortext","Customer_name_error","Customer_name_errortext","trim","English_name_label","setEnglish_name_label","Chinese_name_label","setChinese_name_label","Email_error","setEmail_error","Email_errortext","setEmail_errortext","emailRegEx","Contact_number_error","setContact_number_error","Contact_number_errortext","setContact_number_errortext","telRegEx","Mobile_error","setMobile_error","Mobile_errortext","setMobile_errortext","handleSubmit","e","preventDefault","match","userid","caseid","Container","noValidate","autoComplete","onSubmit","Grid","container","rowSpacing","spacing","item","xs","sm","md","Typography","FormLabel","RadioGroup","defaultValue","FormControlLabel","control","Radio","label","Autocomplete","options","Set","option","freeSolo","autoSelect","renderInput","TextField","inputProps","maxLength","fullWidth","helperText","LocalizationProvider","dateAdapter","AdapterMoment","DesktopDatePicker","disableFuture","slotProps","textField","newValue","disablePortal","getOptionLabel","isOptionEqualToValue","renderOption","props","mr","flexShrink","loading","src","toLowerCase","srcSet","alt","pt","pb","FormGroup","Checkbox","color","EditTextarea","colDef","hasFocus","valueState","setValueState","anchorEl","setAnchorEl","inputRef","setInputRef","apiRef","useGridApiContext","focus","handleRef","el","handleChange","current","setEditCellValue","debounceMs","alignSelf","ref","computedWidth","Popper","placement","Paper","elevation","p","minWidth","InputBase","multiline","textarea","resize","multilineColumn","renderEditCell","Avatar","Profile_image","valueGetter","prefix","split","MonitorDateSlider","today","isLeapYear","daysInYear","endOfFebruary","todayDayOfYear","Math","floor","toLocaleDateString","handleLabel","marks","Array","from","length","_","index","firstDayOfMonth","generateMarks","alignItems","gutterBottom","marginLeft","Slider","max","getAriaValueText","valueLabelDisplay","valueLabelFormat","Monitor","handleRowEditCommit","updateRow","isNew","Monitoring","Name","QR_Code","Version","Status","Match_name","Risk","Remarks","Score","parseInt","setRows","finally","useParams","backgroundColor","filterModel","items","quickFilterValues","quickFilterExcludeHiddenColumns","quickFilterLogicOperator","GridLogicOperator","Or","getRowClassName","experimentalFeatures","newEditingApi","onCellEditStop","reason","GridCellEditStopReasons","enterKeyDown","key","isKeyboardEvent","ctrlKey","metaKey","defaultMuiPrevented","GridToolbar","showQuickFilter","Audit","graphData","setGraphData","previousMonthData","setPreviousMonthData","searchColumns","getNotesData","table_data","getGraphData","graph_data","getPreviousMonthData","previous_month_data","showAdminGraph","setShowAdminGraph","CustomTooltip","active","payload","total","reduce","sum","entry","className","background","padding","border","justifyContent","marginBottom","Card","bgcolor","CardContent","textAlign","Google","Acuris","ResponsiveContainer","BarChart","Object","values","bottom","CartesianGrid","strokeDasharray","XAxis","dataKey","offset","dx","dy","tick","angle","textAnchor","YAxis","Tooltip","content","Legend","wrapperStyle","Bar","stackId","fill","barSize","importFiles","setImportFiles","searchFiles","setSearchFiles","fetchTempFiles","getImportFiles","Import","getSearchFiles","Search","fetchFiles","marginTop","maxWidth","fontWeight","timestamp","minutes_since_creation","search_type","file_user","ProfileModal","disclaimerConfirmed","setDisclaimerConfirmed","userEmails","setUserEmails","origtype","setOrigType","brNumber","setBRNumber","contactNumber","setContactNumber","userEmailChanged","SetUserEmailChanged","scrollEnd","setScrollEnd","isProfileFilled","handleSave","SaveSupportingUserMail","user_emails","Profile_type","BR_number","Profile_contact_number","Disclaimer_confirmed","profileType","getInitialMonitor","Modal","maxHeight","boxShadow","overflow","select","disabled","MenuItem","overflowY","onScroll","scrollHeight","scrollTop","clientHeight","ml","checked","borderRadius","drawerWidth","openedMixin","theme","transition","transitions","create","easing","sharp","duration","enteringScreen","overflowX","closedMixin","leavingScreen","breakpoints","up","DrawerHeader","styled","mixins","AppBar","MuiAppBar","shouldForwardProp","prop","zIndex","drawer","Drawer","MuiDrawer","whiteSpace","boxSizing","Layout","route","useTheme","useLocation","styles","menuItems","text","icon","AddCircleOutlineOutlined","path","SubjectOutlined","profileModalOpen","setProfileModalOpen","Toolbar","edge","marginRight","fontSize","logo","flexGrow","Stack","direction","textTransform","palette","secondary","main","Divider","List","ListItem","button","pathname","ListItemIcon","ListItemText","primary","Login","state","View","Authenticator","RequireAuth","to","modalContainer","modalContent","imageContainer","image","heading","MaintenanceModal","isOpen","maintenanceImage","MyRoutes","exact","element","App","isMaintenanceModalOpen","Provider","awsmobile","Amplify","configure","awsExports","getElementById","Error","ReactDOM","createRoot","render","StrictMode"],"mappings":"igBACaA,EAAe,CAC1B,CAAC,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AgC,GAChC,8BAAiC,CAC7B,QACA,QAEJ,8BAAiC,MACjC,sBAAyB,CACrB,OAEJ,yCAA4C,CACxC,wBAA2B,EAC3B,yBAA4B,IAEhC,oCAAuC,CACnC,U,OCpBRC,EAAQC,UAAUC,IAElB,IAAMhS,GAAKpK,SAASqc,eAAe,QACnC,GAAW,OAAPjS,GAAa,MAAM,IAAIkS,MAAM,wCAEpBC,IAASC,WAAWpS,IAC5BqS,OACH,cAAC,IAAMC,WAAP,UACE,cAAC,GAAD,S","file":"static/js/main.ffa645ee.chunk.js","sourcesContent":["//Reference: https://openexchangerates.org/api/currencies.json\r\nexport const currencyList = [\r\n {\"code\": \"\", \"name\":\"\"},\r\n {\"code\": \"USD\", \"name\": \"United States Dollar\"},\r\n {\"code\": \"HKD\", \"name\": \"Hong Kong Dollar\"},\r\n {\"code\": \"AED\", \"name\": \"United Arab Emirates Dirham\"},\r\n {\"code\": \"AFN\", \"name\": \"Afghan Afghani\"},\r\n {\"code\": \"ALL\", \"name\": \"Albanian Lek\"},\r\n {\"code\": \"AMD\", \"name\": \"Armenian Dram\"},\r\n {\"code\": \"ANG\", \"name\": \"Netherlands Antillean Guilder\"},\r\n {\"code\": \"AOA\", \"name\": \"Angolan Kwanza\"},\r\n {\"code\": \"ARS\", \"name\": \"Argentine Peso\"},\r\n {\"code\": \"AUD\", \"name\": \"Australian Dollar\"},\r\n {\"code\": \"AWG\", \"name\": \"Aruban Florin\"},\r\n {\"code\": \"AZN\", \"name\": \"Azerbaijani Manat\"},\r\n {\"code\": \"BAM\", \"name\": \"Bosnia-Herzegovina Convertible Mark\"},\r\n {\"code\": \"BBD\", \"name\": \"Barbadian Dollar\"},\r\n {\"code\": \"BDT\", \"name\": \"Bangladeshi Taka\"},\r\n {\"code\": \"BGN\", \"name\": \"Bulgarian Lev\"},\r\n {\"code\": \"BHD\", \"name\": \"Bahraini Dinar\"},\r\n {\"code\": \"BIF\", \"name\": \"Burundian Franc\"},\r\n {\"code\": \"BMD\", \"name\": \"Bermudan Dollar\"},\r\n {\"code\": \"BND\", \"name\": \"Brunei Dollar\"},\r\n {\"code\": \"BOB\", \"name\": \"Bolivian Boliviano\"},\r\n {\"code\": \"BRL\", \"name\": \"Brazilian Real\"},\r\n {\"code\": \"BSD\", \"name\": \"Bahamian Dollar\"},\r\n {\"code\": \"BTC\", \"name\": \"Bitcoin\"},\r\n {\"code\": \"BTN\", \"name\": \"Bhutanese Ngultrum\"},\r\n {\"code\": \"BWP\", \"name\": \"Botswanan Pula\"},\r\n {\"code\": \"BYN\", \"name\": \"Belarusian Ruble\"},\r\n {\"code\": \"BZD\", \"name\": \"Belize Dollar\"},\r\n {\"code\": \"CAD\", \"name\": \"Canadian Dollar\"},\r\n {\"code\": \"CDF\", \"name\": \"Congolese Franc\"},\r\n {\"code\": \"CHF\", \"name\": \"Swiss Franc\"},\r\n {\"code\": \"CLF\", \"name\": \"Chilean Unit of Account (UF)\"},\r\n {\"code\": \"CLP\", \"name\": \"Chilean Peso\"},\r\n {\"code\": \"CNH\", \"name\": \"Chinese Yuan (Offshore)\"},\r\n {\"code\": \"CNY\", \"name\": \"Chinese Yuan\"},\r\n {\"code\": \"COP\", \"name\": \"Colombian Peso\"},\r\n {\"code\": \"CRC\", \"name\": \"Costa Rican Colón\"},\r\n {\"code\": \"CUC\", \"name\": \"Cuban Convertible Peso\"},\r\n {\"code\": \"CUP\", \"name\": \"Cuban Peso\"},\r\n {\"code\": \"CVE\", \"name\": \"Cape Verdean Escudo\"},\r\n {\"code\": \"CZK\", \"name\": \"Czech Republic Koruna\"},\r\n {\"code\": \"DJF\", \"name\": \"Djiboutian Franc\"},\r\n {\"code\": \"DKK\", \"name\": \"Danish Krone\"},\r\n {\"code\": \"DOP\", \"name\": \"Dominican Peso\"},\r\n {\"code\": \"DZD\", \"name\": \"Algerian Dinar\"},\r\n {\"code\": \"EGP\", \"name\": \"Egyptian Pound\"},\r\n {\"code\": \"ERN\", \"name\": \"Eritrean Nakfa\"},\r\n {\"code\": \"ETB\", \"name\": \"Ethiopian Birr\"},\r\n {\"code\": \"EUR\", \"name\": \"Euro\"},\r\n {\"code\": \"FJD\", \"name\": \"Fijian Dollar\"},\r\n {\"code\": \"FKP\", \"name\": \"Falkland Islands Pound\"},\r\n {\"code\": \"GBP\", \"name\": \"British Pound Sterling\"},\r\n {\"code\": \"GEL\", \"name\": \"Georgian Lari\"},\r\n {\"code\": \"GGP\", \"name\": \"Guernsey Pound\"},\r\n {\"code\": \"GHS\", \"name\": \"Ghanaian Cedi\"},\r\n {\"code\": \"GIP\", \"name\": \"Gibraltar Pound\"},\r\n {\"code\": \"GMD\", \"name\": \"Gambian Dalasi\"},\r\n {\"code\": \"GNF\", \"name\": \"Guinean Franc\"},\r\n {\"code\": \"GTQ\", \"name\": \"Guatemalan Quetzal\"},\r\n {\"code\": \"GYD\", \"name\": \"Guyanaese Dollar\"},\r\n {\"code\": \"HNL\", \"name\": \"Honduran Lempira\"},\r\n {\"code\": \"HRK\", \"name\": \"Croatian Kuna\"},\r\n {\"code\": \"HTG\", \"name\": \"Haitian Gourde\"},\r\n {\"code\": \"HUF\", \"name\": \"Hungarian Forint\"},\r\n {\"code\": \"IDR\", \"name\": \"Indonesian Rupiah\"},\r\n {\"code\": \"ILS\", \"name\": \"Israeli New Sheqel\"},\r\n {\"code\": \"IMP\", \"name\": \"Manx pound\"},\r\n {\"code\": \"INR\", \"name\": \"Indian Rupee\"},\r\n {\"code\": \"IQD\", \"name\": \"Iraqi Dinar\"},\r\n {\"code\": \"IRR\", \"name\": \"Iranian Rial\"},\r\n {\"code\": \"ISK\", \"name\": \"Icelandic Króna\"},\r\n {\"code\": \"JEP\", \"name\": \"Jersey Pound\"},\r\n {\"code\": \"JMD\", \"name\": \"Jamaican Dollar\"},\r\n {\"code\": \"JOD\", \"name\": \"Jordanian Dinar\"},\r\n {\"code\": \"JPY\", \"name\": \"Japanese Yen\"},\r\n {\"code\": \"KES\", \"name\": \"Kenyan Shilling\"},\r\n {\"code\": \"KGS\", \"name\": \"Kyrgystani Som\"},\r\n {\"code\": \"KHR\", \"name\": \"Cambodian Riel\"},\r\n {\"code\": \"KMF\", \"name\": \"Comorian Franc\"},\r\n {\"code\": \"KPW\", \"name\": \"North Korean Won\"},\r\n {\"code\": \"KRW\", \"name\": \"South Korean Won\"},\r\n {\"code\": \"KWD\", \"name\": \"Kuwaiti Dinar\"},\r\n {\"code\": \"KYD\", \"name\": \"Cayman Islands Dollar\"},\r\n {\"code\": \"KZT\", \"name\": \"Kazakhstani Tenge\"},\r\n {\"code\": \"LAK\", \"name\": \"Laotian Kip\"},\r\n {\"code\": \"LBP\", \"name\": \"Lebanese Pound\"},\r\n {\"code\": \"LKR\", \"name\": \"Sri Lankan Rupee\"},\r\n {\"code\": \"LRD\", \"name\": \"Liberian Dollar\"},\r\n {\"code\": \"LSL\", \"name\": \"Lesotho Loti\"},\r\n {\"code\": \"LYD\", \"name\": \"Libyan Dinar\"},\r\n {\"code\": \"MAD\", \"name\": \"Moroccan Dirham\"},\r\n {\"code\": \"MDL\", \"name\": \"Moldovan Leu\"},\r\n {\"code\": \"MGA\", \"name\": \"Malagasy Ariary\"},\r\n {\"code\": \"MKD\", \"name\": \"Macedonian Denar\"},\r\n {\"code\": \"MMK\", \"name\": \"Myanma Kyat\"},\r\n {\"code\": \"MNT\", \"name\": \"Mongolian Tugrik\"},\r\n {\"code\": \"MOP\", \"name\": \"Macanese Pataca\"},\r\n {\"code\": \"MRO\", \"name\": \"Mauritanian Ouguiya (pre-2018)\"},\r\n {\"code\": \"MRU\", \"name\": \"Mauritanian Ouguiya\"},\r\n {\"code\": \"MUR\", \"name\": \"Mauritian Rupee\"},\r\n {\"code\": \"MVR\", \"name\": \"Maldivian Rufiyaa\"},\r\n {\"code\": \"MWK\", \"name\": \"Malawian Kwacha\"},\r\n {\"code\": \"MXN\", \"name\": \"Mexican Peso\"},\r\n {\"code\": \"MYR\", \"name\": \"Malaysian Ringgit\"},\r\n {\"code\": \"MZN\", \"name\": \"Mozambican Metical\"},\r\n {\"code\": \"NAD\", \"name\": \"Namibian Dollar\"},\r\n {\"code\": \"NGN\", \"name\": \"Nigerian Naira\"},\r\n {\"code\": \"NIO\", \"name\": \"Nicaraguan Córdoba\"},\r\n {\"code\": \"NOK\", \"name\": \"Norwegian Krone\"},\r\n {\"code\": \"NPR\", \"name\": \"Nepalese Rupee\"},\r\n {\"code\": \"NZD\", \"name\": \"New Zealand Dollar\"},\r\n {\"code\": \"OMR\", \"name\": \"Omani Rial\"},\r\n {\"code\": \"PAB\", \"name\": \"Panamanian Balboa\"},\r\n {\"code\": \"PEN\", \"name\": \"Peruvian Nuevo Sol\"},\r\n {\"code\": \"PGK\", \"name\": \"Papua New Guinean Kina\"},\r\n {\"code\": \"PHP\", \"name\": \"Philippine Peso\"},\r\n {\"code\": \"PKR\", \"name\": \"Pakistani Rupee\"},\r\n {\"code\": \"PLN\", \"name\": \"Polish Zloty\"},\r\n {\"code\": \"PYG\", \"name\": \"Paraguayan Guarani\"},\r\n {\"code\": \"QAR\", \"name\": \"Qatari Rial\"},\r\n {\"code\": \"RON\", \"name\": \"Romanian Leu\"},\r\n {\"code\": \"RSD\", \"name\": \"Serbian Dinar\"},\r\n {\"code\": \"RUB\", \"name\": \"Russian Ruble\"},\r\n {\"code\": \"RWF\", \"name\": \"Rwandan Franc\"},\r\n {\"code\": \"SAR\", \"name\": \"Saudi Riyal\"},\r\n {\"code\": \"SBD\", \"name\": \"Solomon Islands Dollar\"},\r\n {\"code\": \"SCR\", \"name\": \"Seychellois Rupee\"},\r\n {\"code\": \"SDG\", \"name\": \"Sudanese Pound\"},\r\n {\"code\": \"SEK\", \"name\": \"Swedish Krona\"},\r\n {\"code\": \"SGD\", \"name\": \"Singapore Dollar\"},\r\n {\"code\": \"SHP\", \"name\": \"Saint Helena Pound\"},\r\n {\"code\": \"SLL\", \"name\": \"Sierra Leonean Leone\"},\r\n {\"code\": \"SOS\", \"name\": \"Somali Shilling\"},\r\n {\"code\": \"SRD\", \"name\": \"Surinamese Dollar\"},\r\n {\"code\": \"SSP\", \"name\": \"South Sudanese Pound\"},\r\n {\"code\": \"STD\", \"name\": \"São Tomé and Príncipe Dobra (pre-2018)\"},\r\n {\"code\": \"STN\", \"name\": \"São Tomé and Príncipe Dobra\"},\r\n {\"code\": \"SVC\", \"name\": \"Salvadoran Colón\"},\r\n {\"code\": \"SYP\", \"name\": \"Syrian Pound\"},\r\n {\"code\": \"SZL\", \"name\": \"Swazi Lilangeni\"},\r\n {\"code\": \"THB\", \"name\": \"Thai Baht\"},\r\n {\"code\": \"TJS\", \"name\": \"Tajikistani Somoni\"},\r\n {\"code\": \"TMT\", \"name\": \"Turkmenistani Manat\"},\r\n {\"code\": \"TND\", \"name\": \"Tunisian Dinar\"},\r\n {\"code\": \"TOP\", \"name\": \"Tongan Pa'anga\"},\r\n {\"code\": \"TRY\", \"name\": \"Turkish Lira\"},\r\n {\"code\": \"TTD\", \"name\": \"Trinidad and Tobago Dollar\"},\r\n {\"code\": \"TWD\", \"name\": \"New Taiwan Dollar\"},\r\n {\"code\": \"TZS\", \"name\": \"Tanzanian Shilling\"},\r\n {\"code\": \"UAH\", \"name\": \"Ukrainian Hryvnia\"},\r\n {\"code\": \"UGX\", \"name\": \"Ugandan Shilling\"},\r\n {\"code\": \"UYU\", \"name\": \"Uruguayan Peso\"},\r\n {\"code\": \"UZS\", \"name\": \"Uzbekistan Som\"},\r\n {\"code\": \"VEF\", \"name\": \"Venezuelan Bolívar Fuerte (Old)\"},\r\n {\"code\": \"VES\", \"name\": \"Venezuelan Bolívar Soberano\"},\r\n {\"code\": \"VND\", \"name\": \"Vietnamese Dong\"},\r\n {\"code\": \"VUV\", \"name\": \"Vanuatu Vatu\"},\r\n {\"code\": \"WST\", \"name\": \"Samoan Tala\"},\r\n {\"code\": \"XAF\", \"name\": \"CFA Franc BEAC\"},\r\n {\"code\": \"XAG\", \"name\": \"Silver Ounce\"},\r\n {\"code\": \"XAU\", \"name\": \"Gold Ounce\"},\r\n {\"code\": \"XCD\", \"name\": \"East Caribbean Dollar\"},\r\n {\"code\": \"XDR\", \"name\": \"Special Drawing Rights\"},\r\n {\"code\": \"XOF\", \"name\": \"CFA Franc BCEAO\"},\r\n {\"code\": \"XPD\", \"name\": \"Palladium Ounce\"},\r\n {\"code\": \"XPF\", \"name\": \"CFP Franc\"},\r\n {\"code\": \"XPT\", \"name\": \"Platinum Ounce\"},\r\n {\"code\": \"YER\", \"name\": \"Yemeni Rial\"},\r\n {\"code\": \"ZAR\", \"name\": \"South African Rand\"},\r\n {\"code\": \"ZMW\", \"name\": \"Zambian Kwacha\"},\r\n {\"code\": \"ZWL\", \"name\": \"Zimbabwean Dollar\"},\r\n];\r\n\r\n","// Reference: https://www.gov.uk/government/publications/nationalities\r\n// Reference: https://stackoverflow.com/questions/8849357/add-quotation-at-the-start-and-end-of-each-line-in-notepad\r\n// 27 May 2022 https://gist.github.com/almost/7748738\r\nexport const nationalityList = [\r\n {\"name\": \"\", \"code\": \"\"}, \r\n {\"name\": \"Australia\", \"code\": \"AU\"},\r\n {\"name\": \"China\", \"code\": \"CN\"},\r\n {\"name\": \"Hong Kong\", \"code\": \"HK\"},\r\n {\"name\": \"Japan\", \"code\": \"JP\"},\r\n {\"name\": \"Singapore\", \"code\": \"SG\"},\r\n {\"name\": \"United Kingdom\", \"code\": \"GB\"},\r\n {\"name\": \"United States\", \"code\": \"US\"},\r\n {\"name\": \"Afghanistan\", \"code\": \"AF\"},\r\n {\"name\": \"Albania\", \"code\": \"AL\"},\r\n {\"name\": \"Algeria\", \"code\": \"DZ\"},\r\n {\"name\": \"American Samoa\", \"code\": \"AS\"},\r\n {\"name\": \"Andorra\", \"code\": \"AD\"},\r\n {\"name\": \"Angola\", \"code\": \"AO\"},\r\n {\"name\": \"Anguilla\", \"code\": \"AI\"},\r\n {\"name\": \"Antigua and Barbuda\", \"code\": \"AG\"},\r\n {\"name\": \"Argentina\", \"code\": \"AR\"},\r\n {\"name\": \"Armenia\", \"code\": \"AM\"},\r\n {\"name\": \"Aruba\", \"code\": \"AW\"},\r\n {\"name\": \"Austria\", \"code\": \"AT\"},\r\n {\"name\": \"Azerbaijan\", \"code\": \"AZ\"},\r\n {\"name\": \"Bahamas\", \"code\": \"BS\"},\r\n {\"name\": \"Bahrain\", \"code\": \"BH\"},\r\n {\"name\": \"Bangladesh\", \"code\": \"BD\"},\r\n {\"name\": \"Barbados\", \"code\": \"BB\"},\r\n {\"name\": \"Belarus\", \"code\": \"BY\"},\r\n {\"name\": \"Belgium\", \"code\": \"BE\"},\r\n {\"name\": \"Belize\", \"code\": \"BZ\"},\r\n {\"name\": \"Benin\", \"code\": \"BJ\"},\r\n {\"name\": \"Bermuda\", \"code\": \"BM\"},\r\n {\"name\": \"Bhutan\", \"code\": \"BT\"},\r\n {\"name\": \"Bolivia\", \"code\": \"BO\"},\r\n {\"name\": \"Bosnia and Herzegovina\", \"code\": \"BA\"},\r\n {\"name\": \"Botswana\", \"code\": \"BW\"},\r\n {\"name\": \"Brazil\", \"code\": \"BR\"},\r\n {\"name\": \"Brunei Darussalam\", \"code\": \"BN\"},\r\n {\"name\": \"Bulgaria\", \"code\": \"BG\"},\r\n {\"name\": \"Burkina Faso\", \"code\": \"BF\"},\r\n {\"name\": \"Burundi\", \"code\": \"BI\"},\r\n {\"name\": \"Cambodia\", \"code\": \"KH\"},\r\n {\"name\": \"Cameroon\", \"code\": \"CM\"},\r\n {\"name\": \"Canada\", \"code\": \"CA\"},\r\n {\"name\": \"Cape Verde\", \"code\": \"CV\"},\r\n {\"name\": \"Cayman Islands\", \"code\": \"KY\"},\r\n {\"name\": \"Central African Republic\", \"code\": \"CF\"},\r\n {\"name\": \"Chad\", \"code\": \"TD\"},\r\n {\"name\": \"Chile\", \"code\": \"CL\"},\r\n {\"name\": \"Colombia\", \"code\": \"CO\"},\r\n {\"name\": \"Comoros\", \"code\": \"KM\"},\r\n {\"name\": \"Congo\", \"code\": \"CG\"},\r\n {\"name\": \"Congo, The Democratic Republic of the\", \"code\": \"CD\"},\r\n {\"name\": \"Cook Islands\", \"code\": \"CK\"},\r\n {\"name\": \"Costa Rica\", \"code\": \"CR\"},\r\n {\"name\": \"Cote D\\\"Ivoire\", \"code\": \"CI\"},\r\n {\"name\": \"Croatia\", \"code\": \"HR\"},\r\n {\"name\": \"Cuba\", \"code\": \"CU\"},\r\n {\"name\": \"Cyprus\", \"code\": \"CY\"},\r\n {\"name\": \"Czech Republic\", \"code\": \"CZ\"},\r\n {\"name\": \"Denmark\", \"code\": \"DK\"},\r\n {\"name\": \"Djibouti\", \"code\": \"DJ\"},\r\n {\"name\": \"Dominica\", \"code\": \"DM\"},\r\n {\"name\": \"Dominican Republic\", \"code\": \"DO\"},\r\n {\"name\": \"Ecuador\", \"code\": \"EC\"},\r\n {\"name\": \"Egypt\", \"code\": \"EG\"},\r\n {\"name\": \"El Salvador\", \"code\": \"SV\"},\r\n {\"name\": \"Equatorial Guinea\", \"code\": \"GQ\"},\r\n {\"name\": \"Eritrea\", \"code\": \"ER\"},\r\n {\"name\": \"Estonia\", \"code\": \"EE\"},\r\n {\"name\": \"Ethiopia\", \"code\": \"ET\"},\r\n {\"name\": \"Faroe Islands\", \"code\": \"FO\"},\r\n {\"name\": \"Fiji\", \"code\": \"FJ\"},\r\n {\"name\": \"Finland\", \"code\": \"FI\"},\r\n {\"name\": \"France\", \"code\": \"FR\"},\r\n {\"name\": \"French Guiana\", \"code\": \"GF\"},\r\n {\"name\": \"French Polynesia\", \"code\": \"PF\"},\r\n {\"name\": \"Gabon\", \"code\": \"GA\"},\r\n {\"name\": \"Gambia\", \"code\": \"GM\"},\r\n {\"name\": \"Georgia\", \"code\": \"GE\"},\r\n {\"name\": \"Germany\", \"code\": \"DE\"},\r\n {\"name\": \"Ghana\", \"code\": \"GH\"},\r\n {\"name\": \"Gibraltar\", \"code\": \"GI\"},\r\n {\"name\": \"Greece\", \"code\": \"GR\"},\r\n {\"name\": \"Greenland\", \"code\": \"GL\"},\r\n {\"name\": \"Grenada\", \"code\": \"GD\"},\r\n {\"name\": \"Guadeloupe\", \"code\": \"GP\"},\r\n {\"name\": \"Guam\", \"code\": \"GU\"},\r\n {\"name\": \"Guatemala\", \"code\": \"GT\"},\r\n {\"name\": \"Guernsey\", \"code\": \"GG\"},\r\n {\"name\": \"Guinea\", \"code\": \"GN\"},\r\n {\"name\": \"Guinea-Bissau\", \"code\": \"GW\"},\r\n {\"name\": \"Guyana\", \"code\": \"GY\"},\r\n {\"name\": \"Haiti\", \"code\": \"HT\"},\r\n {\"name\": \"Holy See (Vatican City State)\", \"code\": \"VA\"},\r\n {\"name\": \"Honduras\", \"code\": \"HN\"},\r\n {\"name\": \"Hungary\", \"code\": \"HU\"},\r\n {\"name\": \"Iceland\", \"code\": \"IS\"},\r\n {\"name\": \"India\", \"code\": \"IN\"},\r\n {\"name\": \"Indonesia\", \"code\": \"ID\"},\r\n {\"name\": \"Iran, Islamic Republic Of\", \"code\": \"IR\"},\r\n {\"name\": \"Iraq\", \"code\": \"IQ\"},\r\n {\"name\": \"Ireland\", \"code\": \"IE\"},\r\n {\"name\": \"Isle of Man\", \"code\": \"IM\"},\r\n {\"name\": \"Israel\", \"code\": \"IL\"},\r\n {\"name\": \"Italy\", \"code\": \"IT\"},\r\n {\"name\": \"Jamaica\", \"code\": \"JM\"},\r\n {\"name\": \"Jersey\", \"code\": \"JE\"},\r\n {\"name\": \"Jordan\", \"code\": \"JO\"},\r\n {\"name\": \"Kazakhstan\", \"code\": \"KZ\"},\r\n {\"name\": \"Kenya\", \"code\": \"KE\"},\r\n {\"name\": \"Kiribati\", \"code\": \"KI\"},\r\n {\"name\": \"Korea, Democratic People\\\"S Republic of\", \"code\": \"KP\"},\r\n {\"name\": \"Korea, Republic of\", \"code\": \"KR\"},\r\n {\"name\": \"Kuwait\", \"code\": \"KW\"},\r\n {\"name\": \"Kyrgyzstan\", \"code\": \"KG\"},\r\n {\"name\": \"Lao People\\\"S Democratic Republic\", \"code\": \"LA\"},\r\n {\"name\": \"Latvia\", \"code\": \"LV\"},\r\n {\"name\": \"Lebanon\", \"code\": \"LB\"},\r\n {\"name\": \"Lesotho\", \"code\": \"LS\"},\r\n {\"name\": \"Liberia\", \"code\": \"LR\"},\r\n {\"name\": \"Libyan Arab Jamahiriya\", \"code\": \"LY\"},\r\n {\"name\": \"Liechtenstein\", \"code\": \"LI\"},\r\n {\"name\": \"Lithuania\", \"code\": \"LT\"},\r\n {\"name\": \"Luxembourg\", \"code\": \"LU\"},\r\n {\"name\": \"Macao\", \"code\": \"MO\"},\r\n {\"name\": \"Macedonia, The Former Yugoslav Republic of\", \"code\": \"MK\"},\r\n {\"name\": \"Madagascar\", \"code\": \"MG\"},\r\n {\"name\": \"Malawi\", \"code\": \"MW\"},\r\n {\"name\": \"Malaysia\", \"code\": \"MY\"},\r\n {\"name\": \"Maldives\", \"code\": \"MV\"},\r\n {\"name\": \"Mali\", \"code\": \"ML\"},\r\n {\"name\": \"Malta\", \"code\": \"MT\"},\r\n {\"name\": \"Marshall Islands\", \"code\": \"MH\"},\r\n {\"name\": \"Martinique\", \"code\": \"MQ\"},\r\n {\"name\": \"Mauritania\", \"code\": \"MR\"},\r\n {\"name\": \"Mauritius\", \"code\": \"MU\"},\r\n {\"name\": \"Mayotte\", \"code\": \"YT\"},\r\n {\"name\": \"Mexico\", \"code\": \"MX\"},\r\n {\"name\": \"Micronesia, Federated States of\", \"code\": \"FM\"},\r\n {\"name\": \"Moldova, Republic of\", \"code\": \"MD\"},\r\n {\"name\": \"Monaco\", \"code\": \"MC\"},\r\n {\"name\": \"Mongolia\", \"code\": \"MN\"},\r\n {\"name\": \"Montenegro\", \"code\": \"ME\"},\r\n {\"name\": \"Montserrat\", \"code\": \"MS\"},\r\n {\"name\": \"Morocco\", \"code\": \"MA\"},\r\n {\"name\": \"Mozambique\", \"code\": \"MZ\"},\r\n {\"name\": \"Myanmar\", \"code\": \"MM\"},\r\n {\"name\": \"Namibia\", \"code\": \"NA\"},\r\n {\"name\": \"Nauru\", \"code\": \"NR\"},\r\n {\"name\": \"Nepal\", \"code\": \"NP\"},\r\n {\"name\": \"Netherlands\", \"code\": \"NL\"},\r\n {\"name\": \"New Caledonia\", \"code\": \"NC\"},\r\n {\"name\": \"New Zealand\", \"code\": \"NZ\"},\r\n {\"name\": \"Nicaragua\", \"code\": \"NI\"},\r\n {\"name\": \"Niger\", \"code\": \"NE\"},\r\n {\"name\": \"Nigeria\", \"code\": \"NG\"},\r\n {\"name\": \"Niue\", \"code\": \"NU\"},\r\n {\"name\": \"Norfolk Island\", \"code\": \"NF\"},\r\n {\"name\": \"Northern Mariana Islands\", \"code\": \"MP\"},\r\n {\"name\": \"Norway\", \"code\": \"NO\"},\r\n {\"name\": \"Oman\", \"code\": \"OM\"},\r\n {\"name\": \"Pakistan\", \"code\": \"PK\"},\r\n {\"name\": \"Palau\", \"code\": \"PW\"},\r\n {\"name\": \"Palestinian Territory, Occupied\", \"code\": \"PS\"},\r\n {\"name\": \"Panama\", \"code\": \"PA\"},\r\n {\"name\": \"Papua New Guinea\", \"code\": \"PG\"},\r\n {\"name\": \"Paraguay\", \"code\": \"PY\"},\r\n {\"name\": \"Peru\", \"code\": \"PE\"},\r\n {\"name\": \"Philippines\", \"code\": \"PH\"},\r\n {\"name\": \"Poland\", \"code\": \"PL\"},\r\n {\"name\": \"Portugal\", \"code\": \"PT\"},\r\n {\"name\": \"Puerto Rico\", \"code\": \"PR\"},\r\n {\"name\": \"Qatar\", \"code\": \"QA\"},\r\n {\"name\": \"Reunion\", \"code\": \"RE\"},\r\n {\"name\": \"Romania\", \"code\": \"RO\"},\r\n {\"name\": \"Russian Federation\", \"code\": \"RU\"},\r\n {\"name\": \"Rwanda\", \"code\": \"RW\"},\r\n {\"name\": \"Saint Kitts and Nevis\", \"code\": \"KN\"},\r\n {\"name\": \"Saint Lucia\", \"code\": \"LC\"},\r\n {\"name\": \"Saint Pierre and Miquelon\", \"code\": \"PM\"},\r\n {\"name\": \"Saint Vincent and the Grenadines\", \"code\": \"VC\"},\r\n {\"name\": \"Samoa\", \"code\": \"WS\"},\r\n {\"name\": \"San Marino\", \"code\": \"SM\"},\r\n {\"name\": \"Sao Tome and Principe\", \"code\": \"ST\"},\r\n {\"name\": \"Saudi Arabia\", \"code\": \"SA\"},\r\n {\"name\": \"Senegal\", \"code\": \"SN\"},\r\n {\"name\": \"Serbia\", \"code\": \"RS\"},\r\n {\"name\": \"Seychelles\", \"code\": \"SC\"},\r\n {\"name\": \"Sierra Leone\", \"code\": \"SL\"},\r\n {\"name\": \"Slovakia\", \"code\": \"SK\"},\r\n {\"name\": \"Slovenia\", \"code\": \"SI\"},\r\n {\"name\": \"Solomon Islands\", \"code\": \"SB\"},\r\n {\"name\": \"Somalia\", \"code\": \"SO\"},\r\n {\"name\": \"South Africa\", \"code\": \"ZA\"},\r\n {\"name\": \"Spain\", \"code\": \"ES\"},\r\n {\"name\": \"Sri Lanka\", \"code\": \"LK\"},\r\n {\"name\": \"Sudan\", \"code\": \"SD\"},\r\n {\"name\": \"Suriname\", \"code\": \"SR\"},\r\n {\"name\": \"Swaziland\", \"code\": \"SZ\"},\r\n {\"name\": \"Sweden\", \"code\": \"SE\"},\r\n {\"name\": \"Switzerland\", \"code\": \"CH\"},\r\n {\"name\": \"Syrian Arab Republic\", \"code\": \"SY\"},\r\n {\"name\": \"Taiwan\", \"code\": \"TW\"},\r\n {\"name\": \"Tajikistan\", \"code\": \"TJ\"},\r\n {\"name\": \"Tanzania, United Republic of\", \"code\": \"TZ\"},\r\n {\"name\": \"Thailand\", \"code\": \"TH\"},\r\n {\"name\": \"Timor-Leste\", \"code\": \"TL\"},\r\n {\"name\": \"Togo\", \"code\": \"TG\"},\r\n {\"name\": \"Tonga\", \"code\": \"TO\"},\r\n {\"name\": \"Trinidad and Tobago\", \"code\": \"TT\"},\r\n {\"name\": \"Tunisia\", \"code\": \"TN\"},\r\n {\"name\": \"Turkey\", \"code\": \"TR\"},\r\n {\"name\": \"Turkmenistan\", \"code\": \"TM\"},\r\n {\"name\": \"Turks and Caicos Islands\", \"code\": \"TC\"},\r\n {\"name\": \"Tuvalu\", \"code\": \"TV\"},\r\n {\"name\": \"Uganda\", \"code\": \"UG\"},\r\n {\"name\": \"Ukraine\", \"code\": \"UA\"},\r\n {\"name\": \"United Arab Emirates\", \"code\": \"AE\"},\r\n {\"name\": \"Uruguay\", \"code\": \"UY\"},\r\n {\"name\": \"Uzbekistan\", \"code\": \"UZ\"},\r\n {\"name\": \"Vanuatu\", \"code\": \"VU\"},\r\n {\"name\": \"Venezuela\", \"code\": \"VE\"},\r\n {\"name\": \"Viet Nam\", \"code\": \"VN\"},\r\n {\"name\": \"Virgin Islands, British\", \"code\": \"VG\"},\r\n {\"name\": \"Virgin Islands, U.S.\", \"code\": \"VI\"},\r\n {\"name\": \"Wallis and Futuna\", \"code\": \"WF\"},\r\n {\"name\": \"Western Sahara\", \"code\": \"EH\"},\r\n {\"name\": \"Yemen\", \"code\": \"YE\"},\r\n {\"name\": \"Zambia\", \"code\": \"ZM\"},\r\n {\"name\": \"Zimbabwe\", \"code\": \"ZW\"}\r\n];\r\n","import { useAuthenticator } from \"@aws-amplify/ui-react\";\r\nimport { useNavigate } from 'react-router-dom';\r\nimport { API } from \"aws-amplify\";\r\nimport React, { useEffect, useState } from 'react';\r\nimport Container from '@mui/material/Container';\r\n//install before import: npm install @mui/x-data-grid\r\nimport { DataGrid, GridColDef, GridToolbarContainer, GridToolbarExport, GridToolbar, GridToolbarQuickFilter, gridClasses, GridToolbarColumnsButton, GridToolbarFilterButton, GridToolbarDensitySelector } from '@mui/x-data-grid';\r\nimport Button from '@mui/material/Button';\r\nimport FileUploadOutlinedIcon from '@mui/icons-material/FileUploadOutlined';\r\nimport axios from 'axios';\r\nimport {currencyList} from './Lists/currencyList';\r\nimport {nationalityList} from './Lists/nationalityList';\r\nimport RateReviewIcon from '@mui/icons-material/RateReview';\r\nimport DeleteIcon from \"@mui/icons-material/Delete\";\r\nimport RefreshIcon from \"@mui/icons-material/Refresh\";\r\nimport { IconButton } from \"@mui/material\";\r\nimport Dialog from '@mui/material/Dialog';\r\nimport DialogActions from '@mui/material/DialogActions';\r\nimport DialogContent from '@mui/material/DialogContent';\r\nimport DialogContentText from '@mui/material/DialogContentText';\r\nimport DialogTitle from '@mui/material/DialogTitle';\r\nimport Box from '@mui/material/Box';\r\nimport VisibilityIcon from '@mui/icons-material/Visibility';\r\nimport VisibilityOffIcon from '@mui/icons-material/VisibilityOff';\r\nimport Snackbar from '@mui/material/Snackbar';\r\nimport Alert from '@mui/material/Alert';\r\nimport RecentActorsIcon from '@mui/icons-material/RecentActors';\r\nimport CircularProgress from '@mui/material/CircularProgress';\r\nimport moment from \"moment/moment\";\r\n\r\nconst config = require('../config.json')\r\n\r\nexport default function Notes() {\r\n //const { route } = useAuthenticator((context) => [context.route]);\r\n const { user, signOut } = useAuthenticator((context) => [\r\n context.user,\r\n context.signOut,\r\n ]);\r\n const navigate = useNavigate();\r\n\r\n const [open, setOpen] = React.useState(false);\r\n const [deletingRow, setDeletingRow] = React.useState(null);\r\n const [isLoading, setIsLoading] = useState(true);\r\n const [userEmail, setUserEmail] = useState('');\r\n const [isAdmin, setAdmin] = useState(false);\r\n const [enableGoogle, setEnableGoogle] = useState(false);\r\n const [monitorFreq, setMonitorFreq] = useState('Disable');\r\n \r\n const handleClickOpen = () => {\r\n setOpen(true);\r\n }\r\n const handleClose = () => {\r\n setOpen(false);\r\n }\r\n const handleConfirmationClose = () => {\r\n setOpen(false);\r\n handleDelete(deletingRow);\r\n }\r\n const handleReview = (newRow) => {\r\n const { Customer, English_name, Chinese_name } = newRow;\r\n const url = (Customer || English_name || Chinese_name)\r\n ? '/monitor/' + (Customer || English_name || Chinese_name) + '/' + (English_name || Chinese_name) + '/' + (Chinese_name || English_name)\r\n : '';\r\n console.log(url);\r\n navigate(url)\r\n } \r\n const handleDeleteConfirmation = (newRow) => {\r\n setDeletingRow(newRow);\r\n handleClickOpen();\r\n }\r\n const handleDelete = (newRow) => {\r\n if (newRow == null) {\r\n return;\r\n }\r\n if (!isAdmin && newRow.English_name !== '' && (typeof(newRow.English_filename) == 'undefined' || newRow.English_filename === 'processing...')) {\r\n setSnackbar({ children: 'Customer: ' + newRow.Customer + ' Name: ' + newRow.English_name + ' ' + newRow.Chinese_name + ' is processing. Please delete it later.', severity: 'warning' });\r\n return;\r\n }\r\n if (!isAdmin && newRow.Chinese_name !== '' && (typeof(newRow.Chinese_filename) == 'undefined' || newRow.Chinese_filename === 'processing...')) {\r\n setSnackbar({ children: 'Customer: ' + newRow.Customer + ' Name: ' + newRow.English_name + ' ' + newRow.Chinese_name + ' is processing. Please delete it later.', severity: 'warning' });\r\n return;\r\n }\r\n let response = axios\r\n .delete(\r\n `${config.api.invokeUrl}`,\r\n {\r\n data: {\r\n User: newRow.User,\r\n Case: newRow.Case,\r\n },\r\n headers: {\r\n \"content-type\": \"application/json\",\r\n Authorization: `${user.signInUserSession.idToken.jwtToken}`,\r\n },\r\n }\r\n )\r\n .then((res) => {\r\n console.log(res.data);\r\n if (res.status === 204 || res.status === 201) {\r\n setSnackbar({ children: 'Customer: ' + newRow.Customer + ' Name: ' + newRow.English_name + ' ' + newRow.Chinese_name + ' deleted successfully. ', severity: 'success' });\r\n }\r\n else {\r\n setSnackbar({ children: 'Customer: ' + newRow.Customer + ' Name: ' + newRow.English_name + ' ' + newRow.Chinese_name + ' delete failed.', severity: 'error' });\r\n }\r\n fetchCases();\r\n })\r\n .catch((err) => {\r\n if (err.response.status === 401 || err.response.status === 403) {\r\n //signOut();\r\n //navigate(\"/login\");\r\n window.location.reload(true);\r\n }\r\n console.log(err);\r\n setSnackbar({ children: 'Customer: ' + newRow.Customer + ' Name: ' + newRow.English_name + ' ' + newRow.Chinese_name + ' delete exception.', severity: 'error' });\r\n });\r\n };\r\n\r\n const handleFreshButton = async (newRow) => {\r\n console.log(JSON.stringify(newRow));\r\n const hoursDiff = (new Date() - new Date(newRow.Create_time))/(1000*60*60);\r\n if (hoursDiff < 24) {\r\n setSnackbar({children: 'Refresh is not necessary with 24 hours.', severity: 'warning' });\r\n return;\r\n }\r\n\r\n let response = await axios\r\n .patch(\r\n `${config.api.invokeUrl}`,\r\n {\r\n //api here\r\n User: newRow.User,\r\n Case: newRow.Case,\r\n English_name: newRow.English_name,\r\n Chinese_name: newRow.Chinese_name,\r\n Customer: newRow.Customer,\r\n Type: newRow.Type,\r\n Email: newRow.Email,\r\n Nationality: newRow.Nationality,\r\n DOB: newRow.DOB,\r\n Gender: newRow.Gender,\r\n Ongoing_monitor: newRow.Ongoing_monitor,\r\n English_filename: \"\",\r\n Chinese_filename: \"\",\r\n Acuris_English: \"\",\r\n Create_time: (new Date()).toISOString().slice(0, 19).replace('T', ' '), //Pass Create_time so that both Acuris and Image_Scraper receives the same time for audit\r\n },\r\n {\r\n headers: {\r\n \"content-type\": \"application/json\",\r\n Authorization: `${user.signInUserSession.idToken.jwtToken}`,\r\n },\r\n }\r\n )\r\n .then((res) => {\r\n if (res.status === 204 || res.status === 201) {\r\n setSnackbar({ children: 'Customer: ' + newRow.Customer + ' Name: ' + newRow.English_name + ' ' + newRow.Chinese_name + ' refreshed successfully. ', severity: 'success' });\r\n }\r\n else {\r\n setSnackbar({ children: 'Customer: ' + newRow.Customer + ' Name: ' + newRow.English_name + ' ' + newRow.Chinese_name + ' refresh failed.', severity: 'error' });\r\n }\r\n fetchCases();\r\n })\r\n .catch((err) => {\r\n if (err.response.status === 401 || err.response.status === 403) {\r\n //signOut();\r\n //navigate(\"/login\");\r\n window.location.reload(true);\r\n }\r\n console.log(err);\r\n setSnackbar({ children: 'Customer: ' + newRow.Customer + ' Name: ' + newRow.English_name + ' ' + newRow.Chinese_name + ' refresh exception.', severity: 'error' });\r\n });\r\n };\r\n\r\n const processRowUpdate = React.useCallback( (newRow) => {\r\n console.log(JSON.stringify(newRow))\r\n if (newRow.IDExpiry) {\r\n newRow.IDExpiry = moment(newRow.IDExpiry).format(\"YYYY-MM-DD\");\r\n }\r\n axios.patch(`${config.api.invokeUrl}`, { //api here\r\n User: newRow.User,\r\n Case: newRow.Case,\r\n Email: newRow.Email, Contact_number: newRow.Contact_number, Mobile: newRow.Mobile, Nationality: newRow.Nationality, \r\n DOB: newRow.DOB, Gender: newRow.Gender, IDType: newRow.IDType, IDNumber: newRow.IDNumber, IDExpiry: newRow.IDExpiry, \r\n Residential_address: newRow.Residential_address, Permanent_address: newRow.Permanent_address, Correspondence_address: newRow.Correspondence_address, \r\n Tax_resident_country: newRow.Tax_resident_country, Tax_number: newRow.Tax_number, Tax_type: newRow.Tax_type, Tax_country: newRow.Tax_country,\r\n Annual_income_source_1: newRow.Annual_income_source_1, Source_of_wealth_1: newRow.Source_of_wealth_1, Currency_1: newRow.Currency_1, Estimated_networth_1: newRow.Estimated_networth_1,\r\n Annual_income_source_2: newRow.Annual_income_source_2, Source_of_wealth_2: newRow.Source_of_wealth_2, Currency_2: newRow.Currency_2, Estimated_networth_2: newRow.Estimated_networth_2,\r\n Annual_income_source_3: newRow.Annual_income_source_3, Source_of_wealth_3: newRow.Source_of_wealth_3, Currency_3: newRow.Currency_3, Estimated_networth_3: newRow.Estimated_networth_3,\r\n Employer_name: newRow.Employer_name, Occupation: newRow.Occupation, Position: newRow.Position, Proof_of_professional_investment_asset: newRow.Proof_of_professional_investment_asset,\r\n Ongoing_monitor:newRow.Ongoing_monitor, \r\n //Remarks: newRow.Remarks, Result: newRow.Result, \r\n //English_filename: newRow.English_filename, Chinese_filename: newRow.Chinese_filename, Acuris_English: newRow.Acuris_English, Create_time: newRow.Create_time, \r\n },{\r\n headers: {\r\n \"content-type\": \"application/json\",\r\n Authorization: `${user.signInUserSession.idToken.jwtToken}`\r\n }\r\n })\r\n .then((res) => {\r\n if (res.status === 204 || res.status === 201) {\r\n setSnackbar({ children: 'Customer: ' + newRow.Customer + ' Name: ' + newRow.English_name + ' ' + newRow.Chinese_name + ' attribute updated successfully. ', severity: 'success' });\r\n }\r\n else {\r\n setSnackbar({ children: 'Customer: ' + newRow.Customer + ' Name: ' + newRow.English_name + ' ' + newRow.Chinese_name + ' attribute updates failed.', severity: 'error' });\r\n }\r\n })\r\n .catch((err) => {\r\n if (err.response.status === 401 || err.response.status === 403) {\r\n //signOut();\r\n //navigate(\"/login\");\r\n window.location.reload(true);\r\n }\r\n console.log(err);\r\n setSnackbar({ children: 'Customer: ' + newRow.Customer + ' Name: ' + newRow.English_name + ' ' + newRow.Chinese_name + ' attribute updates exception.', severity: 'error' });\r\n });\r\n return newRow;\r\n });\r\n\r\n const handleProcessRowUpdateError = React.useCallback((error) => {}, []);\r\n\r\n const [notes, setNotes] = useState([]);\r\n const [auditNotes, setAuditNotes] = useState([]);\r\n const [showLogTable, setShowLogTable] = useState(false);\r\n var showButton;\r\n\r\n const columns = [\r\n //{ field: 'User', headerName:'User', width: 150, hideable: false },\r\n //{ field: 'Case', headerName:'Case', disableExport: true, width: 150 },\r\n {\r\n field: \"Action\",\r\n headerName: \"Action\",\r\n description: \"Actions\",\r\n sortable: false,\r\n disableExport: true,\r\n width: 130,\r\n renderCell: (params) => {\r\n return (\r\n <> \r\n {\r\n handleReview(params.row);\r\n }}\r\n variant=\"contained\"\r\n >\r\n Review\r\n \r\n {\r\n handleFreshButton(params.row);\r\n }}\r\n variant=\"contained\"\r\n >\r\n Refresh\r\n \r\n {\r\n handleDeleteConfirmation(params.row);\r\n }}\r\n variant=\"contained\"\r\n >\r\n Delete\r\n \r\n \r\n );\r\n },\r\n },\r\n (monitorFreq !== 'Disable') && { field: 'Ongoing_monitor', headerName: 'Ongoing_monitor', description:'Editable', width: 150, editable: true, type: 'boolean',\r\n renderHeader: () => ( {'Ongoing_monitor'} 📝 ),\r\n },\r\n { field: 'Customer', headerName: 'Customer', width: 100, hideable: false },\r\n { field: 'Type', headerName: 'Type', width: 100, hideable: false },\r\n { field: 'English_name', headerName: 'English_name', width: 200, hideable: false },\r\n { field: 'Chinese_name', headerName: 'Chinese_name', width: 150, hideable: false },\r\n { field: 'Acuris_English', headerName: 'Acuris', disableExport: true, width: 110,\r\n renderCell: (params) => (\r\n \r\n {showButton = Boolean(params.value) && params.value.substring(0, 7) == \"Result/\"}\r\n {!showButton && Boolean(params.value) && params.value}\r\n {!showButton && !Boolean(params.value) && Boolean(params.row.English_name) && \"processing...\"}\r\n {showButton && \r\n }\r\n \r\n )\r\n },\r\n enableGoogle && { field: 'English_filename', headerName: 'English_filename', disableExport: true, width: 110,\r\n renderCell: (params) => (\r\n \r\n {showButton = Boolean(params.value) && params.value.substring(0, 7) == \"Result/\"}\r\n {!showButton && Boolean(params.value) && params.value}\r\n {!showButton && !Boolean(params.value) && Boolean(params.row.English_name) && \"processing...\"}\r\n {showButton && (\r\n \r\n )}\r\n \r\n )\r\n },\r\n enableGoogle && { field: 'Chinese_filename', headerName: 'Chinese_filename', disableExport: true, width: 110,\r\n renderCell: (params) => (\r\n \r\n {showButton = Boolean(params.value) && params.value.substring(0,7) == \"Result/\"}\r\n {!showButton && Boolean(params.value) && params.value}\r\n {!showButton && !Boolean(params.value) && Boolean(params.row.Chinese_name) && \"processing...\"}\r\n {showButton && \r\n }\r\n \r\n )\r\n }, \r\n { field: 'Create_time', headerName: 'Create_time', width: 100, editable: true, disableExport: true, valueFormatter: (params) => {\r\n const utcDate = new Date(params.value);\r\n const localDate = new Date(utcDate.getTime() - utcDate.getTimezoneOffset() * 60 * 1000);\r\n const year = localDate.getFullYear();\r\n const month = String(localDate.getMonth() + 1).padStart(2, '0');\r\n const day = String(localDate.getDate()).padStart(2, '0');\r\n const hours = String(localDate.getHours()).padStart(2, '0');\r\n const minutes = String(localDate.getMinutes()).padStart(2, '0');\r\n const seconds = String(localDate.getSeconds()).padStart(2, '0');\r\n\r\n return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;\r\n },\r\n },\r\n { field: 'Nationality', headerName: 'Nationality', width: 100, type: 'singleSelect', editable: false, valueOptions:nationalityList.map(({ code }) => code)},\r\n { field: 'DOB', headerName: 'DOB', width: 100, editable: false, type: 'date',\r\n valueFormatter: (params) => {\r\n if (params && params.value) {\r\n return moment(params.value).format(\"YYYY-MM-DD\");\r\n } else {\r\n return \"\"; \r\n }\r\n },\r\n },\r\n { field: 'Gender', headerName: 'Gender', width: 100, type: 'singleSelect', valueOptions:[\"\", \"Male\", \"Female\"], editable: false },\r\n { field: 'Email', headerName: 'Email', description:'Editable', width: 100, editable: true,\r\n renderHeader: () => ( {'Email'} 📝 ),\r\n },\r\n { field: 'Contact_number', headerName: 'Contact_number', description:'Editable', width: 150, editable: true,\r\n renderHeader: () => ( {'Contact_number'} 📝 ),\r\n },\r\n { field: 'Mobile', headerName: 'Mobile', description:'Editable', width: 100, editable: true, \r\n renderHeader: () => ( {'Mobile'} 📝 ),\r\n }, \r\n { field: 'IDType', headerName: 'IDType', description:'Editable', width: 100, editable: true, \r\n renderHeader: () => ( {'IDType'} 📝 ),\r\n }, \r\n { field: 'IDNumber', headerName: 'IDNumber', description:'Editable', width: 100, editable: true, \r\n renderHeader: () => ( {'IDNumber'} 📝 ),\r\n }, \r\n { \r\n field: 'IDExpiry', \r\n headerName: 'IDExpiry', \r\n description: 'Editable', \r\n width: 100, \r\n editable: true, \r\n type: 'date',\r\n valueFormatter: params => {\r\n if (params && params.value) {\r\n return moment(params.value).format(\"YYYY-MM-DD\");\r\n } else {\r\n return \"\"; \r\n }\r\n },\r\n renderHeader: () => ( {'IDExpiry'} 📝 ),\r\n },\r\n { field: 'Residential_address', headerName: 'Residential_address', description:'Editable', width: 170, editable: true,\r\n renderHeader: () => ( {'Residential_address'} 📝 ),\r\n },\r\n { field: 'Permanent_address', headerName: 'Permanent_address', description:'Editable', width: 170, editable: true,\r\n renderHeader: () => ( {'Permanent_address'} 📝 ),\r\n },\r\n { field: 'Correspondence_address', headerName: 'Correspondence_address', description:'Editable', width: 200, editable: true,\r\n renderHeader: () => ( {'Correspondence_address'} 📝 ),\r\n },\r\n { field: 'Tax_resident_country', headerName: 'Tax_resident_country', description:'Editable', width: 190, type: 'singleSelect', editable: true, valueOptions:nationalityList.map(({ code }) => code),\r\n renderHeader: () => ( {'Tax_resident_country'} 📝 ),\r\n },\r\n { field: 'Tax_number', headerName: 'Tax_number', description:'Editable', width: 120, editable: true,\r\n renderHeader: () => ( {'Tax_number'} 📝 ),\r\n },\r\n { field: 'Tax_type', headerName: 'Tax_type', description:'Editable', width: 100, editable: true,\r\n renderHeader: () => ( {'Tax_type'} 📝 ),\r\n },\r\n { field: 'Tax_country', headerName: 'Tax_country', description:'Editable', width: 120, editable: true, type: \"singleSelect\", valueOptions: nationalityList.map(({ code }) => code),\r\n renderHeader: () => ( {'Tax_country'} 📝 ),\r\n },\r\n { field: 'Annual_income_source_1', headerName: 'Annual_income_source_1', description:'Editable', width: 200, editable: true,\r\n renderHeader: () => ( {'Annual_income_source_1'} 📝 ),\r\n },\r\n { field: 'Annual_income_source_2', headerName: 'Annual_income_source_2', description:'Editable', width: 200, editable: true,\r\n renderHeader: () => ( {'Annual_income_source_2'} 📝 ),\r\n },\r\n { field: 'Annual_income_source_3', headerName: 'Annual_income_source_3', description:'Editable', width: 200, editable: true,\r\n renderHeader: () => ( {'Annual_income_source_3'} 📝 ),\r\n },\r\n { field: 'Source_of_wealth_1', headerName: 'Source_of_wealth_1', description:'Editable', width: 180, editable: true,\r\n renderHeader: () => ( {'Source_of_wealth_1'} 📝 ),\r\n },\r\n { field: 'Source_of_wealth_2', headerName: 'Source_of_wealth_2', description:'Editable', width: 180, editable: true,\r\n renderHeader: () => ( {'Source_of_wealth_2'} 📝 ),\r\n },\r\n { field: 'Source_of_wealth_3', headerName: 'Source_of_wealth_3', description:'Editable', width: 180, editable: true,\r\n renderHeader: () => ( {'Source_of_wealth_3'} 📝 ),\r\n },\r\n { field: 'Currency_1', headerName: 'Currency_1', description:'Editable', width: 100, editable: true, type: \"singleSelect\", valueOptions: currencyList.map(({ code }) => code),\r\n renderHeader: () => ( {'Currency_1'} 📝 ),\r\n },\r\n { field: 'Currency_2', headerName: 'Currency_2', description:'Editable', width: 100, editable: true, type: \"singleSelect\", valueOptions: currencyList.map(({ code }) => code),\r\n renderHeader: () => ( {'Currency_2'} 📝 ),\r\n },\r\n { field: 'Currency_3', headerName: 'Currency_3', description:'Editable', width: 100, editable: true, type: \"singleSelect\", valueOptions: currencyList.map(({ code }) => code),\r\n renderHeader: () => ( {'Currency_3'} 📝 ),\r\n },\r\n { field: 'Estimated_networth_1', headerName: 'Estimated_networth_1', description:'Editable', width: 180, editable: true, type: 'number',\r\n renderHeader: () => ( {'Estimated_networth_1'} 📝 ),\r\n },\r\n { field: 'Estimated_networth_2', headerName: 'Estimated_networth_2', description:'Editable', width: 180, editable: true, type: 'number',\r\n renderHeader: () => ( {'Estimated_networth_2'} 📝 ),\r\n },\r\n { field: 'Estimated_networth_3', headerName: 'Estimated_networth_3', description:'Editable', width: 180, editable: true, type: 'number',\r\n renderHeader: () => ( {'Estimated_networth_3'} 📝 ),\r\n },\r\n { field: 'Employer_name', headerName: 'Employer_name', description:'Editable', width: 150, editable: true,\r\n renderHeader: () => ( {'Employer_name'} 📝 ),\r\n },\r\n { field: 'Occupation', headerName: 'Occupation', description:'Editable', width: 150, editable: true,\r\n renderHeader: () => ( {'Occupation'} 📝 ),\r\n },\r\n { field: 'Position', headerName: 'Position', description:'Editable', width: 100, editable: true,\r\n renderHeader: () => ( {'Position'} 📝 ),\r\n },\r\n { field: 'Proof_of_professional_investment_asset', headerName: 'Proof_of_professional_investment_asset', description:'Editable', width: 300, editable: true, type: 'number',\r\n renderHeader: () => ( {'Proof_of_professional_investment_asset'} 📝 ),\r\n },\r\n ].filter(Boolean); // This will remove falsy values (i.e., undefined) from the array\r\n const importColumns = [\r\n //{ field: 'User', headerName:'User', width: 150, hideable: false },\r\n //{ field: 'Case', headerName:'Case', disableExport: true, width: 150, hideable: true },\r\n { field: 'Upload_time', headerName: 'Upload Time', width: 180, valueFormatter: (params) => {\r\n const utcDate = new Date(params.value);\r\n const localDate = new Date(utcDate.getTime() - utcDate.getTimezoneOffset() * 60 * 1000);\r\n const year = localDate.getFullYear();\r\n const month = String(localDate.getMonth() + 1).padStart(2, '0');\r\n const day = String(localDate.getDate()).padStart(2, '0');\r\n const hours = String(localDate.getHours()).padStart(2, '0');\r\n const minutes = String(localDate.getMinutes()).padStart(2, '0');\r\n const seconds = String(localDate.getSeconds()).padStart(2, '0');\r\n\r\n return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;\r\n },\r\n },\r\n { field: 'Import_filename', headerName: 'Import File', disableExport: true, width: 110,\r\n renderCell: (params) => (\r\n \r\n {showButton = Boolean(params.value) && params.value.substring(0,7) == \"Import/\"}\r\n {!showButton && Boolean(params.value) && params.value}\r\n {!showButton && !Boolean(params.value) && \"processing...\"}\r\n {showButton && \r\n }\r\n \r\n )\r\n },\r\n { field: 'Import_log', headerName: 'Import Log', disableExport: true, width: 110,\r\n renderCell: (params) => (\r\n \r\n {showButton = Boolean(params.value) && params.value.substring(0,7) == \"Import/\"}\r\n {!showButton && Boolean(params.value) && params.value}\r\n {!showButton && !Boolean(params.value) && \"processing...\"}\r\n {showButton && \r\n }\r\n \r\n )\r\n },\r\n { field: 'Pass_number', headerName: 'Pass number', width: 150 },\r\n { field: 'Import_case_total', headerName: 'Import Total', width: 150}\r\n ];\r\n const urlstr = `${config.api.invokeUrl}`;\r\n\r\n const downloadSearchResult = async (filename) => {\r\n if (filename == null) return;\r\n console.log(\"download\", filename);\r\n const encodedFilename = encodeURIComponent(filename);\r\n const downloadUrl = `${urlstr}/kycic-search-result?file=${encodedFilename}`;\r\n // const link = document.createElement(\"a\");\r\n var axios = require('axios');\r\n var config = {\r\n method: 'get',\r\n url: downloadUrl,\r\n headers: {\r\n \"content-type\": \"application/json\",\r\n Authorization: `${user.signInUserSession.idToken.jwtToken}`\r\n }\r\n };\r\n \r\n axios(config)\r\n .then(function (response) {\r\n const Url = response.data.URL;\r\n window.open(Url);\r\n })\r\n .catch(function (error) {\r\n if (error.response.status === 401 || error.response.status === 403) {\r\n //signOut();\r\n //navigate(\"/login\");\r\n window.location.reload(true);\r\n }\r\n console.log(error);\r\n });\r\n };\r\n \r\n const fetchCases = async () => {\r\n setIsLoading(true);\r\n try {\r\n const requestInfo = {\r\n headers: {\r\n \"content-type\": \"application/json\",\r\n Authorization: `${user.signInUserSession.idToken.jwtToken}`\r\n },\r\n params:{\"User\":`${user.attributes.email}`}\r\n }\r\n const res = await axios.get(`${config.api.invokeUrl}`, requestInfo);\r\n const Cases = res.data;\r\n setNotes(Cases);\r\n } catch (err) {\r\n if (err.response.status === 401 || err.response.status === 403) {\r\n //signOut();\r\n //navigate(\"/login\");\r\n window.location.reload(true);\r\n }\r\n console.log(`An error has occurred: ${err}`);\r\n } finally {\r\n setIsLoading(false);\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n const fetchData = async () => {\r\n fetchCases(); // Your existing function\r\n \r\n const interval = setInterval(() => {\r\n fetchCases();\r\n }, 1 * 60 * 1000);\r\n \r\n return () => clearInterval(interval);\r\n };\r\n \r\n const fetchProfileData = async () => {\r\n try {\r\n // Make an API call to get the profile data\r\n if (user) {\r\n const response = await axios.get(\r\n `${config.api.invokeUrl}/profile`,\r\n {\r\n headers: {\r\n \"content-type\": \"application/json\",\r\n Authorization: `${user.signInUserSession.idToken.jwtToken}`,\r\n },\r\n }\r\n );\r\n \r\n if (response.status === 200) {\r\n const profileData = response.data;\r\n setUserEmail(profileData.User_email || '');\r\n setAdmin(profileData.Admin);\r\n setEnableGoogle(profileData.Enable_Google);\r\n setMonitorFreq(profileData.Monitor_freq);\r\n }\r\n }\r\n } catch (error) {\r\n if (error.response.status === 401 || error.response.status === 403) {\r\n //signOut();\r\n //navigate(\"/login\");\r\n window.location.reload(true);\r\n }\r\n console.error('Error fetching profile data in layout:', error);\r\n setSnackbar({\r\n children: 'Fail to fetch the profile data in layout',\r\n severity: 'warning',\r\n });\r\n }\r\n };\r\n \r\n fetchData(); // Call the existing fetchData function\r\n fetchProfileData(); // Call the new fetchProfileData function \r\n }, [user, isAdmin, enableGoogle])\r\n\r\n const fetchAuditCases = async () => {\r\n try {\r\n const requestInfo = {\r\n headers: {\r\n \"content-type\": \"application/json\",\r\n Authorization: `${user.signInUserSession.idToken.jwtToken}`\r\n },\r\n params:{\"User\":`${user.attributes.email}`}\r\n }\r\n const res = await axios.get(`${config.api.invokeUrl}/auditimport`, requestInfo);\r\n const Cases = res.data;\r\n setAuditNotes(Cases);\r\n } catch (err) { \r\n if (err.response.status === 401 || err.response.status === 403) {\r\n //signOut();\r\n //navigate(\"/login\");\r\n window.location.reload(true);\r\n }\r\n console.log(`An error has occurred: ${err}`);\r\n }\r\n }\r\n useEffect(() => {\r\n fetchCases()\r\n fetchAuditCases();\r\n const interval = setInterval(() => {\r\n fetchCases()\r\n fetchAuditCases();\r\n }, 1 * 60 * 1000);\r\n return() => clearInterval(interval);\r\n }, []);\r\n\r\n const [selectedFile, setSelectedFile] = useState(null);\r\n const [fileUploaded, setFileUploaded] = useState(false);\r\n const [logFile, setLogFile] = useState(null);\r\n\r\n const onFileChange = (event) => {\r\n console.log(\"upload\"); \r\n setSelectedFile(event.target.files[0]);\r\n const formData = new FormData();\r\n //var date = new Date();\r\n //var file_name = date.toISOString().slice(0, 19).replace(/[^0-9]/g, \"\") + '-' + user.attributes.email + '-' + event.target.files[0].name;\r\n var file_name = event.target.files[0].name;\r\n if (event.target.files[0].name.slice(-4) == '.csv' && !/[#-]/.test(file_name)) {\r\n formData.append(user.attributes.email, event.target.files[0], file_name);\r\n //var axios = require('axios');\r\n axios({\r\n method: \"post\",\r\n url: urlstr,\r\n data: formData,\r\n headers: {\r\n \"content-type\": \"application/json\",\r\n Authorization: `${user.signInUserSession.idToken.jwtToken}`\r\n }\r\n }).then(() => {\r\n setLogFile('Import/' + file_name.slice(0, -3) + 'log');\r\n setSelectedFile(null);\r\n setFileUploaded(true);\r\n setShowLogTable(true);\r\n fetchAuditCases();\r\n });\r\n } else if (event.target.files[0].name.slice(-5) == '.xlsx' && !/[#-]/.test(file_name)) {\r\n formData.append('file', event.target.files[0]);\r\n axios.post(urlstr + '/binary-upload', formData, {\r\n headers: {\r\n 'Accept': 'multipart/form-data',\r\n 'Content-Type': 'multipart/form-data',\r\n Authorization: `${user.signInUserSession.idToken.jwtToken}`, \r\n },\r\n })\r\n } else {\r\n setSnackbar({ children: 'Import file: ' + file_name + ' is not a .csv or .xlsx file or contains hyphen or hash.', severity: 'error' });\r\n }\r\n };\r\n\r\n function CustomToolbar() {\r\n const generateFilename = () => {\r\n const now = new Date();\r\n const formattedDate = `${now.getFullYear()}${(now.getMonth() + 1).toString().padStart(2, '0')}${now.getDate().toString().padStart(2, '0')}${now.getHours().toString().padStart(2, '0')}${now.getMinutes().toString().padStart(2, '0')}`;\r\n return `KYCIC-Export-${userEmail}-${formattedDate}`;\r\n };\r\n const fileName = generateFilename(); \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 const [snackbar, setSnackbar] = React.useState(null);\r\n const handleCloseSnackbar = () => setSnackbar(null);\r\n\r\n const onTemplateDownload = () => {\r\n const link = document.createElement(\"a\");\r\n link.download = `KYCIC app import template.xlsx`;\r\n link.href = \"KYCIC app import template.xlsx\";\r\n link.click();\r\n setSnackbar({ children: 'Download completed. Note Import feature supports both CVS UTF-8 (Comma delimited) file and Excel Workbook.', severity: 'success' });\r\n };\r\n return (\r\n \r\n {isLoading && }\r\n row.Case} \r\n slots={{ toolbar: CustomToolbar }}\r\n getRowHeight={() => 'auto'}\r\n autoHeight\r\n />\r\n\r\n {isAdmin && (\r\n <>\r\n {event.target.value = null;}} \r\n />\r\n \r\n \r\n \r\n {showLogTable && \r\n row.Case}\r\n disableRowSelectionOnClick\r\n autoHeight \r\n />\r\n }\r\n \r\n )}\r\n
\r\n \r\n \r\n {\"Delete Case confirmation\"}\r\n \r\n \r\n \r\n Are you sure you want to delete the following Case?

\r\n Customer: {deletingRow && deletingRow.Customer}
\r\n English name: {deletingRow && deletingRow.English_name} {deletingRow && deletingRow.English_name !== '' && (typeof(deletingRow.English_filename) == 'undefined' || deletingRow.English_filename === 'processing...') && 'is PROCESSING!'}
\r\n Chinese name: {deletingRow && deletingRow.Chinese_name} {deletingRow && deletingRow.Chinese_name !== '' && (typeof(deletingRow.Chinese_filename) == 'undefined' || deletingRow.Chinese_filename === 'processing...') && 'is PROCESSING!'}\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n {!!snackbar && (\r\n \r\n \r\n \r\n )}\r\n
\r\n );\r\n}\r\n","import React, { useState, useEffect } from 'react'\r\nimport Typography from '@mui/material/Typography'\r\nimport Box from '@mui/material/Box'\r\nimport Button from '@mui/material/Button'\r\nimport Container from '@mui/material/Container'\r\nimport Radio from '@mui/material/Radio'\r\nimport RadioGroup from '@mui/material/RadioGroup'\r\nimport FormLabel from '@mui/material/FormLabel'\r\nimport FormControlLabel from '@mui/material/FormControlLabel'\r\nimport KeyboardArrowRightIcon from '@mui/icons-material/KeyboardArrowRight'\r\nimport TextField from '@mui/material/TextField'\r\nimport { useNavigate } from 'react-router-dom'\r\n// Picker packages. \r\n//install: npm i @mui/x-date-pickers\r\n//install: npm i --save moment\r\nimport { AdapterMoment } from '@mui/x-date-pickers/AdapterMoment'\r\nimport { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider'\r\nimport { DesktopDatePicker } from '@mui/x-date-pickers/DesktopDatePicker'\r\nimport Grid from '@mui/material/Grid'\r\nimport axios from 'axios'\r\nimport { useAuthenticator } from '@aws-amplify/ui-react'\r\nimport Autocomplete from '@mui/material/Autocomplete'\r\nimport {currencyList} from './Lists/currencyList'\r\nimport {nationalityList} from './Lists/nationalityList'\r\nimport FormGroup from \"@mui/material/FormGroup\";\r\nimport Checkbox from \"@mui/material/Checkbox\";\r\nimport Snackbar from '@mui/material/Snackbar';\r\nimport Alert from '@mui/material/Alert';\r\n\r\nfunction sleep(ms) {\r\n return new Promise((resolve) => {\r\n setTimeout(resolve, ms);\r\n });\r\n}\r\n\r\nexport default function Create() {\r\n const { user, signOut } = useAuthenticator((context) => [\r\n context.user,\r\n context.signOut,\r\n ]);\r\n //Date Picker does not have 'id' so that its state is handled separately\r\n const [DOB, setDOB] = useState(null);\r\n const [IDExpiry, setIDExpiry] = useState(null);\r\n //Create setState for English and Chinese name separately for switching required*\r\n const [Customer, setCustomer] = useState('');\r\n const [Type, setType] = useState('Individual');\r\n const [English_name, setEnglish_name] = useState('');\r\n const [Chinese_name, setChinese_name] = useState('');\r\n const [Email, setEmail] = useState('');\r\n const [Contact_number, setContact_number] = useState('');\r\n const [Mobile, setMobile] = useState('');\r\n const [Nationality, setNationality] = useState(null);\r\n const [IDType, setIDType] = useState('');\r\n const [IDNumber, setIDNumber] = useState('');\r\n const [Residential_address, setResidential_address] = useState('');\r\n const [Permanent_address, setPermanent_address] = useState('');\r\n const [Correspondence_address, setCorrespondence_address] = useState('');\r\n const [Tax_resident_country, setTax_resident_country] = useState('');\r\n const [Tax_number, setTax_number] = useState('');\r\n const [Tax_type, setTax_type] = useState('');\r\n const [Tax_country, setTax_country] = useState('');\r\n const [Annual_income_source_1, setAnnual_income_source_1] = useState('');\r\n const [Source_of_wealth_1, setSource_of_wealth_1] = useState('');\r\n const [Currency_1, setCurrency_1] = useState('');\r\n const [Estimated_networth_1, setEstimated_networth_1] = useState('');\r\n const [Annual_income_source_2, setAnnual_income_source_2] = useState('');\r\n const [Source_of_wealth_2, setSource_of_wealth_2] = useState('');\r\n const [Currency_2, setCurrency_2] = useState('');\r\n const [Estimated_networth_2, setEstimated_networth_2] = useState('');\r\n const [Annual_income_source_3, setAnnual_income_source_3] = useState('');\r\n const [Source_of_wealth_3, setSource_of_wealth_3] = useState('');\r\n const [Currency_3, setCurrency_3] = useState('');\r\n const [Estimated_networth_3, setEstimated_networth_3] = useState('');\r\n const [Employer_name, setEmployer_name] = useState('');\r\n const [Occupation, setOccupation] = useState('');\r\n const [Position, setPosition] = useState('');\r\n const [Proof_of_professional_investment_asset, setProof_of_professional_investment_asset] = useState('');\r\n const [Gender,setGender] = useState('');\r\n const genderList = ['','Male','Female'];\r\n // const [Remarks, setRemarks] = useState('');\r\n // const [Result, setResult] = useState('');\r\n const [Ongoing_monitor, setOngoing_monitor] = useState(false);\r\n //variables for insert to DynamoDB\r\n const config = require('../config.json');\r\n \r\n const navigate = useNavigate();\r\n\r\n const [English_name_error, setEnglish_name_error] = useState(false);\r\n const [English_name_errortext, setEnglish_name_errortext] = useState('');\r\n const [Customer_name_error, setCustomer_name_error] = useState(false);\r\n const [Customer_name_errortext, setCustomer_name_errortext] = useState('');\r\n\r\n const [notes, setNotes] = useState([]);\r\n const [monitorFreq, setMonitorFreq] = useState('Disable'); \r\n\r\n const fetchProfileData = async () => {\r\n try {\r\n if (user) {\r\n const response = await axios.get(\r\n `${config.api.invokeUrl}/profile`,\r\n {\r\n headers: {\r\n \"content-type\": \"application/json\",\r\n Authorization: `${user.signInUserSession.idToken.jwtToken}`,\r\n },\r\n }\r\n );\r\n\r\n if (response.status === 200) {\r\n const profileData = response.data;\r\n setMonitorFreq(profileData.Monitor_freq);\r\n }\r\n }\r\n } catch (error) {\r\n if (error.response.status === 401 || error.response.status === 403) {\r\n window.location.reload(true);\r\n }\r\n console.error('Error fetching profile data in layout:', error);\r\n setSnackbar({\r\n children: 'Fail to fetch the profile data in layout',\r\n severity: 'warning',\r\n });\r\n }\r\n };\r\n\r\n const fetchCases = async () => {\r\n try {\r\n const requestInfo = {\r\n headers: {\r\n \"content-type\": \"application/json\",\r\n Authorization: `${user.signInUserSession.idToken.jwtToken}`,\r\n },\r\n params: { User: `${user.attributes.email}` },\r\n };\r\n const res = await axios.get(`${config.api.invokeUrl}`, requestInfo);\r\n const Cases = res.data;\r\n setNotes(Cases);\r\n } catch (err) {\r\n if (err.response.status === 401 || err.response.status === 403) {\r\n //signOut();\r\n //navigate(\"/login\");\r\n window.location.reload(true);\r\n }\r\n console.log(`An error has occurred: ${err}`);\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n fetchCases();\r\n fetchProfileData();\r\n // need not refresh the case periodically because the Customer should not change\r\n }, []);\r\n\r\n useEffect(()=>{\r\n if (English_name.trim() == '' && Chinese_name.trim() == '') {\r\n setEnglish_name_error(true);\r\n setEnglish_name_errortext(\"Either English or Chinese is required.\");\r\n }\r\n else {\r\n setEnglish_name_error(false);\r\n setEnglish_name_errortext('');\r\n }\r\n }, [English_name, Chinese_name]);\r\n\r\n const [English_name_label, setEnglish_name_label] = useState('Individual English name');\r\n const [Chinese_name_label, setChinese_name_label] = useState('Individual Chinese name');\r\n useEffect(\r\n () => {\r\n if (Type == 'Individual') {\r\n setEnglish_name_label('Individual English name')\r\n setChinese_name_label('Individual Chinese name')\r\n }\r\n else {\r\n setEnglish_name_label('Business English name')\r\n setChinese_name_label('Business Chinese name')\r\n }\r\n }, [Type]\r\n );\r\n\r\n const [Email_error, setEmail_error] = useState(false);\r\n const [Email_errortext, setEmail_errortext] = useState(\"\");\r\n const emailRegEx = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z0-9]{2,}$/;\r\n useEffect(() => {\r\n if (Email == \"\") {\r\n setEmail_error(false);\r\n setEmail_errortext(\"\");\r\n } else if (emailRegEx.test(Email)) {\r\n setEmail_error(false);\r\n setEmail_errortext(\"Email is valid\");\r\n } else {\r\n setEmail_error(true);\r\n setEmail_errortext(\"Email is not valid\");\r\n }\r\n }, [Email]);\r\n\r\n const [Contact_number_error, setContact_number_error] = useState(false);\r\n const [Contact_number_errortext, setContact_number_errortext] = useState(\"\");\r\n const telRegEx = /^(\\+\\d{1,3}[- ]?)?\\d{1,}$/;\r\n useEffect(() => { \r\n if (Contact_number == \"\") {\r\n setContact_number_error(false);\r\n setContact_number_errortext(\"\");\r\n } else if (telRegEx.test(Contact_number)) {\r\n setContact_number_error(false);\r\n setContact_number_errortext(\"Contact number is valid.\");\r\n } else {\r\n setContact_number_error(true);\r\n setContact_number_errortext(\"Start with + or number.\");\r\n }\r\n }, [Contact_number]);\r\n \r\n const [Mobile_error, setMobile_error] = useState(false);\r\n const [Mobile_errortext, setMobile_errortext] = useState(\"\");\r\n useEffect(() => { \r\n if (Mobile == \"\") {\r\n setMobile_error(false);\r\n setMobile_errortext(\"\");\r\n } else if (telRegEx.test(Mobile)) {\r\n setMobile_error(false);\r\n setMobile_errortext(\"Mobile is valid.\");\r\n } else {\r\n setMobile_error(true);\r\n setMobile_errortext(\"Start with + or number.\");\r\n }\r\n }, [Mobile]);\r\n\r\n const handleSubmit = async (e) => {\r\n e.preventDefault()\r\n if (English_name.trim() == '' && Chinese_name.trim() == '') {\r\n setEnglish_name_error(true);\r\n setEnglish_name_errortext(\"Either English or Chinese is required.\");\r\n } else if (English_name.match(/#/) || Chinese_name.match(/#/) || Customer.match(/#/)){ \r\n //new error for # restriction\r\n setEnglish_name_error(true);\r\n setEnglish_name_errortext(\"“#” is not allowed in Customer, English or Chinese name\");\r\n\r\n } else if (Email != \"\" && !emailRegEx.test(Email)) {\r\n setEmail_error(true);\r\n setEmail_errortext(\"Email is not Valid\");\r\n } else if (Contact_number != \"\" && !telRegEx.test(Contact_number)) {\r\n setContact_number_error(true);\r\n setContact_number_errortext(\"Start with + or number.\");\r\n } else if (Mobile != \"\" && !telRegEx.test(Mobile)) {\r\n setMobile_error(true);\r\n setMobile_errortext(\"Start with + or number.\");\r\n } else {\r\n setEnglish_name_error(false);\r\n setEnglish_name_errortext(\"\");\r\n const userid = user.attributes.email;\r\n const headers = {\r\n \"content-type\": \"application/json\",\r\n Authorization: `${user.signInUserSession.idToken.jwtToken}`,\r\n };\r\n let caseid = \"\"; \r\n if (Type == 'Individual') {\r\n caseid = \"UI#\" + userid + \"#\" + Customer.trim() + \"#\" + English_name.trim() + \"#\" + Chinese_name.trim();\r\n } else {\r\n caseid = \"UB#\" + userid + \"#\" + Customer.trim() + \"#\" + English_name.trim() + \"#\" + Chinese_name.trim();\r\n } \r\n const params = {\r\n \"User\": userid,\r\n \"Case\": caseid,\r\n \"Customer\": Customer.trim(),\r\n \"Type\": Type,\r\n \"English_name\": English_name.trim(),\r\n \"Chinese_name\": Chinese_name.trim(),\r\n \"Email\": Email,\r\n \"Contact_number\": Contact_number,\r\n \"Mobile\": Mobile,\r\n \"Nationality\": Nationality && Nationality.code,\r\n \"DOB\": DOB && DOB.format(\"YYYY-MM-DD\"),\r\n \"Gender\": Gender,\r\n \"IDType\": IDType,\r\n \"IDNumber\": IDNumber,\r\n \"IDExpiry\": IDExpiry && IDExpiry.format(\"YYYY-MM-DD\"),\r\n \"Residential_address\": Residential_address,\r\n \"Permanent_address\": Permanent_address,\r\n \"Correspondence_address\": Correspondence_address,\r\n \"Tax_resident_country\": Tax_resident_country && Tax_resident_country.code,\r\n \"Tax_number\": Tax_number,\r\n \"Tax_type\": Tax_type,\r\n \"Tax_country\": Tax_country && Tax_country.code,\r\n \"Annual_income_source_1\": Annual_income_source_1,\r\n \"Source_of_wealth_1\": Source_of_wealth_1,\r\n \"Currency_1\": Currency_1 && Currency_1.code,\r\n \"Estimated_networth_1\": Estimated_networth_1,\r\n \"Annual_income_source_2\": Annual_income_source_2,\r\n \"Source_of_wealth_2\": Source_of_wealth_2,\r\n \"Currency_2\": Currency_2 && Currency_2.code,\r\n \"Estimated_networth_2\": Estimated_networth_2,\r\n \"Annual_income_source_3\": Annual_income_source_3,\r\n \"Source_of_wealth_3\": Source_of_wealth_3,\r\n \"Currency_3\": Currency_3 && Currency_3.code,\r\n \"Estimated_networth_3\": Estimated_networth_3,\r\n \"Employer_name\": Employer_name,\r\n \"Occupation\": Occupation,\r\n \"Position\": Position,\r\n \"Proof_of_professional_investment_asset\": Proof_of_professional_investment_asset,\r\n //\"Remarks\": Remarks,\r\n //\"Result\": Result,\r\n \"Create_time\": (new Date()).toISOString().slice(0, 19).replace('T', ' '), //Store in ISO time as import\r\n \"Ongoing_monitor\": Ongoing_monitor\r\n };\r\n // can't use ${userid} as it contains special character.\r\n await axios.post(`${config.api.invokeUrl}/userid`, params, { headers: headers })\r\n .then (response => {\r\n //console.log(response);\r\n //console.log(response.data);\r\n navigate('/');\r\n })\r\n .catch (async err => {\r\n if (err.response.status === 409)\r\n {\r\n setSnackbar({ children: 'Name ' + English_name.trim() + ' ' + Chinese_name.trim() + ' already exists in ' + 'Customer ' + Customer + '.', severity: 'warning' });\r\n }\r\n if (err.response.status === 401 || err.response.status === 403)\r\n {\r\n setSnackbar({ children: 'Please login again', severity: 'info' });\r\n await sleep(10*1000);\r\n window.location.reload(true);\r\n //navigate('/login');\r\n console.log(err);\r\n }\r\n })\r\n }\r\n };\r\n \r\n const [snackbar, setSnackbar] = React.useState(null);\r\n const handleCloseSnackbar = () => setSnackbar(null);\r\n\r\n return (\r\n \r\n
\r\n \r\n \r\n \r\n Primary information\r\n \r\n \r\n Type\r\n setType(e.target.value)} \r\n >\r\n } label=\"Individual\" />\r\n } label=\"Business\" />\r\n \r\n \r\n \r\n \r\n \r\n typeof(option.Customer) != 'undefined').map(option => option.Customer) )]}\r\n freeSolo\r\n autoSelect\r\n onChange={(e, value)=>setCustomer(value)}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n \r\n setEnglish_name(e.target.value)}\r\n />\r\n \r\n \r\n setChinese_name(e.target.value)}\r\n />\r\n \r\n \r\n \r\n setDOB(newValue)}\r\n />\r\n \r\n \r\n \r\n typeof option.code === 'string' || option instanceof String ? option.code: ''}\r\n isOptionEqualToValue={(option, value) => option.code === value.code || option.code === ''}\r\n renderOption={(props, option) => (\r\n img': { mr: 2, flexShrink: 0 } }} {...props}>\r\n \r\n {option.name} ({option.code})\r\n \r\n )}\r\n fullWidth\r\n value={Nationality}\r\n onChange={(e, value) => setNationality(value)}\r\n renderInput={(params) => }\r\n />\r\n \r\n \r\n setContact_number(e.target.value)}\r\n />\r\n \r\n \r\n setMobile(e.target.value)}\r\n />\r\n \r\n \r\n setEmail(e.target.value)}\r\n />\r\n \r\n \r\n \r\n Identification document\r\n \r\n \r\n \r\n setIDType(e.target.value)}\r\n />\r\n \r\n \r\n setIDNumber(e.target.value)}\r\n />\r\n \r\n \r\n setGender(value)}\r\n renderInput={(params) => }\r\n />\r\n \r\n \r\n \r\n setIDExpiry(newValue)}\r\n />\r\n \r\n \r\n \r\n \r\n Address\r\n \r\n \r\n \r\n setResidential_address(e.target.value)}\r\n />\r\n \r\n \r\n setPermanent_address(e.target.value)}\r\n />\r\n \r\n \r\n setCorrespondence_address(e.target.value)}\r\n />\r\n \r\n \r\n \r\n Tax\r\n \r\n \r\n \r\n typeof option.code === 'string' || option instanceof String ? option.code: ''}\r\n isOptionEqualToValue={(option, value) => option.code === value.code || option.code === '' }\r\n renderOption={(props, option) => (\r\n img': { mr: 2, flexShrink: 0 } }} {...props}>\r\n \r\n {option.name} ({option.code})\r\n \r\n )}\r\n fullWidth\r\n value={Tax_resident_country}\r\n onChange={(e, value) => setTax_resident_country(value)}\r\n renderInput={(params) => }\r\n />\r\n \r\n \r\n setTax_number(e.target.value)}\r\n />\r\n \r\n \r\n setTax_type(e.target.value)}\r\n />\r\n \r\n \r\n typeof option.code === 'string' || option instanceof String ? option.code: ''}\r\n isOptionEqualToValue={(option, value) => option.code === value.code || option.code === '' }\r\n renderOption={(props, option) => (\r\n img': { mr: 2, flexShrink: 0 } }} {...props}>\r\n \r\n {option.name} ({option.code})\r\n \r\n )}\r\n fullWidth\r\n value={Tax_country}\r\n onChange={(e, value) => setTax_country(value)}\r\n renderInput={(params) => }\r\n />\r\n \r\n \r\n \r\n Income and Wealth\r\n \r\n \r\n \r\n setAnnual_income_source_1(e.target.value)}\r\n />\r\n \r\n \r\n setSource_of_wealth_1(e.target.value)}\r\n />\r\n \r\n \r\n setCurrency_1(value)}\r\n getOptionLabel={(option) => typeof option.code === 'string' || option instanceof String ? option.code: ''}\r\n isOptionEqualToValue={(option, value) => option.code === value.code || option.code === '' }\r\n renderOption={(props, option) => (\r\n
  • {option.name} ({option.code})
  • \r\n )}\r\n renderInput={(params) => }\r\n />\r\n
    \r\n \r\n setEstimated_networth_1(e.target.value)} \r\n />\r\n \r\n \r\n setAnnual_income_source_2(e.target.value)}\r\n />\r\n \r\n \r\n setSource_of_wealth_2(e.target.value)}\r\n />\r\n \r\n \r\n setCurrency_2(value)}\r\n getOptionLabel={(option) => typeof option.code === 'string' || option instanceof String ? option.code: ''}\r\n isOptionEqualToValue={(option, value) => option.code === value.code || option.code === '' }\r\n renderOption={(props, option) => (\r\n
  • {option.name} ({option.code})
  • \r\n )}\r\n renderInput={(params) => }\r\n />\r\n
    \r\n \r\n setEstimated_networth_2(e.target.value)}\r\n />\r\n \r\n \r\n setAnnual_income_source_3(e.target.value)}\r\n />\r\n \r\n \r\n setSource_of_wealth_3(e.target.value)}\r\n />\r\n \r\n \r\n setCurrency_3(value)}\r\n getOptionLabel={(option) => typeof option.code === 'string' || option instanceof String ? option.code: ''}\r\n isOptionEqualToValue={(option, value) => option.code === value.code || option.code === '' }\r\n renderOption={(props, option) => (\r\n
  • {option.name} ({option.code})
  • \r\n )}\r\n renderInput={(params) => }\r\n />\r\n
    \r\n \r\n setEstimated_networth_3(e.target.value)}\r\n />\r\n \r\n \r\n setEmployer_name(e.target.value)}\r\n />\r\n \r\n \r\n setOccupation(e.target.value)}\r\n />\r\n \r\n \r\n setPosition(e.target.value)}\r\n />\r\n \r\n \r\n setProof_of_professional_investment_asset(e.target.value)}\r\n />\r\n \r\n
    \r\n {(monitorFreq !== 'Disable') && (\r\n <>\r\n \r\n Review\r\n \r\n \r\n \r\n \r\n }\r\n label=\"Ongoing monitor\"\r\n onChange={() => {\r\n console.log(!Ongoing_monitor);\r\n setOngoing_monitor(!Ongoing_monitor);\r\n }}\r\n />\r\n \r\n \r\n \r\n \r\n )}\r\n\r\n \r\n }>\r\n Submit\r\n \r\n \r\n
    \r\n {!!snackbar && (\r\n \r\n \r\n \r\n )}\r\n
    \r\n );\r\n}\r\n","import * as React from 'react';\r\nimport Box from '@mui/material/Box';\r\nimport { useState, useEffect } from 'react';\r\nimport { useAuthenticator } from \"@aws-amplify/ui-react\"\r\nimport { useNavigate, useParams } from 'react-router-dom';\r\nimport axios from 'axios';\r\nimport EditIcon from '@mui/icons-material/Edit';\r\nimport Snackbar from '@mui/material/Snackbar';\r\nimport Alert from '@mui/material/Alert';\r\nimport Avatar from '@mui/material/Avatar';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n DataGrid,\r\n useGridApiContext,\r\n GridCellEditStopReasons,\r\n GridToolbar,\r\n GridLogicOperator,\r\n} from '@mui/x-data-grid';\r\nimport InputBase from '@mui/material/InputBase';\r\nimport Popper from '@mui/material/Popper';\r\nimport Paper from '@mui/material/Paper';\r\nimport CircularProgress from '@mui/material/CircularProgress';\r\nimport TextField from '@mui/material/TextField';\r\nimport Slider from '@mui/material/Slider';\r\nimport Typography from '@mui/material/Typography';\r\n\r\nconst config = require('../config.json')\r\n\r\nlet editable = (headerName) => {return(\r\n \r\n {headerName}\r\n \r\n \r\n \r\n \r\n)}\r\n\r\nfunction getWLPrefix(params) {\r\n const prefix = `${params.row.Customer}`.split(\"-\")[0];\r\n if (prefix === \"default\") {\r\n return \"\";\r\n }\r\n return prefix;\r\n}\r\n\r\nfunction isKeyboardEvent(event) {\r\n return !!event.key;\r\n}\r\n\r\nfunction EditTextarea(props) {\r\n const { id, field, value, colDef, hasFocus } = props;\r\n const [valueState, setValueState] = React.useState(value);\r\n const [anchorEl, setAnchorEl] = React.useState();\r\n const [inputRef, setInputRef] = React.useState(null);\r\n const apiRef = useGridApiContext();\r\n\r\n React.useLayoutEffect(() => {\r\n if (hasFocus && inputRef) {\r\n inputRef.focus();\r\n }\r\n }, [hasFocus, inputRef]);\r\n\r\n const handleRef = React.useCallback((el) => {\r\n setAnchorEl(el);\r\n }, []);\r\n\r\n const handleChange = React.useCallback(\r\n (event) => {\r\n const newValue = event.target.value;\r\n setValueState(newValue);\r\n apiRef.current.setEditCellValue(\r\n { id, field, value: newValue, debounceMs: 200 },\r\n event,\r\n );\r\n },\r\n [apiRef, field, id],\r\n );\r\n\r\n return (\r\n
    \r\n \r\n {anchorEl && (\r\n \r\n \r\n setInputRef(ref)}\r\n />\r\n \r\n \r\n )}\r\n
    \r\n );\r\n}\r\n\r\nEditTextarea.propTypes = {\r\n /**\r\n * The column of the row that the current cell belongs to.\r\n */\r\n colDef: PropTypes.object.isRequired,\r\n /**\r\n * The column field of the cell that triggered the event.\r\n */\r\n field: PropTypes.string.isRequired,\r\n /**\r\n * If true, the cell is the active element.\r\n */\r\n hasFocus: PropTypes.bool.isRequired,\r\n /**\r\n * The grid row id.\r\n */\r\n id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,\r\n /**\r\n * The cell value.\r\n * If the column has `valueGetter`, use `params.row` to directly access the fields.\r\n */\r\n value: PropTypes.string,\r\n};\r\n\r\nconst multilineColumn = {\r\n type: 'string',\r\n renderEditCell: (params) => ,\r\n};\r\n\r\nconst columns = [\r\n {\r\n field: 'Monitoring',\r\n headerName: 'Monitoring',\r\n width: 80,\r\n editable: false,\r\n type: 'boolean'\r\n },\r\n {\r\n field: 'Profile_image',\r\n headerName: 'Profile Image',\r\n width: 120,\r\n renderCell: (params) => (\r\n \r\n ),\r\n },\r\n {\r\n field: 'Customer',\r\n headerName: 'Customer', \r\n width: 80,\r\n editable: false,\r\n valueGetter: getWLPrefix,\r\n }\r\n ,{\r\n field: 'Type',\r\n headerName: 'Type',\r\n type: 'singleSelect',\r\n \r\n width: 90,\r\n valueOptions: ['Individual', 'Business'],//autocomplete\r\n editable: false,\r\n },\r\n {\r\n field: 'Name',\r\n headerName: 'Name',\r\n width: 180,\r\n editable: false,\r\n },\r\n {\r\n field: 'Match_name',\r\n headerName: 'Match_name',\r\n width: 150,\r\n \r\n },\r\n {\r\n field: 'QR_Code',\r\n headerName: 'QR_Code',\r\n width: 80,\r\n \r\n },\r\n {\r\n field: 'Version',\r\n headerName: 'Version',\r\n width: 130,\r\n \r\n },\r\n {\r\n field: 'Create_time',\r\n headerName: 'Create_time',\r\n width: 150,\r\n valueFormatter: (params) => {\r\n const utcDate = new Date(params.value);\r\n const localDate = new Date(utcDate.getTime() - utcDate.getTimezoneOffset() * 60 * 1000);\r\n const year = localDate.getFullYear();\r\n const month = String(localDate.getMonth() + 1).padStart(2, '0');\r\n const day = String(localDate.getDate()).padStart(2, '0');\r\n const hours = String(localDate.getHours()).padStart(2, '0');\r\n const minutes = String(localDate.getMinutes()).padStart(2, '0');\r\n const seconds = String(localDate.getSeconds()).padStart(2, '0');\r\n\r\n return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;\r\n },\r\n },\r\n {\r\n field: 'Status',\r\n headerName: 'Status', description:'Editable',\r\n width: 110,\r\n editable: true,\t\r\n type: 'singleSelect',\r\n valueOptions:\t['Open', 'True-positive', 'False-positive'],\r\n renderHeader: () => ( {'Status'} 📝 ),\r\n },\r\n {\r\n field: 'Risk',\r\n headerName: 'Risk', description:'Editable',\r\n width: 80,\r\n editable: true,\t\r\n type: 'singleSelect',\r\n valueOptions:['High','Medium', 'Low'],\r\n renderHeader: () => ( {'Risk'} 📝 ),\r\n },\r\n {\r\n field: 'Remarks',\r\n headerName: 'Remarks', description:'Editable',\r\n width: 180,\r\n editable: true,\r\n ...multilineColumn,\t\r\n renderHeader: () => ( {'Remarks'} 📝 ),\r\n },\r\n {\r\n field: 'Score',\r\n headerName: 'Score',\r\n type: 'number',\r\n width: 70,\r\n editable: false,\r\n },\r\n {\r\n field: 'Alert',\r\n headerName: 'Alert',\r\n type: 'singleSelect',\r\n width: 110,\r\n valueOptions: ['Version_changed', 'Score_increased'],//autocomplete\r\n editable: false,\r\n },\r\n {\r\n field:'Alert_date',\r\n headerName: 'Alert_date',\r\n width: 100,\r\n editable: false,\r\n }\r\n];\r\n\r\nconst MonitorDateSlider = ({ monitorFreq }) => {\r\n const generateMarks = (monitorFreq) => {\r\n switch (monitorFreq) {\r\n case 'Daily':\r\n return Array.from({ length: 365 }, (_, index) => ({\r\n value: index,\r\n //label: new Date(new Date().getFullYear(), 0, index + 1).toLocaleDateString('default', { day: 'numeric', month: 'short' }),\r\n }));\r\n case 'Monthly':\r\n return Array.from({ length: 12 }, (_, index) => {\r\n const firstDayOfMonth = new Date(new Date().getFullYear(), index, 1);\r\n const dayOfYear = Math.floor((firstDayOfMonth - new Date(firstDayOfMonth.getFullYear(), 0, 0)) / 86400000);\r\n return {\r\n value: dayOfYear,\r\n label: `${firstDayOfMonth.toLocaleDateString('default', { month: 'numeric' })}-1`,\r\n };\r\n });\r\n case 'Quarterly':\r\n return [\r\n { value: 0, label: 'Jan 1' },\r\n { value: 90 + (isLeapYear(new Date().getFullYear()) ? 1 : 0), label: 'Apr 1' },\r\n { value: 182 + (isLeapYear(new Date().getFullYear()) ? 1 : 0), label: 'Jul 1' },\r\n { value: 275 + (isLeapYear(new Date().getFullYear()) ? 1 : 0), label: 'Oct 1' },\r\n ];\r\n case 'Semi-annually':\r\n return [\r\n { value: 0, label: 'Jan 1' },\r\n { value: 182 + (isLeapYear(new Date().getFullYear()) ? 1 : 0), label: 'Jul 1' },\r\n ];\r\n default:\r\n return [];\r\n }\r\n };\r\n\r\n const [value, setValue] = React.useState(0);\r\n\r\n const today = new Date(2024, 3, 1, 12, 0, 0);\r\n const isLeapYear = (year) => (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\r\n const daysInYear = isLeapYear(today.getFullYear()) ? 366 : 365;\r\n const endOfFebruary = new Date(today.getFullYear(), 2, 0);\r\n const todayDayOfYear = Math.floor((today - new Date(new Date().getFullYear(), 0, 0)) / 86400000) - (today > endOfFebruary && isLeapYear(today.getFullYear()) ? 0 : 1);\r\n const localDate = today.toLocaleDateString('en-CA');\r\n\r\n const handleLabel = (value) => {\r\n if (value === todayDayOfYear) {\r\n return localDate; \r\n }\r\n return null;\r\n };\r\n\r\n const marks = generateMarks(monitorFreq);\r\n\r\n return (\r\n \r\n {`Monitor ${monitorFreq}`}\r\n \r\n \r\n );\r\n};\r\n\r\nexport default function Monitor() {\r\n const { user, signOut } = useAuthenticator((context) => [context.user, context.signOut]);\r\n const navigate = useNavigate();\r\n const [snackbar, setSnackbar] = React.useState(null);\r\n const handleCloseSnackbar = () => setSnackbar(null);\r\n const [isLoading, setIsLoading] = useState(true);\r\n const [filterText, setFilterText] = useState({});\r\n\r\n const handleFilterTextChange = (field) => (event) => {\r\n setFilterText((prevFilterText) => ({\r\n ...prevFilterText,\r\n [field]: event.target.value,\r\n }));\r\n };\r\n\r\n const handleRowEditCommit = React.useCallback( (newRow) => {\r\n const updateRow = {...newRow, isNew: false};\r\n axios.patch(`${config.api.invokeUrl}/monitor`, { //api here\r\n Monitoring:newRow.Monitoring,\r\n User:newRow.User,\r\n Case:newRow.Case,\r\n Customer:newRow.Customer, \r\n Type:newRow.Type,\r\n Name:newRow.Name,\r\n QR_Code:newRow.QR_Code,\r\n Version:newRow.Version, \r\n Status:newRow.Status,\r\n Match_name:newRow.Match_name,\r\n Risk:newRow.Risk, \r\n Remarks:newRow.Remarks,\r\n Score:parseInt(newRow.Score),\r\n Alert:newRow.Alert\r\n },{\r\n headers: {\r\n \"content-type\": \"application/json\",\r\n Authorization: `${user.signInUserSession.idToken.jwtToken}`\r\n }\r\n })\r\n .then((res) => {\r\n //console.log(res.data)\r\n if (res.status == 204 || res.status == 201) {\r\n setSnackbar({ children: 'Customer: ' + newRow.Customer + ' Name: ' + newRow.Name + ' attribute updated successfully.', severity: 'success' });\r\n }\r\n else {\r\n setSnackbar({ children: 'Customer: ' + newRow.Customer + ' Name: ' + newRow.Name + ' attribute updates failed.', severity: 'error' });\r\n }\r\n })\r\n .catch((err) => {\r\n setSnackbar({ children: 'Customer: ' + newRow.Customer + ' Name: ' + newRow.Name + ' attribute updates exception.', severity: 'error' });\r\n if (err.response.status === 401 || err.response.status === 403) {\r\n //signOut();\r\n //navigate(\"/login\");\r\n window.location.reload(true);\r\n }\r\n console.log(err);\r\n });\r\n return updateRow\r\n },[])\r\n\r\n const handleProcessRowUpdateError = React.useCallback((error) => {\r\n }, []);\r\n\r\n const [rows, setRows] = useState([]);\r\n const [monitorFreq, setMonitorFreq] = useState('Disable');\r\n\r\n useEffect(() => {\r\n const fetchProfileData = async () => {\r\n try {\r\n // Make an API call to get the profile data\r\n if (user) {\r\n const response = await axios.get(\r\n `${config.api.invokeUrl}/profile`,\r\n {\r\n headers: {\r\n \"content-type\": \"application/json\",\r\n Authorization: `${user.signInUserSession.idToken.jwtToken}`,\r\n },\r\n }\r\n );\r\n \r\n if (response.status === 200) {\r\n const profileData = response.data;\r\n setMonitorFreq(profileData.Monitor_freq);\r\n }\r\n }\r\n } catch (error) {\r\n if (error.response.status === 401 || error.response.status === 403) {\r\n window.location.reload(true);\r\n }\r\n console.error('Error fetching profile data in layout:', error);\r\n setSnackbar({\r\n children: 'Fail to fetch the profile data in layout',\r\n severity: 'warning',\r\n });\r\n }\r\n };\r\n\r\n async function fetchCases() {\r\n setIsLoading(true);\r\n await axios.get(`${config.api.invokeUrl}/monitor`,\r\n { \r\n headers: {\r\n \"content-type\": \"application/json\",\r\n Authorization: `${user.signInUserSession.idToken.jwtToken}`\r\n },\r\n params:{\r\n \"User\":`${user.attributes.email}`\r\n }\r\n }) //call the testapi, get all items from database\r\n .then(function (response) { //make sure to call the correct stage+resource name link too (remidner to myself)\r\n //console.log(response.data);\r\n setRows(response.data);\r\n // response.data.forEach((note) => {insertRows(note)});\r\n })\r\n .catch((err) => {\r\n if (err.response.status === 401 || err.response.status === 403) {\r\n //signOut();\r\n //navigate(\"/login\");\r\n window.location.reload(true);\r\n\r\n }\r\n console.log(err);\r\n })\r\n .finally(() => {\r\n setIsLoading(false);\r\n });\r\n }\r\n\r\n fetchCases();\r\n fetchProfileData();\r\n\r\n const interval = setInterval(()=>{\r\n fetchCases()\r\n }, 1*60*1000)\r\n return()=>clearInterval(interval)\r\n }, []);\r\n\r\n const getRowClassName = (params) => {\r\n if (params.row.Monitoring) {\r\n if (params.row.Status == 'True-positive') {\r\n return 'highlight-true-row';\r\n }\r\n return 'highlight-monitor-row';\r\n }\r\n return '';\r\n };\r\n const { Customer, English_name, Chinese_name } = useParams() \r\n //const review = useLoaderData()\r\n return (\r\n \r\n {isLoading && }\r\n \r\n row.Case} //give id\r\n processRowUpdate={handleRowEditCommit}\r\n onProcessRowUpdateError={handleProcessRowUpdateError}\r\n getRowClassName={getRowClassName}\r\n experimentalFeatures={{ newEditingApi: true }}\r\n onCellEditStop={(params, event) => {\r\n if (params.reason !== GridCellEditStopReasons.enterKeyDown) {\r\n return;\r\n }\r\n if (isKeyboardEvent(event) && !event.ctrlKey && !event.metaKey) {\r\n event.defaultMuiPrevented = true;\r\n }\r\n }}\r\n // Enable quick filter for all columns using slotProps\r\n slots={{ toolbar: GridToolbar }}\r\n slotProps={{\r\n toolbar: {\r\n showQuickFilter: true\r\n },\r\n }}\r\n // Set filterModel based on the filterText state\r\n/* filterModel={{\r\n items: [\r\n {\r\n field: 'Customer',\r\n operator: 'contains',\r\n value: filterText['Customer'] || '',\r\n },\r\n // ... add similar items for other columns as needed\r\n ],\r\n }}\r\n */ />\r\n {!!snackbar && (\r\n \r\n \r\n \r\n )}\r\n \r\n );\r\n}","import { useAuthenticator } from \"@aws-amplify/ui-react\"\r\nimport { useNavigate } from 'react-router-dom'\r\nimport { API } from \"aws-amplify\"\r\nimport React, { useEffect, useState } from 'react'\r\nimport Container from '@mui/material/Container'\r\n//install before import: npm install @mui/x-data-grid\r\nimport { DataGrid, GridColDef, GridToolbar, GridToolbarContainer, GridToolbarExport } from '@mui/x-data-grid'\r\nimport Button from '@mui/material/Button'\r\n//import FileUploadOutlinedIcon from '@mui/icons-material/FileUploadOutlined';\r\nimport axios from 'axios'\r\n//import Notes from \"./Notes\"\r\n//import {nationalityList} from './Lists/nationalityList'\r\nimport VisibilityIcon from '@mui/icons-material/Visibility'\r\nimport VisibilityOffIcon from '@mui/icons-material/VisibilityOff'\r\nimport moment from \"moment/moment\"\r\nimport Box from '@mui/material/Box'\r\nimport { BarChart, Bar, Legend, CartesianGrid, XAxis, YAxis, Tooltip, Label, ResponsiveContainer } from 'recharts'\r\nimport {Card, CardContent, Typography, Grid} from '@mui/material'\r\nimport CircularProgress from '@mui/material/CircularProgress';\r\nimport Snackbar from '@mui/material/Snackbar';\r\nimport Alert from '@mui/material/Alert';\r\n\r\nconst config = require('../config.json')\r\n\r\nexport default function Audit() {\r\n //const { route } = useAuthenticator((context) => [context.route]);\r\n const { user, signOut } = useAuthenticator((context) => [context.user, context.signOut]);\r\n const navigate = useNavigate();\r\n const [notes, setNotes] = useState([]);\r\n const [graphData, setGraphData] = useState([]);\r\n const [previousMonthData, setPreviousMonthData] = useState([]);\r\n const [isLoading, setIsLoading] = useState(true);\r\n const [isAdmin, setAdmin] = useState(false);\r\n const [snackbar, setSnackbar] = React.useState(null);\r\n const handleCloseSnackbar = () => setSnackbar(null);\r\n const [enableGoogle, setEnableGoogle] = useState(false);\r\n\r\n var showButton\r\n const searchColumns = [\r\n {\r\n field: 'Create_time',\r\n headerName: 'Create Time',\r\n width: 160,\r\n renderCell: (params) => {\r\n const utcDate = new Date(params.value);\r\n const localDate = new Date(utcDate.getTime() - utcDate.getTimezoneOffset() * 60 * 1000);\r\n const year = localDate.getFullYear();\r\n const month = String(localDate.getMonth() + 1).padStart(2, '0');\r\n const day = String(localDate.getDate()).padStart(2, '0');\r\n const hours = String(localDate.getHours()).padStart(2, '0');\r\n const minutes = String(localDate.getMinutes()).padStart(2, '0');\r\n const seconds = String(localDate.getSeconds()).padStart(2, '0');\r\n return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;\r\n }\r\n },\r\n { field: 'Audit', headerName: 'Audit', width: 80, hideable: false },\r\n { field: 'Customer', headerName: 'Customer', width: 100, hideable: false },\r\n { field: 'Type', headerName: 'Type', width: 100, hideable: false },\r\n { field: 'English_name', headerName: 'English Name', width: 200, hideable: false },\r\n { field: 'Chinese_name', headerName: 'Chinese Name', width: 150, hideable: false }, \r\n { field: 'Acuris_English', headerName: 'Acuris', disableExport: true, width: 110,\r\n renderCell: (params) => (\r\n \r\n {showButton = Boolean(params.value) && params.value.substring(0,7) === \"Result/\"}\r\n {!showButton && Boolean(params.value) && params.value}\r\n {!showButton && !Boolean(params.value) && Boolean(params.row.English_name) && params.row.Audit === \"Search\" && \"processing...\"}\r\n {showButton && \r\n }\r\n \r\n )\r\n },\r\n enableGoogle && { field: 'English_filename', headerName: 'English_filename', disableExport: true, width: 110,\r\n renderCell: (params) => (\r\n \r\n {showButton = Boolean(params.value) && params.value.substring(0, 7) === \"Result/\"}\r\n {!showButton && Boolean(params.value) && params.value}\r\n {!showButton && !Boolean(params.value) && Boolean(params.row.English_name) && params.row.Audit === \"Search\" && \"processing...\"}\r\n {showButton && \r\n }\r\n \r\n )\r\n },\r\n enableGoogle && { field: 'Chinese_filename', headerName: 'Chinese_filename', disableExport: true, width: 110,\r\n renderCell: (params) => (\r\n \r\n {showButton = Boolean(params.value) && params.value.substring(0,7) === \"Result/\"}\r\n {!showButton && Boolean(params.value) && params.value}\r\n {!showButton && !Boolean(params.value) && Boolean(params.row.Chinese_name) && params.row.Audit === \"Search\" && \"processing...\"}\r\n {showButton && \r\n }\r\n \r\n )\r\n }, \r\n { field: 'Nationality', headerName: 'Nationality', width:80 },\r\n { field: 'DOB', headerName: 'DOB', width:90 },\r\n { field: 'Gender', headerName: 'Gender', width: 80 } \r\n ].filter(Boolean); // This will remove falsy values (i.e., undefined) from the array;\r\n const urlstr = `${config.api.invokeUrl}`\r\n\r\n const downloadSearchResult = async (filename) => {\r\n if (filename == null)\r\n return;\r\n console.log(\"download\", filename)\r\n const encodedFilename = encodeURIComponent(filename);\r\n const downloadUrl = `${urlstr}/kycic-search-result?file=${encodedFilename}`;\r\n //const link = document.createElement(\"a\");\r\n var axios = require('axios');\r\n var config = {\r\n method: 'get',\r\n url: downloadUrl,\r\n headers: {\r\n \"content-type\": \"application/json\",\r\n Authorization: `${user.signInUserSession.idToken.jwtToken}`\r\n }\r\n };\r\n \r\n axios(config)\r\n .then(function (response) {\r\n const Url = response.data.URL;\r\n window.open(Url);\r\n })\r\n .catch(function (error) {\r\n if (error.response.status === 401 || error.response.status === 403) {\r\n //signOut();\r\n //navigate(\"/login\");\r\n window.location.reload(true);\r\n }\r\n console.log(error);\r\n });\r\n }\r\n \r\n const fetchCases = async () => {\r\n setIsLoading(true);\r\n try {\r\n const requestInfo = {\r\n headers: {\r\n \"content-type\": \"application/json\",\r\n Authorization: `${user.signInUserSession.idToken.jwtToken}`\r\n },\r\n params:{\"User\":`${user.attributes.email}`}\r\n }\r\n const res = await axios.get(`${config.api.invokeUrl}/auditsearch`, requestInfo);\r\n const getNotesData = res.data.table_data;\r\n const getGraphData = res.data.graph_data;\r\n const getPreviousMonthData = res.data.previous_month_data;\r\n setNotes(getNotesData);\r\n setGraphData(getGraphData);\r\n setPreviousMonthData(getPreviousMonthData);\r\n } catch (err) { //consider using snackbar to say token expired \r\n if (err.response.status === 401 || err.response.status === 403) {\r\n //signOut();\r\n //navigate(\"/login\");\r\n window.location.reload(true);\r\n }\r\n console.log(`An error has occurred: ${err}`);\r\n } finally {\r\n setIsLoading(false);\r\n }\r\n }\r\n\r\n useEffect(() => {\r\n const fetchData = async () => {\r\n fetchCases(); // Your existing function\r\n \r\n const interval = setInterval(() => {\r\n fetchCases();\r\n }, 1 * 60 * 1000);\r\n \r\n return () => clearInterval(interval);\r\n };\r\n \r\n const fetchProfileData = async () => {\r\n try {\r\n // Make an API call to get the profile data\r\n if (user) {\r\n const response = await axios.get(\r\n `${config.api.invokeUrl}/profile`,\r\n {\r\n headers: {\r\n \"content-type\": \"application/json\",\r\n Authorization: `${user.signInUserSession.idToken.jwtToken}`,\r\n },\r\n }\r\n );\r\n \r\n if (response.status === 200) {\r\n const profileData = response.data;\r\n setAdmin(profileData.Admin);\r\n setEnableGoogle(profileData.Enable_Google)\r\n }\r\n }\r\n } catch (error) {\r\n if (error.response.status === 401 || error.response.status === 403) {\r\n //signOut();\r\n //navigate(\"/login\");\r\n window.location.reload(true);\r\n }\r\n console.error('Error fetching profile data in layout:', error);\r\n setSnackbar({\r\n children: 'Fail to fetch the profile data in layout',\r\n severity: 'warning',\r\n });\r\n }\r\n };\r\n \r\n fetchData(); // Call the existing fetchData function\r\n fetchProfileData(); // Call the new fetchProfileData function \r\n }, [user, isAdmin, enableGoogle])\r\n\r\n const [selectedFile, setSelectedFile] = useState(null);\r\n const [fileUploaded, setFileUploaded] = useState(false);\r\n const [logFile, setLogFile] = useState(null);\r\n const [showAdminGraph, setShowAdminGraph] = useState(false);\r\n var showButton;\r\n const onFileChange = (event) => {\r\n console.log(\"upload\"); \r\n setSelectedFile(event.target.files[0]);\r\n const formData = new FormData();\r\n var date = new Date();\r\n var file_name = date.toISOString().slice(0, 19).replace(/[^0-9]/g, \"\") + '-' + event.target.files[0].name;\r\n formData.append(\r\n user.attributes.email,\r\n event.target.files[0],\r\n file_name\r\n )\r\n var axios = require('axios');\r\n axios ({\r\n method: \"post\",\r\n url: urlstr,\r\n data: formData,\r\n headers: {\r\n \"content-type\": \"application/json\",\r\n Authorization: `${user.signInUserSession.idToken.jwtToken}`\r\n }\r\n })\r\n .then (() => {\r\n setLogFile('Import/' + file_name.slice(0,-3)+'log');\r\n setSelectedFile(null);\r\n setFileUploaded(true);\r\n setShowAdminGraph(true);\r\n })\r\n .catch((err) => {\r\n if (err.response.status === 401 || err.response.status === 403) {\r\n //signOut();\r\n //navigate(\"/login\");\r\n window.location.reload(true);\r\n }\r\n console.log(err);\r\n });\r\n }\r\n const CustomTooltip = ({ active, payload, label }) => {\r\n if (active) {\r\n const total = payload.reduce((sum, entry) => sum + entry.value, 0);\r\n \r\n return (\r\n
    \r\n

    {label}

    \r\n {payload.map((entry, index) => (\r\n

    \r\n {`${entry.name}: ${entry.value}`}\r\n

    \r\n ))}\r\n

    Total: {total}

    \r\n
    \r\n );\r\n }\r\n \r\n return null;\r\n }; \r\n return (\r\n \r\n {isLoading && }\r\n \r\n {enableGoogle && previousMonthData && (\r\n \r\n \r\n \r\n \r\n Google Total for {previousMonthData.Create_time} \r\n \r\n {previousMonthData ? previousMonthData.Google : 0} \r\n \r\n \r\n \r\n )}\r\n {previousMonthData && (\r\n \r\n \r\n \r\n \r\n Acuris Total for {previousMonthData.Create_time}\r\n \r\n {previousMonthData ? previousMonthData.Acuris : 0} \r\n \r\n \r\n \r\n )}\r\n {previousMonthData && (\r\n \r\n \r\n \r\n \r\n Monitor Total for {previousMonthData.Create_time}\r\n \r\n {previousMonthData ? previousMonthData.Monitor : 0} \r\n \r\n \r\n \r\n )}\r\n {previousMonthData && (\r\n \r\n \r\n \r\n \r\n Overall Total for {previousMonthData.Create_time} \r\n \r\n {previousMonthData ? previousMonthData.Acuris + previousMonthData.Google + previousMonthData.Monitor : 0} \r\n \r\n \r\n \r\n )} \r\n \r\n row.Case} \r\n autoHeight\r\n slots={{ toolbar: GridToolbar }}\r\n slotProps={{\r\n toolbar: {\r\n showQuickFilter: true\r\n },\r\n }}\r\n />\r\n {event.target.value = null}} \r\n />\r\n {isAdmin && (\r\n <>\r\n \r\n {showAdminGraph && \r\n \r\n \r\n \r\n \r\n \r\n } />\r\n \r\n {enableGoogle && ()}\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","import {Card, CardContent, CardActions, Typography, Grid} from '@mui/material'\r\nimport Button from '@mui/material/Button'\r\nimport React, { useEffect, useState } from 'react'\r\nimport axios from 'axios'\r\nimport { useAuthenticator } from \"@aws-amplify/ui-react\"\r\n\r\nconst config = require('../config.json')\r\n\r\nexport default function Admin() {\r\n const { user } = useAuthenticator((context) => [\r\n context.user,\r\n context.signOut,\r\n ]);\r\n const [importFiles, setImportFiles] = useState([]);\r\n const [searchFiles, setSearchFiles] = useState([]); \r\n const [isAdmin, setAdmin] = useState(false);\r\n\r\n const fetchTempFiles = async () => {\r\n try {\r\n const requestInfo = {\r\n headers: {\r\n \"content-type\": \"application/json\",\r\n Authorization: `${user.signInUserSession.idToken.jwtToken}`\r\n },\r\n params:{\"User\":`${user.attributes.email}`}\r\n }\r\n const res = await axios.get(`${config.api.invokeUrl}/dashboard`, requestInfo);\r\n const getImportFiles = res.data.Import;\r\n const getSearchFiles = res.data.Search;\r\n setImportFiles(getImportFiles);\r\n setSearchFiles(getSearchFiles);\r\n } catch (err) { \r\n if (err.response.status === 401 || err.response.status === 403) {\r\n //signOut();\r\n //navigate(\"/login\");\r\n window.location.reload(true);\r\n }\r\n console.log(`An error has occurred: ${err}`);\r\n }\r\n }\r\n\r\n useEffect(() => {\r\n const fetchFiles = async () => {\r\n fetchTempFiles();\r\n \r\n const interval = setInterval(() => {\r\n fetchTempFiles();\r\n }, 1 * 60 * 1000);\r\n \r\n return () => clearInterval(interval);\r\n };\r\n \r\n const fetchProfileData = async () => {\r\n try {\r\n // Make an API call to get the profile data\r\n if (user) {\r\n const response = await axios.get(\r\n `${config.api.invokeUrl}/profile`,\r\n {\r\n headers: {\r\n \"content-type\": \"application/json\",\r\n Authorization: `${user.signInUserSession.idToken.jwtToken}`,\r\n },\r\n }\r\n );\r\n \r\n if (response.status === 200) {\r\n const profileData = response.data;\r\n setAdmin(profileData.Admin);\r\n }\r\n }\r\n } catch (error) {\r\n if (error.response.status === 401 || error.response.status === 403) {\r\n //signOut();\r\n //navigate(\"/login\");\r\n window.location.reload(true);\r\n }\r\n console.error('Error fetching profile data in layout:', error);\r\n }\r\n };\r\n \r\n fetchFiles();\r\n fetchProfileData(); \r\n }, [user, isAdmin])\r\n\r\n return (\r\n \r\n {isAdmin && \r\n \r\n {searchFiles.length > 0 ? (\r\n \r\n Overall outstanding search activities\r\n \r\n ) : (\r\n \r\n No outstanding search activity\r\n \r\n )}\r\n \r\n }\r\n {isAdmin && searchFiles.map((item, index) => (\r\n \r\n \r\n \r\n \r\n Running Search File\r\n \r\n \r\n File upload time: {item.timestamp}\r\n \r\n \r\n Length of time in storage: {item.minutes_since_creation} minutes\r\n \r\n \r\n Search type: {item.search_type === 'A' ? 'Acuris' : item.search_type === 'G' ? 'Google' : item.search_type}\r\n \r\n \r\n \r\n \r\n ))}\r\n {isAdmin && \r\n \r\n {importFiles.length > 0 ? (\r\n \r\n Overall pending import processes\r\n \r\n ) : (\r\n \r\n No pending import process\r\n \r\n )}\r\n \r\n }\r\n {isAdmin && importFiles.map((item, index) => (\r\n \r\n \r\n \r\n \r\n Import WIP File\r\n \r\n \r\n File upload time: {item.timestamp}\r\n \r\n \r\n Length of time in storage: {item.minutes_since_creation} minutes\r\n \r\n \r\n User: {item.file_user}\r\n \r\n \r\n \r\n \r\n ))}\r\n \r\n );\r\n}","export default __webpack_public_path__ + \"static/media/AppbarLogo.404f60c5.png\";","import React, { useState, useEffect } from 'react';\r\nimport { Modal, Box, Typography, Button, TextField, Select, MenuItem, Grid } from '@mui/material';\r\nimport axios from 'axios';\r\nimport { useAuthenticator } from \"@aws-amplify/ui-react\";\r\nimport Snackbar from '@mui/material/Snackbar';\r\nimport Alert from '@mui/material/Alert';\r\nimport FormControlLabel from '@mui/material/FormControlLabel';\r\nimport Checkbox from '@mui/material/Checkbox';\r\nimport LogoutIcon from '@mui/icons-material/Logout';\r\n\r\nconst config = require('../config.json')\r\nconst ProfileModal = ({ open, onClose }) => {\r\n const [disclaimerConfirmed, setDisclaimerConfirmed] = useState(false);\r\n const [userEmail, setUserEmail] = useState('');\r\n const [userEmails, setUserEmails] = useState([]);\r\n const [type, setType] = useState('');\r\n const [origtype, setOrigType] = useState('');\r\n const [brNumber, setBRNumber] = useState('');\r\n const [contactNumber, setContactNumber] = useState('');\r\n const [isAdmin, setAdmin] = useState(false);\r\n const [monitorFreq, setMonitorFreq] = useState('Disable');\r\n const [userEmailChanged, SetUserEmailChanged] = useState(false);\r\n const [snackbar, setSnackbar] = React.useState(null);\r\n const handleCloseSnackbar = () => setSnackbar(null);\r\n const handleCheckboxChange = () => {\r\n setDisclaimerConfirmed(!disclaimerConfirmed);\r\n };\r\n const [scrollEnd, setScrollEnd] = useState(false);\r\n\r\n const isProfileFilled = () => {\r\n return type && brNumber && contactNumber;\r\n };\r\n\r\n const isSupporting = () => {\r\n if (user)\r\n return user.attributes.email !== userEmail;\r\n else\r\n return false;\r\n };\r\n\r\n const handleScroll = (e) => {\r\n const target = e.target;\r\n\r\n if (target.scrollHeight - target.scrollTop < target.clientHeight + 5) {\r\n setScrollEnd(true);\r\n } else {\r\n setScrollEnd(false);\r\n }\r\n };\r\n\r\n const { user, signOut } = useAuthenticator((context) => [context.user, context.signOut]);\r\n\r\n const handleClose = (event, reason) => {\r\n if (reason != 'backdropClick') {\r\n setTimeout(() => {\r\n onClose();\r\n }, 1000); // Wait for 1 sec so that logout process completed\r\n if (isAdmin || origtype != type)\r\n window.location.reload();\r\n }\r\n };\r\n\r\n const handleSave = async () => {\r\n // Create a data object to send to your API\r\n const data = {\r\n userEmail,\r\n type,\r\n brNumber,\r\n contactNumber,\r\n disclaimerConfirmed,\r\n monitorFreq\r\n };\r\n\r\n try {\r\n const response = await axios.patch(`${config.api.invokeUrl}/profile`, data, {\r\n headers: {\r\n \"content-type\": \"application/json\",\r\n Authorization: `${user.signInUserSession.idToken.jwtToken}`\r\n }\r\n });\r\n\r\n // Handle the response as needed\r\n //console.log(response.data);\r\n\r\n } catch (error) {\r\n if (error.response.status === 401 || error.response.status === 403) {\r\n //signOut();\r\n //navigate(\"/login\");\r\n window.location.reload(true);\r\n }\r\n console.error('Error:', error);\r\n setSnackbar({ children: 'Fail to save the profile data', severity: 'warning' });\r\n }\r\n handleClose();\r\n };\r\n\r\n useEffect(() => {\r\n // Reset scroll position when modal is opened\r\n setScrollEnd(false);\r\n }, [open]);\r\n\r\n useEffect(() => {\r\n const SaveSupportingUserMail = async () => {\r\n const data = {\r\n userEmail,\r\n };\r\n \r\n try {\r\n const response = await axios.patch(`${config.api.invokeUrl}/profile`, data, {\r\n headers: {\r\n \"content-type\": \"application/json\",\r\n Authorization: `${user.signInUserSession.idToken.jwtToken}`\r\n }\r\n });\r\n SetUserEmailChanged(true)\r\n } catch (error) {\r\n\r\n if (error && error.response.status === 401 || error.response.status === 403) {\r\n //signOut();\r\n //navigate(\"/login\");\r\n window.location.reload(true);\r\n }\r\n console.error('Error:', error);\r\n setSnackbar({ children: 'Fail to update the supporting email', severity: 'warning' });\r\n }\r\n }\r\n\r\n if (userEmail && isAdmin) {\r\n SaveSupportingUserMail()\r\n }\r\n }, [userEmail]);\r\n\r\n useEffect(() => {\r\n const fetchProfileData = async () => {\r\n try {\r\n // Make an API call to get the profile data\r\n const response = await axios.get(`${config.api.invokeUrl}/profile`, {\r\n headers: {\r\n \"content-type\": \"application/json\",\r\n Authorization: `${user.signInUserSession.idToken.jwtToken}`\r\n }\r\n });\r\n\r\n if (response.status === 200) {\r\n const profileData = response.data;\r\n setUserEmails(profileData.user_emails || []);\r\n setUserEmail(profileData.User_email || '');\r\n setType(profileData.Profile_type || '');\r\n setOrigType(profileData.Profile_type || '');\r\n setBRNumber(profileData.BR_number || '');\r\n setMonitorFreq(profileData.Monitor_freq || 'Disable');\r\n setContactNumber(profileData.Profile_contact_number || '');\r\n setAdmin(profileData.Admin || false);\r\n setDisclaimerConfirmed(profileData.Disclaimer_confirmed || false);\r\n }\r\n SetUserEmailChanged(false)\r\n } catch (error) { \r\n if (error.response.status === 401 || error.response.status === 403) {\r\n //signOut();\r\n //navigate(\"/login\");\r\n window.location.reload(true);\r\n }\r\n console.error('Error fetching profile data:', error);\r\n setSnackbar({ children: 'Fail to fetch the profile data', severity: 'warning' });\r\n }\r\n };\r\n\r\n // Fetch profile data when the modal is opened\r\n if ((open && user) || (isAdmin && userEmailChanged)) {\r\n fetchProfileData();\r\n }\r\n }, [open, userEmailChanged]);\r\n\r\n // Function to get initial monitor based on type\r\n const getInitialMonitor = (profileType) => {\r\n switch (profileType) {\r\n case 'MSO':\r\n case 'MSO premium':\r\n return 'Disable';\r\n case 'TCSP':\r\n case 'TCSP premium':\r\n return 'Semi-annually';\r\n case 'Money lender':\r\n return 'Quarterly';\r\n case 'SFC licensed corp':\r\n case 'Bank':\r\n return 'Daily';\r\n default:\r\n return 'Disable';\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n if (type !== origtype) {\r\n // Update monitor based on selected type\r\n setMonitorFreq(getInitialMonitor(type));\r\n }\r\n }, [type]);\r\n\r\n return (\r\n \r\n \r\n \r\n Profile\r\n \r\n \r\n \r\n {/* New TextField with MenuItem from userEmails */}\r\n {userEmails.length > 0 && (\r\n setUserEmail(e.target.value)}\r\n disabled={!isAdmin}\r\n >\r\n {userEmails.map((email) => (\r\n \r\n {email}\r\n \r\n ))}\r\n \r\n )}\r\n \r\n \r\n setType(e.target.value)}\r\n disabled={!isAdmin}\r\n >\r\n MSO\r\n MSO premium\r\n TCSP\r\n TCSP premium\r\n Money lender\r\n SFC licensed corp\r\n Bank\r\n \r\n \r\n \r\n {\r\n console.log(\"Event object:\", e); // Log the entire event object\r\n console.log(\"Value:\", e.target.value); // Log the value from the event target\r\n setMonitorFreq(e.target.value)\r\n }}\r\n disabled={!isAdmin}\r\n >\r\n Disable\r\n Daily\r\n Monthly\r\n Quarterly\r\n Semi-annually\r\n \r\n \r\n \r\n setBRNumber(e.target.value)}\r\n disabled={!isAdmin}\r\n />\r\n \r\n \r\n setContactNumber(e.target.value)}\r\n disabled={!isAdmin}\r\n />\r\n \r\n \r\n \r\n \r\n USER AGREEMENT:\r\n \r\n \r\n THIS AGREEMENT is made on the consent given upon registration of account between each user of the web application (“Client”) and KYC Intelligent Compliance Limited (“KYCIC”).\r\n \r\n \r\n 1. DEFINED TERMS\r\n
    \r\n 1.1 In this Agreement:\r\n
    \r\n Agreement means this agreement and the Schedule and hereby incorporated hereto.\r\n
    \r\n Affiliate means, in respect of a company, a company which is its subsidiary or holding company, whether direct or indirect, or a company which is a direct or indirect subsidiary of that holding company and shall include such entities whether now existing or later established by investment, merger or otherwise, including the successors and assigns of such entities.\r\n
    \r\n Applicable Period means the period in which this Agreement remains in force as decided by KYCIC from time to time;\r\n
    \r\n Client means any third party entering into a contractual arrangement with KYCIC to obtain access to the Database and/or Services Content as a result of the operation of (including permissions granted by) this Agreement.\r\n
    \r\n Confidential Information means any information belonging or relating to a Party (including its Affiliates) disclosed by or on behalf of that Party (the Disclosing Party) whether in writing, orally or by any other means, directly or indirectly, intentionally or unintentionally, before, on or after the date of this Agreement, relating to the business, activities, products, services, technology and financial information of either Party or its customers, employees or officers, and any other information of the Disclosing Party that is marked confidential or that the Receiving Party ought reasonably to have known was confidential, including but not limited to (i) proprietary or trade secret information, know-how, IPRs, algorithms, configurations, marketing, commercial, legal, operational, and administrative activities, pricing information, benchmarking studies, trading positions, strategy, specifications, designs, plans, drawings, hardware, software, data, prototypes, facilities, premises, systems, security, procedures, and (ii) any reports, copies, summaries, analyses, data, plans, forecasts, compilations, studies, notes, discussions, interpretations, memoranda and other documents which contain or otherwise reflect or are generated from any information specified in sub-paragraph (i) hereof and the contents thereof. The terms and conditions of this Agreement shall be Confidential Information of KYCIC.\r\n
    \r\n Database means the KYC6 Database containing Services Content to which KYCIC grants access under the terms of this Agreement, as updated from time to time by information provided by KYCIC (and for the avoidance of doubt including any application programming interface and/or other technology from time to time provided by KYCIC to enable access to the Database).\r\n
    \r\n Data Protection Laws has the meaning set out in the Schedule.\r\n
    \r\n Effective Date means the date that this Agreement is made upon registration of account.\r\n
    \r\n Fees mean the fees set out in a separate Fee Agreement between each Client and KYCIC.\r\n
    \r\n IPR means copyright, moral rights, database rights, patents, patent applications, patent rights, rights to inventions, rights in designs, trademarks, trademark applications, trademark registrations, trademark rights, business names, rights in get-up and trade dress, goodwill and the right to sue for passing off domain names, trade secrets, in each case whether registered or unregistered, and all other intellectual property and proprietary information rights as may exist now or hereafter come into existence, all modifications, continuations, renewals and extensions of the foregoing, and all claims, actions, causes of action, damages, costs, expenses, profits, penalties, recoveries and remedies relating to any past, present or future infringement of any of the foregoing, arising under the laws of any country, state or jurisdiction in the world (and including any goodwill in any of the aforementioned).\r\n
    \r\n Schedule means the Data Protection Schedule as displayed on the Data Protection tab at https://kycic.io/data-protection which may be updated from time to time to reflect the latest changes in relevant Data Protection Laws\r\n
    \r\n Services Content means in relation to the Database the data sets, data feeds and other content contained in the Database, which has been obtained by KYCIC from third parties or generated in- house, presented in a format suitable for searching the information and using other functionality and including software operating it to enable Client to search the Database and use other functionality.\r\n
    \r\n Service IPR means, in relation to the Database and/or Services Content, all IPR in the same to the extent that such IPR belongs to KYCIC.\r\n
    \r\n Term means the term of this Agreement from the Effective Date until the ending of this Agreement in accordance with Clause 9.1.\r\n
    \r\n Terms and Conditions means these terms and conditions (including the Schedule), which follow the Schedule.\r\n
    \r\n 1.2 Clause, schedule and paragraph headings do not affect the interpretation of this Agreement. A reference to a Clause or the Schedule is a reference to a clause of, or the schedule to, this Agreement. A reference to a paragraph is to a paragraph of the relevant schedule, and a reference to an appendix is to the relevant appendix to this Agreement. Unless the context otherwise requires, a reference to one gender includes a reference to the other genders. A reference to a particular statute, statutory provision or subordinate legislation is a reference to it as it is in force from time to time, taking account of any amendment or re-enactment and includes any statute, statutory provision or subordinate legislation which it amends or re-enacts and subordinate legislation for the time being in force made under it. Where the words include(s), including or in particular are used in this Agreement, they are deemed to have the words without limitation following them.\r\n
    \r\n \r\n 2. SCHEDULE\r\n
    \r\n 2.1 In the event of any conflict between the Schedule and these terms and conditions, these terms and conditions will take precedence unless otherwise expressly provided by the Schedule (in which case the Schedule shall take precedence, but only for the purpose of that Schedule and no other Schedule).\r\n
    \r\n \r\n 3. USE OF DATABASE\r\n
    \r\n 3.1 Subject to the provisions of this Agreement, and in consideration of the proper payment by the Client to KYCIC of the Fees, KYCIC grants the Client for the Term a non-exclusive, non-transferable, non-assignable, non-sublicensable (save as expressly permitted in this Agreement) to:\r\n
    \r\n a) access the Database; and\r\n
    \r\n b) use Services Content solely for the proper purposes of conducting Client’s business.\r\n
    \r\n 3.2 The Database and Services Content shall be used only by the Client; \r\n
    \r\n 3.3 Except to the extent permitted by this Agreement, the Client shall not:\r\n
    \r\n a) market or exploit the Database and/or Services Content or make it available to another person or permit another person to use or access it;\r\n
    \r\n b) alter or modify the Database and/or Services Content;\r\n
    \r\n c) copy, reverse engineer, decompile or disassemble the Database and/or Services Content or any part of it or them;\r\n
    \r\n d) charge or otherwise deal in or encumber the Database and/or Services Content;\r\n
    \r\n e) delete, remove or in any way obscure KYCIC's proprietary notices on any copy of the Database and/or Services Content;\r\n
    \r\n f) in any circumstances use, nor instruct, facilitate or otherwise influence any third party to access the Database and/or Services Content (including via any automated software, process, programme, robot, web crawler, spider, data mining, trawling, screen scraping or other similar software, regardless of whether or not the resulting information would then be used for their internal purposes) to gain unauthorised access to the Database and/or Services Content;\r\n
    \r\n g) use the Database and/or Services Content in any way which might infringe any licence granted to Client, any law (including criminal and/or Data Protection Law) and/or use the Database and/or Services Content for any unlawful and/or unauthorised purpose;\r\n
    \r\n h) use the name, trademarks, service marks, logos, domain names, or any other identifiers of KYCIC in any way without prior written approval of the lawful owner of such identifier in each instance;\r\n
    \r\n i) remove any copyright or other notice contained or included in the Database and/or Services Content;\r\n
    \r\n j) use the Database and/or Services Content to compete in any way with KYCIC and/or any licensor of KYCIC;\r\n
    \r\n k) copy any of the look and feel of the software and/or the business logic or functionality of the software in the Database and/or Services Content;\r\n
    \r\n 3.4 The Client acknowledges and agrees that it is responsible and liable for all acts and omissions of Client’s user in connection with the KYCIC’s user interface. The Client undertakes to:\r\n
    \r\n a) monitor the use of the KYCIC’s user interface for any activity that breaches applicable laws, rules, and regulations or any terms of this Agreement, including any fraudulent, inappropriate, or potentially harmful behaviour, and promptly restrict any offending users of the KYCIC’s user interface from its future use;\r\n
    \r\n b) use all reasonable endeavours to secure the KYCIC’s user interface from infringement, misappropriation, theft, misuse of unauthorised access; and\r\n
    \r\n c) use all reasonable endeavours to prevent the introduction of any virus or vulnerability into the Database via any use of the KYCIC’s user interface.\r\n
    \r\n 3.5 The Client acknowledges that the Database and the Services Content is licensed, not sold, and that it obtain(s) no ownership of the Database or any Services Content.\r\n
    \r\n 3.6 The Client undertakes, promptly upon becoming aware of any breach of this Clause 3, to notify KYCIC thereof, and promptly provide such detail as KYCIC may reasonably request.\r\n
    \r\n 3.7 The Client shall ensure that the Client’s users abide by the obligations, restrictions and limitations set out in this Agreement (including the provisions of Clauses 3.2 to 3.6 inclusive, this Clause 3.7, 6.1 h) to 6.1.j) inclusive, 8 and 11 (the provisions listed in this Clause 3.7 being the Key Terms)), and accordingly the Client acknowledges and agrees that compliance with the Key Terms is of fundamental importance to KYCIC and its protection of its IPR. Where KYCIC (acting reasonably) determines that the Client is in breach of Clause 3.3, Clause 3.4 and/or this Clause 3.7, such breach will be deemed a material breach incapable of remedy of this Agreement and the provisions of Clause 9.2.a) will apply.\r\n
    \r\n \r\n 4. FEE ARRANGEMENT\r\n
    \r\n 4.1 The Client shall pay the Fees to KYCIC within 30 (thirty) days of issue of KYCIC’s invoice.\r\n
    \r\n 4.2 During the Applicable Period of the Agreement, KYCIC may increase the Fees as it thinks appropriate with 30 days prior notice. \r\n
    \r\n 4.3 The Fees do not include any value added tax or other applicable taxes, which the Client may be required to pay in addition.\r\n
    \r\n 4.4 Without prejudice to Clause 4.5 and/or any of KYCIC’s other rights, if the Client fails to pay the Fees when they are due, KYCIC may charge the Client interest at either (at KYCIC’s sole option): (i) 10% per annum of the total sum due; or (ii) the maximum rate permitted by law; compounded daily from the due date for payment until the date on which the obligation of the Client to pay the sum is discharged in full (whether before or after judgment). The Parties agree that such sum has been agreed commercially and in good faith as a reasonable pre-estimate of such loss by way of liquidated damages.\r\n
    \r\n 4.5 Failure to pay Fees when due shall be a material breach of this Agreement, and the provisions of Clause 9.2.a) shall apply. Without prejudice to any other right or remedy it may have, KYCIC reserves the right to set off any amount owing at any time to it by the Client against any amount payable by KYCIC to the Client and to apply an additional reactivation fee upon resolution at KYCIC’s discretion.\r\n
    \r\n 4.6 The Client shall not be entitled to withhold Fees on the grounds that there are pending complaints or disputes.\r\n
    \r\n 4.7 The Parties agree that the Fees have been agreed commercially and in good faith.\r\n
    \r\n \r\n 5. REPRESENTATIONS AND WARRANTIES\r\n
    \r\n 5.1 KYCIC warrants at the Effective Date that:\r\n
    \r\n a) it is entitled to grant the licenses set out in this Agreement;\r\n
    \r\n b) use by the Client of any Service IPR will not infringe the IPR of any third party; and\r\n
    \r\n c) it will perform its obligations under this Agreement with reasonable care and skill.\r\n
    \r\n 5.2 If the Client gives KYCIC notice of a breach of the warranties in Clause 5.1, KYCIC shall use all reasonable endeavours to remedy the defect. This shall be the Client’s sole and exclusive remedy for a breach of any warranty in Clause 5.1.\r\n
    \r\n 5.3 Except as expressly set out in this Agreement, KYCIC makes no warranty or representation. To the maximum extent permitted by law, and except for the warranties expressly set forth herein, KYCIC disclaims any and all other warranties and conditions, whether express, implied, or statutory, including but not limited to implied warranties (if any) of merchantability, fitness for a particular purpose, intellectual property right infringement and satisfactory quality.\r\n
    \r\n \r\n 6 RIGHTS AND OBLIGATIONS\r\n
    \r\n 6.1 The Client shall:\r\n
    \r\n a) give KYCIC and its representatives, promptly upon KYCIC’s reasonable notice, such access to premises, personnel, software, equipment, information, and records as KYCIC requires to perform its obligations under this Agreement, to verify the accuracy of Fees charged and/or paid, and/or to verify that the Client is complying with its obligations under this Agreement provided that KYCIC complies at all times with the Client’s internal policies (including security and health and safety policies) in force from time to time. KYCIC shall have no liability for a failure to perform its obligations to the extent that such failure is due to the Client denying such access to KYCIC;\r\n
    \r\n b) if KYCIC conducts an audit of the Client’s compliance with its obligations under this Agreement that reveals that the Client is in breach of those obligations, reimburse KYCIC in respect of its reasonable costs incurred in carrying out that audit;\r\n
    \r\n c) provide KYCIC with such facilities and assistance, as KYCIC requires to perform its obligations under this Agreement;\r\n
    \r\n d) comply with any operating instructions of which KYCIC has given the Client reasonable notice;\r\n
    \r\n e) remain solely responsible for the use of the Database and/or any Services Content;\r\n
    \r\n f) prohibit any person who is not a Client’s user from using the Database and/or any Services Content;\r\n
    \r\n g) not, and procure that Client’s users do not, access or use the Database and/or Services Content in any manner that constitutes unauthorized access to or use of the Database and/or Services Content;\r\n
    \r\n h) prevent unauthorized access to or use of the Database and/or Services Content and promptly notify KYCIC of any unauthorized access to or use of the Database and/or Services Content and any loss or theft or unauthorized use of any Client’s password or username;\r\n
    \r\n i) ensure that usernames and passwords for the Database and/or Services Content are not shared or used by more than one Client’s user; and\r\n
    \r\n k) not, during the Term and continuing for a period of 2 (two) years following termination of this Agreement, solicit the employment or hire any (i) current employee of KYCIC or its Affiliates; or (ii) any person who was an employee of KYCIC or of its Affiliates within the immediately preceding 12 (twelve) month period. Nothing in this Clause shall prevent the Client hiring any employee or former employee of KYCIC or its Affiliates provided such employee is not utilized in connection with (a) the provision of any service provided under this Agreement and/or any similar service, or (b) any content similar to or related to any Services Content; in each case on commencement of employment or at any time during the period of 1 (one) year following commencement of employment.\r\n
    \r\n \r\n 7 DATA PROTECTION\r\n
    \r\n 7.1 The IPRs and all right, title and interest in the IPRs in the Database and all Services Content shall remain at all times vested in KYCIC and/or its Affiliates and/or licensors. The IPRs in any services delivered pursuant to this Agreement are, and shall remain at all times, vested in KYCIC or its Affiliates and/or licensors. The Client acknowledges and agrees that (a) all present and future rights in and the Database and all Services Content, including the right to grant access to any of them via any present or future technology, are solely and exclusively reserved to KYCIC and/or its licensors, and (b) that the Database and the Services Content are not in the public domain; and (c) that the Database and the Services Content have been developed by KYCIC through substantial amounts of work, time and expense invested in obtaining and presenting its contents.\r\n
    \r\n 7.2 The Client grants KYCIC the right to compile, process and store any data, metadata, user behaviour and analytics Client provides to KYCIC in order to provide and enhance KYCIC’s provision of the Database and the Services Content. The Client acknowledges and agree that KYCIC and its Affiliates may also use such data for their business purposes including but not limited to support, product development and enhancement, including the development and enhancement of derivative products, statistical analysis, billing and reporting, provided however that KYCIC may only use the Client’s data for the fulfillment of this Agreement, unless the Client’s data is aggregated with the data of other clients such that the identification of any particular client cannot be ascertained (such data being Obfuscated Data). All IPRs, right, title and interest in Obfuscated Data, including any products derived from or enhanced with Obfuscated Data, shall at all times be and shall remain vested with KYCIC.\r\n
    \r\n 7.3 The Parties agree that all Personal Data will be processed in accordance with the Data Processing Agreement in the Schedule.\r\n
    \r\n \r\n 8. LIMITATION OF LIABILITIES\r\n
    \r\n 8.1 Subject to Clause 8.6, neither Party shall be liable to the other or to any third party for any: (a) loss of software, loss of or corruption to data, loss of profits or revenues, trading losses, fines, loss of contracts, loss of operation time, loss of goodwill or anticipated savings; or (b) any indirect, special or consequential loss, damage, costs or expense of any kind of whatever nature, even if foreseeable or if a Party has been advised of their possibility and in all cases however caused and whether arising under or in connection with this Agreement, tort (including negligence), breach of statutory duty or otherwise. For the avoidance of doubt, the Client’s liability for Fees due or payable by the Client lost by KYCIC as a result of the Client’s breach of this Agreement are not excluded under this Clause 8.1.\r\n
    \r\n 8.2 The Client acknowledges that KYCIC compiles data but does not originate it. Accordingly, the Database and the Services Content are provided on an “as is and as available” basis and KYCIC does not make any representations or warranties of any kind, whether statutory, express or implied, relating to the Database and the Services Content (including relating to the timeliness, currency, continuity, accuracy, completeness, merchantability, non-infringement or fitness for a particular purpose thereof). In particular, no representation and/or warranty is given that the provision of such data by KYCIC complies with any law.\r\n
    \r\n 8.3 The Client acknowledges that every business decision involves the assumption of a risk and that KYCIC, in furnishing the Database and Services Content to the Client, does not and will not underwrite that risk, in any manner whatsoever. KYCIC shall not be liable to the Client or any third party for any loss caused in whole or in part by KYCIC’s procuring, compiling, collecting, interpreting, reporting, communicating, supplying or delivering the Database and/or the Services Content and the Client agrees not to bring any claim against KYCIC and/or its data suppliers in respect thereof.\r\n
    \r\n 8.4 The Client acknowledges that:\r\n
    \r\n a) use of the Database and/or the Services Content by it is at its sole risk;\r\n
    \r\n b) whilst KYCIC obtains data in the Database and/or the Services Content in good faith from sources which KYCIC considers to be reliable, such data is supplied to KYCIC by third parties and is not independently verified by KYCIC;\r\n
    \r\n c) KYCIC does not guarantee the sequence, accuracy, completeness and/or timeliness of the Database and/or the Services Content;\r\n
    \r\n d) neither the Database nor the Services Content are intended to and do not provide tax, legal or investment advice;\r\n
    \r\n e) the Client should seek independent tax, legal and/or investment advice before acting on data obtained from the Database and/or Services Content; and\r\n
    \r\n f) KYCIC shall not be under and excludes to the fullest extent permitted by law all liability to the Client for any liability whatsoever in respect of (i) any mistakes, errors, inaccuracies or omissions in, or incompleteness of, the Database and/or Services Content, (ii) delays in updating any Database and/or Services Content or nonavailability thereof (iii) loss of profit, business revenue, goodwill and anticipated savings (whether direct or indirect) incurred through the use of any Database and/or Services Content; (iv) trading, investment or other losses which Client may incur as a result of use of or reliance upon the Database and/or Services Content (iv) internet failure, and/or (v) failure of the Client to have in place any necessary software or equipment; and/or (vii) any claim that the provision of the Database and/or Services Content infringes any law.\r\n
    \r\n 8.5 The entire liability of KYCIC under or in connection with this Agreement shall at all times be limited to an amount no greater in the aggregate than the total amount of Fees paid to it in the preceding twelve months.\r\n
    \r\n 8.6 Notwithstanding any other provision of this Clause 8, nothing in this Agreement shall operate to exclude or restrict either Party’s liability for death or personal injury resulting from negligence, or any other liability to the extent that the same may not be limited or excluded by the laws governing this Agreement.\r\n
    \r\n 8.7 The Client shall indemnify KYCIC against all loss, liability, cost and expense (including reasonable legal expenses) incurred by KYCIC and/or any Affiliate as a result:\r\n
    \r\n a) the use of the Database and/or Services Content in any manner not expressly authorised under the terms of this Agreement; and/or\r\n
    \r\n b) any breach by the Client of any obligation imposed upon it in accordance with the terms of this Agreement (including the Key Terms).\r\n
    \r\n \r\n 9. TERM AND TERMINATION\r\n
    \r\n 9.1 The Agreement will remain in force for the Initial Period and then automatically renew for additional terms each equal in duration to the Initial Period (each such additional term an Additional Period) unless terminated by either Party by notice to the other Party no less than 90 (ninety) days prior to the date of the expiration of the then current Initial Period or Additional Period. Such termination shall be effective at the end of the then current Initial Period or Additional Period. The provisions of this clause 9.1 are subject at all times to earlier termination in accordance with clause 9.2.\r\n
    \r\n 9.2 A Party may terminate this Agreement with immediate effect by notice to the other Party in the event of:\r\n
    \r\n a) the other Party being in breach of a material obligation under this Agreement and such breach is incapable of remedy or, if the breach is capable of remedy, the breaching Party failing to remedy the breach within 30 (thirty) days starting on the day after receipt of notice from the first Party giving details of the breach and requiring the other Party to remedy the breach; or\r\n
    \r\n b) the other Party passing a resolution for its winding up, a court making an order for the other Party's winding up or dissolution, the making of an administration order in relation to the other Party (or a legally analogous event in any jurisdiction), or the other Party making an arrangement or composition with its creditors generally or making an application to a court for protection from its creditors generally (or any legally analogous event in any jurisdiction).\r\n
    \r\n 9.3 Upon termination:\r\n
    \r\n a) all licences granted under Clause 3.1 shall terminate;\r\n
    \r\n b) the Client shall, in addition to complying with its obligation under Clause 11.8 in respect of Confidential Information, cease using the Database and Services Content, and within 10 (ten) days of termination of the Agreement the Client shall deliver to KYCIC or delete or destroy all copies of the Database and Services Content and shall certify in writing to KYCIC that none of them and, except as may be required by law, no copies of them have been retained by the Client or any other person;\r\n
    \r\n c) the Client shall promptly pay KYCIC all Fees and charges due at the date of termination;\r\n
    \r\n d) the provisions of Clauses 4, 5.3, 6.11, 7.3, 8, 9, 11 and 14 shall survive such termination; and\r\n
    \r\n 9.4 The rights or liabilities of either Party which may have accrued up to the date of termination shall remain unaffected.\r\n
    \r\n \r\n 10. MATERIAL ADVERSE EVENTS\r\n
    \r\n 10.1 If a Party is prevented, hindered or delayed from or in performing any of its obligations under this Agreement by an event beyond its reasonable control (including, without limitation, strike, lock-out, labour dispute, act of God, war, riot, civil commotion, epidemic or pandemic, malicious damage, compliance with a law or governmental order, rule, regulation or direction, accident, breakdown of plant or machinery, fire, flood and storm), that Party's obligations under this Agreement are suspended while the event continues and to the extent that it is prevented, hindered or delayed. For the avoidance of doubt, no such suspension shall be granted to any obligation under this Agreement to pay KYCIC.\r\n
    \r\n 10.2 If an event of the kind referred to in Clause 10.1 continues to prevent, hinder or delay the performance of a Party’s obligations under this Agreement and/or Agreement in a material respect for more than 30 (thirty) days, the other Party may terminate this Agreement with immediate effect by notice to the affected Party.\r\n
    \r\n \r\n 11. CONFIDENTIAL INFORMATION\r\n
    \r\n 11.1 The Receiving Party shall not use Confidential Information for a purpose other than the performance of its obligations or enforcement of its rights under this Agreement and shall not disclose Confidential Information to any third party except with the prior written consent of the Disclosing Party or in accordance with Clause 11.3.\r\n
    \r\n 11.2 The Receiving Party shall not disclose Confidential Information except to any of its officers, employees, agents, professional advisors and contractors (Authorised Representatives) provided that disclosure is necessary for the purposes of this Agreement, and such disclosee is bound to obligations of confidentiality at least as stringent as those provided under this Agreement.\r\n
    \r\n 11.3 Clauses 11.1 and 11.2 do not apply to Confidential Information which:\r\n
    \r\n a) is at the Effective Date, or at any time after that date becomes publicly known other than by the Receiving Party's breach of this Agreement; or\r\n
    \r\n b) can be shown by the Receiving Party to the Disclosing Party's reasonable satisfaction to have been known by the Receiving Party before disclosure by the Disclosing Party to the Receiving Party or subsequently to have been disclosed to the Receiving Party by a source other than the Disclosing Party without breach of this Agreement.\r\n
    \r\n c) KYCIC reserves the right to collect, use, and analyze metadata, user behavior, and analytics arising from the Client’s use of the Database and Services Content. KYCIC may use such information to improve its services, develop new products, perform statistical analysis, and for any other business purpose, provided that any use of Client data shall be anonymized and aggregated, ensuring that the Client’s identity cannot be directly identified from such information.\r\n
    \r\n 11.4 Notwithstanding anything to the contrary, the Receiving Party may share Confidential Information in the limited circumstance that it is required to disclose by law or by a competent regulatory authority, such Confidential Information, provided however, the Receiving Party making such disclosure must:\r\n
    \r\n a) first notify the Disclosing Party as soon as practicable upon becoming aware of any such requirement; and\r\n
    \r\n b) co-operate with the Disclosing Party (at the Disclosing Party’s reasonable expense) to avoid or limit disclosure and to gain assurances as to confidentiality from the authority to whom the information is to be disclosed.\r\n
    \r\n 11.5 Each Party will expressly inform its Authorised Representatives of the confidential nature of the Confidential Information of the Disclosing Party and the purpose for which it may be used and will procure their compliance with the terms of this Agreement as if they were a party to it. The Receiving Party shall be responsible for any breach of this Agreement by any of its Authorised Representatives, and, at its sole expense, shall take all reasonable measures to restrain its Authorised Representatives from prohibited or unauthorised disclosure or use of the Confidential Information.\r\n
    \r\n 11.6 The Receiving Party shall not use the Confidential Information in any manner that could compete with the business of the Disclosing Party.\r\n
    \r\n 11.7 Confidential Information shall remain the exclusive property of the Disclosing Party. Except as specifically provided for herein, nothing in this Agreement shall be construed as granting or conferring any rights by licence or otherwise in any Confidential Information of the Disclosing Party.\r\n
    \r\n 11.8 Within 10 (ten) days of termination of this Agreement the Receiving Party shall:\r\n
    \r\n a) return to the Disclosing Party or destroy all documents and materials (including electronic media) or such parts thereof as contain or relate to any Confidential Information, together with any copies which are in the Receiving Party’s possession, custody or control or are in the possession, custody or control of any of its Authorised Representatives, provided that such information is in a form which is capable of delivery or destruction; and\r\n
    \r\n b) permanently erase all Confidential Information from any computer, word processor, mobile telecommunications device or similar device by or on behalf of the Receiving Party or by or on behalf of its Authorised Representatives.\r\n
    \r\n 11.9 The Receiving Party may retain: (i) one copy of the Confidential Information for the purposes of and for so long as required by any law, court or regulatory agency or authority or its internal compliance procedures; and (ii) electronic files containing Confidential Information created pursuant to automatic archiving and back-up procedures.\r\n
    \r\n 11.10 The Receiving Party acknowledges that neither the destruction, return nor deletion of any Confidential Information will release it from the obligations contained in this Agreement .\r\n
    \r\n 11.11 The Receiving Party recognises that irreparable harm can be occasioned to the Disclosing Party by breach of this Agreement and by the unauthorised disclosure, reproduction or use of the Confidential Information by it or its Authorised Representatives and that monetary damages will be inadequate to compensate the Disclosing Party for such breach. The Receiving Party agrees that in the event of such breach, the Disclosing Party may be entitled to apply for a preliminary injunction to protect and recover the Confidential Information. This remedy shall be in addition to any other remedies available to the Parties under this Agreement or at law.\r\n
    \r\n \r\n 12. NOTICES\r\n
    \r\n 12.1 All notices given under or in connection with this Agreement shall be in writing in the English language.\r\n
    \r\n 12.2 Notices to:\r\n
    \r\n a) KYCIC shall be delivered to KYCIC’s address which KYCIC may have from time to time specified in a notice by (i) hand or (ii) post or in the invoice sent to the Client.\r\n
    \r\n b) the Client shall be delivered to the Client’s address which the Client may have from time to time specified in a notice or any billing address provided by the Client from time to time by (i) hand or (ii) post or (iii) as otherwise agreed by the Parties in writing.\r\n
    \r\n \r\n 13. GENERAL PROVISIONS\r\n
    \r\n 13.1 This Agreement constitutes the entire agreement, and supersedes any previous agreements, between the Parties relating to the subject matter of this Agreement. The Client acknowledges that it has not relied on or been induced to enter this Agreement by any representation other than those expressly set out in this Agreement. KYCIC is not liable to the Client (in equity, contract or tort, or in any other way) for a representation (other than a fraudulent misrepresentation) that is not set out in this Agreement.\r\n
    \r\n 13.2 To the extent not already terminated, any prior agreement between KYCIC and the Client relating to the Database and/or Services Content is hereby terminated.\r\n
    \r\n 13.3 A variation of this Agreement is valid only if it is in writing and agreed by or on behalf of each Party.\r\n
    \r\n 13.4 The failure by either Party to exercise or delay in exercising a right or remedy provided by this Agreement or by law does not constitute a waiver by such Party of the right or remedy or a waiver of other rights or remedies. No single or partial exercise by either Party of a right or remedy provided by this Agreement or by law prevents further exercise of the right or remedy or the exercise of another right or remedy.\r\n
    \r\n 13.5 In this Agreement, a reference to a person includes a reference to a body corporate, association or partnership and to that person's legal personal representatives, successors and lawful assigns.\r\n
    \r\n 13.6 This Agreement is personal to the Client, and it shall not assign or otherwise transfer its rights or obligations under this Agreement without the prior written consent of KYCIC save that the Client may assign its rights and obligations under this Agreement (in whole but not in part) to any of its Affiliates.\r\n
    \r\n 13.7 This Agreement is not intended to confer any right or benefit on any person who is not party to it. A person who is not party to this Agreement has no right to enforce any term, condition or other provision of this Agreement.\r\n
    \r\n 13.8 This Agreement shall not constitute or imply any partnership, joint venture, agency, fiduciary relationship or other contractual relationship unless expressly provided for in this Agreement.\r\n
    \r\n 13.9 If any provision of this Agreement is prohibited by law or judged by a court to be unlawful, void or unenforceable, the provision shall to the extent required be severed from this Agreement and rendered ineffective as far as possible without modifying the remaining provisions of this Agreement , and shall not in any way affect any other circumstances of or the validity or enforcement of this Agreement . The Parties hereby agree to attempt to substitute for any invalid, unlawful or unenforceable provision a valid lawful or enforceable provision which achieves to the greatest extent possible the economic, legal and commercial objectives of the invalid, unlawful or unenforceable provision.\r\n
    \r\n 13.10 This Agreement may become effective upon registration of username and password at the web application and this has the same effect as if the signatories were on a single copy of this Agreement . Execution and delivery of this Agreement by exchange of copies (including electronically) upon confirmation of the Client shall constitute a valid and binding execution and delivery of this Agreement by the Client to KYCIC.\r\n
    \r\n 13.11 This Agreement is the result of negotiations between the Parties, each of which is a sophisticated business entity commercially familiar with the subject matter of the Agreement. In the event an ambiguity or question of intent or interpretation arises, this Agreement shall be construed as if drafted jointly by the Parties and no presumption or burden of proof shall arise favouring or disfavouring any Party by virtue of the authorship of any provisions of this Agreement.\r\n
    \r\n \r\n 14. JURISDICTION\r\n
    \r\n 14.1 This Agreement is governed by, and shall be construed in accordance with, the laws of Hong Kong.\r\n
    \r\n 14.2 Each Party shall comply with all applicable law, rules and regulations in respect of all activities conducted under this Agreement.\r\n
    \r\n 14.3 Subject to Clause 14.4, the Parties consent to non-exclusive jurisdiction of the courts of Hong Kong.\r\n
    \r\n 14.4 Nothing in Clause 14.3 shall prevent either Party from seeking injunctive relief in the courts of any jurisdiction for the breach, or threatened breach, of this Agreement.\r\n
    \r\n
    \r\n\r\n \r\n }\r\n label=\"I have read, understood and consent to the User Agreement herein.\"\r\n />\r\n\r\n \r\n {!(type && brNumber && contactNumber) && (\r\n
    \r\n

    Email to general@kycic.io with BR and contact number to enable the service

    \r\n
    \r\n )}\r\n
    \r\n \r\n \r\n {!isProfileFilled() && !isAdmin && (\r\n \r\n )}\r\n {isAdmin && (\r\n \r\n )}\r\n \r\n {!!snackbar && (\r\n \r\n \r\n \r\n )}\r\n \r\n
    \r\n );\r\n};\r\n\r\nexport default ProfileModal;\r\n","import React, { useState, useEffect } from 'react'\r\nimport { useLocation, useNavigate } from 'react-router-dom'\r\nimport List from '@mui/material/List'\r\nimport ListItem from '@mui/material/ListItem'\r\nimport ListItemIcon from '@mui/material/ListItemIcon'\r\nimport ListItemText from '@mui/material/ListItemText'\r\nimport { AddCircleOutlineOutlined, SubjectOutlined } from '@mui/icons-material'\r\nimport MuiDrawer from '@mui/material/Drawer';\r\nimport MuiAppBar from '@mui/material/AppBar';\r\nimport Toolbar from '@mui/material/Toolbar'\r\nimport Divider from '@mui/material/Divider';\r\nimport IconButton from '@mui/material/IconButton';\r\nimport MenuIcon from '@mui/icons-material/Menu';\r\nimport ChevronLeftIcon from '@mui/icons-material/ChevronLeft';\r\nimport ChevronRightIcon from '@mui/icons-material/ChevronRight';\r\nimport Box from '@mui/material/Box'\r\nimport { styled, useTheme } from '@mui/material/styles'\r\nimport logo from './AppbarLogo.png'\r\nimport Button from '@mui/material/Button'\r\nimport Stack from '@mui/material/Stack'\r\nimport { useAuthenticator } from \"@aws-amplify/ui-react\";\r\nimport RateReviewOutlinedIcon from '@mui/icons-material/RateReviewOutlined';\r\nimport TaskOutlinedIcon from '@mui/icons-material/TaskOutlined';\r\nimport LoginIcon from '@mui/icons-material/Login';\r\nimport LogoutIcon from '@mui/icons-material/Logout';\r\nimport MenuBookIcon from '@mui/icons-material/MenuBook';\r\nimport LiveHelpOutlinedIcon from '@mui/icons-material/LiveHelpOutlined';\r\nimport SettingsRoundedIcon from '@mui/icons-material/SettingsRounded';\r\nimport ProfileModal from '../pages/ProfileModal'\r\nimport axios from 'axios';\r\nimport Snackbar from '@mui/material/Snackbar';\r\nimport Alert from '@mui/material/Alert';\r\nimport Typography from '@mui/material/Typography'\r\n\r\nconst config = require('../config.json')\r\n\r\nconst drawerWidth = 210\r\n\r\nconst openedMixin = (theme) => ({\r\n width: drawerWidth,\r\n transition: theme.transitions.create('width', {\r\n easing: theme.transitions.easing.sharp,\r\n duration: theme.transitions.duration.enteringScreen,\r\n }),\r\n overflowX: 'hidden',\r\n});\r\n\r\nconst closedMixin = (theme) => ({\r\n transition: theme.transitions.create('width', {\r\n easing: theme.transitions.easing.sharp,\r\n duration: theme.transitions.duration.leavingScreen,\r\n }),\r\n overflowX: 'hidden',\r\n width: `calc(${theme.spacing(7)} + 1px)`,\r\n [theme.breakpoints.up('sm')]: {\r\n width: `calc(${theme.spacing(8)} + 1px)`,\r\n },\r\n});\r\n\r\nconst DrawerHeader = styled('div')(({ theme }) => ({\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'flex-end',\r\n padding: theme.spacing(0, 1),\r\n // necessary for content to be below app bar\r\n ...theme.mixins.toolbar,\r\n}));\r\n\r\nconst AppBar = styled(MuiAppBar, {\r\n shouldForwardProp: (prop) => prop !== 'open',\r\n})(({ theme, open }) => ({\r\n zIndex: theme.zIndex.drawer + 1,\r\n transition: theme.transitions.create(['width', 'margin'], {\r\n easing: theme.transitions.easing.sharp,\r\n duration: theme.transitions.duration.leavingScreen,\r\n }),\r\n ...(open && {\r\n marginLeft: drawerWidth,\r\n width: `calc(100% - ${drawerWidth}px)`,\r\n transition: theme.transitions.create(['width', 'margin'], {\r\n easing: theme.transitions.easing.sharp,\r\n duration: theme.transitions.duration.enteringScreen,\r\n }),\r\n }),\r\n}));\r\n\r\nconst Drawer = styled(MuiDrawer, { shouldForwardProp: (prop) => prop !== 'open' })(\r\n ({ theme, open }) => ({\r\n width: drawerWidth,\r\n flexShrink: 0,\r\n whiteSpace: 'nowrap',\r\n boxSizing: 'border-box',\r\n ...(open && {\r\n ...openedMixin(theme),\r\n '& .MuiDrawer-paper': openedMixin(theme),\r\n }),\r\n ...(!open && {\r\n ...closedMixin(theme),\r\n '& .MuiDrawer-paper': closedMixin(theme),\r\n }),\r\n }),\r\n);\r\n\r\nexport default function Layout({ children }) {\r\n const [userEmail, setUserEmail] = useState('');\r\n const [isAdmin, setAdmin] = useState(false);\r\n const [snackbar, setSnackbar] = React.useState(null);\r\n const handleCloseSnackbar = () => setSnackbar(null);\r\n\r\n const { user, route, signOut } = useAuthenticator((context) => [\r\n context.route,\r\n context.signOut,\r\n ]);\r\n\r\n function logOut() {\r\n signOut();\r\n navigate(\"/login\");\r\n }\r\n\r\n const theme = useTheme()\r\n const [open, setOpen] = React.useState(false);\r\n\r\n const handleDrawerOpen = () => {\r\n setOpen(true);\r\n };\r\n\r\n const handleDrawerClose = () => {\r\n setOpen(false);\r\n };\r\n\r\n const navigate = useNavigate()\r\n const location = useLocation()\r\n const styles = {\r\n active: {\r\n background: '#f4f4f4'\r\n }\r\n }\r\n const menuItems = [\r\n { \r\n text: 'New Case', \r\n icon: , \r\n path: '/create' \r\n },\r\n { \r\n text: 'Cases Table', \r\n icon: , \r\n path: '/' \r\n },\r\n { \r\n text: 'Review Table', \r\n icon: , \r\n path: '/monitor' \r\n },\r\n { \r\n text: 'Audit Trail', \r\n icon: , \r\n path: '/audit' \r\n },\r\n isAdmin && { \r\n text: 'Administration', \r\n icon: , \r\n path: '/admin' \r\n },\r\n ];\r\n\r\n const onDownload = () => {\r\n const link = document.createElement(\"a\");\r\n link.download = `KYCIC app note.pdf`;\r\n link.href = \"KYCIC app note.pdf\";\r\n link.click();\r\n };\r\n\r\n const [profileModalOpen, setProfileModalOpen] = useState(false);\r\n\r\n // Function to open the ProfileModal\r\n const openProfileModal = () => {\r\n setProfileModalOpen(true);\r\n };\r\n\r\n // Function to close the ProfileModal\r\n const closeProfileModal = () => {\r\n setProfileModalOpen(false);\r\n };\r\n\r\n useEffect(() => {\r\n const fetchProfileData = async () => {\r\n try {\r\n // Make an API call to get the profile data\r\n if (user) {\r\n const response = await axios.get(`${config.api.invokeUrl}/profile`, {\r\n headers: {\r\n \"content-type\": \"application/json\",\r\n Authorization: `${user.signInUserSession.idToken.jwtToken}`\r\n }\r\n });\r\n\r\n if (response.status === 200) {\r\n const profileData = response.data;\r\n setUserEmail(profileData.User_email || '');\r\n setAdmin(profileData.Admin);\r\n if (!profileData.Admin && (!profileData.Disclaimer_confirmed || !profileData.Profile_type || !profileData.BR_number || !profileData.Profile_contact_number)) {\r\n setProfileModalOpen(true);\r\n }\r\n }\r\n }\r\n } catch (error) { \r\n if (error.response.status === 401 || error.response.status === 403) {\r\n //signOut();\r\n //navigate(\"/login\");\r\n window.location.reload(true);\r\n }\r\n console.error('Error fetching profile data in layout:', error);\r\n setSnackbar({ children: 'Fail to fetch the profile data in layout', severity: 'warning' });\r\n }\r\n };\r\n\r\n // Call the fetchProfileData function when the component mounts\r\n fetchProfileData();\r\n }, [userEmail, user, profileModalOpen]); // Include user as a dependency\r\n\r\n return (\r\n \r\n {/* app bar */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {route !== \"authenticated\" ?(\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 {theme.direction === 'rtl' ? : }\r\n \r\n \r\n \r\n\r\n {/* links/list section */}\r\n \r\n {menuItems.map((item) => (\r\n navigate(item.path)}\r\n sx = {location.pathname == item.path ? styles.active : null}\r\n >\r\n {item.icon}\r\n \r\n \r\n ))}\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n {/* main content */}\r\n \r\n theme.mixins.toolbar} />\r\n { children }\r\n \r\n \r\n )\r\n}\r\n","import { Authenticator } from \"@aws-amplify/ui-react\";\r\nimport \"@aws-amplify/ui-react/styles.css\";\r\nimport { useAuthenticator, View } from \"@aws-amplify/ui-react\";\r\nimport { useEffect } from \"react\";\r\nimport { useNavigate, useLocation } from \"react-router\";\r\nexport function Login() {\r\n const { route } = useAuthenticator((context) => [context.route]);\r\n const location = useLocation();\r\n const navigate = useNavigate();\r\n let from = location.state?.from?.pathname || \"/\";\r\n useEffect(() => {\r\n if (route === \"authenticated\") {\r\n navigate(from, { replace: true });\r\n }\r\n }, [route, navigate, from]);\r\n return (\r\n \r\n \r\n \r\n );\r\n}\r\n","import { useLocation, Navigate } from \"react-router-dom\";\r\nimport { useAuthenticator } from \"@aws-amplify/ui-react\";\r\n\r\nexport function RequireAuth({ children }) {\r\n const location = useLocation();\r\n const { route } = useAuthenticator((context) => [context.route]);\r\n if (route !== \"authenticated\") {\r\n return ;\r\n }\r\n return children;\r\n}\r\n","export default __webpack_public_path__ + \"static/media/maintenance-image.1be8f4af.jpeg\";","// MaintenanceModal.js\r\nimport React from 'react';\r\nimport Modal from '@mui/material/Modal';\r\nimport Typography from '@mui/material/Typography';\r\nimport Box from '@mui/material/Box';\r\nimport maintenanceImage from './maintenance-image.jpeg'; // Replace with your image path\r\n\r\nconst styles = {\r\n modalContainer: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n height: '100vh',\r\n },\r\n modalContent: {\r\n background: '#fff',\r\n padding: '24px',\r\n width: '400px',\r\n borderRadius: '8px',\r\n boxShadow: '0px 4px 10px rgba(0, 0, 0, 0.1)',\r\n textAlign: 'center',\r\n },\r\n imageContainer: {\r\n marginBottom: '16px',\r\n },\r\n image: {\r\n maxWidth: '100%',\r\n height: 'auto',\r\n },\r\n heading: {\r\n marginBottom: '16px',\r\n },\r\n};\r\n\r\nconst MaintenanceModal = ({ isOpen }) => {\r\n return (\r\n \r\n
    \r\n \r\n \r\n \r\n \r\n Maintenance Notice\r\n \r\n \r\n We are currently undergoing maintenance. Sorry for the inconvenience.\r\n \r\n
    \r\n
    \r\n );\r\n};\r\n\r\nexport default MaintenanceModal;\r\n","import { BrowserRouter as Router, Routes, Route } from 'react-router-dom'\r\nimport Notes from './pages/Notes'\r\nimport Create from './pages/Create'\r\nimport Monitor from './pages/Monitor'\r\nimport Audit from './pages/Audit'\r\nimport Admin from './pages/Admin'\r\nimport Layout from './components/Layout'\r\nimport {Login} from './components/Login'\r\nimport { Authenticator } from \"@aws-amplify/ui-react\";\r\nimport { RequireAuth } from './RequireAuth'\r\nimport MaintenanceModal from './pages/MaintenanceModal';\r\nimport React, { useState } from 'react'\r\n\r\n\r\n\r\nfunction MyRoutes() {\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\nfunction App() {\r\n const [isMaintenanceModalOpen, setIsMaintenanceModalOpen] = useState(false);\r\n return (\r\n \r\n <>\r\n \r\n \r\n \r\n \r\n );\r\n}\r\n\r\nexport default App;\r\n","/* eslint-disable */\n// WARNING: DO NOT EDIT. This file is automatically generated by AWS Amplify. It will be overwritten.\n\nconst awsmobile = {\n \"aws_project_region\": \"ap-southeast-1\",\n \"aws_cognito_identity_pool_id\": \"ap-southeast-1:7a7a29ac-e192-4a12-adda-a124291936d1\",\n \"aws_cognito_region\": \"ap-southeast-1\",\n \"aws_user_pools_id\": \"ap-southeast-1_XlpoT6mRI\",\n \"aws_user_pools_web_client_id\": \"5ocieur8k8pc9h2bn23jltcjap\",\n \"oauth\": {},\n \"aws_cognito_username_attributes\": [\n \"EMAIL\"\n ],\n \"aws_cognito_social_providers\": [],\n \"aws_cognito_signup_attributes\": [\n \"EMAIL\",\n \"NAME\"\n ],\n \"aws_cognito_mfa_configuration\": \"OFF\",\n \"aws_cognito_mfa_types\": [\n \"SMS\"\n ],\n \"aws_cognito_password_protection_settings\": {\n \"passwordPolicyMinLength\": 8,\n \"passwordPolicyCharacters\": []\n },\n \"aws_cognito_verification_mechanisms\": [\n \"EMAIL\"\n ]\n};\n\n\nexport default awsmobile;\n","import React from 'react'\r\nimport ReactDOM from 'react-dom/client'\r\nimport './index.css'\r\nimport App from './App'\r\nimport {Amplify} from 'aws-amplify'\r\nimport awsExports from './aws-exports'\r\n\r\nAmplify.configure(awsExports);\r\n\r\nconst el = document.getElementById('root')\r\nif (el === null) throw new Error('Root container missing in index.html')\r\n\r\nconst root = ReactDOM.createRoot(el)\r\nroot.render(\r\n \r\n \r\n \r\n)\r\n\r\n"],"sourceRoot":""}