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 : 18.119.28.173
{"version":3,"file":"static/js/488.ee7b1964.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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A8HxBsG,CAAcjJ,aAMvCG,EAAAA,EAAAA,KAAC+I,EAAAA,EAAK,CACJC,OAAQ,CAAEC,EAAG,KACbC,UAAQ,EACRvC,QAASA,EACTlE,QAASqC,EAAMrC,QACf0G,WAAY/B,EACZnG,KAAK,cAGTjB,EAAAA,EAAAA,KAACoJ,EAAW,CACV1F,KAAMuB,EACNtB,GAAIA,KACF4C,IACArB,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, fcollcode) => {\n dispatch(loading(true));\n try {\n await axios({\n method: \"GET\",\n url:\n base_url +\n \"cgetDegreedet\" +\n \"&collcode=\" +\n fcollcode +\n \"&type=\" +\n type +\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 } catch (Error) {\n dispatch(loading(false));\n Alert(Error);\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 try {\n await axios.post(base_url + \"csaveDegreedet\", formData).then((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 dispatch(loading(false));\n return;\n }\n });\n } catch (err) {\n dispatch(loading(false));\n Alert(err);\n }\n};\n\nexport const reportDegreeDet = async (type, fcollcode) => {\n window.open(\n base_url +\n \"degreeListReportpdf\" +\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 { Card, Space, Button, Checkbox, Select, Table, Col, Row } 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.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.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(\"collcode\", props.user.fcollcode);\n formData.append(\"user\", props.user.fuser);\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: \"30%\",\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: \"50%\",\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 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 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","fcollcode","loading","axios","method","url","base_url","headers","then","res","console","log","data","error_code","payload","Alert","msg","Error","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","err","saveDegreeDet","saveDegreeReport","window","reportDegreeDet","funivcode","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":""}
|