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.201.101
Current Path : /var/www/qpms/assets/ |
| Current File : /var/www/qpms/assets/PrepareQuestionPaper-DEhnJ9bH.js |
import{j as L,r,g as S,c as T,ak as V,B as z,bJ as B,bK as W,an as N,al as Q,aW as U,ar as H,v as _,E}from"./index-BGN0ZMlx.js";import{a as M,g as h,P as X}from"./index-D6hC5Y7U.js";const F=e=>{const{componentCls:n,iconCls:o,antCls:t,zIndexPopup:a,colorText:s,colorWarning:p,marginXXS:l,marginXS:c,fontSize:u,fontWeightStrong:y,colorTextHeading:d}=e;return{[n]:{zIndex:a,[`&${t}-popover`]:{fontSize:u},[`${n}-message`]:{marginBottom:c,display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${n}-message-icon ${o}`]:{color:p,fontSize:u,lineHeight:1,marginInlineEnd:c},[`${n}-title`]:{fontWeight:y,color:d,"&:only-child":{fontWeight:"normal"}},[`${n}-description`]:{marginTop:l,color:s}},[`${n}-buttons`]:{textAlign:"end",whiteSpace:"nowrap",button:{marginInlineStart:c}}}}},G=e=>{const{zIndexPopupBase:n}=e;return{zIndexPopup:n+60}},I=L("Popconfirm",e=>F(e),G,{resetStyle:!1});var J=function(e,n){var o={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(o[t]=e[t]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,t=Object.getOwnPropertySymbols(e);a<t.length;a++)n.indexOf(t[a])<0&&Object.prototype.propertyIsEnumerable.call(e,t[a])&&(o[t[a]]=e[t[a]]);return o};const w=e=>{const{prefixCls:n,okButtonProps:o,cancelButtonProps:t,title:a,description:s,cancelText:p,okText:l,okType:c="primary",icon:u=r.createElement(N,null),showCancel:y=!0,close:d,onConfirm:v,onCancel:C,onPopupClick:O}=e,{getPrefixCls:b}=r.useContext(S),[f]=V("Popconfirm",Q.Popconfirm),g=h(a),P=h(s);return r.createElement("div",{className:`${n}-inner-content`,onClick:O},r.createElement("div",{className:`${n}-message`},u&&r.createElement("span",{className:`${n}-message-icon`},u),r.createElement("div",{className:`${n}-message-text`},g&&r.createElement("div",{className:T(`${n}-title`)},g),P&&r.createElement("div",{className:`${n}-description`},P))),r.createElement("div",{className:`${n}-buttons`},y&&r.createElement(z,Object.assign({onClick:C,size:"small"},t),p||(f==null?void 0:f.cancelText)),r.createElement(B,{buttonProps:Object.assign(Object.assign({size:"small"},W(c)),o),actionFn:v,close:d,prefixCls:b("btn"),quitOnNullishReturnValue:!0,emitEvent:!0},l||(f==null?void 0:f.okText))))},q=e=>{const{prefixCls:n,placement:o,className:t,style:a}=e,s=J(e,["prefixCls","placement","className","style"]),{getPrefixCls:p}=r.useContext(S),l=p("popconfirm",n),[c]=I(l);return c(r.createElement(M,{placement:o,className:T(l,t),style:a,content:r.createElement(w,Object.assign({prefixCls:l},s))}))};var K=function(e,n){var o={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(o[t]=e[t]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,t=Object.getOwnPropertySymbols(e);a<t.length;a++)n.indexOf(t[a])<0&&Object.prototype.propertyIsEnumerable.call(e,t[a])&&(o[t[a]]=e[t[a]]);return o};const Y=r.forwardRef((e,n)=>{var o,t;const{prefixCls:a,placement:s="top",trigger:p="click",okType:l="primary",icon:c=r.createElement(N,null),children:u,overlayClassName:y,onOpenChange:d,onVisibleChange:v}=e,C=K(e,["prefixCls","placement","trigger","okType","icon","children","overlayClassName","onOpenChange","onVisibleChange"]),{getPrefixCls:O}=r.useContext(S),[b,f]=U(!1,{value:(o=e.open)!==null&&o!==void 0?o:e.visible,defaultValue:(t=e.defaultOpen)!==null&&t!==void 0?t:e.defaultVisible}),g=(i,m)=>{f(i,!0),v==null||v(i),d==null||d(i,m)},P=i=>{g(!1,i)},D=i=>{var m;return(m=e.onConfirm)===null||m===void 0?void 0:m.call(void 0,i)},j=i=>{var m;g(!1,i),(m=e.onCancel)===null||m===void 0||m.call(void 0,i)},$=(i,m)=>{const{disabled:R=!1}=e;R||g(i,m)},x=O("popconfirm",a),A=T(x,y),[k]=I(x);return k(r.createElement(X,Object.assign({},H(C,["title"]),{trigger:p,placement:s,onOpenChange:$,open:b,ref:n,overlayClassName:A,content:r.createElement(w,Object.assign({okType:l,icon:c},e,{prefixCls:x,close:P,onConfirm:D,onCancel:j})),"data-popover-inject":!0}),u))}),Z=Y;Z._InternalPanelDoNotUseOrYouWillBeFired=q;const ne=e=>async(n,o)=>{try{n({type:"SET_LOADER"});const t=o(),a=localStorage.getItem("dbname"),s=await _.get("app.php?a=getTemplateDetails&db="+a+"&teachcode="+t.loginfo.userData.fregno+"&data="+JSON.stringify(e)+"&usertype="+t.loginfo.userData.fusertype);n({type:"UNSET_LOADER"}),s.data.error_code===0?n({type:"GET_TEMPLATE_DETAILS",payload:s.data.data}):n({type:"GET_TEMPLATE_DETAILS",payload:[]})}catch(t){E("error",t.message)}},ae=e=>async(n,o)=>{try{n({type:"SET_LOADER"});const t=o(),a=localStorage.getItem("dbname"),s=await _.get("app.php?a=getViewPrepareQpDetails&db="+a+"&teachcode="+e+"&usertype="+t.loginfo.userData.fusertype);if(n({type:"UNSET_LOADER"}),s.data.error_code===0){const p=s.data.data.map((l,c)=>({...l,key:c,fslno:c+1}));n({type:"VIEW_PREPARE_QP_OPTION2",payload:p})}else n({type:"VIEW_PREPARE_QP_OPTION2",payload:[]}),E("info",s.data.data.msg)}catch(t){E("error",t.message)}},oe=(e,n,o)=>async(t,a)=>{try{const s=a();let p=localStorage.getItem("dbname");t({type:"SET_LOADER"});const l=await _.post("app.php?a=saveTeachConfirm&db="+p+"&univcode="+s.loginfo.userData.funivcode,e);t({type:"UNSET_LOADER"}),l.data.error_code===0?n(o):E("info",l.data.data.msg)}catch(s){E("error",s.message)}};export{Z as P,ae as a,oe as c,ne as g};
|