0xV3NOMx
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.118.0.93


Current Path : /var/www/qptran/static/js/
Upload File :
Current File : /var/www/qptran/static/js/15.194bd9c2.chunk.js.map

{"version":3,"sources":["app/api/loader/index.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/iterableToArray.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","app/reports/logreport.js"],"names":["Loader","className","style","position","margin","top","right","bottom","left","width","height","radisu","color","ariaLabel","wrapperStyle","wrapperClass","visible","_toConsumableArray","arr","Array","isArray","arrayLikeToArray","iter","Symbol","iterator","Object","from","unsupportedIterableToArray","TypeError","LogReports","useState","moment","format","date","setDate","session","setSession","sessionOption","setSessionOption","deggrp","setDeggrp","deggrpOption","setDeggrpOption","rtype","setRtype","rtypeOption","setRtypeOption","loading","setLoading","useEffect","value","text","API","get","localStorage","getItem","getSesDeg","data","error_code","ses","map","el","i","key","fsession","fdescpn","all","deg","fdeggrp","degg","console","log","getDeggrpSession","display","stayle","to","type","class","Group","Field","Input","id","mask","placeholder","name","onChange","e","selection","options","search","onClick","window","open","ReportAPI","Swal","fire"],"mappings":"+GAAA,oCAkCeA,IA9BA,WACb,OACE,yBAAKC,UAAU,QACb,yBACEC,MAAO,CACLC,SAAU,WACVC,OAAQ,OACRC,IAAK,EACLC,MAAO,EACPC,OAAQ,EACRC,KAAM,EACNC,MAAO,QACPC,OAAQ,UAGV,kBAAC,IAAD,CACEA,OAAO,KACPD,MAAM,KACNE,OAAQ,EACRC,MAAM,iBACNC,UAAU,eACVC,aAAc,GACdC,aAAa,GACbC,SAAS,Q,2DCvBJ,SAASC,EAAmBC,GACzC,OCJa,SA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kBAAC,IAAK4B,MAAN,KACE,kBAAC,IAAKC,MAAN,CAAYtE,MAAO,GACjB,0CACA,kBAAC,IAAD,CACEwE,GAAG,WACHE,YAAY,UACZC,KAAK,UACLlC,MAAOf,EACPoD,WAAS,EACTC,QAASnD,EACToD,QAAM,EACNJ,SAAU,SAACC,EAAG7B,GACZrB,EAAWqB,EAAKP,YAKxB,kBAAC,IAAK4B,MAAN,KACE,kBAAC,IAAKC,MAAN,CAAYtE,MAAO,GACjB,uCACA,kBAAC,IAAD,CACEwE,GAAG,QACHE,YAAY,cACZC,KAAK,cACLlC,MAAOP,EACP4C,WAAS,EACTC,QAAS3C,EACT4C,QAAM,EACNJ,SAAU,SAACC,EAAG7B,GACZb,EAASa,EAAKP,YAMtB,kBAAC,IAAK4B,MAAN,KACE,kBAAC,IAAKC,MAAN,KACE,4BACE9E,UAAU,sBACVyF,QAAS,WA1HjB,IAARzD,EAGkB,IAAXE,EAGU,IAAVI,EAGS,IAATI,EAITgD,OAAOC,KACLC,IAAS,iDACmCvC,aAAaC,QACrD,aAEF,SACAtB,EACA,YACAE,EACA,WACAI,EACA,UACAI,GAfJmD,IAAKC,KAAK,sBAHVD,IAAKC,KAAK,uBAHVD,IAAKC,KAAK,kBAHVD,IAAKC,KAAK,gBAuHM","file":"static/js/15.194bd9c2.chunk.js","sourcesContent":["import React from \"react\";\nimport { Puff } from \"react-loader-spinner\";\nimport \"react-loader-spinner/dist/loader/css/react-spinner-loader.css\";\n\nconst Loader = () => {\n  return (\n    <div className=\"page\">\n      <div\n        style={{\n          position: \"absolute\",\n          margin: \"auto\",\n          top: 0,\n          right: 0,\n          bottom: 0,\n          left: 0,\n          width: \"200px\",\n          height: \"200px\",\n        }}\n      >\n        <Puff\n          height=\"80\"\n          width=\"80\"\n          radisu={1}\n          color=\"rgb(0 123 255)\"\n          ariaLabel=\"puff-loading\"\n          wrapperStyle={{}}\n          wrapperClass=\"\"\n          visible={true}\n        />\n      </div>\n    </div>\n  );\n};\n\nexport default Loader;\n","import arrayWithoutHoles from \"./arrayWithoutHoles\";\nimport iterableToArray from \"./iterableToArray\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray\";\nimport nonIterableSpread from \"./nonIterableSpread\";\nexport default function _toConsumableArray(arr) {\n  return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import arrayLikeToArray from \"./arrayLikeToArray\";\nexport default function _arrayWithoutHoles(arr) {\n  if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default function _iterableToArray(iter) {\n  if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}","export default function _nonIterableSpread() {\n  throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import React from \"react\";\nimport { useState, useEffect } from \"react\";\nimport Swal from \"sweetalert2\";\nimport moment from \"moment\";\nimport API from \"../api/apilink\";\nimport { ReportAPI } from \"../api/consts\";\nimport { Link } from \"react-router-dom\";\nimport { Form, Divider, Dropdown } from \"semantic-ui-react\";\nimport Loader from \"../api/loader\";\n\nconst LogReports = () => {\n  const [date, setDate] = useState(moment().format(\"25/03/2021\"));\n  //   const [date, setDate] = useState(moment().format(\"DD/MM/YYYY\"));\n  const [session, setSession] = useState(\"\");\n  const [sessionOption, setSessionOption] = useState(\"\");\n  const [deggrp, setDeggrp] = useState(\"all\");\n  const [deggrpOption, setDeggrpOption] = useState(\"\");\n  const [rtype, setRtype] = useState(\"\");\n  const [rtypeOption, setRtypeOption] = useState(\"\");\n  const [loading, setLoading] = useState(false);\n\n  useEffect(() => {\n    const loadReportValues = [\n      { value: \"center\", text: \"center\" },\n      { value: \"log\", text: \"Log Reports\" },\n      { value: \"qp\", text: \"Qp Reports\" },\n      { value: \"copy\", text: \"Password Copy Reports\" },\n    ];\n    setRtypeOption(loadReportValues);\n    const getDeggrpSession = async function () {\n      setLoading(true);\n      try {\n        const getSesDeg = await API.get(\n          `app.php?a=qp_dashboard&univcode=${localStorage.getItem(\n            \"univcode\"\n          )}` +\n            \"&date=\" +\n            date\n        );\n        if (getSesDeg.data.error_code == 0) {\n          const ses = getSesDeg.data.data.session.map((el, i) => {\n            return {\n              key: i,\n              value: `${el.fsession}`,\n              text: `${el.fsession} - ${el.fdescpn}`,\n            };\n          });\n          setSessionOption(ses);\n          const all = [{ key: \"all\", value: \"all\", text: \"All\" }];\n          const deg = getSesDeg.data.data.deggrp.map((el, i) => {\n            return {\n              key: i,\n              value: `${el.fdeggrp}`,\n              text: `${el.fdeggrp}`,\n            };\n          });\n          const degg = [...all, ...deg];\n          setDeggrpOption(degg);\n        }\n      } catch (e) {\n        console.log(e);\n      }\n      setLoading(false);\n    };\n    getDeggrpSession();\n  }, []);\n\n  const getReport = () => {\n    if (date == \"\") {\n      Swal.fire(\"Enter Date\");\n      return;\n    } else if (session == \"\") {\n      Swal.fire(\"Select Session\");\n      return;\n    } else if (deggrp == \"\") {\n      Swal.fire(\"Select Degree Group\");\n      return;\n    } else if (rtype == \"\") {\n      Swal.fire(\"Select Report Type\");\n      return;\n    } else {\n      window.open(\n        ReportAPI +\n          `get_center_log_qp_pwd_reports&univcode=${localStorage.getItem(\n            \"univcode\"\n          )}` +\n          \"&date=\" +\n          date +\n          \"&session=\" +\n          session +\n          \"&deggrp=\" +\n          deggrp +\n          \"&rtype=\" +\n          rtype\n      );\n    }\n  };\n\n  return (\n    <div className=\"page\">\n      {loading ? (\n        <Loader />\n      ) : (\n        <div className=\"row\">\n          <div className=\"col-md-12 grid-margin stretch-card\">\n            <div className=\"card\">\n              <div className=\"card-body\" style={{ display: \"flex\" }}>\n                <h4>Log Reports</h4>\n                <div className=\"ml-auto\" stayle={{ display: \"flex\" }}>\n                  <Link to=\"/dashboard\">\n                    <button type=\"button\" className=\"btn btn-danger btn-fw\">\n                      <span class=\"mdi mdi-exit-to-app\"></span>\n                      Exit\n                    </button>\n                  </Link>\n                </div>\n              </div>\n              <Divider />\n              <div className=\"col-md-12\">\n                <Form>\n                  <Form.Group>\n                    <Form.Field width={8}>\n                      <label>Date</label>\n                      <Form.Input\n                        id=\"fid\"\n                        type=\"text\"\n                        value={date}\n                        mask=\"ed/nm/zyyy\"\n                        placeholder=\"dd/mm/yyyy\"\n                        name=\"date\"\n                        onChange={(e, data) => setDate(data.value)}\n                      />\n                    </Form.Field>\n                  </Form.Group>\n                  <Form.Group>\n                    <Form.Field width={8}>\n                      <label>Degree Group</label>\n                      <Dropdown\n                        id=\"fdeggrp\"\n                        placeholder=\"Degree Group\"\n                        name=\"Degree_Group\"\n                        value={deggrp}\n                        selection\n                        options={deggrpOption}\n                        search\n                        onChange={(e, data) => {\n                          setDeggrp(data.value);\n                        }}\n                      />\n                    </Form.Field>\n                  </Form.Group>\n                  <Form.Group>\n                    <Form.Field width={8}>\n                      <label>Session</label>\n                      <Dropdown\n                        id=\"fsession\"\n                        placeholder=\"Session\"\n                        name=\"session\"\n                        value={session}\n                        selection\n                        options={sessionOption}\n                        search\n                        onChange={(e, data) => {\n                          setSession(data.value);\n                        }}\n                      />\n                    </Form.Field>\n                  </Form.Group>\n                  <Form.Group>\n                    <Form.Field width={8}>\n                      <label>Type</label>\n                      <Dropdown\n                        id=\"rtype\"\n                        placeholder=\"Report Type\"\n                        name=\"Report_type\"\n                        value={rtype}\n                        selection\n                        options={rtypeOption}\n                        search\n                        onChange={(e, data) => {\n                          setRtype(data.value);\n                        }}\n                      />\n                    </Form.Field>\n                  </Form.Group>\n\n                  <Form.Group>\n                    <Form.Field>\n                      <button\n                        className=\"btn btn-info btn-fw\"\n                        onClick={() => getReport()}\n                      >\n                        Report\n                      </button>\n                    </Form.Field>\n                  </Form.Group>\n                </Form>\n              </div>\n            </div>\n          </div>\n        </div>\n      )}\n    </div>\n  );\n};\nexport default LogReports;\n"],"sourceRoot":""}