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


Current Path : /var/www/qpms/assets/
Upload File :
Current File : /var/www/qpms/assets/Degree-CYbWnPrs.js

import{x as N,r as s,Q as F,t as e,D as I,L as v,B as u,F as g,G,E as d}from"./index-DoOhtRM-.js";import{s as R,g as H,a as L}from"./Degree-DvEkXGU_.js";import{S as q}from"./index-DAtDV0BY.js";import{R as x,C as o}from"./row-B8SdGvkB.js";import"./responsiveObserver-BniLz5dQ.js";function A(r){const[i,h]=s.useState(""),[c,D]=s.useState(""),[m,j]=s.useState(""),[p,E]=s.useState(""),[f,y]=s.useState("select"),[b,C]=s.useState(!1),t=F();s.useEffect(()=>{r.getDeggrpData()},[]);const S=[{key:"select",label:"Select",value:"select"}];let w=r.getdegForDegree.map(a=>({key:a.key,value:a.value,label:a.label}));const B=[...S,...w];s.useEffect(()=>{t.degree||t.degcode||t.examno||t.examcode||t.deggrp?(t.degree&&h(t.degree),t.degcode&&D(t.degcode),t.examno&&j(t.examno),t.examcode&&E(t.examcode),t.deggrp&&y(t.deggrp),C(!0)):C(!1)},[t]);const l=(a,n)=>{a=="degree"&&h(n),a=="degcode"&&D(n),a=="examno"&&j(n),a=="examcode"&&E(n),a=="deggrp"&&y(n)},P=async()=>{if(i==="")return d("info","Please Enter Degree Name"),!1;if(c==="")return d("info","Please Enter Degree"),!1;if(m==="")return d("info","Please Enter Exam Name"),!1;if(p==="")return d("info","Please Enter Exam No"),!1;if(f==="select")return d("info","Please Select Degree Group"),!1;const a=new FormData;a.append("degree",i),a.append("degcode",c),a.append("examno",m),a.append("examcode",p),a.append("deggrp",f),await r.saveDegInfo(a)},k=async()=>{await r.getDegreeDetails()};return e.jsxs(I,{style:{margin:"6rem 10px 10px"},title:e.jsx("h6",{children:"Degree Creation"}),extra:e.jsxs(q,{children:[e.jsx(v,{to:"/qpsettings/viewdegree",children:e.jsx(u,{type:"primary",onClick:()=>k(),children:"View"})}),e.jsx(v,{to:"/",children:e.jsx(u,{type:"primary",danger:!0,children:"Exit"})})]}),children:[e.jsxs(x,{gutter:10,children:[e.jsxs(o,{xs:24,sm:24,md:12,lg:8,xl:8,xxl:8,children:[e.jsx("label",{children:"Degree"}),e.jsx(g,{style:{marginBottom:"10px"},placeholder:"Degree Name",value:i,onChange:a=>l("degree",a.target.value)})]}),e.jsxs(o,{xs:12,sm:12,md:6,lg:4,xl:4,xxl:4,children:[e.jsx("label",{children:"Degree Code"}),e.jsx(g,{style:{marginBottom:"10px"},placeholder:"Degree Shortname",value:c,disabled:b,onChange:a=>l("degcode",a.target.value)})]})]}),e.jsxs(x,{gutter:10,children:[" ",e.jsxs(o,{xs:24,sm:24,md:12,lg:8,xl:8,xxl:8,children:[e.jsx("label",{children:"Exam Number"}),e.jsx(g,{style:{marginBottom:"10px"},placeholder:"Examno No",value:m,onChange:a=>l("examno",a.target.value)})]}),e.jsxs(o,{xs:12,sm:12,md:6,lg:4,xl:4,xxl:4,children:[e.jsx("label",{children:"Examno Code"}),e.jsx(g,{style:{marginBottom:"10px"},placeholder:"Examno",value:p,disabled:b,onChange:a=>l("examcode",a.target.value)})]})]}),e.jsx(x,{children:e.jsxs(o,{xs:12,sm:12,md:6,lg:4,xl:4,xxl:4,children:[e.jsx("label",{children:"Degree Group"}),e.jsx(G,{style:{marginBottom:"10px",width:"100%"},value:f,options:B,onChange:a=>l("deggrp",a)})]})}),e.jsx(x,{children:e.jsx(u,{type:"primary",onClick:()=>P(),children:"Save"})})]})}const O=r=>({deggrpsubject:r.deggrpsubject,deggrpEditData:r.deggrpEditData,updatedeg:r.updatedeg,getdegForDegree:r.getdegForDegree}),z=N(O,{saveDegInfo:R,getDegreeDetails:H,getDeggrpData:L})(A);export{z as default};