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GACX,MAAM0B,QAAY1C,EAAAA,EAAAA,IAAaqB,GAC/BL,GAAW,GACO,KAAd0B,EAAIzD,SACJqC,EAAkB,IAClBf,GAAoB,GACpBM,EAAe,CAAEC,MAAO,WAAYnC,QAAS,2BAA4BwG,UAAU,IACnF3C,IACJ,EAsNgK0D,EAAqB,IAExK5F,IACGhD,EAAAA,EAAAA,KAAC6I,EAAAA,EAAY,CAAC/H,QAASkC,EAAkB3B,QAASiC,EAAYjC,QAASH,YAAY,iBAAiBK,QApPpGuH,KAChB7F,GAAoB,GACpBE,GAAkB,GAClB4F,SAASC,eAAe,WAAWrD,MAAQ,EAAE,WAuPrD,C","sources":["component/alert/removeAlert.js","services/API/mod_member.js","views/daftar-anggota/index.js"],"sourcesContent":["import { Component } from \"react\";\r\n\r\nexport default class extends Component {\r\n render() {\r\n return (\r\n <>\r\n
\r\n
\r\n
\r\n
\r\n
{this.props?.titleMessage}
\r\n

{this.props.message}

\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n )\r\n }\r\n}","import axios from \"axios\"\r\nimport { appConfig } from \"../../config\";\r\nimport { jsonHeaderAuth, refreshAuthLogic } from \"../fetchTools\";\r\n\r\n\r\nexport const getAllDataMember = async () => {\r\n try {\r\n const {status, data} = await axios.get(`${appConfig.BASE_API}/member/getAll`, {\r\n ...jsonHeaderAuth()\r\n })\r\n\r\n return{status,data}\r\n } catch (error) {\r\n return { status: error.code, message: error.message }\r\n }\r\n}\r\n\r\nexport const createNewMember = async (req) => {\r\n try {\r\n const {status,data} = await axios.post(`${appConfig.BASE_API}/member/create`, req, {\r\n ...jsonHeaderAuth()\r\n })\r\n\r\n return{status,data}\r\n } catch (error) {\r\n return { status: error.code, message: error.message }\r\n }\r\n}\r\n\r\nexport const getDataMemberById = async (id) => {\r\n try {\r\n const {status,data} = await axios.get(`${appConfig.BASE_API}/member/getId/${id}`, {\r\n ...jsonHeaderAuth()\r\n })\r\n\r\n return{status,data}\r\n } catch (error) {\r\n return { status: error.code, message: error.message }\r\n }\r\n}\r\n\r\nexport const updateMember = async (id, req) => {\r\n try {\r\n const {status,data} = await axios.post(`${appConfig.BASE_API}/member/update/${id}`, req, {\r\n ...jsonHeaderAuth()\r\n })\r\n\r\n return{status,data}\r\n } catch (error) {\r\n return { status: error.code, message: error.message }\r\n }\r\n}\r\n\r\nexport const deleteMember = async (id) => {\r\n try {\r\n const {status,data} = await axios.get(`${appConfig.BASE_API}/member/delete/${id}`, {\r\n ...jsonHeaderAuth()\r\n })\r\n\r\n return{status,data}\r\n } catch (error) {\r\n return { status: error.code, message: error.message }\r\n }\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { Link, useNavigate, useParams } from \"react-router-dom\";\r\nimport RemoveAlert from \"../../component/alert/removeAlert\";\r\nimport ConfirmAlert from \"../../component/alert/confirmAlert\";\r\nimport LoadingAlert from \"../../component/alert/loadingAlert\";\r\nimport { NavDropdown } from \"react-bootstrap\";\r\nimport { deleteMember, getAllDataMember, createNewMember } from \"../../services/API/mod_member\";\r\n\r\nfunction DaftarAnggota() {\r\n const { id } = useParams()\r\n const navigate = useNavigate()\r\n const [showPopup, setShowPopup] = useState(false)\r\n const [showSuccessPopup, setShowSuccessPopup] = useState(false)\r\n const [showErrorPopup, setShowErrorPopup] = useState(false)\r\n const [showDeletePopup, setShowDeletePopup] = useState(false)\r\n const [alertOption, setAlertOption] = useState({ title: '', message: '' })\r\n const [loading, setLoading] = useState(false)\r\n const [email, setEmail] = useState('')\r\n const [errorEmail, setErrorEmail] = useState('')\r\n const [deletedAnggota, setDeletedAnggota] = useState('')\r\n const [searchActive, setSearchActive] = useState(false)\r\n const [isActive, setIsActive] = useState(false)\r\n const [dataMember, setDataMember] = useState([])\r\n const [clickSearch, setClickSeacrh] = useState(false)\r\n const [dataMemberDefault, setDataMemberDefault] = useState([])\r\n const [showMoreMember, setShowMoreMember] = useState(true)\r\n const [itemsMember, setItemsMember] = useState(10)\r\n const [isFormValid, setIsFormValid] = useState(false)\r\n useEffect(() => {\r\n init()\r\n\r\n }, []);\r\n const emailText = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/\r\n async function init() {\r\n setLoading(true)\r\n const res = await getAllDataMember()\r\n setLoading(false)\r\n if (res.status == 200) {\r\n\r\n //res.data.Table = undefined\r\n\r\n if (res.data.Table != undefined)\r\n {\r\n setDataMember(res.data.Table)\r\n setDataMemberDefault(res.data.Table)\r\n // console.log(res.data);\r\n if(res.data.Table.length < itemsMember) {\r\n setShowMoreMember(false)\r\n } else {\r\n setShowMoreMember(true)\r\n }\r\n }\r\n else\r\n {\r\n setShowMoreMember(false)\r\n }\r\n }\r\n }\r\n\r\n const handleEmail = (e) => {\r\n\r\n const value = e.target.value\r\n setEmail(value)\r\n if(value === \"\") { \r\n setErrorEmail(\"Silahkan isi email\")\r\n } else { \r\n setErrorEmail('')\r\n }\r\n }\r\n\r\n const handlePopup = () => {\r\n setShowSuccessPopup(false)\r\n setShowErrorPopup(false)\r\n document.getElementById('keyword').value = '';\r\n }\r\n\r\n const handleDeletedAnggota = (id, email) => {\r\n setShowDeletePopup(true)\r\n setDeletedAnggota(id)\r\n setAlertOption({ title: 'Konfirmasi', message: `Hapus Anggota : ${email}`, redirect: false })\r\n }\r\n\r\n const handleCancelDelete = () => {\r\n setShowDeletePopup(false)\r\n setShowSuccessPopup(false)\r\n }\r\n\r\n const handleConfirmDelete = async () => {\r\n setShowDeletePopup(false)\r\n setLoading(true)\r\n const res = await deleteMember(deletedAnggota)\r\n setLoading(false)\r\n if (res.status == 200) {\r\n setDeletedAnggota('')\r\n setShowSuccessPopup(true)\r\n setAlertOption({ title: 'Berhasil', message: 'Anggota berhasil dihapus', redirect: false })\r\n init()\r\n }\r\n }\r\n\r\n const handleNavClick = (nav) => {\r\n setIsActive(false)\r\n\r\n if (nav === \"active\") {\r\n setIsActive(true)\r\n }\r\n }\r\n\r\n const handleSearchActive = () => {\r\n setSearchActive(false)\r\n setClickSeacrh(false)\r\n }\r\n\r\n const handleSearch = (e) => {\r\n if(e.target.value != '') {\r\n var filterData = dataMemberDefault.filter(val => (val.emailaddress.toLowerCase().includes(e.target.value.toLowerCase())))\r\n setDataMember(filterData)\r\n\r\n if (filterData.length < itemsMember) {\r\n setShowMoreMember(false)\r\n } else {\r\n setShowMoreMember(true)\r\n }\r\n } else {\r\n setDataMember(dataMemberDefault)\r\n\r\n if (dataMemberDefault.length > itemsMember) {\r\n setShowMoreMember(true)\r\n } else {\r\n setShowMoreMember(false)\r\n }\r\n }\r\n }\r\n\r\n const handleResetSearch = () => {\r\n setDataMember(dataMemberDefault)\r\n\r\n if (dataMemberDefault.length > itemsMember) {\r\n setShowMoreMember(true)\r\n } else {\r\n setShowMoreMember(false)\r\n }\r\n }\r\n\r\n const handleShowMoreMember = () => {\r\n const showItems = 5\r\n const newItemsMember = itemsMember + showItems\r\n\r\n setItemsMember(newItemsMember)\r\n\r\n if (newItemsMember >= dataMember.length) {\r\n setShowMoreMember(false)\r\n }\r\n }\r\n const submit = async (e) => {\r\n e.preventDefault()\r\n let isValid = true\r\n\r\n if(email === \"\" || !emailText.test(email)) {\r\n if(!emailText.test(email)) {\r\n setErrorEmail(\"Format email tidak valid\")\r\n } else {\r\n setErrorEmail(\"Silahkan isi email\")\r\n }\r\n isValid = false\r\n } else {\r\n setErrorEmail('')\r\n }\r\n\r\n if(!email.match(/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/)) {\r\n setErrorEmail(\"Format email tidak valid\")\r\n isValid = false\r\n }\r\n setIsFormValid(isValid)\r\n\r\n if(isValid) {\r\n\r\n \r\n setLoading(true)\r\n const res = await createNewMember({emailaddress: email})\r\n setLoading(false)\r\n if(res.status == 200 && res.data.includes('Success insert new member')) {\r\n setShowSuccessPopup(true)\r\n setAlertOption({title:'', message:'Berhasil tambah anggota', redirect: false})\r\n setEmail('')\r\n init()\r\n } else {\r\n setShowSuccessPopup(true)\r\n setAlertOption({title:'Error', message:res.data, redirect: false})\r\n \r\n }\r\n }\r\n\r\n }\r\n\r\n return (\r\n <>\r\n
\r\n
\r\n
\r\n {\r\n searchActive ? (\r\n
\r\n \r\n \r\n \r\n
e.preventDefault()}>\r\n setClickSeacrh(true)} id=\"keyword\" type=\"text\" className=\"form-control search-riwayat d-md-none d-inline\" placeholder=\"Telusuri...\" style={{position:'absolute', right:65}}/>\r\n \r\n
\r\n {/* */}\r\n handleNavClick('active')} id=\"nav-dropdown\" title={} style={{position: 'absolute', right: 20, zIndex: '1111'}}>\r\n \r\n
\r\n
\r\n Tambah Anggota\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 Berbagi History\r\n

