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.129.216.248
Current Path : /var/www/qpms/assets/ |
| Current File : /var/www/qpms/assets/ViewTeacherList-Cx33MUay.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-BGN0ZMlx.js";import{b as u,d as j}from"./TeacherEntry-Da3R9w6k.js";import{g as o,s}from"./datatable-DO2-ZaDk.js";import{p as y}from"./sem-DLpF_ddZ.js";import{S as b}from"./index-Cvv7jmnp.js";import{R as w}from"./ArrowLeftOutlined-CHkz4qWK.js";import{R as D}from"./HomeOutlined-D4-Nsiyp.js";import{F as I}from"./Table-DrjpZi7U.js";import{R as T}from"./EditOutlined-D0WghQxW.js";import{R as C}from"./DeleteOutlined-BkRedyo7.js";import"./index-CRTM9snO.js";import"./index-BzT3oaCy.js";import"./index-cLl6_n2r.js";import"./responsiveObserver-lGxp52mZ.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};
|