Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Your IP : 3.144.23.138
{"version":3,"file":"static/js/488.5589d3a0.chunk.js","mappings":"iNAGO,MAAMA,EAAwBC,IAAS,CAC5CC,eAAgBC,IAAA,IAAC,gBACfC,EAAe,aACfC,EAAY,QACZC,EAAO,aACPC,EAAY,MACZC,GACDL,EAAA,OACCM,EAAAA,EAAAA,MAAA,OACEC,MAAO,CACLC,QAAS,GAEXC,UAAYC,GAAMA,EAAEC,kBAAkBC,SAAA,EAEtCC,EAAAA,EAAAA,KAACC,EAAAA,EAAK,CACJC,WAAS,EACTC,YAAW,UAAAC,OAAYnB,GACvBoB,MAAOhB,EACPiB,SAAWT,GACTT,EAAgBS,EAAEU,OAAOF,MAAQ,CAACR,EAAEU,OAAOF,OAAS,IAEtDG,aAAcA,KACZlB,GAAS,EAEXI,MAAO,CACLe,aAAc,EACdC,QAAS,YAGbjB,EAAAA,EAAAA,MAACkB,EAAAA,EAAK,CAAAZ,SAAA,EACJC,EAAAA,EAAAA,KAACY,EAAAA,GAAM,CACLC,KAAK,UACLC,QAASA,IAAMxB,IACfyB,MAAMf,EAAAA,EAAAA,KAACgB,EAAAA,EAAc,IACrBC,KAAK,QACLvB,MAAO,CACLwB,MAAO,IACPnB,SACH,YAGDC,EAAAA,EAAAA,KAACY,EAAAA,GAAM,CACLE,QAASA,KACPvB,IACAD,GAAS,EAEX2B,KAAK,QACLvB,MAAO,CACLwB,MAAO,IACPnB,SACH,eAIC,EAERoB,WAAaC,IACXpB,EAAAA,EAAAA,KAACgB,EAAAA,EAAc,CACbtB,MAAO,CACL2B,MAAOD,EAAW,UAAY,UAIpCE,SAAUA,CAACjB,EAAOkB,IAChBA,EAAOtC,GAAWuC,WAAWC,cAAcC,SAASrB,EAAMoB,iBAGjDE,EAAeA,CAACC,EAAOC,IAClCA,EAAOxB,MAAMmB,WAAWC,cAAcK,QAAQF,EAAMH,gBA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iI9CmG,CAAc/I,aAMvCG,EAAAA,EAAAA,KAAC6I,EAAAA,EAAK,CACJC,OAAQ,CAAEC,EAAG,KACbC,UAAQ,EACRvC,QAASA,EACT/D,QAASoC,EAAMpC,QACfuG,WAAY/B,EACZjG,KAAK,cAGTjB,EAAAA,EAAAA,KAACkJ,EAAW,CACVxF,KAAMuB,EACNtB,GAAIA,KACF2C,IACApB,GAAa,EAAM,EAErBtB,OAAQA,IAAMsB,GAAa,OAEzB,G","sources":["Components/datatable.js","Actions/masters/degree/degree.js","Components/ReportModal.js","Pages/Masters/Degree/Degree.js"],"sourcesContent":["import { Input, Button, Space } from \"antd\";\nimport { SearchOutlined } from \"@ant-design/icons\";\n\nexport const getColumnSearchProps = (dataIndex) => ({\n filterDropdown: ({\n setSelectedKeys,\n selectedKeys,\n confirm,\n clearFilters,\n close,\n }) => (\n <div\n style={{\n padding: 8,\n }}\n onKeyDown={(e) => e.stopPropagation()}\n >\n <Input\n autoFocus\n placeholder={`Search ${dataIndex}`}\n value={selectedKeys}\n onChange={(e) =>\n setSelectedKeys(e.target.value ? [e.target.value] : [])\n }\n onPressEnter={() => {\n confirm();\n }}\n style={{\n marginBottom: 8,\n display: \"block\",\n }}\n />\n <Space>\n <Button\n type=\"primary\"\n onClick={() => confirm()}\n icon={<SearchOutlined />}\n size=\"small\"\n style={{\n width: 90,\n }}\n >\n Search\n </Button>\n <Button\n onClick={() => {\n clearFilters();\n confirm();\n }}\n size=\"small\"\n style={{\n width: 90,\n }}\n >\n Reset\n </Button>\n </Space>\n </div>\n ),\n filterIcon: (filtered) => (\n <SearchOutlined\n style={{\n color: filtered ? \"#1677ff\" : \"#fff\",\n }}\n />\n ),\n onFilter: (value, record) =>\n record[dataIndex].toString().toLowerCase().includes(value.toLowerCase()),\n});\n\nexport const filterOption = (input, option) =>\n option.value.toString().toLowerCase().indexOf(input.toLowerCase()) >= 0 ||\n option.label.toString().toLowerCase().indexOf(input.toLowerCase()) >= 0;\n\nexport const sortWithAlphabets = (a, b, index) =>\n a[index].localeCompare(b[index]);\n","import axios from \"axios\";\nimport { base_url } from \"../../../Components/consts/api\";\nimport { Alert } from \"../../../Components/Alert\";\nimport { json } from \"react-router-dom/dist\";\n\nexport const getDegreedet = async (type, dispatch, funivcode, fcollcode) => {\n dispatch(loading(true));\n await axios({\n method: \"GET\",\n url:\n base_url +\n \"cgetDegreedet\" +\n \"&collcode=\" +\n fcollcode +\n \"&type=\" +\n type +\n \"&univcode=\" +\n funivcode +\n \"°ree_range=\" +\n \"\",\n headers: { \"Content-Type\": \"application/json\" },\n }).then((res) => {\n console.log(res, \"payload\");\n\n if (res.data.error_code == 0) {\n dispatch({\n type: \"DEGREE\",\n payload: res.data.data,\n });\n dispatch(loading(false));\n } else {\n dispatch({\n type: \"CLEAR_DEGREE\",\n payload: [],\n });\n dispatch(loading(false));\n Alert(res.data.data.msg);\n return;\n }\n });\n};\n\nconst loading = (value) => {\n return {\n type: \"LOADING\",\n load: value,\n };\n};\n\nexport const saveDegreeDet = async (dispatch, formData) => {\n dispatch(loading(true));\n await axios.post(base_url + \"csaveDegreedet\", formData).then((res) => {\n console.log(res);\n if (res.data.error_code === 0) {\n Alert(res.data.data.msg);\n dispatch(loading(false));\n } else {\n Alert(res.data.data.msg);\n\n return;\n }\n });\n};\n\nexport const reportDegreeDet = async (type, dispatch, funivcode, fcollcode) => {\n window.open(\n base_url +\n \"degreeListReportpdf\" +\n \"&univcode=\" +\n funivcode +\n \"&collcode=\" +\n fcollcode +\n \"&type=\" +\n type\n );\n};\n","import React, { useState } from \"react\";\nimport { Button, Modal } from \"antd\";\n\nconst ReportModal = ({ open, Ok, cancel }) => {\n const [modal2Open, setModal2Open] = useState(false);\n return (\n <>\n <Modal\n title=\"Vertically centered modal dialog\"\n centered\n open={open}\n onOk={Ok}\n onCancel={cancel}\n ></Modal>\n </>\n );\n};\n\nexport default ReportModal;\n","import React, { useState, useEffect } from \"react\";\nimport {\n Card,\n Space,\n Button,\n Checkbox,\n Select,\n Table,\n Col,\n Row,\n Divider,\n} from \"antd\";\nimport {\n getDegreedet,\n saveDegreeDet,\n reportDegreeDet,\n} from \"../../../Actions/masters/degree/degree\";\nimport { useDispatch } from \"react-redux\";\nimport { connect } from \"react-redux\";\nimport {\n getColumnSearchProps,\n sortWithAlphabets,\n filterOption,\n} from \"../../../Components/datatable\";\nimport ReportModal from \"../../../Components/ReportModal\";\n\nconst typeOptions = [\n { value: \"selectedonly\", label: \"Selected Only\" },\n { value: \"all\", label: \"All\" },\n];\n\nconst Degree = (props) => {\n const [type, setType] = useState(\"selectedonly\");\n const [data, setData] = useState([]);\n const [openModal, setOpenModal] = useState(false);\n const dispatch = useDispatch();\n\n useEffect(() => {\n setData(props.degreeData);\n getDegreedet(type, dispatch, props.user.funivcode, props.user.fcollcode);\n }, []);\n\n useEffect(() => {\n let tableArr =\n props.degreeData.length > 0\n ? props.degreeData.map((el, i) => {\n el.index = i;\n return el;\n })\n : [];\n setData([...tableArr]);\n }, [props.degreeData]);\n\n const changeHandler = async (e) => {\n setType(e);\n await getDegreedet(e, dispatch, props.user.funivcode, props.user.fcollcode);\n };\n\n const checkAllHandler = (checked) => {\n const dataTable = data.map((el, i) => {\n if (checked) {\n el.CHECKED = \"CHECKED\";\n } else {\n el.CHECKED = \"\";\n }\n el[\"ACTION\"] = \"T\";\n return el;\n });\n setData(dataTable);\n };\n\n const checkHandler = (e, index) => {\n let newArr = data;\n newArr[index][\"CHECKED\"] = e ? \"CHECKED\" : \"\";\n newArr[index][\"ACTION\"] = \"T\";\n setData([...newArr]);\n };\n\n const saveDegreeDetails = async () => {\n let formData = new FormData();\n let newTableData = data.filter((el, i) => {\n return el.ACTION === \"T\";\n });\n\n formData.append(\"data\", JSON.stringify(newTableData));\n formData.append(\"univcode\", props.user.funivcode);\n formData.append(\"collcode\", props.user.fcollcode);\n formData.append(\"user\", props.user.fuser);\n\n await saveDegreeDet(dispatch, formData);\n };\n\n const saveDegreeReport = async () => {\n await reportDegreeDet(\n type,\n dispatch,\n props.user.funivcode,\n props.user.fcollcode\n );\n };\n\n const columns = [\n {\n title: \"Sl. No\",\n dataIndex: \"slno\",\n align: \"center\",\n width: \"10%\",\n },\n {\n title: \"Degree\",\n dataIndex: \"degree\",\n ...getColumnSearchProps(\"degree\"),\n sorter: (a, b) => sortWithAlphabets(a, b, \"degree\"),\n sortDirections: [\"descend\", \"ascend\"],\n align: \"center\",\n width: \"20%\",\n },\n {\n title: \"Description\",\n dataIndex: \"description\",\n ...getColumnSearchProps(\"description\"),\n sorter: (a, b) => sortWithAlphabets(a, b, \"description\"),\n sortDirections: [\"descend\", \"ascend\"],\n width: \"60%\",\n },\n {\n title: <Checkbox onChange={(e) => checkAllHandler(e.target.checked)} />,\n dataIndex: \"select\",\n align: \"center\",\n width: \"10%\",\n },\n ];\n\n const tabledata = data.map((el, i) => ({\n key: i,\n slno: i + 1,\n degree: el.FDEGREE,\n description: el.FDESCPN,\n select: (\n <Checkbox\n checked={el.CHECKED === \"CHECKED\" ? true : false}\n onChange={(e) => checkHandler(e.target.checked, el.index)}\n />\n ),\n }));\n\n return (\n <div className=\"container-fluid\">\n <Card\n hoverable\n title=\"Degree\"\n style={{ width: \"100%\" }}\n extra={\n <Space direction=\"horizontal\">\n <Button className=\"save\" onClick={() => saveDegreeDetails()}>\n Save\n </Button>\n <Button\n className=\"report\"\n onClick={() => {\n // saveDegreeReport();\n setOpenModal(true);\n }}\n >\n Report\n </Button>\n <Button className=\"clear\">Clear</Button>\n <Button className=\"exit\">Exit</Button>\n </Space>\n }\n >\n <div style={{ marginBottom: \"20px\" }}>\n <Row gutter={16}>\n <Col xs={24} sm={24} md={12} lg={8} xl={8}>\n <b>\n <label>Select Type</label>\n </b>\n <Select\n showSearch\n placeholder=\"Select\"\n style={{ width: \"100%\" }}\n options={typeOptions}\n filterOption={filterOption}\n value={type}\n onChange={(e) => changeHandler(e)}\n />\n </Col>\n </Row>\n </div>\n\n <Table\n scroll={{ y: 400 }}\n bordered\n columns={columns}\n loading={props.loading}\n dataSource={tabledata}\n size=\"small\"\n />\n </Card>\n <ReportModal\n open={openModal}\n Ok={() => {\n saveDegreeReport();\n setOpenModal(false);\n }}\n cancel={() => setOpenModal(false)}\n />\n </div>\n );\n};\n\nconst mapStateToProps = function (state) {\n console.log(state, \"connect state\");\n return {\n user: state.AuthReducer.userData,\n degreeData: state.degreeReducer.degreeData,\n loading: state.degreeReducer.loading,\n };\n};\n\nexport default connect(mapStateToProps)(Degree);\n"],"names":["getColumnSearchProps","dataIndex","filterDropdown","_ref","setSelectedKeys","selectedKeys","confirm","clearFilters","close","_jsxs","style","padding","onKeyDown","e","stopPropagation","children","_jsx","Input","autoFocus","placeholder","concat","value","onChange","target","onPressEnter","marginBottom","display","Space","Button","type","onClick","icon","SearchOutlined","size","width","filterIcon","filtered","color","onFilter","record","toString","toLowerCase","includes","filterOption","input","option","indexOf","label","sortWithAlphabets","a","b","index","localeCompare","getDegreedet","async","dispatch","funivcode","fcollcode","loading","axios","method","url","base_url","headers","then","res","console","log","data","error_code","payload","Alert","msg","load","open","Ok","cancel","modal2Open","setModal2Open","useState","_Fragment","Modal","title","centered","onOk","onCancel","typeOptions","connect","state","user","AuthReducer","userData","degreeData","degreeReducer","props","setType","setData","openModal","setOpenModal","useDispatch","useEffect","tableArr","length","map","el","i","saveDegreeDetails","formData","FormData","newTableData","filter","ACTION","append","JSON","stringify","fuser","post","saveDegreeDet","saveDegreeReport","window","reportDegreeDet","columns","align","sorter","sortDirections","Checkbox","checked","dataTable","CHECKED","checkAllHandler","tabledata","key","slno","degree","FDEGREE","description","FDESCPN","select","checkHandler","newArr","className","Card","hoverable","extra","direction","Row","gutter","Col","xs","sm","md","lg","xl","Select","showSearch","options","changeHandler","Table","scroll","y","bordered","dataSource","ReportModal"],"sourceRoot":""}
|