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 : 52.14.176.111


Current Path : /proc/thread-self/root/var/www/qpms/assets/
Upload File :
Current File : //proc/thread-self/root/var/www/qpms/assets/GenerateBill-B4eiO92A.js

import{r as l,I as _,a as G,v as M,E as h,x as V,t,D as Q,L as H,B as S,G as p,F as w,O as N}from"./index-C8M3lyNu.js";import{g as Y,e as z}from"./UploadQpPattern-kidoxO1-.js";import{a as E,r as $,s as U}from"./sem-xL-Ac5nH.js";import{S as q}from"./index-Bhb34QNg.js";import{R as B,C as o}from"./row-B_crsxDb.js";import"./responsiveObserver-iG098kB7.js";var J={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M859.9 780H164.1c-4.5 0-8.1 3.6-8.1 8v60c0 4.4 3.6 8 8.1 8h695.8c4.5 0 8.1-3.6 8.1-8v-60c0-4.4-3.6-8-8.1-8zM505.7 669a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V176c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8z"}}]},name:"vertical-align-bottom",theme:"outlined"},K=function(s,n){return l.createElement(_,G({},s,{ref:n,icon:J}))},W=l.forwardRef(K);const X=()=>(console.log("hiijhvjhvchkc"),async(r,s)=>{console.log("hello");try{const n=s();let g=localStorage.getItem("dbname");r({type:"SET_LOADER"});const c=await M.get("/app.php?a=getTeahcerData&db="+g);if(r({type:"UNSET_LOADER"}),c.data.error_code===0){const x=c.data.data.map((m,d)=>({...m,key:d,fslno:d+1}));r({type:"GENERATE_BILL",payload:x})}else r({type:"CLEAR_GENERATE_BILL",payload:[]}),h("info",c.data.data.msg)}catch(n){console.log("error",n.message)}}),Z=r=>{const[s,n]=l.useState(""),[g,c]=l.useState("All"),[x,m]=l.useState("All"),[d,v]=l.useState("pdf"),[y,R]=l.useState("teacher"),[j,P]=l.useState("All"),[u,T]=l.useState(""),[f,C]=l.useState("");l.useEffect(()=>{r.getQpDeggrp()},[]);const O=r.deggrp.map(e=>({key:e.fdeggrp,label:e.fdescpn,value:e.fdeggrp})),A=r.degree.map(e=>({key:e.fdegree,label:e.fdescpn,value:e.fdegree})),D=[...E,...A],F=[...E,...U],L=[{key:"teacher",label:"Teacher",value:"teacher"},{key:"moderator",label:"Moderator",value:"moderator"}],k=r.billgenerate.map(e=>({key:e.fteachcode,label:e.teachername,value:e.fteachcode})),i=async(e,a)=>{e=="deggrp"&&(n(a),r.getQpDegree(a),await r.getTeachers()),e=="degree"&&c(a),e=="sem"&&m(a),e=="reportopt"&&v(a),e=="reporttype"&&R(a),e=="teach"&&P(a)},b=(e,a)=>{e=="year"&&T(a),e=="mode"&&C(a)},I=async()=>{if(s==="")return h("info","Please Select Exam"),!1;if(u==="")return h("info","Please Enter Year"),!1;if(f=="")return h("info","Please Enter ExamType"),!1;let e=localStorage.getItem("dbname"),a="";d=="pdf"?a="/app.php?a=remunerationReportPdf&db=":a="/app.php?a=EGOV_generateBillReport&db=",window.open(N+a+e+"&deggrp="+s+"&degree="+g+"&sem="+x+"&reportopt="+y+"&teacher="+j+"&year="+u+"&mode="+f)};return t.jsxs(Q,{style:{margin:"6rem 10px 10px"},title:t.jsx("h6",{children:"Generate Teacher/Moderator Bill Report"}),extra:t.jsx(q,{children:t.jsx(H,{to:"/",children:t.jsx(S,{type:"primary",danger:!0,children:"Exit"})})}),children:[t.jsxs(B,{gutter:10,children:[t.jsxs(o,{xs:24,sm:24,md:12,lg:6,xl:6,xxl:6,children:[t.jsx("label",{children:"Exam"}),t.jsx(p,{showSearch:!0,optionFilterProp:"label",style:{marginBottom:"10px",width:"100%"},value:s,options:O,onChange:e=>i("deggrp",e)})]}),t.jsxs(o,{xs:24,sm:24,md:12,lg:6,xl:6,xxl:6,children:[t.jsx("label",{children:"Degree"}),t.jsx(p,{showSearch:!0,mode:"multiple",optionFilterProp:"label",style:{marginBottom:"10px",width:"100%"},value:g,options:D,onChange:e=>i("degree",e)})]}),t.jsxs(o,{xs:24,sm:24,md:12,lg:6,xl:6,xxl:6,children:[t.jsx("label",{children:"Sem"}),t.jsx(p,{showSearch:!0,optionFilterProp:"label",style:{marginBottom:"10px",width:"100%"},options:F,value:x,onChange:e=>i("sem",e)})]}),t.jsxs(o,{xs:24,sm:24,md:12,lg:6,xl:6,xxl:6,children:[t.jsx("label",{children:"Report Type"}),t.jsx(p,{showSearch:!0,optionFilterProp:"label",style:{marginBottom:"10px",width:"100%"},value:y,options:L,onChange:e=>i("reporttype",e)})]})]}),t.jsxs(B,{gutter:10,children:[t.jsxs(o,{xs:24,sm:24,md:12,lg:6,xl:6,xxl:6,children:[t.jsx("label",{children:"Teacher"}),t.jsx(p,{showSearch:!0,mode:"multiple",optionFilterProp:"label",style:{marginBottom:"10px",width:"100%"},value:j,options:k,onChange:e=>i("teach",e)})]}),t.jsxs(o,{xs:24,sm:24,md:12,lg:6,xl:6,xxl:6,children:[t.jsx("label",{children:"Year"}),t.jsx(w,{showSearch:!0,optionFilterProp:"label",style:{marginBottom:"10px",width:"100%"},value:u,onChange:e=>b("year",e.target.value)})]}),t.jsxs(o,{xs:24,sm:24,md:12,lg:6,xl:6,xxl:6,children:[t.jsx("label",{children:"Mode"}),t.jsx(w,{showSearch:!0,optionFilterProp:"label",style:{marginBottom:"10px",width:"100%"},value:f,onChange:e=>b("mode",e.target.value)})]}),t.jsxs(o,{xs:24,sm:24,md:12,lg:6,xl:6,xxl:6,children:[t.jsx("label",{children:"Excel / PDF"}),t.jsx(p,{showSearch:!0,optionFilterProp:"label",style:{marginBottom:"10px",width:"100%"},value:d,options:$,onChange:e=>i("reportopt",e)})]}),t.jsxs(o,{xs:24,sm:24,md:12,lg:6,xl:6,xxl:6,children:[t.jsx("p",{style:{marginTop:"20px"}}),t.jsxs(S,{type:"primary",style:{marginBottom:"10px"},onClick:()=>I(),children:[t.jsx(W,{}),"Generate Report"]})]})]})]})},ee=r=>(console.log(r.billgenerate,"nwdjcbedbcefb"),{deggrp:r.deggrp,degree:r.degree,billgenerate:r.billgenerate}),ne=V(ee,{getQpDeggrp:Y,getQpDegree:z,getTeachers:X})(Z);export{ne as default};