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.140.188.174
Current Path : /var/www/qpms/assets/ |
| Current File : /var/www/qpms/assets/ViewTeacherList-5NEQGypX.js |
import{x as f,r as n,t as e,D as x,L as c,B as i,R as p,M as g}from"./index-ChT0xYiY.js";import{b as u,d as j}from"./TeacherEntry-B-NA-Jh-.js";import{g as o,s}from"./datatable-Pmr3nCys.js";import{p as y}from"./sem-DLpF_ddZ.js";import{S as b}from"./index-CCqRUA_e.js";import{R as w}from"./ArrowLeftOutlined-U4IR5KB7.js";import{R as D}from"./HomeOutlined-C_Cn3B9w.js";import{F as I}from"./Table-74BLe3me.js";import{R as T}from"./EditOutlined-BXzCBBe2.js";import{R as C}from"./DeleteOutlined-CPPj1lhl.js";import"./index-G2j282sA.js";import"./index-cEGmOHHy.js";import"./index-BDLcy6G-.js";import"./responsiveObserver-CMjrehYy.js";const R=r=>{const[l,d]=n.useState([]);n.useEffect(()=>{r.getTeacherDetails()},[]),n.useEffect(()=>{d(r.teacherDetails)},[r.teacherDetails]);const h=async t=>{await g.confirm({title:"Warning",content:"Are you sure do you want to delete?",okButtonProps:{style:{backgroundColor:"#8231d3",borderColor:"#8231d3"}},onOk(){r.deleteTeachData(t.fteachcode,t.fmobile)},onCancel(){console.log("Cancelled")}}),r.getTeacherDetails()},m=[{title:"Sl. No",dataIndex:"fslno",align:"center",width:"3%"},{title:"Teacher Code",dataIndex:"fteachcode",align:"center",...o("fteachcode","teachcode"),sorter:(t,a)=>s(t,a,"fteachcode"),sortDirections:["descend","ascend"],width:"10%"},{title:"Teacher Name",dataIndex:"fteachname",...o("fteachname","teachname"),sorter:(t,a)=>s(t,a,"fteachcode"),sortDirections:["descend","ascend"],width:"18%"},{title:"DOB",dataIndex:"fdob",align:"center",width:"7%"},{title:"Mobile",dataIndex:"fmobile",...o("fmobile","mobile"),sorter:(t,a)=>s(t,a,"fmobile"),sortDirections:["descend","ascend"],align:"center",width:"10%"},{title:"Email",dataIndex:"femail",...o("femail","email"),sorter:(t,a)=>s(t,a,"femail"),sortDirections:["descend","ascend"],width:"16%"},{title:"College",dataIndex:"fcollname",width:"20%"},{title:"Examiner",dataIndex:"fexaminer",align:"center",width:"7%"},{title:"Action",render:(t,a)=>e.jsxs("div",{style:{display:"flex",justifyContent:"space-evenly"},children:[e.jsx(c,{to:{pathname:`/qpsettings/teacher-entry/${a.fteachcode}/${a.fmobile}/update`},children:e.jsx(i,{size:"medium",style:{color:"white",background:"green"},children:e.jsx(T,{})})}),e.jsx(i,{size:"medium",style:{color:"white",background:"red"},onClick:E=>h(a),children:e.jsx(C,{})})]}),align:"center",width:"9%"}];return e.jsx(x,{style:{margin:"6rem 10px 10px"},title:e.jsx("h6",{children:"Teacher List"}),extra:e.jsxs(b,{children:[e.jsx(c,{to:"/qpsettings/teacher-entry/insert",children:e.jsxs(i,{type:"primary",children:[e.jsx(w,{})," Back"]})}),e.jsxs(i,{style:{background:"green",color:"white"},onClick:()=>saveHandler(),children:[e.jsx(p,{})," View"]}),e.jsx(c,{to:"/dashboard",children:e.jsxs(i,{type:"primary",danger:!0,children:[e.jsx(D,{})," Exit"]})})]}),children:e.jsx(I,{bordered:!0,dataSource:l,size:"small",scroll:{y:500,x:1200},columns:m,pagination:y})})},k=r=>({teacherDetails:r.teacherDetails}),W=f(k,{getTeacherDetails:u,deleteTeachData:j})(R);export{W as default};
|