\r\n
\r\n
\r\n \r\n setSearchActive(true)} style={{ fontSize: '20px' }}>\r\n \r\n
\r\n\r\n \r\n )\r\n }\r\n
\r\n
\r\n
\r\n
\r\n
e.preventDefault()}>\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n {errorEmail}\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 dataMember.slice(0, itemsMember).map((val,key) => (\r\n
\r\n
\r\n
{val.emailaddress}
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n ))\r\n }\r\n {\r\n showMoreMember && (\r\n
\r\n \r\n
\r\n )\r\n }\r\n
\r\n
\r\n \r\n {showDeletePopup && (\r\n {handleConfirmDelete()}}/>\r\n )}\r\n {showSuccessPopup && (\r\n \r\n )}\r\n
\r\n
\r\n \r\n )\r\n}\r\n\r\nexport default DaftarAnggota"],"names":["Component","render","_this$props","_jsx","_Fragment","children","style","position","top","left","right","bottom","backgroundColor","zIndex","display","this","props","visible","alignItems","justifyContent","className","customClass","_jsxs","titleMessage","message","marginRight","onClick","onCancel","getAllDataMember","async","status","data","axios","get","appConfig","BASE_API","jsonHeaderAuth","error","code","createNewMember","post","req","getDataMemberById","id","updateMember","deleteMember","useParams","showPopup","setShowPopup","useNavigate","useState","showSuccessPopup","setShowSuccessPopup","showErrorPopup","setShowErrorPopup","showDeletePopup","setShowDeletePopup","alertOption","setAlertOption","title","loading","setLoading","email","setEmail","errorEmail","setErrorEmail","deletedAnggota","setDeletedAnggota","searchActive","setSearchActive","isActive","setIsActive","dataMember","setDataMember","clickSearch","setClickSeacrh","dataMemberDefault","setDataMemberDefault","showMoreMember","setShowMoreMember","itemsMember","setItemsMember","isFormValid","setIsFormValid","useEffect","init","emailText","res","undefined","Table","length","handleSearch","e","target","value","filterData","filter","val","emailaddress","toLowerCase","includes","handleResetSearch","handleSearchActive","onSubmit","preventDefault","onKeyUp","type","placeholder","background","cursor","border","color","NavDropdown","handleNavClick","nav","fontSize","Item","href","Link","to","borderBottom","width","marginLeft","margin","onChange","isValid","test","match","redirect","padding","slice","map","key","borderRadius","boxShadow","fontWeight","handleDeletedAnggota","height","handleShowMoreMember","newItemsMember","LoadingAlert","RemoveAlert","handleCancelDelete","handleConfirmDelete","ConfirmAlert","handlePopup","document","getElementById"],"sourceRoot":""}