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.135.202.168


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

import{x as h,r as s,y as j,t as e,D as y,L as d,B as n,T as b,O as C,M as D,v as T,E as l}from"./index-CuRu2-sd.js";import{g as I}from"./TemplateCode-C_R2EUWz.js";import{g as i,s as c}from"./datatable-COUfE-Z9.js";import{p as R}from"./sem-CXAFzSxe.js";import{S as m}from"./index-DG-ZWG4O.js";import{R as v}from"./HomeOutlined-DdlrEDWO.js";import{F as S}from"./Table-CKqaBRbC.js";import{R as k}from"./EditOutlined-DE0G2z9A.js";import{R as w}from"./FilePdfOutlined-CfungIl3.js";import{R as A}from"./DeleteOutlined-CxjHutgZ.js";import"./index-BScO3uvZ.js";import"./index-CAZy9e7A.js";import"./index-Cs-IaZvZ.js";import"./responsiveObserver-Dw64fjI1.js";const E=a=>{s.useState(""),j();const[p,f]=s.useState([]);s.useEffect(()=>{a.getTempCodeDet()},[]),s.useEffect(()=>{f(a.tempData)},[a.tempData]);const g=[{title:"Sl. No.",dataIndex:"fslno",align:"center",width:"4rem"},{title:e.jsx("div",{style:{textAlign:"center"},children:"Template Code"}),dataIndex:"ftempcode",...i("ftempcode","tempcode"),sorter:(o,t)=>c(o,t,"ftempcode"),align:"center"},{title:e.jsx("div",{style:{textAlign:"center"},children:"Template Name"}),dataIndex:"ftempname",...i("ftempname","tempname"),sorter:(o,t)=>c(o,t,"ftempname")},{title:e.jsx("div",{style:{textAlign:"center"},children:"Template Description"}),dataIndex:"ftempdesc",...i("ftempdesc","temp desc."),sorter:(o,t)=>c(o,t,"ftempdesc")},{title:"Action",render:(o,t)=>e.jsxs(m,{children:[e.jsx(d,{to:`/qpsettings/edit/edit/${t.ftempcode}`,children:e.jsxs(n,{size:"medium",style:{background:"green",color:"#fff"},children:[e.jsx(k,{})," Edit"]})}),e.jsxs(n,{size:"medium",style:{background:"#2185d0",color:"#fff"},onClick:()=>x(t.ftempcode),children:[e.jsx(w,{})," Report"]}),e.jsxs(n,{size:"medium",style:{background:"#db2828",color:"#fff"},onClick:()=>u(t.ftempcode),children:[e.jsx(A,{})," Delete"]})]}),align:"center"}],x=async o=>{let t=localStorage.getItem("dbname");window.open(C+"/app.php?a=QPPatternDet&db="+t+"&univcode="+a.funivcode+"&tempcode="+o)},u=async o=>{let t=localStorage.getItem("dbname");D.confirm({title:"Warning",content:"Do you want delete?",okButtonProps:{style:{backgroundColor:"#8231d3",borderColor:"#8231d3"}},onOk(){T.post("app.php?a=deleteTemplateCode&db="+t+"&univcode="+a.funivcode+"&tempcode="+o).then(r=>{if(typeof r.data!="object"){l("Error","Something went wrong, Please try again later");return}else if(r.data.error_code==0){l("success",r.data.data.msg),a.getTempCodeDet();return}}).catch(r=>console.log(r))},onCancel(){console.log("Cancelled")}})};return e.jsx(y,{style:{margin:"6rem 10px 10px"},title:e.jsx("h6",{children:"QP Template"}),extra:e.jsxs(m,{children:[e.jsx(d,{to:"/qpsettings/edit/add/''",children:e.jsxs(n,{type:"primary",style:{backgroundColor:"green"},children:[e.jsx(b,{}),"Add"]})}),e.jsx(d,{to:"/dashboard",children:e.jsxs(n,{type:"primary",danger:!0,children:[e.jsx(v,{})," Exit"]})})]}),children:e.jsx(S,{dataSource:p,columns:g,scroll:{x:1300,y:500},bordered:!0,size:"small",pagination:R})})},P=a=>({funivcode:a.loginfo.userData.funivcode,tempData:a.tempDet}),J=h(P,{getTempCodeDet:I})(E);export{J as default};