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.146.255.135
{"version":3,"sources":["pages/after-exam/uploadMarksCard/index.js","../node_modules/semantic-ui-react/dist/es/elements/Divider/Divider.js"],"names":["connect","state","user","showError","props","handleSubmit","_ref3","Object","_Users_prashanth_univadmin_react_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__","_Users_prashanth_univadmin_react_node_modules_babel_preset_react_app_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default","a","mark","_callee","e","wrap","_context","prev","next","window","location","reload","stop","_x","apply","this","arguments","wheight","innerHeight","react__WEBPACK_IMPORTED_MODULE_2___default","createElement","semantic_ui_react__WEBPACK_IMPORTED_MODULE_5__","semantic_ui_react__WEBPACK_IMPORTED_MODULE_3__","fluid","Content","Header","style","display","className","react_router_dom__WEBPACK_IMPORTED_MODULE_11__","to","semantic_ui_react__WEBPACK_IMPORTED_MODULE_4__","basic","color","content","icon","semantic_ui_react__WEBPACK_IMPORTED_MODULE_6__","Description","height","concat","overflowY","react_dropzone_uploader__WEBPACK_IMPORTED_MODULE_9___default","getUploadParams","_ref","file","meta","url","API","onChangeStatus","_ref2","status","remove","console","log","onSubmit","validate","_ref4","split_name","name","split","fexamtype","fcuruniv","length","accept","maxFiles","styles","dropzone","minHeight","maxHeight","_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__","__webpack_require__","_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default","n","classnames__WEBPACK_IMPORTED_MODULE_1__","classnames__WEBPACK_IMPORTED_MODULE_1___default","react__WEBPACK_IMPORTED_MODULE_2__","_lib__WEBPACK_IMPORTED_MODULE_3__","_lib__WEBPACK_IMPORTED_MODULE_4__","_lib__WEBPACK_IMPORTED_MODULE_5__","_lib__WEBPACK_IMPORTED_MODULE_6__","Divider","children","clearing","fitted","hidden","horizontal","inverted","section","vertical","classes","rest","ElementType","isNil","handledProps","propTypes","__webpack_exports__"],"mappings":"uPAkFeA,sBALS,SAAAC,GACtB,MAAO,CACLC,KAAMD,EAAMC,OAKd,CACEC,eAHWH,CAzES,SAAAI,GACtB,IAQMC,EAAY,eAAAC,EAAAC,OAAAC,EAAA,EAAAD,CAAAE,EAAAC,EAAAC,KAAG,SAAAC,EAAMC,GAAN,OAAAJ,EAAAC,EAAAI,KAAA,SAAAC,GAAA,cAAAA,EAAAC,KAAAD,EAAAE,MAAA,OACnBC,OAAOC,SAASC,SADG,wBAAAL,EAAAM,SAAAT,MAAH,gBAAAU,GAAA,OAAAhB,EAAAiB,MAAAC,KAAAC,YAAA,GAiCdC,EAAgC,GAArBR,OAAOS,YAAoB,IAC1C,OACEC,EAAAlB,EAAAmB,cAACC,EAAA,EAAD,KACEF,EAAAlB,EAAAmB,cAACE,EAAA,EAAD,CAAMC,OAAK,GACTJ,EAAAlB,EAAAmB,cAACE,EAAA,EAAKE,QAAN,KAdFL,EAAAlB,EAAAmB,cAACE,EAAA,EAAKG,OAAN,CAAaC,MAAO,CAAEC,QAAS,SAC7BR,EAAAlB,EAAAmB,cAAA,gCACAD,EAAAlB,EAAAmB,cAAA,OAAKQ,UAAU,WACbT,EAAAlB,EAAAmB,cAACS,EAAA,EAAD,CAAMC,GAAG,cACPX,EAAAlB,EAAAmB,cAACW,EAAA,EAAD,CAAQC,OAAK,EAACC,MAAM,MAAMC,QAAQ,OAAOC,KAAK,YAYhDhB,EAAAlB,EAAAmB,cAACgB,EAAA,EAAD,MACAjB,EAAAlB,EAAAmB,cAACE,EAAA,EAAKe,YAAN,CACEX,MAAO,CAAEY,OAAM,GAAAC,OAAKtB,EAAL,MAAkBuB,UAAW,SAE5CrB,EAAAlB,EAAAmB,cAACqB,EAAAxC,EAAD,CACEyC,gBApDY,SAAAC,GACtB,OAD0CA,EAAjBC,KAAiBD,EAAXE,KACxB,CAAEC,IAAKC,IAAM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BvF,OAAA8E,EAAA,EAAA9E,CAAUwF,EAAA,YAAwBxF,OAAA8E,EAAA,EAAA9E,CAAUyF,EAAA,WAAsBzF,OAAA8E,EAAA,EAAA9E,CAAU0F,EAAA,sBAAA5D,GACzO8D,EAAa5F,OAAA+E,EAAA,EAAA/E,CAAiBkF,EAAArF,GAC9BgG,EAAoB7F,OAAAgF,EAAA,EAAAhF,CAAckF,EAAArF,GAClC,OAASwB,EAAAlB,EAAKmB,cAAAuE,EAA4BpB,IAAQ,GAAGmB,EAAA,CACrD9D,UAAA6D,IACMV,EAAA,EAAaa,MAAAX,GAAA/C,EAAA+C,GAGnBD,EAAAa,aAAA,kHACAb,EAAAc,UAiCC,GACcC,EAAA","file":"static/js/153.42f2bbc9.chunk.js","sourcesContent":["import React from \"react\";\nimport { Card, Divider, Button, Form } from \"semantic-ui-react\";\nimport { connect } from \"react-redux\";\nimport { showError } from \"../../../actions\";\nimport Dropzone from \"react-dropzone-uploader\";\nimport \"react-dropzone-uploader/dist/styles.css\";\nimport { Link } from \"react-router-dom\";\nimport { SPAPI, ReportAPI, API } from \"../../../apis/consts\";\n\nconst uploadMarksCard = props => {\n const getUploadParams = ({ file, meta }) => {\n return { url: API + \"/upload_mc.php\" };\n };\n\n const handleChangeStatus = ({ meta, remove }, status) => {\n console.log(status, meta);\n };\n\n const handleSubmit = async e => {\n window.location.reload();\n };\n\n const validatefile = ({ file, meta }) => {\n const name = meta.name;\n const split_name = name.split(\"_\");\n const fexamtype = split_name[5].split(\".\");\n if (\n split_name[0] !== \"MC\" ||\n split_name[1] !== props.user.fcuruniv ||\n split_name[2].length != 8 ||\n split_name[3].length != 1 ||\n split_name[4].length != 4 ||\n fexamtype[0].length != 1\n ) {\n return \"INVALID FILE NAMING FORMAT (eg:MC_041_A18XXXX1_A_2018_2.pdf)\";\n }\n return false;\n };\n\n const renderHeader = () => {\n return (\n <Card.Header style={{ display: \"flex\" }}>\n <h4>Upload Marks Cards</h4>\n <div className=\"ml-auto\">\n <Link to=\"/dashboard\">\n <Button basic color=\"red\" content=\"Exit\" icon=\"home\" />\n </Link>\n </div>\n </Card.Header>\n );\n };\n var wheight = (window.innerHeight * 70) / 100;\n return (\n <Form>\n <Card fluid>\n <Card.Content>\n {renderHeader()}\n <Divider />\n <Card.Description\n style={{ height: `${wheight}px`, overflowY: \"auto\" }}\n >\n <Dropzone\n getUploadParams={getUploadParams}\n onChangeStatus={handleChangeStatus}\n onSubmit={handleSubmit}\n validate={validatefile}\n accept=\"application/pdf\"\n maxFiles={50}\n styles={{ dropzone: { minHeight: 200, maxHeight: wheight - 10 } }}\n />\n </Card.Description>\n </Card.Content>\n </Card>\n </Form>\n );\n};\n\nconst mapStateToProps = state => {\n return {\n user: state.user\n };\n};\nexport default connect(\n mapStateToProps,\n {\n showError\n }\n)(uploadMarksCard);\n","import _extends from \"@babel/runtime/helpers/extends\";\nimport cx from 'classnames';\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport { childrenUtils, customPropTypes, getElementType, getUnhandledProps, useKeyOnly } from '../../lib';\n/**\n * A divider visually segments content into groups.\n */\n\nfunction Divider(props) {\n var children = props.children,\n className = props.className,\n clearing = props.clearing,\n content = props.content,\n fitted = props.fitted,\n hidden = props.hidden,\n horizontal = props.horizontal,\n inverted = props.inverted,\n section = props.section,\n vertical = props.vertical;\n var classes = cx('ui', useKeyOnly(clearing, 'clearing'), useKeyOnly(fitted, 'fitted'), useKeyOnly(hidden, 'hidden'), useKeyOnly(horizontal, 'horizontal'), useKeyOnly(inverted, 'inverted'), useKeyOnly(section, 'section'), useKeyOnly(vertical, 'vertical'), 'divider', className);\n var rest = getUnhandledProps(Divider, props);\n var ElementType = getElementType(Divider, props);\n return React.createElement(ElementType, _extends({}, rest, {\n className: classes\n }), childrenUtils.isNil(children) ? content : children);\n}\n\nDivider.handledProps = [\"as\", \"children\", \"className\", \"clearing\", \"content\", \"fitted\", \"hidden\", \"horizontal\", \"inverted\", \"section\", \"vertical\"];\nDivider.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /** An element type to render as (string or function). */\n as: customPropTypes.as,\n\n /** Primary content. */\n children: PropTypes.node,\n\n /** Additional classes. */\n className: PropTypes.string,\n\n /** Divider can clear the content above it. */\n clearing: PropTypes.bool,\n\n /** Shorthand for primary content. */\n content: customPropTypes.contentShorthand,\n\n /** Divider can be fitted without any space above or below it. */\n fitted: PropTypes.bool,\n\n /** Divider can divide content without creating a dividing line. */\n hidden: PropTypes.bool,\n\n /** Divider can segment content horizontally. */\n horizontal: PropTypes.bool,\n\n /** Divider can have its colours inverted. */\n inverted: PropTypes.bool,\n\n /** Divider can provide greater margins to divide sections of content. */\n section: PropTypes.bool,\n\n /** Divider can segment content vertically. */\n vertical: PropTypes.bool\n} : {};\nexport default Divider;"],"sourceRoot":""}
|